@oneblink/apps-react 2.3.0-beta.2 → 2.3.0-beta.4

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 (455) hide show
  1. package/dist/OneBlinkAutoSaveForm.d.ts +10 -10
  2. package/dist/OneBlinkAutoSaveForm.js +28 -28
  3. package/dist/OneBlinkForm.d.ts +11 -11
  4. package/dist/OneBlinkForm.js +11 -11
  5. package/dist/OneBlinkFormBase.d.ts +29 -28
  6. package/dist/OneBlinkFormBase.js +479 -472
  7. package/dist/OneBlinkFormBase.js.map +1 -1
  8. package/dist/OneBlinkReadOnlyForm.d.ts +11 -11
  9. package/dist/OneBlinkReadOnlyForm.js +48 -48
  10. package/dist/components/CopyToClipboardIconButton.d.ts +10 -10
  11. package/dist/components/CopyToClipboardIconButton.js +32 -32
  12. package/dist/components/CustomAccordion.d.ts +27 -27
  13. package/dist/components/CustomAccordion.js +37 -37
  14. package/dist/components/ErrorSnackbar.d.ts +8 -8
  15. package/dist/components/ErrorSnackbar.js +25 -25
  16. package/dist/components/Lists.d.ts +25 -25
  17. package/dist/components/Lists.js +44 -44
  18. package/dist/components/LoadingWithMessage.d.ts +6 -6
  19. package/dist/components/LoadingWithMessage.js +11 -11
  20. package/dist/components/formStore/FormStoreTableProvider.d.ts +6 -6
  21. package/dist/components/formStore/FormStoreTableProvider.js +90 -90
  22. package/dist/components/formStore/OneBlinkFormStoreClearFiltersButton.d.ts +5 -5
  23. package/dist/components/formStore/OneBlinkFormStoreClearFiltersButton.js +19 -19
  24. package/dist/components/formStore/OneBlinkFormStoreColumnsButton.d.ts +5 -5
  25. package/dist/components/formStore/OneBlinkFormStoreColumnsButton.js +66 -66
  26. package/dist/components/formStore/OneBlinkFormStoreDownloadButton.d.ts +5 -5
  27. package/dist/components/formStore/OneBlinkFormStoreDownloadButton.js +86 -86
  28. package/dist/components/formStore/OneBlinkFormStoreProvider.d.ts +8 -8
  29. package/dist/components/formStore/OneBlinkFormStoreProvider.js +24 -24
  30. package/dist/components/formStore/OneBlinkFormStoreRefreshButton.d.ts +5 -5
  31. package/dist/components/formStore/OneBlinkFormStoreRefreshButton.js +11 -11
  32. package/dist/components/formStore/OneBlinkFormStoreTable.d.ts +4 -4
  33. package/dist/components/formStore/OneBlinkFormStoreTable.js +194 -194
  34. package/dist/components/formStore/display/ElementDisplay.d.ts +23 -23
  35. package/dist/components/formStore/display/ElementDisplay.js +77 -77
  36. package/dist/components/formStore/display/FormStoreIcon.d.ts +2 -2
  37. package/dist/components/formStore/display/FormStoreIcon.js +2 -2
  38. package/dist/components/formStore/table/ActionedByTableCell.d.ts +11 -11
  39. package/dist/components/formStore/table/ActionedByTableCell.js +43 -43
  40. package/dist/components/formStore/table/ColumnFilters.d.ts +9 -9
  41. package/dist/components/formStore/table/ColumnFilters.js +179 -179
  42. package/dist/components/formStore/table/FormElementTableCell.d.ts +10 -10
  43. package/dist/components/formStore/table/FormElementTableCell.js +228 -228
  44. package/dist/components/formStore/table/HeaderCellMoreButton.d.ts +9 -9
  45. package/dist/components/formStore/table/HeaderCellMoreButton.js +48 -48
  46. package/dist/components/formStore/table/RepeatableSetCell.d.ts +8 -8
  47. package/dist/components/formStore/table/RepeatableSetCell.js +62 -62
  48. package/dist/components/formStore/table/RepeatableSetCellAccordion.d.ts +9 -9
  49. package/dist/components/formStore/table/RepeatableSetCellAccordion.js +11 -11
  50. package/dist/components/formStore/table/TableCellCopyButton.d.ts +7 -7
  51. package/dist/components/formStore/table/TableCellCopyButton.js +27 -27
  52. package/dist/components/formStore/table/generateColumns.d.ts +24 -24
  53. package/dist/components/formStore/table/generateColumns.js +290 -290
  54. package/dist/components/formStore/table/useFormStoreTable.d.ts +52 -52
  55. package/dist/components/formStore/table/useFormStoreTable.js +157 -157
  56. package/dist/components/formStore/useFormStoreTableContext.d.ts +44 -44
  57. package/dist/components/formStore/useFormStoreTableContext.js +9 -9
  58. package/dist/components/messages/ErrorMessage.d.ts +12 -12
  59. package/dist/components/messages/ErrorMessage.js +12 -12
  60. package/dist/components/messages/LargeIconMessage.d.ts +18 -18
  61. package/dist/components/messages/LargeIconMessage.js +33 -33
  62. package/dist/components/messages/NoResourcesYet.d.ts +11 -11
  63. package/dist/components/messages/NoResourcesYet.js +6 -6
  64. package/dist/components/pickers/V4CompatibleDatePicker.d.ts +32 -32
  65. package/dist/components/pickers/V4CompatibleDatePicker.js +70 -70
  66. package/dist/components/pickers/V4CompatibleDateTimePicker.d.ts +32 -32
  67. package/dist/components/pickers/V4CompatibleDateTimePicker.js +70 -70
  68. package/dist/components/pickers/V4CompatibleTimePicker.d.ts +28 -28
  69. package/dist/components/pickers/V4CompatibleTimePicker.js +53 -53
  70. package/dist/components/renderer/AnnotationModal.d.ts +8 -8
  71. package/dist/components/renderer/AnnotationModal.js +101 -101
  72. package/dist/components/renderer/AutocompleteDropdown.d.ts +26 -26
  73. package/dist/components/renderer/AutocompleteDropdown.js +175 -175
  74. package/dist/components/renderer/CopyToClipboardButton.d.ts +8 -8
  75. package/dist/components/renderer/CopyToClipboardButton.js +13 -13
  76. package/dist/components/renderer/CustomisableButtonInner.d.ts +7 -7
  77. package/dist/components/renderer/CustomisableButtonInner.js +8 -8
  78. package/dist/components/renderer/FormElementLabelContainer.d.ts +12 -12
  79. package/dist/components/renderer/FormElementLabelContainer.js +15 -15
  80. package/dist/components/renderer/FormElementOptions.d.ts +9 -9
  81. package/dist/components/renderer/FormElementOptions.js +14 -14
  82. package/dist/components/renderer/LookupButton.d.ts +10 -10
  83. package/dist/components/renderer/LookupButton.js +29 -29
  84. package/dist/components/renderer/LookupNotification.d.ts +12 -12
  85. package/dist/components/renderer/LookupNotification.js +230 -230
  86. package/dist/components/renderer/Modal.d.ts +14 -14
  87. package/dist/components/renderer/Modal.js +14 -14
  88. package/dist/components/renderer/OnLoading.d.ts +10 -10
  89. package/dist/components/renderer/OnLoading.js +11 -11
  90. package/dist/components/renderer/OneBlinkAppsErrorOriginalMessage.d.ts +7 -7
  91. package/dist/components/renderer/OneBlinkAppsErrorOriginalMessage.js +12 -12
  92. package/dist/components/renderer/OneBlinkFormElements.d.ts +19 -19
  93. package/dist/components/renderer/OneBlinkFormElements.js +202 -202
  94. package/dist/components/renderer/PageFormElements.d.ts +17 -17
  95. package/dist/components/renderer/PageFormElements.js +48 -48
  96. package/dist/components/renderer/ProgressBar.d.ts +7 -7
  97. package/dist/components/renderer/ProgressBar.js +6 -6
  98. package/dist/components/renderer/ProgressBar.js.map +1 -1
  99. package/dist/components/renderer/ToggleAllCheckbox.d.ts +13 -13
  100. package/dist/components/renderer/ToggleAllCheckbox.js +26 -26
  101. package/dist/components/renderer/attachments/AttachmentStatus.d.ts +10 -10
  102. package/dist/components/renderer/attachments/AttachmentStatus.js +36 -36
  103. package/dist/components/renderer/attachments/FileCard.d.ts +19 -19
  104. package/dist/components/renderer/attachments/FileCard.js +60 -60
  105. package/dist/components/renderer/attachments/FileCardContent.d.ts +5 -5
  106. package/dist/components/renderer/attachments/FileCardContent.js +10 -10
  107. package/dist/components/renderer/attachments/ImagePreviewUnavailable.d.ts +4 -4
  108. package/dist/components/renderer/attachments/ImagePreviewUnavailable.js +11 -11
  109. package/dist/components/renderer/attachments/ProgressBar.d.ts +8 -8
  110. package/dist/components/renderer/attachments/ProgressBar.js +33 -33
  111. package/dist/form-elements/ComplianceButton.d.ts +10 -10
  112. package/dist/form-elements/ComplianceButton.js +11 -11
  113. package/dist/form-elements/FormElementABN.d.ts +14 -14
  114. package/dist/form-elements/FormElementABN.js +155 -155
  115. package/dist/form-elements/FormElementAutocomplete.d.ts +19 -19
  116. package/dist/form-elements/FormElementAutocomplete.js +81 -81
  117. package/dist/form-elements/FormElementBSB.d.ts +18 -18
  118. package/dist/form-elements/FormElementBSB.js +100 -100
  119. package/dist/form-elements/FormElementBarcodeScanner.d.ts +14 -14
  120. package/dist/form-elements/FormElementBarcodeScanner.js +306 -306
  121. package/dist/form-elements/FormElementBoolean.d.ts +14 -14
  122. package/dist/form-elements/FormElementBoolean.js +16 -16
  123. package/dist/form-elements/FormElementCalculation.d.ts +11 -11
  124. package/dist/form-elements/FormElementCalculation.js +179 -179
  125. package/dist/form-elements/FormElementCamera.d.ts +15 -15
  126. package/dist/form-elements/FormElementCamera.js +227 -227
  127. package/dist/form-elements/FormElementCaptcha.d.ts +12 -12
  128. package/dist/form-elements/FormElementCaptcha.js +14 -14
  129. package/dist/form-elements/FormElementCheckBoxes.d.ts +15 -15
  130. package/dist/form-elements/FormElementCheckBoxes.js +64 -64
  131. package/dist/form-elements/FormElementCivicaNameRecord.d.ts +8 -8
  132. package/dist/form-elements/FormElementCivicaNameRecord.js +51 -51
  133. package/dist/form-elements/FormElementCivicaStreetName.d.ts +15 -15
  134. package/dist/form-elements/FormElementCivicaStreetName.js +38 -38
  135. package/dist/form-elements/FormElementCompliance.d.ts +22 -22
  136. package/dist/form-elements/FormElementCompliance.js +129 -129
  137. package/dist/form-elements/FormElementDate.d.ts +14 -14
  138. package/dist/form-elements/FormElementDate.js +74 -74
  139. package/dist/form-elements/FormElementDateTime.d.ts +14 -14
  140. package/dist/form-elements/FormElementDateTime.js +67 -67
  141. package/dist/form-elements/FormElementEmail.d.ts +14 -14
  142. package/dist/form-elements/FormElementEmail.js +22 -22
  143. package/dist/form-elements/FormElementFile.d.ts +13 -13
  144. package/dist/form-elements/FormElementFile.js +31 -31
  145. package/dist/form-elements/FormElementFiles.d.ts +15 -15
  146. package/dist/form-elements/FormElementFiles.js +42 -42
  147. package/dist/form-elements/FormElementForm.d.ts +17 -17
  148. package/dist/form-elements/FormElementForm.js +63 -63
  149. package/dist/form-elements/FormElementFreshdeskDependentField.d.ts +8 -8
  150. package/dist/form-elements/FormElementFreshdeskDependentField.js +15 -15
  151. package/dist/form-elements/FormElementGeoscapeAddress.d.ts +15 -15
  152. package/dist/form-elements/FormElementGeoscapeAddress.js +62 -62
  153. package/dist/form-elements/FormElementHTML.d.ts +8 -8
  154. package/dist/form-elements/FormElementHTML.js +15 -15
  155. package/dist/form-elements/FormElementHeading.d.ts +8 -8
  156. package/dist/form-elements/FormElementHeading.js +23 -23
  157. package/dist/form-elements/FormElementImage.d.ts +8 -8
  158. package/dist/form-elements/FormElementImage.js +6 -6
  159. package/dist/form-elements/FormElementLocation.d.ts +20 -20
  160. package/dist/form-elements/FormElementLocation.js +204 -204
  161. package/dist/form-elements/FormElementNumber.d.ts +14 -14
  162. package/dist/form-elements/FormElementNumber.js +72 -72
  163. package/dist/form-elements/FormElementPointAddress.d.ts +15 -15
  164. package/dist/form-elements/FormElementPointAddress.js +69 -69
  165. package/dist/form-elements/FormElementRadio.d.ts +15 -15
  166. package/dist/form-elements/FormElementRadio.js +41 -41
  167. package/dist/form-elements/FormElementRepeatableSet.d.ts +19 -19
  168. package/dist/form-elements/FormElementRepeatableSet.js +126 -126
  169. package/dist/form-elements/FormElementSection.d.ts +8 -8
  170. package/dist/form-elements/FormElementSection.js +69 -69
  171. package/dist/form-elements/FormElementSelect.d.ts +15 -15
  172. package/dist/form-elements/FormElementSelect.js +44 -44
  173. package/dist/form-elements/FormElementSignature.d.ts +15 -15
  174. package/dist/form-elements/FormElementSignature.js +138 -138
  175. package/dist/form-elements/FormElementSummary.d.ts +11 -11
  176. package/dist/form-elements/FormElementSummary.js +159 -159
  177. package/dist/form-elements/FormElementTelephone.d.ts +14 -14
  178. package/dist/form-elements/FormElementTelephone.js +22 -22
  179. package/dist/form-elements/FormElementText.d.ts +14 -14
  180. package/dist/form-elements/FormElementText.js +29 -29
  181. package/dist/form-elements/FormElementTextarea.d.ts +14 -14
  182. package/dist/form-elements/FormElementTextarea.js +30 -30
  183. package/dist/form-elements/FormElementTime.d.ts +14 -14
  184. package/dist/form-elements/FormElementTime.js +53 -53
  185. package/dist/form-elements/OptionButton.d.ts +11 -11
  186. package/dist/form-elements/OptionButton.js +9 -9
  187. package/dist/hooks/attachments/useAttachment.d.ts +12 -12
  188. package/dist/hooks/attachments/useAttachment.js +242 -242
  189. package/dist/hooks/attachments/useAttachmentBlobs.d.ts +19 -19
  190. package/dist/hooks/attachments/useAttachmentBlobs.js +23 -23
  191. package/dist/hooks/attachments/useAttachments.d.ts +10 -10
  192. package/dist/hooks/attachments/useAttachments.js +69 -69
  193. package/dist/hooks/useAbnLookupAuthenticationGuid.d.ts +3 -3
  194. package/dist/hooks/useAbnLookupAuthenticationGuid.js +5 -5
  195. package/dist/hooks/useAuth.d.ts +15 -15
  196. package/dist/hooks/useAuth.js +42 -42
  197. package/dist/hooks/useBooleanState.d.ts +5 -5
  198. package/dist/hooks/useBooleanState.js +8 -8
  199. package/dist/hooks/useCaptchaSiteKey.d.ts +3 -3
  200. package/dist/hooks/useCaptchaSiteKey.js +5 -5
  201. package/dist/hooks/useClickOutsideElement.d.ts +3 -3
  202. package/dist/hooks/useClickOutsideElement.js +14 -14
  203. package/dist/hooks/useConditionalLogic.d.ts +6 -6
  204. package/dist/hooks/useConditionalLogic.js +22 -22
  205. package/dist/hooks/useContrastColor.d.ts +2 -2
  206. package/dist/hooks/useContrastColor.js +12 -12
  207. package/dist/hooks/useDynamicOptionsLoaderState.d.ts +7 -7
  208. package/dist/hooks/useDynamicOptionsLoaderState.js +44 -44
  209. package/dist/hooks/useExecutedLookupCallback.d.ts +12 -12
  210. package/dist/hooks/useExecutedLookupCallback.js +15 -15
  211. package/dist/hooks/useFlatpickr.d.ts +10 -10
  212. package/dist/hooks/useFlatpickr.js +73 -73
  213. package/dist/hooks/useFlatpickrGuid.d.ts +7 -7
  214. package/dist/hooks/useFlatpickrGuid.js +11 -11
  215. package/dist/hooks/useFlattenElementsContext.d.ts +2 -2
  216. package/dist/hooks/useFlattenElementsContext.js +7 -7
  217. package/dist/hooks/useFormDefinition.d.ts +4 -4
  218. package/dist/hooks/useFormDefinition.js +9 -9
  219. package/dist/hooks/useFormElementOptions.d.ts +9 -9
  220. package/dist/hooks/useFormElementOptions.js +35 -35
  221. package/dist/hooks/useFormIsReadOnly.d.ts +3 -3
  222. package/dist/hooks/useFormIsReadOnly.js +5 -5
  223. package/dist/hooks/useFormSubmissionAutoSaveState.d.ts +24 -24
  224. package/dist/hooks/useFormSubmissionAutoSaveState.js +145 -145
  225. package/dist/hooks/useFormSubmissionModelContext.d.ts +15 -15
  226. package/dist/hooks/useFormSubmissionModelContext.js +32 -32
  227. package/dist/hooks/useFormSubmissionState.d.ts +10 -10
  228. package/dist/hooks/useFormSubmissionState.js +13 -13
  229. package/dist/hooks/useFormValidation.d.ts +7 -7
  230. package/dist/hooks/useFormValidation.js +29 -29
  231. package/dist/hooks/useGoogleMapsApiKey.d.ts +3 -3
  232. package/dist/hooks/useGoogleMapsApiKey.js +5 -5
  233. package/dist/hooks/useInfiniteScrollDataLoad.d.ts +30 -30
  234. package/dist/hooks/useInfiniteScrollDataLoad.js +124 -124
  235. package/dist/hooks/useInjectPages.d.ts +7 -7
  236. package/dist/hooks/useInjectPages.js +5 -5
  237. package/dist/hooks/useIsHovering.d.ts +5 -5
  238. package/dist/hooks/useIsHovering.js +12 -12
  239. package/dist/hooks/useIsMounted.d.ts +3 -3
  240. package/dist/hooks/useIsMounted.js +11 -11
  241. package/dist/hooks/useIsOffline.d.ts +6 -6
  242. package/dist/hooks/useIsOffline.js +26 -26
  243. package/dist/hooks/useIsPageVisible.d.ts +9 -9
  244. package/dist/hooks/useIsPageVisible.js +8 -8
  245. package/dist/hooks/useLoadDataState.d.ts +15 -15
  246. package/dist/hooks/useLoadDataState.js +54 -54
  247. package/dist/hooks/useLogin.d.ts +46 -46
  248. package/dist/hooks/useLogin.js +295 -295
  249. package/dist/hooks/useLookupNotification.d.ts +9 -9
  250. package/dist/hooks/useLookupNotification.js +10 -10
  251. package/dist/hooks/useLookups.d.ts +5 -5
  252. package/dist/hooks/useLookups.js +62 -62
  253. package/dist/hooks/useNullableState.d.ts +2 -2
  254. package/dist/hooks/useNullableState.js +6 -6
  255. package/dist/hooks/usePages.d.ts +24 -24
  256. package/dist/hooks/usePages.js +141 -141
  257. package/dist/hooks/useQuery.d.ts +2 -2
  258. package/dist/hooks/useQuery.js +7 -7
  259. package/dist/hooks/useSubmissionIdIsValid.d.ts +3 -3
  260. package/dist/hooks/useSubmissionIdIsValid.js +19 -19
  261. package/dist/hooks/useToggleComplianceChildren.d.ts +3 -3
  262. package/dist/hooks/useToggleComplianceChildren.js +13 -13
  263. package/dist/index.d.ts +23 -23
  264. package/dist/index.js +23 -23
  265. package/dist/services/attachments.d.ts +10 -10
  266. package/dist/services/attachments.js +72 -72
  267. package/dist/services/barcode-readers/quagger.d.ts +1 -1
  268. package/dist/services/barcode-readers/quagger.js +34 -34
  269. package/dist/services/blob-utils.d.ts +5 -5
  270. package/dist/services/blob-utils.js +73 -73
  271. package/dist/services/checkBsbsAreInvalid.d.ts +3 -3
  272. package/dist/services/checkBsbsAreInvalid.js +40 -40
  273. package/dist/services/checkIfAttachmentsExist.d.ts +5 -5
  274. package/dist/services/checkIfAttachmentsExist.js +144 -144
  275. package/dist/services/checkIfBsbsAreValidating.d.ts +3 -3
  276. package/dist/services/checkIfBsbsAreValidating.js +40 -40
  277. package/dist/services/cleanFormSubmissionModel.d.ts +6 -6
  278. package/dist/services/cleanFormSubmissionModel.js +203 -203
  279. package/dist/services/defaultCoordinates.d.ts +5 -5
  280. package/dist/services/defaultCoordinates.js +8 -8
  281. package/dist/services/download-file.d.ts +3 -3
  282. package/dist/services/download-file.js +90 -90
  283. package/dist/services/drawTimestampOnCanvas.d.ts +1 -1
  284. package/dist/services/drawTimestampOnCanvas.js +22 -22
  285. package/dist/services/form-validation.d.ts +10 -10
  286. package/dist/services/form-validation.js +561 -561
  287. package/dist/services/generate-default-data.d.ts +13 -13
  288. package/dist/services/generate-default-data.js +494 -494
  289. package/dist/services/generateCivicaNameRecordElements.d.ts +2 -2
  290. package/dist/services/generateCivicaNameRecordElements.js +140 -140
  291. package/dist/services/generateFreshdeskDependentFieldElements.d.ts +2 -2
  292. package/dist/services/generateFreshdeskDependentFieldElements.js +69 -69
  293. package/dist/services/sanitize-html.d.ts +2 -2
  294. package/dist/services/sanitize-html.js +20 -20
  295. package/dist/services/scrolling-service.d.ts +7 -7
  296. package/dist/services/scrolling-service.js +38 -38
  297. package/dist/services/utils-service.d.ts +5 -5
  298. package/dist/services/utils-service.js +16 -16
  299. package/dist/types/attachments.d.ts +19 -19
  300. package/dist/types/attachments.js +1 -1
  301. package/dist/types/form.d.ts +40 -40
  302. package/dist/types/form.js +2 -2
  303. package/package.json +2 -2
  304. package/dist/OneBlinkFormStoreView.d.ts +0 -8
  305. package/dist/OneBlinkFormStoreView.js +0 -55
  306. package/dist/OneBlinkFormStoreView.js.map +0 -1
  307. package/dist/components/AnnotationModal.d.ts +0 -8
  308. package/dist/components/AnnotationModal.js +0 -104
  309. package/dist/components/AnnotationModal.js.map +0 -1
  310. package/dist/components/AutocompleteDropdown.d.ts +0 -26
  311. package/dist/components/AutocompleteDropdown.js +0 -174
  312. package/dist/components/AutocompleteDropdown.js.map +0 -1
  313. package/dist/components/CopyToClipboardButton.d.ts +0 -9
  314. package/dist/components/CopyToClipboardButton.js +0 -14
  315. package/dist/components/CopyToClipboardButton.js.map +0 -1
  316. package/dist/components/CustomisableButtonInner.d.ts +0 -7
  317. package/dist/components/CustomisableButtonInner.js +0 -9
  318. package/dist/components/CustomisableButtonInner.js.map +0 -1
  319. package/dist/components/ErrorMessage.d.ts +0 -13
  320. package/dist/components/ErrorMessage.js +0 -13
  321. package/dist/components/ErrorMessage.js.map +0 -1
  322. package/dist/components/FormElementLabelContainer.d.ts +0 -12
  323. package/dist/components/FormElementLabelContainer.js +0 -16
  324. package/dist/components/FormElementLabelContainer.js.map +0 -1
  325. package/dist/components/FormElementOptions.d.ts +0 -9
  326. package/dist/components/FormElementOptions.js +0 -15
  327. package/dist/components/FormElementOptions.js.map +0 -1
  328. package/dist/components/LookupButton.d.ts +0 -10
  329. package/dist/components/LookupButton.js +0 -30
  330. package/dist/components/LookupButton.js.map +0 -1
  331. package/dist/components/LookupNotification.d.ts +0 -12
  332. package/dist/components/LookupNotification.js +0 -231
  333. package/dist/components/LookupNotification.js.map +0 -1
  334. package/dist/components/Modal.d.ts +0 -14
  335. package/dist/components/Modal.js +0 -15
  336. package/dist/components/Modal.js.map +0 -1
  337. package/dist/components/NoResourcesYet.d.ts +0 -12
  338. package/dist/components/NoResourcesYet.js +0 -7
  339. package/dist/components/NoResourcesYet.js.map +0 -1
  340. package/dist/components/OnLoading.d.ts +0 -10
  341. package/dist/components/OnLoading.js +0 -12
  342. package/dist/components/OnLoading.js.map +0 -1
  343. package/dist/components/OneBlinkAppsErrorOriginalMessage.d.ts +0 -7
  344. package/dist/components/OneBlinkAppsErrorOriginalMessage.js +0 -13
  345. package/dist/components/OneBlinkAppsErrorOriginalMessage.js.map +0 -1
  346. package/dist/components/OneBlinkFormElements.d.ts +0 -19
  347. package/dist/components/OneBlinkFormElements.js +0 -196
  348. package/dist/components/OneBlinkFormElements.js.map +0 -1
  349. package/dist/components/PageFormElements.d.ts +0 -17
  350. package/dist/components/PageFormElements.js +0 -49
  351. package/dist/components/PageFormElements.js.map +0 -1
  352. package/dist/components/ToggleAllCheckbox.d.ts +0 -13
  353. package/dist/components/ToggleAllCheckbox.js +0 -27
  354. package/dist/components/ToggleAllCheckbox.js.map +0 -1
  355. package/dist/components/attachments/AttachmentStatus.d.ts +0 -12
  356. package/dist/components/attachments/AttachmentStatus.js +0 -35
  357. package/dist/components/attachments/AttachmentStatus.js.map +0 -1
  358. package/dist/components/attachments/FileCard.d.ts +0 -18
  359. package/dist/components/attachments/FileCard.js +0 -58
  360. package/dist/components/attachments/FileCard.js.map +0 -1
  361. package/dist/components/attachments/FileCardContent.d.ts +0 -5
  362. package/dist/components/attachments/FileCardContent.js +0 -11
  363. package/dist/components/attachments/FileCardContent.js.map +0 -1
  364. package/dist/components/attachments/Files.d.ts +0 -14
  365. package/dist/components/attachments/Files.js +0 -27
  366. package/dist/components/attachments/Files.js.map +0 -1
  367. package/dist/components/attachments/ImagePreviewUnavailable.d.ts +0 -4
  368. package/dist/components/attachments/ImagePreviewUnavailable.js +0 -12
  369. package/dist/components/attachments/ImagePreviewUnavailable.js.map +0 -1
  370. package/dist/components/attachments/UploadingAttachment.d.ts +0 -4
  371. package/dist/components/attachments/UploadingAttachment.js +0 -13
  372. package/dist/components/attachments/UploadingAttachment.js.map +0 -1
  373. package/dist/components/formStore/ColumnsConfigurationButton.d.ts +0 -10
  374. package/dist/components/formStore/ColumnsConfigurationButton.js +0 -29
  375. package/dist/components/formStore/ColumnsConfigurationButton.js.map +0 -1
  376. package/dist/components/formStore/DownloadSubmissionDataButton.d.ts +0 -13
  377. package/dist/components/formStore/DownloadSubmissionDataButton.js +0 -45
  378. package/dist/components/formStore/DownloadSubmissionDataButton.js.map +0 -1
  379. package/dist/components/formStore/FormStore.d.ts +0 -9
  380. package/dist/components/formStore/FormStore.js +0 -103
  381. package/dist/components/formStore/FormStore.js.map +0 -1
  382. package/dist/components/formStore/table/index.d.ts +0 -17
  383. package/dist/components/formStore/table/index.js +0 -194
  384. package/dist/components/formStore/table/index.js.map +0 -1
  385. package/dist/components/renderer/attachments/Files.d.ts +0 -14
  386. package/dist/components/renderer/attachments/Files.js +0 -27
  387. package/dist/components/renderer/attachments/Files.js.map +0 -1
  388. package/dist/components/renderer/attachments/UploadingAttachment.d.ts +0 -4
  389. package/dist/components/renderer/attachments/UploadingAttachment.js +0 -13
  390. package/dist/components/renderer/attachments/UploadingAttachment.js.map +0 -1
  391. package/dist/form-elements/FormElementFiles/FormElementFile.d.ts +0 -13
  392. package/dist/form-elements/FormElementFiles/FormElementFile.js +0 -32
  393. package/dist/form-elements/FormElementFiles/FormElementFile.js.map +0 -1
  394. package/dist/form-elements/FormElementFiles/FormElementFileDisplay.d.ts +0 -10
  395. package/dist/form-elements/FormElementFiles/FormElementFileDisplay.js +0 -11
  396. package/dist/form-elements/FormElementFiles/FormElementFileDisplay.js.map +0 -1
  397. package/dist/form-elements/FormElementFiles/FormElementFiles.d.ts +0 -15
  398. package/dist/form-elements/FormElementFiles/FormElementFiles.js +0 -17
  399. package/dist/form-elements/FormElementFiles/FormElementFiles.js.map +0 -1
  400. package/dist/form-elements/FormElementFiles/FormElementFilesInvalidAttachment.d.ts +0 -7
  401. package/dist/form-elements/FormElementFiles/FormElementFilesInvalidAttachment.js +0 -11
  402. package/dist/form-elements/FormElementFiles/FormElementFilesInvalidAttachment.js.map +0 -1
  403. package/dist/form-elements/FormElementFiles/index.d.ts +0 -17
  404. package/dist/form-elements/FormElementFiles/index.js +0 -18
  405. package/dist/form-elements/FormElementFiles/index.js.map +0 -1
  406. package/dist/form-elements/FormElementFiles/legacy/FormElementFiles.d.ts +0 -18
  407. package/dist/form-elements/FormElementFiles/legacy/FormElementFiles.js +0 -61
  408. package/dist/form-elements/FormElementFiles/legacy/FormElementFiles.js.map +0 -1
  409. package/dist/hooks/attachments/useAttachmentObjectURLs.d.ts +0 -24
  410. package/dist/hooks/attachments/useAttachmentObjectURLs.js +0 -37
  411. package/dist/hooks/attachments/useAttachmentObjectURLs.js.map +0 -1
  412. package/dist/hooks/attachments/useLocalAttachmentBlobs.d.ts +0 -24
  413. package/dist/hooks/attachments/useLocalAttachmentBlobs.js +0 -40
  414. package/dist/hooks/attachments/useLocalAttachmentBlobs.js.map +0 -1
  415. package/dist/hooks/useButtonsConfiguration.d.ts +0 -45
  416. package/dist/hooks/useButtonsConfiguration.js +0 -6
  417. package/dist/hooks/useButtonsConfiguration.js.map +0 -1
  418. package/dist/hooks/useChangeEffect.d.ts +0 -1
  419. package/dist/hooks/useChangeEffect.js +0 -14
  420. package/dist/hooks/useChangeEffect.js.map +0 -1
  421. package/dist/hooks/useConditionallyShowOptionCallback.d.ts +0 -5
  422. package/dist/hooks/useConditionallyShowOptionCallback.js +0 -20
  423. package/dist/hooks/useConditionallyShowOptionCallback.js.map +0 -1
  424. package/dist/hooks/useCustomValidation.d.ts +0 -1
  425. package/dist/hooks/useCustomValidation.js +0 -9
  426. package/dist/hooks/useCustomValidation.js.map +0 -1
  427. package/dist/hooks/useDynamicOptionsLoaderEffect.d.ts +0 -7
  428. package/dist/hooks/useDynamicOptionsLoaderEffect.js +0 -45
  429. package/dist/hooks/useDynamicOptionsLoaderEffect.js.map +0 -1
  430. package/dist/hooks/useLegacyElements.d.ts +0 -16
  431. package/dist/hooks/useLegacyElements.js +0 -55
  432. package/dist/hooks/useLegacyElements.js.map +0 -1
  433. package/dist/hooks/useToggleAll.d.ts +0 -6
  434. package/dist/hooks/useToggleAll.js +0 -24
  435. package/dist/hooks/useToggleAll.js.map +0 -1
  436. package/dist/services/checkIfAttachmentsAreUploading.d.ts +0 -3
  437. package/dist/services/checkIfAttachmentsAreUploading.js +0 -58
  438. package/dist/services/checkIfAttachmentsAreUploading.js.map +0 -1
  439. package/dist/services/clean-form-elements-ctrl-model.d.ts +0 -4
  440. package/dist/services/clean-form-elements-ctrl-model.js +0 -166
  441. package/dist/services/clean-form-elements-ctrl-model.js.map +0 -1
  442. package/dist/services/conditionally-show-element.d.ts +0 -11
  443. package/dist/services/conditionally-show-element.js +0 -92
  444. package/dist/services/conditionally-show-element.js.map +0 -1
  445. package/dist/services/conditionally-show-option.d.ts +0 -3
  446. package/dist/services/conditionally-show-option.js +0 -135
  447. package/dist/services/conditionally-show-option.js.map +0 -1
  448. package/dist/services/flattenFormElements.d.ts +0 -2
  449. package/dist/services/flattenFormElements.js +0 -13
  450. package/dist/services/flattenFormElements.js.map +0 -1
  451. package/dist/services/getCorrectDateFromDateOnlyString.d.ts +0 -2
  452. package/dist/services/getCorrectDateFromDateOnlyString.js +0 -4
  453. package/dist/services/getCorrectDateFromDateOnlyString.js.map +0 -1
  454. package/dist/styles/boolean.scss +0 -12
  455. package/dist/styles/ob-file.scss +0 -63
@@ -1,160 +1,160 @@
1
- import * as React from 'react';
2
- import { localisationService } from '@oneblink/apps';
3
- import { useFormSubmissionModelParent } from '../hooks/useFormSubmissionModelContext';
4
- import useFlattenElements from '../hooks/useFlattenElementsContext';
5
- import { generateDate } from '../services/generate-default-data';
6
- const arraysAreEqual = (a, b) => {
7
- if (!Array.isArray(a) || !Array.isArray(b)) {
8
- if (a !== b)
9
- return false;
10
- return true;
11
- }
12
- if (a.length !== b.length)
13
- return false;
14
- for (let i = 0; i < a.length; i++) {
15
- if (Array.isArray(a[i]) && Array.isArray(b[i])) {
16
- const areEqual = arraysAreEqual(a[i], b[i]);
17
- if (!areEqual)
18
- return false;
19
- continue;
20
- }
21
- if (a[i] !== b[i])
22
- return false;
23
- }
24
- return true;
25
- };
26
- function FormElementSummary({ element, onChange, value }) {
27
- const { formSubmissionModel } = useFormSubmissionModelParent();
28
- const flattenedElements = useFlattenElements();
29
- const reducer = React.useCallback((partialSummary, formElement, submission) => {
30
- if (formElement.type === 'page')
31
- return partialSummary;
32
- if (formElement.type !== 'repeatableSet' &&
33
- formElement.type !== 'form' &&
34
- !element.elementIds.some((elementId) => elementId === formElement.id)) {
35
- return partialSummary;
36
- }
37
- const formElementValue = submission[formElement.name];
38
- if (!formElementValue && formElementValue !== 0) {
39
- return partialSummary;
40
- }
41
- switch (formElement.type) {
42
- case 'repeatableSet': {
43
- if (!Array.isArray(formElementValue))
44
- return partialSummary;
45
- // If we found a repeatable set, look through child elements
46
- // to find the summary elements. Need to start a new array for
47
- // this structure and look at each entry in the repeatable set
48
- for (const entry of formElementValue) {
49
- const repeatableSetSummaryValues = formElement.elements.reduce((partialSummary, formElement) => reducer(partialSummary, formElement,
50
- // Pleasing TypeScript
51
- entry instanceof Object ? entry : {}), []);
52
- if (repeatableSetSummaryValues.length) {
53
- partialSummary.push(repeatableSetSummaryValues);
54
- }
55
- }
56
- break;
57
- }
58
- case 'form': {
59
- const formSummaryValues = (formElement.elements || []).reduce((partialSummary, formElement) => reducer(partialSummary, formElement,
60
- // Pleasing TypeScript
61
- formElementValue instanceof Object ? formElementValue : {}), []);
62
- if (formSummaryValues.length) {
63
- partialSummary.push(formSummaryValues);
64
- }
65
- break;
66
- }
67
- case 'select':
68
- case 'autocomplete':
69
- case 'radio':
70
- case 'checkboxes': {
71
- const optionValues = [];
72
- if (Array.isArray(formElementValue)) {
73
- optionValues.push(...formElementValue);
74
- }
75
- else {
76
- optionValues.push(formElementValue);
77
- }
78
- if (Array.isArray(formElement.options)) {
79
- partialSummary.push(...optionValues.reduce((optionLabels, optionValue) => {
80
- const option = formElement.options.find(({ value }) => optionValue === value);
81
- if (option) {
82
- optionLabels.push(option.label);
83
- }
84
- return optionLabels;
85
- }, []));
86
- }
87
- break;
88
- }
89
- case 'date': {
90
- const date = generateDate({
91
- daysOffset: undefined,
92
- value: formElementValue,
93
- dateOnly: true,
94
- });
95
- if (date) {
96
- partialSummary.push(localisationService.formatDate(date));
97
- }
98
- break;
99
- }
100
- case 'datetime': {
101
- if (typeof formElementValue !== 'string')
102
- return partialSummary;
103
- partialSummary.push(localisationService.formatDatetime(new Date(formElementValue)));
104
- break;
105
- }
106
- case 'time': {
107
- if (typeof formElementValue !== 'string')
108
- return partialSummary;
109
- partialSummary.push(localisationService.formatTime(new Date(formElementValue)));
110
- break;
111
- }
112
- default: {
113
- // Pleasing TypeScript WHILE COVERING ALL BASES
114
- if (typeof formElementValue !== 'string' &&
115
- typeof formElementValue !== 'object' &&
116
- typeof formElementValue !== 'number' &&
117
- typeof formElementValue !== 'function' &&
118
- typeof formElementValue !== 'boolean') {
119
- return partialSummary;
120
- }
121
- partialSummary.push(formElementValue.toString());
122
- }
123
- }
124
- return partialSummary;
125
- }, [element.elementIds]);
126
- // MODEL LISTENER
127
- React.useEffect(() => {
128
- const summary = flattenedElements.reduce((partialSummary, formElement) => {
129
- return reducer(partialSummary, formElement, formSubmissionModel);
130
- }, []);
131
- if (value === undefined) {
132
- if (!summary.length)
133
- return;
134
- }
135
- if (arraysAreEqual(value, summary)) {
136
- return;
137
- }
138
- if (summary.length) {
139
- onChange(element, summary);
140
- }
141
- else {
142
- onChange(element, undefined);
143
- }
144
- }, [
145
- element,
146
- flattenedElements,
147
- formSubmissionModel,
148
- onChange,
149
- reducer,
150
- value,
151
- ]);
152
- return (React.createElement("div", { className: "ob-form__element ob-summary cypress-summary-result " }, !!value && Array.isArray(value) && (React.createElement(SummaryResult, { results: value }))));
153
- }
154
- const SummaryResult = React.memo(function SummaryResult({ results }) {
155
- return (React.createElement(React.Fragment, null, results.map((result, i) => {
156
- return (React.createElement("div", { key: `${result.toString()}-${i}`, className: "ob-summary__result-container" }, typeof result === 'string' ? (React.createElement("p", { className: "ob-summary__result has-line-breaks cypress-summary-result-text" }, result)) : (React.createElement(SummaryResult, { results: result }))));
157
- })));
158
- });
159
- export default React.memo(FormElementSummary);
1
+ import * as React from 'react';
2
+ import { localisationService } from '@oneblink/apps';
3
+ import { useFormSubmissionModelParent } from '../hooks/useFormSubmissionModelContext';
4
+ import useFlattenElements from '../hooks/useFlattenElementsContext';
5
+ import { generateDate } from '../services/generate-default-data';
6
+ const arraysAreEqual = (a, b) => {
7
+ if (!Array.isArray(a) || !Array.isArray(b)) {
8
+ if (a !== b)
9
+ return false;
10
+ return true;
11
+ }
12
+ if (a.length !== b.length)
13
+ return false;
14
+ for (let i = 0; i < a.length; i++) {
15
+ if (Array.isArray(a[i]) && Array.isArray(b[i])) {
16
+ const areEqual = arraysAreEqual(a[i], b[i]);
17
+ if (!areEqual)
18
+ return false;
19
+ continue;
20
+ }
21
+ if (a[i] !== b[i])
22
+ return false;
23
+ }
24
+ return true;
25
+ };
26
+ function FormElementSummary({ element, onChange, value }) {
27
+ const { formSubmissionModel } = useFormSubmissionModelParent();
28
+ const flattenedElements = useFlattenElements();
29
+ const reducer = React.useCallback((partialSummary, formElement, submission) => {
30
+ if (formElement.type === 'page')
31
+ return partialSummary;
32
+ if (formElement.type !== 'repeatableSet' &&
33
+ formElement.type !== 'form' &&
34
+ !element.elementIds.some((elementId) => elementId === formElement.id)) {
35
+ return partialSummary;
36
+ }
37
+ const formElementValue = submission[formElement.name];
38
+ if (!formElementValue && formElementValue !== 0) {
39
+ return partialSummary;
40
+ }
41
+ switch (formElement.type) {
42
+ case 'repeatableSet': {
43
+ if (!Array.isArray(formElementValue))
44
+ return partialSummary;
45
+ // If we found a repeatable set, look through child elements
46
+ // to find the summary elements. Need to start a new array for
47
+ // this structure and look at each entry in the repeatable set
48
+ for (const entry of formElementValue) {
49
+ const repeatableSetSummaryValues = formElement.elements.reduce((partialSummary, formElement) => reducer(partialSummary, formElement,
50
+ // Pleasing TypeScript
51
+ entry instanceof Object ? entry : {}), []);
52
+ if (repeatableSetSummaryValues.length) {
53
+ partialSummary.push(repeatableSetSummaryValues);
54
+ }
55
+ }
56
+ break;
57
+ }
58
+ case 'form': {
59
+ const formSummaryValues = (formElement.elements || []).reduce((partialSummary, formElement) => reducer(partialSummary, formElement,
60
+ // Pleasing TypeScript
61
+ formElementValue instanceof Object ? formElementValue : {}), []);
62
+ if (formSummaryValues.length) {
63
+ partialSummary.push(formSummaryValues);
64
+ }
65
+ break;
66
+ }
67
+ case 'select':
68
+ case 'autocomplete':
69
+ case 'radio':
70
+ case 'checkboxes': {
71
+ const optionValues = [];
72
+ if (Array.isArray(formElementValue)) {
73
+ optionValues.push(...formElementValue);
74
+ }
75
+ else {
76
+ optionValues.push(formElementValue);
77
+ }
78
+ if (Array.isArray(formElement.options)) {
79
+ partialSummary.push(...optionValues.reduce((optionLabels, optionValue) => {
80
+ const option = formElement.options.find(({ value }) => optionValue === value);
81
+ if (option) {
82
+ optionLabels.push(option.label);
83
+ }
84
+ return optionLabels;
85
+ }, []));
86
+ }
87
+ break;
88
+ }
89
+ case 'date': {
90
+ const date = generateDate({
91
+ daysOffset: undefined,
92
+ value: formElementValue,
93
+ dateOnly: true,
94
+ });
95
+ if (date) {
96
+ partialSummary.push(localisationService.formatDate(date));
97
+ }
98
+ break;
99
+ }
100
+ case 'datetime': {
101
+ if (typeof formElementValue !== 'string')
102
+ return partialSummary;
103
+ partialSummary.push(localisationService.formatDatetime(new Date(formElementValue)));
104
+ break;
105
+ }
106
+ case 'time': {
107
+ if (typeof formElementValue !== 'string')
108
+ return partialSummary;
109
+ partialSummary.push(localisationService.formatTime(new Date(formElementValue)));
110
+ break;
111
+ }
112
+ default: {
113
+ // Pleasing TypeScript WHILE COVERING ALL BASES
114
+ if (typeof formElementValue !== 'string' &&
115
+ typeof formElementValue !== 'object' &&
116
+ typeof formElementValue !== 'number' &&
117
+ typeof formElementValue !== 'function' &&
118
+ typeof formElementValue !== 'boolean') {
119
+ return partialSummary;
120
+ }
121
+ partialSummary.push(formElementValue.toString());
122
+ }
123
+ }
124
+ return partialSummary;
125
+ }, [element.elementIds]);
126
+ // MODEL LISTENER
127
+ React.useEffect(() => {
128
+ const summary = flattenedElements.reduce((partialSummary, formElement) => {
129
+ return reducer(partialSummary, formElement, formSubmissionModel);
130
+ }, []);
131
+ if (value === undefined) {
132
+ if (!summary.length)
133
+ return;
134
+ }
135
+ if (arraysAreEqual(value, summary)) {
136
+ return;
137
+ }
138
+ if (summary.length) {
139
+ onChange(element, summary);
140
+ }
141
+ else {
142
+ onChange(element, undefined);
143
+ }
144
+ }, [
145
+ element,
146
+ flattenedElements,
147
+ formSubmissionModel,
148
+ onChange,
149
+ reducer,
150
+ value,
151
+ ]);
152
+ return (React.createElement("div", { className: "ob-form__element ob-summary cypress-summary-result " }, !!value && Array.isArray(value) && (React.createElement(SummaryResult, { results: value }))));
153
+ }
154
+ const SummaryResult = React.memo(function SummaryResult({ results }) {
155
+ return (React.createElement(React.Fragment, null, results.map((result, i) => {
156
+ return (React.createElement("div", { key: `${result.toString()}-${i}`, className: "ob-summary__result-container" }, typeof result === 'string' ? (React.createElement("p", { className: "ob-summary__result has-line-breaks cypress-summary-result-text" }, result)) : (React.createElement(SummaryResult, { results: result }))));
157
+ })));
158
+ });
159
+ export default React.memo(FormElementSummary);
160
160
  //# sourceMappingURL=FormElementSummary.js.map
@@ -1,14 +1,14 @@
1
- import * as React from 'react';
2
- import { FormTypes } from '@oneblink/types';
3
- import { FormElementValueChangeHandler } from '../types/form';
4
- declare type Props = {
5
- id: string;
6
- element: FormTypes.TelephoneElement;
7
- value: unknown;
8
- onChange: FormElementValueChangeHandler<string>;
9
- displayValidationMessage: boolean;
10
- validationMessage: string | undefined;
11
- };
12
- declare function FormElementTelephone({ id, element, value, onChange, validationMessage, displayValidationMessage, }: Props): JSX.Element;
13
- declare const _default: React.MemoExoticComponent<typeof FormElementTelephone>;
14
- export default _default;
1
+ import * as React from 'react';
2
+ import { FormTypes } from '@oneblink/types';
3
+ import { FormElementValueChangeHandler } from '../types/form';
4
+ declare type Props = {
5
+ id: string;
6
+ element: FormTypes.TelephoneElement;
7
+ value: unknown;
8
+ onChange: FormElementValueChangeHandler<string>;
9
+ displayValidationMessage: boolean;
10
+ validationMessage: string | undefined;
11
+ };
12
+ declare function FormElementTelephone({ id, element, value, onChange, validationMessage, displayValidationMessage, }: Props): JSX.Element;
13
+ declare const _default: React.MemoExoticComponent<typeof FormElementTelephone>;
14
+ export default _default;
@@ -1,23 +1,23 @@
1
- import * as React from 'react';
2
- import CopyToClipboardButton from '../components/renderer/CopyToClipboardButton';
3
- import useBooleanState from '../hooks/useBooleanState';
4
- import LookupButton from '../components/renderer/LookupButton';
5
- import FormElementLabelContainer from '../components/renderer/FormElementLabelContainer';
6
- function FormElementTelephone({ id, element, value, onChange, validationMessage, displayValidationMessage, }) {
7
- const [isDirty, setIsDirty] = useBooleanState(false);
8
- const text = typeof value === 'string' ? value : '';
9
- return (React.createElement("div", { className: "cypress-telephone-element" },
10
- React.createElement(FormElementLabelContainer, { className: "ob-telephone", id: id, element: element, required: element.required },
11
- React.createElement("div", { className: "field has-addons" },
12
- React.createElement("div", { className: "control is-expanded has-icons-right" },
13
- React.createElement("input", { type: "tel", placeholder: element.placeholderValue, id: id, name: element.name, className: "input ob-input cypress-telephone-control", value: text, onChange: (e) => onChange(element, e.target.value || undefined), required: element.required, disabled: element.readOnly, onBlur: setIsDirty }),
14
- React.createElement("span", { className: "ob-input-icon icon is-small is-right" },
15
- React.createElement("i", { className: "material-icons is-size-5" }, "phone"))),
16
- !!element.readOnly && !!value && (React.createElement("div", { className: "control" },
17
- React.createElement(CopyToClipboardButton, { className: "button is-input-addon copy-button cypress-copy-to-clipboard-button", text: text }))),
18
- React.createElement(LookupButton, { isInputButton: true, value: value, validationMessage: validationMessage })),
19
- (isDirty || displayValidationMessage) && !!validationMessage && (React.createElement("div", { role: "alert", className: "has-margin-top-8" },
20
- React.createElement("div", { className: "has-text-danger ob-error__text cypress-validation-message" }, validationMessage))))));
21
- }
22
- export default React.memo(FormElementTelephone);
1
+ import * as React from 'react';
2
+ import CopyToClipboardButton from '../components/renderer/CopyToClipboardButton';
3
+ import useBooleanState from '../hooks/useBooleanState';
4
+ import LookupButton from '../components/renderer/LookupButton';
5
+ import FormElementLabelContainer from '../components/renderer/FormElementLabelContainer';
6
+ function FormElementTelephone({ id, element, value, onChange, validationMessage, displayValidationMessage, }) {
7
+ const [isDirty, setIsDirty] = useBooleanState(false);
8
+ const text = typeof value === 'string' ? value : '';
9
+ return (React.createElement("div", { className: "cypress-telephone-element" },
10
+ React.createElement(FormElementLabelContainer, { className: "ob-telephone", id: id, element: element, required: element.required },
11
+ React.createElement("div", { className: "field has-addons" },
12
+ React.createElement("div", { className: "control is-expanded has-icons-right" },
13
+ React.createElement("input", { type: "tel", placeholder: element.placeholderValue, id: id, name: element.name, className: "input ob-input cypress-telephone-control", value: text, onChange: (e) => onChange(element, e.target.value || undefined), required: element.required, disabled: element.readOnly, onBlur: setIsDirty }),
14
+ React.createElement("span", { className: "ob-input-icon icon is-small is-right" },
15
+ React.createElement("i", { className: "material-icons is-size-5" }, "phone"))),
16
+ !!element.readOnly && !!value && (React.createElement("div", { className: "control" },
17
+ React.createElement(CopyToClipboardButton, { className: "button is-input-addon copy-button cypress-copy-to-clipboard-button", text: text }))),
18
+ React.createElement(LookupButton, { isInputButton: true, value: value, validationMessage: validationMessage })),
19
+ (isDirty || displayValidationMessage) && !!validationMessage && (React.createElement("div", { role: "alert", className: "has-margin-top-8" },
20
+ React.createElement("div", { className: "has-text-danger ob-error__text cypress-validation-message" }, validationMessage))))));
21
+ }
22
+ export default React.memo(FormElementTelephone);
23
23
  //# sourceMappingURL=FormElementTelephone.js.map
@@ -1,14 +1,14 @@
1
- import * as React from 'react';
2
- import { FormTypes } from '@oneblink/types';
3
- import { FormElementValueChangeHandler } from '../types/form';
4
- declare type Props = {
5
- id: string;
6
- element: FormTypes.TextElement;
7
- value: unknown;
8
- onChange: FormElementValueChangeHandler<string>;
9
- displayValidationMessage: boolean;
10
- validationMessage: string | undefined;
11
- };
12
- declare function FormElementText({ id, element, value, onChange, validationMessage, displayValidationMessage, }: Props): JSX.Element;
13
- declare const _default: React.MemoExoticComponent<typeof FormElementText>;
14
- export default _default;
1
+ import * as React from 'react';
2
+ import { FormTypes } from '@oneblink/types';
3
+ import { FormElementValueChangeHandler } from '../types/form';
4
+ declare type Props = {
5
+ id: string;
6
+ element: FormTypes.TextElement;
7
+ value: unknown;
8
+ onChange: FormElementValueChangeHandler<string>;
9
+ displayValidationMessage: boolean;
10
+ validationMessage: string | undefined;
11
+ };
12
+ declare function FormElementText({ id, element, value, onChange, validationMessage, displayValidationMessage, }: Props): JSX.Element;
13
+ declare const _default: React.MemoExoticComponent<typeof FormElementText>;
14
+ export default _default;
@@ -1,30 +1,30 @@
1
- import * as React from 'react';
2
- import clsx from 'clsx';
3
- import CopyToClipboardButton from '../components/renderer/CopyToClipboardButton';
4
- import useBooleanState from '../hooks/useBooleanState';
5
- import LookupButton from '../components/renderer/LookupButton';
6
- import FormElementLabelContainer from '../components/renderer/FormElementLabelContainer';
7
- function FormElementText({ id, element, value, onChange, validationMessage, displayValidationMessage, }) {
8
- const [isDirty, setIsDirty] = useBooleanState(false);
9
- const text = typeof value === 'string' ? value : '';
10
- const isDisplayingValidationMessage = (isDirty || displayValidationMessage) && !!validationMessage;
11
- return (React.createElement("div", { className: "cypress-text-element" },
12
- React.createElement(FormElementLabelContainer, { className: "ob-text", id: id, element: element, required: element.required },
13
- React.createElement("div", { className: "field has-addons" },
14
- React.createElement("div", { className: "control is-expanded" },
15
- React.createElement("input", { type: "text", placeholder: element.placeholderValue, id: id, name: element.name, className: "input ob-input cypress-text-control", value: text, onChange: (e) => onChange(element, e.target.value || undefined), required: element.required, disabled: element.readOnly, onBlur: setIsDirty })),
16
- !!element.readOnly && !!value && (React.createElement("div", { className: "control" },
17
- React.createElement(CopyToClipboardButton, { className: "button is-input-addon copy-button cypress-copy-to-clipboard-button", text: text }))),
18
- React.createElement(LookupButton, { isInputButton: true, value: value, validationMessage: validationMessage })),
19
- (isDisplayingValidationMessage || !!element.maxLength) && (React.createElement("div", { role: "alert", className: "has-margin-top-8" },
20
- React.createElement("div", { className: "is-flex is-justify-content-space-between" },
21
- isDisplayingValidationMessage ? (React.createElement("div", { className: "has-text-danger ob-error__text cypress-validation-message" }, validationMessage)) : (React.createElement("div", null)),
22
- !!element.maxLength && (React.createElement("div", { className: clsx('ob-max-length__text cypress-max-length-message', {
23
- 'has-text-danger': text.length > element.maxLength,
24
- }) },
25
- text.length,
26
- " / ",
27
- element.maxLength))))))));
28
- }
29
- export default React.memo(FormElementText);
1
+ import * as React from 'react';
2
+ import clsx from 'clsx';
3
+ import CopyToClipboardButton from '../components/renderer/CopyToClipboardButton';
4
+ import useBooleanState from '../hooks/useBooleanState';
5
+ import LookupButton from '../components/renderer/LookupButton';
6
+ import FormElementLabelContainer from '../components/renderer/FormElementLabelContainer';
7
+ function FormElementText({ id, element, value, onChange, validationMessage, displayValidationMessage, }) {
8
+ const [isDirty, setIsDirty] = useBooleanState(false);
9
+ const text = typeof value === 'string' ? value : '';
10
+ const isDisplayingValidationMessage = (isDirty || displayValidationMessage) && !!validationMessage;
11
+ return (React.createElement("div", { className: "cypress-text-element" },
12
+ React.createElement(FormElementLabelContainer, { className: "ob-text", id: id, element: element, required: element.required },
13
+ React.createElement("div", { className: "field has-addons" },
14
+ React.createElement("div", { className: "control is-expanded" },
15
+ React.createElement("input", { type: "text", placeholder: element.placeholderValue, id: id, name: element.name, className: "input ob-input cypress-text-control", value: text, onChange: (e) => onChange(element, e.target.value || undefined), required: element.required, disabled: element.readOnly, onBlur: setIsDirty })),
16
+ !!element.readOnly && !!value && (React.createElement("div", { className: "control" },
17
+ React.createElement(CopyToClipboardButton, { className: "button is-input-addon copy-button cypress-copy-to-clipboard-button", text: text }))),
18
+ React.createElement(LookupButton, { isInputButton: true, value: value, validationMessage: validationMessage })),
19
+ (isDisplayingValidationMessage || !!element.maxLength) && (React.createElement("div", { role: "alert", className: "has-margin-top-8" },
20
+ React.createElement("div", { className: "is-flex is-justify-content-space-between" },
21
+ isDisplayingValidationMessage ? (React.createElement("div", { className: "has-text-danger ob-error__text cypress-validation-message" }, validationMessage)) : (React.createElement("div", null)),
22
+ !!element.maxLength && (React.createElement("div", { className: clsx('ob-max-length__text cypress-max-length-message', {
23
+ 'has-text-danger': text.length > element.maxLength,
24
+ }) },
25
+ text.length,
26
+ " / ",
27
+ element.maxLength))))))));
28
+ }
29
+ export default React.memo(FormElementText);
30
30
  //# sourceMappingURL=FormElementText.js.map
@@ -1,14 +1,14 @@
1
- import * as React from 'react';
2
- import { FormTypes } from '@oneblink/types';
3
- import { FormElementValueChangeHandler } from '../types/form';
4
- declare type Props = {
5
- id: string;
6
- element: FormTypes.TextareaElement;
7
- value: unknown;
8
- onChange: FormElementValueChangeHandler<string>;
9
- displayValidationMessage: boolean;
10
- validationMessage: string | undefined;
11
- };
12
- declare function FormElementTextarea({ id, element, value, onChange, validationMessage, displayValidationMessage, }: Props): JSX.Element;
13
- declare const _default: React.MemoExoticComponent<typeof FormElementTextarea>;
14
- export default _default;
1
+ import * as React from 'react';
2
+ import { FormTypes } from '@oneblink/types';
3
+ import { FormElementValueChangeHandler } from '../types/form';
4
+ declare type Props = {
5
+ id: string;
6
+ element: FormTypes.TextareaElement;
7
+ value: unknown;
8
+ onChange: FormElementValueChangeHandler<string>;
9
+ displayValidationMessage: boolean;
10
+ validationMessage: string | undefined;
11
+ };
12
+ declare function FormElementTextarea({ id, element, value, onChange, validationMessage, displayValidationMessage, }: Props): JSX.Element;
13
+ declare const _default: React.MemoExoticComponent<typeof FormElementTextarea>;
14
+ export default _default;
@@ -1,31 +1,31 @@
1
- import * as React from 'react';
2
- import clsx from 'clsx';
3
- import CopyToClipboardButton from '../components/renderer/CopyToClipboardButton';
4
- import useBooleanState from '../hooks/useBooleanState';
5
- import LookupButton from '../components/renderer/LookupButton';
6
- import FormElementLabelContainer from '../components/renderer/FormElementLabelContainer';
7
- function FormElementTextarea({ id, element, value, onChange, validationMessage, displayValidationMessage, }) {
8
- const [isDirty, setIsDirty] = useBooleanState(false);
9
- const text = typeof value === 'string' ? value : '';
10
- const isDisplayingCopyButton = !!element.readOnly && !!value;
11
- const isDisplayingLookupButton = !!element.isDataLookup || !!element.isElementLookup;
12
- const isDisplayingValidationMessage = (isDirty || displayValidationMessage) && !!validationMessage;
13
- return (React.createElement("div", { className: "cypress-textarea-element" },
14
- React.createElement(FormElementLabelContainer, { className: "ob-textarea", id: id, element: element, required: element.required },
15
- React.createElement("div", { className: "control" },
16
- React.createElement("textarea", { placeholder: element.placeholderValue, id: id, name: element.name, className: "textarea input ob-input cypress-textarea-control", value: text, onChange: (e) => onChange(element, e.target.value || undefined), required: element.required, disabled: element.readOnly, onBlur: setIsDirty })),
17
- (isDisplayingValidationMessage || !!element.maxLength) && (React.createElement("div", { role: "alert", className: "has-margin-top-8" },
18
- React.createElement("div", { className: "is-flex is-justify-content-space-between" },
19
- isDisplayingValidationMessage ? (React.createElement("div", { className: "has-text-danger ob-error__text cypress-validation-message" }, validationMessage)) : (React.createElement("div", null)),
20
- !!element.maxLength && (React.createElement("div", { className: clsx('ob-max-length__text cypress-max-length-message', {
21
- 'has-text-danger': text.length > element.maxLength,
22
- }) },
23
- text.length,
24
- " / ",
25
- element.maxLength))))),
26
- (isDisplayingLookupButton || isDisplayingCopyButton) && (React.createElement("div", { className: "buttons ob-buttons has-margin-top-8" },
27
- isDisplayingCopyButton && (React.createElement(CopyToClipboardButton, { className: "button ob-button cypress-copy-to-clipboard-button", text: text })),
28
- isDisplayingLookupButton && (React.createElement(LookupButton, { value: value, validationMessage: validationMessage })))))));
29
- }
30
- export default React.memo(FormElementTextarea);
1
+ import * as React from 'react';
2
+ import clsx from 'clsx';
3
+ import CopyToClipboardButton from '../components/renderer/CopyToClipboardButton';
4
+ import useBooleanState from '../hooks/useBooleanState';
5
+ import LookupButton from '../components/renderer/LookupButton';
6
+ import FormElementLabelContainer from '../components/renderer/FormElementLabelContainer';
7
+ function FormElementTextarea({ id, element, value, onChange, validationMessage, displayValidationMessage, }) {
8
+ const [isDirty, setIsDirty] = useBooleanState(false);
9
+ const text = typeof value === 'string' ? value : '';
10
+ const isDisplayingCopyButton = !!element.readOnly && !!value;
11
+ const isDisplayingLookupButton = !!element.isDataLookup || !!element.isElementLookup;
12
+ const isDisplayingValidationMessage = (isDirty || displayValidationMessage) && !!validationMessage;
13
+ return (React.createElement("div", { className: "cypress-textarea-element" },
14
+ React.createElement(FormElementLabelContainer, { className: "ob-textarea", id: id, element: element, required: element.required },
15
+ React.createElement("div", { className: "control" },
16
+ React.createElement("textarea", { placeholder: element.placeholderValue, id: id, name: element.name, className: "textarea input ob-input cypress-textarea-control", value: text, onChange: (e) => onChange(element, e.target.value || undefined), required: element.required, disabled: element.readOnly, onBlur: setIsDirty })),
17
+ (isDisplayingValidationMessage || !!element.maxLength) && (React.createElement("div", { role: "alert", className: "has-margin-top-8" },
18
+ React.createElement("div", { className: "is-flex is-justify-content-space-between" },
19
+ isDisplayingValidationMessage ? (React.createElement("div", { className: "has-text-danger ob-error__text cypress-validation-message" }, validationMessage)) : (React.createElement("div", null)),
20
+ !!element.maxLength && (React.createElement("div", { className: clsx('ob-max-length__text cypress-max-length-message', {
21
+ 'has-text-danger': text.length > element.maxLength,
22
+ }) },
23
+ text.length,
24
+ " / ",
25
+ element.maxLength))))),
26
+ (isDisplayingLookupButton || isDisplayingCopyButton) && (React.createElement("div", { className: "buttons ob-buttons has-margin-top-8" },
27
+ isDisplayingCopyButton && (React.createElement(CopyToClipboardButton, { className: "button ob-button cypress-copy-to-clipboard-button", text: text })),
28
+ isDisplayingLookupButton && (React.createElement(LookupButton, { value: value, validationMessage: validationMessage })))))));
29
+ }
30
+ export default React.memo(FormElementTextarea);
31
31
  //# sourceMappingURL=FormElementTextarea.js.map
@@ -1,14 +1,14 @@
1
- import * as React from 'react';
2
- import { FormTypes } from '@oneblink/types';
3
- import { FormElementValueChangeHandler } from '../types/form';
4
- declare type Props = {
5
- id: string;
6
- element: FormTypes.TimeElement;
7
- value: unknown | undefined;
8
- onChange: FormElementValueChangeHandler<string>;
9
- displayValidationMessage: boolean;
10
- validationMessage: string | undefined;
11
- };
12
- declare function FormElementTime({ id, element, value, onChange, validationMessage, displayValidationMessage, }: Props): JSX.Element;
13
- declare const _default: React.MemoExoticComponent<typeof FormElementTime>;
14
- export default _default;
1
+ import * as React from 'react';
2
+ import { FormTypes } from '@oneblink/types';
3
+ import { FormElementValueChangeHandler } from '../types/form';
4
+ declare type Props = {
5
+ id: string;
6
+ element: FormTypes.TimeElement;
7
+ value: unknown | undefined;
8
+ onChange: FormElementValueChangeHandler<string>;
9
+ displayValidationMessage: boolean;
10
+ validationMessage: string | undefined;
11
+ };
12
+ declare function FormElementTime({ id, element, value, onChange, validationMessage, displayValidationMessage, }: Props): JSX.Element;
13
+ declare const _default: React.MemoExoticComponent<typeof FormElementTime>;
14
+ export default _default;