@wise/dynamic-flow-client 3.5.0-experimental-63c768d → 3.5.1-experimental-ccbce45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/common/errorBoundary/ErrorBoundaryAlert.js +1 -1
- package/build/common/httpClientContext/HttpClientContext.js +2 -13
- package/build/common/makeHttpClient/makeHttpClient.spec.js +10 -10
- package/build/common/messages/external-confirmation.messages.js +5 -5
- package/build/common/messages/generic-error.messages.js +4 -4
- package/build/common/messages/help.messages.js +2 -2
- package/build/common/messages/multi-file-upload.messages.js +4 -4
- package/build/common/messages/multi-select.messages.js +2 -2
- package/build/common/messages/paragraph.messages.js +3 -3
- package/build/common/messages/repeatable.messages.js +5 -5
- package/build/common/messages/validation.array.messages.js +3 -3
- package/build/common/messages/validation.messages.js +11 -11
- package/build/i18n/index.js +1 -1
- package/build/legacy/common/constants/DateMode.js +1 -1
- package/build/legacy/common/constants/FormControlType.js +1 -1
- package/build/legacy/common/constants/MonthFormat.js +1 -1
- package/build/legacy/common/constants/Size.js +1 -1
- package/build/legacy/common/contexts/dynamicFlowContexts/DynamicFlowContexts.js +3 -14
- package/build/legacy/common/contexts/dynamicFlowContexts/usePendingPromiseCounter.js +3 -1
- package/build/legacy/common/contexts/eventsContext/EventsContext.js +2 -2
- package/build/legacy/common/contexts/eventsContext/EventsContext.spec.js +1 -12
- package/build/legacy/common/contexts/featureContext/FeatureContext.js +1 -12
- package/build/legacy/common/contexts/featureContext/FeatureContext.spec.js +4 -15
- package/build/legacy/common/contexts/logContext/LogContext.js +2 -2
- package/build/legacy/common/contexts/logContext/LogContext.spec.js +1 -12
- package/build/legacy/common/hooks/useExternal/useExternal.spec.js +6 -6
- package/build/legacy/common/hooks/useExternalStepPolling/useExternalStepPolling.js +3 -2
- package/build/legacy/common/hooks/usePersistAsync/usePersistAsync.js +1 -1
- package/build/legacy/common/hooks/usePolling/usePolling.js +4 -2
- package/build/legacy/common/hooks/useStepPolling/useStepPolling.js +5 -3
- package/build/legacy/common/hooks/useStepPolling/useStepPolling.spec.js +4 -4
- package/build/legacy/common/messages.js +2 -2
- package/build/legacy/common/utils/file-utils.spec.js +4 -4
- package/build/legacy/common/utils/mobile-utils.spec.js +1 -1
- package/build/legacy/common/utils/schema-utils.js +2 -2
- package/build/legacy/common/validators/models/model-utils.spec.js +7 -7
- package/build/legacy/common/validators/models/model-validators.js +2 -2
- package/build/legacy/common/validators/models/model-validators.spec.js +54 -54
- package/build/legacy/common/validators/schemas/schema-validators.js +1 -1
- package/build/legacy/common/validators/schemas/schema-validators.spec.js +20 -20
- package/build/legacy/common/validators/validationFailures/validation-failures.js +2 -2
- package/build/legacy/common/validators/validationFailures/validation-failures.spec.js +11 -11
- package/build/legacy/dynamicFlow/BackButton.js +2 -2
- package/build/legacy/dynamicFlow/DynamicFlow.js +5 -5
- package/build/legacy/dynamicFlow/stories/dev-tools/DynamicFlow.story.js +7 -7
- package/build/legacy/dynamicFlow/stories/dev-tools/ErrorResponses.story.js +18 -18
- package/build/legacy/dynamicFlow/stories/dev-tools/Examples.story.js +1 -1
- package/build/legacy/dynamicFlow/stories/dev-tools/Features.story.js +1 -1
- package/build/legacy/dynamicFlow/stories/dev-tools/JsonSchemaForm.story.js +5 -5
- package/build/legacy/dynamicFlow/stories/dev-tools/RefreshOnChange.story.js +24 -24
- package/build/legacy/dynamicFlow/stories/dev-tools/SearchFeature.story.js +10 -21
- package/build/legacy/dynamicFlow/stories/dev-tools/ServerTest.story.js +4 -4
- package/build/legacy/dynamicFlow/stories/dev-tools/Upload.story.js +19 -19
- package/build/legacy/dynamicFlow/stories/dev-tools/ValidationAsync.story.js +18 -18
- package/build/legacy/dynamicFlow/stories/examples/ObjectConst.story.js +25 -25
- package/build/legacy/dynamicFlow/tests/Actions.spec.js +6 -6
- package/build/legacy/dynamicFlow/tests/AllOfSchema.spec.js +17 -17
- package/build/legacy/dynamicFlow/tests/AutocompleteHints.spec.js +6 -6
- package/build/legacy/dynamicFlow/tests/DynamicFlow.BackButton.spec.js +11 -11
- package/build/legacy/dynamicFlow/tests/DynamicFlow.search.spec.js +13 -13
- package/build/legacy/dynamicFlow/tests/DynamicFlow.spec.js +48 -48
- package/build/legacy/dynamicFlow/tests/DynamicImage.spec.js +4 -4
- package/build/legacy/dynamicFlow/tests/DynamicInstructions.spec.js +3 -3
- package/build/legacy/dynamicFlow/tests/HiddenSchemas.spec.js +24 -24
- package/build/legacy/dynamicFlow/tests/ModalLayout.spec.js +20 -20
- package/build/legacy/dynamicFlow/tests/MultiSelect.spec.js +21 -21
- package/build/legacy/dynamicFlow/tests/MultipleFileUploadSchema.spec.js +24 -24
- package/build/legacy/dynamicFlow/tests/ObjectSchema.spec.js +16 -16
- package/build/legacy/dynamicFlow/tests/OneOfSchema.spec.js +77 -77
- package/build/legacy/dynamicFlow/tests/PersistAsync.blob-schema.spec.js +19 -19
- package/build/legacy/dynamicFlow/tests/PersistAsync.string-schema.spec.js +10 -10
- package/build/legacy/dynamicFlow/tests/RefreshStepOnChange.debouncing.spec.js +19 -19
- package/build/legacy/dynamicFlow/tests/RefreshStepOnChange.spec.js +46 -46
- package/build/legacy/dynamicFlow/tests/RepeatableSchema.spec.js +62 -62
- package/build/legacy/dynamicFlow/tests/StepModel.spec.js +6 -6
- package/build/legacy/dynamicFlow/tests/ValidationAsync.spec.js +13 -13
- package/build/legacy/dynamicFlow/utils/responseParsers/response-parsers.spec.js +13 -13
- package/build/legacy/dynamicFlow/utils/useDynamicFlowState.js +4 -4
- package/build/legacy/formControl/FormControl.js +9 -9
- package/build/legacy/formControl/Select.spec.js +3 -3
- package/build/legacy/formControl/utils/getAutocompleteString.js +1 -1
- package/build/legacy/formControl/utils/value-utils.js +1 -1
- package/build/legacy/jsonSchemaForm/JsonSchemaForm.end-to-end.spec.js +66 -66
- package/build/legacy/jsonSchemaForm/JsonSchemaForm.js +1 -1
- package/build/legacy/jsonSchemaForm/allOfSchema/AllOfSchema.js +5 -5
- package/build/legacy/jsonSchemaForm/arrayTypeSchema/ArraySchema.js +1 -1
- package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/ArrayListSchema.js +1 -1
- package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multiSelectSchema/MultiSelectSchema.js +6 -17
- package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/MultipleFileUploadSchema.js +3 -3
- package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/useFormattedDefaultErrorMessages.js +1 -1
- package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/RepeatableSchema.js +7 -7
- package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/RepeatableSchemaStep.js +6 -6
- package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/utils/summary-utils.js +7 -7
- package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/utils/summary-utils.spec.js +190 -190
- package/build/legacy/jsonSchemaForm/basicTypeSchema/BasicTypeSchema.js +8 -19
- package/build/legacy/jsonSchemaForm/controlFeedback/ControlFeedback.js +14 -14
- package/build/legacy/jsonSchemaForm/genericSchema/GenericSchema.rtl.spec.js +2 -2
- package/build/legacy/jsonSchemaForm/help/Help.js +1 -12
- package/build/legacy/jsonSchemaForm/objectSchema/ObjectSchema.js +4 -4
- package/build/legacy/jsonSchemaForm/oneOfSchema/OneOfSchema.js +12 -12
- package/build/legacy/jsonSchemaForm/oneOfSchema/utils.js +6 -6
- package/build/legacy/jsonSchemaForm/persistAsyncSchema/PersistAsyncSchema.js +1 -1
- package/build/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBasicSchema/PersistAsyncBasicSchema.js +2 -2
- package/build/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/PersistAsyncBlobSchema.js +4 -4
- package/build/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/UploadInputAdapter.js +2 -2
- package/build/legacy/jsonSchemaForm/promotedOneOfSchema/PromotedOneOfSchema.js +2 -2
- package/build/legacy/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfCheckboxControl.js +1 -12
- package/build/legacy/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfControl.js +1 -1
- package/build/legacy/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfRadioControl.js +3 -3
- package/build/legacy/jsonSchemaForm/readOnlySchema/ReadOnlySchema.js +1 -1
- package/build/legacy/jsonSchemaForm/readOnlySchema/ReadOnlySchema.messages.js +3 -3
- package/build/legacy/jsonSchemaForm/schemaFormControl/SchemaFormControl.js +6 -6
- package/build/legacy/jsonSchemaForm/schemaFormControl/SchemaFormControl.spec.js +12 -12
- package/build/legacy/jsonSchemaForm/schemaFormControl/utils/mapping-utils.js +10 -10
- package/build/legacy/jsonSchemaForm/schemaFormControl/utils/mapping-utils.spec.js +23 -23
- package/build/legacy/jsonSchemaForm/validationAsyncSchema/ValidationAsyncSchema.js +2 -2
- package/build/legacy/layout/DynamicLayout.js +1 -1
- package/build/legacy/layout/box/DynamicBox.js +2 -13
- package/build/legacy/layout/button/DynamicButton.js +1 -12
- package/build/legacy/layout/button/DynamicButton.spec.js +13 -24
- package/build/legacy/layout/button/utils.js +3 -3
- package/build/legacy/layout/button/utils.spec.js +6 -6
- package/build/legacy/layout/columns/DynamicColumns.js +4 -15
- package/build/legacy/layout/decision/DynamicDecision.js +1 -12
- package/build/legacy/layout/external/DynamicExternal.js +1 -1
- package/build/legacy/layout/external/DynamicExternal.messages.js +2 -2
- package/build/legacy/layout/form/DynamicForm.js +2 -2
- package/build/legacy/layout/heading/DynamicHeading.js +8 -19
- package/build/legacy/layout/image/DynamicImage.js +5 -4
- package/build/legacy/layout/instructions/DynamicInstructions.js +1 -12
- package/build/legacy/layout/list/DynamicStatusList.js +3 -3
- package/build/legacy/layout/list/DynamicStatusList.spec.js +9 -9
- package/build/legacy/layout/loadingIndicator/DynamicLoadingIndicator.js +1 -1
- package/build/legacy/layout/markdown/DynamicMarkdown.js +2 -13
- package/build/legacy/layout/markdown/DynamicMarkdown.spec.js +4 -4
- package/build/legacy/layout/modal/DynamicModal.js +2 -2
- package/build/legacy/layout/paragraph/DynamicParagraph.js +5 -16
- package/build/legacy/layout/review/DynamicReview.js +3 -14
- package/build/legacy/layout/review/DynamicReview.spec.js +6 -6
- package/build/legacy/layout/search/DynamicSearch.js +2 -13
- package/build/legacy/layout/search/SearchInput.js +1 -12
- package/build/legacy/layout/search/SearchResults.js +3 -14
- package/build/legacy/layout/search/useSearch.js +4 -4
- package/build/legacy/layout/utils/getNavigationOptionMedia.js +2 -13
- package/build/legacy/step/cameraStep/CameraStep.js +1 -1
- package/build/legacy/step/cameraStep/cameraCapture/CameraCapture.js +6 -6
- package/build/legacy/step/cameraStep/cameraCapture/CameraCapture.messages.js +12 -12
- package/build/legacy/step/cameraStep/cameraCapture/CameraCapture.spec.js +13 -13
- package/build/legacy/step/cameraStep/cameraCapture/components/bottomBar/BottomBar.js +3 -14
- package/build/legacy/step/cameraStep/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.js +1 -12
- package/build/legacy/step/cameraStep/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.messages.js +2 -2
- package/build/legacy/step/cameraStep/cameraCapture/hooks/useFullScreenOrientationLock.js +6 -4
- package/build/legacy/step/cameraStep/cameraCapture/hooks/useVideoConstraints.js +1 -1
- package/build/legacy/step/cameraStep/cameraCapture/overlay/Overlay.js +6 -6
- package/build/legacy/step/cameraStep/cameraCapture/screens/cameraErrorScreen/CameraErrorScreen.js +1 -12
- package/build/legacy/step/cameraStep/cameraCapture/tracking/index.js +1 -1
- package/build/legacy/step/externalConfirmationStep/ExternalConfirmationStep.js +7 -7
- package/build/legacy/step/layoutStep/LayoutStep.js +1 -1
- package/build/legacy/step/layoutStep/utils/inline-reference-utils.js +3 -3
- package/build/legacy/step/layoutStep/utils/layout-utils.js +12 -12
- package/build/legacy/test-utils/DynamicFlowProviders.js +1 -12
- package/build/legacy/test-utils/legacy-utils.js +4 -4
- package/build/legacy/test-utils/log-utils.js +1 -1
- package/build/revamp/DynamicFlowCore.js +5 -5
- package/build/revamp/DynamicFlowWise.js +1 -1
- package/build/revamp/DynamicFlowWise.spec.js +11 -11
- package/build/revamp/domain/components/AllOfComponent.js +1 -1
- package/build/revamp/domain/components/BooleanInputComponent.js +2 -2
- package/build/revamp/domain/components/ConstComponent.js +1 -1
- package/build/revamp/domain/components/DateInputComponent.js +2 -2
- package/build/revamp/domain/components/IntegerInputComponent.js +2 -2
- package/build/revamp/domain/components/NumberInputComponent.js +2 -2
- package/build/revamp/domain/components/ObjectComponent.js +1 -1
- package/build/revamp/domain/components/SelectInputComponent.js +2 -2
- package/build/revamp/domain/components/StepDomainComponent.js +1 -1
- package/build/revamp/domain/components/TextInputComponent.js +2 -2
- package/build/revamp/domain/components/UploadInputComponent.js +1 -1
- package/build/revamp/domain/components/repeatableComponent/RepeatableComponent.js +1 -1
- package/build/revamp/domain/components/repeatableComponent/RepeatableComponent.spec.js +1 -1
- package/build/revamp/domain/components/searchComponent/SearchComponent.js +4 -3
- package/build/revamp/domain/components/searchComponent/SearchComponent.spec.js +13 -13
- package/build/revamp/domain/components/utils/isPartialLocalValueMatch.spec.js +7 -7
- package/build/revamp/domain/features/persistAsync/getComponentPersistAsync.js +4 -4
- package/build/revamp/domain/features/persistAsync/getComponentPersistAsync.spec.js +1 -1
- package/build/revamp/domain/features/persistAsync/getInitialPersistedState.js +1 -1
- package/build/revamp/domain/features/persistAsync/getPerformPersistAsync.spec.js +17 -17
- package/build/revamp/domain/features/search/getPerformSearchFunction.js +3 -3
- package/build/revamp/domain/features/search/getPerformSearchFunction.spec.js +18 -18
- package/build/revamp/domain/features/summary/summary-utils.js +2 -2
- package/build/revamp/domain/features/summary/summary-utils.spec.js +27 -27
- package/build/revamp/domain/features/utils/http-utils.js +1 -1
- package/build/revamp/domain/features/validation/spec-utils.js +1 -1
- package/build/revamp/domain/features/validation/validation-functions.spec.js +4 -4
- package/build/revamp/domain/features/validation/value-checks.spec.js +4 -4
- package/build/revamp/domain/features/validationAsync/getComponentValidationAsync.js +4 -3
- package/build/revamp/domain/features/validationAsync/getComponentValidationAsync.spec.js +1 -1
- package/build/revamp/domain/features/validationAsync/getInitialValidationState.js +1 -1
- package/build/revamp/domain/features/validationAsync/getPerformValidationAsync.js +1 -1
- package/build/revamp/domain/features/validationAsync/getPerformValidationAsync.spec.js +17 -17
- package/build/revamp/domain/mappers/layout/alertLayoutToComponent.js +1 -1
- package/build/revamp/domain/mappers/layout/boxLayoutToComponents.js +1 -1
- package/build/revamp/domain/mappers/layout/buttonLayoutToComponent.js +1 -1
- package/build/revamp/domain/mappers/layout/columnsLayoutToComponent.js +1 -1
- package/build/revamp/domain/mappers/layout/decisionLayoutToComponent.js +1 -1
- package/build/revamp/domain/mappers/layout/formLayoutToComponent.js +2 -2
- package/build/revamp/domain/mappers/layout/headingLayoutToComponent.js +1 -1
- package/build/revamp/domain/mappers/layout/imageLayoutToComponent.js +1 -1
- package/build/revamp/domain/mappers/layout/infoLayoutToComponent.js +1 -1
- package/build/revamp/domain/mappers/layout/instructionsLayoutToComponent.js +2 -2
- package/build/revamp/domain/mappers/layout/listLayoutToComponent.js +2 -2
- package/build/revamp/domain/mappers/layout/markdownLayoutToComponent.js +1 -1
- package/build/revamp/domain/mappers/layout/modalLayoutToComponent.js +2 -2
- package/build/revamp/domain/mappers/layout/paragraphLayoutToComponent.js +1 -1
- package/build/revamp/domain/mappers/layout/reviewLayoutToComponent.js +3 -3
- package/build/revamp/domain/mappers/layout/searchLayoutToComponent.js +1 -1
- package/build/revamp/domain/mappers/layout/statusListLayoutToComponent.js +1 -1
- package/build/revamp/domain/mappers/mapSchemaToComponent.js +1 -1
- package/build/revamp/domain/mappers/mapSchemaToComponent.spec.js +22 -22
- package/build/revamp/domain/mappers/mapStepToComponent.js +3 -3
- package/build/revamp/domain/mappers/mapStepToComponent.spec.js +12 -12
- package/build/revamp/domain/mappers/schema/allOfSchemaToComponent.js +1 -1
- package/build/revamp/domain/mappers/schema/arraySchemaToComponent/arraySchemaToRepeatableComponent.js +2 -2
- package/build/revamp/domain/mappers/schema/booleanSchemaToComponent.js +1 -1
- package/build/revamp/domain/mappers/schema/constSchemaToComponent.js +2 -2
- package/build/revamp/domain/mappers/schema/integerSchemaToComponent.js +1 -1
- package/build/revamp/domain/mappers/schema/numberSchemaToComponent.js +1 -1
- package/build/revamp/domain/mappers/schema/objectSchemaToComponent/objectSchemaToComponent.js +1 -1
- package/build/revamp/domain/mappers/schema/objectSchemaToComponent/objectSchemaToComponent.spec.js +21 -21
- package/build/revamp/domain/mappers/schema/oneOfSchemaToComponent/oneOfSchemaToComponent.js +4 -4
- package/build/revamp/domain/mappers/schema/oneOfSchemaToComponent/oneOfSchemaToComponent.spec.js +48 -48
- package/build/revamp/domain/mappers/schema/stringSchemaToComponent/stringSchemaToComponent.spec.js +21 -21
- package/build/revamp/domain/mappers/schema/stringSchemaToComponent/stringSchemaToDateInputComponent.js +1 -1
- package/build/revamp/domain/mappers/schema/stringSchemaToComponent/stringSchemaToTextInputComponent.js +1 -1
- package/build/revamp/domain/mappers/schema/utils/getPersistAsyncInitialState.js +1 -1
- package/build/revamp/domain/mappers/schema/utils/getValidationAsyncInitialState.js +1 -1
- package/build/revamp/domain/mappers/utils/getAutocompleteString.js +1 -1
- package/build/revamp/domain/mappers/utils/legacy-utils.js +2 -2
- package/build/revamp/flow/executeRefresh.js +2 -2
- package/build/revamp/flow/executeSubmission.js +1 -1
- package/build/revamp/renderers/CoreContainerRenderer.js +1 -1
- package/build/revamp/renderers/getRenderFunction.js +3 -3
- package/build/revamp/renderers/getSchemaErrorMessageFunction.js +12 -12
- package/build/revamp/renderers/mappers/allOfComponentToProps.js +1 -1
- package/build/revamp/renderers/mappers/buttonComponentToProps.js +1 -1
- package/build/revamp/renderers/mappers/containerComponentToProps.js +1 -1
- package/build/revamp/renderers/mappers/headingComponentToProps.js +1 -1
- package/build/revamp/renderers/mappers/hiddenComponentToProps.js +1 -1
- package/build/revamp/renderers/mappers/imageComponentToProps.js +1 -1
- package/build/revamp/renderers/mappers/instructionsComponentToProps.js +1 -1
- package/build/revamp/renderers/mappers/loadingIndicatorComponentToProps.js +1 -1
- package/build/revamp/renderers/mappers/markdownComponentToProps.js +1 -1
- package/build/revamp/renderers/mappers/modalComponentToProps.js +1 -1
- package/build/revamp/renderers/mappers/multiUploadInputComponentToProps.js +1 -1
- package/build/revamp/renderers/mappers/objectComponentToProps.js +1 -1
- package/build/revamp/renderers/mappers/paragraphComponentToProps.js +1 -1
- package/build/revamp/renderers/mappers/repeatableComponentToProps.js +2 -2
- package/build/revamp/renderers/mappers/reviewComponentToProps.js +1 -1
- package/build/revamp/renderers/mappers/searchComponentToProps.js +2 -2
- package/build/revamp/renderers/mappers/statusListComponentToProps.js +1 -1
- package/build/revamp/renderers/mappers/utils/inputComponentToProps.js +1 -1
- package/build/revamp/renderers/step/ExternalConfirmationDialog.js +2 -13
- package/build/revamp/renderers/step/StepRenderer.js +2 -13
- package/build/revamp/renderers/stepComponentToProps.js +1 -1
- package/build/revamp/stories/dev-tools/DynamicFlowRevamp.story.js +53 -53
- package/build/revamp/stories/dev-tools/EditableStep.story.js +7 -7
- package/build/revamp/stories/dev-tools/ErrorHandling.story.js +17 -17
- package/build/revamp/stories/dev-tools/External.story.js +6 -6
- package/build/revamp/stories/dev-tools/OneOf.Inititalisation.story.js +14 -14
- package/build/revamp/stories/dev-tools/PersistAsync.story.js +16 -16
- package/build/revamp/stories/dev-tools/RefreshOnChange.story.js +41 -41
- package/build/revamp/stories/dev-tools/RefreshOnChange.with.PersistAsync.story.js +210 -210
- package/build/revamp/stories/dev-tools/ServerTest.story.js +4 -4
- package/build/revamp/stories/dev-tools/Upload.story.js +18 -18
- package/build/revamp/stories/dev-tools/ValidationAsync.story.js +18 -18
- package/build/revamp/stories/examples/ObjectConst.story.js +25 -25
- package/build/revamp/stories/examples/OneOfInitialisation.story.js +10 -10
- package/build/revamp/stories/utils/fixtureHttpClient.js +1 -1
- package/build/revamp/stories/utils/mockSearchHandler.js +8 -8
- package/build/revamp/stories/visual-tests/VisualTests.story.js +1 -1
- package/build/revamp/test-utils/step-utils.js +1 -1
- package/build/revamp/tests/ImageRenderer.spec.js +3 -3
- package/build/revamp/tests/InitialAction.spec.js +9 -9
- package/build/revamp/tests/InitialStep.spec.js +3 -3
- package/build/revamp/tests/Logging.spec.js +5 -5
- package/build/revamp/tests/OneOfInitialisation.spec.js +73 -73
- package/build/revamp/tests/RefreshOnChange.ResponseHandling.spec.js +19 -19
- package/build/revamp/tests/RefreshOnChange.with.Tabs.spec.js +57 -57
- package/build/revamp/tests/RefreshOnChangePreserve.spec.js +13 -13
- package/build/revamp/tests/Submission.ResponseHandling.spec.js +38 -38
- package/build/revamp/tests/Submission.spec.js +23 -23
- package/build/revamp/tests/legacy/HiddenSchemas.spec.js +24 -24
- package/build/revamp/tests/legacy/MultipleFileUploadSchema.spec.js +27 -27
- package/build/revamp/tests/legacy/PersistAsync.blob-schema.spec.js +18 -18
- package/build/revamp/tests/legacy/PersistAsync.string-schema.spec.js +8 -8
- package/build/revamp/tests/legacy/RefreshStepOnChange.debouncing.spec.js +15 -14
- package/build/revamp/tests/legacy/RefreshStepOnChange.spec.js +50 -50
- package/build/revamp/tests/legacy/ValidationAsync.spec.js +14 -14
- package/build/revamp/tests/legacy/useExternal.spec.js +6 -6
- package/build/revamp/utils/component-utils.spec.js +43 -43
- package/build/revamp/utils/findComponent.spec.js +14 -14
- package/build/revamp/utils/type-utils.js +1 -1
- package/build/revamp/wise/renderers/AlertRenderer.js +1 -1
- package/build/revamp/wise/renderers/BooleanInputRenderer.js +2 -2
- package/build/revamp/wise/renderers/BoxRenderer.js +4 -15
- package/build/revamp/wise/renderers/ButtonRenderer.js +2 -13
- package/build/revamp/wise/renderers/ColumnsRenderer.js +4 -15
- package/build/revamp/wise/renderers/DateInputRenderer.js +2 -2
- package/build/revamp/wise/renderers/DecisionRenderer.js +3 -14
- package/build/revamp/wise/renderers/DividerRenderer.js +1 -1
- package/build/revamp/wise/renderers/FormRenderer.js +2 -13
- package/build/revamp/wise/renderers/FormSectionRenderer.js +1 -1
- package/build/revamp/wise/renderers/HeadingRenderer.js +7 -7
- package/build/revamp/wise/renderers/ImageRenderer.js +5 -4
- package/build/revamp/wise/renderers/InstructionsRenderer.js +2 -13
- package/build/revamp/wise/renderers/IntegerInputRenderer.js +3 -3
- package/build/revamp/wise/renderers/LoadingIndicatorRenderer.js +1 -1
- package/build/revamp/wise/renderers/MarkdownRenderer.js +2 -13
- package/build/revamp/wise/renderers/ModalRenderer.js +2 -2
- package/build/revamp/wise/renderers/MultiUploadInputRenderer.js +3 -14
- package/build/revamp/wise/renderers/NumberInputRenderer.js +3 -3
- package/build/revamp/wise/renderers/ParagraphRenderer.js +5 -4
- package/build/revamp/wise/renderers/RepeatableRenderer.js +5 -5
- package/build/revamp/wise/renderers/ReviewRenderer.js +5 -16
- package/build/revamp/wise/renderers/SearchRenderer.js +5 -5
- package/build/revamp/wise/renderers/SelectInputRenderer/OptionMedia.js +2 -13
- package/build/revamp/wise/renderers/SelectInputRenderer/RadioInputRendererComponent.js +3 -14
- package/build/revamp/wise/renderers/SelectInputRenderer/SelectInputRenderer.js +1 -1
- package/build/revamp/wise/renderers/SelectInputRenderer/SelectInputRendererComponent.js +4 -4
- package/build/revamp/wise/renderers/SelectInputRenderer/SelectTriggerMedia.js +2 -13
- package/build/revamp/wise/renderers/SelectInputRenderer/TabInputRendererComponent.js +3 -14
- package/build/revamp/wise/renderers/StatusListRenderer.js +3 -14
- package/build/revamp/wise/renderers/TextInputRenderer.js +2 -2
- package/build/revamp/wise/renderers/UploadInputRenderer.js +6 -6
- package/build/revamp/wise/renderers/components/FieldInput.js +1 -12
- package/build/revamp/wise/renderers/components/Help.js +1 -12
- package/build/revamp/wise/renderers/components/UploadFieldInput.js +3 -14
- package/build/revamp/wise/renderers/components/icon/NavigationOptionMedia.js +2 -13
- package/build/test-utils/NeptuneProviders.js +1 -1
- package/build/types/common/messages/multi-file-upload.messages.d.ts +9 -9
- package/build/types/legacy/common/utils/mobile-utils.d.ts +1 -1
- package/build/types/legacy/jsonSchemaForm/readOnlySchema/ReadOnlySchema.messages.d.ts +6 -6
- package/build/types/legacy/layout/external/DynamicExternal.messages.d.ts +3 -3
- package/build/types/revamp/domain/components/MultiUploadInputComponent.d.ts +1 -1
- package/build/types/revamp/domain/components/UploadInputComponent.d.ts +1 -1
- package/package.json +3 -3
|
@@ -17,7 +17,7 @@ export var multiUploadInputComponentToProps = function (component) {
|
|
|
17
17
|
var _a;
|
|
18
18
|
return ({
|
|
19
19
|
id: (_a = findIdByValue(file)) !== null && _a !== void 0 ? _a : '',
|
|
20
|
-
file: file
|
|
20
|
+
file: file,
|
|
21
21
|
});
|
|
22
22
|
});
|
|
23
23
|
return __assign(__assign({}, inputComponentToProps(component, 'input-upload-multi')), { accepts: accepts, maxSize: maxSize, minItems: minItems, maxItems: maxItems, uploadLabel: uploadLabel, value: fileList, onUpload: component.onUpload.bind(component), onDelete: component.onDelete.bind(component) });
|
|
@@ -17,7 +17,7 @@ export var repeatableComponentToProps = function (component, children, editableI
|
|
|
17
17
|
title: (_a = componentSummary.title) !== null && _a !== void 0 ? _a : summaryDefaults.title,
|
|
18
18
|
description: (_b = componentSummary.description) !== null && _b !== void 0 ? _b : summaryDefaults.description,
|
|
19
19
|
icon: (_c = componentSummary.icon) !== null && _c !== void 0 ? _c : summaryDefaults.icon,
|
|
20
|
-
image: (_d = componentSummary.image) !== null && _d !== void 0 ? _d : summaryDefaults.image
|
|
20
|
+
image: (_d = componentSummary.image) !== null && _d !== void 0 ? _d : summaryDefaults.image,
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
var itemProps = components.map(function (childComponent) { return (__assign(__assign({}, getSummary(childComponent.getSummary())), { id: "".concat(childComponent.uid, "-summary") })); });
|
|
@@ -35,6 +35,6 @@ export var repeatableComponentToProps = function (component, children, editableI
|
|
|
35
35
|
onAdd: onAdd.bind(component),
|
|
36
36
|
onEdit: onEdit.bind(component),
|
|
37
37
|
onSave: onSave.bind(component),
|
|
38
|
-
onRemove: onRemove.bind(component)
|
|
38
|
+
onRemove: onRemove.bind(component),
|
|
39
39
|
};
|
|
40
40
|
};
|
|
@@ -19,7 +19,7 @@ export var searchComponentToProps = function (component) {
|
|
|
19
19
|
query: query,
|
|
20
20
|
results: results,
|
|
21
21
|
onChange: onChange,
|
|
22
|
-
onSelect: onSelect
|
|
22
|
+
onSelect: onSelect,
|
|
23
23
|
});
|
|
24
24
|
return {
|
|
25
25
|
type: 'search',
|
|
@@ -30,7 +30,7 @@ export var searchComponentToProps = function (component) {
|
|
|
30
30
|
query: query,
|
|
31
31
|
state: state,
|
|
32
32
|
title: title,
|
|
33
|
-
onChange: onChange
|
|
33
|
+
onChange: onChange,
|
|
34
34
|
};
|
|
35
35
|
};
|
|
36
36
|
var getSearchState = function (_a) {
|
|
@@ -19,7 +19,7 @@ export var inputComponentToProps = function (component, type) {
|
|
|
19
19
|
required: required,
|
|
20
20
|
value: component.getLocalValue(),
|
|
21
21
|
onBlur: onBlur.bind(component),
|
|
22
|
-
onFocus: onFocus.bind(component)
|
|
22
|
+
onFocus: onFocus.bind(component),
|
|
23
23
|
};
|
|
24
24
|
};
|
|
25
25
|
var componentHasValidationState = function (component) {
|
|
@@ -1,14 +1,3 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
2
|
import { useIntl } from 'react-intl';
|
|
14
3
|
import messages from '../../../common/messages/external-confirmation.messages';
|
|
@@ -16,10 +5,10 @@ import { Button, Markdown } from '@transferwise/components';
|
|
|
16
5
|
export function ExternalConfirmationDialog(_a) {
|
|
17
6
|
var external = _a.external, onClose = _a.onClose;
|
|
18
7
|
var formatMessage = useIntl().formatMessage;
|
|
19
|
-
return (_jsx("div",
|
|
8
|
+
return (_jsx("div", { className: "df-box-renderer-fixed-width", children: _jsxs("div", { className: "df-box-renderer-width-lg", children: [_jsx("h2", { className: "text-xs-center m-b-5", children: formatMessage(messages.title) }), _jsx(Markdown, { config: { link: { target: '_blank' } }, className: "text-xs-center m-b-5", children: formatMessage(messages.description, { origin: getOrigin(external.url) }) }), _jsx("div", { className: "df-box-renderer-fixed-width", children: _jsxs("div", { className: "df-box-renderer-width-lg", children: [_jsx(Button, { block: true, className: "m-b-2", priority: "primary", size: "md", onClick: function () {
|
|
20
9
|
window.open(external.url);
|
|
21
10
|
onClose();
|
|
22
|
-
}
|
|
11
|
+
}, children: formatMessage(messages.open) }), _jsx(Button, { block: true, className: "m-b-2", priority: "tertiary", size: "md", onClick: onClose, children: formatMessage(messages.cancel) })] }) })] }) }));
|
|
23
12
|
}
|
|
24
13
|
function getOrigin(url) {
|
|
25
14
|
try {
|
|
@@ -1,14 +1,3 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
2
|
import { useMemo } from 'react';
|
|
14
3
|
import { LoadingContextProvider } from '../LoadingContext';
|
|
@@ -16,7 +5,7 @@ import { useExternal } from './useExternal';
|
|
|
16
5
|
import { ExternalConfirmationDialog } from './ExternalConfirmationDialog';
|
|
17
6
|
export var StepRenderer = {
|
|
18
7
|
canRenderType: 'step',
|
|
19
|
-
render: StepRendererComponent
|
|
8
|
+
render: StepRendererComponent,
|
|
20
9
|
};
|
|
21
10
|
function StepRendererComponent(_a) {
|
|
22
11
|
var children = _a.children, external = _a.external, loadingState = _a.loadingState;
|
|
@@ -25,5 +14,5 @@ function StepRendererComponent(_a) {
|
|
|
25
14
|
if ((external === null || external === void 0 ? void 0 : external.url) && requiresUserConfirmation) {
|
|
26
15
|
return _jsx(ExternalConfirmationDialog, { external: external, onClose: dismissConfirmation });
|
|
27
16
|
}
|
|
28
|
-
return _jsx(LoadingContextProvider,
|
|
17
|
+
return _jsx(LoadingContextProvider, { value: value, children: children });
|
|
29
18
|
}
|
|
@@ -20,8 +20,8 @@ export default {
|
|
|
20
20
|
component: DynamicFlowWise,
|
|
21
21
|
title: 'Revamp/Dev Tools',
|
|
22
22
|
parameters: {
|
|
23
|
-
chromatic: { disableSnapshot: true }
|
|
24
|
-
}
|
|
23
|
+
chromatic: { disableSnapshot: true },
|
|
24
|
+
},
|
|
25
25
|
};
|
|
26
26
|
export function ExampleStep() {
|
|
27
27
|
var step = getBasicStep();
|
|
@@ -40,7 +40,7 @@ export function GlobalErrorStep() {
|
|
|
40
40
|
}
|
|
41
41
|
export function Search() {
|
|
42
42
|
var step = getSearchStep();
|
|
43
|
-
return (_jsxs(_Fragment, { children: [_jsx("div",
|
|
43
|
+
return (_jsxs(_Fragment, { children: [_jsx("div", { style: { display: 'flex', justifyContent: 'center' }, children: _jsxs("ul", { children: [_jsx("li", { children: "If your search term has 3 or fewer characters, the search results will take 2 seconds to load." }), _jsx("li", { children: "If your search term has more than 3 characters, the search results will take 1 second to load." }), _jsx("li", { children: "If your search term is \"nothing\", then the search results will take 1 second to load, but will be empty." }), _jsx("li", { children: "If your search term is \"error\", then the search results will take 1 second to load, with a status 500." })] }) }), _jsx(DynamicFlowWise, { flowId: "new-df-flow-id", httpClient: mockSearchHandler, initialStep: step, onCompletion: action('onCompletion'), onEvent: action('onEvent'), onError: function (error) {
|
|
44
44
|
action('onError');
|
|
45
45
|
console.error(error);
|
|
46
46
|
}, onLog: action('onLog') })] }));
|
|
@@ -64,10 +64,10 @@ var getBasicStep = function () { return ({
|
|
|
64
64
|
displayOrder: ['name', 'date', 'occupation', 'age', 'money', 'profileId'],
|
|
65
65
|
alert: {
|
|
66
66
|
type: 'alert',
|
|
67
|
-
markdown: 'Please enter the correct details here'
|
|
67
|
+
markdown: 'Please enter the correct details here',
|
|
68
68
|
},
|
|
69
69
|
properties: {
|
|
70
|
-
profileId: {
|
|
70
|
+
profileId: { const: 12345678 },
|
|
71
71
|
name: {
|
|
72
72
|
title: 'Full name',
|
|
73
73
|
type: 'string',
|
|
@@ -77,12 +77,12 @@ var getBasicStep = function () { return ({
|
|
|
77
77
|
validationMessages: {
|
|
78
78
|
required: 'Name is required',
|
|
79
79
|
minLength: 'Name is too short',
|
|
80
|
-
maxLength: 'Name is too long'
|
|
81
|
-
}
|
|
80
|
+
maxLength: 'Name is too long',
|
|
81
|
+
},
|
|
82
82
|
},
|
|
83
83
|
occupation: {
|
|
84
84
|
title: 'Occupation',
|
|
85
|
-
type: 'string'
|
|
85
|
+
type: 'string',
|
|
86
86
|
},
|
|
87
87
|
date: {
|
|
88
88
|
title: 'Date',
|
|
@@ -90,7 +90,7 @@ var getBasicStep = function () { return ({
|
|
|
90
90
|
format: 'date',
|
|
91
91
|
control: 'date-lookup',
|
|
92
92
|
minimum: '2023-01-01',
|
|
93
|
-
maximum: '2023-12-31'
|
|
93
|
+
maximum: '2023-12-31',
|
|
94
94
|
},
|
|
95
95
|
age: {
|
|
96
96
|
title: 'Age',
|
|
@@ -101,9 +101,9 @@ var getBasicStep = function () { return ({
|
|
|
101
101
|
validationMessages: {
|
|
102
102
|
required: 'Age is required',
|
|
103
103
|
minimum: 'Age is too low',
|
|
104
|
-
maximum: 'Age is too high'
|
|
104
|
+
maximum: 'Age is too high',
|
|
105
105
|
},
|
|
106
|
-
alert: { type: 'alert', markdown: 'You must be over 18' }
|
|
106
|
+
alert: { type: 'alert', markdown: 'You must be over 18' },
|
|
107
107
|
},
|
|
108
108
|
money: {
|
|
109
109
|
title: 'How much money would you like?',
|
|
@@ -113,11 +113,11 @@ var getBasicStep = function () { return ({
|
|
|
113
113
|
validationMessages: {
|
|
114
114
|
required: 'Money is required',
|
|
115
115
|
minimum: 'Money is too low',
|
|
116
|
-
maximum: 'Money is too high'
|
|
117
|
-
}
|
|
118
|
-
}
|
|
116
|
+
maximum: 'Money is too high',
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
119
|
},
|
|
120
|
-
required: ['name', 'age']
|
|
120
|
+
required: ['name', 'age'],
|
|
121
121
|
},
|
|
122
122
|
{
|
|
123
123
|
$id: '#bank-info',
|
|
@@ -135,33 +135,33 @@ var getBasicStep = function () { return ({
|
|
|
135
135
|
placeholder: 'This is a placeholder',
|
|
136
136
|
disabled: false,
|
|
137
137
|
validationMessages: { required: 'Please select an option' },
|
|
138
|
-
|
|
138
|
+
default: 'EUR',
|
|
139
139
|
oneOf: [
|
|
140
140
|
{
|
|
141
141
|
title: 'EUR',
|
|
142
142
|
icon: { name: 'flag-eur' },
|
|
143
143
|
description: 'Euro (schema default)',
|
|
144
|
-
|
|
144
|
+
const: 'EUR',
|
|
145
145
|
},
|
|
146
146
|
{
|
|
147
147
|
title: 'GBP',
|
|
148
148
|
icon: { name: 'flag-gbp' },
|
|
149
149
|
description: 'British pound',
|
|
150
|
-
|
|
150
|
+
const: { gbp: 'GBP' },
|
|
151
151
|
},
|
|
152
152
|
{
|
|
153
153
|
title: 'USD',
|
|
154
154
|
icon: { name: 'flag-usd' },
|
|
155
155
|
description: 'United States dollar',
|
|
156
|
-
|
|
156
|
+
const: 'USD',
|
|
157
157
|
},
|
|
158
|
-
]
|
|
158
|
+
],
|
|
159
159
|
},
|
|
160
160
|
complexOneOf: {
|
|
161
161
|
title: 'Complex oneOf',
|
|
162
162
|
description: 'Complex oneOf schema description blah blah blah blah.',
|
|
163
163
|
control: 'tab',
|
|
164
|
-
|
|
164
|
+
default: { type: 'type-a', accountNumber: '12345678' },
|
|
165
165
|
oneOf: [
|
|
166
166
|
{
|
|
167
167
|
type: 'object',
|
|
@@ -171,16 +171,16 @@ var getBasicStep = function () { return ({
|
|
|
171
171
|
displayOrder: ['type', 'accountNumber', 'sortCodeA'],
|
|
172
172
|
required: ['sortCodeA'],
|
|
173
173
|
properties: {
|
|
174
|
-
type: {
|
|
174
|
+
type: { const: 'type-a' },
|
|
175
175
|
accountNumber: {
|
|
176
176
|
title: '(A) Account number',
|
|
177
|
-
type: 'string'
|
|
177
|
+
type: 'string',
|
|
178
178
|
},
|
|
179
179
|
sortCodeA: {
|
|
180
180
|
title: '(A) Sort code',
|
|
181
|
-
type: 'string'
|
|
182
|
-
}
|
|
183
|
-
}
|
|
181
|
+
type: 'string',
|
|
182
|
+
},
|
|
183
|
+
},
|
|
184
184
|
},
|
|
185
185
|
{
|
|
186
186
|
type: 'object',
|
|
@@ -189,20 +189,20 @@ var getBasicStep = function () { return ({
|
|
|
189
189
|
description: 'Option B description',
|
|
190
190
|
displayOrder: ['type', 'accountNumber', 'sortCodeB'],
|
|
191
191
|
properties: {
|
|
192
|
-
type: {
|
|
192
|
+
type: { const: 'type-b' },
|
|
193
193
|
accountNumber: {
|
|
194
194
|
title: '(B) Account number',
|
|
195
|
-
type: 'string'
|
|
195
|
+
type: 'string',
|
|
196
196
|
},
|
|
197
197
|
sortCodeB: {
|
|
198
198
|
title: '(B) Sort code',
|
|
199
|
-
type: 'string'
|
|
200
|
-
}
|
|
201
|
-
}
|
|
199
|
+
type: 'string',
|
|
200
|
+
},
|
|
201
|
+
},
|
|
202
202
|
},
|
|
203
|
-
]
|
|
204
|
-
}
|
|
205
|
-
}
|
|
203
|
+
],
|
|
204
|
+
},
|
|
205
|
+
},
|
|
206
206
|
},
|
|
207
207
|
],
|
|
208
208
|
layout: [
|
|
@@ -210,22 +210,22 @@ var getBasicStep = function () { return ({
|
|
|
210
210
|
{
|
|
211
211
|
type: 'alert',
|
|
212
212
|
markdown: 'If you can see this, things are going **well**.',
|
|
213
|
-
context: 'positive'
|
|
213
|
+
context: 'positive',
|
|
214
214
|
},
|
|
215
215
|
{
|
|
216
216
|
type: 'columns',
|
|
217
217
|
left: [
|
|
218
218
|
{
|
|
219
219
|
type: 'form',
|
|
220
|
-
schemaId: '#personal-details'
|
|
220
|
+
schemaId: '#personal-details',
|
|
221
221
|
},
|
|
222
222
|
],
|
|
223
223
|
right: [
|
|
224
224
|
{
|
|
225
225
|
type: 'form',
|
|
226
|
-
schemaId: '#bank-info'
|
|
226
|
+
schemaId: '#bank-info',
|
|
227
227
|
},
|
|
228
|
-
]
|
|
228
|
+
],
|
|
229
229
|
},
|
|
230
230
|
{
|
|
231
231
|
type: 'columns',
|
|
@@ -233,15 +233,15 @@ var getBasicStep = function () { return ({
|
|
|
233
233
|
left: [
|
|
234
234
|
{
|
|
235
235
|
type: 'paragraph',
|
|
236
|
-
text: "Starting paragraph: The Wise account is the universal way for you to manage money internationally. It's made for the world. And it's built to save your money and time, so you can do more of the things you love."
|
|
236
|
+
text: "Starting paragraph: The Wise account is the universal way for you to manage money internationally. It's made for the world. And it's built to save your money and time, so you can do more of the things you love.",
|
|
237
237
|
},
|
|
238
238
|
],
|
|
239
239
|
right: [
|
|
240
240
|
{
|
|
241
241
|
type: 'paragraph',
|
|
242
|
-
text: "Ending paragraph: The Wise account is the universal way for you to manage money internationally. It's made for the world. And it's built to save your money and time, so you can do more of the things you love."
|
|
242
|
+
text: "Ending paragraph: The Wise account is the universal way for you to manage money internationally. It's made for the world. And it's built to save your money and time, so you can do more of the things you love.",
|
|
243
243
|
},
|
|
244
|
-
]
|
|
244
|
+
],
|
|
245
245
|
},
|
|
246
246
|
{
|
|
247
247
|
type: 'box',
|
|
@@ -251,9 +251,9 @@ var getBasicStep = function () { return ({
|
|
|
251
251
|
{
|
|
252
252
|
type: 'paragraph',
|
|
253
253
|
text: "The Wise account is the universal way for you to manage money internationally. It's made for the world. And it's built to save your money and time, so you can do more of the things you love.",
|
|
254
|
-
align: 'center'
|
|
254
|
+
align: 'center',
|
|
255
255
|
},
|
|
256
|
-
]
|
|
256
|
+
],
|
|
257
257
|
},
|
|
258
258
|
{
|
|
259
259
|
type: 'button',
|
|
@@ -261,8 +261,8 @@ var getBasicStep = function () { return ({
|
|
|
261
261
|
control: 'primary',
|
|
262
262
|
action: {
|
|
263
263
|
url: '/submit',
|
|
264
|
-
method: 'POST'
|
|
265
|
-
}
|
|
264
|
+
method: 'POST',
|
|
265
|
+
},
|
|
266
266
|
},
|
|
267
267
|
{
|
|
268
268
|
type: 'button',
|
|
@@ -270,15 +270,15 @@ var getBasicStep = function () { return ({
|
|
|
270
270
|
control: 'secondary',
|
|
271
271
|
action: {
|
|
272
272
|
url: '/cancel',
|
|
273
|
-
method: 'POST'
|
|
274
|
-
}
|
|
273
|
+
method: 'POST',
|
|
274
|
+
},
|
|
275
275
|
},
|
|
276
|
-
]
|
|
276
|
+
],
|
|
277
277
|
}); };
|
|
278
278
|
var getModelStep = function () { return (__assign(__assign({}, getBasicStep()), { model: {
|
|
279
279
|
name: 'John Smith',
|
|
280
280
|
currency: 'USD',
|
|
281
|
-
complexOneOf: { type: 'type-a', accountNumber: '12345678', sortCodeA: '123456' }
|
|
281
|
+
complexOneOf: { type: 'type-a', accountNumber: '12345678', sortCodeA: '123456' },
|
|
282
282
|
} })); };
|
|
283
283
|
var getSearchStep = function () { return ({
|
|
284
284
|
id: 'new-df-initial-step',
|
|
@@ -291,14 +291,14 @@ var getSearchStep = function () { return ({
|
|
|
291
291
|
method: 'GET',
|
|
292
292
|
emptyMessage: 'No results found',
|
|
293
293
|
url: '/search/',
|
|
294
|
-
param: 'query'
|
|
294
|
+
param: 'query',
|
|
295
295
|
},
|
|
296
|
-
]
|
|
296
|
+
],
|
|
297
297
|
}); };
|
|
298
298
|
var getGlobalErrorStep = function () { return (__assign(__assign({}, getBasicStep()), { errors: {
|
|
299
299
|
error: 'This is a global error',
|
|
300
300
|
validation: {
|
|
301
301
|
name: "I don't like your name",
|
|
302
|
-
complexOneOf: { sortCodeB: 'This is a validation error' }
|
|
303
|
-
}
|
|
302
|
+
complexOneOf: { sortCodeB: 'This is a validation error' },
|
|
303
|
+
},
|
|
304
304
|
} })); };
|
|
@@ -31,10 +31,10 @@ function InteractiveDemo(_a) {
|
|
|
31
31
|
var onTextAreaChange = function (event) {
|
|
32
32
|
setInitialStep(event.target.value);
|
|
33
33
|
};
|
|
34
|
-
return (_jsxs("div",
|
|
34
|
+
return (_jsxs("div", { style: { display: 'flex', gap: '1em' }, children: [_jsxs("div", { style: { flexBasis: '50%' }, children: [_jsx("h3", { children: "Revamp Editable Demo" }), _jsxs("p", { children: ["You can specify a response status code and body, and DF will load your step.", _jsx("br", {}), "(for ideas, you can select an initial step from the drop down in the controls panel)"] }), _jsxs("fieldset", { children: [_jsx("label", { htmlFor: "status-code", children: "Response Status code: " }), _jsx(StatusCodeSelect, { id: "status-code", state: [initialStatusCode, setInitialStatusCode] })] }), _jsxs("fieldset", { children: [_jsx("label", { htmlFor: "textarea", children: "Response Body:" }), _jsx(InvalidJsonWarning, { initialStep: initialStep }), _jsx("textarea", { id: "textarea", wrap: "off", rows: 40, style: { fontFamily: 'monospace', fontSize: '0.9em', width: '100%' }, value: initialStep, onChange: onTextAreaChange })] })] }), _jsx("div", { style: { flexBasis: '50%' }, children: _jsx(DynamicFlowWise, { flowId: "the-flow-id", initialStep: JSON.parse(initialStep), httpClient: fixtureHttpClient, onCompletion: action('onCompletion'), onError: function (error) {
|
|
35
35
|
action('onError');
|
|
36
36
|
console.error(error);
|
|
37
|
-
}, onEvent: action('onEvent'), onLog: action('onLog') }, "".concat(initialStep, "-").concat(initialStatusCode)) })
|
|
37
|
+
}, onEvent: action('onEvent'), onLog: action('onLog') }, "".concat(initialStep, "-").concat(initialStatusCode)) })] }));
|
|
38
38
|
}
|
|
39
39
|
function InvalidJsonWarning(_a) {
|
|
40
40
|
var initialStep = _a.initialStep;
|
|
@@ -52,20 +52,20 @@ var isValidJson = function (value) {
|
|
|
52
52
|
};
|
|
53
53
|
function StatusCodeSelect(_a) {
|
|
54
54
|
var id = _a.id, _b = _a.state, value = _b[0], setValue = _b[1];
|
|
55
|
-
return (_jsxs("select",
|
|
55
|
+
return (_jsxs("select", { id: id, value: value, onChange: function (event) { return setValue(Number.parseInt(event.target.value, 10)); }, children: [_jsx("option", { children: "200" }), _jsx("option", { children: "400" }), _jsx("option", { children: "500" })] }));
|
|
56
56
|
}
|
|
57
57
|
export default {
|
|
58
58
|
component: EditableStep,
|
|
59
59
|
title: 'Revamp/Dev Tools',
|
|
60
60
|
parameters: {
|
|
61
|
-
chromatic: { disableSnapshot: true }
|
|
61
|
+
chromatic: { disableSnapshot: true },
|
|
62
62
|
},
|
|
63
63
|
argTypes: {
|
|
64
64
|
initialStepName: {
|
|
65
65
|
label: 'Initial Step',
|
|
66
66
|
control: 'select',
|
|
67
|
-
options: Object.keys(fixtures)
|
|
68
|
-
}
|
|
67
|
+
options: Object.keys(fixtures),
|
|
68
|
+
},
|
|
69
69
|
},
|
|
70
|
-
args: { initialStepName: Object.keys(fixtures)[0] }
|
|
70
|
+
args: { initialStepName: Object.keys(fixtures)[0] },
|
|
71
71
|
};
|
|
@@ -55,8 +55,8 @@ export default {
|
|
|
55
55
|
component: DynamicFlowWise,
|
|
56
56
|
title: 'Revamp/Features/Error Handling',
|
|
57
57
|
parameters: {
|
|
58
|
-
chromatic: { disableSnapshot: true }
|
|
59
|
-
}
|
|
58
|
+
chromatic: { disableSnapshot: true },
|
|
59
|
+
},
|
|
60
60
|
};
|
|
61
61
|
export function ExampleStep() {
|
|
62
62
|
var step = getBasicStep();
|
|
@@ -76,11 +76,11 @@ var getHttpClient = function () {
|
|
|
76
76
|
name: "I don't like your name",
|
|
77
77
|
age: 'You are too young',
|
|
78
78
|
date: 'You are too old',
|
|
79
|
-
money: 'You are too poor'
|
|
80
|
-
}
|
|
79
|
+
money: 'You are too poor',
|
|
80
|
+
},
|
|
81
81
|
}, { status: 422 })];
|
|
82
82
|
});
|
|
83
|
-
}); }
|
|
83
|
+
}); },
|
|
84
84
|
});
|
|
85
85
|
};
|
|
86
86
|
var renderWithStep = function (step, httpClient) {
|
|
@@ -103,29 +103,29 @@ var getBasicStep = function () { return ({
|
|
|
103
103
|
properties: {
|
|
104
104
|
name: {
|
|
105
105
|
title: 'Full name',
|
|
106
|
-
type: 'string'
|
|
106
|
+
type: 'string',
|
|
107
107
|
},
|
|
108
108
|
date: {
|
|
109
109
|
title: 'Date',
|
|
110
110
|
type: 'string',
|
|
111
111
|
format: 'date',
|
|
112
|
-
control: 'date-lookup'
|
|
112
|
+
control: 'date-lookup',
|
|
113
113
|
},
|
|
114
114
|
age: {
|
|
115
115
|
title: 'Age',
|
|
116
|
-
type: 'integer'
|
|
116
|
+
type: 'integer',
|
|
117
117
|
},
|
|
118
118
|
money: {
|
|
119
119
|
title: 'How much money would you like?',
|
|
120
|
-
type: 'number'
|
|
121
|
-
}
|
|
122
|
-
}
|
|
120
|
+
type: 'number',
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
123
|
},
|
|
124
124
|
],
|
|
125
125
|
layout: [
|
|
126
126
|
{
|
|
127
127
|
type: 'form',
|
|
128
|
-
schemaId: '#personal-details'
|
|
128
|
+
schemaId: '#personal-details',
|
|
129
129
|
},
|
|
130
130
|
{
|
|
131
131
|
type: 'button',
|
|
@@ -133,10 +133,10 @@ var getBasicStep = function () { return ({
|
|
|
133
133
|
control: 'primary',
|
|
134
134
|
action: {
|
|
135
135
|
url: '/submit',
|
|
136
|
-
method: 'POST'
|
|
137
|
-
}
|
|
136
|
+
method: 'POST',
|
|
137
|
+
},
|
|
138
138
|
},
|
|
139
|
-
]
|
|
139
|
+
],
|
|
140
140
|
}); };
|
|
141
141
|
var getGlobalErrorStep = function () { return (__assign(__assign({}, getBasicStep()), { errors: {
|
|
142
142
|
error: 'This is a global error',
|
|
@@ -144,6 +144,6 @@ var getGlobalErrorStep = function () { return (__assign(__assign({}, getBasicSte
|
|
|
144
144
|
name: "I don't like your name",
|
|
145
145
|
age: 'You are too young',
|
|
146
146
|
date: 'You are too old',
|
|
147
|
-
money: 'You are too poor'
|
|
148
|
-
}
|
|
147
|
+
money: 'You are too poor',
|
|
148
|
+
},
|
|
149
149
|
} })); };
|
|
@@ -42,8 +42,8 @@ export default {
|
|
|
42
42
|
component: DynamicFlowWise,
|
|
43
43
|
title: 'Revamp/Features/External',
|
|
44
44
|
parameters: {
|
|
45
|
-
chromatic: { disableSnapshot: true }
|
|
46
|
-
}
|
|
45
|
+
chromatic: { disableSnapshot: true },
|
|
46
|
+
},
|
|
47
47
|
};
|
|
48
48
|
export function External() {
|
|
49
49
|
return renderWithStep(initialStep);
|
|
@@ -66,18 +66,18 @@ var initialStep = {
|
|
|
66
66
|
{
|
|
67
67
|
type: 'paragraph',
|
|
68
68
|
align: 'center',
|
|
69
|
-
text: 'Your bank is opening in another window.'
|
|
69
|
+
text: 'Your bank is opening in another window.',
|
|
70
70
|
},
|
|
71
71
|
{
|
|
72
72
|
type: 'paragraph',
|
|
73
73
|
align: 'center',
|
|
74
|
-
text: 'Please, follow their instructions. Keep this window open.'
|
|
74
|
+
text: 'Please, follow their instructions. Keep this window open.',
|
|
75
75
|
},
|
|
76
76
|
{ type: 'loading-indicator', margin: 'xl' },
|
|
77
77
|
{
|
|
78
78
|
type: 'info',
|
|
79
79
|
align: 'center',
|
|
80
|
-
markdown: "If it didn't work, you can [reopen](http://google.com/) the tab"
|
|
80
|
+
markdown: "If it didn't work, you can [reopen](http://google.com/) the tab",
|
|
81
81
|
},
|
|
82
|
-
]
|
|
82
|
+
],
|
|
83
83
|
};
|