@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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFormattedDefaultErrorMessages.js","sourceRoot":"","sources":["../../../../../../src/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/useFormattedDefaultErrorMessages.tsx"],"names":[],"mappings":";;;;;;AAAA,2CAAqC;AAErC,8EAA4D;AAC5D,6GAA2E;AAE3E,SAAgB,gCAAgC,CAAC,EAC/C,QAAQ,EACR,QAAQ,GAIT;IACC,MAAM,EAAE,aAAa,EAAE,GAAG,IAAA,oBAAO,GAAE,CAAC;IAEpC,MAAM,EAAE,gBAAgB,EAAE,aAAa,EAAE,aAAa,EAAE,GAAG,2CAAuB,CAAC;IAEnF,OAAO;QACL,uBAAuB,EAAE,aAAa,CAAC,gBAAgB,CAAC;QACxD,oBAAoB,EAAE,aAAa,CAAC,aAAa,EAAE,EAAE,QAAQ,EAAE,CAAC;QAChE,oBAAoB,EAAE,aAAa,CAAC,aAAa,EAAE,EAAE,QAAQ,EAAE,CAAC;QAChE,eAAe,EAAE,aAAa,CAAC,kBAAc,CAAC,QAAQ,CAAC;KACxD,CAAC;AACJ,CAAC;AAjBD,4EAiBC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
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.default = void 0;
|
|
7
|
+
var ArraySchema_1 = require("./ArraySchema");
|
|
8
|
+
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(ArraySchema_1).default; } });
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/jsonSchemaForm/arrayTypeSchema/index.ts"],"names":[],"mappings":";;;;;;AAAA,6CAAwC;AAA/B,uHAAA,OAAO,OAAA"}
|
|
@@ -0,0 +1,92 @@
|
|
|
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
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
+
const classnames_1 = __importDefault(require("classnames"));
|
|
8
|
+
const react_1 = require("react");
|
|
9
|
+
const utils_1 = require("../../common/utils");
|
|
10
|
+
const validators_1 = require("../../common/validators");
|
|
11
|
+
const layout_1 = require("../../layout");
|
|
12
|
+
const controlFeedback_1 = __importDefault(require("../controlFeedback"));
|
|
13
|
+
const help_1 = __importDefault(require("../help"));
|
|
14
|
+
const schemaFormControl_1 = __importDefault(require("../schemaFormControl"));
|
|
15
|
+
const isNullish = (value) => (0, validators_1.isNull)(value) || (0, validators_1.isUndefined)(value);
|
|
16
|
+
const getDefaultValue = (schema) => {
|
|
17
|
+
return schema.type === 'boolean' && isNullish(schema.default) ? false : schema.default;
|
|
18
|
+
};
|
|
19
|
+
const BasicTypeSchema = (props) => {
|
|
20
|
+
var _a, _b, _c;
|
|
21
|
+
const onChange = (newModel) => {
|
|
22
|
+
setChanged(true);
|
|
23
|
+
setModelAndBroadcast(sanitiseModel(newModel), 'user');
|
|
24
|
+
};
|
|
25
|
+
const getValidationKeys = (newModel) => (0, validators_1.getValidationFailures)(newModel, props.schema, props.required); // TODO: LOW avoid type assertion
|
|
26
|
+
const setModelAndBroadcast = (newModel, type) => {
|
|
27
|
+
setModel(newModel);
|
|
28
|
+
const validationKeys = getValidationKeys(newModel);
|
|
29
|
+
setValidations(validationKeys);
|
|
30
|
+
const broadcastModel = newModel;
|
|
31
|
+
setLastModel(broadcastModel);
|
|
32
|
+
if (broadcastModel !== lastModel) {
|
|
33
|
+
props.onChange({
|
|
34
|
+
model: broadcastModel,
|
|
35
|
+
triggerSchema: props.schema,
|
|
36
|
+
triggerModel: broadcastModel,
|
|
37
|
+
lastTriggerModel: lastModel,
|
|
38
|
+
type,
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
const sanitiseModel = (newModel) => (0, validators_1.getValidBasicModelOrNull)(newModel, props.schema);
|
|
43
|
+
const onFocus = () => setFocused(true);
|
|
44
|
+
const onBlur = () => {
|
|
45
|
+
setFocused(false);
|
|
46
|
+
setBlurred(true);
|
|
47
|
+
if (props.onBlur) {
|
|
48
|
+
props.onBlur();
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
const [model, setModel] = (0, react_1.useState)((_a = props.model) !== null && _a !== void 0 ? _a : null);
|
|
52
|
+
const [lastModel, setLastModel] = (0, react_1.useState)((_b = props.model) !== null && _b !== void 0 ? _b : null);
|
|
53
|
+
const [changed, setChanged] = (0, react_1.useState)(false);
|
|
54
|
+
const [focused, setFocused] = (0, react_1.useState)(false);
|
|
55
|
+
const [blurred, setBlurred] = (0, react_1.useState)(false);
|
|
56
|
+
const [validations, setValidations] = (0, react_1.useState)([]);
|
|
57
|
+
const id = (0, react_1.useMemo)(() => props.schema.$id || (0, utils_1.generateRandomId)(), [props.schema.$id]);
|
|
58
|
+
const onSchemaChange = () => {
|
|
59
|
+
const defaultValue = getDefaultValue(props.schema);
|
|
60
|
+
// if no model, change to the default, only run this when the schema changes
|
|
61
|
+
if (isNullish(model) && !isNullish(defaultValue)) {
|
|
62
|
+
setModelAndBroadcast(defaultValue, 'init');
|
|
63
|
+
}
|
|
64
|
+
if (props.schema.const) {
|
|
65
|
+
setModelAndBroadcast(props.schema.const, 'init');
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
const refreshValidations = () => {
|
|
69
|
+
setValidations(getValidationKeys(model));
|
|
70
|
+
};
|
|
71
|
+
const isConst = props.schema.const;
|
|
72
|
+
const isHidden = props.schema.hidden || isConst;
|
|
73
|
+
(0, react_1.useEffect)(refreshValidations, [props.model, props.submitted]);
|
|
74
|
+
(0, react_1.useEffect)(onSchemaChange, [props.schema]);
|
|
75
|
+
(0, react_1.useEffect)(() => { var _a; return setModel((_a = props.model) !== null && _a !== void 0 ? _a : null); }, [props.model]);
|
|
76
|
+
const formGroupClasses = {
|
|
77
|
+
'form-group': true,
|
|
78
|
+
'has-error': ((props.submitted || !changed) && !!props.errors) ||
|
|
79
|
+
((props.submitted || (changed && blurred)) && !!validations.length),
|
|
80
|
+
'has-info': (focused && !!props.schema.description) || !!props.infoMessage,
|
|
81
|
+
};
|
|
82
|
+
const showLabel = props.schema.format !== 'file' && props.schema.type !== 'boolean';
|
|
83
|
+
const schemaHelp = props.schema.help;
|
|
84
|
+
return !isHidden ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [props.schema.alert && (0, jsx_runtime_1.jsx)(layout_1.DynamicAlert, { component: props.schema.alert }), (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: (0, classnames_1.default)(formGroupClasses) }, { children: [showLabel && ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "d-inline-block" }, { children: [(0, jsx_runtime_1.jsx)("label", Object.assign({ className: "control-label d-inline", htmlFor: id }, { children: props.schema.title })), !!schemaHelp && (0, jsx_runtime_1.jsx)(help_1.default, { help: schemaHelp })] }))), !showLabel && !!schemaHelp && (0, jsx_runtime_1.jsx)(help_1.default, { help: schemaHelp }), (0, jsx_runtime_1.jsx)(schemaFormControl_1.default, { id: id, schema: props.schema, value: model, disabled: !!props.disabled, onChange: onChange, onFocus: onFocus, onBlur: onBlur }), (0, jsx_runtime_1.jsx)(controlFeedback_1.default, { changed: changed, focused: focused, blurred: blurred, submitted: props.submitted, errors: (_c = props.errors) !== null && _c !== void 0 ? _c : null, schema: props.schema, validations: validations, infoMessage: props.infoMessage })] }))] })) : null;
|
|
85
|
+
};
|
|
86
|
+
BasicTypeSchema.defaultProps = {
|
|
87
|
+
required: false,
|
|
88
|
+
disabled: false,
|
|
89
|
+
onBlur: null,
|
|
90
|
+
};
|
|
91
|
+
exports.default = BasicTypeSchema;
|
|
92
|
+
//# sourceMappingURL=BasicTypeSchema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BasicTypeSchema.js","sourceRoot":"","sources":["../../../src/jsonSchemaForm/basicTypeSchema/BasicTypeSchema.tsx"],"names":[],"mappings":";;;;;;AAAA,4DAAoC;AACpC,iCAAqD;AAErD,8CAAsD;AACtD,wDAKiC;AACjC,yCAA4C;AAG5C,yEAAiD;AAEjD,mDAA2B;AAC3B,6EAAqD;AAErD,MAAM,SAAS,GAAG,CAAC,KAAc,EAA6B,EAAE,CAC9D,IAAA,mBAAM,EAAC,KAAK,CAAC,IAAI,IAAA,wBAAW,EAAC,KAAK,CAAC,CAAC;AAEtC,MAAM,eAAe,GAAG,CAAC,MAAmB,EAAE,EAAE;IAC9C,OAAO,MAAM,CAAC,IAAI,KAAK,SAAS,IAAI,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC;AACzF,CAAC,CAAC;AAEF,MAAM,eAAe,GAAG,CAAC,KAA2B,EAAE,EAAE;;IACtD,MAAM,QAAQ,GAAG,CAAC,QAA2B,EAAE,EAAE;QAC/C,UAAU,CAAC,IAAI,CAAC,CAAC;QACjB,oBAAoB,CAAC,aAA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A,oBAAU,EAAC,gBAAgB,CAAC,iBACzC,SAAS,IAAI,CACZ,+CAAK,SAAS,EAAC,gBAAgB,iBAC7B,gDAAO,SAAS,EAAC,wBAAwB,EAAC,OAAO,EAAE,EAAE,gBAClD,KAAK,CAAC,MAAM,CAAC,KAAK,IACb,EACP,CAAC,CAAC,UAAU,IAAI,uBAAC,cAAI,IAAC,IAAI,EAAE,UAAU,GAAI,KACvC,CACP,EACA,CAAC,SAAS,IAAI,CAAC,CAAC,UAAU,IAAI,uBAAC,cAAI,IAAC,IAAI,EAAE,UAAU,GAAI,EACzD,uBAAC,2BAAiB,IAChB,EAAE,EAAE,EAAE,EACN,MAAM,EAAE,KAAK,CAAC,MAAM,EACpB,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,QAAQ,EAC1B,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,MAAM,GACd,EACF,uBAAC,yBAAe,IACd,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,MAAM,EAAE,MAAA,KAAK,CAAC,MAAM,mCAAI,IAAI,EAC5B,MAAM,EAAE,KAAK,CAAC,MAAM,EACpB,WAAW,EAAE,WAAW,EACxB,WAAW,EAAE,KAAK,CAAC,WAAW,GAC9B,KACE,IACL,CACJ,CAAC,CAAC,CAAC,IAAI,CAAC;AACX,CAAC,CAAC;AAeF,eAAe,CAAC,YAAY,GAAG;IAC7B,QAAQ,EAAE,KAAK;IACf,QAAQ,EAAE,KAAK;IACf,MAAM,EAAE,IAAI;CACb,CAAC;AAEF,kBAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
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.default = void 0;
|
|
7
|
+
var BasicTypeSchema_1 = require("./BasicTypeSchema");
|
|
8
|
+
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(BasicTypeSchema_1).default; } });
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/jsonSchemaForm/basicTypeSchema/index.ts"],"names":[],"mappings":";;;;;;AAAA,qDAA4C;AAAnC,2HAAA,OAAO,OAAA"}
|
|
@@ -0,0 +1,74 @@
|
|
|
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
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
+
const components_1 = require("@transferwise/components");
|
|
8
|
+
const formatting_1 = require("@transferwise/formatting");
|
|
9
|
+
const react_intl_1 = require("react-intl");
|
|
10
|
+
const ControlFeedback_messages_1 = __importDefault(require("./ControlFeedback.messages"));
|
|
11
|
+
const ControlFeedback = (props) => {
|
|
12
|
+
var _a;
|
|
13
|
+
const defaultValidationMessages = useDefaultValidationMessages(props.schema);
|
|
14
|
+
const validationMessages = Object.assign(Object.assign(Object.assign({}, defaultValidationMessages), props.validationMessages), props.schema.validationMessages);
|
|
15
|
+
const isErrorVisible = (props.submitted || !props.changed) && !!props.errors;
|
|
16
|
+
const isValidationVisible = !isErrorVisible &&
|
|
17
|
+
(props.submitted || (props.changed && props.blurred)) &&
|
|
18
|
+
!!((_a = props.validations) === null || _a === void 0 ? void 0 : _a.length);
|
|
19
|
+
const isDescriptionVisible = props.focused && props.schema.description && !isValidationVisible;
|
|
20
|
+
const hasInfoMessage = !!props.infoMessage;
|
|
21
|
+
return ((0, jsx_runtime_1.jsxs)("div", { children: [isErrorVisible ? (0, jsx_runtime_1.jsx)(components_1.InlineAlert, Object.assign({ type: "error" }, { children: props.errors })) : null, isValidationVisible ? ((0, jsx_runtime_1.jsx)(components_1.InlineAlert, Object.assign({ type: "error" }, { children: props.validations.map((validation) => ((0, jsx_runtime_1.jsx)("div", { children: validationMessages[validation] }, validation))) }))) : null, (isDescriptionVisible || hasInfoMessage) && ((0, jsx_runtime_1.jsxs)(components_1.InlineAlert, Object.assign({ type: "info" }, { children: [isDescriptionVisible && (0, jsx_runtime_1.jsx)("div", { children: props.schema.description }), hasInfoMessage && (0, jsx_runtime_1.jsx)("div", { children: props.infoMessage })] })))] }));
|
|
22
|
+
};
|
|
23
|
+
ControlFeedback.defaultProps = {
|
|
24
|
+
errors: '',
|
|
25
|
+
validations: [],
|
|
26
|
+
validationMessages: {},
|
|
27
|
+
validationAsyncSuccessMessage: null,
|
|
28
|
+
};
|
|
29
|
+
// TODO: avoid typre assertions in this function
|
|
30
|
+
function useDefaultValidationMessages(schema) {
|
|
31
|
+
const { formatMessage, locale } = (0, react_intl_1.useIntl)();
|
|
32
|
+
const formattedMessages = {
|
|
33
|
+
type: formatMessage(ControlFeedback_messages_1.default.type),
|
|
34
|
+
minimum: formatMessage(ControlFeedback_messages_1.default.minimum, {
|
|
35
|
+
minimum: schema.minimum,
|
|
36
|
+
}),
|
|
37
|
+
maximum: formatMessage(ControlFeedback_messages_1.default.maximum, {
|
|
38
|
+
maximum: schema.maximum,
|
|
39
|
+
}),
|
|
40
|
+
minLength: formatMessage(ControlFeedback_messages_1.default.minLength, {
|
|
41
|
+
minLength: schema.minLength,
|
|
42
|
+
}),
|
|
43
|
+
maxLength: formatMessage(ControlFeedback_messages_1.default.maxLength, {
|
|
44
|
+
maxLength: schema.maxLength,
|
|
45
|
+
}),
|
|
46
|
+
pattern: formatMessage(ControlFeedback_messages_1.default.pattern),
|
|
47
|
+
required: formatMessage(ControlFeedback_messages_1.default.required),
|
|
48
|
+
};
|
|
49
|
+
if (schema.format === 'date') {
|
|
50
|
+
const dateOverrides = {
|
|
51
|
+
pattern: formatMessage(ControlFeedback_messages_1.default.patternDate),
|
|
52
|
+
minimum: schema.minimum
|
|
53
|
+
? formatMessage(ControlFeedback_messages_1.default.minimumDate, {
|
|
54
|
+
minimum: (0, formatting_1.formatDate)(new Date(schema.minimum), locale, {
|
|
55
|
+
timeZone: 'UTC',
|
|
56
|
+
dateStyle: 'long',
|
|
57
|
+
}),
|
|
58
|
+
})
|
|
59
|
+
: undefined,
|
|
60
|
+
maximum: schema.maximum
|
|
61
|
+
? formatMessage(ControlFeedback_messages_1.default.maximumDate, {
|
|
62
|
+
maximum: (0, formatting_1.formatDate)(new Date(schema.maximum), locale, {
|
|
63
|
+
timeZone: 'UTC',
|
|
64
|
+
dateStyle: 'long',
|
|
65
|
+
}),
|
|
66
|
+
})
|
|
67
|
+
: undefined,
|
|
68
|
+
};
|
|
69
|
+
return Object.assign(Object.assign({}, formattedMessages), dateOverrides);
|
|
70
|
+
}
|
|
71
|
+
return formattedMessages;
|
|
72
|
+
}
|
|
73
|
+
exports.default = ControlFeedback;
|
|
74
|
+
//# sourceMappingURL=ControlFeedback.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ControlFeedback.js","sourceRoot":"","sources":["../../../src/jsonSchemaForm/controlFeedback/ControlFeedback.tsx"],"names":[],"mappings":";;;;;;AAAA,yDAAuD;AACvD,yDAAsD;AACtD,2CAAqC;AAIrC,0FAAiE;AAEjE,MAAM,eAAe,GAAG,CAAC,KAA2B,EAAE,EAAE;;IACtD,MAAM,yBAAyB,GAAG,4BAA4B,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAE7E,MAAM,kBAAkB,iDACnB,yBAAyB,GACzB,KAAK,CAAC,kBAAkB,GACxB,KAAK,CAAC,MAAM,CAAC,kBAAkB,CACnC,CAAC;IAEF,MAAM,cAAc,GAAG,CAAC,KAAK,CAAC,SAAS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CAAC,OAAO;gBACvC,CAAC,CAAC,aAAa,CAAC,kCAAuB,CAAC,WAAW,EAAE;oBACjD,OAAO,EAAE,IAAA,uBAAU,EACjB,IAAI,IAAI,CAAE,MAAuB,CAAC,OAA4B,CAAC,EAC/D,MAAM,EACN;wBACE,QAAQ,EAAE,KAAK;wBACf,SAAS,EAAE,MAAM;qBAClB,CACF;iBACF,CAAC;gBACJ,CAAC,CAAC,SAAS;SACd,CAAC;QACF,uCACK,iBAAiB,GACjB,aAAa,EAChB;KACH;IAED,OAAO,iBAAiB,CAAC;AAC3B,CAAC;AAED,kBAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const react_intl_1 = require("react-intl");
|
|
4
|
+
exports.default = (0, react_intl_1.defineMessages)({
|
|
5
|
+
type: {
|
|
6
|
+
id: 'dynamicFlows.ControlFeedback.type',
|
|
7
|
+
defaultMessage: 'Incorrect type',
|
|
8
|
+
description: '',
|
|
9
|
+
},
|
|
10
|
+
minimum: {
|
|
11
|
+
id: 'dynamicFlows.ControlFeedback.minimum',
|
|
12
|
+
defaultMessage: `Please enter a number that's {minimum} or more.`,
|
|
13
|
+
description: '',
|
|
14
|
+
},
|
|
15
|
+
maximum: {
|
|
16
|
+
id: 'dynamicFlows.ControlFeedback.maximum',
|
|
17
|
+
defaultMessage: `Please enter a number that's {maximum} or less.`,
|
|
18
|
+
description: '',
|
|
19
|
+
},
|
|
20
|
+
minLength: {
|
|
21
|
+
id: 'dynamicFlows.ControlFeedback.minLength',
|
|
22
|
+
defaultMessage: 'Please enter at least {minLength} characters.',
|
|
23
|
+
description: '',
|
|
24
|
+
},
|
|
25
|
+
maxLength: {
|
|
26
|
+
id: 'dynamicFlows.ControlFeedback.maxLength',
|
|
27
|
+
defaultMessage: 'Please enter {maxLength} or fewer characters.',
|
|
28
|
+
description: '',
|
|
29
|
+
},
|
|
30
|
+
minimumDate: {
|
|
31
|
+
id: 'dynamicFlows.ControlFeedback.minimumDate',
|
|
32
|
+
defaultMessage: `Please enter a date that's on or after {minimum}.`,
|
|
33
|
+
description: '',
|
|
34
|
+
},
|
|
35
|
+
maximumDate: {
|
|
36
|
+
id: 'dynamicFlows.ControlFeedback.maximumDate',
|
|
37
|
+
defaultMessage: `Please enter a date that's on or before {maximum}.`,
|
|
38
|
+
description: '',
|
|
39
|
+
},
|
|
40
|
+
pattern: {
|
|
41
|
+
id: 'dynamicFlows.ControlFeedback.pattern',
|
|
42
|
+
defaultMessage: 'Please enter this in the correct format.',
|
|
43
|
+
description: '',
|
|
44
|
+
},
|
|
45
|
+
patternDate: {
|
|
46
|
+
id: 'dynamicFlows.ControlFeedback.patternDate',
|
|
47
|
+
defaultMessage: 'Please enter a date in the corrrect format.',
|
|
48
|
+
description: '',
|
|
49
|
+
},
|
|
50
|
+
required: {
|
|
51
|
+
id: 'dynamicFlows.ControlFeedback.required',
|
|
52
|
+
defaultMessage: 'Please fill out this field.',
|
|
53
|
+
description: '',
|
|
54
|
+
},
|
|
55
|
+
});
|
|
56
|
+
//# sourceMappingURL=ControlFeedback.messages.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ControlFeedback.messages.js","sourceRoot":"","sources":["../../../src/jsonSchemaForm/controlFeedback/ControlFeedback.messages.ts"],"names":[],"mappings":";;AAAA,2CAA4C;AAE5C,kBAAe,IAAA,2BAAc,EAAC;IAC5B,IAAI,EAAE;QACJ,EAAE,EAAE,mCAAmC;QACvC,cAAc,EAAE,gBAAgB;QAChC,WAAW,EAAE,EAAE;KAChB;IACD,OAAO,EAAE;QACP,EAAE,EAAE,sCAAsC;QAC1C,cAAc,EAAE,iDAAiD;QACjE,WAAW,EAAE,EAAE;KAChB;IACD,OAAO,EAAE;QACP,EAAE,EAAE,sCAAsC;QAC1C,cAAc,EAAE,iDAAiD;QACjE,WAAW,EAAE,EAAE;KAChB;IACD,SAAS,EAAE;QACT,EAAE,EAAE,wCAAwC;QAC5C,cAAc,EAAE,+CAA+C;QAC/D,WAAW,EAAE,EAAE;KAChB;IACD,SAAS,EAAE;QACT,EAAE,EAAE,wCAAwC;QAC5C,cAAc,EAAE,+CAA+C;QAC/D,WAAW,EAAE,EAAE;KAChB;IACD,WAAW,EAAE;QACX,EAAE,EAAE,0CAA0C;QAC9C,cAAc,EAAE,mDAAmD;QACnE,WAAW,EAAE,EAAE;KAChB;IACD,WAAW,EAAE;QACX,EAAE,EAAE,0CAA0C;QAC9C,cAAc,EAAE,oDAAoD;QACpE,WAAW,EAAE,EAAE;KAChB;IACD,OAAO,EAAE;QACP,EAAE,EAAE,sCAAsC;QAC1C,cAAc,EAAE,0CAA0C;QAC1D,WAAW,EAAE,EAAE;KAChB;IACD,WAAW,EAAE;QACX,EAAE,EAAE,0CAA0C;QAC9C,cAAc,EAAE,6CAA6C;QAC7D,WAAW,EAAE,EAAE;KAChB;IACD,QAAQ,EAAE;QACR,EAAE,EAAE,uCAAuC;QAC3C,cAAc,EAAE,6BAA6B;QAC7C,WAAW,EAAE,EAAE;KAChB;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
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.default = void 0;
|
|
7
|
+
var ControlFeedback_1 = require("./ControlFeedback");
|
|
8
|
+
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(ControlFeedback_1).default; } });
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/jsonSchemaForm/controlFeedback/index.ts"],"names":[],"mappings":";;;;;;AAAA,qDAA4C;AAAnC,2HAAA,OAAO,OAAA"}
|
|
@@ -0,0 +1,119 @@
|
|
|
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
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
+
const contexts_1 = require("../../common/contexts");
|
|
8
|
+
const utils_1 = require("../../common/utils");
|
|
9
|
+
const types_1 = require("../../types");
|
|
10
|
+
const Schema_1 = require("../../types/specification/Schema");
|
|
11
|
+
const allOfSchema_1 = __importDefault(require("../allOfSchema"));
|
|
12
|
+
const arrayTypeSchema_1 = __importDefault(require("../arrayTypeSchema"));
|
|
13
|
+
const basicTypeSchema_1 = __importDefault(require("../basicTypeSchema"));
|
|
14
|
+
const objectSchema_1 = __importDefault(require("../objectSchema"));
|
|
15
|
+
const oneOfSchema_1 = __importDefault(require("../oneOfSchema"));
|
|
16
|
+
const persistAsyncSchema_1 = __importDefault(require("../persistAsyncSchema"));
|
|
17
|
+
const promotedOneOfSchema_1 = __importDefault(require("../promotedOneOfSchema"));
|
|
18
|
+
const readOnlySchema_1 = __importDefault(require("../readOnlySchema"));
|
|
19
|
+
const validationAsyncSchema_1 = __importDefault(require("../validationAsyncSchema"));
|
|
20
|
+
const GenericSchemaForm = (props) => {
|
|
21
|
+
const { schema, model = null, errors = null, hideTitle = false, disabled = false } = props;
|
|
22
|
+
const schemaProps = Object.assign(Object.assign({}, props), { model, errors, hideTitle, disabled });
|
|
23
|
+
const type = (0, utils_1.getSchemaType)(schema);
|
|
24
|
+
const log = (0, contexts_1.useLogger)();
|
|
25
|
+
const logInvalidSchemaWarning = () => log.error('Invalid schema or model', `Schema of type ${type || 'undefined'} requested, but schema did not pass validation.`);
|
|
26
|
+
switch (type) {
|
|
27
|
+
case 'readOnly':
|
|
28
|
+
return (0, jsx_runtime_1.jsx)(readOnlySchema_1.default, Object.assign({}, schemaProps));
|
|
29
|
+
case 'persistAsync':
|
|
30
|
+
if ((0, types_1.isPersistAsyncSchema)(schema) && (0, types_1.isNullableStringModel)(model) && (0, types_1.isBasicError)(errors)) {
|
|
31
|
+
const filteredProps = Object.assign(Object.assign({}, schemaProps), { schema, model, errors });
|
|
32
|
+
return (0, jsx_runtime_1.jsx)(persistAsyncSchema_1.default, Object.assign({}, filteredProps));
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
// TODO: MC-3224 Remove this once people have had a chance to fix errors
|
|
36
|
+
logInvalidSchemaWarning();
|
|
37
|
+
return (0, jsx_runtime_1.jsx)(persistAsyncSchema_1.default, Object.assign({}, props));
|
|
38
|
+
}
|
|
39
|
+
case 'validationAsync':
|
|
40
|
+
if ((0, types_1.isValidationAsyncSchema)(schema) && (0, types_1.isNullableBasicModel)(model) && (0, types_1.isBasicError)(errors)) {
|
|
41
|
+
const filteredProps = Object.assign(Object.assign({}, schemaProps), { schema, model, errors });
|
|
42
|
+
return (0, jsx_runtime_1.jsx)(validationAsyncSchema_1.default, Object.assign({}, filteredProps));
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
// TODO: MC-3224
|
|
46
|
+
logInvalidSchemaWarning();
|
|
47
|
+
return (0, jsx_runtime_1.jsx)(validationAsyncSchema_1.default, Object.assign({}, props));
|
|
48
|
+
}
|
|
49
|
+
case 'basic': {
|
|
50
|
+
if ((0, types_1.isBasicSchema)(schema) && (0, types_1.isNullableBasicModel)(model) && (0, types_1.isBasicError)(errors)) {
|
|
51
|
+
const filteredProps = Object.assign(Object.assign({ infoMessage: null }, schemaProps), { schema,
|
|
52
|
+
model,
|
|
53
|
+
errors });
|
|
54
|
+
return (0, jsx_runtime_1.jsx)(basicTypeSchema_1.default, Object.assign({}, filteredProps));
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
const filteredProps = Object.assign(Object.assign({ infoMessage: null }, schemaProps), { schema,
|
|
58
|
+
model,
|
|
59
|
+
errors });
|
|
60
|
+
// TODO: MC-3224
|
|
61
|
+
logInvalidSchemaWarning();
|
|
62
|
+
return (0, jsx_runtime_1.jsx)(basicTypeSchema_1.default, Object.assign({}, filteredProps));
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
case 'object':
|
|
66
|
+
if ((0, types_1.isObjectSchema)(schema) && (0, types_1.isNullableObjectModel)(model)) {
|
|
67
|
+
const filteredProps = Object.assign(Object.assign({}, schemaProps), { schema, model, errors });
|
|
68
|
+
return (0, jsx_runtime_1.jsx)(objectSchema_1.default, Object.assign({}, filteredProps), JSON.stringify(schema));
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
// TODO: MC-3224
|
|
72
|
+
logInvalidSchemaWarning();
|
|
73
|
+
return (0, jsx_runtime_1.jsx)(objectSchema_1.default, Object.assign({}, props));
|
|
74
|
+
}
|
|
75
|
+
case 'array':
|
|
76
|
+
if ((0, types_1.isArraySchema)(schema) && (0, types_1.isNullableArrayModel)(model) && (0, types_1.isBasicError)(errors)) {
|
|
77
|
+
const filteredProps = Object.assign(Object.assign({}, schemaProps), { schema, model, errors });
|
|
78
|
+
return (0, jsx_runtime_1.jsx)(arrayTypeSchema_1.default, Object.assign({}, filteredProps));
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
// TODO: MC-3224
|
|
82
|
+
logInvalidSchemaWarning();
|
|
83
|
+
return (0, jsx_runtime_1.jsx)(arrayTypeSchema_1.default, Object.assign({}, props));
|
|
84
|
+
}
|
|
85
|
+
case 'promotedOneOf':
|
|
86
|
+
if ((0, Schema_1.isOneOfObjectSchema)(schema) && (0, types_1.isNullableObjectModel)(model)) {
|
|
87
|
+
const filteredProps = Object.assign(Object.assign({}, schemaProps), { schema, model, errors });
|
|
88
|
+
return (0, jsx_runtime_1.jsx)(promotedOneOfSchema_1.default, Object.assign({}, filteredProps));
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
// TODO: MC-3224
|
|
92
|
+
logInvalidSchemaWarning();
|
|
93
|
+
return (0, jsx_runtime_1.jsx)(promotedOneOfSchema_1.default, Object.assign({}, props));
|
|
94
|
+
}
|
|
95
|
+
case 'oneOf':
|
|
96
|
+
if ((0, types_1.isOneOfSchema)(schema)) {
|
|
97
|
+
const filteredProps = Object.assign(Object.assign({}, schemaProps), { schema, model, errors });
|
|
98
|
+
return (0, jsx_runtime_1.jsx)(oneOfSchema_1.default, Object.assign({}, filteredProps));
|
|
99
|
+
}
|
|
100
|
+
else {
|
|
101
|
+
// TODO: MC-3224
|
|
102
|
+
logInvalidSchemaWarning();
|
|
103
|
+
return (0, jsx_runtime_1.jsx)(oneOfSchema_1.default, Object.assign({}, props));
|
|
104
|
+
}
|
|
105
|
+
case 'allOf':
|
|
106
|
+
if ((0, Schema_1.isAllOfSchema)(schema) && (0, types_1.isObjectModel)(model)) {
|
|
107
|
+
const filteredProps = Object.assign(Object.assign({}, schemaProps), { schema, model, errors });
|
|
108
|
+
return (0, jsx_runtime_1.jsx)(allOfSchema_1.default, Object.assign({}, filteredProps));
|
|
109
|
+
}
|
|
110
|
+
else {
|
|
111
|
+
// TODO: MC-3224
|
|
112
|
+
logInvalidSchemaWarning();
|
|
113
|
+
return (0, jsx_runtime_1.jsx)(allOfSchema_1.default, Object.assign({}, props));
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {});
|
|
117
|
+
};
|
|
118
|
+
exports.default = GenericSchemaForm;
|
|
119
|
+
//# sourceMappingURL=GenericSchema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GenericSchema.js","sourceRoot":"","sources":["../../../src/jsonSchemaForm/genericSchema/GenericSchema.tsx"],"names":[],"mappings":";;;;;;AAAA,oDAAkD;AAClD,8CAAmD;AAEnD,uCAgBqB;AACrB,6DAAsF;AAEtF,iEAA+D;AAC/D,yEAAmE;AACnE,yEAA2E;AAC3E,mEAAkE;AAClE,iEA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,CAAC;gBAChE,OAAO,uBAAC,qBAAW,oBAAK,aAAa,EAAI,CAAC;aAC3C;iBAAM;gBACL,gBAAgB;gBAChB,uBAAuB,EAAE,CAAC;gBAC1B,OAAO,uBAAC,qBAAW,oBAAM,KAA0B,EAAI,CAAC;aACzD;KACJ;IAED,OAAO,kDAAK,CAAC;AACf,CAAC,CAAC;AAcF,kBAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
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.default = void 0;
|
|
7
|
+
var GenericSchema_1 = require("./GenericSchema");
|
|
8
|
+
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(GenericSchema_1).default; } });
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/jsonSchemaForm/genericSchema/index.ts"],"names":[],"mappings":";;;;;;AAAA,iDAA0C;AAAjC,yHAAA,OAAO,OAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
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
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
+
const components_1 = require("@transferwise/components");
|
|
8
|
+
const react_intl_1 = require("react-intl");
|
|
9
|
+
const Help_messages_1 = __importDefault(require("./Help.messages"));
|
|
10
|
+
const Help = (props) => {
|
|
11
|
+
const intl = (0, react_intl_1.useIntl)();
|
|
12
|
+
return ((0, jsx_runtime_1.jsx)(components_1.Info, { className: "m-l-1", content: (0, jsx_runtime_1.jsx)(components_1.Markdown, { children: props.help.markdown }), presentation: "POPOVER", size: "sm", "aria-label": intl.formatMessage(Help_messages_1.default.helpAria) }));
|
|
13
|
+
};
|
|
14
|
+
exports.default = Help;
|
|
15
|
+
//# sourceMappingURL=Help.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Help.js","sourceRoot":"","sources":["../../../src/jsonSchemaForm/help/Help.tsx"],"names":[],"mappings":";;;;;;AAAA,yDAA0D;AAC1D,2CAAqC;AAErC,oEAAuC;AAIvC,MAAM,IAAI,GAAG,CAAC,KAAY,EAAE,EAAE;IAC5B,MAAM,IAAI,GAAG,IAAA,oBAAO,GAAE,CAAC;IAEvB,OAAO,CACL,uBAAC,iBAAI,IACH,SAAS,EAAC,OAAO,EACjB,OAAO,EAAE,uBAAC,qBAAQ,cAAE,KAAK,CAAC,IAAI,CAAC,QAAQ,GAAY,EACnD,YAAY,EAAC,SAAS,EACtB,IAAI,EAAC,IAAI,gBACG,IAAI,CAAC,aAAa,CAAC,uBAAQ,CAAC,QAAQ,CAAC,GACjD,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const react_intl_1 = require("react-intl");
|
|
4
|
+
exports.default = (0, react_intl_1.defineMessages)({
|
|
5
|
+
helpAria: {
|
|
6
|
+
id: 'dynamicFlows.Help.ariaLabel',
|
|
7
|
+
defaultMessage: 'Click here for more info.',
|
|
8
|
+
description: 'Aria label for help.',
|
|
9
|
+
},
|
|
10
|
+
});
|
|
11
|
+
//# sourceMappingURL=Help.messages.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Help.messages.js","sourceRoot":"","sources":["../../../src/jsonSchemaForm/help/Help.messages.js"],"names":[],"mappings":";;AAAA,2CAA4C;AAE5C,kBAAe,IAAA,2BAAc,EAAC;IAC5B,QAAQ,EAAE;QACR,EAAE,EAAE,6BAA6B;QACjC,cAAc,EAAE,2BAA2B;QAC3C,WAAW,EAAE,sBAAsB;KACpC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
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.default = void 0;
|
|
7
|
+
var Help_1 = require("./Help");
|
|
8
|
+
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(Help_1).default; } });
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/jsonSchemaForm/help/index.ts"],"names":[],"mappings":";;;;;;AAAA,+BAAiC;AAAxB,gHAAA,OAAO,OAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
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.default = void 0;
|
|
7
|
+
var JsonSchemaForm_1 = require("./JsonSchemaForm");
|
|
8
|
+
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(JsonSchemaForm_1).default; } });
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/jsonSchemaForm/index.ts"],"names":[],"mappings":";;;;;;AAAA,mDAA2C;AAAlC,0HAAA,OAAO,OAAA"}
|
|
@@ -0,0 +1,63 @@
|
|
|
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
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
+
const classnames_1 = __importDefault(require("classnames"));
|
|
8
|
+
const react_1 = require("react");
|
|
9
|
+
const utils_1 = require("../../common/utils");
|
|
10
|
+
const validators_1 = require("../../common/validators");
|
|
11
|
+
const layout_1 = require("../../layout");
|
|
12
|
+
const genericSchema_1 = __importDefault(require("../genericSchema"));
|
|
13
|
+
const getSchemaColumnClasses = (width) => {
|
|
14
|
+
return {
|
|
15
|
+
'col-xs-12': true,
|
|
16
|
+
'col-sm-6': width === 'md',
|
|
17
|
+
'col-sm-4': width === 'sm',
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
const ObjectSchema = (props) => {
|
|
21
|
+
const [model, setModel] = (0, react_1.useState)(() => (Object.assign({}, (0, validators_1.getValidObjectModelParts)(props.model, props.schema))));
|
|
22
|
+
const onChangeProperty = (propertyName, onChangeProps) => {
|
|
23
|
+
if (onChangeProps.model !== null) {
|
|
24
|
+
// FIXME we should not mutate the model here
|
|
25
|
+
// eslint-disable-next-line fp/no-mutation
|
|
26
|
+
model[propertyName] = onChangeProps.model;
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
delete model[propertyName];
|
|
30
|
+
}
|
|
31
|
+
setModel(model);
|
|
32
|
+
props.onChange(Object.assign(Object.assign({}, onChangeProps), { model }));
|
|
33
|
+
};
|
|
34
|
+
const isRequired = (propertyName) => props.schema.required && props.schema.required.includes(propertyName);
|
|
35
|
+
(0, react_1.useEffect)(() => {
|
|
36
|
+
// When the schema changes, only retain valid parts of the model
|
|
37
|
+
const newModel = (0, validators_1.getValidObjectModelParts)(model, props.schema) || {};
|
|
38
|
+
setModel(newModel);
|
|
39
|
+
if (!(0, utils_1.isEqual)(newModel, model)) {
|
|
40
|
+
props.onChange({
|
|
41
|
+
model: newModel,
|
|
42
|
+
triggerSchema: props.schema,
|
|
43
|
+
triggerModel: newModel,
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
}, [props.schema]);
|
|
47
|
+
const allorderedPropertiesSet = new Set([
|
|
48
|
+
...(props.schema.displayOrder || []),
|
|
49
|
+
...Object.keys(props.schema.properties),
|
|
50
|
+
]);
|
|
51
|
+
const isPropertyDefined = (propertyName) => typeof props.schema.properties[propertyName] !== 'undefined';
|
|
52
|
+
// eslint-disable-next-line unicorn/prefer-spread
|
|
53
|
+
const orderedPropertyNames = Array.from(allorderedPropertiesSet).filter(isPropertyDefined);
|
|
54
|
+
// TODO: LOW avoid type assertion -- what happens when props.errors is not an object?
|
|
55
|
+
const propsErrors = props.errors;
|
|
56
|
+
return ((0, jsx_runtime_1.jsxs)("fieldset", { children: [props.schema.title && !props.hideTitle && (0, jsx_runtime_1.jsxs)("legend", { children: [" ", props.schema.title, " "] }), props.schema.description && !props.hideTitle && (0, jsx_runtime_1.jsxs)("p", { children: [" ", props.schema.description, " "] }), props.schema.alert && (0, jsx_runtime_1.jsx)(layout_1.DynamicAlert, { component: props.schema.alert }), (0, jsx_runtime_1.jsx)("div", Object.assign({ className: "row" }, { children: orderedPropertyNames.map((propertyName) => ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: (0, classnames_1.default)(getSchemaColumnClasses(props.schema.properties[propertyName].width)) }, { children: (0, jsx_runtime_1.jsx)(genericSchema_1.default, { schema: props.schema.properties[propertyName], model: props.model && props.model[propertyName], errors: propsErrors && propsErrors[propertyName], submitted: props.submitted, required: isRequired(propertyName), disabled: props.disabled, onChange: (onChangeProps) => onChangeProperty(propertyName, onChangeProps), onPersistAsync: props.onPersistAsync }) }), propertyName))) }))] }));
|
|
57
|
+
};
|
|
58
|
+
ObjectSchema.defaultProps = {
|
|
59
|
+
hideTitle: false,
|
|
60
|
+
disabled: false,
|
|
61
|
+
};
|
|
62
|
+
exports.default = Object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,SAAM,EAEnF,KAAK,CAAC,MAAM,CAAC,KAAK,IAAI,uBAAC,qBAAY,IAAC,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,GAAI,EAEtE,8CAAK,SAAS,EAAC,KAAK,gBACjB,oBAAoB,CAAC,GAAG,CAAC,CAAC,YAAY,EAAE,EAAE,CAAC,CAC1C,8CAEE,SAAS,EAAE,IAAA,oBAAU,EACnB,sBAAsB,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,KAAK,CAAC,CACpE,gBAED,uBAAC,uBAAa,IACZ,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,YAAY,CAAC,EAC7C,KAAK,EAAE,KAAK,CAAC,KAAK,IAAI,KAAK,CAAC,KAAK,CAAC,YAAY,CAAC,EAC/C,MAAM,EAAE,WAAW,IAAI,WAAW,CAAC,YAAY,CAAC,EAChD,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,QAAQ,EAAE,UAAU,CAAC,YAAY,CAAC,EAClC,QAAQ,EAAE,KAAK,CAAC,QAAQ,EACxB,QAAQ,EAAE,CAAC,aAAa,EAAE,EAAE,CAAC,gBAAgB,CAAC,YAAY,EAAE,aAAa,CAAC,EAC1E,cAAc,EAAE,KAAK,CAAC,cAAc,GACpC,KAdG,YAAY,CAeb,CACP,CAAC,IACE,IACG,CACZ,CAAC;AACJ,CAAC,CAAC;AAQF,YAAY,CAAC,YAAY,GAAG;IAC1B,SAAS,EAAE,KAAK;IAChB,QAAQ,EAAE,KAAK;CAChB,CAAC;AAEF,kBAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
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.default = void 0;
|
|
7
|
+
var ObjectSchema_1 = require("./ObjectSchema");
|
|
8
|
+
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(ObjectSchema_1).default; } });
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/jsonSchemaForm/objectSchema/index.ts"],"names":[],"mappings":";;;;;;AAAA,+CAAyC;AAAhC,wHAAA,OAAO,OAAA"}
|