@wise/dynamic-flow-client 3.0.0-next-9cca10.3 → 3.0.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/de.json +7 -2
- package/build/i18n/en.json +7 -2
- package/build/i18n/es.json +7 -2
- package/build/i18n/fr.json +7 -2
- package/build/i18n/hu.json +8 -3
- package/build/i18n/id.json +7 -2
- package/build/i18n/it.json +7 -2
- package/build/i18n/ja.json +6 -1
- package/build/i18n/pl.json +7 -2
- package/build/i18n/pt.json +8 -3
- package/build/i18n/ro.json +7 -2
- package/build/i18n/ru.json +7 -2
- package/build/i18n/th.json +8 -3
- package/build/i18n/tr.json +8 -3
- package/build/i18n/zh_CN.json +24 -19
- package/build/i18n/zh_HK.json +7 -2
- package/build/main.css +17 -18
- package/build/main.js +2471 -1854
- package/build/main.min.js +8 -1
- package/build/types/common/errorBoundary/ErrorBoundaryAlert.d.ts +5 -0
- package/build/types/common/{contexts/httpClientContext → httpClientContext}/HttpClientContext.d.ts +3 -3
- package/build/types/common/httpClientContext/index.d.ts +1 -0
- package/build/types/common/makeHttpClient/makeHttpClient.d.ts +1 -0
- package/build/types/{step/cameraStep/cameraCapture/screens/NoCameraAccess/NoCameraAccess.messages.d.ts → common/messages/generic-error.messages.d.ts} +3 -3
- package/build/types/{dynamicFlow/utils/errorBoundary/ErrorBoundary.messages.d.ts → common/messages/help.messages.d.ts} +1 -6
- package/build/types/{step/cameraStep/cameraCapture/screens/CameraNotSupported/CameraNotSupported.messages.d.ts → common/messages/validation.array.messages.d.ts} +2 -2
- package/build/types/common/utils/api-utils.d.ts +0 -3
- package/build/types/index.d.ts +7 -7
- package/build/types/legacy/common/constants/FeatureName.d.ts +3 -0
- package/build/types/{common → legacy/common}/constants/FormControlType.d.ts +2 -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/index.d.ts +0 -1
- 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/legacy/common/utils/api-utils.d.ts +2 -0
- 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/index.d.ts +1 -0
- package/build/types/{common → legacy/common}/utils/misc-utils.d.ts +1 -1
- package/build/types/legacy/common/utils/mobile-utils.d.ts +4 -0
- 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/dynamic-flow-types.d.ts +57 -0
- 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/{formControl → legacy/formControl}/FormControl.d.ts +14 -14
- package/build/types/legacy/formControl/utils/getAutocompleteString.d.ts +2 -0
- package/build/types/legacy/formControl/utils/index.d.ts +2 -0
- package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/JsonSchemaForm.d.ts +5 -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/ItemSummary.d.ts +3 -3
- package/build/types/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/RepeatableSchema.d.ts +8 -0
- package/build/types/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/RepeatableSchemaStep.d.ts +14 -0
- package/build/types/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/utils/summary-utils.d.ts +3 -0
- 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/{jsonSchemaForm → legacy/jsonSchemaForm}/help/Help.d.ts +1 -1
- 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/{jsonSchemaForm → legacy/jsonSchemaForm}/oneOfSchema/utils.d.ts +1 -1
- 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/legacy/jsonSchemaForm/schemaFormControl/SchemaFormControl.d.ts +27 -0
- package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/schemaFormControl/utils/mapping-utils.d.ts +5 -4
- 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/button/DynamicButton.d.ts +7 -0
- package/build/types/{layout → legacy/layout}/button/utils.d.ts +1 -1
- 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/{layout → legacy/layout}/icon/DynamicIcon.d.ts +1 -1
- package/build/types/{layout → legacy/layout}/icon/FlagIcon.d.ts +1 -1
- package/build/types/{layout → legacy/layout}/icon/NamedIcon.d.ts +1 -1
- 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/paragraph/DynamicParagraph.d.ts +6 -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/legacy/layout/search/SearchResults.d.ts +10 -0
- package/build/types/{layout → legacy/layout}/search/useSearch.d.ts +2 -2
- package/build/types/{layout → legacy/layout}/utils/index.d.ts +1 -1
- 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/index.d.ts +3 -0
- package/build/types/legacy/step/cameraStep/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.d.ts +2 -0
- package/build/types/legacy/step/cameraStep/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.messages.d.ts +8 -0
- package/build/types/legacy/step/cameraStep/cameraCapture/hooks/useFullScreenOrientationLock.d.ts +5 -0
- 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/DynamicFlowCore.d.ts +6 -0
- package/build/types/revamp/DynamicFlowWise.d.ts +3 -0
- package/build/types/revamp/domain/components/AlertComponent.d.ts +7 -0
- package/build/types/revamp/domain/components/AllOfComponent.d.ts +18 -0
- package/build/types/revamp/domain/components/BooleanInputComponent.d.ts +15 -0
- package/build/types/revamp/domain/components/BoxComponent.d.ts +10 -0
- package/build/types/revamp/domain/components/ButtonComponent.d.ts +12 -0
- package/build/types/revamp/domain/components/ColumnsComponent.d.ts +9 -0
- package/build/types/revamp/domain/components/ConstComponent.d.ts +10 -0
- package/build/types/revamp/domain/components/ContainerComponent.d.ts +11 -0
- package/build/types/revamp/domain/components/DateInputComponent.d.ts +17 -0
- package/build/types/revamp/domain/components/DecisionComponent.d.ts +15 -0
- package/build/types/revamp/domain/components/DividerComponent.d.ts +5 -0
- package/build/types/revamp/domain/components/FormComponent.d.ts +7 -0
- package/build/types/revamp/domain/components/HeadingComponent.d.ts +9 -0
- package/build/types/revamp/domain/components/ImageComponent.d.ts +9 -0
- package/build/types/revamp/domain/components/InstructionsComponent.d.ts +11 -0
- package/build/types/revamp/domain/components/IntegerInputComponent.d.ts +15 -0
- package/build/types/revamp/domain/components/LoadingIndicatorComponent.d.ts +8 -0
- package/build/types/revamp/domain/components/MarkdownComponent.d.ts +7 -0
- package/build/types/revamp/domain/components/ModalComponent.d.ts +12 -0
- package/build/types/revamp/domain/components/MultiUploadInputComponent.d.ts +21 -0
- package/build/types/revamp/domain/components/NumberInputComponent.d.ts +15 -0
- package/build/types/revamp/domain/components/ObjectComponent.d.ts +13 -0
- package/build/types/revamp/domain/components/ParagraphComponent.d.ts +7 -0
- package/build/types/revamp/domain/components/ReviewComponent.d.ts +17 -0
- package/build/types/revamp/domain/components/SelectInputComponent.d.ts +35 -0
- package/build/types/revamp/domain/components/StatusListComponent.d.ts +8 -0
- package/build/types/revamp/domain/components/TextInputComponent.d.ts +16 -0
- package/build/types/revamp/domain/components/UploadInputComponent.d.ts +18 -0
- package/build/types/revamp/domain/components/repeatableComponent/RepeatableComponent.d.ts +27 -0
- package/build/types/revamp/domain/components/searchComponent/SearchComponent.d.ts +25 -0
- package/build/types/revamp/domain/components/utils/component-utils.d.ts +12 -0
- package/build/types/revamp/domain/components/utils/debounce.d.ts +6 -0
- package/build/types/revamp/domain/components/utils/file-utils.d.ts +1 -0
- package/build/types/revamp/domain/components/utils/isPartialLocalValueMatch.d.ts +2 -0
- package/build/types/revamp/domain/features/events/getAnalyticsEventDispatcher.d.ts +9 -0
- package/build/types/revamp/domain/features/events/getLogggingEventDispatcher.d.ts +4 -0
- package/build/types/revamp/domain/features/events/index.d.ts +2 -0
- package/build/types/revamp/domain/features/persistAsync/getComponentPersistAsync.d.ts +21 -0
- package/build/types/revamp/domain/features/persistAsync/getPerformPersistAsync.d.ts +23 -0
- package/build/types/revamp/domain/features/persistAsync/persist-async-utils.d.ts +3 -0
- package/build/types/revamp/domain/features/refresh/getPerformRefresh.d.ts +5 -0
- package/build/types/revamp/domain/features/search/getPerformSearchFunction.d.ts +3 -0
- package/build/types/revamp/domain/features/summary/summary-utils.d.ts +32 -0
- package/build/types/revamp/domain/features/validation/spec-utils.d.ts +16 -0
- package/build/types/revamp/domain/features/validation/validation-functions.d.ts +7 -0
- package/build/types/revamp/domain/features/validation/value-checks.d.ts +18 -0
- package/build/types/revamp/domain/mappers/layout/alertLayoutToComponent.d.ts +2 -0
- package/build/types/revamp/domain/mappers/layout/boxLayoutToComponents.d.ts +4 -0
- package/build/types/revamp/domain/mappers/layout/buttonLayoutToComponent.d.ts +3 -0
- package/build/types/revamp/domain/mappers/layout/columnsLayoutToComponent.d.ts +4 -0
- package/build/types/revamp/domain/mappers/layout/decisionLayoutToComponent.d.ts +3 -0
- package/build/types/revamp/domain/mappers/layout/dividerLayoutToComponent.d.ts +2 -0
- package/build/types/revamp/domain/mappers/layout/formLayoutToComponent.d.ts +4 -0
- package/build/types/revamp/domain/mappers/layout/headingLayoutToComponent.d.ts +2 -0
- package/build/types/revamp/domain/mappers/layout/imageLayoutToComponent.d.ts +2 -0
- package/build/types/revamp/domain/mappers/layout/infoLayoutToComponent.d.ts +2 -0
- package/build/types/revamp/domain/mappers/layout/instructionsLayoutToComponent.d.ts +2 -0
- package/build/types/revamp/domain/mappers/layout/listLayoutToComponent.d.ts +2 -0
- package/build/types/revamp/domain/mappers/layout/loadingIndicatorLayoutToComponent.d.ts +2 -0
- package/build/types/revamp/domain/mappers/layout/markdownLayoutToComponent.d.ts +2 -0
- package/build/types/revamp/domain/mappers/layout/modalLayoutToComponent.d.ts +3 -0
- package/build/types/revamp/domain/mappers/layout/paragraphLayoutToComponent.d.ts +2 -0
- package/build/types/revamp/domain/mappers/layout/reviewLayoutToComponent.d.ts +3 -0
- package/build/types/revamp/domain/mappers/layout/searchLayoutToComponent.d.ts +3 -0
- package/build/types/revamp/domain/mappers/layout/statusListLayoutToComponent.d.ts +2 -0
- package/build/types/revamp/domain/mappers/mapLayoutToComponent.d.ts +4 -0
- package/build/types/revamp/domain/mappers/mapSchemaToComponent.d.ts +3 -0
- package/build/types/revamp/domain/mappers/mapStepToComponents.d.ts +6 -0
- package/build/types/revamp/domain/mappers/schema/allOfSchemaToComponent.d.ts +5 -0
- package/build/types/revamp/domain/mappers/schema/arraySchemaToComponent/arraySchemaToComponent.d.ts +5 -0
- package/build/types/revamp/domain/mappers/schema/arraySchemaToComponent/arraySchemaToMultiUploadComponent.d.ts +9 -0
- package/build/types/revamp/domain/mappers/schema/arraySchemaToComponent/arraySchemaToRepeatableComponent.d.ts +6 -0
- package/build/types/revamp/domain/mappers/schema/blobSchemaToComponent.d.ts +5 -0
- package/build/types/revamp/domain/mappers/schema/booleanSchemaToComponent.d.ts +5 -0
- package/build/types/revamp/domain/mappers/schema/constSchemaToComponent.d.ts +5 -0
- package/build/types/revamp/domain/mappers/schema/integerSchemaToComponent.d.ts +5 -0
- package/build/types/revamp/domain/mappers/schema/numberSchemaToComponent.d.ts +5 -0
- package/build/types/revamp/domain/mappers/schema/objectSchemaToComponent/objectSchemaToComponent.d.ts +5 -0
- package/build/types/revamp/domain/mappers/schema/oneOfSchemaToComponent/oneOfSchemaToComponent.d.ts +5 -0
- package/build/types/revamp/domain/mappers/schema/stringSchemaToComponent/stringSchemaToComponent.d.ts +5 -0
- package/build/types/revamp/domain/mappers/schema/stringSchemaToComponent/stringSchemaToDateInputComponent.d.ts +5 -0
- package/build/types/revamp/domain/mappers/schema/stringSchemaToComponent/stringSchemaToTextInputComponent.d.ts +5 -0
- package/build/types/revamp/domain/mappers/schema/stringSchemaToComponent/stringSchemaToUploadInputComponent.d.ts +5 -0
- package/build/types/revamp/domain/mappers/schema/tests/test-utils.d.ts +28 -0
- package/build/types/revamp/domain/mappers/schema/types.d.ts +25 -0
- package/build/types/revamp/domain/mappers/schema/utils/getPersistAsyncInitialState.d.ts +5 -0
- package/build/types/revamp/domain/mappers/schema/utils/mapCommonSchemaProps.d.ts +27 -0
- package/build/types/revamp/domain/mappers/types.d.ts +19 -0
- package/build/types/revamp/domain/mappers/utils/getAutocompleteString.d.ts +2 -0
- package/build/types/revamp/domain/mappers/utils/getRandomId.d.ts +1 -0
- package/build/types/revamp/domain/mappers/utils/legacy-utils.d.ts +7 -0
- package/build/types/revamp/domain/types.d.ts +88 -0
- package/build/types/revamp/flow/executeRefresh.d.ts +19 -0
- package/build/types/revamp/flow/executeSubmission.d.ts +20 -0
- package/build/types/revamp/flow/getResponseType.d.ts +10 -0
- package/build/types/revamp/flow/response-utils.d.ts +6 -0
- package/build/types/revamp/renderers/CoreContainerRenderer.d.ts +7 -0
- package/build/types/revamp/renderers/mappers/alertComponentToProps.d.ts +3 -0
- package/build/types/revamp/renderers/mappers/allOfComponentToProps.d.ts +4 -0
- package/build/types/revamp/renderers/mappers/booleanInputComponentToProps.d.ts +3 -0
- package/build/types/revamp/renderers/mappers/boxComponentToProps.d.ts +4 -0
- package/build/types/revamp/renderers/mappers/buttonComponentToProps.d.ts +3 -0
- package/build/types/revamp/renderers/mappers/columnsComponentToProps.d.ts +4 -0
- package/build/types/revamp/renderers/mappers/componentToRendererProps.d.ts +9 -0
- package/build/types/revamp/renderers/mappers/containerComponentToProps.d.ts +3 -0
- package/build/types/revamp/renderers/mappers/dateInputComponentToProps.d.ts +3 -0
- package/build/types/revamp/renderers/mappers/decisionComponentToProps.d.ts +3 -0
- package/build/types/revamp/renderers/mappers/dividerComponentToProps.d.ts +3 -0
- package/build/types/revamp/renderers/mappers/formComponentToProps.d.ts +4 -0
- package/build/types/revamp/renderers/mappers/headingComponentToProps.d.ts +3 -0
- package/build/types/revamp/renderers/mappers/hiddenComponentToProps.d.ts +2 -0
- package/build/types/revamp/renderers/mappers/imageComponentToProps.d.ts +3 -0
- package/build/types/revamp/renderers/mappers/instructionsComponentToProps.d.ts +3 -0
- package/build/types/revamp/renderers/mappers/integerInputComponentToProps.d.ts +3 -0
- package/build/types/revamp/renderers/mappers/loadingIndicatorComponentToProps.d.ts +3 -0
- package/build/types/revamp/renderers/mappers/markdownComponentToProps.d.ts +3 -0
- package/build/types/revamp/renderers/mappers/modalComponentToProps.d.ts +4 -0
- package/build/types/revamp/renderers/mappers/multiUploadInputComponentToProps.d.ts +3 -0
- package/build/types/revamp/renderers/mappers/numberInputComponentToProps.d.ts +3 -0
- package/build/types/revamp/renderers/mappers/objectComponentToProps.d.ts +4 -0
- package/build/types/revamp/renderers/mappers/paragraphComponentToProps.d.ts +3 -0
- package/build/types/revamp/renderers/mappers/repeatableComponentToProps.d.ts +4 -0
- package/build/types/revamp/renderers/mappers/reviewComponentToProps.d.ts +3 -0
- package/build/types/revamp/renderers/mappers/searchComponentToProps.d.ts +3 -0
- package/build/types/revamp/renderers/mappers/selectInputComponentToProps.d.ts +4 -0
- package/build/types/revamp/renderers/mappers/statusListComponentToProps.d.ts +3 -0
- package/build/types/revamp/renderers/mappers/textInputComponentToProps.d.ts +3 -0
- package/build/types/revamp/renderers/mappers/uploadInputComponentToProps.d.ts +3 -0
- package/build/types/revamp/renderers/mappers/utils/inputComponentToProps.d.ts +17 -0
- package/build/types/revamp/renderers/types.d.ts +314 -0
- package/build/types/revamp/step/Step.d.ts +22 -0
- package/build/types/revamp/step/utils/getRenderFunction.d.ts +3 -0
- package/build/types/revamp/step/utils/getSchemaErrorMessageFunction.d.ts +3 -0
- package/build/types/revamp/stories/utils/fixtureHttpClient.d.ts +2 -0
- package/build/types/revamp/stories/utils/mockSearchHandler.d.ts +1 -0
- package/build/types/revamp/test-utils/component-utils.d.ts +2 -0
- package/build/types/revamp/test-utils/step-utils.d.ts +2 -0
- package/build/types/revamp/types.d.ts +41 -0
- package/build/types/revamp/utils/component-utils.d.ts +6 -0
- package/build/types/revamp/utils/findComponent.d.ts +2 -0
- package/build/types/revamp/utils/type-utils.d.ts +41 -0
- package/build/types/revamp/utils/type-validators.d.ts +10 -0
- package/build/types/revamp/wise/renderers/AlertRenderer.d.ts +3 -0
- package/build/types/revamp/wise/renderers/BooleanInputRenderer.d.ts +3 -0
- package/build/types/revamp/wise/renderers/BoxRenderer.d.ts +3 -0
- package/build/types/revamp/wise/renderers/ButtonRenderer.d.ts +3 -0
- package/build/types/revamp/wise/renderers/ColumnsRenderer.d.ts +3 -0
- package/build/types/revamp/wise/renderers/DateInputRenderer.d.ts +3 -0
- package/build/types/revamp/wise/renderers/DecisionRenderer.d.ts +3 -0
- package/build/types/revamp/wise/renderers/DividerRenderer.d.ts +3 -0
- package/build/types/revamp/wise/renderers/FormRenderer.d.ts +3 -0
- package/build/types/revamp/wise/renderers/FormSectionRenderer.d.ts +3 -0
- package/build/types/revamp/wise/renderers/HeadingRenderer.d.ts +3 -0
- package/build/types/revamp/wise/renderers/ImageRenderer.d.ts +3 -0
- package/build/types/revamp/wise/renderers/InstructionsRenderer.d.ts +3 -0
- package/build/types/revamp/wise/renderers/IntegerInputRenderer.d.ts +3 -0
- package/build/types/revamp/wise/renderers/LoadingIndicatorRenderer.d.ts +3 -0
- package/build/types/revamp/wise/renderers/MarkdownRenderer.d.ts +3 -0
- package/build/types/revamp/wise/renderers/ModalRenderer.d.ts +3 -0
- package/build/types/revamp/wise/renderers/MultiUploadInputRenderer.d.ts +3 -0
- package/build/types/revamp/wise/renderers/NumberInputRenderer.d.ts +3 -0
- package/build/types/revamp/wise/renderers/ParagraphRenderer.d.ts +3 -0
- package/build/types/revamp/wise/renderers/RepeatableRenderer.d.ts +3 -0
- package/build/types/revamp/wise/renderers/ReviewRenderer.d.ts +3 -0
- package/build/types/revamp/wise/renderers/SearchRenderer.d.ts +15 -0
- package/build/types/revamp/wise/renderers/SelectInputRenderer/OptionMedia.d.ts +5 -0
- package/build/types/revamp/wise/renderers/SelectInputRenderer/RadioInputRendererComponent.d.ts +2 -0
- package/build/types/revamp/wise/renderers/SelectInputRenderer/SelectInputRenderer.d.ts +3 -0
- package/build/types/revamp/wise/renderers/SelectInputRenderer/SelectInputRendererComponent.d.ts +2 -0
- package/build/types/revamp/wise/renderers/SelectInputRenderer/SelectTriggerMedia.d.ts +5 -0
- package/build/types/revamp/wise/renderers/SelectInputRenderer/TabInputRendererComponent.d.ts +2 -0
- package/build/types/revamp/wise/renderers/StatusListRenderer.d.ts +4 -0
- package/build/types/revamp/wise/renderers/TextInputRenderer.d.ts +3 -0
- package/build/types/revamp/wise/renderers/UploadInputRenderer.d.ts +4 -0
- package/build/types/revamp/wise/renderers/components/FieldInput.d.ts +11 -0
- package/build/types/revamp/wise/renderers/components/Help.d.ts +4 -0
- package/build/types/revamp/wise/renderers/components/LabelContentWithHelp.d.ts +4 -0
- package/build/types/revamp/wise/renderers/components/UploadFieldInput.d.ts +11 -0
- package/build/types/revamp/wise/renderers/components/VariableDateInput.d.ts +9 -0
- package/build/types/revamp/wise/renderers/components/VariableTextInput.d.ts +10 -0
- package/build/types/revamp/wise/renderers/components/icon/DynamicIcon.d.ts +6 -0
- package/build/types/revamp/wise/renderers/components/icon/FlagIcon.d.ts +6 -0
- package/build/types/revamp/wise/renderers/components/icon/NamedIcon.d.ts +6 -0
- package/build/types/revamp/wise/renderers/components/icon/NavigationOptionMedia.d.ts +5 -0
- package/build/types/revamp/wise/renderers/getWiseRenderers.d.ts +1 -0
- package/build/types/revamp/wise/renderers/hooks/useSnackBarIfAvailable.d.ts +10 -0
- package/build/types/revamp/wise/renderers/utils/file-utils.d.ts +3 -0
- package/build/types/revamp/wise/renderers/utils/getRandomId.d.ts +1 -0
- package/build/types/revamp/wise/renderers/utils/input-utils.d.ts +1 -0
- package/build/types/revamp/wise/renderers/utils/layout-utils.d.ts +7 -0
- package/build/types/revamp/wise/renderers/utils/value-utils.d.ts +3 -0
- package/build/types/revamp/wise/renderers/validators/type-validators.d.ts +9 -0
- package/build/types/test-utils/NeptuneProviders.d.ts +5 -0
- package/build/types/test-utils/fetch-utils.d.ts +20 -0
- package/build/types/test-utils/rtl-utils.d.ts +2 -0
- package/package.json +65 -67
- package/build/types/common/contexts/eventsContext/EventsContext.d.ts +0 -15
- 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/DynamicFlowTypes.d.ts +0 -46
- 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/formControl/utils/index.d.ts +0 -1
- 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/arrayTypeSchema/arrayListSchema/repeatableSchema/RepeatableSchema.d.ts +0 -8
- package/build/types/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/RepeatableSchemaStep.d.ts +0 -14
- package/build/types/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/utils/summary-utils.d.ts +0 -3
- package/build/types/jsonSchemaForm/help/Help.messages.d.ts +0 -8
- 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/PersistAsyncSchema.messages.d.ts +0 -8
- 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/schemaFormControl/SchemaFormControl.d.ts +0 -23
- package/build/types/jsonSchemaForm/schemaFormControl/utils/control-type-utils.d.ts +0 -2
- package/build/types/jsonSchemaForm/validationAsyncSchema/ValidationAsyncSchema.d.ts +0 -15
- package/build/types/layout/button/DynamicButton.d.ts +0 -7
- 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/paragraph/DynamicParagraph.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/layout/search/SearchResults.d.ts +0 -10
- 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/screens/CameraNotSupported/CameraNotSupported.d.ts +0 -2
- package/build/types/step/cameraStep/cameraCapture/screens/NoCameraAccess/NoCameraAccess.d.ts +0 -5
- 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/{jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/MultipleFileUploadSchema.messages.d.ts → common/messages/multi-file-upload.messages.d.ts} +0 -0
- /package/build/types/{layout/paragraph/DynamicParagraph.messages.d.ts → common/messages/paragraph.messages.d.ts} +0 -0
- /package/build/types/{jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/RepeatableSchema.messages.d.ts → common/messages/repeatable.messages.d.ts} +0 -0
- /package/build/types/{jsonSchemaForm/controlFeedback/ControlFeedback.messages.d.ts → common/messages/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/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}/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/is-equal.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}/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/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/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/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}/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}/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}/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}/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/useSnackBarIfAvailable.d.ts +0 -0
- /package/build/types/{layout → legacy/layout}/search/SearchInput.d.ts +0 -0
- /package/build/types/{layout → legacy/layout}/utils/getNavigationOptionMedia.d.ts +0 -0
- /package/build/types/{step/cameraStep/cameraCapture/components/index.d.ts → legacy/step/cameraStep/cameraCapture/components/bottomBar/BottomBar.d.ts} +0 -0
- /package/build/types/{step/cameraStep/cameraCapture/hooks/index.d.ts → 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,5 @@
|
|
|
1
|
+
import type { Schema } from '@wise/dynamic-flow-types/build/next';
|
|
2
|
+
import type { OnRefresh } from '../../types';
|
|
3
|
+
export type PerformRefresh = () => void;
|
|
4
|
+
export declare const getPerformRefresh: (schema: Schema, onRefresh: OnRefresh) => (() => Promise<void>) | undefined;
|
|
5
|
+
export declare const getDebouncedPerformRefresh: (schema: Schema, onRefresh: OnRefresh) => (() => Promise<void>) | undefined;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { Icon, Image, Model, Schema } from '@wise/dynamic-flow-types/build/next';
|
|
2
|
+
import type { LocalValue, RepeatableSummary, StepComponent } from '../../types';
|
|
3
|
+
/** A summariser that accepts a schema and returns a function that can form a summary based on a value. */
|
|
4
|
+
export declare const getSummariser: <S extends Schema>(schema: S) => (value: LocalValue | null) => {
|
|
5
|
+
title?: undefined;
|
|
6
|
+
description?: undefined;
|
|
7
|
+
icon?: undefined;
|
|
8
|
+
image?: undefined;
|
|
9
|
+
} | {
|
|
10
|
+
title: string | undefined;
|
|
11
|
+
description: string | undefined;
|
|
12
|
+
icon: Icon | undefined;
|
|
13
|
+
image: Image | undefined;
|
|
14
|
+
};
|
|
15
|
+
export declare const getConstSummary: (schema: Schema, model: Model | null) => {
|
|
16
|
+
title?: undefined;
|
|
17
|
+
description?: undefined;
|
|
18
|
+
icon?: undefined;
|
|
19
|
+
image?: undefined;
|
|
20
|
+
} | {
|
|
21
|
+
title: string | undefined;
|
|
22
|
+
description: string | undefined;
|
|
23
|
+
icon: Icon | undefined;
|
|
24
|
+
image: Image | undefined;
|
|
25
|
+
};
|
|
26
|
+
export declare const summariseFromChildren: (components: StepComponent[]) => RepeatableSummary;
|
|
27
|
+
export declare const mergeSummaries: (summaryA: RepeatableSummary, summaryB: RepeatableSummary) => {
|
|
28
|
+
title: string | undefined;
|
|
29
|
+
description: string | undefined;
|
|
30
|
+
icon: Icon | undefined;
|
|
31
|
+
image: Image | undefined;
|
|
32
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/// <reference types="jest" />
|
|
2
|
+
export declare const mockErrorMessageFunctions: {
|
|
3
|
+
minimum: jest.Mock<any, any, any>;
|
|
4
|
+
maximum: jest.Mock<any, any, any>;
|
|
5
|
+
minimumDate: jest.Mock<any, any, any>;
|
|
6
|
+
maximumDate: jest.Mock<any, any, any>;
|
|
7
|
+
minLength: jest.Mock<any, any, any>;
|
|
8
|
+
maxLength: jest.Mock<any, any, any>;
|
|
9
|
+
minFiles: jest.Mock<any, any, any>;
|
|
10
|
+
maxFiles: jest.Mock<any, any, any>;
|
|
11
|
+
minItems: jest.Mock<any, any, any>;
|
|
12
|
+
maxItems: jest.Mock<any, any, any>;
|
|
13
|
+
pattern: jest.Mock<any, any, any>;
|
|
14
|
+
required: jest.Mock<any, any, any>;
|
|
15
|
+
persistAsyncError: jest.Mock<any, any, any>;
|
|
16
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { LocalValue, StepComponent } from '../../types';
|
|
2
|
+
import type { IsInvalidCheck } from './value-checks';
|
|
3
|
+
export declare const validateComponents: (components: StepComponent[]) => boolean;
|
|
4
|
+
/**
|
|
5
|
+
* Returns a function that takes a local value and returns an array of validation errors
|
|
6
|
+
*/
|
|
7
|
+
export declare const getLocalValueValidator: <V extends LocalValue>(checks: IsInvalidCheck<V>[]) => (currentValue: V) => string[];
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ArraySchemaList, IntegerSchema, NumberSchema, Schema, StringSchema } from '@wise/dynamic-flow-types/build/next';
|
|
2
|
+
import type { ErrorMessageFunctions } from '../../mappers/types';
|
|
3
|
+
import type { LocalValue, LocalValueArray } from '../../types';
|
|
4
|
+
export type IsInvalidCheck<V extends LocalValue> = (value: V | null) => string | null;
|
|
5
|
+
type GetIsInvalidCheck<S extends Schema, V extends LocalValue> = (schema: S, messageFunctions: ErrorMessageFunctions) => IsInvalidCheck<V>;
|
|
6
|
+
export declare const getAboveMaxItemsCheck: GetIsInvalidCheck<ArraySchemaList, LocalValueArray | null>;
|
|
7
|
+
export declare const getBelowMinFilesCheck: GetIsInvalidCheck<ArraySchemaList, LocalValueArray | null>;
|
|
8
|
+
export declare const getAboveMaxFilesCheck: GetIsInvalidCheck<ArraySchemaList, LocalValueArray | null>;
|
|
9
|
+
export declare const getBelowMinItemsCheck: GetIsInvalidCheck<ArraySchemaList, LocalValueArray | null>;
|
|
10
|
+
export declare const getAboveMaxLengthCheck: GetIsInvalidCheck<StringSchema, string | null>;
|
|
11
|
+
export declare const getBelowMinLengthCheck: GetIsInvalidCheck<StringSchema, string | null>;
|
|
12
|
+
export declare const getAboveMaximumCheck: GetIsInvalidCheck<NumberSchema | IntegerSchema, number | null>;
|
|
13
|
+
export declare const getBelowMinimumCheck: GetIsInvalidCheck<NumberSchema | IntegerSchema, number | null>;
|
|
14
|
+
export declare const getAboveMaximumDateCheck: GetIsInvalidCheck<StringSchema, string | null>;
|
|
15
|
+
export declare const getBelowMinimumDateCheck: GetIsInvalidCheck<StringSchema, string | null>;
|
|
16
|
+
export declare const getNotAdheringToPatternCheck: GetIsInvalidCheck<StringSchema, string | null>;
|
|
17
|
+
export declare const getRequiredCheck: (required: boolean, messageFunctions: ErrorMessageFunctions) => IsInvalidCheck<LocalValue | null>;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { BoxLayout } from '@wise/dynamic-flow-types/build/next';
|
|
2
|
+
import { type BoxComponent } from '../../components/BoxComponent';
|
|
3
|
+
import type { MapperProps } from '../schema/types';
|
|
4
|
+
export declare const boxLayoutToComponent: (uid: string, { border, components, control, margin, width }: BoxLayout, mapperProps: MapperProps) => BoxComponent;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { ButtonLayout } from '@wise/dynamic-flow-types/build/next';
|
|
2
|
+
import type { MapperProps } from '../schema/types';
|
|
3
|
+
export declare const buttonLayoutToComponent: (uid: string, { action, context, control, disabled, margin, pinOrder, size, title }: ButtonLayout, { onAction }: MapperProps) => import("../../components/ButtonComponent").ButtonComponent;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ColumnsLayout } from '@wise/dynamic-flow-types/build/next';
|
|
2
|
+
import type { MapperProps } from '../schema/types';
|
|
3
|
+
import { type ColumnsComponent } from '../../components/ColumnsComponent';
|
|
4
|
+
export declare const columnsLayoutToComponent: (uid: string, { control, left, right, bias, margin }: ColumnsLayout, mapperProps: MapperProps) => ColumnsComponent;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { DecisionLayout } from '@wise/dynamic-flow-types/build/next';
|
|
2
|
+
import type { MapperProps } from '../schema/types';
|
|
3
|
+
export declare const decisionLayoutToComponent: (uid: string, { control, margin, options }: DecisionLayout, { onAction }: MapperProps) => import("../../components/DecisionComponent").DecisionComponent;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { FormLayout } from '@wise/dynamic-flow-types/build/next';
|
|
2
|
+
import type { StepComponent } from '../../types';
|
|
3
|
+
import type { MapperProps } from '../schema/types';
|
|
4
|
+
export declare const formLayoutToComponent: (uid: string, { schemaId, control, margin }: FormLayout, mapperProps: MapperProps) => StepComponent;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import type { LoadingIndicatorLayout } from '@wise/dynamic-flow-types/build/next';
|
|
2
|
+
export declare const loadingIndicatorLayoutToComponent: (uid: string, { size, margin, control }: LoadingIndicatorLayout) => import("../../components/LoadingIndicatorComponent").LoadingIndicatorComponent;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { ModalLayout } from '@wise/dynamic-flow-types/build/next';
|
|
2
|
+
import type { MapperProps } from '../schema/types';
|
|
3
|
+
export declare const modalLayoutToComponent: (uid: string, { content, control, margin, trigger }: ModalLayout, mapperProps: MapperProps) => import("../../components/ModalComponent").ModalComponent;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { ReviewLayout } from '@wise/dynamic-flow-types/build/next';
|
|
2
|
+
import type { MapperProps } from '../schema/types';
|
|
3
|
+
export declare const reviewLayoutToComponent: (uid: string, { fields, title, callToAction, control, margin, orientation, action }: ReviewLayout, { onAction }: MapperProps) => import("../../components/ReviewComponent").ReviewComponent;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { SearchLayout } from '@wise/dynamic-flow-types/build/next/layout/SearchLayout';
|
|
2
|
+
import type { MapperProps } from '../schema/types';
|
|
3
|
+
export declare const searchLayoutToComponent: (uid: string, { control, emptyMessage, method, param, title, url, margin }: SearchLayout, mapperProps: MapperProps) => import("../../components/searchComponent/SearchComponent").SearchComponent;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Layout } from '@wise/dynamic-flow-types/build/next';
|
|
2
|
+
import type { StepComponent } from '../types';
|
|
3
|
+
import type { MapperProps } from './schema/types';
|
|
4
|
+
export declare const mapLayoutToComponent: (uid: string, layout: Layout, mapperProps: MapperProps) => StepComponent;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { MapperProps } from './schema/types';
|
|
2
|
+
type MapStepToComponentProps = MapperProps & {
|
|
3
|
+
displayStepTitle: boolean;
|
|
4
|
+
};
|
|
5
|
+
export declare const mapStepToComponents: ({ displayStepTitle, ...mapperProps }: MapStepToComponentProps) => import("../types").StepComponent[];
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { AllOfSchema } from '@wise/dynamic-flow-types/build/next';
|
|
2
|
+
import type { MapperProps, SchemaMapperProps } from './types';
|
|
3
|
+
export declare const allOfSchemaToComponent: (schemaMapperProps: SchemaMapperProps & {
|
|
4
|
+
schema: AllOfSchema;
|
|
5
|
+
}, mapperProps: MapperProps) => import("../../components/AllOfComponent").AllOfComponent;
|
package/build/types/revamp/domain/mappers/schema/arraySchemaToComponent/arraySchemaToComponent.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { MapperProps, SchemaMapperProps } from '../types';
|
|
2
|
+
import type { ArraySchema } from '@wise/dynamic-flow-types/build/next';
|
|
3
|
+
export declare const arraySchemaToComponent: (schemaMapperProps: SchemaMapperProps & {
|
|
4
|
+
schema: ArraySchema;
|
|
5
|
+
}, mapperProps: MapperProps) => import("../../../components/MultiUploadInputComponent").MultiUploadInputComponent | import("../../../components/repeatableComponent/RepeatableComponent").RepeatableComponent;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ArraySchemaList, Model } from '@wise/dynamic-flow-types/build/next';
|
|
2
|
+
import type { MapperProps, SchemaMapperProps } from '../types';
|
|
3
|
+
import { type PersistAsyncWithUploadSchema, type StringSchemaWithUpload } from '../../../../utils/type-utils';
|
|
4
|
+
export declare const arraySchemaToMultiUploadComponent: (schemaMapperProps: SchemaMapperProps & {
|
|
5
|
+
schema: ArraySchemaList & {
|
|
6
|
+
items: PersistAsyncWithUploadSchema | StringSchemaWithUpload;
|
|
7
|
+
};
|
|
8
|
+
model: Model[] | null;
|
|
9
|
+
}, mapperProps: MapperProps) => import("../../../components/MultiUploadInputComponent").MultiUploadInputComponent;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ArraySchemaList, Model } from '@wise/dynamic-flow-types/build/next';
|
|
2
|
+
import type { MapperProps, SchemaMapperProps } from '../types';
|
|
3
|
+
export declare const arraySchemaToRepeatableComponent: (schemaMapperProps: SchemaMapperProps & {
|
|
4
|
+
schema: ArraySchemaList;
|
|
5
|
+
model: Model[] | null;
|
|
6
|
+
}, mapperProps: MapperProps) => import("../../../components/repeatableComponent/RepeatableComponent").RepeatableComponent;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { BlobSchema } from '@wise/dynamic-flow-types/build/next';
|
|
2
|
+
import type { MapperProps, SchemaMapperProps } from './types';
|
|
3
|
+
export declare const blobSchemaToComponent: (schemaMapperProps: SchemaMapperProps & {
|
|
4
|
+
schema: BlobSchema;
|
|
5
|
+
}, mapperProps: MapperProps) => import("../../components/UploadInputComponent").UploadInputComponent;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { BooleanSchema } from '@wise/dynamic-flow-types/build/next';
|
|
2
|
+
import type { MapperProps, SchemaMapperProps } from './types';
|
|
3
|
+
export declare const booleanSchemaToComponent: (schemaMapperProps: SchemaMapperProps & {
|
|
4
|
+
schema: BooleanSchema;
|
|
5
|
+
}, mapperProps: MapperProps) => import("../../components/BooleanInputComponent").BooleanInputComponent;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { SchemaMapperProps } from './types';
|
|
2
|
+
import type { ConstSchema } from '@wise/dynamic-flow-types/build/next';
|
|
3
|
+
export declare const constSchemaToComponent: (uid: string, schemaMapperProps: SchemaMapperProps & {
|
|
4
|
+
schema: ConstSchema;
|
|
5
|
+
}) => import("../../components/ConstComponent").ConstComponent;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { IntegerSchema } from '@wise/dynamic-flow-types/build/next';
|
|
2
|
+
import type { MapperProps, SchemaMapperProps } from './types';
|
|
3
|
+
export declare const integerSchemaToComponent: (schemaMapperProps: SchemaMapperProps & {
|
|
4
|
+
schema: IntegerSchema;
|
|
5
|
+
}, mapperProps: MapperProps) => import("../../components/IntegerInputComponent").IntegerInputComponent;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { NumberSchema } from '@wise/dynamic-flow-types/build/next';
|
|
2
|
+
import type { MapperProps, SchemaMapperProps } from './types';
|
|
3
|
+
export declare const numberSchemaToComponent: (schemaMapperProps: SchemaMapperProps & {
|
|
4
|
+
schema: NumberSchema;
|
|
5
|
+
}, mapperProps: MapperProps) => import("../../components/NumberInputComponent").NumberInputComponent;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ObjectSchema } from '@wise/dynamic-flow-types/build/next';
|
|
2
|
+
import type { MapperProps, SchemaMapperProps } from '../types';
|
|
3
|
+
export declare const objectSchemaToComponent: (schemaMapperProps: SchemaMapperProps & {
|
|
4
|
+
schema: ObjectSchema;
|
|
5
|
+
}, mapperProps: MapperProps) => import("../../../components/ObjectComponent").ObjectComponent;
|
package/build/types/revamp/domain/mappers/schema/oneOfSchemaToComponent/oneOfSchemaToComponent.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { OneOfSchema } from '@wise/dynamic-flow-types/build/next';
|
|
2
|
+
import type { MapperProps, SchemaMapperProps } from '../types';
|
|
3
|
+
export declare const oneOfSchemaToComponent: (schemaMapperProps: SchemaMapperProps & {
|
|
4
|
+
schema: OneOfSchema;
|
|
5
|
+
}, mapperProps: MapperProps) => import("../../../components/SelectInputComponent").SelectInputComponent;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { StringSchema } from '@wise/dynamic-flow-types/build/next';
|
|
2
|
+
import type { MapperProps, SchemaMapperProps } from '../types';
|
|
3
|
+
export declare const stringSchemaToComponent: (schemaMapperProps: SchemaMapperProps & {
|
|
4
|
+
schema: StringSchema;
|
|
5
|
+
}, mapperProps: MapperProps) => import("../../../components/DateInputComponent").DateInputComponent | import("../../../components/TextInputComponent").TextInputComponent | import("../../../components/UploadInputComponent").UploadInputComponent;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { StringSchema } from '@wise/dynamic-flow-types/build/next';
|
|
2
|
+
import type { MapperProps, SchemaMapperProps } from '../types';
|
|
3
|
+
export declare const stringSchemaToDateInputComponent: (schemaMapperProps: SchemaMapperProps & {
|
|
4
|
+
schema: StringSchema;
|
|
5
|
+
}, mapperProps: MapperProps) => import("../../../components/DateInputComponent").DateInputComponent;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { StringSchema } from '@wise/dynamic-flow-types/build/next';
|
|
2
|
+
import type { MapperProps, SchemaMapperProps } from '../types';
|
|
3
|
+
export declare const stringSchemaToTextInputComponent: (schemaMapperProps: SchemaMapperProps & {
|
|
4
|
+
schema: StringSchema;
|
|
5
|
+
}, mapperProps: MapperProps) => import("../../../components/TextInputComponent").TextInputComponent;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { StringSchema } from '@wise/dynamic-flow-types/build/next';
|
|
2
|
+
import type { MapperProps, SchemaMapperProps } from '../types';
|
|
3
|
+
export declare const stringSchemaToUploadInputComponent: (schemaMapperProps: SchemaMapperProps & {
|
|
4
|
+
schema: StringSchema;
|
|
5
|
+
}, mapperProps: MapperProps) => import("../../../components/UploadInputComponent").UploadInputComponent;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/// <reference types="jest" />
|
|
2
|
+
import type { Schema, Step } from '@wise/dynamic-flow-types/build/next';
|
|
3
|
+
import type { MapperProps, SchemaMapperProps } from '../types';
|
|
4
|
+
import type { StepComponent } from '../../../types';
|
|
5
|
+
export declare const getMockMapperProps: (mapperProps?: Partial<MapperProps>) => {
|
|
6
|
+
stepLocalValue: import("../../../types").LocalValue;
|
|
7
|
+
step: Step;
|
|
8
|
+
getErrorMessageFunctions: jest.Mock<any, any, any> | import("../../types").GetErrorMessageFunctions;
|
|
9
|
+
httpClient: typeof fetch | jest.Mock<any, any, any>;
|
|
10
|
+
onAction: jest.Mock<any, any, any> | import("../../../types").OnAction;
|
|
11
|
+
onRefresh: jest.Mock<any, any, any> | import("../../../types").OnRefresh;
|
|
12
|
+
updateComponent: jest.Mock<any, any, any> | import("../../../types").UpdateComponent;
|
|
13
|
+
trackEvent: jest.Mock<any, any, any> | import("../../../features/events").AnalyticsEventDispatcher;
|
|
14
|
+
logEvent: jest.Mock<any, any, any> | import("../../../features/events").LoggingEventDispatcher;
|
|
15
|
+
};
|
|
16
|
+
export declare const getMockSchemaMapperProps: <S extends Schema>(schemaMapperProps: Partial<SchemaMapperProps> & {
|
|
17
|
+
schema: S;
|
|
18
|
+
}) => {
|
|
19
|
+
uid: string;
|
|
20
|
+
schema: (Schema | undefined) & S;
|
|
21
|
+
model: import("@wise/dynamic-flow-types/build/next").JsonElement;
|
|
22
|
+
localValue: import("../../../types").LocalValue;
|
|
23
|
+
required: boolean;
|
|
24
|
+
validationErrors: import("@wise/dynamic-flow-types/build/next").JsonElement;
|
|
25
|
+
persistAsyncConfig?: import("../../types").PersistAsyncConfig | undefined;
|
|
26
|
+
};
|
|
27
|
+
export declare const mockUpdateFunction: <C extends StepComponent>(draftComponent: C) => jest.Mock<any, any, any>;
|
|
28
|
+
export declare const getUpdateFunctionMock: <C extends StepComponent>(getComponent: () => C) => jest.Mock<void, [uid: string, update: (component: StepComponent) => void], any>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { Step as DFStep, Model, Schema, ValidationError } from '@wise/dynamic-flow-types/build/next';
|
|
2
|
+
import type { LocalValue, OnAction, OnRefresh, UpdateComponent } from '../../types';
|
|
3
|
+
import type { GetErrorMessageFunctions, PersistAsyncConfig } from '../types';
|
|
4
|
+
import type { AnalyticsEventDispatcher, LoggingEventDispatcher } from '../../features/events';
|
|
5
|
+
import type { HttpClient } from '../../../types';
|
|
6
|
+
export type MapperProps = {
|
|
7
|
+
stepLocalValue: LocalValue;
|
|
8
|
+
step: DFStep;
|
|
9
|
+
getErrorMessageFunctions: GetErrorMessageFunctions;
|
|
10
|
+
httpClient: HttpClient;
|
|
11
|
+
onAction: OnAction;
|
|
12
|
+
onRefresh: OnRefresh;
|
|
13
|
+
updateComponent: UpdateComponent;
|
|
14
|
+
trackEvent: AnalyticsEventDispatcher;
|
|
15
|
+
logEvent: LoggingEventDispatcher;
|
|
16
|
+
};
|
|
17
|
+
export type SchemaMapperProps = {
|
|
18
|
+
uid: string;
|
|
19
|
+
schema: Schema;
|
|
20
|
+
model: Model;
|
|
21
|
+
localValue: LocalValue;
|
|
22
|
+
required?: boolean;
|
|
23
|
+
validationErrors?: ValidationError;
|
|
24
|
+
persistAsyncConfig?: PersistAsyncConfig;
|
|
25
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { MapperProps, SchemaMapperProps } from '../types';
|
|
2
|
+
export declare const getPersistAsyncInitialState: (schemaMapperProps: SchemaMapperProps, mapperProps: MapperProps) => {
|
|
3
|
+
performPersistAsync: import("../../../features/persistAsync/getPerformPersistAsync").PerformPersistAsync | undefined;
|
|
4
|
+
persistedState: import("../../../types").PersistedState;
|
|
5
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { SchemaMapperProps } from '../types';
|
|
2
|
+
export declare const mapCommonSchemaProps: (schemaMapperProps: SchemaMapperProps) => {
|
|
3
|
+
placeholder?: string | undefined;
|
|
4
|
+
help?: string | undefined;
|
|
5
|
+
uid: string;
|
|
6
|
+
id: string;
|
|
7
|
+
analyticsId: string;
|
|
8
|
+
control: string | undefined;
|
|
9
|
+
description: string | undefined;
|
|
10
|
+
disabled: boolean;
|
|
11
|
+
errors: string[];
|
|
12
|
+
hidden: boolean;
|
|
13
|
+
keywords: string[] | undefined;
|
|
14
|
+
required: boolean;
|
|
15
|
+
title: string | undefined;
|
|
16
|
+
summariser: (value: import("../../../types").LocalValue) => {
|
|
17
|
+
title?: undefined;
|
|
18
|
+
description?: undefined;
|
|
19
|
+
icon?: undefined;
|
|
20
|
+
image?: undefined;
|
|
21
|
+
} | {
|
|
22
|
+
title: string | undefined;
|
|
23
|
+
description: string | undefined;
|
|
24
|
+
icon: import("@wise/dynamic-flow-types/build/next").Icon | undefined;
|
|
25
|
+
image: import("@wise/dynamic-flow-types/build/next").Image | undefined;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { PersistAsync } from '@wise/dynamic-flow-types/build/next/feature/PersistAsync';
|
|
2
|
+
export type GetErrorMessageFunctions = (validationMessages?: ValidationMessages) => ErrorMessageFunctions;
|
|
3
|
+
export type ValidationMessages = Record<string, string | undefined>;
|
|
4
|
+
export type ErrorMessageFunctions = {
|
|
5
|
+
maximum: (maximum: number) => string;
|
|
6
|
+
minimum: (minimum: number) => string;
|
|
7
|
+
maximumDate: (maxDate: string) => string;
|
|
8
|
+
minimumDate: (minDate: string) => string;
|
|
9
|
+
maxLength: (maxLength: number) => string;
|
|
10
|
+
minLength: (minLength: number) => string;
|
|
11
|
+
maxFiles: (maxFiles: number) => string;
|
|
12
|
+
minFiles: (minFiles: number) => string;
|
|
13
|
+
maxItems: (maxItems: number) => string;
|
|
14
|
+
minItems: (minItems: number) => string;
|
|
15
|
+
pattern: () => string;
|
|
16
|
+
required: () => string;
|
|
17
|
+
persistAsyncError: () => string;
|
|
18
|
+
};
|
|
19
|
+
export type PersistAsyncConfig = Pick<PersistAsync, 'idProperty' | 'method' | 'param' | 'url'>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getRandomId: () => string;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Context as DFContext, Align as DFAlign, Action } from '@wise/dynamic-flow-types/build/next';
|
|
2
|
+
import type { Align, Bias, Context } from '../../types';
|
|
3
|
+
export declare const mapLegacyContext: (context: DFContext) => Context;
|
|
4
|
+
export declare const mapLegacyBias: (bias: 'left' | 'right' | 'none') => Bias;
|
|
5
|
+
export declare const mapLegacyAlign: (align: DFAlign) => Align;
|
|
6
|
+
export declare const mapLegacyActionTypeToContext: (type: Action['type']) => Context;
|
|
7
|
+
export declare const mapLegacyActionTypeToControl: (type: Action['type']) => 'primary' | 'secondary' | 'tertiary';
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import type { Action, Icon, Image, JsonElement, Margin, Model } from '@wise/dynamic-flow-types/build/next';
|
|
2
|
+
import type { ConstComponent } from './components/ConstComponent';
|
|
3
|
+
import type { AlertComponent } from './components/AlertComponent';
|
|
4
|
+
import type { AllOfComponent } from './components/AllOfComponent';
|
|
5
|
+
import type { BooleanInputComponent } from './components/BooleanInputComponent';
|
|
6
|
+
import type { BoxComponent } from './components/BoxComponent';
|
|
7
|
+
import type { ButtonComponent } from './components/ButtonComponent';
|
|
8
|
+
import type { ColumnsComponent } from './components/ColumnsComponent';
|
|
9
|
+
import type { ContainerComponent } from './components/ContainerComponent';
|
|
10
|
+
import type { DateInputComponent } from './components/DateInputComponent';
|
|
11
|
+
import type { DecisionComponent } from './components/DecisionComponent';
|
|
12
|
+
import type { FormComponent } from './components/FormComponent';
|
|
13
|
+
import type { DividerComponent } from './components/DividerComponent';
|
|
14
|
+
import type { HeadingComponent } from './components/HeadingComponent';
|
|
15
|
+
import type { IntegerInputComponent } from './components/IntegerInputComponent';
|
|
16
|
+
import type { NumberInputComponent } from './components/NumberInputComponent';
|
|
17
|
+
import type { ImageComponent } from './components/ImageComponent';
|
|
18
|
+
import type { LoadingIndicatorComponent } from './components/LoadingIndicatorComponent';
|
|
19
|
+
import type { MarkdownComponent } from './components/MarkdownComponent';
|
|
20
|
+
import type { InstructionsComponent } from './components/InstructionsComponent';
|
|
21
|
+
import type { ModalComponent } from './components/ModalComponent';
|
|
22
|
+
import type { ObjectComponent } from './components/ObjectComponent';
|
|
23
|
+
import type { ParagraphComponent } from './components/ParagraphComponent';
|
|
24
|
+
import type { RepeatableComponent } from './components/repeatableComponent/RepeatableComponent';
|
|
25
|
+
import type { ReviewComponent } from './components/ReviewComponent';
|
|
26
|
+
import type { SearchComponent } from './components/searchComponent/SearchComponent';
|
|
27
|
+
import type { SelectInputComponent } from './components/SelectInputComponent';
|
|
28
|
+
import type { StatusListComponent } from './components/StatusListComponent';
|
|
29
|
+
import type { TextInputComponent } from './components/TextInputComponent';
|
|
30
|
+
import type { UploadInputComponent } from './components/UploadInputComponent';
|
|
31
|
+
import type { MultiUploadInputComponent } from './components/MultiUploadInputComponent';
|
|
32
|
+
export type StepComponent = AlertComponent | AllOfComponent | BooleanInputComponent | BoxComponent | ButtonComponent | ColumnsComponent | ConstComponent | ContainerComponent | DateInputComponent | DecisionComponent | DividerComponent | FormComponent | HeadingComponent | ImageComponent | InstructionsComponent | IntegerInputComponent | LoadingIndicatorComponent | MarkdownComponent | ModalComponent | MultiUploadInputComponent | NumberInputComponent | ObjectComponent | ParagraphComponent | RepeatableComponent | ReviewComponent | SearchComponent | SelectInputComponent | StatusListComponent | TextInputComponent | UploadInputComponent;
|
|
33
|
+
export type LocalValue = LocalValuePrimitive | LocalValueObject | LocalValueArray;
|
|
34
|
+
export type LocalValuePrimitive = string | number | boolean | File | null;
|
|
35
|
+
export interface LocalValueObject extends Record<string, LocalValuePrimitive | LocalValueObject | LocalValueArray> {
|
|
36
|
+
}
|
|
37
|
+
export interface LocalValueArray extends Array<LocalValuePrimitive | LocalValueObject | LocalValueArray> {
|
|
38
|
+
}
|
|
39
|
+
export type BaseComponent = {
|
|
40
|
+
type: string;
|
|
41
|
+
uid: string;
|
|
42
|
+
analyticsId?: string;
|
|
43
|
+
getSubmittableValue: () => Promise<Model>;
|
|
44
|
+
getSummary: () => RepeatableSummary;
|
|
45
|
+
validate: () => boolean;
|
|
46
|
+
};
|
|
47
|
+
export type LayoutComponent = BaseComponent & {
|
|
48
|
+
control?: string;
|
|
49
|
+
margin: Margin;
|
|
50
|
+
getLocalValue: () => LocalValue;
|
|
51
|
+
};
|
|
52
|
+
export type ComponentWithTitle = BaseComponent & {
|
|
53
|
+
control?: string;
|
|
54
|
+
description?: string;
|
|
55
|
+
help?: string;
|
|
56
|
+
hidden: boolean;
|
|
57
|
+
title?: string;
|
|
58
|
+
};
|
|
59
|
+
export type InputComponent<V extends LocalValue> = ComponentWithTitle & {
|
|
60
|
+
id: string;
|
|
61
|
+
autoComplete: string;
|
|
62
|
+
disabled: boolean;
|
|
63
|
+
errors: string[];
|
|
64
|
+
placeholder?: string;
|
|
65
|
+
required: boolean;
|
|
66
|
+
value: V;
|
|
67
|
+
onBlur: () => void;
|
|
68
|
+
onFocus: () => void;
|
|
69
|
+
getLocalValue: () => V;
|
|
70
|
+
};
|
|
71
|
+
export type UpdateComponent = (id: string, update: (component: StepComponent) => void) => void;
|
|
72
|
+
export type OnAction = (action: Action) => Promise<void>;
|
|
73
|
+
export type OnRefresh = (schemaId: string | undefined, url?: string) => Promise<void> | void;
|
|
74
|
+
export type Align = 'start' | 'center' | 'end';
|
|
75
|
+
export type Bias = 'none' | 'start' | 'end';
|
|
76
|
+
export type Context = 'positive' | 'negative' | 'warning' | 'neutral';
|
|
77
|
+
export type RepeatableSummary = {
|
|
78
|
+
title?: string;
|
|
79
|
+
description?: string;
|
|
80
|
+
icon?: Icon;
|
|
81
|
+
image?: Image;
|
|
82
|
+
};
|
|
83
|
+
export type PersistedState = {
|
|
84
|
+
id?: string;
|
|
85
|
+
abortController: AbortController;
|
|
86
|
+
lastSubmitted: LocalValue;
|
|
87
|
+
submission: Promise<JsonElement | null>;
|
|
88
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Model, Step } from '@wise/dynamic-flow-types/build/next';
|
|
2
|
+
import type { AnalyticsEventDispatcher } from '../domain/features/events';
|
|
3
|
+
type Command = {
|
|
4
|
+
type: 'refresh-step';
|
|
5
|
+
step: Step;
|
|
6
|
+
etag: string | null;
|
|
7
|
+
} | {
|
|
8
|
+
type: 'noop';
|
|
9
|
+
};
|
|
10
|
+
export declare const executeRefresh: (props: {
|
|
11
|
+
abortSignal: AbortSignal;
|
|
12
|
+
url: string;
|
|
13
|
+
model: Model;
|
|
14
|
+
schemaId: string | undefined;
|
|
15
|
+
etag: string | null;
|
|
16
|
+
httpClient: typeof fetch;
|
|
17
|
+
trackEvent: AnalyticsEventDispatcher;
|
|
18
|
+
}) => Promise<Command>;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { Action, Model, Step, ErrorResponseBody } from '@wise/dynamic-flow-types/build/next';
|
|
2
|
+
import type { AnalyticsEventDispatcher } from '../domain/features/events';
|
|
3
|
+
type Command = {
|
|
4
|
+
type: 'complete';
|
|
5
|
+
result: Model;
|
|
6
|
+
} | {
|
|
7
|
+
type: 'replace-step';
|
|
8
|
+
step: Step;
|
|
9
|
+
etag: string | null;
|
|
10
|
+
} | {
|
|
11
|
+
type: 'errors';
|
|
12
|
+
errors: ErrorResponseBody;
|
|
13
|
+
};
|
|
14
|
+
export declare const executeSubmission: (props: {
|
|
15
|
+
action: Action;
|
|
16
|
+
model: Model;
|
|
17
|
+
httpClient: typeof fetch;
|
|
18
|
+
trackEvent: AnalyticsEventDispatcher;
|
|
19
|
+
}) => Promise<Command>;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
declare const responseTypes: readonly ["step", "action", "exit"];
|
|
2
|
+
export type ResponseType = (typeof responseTypes)[number];
|
|
3
|
+
/**
|
|
4
|
+
* Returns either 'step', 'action', or 'exit' based on the response headers and body.
|
|
5
|
+
* This function is async because, for legacy reasons, we still need to parse the response body as JSON
|
|
6
|
+
* to determine the response type, in cases where the response headers are not set.
|
|
7
|
+
* Ideally it should just be a matter of checking the "X-Df-Response-Type" response header.
|
|
8
|
+
*/
|
|
9
|
+
export declare const getResponseType: (response: Response) => Promise<ResponseType>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ActionResponseBody, ErrorResponseBody, JsonElement, Step } from '@wise/dynamic-flow-types/build/next';
|
|
2
|
+
export declare const assertResponseIsValid: (response: unknown) => void;
|
|
3
|
+
export declare const parseResponseBodyAsJsonElement: (response: Response) => Promise<JsonElement>;
|
|
4
|
+
export declare function assertActionResponseBody(body: unknown): asserts body is ActionResponseBody;
|
|
5
|
+
export declare function assertErrorResponseBody(body: unknown): asserts body is ErrorResponseBody;
|
|
6
|
+
export declare function assertStepResponseBody(body: unknown): asserts body is Step;
|