@wise/dynamic-flow-client 3.5.0-experimental-63c768d → 3.5.1-experimental-ccbce45

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (345) hide show
  1. package/build/common/errorBoundary/ErrorBoundaryAlert.js +1 -1
  2. package/build/common/httpClientContext/HttpClientContext.js +2 -13
  3. package/build/common/makeHttpClient/makeHttpClient.spec.js +10 -10
  4. package/build/common/messages/external-confirmation.messages.js +5 -5
  5. package/build/common/messages/generic-error.messages.js +4 -4
  6. package/build/common/messages/help.messages.js +2 -2
  7. package/build/common/messages/multi-file-upload.messages.js +4 -4
  8. package/build/common/messages/multi-select.messages.js +2 -2
  9. package/build/common/messages/paragraph.messages.js +3 -3
  10. package/build/common/messages/repeatable.messages.js +5 -5
  11. package/build/common/messages/validation.array.messages.js +3 -3
  12. package/build/common/messages/validation.messages.js +11 -11
  13. package/build/i18n/index.js +1 -1
  14. package/build/legacy/common/constants/DateMode.js +1 -1
  15. package/build/legacy/common/constants/FormControlType.js +1 -1
  16. package/build/legacy/common/constants/MonthFormat.js +1 -1
  17. package/build/legacy/common/constants/Size.js +1 -1
  18. package/build/legacy/common/contexts/dynamicFlowContexts/DynamicFlowContexts.js +3 -14
  19. package/build/legacy/common/contexts/dynamicFlowContexts/usePendingPromiseCounter.js +3 -1
  20. package/build/legacy/common/contexts/eventsContext/EventsContext.js +2 -2
  21. package/build/legacy/common/contexts/eventsContext/EventsContext.spec.js +1 -12
  22. package/build/legacy/common/contexts/featureContext/FeatureContext.js +1 -12
  23. package/build/legacy/common/contexts/featureContext/FeatureContext.spec.js +4 -15
  24. package/build/legacy/common/contexts/logContext/LogContext.js +2 -2
  25. package/build/legacy/common/contexts/logContext/LogContext.spec.js +1 -12
  26. package/build/legacy/common/hooks/useExternal/useExternal.spec.js +6 -6
  27. package/build/legacy/common/hooks/useExternalStepPolling/useExternalStepPolling.js +3 -2
  28. package/build/legacy/common/hooks/usePersistAsync/usePersistAsync.js +1 -1
  29. package/build/legacy/common/hooks/usePolling/usePolling.js +4 -2
  30. package/build/legacy/common/hooks/useStepPolling/useStepPolling.js +5 -3
  31. package/build/legacy/common/hooks/useStepPolling/useStepPolling.spec.js +4 -4
  32. package/build/legacy/common/messages.js +2 -2
  33. package/build/legacy/common/utils/file-utils.spec.js +4 -4
  34. package/build/legacy/common/utils/mobile-utils.spec.js +1 -1
  35. package/build/legacy/common/utils/schema-utils.js +2 -2
  36. package/build/legacy/common/validators/models/model-utils.spec.js +7 -7
  37. package/build/legacy/common/validators/models/model-validators.js +2 -2
  38. package/build/legacy/common/validators/models/model-validators.spec.js +54 -54
  39. package/build/legacy/common/validators/schemas/schema-validators.js +1 -1
  40. package/build/legacy/common/validators/schemas/schema-validators.spec.js +20 -20
  41. package/build/legacy/common/validators/validationFailures/validation-failures.js +2 -2
  42. package/build/legacy/common/validators/validationFailures/validation-failures.spec.js +11 -11
  43. package/build/legacy/dynamicFlow/BackButton.js +2 -2
  44. package/build/legacy/dynamicFlow/DynamicFlow.js +5 -5
  45. package/build/legacy/dynamicFlow/stories/dev-tools/DynamicFlow.story.js +7 -7
  46. package/build/legacy/dynamicFlow/stories/dev-tools/ErrorResponses.story.js +18 -18
  47. package/build/legacy/dynamicFlow/stories/dev-tools/Examples.story.js +1 -1
  48. package/build/legacy/dynamicFlow/stories/dev-tools/Features.story.js +1 -1
  49. package/build/legacy/dynamicFlow/stories/dev-tools/JsonSchemaForm.story.js +5 -5
  50. package/build/legacy/dynamicFlow/stories/dev-tools/RefreshOnChange.story.js +24 -24
  51. package/build/legacy/dynamicFlow/stories/dev-tools/SearchFeature.story.js +10 -21
  52. package/build/legacy/dynamicFlow/stories/dev-tools/ServerTest.story.js +4 -4
  53. package/build/legacy/dynamicFlow/stories/dev-tools/Upload.story.js +19 -19
  54. package/build/legacy/dynamicFlow/stories/dev-tools/ValidationAsync.story.js +18 -18
  55. package/build/legacy/dynamicFlow/stories/examples/ObjectConst.story.js +25 -25
  56. package/build/legacy/dynamicFlow/tests/Actions.spec.js +6 -6
  57. package/build/legacy/dynamicFlow/tests/AllOfSchema.spec.js +17 -17
  58. package/build/legacy/dynamicFlow/tests/AutocompleteHints.spec.js +6 -6
  59. package/build/legacy/dynamicFlow/tests/DynamicFlow.BackButton.spec.js +11 -11
  60. package/build/legacy/dynamicFlow/tests/DynamicFlow.search.spec.js +13 -13
  61. package/build/legacy/dynamicFlow/tests/DynamicFlow.spec.js +48 -48
  62. package/build/legacy/dynamicFlow/tests/DynamicImage.spec.js +4 -4
  63. package/build/legacy/dynamicFlow/tests/DynamicInstructions.spec.js +3 -3
  64. package/build/legacy/dynamicFlow/tests/HiddenSchemas.spec.js +24 -24
  65. package/build/legacy/dynamicFlow/tests/ModalLayout.spec.js +20 -20
  66. package/build/legacy/dynamicFlow/tests/MultiSelect.spec.js +21 -21
  67. package/build/legacy/dynamicFlow/tests/MultipleFileUploadSchema.spec.js +24 -24
  68. package/build/legacy/dynamicFlow/tests/ObjectSchema.spec.js +16 -16
  69. package/build/legacy/dynamicFlow/tests/OneOfSchema.spec.js +77 -77
  70. package/build/legacy/dynamicFlow/tests/PersistAsync.blob-schema.spec.js +19 -19
  71. package/build/legacy/dynamicFlow/tests/PersistAsync.string-schema.spec.js +10 -10
  72. package/build/legacy/dynamicFlow/tests/RefreshStepOnChange.debouncing.spec.js +19 -19
  73. package/build/legacy/dynamicFlow/tests/RefreshStepOnChange.spec.js +46 -46
  74. package/build/legacy/dynamicFlow/tests/RepeatableSchema.spec.js +62 -62
  75. package/build/legacy/dynamicFlow/tests/StepModel.spec.js +6 -6
  76. package/build/legacy/dynamicFlow/tests/ValidationAsync.spec.js +13 -13
  77. package/build/legacy/dynamicFlow/utils/responseParsers/response-parsers.spec.js +13 -13
  78. package/build/legacy/dynamicFlow/utils/useDynamicFlowState.js +4 -4
  79. package/build/legacy/formControl/FormControl.js +9 -9
  80. package/build/legacy/formControl/Select.spec.js +3 -3
  81. package/build/legacy/formControl/utils/getAutocompleteString.js +1 -1
  82. package/build/legacy/formControl/utils/value-utils.js +1 -1
  83. package/build/legacy/jsonSchemaForm/JsonSchemaForm.end-to-end.spec.js +66 -66
  84. package/build/legacy/jsonSchemaForm/JsonSchemaForm.js +1 -1
  85. package/build/legacy/jsonSchemaForm/allOfSchema/AllOfSchema.js +5 -5
  86. package/build/legacy/jsonSchemaForm/arrayTypeSchema/ArraySchema.js +1 -1
  87. package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/ArrayListSchema.js +1 -1
  88. package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multiSelectSchema/MultiSelectSchema.js +6 -17
  89. package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/MultipleFileUploadSchema.js +3 -3
  90. package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/useFormattedDefaultErrorMessages.js +1 -1
  91. package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/RepeatableSchema.js +7 -7
  92. package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/RepeatableSchemaStep.js +6 -6
  93. package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/utils/summary-utils.js +7 -7
  94. package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/utils/summary-utils.spec.js +190 -190
  95. package/build/legacy/jsonSchemaForm/basicTypeSchema/BasicTypeSchema.js +8 -19
  96. package/build/legacy/jsonSchemaForm/controlFeedback/ControlFeedback.js +14 -14
  97. package/build/legacy/jsonSchemaForm/genericSchema/GenericSchema.rtl.spec.js +2 -2
  98. package/build/legacy/jsonSchemaForm/help/Help.js +1 -12
  99. package/build/legacy/jsonSchemaForm/objectSchema/ObjectSchema.js +4 -4
  100. package/build/legacy/jsonSchemaForm/oneOfSchema/OneOfSchema.js +12 -12
  101. package/build/legacy/jsonSchemaForm/oneOfSchema/utils.js +6 -6
  102. package/build/legacy/jsonSchemaForm/persistAsyncSchema/PersistAsyncSchema.js +1 -1
  103. package/build/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBasicSchema/PersistAsyncBasicSchema.js +2 -2
  104. package/build/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/PersistAsyncBlobSchema.js +4 -4
  105. package/build/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/UploadInputAdapter.js +2 -2
  106. package/build/legacy/jsonSchemaForm/promotedOneOfSchema/PromotedOneOfSchema.js +2 -2
  107. package/build/legacy/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfCheckboxControl.js +1 -12
  108. package/build/legacy/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfControl.js +1 -1
  109. package/build/legacy/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfRadioControl.js +3 -3
  110. package/build/legacy/jsonSchemaForm/readOnlySchema/ReadOnlySchema.js +1 -1
  111. package/build/legacy/jsonSchemaForm/readOnlySchema/ReadOnlySchema.messages.js +3 -3
  112. package/build/legacy/jsonSchemaForm/schemaFormControl/SchemaFormControl.js +6 -6
  113. package/build/legacy/jsonSchemaForm/schemaFormControl/SchemaFormControl.spec.js +12 -12
  114. package/build/legacy/jsonSchemaForm/schemaFormControl/utils/mapping-utils.js +10 -10
  115. package/build/legacy/jsonSchemaForm/schemaFormControl/utils/mapping-utils.spec.js +23 -23
  116. package/build/legacy/jsonSchemaForm/validationAsyncSchema/ValidationAsyncSchema.js +2 -2
  117. package/build/legacy/layout/DynamicLayout.js +1 -1
  118. package/build/legacy/layout/box/DynamicBox.js +2 -13
  119. package/build/legacy/layout/button/DynamicButton.js +1 -12
  120. package/build/legacy/layout/button/DynamicButton.spec.js +13 -24
  121. package/build/legacy/layout/button/utils.js +3 -3
  122. package/build/legacy/layout/button/utils.spec.js +6 -6
  123. package/build/legacy/layout/columns/DynamicColumns.js +4 -15
  124. package/build/legacy/layout/decision/DynamicDecision.js +1 -12
  125. package/build/legacy/layout/external/DynamicExternal.js +1 -1
  126. package/build/legacy/layout/external/DynamicExternal.messages.js +2 -2
  127. package/build/legacy/layout/form/DynamicForm.js +2 -2
  128. package/build/legacy/layout/heading/DynamicHeading.js +8 -19
  129. package/build/legacy/layout/image/DynamicImage.js +5 -4
  130. package/build/legacy/layout/instructions/DynamicInstructions.js +1 -12
  131. package/build/legacy/layout/list/DynamicStatusList.js +3 -3
  132. package/build/legacy/layout/list/DynamicStatusList.spec.js +9 -9
  133. package/build/legacy/layout/loadingIndicator/DynamicLoadingIndicator.js +1 -1
  134. package/build/legacy/layout/markdown/DynamicMarkdown.js +2 -13
  135. package/build/legacy/layout/markdown/DynamicMarkdown.spec.js +4 -4
  136. package/build/legacy/layout/modal/DynamicModal.js +2 -2
  137. package/build/legacy/layout/paragraph/DynamicParagraph.js +5 -16
  138. package/build/legacy/layout/review/DynamicReview.js +3 -14
  139. package/build/legacy/layout/review/DynamicReview.spec.js +6 -6
  140. package/build/legacy/layout/search/DynamicSearch.js +2 -13
  141. package/build/legacy/layout/search/SearchInput.js +1 -12
  142. package/build/legacy/layout/search/SearchResults.js +3 -14
  143. package/build/legacy/layout/search/useSearch.js +4 -4
  144. package/build/legacy/layout/utils/getNavigationOptionMedia.js +2 -13
  145. package/build/legacy/step/cameraStep/CameraStep.js +1 -1
  146. package/build/legacy/step/cameraStep/cameraCapture/CameraCapture.js +6 -6
  147. package/build/legacy/step/cameraStep/cameraCapture/CameraCapture.messages.js +12 -12
  148. package/build/legacy/step/cameraStep/cameraCapture/CameraCapture.spec.js +13 -13
  149. package/build/legacy/step/cameraStep/cameraCapture/components/bottomBar/BottomBar.js +3 -14
  150. package/build/legacy/step/cameraStep/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.js +1 -12
  151. package/build/legacy/step/cameraStep/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.messages.js +2 -2
  152. package/build/legacy/step/cameraStep/cameraCapture/hooks/useFullScreenOrientationLock.js +6 -4
  153. package/build/legacy/step/cameraStep/cameraCapture/hooks/useVideoConstraints.js +1 -1
  154. package/build/legacy/step/cameraStep/cameraCapture/overlay/Overlay.js +6 -6
  155. package/build/legacy/step/cameraStep/cameraCapture/screens/cameraErrorScreen/CameraErrorScreen.js +1 -12
  156. package/build/legacy/step/cameraStep/cameraCapture/tracking/index.js +1 -1
  157. package/build/legacy/step/externalConfirmationStep/ExternalConfirmationStep.js +7 -7
  158. package/build/legacy/step/layoutStep/LayoutStep.js +1 -1
  159. package/build/legacy/step/layoutStep/utils/inline-reference-utils.js +3 -3
  160. package/build/legacy/step/layoutStep/utils/layout-utils.js +12 -12
  161. package/build/legacy/test-utils/DynamicFlowProviders.js +1 -12
  162. package/build/legacy/test-utils/legacy-utils.js +4 -4
  163. package/build/legacy/test-utils/log-utils.js +1 -1
  164. package/build/revamp/DynamicFlowCore.js +5 -5
  165. package/build/revamp/DynamicFlowWise.js +1 -1
  166. package/build/revamp/DynamicFlowWise.spec.js +11 -11
  167. package/build/revamp/domain/components/AllOfComponent.js +1 -1
  168. package/build/revamp/domain/components/BooleanInputComponent.js +2 -2
  169. package/build/revamp/domain/components/ConstComponent.js +1 -1
  170. package/build/revamp/domain/components/DateInputComponent.js +2 -2
  171. package/build/revamp/domain/components/IntegerInputComponent.js +2 -2
  172. package/build/revamp/domain/components/NumberInputComponent.js +2 -2
  173. package/build/revamp/domain/components/ObjectComponent.js +1 -1
  174. package/build/revamp/domain/components/SelectInputComponent.js +2 -2
  175. package/build/revamp/domain/components/StepDomainComponent.js +1 -1
  176. package/build/revamp/domain/components/TextInputComponent.js +2 -2
  177. package/build/revamp/domain/components/UploadInputComponent.js +1 -1
  178. package/build/revamp/domain/components/repeatableComponent/RepeatableComponent.js +1 -1
  179. package/build/revamp/domain/components/repeatableComponent/RepeatableComponent.spec.js +1 -1
  180. package/build/revamp/domain/components/searchComponent/SearchComponent.js +4 -3
  181. package/build/revamp/domain/components/searchComponent/SearchComponent.spec.js +13 -13
  182. package/build/revamp/domain/components/utils/isPartialLocalValueMatch.spec.js +7 -7
  183. package/build/revamp/domain/features/persistAsync/getComponentPersistAsync.js +4 -4
  184. package/build/revamp/domain/features/persistAsync/getComponentPersistAsync.spec.js +1 -1
  185. package/build/revamp/domain/features/persistAsync/getInitialPersistedState.js +1 -1
  186. package/build/revamp/domain/features/persistAsync/getPerformPersistAsync.spec.js +17 -17
  187. package/build/revamp/domain/features/search/getPerformSearchFunction.js +3 -3
  188. package/build/revamp/domain/features/search/getPerformSearchFunction.spec.js +18 -18
  189. package/build/revamp/domain/features/summary/summary-utils.js +2 -2
  190. package/build/revamp/domain/features/summary/summary-utils.spec.js +27 -27
  191. package/build/revamp/domain/features/utils/http-utils.js +1 -1
  192. package/build/revamp/domain/features/validation/spec-utils.js +1 -1
  193. package/build/revamp/domain/features/validation/validation-functions.spec.js +4 -4
  194. package/build/revamp/domain/features/validation/value-checks.spec.js +4 -4
  195. package/build/revamp/domain/features/validationAsync/getComponentValidationAsync.js +4 -3
  196. package/build/revamp/domain/features/validationAsync/getComponentValidationAsync.spec.js +1 -1
  197. package/build/revamp/domain/features/validationAsync/getInitialValidationState.js +1 -1
  198. package/build/revamp/domain/features/validationAsync/getPerformValidationAsync.js +1 -1
  199. package/build/revamp/domain/features/validationAsync/getPerformValidationAsync.spec.js +17 -17
  200. package/build/revamp/domain/mappers/layout/alertLayoutToComponent.js +1 -1
  201. package/build/revamp/domain/mappers/layout/boxLayoutToComponents.js +1 -1
  202. package/build/revamp/domain/mappers/layout/buttonLayoutToComponent.js +1 -1
  203. package/build/revamp/domain/mappers/layout/columnsLayoutToComponent.js +1 -1
  204. package/build/revamp/domain/mappers/layout/decisionLayoutToComponent.js +1 -1
  205. package/build/revamp/domain/mappers/layout/formLayoutToComponent.js +2 -2
  206. package/build/revamp/domain/mappers/layout/headingLayoutToComponent.js +1 -1
  207. package/build/revamp/domain/mappers/layout/imageLayoutToComponent.js +1 -1
  208. package/build/revamp/domain/mappers/layout/infoLayoutToComponent.js +1 -1
  209. package/build/revamp/domain/mappers/layout/instructionsLayoutToComponent.js +2 -2
  210. package/build/revamp/domain/mappers/layout/listLayoutToComponent.js +2 -2
  211. package/build/revamp/domain/mappers/layout/markdownLayoutToComponent.js +1 -1
  212. package/build/revamp/domain/mappers/layout/modalLayoutToComponent.js +2 -2
  213. package/build/revamp/domain/mappers/layout/paragraphLayoutToComponent.js +1 -1
  214. package/build/revamp/domain/mappers/layout/reviewLayoutToComponent.js +3 -3
  215. package/build/revamp/domain/mappers/layout/searchLayoutToComponent.js +1 -1
  216. package/build/revamp/domain/mappers/layout/statusListLayoutToComponent.js +1 -1
  217. package/build/revamp/domain/mappers/mapSchemaToComponent.js +1 -1
  218. package/build/revamp/domain/mappers/mapSchemaToComponent.spec.js +22 -22
  219. package/build/revamp/domain/mappers/mapStepToComponent.js +3 -3
  220. package/build/revamp/domain/mappers/mapStepToComponent.spec.js +12 -12
  221. package/build/revamp/domain/mappers/schema/allOfSchemaToComponent.js +1 -1
  222. package/build/revamp/domain/mappers/schema/arraySchemaToComponent/arraySchemaToRepeatableComponent.js +2 -2
  223. package/build/revamp/domain/mappers/schema/booleanSchemaToComponent.js +1 -1
  224. package/build/revamp/domain/mappers/schema/constSchemaToComponent.js +2 -2
  225. package/build/revamp/domain/mappers/schema/integerSchemaToComponent.js +1 -1
  226. package/build/revamp/domain/mappers/schema/numberSchemaToComponent.js +1 -1
  227. package/build/revamp/domain/mappers/schema/objectSchemaToComponent/objectSchemaToComponent.js +1 -1
  228. package/build/revamp/domain/mappers/schema/objectSchemaToComponent/objectSchemaToComponent.spec.js +21 -21
  229. package/build/revamp/domain/mappers/schema/oneOfSchemaToComponent/oneOfSchemaToComponent.js +4 -4
  230. package/build/revamp/domain/mappers/schema/oneOfSchemaToComponent/oneOfSchemaToComponent.spec.js +48 -48
  231. package/build/revamp/domain/mappers/schema/stringSchemaToComponent/stringSchemaToComponent.spec.js +21 -21
  232. package/build/revamp/domain/mappers/schema/stringSchemaToComponent/stringSchemaToDateInputComponent.js +1 -1
  233. package/build/revamp/domain/mappers/schema/stringSchemaToComponent/stringSchemaToTextInputComponent.js +1 -1
  234. package/build/revamp/domain/mappers/schema/utils/getPersistAsyncInitialState.js +1 -1
  235. package/build/revamp/domain/mappers/schema/utils/getValidationAsyncInitialState.js +1 -1
  236. package/build/revamp/domain/mappers/utils/getAutocompleteString.js +1 -1
  237. package/build/revamp/domain/mappers/utils/legacy-utils.js +2 -2
  238. package/build/revamp/flow/executeRefresh.js +2 -2
  239. package/build/revamp/flow/executeSubmission.js +1 -1
  240. package/build/revamp/renderers/CoreContainerRenderer.js +1 -1
  241. package/build/revamp/renderers/getRenderFunction.js +3 -3
  242. package/build/revamp/renderers/getSchemaErrorMessageFunction.js +12 -12
  243. package/build/revamp/renderers/mappers/allOfComponentToProps.js +1 -1
  244. package/build/revamp/renderers/mappers/buttonComponentToProps.js +1 -1
  245. package/build/revamp/renderers/mappers/containerComponentToProps.js +1 -1
  246. package/build/revamp/renderers/mappers/headingComponentToProps.js +1 -1
  247. package/build/revamp/renderers/mappers/hiddenComponentToProps.js +1 -1
  248. package/build/revamp/renderers/mappers/imageComponentToProps.js +1 -1
  249. package/build/revamp/renderers/mappers/instructionsComponentToProps.js +1 -1
  250. package/build/revamp/renderers/mappers/loadingIndicatorComponentToProps.js +1 -1
  251. package/build/revamp/renderers/mappers/markdownComponentToProps.js +1 -1
  252. package/build/revamp/renderers/mappers/modalComponentToProps.js +1 -1
  253. package/build/revamp/renderers/mappers/multiUploadInputComponentToProps.js +1 -1
  254. package/build/revamp/renderers/mappers/objectComponentToProps.js +1 -1
  255. package/build/revamp/renderers/mappers/paragraphComponentToProps.js +1 -1
  256. package/build/revamp/renderers/mappers/repeatableComponentToProps.js +2 -2
  257. package/build/revamp/renderers/mappers/reviewComponentToProps.js +1 -1
  258. package/build/revamp/renderers/mappers/searchComponentToProps.js +2 -2
  259. package/build/revamp/renderers/mappers/statusListComponentToProps.js +1 -1
  260. package/build/revamp/renderers/mappers/utils/inputComponentToProps.js +1 -1
  261. package/build/revamp/renderers/step/ExternalConfirmationDialog.js +2 -13
  262. package/build/revamp/renderers/step/StepRenderer.js +2 -13
  263. package/build/revamp/renderers/stepComponentToProps.js +1 -1
  264. package/build/revamp/stories/dev-tools/DynamicFlowRevamp.story.js +53 -53
  265. package/build/revamp/stories/dev-tools/EditableStep.story.js +7 -7
  266. package/build/revamp/stories/dev-tools/ErrorHandling.story.js +17 -17
  267. package/build/revamp/stories/dev-tools/External.story.js +6 -6
  268. package/build/revamp/stories/dev-tools/OneOf.Inititalisation.story.js +14 -14
  269. package/build/revamp/stories/dev-tools/PersistAsync.story.js +16 -16
  270. package/build/revamp/stories/dev-tools/RefreshOnChange.story.js +41 -41
  271. package/build/revamp/stories/dev-tools/RefreshOnChange.with.PersistAsync.story.js +210 -210
  272. package/build/revamp/stories/dev-tools/ServerTest.story.js +4 -4
  273. package/build/revamp/stories/dev-tools/Upload.story.js +18 -18
  274. package/build/revamp/stories/dev-tools/ValidationAsync.story.js +18 -18
  275. package/build/revamp/stories/examples/ObjectConst.story.js +25 -25
  276. package/build/revamp/stories/examples/OneOfInitialisation.story.js +10 -10
  277. package/build/revamp/stories/utils/fixtureHttpClient.js +1 -1
  278. package/build/revamp/stories/utils/mockSearchHandler.js +8 -8
  279. package/build/revamp/stories/visual-tests/VisualTests.story.js +1 -1
  280. package/build/revamp/test-utils/step-utils.js +1 -1
  281. package/build/revamp/tests/ImageRenderer.spec.js +3 -3
  282. package/build/revamp/tests/InitialAction.spec.js +9 -9
  283. package/build/revamp/tests/InitialStep.spec.js +3 -3
  284. package/build/revamp/tests/Logging.spec.js +5 -5
  285. package/build/revamp/tests/OneOfInitialisation.spec.js +73 -73
  286. package/build/revamp/tests/RefreshOnChange.ResponseHandling.spec.js +19 -19
  287. package/build/revamp/tests/RefreshOnChange.with.Tabs.spec.js +57 -57
  288. package/build/revamp/tests/RefreshOnChangePreserve.spec.js +13 -13
  289. package/build/revamp/tests/Submission.ResponseHandling.spec.js +38 -38
  290. package/build/revamp/tests/Submission.spec.js +23 -23
  291. package/build/revamp/tests/legacy/HiddenSchemas.spec.js +24 -24
  292. package/build/revamp/tests/legacy/MultipleFileUploadSchema.spec.js +27 -27
  293. package/build/revamp/tests/legacy/PersistAsync.blob-schema.spec.js +18 -18
  294. package/build/revamp/tests/legacy/PersistAsync.string-schema.spec.js +8 -8
  295. package/build/revamp/tests/legacy/RefreshStepOnChange.debouncing.spec.js +15 -14
  296. package/build/revamp/tests/legacy/RefreshStepOnChange.spec.js +50 -50
  297. package/build/revamp/tests/legacy/ValidationAsync.spec.js +14 -14
  298. package/build/revamp/tests/legacy/useExternal.spec.js +6 -6
  299. package/build/revamp/utils/component-utils.spec.js +43 -43
  300. package/build/revamp/utils/findComponent.spec.js +14 -14
  301. package/build/revamp/utils/type-utils.js +1 -1
  302. package/build/revamp/wise/renderers/AlertRenderer.js +1 -1
  303. package/build/revamp/wise/renderers/BooleanInputRenderer.js +2 -2
  304. package/build/revamp/wise/renderers/BoxRenderer.js +4 -15
  305. package/build/revamp/wise/renderers/ButtonRenderer.js +2 -13
  306. package/build/revamp/wise/renderers/ColumnsRenderer.js +4 -15
  307. package/build/revamp/wise/renderers/DateInputRenderer.js +2 -2
  308. package/build/revamp/wise/renderers/DecisionRenderer.js +3 -14
  309. package/build/revamp/wise/renderers/DividerRenderer.js +1 -1
  310. package/build/revamp/wise/renderers/FormRenderer.js +2 -13
  311. package/build/revamp/wise/renderers/FormSectionRenderer.js +1 -1
  312. package/build/revamp/wise/renderers/HeadingRenderer.js +7 -7
  313. package/build/revamp/wise/renderers/ImageRenderer.js +5 -4
  314. package/build/revamp/wise/renderers/InstructionsRenderer.js +2 -13
  315. package/build/revamp/wise/renderers/IntegerInputRenderer.js +3 -3
  316. package/build/revamp/wise/renderers/LoadingIndicatorRenderer.js +1 -1
  317. package/build/revamp/wise/renderers/MarkdownRenderer.js +2 -13
  318. package/build/revamp/wise/renderers/ModalRenderer.js +2 -2
  319. package/build/revamp/wise/renderers/MultiUploadInputRenderer.js +3 -14
  320. package/build/revamp/wise/renderers/NumberInputRenderer.js +3 -3
  321. package/build/revamp/wise/renderers/ParagraphRenderer.js +5 -4
  322. package/build/revamp/wise/renderers/RepeatableRenderer.js +5 -5
  323. package/build/revamp/wise/renderers/ReviewRenderer.js +5 -16
  324. package/build/revamp/wise/renderers/SearchRenderer.js +5 -5
  325. package/build/revamp/wise/renderers/SelectInputRenderer/OptionMedia.js +2 -13
  326. package/build/revamp/wise/renderers/SelectInputRenderer/RadioInputRendererComponent.js +3 -14
  327. package/build/revamp/wise/renderers/SelectInputRenderer/SelectInputRenderer.js +1 -1
  328. package/build/revamp/wise/renderers/SelectInputRenderer/SelectInputRendererComponent.js +4 -4
  329. package/build/revamp/wise/renderers/SelectInputRenderer/SelectTriggerMedia.js +2 -13
  330. package/build/revamp/wise/renderers/SelectInputRenderer/TabInputRendererComponent.js +3 -14
  331. package/build/revamp/wise/renderers/StatusListRenderer.js +3 -14
  332. package/build/revamp/wise/renderers/TextInputRenderer.js +2 -2
  333. package/build/revamp/wise/renderers/UploadInputRenderer.js +6 -6
  334. package/build/revamp/wise/renderers/components/FieldInput.js +1 -12
  335. package/build/revamp/wise/renderers/components/Help.js +1 -12
  336. package/build/revamp/wise/renderers/components/UploadFieldInput.js +3 -14
  337. package/build/revamp/wise/renderers/components/icon/NavigationOptionMedia.js +2 -13
  338. package/build/test-utils/NeptuneProviders.js +1 -1
  339. package/build/types/common/messages/multi-file-upload.messages.d.ts +9 -9
  340. package/build/types/legacy/common/utils/mobile-utils.d.ts +1 -1
  341. package/build/types/legacy/jsonSchemaForm/readOnlySchema/ReadOnlySchema.messages.d.ts +6 -6
  342. package/build/types/legacy/layout/external/DynamicExternal.messages.d.ts +3 -3
  343. package/build/types/revamp/domain/components/MultiUploadInputComponent.d.ts +1 -1
  344. package/build/types/revamp/domain/components/UploadInputComponent.d.ts +1 -1
  345. package/package.json +3 -3
@@ -82,7 +82,7 @@ describe('parseFetchResponse', function () {
82
82
  expect(parsedBody).toStrictEqual({
83
83
  type: 'step',
84
84
  step: { id: 'step-id' },
85
- etag: '4be5c814'
85
+ etag: '4be5c814',
86
86
  });
87
87
  return [2 /*return*/];
88
88
  }
@@ -101,7 +101,7 @@ describe('parseFetchResponse', function () {
101
101
  expect(parsedBody).toStrictEqual({
102
102
  type: 'step',
103
103
  step: { id: 'step-id' },
104
- etag: undefined
104
+ etag: undefined,
105
105
  });
106
106
  return [2 /*return*/];
107
107
  }
@@ -120,7 +120,7 @@ describe('parseFetchResponse', function () {
120
120
  parsedBody = _a.sent();
121
121
  expect(parsedBody).toStrictEqual({
122
122
  type: 'action',
123
- action: { $id: 'action-id' }
123
+ action: { $id: 'action-id' },
124
124
  });
125
125
  return [2 /*return*/];
126
126
  }
@@ -147,13 +147,13 @@ describe('parseFetchResponse', function () {
147
147
  return __generator(this, function (_a) {
148
148
  switch (_a.label) {
149
149
  case 0: return [4 /*yield*/, parseFetchResponse(new Response("{ \"action\": { \"exit\": true, \"result\": {\"my-result\": 1234 } } }", {
150
- headers: headers
150
+ headers: headers,
151
151
  }))];
152
152
  case 1:
153
153
  parsedBody = _a.sent();
154
154
  expect(parsedBody).toStrictEqual({
155
155
  type: 'exit',
156
- result: { 'my-result': 1234 }
156
+ result: { 'my-result': 1234 },
157
157
  });
158
158
  return [2 /*return*/];
159
159
  }
@@ -168,13 +168,13 @@ describe('parseFetchResponse', function () {
168
168
  return __generator(this, function (_a) {
169
169
  switch (_a.label) {
170
170
  case 0: return [4 /*yield*/, parseFetchResponse(new Response('{"id": 12345, "name": "Bob Loblaw", "url": "bobloblaw.law.blog" }', {
171
- headers: headers
171
+ headers: headers,
172
172
  }))];
173
173
  case 1:
174
174
  parsedBody = _a.sent();
175
175
  expect(parsedBody).toStrictEqual({
176
176
  type: 'exit',
177
- result: { id: 12345, name: 'Bob Loblaw', url: 'bobloblaw.law.blog' }
177
+ result: { id: 12345, name: 'Bob Loblaw', url: 'bobloblaw.law.blog' },
178
178
  });
179
179
  return [2 /*return*/];
180
180
  }
@@ -196,7 +196,7 @@ describe('parseFetchResponse', function () {
196
196
  parsedBody = _a.sent();
197
197
  expect(parsedBody).toStrictEqual({
198
198
  type: 'exit',
199
- result: { exitResult: 'exit result' }
199
+ result: { exitResult: 'exit result' },
200
200
  });
201
201
  return [2 /*return*/];
202
202
  }
@@ -234,7 +234,7 @@ describe('parseFetchResponse', function () {
234
234
  parsedBody = _a.sent();
235
235
  expect(parsedBody).toStrictEqual({
236
236
  type: 'action',
237
- action: { url: '/path', method: 'POST' }
237
+ action: { url: '/path', method: 'POST' },
238
238
  });
239
239
  return [2 /*return*/];
240
240
  }
@@ -279,7 +279,7 @@ describe('parseFetchResponse', function () {
279
279
  expect(parsedBody).toStrictEqual({
280
280
  type: 'step',
281
281
  step: { stepResult: 'step result' },
282
- etag: 'etag'
282
+ etag: 'etag',
283
283
  });
284
284
  return [2 /*return*/];
285
285
  }
@@ -345,14 +345,14 @@ describe('parseErrorResponse', function () {
345
345
  case 0:
346
346
  response = new Response(JSON.stringify({
347
347
  error: 'This is a global error',
348
- validation: { field: 'This is a field error' }
348
+ validation: { field: 'This is a field error' },
349
349
  }), { status: 422 });
350
350
  return [4 /*yield*/, parseErrorResponse(response)];
351
351
  case 1:
352
352
  parsedBody = _a.sent();
353
353
  expect(parsedBody).toStrictEqual({
354
354
  error: 'This is a global error',
355
- validation: { field: 'This is a field error' }
355
+ validation: { field: 'This is a field error' },
356
356
  });
357
357
  return [2 /*return*/];
358
358
  }
@@ -416,7 +416,7 @@ describe('getJsonObjectOrNull', function () {
416
416
  case 0:
417
417
  response = new Response("{ \"exitResult\": \"exit result\" }");
418
418
  return [4 /*yield*/, expect(getJsonObjectOrNull(response)).resolves.toStrictEqual({
419
- exitResult: 'exit result'
419
+ exitResult: 'exit result',
420
420
  })];
421
421
  case 1:
422
422
  _a.sent();
@@ -29,7 +29,7 @@ export var useDynamicFlowState = function (initialStep) {
29
29
  models: (initialStep === null || initialStep === void 0 ? void 0 : initialStep.model)
30
30
  ? buildInitialModels(initialStep.model, getAllSchemas(initialStep))
31
31
  : {},
32
- etag: undefined
32
+ etag: undefined,
33
33
  }), stepAndModels = _e[0], setStepAndModels = _e[1];
34
34
  var step = stepAndModels.step, models = stepAndModels.models, etag = stepAndModels.etag;
35
35
  var setStepAndEtag = function (step, etag) {
@@ -37,7 +37,7 @@ export var useDynamicFlowState = function (initialStep) {
37
37
  setStepAndModels({
38
38
  step: step,
39
39
  models: step.model ? buildInitialModels(step.model, getAllSchemas(step)) : {},
40
- etag: etag
40
+ etag: etag,
41
41
  });
42
42
  setFormErrors((_b = (_a = step === null || step === void 0 ? void 0 : step.errors) === null || _a === void 0 ? void 0 : _a.validation) !== null && _b !== void 0 ? _b : null);
43
43
  setGlobalError((_d = (_c = step === null || step === void 0 ? void 0 : step.errors) === null || _c === void 0 ? void 0 : _c.error) !== null && _d !== void 0 ? _d : null);
@@ -49,7 +49,7 @@ export var useDynamicFlowState = function (initialStep) {
49
49
  var updatedState = {
50
50
  step: previous.step,
51
51
  models: updatedModels,
52
- etag: previous.etag
52
+ etag: previous.etag,
53
53
  };
54
54
  onModelsUpdated(updatedModels);
55
55
  return updatedState;
@@ -66,7 +66,7 @@ export var useDynamicFlowState = function (initialStep) {
66
66
  setFormErrors: setFormErrors,
67
67
  setGlobalError: setGlobalError,
68
68
  setStepAndEtag: setStepAndEtag,
69
- setSchemaModel: setSchemaModel
69
+ setSchemaModel: setSchemaModel,
70
70
  };
71
71
  };
72
72
  var buildInitialModels = function (model, schemas) {
@@ -70,7 +70,7 @@ var FormControl = /** @class */ (function (_super) {
70
70
  _this.state = {
71
71
  selectedOption: props.selectedOption,
72
72
  touched: false,
73
- prevValue: props.value
73
+ prevValue: props.value,
74
74
  };
75
75
  return _this;
76
76
  }
@@ -95,10 +95,10 @@ var FormControl = /** @class */ (function (_super) {
95
95
  var search = options.length >= 8;
96
96
  var items = options;
97
97
  var selected = this.getSelectedOption(options);
98
- return (_jsx("div", __assign({ className: "d-flex flex-column" }, { children: _jsx(SelectInput, { id: id, items: items.map(function (value) { return ({
98
+ return (_jsx("div", { className: "d-flex flex-column", children: _jsx(SelectInput, { id: id, items: items.map(function (value) { return ({
99
99
  type: 'option',
100
100
  value: value,
101
- disabled: value.disabled
101
+ disabled: value.disabled,
102
102
  }); }), value: (_a = selected) !== null && _a !== void 0 ? _a : null, renderValue: function (_a, withinTrigger) {
103
103
  var hideIconInTrigger = _a.hideIconInTrigger, icon = _a.icon, label = _a.label, note = _a.note, secondary = _a.secondary;
104
104
  return (_jsx(SelectInputOptionContent, { title: label, note: note !== null && note !== void 0 ? note : secondary, icon: withinTrigger && hideIconInTrigger ? undefined : icon }));
@@ -114,17 +114,17 @@ var FormControl = /** @class */ (function (_super) {
114
114
  : undefined, onClear: function () {
115
115
  _this.setState({ selectedOption: null });
116
116
  _this.props.onChange(null);
117
- } }) })));
117
+ } }) }));
118
118
  }
119
119
  case FormControlType.TAB:
120
120
  return (_jsx(Tabs, { selected: (((_b = this.getSelectedOption(options)) === null || _b === void 0 ? void 0 : _b.value) || 0), tabs: options.map(function (option) { return ({
121
121
  title: option.label,
122
122
  content: _jsx(_Fragment, {}),
123
- disabled: option.disabled || false
123
+ disabled: option.disabled || false,
124
124
  }); }), name: id, onTabSelect: function (index) {
125
125
  var hasSelectedOption = !!_this.state.selectedOption;
126
126
  _this.setState({
127
- selectedOption: options.find(function (option) { return option.value === index; })
127
+ selectedOption: options.find(function (option) { return option.value === index; }),
128
128
  });
129
129
  _this.props.onChange(index, hasSelectedOption ? 'user' : 'init');
130
130
  } }));
@@ -180,7 +180,7 @@ var FormControl = /** @class */ (function (_super) {
180
180
  onFocus: this.handleOnFocus,
181
181
  onBlur: this.handleOnBlur,
182
182
  disabled: disabled,
183
- autoComplete: this.getAutocompleteValue()
183
+ autoComplete: this.getAutocompleteValue(),
184
184
  };
185
185
  if (this.props.displayPattern) {
186
186
  return (_jsx(TextareaWithDisplayFormat, __assign({ displayPattern: this.props.displayPattern }, textareaProps, { onChange: this.handleOnChange })));
@@ -217,7 +217,7 @@ var FormControl = /** @class */ (function (_super) {
217
217
  onFocus: this.handleOnFocus,
218
218
  onBlur: this.handleOnBlur,
219
219
  disabled: disabled,
220
- autoComplete: this.getAutocompleteValue()
220
+ autoComplete: this.getAutocompleteValue(),
221
221
  };
222
222
  if (this.props.displayPattern) {
223
223
  return (_jsx(InputWithDisplayFormat, __assign({ displayPattern: this.props.displayPattern }, inputProps, { onChange: this.handleOnChange })));
@@ -259,7 +259,7 @@ var FormControl = /** @class */ (function (_super) {
259
259
  step: 1,
260
260
  type: FormControl.Type.TEXT,
261
261
  uploadProps: {},
262
- value: null
262
+ value: null,
263
263
  };
264
264
  return FormControl;
265
265
  }(PureComponent));
@@ -65,7 +65,7 @@ describe('FormControl', function () {
65
65
  describedBy: undefined,
66
66
  onChange: jest.fn(),
67
67
  onBlur: jest.fn(),
68
- onFocus: jest.fn()
68
+ onFocus: jest.fn(),
69
69
  };
70
70
  describe('SelectInput', function () {
71
71
  it('should call the search change handler if search is enabled', function () { return __awaiter(void 0, void 0, void 0, function () {
@@ -82,9 +82,9 @@ describe('FormControl', function () {
82
82
  type: 'select',
83
83
  options: options,
84
84
  search: true,
85
- onSearchChange: onSearchChange
85
+ onSearchChange: onSearchChange,
86
86
  };
87
- renderWithProviders(_jsx(FormControl, __assign({}, __assign(__assign({}, defaultProps), props))));
87
+ renderWithProviders(_jsx(FormControl, __assign({}, defaultProps, props)));
88
88
  return [4 /*yield*/, user.click(screen.getByText('placeholder'))];
89
89
  case 1:
90
90
  _a.sent();
@@ -76,5 +76,5 @@ var autocompleteTokenMap = {
76
76
  work: 'work',
77
77
  mobile: 'mobile',
78
78
  fax: 'fax',
79
- pager: 'pager'
79
+ pager: 'pager',
80
80
  };
@@ -88,7 +88,7 @@ export var getSafeDateStringValue = function (value) {
88
88
  logInvalidTypeFallbackWarning({
89
89
  received: typeof value,
90
90
  expected: 'string',
91
- fallback: 'null'
91
+ fallback: 'null',
92
92
  });
93
93
  return null;
94
94
  }
@@ -59,34 +59,34 @@ describe('E2E: Given a component for rendering a JSON schema form', function ()
59
59
  var stringSchema = {
60
60
  title: 'String',
61
61
  type: 'string',
62
- minLength: 2
62
+ minLength: 2,
63
63
  };
64
64
  var constSchema = {
65
- "const": 'abcd'
65
+ const: 'abcd',
66
66
  };
67
67
  var oneOfTwoConstsSchema = {
68
68
  title: 'One Of Two Consts',
69
69
  control: 'radio',
70
70
  oneOf: [
71
- { "const": 1, title: 'One' },
72
- { "const": 2, title: 'Two' },
73
- ]
71
+ { const: 1, title: 'One' },
72
+ { const: 2, title: 'Two' },
73
+ ],
74
74
  };
75
75
  var oneOfThreeConstsSchema = {
76
76
  title: 'One Of Three Consts',
77
77
  oneOf: [
78
- { "const": 1, title: 'One' },
79
- { "const": 2, title: 'Two' },
80
- { "const": 3, title: 'Three' },
81
- ]
78
+ { const: 1, title: 'One' },
79
+ { const: 2, title: 'Two' },
80
+ { const: 3, title: 'Three' },
81
+ ],
82
82
  };
83
83
  var booleanSchema = {
84
84
  title: 'Check',
85
- type: 'boolean'
85
+ type: 'boolean',
86
86
  };
87
87
  var numberSchema = {
88
88
  title: 'Number',
89
- type: 'number'
89
+ type: 'number',
90
90
  };
91
91
  beforeEach(function () {
92
92
  schema = {
@@ -98,11 +98,11 @@ describe('E2E: Given a component for rendering a JSON schema form', function ()
98
98
  type: 'object',
99
99
  properties: {
100
100
  string: stringSchema,
101
- "const": constSchema,
101
+ const: constSchema,
102
102
  oneOf2Consts: oneOfTwoConstsSchema,
103
103
  boolean: booleanSchema,
104
104
  number: numberSchema,
105
- oneOf3Consts: oneOfThreeConstsSchema
105
+ oneOf3Consts: oneOfThreeConstsSchema,
106
106
  },
107
107
  displayOrder: [
108
108
  'string',
@@ -111,16 +111,16 @@ describe('E2E: Given a component for rendering a JSON schema form', function ()
111
111
  'boolean',
112
112
  'number',
113
113
  'oneOf3Consts',
114
- ]
114
+ ],
115
115
  },
116
- ]
116
+ ],
117
117
  },
118
- ]
118
+ ],
119
119
  };
120
120
  onChange = jest.fn();
121
121
  onPersistAsync = jest.fn();
122
122
  errors = {
123
- string: 'Error'
123
+ string: 'Error',
124
124
  };
125
125
  var model = { string: 'foo' };
126
126
  var submitted = false;
@@ -133,7 +133,7 @@ describe('E2E: Given a component for rendering a JSON schema form', function ()
133
133
  submitted: submitted,
134
134
  disabled: disabled,
135
135
  onPersistAsync: onPersistAsync,
136
- baseUrl: baseUrl
136
+ baseUrl: baseUrl,
137
137
  };
138
138
  });
139
139
  describe('when initialised', function () {
@@ -168,16 +168,16 @@ describe('E2E: Given a component for rendering a JSON schema form', function ()
168
168
  });
169
169
  it('should broadcast a change for the const and a change for the boolean schema', function () {
170
170
  expect(onChange).toHaveBeenCalledWith(expect.objectContaining({
171
- model: { string: 'foo', "const": 'abcd' },
171
+ model: { string: 'foo', const: 'abcd' },
172
172
  triggerSchema: constSchema,
173
173
  triggerModel: 'abcd',
174
- lastTriggerModel: null
174
+ lastTriggerModel: null,
175
175
  }));
176
176
  expect(onChange).toHaveBeenCalledWith(expect.objectContaining({
177
- model: { string: 'foo', "const": 'abcd', boolean: false },
177
+ model: { string: 'foo', const: 'abcd', boolean: false },
178
178
  triggerSchema: booleanSchema,
179
179
  triggerModel: false,
180
- lastTriggerModel: null
180
+ lastTriggerModel: null,
181
181
  }));
182
182
  expect(onChange).toHaveBeenCalledTimes(2);
183
183
  });
@@ -189,10 +189,10 @@ describe('E2E: Given a component for rendering a JSON schema form', function ()
189
189
  });
190
190
  it('should trigger the component onChange', function () {
191
191
  expect(onChange).toHaveBeenCalledWith(expect.objectContaining({
192
- model: { string: 'new', "const": 'abcd', boolean: false },
192
+ model: { string: 'new', const: 'abcd', boolean: false },
193
193
  triggerSchema: stringSchema,
194
194
  triggerModel: 'new',
195
- lastTriggerModel: 'foo'
195
+ lastTriggerModel: 'foo',
196
196
  }));
197
197
  expect(onChange).toHaveBeenCalledTimes(3);
198
198
  });
@@ -204,10 +204,10 @@ describe('E2E: Given a component for rendering a JSON schema form', function ()
204
204
  });
205
205
  it('should NOT remove the value from the model', function () {
206
206
  expect(onChange).toHaveBeenLastCalledWith(expect.objectContaining({
207
- model: { "const": 'abcd', string: 'x', boolean: false },
207
+ model: { const: 'abcd', string: 'x', boolean: false },
208
208
  triggerSchema: stringSchema,
209
209
  triggerModel: 'x',
210
- lastTriggerModel: 'foo'
210
+ lastTriggerModel: 'foo',
211
211
  }));
212
212
  });
213
213
  describe('and then to something else invalid', function () {
@@ -224,10 +224,10 @@ describe('E2E: Given a component for rendering a JSON schema form', function ()
224
224
  });
225
225
  it('should call onChange with the new value', function () {
226
226
  expect(onChange).toHaveBeenCalledWith(expect.objectContaining({
227
- model: { string: 'bar', "const": 'abcd', boolean: false },
227
+ model: { string: 'bar', const: 'abcd', boolean: false },
228
228
  triggerSchema: stringSchema,
229
229
  triggerModel: 'bar',
230
- lastTriggerModel: 'x'
230
+ lastTriggerModel: 'x',
231
231
  }));
232
232
  });
233
233
  it('should have called onChange again', function () {
@@ -260,10 +260,10 @@ describe('E2E: Given a component for rendering a JSON schema form', function ()
260
260
  properties: {
261
261
  a: {
262
262
  title: 'A Number',
263
- type: 'number'
264
- }
263
+ type: 'number',
264
+ },
265
265
  },
266
- displayOrder: ['a']
266
+ displayOrder: ['a'],
267
267
  };
268
268
  var requiredSchema = __assign(__assign({}, optionalSchema), { required: ['a'] });
269
269
  beforeEach(function () {
@@ -291,22 +291,22 @@ describe('E2E: Given a component for rendering a JSON schema form', function ()
291
291
  properties: {
292
292
  name: {
293
293
  title: 'Full name field',
294
- type: 'string'
294
+ type: 'string',
295
295
  },
296
296
  sortcode: {
297
297
  title: 'Sort Code field',
298
- type: 'string'
298
+ type: 'string',
299
299
  },
300
300
  account: {
301
301
  title: 'Account number field',
302
- type: 'string'
302
+ type: 'string',
303
303
  },
304
304
  type: {
305
305
  type: 'string',
306
- "const": 'SortCode'
307
- }
306
+ const: 'SortCode',
307
+ },
308
308
  },
309
- displayOrder: ['name', 'sortcode', 'account', 'type']
309
+ displayOrder: ['name', 'sortcode', 'account', 'type'],
310
310
  },
311
311
  {
312
312
  analyticsId: 'Iban',
@@ -316,20 +316,20 @@ describe('E2E: Given a component for rendering a JSON schema form', function ()
316
316
  properties: {
317
317
  name: {
318
318
  title: 'Full name field',
319
- type: 'string'
319
+ type: 'string',
320
320
  },
321
321
  iban: {
322
322
  title: 'IBAN field',
323
- type: 'string'
323
+ type: 'string',
324
324
  },
325
325
  type: {
326
326
  type: 'string',
327
- "const": 'Iban'
328
- }
329
- }
327
+ const: 'Iban',
328
+ },
329
+ },
330
330
  },
331
331
  ],
332
- control: control
332
+ control: control,
333
333
  });
334
334
  };
335
335
  var renderComponent = function (props) {
@@ -350,7 +350,7 @@ describe('E2E: Given a component for rendering a JSON schema form', function ()
350
350
  name: 'Bob Loblaw',
351
351
  sortcode: '111111',
352
352
  account: '22222222',
353
- iban: 'IT0000000000'
353
+ iban: 'IT0000000000',
354
354
  };
355
355
  renderComponent({ schema: schema, onChange: onChange, initialModel: initialModel });
356
356
  expect(onChange).toHaveBeenLastCalledWith(expect.objectContaining({
@@ -358,8 +358,8 @@ describe('E2E: Given a component for rendering a JSON schema form', function ()
358
358
  type: 'SortCode',
359
359
  name: 'Bob Loblaw',
360
360
  sortcode: '111111',
361
- account: '22222222'
362
- }
361
+ account: '22222222',
362
+ },
363
363
  }));
364
364
  jest.useRealTimers();
365
365
  });
@@ -377,12 +377,12 @@ describe('E2E: Given a component for rendering a JSON schema form', function ()
377
377
  fireEvent.click(screen.getByText(/iban tab/i));
378
378
  expect(onEvent).toHaveBeenLastCalledWith('Dynamic Flow - OneOf Selected', expect.objectContaining({
379
379
  oneOfId: 'schema-with-two-options',
380
- schemaId: 'Iban'
380
+ schemaId: 'Iban',
381
381
  }));
382
382
  onEvent.mockClear();
383
383
  // enter name, sortcode and account number
384
384
  fireEvent.change(screen.getByLabelText(/full name field/i), {
385
- target: { value: 'Robert Sortcode' }
385
+ target: { value: 'Robert Sortcode' },
386
386
  });
387
387
  expect(onEvent).not.toHaveBeenCalled();
388
388
  });
@@ -396,13 +396,13 @@ describe('E2E: Given a component for rendering a JSON schema form', function ()
396
396
  renderComponent({ schema: schema, onChange: onChange, initialModel: initialModel });
397
397
  // enter name, sortcode and account number
398
398
  fireEvent.change(screen.getByLabelText(/full name field/i), {
399
- target: { value: 'Robert Sortcode' }
399
+ target: { value: 'Robert Sortcode' },
400
400
  });
401
401
  fireEvent.change(screen.getByLabelText(/sort code field/i), {
402
- target: { value: '111111' }
402
+ target: { value: '111111' },
403
403
  });
404
404
  fireEvent.change(screen.getByLabelText(/account number field/i), {
405
- target: { value: '22222222' }
405
+ target: { value: '22222222' },
406
406
  });
407
407
  // expect the values to be visible, of course
408
408
  expect(screen.getByDisplayValue('Robert Sortcode')).toBeInTheDocument();
@@ -414,8 +414,8 @@ describe('E2E: Given a component for rendering a JSON schema form', function ()
414
414
  type: 'SortCode',
415
415
  name: 'Robert Sortcode',
416
416
  sortcode: '111111',
417
- account: '22222222'
418
- }
417
+ account: '22222222',
418
+ },
419
419
  }));
420
420
  // switch to the other schema (IBAN Tab)
421
421
  fireEvent.click(screen.getByText(/iban tab/i));
@@ -427,18 +427,18 @@ describe('E2E: Given a component for rendering a JSON schema form', function ()
427
427
  expect(onChange).toHaveBeenLastCalledWith(expect.objectContaining({ model: { type: 'Iban' } }));
428
428
  // now enter a different name and an IBAN
429
429
  fireEvent.change(screen.getByLabelText(/full name field/i), {
430
- target: { value: 'Bob Iban' }
430
+ target: { value: 'Bob Iban' },
431
431
  });
432
432
  fireEvent.change(screen.getByLabelText(/iban field/i), {
433
- target: { value: 'IT000000000' }
433
+ target: { value: 'IT000000000' },
434
434
  });
435
435
  // expect the model to be updated accordingly
436
436
  expect(onChange).toHaveBeenLastCalledWith(expect.objectContaining({
437
437
  model: {
438
438
  type: 'Iban',
439
439
  name: 'Bob Iban',
440
- iban: 'IT000000000'
441
- }
440
+ iban: 'IT000000000',
441
+ },
442
442
  }));
443
443
  // now switch back to the first tab (Sort Code Tab)
444
444
  fireEvent.click(screen.getByText(/sort code tab/i));
@@ -452,8 +452,8 @@ describe('E2E: Given a component for rendering a JSON schema form', function ()
452
452
  type: 'SortCode',
453
453
  name: 'Robert Sortcode',
454
454
  sortcode: '111111',
455
- account: '22222222'
456
- }
455
+ account: '22222222',
456
+ },
457
457
  }));
458
458
  jest.useRealTimers();
459
459
  });
@@ -464,8 +464,8 @@ describe('E2E: Given a component for rendering a JSON schema form', function ()
464
464
  displayOrder: ['theOnlyProp'],
465
465
  required: ['theOnlyProp'],
466
466
  properties: {
467
- theOnlyProp: __assign(__assign({}, makeSchemaWithOneOfTwoOptions('select', { everythingRequired: true })), { validationMessages: { required: 'Custom required validation error' } })
468
- }
467
+ theOnlyProp: __assign(__assign({}, makeSchemaWithOneOfTwoOptions('select', { everythingRequired: true })), { validationMessages: { required: 'Custom required validation error' } }),
468
+ },
469
469
  };
470
470
  describe('...but none of the oneOf is selected', function () {
471
471
  it('should display the "required" validation error under the Select control', function () {
@@ -534,17 +534,17 @@ describe('E2E: Given a component for rendering a JSON schema form', function ()
534
534
  type: 'object',
535
535
  displayOrder: ['a'],
536
536
  properties: {
537
- a: { type: 'string', title: 'Label A' }
538
- }
537
+ a: { type: 'string', title: 'Label A' },
538
+ },
539
539
  },
540
540
  {
541
541
  type: 'object',
542
542
  displayOrder: ['b'],
543
543
  properties: {
544
- b: { type: 'string', title: 'Label B' }
545
- }
544
+ b: { type: 'string', title: 'Label B' },
545
+ },
546
546
  },
547
- ]
547
+ ],
548
548
  };
549
549
  describe('when updating more than one schema', function () {
550
550
  it('calls onChange with all changed models in all schemas', function () {
@@ -16,7 +16,7 @@ import { HttpClientProviderFromBaseUrl } from '../../common/httpClientContext';
16
16
  function JsonSchemaForm(props) {
17
17
  var schemaProps = __assign({ model: null, errors: null }, props);
18
18
  var _a = props.baseUrl, baseUrl = _a === void 0 ? '' : _a, _b = props.onEvent, onEvent = _b === void 0 ? noop : _b, _c = props.onLog, onLog = _c === void 0 ? noop : _c;
19
- return (_jsx(LogProvider, __assign({ flowId: "JsonSchemaForm", stepId: "JsonSchemaForm", onLog: onLog }, { children: _jsx(EventsContextProvider, __assign({ metadata: { flowId: 'JsonSchemaForm', stepId: 'JsonSchemaForm' }, onEvent: onEvent }, { children: _jsx(HttpClientProviderFromBaseUrl, __assign({ baseUrl: baseUrl }, { children: _jsx(GenericSchema, __assign({}, schemaProps)) })) })) })));
19
+ return (_jsx(LogProvider, { flowId: "JsonSchemaForm", stepId: "JsonSchemaForm", onLog: onLog, children: _jsx(EventsContextProvider, { metadata: { flowId: 'JsonSchemaForm', stepId: 'JsonSchemaForm' }, onEvent: onEvent, children: _jsx(HttpClientProviderFromBaseUrl, { baseUrl: baseUrl, children: _jsx(GenericSchema, __assign({}, schemaProps)) }) }) }));
20
20
  }
21
21
  export default JsonSchemaForm;
22
22
  var noop = function () {
@@ -25,7 +25,7 @@ var combineModels = function (models) {
25
25
  var getSchemaColumnClasses = function (width) { return ({
26
26
  'col-xs-12': true,
27
27
  'col-sm-6': width === 'md',
28
- 'col-sm-4': width === 'sm'
28
+ 'col-sm-4': width === 'sm',
29
29
  }); };
30
30
  function AllOfSchema(props) {
31
31
  var onChangeModelIndex = function (index, onChangeProps) {
@@ -36,15 +36,15 @@ function AllOfSchema(props) {
36
36
  props.onChange(__assign(__assign({}, onChangeProps), { model: combineModels(models) }));
37
37
  };
38
38
  var _a = useState(splitModel(props.model, props.schema.allOf)), models = _a[0], setModels = _a[1];
39
- return (_jsxs(_Fragment, { children: [props.schema.title && _jsx(Header, { title: props.schema.title }), props.schema.description && _jsx("p", { children: props.schema.description }), _jsx("div", __assign({ className: "row" }, { children: props.schema.allOf.map(function (schema, index) { return (
39
+ return (_jsxs(_Fragment, { children: [props.schema.title && _jsx(Header, { title: props.schema.title }), props.schema.description && _jsx("p", { children: props.schema.description }), _jsx("div", { className: "row", children: props.schema.allOf.map(function (schema, index) { return (
40
40
  // eslint-disable-next-line react/no-array-index-key
41
- _jsx("div", __assign({ className: classNames(getSchemaColumnClasses(schema.width)) }, { children: _jsx(GenericSchema, { schema: schema, model: models[index], errors: props.errors, submitted: props.submitted, disabled: props.disabled, onChange: function (onChangeProps) {
41
+ _jsx("div", { className: classNames(getSchemaColumnClasses(schema.width)), children: _jsx(GenericSchema, { schema: schema, model: models[index], errors: props.errors, submitted: props.submitted, disabled: props.disabled, onChange: function (onChangeProps) {
42
42
  return onChangeModelIndex(index, __assign(__assign({}, onChangeProps), {
43
43
  // We can safely assume that the model here is going to be of the same type as the model prop
44
44
  model: onChangeProps.model }));
45
- }, onPersistAsync: props.onPersistAsync }) }), index)); }) }))] }));
45
+ }, onPersistAsync: props.onPersistAsync }) }, index)); }) })] }));
46
46
  }
47
47
  AllOfSchema.defaultProps = {
48
- disabled: false
48
+ disabled: false,
49
49
  };
50
50
  export default AllOfSchema;
@@ -20,6 +20,6 @@ var ArraySchema = function (props) {
20
20
  throw new Error('Not implemented'); // Tuple not implemented
21
21
  };
22
22
  ArraySchema.defaultProps = {
23
- required: false
23
+ required: false,
24
24
  };
25
25
  export default ArraySchema;