@wise/dynamic-flow-client 3.11.6 → 3.12.0-experimental-kyc-camera-fae600d
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 +447 -0
- package/build/common/cameraCapture/components/bottomBar/BottomBar.js +17 -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/overlay/Overlay.js +78 -0
- package/build/common/cameraCapture/screens/cameraErrorScreen/CameraErrorScreen.js +7 -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 +11 -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 +347 -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 +25 -0
- package/build/legacy/dynamicFlow/stories/dev-tools/Features.story.js +33 -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 +253 -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/stories/visual-tests/VisualTests.story.js +43 -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 +458 -0
- package/build/legacy/dynamicFlow/tests/DynamicFlow.InitialStep.spec.js +734 -0
- package/build/legacy/dynamicFlow/tests/DynamicFlow.LoaderConfig.spec.js +254 -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 +137 -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/main.js +856 -1068
- package/build/main.min.js +1 -1
- package/build/main.mjs +847 -1059
- 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 +41 -0
- package/build/revamp/domain/components/utils/isPartialLocalValueMatch.spec.js +119 -0
- package/build/revamp/domain/components/utils/local-value.js +11 -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 +104 -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 +133 -0
- package/build/revamp/domain/mappers/mapStepToComponent.spec.js +162 -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 +41 -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 +55 -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 +71 -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 +260 -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 +83 -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/stories/visual-tests/VisualTests.story.js +114 -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 +104 -0
- package/build/revamp/tests/Logging.spec.js +112 -0
- package/build/revamp/tests/OneOfInitialisation.spec.js +876 -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 +399 -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 +623 -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 +285 -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/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 +30 -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 +16 -0
- package/build/types/{legacy/step/cameraStep → common}/cameraCapture/components/bottomBar/BottomBar.d.ts +2 -2
- package/build/types/common/cameraCapture/components/index.d.ts +3 -0
- package/build/types/common/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.d.ts +2 -0
- package/build/types/{legacy/step/cameraStep → common}/cameraCapture/hooks/useFullScreenOrientationLock.d.ts +2 -2
- package/build/types/common/cameraCapture/index.d.ts +1 -0
- package/build/types/{legacy/step/cameraStep → common}/cameraCapture/overlay/Overlay.d.ts +1 -1
- package/build/types/{legacy/step/cameraStep → common}/cameraCapture/screens/cameraErrorScreen/CameraErrorScreen.d.ts +1 -1
- package/build/types/common/cameraCapture/screens/index.d.ts +1 -0
- package/build/types/common/cameraCapture/tracking/index.d.ts +8 -0
- package/build/types/common/errorBoundary/ErrorBoundary.d.ts +1 -1
- package/build/types/common/errorBoundary/ErrorBoundaryAlert.d.ts +1 -1
- package/build/types/common/httpClientContext/HttpClientContext.d.ts +2 -2
- package/build/types/legacy/common/contexts/dynamicFlowContexts/DynamicFlowContexts.d.ts +1 -1
- package/build/types/legacy/common/contexts/eventsContext/EventsContext.d.ts +1 -1
- package/build/types/legacy/common/contexts/featureContext/FeatureContext.d.ts +1 -1
- package/build/types/legacy/common/contexts/logContext/LogContext.d.ts +1 -1
- package/build/types/legacy/common/utils/index.d.ts +5 -5
- package/build/types/legacy/dynamic-flow-types.d.ts +2 -1
- package/build/types/legacy/dynamicFlow/BackButton.d.ts +1 -1
- package/build/types/legacy/dynamicFlow/DynamicFlow.d.ts +1 -1
- package/build/types/legacy/dynamicFlow/DynamicFlowStep.d.ts +1 -1
- package/build/types/legacy/dynamicFlow/utils/useLoader.d.ts +1 -1
- package/build/types/legacy/formControl/FormControl.d.ts +1 -1
- package/build/types/legacy/jsonSchemaForm/JsonSchemaForm.d.ts +1 -1
- package/build/types/legacy/jsonSchemaForm/allOfSchema/AllOfSchema.d.ts +1 -1
- package/build/types/legacy/jsonSchemaForm/arrayTypeSchema/ArraySchema.d.ts +1 -1
- package/build/types/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/ArrayListSchema.d.ts +1 -1
- package/build/types/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multiSelectSchema/MultiSelectSchema.d.ts +1 -1
- package/build/types/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/MultipleFileUploadSchema.d.ts +1 -1
- package/build/types/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/ItemSummary.d.ts +1 -1
- package/build/types/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/RepeatableSchema.d.ts +1 -1
- package/build/types/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/RepeatableSchemaStep.d.ts +1 -1
- package/build/types/legacy/jsonSchemaForm/basicTypeSchema/BasicTypeSchema.d.ts +1 -1
- package/build/types/legacy/jsonSchemaForm/controlFeedback/ControlFeedback.d.ts +1 -1
- package/build/types/legacy/jsonSchemaForm/genericSchema/GenericSchema.d.ts +1 -1
- package/build/types/legacy/jsonSchemaForm/help/Help.d.ts +1 -1
- package/build/types/legacy/jsonSchemaForm/objectSchema/ObjectSchema.d.ts +1 -1
- package/build/types/legacy/jsonSchemaForm/oneOfSchema/OneOfSchema.d.ts +1 -1
- package/build/types/legacy/jsonSchemaForm/persistAsyncSchema/PersistAsyncSchema.d.ts +1 -1
- package/build/types/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBasicSchema/PersistAsyncBasicSchema.d.ts +1 -1
- package/build/types/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/PersistAsyncBlobSchema.d.ts +1 -1
- package/build/types/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/UploadInputAdapter.d.ts +1 -1
- package/build/types/legacy/jsonSchemaForm/promotedOneOfSchema/PromotedOneOfSchema.d.ts +1 -1
- package/build/types/legacy/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfCheckboxControl.d.ts +1 -1
- package/build/types/legacy/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfControl.d.ts +1 -1
- package/build/types/legacy/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfRadioControl.d.ts +1 -1
- package/build/types/legacy/jsonSchemaForm/readOnlySchema/ReadOnlySchema.d.ts +1 -1
- package/build/types/legacy/jsonSchemaForm/schemaFormControl/SchemaFormControl.d.ts +1 -1
- package/build/types/legacy/jsonSchemaForm/schemaFormControl/utils/mapping-utils.d.ts +5 -5
- package/build/types/legacy/jsonSchemaForm/validationAsyncSchema/ValidationAsyncSchema.d.ts +1 -1
- package/build/types/legacy/layout/DynamicLayout.d.ts +1 -1
- package/build/types/legacy/layout/alert/DynamicAlert.d.ts +1 -1
- package/build/types/legacy/layout/box/DynamicBox.d.ts +1 -1
- package/build/types/legacy/layout/button/DynamicButton.d.ts +1 -1
- package/build/types/legacy/layout/columns/DynamicColumns.d.ts +1 -1
- package/build/types/legacy/layout/decision/DynamicDecision.d.ts +1 -1
- package/build/types/legacy/layout/divider/DynamicDivider.d.ts +1 -1
- package/build/types/legacy/layout/external/DynamicExternal.d.ts +1 -1
- package/build/types/legacy/layout/form/DynamicForm.d.ts +1 -1
- package/build/types/legacy/layout/heading/DynamicHeading.d.ts +1 -1
- package/build/types/legacy/layout/icon/DynamicIcon.d.ts +1 -1
- package/build/types/legacy/layout/icon/FlagIcon.d.ts +1 -1
- package/build/types/legacy/layout/icon/NamedIcon.d.ts +1 -1
- package/build/types/legacy/layout/image/DynamicImage.d.ts +1 -1
- package/build/types/legacy/layout/instructions/DynamicInstructions.d.ts +1 -1
- package/build/types/legacy/layout/list/DynamicStatusList.d.ts +1 -1
- package/build/types/legacy/layout/loadingIndicator/DynamicLoadingIndicator.d.ts +1 -1
- package/build/types/legacy/layout/markdown/DynamicMarkdown.d.ts +2 -2
- package/build/types/legacy/layout/modal/DynamicModal.d.ts +1 -1
- package/build/types/legacy/layout/paragraph/DynamicParagraph.d.ts +1 -1
- package/build/types/legacy/layout/review/DynamicReview.d.ts +1 -1
- package/build/types/legacy/layout/search/DynamicSearch.d.ts +1 -1
- package/build/types/legacy/layout/search/SearchInput.d.ts +1 -1
- package/build/types/legacy/layout/search/SearchResults.d.ts +2 -2
- package/build/types/legacy/layout/utils/getNavigationOptionMedia.d.ts +3 -3
- package/build/types/legacy/step/cameraStep/CameraStep.d.ts +1 -1
- package/build/types/legacy/step/externalConfirmationStep/ExternalConfirmationStep.d.ts +1 -1
- package/build/types/legacy/step/layoutStep/LayoutStep.d.ts +1 -1
- package/build/types/legacy/test-utils/DynamicFlowProviders.d.ts +1 -1
- package/build/types/legacy/test-utils/legacy-utils.d.ts +1 -1
- package/build/types/revamp/DynamicFlowCore.d.ts +1 -1
- package/build/types/revamp/DynamicFlowWise.d.ts +1 -1
- package/build/types/revamp/domain/components/AllOfComponent.d.ts +2 -2
- package/build/types/revamp/domain/components/BooleanInputComponent.d.ts +1 -1
- package/build/types/revamp/domain/components/ConstComponent.d.ts +1 -1
- package/build/types/revamp/domain/components/DateInputComponent.d.ts +1 -1
- package/build/types/revamp/domain/components/IntegerInputComponent.d.ts +1 -1
- package/build/types/revamp/domain/components/MultiSelectInputComponent.d.ts +1 -1
- package/build/types/revamp/domain/components/MultiUploadInputComponent.d.ts +1 -1
- package/build/types/revamp/domain/components/NumberInputComponent.d.ts +1 -1
- package/build/types/revamp/domain/components/ObjectComponent.d.ts +2 -2
- package/build/types/revamp/domain/components/SelectInputComponent.d.ts +1 -1
- package/build/types/revamp/domain/components/StepDomainComponent.d.ts +7 -5
- package/build/types/revamp/domain/components/TextInputComponent.d.ts +1 -1
- package/build/types/revamp/domain/components/UploadInputComponent.d.ts +1 -1
- package/build/types/revamp/domain/components/repeatableComponent/RepeatableComponent.d.ts +3 -3
- package/build/types/revamp/domain/components/utils/isPartialLocalValueMatch.d.ts +1 -1
- package/build/types/revamp/domain/features/persistAsync/getPerformPersistAsync.d.ts +1 -1
- package/build/types/revamp/domain/features/validationAsync/getPerformValidationAsync.d.ts +1 -1
- package/build/types/revamp/flow/executeRefresh.d.ts +1 -1
- package/build/types/revamp/renderers/mappers/componentToRendererProps.d.ts +3 -3
- 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/MultiSelectInputRenderer.d.ts +1 -1
- package/build/types/revamp/wise/renderers/SearchRenderer/BlockSearchRendererComponent.d.ts +2 -2
- package/build/types/revamp/wise/renderers/SearchRenderer/ErrorResult.d.ts +1 -1
- package/build/types/revamp/wise/renderers/SearchRenderer/InlineSearchRendererComponent.d.ts +1 -1
- package/build/types/revamp/wise/renderers/SelectInputRenderer/OptionMedia.d.ts +1 -1
- package/build/types/revamp/wise/renderers/SelectInputRenderer/RadioInputRendererComponent.d.ts +1 -1
- package/build/types/revamp/wise/renderers/SelectInputRenderer/SegmentedInputRendererComponent.d.ts +1 -1
- package/build/types/revamp/wise/renderers/SelectInputRenderer/SelectInputRendererComponent.d.ts +1 -1
- package/build/types/revamp/wise/renderers/SelectInputRenderer/SelectTriggerMedia.d.ts +1 -1
- package/build/types/revamp/wise/renderers/SelectInputRenderer/TabInputRendererComponent.d.ts +1 -1
- package/build/types/revamp/wise/renderers/components/FieldInput.d.ts +1 -1
- package/build/types/revamp/wise/renderers/components/Help.d.ts +1 -1
- package/build/types/revamp/wise/renderers/components/LabelContentWithHelp.d.ts +1 -1
- package/build/types/revamp/wise/renderers/components/UploadFieldInput.d.ts +1 -1
- package/build/types/revamp/wise/renderers/components/VariableDateInput.d.ts +1 -1
- package/build/types/revamp/wise/renderers/components/VariableTextInput.d.ts +1 -1
- package/build/types/revamp/wise/renderers/components/icon/DynamicIcon.d.ts +1 -1
- package/build/types/revamp/wise/renderers/components/icon/FlagIcon.d.ts +1 -1
- package/build/types/revamp/wise/renderers/components/icon/NamedIcon.d.ts +1 -1
- package/build/types/revamp/wise/renderers/components/icon/NavigationOptionMedia.d.ts +1 -1
- package/build/types/revamp/wise/renderers/step/BackButton.d.ts +1 -1
- package/build/types/revamp/wise/renderers/step/ExternalConfirmationDialog.d.ts +1 -1
- package/build/types/revamp/wise/renderers/step/KYCCameraStepRenderer.d.ts +2 -0
- package/build/types/test-utils/NeptuneProviders.d.ts +1 -1
- package/package.json +31 -30
- package/build/types/legacy/step/cameraStep/cameraCapture/CameraCapture.d.ts +0 -15
- package/build/types/legacy/step/cameraStep/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.d.ts +0 -2
- package/build/types/legacy/step/cameraStep/cameraCapture/tracking/index.d.ts +0 -8
- /package/build/{types/legacy/step/cameraStep/cameraCapture/components/index.d.ts → common/cameraCapture/components/index.js} +0 -0
- /package/build/{types/legacy/step/cameraStep/cameraCapture/index.d.ts → common/cameraCapture/index.js} +0 -0
- /package/build/{types/legacy/step/cameraStep/cameraCapture/screens/index.d.ts → common/cameraCapture/screens/index.js} +0 -0
- /package/build/types/{legacy/step/cameraStep → common}/cameraCapture/CameraCapture.messages.d.ts +0 -0
- /package/build/types/{legacy/step/cameraStep → common}/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.messages.d.ts +0 -0
- /package/build/types/{legacy/step/cameraStep → common}/cameraCapture/hooks/useVideoConstraints.d.ts +0 -0
- /package/build/types/{legacy/step/cameraStep → common}/cameraCapture/types/index.d.ts +0 -0
- /package/build/types/{legacy/step/cameraStep → common}/cameraCapture/utils/index.d.ts +0 -0
- /package/build/types/{legacy/common → common/cameraCapture}/utils/mobile-utils.d.ts +0 -0
- /package/build/types/{legacy/common → common}/utils/debounce.d.ts +0 -0
package/build/main.js
CHANGED
|
@@ -1291,16 +1291,28 @@ var isStringSchemaWithUpload = (schema) => isStringSchema(schema) && schema.form
|
|
|
1291
1291
|
var isSchemaWithPersistAsync = (schema) => "persistAsync" in schema && !isNullish(schema.persistAsync);
|
|
1292
1292
|
|
|
1293
1293
|
// src/revamp/renderers/stepComponentToProps.ts
|
|
1294
|
-
var stepComponentToProps = ({
|
|
1294
|
+
var stepComponentToProps = ({
|
|
1295
|
+
back,
|
|
1296
|
+
description,
|
|
1297
|
+
error,
|
|
1298
|
+
external,
|
|
1299
|
+
loadingState,
|
|
1300
|
+
step,
|
|
1301
|
+
title,
|
|
1302
|
+
trackEvent,
|
|
1303
|
+
onAction
|
|
1304
|
+
}, children) => ({
|
|
1295
1305
|
type: "step",
|
|
1296
1306
|
back,
|
|
1297
1307
|
description,
|
|
1298
1308
|
error,
|
|
1299
1309
|
external,
|
|
1300
1310
|
loadingState,
|
|
1311
|
+
step,
|
|
1301
1312
|
title,
|
|
1313
|
+
children,
|
|
1302
1314
|
trackEvent,
|
|
1303
|
-
|
|
1315
|
+
onAction
|
|
1304
1316
|
});
|
|
1305
1317
|
|
|
1306
1318
|
// src/revamp/renderers/mappers/alertComponentToProps.ts
|
|
@@ -2024,7 +2036,7 @@ var quotelessJson = (obj) => {
|
|
|
2024
2036
|
const json = JSON.stringify(obj, null, 2);
|
|
2025
2037
|
return json.replace(/"([^"]+)":/g, "$1:");
|
|
2026
2038
|
};
|
|
2027
|
-
var ZodError = class
|
|
2039
|
+
var ZodError = class extends Error {
|
|
2028
2040
|
constructor(issues) {
|
|
2029
2041
|
super();
|
|
2030
2042
|
this.issues = [];
|
|
@@ -2082,11 +2094,6 @@ var ZodError = class _ZodError extends Error {
|
|
|
2082
2094
|
processError(this);
|
|
2083
2095
|
return fieldErrors;
|
|
2084
2096
|
}
|
|
2085
|
-
static assert(value) {
|
|
2086
|
-
if (!(value instanceof _ZodError)) {
|
|
2087
|
-
throw new Error(`Not a ZodError: ${value}`);
|
|
2088
|
-
}
|
|
2089
|
-
}
|
|
2090
2097
|
toString() {
|
|
2091
2098
|
return this.message;
|
|
2092
2099
|
}
|
|
@@ -2228,12 +2235,6 @@ var makeIssue = (params) => {
|
|
|
2228
2235
|
const fullIssue = __spreadProps2(__spreadValues2({}, issueData), {
|
|
2229
2236
|
path: fullPath
|
|
2230
2237
|
});
|
|
2231
|
-
if (issueData.message !== void 0) {
|
|
2232
|
-
return __spreadProps2(__spreadValues2({}, issueData), {
|
|
2233
|
-
path: fullPath,
|
|
2234
|
-
message: issueData.message
|
|
2235
|
-
});
|
|
2236
|
-
}
|
|
2237
2238
|
let errorMessage = "";
|
|
2238
2239
|
const maps = errorMaps.filter((m) => !!m).slice().reverse();
|
|
2239
2240
|
for (const map of maps) {
|
|
@@ -2241,12 +2242,11 @@ var makeIssue = (params) => {
|
|
|
2241
2242
|
}
|
|
2242
2243
|
return __spreadProps2(__spreadValues2({}, issueData), {
|
|
2243
2244
|
path: fullPath,
|
|
2244
|
-
message: errorMessage
|
|
2245
|
+
message: issueData.message || errorMessage
|
|
2245
2246
|
});
|
|
2246
2247
|
};
|
|
2247
2248
|
var EMPTY_PATH = [];
|
|
2248
2249
|
function addIssueToContext(ctx, issueData) {
|
|
2249
|
-
const overrideMap = getErrorMap();
|
|
2250
2250
|
const issue = makeIssue({
|
|
2251
2251
|
issueData,
|
|
2252
2252
|
data: ctx.data,
|
|
@@ -2254,8 +2254,8 @@ function addIssueToContext(ctx, issueData) {
|
|
|
2254
2254
|
errorMaps: [
|
|
2255
2255
|
ctx.common.contextualErrorMap,
|
|
2256
2256
|
ctx.schemaErrorMap,
|
|
2257
|
-
|
|
2258
|
-
|
|
2257
|
+
getErrorMap(),
|
|
2258
|
+
errorMap
|
|
2259
2259
|
// then global default map
|
|
2260
2260
|
].filter((x) => !!x)
|
|
2261
2261
|
});
|
|
@@ -2287,11 +2287,9 @@ var ParseStatus = class _ParseStatus {
|
|
|
2287
2287
|
static async mergeObjectAsync(status, pairs) {
|
|
2288
2288
|
const syncPairs = [];
|
|
2289
2289
|
for (const pair of pairs) {
|
|
2290
|
-
const key = await pair.key;
|
|
2291
|
-
const value = await pair.value;
|
|
2292
2290
|
syncPairs.push({
|
|
2293
|
-
key,
|
|
2294
|
-
value
|
|
2291
|
+
key: await pair.key,
|
|
2292
|
+
value: await pair.value
|
|
2295
2293
|
});
|
|
2296
2294
|
}
|
|
2297
2295
|
return _ParseStatus.mergeObjectSync(status, syncPairs);
|
|
@@ -2324,29 +2322,11 @@ var isAborted = (x) => x.status === "aborted";
|
|
|
2324
2322
|
var isDirty = (x) => x.status === "dirty";
|
|
2325
2323
|
var isValid = (x) => x.status === "valid";
|
|
2326
2324
|
var isAsync = (x) => typeof Promise !== "undefined" && x instanceof Promise;
|
|
2327
|
-
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
2328
|
-
if (kind === "a" && !f)
|
|
2329
|
-
throw new TypeError("Private accessor was defined without a getter");
|
|
2330
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
2331
|
-
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
2332
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
2333
|
-
}
|
|
2334
|
-
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
2335
|
-
if (kind === "m")
|
|
2336
|
-
throw new TypeError("Private method is not writable");
|
|
2337
|
-
if (kind === "a" && !f)
|
|
2338
|
-
throw new TypeError("Private accessor was defined without a setter");
|
|
2339
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
2340
|
-
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
2341
|
-
return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
|
|
2342
|
-
}
|
|
2343
2325
|
var errorUtil;
|
|
2344
2326
|
(function(errorUtil2) {
|
|
2345
2327
|
errorUtil2.errToObj = (message) => typeof message === "string" ? { message } : message || {};
|
|
2346
2328
|
errorUtil2.toString = (message) => typeof message === "string" ? message : message === null || message === void 0 ? void 0 : message.message;
|
|
2347
2329
|
})(errorUtil || (errorUtil = {}));
|
|
2348
|
-
var _ZodEnum_cache;
|
|
2349
|
-
var _ZodNativeEnum_cache;
|
|
2350
2330
|
var ParseInputLazyPath = class {
|
|
2351
2331
|
constructor(parent, value, path, key) {
|
|
2352
2332
|
this._cachedPath = [];
|
|
@@ -2395,17 +2375,12 @@ function processCreateParams(params) {
|
|
|
2395
2375
|
if (errorMap2)
|
|
2396
2376
|
return { errorMap: errorMap2, description };
|
|
2397
2377
|
const customMap = (iss, ctx) => {
|
|
2398
|
-
var _a, _b;
|
|
2399
|
-
const { message } = params;
|
|
2400
|
-
if (iss.code === "invalid_enum_value") {
|
|
2401
|
-
return { message: message !== null && message !== void 0 ? message : ctx.defaultError };
|
|
2402
|
-
}
|
|
2403
|
-
if (typeof ctx.data === "undefined") {
|
|
2404
|
-
return { message: (_a = message !== null && message !== void 0 ? message : required_error) !== null && _a !== void 0 ? _a : ctx.defaultError };
|
|
2405
|
-
}
|
|
2406
2378
|
if (iss.code !== "invalid_type")
|
|
2407
2379
|
return { message: ctx.defaultError };
|
|
2408
|
-
|
|
2380
|
+
if (typeof ctx.data === "undefined") {
|
|
2381
|
+
return { message: required_error !== null && required_error !== void 0 ? required_error : ctx.defaultError };
|
|
2382
|
+
}
|
|
2383
|
+
return { message: invalid_type_error !== null && invalid_type_error !== void 0 ? invalid_type_error : ctx.defaultError };
|
|
2409
2384
|
};
|
|
2410
2385
|
return { errorMap: customMap, description };
|
|
2411
2386
|
}
|
|
@@ -2647,40 +2622,35 @@ var ZodType = class {
|
|
|
2647
2622
|
}
|
|
2648
2623
|
};
|
|
2649
2624
|
var cuidRegex = /^c[^\s-]{8,}$/i;
|
|
2650
|
-
var cuid2Regex = /^[
|
|
2625
|
+
var cuid2Regex = /^[a-z][a-z0-9]*$/;
|
|
2651
2626
|
var ulidRegex = /^[0-9A-HJKMNP-TV-Z]{26}$/;
|
|
2652
2627
|
var uuidRegex = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i;
|
|
2653
|
-
var
|
|
2654
|
-
var durationRegex = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/;
|
|
2655
|
-
var emailRegex = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;
|
|
2628
|
+
var emailRegex = /^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;
|
|
2656
2629
|
var _emojiRegex = `^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;
|
|
2657
2630
|
var emojiRegex;
|
|
2658
|
-
var ipv4Regex = /^(
|
|
2631
|
+
var ipv4Regex = /^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/;
|
|
2659
2632
|
var ipv6Regex = /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/;
|
|
2660
|
-
var
|
|
2661
|
-
var dateRegexSource = `((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))`;
|
|
2662
|
-
var dateRegex = new RegExp(`^${dateRegexSource}$`);
|
|
2663
|
-
function timeRegexSource(args) {
|
|
2664
|
-
let regex = `([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d`;
|
|
2633
|
+
var datetimeRegex = (args) => {
|
|
2665
2634
|
if (args.precision) {
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2635
|
+
if (args.offset) {
|
|
2636
|
+
return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${args.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`);
|
|
2637
|
+
} else {
|
|
2638
|
+
return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${args.precision}}Z$`);
|
|
2639
|
+
}
|
|
2640
|
+
} else if (args.precision === 0) {
|
|
2641
|
+
if (args.offset) {
|
|
2642
|
+
return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$`);
|
|
2643
|
+
} else {
|
|
2644
|
+
return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$`);
|
|
2645
|
+
}
|
|
2646
|
+
} else {
|
|
2647
|
+
if (args.offset) {
|
|
2648
|
+
return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$`);
|
|
2649
|
+
} else {
|
|
2650
|
+
return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$`);
|
|
2651
|
+
}
|
|
2669
2652
|
}
|
|
2670
|
-
|
|
2671
|
-
}
|
|
2672
|
-
function timeRegex(args) {
|
|
2673
|
-
return new RegExp(`^${timeRegexSource(args)}$`);
|
|
2674
|
-
}
|
|
2675
|
-
function datetimeRegex(args) {
|
|
2676
|
-
let regex = `${dateRegexSource}T${timeRegexSource(args)}`;
|
|
2677
|
-
const opts = [];
|
|
2678
|
-
opts.push(args.local ? `Z?` : `Z`);
|
|
2679
|
-
if (args.offset)
|
|
2680
|
-
opts.push(`([+-]\\d{2}:?\\d{2})`);
|
|
2681
|
-
regex = `${regex}(${opts.join("|")})`;
|
|
2682
|
-
return new RegExp(`^${regex}$`);
|
|
2683
|
-
}
|
|
2653
|
+
};
|
|
2684
2654
|
function isValidIP(ip, version) {
|
|
2685
2655
|
if ((version === "v4" || !version) && ipv4Regex.test(ip)) {
|
|
2686
2656
|
return true;
|
|
@@ -2698,11 +2668,15 @@ var ZodString = class _ZodString extends ZodType {
|
|
|
2698
2668
|
const parsedType = this._getType(input);
|
|
2699
2669
|
if (parsedType !== ZodParsedType.string) {
|
|
2700
2670
|
const ctx2 = this._getOrReturnCtx(input);
|
|
2701
|
-
addIssueToContext(
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2671
|
+
addIssueToContext(
|
|
2672
|
+
ctx2,
|
|
2673
|
+
{
|
|
2674
|
+
code: ZodIssueCode.invalid_type,
|
|
2675
|
+
expected: ZodParsedType.string,
|
|
2676
|
+
received: ctx2.parsedType
|
|
2677
|
+
}
|
|
2678
|
+
//
|
|
2679
|
+
);
|
|
2706
2680
|
return INVALID;
|
|
2707
2681
|
}
|
|
2708
2682
|
const status = new ParseStatus();
|
|
@@ -2793,16 +2767,6 @@ var ZodString = class _ZodString extends ZodType {
|
|
|
2793
2767
|
});
|
|
2794
2768
|
status.dirty();
|
|
2795
2769
|
}
|
|
2796
|
-
} else if (check.kind === "nanoid") {
|
|
2797
|
-
if (!nanoidRegex.test(input.data)) {
|
|
2798
|
-
ctx = this._getOrReturnCtx(input, ctx);
|
|
2799
|
-
addIssueToContext(ctx, {
|
|
2800
|
-
validation: "nanoid",
|
|
2801
|
-
code: ZodIssueCode.invalid_string,
|
|
2802
|
-
message: check.message
|
|
2803
|
-
});
|
|
2804
|
-
status.dirty();
|
|
2805
|
-
}
|
|
2806
2770
|
} else if (check.kind === "cuid") {
|
|
2807
2771
|
if (!cuidRegex.test(input.data)) {
|
|
2808
2772
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
@@ -2904,38 +2868,6 @@ var ZodString = class _ZodString extends ZodType {
|
|
|
2904
2868
|
});
|
|
2905
2869
|
status.dirty();
|
|
2906
2870
|
}
|
|
2907
|
-
} else if (check.kind === "date") {
|
|
2908
|
-
const regex = dateRegex;
|
|
2909
|
-
if (!regex.test(input.data)) {
|
|
2910
|
-
ctx = this._getOrReturnCtx(input, ctx);
|
|
2911
|
-
addIssueToContext(ctx, {
|
|
2912
|
-
code: ZodIssueCode.invalid_string,
|
|
2913
|
-
validation: "date",
|
|
2914
|
-
message: check.message
|
|
2915
|
-
});
|
|
2916
|
-
status.dirty();
|
|
2917
|
-
}
|
|
2918
|
-
} else if (check.kind === "time") {
|
|
2919
|
-
const regex = timeRegex(check);
|
|
2920
|
-
if (!regex.test(input.data)) {
|
|
2921
|
-
ctx = this._getOrReturnCtx(input, ctx);
|
|
2922
|
-
addIssueToContext(ctx, {
|
|
2923
|
-
code: ZodIssueCode.invalid_string,
|
|
2924
|
-
validation: "time",
|
|
2925
|
-
message: check.message
|
|
2926
|
-
});
|
|
2927
|
-
status.dirty();
|
|
2928
|
-
}
|
|
2929
|
-
} else if (check.kind === "duration") {
|
|
2930
|
-
if (!durationRegex.test(input.data)) {
|
|
2931
|
-
ctx = this._getOrReturnCtx(input, ctx);
|
|
2932
|
-
addIssueToContext(ctx, {
|
|
2933
|
-
validation: "duration",
|
|
2934
|
-
code: ZodIssueCode.invalid_string,
|
|
2935
|
-
message: check.message
|
|
2936
|
-
});
|
|
2937
|
-
status.dirty();
|
|
2938
|
-
}
|
|
2939
2871
|
} else if (check.kind === "ip") {
|
|
2940
2872
|
if (!isValidIP(input.data, check.version)) {
|
|
2941
2873
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
@@ -2946,16 +2878,6 @@ var ZodString = class _ZodString extends ZodType {
|
|
|
2946
2878
|
});
|
|
2947
2879
|
status.dirty();
|
|
2948
2880
|
}
|
|
2949
|
-
} else if (check.kind === "base64") {
|
|
2950
|
-
if (!base64Regex.test(input.data)) {
|
|
2951
|
-
ctx = this._getOrReturnCtx(input, ctx);
|
|
2952
|
-
addIssueToContext(ctx, {
|
|
2953
|
-
validation: "base64",
|
|
2954
|
-
code: ZodIssueCode.invalid_string,
|
|
2955
|
-
message: check.message
|
|
2956
|
-
});
|
|
2957
|
-
status.dirty();
|
|
2958
|
-
}
|
|
2959
2881
|
} else {
|
|
2960
2882
|
util.assertNever(check);
|
|
2961
2883
|
}
|
|
@@ -2985,9 +2907,6 @@ var ZodString = class _ZodString extends ZodType {
|
|
|
2985
2907
|
uuid(message) {
|
|
2986
2908
|
return this._addCheck(__spreadValues2({ kind: "uuid" }, errorUtil.errToObj(message)));
|
|
2987
2909
|
}
|
|
2988
|
-
nanoid(message) {
|
|
2989
|
-
return this._addCheck(__spreadValues2({ kind: "nanoid" }, errorUtil.errToObj(message)));
|
|
2990
|
-
}
|
|
2991
2910
|
cuid(message) {
|
|
2992
2911
|
return this._addCheck(__spreadValues2({ kind: "cuid" }, errorUtil.errToObj(message)));
|
|
2993
2912
|
}
|
|
@@ -2997,49 +2916,25 @@ var ZodString = class _ZodString extends ZodType {
|
|
|
2997
2916
|
ulid(message) {
|
|
2998
2917
|
return this._addCheck(__spreadValues2({ kind: "ulid" }, errorUtil.errToObj(message)));
|
|
2999
2918
|
}
|
|
3000
|
-
base64(message) {
|
|
3001
|
-
return this._addCheck(__spreadValues2({ kind: "base64" }, errorUtil.errToObj(message)));
|
|
3002
|
-
}
|
|
3003
2919
|
ip(options) {
|
|
3004
2920
|
return this._addCheck(__spreadValues2({ kind: "ip" }, errorUtil.errToObj(options)));
|
|
3005
2921
|
}
|
|
3006
2922
|
datetime(options) {
|
|
3007
|
-
var _a
|
|
2923
|
+
var _a;
|
|
3008
2924
|
if (typeof options === "string") {
|
|
3009
2925
|
return this._addCheck({
|
|
3010
2926
|
kind: "datetime",
|
|
3011
2927
|
precision: null,
|
|
3012
2928
|
offset: false,
|
|
3013
|
-
local: false,
|
|
3014
2929
|
message: options
|
|
3015
2930
|
});
|
|
3016
2931
|
}
|
|
3017
2932
|
return this._addCheck(__spreadValues2({
|
|
3018
2933
|
kind: "datetime",
|
|
3019
2934
|
precision: typeof (options === null || options === void 0 ? void 0 : options.precision) === "undefined" ? null : options === null || options === void 0 ? void 0 : options.precision,
|
|
3020
|
-
offset: (_a = options === null || options === void 0 ? void 0 : options.offset) !== null && _a !== void 0 ? _a : false
|
|
3021
|
-
local: (_b = options === null || options === void 0 ? void 0 : options.local) !== null && _b !== void 0 ? _b : false
|
|
3022
|
-
}, errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message)));
|
|
3023
|
-
}
|
|
3024
|
-
date(message) {
|
|
3025
|
-
return this._addCheck({ kind: "date", message });
|
|
3026
|
-
}
|
|
3027
|
-
time(options) {
|
|
3028
|
-
if (typeof options === "string") {
|
|
3029
|
-
return this._addCheck({
|
|
3030
|
-
kind: "time",
|
|
3031
|
-
precision: null,
|
|
3032
|
-
message: options
|
|
3033
|
-
});
|
|
3034
|
-
}
|
|
3035
|
-
return this._addCheck(__spreadValues2({
|
|
3036
|
-
kind: "time",
|
|
3037
|
-
precision: typeof (options === null || options === void 0 ? void 0 : options.precision) === "undefined" ? null : options === null || options === void 0 ? void 0 : options.precision
|
|
2935
|
+
offset: (_a = options === null || options === void 0 ? void 0 : options.offset) !== null && _a !== void 0 ? _a : false
|
|
3038
2936
|
}, errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message)));
|
|
3039
2937
|
}
|
|
3040
|
-
duration(message) {
|
|
3041
|
-
return this._addCheck(__spreadValues2({ kind: "duration" }, errorUtil.errToObj(message)));
|
|
3042
|
-
}
|
|
3043
2938
|
regex(regex, message) {
|
|
3044
2939
|
return this._addCheck(__spreadValues2({
|
|
3045
2940
|
kind: "regex",
|
|
@@ -3108,15 +3003,6 @@ var ZodString = class _ZodString extends ZodType {
|
|
|
3108
3003
|
get isDatetime() {
|
|
3109
3004
|
return !!this._def.checks.find((ch) => ch.kind === "datetime");
|
|
3110
3005
|
}
|
|
3111
|
-
get isDate() {
|
|
3112
|
-
return !!this._def.checks.find((ch) => ch.kind === "date");
|
|
3113
|
-
}
|
|
3114
|
-
get isTime() {
|
|
3115
|
-
return !!this._def.checks.find((ch) => ch.kind === "time");
|
|
3116
|
-
}
|
|
3117
|
-
get isDuration() {
|
|
3118
|
-
return !!this._def.checks.find((ch) => ch.kind === "duration");
|
|
3119
|
-
}
|
|
3120
3006
|
get isEmail() {
|
|
3121
3007
|
return !!this._def.checks.find((ch) => ch.kind === "email");
|
|
3122
3008
|
}
|
|
@@ -3129,9 +3015,6 @@ var ZodString = class _ZodString extends ZodType {
|
|
|
3129
3015
|
get isUUID() {
|
|
3130
3016
|
return !!this._def.checks.find((ch) => ch.kind === "uuid");
|
|
3131
3017
|
}
|
|
3132
|
-
get isNANOID() {
|
|
3133
|
-
return !!this._def.checks.find((ch) => ch.kind === "nanoid");
|
|
3134
|
-
}
|
|
3135
3018
|
get isCUID() {
|
|
3136
3019
|
return !!this._def.checks.find((ch) => ch.kind === "cuid");
|
|
3137
3020
|
}
|
|
@@ -3144,9 +3027,6 @@ var ZodString = class _ZodString extends ZodType {
|
|
|
3144
3027
|
get isIP() {
|
|
3145
3028
|
return !!this._def.checks.find((ch) => ch.kind === "ip");
|
|
3146
3029
|
}
|
|
3147
|
-
get isBase64() {
|
|
3148
|
-
return !!this._def.checks.find((ch) => ch.kind === "base64");
|
|
3149
|
-
}
|
|
3150
3030
|
get minLength() {
|
|
3151
3031
|
let min = null;
|
|
3152
3032
|
for (const ch of this._def.checks) {
|
|
@@ -4037,10 +3917,9 @@ var ZodObject = class _ZodObject extends ZodType {
|
|
|
4037
3917
|
const syncPairs = [];
|
|
4038
3918
|
for (const pair of pairs) {
|
|
4039
3919
|
const key = await pair.key;
|
|
4040
|
-
const value = await pair.value;
|
|
4041
3920
|
syncPairs.push({
|
|
4042
3921
|
key,
|
|
4043
|
-
value,
|
|
3922
|
+
value: await pair.value,
|
|
4044
3923
|
alwaysSet: pair.alwaysSet
|
|
4045
3924
|
});
|
|
4046
3925
|
}
|
|
@@ -4367,25 +4246,15 @@ var getDiscriminator = (type) => {
|
|
|
4367
4246
|
} else if (type instanceof ZodEnum) {
|
|
4368
4247
|
return type.options;
|
|
4369
4248
|
} else if (type instanceof ZodNativeEnum) {
|
|
4370
|
-
return
|
|
4249
|
+
return Object.keys(type.enum);
|
|
4371
4250
|
} else if (type instanceof ZodDefault) {
|
|
4372
4251
|
return getDiscriminator(type._def.innerType);
|
|
4373
4252
|
} else if (type instanceof ZodUndefined) {
|
|
4374
4253
|
return [void 0];
|
|
4375
4254
|
} else if (type instanceof ZodNull) {
|
|
4376
4255
|
return [null];
|
|
4377
|
-
} else if (type instanceof ZodOptional) {
|
|
4378
|
-
return [void 0, ...getDiscriminator(type.unwrap())];
|
|
4379
|
-
} else if (type instanceof ZodNullable) {
|
|
4380
|
-
return [null, ...getDiscriminator(type.unwrap())];
|
|
4381
|
-
} else if (type instanceof ZodBranded) {
|
|
4382
|
-
return getDiscriminator(type.unwrap());
|
|
4383
|
-
} else if (type instanceof ZodReadonly) {
|
|
4384
|
-
return getDiscriminator(type.unwrap());
|
|
4385
|
-
} else if (type instanceof ZodCatch) {
|
|
4386
|
-
return getDiscriminator(type._def.innerType);
|
|
4387
4256
|
} else {
|
|
4388
|
-
return
|
|
4257
|
+
return null;
|
|
4389
4258
|
}
|
|
4390
4259
|
};
|
|
4391
4260
|
var ZodDiscriminatedUnion = class _ZodDiscriminatedUnion extends ZodType {
|
|
@@ -4445,7 +4314,7 @@ var ZodDiscriminatedUnion = class _ZodDiscriminatedUnion extends ZodType {
|
|
|
4445
4314
|
const optionsMap = /* @__PURE__ */ new Map();
|
|
4446
4315
|
for (const type of options) {
|
|
4447
4316
|
const discriminatorValues = getDiscriminator(type.shape[discriminator]);
|
|
4448
|
-
if (!discriminatorValues
|
|
4317
|
+
if (!discriminatorValues) {
|
|
4449
4318
|
throw new Error(`A discriminator value for key \`${discriminator}\` could not be extracted from all schema options`);
|
|
4450
4319
|
}
|
|
4451
4320
|
for (const value of discriminatorValues) {
|
|
@@ -4641,8 +4510,7 @@ var ZodRecord = class _ZodRecord extends ZodType {
|
|
|
4641
4510
|
for (const key in ctx.data) {
|
|
4642
4511
|
pairs.push({
|
|
4643
4512
|
key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, key)),
|
|
4644
|
-
value: valueType._parse(new ParseInputLazyPath(ctx, ctx.data[key], ctx.path, key))
|
|
4645
|
-
alwaysSet: key in ctx.data
|
|
4513
|
+
value: valueType._parse(new ParseInputLazyPath(ctx, ctx.data[key], ctx.path, key))
|
|
4646
4514
|
});
|
|
4647
4515
|
}
|
|
4648
4516
|
if (ctx.common.async) {
|
|
@@ -4974,10 +4842,6 @@ function createZodEnum(values, params) {
|
|
|
4974
4842
|
}, processCreateParams(params)));
|
|
4975
4843
|
}
|
|
4976
4844
|
var ZodEnum = class _ZodEnum extends ZodType {
|
|
4977
|
-
constructor() {
|
|
4978
|
-
super(...arguments);
|
|
4979
|
-
_ZodEnum_cache.set(this, void 0);
|
|
4980
|
-
}
|
|
4981
4845
|
_parse(input) {
|
|
4982
4846
|
if (typeof input.data !== "string") {
|
|
4983
4847
|
const ctx = this._getOrReturnCtx(input);
|
|
@@ -4989,10 +4853,7 @@ var ZodEnum = class _ZodEnum extends ZodType {
|
|
|
4989
4853
|
});
|
|
4990
4854
|
return INVALID;
|
|
4991
4855
|
}
|
|
4992
|
-
if (
|
|
4993
|
-
__classPrivateFieldSet(this, _ZodEnum_cache, new Set(this._def.values), "f");
|
|
4994
|
-
}
|
|
4995
|
-
if (!__classPrivateFieldGet(this, _ZodEnum_cache, "f").has(input.data)) {
|
|
4856
|
+
if (this._def.values.indexOf(input.data) === -1) {
|
|
4996
4857
|
const ctx = this._getOrReturnCtx(input);
|
|
4997
4858
|
const expectedValues = this._def.values;
|
|
4998
4859
|
addIssueToContext(ctx, {
|
|
@@ -5028,20 +4889,15 @@ var ZodEnum = class _ZodEnum extends ZodType {
|
|
|
5028
4889
|
}
|
|
5029
4890
|
return enumValues;
|
|
5030
4891
|
}
|
|
5031
|
-
extract(values
|
|
5032
|
-
return _ZodEnum.create(values
|
|
4892
|
+
extract(values) {
|
|
4893
|
+
return _ZodEnum.create(values);
|
|
5033
4894
|
}
|
|
5034
|
-
exclude(values
|
|
5035
|
-
return _ZodEnum.create(this.options.filter((opt) => !values.includes(opt))
|
|
4895
|
+
exclude(values) {
|
|
4896
|
+
return _ZodEnum.create(this.options.filter((opt) => !values.includes(opt)));
|
|
5036
4897
|
}
|
|
5037
4898
|
};
|
|
5038
|
-
_ZodEnum_cache = /* @__PURE__ */ new WeakMap();
|
|
5039
4899
|
ZodEnum.create = createZodEnum;
|
|
5040
4900
|
var ZodNativeEnum = class extends ZodType {
|
|
5041
|
-
constructor() {
|
|
5042
|
-
super(...arguments);
|
|
5043
|
-
_ZodNativeEnum_cache.set(this, void 0);
|
|
5044
|
-
}
|
|
5045
4901
|
_parse(input) {
|
|
5046
4902
|
const nativeEnumValues = util.getValidEnumValues(this._def.values);
|
|
5047
4903
|
const ctx = this._getOrReturnCtx(input);
|
|
@@ -5054,10 +4910,7 @@ var ZodNativeEnum = class extends ZodType {
|
|
|
5054
4910
|
});
|
|
5055
4911
|
return INVALID;
|
|
5056
4912
|
}
|
|
5057
|
-
if (
|
|
5058
|
-
__classPrivateFieldSet(this, _ZodNativeEnum_cache, new Set(util.getValidEnumValues(this._def.values)), "f");
|
|
5059
|
-
}
|
|
5060
|
-
if (!__classPrivateFieldGet(this, _ZodNativeEnum_cache, "f").has(input.data)) {
|
|
4913
|
+
if (nativeEnumValues.indexOf(input.data) === -1) {
|
|
5061
4914
|
const expectedValues = util.objectValues(nativeEnumValues);
|
|
5062
4915
|
addIssueToContext(ctx, {
|
|
5063
4916
|
received: ctx.data,
|
|
@@ -5072,7 +4925,6 @@ var ZodNativeEnum = class extends ZodType {
|
|
|
5072
4925
|
return this._def.values;
|
|
5073
4926
|
}
|
|
5074
4927
|
};
|
|
5075
|
-
_ZodNativeEnum_cache = /* @__PURE__ */ new WeakMap();
|
|
5076
4928
|
ZodNativeEnum.create = (values, params) => {
|
|
5077
4929
|
return new ZodNativeEnum(__spreadValues2({
|
|
5078
4930
|
values,
|
|
@@ -5134,38 +4986,26 @@ var ZodEffects = class extends ZodType {
|
|
|
5134
4986
|
checkCtx.addIssue = checkCtx.addIssue.bind(checkCtx);
|
|
5135
4987
|
if (effect.type === "preprocess") {
|
|
5136
4988
|
const processed = effect.transform(ctx.data, checkCtx);
|
|
4989
|
+
if (ctx.common.issues.length) {
|
|
4990
|
+
return {
|
|
4991
|
+
status: "dirty",
|
|
4992
|
+
value: ctx.data
|
|
4993
|
+
};
|
|
4994
|
+
}
|
|
5137
4995
|
if (ctx.common.async) {
|
|
5138
|
-
return Promise.resolve(processed).then(
|
|
5139
|
-
|
|
5140
|
-
return INVALID;
|
|
5141
|
-
const result = await this._def.schema._parseAsync({
|
|
4996
|
+
return Promise.resolve(processed).then((processed2) => {
|
|
4997
|
+
return this._def.schema._parseAsync({
|
|
5142
4998
|
data: processed2,
|
|
5143
4999
|
path: ctx.path,
|
|
5144
5000
|
parent: ctx
|
|
5145
5001
|
});
|
|
5146
|
-
if (result.status === "aborted")
|
|
5147
|
-
return INVALID;
|
|
5148
|
-
if (result.status === "dirty")
|
|
5149
|
-
return DIRTY(result.value);
|
|
5150
|
-
if (status.value === "dirty")
|
|
5151
|
-
return DIRTY(result.value);
|
|
5152
|
-
return result;
|
|
5153
5002
|
});
|
|
5154
5003
|
} else {
|
|
5155
|
-
|
|
5156
|
-
return INVALID;
|
|
5157
|
-
const result = this._def.schema._parseSync({
|
|
5004
|
+
return this._def.schema._parseSync({
|
|
5158
5005
|
data: processed,
|
|
5159
5006
|
path: ctx.path,
|
|
5160
5007
|
parent: ctx
|
|
5161
5008
|
});
|
|
5162
|
-
if (result.status === "aborted")
|
|
5163
|
-
return INVALID;
|
|
5164
|
-
if (result.status === "dirty")
|
|
5165
|
-
return DIRTY(result.value);
|
|
5166
|
-
if (status.value === "dirty")
|
|
5167
|
-
return DIRTY(result.value);
|
|
5168
|
-
return result;
|
|
5169
5009
|
}
|
|
5170
5010
|
}
|
|
5171
5011
|
if (effect.type === "refinement") {
|
|
@@ -5443,16 +5283,10 @@ var ZodPipeline = class _ZodPipeline extends ZodType {
|
|
|
5443
5283
|
var ZodReadonly = class extends ZodType {
|
|
5444
5284
|
_parse(input) {
|
|
5445
5285
|
const result = this._def.innerType._parse(input);
|
|
5446
|
-
|
|
5447
|
-
|
|
5448
|
-
|
|
5449
|
-
|
|
5450
|
-
return data;
|
|
5451
|
-
};
|
|
5452
|
-
return isAsync(result) ? result.then((data) => freeze(data)) : freeze(result);
|
|
5453
|
-
}
|
|
5454
|
-
unwrap() {
|
|
5455
|
-
return this._def.innerType;
|
|
5286
|
+
if (isValid(result)) {
|
|
5287
|
+
result.value = Object.freeze(result.value);
|
|
5288
|
+
}
|
|
5289
|
+
return result;
|
|
5456
5290
|
}
|
|
5457
5291
|
};
|
|
5458
5292
|
ZodReadonly.create = (type, params) => {
|
|
@@ -5461,7 +5295,7 @@ ZodReadonly.create = (type, params) => {
|
|
|
5461
5295
|
typeName: ZodFirstPartyTypeKind.ZodReadonly
|
|
5462
5296
|
}, processCreateParams(params)));
|
|
5463
5297
|
};
|
|
5464
|
-
|
|
5298
|
+
var custom = (check, params = {}, fatal) => {
|
|
5465
5299
|
if (check)
|
|
5466
5300
|
return ZodAny.create().superRefine((data, ctx) => {
|
|
5467
5301
|
var _a, _b;
|
|
@@ -5473,7 +5307,7 @@ function custom(check, params = {}, fatal) {
|
|
|
5473
5307
|
}
|
|
5474
5308
|
});
|
|
5475
5309
|
return ZodAny.create();
|
|
5476
|
-
}
|
|
5310
|
+
};
|
|
5477
5311
|
var late = {
|
|
5478
5312
|
object: ZodObject.lazycreate
|
|
5479
5313
|
};
|
|
@@ -5591,7 +5425,6 @@ var z = /* @__PURE__ */ Object.freeze({
|
|
|
5591
5425
|
ZodParsedType,
|
|
5592
5426
|
getParsedType,
|
|
5593
5427
|
ZodType,
|
|
5594
|
-
datetimeRegex,
|
|
5595
5428
|
ZodString,
|
|
5596
5429
|
ZodNumber,
|
|
5597
5430
|
ZodBigInt,
|
|
@@ -5687,38 +5520,24 @@ var imageSchema = z.object({
|
|
|
5687
5520
|
url: z.string(),
|
|
5688
5521
|
accessibilityDescription: z.string().optional()
|
|
5689
5522
|
});
|
|
5690
|
-
var
|
|
5691
|
-
z.
|
|
5692
|
-
z.
|
|
5693
|
-
z.
|
|
5694
|
-
z.
|
|
5695
|
-
z.literal("DELETE")
|
|
5696
|
-
]);
|
|
5697
|
-
var iconNamedSchema = z.object({
|
|
5698
|
-
name: z.string()
|
|
5523
|
+
var summaryProviderSchema = z.object({
|
|
5524
|
+
providesTitle: z.boolean().optional(),
|
|
5525
|
+
providesDescription: z.boolean().optional(),
|
|
5526
|
+
providesIcon: z.boolean().optional(),
|
|
5527
|
+
providesImage: z.boolean().optional()
|
|
5699
5528
|
});
|
|
5700
|
-
var
|
|
5701
|
-
z.
|
|
5702
|
-
|
|
5703
|
-
|
|
5704
|
-
|
|
5705
|
-
|
|
5706
|
-
|
|
5707
|
-
|
|
5708
|
-
|
|
5709
|
-
|
|
5710
|
-
|
|
5711
|
-
text: z.string()
|
|
5529
|
+
var jsonElementSchema = z.lazy(
|
|
5530
|
+
() => z.union([
|
|
5531
|
+
z.string(),
|
|
5532
|
+
z.number(),
|
|
5533
|
+
z.boolean(),
|
|
5534
|
+
z.record(jsonElementSchema),
|
|
5535
|
+
z.array(jsonElementSchema)
|
|
5536
|
+
]).nullable()
|
|
5537
|
+
);
|
|
5538
|
+
var helpSchema = z.object({
|
|
5539
|
+
markdown: z.string()
|
|
5712
5540
|
});
|
|
5713
|
-
var sizeSchema = z.union([
|
|
5714
|
-
z.literal("xs"),
|
|
5715
|
-
z.literal("sm"),
|
|
5716
|
-
z.literal("md"),
|
|
5717
|
-
z.literal("lg"),
|
|
5718
|
-
z.literal("xl")
|
|
5719
|
-
]);
|
|
5720
|
-
var alignSchema = z.union([z.literal("left"), z.literal("center"), z.literal("right")]);
|
|
5721
|
-
var iconSchema = z.union([iconNamedSchema, iconTextSchema]);
|
|
5722
5541
|
var autocompleteTokenSchema = z.union([
|
|
5723
5542
|
z.literal("on"),
|
|
5724
5543
|
z.literal("name"),
|
|
@@ -5784,59 +5603,84 @@ var autocompleteTokenSchema = z.union([
|
|
|
5784
5603
|
z.literal("fax"),
|
|
5785
5604
|
z.literal("pager")
|
|
5786
5605
|
]);
|
|
5787
|
-
var
|
|
5788
|
-
|
|
5789
|
-
|
|
5790
|
-
|
|
5791
|
-
|
|
5792
|
-
|
|
5793
|
-
|
|
5794
|
-
|
|
5795
|
-
|
|
5796
|
-
|
|
5797
|
-
|
|
5798
|
-
margin: sizeSchema.optional()
|
|
5799
|
-
});
|
|
5800
|
-
var paragraphLayoutSchema = z.object({
|
|
5801
|
-
type: z.literal("paragraph"),
|
|
5802
|
-
text: z.string(),
|
|
5803
|
-
align: alignSchema.optional(),
|
|
5804
|
-
control: z.string().optional(),
|
|
5805
|
-
margin: sizeSchema.optional()
|
|
5606
|
+
var uploadSourceSchema = z.union([z.literal("camera"), z.literal("file")]);
|
|
5607
|
+
var stringSchemaFormatSchema = z.union([
|
|
5608
|
+
z.literal("date"),
|
|
5609
|
+
z.literal("email"),
|
|
5610
|
+
z.literal("numeric"),
|
|
5611
|
+
z.literal("password"),
|
|
5612
|
+
z.literal("phone-number"),
|
|
5613
|
+
z.literal("base64url")
|
|
5614
|
+
]);
|
|
5615
|
+
var externalSchema = z.object({
|
|
5616
|
+
url: z.string()
|
|
5806
5617
|
});
|
|
5807
|
-
var
|
|
5808
|
-
|
|
5809
|
-
|
|
5810
|
-
margin: sizeSchema.optional()
|
|
5618
|
+
var stepErrorSchema = z.object({
|
|
5619
|
+
error: z.string().optional(),
|
|
5620
|
+
validation: jsonElementSchema.optional()
|
|
5811
5621
|
});
|
|
5622
|
+
var httpMethodSchema = z.union([
|
|
5623
|
+
z.literal("GET"),
|
|
5624
|
+
z.literal("POST"),
|
|
5625
|
+
z.literal("PUT"),
|
|
5626
|
+
z.literal("PATCH"),
|
|
5627
|
+
z.literal("DELETE")
|
|
5628
|
+
]);
|
|
5629
|
+
var actionTypeSchema = z.union([
|
|
5630
|
+
z.literal("primary"),
|
|
5631
|
+
z.literal("secondary"),
|
|
5632
|
+
z.literal("link"),
|
|
5633
|
+
z.literal("positive"),
|
|
5634
|
+
z.literal("negative")
|
|
5635
|
+
]);
|
|
5636
|
+
var navigationStackBehaviorSchema = z.union([
|
|
5637
|
+
z.literal("default"),
|
|
5638
|
+
z.literal("remove-previous"),
|
|
5639
|
+
z.literal("remove-all"),
|
|
5640
|
+
z.literal("replace-current")
|
|
5641
|
+
]);
|
|
5642
|
+
var sizeSchema = z.union([
|
|
5643
|
+
z.literal("xs"),
|
|
5644
|
+
z.literal("sm"),
|
|
5645
|
+
z.literal("md"),
|
|
5646
|
+
z.literal("lg"),
|
|
5647
|
+
z.literal("xl")
|
|
5648
|
+
]);
|
|
5812
5649
|
var listLayoutStatusSchema = z.union([
|
|
5813
5650
|
z.literal("warning"),
|
|
5814
5651
|
z.literal("neutral"),
|
|
5815
5652
|
z.literal("positive")
|
|
5816
5653
|
]);
|
|
5654
|
+
var contextSchema = z.union([
|
|
5655
|
+
z.literal("positive"),
|
|
5656
|
+
z.literal("neutral"),
|
|
5657
|
+
z.literal("warning"),
|
|
5658
|
+
z.literal("negative"),
|
|
5659
|
+
z.literal("success"),
|
|
5660
|
+
z.literal("failure"),
|
|
5661
|
+
z.literal("info"),
|
|
5662
|
+
z.literal("primary")
|
|
5663
|
+
]);
|
|
5664
|
+
var modalLayoutTriggerSchema = z.object({
|
|
5665
|
+
title: z.string()
|
|
5666
|
+
});
|
|
5817
5667
|
var formLayoutSchemaReferenceSchema = z.object({
|
|
5818
5668
|
$ref: z.string()
|
|
5819
5669
|
});
|
|
5820
|
-
var
|
|
5821
|
-
type: z.literal("
|
|
5822
|
-
text: z.string().optional(),
|
|
5823
|
-
url: z.string(),
|
|
5824
|
-
size: sizeSchema.optional(),
|
|
5825
|
-
accessibilityDescription: z.string().optional(),
|
|
5670
|
+
var dividerLayoutSchema = z.object({
|
|
5671
|
+
type: z.literal("divider"),
|
|
5826
5672
|
control: z.string().optional(),
|
|
5827
5673
|
margin: sizeSchema.optional()
|
|
5828
5674
|
});
|
|
5829
|
-
var statusListLayoutStatusSchema = z.union([
|
|
5830
|
-
z.literal("not-done"),
|
|
5831
|
-
z.literal("pending"),
|
|
5832
|
-
z.literal("done")
|
|
5833
|
-
]);
|
|
5834
5675
|
var instructionsLayoutItemSchema = z.object({
|
|
5835
5676
|
text: z.string(),
|
|
5836
5677
|
context: contextSchema
|
|
5837
5678
|
});
|
|
5838
|
-
var
|
|
5839
|
-
|
|
5679
|
+
var alignSchema = z.union([z.literal("left"), z.literal("center"), z.literal("right")]);
|
|
5680
|
+
var reviewLayoutFieldSchema = z.object({
|
|
5681
|
+
label: z.string(),
|
|
5682
|
+
value: z.string(),
|
|
5683
|
+
help: helpSchema.optional()
|
|
5840
5684
|
});
|
|
5841
5685
|
var searchLayoutSchema = z.object({
|
|
5842
5686
|
type: z.literal("search"),
|
|
@@ -5848,17 +5692,21 @@ var searchLayoutSchema = z.object({
|
|
|
5848
5692
|
control: z.string().optional(),
|
|
5849
5693
|
margin: sizeSchema.optional()
|
|
5850
5694
|
});
|
|
5851
|
-
var
|
|
5852
|
-
type: z.literal("
|
|
5853
|
-
|
|
5695
|
+
var paragraphLayoutSchema = z.object({
|
|
5696
|
+
type: z.literal("paragraph"),
|
|
5697
|
+
text: z.string(),
|
|
5854
5698
|
align: alignSchema.optional(),
|
|
5855
5699
|
control: z.string().optional(),
|
|
5856
5700
|
margin: sizeSchema.optional()
|
|
5857
5701
|
});
|
|
5858
|
-
var
|
|
5859
|
-
|
|
5860
|
-
|
|
5861
|
-
|
|
5702
|
+
var columnsLayoutBiasSchema = z.union([
|
|
5703
|
+
z.literal("none"),
|
|
5704
|
+
z.literal("left"),
|
|
5705
|
+
z.literal("right")
|
|
5706
|
+
]);
|
|
5707
|
+
var loadingIndicatorLayoutSchema = z.object({
|
|
5708
|
+
type: z.literal("loading-indicator"),
|
|
5709
|
+
size: sizeSchema.optional(),
|
|
5862
5710
|
control: z.string().optional(),
|
|
5863
5711
|
margin: sizeSchema.optional()
|
|
5864
5712
|
});
|
|
@@ -5870,6 +5718,11 @@ var headingLayoutSchema = z.object({
|
|
|
5870
5718
|
control: z.string().optional(),
|
|
5871
5719
|
margin: sizeSchema.optional()
|
|
5872
5720
|
});
|
|
5721
|
+
var statusListLayoutStatusSchema = z.union([
|
|
5722
|
+
z.literal("not-done"),
|
|
5723
|
+
z.literal("pending"),
|
|
5724
|
+
z.literal("done")
|
|
5725
|
+
]);
|
|
5873
5726
|
var markdownLayoutSchema = z.object({
|
|
5874
5727
|
type: z.literal("markdown"),
|
|
5875
5728
|
content: z.string(),
|
|
@@ -5877,13 +5730,11 @@ var markdownLayoutSchema = z.object({
|
|
|
5877
5730
|
control: z.string().optional(),
|
|
5878
5731
|
margin: sizeSchema.optional()
|
|
5879
5732
|
});
|
|
5880
|
-
var
|
|
5881
|
-
z.
|
|
5882
|
-
|
|
5883
|
-
|
|
5884
|
-
|
|
5885
|
-
var helpSchema = z.object({
|
|
5886
|
-
markdown: z.string()
|
|
5733
|
+
var iconTextSchema = z.object({
|
|
5734
|
+
text: z.string()
|
|
5735
|
+
});
|
|
5736
|
+
var iconNamedSchema = z.object({
|
|
5737
|
+
name: z.string()
|
|
5887
5738
|
});
|
|
5888
5739
|
var searchSearchRequestSchema = z.object({
|
|
5889
5740
|
url: z.string(),
|
|
@@ -5891,154 +5742,26 @@ var searchSearchRequestSchema = z.object({
|
|
|
5891
5742
|
param: z.string(),
|
|
5892
5743
|
query: z.string()
|
|
5893
5744
|
});
|
|
5894
|
-
var
|
|
5895
|
-
|
|
5896
|
-
|
|
5897
|
-
z.number(),
|
|
5898
|
-
z.boolean(),
|
|
5899
|
-
z.record(jsonElementSchema),
|
|
5900
|
-
z.array(jsonElementSchema)
|
|
5901
|
-
]).nullable()
|
|
5902
|
-
);
|
|
5903
|
-
var externalSchema = z.object({
|
|
5904
|
-
url: z.string()
|
|
5905
|
-
});
|
|
5906
|
-
var stepErrorSchema = z.object({
|
|
5745
|
+
var errorResponseBodySchema = z.object({
|
|
5746
|
+
refreshFormUrl: z.string().optional(),
|
|
5747
|
+
analytics: z.record(z.string()).optional(),
|
|
5907
5748
|
error: z.string().optional(),
|
|
5908
|
-
validation: jsonElementSchema.optional()
|
|
5909
|
-
|
|
5910
|
-
var stringSchemaFormatSchema = z.union([
|
|
5911
|
-
z.literal("date"),
|
|
5912
|
-
z.literal("email"),
|
|
5913
|
-
z.literal("numeric"),
|
|
5914
|
-
z.literal("password"),
|
|
5915
|
-
z.literal("phone-number"),
|
|
5916
|
-
z.literal("base64url")
|
|
5917
|
-
]);
|
|
5918
|
-
var summarySummariserSchema = z.object({
|
|
5919
|
-
defaultTitle: z.string().optional(),
|
|
5920
|
-
defaultDescription: z.string().optional(),
|
|
5921
|
-
defaultIcon: iconSchema.optional(),
|
|
5922
|
-
defaultImage: imageLayoutSchema.optional(),
|
|
5923
|
-
providesTitle: z.boolean().optional(),
|
|
5924
|
-
providesDescription: z.boolean().optional(),
|
|
5925
|
-
providesIcon: z.boolean().optional(),
|
|
5926
|
-
providesImage: z.boolean().optional()
|
|
5749
|
+
validation: jsonElementSchema.optional(),
|
|
5750
|
+
refreshUrl: z.string().optional()
|
|
5927
5751
|
});
|
|
5752
|
+
var iconSchema = z.union([iconNamedSchema, iconTextSchema]);
|
|
5928
5753
|
var validateAsyncSchema = z.object({
|
|
5929
5754
|
param: z.string(),
|
|
5930
5755
|
method: httpMethodSchema,
|
|
5931
5756
|
url: z.string()
|
|
5932
5757
|
});
|
|
5933
|
-
var
|
|
5934
|
-
|
|
5935
|
-
|
|
5936
|
-
providesIcon: z.boolean().optional(),
|
|
5937
|
-
providesImage: z.boolean().optional()
|
|
5938
|
-
});
|
|
5939
|
-
var uploadSourceSchema = z.union([z.literal("camera"), z.literal("file")]);
|
|
5940
|
-
var navigationStackBehaviorSchema = z.union([
|
|
5941
|
-
z.literal("default"),
|
|
5942
|
-
z.literal("remove-previous"),
|
|
5943
|
-
z.literal("remove-all"),
|
|
5944
|
-
z.literal("replace-current")
|
|
5945
|
-
]);
|
|
5946
|
-
var actionTypeSchema = z.union([
|
|
5947
|
-
z.literal("primary"),
|
|
5948
|
-
z.literal("secondary"),
|
|
5949
|
-
z.literal("link"),
|
|
5950
|
-
z.literal("positive"),
|
|
5951
|
-
z.literal("negative")
|
|
5952
|
-
]);
|
|
5953
|
-
var summarySchema = z.union([summaryProviderSchema, summarySummariserSchema]);
|
|
5954
|
-
var actionSchema = z.object({
|
|
5955
|
-
title: z.string().optional(),
|
|
5956
|
-
type: actionTypeSchema.optional(),
|
|
5957
|
-
disabled: z.boolean().optional(),
|
|
5958
|
-
$id: z.string().optional(),
|
|
5959
|
-
$ref: z.string().optional(),
|
|
5960
|
-
id: z.string().optional(),
|
|
5961
|
-
url: z.string().optional(),
|
|
5962
|
-
method: httpMethodSchema.optional(),
|
|
5963
|
-
exit: z.boolean().optional(),
|
|
5964
|
-
result: jsonElementSchema.optional(),
|
|
5965
|
-
data: jsonElementSchema.optional(),
|
|
5966
|
-
timeout: z.number().optional(),
|
|
5967
|
-
skipValidation: z.boolean().optional()
|
|
5968
|
-
});
|
|
5969
|
-
var listLayoutItemSchema = z.object({
|
|
5970
|
-
title: z.string(),
|
|
5971
|
-
description: z.string().optional(),
|
|
5972
|
-
icon: iconSchema,
|
|
5973
|
-
status: listLayoutStatusSchema.optional()
|
|
5974
|
-
});
|
|
5975
|
-
var decisionLayoutOptionSchema = z.object({
|
|
5976
|
-
action: actionSchema,
|
|
5977
|
-
title: z.string(),
|
|
5978
|
-
description: z.string().optional(),
|
|
5979
|
-
disabled: z.boolean().optional(),
|
|
5980
|
-
icon: iconSchema.optional(),
|
|
5981
|
-
image: imageLayoutSchema.optional()
|
|
5982
|
-
});
|
|
5983
|
-
var statusListLayoutItemSchema = z.object({
|
|
5984
|
-
title: z.string(),
|
|
5985
|
-
description: z.string().optional(),
|
|
5986
|
-
icon: iconSchema,
|
|
5987
|
-
status: statusListLayoutStatusSchema.optional()
|
|
5988
|
-
});
|
|
5989
|
-
var instructionsLayoutSchema = z.object({
|
|
5990
|
-
type: z.literal("instructions"),
|
|
5991
|
-
title: z.string().optional(),
|
|
5992
|
-
items: z.array(instructionsLayoutItemSchema),
|
|
5993
|
-
control: z.string().optional(),
|
|
5994
|
-
margin: sizeSchema.optional()
|
|
5995
|
-
});
|
|
5996
|
-
var buttonLayoutSchema = z.object({
|
|
5997
|
-
type: z.literal("button"),
|
|
5998
|
-
size: sizeSchema.optional(),
|
|
5999
|
-
title: z.string().optional(),
|
|
6000
|
-
action: actionSchema,
|
|
5758
|
+
var alertLayoutSchema = z.object({
|
|
5759
|
+
type: z.literal("alert"),
|
|
5760
|
+
markdown: z.string(),
|
|
6001
5761
|
context: contextSchema.optional(),
|
|
6002
|
-
disabled: z.boolean().optional(),
|
|
6003
|
-
pinOrder: z.number().optional(),
|
|
6004
5762
|
control: z.string().optional(),
|
|
6005
5763
|
margin: sizeSchema.optional()
|
|
6006
5764
|
});
|
|
6007
|
-
var reviewLayoutFieldSchema = z.object({
|
|
6008
|
-
label: z.string(),
|
|
6009
|
-
value: z.string(),
|
|
6010
|
-
help: helpSchema.optional()
|
|
6011
|
-
});
|
|
6012
|
-
var searchResultSearchSchema = z.object({
|
|
6013
|
-
type: z.literal("search"),
|
|
6014
|
-
title: z.string(),
|
|
6015
|
-
description: z.string().optional(),
|
|
6016
|
-
icon: iconSchema.optional(),
|
|
6017
|
-
image: imageLayoutSchema.optional(),
|
|
6018
|
-
value: searchSearchRequestSchema
|
|
6019
|
-
});
|
|
6020
|
-
var searchResultActionSchema = z.object({
|
|
6021
|
-
type: z.literal("action"),
|
|
6022
|
-
title: z.string(),
|
|
6023
|
-
description: z.string().optional(),
|
|
6024
|
-
icon: iconSchema.optional(),
|
|
6025
|
-
image: imageLayoutSchema.optional(),
|
|
6026
|
-
value: actionSchema
|
|
6027
|
-
});
|
|
6028
|
-
var actionResponseBodySchema = z.object({
|
|
6029
|
-
action: actionSchema
|
|
6030
|
-
});
|
|
6031
|
-
var errorResponseBodySchema = z.object({
|
|
6032
|
-
refreshFormUrl: z.string().optional(),
|
|
6033
|
-
analytics: z.record(z.string()).optional(),
|
|
6034
|
-
error: z.string().optional(),
|
|
6035
|
-
validation: jsonElementSchema.optional(),
|
|
6036
|
-
refreshUrl: z.string().optional()
|
|
6037
|
-
});
|
|
6038
|
-
var linkHandlerSchema = z.object({
|
|
6039
|
-
regexPattern: z.string(),
|
|
6040
|
-
action: actionSchema
|
|
6041
|
-
});
|
|
6042
5765
|
var blobSchemaSchema = z.object({
|
|
6043
5766
|
type: z.literal("blob"),
|
|
6044
5767
|
promoted: z.boolean().optional(),
|
|
@@ -6077,37 +5800,97 @@ var constSchemaSchema = z.object({
|
|
|
6077
5800
|
analyticsId: z.string().optional(),
|
|
6078
5801
|
disabled: z.boolean().optional()
|
|
6079
5802
|
});
|
|
6080
|
-
var
|
|
5803
|
+
var actionSchema = z.object({
|
|
5804
|
+
title: z.string().optional(),
|
|
5805
|
+
type: actionTypeSchema.optional(),
|
|
5806
|
+
disabled: z.boolean().optional(),
|
|
5807
|
+
$id: z.string().optional(),
|
|
5808
|
+
$ref: z.string().optional(),
|
|
5809
|
+
id: z.string().optional(),
|
|
5810
|
+
url: z.string().optional(),
|
|
5811
|
+
method: httpMethodSchema.optional(),
|
|
5812
|
+
exit: z.boolean().optional(),
|
|
5813
|
+
result: jsonElementSchema.optional(),
|
|
5814
|
+
data: jsonElementSchema.optional(),
|
|
5815
|
+
timeout: z.number().optional(),
|
|
5816
|
+
skipValidation: z.boolean().optional()
|
|
5817
|
+
});
|
|
5818
|
+
var linkHandlerSchema = z.object({
|
|
5819
|
+
regexPattern: z.string(),
|
|
6081
5820
|
action: actionSchema
|
|
6082
5821
|
});
|
|
6083
5822
|
var navigationBackBehaviourSchema = z.object({
|
|
6084
5823
|
title: z.string().optional(),
|
|
6085
5824
|
action: actionSchema
|
|
6086
5825
|
});
|
|
6087
|
-
var
|
|
6088
|
-
title: z.string(),
|
|
5826
|
+
var pollingOnErrorSchema = z.object({
|
|
6089
5827
|
action: actionSchema
|
|
6090
5828
|
});
|
|
6091
|
-
var
|
|
6092
|
-
type: z.literal("
|
|
6093
|
-
|
|
5829
|
+
var imageLayoutSchema = z.object({
|
|
5830
|
+
type: z.literal("image"),
|
|
5831
|
+
text: z.string().optional(),
|
|
5832
|
+
url: z.string(),
|
|
5833
|
+
size: sizeSchema.optional(),
|
|
5834
|
+
accessibilityDescription: z.string().optional(),
|
|
5835
|
+
control: z.string().optional(),
|
|
5836
|
+
margin: sizeSchema.optional()
|
|
5837
|
+
});
|
|
5838
|
+
var decisionLayoutOptionSchema = z.object({
|
|
5839
|
+
action: actionSchema,
|
|
5840
|
+
title: z.string(),
|
|
5841
|
+
description: z.string().optional(),
|
|
5842
|
+
disabled: z.boolean().optional(),
|
|
5843
|
+
icon: iconSchema.optional(),
|
|
5844
|
+
image: imageLayoutSchema.optional()
|
|
5845
|
+
});
|
|
5846
|
+
var listLayoutItemSchema = z.object({
|
|
5847
|
+
title: z.string(),
|
|
5848
|
+
description: z.string().optional(),
|
|
5849
|
+
icon: iconSchema,
|
|
5850
|
+
status: listLayoutStatusSchema.optional()
|
|
5851
|
+
});
|
|
5852
|
+
var statusListLayoutItemSchema = z.object({
|
|
5853
|
+
title: z.string(),
|
|
5854
|
+
description: z.string().optional(),
|
|
5855
|
+
icon: iconSchema,
|
|
5856
|
+
status: statusListLayoutStatusSchema.optional()
|
|
5857
|
+
});
|
|
5858
|
+
var formLayoutSchema = z.object({
|
|
5859
|
+
type: z.literal("form"),
|
|
5860
|
+
schema: formLayoutSchemaReferenceSchema.optional(),
|
|
5861
|
+
schemaId: z.string(),
|
|
5862
|
+
control: z.string().optional(),
|
|
5863
|
+
margin: sizeSchema.optional()
|
|
5864
|
+
});
|
|
5865
|
+
var instructionsLayoutSchema = z.object({
|
|
5866
|
+
type: z.literal("instructions"),
|
|
6094
5867
|
title: z.string().optional(),
|
|
5868
|
+
items: z.array(instructionsLayoutItemSchema),
|
|
6095
5869
|
control: z.string().optional(),
|
|
6096
5870
|
margin: sizeSchema.optional()
|
|
6097
5871
|
});
|
|
6098
|
-
var
|
|
6099
|
-
type: z.literal("
|
|
6100
|
-
|
|
5872
|
+
var infoLayoutSchema = z.object({
|
|
5873
|
+
type: z.literal("info"),
|
|
5874
|
+
markdown: z.string(),
|
|
5875
|
+
align: alignSchema.optional(),
|
|
6101
5876
|
control: z.string().optional(),
|
|
6102
5877
|
margin: sizeSchema.optional()
|
|
6103
5878
|
});
|
|
6104
|
-
var
|
|
6105
|
-
type: z.literal("
|
|
6106
|
-
|
|
5879
|
+
var buttonLayoutSchema = z.object({
|
|
5880
|
+
type: z.literal("button"),
|
|
5881
|
+
size: sizeSchema.optional(),
|
|
6107
5882
|
title: z.string().optional(),
|
|
5883
|
+
action: actionSchema,
|
|
5884
|
+
context: contextSchema.optional(),
|
|
5885
|
+
disabled: z.boolean().optional(),
|
|
5886
|
+
pinOrder: z.number().optional(),
|
|
6108
5887
|
control: z.string().optional(),
|
|
6109
5888
|
margin: sizeSchema.optional()
|
|
6110
5889
|
});
|
|
5890
|
+
var reviewLayoutCallToActionSchema = z.object({
|
|
5891
|
+
title: z.string(),
|
|
5892
|
+
action: actionSchema
|
|
5893
|
+
});
|
|
6111
5894
|
var reviewLayoutSchema = z.object({
|
|
6112
5895
|
type: z.literal("review"),
|
|
6113
5896
|
orientation: z.string().optional(),
|
|
@@ -6118,7 +5901,35 @@ var reviewLayoutSchema = z.object({
|
|
|
6118
5901
|
control: z.string().optional(),
|
|
6119
5902
|
margin: sizeSchema.optional()
|
|
6120
5903
|
});
|
|
6121
|
-
var
|
|
5904
|
+
var searchResultActionSchema = z.object({
|
|
5905
|
+
type: z.literal("action"),
|
|
5906
|
+
title: z.string(),
|
|
5907
|
+
description: z.string().optional(),
|
|
5908
|
+
icon: iconSchema.optional(),
|
|
5909
|
+
image: imageLayoutSchema.optional(),
|
|
5910
|
+
value: actionSchema
|
|
5911
|
+
});
|
|
5912
|
+
var searchResultSearchSchema = z.object({
|
|
5913
|
+
type: z.literal("search"),
|
|
5914
|
+
title: z.string(),
|
|
5915
|
+
description: z.string().optional(),
|
|
5916
|
+
icon: iconSchema.optional(),
|
|
5917
|
+
image: imageLayoutSchema.optional(),
|
|
5918
|
+
value: searchSearchRequestSchema
|
|
5919
|
+
});
|
|
5920
|
+
var actionResponseBodySchema = z.object({
|
|
5921
|
+
action: actionSchema
|
|
5922
|
+
});
|
|
5923
|
+
var summarySummariserSchema = z.object({
|
|
5924
|
+
defaultTitle: z.string().optional(),
|
|
5925
|
+
defaultDescription: z.string().optional(),
|
|
5926
|
+
defaultIcon: iconSchema.optional(),
|
|
5927
|
+
defaultImage: imageLayoutSchema.optional(),
|
|
5928
|
+
providesTitle: z.boolean().optional(),
|
|
5929
|
+
providesDescription: z.boolean().optional(),
|
|
5930
|
+
providesIcon: z.boolean().optional(),
|
|
5931
|
+
providesImage: z.boolean().optional()
|
|
5932
|
+
});
|
|
6122
5933
|
var pollingSchema = z.object({
|
|
6123
5934
|
url: z.string(),
|
|
6124
5935
|
interval: z.number(),
|
|
@@ -6130,85 +5941,49 @@ var navigationSchema = z.object({
|
|
|
6130
5941
|
back: navigationBackBehaviourSchema.optional(),
|
|
6131
5942
|
stackBehavior: navigationStackBehaviorSchema.optional()
|
|
6132
5943
|
});
|
|
6133
|
-
var
|
|
6134
|
-
|
|
5944
|
+
var summarySchema = z.union([summaryProviderSchema, summarySummariserSchema]);
|
|
5945
|
+
var decisionLayoutSchema = z.object({
|
|
5946
|
+
type: z.literal("decision"),
|
|
5947
|
+
options: z.array(decisionLayoutOptionSchema),
|
|
5948
|
+
control: z.string().optional(),
|
|
5949
|
+
margin: sizeSchema.optional()
|
|
6135
5950
|
});
|
|
6136
|
-
var
|
|
6137
|
-
|
|
6138
|
-
|
|
6139
|
-
|
|
6140
|
-
|
|
6141
|
-
|
|
6142
|
-
|
|
6143
|
-
|
|
6144
|
-
|
|
6145
|
-
|
|
6146
|
-
|
|
6147
|
-
|
|
6148
|
-
|
|
6149
|
-
|
|
6150
|
-
|
|
6151
|
-
|
|
6152
|
-
|
|
6153
|
-
|
|
6154
|
-
|
|
6155
|
-
searchLayoutSchema,
|
|
6156
|
-
statusListLayoutSchema
|
|
6157
|
-
])
|
|
6158
|
-
);
|
|
6159
|
-
var boxLayoutSchema = z.lazy(
|
|
6160
|
-
() => z.object({
|
|
6161
|
-
type: z.literal("box"),
|
|
6162
|
-
components: z.array(layoutSchema),
|
|
6163
|
-
width: sizeSchema.optional(),
|
|
6164
|
-
border: z.boolean().optional(),
|
|
6165
|
-
control: z.string().optional(),
|
|
6166
|
-
margin: sizeSchema.optional()
|
|
6167
|
-
})
|
|
6168
|
-
);
|
|
6169
|
-
var columnsLayoutSchema = z.lazy(
|
|
6170
|
-
() => z.object({
|
|
6171
|
-
type: z.literal("columns"),
|
|
6172
|
-
left: z.array(layoutSchema),
|
|
6173
|
-
right: z.array(layoutSchema),
|
|
6174
|
-
bias: columnsLayoutBiasSchema.optional(),
|
|
6175
|
-
control: z.string().optional(),
|
|
6176
|
-
margin: sizeSchema.optional()
|
|
6177
|
-
})
|
|
6178
|
-
);
|
|
6179
|
-
var modalLayoutSchema = z.lazy(
|
|
6180
|
-
() => z.object({
|
|
6181
|
-
type: z.literal("modal"),
|
|
6182
|
-
control: z.string().optional(),
|
|
6183
|
-
margin: sizeSchema.optional(),
|
|
6184
|
-
trigger: modalLayoutTriggerSchema,
|
|
6185
|
-
content: modalLayoutContentSchema
|
|
6186
|
-
})
|
|
6187
|
-
);
|
|
6188
|
-
var modalLayoutContentSchema = z.lazy(
|
|
6189
|
-
() => z.object({
|
|
6190
|
-
components: z.array(layoutSchema)
|
|
6191
|
-
})
|
|
6192
|
-
);
|
|
6193
|
-
var stepSchema = z.lazy(
|
|
5951
|
+
var listLayoutSchema = z.object({
|
|
5952
|
+
type: z.literal("list"),
|
|
5953
|
+
items: z.array(listLayoutItemSchema),
|
|
5954
|
+
title: z.string().optional(),
|
|
5955
|
+
control: z.string().optional(),
|
|
5956
|
+
margin: sizeSchema.optional()
|
|
5957
|
+
});
|
|
5958
|
+
var statusListLayoutSchema = z.object({
|
|
5959
|
+
type: z.literal("status-list"),
|
|
5960
|
+
items: z.array(statusListLayoutItemSchema),
|
|
5961
|
+
title: z.string().optional(),
|
|
5962
|
+
control: z.string().optional(),
|
|
5963
|
+
margin: sizeSchema.optional()
|
|
5964
|
+
});
|
|
5965
|
+
var searchResultSchema = z.union([searchResultActionSchema, searchResultSearchSchema]);
|
|
5966
|
+
var searchResponseBodySchema = z.object({
|
|
5967
|
+
results: z.array(searchResultSchema)
|
|
5968
|
+
});
|
|
5969
|
+
var arraySchemaTupleSchema = z.lazy(
|
|
6194
5970
|
() => z.object({
|
|
6195
|
-
|
|
6196
|
-
|
|
5971
|
+
type: z.literal("array"),
|
|
5972
|
+
promoted: z.boolean().optional(),
|
|
5973
|
+
$id: z.string().optional(),
|
|
5974
|
+
items: z.array(schemaSchema),
|
|
5975
|
+
title: z.string().optional(),
|
|
6197
5976
|
description: z.string().optional(),
|
|
6198
|
-
|
|
6199
|
-
|
|
6200
|
-
|
|
6201
|
-
|
|
6202
|
-
|
|
6203
|
-
|
|
6204
|
-
|
|
6205
|
-
|
|
6206
|
-
|
|
6207
|
-
|
|
6208
|
-
analytics: z.record(z.string()).optional(),
|
|
6209
|
-
errors: stepErrorSchema.optional(),
|
|
6210
|
-
navigation: navigationSchema.optional(),
|
|
6211
|
-
refreshUrl: z.string().optional()
|
|
5977
|
+
control: z.string().optional(),
|
|
5978
|
+
hidden: z.boolean().optional(),
|
|
5979
|
+
icon: iconSchema.optional(),
|
|
5980
|
+
image: imageSchema.optional(),
|
|
5981
|
+
keywords: z.array(z.string()).optional(),
|
|
5982
|
+
summary: summaryProviderSchema.optional(),
|
|
5983
|
+
analyticsId: z.string().optional(),
|
|
5984
|
+
persistAsync: persistAsyncSchema.optional(),
|
|
5985
|
+
validationAsync: validateAsyncSchema.optional(),
|
|
5986
|
+
alert: alertLayoutSchema.optional()
|
|
6212
5987
|
})
|
|
6213
5988
|
);
|
|
6214
5989
|
var schemaSchema = z.lazy(
|
|
@@ -6225,6 +6000,94 @@ var schemaSchema = z.lazy(
|
|
|
6225
6000
|
stringSchemaSchema
|
|
6226
6001
|
])
|
|
6227
6002
|
);
|
|
6003
|
+
var persistAsyncSchema = z.lazy(
|
|
6004
|
+
() => z.object({
|
|
6005
|
+
param: z.string(),
|
|
6006
|
+
idProperty: z.string(),
|
|
6007
|
+
schema: schemaSchema,
|
|
6008
|
+
url: z.string(),
|
|
6009
|
+
method: httpMethodSchema
|
|
6010
|
+
})
|
|
6011
|
+
);
|
|
6012
|
+
var oneOfSchemaSchema = z.lazy(
|
|
6013
|
+
() => z.object({
|
|
6014
|
+
autofillProvider: z.string().optional(),
|
|
6015
|
+
promoted: z.boolean().optional(),
|
|
6016
|
+
refreshFormOnChange: z.boolean().optional(),
|
|
6017
|
+
refreshUrl: z.string().optional(),
|
|
6018
|
+
refreshFormUrl: z.string().optional(),
|
|
6019
|
+
promotion: jsonElementSchema.optional(),
|
|
6020
|
+
oneOf: z.array(schemaSchema),
|
|
6021
|
+
placeholder: z.string().optional(),
|
|
6022
|
+
$id: z.string().optional(),
|
|
6023
|
+
title: z.string().optional(),
|
|
6024
|
+
description: z.string().optional(),
|
|
6025
|
+
control: z.string().optional(),
|
|
6026
|
+
default: jsonElementSchema.optional(),
|
|
6027
|
+
hidden: z.boolean().optional(),
|
|
6028
|
+
icon: iconSchema.optional(),
|
|
6029
|
+
image: imageSchema.optional(),
|
|
6030
|
+
keywords: z.array(z.string()).optional(),
|
|
6031
|
+
summary: summaryProviderSchema.optional(),
|
|
6032
|
+
analyticsId: z.string().optional(),
|
|
6033
|
+
refreshStepOnChange: z.boolean().optional(),
|
|
6034
|
+
alert: alertLayoutSchema.optional(),
|
|
6035
|
+
help: helpSchema.optional(),
|
|
6036
|
+
autocompleteHint: z.array(autocompleteTokenSchema).optional(),
|
|
6037
|
+
autofillKey: z.string().optional(),
|
|
6038
|
+
validationMessages: z.record(z.string()).optional(),
|
|
6039
|
+
disabled: z.boolean().optional()
|
|
6040
|
+
})
|
|
6041
|
+
);
|
|
6042
|
+
var objectSchemaSchema = z.lazy(
|
|
6043
|
+
() => z.object({
|
|
6044
|
+
type: z.literal("object"),
|
|
6045
|
+
disabled: z.boolean().optional(),
|
|
6046
|
+
promoted: z.boolean().optional(),
|
|
6047
|
+
help: helpSchema.optional(),
|
|
6048
|
+
properties: z.record(schemaSchema),
|
|
6049
|
+
displayOrder: z.array(z.string()),
|
|
6050
|
+
required: z.array(z.string()).optional(),
|
|
6051
|
+
$id: z.string().optional(),
|
|
6052
|
+
title: z.string().optional(),
|
|
6053
|
+
description: z.string().optional(),
|
|
6054
|
+
control: z.string().optional(),
|
|
6055
|
+
hidden: z.boolean().optional(),
|
|
6056
|
+
icon: iconSchema.optional(),
|
|
6057
|
+
image: imageSchema.optional(),
|
|
6058
|
+
keywords: z.array(z.string()).optional(),
|
|
6059
|
+
summary: summaryProviderSchema.optional(),
|
|
6060
|
+
analyticsId: z.string().optional(),
|
|
6061
|
+
alert: alertLayoutSchema.optional()
|
|
6062
|
+
})
|
|
6063
|
+
);
|
|
6064
|
+
var arraySchemaListSchema = z.lazy(
|
|
6065
|
+
() => z.object({
|
|
6066
|
+
type: z.literal("array"),
|
|
6067
|
+
promoted: z.boolean().optional(),
|
|
6068
|
+
$id: z.string().optional(),
|
|
6069
|
+
items: schemaSchema,
|
|
6070
|
+
addItemTitle: z.string(),
|
|
6071
|
+
editItemTitle: z.string(),
|
|
6072
|
+
minItems: z.number().optional(),
|
|
6073
|
+
maxItems: z.number().optional(),
|
|
6074
|
+
placeholder: z.string().optional(),
|
|
6075
|
+
title: z.string().optional(),
|
|
6076
|
+
description: z.string().optional(),
|
|
6077
|
+
control: z.string().optional(),
|
|
6078
|
+
hidden: z.boolean().optional(),
|
|
6079
|
+
icon: iconSchema.optional(),
|
|
6080
|
+
image: imageSchema.optional(),
|
|
6081
|
+
keywords: z.array(z.string()).optional(),
|
|
6082
|
+
summary: summarySummariserSchema.optional(),
|
|
6083
|
+
analyticsId: z.string().optional(),
|
|
6084
|
+
persistAsync: persistAsyncSchema.optional(),
|
|
6085
|
+
validationAsync: validateAsyncSchema.optional(),
|
|
6086
|
+
alert: alertLayoutSchema.optional(),
|
|
6087
|
+
validationMessages: z.record(z.string()).optional(),
|
|
6088
|
+
disabled: z.boolean().optional()
|
|
6089
|
+
})
|
|
6090
|
+
);
|
|
6228
6091
|
var allOfSchemaSchema = z.lazy(
|
|
6229
6092
|
() => z.object({
|
|
6230
6093
|
disabled: z.boolean().optional(),
|
|
@@ -6340,58 +6203,6 @@ var numberSchemaSchema = z.lazy(
|
|
|
6340
6203
|
help: helpSchema.optional()
|
|
6341
6204
|
})
|
|
6342
6205
|
);
|
|
6343
|
-
var objectSchemaSchema = z.lazy(
|
|
6344
|
-
() => z.object({
|
|
6345
|
-
type: z.literal("object"),
|
|
6346
|
-
disabled: z.boolean().optional(),
|
|
6347
|
-
promoted: z.boolean().optional(),
|
|
6348
|
-
help: helpSchema.optional(),
|
|
6349
|
-
properties: z.record(schemaSchema),
|
|
6350
|
-
displayOrder: z.array(z.string()),
|
|
6351
|
-
required: z.array(z.string()).optional(),
|
|
6352
|
-
$id: z.string().optional(),
|
|
6353
|
-
title: z.string().optional(),
|
|
6354
|
-
description: z.string().optional(),
|
|
6355
|
-
control: z.string().optional(),
|
|
6356
|
-
hidden: z.boolean().optional(),
|
|
6357
|
-
icon: iconSchema.optional(),
|
|
6358
|
-
image: imageSchema.optional(),
|
|
6359
|
-
keywords: z.array(z.string()).optional(),
|
|
6360
|
-
summary: summaryProviderSchema.optional(),
|
|
6361
|
-
analyticsId: z.string().optional(),
|
|
6362
|
-
alert: alertLayoutSchema.optional()
|
|
6363
|
-
})
|
|
6364
|
-
);
|
|
6365
|
-
var oneOfSchemaSchema = z.lazy(
|
|
6366
|
-
() => z.object({
|
|
6367
|
-
autofillProvider: z.string().optional(),
|
|
6368
|
-
promoted: z.boolean().optional(),
|
|
6369
|
-
refreshFormOnChange: z.boolean().optional(),
|
|
6370
|
-
refreshUrl: z.string().optional(),
|
|
6371
|
-
refreshFormUrl: z.string().optional(),
|
|
6372
|
-
promotion: jsonElementSchema.optional(),
|
|
6373
|
-
oneOf: z.array(schemaSchema),
|
|
6374
|
-
placeholder: z.string().optional(),
|
|
6375
|
-
$id: z.string().optional(),
|
|
6376
|
-
title: z.string().optional(),
|
|
6377
|
-
description: z.string().optional(),
|
|
6378
|
-
control: z.string().optional(),
|
|
6379
|
-
default: jsonElementSchema.optional(),
|
|
6380
|
-
hidden: z.boolean().optional(),
|
|
6381
|
-
icon: iconSchema.optional(),
|
|
6382
|
-
image: imageSchema.optional(),
|
|
6383
|
-
keywords: z.array(z.string()).optional(),
|
|
6384
|
-
summary: summaryProviderSchema.optional(),
|
|
6385
|
-
analyticsId: z.string().optional(),
|
|
6386
|
-
refreshStepOnChange: z.boolean().optional(),
|
|
6387
|
-
alert: alertLayoutSchema.optional(),
|
|
6388
|
-
help: helpSchema.optional(),
|
|
6389
|
-
autocompleteHint: z.array(autocompleteTokenSchema).optional(),
|
|
6390
|
-
autofillKey: z.string().optional(),
|
|
6391
|
-
validationMessages: z.record(z.string()).optional(),
|
|
6392
|
-
disabled: z.boolean().optional()
|
|
6393
|
-
})
|
|
6394
|
-
);
|
|
6395
6206
|
var stringSchemaSchema = z.lazy(
|
|
6396
6207
|
() => z.object({
|
|
6397
6208
|
type: z.literal("string"),
|
|
@@ -6434,60 +6245,82 @@ var stringSchemaSchema = z.lazy(
|
|
|
6434
6245
|
help: helpSchema.optional()
|
|
6435
6246
|
})
|
|
6436
6247
|
);
|
|
6437
|
-
var
|
|
6248
|
+
var stepSchema = z.lazy(
|
|
6438
6249
|
() => z.object({
|
|
6439
|
-
|
|
6440
|
-
|
|
6441
|
-
|
|
6442
|
-
|
|
6443
|
-
|
|
6444
|
-
|
|
6445
|
-
minItems: z.number().optional(),
|
|
6446
|
-
maxItems: z.number().optional(),
|
|
6447
|
-
placeholder: z.string().optional(),
|
|
6448
|
-
title: z.string().optional(),
|
|
6250
|
+
key: z.string().optional(),
|
|
6251
|
+
type: z.string().optional(),
|
|
6252
|
+
actions: z.array(actionSchema).optional(),
|
|
6253
|
+
refreshFormUrl: z.string().optional(),
|
|
6254
|
+
id: z.string(),
|
|
6255
|
+
title: z.string(),
|
|
6449
6256
|
description: z.string().optional(),
|
|
6257
|
+
schemas: z.array(schemaSchema),
|
|
6258
|
+
layout: z.array(layoutSchema),
|
|
6259
|
+
model: jsonElementSchema.optional(),
|
|
6260
|
+
external: externalSchema.optional(),
|
|
6261
|
+
polling: pollingSchema.optional(),
|
|
6262
|
+
linkHandlers: z.array(linkHandlerSchema).optional(),
|
|
6263
|
+
analytics: z.record(z.string()).optional(),
|
|
6264
|
+
errors: stepErrorSchema.optional(),
|
|
6265
|
+
navigation: navigationSchema.optional(),
|
|
6266
|
+
refreshUrl: z.string().optional()
|
|
6267
|
+
})
|
|
6268
|
+
);
|
|
6269
|
+
var layoutSchema = z.lazy(
|
|
6270
|
+
() => z.union([
|
|
6271
|
+
alertLayoutSchema,
|
|
6272
|
+
boxLayoutSchema,
|
|
6273
|
+
buttonLayoutSchema,
|
|
6274
|
+
columnsLayoutSchema,
|
|
6275
|
+
decisionLayoutSchema,
|
|
6276
|
+
dividerLayoutSchema,
|
|
6277
|
+
formLayoutSchema,
|
|
6278
|
+
headingLayoutSchema,
|
|
6279
|
+
imageLayoutSchema,
|
|
6280
|
+
infoLayoutSchema,
|
|
6281
|
+
instructionsLayoutSchema,
|
|
6282
|
+
listLayoutSchema,
|
|
6283
|
+
loadingIndicatorLayoutSchema,
|
|
6284
|
+
markdownLayoutSchema,
|
|
6285
|
+
modalLayoutSchema,
|
|
6286
|
+
paragraphLayoutSchema,
|
|
6287
|
+
reviewLayoutSchema,
|
|
6288
|
+
searchLayoutSchema,
|
|
6289
|
+
statusListLayoutSchema
|
|
6290
|
+
])
|
|
6291
|
+
);
|
|
6292
|
+
var boxLayoutSchema = z.lazy(
|
|
6293
|
+
() => z.object({
|
|
6294
|
+
type: z.literal("box"),
|
|
6295
|
+
components: z.array(layoutSchema),
|
|
6296
|
+
width: sizeSchema.optional(),
|
|
6297
|
+
border: z.boolean().optional(),
|
|
6450
6298
|
control: z.string().optional(),
|
|
6451
|
-
|
|
6452
|
-
|
|
6453
|
-
|
|
6454
|
-
|
|
6455
|
-
|
|
6456
|
-
|
|
6457
|
-
|
|
6458
|
-
|
|
6459
|
-
|
|
6460
|
-
|
|
6461
|
-
disabled: z.boolean().optional()
|
|
6299
|
+
margin: sizeSchema.optional()
|
|
6300
|
+
})
|
|
6301
|
+
);
|
|
6302
|
+
var modalLayoutSchema = z.lazy(
|
|
6303
|
+
() => z.object({
|
|
6304
|
+
type: z.literal("modal"),
|
|
6305
|
+
control: z.string().optional(),
|
|
6306
|
+
margin: sizeSchema.optional(),
|
|
6307
|
+
trigger: modalLayoutTriggerSchema,
|
|
6308
|
+
content: modalLayoutContentSchema
|
|
6462
6309
|
})
|
|
6463
6310
|
);
|
|
6464
|
-
var
|
|
6311
|
+
var modalLayoutContentSchema = z.lazy(
|
|
6465
6312
|
() => z.object({
|
|
6466
|
-
|
|
6467
|
-
idProperty: z.string(),
|
|
6468
|
-
schema: schemaSchema,
|
|
6469
|
-
url: z.string(),
|
|
6470
|
-
method: httpMethodSchema
|
|
6313
|
+
components: z.array(layoutSchema)
|
|
6471
6314
|
})
|
|
6472
6315
|
);
|
|
6473
|
-
var
|
|
6316
|
+
var columnsLayoutSchema = z.lazy(
|
|
6474
6317
|
() => z.object({
|
|
6475
|
-
type: z.literal("
|
|
6476
|
-
|
|
6477
|
-
|
|
6478
|
-
|
|
6479
|
-
title: z.string().optional(),
|
|
6480
|
-
description: z.string().optional(),
|
|
6318
|
+
type: z.literal("columns"),
|
|
6319
|
+
left: z.array(layoutSchema),
|
|
6320
|
+
right: z.array(layoutSchema),
|
|
6321
|
+
bias: columnsLayoutBiasSchema.optional(),
|
|
6481
6322
|
control: z.string().optional(),
|
|
6482
|
-
|
|
6483
|
-
icon: iconSchema.optional(),
|
|
6484
|
-
image: imageSchema.optional(),
|
|
6485
|
-
keywords: z.array(z.string()).optional(),
|
|
6486
|
-
summary: summaryProviderSchema.optional(),
|
|
6487
|
-
analyticsId: z.string().optional(),
|
|
6488
|
-
persistAsync: persistAsyncSchema.optional(),
|
|
6489
|
-
validationAsync: validateAsyncSchema.optional(),
|
|
6490
|
-
alert: alertLayoutSchema.optional()
|
|
6323
|
+
margin: sizeSchema.optional()
|
|
6491
6324
|
})
|
|
6492
6325
|
);
|
|
6493
6326
|
var validateStep = (step) => validate(step, stepSchema);
|
|
@@ -6904,9 +6737,7 @@ var compareLocalValue = (valueA, valueB) => {
|
|
|
6904
6737
|
return valueA.length === valueB.length && valueA.every((value, index) => compareLocalValue(value, valueB[index]));
|
|
6905
6738
|
}
|
|
6906
6739
|
if (isObjectLocalValue(valueA) && isObjectLocalValue(valueB)) {
|
|
6907
|
-
|
|
6908
|
-
const keysB = Object.keys(valueB);
|
|
6909
|
-
return keysA.length === keysB.length && keysA.every((key) => compareLocalValue(valueA[key], valueB[key]));
|
|
6740
|
+
return Object.keys(valueA).every((key) => compareLocalValue(valueA[key], valueB[key]));
|
|
6910
6741
|
}
|
|
6911
6742
|
return valueA === valueB;
|
|
6912
6743
|
};
|
|
@@ -7676,7 +7507,12 @@ var mergeChildrenValues = (displayOrder, getComponentValue) => displayOrder.redu
|
|
|
7676
7507
|
var objectSchemaToComponent = (schemaMapperProps, mapperProps) => {
|
|
7677
7508
|
const { uid, localValue, schema, model, validationErrors } = schemaMapperProps;
|
|
7678
7509
|
const { $id, displayOrder, properties, required } = schema;
|
|
7679
|
-
|
|
7510
|
+
const propertyNames = Object.keys(properties);
|
|
7511
|
+
if (displayOrder.length !== propertyNames.length) {
|
|
7512
|
+
throw new Error(
|
|
7513
|
+
`Object schema ${$id} has ${propertyNames.length} properties but only ${displayOrder.length} are listed in displayOrder`
|
|
7514
|
+
);
|
|
7515
|
+
}
|
|
7680
7516
|
const componentMap = displayOrder.reduce((acc, propName) => {
|
|
7681
7517
|
var _a;
|
|
7682
7518
|
const propSchema = properties[propName];
|
|
@@ -7702,28 +7538,6 @@ var objectSchemaToComponent = (schemaMapperProps, mapperProps) => {
|
|
|
7702
7538
|
displayOrder
|
|
7703
7539
|
}));
|
|
7704
7540
|
};
|
|
7705
|
-
var validateDisplayOrder = ($id, displayOrder, properties, logEvent) => {
|
|
7706
|
-
if (!displayOrder) {
|
|
7707
|
-
const message = `Object schema ${$id} has no displayOrder property.`;
|
|
7708
|
-
logEvent("error", message);
|
|
7709
|
-
throw new Error(message);
|
|
7710
|
-
}
|
|
7711
|
-
const propertyNames = Object.keys(properties);
|
|
7712
|
-
displayOrder.forEach((propName) => {
|
|
7713
|
-
if (!properties[propName]) {
|
|
7714
|
-
const message = `Object schema ${$id} has no property named "${propName}", but it is listed in the displayOrder array.`;
|
|
7715
|
-
logEvent("error", message);
|
|
7716
|
-
throw new Error(message);
|
|
7717
|
-
}
|
|
7718
|
-
});
|
|
7719
|
-
propertyNames.forEach((propName) => {
|
|
7720
|
-
if (!displayOrder.includes(propName)) {
|
|
7721
|
-
const message = `Object schema ${$id} has a "${propName}" property which is missing in the displayOrder array.`;
|
|
7722
|
-
logEvent("error", message);
|
|
7723
|
-
throw new Error(message);
|
|
7724
|
-
}
|
|
7725
|
-
});
|
|
7726
|
-
};
|
|
7727
7541
|
|
|
7728
7542
|
// src/revamp/domain/components/AllOfComponent.ts
|
|
7729
7543
|
var createAllOfComponent = (allOfProps) => {
|
|
@@ -7973,20 +7787,17 @@ var isPartialLocalValueMatch = (partialValue, component) => {
|
|
|
7973
7787
|
if (isObjectLocalValue(partialValue) && isObjectLocalValue(componentValue)) {
|
|
7974
7788
|
return isPartialObjectMatch(partialValue, componentValue, component);
|
|
7975
7789
|
}
|
|
7976
|
-
return
|
|
7790
|
+
return true;
|
|
7977
7791
|
};
|
|
7978
7792
|
var isPartialObjectMatch = (partialValue, componentValue, component) => {
|
|
7979
|
-
const
|
|
7793
|
+
const resultByKey = getMatchingKeys(partialValue, componentValue).map((key) => {
|
|
7980
7794
|
const componentForKey = getComponentForLocalValueKey(key, component);
|
|
7981
|
-
|
|
7795
|
+
if (componentForKey && componentForKey.type === "const") {
|
|
7796
|
+
return isPartialLocalValueMatch(partialValue[key], componentForKey);
|
|
7797
|
+
}
|
|
7798
|
+
return null;
|
|
7982
7799
|
});
|
|
7983
|
-
|
|
7984
|
-
return false;
|
|
7985
|
-
}
|
|
7986
|
-
if (results.includes(true)) {
|
|
7987
|
-
return true;
|
|
7988
|
-
}
|
|
7989
|
-
return null;
|
|
7800
|
+
return resultByKey.includes(true) && !resultByKey.includes(false);
|
|
7990
7801
|
};
|
|
7991
7802
|
var getMatchingKeys = (a, b) => {
|
|
7992
7803
|
const allKeys = Array.from(/* @__PURE__ */ new Set([...Object.keys(a), ...Object.keys(b)]));
|
|
@@ -8101,7 +7912,7 @@ var createSelectInputComponent = (selectProps, updateComponent) => {
|
|
|
8101
7912
|
}
|
|
8102
7913
|
});
|
|
8103
7914
|
};
|
|
8104
|
-
var isTrue = (value) => value
|
|
7915
|
+
var isTrue = (value) => value;
|
|
8105
7916
|
|
|
8106
7917
|
// src/revamp/domain/mappers/schema/oneOfSchemaToComponent/oneOfSchemaToComponent.ts
|
|
8107
7918
|
var oneOfSchemaToComponent = (schemaMapperProps, mapperProps) => {
|
|
@@ -9983,7 +9794,9 @@ var mapStepToComponent = (_a) => {
|
|
|
9983
9794
|
stepPolling,
|
|
9984
9795
|
updateComponent,
|
|
9985
9796
|
title: displayStepTitle ? title : void 0,
|
|
9986
|
-
trackEvent
|
|
9797
|
+
trackEvent,
|
|
9798
|
+
step,
|
|
9799
|
+
onAction
|
|
9987
9800
|
});
|
|
9988
9801
|
return stepComponent;
|
|
9989
9802
|
};
|
|
@@ -10600,15 +10413,15 @@ var AlertRenderer = {
|
|
|
10600
10413
|
};
|
|
10601
10414
|
var AlertRenderer_default = AlertRenderer;
|
|
10602
10415
|
|
|
10603
|
-
// ../../node_modules/.pnpm/@radix-ui+react-id@1.0.1_@types+react@18.
|
|
10416
|
+
// ../../node_modules/.pnpm/@radix-ui+react-id@1.0.1_@types+react@18.0.29_react@18.2.0/node_modules/@radix-ui/react-id/dist/index.mjs
|
|
10604
10417
|
var $2AODx$react = __toESM(require("react"), 1);
|
|
10605
10418
|
|
|
10606
|
-
// ../../node_modules/.pnpm/@radix-ui+react-use-layout-effect@1.0.1_@types+react@18.
|
|
10419
|
+
// ../../node_modules/.pnpm/@radix-ui+react-use-layout-effect@1.0.1_@types+react@18.0.29_react@18.2.0/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
|
|
10607
10420
|
var import_react6 = require("react");
|
|
10608
10421
|
var $9f79659886946c16$export$e5c5a5f917a5871c = Boolean(globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) ? import_react6.useLayoutEffect : () => {
|
|
10609
10422
|
};
|
|
10610
10423
|
|
|
10611
|
-
// ../../node_modules/.pnpm/@radix-ui+react-id@1.0.1_@types+react@18.
|
|
10424
|
+
// ../../node_modules/.pnpm/@radix-ui+react-id@1.0.1_@types+react@18.0.29_react@18.2.0/node_modules/@radix-ui/react-id/dist/index.mjs
|
|
10612
10425
|
var $1746a345f3d73bb7$var$useReactId = $2AODx$react["useId".toString()] || (() => void 0);
|
|
10613
10426
|
var $1746a345f3d73bb7$var$count = 0;
|
|
10614
10427
|
function $1746a345f3d73bb7$export$f680877a34711e37(deterministicId) {
|
|
@@ -10624,7 +10437,7 @@ function $1746a345f3d73bb7$export$f680877a34711e37(deterministicId) {
|
|
|
10624
10437
|
return deterministicId || (id ? `radix-${id}` : "");
|
|
10625
10438
|
}
|
|
10626
10439
|
|
|
10627
|
-
// ../../node_modules/.pnpm/@wise+forms@0.3.4_@transferwise+components@46.
|
|
10440
|
+
// ../../node_modules/.pnpm/@wise+forms@0.3.4_@transferwise+components@46.35.0_@types+react@18.0.29_react@18.2.0/node_modules/@wise/forms/dist/index.mjs
|
|
10628
10441
|
var import_components3 = require("@transferwise/components");
|
|
10629
10442
|
var import_classnames = __toESM(require_classnames(), 1);
|
|
10630
10443
|
var import_react7 = require("react");
|
|
@@ -10918,16 +10731,7 @@ function VariableDateInput({
|
|
|
10918
10731
|
control,
|
|
10919
10732
|
inputProps
|
|
10920
10733
|
}) {
|
|
10921
|
-
const {
|
|
10922
|
-
autoComplete,
|
|
10923
|
-
minimumDate,
|
|
10924
|
-
maximumDate,
|
|
10925
|
-
placeholder,
|
|
10926
|
-
disabled,
|
|
10927
|
-
onBlur,
|
|
10928
|
-
onChange,
|
|
10929
|
-
onFocus
|
|
10930
|
-
} = inputProps;
|
|
10734
|
+
const { minimumDate, maximumDate, placeholder, disabled, onBlur, onChange, onFocus } = inputProps;
|
|
10931
10735
|
if (control === "date-lookup") {
|
|
10932
10736
|
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
10933
10737
|
import_components7.DateLookup,
|
|
@@ -10945,20 +10749,8 @@ function VariableDateInput({
|
|
|
10945
10749
|
}
|
|
10946
10750
|
);
|
|
10947
10751
|
}
|
|
10948
|
-
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
10949
|
-
import_components7.DateInput,
|
|
10950
|
-
__spreadProps(__spreadValues({}, inputProps), {
|
|
10951
|
-
dayAutoComplete: getAutocompleteString2(autoComplete, "day"),
|
|
10952
|
-
yearAutoComplete: getAutocompleteString2(autoComplete, "year")
|
|
10953
|
-
})
|
|
10954
|
-
);
|
|
10752
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_components7.DateInput, __spreadValues({}, inputProps));
|
|
10955
10753
|
}
|
|
10956
|
-
var getAutocompleteString2 = (value, suffix) => {
|
|
10957
|
-
if (value === "bday") {
|
|
10958
|
-
return `${value}-${suffix}`;
|
|
10959
|
-
}
|
|
10960
|
-
return void 0;
|
|
10961
|
-
};
|
|
10962
10754
|
var VariableDateInput_default = VariableDateInput;
|
|
10963
10755
|
|
|
10964
10756
|
// src/revamp/wise/renderers/DateInputRenderer.tsx
|
|
@@ -10995,7 +10787,7 @@ var DateInputRenderer_default = DateInputRenderer;
|
|
|
10995
10787
|
// src/revamp/wise/renderers/DecisionRenderer.tsx
|
|
10996
10788
|
var import_components9 = require("@transferwise/components");
|
|
10997
10789
|
|
|
10998
|
-
// ../../node_modules/.pnpm/@wise+art@2.7.0_react-dom@18.
|
|
10790
|
+
// ../../node_modules/.pnpm/@wise+art@2.7.0_react-dom@18.2.0_react@18.2.0/node_modules/@wise/art/dist/index.esm.js
|
|
10999
10791
|
var import_react9 = require("react");
|
|
11000
10792
|
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
11001
10793
|
var unknownFlagName = "wise";
|
|
@@ -11897,18 +11689,79 @@ function ItemSummaryOption({
|
|
|
11897
11689
|
}
|
|
11898
11690
|
var RepeatableRenderer_default = RepeatableRenderer;
|
|
11899
11691
|
|
|
11900
|
-
// src/revamp/wise/renderers/
|
|
11692
|
+
// src/revamp/wise/renderers/ReviewRenderer.tsx
|
|
11901
11693
|
var import_components26 = require("@transferwise/components");
|
|
11694
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
11695
|
+
var ReviewRenderer = {
|
|
11696
|
+
canRenderType: "review",
|
|
11697
|
+
render: ({ callToAction, control, fields, margin, title }) => {
|
|
11698
|
+
const orientation = mapControlToDefinitionListLayout(control);
|
|
11699
|
+
const action = callToAction ? {
|
|
11700
|
+
text: callToAction.title,
|
|
11701
|
+
onClick: (event) => {
|
|
11702
|
+
event.preventDefault();
|
|
11703
|
+
callToAction.onClick();
|
|
11704
|
+
}
|
|
11705
|
+
} : void 0;
|
|
11706
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: getMargin(margin), children: [
|
|
11707
|
+
(title || callToAction) && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_components26.Header, { title: title != null ? title : "", action }),
|
|
11708
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: margin, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
11709
|
+
import_components26.DefinitionList,
|
|
11710
|
+
{
|
|
11711
|
+
layout: orientation,
|
|
11712
|
+
definitions: fields.map(({ label, value, help }, index) => ({
|
|
11713
|
+
key: String(index),
|
|
11714
|
+
title: label,
|
|
11715
|
+
value: getFieldValue(value, help, orientation)
|
|
11716
|
+
}))
|
|
11717
|
+
}
|
|
11718
|
+
) })
|
|
11719
|
+
] });
|
|
11720
|
+
}
|
|
11721
|
+
};
|
|
11722
|
+
var ReviewRenderer_default = ReviewRenderer;
|
|
11723
|
+
var mapControlToDefinitionListLayout = (control) => {
|
|
11724
|
+
switch (control) {
|
|
11725
|
+
case "horizontal":
|
|
11726
|
+
case "horizontal-end-aligned":
|
|
11727
|
+
return "HORIZONTAL_RIGHT_ALIGNED";
|
|
11728
|
+
case "horizontal-start-aligned":
|
|
11729
|
+
return "HORIZONTAL_LEFT_ALIGNED";
|
|
11730
|
+
case "vertical-two-column":
|
|
11731
|
+
return "VERTICAL_TWO_COLUMN";
|
|
11732
|
+
case "vertical":
|
|
11733
|
+
case "vertical-one-column":
|
|
11734
|
+
default:
|
|
11735
|
+
return "VERTICAL_ONE_COLUMN";
|
|
11736
|
+
}
|
|
11737
|
+
};
|
|
11738
|
+
var getFieldValue = (value, help, orientation) => {
|
|
11739
|
+
if (help) {
|
|
11740
|
+
return orientation === "HORIZONTAL_RIGHT_ALIGNED" ? /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
|
|
11741
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Help_default, { help }),
|
|
11742
|
+
" ",
|
|
11743
|
+
value
|
|
11744
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
|
|
11745
|
+
value,
|
|
11746
|
+
" ",
|
|
11747
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Help_default, { help })
|
|
11748
|
+
] });
|
|
11749
|
+
}
|
|
11750
|
+
return value;
|
|
11751
|
+
};
|
|
11752
|
+
|
|
11753
|
+
// src/revamp/wise/renderers/SearchRenderer/BlockSearchRendererComponent.tsx
|
|
11754
|
+
var import_components27 = require("@transferwise/components");
|
|
11902
11755
|
|
|
11903
11756
|
// src/revamp/wise/renderers/SearchRenderer/ErrorResult.tsx
|
|
11904
11757
|
var import_react_intl15 = require("react-intl");
|
|
11905
|
-
var
|
|
11758
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
11906
11759
|
function ErrorResult({ state }) {
|
|
11907
11760
|
const intl = (0, import_react_intl15.useIntl)();
|
|
11908
|
-
return /* @__PURE__ */ (0,
|
|
11761
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("p", { className: "m-t-2", children: [
|
|
11909
11762
|
intl.formatMessage(generic_error_messages_default.genericError),
|
|
11910
11763
|
"\xA0",
|
|
11911
|
-
/* @__PURE__ */ (0,
|
|
11764
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
11912
11765
|
"a",
|
|
11913
11766
|
{
|
|
11914
11767
|
href: "/",
|
|
@@ -11924,7 +11777,7 @@ function ErrorResult({ state }) {
|
|
|
11924
11777
|
|
|
11925
11778
|
// src/revamp/wise/renderers/SearchRenderer/BlockSearchRendererComponent.tsx
|
|
11926
11779
|
var import_react15 = require("react");
|
|
11927
|
-
var
|
|
11780
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
11928
11781
|
function BlockSearchRendererComponent({
|
|
11929
11782
|
id,
|
|
11930
11783
|
isLoading,
|
|
@@ -11936,9 +11789,9 @@ function BlockSearchRendererComponent({
|
|
|
11936
11789
|
}) {
|
|
11937
11790
|
const [hasSearched, setHasSearched] = (0, import_react15.useState)(false);
|
|
11938
11791
|
const trackEvent = useTrackEvent();
|
|
11939
|
-
return /* @__PURE__ */ (0,
|
|
11940
|
-
/* @__PURE__ */ (0,
|
|
11941
|
-
|
|
11792
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: getMargin(margin), children: [
|
|
11793
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(FieldInput_default, { id, description: "", error: "", help: "", label: title, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
11794
|
+
import_components27.Input,
|
|
11942
11795
|
{
|
|
11943
11796
|
id,
|
|
11944
11797
|
name: id,
|
|
@@ -11954,7 +11807,7 @@ function BlockSearchRendererComponent({
|
|
|
11954
11807
|
}
|
|
11955
11808
|
}
|
|
11956
11809
|
) }),
|
|
11957
|
-
isLoading ? /* @__PURE__ */ (0,
|
|
11810
|
+
isLoading ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_jsx_runtime43.Fragment, { children: "Loading..." }) : /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(SearchResultContent, { state, onChange })
|
|
11958
11811
|
] });
|
|
11959
11812
|
}
|
|
11960
11813
|
function SearchResultContent({
|
|
@@ -11963,29 +11816,29 @@ function SearchResultContent({
|
|
|
11963
11816
|
}) {
|
|
11964
11817
|
switch (state.type) {
|
|
11965
11818
|
case "error":
|
|
11966
|
-
return /* @__PURE__ */ (0,
|
|
11819
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(ErrorResult, { state });
|
|
11967
11820
|
case "results":
|
|
11968
|
-
return /* @__PURE__ */ (0,
|
|
11821
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(SearchResults, { state, onChange });
|
|
11969
11822
|
case "noResults":
|
|
11970
|
-
return /* @__PURE__ */ (0,
|
|
11823
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(EmptySearchResult, { state });
|
|
11971
11824
|
case "pending":
|
|
11972
11825
|
default:
|
|
11973
11826
|
return null;
|
|
11974
11827
|
}
|
|
11975
11828
|
}
|
|
11976
11829
|
function EmptySearchResult({ state }) {
|
|
11977
|
-
return /* @__PURE__ */ (0,
|
|
11830
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_components27.Markdown, { className: "m-t-2", config: { link: { target: "_blank" } }, children: state.message });
|
|
11978
11831
|
}
|
|
11979
11832
|
function SearchResults({
|
|
11980
11833
|
state
|
|
11981
11834
|
}) {
|
|
11982
11835
|
const trackEvent = useTrackEvent();
|
|
11983
|
-
return /* @__PURE__ */ (0,
|
|
11984
|
-
|
|
11836
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_components27.NavigationOptionsList, { children: state.results.map((result) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
11837
|
+
import_components27.NavigationOption,
|
|
11985
11838
|
{
|
|
11986
11839
|
title: result.title,
|
|
11987
11840
|
content: result.description,
|
|
11988
|
-
media: /* @__PURE__ */ (0,
|
|
11841
|
+
media: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(NavigationOptionMedia, __spreadValues({}, result)),
|
|
11989
11842
|
showMediaCircle: false,
|
|
11990
11843
|
showMediaAtAllSizes: true,
|
|
11991
11844
|
onClick: () => {
|
|
@@ -12001,10 +11854,10 @@ function SearchResults({
|
|
|
12001
11854
|
var BlockSearchRendererComponent_default = BlockSearchRendererComponent;
|
|
12002
11855
|
|
|
12003
11856
|
// src/revamp/wise/renderers/SearchRenderer/InlineSearchRendererComponent.tsx
|
|
12004
|
-
var
|
|
11857
|
+
var import_components28 = require("@transferwise/components");
|
|
12005
11858
|
var import_icons2 = require("@transferwise/icons");
|
|
12006
11859
|
var import_react16 = require("react");
|
|
12007
|
-
var
|
|
11860
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
12008
11861
|
function InlineSearchRenderer({
|
|
12009
11862
|
id,
|
|
12010
11863
|
isLoading,
|
|
@@ -12015,19 +11868,19 @@ function InlineSearchRenderer({
|
|
|
12015
11868
|
}) {
|
|
12016
11869
|
const [hasSearched, setHasSearched] = (0, import_react16.useState)(false);
|
|
12017
11870
|
const trackEvent = useTrackEvent();
|
|
12018
|
-
return /* @__PURE__ */ (0,
|
|
11871
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: getMargin(margin), children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(FieldInput_default, { id, description: "", error: "", help: "", label: title, children: [
|
|
12019
11872
|
id,
|
|
12020
|
-
/* @__PURE__ */ (0,
|
|
12021
|
-
|
|
11873
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
11874
|
+
import_components28.Typeahead,
|
|
12022
11875
|
{
|
|
12023
11876
|
id: "typeahead-input-id",
|
|
12024
11877
|
name: "typeahead-input-name",
|
|
12025
11878
|
size: "md",
|
|
12026
11879
|
maxHeight: 100,
|
|
12027
|
-
footer: /* @__PURE__ */ (0,
|
|
11880
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(TypeaheadFooter, { state, isLoading }),
|
|
12028
11881
|
multiple: false,
|
|
12029
11882
|
clearable: false,
|
|
12030
|
-
addon: /* @__PURE__ */ (0,
|
|
11883
|
+
addon: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_icons2.Search, { size: 24 }),
|
|
12031
11884
|
options: state.type === "results" ? state.results.map(mapResultToTypeaheadOption) : [],
|
|
12032
11885
|
minQueryLength: 1,
|
|
12033
11886
|
onChange: (values) => {
|
|
@@ -12064,29 +11917,29 @@ function mapResultToTypeaheadOption(result) {
|
|
|
12064
11917
|
}
|
|
12065
11918
|
function TypeaheadFooter({ state, isLoading }) {
|
|
12066
11919
|
if (state.type === "noResults") {
|
|
12067
|
-
return /* @__PURE__ */ (0,
|
|
11920
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_components28.Markdown, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: state.message });
|
|
12068
11921
|
}
|
|
12069
11922
|
if (state.type === "error") {
|
|
12070
|
-
return /* @__PURE__ */ (0,
|
|
11923
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(ErrorResult, { state }) });
|
|
12071
11924
|
}
|
|
12072
11925
|
if (state.type === "pending" || isLoading) {
|
|
12073
|
-
return /* @__PURE__ */ (0,
|
|
11926
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("p", { className: "m-t-2 m-x-2", children: "Loading..." });
|
|
12074
11927
|
}
|
|
12075
11928
|
return null;
|
|
12076
11929
|
}
|
|
12077
11930
|
var InlineSearchRendererComponent_default = InlineSearchRenderer;
|
|
12078
11931
|
|
|
12079
11932
|
// src/revamp/wise/renderers/SearchRenderer/SearchRenderer.tsx
|
|
12080
|
-
var
|
|
11933
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
12081
11934
|
var SearchRenderer = {
|
|
12082
11935
|
canRenderType: "search",
|
|
12083
|
-
render: (props) => props.control === "inline" ? /* @__PURE__ */ (0,
|
|
11936
|
+
render: (props) => props.control === "inline" ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(InlineSearchRendererComponent_default, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(BlockSearchRendererComponent_default, __spreadValues({}, props))
|
|
12084
11937
|
};
|
|
12085
11938
|
var SearchRenderer_default = SearchRenderer;
|
|
12086
11939
|
|
|
12087
11940
|
// src/revamp/wise/renderers/SelectInputRenderer/RadioInputRendererComponent.tsx
|
|
12088
|
-
var
|
|
12089
|
-
var
|
|
11941
|
+
var import_components29 = require("@transferwise/components");
|
|
11942
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
12090
11943
|
function RadioInputRendererComponent(props) {
|
|
12091
11944
|
const {
|
|
12092
11945
|
id,
|
|
@@ -12100,9 +11953,9 @@ function RadioInputRendererComponent(props) {
|
|
|
12100
11953
|
selectedIndex,
|
|
12101
11954
|
onSelect
|
|
12102
11955
|
} = props;
|
|
12103
|
-
return /* @__PURE__ */ (0,
|
|
12104
|
-
/* @__PURE__ */ (0,
|
|
12105
|
-
|
|
11956
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
|
|
11957
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(FieldInput_default, { id, label, help, description, error, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
11958
|
+
import_components29.RadioGroup,
|
|
12106
11959
|
{
|
|
12107
11960
|
name: id,
|
|
12108
11961
|
radios: options.map((option, index) => ({
|
|
@@ -12110,7 +11963,7 @@ function RadioInputRendererComponent(props) {
|
|
|
12110
11963
|
value: index,
|
|
12111
11964
|
secondary: option.description,
|
|
12112
11965
|
disabled: option.disabled || disabled,
|
|
12113
|
-
avatar: /* @__PURE__ */ (0,
|
|
11966
|
+
avatar: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(OptionMedia, { icon: option.icon, image: option.image })
|
|
12114
11967
|
})),
|
|
12115
11968
|
selectedValue: selectedIndex != null ? selectedIndex : void 0,
|
|
12116
11969
|
onChange: onSelect
|
|
@@ -12122,9 +11975,9 @@ function RadioInputRendererComponent(props) {
|
|
|
12122
11975
|
}
|
|
12123
11976
|
|
|
12124
11977
|
// src/revamp/wise/renderers/SelectInputRenderer/TabInputRendererComponent.tsx
|
|
12125
|
-
var
|
|
11978
|
+
var import_components30 = require("@transferwise/components");
|
|
12126
11979
|
var import_react17 = require("react");
|
|
12127
|
-
var
|
|
11980
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
12128
11981
|
function TabInputRendererComponent(props) {
|
|
12129
11982
|
const {
|
|
12130
11983
|
id,
|
|
@@ -12143,9 +11996,9 @@ function TabInputRendererComponent(props) {
|
|
|
12143
11996
|
onSelect(0);
|
|
12144
11997
|
}
|
|
12145
11998
|
}, [selectedIndex, onSelect, options.length]);
|
|
12146
|
-
return /* @__PURE__ */ (0,
|
|
12147
|
-
/* @__PURE__ */ (0,
|
|
12148
|
-
|
|
11999
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_jsx_runtime47.Fragment, { children: [
|
|
12000
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(FieldInput_default, { id, label, help, description, error, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
12001
|
+
import_components30.Tabs,
|
|
12149
12002
|
{
|
|
12150
12003
|
name: id,
|
|
12151
12004
|
selected: selectedIndex != null ? selectedIndex : 0,
|
|
@@ -12153,7 +12006,7 @@ function TabInputRendererComponent(props) {
|
|
|
12153
12006
|
title: option.title,
|
|
12154
12007
|
// if we pass null, we get some props-types console errors
|
|
12155
12008
|
// eslint-disable-next-line react/jsx-no-useless-fragment
|
|
12156
|
-
content: /* @__PURE__ */ (0,
|
|
12009
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_jsx_runtime47.Fragment, {}),
|
|
12157
12010
|
disabled: option.disabled || disabled
|
|
12158
12011
|
})),
|
|
12159
12012
|
onTabSelect: onSelect
|
|
@@ -12165,26 +12018,26 @@ function TabInputRendererComponent(props) {
|
|
|
12165
12018
|
var isValidIndex = (index, options) => index !== null && index >= 0 && index < options;
|
|
12166
12019
|
|
|
12167
12020
|
// src/revamp/wise/renderers/SelectInputRenderer/SelectInputRendererComponent.tsx
|
|
12168
|
-
var
|
|
12021
|
+
var import_components32 = require("@transferwise/components");
|
|
12169
12022
|
|
|
12170
12023
|
// src/revamp/wise/renderers/SelectInputRenderer/SelectTriggerMedia.tsx
|
|
12171
|
-
var
|
|
12172
|
-
var
|
|
12024
|
+
var import_components31 = require("@transferwise/components");
|
|
12025
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
12173
12026
|
function SelectTriggerMedia({ icon, image }) {
|
|
12174
12027
|
if (image == null ? void 0 : image.url) {
|
|
12175
12028
|
return null;
|
|
12176
12029
|
}
|
|
12177
12030
|
if (icon && "name" in icon) {
|
|
12178
|
-
return /* @__PURE__ */ (0,
|
|
12031
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_components31.Avatar, { type: import_components31.AvatarType.ICON, size: 24, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(DynamicIcon_default, { name: icon.name }) });
|
|
12179
12032
|
}
|
|
12180
12033
|
if (icon && "text" in icon) {
|
|
12181
|
-
return /* @__PURE__ */ (0,
|
|
12034
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_components31.Avatar, { type: import_components31.AvatarType.ICON, size: 24, children: icon.text });
|
|
12182
12035
|
}
|
|
12183
12036
|
return null;
|
|
12184
12037
|
}
|
|
12185
12038
|
|
|
12186
12039
|
// src/revamp/wise/renderers/SelectInputRenderer/SelectInputRendererComponent.tsx
|
|
12187
|
-
var
|
|
12040
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
12188
12041
|
function SelectInputRendererComponent(props) {
|
|
12189
12042
|
const {
|
|
12190
12043
|
id,
|
|
@@ -12219,17 +12072,17 @@ function SelectInputRendererComponent(props) {
|
|
|
12219
12072
|
const contentProps = withinTrigger ? {
|
|
12220
12073
|
title: option.title,
|
|
12221
12074
|
note: option.description,
|
|
12222
|
-
icon: /* @__PURE__ */ (0,
|
|
12075
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(SelectTriggerMedia, { icon: option.icon, image: option.image })
|
|
12223
12076
|
} : {
|
|
12224
12077
|
title: option.title,
|
|
12225
12078
|
description: option.description,
|
|
12226
|
-
icon: /* @__PURE__ */ (0,
|
|
12079
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(OptionMedia, { icon: option.icon, image: option.image })
|
|
12227
12080
|
};
|
|
12228
|
-
return /* @__PURE__ */ (0,
|
|
12081
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_components32.SelectInputOptionContent, __spreadValues({}, contentProps));
|
|
12229
12082
|
};
|
|
12230
|
-
return /* @__PURE__ */ (0,
|
|
12231
|
-
/* @__PURE__ */ (0,
|
|
12232
|
-
|
|
12083
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
|
|
12084
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(FieldInput_default, { id, label, help, description, error, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
12085
|
+
import_components32.SelectInput,
|
|
12233
12086
|
{
|
|
12234
12087
|
name: id,
|
|
12235
12088
|
placeholder,
|
|
@@ -12248,8 +12101,8 @@ function SelectInputRendererComponent(props) {
|
|
|
12248
12101
|
|
|
12249
12102
|
// src/revamp/wise/renderers/SelectInputRenderer/SegmentedInputRendererComponent.tsx
|
|
12250
12103
|
var import_react18 = require("react");
|
|
12251
|
-
var
|
|
12252
|
-
var
|
|
12104
|
+
var import_components33 = require("@transferwise/components");
|
|
12105
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
12253
12106
|
function SegmentedInputRendererComponent(props) {
|
|
12254
12107
|
const { id, children, description, error, help, label, options, selectedIndex, onSelect } = props;
|
|
12255
12108
|
(0, import_react18.useEffect)(() => {
|
|
@@ -12257,9 +12110,9 @@ function SegmentedInputRendererComponent(props) {
|
|
|
12257
12110
|
onSelect(0);
|
|
12258
12111
|
}
|
|
12259
12112
|
}, [selectedIndex, onSelect, options.length]);
|
|
12260
|
-
return /* @__PURE__ */ (0,
|
|
12261
|
-
/* @__PURE__ */ (0,
|
|
12262
|
-
|
|
12113
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_jsx_runtime50.Fragment, { children: [
|
|
12114
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(FieldInput_default, { id, label, help, description, error, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
12115
|
+
import_components33.SegmentedControl,
|
|
12263
12116
|
{
|
|
12264
12117
|
name: `${id}-segmented-control`,
|
|
12265
12118
|
value: String(selectedIndex),
|
|
@@ -12273,44 +12126,44 @@ function SegmentedInputRendererComponent(props) {
|
|
|
12273
12126
|
onChange: (value) => onSelect(Number(value))
|
|
12274
12127
|
}
|
|
12275
12128
|
) }),
|
|
12276
|
-
/* @__PURE__ */ (0,
|
|
12129
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { id: `${id}-children`, children })
|
|
12277
12130
|
] });
|
|
12278
12131
|
}
|
|
12279
12132
|
var isValidIndex2 = (index, options) => index !== null && index >= 0 && index < options;
|
|
12280
12133
|
|
|
12281
12134
|
// src/revamp/wise/renderers/SelectInputRenderer/SelectInputRenderer.tsx
|
|
12282
|
-
var
|
|
12135
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
12283
12136
|
var SelectInputRenderer = {
|
|
12284
12137
|
canRenderType: "input-select",
|
|
12285
12138
|
render: (props) => {
|
|
12286
12139
|
switch (props.control) {
|
|
12287
12140
|
case "radio":
|
|
12288
|
-
return /* @__PURE__ */ (0,
|
|
12141
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(RadioInputRendererComponent, __spreadValues({}, props));
|
|
12289
12142
|
case "tab":
|
|
12290
|
-
return props.options.length > 3 ? /* @__PURE__ */ (0,
|
|
12143
|
+
return props.options.length > 3 ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(TabInputRendererComponent, __spreadValues({}, props));
|
|
12291
12144
|
case "segmented":
|
|
12292
|
-
return props.options.length > 3 ? /* @__PURE__ */ (0,
|
|
12145
|
+
return props.options.length > 3 ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SegmentedInputRendererComponent, __spreadValues({}, props));
|
|
12293
12146
|
case "select":
|
|
12294
12147
|
default:
|
|
12295
|
-
return /* @__PURE__ */ (0,
|
|
12148
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SelectInputRendererComponent, __spreadValues({}, props));
|
|
12296
12149
|
}
|
|
12297
12150
|
}
|
|
12298
12151
|
};
|
|
12299
12152
|
var SelectInputRenderer_default = SelectInputRenderer;
|
|
12300
12153
|
|
|
12301
12154
|
// src/revamp/wise/renderers/StatusListRenderer.tsx
|
|
12302
|
-
var
|
|
12303
|
-
var
|
|
12155
|
+
var import_components34 = require("@transferwise/components");
|
|
12156
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
12304
12157
|
var StatusListRenderer = {
|
|
12305
12158
|
canRenderType: "status-list",
|
|
12306
|
-
render: ({ margin, items, title }) => /* @__PURE__ */ (0,
|
|
12307
|
-
title ? /* @__PURE__ */ (0,
|
|
12308
|
-
items.map(({ description, icon, status, title: itemTitle }) => /* @__PURE__ */ (0,
|
|
12309
|
-
|
|
12159
|
+
render: ({ margin, items, title }) => /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: getMargin(margin), children: [
|
|
12160
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_components34.Header, { title }) : null,
|
|
12161
|
+
items.map(({ description, icon, status, title: itemTitle }) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12162
|
+
import_components34.Summary,
|
|
12310
12163
|
{
|
|
12311
12164
|
title: itemTitle,
|
|
12312
12165
|
description,
|
|
12313
|
-
icon: icon && "name" in icon ? /* @__PURE__ */ (0,
|
|
12166
|
+
icon: icon && "name" in icon ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(DynamicIcon_default, { name: icon.name }) : null,
|
|
12314
12167
|
status: mapStatus(status)
|
|
12315
12168
|
},
|
|
12316
12169
|
`${title}/${description || ""}`
|
|
@@ -12326,63 +12179,63 @@ var mapStatus = (status) => {
|
|
|
12326
12179
|
};
|
|
12327
12180
|
|
|
12328
12181
|
// src/revamp/wise/renderers/components/VariableTextInput.tsx
|
|
12329
|
-
var
|
|
12330
|
-
var
|
|
12182
|
+
var import_components35 = require("@transferwise/components");
|
|
12183
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
12331
12184
|
function VariableTextInput({
|
|
12332
12185
|
control,
|
|
12333
12186
|
inputProps
|
|
12334
12187
|
}) {
|
|
12335
12188
|
switch (control) {
|
|
12336
12189
|
case "password":
|
|
12337
|
-
return /* @__PURE__ */ (0,
|
|
12190
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(TextInput, __spreadValues({ type: "password" }, inputProps));
|
|
12338
12191
|
case "email":
|
|
12339
|
-
return /* @__PURE__ */ (0,
|
|
12192
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(TextInput, __spreadValues({ type: "email" }, inputProps));
|
|
12340
12193
|
case "textarea":
|
|
12341
|
-
return /* @__PURE__ */ (0,
|
|
12194
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(TextAreaInput, __spreadValues({}, inputProps));
|
|
12342
12195
|
case "numeric":
|
|
12343
|
-
return /* @__PURE__ */ (0,
|
|
12196
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(NumericInput, __spreadValues({ type: "number" }, inputProps));
|
|
12344
12197
|
case "phone-number":
|
|
12345
|
-
return /* @__PURE__ */ (0,
|
|
12198
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(PhoneNumberInput, __spreadValues({}, inputProps));
|
|
12346
12199
|
default:
|
|
12347
|
-
return /* @__PURE__ */ (0,
|
|
12200
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(TextInput, __spreadValues({ type: "text" }, inputProps));
|
|
12348
12201
|
}
|
|
12349
12202
|
}
|
|
12350
12203
|
function TextInput(_a) {
|
|
12351
12204
|
var _b = _a, { id, displayFormat, onChange } = _b, rest = __objRest(_b, ["id", "displayFormat", "onChange"]);
|
|
12352
12205
|
if (typeof displayFormat === "string") {
|
|
12353
12206
|
const inputProps = __spreadValues({ id, name: id, className: "form-control" }, rest);
|
|
12354
|
-
return /* @__PURE__ */ (0,
|
|
12355
|
-
|
|
12207
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
12208
|
+
import_components35.InputWithDisplayFormat,
|
|
12356
12209
|
__spreadValues({
|
|
12357
12210
|
displayPattern: displayFormat,
|
|
12358
12211
|
onChange: (newValue) => onChange(newValue)
|
|
12359
12212
|
}, inputProps)
|
|
12360
12213
|
);
|
|
12361
12214
|
}
|
|
12362
|
-
return /* @__PURE__ */ (0,
|
|
12215
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_components35.Input, __spreadValues({ id, name: id, onChange: (e) => onChange(e.target.value) }, rest));
|
|
12363
12216
|
}
|
|
12364
12217
|
function TextAreaInput(_a) {
|
|
12365
12218
|
var _b = _a, { id, displayFormat, onChange } = _b, rest = __objRest(_b, ["id", "displayFormat", "onChange"]);
|
|
12366
12219
|
const textAreaProps = __spreadValues({ id, name: id }, rest);
|
|
12367
|
-
return typeof displayFormat === "string" ? /* @__PURE__ */ (0,
|
|
12368
|
-
|
|
12220
|
+
return typeof displayFormat === "string" ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
12221
|
+
import_components35.TextareaWithDisplayFormat,
|
|
12369
12222
|
__spreadValues({
|
|
12370
12223
|
displayPattern: displayFormat,
|
|
12371
12224
|
onChange: (newValue) => onChange(newValue)
|
|
12372
12225
|
}, textAreaProps)
|
|
12373
|
-
) : /* @__PURE__ */ (0,
|
|
12226
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_components35.TextArea, __spreadValues({ onChange: (e) => onChange(e.target.value) }, textAreaProps));
|
|
12374
12227
|
}
|
|
12375
12228
|
function NumericInput(_a) {
|
|
12376
12229
|
var _b = _a, { id, displayFormat, onChange } = _b, rest = __objRest(_b, ["id", "displayFormat", "onChange"]);
|
|
12377
12230
|
const numericProps = __spreadValues({ id, name: id, onWheel }, rest);
|
|
12378
|
-
return typeof displayFormat === "string" ? /* @__PURE__ */ (0,
|
|
12379
|
-
|
|
12231
|
+
return typeof displayFormat === "string" ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
12232
|
+
import_components35.InputWithDisplayFormat,
|
|
12380
12233
|
__spreadValues({
|
|
12381
12234
|
displayPattern: displayFormat,
|
|
12382
12235
|
onChange: (newValue) => onChange(numericValueOrNull(newValue))
|
|
12383
12236
|
}, numericProps)
|
|
12384
|
-
) : /* @__PURE__ */ (0,
|
|
12385
|
-
|
|
12237
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
12238
|
+
import_components35.Input,
|
|
12386
12239
|
__spreadValues({
|
|
12387
12240
|
onChange: ({ target: { value: newValue } }) => onChange(numericValueOrNull(newValue))
|
|
12388
12241
|
}, numericProps)
|
|
@@ -12390,12 +12243,12 @@ function NumericInput(_a) {
|
|
|
12390
12243
|
}
|
|
12391
12244
|
function PhoneNumberInput(_a) {
|
|
12392
12245
|
var _b = _a, { value } = _b, rest = __objRest(_b, ["value"]);
|
|
12393
|
-
return /* @__PURE__ */ (0,
|
|
12246
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_components35.PhoneNumberInput, __spreadValues({ initialValue: value }, rest));
|
|
12394
12247
|
}
|
|
12395
12248
|
var VariableTextInput_default = VariableTextInput;
|
|
12396
12249
|
|
|
12397
12250
|
// src/revamp/wise/renderers/TextInputRenderer.tsx
|
|
12398
|
-
var
|
|
12251
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
12399
12252
|
var TextInputRenderer = {
|
|
12400
12253
|
canRenderType: "input-text",
|
|
12401
12254
|
render: (props) => {
|
|
@@ -12420,14 +12273,14 @@ var TextInputRenderer = {
|
|
|
12420
12273
|
]);
|
|
12421
12274
|
const value = initialValue != null ? initialValue : "";
|
|
12422
12275
|
const inputProps = __spreadProps(__spreadValues({}, rest), { value, id });
|
|
12423
|
-
return /* @__PURE__ */ (0,
|
|
12276
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(FieldInput_default, { id, label, description, error, help, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(VariableTextInput_default, { control, inputProps }) });
|
|
12424
12277
|
}
|
|
12425
12278
|
};
|
|
12426
12279
|
var TextInputRenderer_default = TextInputRenderer;
|
|
12427
12280
|
|
|
12428
12281
|
// src/revamp/wise/renderers/UploadInputRenderer.tsx
|
|
12429
|
-
var
|
|
12430
|
-
var
|
|
12282
|
+
var import_components36 = require("@transferwise/components");
|
|
12283
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
12431
12284
|
var UploadInputRenderer = {
|
|
12432
12285
|
canRenderType: "input-upload",
|
|
12433
12286
|
render: (props) => {
|
|
@@ -12443,8 +12296,8 @@ var UploadInputRenderer = {
|
|
|
12443
12296
|
};
|
|
12444
12297
|
return (
|
|
12445
12298
|
// We don't pass help here as there is no sensible place to display it
|
|
12446
|
-
/* @__PURE__ */ (0,
|
|
12447
|
-
|
|
12299
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(UploadFieldInput_default, { id, label: void 0, description: void 0, error, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
12300
|
+
import_components36.UploadInput,
|
|
12448
12301
|
{
|
|
12449
12302
|
id,
|
|
12450
12303
|
description,
|
|
@@ -12479,97 +12332,36 @@ var LargeUploadRenderer = {
|
|
|
12479
12332
|
"id",
|
|
12480
12333
|
"accepts",
|
|
12481
12334
|
"control",
|
|
12482
|
-
"label",
|
|
12483
|
-
"description",
|
|
12484
|
-
"disabled",
|
|
12485
|
-
"error",
|
|
12486
|
-
"help",
|
|
12487
|
-
"maxSize",
|
|
12488
|
-
"type",
|
|
12489
|
-
"onUpload"
|
|
12490
|
-
]);
|
|
12491
|
-
const uploadProps = __spreadProps(__spreadValues({}, rest), { id, name: id });
|
|
12492
|
-
const onUploadFile = async (file, fileName) => {
|
|
12493
|
-
try {
|
|
12494
|
-
const convertedFile = file ? await toFile(file, fileName) : null;
|
|
12495
|
-
await onUpload(convertedFile);
|
|
12496
|
-
} catch (e) {
|
|
12497
|
-
await onUpload(null);
|
|
12498
|
-
throw e;
|
|
12499
|
-
}
|
|
12500
|
-
};
|
|
12501
|
-
return /* @__PURE__ */ (0,
|
|
12502
|
-
|
|
12503
|
-
__spreadProps(__spreadValues({}, uploadProps), {
|
|
12504
|
-
usAccept: getAcceptsString(accepts),
|
|
12505
|
-
usDisabled: disabled,
|
|
12506
|
-
onSuccess: onUploadFile,
|
|
12507
|
-
onFailure: async () => onUpload(null),
|
|
12508
|
-
onCancel: async () => onUpload(null)
|
|
12509
|
-
})
|
|
12510
|
-
) });
|
|
12511
|
-
}
|
|
12512
|
-
};
|
|
12513
|
-
|
|
12514
|
-
// src/revamp/wise/renderers/ReviewRenderer.tsx
|
|
12515
|
-
var import_components36 = require("@transferwise/components");
|
|
12516
|
-
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
12517
|
-
var ReviewRenderer = {
|
|
12518
|
-
canRenderType: "review",
|
|
12519
|
-
render: ({ callToAction, control, fields, margin, title }) => {
|
|
12520
|
-
const orientation = mapControlToDefinitionListLayout(control);
|
|
12521
|
-
const action = callToAction ? {
|
|
12522
|
-
text: callToAction.title,
|
|
12523
|
-
onClick: (event) => {
|
|
12524
|
-
event.preventDefault();
|
|
12525
|
-
callToAction.onClick();
|
|
12526
|
-
}
|
|
12527
|
-
} : void 0;
|
|
12528
|
-
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: getMargin(margin), children: [
|
|
12529
|
-
(title || callToAction) && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_components36.Header, { title: title != null ? title : "", action }),
|
|
12530
|
-
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: margin, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
12531
|
-
import_components36.DefinitionList,
|
|
12532
|
-
{
|
|
12533
|
-
layout: orientation,
|
|
12534
|
-
definitions: fields.map(({ label, value, help }, index) => ({
|
|
12535
|
-
key: String(index),
|
|
12536
|
-
title: label,
|
|
12537
|
-
value: getFieldValue(value, help, orientation)
|
|
12538
|
-
}))
|
|
12539
|
-
}
|
|
12540
|
-
) })
|
|
12541
|
-
] });
|
|
12542
|
-
}
|
|
12543
|
-
};
|
|
12544
|
-
var ReviewRenderer_default = ReviewRenderer;
|
|
12545
|
-
var mapControlToDefinitionListLayout = (control) => {
|
|
12546
|
-
switch (control) {
|
|
12547
|
-
case "horizontal":
|
|
12548
|
-
case "horizontal-end-aligned":
|
|
12549
|
-
return "HORIZONTAL_RIGHT_ALIGNED";
|
|
12550
|
-
case "horizontal-start-aligned":
|
|
12551
|
-
return "HORIZONTAL_LEFT_ALIGNED";
|
|
12552
|
-
case "vertical-two-column":
|
|
12553
|
-
return "VERTICAL_TWO_COLUMN";
|
|
12554
|
-
case "vertical":
|
|
12555
|
-
case "vertical-one-column":
|
|
12556
|
-
default:
|
|
12557
|
-
return "VERTICAL_ONE_COLUMN";
|
|
12558
|
-
}
|
|
12559
|
-
};
|
|
12560
|
-
var getFieldValue = (value, help, orientation) => {
|
|
12561
|
-
if (help) {
|
|
12562
|
-
return orientation === "HORIZONTAL_RIGHT_ALIGNED" ? /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_jsx_runtime55.Fragment, { children: [
|
|
12563
|
-
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Help_default, { help }),
|
|
12564
|
-
" ",
|
|
12565
|
-
value
|
|
12566
|
-
] }) : /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_jsx_runtime55.Fragment, { children: [
|
|
12567
|
-
value,
|
|
12568
|
-
" ",
|
|
12569
|
-
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Help_default, { help })
|
|
12570
|
-
] });
|
|
12335
|
+
"label",
|
|
12336
|
+
"description",
|
|
12337
|
+
"disabled",
|
|
12338
|
+
"error",
|
|
12339
|
+
"help",
|
|
12340
|
+
"maxSize",
|
|
12341
|
+
"type",
|
|
12342
|
+
"onUpload"
|
|
12343
|
+
]);
|
|
12344
|
+
const uploadProps = __spreadProps(__spreadValues({}, rest), { id, name: id });
|
|
12345
|
+
const onUploadFile = async (file, fileName) => {
|
|
12346
|
+
try {
|
|
12347
|
+
const convertedFile = file ? await toFile(file, fileName) : null;
|
|
12348
|
+
await onUpload(convertedFile);
|
|
12349
|
+
} catch (e) {
|
|
12350
|
+
await onUpload(null);
|
|
12351
|
+
throw e;
|
|
12352
|
+
}
|
|
12353
|
+
};
|
|
12354
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(FieldInput_default, { id, label, description, error, help, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
12355
|
+
import_components36.Upload,
|
|
12356
|
+
__spreadProps(__spreadValues({}, uploadProps), {
|
|
12357
|
+
usAccept: getAcceptsString(accepts),
|
|
12358
|
+
usDisabled: disabled,
|
|
12359
|
+
onSuccess: onUploadFile,
|
|
12360
|
+
onFailure: async () => onUpload(null),
|
|
12361
|
+
onCancel: async () => onUpload(null)
|
|
12362
|
+
})
|
|
12363
|
+
) });
|
|
12571
12364
|
}
|
|
12572
|
-
return value;
|
|
12573
12365
|
};
|
|
12574
12366
|
|
|
12575
12367
|
// src/revamp/wise/renderers/step/StepRenderer.tsx
|
|
@@ -13094,7 +12886,6 @@ function isReference(block) {
|
|
|
13094
12886
|
|
|
13095
12887
|
// src/legacy/dynamicFlow/DynamicFlow.tsx
|
|
13096
12888
|
var import_react66 = require("react");
|
|
13097
|
-
var import_react_intl40 = require("react-intl");
|
|
13098
12889
|
|
|
13099
12890
|
// src/legacy/common/contexts/dynamicFlowContexts/DynamicFlowContexts.tsx
|
|
13100
12891
|
var import_react24 = require("react");
|
|
@@ -13208,6 +12999,61 @@ function FeatureContextProvider({ features, children }) {
|
|
|
13208
12999
|
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(FeatureContext.Provider, { value: features, children });
|
|
13209
13000
|
}
|
|
13210
13001
|
|
|
13002
|
+
// src/common/cameraCapture/utils/mobile-utils.ts
|
|
13003
|
+
var isMobile = () => isMobileScreenSize() && (isTouchScreen() || isMobileUA());
|
|
13004
|
+
var isMobileUA = (userAgent = window.navigator.userAgent) => (
|
|
13005
|
+
// eslint-disable-next-line regexp/no-unused-capturing-group
|
|
13006
|
+
/mobi|\b(iphone|android|blackberry|webos|windows phone)\b/i.test(userAgent)
|
|
13007
|
+
);
|
|
13008
|
+
var isMobileScreenSize = (width = window.screen.width, height = window.screen.height) => width < 768 || height < 768;
|
|
13009
|
+
var isTouchScreen = (navigator2 = window.navigator, matchMedia = window.matchMedia) => {
|
|
13010
|
+
if ("maxTouchPoints" in navigator2) {
|
|
13011
|
+
return navigator2.maxTouchPoints > 0;
|
|
13012
|
+
}
|
|
13013
|
+
const mQ = matchMedia == null ? void 0 : matchMedia("(pointer:coarse)");
|
|
13014
|
+
if ((mQ == null ? void 0 : mQ.media) === "(pointer:coarse)") {
|
|
13015
|
+
return Boolean(mQ.matches);
|
|
13016
|
+
}
|
|
13017
|
+
return false;
|
|
13018
|
+
};
|
|
13019
|
+
|
|
13020
|
+
// src/common/utils/debounce.ts
|
|
13021
|
+
var debounce2 = (callback, waitMs) => {
|
|
13022
|
+
let timeoutId;
|
|
13023
|
+
let lastArgs;
|
|
13024
|
+
const clearTimer = () => {
|
|
13025
|
+
if (timeoutId) {
|
|
13026
|
+
clearTimeout(timeoutId);
|
|
13027
|
+
timeoutId = null;
|
|
13028
|
+
}
|
|
13029
|
+
lastArgs = null;
|
|
13030
|
+
};
|
|
13031
|
+
const debouncedFn = (...args) => {
|
|
13032
|
+
lastArgs = args;
|
|
13033
|
+
if (timeoutId !== null) {
|
|
13034
|
+
clearTimeout(timeoutId);
|
|
13035
|
+
}
|
|
13036
|
+
timeoutId = setTimeout(() => {
|
|
13037
|
+
callback(...lastArgs);
|
|
13038
|
+
timeoutId = null;
|
|
13039
|
+
lastArgs = null;
|
|
13040
|
+
}, waitMs);
|
|
13041
|
+
};
|
|
13042
|
+
debouncedFn.cancel = () => {
|
|
13043
|
+
if (timeoutId !== null) {
|
|
13044
|
+
clearTimer();
|
|
13045
|
+
}
|
|
13046
|
+
};
|
|
13047
|
+
debouncedFn.flush = () => {
|
|
13048
|
+
if (timeoutId !== null) {
|
|
13049
|
+
callback(...lastArgs);
|
|
13050
|
+
clearTimer();
|
|
13051
|
+
}
|
|
13052
|
+
};
|
|
13053
|
+
debouncedFn.isPending = () => timeoutId !== null;
|
|
13054
|
+
return debouncedFn;
|
|
13055
|
+
};
|
|
13056
|
+
|
|
13211
13057
|
// src/legacy/common/utils/api-utils.ts
|
|
13212
13058
|
function isStatus2xx(status) {
|
|
13213
13059
|
return status >= 200 && status < 300;
|
|
@@ -13670,63 +13516,6 @@ var dateStringToDate = (dateString) => {
|
|
|
13670
13516
|
};
|
|
13671
13517
|
var dateToDateString2 = (date) => formatDate2(date);
|
|
13672
13518
|
|
|
13673
|
-
// src/legacy/common/utils/debounce.ts
|
|
13674
|
-
var debounce2 = (callback, waitMs) => {
|
|
13675
|
-
let timeoutId;
|
|
13676
|
-
let lastArgs;
|
|
13677
|
-
const clearTimer = () => {
|
|
13678
|
-
if (timeoutId) {
|
|
13679
|
-
clearTimeout(timeoutId);
|
|
13680
|
-
timeoutId = null;
|
|
13681
|
-
}
|
|
13682
|
-
lastArgs = null;
|
|
13683
|
-
};
|
|
13684
|
-
const debouncedFn = (...args) => {
|
|
13685
|
-
lastArgs = args;
|
|
13686
|
-
if (timeoutId !== null) {
|
|
13687
|
-
clearTimeout(timeoutId);
|
|
13688
|
-
}
|
|
13689
|
-
timeoutId = setTimeout(() => {
|
|
13690
|
-
callback(...lastArgs);
|
|
13691
|
-
timeoutId = null;
|
|
13692
|
-
lastArgs = null;
|
|
13693
|
-
}, waitMs);
|
|
13694
|
-
};
|
|
13695
|
-
debouncedFn.cancel = () => {
|
|
13696
|
-
if (timeoutId !== null) {
|
|
13697
|
-
clearTimer();
|
|
13698
|
-
}
|
|
13699
|
-
};
|
|
13700
|
-
debouncedFn.flush = () => {
|
|
13701
|
-
if (timeoutId !== null) {
|
|
13702
|
-
callback(...lastArgs);
|
|
13703
|
-
clearTimer();
|
|
13704
|
-
}
|
|
13705
|
-
};
|
|
13706
|
-
debouncedFn.isPending = () => timeoutId !== null;
|
|
13707
|
-
return debouncedFn;
|
|
13708
|
-
};
|
|
13709
|
-
|
|
13710
|
-
// src/legacy/common/utils/is-equal.ts
|
|
13711
|
-
var isEqual = (a, b) => {
|
|
13712
|
-
if (a === b) {
|
|
13713
|
-
return true;
|
|
13714
|
-
}
|
|
13715
|
-
if (Array.isArray(a) && Array.isArray(b)) {
|
|
13716
|
-
return a.length === b.length && a.every((item, index) => isEqual(item, b[index]));
|
|
13717
|
-
}
|
|
13718
|
-
if (isNonNullObject(a) && isNonNullObject(b) && isObjectEquals(a, b)) {
|
|
13719
|
-
return true;
|
|
13720
|
-
}
|
|
13721
|
-
return false;
|
|
13722
|
-
};
|
|
13723
|
-
var isObjectEquals = (a, b) => {
|
|
13724
|
-
const keysA = Object.keys(a);
|
|
13725
|
-
const keysB = Object.keys(b);
|
|
13726
|
-
return keysA.length === keysB.length && keysA.every((key) => Object.hasOwnProperty.call(b, key) && isEqual(a[key], b[key]));
|
|
13727
|
-
};
|
|
13728
|
-
var isNonNullObject = (a) => typeof a === "object" && a !== null;
|
|
13729
|
-
|
|
13730
13519
|
// src/legacy/common/utils/file-utils.ts
|
|
13731
13520
|
function toKilobytes2(sizeInBytes) {
|
|
13732
13521
|
const ONE_KB_IN_BYTES = 1024;
|
|
@@ -13762,6 +13551,52 @@ var generateRandomId = (prefix = "") => {
|
|
|
13762
13551
|
return `${prefixString}${Math.floor(1e8 * Math.random())}`;
|
|
13763
13552
|
};
|
|
13764
13553
|
|
|
13554
|
+
// src/legacy/common/utils/is-equal.ts
|
|
13555
|
+
var isEqual = (a, b) => {
|
|
13556
|
+
if (a === b) {
|
|
13557
|
+
return true;
|
|
13558
|
+
}
|
|
13559
|
+
if (Array.isArray(a) && Array.isArray(b)) {
|
|
13560
|
+
return a.length === b.length && a.every((item, index) => isEqual(item, b[index]));
|
|
13561
|
+
}
|
|
13562
|
+
if (isNonNullObject(a) && isNonNullObject(b) && isObjectEquals(a, b)) {
|
|
13563
|
+
return true;
|
|
13564
|
+
}
|
|
13565
|
+
return false;
|
|
13566
|
+
};
|
|
13567
|
+
var isObjectEquals = (a, b) => {
|
|
13568
|
+
const keysA = Object.keys(a);
|
|
13569
|
+
const keysB = Object.keys(b);
|
|
13570
|
+
return keysA.length === keysB.length && keysA.every((key) => Object.hasOwnProperty.call(b, key) && isEqual(a[key], b[key]));
|
|
13571
|
+
};
|
|
13572
|
+
var isNonNullObject = (a) => typeof a === "object" && a !== null;
|
|
13573
|
+
|
|
13574
|
+
// src/legacy/common/utils/misc-utils.ts
|
|
13575
|
+
var isBasicError = (error) => isString2(error) || isNull3(error);
|
|
13576
|
+
|
|
13577
|
+
// src/legacy/common/utils/model-utils.ts
|
|
13578
|
+
var isObjectModel2 = (model) => typeof model === "object" && model !== null && model.constructor === Object;
|
|
13579
|
+
var isNullableObjectModel = (model) => isNull3(model) || isObjectModel2(model);
|
|
13580
|
+
var isNullableBasicModel = (model) => isBoolean2(model) || isNumber3(model) || isString2(model) || isNull3(model);
|
|
13581
|
+
var isNullableStringModel = (model) => isString2(model) || isNull3(model);
|
|
13582
|
+
var isArrayModel2 = (model) => {
|
|
13583
|
+
if (isArray2(model)) {
|
|
13584
|
+
if (model.length === 0) {
|
|
13585
|
+
return true;
|
|
13586
|
+
}
|
|
13587
|
+
return model.every(
|
|
13588
|
+
(item) => typeof item === "string" || typeof item === "number" || typeof item === "boolean" || typeof item === "object"
|
|
13589
|
+
);
|
|
13590
|
+
}
|
|
13591
|
+
return false;
|
|
13592
|
+
};
|
|
13593
|
+
var isNullableArrayModel = (model) => {
|
|
13594
|
+
if (isNull3(model)) {
|
|
13595
|
+
return true;
|
|
13596
|
+
}
|
|
13597
|
+
return isArrayModel2(model);
|
|
13598
|
+
};
|
|
13599
|
+
|
|
13765
13600
|
// src/legacy/common/utils/schema-utils.ts
|
|
13766
13601
|
function isConstSchema2(schema) {
|
|
13767
13602
|
return !isUndefined3(schema == null ? void 0 : schema.const);
|
|
@@ -13890,50 +13725,6 @@ var filterHiddenSchemas = (schemas) => schemas.filter((schema) => {
|
|
|
13890
13725
|
return (schema == null ? void 0 : schema.hidden) !== true;
|
|
13891
13726
|
});
|
|
13892
13727
|
|
|
13893
|
-
// src/legacy/common/utils/model-utils.ts
|
|
13894
|
-
var isObjectModel2 = (model) => typeof model === "object" && model !== null && model.constructor === Object;
|
|
13895
|
-
var isNullableObjectModel = (model) => isNull3(model) || isObjectModel2(model);
|
|
13896
|
-
var isNullableBasicModel = (model) => isBoolean2(model) || isNumber3(model) || isString2(model) || isNull3(model);
|
|
13897
|
-
var isNullableStringModel = (model) => isString2(model) || isNull3(model);
|
|
13898
|
-
var isArrayModel2 = (model) => {
|
|
13899
|
-
if (isArray2(model)) {
|
|
13900
|
-
if (model.length === 0) {
|
|
13901
|
-
return true;
|
|
13902
|
-
}
|
|
13903
|
-
return model.every(
|
|
13904
|
-
(item) => typeof item === "string" || typeof item === "number" || typeof item === "boolean" || typeof item === "object"
|
|
13905
|
-
);
|
|
13906
|
-
}
|
|
13907
|
-
return false;
|
|
13908
|
-
};
|
|
13909
|
-
var isNullableArrayModel = (model) => {
|
|
13910
|
-
if (isNull3(model)) {
|
|
13911
|
-
return true;
|
|
13912
|
-
}
|
|
13913
|
-
return isArrayModel2(model);
|
|
13914
|
-
};
|
|
13915
|
-
|
|
13916
|
-
// src/legacy/common/utils/misc-utils.ts
|
|
13917
|
-
var isBasicError = (error) => isString2(error) || isNull3(error);
|
|
13918
|
-
|
|
13919
|
-
// src/legacy/common/utils/mobile-utils.ts
|
|
13920
|
-
var isMobile = () => isMobileScreenSize() && (isTouchScreen() || isMobileUA());
|
|
13921
|
-
var isMobileUA = (userAgent = window.navigator.userAgent) => (
|
|
13922
|
-
// eslint-disable-next-line regexp/no-unused-capturing-group
|
|
13923
|
-
/mobi|\b(iphone|android|blackberry|webos|windows phone)\b/i.test(userAgent)
|
|
13924
|
-
);
|
|
13925
|
-
var isMobileScreenSize = (width = window.screen.width, height = window.screen.height) => width < 768 || height < 768;
|
|
13926
|
-
var isTouchScreen = (navigator2 = window.navigator, matchMedia = window.matchMedia) => {
|
|
13927
|
-
if ("maxTouchPoints" in navigator2) {
|
|
13928
|
-
return navigator2.maxTouchPoints > 0;
|
|
13929
|
-
}
|
|
13930
|
-
const mQ = matchMedia == null ? void 0 : matchMedia("(pointer:coarse)");
|
|
13931
|
-
if ((mQ == null ? void 0 : mQ.media) === "(pointer:coarse)") {
|
|
13932
|
-
return Boolean(mQ.matches);
|
|
13933
|
-
}
|
|
13934
|
-
return false;
|
|
13935
|
-
};
|
|
13936
|
-
|
|
13937
13728
|
// src/legacy/common/hooks/useDebouncedFunction/useDebouncedFunction.tsx
|
|
13938
13729
|
var import_react28 = require("react");
|
|
13939
13730
|
function useDebouncedFunction(callback, waitMs) {
|
|
@@ -15653,7 +15444,7 @@ var logInvalidTypeFallbackWarning = ({
|
|
|
15653
15444
|
};
|
|
15654
15445
|
|
|
15655
15446
|
// src/legacy/formControl/utils/getAutocompleteString.ts
|
|
15656
|
-
var
|
|
15447
|
+
var getAutocompleteString2 = (hints, { prefix = "", suffix = "" } = {}) => {
|
|
15657
15448
|
const autoCompleteString = hints.map((hint) => {
|
|
15658
15449
|
const builtHint = `${prefix}${hint}${suffix}`;
|
|
15659
15450
|
return isAutocompleteToken(builtHint) ? autocompleteTokenMap2[builtHint] : void 0;
|
|
@@ -15736,7 +15527,7 @@ var _FormControl = class _FormControl extends import_react38.PureComponent {
|
|
|
15736
15527
|
this.getAutocompleteValue = ({ prefix = "", suffix = "" } = {}) => {
|
|
15737
15528
|
const { autoComplete, autocompleteHint } = this.props;
|
|
15738
15529
|
if (isArray2(autocompleteHint)) {
|
|
15739
|
-
return
|
|
15530
|
+
return getAutocompleteString2(autocompleteHint, { prefix, suffix });
|
|
15740
15531
|
}
|
|
15741
15532
|
return autoComplete ? "on" : "off";
|
|
15742
15533
|
};
|
|
@@ -18147,12 +17938,12 @@ var LayoutStep_default = LayoutStep;
|
|
|
18147
17938
|
// src/legacy/step/cameraStep/CameraStep.tsx
|
|
18148
17939
|
var import_react62 = require("react");
|
|
18149
17940
|
|
|
18150
|
-
// src/
|
|
17941
|
+
// src/common/cameraCapture/CameraCapture.tsx
|
|
18151
17942
|
var import_react61 = require("react");
|
|
18152
17943
|
var import_react_intl37 = require("react-intl");
|
|
18153
17944
|
var import_react_webcam = __toESM(require("react-webcam"));
|
|
18154
17945
|
|
|
18155
|
-
// src/
|
|
17946
|
+
// src/common/cameraCapture/CameraCapture.messages.ts
|
|
18156
17947
|
var import_react_intl33 = require("react-intl");
|
|
18157
17948
|
var CameraCapture_messages_default = (0, import_react_intl33.defineMessages)({
|
|
18158
17949
|
reviewSubmit: {
|
|
@@ -18212,7 +18003,7 @@ var CameraCapture_messages_default = (0, import_react_intl33.defineMessages)({
|
|
|
18212
18003
|
}
|
|
18213
18004
|
});
|
|
18214
18005
|
|
|
18215
|
-
// src/
|
|
18006
|
+
// src/common/cameraCapture/components/bottomBar/BottomBar.tsx
|
|
18216
18007
|
var import_components73 = require("@transferwise/components");
|
|
18217
18008
|
var import_react_intl34 = require("react-intl");
|
|
18218
18009
|
var import_jsx_runtime118 = require("react/jsx-runtime");
|
|
@@ -18259,10 +18050,10 @@ var CaptureButton = ({ onClick }) => /* @__PURE__ */ (0, import_jsx_runtime118.j
|
|
|
18259
18050
|
}
|
|
18260
18051
|
);
|
|
18261
18052
|
|
|
18262
|
-
// src/
|
|
18053
|
+
// src/common/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.tsx
|
|
18263
18054
|
var import_react_intl36 = require("react-intl");
|
|
18264
18055
|
|
|
18265
|
-
// src/
|
|
18056
|
+
// src/common/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.messages.ts
|
|
18266
18057
|
var import_react_intl35 = require("react-intl");
|
|
18267
18058
|
var OrientationLockOverlay_messages_default = (0, import_react_intl35.defineMessages)({
|
|
18268
18059
|
text: {
|
|
@@ -18272,7 +18063,7 @@ var OrientationLockOverlay_messages_default = (0, import_react_intl35.defineMess
|
|
|
18272
18063
|
}
|
|
18273
18064
|
});
|
|
18274
18065
|
|
|
18275
|
-
// src/
|
|
18066
|
+
// src/common/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.tsx
|
|
18276
18067
|
var import_jsx_runtime119 = require("react/jsx-runtime");
|
|
18277
18068
|
function OrientationLockOverlay() {
|
|
18278
18069
|
const intl = (0, import_react_intl36.useIntl)();
|
|
@@ -18292,23 +18083,11 @@ function OrientationLockOverlay() {
|
|
|
18292
18083
|
}
|
|
18293
18084
|
var OrientationLockOverlay_default = OrientationLockOverlay;
|
|
18294
18085
|
|
|
18295
|
-
// src/
|
|
18296
|
-
var import_components74 = require("@transferwise/components");
|
|
18297
|
-
var import_jsx_runtime120 = require("react/jsx-runtime");
|
|
18298
|
-
function CameraErrorScreen({ title, description, actionButton, onAction }) {
|
|
18299
|
-
return /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", { className: "container p-t-5", children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", { className: "row", children: /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)("div", { className: "col-md-6 col-md-offset-3", children: [
|
|
18300
|
-
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)("h2", { className: "text-xs-center m-b-3", children: title }),
|
|
18301
|
-
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)("p", { className: "text-xs-center m-b-5", children: description }),
|
|
18302
|
-
onAction && actionButton && /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(import_components74.Button, { block: true, onClick: onAction, children: actionButton })
|
|
18303
|
-
] }) }) });
|
|
18304
|
-
}
|
|
18305
|
-
var CameraErrorScreen_default = CameraErrorScreen;
|
|
18306
|
-
|
|
18307
|
-
// src/legacy/step/cameraStep/cameraCapture/hooks/useFullScreenOrientationLock.ts
|
|
18086
|
+
// src/common/cameraCapture/hooks/useFullScreenOrientationLock.ts
|
|
18308
18087
|
var import_react58 = require("react");
|
|
18309
18088
|
var import_screenfull = __toESM(require_screenfull());
|
|
18310
18089
|
|
|
18311
|
-
// src/
|
|
18090
|
+
// src/common/cameraCapture/utils/index.ts
|
|
18312
18091
|
var isSelfieCamera = (stream) => {
|
|
18313
18092
|
var _a;
|
|
18314
18093
|
const { facingMode } = ((_a = getVideoTrack(stream)) == null ? void 0 : _a.getSettings()) || {};
|
|
@@ -18354,7 +18133,7 @@ var getVideoCapabilities = (videoStream) => {
|
|
|
18354
18133
|
return (_b = (_a = getVideoTrack(videoStream)) == null ? void 0 : _a.getCapabilities) == null ? void 0 : _b.call(_a);
|
|
18355
18134
|
};
|
|
18356
18135
|
|
|
18357
|
-
// src/
|
|
18136
|
+
// src/common/cameraCapture/tracking/index.ts
|
|
18358
18137
|
var trackCameraError = (message, onEvent, error) => onEvent == null ? void 0 : onEvent(message, { Error: getSerializedError(error) });
|
|
18359
18138
|
var getSerializedError = (error) => error instanceof DOMException ? JSON.stringify({
|
|
18360
18139
|
name: error == null ? void 0 : error.name,
|
|
@@ -18376,13 +18155,13 @@ var getCameraStartedProperties = async (props, videoStream) => {
|
|
|
18376
18155
|
});
|
|
18377
18156
|
};
|
|
18378
18157
|
var trackCameraOrientationLandscape = (onEvent) => {
|
|
18379
|
-
onEvent == null ? void 0 : onEvent("Dynamic Flow - Camera Orientation Lock Overlay Shown", {});
|
|
18158
|
+
void (onEvent == null ? void 0 : onEvent("Dynamic Flow - Camera Orientation Lock Overlay Shown", {}));
|
|
18380
18159
|
};
|
|
18381
18160
|
var trackCameraOrientationLocked = (onEvent) => {
|
|
18382
|
-
onEvent == null ? void 0 : onEvent("Dynamic Flow - Camera Orientation Locked", {});
|
|
18161
|
+
void (onEvent == null ? void 0 : onEvent("Dynamic Flow - Camera Orientation Locked", {}));
|
|
18383
18162
|
};
|
|
18384
18163
|
|
|
18385
|
-
// src/
|
|
18164
|
+
// src/common/cameraCapture/hooks/useFullScreenOrientationLock.ts
|
|
18386
18165
|
var useFullScreenOrientationLock = (shouldLockOrientation, onEvent) => {
|
|
18387
18166
|
const lockOrientation = (0, import_react58.useCallback)(() => {
|
|
18388
18167
|
if (window.screen.orientation && "lock" in window.screen.orientation && typeof window.screen.orientation.lock === "function") {
|
|
@@ -18444,37 +18223,37 @@ var useFullScreenOrientationLock = (shouldLockOrientation, onEvent) => {
|
|
|
18444
18223
|
var noop5 = () => {
|
|
18445
18224
|
};
|
|
18446
18225
|
|
|
18447
|
-
// src/
|
|
18226
|
+
// src/common/cameraCapture/hooks/useVideoConstraints.ts
|
|
18448
18227
|
var import_react59 = require("react");
|
|
18449
18228
|
var useVideoConstraints = (direction) => {
|
|
18450
18229
|
const [videoConstraints, setVideoConstraints] = (0, import_react59.useState)();
|
|
18230
|
+
(0, import_react59.useEffect)(() => {
|
|
18231
|
+
void getVideoConstraints(direction).then(setVideoConstraints);
|
|
18232
|
+
}, [direction]);
|
|
18233
|
+
return { videoConstraints };
|
|
18234
|
+
};
|
|
18235
|
+
var getVideoConstraints = async (dir) => {
|
|
18451
18236
|
const defaultVideoConstraints = {
|
|
18452
|
-
facingMode:
|
|
18237
|
+
facingMode: dir === "front" ? "user" : "environment",
|
|
18453
18238
|
height: { min: 480, max: 1080, ideal: 720 },
|
|
18454
18239
|
width: { min: 640, max: 1920, ideal: 1280 },
|
|
18455
18240
|
frameRate: 30,
|
|
18456
18241
|
aspectRatio: 16 / 9
|
|
18457
18242
|
};
|
|
18458
|
-
(
|
|
18459
|
-
|
|
18460
|
-
|
|
18461
|
-
|
|
18462
|
-
|
|
18463
|
-
|
|
18464
|
-
if (mainCamera == null ? void 0 : mainCamera.deviceId) {
|
|
18465
|
-
return __spreadProps(__spreadValues({}, defaultVideoConstraints), {
|
|
18466
|
-
deviceId: { exact: mainCamera.deviceId }
|
|
18467
|
-
});
|
|
18468
|
-
}
|
|
18243
|
+
if (dir === "back") {
|
|
18244
|
+
const mainCamera = (await getAvailableVideoDevices()).find(isMainBackCamera);
|
|
18245
|
+
if (mainCamera == null ? void 0 : mainCamera.deviceId) {
|
|
18246
|
+
return __spreadProps(__spreadValues({}, defaultVideoConstraints), {
|
|
18247
|
+
deviceId: { exact: mainCamera.deviceId }
|
|
18248
|
+
});
|
|
18469
18249
|
}
|
|
18470
|
-
|
|
18471
|
-
|
|
18472
|
-
return { videoConstraints };
|
|
18250
|
+
}
|
|
18251
|
+
return defaultVideoConstraints;
|
|
18473
18252
|
};
|
|
18474
18253
|
|
|
18475
|
-
// src/
|
|
18254
|
+
// src/common/cameraCapture/overlay/Overlay.tsx
|
|
18476
18255
|
var import_react60 = require("react");
|
|
18477
|
-
var
|
|
18256
|
+
var import_jsx_runtime120 = require("react/jsx-runtime");
|
|
18478
18257
|
var captureButtonHeight = 92;
|
|
18479
18258
|
var reviewButtonsHeight = 120;
|
|
18480
18259
|
var imageHeight = 40;
|
|
@@ -18496,18 +18275,18 @@ function Overlay({ overlay, outline, imageUrl, title, instructions, reviewInstru
|
|
|
18496
18275
|
return () => window.removeEventListener("resize", listener);
|
|
18497
18276
|
});
|
|
18498
18277
|
let helperBoxHeight = (imageUrl ? imageHeight : 0) + (title ? titleHeight : 0) + (instructions ? instructionsHeight : 0);
|
|
18499
|
-
let helperBox = /* @__PURE__ */ (0,
|
|
18500
|
-
imageUrl && /* @__PURE__ */ (0,
|
|
18501
|
-
title && /* @__PURE__ */ (0,
|
|
18502
|
-
instructions && /* @__PURE__ */ (0,
|
|
18278
|
+
let helperBox = /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(import_jsx_runtime120.Fragment, { children: [
|
|
18279
|
+
imageUrl && /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("img", { className: "camera-capture-img", src: imageUrl, alt: "" }),
|
|
18280
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("h4", { className: "camera-capture-title", children: title }),
|
|
18281
|
+
instructions && /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("small", { className: "camera-capture-instructions", children: instructions })
|
|
18503
18282
|
] });
|
|
18504
18283
|
const frameBottomMargin = captureButtonHeight + helperBoxHeight;
|
|
18505
18284
|
if (reviewInstructions) {
|
|
18506
18285
|
helperBoxHeight = frameBottomMargin - reviewButtonsHeight;
|
|
18507
|
-
helperBox = /* @__PURE__ */ (0,
|
|
18286
|
+
helperBox = /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("small", { className: "camera-capture-instructions", children: reviewInstructions });
|
|
18508
18287
|
const frameWithReviewInstructionsMinBottomMargin = reviewButtonsHeight + reviewInstructionsHeight;
|
|
18509
18288
|
if (frameBottomMargin < frameWithReviewInstructionsMinBottomMargin) {
|
|
18510
|
-
helperBox = /* @__PURE__ */ (0,
|
|
18289
|
+
helperBox = /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(import_jsx_runtime120.Fragment, {});
|
|
18511
18290
|
}
|
|
18512
18291
|
}
|
|
18513
18292
|
const framePosition = {
|
|
@@ -18525,19 +18304,31 @@ function Overlay({ overlay, outline, imageUrl, title, instructions, reviewInstru
|
|
|
18525
18304
|
width: "90%"
|
|
18526
18305
|
}
|
|
18527
18306
|
};
|
|
18528
|
-
return /* @__PURE__ */ (0,
|
|
18529
|
-
/* @__PURE__ */ (0,
|
|
18530
|
-
/* @__PURE__ */ (0,
|
|
18531
|
-
/* @__PURE__ */ (0,
|
|
18307
|
+
return /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)("svg", { ref: svgReference, xmlns: "http://www.w3.org/2000/svg", children: [
|
|
18308
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)("mask", { id: "mask", children: [
|
|
18309
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)("rect", { width: "100%", height: "100%", fill: "#fff" }),
|
|
18310
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)("image", __spreadValues({ href: overlay }, framePosition))
|
|
18532
18311
|
] }) }),
|
|
18533
|
-
overlay && /* @__PURE__ */ (0,
|
|
18534
|
-
outline && /* @__PURE__ */ (0,
|
|
18535
|
-
/* @__PURE__ */ (0,
|
|
18312
|
+
overlay && /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("rect", { width: "100%", height: "100%", mask: "url(#mask)", fillOpacity: "0.72" }),
|
|
18313
|
+
outline && /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("image", __spreadValues({ href: outline }, framePosition)),
|
|
18314
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)("foreignObject", { width: "100%", height: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", __spreadProps(__spreadValues({ className: "camera-capture-text-and-image-container" }, helperBoxPosition), { children: helperBox })) })
|
|
18536
18315
|
] });
|
|
18537
18316
|
}
|
|
18538
18317
|
var Overlay_default = Overlay;
|
|
18539
18318
|
|
|
18540
|
-
// src/
|
|
18319
|
+
// src/common/cameraCapture/screens/cameraErrorScreen/CameraErrorScreen.tsx
|
|
18320
|
+
var import_components74 = require("@transferwise/components");
|
|
18321
|
+
var import_jsx_runtime121 = require("react/jsx-runtime");
|
|
18322
|
+
function CameraErrorScreen({ title, description, actionButton, onAction }) {
|
|
18323
|
+
return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("div", { className: "container p-t-5", children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("div", { className: "row", children: /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)("div", { className: "col-md-6 col-md-offset-3", children: [
|
|
18324
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)("h2", { className: "text-xs-center m-b-3", children: title }),
|
|
18325
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)("p", { className: "text-xs-center m-b-5", children: description }),
|
|
18326
|
+
onAction && actionButton && /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(import_components74.Button, { block: true, onClick: onAction, children: actionButton })
|
|
18327
|
+
] }) }) });
|
|
18328
|
+
}
|
|
18329
|
+
var CameraErrorScreen_default = CameraErrorScreen;
|
|
18330
|
+
|
|
18331
|
+
// src/common/cameraCapture/CameraCapture.tsx
|
|
18541
18332
|
var import_jsx_runtime122 = require("react/jsx-runtime");
|
|
18542
18333
|
function CameraCapture({
|
|
18543
18334
|
direction = "back",
|
|
@@ -19212,7 +19003,6 @@ var DynamicFlowComponent = ({
|
|
|
19212
19003
|
setSchemaModel
|
|
19213
19004
|
} = useDynamicFlowState(initialStep);
|
|
19214
19005
|
const [submitted, setSubmitted] = (0, import_react66.useState)(false);
|
|
19215
|
-
const { locale } = (0, import_react_intl40.useIntl)();
|
|
19216
19006
|
const { isLoading, loader, setLoadingState } = useLoader(
|
|
19217
19007
|
loaderConfig,
|
|
19218
19008
|
initialStep ? "idle" : "initial"
|
|
@@ -19250,15 +19040,13 @@ var DynamicFlowComponent = ({
|
|
|
19250
19040
|
const { url, method = "POST" } = action;
|
|
19251
19041
|
return httpClient(url != null ? url : "", {
|
|
19252
19042
|
method,
|
|
19253
|
-
credentials: "include",
|
|
19254
19043
|
headers: __spreadValues({
|
|
19255
|
-
"Content-Type": "application/json"
|
|
19256
|
-
"accept-language": locale
|
|
19044
|
+
"Content-Type": "application/json"
|
|
19257
19045
|
}, etag2 ? { "If-None-Match": etag2 } : {}),
|
|
19258
19046
|
body: method === "GET" ? void 0 : JSON.stringify(data)
|
|
19259
19047
|
});
|
|
19260
19048
|
},
|
|
19261
|
-
[httpClient
|
|
19049
|
+
[httpClient]
|
|
19262
19050
|
);
|
|
19263
19051
|
const performAction = async (action, data = {}) => {
|
|
19264
19052
|
cancelPendingRefreshes();
|