@wise/dynamic-flow-client 3.13.0-experimental-kyc-camera-be63581 → 3.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/main.js +595 -587
- package/build/main.min.js +1 -1
- package/build/main.mjs +576 -568
- package/build/types/common/cameraCapture/CameraCapture.d.ts +4 -3
- package/build/types/common/cameraCapture/hooks/useFullScreenOrientationLock.d.ts +1 -1
- package/build/types/common/cameraCapture/index.d.ts +0 -1
- package/build/types/common/cameraCapture/tracking/index.d.ts +1 -1
- package/build/types/index.d.ts +0 -2
- package/build/types/legacy/dynamic-flow-types.d.ts +1 -1
- package/build/types/legacy/layout/search/useSearch.d.ts +1 -1
- package/build/types/revamp/domain/components/StepDomainComponent.d.ts +4 -6
- package/build/types/revamp/domain/components/TupleComponent.d.ts +12 -0
- package/build/types/revamp/domain/mappers/schema/arraySchemaToComponent/arraySchemaToComponent.d.ts +1 -1
- package/build/types/revamp/domain/mappers/schema/arraySchemaToComponent/arraySchemaToTupleComponent.d.ts +5 -0
- package/build/types/revamp/domain/types.d.ts +3 -2
- package/build/types/revamp/renderers/mappers/tupleComponentToProps.d.ts +4 -0
- package/build/types/revamp/renderers/stepComponentToProps.d.ts +1 -1
- package/build/types/revamp/renderers/types.d.ts +2 -6
- package/build/types/revamp/utils/type-utils.d.ts +1 -0
- package/package.json +2 -2
- package/build/common/cameraCapture/CameraCapture.js +0 -161
- package/build/common/cameraCapture/CameraCapture.messages.js +0 -58
- package/build/common/cameraCapture/CameraCapture.spec.js +0 -460
- package/build/common/cameraCapture/CameraEventHandler.js +0 -1
- package/build/common/cameraCapture/components/bottomBar/BottomBar.js +0 -17
- package/build/common/cameraCapture/components/index.js +0 -3
- package/build/common/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.js +0 -8
- package/build/common/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.messages.js +0 -8
- package/build/common/cameraCapture/hooks/useFullScreenOrientationLock.js +0 -62
- package/build/common/cameraCapture/hooks/useVideoConstraints.js +0 -80
- package/build/common/cameraCapture/index.js +0 -1
- package/build/common/cameraCapture/overlay/Overlay.js +0 -78
- package/build/common/cameraCapture/screens/cameraErrorScreen/CameraErrorScreen.js +0 -7
- package/build/common/cameraCapture/screens/index.js +0 -1
- package/build/common/cameraCapture/tracking/index.js +0 -109
- package/build/common/cameraCapture/types/index.js +0 -7
- package/build/common/cameraCapture/utils/index.js +0 -107
- package/build/common/cameraCapture/utils/mobile-utils.js +0 -23
- package/build/common/cameraCapture/utils/mobile-utils.spec.js +0 -71
- package/build/common/errorBoundary/ErrorBoundary.js +0 -44
- package/build/common/errorBoundary/ErrorBoundaryAlert.js +0 -12
- package/build/common/httpClientContext/HttpClientContext.js +0 -24
- package/build/common/httpClientContext/index.js +0 -1
- package/build/common/makeHttpClient/index.js +0 -1
- package/build/common/makeHttpClient/makeHttpClient.js +0 -30
- package/build/common/makeHttpClient/makeHttpClient.spec.js +0 -140
- package/build/common/messages/external-confirmation.messages.js +0 -23
- package/build/common/messages/generic-error.messages.js +0 -18
- package/build/common/messages/help.messages.js +0 -8
- package/build/common/messages/multi-file-upload.messages.js +0 -18
- package/build/common/messages/multi-select.messages.js +0 -8
- package/build/common/messages/paragraph.messages.js +0 -13
- package/build/common/messages/repeatable.messages.js +0 -23
- package/build/common/messages/validation.array.messages.js +0 -13
- package/build/common/messages/validation.messages.js +0 -53
- package/build/common/utils/api-utils.js +0 -4
- package/build/common/utils/debounce.js +0 -44
- package/build/common/utils/debounce.spec.js +0 -72
- package/build/i18n/index.js +0 -36
- package/build/index.js +0 -12
- package/build/legacy/common/constants/DateMode.js +0 -4
- package/build/legacy/common/constants/FeatureName.js +0 -4
- package/build/legacy/common/constants/FormControlType.js +0 -21
- package/build/legacy/common/constants/MonthFormat.js +0 -4
- package/build/legacy/common/constants/Size.js +0 -7
- package/build/legacy/common/constants/index.js +0 -4
- package/build/legacy/common/contexts/dynamicFlowContexts/DynamicFlowContexts.js +0 -25
- package/build/legacy/common/contexts/dynamicFlowContexts/usePendingPromiseCounter.js +0 -15
- package/build/legacy/common/contexts/dynamicFlowContexts/usePendingPromiseCounter.spec.js +0 -113
- package/build/legacy/common/contexts/eventsContext/EventsContext.js +0 -38
- package/build/legacy/common/contexts/eventsContext/EventsContext.spec.js +0 -47
- package/build/legacy/common/contexts/featureContext/FeatureContext.js +0 -11
- package/build/legacy/common/contexts/featureContext/FeatureContext.spec.js +0 -30
- package/build/legacy/common/contexts/index.js +0 -3
- package/build/legacy/common/contexts/logContext/LogContext.js +0 -44
- package/build/legacy/common/contexts/logContext/LogContext.spec.js +0 -43
- package/build/legacy/common/hooks/index.js +0 -7
- package/build/legacy/common/hooks/useDebouncedFunction/useDebouncedFunction.js +0 -9
- package/build/legacy/common/hooks/useDebouncedFunction/useDebouncedFunction.spec.js +0 -59
- package/build/legacy/common/hooks/useExternal/useExternal.js +0 -15
- package/build/legacy/common/hooks/useExternal/useExternal.spec.js +0 -236
- package/build/legacy/common/hooks/useExternalStepPolling/useExternalStepPolling.js +0 -71
- package/build/legacy/common/hooks/usePersistAsync/usePersistAsync.js +0 -172
- package/build/legacy/common/hooks/usePersistAsync/usePersistAsync.spec.js +0 -221
- package/build/legacy/common/hooks/usePolling/usePolling.js +0 -53
- package/build/legacy/common/hooks/usePolling/usePolling.spec.js +0 -243
- package/build/legacy/common/hooks/usePrevious/usePrevious.js +0 -8
- package/build/legacy/common/hooks/usePrevious/usePrevious.spec.js +0 -66
- package/build/legacy/common/hooks/useStepPolling/useStepPolling.js +0 -45
- package/build/legacy/common/hooks/useStepPolling/useStepPolling.spec.js +0 -288
- package/build/legacy/common/messages.js +0 -8
- package/build/legacy/common/utils/api-utils.js +0 -6
- package/build/legacy/common/utils/date-utils.js +0 -22
- package/build/legacy/common/utils/file-utils.js +0 -45
- package/build/legacy/common/utils/file-utils.spec.js +0 -69
- package/build/legacy/common/utils/id-utils.js +0 -5
- package/build/legacy/common/utils/id-utils.spec.js +0 -12
- package/build/legacy/common/utils/index.js +0 -11
- package/build/legacy/common/utils/is-equal.js +0 -21
- package/build/legacy/common/utils/is-equal.spec.js +0 -88
- package/build/legacy/common/utils/misc-utils.js +0 -4
- package/build/legacy/common/utils/model-utils.js +0 -33
- package/build/legacy/common/utils/schema-utils.js +0 -113
- package/build/legacy/common/utils/step-utils.js +0 -32
- package/build/legacy/common/validators/index.js +0 -5
- package/build/legacy/common/validators/models/model-utils.js +0 -119
- package/build/legacy/common/validators/models/model-utils.spec.js +0 -45
- package/build/legacy/common/validators/models/model-validators.js +0 -62
- package/build/legacy/common/validators/models/model-validators.spec.js +0 -647
- package/build/legacy/common/validators/schemas/schema-validators.js +0 -101
- package/build/legacy/common/validators/schemas/schema-validators.spec.js +0 -157
- package/build/legacy/common/validators/types/type-validators.js +0 -14
- package/build/legacy/common/validators/types/type-validators.spec.js +0 -147
- package/build/legacy/common/validators/validationFailures/validation-failures.js +0 -139
- package/build/legacy/common/validators/validationFailures/validation-failures.spec.js +0 -198
- package/build/legacy/common/validators/validationFailures/validation-failures.utils.js +0 -40
- package/build/legacy/common/validators/validationFailures/validation-failures.utils.spec.js +0 -145
- package/build/legacy/common/validators/values/value-validators.js +0 -6
- package/build/legacy/common/validators/values/value-validators.spec.js +0 -22
- package/build/legacy/dynamic-flow-types.js +0 -1
- package/build/legacy/dynamicFlow/BackButton.js +0 -22
- package/build/legacy/dynamicFlow/DynamicFlow.js +0 -364
- package/build/legacy/dynamicFlow/DynamicFlowStep.js +0 -37
- package/build/legacy/dynamicFlow/DynamicFlowTypes.js +0 -1
- package/build/legacy/dynamicFlow/index.js +0 -1
- package/build/legacy/dynamicFlow/stories/dev-tools/DynamicFlow.story.js +0 -78
- package/build/legacy/dynamicFlow/stories/dev-tools/ErrorResponses.story.js +0 -124
- package/build/legacy/dynamicFlow/stories/dev-tools/Examples.story.js +0 -57
- package/build/legacy/dynamicFlow/stories/dev-tools/Features.story.js +0 -58
- package/build/legacy/dynamicFlow/stories/dev-tools/JsonSchemaForm.story.js +0 -31
- package/build/legacy/dynamicFlow/stories/dev-tools/RefreshOnChange.story.js +0 -194
- package/build/legacy/dynamicFlow/stories/dev-tools/SearchFeature.story.js +0 -263
- package/build/legacy/dynamicFlow/stories/dev-tools/ServerTest.story.js +0 -44
- package/build/legacy/dynamicFlow/stories/dev-tools/Upload.story.js +0 -212
- package/build/legacy/dynamicFlow/stories/dev-tools/ValidationAsync.story.js +0 -156
- package/build/legacy/dynamicFlow/stories/examples/ObjectConst.story.js +0 -150
- package/build/legacy/dynamicFlow/stories/fixtureHttpClient.js +0 -117
- package/build/legacy/dynamicFlow/tests/Actions.spec.js +0 -232
- package/build/legacy/dynamicFlow/tests/AllOfSchema.spec.js +0 -196
- package/build/legacy/dynamicFlow/tests/AutocompleteHints.spec.js +0 -59
- package/build/legacy/dynamicFlow/tests/DynamicFlow.BackButton.spec.js +0 -179
- package/build/legacy/dynamicFlow/tests/DynamicFlow.InitialAction.spec.js +0 -472
- package/build/legacy/dynamicFlow/tests/DynamicFlow.InitialStep.spec.js +0 -749
- package/build/legacy/dynamicFlow/tests/DynamicFlow.LoaderConfig.spec.js +0 -267
- package/build/legacy/dynamicFlow/tests/DynamicFlow.legacy.spec.js +0 -1202
- package/build/legacy/dynamicFlow/tests/DynamicFlow.search.spec.js +0 -475
- package/build/legacy/dynamicFlow/tests/DynamicFlow.spec.js +0 -559
- package/build/legacy/dynamicFlow/tests/DynamicImage.spec.js +0 -287
- package/build/legacy/dynamicFlow/tests/DynamicInstructions.spec.js +0 -49
- package/build/legacy/dynamicFlow/tests/HiddenSchemas.spec.js +0 -307
- package/build/legacy/dynamicFlow/tests/ModalLayout.spec.js +0 -252
- package/build/legacy/dynamicFlow/tests/MultiSelect.spec.js +0 -327
- package/build/legacy/dynamicFlow/tests/MultipleFileUploadSchema.spec.js +0 -401
- package/build/legacy/dynamicFlow/tests/ObjectSchema.spec.js +0 -295
- package/build/legacy/dynamicFlow/tests/OneOfSchema.spec.js +0 -773
- package/build/legacy/dynamicFlow/tests/PersistAsync.blob-schema.spec.js +0 -331
- package/build/legacy/dynamicFlow/tests/PersistAsync.string-schema.spec.js +0 -389
- package/build/legacy/dynamicFlow/tests/RefreshStepOnChange.debouncing.spec.js +0 -391
- package/build/legacy/dynamicFlow/tests/RefreshStepOnChange.spec.js +0 -588
- package/build/legacy/dynamicFlow/tests/RepeatableSchema.spec.js +0 -977
- package/build/legacy/dynamicFlow/tests/StepModel.spec.js +0 -119
- package/build/legacy/dynamicFlow/tests/ValidationAsync.spec.js +0 -484
- package/build/legacy/dynamicFlow/tests/ssr.spec.js +0 -47
- package/build/legacy/dynamicFlow/utils/index.js +0 -5
- package/build/legacy/dynamicFlow/utils/responseParsers/response-parsers.js +0 -185
- package/build/legacy/dynamicFlow/utils/responseParsers/response-parsers.spec.js +0 -463
- package/build/legacy/dynamicFlow/utils/useDebouncedRefresh/useDebouncedRefresh.js +0 -35
- package/build/legacy/dynamicFlow/utils/useDynamicFlowState.js +0 -137
- package/build/legacy/dynamicFlow/utils/useErrorResponse.js +0 -62
- package/build/legacy/dynamicFlow/utils/useLoader.js +0 -22
- package/build/legacy/formControl/FormControl.js +0 -267
- package/build/legacy/formControl/FormControl.spec.js +0 -445
- package/build/legacy/formControl/Select.spec.js +0 -104
- package/build/legacy/formControl/index.js +0 -1
- package/build/legacy/formControl/utils/getAutocompleteString.js +0 -80
- package/build/legacy/formControl/utils/getAutocompleteString.spec.js +0 -30
- package/build/legacy/formControl/utils/index.js +0 -2
- package/build/legacy/formControl/utils/value-utils.js +0 -108
- package/build/legacy/formControl/utils/value-utils.spec.js +0 -158
- package/build/legacy/jsonSchemaForm/JsonSchemaForm.end-to-end.spec.js +0 -534
- package/build/legacy/jsonSchemaForm/JsonSchemaForm.js +0 -24
- package/build/legacy/jsonSchemaForm/JsonSchemaForm.spec.js +0 -77
- package/build/legacy/jsonSchemaForm/allOfSchema/AllOfSchema.js +0 -50
- package/build/legacy/jsonSchemaForm/allOfSchema/index.js +0 -1
- package/build/legacy/jsonSchemaForm/arrayTypeSchema/ArraySchema.js +0 -25
- package/build/legacy/jsonSchemaForm/arrayTypeSchema/ArrayTypeSchema.spec.js +0 -50
- package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/ArrayListSchema.js +0 -34
- package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/index.js +0 -1
- package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multiSelectSchema/MultiSelectSchema.js +0 -86
- package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/MultipleFileUploadSchema.js +0 -141
- package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/index.js +0 -1
- package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/index.js +0 -2
- package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/upload-utils.js +0 -79
- package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/useFormattedDefaultErrorMessages.js +0 -14
- package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/ItemSummary.js +0 -7
- package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/RepeatableSchema.js +0 -134
- package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/RepeatableSchemaStep.js +0 -85
- package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/utils/summary-utils.js +0 -135
- package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/utils/summary-utils.spec.js +0 -909
- package/build/legacy/jsonSchemaForm/arrayTypeSchema/index.js +0 -1
- package/build/legacy/jsonSchemaForm/basicTypeSchema/BasicTypeSchema.errors.spec.js +0 -233
- package/build/legacy/jsonSchemaForm/basicTypeSchema/BasicTypeSchema.js +0 -100
- package/build/legacy/jsonSchemaForm/basicTypeSchema/BasicTypeSchema.spec.js +0 -291
- package/build/legacy/jsonSchemaForm/basicTypeSchema/index.js +0 -1
- package/build/legacy/jsonSchemaForm/controlFeedback/ControlFeedback.js +0 -89
- package/build/legacy/jsonSchemaForm/controlFeedback/ControlFeedback.spec.js +0 -182
- package/build/legacy/jsonSchemaForm/controlFeedback/index.js +0 -1
- package/build/legacy/jsonSchemaForm/genericSchema/GenericSchema.js +0 -85
- package/build/legacy/jsonSchemaForm/genericSchema/GenericSchema.rtl.spec.js +0 -55
- package/build/legacy/jsonSchemaForm/genericSchema/GenericSchema.spec.js +0 -334
- package/build/legacy/jsonSchemaForm/genericSchema/index.js +0 -1
- package/build/legacy/jsonSchemaForm/help/Help.js +0 -9
- package/build/legacy/jsonSchemaForm/help/Help.spec.js +0 -61
- package/build/legacy/jsonSchemaForm/help/index.js +0 -1
- package/build/legacy/jsonSchemaForm/index.js +0 -1
- package/build/legacy/jsonSchemaForm/objectSchema/ObjectSchema.js +0 -77
- package/build/legacy/jsonSchemaForm/objectSchema/index.js +0 -1
- package/build/legacy/jsonSchemaForm/oneOfSchema/OneOfSchema.js +0 -155
- package/build/legacy/jsonSchemaForm/oneOfSchema/index.js +0 -1
- package/build/legacy/jsonSchemaForm/oneOfSchema/utils.js +0 -68
- package/build/legacy/jsonSchemaForm/persistAsyncSchema/PersistAsyncSchema.js +0 -26
- package/build/legacy/jsonSchemaForm/persistAsyncSchema/index.js +0 -1
- package/build/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBasicSchema/PersistAsyncBasicSchema.js +0 -165
- package/build/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBasicSchema/index.js +0 -1
- package/build/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/PersistAsyncBlobSchema.js +0 -131
- package/build/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/UploadInputAdapter.js +0 -31
- package/build/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/UploadInputAdapter.spec.js +0 -243
- package/build/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/index.js +0 -1
- package/build/legacy/jsonSchemaForm/promotedOneOfSchema/PromotedOneOfSchema.js +0 -72
- package/build/legacy/jsonSchemaForm/promotedOneOfSchema/PromotedOneOfSchema.spec.js +0 -420
- package/build/legacy/jsonSchemaForm/promotedOneOfSchema/index.js +0 -1
- package/build/legacy/jsonSchemaForm/promotedOneOfSchema/promoted-one-of-utils.js +0 -8
- package/build/legacy/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfCheckboxControl.js +0 -16
- package/build/legacy/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfCheckboxControl.spec.js +0 -125
- package/build/legacy/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfControl.js +0 -31
- package/build/legacy/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfControl.spec.js +0 -82
- package/build/legacy/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfRadioControl.js +0 -32
- package/build/legacy/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfRadioControl.spec.js +0 -130
- package/build/legacy/jsonSchemaForm/readOnlySchema/ReadOnlySchema.js +0 -54
- package/build/legacy/jsonSchemaForm/readOnlySchema/ReadOnlySchema.messages.js +0 -13
- package/build/legacy/jsonSchemaForm/readOnlySchema/ReadOnlySchema.spec.js +0 -117
- package/build/legacy/jsonSchemaForm/readOnlySchema/index.js +0 -1
- package/build/legacy/jsonSchemaForm/schemaFormControl/SchemaFormControl.js +0 -138
- package/build/legacy/jsonSchemaForm/schemaFormControl/SchemaFormControl.spec.js +0 -312
- package/build/legacy/jsonSchemaForm/schemaFormControl/index.js +0 -1
- package/build/legacy/jsonSchemaForm/schemaFormControl/utils/index.js +0 -1
- package/build/legacy/jsonSchemaForm/schemaFormControl/utils/mapping-utils.js +0 -107
- package/build/legacy/jsonSchemaForm/schemaFormControl/utils/mapping-utils.spec.js +0 -220
- package/build/legacy/jsonSchemaForm/validationAsyncSchema/ValidationAsyncSchema.js +0 -150
- package/build/legacy/jsonSchemaForm/validationAsyncSchema/index.js +0 -1
- package/build/legacy/layout/DynamicLayout.end-to-end.spec.js +0 -71
- package/build/legacy/layout/DynamicLayout.js +0 -68
- package/build/legacy/layout/DynamicLayout.spec.js +0 -243
- package/build/legacy/layout/alert/DynamicAlert.js +0 -29
- package/build/legacy/layout/alert/DynamicAlert.spec.js +0 -42
- package/build/legacy/layout/box/DynamicBox.js +0 -30
- package/build/legacy/layout/box/DynamicBox.spec.js +0 -56
- package/build/legacy/layout/button/DynamicButton.js +0 -16
- package/build/legacy/layout/button/DynamicButton.spec.js +0 -141
- package/build/legacy/layout/button/utils.js +0 -45
- package/build/legacy/layout/button/utils.spec.js +0 -50
- package/build/legacy/layout/columns/DynamicColumns.js +0 -27
- package/build/legacy/layout/columns/DynamicColumns.spec.js +0 -83
- package/build/legacy/layout/decision/DynamicDecision.js +0 -10
- package/build/legacy/layout/decision/DynamicDecision.spec.js +0 -146
- package/build/legacy/layout/divider/DynamicDivider.js +0 -9
- package/build/legacy/layout/divider/DynamicDivider.spec.js +0 -17
- package/build/legacy/layout/external/DynamicExternal.js +0 -32
- package/build/legacy/layout/external/DynamicExternal.messages.js +0 -8
- package/build/legacy/layout/external/DynamicExternal.spec.js +0 -264
- package/build/legacy/layout/form/DynamicForm.js +0 -22
- package/build/legacy/layout/form/DynamicForm.spec.js +0 -74
- package/build/legacy/layout/heading/DynamicHeading.js +0 -40
- package/build/legacy/layout/heading/DynamicHeading.spec.js +0 -14
- package/build/legacy/layout/icon/DynamicIcon.js +0 -17
- package/build/legacy/layout/icon/DynamicIcon.spec.js +0 -20
- package/build/legacy/layout/icon/FlagIcon.js +0 -11
- package/build/legacy/layout/icon/NamedIcon.js +0 -19
- package/build/legacy/layout/image/DynamicImage.js +0 -112
- package/build/legacy/layout/index.js +0 -20
- package/build/legacy/layout/instructions/DynamicInstructions.js +0 -19
- package/build/legacy/layout/list/DynamicStatusList.js +0 -37
- package/build/legacy/layout/list/DynamicStatusList.spec.js +0 -111
- package/build/legacy/layout/loadingIndicator/DynamicLoadingIndicator.js +0 -11
- package/build/legacy/layout/loadingIndicator/DynamicLoadingIndicator.spec.js +0 -25
- package/build/legacy/layout/markdown/DynamicMarkdown.js +0 -12
- package/build/legacy/layout/markdown/DynamicMarkdown.spec.js +0 -58
- package/build/legacy/layout/modal/DynamicModal.js +0 -26
- package/build/legacy/layout/paragraph/DynamicParagraph.js +0 -35
- package/build/legacy/layout/paragraph/DynamicParagraph.spec.js +0 -109
- package/build/legacy/layout/paragraph/useSnackBarIfAvailable.js +0 -9
- package/build/legacy/layout/review/DynamicReview.js +0 -59
- package/build/legacy/layout/review/DynamicReview.spec.js +0 -152
- package/build/legacy/layout/search/DynamicSearch.js +0 -83
- package/build/legacy/layout/search/SearchInput.js +0 -6
- package/build/legacy/layout/search/SearchResults.js +0 -20
- package/build/legacy/layout/search/useSearch.js +0 -150
- package/build/legacy/layout/utils/getNavigationOptionMedia.js +0 -17
- package/build/legacy/layout/utils/index.js +0 -32
- package/build/legacy/step/cameraStep/CameraStep.js +0 -124
- package/build/legacy/step/cameraStep/index.js +0 -1
- package/build/legacy/step/externalConfirmationStep/ExternalConfirmationStep.js +0 -64
- package/build/legacy/step/externalConfirmationStep/index.js +0 -1
- package/build/legacy/step/index.js +0 -3
- package/build/legacy/step/layoutStep/LayoutStep.js +0 -33
- package/build/legacy/step/layoutStep/LayoutStep.spec.js +0 -189
- package/build/legacy/step/layoutStep/index.js +0 -1
- package/build/legacy/step/layoutStep/utils/index.js +0 -2
- package/build/legacy/step/layoutStep/utils/inline-reference-utils.js +0 -105
- package/build/legacy/step/layoutStep/utils/inline-reference-utils.spec.js +0 -296
- package/build/legacy/step/layoutStep/utils/layout-utils.js +0 -212
- package/build/legacy/step/layoutStep/utils/layout-utils.spec.js +0 -558
- package/build/legacy/test-utils/DynamicFlowProviders.js +0 -8
- package/build/legacy/test-utils/index.js +0 -4
- package/build/legacy/test-utils/legacy-utils.js +0 -69
- package/build/legacy/test-utils/log-utils.js +0 -9
- package/build/legacy/visual-tests/generated.story.js +0 -234
- package/build/legacy/visual-tests/layouts.story.js +0 -132
- package/build/legacy/visual-tests/schemas.story.js +0 -108
- package/build/legacy/visual-tests/step.story.js +0 -54
- package/build/revamp/DynamicFlowCore.js +0 -25
- package/build/revamp/DynamicFlowWise.js +0 -32
- package/build/revamp/DynamicFlowWise.spec.js +0 -105
- package/build/revamp/DynamicFragmentWise.js +0 -83
- package/build/revamp/domain/components/AlertComponent.js +0 -50
- package/build/revamp/domain/components/AllOfComponent.js +0 -72
- package/build/revamp/domain/components/BooleanInputComponent.js +0 -109
- package/build/revamp/domain/components/BoxComponent.js +0 -65
- package/build/revamp/domain/components/ButtonComponent.js +0 -50
- package/build/revamp/domain/components/ColumnsComponent.js +0 -74
- package/build/revamp/domain/components/ConstComponent.js +0 -50
- package/build/revamp/domain/components/ContainerComponent.js +0 -65
- package/build/revamp/domain/components/DateInputComponent.js +0 -128
- package/build/revamp/domain/components/DecisionComponent.js +0 -50
- package/build/revamp/domain/components/DividerComponent.js +0 -50
- package/build/revamp/domain/components/FormComponent.js +0 -65
- package/build/revamp/domain/components/HeadingComponent.js +0 -50
- package/build/revamp/domain/components/ImageComponent.js +0 -50
- package/build/revamp/domain/components/InstructionsComponent.js +0 -50
- package/build/revamp/domain/components/IntegerInputComponent.js +0 -129
- package/build/revamp/domain/components/LoadingIndicatorComponent.js +0 -50
- package/build/revamp/domain/components/MarkdownComponent.js +0 -50
- package/build/revamp/domain/components/ModalComponent.js +0 -65
- package/build/revamp/domain/components/MultiSelectInputComponent.js +0 -148
- package/build/revamp/domain/components/MultiUploadInputComponent.js +0 -192
- package/build/revamp/domain/components/NumberInputComponent.js +0 -129
- package/build/revamp/domain/components/ObjectComponent.js +0 -104
- package/build/revamp/domain/components/ParagraphComponent.js +0 -50
- package/build/revamp/domain/components/ReviewComponent.js +0 -50
- package/build/revamp/domain/components/SelectInputComponent.js +0 -140
- package/build/revamp/domain/components/StatusListComponent.js +0 -50
- package/build/revamp/domain/components/StepDomainComponent.js +0 -87
- package/build/revamp/domain/components/TextInputComponent.js +0 -129
- package/build/revamp/domain/components/UploadInputComponent.js +0 -154
- package/build/revamp/domain/components/repeatableComponent/RepeatableComponent.js +0 -150
- package/build/revamp/domain/components/repeatableComponent/RepeatableComponent.spec.js +0 -146
- package/build/revamp/domain/components/searchComponent/SearchComponent.js +0 -111
- package/build/revamp/domain/components/searchComponent/SearchComponent.spec.js +0 -327
- package/build/revamp/domain/components/utils/component-utils.js +0 -18
- package/build/revamp/domain/components/utils/debounce.js +0 -38
- package/build/revamp/domain/components/utils/debounce.spec.js +0 -72
- package/build/revamp/domain/components/utils/file-utils.js +0 -65
- package/build/revamp/domain/components/utils/file-utils.spec.js +0 -81
- package/build/revamp/domain/components/utils/getComponentForLocalValueKey.js +0 -31
- package/build/revamp/domain/components/utils/isPartialLocalValueMatch.js +0 -46
- package/build/revamp/domain/components/utils/isPartialLocalValueMatch.spec.js +0 -125
- package/build/revamp/domain/components/utils/local-value.js +0 -14
- package/build/revamp/domain/features/events.js +0 -1
- package/build/revamp/domain/features/persistAsync/getComponentPersistAsync.js +0 -134
- package/build/revamp/domain/features/persistAsync/getComponentPersistAsync.spec.js +0 -200
- package/build/revamp/domain/features/persistAsync/getInitialPersistedState.js +0 -6
- package/build/revamp/domain/features/persistAsync/getPerformPersistAsync.js +0 -103
- package/build/revamp/domain/features/persistAsync/getPerformPersistAsync.spec.js +0 -280
- package/build/revamp/domain/features/polling/getStepPolling.js +0 -82
- package/build/revamp/domain/features/polling/getStepPolling.spec.js +0 -170
- package/build/revamp/domain/features/refresh/getPerformRefresh.js +0 -16
- package/build/revamp/domain/features/search/getPerformSearchFunction.js +0 -102
- package/build/revamp/domain/features/search/getPerformSearchFunction.spec.js +0 -260
- package/build/revamp/domain/features/summary/summary-utils.js +0 -39
- package/build/revamp/domain/features/summary/summary-utils.spec.js +0 -110
- package/build/revamp/domain/features/utils/http-utils.js +0 -34
- package/build/revamp/domain/features/utils/response-utils.js +0 -9
- package/build/revamp/domain/features/validation/spec-utils.js +0 -16
- package/build/revamp/domain/features/validation/validation-functions.js +0 -12
- package/build/revamp/domain/features/validation/validation-functions.spec.js +0 -110
- package/build/revamp/domain/features/validation/value-checks.js +0 -111
- package/build/revamp/domain/features/validation/value-checks.spec.js +0 -204
- package/build/revamp/domain/features/validationAsync/getComponentValidationAsync.js +0 -95
- package/build/revamp/domain/features/validationAsync/getComponentValidationAsync.spec.js +0 -178
- package/build/revamp/domain/features/validationAsync/getInitialValidationState.js +0 -5
- package/build/revamp/domain/features/validationAsync/getPerformValidationAsync.js +0 -107
- package/build/revamp/domain/features/validationAsync/getPerformValidationAsync.spec.js +0 -266
- package/build/revamp/domain/mappers/layout/alertLayoutToComponent.js +0 -12
- package/build/revamp/domain/mappers/layout/boxLayoutToComponents.js +0 -15
- package/build/revamp/domain/mappers/layout/buttonLayoutToComponent.js +0 -45
- package/build/revamp/domain/mappers/layout/columnsLayoutToComponent.js +0 -18
- package/build/revamp/domain/mappers/layout/decisionLayoutToComponent.js +0 -40
- package/build/revamp/domain/mappers/layout/dividerLayoutToComponent.js +0 -5
- package/build/revamp/domain/mappers/layout/formLayoutToComponent.js +0 -27
- package/build/revamp/domain/mappers/layout/headingLayoutToComponent.js +0 -13
- package/build/revamp/domain/mappers/layout/imageLayoutToComponent.js +0 -12
- package/build/revamp/domain/mappers/layout/infoLayoutToComponent.js +0 -12
- package/build/revamp/domain/mappers/layout/instructionsLayoutToComponent.js +0 -18
- package/build/revamp/domain/mappers/layout/listLayoutToComponent.js +0 -30
- package/build/revamp/domain/mappers/layout/loadingIndicatorLayoutToComponent.js +0 -5
- package/build/revamp/domain/mappers/layout/markdownLayoutToComponent.js +0 -12
- package/build/revamp/domain/mappers/layout/modalLayoutToComponent.js +0 -17
- package/build/revamp/domain/mappers/layout/paragraphLayoutToComponent.js +0 -12
- package/build/revamp/domain/mappers/layout/reviewLayoutToComponent.js +0 -51
- package/build/revamp/domain/mappers/layout/searchLayoutToComponent.js +0 -14
- package/build/revamp/domain/mappers/layout/statusListLayoutToComponent.js +0 -11
- package/build/revamp/domain/mappers/mapLayoutToComponent.js +0 -63
- package/build/revamp/domain/mappers/mapSchemaToComponent.js +0 -84
- package/build/revamp/domain/mappers/mapSchemaToComponent.spec.js +0 -197
- package/build/revamp/domain/mappers/mapStepToComponent.js +0 -146
- package/build/revamp/domain/mappers/mapStepToComponent.spec.js +0 -162
- package/build/revamp/domain/mappers/mapUnreferencedSchemas.js +0 -44
- package/build/revamp/domain/mappers/schema/allOfSchemaToComponent.js +0 -29
- package/build/revamp/domain/mappers/schema/arraySchemaToComponent/arraySchemaToComponent.js +0 -42
- package/build/revamp/domain/mappers/schema/arraySchemaToComponent/arraySchemaToMultiSelectComponent.js +0 -54
- package/build/revamp/domain/mappers/schema/arraySchemaToComponent/arraySchemaToMultiUploadComponent.js +0 -64
- package/build/revamp/domain/mappers/schema/arraySchemaToComponent/arraySchemaToRepeatableComponent.js +0 -66
- package/build/revamp/domain/mappers/schema/blobSchemaToComponent.js +0 -30
- package/build/revamp/domain/mappers/schema/booleanSchemaToComponent.js +0 -38
- package/build/revamp/domain/mappers/schema/constSchemaToComponent.js +0 -14
- package/build/revamp/domain/mappers/schema/integerSchemaToComponent.js +0 -36
- package/build/revamp/domain/mappers/schema/numberSchemaToComponent.js +0 -35
- package/build/revamp/domain/mappers/schema/objectSchemaToComponent/objectSchemaToComponent.js +0 -60
- package/build/revamp/domain/mappers/schema/objectSchemaToComponent/objectSchemaToComponent.spec.js +0 -165
- package/build/revamp/domain/mappers/schema/oneOfSchemaToComponent/oneOfSchemaToComponent.js +0 -67
- package/build/revamp/domain/mappers/schema/oneOfSchemaToComponent/oneOfSchemaToComponent.spec.js +0 -316
- package/build/revamp/domain/mappers/schema/stringSchemaToComponent/stringSchemaToComponent.js +0 -14
- package/build/revamp/domain/mappers/schema/stringSchemaToComponent/stringSchemaToComponent.spec.js +0 -220
- package/build/revamp/domain/mappers/schema/stringSchemaToComponent/stringSchemaToDateInputComponent.js +0 -37
- package/build/revamp/domain/mappers/schema/stringSchemaToComponent/stringSchemaToTextInputComponent.js +0 -45
- package/build/revamp/domain/mappers/schema/stringSchemaToComponent/stringSchemaToUploadInputComponent.js +0 -37
- package/build/revamp/domain/mappers/schema/tests/test-utils.js +0 -27
- package/build/revamp/domain/mappers/schema/types.js +0 -1
- package/build/revamp/domain/mappers/schema/utils/getPersistAsyncInitialState.js +0 -35
- package/build/revamp/domain/mappers/schema/utils/getValidationAsyncInitialState.js +0 -25
- package/build/revamp/domain/mappers/schema/utils/mapCommonSchemaProps.js +0 -28
- package/build/revamp/domain/mappers/types.js +0 -1
- package/build/revamp/domain/mappers/utils/getAutocompleteString.js +0 -76
- package/build/revamp/domain/mappers/utils/getAutocompleteString.spec.js +0 -21
- package/build/revamp/domain/mappers/utils/getRandomId.js +0 -2
- package/build/revamp/domain/mappers/utils/inlineAction.js +0 -23
- package/build/revamp/domain/mappers/utils/legacy-utils.js +0 -53
- package/build/revamp/domain/types.js +0 -1
- package/build/revamp/flow/executeRefresh.js +0 -97
- package/build/revamp/flow/executeSubmission.js +0 -160
- package/build/revamp/flow/getResponseType.js +0 -76
- package/build/revamp/flow/response-utils.js +0 -92
- package/build/revamp/renderers/CoreContainerRenderer.js +0 -8
- package/build/revamp/renderers/getRenderFunction.js +0 -62
- package/build/revamp/renderers/getSchemaErrorMessageFunction.js +0 -90
- package/build/revamp/renderers/mappers/alertComponentToProps.js +0 -4
- package/build/revamp/renderers/mappers/allOfComponentToProps.js +0 -11
- package/build/revamp/renderers/mappers/booleanInputComponentToProps.js +0 -16
- package/build/revamp/renderers/mappers/boxComponentToProps.js +0 -4
- package/build/revamp/renderers/mappers/buttonComponentToProps.js +0 -14
- package/build/revamp/renderers/mappers/columnsComponentToProps.js +0 -4
- package/build/revamp/renderers/mappers/componentToRendererProps.js +0 -108
- package/build/revamp/renderers/mappers/containerComponentToProps.js +0 -4
- package/build/revamp/renderers/mappers/dateInputComponentToProps.js +0 -13
- package/build/revamp/renderers/mappers/decisionComponentToProps.js +0 -4
- package/build/revamp/renderers/mappers/dividerComponentToProps.js +0 -4
- package/build/revamp/renderers/mappers/formComponentToProps.js +0 -4
- package/build/revamp/renderers/mappers/headingComponentToProps.js +0 -11
- package/build/revamp/renderers/mappers/hiddenComponentToProps.js +0 -3
- package/build/revamp/renderers/mappers/imageComponentToProps.js +0 -11
- package/build/revamp/renderers/mappers/instructionsComponentToProps.js +0 -10
- package/build/revamp/renderers/mappers/integerInputComponentToProps.js +0 -13
- package/build/revamp/renderers/mappers/loadingIndicatorComponentToProps.js +0 -9
- package/build/revamp/renderers/mappers/markdownComponentToProps.js +0 -10
- package/build/revamp/renderers/mappers/modalComponentToProps.js +0 -10
- package/build/revamp/renderers/mappers/multiSelectComponentToProps.js +0 -28
- package/build/revamp/renderers/mappers/multiUploadInputComponentToProps.js +0 -24
- package/build/revamp/renderers/mappers/numberInputComponentToProps.js +0 -13
- package/build/revamp/renderers/mappers/objectComponentToProps.js +0 -11
- package/build/revamp/renderers/mappers/paragraphComponentToProps.js +0 -10
- package/build/revamp/renderers/mappers/repeatableComponentToProps.js +0 -40
- package/build/revamp/renderers/mappers/reviewComponentToProps.js +0 -11
- package/build/revamp/renderers/mappers/searchComponentToProps.js +0 -53
- package/build/revamp/renderers/mappers/selectInputComponentToProps.js +0 -29
- package/build/revamp/renderers/mappers/statusListComponentToProps.js +0 -10
- package/build/revamp/renderers/mappers/textInputComponentToProps.js +0 -13
- package/build/revamp/renderers/mappers/uploadInputComponentToProps.js +0 -16
- package/build/revamp/renderers/mappers/utils/inputComponentToProps.js +0 -27
- package/build/revamp/renderers/stepComponentToProps.js +0 -16
- package/build/revamp/renderers/types.js +0 -1
- package/build/revamp/stories/dev-tools/ActionResponse.story.js +0 -101
- package/build/revamp/stories/dev-tools/DynamicFlowRevamp.story.js +0 -314
- package/build/revamp/stories/dev-tools/EditableStep.story.js +0 -73
- package/build/revamp/stories/dev-tools/ErrorHandling.story.js +0 -149
- package/build/revamp/stories/dev-tools/External.story.js +0 -83
- package/build/revamp/stories/dev-tools/OneOf.Inititalisation.story.js +0 -123
- package/build/revamp/stories/dev-tools/PersistAsync.story.js +0 -168
- package/build/revamp/stories/dev-tools/Polling.story.js +0 -79
- package/build/revamp/stories/dev-tools/RefreshOnChange.story.js +0 -309
- package/build/revamp/stories/dev-tools/RefreshOnChange.with.PersistAsync.story.js +0 -1004
- package/build/revamp/stories/dev-tools/SearchFeature.story.js +0 -263
- package/build/revamp/stories/dev-tools/ServerTest.story.js +0 -86
- package/build/revamp/stories/dev-tools/Upload.story.js +0 -221
- package/build/revamp/stories/dev-tools/ValidationAsync.story.js +0 -161
- package/build/revamp/stories/examples/KYCCameraStep.story.js +0 -84
- package/build/revamp/stories/examples/ObjectConst.story.js +0 -153
- package/build/revamp/stories/examples/OneOfInitialisation.story.js +0 -102
- package/build/revamp/stories/utils/fixtureHttpClient.js +0 -130
- package/build/revamp/stories/utils/mockSearchHandler.js +0 -125
- package/build/revamp/test-utils/component-utils.js +0 -19
- package/build/revamp/test-utils/step-utils.js +0 -6
- package/build/revamp/tests/ImageRenderer.spec.js +0 -108
- package/build/revamp/tests/InitialAction.spec.js +0 -299
- package/build/revamp/tests/InitialStep.spec.js +0 -226
- package/build/revamp/tests/Logging.spec.js +0 -112
- package/build/revamp/tests/OneOfInitialisation.spec.js +0 -889
- package/build/revamp/tests/Polling.spec.js +0 -611
- package/build/revamp/tests/RefreshOnChange.ResponseHandling.spec.js +0 -322
- package/build/revamp/tests/RefreshOnChange.with.Segmented.spec.js +0 -447
- package/build/revamp/tests/RefreshOnChange.with.Tabs.spec.js +0 -447
- package/build/revamp/tests/RefreshOnChangePreserve.spec.js +0 -341
- package/build/revamp/tests/Rerendering.spec.js +0 -156
- package/build/revamp/tests/SegmentedControl.spec.js +0 -48
- package/build/revamp/tests/Submission.ResponseHandling.spec.js +0 -697
- package/build/revamp/tests/Submission.spec.js +0 -590
- package/build/revamp/tests/legacy/Actions.spec.js +0 -242
- package/build/revamp/tests/legacy/BackButton.spec.js +0 -189
- package/build/revamp/tests/legacy/HiddenSchemas.spec.js +0 -312
- package/build/revamp/tests/legacy/MultiSelect.spec.js +0 -753
- package/build/revamp/tests/legacy/MultipleFileUploadSchema.spec.js +0 -447
- package/build/revamp/tests/legacy/PersistAsync.blob-schema.spec.js +0 -339
- package/build/revamp/tests/legacy/PersistAsync.string-schema.spec.js +0 -385
- package/build/revamp/tests/legacy/RefreshStepOnChange.debouncing.spec.js +0 -352
- package/build/revamp/tests/legacy/RefreshStepOnChange.spec.js +0 -638
- package/build/revamp/tests/legacy/Search.spec.js +0 -501
- package/build/revamp/tests/legacy/ValidationAsync.spec.js +0 -452
- package/build/revamp/tests/legacy/useExternal.spec.js +0 -235
- package/build/revamp/types.js +0 -1
- package/build/revamp/useDynamicFlowCore.js +0 -298
- package/build/revamp/utils/component-utils.js +0 -86
- package/build/revamp/utils/component-utils.spec.js +0 -385
- package/build/revamp/utils/findComponent.js +0 -29
- package/build/revamp/utils/findComponent.spec.js +0 -92
- package/build/revamp/utils/type-utils.js +0 -59
- package/build/revamp/utils/type-validators.js +0 -16
- package/build/revamp/utils/type-validators.spec.js +0 -163
- package/build/revamp/utils/useStableCallback.js +0 -21
- package/build/revamp/visual-tests/generated.story.js +0 -234
- package/build/revamp/visual-tests/layouts.story.js +0 -132
- package/build/revamp/visual-tests/schemas.story.js +0 -108
- package/build/revamp/visual-tests/step.story.js +0 -54
- package/build/revamp/wise/renderers/AlertRenderer.js +0 -11
- package/build/revamp/wise/renderers/BooleanInputRenderer.js +0 -34
- package/build/revamp/wise/renderers/BoxRenderer.js +0 -19
- package/build/revamp/wise/renderers/ButtonRenderer.js +0 -53
- package/build/revamp/wise/renderers/ColumnsRenderer.js +0 -14
- package/build/revamp/wise/renderers/DateInputRenderer.js +0 -35
- package/build/revamp/wise/renderers/DecisionRenderer.js +0 -18
- package/build/revamp/wise/renderers/DividerRenderer.js +0 -10
- package/build/revamp/wise/renderers/FormRenderer.js +0 -10
- package/build/revamp/wise/renderers/FormSectionRenderer.js +0 -16
- package/build/revamp/wise/renderers/HeadingRenderer.js +0 -57
- package/build/revamp/wise/renderers/ImageRenderer.js +0 -112
- package/build/revamp/wise/renderers/InstructionsRenderer.js +0 -23
- package/build/revamp/wise/renderers/IntegerInputRenderer.js +0 -38
- package/build/revamp/wise/renderers/LoadingIndicatorRenderer.js +0 -11
- package/build/revamp/wise/renderers/MarkdownRenderer.js +0 -11
- package/build/revamp/wise/renderers/ModalRenderer.js +0 -25
- package/build/revamp/wise/renderers/MultiSelectInputRenderer.js +0 -84
- package/build/revamp/wise/renderers/MultiUploadInputRenderer.js +0 -63
- package/build/revamp/wise/renderers/NumberInputRenderer.js +0 -38
- package/build/revamp/wise/renderers/ParagraphRenderer.js +0 -45
- package/build/revamp/wise/renderers/RepeatableRenderer.js +0 -58
- package/build/revamp/wise/renderers/ReviewRenderer.js +0 -50
- package/build/revamp/wise/renderers/SearchRenderer/BlockSearchRendererComponent.js +0 -59
- package/build/revamp/wise/renderers/SearchRenderer/ErrorResult.js +0 -11
- package/build/revamp/wise/renderers/SearchRenderer/InlineSearchRendererComponent.js +0 -63
- package/build/revamp/wise/renderers/SearchRenderer/SearchRenderer.js +0 -21
- package/build/revamp/wise/renderers/SelectInputRenderer/OptionMedia.js +0 -16
- package/build/revamp/wise/renderers/SelectInputRenderer/RadioInputRendererComponent.js +0 -14
- package/build/revamp/wise/renderers/SelectInputRenderer/RadioInputRendererComponent.spec.js +0 -76
- package/build/revamp/wise/renderers/SelectInputRenderer/SegmentedInputRendererComponent.js +0 -21
- package/build/revamp/wise/renderers/SelectInputRenderer/SelectInputRenderer.js +0 -33
- package/build/revamp/wise/renderers/SelectInputRenderer/SelectInputRendererComponent.js +0 -56
- package/build/revamp/wise/renderers/SelectInputRenderer/SelectTriggerMedia.js +0 -16
- package/build/revamp/wise/renderers/SelectInputRenderer/TabInputRendererComponent.js +0 -22
- package/build/revamp/wise/renderers/StatusListRenderer.js +0 -21
- package/build/revamp/wise/renderers/TextInputRenderer.js +0 -35
- package/build/revamp/wise/renderers/UploadInputRenderer.js +0 -136
- package/build/revamp/wise/renderers/components/FieldInput.js +0 -9
- package/build/revamp/wise/renderers/components/Help.js +0 -10
- package/build/revamp/wise/renderers/components/LabelContentWithHelp.js +0 -6
- package/build/revamp/wise/renderers/components/UploadFieldInput.js +0 -14
- package/build/revamp/wise/renderers/components/VariableDateInput.js +0 -36
- package/build/revamp/wise/renderers/components/VariableTextInput.js +0 -69
- package/build/revamp/wise/renderers/components/icon/DynamicIcon.js +0 -17
- package/build/revamp/wise/renderers/components/icon/FlagIcon.js +0 -11
- package/build/revamp/wise/renderers/components/icon/NamedIcon.js +0 -19
- package/build/revamp/wise/renderers/components/icon/NavigationOptionMedia.js +0 -20
- package/build/revamp/wise/renderers/getWiseRenderers.js +0 -61
- package/build/revamp/wise/renderers/hooks/useSnackBarIfAvailable.js +0 -6
- package/build/revamp/wise/renderers/step/BackButton.js +0 -11
- package/build/revamp/wise/renderers/step/ExternalConfirmationDialog.js +0 -20
- package/build/revamp/wise/renderers/step/KYCCameraStepRenderer.js +0 -144
- package/build/revamp/wise/renderers/step/StepRenderer.js +0 -31
- package/build/revamp/wise/renderers/step/StepRendererContext.js +0 -11
- package/build/revamp/wise/renderers/step/useExternal.js +0 -15
- package/build/revamp/wise/renderers/utils/file-utils.js +0 -70
- package/build/revamp/wise/renderers/utils/getRandomId.js +0 -2
- package/build/revamp/wise/renderers/utils/input-utils.js +0 -6
- package/build/revamp/wise/renderers/utils/layout-utils.js +0 -31
- package/build/revamp/wise/renderers/utils/value-utils.js +0 -23
- package/build/revamp/wise/renderers/utils/value-utils.spec.js +0 -33
- package/build/revamp/wise/renderers/validators/type-validators.js +0 -15
- package/build/test-utils/NeptuneProviders.js +0 -23
- package/build/test-utils/fetch-utils.js +0 -104
- package/build/test-utils/index.js +0 -2
- package/build/test-utils/rtl-utils.js +0 -20
- package/build/types/common/cameraCapture/CameraEventHandler.d.ts +0 -2
- package/build/types/revamp/wise/renderers/step/KYCCameraStepRenderer.d.ts +0 -2
package/build/main.js
CHANGED
|
@@ -291,7 +291,6 @@ __export(src_exports, {
|
|
|
291
291
|
DynamicFlowRevamp: () => DynamicFlowWise_default,
|
|
292
292
|
DynamicFragmentWise: () => DynamicFragmentWise_default,
|
|
293
293
|
JsonSchemaForm: () => JsonSchemaForm_default,
|
|
294
|
-
KYCCameraStepRenderer: () => KYCCameraStepRenderer,
|
|
295
294
|
Layout: () => DynamicLayout_default,
|
|
296
295
|
convertStepToLayout: () => convertStepToLayout,
|
|
297
296
|
inlineReferences: () => inlineReferences,
|
|
@@ -1287,33 +1286,22 @@ var isObjectSchema = (schema) => "type" in schema && schema.type === "object";
|
|
|
1287
1286
|
var isOneOfSchema = (schema) => "oneOf" in schema && !isNullish(schema.oneOf);
|
|
1288
1287
|
var isArraySchema = (schema) => "items" in schema && !isNullish(schema.items);
|
|
1289
1288
|
var isArrayListSchema = (schema) => "items" in schema && isObject(schema.items) && !isArray(schema.items);
|
|
1289
|
+
var isArrayTupleSchema = (schema) => "items" in schema && !isObject(schema.items) && isArray(schema.items);
|
|
1290
1290
|
var isStringSchema = (schema) => "type" in schema && schema.type === "string";
|
|
1291
1291
|
var isStringSchemaWithUpload = (schema) => isStringSchema(schema) && schema.format === "base64url";
|
|
1292
1292
|
var isSchemaWithPersistAsync = (schema) => "persistAsync" in schema && !isNullish(schema.persistAsync);
|
|
1293
1293
|
|
|
1294
1294
|
// src/revamp/renderers/stepComponentToProps.ts
|
|
1295
|
-
var stepComponentToProps = ({
|
|
1296
|
-
back,
|
|
1297
|
-
description,
|
|
1298
|
-
error,
|
|
1299
|
-
external,
|
|
1300
|
-
loadingState,
|
|
1301
|
-
step,
|
|
1302
|
-
title,
|
|
1303
|
-
trackEvent,
|
|
1304
|
-
onAction
|
|
1305
|
-
}, children) => ({
|
|
1295
|
+
var stepComponentToProps = ({ back, description, error, external, loadingState, title, trackEvent }, children) => ({
|
|
1306
1296
|
type: "step",
|
|
1307
1297
|
back,
|
|
1308
1298
|
description,
|
|
1309
1299
|
error,
|
|
1310
1300
|
external,
|
|
1311
1301
|
loadingState,
|
|
1312
|
-
step,
|
|
1313
1302
|
title,
|
|
1314
|
-
children,
|
|
1315
1303
|
trackEvent,
|
|
1316
|
-
|
|
1304
|
+
children
|
|
1317
1305
|
});
|
|
1318
1306
|
|
|
1319
1307
|
// src/revamp/renderers/mappers/alertComponentToProps.ts
|
|
@@ -1744,6 +1732,16 @@ var uploadInputComponentToProps = (component) => {
|
|
|
1744
1732
|
});
|
|
1745
1733
|
};
|
|
1746
1734
|
|
|
1735
|
+
// src/revamp/renderers/mappers/tupleComponentToProps.ts
|
|
1736
|
+
var tupleComponentToProps = ({ control, description, help, title }, children) => ({
|
|
1737
|
+
type: "form-section",
|
|
1738
|
+
children,
|
|
1739
|
+
control,
|
|
1740
|
+
description,
|
|
1741
|
+
help,
|
|
1742
|
+
title
|
|
1743
|
+
});
|
|
1744
|
+
|
|
1747
1745
|
// src/revamp/renderers/mappers/componentToRendererProps.ts
|
|
1748
1746
|
var componentToRendererProps = (component, nestedContent) => {
|
|
1749
1747
|
const { children, startChildren, endChildren, editableItemChildren } = nestedContent;
|
|
@@ -1813,6 +1811,8 @@ var componentToRendererProps = (component, nestedContent) => {
|
|
|
1813
1811
|
return statusListComponentToProps(component);
|
|
1814
1812
|
case "text":
|
|
1815
1813
|
return textInputComponentToProps(component);
|
|
1814
|
+
case "tuple":
|
|
1815
|
+
return tupleComponentToProps(component, children);
|
|
1816
1816
|
case "upload":
|
|
1817
1817
|
return uploadInputComponentToProps(component);
|
|
1818
1818
|
default:
|
|
@@ -1828,14 +1828,12 @@ var getRenderFunction = (renderers) => {
|
|
|
1828
1828
|
if (type === "hidden") {
|
|
1829
1829
|
return null;
|
|
1830
1830
|
}
|
|
1831
|
-
const renderer = renderers.find(
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
}
|
|
1838
|
-
});
|
|
1831
|
+
const renderer = renderers.find(
|
|
1832
|
+
({ canRenderType, canRender = () => true }) => (
|
|
1833
|
+
// once the type is matched, we know the props are of the correct type
|
|
1834
|
+
canRenderType === type && canRender(props)
|
|
1835
|
+
)
|
|
1836
|
+
);
|
|
1839
1837
|
if (!renderer) {
|
|
1840
1838
|
throw new Error(`Could not find a renderer for ${type}`);
|
|
1841
1839
|
}
|
|
@@ -5697,13 +5695,21 @@ var z = /* @__PURE__ */ Object.freeze({
|
|
|
5697
5695
|
quotelessJson,
|
|
5698
5696
|
ZodError
|
|
5699
5697
|
});
|
|
5700
|
-
var
|
|
5701
|
-
z.
|
|
5702
|
-
z.
|
|
5703
|
-
z.
|
|
5704
|
-
|
|
5705
|
-
|
|
5698
|
+
var imageSchema = z.object({
|
|
5699
|
+
text: z.string().optional(),
|
|
5700
|
+
url: z.string(),
|
|
5701
|
+
accessibilityDescription: z.string().optional()
|
|
5702
|
+
});
|
|
5703
|
+
var httpMethodSchema = z.union([
|
|
5704
|
+
z.literal("GET"),
|
|
5705
|
+
z.literal("POST"),
|
|
5706
|
+
z.literal("PUT"),
|
|
5707
|
+
z.literal("PATCH"),
|
|
5708
|
+
z.literal("DELETE")
|
|
5706
5709
|
]);
|
|
5710
|
+
var iconNamedSchema = z.object({
|
|
5711
|
+
name: z.string()
|
|
5712
|
+
});
|
|
5707
5713
|
var contextSchema = z.union([
|
|
5708
5714
|
z.literal("positive"),
|
|
5709
5715
|
z.literal("neutral"),
|
|
@@ -5714,114 +5720,18 @@ var contextSchema = z.union([
|
|
|
5714
5720
|
z.literal("info"),
|
|
5715
5721
|
z.literal("primary")
|
|
5716
5722
|
]);
|
|
5717
|
-
var
|
|
5718
|
-
z.
|
|
5719
|
-
z.literal("left"),
|
|
5720
|
-
z.literal("right")
|
|
5721
|
-
]);
|
|
5722
|
-
var statusListLayoutStatusSchema = z.union([
|
|
5723
|
-
z.literal("not-done"),
|
|
5724
|
-
z.literal("pending"),
|
|
5725
|
-
z.literal("done")
|
|
5726
|
-
]);
|
|
5727
|
-
var alignSchema = z.union([z.literal("left"), z.literal("center"), z.literal("right")]);
|
|
5728
|
-
var formLayoutSchemaReferenceSchema = z.object({
|
|
5729
|
-
$ref: z.string()
|
|
5730
|
-
});
|
|
5731
|
-
var modalLayoutTriggerSchema = z.object({
|
|
5732
|
-
title: z.string()
|
|
5733
|
-
});
|
|
5734
|
-
var httpMethodSchema = z.union([
|
|
5735
|
-
z.literal("GET"),
|
|
5736
|
-
z.literal("POST"),
|
|
5737
|
-
z.literal("PUT"),
|
|
5738
|
-
z.literal("PATCH"),
|
|
5739
|
-
z.literal("DELETE")
|
|
5740
|
-
]);
|
|
5741
|
-
var dividerLayoutSchema = z.object({
|
|
5742
|
-
type: z.literal("divider"),
|
|
5743
|
-
control: z.string().optional(),
|
|
5744
|
-
margin: sizeSchema.optional()
|
|
5723
|
+
var iconTextSchema = z.object({
|
|
5724
|
+
text: z.string()
|
|
5745
5725
|
});
|
|
5746
|
-
var
|
|
5747
|
-
z.literal("
|
|
5748
|
-
z.literal("
|
|
5749
|
-
z.literal("
|
|
5726
|
+
var sizeSchema = z.union([
|
|
5727
|
+
z.literal("xs"),
|
|
5728
|
+
z.literal("sm"),
|
|
5729
|
+
z.literal("md"),
|
|
5730
|
+
z.literal("lg"),
|
|
5731
|
+
z.literal("xl")
|
|
5750
5732
|
]);
|
|
5751
|
-
var
|
|
5752
|
-
|
|
5753
|
-
text: z.string(),
|
|
5754
|
-
size: sizeSchema.optional(),
|
|
5755
|
-
align: alignSchema.optional(),
|
|
5756
|
-
control: z.string().optional(),
|
|
5757
|
-
margin: sizeSchema.optional()
|
|
5758
|
-
});
|
|
5759
|
-
var alertLayoutSchema = z.object({
|
|
5760
|
-
type: z.literal("alert"),
|
|
5761
|
-
markdown: z.string(),
|
|
5762
|
-
context: contextSchema.optional(),
|
|
5763
|
-
control: z.string().optional(),
|
|
5764
|
-
margin: sizeSchema.optional()
|
|
5765
|
-
});
|
|
5766
|
-
var formLayoutSchema = z.object({
|
|
5767
|
-
type: z.literal("form"),
|
|
5768
|
-
schema: formLayoutSchemaReferenceSchema.optional(),
|
|
5769
|
-
schemaId: z.string(),
|
|
5770
|
-
control: z.string().optional(),
|
|
5771
|
-
margin: sizeSchema.optional()
|
|
5772
|
-
});
|
|
5773
|
-
var imageLayoutSchema = z.object({
|
|
5774
|
-
type: z.literal("image"),
|
|
5775
|
-
text: z.string().optional(),
|
|
5776
|
-
url: z.string(),
|
|
5777
|
-
size: sizeSchema.optional(),
|
|
5778
|
-
accessibilityDescription: z.string().optional(),
|
|
5779
|
-
control: z.string().optional(),
|
|
5780
|
-
margin: sizeSchema.optional()
|
|
5781
|
-
});
|
|
5782
|
-
var infoLayoutSchema = z.object({
|
|
5783
|
-
type: z.literal("info"),
|
|
5784
|
-
markdown: z.string(),
|
|
5785
|
-
align: alignSchema.optional(),
|
|
5786
|
-
control: z.string().optional(),
|
|
5787
|
-
margin: sizeSchema.optional()
|
|
5788
|
-
});
|
|
5789
|
-
var loadingIndicatorLayoutSchema = z.object({
|
|
5790
|
-
type: z.literal("loading-indicator"),
|
|
5791
|
-
size: sizeSchema.optional(),
|
|
5792
|
-
control: z.string().optional(),
|
|
5793
|
-
margin: sizeSchema.optional()
|
|
5794
|
-
});
|
|
5795
|
-
var paragraphLayoutSchema = z.object({
|
|
5796
|
-
type: z.literal("paragraph"),
|
|
5797
|
-
text: z.string(),
|
|
5798
|
-
align: alignSchema.optional(),
|
|
5799
|
-
control: z.string().optional(),
|
|
5800
|
-
margin: sizeSchema.optional()
|
|
5801
|
-
});
|
|
5802
|
-
var instructionsLayoutItemSchema = z.object({
|
|
5803
|
-
text: z.string(),
|
|
5804
|
-
context: contextSchema
|
|
5805
|
-
});
|
|
5806
|
-
var helpSchema = z.object({
|
|
5807
|
-
markdown: z.string()
|
|
5808
|
-
});
|
|
5809
|
-
var imageSchema = z.object({
|
|
5810
|
-
text: z.string().optional(),
|
|
5811
|
-
url: z.string(),
|
|
5812
|
-
accessibilityDescription: z.string().optional()
|
|
5813
|
-
});
|
|
5814
|
-
var summaryProviderSchema = z.object({
|
|
5815
|
-
providesTitle: z.boolean().optional(),
|
|
5816
|
-
providesDescription: z.boolean().optional(),
|
|
5817
|
-
providesIcon: z.boolean().optional(),
|
|
5818
|
-
providesImage: z.boolean().optional()
|
|
5819
|
-
});
|
|
5820
|
-
var validateAsyncSchema = z.object({
|
|
5821
|
-
param: z.string(),
|
|
5822
|
-
method: httpMethodSchema,
|
|
5823
|
-
url: z.string()
|
|
5824
|
-
});
|
|
5733
|
+
var alignSchema = z.union([z.literal("left"), z.literal("center"), z.literal("right")]);
|
|
5734
|
+
var iconSchema = z.union([iconNamedSchema, iconTextSchema]);
|
|
5825
5735
|
var autocompleteTokenSchema = z.union([
|
|
5826
5736
|
z.literal("on"),
|
|
5827
5737
|
z.literal("name"),
|
|
@@ -5887,84 +5797,59 @@ var autocompleteTokenSchema = z.union([
|
|
|
5887
5797
|
z.literal("fax"),
|
|
5888
5798
|
z.literal("pager")
|
|
5889
5799
|
]);
|
|
5890
|
-
var
|
|
5891
|
-
z.literal("
|
|
5892
|
-
|
|
5893
|
-
z.
|
|
5894
|
-
|
|
5895
|
-
z.literal("phone-number"),
|
|
5896
|
-
z.literal("base64url")
|
|
5897
|
-
]);
|
|
5898
|
-
var jsonElementSchema = z.lazy(
|
|
5899
|
-
() => z.union([
|
|
5900
|
-
z.string(),
|
|
5901
|
-
z.number(),
|
|
5902
|
-
z.boolean(),
|
|
5903
|
-
z.record(jsonElementSchema),
|
|
5904
|
-
z.array(jsonElementSchema)
|
|
5905
|
-
]).nullable()
|
|
5906
|
-
);
|
|
5907
|
-
var uploadSourceSchema = z.union([z.literal("camera"), z.literal("file")]);
|
|
5908
|
-
var externalSchema = z.object({
|
|
5909
|
-
url: z.string()
|
|
5800
|
+
var loadingIndicatorLayoutSchema = z.object({
|
|
5801
|
+
type: z.literal("loading-indicator"),
|
|
5802
|
+
size: sizeSchema.optional(),
|
|
5803
|
+
control: z.string().optional(),
|
|
5804
|
+
margin: sizeSchema.optional()
|
|
5910
5805
|
});
|
|
5911
|
-
var
|
|
5912
|
-
|
|
5913
|
-
|
|
5806
|
+
var alertLayoutSchema = z.object({
|
|
5807
|
+
type: z.literal("alert"),
|
|
5808
|
+
markdown: z.string(),
|
|
5809
|
+
context: contextSchema.optional(),
|
|
5810
|
+
control: z.string().optional(),
|
|
5811
|
+
margin: sizeSchema.optional()
|
|
5914
5812
|
});
|
|
5915
|
-
var
|
|
5916
|
-
|
|
5917
|
-
|
|
5918
|
-
|
|
5919
|
-
|
|
5920
|
-
|
|
5813
|
+
var paragraphLayoutSchema = z.object({
|
|
5814
|
+
type: z.literal("paragraph"),
|
|
5815
|
+
text: z.string(),
|
|
5816
|
+
align: alignSchema.optional(),
|
|
5817
|
+
control: z.string().optional(),
|
|
5818
|
+
margin: sizeSchema.optional()
|
|
5921
5819
|
});
|
|
5922
|
-
var
|
|
5923
|
-
|
|
5924
|
-
|
|
5925
|
-
|
|
5926
|
-
query: z.string()
|
|
5820
|
+
var dividerLayoutSchema = z.object({
|
|
5821
|
+
type: z.literal("divider"),
|
|
5822
|
+
control: z.string().optional(),
|
|
5823
|
+
margin: sizeSchema.optional()
|
|
5927
5824
|
});
|
|
5928
|
-
var
|
|
5929
|
-
z.literal("
|
|
5930
|
-
z.literal("
|
|
5931
|
-
z.literal("
|
|
5932
|
-
z.literal("replace-current")
|
|
5933
|
-
]);
|
|
5934
|
-
var actionTypeSchema = z.union([
|
|
5935
|
-
z.literal("primary"),
|
|
5936
|
-
z.literal("secondary"),
|
|
5937
|
-
z.literal("link"),
|
|
5938
|
-
z.literal("positive"),
|
|
5939
|
-
z.literal("negative")
|
|
5825
|
+
var listLayoutStatusSchema = z.union([
|
|
5826
|
+
z.literal("warning"),
|
|
5827
|
+
z.literal("neutral"),
|
|
5828
|
+
z.literal("positive")
|
|
5940
5829
|
]);
|
|
5941
|
-
var
|
|
5942
|
-
|
|
5830
|
+
var formLayoutSchemaReferenceSchema = z.object({
|
|
5831
|
+
$ref: z.string()
|
|
5943
5832
|
});
|
|
5944
|
-
var
|
|
5945
|
-
|
|
5833
|
+
var imageLayoutSchema = z.object({
|
|
5834
|
+
type: z.literal("image"),
|
|
5835
|
+
text: z.string().optional(),
|
|
5836
|
+
url: z.string(),
|
|
5837
|
+
size: sizeSchema.optional(),
|
|
5838
|
+
accessibilityDescription: z.string().optional(),
|
|
5839
|
+
control: z.string().optional(),
|
|
5840
|
+
margin: sizeSchema.optional()
|
|
5946
5841
|
});
|
|
5947
|
-
var
|
|
5948
|
-
|
|
5949
|
-
|
|
5950
|
-
|
|
5951
|
-
|
|
5952
|
-
|
|
5953
|
-
|
|
5954
|
-
|
|
5955
|
-
method: httpMethodSchema.optional(),
|
|
5956
|
-
exit: z.boolean().optional(),
|
|
5957
|
-
result: jsonElementSchema.optional(),
|
|
5958
|
-
data: jsonElementSchema.optional(),
|
|
5959
|
-
timeout: z.number().optional(),
|
|
5960
|
-
skipValidation: z.boolean().optional()
|
|
5842
|
+
var statusListLayoutStatusSchema = z.union([
|
|
5843
|
+
z.literal("not-done"),
|
|
5844
|
+
z.literal("pending"),
|
|
5845
|
+
z.literal("done")
|
|
5846
|
+
]);
|
|
5847
|
+
var instructionsLayoutItemSchema = z.object({
|
|
5848
|
+
text: z.string(),
|
|
5849
|
+
context: contextSchema
|
|
5961
5850
|
});
|
|
5962
|
-
var
|
|
5963
|
-
|
|
5964
|
-
content: z.string(),
|
|
5965
|
-
align: alignSchema.optional(),
|
|
5966
|
-
control: z.string().optional(),
|
|
5967
|
-
margin: sizeSchema.optional()
|
|
5851
|
+
var modalLayoutTriggerSchema = z.object({
|
|
5852
|
+
title: z.string()
|
|
5968
5853
|
});
|
|
5969
5854
|
var searchLayoutSchema = z.object({
|
|
5970
5855
|
type: z.literal("search"),
|
|
@@ -5976,9 +5861,143 @@ var searchLayoutSchema = z.object({
|
|
|
5976
5861
|
control: z.string().optional(),
|
|
5977
5862
|
margin: sizeSchema.optional()
|
|
5978
5863
|
});
|
|
5979
|
-
var
|
|
5864
|
+
var infoLayoutSchema = z.object({
|
|
5865
|
+
type: z.literal("info"),
|
|
5866
|
+
markdown: z.string(),
|
|
5867
|
+
align: alignSchema.optional(),
|
|
5868
|
+
control: z.string().optional(),
|
|
5869
|
+
margin: sizeSchema.optional()
|
|
5870
|
+
});
|
|
5871
|
+
var formLayoutSchema = z.object({
|
|
5872
|
+
type: z.literal("form"),
|
|
5873
|
+
schema: formLayoutSchemaReferenceSchema.optional(),
|
|
5874
|
+
schemaId: z.string(),
|
|
5875
|
+
control: z.string().optional(),
|
|
5876
|
+
margin: sizeSchema.optional()
|
|
5877
|
+
});
|
|
5878
|
+
var headingLayoutSchema = z.object({
|
|
5879
|
+
type: z.literal("heading"),
|
|
5880
|
+
text: z.string(),
|
|
5881
|
+
size: sizeSchema.optional(),
|
|
5882
|
+
align: alignSchema.optional(),
|
|
5883
|
+
control: z.string().optional(),
|
|
5884
|
+
margin: sizeSchema.optional()
|
|
5885
|
+
});
|
|
5886
|
+
var markdownLayoutSchema = z.object({
|
|
5887
|
+
type: z.literal("markdown"),
|
|
5888
|
+
content: z.string(),
|
|
5889
|
+
align: alignSchema.optional(),
|
|
5890
|
+
control: z.string().optional(),
|
|
5891
|
+
margin: sizeSchema.optional()
|
|
5892
|
+
});
|
|
5893
|
+
var columnsLayoutBiasSchema = z.union([
|
|
5894
|
+
z.literal("none"),
|
|
5895
|
+
z.literal("left"),
|
|
5896
|
+
z.literal("right")
|
|
5897
|
+
]);
|
|
5898
|
+
var helpSchema = z.object({
|
|
5899
|
+
markdown: z.string()
|
|
5900
|
+
});
|
|
5901
|
+
var searchSearchRequestSchema = z.object({
|
|
5902
|
+
url: z.string(),
|
|
5903
|
+
method: httpMethodSchema,
|
|
5904
|
+
param: z.string(),
|
|
5905
|
+
query: z.string()
|
|
5906
|
+
});
|
|
5907
|
+
var jsonElementSchema = z.lazy(
|
|
5908
|
+
() => z.union([
|
|
5909
|
+
z.string(),
|
|
5910
|
+
z.number(),
|
|
5911
|
+
z.boolean(),
|
|
5912
|
+
z.record(jsonElementSchema),
|
|
5913
|
+
z.array(jsonElementSchema)
|
|
5914
|
+
]).nullable()
|
|
5915
|
+
);
|
|
5916
|
+
var externalSchema = z.object({
|
|
5917
|
+
url: z.string()
|
|
5918
|
+
});
|
|
5919
|
+
var stepErrorSchema = z.object({
|
|
5920
|
+
error: z.string().optional(),
|
|
5921
|
+
validation: jsonElementSchema.optional()
|
|
5922
|
+
});
|
|
5923
|
+
var stringSchemaFormatSchema = z.union([
|
|
5924
|
+
z.literal("date"),
|
|
5925
|
+
z.literal("email"),
|
|
5926
|
+
z.literal("numeric"),
|
|
5927
|
+
z.literal("password"),
|
|
5928
|
+
z.literal("phone-number"),
|
|
5929
|
+
z.literal("base64url")
|
|
5930
|
+
]);
|
|
5931
|
+
var summarySummariserSchema = z.object({
|
|
5932
|
+
defaultTitle: z.string().optional(),
|
|
5933
|
+
defaultDescription: z.string().optional(),
|
|
5934
|
+
defaultIcon: iconSchema.optional(),
|
|
5935
|
+
defaultImage: imageLayoutSchema.optional(),
|
|
5936
|
+
providesTitle: z.boolean().optional(),
|
|
5937
|
+
providesDescription: z.boolean().optional(),
|
|
5938
|
+
providesIcon: z.boolean().optional(),
|
|
5939
|
+
providesImage: z.boolean().optional()
|
|
5940
|
+
});
|
|
5941
|
+
var validateAsyncSchema = z.object({
|
|
5942
|
+
param: z.string(),
|
|
5943
|
+
method: httpMethodSchema,
|
|
5944
|
+
url: z.string()
|
|
5945
|
+
});
|
|
5946
|
+
var summaryProviderSchema = z.object({
|
|
5947
|
+
providesTitle: z.boolean().optional(),
|
|
5948
|
+
providesDescription: z.boolean().optional(),
|
|
5949
|
+
providesIcon: z.boolean().optional(),
|
|
5950
|
+
providesImage: z.boolean().optional()
|
|
5951
|
+
});
|
|
5952
|
+
var uploadSourceSchema = z.union([z.literal("camera"), z.literal("file")]);
|
|
5953
|
+
var navigationStackBehaviorSchema = z.union([
|
|
5954
|
+
z.literal("default"),
|
|
5955
|
+
z.literal("remove-previous"),
|
|
5956
|
+
z.literal("remove-all"),
|
|
5957
|
+
z.literal("replace-current")
|
|
5958
|
+
]);
|
|
5959
|
+
var actionTypeSchema = z.union([
|
|
5960
|
+
z.literal("primary"),
|
|
5961
|
+
z.literal("secondary"),
|
|
5962
|
+
z.literal("link"),
|
|
5963
|
+
z.literal("positive"),
|
|
5964
|
+
z.literal("negative")
|
|
5965
|
+
]);
|
|
5966
|
+
var summarySchema = z.union([summaryProviderSchema, summarySummariserSchema]);
|
|
5967
|
+
var actionSchema = z.object({
|
|
5968
|
+
title: z.string().optional(),
|
|
5969
|
+
type: actionTypeSchema.optional(),
|
|
5970
|
+
disabled: z.boolean().optional(),
|
|
5971
|
+
$id: z.string().optional(),
|
|
5972
|
+
$ref: z.string().optional(),
|
|
5973
|
+
id: z.string().optional(),
|
|
5974
|
+
url: z.string().optional(),
|
|
5975
|
+
method: httpMethodSchema.optional(),
|
|
5976
|
+
exit: z.boolean().optional(),
|
|
5977
|
+
result: jsonElementSchema.optional(),
|
|
5978
|
+
data: jsonElementSchema.optional(),
|
|
5979
|
+
timeout: z.number().optional(),
|
|
5980
|
+
skipValidation: z.boolean().optional()
|
|
5981
|
+
});
|
|
5982
|
+
var listLayoutItemSchema = z.object({
|
|
5980
5983
|
title: z.string(),
|
|
5981
|
-
|
|
5984
|
+
description: z.string().optional(),
|
|
5985
|
+
icon: iconSchema,
|
|
5986
|
+
status: listLayoutStatusSchema.optional()
|
|
5987
|
+
});
|
|
5988
|
+
var decisionLayoutOptionSchema = z.object({
|
|
5989
|
+
action: actionSchema,
|
|
5990
|
+
title: z.string(),
|
|
5991
|
+
description: z.string().optional(),
|
|
5992
|
+
disabled: z.boolean().optional(),
|
|
5993
|
+
icon: iconSchema.optional(),
|
|
5994
|
+
image: imageLayoutSchema.optional()
|
|
5995
|
+
});
|
|
5996
|
+
var statusListLayoutItemSchema = z.object({
|
|
5997
|
+
title: z.string(),
|
|
5998
|
+
description: z.string().optional(),
|
|
5999
|
+
icon: iconSchema,
|
|
6000
|
+
status: statusListLayoutStatusSchema.optional()
|
|
5982
6001
|
});
|
|
5983
6002
|
var instructionsLayoutSchema = z.object({
|
|
5984
6003
|
type: z.literal("instructions"),
|
|
@@ -5987,17 +6006,51 @@ var instructionsLayoutSchema = z.object({
|
|
|
5987
6006
|
control: z.string().optional(),
|
|
5988
6007
|
margin: sizeSchema.optional()
|
|
5989
6008
|
});
|
|
5990
|
-
var
|
|
6009
|
+
var buttonLayoutSchema = z.object({
|
|
6010
|
+
type: z.literal("button"),
|
|
6011
|
+
size: sizeSchema.optional(),
|
|
6012
|
+
title: z.string().optional(),
|
|
6013
|
+
action: actionSchema,
|
|
6014
|
+
context: contextSchema.optional(),
|
|
6015
|
+
disabled: z.boolean().optional(),
|
|
6016
|
+
pinOrder: z.number().optional(),
|
|
6017
|
+
control: z.string().optional(),
|
|
6018
|
+
margin: sizeSchema.optional()
|
|
6019
|
+
});
|
|
5991
6020
|
var reviewLayoutFieldSchema = z.object({
|
|
5992
6021
|
label: z.string(),
|
|
5993
6022
|
value: z.string(),
|
|
5994
6023
|
help: helpSchema.optional()
|
|
5995
6024
|
});
|
|
5996
|
-
var
|
|
6025
|
+
var searchResultSearchSchema = z.object({
|
|
6026
|
+
type: z.literal("search"),
|
|
5997
6027
|
title: z.string(),
|
|
5998
6028
|
description: z.string().optional(),
|
|
5999
|
-
icon: iconSchema,
|
|
6000
|
-
|
|
6029
|
+
icon: iconSchema.optional(),
|
|
6030
|
+
image: imageLayoutSchema.optional(),
|
|
6031
|
+
value: searchSearchRequestSchema
|
|
6032
|
+
});
|
|
6033
|
+
var searchResultActionSchema = z.object({
|
|
6034
|
+
type: z.literal("action"),
|
|
6035
|
+
title: z.string(),
|
|
6036
|
+
description: z.string().optional(),
|
|
6037
|
+
icon: iconSchema.optional(),
|
|
6038
|
+
image: imageLayoutSchema.optional(),
|
|
6039
|
+
value: actionSchema
|
|
6040
|
+
});
|
|
6041
|
+
var actionResponseBodySchema = z.object({
|
|
6042
|
+
action: actionSchema
|
|
6043
|
+
});
|
|
6044
|
+
var errorResponseBodySchema = z.object({
|
|
6045
|
+
refreshFormUrl: z.string().optional(),
|
|
6046
|
+
analytics: z.record(z.string()).optional(),
|
|
6047
|
+
error: z.string().optional(),
|
|
6048
|
+
validation: jsonElementSchema.optional(),
|
|
6049
|
+
refreshUrl: z.string().optional()
|
|
6050
|
+
});
|
|
6051
|
+
var linkHandlerSchema = z.object({
|
|
6052
|
+
regexPattern: z.string(),
|
|
6053
|
+
action: actionSchema
|
|
6001
6054
|
});
|
|
6002
6055
|
var blobSchemaSchema = z.object({
|
|
6003
6056
|
type: z.literal("blob"),
|
|
@@ -6037,65 +6090,36 @@ var constSchemaSchema = z.object({
|
|
|
6037
6090
|
analyticsId: z.string().optional(),
|
|
6038
6091
|
disabled: z.boolean().optional()
|
|
6039
6092
|
});
|
|
6040
|
-
var
|
|
6041
|
-
defaultTitle: z.string().optional(),
|
|
6042
|
-
defaultDescription: z.string().optional(),
|
|
6043
|
-
defaultIcon: iconSchema.optional(),
|
|
6044
|
-
defaultImage: imageLayoutSchema.optional(),
|
|
6045
|
-
providesTitle: z.boolean().optional(),
|
|
6046
|
-
providesDescription: z.boolean().optional(),
|
|
6047
|
-
providesIcon: z.boolean().optional(),
|
|
6048
|
-
providesImage: z.boolean().optional()
|
|
6049
|
-
});
|
|
6050
|
-
var linkHandlerSchema = z.object({
|
|
6051
|
-
regexPattern: z.string(),
|
|
6093
|
+
var pollingOnErrorSchema = z.object({
|
|
6052
6094
|
action: actionSchema
|
|
6053
6095
|
});
|
|
6054
|
-
var
|
|
6096
|
+
var navigationBackBehaviourSchema = z.object({
|
|
6097
|
+
title: z.string().optional(),
|
|
6055
6098
|
action: actionSchema
|
|
6056
6099
|
});
|
|
6057
|
-
var
|
|
6058
|
-
type: z.literal("search"),
|
|
6059
|
-
title: z.string(),
|
|
6060
|
-
description: z.string().optional(),
|
|
6061
|
-
icon: iconSchema.optional(),
|
|
6062
|
-
image: imageLayoutSchema.optional(),
|
|
6063
|
-
value: searchSearchRequestSchema
|
|
6064
|
-
});
|
|
6065
|
-
var searchResultActionSchema = z.object({
|
|
6066
|
-
type: z.literal("action"),
|
|
6100
|
+
var reviewLayoutCallToActionSchema = z.object({
|
|
6067
6101
|
title: z.string(),
|
|
6068
|
-
description: z.string().optional(),
|
|
6069
|
-
icon: iconSchema.optional(),
|
|
6070
|
-
image: imageLayoutSchema.optional(),
|
|
6071
|
-
value: actionSchema
|
|
6072
|
-
});
|
|
6073
|
-
var pollingOnErrorSchema = z.object({
|
|
6074
6102
|
action: actionSchema
|
|
6075
6103
|
});
|
|
6076
|
-
var
|
|
6104
|
+
var listLayoutSchema = z.object({
|
|
6105
|
+
type: z.literal("list"),
|
|
6106
|
+
items: z.array(listLayoutItemSchema),
|
|
6077
6107
|
title: z.string().optional(),
|
|
6078
|
-
|
|
6108
|
+
control: z.string().optional(),
|
|
6109
|
+
margin: sizeSchema.optional()
|
|
6079
6110
|
});
|
|
6080
|
-
var
|
|
6081
|
-
|
|
6082
|
-
|
|
6083
|
-
size: sizeSchema.optional(),
|
|
6084
|
-
title: z.string().optional(),
|
|
6085
|
-
action: actionSchema,
|
|
6086
|
-
context: contextSchema.optional(),
|
|
6087
|
-
disabled: z.boolean().optional(),
|
|
6088
|
-
pinOrder: z.number().optional(),
|
|
6111
|
+
var decisionLayoutSchema = z.object({
|
|
6112
|
+
type: z.literal("decision"),
|
|
6113
|
+
options: z.array(decisionLayoutOptionSchema),
|
|
6089
6114
|
control: z.string().optional(),
|
|
6090
6115
|
margin: sizeSchema.optional()
|
|
6091
6116
|
});
|
|
6092
|
-
var
|
|
6093
|
-
|
|
6094
|
-
|
|
6095
|
-
|
|
6096
|
-
|
|
6097
|
-
|
|
6098
|
-
image: imageLayoutSchema.optional()
|
|
6117
|
+
var statusListLayoutSchema = z.object({
|
|
6118
|
+
type: z.literal("status-list"),
|
|
6119
|
+
items: z.array(statusListLayoutItemSchema),
|
|
6120
|
+
title: z.string().optional(),
|
|
6121
|
+
control: z.string().optional(),
|
|
6122
|
+
margin: sizeSchema.optional()
|
|
6099
6123
|
});
|
|
6100
6124
|
var reviewLayoutSchema = z.object({
|
|
6101
6125
|
type: z.literal("review"),
|
|
@@ -6107,19 +6131,7 @@ var reviewLayoutSchema = z.object({
|
|
|
6107
6131
|
control: z.string().optional(),
|
|
6108
6132
|
margin: sizeSchema.optional()
|
|
6109
6133
|
});
|
|
6110
|
-
var
|
|
6111
|
-
type: z.literal("status-list"),
|
|
6112
|
-
items: z.array(statusListLayoutItemSchema),
|
|
6113
|
-
title: z.string().optional(),
|
|
6114
|
-
control: z.string().optional(),
|
|
6115
|
-
margin: sizeSchema.optional()
|
|
6116
|
-
});
|
|
6117
|
-
var listLayoutItemSchema = z.object({
|
|
6118
|
-
title: z.string(),
|
|
6119
|
-
description: z.string().optional(),
|
|
6120
|
-
icon: iconSchema,
|
|
6121
|
-
status: listLayoutStatusSchema.optional()
|
|
6122
|
-
});
|
|
6134
|
+
var searchResultSchema = z.union([searchResultActionSchema, searchResultSearchSchema]);
|
|
6123
6135
|
var pollingSchema = z.object({
|
|
6124
6136
|
url: z.string(),
|
|
6125
6137
|
interval: z.number(),
|
|
@@ -6131,33 +6143,9 @@ var navigationSchema = z.object({
|
|
|
6131
6143
|
back: navigationBackBehaviourSchema.optional(),
|
|
6132
6144
|
stackBehavior: navigationStackBehaviorSchema.optional()
|
|
6133
6145
|
});
|
|
6134
|
-
var searchResultSchema = z.union([searchResultActionSchema, searchResultSearchSchema]);
|
|
6135
|
-
var decisionLayoutSchema = z.object({
|
|
6136
|
-
type: z.literal("decision"),
|
|
6137
|
-
options: z.array(decisionLayoutOptionSchema),
|
|
6138
|
-
control: z.string().optional(),
|
|
6139
|
-
margin: sizeSchema.optional()
|
|
6140
|
-
});
|
|
6141
|
-
var listLayoutSchema = z.object({
|
|
6142
|
-
type: z.literal("list"),
|
|
6143
|
-
items: z.array(listLayoutItemSchema),
|
|
6144
|
-
title: z.string().optional(),
|
|
6145
|
-
control: z.string().optional(),
|
|
6146
|
-
margin: sizeSchema.optional()
|
|
6147
|
-
});
|
|
6148
6146
|
var searchResponseBodySchema = z.object({
|
|
6149
6147
|
results: z.array(searchResultSchema)
|
|
6150
6148
|
});
|
|
6151
|
-
var columnsLayoutSchema = z.lazy(
|
|
6152
|
-
() => z.object({
|
|
6153
|
-
type: z.literal("columns"),
|
|
6154
|
-
left: z.array(layoutSchema),
|
|
6155
|
-
right: z.array(layoutSchema),
|
|
6156
|
-
bias: columnsLayoutBiasSchema.optional(),
|
|
6157
|
-
control: z.string().optional(),
|
|
6158
|
-
margin: sizeSchema.optional()
|
|
6159
|
-
})
|
|
6160
|
-
);
|
|
6161
6149
|
var layoutSchema = z.lazy(
|
|
6162
6150
|
() => z.union([
|
|
6163
6151
|
alertLayoutSchema,
|
|
@@ -6181,6 +6169,26 @@ var layoutSchema = z.lazy(
|
|
|
6181
6169
|
statusListLayoutSchema
|
|
6182
6170
|
])
|
|
6183
6171
|
);
|
|
6172
|
+
var boxLayoutSchema = z.lazy(
|
|
6173
|
+
() => z.object({
|
|
6174
|
+
type: z.literal("box"),
|
|
6175
|
+
components: z.array(layoutSchema),
|
|
6176
|
+
width: sizeSchema.optional(),
|
|
6177
|
+
border: z.boolean().optional(),
|
|
6178
|
+
control: z.string().optional(),
|
|
6179
|
+
margin: sizeSchema.optional()
|
|
6180
|
+
})
|
|
6181
|
+
);
|
|
6182
|
+
var columnsLayoutSchema = z.lazy(
|
|
6183
|
+
() => z.object({
|
|
6184
|
+
type: z.literal("columns"),
|
|
6185
|
+
left: z.array(layoutSchema),
|
|
6186
|
+
right: z.array(layoutSchema),
|
|
6187
|
+
bias: columnsLayoutBiasSchema.optional(),
|
|
6188
|
+
control: z.string().optional(),
|
|
6189
|
+
margin: sizeSchema.optional()
|
|
6190
|
+
})
|
|
6191
|
+
);
|
|
6184
6192
|
var modalLayoutSchema = z.lazy(
|
|
6185
6193
|
() => z.object({
|
|
6186
6194
|
type: z.literal("modal"),
|
|
@@ -6195,14 +6203,25 @@ var modalLayoutContentSchema = z.lazy(
|
|
|
6195
6203
|
components: z.array(layoutSchema)
|
|
6196
6204
|
})
|
|
6197
6205
|
);
|
|
6198
|
-
var
|
|
6206
|
+
var stepSchema = z.lazy(
|
|
6199
6207
|
() => z.object({
|
|
6200
|
-
|
|
6201
|
-
|
|
6202
|
-
|
|
6203
|
-
|
|
6204
|
-
|
|
6205
|
-
|
|
6208
|
+
key: z.string().optional(),
|
|
6209
|
+
type: z.string().optional(),
|
|
6210
|
+
actions: z.array(actionSchema).optional(),
|
|
6211
|
+
refreshFormUrl: z.string().optional(),
|
|
6212
|
+
id: z.string(),
|
|
6213
|
+
title: z.string(),
|
|
6214
|
+
description: z.string().optional(),
|
|
6215
|
+
schemas: z.array(schemaSchema),
|
|
6216
|
+
layout: z.array(layoutSchema),
|
|
6217
|
+
model: jsonElementSchema.optional(),
|
|
6218
|
+
external: externalSchema.optional(),
|
|
6219
|
+
polling: pollingSchema.optional(),
|
|
6220
|
+
linkHandlers: z.array(linkHandlerSchema).optional(),
|
|
6221
|
+
analytics: z.record(z.string()).optional(),
|
|
6222
|
+
errors: stepErrorSchema.optional(),
|
|
6223
|
+
navigation: navigationSchema.optional(),
|
|
6224
|
+
refreshUrl: z.string().optional()
|
|
6206
6225
|
})
|
|
6207
6226
|
);
|
|
6208
6227
|
var schemaSchema = z.lazy(
|
|
@@ -6428,35 +6447,6 @@ var stringSchemaSchema = z.lazy(
|
|
|
6428
6447
|
help: helpSchema.optional()
|
|
6429
6448
|
})
|
|
6430
6449
|
);
|
|
6431
|
-
var persistAsyncSchema = z.lazy(
|
|
6432
|
-
() => z.object({
|
|
6433
|
-
param: z.string(),
|
|
6434
|
-
idProperty: z.string(),
|
|
6435
|
-
schema: schemaSchema,
|
|
6436
|
-
url: z.string(),
|
|
6437
|
-
method: httpMethodSchema
|
|
6438
|
-
})
|
|
6439
|
-
);
|
|
6440
|
-
var arraySchemaTupleSchema = z.lazy(
|
|
6441
|
-
() => z.object({
|
|
6442
|
-
type: z.literal("array"),
|
|
6443
|
-
promoted: z.boolean().optional(),
|
|
6444
|
-
$id: z.string().optional(),
|
|
6445
|
-
items: z.array(schemaSchema),
|
|
6446
|
-
title: z.string().optional(),
|
|
6447
|
-
description: z.string().optional(),
|
|
6448
|
-
control: z.string().optional(),
|
|
6449
|
-
hidden: z.boolean().optional(),
|
|
6450
|
-
icon: iconSchema.optional(),
|
|
6451
|
-
image: imageSchema.optional(),
|
|
6452
|
-
keywords: z.array(z.string()).optional(),
|
|
6453
|
-
summary: summaryProviderSchema.optional(),
|
|
6454
|
-
analyticsId: z.string().optional(),
|
|
6455
|
-
persistAsync: persistAsyncSchema.optional(),
|
|
6456
|
-
validationAsync: validateAsyncSchema.optional(),
|
|
6457
|
-
alert: alertLayoutSchema.optional()
|
|
6458
|
-
})
|
|
6459
|
-
);
|
|
6460
6450
|
var arraySchemaListSchema = z.lazy(
|
|
6461
6451
|
() => z.object({
|
|
6462
6452
|
type: z.literal("array"),
|
|
@@ -6484,25 +6474,33 @@ var arraySchemaListSchema = z.lazy(
|
|
|
6484
6474
|
disabled: z.boolean().optional()
|
|
6485
6475
|
})
|
|
6486
6476
|
);
|
|
6487
|
-
var
|
|
6477
|
+
var persistAsyncSchema = z.lazy(
|
|
6488
6478
|
() => z.object({
|
|
6489
|
-
|
|
6490
|
-
|
|
6491
|
-
|
|
6492
|
-
|
|
6493
|
-
|
|
6494
|
-
|
|
6479
|
+
param: z.string(),
|
|
6480
|
+
idProperty: z.string(),
|
|
6481
|
+
schema: schemaSchema,
|
|
6482
|
+
url: z.string(),
|
|
6483
|
+
method: httpMethodSchema
|
|
6484
|
+
})
|
|
6485
|
+
);
|
|
6486
|
+
var arraySchemaTupleSchema = z.lazy(
|
|
6487
|
+
() => z.object({
|
|
6488
|
+
type: z.literal("array"),
|
|
6489
|
+
promoted: z.boolean().optional(),
|
|
6490
|
+
$id: z.string().optional(),
|
|
6491
|
+
items: z.array(schemaSchema),
|
|
6492
|
+
title: z.string().optional(),
|
|
6495
6493
|
description: z.string().optional(),
|
|
6496
|
-
|
|
6497
|
-
|
|
6498
|
-
|
|
6499
|
-
|
|
6500
|
-
|
|
6501
|
-
|
|
6502
|
-
|
|
6503
|
-
|
|
6504
|
-
|
|
6505
|
-
|
|
6494
|
+
control: z.string().optional(),
|
|
6495
|
+
hidden: z.boolean().optional(),
|
|
6496
|
+
icon: iconSchema.optional(),
|
|
6497
|
+
image: imageSchema.optional(),
|
|
6498
|
+
keywords: z.array(z.string()).optional(),
|
|
6499
|
+
summary: summaryProviderSchema.optional(),
|
|
6500
|
+
analyticsId: z.string().optional(),
|
|
6501
|
+
persistAsync: persistAsyncSchema.optional(),
|
|
6502
|
+
validationAsync: validateAsyncSchema.optional(),
|
|
6503
|
+
alert: alertLayoutSchema.optional()
|
|
6506
6504
|
})
|
|
6507
6505
|
);
|
|
6508
6506
|
var validateStep = (step) => validate(step, stepSchema);
|
|
@@ -8032,6 +8030,9 @@ var isPartialLocalValueMatch = (partialValue, component) => {
|
|
|
8032
8030
|
if (isObjectLocalValue(partialValue) && isObjectLocalValue(componentValue)) {
|
|
8033
8031
|
return isPartialObjectMatch(partialValue, componentValue, component);
|
|
8034
8032
|
}
|
|
8033
|
+
if (isArrayLocalValue(partialValue) && component.type === "tuple") {
|
|
8034
|
+
return isPartialTupleMatch(partialValue, component);
|
|
8035
|
+
}
|
|
8035
8036
|
return null;
|
|
8036
8037
|
};
|
|
8037
8038
|
var isPartialObjectMatch = (partialValue, componentValue, component) => {
|
|
@@ -8047,6 +8048,23 @@ var isPartialObjectMatch = (partialValue, componentValue, component) => {
|
|
|
8047
8048
|
}
|
|
8048
8049
|
return null;
|
|
8049
8050
|
};
|
|
8051
|
+
var isPartialTupleMatch = (partialValue, component) => {
|
|
8052
|
+
const children = component.getChildren();
|
|
8053
|
+
const shortest = partialValue.length < children.length ? partialValue : children;
|
|
8054
|
+
const results = shortest.map((_value, index) => {
|
|
8055
|
+
if (children[index].type !== "const") {
|
|
8056
|
+
return null;
|
|
8057
|
+
}
|
|
8058
|
+
return isPartialLocalValueMatch(partialValue[index], children[index]);
|
|
8059
|
+
});
|
|
8060
|
+
if (results.includes(false)) {
|
|
8061
|
+
return false;
|
|
8062
|
+
}
|
|
8063
|
+
if (results.includes(true)) {
|
|
8064
|
+
return true;
|
|
8065
|
+
}
|
|
8066
|
+
return null;
|
|
8067
|
+
};
|
|
8050
8068
|
var getMatchingKeys = (a, b) => {
|
|
8051
8069
|
const allKeys = Array.from(/* @__PURE__ */ new Set([...Object.keys(a), ...Object.keys(b)]));
|
|
8052
8070
|
return allKeys.filter((key) => !isNullish(a[key]) && !isNullish(b[key]));
|
|
@@ -9220,6 +9238,71 @@ var arraySchemaToMultiSelectComponent = (schemaMapperProps, mapperProps) => {
|
|
|
9220
9238
|
);
|
|
9221
9239
|
};
|
|
9222
9240
|
|
|
9241
|
+
// src/revamp/domain/components/TupleComponent.ts
|
|
9242
|
+
var createTupleComponent = (tupleProps) => {
|
|
9243
|
+
const { uid, analyticsId, components, control, description, help, hidden, summariser, title } = tupleProps;
|
|
9244
|
+
return {
|
|
9245
|
+
type: "tuple",
|
|
9246
|
+
uid,
|
|
9247
|
+
analyticsId,
|
|
9248
|
+
components,
|
|
9249
|
+
control,
|
|
9250
|
+
description,
|
|
9251
|
+
help,
|
|
9252
|
+
hidden,
|
|
9253
|
+
title,
|
|
9254
|
+
getChildren() {
|
|
9255
|
+
return this.components;
|
|
9256
|
+
},
|
|
9257
|
+
async getSubmittableValue() {
|
|
9258
|
+
return Promise.all(this.components.map((child) => child.getSubmittableValue()));
|
|
9259
|
+
},
|
|
9260
|
+
getSummary() {
|
|
9261
|
+
const summary = summariser(this.getLocalValue());
|
|
9262
|
+
const childSummary = summariseFromChildren(this.getChildren());
|
|
9263
|
+
return mergeSummaries(summary, childSummary);
|
|
9264
|
+
},
|
|
9265
|
+
getLocalValue() {
|
|
9266
|
+
return this.components.map((child) => child.getLocalValue());
|
|
9267
|
+
},
|
|
9268
|
+
validate() {
|
|
9269
|
+
return validateComponents(this.getChildren());
|
|
9270
|
+
}
|
|
9271
|
+
};
|
|
9272
|
+
};
|
|
9273
|
+
|
|
9274
|
+
// src/revamp/domain/mappers/schema/arraySchemaToComponent/arraySchemaToTupleComponent.ts
|
|
9275
|
+
var arraySchemaToTupleComponent = (schemaMapperProps, mapperProps) => {
|
|
9276
|
+
const {
|
|
9277
|
+
uid,
|
|
9278
|
+
localValue,
|
|
9279
|
+
schema,
|
|
9280
|
+
model: initialModel,
|
|
9281
|
+
required = false,
|
|
9282
|
+
validationErrors
|
|
9283
|
+
} = schemaMapperProps;
|
|
9284
|
+
const { items } = schema;
|
|
9285
|
+
const components = items.map(
|
|
9286
|
+
(childSchema, index) => {
|
|
9287
|
+
var _a, _b;
|
|
9288
|
+
return mapSchemaToComponent(
|
|
9289
|
+
{
|
|
9290
|
+
uid: `${uid}-arr.${index}`,
|
|
9291
|
+
schema: childSchema,
|
|
9292
|
+
model: isArray(initialModel) ? (_a = initialModel[index]) != null ? _a : null : null,
|
|
9293
|
+
localValue: isArray(localValue) ? (_b = localValue[index]) != null ? _b : null : null,
|
|
9294
|
+
validationErrors: isArray(validationErrors) ? validationErrors[index] : void 0,
|
|
9295
|
+
required
|
|
9296
|
+
},
|
|
9297
|
+
mapperProps
|
|
9298
|
+
);
|
|
9299
|
+
}
|
|
9300
|
+
);
|
|
9301
|
+
return createTupleComponent(__spreadProps(__spreadValues({}, mapCommonSchemaProps(schemaMapperProps)), {
|
|
9302
|
+
components
|
|
9303
|
+
}));
|
|
9304
|
+
};
|
|
9305
|
+
|
|
9223
9306
|
// src/revamp/domain/mappers/schema/arraySchemaToComponent/arraySchemaToComponent.ts
|
|
9224
9307
|
var arraySchemaToComponent = (schemaMapperProps, mapperProps) => {
|
|
9225
9308
|
const { schema, model: originalModel } = schemaMapperProps;
|
|
@@ -9230,10 +9313,10 @@ var arraySchemaToComponent = (schemaMapperProps, mapperProps) => {
|
|
|
9230
9313
|
if (isArraySchemaListWithMultiSelect(schema)) {
|
|
9231
9314
|
return arraySchemaToMultiSelectComponent(__spreadProps(__spreadValues({}, schemaMapperProps), { schema, model }), mapperProps);
|
|
9232
9315
|
}
|
|
9233
|
-
if (
|
|
9234
|
-
return
|
|
9316
|
+
if (isArrayTupleSchema(schema)) {
|
|
9317
|
+
return arraySchemaToTupleComponent(__spreadProps(__spreadValues({}, schemaMapperProps), { schema, model }), mapperProps);
|
|
9235
9318
|
}
|
|
9236
|
-
|
|
9319
|
+
return arraySchemaToRepeatableComponent(__spreadProps(__spreadValues({}, schemaMapperProps), { schema, model }), mapperProps);
|
|
9237
9320
|
};
|
|
9238
9321
|
var isArraySchemaListWithMultiFileUpload = (schema) => isArrayListSchema(schema) && (isPersistAsyncWithUploadSchema(schema.items) || isStringSchemaWithUpload(schema.items));
|
|
9239
9322
|
var isPersistAsyncWithUploadSchema = (schema) => isSchemaWithPersistAsync(schema) && (isBlobSchema(schema.persistAsync.schema) || isStringSchemaWithUpload(schema.persistAsync.schema));
|
|
@@ -10030,9 +10113,7 @@ var mapStepToComponent = (_a) => {
|
|
|
10030
10113
|
stepPolling,
|
|
10031
10114
|
updateComponent,
|
|
10032
10115
|
title: displayStepTitle ? title : void 0,
|
|
10033
|
-
trackEvent
|
|
10034
|
-
step,
|
|
10035
|
-
onAction
|
|
10116
|
+
trackEvent
|
|
10036
10117
|
});
|
|
10037
10118
|
return stepComponent;
|
|
10038
10119
|
};
|
|
@@ -10506,7 +10587,7 @@ function useDynamicFlowCore(props) {
|
|
|
10506
10587
|
const onAction = (0, import_react4.useCallback)(async (action) => {
|
|
10507
10588
|
var _a2, _b, _c;
|
|
10508
10589
|
try {
|
|
10509
|
-
(_a2 = stepComponentRef.current) == null ? void 0 : _a2.setLoadingState("
|
|
10590
|
+
(_a2 = stepComponentRef.current) == null ? void 0 : _a2.setLoadingState("submitting");
|
|
10510
10591
|
const model = (_c = await ((_b = stepComponentRef.current) == null ? void 0 : _b.getSubmittableValue())) != null ? _c : null;
|
|
10511
10592
|
const command = await executeSubmission({
|
|
10512
10593
|
action,
|
|
@@ -10551,7 +10632,7 @@ function useDynamicFlowCore(props) {
|
|
|
10551
10632
|
async (schemaId, refreshUrl = "", errorsOverride) => {
|
|
10552
10633
|
var _a2, _b, _c, _d;
|
|
10553
10634
|
try {
|
|
10554
|
-
(_a2 = stepComponentRef.current) == null ? void 0 : _a2.setLoadingState("
|
|
10635
|
+
(_a2 = stepComponentRef.current) == null ? void 0 : _a2.setLoadingState("refreshing");
|
|
10555
10636
|
const model = (_c = await ((_b = stepComponentRef.current) == null ? void 0 : _b.getSubmittableValue())) != null ? _c : null;
|
|
10556
10637
|
const command = await executeRefresh({
|
|
10557
10638
|
abortSignal: abortCurrentAndGetNewAbortSignal(),
|
|
@@ -11946,79 +12027,18 @@ function ItemSummaryOption({
|
|
|
11946
12027
|
}
|
|
11947
12028
|
var RepeatableRenderer_default = RepeatableRenderer;
|
|
11948
12029
|
|
|
11949
|
-
// src/revamp/wise/renderers/ReviewRenderer.tsx
|
|
11950
|
-
var import_components26 = require("@transferwise/components");
|
|
11951
|
-
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
11952
|
-
var ReviewRenderer = {
|
|
11953
|
-
canRenderType: "review",
|
|
11954
|
-
render: ({ callToAction, control, fields, margin, title }) => {
|
|
11955
|
-
const orientation = mapControlToDefinitionListLayout(control);
|
|
11956
|
-
const action = callToAction ? {
|
|
11957
|
-
text: callToAction.title,
|
|
11958
|
-
onClick: (event) => {
|
|
11959
|
-
event.preventDefault();
|
|
11960
|
-
callToAction.onClick();
|
|
11961
|
-
}
|
|
11962
|
-
} : void 0;
|
|
11963
|
-
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: getMargin(margin), children: [
|
|
11964
|
-
(title || callToAction) && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_components26.Header, { title: title != null ? title : "", action }),
|
|
11965
|
-
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: margin, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
11966
|
-
import_components26.DefinitionList,
|
|
11967
|
-
{
|
|
11968
|
-
layout: orientation,
|
|
11969
|
-
definitions: fields.map(({ label, value, help }, index) => ({
|
|
11970
|
-
key: String(index),
|
|
11971
|
-
title: label,
|
|
11972
|
-
value: getFieldValue(value, help, orientation)
|
|
11973
|
-
}))
|
|
11974
|
-
}
|
|
11975
|
-
) })
|
|
11976
|
-
] });
|
|
11977
|
-
}
|
|
11978
|
-
};
|
|
11979
|
-
var ReviewRenderer_default = ReviewRenderer;
|
|
11980
|
-
var mapControlToDefinitionListLayout = (control) => {
|
|
11981
|
-
switch (control) {
|
|
11982
|
-
case "horizontal":
|
|
11983
|
-
case "horizontal-end-aligned":
|
|
11984
|
-
return "HORIZONTAL_RIGHT_ALIGNED";
|
|
11985
|
-
case "horizontal-start-aligned":
|
|
11986
|
-
return "HORIZONTAL_LEFT_ALIGNED";
|
|
11987
|
-
case "vertical-two-column":
|
|
11988
|
-
return "VERTICAL_TWO_COLUMN";
|
|
11989
|
-
case "vertical":
|
|
11990
|
-
case "vertical-one-column":
|
|
11991
|
-
default:
|
|
11992
|
-
return "VERTICAL_ONE_COLUMN";
|
|
11993
|
-
}
|
|
11994
|
-
};
|
|
11995
|
-
var getFieldValue = (value, help, orientation) => {
|
|
11996
|
-
if (help) {
|
|
11997
|
-
return orientation === "HORIZONTAL_RIGHT_ALIGNED" ? /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
|
|
11998
|
-
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Help_default, { help }),
|
|
11999
|
-
" ",
|
|
12000
|
-
value
|
|
12001
|
-
] }) : /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
|
|
12002
|
-
value,
|
|
12003
|
-
" ",
|
|
12004
|
-
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Help_default, { help })
|
|
12005
|
-
] });
|
|
12006
|
-
}
|
|
12007
|
-
return value;
|
|
12008
|
-
};
|
|
12009
|
-
|
|
12010
12030
|
// src/revamp/wise/renderers/SearchRenderer/BlockSearchRendererComponent.tsx
|
|
12011
|
-
var
|
|
12031
|
+
var import_components26 = require("@transferwise/components");
|
|
12012
12032
|
|
|
12013
12033
|
// src/revamp/wise/renderers/SearchRenderer/ErrorResult.tsx
|
|
12014
12034
|
var import_react_intl15 = require("react-intl");
|
|
12015
|
-
var
|
|
12035
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
12016
12036
|
function ErrorResult({ state }) {
|
|
12017
12037
|
const intl = (0, import_react_intl15.useIntl)();
|
|
12018
|
-
return /* @__PURE__ */ (0,
|
|
12038
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("p", { className: "m-t-2", children: [
|
|
12019
12039
|
intl.formatMessage(generic_error_messages_default.genericError),
|
|
12020
12040
|
"\xA0",
|
|
12021
|
-
/* @__PURE__ */ (0,
|
|
12041
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
12022
12042
|
"a",
|
|
12023
12043
|
{
|
|
12024
12044
|
href: "/",
|
|
@@ -12034,7 +12054,7 @@ function ErrorResult({ state }) {
|
|
|
12034
12054
|
|
|
12035
12055
|
// src/revamp/wise/renderers/SearchRenderer/BlockSearchRendererComponent.tsx
|
|
12036
12056
|
var import_react15 = require("react");
|
|
12037
|
-
var
|
|
12057
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
12038
12058
|
function BlockSearchRendererComponent({
|
|
12039
12059
|
id,
|
|
12040
12060
|
isLoading,
|
|
@@ -12046,9 +12066,9 @@ function BlockSearchRendererComponent({
|
|
|
12046
12066
|
}) {
|
|
12047
12067
|
const [hasSearched, setHasSearched] = (0, import_react15.useState)(false);
|
|
12048
12068
|
const trackEvent = useTrackEvent();
|
|
12049
|
-
return /* @__PURE__ */ (0,
|
|
12050
|
-
/* @__PURE__ */ (0,
|
|
12051
|
-
|
|
12069
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: getMargin(margin), children: [
|
|
12070
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(FieldInput_default, { id, description: "", error: "", help: "", label: title, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
12071
|
+
import_components26.Input,
|
|
12052
12072
|
{
|
|
12053
12073
|
id,
|
|
12054
12074
|
name: id,
|
|
@@ -12064,7 +12084,7 @@ function BlockSearchRendererComponent({
|
|
|
12064
12084
|
}
|
|
12065
12085
|
}
|
|
12066
12086
|
) }),
|
|
12067
|
-
isLoading ? /* @__PURE__ */ (0,
|
|
12087
|
+
isLoading ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_jsx_runtime42.Fragment, { children: "Loading..." }) : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(SearchResultContent, { state, onChange })
|
|
12068
12088
|
] });
|
|
12069
12089
|
}
|
|
12070
12090
|
function SearchResultContent({
|
|
@@ -12073,29 +12093,29 @@ function SearchResultContent({
|
|
|
12073
12093
|
}) {
|
|
12074
12094
|
switch (state.type) {
|
|
12075
12095
|
case "error":
|
|
12076
|
-
return /* @__PURE__ */ (0,
|
|
12096
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(ErrorResult, { state });
|
|
12077
12097
|
case "results":
|
|
12078
|
-
return /* @__PURE__ */ (0,
|
|
12098
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(SearchResults, { state, onChange });
|
|
12079
12099
|
case "noResults":
|
|
12080
|
-
return /* @__PURE__ */ (0,
|
|
12100
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(EmptySearchResult, { state });
|
|
12081
12101
|
case "pending":
|
|
12082
12102
|
default:
|
|
12083
12103
|
return null;
|
|
12084
12104
|
}
|
|
12085
12105
|
}
|
|
12086
12106
|
function EmptySearchResult({ state }) {
|
|
12087
|
-
return /* @__PURE__ */ (0,
|
|
12107
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_components26.Markdown, { className: "m-t-2", config: { link: { target: "_blank" } }, children: state.message });
|
|
12088
12108
|
}
|
|
12089
12109
|
function SearchResults({
|
|
12090
12110
|
state
|
|
12091
12111
|
}) {
|
|
12092
12112
|
const trackEvent = useTrackEvent();
|
|
12093
|
-
return /* @__PURE__ */ (0,
|
|
12094
|
-
|
|
12113
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_components26.NavigationOptionsList, { children: state.results.map((result) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
12114
|
+
import_components26.NavigationOption,
|
|
12095
12115
|
{
|
|
12096
12116
|
title: result.title,
|
|
12097
12117
|
content: result.description,
|
|
12098
|
-
media: /* @__PURE__ */ (0,
|
|
12118
|
+
media: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(NavigationOptionMedia, __spreadValues({}, result)),
|
|
12099
12119
|
showMediaCircle: false,
|
|
12100
12120
|
showMediaAtAllSizes: true,
|
|
12101
12121
|
onClick: () => {
|
|
@@ -12111,10 +12131,10 @@ function SearchResults({
|
|
|
12111
12131
|
var BlockSearchRendererComponent_default = BlockSearchRendererComponent;
|
|
12112
12132
|
|
|
12113
12133
|
// src/revamp/wise/renderers/SearchRenderer/InlineSearchRendererComponent.tsx
|
|
12114
|
-
var
|
|
12134
|
+
var import_components27 = require("@transferwise/components");
|
|
12115
12135
|
var import_icons2 = require("@transferwise/icons");
|
|
12116
12136
|
var import_react16 = require("react");
|
|
12117
|
-
var
|
|
12137
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
12118
12138
|
function InlineSearchRenderer({
|
|
12119
12139
|
id,
|
|
12120
12140
|
isLoading,
|
|
@@ -12125,19 +12145,19 @@ function InlineSearchRenderer({
|
|
|
12125
12145
|
}) {
|
|
12126
12146
|
const [hasSearched, setHasSearched] = (0, import_react16.useState)(false);
|
|
12127
12147
|
const trackEvent = useTrackEvent();
|
|
12128
|
-
return /* @__PURE__ */ (0,
|
|
12148
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: getMargin(margin), children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(FieldInput_default, { id, description: "", error: "", help: "", label: title, children: [
|
|
12129
12149
|
id,
|
|
12130
|
-
/* @__PURE__ */ (0,
|
|
12131
|
-
|
|
12150
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
12151
|
+
import_components27.Typeahead,
|
|
12132
12152
|
{
|
|
12133
12153
|
id: "typeahead-input-id",
|
|
12134
12154
|
name: "typeahead-input-name",
|
|
12135
12155
|
size: "md",
|
|
12136
12156
|
maxHeight: 100,
|
|
12137
|
-
footer: /* @__PURE__ */ (0,
|
|
12157
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(TypeaheadFooter, { state, isLoading }),
|
|
12138
12158
|
multiple: false,
|
|
12139
12159
|
clearable: false,
|
|
12140
|
-
addon: /* @__PURE__ */ (0,
|
|
12160
|
+
addon: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_icons2.Search, { size: 24 }),
|
|
12141
12161
|
options: state.type === "results" ? state.results.map(mapResultToTypeaheadOption) : [],
|
|
12142
12162
|
minQueryLength: 1,
|
|
12143
12163
|
onChange: (values) => {
|
|
@@ -12174,29 +12194,29 @@ function mapResultToTypeaheadOption(result) {
|
|
|
12174
12194
|
}
|
|
12175
12195
|
function TypeaheadFooter({ state, isLoading }) {
|
|
12176
12196
|
if (state.type === "noResults") {
|
|
12177
|
-
return /* @__PURE__ */ (0,
|
|
12197
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_components27.Markdown, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: state.message });
|
|
12178
12198
|
}
|
|
12179
12199
|
if (state.type === "error") {
|
|
12180
|
-
return /* @__PURE__ */ (0,
|
|
12200
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(ErrorResult, { state }) });
|
|
12181
12201
|
}
|
|
12182
12202
|
if (state.type === "pending" || isLoading) {
|
|
12183
|
-
return /* @__PURE__ */ (0,
|
|
12203
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { className: "m-t-2 m-x-2", children: "Loading..." });
|
|
12184
12204
|
}
|
|
12185
12205
|
return null;
|
|
12186
12206
|
}
|
|
12187
12207
|
var InlineSearchRendererComponent_default = InlineSearchRenderer;
|
|
12188
12208
|
|
|
12189
12209
|
// src/revamp/wise/renderers/SearchRenderer/SearchRenderer.tsx
|
|
12190
|
-
var
|
|
12210
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
12191
12211
|
var SearchRenderer = {
|
|
12192
12212
|
canRenderType: "search",
|
|
12193
|
-
render: (props) => props.control === "inline" ? /* @__PURE__ */ (0,
|
|
12213
|
+
render: (props) => props.control === "inline" ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(InlineSearchRendererComponent_default, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(BlockSearchRendererComponent_default, __spreadValues({}, props))
|
|
12194
12214
|
};
|
|
12195
12215
|
var SearchRenderer_default = SearchRenderer;
|
|
12196
12216
|
|
|
12197
12217
|
// src/revamp/wise/renderers/SelectInputRenderer/RadioInputRendererComponent.tsx
|
|
12198
|
-
var
|
|
12199
|
-
var
|
|
12218
|
+
var import_components28 = require("@transferwise/components");
|
|
12219
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
12200
12220
|
function RadioInputRendererComponent(props) {
|
|
12201
12221
|
const {
|
|
12202
12222
|
id,
|
|
@@ -12210,9 +12230,9 @@ function RadioInputRendererComponent(props) {
|
|
|
12210
12230
|
selectedIndex,
|
|
12211
12231
|
onSelect
|
|
12212
12232
|
} = props;
|
|
12213
|
-
return /* @__PURE__ */ (0,
|
|
12214
|
-
/* @__PURE__ */ (0,
|
|
12215
|
-
|
|
12233
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_jsx_runtime45.Fragment, { children: [
|
|
12234
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(FieldInput_default, { id, label, help, description, error, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
12235
|
+
import_components28.RadioGroup,
|
|
12216
12236
|
{
|
|
12217
12237
|
name: id,
|
|
12218
12238
|
radios: options.map((option, index) => ({
|
|
@@ -12220,7 +12240,7 @@ function RadioInputRendererComponent(props) {
|
|
|
12220
12240
|
value: index,
|
|
12221
12241
|
secondary: option.description,
|
|
12222
12242
|
disabled: option.disabled || disabled,
|
|
12223
|
-
avatar: /* @__PURE__ */ (0,
|
|
12243
|
+
avatar: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(OptionMedia, { icon: option.icon, image: option.image })
|
|
12224
12244
|
})),
|
|
12225
12245
|
selectedValue: selectedIndex != null ? selectedIndex : void 0,
|
|
12226
12246
|
onChange: onSelect
|
|
@@ -12232,9 +12252,9 @@ function RadioInputRendererComponent(props) {
|
|
|
12232
12252
|
}
|
|
12233
12253
|
|
|
12234
12254
|
// src/revamp/wise/renderers/SelectInputRenderer/TabInputRendererComponent.tsx
|
|
12235
|
-
var
|
|
12255
|
+
var import_components29 = require("@transferwise/components");
|
|
12236
12256
|
var import_react17 = require("react");
|
|
12237
|
-
var
|
|
12257
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
12238
12258
|
function TabInputRendererComponent(props) {
|
|
12239
12259
|
const {
|
|
12240
12260
|
id,
|
|
@@ -12253,9 +12273,9 @@ function TabInputRendererComponent(props) {
|
|
|
12253
12273
|
onSelect(0);
|
|
12254
12274
|
}
|
|
12255
12275
|
}, [selectedIndex, onSelect, options.length]);
|
|
12256
|
-
return /* @__PURE__ */ (0,
|
|
12257
|
-
/* @__PURE__ */ (0,
|
|
12258
|
-
|
|
12276
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
|
|
12277
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(FieldInput_default, { id, label, help, description, error, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
12278
|
+
import_components29.Tabs,
|
|
12259
12279
|
{
|
|
12260
12280
|
name: id,
|
|
12261
12281
|
selected: selectedIndex != null ? selectedIndex : 0,
|
|
@@ -12263,7 +12283,7 @@ function TabInputRendererComponent(props) {
|
|
|
12263
12283
|
title: option.title,
|
|
12264
12284
|
// if we pass null, we get some props-types console errors
|
|
12265
12285
|
// eslint-disable-next-line react/jsx-no-useless-fragment
|
|
12266
|
-
content: /* @__PURE__ */ (0,
|
|
12286
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_jsx_runtime46.Fragment, {}),
|
|
12267
12287
|
disabled: option.disabled || disabled
|
|
12268
12288
|
})),
|
|
12269
12289
|
onTabSelect: onSelect
|
|
@@ -12275,26 +12295,26 @@ function TabInputRendererComponent(props) {
|
|
|
12275
12295
|
var isValidIndex = (index, options) => index !== null && index >= 0 && index < options;
|
|
12276
12296
|
|
|
12277
12297
|
// src/revamp/wise/renderers/SelectInputRenderer/SelectInputRendererComponent.tsx
|
|
12278
|
-
var
|
|
12298
|
+
var import_components31 = require("@transferwise/components");
|
|
12279
12299
|
|
|
12280
12300
|
// src/revamp/wise/renderers/SelectInputRenderer/SelectTriggerMedia.tsx
|
|
12281
|
-
var
|
|
12282
|
-
var
|
|
12301
|
+
var import_components30 = require("@transferwise/components");
|
|
12302
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
12283
12303
|
function SelectTriggerMedia({ icon, image }) {
|
|
12284
12304
|
if (image == null ? void 0 : image.url) {
|
|
12285
12305
|
return null;
|
|
12286
12306
|
}
|
|
12287
12307
|
if (icon && "name" in icon) {
|
|
12288
|
-
return /* @__PURE__ */ (0,
|
|
12308
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_components30.Avatar, { type: import_components30.AvatarType.ICON, size: 24, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(DynamicIcon_default, { name: icon.name }) });
|
|
12289
12309
|
}
|
|
12290
12310
|
if (icon && "text" in icon) {
|
|
12291
|
-
return /* @__PURE__ */ (0,
|
|
12311
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_components30.Avatar, { type: import_components30.AvatarType.ICON, size: 24, children: icon.text });
|
|
12292
12312
|
}
|
|
12293
12313
|
return null;
|
|
12294
12314
|
}
|
|
12295
12315
|
|
|
12296
12316
|
// src/revamp/wise/renderers/SelectInputRenderer/SelectInputRendererComponent.tsx
|
|
12297
|
-
var
|
|
12317
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
12298
12318
|
function SelectInputRendererComponent(props) {
|
|
12299
12319
|
const {
|
|
12300
12320
|
id,
|
|
@@ -12329,17 +12349,17 @@ function SelectInputRendererComponent(props) {
|
|
|
12329
12349
|
const contentProps = withinTrigger ? {
|
|
12330
12350
|
title: option.title,
|
|
12331
12351
|
note: option.description,
|
|
12332
|
-
icon: /* @__PURE__ */ (0,
|
|
12352
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(SelectTriggerMedia, { icon: option.icon, image: option.image })
|
|
12333
12353
|
} : {
|
|
12334
12354
|
title: option.title,
|
|
12335
12355
|
description: option.description,
|
|
12336
|
-
icon: /* @__PURE__ */ (0,
|
|
12356
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(OptionMedia, { icon: option.icon, image: option.image })
|
|
12337
12357
|
};
|
|
12338
|
-
return /* @__PURE__ */ (0,
|
|
12358
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_components31.SelectInputOptionContent, __spreadValues({}, contentProps));
|
|
12339
12359
|
};
|
|
12340
|
-
return /* @__PURE__ */ (0,
|
|
12341
|
-
/* @__PURE__ */ (0,
|
|
12342
|
-
|
|
12360
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_jsx_runtime48.Fragment, { children: [
|
|
12361
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(FieldInput_default, { id, label, help, description, error, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
12362
|
+
import_components31.SelectInput,
|
|
12343
12363
|
{
|
|
12344
12364
|
name: id,
|
|
12345
12365
|
placeholder,
|
|
@@ -12358,8 +12378,8 @@ function SelectInputRendererComponent(props) {
|
|
|
12358
12378
|
|
|
12359
12379
|
// src/revamp/wise/renderers/SelectInputRenderer/SegmentedInputRendererComponent.tsx
|
|
12360
12380
|
var import_react18 = require("react");
|
|
12361
|
-
var
|
|
12362
|
-
var
|
|
12381
|
+
var import_components32 = require("@transferwise/components");
|
|
12382
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
12363
12383
|
function SegmentedInputRendererComponent(props) {
|
|
12364
12384
|
const { id, children, description, error, help, label, options, selectedIndex, onSelect } = props;
|
|
12365
12385
|
(0, import_react18.useEffect)(() => {
|
|
@@ -12367,9 +12387,9 @@ function SegmentedInputRendererComponent(props) {
|
|
|
12367
12387
|
onSelect(0);
|
|
12368
12388
|
}
|
|
12369
12389
|
}, [selectedIndex, onSelect, options.length]);
|
|
12370
|
-
return /* @__PURE__ */ (0,
|
|
12371
|
-
/* @__PURE__ */ (0,
|
|
12372
|
-
|
|
12390
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
|
|
12391
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(FieldInput_default, { id, label, help, description, error, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
12392
|
+
import_components32.SegmentedControl,
|
|
12373
12393
|
{
|
|
12374
12394
|
name: `${id}-segmented-control`,
|
|
12375
12395
|
value: String(selectedIndex),
|
|
@@ -12383,44 +12403,44 @@ function SegmentedInputRendererComponent(props) {
|
|
|
12383
12403
|
onChange: (value) => onSelect(Number(value))
|
|
12384
12404
|
}
|
|
12385
12405
|
) }),
|
|
12386
|
-
/* @__PURE__ */ (0,
|
|
12406
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { id: `${id}-children`, children })
|
|
12387
12407
|
] });
|
|
12388
12408
|
}
|
|
12389
12409
|
var isValidIndex2 = (index, options) => index !== null && index >= 0 && index < options;
|
|
12390
12410
|
|
|
12391
12411
|
// src/revamp/wise/renderers/SelectInputRenderer/SelectInputRenderer.tsx
|
|
12392
|
-
var
|
|
12412
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
12393
12413
|
var SelectInputRenderer = {
|
|
12394
12414
|
canRenderType: "input-select",
|
|
12395
12415
|
render: (props) => {
|
|
12396
12416
|
switch (props.control) {
|
|
12397
12417
|
case "radio":
|
|
12398
|
-
return /* @__PURE__ */ (0,
|
|
12418
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(RadioInputRendererComponent, __spreadValues({}, props));
|
|
12399
12419
|
case "tab":
|
|
12400
|
-
return props.options.length > 3 ? /* @__PURE__ */ (0,
|
|
12420
|
+
return props.options.length > 3 ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(TabInputRendererComponent, __spreadValues({}, props));
|
|
12401
12421
|
case "segmented":
|
|
12402
|
-
return props.options.length > 3 ? /* @__PURE__ */ (0,
|
|
12422
|
+
return props.options.length > 3 ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SegmentedInputRendererComponent, __spreadValues({}, props));
|
|
12403
12423
|
case "select":
|
|
12404
12424
|
default:
|
|
12405
|
-
return /* @__PURE__ */ (0,
|
|
12425
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SelectInputRendererComponent, __spreadValues({}, props));
|
|
12406
12426
|
}
|
|
12407
12427
|
}
|
|
12408
12428
|
};
|
|
12409
12429
|
var SelectInputRenderer_default = SelectInputRenderer;
|
|
12410
12430
|
|
|
12411
12431
|
// src/revamp/wise/renderers/StatusListRenderer.tsx
|
|
12412
|
-
var
|
|
12413
|
-
var
|
|
12432
|
+
var import_components33 = require("@transferwise/components");
|
|
12433
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
12414
12434
|
var StatusListRenderer = {
|
|
12415
12435
|
canRenderType: "status-list",
|
|
12416
|
-
render: ({ margin, items, title }) => /* @__PURE__ */ (0,
|
|
12417
|
-
title ? /* @__PURE__ */ (0,
|
|
12418
|
-
items.map(({ description, icon, status, title: itemTitle }) => /* @__PURE__ */ (0,
|
|
12419
|
-
|
|
12436
|
+
render: ({ margin, items, title }) => /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: getMargin(margin), children: [
|
|
12437
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_components33.Header, { title }) : null,
|
|
12438
|
+
items.map(({ description, icon, status, title: itemTitle }) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
12439
|
+
import_components33.Summary,
|
|
12420
12440
|
{
|
|
12421
12441
|
title: itemTitle,
|
|
12422
12442
|
description,
|
|
12423
|
-
icon: icon && "name" in icon ? /* @__PURE__ */ (0,
|
|
12443
|
+
icon: icon && "name" in icon ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(DynamicIcon_default, { name: icon.name }) : null,
|
|
12424
12444
|
status: mapStatus(status)
|
|
12425
12445
|
},
|
|
12426
12446
|
`${title}/${description || ""}`
|
|
@@ -12436,63 +12456,63 @@ var mapStatus = (status) => {
|
|
|
12436
12456
|
};
|
|
12437
12457
|
|
|
12438
12458
|
// src/revamp/wise/renderers/components/VariableTextInput.tsx
|
|
12439
|
-
var
|
|
12440
|
-
var
|
|
12459
|
+
var import_components34 = require("@transferwise/components");
|
|
12460
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
12441
12461
|
function VariableTextInput({
|
|
12442
12462
|
control,
|
|
12443
12463
|
inputProps
|
|
12444
12464
|
}) {
|
|
12445
12465
|
switch (control) {
|
|
12446
12466
|
case "password":
|
|
12447
|
-
return /* @__PURE__ */ (0,
|
|
12467
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(TextInput, __spreadValues({ type: "password" }, inputProps));
|
|
12448
12468
|
case "email":
|
|
12449
|
-
return /* @__PURE__ */ (0,
|
|
12469
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(TextInput, __spreadValues({ type: "email" }, inputProps));
|
|
12450
12470
|
case "textarea":
|
|
12451
|
-
return /* @__PURE__ */ (0,
|
|
12471
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(TextAreaInput, __spreadValues({}, inputProps));
|
|
12452
12472
|
case "numeric":
|
|
12453
|
-
return /* @__PURE__ */ (0,
|
|
12473
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(NumericInput, __spreadValues({ type: "number" }, inputProps));
|
|
12454
12474
|
case "phone-number":
|
|
12455
|
-
return /* @__PURE__ */ (0,
|
|
12475
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(PhoneNumberInput, __spreadValues({}, inputProps));
|
|
12456
12476
|
default:
|
|
12457
|
-
return /* @__PURE__ */ (0,
|
|
12477
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(TextInput, __spreadValues({ type: "text" }, inputProps));
|
|
12458
12478
|
}
|
|
12459
12479
|
}
|
|
12460
12480
|
function TextInput(_a) {
|
|
12461
12481
|
var _b = _a, { id, displayFormat, onChange } = _b, rest = __objRest(_b, ["id", "displayFormat", "onChange"]);
|
|
12462
12482
|
if (typeof displayFormat === "string") {
|
|
12463
12483
|
const inputProps = __spreadValues({ id, name: id, className: "form-control" }, rest);
|
|
12464
|
-
return /* @__PURE__ */ (0,
|
|
12465
|
-
|
|
12484
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12485
|
+
import_components34.InputWithDisplayFormat,
|
|
12466
12486
|
__spreadValues({
|
|
12467
12487
|
displayPattern: displayFormat,
|
|
12468
12488
|
onChange: (newValue) => onChange(newValue)
|
|
12469
12489
|
}, inputProps)
|
|
12470
12490
|
);
|
|
12471
12491
|
}
|
|
12472
|
-
return /* @__PURE__ */ (0,
|
|
12492
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_components34.Input, __spreadValues({ id, name: id, onChange: (e) => onChange(e.target.value) }, rest));
|
|
12473
12493
|
}
|
|
12474
12494
|
function TextAreaInput(_a) {
|
|
12475
12495
|
var _b = _a, { id, displayFormat, onChange } = _b, rest = __objRest(_b, ["id", "displayFormat", "onChange"]);
|
|
12476
12496
|
const textAreaProps = __spreadValues({ id, name: id }, rest);
|
|
12477
|
-
return typeof displayFormat === "string" ? /* @__PURE__ */ (0,
|
|
12478
|
-
|
|
12497
|
+
return typeof displayFormat === "string" ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12498
|
+
import_components34.TextareaWithDisplayFormat,
|
|
12479
12499
|
__spreadValues({
|
|
12480
12500
|
displayPattern: displayFormat,
|
|
12481
12501
|
onChange: (newValue) => onChange(newValue)
|
|
12482
12502
|
}, textAreaProps)
|
|
12483
|
-
) : /* @__PURE__ */ (0,
|
|
12503
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_components34.TextArea, __spreadValues({ onChange: (e) => onChange(e.target.value) }, textAreaProps));
|
|
12484
12504
|
}
|
|
12485
12505
|
function NumericInput(_a) {
|
|
12486
12506
|
var _b = _a, { id, displayFormat, onChange } = _b, rest = __objRest(_b, ["id", "displayFormat", "onChange"]);
|
|
12487
12507
|
const numericProps = __spreadValues({ id, name: id, onWheel }, rest);
|
|
12488
|
-
return typeof displayFormat === "string" ? /* @__PURE__ */ (0,
|
|
12489
|
-
|
|
12508
|
+
return typeof displayFormat === "string" ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12509
|
+
import_components34.InputWithDisplayFormat,
|
|
12490
12510
|
__spreadValues({
|
|
12491
12511
|
displayPattern: displayFormat,
|
|
12492
12512
|
onChange: (newValue) => onChange(numericValueOrNull(newValue))
|
|
12493
12513
|
}, numericProps)
|
|
12494
|
-
) : /* @__PURE__ */ (0,
|
|
12495
|
-
|
|
12514
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12515
|
+
import_components34.Input,
|
|
12496
12516
|
__spreadValues({
|
|
12497
12517
|
onChange: ({ target: { value: newValue } }) => onChange(numericValueOrNull(newValue))
|
|
12498
12518
|
}, numericProps)
|
|
@@ -12500,12 +12520,12 @@ function NumericInput(_a) {
|
|
|
12500
12520
|
}
|
|
12501
12521
|
function PhoneNumberInput(_a) {
|
|
12502
12522
|
var _b = _a, { value } = _b, rest = __objRest(_b, ["value"]);
|
|
12503
|
-
return /* @__PURE__ */ (0,
|
|
12523
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_components34.PhoneNumberInput, __spreadValues({ initialValue: value }, rest));
|
|
12504
12524
|
}
|
|
12505
12525
|
var VariableTextInput_default = VariableTextInput;
|
|
12506
12526
|
|
|
12507
12527
|
// src/revamp/wise/renderers/TextInputRenderer.tsx
|
|
12508
|
-
var
|
|
12528
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
12509
12529
|
var TextInputRenderer = {
|
|
12510
12530
|
canRenderType: "input-text",
|
|
12511
12531
|
render: (props) => {
|
|
@@ -12530,14 +12550,14 @@ var TextInputRenderer = {
|
|
|
12530
12550
|
]);
|
|
12531
12551
|
const value = initialValue != null ? initialValue : "";
|
|
12532
12552
|
const inputProps = __spreadProps(__spreadValues({}, rest), { value, id });
|
|
12533
|
-
return /* @__PURE__ */ (0,
|
|
12553
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(FieldInput_default, { id, label, description, error, help, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(VariableTextInput_default, { control, inputProps }) });
|
|
12534
12554
|
}
|
|
12535
12555
|
};
|
|
12536
12556
|
var TextInputRenderer_default = TextInputRenderer;
|
|
12537
12557
|
|
|
12538
12558
|
// src/revamp/wise/renderers/UploadInputRenderer.tsx
|
|
12539
|
-
var
|
|
12540
|
-
var
|
|
12559
|
+
var import_components35 = require("@transferwise/components");
|
|
12560
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
12541
12561
|
var UploadInputRenderer = {
|
|
12542
12562
|
canRenderType: "input-upload",
|
|
12543
12563
|
render: (props) => {
|
|
@@ -12553,8 +12573,8 @@ var UploadInputRenderer = {
|
|
|
12553
12573
|
};
|
|
12554
12574
|
return (
|
|
12555
12575
|
// We don't pass help here as there is no sensible place to display it
|
|
12556
|
-
/* @__PURE__ */ (0,
|
|
12557
|
-
|
|
12576
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(UploadFieldInput_default, { id, label: void 0, description: void 0, error, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
12577
|
+
import_components35.UploadInput,
|
|
12558
12578
|
{
|
|
12559
12579
|
id,
|
|
12560
12580
|
description,
|
|
@@ -12608,8 +12628,8 @@ var LargeUploadRenderer = {
|
|
|
12608
12628
|
throw e;
|
|
12609
12629
|
}
|
|
12610
12630
|
};
|
|
12611
|
-
return /* @__PURE__ */ (0,
|
|
12612
|
-
|
|
12631
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(FieldInput_default, { id, label, description, error, help, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
12632
|
+
import_components35.Upload,
|
|
12613
12633
|
__spreadProps(__spreadValues({}, uploadProps), {
|
|
12614
12634
|
usAccept: getAcceptsString(accepts),
|
|
12615
12635
|
usDisabled: disabled,
|
|
@@ -12621,6 +12641,67 @@ var LargeUploadRenderer = {
|
|
|
12621
12641
|
}
|
|
12622
12642
|
};
|
|
12623
12643
|
|
|
12644
|
+
// src/revamp/wise/renderers/ReviewRenderer.tsx
|
|
12645
|
+
var import_components36 = require("@transferwise/components");
|
|
12646
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
12647
|
+
var ReviewRenderer = {
|
|
12648
|
+
canRenderType: "review",
|
|
12649
|
+
render: ({ callToAction, control, fields, margin, title }) => {
|
|
12650
|
+
const orientation = mapControlToDefinitionListLayout(control);
|
|
12651
|
+
const action = callToAction ? {
|
|
12652
|
+
text: callToAction.title,
|
|
12653
|
+
onClick: (event) => {
|
|
12654
|
+
event.preventDefault();
|
|
12655
|
+
callToAction.onClick();
|
|
12656
|
+
}
|
|
12657
|
+
} : void 0;
|
|
12658
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: getMargin(margin), children: [
|
|
12659
|
+
(title || callToAction) && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_components36.Header, { title: title != null ? title : "", action }),
|
|
12660
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: margin, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
12661
|
+
import_components36.DefinitionList,
|
|
12662
|
+
{
|
|
12663
|
+
layout: orientation,
|
|
12664
|
+
definitions: fields.map(({ label, value, help }, index) => ({
|
|
12665
|
+
key: String(index),
|
|
12666
|
+
title: label,
|
|
12667
|
+
value: getFieldValue(value, help, orientation)
|
|
12668
|
+
}))
|
|
12669
|
+
}
|
|
12670
|
+
) })
|
|
12671
|
+
] });
|
|
12672
|
+
}
|
|
12673
|
+
};
|
|
12674
|
+
var ReviewRenderer_default = ReviewRenderer;
|
|
12675
|
+
var mapControlToDefinitionListLayout = (control) => {
|
|
12676
|
+
switch (control) {
|
|
12677
|
+
case "horizontal":
|
|
12678
|
+
case "horizontal-end-aligned":
|
|
12679
|
+
return "HORIZONTAL_RIGHT_ALIGNED";
|
|
12680
|
+
case "horizontal-start-aligned":
|
|
12681
|
+
return "HORIZONTAL_LEFT_ALIGNED";
|
|
12682
|
+
case "vertical-two-column":
|
|
12683
|
+
return "VERTICAL_TWO_COLUMN";
|
|
12684
|
+
case "vertical":
|
|
12685
|
+
case "vertical-one-column":
|
|
12686
|
+
default:
|
|
12687
|
+
return "VERTICAL_ONE_COLUMN";
|
|
12688
|
+
}
|
|
12689
|
+
};
|
|
12690
|
+
var getFieldValue = (value, help, orientation) => {
|
|
12691
|
+
if (help) {
|
|
12692
|
+
return orientation === "HORIZONTAL_RIGHT_ALIGNED" ? /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_jsx_runtime55.Fragment, { children: [
|
|
12693
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Help_default, { help }),
|
|
12694
|
+
" ",
|
|
12695
|
+
value
|
|
12696
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_jsx_runtime55.Fragment, { children: [
|
|
12697
|
+
value,
|
|
12698
|
+
" ",
|
|
12699
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Help_default, { help })
|
|
12700
|
+
] });
|
|
12701
|
+
}
|
|
12702
|
+
return value;
|
|
12703
|
+
};
|
|
12704
|
+
|
|
12624
12705
|
// src/revamp/wise/renderers/step/StepRenderer.tsx
|
|
12625
12706
|
var import_react20 = require("react");
|
|
12626
12707
|
|
|
@@ -19528,79 +19609,6 @@ function JsonSchemaForm(props) {
|
|
|
19528
19609
|
var JsonSchemaForm_default = JsonSchemaForm;
|
|
19529
19610
|
var noop8 = () => {
|
|
19530
19611
|
};
|
|
19531
|
-
|
|
19532
|
-
// src/revamp/wise/renderers/step/KYCCameraStepRenderer.tsx
|
|
19533
|
-
var import_react67 = require("react");
|
|
19534
|
-
var import_jsx_runtime130 = require("react/jsx-runtime");
|
|
19535
|
-
var KYCCameraStepRenderer = {
|
|
19536
|
-
canRenderType: "step",
|
|
19537
|
-
canRender: (props) => getKYCCameraStepConfiguration(props.step) != null,
|
|
19538
|
-
render: KYCCameraStepRendererComponent
|
|
19539
|
-
};
|
|
19540
|
-
function KYCCameraStepRendererComponent(props) {
|
|
19541
|
-
const { error, trackEvent, step, onAction } = props;
|
|
19542
|
-
(0, import_react67.useEffect)(() => {
|
|
19543
|
-
if (error) {
|
|
19544
|
-
console.error("KYCCameraStepRendererComponent", error);
|
|
19545
|
-
}
|
|
19546
|
-
}, [error]);
|
|
19547
|
-
const config = getKYCCameraStepConfiguration(step);
|
|
19548
|
-
if (!config) {
|
|
19549
|
-
return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_jsx_runtime130.Fragment, {});
|
|
19550
|
-
}
|
|
19551
|
-
const handleCapture = async (blob) => {
|
|
19552
|
-
if (blob) {
|
|
19553
|
-
const newValue = { [propertyName]: await blobToBase642(blob) };
|
|
19554
|
-
const patchedAction = __spreadProps(__spreadValues({}, action), { skipValidation: true, data: newValue });
|
|
19555
|
-
void onAction(patchedAction);
|
|
19556
|
-
}
|
|
19557
|
-
};
|
|
19558
|
-
const { title, imageUrl, cameraConfig, action, propertyName } = config;
|
|
19559
|
-
const kycCameraConfig = cameraConfig;
|
|
19560
|
-
const { assets, instructions, direction } = kycCameraConfig;
|
|
19561
|
-
return config ? /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
19562
|
-
CameraCapture_default,
|
|
19563
|
-
{
|
|
19564
|
-
overlay: assets == null ? void 0 : assets.overlay,
|
|
19565
|
-
outline: assets == null ? void 0 : assets.outline,
|
|
19566
|
-
title: error != null ? error : title,
|
|
19567
|
-
imageUrl,
|
|
19568
|
-
instructions,
|
|
19569
|
-
direction,
|
|
19570
|
-
onEvent: trackEvent,
|
|
19571
|
-
onCapture: (blob) => {
|
|
19572
|
-
void handleCapture(blob);
|
|
19573
|
-
}
|
|
19574
|
-
},
|
|
19575
|
-
error
|
|
19576
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_jsx_runtime130.Fragment, {});
|
|
19577
|
-
}
|
|
19578
|
-
var getKYCCameraStepConfiguration = (step) => {
|
|
19579
|
-
var _a, _b, _c;
|
|
19580
|
-
const action = (_a = step.actions) == null ? void 0 : _a[0];
|
|
19581
|
-
if (action === void 0) {
|
|
19582
|
-
return null;
|
|
19583
|
-
}
|
|
19584
|
-
const firstSchema = filterHiddenSchemas2((_b = step.schemas) != null ? _b : [])[0];
|
|
19585
|
-
if (!firstSchema || !isObjectSchema(firstSchema)) {
|
|
19586
|
-
return null;
|
|
19587
|
-
}
|
|
19588
|
-
const propertyName = Object.keys(firstSchema.properties)[0];
|
|
19589
|
-
const childSchema = propertyName ? firstSchema.properties[propertyName] : void 0;
|
|
19590
|
-
const cameraConfig = childSchema ? getCameraConfig(childSchema) : null;
|
|
19591
|
-
const title = childSchema == null ? void 0 : childSchema.title;
|
|
19592
|
-
const imageUrl = (_c = childSchema == null ? void 0 : childSchema.image) == null ? void 0 : _c.url;
|
|
19593
|
-
return action && propertyName && cameraConfig ? { title, imageUrl, propertyName, cameraConfig, action } : null;
|
|
19594
|
-
};
|
|
19595
|
-
var getCameraConfig = (childSchema) => childSchema != null && "type" in childSchema && childSchema.type === "string" && childSchema.format === "base64url" && childSchema.source === "camera" && childSchema.cameraConfig != null ? childSchema.cameraConfig : null;
|
|
19596
|
-
var filterHiddenSchemas2 = (schemas) => schemas.filter(
|
|
19597
|
-
(schema) => isObjectSchema(schema) ? Object.values((schema == null ? void 0 : schema.properties) || {}).find((s) => (s == null ? void 0 : s.hidden) !== true) : (schema == null ? void 0 : schema.hidden) !== true
|
|
19598
|
-
);
|
|
19599
|
-
var blobToBase642 = (blob) => new Promise((resolve, _) => {
|
|
19600
|
-
const reader = new FileReader();
|
|
19601
|
-
reader.onloadend = () => resolve(reader.result);
|
|
19602
|
-
reader.readAsDataURL(blob);
|
|
19603
|
-
});
|
|
19604
19612
|
/*! Bundled license information:
|
|
19605
19613
|
|
|
19606
19614
|
classnames/index.js:
|