@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
|
@@ -64,10 +64,10 @@ var getFormStep = function (_a) {
|
|
|
64
64
|
{ type: 'form', schema: schema },
|
|
65
65
|
{
|
|
66
66
|
type: 'button',
|
|
67
|
-
action: { type: 'primary', url: '/submit', title: 'Submit', method: 'POST' }
|
|
67
|
+
action: { type: 'primary', url: '/submit', title: 'Submit', method: 'POST' },
|
|
68
68
|
},
|
|
69
69
|
],
|
|
70
|
-
model: model || { accountNumber: '1234567890' }
|
|
70
|
+
model: model || { accountNumber: '1234567890' },
|
|
71
71
|
});
|
|
72
72
|
};
|
|
73
73
|
var asyncJsonResponse = function (response, init) {
|
|
@@ -96,15 +96,15 @@ describe('When the model for a schema with refresh-on-change changes', function
|
|
|
96
96
|
title: 'Favourite color',
|
|
97
97
|
type: 'string',
|
|
98
98
|
oneOf: [
|
|
99
|
-
{ title: 'Red',
|
|
100
|
-
{ title: 'Blue',
|
|
99
|
+
{ title: 'Red', const: 'red' },
|
|
100
|
+
{ title: 'Blue', const: 'blue' },
|
|
101
101
|
],
|
|
102
102
|
control: 'radio',
|
|
103
103
|
refreshStepOnChange: true,
|
|
104
|
-
refreshUrl: '/example-color-refresh'
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
}
|
|
104
|
+
refreshUrl: '/example-color-refresh',
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
108
|
}));
|
|
109
109
|
});
|
|
110
110
|
it('disables actions buttons while refreshing steps, and then re-enables them', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -151,10 +151,10 @@ describe('When the model for a schema with refresh-on-change changes', function
|
|
|
151
151
|
title: 'Account number',
|
|
152
152
|
type: 'string',
|
|
153
153
|
refreshStepOnChange: true,
|
|
154
|
-
refreshUrl: '/refresh'
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
}
|
|
154
|
+
refreshUrl: '/refresh',
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
},
|
|
158
158
|
}));
|
|
159
159
|
});
|
|
160
160
|
renderWithProviders(_jsx(DynamicFlow, __assign({}, makeProps({ httpClient: mockHttpClient }))));
|
|
@@ -189,9 +189,9 @@ describe('When the model for a schema with refresh-on-change changes', function
|
|
|
189
189
|
title: 'Account number',
|
|
190
190
|
type: 'string',
|
|
191
191
|
refreshStepOnChange: true,
|
|
192
|
-
refreshUrl: '/example-account-refresh'
|
|
193
|
-
}
|
|
194
|
-
}
|
|
192
|
+
refreshUrl: '/example-account-refresh',
|
|
193
|
+
},
|
|
194
|
+
},
|
|
195
195
|
};
|
|
196
196
|
var mockHttpClient = jest.fn(function (input, init) {
|
|
197
197
|
// eslint-disable-next-line jest/no-conditional-in-test
|
|
@@ -202,8 +202,8 @@ describe('When the model for a schema with refresh-on-change changes', function
|
|
|
202
202
|
return asyncJsonResponse(getFormStep({
|
|
203
203
|
schema: schema,
|
|
204
204
|
model: {
|
|
205
|
-
accountNumber: 'QWERTYUIOP'
|
|
206
|
-
}
|
|
205
|
+
accountNumber: 'QWERTYUIOP',
|
|
206
|
+
},
|
|
207
207
|
}));
|
|
208
208
|
default:
|
|
209
209
|
throw new Error('unexpected request');
|
|
@@ -216,7 +216,7 @@ describe('When the model for a schema with refresh-on-change changes', function
|
|
|
216
216
|
case 0:
|
|
217
217
|
renderWithProviders(_jsx(DynamicFlow, __assign({}, makeProps({
|
|
218
218
|
httpClient: mockHttpClient,
|
|
219
|
-
initialAction: { method: 'GET', url: '/example' }
|
|
219
|
+
initialAction: { method: 'GET', url: '/example' },
|
|
220
220
|
}))));
|
|
221
221
|
return [4 /*yield*/, screen.findByLabelText('Account number')];
|
|
222
222
|
case 1:
|
|
@@ -251,9 +251,9 @@ describe('When the model for a schema with refresh-on-change changes', function
|
|
|
251
251
|
title: 'Email',
|
|
252
252
|
minLength: 5,
|
|
253
253
|
refreshStepOnChange: true,
|
|
254
|
-
refreshUrl: '/example-email-refresh'
|
|
255
|
-
}
|
|
256
|
-
}
|
|
254
|
+
refreshUrl: '/example-email-refresh',
|
|
255
|
+
},
|
|
256
|
+
},
|
|
257
257
|
};
|
|
258
258
|
var refreshedSchema = {
|
|
259
259
|
$id: '#example',
|
|
@@ -265,14 +265,14 @@ describe('When the model for a schema with refresh-on-change changes', function
|
|
|
265
265
|
title: 'Email',
|
|
266
266
|
minLength: 5,
|
|
267
267
|
refreshStepOnChange: true,
|
|
268
|
-
refreshUrl: '/example-email-refresh'
|
|
268
|
+
refreshUrl: '/example-email-refresh',
|
|
269
269
|
},
|
|
270
270
|
name: {
|
|
271
271
|
type: 'string',
|
|
272
272
|
title: 'Name',
|
|
273
|
-
minLength: 2
|
|
274
|
-
}
|
|
275
|
-
}
|
|
273
|
+
minLength: 2,
|
|
274
|
+
},
|
|
275
|
+
},
|
|
276
276
|
};
|
|
277
277
|
var mockHttpClient = function (input, init) {
|
|
278
278
|
// eslint-disable-next-line jest/no-conditional-in-test
|
|
@@ -282,7 +282,7 @@ describe('When the model for a schema with refresh-on-change changes', function
|
|
|
282
282
|
case '/example-email-refresh':
|
|
283
283
|
return asyncJsonResponse(getFormStep({
|
|
284
284
|
schema: refreshedSchema,
|
|
285
|
-
model: __assign(__assign({}, JSON.parse(init === null || init === void 0 ? void 0 : init.body)), { name: 'Prefilled Name from Server', email: 'some.other@email.com' })
|
|
285
|
+
model: __assign(__assign({}, JSON.parse(init === null || init === void 0 ? void 0 : init.body)), { name: 'Prefilled Name from Server', email: 'some.other@email.com' }),
|
|
286
286
|
}));
|
|
287
287
|
default:
|
|
288
288
|
throw new Error('unexpected request');
|
|
@@ -295,7 +295,7 @@ describe('When the model for a schema with refresh-on-change changes', function
|
|
|
295
295
|
case 0:
|
|
296
296
|
renderWithProviders(_jsx(DynamicFlow, __assign({}, makeProps({
|
|
297
297
|
httpClient: mockHttpClient,
|
|
298
|
-
initialAction: { method: 'GET', url: '/example' }
|
|
298
|
+
initialAction: { method: 'GET', url: '/example' },
|
|
299
299
|
}))));
|
|
300
300
|
return [4 /*yield*/, screen.findByLabelText('Email')];
|
|
301
301
|
case 1:
|
|
@@ -328,15 +328,15 @@ describe('Tracking events', function () {
|
|
|
328
328
|
title: 'Favourite color',
|
|
329
329
|
type: 'string',
|
|
330
330
|
oneOf: [
|
|
331
|
-
{ title: 'Red',
|
|
332
|
-
{ title: 'Blue',
|
|
331
|
+
{ title: 'Red', const: 'red' },
|
|
332
|
+
{ title: 'Blue', const: 'blue' },
|
|
333
333
|
],
|
|
334
334
|
control: 'radio',
|
|
335
335
|
refreshStepOnChange: true,
|
|
336
|
-
refreshUrl: '/example-color-refresh'
|
|
337
|
-
}
|
|
338
|
-
}
|
|
339
|
-
}
|
|
336
|
+
refreshUrl: '/example-color-refresh',
|
|
337
|
+
},
|
|
338
|
+
},
|
|
339
|
+
},
|
|
340
340
|
})));
|
|
341
341
|
};
|
|
342
342
|
var getErrorResponse = function () { return new Response(null, { status: 500 }); };
|
|
@@ -363,7 +363,7 @@ describe('Tracking events', function () {
|
|
|
363
363
|
flowId: 'the-flow-id',
|
|
364
364
|
stepId: 'the-step-id',
|
|
365
365
|
custom: 'property',
|
|
366
|
-
status: 'pending'
|
|
366
|
+
status: 'pending',
|
|
367
367
|
}));
|
|
368
368
|
})];
|
|
369
369
|
case 3:
|
|
@@ -392,7 +392,7 @@ describe('Tracking events', function () {
|
|
|
392
392
|
flowId: 'the-flow-id',
|
|
393
393
|
stepId: 'the-step-id',
|
|
394
394
|
custom: 'property',
|
|
395
|
-
status: 'success'
|
|
395
|
+
status: 'success',
|
|
396
396
|
}));
|
|
397
397
|
})];
|
|
398
398
|
case 3:
|
|
@@ -426,7 +426,7 @@ describe('Tracking events', function () {
|
|
|
426
426
|
flowId: 'the-flow-id',
|
|
427
427
|
stepId: 'the-step-id',
|
|
428
428
|
custom: 'property',
|
|
429
|
-
status: 'failure'
|
|
429
|
+
status: 'failure',
|
|
430
430
|
}));
|
|
431
431
|
})];
|
|
432
432
|
case 3:
|
|
@@ -469,8 +469,8 @@ describe('Tracking events', function () {
|
|
|
469
469
|
return asyncJsonResponse(getFormStep({
|
|
470
470
|
schema: schema,
|
|
471
471
|
model: {
|
|
472
|
-
accountNumber: 'QWERTYUIOP'
|
|
473
|
-
}
|
|
472
|
+
accountNumber: 'QWERTYUIOP',
|
|
473
|
+
},
|
|
474
474
|
}));
|
|
475
475
|
default:
|
|
476
476
|
throw new Error('unexpected request');
|
|
@@ -491,13 +491,13 @@ describe('Tracking events', function () {
|
|
|
491
491
|
title: 'Account number',
|
|
492
492
|
type: 'string',
|
|
493
493
|
refreshStepOnChange: true,
|
|
494
|
-
refreshFormUrl: '/example-account-refresh'
|
|
495
|
-
}
|
|
496
|
-
}
|
|
494
|
+
refreshFormUrl: '/example-account-refresh',
|
|
495
|
+
},
|
|
496
|
+
},
|
|
497
497
|
});
|
|
498
498
|
renderWithProviders(_jsx(DynamicFlow, __assign({}, makeProps({
|
|
499
499
|
httpClient: mockHttpClient,
|
|
500
|
-
initialAction: { method: 'GET', url: '/example' }
|
|
500
|
+
initialAction: { method: 'GET', url: '/example' },
|
|
501
501
|
}))));
|
|
502
502
|
return [4 /*yield*/, screen.findByLabelText('Account number')];
|
|
503
503
|
case 1:
|
|
@@ -534,13 +534,13 @@ describe('Tracking events', function () {
|
|
|
534
534
|
title: 'Account number',
|
|
535
535
|
type: 'string',
|
|
536
536
|
refreshFormOnChange: true,
|
|
537
|
-
refreshUrl: '/example-account-refresh'
|
|
538
|
-
}
|
|
539
|
-
}
|
|
537
|
+
refreshUrl: '/example-account-refresh',
|
|
538
|
+
},
|
|
539
|
+
},
|
|
540
540
|
});
|
|
541
541
|
renderWithProviders(_jsx(DynamicFlow, __assign({}, makeProps({
|
|
542
542
|
httpClient: mockHttpClient,
|
|
543
|
-
initialAction: { method: 'GET', url: '/example' }
|
|
543
|
+
initialAction: { method: 'GET', url: '/example' },
|
|
544
544
|
}))));
|
|
545
545
|
return [4 /*yield*/, screen.findByLabelText('Account number')];
|
|
546
546
|
case 1:
|
|
@@ -56,12 +56,12 @@ var user = userEvent.setup();
|
|
|
56
56
|
var layout = [
|
|
57
57
|
{
|
|
58
58
|
type: 'form',
|
|
59
|
-
schemaId: '#schema'
|
|
59
|
+
schemaId: '#schema',
|
|
60
60
|
},
|
|
61
61
|
{
|
|
62
62
|
type: 'button',
|
|
63
63
|
title: 'Submit',
|
|
64
|
-
action: { url: '/submit', method: 'POST' }
|
|
64
|
+
action: { url: '/submit', method: 'POST' },
|
|
65
65
|
},
|
|
66
66
|
];
|
|
67
67
|
var basicSchema = {
|
|
@@ -74,9 +74,9 @@ var basicSchema = {
|
|
|
74
74
|
title: 'Email',
|
|
75
75
|
type: 'string',
|
|
76
76
|
summary: {
|
|
77
|
-
providesTitle: true
|
|
78
|
-
}
|
|
79
|
-
}
|
|
77
|
+
providesTitle: true,
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
80
|
};
|
|
81
81
|
var basicRepeatableStep = {
|
|
82
82
|
id: 'Repeatable',
|
|
@@ -87,12 +87,12 @@ var basicRepeatableStep = {
|
|
|
87
87
|
type: 'object',
|
|
88
88
|
displayOrder: ['repeating'],
|
|
89
89
|
properties: {
|
|
90
|
-
repeating: basicSchema
|
|
91
|
-
}
|
|
90
|
+
repeating: basicSchema,
|
|
91
|
+
},
|
|
92
92
|
},
|
|
93
93
|
],
|
|
94
94
|
layout: layout,
|
|
95
|
-
model: { repeating: ['test@wise.com'] }
|
|
95
|
+
model: { repeating: ['test@wise.com'] },
|
|
96
96
|
};
|
|
97
97
|
var objectRepeatableStep = {
|
|
98
98
|
id: 'Repeatable',
|
|
@@ -117,20 +117,20 @@ var objectRepeatableStep = {
|
|
|
117
117
|
title: 'Full name',
|
|
118
118
|
type: 'string',
|
|
119
119
|
summary: {
|
|
120
|
-
providesTitle: true
|
|
121
|
-
}
|
|
120
|
+
providesTitle: true,
|
|
121
|
+
},
|
|
122
122
|
},
|
|
123
123
|
address: {
|
|
124
124
|
title: 'Address',
|
|
125
125
|
type: 'string',
|
|
126
126
|
summary: {
|
|
127
|
-
providesDescription: true
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
}
|
|
127
|
+
providesDescription: true,
|
|
128
|
+
},
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
},
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
134
|
},
|
|
135
135
|
],
|
|
136
136
|
layout: layout,
|
|
@@ -138,8 +138,8 @@ var objectRepeatableStep = {
|
|
|
138
138
|
repeating: [
|
|
139
139
|
{ name: 'Florence', address: 'London' },
|
|
140
140
|
{ name: 'Rita', address: 'Amsterdam' },
|
|
141
|
-
]
|
|
142
|
-
}
|
|
141
|
+
],
|
|
142
|
+
},
|
|
143
143
|
};
|
|
144
144
|
var mockHttpClient = jest.fn();
|
|
145
145
|
var getProps = function (overrides) {
|
|
@@ -157,7 +157,7 @@ describe('RepeatableSchema', function () {
|
|
|
157
157
|
});
|
|
158
158
|
it('should render initial error if an error for the component is given (not an error for the children)', function () {
|
|
159
159
|
renderWithProviders(_jsx(DynamicFlow, __assign({}, getProps({
|
|
160
|
-
initialStep: __assign(__assign({}, basicRepeatableStep), { model: null, errors: { validation: { repeating: 'This is an error for the entire repeatable' } } })
|
|
160
|
+
initialStep: __assign(__assign({}, basicRepeatableStep), { model: null, errors: { validation: { repeating: 'This is an error for the entire repeatable' } } }),
|
|
161
161
|
}))));
|
|
162
162
|
expect(screen.getByText('This is an error for the entire repeatable')).toBeInTheDocument();
|
|
163
163
|
});
|
|
@@ -231,7 +231,7 @@ describe('RepeatableSchema', function () {
|
|
|
231
231
|
_a.sent();
|
|
232
232
|
return [4 /*yield*/, waitFor(function () {
|
|
233
233
|
return expect(mockHttpClient).toHaveBeenCalledWith('/submit', expect.objectContaining({
|
|
234
|
-
body: JSON.stringify({ repeating: [{ name: 'Florence', address: 'London' }] })
|
|
234
|
+
body: JSON.stringify({ repeating: [{ name: 'Florence', address: 'London' }] }),
|
|
235
235
|
}));
|
|
236
236
|
})];
|
|
237
237
|
case 7:
|
|
@@ -303,14 +303,14 @@ describe('RepeatableSchema', function () {
|
|
|
303
303
|
repeating: [
|
|
304
304
|
{
|
|
305
305
|
address: 'London',
|
|
306
|
-
name: 'Florence Jones'
|
|
306
|
+
name: 'Florence Jones',
|
|
307
307
|
},
|
|
308
308
|
{
|
|
309
309
|
name: 'Rita',
|
|
310
|
-
address: 'Amsterdam'
|
|
310
|
+
address: 'Amsterdam',
|
|
311
311
|
},
|
|
312
|
-
]
|
|
313
|
-
})
|
|
312
|
+
],
|
|
313
|
+
}),
|
|
314
314
|
}));
|
|
315
315
|
})];
|
|
316
316
|
case 7:
|
|
@@ -365,10 +365,10 @@ describe('RepeatableSchema', function () {
|
|
|
365
365
|
repeating: [
|
|
366
366
|
{
|
|
367
367
|
name: 'Rita',
|
|
368
|
-
address: 'Amsterdam'
|
|
368
|
+
address: 'Amsterdam',
|
|
369
369
|
},
|
|
370
|
-
]
|
|
371
|
-
})
|
|
370
|
+
],
|
|
371
|
+
}),
|
|
372
372
|
}));
|
|
373
373
|
})];
|
|
374
374
|
case 5:
|
|
@@ -404,7 +404,7 @@ describe('RepeatableSchema', function () {
|
|
|
404
404
|
describe('with a basic schema', function () {
|
|
405
405
|
it('should populate options with provided data', function () {
|
|
406
406
|
renderWithProviders(_jsx(DynamicFlow, __assign({}, getProps({
|
|
407
|
-
initialStep: __assign(__assign({}, basicRepeatableStep), { model: { repeating: ['test@wise.com', 'data@wise.com'] } })
|
|
407
|
+
initialStep: __assign(__assign({}, basicRepeatableStep), { model: { repeating: ['test@wise.com', 'data@wise.com'] } }),
|
|
408
408
|
}))));
|
|
409
409
|
expect(screen.getByRole('button', { name: 'test@wise.com' })).toBeInTheDocument();
|
|
410
410
|
expect(screen.getByRole('button', { name: 'data@wise.com' })).toBeInTheDocument();
|
|
@@ -427,9 +427,9 @@ describe('RepeatableSchema', function () {
|
|
|
427
427
|
mockHttpClient = getMockHttpClient({
|
|
428
428
|
'/validate': function () {
|
|
429
429
|
return respondWith({
|
|
430
|
-
message: 'Validation failed'
|
|
430
|
+
message: 'Validation failed',
|
|
431
431
|
});
|
|
432
|
-
}
|
|
432
|
+
},
|
|
433
433
|
});
|
|
434
434
|
renderWithProviders(_jsx(DynamicFlow, __assign({}, getProps({
|
|
435
435
|
initialStep: __assign(__assign({}, basicRepeatableStep), { schemas: [
|
|
@@ -450,14 +450,14 @@ describe('RepeatableSchema', function () {
|
|
|
450
450
|
validationAsync: {
|
|
451
451
|
method: 'POST',
|
|
452
452
|
url: '/validate',
|
|
453
|
-
param: 'validationParam'
|
|
454
|
-
}
|
|
455
|
-
}
|
|
456
|
-
}
|
|
457
|
-
}
|
|
453
|
+
param: 'validationParam',
|
|
454
|
+
},
|
|
455
|
+
},
|
|
456
|
+
},
|
|
457
|
+
},
|
|
458
458
|
},
|
|
459
459
|
] }),
|
|
460
|
-
httpClient: mockHttpClient
|
|
460
|
+
httpClient: mockHttpClient,
|
|
461
461
|
}))));
|
|
462
462
|
return [4 /*yield*/, user.click(screen.getByRole('button', { name: 'Add Item' }))];
|
|
463
463
|
case 1:
|
|
@@ -499,14 +499,14 @@ describe('RepeatableSchema', function () {
|
|
|
499
499
|
title: 'Name',
|
|
500
500
|
validationMessages: {
|
|
501
501
|
minLength: 'Your name is too short',
|
|
502
|
-
maxLength: 'Your name is too long'
|
|
502
|
+
maxLength: 'Your name is too long',
|
|
503
503
|
},
|
|
504
504
|
summary: {
|
|
505
|
-
providesTitle: true
|
|
506
|
-
}
|
|
507
|
-
}
|
|
508
|
-
}
|
|
509
|
-
}
|
|
505
|
+
providesTitle: true,
|
|
506
|
+
},
|
|
507
|
+
},
|
|
508
|
+
},
|
|
509
|
+
},
|
|
510
510
|
},
|
|
511
511
|
] });
|
|
512
512
|
var getModal = function () { return screen.findByRole('dialog'); };
|
|
@@ -599,9 +599,9 @@ describe('RepeatableSchema', function () {
|
|
|
599
599
|
type: 'string',
|
|
600
600
|
title: 'Name',
|
|
601
601
|
summary: {
|
|
602
|
-
providesTitle: true
|
|
603
|
-
}
|
|
604
|
-
}
|
|
602
|
+
providesTitle: true,
|
|
603
|
+
},
|
|
604
|
+
},
|
|
605
605
|
};
|
|
606
606
|
var initialStep = {
|
|
607
607
|
id: 'Repeatable',
|
|
@@ -613,12 +613,12 @@ describe('RepeatableSchema', function () {
|
|
|
613
613
|
displayOrder: ['repeating'],
|
|
614
614
|
required: ['repeating'],
|
|
615
615
|
properties: {
|
|
616
|
-
repeating: __assign(__assign({}, stringSchema), { minItems: 2, maxItems: 3 })
|
|
617
|
-
}
|
|
616
|
+
repeating: __assign(__assign({}, stringSchema), { minItems: 2, maxItems: 3 }),
|
|
617
|
+
},
|
|
618
618
|
},
|
|
619
619
|
],
|
|
620
620
|
layout: layout,
|
|
621
|
-
model: {}
|
|
621
|
+
model: {},
|
|
622
622
|
};
|
|
623
623
|
var getModal = function () { return screen.findByRole('dialog'); };
|
|
624
624
|
var getNameInput = function () { return __awaiter(void 0, void 0, void 0, function () { var _a; return __generator(this, function (_b) {
|
|
@@ -677,11 +677,11 @@ describe('RepeatableSchema', function () {
|
|
|
677
677
|
type: 'object',
|
|
678
678
|
displayOrder: ['repeating'],
|
|
679
679
|
properties: {
|
|
680
|
-
repeating: stringSchema
|
|
681
|
-
}
|
|
680
|
+
repeating: stringSchema,
|
|
681
|
+
},
|
|
682
682
|
},
|
|
683
683
|
] }),
|
|
684
|
-
onEvent: onEvent
|
|
684
|
+
onEvent: onEvent,
|
|
685
685
|
}))));
|
|
686
686
|
return [4 /*yield*/, user.click(screen.getByRole('button', { name: /submit/i }))];
|
|
687
687
|
case 1:
|
|
@@ -853,12 +853,12 @@ describe('RepeatableSchema', function () {
|
|
|
853
853
|
maxSize: 5242000,
|
|
854
854
|
accepts: ['image/png', 'image/jpg', 'application/pdf'],
|
|
855
855
|
validationMessages: {
|
|
856
|
-
maxSize: 'Your file is too large'
|
|
856
|
+
maxSize: 'Your file is too large',
|
|
857
857
|
},
|
|
858
858
|
summary: {
|
|
859
|
-
providesTitle: true
|
|
860
|
-
}
|
|
861
|
-
}
|
|
859
|
+
providesTitle: true,
|
|
860
|
+
},
|
|
861
|
+
},
|
|
862
862
|
};
|
|
863
863
|
var initialStep = {
|
|
864
864
|
id: 'Repeatable',
|
|
@@ -869,16 +869,16 @@ describe('RepeatableSchema', function () {
|
|
|
869
869
|
type: 'object',
|
|
870
870
|
displayOrder: ['repeating'],
|
|
871
871
|
properties: {
|
|
872
|
-
repeating: base64StringSchema
|
|
873
|
-
}
|
|
872
|
+
repeating: base64StringSchema,
|
|
873
|
+
},
|
|
874
874
|
},
|
|
875
875
|
],
|
|
876
876
|
layout: layout,
|
|
877
|
-
model: {}
|
|
877
|
+
model: {},
|
|
878
878
|
};
|
|
879
879
|
var getUser = function () {
|
|
880
880
|
var user = userEvent.setup({
|
|
881
|
-
advanceTimers: function (delay) { return jest.advanceTimersByTime(delay); }
|
|
881
|
+
advanceTimers: function (delay) { return jest.advanceTimersByTime(delay); },
|
|
882
882
|
});
|
|
883
883
|
return user;
|
|
884
884
|
};
|
|
@@ -960,8 +960,8 @@ describe('RepeatableSchema', function () {
|
|
|
960
960
|
return [4 /*yield*/, waitFor(function () {
|
|
961
961
|
expect(mockHttpClient).toHaveBeenCalledWith('/submit', expect.objectContaining({
|
|
962
962
|
body: JSON.stringify({
|
|
963
|
-
repeating: ['data:image/png;base64,ZmFrZS1maWxlLWRhdGE=']
|
|
964
|
-
})
|
|
963
|
+
repeating: ['data:image/png;base64,ZmFrZS1maWxlLWRhdGE='],
|
|
964
|
+
}),
|
|
965
965
|
}));
|
|
966
966
|
})];
|
|
967
967
|
case 5:
|
|
@@ -49,25 +49,25 @@ describe('Step Model', function () {
|
|
|
49
49
|
type: 'object',
|
|
50
50
|
displayOrder: ['name'],
|
|
51
51
|
properties: {
|
|
52
|
-
name: { type: 'string', title: 'Name' }
|
|
53
|
-
}
|
|
52
|
+
name: { type: 'string', title: 'Name' },
|
|
53
|
+
},
|
|
54
54
|
},
|
|
55
55
|
],
|
|
56
56
|
layout: [
|
|
57
57
|
{ type: 'form', schemaId: '#schema-id' },
|
|
58
58
|
{ title: 'Submit 1', type: 'button', action: { url: '/step-2' } },
|
|
59
|
-
]
|
|
59
|
+
],
|
|
60
60
|
},
|
|
61
61
|
'/step-2': {
|
|
62
62
|
title: 'Second Step',
|
|
63
63
|
schemas: [],
|
|
64
|
-
layout: [{ title: 'Submit 2', type: 'button', action: { url: '/step-3' } }]
|
|
64
|
+
layout: [{ title: 'Submit 2', type: 'button', action: { url: '/step-3' } }],
|
|
65
65
|
},
|
|
66
66
|
'/step-3': {
|
|
67
67
|
title: 'Third Step',
|
|
68
68
|
schemas: [],
|
|
69
|
-
layout: [{ type: 'paragraph', text: 'This is the last step' }]
|
|
70
|
-
}
|
|
69
|
+
layout: [{ type: 'paragraph', text: 'This is the last step' }],
|
|
70
|
+
},
|
|
71
71
|
};
|
|
72
72
|
it('should clean the model when a step.model is undefined after a submission', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
73
73
|
var onError, onCompletion, httpClient, _a, input, _b, _c;
|
|
@@ -62,9 +62,9 @@ describe('Validation Async', function () {
|
|
|
62
62
|
type: 'string',
|
|
63
63
|
maxLength: 18,
|
|
64
64
|
title: 'IBAN',
|
|
65
|
-
validationAsync: validationAsync
|
|
66
|
-
}
|
|
67
|
-
}
|
|
65
|
+
validationAsync: validationAsync,
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
68
|
}); };
|
|
69
69
|
var getInitialStep = function (validationAsync) { return ({
|
|
70
70
|
id: 'validation-async-step-id',
|
|
@@ -75,9 +75,9 @@ describe('Validation Async', function () {
|
|
|
75
75
|
{
|
|
76
76
|
type: 'button',
|
|
77
77
|
title: 'Submit',
|
|
78
|
-
action: { url: '/submit', method: 'POST' }
|
|
78
|
+
action: { url: '/submit', method: 'POST' },
|
|
79
79
|
},
|
|
80
|
-
]
|
|
80
|
+
],
|
|
81
81
|
}); };
|
|
82
82
|
var getProps = function (initialStep) { return ({
|
|
83
83
|
flowId: 'flow-id',
|
|
@@ -86,7 +86,7 @@ describe('Validation Async', function () {
|
|
|
86
86
|
onCompletion: jest.fn(),
|
|
87
87
|
onError: jest.fn(),
|
|
88
88
|
onEvent: jest.fn(),
|
|
89
|
-
onLog: jest.fn()
|
|
89
|
+
onLog: jest.fn(),
|
|
90
90
|
}); };
|
|
91
91
|
describe('when the input is blurred and has null value', function () {
|
|
92
92
|
it('does NOT trigger validation async', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -280,7 +280,7 @@ describe('Validation Async', function () {
|
|
|
280
280
|
switch (_a.label) {
|
|
281
281
|
case 0:
|
|
282
282
|
httpClient = jest.fn().mockResolvedValue(new Response(JSON.stringify({ message: 'Invalid IBAN (422)' }), {
|
|
283
|
-
status: 422
|
|
283
|
+
status: 422,
|
|
284
284
|
}));
|
|
285
285
|
props = getProps(getInitialStep({ method: 'POST', url: '/validate', param: 'myParameter' }));
|
|
286
286
|
renderWithProviders(_jsx(DynamicFlow, __assign({}, props, { httpClient: httpClient })));
|
|
@@ -387,7 +387,7 @@ describe('Validation Async', function () {
|
|
|
387
387
|
return [2 /*return*/, Promise.resolve(new Response(null))];
|
|
388
388
|
}); }); }),
|
|
389
389
|
expectedTrackingStatus: 'failure',
|
|
390
|
-
doNotExpect: 'Error'
|
|
390
|
+
doNotExpect: 'Error',
|
|
391
391
|
},
|
|
392
392
|
{
|
|
393
393
|
description: 'when the validation response is successful with a string body',
|
|
@@ -395,7 +395,7 @@ describe('Validation Async', function () {
|
|
|
395
395
|
return [2 /*return*/, Promise.resolve(new Response("Everything is fine"))];
|
|
396
396
|
}); }); }),
|
|
397
397
|
expectedTrackingStatus: 'failure',
|
|
398
|
-
doNotExpect: 'Everything is fine'
|
|
398
|
+
doNotExpect: 'Everything is fine',
|
|
399
399
|
},
|
|
400
400
|
{
|
|
401
401
|
description: 'when the validation response fails with 500',
|
|
@@ -403,7 +403,7 @@ describe('Validation Async', function () {
|
|
|
403
403
|
return [2 /*return*/, Promise.resolve(new Response("Internal server error", { status: 500 }))];
|
|
404
404
|
}); }); }),
|
|
405
405
|
expectedTrackingStatus: 'failure',
|
|
406
|
-
doNotExpect: 'Internal server error'
|
|
406
|
+
doNotExpect: 'Internal server error',
|
|
407
407
|
},
|
|
408
408
|
{
|
|
409
409
|
description: 'when the validation response fails with 403',
|
|
@@ -411,7 +411,7 @@ describe('Validation Async', function () {
|
|
|
411
411
|
return [2 /*return*/, Promise.resolve(new Response("{ \"messsage\": \"Forbidden\" }", { status: 403 }))];
|
|
412
412
|
}); }); }),
|
|
413
413
|
expectedTrackingStatus: 'success',
|
|
414
|
-
doNotExpect: 'Forbidden'
|
|
414
|
+
doNotExpect: 'Forbidden',
|
|
415
415
|
},
|
|
416
416
|
{
|
|
417
417
|
description: 'when the validation response JSON does not parse as an object',
|
|
@@ -419,7 +419,7 @@ describe('Validation Async', function () {
|
|
|
419
419
|
return [2 /*return*/, Promise.resolve(new Response("1234567890", { status: 422 }))];
|
|
420
420
|
}); }); }),
|
|
421
421
|
expectedTrackingStatus: 'failure',
|
|
422
|
-
doNotExpect: '1234567890'
|
|
422
|
+
doNotExpect: '1234567890',
|
|
423
423
|
},
|
|
424
424
|
{
|
|
425
425
|
description: 'when the validation response does not even parse as JSON',
|
|
@@ -427,7 +427,7 @@ describe('Validation Async', function () {
|
|
|
427
427
|
return [2 /*return*/, Promise.resolve(new Response("non-json-string", { status: 422 }))];
|
|
428
428
|
}); }); }),
|
|
429
429
|
expectedTrackingStatus: 'failure',
|
|
430
|
-
doNotExpect: 'non-json-string'
|
|
430
|
+
doNotExpect: 'non-json-string',
|
|
431
431
|
},
|
|
432
432
|
];
|
|
433
433
|
describe.each(otherCases)('$description', function (_a) {
|