@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
|
@@ -1,14 +1,3 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
2
|
import { SelectInput, SelectInputOptionContent } from '@transferwise/components';
|
|
14
3
|
import classNames from 'classnames';
|
|
@@ -43,7 +32,7 @@ export function MultiSelectSchema(_a) {
|
|
|
43
32
|
onChange({
|
|
44
33
|
model: !required && updatedModel.length === 0 ? null : updatedModel,
|
|
45
34
|
triggerSchema: schema.items,
|
|
46
|
-
triggerModel: updatedModel
|
|
35
|
+
triggerModel: updatedModel,
|
|
47
36
|
});
|
|
48
37
|
};
|
|
49
38
|
var getFormattedMessage = function () {
|
|
@@ -51,7 +40,7 @@ export function MultiSelectSchema(_a) {
|
|
|
51
40
|
if (selected.length > 1) {
|
|
52
41
|
return formatMessage(messages.summary, {
|
|
53
42
|
first: options[selected[0]].label,
|
|
54
|
-
count: selected.length - 1
|
|
43
|
+
count: selected.length - 1,
|
|
55
44
|
});
|
|
56
45
|
}
|
|
57
46
|
return options[selected[0]].label;
|
|
@@ -62,19 +51,19 @@ export function MultiSelectSchema(_a) {
|
|
|
62
51
|
var shouldShowInitialError = Boolean(errors) && !changed;
|
|
63
52
|
var shouldShowValidationError = Boolean(validations.length) && submitted;
|
|
64
53
|
var formGroupClasses = {
|
|
65
|
-
'has-error': shouldShowInitialError || shouldShowValidationError
|
|
54
|
+
'has-error': shouldShowInitialError || shouldShowValidationError,
|
|
66
55
|
};
|
|
67
|
-
return (_jsxs("div",
|
|
56
|
+
return (_jsxs("div", { className: classNames('d-flex flex-column', formGroupClasses), children: [schema.title ? _jsx("label", { htmlFor: id, children: schema.title }) : undefined, _jsx(SelectInput, { id: id, multiple: true, disabled: disabled, placeholder: placeholder ? String(placeholder) : undefined, items: options.map(function (value, index) { return ({
|
|
68
57
|
type: 'option',
|
|
69
58
|
value: index,
|
|
70
|
-
disabled: value.disabled
|
|
59
|
+
disabled: value.disabled,
|
|
71
60
|
}); }), value: selected !== null && selected !== void 0 ? selected : [], renderValue: function (index, withinTrigger) {
|
|
72
61
|
var _a = options[index], icon = _a.icon, label = _a.label, note = _a.note, secondary = _a.secondary;
|
|
73
62
|
if (withinTrigger) {
|
|
74
63
|
return selected && index === selected[0] ? getFormattedMessage() : undefined;
|
|
75
64
|
}
|
|
76
65
|
return _jsx(SelectInputOptionContent, { title: label, note: note !== null && note !== void 0 ? note : secondary, icon: icon });
|
|
77
|
-
}, onChange: broadcastModelChange }), _jsx(ControlFeedback, { id: "".concat(id, "-feedback"), changed: changed, focused: !submitted, blurred: !submitted, errors: typeof errors === 'string' ? errors : undefined, submitted: submitted, schema: schema, validations: submitted ? validations : undefined, validationMessages: validationMessages, infoMessage: null })] }))
|
|
66
|
+
}, onChange: broadcastModelChange }), _jsx(ControlFeedback, { id: "".concat(id, "-feedback"), changed: changed, focused: !submitted, blurred: !submitted, errors: typeof errors === 'string' ? errors : undefined, submitted: submitted, schema: schema, validations: submitted ? validations : undefined, validationMessages: validationMessages, infoMessage: null })] }));
|
|
78
67
|
}
|
|
79
68
|
var getInitialModelIndices = function (model, options) {
|
|
80
69
|
if (model == null) {
|
|
@@ -104,7 +104,7 @@ function MultipleFileUploadSchema(props) {
|
|
|
104
104
|
onChange({
|
|
105
105
|
model: data,
|
|
106
106
|
triggerSchema: schema,
|
|
107
|
-
triggerModel: data
|
|
107
|
+
triggerModel: data,
|
|
108
108
|
});
|
|
109
109
|
}
|
|
110
110
|
var validFiles = getSuccessfullyProcessedFiles(files);
|
|
@@ -117,11 +117,11 @@ function MultipleFileUploadSchema(props) {
|
|
|
117
117
|
var uploadInputProps = __assign(__assign(__assign({ multiple: true, className: 'form-control', files: files, fileInputName: uid, id: uid }, (accepts ? { fileTypes: accepts } : undefined)), (maxSize ? { sizeLimit: toKilobytes(maxSize) } : undefined)), { sizeLimitErrorMessage: ((_a = fileSchemaDescriptor.validationMessages) === null || _a === void 0 ? void 0 : _a.maxSize) ||
|
|
118
118
|
defaultErrorMessages.maxFileSizeErrorMessage, maxFiles: props.schema.maxItems, maxFilesErrorMessage: ((_b = props.schema.validationMessages) === null || _b === void 0 ? void 0 : _b.maxItems) || defaultErrorMessages.maxItemsErrorMessage, uploadButtonTitle: fileSchemaDescriptor.title, description: fileSchemaDescriptor.description, disabled: props.disabled, onUploadFile: function (formData) { return uploadFile(formData.get(uid)); }, onFilesChange: onFilesChange, onDeleteFile: function () { return Promise.resolve(); } });
|
|
119
119
|
var feedbackId = "".concat(uid, "-feedback");
|
|
120
|
-
return (_jsxs("div",
|
|
120
|
+
return (_jsxs("div", { className: classNames('form-group', { 'has-error': showError }), children: [_jsx("label", { className: "d-block control-label", htmlFor: uid, children: props.schema.title }), _jsx("div", { "aria-describedby": feedbackId, children: _jsx(UploadInput, __assign({}, uploadInputProps)) }), _jsx(ControlFeedback, { id: feedbackId, changed: inputChanged, submitted: props.submitted, errors: props.errors, schema: props.schema, validations: fileListValidationFailures, validationMessages: getValidationMessages(schema, Boolean(props.required), defaultErrorMessages), infoMessage: null, focused: false, blurred: true })] }));
|
|
121
121
|
}
|
|
122
122
|
MultipleFileUploadSchema.defaultProps = {
|
|
123
123
|
errors: null,
|
|
124
|
-
required: false
|
|
124
|
+
required: false,
|
|
125
125
|
};
|
|
126
126
|
export default MultipleFileUploadSchema;
|
|
127
127
|
function getSuccessfullyProcessedFiles(allFiles) {
|
|
@@ -9,6 +9,6 @@ export function useFormattedDefaultErrorMessages(_a) {
|
|
|
9
9
|
maxFileSizeErrorMessage: formatMessage(maxFileSizeError),
|
|
10
10
|
maxItemsErrorMessage: formatMessage(maxItemsError, { maxItems: maxItems }),
|
|
11
11
|
minItemsErrorMessage: formatMessage(minItemsError, { minItems: minItems }),
|
|
12
|
-
requiredMessage: formatMessage(CommonMessages.required)
|
|
12
|
+
requiredMessage: formatMessage(CommonMessages.required),
|
|
13
13
|
};
|
|
14
14
|
}
|
|
@@ -57,7 +57,7 @@ function RepeatableSchema(_a) {
|
|
|
57
57
|
onChange({
|
|
58
58
|
model: updatedModel,
|
|
59
59
|
triggerSchema: schema.items,
|
|
60
|
-
triggerModel: updatedModel
|
|
60
|
+
triggerModel: updatedModel,
|
|
61
61
|
});
|
|
62
62
|
};
|
|
63
63
|
var onAddItem = function () {
|
|
@@ -79,7 +79,7 @@ function RepeatableSchema(_a) {
|
|
|
79
79
|
var updatedItemSummaries = getUpdatedItemSummaries(action, {
|
|
80
80
|
originalItem: editableItem.item,
|
|
81
81
|
updatedItem: updatedItem,
|
|
82
|
-
itemSummaries: itemSummaries
|
|
82
|
+
itemSummaries: itemSummaries,
|
|
83
83
|
});
|
|
84
84
|
setItemSummaries(updatedItemSummaries);
|
|
85
85
|
broadcastModelChange(updatedItemSummaries);
|
|
@@ -94,23 +94,23 @@ function RepeatableSchema(_a) {
|
|
|
94
94
|
var validations = getValidationFailures(model, schema, required);
|
|
95
95
|
var base64ValidationMessages = useFormattedDefaultErrorMessages({
|
|
96
96
|
minItems: schema.minItems,
|
|
97
|
-
maxItems: schema.maxItems
|
|
97
|
+
maxItems: schema.maxItems,
|
|
98
98
|
});
|
|
99
99
|
var validationMessages = schema.items.type === 'string' && schema.items.format === 'base64url'
|
|
100
100
|
? {
|
|
101
101
|
minItems: base64ValidationMessages.minItemsErrorMessage,
|
|
102
102
|
maxItems: base64ValidationMessages.maxItemsErrorMessage,
|
|
103
|
-
required: base64ValidationMessages.requiredMessage
|
|
103
|
+
required: base64ValidationMessages.requiredMessage,
|
|
104
104
|
}
|
|
105
105
|
: undefined;
|
|
106
106
|
var formGroupClasses = {
|
|
107
|
-
'has-error': (_b = (errors && !isEmpty(errors))) !== null && _b !== void 0 ? _b : (submitted && validations.length)
|
|
107
|
+
'has-error': (_b = (errors && !isEmpty(errors))) !== null && _b !== void 0 ? _b : (submitted && validations.length),
|
|
108
108
|
};
|
|
109
|
-
return (_jsxs("div",
|
|
109
|
+
return (_jsxs("div", { id: id, className: classNames(formGroupClasses), children: [schema.title && _jsx(Header, { title: schema.title }), itemSummaries === null || itemSummaries === void 0 ? void 0 : itemSummaries.map(function (itemSummary) { return (_jsx(ItemSummaryOption, { item: itemSummary, onClick: function () { return onEditItem(itemSummary); } }, JSON.stringify(itemSummary))); }), _jsx(NavigationOption, { media: _jsx(Plus, {}), title: schema.addItemTitle || formatMessage(messages.addItemTitle), showMediaAtAllSizes: true, onClick: onAddItem }), _jsx(Modal, { open: openModalType !== null, title: (openModalType === 'add' ? schema.addItemTitle : schema.editItemTitle) ||
|
|
110
110
|
formatMessage(messages.addItemTitle), body: _jsx(RepeatableSchemaStep, { type: openModalType !== null && openModalType !== void 0 ? openModalType : 'add', schema: schema, model: editableItem.model, errors: errors, submitted: submitted, onAction: onSaveItem, onModelChange: function (_a) {
|
|
111
111
|
var model = _a.model;
|
|
112
112
|
return setEditableItem(__assign(__assign({}, editableItem), { model: model }));
|
|
113
|
-
} }), onClose: onCancelEdit }), _jsx(ControlFeedback, { id: "".concat(id, "-feedback"), changed: changed, focused: false, blurred: false, errors: typeof errors === 'string' ? errors : undefined, submitted: submitted, schema: schema, validations: validations, validationMessages: validationMessages, infoMessage: null })] }))
|
|
113
|
+
} }), onClose: onCancelEdit }), _jsx(ControlFeedback, { id: "".concat(id, "-feedback"), changed: changed, focused: false, blurred: false, errors: typeof errors === 'string' ? errors : undefined, submitted: submitted, schema: schema, validations: validations, validationMessages: validationMessages, infoMessage: null })] }));
|
|
114
114
|
}
|
|
115
115
|
var getUpdatedItemSummaries = function (action, _a) {
|
|
116
116
|
var originalItem = _a.originalItem, updatedItem = _a.updatedItem, itemSummaries = _a.itemSummaries;
|
|
@@ -42,15 +42,15 @@ function RepeatableSchemaStep(_a) {
|
|
|
42
42
|
layout: __spreadArray([
|
|
43
43
|
{
|
|
44
44
|
type: 'form',
|
|
45
|
-
schema: schema.items
|
|
45
|
+
schema: schema.items,
|
|
46
46
|
},
|
|
47
47
|
{
|
|
48
48
|
type: 'button',
|
|
49
49
|
control: 'primary',
|
|
50
50
|
action: {
|
|
51
51
|
url: type,
|
|
52
|
-
title: formatMessage(type === 'add' ? messages.addItem : messages.editItem)
|
|
53
|
-
}
|
|
52
|
+
title: formatMessage(type === 'add' ? messages.addItem : messages.editItem),
|
|
53
|
+
},
|
|
54
54
|
}
|
|
55
55
|
], (type === 'edit'
|
|
56
56
|
? [
|
|
@@ -59,14 +59,14 @@ function RepeatableSchemaStep(_a) {
|
|
|
59
59
|
context: 'negative',
|
|
60
60
|
action: {
|
|
61
61
|
url: 'remove',
|
|
62
|
-
title: formatMessage(messages.removeItem)
|
|
63
|
-
}
|
|
62
|
+
title: formatMessage(messages.removeItem),
|
|
63
|
+
},
|
|
64
64
|
},
|
|
65
65
|
]
|
|
66
66
|
: []), true),
|
|
67
67
|
title: '',
|
|
68
68
|
actions: [],
|
|
69
|
-
schemas: []
|
|
69
|
+
schemas: [],
|
|
70
70
|
};
|
|
71
71
|
var onChange = function (props) {
|
|
72
72
|
var metadata = props.metadata, model = props.model, modelChangeProps = __rest(props, ["metadata", "model"]);
|
|
@@ -21,7 +21,7 @@ export var getItemSummaryFromSchema = function (schema, model, defaults, summary
|
|
|
21
21
|
providesProp: 'providesTitle',
|
|
22
22
|
getValueFromSchema: function (schema, model) {
|
|
23
23
|
return summaryTextOverride !== null && summaryTextOverride !== void 0 ? summaryTextOverride : getStringValueFromSchema(schema, model);
|
|
24
|
-
}
|
|
24
|
+
},
|
|
25
25
|
});
|
|
26
26
|
var description = getSummaryPropFromSchema({
|
|
27
27
|
schema: schema,
|
|
@@ -29,26 +29,26 @@ export var getItemSummaryFromSchema = function (schema, model, defaults, summary
|
|
|
29
29
|
providesProp: 'providesDescription',
|
|
30
30
|
getValueFromSchema: function (schema, model) {
|
|
31
31
|
return summaryTextOverride !== null && summaryTextOverride !== void 0 ? summaryTextOverride : getStringValueFromSchema(schema, model);
|
|
32
|
-
}
|
|
32
|
+
},
|
|
33
33
|
});
|
|
34
34
|
var icon = getSummaryPropFromSchema({
|
|
35
35
|
schema: schema,
|
|
36
36
|
model: model,
|
|
37
37
|
providesProp: 'providesIcon',
|
|
38
|
-
getValueFromSchema: function (schema) { var _a; return (_a = schema.icon) !== null && _a !== void 0 ? _a : null; }
|
|
38
|
+
getValueFromSchema: function (schema) { var _a; return (_a = schema.icon) !== null && _a !== void 0 ? _a : null; },
|
|
39
39
|
});
|
|
40
40
|
var image = getSummaryPropFromSchema({
|
|
41
41
|
schema: schema,
|
|
42
42
|
model: model,
|
|
43
43
|
providesProp: 'providesImage',
|
|
44
|
-
getValueFromSchema: function (schema) { var _a; return (_a = schema.image) !== null && _a !== void 0 ? _a : null; }
|
|
44
|
+
getValueFromSchema: function (schema) { var _a; return (_a = schema.image) !== null && _a !== void 0 ? _a : null; },
|
|
45
45
|
});
|
|
46
46
|
return {
|
|
47
47
|
value: model,
|
|
48
48
|
title: title || defaultTitle,
|
|
49
49
|
description: description || defaultDescription,
|
|
50
50
|
icon: icon || defaultIcon,
|
|
51
|
-
image: image || defaultImage
|
|
51
|
+
image: image || defaultImage,
|
|
52
52
|
};
|
|
53
53
|
};
|
|
54
54
|
var getSummaryPropFromSchema = function (props) {
|
|
@@ -122,8 +122,8 @@ var getStringValueFromSchema = function (schema, model) {
|
|
|
122
122
|
if (schema.title) {
|
|
123
123
|
return schema.title;
|
|
124
124
|
}
|
|
125
|
-
if (isString(schema
|
|
126
|
-
return schema
|
|
125
|
+
if (isString(schema.const)) {
|
|
126
|
+
return schema.const;
|
|
127
127
|
}
|
|
128
128
|
return null;
|
|
129
129
|
}
|