@oneblink/apps-react 2.3.0-beta.2 → 2.3.0-beta.3
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.
- package/dist/OneBlinkAutoSaveForm.d.ts +10 -10
- package/dist/OneBlinkAutoSaveForm.js +28 -28
- package/dist/OneBlinkForm.d.ts +11 -11
- package/dist/OneBlinkForm.js +11 -11
- package/dist/OneBlinkFormBase.d.ts +29 -28
- package/dist/OneBlinkFormBase.js +476 -472
- package/dist/OneBlinkFormBase.js.map +1 -1
- package/dist/OneBlinkReadOnlyForm.d.ts +11 -11
- package/dist/OneBlinkReadOnlyForm.js +48 -48
- package/dist/components/CopyToClipboardIconButton.d.ts +10 -10
- package/dist/components/CopyToClipboardIconButton.js +32 -32
- package/dist/components/CustomAccordion.d.ts +27 -27
- package/dist/components/CustomAccordion.js +37 -37
- package/dist/components/ErrorSnackbar.d.ts +8 -8
- package/dist/components/ErrorSnackbar.js +25 -25
- package/dist/components/Lists.d.ts +25 -25
- package/dist/components/Lists.js +44 -44
- package/dist/components/LoadingWithMessage.d.ts +6 -6
- package/dist/components/LoadingWithMessage.js +11 -11
- package/dist/components/formStore/FormStoreTableProvider.d.ts +6 -6
- package/dist/components/formStore/FormStoreTableProvider.js +90 -90
- package/dist/components/formStore/OneBlinkFormStoreClearFiltersButton.d.ts +5 -5
- package/dist/components/formStore/OneBlinkFormStoreClearFiltersButton.js +19 -19
- package/dist/components/formStore/OneBlinkFormStoreColumnsButton.d.ts +5 -5
- package/dist/components/formStore/OneBlinkFormStoreColumnsButton.js +66 -66
- package/dist/components/formStore/OneBlinkFormStoreDownloadButton.d.ts +5 -5
- package/dist/components/formStore/OneBlinkFormStoreDownloadButton.js +86 -86
- package/dist/components/formStore/OneBlinkFormStoreProvider.d.ts +8 -8
- package/dist/components/formStore/OneBlinkFormStoreProvider.js +24 -24
- package/dist/components/formStore/OneBlinkFormStoreRefreshButton.d.ts +5 -5
- package/dist/components/formStore/OneBlinkFormStoreRefreshButton.js +11 -11
- package/dist/components/formStore/OneBlinkFormStoreTable.d.ts +4 -4
- package/dist/components/formStore/OneBlinkFormStoreTable.js +194 -194
- package/dist/components/formStore/display/ElementDisplay.d.ts +23 -23
- package/dist/components/formStore/display/ElementDisplay.js +77 -77
- package/dist/components/formStore/display/FormStoreIcon.d.ts +2 -2
- package/dist/components/formStore/display/FormStoreIcon.js +2 -2
- package/dist/components/formStore/table/ActionedByTableCell.d.ts +11 -11
- package/dist/components/formStore/table/ActionedByTableCell.js +43 -43
- package/dist/components/formStore/table/ColumnFilters.d.ts +9 -9
- package/dist/components/formStore/table/ColumnFilters.js +179 -179
- package/dist/components/formStore/table/FormElementTableCell.d.ts +10 -10
- package/dist/components/formStore/table/FormElementTableCell.js +228 -228
- package/dist/components/formStore/table/HeaderCellMoreButton.d.ts +9 -9
- package/dist/components/formStore/table/HeaderCellMoreButton.js +48 -48
- package/dist/components/formStore/table/RepeatableSetCell.d.ts +8 -8
- package/dist/components/formStore/table/RepeatableSetCell.js +62 -62
- package/dist/components/formStore/table/RepeatableSetCellAccordion.d.ts +9 -9
- package/dist/components/formStore/table/RepeatableSetCellAccordion.js +11 -11
- package/dist/components/formStore/table/TableCellCopyButton.d.ts +7 -7
- package/dist/components/formStore/table/TableCellCopyButton.js +27 -27
- package/dist/components/formStore/table/generateColumns.d.ts +24 -24
- package/dist/components/formStore/table/generateColumns.js +290 -290
- package/dist/components/formStore/table/useFormStoreTable.d.ts +52 -52
- package/dist/components/formStore/table/useFormStoreTable.js +157 -157
- package/dist/components/formStore/useFormStoreTableContext.d.ts +44 -44
- package/dist/components/formStore/useFormStoreTableContext.js +9 -9
- package/dist/components/messages/ErrorMessage.d.ts +12 -12
- package/dist/components/messages/ErrorMessage.js +12 -12
- package/dist/components/messages/LargeIconMessage.d.ts +18 -18
- package/dist/components/messages/LargeIconMessage.js +33 -33
- package/dist/components/messages/NoResourcesYet.d.ts +11 -11
- package/dist/components/messages/NoResourcesYet.js +6 -6
- package/dist/components/pickers/V4CompatibleDatePicker.d.ts +32 -32
- package/dist/components/pickers/V4CompatibleDatePicker.js +70 -70
- package/dist/components/pickers/V4CompatibleDateTimePicker.d.ts +32 -32
- package/dist/components/pickers/V4CompatibleDateTimePicker.js +70 -70
- package/dist/components/pickers/V4CompatibleTimePicker.d.ts +28 -28
- package/dist/components/pickers/V4CompatibleTimePicker.js +53 -53
- package/dist/components/renderer/AnnotationModal.d.ts +8 -8
- package/dist/components/renderer/AnnotationModal.js +101 -101
- package/dist/components/renderer/AutocompleteDropdown.d.ts +26 -26
- package/dist/components/renderer/AutocompleteDropdown.js +175 -175
- package/dist/components/renderer/CopyToClipboardButton.d.ts +8 -8
- package/dist/components/renderer/CopyToClipboardButton.js +13 -13
- package/dist/components/renderer/CustomisableButtonInner.d.ts +7 -7
- package/dist/components/renderer/CustomisableButtonInner.js +8 -8
- package/dist/components/renderer/FormElementLabelContainer.d.ts +12 -12
- package/dist/components/renderer/FormElementLabelContainer.js +15 -15
- package/dist/components/renderer/FormElementOptions.d.ts +9 -9
- package/dist/components/renderer/FormElementOptions.js +14 -14
- package/dist/components/renderer/LookupButton.d.ts +10 -10
- package/dist/components/renderer/LookupButton.js +29 -29
- package/dist/components/renderer/LookupNotification.d.ts +12 -12
- package/dist/components/renderer/LookupNotification.js +230 -230
- package/dist/components/renderer/Modal.d.ts +14 -14
- package/dist/components/renderer/Modal.js +14 -14
- package/dist/components/renderer/OnLoading.d.ts +10 -10
- package/dist/components/renderer/OnLoading.js +11 -11
- package/dist/components/renderer/OneBlinkAppsErrorOriginalMessage.d.ts +7 -7
- package/dist/components/renderer/OneBlinkAppsErrorOriginalMessage.js +12 -12
- package/dist/components/renderer/OneBlinkFormElements.d.ts +19 -19
- package/dist/components/renderer/OneBlinkFormElements.js +202 -202
- package/dist/components/renderer/PageFormElements.d.ts +17 -17
- package/dist/components/renderer/PageFormElements.js +48 -48
- package/dist/components/renderer/ProgressBar.d.ts +7 -7
- package/dist/components/renderer/ProgressBar.js +6 -6
- package/dist/components/renderer/ProgressBar.js.map +1 -1
- package/dist/components/renderer/ToggleAllCheckbox.d.ts +13 -13
- package/dist/components/renderer/ToggleAllCheckbox.js +26 -26
- package/dist/components/renderer/attachments/AttachmentStatus.d.ts +10 -10
- package/dist/components/renderer/attachments/AttachmentStatus.js +36 -36
- package/dist/components/renderer/attachments/FileCard.d.ts +19 -19
- package/dist/components/renderer/attachments/FileCard.js +60 -60
- package/dist/components/renderer/attachments/FileCardContent.d.ts +5 -5
- package/dist/components/renderer/attachments/FileCardContent.js +10 -10
- package/dist/components/renderer/attachments/ImagePreviewUnavailable.d.ts +4 -4
- package/dist/components/renderer/attachments/ImagePreviewUnavailable.js +11 -11
- package/dist/components/renderer/attachments/ProgressBar.d.ts +8 -8
- package/dist/components/renderer/attachments/ProgressBar.js +33 -33
- package/dist/form-elements/ComplianceButton.d.ts +10 -10
- package/dist/form-elements/ComplianceButton.js +11 -11
- package/dist/form-elements/FormElementABN.d.ts +14 -14
- package/dist/form-elements/FormElementABN.js +155 -155
- package/dist/form-elements/FormElementAutocomplete.d.ts +19 -19
- package/dist/form-elements/FormElementAutocomplete.js +81 -81
- package/dist/form-elements/FormElementBSB.d.ts +18 -18
- package/dist/form-elements/FormElementBSB.js +100 -100
- package/dist/form-elements/FormElementBarcodeScanner.d.ts +14 -14
- package/dist/form-elements/FormElementBarcodeScanner.js +306 -306
- package/dist/form-elements/FormElementBoolean.d.ts +14 -14
- package/dist/form-elements/FormElementBoolean.js +16 -16
- package/dist/form-elements/FormElementCalculation.d.ts +11 -11
- package/dist/form-elements/FormElementCalculation.js +179 -179
- package/dist/form-elements/FormElementCamera.d.ts +15 -15
- package/dist/form-elements/FormElementCamera.js +227 -227
- package/dist/form-elements/FormElementCaptcha.d.ts +12 -12
- package/dist/form-elements/FormElementCaptcha.js +14 -14
- package/dist/form-elements/FormElementCheckBoxes.d.ts +15 -15
- package/dist/form-elements/FormElementCheckBoxes.js +64 -64
- package/dist/form-elements/FormElementCivicaNameRecord.d.ts +8 -8
- package/dist/form-elements/FormElementCivicaNameRecord.js +51 -51
- package/dist/form-elements/FormElementCivicaStreetName.d.ts +15 -15
- package/dist/form-elements/FormElementCivicaStreetName.js +38 -38
- package/dist/form-elements/FormElementCompliance.d.ts +22 -22
- package/dist/form-elements/FormElementCompliance.js +129 -129
- package/dist/form-elements/FormElementDate.d.ts +14 -14
- package/dist/form-elements/FormElementDate.js +74 -74
- package/dist/form-elements/FormElementDateTime.d.ts +14 -14
- package/dist/form-elements/FormElementDateTime.js +67 -67
- package/dist/form-elements/FormElementEmail.d.ts +14 -14
- package/dist/form-elements/FormElementEmail.js +22 -22
- package/dist/form-elements/FormElementFile.d.ts +13 -13
- package/dist/form-elements/FormElementFile.js +31 -31
- package/dist/form-elements/FormElementFiles.d.ts +15 -15
- package/dist/form-elements/FormElementFiles.js +42 -42
- package/dist/form-elements/FormElementForm.d.ts +17 -17
- package/dist/form-elements/FormElementForm.js +63 -63
- package/dist/form-elements/FormElementFreshdeskDependentField.d.ts +8 -8
- package/dist/form-elements/FormElementFreshdeskDependentField.js +15 -15
- package/dist/form-elements/FormElementGeoscapeAddress.d.ts +15 -15
- package/dist/form-elements/FormElementGeoscapeAddress.js +62 -62
- package/dist/form-elements/FormElementHTML.d.ts +8 -8
- package/dist/form-elements/FormElementHTML.js +15 -15
- package/dist/form-elements/FormElementHeading.d.ts +8 -8
- package/dist/form-elements/FormElementHeading.js +23 -23
- package/dist/form-elements/FormElementImage.d.ts +8 -8
- package/dist/form-elements/FormElementImage.js +6 -6
- package/dist/form-elements/FormElementLocation.d.ts +20 -20
- package/dist/form-elements/FormElementLocation.js +204 -204
- package/dist/form-elements/FormElementNumber.d.ts +14 -14
- package/dist/form-elements/FormElementNumber.js +72 -72
- package/dist/form-elements/FormElementPointAddress.d.ts +15 -15
- package/dist/form-elements/FormElementPointAddress.js +69 -69
- package/dist/form-elements/FormElementRadio.d.ts +15 -15
- package/dist/form-elements/FormElementRadio.js +41 -41
- package/dist/form-elements/FormElementRepeatableSet.d.ts +19 -19
- package/dist/form-elements/FormElementRepeatableSet.js +126 -126
- package/dist/form-elements/FormElementSection.d.ts +8 -8
- package/dist/form-elements/FormElementSection.js +69 -69
- package/dist/form-elements/FormElementSelect.d.ts +15 -15
- package/dist/form-elements/FormElementSelect.js +44 -44
- package/dist/form-elements/FormElementSignature.d.ts +15 -15
- package/dist/form-elements/FormElementSignature.js +138 -138
- package/dist/form-elements/FormElementSummary.d.ts +11 -11
- package/dist/form-elements/FormElementSummary.js +159 -159
- package/dist/form-elements/FormElementTelephone.d.ts +14 -14
- package/dist/form-elements/FormElementTelephone.js +22 -22
- package/dist/form-elements/FormElementText.d.ts +14 -14
- package/dist/form-elements/FormElementText.js +29 -29
- package/dist/form-elements/FormElementTextarea.d.ts +14 -14
- package/dist/form-elements/FormElementTextarea.js +30 -30
- package/dist/form-elements/FormElementTime.d.ts +14 -14
- package/dist/form-elements/FormElementTime.js +53 -53
- package/dist/form-elements/OptionButton.d.ts +11 -11
- package/dist/form-elements/OptionButton.js +9 -9
- package/dist/hooks/attachments/useAttachment.d.ts +12 -12
- package/dist/hooks/attachments/useAttachment.js +242 -242
- package/dist/hooks/attachments/useAttachmentBlobs.d.ts +19 -19
- package/dist/hooks/attachments/useAttachmentBlobs.js +23 -23
- package/dist/hooks/attachments/useAttachments.d.ts +10 -10
- package/dist/hooks/attachments/useAttachments.js +69 -69
- package/dist/hooks/useAbnLookupAuthenticationGuid.d.ts +3 -3
- package/dist/hooks/useAbnLookupAuthenticationGuid.js +5 -5
- package/dist/hooks/useAuth.d.ts +15 -15
- package/dist/hooks/useAuth.js +42 -42
- package/dist/hooks/useBooleanState.d.ts +5 -5
- package/dist/hooks/useBooleanState.js +8 -8
- package/dist/hooks/useCaptchaSiteKey.d.ts +3 -3
- package/dist/hooks/useCaptchaSiteKey.js +5 -5
- package/dist/hooks/useClickOutsideElement.d.ts +3 -3
- package/dist/hooks/useClickOutsideElement.js +14 -14
- package/dist/hooks/useConditionalLogic.d.ts +6 -6
- package/dist/hooks/useConditionalLogic.js +22 -22
- package/dist/hooks/useContrastColor.d.ts +2 -2
- package/dist/hooks/useContrastColor.js +12 -12
- package/dist/hooks/useDynamicOptionsLoaderState.d.ts +7 -7
- package/dist/hooks/useDynamicOptionsLoaderState.js +44 -44
- package/dist/hooks/useExecutedLookupCallback.d.ts +12 -12
- package/dist/hooks/useExecutedLookupCallback.js +15 -15
- package/dist/hooks/useFlatpickr.d.ts +10 -10
- package/dist/hooks/useFlatpickr.js +73 -73
- package/dist/hooks/useFlatpickrGuid.d.ts +7 -7
- package/dist/hooks/useFlatpickrGuid.js +11 -11
- package/dist/hooks/useFlattenElementsContext.d.ts +2 -2
- package/dist/hooks/useFlattenElementsContext.js +7 -7
- package/dist/hooks/useFormDefinition.d.ts +4 -4
- package/dist/hooks/useFormDefinition.js +9 -9
- package/dist/hooks/useFormElementOptions.d.ts +9 -9
- package/dist/hooks/useFormElementOptions.js +35 -35
- package/dist/hooks/useFormIsReadOnly.d.ts +3 -3
- package/dist/hooks/useFormIsReadOnly.js +5 -5
- package/dist/hooks/useFormSubmissionAutoSaveState.d.ts +24 -24
- package/dist/hooks/useFormSubmissionAutoSaveState.js +145 -145
- package/dist/hooks/useFormSubmissionModelContext.d.ts +15 -15
- package/dist/hooks/useFormSubmissionModelContext.js +32 -32
- package/dist/hooks/useFormSubmissionState.d.ts +10 -10
- package/dist/hooks/useFormSubmissionState.js +13 -13
- package/dist/hooks/useFormValidation.d.ts +7 -7
- package/dist/hooks/useFormValidation.js +29 -29
- package/dist/hooks/useGoogleMapsApiKey.d.ts +3 -3
- package/dist/hooks/useGoogleMapsApiKey.js +5 -5
- package/dist/hooks/useInfiniteScrollDataLoad.d.ts +30 -30
- package/dist/hooks/useInfiniteScrollDataLoad.js +124 -124
- package/dist/hooks/useInjectPages.d.ts +7 -7
- package/dist/hooks/useInjectPages.js +5 -5
- package/dist/hooks/useIsHovering.d.ts +5 -5
- package/dist/hooks/useIsHovering.js +12 -12
- package/dist/hooks/useIsMounted.d.ts +3 -3
- package/dist/hooks/useIsMounted.js +11 -11
- package/dist/hooks/useIsOffline.d.ts +6 -6
- package/dist/hooks/useIsOffline.js +26 -26
- package/dist/hooks/useIsPageVisible.d.ts +9 -9
- package/dist/hooks/useIsPageVisible.js +8 -8
- package/dist/hooks/useLoadDataState.d.ts +15 -15
- package/dist/hooks/useLoadDataState.js +54 -54
- package/dist/hooks/useLogin.d.ts +46 -46
- package/dist/hooks/useLogin.js +295 -295
- package/dist/hooks/useLookupNotification.d.ts +9 -9
- package/dist/hooks/useLookupNotification.js +10 -10
- package/dist/hooks/useLookups.d.ts +5 -5
- package/dist/hooks/useLookups.js +62 -62
- package/dist/hooks/useNullableState.d.ts +2 -2
- package/dist/hooks/useNullableState.js +6 -6
- package/dist/hooks/usePages.d.ts +24 -24
- package/dist/hooks/usePages.js +141 -141
- package/dist/hooks/useQuery.d.ts +2 -2
- package/dist/hooks/useQuery.js +7 -7
- package/dist/hooks/useSubmissionIdIsValid.d.ts +3 -3
- package/dist/hooks/useSubmissionIdIsValid.js +19 -19
- package/dist/hooks/useToggleComplianceChildren.d.ts +3 -3
- package/dist/hooks/useToggleComplianceChildren.js +13 -13
- package/dist/index.d.ts +23 -23
- package/dist/index.js +23 -23
- package/dist/services/attachments.d.ts +10 -10
- package/dist/services/attachments.js +72 -72
- package/dist/services/barcode-readers/quagger.d.ts +1 -1
- package/dist/services/barcode-readers/quagger.js +34 -34
- package/dist/services/blob-utils.d.ts +5 -5
- package/dist/services/blob-utils.js +73 -73
- package/dist/services/checkBsbsAreInvalid.d.ts +3 -3
- package/dist/services/checkBsbsAreInvalid.js +40 -40
- package/dist/services/checkIfAttachmentsExist.d.ts +5 -5
- package/dist/services/checkIfAttachmentsExist.js +144 -144
- package/dist/services/checkIfBsbsAreValidating.d.ts +3 -3
- package/dist/services/checkIfBsbsAreValidating.js +40 -40
- package/dist/services/cleanFormSubmissionModel.d.ts +6 -6
- package/dist/services/cleanFormSubmissionModel.js +203 -203
- package/dist/services/defaultCoordinates.d.ts +5 -5
- package/dist/services/defaultCoordinates.js +8 -8
- package/dist/services/download-file.d.ts +3 -3
- package/dist/services/download-file.js +90 -90
- package/dist/services/drawTimestampOnCanvas.d.ts +1 -1
- package/dist/services/drawTimestampOnCanvas.js +22 -22
- package/dist/services/form-validation.d.ts +10 -10
- package/dist/services/form-validation.js +561 -561
- package/dist/services/generate-default-data.d.ts +13 -13
- package/dist/services/generate-default-data.js +494 -494
- package/dist/services/generateCivicaNameRecordElements.d.ts +2 -2
- package/dist/services/generateCivicaNameRecordElements.js +140 -140
- package/dist/services/generateFreshdeskDependentFieldElements.d.ts +2 -2
- package/dist/services/generateFreshdeskDependentFieldElements.js +69 -69
- package/dist/services/sanitize-html.d.ts +2 -2
- package/dist/services/sanitize-html.js +20 -20
- package/dist/services/scrolling-service.d.ts +7 -7
- package/dist/services/scrolling-service.js +38 -38
- package/dist/services/utils-service.d.ts +5 -5
- package/dist/services/utils-service.js +16 -16
- package/dist/types/attachments.d.ts +19 -19
- package/dist/types/attachments.js +1 -1
- package/dist/types/form.d.ts +40 -40
- package/dist/types/form.js +2 -2
- package/package.json +2 -2
- package/dist/OneBlinkFormStoreView.d.ts +0 -8
- package/dist/OneBlinkFormStoreView.js +0 -55
- package/dist/OneBlinkFormStoreView.js.map +0 -1
- package/dist/components/AnnotationModal.d.ts +0 -8
- package/dist/components/AnnotationModal.js +0 -104
- package/dist/components/AnnotationModal.js.map +0 -1
- package/dist/components/AutocompleteDropdown.d.ts +0 -26
- package/dist/components/AutocompleteDropdown.js +0 -174
- package/dist/components/AutocompleteDropdown.js.map +0 -1
- package/dist/components/CopyToClipboardButton.d.ts +0 -9
- package/dist/components/CopyToClipboardButton.js +0 -14
- package/dist/components/CopyToClipboardButton.js.map +0 -1
- package/dist/components/CustomisableButtonInner.d.ts +0 -7
- package/dist/components/CustomisableButtonInner.js +0 -9
- package/dist/components/CustomisableButtonInner.js.map +0 -1
- package/dist/components/ErrorMessage.d.ts +0 -13
- package/dist/components/ErrorMessage.js +0 -13
- package/dist/components/ErrorMessage.js.map +0 -1
- package/dist/components/FormElementLabelContainer.d.ts +0 -12
- package/dist/components/FormElementLabelContainer.js +0 -16
- package/dist/components/FormElementLabelContainer.js.map +0 -1
- package/dist/components/FormElementOptions.d.ts +0 -9
- package/dist/components/FormElementOptions.js +0 -15
- package/dist/components/FormElementOptions.js.map +0 -1
- package/dist/components/LookupButton.d.ts +0 -10
- package/dist/components/LookupButton.js +0 -30
- package/dist/components/LookupButton.js.map +0 -1
- package/dist/components/LookupNotification.d.ts +0 -12
- package/dist/components/LookupNotification.js +0 -231
- package/dist/components/LookupNotification.js.map +0 -1
- package/dist/components/Modal.d.ts +0 -14
- package/dist/components/Modal.js +0 -15
- package/dist/components/Modal.js.map +0 -1
- package/dist/components/NoResourcesYet.d.ts +0 -12
- package/dist/components/NoResourcesYet.js +0 -7
- package/dist/components/NoResourcesYet.js.map +0 -1
- package/dist/components/OnLoading.d.ts +0 -10
- package/dist/components/OnLoading.js +0 -12
- package/dist/components/OnLoading.js.map +0 -1
- package/dist/components/OneBlinkAppsErrorOriginalMessage.d.ts +0 -7
- package/dist/components/OneBlinkAppsErrorOriginalMessage.js +0 -13
- package/dist/components/OneBlinkAppsErrorOriginalMessage.js.map +0 -1
- package/dist/components/OneBlinkFormElements.d.ts +0 -19
- package/dist/components/OneBlinkFormElements.js +0 -196
- package/dist/components/OneBlinkFormElements.js.map +0 -1
- package/dist/components/PageFormElements.d.ts +0 -17
- package/dist/components/PageFormElements.js +0 -49
- package/dist/components/PageFormElements.js.map +0 -1
- package/dist/components/ToggleAllCheckbox.d.ts +0 -13
- package/dist/components/ToggleAllCheckbox.js +0 -27
- package/dist/components/ToggleAllCheckbox.js.map +0 -1
- package/dist/components/attachments/AttachmentStatus.d.ts +0 -12
- package/dist/components/attachments/AttachmentStatus.js +0 -35
- package/dist/components/attachments/AttachmentStatus.js.map +0 -1
- package/dist/components/attachments/FileCard.d.ts +0 -18
- package/dist/components/attachments/FileCard.js +0 -58
- package/dist/components/attachments/FileCard.js.map +0 -1
- package/dist/components/attachments/FileCardContent.d.ts +0 -5
- package/dist/components/attachments/FileCardContent.js +0 -11
- package/dist/components/attachments/FileCardContent.js.map +0 -1
- package/dist/components/attachments/Files.d.ts +0 -14
- package/dist/components/attachments/Files.js +0 -27
- package/dist/components/attachments/Files.js.map +0 -1
- package/dist/components/attachments/ImagePreviewUnavailable.d.ts +0 -4
- package/dist/components/attachments/ImagePreviewUnavailable.js +0 -12
- package/dist/components/attachments/ImagePreviewUnavailable.js.map +0 -1
- package/dist/components/attachments/UploadingAttachment.d.ts +0 -4
- package/dist/components/attachments/UploadingAttachment.js +0 -13
- package/dist/components/attachments/UploadingAttachment.js.map +0 -1
- package/dist/components/formStore/ColumnsConfigurationButton.d.ts +0 -10
- package/dist/components/formStore/ColumnsConfigurationButton.js +0 -29
- package/dist/components/formStore/ColumnsConfigurationButton.js.map +0 -1
- package/dist/components/formStore/DownloadSubmissionDataButton.d.ts +0 -13
- package/dist/components/formStore/DownloadSubmissionDataButton.js +0 -45
- package/dist/components/formStore/DownloadSubmissionDataButton.js.map +0 -1
- package/dist/components/formStore/FormStore.d.ts +0 -9
- package/dist/components/formStore/FormStore.js +0 -103
- package/dist/components/formStore/FormStore.js.map +0 -1
- package/dist/components/formStore/table/index.d.ts +0 -17
- package/dist/components/formStore/table/index.js +0 -194
- package/dist/components/formStore/table/index.js.map +0 -1
- package/dist/components/renderer/attachments/Files.d.ts +0 -14
- package/dist/components/renderer/attachments/Files.js +0 -27
- package/dist/components/renderer/attachments/Files.js.map +0 -1
- package/dist/components/renderer/attachments/UploadingAttachment.d.ts +0 -4
- package/dist/components/renderer/attachments/UploadingAttachment.js +0 -13
- package/dist/components/renderer/attachments/UploadingAttachment.js.map +0 -1
- package/dist/form-elements/FormElementFiles/FormElementFile.d.ts +0 -13
- package/dist/form-elements/FormElementFiles/FormElementFile.js +0 -32
- package/dist/form-elements/FormElementFiles/FormElementFile.js.map +0 -1
- package/dist/form-elements/FormElementFiles/FormElementFileDisplay.d.ts +0 -10
- package/dist/form-elements/FormElementFiles/FormElementFileDisplay.js +0 -11
- package/dist/form-elements/FormElementFiles/FormElementFileDisplay.js.map +0 -1
- package/dist/form-elements/FormElementFiles/FormElementFiles.d.ts +0 -15
- package/dist/form-elements/FormElementFiles/FormElementFiles.js +0 -17
- package/dist/form-elements/FormElementFiles/FormElementFiles.js.map +0 -1
- package/dist/form-elements/FormElementFiles/FormElementFilesInvalidAttachment.d.ts +0 -7
- package/dist/form-elements/FormElementFiles/FormElementFilesInvalidAttachment.js +0 -11
- package/dist/form-elements/FormElementFiles/FormElementFilesInvalidAttachment.js.map +0 -1
- package/dist/form-elements/FormElementFiles/index.d.ts +0 -17
- package/dist/form-elements/FormElementFiles/index.js +0 -18
- package/dist/form-elements/FormElementFiles/index.js.map +0 -1
- package/dist/form-elements/FormElementFiles/legacy/FormElementFiles.d.ts +0 -18
- package/dist/form-elements/FormElementFiles/legacy/FormElementFiles.js +0 -61
- package/dist/form-elements/FormElementFiles/legacy/FormElementFiles.js.map +0 -1
- package/dist/hooks/attachments/useAttachmentObjectURLs.d.ts +0 -24
- package/dist/hooks/attachments/useAttachmentObjectURLs.js +0 -37
- package/dist/hooks/attachments/useAttachmentObjectURLs.js.map +0 -1
- package/dist/hooks/attachments/useLocalAttachmentBlobs.d.ts +0 -24
- package/dist/hooks/attachments/useLocalAttachmentBlobs.js +0 -40
- package/dist/hooks/attachments/useLocalAttachmentBlobs.js.map +0 -1
- package/dist/hooks/useButtonsConfiguration.d.ts +0 -45
- package/dist/hooks/useButtonsConfiguration.js +0 -6
- package/dist/hooks/useButtonsConfiguration.js.map +0 -1
- package/dist/hooks/useChangeEffect.d.ts +0 -1
- package/dist/hooks/useChangeEffect.js +0 -14
- package/dist/hooks/useChangeEffect.js.map +0 -1
- package/dist/hooks/useConditionallyShowOptionCallback.d.ts +0 -5
- package/dist/hooks/useConditionallyShowOptionCallback.js +0 -20
- package/dist/hooks/useConditionallyShowOptionCallback.js.map +0 -1
- package/dist/hooks/useCustomValidation.d.ts +0 -1
- package/dist/hooks/useCustomValidation.js +0 -9
- package/dist/hooks/useCustomValidation.js.map +0 -1
- package/dist/hooks/useDynamicOptionsLoaderEffect.d.ts +0 -7
- package/dist/hooks/useDynamicOptionsLoaderEffect.js +0 -45
- package/dist/hooks/useDynamicOptionsLoaderEffect.js.map +0 -1
- package/dist/hooks/useLegacyElements.d.ts +0 -16
- package/dist/hooks/useLegacyElements.js +0 -55
- package/dist/hooks/useLegacyElements.js.map +0 -1
- package/dist/hooks/useToggleAll.d.ts +0 -6
- package/dist/hooks/useToggleAll.js +0 -24
- package/dist/hooks/useToggleAll.js.map +0 -1
- package/dist/services/checkIfAttachmentsAreUploading.d.ts +0 -3
- package/dist/services/checkIfAttachmentsAreUploading.js +0 -58
- package/dist/services/checkIfAttachmentsAreUploading.js.map +0 -1
- package/dist/services/clean-form-elements-ctrl-model.d.ts +0 -4
- package/dist/services/clean-form-elements-ctrl-model.js +0 -166
- package/dist/services/clean-form-elements-ctrl-model.js.map +0 -1
- package/dist/services/conditionally-show-element.d.ts +0 -11
- package/dist/services/conditionally-show-element.js +0 -92
- package/dist/services/conditionally-show-element.js.map +0 -1
- package/dist/services/conditionally-show-option.d.ts +0 -3
- package/dist/services/conditionally-show-option.js +0 -135
- package/dist/services/conditionally-show-option.js.map +0 -1
- package/dist/services/flattenFormElements.d.ts +0 -2
- package/dist/services/flattenFormElements.js +0 -13
- package/dist/services/flattenFormElements.js.map +0 -1
- package/dist/services/getCorrectDateFromDateOnlyString.d.ts +0 -2
- package/dist/services/getCorrectDateFromDateOnlyString.js +0 -4
- package/dist/services/getCorrectDateFromDateOnlyString.js.map +0 -1
- package/dist/styles/boolean.scss +0 -12
- package/dist/styles/ob-file.scss +0 -63
@@ -1,7 +1,7 @@
|
|
1
|
-
import { LinearProgress } from '@mui/material';
|
2
|
-
import * as React from 'react';
|
3
|
-
const ProgressBar = ({ progress,
|
4
|
-
return
|
5
|
-
};
|
6
|
-
export default React.memo(ProgressBar);
|
1
|
+
import { LinearProgress } from '@mui/material';
|
2
|
+
import * as React from 'react';
|
3
|
+
const ProgressBar = ({ progress, ...rest }) => {
|
4
|
+
return React.createElement(LinearProgress, { ...rest, variant: "determinate", value: progress });
|
5
|
+
};
|
6
|
+
export default React.memo(ProgressBar);
|
7
7
|
//# sourceMappingURL=ProgressBar.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ProgressBar.js","sourceRoot":"","sources":["../../../src/components/renderer/ProgressBar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,
|
1
|
+
{"version":3,"file":"ProgressBar.js","sourceRoot":"","sources":["../../../src/components/renderer/ProgressBar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAuB,MAAM,eAAe,CAAA;AACnE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAM9B,MAAM,WAAW,GAAG,CAAC,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAS,EAAE,EAAE;IACnD,OAAO,oBAAC,cAAc,OAAK,IAAI,EAAE,OAAO,EAAC,aAAa,EAAC,KAAK,EAAE,QAAQ,GAAI,CAAA;AAC5E,CAAC,CAAA;AAED,eAAe,KAAK,CAAC,IAAI,CAAQ,WAAW,CAAC,CAAA","sourcesContent":["import { LinearProgress, LinearProgressProps } from '@mui/material'\nimport * as React from 'react'\n\ninterface Props extends Omit<LinearProgressProps, 'value' | 'variant'> {\n progress: number\n}\n\nconst ProgressBar = ({ progress, ...rest }: Props) => {\n return <LinearProgress {...rest} variant=\"determinate\" value={progress} />\n}\n\nexport default React.memo<Props>(ProgressBar)\n"]}
|
@@ -1,13 +1,13 @@
|
|
1
|
-
import * as React from 'react';
|
2
|
-
import { FormTypes } from '@oneblink/types';
|
3
|
-
import { FormElementValueChangeHandler } from '../../types/form';
|
4
|
-
interface Props {
|
5
|
-
id: string;
|
6
|
-
element: FormTypes.CheckboxElement | FormTypes.SelectElement;
|
7
|
-
options: FormTypes.ChoiceElementOption[];
|
8
|
-
selected: string[];
|
9
|
-
onChange: FormElementValueChangeHandler<string[]>;
|
10
|
-
disabled?: boolean;
|
11
|
-
}
|
12
|
-
declare const _default: React.NamedExoticComponent<Props>;
|
13
|
-
export default _default;
|
1
|
+
import * as React from 'react';
|
2
|
+
import { FormTypes } from '@oneblink/types';
|
3
|
+
import { FormElementValueChangeHandler } from '../../types/form';
|
4
|
+
interface Props {
|
5
|
+
id: string;
|
6
|
+
element: FormTypes.CheckboxElement | FormTypes.SelectElement;
|
7
|
+
options: FormTypes.ChoiceElementOption[];
|
8
|
+
selected: string[];
|
9
|
+
onChange: FormElementValueChangeHandler<string[]>;
|
10
|
+
disabled?: boolean;
|
11
|
+
}
|
12
|
+
declare const _default: React.NamedExoticComponent<Props>;
|
13
|
+
export default _default;
|
@@ -1,27 +1,27 @@
|
|
1
|
-
import * as React from 'react';
|
2
|
-
import { Checkbox } from '@mui/material';
|
3
|
-
const ToggleAllCheckbox = ({ id, element, options, selected, onChange, disabled, }) => {
|
4
|
-
const allSelected = React.useMemo(() => {
|
5
|
-
return options.every((option) => {
|
6
|
-
return selected.includes(option.value);
|
7
|
-
});
|
8
|
-
}, [options, selected]);
|
9
|
-
const handleToggleAll = React.useCallback((isSelectingAll) => {
|
10
|
-
if (isSelectingAll) {
|
11
|
-
onChange(element, options.map((opt) => opt.value));
|
12
|
-
}
|
13
|
-
else {
|
14
|
-
onChange(element, undefined);
|
15
|
-
}
|
16
|
-
}, [element, options, onChange]);
|
17
|
-
return (React.createElement("label", { className: "checkbox ob-checkbox__input-label cypress-checkbox-label", htmlFor: `${id}_select-all`, style: {
|
18
|
-
fontStyle: 'italic',
|
19
|
-
marginBottom: '1.25rem',
|
20
|
-
} },
|
21
|
-
React.createElement(Checkbox, { color: "default", classes: {
|
22
|
-
checked: 'ob-checkbox__input-checked',
|
23
|
-
}, className: "ob-checkbox__input cypress-checkbox-control", id: `${id}_select-all`, disableRipple: true, checked: allSelected, indeterminate: !!selected.length && !allSelected, onChange: (e) => handleToggleAll(e.target.checked), disabled: disabled }),
|
24
|
-
allSelected ? 'Deselect All' : 'Select All'));
|
25
|
-
};
|
26
|
-
export default React.memo(ToggleAllCheckbox);
|
1
|
+
import * as React from 'react';
|
2
|
+
import { Checkbox } from '@mui/material';
|
3
|
+
const ToggleAllCheckbox = ({ id, element, options, selected, onChange, disabled, }) => {
|
4
|
+
const allSelected = React.useMemo(() => {
|
5
|
+
return options.every((option) => {
|
6
|
+
return selected.includes(option.value);
|
7
|
+
});
|
8
|
+
}, [options, selected]);
|
9
|
+
const handleToggleAll = React.useCallback((isSelectingAll) => {
|
10
|
+
if (isSelectingAll) {
|
11
|
+
onChange(element, options.map((opt) => opt.value));
|
12
|
+
}
|
13
|
+
else {
|
14
|
+
onChange(element, undefined);
|
15
|
+
}
|
16
|
+
}, [element, options, onChange]);
|
17
|
+
return (React.createElement("label", { className: "checkbox ob-checkbox__input-label cypress-checkbox-label", htmlFor: `${id}_select-all`, style: {
|
18
|
+
fontStyle: 'italic',
|
19
|
+
marginBottom: '1.25rem',
|
20
|
+
} },
|
21
|
+
React.createElement(Checkbox, { color: "default", classes: {
|
22
|
+
checked: 'ob-checkbox__input-checked',
|
23
|
+
}, className: "ob-checkbox__input cypress-checkbox-control", id: `${id}_select-all`, disableRipple: true, checked: allSelected, indeterminate: !!selected.length && !allSelected, onChange: (e) => handleToggleAll(e.target.checked), disabled: disabled }),
|
24
|
+
allSelected ? 'Deselect All' : 'Select All'));
|
25
|
+
};
|
26
|
+
export default React.memo(ToggleAllCheckbox);
|
27
27
|
//# sourceMappingURL=ToggleAllCheckbox.js.map
|
@@ -1,10 +1,10 @@
|
|
1
|
-
import * as React from 'react';
|
2
|
-
declare const _default: React.MemoExoticComponent<({ isUploading, isUploadPaused, uploadError, loadImageUrlError, isLoadingImageUrl, imageUrl, }: {
|
3
|
-
isUploading?: boolean | undefined;
|
4
|
-
isUploadPaused?: boolean | undefined;
|
5
|
-
uploadError?: Error | undefined;
|
6
|
-
loadImageUrlError?: Error | undefined;
|
7
|
-
isLoadingImageUrl?: boolean | undefined;
|
8
|
-
imageUrl: string | null | undefined;
|
9
|
-
}) => JSX.Element | null>;
|
10
|
-
export default _default;
|
1
|
+
import * as React from 'react';
|
2
|
+
declare const _default: React.MemoExoticComponent<({ isUploading, isUploadPaused, uploadError, loadImageUrlError, isLoadingImageUrl, imageUrl, }: {
|
3
|
+
isUploading?: boolean | undefined;
|
4
|
+
isUploadPaused?: boolean | undefined;
|
5
|
+
uploadError?: Error | undefined;
|
6
|
+
loadImageUrlError?: Error | undefined;
|
7
|
+
isLoadingImageUrl?: boolean | undefined;
|
8
|
+
imageUrl: string | null | undefined;
|
9
|
+
}) => JSX.Element | null>;
|
10
|
+
export default _default;
|
@@ -1,37 +1,37 @@
|
|
1
|
-
import * as React from 'react';
|
2
|
-
import { Tooltip } from '@mui/material';
|
3
|
-
import useIsOffline from '../../../hooks/useIsOffline';
|
4
|
-
const AttachmentStatus = ({ isUploading, isUploadPaused, uploadError, loadImageUrlError, isLoadingImageUrl, imageUrl, }) => {
|
5
|
-
const isOffline = useIsOffline();
|
6
|
-
const tooltip = React.useMemo(() => {
|
7
|
-
if (isLoadingImageUrl && !imageUrl) {
|
8
|
-
return 'Attempting to load file preview. File is synced with submission.';
|
9
|
-
}
|
10
|
-
if (loadImageUrlError && !imageUrl) {
|
11
|
-
return 'File preview not available, however file is synced with submission.';
|
12
|
-
}
|
13
|
-
return 'Synced with submission.';
|
14
|
-
}, [imageUrl, isLoadingImageUrl, loadImageUrlError]);
|
15
|
-
if (uploadError) {
|
16
|
-
return (React.createElement(Tooltip, { title: uploadError.message },
|
17
|
-
React.createElement("span", { className: "attachment__status-wrapper" },
|
18
|
-
React.createElement("i", { className: "material-icons has-text-danger" }, "error"))));
|
19
|
-
}
|
20
|
-
if (isUploading) {
|
21
|
-
if (isUploadPaused) {
|
22
|
-
return (React.createElement("span", { className: "attachment__status-wrapper" },
|
23
|
-
React.createElement("i", { className: "material-icons" }, "pause")));
|
24
|
-
}
|
25
|
-
if (isOffline) {
|
26
|
-
return (React.createElement(Tooltip, { title: "Upload will start when you connect to the internet" },
|
27
|
-
React.createElement("div", { className: "cypress-attachment-uploading" },
|
28
|
-
React.createElement("i", { className: "material-icons has-text-warning" }, "wifi_off"))));
|
29
|
-
}
|
30
|
-
return null;
|
31
|
-
}
|
32
|
-
return (React.createElement(Tooltip, { title: tooltip },
|
33
|
-
React.createElement("span", { className: "attachment__status-wrapper" },
|
34
|
-
React.createElement("i", { className: "material-icons has-text-success" }, "check_circle"))));
|
35
|
-
};
|
36
|
-
export default React.memo(AttachmentStatus);
|
1
|
+
import * as React from 'react';
|
2
|
+
import { Tooltip } from '@mui/material';
|
3
|
+
import useIsOffline from '../../../hooks/useIsOffline';
|
4
|
+
const AttachmentStatus = ({ isUploading, isUploadPaused, uploadError, loadImageUrlError, isLoadingImageUrl, imageUrl, }) => {
|
5
|
+
const isOffline = useIsOffline();
|
6
|
+
const tooltip = React.useMemo(() => {
|
7
|
+
if (isLoadingImageUrl && !imageUrl) {
|
8
|
+
return 'Attempting to load file preview. File is synced with submission.';
|
9
|
+
}
|
10
|
+
if (loadImageUrlError && !imageUrl) {
|
11
|
+
return 'File preview not available, however file is synced with submission.';
|
12
|
+
}
|
13
|
+
return 'Synced with submission.';
|
14
|
+
}, [imageUrl, isLoadingImageUrl, loadImageUrlError]);
|
15
|
+
if (uploadError) {
|
16
|
+
return (React.createElement(Tooltip, { title: uploadError.message },
|
17
|
+
React.createElement("span", { className: "attachment__status-wrapper" },
|
18
|
+
React.createElement("i", { className: "material-icons has-text-danger" }, "error"))));
|
19
|
+
}
|
20
|
+
if (isUploading) {
|
21
|
+
if (isUploadPaused) {
|
22
|
+
return (React.createElement("span", { className: "attachment__status-wrapper" },
|
23
|
+
React.createElement("i", { className: "material-icons" }, "pause")));
|
24
|
+
}
|
25
|
+
if (isOffline) {
|
26
|
+
return (React.createElement(Tooltip, { title: "Upload will start when you connect to the internet" },
|
27
|
+
React.createElement("div", { className: "cypress-attachment-uploading" },
|
28
|
+
React.createElement("i", { className: "material-icons has-text-warning" }, "wifi_off"))));
|
29
|
+
}
|
30
|
+
return null;
|
31
|
+
}
|
32
|
+
return (React.createElement(Tooltip, { title: tooltip },
|
33
|
+
React.createElement("span", { className: "attachment__status-wrapper" },
|
34
|
+
React.createElement("i", { className: "material-icons has-text-success" }, "check_circle"))));
|
35
|
+
};
|
36
|
+
export default React.memo(AttachmentStatus);
|
37
37
|
//# sourceMappingURL=AttachmentStatus.js.map
|
@@ -1,19 +1,19 @@
|
|
1
|
-
import * as React from 'react';
|
2
|
-
import { FormTypes } from '@oneblink/types';
|
3
|
-
declare type Props = {
|
4
|
-
element: FormTypes.FilesElement;
|
5
|
-
isUploading?: boolean;
|
6
|
-
isUploadPaused?: boolean;
|
7
|
-
uploadErrorMessage?: string;
|
8
|
-
loadImageUrlError?: Error;
|
9
|
-
isLoadingImageUrl?: boolean;
|
10
|
-
fileName: string;
|
11
|
-
imageUrl: string | undefined | null;
|
12
|
-
onRemove: () => void;
|
13
|
-
onDownload?: () => void;
|
14
|
-
onRetry?: () => void;
|
15
|
-
progress: undefined | number;
|
16
|
-
};
|
17
|
-
declare function FileCard({ element, isUploading, isUploadPaused, uploadErrorMessage, loadImageUrlError, isLoadingImageUrl, imageUrl, fileName, onDownload, onRemove, onRetry, progress, }: Props): JSX.Element;
|
18
|
-
declare const _default: React.MemoExoticComponent<typeof FileCard>;
|
19
|
-
export default _default;
|
1
|
+
import * as React from 'react';
|
2
|
+
import { FormTypes } from '@oneblink/types';
|
3
|
+
declare type Props = {
|
4
|
+
element: FormTypes.FilesElement;
|
5
|
+
isUploading?: boolean;
|
6
|
+
isUploadPaused?: boolean;
|
7
|
+
uploadErrorMessage?: string;
|
8
|
+
loadImageUrlError?: Error;
|
9
|
+
isLoadingImageUrl?: boolean;
|
10
|
+
fileName: string;
|
11
|
+
imageUrl: string | undefined | null;
|
12
|
+
onRemove: () => void;
|
13
|
+
onDownload?: () => void;
|
14
|
+
onRetry?: () => void;
|
15
|
+
progress: undefined | number;
|
16
|
+
};
|
17
|
+
declare function FileCard({ element, isUploading, isUploadPaused, uploadErrorMessage, loadImageUrlError, isLoadingImageUrl, imageUrl, fileName, onDownload, onRemove, onRetry, progress, }: Props): JSX.Element;
|
18
|
+
declare const _default: React.MemoExoticComponent<typeof FileCard>;
|
19
|
+
export default _default;
|
@@ -1,61 +1,61 @@
|
|
1
|
-
import * as React from 'react';
|
2
|
-
import clsx from 'clsx';
|
3
|
-
import useBooleanState from '../../../hooks/useBooleanState';
|
4
|
-
import useClickOutsideElement from '../../../hooks/useClickOutsideElement';
|
5
|
-
import FileCardContent from './FileCardContent';
|
6
|
-
import AttachmentStatus from './AttachmentStatus';
|
7
|
-
import { checkFileNameIsValid, checkFileNameExtensionIsValid, } from '../../../services/form-validation';
|
8
|
-
import ProgressBar from './ProgressBar';
|
9
|
-
function FileCard({ element, isUploading, isUploadPaused, uploadErrorMessage, loadImageUrlError, isLoadingImageUrl, imageUrl, fileName, onDownload, onRemove, onRetry, progress, }) {
|
10
|
-
const dropDownRef = React.useRef(null);
|
11
|
-
const [isShowingMore, showMore, hideMore] = useBooleanState(false);
|
12
|
-
const uploadError = React.useMemo(() => {
|
13
|
-
if (!checkFileNameIsValid(element, fileName)) {
|
14
|
-
return new Error(`${fileName.split('.').pop()} files are not allowed`);
|
15
|
-
}
|
16
|
-
if (!checkFileNameExtensionIsValid(element, fileName)) {
|
17
|
-
return new Error(`${fileName} must have an extension`);
|
18
|
-
}
|
19
|
-
if (uploadErrorMessage) {
|
20
|
-
return new Error(uploadErrorMessage);
|
21
|
-
}
|
22
|
-
}, [element, fileName, uploadErrorMessage]);
|
23
|
-
useClickOutsideElement(dropDownRef, React.useCallback(() => {
|
24
|
-
if (isShowingMore) {
|
25
|
-
hideMore();
|
26
|
-
}
|
27
|
-
}, [hideMore, isShowingMore]));
|
28
|
-
const progressTooltipRef = React.useRef(null);
|
29
|
-
return (React.createElement("div", { className: "column is-one-quarter" },
|
30
|
-
React.createElement("div", { className: "ob-files__box" },
|
31
|
-
React.createElement("div", { className: "ob-files__content" },
|
32
|
-
React.createElement(FileCardContent, { imageUrl: imageUrl })),
|
33
|
-
React.createElement("div", { className: clsx('dropdown is-right ob-files__menu', {
|
34
|
-
'is-active': isShowingMore,
|
35
|
-
}), ref: dropDownRef },
|
36
|
-
React.createElement("div", { className: "dropdown-trigger" },
|
37
|
-
React.createElement("button", { type: "button", className: "button ob-files__menu-button cypress-file-menu-button", "aria-haspopup": "true", "aria-controls": "dropdown-menu", onClick: isShowingMore ? hideMore : showMore },
|
38
|
-
React.createElement("i", { className: "material-icons ob-files__menu-icon" }, "more_vert"))),
|
39
|
-
React.createElement("div", { className: "dropdown-menu", role: "menu" },
|
40
|
-
React.createElement("div", { className: "dropdown-content" },
|
41
|
-
onRetry && (React.createElement("a", { className: "dropdown-item cypress-file-retry-button", onClick: () => {
|
42
|
-
hideMore();
|
43
|
-
onRetry();
|
44
|
-
} }, "Retry")),
|
45
|
-
onDownload && (React.createElement("a", { className: "dropdown-item cypress-file-download-button", onClick: () => {
|
46
|
-
hideMore();
|
47
|
-
onDownload();
|
48
|
-
} }, "Download")),
|
49
|
-
React.createElement("a", { className: clsx('dropdown-item cypress-file-remove-button', {
|
50
|
-
'ob-files__menu-remove-hidden': element.readOnly,
|
51
|
-
}), onClick: () => {
|
52
|
-
hideMore();
|
53
|
-
onRemove();
|
54
|
-
} }, "Remove")))),
|
55
|
-
React.createElement("div", { className: "ob-files__file-name is-size-6", ref: progressTooltipRef },
|
56
|
-
React.createElement("span", { className: "ob-files__file-name-inner" }, fileName),
|
57
|
-
React.createElement(AttachmentStatus, { isUploading: isUploading, isUploadPaused: isUploadPaused, uploadError: uploadError, loadImageUrlError: loadImageUrlError, isLoadingImageUrl: isLoadingImageUrl, imageUrl: imageUrl }),
|
58
|
-
progressTooltipRef.current && (React.createElement(ProgressBar, { progress: progress, isShowing: !!isUploading, tooltipAnchorEl: progressTooltipRef.current }))))));
|
59
|
-
}
|
60
|
-
export default React.memo(FileCard);
|
1
|
+
import * as React from 'react';
|
2
|
+
import clsx from 'clsx';
|
3
|
+
import useBooleanState from '../../../hooks/useBooleanState';
|
4
|
+
import useClickOutsideElement from '../../../hooks/useClickOutsideElement';
|
5
|
+
import FileCardContent from './FileCardContent';
|
6
|
+
import AttachmentStatus from './AttachmentStatus';
|
7
|
+
import { checkFileNameIsValid, checkFileNameExtensionIsValid, } from '../../../services/form-validation';
|
8
|
+
import ProgressBar from './ProgressBar';
|
9
|
+
function FileCard({ element, isUploading, isUploadPaused, uploadErrorMessage, loadImageUrlError, isLoadingImageUrl, imageUrl, fileName, onDownload, onRemove, onRetry, progress, }) {
|
10
|
+
const dropDownRef = React.useRef(null);
|
11
|
+
const [isShowingMore, showMore, hideMore] = useBooleanState(false);
|
12
|
+
const uploadError = React.useMemo(() => {
|
13
|
+
if (!checkFileNameIsValid(element, fileName)) {
|
14
|
+
return new Error(`${fileName.split('.').pop()} files are not allowed`);
|
15
|
+
}
|
16
|
+
if (!checkFileNameExtensionIsValid(element, fileName)) {
|
17
|
+
return new Error(`${fileName} must have an extension`);
|
18
|
+
}
|
19
|
+
if (uploadErrorMessage) {
|
20
|
+
return new Error(uploadErrorMessage);
|
21
|
+
}
|
22
|
+
}, [element, fileName, uploadErrorMessage]);
|
23
|
+
useClickOutsideElement(dropDownRef, React.useCallback(() => {
|
24
|
+
if (isShowingMore) {
|
25
|
+
hideMore();
|
26
|
+
}
|
27
|
+
}, [hideMore, isShowingMore]));
|
28
|
+
const progressTooltipRef = React.useRef(null);
|
29
|
+
return (React.createElement("div", { className: "column is-one-quarter" },
|
30
|
+
React.createElement("div", { className: "ob-files__box" },
|
31
|
+
React.createElement("div", { className: "ob-files__content" },
|
32
|
+
React.createElement(FileCardContent, { imageUrl: imageUrl })),
|
33
|
+
React.createElement("div", { className: clsx('dropdown is-right ob-files__menu', {
|
34
|
+
'is-active': isShowingMore,
|
35
|
+
}), ref: dropDownRef },
|
36
|
+
React.createElement("div", { className: "dropdown-trigger" },
|
37
|
+
React.createElement("button", { type: "button", className: "button ob-files__menu-button cypress-file-menu-button", "aria-haspopup": "true", "aria-controls": "dropdown-menu", onClick: isShowingMore ? hideMore : showMore },
|
38
|
+
React.createElement("i", { className: "material-icons ob-files__menu-icon" }, "more_vert"))),
|
39
|
+
React.createElement("div", { className: "dropdown-menu", role: "menu" },
|
40
|
+
React.createElement("div", { className: "dropdown-content" },
|
41
|
+
onRetry && (React.createElement("a", { className: "dropdown-item cypress-file-retry-button", onClick: () => {
|
42
|
+
hideMore();
|
43
|
+
onRetry();
|
44
|
+
} }, "Retry")),
|
45
|
+
onDownload && (React.createElement("a", { className: "dropdown-item cypress-file-download-button", onClick: () => {
|
46
|
+
hideMore();
|
47
|
+
onDownload();
|
48
|
+
} }, "Download")),
|
49
|
+
React.createElement("a", { className: clsx('dropdown-item cypress-file-remove-button', {
|
50
|
+
'ob-files__menu-remove-hidden': element.readOnly,
|
51
|
+
}), onClick: () => {
|
52
|
+
hideMore();
|
53
|
+
onRemove();
|
54
|
+
} }, "Remove")))),
|
55
|
+
React.createElement("div", { className: "ob-files__file-name is-size-6", ref: progressTooltipRef },
|
56
|
+
React.createElement("span", { className: "ob-files__file-name-inner" }, fileName),
|
57
|
+
React.createElement(AttachmentStatus, { isUploading: isUploading, isUploadPaused: isUploadPaused, uploadError: uploadError, loadImageUrlError: loadImageUrlError, isLoadingImageUrl: isLoadingImageUrl, imageUrl: imageUrl }),
|
58
|
+
progressTooltipRef.current && (React.createElement(ProgressBar, { progress: progress, isShowing: !!isUploading, tooltipAnchorEl: progressTooltipRef.current }))))));
|
59
|
+
}
|
60
|
+
export default React.memo(FileCard);
|
61
61
|
//# sourceMappingURL=FileCard.js.map
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import * as React from 'react';
|
2
|
-
declare const _default: React.MemoExoticComponent<({ imageUrl, }: {
|
3
|
-
imageUrl: string | null | undefined;
|
4
|
-
}) => JSX.Element>;
|
5
|
-
export default _default;
|
1
|
+
import * as React from 'react';
|
2
|
+
declare const _default: React.MemoExoticComponent<({ imageUrl, }: {
|
3
|
+
imageUrl: string | null | undefined;
|
4
|
+
}) => JSX.Element>;
|
5
|
+
export default _default;
|
@@ -1,11 +1,11 @@
|
|
1
|
-
import * as React from 'react';
|
2
|
-
const FileCardContent = ({ imageUrl, }) => {
|
3
|
-
if (imageUrl) {
|
4
|
-
return (React.createElement("div", { className: "ob-files__content-image" },
|
5
|
-
React.createElement("img", { className: "ob-files__image", src: imageUrl })));
|
6
|
-
}
|
7
|
-
return (React.createElement("div", { className: "ob-files__content-file has-text-centered" },
|
8
|
-
React.createElement("i", { className: "material-icons icon-large ob-files__attach-icon has-text-grey" }, "attach_file")));
|
9
|
-
};
|
10
|
-
export default React.memo(FileCardContent);
|
1
|
+
import * as React from 'react';
|
2
|
+
const FileCardContent = ({ imageUrl, }) => {
|
3
|
+
if (imageUrl) {
|
4
|
+
return (React.createElement("div", { className: "ob-files__content-image" },
|
5
|
+
React.createElement("img", { className: "ob-files__image", src: imageUrl })));
|
6
|
+
}
|
7
|
+
return (React.createElement("div", { className: "ob-files__content-file has-text-centered" },
|
8
|
+
React.createElement("i", { className: "material-icons icon-large ob-files__attach-icon has-text-grey" }, "attach_file")));
|
9
|
+
};
|
10
|
+
export default React.memo(FileCardContent);
|
11
11
|
//# sourceMappingURL=FileCardContent.js.map
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import * as React from 'react';
|
2
|
-
declare function ImagePreviewUnavailable(): JSX.Element;
|
3
|
-
declare const _default: React.MemoExoticComponent<typeof ImagePreviewUnavailable>;
|
4
|
-
export default _default;
|
1
|
+
import * as React from 'react';
|
2
|
+
declare function ImagePreviewUnavailable(): JSX.Element;
|
3
|
+
declare const _default: React.MemoExoticComponent<typeof ImagePreviewUnavailable>;
|
4
|
+
export default _default;
|
@@ -1,12 +1,12 @@
|
|
1
|
-
import * as React from 'react';
|
2
|
-
import useIsOffline from '../../../hooks/useIsOffline';
|
3
|
-
function ImagePreviewUnavailable() {
|
4
|
-
const isOffline = useIsOffline();
|
5
|
-
return (React.createElement(React.Fragment, null, isOffline ? (React.createElement(React.Fragment, null,
|
6
|
-
React.createElement("i", { className: "material-icons has-text-warning icon-large has-margin-bottom-6" }, "wifi_off"),
|
7
|
-
React.createElement("p", null, "It looks like you're offline. Image preview will be available when connectivity is restored."))) : (React.createElement(React.Fragment, null,
|
8
|
-
React.createElement("i", { className: "material-icons has-text-grey icon-large has-margin-bottom-6" }, "attach_file"),
|
9
|
-
React.createElement("p", null, "You do not have access to preview this image, however, it will be included with your submission.")))));
|
10
|
-
}
|
11
|
-
export default React.memo(ImagePreviewUnavailable);
|
1
|
+
import * as React from 'react';
|
2
|
+
import useIsOffline from '../../../hooks/useIsOffline';
|
3
|
+
function ImagePreviewUnavailable() {
|
4
|
+
const isOffline = useIsOffline();
|
5
|
+
return (React.createElement(React.Fragment, null, isOffline ? (React.createElement(React.Fragment, null,
|
6
|
+
React.createElement("i", { className: "material-icons has-text-warning icon-large has-margin-bottom-6" }, "wifi_off"),
|
7
|
+
React.createElement("p", null, "It looks like you're offline. Image preview will be available when connectivity is restored."))) : (React.createElement(React.Fragment, null,
|
8
|
+
React.createElement("i", { className: "material-icons has-text-grey icon-large has-margin-bottom-6" }, "attach_file"),
|
9
|
+
React.createElement("p", null, "You do not have access to preview this image, however, it will be included with your submission.")))));
|
10
|
+
}
|
11
|
+
export default React.memo(ImagePreviewUnavailable);
|
12
12
|
//# sourceMappingURL=ImagePreviewUnavailable.js.map
|
@@ -1,8 +1,8 @@
|
|
1
|
-
import * as React from 'react';
|
2
|
-
interface Props {
|
3
|
-
progress: number | undefined;
|
4
|
-
isShowing: boolean;
|
5
|
-
tooltipAnchorEl?: HTMLDivElement;
|
6
|
-
}
|
7
|
-
declare const _default: React.NamedExoticComponent<Props>;
|
8
|
-
export default _default;
|
1
|
+
import * as React from 'react';
|
2
|
+
interface Props {
|
3
|
+
progress: number | undefined;
|
4
|
+
isShowing: boolean;
|
5
|
+
tooltipAnchorEl?: HTMLDivElement;
|
6
|
+
}
|
7
|
+
declare const _default: React.NamedExoticComponent<Props>;
|
8
|
+
export default _default;
|
@@ -1,34 +1,34 @@
|
|
1
|
-
import * as React from 'react';
|
2
|
-
import { Tooltip, Fade } from '@mui/material';
|
3
|
-
import ProgressBar from '../ProgressBar';
|
4
|
-
import useBooleanState from '../../../hooks/useBooleanState';
|
5
|
-
const AttachmentProgressBar = ({ progress, isShowing, tooltipAnchorEl, }) => {
|
6
|
-
const [tooltipIsOpen, openTooltip, closeTooltip] = useBooleanState(false);
|
7
|
-
React.useEffect(() => {
|
8
|
-
if (tooltipAnchorEl && isShowing) {
|
9
|
-
console.log('Applying tooltip events...');
|
10
|
-
tooltipAnchorEl.onmouseenter = openTooltip;
|
11
|
-
tooltipAnchorEl.onmouseleave = closeTooltip;
|
12
|
-
}
|
13
|
-
if (!isShowing) {
|
14
|
-
closeTooltip();
|
15
|
-
}
|
16
|
-
return () => {
|
17
|
-
if (tooltipAnchorEl) {
|
18
|
-
console.log('Removing tooltip events...');
|
19
|
-
tooltipAnchorEl.onmouseenter = null;
|
20
|
-
tooltipAnchorEl.onmouseleave = null;
|
21
|
-
}
|
22
|
-
};
|
23
|
-
}, [closeTooltip, isShowing, openTooltip, tooltipAnchorEl]);
|
24
|
-
return (React.createElement(Fade, { in: isShowing },
|
25
|
-
React.createElement("span", null,
|
26
|
-
React.createElement("div", { className: "ob-progress__attachment-wrapper" },
|
27
|
-
React.createElement(Tooltip, { title: typeof progress === 'number'
|
28
|
-
? `Attachment upload progress: ${Math.round(progress)}%`
|
29
|
-
: '', open: tooltipIsOpen },
|
30
|
-
React.createElement("span", { className: "ob-progress__attachment-tooltip-element" })),
|
31
|
-
React.createElement(ProgressBar, { className: "ob-progress__attachment-bar", progress: progress || 0 })))));
|
32
|
-
};
|
33
|
-
export default React.memo(AttachmentProgressBar);
|
1
|
+
import * as React from 'react';
|
2
|
+
import { Tooltip, Fade } from '@mui/material';
|
3
|
+
import ProgressBar from '../ProgressBar';
|
4
|
+
import useBooleanState from '../../../hooks/useBooleanState';
|
5
|
+
const AttachmentProgressBar = ({ progress, isShowing, tooltipAnchorEl, }) => {
|
6
|
+
const [tooltipIsOpen, openTooltip, closeTooltip] = useBooleanState(false);
|
7
|
+
React.useEffect(() => {
|
8
|
+
if (tooltipAnchorEl && isShowing) {
|
9
|
+
console.log('Applying tooltip events...');
|
10
|
+
tooltipAnchorEl.onmouseenter = openTooltip;
|
11
|
+
tooltipAnchorEl.onmouseleave = closeTooltip;
|
12
|
+
}
|
13
|
+
if (!isShowing) {
|
14
|
+
closeTooltip();
|
15
|
+
}
|
16
|
+
return () => {
|
17
|
+
if (tooltipAnchorEl) {
|
18
|
+
console.log('Removing tooltip events...');
|
19
|
+
tooltipAnchorEl.onmouseenter = null;
|
20
|
+
tooltipAnchorEl.onmouseleave = null;
|
21
|
+
}
|
22
|
+
};
|
23
|
+
}, [closeTooltip, isShowing, openTooltip, tooltipAnchorEl]);
|
24
|
+
return (React.createElement(Fade, { in: isShowing },
|
25
|
+
React.createElement("span", null,
|
26
|
+
React.createElement("div", { className: "ob-progress__attachment-wrapper" },
|
27
|
+
React.createElement(Tooltip, { title: typeof progress === 'number'
|
28
|
+
? `Attachment upload progress: ${Math.round(progress)}%`
|
29
|
+
: '', open: tooltipIsOpen },
|
30
|
+
React.createElement("span", { className: "ob-progress__attachment-tooltip-element" })),
|
31
|
+
React.createElement(ProgressBar, { className: "ob-progress__attachment-bar", progress: progress || 0 })))));
|
32
|
+
};
|
33
|
+
export default React.memo(AttachmentProgressBar);
|
34
34
|
//# sourceMappingURL=ProgressBar.js.map
|
@@ -1,10 +1,10 @@
|
|
1
|
-
import * as React from 'react';
|
2
|
-
interface Props {
|
3
|
-
onClick: () => void;
|
4
|
-
icon: string;
|
5
|
-
children: React.ReactNode;
|
6
|
-
isActive: boolean;
|
7
|
-
disabled: boolean;
|
8
|
-
}
|
9
|
-
declare const _default: React.NamedExoticComponent<Props>;
|
10
|
-
export default _default;
|
1
|
+
import * as React from 'react';
|
2
|
+
interface Props {
|
3
|
+
onClick: () => void;
|
4
|
+
icon: string;
|
5
|
+
children: React.ReactNode;
|
6
|
+
isActive: boolean;
|
7
|
+
disabled: boolean;
|
8
|
+
}
|
9
|
+
declare const _default: React.NamedExoticComponent<Props>;
|
10
|
+
export default _default;
|
@@ -1,12 +1,12 @@
|
|
1
|
-
import * as React from 'react';
|
2
|
-
import clsx from 'clsx';
|
3
|
-
const ComplianceButton = ({ onClick, icon, children, isActive, disabled, }) => {
|
4
|
-
return (React.createElement("button", { disabled: disabled, type: "button", className: clsx('button ob-button__compliance', {
|
5
|
-
'is-primary': isActive,
|
6
|
-
'is-light': !isActive,
|
7
|
-
}), onClick: onClick },
|
8
|
-
React.createElement("i", { className: "material-icons is-size-5 ob-button__compliance-icon" }, icon),
|
9
|
-
children));
|
10
|
-
};
|
11
|
-
export default React.memo(ComplianceButton);
|
1
|
+
import * as React from 'react';
|
2
|
+
import clsx from 'clsx';
|
3
|
+
const ComplianceButton = ({ onClick, icon, children, isActive, disabled, }) => {
|
4
|
+
return (React.createElement("button", { disabled: disabled, type: "button", className: clsx('button ob-button__compliance', {
|
5
|
+
'is-primary': isActive,
|
6
|
+
'is-light': !isActive,
|
7
|
+
}), onClick: onClick },
|
8
|
+
React.createElement("i", { className: "material-icons is-size-5 ob-button__compliance-icon" }, icon),
|
9
|
+
children));
|
10
|
+
};
|
11
|
+
export default React.memo(ComplianceButton);
|
12
12
|
//# sourceMappingURL=ComplianceButton.js.map
|
@@ -1,14 +1,14 @@
|
|
1
|
-
import * as React from 'react';
|
2
|
-
import { FormTypes, MiscTypes } from '@oneblink/types';
|
3
|
-
import { FormElementValueChangeHandler } from '../types/form';
|
4
|
-
declare type Props = {
|
5
|
-
id: string;
|
6
|
-
element: FormTypes.ABNElement;
|
7
|
-
value: MiscTypes.ABNRecord | undefined;
|
8
|
-
onChange: FormElementValueChangeHandler<MiscTypes.ABNRecord>;
|
9
|
-
displayValidationMessage: boolean;
|
10
|
-
validationMessage: string | undefined;
|
11
|
-
};
|
12
|
-
declare function FormElementABN({ id, element, value, onChange, validationMessage, displayValidationMessage, }: Props): JSX.Element;
|
13
|
-
declare const _default: React.MemoExoticComponent<typeof FormElementABN>;
|
14
|
-
export default _default;
|
1
|
+
import * as React from 'react';
|
2
|
+
import { FormTypes, MiscTypes } from '@oneblink/types';
|
3
|
+
import { FormElementValueChangeHandler } from '../types/form';
|
4
|
+
declare type Props = {
|
5
|
+
id: string;
|
6
|
+
element: FormTypes.ABNElement;
|
7
|
+
value: MiscTypes.ABNRecord | undefined;
|
8
|
+
onChange: FormElementValueChangeHandler<MiscTypes.ABNRecord>;
|
9
|
+
displayValidationMessage: boolean;
|
10
|
+
validationMessage: string | undefined;
|
11
|
+
};
|
12
|
+
declare function FormElementABN({ id, element, value, onChange, validationMessage, displayValidationMessage, }: Props): JSX.Element;
|
13
|
+
declare const _default: React.MemoExoticComponent<typeof FormElementABN>;
|
14
|
+
export default _default;
|