@wise/dynamic-flow-client 3.12.1 → 3.13.0-experimental-kyc-camera-be63581
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/build/common/cameraCapture/CameraCapture.js +161 -0
- package/build/common/cameraCapture/CameraCapture.messages.js +58 -0
- package/build/common/cameraCapture/CameraCapture.spec.js +460 -0
- package/build/common/cameraCapture/CameraEventHandler.js +1 -0
- package/build/common/cameraCapture/components/bottomBar/BottomBar.js +17 -0
- package/build/common/cameraCapture/components/index.js +3 -0
- package/build/common/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.js +8 -0
- package/build/common/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.messages.js +8 -0
- package/build/common/cameraCapture/hooks/useFullScreenOrientationLock.js +62 -0
- package/build/common/cameraCapture/hooks/useVideoConstraints.js +80 -0
- package/build/common/cameraCapture/index.js +1 -0
- package/build/common/cameraCapture/overlay/Overlay.js +78 -0
- package/build/common/cameraCapture/screens/cameraErrorScreen/CameraErrorScreen.js +7 -0
- package/build/common/cameraCapture/screens/index.js +1 -0
- package/build/common/cameraCapture/tracking/index.js +109 -0
- package/build/common/cameraCapture/types/index.js +7 -0
- package/build/common/cameraCapture/utils/index.js +107 -0
- package/build/common/cameraCapture/utils/mobile-utils.js +23 -0
- package/build/common/cameraCapture/utils/mobile-utils.spec.js +71 -0
- package/build/common/errorBoundary/ErrorBoundary.js +44 -0
- package/build/common/errorBoundary/ErrorBoundaryAlert.js +12 -0
- package/build/common/httpClientContext/HttpClientContext.js +24 -0
- package/build/common/httpClientContext/index.js +1 -0
- package/build/common/makeHttpClient/index.js +1 -0
- package/build/common/makeHttpClient/makeHttpClient.js +30 -0
- package/build/common/makeHttpClient/makeHttpClient.spec.js +140 -0
- package/build/common/messages/external-confirmation.messages.js +23 -0
- package/build/common/messages/generic-error.messages.js +18 -0
- package/build/common/messages/help.messages.js +8 -0
- package/build/common/messages/multi-file-upload.messages.js +18 -0
- package/build/common/messages/multi-select.messages.js +8 -0
- package/build/common/messages/paragraph.messages.js +13 -0
- package/build/common/messages/repeatable.messages.js +23 -0
- package/build/common/messages/validation.array.messages.js +13 -0
- package/build/common/messages/validation.messages.js +53 -0
- package/build/common/utils/api-utils.js +4 -0
- package/build/common/utils/debounce.js +44 -0
- package/build/common/utils/debounce.spec.js +72 -0
- package/build/i18n/index.js +36 -0
- package/build/index.js +12 -0
- package/build/legacy/common/constants/DateMode.js +4 -0
- package/build/legacy/common/constants/FeatureName.js +4 -0
- package/build/legacy/common/constants/FormControlType.js +21 -0
- package/build/legacy/common/constants/MonthFormat.js +4 -0
- package/build/legacy/common/constants/Size.js +7 -0
- package/build/legacy/common/constants/index.js +4 -0
- package/build/legacy/common/contexts/dynamicFlowContexts/DynamicFlowContexts.js +25 -0
- package/build/legacy/common/contexts/dynamicFlowContexts/usePendingPromiseCounter.js +15 -0
- package/build/legacy/common/contexts/dynamicFlowContexts/usePendingPromiseCounter.spec.js +113 -0
- package/build/legacy/common/contexts/eventsContext/EventsContext.js +38 -0
- package/build/legacy/common/contexts/eventsContext/EventsContext.spec.js +47 -0
- package/build/legacy/common/contexts/featureContext/FeatureContext.js +11 -0
- package/build/legacy/common/contexts/featureContext/FeatureContext.spec.js +30 -0
- package/build/legacy/common/contexts/index.js +3 -0
- package/build/legacy/common/contexts/logContext/LogContext.js +44 -0
- package/build/legacy/common/contexts/logContext/LogContext.spec.js +43 -0
- package/build/legacy/common/hooks/index.js +7 -0
- package/build/legacy/common/hooks/useDebouncedFunction/useDebouncedFunction.js +9 -0
- package/build/legacy/common/hooks/useDebouncedFunction/useDebouncedFunction.spec.js +59 -0
- package/build/legacy/common/hooks/useExternal/useExternal.js +15 -0
- package/build/legacy/common/hooks/useExternal/useExternal.spec.js +236 -0
- package/build/legacy/common/hooks/useExternalStepPolling/useExternalStepPolling.js +71 -0
- package/build/legacy/common/hooks/usePersistAsync/usePersistAsync.js +172 -0
- package/build/legacy/common/hooks/usePersistAsync/usePersistAsync.spec.js +221 -0
- package/build/legacy/common/hooks/usePolling/usePolling.js +53 -0
- package/build/legacy/common/hooks/usePolling/usePolling.spec.js +243 -0
- package/build/legacy/common/hooks/usePrevious/usePrevious.js +8 -0
- package/build/legacy/common/hooks/usePrevious/usePrevious.spec.js +66 -0
- package/build/legacy/common/hooks/useStepPolling/useStepPolling.js +45 -0
- package/build/legacy/common/hooks/useStepPolling/useStepPolling.spec.js +288 -0
- package/build/legacy/common/messages.js +8 -0
- package/build/legacy/common/utils/api-utils.js +6 -0
- package/build/legacy/common/utils/date-utils.js +22 -0
- package/build/legacy/common/utils/file-utils.js +45 -0
- package/build/legacy/common/utils/file-utils.spec.js +69 -0
- package/build/legacy/common/utils/id-utils.js +5 -0
- package/build/legacy/common/utils/id-utils.spec.js +12 -0
- package/build/legacy/common/utils/index.js +11 -0
- package/build/legacy/common/utils/is-equal.js +21 -0
- package/build/legacy/common/utils/is-equal.spec.js +88 -0
- package/build/legacy/common/utils/misc-utils.js +4 -0
- package/build/legacy/common/utils/model-utils.js +33 -0
- package/build/legacy/common/utils/schema-utils.js +113 -0
- package/build/legacy/common/utils/step-utils.js +32 -0
- package/build/legacy/common/validators/index.js +5 -0
- package/build/legacy/common/validators/models/model-utils.js +119 -0
- package/build/legacy/common/validators/models/model-utils.spec.js +45 -0
- package/build/legacy/common/validators/models/model-validators.js +62 -0
- package/build/legacy/common/validators/models/model-validators.spec.js +647 -0
- package/build/legacy/common/validators/schemas/schema-validators.js +101 -0
- package/build/legacy/common/validators/schemas/schema-validators.spec.js +157 -0
- package/build/legacy/common/validators/types/type-validators.js +14 -0
- package/build/legacy/common/validators/types/type-validators.spec.js +147 -0
- package/build/legacy/common/validators/validationFailures/validation-failures.js +139 -0
- package/build/legacy/common/validators/validationFailures/validation-failures.spec.js +198 -0
- package/build/legacy/common/validators/validationFailures/validation-failures.utils.js +40 -0
- package/build/legacy/common/validators/validationFailures/validation-failures.utils.spec.js +145 -0
- package/build/legacy/common/validators/values/value-validators.js +6 -0
- package/build/legacy/common/validators/values/value-validators.spec.js +22 -0
- package/build/legacy/dynamic-flow-types.js +1 -0
- package/build/legacy/dynamicFlow/BackButton.js +22 -0
- package/build/legacy/dynamicFlow/DynamicFlow.js +364 -0
- package/build/legacy/dynamicFlow/DynamicFlowStep.js +37 -0
- package/build/legacy/dynamicFlow/DynamicFlowTypes.js +1 -0
- package/build/legacy/dynamicFlow/index.js +1 -0
- package/build/legacy/dynamicFlow/stories/dev-tools/DynamicFlow.story.js +78 -0
- package/build/legacy/dynamicFlow/stories/dev-tools/ErrorResponses.story.js +124 -0
- package/build/legacy/dynamicFlow/stories/dev-tools/Examples.story.js +57 -0
- package/build/legacy/dynamicFlow/stories/dev-tools/Features.story.js +58 -0
- package/build/legacy/dynamicFlow/stories/dev-tools/JsonSchemaForm.story.js +31 -0
- package/build/legacy/dynamicFlow/stories/dev-tools/RefreshOnChange.story.js +194 -0
- package/build/legacy/dynamicFlow/stories/dev-tools/SearchFeature.story.js +263 -0
- package/build/legacy/dynamicFlow/stories/dev-tools/ServerTest.story.js +44 -0
- package/build/legacy/dynamicFlow/stories/dev-tools/Upload.story.js +212 -0
- package/build/legacy/dynamicFlow/stories/dev-tools/ValidationAsync.story.js +156 -0
- package/build/legacy/dynamicFlow/stories/examples/ObjectConst.story.js +150 -0
- package/build/legacy/dynamicFlow/stories/fixtureHttpClient.js +117 -0
- package/build/legacy/dynamicFlow/tests/Actions.spec.js +232 -0
- package/build/legacy/dynamicFlow/tests/AllOfSchema.spec.js +196 -0
- package/build/legacy/dynamicFlow/tests/AutocompleteHints.spec.js +59 -0
- package/build/legacy/dynamicFlow/tests/DynamicFlow.BackButton.spec.js +179 -0
- package/build/legacy/dynamicFlow/tests/DynamicFlow.InitialAction.spec.js +472 -0
- package/build/legacy/dynamicFlow/tests/DynamicFlow.InitialStep.spec.js +749 -0
- package/build/legacy/dynamicFlow/tests/DynamicFlow.LoaderConfig.spec.js +267 -0
- package/build/legacy/dynamicFlow/tests/DynamicFlow.legacy.spec.js +1202 -0
- package/build/legacy/dynamicFlow/tests/DynamicFlow.search.spec.js +475 -0
- package/build/legacy/dynamicFlow/tests/DynamicFlow.spec.js +559 -0
- package/build/legacy/dynamicFlow/tests/DynamicImage.spec.js +287 -0
- package/build/legacy/dynamicFlow/tests/DynamicInstructions.spec.js +49 -0
- package/build/legacy/dynamicFlow/tests/HiddenSchemas.spec.js +307 -0
- package/build/legacy/dynamicFlow/tests/ModalLayout.spec.js +252 -0
- package/build/legacy/dynamicFlow/tests/MultiSelect.spec.js +327 -0
- package/build/legacy/dynamicFlow/tests/MultipleFileUploadSchema.spec.js +401 -0
- package/build/legacy/dynamicFlow/tests/ObjectSchema.spec.js +295 -0
- package/build/legacy/dynamicFlow/tests/OneOfSchema.spec.js +773 -0
- package/build/legacy/dynamicFlow/tests/PersistAsync.blob-schema.spec.js +331 -0
- package/build/legacy/dynamicFlow/tests/PersistAsync.string-schema.spec.js +389 -0
- package/build/legacy/dynamicFlow/tests/RefreshStepOnChange.debouncing.spec.js +391 -0
- package/build/legacy/dynamicFlow/tests/RefreshStepOnChange.spec.js +588 -0
- package/build/legacy/dynamicFlow/tests/RepeatableSchema.spec.js +977 -0
- package/build/legacy/dynamicFlow/tests/StepModel.spec.js +119 -0
- package/build/legacy/dynamicFlow/tests/ValidationAsync.spec.js +484 -0
- package/build/legacy/dynamicFlow/tests/ssr.spec.js +47 -0
- package/build/legacy/dynamicFlow/utils/index.js +5 -0
- package/build/legacy/dynamicFlow/utils/responseParsers/response-parsers.js +185 -0
- package/build/legacy/dynamicFlow/utils/responseParsers/response-parsers.spec.js +463 -0
- package/build/legacy/dynamicFlow/utils/useDebouncedRefresh/useDebouncedRefresh.js +35 -0
- package/build/legacy/dynamicFlow/utils/useDynamicFlowState.js +137 -0
- package/build/legacy/dynamicFlow/utils/useErrorResponse.js +62 -0
- package/build/legacy/dynamicFlow/utils/useLoader.js +22 -0
- package/build/legacy/formControl/FormControl.js +267 -0
- package/build/legacy/formControl/FormControl.spec.js +445 -0
- package/build/legacy/formControl/Select.spec.js +104 -0
- package/build/legacy/formControl/index.js +1 -0
- package/build/legacy/formControl/utils/getAutocompleteString.js +80 -0
- package/build/legacy/formControl/utils/getAutocompleteString.spec.js +30 -0
- package/build/legacy/formControl/utils/index.js +2 -0
- package/build/legacy/formControl/utils/value-utils.js +108 -0
- package/build/legacy/formControl/utils/value-utils.spec.js +158 -0
- package/build/legacy/jsonSchemaForm/JsonSchemaForm.end-to-end.spec.js +534 -0
- package/build/legacy/jsonSchemaForm/JsonSchemaForm.js +24 -0
- package/build/legacy/jsonSchemaForm/JsonSchemaForm.spec.js +77 -0
- package/build/legacy/jsonSchemaForm/allOfSchema/AllOfSchema.js +50 -0
- package/build/legacy/jsonSchemaForm/allOfSchema/index.js +1 -0
- package/build/legacy/jsonSchemaForm/arrayTypeSchema/ArraySchema.js +25 -0
- package/build/legacy/jsonSchemaForm/arrayTypeSchema/ArrayTypeSchema.spec.js +50 -0
- package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/ArrayListSchema.js +34 -0
- package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/index.js +1 -0
- package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multiSelectSchema/MultiSelectSchema.js +86 -0
- package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/MultipleFileUploadSchema.js +141 -0
- package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/index.js +1 -0
- package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/index.js +2 -0
- package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/upload-utils.js +79 -0
- package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/useFormattedDefaultErrorMessages.js +14 -0
- package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/ItemSummary.js +7 -0
- package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/RepeatableSchema.js +134 -0
- package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/RepeatableSchemaStep.js +85 -0
- package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/utils/summary-utils.js +135 -0
- package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/utils/summary-utils.spec.js +909 -0
- package/build/legacy/jsonSchemaForm/arrayTypeSchema/index.js +1 -0
- package/build/legacy/jsonSchemaForm/basicTypeSchema/BasicTypeSchema.errors.spec.js +233 -0
- package/build/legacy/jsonSchemaForm/basicTypeSchema/BasicTypeSchema.js +100 -0
- package/build/legacy/jsonSchemaForm/basicTypeSchema/BasicTypeSchema.spec.js +291 -0
- package/build/legacy/jsonSchemaForm/basicTypeSchema/index.js +1 -0
- package/build/legacy/jsonSchemaForm/controlFeedback/ControlFeedback.js +89 -0
- package/build/legacy/jsonSchemaForm/controlFeedback/ControlFeedback.spec.js +182 -0
- package/build/legacy/jsonSchemaForm/controlFeedback/index.js +1 -0
- package/build/legacy/jsonSchemaForm/genericSchema/GenericSchema.js +85 -0
- package/build/legacy/jsonSchemaForm/genericSchema/GenericSchema.rtl.spec.js +55 -0
- package/build/legacy/jsonSchemaForm/genericSchema/GenericSchema.spec.js +334 -0
- package/build/legacy/jsonSchemaForm/genericSchema/index.js +1 -0
- package/build/legacy/jsonSchemaForm/help/Help.js +9 -0
- package/build/legacy/jsonSchemaForm/help/Help.spec.js +61 -0
- package/build/legacy/jsonSchemaForm/help/index.js +1 -0
- package/build/legacy/jsonSchemaForm/index.js +1 -0
- package/build/legacy/jsonSchemaForm/objectSchema/ObjectSchema.js +77 -0
- package/build/legacy/jsonSchemaForm/objectSchema/index.js +1 -0
- package/build/legacy/jsonSchemaForm/oneOfSchema/OneOfSchema.js +155 -0
- package/build/legacy/jsonSchemaForm/oneOfSchema/index.js +1 -0
- package/build/legacy/jsonSchemaForm/oneOfSchema/utils.js +68 -0
- package/build/legacy/jsonSchemaForm/persistAsyncSchema/PersistAsyncSchema.js +26 -0
- package/build/legacy/jsonSchemaForm/persistAsyncSchema/index.js +1 -0
- package/build/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBasicSchema/PersistAsyncBasicSchema.js +165 -0
- package/build/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBasicSchema/index.js +1 -0
- package/build/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/PersistAsyncBlobSchema.js +131 -0
- package/build/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/UploadInputAdapter.js +31 -0
- package/build/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/UploadInputAdapter.spec.js +243 -0
- package/build/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/index.js +1 -0
- package/build/legacy/jsonSchemaForm/promotedOneOfSchema/PromotedOneOfSchema.js +72 -0
- package/build/legacy/jsonSchemaForm/promotedOneOfSchema/PromotedOneOfSchema.spec.js +420 -0
- package/build/legacy/jsonSchemaForm/promotedOneOfSchema/index.js +1 -0
- package/build/legacy/jsonSchemaForm/promotedOneOfSchema/promoted-one-of-utils.js +8 -0
- package/build/legacy/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfCheckboxControl.js +16 -0
- package/build/legacy/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfCheckboxControl.spec.js +125 -0
- package/build/legacy/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfControl.js +31 -0
- package/build/legacy/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfControl.spec.js +82 -0
- package/build/legacy/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfRadioControl.js +32 -0
- package/build/legacy/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfRadioControl.spec.js +130 -0
- package/build/legacy/jsonSchemaForm/readOnlySchema/ReadOnlySchema.js +54 -0
- package/build/legacy/jsonSchemaForm/readOnlySchema/ReadOnlySchema.messages.js +13 -0
- package/build/legacy/jsonSchemaForm/readOnlySchema/ReadOnlySchema.spec.js +117 -0
- package/build/legacy/jsonSchemaForm/readOnlySchema/index.js +1 -0
- package/build/legacy/jsonSchemaForm/schemaFormControl/SchemaFormControl.js +138 -0
- package/build/legacy/jsonSchemaForm/schemaFormControl/SchemaFormControl.spec.js +312 -0
- package/build/legacy/jsonSchemaForm/schemaFormControl/index.js +1 -0
- package/build/legacy/jsonSchemaForm/schemaFormControl/utils/index.js +1 -0
- package/build/legacy/jsonSchemaForm/schemaFormControl/utils/mapping-utils.js +107 -0
- package/build/legacy/jsonSchemaForm/schemaFormControl/utils/mapping-utils.spec.js +220 -0
- package/build/legacy/jsonSchemaForm/validationAsyncSchema/ValidationAsyncSchema.js +150 -0
- package/build/legacy/jsonSchemaForm/validationAsyncSchema/index.js +1 -0
- package/build/legacy/layout/DynamicLayout.end-to-end.spec.js +71 -0
- package/build/legacy/layout/DynamicLayout.js +68 -0
- package/build/legacy/layout/DynamicLayout.spec.js +243 -0
- package/build/legacy/layout/alert/DynamicAlert.js +29 -0
- package/build/legacy/layout/alert/DynamicAlert.spec.js +42 -0
- package/build/legacy/layout/box/DynamicBox.js +30 -0
- package/build/legacy/layout/box/DynamicBox.spec.js +56 -0
- package/build/legacy/layout/button/DynamicButton.js +16 -0
- package/build/legacy/layout/button/DynamicButton.spec.js +141 -0
- package/build/legacy/layout/button/utils.js +45 -0
- package/build/legacy/layout/button/utils.spec.js +50 -0
- package/build/legacy/layout/columns/DynamicColumns.js +27 -0
- package/build/legacy/layout/columns/DynamicColumns.spec.js +83 -0
- package/build/legacy/layout/decision/DynamicDecision.js +10 -0
- package/build/legacy/layout/decision/DynamicDecision.spec.js +146 -0
- package/build/legacy/layout/divider/DynamicDivider.js +9 -0
- package/build/legacy/layout/divider/DynamicDivider.spec.js +17 -0
- package/build/legacy/layout/external/DynamicExternal.js +32 -0
- package/build/legacy/layout/external/DynamicExternal.messages.js +8 -0
- package/build/legacy/layout/external/DynamicExternal.spec.js +264 -0
- package/build/legacy/layout/form/DynamicForm.js +22 -0
- package/build/legacy/layout/form/DynamicForm.spec.js +74 -0
- package/build/legacy/layout/heading/DynamicHeading.js +40 -0
- package/build/legacy/layout/heading/DynamicHeading.spec.js +14 -0
- package/build/legacy/layout/icon/DynamicIcon.js +17 -0
- package/build/legacy/layout/icon/DynamicIcon.spec.js +20 -0
- package/build/legacy/layout/icon/FlagIcon.js +11 -0
- package/build/legacy/layout/icon/NamedIcon.js +19 -0
- package/build/legacy/layout/image/DynamicImage.js +112 -0
- package/build/legacy/layout/index.js +20 -0
- package/build/legacy/layout/instructions/DynamicInstructions.js +19 -0
- package/build/legacy/layout/list/DynamicStatusList.js +37 -0
- package/build/legacy/layout/list/DynamicStatusList.spec.js +111 -0
- package/build/legacy/layout/loadingIndicator/DynamicLoadingIndicator.js +11 -0
- package/build/legacy/layout/loadingIndicator/DynamicLoadingIndicator.spec.js +25 -0
- package/build/legacy/layout/markdown/DynamicMarkdown.js +12 -0
- package/build/legacy/layout/markdown/DynamicMarkdown.spec.js +58 -0
- package/build/legacy/layout/modal/DynamicModal.js +26 -0
- package/build/legacy/layout/paragraph/DynamicParagraph.js +35 -0
- package/build/legacy/layout/paragraph/DynamicParagraph.spec.js +109 -0
- package/build/legacy/layout/paragraph/useSnackBarIfAvailable.js +9 -0
- package/build/legacy/layout/review/DynamicReview.js +59 -0
- package/build/legacy/layout/review/DynamicReview.spec.js +152 -0
- package/build/legacy/layout/search/DynamicSearch.js +83 -0
- package/build/legacy/layout/search/SearchInput.js +6 -0
- package/build/legacy/layout/search/SearchResults.js +20 -0
- package/build/legacy/layout/search/useSearch.js +150 -0
- package/build/legacy/layout/utils/getNavigationOptionMedia.js +17 -0
- package/build/legacy/layout/utils/index.js +32 -0
- package/build/legacy/step/cameraStep/CameraStep.js +124 -0
- package/build/legacy/step/cameraStep/index.js +1 -0
- package/build/legacy/step/externalConfirmationStep/ExternalConfirmationStep.js +64 -0
- package/build/legacy/step/externalConfirmationStep/index.js +1 -0
- package/build/legacy/step/index.js +3 -0
- package/build/legacy/step/layoutStep/LayoutStep.js +33 -0
- package/build/legacy/step/layoutStep/LayoutStep.spec.js +189 -0
- package/build/legacy/step/layoutStep/index.js +1 -0
- package/build/legacy/step/layoutStep/utils/index.js +2 -0
- package/build/legacy/step/layoutStep/utils/inline-reference-utils.js +105 -0
- package/build/legacy/step/layoutStep/utils/inline-reference-utils.spec.js +296 -0
- package/build/legacy/step/layoutStep/utils/layout-utils.js +212 -0
- package/build/legacy/step/layoutStep/utils/layout-utils.spec.js +558 -0
- package/build/legacy/test-utils/DynamicFlowProviders.js +8 -0
- package/build/legacy/test-utils/index.js +4 -0
- package/build/legacy/test-utils/legacy-utils.js +69 -0
- package/build/legacy/test-utils/log-utils.js +9 -0
- package/build/legacy/visual-tests/generated.story.js +234 -0
- package/build/legacy/visual-tests/layouts.story.js +132 -0
- package/build/legacy/visual-tests/schemas.story.js +108 -0
- package/build/legacy/visual-tests/step.story.js +54 -0
- package/build/main.js +604 -514
- package/build/main.min.js +1 -1
- package/build/main.mjs +580 -490
- package/build/revamp/DynamicFlowCore.js +25 -0
- package/build/revamp/DynamicFlowWise.js +32 -0
- package/build/revamp/DynamicFlowWise.spec.js +105 -0
- package/build/revamp/DynamicFragmentWise.js +83 -0
- package/build/revamp/domain/components/AlertComponent.js +50 -0
- package/build/revamp/domain/components/AllOfComponent.js +72 -0
- package/build/revamp/domain/components/BooleanInputComponent.js +109 -0
- package/build/revamp/domain/components/BoxComponent.js +65 -0
- package/build/revamp/domain/components/ButtonComponent.js +50 -0
- package/build/revamp/domain/components/ColumnsComponent.js +74 -0
- package/build/revamp/domain/components/ConstComponent.js +50 -0
- package/build/revamp/domain/components/ContainerComponent.js +65 -0
- package/build/revamp/domain/components/DateInputComponent.js +128 -0
- package/build/revamp/domain/components/DecisionComponent.js +50 -0
- package/build/revamp/domain/components/DividerComponent.js +50 -0
- package/build/revamp/domain/components/FormComponent.js +65 -0
- package/build/revamp/domain/components/HeadingComponent.js +50 -0
- package/build/revamp/domain/components/ImageComponent.js +50 -0
- package/build/revamp/domain/components/InstructionsComponent.js +50 -0
- package/build/revamp/domain/components/IntegerInputComponent.js +129 -0
- package/build/revamp/domain/components/LoadingIndicatorComponent.js +50 -0
- package/build/revamp/domain/components/MarkdownComponent.js +50 -0
- package/build/revamp/domain/components/ModalComponent.js +65 -0
- package/build/revamp/domain/components/MultiSelectInputComponent.js +148 -0
- package/build/revamp/domain/components/MultiUploadInputComponent.js +192 -0
- package/build/revamp/domain/components/NumberInputComponent.js +129 -0
- package/build/revamp/domain/components/ObjectComponent.js +104 -0
- package/build/revamp/domain/components/ParagraphComponent.js +50 -0
- package/build/revamp/domain/components/ReviewComponent.js +50 -0
- package/build/revamp/domain/components/SelectInputComponent.js +140 -0
- package/build/revamp/domain/components/StatusListComponent.js +50 -0
- package/build/revamp/domain/components/StepDomainComponent.js +87 -0
- package/build/revamp/domain/components/TextInputComponent.js +129 -0
- package/build/revamp/domain/components/UploadInputComponent.js +154 -0
- package/build/revamp/domain/components/repeatableComponent/RepeatableComponent.js +150 -0
- package/build/revamp/domain/components/repeatableComponent/RepeatableComponent.spec.js +146 -0
- package/build/revamp/domain/components/searchComponent/SearchComponent.js +111 -0
- package/build/revamp/domain/components/searchComponent/SearchComponent.spec.js +327 -0
- package/build/revamp/domain/components/utils/component-utils.js +18 -0
- package/build/revamp/domain/components/utils/debounce.js +38 -0
- package/build/revamp/domain/components/utils/debounce.spec.js +72 -0
- package/build/revamp/domain/components/utils/file-utils.js +65 -0
- package/build/revamp/domain/components/utils/file-utils.spec.js +81 -0
- package/build/revamp/domain/components/utils/getComponentForLocalValueKey.js +31 -0
- package/build/revamp/domain/components/utils/isPartialLocalValueMatch.js +46 -0
- package/build/revamp/domain/components/utils/isPartialLocalValueMatch.spec.js +125 -0
- package/build/revamp/domain/components/utils/local-value.js +14 -0
- package/build/revamp/domain/features/events.js +1 -0
- package/build/revamp/domain/features/persistAsync/getComponentPersistAsync.js +134 -0
- package/build/revamp/domain/features/persistAsync/getComponentPersistAsync.spec.js +200 -0
- package/build/revamp/domain/features/persistAsync/getInitialPersistedState.js +6 -0
- package/build/revamp/domain/features/persistAsync/getPerformPersistAsync.js +103 -0
- package/build/revamp/domain/features/persistAsync/getPerformPersistAsync.spec.js +280 -0
- package/build/revamp/domain/features/polling/getStepPolling.js +82 -0
- package/build/revamp/domain/features/polling/getStepPolling.spec.js +170 -0
- package/build/revamp/domain/features/refresh/getPerformRefresh.js +16 -0
- package/build/revamp/domain/features/search/getPerformSearchFunction.js +102 -0
- package/build/revamp/domain/features/search/getPerformSearchFunction.spec.js +260 -0
- package/build/revamp/domain/features/summary/summary-utils.js +39 -0
- package/build/revamp/domain/features/summary/summary-utils.spec.js +110 -0
- package/build/revamp/domain/features/utils/http-utils.js +34 -0
- package/build/revamp/domain/features/utils/response-utils.js +9 -0
- package/build/revamp/domain/features/validation/spec-utils.js +16 -0
- package/build/revamp/domain/features/validation/validation-functions.js +12 -0
- package/build/revamp/domain/features/validation/validation-functions.spec.js +110 -0
- package/build/revamp/domain/features/validation/value-checks.js +111 -0
- package/build/revamp/domain/features/validation/value-checks.spec.js +204 -0
- package/build/revamp/domain/features/validationAsync/getComponentValidationAsync.js +95 -0
- package/build/revamp/domain/features/validationAsync/getComponentValidationAsync.spec.js +178 -0
- package/build/revamp/domain/features/validationAsync/getInitialValidationState.js +5 -0
- package/build/revamp/domain/features/validationAsync/getPerformValidationAsync.js +107 -0
- package/build/revamp/domain/features/validationAsync/getPerformValidationAsync.spec.js +266 -0
- package/build/revamp/domain/mappers/layout/alertLayoutToComponent.js +12 -0
- package/build/revamp/domain/mappers/layout/boxLayoutToComponents.js +15 -0
- package/build/revamp/domain/mappers/layout/buttonLayoutToComponent.js +45 -0
- package/build/revamp/domain/mappers/layout/columnsLayoutToComponent.js +18 -0
- package/build/revamp/domain/mappers/layout/decisionLayoutToComponent.js +40 -0
- package/build/revamp/domain/mappers/layout/dividerLayoutToComponent.js +5 -0
- package/build/revamp/domain/mappers/layout/formLayoutToComponent.js +27 -0
- package/build/revamp/domain/mappers/layout/headingLayoutToComponent.js +13 -0
- package/build/revamp/domain/mappers/layout/imageLayoutToComponent.js +12 -0
- package/build/revamp/domain/mappers/layout/infoLayoutToComponent.js +12 -0
- package/build/revamp/domain/mappers/layout/instructionsLayoutToComponent.js +18 -0
- package/build/revamp/domain/mappers/layout/listLayoutToComponent.js +30 -0
- package/build/revamp/domain/mappers/layout/loadingIndicatorLayoutToComponent.js +5 -0
- package/build/revamp/domain/mappers/layout/markdownLayoutToComponent.js +12 -0
- package/build/revamp/domain/mappers/layout/modalLayoutToComponent.js +17 -0
- package/build/revamp/domain/mappers/layout/paragraphLayoutToComponent.js +12 -0
- package/build/revamp/domain/mappers/layout/reviewLayoutToComponent.js +51 -0
- package/build/revamp/domain/mappers/layout/searchLayoutToComponent.js +14 -0
- package/build/revamp/domain/mappers/layout/statusListLayoutToComponent.js +11 -0
- package/build/revamp/domain/mappers/mapLayoutToComponent.js +63 -0
- package/build/revamp/domain/mappers/mapSchemaToComponent.js +84 -0
- package/build/revamp/domain/mappers/mapSchemaToComponent.spec.js +197 -0
- package/build/revamp/domain/mappers/mapStepToComponent.js +146 -0
- package/build/revamp/domain/mappers/mapStepToComponent.spec.js +162 -0
- package/build/revamp/domain/mappers/mapUnreferencedSchemas.js +44 -0
- package/build/revamp/domain/mappers/schema/allOfSchemaToComponent.js +29 -0
- package/build/revamp/domain/mappers/schema/arraySchemaToComponent/arraySchemaToComponent.js +42 -0
- package/build/revamp/domain/mappers/schema/arraySchemaToComponent/arraySchemaToMultiSelectComponent.js +54 -0
- package/build/revamp/domain/mappers/schema/arraySchemaToComponent/arraySchemaToMultiUploadComponent.js +64 -0
- package/build/revamp/domain/mappers/schema/arraySchemaToComponent/arraySchemaToRepeatableComponent.js +66 -0
- package/build/revamp/domain/mappers/schema/blobSchemaToComponent.js +30 -0
- package/build/revamp/domain/mappers/schema/booleanSchemaToComponent.js +38 -0
- package/build/revamp/domain/mappers/schema/constSchemaToComponent.js +14 -0
- package/build/revamp/domain/mappers/schema/integerSchemaToComponent.js +36 -0
- package/build/revamp/domain/mappers/schema/numberSchemaToComponent.js +35 -0
- package/build/revamp/domain/mappers/schema/objectSchemaToComponent/objectSchemaToComponent.js +60 -0
- package/build/revamp/domain/mappers/schema/objectSchemaToComponent/objectSchemaToComponent.spec.js +165 -0
- package/build/revamp/domain/mappers/schema/oneOfSchemaToComponent/oneOfSchemaToComponent.js +67 -0
- package/build/revamp/domain/mappers/schema/oneOfSchemaToComponent/oneOfSchemaToComponent.spec.js +316 -0
- package/build/revamp/domain/mappers/schema/stringSchemaToComponent/stringSchemaToComponent.js +14 -0
- package/build/revamp/domain/mappers/schema/stringSchemaToComponent/stringSchemaToComponent.spec.js +220 -0
- package/build/revamp/domain/mappers/schema/stringSchemaToComponent/stringSchemaToDateInputComponent.js +37 -0
- package/build/revamp/domain/mappers/schema/stringSchemaToComponent/stringSchemaToTextInputComponent.js +45 -0
- package/build/revamp/domain/mappers/schema/stringSchemaToComponent/stringSchemaToUploadInputComponent.js +37 -0
- package/build/revamp/domain/mappers/schema/tests/test-utils.js +27 -0
- package/build/revamp/domain/mappers/schema/types.js +1 -0
- package/build/revamp/domain/mappers/schema/utils/getPersistAsyncInitialState.js +35 -0
- package/build/revamp/domain/mappers/schema/utils/getValidationAsyncInitialState.js +25 -0
- package/build/revamp/domain/mappers/schema/utils/mapCommonSchemaProps.js +28 -0
- package/build/revamp/domain/mappers/types.js +1 -0
- package/build/revamp/domain/mappers/utils/getAutocompleteString.js +76 -0
- package/build/revamp/domain/mappers/utils/getAutocompleteString.spec.js +21 -0
- package/build/revamp/domain/mappers/utils/getRandomId.js +2 -0
- package/build/revamp/domain/mappers/utils/inlineAction.js +23 -0
- package/build/revamp/domain/mappers/utils/legacy-utils.js +53 -0
- package/build/revamp/domain/types.js +1 -0
- package/build/revamp/flow/executeRefresh.js +97 -0
- package/build/revamp/flow/executeSubmission.js +160 -0
- package/build/revamp/flow/getResponseType.js +76 -0
- package/build/revamp/flow/response-utils.js +92 -0
- package/build/revamp/renderers/CoreContainerRenderer.js +8 -0
- package/build/revamp/renderers/getRenderFunction.js +62 -0
- package/build/revamp/renderers/getSchemaErrorMessageFunction.js +90 -0
- package/build/revamp/renderers/mappers/alertComponentToProps.js +4 -0
- package/build/revamp/renderers/mappers/allOfComponentToProps.js +11 -0
- package/build/revamp/renderers/mappers/booleanInputComponentToProps.js +16 -0
- package/build/revamp/renderers/mappers/boxComponentToProps.js +4 -0
- package/build/revamp/renderers/mappers/buttonComponentToProps.js +14 -0
- package/build/revamp/renderers/mappers/columnsComponentToProps.js +4 -0
- package/build/revamp/renderers/mappers/componentToRendererProps.js +108 -0
- package/build/revamp/renderers/mappers/containerComponentToProps.js +4 -0
- package/build/revamp/renderers/mappers/dateInputComponentToProps.js +13 -0
- package/build/revamp/renderers/mappers/decisionComponentToProps.js +4 -0
- package/build/revamp/renderers/mappers/dividerComponentToProps.js +4 -0
- package/build/revamp/renderers/mappers/formComponentToProps.js +4 -0
- package/build/revamp/renderers/mappers/headingComponentToProps.js +11 -0
- package/build/revamp/renderers/mappers/hiddenComponentToProps.js +3 -0
- package/build/revamp/renderers/mappers/imageComponentToProps.js +11 -0
- package/build/revamp/renderers/mappers/instructionsComponentToProps.js +10 -0
- package/build/revamp/renderers/mappers/integerInputComponentToProps.js +13 -0
- package/build/revamp/renderers/mappers/loadingIndicatorComponentToProps.js +9 -0
- package/build/revamp/renderers/mappers/markdownComponentToProps.js +10 -0
- package/build/revamp/renderers/mappers/modalComponentToProps.js +10 -0
- package/build/revamp/renderers/mappers/multiSelectComponentToProps.js +28 -0
- package/build/revamp/renderers/mappers/multiUploadInputComponentToProps.js +24 -0
- package/build/revamp/renderers/mappers/numberInputComponentToProps.js +13 -0
- package/build/revamp/renderers/mappers/objectComponentToProps.js +11 -0
- package/build/revamp/renderers/mappers/paragraphComponentToProps.js +10 -0
- package/build/revamp/renderers/mappers/repeatableComponentToProps.js +40 -0
- package/build/revamp/renderers/mappers/reviewComponentToProps.js +11 -0
- package/build/revamp/renderers/mappers/searchComponentToProps.js +53 -0
- package/build/revamp/renderers/mappers/selectInputComponentToProps.js +29 -0
- package/build/revamp/renderers/mappers/statusListComponentToProps.js +10 -0
- package/build/revamp/renderers/mappers/textInputComponentToProps.js +13 -0
- package/build/revamp/renderers/mappers/uploadInputComponentToProps.js +16 -0
- package/build/revamp/renderers/mappers/utils/inputComponentToProps.js +27 -0
- package/build/revamp/renderers/stepComponentToProps.js +16 -0
- package/build/revamp/renderers/types.js +1 -0
- package/build/revamp/stories/dev-tools/ActionResponse.story.js +101 -0
- package/build/revamp/stories/dev-tools/DynamicFlowRevamp.story.js +314 -0
- package/build/revamp/stories/dev-tools/EditableStep.story.js +73 -0
- package/build/revamp/stories/dev-tools/ErrorHandling.story.js +149 -0
- package/build/revamp/stories/dev-tools/External.story.js +83 -0
- package/build/revamp/stories/dev-tools/OneOf.Inititalisation.story.js +123 -0
- package/build/revamp/stories/dev-tools/PersistAsync.story.js +168 -0
- package/build/revamp/stories/dev-tools/Polling.story.js +79 -0
- package/build/revamp/stories/dev-tools/RefreshOnChange.story.js +309 -0
- package/build/revamp/stories/dev-tools/RefreshOnChange.with.PersistAsync.story.js +1004 -0
- package/build/revamp/stories/dev-tools/SearchFeature.story.js +263 -0
- package/build/revamp/stories/dev-tools/ServerTest.story.js +86 -0
- package/build/revamp/stories/dev-tools/Upload.story.js +221 -0
- package/build/revamp/stories/dev-tools/ValidationAsync.story.js +161 -0
- package/build/revamp/stories/examples/KYCCameraStep.story.js +84 -0
- package/build/revamp/stories/examples/ObjectConst.story.js +153 -0
- package/build/revamp/stories/examples/OneOfInitialisation.story.js +102 -0
- package/build/revamp/stories/utils/fixtureHttpClient.js +130 -0
- package/build/revamp/stories/utils/mockSearchHandler.js +125 -0
- package/build/revamp/test-utils/component-utils.js +19 -0
- package/build/revamp/test-utils/step-utils.js +6 -0
- package/build/revamp/tests/ImageRenderer.spec.js +108 -0
- package/build/revamp/tests/InitialAction.spec.js +299 -0
- package/build/revamp/tests/InitialStep.spec.js +226 -0
- package/build/revamp/tests/Logging.spec.js +112 -0
- package/build/revamp/tests/OneOfInitialisation.spec.js +889 -0
- package/build/revamp/tests/Polling.spec.js +611 -0
- package/build/revamp/tests/RefreshOnChange.ResponseHandling.spec.js +322 -0
- package/build/revamp/tests/RefreshOnChange.with.Segmented.spec.js +447 -0
- package/build/revamp/tests/RefreshOnChange.with.Tabs.spec.js +447 -0
- package/build/revamp/tests/RefreshOnChangePreserve.spec.js +341 -0
- package/build/revamp/tests/Rerendering.spec.js +156 -0
- package/build/revamp/tests/SegmentedControl.spec.js +48 -0
- package/build/revamp/tests/Submission.ResponseHandling.spec.js +697 -0
- package/build/revamp/tests/Submission.spec.js +590 -0
- package/build/revamp/tests/legacy/Actions.spec.js +242 -0
- package/build/revamp/tests/legacy/BackButton.spec.js +189 -0
- package/build/revamp/tests/legacy/HiddenSchemas.spec.js +312 -0
- package/build/revamp/tests/legacy/MultiSelect.spec.js +753 -0
- package/build/revamp/tests/legacy/MultipleFileUploadSchema.spec.js +447 -0
- package/build/revamp/tests/legacy/PersistAsync.blob-schema.spec.js +339 -0
- package/build/revamp/tests/legacy/PersistAsync.string-schema.spec.js +385 -0
- package/build/revamp/tests/legacy/RefreshStepOnChange.debouncing.spec.js +352 -0
- package/build/revamp/tests/legacy/RefreshStepOnChange.spec.js +638 -0
- package/build/revamp/tests/legacy/Search.spec.js +501 -0
- package/build/revamp/tests/legacy/ValidationAsync.spec.js +452 -0
- package/build/revamp/tests/legacy/useExternal.spec.js +235 -0
- package/build/revamp/types.js +1 -0
- package/build/revamp/useDynamicFlowCore.js +298 -0
- package/build/revamp/utils/component-utils.js +86 -0
- package/build/revamp/utils/component-utils.spec.js +385 -0
- package/build/revamp/utils/findComponent.js +29 -0
- package/build/revamp/utils/findComponent.spec.js +92 -0
- package/build/revamp/utils/type-utils.js +59 -0
- package/build/revamp/utils/type-validators.js +16 -0
- package/build/revamp/utils/type-validators.spec.js +163 -0
- package/build/revamp/utils/useStableCallback.js +21 -0
- package/build/revamp/visual-tests/generated.story.js +234 -0
- package/build/revamp/visual-tests/layouts.story.js +132 -0
- package/build/revamp/visual-tests/schemas.story.js +108 -0
- package/build/revamp/visual-tests/step.story.js +54 -0
- package/build/revamp/wise/renderers/AlertRenderer.js +11 -0
- package/build/revamp/wise/renderers/BooleanInputRenderer.js +34 -0
- package/build/revamp/wise/renderers/BoxRenderer.js +19 -0
- package/build/revamp/wise/renderers/ButtonRenderer.js +53 -0
- package/build/revamp/wise/renderers/ColumnsRenderer.js +14 -0
- package/build/revamp/wise/renderers/DateInputRenderer.js +35 -0
- package/build/revamp/wise/renderers/DecisionRenderer.js +18 -0
- package/build/revamp/wise/renderers/DividerRenderer.js +10 -0
- package/build/revamp/wise/renderers/FormRenderer.js +10 -0
- package/build/revamp/wise/renderers/FormSectionRenderer.js +16 -0
- package/build/revamp/wise/renderers/HeadingRenderer.js +57 -0
- package/build/revamp/wise/renderers/ImageRenderer.js +112 -0
- package/build/revamp/wise/renderers/InstructionsRenderer.js +23 -0
- package/build/revamp/wise/renderers/IntegerInputRenderer.js +38 -0
- package/build/revamp/wise/renderers/LoadingIndicatorRenderer.js +11 -0
- package/build/revamp/wise/renderers/MarkdownRenderer.js +11 -0
- package/build/revamp/wise/renderers/ModalRenderer.js +25 -0
- package/build/revamp/wise/renderers/MultiSelectInputRenderer.js +84 -0
- package/build/revamp/wise/renderers/MultiUploadInputRenderer.js +63 -0
- package/build/revamp/wise/renderers/NumberInputRenderer.js +38 -0
- package/build/revamp/wise/renderers/ParagraphRenderer.js +45 -0
- package/build/revamp/wise/renderers/RepeatableRenderer.js +58 -0
- package/build/revamp/wise/renderers/ReviewRenderer.js +50 -0
- package/build/revamp/wise/renderers/SearchRenderer/BlockSearchRendererComponent.js +59 -0
- package/build/revamp/wise/renderers/SearchRenderer/ErrorResult.js +11 -0
- package/build/revamp/wise/renderers/SearchRenderer/InlineSearchRendererComponent.js +63 -0
- package/build/revamp/wise/renderers/SearchRenderer/SearchRenderer.js +21 -0
- package/build/revamp/wise/renderers/SelectInputRenderer/OptionMedia.js +16 -0
- package/build/revamp/wise/renderers/SelectInputRenderer/RadioInputRendererComponent.js +14 -0
- package/build/revamp/wise/renderers/SelectInputRenderer/RadioInputRendererComponent.spec.js +76 -0
- package/build/revamp/wise/renderers/SelectInputRenderer/SegmentedInputRendererComponent.js +21 -0
- package/build/revamp/wise/renderers/SelectInputRenderer/SelectInputRenderer.js +33 -0
- package/build/revamp/wise/renderers/SelectInputRenderer/SelectInputRendererComponent.js +56 -0
- package/build/revamp/wise/renderers/SelectInputRenderer/SelectTriggerMedia.js +16 -0
- package/build/revamp/wise/renderers/SelectInputRenderer/TabInputRendererComponent.js +22 -0
- package/build/revamp/wise/renderers/StatusListRenderer.js +21 -0
- package/build/revamp/wise/renderers/TextInputRenderer.js +35 -0
- package/build/revamp/wise/renderers/UploadInputRenderer.js +136 -0
- package/build/revamp/wise/renderers/components/FieldInput.js +9 -0
- package/build/revamp/wise/renderers/components/Help.js +10 -0
- package/build/revamp/wise/renderers/components/LabelContentWithHelp.js +6 -0
- package/build/revamp/wise/renderers/components/UploadFieldInput.js +14 -0
- package/build/revamp/wise/renderers/components/VariableDateInput.js +36 -0
- package/build/revamp/wise/renderers/components/VariableTextInput.js +69 -0
- package/build/revamp/wise/renderers/components/icon/DynamicIcon.js +17 -0
- package/build/revamp/wise/renderers/components/icon/FlagIcon.js +11 -0
- package/build/revamp/wise/renderers/components/icon/NamedIcon.js +19 -0
- package/build/revamp/wise/renderers/components/icon/NavigationOptionMedia.js +20 -0
- package/build/revamp/wise/renderers/getWiseRenderers.js +61 -0
- package/build/revamp/wise/renderers/hooks/useSnackBarIfAvailable.js +6 -0
- package/build/revamp/wise/renderers/step/BackButton.js +11 -0
- package/build/revamp/wise/renderers/step/ExternalConfirmationDialog.js +20 -0
- package/build/revamp/wise/renderers/step/KYCCameraStepRenderer.js +144 -0
- package/build/revamp/wise/renderers/step/StepRenderer.js +31 -0
- package/build/revamp/wise/renderers/step/StepRendererContext.js +11 -0
- package/build/revamp/wise/renderers/step/useExternal.js +15 -0
- package/build/revamp/wise/renderers/utils/file-utils.js +70 -0
- package/build/revamp/wise/renderers/utils/getRandomId.js +2 -0
- package/build/revamp/wise/renderers/utils/input-utils.js +6 -0
- package/build/revamp/wise/renderers/utils/layout-utils.js +31 -0
- package/build/revamp/wise/renderers/utils/value-utils.js +23 -0
- package/build/revamp/wise/renderers/utils/value-utils.spec.js +33 -0
- package/build/revamp/wise/renderers/validators/type-validators.js +15 -0
- package/build/test-utils/NeptuneProviders.js +23 -0
- package/build/test-utils/fetch-utils.js +104 -0
- package/build/test-utils/index.js +2 -0
- package/build/test-utils/rtl-utils.js +20 -0
- package/build/types/common/cameraCapture/CameraCapture.d.ts +3 -4
- package/build/types/common/cameraCapture/CameraEventHandler.d.ts +2 -0
- package/build/types/common/cameraCapture/hooks/useFullScreenOrientationLock.d.ts +1 -1
- package/build/types/common/cameraCapture/index.d.ts +1 -0
- package/build/types/common/cameraCapture/tracking/index.d.ts +1 -1
- package/build/types/index.d.ts +2 -0
- package/build/types/legacy/dynamic-flow-types.d.ts +1 -1
- package/build/types/revamp/domain/components/StepDomainComponent.d.ts +6 -4
- package/build/types/revamp/renderers/stepComponentToProps.d.ts +1 -1
- package/build/types/revamp/renderers/types.d.ts +5 -1
- package/build/types/revamp/wise/renderers/step/KYCCameraStepRenderer.d.ts +2 -0
- package/package.json +1 -1
package/build/main.js
CHANGED
|
@@ -291,6 +291,7 @@ __export(src_exports, {
|
|
|
291
291
|
DynamicFlowRevamp: () => DynamicFlowWise_default,
|
|
292
292
|
DynamicFragmentWise: () => DynamicFragmentWise_default,
|
|
293
293
|
JsonSchemaForm: () => JsonSchemaForm_default,
|
|
294
|
+
KYCCameraStepRenderer: () => KYCCameraStepRenderer,
|
|
294
295
|
Layout: () => DynamicLayout_default,
|
|
295
296
|
convertStepToLayout: () => convertStepToLayout,
|
|
296
297
|
inlineReferences: () => inlineReferences,
|
|
@@ -1291,16 +1292,28 @@ var isStringSchemaWithUpload = (schema) => isStringSchema(schema) && schema.form
|
|
|
1291
1292
|
var isSchemaWithPersistAsync = (schema) => "persistAsync" in schema && !isNullish(schema.persistAsync);
|
|
1292
1293
|
|
|
1293
1294
|
// src/revamp/renderers/stepComponentToProps.ts
|
|
1294
|
-
var stepComponentToProps = ({
|
|
1295
|
+
var stepComponentToProps = ({
|
|
1296
|
+
back,
|
|
1297
|
+
description,
|
|
1298
|
+
error,
|
|
1299
|
+
external,
|
|
1300
|
+
loadingState,
|
|
1301
|
+
step,
|
|
1302
|
+
title,
|
|
1303
|
+
trackEvent,
|
|
1304
|
+
onAction
|
|
1305
|
+
}, children) => ({
|
|
1295
1306
|
type: "step",
|
|
1296
1307
|
back,
|
|
1297
1308
|
description,
|
|
1298
1309
|
error,
|
|
1299
1310
|
external,
|
|
1300
1311
|
loadingState,
|
|
1312
|
+
step,
|
|
1301
1313
|
title,
|
|
1314
|
+
children,
|
|
1302
1315
|
trackEvent,
|
|
1303
|
-
|
|
1316
|
+
onAction
|
|
1304
1317
|
});
|
|
1305
1318
|
|
|
1306
1319
|
// src/revamp/renderers/mappers/alertComponentToProps.ts
|
|
@@ -1815,12 +1828,14 @@ var getRenderFunction = (renderers) => {
|
|
|
1815
1828
|
if (type === "hidden") {
|
|
1816
1829
|
return null;
|
|
1817
1830
|
}
|
|
1818
|
-
const renderer = renderers.find(
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1831
|
+
const renderer = renderers.find(({ canRenderType, canRender = () => true }) => {
|
|
1832
|
+
try {
|
|
1833
|
+
return canRenderType === type && canRender(props);
|
|
1834
|
+
} catch (e) {
|
|
1835
|
+
console.error(`Error in canRender function for ${type}`, e);
|
|
1836
|
+
return false;
|
|
1837
|
+
}
|
|
1838
|
+
});
|
|
1824
1839
|
if (!renderer) {
|
|
1825
1840
|
throw new Error(`Could not find a renderer for ${type}`);
|
|
1826
1841
|
}
|
|
@@ -5682,21 +5697,13 @@ var z = /* @__PURE__ */ Object.freeze({
|
|
|
5682
5697
|
quotelessJson,
|
|
5683
5698
|
ZodError
|
|
5684
5699
|
});
|
|
5685
|
-
var
|
|
5686
|
-
|
|
5687
|
-
|
|
5688
|
-
|
|
5689
|
-
|
|
5690
|
-
|
|
5691
|
-
z.literal("GET"),
|
|
5692
|
-
z.literal("POST"),
|
|
5693
|
-
z.literal("PUT"),
|
|
5694
|
-
z.literal("PATCH"),
|
|
5695
|
-
z.literal("DELETE")
|
|
5700
|
+
var sizeSchema = z.union([
|
|
5701
|
+
z.literal("xs"),
|
|
5702
|
+
z.literal("sm"),
|
|
5703
|
+
z.literal("md"),
|
|
5704
|
+
z.literal("lg"),
|
|
5705
|
+
z.literal("xl")
|
|
5696
5706
|
]);
|
|
5697
|
-
var iconNamedSchema = z.object({
|
|
5698
|
-
name: z.string()
|
|
5699
|
-
});
|
|
5700
5707
|
var contextSchema = z.union([
|
|
5701
5708
|
z.literal("positive"),
|
|
5702
5709
|
z.literal("neutral"),
|
|
@@ -5707,18 +5714,114 @@ var contextSchema = z.union([
|
|
|
5707
5714
|
z.literal("info"),
|
|
5708
5715
|
z.literal("primary")
|
|
5709
5716
|
]);
|
|
5710
|
-
var
|
|
5711
|
-
|
|
5712
|
-
|
|
5713
|
-
|
|
5714
|
-
|
|
5715
|
-
|
|
5716
|
-
z.literal("
|
|
5717
|
-
z.literal("
|
|
5718
|
-
z.literal("
|
|
5717
|
+
var columnsLayoutBiasSchema = z.union([
|
|
5718
|
+
z.literal("none"),
|
|
5719
|
+
z.literal("left"),
|
|
5720
|
+
z.literal("right")
|
|
5721
|
+
]);
|
|
5722
|
+
var statusListLayoutStatusSchema = z.union([
|
|
5723
|
+
z.literal("not-done"),
|
|
5724
|
+
z.literal("pending"),
|
|
5725
|
+
z.literal("done")
|
|
5719
5726
|
]);
|
|
5720
5727
|
var alignSchema = z.union([z.literal("left"), z.literal("center"), z.literal("right")]);
|
|
5721
|
-
var
|
|
5728
|
+
var formLayoutSchemaReferenceSchema = z.object({
|
|
5729
|
+
$ref: z.string()
|
|
5730
|
+
});
|
|
5731
|
+
var modalLayoutTriggerSchema = z.object({
|
|
5732
|
+
title: z.string()
|
|
5733
|
+
});
|
|
5734
|
+
var httpMethodSchema = z.union([
|
|
5735
|
+
z.literal("GET"),
|
|
5736
|
+
z.literal("POST"),
|
|
5737
|
+
z.literal("PUT"),
|
|
5738
|
+
z.literal("PATCH"),
|
|
5739
|
+
z.literal("DELETE")
|
|
5740
|
+
]);
|
|
5741
|
+
var dividerLayoutSchema = z.object({
|
|
5742
|
+
type: z.literal("divider"),
|
|
5743
|
+
control: z.string().optional(),
|
|
5744
|
+
margin: sizeSchema.optional()
|
|
5745
|
+
});
|
|
5746
|
+
var listLayoutStatusSchema = z.union([
|
|
5747
|
+
z.literal("warning"),
|
|
5748
|
+
z.literal("neutral"),
|
|
5749
|
+
z.literal("positive")
|
|
5750
|
+
]);
|
|
5751
|
+
var headingLayoutSchema = z.object({
|
|
5752
|
+
type: z.literal("heading"),
|
|
5753
|
+
text: z.string(),
|
|
5754
|
+
size: sizeSchema.optional(),
|
|
5755
|
+
align: alignSchema.optional(),
|
|
5756
|
+
control: z.string().optional(),
|
|
5757
|
+
margin: sizeSchema.optional()
|
|
5758
|
+
});
|
|
5759
|
+
var alertLayoutSchema = z.object({
|
|
5760
|
+
type: z.literal("alert"),
|
|
5761
|
+
markdown: z.string(),
|
|
5762
|
+
context: contextSchema.optional(),
|
|
5763
|
+
control: z.string().optional(),
|
|
5764
|
+
margin: sizeSchema.optional()
|
|
5765
|
+
});
|
|
5766
|
+
var formLayoutSchema = z.object({
|
|
5767
|
+
type: z.literal("form"),
|
|
5768
|
+
schema: formLayoutSchemaReferenceSchema.optional(),
|
|
5769
|
+
schemaId: z.string(),
|
|
5770
|
+
control: z.string().optional(),
|
|
5771
|
+
margin: sizeSchema.optional()
|
|
5772
|
+
});
|
|
5773
|
+
var imageLayoutSchema = z.object({
|
|
5774
|
+
type: z.literal("image"),
|
|
5775
|
+
text: z.string().optional(),
|
|
5776
|
+
url: z.string(),
|
|
5777
|
+
size: sizeSchema.optional(),
|
|
5778
|
+
accessibilityDescription: z.string().optional(),
|
|
5779
|
+
control: z.string().optional(),
|
|
5780
|
+
margin: sizeSchema.optional()
|
|
5781
|
+
});
|
|
5782
|
+
var infoLayoutSchema = z.object({
|
|
5783
|
+
type: z.literal("info"),
|
|
5784
|
+
markdown: z.string(),
|
|
5785
|
+
align: alignSchema.optional(),
|
|
5786
|
+
control: z.string().optional(),
|
|
5787
|
+
margin: sizeSchema.optional()
|
|
5788
|
+
});
|
|
5789
|
+
var loadingIndicatorLayoutSchema = z.object({
|
|
5790
|
+
type: z.literal("loading-indicator"),
|
|
5791
|
+
size: sizeSchema.optional(),
|
|
5792
|
+
control: z.string().optional(),
|
|
5793
|
+
margin: sizeSchema.optional()
|
|
5794
|
+
});
|
|
5795
|
+
var paragraphLayoutSchema = z.object({
|
|
5796
|
+
type: z.literal("paragraph"),
|
|
5797
|
+
text: z.string(),
|
|
5798
|
+
align: alignSchema.optional(),
|
|
5799
|
+
control: z.string().optional(),
|
|
5800
|
+
margin: sizeSchema.optional()
|
|
5801
|
+
});
|
|
5802
|
+
var instructionsLayoutItemSchema = z.object({
|
|
5803
|
+
text: z.string(),
|
|
5804
|
+
context: contextSchema
|
|
5805
|
+
});
|
|
5806
|
+
var helpSchema = z.object({
|
|
5807
|
+
markdown: z.string()
|
|
5808
|
+
});
|
|
5809
|
+
var imageSchema = z.object({
|
|
5810
|
+
text: z.string().optional(),
|
|
5811
|
+
url: z.string(),
|
|
5812
|
+
accessibilityDescription: z.string().optional()
|
|
5813
|
+
});
|
|
5814
|
+
var summaryProviderSchema = z.object({
|
|
5815
|
+
providesTitle: z.boolean().optional(),
|
|
5816
|
+
providesDescription: z.boolean().optional(),
|
|
5817
|
+
providesIcon: z.boolean().optional(),
|
|
5818
|
+
providesImage: z.boolean().optional()
|
|
5819
|
+
});
|
|
5820
|
+
var validateAsyncSchema = z.object({
|
|
5821
|
+
param: z.string(),
|
|
5822
|
+
method: httpMethodSchema,
|
|
5823
|
+
url: z.string()
|
|
5824
|
+
});
|
|
5722
5825
|
var autocompleteTokenSchema = z.union([
|
|
5723
5826
|
z.literal("on"),
|
|
5724
5827
|
z.literal("name"),
|
|
@@ -5784,207 +5887,98 @@ var autocompleteTokenSchema = z.union([
|
|
|
5784
5887
|
z.literal("fax"),
|
|
5785
5888
|
z.literal("pager")
|
|
5786
5889
|
]);
|
|
5787
|
-
var
|
|
5788
|
-
|
|
5789
|
-
|
|
5790
|
-
|
|
5791
|
-
|
|
5890
|
+
var stringSchemaFormatSchema = z.union([
|
|
5891
|
+
z.literal("date"),
|
|
5892
|
+
z.literal("email"),
|
|
5893
|
+
z.literal("numeric"),
|
|
5894
|
+
z.literal("password"),
|
|
5895
|
+
z.literal("phone-number"),
|
|
5896
|
+
z.literal("base64url")
|
|
5897
|
+
]);
|
|
5898
|
+
var jsonElementSchema = z.lazy(
|
|
5899
|
+
() => z.union([
|
|
5900
|
+
z.string(),
|
|
5901
|
+
z.number(),
|
|
5902
|
+
z.boolean(),
|
|
5903
|
+
z.record(jsonElementSchema),
|
|
5904
|
+
z.array(jsonElementSchema)
|
|
5905
|
+
]).nullable()
|
|
5906
|
+
);
|
|
5907
|
+
var uploadSourceSchema = z.union([z.literal("camera"), z.literal("file")]);
|
|
5908
|
+
var externalSchema = z.object({
|
|
5909
|
+
url: z.string()
|
|
5792
5910
|
});
|
|
5793
|
-
var
|
|
5794
|
-
|
|
5795
|
-
|
|
5796
|
-
context: contextSchema.optional(),
|
|
5797
|
-
control: z.string().optional(),
|
|
5798
|
-
margin: sizeSchema.optional()
|
|
5911
|
+
var stepErrorSchema = z.object({
|
|
5912
|
+
error: z.string().optional(),
|
|
5913
|
+
validation: jsonElementSchema.optional()
|
|
5799
5914
|
});
|
|
5800
|
-
var
|
|
5801
|
-
|
|
5802
|
-
|
|
5915
|
+
var errorResponseBodySchema = z.object({
|
|
5916
|
+
refreshFormUrl: z.string().optional(),
|
|
5917
|
+
analytics: z.record(z.string()).optional(),
|
|
5918
|
+
error: z.string().optional(),
|
|
5919
|
+
validation: jsonElementSchema.optional(),
|
|
5920
|
+
refreshUrl: z.string().optional()
|
|
5921
|
+
});
|
|
5922
|
+
var searchSearchRequestSchema = z.object({
|
|
5923
|
+
url: z.string(),
|
|
5924
|
+
method: httpMethodSchema,
|
|
5925
|
+
param: z.string(),
|
|
5926
|
+
query: z.string()
|
|
5927
|
+
});
|
|
5928
|
+
var navigationStackBehaviorSchema = z.union([
|
|
5929
|
+
z.literal("default"),
|
|
5930
|
+
z.literal("remove-previous"),
|
|
5931
|
+
z.literal("remove-all"),
|
|
5932
|
+
z.literal("replace-current")
|
|
5933
|
+
]);
|
|
5934
|
+
var actionTypeSchema = z.union([
|
|
5935
|
+
z.literal("primary"),
|
|
5936
|
+
z.literal("secondary"),
|
|
5937
|
+
z.literal("link"),
|
|
5938
|
+
z.literal("positive"),
|
|
5939
|
+
z.literal("negative")
|
|
5940
|
+
]);
|
|
5941
|
+
var iconNamedSchema = z.object({
|
|
5942
|
+
name: z.string()
|
|
5943
|
+
});
|
|
5944
|
+
var iconTextSchema = z.object({
|
|
5945
|
+
text: z.string()
|
|
5946
|
+
});
|
|
5947
|
+
var actionSchema = z.object({
|
|
5948
|
+
title: z.string().optional(),
|
|
5949
|
+
type: actionTypeSchema.optional(),
|
|
5950
|
+
disabled: z.boolean().optional(),
|
|
5951
|
+
$id: z.string().optional(),
|
|
5952
|
+
$ref: z.string().optional(),
|
|
5953
|
+
id: z.string().optional(),
|
|
5954
|
+
url: z.string().optional(),
|
|
5955
|
+
method: httpMethodSchema.optional(),
|
|
5956
|
+
exit: z.boolean().optional(),
|
|
5957
|
+
result: jsonElementSchema.optional(),
|
|
5958
|
+
data: jsonElementSchema.optional(),
|
|
5959
|
+
timeout: z.number().optional(),
|
|
5960
|
+
skipValidation: z.boolean().optional()
|
|
5961
|
+
});
|
|
5962
|
+
var markdownLayoutSchema = z.object({
|
|
5963
|
+
type: z.literal("markdown"),
|
|
5964
|
+
content: z.string(),
|
|
5803
5965
|
align: alignSchema.optional(),
|
|
5804
5966
|
control: z.string().optional(),
|
|
5805
5967
|
margin: sizeSchema.optional()
|
|
5806
5968
|
});
|
|
5807
|
-
var
|
|
5808
|
-
type: z.literal("
|
|
5969
|
+
var searchLayoutSchema = z.object({
|
|
5970
|
+
type: z.literal("search"),
|
|
5971
|
+
title: z.string(),
|
|
5972
|
+
method: httpMethodSchema,
|
|
5973
|
+
url: z.string(),
|
|
5974
|
+
param: z.string(),
|
|
5975
|
+
emptyMessage: z.string().optional(),
|
|
5809
5976
|
control: z.string().optional(),
|
|
5810
5977
|
margin: sizeSchema.optional()
|
|
5811
5978
|
});
|
|
5812
|
-
var
|
|
5813
|
-
z.literal("warning"),
|
|
5814
|
-
z.literal("neutral"),
|
|
5815
|
-
z.literal("positive")
|
|
5816
|
-
]);
|
|
5817
|
-
var formLayoutSchemaReferenceSchema = z.object({
|
|
5818
|
-
$ref: z.string()
|
|
5819
|
-
});
|
|
5820
|
-
var imageLayoutSchema = z.object({
|
|
5821
|
-
type: z.literal("image"),
|
|
5822
|
-
text: z.string().optional(),
|
|
5823
|
-
url: z.string(),
|
|
5824
|
-
size: sizeSchema.optional(),
|
|
5825
|
-
accessibilityDescription: z.string().optional(),
|
|
5826
|
-
control: z.string().optional(),
|
|
5827
|
-
margin: sizeSchema.optional()
|
|
5828
|
-
});
|
|
5829
|
-
var statusListLayoutStatusSchema = z.union([
|
|
5830
|
-
z.literal("not-done"),
|
|
5831
|
-
z.literal("pending"),
|
|
5832
|
-
z.literal("done")
|
|
5833
|
-
]);
|
|
5834
|
-
var instructionsLayoutItemSchema = z.object({
|
|
5835
|
-
text: z.string(),
|
|
5836
|
-
context: contextSchema
|
|
5837
|
-
});
|
|
5838
|
-
var modalLayoutTriggerSchema = z.object({
|
|
5839
|
-
title: z.string()
|
|
5840
|
-
});
|
|
5841
|
-
var searchLayoutSchema = z.object({
|
|
5842
|
-
type: z.literal("search"),
|
|
5843
|
-
title: z.string(),
|
|
5844
|
-
method: httpMethodSchema,
|
|
5845
|
-
url: z.string(),
|
|
5846
|
-
param: z.string(),
|
|
5847
|
-
emptyMessage: z.string().optional(),
|
|
5848
|
-
control: z.string().optional(),
|
|
5849
|
-
margin: sizeSchema.optional()
|
|
5850
|
-
});
|
|
5851
|
-
var infoLayoutSchema = z.object({
|
|
5852
|
-
type: z.literal("info"),
|
|
5853
|
-
markdown: z.string(),
|
|
5854
|
-
align: alignSchema.optional(),
|
|
5855
|
-
control: z.string().optional(),
|
|
5856
|
-
margin: sizeSchema.optional()
|
|
5857
|
-
});
|
|
5858
|
-
var formLayoutSchema = z.object({
|
|
5859
|
-
type: z.literal("form"),
|
|
5860
|
-
schema: formLayoutSchemaReferenceSchema.optional(),
|
|
5861
|
-
schemaId: z.string(),
|
|
5862
|
-
control: z.string().optional(),
|
|
5863
|
-
margin: sizeSchema.optional()
|
|
5864
|
-
});
|
|
5865
|
-
var headingLayoutSchema = z.object({
|
|
5866
|
-
type: z.literal("heading"),
|
|
5867
|
-
text: z.string(),
|
|
5868
|
-
size: sizeSchema.optional(),
|
|
5869
|
-
align: alignSchema.optional(),
|
|
5870
|
-
control: z.string().optional(),
|
|
5871
|
-
margin: sizeSchema.optional()
|
|
5872
|
-
});
|
|
5873
|
-
var markdownLayoutSchema = z.object({
|
|
5874
|
-
type: z.literal("markdown"),
|
|
5875
|
-
content: z.string(),
|
|
5876
|
-
align: alignSchema.optional(),
|
|
5877
|
-
control: z.string().optional(),
|
|
5878
|
-
margin: sizeSchema.optional()
|
|
5879
|
-
});
|
|
5880
|
-
var columnsLayoutBiasSchema = z.union([
|
|
5881
|
-
z.literal("none"),
|
|
5882
|
-
z.literal("left"),
|
|
5883
|
-
z.literal("right")
|
|
5884
|
-
]);
|
|
5885
|
-
var helpSchema = z.object({
|
|
5886
|
-
markdown: z.string()
|
|
5887
|
-
});
|
|
5888
|
-
var searchSearchRequestSchema = z.object({
|
|
5889
|
-
url: z.string(),
|
|
5890
|
-
method: httpMethodSchema,
|
|
5891
|
-
param: z.string(),
|
|
5892
|
-
query: z.string()
|
|
5893
|
-
});
|
|
5894
|
-
var jsonElementSchema = z.lazy(
|
|
5895
|
-
() => z.union([
|
|
5896
|
-
z.string(),
|
|
5897
|
-
z.number(),
|
|
5898
|
-
z.boolean(),
|
|
5899
|
-
z.record(jsonElementSchema),
|
|
5900
|
-
z.array(jsonElementSchema)
|
|
5901
|
-
]).nullable()
|
|
5902
|
-
);
|
|
5903
|
-
var externalSchema = z.object({
|
|
5904
|
-
url: z.string()
|
|
5905
|
-
});
|
|
5906
|
-
var stepErrorSchema = z.object({
|
|
5907
|
-
error: z.string().optional(),
|
|
5908
|
-
validation: jsonElementSchema.optional()
|
|
5909
|
-
});
|
|
5910
|
-
var stringSchemaFormatSchema = z.union([
|
|
5911
|
-
z.literal("date"),
|
|
5912
|
-
z.literal("email"),
|
|
5913
|
-
z.literal("numeric"),
|
|
5914
|
-
z.literal("password"),
|
|
5915
|
-
z.literal("phone-number"),
|
|
5916
|
-
z.literal("base64url")
|
|
5917
|
-
]);
|
|
5918
|
-
var summarySummariserSchema = z.object({
|
|
5919
|
-
defaultTitle: z.string().optional(),
|
|
5920
|
-
defaultDescription: z.string().optional(),
|
|
5921
|
-
defaultIcon: iconSchema.optional(),
|
|
5922
|
-
defaultImage: imageLayoutSchema.optional(),
|
|
5923
|
-
providesTitle: z.boolean().optional(),
|
|
5924
|
-
providesDescription: z.boolean().optional(),
|
|
5925
|
-
providesIcon: z.boolean().optional(),
|
|
5926
|
-
providesImage: z.boolean().optional()
|
|
5927
|
-
});
|
|
5928
|
-
var validateAsyncSchema = z.object({
|
|
5929
|
-
param: z.string(),
|
|
5930
|
-
method: httpMethodSchema,
|
|
5931
|
-
url: z.string()
|
|
5932
|
-
});
|
|
5933
|
-
var summaryProviderSchema = z.object({
|
|
5934
|
-
providesTitle: z.boolean().optional(),
|
|
5935
|
-
providesDescription: z.boolean().optional(),
|
|
5936
|
-
providesIcon: z.boolean().optional(),
|
|
5937
|
-
providesImage: z.boolean().optional()
|
|
5938
|
-
});
|
|
5939
|
-
var uploadSourceSchema = z.union([z.literal("camera"), z.literal("file")]);
|
|
5940
|
-
var navigationStackBehaviorSchema = z.union([
|
|
5941
|
-
z.literal("default"),
|
|
5942
|
-
z.literal("remove-previous"),
|
|
5943
|
-
z.literal("remove-all"),
|
|
5944
|
-
z.literal("replace-current")
|
|
5945
|
-
]);
|
|
5946
|
-
var actionTypeSchema = z.union([
|
|
5947
|
-
z.literal("primary"),
|
|
5948
|
-
z.literal("secondary"),
|
|
5949
|
-
z.literal("link"),
|
|
5950
|
-
z.literal("positive"),
|
|
5951
|
-
z.literal("negative")
|
|
5952
|
-
]);
|
|
5953
|
-
var summarySchema = z.union([summaryProviderSchema, summarySummariserSchema]);
|
|
5954
|
-
var actionSchema = z.object({
|
|
5955
|
-
title: z.string().optional(),
|
|
5956
|
-
type: actionTypeSchema.optional(),
|
|
5957
|
-
disabled: z.boolean().optional(),
|
|
5958
|
-
$id: z.string().optional(),
|
|
5959
|
-
$ref: z.string().optional(),
|
|
5960
|
-
id: z.string().optional(),
|
|
5961
|
-
url: z.string().optional(),
|
|
5962
|
-
method: httpMethodSchema.optional(),
|
|
5963
|
-
exit: z.boolean().optional(),
|
|
5964
|
-
result: jsonElementSchema.optional(),
|
|
5965
|
-
data: jsonElementSchema.optional(),
|
|
5966
|
-
timeout: z.number().optional(),
|
|
5967
|
-
skipValidation: z.boolean().optional()
|
|
5968
|
-
});
|
|
5969
|
-
var listLayoutItemSchema = z.object({
|
|
5970
|
-
title: z.string(),
|
|
5971
|
-
description: z.string().optional(),
|
|
5972
|
-
icon: iconSchema,
|
|
5973
|
-
status: listLayoutStatusSchema.optional()
|
|
5974
|
-
});
|
|
5975
|
-
var decisionLayoutOptionSchema = z.object({
|
|
5976
|
-
action: actionSchema,
|
|
5977
|
-
title: z.string(),
|
|
5978
|
-
description: z.string().optional(),
|
|
5979
|
-
disabled: z.boolean().optional(),
|
|
5980
|
-
icon: iconSchema.optional(),
|
|
5981
|
-
image: imageLayoutSchema.optional()
|
|
5982
|
-
});
|
|
5983
|
-
var statusListLayoutItemSchema = z.object({
|
|
5979
|
+
var reviewLayoutCallToActionSchema = z.object({
|
|
5984
5980
|
title: z.string(),
|
|
5985
|
-
|
|
5986
|
-
icon: iconSchema,
|
|
5987
|
-
status: statusListLayoutStatusSchema.optional()
|
|
5981
|
+
action: actionSchema
|
|
5988
5982
|
});
|
|
5989
5983
|
var instructionsLayoutSchema = z.object({
|
|
5990
5984
|
type: z.literal("instructions"),
|
|
@@ -5993,51 +5987,17 @@ var instructionsLayoutSchema = z.object({
|
|
|
5993
5987
|
control: z.string().optional(),
|
|
5994
5988
|
margin: sizeSchema.optional()
|
|
5995
5989
|
});
|
|
5996
|
-
var
|
|
5997
|
-
type: z.literal("button"),
|
|
5998
|
-
size: sizeSchema.optional(),
|
|
5999
|
-
title: z.string().optional(),
|
|
6000
|
-
action: actionSchema,
|
|
6001
|
-
context: contextSchema.optional(),
|
|
6002
|
-
disabled: z.boolean().optional(),
|
|
6003
|
-
pinOrder: z.number().optional(),
|
|
6004
|
-
control: z.string().optional(),
|
|
6005
|
-
margin: sizeSchema.optional()
|
|
6006
|
-
});
|
|
5990
|
+
var iconSchema = z.union([iconNamedSchema, iconTextSchema]);
|
|
6007
5991
|
var reviewLayoutFieldSchema = z.object({
|
|
6008
5992
|
label: z.string(),
|
|
6009
5993
|
value: z.string(),
|
|
6010
5994
|
help: helpSchema.optional()
|
|
6011
5995
|
});
|
|
6012
|
-
var
|
|
6013
|
-
type: z.literal("search"),
|
|
6014
|
-
title: z.string(),
|
|
6015
|
-
description: z.string().optional(),
|
|
6016
|
-
icon: iconSchema.optional(),
|
|
6017
|
-
image: imageLayoutSchema.optional(),
|
|
6018
|
-
value: searchSearchRequestSchema
|
|
6019
|
-
});
|
|
6020
|
-
var searchResultActionSchema = z.object({
|
|
6021
|
-
type: z.literal("action"),
|
|
5996
|
+
var statusListLayoutItemSchema = z.object({
|
|
6022
5997
|
title: z.string(),
|
|
6023
5998
|
description: z.string().optional(),
|
|
6024
|
-
icon: iconSchema
|
|
6025
|
-
|
|
6026
|
-
value: actionSchema
|
|
6027
|
-
});
|
|
6028
|
-
var actionResponseBodySchema = z.object({
|
|
6029
|
-
action: actionSchema
|
|
6030
|
-
});
|
|
6031
|
-
var errorResponseBodySchema = z.object({
|
|
6032
|
-
refreshFormUrl: z.string().optional(),
|
|
6033
|
-
analytics: z.record(z.string()).optional(),
|
|
6034
|
-
error: z.string().optional(),
|
|
6035
|
-
validation: jsonElementSchema.optional(),
|
|
6036
|
-
refreshUrl: z.string().optional()
|
|
6037
|
-
});
|
|
6038
|
-
var linkHandlerSchema = z.object({
|
|
6039
|
-
regexPattern: z.string(),
|
|
6040
|
-
action: actionSchema
|
|
5999
|
+
icon: iconSchema,
|
|
6000
|
+
status: statusListLayoutStatusSchema.optional()
|
|
6041
6001
|
});
|
|
6042
6002
|
var blobSchemaSchema = z.object({
|
|
6043
6003
|
type: z.literal("blob"),
|
|
@@ -6077,37 +6037,66 @@ var constSchemaSchema = z.object({
|
|
|
6077
6037
|
analyticsId: z.string().optional(),
|
|
6078
6038
|
disabled: z.boolean().optional()
|
|
6079
6039
|
});
|
|
6080
|
-
var
|
|
6040
|
+
var summarySummariserSchema = z.object({
|
|
6041
|
+
defaultTitle: z.string().optional(),
|
|
6042
|
+
defaultDescription: z.string().optional(),
|
|
6043
|
+
defaultIcon: iconSchema.optional(),
|
|
6044
|
+
defaultImage: imageLayoutSchema.optional(),
|
|
6045
|
+
providesTitle: z.boolean().optional(),
|
|
6046
|
+
providesDescription: z.boolean().optional(),
|
|
6047
|
+
providesIcon: z.boolean().optional(),
|
|
6048
|
+
providesImage: z.boolean().optional()
|
|
6049
|
+
});
|
|
6050
|
+
var linkHandlerSchema = z.object({
|
|
6051
|
+
regexPattern: z.string(),
|
|
6081
6052
|
action: actionSchema
|
|
6082
6053
|
});
|
|
6083
|
-
var
|
|
6084
|
-
title: z.string().optional(),
|
|
6054
|
+
var actionResponseBodySchema = z.object({
|
|
6085
6055
|
action: actionSchema
|
|
6086
6056
|
});
|
|
6087
|
-
var
|
|
6057
|
+
var searchResultSearchSchema = z.object({
|
|
6058
|
+
type: z.literal("search"),
|
|
6088
6059
|
title: z.string(),
|
|
6060
|
+
description: z.string().optional(),
|
|
6061
|
+
icon: iconSchema.optional(),
|
|
6062
|
+
image: imageLayoutSchema.optional(),
|
|
6063
|
+
value: searchSearchRequestSchema
|
|
6064
|
+
});
|
|
6065
|
+
var searchResultActionSchema = z.object({
|
|
6066
|
+
type: z.literal("action"),
|
|
6067
|
+
title: z.string(),
|
|
6068
|
+
description: z.string().optional(),
|
|
6069
|
+
icon: iconSchema.optional(),
|
|
6070
|
+
image: imageLayoutSchema.optional(),
|
|
6071
|
+
value: actionSchema
|
|
6072
|
+
});
|
|
6073
|
+
var pollingOnErrorSchema = z.object({
|
|
6089
6074
|
action: actionSchema
|
|
6090
6075
|
});
|
|
6091
|
-
var
|
|
6092
|
-
type: z.literal("list"),
|
|
6093
|
-
items: z.array(listLayoutItemSchema),
|
|
6076
|
+
var navigationBackBehaviourSchema = z.object({
|
|
6094
6077
|
title: z.string().optional(),
|
|
6095
|
-
|
|
6096
|
-
margin: sizeSchema.optional()
|
|
6097
|
-
});
|
|
6098
|
-
var decisionLayoutSchema = z.object({
|
|
6099
|
-
type: z.literal("decision"),
|
|
6100
|
-
options: z.array(decisionLayoutOptionSchema),
|
|
6101
|
-
control: z.string().optional(),
|
|
6102
|
-
margin: sizeSchema.optional()
|
|
6078
|
+
action: actionSchema
|
|
6103
6079
|
});
|
|
6104
|
-
var
|
|
6105
|
-
|
|
6106
|
-
|
|
6080
|
+
var summarySchema = z.union([summaryProviderSchema, summarySummariserSchema]);
|
|
6081
|
+
var buttonLayoutSchema = z.object({
|
|
6082
|
+
type: z.literal("button"),
|
|
6083
|
+
size: sizeSchema.optional(),
|
|
6107
6084
|
title: z.string().optional(),
|
|
6085
|
+
action: actionSchema,
|
|
6086
|
+
context: contextSchema.optional(),
|
|
6087
|
+
disabled: z.boolean().optional(),
|
|
6088
|
+
pinOrder: z.number().optional(),
|
|
6108
6089
|
control: z.string().optional(),
|
|
6109
6090
|
margin: sizeSchema.optional()
|
|
6110
6091
|
});
|
|
6092
|
+
var decisionLayoutOptionSchema = z.object({
|
|
6093
|
+
action: actionSchema,
|
|
6094
|
+
title: z.string(),
|
|
6095
|
+
description: z.string().optional(),
|
|
6096
|
+
disabled: z.boolean().optional(),
|
|
6097
|
+
icon: iconSchema.optional(),
|
|
6098
|
+
image: imageLayoutSchema.optional()
|
|
6099
|
+
});
|
|
6111
6100
|
var reviewLayoutSchema = z.object({
|
|
6112
6101
|
type: z.literal("review"),
|
|
6113
6102
|
orientation: z.string().optional(),
|
|
@@ -6118,7 +6107,19 @@ var reviewLayoutSchema = z.object({
|
|
|
6118
6107
|
control: z.string().optional(),
|
|
6119
6108
|
margin: sizeSchema.optional()
|
|
6120
6109
|
});
|
|
6121
|
-
var
|
|
6110
|
+
var statusListLayoutSchema = z.object({
|
|
6111
|
+
type: z.literal("status-list"),
|
|
6112
|
+
items: z.array(statusListLayoutItemSchema),
|
|
6113
|
+
title: z.string().optional(),
|
|
6114
|
+
control: z.string().optional(),
|
|
6115
|
+
margin: sizeSchema.optional()
|
|
6116
|
+
});
|
|
6117
|
+
var listLayoutItemSchema = z.object({
|
|
6118
|
+
title: z.string(),
|
|
6119
|
+
description: z.string().optional(),
|
|
6120
|
+
icon: iconSchema,
|
|
6121
|
+
status: listLayoutStatusSchema.optional()
|
|
6122
|
+
});
|
|
6122
6123
|
var pollingSchema = z.object({
|
|
6123
6124
|
url: z.string(),
|
|
6124
6125
|
interval: z.number(),
|
|
@@ -6130,9 +6131,33 @@ var navigationSchema = z.object({
|
|
|
6130
6131
|
back: navigationBackBehaviourSchema.optional(),
|
|
6131
6132
|
stackBehavior: navigationStackBehaviorSchema.optional()
|
|
6132
6133
|
});
|
|
6134
|
+
var searchResultSchema = z.union([searchResultActionSchema, searchResultSearchSchema]);
|
|
6135
|
+
var decisionLayoutSchema = z.object({
|
|
6136
|
+
type: z.literal("decision"),
|
|
6137
|
+
options: z.array(decisionLayoutOptionSchema),
|
|
6138
|
+
control: z.string().optional(),
|
|
6139
|
+
margin: sizeSchema.optional()
|
|
6140
|
+
});
|
|
6141
|
+
var listLayoutSchema = z.object({
|
|
6142
|
+
type: z.literal("list"),
|
|
6143
|
+
items: z.array(listLayoutItemSchema),
|
|
6144
|
+
title: z.string().optional(),
|
|
6145
|
+
control: z.string().optional(),
|
|
6146
|
+
margin: sizeSchema.optional()
|
|
6147
|
+
});
|
|
6133
6148
|
var searchResponseBodySchema = z.object({
|
|
6134
6149
|
results: z.array(searchResultSchema)
|
|
6135
6150
|
});
|
|
6151
|
+
var columnsLayoutSchema = z.lazy(
|
|
6152
|
+
() => z.object({
|
|
6153
|
+
type: z.literal("columns"),
|
|
6154
|
+
left: z.array(layoutSchema),
|
|
6155
|
+
right: z.array(layoutSchema),
|
|
6156
|
+
bias: columnsLayoutBiasSchema.optional(),
|
|
6157
|
+
control: z.string().optional(),
|
|
6158
|
+
margin: sizeSchema.optional()
|
|
6159
|
+
})
|
|
6160
|
+
);
|
|
6136
6161
|
var layoutSchema = z.lazy(
|
|
6137
6162
|
() => z.union([
|
|
6138
6163
|
alertLayoutSchema,
|
|
@@ -6156,26 +6181,6 @@ var layoutSchema = z.lazy(
|
|
|
6156
6181
|
statusListLayoutSchema
|
|
6157
6182
|
])
|
|
6158
6183
|
);
|
|
6159
|
-
var boxLayoutSchema = z.lazy(
|
|
6160
|
-
() => z.object({
|
|
6161
|
-
type: z.literal("box"),
|
|
6162
|
-
components: z.array(layoutSchema),
|
|
6163
|
-
width: sizeSchema.optional(),
|
|
6164
|
-
border: z.boolean().optional(),
|
|
6165
|
-
control: z.string().optional(),
|
|
6166
|
-
margin: sizeSchema.optional()
|
|
6167
|
-
})
|
|
6168
|
-
);
|
|
6169
|
-
var columnsLayoutSchema = z.lazy(
|
|
6170
|
-
() => z.object({
|
|
6171
|
-
type: z.literal("columns"),
|
|
6172
|
-
left: z.array(layoutSchema),
|
|
6173
|
-
right: z.array(layoutSchema),
|
|
6174
|
-
bias: columnsLayoutBiasSchema.optional(),
|
|
6175
|
-
control: z.string().optional(),
|
|
6176
|
-
margin: sizeSchema.optional()
|
|
6177
|
-
})
|
|
6178
|
-
);
|
|
6179
6184
|
var modalLayoutSchema = z.lazy(
|
|
6180
6185
|
() => z.object({
|
|
6181
6186
|
type: z.literal("modal"),
|
|
@@ -6190,25 +6195,14 @@ var modalLayoutContentSchema = z.lazy(
|
|
|
6190
6195
|
components: z.array(layoutSchema)
|
|
6191
6196
|
})
|
|
6192
6197
|
);
|
|
6193
|
-
var
|
|
6198
|
+
var boxLayoutSchema = z.lazy(
|
|
6194
6199
|
() => z.object({
|
|
6195
|
-
|
|
6196
|
-
|
|
6197
|
-
|
|
6198
|
-
|
|
6199
|
-
|
|
6200
|
-
|
|
6201
|
-
description: z.string().optional(),
|
|
6202
|
-
schemas: z.array(schemaSchema),
|
|
6203
|
-
layout: z.array(layoutSchema),
|
|
6204
|
-
model: jsonElementSchema.optional(),
|
|
6205
|
-
external: externalSchema.optional(),
|
|
6206
|
-
polling: pollingSchema.optional(),
|
|
6207
|
-
linkHandlers: z.array(linkHandlerSchema).optional(),
|
|
6208
|
-
analytics: z.record(z.string()).optional(),
|
|
6209
|
-
errors: stepErrorSchema.optional(),
|
|
6210
|
-
navigation: navigationSchema.optional(),
|
|
6211
|
-
refreshUrl: z.string().optional()
|
|
6200
|
+
type: z.literal("box"),
|
|
6201
|
+
components: z.array(layoutSchema),
|
|
6202
|
+
width: sizeSchema.optional(),
|
|
6203
|
+
border: z.boolean().optional(),
|
|
6204
|
+
control: z.string().optional(),
|
|
6205
|
+
margin: sizeSchema.optional()
|
|
6212
6206
|
})
|
|
6213
6207
|
);
|
|
6214
6208
|
var schemaSchema = z.lazy(
|
|
@@ -6412,26 +6406,55 @@ var stringSchemaSchema = z.lazy(
|
|
|
6412
6406
|
title: z.string().optional(),
|
|
6413
6407
|
description: z.string().optional(),
|
|
6414
6408
|
control: z.string().optional(),
|
|
6415
|
-
default: z.string().optional(),
|
|
6409
|
+
default: z.string().optional(),
|
|
6410
|
+
hidden: z.boolean().optional(),
|
|
6411
|
+
disabled: z.boolean().optional(),
|
|
6412
|
+
icon: iconSchema.optional(),
|
|
6413
|
+
image: imageSchema.optional(),
|
|
6414
|
+
keywords: z.array(z.string()).optional(),
|
|
6415
|
+
summary: summaryProviderSchema.optional(),
|
|
6416
|
+
analyticsId: z.string().optional(),
|
|
6417
|
+
persistAsync: persistAsyncSchema.optional(),
|
|
6418
|
+
refreshStepOnChange: z.boolean().optional(),
|
|
6419
|
+
validationAsync: validateAsyncSchema.optional(),
|
|
6420
|
+
validationMessages: z.record(z.string()).optional(),
|
|
6421
|
+
alert: alertLayoutSchema.optional(),
|
|
6422
|
+
cameraConfig: jsonElementSchema.optional(),
|
|
6423
|
+
accepts: z.array(z.string()).optional(),
|
|
6424
|
+
maxSize: z.number().optional(),
|
|
6425
|
+
source: uploadSourceSchema.optional(),
|
|
6426
|
+
autocompleteHint: z.array(autocompleteTokenSchema).optional(),
|
|
6427
|
+
autofillKey: z.string().optional(),
|
|
6428
|
+
help: helpSchema.optional()
|
|
6429
|
+
})
|
|
6430
|
+
);
|
|
6431
|
+
var persistAsyncSchema = z.lazy(
|
|
6432
|
+
() => z.object({
|
|
6433
|
+
param: z.string(),
|
|
6434
|
+
idProperty: z.string(),
|
|
6435
|
+
schema: schemaSchema,
|
|
6436
|
+
url: z.string(),
|
|
6437
|
+
method: httpMethodSchema
|
|
6438
|
+
})
|
|
6439
|
+
);
|
|
6440
|
+
var arraySchemaTupleSchema = z.lazy(
|
|
6441
|
+
() => z.object({
|
|
6442
|
+
type: z.literal("array"),
|
|
6443
|
+
promoted: z.boolean().optional(),
|
|
6444
|
+
$id: z.string().optional(),
|
|
6445
|
+
items: z.array(schemaSchema),
|
|
6446
|
+
title: z.string().optional(),
|
|
6447
|
+
description: z.string().optional(),
|
|
6448
|
+
control: z.string().optional(),
|
|
6416
6449
|
hidden: z.boolean().optional(),
|
|
6417
|
-
disabled: z.boolean().optional(),
|
|
6418
6450
|
icon: iconSchema.optional(),
|
|
6419
6451
|
image: imageSchema.optional(),
|
|
6420
6452
|
keywords: z.array(z.string()).optional(),
|
|
6421
6453
|
summary: summaryProviderSchema.optional(),
|
|
6422
6454
|
analyticsId: z.string().optional(),
|
|
6423
6455
|
persistAsync: persistAsyncSchema.optional(),
|
|
6424
|
-
refreshStepOnChange: z.boolean().optional(),
|
|
6425
6456
|
validationAsync: validateAsyncSchema.optional(),
|
|
6426
|
-
|
|
6427
|
-
alert: alertLayoutSchema.optional(),
|
|
6428
|
-
cameraConfig: jsonElementSchema.optional(),
|
|
6429
|
-
accepts: z.array(z.string()).optional(),
|
|
6430
|
-
maxSize: z.number().optional(),
|
|
6431
|
-
source: uploadSourceSchema.optional(),
|
|
6432
|
-
autocompleteHint: z.array(autocompleteTokenSchema).optional(),
|
|
6433
|
-
autofillKey: z.string().optional(),
|
|
6434
|
-
help: helpSchema.optional()
|
|
6457
|
+
alert: alertLayoutSchema.optional()
|
|
6435
6458
|
})
|
|
6436
6459
|
);
|
|
6437
6460
|
var arraySchemaListSchema = z.lazy(
|
|
@@ -6461,33 +6484,25 @@ var arraySchemaListSchema = z.lazy(
|
|
|
6461
6484
|
disabled: z.boolean().optional()
|
|
6462
6485
|
})
|
|
6463
6486
|
);
|
|
6464
|
-
var
|
|
6465
|
-
() => z.object({
|
|
6466
|
-
param: z.string(),
|
|
6467
|
-
idProperty: z.string(),
|
|
6468
|
-
schema: schemaSchema,
|
|
6469
|
-
url: z.string(),
|
|
6470
|
-
method: httpMethodSchema
|
|
6471
|
-
})
|
|
6472
|
-
);
|
|
6473
|
-
var arraySchemaTupleSchema = z.lazy(
|
|
6487
|
+
var stepSchema = z.lazy(
|
|
6474
6488
|
() => z.object({
|
|
6475
|
-
|
|
6476
|
-
|
|
6477
|
-
|
|
6478
|
-
|
|
6479
|
-
|
|
6489
|
+
key: z.string().optional(),
|
|
6490
|
+
type: z.string().optional(),
|
|
6491
|
+
actions: z.array(actionSchema).optional(),
|
|
6492
|
+
refreshFormUrl: z.string().optional(),
|
|
6493
|
+
id: z.string(),
|
|
6494
|
+
title: z.string(),
|
|
6480
6495
|
description: z.string().optional(),
|
|
6481
|
-
|
|
6482
|
-
|
|
6483
|
-
|
|
6484
|
-
|
|
6485
|
-
|
|
6486
|
-
|
|
6487
|
-
|
|
6488
|
-
|
|
6489
|
-
|
|
6490
|
-
|
|
6496
|
+
schemas: z.array(schemaSchema),
|
|
6497
|
+
layout: z.array(layoutSchema),
|
|
6498
|
+
model: jsonElementSchema.optional(),
|
|
6499
|
+
external: externalSchema.optional(),
|
|
6500
|
+
polling: pollingSchema.optional(),
|
|
6501
|
+
linkHandlers: z.array(linkHandlerSchema).optional(),
|
|
6502
|
+
analytics: z.record(z.string()).optional(),
|
|
6503
|
+
errors: stepErrorSchema.optional(),
|
|
6504
|
+
navigation: navigationSchema.optional(),
|
|
6505
|
+
refreshUrl: z.string().optional()
|
|
6491
6506
|
})
|
|
6492
6507
|
);
|
|
6493
6508
|
var validateStep = (step) => validate(step, stepSchema);
|
|
@@ -10015,7 +10030,9 @@ var mapStepToComponent = (_a) => {
|
|
|
10015
10030
|
stepPolling,
|
|
10016
10031
|
updateComponent,
|
|
10017
10032
|
title: displayStepTitle ? title : void 0,
|
|
10018
|
-
trackEvent
|
|
10033
|
+
trackEvent,
|
|
10034
|
+
step,
|
|
10035
|
+
onAction
|
|
10019
10036
|
});
|
|
10020
10037
|
return stepComponent;
|
|
10021
10038
|
};
|
|
@@ -11929,18 +11946,79 @@ function ItemSummaryOption({
|
|
|
11929
11946
|
}
|
|
11930
11947
|
var RepeatableRenderer_default = RepeatableRenderer;
|
|
11931
11948
|
|
|
11932
|
-
// src/revamp/wise/renderers/
|
|
11949
|
+
// src/revamp/wise/renderers/ReviewRenderer.tsx
|
|
11933
11950
|
var import_components26 = require("@transferwise/components");
|
|
11951
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
11952
|
+
var ReviewRenderer = {
|
|
11953
|
+
canRenderType: "review",
|
|
11954
|
+
render: ({ callToAction, control, fields, margin, title }) => {
|
|
11955
|
+
const orientation = mapControlToDefinitionListLayout(control);
|
|
11956
|
+
const action = callToAction ? {
|
|
11957
|
+
text: callToAction.title,
|
|
11958
|
+
onClick: (event) => {
|
|
11959
|
+
event.preventDefault();
|
|
11960
|
+
callToAction.onClick();
|
|
11961
|
+
}
|
|
11962
|
+
} : void 0;
|
|
11963
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: getMargin(margin), children: [
|
|
11964
|
+
(title || callToAction) && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_components26.Header, { title: title != null ? title : "", action }),
|
|
11965
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: margin, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
11966
|
+
import_components26.DefinitionList,
|
|
11967
|
+
{
|
|
11968
|
+
layout: orientation,
|
|
11969
|
+
definitions: fields.map(({ label, value, help }, index) => ({
|
|
11970
|
+
key: String(index),
|
|
11971
|
+
title: label,
|
|
11972
|
+
value: getFieldValue(value, help, orientation)
|
|
11973
|
+
}))
|
|
11974
|
+
}
|
|
11975
|
+
) })
|
|
11976
|
+
] });
|
|
11977
|
+
}
|
|
11978
|
+
};
|
|
11979
|
+
var ReviewRenderer_default = ReviewRenderer;
|
|
11980
|
+
var mapControlToDefinitionListLayout = (control) => {
|
|
11981
|
+
switch (control) {
|
|
11982
|
+
case "horizontal":
|
|
11983
|
+
case "horizontal-end-aligned":
|
|
11984
|
+
return "HORIZONTAL_RIGHT_ALIGNED";
|
|
11985
|
+
case "horizontal-start-aligned":
|
|
11986
|
+
return "HORIZONTAL_LEFT_ALIGNED";
|
|
11987
|
+
case "vertical-two-column":
|
|
11988
|
+
return "VERTICAL_TWO_COLUMN";
|
|
11989
|
+
case "vertical":
|
|
11990
|
+
case "vertical-one-column":
|
|
11991
|
+
default:
|
|
11992
|
+
return "VERTICAL_ONE_COLUMN";
|
|
11993
|
+
}
|
|
11994
|
+
};
|
|
11995
|
+
var getFieldValue = (value, help, orientation) => {
|
|
11996
|
+
if (help) {
|
|
11997
|
+
return orientation === "HORIZONTAL_RIGHT_ALIGNED" ? /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
|
|
11998
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Help_default, { help }),
|
|
11999
|
+
" ",
|
|
12000
|
+
value
|
|
12001
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
|
|
12002
|
+
value,
|
|
12003
|
+
" ",
|
|
12004
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Help_default, { help })
|
|
12005
|
+
] });
|
|
12006
|
+
}
|
|
12007
|
+
return value;
|
|
12008
|
+
};
|
|
12009
|
+
|
|
12010
|
+
// src/revamp/wise/renderers/SearchRenderer/BlockSearchRendererComponent.tsx
|
|
12011
|
+
var import_components27 = require("@transferwise/components");
|
|
11934
12012
|
|
|
11935
12013
|
// src/revamp/wise/renderers/SearchRenderer/ErrorResult.tsx
|
|
11936
12014
|
var import_react_intl15 = require("react-intl");
|
|
11937
|
-
var
|
|
12015
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
11938
12016
|
function ErrorResult({ state }) {
|
|
11939
12017
|
const intl = (0, import_react_intl15.useIntl)();
|
|
11940
|
-
return /* @__PURE__ */ (0,
|
|
12018
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("p", { className: "m-t-2", children: [
|
|
11941
12019
|
intl.formatMessage(generic_error_messages_default.genericError),
|
|
11942
12020
|
"\xA0",
|
|
11943
|
-
/* @__PURE__ */ (0,
|
|
12021
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
11944
12022
|
"a",
|
|
11945
12023
|
{
|
|
11946
12024
|
href: "/",
|
|
@@ -11956,7 +12034,7 @@ function ErrorResult({ state }) {
|
|
|
11956
12034
|
|
|
11957
12035
|
// src/revamp/wise/renderers/SearchRenderer/BlockSearchRendererComponent.tsx
|
|
11958
12036
|
var import_react15 = require("react");
|
|
11959
|
-
var
|
|
12037
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
11960
12038
|
function BlockSearchRendererComponent({
|
|
11961
12039
|
id,
|
|
11962
12040
|
isLoading,
|
|
@@ -11968,9 +12046,9 @@ function BlockSearchRendererComponent({
|
|
|
11968
12046
|
}) {
|
|
11969
12047
|
const [hasSearched, setHasSearched] = (0, import_react15.useState)(false);
|
|
11970
12048
|
const trackEvent = useTrackEvent();
|
|
11971
|
-
return /* @__PURE__ */ (0,
|
|
11972
|
-
/* @__PURE__ */ (0,
|
|
11973
|
-
|
|
12049
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: getMargin(margin), children: [
|
|
12050
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(FieldInput_default, { id, description: "", error: "", help: "", label: title, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
12051
|
+
import_components27.Input,
|
|
11974
12052
|
{
|
|
11975
12053
|
id,
|
|
11976
12054
|
name: id,
|
|
@@ -11986,7 +12064,7 @@ function BlockSearchRendererComponent({
|
|
|
11986
12064
|
}
|
|
11987
12065
|
}
|
|
11988
12066
|
) }),
|
|
11989
|
-
isLoading ? /* @__PURE__ */ (0,
|
|
12067
|
+
isLoading ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_jsx_runtime43.Fragment, { children: "Loading..." }) : /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(SearchResultContent, { state, onChange })
|
|
11990
12068
|
] });
|
|
11991
12069
|
}
|
|
11992
12070
|
function SearchResultContent({
|
|
@@ -11995,29 +12073,29 @@ function SearchResultContent({
|
|
|
11995
12073
|
}) {
|
|
11996
12074
|
switch (state.type) {
|
|
11997
12075
|
case "error":
|
|
11998
|
-
return /* @__PURE__ */ (0,
|
|
12076
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(ErrorResult, { state });
|
|
11999
12077
|
case "results":
|
|
12000
|
-
return /* @__PURE__ */ (0,
|
|
12078
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(SearchResults, { state, onChange });
|
|
12001
12079
|
case "noResults":
|
|
12002
|
-
return /* @__PURE__ */ (0,
|
|
12080
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(EmptySearchResult, { state });
|
|
12003
12081
|
case "pending":
|
|
12004
12082
|
default:
|
|
12005
12083
|
return null;
|
|
12006
12084
|
}
|
|
12007
12085
|
}
|
|
12008
12086
|
function EmptySearchResult({ state }) {
|
|
12009
|
-
return /* @__PURE__ */ (0,
|
|
12087
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_components27.Markdown, { className: "m-t-2", config: { link: { target: "_blank" } }, children: state.message });
|
|
12010
12088
|
}
|
|
12011
12089
|
function SearchResults({
|
|
12012
12090
|
state
|
|
12013
12091
|
}) {
|
|
12014
12092
|
const trackEvent = useTrackEvent();
|
|
12015
|
-
return /* @__PURE__ */ (0,
|
|
12016
|
-
|
|
12093
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_components27.NavigationOptionsList, { children: state.results.map((result) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
12094
|
+
import_components27.NavigationOption,
|
|
12017
12095
|
{
|
|
12018
12096
|
title: result.title,
|
|
12019
12097
|
content: result.description,
|
|
12020
|
-
media: /* @__PURE__ */ (0,
|
|
12098
|
+
media: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(NavigationOptionMedia, __spreadValues({}, result)),
|
|
12021
12099
|
showMediaCircle: false,
|
|
12022
12100
|
showMediaAtAllSizes: true,
|
|
12023
12101
|
onClick: () => {
|
|
@@ -12033,10 +12111,10 @@ function SearchResults({
|
|
|
12033
12111
|
var BlockSearchRendererComponent_default = BlockSearchRendererComponent;
|
|
12034
12112
|
|
|
12035
12113
|
// src/revamp/wise/renderers/SearchRenderer/InlineSearchRendererComponent.tsx
|
|
12036
|
-
var
|
|
12114
|
+
var import_components28 = require("@transferwise/components");
|
|
12037
12115
|
var import_icons2 = require("@transferwise/icons");
|
|
12038
12116
|
var import_react16 = require("react");
|
|
12039
|
-
var
|
|
12117
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
12040
12118
|
function InlineSearchRenderer({
|
|
12041
12119
|
id,
|
|
12042
12120
|
isLoading,
|
|
@@ -12047,19 +12125,19 @@ function InlineSearchRenderer({
|
|
|
12047
12125
|
}) {
|
|
12048
12126
|
const [hasSearched, setHasSearched] = (0, import_react16.useState)(false);
|
|
12049
12127
|
const trackEvent = useTrackEvent();
|
|
12050
|
-
return /* @__PURE__ */ (0,
|
|
12128
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: getMargin(margin), children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(FieldInput_default, { id, description: "", error: "", help: "", label: title, children: [
|
|
12051
12129
|
id,
|
|
12052
|
-
/* @__PURE__ */ (0,
|
|
12053
|
-
|
|
12130
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
12131
|
+
import_components28.Typeahead,
|
|
12054
12132
|
{
|
|
12055
12133
|
id: "typeahead-input-id",
|
|
12056
12134
|
name: "typeahead-input-name",
|
|
12057
12135
|
size: "md",
|
|
12058
12136
|
maxHeight: 100,
|
|
12059
|
-
footer: /* @__PURE__ */ (0,
|
|
12137
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(TypeaheadFooter, { state, isLoading }),
|
|
12060
12138
|
multiple: false,
|
|
12061
12139
|
clearable: false,
|
|
12062
|
-
addon: /* @__PURE__ */ (0,
|
|
12140
|
+
addon: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_icons2.Search, { size: 24 }),
|
|
12063
12141
|
options: state.type === "results" ? state.results.map(mapResultToTypeaheadOption) : [],
|
|
12064
12142
|
minQueryLength: 1,
|
|
12065
12143
|
onChange: (values) => {
|
|
@@ -12096,29 +12174,29 @@ function mapResultToTypeaheadOption(result) {
|
|
|
12096
12174
|
}
|
|
12097
12175
|
function TypeaheadFooter({ state, isLoading }) {
|
|
12098
12176
|
if (state.type === "noResults") {
|
|
12099
|
-
return /* @__PURE__ */ (0,
|
|
12177
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_components28.Markdown, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: state.message });
|
|
12100
12178
|
}
|
|
12101
12179
|
if (state.type === "error") {
|
|
12102
|
-
return /* @__PURE__ */ (0,
|
|
12180
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(ErrorResult, { state }) });
|
|
12103
12181
|
}
|
|
12104
12182
|
if (state.type === "pending" || isLoading) {
|
|
12105
|
-
return /* @__PURE__ */ (0,
|
|
12183
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("p", { className: "m-t-2 m-x-2", children: "Loading..." });
|
|
12106
12184
|
}
|
|
12107
12185
|
return null;
|
|
12108
12186
|
}
|
|
12109
12187
|
var InlineSearchRendererComponent_default = InlineSearchRenderer;
|
|
12110
12188
|
|
|
12111
12189
|
// src/revamp/wise/renderers/SearchRenderer/SearchRenderer.tsx
|
|
12112
|
-
var
|
|
12190
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
12113
12191
|
var SearchRenderer = {
|
|
12114
12192
|
canRenderType: "search",
|
|
12115
|
-
render: (props) => props.control === "inline" ? /* @__PURE__ */ (0,
|
|
12193
|
+
render: (props) => props.control === "inline" ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(InlineSearchRendererComponent_default, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(BlockSearchRendererComponent_default, __spreadValues({}, props))
|
|
12116
12194
|
};
|
|
12117
12195
|
var SearchRenderer_default = SearchRenderer;
|
|
12118
12196
|
|
|
12119
12197
|
// src/revamp/wise/renderers/SelectInputRenderer/RadioInputRendererComponent.tsx
|
|
12120
|
-
var
|
|
12121
|
-
var
|
|
12198
|
+
var import_components29 = require("@transferwise/components");
|
|
12199
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
12122
12200
|
function RadioInputRendererComponent(props) {
|
|
12123
12201
|
const {
|
|
12124
12202
|
id,
|
|
@@ -12132,9 +12210,9 @@ function RadioInputRendererComponent(props) {
|
|
|
12132
12210
|
selectedIndex,
|
|
12133
12211
|
onSelect
|
|
12134
12212
|
} = props;
|
|
12135
|
-
return /* @__PURE__ */ (0,
|
|
12136
|
-
/* @__PURE__ */ (0,
|
|
12137
|
-
|
|
12213
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
|
|
12214
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(FieldInput_default, { id, label, help, description, error, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
12215
|
+
import_components29.RadioGroup,
|
|
12138
12216
|
{
|
|
12139
12217
|
name: id,
|
|
12140
12218
|
radios: options.map((option, index) => ({
|
|
@@ -12142,7 +12220,7 @@ function RadioInputRendererComponent(props) {
|
|
|
12142
12220
|
value: index,
|
|
12143
12221
|
secondary: option.description,
|
|
12144
12222
|
disabled: option.disabled || disabled,
|
|
12145
|
-
avatar: /* @__PURE__ */ (0,
|
|
12223
|
+
avatar: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(OptionMedia, { icon: option.icon, image: option.image })
|
|
12146
12224
|
})),
|
|
12147
12225
|
selectedValue: selectedIndex != null ? selectedIndex : void 0,
|
|
12148
12226
|
onChange: onSelect
|
|
@@ -12154,9 +12232,9 @@ function RadioInputRendererComponent(props) {
|
|
|
12154
12232
|
}
|
|
12155
12233
|
|
|
12156
12234
|
// src/revamp/wise/renderers/SelectInputRenderer/TabInputRendererComponent.tsx
|
|
12157
|
-
var
|
|
12235
|
+
var import_components30 = require("@transferwise/components");
|
|
12158
12236
|
var import_react17 = require("react");
|
|
12159
|
-
var
|
|
12237
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
12160
12238
|
function TabInputRendererComponent(props) {
|
|
12161
12239
|
const {
|
|
12162
12240
|
id,
|
|
@@ -12175,9 +12253,9 @@ function TabInputRendererComponent(props) {
|
|
|
12175
12253
|
onSelect(0);
|
|
12176
12254
|
}
|
|
12177
12255
|
}, [selectedIndex, onSelect, options.length]);
|
|
12178
|
-
return /* @__PURE__ */ (0,
|
|
12179
|
-
/* @__PURE__ */ (0,
|
|
12180
|
-
|
|
12256
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_jsx_runtime47.Fragment, { children: [
|
|
12257
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(FieldInput_default, { id, label, help, description, error, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
12258
|
+
import_components30.Tabs,
|
|
12181
12259
|
{
|
|
12182
12260
|
name: id,
|
|
12183
12261
|
selected: selectedIndex != null ? selectedIndex : 0,
|
|
@@ -12185,7 +12263,7 @@ function TabInputRendererComponent(props) {
|
|
|
12185
12263
|
title: option.title,
|
|
12186
12264
|
// if we pass null, we get some props-types console errors
|
|
12187
12265
|
// eslint-disable-next-line react/jsx-no-useless-fragment
|
|
12188
|
-
content: /* @__PURE__ */ (0,
|
|
12266
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_jsx_runtime47.Fragment, {}),
|
|
12189
12267
|
disabled: option.disabled || disabled
|
|
12190
12268
|
})),
|
|
12191
12269
|
onTabSelect: onSelect
|
|
@@ -12197,26 +12275,26 @@ function TabInputRendererComponent(props) {
|
|
|
12197
12275
|
var isValidIndex = (index, options) => index !== null && index >= 0 && index < options;
|
|
12198
12276
|
|
|
12199
12277
|
// src/revamp/wise/renderers/SelectInputRenderer/SelectInputRendererComponent.tsx
|
|
12200
|
-
var
|
|
12278
|
+
var import_components32 = require("@transferwise/components");
|
|
12201
12279
|
|
|
12202
12280
|
// src/revamp/wise/renderers/SelectInputRenderer/SelectTriggerMedia.tsx
|
|
12203
|
-
var
|
|
12204
|
-
var
|
|
12281
|
+
var import_components31 = require("@transferwise/components");
|
|
12282
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
12205
12283
|
function SelectTriggerMedia({ icon, image }) {
|
|
12206
12284
|
if (image == null ? void 0 : image.url) {
|
|
12207
12285
|
return null;
|
|
12208
12286
|
}
|
|
12209
12287
|
if (icon && "name" in icon) {
|
|
12210
|
-
return /* @__PURE__ */ (0,
|
|
12288
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_components31.Avatar, { type: import_components31.AvatarType.ICON, size: 24, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(DynamicIcon_default, { name: icon.name }) });
|
|
12211
12289
|
}
|
|
12212
12290
|
if (icon && "text" in icon) {
|
|
12213
|
-
return /* @__PURE__ */ (0,
|
|
12291
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_components31.Avatar, { type: import_components31.AvatarType.ICON, size: 24, children: icon.text });
|
|
12214
12292
|
}
|
|
12215
12293
|
return null;
|
|
12216
12294
|
}
|
|
12217
12295
|
|
|
12218
12296
|
// src/revamp/wise/renderers/SelectInputRenderer/SelectInputRendererComponent.tsx
|
|
12219
|
-
var
|
|
12297
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
12220
12298
|
function SelectInputRendererComponent(props) {
|
|
12221
12299
|
const {
|
|
12222
12300
|
id,
|
|
@@ -12251,17 +12329,17 @@ function SelectInputRendererComponent(props) {
|
|
|
12251
12329
|
const contentProps = withinTrigger ? {
|
|
12252
12330
|
title: option.title,
|
|
12253
12331
|
note: option.description,
|
|
12254
|
-
icon: /* @__PURE__ */ (0,
|
|
12332
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(SelectTriggerMedia, { icon: option.icon, image: option.image })
|
|
12255
12333
|
} : {
|
|
12256
12334
|
title: option.title,
|
|
12257
12335
|
description: option.description,
|
|
12258
|
-
icon: /* @__PURE__ */ (0,
|
|
12336
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(OptionMedia, { icon: option.icon, image: option.image })
|
|
12259
12337
|
};
|
|
12260
|
-
return /* @__PURE__ */ (0,
|
|
12338
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_components32.SelectInputOptionContent, __spreadValues({}, contentProps));
|
|
12261
12339
|
};
|
|
12262
|
-
return /* @__PURE__ */ (0,
|
|
12263
|
-
/* @__PURE__ */ (0,
|
|
12264
|
-
|
|
12340
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
|
|
12341
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(FieldInput_default, { id, label, help, description, error, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
12342
|
+
import_components32.SelectInput,
|
|
12265
12343
|
{
|
|
12266
12344
|
name: id,
|
|
12267
12345
|
placeholder,
|
|
@@ -12280,8 +12358,8 @@ function SelectInputRendererComponent(props) {
|
|
|
12280
12358
|
|
|
12281
12359
|
// src/revamp/wise/renderers/SelectInputRenderer/SegmentedInputRendererComponent.tsx
|
|
12282
12360
|
var import_react18 = require("react");
|
|
12283
|
-
var
|
|
12284
|
-
var
|
|
12361
|
+
var import_components33 = require("@transferwise/components");
|
|
12362
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
12285
12363
|
function SegmentedInputRendererComponent(props) {
|
|
12286
12364
|
const { id, children, description, error, help, label, options, selectedIndex, onSelect } = props;
|
|
12287
12365
|
(0, import_react18.useEffect)(() => {
|
|
@@ -12289,9 +12367,9 @@ function SegmentedInputRendererComponent(props) {
|
|
|
12289
12367
|
onSelect(0);
|
|
12290
12368
|
}
|
|
12291
12369
|
}, [selectedIndex, onSelect, options.length]);
|
|
12292
|
-
return /* @__PURE__ */ (0,
|
|
12293
|
-
/* @__PURE__ */ (0,
|
|
12294
|
-
|
|
12370
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_jsx_runtime50.Fragment, { children: [
|
|
12371
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(FieldInput_default, { id, label, help, description, error, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
12372
|
+
import_components33.SegmentedControl,
|
|
12295
12373
|
{
|
|
12296
12374
|
name: `${id}-segmented-control`,
|
|
12297
12375
|
value: String(selectedIndex),
|
|
@@ -12305,44 +12383,44 @@ function SegmentedInputRendererComponent(props) {
|
|
|
12305
12383
|
onChange: (value) => onSelect(Number(value))
|
|
12306
12384
|
}
|
|
12307
12385
|
) }),
|
|
12308
|
-
/* @__PURE__ */ (0,
|
|
12386
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { id: `${id}-children`, children })
|
|
12309
12387
|
] });
|
|
12310
12388
|
}
|
|
12311
12389
|
var isValidIndex2 = (index, options) => index !== null && index >= 0 && index < options;
|
|
12312
12390
|
|
|
12313
12391
|
// src/revamp/wise/renderers/SelectInputRenderer/SelectInputRenderer.tsx
|
|
12314
|
-
var
|
|
12392
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
12315
12393
|
var SelectInputRenderer = {
|
|
12316
12394
|
canRenderType: "input-select",
|
|
12317
12395
|
render: (props) => {
|
|
12318
12396
|
switch (props.control) {
|
|
12319
12397
|
case "radio":
|
|
12320
|
-
return /* @__PURE__ */ (0,
|
|
12398
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(RadioInputRendererComponent, __spreadValues({}, props));
|
|
12321
12399
|
case "tab":
|
|
12322
|
-
return props.options.length > 3 ? /* @__PURE__ */ (0,
|
|
12400
|
+
return props.options.length > 3 ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(TabInputRendererComponent, __spreadValues({}, props));
|
|
12323
12401
|
case "segmented":
|
|
12324
|
-
return props.options.length > 3 ? /* @__PURE__ */ (0,
|
|
12402
|
+
return props.options.length > 3 ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SegmentedInputRendererComponent, __spreadValues({}, props));
|
|
12325
12403
|
case "select":
|
|
12326
12404
|
default:
|
|
12327
|
-
return /* @__PURE__ */ (0,
|
|
12405
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SelectInputRendererComponent, __spreadValues({}, props));
|
|
12328
12406
|
}
|
|
12329
12407
|
}
|
|
12330
12408
|
};
|
|
12331
12409
|
var SelectInputRenderer_default = SelectInputRenderer;
|
|
12332
12410
|
|
|
12333
12411
|
// src/revamp/wise/renderers/StatusListRenderer.tsx
|
|
12334
|
-
var
|
|
12335
|
-
var
|
|
12412
|
+
var import_components34 = require("@transferwise/components");
|
|
12413
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
12336
12414
|
var StatusListRenderer = {
|
|
12337
12415
|
canRenderType: "status-list",
|
|
12338
|
-
render: ({ margin, items, title }) => /* @__PURE__ */ (0,
|
|
12339
|
-
title ? /* @__PURE__ */ (0,
|
|
12340
|
-
items.map(({ description, icon, status, title: itemTitle }) => /* @__PURE__ */ (0,
|
|
12341
|
-
|
|
12416
|
+
render: ({ margin, items, title }) => /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: getMargin(margin), children: [
|
|
12417
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_components34.Header, { title }) : null,
|
|
12418
|
+
items.map(({ description, icon, status, title: itemTitle }) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12419
|
+
import_components34.Summary,
|
|
12342
12420
|
{
|
|
12343
12421
|
title: itemTitle,
|
|
12344
12422
|
description,
|
|
12345
|
-
icon: icon && "name" in icon ? /* @__PURE__ */ (0,
|
|
12423
|
+
icon: icon && "name" in icon ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(DynamicIcon_default, { name: icon.name }) : null,
|
|
12346
12424
|
status: mapStatus(status)
|
|
12347
12425
|
},
|
|
12348
12426
|
`${title}/${description || ""}`
|
|
@@ -12358,63 +12436,63 @@ var mapStatus = (status) => {
|
|
|
12358
12436
|
};
|
|
12359
12437
|
|
|
12360
12438
|
// src/revamp/wise/renderers/components/VariableTextInput.tsx
|
|
12361
|
-
var
|
|
12362
|
-
var
|
|
12439
|
+
var import_components35 = require("@transferwise/components");
|
|
12440
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
12363
12441
|
function VariableTextInput({
|
|
12364
12442
|
control,
|
|
12365
12443
|
inputProps
|
|
12366
12444
|
}) {
|
|
12367
12445
|
switch (control) {
|
|
12368
12446
|
case "password":
|
|
12369
|
-
return /* @__PURE__ */ (0,
|
|
12447
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(TextInput, __spreadValues({ type: "password" }, inputProps));
|
|
12370
12448
|
case "email":
|
|
12371
|
-
return /* @__PURE__ */ (0,
|
|
12449
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(TextInput, __spreadValues({ type: "email" }, inputProps));
|
|
12372
12450
|
case "textarea":
|
|
12373
|
-
return /* @__PURE__ */ (0,
|
|
12451
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(TextAreaInput, __spreadValues({}, inputProps));
|
|
12374
12452
|
case "numeric":
|
|
12375
|
-
return /* @__PURE__ */ (0,
|
|
12453
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(NumericInput, __spreadValues({ type: "number" }, inputProps));
|
|
12376
12454
|
case "phone-number":
|
|
12377
|
-
return /* @__PURE__ */ (0,
|
|
12455
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(PhoneNumberInput, __spreadValues({}, inputProps));
|
|
12378
12456
|
default:
|
|
12379
|
-
return /* @__PURE__ */ (0,
|
|
12457
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(TextInput, __spreadValues({ type: "text" }, inputProps));
|
|
12380
12458
|
}
|
|
12381
12459
|
}
|
|
12382
12460
|
function TextInput(_a) {
|
|
12383
12461
|
var _b = _a, { id, displayFormat, onChange } = _b, rest = __objRest(_b, ["id", "displayFormat", "onChange"]);
|
|
12384
12462
|
if (typeof displayFormat === "string") {
|
|
12385
12463
|
const inputProps = __spreadValues({ id, name: id, className: "form-control" }, rest);
|
|
12386
|
-
return /* @__PURE__ */ (0,
|
|
12387
|
-
|
|
12464
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
12465
|
+
import_components35.InputWithDisplayFormat,
|
|
12388
12466
|
__spreadValues({
|
|
12389
12467
|
displayPattern: displayFormat,
|
|
12390
12468
|
onChange: (newValue) => onChange(newValue)
|
|
12391
12469
|
}, inputProps)
|
|
12392
12470
|
);
|
|
12393
12471
|
}
|
|
12394
|
-
return /* @__PURE__ */ (0,
|
|
12472
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_components35.Input, __spreadValues({ id, name: id, onChange: (e) => onChange(e.target.value) }, rest));
|
|
12395
12473
|
}
|
|
12396
12474
|
function TextAreaInput(_a) {
|
|
12397
12475
|
var _b = _a, { id, displayFormat, onChange } = _b, rest = __objRest(_b, ["id", "displayFormat", "onChange"]);
|
|
12398
12476
|
const textAreaProps = __spreadValues({ id, name: id }, rest);
|
|
12399
|
-
return typeof displayFormat === "string" ? /* @__PURE__ */ (0,
|
|
12400
|
-
|
|
12477
|
+
return typeof displayFormat === "string" ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
12478
|
+
import_components35.TextareaWithDisplayFormat,
|
|
12401
12479
|
__spreadValues({
|
|
12402
12480
|
displayPattern: displayFormat,
|
|
12403
12481
|
onChange: (newValue) => onChange(newValue)
|
|
12404
12482
|
}, textAreaProps)
|
|
12405
|
-
) : /* @__PURE__ */ (0,
|
|
12483
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_components35.TextArea, __spreadValues({ onChange: (e) => onChange(e.target.value) }, textAreaProps));
|
|
12406
12484
|
}
|
|
12407
12485
|
function NumericInput(_a) {
|
|
12408
12486
|
var _b = _a, { id, displayFormat, onChange } = _b, rest = __objRest(_b, ["id", "displayFormat", "onChange"]);
|
|
12409
12487
|
const numericProps = __spreadValues({ id, name: id, onWheel }, rest);
|
|
12410
|
-
return typeof displayFormat === "string" ? /* @__PURE__ */ (0,
|
|
12411
|
-
|
|
12488
|
+
return typeof displayFormat === "string" ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
12489
|
+
import_components35.InputWithDisplayFormat,
|
|
12412
12490
|
__spreadValues({
|
|
12413
12491
|
displayPattern: displayFormat,
|
|
12414
12492
|
onChange: (newValue) => onChange(numericValueOrNull(newValue))
|
|
12415
12493
|
}, numericProps)
|
|
12416
|
-
) : /* @__PURE__ */ (0,
|
|
12417
|
-
|
|
12494
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
12495
|
+
import_components35.Input,
|
|
12418
12496
|
__spreadValues({
|
|
12419
12497
|
onChange: ({ target: { value: newValue } }) => onChange(numericValueOrNull(newValue))
|
|
12420
12498
|
}, numericProps)
|
|
@@ -12422,12 +12500,12 @@ function NumericInput(_a) {
|
|
|
12422
12500
|
}
|
|
12423
12501
|
function PhoneNumberInput(_a) {
|
|
12424
12502
|
var _b = _a, { value } = _b, rest = __objRest(_b, ["value"]);
|
|
12425
|
-
return /* @__PURE__ */ (0,
|
|
12503
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_components35.PhoneNumberInput, __spreadValues({ initialValue: value }, rest));
|
|
12426
12504
|
}
|
|
12427
12505
|
var VariableTextInput_default = VariableTextInput;
|
|
12428
12506
|
|
|
12429
12507
|
// src/revamp/wise/renderers/TextInputRenderer.tsx
|
|
12430
|
-
var
|
|
12508
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
12431
12509
|
var TextInputRenderer = {
|
|
12432
12510
|
canRenderType: "input-text",
|
|
12433
12511
|
render: (props) => {
|
|
@@ -12452,14 +12530,14 @@ var TextInputRenderer = {
|
|
|
12452
12530
|
]);
|
|
12453
12531
|
const value = initialValue != null ? initialValue : "";
|
|
12454
12532
|
const inputProps = __spreadProps(__spreadValues({}, rest), { value, id });
|
|
12455
|
-
return /* @__PURE__ */ (0,
|
|
12533
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(FieldInput_default, { id, label, description, error, help, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(VariableTextInput_default, { control, inputProps }) });
|
|
12456
12534
|
}
|
|
12457
12535
|
};
|
|
12458
12536
|
var TextInputRenderer_default = TextInputRenderer;
|
|
12459
12537
|
|
|
12460
12538
|
// src/revamp/wise/renderers/UploadInputRenderer.tsx
|
|
12461
|
-
var
|
|
12462
|
-
var
|
|
12539
|
+
var import_components36 = require("@transferwise/components");
|
|
12540
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
12463
12541
|
var UploadInputRenderer = {
|
|
12464
12542
|
canRenderType: "input-upload",
|
|
12465
12543
|
render: (props) => {
|
|
@@ -12475,8 +12553,8 @@ var UploadInputRenderer = {
|
|
|
12475
12553
|
};
|
|
12476
12554
|
return (
|
|
12477
12555
|
// We don't pass help here as there is no sensible place to display it
|
|
12478
|
-
/* @__PURE__ */ (0,
|
|
12479
|
-
|
|
12556
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(UploadFieldInput_default, { id, label: void 0, description: void 0, error, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
12557
|
+
import_components36.UploadInput,
|
|
12480
12558
|
{
|
|
12481
12559
|
id,
|
|
12482
12560
|
description,
|
|
@@ -12530,8 +12608,8 @@ var LargeUploadRenderer = {
|
|
|
12530
12608
|
throw e;
|
|
12531
12609
|
}
|
|
12532
12610
|
};
|
|
12533
|
-
return /* @__PURE__ */ (0,
|
|
12534
|
-
|
|
12611
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(FieldInput_default, { id, label, description, error, help, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
12612
|
+
import_components36.Upload,
|
|
12535
12613
|
__spreadProps(__spreadValues({}, uploadProps), {
|
|
12536
12614
|
usAccept: getAcceptsString(accepts),
|
|
12537
12615
|
usDisabled: disabled,
|
|
@@ -12543,67 +12621,6 @@ var LargeUploadRenderer = {
|
|
|
12543
12621
|
}
|
|
12544
12622
|
};
|
|
12545
12623
|
|
|
12546
|
-
// src/revamp/wise/renderers/ReviewRenderer.tsx
|
|
12547
|
-
var import_components36 = require("@transferwise/components");
|
|
12548
|
-
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
12549
|
-
var ReviewRenderer = {
|
|
12550
|
-
canRenderType: "review",
|
|
12551
|
-
render: ({ callToAction, control, fields, margin, title }) => {
|
|
12552
|
-
const orientation = mapControlToDefinitionListLayout(control);
|
|
12553
|
-
const action = callToAction ? {
|
|
12554
|
-
text: callToAction.title,
|
|
12555
|
-
onClick: (event) => {
|
|
12556
|
-
event.preventDefault();
|
|
12557
|
-
callToAction.onClick();
|
|
12558
|
-
}
|
|
12559
|
-
} : void 0;
|
|
12560
|
-
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: getMargin(margin), children: [
|
|
12561
|
-
(title || callToAction) && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_components36.Header, { title: title != null ? title : "", action }),
|
|
12562
|
-
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: margin, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
12563
|
-
import_components36.DefinitionList,
|
|
12564
|
-
{
|
|
12565
|
-
layout: orientation,
|
|
12566
|
-
definitions: fields.map(({ label, value, help }, index) => ({
|
|
12567
|
-
key: String(index),
|
|
12568
|
-
title: label,
|
|
12569
|
-
value: getFieldValue(value, help, orientation)
|
|
12570
|
-
}))
|
|
12571
|
-
}
|
|
12572
|
-
) })
|
|
12573
|
-
] });
|
|
12574
|
-
}
|
|
12575
|
-
};
|
|
12576
|
-
var ReviewRenderer_default = ReviewRenderer;
|
|
12577
|
-
var mapControlToDefinitionListLayout = (control) => {
|
|
12578
|
-
switch (control) {
|
|
12579
|
-
case "horizontal":
|
|
12580
|
-
case "horizontal-end-aligned":
|
|
12581
|
-
return "HORIZONTAL_RIGHT_ALIGNED";
|
|
12582
|
-
case "horizontal-start-aligned":
|
|
12583
|
-
return "HORIZONTAL_LEFT_ALIGNED";
|
|
12584
|
-
case "vertical-two-column":
|
|
12585
|
-
return "VERTICAL_TWO_COLUMN";
|
|
12586
|
-
case "vertical":
|
|
12587
|
-
case "vertical-one-column":
|
|
12588
|
-
default:
|
|
12589
|
-
return "VERTICAL_ONE_COLUMN";
|
|
12590
|
-
}
|
|
12591
|
-
};
|
|
12592
|
-
var getFieldValue = (value, help, orientation) => {
|
|
12593
|
-
if (help) {
|
|
12594
|
-
return orientation === "HORIZONTAL_RIGHT_ALIGNED" ? /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_jsx_runtime55.Fragment, { children: [
|
|
12595
|
-
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Help_default, { help }),
|
|
12596
|
-
" ",
|
|
12597
|
-
value
|
|
12598
|
-
] }) : /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_jsx_runtime55.Fragment, { children: [
|
|
12599
|
-
value,
|
|
12600
|
-
" ",
|
|
12601
|
-
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Help_default, { help })
|
|
12602
|
-
] });
|
|
12603
|
-
}
|
|
12604
|
-
return value;
|
|
12605
|
-
};
|
|
12606
|
-
|
|
12607
12624
|
// src/revamp/wise/renderers/step/StepRenderer.tsx
|
|
12608
12625
|
var import_react20 = require("react");
|
|
12609
12626
|
|
|
@@ -19511,6 +19528,79 @@ function JsonSchemaForm(props) {
|
|
|
19511
19528
|
var JsonSchemaForm_default = JsonSchemaForm;
|
|
19512
19529
|
var noop8 = () => {
|
|
19513
19530
|
};
|
|
19531
|
+
|
|
19532
|
+
// src/revamp/wise/renderers/step/KYCCameraStepRenderer.tsx
|
|
19533
|
+
var import_react67 = require("react");
|
|
19534
|
+
var import_jsx_runtime130 = require("react/jsx-runtime");
|
|
19535
|
+
var KYCCameraStepRenderer = {
|
|
19536
|
+
canRenderType: "step",
|
|
19537
|
+
canRender: (props) => getKYCCameraStepConfiguration(props.step) != null,
|
|
19538
|
+
render: KYCCameraStepRendererComponent
|
|
19539
|
+
};
|
|
19540
|
+
function KYCCameraStepRendererComponent(props) {
|
|
19541
|
+
const { error, trackEvent, step, onAction } = props;
|
|
19542
|
+
(0, import_react67.useEffect)(() => {
|
|
19543
|
+
if (error) {
|
|
19544
|
+
console.error("KYCCameraStepRendererComponent", error);
|
|
19545
|
+
}
|
|
19546
|
+
}, [error]);
|
|
19547
|
+
const config = getKYCCameraStepConfiguration(step);
|
|
19548
|
+
if (!config) {
|
|
19549
|
+
return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_jsx_runtime130.Fragment, {});
|
|
19550
|
+
}
|
|
19551
|
+
const handleCapture = async (blob) => {
|
|
19552
|
+
if (blob) {
|
|
19553
|
+
const newValue = { [propertyName]: await blobToBase642(blob) };
|
|
19554
|
+
const patchedAction = __spreadProps(__spreadValues({}, action), { skipValidation: true, data: newValue });
|
|
19555
|
+
void onAction(patchedAction);
|
|
19556
|
+
}
|
|
19557
|
+
};
|
|
19558
|
+
const { title, imageUrl, cameraConfig, action, propertyName } = config;
|
|
19559
|
+
const kycCameraConfig = cameraConfig;
|
|
19560
|
+
const { assets, instructions, direction } = kycCameraConfig;
|
|
19561
|
+
return config ? /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
19562
|
+
CameraCapture_default,
|
|
19563
|
+
{
|
|
19564
|
+
overlay: assets == null ? void 0 : assets.overlay,
|
|
19565
|
+
outline: assets == null ? void 0 : assets.outline,
|
|
19566
|
+
title: error != null ? error : title,
|
|
19567
|
+
imageUrl,
|
|
19568
|
+
instructions,
|
|
19569
|
+
direction,
|
|
19570
|
+
onEvent: trackEvent,
|
|
19571
|
+
onCapture: (blob) => {
|
|
19572
|
+
void handleCapture(blob);
|
|
19573
|
+
}
|
|
19574
|
+
},
|
|
19575
|
+
error
|
|
19576
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_jsx_runtime130.Fragment, {});
|
|
19577
|
+
}
|
|
19578
|
+
var getKYCCameraStepConfiguration = (step) => {
|
|
19579
|
+
var _a, _b, _c;
|
|
19580
|
+
const action = (_a = step.actions) == null ? void 0 : _a[0];
|
|
19581
|
+
if (action === void 0) {
|
|
19582
|
+
return null;
|
|
19583
|
+
}
|
|
19584
|
+
const firstSchema = filterHiddenSchemas2((_b = step.schemas) != null ? _b : [])[0];
|
|
19585
|
+
if (!firstSchema || !isObjectSchema(firstSchema)) {
|
|
19586
|
+
return null;
|
|
19587
|
+
}
|
|
19588
|
+
const propertyName = Object.keys(firstSchema.properties)[0];
|
|
19589
|
+
const childSchema = propertyName ? firstSchema.properties[propertyName] : void 0;
|
|
19590
|
+
const cameraConfig = childSchema ? getCameraConfig(childSchema) : null;
|
|
19591
|
+
const title = childSchema == null ? void 0 : childSchema.title;
|
|
19592
|
+
const imageUrl = (_c = childSchema == null ? void 0 : childSchema.image) == null ? void 0 : _c.url;
|
|
19593
|
+
return action && propertyName && cameraConfig ? { title, imageUrl, propertyName, cameraConfig, action } : null;
|
|
19594
|
+
};
|
|
19595
|
+
var getCameraConfig = (childSchema) => childSchema != null && "type" in childSchema && childSchema.type === "string" && childSchema.format === "base64url" && childSchema.source === "camera" && childSchema.cameraConfig != null ? childSchema.cameraConfig : null;
|
|
19596
|
+
var filterHiddenSchemas2 = (schemas) => schemas.filter(
|
|
19597
|
+
(schema) => isObjectSchema(schema) ? Object.values((schema == null ? void 0 : schema.properties) || {}).find((s) => (s == null ? void 0 : s.hidden) !== true) : (schema == null ? void 0 : schema.hidden) !== true
|
|
19598
|
+
);
|
|
19599
|
+
var blobToBase642 = (blob) => new Promise((resolve, _) => {
|
|
19600
|
+
const reader = new FileReader();
|
|
19601
|
+
reader.onloadend = () => resolve(reader.result);
|
|
19602
|
+
reader.readAsDataURL(blob);
|
|
19603
|
+
});
|
|
19514
19604
|
/*! Bundled license information:
|
|
19515
19605
|
|
|
19516
19606
|
classnames/index.js:
|