@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
|
@@ -62,7 +62,7 @@ describe('OneOf Initialisation', function () {
|
|
|
62
62
|
{
|
|
63
63
|
type: 'object',
|
|
64
64
|
displayOrder: ['email'],
|
|
65
|
-
properties: { email: { type: 'string', title: 'Email' } }
|
|
65
|
+
properties: { email: { type: 'string', title: 'Email' } },
|
|
66
66
|
},
|
|
67
67
|
{
|
|
68
68
|
oneOf: [
|
|
@@ -70,32 +70,32 @@ describe('OneOf Initialisation', function () {
|
|
|
70
70
|
title: 'Iban Option',
|
|
71
71
|
type: 'object',
|
|
72
72
|
displayOrder: ['iban', 'type'],
|
|
73
|
-
properties: { iban: { type: 'string', title: 'IBAN' }, type: {
|
|
73
|
+
properties: { iban: { type: 'string', title: 'IBAN' }, type: { const: 'IBAN' } },
|
|
74
74
|
},
|
|
75
75
|
{
|
|
76
76
|
title: 'Bic Option',
|
|
77
77
|
type: 'object',
|
|
78
78
|
required: ['bic'],
|
|
79
79
|
displayOrder: ['bic', 'type'],
|
|
80
|
-
properties: { bic: { type: 'string', title: 'BIC' }, type: {
|
|
80
|
+
properties: { bic: { type: 'string', title: 'BIC' }, type: { const: 'BIC' } },
|
|
81
81
|
},
|
|
82
82
|
{
|
|
83
83
|
title: 'Name Option',
|
|
84
84
|
type: 'object',
|
|
85
85
|
displayOrder: ['name', 'type'],
|
|
86
|
-
properties: { name: { type: 'string', title: 'NAME' }, type: {
|
|
86
|
+
properties: { name: { type: 'string', title: 'NAME' }, type: { const: 'NAME' } },
|
|
87
87
|
},
|
|
88
|
-
]
|
|
88
|
+
],
|
|
89
89
|
},
|
|
90
|
-
]
|
|
90
|
+
],
|
|
91
91
|
},
|
|
92
92
|
],
|
|
93
93
|
layout: [
|
|
94
94
|
{
|
|
95
95
|
type: 'form',
|
|
96
|
-
schemaId: '#root'
|
|
96
|
+
schemaId: '#root',
|
|
97
97
|
},
|
|
98
|
-
]
|
|
98
|
+
],
|
|
99
99
|
};
|
|
100
100
|
var getDefaultProps = function () { return ({
|
|
101
101
|
flowId: 'flow-id',
|
|
@@ -103,7 +103,7 @@ describe('OneOf Initialisation', function () {
|
|
|
103
103
|
onCompletion: jest.fn(),
|
|
104
104
|
onError: jest.fn(),
|
|
105
105
|
onEvent: jest.fn(),
|
|
106
|
-
onLog: jest.fn()
|
|
106
|
+
onLog: jest.fn(),
|
|
107
107
|
}); };
|
|
108
108
|
describe('when the root schema contains an allOf and a oneOf', function () {
|
|
109
109
|
it('should select the an option even if the model only partially matches', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -111,7 +111,7 @@ describe('OneOf Initialisation', function () {
|
|
|
111
111
|
renderWithProviders(_jsx(DynamicFlowWise, __assign({}, getDefaultProps(), { initialStep: __assign(__assign({}, step), { model: {
|
|
112
112
|
email: 'marty.mcfly@wise.com',
|
|
113
113
|
iban: 'GB33BUKB20201555555555',
|
|
114
|
-
type: 'IBAN'
|
|
114
|
+
type: 'IBAN',
|
|
115
115
|
} }) })));
|
|
116
116
|
expect(screen.getByText(/Iban Option/)).toBeInTheDocument();
|
|
117
117
|
expect(screen.queryByText(/Bic Option/)).not.toBeInTheDocument();
|
|
@@ -179,8 +179,8 @@ describe('OneOf Initialisation', function () {
|
|
|
179
179
|
properties: {
|
|
180
180
|
bic: { type: 'string', hidden: true },
|
|
181
181
|
iban: { type: 'string', title: 'IBAN' },
|
|
182
|
-
type: {
|
|
183
|
-
}
|
|
182
|
+
type: { const: 'IBAN' },
|
|
183
|
+
},
|
|
184
184
|
},
|
|
185
185
|
{
|
|
186
186
|
type: 'object',
|
|
@@ -188,7 +188,7 @@ describe('OneOf Initialisation', function () {
|
|
|
188
188
|
alert: { type: 'alert', markdown: 'This is an info alert' },
|
|
189
189
|
required: ['bic'],
|
|
190
190
|
displayOrder: ['bic', 'type'],
|
|
191
|
-
properties: { bic: { type: 'string', title: 'BIC' }, type: {
|
|
191
|
+
properties: { bic: { type: 'string', title: 'BIC' }, type: { const: 'BIC' } },
|
|
192
192
|
},
|
|
193
193
|
{
|
|
194
194
|
type: 'object',
|
|
@@ -197,18 +197,18 @@ describe('OneOf Initialisation', function () {
|
|
|
197
197
|
displayOrder: ['name', 'type'],
|
|
198
198
|
properties: {
|
|
199
199
|
name: { type: 'string', title: 'NAME' },
|
|
200
|
-
type: {
|
|
201
|
-
}
|
|
200
|
+
type: { const: 'NAME' },
|
|
201
|
+
},
|
|
202
202
|
},
|
|
203
|
-
]
|
|
203
|
+
],
|
|
204
204
|
},
|
|
205
205
|
],
|
|
206
206
|
layout: [
|
|
207
207
|
{
|
|
208
208
|
type: 'form',
|
|
209
|
-
schemaId: '#root'
|
|
209
|
+
schemaId: '#root',
|
|
210
210
|
},
|
|
211
|
-
]
|
|
211
|
+
],
|
|
212
212
|
};
|
|
213
213
|
it('should select the matched option anyways', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
214
214
|
return __generator(this, function (_a) {
|
|
@@ -240,10 +240,10 @@ describe('OneOf Initialisation', function () {
|
|
|
240
240
|
properties: {
|
|
241
241
|
bic: { type: 'string', hidden: true },
|
|
242
242
|
iban: { type: 'string', title: 'IBAN' },
|
|
243
|
-
type: {
|
|
244
|
-
}
|
|
243
|
+
type: { const: 'IBAN' },
|
|
244
|
+
},
|
|
245
245
|
},
|
|
246
|
-
]
|
|
246
|
+
],
|
|
247
247
|
},
|
|
248
248
|
{
|
|
249
249
|
allOf: [
|
|
@@ -252,9 +252,9 @@ describe('OneOf Initialisation', function () {
|
|
|
252
252
|
type: 'object',
|
|
253
253
|
required: ['bic'],
|
|
254
254
|
displayOrder: ['bic', 'type'],
|
|
255
|
-
properties: { bic: { type: 'string', title: 'BIC' }, type: {
|
|
255
|
+
properties: { bic: { type: 'string', title: 'BIC' }, type: { const: 'BIC' } },
|
|
256
256
|
},
|
|
257
|
-
]
|
|
257
|
+
],
|
|
258
258
|
},
|
|
259
259
|
{
|
|
260
260
|
allOf: [
|
|
@@ -264,20 +264,20 @@ describe('OneOf Initialisation', function () {
|
|
|
264
264
|
displayOrder: ['name', 'type'],
|
|
265
265
|
properties: {
|
|
266
266
|
name: { type: 'string', title: 'NAME' },
|
|
267
|
-
type: {
|
|
268
|
-
}
|
|
267
|
+
type: { const: 'NAME' },
|
|
268
|
+
},
|
|
269
269
|
},
|
|
270
|
-
]
|
|
270
|
+
],
|
|
271
271
|
},
|
|
272
|
-
]
|
|
272
|
+
],
|
|
273
273
|
},
|
|
274
274
|
],
|
|
275
275
|
layout: [
|
|
276
276
|
{
|
|
277
277
|
type: 'form',
|
|
278
|
-
schemaId: '#root'
|
|
278
|
+
schemaId: '#root',
|
|
279
279
|
},
|
|
280
|
-
]
|
|
280
|
+
],
|
|
281
281
|
};
|
|
282
282
|
it('should select the matched option anyways', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
283
283
|
return __generator(this, function (_a) {
|
|
@@ -311,17 +311,17 @@ describe('OneOf Initialisation', function () {
|
|
|
311
311
|
displayOrder: ['iban', 'type'],
|
|
312
312
|
properties: {
|
|
313
313
|
iban: { type: 'string', title: 'IBAN' },
|
|
314
|
-
type: {
|
|
315
|
-
}
|
|
314
|
+
type: { const: 'IBAN' },
|
|
315
|
+
},
|
|
316
316
|
},
|
|
317
317
|
{
|
|
318
318
|
type: 'object',
|
|
319
319
|
title: 'Bic Option',
|
|
320
320
|
required: ['bic'],
|
|
321
321
|
displayOrder: ['bic', 'type'],
|
|
322
|
-
properties: { bic: { type: 'string', title: 'BIC' }, type: {
|
|
322
|
+
properties: { bic: { type: 'string', title: 'BIC' }, type: { const: 'BIC' } },
|
|
323
323
|
},
|
|
324
|
-
]
|
|
324
|
+
],
|
|
325
325
|
},
|
|
326
326
|
{
|
|
327
327
|
type: 'object',
|
|
@@ -330,18 +330,18 @@ describe('OneOf Initialisation', function () {
|
|
|
330
330
|
displayOrder: ['name', 'type'],
|
|
331
331
|
properties: {
|
|
332
332
|
name: { type: 'string', title: 'NAME' },
|
|
333
|
-
type: {
|
|
334
|
-
}
|
|
333
|
+
type: { const: 'NAME' },
|
|
334
|
+
},
|
|
335
335
|
},
|
|
336
|
-
]
|
|
336
|
+
],
|
|
337
337
|
},
|
|
338
338
|
],
|
|
339
339
|
layout: [
|
|
340
340
|
{
|
|
341
341
|
type: 'form',
|
|
342
|
-
schemaId: '#root'
|
|
342
|
+
schemaId: '#root',
|
|
343
343
|
},
|
|
344
|
-
]
|
|
344
|
+
],
|
|
345
345
|
};
|
|
346
346
|
it('should select the matched option anyways', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
347
347
|
return __generator(this, function (_a) {
|
|
@@ -374,8 +374,8 @@ describe('OneOf Initialisation', function () {
|
|
|
374
374
|
displayOrder: ['bananas', 'type'],
|
|
375
375
|
properties: {
|
|
376
376
|
bananas: { type: 'string', title: 'BANANAS' },
|
|
377
|
-
type: {
|
|
378
|
-
}
|
|
377
|
+
type: { const: 'BANANAS' },
|
|
378
|
+
},
|
|
379
379
|
},
|
|
380
380
|
{
|
|
381
381
|
title: 'Bank Details Option',
|
|
@@ -387,19 +387,19 @@ describe('OneOf Initialisation', function () {
|
|
|
387
387
|
displayOrder: ['iban', 'type'],
|
|
388
388
|
properties: {
|
|
389
389
|
iban: { type: 'string', title: 'IBAN' },
|
|
390
|
-
type: {
|
|
391
|
-
}
|
|
390
|
+
type: { const: 'IBAN' },
|
|
391
|
+
},
|
|
392
392
|
},
|
|
393
393
|
{
|
|
394
394
|
type: 'object',
|
|
395
395
|
title: 'Bic Option',
|
|
396
396
|
required: ['bic'],
|
|
397
397
|
displayOrder: ['bic', 'type'],
|
|
398
|
-
properties: { bic: { type: 'string', title: 'BIC' }, type: {
|
|
398
|
+
properties: { bic: { type: 'string', title: 'BIC' }, type: { const: 'BIC' } },
|
|
399
399
|
},
|
|
400
|
-
]
|
|
400
|
+
],
|
|
401
401
|
},
|
|
402
|
-
]
|
|
402
|
+
],
|
|
403
403
|
},
|
|
404
404
|
{
|
|
405
405
|
type: 'object',
|
|
@@ -407,19 +407,19 @@ describe('OneOf Initialisation', function () {
|
|
|
407
407
|
displayOrder: ['name', 'type'],
|
|
408
408
|
properties: {
|
|
409
409
|
name: { type: 'string', title: 'NAME' },
|
|
410
|
-
type: {
|
|
411
|
-
}
|
|
410
|
+
type: { const: 'NAME' },
|
|
411
|
+
},
|
|
412
412
|
},
|
|
413
|
-
]
|
|
413
|
+
],
|
|
414
414
|
},
|
|
415
415
|
],
|
|
416
416
|
layout: [
|
|
417
417
|
{
|
|
418
418
|
type: 'form',
|
|
419
|
-
schemaId: '#root'
|
|
419
|
+
schemaId: '#root',
|
|
420
420
|
},
|
|
421
421
|
],
|
|
422
|
-
model: { type: 'BIC', bananas: 'bananas from step model' }
|
|
422
|
+
model: { type: 'BIC', bananas: 'bananas from step model' },
|
|
423
423
|
};
|
|
424
424
|
it('should select the matched option anyways', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
425
425
|
return __generator(this, function (_a) {
|
|
@@ -453,9 +453,9 @@ describe('OneOf Initialisation', function () {
|
|
|
453
453
|
tnc: {
|
|
454
454
|
type: 'boolean',
|
|
455
455
|
title: 'I accept the terms and conditions',
|
|
456
|
-
refreshStepOnChange: true
|
|
457
|
-
}
|
|
458
|
-
}
|
|
456
|
+
refreshStepOnChange: true,
|
|
457
|
+
},
|
|
458
|
+
},
|
|
459
459
|
},
|
|
460
460
|
{
|
|
461
461
|
control: 'radio',
|
|
@@ -466,8 +466,8 @@ describe('OneOf Initialisation', function () {
|
|
|
466
466
|
displayOrder: ['iban', 'type'],
|
|
467
467
|
properties: {
|
|
468
468
|
iban: { type: 'string', title: 'IBAN' },
|
|
469
|
-
type: {
|
|
470
|
-
}
|
|
469
|
+
type: { const: 'IBAN' },
|
|
470
|
+
},
|
|
471
471
|
},
|
|
472
472
|
{
|
|
473
473
|
title: 'Card Option',
|
|
@@ -482,15 +482,15 @@ describe('OneOf Initialisation', function () {
|
|
|
482
482
|
method: 'POST',
|
|
483
483
|
param: 'cardNumber',
|
|
484
484
|
idProperty: 'token',
|
|
485
|
-
schema: { type: 'string', title: 'CARD NUMBER' }
|
|
486
|
-
}
|
|
485
|
+
schema: { type: 'string', title: 'CARD NUMBER' },
|
|
486
|
+
},
|
|
487
487
|
},
|
|
488
|
-
type: {
|
|
489
|
-
}
|
|
488
|
+
type: { const: 'CARD' },
|
|
489
|
+
},
|
|
490
490
|
},
|
|
491
|
-
]
|
|
491
|
+
],
|
|
492
492
|
},
|
|
493
|
-
]
|
|
493
|
+
],
|
|
494
494
|
},
|
|
495
495
|
];
|
|
496
496
|
initialStep = __assign(__assign({}, step), { schemas: schemas, refreshUrl: '/refresh', model: {} });
|
|
@@ -559,9 +559,9 @@ describe('OneOf Initialisation', function () {
|
|
|
559
559
|
tnc: {
|
|
560
560
|
type: 'boolean',
|
|
561
561
|
title: 'I accept the terms and conditions',
|
|
562
|
-
refreshStepOnChange: true
|
|
563
|
-
}
|
|
564
|
-
}
|
|
562
|
+
refreshStepOnChange: true,
|
|
563
|
+
},
|
|
564
|
+
},
|
|
565
565
|
},
|
|
566
566
|
{
|
|
567
567
|
control: 'radio',
|
|
@@ -572,8 +572,8 @@ describe('OneOf Initialisation', function () {
|
|
|
572
572
|
displayOrder: ['iban', 'type'],
|
|
573
573
|
properties: {
|
|
574
574
|
iban: { type: 'string', title: 'IBAN' },
|
|
575
|
-
type: {
|
|
576
|
-
}
|
|
575
|
+
type: { const: 'IBAN' },
|
|
576
|
+
},
|
|
577
577
|
},
|
|
578
578
|
{
|
|
579
579
|
title: 'Passport Option',
|
|
@@ -588,15 +588,15 @@ describe('OneOf Initialisation', function () {
|
|
|
588
588
|
method: 'POST',
|
|
589
589
|
param: 'passport',
|
|
590
590
|
idProperty: 'token',
|
|
591
|
-
schema: { type: 'blob', title: 'PASSPORT PHOTO', accepts: ['image/*'] }
|
|
592
|
-
}
|
|
591
|
+
schema: { type: 'blob', title: 'PASSPORT PHOTO', accepts: ['image/*'] },
|
|
592
|
+
},
|
|
593
593
|
},
|
|
594
|
-
type: {
|
|
595
|
-
}
|
|
594
|
+
type: { const: 'PASSPORT' },
|
|
595
|
+
},
|
|
596
596
|
},
|
|
597
|
-
]
|
|
597
|
+
],
|
|
598
598
|
},
|
|
599
|
-
]
|
|
599
|
+
],
|
|
600
600
|
},
|
|
601
601
|
];
|
|
602
602
|
initialStep = __assign(__assign({}, step), { schemas: schemas, refreshUrl: '/refresh', model: {} });
|
|
@@ -609,7 +609,7 @@ describe('OneOf Initialisation', function () {
|
|
|
609
609
|
return [2 /*return*/, respondWith(__assign(__assign({}, initialStep), { model: {
|
|
610
610
|
email: 'marty.mcfly@wise.com',
|
|
611
611
|
passportToken: 'TOKEN-QWERTY',
|
|
612
|
-
type: 'PASSPORT'
|
|
612
|
+
type: 'PASSPORT',
|
|
613
613
|
} }))];
|
|
614
614
|
default:
|
|
615
615
|
return [2 /*return*/, respondWith(null, { status: 404 })];
|
|
@@ -58,7 +58,7 @@ var getProps = function () { return ({
|
|
|
58
58
|
onCompletion: jest.fn(),
|
|
59
59
|
onError: jest.fn(),
|
|
60
60
|
onEvent: jest.fn(),
|
|
61
|
-
onLog: jest.fn()
|
|
61
|
+
onLog: jest.fn(),
|
|
62
62
|
}); };
|
|
63
63
|
var initialStep = {
|
|
64
64
|
id: 'step-id',
|
|
@@ -74,27 +74,27 @@ var initialStep = {
|
|
|
74
74
|
control: 'radio',
|
|
75
75
|
analyticsId: '#color-schema',
|
|
76
76
|
oneOf: [
|
|
77
|
-
{
|
|
78
|
-
{
|
|
79
|
-
{
|
|
77
|
+
{ const: 'red', title: 'Red' },
|
|
78
|
+
{ const: 'blue', title: 'Blue' },
|
|
79
|
+
{ const: 'green', title: 'Green' },
|
|
80
80
|
],
|
|
81
|
-
refreshStepOnChange: true
|
|
82
|
-
}
|
|
83
|
-
}
|
|
81
|
+
refreshStepOnChange: true,
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
84
|
},
|
|
85
85
|
],
|
|
86
86
|
layout: [
|
|
87
87
|
{
|
|
88
88
|
type: 'form',
|
|
89
|
-
schemaId: '#form'
|
|
89
|
+
schemaId: '#form',
|
|
90
90
|
},
|
|
91
91
|
{
|
|
92
92
|
type: 'button',
|
|
93
93
|
title: 'Submit',
|
|
94
|
-
action: { id: 'action-id', url: '/submit', method: 'POST' }
|
|
94
|
+
action: { id: 'action-id', url: '/submit', method: 'POST' },
|
|
95
95
|
},
|
|
96
96
|
],
|
|
97
|
-
refreshUrl: '/refresh'
|
|
97
|
+
refreshUrl: '/refresh',
|
|
98
98
|
};
|
|
99
99
|
var renderAndRefresh = function (httpClient) { return __awaiter(void 0, void 0, void 0, function () {
|
|
100
100
|
var props;
|
|
@@ -138,7 +138,7 @@ describe('RefreshOnChange response handling', function () {
|
|
|
138
138
|
expect(props.onEvent).toHaveBeenCalledWith('Dynamic Flow - Refresh Succeeded', {
|
|
139
139
|
flowId: 'flow-id',
|
|
140
140
|
stepId: 'step-id',
|
|
141
|
-
schema: '#color-schema'
|
|
141
|
+
schema: '#color-schema',
|
|
142
142
|
});
|
|
143
143
|
return [2 /*return*/];
|
|
144
144
|
}
|
|
@@ -163,11 +163,11 @@ describe('RefreshOnChange response handling', function () {
|
|
|
163
163
|
expect(props.onEvent).toHaveBeenCalledWith('Dynamic Flow - Refresh Failed', {
|
|
164
164
|
flowId: 'flow-id',
|
|
165
165
|
stepId: 'step-id',
|
|
166
|
-
schema: '#color-schema'
|
|
166
|
+
schema: '#color-schema',
|
|
167
167
|
});
|
|
168
168
|
expect(props.onEvent).toHaveBeenCalledWith('Dynamic Flow - Failed', {
|
|
169
169
|
flowId: 'flow-id',
|
|
170
|
-
stepId: 'step-id'
|
|
170
|
+
stepId: 'step-id',
|
|
171
171
|
});
|
|
172
172
|
return [2 /*return*/];
|
|
173
173
|
}
|
|
@@ -193,7 +193,7 @@ describe('RefreshOnChange response handling', function () {
|
|
|
193
193
|
expect(props.onEvent).toHaveBeenCalledWith('Dynamic Flow - Refresh Succeeded', {
|
|
194
194
|
flowId: 'flow-id',
|
|
195
195
|
stepId: 'step-id',
|
|
196
|
-
schema: '#color-schema'
|
|
196
|
+
schema: '#color-schema',
|
|
197
197
|
});
|
|
198
198
|
return [2 /*return*/];
|
|
199
199
|
}
|
|
@@ -204,7 +204,7 @@ describe('RefreshOnChange response handling', function () {
|
|
|
204
204
|
describe('When the response body can be parsed as an ErrorResponseBody', function () {
|
|
205
205
|
var getHttpClient = function () {
|
|
206
206
|
return jest.fn().mockResolvedValue(respondWith({
|
|
207
|
-
analytics: { shopping: 'list' }
|
|
207
|
+
analytics: { shopping: 'list' },
|
|
208
208
|
}, { status: 422 }));
|
|
209
209
|
};
|
|
210
210
|
it('should trigger a "Refresh failed" and "Failed" events with analytics', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -218,12 +218,12 @@ describe('RefreshOnChange response handling', function () {
|
|
|
218
218
|
flowId: 'flow-id',
|
|
219
219
|
stepId: 'step-id',
|
|
220
220
|
schema: '#color-schema',
|
|
221
|
-
shopping: 'list'
|
|
221
|
+
shopping: 'list',
|
|
222
222
|
}));
|
|
223
223
|
expect(props.onEvent).toHaveBeenLastCalledWith('Dynamic Flow - Failed', expect.objectContaining({
|
|
224
224
|
flowId: 'flow-id',
|
|
225
225
|
stepId: 'step-id',
|
|
226
|
-
shopping: 'list'
|
|
226
|
+
shopping: 'list',
|
|
227
227
|
}));
|
|
228
228
|
return [2 /*return*/];
|
|
229
229
|
}
|
|
@@ -242,11 +242,11 @@ describe('RefreshOnChange response handling', function () {
|
|
|
242
242
|
expect(props.onEvent).toHaveBeenCalledWith('Dynamic Flow - Refresh Failed', expect.objectContaining({
|
|
243
243
|
flowId: 'flow-id',
|
|
244
244
|
stepId: 'step-id',
|
|
245
|
-
schema: '#color-schema'
|
|
245
|
+
schema: '#color-schema',
|
|
246
246
|
}));
|
|
247
247
|
expect(props.onEvent).toHaveBeenLastCalledWith('Dynamic Flow - Failed', expect.objectContaining({
|
|
248
248
|
flowId: 'flow-id',
|
|
249
|
-
stepId: 'step-id'
|
|
249
|
+
stepId: 'step-id',
|
|
250
250
|
}));
|
|
251
251
|
return [2 /*return*/];
|
|
252
252
|
}
|