@wise/dynamic-flow-client 5.11.0 → 5.12.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 +15 -1
- package/build/main.mjs +15 -1
- package/build/types/controller/executePoll.d.ts.map +1 -1
- package/package.json +1 -1
- package/build/DynamicFlowCore.js +0 -5
- package/build/common/errorBoundary/ErrorBoundary.js +0 -26
- package/build/common/errorBoundary/ErrorBoundary.test.js +0 -29
- package/build/common/errorBoundary/ErrorBoundaryAlert.js +0 -11
- package/build/common/makeHttpClient/api-utils.js +0 -3
- package/build/common/makeHttpClient/index.js +0 -1
- package/build/common/makeHttpClient/makeHttpClient.js +0 -10
- package/build/common/makeHttpClient/makeHttpClient.test.js +0 -186
- package/build/common/messages/external-confirmation.messages.js +0 -23
- package/build/common/messages/file-upload.messages.js +0 -13
- 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/search.messages.js +0 -8
- package/build/common/messages/validation.array.messages.js +0 -13
- package/build/common/messages/validation.messages.js +0 -53
- package/build/controller/FlowController.js +0 -373
- package/build/controller/executePoll.js +0 -49
- package/build/controller/executeRefresh.js +0 -45
- package/build/controller/executeRequest.js +0 -80
- package/build/controller/executeSubmission.js +0 -70
- package/build/controller/getErrorMessage.js +0 -7
- package/build/controller/getRequestAbortController.js +0 -13
- package/build/controller/getResponseType.js +0 -35
- package/build/controller/getSafeHttpClient.js +0 -8
- package/build/controller/getStepCounter.js +0 -16
- package/build/controller/handleErrorResponse.js +0 -26
- package/build/controller/makeSafeHttpClient.js +0 -8
- package/build/controller/response-utils.js +0 -72
- package/build/domain/components/AlertComponent.js +0 -1
- package/build/domain/components/AllOfComponent.js +0 -40
- package/build/domain/components/BooleanInputComponent.js +0 -50
- package/build/domain/components/BoxComponent.js +0 -3
- package/build/domain/components/ButtonComponent.js +0 -1
- package/build/domain/components/ColumnsComponent.js +0 -3
- package/build/domain/components/ConstComponent.js +0 -18
- package/build/domain/components/ContainerComponent.js +0 -3
- package/build/domain/components/DateInputComponent.js +0 -75
- package/build/domain/components/DecisionComponent.js +0 -1
- package/build/domain/components/DividerComponent.js +0 -1
- package/build/domain/components/FormComponent.js +0 -3
- package/build/domain/components/FormattedValueComponent.js +0 -44
- package/build/domain/components/HeadingComponent.js +0 -1
- package/build/domain/components/ImageComponent.js +0 -1
- package/build/domain/components/InstructionsComponent.js +0 -1
- package/build/domain/components/IntegerInputComponent.js +0 -74
- package/build/domain/components/ListComponent.js +0 -1
- package/build/domain/components/LoadingIndicatorComponent.js +0 -1
- package/build/domain/components/MarkdownComponent.js +0 -1
- package/build/domain/components/MediaComponent.js +0 -1
- package/build/domain/components/ModalComponent.js +0 -16
- package/build/domain/components/ModalLayoutComponent.js +0 -3
- package/build/domain/components/MoneyInputComponent.js +0 -57
- package/build/domain/components/MultiSelectInputComponent.js +0 -81
- package/build/domain/components/MultiUploadInputComponent.js +0 -88
- package/build/domain/components/NumberInputComponent.js +0 -73
- package/build/domain/components/ObjectComponent.js +0 -45
- package/build/domain/components/ParagraphComponent.js +0 -1
- package/build/domain/components/PersistAsyncComponent.js +0 -92
- package/build/domain/components/ProgressComponent.js +0 -1
- package/build/domain/components/RepeatableComponent.js +0 -103
- package/build/domain/components/ReviewComponent.js +0 -1
- package/build/domain/components/RootDomainComponent.js +0 -173
- package/build/domain/components/SectionComponent.js +0 -5
- package/build/domain/components/SelectInputComponent.js +0 -88
- package/build/domain/components/StatusListComponent.js +0 -1
- package/build/domain/components/SubflowDomainComponent.js +0 -9
- package/build/domain/components/TabsComponent.js +0 -1
- package/build/domain/components/TextInputComponent.js +0 -76
- package/build/domain/components/TupleComponent.js +0 -41
- package/build/domain/components/UploadInputComponent.js +0 -83
- package/build/domain/components/UpsellComponent.js +0 -25
- package/build/domain/components/searchComponent/SearchComponent.js +0 -92
- package/build/domain/components/searchComponent/SearchComponent.test.js +0 -190
- package/build/domain/components/step/ExternalConfirmationComponent.js +0 -24
- package/build/domain/components/step/StepDomainComponent.js +0 -78
- package/build/domain/components/step/ToolbarComponent.js +0 -1
- package/build/domain/components/utils/WithUpdate.js +0 -1
- package/build/domain/components/utils/component-utils.js +0 -12
- package/build/domain/components/utils/debounce.js +0 -34
- package/build/domain/components/utils/debounce.test.js +0 -67
- package/build/domain/components/utils/file-utils.js +0 -21
- package/build/domain/components/utils/file-utils.test.js +0 -27
- package/build/domain/components/utils/getRandomId.js +0 -1
- package/build/domain/components/utils/isExactLocalValueMatch.js +0 -14
- package/build/domain/components/utils/isOrWasValid.js +0 -5
- package/build/domain/components/utils/isPartialModelMatch.js +0 -18
- package/build/domain/components/utils/isPartialModelMatch.test.js +0 -74
- package/build/domain/features/eventNames.js +0 -24
- package/build/domain/features/events.js +0 -1
- package/build/domain/features/persistAsync/getComponentMultiPersistAsync.js +0 -50
- package/build/domain/features/persistAsync/getInitialPersistedState.js +0 -7
- package/build/domain/features/persistAsync/getPerformPersistAsync.js +0 -43
- package/build/domain/features/persistAsync/getPerformPersistAsync.test.js +0 -139
- package/build/domain/features/polling/getStepPolling.js +0 -43
- package/build/domain/features/polling/getStepPolling.test.js +0 -90
- package/build/domain/features/prefetch/getStepPrefetch.js +0 -43
- package/build/domain/features/prefetch/request-cache.js +0 -49
- package/build/domain/features/prefetch/request-cache.test.js +0 -70
- package/build/domain/features/refreshAfter/getStepRefreshAfter.js +0 -24
- package/build/domain/features/refreshAfter/getStepRefreshAfter.test.js +0 -40
- package/build/domain/features/schema-on-change/getDebouncedSchemaOnChange.js +0 -50
- package/build/domain/features/schema-on-change/getSchemaOnChange.js +0 -34
- package/build/domain/features/search/getPerformSearchFunction.js +0 -75
- package/build/domain/features/search/getPerformSearchFunction.test.js +0 -301
- package/build/domain/features/summary/summary-utils.js +0 -40
- package/build/domain/features/summary/summary-utils.test.js +0 -125
- package/build/domain/features/utils/http-utils.js +0 -21
- package/build/domain/features/utils/response-utils.js +0 -9
- package/build/domain/features/validation/spec-utils.js +0 -19
- package/build/domain/features/validation/validateStringPattern.js +0 -24
- package/build/domain/features/validation/validation-functions.js +0 -6
- package/build/domain/features/validation/validation-functions.test.js +0 -108
- package/build/domain/features/validation/value-checks.js +0 -125
- package/build/domain/features/validation/value-checks.test.js +0 -262
- package/build/domain/features/validationAsync/getComponentValidationAsync.js +0 -53
- package/build/domain/features/validationAsync/getComponentValidationAsync.test.js +0 -67
- package/build/domain/features/validationAsync/getInitialValidationAsyncState.js +0 -5
- package/build/domain/features/validationAsync/getPerformValidationAsync.js +0 -45
- package/build/domain/features/validationAsync/getPerformValidationAsync.test.js +0 -143
- package/build/domain/mappers/layout/alertLayoutToComponent.js +0 -16
- package/build/domain/mappers/layout/boxLayoutToComponent.js +0 -13
- package/build/domain/mappers/layout/buttonLayoutToComponent.js +0 -77
- package/build/domain/mappers/layout/columnsLayoutToComponent.js +0 -13
- package/build/domain/mappers/layout/decisionLayoutToComponent.js +0 -22
- package/build/domain/mappers/layout/deprecatedListLayoutToComponent.js +0 -30
- package/build/domain/mappers/layout/dividerLayoutToComponent.js +0 -2
- package/build/domain/mappers/layout/formLayoutToComponent.js +0 -19
- package/build/domain/mappers/layout/headingLayoutToComponent.js +0 -12
- package/build/domain/mappers/layout/imageLayoutToComponent.js +0 -20
- package/build/domain/mappers/layout/infoLayoutToComponent.js +0 -12
- package/build/domain/mappers/layout/instructionsLayoutToComponent.js +0 -12
- package/build/domain/mappers/layout/listLayoutToComponent.js +0 -39
- package/build/domain/mappers/layout/loadingIndicatorLayoutToComponent.js +0 -9
- package/build/domain/mappers/layout/markdownLayoutToComponent.js +0 -12
- package/build/domain/mappers/layout/mediaLayoutToComponent.js +0 -12
- package/build/domain/mappers/layout/modalLayoutToComponent.js +0 -17
- package/build/domain/mappers/layout/modalToComponent.js +0 -8
- package/build/domain/mappers/layout/paragraphLayoutToComponent.js +0 -12
- package/build/domain/mappers/layout/progressLayoutToComponent.js +0 -15
- package/build/domain/mappers/layout/reviewLayoutToComponent.js +0 -48
- package/build/domain/mappers/layout/searchLayoutToComponent.js +0 -44
- package/build/domain/mappers/layout/sectionLayoutToComponent.js +0 -15
- package/build/domain/mappers/layout/statusListLayoutToComponent.js +0 -15
- package/build/domain/mappers/layout/tabsLayoutToComponent.js +0 -16
- package/build/domain/mappers/layout/upsellLayoutToComponent.js +0 -25
- package/build/domain/mappers/mapLayoutToComponent.js +0 -81
- package/build/domain/mappers/mapSchemaToComponent.js +0 -61
- package/build/domain/mappers/mapSchemaToComponent.test.js +0 -112
- package/build/domain/mappers/mapStepSchemas.js +0 -15
- package/build/domain/mappers/mapStepToComponent.js +0 -133
- package/build/domain/mappers/mapStepToComponent.test.js +0 -221
- package/build/domain/mappers/mapToolbarToComponent.js +0 -15
- package/build/domain/mappers/schema/allOfSchemaToComponent.js +0 -16
- package/build/domain/mappers/schema/arraySchemaToComponent/arraySchemaToComponent.js +0 -26
- package/build/domain/mappers/schema/arraySchemaToComponent/arraySchemaToMultiSelectComponent.js +0 -55
- package/build/domain/mappers/schema/arraySchemaToComponent/arraySchemaToMultiUploadComponent.js +0 -67
- package/build/domain/mappers/schema/arraySchemaToComponent/arraySchemaToRepeatableComponent.js +0 -57
- package/build/domain/mappers/schema/arraySchemaToComponent/arraySchemaToTupleComponent.js +0 -20
- package/build/domain/mappers/schema/blobSchemaToComponent.js +0 -15
- package/build/domain/mappers/schema/booleanSchemaToComponent.js +0 -29
- package/build/domain/mappers/schema/constSchemaToComponent.js +0 -23
- package/build/domain/mappers/schema/integerSchemaToComponent.js +0 -28
- package/build/domain/mappers/schema/numberSchemaToComponent.js +0 -26
- package/build/domain/mappers/schema/objectSchemaToComponent/assertDisplayOrder.js +0 -23
- package/build/domain/mappers/schema/objectSchemaToComponent/objectSchemaToFormattedValueComponent.js +0 -9
- package/build/domain/mappers/schema/objectSchemaToComponent/objectSchemaToMoneyInputComponent.js +0 -119
- package/build/domain/mappers/schema/objectSchemaToComponent/objectSchemaToMoneyInputComponent.test.js +0 -96
- package/build/domain/mappers/schema/objectSchemaToComponent/objectSchemaToObjectComponent.js +0 -31
- package/build/domain/mappers/schema/objectSchemaToComponent/objectSchemaToObjectComponent.test.js +0 -99
- package/build/domain/mappers/schema/oneOfSchemaToComponent/oneOfSchemaToComponent.js +0 -66
- package/build/domain/mappers/schema/oneOfSchemaToComponent/oneOfSchemaToComponent.test.js +0 -225
- package/build/domain/mappers/schema/persistAsyncSchemaToComponent.js +0 -29
- package/build/domain/mappers/schema/stringSchemaToComponent/stringSchemaToComponent.js +0 -18
- package/build/domain/mappers/schema/stringSchemaToComponent/stringSchemaToComponent.test.js +0 -133
- package/build/domain/mappers/schema/stringSchemaToComponent/stringSchemaToDateInputComponent.js +0 -48
- package/build/domain/mappers/schema/stringSchemaToComponent/stringSchemaToTextInputComponent.js +0 -37
- package/build/domain/mappers/schema/stringSchemaToComponent/stringSchemaToUploadInputComponent.js +0 -28
- package/build/domain/mappers/schema/tests/test-utils.js +0 -16
- package/build/domain/mappers/schema/types.js +0 -1
- package/build/domain/mappers/schema/utils/getPerformPersistAsyncFn.js +0 -19
- package/build/domain/mappers/schema/utils/getValidationAsyncInitialState.js +0 -23
- package/build/domain/mappers/schema/utils/mapCommonSchemaProps.js +0 -16
- package/build/domain/mappers/types.js +0 -1
- package/build/domain/mappers/utils/FeatureFlags.js +0 -22
- package/build/domain/mappers/utils/behavior-utils.js +0 -44
- package/build/domain/mappers/utils/call-to-action-utils.js +0 -21
- package/build/domain/mappers/utils/getAutocompleteString.js +0 -76
- package/build/domain/mappers/utils/getAutocompleteString.test.js +0 -21
- package/build/domain/mappers/utils/groupLayoutByPinned.js +0 -38
- package/build/domain/mappers/utils/groupLayoutByPinned.test.js +0 -166
- package/build/domain/mappers/utils/image.js +0 -9
- package/build/domain/mappers/utils/layout-utils.js +0 -11
- package/build/domain/mappers/utils/legacy-utils.js +0 -49
- package/build/domain/mappers/utils/media-utils.js +0 -14
- package/build/domain/mappers/utils/suggestions-utils.js +0 -26
- package/build/domain/mappers/utils/suggestions-utils.test.js +0 -36
- package/build/domain/mappers/utils/tags-utils.js +0 -1
- package/build/domain/mappers/utils/utils.js +0 -35
- package/build/domain/types.js +0 -1
- package/build/getSubflowCallbacks.js +0 -38
- package/build/i18n/index.js +0 -40
- package/build/index.js +0 -8
- package/build/renderers/CoreContainerRenderer.js +0 -5
- package/build/renderers/CoreRootRenderer.js +0 -12
- package/build/renderers/EmptyLoadingStateRenderer.js +0 -5
- package/build/renderers/getRenderFunction.js +0 -24
- package/build/renderers/getSchemaErrorMessageFunction.js +0 -97
- package/build/renderers/mappers/alertComponentToProps.js +0 -2
- package/build/renderers/mappers/allOfComponentToProps.js +0 -6
- package/build/renderers/mappers/booleanInputComponentToProps.js +0 -5
- package/build/renderers/mappers/boxComponentToProps.js +0 -13
- package/build/renderers/mappers/buttonComponentToProps.js +0 -4
- package/build/renderers/mappers/columnsComponentToProps.js +0 -11
- package/build/renderers/mappers/componentToRendererProps.js +0 -164
- package/build/renderers/mappers/constComponentToProps.js +0 -5
- package/build/renderers/mappers/containerComponentToProps.js +0 -7
- package/build/renderers/mappers/dateInputComponentToProps.js +0 -2
- package/build/renderers/mappers/decisionComponentToProps.js +0 -16
- package/build/renderers/mappers/dividerComponentToProps.js +0 -2
- package/build/renderers/mappers/externalComponentToProps.js +0 -3
- package/build/renderers/mappers/formComponentToProps.js +0 -12
- package/build/renderers/mappers/formattedValueComponentToProps.js +0 -5
- package/build/renderers/mappers/headingComponentToProps.js +0 -2
- package/build/renderers/mappers/hiddenComponentToProps.js +0 -4
- package/build/renderers/mappers/imageComponentToProps.js +0 -2
- package/build/renderers/mappers/instructionsComponentToProps.js +0 -2
- package/build/renderers/mappers/integerInputComponentToProps.js +0 -2
- package/build/renderers/mappers/listComponentToProps.js +0 -2
- package/build/renderers/mappers/loadingIndicatorComponentToProps.js +0 -2
- package/build/renderers/mappers/markdownComponentToProps.js +0 -2
- package/build/renderers/mappers/mediaComponentToProps.js +0 -2
- package/build/renderers/mappers/modalComponentToProps.js +0 -11
- package/build/renderers/mappers/modalLayoutComponentToProps.js +0 -16
- package/build/renderers/mappers/moneyInputComponentToProps.js +0 -36
- package/build/renderers/mappers/multiSelectComponentToProps.js +0 -23
- package/build/renderers/mappers/multiUploadInputComponentToProps.js +0 -12
- package/build/renderers/mappers/numberInputComponentToProps.js +0 -2
- package/build/renderers/mappers/objectComponentToProps.js +0 -8
- package/build/renderers/mappers/paragraphComponentToProps.js +0 -2
- package/build/renderers/mappers/persistAsyncComponentToProps.js +0 -8
- package/build/renderers/mappers/progressComponentToProps.js +0 -2
- package/build/renderers/mappers/repeatableComponentToProps.js +0 -30
- package/build/renderers/mappers/reviewComponentToProps.js +0 -2
- package/build/renderers/mappers/rootComponentToProps.js +0 -21
- package/build/renderers/mappers/searchComponentToProps.js +0 -57
- package/build/renderers/mappers/sectionComponentToProps.js +0 -6
- package/build/renderers/mappers/selectInputComponentToProps.js +0 -34
- package/build/renderers/mappers/statusListComponentToProps.js +0 -2
- package/build/renderers/mappers/subflowComponentToRendererProps.js +0 -4
- package/build/renderers/mappers/tabsComponentToProps.js +0 -14
- package/build/renderers/mappers/textInputComponentToProps.js +0 -2
- package/build/renderers/mappers/tupleComponentToProps.js +0 -8
- package/build/renderers/mappers/uploadInputComponentToProps.js +0 -8
- package/build/renderers/mappers/upsellComponentToProps.js +0 -2
- package/build/renderers/mappers/utils/getValidationState.js +0 -12
- package/build/renderers/mappers/utils/inputComponentToProps.js +0 -26
- package/build/renderers/mappers/utils/mapErrorsToValidationState.js +0 -9
- package/build/renderers/mappers/utils/pick.js +0 -8
- package/build/renderers/mappers/utils/selectInputOptionsToProps.js +0 -11
- package/build/renderers/stepComponentToProps.js +0 -32
- package/build/renderers/utils.js +0 -69
- package/build/renderers/utils.test.js +0 -70
- package/build/stories/dev-tools/ContainerQueries.story.js +0 -66
- package/build/stories/dev-tools/Debugger.story.js +0 -38
- package/build/stories/dev-tools/FixtureSelect.story.js +0 -23
- package/build/stories/dev-tools/TestServer.story.js +0 -32
- package/build/stories/examples/NativeFlow.story.js +0 -80
- package/build/stories/examples/Recipients.story.js +0 -568
- package/build/stories/spec/behavior/Copy.story.js +0 -71
- package/build/stories/spec/behavior/Link.story.js +0 -40
- package/build/stories/spec/behavior/Modal.story.js +0 -79
- package/build/stories/spec/behavior/Subflow.story.js +0 -267
- package/build/stories/spec/layouts/Decision.story.js +0 -241
- package/build/stories/spec/layouts/Image.story.js +0 -42
- package/build/stories/spec/layouts/Modal.story.js +0 -81
- package/build/stories/spec/layouts/Search.story.js +0 -325
- package/build/stories/spec/layouts/Upsell.story.js +0 -55
- package/build/stories/spec/layouts/button/Button.story.js +0 -100
- package/build/stories/spec/layouts/button/PinnedButton.story.js +0 -81
- package/build/stories/spec/response/ActionResponse.story.js +0 -66
- package/build/stories/spec/schemas/MultiSelect.story.js +0 -148
- package/build/stories/spec/schemas/Upload.story.js +0 -168
- package/build/stories/spec/schemas/const/ConstLayout.story.js +0 -159
- package/build/stories/spec/schemas/const/ObjectConst.story.js +0 -94
- package/build/stories/spec/schemas/features/PersistAsync.story.js +0 -211
- package/build/stories/spec/schemas/features/ValidationAsync.story.js +0 -103
- package/build/stories/spec/schemas/object/FormattedValue.story.js +0 -92
- package/build/stories/spec/schemas/object/MoneyInput.story.js +0 -240
- package/build/stories/spec/schemas/oneOf/OneOfInitialisation.story.js +0 -55
- package/build/stories/spec/schemas/oneOf/OneOfWithSingleOption.story.js +0 -114
- package/build/stories/spec/step/Controls.story.js +0 -109
- package/build/stories/spec/step/DFModal.story.js +0 -58
- package/build/stories/spec/step/Footer.story.js +0 -70
- package/build/stories/spec/step/Navigation.story.js +0 -20
- package/build/stories/spec/step/ScrollToBottom.story.js +0 -103
- package/build/stories/spec/step/Tags.story.js +0 -39
- package/build/stories/spec/step/ToolBar.story.js +0 -60
- package/build/stories/spec/step/features/ErrorHandling.story.js +0 -92
- package/build/stories/spec/step/features/External.story.js +0 -91
- package/build/stories/spec/step/features/Polling.story.js +0 -108
- package/build/stories/spec/step/features/RefreshAfter.story.js +0 -92
- package/build/stories/spec/step/features/refresh/Refresh.story.js +0 -258
- package/build/stories/spec/step/features/refresh/RefreshWithPersistAsync.story.js +0 -958
- package/build/stories/types.js +0 -1
- package/build/stories/utils/fixtureHttpClient.js +0 -70
- package/build/stories/utils/getBasicStep.js +0 -223
- package/build/stories/utils/mockSearchHandler.js +0 -71
- package/build/stories/utils/render-utils.js +0 -41
- package/build/stories/visual-tests/layouts/NotUsingListItem.story.js +0 -17
- package/build/test-utils/DynamicFlowWise.js +0 -32
- package/build/test-utils/DynamicFlowWiseModal.js +0 -34
- package/build/test-utils/NeptuneProviders.js +0 -11
- package/build/test-utils/component-utils.js +0 -5
- package/build/test-utils/fetch-utils.js +0 -45
- package/build/test-utils/getMergedTestRenderers.js +0 -34
- package/build/test-utils/getRandomId.js +0 -1
- package/build/test-utils/index.js +0 -3
- package/build/test-utils/openLinkInNewTab.js +0 -15
- package/build/test-utils/rtl-utils.js +0 -7
- package/build/test-utils/step-utils.js +0 -6
- package/build/test-utils/wait.js +0 -3
- package/build/tests/AlertLayout.test.js +0 -78
- package/build/tests/ArrayTuple.test.js +0 -118
- package/build/tests/ButtonLayout.test.js +0 -308
- package/build/tests/ConstLayout.test.js +0 -95
- package/build/tests/DateInput.test.js +0 -163
- package/build/tests/DecisionLayout.test.js +0 -146
- package/build/tests/DynamicFlow.test.js +0 -147
- package/build/tests/External.test.js +0 -169
- package/build/tests/Flow.test.js +0 -328
- package/build/tests/FormLayout.test.js +0 -28
- package/build/tests/FormattedValue.test.js +0 -107
- package/build/tests/ImageRenderer.test.js +0 -78
- package/build/tests/InitialAction.test.js +0 -179
- package/build/tests/InitialStep.test.js +0 -168
- package/build/tests/InstructionsLayout.test.js +0 -45
- package/build/tests/ListLayout.test.js +0 -145
- package/build/tests/Logging.test.js +0 -53
- package/build/tests/ModalBehavior.test.js +0 -149
- package/build/tests/MoneyInput.test.js +0 -316
- package/build/tests/MultiUpload.test.js +0 -293
- package/build/tests/NativeBack.test.js +0 -267
- package/build/tests/NoOp.test.js +0 -194
- package/build/tests/OneOfInitialisation.test.js +0 -571
- package/build/tests/PersistAsync.test.js +0 -687
- package/build/tests/Polling.test.js +0 -617
- package/build/tests/Prefetching.test.js +0 -230
- package/build/tests/RefreshAfter.test.js +0 -63
- package/build/tests/RefreshOnChange.ResponseHandling.test.js +0 -205
- package/build/tests/RefreshOnChange.test.js +0 -233
- package/build/tests/RefreshOnChange.with.Segmented.test.js +0 -348
- package/build/tests/RefreshOnChange.with.Tabs.test.js +0 -358
- package/build/tests/RefreshOnChangePreserve.test.js +0 -224
- package/build/tests/RendererProps.test.js +0 -342
- package/build/tests/Repeatable.test.js +0 -107
- package/build/tests/Rerendering.test.js +0 -67
- package/build/tests/ReviewLayout.test.js +0 -274
- package/build/tests/SchemaOnChange.test.js +0 -133
- package/build/tests/SchemaReferences.test.js +0 -88
- package/build/tests/ScrollToBottom.test.js +0 -122
- package/build/tests/ScrollToError.test.js +0 -217
- package/build/tests/SegmentedControl.test.js +0 -49
- package/build/tests/SingleFileUpload.test.js +0 -168
- package/build/tests/StatusList.test.js +0 -85
- package/build/tests/Subflow.test.js +0 -710
- package/build/tests/Submission.ResponseHandling.test.js +0 -557
- package/build/tests/Submission.merging.test.js +0 -202
- package/build/tests/Submission.test.js +0 -748
- package/build/tests/Tags.test.js +0 -475
- package/build/tests/Upsell.test.js +0 -154
- package/build/tests/ValidationAsync.test.js +0 -295
- package/build/tests/legacy/Actions.test.js +0 -158
- package/build/tests/legacy/BackButton.test.js +0 -114
- package/build/tests/legacy/HiddenSchemas.test.js +0 -246
- package/build/tests/legacy/MultiSelect.test.js +0 -501
- package/build/tests/legacy/MultipleFileUploadSchema.test.js +0 -341
- package/build/tests/legacy/PersistAsync.blob-schema.test.js +0 -224
- package/build/tests/legacy/PersistAsync.string-schema.test.js +0 -211
- package/build/tests/legacy/RefreshStepOnChange.debouncing.test.js +0 -209
- package/build/tests/legacy/RefreshStepOnChange.test.js +0 -424
- package/build/tests/legacy/Search.test.js +0 -437
- package/build/tests/renderers/MultiSelectInputRendererProps.test.js +0 -58
- package/build/tests/renderers/SelectInputRendererProps.test.js +0 -43
- package/build/tests/renderers/TextInputRenderer.test.js +0 -51
- package/build/types.js +0 -1
- package/build/useDynamicFlow.js +0 -104
- package/build/useDynamicFlowModal.js +0 -58
- package/build/utils/analyse-step.js +0 -14
- package/build/utils/component-utils.js +0 -8
- package/build/utils/component-utils.test.js +0 -113
- package/build/utils/getScrollToTop.js +0 -12
- package/build/utils/normalise-flow-id.js +0 -1
- package/build/utils/normalise-flow-id.test.js +0 -24
- package/build/utils/recursiveMerge.js +0 -40
- package/build/utils/recursiveMerge.test.js +0 -93
- package/build/utils/type-utils.js +0 -21
- package/build/utils/type-validators.js +0 -11
- package/build/utils/type-validators.test.js +0 -180
- package/build/utils/useStableCallback.js +0 -15
|
@@ -1,958 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { action } from 'storybook/actions';
|
|
3
|
-
import { getMockHttpClient } from '../../../../../test-utils';
|
|
4
|
-
import { abortableDelay, respondWith } from '../../../../../test-utils/fetch-utils';
|
|
5
|
-
import DynamicFlowWise from '../../../../../test-utils/DynamicFlowWise';
|
|
6
|
-
const getRespondWithDelay = (delayMs) => async (_, init) => {
|
|
7
|
-
var _a;
|
|
8
|
-
await abortableDelay(delayMs, (_a = init === null || init === void 0 ? void 0 : init.signal) !== null && _a !== void 0 ? _a : null);
|
|
9
|
-
return respondWith(refreshedStep);
|
|
10
|
-
};
|
|
11
|
-
const httpClient = getMockHttpClient({
|
|
12
|
-
'/refresh': getRespondWithDelay(500),
|
|
13
|
-
'/persist': async () => respondWith({ cardToken: 'X_njjb1uoi0j4jrqgr1pn69mtqrb' }),
|
|
14
|
-
});
|
|
15
|
-
export default {
|
|
16
|
-
component: DynamicFlowWise,
|
|
17
|
-
title: 'Spec/Step/Features/Refresh On Change',
|
|
18
|
-
parameters: {
|
|
19
|
-
chromatic: { disableSnapshot: true },
|
|
20
|
-
},
|
|
21
|
-
};
|
|
22
|
-
export function RefreshWithPersistAsync() {
|
|
23
|
-
return renderWithStep(initialStep);
|
|
24
|
-
}
|
|
25
|
-
const renderWithStep = (step) => (_jsx(DynamicFlowWise, { flowId: "new-df-flow-id", httpClient: async (input, init) => {
|
|
26
|
-
action('httpClient')(input, init === null || init === void 0 ? void 0 : init.body);
|
|
27
|
-
return httpClient(input, init);
|
|
28
|
-
}, initialStep: step, onCompletion: action('onCompletion'), onEvent: action('onEvent'), onError: action('onEvent'), onLog: action('onLog') }));
|
|
29
|
-
const initialStep = {
|
|
30
|
-
key: 'account',
|
|
31
|
-
type: 'form',
|
|
32
|
-
title: 'Enter their account details',
|
|
33
|
-
actions: [
|
|
34
|
-
{
|
|
35
|
-
title: 'Confirm',
|
|
36
|
-
url: '/v2/contacts',
|
|
37
|
-
type: 'primary',
|
|
38
|
-
method: 'POST',
|
|
39
|
-
$id: 'submit',
|
|
40
|
-
},
|
|
41
|
-
],
|
|
42
|
-
schemas: [
|
|
43
|
-
{
|
|
44
|
-
allOf: [
|
|
45
|
-
{
|
|
46
|
-
type: 'object',
|
|
47
|
-
displayOrder: ['currency'],
|
|
48
|
-
properties: {
|
|
49
|
-
currency: {
|
|
50
|
-
title: 'Currency',
|
|
51
|
-
type: 'string',
|
|
52
|
-
analyticsId: 'currency-select',
|
|
53
|
-
oneOf: [
|
|
54
|
-
{
|
|
55
|
-
title: 'EUR',
|
|
56
|
-
analyticsId: 'EUR',
|
|
57
|
-
icon: { name: 'flag-eur', type: 'icon' },
|
|
58
|
-
description: 'Euro',
|
|
59
|
-
const: 'EUR',
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
title: 'GBP',
|
|
63
|
-
analyticsId: 'GBP',
|
|
64
|
-
icon: { name: 'flag-gbp', type: 'icon' },
|
|
65
|
-
description: 'British pound',
|
|
66
|
-
const: 'GBP',
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
title: 'USD',
|
|
70
|
-
analyticsId: 'USD',
|
|
71
|
-
icon: { name: 'flag-usd', type: 'icon' },
|
|
72
|
-
description: 'United States dollar',
|
|
73
|
-
const: 'USD',
|
|
74
|
-
},
|
|
75
|
-
],
|
|
76
|
-
default: 'USD',
|
|
77
|
-
},
|
|
78
|
-
},
|
|
79
|
-
required: ['currency', 'legalEntityType'],
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
title: 'Bank details',
|
|
83
|
-
analyticsId: 'recipient-type',
|
|
84
|
-
oneOf: [
|
|
85
|
-
{
|
|
86
|
-
title: 'ACH',
|
|
87
|
-
type: 'object',
|
|
88
|
-
analyticsId: 'Aba',
|
|
89
|
-
icon: { name: 'bank', type: 'icon' },
|
|
90
|
-
displayOrder: ['name', 'ownedByCustomer', 'details', 'address', 'type'],
|
|
91
|
-
properties: {
|
|
92
|
-
name: {
|
|
93
|
-
type: 'object',
|
|
94
|
-
displayOrder: ['fullName'],
|
|
95
|
-
properties: {
|
|
96
|
-
fullName: {
|
|
97
|
-
title: 'Full name of the account holder',
|
|
98
|
-
type: 'string',
|
|
99
|
-
},
|
|
100
|
-
},
|
|
101
|
-
required: ['fullName'],
|
|
102
|
-
},
|
|
103
|
-
ownedByCustomer: {
|
|
104
|
-
title: 'My own account',
|
|
105
|
-
type: 'boolean',
|
|
106
|
-
analyticsId: 'My own account',
|
|
107
|
-
hidden: true,
|
|
108
|
-
const: false,
|
|
109
|
-
},
|
|
110
|
-
details: {
|
|
111
|
-
type: 'object',
|
|
112
|
-
displayOrder: ['abartn', 'accountNumber', 'accountType'],
|
|
113
|
-
properties: {
|
|
114
|
-
abartn: {
|
|
115
|
-
title: 'ACH routing number',
|
|
116
|
-
type: 'string',
|
|
117
|
-
placeholder: '020123456',
|
|
118
|
-
refreshFormOnChange: true,
|
|
119
|
-
format: 'numeric',
|
|
120
|
-
},
|
|
121
|
-
accountNumber: {
|
|
122
|
-
title: 'Account number',
|
|
123
|
-
type: 'string',
|
|
124
|
-
placeholder: '12345678',
|
|
125
|
-
refreshFormOnChange: true,
|
|
126
|
-
format: 'numeric',
|
|
127
|
-
},
|
|
128
|
-
accountType: {
|
|
129
|
-
title: 'Account type',
|
|
130
|
-
type: 'string',
|
|
131
|
-
oneOf: [
|
|
132
|
-
{ title: 'Checking', const: 'CHECKING' },
|
|
133
|
-
{ title: 'Savings', const: 'SAVINGS' },
|
|
134
|
-
],
|
|
135
|
-
},
|
|
136
|
-
},
|
|
137
|
-
required: ['abartn', 'accountNumber', 'accountType'],
|
|
138
|
-
},
|
|
139
|
-
address: {
|
|
140
|
-
title: 'Recipient address',
|
|
141
|
-
type: 'object',
|
|
142
|
-
displayOrder: ['country', 'city', 'firstLine', 'postCode'],
|
|
143
|
-
properties: {
|
|
144
|
-
country: {
|
|
145
|
-
title: 'Country',
|
|
146
|
-
type: 'string',
|
|
147
|
-
placeholder: 'Choose a country',
|
|
148
|
-
oneOf: [
|
|
149
|
-
{ title: 'United States', const: 'US' },
|
|
150
|
-
{ title: 'United Kingdom', const: 'GB' },
|
|
151
|
-
],
|
|
152
|
-
refreshFormOnChange: true,
|
|
153
|
-
},
|
|
154
|
-
city: {
|
|
155
|
-
title: 'City',
|
|
156
|
-
type: 'string',
|
|
157
|
-
},
|
|
158
|
-
firstLine: {
|
|
159
|
-
title: 'Recipient address',
|
|
160
|
-
type: 'string',
|
|
161
|
-
},
|
|
162
|
-
postCode: {
|
|
163
|
-
title: 'Post code',
|
|
164
|
-
type: 'string',
|
|
165
|
-
},
|
|
166
|
-
},
|
|
167
|
-
required: ['country', 'city', 'firstLine', 'postCode'],
|
|
168
|
-
},
|
|
169
|
-
type: {
|
|
170
|
-
title: 'Type',
|
|
171
|
-
type: 'string',
|
|
172
|
-
analyticsId: 'Type',
|
|
173
|
-
hidden: true,
|
|
174
|
-
const: 'Aba',
|
|
175
|
-
},
|
|
176
|
-
},
|
|
177
|
-
required: ['type', 'address', 'name', 'details'],
|
|
178
|
-
},
|
|
179
|
-
{
|
|
180
|
-
title: 'Wire',
|
|
181
|
-
type: 'object',
|
|
182
|
-
analyticsId: 'FedWireLocal',
|
|
183
|
-
icon: { name: 'bank', type: 'icon' },
|
|
184
|
-
displayOrder: ['name', 'ownedByCustomer', 'details', 'address', 'type'],
|
|
185
|
-
properties: {
|
|
186
|
-
name: {
|
|
187
|
-
type: 'object',
|
|
188
|
-
displayOrder: ['fullName'],
|
|
189
|
-
properties: {
|
|
190
|
-
fullName: {
|
|
191
|
-
title: 'Full name of the account holder',
|
|
192
|
-
type: 'string',
|
|
193
|
-
},
|
|
194
|
-
},
|
|
195
|
-
required: ['fullName'],
|
|
196
|
-
},
|
|
197
|
-
ownedByCustomer: {
|
|
198
|
-
title: 'My own account',
|
|
199
|
-
type: 'boolean',
|
|
200
|
-
analyticsId: 'My own account',
|
|
201
|
-
hidden: true,
|
|
202
|
-
const: false,
|
|
203
|
-
},
|
|
204
|
-
details: {
|
|
205
|
-
type: 'object',
|
|
206
|
-
displayOrder: ['abartn', 'accountNumber', 'accountType'],
|
|
207
|
-
properties: {
|
|
208
|
-
abartn: {
|
|
209
|
-
title: 'Fedwire routing number',
|
|
210
|
-
type: 'string',
|
|
211
|
-
placeholder: '020123456',
|
|
212
|
-
},
|
|
213
|
-
accountNumber: {
|
|
214
|
-
title: 'Account number',
|
|
215
|
-
type: 'string',
|
|
216
|
-
placeholder: '12345678',
|
|
217
|
-
format: 'numeric',
|
|
218
|
-
},
|
|
219
|
-
accountType: {
|
|
220
|
-
title: 'Account type',
|
|
221
|
-
type: 'string',
|
|
222
|
-
oneOf: [
|
|
223
|
-
{ title: 'Checking', const: 'CHECKING' },
|
|
224
|
-
{ title: 'Savings', const: 'SAVINGS' },
|
|
225
|
-
],
|
|
226
|
-
},
|
|
227
|
-
},
|
|
228
|
-
required: ['abartn', 'accountNumber', 'accountType'],
|
|
229
|
-
},
|
|
230
|
-
address: {
|
|
231
|
-
title: 'Recipient address',
|
|
232
|
-
type: 'object',
|
|
233
|
-
displayOrder: ['country', 'city', 'firstLine', 'postCode'],
|
|
234
|
-
properties: {
|
|
235
|
-
country: {
|
|
236
|
-
title: 'Country',
|
|
237
|
-
type: 'string',
|
|
238
|
-
placeholder: 'Choose a country',
|
|
239
|
-
oneOf: [
|
|
240
|
-
{ title: 'United States', const: 'US' },
|
|
241
|
-
{ title: 'United Kingdom', const: 'GB' },
|
|
242
|
-
],
|
|
243
|
-
refreshFormOnChange: true,
|
|
244
|
-
},
|
|
245
|
-
city: {
|
|
246
|
-
title: 'City',
|
|
247
|
-
type: 'string',
|
|
248
|
-
},
|
|
249
|
-
firstLine: {
|
|
250
|
-
title: 'Recipient address',
|
|
251
|
-
type: 'string',
|
|
252
|
-
},
|
|
253
|
-
postCode: {
|
|
254
|
-
title: 'Post code',
|
|
255
|
-
type: 'string',
|
|
256
|
-
},
|
|
257
|
-
},
|
|
258
|
-
required: ['country', 'city', 'firstLine', 'postCode'],
|
|
259
|
-
},
|
|
260
|
-
type: {
|
|
261
|
-
title: 'Type',
|
|
262
|
-
type: 'string',
|
|
263
|
-
analyticsId: 'Type',
|
|
264
|
-
hidden: true,
|
|
265
|
-
const: 'FedWireLocal',
|
|
266
|
-
},
|
|
267
|
-
},
|
|
268
|
-
required: ['type', 'address', 'name', 'details'],
|
|
269
|
-
},
|
|
270
|
-
{
|
|
271
|
-
title: 'SWIFT',
|
|
272
|
-
type: 'object',
|
|
273
|
-
analyticsId: 'SwiftCode',
|
|
274
|
-
icon: { name: 'bank', type: 'icon' },
|
|
275
|
-
displayOrder: ['name', 'ownedByCustomer', 'details', 'address', 'type'],
|
|
276
|
-
properties: {
|
|
277
|
-
name: {
|
|
278
|
-
type: 'object',
|
|
279
|
-
displayOrder: ['fullName'],
|
|
280
|
-
properties: {
|
|
281
|
-
fullName: {
|
|
282
|
-
title: 'Full name of the account holder',
|
|
283
|
-
type: 'string',
|
|
284
|
-
},
|
|
285
|
-
},
|
|
286
|
-
required: ['fullName'],
|
|
287
|
-
},
|
|
288
|
-
ownedByCustomer: {
|
|
289
|
-
title: 'My own account',
|
|
290
|
-
type: 'boolean',
|
|
291
|
-
analyticsId: 'My own account',
|
|
292
|
-
hidden: true,
|
|
293
|
-
const: false,
|
|
294
|
-
},
|
|
295
|
-
details: {
|
|
296
|
-
type: 'object',
|
|
297
|
-
displayOrder: ['bic', 'accountNumber'],
|
|
298
|
-
properties: {
|
|
299
|
-
bic: {
|
|
300
|
-
title: 'SWIFT / BIC code',
|
|
301
|
-
type: 'string',
|
|
302
|
-
placeholder: 'BUKBGB22',
|
|
303
|
-
},
|
|
304
|
-
accountNumber: {
|
|
305
|
-
title: 'IBAN / Account number',
|
|
306
|
-
type: 'string',
|
|
307
|
-
},
|
|
308
|
-
},
|
|
309
|
-
required: ['bic', 'accountNumber'],
|
|
310
|
-
},
|
|
311
|
-
address: {
|
|
312
|
-
title: 'Recipient address',
|
|
313
|
-
type: 'object',
|
|
314
|
-
displayOrder: ['country', 'city', 'firstLine', 'postCode'],
|
|
315
|
-
properties: {
|
|
316
|
-
country: {
|
|
317
|
-
title: 'Country',
|
|
318
|
-
type: 'string',
|
|
319
|
-
placeholder: 'Choose a country',
|
|
320
|
-
oneOf: [
|
|
321
|
-
{ title: 'United States', const: 'US' },
|
|
322
|
-
{ title: 'United Kingdom', const: 'GB' },
|
|
323
|
-
],
|
|
324
|
-
refreshFormOnChange: true,
|
|
325
|
-
},
|
|
326
|
-
city: {
|
|
327
|
-
title: 'City',
|
|
328
|
-
type: 'string',
|
|
329
|
-
},
|
|
330
|
-
firstLine: {
|
|
331
|
-
title: 'Recipient address',
|
|
332
|
-
type: 'string',
|
|
333
|
-
},
|
|
334
|
-
postCode: {
|
|
335
|
-
title: 'Post code',
|
|
336
|
-
type: 'string',
|
|
337
|
-
},
|
|
338
|
-
},
|
|
339
|
-
required: ['country', 'city', 'firstLine', 'postCode'],
|
|
340
|
-
},
|
|
341
|
-
type: {
|
|
342
|
-
title: 'Type',
|
|
343
|
-
type: 'string',
|
|
344
|
-
analyticsId: 'Type',
|
|
345
|
-
hidden: true,
|
|
346
|
-
const: 'SwiftCode',
|
|
347
|
-
},
|
|
348
|
-
},
|
|
349
|
-
required: ['type', 'address', 'name', 'details'],
|
|
350
|
-
},
|
|
351
|
-
{
|
|
352
|
-
title: 'US card',
|
|
353
|
-
type: 'object',
|
|
354
|
-
analyticsId: 'Card',
|
|
355
|
-
image: {
|
|
356
|
-
url: 'https://wise.com/public-resources/assets/recipients/unionpay.png',
|
|
357
|
-
type: 'image',
|
|
358
|
-
},
|
|
359
|
-
displayOrder: ['name', 'ownedByCustomer', 'details', 'address', 'type'],
|
|
360
|
-
properties: {
|
|
361
|
-
name: {
|
|
362
|
-
type: 'object',
|
|
363
|
-
displayOrder: ['fullName'],
|
|
364
|
-
properties: {
|
|
365
|
-
fullName: {
|
|
366
|
-
title: 'Full name of the account holder',
|
|
367
|
-
type: 'string',
|
|
368
|
-
},
|
|
369
|
-
},
|
|
370
|
-
required: ['fullName'],
|
|
371
|
-
},
|
|
372
|
-
ownedByCustomer: {
|
|
373
|
-
title: 'My own account',
|
|
374
|
-
type: 'boolean',
|
|
375
|
-
analyticsId: 'My own account',
|
|
376
|
-
hidden: true,
|
|
377
|
-
const: false,
|
|
378
|
-
},
|
|
379
|
-
details: {
|
|
380
|
-
type: 'object',
|
|
381
|
-
displayOrder: ['expiryMonth', 'expiryYear', 'cardToken'],
|
|
382
|
-
properties: {
|
|
383
|
-
expiryMonth: {
|
|
384
|
-
title: 'Expiry month',
|
|
385
|
-
type: 'string',
|
|
386
|
-
hidden: true,
|
|
387
|
-
placeholder: '08',
|
|
388
|
-
format: 'numeric',
|
|
389
|
-
},
|
|
390
|
-
expiryYear: {
|
|
391
|
-
title: 'Expiry year',
|
|
392
|
-
type: 'string',
|
|
393
|
-
hidden: true,
|
|
394
|
-
placeholder: '2022',
|
|
395
|
-
format: 'numeric',
|
|
396
|
-
},
|
|
397
|
-
cardToken: {
|
|
398
|
-
title: 'Card token',
|
|
399
|
-
type: 'string',
|
|
400
|
-
hidden: true,
|
|
401
|
-
persistAsync: {
|
|
402
|
-
method: 'POST',
|
|
403
|
-
url: '/persist',
|
|
404
|
-
param: 'cardNumber',
|
|
405
|
-
idProperty: 'cardToken',
|
|
406
|
-
schema: {
|
|
407
|
-
title: 'Card number',
|
|
408
|
-
type: 'string',
|
|
409
|
-
placeholder: '1234567890123456',
|
|
410
|
-
format: 'numeric',
|
|
411
|
-
},
|
|
412
|
-
},
|
|
413
|
-
},
|
|
414
|
-
},
|
|
415
|
-
required: ['cardToken'],
|
|
416
|
-
},
|
|
417
|
-
address: {
|
|
418
|
-
title: 'Recipient address',
|
|
419
|
-
type: 'object',
|
|
420
|
-
displayOrder: ['country', 'city', 'firstLine'],
|
|
421
|
-
properties: {
|
|
422
|
-
country: {
|
|
423
|
-
title: 'Country',
|
|
424
|
-
type: 'string',
|
|
425
|
-
placeholder: 'Choose a country',
|
|
426
|
-
oneOf: [
|
|
427
|
-
{ title: 'United States', const: 'US' },
|
|
428
|
-
{ title: 'United Kingdom', const: 'GB' },
|
|
429
|
-
],
|
|
430
|
-
refreshFormOnChange: true,
|
|
431
|
-
},
|
|
432
|
-
city: {
|
|
433
|
-
title: 'City',
|
|
434
|
-
type: 'string',
|
|
435
|
-
},
|
|
436
|
-
firstLine: {
|
|
437
|
-
title: 'Recipient address',
|
|
438
|
-
type: 'string',
|
|
439
|
-
},
|
|
440
|
-
},
|
|
441
|
-
required: ['country', 'city', 'firstLine'],
|
|
442
|
-
},
|
|
443
|
-
type: {
|
|
444
|
-
title: 'Type',
|
|
445
|
-
type: 'string',
|
|
446
|
-
analyticsId: 'Type',
|
|
447
|
-
hidden: true,
|
|
448
|
-
const: 'Card',
|
|
449
|
-
},
|
|
450
|
-
},
|
|
451
|
-
required: ['type', 'address', 'name', 'details'],
|
|
452
|
-
},
|
|
453
|
-
],
|
|
454
|
-
control: 'tab',
|
|
455
|
-
placeholder: 'Please select where you are sending to',
|
|
456
|
-
},
|
|
457
|
-
],
|
|
458
|
-
$id: 'form',
|
|
459
|
-
},
|
|
460
|
-
],
|
|
461
|
-
refreshFormUrl: '/refresh',
|
|
462
|
-
model: {
|
|
463
|
-
ownedByCustomer: false,
|
|
464
|
-
profileId: 14518756,
|
|
465
|
-
legalEntityType: 'PERSON',
|
|
466
|
-
name: {},
|
|
467
|
-
currency: 'USD',
|
|
468
|
-
details: {},
|
|
469
|
-
},
|
|
470
|
-
layout: [{ schemaId: 'form', type: 'form' }],
|
|
471
|
-
};
|
|
472
|
-
const refreshedStep = {
|
|
473
|
-
key: 'account',
|
|
474
|
-
type: 'form',
|
|
475
|
-
title: 'Enter their account details',
|
|
476
|
-
actions: [],
|
|
477
|
-
schemas: [
|
|
478
|
-
{
|
|
479
|
-
allOf: [
|
|
480
|
-
{
|
|
481
|
-
type: 'object',
|
|
482
|
-
displayOrder: ['profileId', 'currency', 'legalEntityType'],
|
|
483
|
-
properties: {
|
|
484
|
-
profileId: {
|
|
485
|
-
title: 'Profile ID (optional)',
|
|
486
|
-
type: 'number',
|
|
487
|
-
analyticsId: 'Profile ID (optional)',
|
|
488
|
-
hidden: true,
|
|
489
|
-
const: 14518756,
|
|
490
|
-
},
|
|
491
|
-
currency: {
|
|
492
|
-
title: 'Currency',
|
|
493
|
-
type: 'string',
|
|
494
|
-
analyticsId: 'currency-select',
|
|
495
|
-
oneOf: [
|
|
496
|
-
{
|
|
497
|
-
title: 'EUR',
|
|
498
|
-
analyticsId: 'EUR',
|
|
499
|
-
icon: { name: 'flag-eur', type: 'icon' },
|
|
500
|
-
description: 'Euro',
|
|
501
|
-
const: 'EUR',
|
|
502
|
-
},
|
|
503
|
-
{
|
|
504
|
-
title: 'GBP',
|
|
505
|
-
analyticsId: 'GBP',
|
|
506
|
-
icon: { name: 'flag-gbp', type: 'icon' },
|
|
507
|
-
description: 'British pound',
|
|
508
|
-
const: 'GBP',
|
|
509
|
-
},
|
|
510
|
-
{
|
|
511
|
-
title: 'USD',
|
|
512
|
-
analyticsId: 'USD',
|
|
513
|
-
icon: { name: 'flag-usd', type: 'icon' },
|
|
514
|
-
description: 'United States dollar',
|
|
515
|
-
const: 'USD',
|
|
516
|
-
},
|
|
517
|
-
],
|
|
518
|
-
default: 'USD',
|
|
519
|
-
},
|
|
520
|
-
legalEntityType: {
|
|
521
|
-
title: 'Select recipient type',
|
|
522
|
-
type: 'string',
|
|
523
|
-
analyticsId: 'Select recipient type',
|
|
524
|
-
hidden: true,
|
|
525
|
-
const: 'PERSON',
|
|
526
|
-
},
|
|
527
|
-
},
|
|
528
|
-
required: ['currency', 'legalEntityType'],
|
|
529
|
-
},
|
|
530
|
-
{
|
|
531
|
-
title: 'Bank details',
|
|
532
|
-
analyticsId: 'recipient-type',
|
|
533
|
-
oneOf: [
|
|
534
|
-
{
|
|
535
|
-
title: 'ACH',
|
|
536
|
-
type: 'object',
|
|
537
|
-
analyticsId: 'Aba',
|
|
538
|
-
icon: { name: 'bank', type: 'icon' },
|
|
539
|
-
displayOrder: ['name', 'ownedByCustomer', 'details', 'address', 'type'],
|
|
540
|
-
properties: {
|
|
541
|
-
name: {
|
|
542
|
-
type: 'object',
|
|
543
|
-
displayOrder: ['fullName'],
|
|
544
|
-
properties: {
|
|
545
|
-
fullName: {
|
|
546
|
-
title: 'Full name of the account holder',
|
|
547
|
-
type: 'string',
|
|
548
|
-
},
|
|
549
|
-
},
|
|
550
|
-
required: ['fullName'],
|
|
551
|
-
},
|
|
552
|
-
ownedByCustomer: {
|
|
553
|
-
title: 'My own account',
|
|
554
|
-
type: 'boolean',
|
|
555
|
-
analyticsId: 'My own account',
|
|
556
|
-
hidden: true,
|
|
557
|
-
const: false,
|
|
558
|
-
},
|
|
559
|
-
details: {
|
|
560
|
-
type: 'object',
|
|
561
|
-
displayOrder: ['abartn', 'accountNumber', 'accountType'],
|
|
562
|
-
properties: {
|
|
563
|
-
abartn: {
|
|
564
|
-
title: 'ACH routing number',
|
|
565
|
-
type: 'string',
|
|
566
|
-
placeholder: '020123456',
|
|
567
|
-
format: 'numeric',
|
|
568
|
-
},
|
|
569
|
-
accountNumber: {
|
|
570
|
-
title: 'Account number',
|
|
571
|
-
type: 'string',
|
|
572
|
-
placeholder: '12345678',
|
|
573
|
-
format: 'numeric',
|
|
574
|
-
},
|
|
575
|
-
accountType: {
|
|
576
|
-
title: 'Account type',
|
|
577
|
-
type: 'string',
|
|
578
|
-
oneOf: [
|
|
579
|
-
{ title: 'Checking', const: 'CHECKING' },
|
|
580
|
-
{ title: 'Savings', const: 'SAVINGS' },
|
|
581
|
-
],
|
|
582
|
-
},
|
|
583
|
-
},
|
|
584
|
-
required: ['abartn', 'accountNumber', 'accountType'],
|
|
585
|
-
},
|
|
586
|
-
address: {
|
|
587
|
-
title: 'Recipient address',
|
|
588
|
-
type: 'object',
|
|
589
|
-
displayOrder: ['country', 'city', 'firstLine', 'state', 'postCode'],
|
|
590
|
-
properties: {
|
|
591
|
-
country: {
|
|
592
|
-
title: 'Country',
|
|
593
|
-
type: 'string',
|
|
594
|
-
placeholder: 'Choose a country',
|
|
595
|
-
oneOf: [
|
|
596
|
-
{ title: 'United States', const: 'US' },
|
|
597
|
-
{ title: 'United Kingdom', const: 'GB' },
|
|
598
|
-
],
|
|
599
|
-
refreshFormOnChange: true,
|
|
600
|
-
},
|
|
601
|
-
city: {
|
|
602
|
-
title: 'City',
|
|
603
|
-
type: 'string',
|
|
604
|
-
},
|
|
605
|
-
firstLine: {
|
|
606
|
-
title: 'Recipient address',
|
|
607
|
-
type: 'string',
|
|
608
|
-
},
|
|
609
|
-
state: {
|
|
610
|
-
title: 'State',
|
|
611
|
-
type: 'string',
|
|
612
|
-
oneOf: [
|
|
613
|
-
{ title: 'Alabama', const: 'AL' },
|
|
614
|
-
{ title: 'Alaska', const: 'AK' },
|
|
615
|
-
],
|
|
616
|
-
},
|
|
617
|
-
postCode: {
|
|
618
|
-
title: 'ZIP code',
|
|
619
|
-
type: 'string',
|
|
620
|
-
},
|
|
621
|
-
},
|
|
622
|
-
required: ['country', 'city', 'firstLine', 'state', 'postCode'],
|
|
623
|
-
},
|
|
624
|
-
type: {
|
|
625
|
-
title: 'Type',
|
|
626
|
-
type: 'string',
|
|
627
|
-
analyticsId: 'Type',
|
|
628
|
-
hidden: true,
|
|
629
|
-
const: 'Aba',
|
|
630
|
-
},
|
|
631
|
-
},
|
|
632
|
-
required: ['type', 'address', 'name', 'details'],
|
|
633
|
-
},
|
|
634
|
-
{
|
|
635
|
-
title: 'Wire',
|
|
636
|
-
type: 'object',
|
|
637
|
-
analyticsId: 'FedWireLocal',
|
|
638
|
-
icon: { name: 'bank', type: 'icon' },
|
|
639
|
-
displayOrder: ['name', 'ownedByCustomer', 'details', 'address', 'type'],
|
|
640
|
-
properties: {
|
|
641
|
-
name: {
|
|
642
|
-
type: 'object',
|
|
643
|
-
displayOrder: ['fullName'],
|
|
644
|
-
properties: {
|
|
645
|
-
fullName: {
|
|
646
|
-
title: 'Full name of the account holder',
|
|
647
|
-
type: 'string',
|
|
648
|
-
},
|
|
649
|
-
},
|
|
650
|
-
required: ['fullName'],
|
|
651
|
-
},
|
|
652
|
-
ownedByCustomer: {
|
|
653
|
-
title: 'My own account',
|
|
654
|
-
type: 'boolean',
|
|
655
|
-
analyticsId: 'My own account',
|
|
656
|
-
hidden: true,
|
|
657
|
-
const: false,
|
|
658
|
-
},
|
|
659
|
-
details: {
|
|
660
|
-
type: 'object',
|
|
661
|
-
displayOrder: ['abartn', 'accountNumber', 'accountType'],
|
|
662
|
-
properties: {
|
|
663
|
-
abartn: {
|
|
664
|
-
title: 'Fedwire routing number',
|
|
665
|
-
type: 'string',
|
|
666
|
-
placeholder: '020123456',
|
|
667
|
-
format: 'numeric',
|
|
668
|
-
},
|
|
669
|
-
accountNumber: {
|
|
670
|
-
title: 'Account number',
|
|
671
|
-
type: 'string',
|
|
672
|
-
placeholder: '12345678',
|
|
673
|
-
format: 'numeric',
|
|
674
|
-
},
|
|
675
|
-
accountType: {
|
|
676
|
-
title: 'Account type',
|
|
677
|
-
type: 'string',
|
|
678
|
-
oneOf: [
|
|
679
|
-
{ title: 'Checking', const: 'CHECKING' },
|
|
680
|
-
{ title: 'Savings', const: 'SAVINGS' },
|
|
681
|
-
],
|
|
682
|
-
},
|
|
683
|
-
},
|
|
684
|
-
required: ['abartn', 'accountNumber', 'accountType'],
|
|
685
|
-
},
|
|
686
|
-
address: {
|
|
687
|
-
title: 'Recipient address',
|
|
688
|
-
type: 'object',
|
|
689
|
-
displayOrder: ['country', 'city', 'firstLine', 'state', 'postCode'],
|
|
690
|
-
properties: {
|
|
691
|
-
country: {
|
|
692
|
-
title: 'Country',
|
|
693
|
-
type: 'string',
|
|
694
|
-
placeholder: 'Choose a country',
|
|
695
|
-
oneOf: [
|
|
696
|
-
{ title: 'United States', const: 'US' },
|
|
697
|
-
{ title: 'United Kingdom', const: 'GB' },
|
|
698
|
-
],
|
|
699
|
-
refreshFormOnChange: true,
|
|
700
|
-
},
|
|
701
|
-
city: {
|
|
702
|
-
title: 'City',
|
|
703
|
-
type: 'string',
|
|
704
|
-
},
|
|
705
|
-
firstLine: {
|
|
706
|
-
title: 'Recipient address',
|
|
707
|
-
type: 'string',
|
|
708
|
-
},
|
|
709
|
-
state: {
|
|
710
|
-
title: 'State',
|
|
711
|
-
type: 'string',
|
|
712
|
-
oneOf: [
|
|
713
|
-
{ title: 'Alabama', const: 'AL' },
|
|
714
|
-
{ title: 'Alaska', const: 'AK' },
|
|
715
|
-
{ title: 'Arizona', const: 'AZ' },
|
|
716
|
-
],
|
|
717
|
-
},
|
|
718
|
-
postCode: {
|
|
719
|
-
title: 'ZIP code',
|
|
720
|
-
type: 'string',
|
|
721
|
-
},
|
|
722
|
-
},
|
|
723
|
-
required: ['country', 'city', 'firstLine', 'state', 'postCode'],
|
|
724
|
-
},
|
|
725
|
-
type: {
|
|
726
|
-
title: 'Type',
|
|
727
|
-
type: 'string',
|
|
728
|
-
analyticsId: 'Type',
|
|
729
|
-
hidden: true,
|
|
730
|
-
const: 'FedWireLocal',
|
|
731
|
-
},
|
|
732
|
-
},
|
|
733
|
-
required: ['type', 'address', 'name', 'details'],
|
|
734
|
-
},
|
|
735
|
-
{
|
|
736
|
-
title: 'SWIFT',
|
|
737
|
-
type: 'object',
|
|
738
|
-
analyticsId: 'SwiftCode',
|
|
739
|
-
icon: { name: 'bank', type: 'icon' },
|
|
740
|
-
displayOrder: ['name', 'ownedByCustomer', 'details', 'address', 'type'],
|
|
741
|
-
properties: {
|
|
742
|
-
name: {
|
|
743
|
-
type: 'object',
|
|
744
|
-
displayOrder: ['fullName'],
|
|
745
|
-
properties: {
|
|
746
|
-
fullName: {
|
|
747
|
-
title: 'Full name of the account holder',
|
|
748
|
-
type: 'string',
|
|
749
|
-
},
|
|
750
|
-
},
|
|
751
|
-
required: ['fullName'],
|
|
752
|
-
},
|
|
753
|
-
ownedByCustomer: {
|
|
754
|
-
title: 'My own account',
|
|
755
|
-
type: 'boolean',
|
|
756
|
-
analyticsId: 'My own account',
|
|
757
|
-
hidden: true,
|
|
758
|
-
const: false,
|
|
759
|
-
},
|
|
760
|
-
details: {
|
|
761
|
-
type: 'object',
|
|
762
|
-
displayOrder: ['bic', 'accountNumber'],
|
|
763
|
-
properties: {
|
|
764
|
-
bic: {
|
|
765
|
-
title: 'SWIFT / BIC code',
|
|
766
|
-
type: 'string',
|
|
767
|
-
placeholder: 'BUKBGB22',
|
|
768
|
-
},
|
|
769
|
-
accountNumber: {
|
|
770
|
-
title: 'IBAN / Account number',
|
|
771
|
-
type: 'string',
|
|
772
|
-
},
|
|
773
|
-
},
|
|
774
|
-
required: ['bic', 'accountNumber'],
|
|
775
|
-
},
|
|
776
|
-
address: {
|
|
777
|
-
title: 'Recipient address',
|
|
778
|
-
type: 'object',
|
|
779
|
-
displayOrder: ['country', 'city', 'firstLine', 'state', 'postCode'],
|
|
780
|
-
properties: {
|
|
781
|
-
country: {
|
|
782
|
-
title: 'Country',
|
|
783
|
-
type: 'string',
|
|
784
|
-
placeholder: 'Choose a country',
|
|
785
|
-
oneOf: [
|
|
786
|
-
{ title: 'United States', const: 'US' },
|
|
787
|
-
{ title: 'United Kingdom', const: 'GB' },
|
|
788
|
-
],
|
|
789
|
-
refreshFormOnChange: true,
|
|
790
|
-
},
|
|
791
|
-
city: {
|
|
792
|
-
title: 'City',
|
|
793
|
-
type: 'string',
|
|
794
|
-
},
|
|
795
|
-
firstLine: {
|
|
796
|
-
title: 'Recipient address',
|
|
797
|
-
type: 'string',
|
|
798
|
-
},
|
|
799
|
-
state: {
|
|
800
|
-
title: 'State',
|
|
801
|
-
type: 'string',
|
|
802
|
-
oneOf: [
|
|
803
|
-
{ title: 'Alabama', const: 'AL' },
|
|
804
|
-
{ title: 'Alaska', const: 'AK' },
|
|
805
|
-
],
|
|
806
|
-
},
|
|
807
|
-
postCode: {
|
|
808
|
-
title: 'ZIP code',
|
|
809
|
-
type: 'string',
|
|
810
|
-
},
|
|
811
|
-
},
|
|
812
|
-
required: ['country', 'city', 'firstLine', 'state', 'postCode'],
|
|
813
|
-
},
|
|
814
|
-
type: {
|
|
815
|
-
title: 'Type',
|
|
816
|
-
type: 'string',
|
|
817
|
-
analyticsId: 'Type',
|
|
818
|
-
hidden: true,
|
|
819
|
-
const: 'SwiftCode',
|
|
820
|
-
},
|
|
821
|
-
},
|
|
822
|
-
required: ['type', 'address', 'name', 'details'],
|
|
823
|
-
},
|
|
824
|
-
{
|
|
825
|
-
title: 'US card',
|
|
826
|
-
type: 'object',
|
|
827
|
-
analyticsId: 'Card',
|
|
828
|
-
image: {
|
|
829
|
-
url: 'https://wise.com/public-resources/assets/recipients/unionpay.png',
|
|
830
|
-
type: 'image',
|
|
831
|
-
},
|
|
832
|
-
displayOrder: ['name', 'ownedByCustomer', 'details', 'address', 'type'],
|
|
833
|
-
properties: {
|
|
834
|
-
name: {
|
|
835
|
-
type: 'object',
|
|
836
|
-
displayOrder: ['fullName'],
|
|
837
|
-
properties: {
|
|
838
|
-
fullName: {
|
|
839
|
-
title: 'Full name of the account holder',
|
|
840
|
-
type: 'string',
|
|
841
|
-
},
|
|
842
|
-
},
|
|
843
|
-
required: ['fullName'],
|
|
844
|
-
},
|
|
845
|
-
ownedByCustomer: {
|
|
846
|
-
title: 'My own account',
|
|
847
|
-
type: 'boolean',
|
|
848
|
-
analyticsId: 'My own account',
|
|
849
|
-
hidden: true,
|
|
850
|
-
const: false,
|
|
851
|
-
},
|
|
852
|
-
details: {
|
|
853
|
-
type: 'object',
|
|
854
|
-
displayOrder: ['expiryMonth', 'expiryYear', 'cardToken'],
|
|
855
|
-
properties: {
|
|
856
|
-
expiryMonth: {
|
|
857
|
-
title: 'Expiry month',
|
|
858
|
-
type: 'string',
|
|
859
|
-
hidden: true,
|
|
860
|
-
placeholder: '08',
|
|
861
|
-
format: 'numeric',
|
|
862
|
-
},
|
|
863
|
-
expiryYear: {
|
|
864
|
-
title: 'Expiry year',
|
|
865
|
-
type: 'string',
|
|
866
|
-
hidden: true,
|
|
867
|
-
placeholder: '2022',
|
|
868
|
-
format: 'numeric',
|
|
869
|
-
},
|
|
870
|
-
cardToken: {
|
|
871
|
-
title: 'Card token',
|
|
872
|
-
type: 'string',
|
|
873
|
-
hidden: true,
|
|
874
|
-
persistAsync: {
|
|
875
|
-
method: 'POST',
|
|
876
|
-
url: '/persist',
|
|
877
|
-
param: 'cardNumber',
|
|
878
|
-
idProperty: 'cardToken',
|
|
879
|
-
schema: {
|
|
880
|
-
title: 'Card number',
|
|
881
|
-
type: 'string',
|
|
882
|
-
placeholder: '1234567890123456',
|
|
883
|
-
format: 'numeric',
|
|
884
|
-
},
|
|
885
|
-
},
|
|
886
|
-
},
|
|
887
|
-
},
|
|
888
|
-
required: ['cardToken'],
|
|
889
|
-
},
|
|
890
|
-
address: {
|
|
891
|
-
title: 'Recipient address',
|
|
892
|
-
type: 'object',
|
|
893
|
-
displayOrder: ['country', 'city', 'firstLine', 'state', 'postCode'],
|
|
894
|
-
properties: {
|
|
895
|
-
country: {
|
|
896
|
-
title: 'Country',
|
|
897
|
-
type: 'string',
|
|
898
|
-
placeholder: 'Choose a country',
|
|
899
|
-
oneOf: [
|
|
900
|
-
{ title: 'United States', const: 'US' },
|
|
901
|
-
{ title: 'United Kingdom', const: 'GB' },
|
|
902
|
-
],
|
|
903
|
-
refreshFormOnChange: true,
|
|
904
|
-
},
|
|
905
|
-
city: {
|
|
906
|
-
title: 'City',
|
|
907
|
-
type: 'string',
|
|
908
|
-
},
|
|
909
|
-
firstLine: {
|
|
910
|
-
title: 'Recipient address',
|
|
911
|
-
type: 'string',
|
|
912
|
-
},
|
|
913
|
-
state: {
|
|
914
|
-
title: 'State',
|
|
915
|
-
type: 'string',
|
|
916
|
-
oneOf: [
|
|
917
|
-
{ title: 'Alabama', const: 'AL' },
|
|
918
|
-
{ title: 'Alaska', const: 'AK' },
|
|
919
|
-
],
|
|
920
|
-
},
|
|
921
|
-
postCode: {
|
|
922
|
-
title: 'ZIP code',
|
|
923
|
-
type: 'string',
|
|
924
|
-
},
|
|
925
|
-
},
|
|
926
|
-
required: ['country', 'city', 'firstLine', 'state', 'postCode'],
|
|
927
|
-
},
|
|
928
|
-
type: {
|
|
929
|
-
title: 'Type',
|
|
930
|
-
type: 'string',
|
|
931
|
-
analyticsId: 'Type',
|
|
932
|
-
hidden: true,
|
|
933
|
-
const: 'Card',
|
|
934
|
-
},
|
|
935
|
-
},
|
|
936
|
-
required: ['type', 'address', 'name', 'details'],
|
|
937
|
-
},
|
|
938
|
-
],
|
|
939
|
-
control: 'tab',
|
|
940
|
-
placeholder: 'Please select where you are sending to',
|
|
941
|
-
},
|
|
942
|
-
],
|
|
943
|
-
$id: 'form',
|
|
944
|
-
},
|
|
945
|
-
],
|
|
946
|
-
refreshFormUrl: '/refresh',
|
|
947
|
-
model: {
|
|
948
|
-
ownedByCustomer: false,
|
|
949
|
-
address: { country: 'US' },
|
|
950
|
-
profileId: 14518756,
|
|
951
|
-
legalEntityType: 'PERSON',
|
|
952
|
-
name: {},
|
|
953
|
-
currency: 'USD',
|
|
954
|
-
details: { cardToken: 'X_njjb1uoi0j4jrqgr1pn69mtqrb' },
|
|
955
|
-
type: 'Card',
|
|
956
|
-
},
|
|
957
|
-
layout: [{ schemaId: 'form', type: 'form' }],
|
|
958
|
-
};
|