@wise/dynamic-flow-client 0.4.0-beta-0489d0.8 → 0.4.1
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/README.md +0 -11
- package/build/common/constants/DateMode.js +8 -0
- package/build/common/constants/DateMode.js.map +1 -0
- package/build/common/constants/FormControlType.js +21 -0
- package/build/common/constants/FormControlType.js.map +1 -0
- package/build/common/constants/MonthFormat.js +8 -0
- package/build/common/constants/MonthFormat.js.map +1 -0
- package/build/common/constants/SchemaType.js +15 -0
- package/build/common/constants/SchemaType.js.map +1 -0
- package/build/common/constants/Size.js +11 -0
- package/build/common/constants/Size.js.map +1 -0
- package/build/common/constants/index.js +22 -0
- package/build/common/constants/index.js.map +1 -0
- package/build/common/contexts/dynamicFlowContexts/DynamicFlowContexts.js +30 -0
- package/build/common/contexts/dynamicFlowContexts/DynamicFlowContexts.js.map +1 -0
- package/build/common/contexts/dynamicFlowContexts/usePendingPromiseCounter.js +20 -0
- package/build/common/contexts/dynamicFlowContexts/usePendingPromiseCounter.js.map +1 -0
- package/build/common/contexts/eventsContext/EventsContext.js +23 -0
- package/build/common/contexts/eventsContext/EventsContext.js.map +1 -0
- package/build/common/contexts/fetcherContexts/FetcherContexts.js +30 -0
- package/build/common/contexts/fetcherContexts/FetcherContexts.js.map +1 -0
- package/build/common/contexts/index.js +21 -0
- package/build/common/contexts/index.js.map +1 -0
- package/build/common/contexts/logContext/LogContext.js +28 -0
- package/build/common/contexts/logContext/LogContext.js.map +1 -0
- package/build/common/hooks/index.js +24 -0
- package/build/common/hooks/index.js.map +1 -0
- package/build/common/hooks/useDebouncedFunction/useDebouncedFunction.js +14 -0
- package/build/common/hooks/useDebouncedFunction/useDebouncedFunction.js.map +1 -0
- package/build/common/hooks/useExternal/useExternal.js +20 -0
- package/build/common/hooks/useExternal/useExternal.js.map +1 -0
- package/build/common/hooks/useExternalStepPolling/useExternalStepPolling.js +63 -0
- package/build/common/hooks/useExternalStepPolling/useExternalStepPolling.js.map +1 -0
- package/build/common/hooks/usePersistAsync/usePersistAsync.js +99 -0
- package/build/common/hooks/usePersistAsync/usePersistAsync.js.map +1 -0
- package/build/common/hooks/usePolling/usePolling.js +53 -0
- package/build/common/hooks/usePolling/usePolling.js.map +1 -0
- package/build/common/hooks/usePrevious/usePrevious.js +13 -0
- package/build/common/hooks/usePrevious/usePrevious.js.map +1 -0
- package/build/common/hooks/useStepPolling/useStepPolling.js +50 -0
- package/build/common/hooks/useStepPolling/useStepPolling.js.map +1 -0
- package/build/common/makeFetcher/index.js +18 -0
- package/build/common/makeFetcher/index.js.map +1 -0
- package/build/common/makeFetcher/makeFetcher.js +24 -0
- package/build/common/makeFetcher/makeFetcher.js.map +1 -0
- package/build/common/messages.js +11 -0
- package/build/common/messages.js.map +1 -0
- package/build/common/utils/api-utils.js +20 -0
- package/build/common/utils/api-utils.js.map +1 -0
- package/build/common/utils/date-utils.js +28 -0
- package/build/common/utils/date-utils.js.map +1 -0
- package/build/common/utils/debounce.js +39 -0
- package/build/common/utils/debounce.js.map +1 -0
- package/build/common/utils/file-utils.js +39 -0
- package/build/common/utils/file-utils.js.map +1 -0
- package/build/common/utils/id-utils.js +9 -0
- package/build/common/utils/id-utils.js.map +1 -0
- package/build/common/utils/index.js +25 -0
- package/build/common/utils/index.js.map +1 -0
- package/build/common/utils/is-equal.js +26 -0
- package/build/common/utils/is-equal.js.map +1 -0
- package/build/common/utils/schema-utils.js +56 -0
- package/build/common/utils/schema-utils.js.map +1 -0
- package/build/common/utils/step-utils.js +48 -0
- package/build/common/utils/step-utils.js.map +1 -0
- package/build/common/validators/index.js +29 -0
- package/build/common/validators/index.js.map +1 -0
- package/build/common/validators/models/model-validators.js +70 -0
- package/build/common/validators/models/model-validators.js.map +1 -0
- package/build/common/validators/models/models.utils.js +118 -0
- package/build/common/validators/models/models.utils.js.map +1 -0
- package/build/common/validators/schemas/schema-validators.js +100 -0
- package/build/common/validators/schemas/schema-validators.js.map +1 -0
- package/build/common/validators/types/type-validators.js +22 -0
- package/build/common/validators/types/type-validators.js.map +1 -0
- package/build/common/validators/validationFailures/validation-failures.js +152 -0
- package/build/common/validators/validationFailures/validation-failures.js.map +1 -0
- package/build/common/validators/validationFailures/validation-failures.utils.js +50 -0
- package/build/common/validators/validationFailures/validation-failures.utils.js.map +1 -0
- package/build/common/validators/values/value-validators.js +8 -0
- package/build/common/validators/values/value-validators.js.map +1 -0
- package/build/dynamicFlow/DynamicFlow.js +251 -0
- package/build/dynamicFlow/DynamicFlow.js.map +1 -0
- package/build/dynamicFlow/DynamicFlowStep.js +26 -0
- package/build/dynamicFlow/DynamicFlowStep.js.map +1 -0
- package/build/dynamicFlow/DynamicFlowTypes.js +9 -0
- package/build/dynamicFlow/DynamicFlowTypes.js.map +1 -0
- package/build/dynamicFlow/index.js +9 -0
- package/build/dynamicFlow/index.js.map +1 -0
- package/build/dynamicFlow/stories/DynamicFlow.story.js +37 -0
- package/build/dynamicFlow/stories/DynamicFlow.story.js.map +1 -0
- package/build/dynamicFlow/stories/EditableDynamicFlow.js +55 -0
- package/build/dynamicFlow/stories/EditableDynamicFlow.js.map +1 -0
- package/build/dynamicFlow/stories/fixtureFetcher.js +61 -0
- package/build/dynamicFlow/stories/fixtureFetcher.js.map +1 -0
- package/build/dynamicFlow/utils/errorBoundary/ErrorBoundary.js +30 -0
- package/build/dynamicFlow/utils/errorBoundary/ErrorBoundary.js.map +1 -0
- package/build/dynamicFlow/utils/errorBoundary/ErrorBoundary.messages.js +16 -0
- package/build/dynamicFlow/utils/errorBoundary/ErrorBoundary.messages.js.map +1 -0
- package/build/dynamicFlow/utils/errorBoundary/ErrorBoundaryAlert.js +19 -0
- package/build/dynamicFlow/utils/errorBoundary/ErrorBoundaryAlert.js.map +1 -0
- package/build/dynamicFlow/utils/index.js +27 -0
- package/build/dynamicFlow/utils/index.js.map +1 -0
- package/build/dynamicFlow/utils/responseParsers/response-parsers.js +67 -0
- package/build/dynamicFlow/utils/responseParsers/response-parsers.js.map +1 -0
- package/build/dynamicFlow/utils/useDebouncedRefresh/useDebouncedRefresh.js +28 -0
- package/build/dynamicFlow/utils/useDebouncedRefresh/useDebouncedRefresh.js.map +1 -0
- package/build/dynamicFlow/utils/useDynamicFlowState.js +92 -0
- package/build/dynamicFlow/utils/useDynamicFlowState.js.map +1 -0
- package/build/dynamicFlow/utils/useLoader.js +16 -0
- package/build/dynamicFlow/utils/useLoader.js.map +1 -0
- package/build/fixtures/components/alert.js +34 -0
- package/build/fixtures/components/alert.js.map +1 -0
- package/build/fixtures/components/box.js +23 -0
- package/build/fixtures/components/box.js.map +1 -0
- package/build/fixtures/components/button.js +57 -0
- package/build/fixtures/components/button.js.map +1 -0
- package/build/fixtures/components/columns.js +39 -0
- package/build/fixtures/components/columns.js.map +1 -0
- package/build/fixtures/components/copyable.js +25 -0
- package/build/fixtures/components/copyable.js.map +1 -0
- package/build/fixtures/components/decision.js +57 -0
- package/build/fixtures/components/decision.js.map +1 -0
- package/build/fixtures/components/heading.js +17 -0
- package/build/fixtures/components/heading.js.map +1 -0
- package/build/fixtures/components/image.js +26 -0
- package/build/fixtures/components/image.js.map +1 -0
- package/build/fixtures/components/index.js +33 -0
- package/build/fixtures/components/index.js.map +1 -0
- package/build/fixtures/components/info.js +36 -0
- package/build/fixtures/components/info.js.map +1 -0
- package/build/fixtures/components/list.js +37 -0
- package/build/fixtures/components/list.js.map +1 -0
- package/build/fixtures/components/loading-indicator.js +19 -0
- package/build/fixtures/components/loading-indicator.js.map +1 -0
- package/build/fixtures/components/paragraph.js +31 -0
- package/build/fixtures/components/paragraph.js.map +1 -0
- package/build/fixtures/components/review.js +63 -0
- package/build/fixtures/components/review.js.map +1 -0
- package/build/fixtures/examples/camera-capture.js +124 -0
- package/build/fixtures/examples/camera-capture.js.map +1 -0
- package/build/fixtures/examples/index.js +17 -0
- package/build/fixtures/examples/index.js.map +1 -0
- package/build/fixtures/examples/recipient-update.js +253 -0
- package/build/fixtures/examples/recipient-update.js.map +1 -0
- package/build/fixtures/examples/recipient.js +316 -0
- package/build/fixtures/examples/recipient.js.map +1 -0
- package/build/fixtures/examples/single-file-upload.js +101 -0
- package/build/fixtures/examples/single-file-upload.js.map +1 -0
- package/build/fixtures/examples/step-validation-errors.js +78 -0
- package/build/fixtures/examples/step-validation-errors.js.map +1 -0
- package/build/fixtures/features/action-response.js +32 -0
- package/build/fixtures/features/action-response.js.map +1 -0
- package/build/fixtures/features/external.js +34 -0
- package/build/fixtures/features/external.js.map +1 -0
- package/build/fixtures/features/index.js +17 -0
- package/build/fixtures/features/index.js.map +1 -0
- package/build/fixtures/features/persist-async.js +47 -0
- package/build/fixtures/features/persist-async.js.map +1 -0
- package/build/fixtures/features/polling.js +36 -0
- package/build/fixtures/features/polling.js.map +1 -0
- package/build/fixtures/features/validation-async.js +41 -0
- package/build/fixtures/features/validation-async.js.map +1 -0
- package/build/fixtures/index.js +39 -0
- package/build/fixtures/index.js.map +1 -0
- package/build/fixtures/jsonSchemaForm/allOf.js +122 -0
- package/build/fixtures/jsonSchemaForm/allOf.js.map +1 -0
- package/build/fixtures/jsonSchemaForm/audRecipient.d.ts +3 -0
- package/build/fixtures/jsonSchemaForm/audRecipient.js +1107 -0
- package/build/fixtures/jsonSchemaForm/audRecipient.js.map +1 -0
- package/build/fixtures/jsonSchemaForm/currency.d.ts +3 -0
- package/build/fixtures/jsonSchemaForm/currency.js +51 -0
- package/build/fixtures/jsonSchemaForm/currency.js.map +1 -0
- package/build/fixtures/jsonSchemaForm/multipleFileUploadBase64.d.ts +3 -0
- package/build/fixtures/jsonSchemaForm/multipleFileUploadBase64.js +40 -0
- package/build/fixtures/jsonSchemaForm/multipleFileUploadBase64.js.map +1 -0
- package/build/fixtures/jsonSchemaForm/multipleFileUploadBlob.d.ts +3 -0
- package/build/fixtures/jsonSchemaForm/multipleFileUploadBlob.js +39 -0
- package/build/fixtures/jsonSchemaForm/multipleFileUploadBlob.js.map +1 -0
- package/build/fixtures/jsonSchemaForm/oneOf.d.ts +3 -0
- package/build/fixtures/jsonSchemaForm/oneOf.js +122 -0
- package/build/fixtures/jsonSchemaForm/oneOf.js.map +1 -0
- package/build/fixtures/jsonSchemaForm/oneOfTabs.d.ts +3 -0
- package/build/fixtures/jsonSchemaForm/oneOfTabs.js +56 -0
- package/build/fixtures/jsonSchemaForm/oneOfTabs.js.map +1 -0
- package/build/fixtures/jsonSchemaForm/promotedOneOf.d.ts +3 -0
- package/build/fixtures/jsonSchemaForm/promotedOneOf.js +59 -0
- package/build/fixtures/jsonSchemaForm/promotedOneOf.js.map +1 -0
- package/build/fixtures/jsonSchemaForm/promotedOneOfCheckbox.d.ts +3 -0
- package/build/fixtures/jsonSchemaForm/promotedOneOfCheckbox.js +105 -0
- package/build/fixtures/jsonSchemaForm/promotedOneOfCheckbox.js.map +1 -0
- package/build/fixtures/jsonSchemaForm/simple.d.ts +3 -0
- package/build/fixtures/jsonSchemaForm/simple.js +51 -0
- package/build/fixtures/jsonSchemaForm/simple.js.map +1 -0
- package/build/fixtures/jsonSchemaForm/uploadPersistAsync.d.ts +3 -0
- package/build/fixtures/jsonSchemaForm/uploadPersistAsync.js +74 -0
- package/build/fixtures/jsonSchemaForm/uploadPersistAsync.js.map +1 -0
- package/build/fixtures/jsonSchemaForm/validationAsync.d.ts +3 -0
- package/build/fixtures/jsonSchemaForm/validationAsync.js +26 -0
- package/build/fixtures/jsonSchemaForm/validationAsync.js.map +1 -0
- package/build/fixtures/layouts/all.js +179 -0
- package/build/fixtures/layouts/all.js.map +1 -0
- package/build/fixtures/layouts/final-step-layout.js +42 -0
- package/build/fixtures/layouts/final-step-layout.js.map +1 -0
- package/build/fixtures/layouts/index.js +19 -0
- package/build/fixtures/layouts/index.js.map +1 -0
- package/build/fixtures/layouts/list.js +36 -0
- package/build/fixtures/layouts/list.js.map +1 -0
- package/build/fixtures/layouts/pay-in.js +100 -0
- package/build/fixtures/layouts/pay-in.js.map +1 -0
- package/build/fixtures/layouts/review.js +163 -0
- package/build/fixtures/layouts/review.js.map +1 -0
- package/build/fixtures/layouts/success.js +69 -0
- package/build/fixtures/layouts/success.js.map +1 -0
- package/build/fixtures/responses/action-response-final.js +27 -0
- package/build/fixtures/responses/action-response-final.js.map +1 -0
- package/build/fixtures/responses/action.js +5 -0
- package/build/fixtures/responses/action.js.map +1 -0
- package/build/fixtures/responses/exit.js +5 -0
- package/build/fixtures/responses/exit.js.map +1 -0
- package/build/fixtures/responses/index.js +15 -0
- package/build/fixtures/responses/index.js.map +1 -0
- package/build/fixtures/responses/recipient-update-final.js +27 -0
- package/build/fixtures/responses/recipient-update-final.js.map +1 -0
- package/build/fixtures/schemas/basic-form.js +42 -0
- package/build/fixtures/schemas/basic-form.js.map +1 -0
- package/build/fixtures/schemas/index.js +15 -0
- package/build/fixtures/schemas/index.js.map +1 -0
- package/build/fixtures/schemas/number-and-integer.js +44 -0
- package/build/fixtures/schemas/number-and-integer.js.map +1 -0
- package/build/fixtures/schemas/one-of.js +223 -0
- package/build/fixtures/schemas/one-of.js.map +1 -0
- package/build/fixtures/schemas/string-formats.js +65 -0
- package/build/fixtures/schemas/string-formats.js.map +1 -0
- package/build/fixtures/utils/image-util.js +23 -0
- package/build/fixtures/utils/image-util.js.map +1 -0
- package/build/formControl/FormControl.js +214 -0
- package/build/formControl/FormControl.js.map +1 -0
- package/build/formControl/index.js +9 -0
- package/build/formControl/index.js.map +1 -0
- package/build/formControl/utils/index.js +18 -0
- package/build/formControl/utils/index.js.map +1 -0
- package/build/formControl/utils/value-utils.js +112 -0
- package/build/formControl/utils/value-utils.js.map +1 -0
- package/build/i18n/index.js +37 -0
- package/build/i18n/index.js.map +1 -0
- package/build/index.d.ts +11 -0
- package/build/index.js +39 -0
- package/build/index.js.map +1 -0
- package/build/jsonSchemaForm/JsonSchemaForm.js +23 -0
- package/build/jsonSchemaForm/JsonSchemaForm.js.map +1 -0
- package/build/jsonSchemaForm/allOfSchema/AllOfSchema.js +47 -0
- package/build/jsonSchemaForm/allOfSchema/AllOfSchema.js.map +1 -0
- package/build/jsonSchemaForm/allOfSchema/index.js +9 -0
- package/build/jsonSchemaForm/allOfSchema/index.js.map +1 -0
- package/build/jsonSchemaForm/arrayTypeSchema/ArraySchema.js +20 -0
- package/build/jsonSchemaForm/arrayTypeSchema/ArraySchema.js.map +1 -0
- package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/ArrayListSchema.js +21 -0
- package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/ArrayListSchema.js.map +1 -0
- package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/index.js +9 -0
- package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/index.js.map +1 -0
- package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/MultipleFileUploadSchema.js +87 -0
- package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/MultipleFileUploadSchema.js.map +1 -0
- package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/MultipleFileUploadSchema.messages.js +21 -0
- package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/MultipleFileUploadSchema.messages.js.map +1 -0
- package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/index.js +9 -0
- package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/index.js.map +1 -0
- package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/index.js +19 -0
- package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/index.js.map +1 -0
- package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/upload-utils.js +39 -0
- package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/upload-utils.js.map +1 -0
- package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/useFormattedDefaultErrorMessages.js +21 -0
- package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/useFormattedDefaultErrorMessages.js.map +1 -0
- package/build/jsonSchemaForm/arrayTypeSchema/index.js +9 -0
- package/build/jsonSchemaForm/arrayTypeSchema/index.js.map +1 -0
- package/build/jsonSchemaForm/basicTypeSchema/BasicTypeSchema.js +92 -0
- package/build/jsonSchemaForm/basicTypeSchema/BasicTypeSchema.js.map +1 -0
- package/build/jsonSchemaForm/basicTypeSchema/index.js +9 -0
- package/build/jsonSchemaForm/basicTypeSchema/index.js.map +1 -0
- package/build/jsonSchemaForm/controlFeedback/ControlFeedback.js +74 -0
- package/build/jsonSchemaForm/controlFeedback/ControlFeedback.js.map +1 -0
- package/build/jsonSchemaForm/controlFeedback/ControlFeedback.messages.js +56 -0
- package/build/jsonSchemaForm/controlFeedback/ControlFeedback.messages.js.map +1 -0
- package/build/jsonSchemaForm/controlFeedback/index.js +9 -0
- package/build/jsonSchemaForm/controlFeedback/index.js.map +1 -0
- package/build/jsonSchemaForm/genericSchema/GenericSchema.js +119 -0
- package/build/jsonSchemaForm/genericSchema/GenericSchema.js.map +1 -0
- package/build/jsonSchemaForm/genericSchema/index.js +9 -0
- package/build/jsonSchemaForm/genericSchema/index.js.map +1 -0
- package/build/jsonSchemaForm/help/Help.js +15 -0
- package/build/jsonSchemaForm/help/Help.js.map +1 -0
- package/build/jsonSchemaForm/help/Help.messages.js +11 -0
- package/build/jsonSchemaForm/help/Help.messages.js.map +1 -0
- package/build/jsonSchemaForm/help/index.js +9 -0
- package/build/jsonSchemaForm/help/index.js.map +1 -0
- package/build/jsonSchemaForm/index.js +9 -0
- package/build/jsonSchemaForm/index.js.map +1 -0
- package/build/jsonSchemaForm/objectSchema/ObjectSchema.js +63 -0
- package/build/jsonSchemaForm/objectSchema/ObjectSchema.js.map +1 -0
- package/build/jsonSchemaForm/objectSchema/index.js +9 -0
- package/build/jsonSchemaForm/objectSchema/index.js.map +1 -0
- package/build/jsonSchemaForm/oneOfSchema/OneOfSchema.js +136 -0
- package/build/jsonSchemaForm/oneOfSchema/OneOfSchema.js.map +1 -0
- package/build/jsonSchemaForm/oneOfSchema/index.js +9 -0
- package/build/jsonSchemaForm/oneOfSchema/index.js.map +1 -0
- package/build/jsonSchemaForm/oneOfSchema/utils/const-schema-utils.js +14 -0
- package/build/jsonSchemaForm/oneOfSchema/utils/const-schema-utils.js.map +1 -0
- package/build/jsonSchemaForm/oneOfSchema/utils/index.js +19 -0
- package/build/jsonSchemaForm/oneOfSchema/utils/index.js.map +1 -0
- package/build/jsonSchemaForm/oneOfSchema/utils/one-of-utils.js +70 -0
- package/build/jsonSchemaForm/oneOfSchema/utils/one-of-utils.js.map +1 -0
- package/build/jsonSchemaForm/persistAsyncSchema/PersistAsyncSchema.js +21 -0
- package/build/jsonSchemaForm/persistAsyncSchema/PersistAsyncSchema.js.map +1 -0
- package/build/jsonSchemaForm/persistAsyncSchema/PersistAsyncSchema.messages.js +11 -0
- package/build/jsonSchemaForm/persistAsyncSchema/PersistAsyncSchema.messages.js.map +1 -0
- package/build/jsonSchemaForm/persistAsyncSchema/index.js +9 -0
- package/build/jsonSchemaForm/persistAsyncSchema/index.js.map +1 -0
- package/build/jsonSchemaForm/persistAsyncSchema/persistAsyncBasicSchema/PersistAsyncBasicSchema.js +120 -0
- package/build/jsonSchemaForm/persistAsyncSchema/persistAsyncBasicSchema/PersistAsyncBasicSchema.js.map +1 -0
- package/build/jsonSchemaForm/persistAsyncSchema/persistAsyncBasicSchema/index.js +9 -0
- package/build/jsonSchemaForm/persistAsyncSchema/persistAsyncBasicSchema/index.js.map +1 -0
- package/build/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/PersistAsyncBlobSchema.js +67 -0
- package/build/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/PersistAsyncBlobSchema.js.map +1 -0
- package/build/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/UploadInputAdapter.js +37 -0
- package/build/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/UploadInputAdapter.js.map +1 -0
- package/build/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/index.js +9 -0
- package/build/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/index.js.map +1 -0
- package/build/jsonSchemaForm/promotedOneOfSchema/PromotedOneOfSchema.js +59 -0
- package/build/jsonSchemaForm/promotedOneOfSchema/PromotedOneOfSchema.js.map +1 -0
- package/build/jsonSchemaForm/promotedOneOfSchema/index.js +9 -0
- package/build/jsonSchemaForm/promotedOneOfSchema/index.js.map +1 -0
- package/build/jsonSchemaForm/promotedOneOfSchema/promoted-one-of-utils.js +13 -0
- package/build/jsonSchemaForm/promotedOneOfSchema/promoted-one-of-utils.js.map +1 -0
- package/build/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfCheckboxControl.js +19 -0
- package/build/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfCheckboxControl.js.map +1 -0
- package/build/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfControl.js +26 -0
- package/build/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfControl.js.map +1 -0
- package/build/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfRadioControl.js +24 -0
- package/build/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfRadioControl.js.map +1 -0
- package/build/jsonSchemaForm/readOnlySchema/ReadOnlySchema.js +59 -0
- package/build/jsonSchemaForm/readOnlySchema/ReadOnlySchema.js.map +1 -0
- package/build/jsonSchemaForm/readOnlySchema/ReadOnlySchema.messages.js +16 -0
- package/build/jsonSchemaForm/readOnlySchema/ReadOnlySchema.messages.js.map +1 -0
- package/build/jsonSchemaForm/readOnlySchema/index.js +9 -0
- package/build/jsonSchemaForm/readOnlySchema/index.js.map +1 -0
- package/build/jsonSchemaForm/schemaFormControl/SchemaFormControl.js +99 -0
- package/build/jsonSchemaForm/schemaFormControl/SchemaFormControl.js.map +1 -0
- package/build/jsonSchemaForm/schemaFormControl/index.js +9 -0
- package/build/jsonSchemaForm/schemaFormControl/index.js.map +1 -0
- package/build/jsonSchemaForm/schemaFormControl/utils/currency-utils.js +78 -0
- package/build/jsonSchemaForm/schemaFormControl/utils/currency-utils.js.map +1 -0
- package/build/jsonSchemaForm/schemaFormControl/utils/index.js +18 -0
- package/build/jsonSchemaForm/schemaFormControl/utils/index.js.map +1 -0
- package/build/jsonSchemaForm/schemaFormControl/utils/mapping-utils.js +111 -0
- package/build/jsonSchemaForm/schemaFormControl/utils/mapping-utils.js.map +1 -0
- package/build/jsonSchemaForm/validationAsyncSchema/ValidationAsyncSchema.js +90 -0
- package/build/jsonSchemaForm/validationAsyncSchema/ValidationAsyncSchema.js.map +1 -0
- package/build/jsonSchemaForm/validationAsyncSchema/index.js +9 -0
- package/build/jsonSchemaForm/validationAsyncSchema/index.js.map +1 -0
- package/build/layout/DynamicLayout.js +53 -0
- package/build/layout/DynamicLayout.js.map +1 -0
- package/build/layout/alert/DynamicAlert.js +32 -0
- package/build/layout/alert/DynamicAlert.js.map +1 -0
- package/build/layout/box/DynamicBox.js +33 -0
- package/build/layout/box/DynamicBox.js.map +1 -0
- package/build/layout/button/DynamicButton.js +50 -0
- package/build/layout/button/DynamicButton.js.map +1 -0
- package/build/layout/columns/DynamicColumns.js +30 -0
- package/build/layout/columns/DynamicColumns.js.map +1 -0
- package/build/layout/decision/DynamicDecision.js +30 -0
- package/build/layout/decision/DynamicDecision.js.map +1 -0
- package/build/layout/divider/DynamicDivider.js +11 -0
- package/build/layout/divider/DynamicDivider.js.map +1 -0
- package/build/layout/external/DynamicExternal.js +26 -0
- package/build/layout/external/DynamicExternal.js.map +1 -0
- package/build/layout/external/DynamicExternal.messages.js +11 -0
- package/build/layout/external/DynamicExternal.messages.js.map +1 -0
- package/build/layout/form/DynamicForm.js +17 -0
- package/build/layout/form/DynamicForm.js.map +1 -0
- package/build/layout/heading/DynamicHeading.js +23 -0
- package/build/layout/heading/DynamicHeading.js.map +1 -0
- package/build/layout/icon/DynamicIcon.js +50 -0
- package/build/layout/icon/DynamicIcon.js.map +1 -0
- package/build/layout/image/DynamicImage.js +63 -0
- package/build/layout/image/DynamicImage.js.map +1 -0
- package/build/layout/index.js +41 -0
- package/build/layout/index.js.map +1 -0
- package/build/layout/info/DynamicInfo.js +10 -0
- package/build/layout/info/DynamicInfo.js.map +1 -0
- package/build/layout/list/DynamicList.js +22 -0
- package/build/layout/list/DynamicList.js.map +1 -0
- package/build/layout/loadingIndicator/DynamicLoadingIndicator.js +13 -0
- package/build/layout/loadingIndicator/DynamicLoadingIndicator.js.map +1 -0
- package/build/layout/paragraph/DynamicParagraph.js +31 -0
- package/build/layout/paragraph/DynamicParagraph.js.map +1 -0
- package/build/layout/paragraph/DynamicParagraph.messages.js +16 -0
- package/build/layout/paragraph/DynamicParagraph.messages.js.map +1 -0
- package/build/layout/paragraph/useSnackBarIfAvailable.js +14 -0
- package/build/layout/paragraph/useSnackBarIfAvailable.js.map +1 -0
- package/build/layout/review/DynamicReview.js +24 -0
- package/build/layout/review/DynamicReview.js.map +1 -0
- package/build/layout/utils.js +34 -0
- package/build/layout/utils.js.map +1 -0
- package/build/step/cameraStep/CameraStep.js +85 -0
- package/build/step/cameraStep/CameraStep.js.map +1 -0
- package/build/step/cameraStep/cameraCapture/CameraCapture.js +71 -0
- package/build/step/cameraStep/cameraCapture/CameraCapture.js.map +1 -0
- package/build/step/cameraStep/cameraCapture/CameraCapture.messages.js +21 -0
- package/build/step/cameraStep/cameraCapture/CameraCapture.messages.js.map +1 -0
- package/build/step/cameraStep/cameraCapture/components/index.js +19 -0
- package/build/step/cameraStep/cameraCapture/components/index.js.map +1 -0
- package/build/step/cameraStep/cameraCapture/hooks/index.js +30 -0
- package/build/step/cameraStep/cameraCapture/hooks/index.js.map +1 -0
- package/build/step/cameraStep/cameraCapture/index.js +9 -0
- package/build/step/cameraStep/cameraCapture/index.js.map +1 -0
- package/build/step/cameraStep/cameraCapture/overlay/Overlay.js +69 -0
- package/build/step/cameraStep/cameraCapture/overlay/Overlay.js.map +1 -0
- package/build/step/cameraStep/cameraCapture/screens/CameraNotSupported/CameraNotSupported.js +14 -0
- package/build/step/cameraStep/cameraCapture/screens/CameraNotSupported/CameraNotSupported.js.map +1 -0
- package/build/step/cameraStep/cameraCapture/screens/CameraNotSupported/CameraNotSupported.messages.js +16 -0
- package/build/step/cameraStep/cameraCapture/screens/CameraNotSupported/CameraNotSupported.messages.js.map +1 -0
- package/build/step/cameraStep/cameraCapture/screens/NoCameraAccess/NoCameraAccess.js +15 -0
- package/build/step/cameraStep/cameraCapture/screens/NoCameraAccess/NoCameraAccess.js.map +1 -0
- package/build/step/cameraStep/cameraCapture/screens/NoCameraAccess/NoCameraAccess.messages.js +21 -0
- package/build/step/cameraStep/cameraCapture/screens/NoCameraAccess/NoCameraAccess.messages.js.map +1 -0
- package/build/step/cameraStep/cameraCapture/screens/index.js +11 -0
- package/build/step/cameraStep/cameraCapture/screens/index.js.map +1 -0
- package/build/step/cameraStep/cameraCapture/tracking/index.js +23 -0
- package/build/step/cameraStep/cameraCapture/tracking/index.js.map +1 -0
- package/build/step/cameraStep/cameraCapture/utils/index.js +52 -0
- package/build/step/cameraStep/cameraCapture/utils/index.js.map +1 -0
- package/build/step/cameraStep/index.js +9 -0
- package/build/step/cameraStep/index.js.map +1 -0
- package/build/step/externalConfirmationStep/ExternalConfirmationStep.js +69 -0
- package/build/step/externalConfirmationStep/ExternalConfirmationStep.js.map +1 -0
- package/build/step/externalConfirmationStep/ExternalConfirmationStep.messages.js +26 -0
- package/build/step/externalConfirmationStep/ExternalConfirmationStep.messages.js.map +1 -0
- package/build/step/externalConfirmationStep/index.js +9 -0
- package/build/step/externalConfirmationStep/index.js.map +1 -0
- package/build/step/index.js +13 -0
- package/build/step/index.js.map +1 -0
- package/build/step/layoutStep/LayoutStep.js +36 -0
- package/build/step/layoutStep/LayoutStep.js.map +1 -0
- package/build/step/layoutStep/index.js +9 -0
- package/build/step/layoutStep/index.js.map +1 -0
- package/build/step/layoutStep/utils/index.js +8 -0
- package/build/step/layoutStep/utils/index.js.map +1 -0
- package/build/step/layoutStep/utils/inline-reference-utils.js +79 -0
- package/build/step/layoutStep/utils/inline-reference-utils.js.map +1 -0
- package/build/step/layoutStep/utils/layout-utils.js +204 -0
- package/build/step/layoutStep/utils/layout-utils.js.map +1 -0
- package/build/types/common/FormControl.js +3 -0
- package/build/types/common/FormControl.js.map +1 -0
- package/build/types/index.d.ts +15 -10
- package/build/types/index.js +43 -0
- package/build/types/index.js.map +1 -0
- package/build/types/specification/Action.js +3 -0
- package/build/types/specification/Action.js.map +1 -0
- package/build/types/specification/FileUploadSchema.js +9 -0
- package/build/types/specification/FileUploadSchema.js.map +1 -0
- package/build/types/specification/LayoutComponent.js +3 -0
- package/build/types/specification/LayoutComponent.js.map +1 -0
- package/build/types/specification/Model.js +31 -0
- package/build/types/specification/Model.js.map +1 -0
- package/build/types/specification/PersistAsync.js +3 -0
- package/build/types/specification/PersistAsync.js.map +1 -0
- package/build/types/specification/Polling.js +3 -0
- package/build/types/specification/Polling.js.map +1 -0
- package/build/types/specification/Promotion.js +3 -0
- package/build/types/specification/Promotion.js.map +1 -0
- package/build/types/specification/Schema.js +68 -0
- package/build/types/specification/Schema.js.map +1 -0
- package/build/types/specification/Step.js +7 -0
- package/build/types/specification/Step.js.map +1 -0
- package/build/types/specification/ValidationAsync.js +3 -0
- package/build/types/specification/ValidationAsync.js.map +1 -0
- package/build/types/specification/core.js +3 -0
- package/build/types/specification/core.js.map +1 -0
- package/package.json +24 -26
- package/build/main.cjs.js +0 -6980
- package/build/main.cjs.min.js +0 -10
- package/build/main.esm.js +0 -6993
- package/build/main.esm.min.js +0 -10
- package/build/main.js +0 -6970
- package/build/main.min.js +0 -10
- package/build/types/types/index.d.ts +0 -15
- /package/build/{types/common → common}/constants/DateMode.d.ts +0 -0
- /package/build/{types/common → common}/constants/FormControlType.d.ts +0 -0
- /package/build/{types/common → common}/constants/MonthFormat.d.ts +0 -0
- /package/build/{types/common → common}/constants/SchemaType.d.ts +0 -0
- /package/build/{types/common → common}/constants/Size.d.ts +0 -0
- /package/build/{types/common → common}/constants/index.d.ts +0 -0
- /package/build/{types/common → common}/contexts/dynamicFlowContexts/DynamicFlowContexts.d.ts +0 -0
- /package/build/{types/common → common}/contexts/dynamicFlowContexts/usePendingPromiseCounter.d.ts +0 -0
- /package/build/{types/common → common}/contexts/eventsContext/EventsContext.d.ts +0 -0
- /package/build/{types/common → common}/contexts/fetcherContexts/FetcherContexts.d.ts +0 -0
- /package/build/{types/common → common}/contexts/index.d.ts +0 -0
- /package/build/{types/common → common}/contexts/logContext/LogContext.d.ts +0 -0
- /package/build/{types/common → common}/hooks/index.d.ts +0 -0
- /package/build/{types/common → common}/hooks/useDebouncedFunction/useDebouncedFunction.d.ts +0 -0
- /package/build/{types/common → common}/hooks/useExternal/useExternal.d.ts +0 -0
- /package/build/{types/common → common}/hooks/useExternalStepPolling/useExternalStepPolling.d.ts +0 -0
- /package/build/{types/common → common}/hooks/usePersistAsync/usePersistAsync.d.ts +0 -0
- /package/build/{types/common → common}/hooks/usePolling/usePolling.d.ts +0 -0
- /package/build/{types/common → common}/hooks/usePrevious/usePrevious.d.ts +0 -0
- /package/build/{types/common → common}/hooks/useStepPolling/useStepPolling.d.ts +0 -0
- /package/build/{types/common → common}/makeFetcher/index.d.ts +0 -0
- /package/build/{types/common → common}/makeFetcher/makeFetcher.d.ts +0 -0
- /package/build/{types/common → common}/messages.d.ts +0 -0
- /package/build/{types/common → common}/utils/api-utils.d.ts +0 -0
- /package/build/{types/common → common}/utils/date-utils.d.ts +0 -0
- /package/build/{types/common → common}/utils/debounce.d.ts +0 -0
- /package/build/{types/common → common}/utils/file-utils.d.ts +0 -0
- /package/build/{types/common → common}/utils/id-utils.d.ts +0 -0
- /package/build/{types/common → common}/utils/index.d.ts +0 -0
- /package/build/{types/common → common}/utils/is-equal.d.ts +0 -0
- /package/build/{types/common → common}/utils/schema-utils.d.ts +0 -0
- /package/build/{types/common → common}/utils/step-utils.d.ts +0 -0
- /package/build/{types/common → common}/validators/index.d.ts +0 -0
- /package/build/{types/common → common}/validators/models/model-validators.d.ts +0 -0
- /package/build/{types/common → common}/validators/models/models.utils.d.ts +0 -0
- /package/build/{types/common → common}/validators/schemas/schema-validators.d.ts +0 -0
- /package/build/{types/common → common}/validators/types/type-validators.d.ts +0 -0
- /package/build/{types/common → common}/validators/validationFailures/validation-failures.d.ts +0 -0
- /package/build/{types/common → common}/validators/validationFailures/validation-failures.utils.d.ts +0 -0
- /package/build/{types/common → common}/validators/values/value-validators.d.ts +0 -0
- /package/build/{types/dynamicFlow → dynamicFlow}/DynamicFlow.d.ts +0 -0
- /package/build/{types/dynamicFlow → dynamicFlow}/DynamicFlowStep.d.ts +0 -0
- /package/build/{types/dynamicFlow → dynamicFlow}/DynamicFlowTypes.d.ts +0 -0
- /package/build/{types/dynamicFlow → dynamicFlow}/index.d.ts +0 -0
- /package/build/{types/dynamicFlow → dynamicFlow}/stories/DynamicFlow.story.d.ts +0 -0
- /package/build/{types/dynamicFlow → dynamicFlow}/stories/EditableDynamicFlow.d.ts +0 -0
- /package/build/{types/dynamicFlow → dynamicFlow}/stories/fixtureFetcher.d.ts +0 -0
- /package/build/{types/dynamicFlow → dynamicFlow}/utils/errorBoundary/ErrorBoundary.d.ts +0 -0
- /package/build/{types/dynamicFlow → dynamicFlow}/utils/errorBoundary/ErrorBoundary.messages.d.ts +0 -0
- /package/build/{types/dynamicFlow → dynamicFlow}/utils/errorBoundary/ErrorBoundaryAlert.d.ts +0 -0
- /package/build/{types/dynamicFlow → dynamicFlow}/utils/index.d.ts +0 -0
- /package/build/{types/dynamicFlow → dynamicFlow}/utils/responseParsers/response-parsers.d.ts +0 -0
- /package/build/{types/dynamicFlow → dynamicFlow}/utils/useDebouncedRefresh/useDebouncedRefresh.d.ts +0 -0
- /package/build/{types/dynamicFlow → dynamicFlow}/utils/useDynamicFlowState.d.ts +0 -0
- /package/build/{types/dynamicFlow → dynamicFlow}/utils/useLoader.d.ts +0 -0
- /package/build/{types/fixtures → fixtures}/components/alert.d.ts +0 -0
- /package/build/{types/fixtures → fixtures}/components/box.d.ts +0 -0
- /package/build/{types/fixtures → fixtures}/components/button.d.ts +0 -0
- /package/build/{types/fixtures → fixtures}/components/columns.d.ts +0 -0
- /package/build/{types/fixtures → fixtures}/components/copyable.d.ts +0 -0
- /package/build/{types/fixtures → fixtures}/components/decision.d.ts +0 -0
- /package/build/{types/fixtures → fixtures}/components/heading.d.ts +0 -0
- /package/build/{types/fixtures → fixtures}/components/image.d.ts +0 -0
- /package/build/{types/fixtures → fixtures}/components/index.d.ts +0 -0
- /package/build/{types/fixtures → fixtures}/components/info.d.ts +0 -0
- /package/build/{types/fixtures → fixtures}/components/list.d.ts +0 -0
- /package/build/{types/fixtures → fixtures}/components/loading-indicator.d.ts +0 -0
- /package/build/{types/fixtures → fixtures}/components/paragraph.d.ts +0 -0
- /package/build/{types/fixtures → fixtures}/components/review.d.ts +0 -0
- /package/build/{types/fixtures → fixtures}/examples/camera-capture.d.ts +0 -0
- /package/build/{types/fixtures → fixtures}/examples/index.d.ts +0 -0
- /package/build/{types/fixtures → fixtures}/examples/recipient-update.d.ts +0 -0
- /package/build/{types/fixtures → fixtures}/examples/recipient.d.ts +0 -0
- /package/build/{types/fixtures → fixtures}/examples/single-file-upload.d.ts +0 -0
- /package/build/{types/fixtures → fixtures}/examples/step-validation-errors.d.ts +0 -0
- /package/build/{types/fixtures → fixtures}/features/action-response.d.ts +0 -0
- /package/build/{types/fixtures → fixtures}/features/external.d.ts +0 -0
- /package/build/{types/fixtures → fixtures}/features/index.d.ts +0 -0
- /package/build/{types/fixtures → fixtures}/features/persist-async.d.ts +0 -0
- /package/build/{types/fixtures → fixtures}/features/polling.d.ts +0 -0
- /package/build/{types/fixtures → fixtures}/features/validation-async.d.ts +0 -0
- /package/build/{types/fixtures → fixtures}/index.d.ts +0 -0
- /package/build/{types/fixtures → fixtures}/jsonSchemaForm/allOf.d.ts +0 -0
- /package/build/{types/fixtures → fixtures}/layouts/all.d.ts +0 -0
- /package/build/{types/fixtures → fixtures}/layouts/final-step-layout.d.ts +0 -0
- /package/build/{types/fixtures → fixtures}/layouts/index.d.ts +0 -0
- /package/build/{types/fixtures → fixtures}/layouts/list.d.ts +0 -0
- /package/build/{types/fixtures → fixtures}/layouts/pay-in.d.ts +0 -0
- /package/build/{types/fixtures → fixtures}/layouts/review.d.ts +0 -0
- /package/build/{types/fixtures → fixtures}/layouts/success.d.ts +0 -0
- /package/build/{types/fixtures → fixtures}/responses/action-response-final.d.ts +0 -0
- /package/build/{types/fixtures → fixtures}/responses/action.d.ts +0 -0
- /package/build/{types/fixtures → fixtures}/responses/exit.d.ts +0 -0
- /package/build/{types/fixtures → fixtures}/responses/index.d.ts +0 -0
- /package/build/{types/fixtures → fixtures}/responses/recipient-update-final.d.ts +0 -0
- /package/build/{types/fixtures → fixtures}/schemas/basic-form.d.ts +0 -0
- /package/build/{types/fixtures → fixtures}/schemas/index.d.ts +0 -0
- /package/build/{types/fixtures → fixtures}/schemas/number-and-integer.d.ts +0 -0
- /package/build/{types/fixtures → fixtures}/schemas/one-of.d.ts +0 -0
- /package/build/{types/fixtures → fixtures}/schemas/string-formats.d.ts +0 -0
- /package/build/{types/fixtures → fixtures}/utils/image-util.d.ts +0 -0
- /package/build/{types/formControl → formControl}/FormControl.d.ts +0 -0
- /package/build/{types/formControl → formControl}/index.d.ts +0 -0
- /package/build/{types/formControl → formControl}/utils/index.d.ts +0 -0
- /package/build/{types/formControl → formControl}/utils/value-utils.d.ts +0 -0
- /package/build/{types/i18n → i18n}/index.d.ts +0 -0
- /package/build/{types/jsonSchemaForm → jsonSchemaForm}/JsonSchemaForm.d.ts +0 -0
- /package/build/{types/jsonSchemaForm → jsonSchemaForm}/allOfSchema/AllOfSchema.d.ts +0 -0
- /package/build/{types/jsonSchemaForm → jsonSchemaForm}/allOfSchema/index.d.ts +0 -0
- /package/build/{types/jsonSchemaForm → jsonSchemaForm}/arrayTypeSchema/ArraySchema.d.ts +0 -0
- /package/build/{types/jsonSchemaForm → jsonSchemaForm}/arrayTypeSchema/arrayListSchema/ArrayListSchema.d.ts +0 -0
- /package/build/{types/jsonSchemaForm → jsonSchemaForm}/arrayTypeSchema/arrayListSchema/index.d.ts +0 -0
- /package/build/{types/jsonSchemaForm → jsonSchemaForm}/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/MultipleFileUploadSchema.d.ts +0 -0
- /package/build/{types/jsonSchemaForm → jsonSchemaForm}/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/MultipleFileUploadSchema.messages.d.ts +0 -0
- /package/build/{types/jsonSchemaForm → jsonSchemaForm}/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/index.d.ts +0 -0
- /package/build/{types/jsonSchemaForm → jsonSchemaForm}/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/index.d.ts +0 -0
- /package/build/{types/jsonSchemaForm → jsonSchemaForm}/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/upload-utils.d.ts +0 -0
- /package/build/{types/jsonSchemaForm → jsonSchemaForm}/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/useFormattedDefaultErrorMessages.d.ts +0 -0
- /package/build/{types/jsonSchemaForm → jsonSchemaForm}/arrayTypeSchema/index.d.ts +0 -0
- /package/build/{types/jsonSchemaForm → jsonSchemaForm}/basicTypeSchema/BasicTypeSchema.d.ts +0 -0
- /package/build/{types/jsonSchemaForm → jsonSchemaForm}/basicTypeSchema/index.d.ts +0 -0
- /package/build/{types/jsonSchemaForm → jsonSchemaForm}/controlFeedback/ControlFeedback.d.ts +0 -0
- /package/build/{types/jsonSchemaForm → jsonSchemaForm}/controlFeedback/ControlFeedback.messages.d.ts +0 -0
- /package/build/{types/jsonSchemaForm → jsonSchemaForm}/controlFeedback/index.d.ts +0 -0
- /package/build/{types/jsonSchemaForm → jsonSchemaForm}/genericSchema/GenericSchema.d.ts +0 -0
- /package/build/{types/jsonSchemaForm → jsonSchemaForm}/genericSchema/index.d.ts +0 -0
- /package/build/{types/jsonSchemaForm → jsonSchemaForm}/help/Help.d.ts +0 -0
- /package/build/{types/jsonSchemaForm → jsonSchemaForm}/help/Help.messages.d.ts +0 -0
- /package/build/{types/jsonSchemaForm → jsonSchemaForm}/help/index.d.ts +0 -0
- /package/build/{types/jsonSchemaForm → jsonSchemaForm}/index.d.ts +0 -0
- /package/build/{types/jsonSchemaForm → jsonSchemaForm}/objectSchema/ObjectSchema.d.ts +0 -0
- /package/build/{types/jsonSchemaForm → jsonSchemaForm}/objectSchema/index.d.ts +0 -0
- /package/build/{types/jsonSchemaForm → jsonSchemaForm}/oneOfSchema/OneOfSchema.d.ts +0 -0
- /package/build/{types/jsonSchemaForm → jsonSchemaForm}/oneOfSchema/index.d.ts +0 -0
- /package/build/{types/jsonSchemaForm → jsonSchemaForm}/oneOfSchema/utils/const-schema-utils.d.ts +0 -0
- /package/build/{types/jsonSchemaForm → jsonSchemaForm}/oneOfSchema/utils/index.d.ts +0 -0
- /package/build/{types/jsonSchemaForm → jsonSchemaForm}/oneOfSchema/utils/one-of-utils.d.ts +0 -0
- /package/build/{types/jsonSchemaForm → jsonSchemaForm}/persistAsyncSchema/PersistAsyncSchema.d.ts +0 -0
- /package/build/{types/jsonSchemaForm → jsonSchemaForm}/persistAsyncSchema/PersistAsyncSchema.messages.d.ts +0 -0
- /package/build/{types/jsonSchemaForm → jsonSchemaForm}/persistAsyncSchema/index.d.ts +0 -0
- /package/build/{types/jsonSchemaForm → jsonSchemaForm}/persistAsyncSchema/persistAsyncBasicSchema/PersistAsyncBasicSchema.d.ts +0 -0
- /package/build/{types/jsonSchemaForm → jsonSchemaForm}/persistAsyncSchema/persistAsyncBasicSchema/index.d.ts +0 -0
- /package/build/{types/jsonSchemaForm → jsonSchemaForm}/persistAsyncSchema/persistAsyncBlobSchema/PersistAsyncBlobSchema.d.ts +0 -0
- /package/build/{types/jsonSchemaForm → jsonSchemaForm}/persistAsyncSchema/persistAsyncBlobSchema/UploadInputAdapter.d.ts +0 -0
- /package/build/{types/jsonSchemaForm → jsonSchemaForm}/persistAsyncSchema/persistAsyncBlobSchema/index.d.ts +0 -0
- /package/build/{types/jsonSchemaForm → jsonSchemaForm}/promotedOneOfSchema/PromotedOneOfSchema.d.ts +0 -0
- /package/build/{types/jsonSchemaForm → jsonSchemaForm}/promotedOneOfSchema/index.d.ts +0 -0
- /package/build/{types/jsonSchemaForm → jsonSchemaForm}/promotedOneOfSchema/promoted-one-of-utils.d.ts +0 -0
- /package/build/{types/jsonSchemaForm → jsonSchemaForm}/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfCheckboxControl.d.ts +0 -0
- /package/build/{types/jsonSchemaForm → jsonSchemaForm}/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfControl.d.ts +0 -0
- /package/build/{types/jsonSchemaForm → jsonSchemaForm}/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfRadioControl.d.ts +0 -0
- /package/build/{types/jsonSchemaForm → jsonSchemaForm}/readOnlySchema/ReadOnlySchema.d.ts +0 -0
- /package/build/{types/jsonSchemaForm → jsonSchemaForm}/readOnlySchema/ReadOnlySchema.messages.d.ts +0 -0
- /package/build/{types/jsonSchemaForm → jsonSchemaForm}/readOnlySchema/index.d.ts +0 -0
- /package/build/{types/jsonSchemaForm → jsonSchemaForm}/schemaFormControl/SchemaFormControl.d.ts +0 -0
- /package/build/{types/jsonSchemaForm → jsonSchemaForm}/schemaFormControl/index.d.ts +0 -0
- /package/build/{types/jsonSchemaForm → jsonSchemaForm}/schemaFormControl/utils/currency-utils.d.ts +0 -0
- /package/build/{types/jsonSchemaForm → jsonSchemaForm}/schemaFormControl/utils/index.d.ts +0 -0
- /package/build/{types/jsonSchemaForm → jsonSchemaForm}/schemaFormControl/utils/mapping-utils.d.ts +0 -0
- /package/build/{types/jsonSchemaForm → jsonSchemaForm}/validationAsyncSchema/ValidationAsyncSchema.d.ts +0 -0
- /package/build/{types/jsonSchemaForm → jsonSchemaForm}/validationAsyncSchema/index.d.ts +0 -0
- /package/build/{types/layout → layout}/DynamicLayout.d.ts +0 -0
- /package/build/{types/layout → layout}/alert/DynamicAlert.d.ts +0 -0
- /package/build/{types/layout → layout}/box/DynamicBox.d.ts +0 -0
- /package/build/{types/layout → layout}/button/DynamicButton.d.ts +0 -0
- /package/build/{types/layout → layout}/columns/DynamicColumns.d.ts +0 -0
- /package/build/{types/layout → layout}/decision/DynamicDecision.d.ts +0 -0
- /package/build/{types/layout → layout}/divider/DynamicDivider.d.ts +0 -0
- /package/build/{types/layout → layout}/external/DynamicExternal.d.ts +0 -0
- /package/build/{types/layout → layout}/external/DynamicExternal.messages.d.ts +0 -0
- /package/build/{types/layout → layout}/form/DynamicForm.d.ts +0 -0
- /package/build/{types/layout → layout}/heading/DynamicHeading.d.ts +0 -0
- /package/build/{types/layout → layout}/icon/DynamicIcon.d.ts +0 -0
- /package/build/{types/layout → layout}/image/DynamicImage.d.ts +0 -0
- /package/build/{types/layout → layout}/index.d.ts +0 -0
- /package/build/{types/layout → layout}/info/DynamicInfo.d.ts +0 -0
- /package/build/{types/layout → layout}/list/DynamicList.d.ts +0 -0
- /package/build/{types/layout → layout}/loadingIndicator/DynamicLoadingIndicator.d.ts +0 -0
- /package/build/{types/layout → layout}/paragraph/DynamicParagraph.d.ts +0 -0
- /package/build/{types/layout → layout}/paragraph/DynamicParagraph.messages.d.ts +0 -0
- /package/build/{types/layout → layout}/paragraph/useSnackBarIfAvailable.d.ts +0 -0
- /package/build/{types/layout → layout}/review/DynamicReview.d.ts +0 -0
- /package/build/{types/layout → layout}/utils.d.ts +0 -0
- /package/build/{types/step → step}/cameraStep/CameraStep.d.ts +0 -0
- /package/build/{types/step → step}/cameraStep/cameraCapture/CameraCapture.d.ts +0 -0
- /package/build/{types/step → step}/cameraStep/cameraCapture/CameraCapture.messages.d.ts +0 -0
- /package/build/{types/step → step}/cameraStep/cameraCapture/components/index.d.ts +0 -0
- /package/build/{types/step → step}/cameraStep/cameraCapture/hooks/index.d.ts +0 -0
- /package/build/{types/step → step}/cameraStep/cameraCapture/index.d.ts +0 -0
- /package/build/{types/step → step}/cameraStep/cameraCapture/overlay/Overlay.d.ts +0 -0
- /package/build/{types/step → step}/cameraStep/cameraCapture/screens/CameraNotSupported/CameraNotSupported.d.ts +0 -0
- /package/build/{types/step → step}/cameraStep/cameraCapture/screens/CameraNotSupported/CameraNotSupported.messages.d.ts +0 -0
- /package/build/{types/step → step}/cameraStep/cameraCapture/screens/NoCameraAccess/NoCameraAccess.d.ts +0 -0
- /package/build/{types/step → step}/cameraStep/cameraCapture/screens/NoCameraAccess/NoCameraAccess.messages.d.ts +0 -0
- /package/build/{types/step → step}/cameraStep/cameraCapture/screens/index.d.ts +0 -0
- /package/build/{types/step → step}/cameraStep/cameraCapture/tracking/index.d.ts +0 -0
- /package/build/{types/step → step}/cameraStep/cameraCapture/utils/index.d.ts +0 -0
- /package/build/{types/step → step}/cameraStep/index.d.ts +0 -0
- /package/build/{types/step → step}/externalConfirmationStep/ExternalConfirmationStep.d.ts +0 -0
- /package/build/{types/step → step}/externalConfirmationStep/ExternalConfirmationStep.messages.d.ts +0 -0
- /package/build/{types/step → step}/externalConfirmationStep/index.d.ts +0 -0
- /package/build/{types/step → step}/index.d.ts +0 -0
- /package/build/{types/step → step}/layoutStep/LayoutStep.d.ts +0 -0
- /package/build/{types/step → step}/layoutStep/index.d.ts +0 -0
- /package/build/{types/step → step}/layoutStep/utils/index.d.ts +0 -0
- /package/build/{types/step → step}/layoutStep/utils/inline-reference-utils.d.ts +0 -0
- /package/build/{types/step → step}/layoutStep/utils/layout-utils.d.ts +0 -0
- /package/build/types/{types/common → common}/FormControl.d.ts +0 -0
- /package/build/types/{types/specification → specification}/Action.d.ts +0 -0
- /package/build/types/{types/specification → specification}/FileUploadSchema.d.ts +0 -0
- /package/build/types/{types/specification → specification}/LayoutComponent.d.ts +0 -0
- /package/build/types/{types/specification → specification}/Model.d.ts +0 -0
- /package/build/types/{types/specification → specification}/PersistAsync.d.ts +0 -0
- /package/build/types/{types/specification → specification}/Polling.d.ts +0 -0
- /package/build/types/{types/specification → specification}/Promotion.d.ts +0 -0
- /package/build/types/{types/specification → specification}/Schema.d.ts +0 -0
- /package/build/types/{types/specification → specification}/Step.d.ts +0 -0
- /package/build/types/{types/specification → specification}/ValidationAsync.d.ts +0 -0
- /package/build/types/{types/specification → specification}/core.d.ts +0 -0
package/README.md
CHANGED
|
@@ -19,15 +19,6 @@ npm install @wise/dynamic-flow-client
|
|
|
19
19
|
pnpm install @wise/dynamic-flow-client
|
|
20
20
|
```
|
|
21
21
|
|
|
22
|
-
**Note:** Dynamic flow is exported in three formats, minified and unminified. Most bundlers will understand the formats declared in `package.json`, but should you need to, you can find each format in the `build` folder:
|
|
23
|
-
|
|
24
|
-
| Format | Minified | Unminified |
|
|
25
|
-
| ------------ | ----------------- | ------------- |
|
|
26
|
-
| Browser | `main.min.js` | `main.js` |
|
|
27
|
-
| Common JS | `main.cjs.min.js` | `main.cjs.js` |
|
|
28
|
-
| ESM | `main.esm.min.js` | `main.esm.js` |
|
|
29
|
-
|
|
30
|
-
|
|
31
22
|
2. Install required peer dependencies (if not already installed). Please refer to setup instructions for `@transferwise/components` and `@transferwise/neptune-css` if installing up for the first time.
|
|
32
23
|
|
|
33
24
|
```
|
|
@@ -45,8 +36,6 @@ pnpm install @transferwise/components @transferwise/formatting @transferwise/ico
|
|
|
45
36
|
```
|
|
46
37
|
**Note:** Keep in mind that some of these dependencies have their own peer dependencies. Don't forget to install those, for instance: `@transferwise/components` needs `@wise/art` and `@wise/components-theming`.
|
|
47
38
|
|
|
48
|
-
3. Import the required CSS, and wrap the DynamicFlow component in the required design system providers.
|
|
49
|
-
|
|
50
39
|
```js
|
|
51
40
|
// Should be imported once in your application
|
|
52
41
|
import '@wise/dynamic-flow-client/build/main.css';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DateMode.js","sourceRoot":"","sources":["../../../src/common/constants/DateMode.ts"],"names":[],"mappings":";;;AAAa,QAAA,QAAQ,GAAG;IACtB,cAAc,EAAE,gBAAgB;IAChC,UAAU,EAAE,YAAY;CACzB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FormControlType = void 0;
|
|
4
|
+
exports.FormControlType = {
|
|
5
|
+
RADIO: 'radio',
|
|
6
|
+
CHECKBOX: 'checkbox',
|
|
7
|
+
SELECT: 'select',
|
|
8
|
+
FILE: 'file',
|
|
9
|
+
DATE: 'date',
|
|
10
|
+
DATETIME: 'date-time',
|
|
11
|
+
DATELOOKUP: 'date-lookup',
|
|
12
|
+
TEL: 'tel',
|
|
13
|
+
NUMBER: 'number',
|
|
14
|
+
HIDDEN: 'hidden',
|
|
15
|
+
PASSWORD: 'password',
|
|
16
|
+
TEXT: 'text',
|
|
17
|
+
TEXTAREA: 'textarea',
|
|
18
|
+
UPLOAD: 'upload',
|
|
19
|
+
TAB: 'tab',
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=FormControlType.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormControlType.js","sourceRoot":"","sources":["../../../src/common/constants/FormControlType.ts"],"names":[],"mappings":";;;AAAa,QAAA,eAAe,GAAG;IAC7B,KAAK,EAAE,OAAO;IACd,QAAQ,EAAE,UAAU;IACpB,MAAM,EAAE,QAAQ;IAChB,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,QAAQ,EAAE,WAAW;IACrB,UAAU,EAAE,aAAa;IACzB,GAAG,EAAE,KAAK;IACV,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,QAAQ;IAChB,QAAQ,EAAE,UAAU;IACpB,IAAI,EAAE,MAAM;IACZ,QAAQ,EAAE,UAAU;IACpB,MAAM,EAAE,QAAQ;IAChB,GAAG,EAAE,KAAK;CACX,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MonthFormat.js","sourceRoot":"","sources":["../../../src/common/constants/MonthFormat.ts"],"names":[],"mappings":";;;AAAa,QAAA,WAAW,GAAG;IACzB,KAAK,EAAE,OAAO;IACd,IAAI,EAAE,MAAM;CACb,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SchemaType = void 0;
|
|
4
|
+
exports.SchemaType = {
|
|
5
|
+
READ_ONLY: 'readOnly',
|
|
6
|
+
PERSIST_ASYNC: 'persistAsync',
|
|
7
|
+
VALIDATION_ASYNC: 'validationAsync',
|
|
8
|
+
OBJECT: 'object',
|
|
9
|
+
PROMOTED_ONE_OF: 'promotedOneOf',
|
|
10
|
+
ONE_OF: 'oneOf',
|
|
11
|
+
ALL_OF: 'allOf',
|
|
12
|
+
BASIC: 'basic',
|
|
13
|
+
ARRAY: 'array',
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=SchemaType.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SchemaType.js","sourceRoot":"","sources":["../../../src/common/constants/SchemaType.ts"],"names":[],"mappings":";;;AAAa,QAAA,UAAU,GAAG;IACxB,SAAS,EAAE,UAAU;IACrB,aAAa,EAAE,cAAc;IAC7B,gBAAgB,EAAE,iBAAiB;IACnC,MAAM,EAAE,QAAQ;IAChB,eAAe,EAAE,eAAe;IAChC,MAAM,EAAE,OAAO;IACf,MAAM,EAAE,OAAO;IACf,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,OAAO;CACf,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Size.js","sourceRoot":"","sources":["../../../src/common/constants/Size.ts"],"names":[],"mappings":";;;AAAa,QAAA,IAAI,GAAG;IAClB,WAAW,EAAE,IAAI;IACjB,KAAK,EAAE,IAAI;IACX,MAAM,EAAE,IAAI;IACZ,KAAK,EAAE,IAAI;IACX,WAAW,EAAE,IAAI;CAClB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./DateMode"), exports);
|
|
18
|
+
__exportStar(require("./FormControlType"), exports);
|
|
19
|
+
__exportStar(require("./MonthFormat"), exports);
|
|
20
|
+
__exportStar(require("./SchemaType"), exports);
|
|
21
|
+
__exportStar(require("./Size"), exports);
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/common/constants/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,oDAAkC;AAClC,gDAA8B;AAC9B,+CAA6B;AAC7B,yCAAuB"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useDynamicFlow = exports.DynamicFlowProvider = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const usePendingPromiseCounter_1 = require("./usePendingPromiseCounter");
|
|
7
|
+
const defaultContextValue = {
|
|
8
|
+
loading: false,
|
|
9
|
+
registerPersistAsyncPromise: (promise) => {
|
|
10
|
+
//
|
|
11
|
+
},
|
|
12
|
+
};
|
|
13
|
+
const DFContext = (0, react_1.createContext)(defaultContextValue);
|
|
14
|
+
const DynamicFlowProvider = ({ loading, children }) => {
|
|
15
|
+
const { pendingPromises, addPendingPromise } = (0, usePendingPromiseCounter_1.usePendingPromiseCounter)();
|
|
16
|
+
const providerValue = (0, react_1.useMemo)(() => {
|
|
17
|
+
return {
|
|
18
|
+
loading: loading || pendingPromises > 0,
|
|
19
|
+
registerPersistAsyncPromise: addPendingPromise,
|
|
20
|
+
};
|
|
21
|
+
}, [loading, pendingPromises, addPendingPromise]);
|
|
22
|
+
return (0, jsx_runtime_1.jsx)(DFContext.Provider, Object.assign({ value: providerValue }, { children: children }));
|
|
23
|
+
};
|
|
24
|
+
exports.DynamicFlowProvider = DynamicFlowProvider;
|
|
25
|
+
const useDynamicFlow = () => {
|
|
26
|
+
const context = (0, react_1.useContext)(DFContext);
|
|
27
|
+
return context || defaultContextValue;
|
|
28
|
+
};
|
|
29
|
+
exports.useDynamicFlow = useDynamicFlow;
|
|
30
|
+
//# sourceMappingURL=DynamicFlowContexts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DynamicFlowContexts.js","sourceRoot":"","sources":["../../../../src/common/contexts/dynamicFlowContexts/DynamicFlowContexts.tsx"],"names":[],"mappings":";;;;AAAA,iCAA2D;AAE3D,yEAAsE;AAEtE,MAAM,mBAAmB,GAAG;IAC1B,OAAO,EAAE,KAAK;IACd,2BAA2B,EAAE,CAAC,OAAyB,EAAE,EAAE;QACzD,EAAE;IACJ,CAAC;CACF,CAAC;AAEF,MAAM,SAAS,GAAG,IAAA,qBAAa,EAAC,mBAAmB,CAAC,CAAC;AAG9C,MAAM,mBAAmB,GAAG,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAS,EAAE,EAAE;IAClE,MAAM,EAAE,eAAe,EAAE,iBAAiB,EAAE,GAAG,IAAA,mDAAwB,GAAE,CAAC;IAE1E,MAAM,aAAa,GAAG,IAAA,eAAO,EAAC,GAAG,EAAE;QACjC,OAAO;YACL,OAAO,EAAE,OAAO,IAAI,eAAe,GAAG,CAAC;YACvC,2BAA2B,EAAE,iBAAiB;SAC/C,CAAC;IACJ,CAAC,EAAE,CAAC,OAAO,EAAE,eAAe,EAAE,iBAAiB,CAAC,CAAC,CAAC;IAElD,OAAO,uBAAC,SAAS,CAAC,QAAQ,kBAAC,KAAK,EAAE,aAAa,gBAAG,QAAQ,IAAsB,CAAC;AACnF,CAAC,CAAC;AAXW,QAAA,mBAAmB,uBAW9B;AAEK,MAAM,cAAc,GAAG,GAAG,EAAE;IACjC,MAAM,OAAO,GAAG,IAAA,kBAAU,EAAC,SAAS,CAAC,CAAC;IACtC,OAAO,OAAO,IAAI,mBAAmB,CAAC;AACxC,CAAC,CAAC;AAHW,QAAA,cAAc,kBAGzB"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.usePendingPromiseCounter = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
function usePendingPromiseCounter() {
|
|
6
|
+
const [count, setCount] = (0, react_1.useState)(0);
|
|
7
|
+
const addPendingPromise = (0, react_1.useCallback)((promise) => {
|
|
8
|
+
setCount((c) => c + 1);
|
|
9
|
+
promise
|
|
10
|
+
.catch(noop)
|
|
11
|
+
.finally(() => delayUntilNextCycle(() => setCount((c) => Math.max(0, c - 1))));
|
|
12
|
+
}, [setCount]);
|
|
13
|
+
return { addPendingPromise, pendingPromises: count };
|
|
14
|
+
}
|
|
15
|
+
exports.usePendingPromiseCounter = usePendingPromiseCounter;
|
|
16
|
+
const delayUntilNextCycle = (fn) => setTimeout(() => fn(), 0);
|
|
17
|
+
const noop = () => {
|
|
18
|
+
// no-op
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=usePendingPromiseCounter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePendingPromiseCounter.js","sourceRoot":"","sources":["../../../../src/common/contexts/dynamicFlowContexts/usePendingPromiseCounter.ts"],"names":[],"mappings":";;;AAAA,iCAA8C;AAE9C,SAAgB,wBAAwB;IACtC,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,IAAA,gBAAQ,EAAS,CAAC,CAAC,CAAC;IAE9C,MAAM,iBAAiB,GAAG,IAAA,mBAAW,EACnC,CAAC,OAAyB,EAAE,EAAE;QAC5B,QAAQ,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;QACvB,OAAO;aACJ,KAAK,CAAC,IAAI,CAAC;aACX,OAAO,CAAC,GAAG,EAAE,CAAC,mBAAmB,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACnF,CAAC,EACD,CAAC,QAAQ,CAAC,CACX,CAAC;IAEF,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,KAAK,EAAE,CAAC;AACvD,CAAC;AAdD,4DAcC;AACD,MAAM,mBAAmB,GAAG,CAAC,EAAc,EAAE,EAAE,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;AAE1E,MAAM,IAAI,GAAG,GAAG,EAAE;IAChB,QAAQ;AACV,CAAC,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getEventDispatcher = exports.useEventDispatcher = exports.EventsContextProvider = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const EventsContext = (0, react_1.createContext)({
|
|
7
|
+
triggerEvent: () => {
|
|
8
|
+
// noop
|
|
9
|
+
},
|
|
10
|
+
});
|
|
11
|
+
const EventsContextProvider = ({ metadata, children, onEvent }) => {
|
|
12
|
+
const value = (0, react_1.useMemo)(() => ({ triggerEvent: (0, exports.getEventDispatcher)(onEvent, metadata) }), [onEvent, metadata]);
|
|
13
|
+
return (0, jsx_runtime_1.jsx)(EventsContext.Provider, Object.assign({ value: value }, { children: children }));
|
|
14
|
+
};
|
|
15
|
+
exports.EventsContextProvider = EventsContextProvider;
|
|
16
|
+
function useEventDispatcher() {
|
|
17
|
+
const { triggerEvent } = (0, react_1.useContext)(EventsContext);
|
|
18
|
+
return triggerEvent;
|
|
19
|
+
}
|
|
20
|
+
exports.useEventDispatcher = useEventDispatcher;
|
|
21
|
+
const getEventDispatcher = (onEvent, metadata) => (eventName, properties = {}) => onEvent(eventName, Object.assign(Object.assign({}, metadata), properties));
|
|
22
|
+
exports.getEventDispatcher = getEventDispatcher;
|
|
23
|
+
//# sourceMappingURL=EventsContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EventsContext.js","sourceRoot":"","sources":["../../../../src/common/contexts/eventsContext/EventsContext.tsx"],"names":[],"mappings":";;;;AAAA,iCAAkE;AAqBlE,MAAM,aAAa,GAAG,IAAA,qBAAa,EAAiC;IAClE,YAAY,EAAE,GAAG,EAAE;QACjB,OAAO;IACT,CAAC;CACF,CAAC,CAAC;AAWI,MAAM,qBAAqB,GAAG,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAS,EAAE,EAAE;IAC9E,MAAM,KAAK,GAAG,IAAA,eAAO,EACnB,GAAG,EAAE,CAAC,CAAC,EAAE,YAAY,EAAE,IAAA,0BAAkB,EAAC,OAAO,EAAE,QAAQ,CAAC,EAAE,CAAC,EAC/D,CAAC,OAAO,EAAE,QAAQ,CAAC,CACpB,CAAC;IAEF,OAAO,uBAAC,aAAa,CAAC,QAAQ,kBAAC,KAAK,EAAE,KAAK,gBAAG,QAAQ,IAA0B,CAAC;AACnF,CAAC,CAAC;AAPW,QAAA,qBAAqB,yBAOhC;AAEF,SAAgB,kBAAkB;IAChC,MAAM,EAAE,YAAY,EAAE,GAAG,IAAA,kBAAU,EAAC,aAAa,CAAC,CAAC;IACnD,OAAO,YAAY,CAAC;AACtB,CAAC;AAHD,gDAGC;AAEM,MAAM,kBAAkB,GAC7B,CAAC,OAAqB,EAAE,QAAkC,EAAgB,EAAE,CAC5E,CAAC,SAAS,EAAE,UAAU,GAAG,EAAE,EAAE,EAAE,CAC7B,OAAO,CAAC,SAAS,kCAAO,QAAQ,GAAK,UAAU,EAAG,CAAC;AAH1C,QAAA,kBAAkB,sBAGwB"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useHasFetcherProvider = exports.useFetcher = exports.FetcherProviderFromBaseUrl = exports.FetcherProvider = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const makeFetcher_1 = require("../../makeFetcher");
|
|
7
|
+
const FetcherContext = (0, react_1.createContext)(undefined);
|
|
8
|
+
const FetcherProvider = ({ fetcher, children }) => {
|
|
9
|
+
return (0, jsx_runtime_1.jsx)(FetcherContext.Provider, Object.assign({ value: fetcher }, { children: children }));
|
|
10
|
+
};
|
|
11
|
+
exports.FetcherProvider = FetcherProvider;
|
|
12
|
+
const FetcherProviderFromBaseUrl = ({ baseUrl, children, }) => {
|
|
13
|
+
const fetcher = (0, react_1.useMemo)(() => (0, makeFetcher_1.makeFetcher)(baseUrl), [baseUrl]);
|
|
14
|
+
return (0, jsx_runtime_1.jsx)(FetcherContext.Provider, Object.assign({ value: fetcher }, { children: children }));
|
|
15
|
+
};
|
|
16
|
+
exports.FetcherProviderFromBaseUrl = FetcherProviderFromBaseUrl;
|
|
17
|
+
/**
|
|
18
|
+
* Provides the fetch(er) function for dynamic flows asynchronous operations.
|
|
19
|
+
*/
|
|
20
|
+
const useFetcher = () => {
|
|
21
|
+
const contextFetch = (0, react_1.useContext)(FetcherContext);
|
|
22
|
+
return contextFetch || fetch;
|
|
23
|
+
};
|
|
24
|
+
exports.useFetcher = useFetcher;
|
|
25
|
+
const useHasFetcherProvider = () => {
|
|
26
|
+
const context = (0, react_1.useContext)(FetcherContext);
|
|
27
|
+
return !!context;
|
|
28
|
+
};
|
|
29
|
+
exports.useHasFetcherProvider = useHasFetcherProvider;
|
|
30
|
+
//# sourceMappingURL=FetcherContexts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FetcherContexts.js","sourceRoot":"","sources":["../../../../src/common/contexts/fetcherContexts/FetcherContexts.tsx"],"names":[],"mappings":";;;;AAAA,iCAA2D;AAE3D,mDAAgD;AAIhD,MAAM,cAAc,GAAG,IAAA,qBAAa,EAAsB,SAAS,CAAC,CAAC;AAO9D,MAAM,eAAe,GAAG,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAwB,EAAE,EAAE;IAC7E,OAAO,uBAAC,cAAc,CAAC,QAAQ,kBAAC,KAAK,EAAE,OAAO,gBAAG,QAAQ,IAA2B,CAAC;AACvF,CAAC,CAAC;AAFW,QAAA,eAAe,mBAE1B;AAOK,MAAM,0BAA0B,GAAG,CAAC,EACzC,OAAO,EACP,QAAQ,GACwB,EAAE,EAAE;IACpC,MAAM,OAAO,GAAG,IAAA,eAAO,EAAC,GAAG,EAAE,CAAC,IAAA,yBAAW,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IAC/D,OAAO,uBAAC,cAAc,CAAC,QAAQ,kBAAC,KAAK,EAAE,OAAO,gBAAG,QAAQ,IAA2B,CAAC;AACvF,CAAC,CAAC;AANW,QAAA,0BAA0B,8BAMrC;AAEF;;GAEG;AACI,MAAM,UAAU,GAAG,GAAG,EAAE;IAC7B,MAAM,YAAY,GAAG,IAAA,kBAAU,EAAC,cAAc,CAAC,CAAC;IAChD,OAAO,YAAY,IAAI,KAAK,CAAC;AAC/B,CAAC,CAAC;AAHW,QAAA,UAAU,cAGrB;AAEK,MAAM,qBAAqB,GAAG,GAAG,EAAE;IACxC,MAAM,OAAO,GAAG,IAAA,kBAAU,EAAC,cAAc,CAAC,CAAC;IAC3C,OAAO,CAAC,CAAC,OAAO,CAAC;AACnB,CAAC,CAAC;AAHW,QAAA,qBAAqB,yBAGhC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./dynamicFlowContexts/DynamicFlowContexts"), exports);
|
|
18
|
+
__exportStar(require("./eventsContext/EventsContext"), exports);
|
|
19
|
+
__exportStar(require("./fetcherContexts/FetcherContexts"), exports);
|
|
20
|
+
__exportStar(require("./logContext/LogContext"), exports);
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/common/contexts/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4EAA0D;AAC1D,gEAA8C;AAC9C,oEAAkD;AAClD,0DAAwC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useLogger = exports.LogProvider = exports.getLogger = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const getLogger = (level, onLog, flowId = 'UNKNOWN-FLOW-ID', stepId = 'UNKNOWN-FLOW-ID') => (title, description, extra) => onLog(level, `Dynamic Flow ${level} - ${title} - ${description}`, Object.assign({ flowId, stepId }, extra));
|
|
7
|
+
exports.getLogger = getLogger;
|
|
8
|
+
const LogContext = (0, react_1.createContext)(null);
|
|
9
|
+
const LogProvider = ({ flowId, stepId, children, onLog }) => {
|
|
10
|
+
const value = (0, react_1.useMemo)(() => ({
|
|
11
|
+
debug: (0, exports.getLogger)('debug', onLog, flowId, stepId),
|
|
12
|
+
info: (0, exports.getLogger)('info', onLog, flowId, stepId),
|
|
13
|
+
warning: (0, exports.getLogger)('warning', onLog, flowId, stepId),
|
|
14
|
+
error: (0, exports.getLogger)('error', onLog, flowId, stepId),
|
|
15
|
+
critical: (0, exports.getLogger)('critical', onLog, flowId, stepId),
|
|
16
|
+
}), [onLog, flowId, stepId]);
|
|
17
|
+
return (0, jsx_runtime_1.jsx)(LogContext.Provider, Object.assign({ value: value }, { children: children }));
|
|
18
|
+
};
|
|
19
|
+
exports.LogProvider = LogProvider;
|
|
20
|
+
const useLogger = () => {
|
|
21
|
+
const logging = (0, react_1.useContext)(LogContext);
|
|
22
|
+
if (logging == null) {
|
|
23
|
+
throw new Error('Logging context not found. Did you forget to wrap your component in a <LogProvider />?');
|
|
24
|
+
}
|
|
25
|
+
return logging;
|
|
26
|
+
};
|
|
27
|
+
exports.useLogger = useLogger;
|
|
28
|
+
//# sourceMappingURL=LogContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LogContext.js","sourceRoot":"","sources":["../../../../src/common/contexts/logContext/LogContext.tsx"],"names":[],"mappings":";;;;AAAA,iCAA2D;AAmBpD,MAAM,SAAS,GACpB,CACE,KAAe,EACf,KAAsB,EACtB,SAA6B,iBAAiB,EAC9C,SAA6B,iBAAiB,EACjC,EAAE,CACjB,CAAC,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,EAAE,CAC5B,KAAK,CAAC,KAAK,EAAE,gBAAgB,KAAK,MAAM,KAAK,MAAM,WAAW,EAAE,kBAAI,MAAM,EAAE,MAAM,IAAK,KAAK,EAAG,CAAC;AARvF,QAAA,SAAS,aAQ8E;AAEpG,MAAM,UAAU,GAAG,IAAA,qBAAa,EAMtB,IAAI,CAAC,CAAC;AAST,MAAM,WAAW,GAAG,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAoB,EAAE,EAAE;IACnF,MAAM,KAAK,GAAG,IAAA,eAAO,EACnB,GAAG,EAAE,CAAC,CAAC;QACL,KAAK,EAAE,IAAA,iBAAS,EAAC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC;QAChD,IAAI,EAAE,IAAA,iBAAS,EAAC,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC;QAC9C,OAAO,EAAE,IAAA,iBAAS,EAAC,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC;QACpD,KAAK,EAAE,IAAA,iBAAS,EAAC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC;QAChD,QAAQ,EAAE,IAAA,iBAAS,EAAC,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC;KACvD,CAAC,EACF,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,CACxB,CAAC;IAEF,OAAO,uBAAC,UAAU,CAAC,QAAQ,kBAAC,KAAK,EAAE,KAAK,gBAAG,QAAQ,IAAuB,CAAC;AAC7E,CAAC,CAAC;AAbW,QAAA,WAAW,eAatB;AAEK,MAAM,SAAS,GAAG,GAAG,EAAE;IAC5B,MAAM,OAAO,GAAG,IAAA,kBAAU,EAAC,UAAU,CAAC,CAAC;IACvC,IAAI,OAAO,IAAI,IAAI,EAAE;QACnB,MAAM,IAAI,KAAK,CACb,wFAAwF,CACzF,CAAC;KACH;IACD,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AARW,QAAA,SAAS,aAQpB"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./useDebouncedFunction/useDebouncedFunction"), exports);
|
|
18
|
+
__exportStar(require("./useExternal/useExternal"), exports);
|
|
19
|
+
__exportStar(require("./useExternalStepPolling/useExternalStepPolling"), exports);
|
|
20
|
+
__exportStar(require("./usePersistAsync/usePersistAsync"), exports);
|
|
21
|
+
__exportStar(require("./usePolling/usePolling"), exports);
|
|
22
|
+
__exportStar(require("./usePrevious/usePrevious"), exports);
|
|
23
|
+
__exportStar(require("./useStepPolling/useStepPolling"), exports);
|
|
24
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/common/hooks/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8EAA4D;AAC5D,4DAA0C;AAC1C,kFAAgE;AAChE,oEAAkD;AAClD,0DAAwC;AACxC,4DAA0C;AAC1C,kEAAgD"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* References:
|
|
3
|
+
- https://github.com/gnbaron/use-lodash-debounce
|
|
4
|
+
- https://dmitripavlutin.com/react-throttle-debounce/
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.useDebouncedFunction = void 0;
|
|
8
|
+
const react_1 = require("react");
|
|
9
|
+
const utils_1 = require("../../utils");
|
|
10
|
+
function useDebouncedFunction(callback, waitMs) {
|
|
11
|
+
return (0, react_1.useCallback)((0, utils_1.debounce)(callback, waitMs), [callback, waitMs]);
|
|
12
|
+
}
|
|
13
|
+
exports.useDebouncedFunction = useDebouncedFunction;
|
|
14
|
+
//# sourceMappingURL=useDebouncedFunction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDebouncedFunction.js","sourceRoot":"","sources":["../../../../src/common/hooks/useDebouncedFunction/useDebouncedFunction.tsx"],"names":[],"mappings":";AAAA;;;EAGE;;;AAEF,iCAAoC;AAEpC,uCAAsD;AAEtD,SAAgB,oBAAoB,CAClC,QAAW,EACX,MAAc;IAEd,OAAO,IAAA,mBAAW,EAAC,IAAA,gBAAQ,EAAC,QAAQ,EAAE,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC;AACrE,CAAC;AALD,oDAKC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useExternal = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
function useExternal(url) {
|
|
6
|
+
// If we fail to open the window, the user will need to open this on their own
|
|
7
|
+
const [externalWindow, setExternalWindow] = (0, react_1.useState)(null);
|
|
8
|
+
const [hasManuallyTriggered, setHasManuallyTriggered] = (0, react_1.useState)(false);
|
|
9
|
+
const dismissConfirmation = () => setHasManuallyTriggered(true);
|
|
10
|
+
(0, react_1.useEffect)(() => {
|
|
11
|
+
if (url) {
|
|
12
|
+
setHasManuallyTriggered(false);
|
|
13
|
+
setExternalWindow(window.open(url, '_blank'));
|
|
14
|
+
}
|
|
15
|
+
}, [url]);
|
|
16
|
+
const requiresManualTrigger = Boolean(url && !externalWindow && !hasManuallyTriggered);
|
|
17
|
+
return { requiresManualTrigger, dismissConfirmation };
|
|
18
|
+
}
|
|
19
|
+
exports.useExternal = useExternal;
|
|
20
|
+
//# sourceMappingURL=useExternal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useExternal.js","sourceRoot":"","sources":["../../../../src/common/hooks/useExternal/useExternal.tsx"],"names":[],"mappings":";;;AAAA,iCAA4C;AAE5C,SAAgB,WAAW,CAAC,GAAY;IACtC,8EAA8E;IAC9E,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,IAAA,gBAAQ,EAAgB,IAAI,CAAC,CAAC;IAC1E,MAAM,CAAC,oBAAoB,EAAE,uBAAuB,CAAC,GAAG,IAAA,gBAAQ,EAAU,KAAK,CAAC,CAAC;IACjF,MAAM,mBAAmB,GAAG,GAAG,EAAE,CAAC,uBAAuB,CAAC,IAAI,CAAC,CAAC;IAEhE,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,IAAI,GAAG,EAAE;YACP,uBAAuB,CAAC,KAAK,CAAC,CAAC;YAC/B,iBAAiB,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC;SAC/C;IACH,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAEV,MAAM,qBAAqB,GAAG,OAAO,CAAC,GAAG,IAAI,CAAC,cAAc,IAAI,CAAC,oBAAoB,CAAC,CAAC;IACvF,OAAO,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,CAAC;AACxD,CAAC;AAfD,kCAeC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useExternalStepPolling = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const __1 = require("..");
|
|
6
|
+
const contexts_1 = require("../../contexts");
|
|
7
|
+
/** @deprecated External step is no longer supported */
|
|
8
|
+
function useExternalStepPolling(polling, onAction) {
|
|
9
|
+
const fetcher = (0, contexts_1.useFetcher)();
|
|
10
|
+
const asyncFn = (0, react_1.useMemo)(() => {
|
|
11
|
+
if (polling) {
|
|
12
|
+
return () => {
|
|
13
|
+
return fetcher(polling.url).then((response) => {
|
|
14
|
+
if (response.ok) {
|
|
15
|
+
try {
|
|
16
|
+
return response.json();
|
|
17
|
+
}
|
|
18
|
+
catch (_a) {
|
|
19
|
+
throw new Error('failed');
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
throw new Error('failed');
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
return undefined;
|
|
30
|
+
}
|
|
31
|
+
}, [polling, fetcher]);
|
|
32
|
+
const onPollingResponse = (0, react_1.useCallback)((pollingResponse) => {
|
|
33
|
+
const responseHandlers = (polling === null || polling === void 0 ? void 0 : polling.responseHandlers) || [];
|
|
34
|
+
const responseHandler = responseHandlers.find((handler) => handler.result === pollingResponse.result);
|
|
35
|
+
if (responseHandler === null || responseHandler === void 0 ? void 0 : responseHandler.action) {
|
|
36
|
+
const { action } = responseHandler;
|
|
37
|
+
if (action.exit) {
|
|
38
|
+
const mergedResult = Object.assign(Object.assign({}, (action.result || {})), (pollingResponse.data || {}));
|
|
39
|
+
onAction(Object.assign(Object.assign({}, action), { result: mergedResult }));
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
const mergedData = Object.assign(Object.assign({}, (action.data || {})), (pollingResponse.data || {}));
|
|
43
|
+
onAction(Object.assign(Object.assign({}, action), { data: mergedData }));
|
|
44
|
+
}
|
|
45
|
+
return false; // stop polling
|
|
46
|
+
}
|
|
47
|
+
return true; // continue polling
|
|
48
|
+
}, [polling === null || polling === void 0 ? void 0 : polling.responseHandlers, onAction]);
|
|
49
|
+
(0, __1.usePolling)({
|
|
50
|
+
asyncFn,
|
|
51
|
+
interval: (polling === null || polling === void 0 ? void 0 : polling.interval) || 0,
|
|
52
|
+
maxAttempts: (polling === null || polling === void 0 ? void 0 : polling.maxAttempts) || 0,
|
|
53
|
+
maxConsecutiveFails: (polling === null || polling === void 0 ? void 0 : polling.maxConsecutiveFails) || 0,
|
|
54
|
+
onPollingResponse,
|
|
55
|
+
onFailure: (0, react_1.useCallback)(() => {
|
|
56
|
+
if (polling) {
|
|
57
|
+
onAction(polling.onError.action);
|
|
58
|
+
}
|
|
59
|
+
}, [onAction, polling]),
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
exports.useExternalStepPolling = useExternalStepPolling;
|
|
63
|
+
//# sourceMappingURL=useExternalStepPolling.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useExternalStepPolling.js","sourceRoot":"","sources":["../../../../src/common/hooks/useExternalStepPolling/useExternalStepPolling.tsx"],"names":[],"mappings":";;;AAAA,iCAA6C;AAE7C,0BAAgC;AAEhC,6CAA4C;AAkB5C,uDAAuD;AACvD,SAAgB,sBAAsB,CACpC,OAAqD,EACrD,QAAkC;IAElC,MAAM,OAAO,GAAG,IAAA,qBAAU,GAAE,CAAC;IAE7B,MAAM,OAAO,GAAG,IAAA,eAAO,EAAC,GAAG,EAAE;QAC3B,IAAI,OAAO,EAAE;YACX,OAAO,GAAG,EAAE;gBACV,OAAO,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE;oBAC5C,IAAI,QAAQ,CAAC,EAAE,EAAE;wBACf,IAAI;4BACF,OAAO,QAAQ,CAAC,IAAI,EAA8B,CAAC;yBACpD;wBAAC,WAAM;4BACN,MAAM,IAAI,KAAK,CAAC,QAAQ,CAAC,CAAC;yBAC3B;qBACF;yBAAM;wBACL,MAAM,IAAI,KAAK,CAAC,QAAQ,CAAC,CAAC;qBAC3B;gBACH,CAAC,CAAC,CAAC;YACL,CAAC,CAAC;SACH;aAAM;YACL,OAAO,SAAS,CAAC;SAClB;IACH,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;IAEvB,MAAM,iBAAiB,GAAG,IAAA,mBAAW,EACnC,CAAC,eAAgC,EAAE,EAAE;QACnC,MAAM,gBAAgB,GAAG,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,gBAAgB,KAAI,EAAE,CAAC;QACzD,MAAM,eAAe,GAAG,gBAAgB,CAAC,IAAI,CAC3C,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,KAAK,eAAe,CAAC,MAAM,CACvD,CAAC;QAEF,IAAI,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,MAAM,EAAE;YAC3B,MAAM,EAAE,MAAM,EAAE,GAAG,eAAe,CAAC;YACnC,IAAI,MAAM,CAAC,IAAI,EAAE;gBACf,MAAM,YAAY,mCAAQ,CAAC,MAAM,CAAC,MAAM,IAAI,EAAE,CAAC,GAAK,CAAC,eAAe,CAAC,IAAI,IAAI,EAAE,CAAC,CAAE,CAAC;gBACnF,QAAQ,iCAAM,MAAM,KAAE,MAAM,EAAE,YAAY,IAAG,CAAC;aAC/C;iBAAM;gBACL,MAAM,UAAU,mCAAQ,CAAC,MAAM,CAAC,IAAI,IAAI,EAAE,CAAC,GAAK,CAAC,eAAe,CAAC,IAAI,IAAI,EAAE,CAAC,CAAE,CAAC;gBAC/E,QAAQ,iCAAM,MAAM,KAAE,IAAI,EAAE,UAAU,IAAG,CAAC;aAC3C;YACD,OAAO,KAAK,CAAC,CAAC,eAAe;SAC9B;QACD,OAAO,IAAI,CAAC,CAAC,mBAAmB;IAClC,CAAC,EACD,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,gBAAgB,EAAE,QAAQ,CAAC,CACtC,CAAC;IAEF,IAAA,cAAU,EAAkB;QAC1B,OAAO;QACP,QAAQ,EAAE,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,QAAQ,KAAI,CAAC;QAChC,WAAW,EAAE,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,KAAI,CAAC;QACtC,mBAAmB,EAAE,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,mBAAmB,KAAI,CAAC;QACtD,iBAAiB;QACjB,SAAS,EAAE,IAAA,mBAAW,EAAC,GAAG,EAAE;YAC1B,IAAI,OAAO,EAAE;gBACX,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;aAClC;QACH,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;KACxB,CAAC,CAAC;AACL,CAAC;AA7DD,wDA6DC"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.usePersistAsync = void 0;
|
|
7
|
+
const react_1 = require("react");
|
|
8
|
+
const react_intl_1 = require("react-intl");
|
|
9
|
+
const validators_1 = require("../../../common/validators");
|
|
10
|
+
const PersistAsyncSchema_messages_1 = __importDefault(require("../../../jsonSchemaForm/persistAsyncSchema/PersistAsyncSchema.messages"));
|
|
11
|
+
const PersistAsyncBasicSchema_1 = require("../../../jsonSchemaForm/persistAsyncSchema/persistAsyncBasicSchema/PersistAsyncBasicSchema"); // FIXME: extract these functions form that schema component to either here or their own module
|
|
12
|
+
const types_1 = require("../../../types");
|
|
13
|
+
const contexts_1 = require("../../contexts");
|
|
14
|
+
const validators_2 = require("../../validators");
|
|
15
|
+
const usePersistAsync = (persistAsync) => {
|
|
16
|
+
const [abortController, setAbortController] = (0, react_1.useState)(null);
|
|
17
|
+
const fetcher = (0, contexts_1.useFetcher)();
|
|
18
|
+
const intl = (0, react_intl_1.useIntl)();
|
|
19
|
+
const { schema } = persistAsync;
|
|
20
|
+
async function handlePersistAsync(model) {
|
|
21
|
+
const isInvalidSchema = model instanceof Blob ? !(0, types_1.isBlobSchema)(schema) : !(0, validators_2.isValidSchema)(model, schema);
|
|
22
|
+
if ((0, validators_1.isNull)(model) || isInvalidSchema) {
|
|
23
|
+
handleError();
|
|
24
|
+
}
|
|
25
|
+
return await performPersistAsync(model);
|
|
26
|
+
}
|
|
27
|
+
const abortCurrentRequestAndGetNewAbortSignal = () => {
|
|
28
|
+
if (abortController) {
|
|
29
|
+
abortController.abort();
|
|
30
|
+
}
|
|
31
|
+
const newAbortController = new AbortController();
|
|
32
|
+
setAbortController(newAbortController);
|
|
33
|
+
return newAbortController.signal;
|
|
34
|
+
};
|
|
35
|
+
function constructFetchInit(model) {
|
|
36
|
+
const isBlob = (0, types_1.isBlobSchema)(schema);
|
|
37
|
+
const signal = abortCurrentRequestAndGetNewAbortSignal();
|
|
38
|
+
const requestKey = persistAsync.param;
|
|
39
|
+
const requestBody = isBlob
|
|
40
|
+
? wrapInFormData(requestKey, model)
|
|
41
|
+
: JSON.stringify({ [requestKey]: model });
|
|
42
|
+
return {
|
|
43
|
+
method: persistAsync.method,
|
|
44
|
+
headers: Object.assign({}, (!isBlob && { 'Content-Type': 'application/json' })),
|
|
45
|
+
body: requestBody,
|
|
46
|
+
signal,
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
async function performPersistAsync(payload) {
|
|
50
|
+
try {
|
|
51
|
+
const response = await fetcher(persistAsync.url, constructFetchInit(payload));
|
|
52
|
+
if (!response.ok) {
|
|
53
|
+
return handleHTTPError(response);
|
|
54
|
+
}
|
|
55
|
+
const jsonResponse = await response.json();
|
|
56
|
+
if ((0, validators_1.isObject)(jsonResponse)) {
|
|
57
|
+
const id = jsonResponse[persistAsync.idProperty];
|
|
58
|
+
if ((0, validators_1.isString)(id) || (0, validators_1.isNumber)(id)) {
|
|
59
|
+
return { data: id };
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
return handleError();
|
|
63
|
+
}
|
|
64
|
+
catch (error) {
|
|
65
|
+
return handleError(error);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
async function handleHTTPError(response) {
|
|
69
|
+
if (response.status === 422) {
|
|
70
|
+
const jsonResponse = await response.json();
|
|
71
|
+
if ((0, validators_1.isObject)(jsonResponse)) {
|
|
72
|
+
const error = (0, PersistAsyncBasicSchema_1.getErrorFromResponse)(persistAsync.param, jsonResponse);
|
|
73
|
+
if ((0, validators_1.isString)(error)) {
|
|
74
|
+
throw new Error(error);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
throw new Error(intl.formatMessage(PersistAsyncSchema_messages_1.default.genericError));
|
|
79
|
+
}
|
|
80
|
+
const handleError = (error) => {
|
|
81
|
+
const message = hasStringMessage(error)
|
|
82
|
+
? error.message
|
|
83
|
+
: intl.formatMessage(PersistAsyncSchema_messages_1.default.genericError);
|
|
84
|
+
throw new Error(message);
|
|
85
|
+
};
|
|
86
|
+
return handlePersistAsync;
|
|
87
|
+
};
|
|
88
|
+
exports.usePersistAsync = usePersistAsync;
|
|
89
|
+
function wrapInFormData(key, value) {
|
|
90
|
+
const formData = new FormData();
|
|
91
|
+
if (value !== null) {
|
|
92
|
+
formData.append(key, value);
|
|
93
|
+
}
|
|
94
|
+
return formData;
|
|
95
|
+
}
|
|
96
|
+
function hasStringMessage(value) {
|
|
97
|
+
return (0, validators_1.isObject)(value) && 'message' in value && typeof value.message === 'string';
|
|
98
|
+
}
|
|
99
|
+
//# sourceMappingURL=usePersistAsync.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePersistAsync.js","sourceRoot":"","sources":["../../../../src/common/hooks/usePersistAsync/usePersistAsync.ts"],"names":[],"mappings":";;;;;;AAAA,iCAAiC;AACjC,2CAAqC;AAErC,2DAAkF;AAClF,yIAA8F;AAC9F,wIAAkI,CAAC,+FAA+F;AAClO,0CAA4D;AAC5D,6CAA4C;AAC5C,iDAAiD;AAQ1C,MAAM,eAAe,GAAG,CAAC,YAA0B,EAA+B,EAAE;IACzF,MAAM,CAAC,eAAe,EAAE,kBAAkB,CAAC,GAAG,IAAA,gBAAQ,EAAyB,IAAI,CAAC,CAAC;IAErF,MAAM,OAAO,GAAG,IAAA,qBAAU,GAAE,CAAC;IAE7B,MAAM,IAAI,GAAG,IAAA,oBAAO,GAAE,CAAC;IAEvB,MAAM,EAAE,MAAM,EAAE,GAAG,YAAY,CAAC;IAEhC,KAAK,UAAU,kBAAkB,CAAC,KAAwB;QACxD,MAAM,eAAe,GACnB,KAAK,YAAY,IAAI,CAAC,CAAC,CAAC,CAAC,IAAA,oBAAY,EAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,IAAA,0BAAa,EAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QAEhF,IAAI,IAAA,mBAAM,EAAC,KAAK,CAAC,IAAI,eAAe,EAAE;YACpC,WAAW,EAAE,CAAC;SACf;QAED,OAAO,MAAM,mBAAmB,CAAC,KAAK,CAAC,CAAC;IAC1C,CAAC;IAED,MAAM,uCAAuC,GAAG,GAAG,EAAE;QACnD,IAAI,eAAe,EAAE;YACnB,eAAe,CAAC,KAAK,EAAE,CAAC;SACzB;QACD,MAAM,kBAAkB,GAAG,IAAI,eAAe,EAAE,CAAC;QACjD,kBAAkB,CAAC,kBAAkB,CAAC,CAAC;QACvC,OAAO,kBAAkB,CAAC,MAAM,CAAC;IACnC,CAAC,CAAC;IAEF,SAAS,kBAAkB,CAAC,KAAwB;QAClD,MAAM,MAAM,GAAG,IAAA,oBAAY,EAAC,MAAM,CAAC,CAAC;QAEpC,MAAM,MAAM,GAAG,uCAAuC,EAAE,CAAC;QAEzD,MAAM,UAAU,GAAG,YAAY,CAAC,KAAK,CAAC;QACtC,MAAM,WAAW,GAAG,MAAM;YACxB,CAAC,CAAC,cAAc,CAAC,UAAU,EAAE,KAAK,CAAC;YACnC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;QAE5C,OAAO;YACL,MAAM,EAAE,YAAY,CAAC,MAAM;YAC3B,OAAO,oBACF,CAAC,CAAC,MAAM,IAAI,EAAE,cAAc,EAAE,kBAAkB,EAAE,CAAC,CACvD;YACD,IAAI,EAAE,WAAW;YACjB,MAAM;SACP,CAAC;IACJ,CAAC;IAED,KAAK,UAAU,mBAAmB,CAAC,OAA0B;QAC3D,IAAI;YACF,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,YAAY,CAAC,GAAG,EAAE,kBAAkB,CAAC,OAAO,CAAC,CAAC,CAAC;YAE9E,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE;gBAChB,OAAO,eAAe,CAAC,QAAQ,CAAC,CAAC;aAClC;YAED,MAAM,YAAY,GAAY,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;YACpD,IAAI,IAAA,qBAAQ,EAAC,YAAY,CAAC,EAAE;gBAC1B,MAAM,EAAE,GAAG,YAAY,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC;gBACjD,IAAI,IAAA,qBAAQ,EAAC,EAAE,CAAC,IAAI,IAAA,qBAAQ,EAAC,EAAE,CAAC,EAAE;oBAChC,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC;iBACrB;aACF;YACD,OAAO,WAAW,EAAE,CAAC;SACtB;QAAC,OAAO,KAAK,EAAE;YACd,OAAO,WAAW,CAAC,KAAK,CAAC,CAAC;SAC3B;IACH,CAAC;IAED,KAAK,UAAU,eAAe,CAAC,QAAkB;QAC/C,IAAI,QAAQ,CAAC,MAAM,KAAK,GAAG,EAAE;YAC3B,MAAM,YAAY,GAAY,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;YACpD,IAAI,IAAA,qBAAQ,EAAC,YAAY,CAAC,EAAE;gBAC1B,MAAM,KAAK,GAAG,IAAA,8CAAoB,EAAC,YAAY,CAAC,KAAK,EAAE,YAAY,CAAC,CAAC;gBACrE,IAAI,IAAA,qBAAQ,EAAC,KAAK,CAAC,EAAE;oBACnB,MAAM,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC;iBACxB;aACF;SACF;QACD,MAAM,IAAI,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,qCAAQ,CAAC,YAAY,CAAC,CAAC,CAAC;IAC7D,CAAC;IAED,MAAM,WAAW,GAAG,CAAC,KAAe,EAAE,EAAE;QACtC,MAAM,OAAO,GAAG,gBAAgB,CAAC,KAAK,CAAC;YACrC,CAAC,CAAC,KAAK,CAAC,OAAO;YACf,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,qCAAQ,CAAC,YAAY,CAAC,CAAC;QAC9C,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC;IAC3B,CAAC,CAAC;IAEF,OAAO,kBAAkB,CAAC;AAC5B,CAAC,CAAC;AA3FW,QAAA,eAAe,mBA2F1B;AAEF,SAAS,cAAc,CAAC,GAAW,EAAE,KAAwB;IAC3D,MAAM,QAAQ,GAAG,IAAI,QAAQ,EAAE,CAAC;IAChC,IAAI,KAAK,KAAK,IAAI,EAAE;QAClB,QAAQ,CAAC,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;KAC7B;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,SAAS,gBAAgB,CAAC,KAAc;IACtC,OAAO,IAAA,qBAAQ,EAAC,KAAK,CAAC,IAAI,SAAS,IAAI,KAAK,IAAI,OAAO,KAAK,CAAC,OAAO,KAAK,QAAQ,CAAC;AACpF,CAAC"}
|