@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.mjs
CHANGED
|
@@ -1269,16 +1269,28 @@ var isStringSchemaWithUpload = (schema) => isStringSchema(schema) && schema.form
|
|
|
1269
1269
|
var isSchemaWithPersistAsync = (schema) => "persistAsync" in schema && !isNullish(schema.persistAsync);
|
|
1270
1270
|
|
|
1271
1271
|
// src/revamp/renderers/stepComponentToProps.ts
|
|
1272
|
-
var stepComponentToProps = ({
|
|
1272
|
+
var stepComponentToProps = ({
|
|
1273
|
+
back,
|
|
1274
|
+
description,
|
|
1275
|
+
error,
|
|
1276
|
+
external,
|
|
1277
|
+
loadingState,
|
|
1278
|
+
step,
|
|
1279
|
+
title,
|
|
1280
|
+
trackEvent,
|
|
1281
|
+
onAction
|
|
1282
|
+
}, children) => ({
|
|
1273
1283
|
type: "step",
|
|
1274
1284
|
back,
|
|
1275
1285
|
description,
|
|
1276
1286
|
error,
|
|
1277
1287
|
external,
|
|
1278
1288
|
loadingState,
|
|
1289
|
+
step,
|
|
1279
1290
|
title,
|
|
1291
|
+
children,
|
|
1280
1292
|
trackEvent,
|
|
1281
|
-
|
|
1293
|
+
onAction
|
|
1282
1294
|
});
|
|
1283
1295
|
|
|
1284
1296
|
// src/revamp/renderers/mappers/alertComponentToProps.ts
|
|
@@ -1793,12 +1805,14 @@ var getRenderFunction = (renderers) => {
|
|
|
1793
1805
|
if (type === "hidden") {
|
|
1794
1806
|
return null;
|
|
1795
1807
|
}
|
|
1796
|
-
const renderer = renderers.find(
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1808
|
+
const renderer = renderers.find(({ canRenderType, canRender = () => true }) => {
|
|
1809
|
+
try {
|
|
1810
|
+
return canRenderType === type && canRender(props);
|
|
1811
|
+
} catch (e) {
|
|
1812
|
+
console.error(`Error in canRender function for ${type}`, e);
|
|
1813
|
+
return false;
|
|
1814
|
+
}
|
|
1815
|
+
});
|
|
1802
1816
|
if (!renderer) {
|
|
1803
1817
|
throw new Error(`Could not find a renderer for ${type}`);
|
|
1804
1818
|
}
|
|
@@ -5660,21 +5674,13 @@ var z = /* @__PURE__ */ Object.freeze({
|
|
|
5660
5674
|
quotelessJson,
|
|
5661
5675
|
ZodError
|
|
5662
5676
|
});
|
|
5663
|
-
var
|
|
5664
|
-
|
|
5665
|
-
|
|
5666
|
-
|
|
5667
|
-
|
|
5668
|
-
|
|
5669
|
-
z.literal("GET"),
|
|
5670
|
-
z.literal("POST"),
|
|
5671
|
-
z.literal("PUT"),
|
|
5672
|
-
z.literal("PATCH"),
|
|
5673
|
-
z.literal("DELETE")
|
|
5677
|
+
var sizeSchema = z.union([
|
|
5678
|
+
z.literal("xs"),
|
|
5679
|
+
z.literal("sm"),
|
|
5680
|
+
z.literal("md"),
|
|
5681
|
+
z.literal("lg"),
|
|
5682
|
+
z.literal("xl")
|
|
5674
5683
|
]);
|
|
5675
|
-
var iconNamedSchema = z.object({
|
|
5676
|
-
name: z.string()
|
|
5677
|
-
});
|
|
5678
5684
|
var contextSchema = z.union([
|
|
5679
5685
|
z.literal("positive"),
|
|
5680
5686
|
z.literal("neutral"),
|
|
@@ -5685,18 +5691,114 @@ var contextSchema = z.union([
|
|
|
5685
5691
|
z.literal("info"),
|
|
5686
5692
|
z.literal("primary")
|
|
5687
5693
|
]);
|
|
5688
|
-
var
|
|
5689
|
-
|
|
5690
|
-
|
|
5691
|
-
|
|
5692
|
-
|
|
5693
|
-
|
|
5694
|
-
z.literal("
|
|
5695
|
-
z.literal("
|
|
5696
|
-
z.literal("
|
|
5694
|
+
var columnsLayoutBiasSchema = z.union([
|
|
5695
|
+
z.literal("none"),
|
|
5696
|
+
z.literal("left"),
|
|
5697
|
+
z.literal("right")
|
|
5698
|
+
]);
|
|
5699
|
+
var statusListLayoutStatusSchema = z.union([
|
|
5700
|
+
z.literal("not-done"),
|
|
5701
|
+
z.literal("pending"),
|
|
5702
|
+
z.literal("done")
|
|
5697
5703
|
]);
|
|
5698
5704
|
var alignSchema = z.union([z.literal("left"), z.literal("center"), z.literal("right")]);
|
|
5699
|
-
var
|
|
5705
|
+
var formLayoutSchemaReferenceSchema = z.object({
|
|
5706
|
+
$ref: z.string()
|
|
5707
|
+
});
|
|
5708
|
+
var modalLayoutTriggerSchema = z.object({
|
|
5709
|
+
title: z.string()
|
|
5710
|
+
});
|
|
5711
|
+
var httpMethodSchema = z.union([
|
|
5712
|
+
z.literal("GET"),
|
|
5713
|
+
z.literal("POST"),
|
|
5714
|
+
z.literal("PUT"),
|
|
5715
|
+
z.literal("PATCH"),
|
|
5716
|
+
z.literal("DELETE")
|
|
5717
|
+
]);
|
|
5718
|
+
var dividerLayoutSchema = z.object({
|
|
5719
|
+
type: z.literal("divider"),
|
|
5720
|
+
control: z.string().optional(),
|
|
5721
|
+
margin: sizeSchema.optional()
|
|
5722
|
+
});
|
|
5723
|
+
var listLayoutStatusSchema = z.union([
|
|
5724
|
+
z.literal("warning"),
|
|
5725
|
+
z.literal("neutral"),
|
|
5726
|
+
z.literal("positive")
|
|
5727
|
+
]);
|
|
5728
|
+
var headingLayoutSchema = z.object({
|
|
5729
|
+
type: z.literal("heading"),
|
|
5730
|
+
text: z.string(),
|
|
5731
|
+
size: sizeSchema.optional(),
|
|
5732
|
+
align: alignSchema.optional(),
|
|
5733
|
+
control: z.string().optional(),
|
|
5734
|
+
margin: sizeSchema.optional()
|
|
5735
|
+
});
|
|
5736
|
+
var alertLayoutSchema = z.object({
|
|
5737
|
+
type: z.literal("alert"),
|
|
5738
|
+
markdown: z.string(),
|
|
5739
|
+
context: contextSchema.optional(),
|
|
5740
|
+
control: z.string().optional(),
|
|
5741
|
+
margin: sizeSchema.optional()
|
|
5742
|
+
});
|
|
5743
|
+
var formLayoutSchema = z.object({
|
|
5744
|
+
type: z.literal("form"),
|
|
5745
|
+
schema: formLayoutSchemaReferenceSchema.optional(),
|
|
5746
|
+
schemaId: z.string(),
|
|
5747
|
+
control: z.string().optional(),
|
|
5748
|
+
margin: sizeSchema.optional()
|
|
5749
|
+
});
|
|
5750
|
+
var imageLayoutSchema = z.object({
|
|
5751
|
+
type: z.literal("image"),
|
|
5752
|
+
text: z.string().optional(),
|
|
5753
|
+
url: z.string(),
|
|
5754
|
+
size: sizeSchema.optional(),
|
|
5755
|
+
accessibilityDescription: z.string().optional(),
|
|
5756
|
+
control: z.string().optional(),
|
|
5757
|
+
margin: sizeSchema.optional()
|
|
5758
|
+
});
|
|
5759
|
+
var infoLayoutSchema = z.object({
|
|
5760
|
+
type: z.literal("info"),
|
|
5761
|
+
markdown: z.string(),
|
|
5762
|
+
align: alignSchema.optional(),
|
|
5763
|
+
control: z.string().optional(),
|
|
5764
|
+
margin: sizeSchema.optional()
|
|
5765
|
+
});
|
|
5766
|
+
var loadingIndicatorLayoutSchema = z.object({
|
|
5767
|
+
type: z.literal("loading-indicator"),
|
|
5768
|
+
size: sizeSchema.optional(),
|
|
5769
|
+
control: z.string().optional(),
|
|
5770
|
+
margin: sizeSchema.optional()
|
|
5771
|
+
});
|
|
5772
|
+
var paragraphLayoutSchema = z.object({
|
|
5773
|
+
type: z.literal("paragraph"),
|
|
5774
|
+
text: z.string(),
|
|
5775
|
+
align: alignSchema.optional(),
|
|
5776
|
+
control: z.string().optional(),
|
|
5777
|
+
margin: sizeSchema.optional()
|
|
5778
|
+
});
|
|
5779
|
+
var instructionsLayoutItemSchema = z.object({
|
|
5780
|
+
text: z.string(),
|
|
5781
|
+
context: contextSchema
|
|
5782
|
+
});
|
|
5783
|
+
var helpSchema = z.object({
|
|
5784
|
+
markdown: z.string()
|
|
5785
|
+
});
|
|
5786
|
+
var imageSchema = z.object({
|
|
5787
|
+
text: z.string().optional(),
|
|
5788
|
+
url: z.string(),
|
|
5789
|
+
accessibilityDescription: z.string().optional()
|
|
5790
|
+
});
|
|
5791
|
+
var summaryProviderSchema = z.object({
|
|
5792
|
+
providesTitle: z.boolean().optional(),
|
|
5793
|
+
providesDescription: z.boolean().optional(),
|
|
5794
|
+
providesIcon: z.boolean().optional(),
|
|
5795
|
+
providesImage: z.boolean().optional()
|
|
5796
|
+
});
|
|
5797
|
+
var validateAsyncSchema = z.object({
|
|
5798
|
+
param: z.string(),
|
|
5799
|
+
method: httpMethodSchema,
|
|
5800
|
+
url: z.string()
|
|
5801
|
+
});
|
|
5700
5802
|
var autocompleteTokenSchema = z.union([
|
|
5701
5803
|
z.literal("on"),
|
|
5702
5804
|
z.literal("name"),
|
|
@@ -5762,207 +5864,98 @@ var autocompleteTokenSchema = z.union([
|
|
|
5762
5864
|
z.literal("fax"),
|
|
5763
5865
|
z.literal("pager")
|
|
5764
5866
|
]);
|
|
5765
|
-
var
|
|
5766
|
-
|
|
5767
|
-
|
|
5768
|
-
|
|
5769
|
-
|
|
5867
|
+
var stringSchemaFormatSchema = z.union([
|
|
5868
|
+
z.literal("date"),
|
|
5869
|
+
z.literal("email"),
|
|
5870
|
+
z.literal("numeric"),
|
|
5871
|
+
z.literal("password"),
|
|
5872
|
+
z.literal("phone-number"),
|
|
5873
|
+
z.literal("base64url")
|
|
5874
|
+
]);
|
|
5875
|
+
var jsonElementSchema = z.lazy(
|
|
5876
|
+
() => z.union([
|
|
5877
|
+
z.string(),
|
|
5878
|
+
z.number(),
|
|
5879
|
+
z.boolean(),
|
|
5880
|
+
z.record(jsonElementSchema),
|
|
5881
|
+
z.array(jsonElementSchema)
|
|
5882
|
+
]).nullable()
|
|
5883
|
+
);
|
|
5884
|
+
var uploadSourceSchema = z.union([z.literal("camera"), z.literal("file")]);
|
|
5885
|
+
var externalSchema = z.object({
|
|
5886
|
+
url: z.string()
|
|
5770
5887
|
});
|
|
5771
|
-
var
|
|
5772
|
-
|
|
5773
|
-
|
|
5774
|
-
context: contextSchema.optional(),
|
|
5775
|
-
control: z.string().optional(),
|
|
5776
|
-
margin: sizeSchema.optional()
|
|
5888
|
+
var stepErrorSchema = z.object({
|
|
5889
|
+
error: z.string().optional(),
|
|
5890
|
+
validation: jsonElementSchema.optional()
|
|
5777
5891
|
});
|
|
5778
|
-
var
|
|
5779
|
-
|
|
5780
|
-
|
|
5892
|
+
var errorResponseBodySchema = z.object({
|
|
5893
|
+
refreshFormUrl: z.string().optional(),
|
|
5894
|
+
analytics: z.record(z.string()).optional(),
|
|
5895
|
+
error: z.string().optional(),
|
|
5896
|
+
validation: jsonElementSchema.optional(),
|
|
5897
|
+
refreshUrl: z.string().optional()
|
|
5898
|
+
});
|
|
5899
|
+
var searchSearchRequestSchema = z.object({
|
|
5900
|
+
url: z.string(),
|
|
5901
|
+
method: httpMethodSchema,
|
|
5902
|
+
param: z.string(),
|
|
5903
|
+
query: z.string()
|
|
5904
|
+
});
|
|
5905
|
+
var navigationStackBehaviorSchema = z.union([
|
|
5906
|
+
z.literal("default"),
|
|
5907
|
+
z.literal("remove-previous"),
|
|
5908
|
+
z.literal("remove-all"),
|
|
5909
|
+
z.literal("replace-current")
|
|
5910
|
+
]);
|
|
5911
|
+
var actionTypeSchema = z.union([
|
|
5912
|
+
z.literal("primary"),
|
|
5913
|
+
z.literal("secondary"),
|
|
5914
|
+
z.literal("link"),
|
|
5915
|
+
z.literal("positive"),
|
|
5916
|
+
z.literal("negative")
|
|
5917
|
+
]);
|
|
5918
|
+
var iconNamedSchema = z.object({
|
|
5919
|
+
name: z.string()
|
|
5920
|
+
});
|
|
5921
|
+
var iconTextSchema = z.object({
|
|
5922
|
+
text: z.string()
|
|
5923
|
+
});
|
|
5924
|
+
var actionSchema = z.object({
|
|
5925
|
+
title: z.string().optional(),
|
|
5926
|
+
type: actionTypeSchema.optional(),
|
|
5927
|
+
disabled: z.boolean().optional(),
|
|
5928
|
+
$id: z.string().optional(),
|
|
5929
|
+
$ref: z.string().optional(),
|
|
5930
|
+
id: z.string().optional(),
|
|
5931
|
+
url: z.string().optional(),
|
|
5932
|
+
method: httpMethodSchema.optional(),
|
|
5933
|
+
exit: z.boolean().optional(),
|
|
5934
|
+
result: jsonElementSchema.optional(),
|
|
5935
|
+
data: jsonElementSchema.optional(),
|
|
5936
|
+
timeout: z.number().optional(),
|
|
5937
|
+
skipValidation: z.boolean().optional()
|
|
5938
|
+
});
|
|
5939
|
+
var markdownLayoutSchema = z.object({
|
|
5940
|
+
type: z.literal("markdown"),
|
|
5941
|
+
content: z.string(),
|
|
5781
5942
|
align: alignSchema.optional(),
|
|
5782
5943
|
control: z.string().optional(),
|
|
5783
5944
|
margin: sizeSchema.optional()
|
|
5784
5945
|
});
|
|
5785
|
-
var
|
|
5786
|
-
type: z.literal("
|
|
5946
|
+
var searchLayoutSchema = z.object({
|
|
5947
|
+
type: z.literal("search"),
|
|
5948
|
+
title: z.string(),
|
|
5949
|
+
method: httpMethodSchema,
|
|
5950
|
+
url: z.string(),
|
|
5951
|
+
param: z.string(),
|
|
5952
|
+
emptyMessage: z.string().optional(),
|
|
5787
5953
|
control: z.string().optional(),
|
|
5788
5954
|
margin: sizeSchema.optional()
|
|
5789
5955
|
});
|
|
5790
|
-
var
|
|
5791
|
-
z.literal("warning"),
|
|
5792
|
-
z.literal("neutral"),
|
|
5793
|
-
z.literal("positive")
|
|
5794
|
-
]);
|
|
5795
|
-
var formLayoutSchemaReferenceSchema = z.object({
|
|
5796
|
-
$ref: z.string()
|
|
5797
|
-
});
|
|
5798
|
-
var imageLayoutSchema = z.object({
|
|
5799
|
-
type: z.literal("image"),
|
|
5800
|
-
text: z.string().optional(),
|
|
5801
|
-
url: z.string(),
|
|
5802
|
-
size: sizeSchema.optional(),
|
|
5803
|
-
accessibilityDescription: z.string().optional(),
|
|
5804
|
-
control: z.string().optional(),
|
|
5805
|
-
margin: sizeSchema.optional()
|
|
5806
|
-
});
|
|
5807
|
-
var statusListLayoutStatusSchema = z.union([
|
|
5808
|
-
z.literal("not-done"),
|
|
5809
|
-
z.literal("pending"),
|
|
5810
|
-
z.literal("done")
|
|
5811
|
-
]);
|
|
5812
|
-
var instructionsLayoutItemSchema = z.object({
|
|
5813
|
-
text: z.string(),
|
|
5814
|
-
context: contextSchema
|
|
5815
|
-
});
|
|
5816
|
-
var modalLayoutTriggerSchema = z.object({
|
|
5817
|
-
title: z.string()
|
|
5818
|
-
});
|
|
5819
|
-
var searchLayoutSchema = z.object({
|
|
5820
|
-
type: z.literal("search"),
|
|
5821
|
-
title: z.string(),
|
|
5822
|
-
method: httpMethodSchema,
|
|
5823
|
-
url: z.string(),
|
|
5824
|
-
param: z.string(),
|
|
5825
|
-
emptyMessage: z.string().optional(),
|
|
5826
|
-
control: z.string().optional(),
|
|
5827
|
-
margin: sizeSchema.optional()
|
|
5828
|
-
});
|
|
5829
|
-
var infoLayoutSchema = z.object({
|
|
5830
|
-
type: z.literal("info"),
|
|
5831
|
-
markdown: z.string(),
|
|
5832
|
-
align: alignSchema.optional(),
|
|
5833
|
-
control: z.string().optional(),
|
|
5834
|
-
margin: sizeSchema.optional()
|
|
5835
|
-
});
|
|
5836
|
-
var formLayoutSchema = z.object({
|
|
5837
|
-
type: z.literal("form"),
|
|
5838
|
-
schema: formLayoutSchemaReferenceSchema.optional(),
|
|
5839
|
-
schemaId: z.string(),
|
|
5840
|
-
control: z.string().optional(),
|
|
5841
|
-
margin: sizeSchema.optional()
|
|
5842
|
-
});
|
|
5843
|
-
var headingLayoutSchema = z.object({
|
|
5844
|
-
type: z.literal("heading"),
|
|
5845
|
-
text: z.string(),
|
|
5846
|
-
size: sizeSchema.optional(),
|
|
5847
|
-
align: alignSchema.optional(),
|
|
5848
|
-
control: z.string().optional(),
|
|
5849
|
-
margin: sizeSchema.optional()
|
|
5850
|
-
});
|
|
5851
|
-
var markdownLayoutSchema = z.object({
|
|
5852
|
-
type: z.literal("markdown"),
|
|
5853
|
-
content: z.string(),
|
|
5854
|
-
align: alignSchema.optional(),
|
|
5855
|
-
control: z.string().optional(),
|
|
5856
|
-
margin: sizeSchema.optional()
|
|
5857
|
-
});
|
|
5858
|
-
var columnsLayoutBiasSchema = z.union([
|
|
5859
|
-
z.literal("none"),
|
|
5860
|
-
z.literal("left"),
|
|
5861
|
-
z.literal("right")
|
|
5862
|
-
]);
|
|
5863
|
-
var helpSchema = z.object({
|
|
5864
|
-
markdown: z.string()
|
|
5865
|
-
});
|
|
5866
|
-
var searchSearchRequestSchema = z.object({
|
|
5867
|
-
url: z.string(),
|
|
5868
|
-
method: httpMethodSchema,
|
|
5869
|
-
param: z.string(),
|
|
5870
|
-
query: z.string()
|
|
5871
|
-
});
|
|
5872
|
-
var jsonElementSchema = z.lazy(
|
|
5873
|
-
() => z.union([
|
|
5874
|
-
z.string(),
|
|
5875
|
-
z.number(),
|
|
5876
|
-
z.boolean(),
|
|
5877
|
-
z.record(jsonElementSchema),
|
|
5878
|
-
z.array(jsonElementSchema)
|
|
5879
|
-
]).nullable()
|
|
5880
|
-
);
|
|
5881
|
-
var externalSchema = z.object({
|
|
5882
|
-
url: z.string()
|
|
5883
|
-
});
|
|
5884
|
-
var stepErrorSchema = z.object({
|
|
5885
|
-
error: z.string().optional(),
|
|
5886
|
-
validation: jsonElementSchema.optional()
|
|
5887
|
-
});
|
|
5888
|
-
var stringSchemaFormatSchema = z.union([
|
|
5889
|
-
z.literal("date"),
|
|
5890
|
-
z.literal("email"),
|
|
5891
|
-
z.literal("numeric"),
|
|
5892
|
-
z.literal("password"),
|
|
5893
|
-
z.literal("phone-number"),
|
|
5894
|
-
z.literal("base64url")
|
|
5895
|
-
]);
|
|
5896
|
-
var summarySummariserSchema = z.object({
|
|
5897
|
-
defaultTitle: z.string().optional(),
|
|
5898
|
-
defaultDescription: z.string().optional(),
|
|
5899
|
-
defaultIcon: iconSchema.optional(),
|
|
5900
|
-
defaultImage: imageLayoutSchema.optional(),
|
|
5901
|
-
providesTitle: z.boolean().optional(),
|
|
5902
|
-
providesDescription: z.boolean().optional(),
|
|
5903
|
-
providesIcon: z.boolean().optional(),
|
|
5904
|
-
providesImage: z.boolean().optional()
|
|
5905
|
-
});
|
|
5906
|
-
var validateAsyncSchema = z.object({
|
|
5907
|
-
param: z.string(),
|
|
5908
|
-
method: httpMethodSchema,
|
|
5909
|
-
url: z.string()
|
|
5910
|
-
});
|
|
5911
|
-
var summaryProviderSchema = z.object({
|
|
5912
|
-
providesTitle: z.boolean().optional(),
|
|
5913
|
-
providesDescription: z.boolean().optional(),
|
|
5914
|
-
providesIcon: z.boolean().optional(),
|
|
5915
|
-
providesImage: z.boolean().optional()
|
|
5916
|
-
});
|
|
5917
|
-
var uploadSourceSchema = z.union([z.literal("camera"), z.literal("file")]);
|
|
5918
|
-
var navigationStackBehaviorSchema = z.union([
|
|
5919
|
-
z.literal("default"),
|
|
5920
|
-
z.literal("remove-previous"),
|
|
5921
|
-
z.literal("remove-all"),
|
|
5922
|
-
z.literal("replace-current")
|
|
5923
|
-
]);
|
|
5924
|
-
var actionTypeSchema = z.union([
|
|
5925
|
-
z.literal("primary"),
|
|
5926
|
-
z.literal("secondary"),
|
|
5927
|
-
z.literal("link"),
|
|
5928
|
-
z.literal("positive"),
|
|
5929
|
-
z.literal("negative")
|
|
5930
|
-
]);
|
|
5931
|
-
var summarySchema = z.union([summaryProviderSchema, summarySummariserSchema]);
|
|
5932
|
-
var actionSchema = z.object({
|
|
5933
|
-
title: z.string().optional(),
|
|
5934
|
-
type: actionTypeSchema.optional(),
|
|
5935
|
-
disabled: z.boolean().optional(),
|
|
5936
|
-
$id: z.string().optional(),
|
|
5937
|
-
$ref: z.string().optional(),
|
|
5938
|
-
id: z.string().optional(),
|
|
5939
|
-
url: z.string().optional(),
|
|
5940
|
-
method: httpMethodSchema.optional(),
|
|
5941
|
-
exit: z.boolean().optional(),
|
|
5942
|
-
result: jsonElementSchema.optional(),
|
|
5943
|
-
data: jsonElementSchema.optional(),
|
|
5944
|
-
timeout: z.number().optional(),
|
|
5945
|
-
skipValidation: z.boolean().optional()
|
|
5946
|
-
});
|
|
5947
|
-
var listLayoutItemSchema = z.object({
|
|
5948
|
-
title: z.string(),
|
|
5949
|
-
description: z.string().optional(),
|
|
5950
|
-
icon: iconSchema,
|
|
5951
|
-
status: listLayoutStatusSchema.optional()
|
|
5952
|
-
});
|
|
5953
|
-
var decisionLayoutOptionSchema = z.object({
|
|
5954
|
-
action: actionSchema,
|
|
5955
|
-
title: z.string(),
|
|
5956
|
-
description: z.string().optional(),
|
|
5957
|
-
disabled: z.boolean().optional(),
|
|
5958
|
-
icon: iconSchema.optional(),
|
|
5959
|
-
image: imageLayoutSchema.optional()
|
|
5960
|
-
});
|
|
5961
|
-
var statusListLayoutItemSchema = z.object({
|
|
5956
|
+
var reviewLayoutCallToActionSchema = z.object({
|
|
5962
5957
|
title: z.string(),
|
|
5963
|
-
|
|
5964
|
-
icon: iconSchema,
|
|
5965
|
-
status: statusListLayoutStatusSchema.optional()
|
|
5958
|
+
action: actionSchema
|
|
5966
5959
|
});
|
|
5967
5960
|
var instructionsLayoutSchema = z.object({
|
|
5968
5961
|
type: z.literal("instructions"),
|
|
@@ -5971,51 +5964,17 @@ var instructionsLayoutSchema = z.object({
|
|
|
5971
5964
|
control: z.string().optional(),
|
|
5972
5965
|
margin: sizeSchema.optional()
|
|
5973
5966
|
});
|
|
5974
|
-
var
|
|
5975
|
-
type: z.literal("button"),
|
|
5976
|
-
size: sizeSchema.optional(),
|
|
5977
|
-
title: z.string().optional(),
|
|
5978
|
-
action: actionSchema,
|
|
5979
|
-
context: contextSchema.optional(),
|
|
5980
|
-
disabled: z.boolean().optional(),
|
|
5981
|
-
pinOrder: z.number().optional(),
|
|
5982
|
-
control: z.string().optional(),
|
|
5983
|
-
margin: sizeSchema.optional()
|
|
5984
|
-
});
|
|
5967
|
+
var iconSchema = z.union([iconNamedSchema, iconTextSchema]);
|
|
5985
5968
|
var reviewLayoutFieldSchema = z.object({
|
|
5986
5969
|
label: z.string(),
|
|
5987
5970
|
value: z.string(),
|
|
5988
5971
|
help: helpSchema.optional()
|
|
5989
5972
|
});
|
|
5990
|
-
var
|
|
5991
|
-
type: z.literal("search"),
|
|
5992
|
-
title: z.string(),
|
|
5993
|
-
description: z.string().optional(),
|
|
5994
|
-
icon: iconSchema.optional(),
|
|
5995
|
-
image: imageLayoutSchema.optional(),
|
|
5996
|
-
value: searchSearchRequestSchema
|
|
5997
|
-
});
|
|
5998
|
-
var searchResultActionSchema = z.object({
|
|
5999
|
-
type: z.literal("action"),
|
|
5973
|
+
var statusListLayoutItemSchema = z.object({
|
|
6000
5974
|
title: z.string(),
|
|
6001
5975
|
description: z.string().optional(),
|
|
6002
|
-
icon: iconSchema
|
|
6003
|
-
|
|
6004
|
-
value: actionSchema
|
|
6005
|
-
});
|
|
6006
|
-
var actionResponseBodySchema = z.object({
|
|
6007
|
-
action: actionSchema
|
|
6008
|
-
});
|
|
6009
|
-
var errorResponseBodySchema = z.object({
|
|
6010
|
-
refreshFormUrl: z.string().optional(),
|
|
6011
|
-
analytics: z.record(z.string()).optional(),
|
|
6012
|
-
error: z.string().optional(),
|
|
6013
|
-
validation: jsonElementSchema.optional(),
|
|
6014
|
-
refreshUrl: z.string().optional()
|
|
6015
|
-
});
|
|
6016
|
-
var linkHandlerSchema = z.object({
|
|
6017
|
-
regexPattern: z.string(),
|
|
6018
|
-
action: actionSchema
|
|
5976
|
+
icon: iconSchema,
|
|
5977
|
+
status: statusListLayoutStatusSchema.optional()
|
|
6019
5978
|
});
|
|
6020
5979
|
var blobSchemaSchema = z.object({
|
|
6021
5980
|
type: z.literal("blob"),
|
|
@@ -6055,37 +6014,66 @@ var constSchemaSchema = z.object({
|
|
|
6055
6014
|
analyticsId: z.string().optional(),
|
|
6056
6015
|
disabled: z.boolean().optional()
|
|
6057
6016
|
});
|
|
6058
|
-
var
|
|
6017
|
+
var summarySummariserSchema = z.object({
|
|
6018
|
+
defaultTitle: z.string().optional(),
|
|
6019
|
+
defaultDescription: z.string().optional(),
|
|
6020
|
+
defaultIcon: iconSchema.optional(),
|
|
6021
|
+
defaultImage: imageLayoutSchema.optional(),
|
|
6022
|
+
providesTitle: z.boolean().optional(),
|
|
6023
|
+
providesDescription: z.boolean().optional(),
|
|
6024
|
+
providesIcon: z.boolean().optional(),
|
|
6025
|
+
providesImage: z.boolean().optional()
|
|
6026
|
+
});
|
|
6027
|
+
var linkHandlerSchema = z.object({
|
|
6028
|
+
regexPattern: z.string(),
|
|
6059
6029
|
action: actionSchema
|
|
6060
6030
|
});
|
|
6061
|
-
var
|
|
6062
|
-
title: z.string().optional(),
|
|
6031
|
+
var actionResponseBodySchema = z.object({
|
|
6063
6032
|
action: actionSchema
|
|
6064
6033
|
});
|
|
6065
|
-
var
|
|
6034
|
+
var searchResultSearchSchema = z.object({
|
|
6035
|
+
type: z.literal("search"),
|
|
6036
|
+
title: z.string(),
|
|
6037
|
+
description: z.string().optional(),
|
|
6038
|
+
icon: iconSchema.optional(),
|
|
6039
|
+
image: imageLayoutSchema.optional(),
|
|
6040
|
+
value: searchSearchRequestSchema
|
|
6041
|
+
});
|
|
6042
|
+
var searchResultActionSchema = z.object({
|
|
6043
|
+
type: z.literal("action"),
|
|
6066
6044
|
title: z.string(),
|
|
6045
|
+
description: z.string().optional(),
|
|
6046
|
+
icon: iconSchema.optional(),
|
|
6047
|
+
image: imageLayoutSchema.optional(),
|
|
6048
|
+
value: actionSchema
|
|
6049
|
+
});
|
|
6050
|
+
var pollingOnErrorSchema = z.object({
|
|
6067
6051
|
action: actionSchema
|
|
6068
6052
|
});
|
|
6069
|
-
var
|
|
6070
|
-
type: z.literal("list"),
|
|
6071
|
-
items: z.array(listLayoutItemSchema),
|
|
6053
|
+
var navigationBackBehaviourSchema = z.object({
|
|
6072
6054
|
title: z.string().optional(),
|
|
6073
|
-
|
|
6074
|
-
margin: sizeSchema.optional()
|
|
6075
|
-
});
|
|
6076
|
-
var decisionLayoutSchema = z.object({
|
|
6077
|
-
type: z.literal("decision"),
|
|
6078
|
-
options: z.array(decisionLayoutOptionSchema),
|
|
6079
|
-
control: z.string().optional(),
|
|
6080
|
-
margin: sizeSchema.optional()
|
|
6055
|
+
action: actionSchema
|
|
6081
6056
|
});
|
|
6082
|
-
var
|
|
6083
|
-
|
|
6084
|
-
|
|
6057
|
+
var summarySchema = z.union([summaryProviderSchema, summarySummariserSchema]);
|
|
6058
|
+
var buttonLayoutSchema = z.object({
|
|
6059
|
+
type: z.literal("button"),
|
|
6060
|
+
size: sizeSchema.optional(),
|
|
6085
6061
|
title: z.string().optional(),
|
|
6062
|
+
action: actionSchema,
|
|
6063
|
+
context: contextSchema.optional(),
|
|
6064
|
+
disabled: z.boolean().optional(),
|
|
6065
|
+
pinOrder: z.number().optional(),
|
|
6086
6066
|
control: z.string().optional(),
|
|
6087
6067
|
margin: sizeSchema.optional()
|
|
6088
6068
|
});
|
|
6069
|
+
var decisionLayoutOptionSchema = z.object({
|
|
6070
|
+
action: actionSchema,
|
|
6071
|
+
title: z.string(),
|
|
6072
|
+
description: z.string().optional(),
|
|
6073
|
+
disabled: z.boolean().optional(),
|
|
6074
|
+
icon: iconSchema.optional(),
|
|
6075
|
+
image: imageLayoutSchema.optional()
|
|
6076
|
+
});
|
|
6089
6077
|
var reviewLayoutSchema = z.object({
|
|
6090
6078
|
type: z.literal("review"),
|
|
6091
6079
|
orientation: z.string().optional(),
|
|
@@ -6096,7 +6084,19 @@ var reviewLayoutSchema = z.object({
|
|
|
6096
6084
|
control: z.string().optional(),
|
|
6097
6085
|
margin: sizeSchema.optional()
|
|
6098
6086
|
});
|
|
6099
|
-
var
|
|
6087
|
+
var statusListLayoutSchema = z.object({
|
|
6088
|
+
type: z.literal("status-list"),
|
|
6089
|
+
items: z.array(statusListLayoutItemSchema),
|
|
6090
|
+
title: z.string().optional(),
|
|
6091
|
+
control: z.string().optional(),
|
|
6092
|
+
margin: sizeSchema.optional()
|
|
6093
|
+
});
|
|
6094
|
+
var listLayoutItemSchema = z.object({
|
|
6095
|
+
title: z.string(),
|
|
6096
|
+
description: z.string().optional(),
|
|
6097
|
+
icon: iconSchema,
|
|
6098
|
+
status: listLayoutStatusSchema.optional()
|
|
6099
|
+
});
|
|
6100
6100
|
var pollingSchema = z.object({
|
|
6101
6101
|
url: z.string(),
|
|
6102
6102
|
interval: z.number(),
|
|
@@ -6108,9 +6108,33 @@ var navigationSchema = z.object({
|
|
|
6108
6108
|
back: navigationBackBehaviourSchema.optional(),
|
|
6109
6109
|
stackBehavior: navigationStackBehaviorSchema.optional()
|
|
6110
6110
|
});
|
|
6111
|
+
var searchResultSchema = z.union([searchResultActionSchema, searchResultSearchSchema]);
|
|
6112
|
+
var decisionLayoutSchema = z.object({
|
|
6113
|
+
type: z.literal("decision"),
|
|
6114
|
+
options: z.array(decisionLayoutOptionSchema),
|
|
6115
|
+
control: z.string().optional(),
|
|
6116
|
+
margin: sizeSchema.optional()
|
|
6117
|
+
});
|
|
6118
|
+
var listLayoutSchema = z.object({
|
|
6119
|
+
type: z.literal("list"),
|
|
6120
|
+
items: z.array(listLayoutItemSchema),
|
|
6121
|
+
title: z.string().optional(),
|
|
6122
|
+
control: z.string().optional(),
|
|
6123
|
+
margin: sizeSchema.optional()
|
|
6124
|
+
});
|
|
6111
6125
|
var searchResponseBodySchema = z.object({
|
|
6112
6126
|
results: z.array(searchResultSchema)
|
|
6113
6127
|
});
|
|
6128
|
+
var columnsLayoutSchema = z.lazy(
|
|
6129
|
+
() => z.object({
|
|
6130
|
+
type: z.literal("columns"),
|
|
6131
|
+
left: z.array(layoutSchema),
|
|
6132
|
+
right: z.array(layoutSchema),
|
|
6133
|
+
bias: columnsLayoutBiasSchema.optional(),
|
|
6134
|
+
control: z.string().optional(),
|
|
6135
|
+
margin: sizeSchema.optional()
|
|
6136
|
+
})
|
|
6137
|
+
);
|
|
6114
6138
|
var layoutSchema = z.lazy(
|
|
6115
6139
|
() => z.union([
|
|
6116
6140
|
alertLayoutSchema,
|
|
@@ -6121,38 +6145,18 @@ var layoutSchema = z.lazy(
|
|
|
6121
6145
|
dividerLayoutSchema,
|
|
6122
6146
|
formLayoutSchema,
|
|
6123
6147
|
headingLayoutSchema,
|
|
6124
|
-
imageLayoutSchema,
|
|
6125
|
-
infoLayoutSchema,
|
|
6126
|
-
instructionsLayoutSchema,
|
|
6127
|
-
listLayoutSchema,
|
|
6128
|
-
loadingIndicatorLayoutSchema,
|
|
6129
|
-
markdownLayoutSchema,
|
|
6130
|
-
modalLayoutSchema,
|
|
6131
|
-
paragraphLayoutSchema,
|
|
6132
|
-
reviewLayoutSchema,
|
|
6133
|
-
searchLayoutSchema,
|
|
6134
|
-
statusListLayoutSchema
|
|
6135
|
-
])
|
|
6136
|
-
);
|
|
6137
|
-
var boxLayoutSchema = z.lazy(
|
|
6138
|
-
() => z.object({
|
|
6139
|
-
type: z.literal("box"),
|
|
6140
|
-
components: z.array(layoutSchema),
|
|
6141
|
-
width: sizeSchema.optional(),
|
|
6142
|
-
border: z.boolean().optional(),
|
|
6143
|
-
control: z.string().optional(),
|
|
6144
|
-
margin: sizeSchema.optional()
|
|
6145
|
-
})
|
|
6146
|
-
);
|
|
6147
|
-
var columnsLayoutSchema = z.lazy(
|
|
6148
|
-
() => z.object({
|
|
6149
|
-
type: z.literal("columns"),
|
|
6150
|
-
left: z.array(layoutSchema),
|
|
6151
|
-
right: z.array(layoutSchema),
|
|
6152
|
-
bias: columnsLayoutBiasSchema.optional(),
|
|
6153
|
-
control: z.string().optional(),
|
|
6154
|
-
margin: sizeSchema.optional()
|
|
6155
|
-
})
|
|
6148
|
+
imageLayoutSchema,
|
|
6149
|
+
infoLayoutSchema,
|
|
6150
|
+
instructionsLayoutSchema,
|
|
6151
|
+
listLayoutSchema,
|
|
6152
|
+
loadingIndicatorLayoutSchema,
|
|
6153
|
+
markdownLayoutSchema,
|
|
6154
|
+
modalLayoutSchema,
|
|
6155
|
+
paragraphLayoutSchema,
|
|
6156
|
+
reviewLayoutSchema,
|
|
6157
|
+
searchLayoutSchema,
|
|
6158
|
+
statusListLayoutSchema
|
|
6159
|
+
])
|
|
6156
6160
|
);
|
|
6157
6161
|
var modalLayoutSchema = z.lazy(
|
|
6158
6162
|
() => z.object({
|
|
@@ -6168,25 +6172,14 @@ var modalLayoutContentSchema = z.lazy(
|
|
|
6168
6172
|
components: z.array(layoutSchema)
|
|
6169
6173
|
})
|
|
6170
6174
|
);
|
|
6171
|
-
var
|
|
6175
|
+
var boxLayoutSchema = z.lazy(
|
|
6172
6176
|
() => z.object({
|
|
6173
|
-
|
|
6174
|
-
|
|
6175
|
-
|
|
6176
|
-
|
|
6177
|
-
|
|
6178
|
-
|
|
6179
|
-
description: z.string().optional(),
|
|
6180
|
-
schemas: z.array(schemaSchema),
|
|
6181
|
-
layout: z.array(layoutSchema),
|
|
6182
|
-
model: jsonElementSchema.optional(),
|
|
6183
|
-
external: externalSchema.optional(),
|
|
6184
|
-
polling: pollingSchema.optional(),
|
|
6185
|
-
linkHandlers: z.array(linkHandlerSchema).optional(),
|
|
6186
|
-
analytics: z.record(z.string()).optional(),
|
|
6187
|
-
errors: stepErrorSchema.optional(),
|
|
6188
|
-
navigation: navigationSchema.optional(),
|
|
6189
|
-
refreshUrl: z.string().optional()
|
|
6177
|
+
type: z.literal("box"),
|
|
6178
|
+
components: z.array(layoutSchema),
|
|
6179
|
+
width: sizeSchema.optional(),
|
|
6180
|
+
border: z.boolean().optional(),
|
|
6181
|
+
control: z.string().optional(),
|
|
6182
|
+
margin: sizeSchema.optional()
|
|
6190
6183
|
})
|
|
6191
6184
|
);
|
|
6192
6185
|
var schemaSchema = z.lazy(
|
|
@@ -6412,17 +6405,21 @@ var stringSchemaSchema = z.lazy(
|
|
|
6412
6405
|
help: helpSchema.optional()
|
|
6413
6406
|
})
|
|
6414
6407
|
);
|
|
6415
|
-
var
|
|
6408
|
+
var persistAsyncSchema = z.lazy(
|
|
6409
|
+
() => z.object({
|
|
6410
|
+
param: z.string(),
|
|
6411
|
+
idProperty: z.string(),
|
|
6412
|
+
schema: schemaSchema,
|
|
6413
|
+
url: z.string(),
|
|
6414
|
+
method: httpMethodSchema
|
|
6415
|
+
})
|
|
6416
|
+
);
|
|
6417
|
+
var arraySchemaTupleSchema = z.lazy(
|
|
6416
6418
|
() => z.object({
|
|
6417
6419
|
type: z.literal("array"),
|
|
6418
6420
|
promoted: z.boolean().optional(),
|
|
6419
6421
|
$id: z.string().optional(),
|
|
6420
|
-
items: schemaSchema,
|
|
6421
|
-
addItemTitle: z.string(),
|
|
6422
|
-
editItemTitle: z.string(),
|
|
6423
|
-
minItems: z.number().optional(),
|
|
6424
|
-
maxItems: z.number().optional(),
|
|
6425
|
-
placeholder: z.string().optional(),
|
|
6422
|
+
items: z.array(schemaSchema),
|
|
6426
6423
|
title: z.string().optional(),
|
|
6427
6424
|
description: z.string().optional(),
|
|
6428
6425
|
control: z.string().optional(),
|
|
@@ -6430,30 +6427,24 @@ var arraySchemaListSchema = z.lazy(
|
|
|
6430
6427
|
icon: iconSchema.optional(),
|
|
6431
6428
|
image: imageSchema.optional(),
|
|
6432
6429
|
keywords: z.array(z.string()).optional(),
|
|
6433
|
-
summary:
|
|
6430
|
+
summary: summaryProviderSchema.optional(),
|
|
6434
6431
|
analyticsId: z.string().optional(),
|
|
6435
6432
|
persistAsync: persistAsyncSchema.optional(),
|
|
6436
6433
|
validationAsync: validateAsyncSchema.optional(),
|
|
6437
|
-
alert: alertLayoutSchema.optional()
|
|
6438
|
-
validationMessages: z.record(z.string()).optional(),
|
|
6439
|
-
disabled: z.boolean().optional()
|
|
6440
|
-
})
|
|
6441
|
-
);
|
|
6442
|
-
var persistAsyncSchema = z.lazy(
|
|
6443
|
-
() => z.object({
|
|
6444
|
-
param: z.string(),
|
|
6445
|
-
idProperty: z.string(),
|
|
6446
|
-
schema: schemaSchema,
|
|
6447
|
-
url: z.string(),
|
|
6448
|
-
method: httpMethodSchema
|
|
6434
|
+
alert: alertLayoutSchema.optional()
|
|
6449
6435
|
})
|
|
6450
6436
|
);
|
|
6451
|
-
var
|
|
6437
|
+
var arraySchemaListSchema = z.lazy(
|
|
6452
6438
|
() => z.object({
|
|
6453
6439
|
type: z.literal("array"),
|
|
6454
6440
|
promoted: z.boolean().optional(),
|
|
6455
6441
|
$id: z.string().optional(),
|
|
6456
|
-
items:
|
|
6442
|
+
items: schemaSchema,
|
|
6443
|
+
addItemTitle: z.string(),
|
|
6444
|
+
editItemTitle: z.string(),
|
|
6445
|
+
minItems: z.number().optional(),
|
|
6446
|
+
maxItems: z.number().optional(),
|
|
6447
|
+
placeholder: z.string().optional(),
|
|
6457
6448
|
title: z.string().optional(),
|
|
6458
6449
|
description: z.string().optional(),
|
|
6459
6450
|
control: z.string().optional(),
|
|
@@ -6461,11 +6452,34 @@ var arraySchemaTupleSchema = z.lazy(
|
|
|
6461
6452
|
icon: iconSchema.optional(),
|
|
6462
6453
|
image: imageSchema.optional(),
|
|
6463
6454
|
keywords: z.array(z.string()).optional(),
|
|
6464
|
-
summary:
|
|
6455
|
+
summary: summarySummariserSchema.optional(),
|
|
6465
6456
|
analyticsId: z.string().optional(),
|
|
6466
6457
|
persistAsync: persistAsyncSchema.optional(),
|
|
6467
6458
|
validationAsync: validateAsyncSchema.optional(),
|
|
6468
|
-
alert: alertLayoutSchema.optional()
|
|
6459
|
+
alert: alertLayoutSchema.optional(),
|
|
6460
|
+
validationMessages: z.record(z.string()).optional(),
|
|
6461
|
+
disabled: z.boolean().optional()
|
|
6462
|
+
})
|
|
6463
|
+
);
|
|
6464
|
+
var stepSchema = z.lazy(
|
|
6465
|
+
() => z.object({
|
|
6466
|
+
key: z.string().optional(),
|
|
6467
|
+
type: z.string().optional(),
|
|
6468
|
+
actions: z.array(actionSchema).optional(),
|
|
6469
|
+
refreshFormUrl: z.string().optional(),
|
|
6470
|
+
id: z.string(),
|
|
6471
|
+
title: z.string(),
|
|
6472
|
+
description: z.string().optional(),
|
|
6473
|
+
schemas: z.array(schemaSchema),
|
|
6474
|
+
layout: z.array(layoutSchema),
|
|
6475
|
+
model: jsonElementSchema.optional(),
|
|
6476
|
+
external: externalSchema.optional(),
|
|
6477
|
+
polling: pollingSchema.optional(),
|
|
6478
|
+
linkHandlers: z.array(linkHandlerSchema).optional(),
|
|
6479
|
+
analytics: z.record(z.string()).optional(),
|
|
6480
|
+
errors: stepErrorSchema.optional(),
|
|
6481
|
+
navigation: navigationSchema.optional(),
|
|
6482
|
+
refreshUrl: z.string().optional()
|
|
6469
6483
|
})
|
|
6470
6484
|
);
|
|
6471
6485
|
var validateStep = (step) => validate(step, stepSchema);
|
|
@@ -9993,7 +10007,9 @@ var mapStepToComponent = (_a) => {
|
|
|
9993
10007
|
stepPolling,
|
|
9994
10008
|
updateComponent,
|
|
9995
10009
|
title: displayStepTitle ? title : void 0,
|
|
9996
|
-
trackEvent
|
|
10010
|
+
trackEvent,
|
|
10011
|
+
step,
|
|
10012
|
+
onAction
|
|
9997
10013
|
});
|
|
9998
10014
|
return stepComponent;
|
|
9999
10015
|
};
|
|
@@ -11907,18 +11923,79 @@ function ItemSummaryOption({
|
|
|
11907
11923
|
}
|
|
11908
11924
|
var RepeatableRenderer_default = RepeatableRenderer;
|
|
11909
11925
|
|
|
11926
|
+
// src/revamp/wise/renderers/ReviewRenderer.tsx
|
|
11927
|
+
import { DefinitionList, Header as Header4 } from "@transferwise/components";
|
|
11928
|
+
import { Fragment as Fragment5, jsx as jsx41, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
11929
|
+
var ReviewRenderer = {
|
|
11930
|
+
canRenderType: "review",
|
|
11931
|
+
render: ({ callToAction, control, fields, margin, title }) => {
|
|
11932
|
+
const orientation = mapControlToDefinitionListLayout(control);
|
|
11933
|
+
const action = callToAction ? {
|
|
11934
|
+
text: callToAction.title,
|
|
11935
|
+
onClick: (event) => {
|
|
11936
|
+
event.preventDefault();
|
|
11937
|
+
callToAction.onClick();
|
|
11938
|
+
}
|
|
11939
|
+
} : void 0;
|
|
11940
|
+
return /* @__PURE__ */ jsxs12("div", { className: getMargin(margin), children: [
|
|
11941
|
+
(title || callToAction) && /* @__PURE__ */ jsx41(Header4, { title: title != null ? title : "", action }),
|
|
11942
|
+
/* @__PURE__ */ jsx41("div", { className: margin, children: /* @__PURE__ */ jsx41(
|
|
11943
|
+
DefinitionList,
|
|
11944
|
+
{
|
|
11945
|
+
layout: orientation,
|
|
11946
|
+
definitions: fields.map(({ label, value, help }, index) => ({
|
|
11947
|
+
key: String(index),
|
|
11948
|
+
title: label,
|
|
11949
|
+
value: getFieldValue(value, help, orientation)
|
|
11950
|
+
}))
|
|
11951
|
+
}
|
|
11952
|
+
) })
|
|
11953
|
+
] });
|
|
11954
|
+
}
|
|
11955
|
+
};
|
|
11956
|
+
var ReviewRenderer_default = ReviewRenderer;
|
|
11957
|
+
var mapControlToDefinitionListLayout = (control) => {
|
|
11958
|
+
switch (control) {
|
|
11959
|
+
case "horizontal":
|
|
11960
|
+
case "horizontal-end-aligned":
|
|
11961
|
+
return "HORIZONTAL_RIGHT_ALIGNED";
|
|
11962
|
+
case "horizontal-start-aligned":
|
|
11963
|
+
return "HORIZONTAL_LEFT_ALIGNED";
|
|
11964
|
+
case "vertical-two-column":
|
|
11965
|
+
return "VERTICAL_TWO_COLUMN";
|
|
11966
|
+
case "vertical":
|
|
11967
|
+
case "vertical-one-column":
|
|
11968
|
+
default:
|
|
11969
|
+
return "VERTICAL_ONE_COLUMN";
|
|
11970
|
+
}
|
|
11971
|
+
};
|
|
11972
|
+
var getFieldValue = (value, help, orientation) => {
|
|
11973
|
+
if (help) {
|
|
11974
|
+
return orientation === "HORIZONTAL_RIGHT_ALIGNED" ? /* @__PURE__ */ jsxs12(Fragment5, { children: [
|
|
11975
|
+
/* @__PURE__ */ jsx41(Help_default, { help }),
|
|
11976
|
+
" ",
|
|
11977
|
+
value
|
|
11978
|
+
] }) : /* @__PURE__ */ jsxs12(Fragment5, { children: [
|
|
11979
|
+
value,
|
|
11980
|
+
" ",
|
|
11981
|
+
/* @__PURE__ */ jsx41(Help_default, { help })
|
|
11982
|
+
] });
|
|
11983
|
+
}
|
|
11984
|
+
return value;
|
|
11985
|
+
};
|
|
11986
|
+
|
|
11910
11987
|
// src/revamp/wise/renderers/SearchRenderer/BlockSearchRendererComponent.tsx
|
|
11911
11988
|
import { Input as Input5, Markdown as Markdown3, NavigationOption as NavigationOption3, NavigationOptionsList as NavigationOptionsList2 } from "@transferwise/components";
|
|
11912
11989
|
|
|
11913
11990
|
// src/revamp/wise/renderers/SearchRenderer/ErrorResult.tsx
|
|
11914
11991
|
import { useIntl as useIntl7 } from "react-intl";
|
|
11915
|
-
import { jsx as
|
|
11992
|
+
import { jsx as jsx42, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
11916
11993
|
function ErrorResult({ state }) {
|
|
11917
11994
|
const intl = useIntl7();
|
|
11918
|
-
return /* @__PURE__ */
|
|
11995
|
+
return /* @__PURE__ */ jsxs13("p", { className: "m-t-2", children: [
|
|
11919
11996
|
intl.formatMessage(generic_error_messages_default.genericError),
|
|
11920
11997
|
"\xA0",
|
|
11921
|
-
/* @__PURE__ */
|
|
11998
|
+
/* @__PURE__ */ jsx42(
|
|
11922
11999
|
"a",
|
|
11923
12000
|
{
|
|
11924
12001
|
href: "/",
|
|
@@ -11934,7 +12011,7 @@ function ErrorResult({ state }) {
|
|
|
11934
12011
|
|
|
11935
12012
|
// src/revamp/wise/renderers/SearchRenderer/BlockSearchRendererComponent.tsx
|
|
11936
12013
|
import { useState as useState8 } from "react";
|
|
11937
|
-
import { Fragment as
|
|
12014
|
+
import { Fragment as Fragment6, jsx as jsx43, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
11938
12015
|
function BlockSearchRendererComponent({
|
|
11939
12016
|
id,
|
|
11940
12017
|
isLoading,
|
|
@@ -11946,8 +12023,8 @@ function BlockSearchRendererComponent({
|
|
|
11946
12023
|
}) {
|
|
11947
12024
|
const [hasSearched, setHasSearched] = useState8(false);
|
|
11948
12025
|
const trackEvent = useTrackEvent();
|
|
11949
|
-
return /* @__PURE__ */
|
|
11950
|
-
/* @__PURE__ */
|
|
12026
|
+
return /* @__PURE__ */ jsxs14("div", { className: getMargin(margin), children: [
|
|
12027
|
+
/* @__PURE__ */ jsx43(FieldInput_default, { id, description: "", error: "", help: "", label: title, children: /* @__PURE__ */ jsx43(
|
|
11951
12028
|
Input5,
|
|
11952
12029
|
{
|
|
11953
12030
|
id,
|
|
@@ -11964,7 +12041,7 @@ function BlockSearchRendererComponent({
|
|
|
11964
12041
|
}
|
|
11965
12042
|
}
|
|
11966
12043
|
) }),
|
|
11967
|
-
isLoading ? /* @__PURE__ */
|
|
12044
|
+
isLoading ? /* @__PURE__ */ jsx43(Fragment6, { children: "Loading..." }) : /* @__PURE__ */ jsx43(SearchResultContent, { state, onChange })
|
|
11968
12045
|
] });
|
|
11969
12046
|
}
|
|
11970
12047
|
function SearchResultContent({
|
|
@@ -11973,29 +12050,29 @@ function SearchResultContent({
|
|
|
11973
12050
|
}) {
|
|
11974
12051
|
switch (state.type) {
|
|
11975
12052
|
case "error":
|
|
11976
|
-
return /* @__PURE__ */
|
|
12053
|
+
return /* @__PURE__ */ jsx43(ErrorResult, { state });
|
|
11977
12054
|
case "results":
|
|
11978
|
-
return /* @__PURE__ */
|
|
12055
|
+
return /* @__PURE__ */ jsx43(SearchResults, { state, onChange });
|
|
11979
12056
|
case "noResults":
|
|
11980
|
-
return /* @__PURE__ */
|
|
12057
|
+
return /* @__PURE__ */ jsx43(EmptySearchResult, { state });
|
|
11981
12058
|
case "pending":
|
|
11982
12059
|
default:
|
|
11983
12060
|
return null;
|
|
11984
12061
|
}
|
|
11985
12062
|
}
|
|
11986
12063
|
function EmptySearchResult({ state }) {
|
|
11987
|
-
return /* @__PURE__ */
|
|
12064
|
+
return /* @__PURE__ */ jsx43(Markdown3, { className: "m-t-2", config: { link: { target: "_blank" } }, children: state.message });
|
|
11988
12065
|
}
|
|
11989
12066
|
function SearchResults({
|
|
11990
12067
|
state
|
|
11991
12068
|
}) {
|
|
11992
12069
|
const trackEvent = useTrackEvent();
|
|
11993
|
-
return /* @__PURE__ */
|
|
12070
|
+
return /* @__PURE__ */ jsx43(NavigationOptionsList2, { children: state.results.map((result) => /* @__PURE__ */ jsx43(
|
|
11994
12071
|
NavigationOption3,
|
|
11995
12072
|
{
|
|
11996
12073
|
title: result.title,
|
|
11997
12074
|
content: result.description,
|
|
11998
|
-
media: /* @__PURE__ */
|
|
12075
|
+
media: /* @__PURE__ */ jsx43(NavigationOptionMedia, __spreadValues({}, result)),
|
|
11999
12076
|
showMediaCircle: false,
|
|
12000
12077
|
showMediaAtAllSizes: true,
|
|
12001
12078
|
onClick: () => {
|
|
@@ -12014,7 +12091,7 @@ var BlockSearchRendererComponent_default = BlockSearchRendererComponent;
|
|
|
12014
12091
|
import { Markdown as Markdown4, Typeahead } from "@transferwise/components";
|
|
12015
12092
|
import { Search } from "@transferwise/icons";
|
|
12016
12093
|
import { useState as useState9 } from "react";
|
|
12017
|
-
import { jsx as
|
|
12094
|
+
import { jsx as jsx44, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
12018
12095
|
function InlineSearchRenderer({
|
|
12019
12096
|
id,
|
|
12020
12097
|
isLoading,
|
|
@@ -12025,19 +12102,19 @@ function InlineSearchRenderer({
|
|
|
12025
12102
|
}) {
|
|
12026
12103
|
const [hasSearched, setHasSearched] = useState9(false);
|
|
12027
12104
|
const trackEvent = useTrackEvent();
|
|
12028
|
-
return /* @__PURE__ */
|
|
12105
|
+
return /* @__PURE__ */ jsx44("div", { className: getMargin(margin), children: /* @__PURE__ */ jsxs15(FieldInput_default, { id, description: "", error: "", help: "", label: title, children: [
|
|
12029
12106
|
id,
|
|
12030
|
-
/* @__PURE__ */
|
|
12107
|
+
/* @__PURE__ */ jsx44(
|
|
12031
12108
|
Typeahead,
|
|
12032
12109
|
{
|
|
12033
12110
|
id: "typeahead-input-id",
|
|
12034
12111
|
name: "typeahead-input-name",
|
|
12035
12112
|
size: "md",
|
|
12036
12113
|
maxHeight: 100,
|
|
12037
|
-
footer: /* @__PURE__ */
|
|
12114
|
+
footer: /* @__PURE__ */ jsx44(TypeaheadFooter, { state, isLoading }),
|
|
12038
12115
|
multiple: false,
|
|
12039
12116
|
clearable: false,
|
|
12040
|
-
addon: /* @__PURE__ */
|
|
12117
|
+
addon: /* @__PURE__ */ jsx44(Search, { size: 24 }),
|
|
12041
12118
|
options: state.type === "results" ? state.results.map(mapResultToTypeaheadOption) : [],
|
|
12042
12119
|
minQueryLength: 1,
|
|
12043
12120
|
onChange: (values) => {
|
|
@@ -12074,29 +12151,29 @@ function mapResultToTypeaheadOption(result) {
|
|
|
12074
12151
|
}
|
|
12075
12152
|
function TypeaheadFooter({ state, isLoading }) {
|
|
12076
12153
|
if (state.type === "noResults") {
|
|
12077
|
-
return /* @__PURE__ */
|
|
12154
|
+
return /* @__PURE__ */ jsx44(Markdown4, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: state.message });
|
|
12078
12155
|
}
|
|
12079
12156
|
if (state.type === "error") {
|
|
12080
|
-
return /* @__PURE__ */
|
|
12157
|
+
return /* @__PURE__ */ jsx44("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ jsx44(ErrorResult, { state }) });
|
|
12081
12158
|
}
|
|
12082
12159
|
if (state.type === "pending" || isLoading) {
|
|
12083
|
-
return /* @__PURE__ */
|
|
12160
|
+
return /* @__PURE__ */ jsx44("p", { className: "m-t-2 m-x-2", children: "Loading..." });
|
|
12084
12161
|
}
|
|
12085
12162
|
return null;
|
|
12086
12163
|
}
|
|
12087
12164
|
var InlineSearchRendererComponent_default = InlineSearchRenderer;
|
|
12088
12165
|
|
|
12089
12166
|
// src/revamp/wise/renderers/SearchRenderer/SearchRenderer.tsx
|
|
12090
|
-
import { jsx as
|
|
12167
|
+
import { jsx as jsx45 } from "react/jsx-runtime";
|
|
12091
12168
|
var SearchRenderer = {
|
|
12092
12169
|
canRenderType: "search",
|
|
12093
|
-
render: (props) => props.control === "inline" ? /* @__PURE__ */
|
|
12170
|
+
render: (props) => props.control === "inline" ? /* @__PURE__ */ jsx45(InlineSearchRendererComponent_default, __spreadValues({}, props)) : /* @__PURE__ */ jsx45(BlockSearchRendererComponent_default, __spreadValues({}, props))
|
|
12094
12171
|
};
|
|
12095
12172
|
var SearchRenderer_default = SearchRenderer;
|
|
12096
12173
|
|
|
12097
12174
|
// src/revamp/wise/renderers/SelectInputRenderer/RadioInputRendererComponent.tsx
|
|
12098
12175
|
import { RadioGroup } from "@transferwise/components";
|
|
12099
|
-
import { Fragment as
|
|
12176
|
+
import { Fragment as Fragment7, jsx as jsx46, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
12100
12177
|
function RadioInputRendererComponent(props) {
|
|
12101
12178
|
const {
|
|
12102
12179
|
id,
|
|
@@ -12110,8 +12187,8 @@ function RadioInputRendererComponent(props) {
|
|
|
12110
12187
|
selectedIndex,
|
|
12111
12188
|
onSelect
|
|
12112
12189
|
} = props;
|
|
12113
|
-
return /* @__PURE__ */
|
|
12114
|
-
/* @__PURE__ */
|
|
12190
|
+
return /* @__PURE__ */ jsxs16(Fragment7, { children: [
|
|
12191
|
+
/* @__PURE__ */ jsx46(FieldInput_default, { id, label, help, description, error, children: /* @__PURE__ */ jsx46("span", { children: /* @__PURE__ */ jsx46(
|
|
12115
12192
|
RadioGroup,
|
|
12116
12193
|
{
|
|
12117
12194
|
name: id,
|
|
@@ -12120,7 +12197,7 @@ function RadioInputRendererComponent(props) {
|
|
|
12120
12197
|
value: index,
|
|
12121
12198
|
secondary: option.description,
|
|
12122
12199
|
disabled: option.disabled || disabled,
|
|
12123
|
-
avatar: /* @__PURE__ */
|
|
12200
|
+
avatar: /* @__PURE__ */ jsx46(OptionMedia, { icon: option.icon, image: option.image })
|
|
12124
12201
|
})),
|
|
12125
12202
|
selectedValue: selectedIndex != null ? selectedIndex : void 0,
|
|
12126
12203
|
onChange: onSelect
|
|
@@ -12134,7 +12211,7 @@ function RadioInputRendererComponent(props) {
|
|
|
12134
12211
|
// src/revamp/wise/renderers/SelectInputRenderer/TabInputRendererComponent.tsx
|
|
12135
12212
|
import { Tabs } from "@transferwise/components";
|
|
12136
12213
|
import { useEffect as useEffect4 } from "react";
|
|
12137
|
-
import { Fragment as
|
|
12214
|
+
import { Fragment as Fragment8, jsx as jsx47, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
12138
12215
|
function TabInputRendererComponent(props) {
|
|
12139
12216
|
const {
|
|
12140
12217
|
id,
|
|
@@ -12153,8 +12230,8 @@ function TabInputRendererComponent(props) {
|
|
|
12153
12230
|
onSelect(0);
|
|
12154
12231
|
}
|
|
12155
12232
|
}, [selectedIndex, onSelect, options.length]);
|
|
12156
|
-
return /* @__PURE__ */
|
|
12157
|
-
/* @__PURE__ */
|
|
12233
|
+
return /* @__PURE__ */ jsxs17(Fragment8, { children: [
|
|
12234
|
+
/* @__PURE__ */ jsx47(FieldInput_default, { id, label, help, description, error, children: /* @__PURE__ */ jsx47(
|
|
12158
12235
|
Tabs,
|
|
12159
12236
|
{
|
|
12160
12237
|
name: id,
|
|
@@ -12163,7 +12240,7 @@ function TabInputRendererComponent(props) {
|
|
|
12163
12240
|
title: option.title,
|
|
12164
12241
|
// if we pass null, we get some props-types console errors
|
|
12165
12242
|
// eslint-disable-next-line react/jsx-no-useless-fragment
|
|
12166
|
-
content: /* @__PURE__ */
|
|
12243
|
+
content: /* @__PURE__ */ jsx47(Fragment8, {}),
|
|
12167
12244
|
disabled: option.disabled || disabled
|
|
12168
12245
|
})),
|
|
12169
12246
|
onTabSelect: onSelect
|
|
@@ -12179,22 +12256,22 @@ import { SelectInput as SelectInput2, SelectInputOptionContent as SelectInputOpt
|
|
|
12179
12256
|
|
|
12180
12257
|
// src/revamp/wise/renderers/SelectInputRenderer/SelectTriggerMedia.tsx
|
|
12181
12258
|
import { Avatar as Avatar3, AvatarType as AvatarType3 } from "@transferwise/components";
|
|
12182
|
-
import { jsx as
|
|
12259
|
+
import { jsx as jsx48 } from "react/jsx-runtime";
|
|
12183
12260
|
function SelectTriggerMedia({ icon, image }) {
|
|
12184
12261
|
if (image == null ? void 0 : image.url) {
|
|
12185
12262
|
return null;
|
|
12186
12263
|
}
|
|
12187
12264
|
if (icon && "name" in icon) {
|
|
12188
|
-
return /* @__PURE__ */
|
|
12265
|
+
return /* @__PURE__ */ jsx48(Avatar3, { type: AvatarType3.ICON, size: 24, children: /* @__PURE__ */ jsx48(DynamicIcon_default, { name: icon.name }) });
|
|
12189
12266
|
}
|
|
12190
12267
|
if (icon && "text" in icon) {
|
|
12191
|
-
return /* @__PURE__ */
|
|
12268
|
+
return /* @__PURE__ */ jsx48(Avatar3, { type: AvatarType3.ICON, size: 24, children: icon.text });
|
|
12192
12269
|
}
|
|
12193
12270
|
return null;
|
|
12194
12271
|
}
|
|
12195
12272
|
|
|
12196
12273
|
// src/revamp/wise/renderers/SelectInputRenderer/SelectInputRendererComponent.tsx
|
|
12197
|
-
import { Fragment as
|
|
12274
|
+
import { Fragment as Fragment9, jsx as jsx49, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
12198
12275
|
function SelectInputRendererComponent(props) {
|
|
12199
12276
|
const {
|
|
12200
12277
|
id,
|
|
@@ -12229,16 +12306,16 @@ function SelectInputRendererComponent(props) {
|
|
|
12229
12306
|
const contentProps = withinTrigger ? {
|
|
12230
12307
|
title: option.title,
|
|
12231
12308
|
note: option.description,
|
|
12232
|
-
icon: /* @__PURE__ */
|
|
12309
|
+
icon: /* @__PURE__ */ jsx49(SelectTriggerMedia, { icon: option.icon, image: option.image })
|
|
12233
12310
|
} : {
|
|
12234
12311
|
title: option.title,
|
|
12235
12312
|
description: option.description,
|
|
12236
|
-
icon: /* @__PURE__ */
|
|
12313
|
+
icon: /* @__PURE__ */ jsx49(OptionMedia, { icon: option.icon, image: option.image })
|
|
12237
12314
|
};
|
|
12238
|
-
return /* @__PURE__ */
|
|
12315
|
+
return /* @__PURE__ */ jsx49(SelectInputOptionContent2, __spreadValues({}, contentProps));
|
|
12239
12316
|
};
|
|
12240
|
-
return /* @__PURE__ */
|
|
12241
|
-
/* @__PURE__ */
|
|
12317
|
+
return /* @__PURE__ */ jsxs18(Fragment9, { children: [
|
|
12318
|
+
/* @__PURE__ */ jsx49(FieldInput_default, { id, label, help, description, error, children: /* @__PURE__ */ jsx49(
|
|
12242
12319
|
SelectInput2,
|
|
12243
12320
|
{
|
|
12244
12321
|
name: id,
|
|
@@ -12259,7 +12336,7 @@ function SelectInputRendererComponent(props) {
|
|
|
12259
12336
|
// src/revamp/wise/renderers/SelectInputRenderer/SegmentedInputRendererComponent.tsx
|
|
12260
12337
|
import { useEffect as useEffect5 } from "react";
|
|
12261
12338
|
import { SegmentedControl } from "@transferwise/components";
|
|
12262
|
-
import { Fragment as
|
|
12339
|
+
import { Fragment as Fragment10, jsx as jsx50, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
12263
12340
|
function SegmentedInputRendererComponent(props) {
|
|
12264
12341
|
const { id, children, description, error, help, label, options, selectedIndex, onSelect } = props;
|
|
12265
12342
|
useEffect5(() => {
|
|
@@ -12267,8 +12344,8 @@ function SegmentedInputRendererComponent(props) {
|
|
|
12267
12344
|
onSelect(0);
|
|
12268
12345
|
}
|
|
12269
12346
|
}, [selectedIndex, onSelect, options.length]);
|
|
12270
|
-
return /* @__PURE__ */
|
|
12271
|
-
/* @__PURE__ */
|
|
12347
|
+
return /* @__PURE__ */ jsxs19(Fragment10, { children: [
|
|
12348
|
+
/* @__PURE__ */ jsx50(FieldInput_default, { id, label, help, description, error, children: /* @__PURE__ */ jsx50(
|
|
12272
12349
|
SegmentedControl,
|
|
12273
12350
|
{
|
|
12274
12351
|
name: `${id}-segmented-control`,
|
|
@@ -12283,44 +12360,44 @@ function SegmentedInputRendererComponent(props) {
|
|
|
12283
12360
|
onChange: (value) => onSelect(Number(value))
|
|
12284
12361
|
}
|
|
12285
12362
|
) }),
|
|
12286
|
-
/* @__PURE__ */
|
|
12363
|
+
/* @__PURE__ */ jsx50("div", { id: `${id}-children`, children })
|
|
12287
12364
|
] });
|
|
12288
12365
|
}
|
|
12289
12366
|
var isValidIndex2 = (index, options) => index !== null && index >= 0 && index < options;
|
|
12290
12367
|
|
|
12291
12368
|
// src/revamp/wise/renderers/SelectInputRenderer/SelectInputRenderer.tsx
|
|
12292
|
-
import { jsx as
|
|
12369
|
+
import { jsx as jsx51 } from "react/jsx-runtime";
|
|
12293
12370
|
var SelectInputRenderer = {
|
|
12294
12371
|
canRenderType: "input-select",
|
|
12295
12372
|
render: (props) => {
|
|
12296
12373
|
switch (props.control) {
|
|
12297
12374
|
case "radio":
|
|
12298
|
-
return /* @__PURE__ */
|
|
12375
|
+
return /* @__PURE__ */ jsx51(RadioInputRendererComponent, __spreadValues({}, props));
|
|
12299
12376
|
case "tab":
|
|
12300
|
-
return props.options.length > 3 ? /* @__PURE__ */
|
|
12377
|
+
return props.options.length > 3 ? /* @__PURE__ */ jsx51(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ jsx51(TabInputRendererComponent, __spreadValues({}, props));
|
|
12301
12378
|
case "segmented":
|
|
12302
|
-
return props.options.length > 3 ? /* @__PURE__ */
|
|
12379
|
+
return props.options.length > 3 ? /* @__PURE__ */ jsx51(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ jsx51(SegmentedInputRendererComponent, __spreadValues({}, props));
|
|
12303
12380
|
case "select":
|
|
12304
12381
|
default:
|
|
12305
|
-
return /* @__PURE__ */
|
|
12382
|
+
return /* @__PURE__ */ jsx51(SelectInputRendererComponent, __spreadValues({}, props));
|
|
12306
12383
|
}
|
|
12307
12384
|
}
|
|
12308
12385
|
};
|
|
12309
12386
|
var SelectInputRenderer_default = SelectInputRenderer;
|
|
12310
12387
|
|
|
12311
12388
|
// src/revamp/wise/renderers/StatusListRenderer.tsx
|
|
12312
|
-
import { Header as
|
|
12313
|
-
import { jsx as
|
|
12389
|
+
import { Header as Header5, Summary } from "@transferwise/components";
|
|
12390
|
+
import { jsx as jsx52, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
12314
12391
|
var StatusListRenderer = {
|
|
12315
12392
|
canRenderType: "status-list",
|
|
12316
|
-
render: ({ margin, items, title }) => /* @__PURE__ */
|
|
12317
|
-
title ? /* @__PURE__ */
|
|
12318
|
-
items.map(({ description, icon, status, title: itemTitle }) => /* @__PURE__ */
|
|
12393
|
+
render: ({ margin, items, title }) => /* @__PURE__ */ jsxs20("div", { className: getMargin(margin), children: [
|
|
12394
|
+
title ? /* @__PURE__ */ jsx52(Header5, { title }) : null,
|
|
12395
|
+
items.map(({ description, icon, status, title: itemTitle }) => /* @__PURE__ */ jsx52(
|
|
12319
12396
|
Summary,
|
|
12320
12397
|
{
|
|
12321
12398
|
title: itemTitle,
|
|
12322
12399
|
description,
|
|
12323
|
-
icon: icon && "name" in icon ? /* @__PURE__ */
|
|
12400
|
+
icon: icon && "name" in icon ? /* @__PURE__ */ jsx52(DynamicIcon_default, { name: icon.name }) : null,
|
|
12324
12401
|
status: mapStatus(status)
|
|
12325
12402
|
},
|
|
12326
12403
|
`${title}/${description || ""}`
|
|
@@ -12343,31 +12420,31 @@ import {
|
|
|
12343
12420
|
TextArea as TextArea2,
|
|
12344
12421
|
TextareaWithDisplayFormat
|
|
12345
12422
|
} from "@transferwise/components";
|
|
12346
|
-
import { jsx as
|
|
12423
|
+
import { jsx as jsx53 } from "react/jsx-runtime";
|
|
12347
12424
|
function VariableTextInput({
|
|
12348
12425
|
control,
|
|
12349
12426
|
inputProps
|
|
12350
12427
|
}) {
|
|
12351
12428
|
switch (control) {
|
|
12352
12429
|
case "password":
|
|
12353
|
-
return /* @__PURE__ */
|
|
12430
|
+
return /* @__PURE__ */ jsx53(TextInput, __spreadValues({ type: "password" }, inputProps));
|
|
12354
12431
|
case "email":
|
|
12355
|
-
return /* @__PURE__ */
|
|
12432
|
+
return /* @__PURE__ */ jsx53(TextInput, __spreadValues({ type: "email" }, inputProps));
|
|
12356
12433
|
case "textarea":
|
|
12357
|
-
return /* @__PURE__ */
|
|
12434
|
+
return /* @__PURE__ */ jsx53(TextAreaInput, __spreadValues({}, inputProps));
|
|
12358
12435
|
case "numeric":
|
|
12359
|
-
return /* @__PURE__ */
|
|
12436
|
+
return /* @__PURE__ */ jsx53(NumericInput, __spreadValues({ type: "number" }, inputProps));
|
|
12360
12437
|
case "phone-number":
|
|
12361
|
-
return /* @__PURE__ */
|
|
12438
|
+
return /* @__PURE__ */ jsx53(PhoneNumberInput, __spreadValues({}, inputProps));
|
|
12362
12439
|
default:
|
|
12363
|
-
return /* @__PURE__ */
|
|
12440
|
+
return /* @__PURE__ */ jsx53(TextInput, __spreadValues({ type: "text" }, inputProps));
|
|
12364
12441
|
}
|
|
12365
12442
|
}
|
|
12366
12443
|
function TextInput(_a) {
|
|
12367
12444
|
var _b = _a, { id, displayFormat, onChange } = _b, rest = __objRest(_b, ["id", "displayFormat", "onChange"]);
|
|
12368
12445
|
if (typeof displayFormat === "string") {
|
|
12369
12446
|
const inputProps = __spreadValues({ id, name: id, className: "form-control" }, rest);
|
|
12370
|
-
return /* @__PURE__ */
|
|
12447
|
+
return /* @__PURE__ */ jsx53(
|
|
12371
12448
|
InputWithDisplayFormat,
|
|
12372
12449
|
__spreadValues({
|
|
12373
12450
|
displayPattern: displayFormat,
|
|
@@ -12375,29 +12452,29 @@ function TextInput(_a) {
|
|
|
12375
12452
|
}, inputProps)
|
|
12376
12453
|
);
|
|
12377
12454
|
}
|
|
12378
|
-
return /* @__PURE__ */
|
|
12455
|
+
return /* @__PURE__ */ jsx53(Input6, __spreadValues({ id, name: id, onChange: (e) => onChange(e.target.value) }, rest));
|
|
12379
12456
|
}
|
|
12380
12457
|
function TextAreaInput(_a) {
|
|
12381
12458
|
var _b = _a, { id, displayFormat, onChange } = _b, rest = __objRest(_b, ["id", "displayFormat", "onChange"]);
|
|
12382
12459
|
const textAreaProps = __spreadValues({ id, name: id }, rest);
|
|
12383
|
-
return typeof displayFormat === "string" ? /* @__PURE__ */
|
|
12460
|
+
return typeof displayFormat === "string" ? /* @__PURE__ */ jsx53(
|
|
12384
12461
|
TextareaWithDisplayFormat,
|
|
12385
12462
|
__spreadValues({
|
|
12386
12463
|
displayPattern: displayFormat,
|
|
12387
12464
|
onChange: (newValue) => onChange(newValue)
|
|
12388
12465
|
}, textAreaProps)
|
|
12389
|
-
) : /* @__PURE__ */
|
|
12466
|
+
) : /* @__PURE__ */ jsx53(TextArea2, __spreadValues({ onChange: (e) => onChange(e.target.value) }, textAreaProps));
|
|
12390
12467
|
}
|
|
12391
12468
|
function NumericInput(_a) {
|
|
12392
12469
|
var _b = _a, { id, displayFormat, onChange } = _b, rest = __objRest(_b, ["id", "displayFormat", "onChange"]);
|
|
12393
12470
|
const numericProps = __spreadValues({ id, name: id, onWheel }, rest);
|
|
12394
|
-
return typeof displayFormat === "string" ? /* @__PURE__ */
|
|
12471
|
+
return typeof displayFormat === "string" ? /* @__PURE__ */ jsx53(
|
|
12395
12472
|
InputWithDisplayFormat,
|
|
12396
12473
|
__spreadValues({
|
|
12397
12474
|
displayPattern: displayFormat,
|
|
12398
12475
|
onChange: (newValue) => onChange(numericValueOrNull(newValue))
|
|
12399
12476
|
}, numericProps)
|
|
12400
|
-
) : /* @__PURE__ */
|
|
12477
|
+
) : /* @__PURE__ */ jsx53(
|
|
12401
12478
|
Input6,
|
|
12402
12479
|
__spreadValues({
|
|
12403
12480
|
onChange: ({ target: { value: newValue } }) => onChange(numericValueOrNull(newValue))
|
|
@@ -12406,12 +12483,12 @@ function NumericInput(_a) {
|
|
|
12406
12483
|
}
|
|
12407
12484
|
function PhoneNumberInput(_a) {
|
|
12408
12485
|
var _b = _a, { value } = _b, rest = __objRest(_b, ["value"]);
|
|
12409
|
-
return /* @__PURE__ */
|
|
12486
|
+
return /* @__PURE__ */ jsx53(PhoneNumber, __spreadValues({ initialValue: value }, rest));
|
|
12410
12487
|
}
|
|
12411
12488
|
var VariableTextInput_default = VariableTextInput;
|
|
12412
12489
|
|
|
12413
12490
|
// src/revamp/wise/renderers/TextInputRenderer.tsx
|
|
12414
|
-
import { jsx as
|
|
12491
|
+
import { jsx as jsx54 } from "react/jsx-runtime";
|
|
12415
12492
|
var TextInputRenderer = {
|
|
12416
12493
|
canRenderType: "input-text",
|
|
12417
12494
|
render: (props) => {
|
|
@@ -12436,14 +12513,14 @@ var TextInputRenderer = {
|
|
|
12436
12513
|
]);
|
|
12437
12514
|
const value = initialValue != null ? initialValue : "";
|
|
12438
12515
|
const inputProps = __spreadProps(__spreadValues({}, rest), { value, id });
|
|
12439
|
-
return /* @__PURE__ */
|
|
12516
|
+
return /* @__PURE__ */ jsx54(FieldInput_default, { id, label, description, error, help, children: /* @__PURE__ */ jsx54(VariableTextInput_default, { control, inputProps }) });
|
|
12440
12517
|
}
|
|
12441
12518
|
};
|
|
12442
12519
|
var TextInputRenderer_default = TextInputRenderer;
|
|
12443
12520
|
|
|
12444
12521
|
// src/revamp/wise/renderers/UploadInputRenderer.tsx
|
|
12445
12522
|
import { Upload, UploadInput as UploadInput2 } from "@transferwise/components";
|
|
12446
|
-
import { jsx as
|
|
12523
|
+
import { jsx as jsx55 } from "react/jsx-runtime";
|
|
12447
12524
|
var UploadInputRenderer = {
|
|
12448
12525
|
canRenderType: "input-upload",
|
|
12449
12526
|
render: (props) => {
|
|
@@ -12459,7 +12536,7 @@ var UploadInputRenderer = {
|
|
|
12459
12536
|
};
|
|
12460
12537
|
return (
|
|
12461
12538
|
// We don't pass help here as there is no sensible place to display it
|
|
12462
|
-
/* @__PURE__ */
|
|
12539
|
+
/* @__PURE__ */ jsx55(UploadFieldInput_default, { id, label: void 0, description: void 0, error, children: /* @__PURE__ */ jsx55(
|
|
12463
12540
|
UploadInput2,
|
|
12464
12541
|
{
|
|
12465
12542
|
id,
|
|
@@ -12514,7 +12591,7 @@ var LargeUploadRenderer = {
|
|
|
12514
12591
|
throw e;
|
|
12515
12592
|
}
|
|
12516
12593
|
};
|
|
12517
|
-
return /* @__PURE__ */
|
|
12594
|
+
return /* @__PURE__ */ jsx55(FieldInput_default, { id, label, description, error, help, children: /* @__PURE__ */ jsx55(
|
|
12518
12595
|
Upload,
|
|
12519
12596
|
__spreadProps(__spreadValues({}, uploadProps), {
|
|
12520
12597
|
usAccept: getAcceptsString(accepts),
|
|
@@ -12527,67 +12604,6 @@ var LargeUploadRenderer = {
|
|
|
12527
12604
|
}
|
|
12528
12605
|
};
|
|
12529
12606
|
|
|
12530
|
-
// src/revamp/wise/renderers/ReviewRenderer.tsx
|
|
12531
|
-
import { DefinitionList, Header as Header5 } from "@transferwise/components";
|
|
12532
|
-
import { Fragment as Fragment10, jsx as jsx55, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
12533
|
-
var ReviewRenderer = {
|
|
12534
|
-
canRenderType: "review",
|
|
12535
|
-
render: ({ callToAction, control, fields, margin, title }) => {
|
|
12536
|
-
const orientation = mapControlToDefinitionListLayout(control);
|
|
12537
|
-
const action = callToAction ? {
|
|
12538
|
-
text: callToAction.title,
|
|
12539
|
-
onClick: (event) => {
|
|
12540
|
-
event.preventDefault();
|
|
12541
|
-
callToAction.onClick();
|
|
12542
|
-
}
|
|
12543
|
-
} : void 0;
|
|
12544
|
-
return /* @__PURE__ */ jsxs20("div", { className: getMargin(margin), children: [
|
|
12545
|
-
(title || callToAction) && /* @__PURE__ */ jsx55(Header5, { title: title != null ? title : "", action }),
|
|
12546
|
-
/* @__PURE__ */ jsx55("div", { className: margin, children: /* @__PURE__ */ jsx55(
|
|
12547
|
-
DefinitionList,
|
|
12548
|
-
{
|
|
12549
|
-
layout: orientation,
|
|
12550
|
-
definitions: fields.map(({ label, value, help }, index) => ({
|
|
12551
|
-
key: String(index),
|
|
12552
|
-
title: label,
|
|
12553
|
-
value: getFieldValue(value, help, orientation)
|
|
12554
|
-
}))
|
|
12555
|
-
}
|
|
12556
|
-
) })
|
|
12557
|
-
] });
|
|
12558
|
-
}
|
|
12559
|
-
};
|
|
12560
|
-
var ReviewRenderer_default = ReviewRenderer;
|
|
12561
|
-
var mapControlToDefinitionListLayout = (control) => {
|
|
12562
|
-
switch (control) {
|
|
12563
|
-
case "horizontal":
|
|
12564
|
-
case "horizontal-end-aligned":
|
|
12565
|
-
return "HORIZONTAL_RIGHT_ALIGNED";
|
|
12566
|
-
case "horizontal-start-aligned":
|
|
12567
|
-
return "HORIZONTAL_LEFT_ALIGNED";
|
|
12568
|
-
case "vertical-two-column":
|
|
12569
|
-
return "VERTICAL_TWO_COLUMN";
|
|
12570
|
-
case "vertical":
|
|
12571
|
-
case "vertical-one-column":
|
|
12572
|
-
default:
|
|
12573
|
-
return "VERTICAL_ONE_COLUMN";
|
|
12574
|
-
}
|
|
12575
|
-
};
|
|
12576
|
-
var getFieldValue = (value, help, orientation) => {
|
|
12577
|
-
if (help) {
|
|
12578
|
-
return orientation === "HORIZONTAL_RIGHT_ALIGNED" ? /* @__PURE__ */ jsxs20(Fragment10, { children: [
|
|
12579
|
-
/* @__PURE__ */ jsx55(Help_default, { help }),
|
|
12580
|
-
" ",
|
|
12581
|
-
value
|
|
12582
|
-
] }) : /* @__PURE__ */ jsxs20(Fragment10, { children: [
|
|
12583
|
-
value,
|
|
12584
|
-
" ",
|
|
12585
|
-
/* @__PURE__ */ jsx55(Help_default, { help })
|
|
12586
|
-
] });
|
|
12587
|
-
}
|
|
12588
|
-
return value;
|
|
12589
|
-
};
|
|
12590
|
-
|
|
12591
12607
|
// src/revamp/wise/renderers/step/StepRenderer.tsx
|
|
12592
12608
|
import { useMemo as useMemo4 } from "react";
|
|
12593
12609
|
|
|
@@ -19510,11 +19526,85 @@ function JsonSchemaForm(props) {
|
|
|
19510
19526
|
var JsonSchemaForm_default = JsonSchemaForm;
|
|
19511
19527
|
var noop8 = () => {
|
|
19512
19528
|
};
|
|
19529
|
+
|
|
19530
|
+
// src/revamp/wise/renderers/step/KYCCameraStepRenderer.tsx
|
|
19531
|
+
import { useEffect as useEffect27 } from "react";
|
|
19532
|
+
import { Fragment as Fragment25, jsx as jsx130 } from "react/jsx-runtime";
|
|
19533
|
+
var KYCCameraStepRenderer = {
|
|
19534
|
+
canRenderType: "step",
|
|
19535
|
+
canRender: (props) => getKYCCameraStepConfiguration(props.step) != null,
|
|
19536
|
+
render: KYCCameraStepRendererComponent
|
|
19537
|
+
};
|
|
19538
|
+
function KYCCameraStepRendererComponent(props) {
|
|
19539
|
+
const { error, trackEvent, step, onAction } = props;
|
|
19540
|
+
useEffect27(() => {
|
|
19541
|
+
if (error) {
|
|
19542
|
+
console.error("KYCCameraStepRendererComponent", error);
|
|
19543
|
+
}
|
|
19544
|
+
}, [error]);
|
|
19545
|
+
const config = getKYCCameraStepConfiguration(step);
|
|
19546
|
+
if (!config) {
|
|
19547
|
+
return /* @__PURE__ */ jsx130(Fragment25, {});
|
|
19548
|
+
}
|
|
19549
|
+
const handleCapture = async (blob) => {
|
|
19550
|
+
if (blob) {
|
|
19551
|
+
const newValue = { [propertyName]: await blobToBase642(blob) };
|
|
19552
|
+
const patchedAction = __spreadProps(__spreadValues({}, action), { skipValidation: true, data: newValue });
|
|
19553
|
+
void onAction(patchedAction);
|
|
19554
|
+
}
|
|
19555
|
+
};
|
|
19556
|
+
const { title, imageUrl, cameraConfig, action, propertyName } = config;
|
|
19557
|
+
const kycCameraConfig = cameraConfig;
|
|
19558
|
+
const { assets, instructions, direction } = kycCameraConfig;
|
|
19559
|
+
return config ? /* @__PURE__ */ jsx130(
|
|
19560
|
+
CameraCapture_default,
|
|
19561
|
+
{
|
|
19562
|
+
overlay: assets == null ? void 0 : assets.overlay,
|
|
19563
|
+
outline: assets == null ? void 0 : assets.outline,
|
|
19564
|
+
title: error != null ? error : title,
|
|
19565
|
+
imageUrl,
|
|
19566
|
+
instructions,
|
|
19567
|
+
direction,
|
|
19568
|
+
onEvent: trackEvent,
|
|
19569
|
+
onCapture: (blob) => {
|
|
19570
|
+
void handleCapture(blob);
|
|
19571
|
+
}
|
|
19572
|
+
},
|
|
19573
|
+
error
|
|
19574
|
+
) : /* @__PURE__ */ jsx130(Fragment25, {});
|
|
19575
|
+
}
|
|
19576
|
+
var getKYCCameraStepConfiguration = (step) => {
|
|
19577
|
+
var _a, _b, _c;
|
|
19578
|
+
const action = (_a = step.actions) == null ? void 0 : _a[0];
|
|
19579
|
+
if (action === void 0) {
|
|
19580
|
+
return null;
|
|
19581
|
+
}
|
|
19582
|
+
const firstSchema = filterHiddenSchemas2((_b = step.schemas) != null ? _b : [])[0];
|
|
19583
|
+
if (!firstSchema || !isObjectSchema(firstSchema)) {
|
|
19584
|
+
return null;
|
|
19585
|
+
}
|
|
19586
|
+
const propertyName = Object.keys(firstSchema.properties)[0];
|
|
19587
|
+
const childSchema = propertyName ? firstSchema.properties[propertyName] : void 0;
|
|
19588
|
+
const cameraConfig = childSchema ? getCameraConfig(childSchema) : null;
|
|
19589
|
+
const title = childSchema == null ? void 0 : childSchema.title;
|
|
19590
|
+
const imageUrl = (_c = childSchema == null ? void 0 : childSchema.image) == null ? void 0 : _c.url;
|
|
19591
|
+
return action && propertyName && cameraConfig ? { title, imageUrl, propertyName, cameraConfig, action } : null;
|
|
19592
|
+
};
|
|
19593
|
+
var getCameraConfig = (childSchema) => childSchema != null && "type" in childSchema && childSchema.type === "string" && childSchema.format === "base64url" && childSchema.source === "camera" && childSchema.cameraConfig != null ? childSchema.cameraConfig : null;
|
|
19594
|
+
var filterHiddenSchemas2 = (schemas) => schemas.filter(
|
|
19595
|
+
(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
|
|
19596
|
+
);
|
|
19597
|
+
var blobToBase642 = (blob) => new Promise((resolve, _) => {
|
|
19598
|
+
const reader = new FileReader();
|
|
19599
|
+
reader.onloadend = () => resolve(reader.result);
|
|
19600
|
+
reader.readAsDataURL(blob);
|
|
19601
|
+
});
|
|
19513
19602
|
export {
|
|
19514
19603
|
DynamicFlow_default as DynamicFlow,
|
|
19515
19604
|
DynamicFlowWise_default as DynamicFlowRevamp,
|
|
19516
19605
|
DynamicFragmentWise_default as DynamicFragmentWise,
|
|
19517
19606
|
JsonSchemaForm_default as JsonSchemaForm,
|
|
19607
|
+
KYCCameraStepRenderer,
|
|
19518
19608
|
DynamicLayout_default as Layout,
|
|
19519
19609
|
convertStepToLayout,
|
|
19520
19610
|
inlineReferences,
|