@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
|
@@ -6,7 +6,7 @@ describe('findComponent', function () {
|
|
|
6
6
|
var accountNumberComponent = createMockTextInputComponent({
|
|
7
7
|
uid: '0.1.0',
|
|
8
8
|
id: 'account',
|
|
9
|
-
value: '12345678'
|
|
9
|
+
value: '12345678',
|
|
10
10
|
});
|
|
11
11
|
var getComponents = function () { return [
|
|
12
12
|
createObjectComponent({
|
|
@@ -16,7 +16,7 @@ describe('findComponent', function () {
|
|
|
16
16
|
name: createMockTextInputComponent({
|
|
17
17
|
uid: '0.0',
|
|
18
18
|
id: 'name',
|
|
19
|
-
value: 'Florence Jones'
|
|
19
|
+
value: 'Florence Jones',
|
|
20
20
|
}),
|
|
21
21
|
bankInfo: createObjectComponent({
|
|
22
22
|
uid: '0.1',
|
|
@@ -26,15 +26,15 @@ describe('findComponent', function () {
|
|
|
26
26
|
sortCode: createMockTextInputComponent({
|
|
27
27
|
uid: '0.1.1',
|
|
28
28
|
id: 'sortCode',
|
|
29
|
-
value: '04-00-04'
|
|
30
|
-
})
|
|
29
|
+
value: '04-00-04',
|
|
30
|
+
}),
|
|
31
31
|
},
|
|
32
32
|
hidden: false,
|
|
33
|
-
summariser: function () { return ({}); }
|
|
34
|
-
})
|
|
33
|
+
summariser: function () { return ({}); },
|
|
34
|
+
}),
|
|
35
35
|
},
|
|
36
36
|
hidden: false,
|
|
37
|
-
summariser: function () { return ({}); }
|
|
37
|
+
summariser: function () { return ({}); },
|
|
38
38
|
}),
|
|
39
39
|
]; };
|
|
40
40
|
it('should find component at root level', function () {
|
|
@@ -59,7 +59,7 @@ describe('findComponent', function () {
|
|
|
59
59
|
name: createMockTextInputComponent({
|
|
60
60
|
uid: '0.0',
|
|
61
61
|
id: 'name',
|
|
62
|
-
value: 'Florence Jones'
|
|
62
|
+
value: 'Florence Jones',
|
|
63
63
|
}),
|
|
64
64
|
bankInfo: createObjectComponent({
|
|
65
65
|
uid: '0.1',
|
|
@@ -68,20 +68,20 @@ describe('findComponent', function () {
|
|
|
68
68
|
accountNumber: createMockTextInputComponent({
|
|
69
69
|
uid: '0.1.0',
|
|
70
70
|
id: 'account',
|
|
71
|
-
value: '12345678'
|
|
71
|
+
value: '12345678',
|
|
72
72
|
}),
|
|
73
73
|
sortCode: createMockTextInputComponent({
|
|
74
74
|
uid: '0.1.0',
|
|
75
75
|
id: 'sortCode',
|
|
76
|
-
value: '04-00-04'
|
|
77
|
-
})
|
|
76
|
+
value: '04-00-04',
|
|
77
|
+
}),
|
|
78
78
|
},
|
|
79
79
|
hidden: false,
|
|
80
|
-
summariser: function () { return ({}); }
|
|
81
|
-
})
|
|
80
|
+
summariser: function () { return ({}); },
|
|
81
|
+
}),
|
|
82
82
|
},
|
|
83
83
|
hidden: false,
|
|
84
|
-
summariser: function () { return ({}); }
|
|
84
|
+
summariser: function () { return ({}); },
|
|
85
85
|
}),
|
|
86
86
|
]; };
|
|
87
87
|
it('should throw if multiple components with the same id', function () {
|
|
@@ -25,7 +25,7 @@ export var isBlobSchema = function (schema) {
|
|
|
25
25
|
return 'type' in schema && schema.type === 'blob';
|
|
26
26
|
};
|
|
27
27
|
export var isConstSchema = function (schema) {
|
|
28
|
-
return 'const' in schema && schema
|
|
28
|
+
return 'const' in schema && schema.const !== undefined;
|
|
29
29
|
};
|
|
30
30
|
export var isIntegerSchema = function (schema) {
|
|
31
31
|
return 'type' in schema && schema.type === 'integer';
|
|
@@ -28,7 +28,7 @@ var BooleanInputRenderer = {
|
|
|
28
28
|
render: function (props) {
|
|
29
29
|
var id = props.id, control = props.control, _a = props.label, label = _a === void 0 ? '' : _a, description = props.description, help = props.help, error = props.error, type = props.type, value = props.value, rest = __rest(props, ["id", "control", "label", "description", "help", "error", "type", "value"]);
|
|
30
30
|
var checkboxProps = __assign(__assign({}, rest), { label: label, checked: value });
|
|
31
|
-
return (_jsx(FieldInput,
|
|
32
|
-
}
|
|
31
|
+
return (_jsx(FieldInput, { id: id, label: "", description: description, error: error, help: help, children: _jsx(Checkbox, __assign({ id: id }, checkboxProps)) }));
|
|
32
|
+
},
|
|
33
33
|
};
|
|
34
34
|
export default BooleanInputRenderer;
|
|
@@ -1,14 +1,3 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
2
|
import classNames from 'classnames';
|
|
14
3
|
import { getMargin } from './utils/layout-utils';
|
|
@@ -18,13 +7,13 @@ var BoxRenderer = {
|
|
|
18
7
|
var _b;
|
|
19
8
|
var border = _a.border, children = _a.children, margin = _a.margin, width = _a.width;
|
|
20
9
|
var hasFixedWidth = width !== 'xl';
|
|
21
|
-
var contents = (_jsx("div",
|
|
10
|
+
var contents = (_jsx("div", { className: classNames((_b = {
|
|
22
11
|
'df-box-renderer-border': border
|
|
23
12
|
},
|
|
24
13
|
_b["df-box-renderer-width-".concat(width)] = hasFixedWidth,
|
|
25
14
|
_b[getMargin(margin)] = !hasFixedWidth,
|
|
26
|
-
_b))
|
|
27
|
-
return hasFixedWidth ? (_jsx("div",
|
|
28
|
-
}
|
|
15
|
+
_b)), children: children }));
|
|
16
|
+
return hasFixedWidth ? (_jsx("div", { className: classNames('df-box-renderer-fixed-width', getMargin(margin)), children: contents })) : (contents);
|
|
17
|
+
},
|
|
29
18
|
};
|
|
30
19
|
export default BoxRenderer;
|
|
@@ -1,21 +1,10 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
2
|
import { Button } from '@transferwise/components';
|
|
14
3
|
import { getMargin } from './utils/layout-utils';
|
|
15
4
|
import { useLoadingContext } from '../../renderers/LoadingContext';
|
|
16
5
|
var ButtonRenderer = {
|
|
17
6
|
canRenderType: 'button',
|
|
18
|
-
render: ButtonRendererComponent
|
|
7
|
+
render: ButtonRendererComponent,
|
|
19
8
|
};
|
|
20
9
|
function ButtonRendererComponent(_a) {
|
|
21
10
|
var control = _a.control, context = _a.context, disabled = _a.disabled, margin = _a.margin, title = _a.title, size = _a.size, onClick = _a.onClick;
|
|
@@ -25,7 +14,7 @@ function ButtonRendererComponent(_a) {
|
|
|
25
14
|
// secondary. This is inconsistent with mobile, so for now we remove context
|
|
26
15
|
var type = priority === 'tertiary' ? undefined : mapContext(context);
|
|
27
16
|
var isLoading = useLoadingContext().isLoading;
|
|
28
|
-
return (_jsx(Button,
|
|
17
|
+
return (_jsx(Button, { block: true, className: className, disabled: isLoading || disabled, priority: mapControl(control), size: mapSize(size), type: type, onClick: onClick, children: title }));
|
|
29
18
|
}
|
|
30
19
|
var mapContext = function (context) {
|
|
31
20
|
switch (context) {
|
|
@@ -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 classNames from 'classnames';
|
|
14
3
|
import { getMargin } from './utils/layout-utils';
|
|
@@ -16,10 +5,10 @@ var ColumnsRenderer = {
|
|
|
16
5
|
canRenderType: 'columns',
|
|
17
6
|
render: function (_a) {
|
|
18
7
|
var bias = _a.bias, margin = _a.margin, startChildren = _a.startChildren, endChildren = _a.endChildren;
|
|
19
|
-
return (_jsxs("div",
|
|
8
|
+
return (_jsxs("div", { className: classNames('df-columns-renderer-container', getMargin(margin), {
|
|
20
9
|
'df-columns-renderer-bias-start': bias === 'start',
|
|
21
|
-
'df-columns-renderer-bias-end': bias === 'end'
|
|
22
|
-
})
|
|
23
|
-
}
|
|
10
|
+
'df-columns-renderer-bias-end': bias === 'end',
|
|
11
|
+
}), children: [_jsx("div", { className: "df-columns-renderer-column", children: startChildren }), _jsx("div", { className: "df-columns-renderer-column", children: endChildren })] }));
|
|
12
|
+
},
|
|
24
13
|
};
|
|
25
14
|
export default ColumnsRenderer;
|
|
@@ -29,7 +29,7 @@ var DateInputRenderer = {
|
|
|
29
29
|
var id = props.id, control = props.control, label = props.label, description = props.description, error = props.error, type = props.type, help = props.help, initialValue = props.value, rest = __rest(props, ["id", "control", "label", "description", "error", "type", "help", "value"]);
|
|
30
30
|
var value = initialValue !== null && initialValue !== void 0 ? initialValue : '';
|
|
31
31
|
var inputProps = __assign(__assign({}, rest), { value: value, id: id });
|
|
32
|
-
return (_jsx(FieldInput,
|
|
33
|
-
}
|
|
32
|
+
return (_jsx(FieldInput, { id: id, label: label, description: description, error: error, help: help, children: _jsx(VariableDateInput, { control: control, inputProps: inputProps }) }));
|
|
33
|
+
},
|
|
34
34
|
};
|
|
35
35
|
export default DateInputRenderer;
|
|
@@ -1,14 +1,3 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
2
|
import { NavigationOptionsList, NavigationOption } from '@transferwise/components';
|
|
14
3
|
import { getMargin } from './utils/layout-utils';
|
|
@@ -16,14 +5,14 @@ import { NavigationOptionMedia } from './components/icon/NavigationOptionMedia';
|
|
|
16
5
|
import { useLoadingContext } from '../../renderers/LoadingContext';
|
|
17
6
|
var DecisionRenderer = {
|
|
18
7
|
canRenderType: 'decision',
|
|
19
|
-
render: DecisionRendererComponent
|
|
8
|
+
render: DecisionRendererComponent,
|
|
20
9
|
};
|
|
21
10
|
export default DecisionRenderer;
|
|
22
11
|
function DecisionRendererComponent(_a) {
|
|
23
12
|
var margin = _a.margin, options = _a.options;
|
|
24
13
|
var isLoading = useLoadingContext().isLoading;
|
|
25
|
-
return (_jsx("div",
|
|
14
|
+
return (_jsx("div", { className: getMargin(margin), children: _jsx(NavigationOptionsList, { children: options.map(function (_a) {
|
|
26
15
|
var description = _a.description, disabled = _a.disabled, icon = _a.icon, image = _a.image, title = _a.title, onClick = _a.onClick;
|
|
27
16
|
return (_jsx(NavigationOption, { title: title, content: description, disabled: isLoading || disabled, media: _jsx(NavigationOptionMedia, { icon: icon, image: image }), showMediaCircle: false, showMediaAtAllSizes: true, onClick: onClick }, JSON.stringify(title)));
|
|
28
|
-
}) }) }))
|
|
17
|
+
}) }) }));
|
|
29
18
|
}
|
|
@@ -1,21 +1,10 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
2
|
import { getMargin } from './utils/layout-utils';
|
|
14
3
|
var FormRenderer = {
|
|
15
4
|
canRenderType: 'form',
|
|
16
5
|
render: function (_a) {
|
|
17
6
|
var children = _a.children, margin = _a.margin;
|
|
18
|
-
return _jsx("div",
|
|
19
|
-
}
|
|
7
|
+
return _jsx("div", { className: getMargin(margin), children: children });
|
|
8
|
+
},
|
|
20
9
|
};
|
|
21
10
|
export default FormRenderer;
|
|
@@ -14,7 +14,7 @@ import { Display } from '@transferwise/components';
|
|
|
14
14
|
import { getTextAlignmentAndMargin } from './utils/layout-utils';
|
|
15
15
|
var HeadingRenderer = {
|
|
16
16
|
canRenderType: 'heading',
|
|
17
|
-
render: function (props) { return _jsx(Heading, __assign({}, props)); }
|
|
17
|
+
render: function (props) { return _jsx(Heading, __assign({}, props)); },
|
|
18
18
|
};
|
|
19
19
|
function Heading(props) {
|
|
20
20
|
var text = props.text, size = props.size, align = props.align, margin = props.margin, control = props.control;
|
|
@@ -23,22 +23,22 @@ function Heading(props) {
|
|
|
23
23
|
}
|
|
24
24
|
function DisplayHeading(_a) {
|
|
25
25
|
var size = _a.size, text = _a.text, className = _a.className;
|
|
26
|
-
return (_jsx(Display,
|
|
26
|
+
return (_jsx(Display, { type: getDisplayType(size), className: className, children: text }));
|
|
27
27
|
}
|
|
28
28
|
function StandardHeading(_a) {
|
|
29
29
|
var size = _a.size, text = _a.text, className = _a.className;
|
|
30
30
|
switch (size) {
|
|
31
31
|
case 'xs':
|
|
32
|
-
return _jsx("h5",
|
|
32
|
+
return _jsx("h5", { className: className, children: text });
|
|
33
33
|
case 'sm':
|
|
34
|
-
return _jsx("h4",
|
|
34
|
+
return _jsx("h4", { className: className, children: text });
|
|
35
35
|
case 'lg':
|
|
36
|
-
return _jsx("h2",
|
|
36
|
+
return _jsx("h2", { className: className, children: text });
|
|
37
37
|
case 'xl':
|
|
38
|
-
return _jsx("h1",
|
|
38
|
+
return _jsx("h1", { className: className, children: text });
|
|
39
39
|
case 'md':
|
|
40
40
|
default:
|
|
41
|
-
return _jsx("h3",
|
|
41
|
+
return _jsx("h3", { className: className, children: text });
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
var getDisplayType = function (size) {
|
|
@@ -53,7 +53,7 @@ import { isRelativePath } from '../../../common/utils/api-utils';
|
|
|
53
53
|
import { useHttpClient } from '../../../common/httpClientContext';
|
|
54
54
|
var ImageRenderer = {
|
|
55
55
|
canRenderType: 'image',
|
|
56
|
-
render: function (props) { return _jsx(ImageRendererComponent, __assign({}, props)); }
|
|
56
|
+
render: function (props) { return _jsx(ImageRendererComponent, __assign({}, props)); },
|
|
57
57
|
};
|
|
58
58
|
export default ImageRenderer;
|
|
59
59
|
function ImageRendererComponent(_a) {
|
|
@@ -63,7 +63,7 @@ function ImageRendererComponent(_a) {
|
|
|
63
63
|
useEffect(function () {
|
|
64
64
|
void getImageSource(httpClient, url).then(setImageSource);
|
|
65
65
|
}, [url, httpClient]);
|
|
66
|
-
return (_jsx("div",
|
|
66
|
+
return (_jsx("div", { className: "df-image ".concat(size || 'md'), children: _jsx(Image, { className: "img-responsive ".concat(getMargin(margin)), alt: accessibilityDescription !== null && accessibilityDescription !== void 0 ? accessibilityDescription : '', src: imageSource, stretch: true, shrink: true }) }));
|
|
67
67
|
}
|
|
68
68
|
var readImageBlobAsDataURL = function (imageBlob) { return __awaiter(void 0, void 0, void 0, function () {
|
|
69
69
|
return __generator(this, function (_a) {
|
|
@@ -89,7 +89,7 @@ var getImageSource = function (httpClient, imageUrl) { return __awaiter(void 0,
|
|
|
89
89
|
return [4 /*yield*/, httpClient(imageUrl, {
|
|
90
90
|
method: 'GET',
|
|
91
91
|
headers: { 'Content-Type': 'image/image' },
|
|
92
|
-
credentials: 'same-origin'
|
|
92
|
+
credentials: 'same-origin',
|
|
93
93
|
})
|
|
94
94
|
.then(function (response) { return __awaiter(void 0, void 0, void 0, function () {
|
|
95
95
|
return __generator(this, function (_a) {
|
|
@@ -99,7 +99,8 @@ var getImageSource = function (httpClient, imageUrl) { return __awaiter(void 0,
|
|
|
99
99
|
throw new Error('Image fetching failed');
|
|
100
100
|
});
|
|
101
101
|
}); })
|
|
102
|
-
.then(readImageBlobAsDataURL)
|
|
102
|
+
.then(readImageBlobAsDataURL)
|
|
103
|
+
.catch(function () { return imageUrl; })];
|
|
103
104
|
case 1: return [2 /*return*/, _c.sent()];
|
|
104
105
|
case 2: return [2 /*return*/, imageUrl];
|
|
105
106
|
case 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 { Header, InstructionsList } from '@transferwise/components';
|
|
14
3
|
import { getMargin } from './utils/layout-utils';
|
|
@@ -28,7 +17,7 @@ var InstructionsRenderer = {
|
|
|
28
17
|
var text = _a.text;
|
|
29
18
|
return text;
|
|
30
19
|
});
|
|
31
|
-
return (_jsxs("div",
|
|
32
|
-
}
|
|
20
|
+
return (_jsxs("div", { className: getMargin(margin), children: [title ? _jsx(Header, { title: title }) : null, _jsx(InstructionsList, { dos: dos, donts: donts })] }));
|
|
21
|
+
},
|
|
33
22
|
};
|
|
34
23
|
export default InstructionsRenderer;
|
|
@@ -28,11 +28,11 @@ var IntegerInputRenderer = {
|
|
|
28
28
|
canRenderType: 'input-integer',
|
|
29
29
|
render: function (props) {
|
|
30
30
|
var id = props.id, label = props.label, error = props.error, description = props.description, help = props.help, type = props.type, value = props.value, onChange = props.onChange, rest = __rest(props, ["id", "label", "error", "description", "help", "type", "value", "onChange"]);
|
|
31
|
-
return (_jsx(FieldInput,
|
|
31
|
+
return (_jsx(FieldInput, { id: id, label: label, description: description, error: error, help: help, children: _jsx(Input, __assign({ id: id, name: id, type: "number", step: "1", pattern: "\\d+", value: value !== null && value !== void 0 ? value : '', onChange: function (_a) {
|
|
32
32
|
var newValue = _a.target.value;
|
|
33
33
|
var parsedValue = Number.parseInt(newValue, 10);
|
|
34
34
|
onChange(Number.isNaN(parsedValue) ? null : parsedValue);
|
|
35
|
-
}, onWheel: onWheel }, rest)) }))
|
|
36
|
-
}
|
|
35
|
+
}, onWheel: onWheel }, rest)) }));
|
|
36
|
+
},
|
|
37
37
|
};
|
|
38
38
|
export default IntegerInputRenderer;
|
|
@@ -6,6 +6,6 @@ var LoadingIndicatorRenderer = {
|
|
|
6
6
|
render: function (_a) {
|
|
7
7
|
var margin = _a.margin, size = _a.size;
|
|
8
8
|
return (_jsx(Loader, { size: size, classNames: { 'tw-loader': "tw-loader m-x-auto ".concat(getMargin(margin)) }, "data-testid": "loading-indicator" }));
|
|
9
|
-
}
|
|
9
|
+
},
|
|
10
10
|
};
|
|
11
11
|
export default LoadingIndicatorRenderer;
|
|
@@ -1,14 +1,3 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
2
|
import { Markdown } from '@transferwise/components';
|
|
14
3
|
import { getTextAlignmentAndMargin } from './utils/layout-utils';
|
|
@@ -16,7 +5,7 @@ var MarkdownRenderer = {
|
|
|
16
5
|
canRenderType: 'markdown',
|
|
17
6
|
render: function (_a) {
|
|
18
7
|
var content = _a.content, align = _a.align, margin = _a.margin;
|
|
19
|
-
return (_jsx("div",
|
|
20
|
-
}
|
|
8
|
+
return (_jsx("div", { className: getTextAlignmentAndMargin({ align: align, margin: margin }), children: _jsx(Markdown, { config: { link: { target: '_blank' } }, children: content }) }));
|
|
9
|
+
},
|
|
21
10
|
};
|
|
22
11
|
export default MarkdownRenderer;
|
|
@@ -15,11 +15,11 @@ import { useState } from 'react';
|
|
|
15
15
|
import { getMargin } from './utils/layout-utils';
|
|
16
16
|
var ModalRenderer = {
|
|
17
17
|
canRenderType: 'modal',
|
|
18
|
-
render: function (props) { return _jsx(DFModal, __assign({}, props)); }
|
|
18
|
+
render: function (props) { return _jsx(DFModal, __assign({}, props)); },
|
|
19
19
|
};
|
|
20
20
|
export default ModalRenderer;
|
|
21
21
|
function DFModal(_a) {
|
|
22
22
|
var content = _a.content, margin = _a.margin, trigger = _a.trigger;
|
|
23
23
|
var _b = useState(false), visible = _b[0], setVisible = _b[1];
|
|
24
|
-
return (_jsxs("div",
|
|
24
|
+
return (_jsxs("div", { className: getMargin(margin), children: [_jsx(Button, { priority: "tertiary", block: true, onClick: function () { return setVisible(true); }, children: trigger.title }), _jsx(Modal, { scroll: "content", open: visible, size: "lg", body: content.components, onClose: function () { return setVisible(false); } })] }));
|
|
25
25
|
}
|
|
@@ -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
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
13
2
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
14
3
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -60,7 +49,7 @@ var MultiUploadInputRenderer = {
|
|
|
60
49
|
file = formData.get('file');
|
|
61
50
|
fileId = getRandomId();
|
|
62
51
|
return [2 /*return*/, onUpload(file, fileId).then(function () { return ({
|
|
63
|
-
id: fileId
|
|
52
|
+
id: fileId,
|
|
64
53
|
}); })];
|
|
65
54
|
});
|
|
66
55
|
}); };
|
|
@@ -68,7 +57,7 @@ var MultiUploadInputRenderer = {
|
|
|
68
57
|
return [2 /*return*/, onDelete(String(fileId))];
|
|
69
58
|
}); }); };
|
|
70
59
|
var descriptionId = description ? "".concat(id, "-description") : undefined;
|
|
71
|
-
return (_jsx(UploadFieldInput,
|
|
72
|
-
}
|
|
60
|
+
return (_jsx(UploadFieldInput, { id: id, label: label, description: description, error: error, help: help, children: _jsx(UploadInput, { id: id, "aria-describedby": descriptionId, className: "form-control", description: description, disabled: disabled, fileTypes: getAcceptsString(accepts), maxFiles: maxItems, multiple: true, sizeLimit: maxSize ? toKilobytes(maxSize) : undefined, uploadButtonTitle: uploadLabel, onDeleteFile: onDeleteFile, onUploadFile: onUploadFile }) }));
|
|
61
|
+
},
|
|
73
62
|
};
|
|
74
63
|
export default MultiUploadInputRenderer;
|
|
@@ -28,11 +28,11 @@ var NumberInputRenderer = {
|
|
|
28
28
|
canRenderType: 'input-number',
|
|
29
29
|
render: function (props) {
|
|
30
30
|
var id = props.id, label = props.label, error = props.error, description = props.description, help = props.help, type = props.type, value = props.value, onChange = props.onChange, rest = __rest(props, ["id", "label", "error", "description", "help", "type", "value", "onChange"]);
|
|
31
|
-
return (_jsx(FieldInput,
|
|
31
|
+
return (_jsx(FieldInput, { id: id, label: label, description: description, error: error, help: help, children: _jsx(Input, __assign({ id: id, name: id, type: "number", value: value !== null && value !== void 0 ? value : '', onChange: function (_a) {
|
|
32
32
|
var newValue = _a.target.value;
|
|
33
33
|
var parsedValue = Number.parseFloat(newValue);
|
|
34
34
|
onChange(Number.isNaN(parsedValue) ? null : parsedValue);
|
|
35
|
-
}, onWheel: onWheel }, rest)) }))
|
|
36
|
-
}
|
|
35
|
+
}, onWheel: onWheel }, rest)) }));
|
|
36
|
+
},
|
|
37
37
|
};
|
|
38
38
|
export default NumberInputRenderer;
|
|
@@ -18,7 +18,7 @@ import classNames from 'classnames';
|
|
|
18
18
|
import paragraphMessages from '../../../common/messages/paragraph.messages';
|
|
19
19
|
var ParagraphRenderer = {
|
|
20
20
|
canRenderType: 'paragraph',
|
|
21
|
-
render: function (props) { return _jsx(Paragraph, __assign({}, props)); }
|
|
21
|
+
render: function (props) { return _jsx(Paragraph, __assign({}, props)); },
|
|
22
22
|
};
|
|
23
23
|
function Paragraph(_a) {
|
|
24
24
|
var align = _a.align, control = _a.control, margin = _a.margin, text = _a.text;
|
|
@@ -27,7 +27,7 @@ function Paragraph(_a) {
|
|
|
27
27
|
}
|
|
28
28
|
function StandardParagraph(_a) {
|
|
29
29
|
var text = _a.text, className = _a.className;
|
|
30
|
-
return _jsx("p",
|
|
30
|
+
return _jsx("p", { className: className, children: text });
|
|
31
31
|
}
|
|
32
32
|
function CopyableParagraph(_a) {
|
|
33
33
|
var text = _a.text, align = _a.align, className = _a.className;
|
|
@@ -36,9 +36,10 @@ function CopyableParagraph(_a) {
|
|
|
36
36
|
var copy = function () {
|
|
37
37
|
navigator.clipboard
|
|
38
38
|
.writeText(text)
|
|
39
|
-
.then(function () { return createSnackbar({ text: formatMessage(paragraphMessages.copied) }); })
|
|
39
|
+
.then(function () { return createSnackbar({ text: formatMessage(paragraphMessages.copied) }); })
|
|
40
|
+
.catch(function () { });
|
|
40
41
|
};
|
|
41
42
|
var inputAlignmentClasses = getTextAlignmentAndMargin({ align: align, margin: 'sm' });
|
|
42
|
-
return (_jsxs("div",
|
|
43
|
+
return (_jsxs("div", { className: className, children: [_jsx(Input, { type: "text", value: text, readOnly: true, className: classNames('text-ellipsis', inputAlignmentClasses) }), _jsx(Button, { block: true, onClick: copy, children: formatMessage(paragraphMessages.copy) })] }));
|
|
43
44
|
}
|
|
44
45
|
export default ParagraphRenderer;
|
|
@@ -19,7 +19,7 @@ import { NavigationOptionMedia } from './components/icon/NavigationOptionMedia';
|
|
|
19
19
|
import classNames from 'classnames';
|
|
20
20
|
var RepeatableRenderer = {
|
|
21
21
|
canRenderType: 'repeatable',
|
|
22
|
-
render: function (props) { return _jsx(Repeatable, __assign({}, props)); }
|
|
22
|
+
render: function (props) { return _jsx(Repeatable, __assign({}, props)); },
|
|
23
23
|
};
|
|
24
24
|
function Repeatable(props) {
|
|
25
25
|
var addItemTitle = props.addItemTitle, description = props.description, editableItem = props.editableItem, editItemTitle = props.editItemTitle, error = props.error, items = props.items, title = props.title, onEdit = props.onEdit, onAdd = props.onAdd, onSave = props.onSave, onRemove = props.onRemove;
|
|
@@ -46,10 +46,10 @@ function Repeatable(props) {
|
|
|
46
46
|
var onCancelEdit = function () {
|
|
47
47
|
setOpenModalType(null);
|
|
48
48
|
};
|
|
49
|
-
return (_jsxs(_Fragment, { children: [title && _jsx(Header, { title: title }), description && _jsx("p", { children: description }), _jsxs("div",
|
|
50
|
-
'has-error': error
|
|
51
|
-
})
|
|
52
|
-
formatMessage(messages.addItemTitle), body: _jsxs(_Fragment, { children: [_jsx("div",
|
|
49
|
+
return (_jsxs(_Fragment, { children: [title && _jsx(Header, { title: title }), description && _jsx("p", { children: description }), _jsxs("div", { className: classNames('form-group', {
|
|
50
|
+
'has-error': error,
|
|
51
|
+
}), children: [items === null || items === void 0 ? void 0 : items.map(function (item, index) { return (_jsx(ItemSummaryOption, { item: item, onClick: function () { return onEditItem(index); } }, item.id)); }), _jsx(NavigationOption, { media: _jsx(Plus, {}), title: addItemTitle || formatMessage(messages.addItemTitle), showMediaAtAllSizes: true, onClick: function () { return onAddItem(); } }), error && _jsx(InlineAlert, { type: "negative", children: error })] }), _jsx(Modal, { open: openModalType !== null, title: (openModalType === 'add' ? addItemTitle : editItemTitle) ||
|
|
52
|
+
formatMessage(messages.addItemTitle), body: _jsxs(_Fragment, { children: [_jsx("div", { className: "m-b-2", children: editableItem }), _jsxs("div", { children: [_jsx(Button, { priority: "primary", block: true, className: "m-b-2", onClick: function () { return onSaveItem(); }, children: formatMessage(messages.addItem) }), _jsx(Button, { priority: "secondary", type: "negative", block: true, onClick: function () { return onRemoveItem(); }, children: formatMessage(messages.removeItem) })] })] }), onClose: function () { return onCancelEdit(); } })] }));
|
|
53
53
|
}
|
|
54
54
|
function ItemSummaryOption(_a) {
|
|
55
55
|
var item = _a.item, onClick = _a.onClick;
|
|
@@ -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, Fragment as _Fragment } from "react/jsx-runtime";
|
|
13
2
|
import { DefinitionList, Header } from '@transferwise/components';
|
|
14
3
|
import { getMargin } from './utils/layout-utils';
|
|
@@ -24,18 +13,18 @@ var ReviewRenderer = {
|
|
|
24
13
|
onClick: function (event) {
|
|
25
14
|
event.preventDefault();
|
|
26
15
|
callToAction.onClick();
|
|
27
|
-
}
|
|
16
|
+
},
|
|
28
17
|
}
|
|
29
18
|
: undefined;
|
|
30
|
-
return (_jsxs("div",
|
|
19
|
+
return (_jsxs("div", { className: getMargin(margin), children: [(title || callToAction) && _jsx(Header, { title: title !== null && title !== void 0 ? title : '', action: action }), _jsx("div", { className: margin, children: _jsx(DefinitionList, { layout: orientation, definitions: fields.map(function (_a, index) {
|
|
31
20
|
var label = _a.label, value = _a.value, help = _a.help;
|
|
32
21
|
return ({
|
|
33
22
|
key: String(index),
|
|
34
23
|
title: label,
|
|
35
|
-
value: getFieldValue(value, help, orientation)
|
|
24
|
+
value: getFieldValue(value, help, orientation),
|
|
36
25
|
});
|
|
37
|
-
}) }) })
|
|
38
|
-
}
|
|
26
|
+
}) }) })] }));
|
|
27
|
+
},
|
|
39
28
|
};
|
|
40
29
|
export default ReviewRenderer;
|
|
41
30
|
var getFieldValue = function (value, help, orientation) {
|