@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.
Files changed (444) hide show
  1. package/README.md +42 -13
  2. package/build/i18n/de.json +7 -2
  3. package/build/i18n/en.json +7 -2
  4. package/build/i18n/es.json +7 -2
  5. package/build/i18n/fr.json +7 -2
  6. package/build/i18n/hu.json +8 -3
  7. package/build/i18n/id.json +7 -2
  8. package/build/i18n/it.json +7 -2
  9. package/build/i18n/ja.json +6 -1
  10. package/build/i18n/pl.json +7 -2
  11. package/build/i18n/pt.json +8 -3
  12. package/build/i18n/ro.json +7 -2
  13. package/build/i18n/ru.json +7 -2
  14. package/build/i18n/th.json +8 -3
  15. package/build/i18n/tr.json +8 -3
  16. package/build/i18n/zh_CN.json +24 -19
  17. package/build/i18n/zh_HK.json +7 -2
  18. package/build/main.css +17 -18
  19. package/build/main.js +2471 -1854
  20. package/build/main.min.js +8 -1
  21. package/build/types/common/errorBoundary/ErrorBoundaryAlert.d.ts +5 -0
  22. package/build/types/common/{contexts/httpClientContext → httpClientContext}/HttpClientContext.d.ts +3 -3
  23. package/build/types/common/httpClientContext/index.d.ts +1 -0
  24. package/build/types/common/makeHttpClient/makeHttpClient.d.ts +1 -0
  25. package/build/types/{step/cameraStep/cameraCapture/screens/NoCameraAccess/NoCameraAccess.messages.d.ts → common/messages/generic-error.messages.d.ts} +3 -3
  26. package/build/types/{dynamicFlow/utils/errorBoundary/ErrorBoundary.messages.d.ts → common/messages/help.messages.d.ts} +1 -6
  27. package/build/types/{step/cameraStep/cameraCapture/screens/CameraNotSupported/CameraNotSupported.messages.d.ts → common/messages/validation.array.messages.d.ts} +2 -2
  28. package/build/types/common/utils/api-utils.d.ts +0 -3
  29. package/build/types/index.d.ts +7 -7
  30. package/build/types/legacy/common/constants/FeatureName.d.ts +3 -0
  31. package/build/types/{common → legacy/common}/constants/FormControlType.d.ts +2 -0
  32. package/build/types/legacy/common/contexts/eventsContext/EventsContext.d.ts +14 -0
  33. package/build/types/legacy/common/contexts/featureContext/FeatureContext.d.ts +10 -0
  34. package/build/types/{common → legacy/common}/contexts/index.d.ts +0 -1
  35. package/build/types/{common → legacy/common}/contexts/logContext/LogContext.d.ts +3 -5
  36. package/build/types/legacy/common/hooks/useDebouncedFunction/useDebouncedFunction.d.ts +2 -0
  37. package/build/types/{common → legacy/common}/hooks/useExternalStepPolling/useExternalStepPolling.d.ts +1 -1
  38. package/build/types/{common → legacy/common}/hooks/usePersistAsync/usePersistAsync.d.ts +1 -1
  39. package/build/types/{common → legacy/common}/hooks/useStepPolling/useStepPolling.d.ts +1 -1
  40. package/build/types/legacy/common/utils/api-utils.d.ts +2 -0
  41. package/build/types/legacy/common/utils/debounce.d.ts +6 -0
  42. package/build/types/{common → legacy/common}/utils/file-utils.d.ts +1 -1
  43. package/build/types/{common → legacy/common}/utils/index.d.ts +1 -0
  44. package/build/types/{common → legacy/common}/utils/misc-utils.d.ts +1 -1
  45. package/build/types/legacy/common/utils/mobile-utils.d.ts +4 -0
  46. package/build/types/{common → legacy/common}/utils/model-utils.d.ts +1 -1
  47. package/build/types/{common → legacy/common}/utils/schema-utils.d.ts +1 -1
  48. package/build/types/{common → legacy/common}/utils/step-utils.d.ts +1 -1
  49. package/build/types/{common → legacy/common}/validators/models/model-utils.d.ts +1 -1
  50. package/build/types/{common → legacy/common}/validators/models/model-validators.d.ts +1 -1
  51. package/build/types/{common → legacy/common}/validators/schemas/schema-validators.d.ts +1 -1
  52. package/build/types/{common → legacy/common}/validators/validationFailures/validation-failures.d.ts +1 -1
  53. package/build/types/legacy/dynamic-flow-types.d.ts +57 -0
  54. package/build/types/legacy/dynamicFlow/BackButton.d.ts +9 -0
  55. package/build/types/legacy/dynamicFlow/DynamicFlow.d.ts +3 -0
  56. package/build/types/legacy/dynamicFlow/DynamicFlowStep.d.ts +8 -0
  57. package/build/types/legacy/dynamicFlow/DynamicFlowTypes.d.ts +8 -0
  58. package/build/types/{dynamicFlow → legacy/dynamicFlow}/stories/fixtureHttpClient.d.ts +1 -1
  59. package/build/types/{dynamicFlow → legacy/dynamicFlow}/utils/index.d.ts +1 -1
  60. package/build/types/{dynamicFlow → legacy/dynamicFlow}/utils/responseParsers/response-parsers.d.ts +2 -2
  61. package/build/types/legacy/dynamicFlow/utils/useDebouncedRefresh/useDebouncedRefresh.d.ts +5 -0
  62. package/build/types/{dynamicFlow → legacy/dynamicFlow}/utils/useDynamicFlowState.d.ts +1 -1
  63. package/build/types/{dynamicFlow → legacy/dynamicFlow}/utils/useLoader.d.ts +1 -1
  64. package/build/types/{formControl → legacy/formControl}/FormControl.d.ts +14 -14
  65. package/build/types/legacy/formControl/utils/getAutocompleteString.d.ts +2 -0
  66. package/build/types/legacy/formControl/utils/index.d.ts +2 -0
  67. package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/JsonSchemaForm.d.ts +5 -4
  68. package/build/types/legacy/jsonSchemaForm/allOfSchema/AllOfSchema.d.ts +13 -0
  69. package/build/types/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/MultipleFileUploadSchema.d.ts +16 -0
  70. package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/upload-utils.d.ts +1 -1
  71. package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/arrayTypeSchema/arrayListSchema/repeatableSchema/ItemSummary.d.ts +3 -3
  72. package/build/types/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/RepeatableSchema.d.ts +8 -0
  73. package/build/types/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/RepeatableSchemaStep.d.ts +14 -0
  74. package/build/types/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/utils/summary-utils.d.ts +3 -0
  75. package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/controlFeedback/ControlFeedback.d.ts +5 -5
  76. package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/genericSchema/GenericSchema.d.ts +4 -4
  77. package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/help/Help.d.ts +1 -1
  78. package/build/types/legacy/jsonSchemaForm/objectSchema/ObjectSchema.d.ts +15 -0
  79. package/build/types/legacy/jsonSchemaForm/oneOfSchema/OneOfSchema.d.ts +14 -0
  80. package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/oneOfSchema/utils.d.ts +1 -1
  81. package/build/types/legacy/jsonSchemaForm/persistAsyncSchema/PersistAsyncSchema.d.ts +15 -0
  82. package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/persistAsyncSchema/persistAsyncBasicSchema/PersistAsyncBasicSchema.d.ts +6 -6
  83. package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/persistAsyncSchema/persistAsyncBlobSchema/PersistAsyncBlobSchema.d.ts +6 -6
  84. package/build/types/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/UploadInputAdapter.d.ts +16 -0
  85. package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfControl.d.ts +5 -5
  86. package/build/types/legacy/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfRadioControl.d.ts +8 -0
  87. package/build/types/legacy/jsonSchemaForm/readOnlySchema/ReadOnlySchema.d.ts +7 -0
  88. package/build/types/legacy/jsonSchemaForm/schemaFormControl/SchemaFormControl.d.ts +27 -0
  89. package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/schemaFormControl/utils/mapping-utils.d.ts +5 -4
  90. package/build/types/legacy/jsonSchemaForm/validationAsyncSchema/ValidationAsyncSchema.d.ts +15 -0
  91. package/build/types/{layout → legacy/layout}/DynamicLayout.d.ts +3 -3
  92. package/build/types/legacy/layout/button/DynamicButton.d.ts +7 -0
  93. package/build/types/{layout → legacy/layout}/button/utils.d.ts +1 -1
  94. package/build/types/legacy/layout/decision/DynamicDecision.d.ts +8 -0
  95. package/build/types/legacy/layout/form/DynamicForm.d.ts +7 -0
  96. package/build/types/{layout → legacy/layout}/icon/DynamicIcon.d.ts +1 -1
  97. package/build/types/{layout → legacy/layout}/icon/FlagIcon.d.ts +1 -1
  98. package/build/types/{layout → legacy/layout}/icon/NamedIcon.d.ts +1 -1
  99. package/build/types/legacy/layout/image/DynamicImage.d.ts +6 -0
  100. package/build/types/{layout → legacy/layout}/index.d.ts +1 -0
  101. package/build/types/legacy/layout/modal/DynamicModal.d.ts +7 -0
  102. package/build/types/legacy/layout/paragraph/DynamicParagraph.d.ts +6 -0
  103. package/build/types/legacy/layout/review/DynamicReview.d.ts +8 -0
  104. package/build/types/legacy/layout/search/DynamicSearch.d.ts +8 -0
  105. package/build/types/legacy/layout/search/SearchResults.d.ts +10 -0
  106. package/build/types/{layout → legacy/layout}/search/useSearch.d.ts +2 -2
  107. package/build/types/{layout → legacy/layout}/utils/index.d.ts +1 -1
  108. package/build/types/legacy/step/cameraStep/CameraStep.d.ts +7 -0
  109. package/build/types/legacy/step/cameraStep/cameraCapture/CameraCapture.d.ts +15 -0
  110. package/build/types/legacy/step/cameraStep/cameraCapture/CameraCapture.messages.d.ts +58 -0
  111. package/build/types/legacy/step/cameraStep/cameraCapture/components/index.d.ts +3 -0
  112. package/build/types/legacy/step/cameraStep/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.d.ts +2 -0
  113. package/build/types/legacy/step/cameraStep/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.messages.d.ts +8 -0
  114. package/build/types/legacy/step/cameraStep/cameraCapture/hooks/useFullScreenOrientationLock.d.ts +5 -0
  115. package/build/types/{step → legacy/step}/cameraStep/cameraCapture/overlay/Overlay.d.ts +1 -1
  116. package/build/types/legacy/step/cameraStep/cameraCapture/screens/cameraErrorScreen/CameraErrorScreen.d.ts +3 -0
  117. package/build/types/legacy/step/cameraStep/cameraCapture/screens/index.d.ts +1 -0
  118. package/build/types/legacy/step/cameraStep/cameraCapture/tracking/index.d.ts +8 -0
  119. package/build/types/legacy/step/cameraStep/cameraCapture/types/index.d.ts +11 -0
  120. package/build/types/{step → legacy/step}/layoutStep/utils/inline-reference-utils.d.ts +1 -1
  121. package/build/types/legacy/test-utils/DynamicFlowProviders.d.ts +9 -0
  122. package/build/types/legacy/test-utils/index.d.ts +4 -0
  123. package/build/types/legacy/test-utils/legacy-utils.d.ts +22 -0
  124. package/build/types/legacy/test-utils/log-utils.d.ts +9 -0
  125. package/build/types/revamp/DynamicFlowCore.d.ts +6 -0
  126. package/build/types/revamp/DynamicFlowWise.d.ts +3 -0
  127. package/build/types/revamp/domain/components/AlertComponent.d.ts +7 -0
  128. package/build/types/revamp/domain/components/AllOfComponent.d.ts +18 -0
  129. package/build/types/revamp/domain/components/BooleanInputComponent.d.ts +15 -0
  130. package/build/types/revamp/domain/components/BoxComponent.d.ts +10 -0
  131. package/build/types/revamp/domain/components/ButtonComponent.d.ts +12 -0
  132. package/build/types/revamp/domain/components/ColumnsComponent.d.ts +9 -0
  133. package/build/types/revamp/domain/components/ConstComponent.d.ts +10 -0
  134. package/build/types/revamp/domain/components/ContainerComponent.d.ts +11 -0
  135. package/build/types/revamp/domain/components/DateInputComponent.d.ts +17 -0
  136. package/build/types/revamp/domain/components/DecisionComponent.d.ts +15 -0
  137. package/build/types/revamp/domain/components/DividerComponent.d.ts +5 -0
  138. package/build/types/revamp/domain/components/FormComponent.d.ts +7 -0
  139. package/build/types/revamp/domain/components/HeadingComponent.d.ts +9 -0
  140. package/build/types/revamp/domain/components/ImageComponent.d.ts +9 -0
  141. package/build/types/revamp/domain/components/InstructionsComponent.d.ts +11 -0
  142. package/build/types/revamp/domain/components/IntegerInputComponent.d.ts +15 -0
  143. package/build/types/revamp/domain/components/LoadingIndicatorComponent.d.ts +8 -0
  144. package/build/types/revamp/domain/components/MarkdownComponent.d.ts +7 -0
  145. package/build/types/revamp/domain/components/ModalComponent.d.ts +12 -0
  146. package/build/types/revamp/domain/components/MultiUploadInputComponent.d.ts +21 -0
  147. package/build/types/revamp/domain/components/NumberInputComponent.d.ts +15 -0
  148. package/build/types/revamp/domain/components/ObjectComponent.d.ts +13 -0
  149. package/build/types/revamp/domain/components/ParagraphComponent.d.ts +7 -0
  150. package/build/types/revamp/domain/components/ReviewComponent.d.ts +17 -0
  151. package/build/types/revamp/domain/components/SelectInputComponent.d.ts +35 -0
  152. package/build/types/revamp/domain/components/StatusListComponent.d.ts +8 -0
  153. package/build/types/revamp/domain/components/TextInputComponent.d.ts +16 -0
  154. package/build/types/revamp/domain/components/UploadInputComponent.d.ts +18 -0
  155. package/build/types/revamp/domain/components/repeatableComponent/RepeatableComponent.d.ts +27 -0
  156. package/build/types/revamp/domain/components/searchComponent/SearchComponent.d.ts +25 -0
  157. package/build/types/revamp/domain/components/utils/component-utils.d.ts +12 -0
  158. package/build/types/revamp/domain/components/utils/debounce.d.ts +6 -0
  159. package/build/types/revamp/domain/components/utils/file-utils.d.ts +1 -0
  160. package/build/types/revamp/domain/components/utils/isPartialLocalValueMatch.d.ts +2 -0
  161. package/build/types/revamp/domain/features/events/getAnalyticsEventDispatcher.d.ts +9 -0
  162. package/build/types/revamp/domain/features/events/getLogggingEventDispatcher.d.ts +4 -0
  163. package/build/types/revamp/domain/features/events/index.d.ts +2 -0
  164. package/build/types/revamp/domain/features/persistAsync/getComponentPersistAsync.d.ts +21 -0
  165. package/build/types/revamp/domain/features/persistAsync/getPerformPersistAsync.d.ts +23 -0
  166. package/build/types/revamp/domain/features/persistAsync/persist-async-utils.d.ts +3 -0
  167. package/build/types/revamp/domain/features/refresh/getPerformRefresh.d.ts +5 -0
  168. package/build/types/revamp/domain/features/search/getPerformSearchFunction.d.ts +3 -0
  169. package/build/types/revamp/domain/features/summary/summary-utils.d.ts +32 -0
  170. package/build/types/revamp/domain/features/validation/spec-utils.d.ts +16 -0
  171. package/build/types/revamp/domain/features/validation/validation-functions.d.ts +7 -0
  172. package/build/types/revamp/domain/features/validation/value-checks.d.ts +18 -0
  173. package/build/types/revamp/domain/mappers/layout/alertLayoutToComponent.d.ts +2 -0
  174. package/build/types/revamp/domain/mappers/layout/boxLayoutToComponents.d.ts +4 -0
  175. package/build/types/revamp/domain/mappers/layout/buttonLayoutToComponent.d.ts +3 -0
  176. package/build/types/revamp/domain/mappers/layout/columnsLayoutToComponent.d.ts +4 -0
  177. package/build/types/revamp/domain/mappers/layout/decisionLayoutToComponent.d.ts +3 -0
  178. package/build/types/revamp/domain/mappers/layout/dividerLayoutToComponent.d.ts +2 -0
  179. package/build/types/revamp/domain/mappers/layout/formLayoutToComponent.d.ts +4 -0
  180. package/build/types/revamp/domain/mappers/layout/headingLayoutToComponent.d.ts +2 -0
  181. package/build/types/revamp/domain/mappers/layout/imageLayoutToComponent.d.ts +2 -0
  182. package/build/types/revamp/domain/mappers/layout/infoLayoutToComponent.d.ts +2 -0
  183. package/build/types/revamp/domain/mappers/layout/instructionsLayoutToComponent.d.ts +2 -0
  184. package/build/types/revamp/domain/mappers/layout/listLayoutToComponent.d.ts +2 -0
  185. package/build/types/revamp/domain/mappers/layout/loadingIndicatorLayoutToComponent.d.ts +2 -0
  186. package/build/types/revamp/domain/mappers/layout/markdownLayoutToComponent.d.ts +2 -0
  187. package/build/types/revamp/domain/mappers/layout/modalLayoutToComponent.d.ts +3 -0
  188. package/build/types/revamp/domain/mappers/layout/paragraphLayoutToComponent.d.ts +2 -0
  189. package/build/types/revamp/domain/mappers/layout/reviewLayoutToComponent.d.ts +3 -0
  190. package/build/types/revamp/domain/mappers/layout/searchLayoutToComponent.d.ts +3 -0
  191. package/build/types/revamp/domain/mappers/layout/statusListLayoutToComponent.d.ts +2 -0
  192. package/build/types/revamp/domain/mappers/mapLayoutToComponent.d.ts +4 -0
  193. package/build/types/revamp/domain/mappers/mapSchemaToComponent.d.ts +3 -0
  194. package/build/types/revamp/domain/mappers/mapStepToComponents.d.ts +6 -0
  195. package/build/types/revamp/domain/mappers/schema/allOfSchemaToComponent.d.ts +5 -0
  196. package/build/types/revamp/domain/mappers/schema/arraySchemaToComponent/arraySchemaToComponent.d.ts +5 -0
  197. package/build/types/revamp/domain/mappers/schema/arraySchemaToComponent/arraySchemaToMultiUploadComponent.d.ts +9 -0
  198. package/build/types/revamp/domain/mappers/schema/arraySchemaToComponent/arraySchemaToRepeatableComponent.d.ts +6 -0
  199. package/build/types/revamp/domain/mappers/schema/blobSchemaToComponent.d.ts +5 -0
  200. package/build/types/revamp/domain/mappers/schema/booleanSchemaToComponent.d.ts +5 -0
  201. package/build/types/revamp/domain/mappers/schema/constSchemaToComponent.d.ts +5 -0
  202. package/build/types/revamp/domain/mappers/schema/integerSchemaToComponent.d.ts +5 -0
  203. package/build/types/revamp/domain/mappers/schema/numberSchemaToComponent.d.ts +5 -0
  204. package/build/types/revamp/domain/mappers/schema/objectSchemaToComponent/objectSchemaToComponent.d.ts +5 -0
  205. package/build/types/revamp/domain/mappers/schema/oneOfSchemaToComponent/oneOfSchemaToComponent.d.ts +5 -0
  206. package/build/types/revamp/domain/mappers/schema/stringSchemaToComponent/stringSchemaToComponent.d.ts +5 -0
  207. package/build/types/revamp/domain/mappers/schema/stringSchemaToComponent/stringSchemaToDateInputComponent.d.ts +5 -0
  208. package/build/types/revamp/domain/mappers/schema/stringSchemaToComponent/stringSchemaToTextInputComponent.d.ts +5 -0
  209. package/build/types/revamp/domain/mappers/schema/stringSchemaToComponent/stringSchemaToUploadInputComponent.d.ts +5 -0
  210. package/build/types/revamp/domain/mappers/schema/tests/test-utils.d.ts +28 -0
  211. package/build/types/revamp/domain/mappers/schema/types.d.ts +25 -0
  212. package/build/types/revamp/domain/mappers/schema/utils/getPersistAsyncInitialState.d.ts +5 -0
  213. package/build/types/revamp/domain/mappers/schema/utils/mapCommonSchemaProps.d.ts +27 -0
  214. package/build/types/revamp/domain/mappers/types.d.ts +19 -0
  215. package/build/types/revamp/domain/mappers/utils/getAutocompleteString.d.ts +2 -0
  216. package/build/types/revamp/domain/mappers/utils/getRandomId.d.ts +1 -0
  217. package/build/types/revamp/domain/mappers/utils/legacy-utils.d.ts +7 -0
  218. package/build/types/revamp/domain/types.d.ts +88 -0
  219. package/build/types/revamp/flow/executeRefresh.d.ts +19 -0
  220. package/build/types/revamp/flow/executeSubmission.d.ts +20 -0
  221. package/build/types/revamp/flow/getResponseType.d.ts +10 -0
  222. package/build/types/revamp/flow/response-utils.d.ts +6 -0
  223. package/build/types/revamp/renderers/CoreContainerRenderer.d.ts +7 -0
  224. package/build/types/revamp/renderers/mappers/alertComponentToProps.d.ts +3 -0
  225. package/build/types/revamp/renderers/mappers/allOfComponentToProps.d.ts +4 -0
  226. package/build/types/revamp/renderers/mappers/booleanInputComponentToProps.d.ts +3 -0
  227. package/build/types/revamp/renderers/mappers/boxComponentToProps.d.ts +4 -0
  228. package/build/types/revamp/renderers/mappers/buttonComponentToProps.d.ts +3 -0
  229. package/build/types/revamp/renderers/mappers/columnsComponentToProps.d.ts +4 -0
  230. package/build/types/revamp/renderers/mappers/componentToRendererProps.d.ts +9 -0
  231. package/build/types/revamp/renderers/mappers/containerComponentToProps.d.ts +3 -0
  232. package/build/types/revamp/renderers/mappers/dateInputComponentToProps.d.ts +3 -0
  233. package/build/types/revamp/renderers/mappers/decisionComponentToProps.d.ts +3 -0
  234. package/build/types/revamp/renderers/mappers/dividerComponentToProps.d.ts +3 -0
  235. package/build/types/revamp/renderers/mappers/formComponentToProps.d.ts +4 -0
  236. package/build/types/revamp/renderers/mappers/headingComponentToProps.d.ts +3 -0
  237. package/build/types/revamp/renderers/mappers/hiddenComponentToProps.d.ts +2 -0
  238. package/build/types/revamp/renderers/mappers/imageComponentToProps.d.ts +3 -0
  239. package/build/types/revamp/renderers/mappers/instructionsComponentToProps.d.ts +3 -0
  240. package/build/types/revamp/renderers/mappers/integerInputComponentToProps.d.ts +3 -0
  241. package/build/types/revamp/renderers/mappers/loadingIndicatorComponentToProps.d.ts +3 -0
  242. package/build/types/revamp/renderers/mappers/markdownComponentToProps.d.ts +3 -0
  243. package/build/types/revamp/renderers/mappers/modalComponentToProps.d.ts +4 -0
  244. package/build/types/revamp/renderers/mappers/multiUploadInputComponentToProps.d.ts +3 -0
  245. package/build/types/revamp/renderers/mappers/numberInputComponentToProps.d.ts +3 -0
  246. package/build/types/revamp/renderers/mappers/objectComponentToProps.d.ts +4 -0
  247. package/build/types/revamp/renderers/mappers/paragraphComponentToProps.d.ts +3 -0
  248. package/build/types/revamp/renderers/mappers/repeatableComponentToProps.d.ts +4 -0
  249. package/build/types/revamp/renderers/mappers/reviewComponentToProps.d.ts +3 -0
  250. package/build/types/revamp/renderers/mappers/searchComponentToProps.d.ts +3 -0
  251. package/build/types/revamp/renderers/mappers/selectInputComponentToProps.d.ts +4 -0
  252. package/build/types/revamp/renderers/mappers/statusListComponentToProps.d.ts +3 -0
  253. package/build/types/revamp/renderers/mappers/textInputComponentToProps.d.ts +3 -0
  254. package/build/types/revamp/renderers/mappers/uploadInputComponentToProps.d.ts +3 -0
  255. package/build/types/revamp/renderers/mappers/utils/inputComponentToProps.d.ts +17 -0
  256. package/build/types/revamp/renderers/types.d.ts +314 -0
  257. package/build/types/revamp/step/Step.d.ts +22 -0
  258. package/build/types/revamp/step/utils/getRenderFunction.d.ts +3 -0
  259. package/build/types/revamp/step/utils/getSchemaErrorMessageFunction.d.ts +3 -0
  260. package/build/types/revamp/stories/utils/fixtureHttpClient.d.ts +2 -0
  261. package/build/types/revamp/stories/utils/mockSearchHandler.d.ts +1 -0
  262. package/build/types/revamp/test-utils/component-utils.d.ts +2 -0
  263. package/build/types/revamp/test-utils/step-utils.d.ts +2 -0
  264. package/build/types/revamp/types.d.ts +41 -0
  265. package/build/types/revamp/utils/component-utils.d.ts +6 -0
  266. package/build/types/revamp/utils/findComponent.d.ts +2 -0
  267. package/build/types/revamp/utils/type-utils.d.ts +41 -0
  268. package/build/types/revamp/utils/type-validators.d.ts +10 -0
  269. package/build/types/revamp/wise/renderers/AlertRenderer.d.ts +3 -0
  270. package/build/types/revamp/wise/renderers/BooleanInputRenderer.d.ts +3 -0
  271. package/build/types/revamp/wise/renderers/BoxRenderer.d.ts +3 -0
  272. package/build/types/revamp/wise/renderers/ButtonRenderer.d.ts +3 -0
  273. package/build/types/revamp/wise/renderers/ColumnsRenderer.d.ts +3 -0
  274. package/build/types/revamp/wise/renderers/DateInputRenderer.d.ts +3 -0
  275. package/build/types/revamp/wise/renderers/DecisionRenderer.d.ts +3 -0
  276. package/build/types/revamp/wise/renderers/DividerRenderer.d.ts +3 -0
  277. package/build/types/revamp/wise/renderers/FormRenderer.d.ts +3 -0
  278. package/build/types/revamp/wise/renderers/FormSectionRenderer.d.ts +3 -0
  279. package/build/types/revamp/wise/renderers/HeadingRenderer.d.ts +3 -0
  280. package/build/types/revamp/wise/renderers/ImageRenderer.d.ts +3 -0
  281. package/build/types/revamp/wise/renderers/InstructionsRenderer.d.ts +3 -0
  282. package/build/types/revamp/wise/renderers/IntegerInputRenderer.d.ts +3 -0
  283. package/build/types/revamp/wise/renderers/LoadingIndicatorRenderer.d.ts +3 -0
  284. package/build/types/revamp/wise/renderers/MarkdownRenderer.d.ts +3 -0
  285. package/build/types/revamp/wise/renderers/ModalRenderer.d.ts +3 -0
  286. package/build/types/revamp/wise/renderers/MultiUploadInputRenderer.d.ts +3 -0
  287. package/build/types/revamp/wise/renderers/NumberInputRenderer.d.ts +3 -0
  288. package/build/types/revamp/wise/renderers/ParagraphRenderer.d.ts +3 -0
  289. package/build/types/revamp/wise/renderers/RepeatableRenderer.d.ts +3 -0
  290. package/build/types/revamp/wise/renderers/ReviewRenderer.d.ts +3 -0
  291. package/build/types/revamp/wise/renderers/SearchRenderer.d.ts +15 -0
  292. package/build/types/revamp/wise/renderers/SelectInputRenderer/OptionMedia.d.ts +5 -0
  293. package/build/types/revamp/wise/renderers/SelectInputRenderer/RadioInputRendererComponent.d.ts +2 -0
  294. package/build/types/revamp/wise/renderers/SelectInputRenderer/SelectInputRenderer.d.ts +3 -0
  295. package/build/types/revamp/wise/renderers/SelectInputRenderer/SelectInputRendererComponent.d.ts +2 -0
  296. package/build/types/revamp/wise/renderers/SelectInputRenderer/SelectTriggerMedia.d.ts +5 -0
  297. package/build/types/revamp/wise/renderers/SelectInputRenderer/TabInputRendererComponent.d.ts +2 -0
  298. package/build/types/revamp/wise/renderers/StatusListRenderer.d.ts +4 -0
  299. package/build/types/revamp/wise/renderers/TextInputRenderer.d.ts +3 -0
  300. package/build/types/revamp/wise/renderers/UploadInputRenderer.d.ts +4 -0
  301. package/build/types/revamp/wise/renderers/components/FieldInput.d.ts +11 -0
  302. package/build/types/revamp/wise/renderers/components/Help.d.ts +4 -0
  303. package/build/types/revamp/wise/renderers/components/LabelContentWithHelp.d.ts +4 -0
  304. package/build/types/revamp/wise/renderers/components/UploadFieldInput.d.ts +11 -0
  305. package/build/types/revamp/wise/renderers/components/VariableDateInput.d.ts +9 -0
  306. package/build/types/revamp/wise/renderers/components/VariableTextInput.d.ts +10 -0
  307. package/build/types/revamp/wise/renderers/components/icon/DynamicIcon.d.ts +6 -0
  308. package/build/types/revamp/wise/renderers/components/icon/FlagIcon.d.ts +6 -0
  309. package/build/types/revamp/wise/renderers/components/icon/NamedIcon.d.ts +6 -0
  310. package/build/types/revamp/wise/renderers/components/icon/NavigationOptionMedia.d.ts +5 -0
  311. package/build/types/revamp/wise/renderers/getWiseRenderers.d.ts +1 -0
  312. package/build/types/revamp/wise/renderers/hooks/useSnackBarIfAvailable.d.ts +10 -0
  313. package/build/types/revamp/wise/renderers/utils/file-utils.d.ts +3 -0
  314. package/build/types/revamp/wise/renderers/utils/getRandomId.d.ts +1 -0
  315. package/build/types/revamp/wise/renderers/utils/input-utils.d.ts +1 -0
  316. package/build/types/revamp/wise/renderers/utils/layout-utils.d.ts +7 -0
  317. package/build/types/revamp/wise/renderers/utils/value-utils.d.ts +3 -0
  318. package/build/types/revamp/wise/renderers/validators/type-validators.d.ts +9 -0
  319. package/build/types/test-utils/NeptuneProviders.d.ts +5 -0
  320. package/build/types/test-utils/fetch-utils.d.ts +20 -0
  321. package/build/types/test-utils/rtl-utils.d.ts +2 -0
  322. package/package.json +65 -67
  323. package/build/types/common/contexts/eventsContext/EventsContext.d.ts +0 -15
  324. package/build/types/common/hooks/useDebouncedFunction/useDebouncedFunction.d.ts +0 -2
  325. package/build/types/common/utils/debounce.d.ts +0 -6
  326. package/build/types/dynamicFlow/BackButton.d.ts +0 -9
  327. package/build/types/dynamicFlow/DynamicFlow.d.ts +0 -3
  328. package/build/types/dynamicFlow/DynamicFlowStep.d.ts +0 -8
  329. package/build/types/dynamicFlow/DynamicFlowTypes.d.ts +0 -46
  330. package/build/types/dynamicFlow/utils/errorBoundary/ErrorBoundaryAlert.d.ts +0 -5
  331. package/build/types/dynamicFlow/utils/useDebouncedRefresh/useDebouncedRefresh.d.ts +0 -6
  332. package/build/types/formControl/utils/index.d.ts +0 -1
  333. package/build/types/jsonSchemaForm/allOfSchema/AllOfSchema.d.ts +0 -13
  334. package/build/types/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/MultipleFileUploadSchema.d.ts +0 -16
  335. package/build/types/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/RepeatableSchema.d.ts +0 -8
  336. package/build/types/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/RepeatableSchemaStep.d.ts +0 -14
  337. package/build/types/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/utils/summary-utils.d.ts +0 -3
  338. package/build/types/jsonSchemaForm/help/Help.messages.d.ts +0 -8
  339. package/build/types/jsonSchemaForm/objectSchema/ObjectSchema.d.ts +0 -15
  340. package/build/types/jsonSchemaForm/oneOfSchema/OneOfSchema.d.ts +0 -14
  341. package/build/types/jsonSchemaForm/persistAsyncSchema/PersistAsyncSchema.d.ts +0 -15
  342. package/build/types/jsonSchemaForm/persistAsyncSchema/PersistAsyncSchema.messages.d.ts +0 -8
  343. package/build/types/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/UploadInputAdapter.d.ts +0 -16
  344. package/build/types/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfRadioControl.d.ts +0 -8
  345. package/build/types/jsonSchemaForm/readOnlySchema/ReadOnlySchema.d.ts +0 -7
  346. package/build/types/jsonSchemaForm/schemaFormControl/SchemaFormControl.d.ts +0 -23
  347. package/build/types/jsonSchemaForm/schemaFormControl/utils/control-type-utils.d.ts +0 -2
  348. package/build/types/jsonSchemaForm/validationAsyncSchema/ValidationAsyncSchema.d.ts +0 -15
  349. package/build/types/layout/button/DynamicButton.d.ts +0 -7
  350. package/build/types/layout/decision/DynamicDecision.d.ts +0 -8
  351. package/build/types/layout/form/DynamicForm.d.ts +0 -7
  352. package/build/types/layout/image/DynamicImage.d.ts +0 -6
  353. package/build/types/layout/paragraph/DynamicParagraph.d.ts +0 -6
  354. package/build/types/layout/review/DynamicReview.d.ts +0 -8
  355. package/build/types/layout/search/DynamicSearch.d.ts +0 -8
  356. package/build/types/layout/search/SearchResults.d.ts +0 -10
  357. package/build/types/step/cameraStep/CameraStep.d.ts +0 -7
  358. package/build/types/step/cameraStep/cameraCapture/CameraCapture.d.ts +0 -15
  359. package/build/types/step/cameraStep/cameraCapture/CameraCapture.messages.d.ts +0 -18
  360. package/build/types/step/cameraStep/cameraCapture/screens/CameraNotSupported/CameraNotSupported.d.ts +0 -2
  361. package/build/types/step/cameraStep/cameraCapture/screens/NoCameraAccess/NoCameraAccess.d.ts +0 -5
  362. package/build/types/step/cameraStep/cameraCapture/screens/index.d.ts +0 -2
  363. package/build/types/step/cameraStep/cameraCapture/tracking/index.d.ts +0 -7
  364. package/build/types/{dynamicFlow/utils → common}/errorBoundary/ErrorBoundary.d.ts +1 -1
  365. /package/build/types/{jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/MultipleFileUploadSchema.messages.d.ts → common/messages/multi-file-upload.messages.d.ts} +0 -0
  366. /package/build/types/{layout/paragraph/DynamicParagraph.messages.d.ts → common/messages/paragraph.messages.d.ts} +0 -0
  367. /package/build/types/{jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/RepeatableSchema.messages.d.ts → common/messages/repeatable.messages.d.ts} +0 -0
  368. /package/build/types/{jsonSchemaForm/controlFeedback/ControlFeedback.messages.d.ts → common/messages/validation.messages.d.ts} +0 -0
  369. /package/build/types/{common → legacy/common}/constants/DateMode.d.ts +0 -0
  370. /package/build/types/{common → legacy/common}/constants/MonthFormat.d.ts +0 -0
  371. /package/build/types/{common → legacy/common}/constants/Size.d.ts +0 -0
  372. /package/build/types/{common → legacy/common}/constants/index.d.ts +0 -0
  373. /package/build/types/{common → legacy/common}/contexts/dynamicFlowContexts/DynamicFlowContexts.d.ts +0 -0
  374. /package/build/types/{common → legacy/common}/contexts/dynamicFlowContexts/usePendingPromiseCounter.d.ts +0 -0
  375. /package/build/types/{common → legacy/common}/hooks/index.d.ts +0 -0
  376. /package/build/types/{common → legacy/common}/hooks/useExternal/useExternal.d.ts +0 -0
  377. /package/build/types/{common → legacy/common}/hooks/usePolling/usePolling.d.ts +0 -0
  378. /package/build/types/{common → legacy/common}/hooks/usePrevious/usePrevious.d.ts +0 -0
  379. /package/build/types/{common → legacy/common}/messages.d.ts +0 -0
  380. /package/build/types/{common → legacy/common}/utils/date-utils.d.ts +0 -0
  381. /package/build/types/{common → legacy/common}/utils/id-utils.d.ts +0 -0
  382. /package/build/types/{common → legacy/common}/utils/is-equal.d.ts +0 -0
  383. /package/build/types/{common → legacy/common}/validators/index.d.ts +0 -0
  384. /package/build/types/{common → legacy/common}/validators/types/type-validators.d.ts +0 -0
  385. /package/build/types/{common → legacy/common}/validators/validationFailures/validation-failures.utils.d.ts +0 -0
  386. /package/build/types/{common → legacy/common}/validators/values/value-validators.d.ts +0 -0
  387. /package/build/types/{dynamicFlow → legacy/dynamicFlow}/index.d.ts +0 -0
  388. /package/build/types/{formControl → legacy/formControl}/index.d.ts +0 -0
  389. /package/build/types/{formControl → legacy/formControl}/utils/value-utils.d.ts +0 -0
  390. /package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/allOfSchema/index.d.ts +0 -0
  391. /package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/arrayTypeSchema/ArraySchema.d.ts +0 -0
  392. /package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/arrayTypeSchema/arrayListSchema/ArrayListSchema.d.ts +0 -0
  393. /package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/arrayTypeSchema/arrayListSchema/index.d.ts +0 -0
  394. /package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/index.d.ts +0 -0
  395. /package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/index.d.ts +0 -0
  396. /package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/useFormattedDefaultErrorMessages.d.ts +0 -0
  397. /package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/arrayTypeSchema/index.d.ts +0 -0
  398. /package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/basicTypeSchema/BasicTypeSchema.d.ts +0 -0
  399. /package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/basicTypeSchema/index.d.ts +0 -0
  400. /package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/controlFeedback/index.d.ts +0 -0
  401. /package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/genericSchema/index.d.ts +0 -0
  402. /package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/help/index.d.ts +0 -0
  403. /package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/index.d.ts +0 -0
  404. /package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/objectSchema/index.d.ts +0 -0
  405. /package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/oneOfSchema/index.d.ts +0 -0
  406. /package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/persistAsyncSchema/index.d.ts +0 -0
  407. /package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/persistAsyncSchema/persistAsyncBasicSchema/index.d.ts +0 -0
  408. /package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/persistAsyncSchema/persistAsyncBlobSchema/index.d.ts +0 -0
  409. /package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/promotedOneOfSchema/PromotedOneOfSchema.d.ts +0 -0
  410. /package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/promotedOneOfSchema/index.d.ts +0 -0
  411. /package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/promotedOneOfSchema/promoted-one-of-utils.d.ts +0 -0
  412. /package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfCheckboxControl.d.ts +0 -0
  413. /package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/readOnlySchema/ReadOnlySchema.messages.d.ts +0 -0
  414. /package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/readOnlySchema/index.d.ts +0 -0
  415. /package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/schemaFormControl/index.d.ts +0 -0
  416. /package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/schemaFormControl/utils/index.d.ts +0 -0
  417. /package/build/types/{jsonSchemaForm → legacy/jsonSchemaForm}/validationAsyncSchema/index.d.ts +0 -0
  418. /package/build/types/{layout → legacy/layout}/alert/DynamicAlert.d.ts +0 -0
  419. /package/build/types/{layout → legacy/layout}/box/DynamicBox.d.ts +0 -0
  420. /package/build/types/{layout → legacy/layout}/columns/DynamicColumns.d.ts +0 -0
  421. /package/build/types/{layout → legacy/layout}/divider/DynamicDivider.d.ts +0 -0
  422. /package/build/types/{layout → legacy/layout}/external/DynamicExternal.d.ts +0 -0
  423. /package/build/types/{layout → legacy/layout}/external/DynamicExternal.messages.d.ts +0 -0
  424. /package/build/types/{layout → legacy/layout}/heading/DynamicHeading.d.ts +0 -0
  425. /package/build/types/{layout → legacy/layout}/instructions/DynamicInstructions.d.ts +0 -0
  426. /package/build/types/{layout → legacy/layout}/list/DynamicStatusList.d.ts +0 -0
  427. /package/build/types/{layout → legacy/layout}/loadingIndicator/DynamicLoadingIndicator.d.ts +0 -0
  428. /package/build/types/{layout → legacy/layout}/markdown/DynamicMarkdown.d.ts +0 -0
  429. /package/build/types/{layout → legacy/layout}/paragraph/useSnackBarIfAvailable.d.ts +0 -0
  430. /package/build/types/{layout → legacy/layout}/search/SearchInput.d.ts +0 -0
  431. /package/build/types/{layout → legacy/layout}/utils/getNavigationOptionMedia.d.ts +0 -0
  432. /package/build/types/{step/cameraStep/cameraCapture/components/index.d.ts → legacy/step/cameraStep/cameraCapture/components/bottomBar/BottomBar.d.ts} +0 -0
  433. /package/build/types/{step/cameraStep/cameraCapture/hooks/index.d.ts → legacy/step/cameraStep/cameraCapture/hooks/useVideoConstraints.d.ts} +0 -0
  434. /package/build/types/{step → legacy/step}/cameraStep/cameraCapture/index.d.ts +0 -0
  435. /package/build/types/{step → legacy/step}/cameraStep/cameraCapture/utils/index.d.ts +0 -0
  436. /package/build/types/{step → legacy/step}/cameraStep/index.d.ts +0 -0
  437. /package/build/types/{step → legacy/step}/externalConfirmationStep/ExternalConfirmationStep.d.ts +0 -0
  438. /package/build/types/{step → legacy/step}/externalConfirmationStep/ExternalConfirmationStep.messages.d.ts +0 -0
  439. /package/build/types/{step → legacy/step}/externalConfirmationStep/index.d.ts +0 -0
  440. /package/build/types/{step → legacy/step}/index.d.ts +0 -0
  441. /package/build/types/{step → legacy/step}/layoutStep/LayoutStep.d.ts +0 -0
  442. /package/build/types/{step → legacy/step}/layoutStep/index.d.ts +0 -0
  443. /package/build/types/{step → legacy/step}/layoutStep/utils/index.d.ts +0 -0
  444. /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,3 @@
1
+ import type { SearchConfig, PerformSearch } from '../../components/searchComponent/SearchComponent';
2
+ import type { HttpClient } from '../../../types';
3
+ export declare const getPerformSearchFunction: (httpClient: HttpClient, defaultConfig: SearchConfig) => PerformSearch;
@@ -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,2 @@
1
+ import type { AlertLayout } from '@wise/dynamic-flow-types/build/next';
2
+ export declare const alertLayoutToComponent: (uid: string, { control, markdown, margin, context }: AlertLayout) => import("../../components/AlertComponent").AlertComponent;
@@ -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,2 @@
1
+ import { DividerLayout } from '@wise/dynamic-flow-types/build/next';
2
+ export declare const dividerLayoutToComponent: (uid: string, { control, margin }: DividerLayout) => import("../../components/DividerComponent").DividerComponent;
@@ -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 { HeadingLayout } from '@wise/dynamic-flow-types/build/next';
2
+ export declare const headingLayoutToComponent: (uid: string, { align, margin, size, control, text }: HeadingLayout) => import("../../components/HeadingComponent").HeadingComponent;
@@ -0,0 +1,2 @@
1
+ import type { ImageLayout } from '@wise/dynamic-flow-types/build/next';
2
+ export declare const imageLayoutToComponent: (uid: string, { accessibilityDescription, control, margin, size, text, url }: ImageLayout) => import("../../components/ImageComponent").ImageComponent;
@@ -0,0 +1,2 @@
1
+ import type { InfoLayout } from '@wise/dynamic-flow-types/build/next';
2
+ export declare const infoLayoutToComponent: (uid: string, { align, control, margin, markdown: content }: InfoLayout) => import("../../components/MarkdownComponent").MarkdownComponent;
@@ -0,0 +1,2 @@
1
+ import type { InstructionsLayout } from '@wise/dynamic-flow-types/build/next';
2
+ export declare const instructionsLayoutToComponent: (uid: string, { control, items, margin, title }: InstructionsLayout) => import("../../components/InstructionsComponent").InstructionsComponent;
@@ -0,0 +1,2 @@
1
+ import type { ListLayout } from '@wise/dynamic-flow-types/build/next';
2
+ export declare const listLayoutToComponent: (uid: string, { control, items, margin, title }: ListLayout) => import("../../components/StatusListComponent").StatusListComponent;
@@ -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,2 @@
1
+ import type { MarkdownLayout } from '@wise/dynamic-flow-types/build/next';
2
+ export declare const markdownLayoutToComponent: (uid: string, { align, margin, control, content }: MarkdownLayout) => import("../../components/MarkdownComponent").MarkdownComponent;
@@ -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,2 @@
1
+ import type { ParagraphLayout } from '@wise/dynamic-flow-types/build/next';
2
+ export declare const paragraphLayoutToComponent: (uid: string, { align, control, margin, text }: ParagraphLayout) => import("../../components/ParagraphComponent").ParagraphComponent;
@@ -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,2 @@
1
+ import type { StatusListLayout } from '@wise/dynamic-flow-types/build/next';
2
+ export declare const statusListLayoutToComponent: (uid: string, { control, items, margin, title }: StatusListLayout) => import("../../components/StatusListComponent").StatusListComponent;
@@ -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,3 @@
1
+ import type { StepComponent } from '../types';
2
+ import type { MapperProps, SchemaMapperProps } from './schema/types';
3
+ export declare const mapSchemaToComponent: (schemaMapperProps: SchemaMapperProps, 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;
@@ -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;
@@ -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,2 @@
1
+ import type { AutocompleteToken } from '@wise/dynamic-flow-types';
2
+ export declare const getAutocompleteString: (hints: AutocompleteToken[] | undefined) => string;
@@ -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;
@@ -0,0 +1,7 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { Renderer } from './types';
3
+ export interface CoreContainerRendererProps {
4
+ type: 'container';
5
+ children: ReactNode;
6
+ }
7
+ export declare const CoreContainerRenderer: Renderer<CoreContainerRendererProps>;