@wise/dynamic-flow-client 0.3.0-beta-d45b31.38 → 0.3.0
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 +50 -28
- package/build/common/constants/DateMode.d.ts +4 -0
- package/build/common/constants/DateMode.js +4 -0
- package/build/common/constants/FormControlType.d.ts +17 -0
- package/build/common/constants/FormControlType.js +17 -0
- package/build/common/constants/MonthFormat.d.ts +4 -0
- package/build/common/constants/MonthFormat.js +4 -0
- package/build/common/constants/SchemaType.d.ts +11 -0
- package/build/common/constants/SchemaType.js +11 -0
- package/build/common/constants/Size.d.ts +7 -0
- package/build/common/constants/Size.js +7 -0
- package/build/common/constants/index.d.ts +5 -0
- package/build/common/constants/index.js +5 -0
- package/build/common/contexts/dynamicFlowContexts/DynamicFlowContexts.d.ts +11 -0
- package/build/common/contexts/dynamicFlowContexts/DynamicFlowContexts.js +36 -0
- package/build/common/contexts/dynamicFlowContexts/usePendingPromiseCounter.d.ts +4 -0
- package/build/common/contexts/dynamicFlowContexts/usePendingPromiseCounter.js +13 -0
- package/build/common/contexts/eventsContext/EventsContext.d.ts +15 -0
- package/build/common/contexts/eventsContext/EventsContext.js +33 -0
- package/build/common/contexts/fetcherContexts/FetcherContexts.d.ts +18 -0
- package/build/common/contexts/fetcherContexts/FetcherContexts.js +35 -0
- package/build/common/contexts/index.d.ts +4 -0
- package/build/common/contexts/index.js +4 -0
- package/build/common/contexts/logContext/LogContext.d.ts +22 -0
- package/build/common/contexts/logContext/LogContext.js +39 -0
- package/build/common/hooks/index.d.ts +7 -0
- package/build/common/hooks/index.js +7 -0
- package/build/common/hooks/useDebouncedFunction/useDebouncedFunction.d.ts +2 -0
- package/build/common/hooks/useDebouncedFunction/useDebouncedFunction.js +9 -0
- package/build/common/hooks/useExternal/useExternal.d.ts +4 -0
- package/build/common/hooks/useExternal/useExternal.js +15 -0
- package/build/common/hooks/useExternalStepPolling/useExternalStepPolling.d.ts +12 -0
- package/build/common/hooks/useExternalStepPolling/useExternalStepPolling.js +69 -0
- package/build/common/hooks/usePersistAsync/usePersistAsync.d.ts +7 -0
- package/build/common/hooks/usePersistAsync/usePersistAsync.js +170 -0
- package/build/common/hooks/usePolling/usePolling.d.ts +11 -0
- package/build/common/hooks/usePolling/usePolling.js +48 -0
- package/build/common/hooks/usePrevious/usePrevious.d.ts +1 -0
- package/build/common/hooks/usePrevious/usePrevious.js +8 -0
- package/build/common/hooks/useStepPolling/useStepPolling.d.ts +2 -0
- package/build/common/hooks/useStepPolling/useStepPolling.js +44 -0
- package/build/common/makeFetcher/index.d.ts +1 -0
- package/build/common/makeFetcher/index.js +1 -0
- package/build/common/makeFetcher/makeFetcher.d.ts +2 -0
- package/build/common/makeFetcher/makeFetcher.js +33 -0
- package/build/common/messages.d.ts +8 -0
- package/build/common/messages.js +8 -0
- package/build/common/utils/api-utils.d.ts +4 -0
- package/build/common/utils/api-utils.js +13 -0
- package/build/common/utils/date-utils.d.ts +2 -0
- package/build/common/utils/date-utils.js +22 -0
- package/build/common/utils/debounce.d.ts +6 -0
- package/build/common/utils/debounce.js +38 -0
- package/build/common/utils/file-utils.d.ts +4 -0
- package/build/common/utils/file-utils.js +45 -0
- package/build/common/utils/id-utils.d.ts +1 -0
- package/build/common/utils/id-utils.js +5 -0
- package/build/common/utils/index.d.ts +8 -0
- package/build/common/utils/index.js +8 -0
- package/build/common/utils/is-equal.d.ts +1 -0
- package/build/common/utils/is-equal.js +21 -0
- package/build/common/utils/schema-utils.d.ts +13 -0
- package/build/common/utils/schema-utils.js +48 -0
- package/build/common/utils/step-utils.d.ts +7 -0
- package/build/common/utils/step-utils.js +42 -0
- package/build/common/validators/index.d.ts +5 -0
- package/build/common/validators/index.js +5 -0
- package/build/common/validators/models/model-validators.d.ts +4 -0
- package/build/common/validators/models/model-validators.js +63 -0
- package/build/common/validators/models/models.utils.d.ts +10 -0
- package/build/common/validators/models/models.utils.js +118 -0
- package/build/common/validators/schemas/schema-validators.d.ts +9 -0
- package/build/common/validators/schemas/schema-validators.js +98 -0
- package/build/common/validators/types/type-validators.d.ts +8 -0
- package/build/common/validators/types/type-validators.js +14 -0
- package/build/common/validators/validationFailures/validation-failures.d.ts +23 -0
- package/build/common/validators/validationFailures/validation-failures.js +140 -0
- package/build/common/validators/validationFailures/validation-failures.utils.d.ts +10 -0
- package/build/common/validators/validationFailures/validation-failures.utils.js +40 -0
- package/build/common/validators/values/value-validators.d.ts +2 -0
- package/build/common/validators/values/value-validators.js +6 -0
- package/build/dynamicFlow/DynamicFlow.d.ts +3 -0
- package/build/dynamicFlow/DynamicFlow.js +370 -0
- package/build/dynamicFlow/DynamicFlowStep.d.ts +8 -0
- package/build/dynamicFlow/DynamicFlowStep.js +32 -0
- package/build/dynamicFlow/DynamicFlowTypes.d.ts +51 -0
- package/build/dynamicFlow/DynamicFlowTypes.js +4 -0
- package/build/dynamicFlow/index.d.ts +1 -0
- package/build/dynamicFlow/index.js +1 -0
- package/build/dynamicFlow/stories/DynamicFlow.story.d.ts +1 -0
- package/build/dynamicFlow/stories/DynamicFlow.story.js +30 -0
- package/build/dynamicFlow/stories/EditableDynamicFlow.d.ts +4 -0
- package/build/dynamicFlow/stories/EditableDynamicFlow.js +62 -0
- package/build/dynamicFlow/stories/fixtureFetcher.d.ts +2 -0
- package/build/dynamicFlow/stories/fixtureFetcher.js +114 -0
- package/build/dynamicFlow/utils/errorBoundary/ErrorBoundary.d.ts +20 -0
- package/build/dynamicFlow/utils/errorBoundary/ErrorBoundary.js +45 -0
- package/build/dynamicFlow/utils/errorBoundary/ErrorBoundary.messages.d.ts +13 -0
- package/build/dynamicFlow/utils/errorBoundary/ErrorBoundary.messages.js +13 -0
- package/build/dynamicFlow/utils/errorBoundary/ErrorBoundaryAlert.d.ts +5 -0
- package/build/dynamicFlow/utils/errorBoundary/ErrorBoundaryAlert.js +12 -0
- package/build/dynamicFlow/utils/index.d.ts +5 -0
- package/build/dynamicFlow/utils/index.js +5 -0
- package/build/dynamicFlow/utils/responseParsers/response-parsers.d.ts +17 -0
- package/build/dynamicFlow/utils/responseParsers/response-parsers.js +125 -0
- package/build/dynamicFlow/utils/useDebouncedRefresh/useDebouncedRefresh.d.ts +5 -0
- package/build/dynamicFlow/utils/useDebouncedRefresh/useDebouncedRefresh.js +23 -0
- package/build/dynamicFlow/utils/useDynamicFlowState.d.ts +18 -0
- package/build/dynamicFlow/utils/useDynamicFlowState.js +110 -0
- package/build/dynamicFlow/utils/useLoader.d.ts +9 -0
- package/build/dynamicFlow/utils/useLoader.js +22 -0
- package/build/fixtures/components/alert.d.ts +3 -0
- package/build/fixtures/components/alert.js +31 -0
- package/build/fixtures/components/box.d.ts +3 -0
- package/build/fixtures/components/box.js +20 -0
- package/build/fixtures/components/button.d.ts +3 -0
- package/build/fixtures/components/button.js +65 -0
- package/build/fixtures/components/columns.d.ts +3 -0
- package/build/fixtures/components/columns.js +36 -0
- package/build/fixtures/components/copyable.d.ts +3 -0
- package/build/fixtures/components/copyable.js +22 -0
- package/build/fixtures/components/decision.d.ts +3 -0
- package/build/fixtures/components/decision.js +54 -0
- package/build/fixtures/components/heading.d.ts +3 -0
- package/build/fixtures/components/heading.js +14 -0
- package/build/fixtures/components/image.d.ts +3 -0
- package/build/fixtures/components/image.js +23 -0
- package/build/fixtures/components/index.d.ts +13 -0
- package/build/fixtures/components/index.js +13 -0
- package/build/fixtures/components/info.d.ts +3 -0
- package/build/fixtures/components/info.js +17 -0
- package/build/fixtures/components/list.d.ts +3 -0
- package/build/fixtures/components/list.js +34 -0
- package/build/fixtures/components/loading-indicator.d.ts +3 -0
- package/build/fixtures/components/loading-indicator.js +16 -0
- package/build/fixtures/components/paragraph.d.ts +3 -0
- package/build/fixtures/components/paragraph.js +28 -0
- package/build/fixtures/components/review.d.ts +3 -0
- package/build/fixtures/components/review.js +60 -0
- package/build/fixtures/examples/camera-capture.d.ts +3 -0
- package/build/fixtures/examples/camera-capture.js +121 -0
- package/build/fixtures/examples/index.d.ts +5 -0
- package/build/fixtures/examples/index.js +5 -0
- package/build/fixtures/examples/recipient-update.d.ts +3 -0
- package/build/fixtures/examples/recipient-update.js +250 -0
- package/build/fixtures/examples/recipient.d.ts +3 -0
- package/build/fixtures/examples/recipient.js +313 -0
- package/build/fixtures/examples/single-file-upload.d.ts +3 -0
- package/build/fixtures/examples/single-file-upload.js +98 -0
- package/build/fixtures/examples/step-validation-errors.d.ts +3 -0
- package/build/fixtures/examples/step-validation-errors.js +75 -0
- package/build/fixtures/features/action-response.d.ts +3 -0
- package/build/fixtures/features/action-response.js +29 -0
- package/build/fixtures/features/external.d.ts +3 -0
- package/build/fixtures/features/external.js +31 -0
- package/build/fixtures/features/index.d.ts +5 -0
- package/build/fixtures/features/index.js +5 -0
- package/build/fixtures/features/persist-async.d.ts +3 -0
- package/build/fixtures/features/persist-async.js +44 -0
- package/build/fixtures/features/polling.d.ts +3 -0
- package/build/fixtures/features/polling.js +33 -0
- package/build/fixtures/features/validation-async.d.ts +3 -0
- package/build/fixtures/features/validation-async.js +38 -0
- package/build/fixtures/index.d.ts +46 -0
- package/build/fixtures/index.js +23 -0
- package/build/fixtures/jsonSchemaForm/allOf.d.ts +3 -0
- package/build/fixtures/jsonSchemaForm/allOf.js +119 -0
- package/build/fixtures/jsonSchemaForm/audRecipient.d.ts +3 -0
- package/build/fixtures/jsonSchemaForm/audRecipient.js +1104 -0
- package/build/fixtures/jsonSchemaForm/currency.d.ts +3 -0
- package/build/fixtures/jsonSchemaForm/currency.js +48 -0
- package/build/fixtures/jsonSchemaForm/multipleFileUploadBase64.d.ts +3 -0
- package/build/fixtures/jsonSchemaForm/multipleFileUploadBase64.js +37 -0
- package/build/fixtures/jsonSchemaForm/multipleFileUploadBlob.d.ts +3 -0
- package/build/fixtures/jsonSchemaForm/multipleFileUploadBlob.js +36 -0
- package/build/fixtures/jsonSchemaForm/oneOf.d.ts +3 -0
- package/build/fixtures/jsonSchemaForm/oneOf.js +119 -0
- package/build/fixtures/jsonSchemaForm/oneOfTabs.d.ts +3 -0
- package/build/fixtures/jsonSchemaForm/oneOfTabs.js +53 -0
- package/build/fixtures/jsonSchemaForm/promotedOneOf.d.ts +3 -0
- package/build/fixtures/jsonSchemaForm/promotedOneOf.js +56 -0
- package/build/fixtures/jsonSchemaForm/promotedOneOfCheckbox.d.ts +3 -0
- package/build/fixtures/jsonSchemaForm/promotedOneOfCheckbox.js +102 -0
- package/build/fixtures/jsonSchemaForm/simple.d.ts +3 -0
- package/build/fixtures/jsonSchemaForm/simple.js +48 -0
- package/build/fixtures/jsonSchemaForm/uploadPersistAsync.d.ts +3 -0
- package/build/fixtures/jsonSchemaForm/uploadPersistAsync.js +71 -0
- package/build/fixtures/jsonSchemaForm/validationAsync.d.ts +3 -0
- package/build/fixtures/jsonSchemaForm/validationAsync.js +23 -0
- package/build/fixtures/layouts/all.d.ts +3 -0
- package/build/fixtures/layouts/all.js +176 -0
- package/build/fixtures/layouts/final-step-layout.d.ts +3 -0
- package/build/fixtures/layouts/final-step-layout.js +39 -0
- package/build/fixtures/layouts/index.d.ts +6 -0
- package/build/fixtures/layouts/index.js +6 -0
- package/build/fixtures/layouts/list.d.ts +3 -0
- package/build/fixtures/layouts/list.js +33 -0
- package/build/fixtures/layouts/pay-in.d.ts +3 -0
- package/build/fixtures/layouts/pay-in.js +97 -0
- package/build/fixtures/layouts/review.d.ts +3 -0
- package/build/fixtures/layouts/review.js +160 -0
- package/build/fixtures/layouts/success.d.ts +3 -0
- package/build/fixtures/layouts/success.js +66 -0
- package/build/fixtures/responses/action-response-final.d.ts +3 -0
- package/build/fixtures/responses/action-response-final.js +24 -0
- package/build/fixtures/responses/action.d.ts +5 -0
- package/build/fixtures/responses/action.js +2 -0
- package/build/fixtures/responses/exit.d.ts +6 -0
- package/build/fixtures/responses/exit.js +2 -0
- package/build/fixtures/responses/index.d.ts +4 -0
- package/build/fixtures/responses/index.js +4 -0
- package/build/fixtures/responses/recipient-update-final.d.ts +3 -0
- package/build/fixtures/responses/recipient-update-final.js +24 -0
- package/build/fixtures/schemas/basic-form.d.ts +3 -0
- package/build/fixtures/schemas/basic-form.js +39 -0
- package/build/fixtures/schemas/index.d.ts +4 -0
- package/build/fixtures/schemas/index.js +4 -0
- package/build/fixtures/schemas/number-and-integer.d.ts +3 -0
- package/build/fixtures/schemas/number-and-integer.js +41 -0
- package/build/fixtures/schemas/one-of.d.ts +3 -0
- package/build/fixtures/schemas/one-of.js +223 -0
- package/build/fixtures/schemas/string-formats.d.ts +3 -0
- package/build/fixtures/schemas/string-formats.js +62 -0
- package/build/fixtures/utils/image-util.d.ts +2 -0
- package/build/fixtures/utils/image-util.js +18 -0
- package/build/formControl/FormControl.d.ts +86 -0
- package/build/formControl/FormControl.js +241 -0
- package/build/formControl/index.d.ts +1 -0
- package/build/formControl/index.js +1 -0
- package/build/formControl/utils/index.d.ts +1 -0
- package/build/formControl/utils/index.js +1 -0
- package/build/formControl/utils/value-utils.d.ts +9 -0
- package/build/formControl/utils/value-utils.js +108 -0
- package/build/i18n/cs.json +8 -0
- package/build/i18n/de.json +38 -0
- package/build/i18n/en.json +38 -0
- package/build/i18n/es.json +38 -0
- package/build/i18n/fr.json +38 -0
- package/build/i18n/hu.json +38 -0
- package/build/i18n/id.json +38 -0
- package/build/i18n/index.d.ts +2 -0
- package/build/i18n/index.js +31 -0
- package/build/i18n/it.json +38 -0
- package/build/i18n/ja.json +38 -0
- package/build/i18n/pl.json +38 -0
- package/build/i18n/pt.json +38 -0
- package/build/i18n/ro.json +38 -0
- package/build/i18n/ru.json +38 -0
- package/build/i18n/th.json +38 -0
- package/build/i18n/tr.json +38 -0
- package/build/i18n/uk.json +8 -0
- package/build/i18n/zh-CN.json +38 -0
- package/build/i18n/zh.json +38 -0
- package/build/index.d.ts +11 -0
- package/build/index.js +9 -0
- package/build/jsonSchemaForm/JsonSchemaForm.d.ts +64 -0
- package/build/jsonSchemaForm/JsonSchemaForm.js +29 -0
- package/build/jsonSchemaForm/allOfSchema/AllOfSchema.d.ts +13 -0
- package/build/jsonSchemaForm/allOfSchema/AllOfSchema.js +54 -0
- package/build/jsonSchemaForm/allOfSchema/index.d.ts +2 -0
- package/build/jsonSchemaForm/allOfSchema/index.js +1 -0
- package/build/jsonSchemaForm/arrayTypeSchema/ArraySchema.d.ts +14 -0
- package/build/jsonSchemaForm/arrayTypeSchema/ArraySchema.js +25 -0
- package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/ArrayListSchema.d.ts +15 -0
- package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/ArrayListSchema.js +26 -0
- package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/index.d.ts +1 -0
- package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/index.js +1 -0
- package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/MultipleFileUploadSchema.d.ts +17 -0
- package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/MultipleFileUploadSchema.js +140 -0
- package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/MultipleFileUploadSchema.messages.d.ts +24 -0
- package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/MultipleFileUploadSchema.messages.js +18 -0
- package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/index.d.ts +1 -0
- package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/index.js +1 -0
- package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/index.d.ts +2 -0
- package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/index.js +2 -0
- package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/upload-utils.d.ts +6 -0
- package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/upload-utils.js +84 -0
- package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/useFormattedDefaultErrorMessages.d.ts +9 -0
- package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/useFormattedDefaultErrorMessages.js +14 -0
- package/build/jsonSchemaForm/arrayTypeSchema/index.d.ts +2 -0
- package/build/jsonSchemaForm/arrayTypeSchema/index.js +1 -0
- package/build/jsonSchemaForm/basicTypeSchema/BasicTypeSchema.d.ts +21 -0
- package/build/jsonSchemaForm/basicTypeSchema/BasicTypeSchema.js +103 -0
- package/build/jsonSchemaForm/basicTypeSchema/index.d.ts +2 -0
- package/build/jsonSchemaForm/basicTypeSchema/index.js +1 -0
- package/build/jsonSchemaForm/controlFeedback/ControlFeedback.d.ts +30 -0
- package/build/jsonSchemaForm/controlFeedback/ControlFeedback.js +79 -0
- package/build/jsonSchemaForm/controlFeedback/ControlFeedback.messages.d.ts +53 -0
- package/build/jsonSchemaForm/controlFeedback/ControlFeedback.messages.js +53 -0
- package/build/jsonSchemaForm/controlFeedback/index.d.ts +1 -0
- package/build/jsonSchemaForm/controlFeedback/index.js +1 -0
- package/build/jsonSchemaForm/genericSchema/GenericSchema.d.ts +18 -0
- package/build/jsonSchemaForm/genericSchema/GenericSchema.js +122 -0
- package/build/jsonSchemaForm/genericSchema/index.d.ts +1 -0
- package/build/jsonSchemaForm/genericSchema/index.js +1 -0
- package/build/jsonSchemaForm/help/Help.d.ts +7 -0
- package/build/jsonSchemaForm/help/Help.js +9 -0
- package/build/jsonSchemaForm/help/Help.messages.d.ts +8 -0
- package/build/jsonSchemaForm/help/Help.messages.js +8 -0
- package/build/jsonSchemaForm/help/index.d.ts +1 -0
- package/build/jsonSchemaForm/help/index.js +1 -0
- package/build/jsonSchemaForm/index.d.ts +1 -0
- package/build/jsonSchemaForm/index.js +1 -0
- package/build/jsonSchemaForm/objectSchema/ObjectSchema.d.ts +15 -0
- package/build/jsonSchemaForm/objectSchema/ObjectSchema.js +78 -0
- package/build/jsonSchemaForm/objectSchema/index.d.ts +2 -0
- package/build/jsonSchemaForm/objectSchema/index.js +1 -0
- package/build/jsonSchemaForm/oneOfSchema/OneOfSchema.d.ts +14 -0
- package/build/jsonSchemaForm/oneOfSchema/OneOfSchema.js +150 -0
- package/build/jsonSchemaForm/oneOfSchema/index.d.ts +2 -0
- package/build/jsonSchemaForm/oneOfSchema/index.js +1 -0
- package/build/jsonSchemaForm/oneOfSchema/utils/const-schema-utils.d.ts +3 -0
- package/build/jsonSchemaForm/oneOfSchema/utils/const-schema-utils.js +8 -0
- package/build/jsonSchemaForm/oneOfSchema/utils/index.d.ts +2 -0
- package/build/jsonSchemaForm/oneOfSchema/utils/index.js +2 -0
- package/build/jsonSchemaForm/oneOfSchema/utils/one-of-utils.d.ts +5 -0
- package/build/jsonSchemaForm/oneOfSchema/utils/one-of-utils.js +64 -0
- package/build/jsonSchemaForm/persistAsyncSchema/PersistAsyncSchema.d.ts +15 -0
- package/build/jsonSchemaForm/persistAsyncSchema/PersistAsyncSchema.js +26 -0
- package/build/jsonSchemaForm/persistAsyncSchema/PersistAsyncSchema.messages.d.ts +8 -0
- package/build/jsonSchemaForm/persistAsyncSchema/PersistAsyncSchema.messages.js +8 -0
- package/build/jsonSchemaForm/persistAsyncSchema/index.d.ts +2 -0
- package/build/jsonSchemaForm/persistAsyncSchema/index.js +1 -0
- package/build/jsonSchemaForm/persistAsyncSchema/persistAsyncBasicSchema/PersistAsyncBasicSchema.d.ts +20 -0
- package/build/jsonSchemaForm/persistAsyncSchema/persistAsyncBasicSchema/PersistAsyncBasicSchema.js +165 -0
- package/build/jsonSchemaForm/persistAsyncSchema/persistAsyncBasicSchema/index.d.ts +1 -0
- package/build/jsonSchemaForm/persistAsyncSchema/persistAsyncBasicSchema/index.js +1 -0
- package/build/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/PersistAsyncBlobSchema.d.ts +19 -0
- package/build/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/PersistAsyncBlobSchema.js +126 -0
- package/build/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/UploadInputAdapter.d.ts +16 -0
- package/build/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/UploadInputAdapter.js +32 -0
- package/build/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/index.d.ts +1 -0
- package/build/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/index.js +1 -0
- package/build/jsonSchemaForm/promotedOneOfSchema/PromotedOneOfSchema.d.ts +8 -0
- package/build/jsonSchemaForm/promotedOneOfSchema/PromotedOneOfSchema.js +72 -0
- package/build/jsonSchemaForm/promotedOneOfSchema/index.d.ts +2 -0
- package/build/jsonSchemaForm/promotedOneOfSchema/index.js +1 -0
- package/build/jsonSchemaForm/promotedOneOfSchema/promoted-one-of-utils.d.ts +2 -0
- package/build/jsonSchemaForm/promotedOneOfSchema/promoted-one-of-utils.js +8 -0
- package/build/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfCheckboxControl.d.ts +6 -0
- package/build/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfCheckboxControl.js +27 -0
- package/build/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfControl.d.ts +23 -0
- package/build/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfControl.js +31 -0
- package/build/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfRadioControl.d.ts +8 -0
- package/build/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfRadioControl.js +32 -0
- package/build/jsonSchemaForm/readOnlySchema/ReadOnlySchema.d.ts +7 -0
- package/build/jsonSchemaForm/readOnlySchema/ReadOnlySchema.js +55 -0
- package/build/jsonSchemaForm/readOnlySchema/ReadOnlySchema.messages.d.ts +16 -0
- package/build/jsonSchemaForm/readOnlySchema/ReadOnlySchema.messages.js +13 -0
- package/build/jsonSchemaForm/readOnlySchema/index.d.ts +1 -0
- package/build/jsonSchemaForm/readOnlySchema/index.js +1 -0
- package/build/jsonSchemaForm/schemaFormControl/SchemaFormControl.d.ts +24 -0
- package/build/jsonSchemaForm/schemaFormControl/SchemaFormControl.js +104 -0
- package/build/jsonSchemaForm/schemaFormControl/index.d.ts +1 -0
- package/build/jsonSchemaForm/schemaFormControl/index.js +1 -0
- package/build/jsonSchemaForm/schemaFormControl/utils/currency-utils.d.ts +3 -0
- package/build/jsonSchemaForm/schemaFormControl/utils/currency-utils.js +73 -0
- package/build/jsonSchemaForm/schemaFormControl/utils/index.d.ts +1 -0
- package/build/jsonSchemaForm/schemaFormControl/utils/index.js +1 -0
- package/build/jsonSchemaForm/schemaFormControl/utils/mapping-utils.d.ts +34 -0
- package/build/jsonSchemaForm/schemaFormControl/utils/mapping-utils.js +95 -0
- package/build/jsonSchemaForm/validationAsyncSchema/ValidationAsyncSchema.d.ts +16 -0
- package/build/jsonSchemaForm/validationAsyncSchema/ValidationAsyncSchema.js +146 -0
- package/build/jsonSchemaForm/validationAsyncSchema/index.d.ts +2 -0
- package/build/jsonSchemaForm/validationAsyncSchema/index.js +1 -0
- package/build/layout/DynamicLayout.d.ts +16 -0
- package/build/layout/DynamicLayout.js +61 -0
- package/build/layout/alert/DynamicAlert.d.ts +5 -0
- package/build/layout/alert/DynamicAlert.js +29 -0
- package/build/layout/box/DynamicBox.d.ts +7 -0
- package/build/layout/box/DynamicBox.js +41 -0
- package/build/layout/button/DynamicButton.d.ts +7 -0
- package/build/layout/button/DynamicButton.js +58 -0
- package/build/layout/columns/DynamicColumns.d.ts +7 -0
- package/build/layout/columns/DynamicColumns.js +38 -0
- package/build/layout/decision/DynamicDecision.d.ts +8 -0
- package/build/layout/decision/DynamicDecision.js +38 -0
- package/build/layout/divider/DynamicDivider.d.ts +6 -0
- package/build/layout/divider/DynamicDivider.js +9 -0
- package/build/layout/external/DynamicExternal.d.ts +8 -0
- package/build/layout/external/DynamicExternal.js +32 -0
- package/build/layout/external/DynamicExternal.messages.d.ts +8 -0
- package/build/layout/external/DynamicExternal.messages.js +8 -0
- package/build/layout/form/DynamicForm.d.ts +7 -0
- package/build/layout/form/DynamicForm.js +22 -0
- package/build/layout/heading/DynamicHeading.d.ts +5 -0
- package/build/layout/heading/DynamicHeading.js +31 -0
- package/build/layout/icon/DynamicIcon.d.ts +6 -0
- package/build/layout/icon/DynamicIcon.js +23 -0
- package/build/layout/image/DynamicImage.d.ts +6 -0
- package/build/layout/image/DynamicImage.js +110 -0
- package/build/layout/index.d.ts +17 -0
- package/build/layout/index.js +17 -0
- package/build/layout/info/DynamicInfo.d.ts +6 -0
- package/build/layout/info/DynamicInfo.js +19 -0
- package/build/layout/list/DynamicList.d.ts +7 -0
- package/build/layout/list/DynamicList.js +31 -0
- package/build/layout/loadingIndicator/DynamicLoadingIndicator.d.ts +6 -0
- package/build/layout/loadingIndicator/DynamicLoadingIndicator.js +11 -0
- package/build/layout/paragraph/DynamicParagraph.d.ts +6 -0
- package/build/layout/paragraph/DynamicParagraph.js +43 -0
- package/build/layout/paragraph/DynamicParagraph.messages.d.ts +13 -0
- package/build/layout/paragraph/DynamicParagraph.messages.js +13 -0
- package/build/layout/paragraph/useSnackBarIfAvailable.d.ts +10 -0
- package/build/layout/paragraph/useSnackBarIfAvailable.js +9 -0
- package/build/layout/review/DynamicReview.d.ts +8 -0
- package/build/layout/review/DynamicReview.js +33 -0
- package/build/layout/utils.d.ts +7 -0
- package/build/layout/utils.js +31 -0
- package/build/main.css +185 -0
- package/build/step/cameraStep/CameraStep.d.ts +7 -0
- package/build/step/cameraStep/CameraStep.js +125 -0
- package/build/step/cameraStep/cameraCapture/CameraCapture.d.ts +15 -0
- package/build/step/cameraStep/cameraCapture/CameraCapture.js +122 -0
- package/build/step/cameraStep/cameraCapture/CameraCapture.messages.d.ts +18 -0
- package/build/step/cameraStep/cameraCapture/CameraCapture.messages.js +18 -0
- package/build/step/cameraStep/cameraCapture/components/index.d.ts +7 -0
- package/build/step/cameraStep/cameraCapture/components/index.js +28 -0
- package/build/step/cameraStep/cameraCapture/hooks/index.d.ts +4 -0
- package/build/step/cameraStep/cameraCapture/hooks/index.js +80 -0
- package/build/step/cameraStep/cameraCapture/index.d.ts +1 -0
- package/build/step/cameraStep/cameraCapture/index.js +1 -0
- package/build/step/cameraStep/cameraCapture/overlay/Overlay.d.ts +10 -0
- package/build/step/cameraStep/cameraCapture/overlay/Overlay.js +78 -0
- package/build/step/cameraStep/cameraCapture/screens/CameraNotSupported/CameraNotSupported.d.ts +2 -0
- package/build/step/cameraStep/cameraCapture/screens/CameraNotSupported/CameraNotSupported.js +19 -0
- package/build/step/cameraStep/cameraCapture/screens/CameraNotSupported/CameraNotSupported.messages.d.ts +13 -0
- package/build/step/cameraStep/cameraCapture/screens/CameraNotSupported/CameraNotSupported.messages.js +13 -0
- package/build/step/cameraStep/cameraCapture/screens/NoCameraAccess/NoCameraAccess.d.ts +5 -0
- package/build/step/cameraStep/cameraCapture/screens/NoCameraAccess/NoCameraAccess.js +21 -0
- package/build/step/cameraStep/cameraCapture/screens/NoCameraAccess/NoCameraAccess.messages.d.ts +18 -0
- package/build/step/cameraStep/cameraCapture/screens/NoCameraAccess/NoCameraAccess.messages.js +18 -0
- package/build/step/cameraStep/cameraCapture/screens/index.d.ts +2 -0
- package/build/step/cameraStep/cameraCapture/screens/index.js +2 -0
- package/build/step/cameraStep/cameraCapture/tracking/index.d.ts +7 -0
- package/build/step/cameraStep/cameraCapture/tracking/index.js +98 -0
- package/build/step/cameraStep/cameraCapture/utils/index.d.ts +8 -0
- package/build/step/cameraStep/cameraCapture/utils/index.js +103 -0
- package/build/step/cameraStep/index.d.ts +1 -0
- package/build/step/cameraStep/index.js +1 -0
- package/build/step/externalConfirmationStep/ExternalConfirmationStep.d.ts +6 -0
- package/build/step/externalConfirmationStep/ExternalConfirmationStep.js +64 -0
- package/build/step/externalConfirmationStep/ExternalConfirmationStep.messages.d.ts +23 -0
- package/build/step/externalConfirmationStep/ExternalConfirmationStep.messages.js +23 -0
- package/build/step/externalConfirmationStep/index.d.ts +1 -0
- package/build/step/externalConfirmationStep/index.js +1 -0
- package/build/step/index.d.ts +3 -0
- package/build/step/index.js +3 -0
- package/build/step/layoutStep/LayoutStep.d.ts +10 -0
- package/build/step/layoutStep/LayoutStep.js +33 -0
- package/build/step/layoutStep/index.d.ts +1 -0
- package/build/step/layoutStep/index.js +1 -0
- package/build/step/layoutStep/utils/index.d.ts +2 -0
- package/build/step/layoutStep/utils/index.js +2 -0
- package/build/step/layoutStep/utils/inline-reference-utils.d.ts +7 -0
- package/build/step/layoutStep/utils/inline-reference-utils.js +91 -0
- package/build/step/layoutStep/utils/layout-utils.d.ts +8 -0
- package/build/step/layoutStep/utils/layout-utils.js +217 -0
- package/build/types/common/FormControl.d.ts +57 -0
- package/build/types/common/FormControl.js +1 -0
- package/build/types/index.d.ts +15 -0
- package/build/types/index.js +13 -0
- package/build/types/specification/Action.d.ts +19 -0
- package/build/types/specification/Action.js +1 -0
- package/build/types/specification/FileUploadSchema.d.ts +23 -0
- package/build/types/specification/FileUploadSchema.js +4 -0
- package/build/types/specification/LayoutComponent.d.ts +129 -0
- package/build/types/specification/LayoutComponent.js +1 -0
- package/build/types/specification/Model.d.ts +12 -0
- package/build/types/specification/Model.js +29 -0
- package/build/types/specification/PersistAsync.d.ts +8 -0
- package/build/types/specification/PersistAsync.js +1 -0
- package/build/types/specification/Polling.d.ts +12 -0
- package/build/types/specification/Polling.js +1 -0
- package/build/types/specification/Promotion.d.ts +20 -0
- package/build/types/specification/Promotion.js +1 -0
- package/build/types/specification/Schema.d.ts +184 -0
- package/build/types/specification/Schema.js +50 -0
- package/build/types/specification/Step.d.ts +127 -0
- package/build/types/specification/Step.js +4 -0
- package/build/types/specification/ValidationAsync.d.ts +6 -0
- package/build/types/specification/ValidationAsync.js +1 -0
- package/build/types/specification/core.d.ts +29 -0
- package/build/types/specification/core.js +1 -0
- package/package.json +40 -52
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { ExternalStepPollingConfiguration } from '../../common/hooks';
|
|
2
|
+
import { Action } from './Action';
|
|
3
|
+
import { Schema } from './Schema';
|
|
4
|
+
import { Margin, Size, Icon, Image, Align, Orientation, Reference, Alert } from './core';
|
|
5
|
+
export type LayoutComponent = AlertLayout | BoxLayout | ButtonLayout | ColumnsLayout | DecisionLayout | DividerLayout | ExternalLayout | FormLayout | HeadingLayout | ImageLayout | InfoLayout | ListLayout | LoadingIndicatorLayout | ParagraphLayout | ReviewLayout;
|
|
6
|
+
export type AlertLayout = {
|
|
7
|
+
type: 'alert';
|
|
8
|
+
} & Alert;
|
|
9
|
+
export type BoxLayout = {
|
|
10
|
+
type: 'box';
|
|
11
|
+
components: LayoutComponent[];
|
|
12
|
+
width?: Size;
|
|
13
|
+
margin?: Margin;
|
|
14
|
+
border?: boolean;
|
|
15
|
+
};
|
|
16
|
+
export type ButtonLayout = {
|
|
17
|
+
type: 'button';
|
|
18
|
+
action: Action | Reference;
|
|
19
|
+
margin?: Margin;
|
|
20
|
+
/**
|
|
21
|
+
* @deprecated Only supported on web client
|
|
22
|
+
*/
|
|
23
|
+
size?: Size;
|
|
24
|
+
};
|
|
25
|
+
export type ColumnsLayout = {
|
|
26
|
+
type: 'columns';
|
|
27
|
+
left: LayoutComponent[];
|
|
28
|
+
right: LayoutComponent[];
|
|
29
|
+
bias?: 'none' | 'left' | 'right';
|
|
30
|
+
margin?: Margin;
|
|
31
|
+
};
|
|
32
|
+
export type DecisionLayout = {
|
|
33
|
+
type: 'decision';
|
|
34
|
+
options: DecisionOption[];
|
|
35
|
+
margin?: Margin;
|
|
36
|
+
};
|
|
37
|
+
type DecisionOption = {
|
|
38
|
+
action: Action | Reference;
|
|
39
|
+
title: string;
|
|
40
|
+
description?: string;
|
|
41
|
+
icon?: Icon;
|
|
42
|
+
image?: Image;
|
|
43
|
+
disabled?: boolean;
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* @deprecated Only supported on web client
|
|
47
|
+
*/
|
|
48
|
+
export type DividerLayout = {
|
|
49
|
+
type: 'divider';
|
|
50
|
+
margin?: Margin;
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* @deprecated Please use the external feature set instead
|
|
54
|
+
*/
|
|
55
|
+
export type ExternalLayout = {
|
|
56
|
+
type: 'external';
|
|
57
|
+
requestUrl: string;
|
|
58
|
+
polling?: Omit<ExternalStepPollingConfiguration, 'responseHandlers'>;
|
|
59
|
+
responseHandlers?: ExternalStepPollingConfiguration['responseHandlers'];
|
|
60
|
+
retryTitle?: string;
|
|
61
|
+
};
|
|
62
|
+
export type FormLayout = {
|
|
63
|
+
type: 'form';
|
|
64
|
+
schema: Schema | Reference;
|
|
65
|
+
margin?: Margin;
|
|
66
|
+
};
|
|
67
|
+
export type HeadingLayout = {
|
|
68
|
+
type: 'heading';
|
|
69
|
+
size?: Size;
|
|
70
|
+
text: string;
|
|
71
|
+
margin?: Margin;
|
|
72
|
+
align?: Align;
|
|
73
|
+
};
|
|
74
|
+
export type ImageLayout = {
|
|
75
|
+
type: 'image';
|
|
76
|
+
url: string;
|
|
77
|
+
/**
|
|
78
|
+
* @deprecated Only supported on web client
|
|
79
|
+
*/
|
|
80
|
+
text?: string;
|
|
81
|
+
size?: Size;
|
|
82
|
+
margin?: Margin;
|
|
83
|
+
};
|
|
84
|
+
export type InfoLayout = {
|
|
85
|
+
type: 'info';
|
|
86
|
+
markdown: string;
|
|
87
|
+
margin?: Margin;
|
|
88
|
+
align?: Align;
|
|
89
|
+
};
|
|
90
|
+
export type ListLayout = {
|
|
91
|
+
type: 'list';
|
|
92
|
+
items: ListItem[];
|
|
93
|
+
title?: string;
|
|
94
|
+
margin?: Margin;
|
|
95
|
+
};
|
|
96
|
+
type ListItem = {
|
|
97
|
+
title: string;
|
|
98
|
+
description?: string;
|
|
99
|
+
icon?: Icon;
|
|
100
|
+
status?: 'positive' | 'neutral' | 'warning';
|
|
101
|
+
};
|
|
102
|
+
export type LoadingIndicatorLayout = {
|
|
103
|
+
type: 'loading-indicator';
|
|
104
|
+
margin?: Margin;
|
|
105
|
+
size?: Size;
|
|
106
|
+
};
|
|
107
|
+
export type ParagraphLayout = {
|
|
108
|
+
type: 'paragraph';
|
|
109
|
+
text: string;
|
|
110
|
+
control?: 'copyable';
|
|
111
|
+
margin?: Margin;
|
|
112
|
+
align?: Align;
|
|
113
|
+
};
|
|
114
|
+
export type ReviewLayout = {
|
|
115
|
+
type: 'review';
|
|
116
|
+
title?: string;
|
|
117
|
+
fields: ReviewField[];
|
|
118
|
+
orientation?: Orientation;
|
|
119
|
+
margin?: Margin;
|
|
120
|
+
/**
|
|
121
|
+
* @deprecated Only supported on web client
|
|
122
|
+
*/
|
|
123
|
+
action?: Action;
|
|
124
|
+
};
|
|
125
|
+
type ReviewField = {
|
|
126
|
+
label: string;
|
|
127
|
+
value: string | number | boolean | null | undefined;
|
|
128
|
+
};
|
|
129
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type BasicModel = boolean | number | string;
|
|
2
|
+
export type ObjectModel = {
|
|
3
|
+
[key: string]: Model;
|
|
4
|
+
};
|
|
5
|
+
export type ArrayModel = Array<BasicModel | null>;
|
|
6
|
+
export type Model = BasicModel | ObjectModel | ArrayModel | null;
|
|
7
|
+
export declare const isObjectModel: (model: Model) => model is ObjectModel;
|
|
8
|
+
export declare const isNullableObjectModel: (model: Model) => model is ObjectModel | null;
|
|
9
|
+
export declare const isNullableBasicModel: (model: Model) => model is BasicModel | null;
|
|
10
|
+
export declare const isNullableStringModel: (model: Model) => model is string | null;
|
|
11
|
+
export declare const isArrayModel: (model: Model) => model is ArrayModel;
|
|
12
|
+
export declare const isNullableArrayModel: (model: Model) => model is ArrayModel | null;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { isArray, isBoolean, isNull, isNumber, isString } from '../../common/validators';
|
|
2
|
+
// TODO HD Move these functions out of types
|
|
3
|
+
export var isObjectModel = function (model) {
|
|
4
|
+
return typeof model === 'object' && model !== null && model.constructor === Object;
|
|
5
|
+
};
|
|
6
|
+
export var isNullableObjectModel = function (model) {
|
|
7
|
+
return isNull(model) || isObjectModel(model);
|
|
8
|
+
};
|
|
9
|
+
export var isNullableBasicModel = function (model) {
|
|
10
|
+
return isBoolean(model) || isNumber(model) || isString(model) || isNull(model);
|
|
11
|
+
};
|
|
12
|
+
export var isNullableStringModel = function (model) {
|
|
13
|
+
return isString(model) || isNull(model);
|
|
14
|
+
};
|
|
15
|
+
export var isArrayModel = function (model) {
|
|
16
|
+
if (isArray(model)) {
|
|
17
|
+
if (model.length === 0) {
|
|
18
|
+
return true;
|
|
19
|
+
}
|
|
20
|
+
return model.every(function (item) { return typeof item === 'string' || typeof item === 'number' || typeof item === 'boolean'; });
|
|
21
|
+
}
|
|
22
|
+
return false;
|
|
23
|
+
};
|
|
24
|
+
export var isNullableArrayModel = function (model) {
|
|
25
|
+
if (isNull(model)) {
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
28
|
+
return isArrayModel(model);
|
|
29
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Icon, Image } from './core';
|
|
2
|
+
export type Promotion = {
|
|
3
|
+
displayTwice?: boolean;
|
|
4
|
+
other: {
|
|
5
|
+
description?: string;
|
|
6
|
+
heading?: {
|
|
7
|
+
text: string;
|
|
8
|
+
};
|
|
9
|
+
icon?: Icon;
|
|
10
|
+
image?: Image;
|
|
11
|
+
title: string;
|
|
12
|
+
};
|
|
13
|
+
promoted?: {
|
|
14
|
+
title?: string;
|
|
15
|
+
description?: string;
|
|
16
|
+
};
|
|
17
|
+
control?: string;
|
|
18
|
+
checkedMeans?: 'promoted' | 'other';
|
|
19
|
+
default?: 'promoted' | 'other';
|
|
20
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
import { FileUploadSchema } from './FileUploadSchema';
|
|
2
|
+
import { Model, ObjectModel } from './Model';
|
|
3
|
+
import { PersistAsync } from './PersistAsync';
|
|
4
|
+
import { Promotion } from './Promotion';
|
|
5
|
+
import { ValidationAsync } from './ValidationAsync';
|
|
6
|
+
import { Icon, Image, Alert, Help } from './core';
|
|
7
|
+
export type Schema = AllOfSchema | ArraySchema | BlobSchema | BooleanSchema | IntegerSchema | NumberSchema | ObjectSchema | OneOfSchema | StringSchema | ListArraySchema | TupleArraySchema | FileUploadSchema | MultipleFileUploadSchema | ConstSchema;
|
|
8
|
+
type SchemaBase = {
|
|
9
|
+
$id?: string;
|
|
10
|
+
type?: 'boolean' | 'blob' | 'array' | 'integer' | 'number' | 'string' | 'object';
|
|
11
|
+
alert?: Alert;
|
|
12
|
+
autofillProvider?: string;
|
|
13
|
+
autofillKey?: string;
|
|
14
|
+
allOf?: never;
|
|
15
|
+
analyticsId?: string;
|
|
16
|
+
const?: Model;
|
|
17
|
+
default?: Model;
|
|
18
|
+
description?: string;
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
format?: string;
|
|
21
|
+
help?: Help;
|
|
22
|
+
hidden?: boolean;
|
|
23
|
+
icon?: Icon;
|
|
24
|
+
image?: Image;
|
|
25
|
+
oneOf?: never;
|
|
26
|
+
persistAsync?: never;
|
|
27
|
+
promoted?: boolean;
|
|
28
|
+
promotion?: never;
|
|
29
|
+
/**
|
|
30
|
+
* @deprecated Please use disabled
|
|
31
|
+
*/
|
|
32
|
+
readOnly?: boolean;
|
|
33
|
+
refreshFormOnChange?: boolean;
|
|
34
|
+
refreshFormUrl?: string;
|
|
35
|
+
summary?: SchemaSummary;
|
|
36
|
+
title?: string;
|
|
37
|
+
validationAsync?: ValidationAsync;
|
|
38
|
+
validationMessages?: Record<string, string>;
|
|
39
|
+
/**
|
|
40
|
+
* @deprecated Please use oneOf instead
|
|
41
|
+
*/
|
|
42
|
+
values?: {
|
|
43
|
+
label: string;
|
|
44
|
+
value: string | number;
|
|
45
|
+
}[];
|
|
46
|
+
/**
|
|
47
|
+
* @deprecated Please use layouts instead
|
|
48
|
+
*/
|
|
49
|
+
width?: string;
|
|
50
|
+
keywords?: string[];
|
|
51
|
+
};
|
|
52
|
+
export type AllOfSchema = Omit<SchemaBase, 'allOf'> & {
|
|
53
|
+
allOf: Schema[];
|
|
54
|
+
maximum?: number;
|
|
55
|
+
minimum?: number;
|
|
56
|
+
minLength?: number;
|
|
57
|
+
maxLength?: number;
|
|
58
|
+
minItems?: number;
|
|
59
|
+
maxItems?: number;
|
|
60
|
+
required?: string[];
|
|
61
|
+
};
|
|
62
|
+
export type ArraySchema = Omit<SchemaBase, 'persistAsync'> & {
|
|
63
|
+
type: 'array';
|
|
64
|
+
addItemTitle?: string;
|
|
65
|
+
editItemTitle?: string;
|
|
66
|
+
removeItemTitle?: string;
|
|
67
|
+
items: Schema | Schema[];
|
|
68
|
+
maxItems?: number;
|
|
69
|
+
minItems?: number;
|
|
70
|
+
persistAsync?: PersistAsync;
|
|
71
|
+
summary?: ArraySchemaSummary;
|
|
72
|
+
};
|
|
73
|
+
export type ListArraySchema = ArraySchema & {
|
|
74
|
+
items: Schema;
|
|
75
|
+
};
|
|
76
|
+
export type TupleArraySchema = ArraySchema & {
|
|
77
|
+
items: Schema[];
|
|
78
|
+
};
|
|
79
|
+
export type MultipleFileUploadSchema = ListArraySchema & {
|
|
80
|
+
items: PersistAsyncSchema;
|
|
81
|
+
};
|
|
82
|
+
export type BlobSchema = SchemaBase & {
|
|
83
|
+
type: 'blob';
|
|
84
|
+
accepts?: string[];
|
|
85
|
+
maxSize?: number;
|
|
86
|
+
};
|
|
87
|
+
export type BooleanSchema = SchemaBase & {
|
|
88
|
+
type: 'boolean';
|
|
89
|
+
default?: boolean;
|
|
90
|
+
const?: boolean;
|
|
91
|
+
oneOf?: BooleanSchema[];
|
|
92
|
+
};
|
|
93
|
+
export type ConstSchema = SchemaBase & {
|
|
94
|
+
type?: never;
|
|
95
|
+
const: Model;
|
|
96
|
+
};
|
|
97
|
+
export type IntegerSchema = Omit<SchemaBase, 'persistAsync'> & {
|
|
98
|
+
type: 'integer';
|
|
99
|
+
default?: number;
|
|
100
|
+
maximum?: number;
|
|
101
|
+
minimum?: number;
|
|
102
|
+
persistAsync?: PersistAsync;
|
|
103
|
+
placeholder?: number;
|
|
104
|
+
const?: number;
|
|
105
|
+
oneOf?: IntegerSchema[];
|
|
106
|
+
};
|
|
107
|
+
export type NumberSchema = SchemaBase & Omit<IntegerSchema, 'type'> & {
|
|
108
|
+
type: 'number';
|
|
109
|
+
oneOf?: NumberSchema[];
|
|
110
|
+
};
|
|
111
|
+
export type ObjectSchema = SchemaBase & {
|
|
112
|
+
type: 'object';
|
|
113
|
+
displayOrder: string[];
|
|
114
|
+
properties: Record<string, Schema>;
|
|
115
|
+
required?: string[];
|
|
116
|
+
oneOf?: ObjectSchema[];
|
|
117
|
+
};
|
|
118
|
+
export type OneOfSchema = Omit<SchemaBase, 'oneOf' | 'promotion'> & {
|
|
119
|
+
oneOf: Schema[];
|
|
120
|
+
promotion?: Promotion;
|
|
121
|
+
maximum?: number;
|
|
122
|
+
minimum?: number;
|
|
123
|
+
minLength?: number;
|
|
124
|
+
maxLength?: number;
|
|
125
|
+
minItems?: number;
|
|
126
|
+
maxItems?: number;
|
|
127
|
+
required?: string[];
|
|
128
|
+
default?: Model;
|
|
129
|
+
placeholder?: Model;
|
|
130
|
+
control?: string;
|
|
131
|
+
};
|
|
132
|
+
export type OneOfObjectSchema = Omit<OneOfSchema, 'oneOf' | 'default'> & {
|
|
133
|
+
oneOf: ObjectSchema[];
|
|
134
|
+
default?: ObjectModel;
|
|
135
|
+
};
|
|
136
|
+
export type PersistAsyncSchema = Schema & {
|
|
137
|
+
persistAsync: PersistAsync;
|
|
138
|
+
};
|
|
139
|
+
export type StringSchema = Omit<SchemaBase, 'persistAsync'> & {
|
|
140
|
+
type: 'string';
|
|
141
|
+
control?: string;
|
|
142
|
+
default?: string;
|
|
143
|
+
displayFormat?: string;
|
|
144
|
+
minimum?: string;
|
|
145
|
+
maximum?: string;
|
|
146
|
+
maxLength?: number;
|
|
147
|
+
minLength?: number;
|
|
148
|
+
pattern?: string;
|
|
149
|
+
persistAsync?: PersistAsync;
|
|
150
|
+
placeholder?: string;
|
|
151
|
+
const?: string;
|
|
152
|
+
oneOf?: StringSchema[];
|
|
153
|
+
};
|
|
154
|
+
export type BasicSchema = BooleanSchema | IntegerSchema | NumberSchema | StringSchema;
|
|
155
|
+
export type ValidationAsyncSchema = BasicSchema & {
|
|
156
|
+
validationAsync: ValidationAsync;
|
|
157
|
+
};
|
|
158
|
+
type SchemaSummary = {
|
|
159
|
+
providesDescription?: boolean;
|
|
160
|
+
providesIcon?: boolean;
|
|
161
|
+
providesImage?: boolean;
|
|
162
|
+
providesTitle?: boolean;
|
|
163
|
+
};
|
|
164
|
+
type ArraySchemaSummary = SchemaSummary & {
|
|
165
|
+
defaultDescription?: string;
|
|
166
|
+
defaultIcon?: Icon;
|
|
167
|
+
defaultImage?: Image;
|
|
168
|
+
defaultTitle?: string;
|
|
169
|
+
};
|
|
170
|
+
export declare function isBasicSchema(schema: Schema): schema is BasicSchema;
|
|
171
|
+
export declare function isObjectSchema(schema: Schema): schema is ObjectSchema;
|
|
172
|
+
export declare function isOneOfObjectSchema(schema: Schema): schema is OneOfObjectSchema;
|
|
173
|
+
export declare function isOneOfSchema(schema: Schema): schema is OneOfSchema;
|
|
174
|
+
export declare function isAllOfSchema(schema: Schema): schema is AllOfSchema;
|
|
175
|
+
export declare function isBlobSchema(schema: Schema): schema is BlobSchema;
|
|
176
|
+
export declare function isArraySchema(schema: Schema): schema is ArraySchema;
|
|
177
|
+
export declare function isTupleArraySchema(schema: ArraySchema): schema is TupleArraySchema;
|
|
178
|
+
export declare function isListArraySchema(schema: ArraySchema): schema is ListArraySchema;
|
|
179
|
+
export declare function isStringSchema(schema: Schema): schema is StringSchema;
|
|
180
|
+
export declare function isPersistAsyncSchema(schema: Schema): schema is PersistAsyncSchema;
|
|
181
|
+
export declare function isPersistAsyncFileSchema(schema: Schema): schema is PersistAsyncSchema;
|
|
182
|
+
export declare const isValidationAsyncSchema: (schema: Schema) => schema is ValidationAsyncSchema;
|
|
183
|
+
export declare const isMultipleFileUploadSchema: (schema: Schema) => schema is MultipleFileUploadSchema;
|
|
184
|
+
export {};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
var basicTypes = new Set(['string', 'number', 'integer', 'boolean']);
|
|
2
|
+
// TODO HD Move these out of types
|
|
3
|
+
export function isBasicSchema(schema) {
|
|
4
|
+
return basicTypes.has(schema.type || '') || ('const' in schema && schema["const"] !== undefined);
|
|
5
|
+
}
|
|
6
|
+
export function isObjectSchema(schema) {
|
|
7
|
+
return schema.type === 'object';
|
|
8
|
+
}
|
|
9
|
+
export function isOneOfObjectSchema(schema) {
|
|
10
|
+
return isOneOfSchema(schema) && schema.oneOf.every(function (subSchema) { return subSchema.type === 'object'; });
|
|
11
|
+
}
|
|
12
|
+
export function isOneOfSchema(schema) {
|
|
13
|
+
return !!schema.oneOf;
|
|
14
|
+
}
|
|
15
|
+
export function isAllOfSchema(schema) {
|
|
16
|
+
return !!schema.allOf;
|
|
17
|
+
}
|
|
18
|
+
export function isBlobSchema(schema) {
|
|
19
|
+
return schema.type === 'blob';
|
|
20
|
+
}
|
|
21
|
+
export function isArraySchema(schema) {
|
|
22
|
+
return schema.type === 'array';
|
|
23
|
+
}
|
|
24
|
+
export function isTupleArraySchema(schema) {
|
|
25
|
+
var schemaItems = schema.items;
|
|
26
|
+
return Array.isArray(schemaItems);
|
|
27
|
+
}
|
|
28
|
+
export function isListArraySchema(schema) {
|
|
29
|
+
var schemaItems = schema.items;
|
|
30
|
+
return !Array.isArray(schemaItems);
|
|
31
|
+
}
|
|
32
|
+
export function isStringSchema(schema) {
|
|
33
|
+
return schema.type === 'string';
|
|
34
|
+
}
|
|
35
|
+
export function isPersistAsyncSchema(schema) {
|
|
36
|
+
return !!schema.persistAsync;
|
|
37
|
+
}
|
|
38
|
+
export function isPersistAsyncFileSchema(schema) {
|
|
39
|
+
return (isPersistAsyncSchema(schema) &&
|
|
40
|
+
(isBlobSchema(schema.persistAsync.schema) || isBase64FileSchema(schema.persistAsync.schema)));
|
|
41
|
+
}
|
|
42
|
+
export var isValidationAsyncSchema = function (schema) {
|
|
43
|
+
return isBasicSchema(schema) && !!schema.validationAsync;
|
|
44
|
+
};
|
|
45
|
+
function isBase64FileSchema(schema) {
|
|
46
|
+
return schema.type === 'string' && schema.format === 'base64url';
|
|
47
|
+
}
|
|
48
|
+
export var isMultipleFileUploadSchema = function (schema) {
|
|
49
|
+
return (isArraySchema(schema) && isListArraySchema(schema) && isPersistAsyncFileSchema(schema.items));
|
|
50
|
+
};
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { ExternalStepPollingConfiguration } from '../../common/hooks';
|
|
2
|
+
import { Action } from './Action';
|
|
3
|
+
import { LayoutComponent } from './LayoutComponent';
|
|
4
|
+
import { ObjectModel } from './Model';
|
|
5
|
+
import { PollingConfiguration } from './Polling';
|
|
6
|
+
import { Schema } from './Schema';
|
|
7
|
+
import { Image, HttpMethod } from './core';
|
|
8
|
+
export type Step = FormStep | DecisionStep | ExternalStep | WebStep | FinalStep;
|
|
9
|
+
type BaseStep = {
|
|
10
|
+
key?: string;
|
|
11
|
+
type: string;
|
|
12
|
+
title?: string;
|
|
13
|
+
description?: string;
|
|
14
|
+
analytics?: Record<string, unknown>;
|
|
15
|
+
layout?: LayoutComponent[];
|
|
16
|
+
schemas?: Schema[];
|
|
17
|
+
actions?: Action[];
|
|
18
|
+
model?: ObjectModel;
|
|
19
|
+
refreshFormUrl?: string;
|
|
20
|
+
polling?: PollingConfiguration;
|
|
21
|
+
external?: {
|
|
22
|
+
url: string;
|
|
23
|
+
};
|
|
24
|
+
errors?: {
|
|
25
|
+
error?: GlobalError;
|
|
26
|
+
validation?: FormErrors;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
export type FormStep = BaseStep & {
|
|
30
|
+
type: 'form';
|
|
31
|
+
title: string;
|
|
32
|
+
layout: LayoutComponent[];
|
|
33
|
+
actions: Action[];
|
|
34
|
+
schemas: Schema[];
|
|
35
|
+
errors?: unknown;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* @deprecated Please use a form step with a layout instead
|
|
39
|
+
*/
|
|
40
|
+
export type FinalStep = BaseStep & {
|
|
41
|
+
type: 'final';
|
|
42
|
+
actions: Action[];
|
|
43
|
+
details: {
|
|
44
|
+
description: string;
|
|
45
|
+
image?: Image;
|
|
46
|
+
title: string;
|
|
47
|
+
};
|
|
48
|
+
success: boolean;
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* @deprecated Please use the external feature set instead
|
|
52
|
+
*/
|
|
53
|
+
export type ExternalStep = BaseStep & {
|
|
54
|
+
type: 'external';
|
|
55
|
+
description?: string;
|
|
56
|
+
polling?: Omit<ExternalStepPollingConfiguration, 'responseHandlers'>;
|
|
57
|
+
requestUrl: string;
|
|
58
|
+
responseHandlers?: ExternalStepPollingConfiguration['responseHandlers'];
|
|
59
|
+
retryTitle?: string;
|
|
60
|
+
title: string;
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* @deprecated Please use the external feature set instead
|
|
64
|
+
*/
|
|
65
|
+
type WebStep = BaseStep & {
|
|
66
|
+
type: 'web';
|
|
67
|
+
hideBackButton?: boolean;
|
|
68
|
+
initialRequest: {
|
|
69
|
+
body?: string;
|
|
70
|
+
headers?: Record<string, string>;
|
|
71
|
+
method: HttpMethod;
|
|
72
|
+
url: string;
|
|
73
|
+
};
|
|
74
|
+
interceptablePatterns: {
|
|
75
|
+
action?: Action;
|
|
76
|
+
regexPattern: string;
|
|
77
|
+
threshold?: number;
|
|
78
|
+
type: 'submit' | 'cancel' | 'redirect' | 'abort-load' | 'log';
|
|
79
|
+
}[];
|
|
80
|
+
javaScriptMessageHandler?: unknown;
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* @deprecated Please use DecisionLayout instead
|
|
84
|
+
*/
|
|
85
|
+
export type DecisionStep = BaseStep & {
|
|
86
|
+
type: 'decision';
|
|
87
|
+
options?: DecisionStepOption[];
|
|
88
|
+
};
|
|
89
|
+
/**
|
|
90
|
+
* @deprecated Please use DecisionLayout instead
|
|
91
|
+
*/
|
|
92
|
+
export type DecisionStepOption = {
|
|
93
|
+
title: string;
|
|
94
|
+
description?: string;
|
|
95
|
+
url: string;
|
|
96
|
+
disabled?: boolean;
|
|
97
|
+
};
|
|
98
|
+
export type FormErrors = Record<string, unknown> | string | undefined | null;
|
|
99
|
+
export type GlobalError = string | undefined | null;
|
|
100
|
+
export type ErrorResponseBody = {
|
|
101
|
+
error?: GlobalError;
|
|
102
|
+
validation?: FormErrors;
|
|
103
|
+
refreshFormUrl?: string;
|
|
104
|
+
};
|
|
105
|
+
/**
|
|
106
|
+
* @deprecated Please use the review layout component
|
|
107
|
+
*/
|
|
108
|
+
export type LegacyReviewStep = Omit<FormStep, 'actions' | 'schemas' | 'layout'> & {
|
|
109
|
+
reviewFields?: LegacyReviewFields;
|
|
110
|
+
actions?: Action[];
|
|
111
|
+
schemas?: Schema[];
|
|
112
|
+
};
|
|
113
|
+
export type LegacyReviewFields = {
|
|
114
|
+
title?: string;
|
|
115
|
+
fields: Array<{
|
|
116
|
+
title: string;
|
|
117
|
+
value: string;
|
|
118
|
+
}>;
|
|
119
|
+
};
|
|
120
|
+
export type LegacyFormStep = Step & {
|
|
121
|
+
type: 'form';
|
|
122
|
+
reviewFields?: LegacyReviewFields;
|
|
123
|
+
schemas?: Schema[];
|
|
124
|
+
actions?: Action[];
|
|
125
|
+
};
|
|
126
|
+
export declare const isBasicError: (error: FormErrors) => error is string | null;
|
|
127
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export type Image = {
|
|
2
|
+
url: string;
|
|
3
|
+
text?: string;
|
|
4
|
+
name?: string;
|
|
5
|
+
};
|
|
6
|
+
export type Icon = {
|
|
7
|
+
name?: string;
|
|
8
|
+
text?: never;
|
|
9
|
+
} | {
|
|
10
|
+
name?: never;
|
|
11
|
+
text?: string;
|
|
12
|
+
};
|
|
13
|
+
export type Size = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
14
|
+
export type Margin = Size;
|
|
15
|
+
export type Context = 'neutral' | 'warning' | 'positive' | 'negative';
|
|
16
|
+
export type Orientation = 'horizontal' | 'vertical';
|
|
17
|
+
export type Align = 'left' | 'right' | 'center';
|
|
18
|
+
export type HttpMethod = 'POST' | 'GET' | 'PUT' | 'PATCH' | 'DELETE';
|
|
19
|
+
export type Reference = {
|
|
20
|
+
$ref: string;
|
|
21
|
+
};
|
|
22
|
+
export type Alert = {
|
|
23
|
+
markdown: string;
|
|
24
|
+
context?: Context;
|
|
25
|
+
margin?: Margin;
|
|
26
|
+
};
|
|
27
|
+
export type Help = {
|
|
28
|
+
markdown: string;
|
|
29
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|