@wise/dynamic-flow-client 2.6.1 → 2.8.0
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/README.md +42 -13
- package/build/i18n/en.json +4 -0
- package/build/i18n/pt.json +2 -2
- package/build/i18n/zh_CN.json +20 -20
- package/build/main.css +0 -20
- package/build/main.js +952 -891
- package/build/main.min.js +1 -1
- package/build/types/common/errorBoundary/ErrorBoundaryAlert.d.ts +5 -0
- package/build/types/{dynamicFlow/DynamicFlowTypes.d.ts → dynamic-flow-types.d.ts} +34 -38
- package/build/types/index.d.ts +7 -7
- package/build/types/legacy/common/constants/FeatureName.d.ts +3 -0
- package/build/types/legacy/common/contexts/eventsContext/EventsContext.d.ts +14 -0
- package/build/types/legacy/common/contexts/featureContext/FeatureContext.d.ts +10 -0
- package/build/types/{common → legacy/common}/contexts/httpClientContext/HttpClientContext.d.ts +3 -3
- package/build/types/{common → legacy/common}/contexts/logContext/LogContext.d.ts +3 -5
- package/build/types/legacy/common/hooks/useDebouncedFunction/useDebouncedFunction.d.ts +2 -0
- package/build/types/{common → legacy/common}/hooks/useExternalStepPolling/useExternalStepPolling.d.ts +1 -1
- package/build/types/{common → legacy/common}/hooks/usePersistAsync/usePersistAsync.d.ts +1 -1
- package/build/types/{common → legacy/common}/hooks/useStepPolling/useStepPolling.d.ts +1 -1
- package/build/types/{common → legacy/common}/utils/api-utils.d.ts +0 -1
- package/build/types/legacy/common/utils/debounce.d.ts +6 -0
- package/build/types/{common → legacy/common}/utils/file-utils.d.ts +1 -1
- package/build/types/{common → legacy/common}/utils/misc-utils.d.ts +1 -1
- package/build/types/{common → legacy/common}/utils/model-utils.d.ts +1 -1
- package/build/types/{common → legacy/common}/utils/schema-utils.d.ts +1 -1
- package/build/types/{common → legacy/common}/utils/step-utils.d.ts +1 -1
- package/build/types/{common → legacy/common}/validators/models/model-utils.d.ts +1 -1
- package/build/types/{common → legacy/common}/validators/models/model-validators.d.ts +1 -1
- package/build/types/{common → legacy/common}/validators/schemas/schema-validators.d.ts +1 -1
- package/build/types/{common → legacy/common}/validators/validationFailures/validation-failures.d.ts +1 -1
- package/build/types/legacy/dynamicFlow/BackButton.d.ts +9 -0
- package/build/types/legacy/dynamicFlow/DynamicFlow.d.ts +3 -0
- package/build/types/legacy/dynamicFlow/DynamicFlowStep.d.ts +8 -0
- package/build/types/legacy/dynamicFlow/DynamicFlowTypes.d.ts +8 -0
- package/build/types/{dynamicFlow → legacy/dynamicFlow}/stories/fixtureHttpClient.d.ts +1 -1
- package/build/types/{dynamicFlow → legacy/dynamicFlow}/utils/index.d.ts +1 -1
- package/build/types/{dynamicFlow → legacy/dynamicFlow}/utils/responseParsers/response-parsers.d.ts +2 -2
- package/build/types/legacy/dynamicFlow/utils/useDebouncedRefresh/useDebouncedRefresh.d.ts +5 -0
- package/build/types/{dynamicFlow → legacy/dynamicFlow}/utils/useDynamicFlowState.d.ts +1 -1
- package/build/types/{dynamicFlow → legacy/dynamicFlow}/utils/useLoader.d.ts +1 -1
- package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/JsonSchemaForm.d.ts +4 -4
- package/build/types/legacy/jsonSchemaForm/allOfSchema/AllOfSchema.d.ts +13 -0
- package/build/types/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/MultipleFileUploadSchema.d.ts +16 -0
- package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/upload-utils.d.ts +1 -1
- package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/arrayTypeSchema/arrayListSchema/repeatableSchema/RepeatableSchemaStep.d.ts +3 -3
- package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/arrayTypeSchema/arrayListSchema/repeatableSchema/utils/summary-utils.d.ts +2 -2
- package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/controlFeedback/ControlFeedback.d.ts +5 -5
- package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/genericSchema/GenericSchema.d.ts +4 -4
- package/build/types/legacy/jsonSchemaForm/objectSchema/ObjectSchema.d.ts +15 -0
- package/build/types/legacy/jsonSchemaForm/oneOfSchema/OneOfSchema.d.ts +14 -0
- package/build/types/legacy/jsonSchemaForm/persistAsyncSchema/PersistAsyncSchema.d.ts +15 -0
- package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/persistAsyncSchema/persistAsyncBasicSchema/PersistAsyncBasicSchema.d.ts +6 -6
- package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/persistAsyncSchema/persistAsyncBlobSchema/PersistAsyncBlobSchema.d.ts +6 -6
- package/build/types/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/UploadInputAdapter.d.ts +16 -0
- package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfControl.d.ts +5 -5
- package/build/types/legacy/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfRadioControl.d.ts +8 -0
- package/build/types/legacy/jsonSchemaForm/readOnlySchema/ReadOnlySchema.d.ts +7 -0
- package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/schemaFormControl/SchemaFormControl.d.ts +5 -5
- package/build/types/legacy/jsonSchemaForm/validationAsyncSchema/ValidationAsyncSchema.d.ts +15 -0
- package/build/types/{layout → legacy/layout}/DynamicLayout.d.ts +3 -3
- package/build/types/legacy/layout/decision/DynamicDecision.d.ts +8 -0
- package/build/types/legacy/layout/form/DynamicForm.d.ts +7 -0
- package/build/types/legacy/layout/image/DynamicImage.d.ts +6 -0
- package/build/types/{layout → legacy/layout}/index.d.ts +1 -0
- package/build/types/legacy/layout/modal/DynamicModal.d.ts +7 -0
- package/build/types/legacy/layout/review/DynamicReview.d.ts +8 -0
- package/build/types/legacy/layout/search/DynamicSearch.d.ts +8 -0
- package/build/types/{layout → legacy/layout}/search/useSearch.d.ts +2 -2
- package/build/types/legacy/step/cameraStep/CameraStep.d.ts +7 -0
- package/build/types/legacy/step/cameraStep/cameraCapture/CameraCapture.d.ts +15 -0
- package/build/types/legacy/step/cameraStep/cameraCapture/CameraCapture.messages.d.ts +58 -0
- package/build/types/legacy/step/cameraStep/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.d.ts +2 -0
- package/build/types/{step → legacy/step}/cameraStep/cameraCapture/hooks/useFullScreenOrientationLock.d.ts +2 -1
- package/build/types/{step → legacy/step}/cameraStep/cameraCapture/overlay/Overlay.d.ts +1 -1
- package/build/types/legacy/step/cameraStep/cameraCapture/screens/cameraErrorScreen/CameraErrorScreen.d.ts +3 -0
- package/build/types/legacy/step/cameraStep/cameraCapture/screens/index.d.ts +1 -0
- package/build/types/legacy/step/cameraStep/cameraCapture/tracking/index.d.ts +8 -0
- package/build/types/legacy/step/cameraStep/cameraCapture/types/index.d.ts +11 -0
- package/build/types/{step → legacy/step}/layoutStep/utils/inline-reference-utils.d.ts +1 -1
- package/build/types/legacy/test-utils/DynamicFlowProviders.d.ts +9 -0
- package/build/types/legacy/test-utils/index.d.ts +4 -0
- package/build/types/legacy/test-utils/legacy-utils.d.ts +22 -0
- package/build/types/legacy/test-utils/log-utils.d.ts +9 -0
- package/build/types/revamp/DynamicFlowRevamp.d.ts +2 -2
- package/build/types/revamp/domain/components/AlertComponent.d.ts +2 -2
- package/build/types/revamp/domain/components/BoxComponent.d.ts +3 -3
- package/build/types/revamp/domain/components/ButtonComponent.d.ts +2 -2
- package/build/types/revamp/domain/components/ColumnsComponent.d.ts +20 -0
- package/build/types/revamp/domain/components/HeadingComponent.d.ts +2 -2
- package/build/types/revamp/domain/components/ObjectComponent.d.ts +3 -3
- package/build/types/revamp/domain/components/ParagraphComponent.d.ts +3 -3
- package/build/types/revamp/domain/components/TextInputComponent.d.ts +9 -10
- package/build/types/revamp/domain/mappers/layout/alertLayoutToComponent.d.ts +3 -3
- package/build/types/revamp/domain/mappers/layout/boxLayoutToComponents.d.ts +4 -4
- package/build/types/revamp/domain/mappers/layout/buttonLayoutToComponent.d.ts +3 -3
- package/build/types/revamp/domain/mappers/layout/columnsLayoutToComponent.d.ts +4 -0
- package/build/types/revamp/domain/mappers/layout/formLayoutToComponent.d.ts +4 -4
- package/build/types/revamp/domain/mappers/layout/headingLayoutToComponent.d.ts +3 -3
- package/build/types/revamp/domain/mappers/layout/paragraphLayoutToComponent.d.ts +3 -3
- package/build/types/revamp/domain/mappers/mapLayoutToComponent.d.ts +4 -4
- package/build/types/revamp/domain/mappers/mapSchemaToComponent.d.ts +3 -4
- package/build/types/revamp/domain/mappers/mapStepToComponents.d.ts +2 -9
- package/build/types/revamp/domain/mappers/schema/objectSchemaToComponent.d.ts +5 -3
- package/build/types/revamp/domain/mappers/schema/stringSchemaToComponent.d.ts +12 -3
- package/build/types/revamp/domain/mappers/schema/types.d.ts +9 -3
- package/build/types/revamp/domain/mappers/types.d.ts +10 -0
- package/build/types/revamp/domain/mappers/utils/legacy-utils.d.ts +5 -2
- package/build/types/revamp/domain/mappers/utils/type-validators.d.ts +9 -0
- package/build/types/revamp/domain/mappers/utils/value-checks.d.ts +10 -0
- package/build/types/revamp/domain/types.d.ts +16 -16
- package/build/types/revamp/renderers/mappers/alertComponentToProps.d.ts +3 -3
- package/build/types/revamp/renderers/mappers/boxComponentToProps.d.ts +4 -4
- package/build/types/revamp/renderers/mappers/buttonComponentToProps.d.ts +2 -2
- package/build/types/revamp/renderers/mappers/columnsComponentToProps.d.ts +4 -0
- package/build/types/revamp/renderers/mappers/componentToRendererProps.d.ts +8 -4
- package/build/types/revamp/renderers/mappers/headingComponentToProps.d.ts +3 -3
- package/build/types/revamp/renderers/mappers/objectComponentToProps.d.ts +4 -4
- package/build/types/revamp/renderers/mappers/paragraphComponentToProps.d.ts +3 -3
- package/build/types/revamp/renderers/mappers/textInputComponentToProps.d.ts +3 -3
- package/build/types/revamp/renderers/types.d.ts +22 -13
- package/build/types/revamp/step/Step.d.ts +3 -3
- package/build/types/revamp/step/utils/getRenderFunction.d.ts +3 -0
- package/build/types/revamp/step/utils/getSchemaErrorMessageFunction.d.ts +4 -0
- package/build/types/revamp/utils/findComponent.d.ts +1 -1
- package/build/types/revamp/utils/getSubmittableData.d.ts +2 -2
- package/build/types/revamp/utils/type-utils.d.ts +4 -2
- package/build/types/revamp/utils/validateComponents.d.ts +2 -0
- package/build/types/revamp/wise/renderers/AlertRenderer.d.ts +1 -1
- package/build/types/revamp/wise/renderers/BoxRenderer.d.ts +1 -1
- package/build/types/revamp/wise/renderers/ButtonRenderer.d.ts +1 -1
- package/build/types/revamp/wise/renderers/ColumnsRenderer.d.ts +3 -0
- package/build/types/revamp/wise/renderers/HeadingRenderer.d.ts +1 -1
- package/build/types/revamp/wise/renderers/ObjectRenderer.d.ts +1 -1
- package/build/types/revamp/wise/renderers/ParagraphRenderer.d.ts +1 -1
- package/build/types/revamp/wise/renderers/TextInputRenderer.d.ts +1 -1
- package/build/types/revamp/wise/renderers/utils/layout-utils.d.ts +1 -1
- package/build/types/test-utils/NeptuneProviders.d.ts +5 -0
- package/build/types/test-utils/rtl-utils.d.ts +2 -0
- package/package.json +13 -17
- package/build/types/common/constants/FeatureName.d.ts +0 -3
- package/build/types/common/contexts/eventsContext/EventsContext.d.ts +0 -15
- package/build/types/common/contexts/featureContext/FeatureContext.d.ts +0 -10
- package/build/types/common/hooks/useDebouncedFunction/useDebouncedFunction.d.ts +0 -2
- package/build/types/common/utils/debounce.d.ts +0 -6
- package/build/types/dynamicFlow/BackButton.d.ts +0 -9
- package/build/types/dynamicFlow/DynamicFlow.d.ts +0 -3
- package/build/types/dynamicFlow/DynamicFlowStep.d.ts +0 -8
- package/build/types/dynamicFlow/utils/errorBoundary/ErrorBoundaryAlert.d.ts +0 -5
- package/build/types/dynamicFlow/utils/useDebouncedRefresh/useDebouncedRefresh.d.ts +0 -6
- package/build/types/jsonSchemaForm/allOfSchema/AllOfSchema.d.ts +0 -13
- package/build/types/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/MultipleFileUploadSchema.d.ts +0 -16
- package/build/types/jsonSchemaForm/objectSchema/ObjectSchema.d.ts +0 -15
- package/build/types/jsonSchemaForm/oneOfSchema/OneOfSchema.d.ts +0 -14
- package/build/types/jsonSchemaForm/persistAsyncSchema/PersistAsyncSchema.d.ts +0 -15
- package/build/types/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/UploadInputAdapter.d.ts +0 -16
- package/build/types/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfRadioControl.d.ts +0 -8
- package/build/types/jsonSchemaForm/readOnlySchema/ReadOnlySchema.d.ts +0 -7
- package/build/types/jsonSchemaForm/validationAsyncSchema/ValidationAsyncSchema.d.ts +0 -15
- package/build/types/layout/decision/DynamicDecision.d.ts +0 -8
- package/build/types/layout/form/DynamicForm.d.ts +0 -7
- package/build/types/layout/image/DynamicImage.d.ts +0 -6
- package/build/types/layout/review/DynamicReview.d.ts +0 -8
- package/build/types/layout/search/DynamicSearch.d.ts +0 -8
- package/build/types/revamp/renderers/utils/mapping-utils.d.ts +0 -3
- package/build/types/revamp/step/utils/render-utils.d.ts +0 -5
- package/build/types/step/cameraStep/CameraStep.d.ts +0 -7
- package/build/types/step/cameraStep/cameraCapture/CameraCapture.d.ts +0 -15
- package/build/types/step/cameraStep/cameraCapture/CameraCapture.messages.d.ts +0 -18
- package/build/types/step/cameraStep/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.d.ts +0 -2
- package/build/types/step/cameraStep/cameraCapture/screens/CameraNotSupported/CameraNotSupported.d.ts +0 -2
- package/build/types/step/cameraStep/cameraCapture/screens/CameraNotSupported/CameraNotSupported.messages.d.ts +0 -13
- package/build/types/step/cameraStep/cameraCapture/screens/NoCameraAccess/NoCameraAccess.d.ts +0 -5
- package/build/types/step/cameraStep/cameraCapture/screens/NoCameraAccess/NoCameraAccess.messages.d.ts +0 -18
- package/build/types/step/cameraStep/cameraCapture/screens/index.d.ts +0 -2
- package/build/types/step/cameraStep/cameraCapture/tracking/index.d.ts +0 -7
- package/build/types/{dynamicFlow/utils → common}/errorBoundary/ErrorBoundary.d.ts +1 -1
- /package/build/types/{dynamicFlow/utils → common}/errorBoundary/ErrorBoundary.messages.d.ts +0 -0
- /package/build/types/{jsonSchemaForm/controlFeedback/ControlFeedback.messages.d.ts → common/validationMessages/validation.messages.d.ts} +0 -0
- /package/build/types/{common → legacy/common}/constants/DateMode.d.ts +0 -0
- /package/build/types/{common → legacy/common}/constants/FormControlType.d.ts +0 -0
- /package/build/types/{common → legacy/common}/constants/MonthFormat.d.ts +0 -0
- /package/build/types/{common → legacy/common}/constants/Size.d.ts +0 -0
- /package/build/types/{common → legacy/common}/constants/index.d.ts +0 -0
- /package/build/types/{common → legacy/common}/contexts/dynamicFlowContexts/DynamicFlowContexts.d.ts +0 -0
- /package/build/types/{common → legacy/common}/contexts/dynamicFlowContexts/usePendingPromiseCounter.d.ts +0 -0
- /package/build/types/{common → legacy/common}/contexts/index.d.ts +0 -0
- /package/build/types/{common → legacy/common}/hooks/index.d.ts +0 -0
- /package/build/types/{common → legacy/common}/hooks/useExternal/useExternal.d.ts +0 -0
- /package/build/types/{common → legacy/common}/hooks/usePolling/usePolling.d.ts +0 -0
- /package/build/types/{common → legacy/common}/hooks/usePrevious/usePrevious.d.ts +0 -0
- /package/build/types/{common → legacy/common}/messages.d.ts +0 -0
- /package/build/types/{common → legacy/common}/utils/date-utils.d.ts +0 -0
- /package/build/types/{common → legacy/common}/utils/id-utils.d.ts +0 -0
- /package/build/types/{common → legacy/common}/utils/index.d.ts +0 -0
- /package/build/types/{common → legacy/common}/utils/is-equal.d.ts +0 -0
- /package/build/types/{common → legacy/common}/utils/mobile-utils.d.ts +0 -0
- /package/build/types/{common → legacy/common}/validators/index.d.ts +0 -0
- /package/build/types/{common → legacy/common}/validators/types/type-validators.d.ts +0 -0
- /package/build/types/{common → legacy/common}/validators/validationFailures/validation-failures.utils.d.ts +0 -0
- /package/build/types/{common → legacy/common}/validators/values/value-validators.d.ts +0 -0
- /package/build/types/{dynamicFlow → legacy/dynamicFlow}/index.d.ts +0 -0
- /package/build/types/{formControl → legacy/formControl}/FormControl.d.ts +0 -0
- /package/build/types/{formControl → legacy/formControl}/index.d.ts +0 -0
- /package/build/types/{formControl → legacy/formControl}/utils/getAutocompleteString.d.ts +0 -0
- /package/build/types/{formControl → legacy/formControl}/utils/index.d.ts +0 -0
- /package/build/types/{formControl → legacy/formControl}/utils/value-utils.d.ts +0 -0
- /package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/allOfSchema/index.d.ts +0 -0
- /package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/arrayTypeSchema/ArraySchema.d.ts +0 -0
- /package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/arrayTypeSchema/arrayListSchema/ArrayListSchema.d.ts +0 -0
- /package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/arrayTypeSchema/arrayListSchema/index.d.ts +0 -0
- /package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/MultipleFileUploadSchema.messages.d.ts +0 -0
- /package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/index.d.ts +0 -0
- /package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/index.d.ts +0 -0
- /package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/useFormattedDefaultErrorMessages.d.ts +0 -0
- /package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/arrayTypeSchema/arrayListSchema/repeatableSchema/ItemSummary.d.ts +0 -0
- /package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/arrayTypeSchema/arrayListSchema/repeatableSchema/RepeatableSchema.d.ts +0 -0
- /package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/arrayTypeSchema/arrayListSchema/repeatableSchema/RepeatableSchema.messages.d.ts +0 -0
- /package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/arrayTypeSchema/index.d.ts +0 -0
- /package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/basicTypeSchema/BasicTypeSchema.d.ts +0 -0
- /package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/basicTypeSchema/index.d.ts +0 -0
- /package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/controlFeedback/index.d.ts +0 -0
- /package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/genericSchema/index.d.ts +0 -0
- /package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/help/Help.d.ts +0 -0
- /package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/help/Help.messages.d.ts +0 -0
- /package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/help/index.d.ts +0 -0
- /package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/index.d.ts +0 -0
- /package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/objectSchema/index.d.ts +0 -0
- /package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/oneOfSchema/index.d.ts +0 -0
- /package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/oneOfSchema/utils.d.ts +0 -0
- /package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/persistAsyncSchema/PersistAsyncSchema.messages.d.ts +0 -0
- /package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/persistAsyncSchema/index.d.ts +0 -0
- /package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/persistAsyncSchema/persistAsyncBasicSchema/index.d.ts +0 -0
- /package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/persistAsyncSchema/persistAsyncBlobSchema/index.d.ts +0 -0
- /package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/promotedOneOfSchema/PromotedOneOfSchema.d.ts +0 -0
- /package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/promotedOneOfSchema/index.d.ts +0 -0
- /package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/promotedOneOfSchema/promoted-one-of-utils.d.ts +0 -0
- /package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfCheckboxControl.d.ts +0 -0
- /package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/readOnlySchema/ReadOnlySchema.messages.d.ts +0 -0
- /package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/readOnlySchema/index.d.ts +0 -0
- /package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/schemaFormControl/index.d.ts +0 -0
- /package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/schemaFormControl/utils/index.d.ts +0 -0
- /package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/schemaFormControl/utils/mapping-utils.d.ts +0 -0
- /package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/validationAsyncSchema/index.d.ts +0 -0
- /package/build/types/{layout → legacy/layout}/alert/DynamicAlert.d.ts +0 -0
- /package/build/types/{layout → legacy/layout}/box/DynamicBox.d.ts +0 -0
- /package/build/types/{layout → legacy/layout}/button/DynamicButton.d.ts +0 -0
- /package/build/types/{layout → legacy/layout}/button/utils.d.ts +0 -0
- /package/build/types/{layout → legacy/layout}/columns/DynamicColumns.d.ts +0 -0
- /package/build/types/{layout → legacy/layout}/divider/DynamicDivider.d.ts +0 -0
- /package/build/types/{layout → legacy/layout}/external/DynamicExternal.d.ts +0 -0
- /package/build/types/{layout → legacy/layout}/external/DynamicExternal.messages.d.ts +0 -0
- /package/build/types/{layout → legacy/layout}/heading/DynamicHeading.d.ts +0 -0
- /package/build/types/{layout → legacy/layout}/icon/DynamicIcon.d.ts +0 -0
- /package/build/types/{layout → legacy/layout}/icon/FlagIcon.d.ts +0 -0
- /package/build/types/{layout → legacy/layout}/icon/NamedIcon.d.ts +0 -0
- /package/build/types/{layout → legacy/layout}/instructions/DynamicInstructions.d.ts +0 -0
- /package/build/types/{layout → legacy/layout}/list/DynamicStatusList.d.ts +0 -0
- /package/build/types/{layout → legacy/layout}/loadingIndicator/DynamicLoadingIndicator.d.ts +0 -0
- /package/build/types/{layout → legacy/layout}/markdown/DynamicMarkdown.d.ts +0 -0
- /package/build/types/{layout → legacy/layout}/paragraph/DynamicParagraph.d.ts +0 -0
- /package/build/types/{layout → legacy/layout}/paragraph/DynamicParagraph.messages.d.ts +0 -0
- /package/build/types/{layout → legacy/layout}/paragraph/useSnackBarIfAvailable.d.ts +0 -0
- /package/build/types/{layout → legacy/layout}/search/SearchInput.d.ts +0 -0
- /package/build/types/{layout → legacy/layout}/search/SearchResults.d.ts +0 -0
- /package/build/types/{layout → legacy/layout}/utils/getNavigationOptionMedia.d.ts +0 -0
- /package/build/types/{layout → legacy/layout}/utils/index.d.ts +0 -0
- /package/build/types/{step → legacy/step}/cameraStep/cameraCapture/components/bottomBar/BottomBar.d.ts +0 -0
- /package/build/types/{step → legacy/step}/cameraStep/cameraCapture/components/index.d.ts +0 -0
- /package/build/types/{step → legacy/step}/cameraStep/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.messages.d.ts +0 -0
- /package/build/types/{step → legacy/step}/cameraStep/cameraCapture/hooks/useVideoConstraints.d.ts +0 -0
- /package/build/types/{step → legacy/step}/cameraStep/cameraCapture/index.d.ts +0 -0
- /package/build/types/{step → legacy/step}/cameraStep/cameraCapture/utils/index.d.ts +0 -0
- /package/build/types/{step → legacy/step}/cameraStep/index.d.ts +0 -0
- /package/build/types/{step → legacy/step}/externalConfirmationStep/ExternalConfirmationStep.d.ts +0 -0
- /package/build/types/{step → legacy/step}/externalConfirmationStep/ExternalConfirmationStep.messages.d.ts +0 -0
- /package/build/types/{step → legacy/step}/externalConfirmationStep/index.d.ts +0 -0
- /package/build/types/{step → legacy/step}/index.d.ts +0 -0
- /package/build/types/{step → legacy/step}/layoutStep/LayoutStep.d.ts +0 -0
- /package/build/types/{step → legacy/step}/layoutStep/index.d.ts +0 -0
- /package/build/types/{step → legacy/step}/layoutStep/utils/index.d.ts +0 -0
- /package/build/types/{step → legacy/step}/layoutStep/utils/layout-utils.d.ts +0 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type GetErrorMessageFunctions = (validationMessages?: Record<string, string>) => ErrorMessageFunctions;
|
|
2
|
+
export type ErrorMessageFunctions = {
|
|
3
|
+
minimumDate: (minDate: string) => string;
|
|
4
|
+
maximumDate: (maxDate: string) => string;
|
|
5
|
+
minLength: (minLength: number) => string;
|
|
6
|
+
maxLength: (maxLength: number) => string;
|
|
7
|
+
pattern: () => string;
|
|
8
|
+
required: () => string;
|
|
9
|
+
type: () => string;
|
|
10
|
+
};
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
import { Context, LegacyContext } from '@wise/dynamic-flow-types';
|
|
2
|
-
|
|
1
|
+
import type { Context, LegacyContext, Align as DFAlign } from '@wise/dynamic-flow-types';
|
|
2
|
+
import type { Align, Bias } from '../../types';
|
|
3
|
+
export declare const mapLegacyContext: (context: Context | LegacyContext) => "warning" | "positive" | "negative" | "neutral";
|
|
4
|
+
export declare const mapLegacyBias: (bias: 'left' | 'right' | 'none') => Bias;
|
|
5
|
+
export declare const mapLegacyAlign: (align: DFAlign) => Align;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const isString: (value: unknown) => value is string;
|
|
2
|
+
export declare const isNumber: (value: unknown) => value is number;
|
|
3
|
+
export declare const isInteger: (value: unknown) => value is number;
|
|
4
|
+
export declare const isBoolean: (value: unknown) => value is boolean;
|
|
5
|
+
export declare const isObject: (value: unknown) => value is Record<string, unknown>;
|
|
6
|
+
export declare const isArray: (value: unknown) => value is unknown[];
|
|
7
|
+
export declare const isNull: (value: unknown) => value is null;
|
|
8
|
+
export declare const isUndefined: (value: unknown) => value is undefined;
|
|
9
|
+
export declare const isNullish: (v: unknown) => v is null | undefined;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { StringSchema } from '@wise/dynamic-flow-types';
|
|
2
|
+
type IsInvalidCheck = (schema: StringSchema, model: string | null) => boolean;
|
|
3
|
+
export declare const isAboveMaximum: IsInvalidCheck;
|
|
4
|
+
export declare const isAboveMaxLength: IsInvalidCheck;
|
|
5
|
+
export declare const isBelowMinimum: IsInvalidCheck;
|
|
6
|
+
export declare const isBelowMinLength: IsInvalidCheck;
|
|
7
|
+
export declare const isNotAdheringToPattern: IsInvalidCheck;
|
|
8
|
+
export declare const isNotCorrectType: IsInvalidCheck;
|
|
9
|
+
export declare const isNotProvided: IsInvalidCheck;
|
|
10
|
+
export {};
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { Action, Margin
|
|
2
|
-
import { AlertComponent } from './components/AlertComponent';
|
|
3
|
-
import { BoxComponent } from './components/BoxComponent';
|
|
4
|
-
import { ButtonComponent } from './components/ButtonComponent';
|
|
5
|
-
import { HeadingComponent } from './components/HeadingComponent';
|
|
6
|
-
import { ObjectComponent } from './components/ObjectComponent';
|
|
7
|
-
import { ParagraphComponent } from './components/ParagraphComponent';
|
|
8
|
-
import { TextInputComponent } from './components/TextInputComponent';
|
|
9
|
-
|
|
10
|
-
export type
|
|
1
|
+
import type { Action, Margin } from '@wise/dynamic-flow-types';
|
|
2
|
+
import type { AlertComponent } from './components/AlertComponent';
|
|
3
|
+
import type { BoxComponent } from './components/BoxComponent';
|
|
4
|
+
import type { ButtonComponent } from './components/ButtonComponent';
|
|
5
|
+
import type { HeadingComponent } from './components/HeadingComponent';
|
|
6
|
+
import type { ObjectComponent } from './components/ObjectComponent';
|
|
7
|
+
import type { ParagraphComponent } from './components/ParagraphComponent';
|
|
8
|
+
import type { TextInputComponent } from './components/TextInputComponent';
|
|
9
|
+
import type { ColumnsComponent } from './components/ColumnsComponent';
|
|
10
|
+
export type StepComponent = AlertComponent | BoxComponent | ButtonComponent | ColumnsComponent | HeadingComponent | ObjectComponent | ParagraphComponent | TextInputComponent;
|
|
11
|
+
export type ContainerComponent = ObjectComponent | BoxComponent | ColumnsComponent;
|
|
11
12
|
export type BaseComponent = {
|
|
12
13
|
type: string;
|
|
13
14
|
uid: string;
|
|
14
|
-
|
|
15
|
+
validate: () => boolean;
|
|
15
16
|
};
|
|
16
|
-
export type
|
|
17
|
-
keyProp: string;
|
|
18
|
-
};
|
|
19
|
-
export type LayoutComponent = RenderableComponent & {
|
|
17
|
+
export type LayoutComponent = BaseComponent & {
|
|
20
18
|
margin: Margin;
|
|
21
19
|
};
|
|
22
|
-
export type InputComponent =
|
|
20
|
+
export type InputComponent = BaseComponent & {
|
|
23
21
|
id: string;
|
|
24
22
|
};
|
|
25
23
|
export type UpdateComponent = (id: string, update: (component: StepComponent) => void) => void;
|
|
26
24
|
export type OnAction = (action: Action) => void;
|
|
25
|
+
export type Align = 'start' | 'center' | 'end';
|
|
26
|
+
export type Bias = 'none' | 'start' | 'end';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { AlertComponent } from '../../domain/components/AlertComponent';
|
|
2
|
-
import { AlertRendererProps } from '../types';
|
|
3
|
-
export declare const alertComponentToProps: ({
|
|
1
|
+
import type { AlertComponent } from '../../domain/components/AlertComponent';
|
|
2
|
+
import type { AlertRendererProps } from '../types';
|
|
3
|
+
export declare const alertComponentToProps: ({ markdown, margin, context, }: AlertComponent) => AlertRendererProps;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { BoxComponent } from '../../domain/components/BoxComponent';
|
|
3
|
-
import { BoxRendererProps } from '../types';
|
|
4
|
-
export declare const boxComponentToProps: ({
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { BoxComponent } from '../../domain/components/BoxComponent';
|
|
3
|
+
import type { BoxRendererProps } from '../types';
|
|
4
|
+
export declare const boxComponentToProps: ({ border, width, margin }: BoxComponent, children: ReactNode) => BoxRendererProps;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ButtonComponent } from '../../domain/components/ButtonComponent';
|
|
2
|
-
import { ButtonRendererProps } from '../types';
|
|
1
|
+
import type { ButtonComponent } from '../../domain/components/ButtonComponent';
|
|
2
|
+
import type { ButtonRendererProps } from '../types';
|
|
3
3
|
export declare const buttonComponentToProps: (component: ButtonComponent) => ButtonRendererProps;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { ColumnsRendererProps } from '../types';
|
|
3
|
+
import type { ColumnsComponent } from '../../domain/components/ColumnsComponent';
|
|
4
|
+
export declare const columnsComponentToProps: ({ bias, control, margin }: ColumnsComponent, startChildren: ReactNode, endChildren: ReactNode) => ColumnsRendererProps;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { StepComponent } from '../../domain/types';
|
|
3
|
-
import { RendererProps } from '../types';
|
|
4
|
-
export declare const componentToRendererProps: (component: StepComponent,
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { StepComponent } from '../../domain/types';
|
|
3
|
+
import type { RendererProps } from '../types';
|
|
4
|
+
export declare const componentToRendererProps: (component: StepComponent, nestedContent: {
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
startChildren?: ReactNode;
|
|
7
|
+
endChildren?: ReactNode;
|
|
8
|
+
}) => RendererProps;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { HeadingComponent } from '../../domain/components/HeadingComponent';
|
|
2
|
-
import { HeadingRendererProps } from '../types';
|
|
3
|
-
export declare const headingComponentToProps: ({
|
|
1
|
+
import type { HeadingComponent } from '../../domain/components/HeadingComponent';
|
|
2
|
+
import type { HeadingRendererProps } from '../types';
|
|
3
|
+
export declare const headingComponentToProps: ({ text, align, margin, size, }: HeadingComponent) => HeadingRendererProps;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { ObjectComponent } from '../../domain/components/ObjectComponent';
|
|
3
|
-
import { ObjectRendererProps } from '../types';
|
|
4
|
-
export declare const objectComponentToProps: ({
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { ObjectComponent } from '../../domain/components/ObjectComponent';
|
|
3
|
+
import type { ObjectRendererProps } from '../types';
|
|
4
|
+
export declare const objectComponentToProps: ({ title, description }: ObjectComponent, children: ReactNode) => ObjectRendererProps;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ParagraphComponent } from '../../domain/components/ParagraphComponent';
|
|
2
|
-
import { ParagraphRendererProps } from '../types';
|
|
3
|
-
export declare const paragraphComponentToProps: ({
|
|
1
|
+
import type { ParagraphComponent } from '../../domain/components/ParagraphComponent';
|
|
2
|
+
import type { ParagraphRendererProps } from '../types';
|
|
3
|
+
export declare const paragraphComponentToProps: ({ text, control, align, margin, }: ParagraphComponent) => ParagraphRendererProps;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { TextInputComponent } from '../../domain/components/TextInputComponent';
|
|
2
|
-
import { TextInputRendererProps } from '../types';
|
|
3
|
-
export declare const textComponentToProps: ({
|
|
1
|
+
import type { TextInputComponent } from '../../domain/components/TextInputComponent';
|
|
2
|
+
import type { TextInputRendererProps } from '../types';
|
|
3
|
+
export declare const textComponentToProps: ({ format, errors, id, title, description, placeholder, value, onChange, }: TextInputComponent) => TextInputRendererProps;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { Context as DFContext, Margin as DFMargin, Size as DFSize } from '@wise/dynamic-flow-types';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import type { Context as DFContext, Margin as DFMargin, Size as DFSize } from '@wise/dynamic-flow-types';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
3
|
export type Renderer<P extends RendererProps> = {
|
|
4
4
|
canRender: (props: RendererProps) => boolean;
|
|
5
|
-
render: (props: P) =>
|
|
5
|
+
render: (props: P) => JSX.Element;
|
|
6
6
|
};
|
|
7
7
|
export type Align = 'start' | 'center' | 'end';
|
|
8
|
-
export type
|
|
8
|
+
export type Bias = 'none' | 'start' | 'end';
|
|
9
9
|
export type Context = DFContext;
|
|
10
|
+
export type Margin = DFMargin;
|
|
10
11
|
export type Size = DFSize;
|
|
11
12
|
export interface RendererProps {
|
|
12
13
|
type: string;
|
|
13
|
-
keyProp: string;
|
|
14
14
|
}
|
|
15
15
|
export interface AlertRendererProps extends RendererProps {
|
|
16
16
|
type: 'alert';
|
|
@@ -25,6 +25,14 @@ export interface BoxRendererProps extends RendererProps {
|
|
|
25
25
|
margin: Margin;
|
|
26
26
|
children: ReactNode;
|
|
27
27
|
}
|
|
28
|
+
export interface ColumnsRendererProps extends RendererProps {
|
|
29
|
+
type: 'columns';
|
|
30
|
+
control?: string;
|
|
31
|
+
bias: Bias;
|
|
32
|
+
margin: Margin;
|
|
33
|
+
startChildren: ReactNode;
|
|
34
|
+
endChildren: ReactNode;
|
|
35
|
+
}
|
|
28
36
|
export interface HeadingRendererProps extends RendererProps {
|
|
29
37
|
type: 'heading';
|
|
30
38
|
text: string;
|
|
@@ -36,7 +44,7 @@ export interface HeadingRendererProps extends RendererProps {
|
|
|
36
44
|
export interface ParagraphRendererProps extends RendererProps {
|
|
37
45
|
type: 'paragraph';
|
|
38
46
|
text: string;
|
|
39
|
-
control?:
|
|
47
|
+
control?: string;
|
|
40
48
|
margin: Margin;
|
|
41
49
|
align: Align;
|
|
42
50
|
}
|
|
@@ -48,20 +56,21 @@ export interface ObjectRendererProps extends RendererProps {
|
|
|
48
56
|
}
|
|
49
57
|
export interface TextInputRendererProps extends RendererProps {
|
|
50
58
|
type: 'input-text';
|
|
51
|
-
control?: 'password' | 'textarea' | 'email' | 'numeric' | 'phone-number' | 'date-lookup' | string;
|
|
52
|
-
format: 'text' | 'date';
|
|
53
59
|
id: string;
|
|
54
|
-
|
|
55
|
-
label?: string;
|
|
60
|
+
control?: string;
|
|
56
61
|
description?: string;
|
|
62
|
+
error?: string;
|
|
63
|
+
format?: 'date';
|
|
64
|
+
label?: string;
|
|
65
|
+
name: string;
|
|
57
66
|
placeholder?: string;
|
|
58
|
-
value
|
|
59
|
-
onChange: (value: string |
|
|
67
|
+
value: string | null;
|
|
68
|
+
onChange: (value: string | null) => void;
|
|
60
69
|
}
|
|
61
70
|
export interface ButtonRendererProps extends RendererProps {
|
|
62
71
|
type: 'button';
|
|
63
72
|
title: string;
|
|
64
|
-
control?:
|
|
73
|
+
control?: string;
|
|
65
74
|
context: Context;
|
|
66
75
|
disabled: boolean;
|
|
67
76
|
margin: Margin;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Step as DFStep } from '@wise/dynamic-flow-types';
|
|
2
|
-
import { Renderer, RendererProps } from '../renderers/types';
|
|
1
|
+
import type { Step as DFStep } from '@wise/dynamic-flow-types';
|
|
2
|
+
import type { Renderer, RendererProps } from '../renderers/types';
|
|
3
3
|
type StepProps = {
|
|
4
4
|
step: DFStep;
|
|
5
5
|
renderers: Renderer<RendererProps>[];
|
|
6
6
|
};
|
|
7
|
-
declare
|
|
7
|
+
declare function Step({ step: dfStep, renderers }: StepProps): JSX.Element;
|
|
8
8
|
export default Step;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Schema } from '@wise/dynamic-flow-types';
|
|
2
|
+
import type { IntlFormatters } from 'react-intl';
|
|
3
|
+
import type { ErrorMessageFunctions } from '../../domain/mappers/types';
|
|
4
|
+
export declare function getSchemaErrorMessageFunction(formatMessage: IntlFormatters['formatMessage'], locale: string): (validationMessages: Schema['validationMessages']) => ErrorMessageFunctions;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { StepComponent } from '../domain/types';
|
|
1
|
+
import type { StepComponent } from '../domain/types';
|
|
2
2
|
export declare const findComponent: (components: StepComponent[], id: string) => StepComponent | undefined;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { Model } from '@wise/dynamic-flow-types';
|
|
2
|
-
import { StepComponent } from '../domain/types';
|
|
1
|
+
import type { Model } from '@wise/dynamic-flow-types';
|
|
2
|
+
import type { StepComponent } from '../domain/types';
|
|
3
3
|
export declare const getSubmittableData: (components: StepComponent[]) => Model;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { Model } from '@wise/dynamic-flow-types';
|
|
2
|
-
import { ContainerComponent, StepComponent } from '../domain/types';
|
|
1
|
+
import type { Model } from '@wise/dynamic-flow-types';
|
|
2
|
+
import type { ContainerComponent, StepComponent } from '../domain/types';
|
|
3
|
+
import type { ColumnsComponent } from '../domain/components/ColumnsComponent';
|
|
3
4
|
export declare const isContainerComponent: (component: StepComponent) => component is ContainerComponent;
|
|
5
|
+
export declare const isColumnsComponent: (component: StepComponent) => component is ColumnsComponent;
|
|
4
6
|
export declare const isObjectModel: (model: Model) => model is Record<string, Model>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Align, Size } from '../../../renderers/types';
|
|
1
|
+
import type { Align, Size } from '../../../renderers/types';
|
|
2
2
|
declare const getMargin: (size: Size) => "" | "m-b-0" | "m-b-1" | "m-b-2" | "m-b-3" | "m-b-5";
|
|
3
3
|
declare const getTextAlignmentAndMargin: (component: {
|
|
4
4
|
align: Align;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wise/dynamic-flow-client",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.8.0",
|
|
4
4
|
"description": "Dynamic Flow web client",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "./build/main.min.js",
|
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"@babel/core": "7.23.3",
|
|
22
22
|
"@babel/plugin-syntax-flow": "7.23.3",
|
|
23
|
-
"@babel/plugin-transform-react-jsx": "7.
|
|
23
|
+
"@babel/plugin-transform-react-jsx": "7.23.4",
|
|
24
24
|
"@babel/preset-env": "7.23.3",
|
|
25
25
|
"@babel/preset-react": "7.23.3",
|
|
26
26
|
"@babel/preset-typescript": "7.23.3",
|
|
27
27
|
"@cfaester/enzyme-adapter-react-18": "0.7.1",
|
|
28
|
-
"@formatjs/cli": "^6.2.
|
|
28
|
+
"@formatjs/cli": "^6.2.4",
|
|
29
29
|
"@storybook/addon-a11y": "7.5.3",
|
|
30
30
|
"@storybook/addon-actions": "7.5.3",
|
|
31
31
|
"@storybook/addon-essentials": "7.5.3",
|
|
@@ -36,29 +36,27 @@
|
|
|
36
36
|
"@storybook/testing-library": "0.2.2",
|
|
37
37
|
"@testing-library/dom": "9.3.3",
|
|
38
38
|
"@testing-library/jest-dom": "6.1.4",
|
|
39
|
-
"@testing-library/react": "14.1.
|
|
39
|
+
"@testing-library/react": "14.1.2",
|
|
40
40
|
"@testing-library/react-hooks": "8.0.1",
|
|
41
41
|
"@testing-library/user-event": "14.5.1",
|
|
42
|
-
"@transferwise/components": "45.
|
|
43
|
-
"@transferwise/eslint-config": "8.2.0",
|
|
42
|
+
"@transferwise/components": "45.21.3",
|
|
44
43
|
"@transferwise/formatting": "^2.10.0",
|
|
45
44
|
"@transferwise/icons": "3.12.0",
|
|
46
|
-
"@transferwise/neptune-css": "14.
|
|
45
|
+
"@transferwise/neptune-css": "14.7.0",
|
|
47
46
|
"@transferwise/neptune-tokens": "8.7.0",
|
|
48
47
|
"@types/enzyme": "^3.10.16",
|
|
49
|
-
"@types/jest": "29.5.
|
|
48
|
+
"@types/jest": "29.5.10",
|
|
50
49
|
"@types/react": "18",
|
|
51
50
|
"@types/react-dom": "18",
|
|
51
|
+
"@types/react-intl": "3.0.0",
|
|
52
52
|
"@types/testing-library__jest-dom": "5.14.9",
|
|
53
53
|
"@wise/art": "2.8.4",
|
|
54
54
|
"@wise/components-theming": "^0.8.4",
|
|
55
|
-
"@wise/forms": "0.2.
|
|
55
|
+
"@wise/forms": "0.2.3",
|
|
56
56
|
"babel-jest": "29.7.0",
|
|
57
57
|
"currency-flags": "4.0.7",
|
|
58
58
|
"enzyme": "^3.11.0",
|
|
59
59
|
"esbuild": "0.19.5",
|
|
60
|
-
"eslint": "8.53.0",
|
|
61
|
-
"eslint-plugin-storybook": "0.6.15",
|
|
62
60
|
"immer": "10.0.3",
|
|
63
61
|
"jest": "29.7.0",
|
|
64
62
|
"jest-environment-jsdom": "29.7.0",
|
|
@@ -68,10 +66,9 @@
|
|
|
68
66
|
"postcss": "^8.4.31",
|
|
69
67
|
"postcss-cli": "^10.1.0",
|
|
70
68
|
"postcss-import": "^15.1.0",
|
|
71
|
-
"prettier": "3.1.0",
|
|
72
69
|
"react": "18.2.0",
|
|
73
70
|
"react-dom": "18.2.0",
|
|
74
|
-
"react-intl": "6.5.
|
|
71
|
+
"react-intl": "6.5.5",
|
|
75
72
|
"storybook": "7.5.3",
|
|
76
73
|
"stylelint": "14.16.1",
|
|
77
74
|
"stylelint-config-standard": "25.0.0",
|
|
@@ -94,21 +91,20 @@
|
|
|
94
91
|
"classnames": "2.3.2",
|
|
95
92
|
"react-webcam": "^7.2.0",
|
|
96
93
|
"screenfull": "^5.2.0",
|
|
97
|
-
"@wise/dynamic-flow-types": "2.
|
|
94
|
+
"@wise/dynamic-flow-types": "2.4.0"
|
|
98
95
|
},
|
|
99
|
-
"prettier": "@transferwise/eslint-config/.prettierrc.js",
|
|
100
96
|
"scripts": {
|
|
101
97
|
"dev": "storybook dev -p 3003",
|
|
102
98
|
"build": "rm -rf build && npm-run-all build:*",
|
|
103
99
|
"build:types": "tsc --project ./tsconfig.types.json",
|
|
104
100
|
"build:js": "node ./scripts/build.mjs",
|
|
105
101
|
"build:css": "postcss src/main.css -o build/main.css",
|
|
106
|
-
"build:messages-source": "formatjs extract 'src
|
|
102
|
+
"build:messages-source": "formatjs extract 'src/**/{*.messages,messages}.{js,ts}' --out-file src/i18n/en.json --format simple && prettier --find-config-path --write src/i18n/*.json",
|
|
107
103
|
"build:compiled-messages": "mkdir -p build/i18n && cp src/i18n/*.json build/i18n",
|
|
108
104
|
"test": "npm-run-all test:once test:tz",
|
|
109
105
|
"test:once": "jest --config jest.config.js --env=jsdom -w 2",
|
|
110
106
|
"test:coverage": "jest --config jest.config.js --env=jsdom --coverage",
|
|
111
|
-
"test:tz": "TZ=US/Pacific jest ./src/jsonSchemaForm/basicTypeSchema/BasicTypeSchema.errors.spec.
|
|
107
|
+
"test:tz": "TZ=US/Pacific jest ./src/legacy/jsonSchemaForm/basicTypeSchema/BasicTypeSchema.errors.spec.jsx ./src/legacy/formControl/FormControl.spec.jsx",
|
|
112
108
|
"test:watch": "pnpm test:once --watch",
|
|
113
109
|
"types": "pnpm tsc",
|
|
114
110
|
"lint": "npm-run-all lint:ts lint:css",
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export type EventName = 'Dynamic Flow - Flow Started' | 'Dynamic Flow - Flow Finished' | 'Dynamic Flow - Step Started' | 'Dynamic Flow - Step Submitted' | 'Dynamic Flow - Step Refreshed' | 'Dynamic Flow - OneOf Selected' | 'Dynamic Flow - PersistAsync' | 'Dynamic Flow - ValidationAsync' | 'Dynamic Flow - Camera Permission Denied' | 'Dynamic Flow - Camera Feed Started' | 'Dynamic Flow - Camera Not Supported' | 'Dynamic Flow - Search Started' | 'Dynamic Flow - Search Result Selected' | 'Dynamic Flow - invalid submission response' | 'Dynamic Flow - onAction supressed' | 'Dynamic Flow - OneOf Searched';
|
|
3
|
-
export type EventHandler = (eventName: EventName, properties: Record<string, unknown>) => void;
|
|
4
|
-
type Props = {
|
|
5
|
-
metadata?: Record<string, unknown> & {
|
|
6
|
-
flowId?: string;
|
|
7
|
-
stepId?: string;
|
|
8
|
-
};
|
|
9
|
-
children: React.ReactNode;
|
|
10
|
-
onEvent: EventHandler;
|
|
11
|
-
};
|
|
12
|
-
export declare const EventsContextProvider: ({ metadata, children, onEvent }: Props) => JSX.Element;
|
|
13
|
-
export declare function useEventDispatcher(): EventHandler;
|
|
14
|
-
export declare const getEventDispatcher: (onEvent: EventHandler, metadata?: Record<string, unknown>) => EventHandler;
|
|
15
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { Feature } from '../../../dynamicFlow/DynamicFlowTypes';
|
|
3
|
-
import { FeatureName } from '../../constants/FeatureName';
|
|
4
|
-
type FeatureContextProviderProps = {
|
|
5
|
-
features: Feature[] | undefined;
|
|
6
|
-
children: React.ReactNode;
|
|
7
|
-
};
|
|
8
|
-
export declare const FeatureContextProvider: ({ features, children }: FeatureContextProviderProps) => JSX.Element;
|
|
9
|
-
export declare const useFeatureFlag: (featureName: FeatureName) => Feature | undefined;
|
|
10
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Action } from '@wise/dynamic-flow-types';
|
|
2
|
-
import { OnAction } from './DynamicFlowTypes';
|
|
3
|
-
type BackButtonProps = {
|
|
4
|
-
title?: string;
|
|
5
|
-
action: Action;
|
|
6
|
-
onAction: OnAction;
|
|
7
|
-
};
|
|
8
|
-
declare const BackButton: ({ title, action, onAction }: BackButtonProps) => JSX.Element;
|
|
9
|
-
export default BackButton;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { GlobalError, Step } from '@wise/dynamic-flow-types';
|
|
2
|
-
import { LayoutStepProps } from '../step/layoutStep/LayoutStep';
|
|
3
|
-
type DynamicFlowStepProps = Omit<LayoutStepProps, 'stepSpecification'> & {
|
|
4
|
-
step: Step | undefined;
|
|
5
|
-
globalError: GlobalError;
|
|
6
|
-
};
|
|
7
|
-
export declare const DynamicFlowStep: (props: DynamicFlowStepProps) => JSX.Element | null;
|
|
8
|
-
export {};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { Schema } from '@wise/dynamic-flow-types';
|
|
2
|
-
import { ETag } from '../../DynamicFlowTypes';
|
|
3
|
-
type FetchRefresh = (url: string, data: unknown, etag: ETag | undefined) => Promise<void | null>;
|
|
4
|
-
export declare function useDebouncedRefresh(fetchRefresh: FetchRefresh): (url: string, data: unknown, etag: ETag | undefined, schema: Schema) => void;
|
|
5
|
-
export declare const shouldDebounceSchema: (schema: Schema) => boolean;
|
|
6
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { AllOfSchema as AllOfSchemaType, ObjectModel } from '@wise/dynamic-flow-types';
|
|
2
|
-
import { GenericSchemaProps } from '../genericSchema/GenericSchema';
|
|
3
|
-
declare const AllOfSchema: {
|
|
4
|
-
(props: AllOfSchemaProps): JSX.Element;
|
|
5
|
-
defaultProps: {
|
|
6
|
-
disabled: boolean;
|
|
7
|
-
};
|
|
8
|
-
};
|
|
9
|
-
export type AllOfSchemaProps = Omit<GenericSchemaProps, 'schema' | 'model'> & {
|
|
10
|
-
schema: AllOfSchemaType;
|
|
11
|
-
model: ObjectModel;
|
|
12
|
-
};
|
|
13
|
-
export default AllOfSchema;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { ArrayModel, MultipleFileUploadSchema as MultipleFileUploadSchemaType } from '@wise/dynamic-flow-types';
|
|
2
|
-
import { GenericSchemaProps } from '../../../genericSchema/GenericSchema';
|
|
3
|
-
declare const MultipleFileUploadSchema: {
|
|
4
|
-
(props: Props): JSX.Element;
|
|
5
|
-
defaultProps: {
|
|
6
|
-
errors: null;
|
|
7
|
-
required: boolean;
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
type Props = Omit<GenericSchemaProps, 'model'> & {
|
|
11
|
-
schema: MultipleFileUploadSchemaType;
|
|
12
|
-
model: ArrayModel | null;
|
|
13
|
-
required?: boolean;
|
|
14
|
-
errors?: string | null;
|
|
15
|
-
};
|
|
16
|
-
export default MultipleFileUploadSchema;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { ObjectModel, ObjectSchema as ObjectSchemaType } from '@wise/dynamic-flow-types';
|
|
2
|
-
import { GenericSchemaProps } from '../genericSchema/GenericSchema';
|
|
3
|
-
declare const ObjectSchema: {
|
|
4
|
-
(props: ObjectSchemaProps): JSX.Element;
|
|
5
|
-
defaultProps: {
|
|
6
|
-
hideTitle: boolean;
|
|
7
|
-
disabled: boolean;
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
export type ObjectSchemaProps = GenericSchemaProps & {
|
|
11
|
-
schema: ObjectSchemaType;
|
|
12
|
-
model: ObjectModel | null;
|
|
13
|
-
hideTitle?: boolean;
|
|
14
|
-
};
|
|
15
|
-
export default ObjectSchema;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { OneOfSchema as OneOfSchemaType } from '@wise/dynamic-flow-types';
|
|
2
|
-
import { GenericSchemaProps } from '../genericSchema/GenericSchema';
|
|
3
|
-
declare const OneOfSchema: {
|
|
4
|
-
(props: OneOfSchemaProps): JSX.Element | null;
|
|
5
|
-
defaultProps: {
|
|
6
|
-
required: boolean;
|
|
7
|
-
disabled: boolean;
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
export type OneOfSchemaProps = Omit<GenericSchemaProps, 'schema'> & {
|
|
11
|
-
schema: OneOfSchemaType;
|
|
12
|
-
required?: boolean;
|
|
13
|
-
};
|
|
14
|
-
export default OneOfSchema;
|