@wise/dynamic-flow-client 0.4.0-beta-0489d0.8 → 0.4.1

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 (705) hide show
  1. package/README.md +0 -11
  2. package/build/common/constants/DateMode.js +8 -0
  3. package/build/common/constants/DateMode.js.map +1 -0
  4. package/build/common/constants/FormControlType.js +21 -0
  5. package/build/common/constants/FormControlType.js.map +1 -0
  6. package/build/common/constants/MonthFormat.js +8 -0
  7. package/build/common/constants/MonthFormat.js.map +1 -0
  8. package/build/common/constants/SchemaType.js +15 -0
  9. package/build/common/constants/SchemaType.js.map +1 -0
  10. package/build/common/constants/Size.js +11 -0
  11. package/build/common/constants/Size.js.map +1 -0
  12. package/build/common/constants/index.js +22 -0
  13. package/build/common/constants/index.js.map +1 -0
  14. package/build/common/contexts/dynamicFlowContexts/DynamicFlowContexts.js +30 -0
  15. package/build/common/contexts/dynamicFlowContexts/DynamicFlowContexts.js.map +1 -0
  16. package/build/common/contexts/dynamicFlowContexts/usePendingPromiseCounter.js +20 -0
  17. package/build/common/contexts/dynamicFlowContexts/usePendingPromiseCounter.js.map +1 -0
  18. package/build/common/contexts/eventsContext/EventsContext.js +23 -0
  19. package/build/common/contexts/eventsContext/EventsContext.js.map +1 -0
  20. package/build/common/contexts/fetcherContexts/FetcherContexts.js +30 -0
  21. package/build/common/contexts/fetcherContexts/FetcherContexts.js.map +1 -0
  22. package/build/common/contexts/index.js +21 -0
  23. package/build/common/contexts/index.js.map +1 -0
  24. package/build/common/contexts/logContext/LogContext.js +28 -0
  25. package/build/common/contexts/logContext/LogContext.js.map +1 -0
  26. package/build/common/hooks/index.js +24 -0
  27. package/build/common/hooks/index.js.map +1 -0
  28. package/build/common/hooks/useDebouncedFunction/useDebouncedFunction.js +14 -0
  29. package/build/common/hooks/useDebouncedFunction/useDebouncedFunction.js.map +1 -0
  30. package/build/common/hooks/useExternal/useExternal.js +20 -0
  31. package/build/common/hooks/useExternal/useExternal.js.map +1 -0
  32. package/build/common/hooks/useExternalStepPolling/useExternalStepPolling.js +63 -0
  33. package/build/common/hooks/useExternalStepPolling/useExternalStepPolling.js.map +1 -0
  34. package/build/common/hooks/usePersistAsync/usePersistAsync.js +99 -0
  35. package/build/common/hooks/usePersistAsync/usePersistAsync.js.map +1 -0
  36. package/build/common/hooks/usePolling/usePolling.js +53 -0
  37. package/build/common/hooks/usePolling/usePolling.js.map +1 -0
  38. package/build/common/hooks/usePrevious/usePrevious.js +13 -0
  39. package/build/common/hooks/usePrevious/usePrevious.js.map +1 -0
  40. package/build/common/hooks/useStepPolling/useStepPolling.js +50 -0
  41. package/build/common/hooks/useStepPolling/useStepPolling.js.map +1 -0
  42. package/build/common/makeFetcher/index.js +18 -0
  43. package/build/common/makeFetcher/index.js.map +1 -0
  44. package/build/common/makeFetcher/makeFetcher.js +24 -0
  45. package/build/common/makeFetcher/makeFetcher.js.map +1 -0
  46. package/build/common/messages.js +11 -0
  47. package/build/common/messages.js.map +1 -0
  48. package/build/common/utils/api-utils.js +20 -0
  49. package/build/common/utils/api-utils.js.map +1 -0
  50. package/build/common/utils/date-utils.js +28 -0
  51. package/build/common/utils/date-utils.js.map +1 -0
  52. package/build/common/utils/debounce.js +39 -0
  53. package/build/common/utils/debounce.js.map +1 -0
  54. package/build/common/utils/file-utils.js +39 -0
  55. package/build/common/utils/file-utils.js.map +1 -0
  56. package/build/common/utils/id-utils.js +9 -0
  57. package/build/common/utils/id-utils.js.map +1 -0
  58. package/build/common/utils/index.js +25 -0
  59. package/build/common/utils/index.js.map +1 -0
  60. package/build/common/utils/is-equal.js +26 -0
  61. package/build/common/utils/is-equal.js.map +1 -0
  62. package/build/common/utils/schema-utils.js +56 -0
  63. package/build/common/utils/schema-utils.js.map +1 -0
  64. package/build/common/utils/step-utils.js +48 -0
  65. package/build/common/utils/step-utils.js.map +1 -0
  66. package/build/common/validators/index.js +29 -0
  67. package/build/common/validators/index.js.map +1 -0
  68. package/build/common/validators/models/model-validators.js +70 -0
  69. package/build/common/validators/models/model-validators.js.map +1 -0
  70. package/build/common/validators/models/models.utils.js +118 -0
  71. package/build/common/validators/models/models.utils.js.map +1 -0
  72. package/build/common/validators/schemas/schema-validators.js +100 -0
  73. package/build/common/validators/schemas/schema-validators.js.map +1 -0
  74. package/build/common/validators/types/type-validators.js +22 -0
  75. package/build/common/validators/types/type-validators.js.map +1 -0
  76. package/build/common/validators/validationFailures/validation-failures.js +152 -0
  77. package/build/common/validators/validationFailures/validation-failures.js.map +1 -0
  78. package/build/common/validators/validationFailures/validation-failures.utils.js +50 -0
  79. package/build/common/validators/validationFailures/validation-failures.utils.js.map +1 -0
  80. package/build/common/validators/values/value-validators.js +8 -0
  81. package/build/common/validators/values/value-validators.js.map +1 -0
  82. package/build/dynamicFlow/DynamicFlow.js +251 -0
  83. package/build/dynamicFlow/DynamicFlow.js.map +1 -0
  84. package/build/dynamicFlow/DynamicFlowStep.js +26 -0
  85. package/build/dynamicFlow/DynamicFlowStep.js.map +1 -0
  86. package/build/dynamicFlow/DynamicFlowTypes.js +9 -0
  87. package/build/dynamicFlow/DynamicFlowTypes.js.map +1 -0
  88. package/build/dynamicFlow/index.js +9 -0
  89. package/build/dynamicFlow/index.js.map +1 -0
  90. package/build/dynamicFlow/stories/DynamicFlow.story.js +37 -0
  91. package/build/dynamicFlow/stories/DynamicFlow.story.js.map +1 -0
  92. package/build/dynamicFlow/stories/EditableDynamicFlow.js +55 -0
  93. package/build/dynamicFlow/stories/EditableDynamicFlow.js.map +1 -0
  94. package/build/dynamicFlow/stories/fixtureFetcher.js +61 -0
  95. package/build/dynamicFlow/stories/fixtureFetcher.js.map +1 -0
  96. package/build/dynamicFlow/utils/errorBoundary/ErrorBoundary.js +30 -0
  97. package/build/dynamicFlow/utils/errorBoundary/ErrorBoundary.js.map +1 -0
  98. package/build/dynamicFlow/utils/errorBoundary/ErrorBoundary.messages.js +16 -0
  99. package/build/dynamicFlow/utils/errorBoundary/ErrorBoundary.messages.js.map +1 -0
  100. package/build/dynamicFlow/utils/errorBoundary/ErrorBoundaryAlert.js +19 -0
  101. package/build/dynamicFlow/utils/errorBoundary/ErrorBoundaryAlert.js.map +1 -0
  102. package/build/dynamicFlow/utils/index.js +27 -0
  103. package/build/dynamicFlow/utils/index.js.map +1 -0
  104. package/build/dynamicFlow/utils/responseParsers/response-parsers.js +67 -0
  105. package/build/dynamicFlow/utils/responseParsers/response-parsers.js.map +1 -0
  106. package/build/dynamicFlow/utils/useDebouncedRefresh/useDebouncedRefresh.js +28 -0
  107. package/build/dynamicFlow/utils/useDebouncedRefresh/useDebouncedRefresh.js.map +1 -0
  108. package/build/dynamicFlow/utils/useDynamicFlowState.js +92 -0
  109. package/build/dynamicFlow/utils/useDynamicFlowState.js.map +1 -0
  110. package/build/dynamicFlow/utils/useLoader.js +16 -0
  111. package/build/dynamicFlow/utils/useLoader.js.map +1 -0
  112. package/build/fixtures/components/alert.js +34 -0
  113. package/build/fixtures/components/alert.js.map +1 -0
  114. package/build/fixtures/components/box.js +23 -0
  115. package/build/fixtures/components/box.js.map +1 -0
  116. package/build/fixtures/components/button.js +57 -0
  117. package/build/fixtures/components/button.js.map +1 -0
  118. package/build/fixtures/components/columns.js +39 -0
  119. package/build/fixtures/components/columns.js.map +1 -0
  120. package/build/fixtures/components/copyable.js +25 -0
  121. package/build/fixtures/components/copyable.js.map +1 -0
  122. package/build/fixtures/components/decision.js +57 -0
  123. package/build/fixtures/components/decision.js.map +1 -0
  124. package/build/fixtures/components/heading.js +17 -0
  125. package/build/fixtures/components/heading.js.map +1 -0
  126. package/build/fixtures/components/image.js +26 -0
  127. package/build/fixtures/components/image.js.map +1 -0
  128. package/build/fixtures/components/index.js +33 -0
  129. package/build/fixtures/components/index.js.map +1 -0
  130. package/build/fixtures/components/info.js +36 -0
  131. package/build/fixtures/components/info.js.map +1 -0
  132. package/build/fixtures/components/list.js +37 -0
  133. package/build/fixtures/components/list.js.map +1 -0
  134. package/build/fixtures/components/loading-indicator.js +19 -0
  135. package/build/fixtures/components/loading-indicator.js.map +1 -0
  136. package/build/fixtures/components/paragraph.js +31 -0
  137. package/build/fixtures/components/paragraph.js.map +1 -0
  138. package/build/fixtures/components/review.js +63 -0
  139. package/build/fixtures/components/review.js.map +1 -0
  140. package/build/fixtures/examples/camera-capture.js +124 -0
  141. package/build/fixtures/examples/camera-capture.js.map +1 -0
  142. package/build/fixtures/examples/index.js +17 -0
  143. package/build/fixtures/examples/index.js.map +1 -0
  144. package/build/fixtures/examples/recipient-update.js +253 -0
  145. package/build/fixtures/examples/recipient-update.js.map +1 -0
  146. package/build/fixtures/examples/recipient.js +316 -0
  147. package/build/fixtures/examples/recipient.js.map +1 -0
  148. package/build/fixtures/examples/single-file-upload.js +101 -0
  149. package/build/fixtures/examples/single-file-upload.js.map +1 -0
  150. package/build/fixtures/examples/step-validation-errors.js +78 -0
  151. package/build/fixtures/examples/step-validation-errors.js.map +1 -0
  152. package/build/fixtures/features/action-response.js +32 -0
  153. package/build/fixtures/features/action-response.js.map +1 -0
  154. package/build/fixtures/features/external.js +34 -0
  155. package/build/fixtures/features/external.js.map +1 -0
  156. package/build/fixtures/features/index.js +17 -0
  157. package/build/fixtures/features/index.js.map +1 -0
  158. package/build/fixtures/features/persist-async.js +47 -0
  159. package/build/fixtures/features/persist-async.js.map +1 -0
  160. package/build/fixtures/features/polling.js +36 -0
  161. package/build/fixtures/features/polling.js.map +1 -0
  162. package/build/fixtures/features/validation-async.js +41 -0
  163. package/build/fixtures/features/validation-async.js.map +1 -0
  164. package/build/fixtures/index.js +39 -0
  165. package/build/fixtures/index.js.map +1 -0
  166. package/build/fixtures/jsonSchemaForm/allOf.js +122 -0
  167. package/build/fixtures/jsonSchemaForm/allOf.js.map +1 -0
  168. package/build/fixtures/jsonSchemaForm/audRecipient.d.ts +3 -0
  169. package/build/fixtures/jsonSchemaForm/audRecipient.js +1107 -0
  170. package/build/fixtures/jsonSchemaForm/audRecipient.js.map +1 -0
  171. package/build/fixtures/jsonSchemaForm/currency.d.ts +3 -0
  172. package/build/fixtures/jsonSchemaForm/currency.js +51 -0
  173. package/build/fixtures/jsonSchemaForm/currency.js.map +1 -0
  174. package/build/fixtures/jsonSchemaForm/multipleFileUploadBase64.d.ts +3 -0
  175. package/build/fixtures/jsonSchemaForm/multipleFileUploadBase64.js +40 -0
  176. package/build/fixtures/jsonSchemaForm/multipleFileUploadBase64.js.map +1 -0
  177. package/build/fixtures/jsonSchemaForm/multipleFileUploadBlob.d.ts +3 -0
  178. package/build/fixtures/jsonSchemaForm/multipleFileUploadBlob.js +39 -0
  179. package/build/fixtures/jsonSchemaForm/multipleFileUploadBlob.js.map +1 -0
  180. package/build/fixtures/jsonSchemaForm/oneOf.d.ts +3 -0
  181. package/build/fixtures/jsonSchemaForm/oneOf.js +122 -0
  182. package/build/fixtures/jsonSchemaForm/oneOf.js.map +1 -0
  183. package/build/fixtures/jsonSchemaForm/oneOfTabs.d.ts +3 -0
  184. package/build/fixtures/jsonSchemaForm/oneOfTabs.js +56 -0
  185. package/build/fixtures/jsonSchemaForm/oneOfTabs.js.map +1 -0
  186. package/build/fixtures/jsonSchemaForm/promotedOneOf.d.ts +3 -0
  187. package/build/fixtures/jsonSchemaForm/promotedOneOf.js +59 -0
  188. package/build/fixtures/jsonSchemaForm/promotedOneOf.js.map +1 -0
  189. package/build/fixtures/jsonSchemaForm/promotedOneOfCheckbox.d.ts +3 -0
  190. package/build/fixtures/jsonSchemaForm/promotedOneOfCheckbox.js +105 -0
  191. package/build/fixtures/jsonSchemaForm/promotedOneOfCheckbox.js.map +1 -0
  192. package/build/fixtures/jsonSchemaForm/simple.d.ts +3 -0
  193. package/build/fixtures/jsonSchemaForm/simple.js +51 -0
  194. package/build/fixtures/jsonSchemaForm/simple.js.map +1 -0
  195. package/build/fixtures/jsonSchemaForm/uploadPersistAsync.d.ts +3 -0
  196. package/build/fixtures/jsonSchemaForm/uploadPersistAsync.js +74 -0
  197. package/build/fixtures/jsonSchemaForm/uploadPersistAsync.js.map +1 -0
  198. package/build/fixtures/jsonSchemaForm/validationAsync.d.ts +3 -0
  199. package/build/fixtures/jsonSchemaForm/validationAsync.js +26 -0
  200. package/build/fixtures/jsonSchemaForm/validationAsync.js.map +1 -0
  201. package/build/fixtures/layouts/all.js +179 -0
  202. package/build/fixtures/layouts/all.js.map +1 -0
  203. package/build/fixtures/layouts/final-step-layout.js +42 -0
  204. package/build/fixtures/layouts/final-step-layout.js.map +1 -0
  205. package/build/fixtures/layouts/index.js +19 -0
  206. package/build/fixtures/layouts/index.js.map +1 -0
  207. package/build/fixtures/layouts/list.js +36 -0
  208. package/build/fixtures/layouts/list.js.map +1 -0
  209. package/build/fixtures/layouts/pay-in.js +100 -0
  210. package/build/fixtures/layouts/pay-in.js.map +1 -0
  211. package/build/fixtures/layouts/review.js +163 -0
  212. package/build/fixtures/layouts/review.js.map +1 -0
  213. package/build/fixtures/layouts/success.js +69 -0
  214. package/build/fixtures/layouts/success.js.map +1 -0
  215. package/build/fixtures/responses/action-response-final.js +27 -0
  216. package/build/fixtures/responses/action-response-final.js.map +1 -0
  217. package/build/fixtures/responses/action.js +5 -0
  218. package/build/fixtures/responses/action.js.map +1 -0
  219. package/build/fixtures/responses/exit.js +5 -0
  220. package/build/fixtures/responses/exit.js.map +1 -0
  221. package/build/fixtures/responses/index.js +15 -0
  222. package/build/fixtures/responses/index.js.map +1 -0
  223. package/build/fixtures/responses/recipient-update-final.js +27 -0
  224. package/build/fixtures/responses/recipient-update-final.js.map +1 -0
  225. package/build/fixtures/schemas/basic-form.js +42 -0
  226. package/build/fixtures/schemas/basic-form.js.map +1 -0
  227. package/build/fixtures/schemas/index.js +15 -0
  228. package/build/fixtures/schemas/index.js.map +1 -0
  229. package/build/fixtures/schemas/number-and-integer.js +44 -0
  230. package/build/fixtures/schemas/number-and-integer.js.map +1 -0
  231. package/build/fixtures/schemas/one-of.js +223 -0
  232. package/build/fixtures/schemas/one-of.js.map +1 -0
  233. package/build/fixtures/schemas/string-formats.js +65 -0
  234. package/build/fixtures/schemas/string-formats.js.map +1 -0
  235. package/build/fixtures/utils/image-util.js +23 -0
  236. package/build/fixtures/utils/image-util.js.map +1 -0
  237. package/build/formControl/FormControl.js +214 -0
  238. package/build/formControl/FormControl.js.map +1 -0
  239. package/build/formControl/index.js +9 -0
  240. package/build/formControl/index.js.map +1 -0
  241. package/build/formControl/utils/index.js +18 -0
  242. package/build/formControl/utils/index.js.map +1 -0
  243. package/build/formControl/utils/value-utils.js +112 -0
  244. package/build/formControl/utils/value-utils.js.map +1 -0
  245. package/build/i18n/index.js +37 -0
  246. package/build/i18n/index.js.map +1 -0
  247. package/build/index.d.ts +11 -0
  248. package/build/index.js +39 -0
  249. package/build/index.js.map +1 -0
  250. package/build/jsonSchemaForm/JsonSchemaForm.js +23 -0
  251. package/build/jsonSchemaForm/JsonSchemaForm.js.map +1 -0
  252. package/build/jsonSchemaForm/allOfSchema/AllOfSchema.js +47 -0
  253. package/build/jsonSchemaForm/allOfSchema/AllOfSchema.js.map +1 -0
  254. package/build/jsonSchemaForm/allOfSchema/index.js +9 -0
  255. package/build/jsonSchemaForm/allOfSchema/index.js.map +1 -0
  256. package/build/jsonSchemaForm/arrayTypeSchema/ArraySchema.js +20 -0
  257. package/build/jsonSchemaForm/arrayTypeSchema/ArraySchema.js.map +1 -0
  258. package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/ArrayListSchema.js +21 -0
  259. package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/ArrayListSchema.js.map +1 -0
  260. package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/index.js +9 -0
  261. package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/index.js.map +1 -0
  262. package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/MultipleFileUploadSchema.js +87 -0
  263. package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/MultipleFileUploadSchema.js.map +1 -0
  264. package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/MultipleFileUploadSchema.messages.js +21 -0
  265. package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/MultipleFileUploadSchema.messages.js.map +1 -0
  266. package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/index.js +9 -0
  267. package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/index.js.map +1 -0
  268. package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/index.js +19 -0
  269. package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/index.js.map +1 -0
  270. package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/upload-utils.js +39 -0
  271. package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/upload-utils.js.map +1 -0
  272. package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/useFormattedDefaultErrorMessages.js +21 -0
  273. package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/useFormattedDefaultErrorMessages.js.map +1 -0
  274. package/build/jsonSchemaForm/arrayTypeSchema/index.js +9 -0
  275. package/build/jsonSchemaForm/arrayTypeSchema/index.js.map +1 -0
  276. package/build/jsonSchemaForm/basicTypeSchema/BasicTypeSchema.js +92 -0
  277. package/build/jsonSchemaForm/basicTypeSchema/BasicTypeSchema.js.map +1 -0
  278. package/build/jsonSchemaForm/basicTypeSchema/index.js +9 -0
  279. package/build/jsonSchemaForm/basicTypeSchema/index.js.map +1 -0
  280. package/build/jsonSchemaForm/controlFeedback/ControlFeedback.js +74 -0
  281. package/build/jsonSchemaForm/controlFeedback/ControlFeedback.js.map +1 -0
  282. package/build/jsonSchemaForm/controlFeedback/ControlFeedback.messages.js +56 -0
  283. package/build/jsonSchemaForm/controlFeedback/ControlFeedback.messages.js.map +1 -0
  284. package/build/jsonSchemaForm/controlFeedback/index.js +9 -0
  285. package/build/jsonSchemaForm/controlFeedback/index.js.map +1 -0
  286. package/build/jsonSchemaForm/genericSchema/GenericSchema.js +119 -0
  287. package/build/jsonSchemaForm/genericSchema/GenericSchema.js.map +1 -0
  288. package/build/jsonSchemaForm/genericSchema/index.js +9 -0
  289. package/build/jsonSchemaForm/genericSchema/index.js.map +1 -0
  290. package/build/jsonSchemaForm/help/Help.js +15 -0
  291. package/build/jsonSchemaForm/help/Help.js.map +1 -0
  292. package/build/jsonSchemaForm/help/Help.messages.js +11 -0
  293. package/build/jsonSchemaForm/help/Help.messages.js.map +1 -0
  294. package/build/jsonSchemaForm/help/index.js +9 -0
  295. package/build/jsonSchemaForm/help/index.js.map +1 -0
  296. package/build/jsonSchemaForm/index.js +9 -0
  297. package/build/jsonSchemaForm/index.js.map +1 -0
  298. package/build/jsonSchemaForm/objectSchema/ObjectSchema.js +63 -0
  299. package/build/jsonSchemaForm/objectSchema/ObjectSchema.js.map +1 -0
  300. package/build/jsonSchemaForm/objectSchema/index.js +9 -0
  301. package/build/jsonSchemaForm/objectSchema/index.js.map +1 -0
  302. package/build/jsonSchemaForm/oneOfSchema/OneOfSchema.js +136 -0
  303. package/build/jsonSchemaForm/oneOfSchema/OneOfSchema.js.map +1 -0
  304. package/build/jsonSchemaForm/oneOfSchema/index.js +9 -0
  305. package/build/jsonSchemaForm/oneOfSchema/index.js.map +1 -0
  306. package/build/jsonSchemaForm/oneOfSchema/utils/const-schema-utils.js +14 -0
  307. package/build/jsonSchemaForm/oneOfSchema/utils/const-schema-utils.js.map +1 -0
  308. package/build/jsonSchemaForm/oneOfSchema/utils/index.js +19 -0
  309. package/build/jsonSchemaForm/oneOfSchema/utils/index.js.map +1 -0
  310. package/build/jsonSchemaForm/oneOfSchema/utils/one-of-utils.js +70 -0
  311. package/build/jsonSchemaForm/oneOfSchema/utils/one-of-utils.js.map +1 -0
  312. package/build/jsonSchemaForm/persistAsyncSchema/PersistAsyncSchema.js +21 -0
  313. package/build/jsonSchemaForm/persistAsyncSchema/PersistAsyncSchema.js.map +1 -0
  314. package/build/jsonSchemaForm/persistAsyncSchema/PersistAsyncSchema.messages.js +11 -0
  315. package/build/jsonSchemaForm/persistAsyncSchema/PersistAsyncSchema.messages.js.map +1 -0
  316. package/build/jsonSchemaForm/persistAsyncSchema/index.js +9 -0
  317. package/build/jsonSchemaForm/persistAsyncSchema/index.js.map +1 -0
  318. package/build/jsonSchemaForm/persistAsyncSchema/persistAsyncBasicSchema/PersistAsyncBasicSchema.js +120 -0
  319. package/build/jsonSchemaForm/persistAsyncSchema/persistAsyncBasicSchema/PersistAsyncBasicSchema.js.map +1 -0
  320. package/build/jsonSchemaForm/persistAsyncSchema/persistAsyncBasicSchema/index.js +9 -0
  321. package/build/jsonSchemaForm/persistAsyncSchema/persistAsyncBasicSchema/index.js.map +1 -0
  322. package/build/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/PersistAsyncBlobSchema.js +67 -0
  323. package/build/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/PersistAsyncBlobSchema.js.map +1 -0
  324. package/build/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/UploadInputAdapter.js +37 -0
  325. package/build/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/UploadInputAdapter.js.map +1 -0
  326. package/build/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/index.js +9 -0
  327. package/build/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/index.js.map +1 -0
  328. package/build/jsonSchemaForm/promotedOneOfSchema/PromotedOneOfSchema.js +59 -0
  329. package/build/jsonSchemaForm/promotedOneOfSchema/PromotedOneOfSchema.js.map +1 -0
  330. package/build/jsonSchemaForm/promotedOneOfSchema/index.js +9 -0
  331. package/build/jsonSchemaForm/promotedOneOfSchema/index.js.map +1 -0
  332. package/build/jsonSchemaForm/promotedOneOfSchema/promoted-one-of-utils.js +13 -0
  333. package/build/jsonSchemaForm/promotedOneOfSchema/promoted-one-of-utils.js.map +1 -0
  334. package/build/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfCheckboxControl.js +19 -0
  335. package/build/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfCheckboxControl.js.map +1 -0
  336. package/build/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfControl.js +26 -0
  337. package/build/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfControl.js.map +1 -0
  338. package/build/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfRadioControl.js +24 -0
  339. package/build/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfRadioControl.js.map +1 -0
  340. package/build/jsonSchemaForm/readOnlySchema/ReadOnlySchema.js +59 -0
  341. package/build/jsonSchemaForm/readOnlySchema/ReadOnlySchema.js.map +1 -0
  342. package/build/jsonSchemaForm/readOnlySchema/ReadOnlySchema.messages.js +16 -0
  343. package/build/jsonSchemaForm/readOnlySchema/ReadOnlySchema.messages.js.map +1 -0
  344. package/build/jsonSchemaForm/readOnlySchema/index.js +9 -0
  345. package/build/jsonSchemaForm/readOnlySchema/index.js.map +1 -0
  346. package/build/jsonSchemaForm/schemaFormControl/SchemaFormControl.js +99 -0
  347. package/build/jsonSchemaForm/schemaFormControl/SchemaFormControl.js.map +1 -0
  348. package/build/jsonSchemaForm/schemaFormControl/index.js +9 -0
  349. package/build/jsonSchemaForm/schemaFormControl/index.js.map +1 -0
  350. package/build/jsonSchemaForm/schemaFormControl/utils/currency-utils.js +78 -0
  351. package/build/jsonSchemaForm/schemaFormControl/utils/currency-utils.js.map +1 -0
  352. package/build/jsonSchemaForm/schemaFormControl/utils/index.js +18 -0
  353. package/build/jsonSchemaForm/schemaFormControl/utils/index.js.map +1 -0
  354. package/build/jsonSchemaForm/schemaFormControl/utils/mapping-utils.js +111 -0
  355. package/build/jsonSchemaForm/schemaFormControl/utils/mapping-utils.js.map +1 -0
  356. package/build/jsonSchemaForm/validationAsyncSchema/ValidationAsyncSchema.js +90 -0
  357. package/build/jsonSchemaForm/validationAsyncSchema/ValidationAsyncSchema.js.map +1 -0
  358. package/build/jsonSchemaForm/validationAsyncSchema/index.js +9 -0
  359. package/build/jsonSchemaForm/validationAsyncSchema/index.js.map +1 -0
  360. package/build/layout/DynamicLayout.js +53 -0
  361. package/build/layout/DynamicLayout.js.map +1 -0
  362. package/build/layout/alert/DynamicAlert.js +32 -0
  363. package/build/layout/alert/DynamicAlert.js.map +1 -0
  364. package/build/layout/box/DynamicBox.js +33 -0
  365. package/build/layout/box/DynamicBox.js.map +1 -0
  366. package/build/layout/button/DynamicButton.js +50 -0
  367. package/build/layout/button/DynamicButton.js.map +1 -0
  368. package/build/layout/columns/DynamicColumns.js +30 -0
  369. package/build/layout/columns/DynamicColumns.js.map +1 -0
  370. package/build/layout/decision/DynamicDecision.js +30 -0
  371. package/build/layout/decision/DynamicDecision.js.map +1 -0
  372. package/build/layout/divider/DynamicDivider.js +11 -0
  373. package/build/layout/divider/DynamicDivider.js.map +1 -0
  374. package/build/layout/external/DynamicExternal.js +26 -0
  375. package/build/layout/external/DynamicExternal.js.map +1 -0
  376. package/build/layout/external/DynamicExternal.messages.js +11 -0
  377. package/build/layout/external/DynamicExternal.messages.js.map +1 -0
  378. package/build/layout/form/DynamicForm.js +17 -0
  379. package/build/layout/form/DynamicForm.js.map +1 -0
  380. package/build/layout/heading/DynamicHeading.js +23 -0
  381. package/build/layout/heading/DynamicHeading.js.map +1 -0
  382. package/build/layout/icon/DynamicIcon.js +50 -0
  383. package/build/layout/icon/DynamicIcon.js.map +1 -0
  384. package/build/layout/image/DynamicImage.js +63 -0
  385. package/build/layout/image/DynamicImage.js.map +1 -0
  386. package/build/layout/index.js +41 -0
  387. package/build/layout/index.js.map +1 -0
  388. package/build/layout/info/DynamicInfo.js +10 -0
  389. package/build/layout/info/DynamicInfo.js.map +1 -0
  390. package/build/layout/list/DynamicList.js +22 -0
  391. package/build/layout/list/DynamicList.js.map +1 -0
  392. package/build/layout/loadingIndicator/DynamicLoadingIndicator.js +13 -0
  393. package/build/layout/loadingIndicator/DynamicLoadingIndicator.js.map +1 -0
  394. package/build/layout/paragraph/DynamicParagraph.js +31 -0
  395. package/build/layout/paragraph/DynamicParagraph.js.map +1 -0
  396. package/build/layout/paragraph/DynamicParagraph.messages.js +16 -0
  397. package/build/layout/paragraph/DynamicParagraph.messages.js.map +1 -0
  398. package/build/layout/paragraph/useSnackBarIfAvailable.js +14 -0
  399. package/build/layout/paragraph/useSnackBarIfAvailable.js.map +1 -0
  400. package/build/layout/review/DynamicReview.js +24 -0
  401. package/build/layout/review/DynamicReview.js.map +1 -0
  402. package/build/layout/utils.js +34 -0
  403. package/build/layout/utils.js.map +1 -0
  404. package/build/step/cameraStep/CameraStep.js +85 -0
  405. package/build/step/cameraStep/CameraStep.js.map +1 -0
  406. package/build/step/cameraStep/cameraCapture/CameraCapture.js +71 -0
  407. package/build/step/cameraStep/cameraCapture/CameraCapture.js.map +1 -0
  408. package/build/step/cameraStep/cameraCapture/CameraCapture.messages.js +21 -0
  409. package/build/step/cameraStep/cameraCapture/CameraCapture.messages.js.map +1 -0
  410. package/build/step/cameraStep/cameraCapture/components/index.js +19 -0
  411. package/build/step/cameraStep/cameraCapture/components/index.js.map +1 -0
  412. package/build/step/cameraStep/cameraCapture/hooks/index.js +30 -0
  413. package/build/step/cameraStep/cameraCapture/hooks/index.js.map +1 -0
  414. package/build/step/cameraStep/cameraCapture/index.js +9 -0
  415. package/build/step/cameraStep/cameraCapture/index.js.map +1 -0
  416. package/build/step/cameraStep/cameraCapture/overlay/Overlay.js +69 -0
  417. package/build/step/cameraStep/cameraCapture/overlay/Overlay.js.map +1 -0
  418. package/build/step/cameraStep/cameraCapture/screens/CameraNotSupported/CameraNotSupported.js +14 -0
  419. package/build/step/cameraStep/cameraCapture/screens/CameraNotSupported/CameraNotSupported.js.map +1 -0
  420. package/build/step/cameraStep/cameraCapture/screens/CameraNotSupported/CameraNotSupported.messages.js +16 -0
  421. package/build/step/cameraStep/cameraCapture/screens/CameraNotSupported/CameraNotSupported.messages.js.map +1 -0
  422. package/build/step/cameraStep/cameraCapture/screens/NoCameraAccess/NoCameraAccess.js +15 -0
  423. package/build/step/cameraStep/cameraCapture/screens/NoCameraAccess/NoCameraAccess.js.map +1 -0
  424. package/build/step/cameraStep/cameraCapture/screens/NoCameraAccess/NoCameraAccess.messages.js +21 -0
  425. package/build/step/cameraStep/cameraCapture/screens/NoCameraAccess/NoCameraAccess.messages.js.map +1 -0
  426. package/build/step/cameraStep/cameraCapture/screens/index.js +11 -0
  427. package/build/step/cameraStep/cameraCapture/screens/index.js.map +1 -0
  428. package/build/step/cameraStep/cameraCapture/tracking/index.js +23 -0
  429. package/build/step/cameraStep/cameraCapture/tracking/index.js.map +1 -0
  430. package/build/step/cameraStep/cameraCapture/utils/index.js +52 -0
  431. package/build/step/cameraStep/cameraCapture/utils/index.js.map +1 -0
  432. package/build/step/cameraStep/index.js +9 -0
  433. package/build/step/cameraStep/index.js.map +1 -0
  434. package/build/step/externalConfirmationStep/ExternalConfirmationStep.js +69 -0
  435. package/build/step/externalConfirmationStep/ExternalConfirmationStep.js.map +1 -0
  436. package/build/step/externalConfirmationStep/ExternalConfirmationStep.messages.js +26 -0
  437. package/build/step/externalConfirmationStep/ExternalConfirmationStep.messages.js.map +1 -0
  438. package/build/step/externalConfirmationStep/index.js +9 -0
  439. package/build/step/externalConfirmationStep/index.js.map +1 -0
  440. package/build/step/index.js +13 -0
  441. package/build/step/index.js.map +1 -0
  442. package/build/step/layoutStep/LayoutStep.js +36 -0
  443. package/build/step/layoutStep/LayoutStep.js.map +1 -0
  444. package/build/step/layoutStep/index.js +9 -0
  445. package/build/step/layoutStep/index.js.map +1 -0
  446. package/build/step/layoutStep/utils/index.js +8 -0
  447. package/build/step/layoutStep/utils/index.js.map +1 -0
  448. package/build/step/layoutStep/utils/inline-reference-utils.js +79 -0
  449. package/build/step/layoutStep/utils/inline-reference-utils.js.map +1 -0
  450. package/build/step/layoutStep/utils/layout-utils.js +204 -0
  451. package/build/step/layoutStep/utils/layout-utils.js.map +1 -0
  452. package/build/types/common/FormControl.js +3 -0
  453. package/build/types/common/FormControl.js.map +1 -0
  454. package/build/types/index.d.ts +15 -10
  455. package/build/types/index.js +43 -0
  456. package/build/types/index.js.map +1 -0
  457. package/build/types/specification/Action.js +3 -0
  458. package/build/types/specification/Action.js.map +1 -0
  459. package/build/types/specification/FileUploadSchema.js +9 -0
  460. package/build/types/specification/FileUploadSchema.js.map +1 -0
  461. package/build/types/specification/LayoutComponent.js +3 -0
  462. package/build/types/specification/LayoutComponent.js.map +1 -0
  463. package/build/types/specification/Model.js +31 -0
  464. package/build/types/specification/Model.js.map +1 -0
  465. package/build/types/specification/PersistAsync.js +3 -0
  466. package/build/types/specification/PersistAsync.js.map +1 -0
  467. package/build/types/specification/Polling.js +3 -0
  468. package/build/types/specification/Polling.js.map +1 -0
  469. package/build/types/specification/Promotion.js +3 -0
  470. package/build/types/specification/Promotion.js.map +1 -0
  471. package/build/types/specification/Schema.js +68 -0
  472. package/build/types/specification/Schema.js.map +1 -0
  473. package/build/types/specification/Step.js +7 -0
  474. package/build/types/specification/Step.js.map +1 -0
  475. package/build/types/specification/ValidationAsync.js +3 -0
  476. package/build/types/specification/ValidationAsync.js.map +1 -0
  477. package/build/types/specification/core.js +3 -0
  478. package/build/types/specification/core.js.map +1 -0
  479. package/package.json +24 -26
  480. package/build/main.cjs.js +0 -6980
  481. package/build/main.cjs.min.js +0 -10
  482. package/build/main.esm.js +0 -6993
  483. package/build/main.esm.min.js +0 -10
  484. package/build/main.js +0 -6970
  485. package/build/main.min.js +0 -10
  486. package/build/types/types/index.d.ts +0 -15
  487. /package/build/{types/common → common}/constants/DateMode.d.ts +0 -0
  488. /package/build/{types/common → common}/constants/FormControlType.d.ts +0 -0
  489. /package/build/{types/common → common}/constants/MonthFormat.d.ts +0 -0
  490. /package/build/{types/common → common}/constants/SchemaType.d.ts +0 -0
  491. /package/build/{types/common → common}/constants/Size.d.ts +0 -0
  492. /package/build/{types/common → common}/constants/index.d.ts +0 -0
  493. /package/build/{types/common → common}/contexts/dynamicFlowContexts/DynamicFlowContexts.d.ts +0 -0
  494. /package/build/{types/common → common}/contexts/dynamicFlowContexts/usePendingPromiseCounter.d.ts +0 -0
  495. /package/build/{types/common → common}/contexts/eventsContext/EventsContext.d.ts +0 -0
  496. /package/build/{types/common → common}/contexts/fetcherContexts/FetcherContexts.d.ts +0 -0
  497. /package/build/{types/common → common}/contexts/index.d.ts +0 -0
  498. /package/build/{types/common → common}/contexts/logContext/LogContext.d.ts +0 -0
  499. /package/build/{types/common → common}/hooks/index.d.ts +0 -0
  500. /package/build/{types/common → common}/hooks/useDebouncedFunction/useDebouncedFunction.d.ts +0 -0
  501. /package/build/{types/common → common}/hooks/useExternal/useExternal.d.ts +0 -0
  502. /package/build/{types/common → common}/hooks/useExternalStepPolling/useExternalStepPolling.d.ts +0 -0
  503. /package/build/{types/common → common}/hooks/usePersistAsync/usePersistAsync.d.ts +0 -0
  504. /package/build/{types/common → common}/hooks/usePolling/usePolling.d.ts +0 -0
  505. /package/build/{types/common → common}/hooks/usePrevious/usePrevious.d.ts +0 -0
  506. /package/build/{types/common → common}/hooks/useStepPolling/useStepPolling.d.ts +0 -0
  507. /package/build/{types/common → common}/makeFetcher/index.d.ts +0 -0
  508. /package/build/{types/common → common}/makeFetcher/makeFetcher.d.ts +0 -0
  509. /package/build/{types/common → common}/messages.d.ts +0 -0
  510. /package/build/{types/common → common}/utils/api-utils.d.ts +0 -0
  511. /package/build/{types/common → common}/utils/date-utils.d.ts +0 -0
  512. /package/build/{types/common → common}/utils/debounce.d.ts +0 -0
  513. /package/build/{types/common → common}/utils/file-utils.d.ts +0 -0
  514. /package/build/{types/common → common}/utils/id-utils.d.ts +0 -0
  515. /package/build/{types/common → common}/utils/index.d.ts +0 -0
  516. /package/build/{types/common → common}/utils/is-equal.d.ts +0 -0
  517. /package/build/{types/common → common}/utils/schema-utils.d.ts +0 -0
  518. /package/build/{types/common → common}/utils/step-utils.d.ts +0 -0
  519. /package/build/{types/common → common}/validators/index.d.ts +0 -0
  520. /package/build/{types/common → common}/validators/models/model-validators.d.ts +0 -0
  521. /package/build/{types/common → common}/validators/models/models.utils.d.ts +0 -0
  522. /package/build/{types/common → common}/validators/schemas/schema-validators.d.ts +0 -0
  523. /package/build/{types/common → common}/validators/types/type-validators.d.ts +0 -0
  524. /package/build/{types/common → common}/validators/validationFailures/validation-failures.d.ts +0 -0
  525. /package/build/{types/common → common}/validators/validationFailures/validation-failures.utils.d.ts +0 -0
  526. /package/build/{types/common → common}/validators/values/value-validators.d.ts +0 -0
  527. /package/build/{types/dynamicFlow → dynamicFlow}/DynamicFlow.d.ts +0 -0
  528. /package/build/{types/dynamicFlow → dynamicFlow}/DynamicFlowStep.d.ts +0 -0
  529. /package/build/{types/dynamicFlow → dynamicFlow}/DynamicFlowTypes.d.ts +0 -0
  530. /package/build/{types/dynamicFlow → dynamicFlow}/index.d.ts +0 -0
  531. /package/build/{types/dynamicFlow → dynamicFlow}/stories/DynamicFlow.story.d.ts +0 -0
  532. /package/build/{types/dynamicFlow → dynamicFlow}/stories/EditableDynamicFlow.d.ts +0 -0
  533. /package/build/{types/dynamicFlow → dynamicFlow}/stories/fixtureFetcher.d.ts +0 -0
  534. /package/build/{types/dynamicFlow → dynamicFlow}/utils/errorBoundary/ErrorBoundary.d.ts +0 -0
  535. /package/build/{types/dynamicFlow → dynamicFlow}/utils/errorBoundary/ErrorBoundary.messages.d.ts +0 -0
  536. /package/build/{types/dynamicFlow → dynamicFlow}/utils/errorBoundary/ErrorBoundaryAlert.d.ts +0 -0
  537. /package/build/{types/dynamicFlow → dynamicFlow}/utils/index.d.ts +0 -0
  538. /package/build/{types/dynamicFlow → dynamicFlow}/utils/responseParsers/response-parsers.d.ts +0 -0
  539. /package/build/{types/dynamicFlow → dynamicFlow}/utils/useDebouncedRefresh/useDebouncedRefresh.d.ts +0 -0
  540. /package/build/{types/dynamicFlow → dynamicFlow}/utils/useDynamicFlowState.d.ts +0 -0
  541. /package/build/{types/dynamicFlow → dynamicFlow}/utils/useLoader.d.ts +0 -0
  542. /package/build/{types/fixtures → fixtures}/components/alert.d.ts +0 -0
  543. /package/build/{types/fixtures → fixtures}/components/box.d.ts +0 -0
  544. /package/build/{types/fixtures → fixtures}/components/button.d.ts +0 -0
  545. /package/build/{types/fixtures → fixtures}/components/columns.d.ts +0 -0
  546. /package/build/{types/fixtures → fixtures}/components/copyable.d.ts +0 -0
  547. /package/build/{types/fixtures → fixtures}/components/decision.d.ts +0 -0
  548. /package/build/{types/fixtures → fixtures}/components/heading.d.ts +0 -0
  549. /package/build/{types/fixtures → fixtures}/components/image.d.ts +0 -0
  550. /package/build/{types/fixtures → fixtures}/components/index.d.ts +0 -0
  551. /package/build/{types/fixtures → fixtures}/components/info.d.ts +0 -0
  552. /package/build/{types/fixtures → fixtures}/components/list.d.ts +0 -0
  553. /package/build/{types/fixtures → fixtures}/components/loading-indicator.d.ts +0 -0
  554. /package/build/{types/fixtures → fixtures}/components/paragraph.d.ts +0 -0
  555. /package/build/{types/fixtures → fixtures}/components/review.d.ts +0 -0
  556. /package/build/{types/fixtures → fixtures}/examples/camera-capture.d.ts +0 -0
  557. /package/build/{types/fixtures → fixtures}/examples/index.d.ts +0 -0
  558. /package/build/{types/fixtures → fixtures}/examples/recipient-update.d.ts +0 -0
  559. /package/build/{types/fixtures → fixtures}/examples/recipient.d.ts +0 -0
  560. /package/build/{types/fixtures → fixtures}/examples/single-file-upload.d.ts +0 -0
  561. /package/build/{types/fixtures → fixtures}/examples/step-validation-errors.d.ts +0 -0
  562. /package/build/{types/fixtures → fixtures}/features/action-response.d.ts +0 -0
  563. /package/build/{types/fixtures → fixtures}/features/external.d.ts +0 -0
  564. /package/build/{types/fixtures → fixtures}/features/index.d.ts +0 -0
  565. /package/build/{types/fixtures → fixtures}/features/persist-async.d.ts +0 -0
  566. /package/build/{types/fixtures → fixtures}/features/polling.d.ts +0 -0
  567. /package/build/{types/fixtures → fixtures}/features/validation-async.d.ts +0 -0
  568. /package/build/{types/fixtures → fixtures}/index.d.ts +0 -0
  569. /package/build/{types/fixtures → fixtures}/jsonSchemaForm/allOf.d.ts +0 -0
  570. /package/build/{types/fixtures → fixtures}/layouts/all.d.ts +0 -0
  571. /package/build/{types/fixtures → fixtures}/layouts/final-step-layout.d.ts +0 -0
  572. /package/build/{types/fixtures → fixtures}/layouts/index.d.ts +0 -0
  573. /package/build/{types/fixtures → fixtures}/layouts/list.d.ts +0 -0
  574. /package/build/{types/fixtures → fixtures}/layouts/pay-in.d.ts +0 -0
  575. /package/build/{types/fixtures → fixtures}/layouts/review.d.ts +0 -0
  576. /package/build/{types/fixtures → fixtures}/layouts/success.d.ts +0 -0
  577. /package/build/{types/fixtures → fixtures}/responses/action-response-final.d.ts +0 -0
  578. /package/build/{types/fixtures → fixtures}/responses/action.d.ts +0 -0
  579. /package/build/{types/fixtures → fixtures}/responses/exit.d.ts +0 -0
  580. /package/build/{types/fixtures → fixtures}/responses/index.d.ts +0 -0
  581. /package/build/{types/fixtures → fixtures}/responses/recipient-update-final.d.ts +0 -0
  582. /package/build/{types/fixtures → fixtures}/schemas/basic-form.d.ts +0 -0
  583. /package/build/{types/fixtures → fixtures}/schemas/index.d.ts +0 -0
  584. /package/build/{types/fixtures → fixtures}/schemas/number-and-integer.d.ts +0 -0
  585. /package/build/{types/fixtures → fixtures}/schemas/one-of.d.ts +0 -0
  586. /package/build/{types/fixtures → fixtures}/schemas/string-formats.d.ts +0 -0
  587. /package/build/{types/fixtures → fixtures}/utils/image-util.d.ts +0 -0
  588. /package/build/{types/formControl → formControl}/FormControl.d.ts +0 -0
  589. /package/build/{types/formControl → formControl}/index.d.ts +0 -0
  590. /package/build/{types/formControl → formControl}/utils/index.d.ts +0 -0
  591. /package/build/{types/formControl → formControl}/utils/value-utils.d.ts +0 -0
  592. /package/build/{types/i18n → i18n}/index.d.ts +0 -0
  593. /package/build/{types/jsonSchemaForm → jsonSchemaForm}/JsonSchemaForm.d.ts +0 -0
  594. /package/build/{types/jsonSchemaForm → jsonSchemaForm}/allOfSchema/AllOfSchema.d.ts +0 -0
  595. /package/build/{types/jsonSchemaForm → jsonSchemaForm}/allOfSchema/index.d.ts +0 -0
  596. /package/build/{types/jsonSchemaForm → jsonSchemaForm}/arrayTypeSchema/ArraySchema.d.ts +0 -0
  597. /package/build/{types/jsonSchemaForm → jsonSchemaForm}/arrayTypeSchema/arrayListSchema/ArrayListSchema.d.ts +0 -0
  598. /package/build/{types/jsonSchemaForm → jsonSchemaForm}/arrayTypeSchema/arrayListSchema/index.d.ts +0 -0
  599. /package/build/{types/jsonSchemaForm → jsonSchemaForm}/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/MultipleFileUploadSchema.d.ts +0 -0
  600. /package/build/{types/jsonSchemaForm → jsonSchemaForm}/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/MultipleFileUploadSchema.messages.d.ts +0 -0
  601. /package/build/{types/jsonSchemaForm → jsonSchemaForm}/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/index.d.ts +0 -0
  602. /package/build/{types/jsonSchemaForm → jsonSchemaForm}/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/index.d.ts +0 -0
  603. /package/build/{types/jsonSchemaForm → jsonSchemaForm}/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/upload-utils.d.ts +0 -0
  604. /package/build/{types/jsonSchemaForm → jsonSchemaForm}/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/useFormattedDefaultErrorMessages.d.ts +0 -0
  605. /package/build/{types/jsonSchemaForm → jsonSchemaForm}/arrayTypeSchema/index.d.ts +0 -0
  606. /package/build/{types/jsonSchemaForm → jsonSchemaForm}/basicTypeSchema/BasicTypeSchema.d.ts +0 -0
  607. /package/build/{types/jsonSchemaForm → jsonSchemaForm}/basicTypeSchema/index.d.ts +0 -0
  608. /package/build/{types/jsonSchemaForm → jsonSchemaForm}/controlFeedback/ControlFeedback.d.ts +0 -0
  609. /package/build/{types/jsonSchemaForm → jsonSchemaForm}/controlFeedback/ControlFeedback.messages.d.ts +0 -0
  610. /package/build/{types/jsonSchemaForm → jsonSchemaForm}/controlFeedback/index.d.ts +0 -0
  611. /package/build/{types/jsonSchemaForm → jsonSchemaForm}/genericSchema/GenericSchema.d.ts +0 -0
  612. /package/build/{types/jsonSchemaForm → jsonSchemaForm}/genericSchema/index.d.ts +0 -0
  613. /package/build/{types/jsonSchemaForm → jsonSchemaForm}/help/Help.d.ts +0 -0
  614. /package/build/{types/jsonSchemaForm → jsonSchemaForm}/help/Help.messages.d.ts +0 -0
  615. /package/build/{types/jsonSchemaForm → jsonSchemaForm}/help/index.d.ts +0 -0
  616. /package/build/{types/jsonSchemaForm → jsonSchemaForm}/index.d.ts +0 -0
  617. /package/build/{types/jsonSchemaForm → jsonSchemaForm}/objectSchema/ObjectSchema.d.ts +0 -0
  618. /package/build/{types/jsonSchemaForm → jsonSchemaForm}/objectSchema/index.d.ts +0 -0
  619. /package/build/{types/jsonSchemaForm → jsonSchemaForm}/oneOfSchema/OneOfSchema.d.ts +0 -0
  620. /package/build/{types/jsonSchemaForm → jsonSchemaForm}/oneOfSchema/index.d.ts +0 -0
  621. /package/build/{types/jsonSchemaForm → jsonSchemaForm}/oneOfSchema/utils/const-schema-utils.d.ts +0 -0
  622. /package/build/{types/jsonSchemaForm → jsonSchemaForm}/oneOfSchema/utils/index.d.ts +0 -0
  623. /package/build/{types/jsonSchemaForm → jsonSchemaForm}/oneOfSchema/utils/one-of-utils.d.ts +0 -0
  624. /package/build/{types/jsonSchemaForm → jsonSchemaForm}/persistAsyncSchema/PersistAsyncSchema.d.ts +0 -0
  625. /package/build/{types/jsonSchemaForm → jsonSchemaForm}/persistAsyncSchema/PersistAsyncSchema.messages.d.ts +0 -0
  626. /package/build/{types/jsonSchemaForm → jsonSchemaForm}/persistAsyncSchema/index.d.ts +0 -0
  627. /package/build/{types/jsonSchemaForm → jsonSchemaForm}/persistAsyncSchema/persistAsyncBasicSchema/PersistAsyncBasicSchema.d.ts +0 -0
  628. /package/build/{types/jsonSchemaForm → jsonSchemaForm}/persistAsyncSchema/persistAsyncBasicSchema/index.d.ts +0 -0
  629. /package/build/{types/jsonSchemaForm → jsonSchemaForm}/persistAsyncSchema/persistAsyncBlobSchema/PersistAsyncBlobSchema.d.ts +0 -0
  630. /package/build/{types/jsonSchemaForm → jsonSchemaForm}/persistAsyncSchema/persistAsyncBlobSchema/UploadInputAdapter.d.ts +0 -0
  631. /package/build/{types/jsonSchemaForm → jsonSchemaForm}/persistAsyncSchema/persistAsyncBlobSchema/index.d.ts +0 -0
  632. /package/build/{types/jsonSchemaForm → jsonSchemaForm}/promotedOneOfSchema/PromotedOneOfSchema.d.ts +0 -0
  633. /package/build/{types/jsonSchemaForm → jsonSchemaForm}/promotedOneOfSchema/index.d.ts +0 -0
  634. /package/build/{types/jsonSchemaForm → jsonSchemaForm}/promotedOneOfSchema/promoted-one-of-utils.d.ts +0 -0
  635. /package/build/{types/jsonSchemaForm → jsonSchemaForm}/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfCheckboxControl.d.ts +0 -0
  636. /package/build/{types/jsonSchemaForm → jsonSchemaForm}/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfControl.d.ts +0 -0
  637. /package/build/{types/jsonSchemaForm → jsonSchemaForm}/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfRadioControl.d.ts +0 -0
  638. /package/build/{types/jsonSchemaForm → jsonSchemaForm}/readOnlySchema/ReadOnlySchema.d.ts +0 -0
  639. /package/build/{types/jsonSchemaForm → jsonSchemaForm}/readOnlySchema/ReadOnlySchema.messages.d.ts +0 -0
  640. /package/build/{types/jsonSchemaForm → jsonSchemaForm}/readOnlySchema/index.d.ts +0 -0
  641. /package/build/{types/jsonSchemaForm → jsonSchemaForm}/schemaFormControl/SchemaFormControl.d.ts +0 -0
  642. /package/build/{types/jsonSchemaForm → jsonSchemaForm}/schemaFormControl/index.d.ts +0 -0
  643. /package/build/{types/jsonSchemaForm → jsonSchemaForm}/schemaFormControl/utils/currency-utils.d.ts +0 -0
  644. /package/build/{types/jsonSchemaForm → jsonSchemaForm}/schemaFormControl/utils/index.d.ts +0 -0
  645. /package/build/{types/jsonSchemaForm → jsonSchemaForm}/schemaFormControl/utils/mapping-utils.d.ts +0 -0
  646. /package/build/{types/jsonSchemaForm → jsonSchemaForm}/validationAsyncSchema/ValidationAsyncSchema.d.ts +0 -0
  647. /package/build/{types/jsonSchemaForm → jsonSchemaForm}/validationAsyncSchema/index.d.ts +0 -0
  648. /package/build/{types/layout → layout}/DynamicLayout.d.ts +0 -0
  649. /package/build/{types/layout → layout}/alert/DynamicAlert.d.ts +0 -0
  650. /package/build/{types/layout → layout}/box/DynamicBox.d.ts +0 -0
  651. /package/build/{types/layout → layout}/button/DynamicButton.d.ts +0 -0
  652. /package/build/{types/layout → layout}/columns/DynamicColumns.d.ts +0 -0
  653. /package/build/{types/layout → layout}/decision/DynamicDecision.d.ts +0 -0
  654. /package/build/{types/layout → layout}/divider/DynamicDivider.d.ts +0 -0
  655. /package/build/{types/layout → layout}/external/DynamicExternal.d.ts +0 -0
  656. /package/build/{types/layout → layout}/external/DynamicExternal.messages.d.ts +0 -0
  657. /package/build/{types/layout → layout}/form/DynamicForm.d.ts +0 -0
  658. /package/build/{types/layout → layout}/heading/DynamicHeading.d.ts +0 -0
  659. /package/build/{types/layout → layout}/icon/DynamicIcon.d.ts +0 -0
  660. /package/build/{types/layout → layout}/image/DynamicImage.d.ts +0 -0
  661. /package/build/{types/layout → layout}/index.d.ts +0 -0
  662. /package/build/{types/layout → layout}/info/DynamicInfo.d.ts +0 -0
  663. /package/build/{types/layout → layout}/list/DynamicList.d.ts +0 -0
  664. /package/build/{types/layout → layout}/loadingIndicator/DynamicLoadingIndicator.d.ts +0 -0
  665. /package/build/{types/layout → layout}/paragraph/DynamicParagraph.d.ts +0 -0
  666. /package/build/{types/layout → layout}/paragraph/DynamicParagraph.messages.d.ts +0 -0
  667. /package/build/{types/layout → layout}/paragraph/useSnackBarIfAvailable.d.ts +0 -0
  668. /package/build/{types/layout → layout}/review/DynamicReview.d.ts +0 -0
  669. /package/build/{types/layout → layout}/utils.d.ts +0 -0
  670. /package/build/{types/step → step}/cameraStep/CameraStep.d.ts +0 -0
  671. /package/build/{types/step → step}/cameraStep/cameraCapture/CameraCapture.d.ts +0 -0
  672. /package/build/{types/step → step}/cameraStep/cameraCapture/CameraCapture.messages.d.ts +0 -0
  673. /package/build/{types/step → step}/cameraStep/cameraCapture/components/index.d.ts +0 -0
  674. /package/build/{types/step → step}/cameraStep/cameraCapture/hooks/index.d.ts +0 -0
  675. /package/build/{types/step → step}/cameraStep/cameraCapture/index.d.ts +0 -0
  676. /package/build/{types/step → step}/cameraStep/cameraCapture/overlay/Overlay.d.ts +0 -0
  677. /package/build/{types/step → step}/cameraStep/cameraCapture/screens/CameraNotSupported/CameraNotSupported.d.ts +0 -0
  678. /package/build/{types/step → step}/cameraStep/cameraCapture/screens/CameraNotSupported/CameraNotSupported.messages.d.ts +0 -0
  679. /package/build/{types/step → step}/cameraStep/cameraCapture/screens/NoCameraAccess/NoCameraAccess.d.ts +0 -0
  680. /package/build/{types/step → step}/cameraStep/cameraCapture/screens/NoCameraAccess/NoCameraAccess.messages.d.ts +0 -0
  681. /package/build/{types/step → step}/cameraStep/cameraCapture/screens/index.d.ts +0 -0
  682. /package/build/{types/step → step}/cameraStep/cameraCapture/tracking/index.d.ts +0 -0
  683. /package/build/{types/step → step}/cameraStep/cameraCapture/utils/index.d.ts +0 -0
  684. /package/build/{types/step → step}/cameraStep/index.d.ts +0 -0
  685. /package/build/{types/step → step}/externalConfirmationStep/ExternalConfirmationStep.d.ts +0 -0
  686. /package/build/{types/step → step}/externalConfirmationStep/ExternalConfirmationStep.messages.d.ts +0 -0
  687. /package/build/{types/step → step}/externalConfirmationStep/index.d.ts +0 -0
  688. /package/build/{types/step → step}/index.d.ts +0 -0
  689. /package/build/{types/step → step}/layoutStep/LayoutStep.d.ts +0 -0
  690. /package/build/{types/step → step}/layoutStep/index.d.ts +0 -0
  691. /package/build/{types/step → step}/layoutStep/utils/index.d.ts +0 -0
  692. /package/build/{types/step → step}/layoutStep/utils/inline-reference-utils.d.ts +0 -0
  693. /package/build/{types/step → step}/layoutStep/utils/layout-utils.d.ts +0 -0
  694. /package/build/types/{types/common → common}/FormControl.d.ts +0 -0
  695. /package/build/types/{types/specification → specification}/Action.d.ts +0 -0
  696. /package/build/types/{types/specification → specification}/FileUploadSchema.d.ts +0 -0
  697. /package/build/types/{types/specification → specification}/LayoutComponent.d.ts +0 -0
  698. /package/build/types/{types/specification → specification}/Model.d.ts +0 -0
  699. /package/build/types/{types/specification → specification}/PersistAsync.d.ts +0 -0
  700. /package/build/types/{types/specification → specification}/Polling.d.ts +0 -0
  701. /package/build/types/{types/specification → specification}/Promotion.d.ts +0 -0
  702. /package/build/types/{types/specification → specification}/Schema.d.ts +0 -0
  703. /package/build/types/{types/specification → specification}/Step.d.ts +0 -0
  704. /package/build/types/{types/specification → specification}/ValidationAsync.d.ts +0 -0
  705. /package/build/types/{types/specification → specification}/core.d.ts +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFormattedDefaultErrorMessages.js","sourceRoot":"","sources":["../../../../../../src/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/useFormattedDefaultErrorMessages.tsx"],"names":[],"mappings":";;;;;;AAAA,2CAAqC;AAErC,8EAA4D;AAC5D,6GAA2E;AAE3E,SAAgB,gCAAgC,CAAC,EAC/C,QAAQ,EACR,QAAQ,GAIT;IACC,MAAM,EAAE,aAAa,EAAE,GAAG,IAAA,oBAAO,GAAE,CAAC;IAEpC,MAAM,EAAE,gBAAgB,EAAE,aAAa,EAAE,aAAa,EAAE,GAAG,2CAAuB,CAAC;IAEnF,OAAO;QACL,uBAAuB,EAAE,aAAa,CAAC,gBAAgB,CAAC;QACxD,oBAAoB,EAAE,aAAa,CAAC,aAAa,EAAE,EAAE,QAAQ,EAAE,CAAC;QAChE,oBAAoB,EAAE,aAAa,CAAC,aAAa,EAAE,EAAE,QAAQ,EAAE,CAAC;QAChE,eAAe,EAAE,aAAa,CAAC,kBAAc,CAAC,QAAQ,CAAC;KACxD,CAAC;AACJ,CAAC;AAjBD,4EAiBC"}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.default = void 0;
7
+ var ArraySchema_1 = require("./ArraySchema");
8
+ Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(ArraySchema_1).default; } });
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/jsonSchemaForm/arrayTypeSchema/index.ts"],"names":[],"mappings":";;;;;;AAAA,6CAAwC;AAA/B,uHAAA,OAAO,OAAA"}
@@ -0,0 +1,92 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const jsx_runtime_1 = require("react/jsx-runtime");
7
+ const classnames_1 = __importDefault(require("classnames"));
8
+ const react_1 = require("react");
9
+ const utils_1 = require("../../common/utils");
10
+ const validators_1 = require("../../common/validators");
11
+ const layout_1 = require("../../layout");
12
+ const controlFeedback_1 = __importDefault(require("../controlFeedback"));
13
+ const help_1 = __importDefault(require("../help"));
14
+ const schemaFormControl_1 = __importDefault(require("../schemaFormControl"));
15
+ const isNullish = (value) => (0, validators_1.isNull)(value) || (0, validators_1.isUndefined)(value);
16
+ const getDefaultValue = (schema) => {
17
+ return schema.type === 'boolean' && isNullish(schema.default) ? false : schema.default;
18
+ };
19
+ const BasicTypeSchema = (props) => {
20
+ var _a, _b, _c;
21
+ const onChange = (newModel) => {
22
+ setChanged(true);
23
+ setModelAndBroadcast(sanitiseModel(newModel), 'user');
24
+ };
25
+ const getValidationKeys = (newModel) => (0, validators_1.getValidationFailures)(newModel, props.schema, props.required); // TODO: LOW avoid type assertion
26
+ const setModelAndBroadcast = (newModel, type) => {
27
+ setModel(newModel);
28
+ const validationKeys = getValidationKeys(newModel);
29
+ setValidations(validationKeys);
30
+ const broadcastModel = newModel;
31
+ setLastModel(broadcastModel);
32
+ if (broadcastModel !== lastModel) {
33
+ props.onChange({
34
+ model: broadcastModel,
35
+ triggerSchema: props.schema,
36
+ triggerModel: broadcastModel,
37
+ lastTriggerModel: lastModel,
38
+ type,
39
+ });
40
+ }
41
+ };
42
+ const sanitiseModel = (newModel) => (0, validators_1.getValidBasicModelOrNull)(newModel, props.schema);
43
+ const onFocus = () => setFocused(true);
44
+ const onBlur = () => {
45
+ setFocused(false);
46
+ setBlurred(true);
47
+ if (props.onBlur) {
48
+ props.onBlur();
49
+ }
50
+ };
51
+ const [model, setModel] = (0, react_1.useState)((_a = props.model) !== null && _a !== void 0 ? _a : null);
52
+ const [lastModel, setLastModel] = (0, react_1.useState)((_b = props.model) !== null && _b !== void 0 ? _b : null);
53
+ const [changed, setChanged] = (0, react_1.useState)(false);
54
+ const [focused, setFocused] = (0, react_1.useState)(false);
55
+ const [blurred, setBlurred] = (0, react_1.useState)(false);
56
+ const [validations, setValidations] = (0, react_1.useState)([]);
57
+ const id = (0, react_1.useMemo)(() => props.schema.$id || (0, utils_1.generateRandomId)(), [props.schema.$id]);
58
+ const onSchemaChange = () => {
59
+ const defaultValue = getDefaultValue(props.schema);
60
+ // if no model, change to the default, only run this when the schema changes
61
+ if (isNullish(model) && !isNullish(defaultValue)) {
62
+ setModelAndBroadcast(defaultValue, 'init');
63
+ }
64
+ if (props.schema.const) {
65
+ setModelAndBroadcast(props.schema.const, 'init');
66
+ }
67
+ };
68
+ const refreshValidations = () => {
69
+ setValidations(getValidationKeys(model));
70
+ };
71
+ const isConst = props.schema.const;
72
+ const isHidden = props.schema.hidden || isConst;
73
+ (0, react_1.useEffect)(refreshValidations, [props.model, props.submitted]);
74
+ (0, react_1.useEffect)(onSchemaChange, [props.schema]);
75
+ (0, react_1.useEffect)(() => { var _a; return setModel((_a = props.model) !== null && _a !== void 0 ? _a : null); }, [props.model]);
76
+ const formGroupClasses = {
77
+ 'form-group': true,
78
+ 'has-error': ((props.submitted || !changed) && !!props.errors) ||
79
+ ((props.submitted || (changed && blurred)) && !!validations.length),
80
+ 'has-info': (focused && !!props.schema.description) || !!props.infoMessage,
81
+ };
82
+ const showLabel = props.schema.format !== 'file' && props.schema.type !== 'boolean';
83
+ const schemaHelp = props.schema.help;
84
+ return !isHidden ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [props.schema.alert && (0, jsx_runtime_1.jsx)(layout_1.DynamicAlert, { component: props.schema.alert }), (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: (0, classnames_1.default)(formGroupClasses) }, { children: [showLabel && ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "d-inline-block" }, { children: [(0, jsx_runtime_1.jsx)("label", Object.assign({ className: "control-label d-inline", htmlFor: id }, { children: props.schema.title })), !!schemaHelp && (0, jsx_runtime_1.jsx)(help_1.default, { help: schemaHelp })] }))), !showLabel && !!schemaHelp && (0, jsx_runtime_1.jsx)(help_1.default, { help: schemaHelp }), (0, jsx_runtime_1.jsx)(schemaFormControl_1.default, { id: id, schema: props.schema, value: model, disabled: !!props.disabled, onChange: onChange, onFocus: onFocus, onBlur: onBlur }), (0, jsx_runtime_1.jsx)(controlFeedback_1.default, { changed: changed, focused: focused, blurred: blurred, submitted: props.submitted, errors: (_c = props.errors) !== null && _c !== void 0 ? _c : null, schema: props.schema, validations: validations, infoMessage: props.infoMessage })] }))] })) : null;
85
+ };
86
+ BasicTypeSchema.defaultProps = {
87
+ required: false,
88
+ disabled: false,
89
+ onBlur: null,
90
+ };
91
+ exports.default = BasicTypeSchema;
92
+ //# sourceMappingURL=BasicTypeSchema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BasicTypeSchema.js","sourceRoot":"","sources":["../../../src/jsonSchemaForm/basicTypeSchema/BasicTypeSchema.tsx"],"names":[],"mappings":";;;;;;AAAA,4DAAoC;AACpC,iCAAqD;AAErD,8CAAsD;AACtD,wDAKiC;AACjC,yCAA4C;AAG5C,yEAAiD;AAEjD,mDAA2B;AAC3B,6EAAqD;AAErD,MAAM,SAAS,GAAG,CAAC,KAAc,EAA6B,EAAE,CAC9D,IAAA,mBAAM,EAAC,KAAK,CAAC,IAAI,IAAA,wBAAW,EAAC,KAAK,CAAC,CAAC;AAEtC,MAAM,eAAe,GAAG,CAAC,MAAmB,EAAE,EAAE;IAC9C,OAAO,MAAM,CAAC,IAAI,KAAK,SAAS,IAAI,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC;AACzF,CAAC,CAAC;AAEF,MAAM,eAAe,GAAG,CAAC,KAA2B,EAAE,EAAE;;IACtD,MAAM,QAAQ,GAAG,CAAC,QAA2B,EAAE,EAAE;QAC/C,UAAU,CAAC,IAAI,CAAC,CAAC;QACjB,oBAAoB,CAAC,aAAa,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,CAAC;IACxD,CAAC,CAAC;IAEF,MAAM,iBAAiB,GAAG,CAAC,QAA2B,EAAE,EAAE,CACxD,IAAA,kCAAqB,EAAC,QAAQ,EAAE,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,QAAmB,CAAC,CAAC,CAAC,iCAAiC;IAE7G,MAAM,oBAAoB,GAAG,CAAC,QAA2B,EAAE,IAAqB,EAAE,EAAE;QAClF,QAAQ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,UAAU,IAAI,uBAAC,cAAI,IAAC,IAAI,EAAE,UAAU,GAAI,EACzD,uBAAC,2BAAiB,IAChB,EAAE,EAAE,EAAE,EACN,MAAM,EAAE,KAAK,CAAC,MAAM,EACpB,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,QAAQ,EAC1B,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,MAAM,GACd,EACF,uBAAC,yBAAe,IACd,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,MAAM,EAAE,MAAA,KAAK,CAAC,MAAM,mCAAI,IAAI,EAC5B,MAAM,EAAE,KAAK,CAAC,MAAM,EACpB,WAAW,EAAE,WAAW,EACxB,WAAW,EAAE,KAAK,CAAC,WAAW,GAC9B,KACE,IACL,CACJ,CAAC,CAAC,CAAC,IAAI,CAAC;AACX,CAAC,CAAC;AAeF,eAAe,CAAC,YAAY,GAAG;IAC7B,QAAQ,EAAE,KAAK;IACf,QAAQ,EAAE,KAAK;IACf,MAAM,EAAE,IAAI;CACb,CAAC;AAEF,kBAAe,eAAe,CAAC"}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.default = void 0;
7
+ var BasicTypeSchema_1 = require("./BasicTypeSchema");
8
+ Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(BasicTypeSchema_1).default; } });
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/jsonSchemaForm/basicTypeSchema/index.ts"],"names":[],"mappings":";;;;;;AAAA,qDAA4C;AAAnC,2HAAA,OAAO,OAAA"}
@@ -0,0 +1,74 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const jsx_runtime_1 = require("react/jsx-runtime");
7
+ const components_1 = require("@transferwise/components");
8
+ const formatting_1 = require("@transferwise/formatting");
9
+ const react_intl_1 = require("react-intl");
10
+ const ControlFeedback_messages_1 = __importDefault(require("./ControlFeedback.messages"));
11
+ const ControlFeedback = (props) => {
12
+ var _a;
13
+ const defaultValidationMessages = useDefaultValidationMessages(props.schema);
14
+ const validationMessages = Object.assign(Object.assign(Object.assign({}, defaultValidationMessages), props.validationMessages), props.schema.validationMessages);
15
+ const isErrorVisible = (props.submitted || !props.changed) && !!props.errors;
16
+ const isValidationVisible = !isErrorVisible &&
17
+ (props.submitted || (props.changed && props.blurred)) &&
18
+ !!((_a = props.validations) === null || _a === void 0 ? void 0 : _a.length);
19
+ const isDescriptionVisible = props.focused && props.schema.description && !isValidationVisible;
20
+ const hasInfoMessage = !!props.infoMessage;
21
+ return ((0, jsx_runtime_1.jsxs)("div", { children: [isErrorVisible ? (0, jsx_runtime_1.jsx)(components_1.InlineAlert, Object.assign({ type: "error" }, { children: props.errors })) : null, isValidationVisible ? ((0, jsx_runtime_1.jsx)(components_1.InlineAlert, Object.assign({ type: "error" }, { children: props.validations.map((validation) => ((0, jsx_runtime_1.jsx)("div", { children: validationMessages[validation] }, validation))) }))) : null, (isDescriptionVisible || hasInfoMessage) && ((0, jsx_runtime_1.jsxs)(components_1.InlineAlert, Object.assign({ type: "info" }, { children: [isDescriptionVisible && (0, jsx_runtime_1.jsx)("div", { children: props.schema.description }), hasInfoMessage && (0, jsx_runtime_1.jsx)("div", { children: props.infoMessage })] })))] }));
22
+ };
23
+ ControlFeedback.defaultProps = {
24
+ errors: '',
25
+ validations: [],
26
+ validationMessages: {},
27
+ validationAsyncSuccessMessage: null,
28
+ };
29
+ // TODO: avoid typre assertions in this function
30
+ function useDefaultValidationMessages(schema) {
31
+ const { formatMessage, locale } = (0, react_intl_1.useIntl)();
32
+ const formattedMessages = {
33
+ type: formatMessage(ControlFeedback_messages_1.default.type),
34
+ minimum: formatMessage(ControlFeedback_messages_1.default.minimum, {
35
+ minimum: schema.minimum,
36
+ }),
37
+ maximum: formatMessage(ControlFeedback_messages_1.default.maximum, {
38
+ maximum: schema.maximum,
39
+ }),
40
+ minLength: formatMessage(ControlFeedback_messages_1.default.minLength, {
41
+ minLength: schema.minLength,
42
+ }),
43
+ maxLength: formatMessage(ControlFeedback_messages_1.default.maxLength, {
44
+ maxLength: schema.maxLength,
45
+ }),
46
+ pattern: formatMessage(ControlFeedback_messages_1.default.pattern),
47
+ required: formatMessage(ControlFeedback_messages_1.default.required),
48
+ };
49
+ if (schema.format === 'date') {
50
+ const dateOverrides = {
51
+ pattern: formatMessage(ControlFeedback_messages_1.default.patternDate),
52
+ minimum: schema.minimum
53
+ ? formatMessage(ControlFeedback_messages_1.default.minimumDate, {
54
+ minimum: (0, formatting_1.formatDate)(new Date(schema.minimum), locale, {
55
+ timeZone: 'UTC',
56
+ dateStyle: 'long',
57
+ }),
58
+ })
59
+ : undefined,
60
+ maximum: schema.maximum
61
+ ? formatMessage(ControlFeedback_messages_1.default.maximumDate, {
62
+ maximum: (0, formatting_1.formatDate)(new Date(schema.maximum), locale, {
63
+ timeZone: 'UTC',
64
+ dateStyle: 'long',
65
+ }),
66
+ })
67
+ : undefined,
68
+ };
69
+ return Object.assign(Object.assign({}, formattedMessages), dateOverrides);
70
+ }
71
+ return formattedMessages;
72
+ }
73
+ exports.default = ControlFeedback;
74
+ //# sourceMappingURL=ControlFeedback.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ControlFeedback.js","sourceRoot":"","sources":["../../../src/jsonSchemaForm/controlFeedback/ControlFeedback.tsx"],"names":[],"mappings":";;;;;;AAAA,yDAAuD;AACvD,yDAAsD;AACtD,2CAAqC;AAIrC,0F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C,OAAO;gBACvC,CAAC,CAAC,aAAa,CAAC,kCAAuB,CAAC,WAAW,EAAE;oBACjD,OAAO,EAAE,IAAA,uBAAU,EACjB,IAAI,IAAI,CAAE,MAAuB,CAAC,OAA4B,CAAC,EAC/D,MAAM,EACN;wBACE,QAAQ,EAAE,KAAK;wBACf,SAAS,EAAE,MAAM;qBAClB,CACF;iBACF,CAAC;gBACJ,CAAC,CAAC,SAAS;YACb,OAAO,EAAG,MAAuB,CAAC,OAAO;gBACvC,CAAC,CAAC,aAAa,CAAC,kCAAuB,CAAC,WAAW,EAAE;oBACjD,OAAO,EAAE,IAAA,uBAAU,EACjB,IAAI,IAAI,CAAE,MAAuB,CAAC,OAA4B,CAAC,EAC/D,MAAM,EACN;wBACE,QAAQ,EAAE,KAAK;wBACf,SAAS,EAAE,MAAM;qBAClB,CACF;iBACF,CAAC;gBACJ,CAAC,CAAC,SAAS;SACd,CAAC;QACF,uCACK,iBAAiB,GACjB,aAAa,EAChB;KACH;IAED,OAAO,iBAAiB,CAAC;AAC3B,CAAC;AAED,kBAAe,eAAe,CAAC"}
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const react_intl_1 = require("react-intl");
4
+ exports.default = (0, react_intl_1.defineMessages)({
5
+ type: {
6
+ id: 'dynamicFlows.ControlFeedback.type',
7
+ defaultMessage: 'Incorrect type',
8
+ description: '',
9
+ },
10
+ minimum: {
11
+ id: 'dynamicFlows.ControlFeedback.minimum',
12
+ defaultMessage: `Please enter a number that's {minimum} or more.`,
13
+ description: '',
14
+ },
15
+ maximum: {
16
+ id: 'dynamicFlows.ControlFeedback.maximum',
17
+ defaultMessage: `Please enter a number that's {maximum} or less.`,
18
+ description: '',
19
+ },
20
+ minLength: {
21
+ id: 'dynamicFlows.ControlFeedback.minLength',
22
+ defaultMessage: 'Please enter at least {minLength} characters.',
23
+ description: '',
24
+ },
25
+ maxLength: {
26
+ id: 'dynamicFlows.ControlFeedback.maxLength',
27
+ defaultMessage: 'Please enter {maxLength} or fewer characters.',
28
+ description: '',
29
+ },
30
+ minimumDate: {
31
+ id: 'dynamicFlows.ControlFeedback.minimumDate',
32
+ defaultMessage: `Please enter a date that's on or after {minimum}.`,
33
+ description: '',
34
+ },
35
+ maximumDate: {
36
+ id: 'dynamicFlows.ControlFeedback.maximumDate',
37
+ defaultMessage: `Please enter a date that's on or before {maximum}.`,
38
+ description: '',
39
+ },
40
+ pattern: {
41
+ id: 'dynamicFlows.ControlFeedback.pattern',
42
+ defaultMessage: 'Please enter this in the correct format.',
43
+ description: '',
44
+ },
45
+ patternDate: {
46
+ id: 'dynamicFlows.ControlFeedback.patternDate',
47
+ defaultMessage: 'Please enter a date in the corrrect format.',
48
+ description: '',
49
+ },
50
+ required: {
51
+ id: 'dynamicFlows.ControlFeedback.required',
52
+ defaultMessage: 'Please fill out this field.',
53
+ description: '',
54
+ },
55
+ });
56
+ //# sourceMappingURL=ControlFeedback.messages.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ControlFeedback.messages.js","sourceRoot":"","sources":["../../../src/jsonSchemaForm/controlFeedback/ControlFeedback.messages.ts"],"names":[],"mappings":";;AAAA,2CAA4C;AAE5C,kBAAe,IAAA,2BAAc,EAAC;IAC5B,IAAI,EAAE;QACJ,EAAE,EAAE,mCAAmC;QACvC,cAAc,EAAE,gBAAgB;QAChC,WAAW,EAAE,EAAE;KAChB;IACD,OAAO,EAAE;QACP,EAAE,EAAE,sCAAsC;QAC1C,cAAc,EAAE,iDAAiD;QACjE,WAAW,EAAE,EAAE;KAChB;IACD,OAAO,EAAE;QACP,EAAE,EAAE,sCAAsC;QAC1C,cAAc,EAAE,iDAAiD;QACjE,WAAW,EAAE,EAAE;KAChB;IACD,SAAS,EAAE;QACT,EAAE,EAAE,wCAAwC;QAC5C,cAAc,EAAE,+CAA+C;QAC/D,WAAW,EAAE,EAAE;KAChB;IACD,SAAS,EAAE;QACT,EAAE,EAAE,wCAAwC;QAC5C,cAAc,EAAE,+CAA+C;QAC/D,WAAW,EAAE,EAAE;KAChB;IACD,WAAW,EAAE;QACX,EAAE,EAAE,0CAA0C;QAC9C,cAAc,EAAE,mDAAmD;QACnE,WAAW,EAAE,EAAE;KAChB;IACD,WAAW,EAAE;QACX,EAAE,EAAE,0CAA0C;QAC9C,cAAc,EAAE,oDAAoD;QACpE,WAAW,EAAE,EAAE;KAChB;IACD,OAAO,EAAE;QACP,EAAE,EAAE,sCAAsC;QAC1C,cAAc,EAAE,0CAA0C;QAC1D,WAAW,EAAE,EAAE;KAChB;IACD,WAAW,EAAE;QACX,EAAE,EAAE,0CAA0C;QAC9C,cAAc,EAAE,6CAA6C;QAC7D,WAAW,EAAE,EAAE;KAChB;IACD,QAAQ,EAAE;QACR,EAAE,EAAE,uCAAuC;QAC3C,cAAc,EAAE,6BAA6B;QAC7C,WAAW,EAAE,EAAE;KAChB;CACF,CAAC,CAAC"}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.default = void 0;
7
+ var ControlFeedback_1 = require("./ControlFeedback");
8
+ Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(ControlFeedback_1).default; } });
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/jsonSchemaForm/controlFeedback/index.ts"],"names":[],"mappings":";;;;;;AAAA,qDAA4C;AAAnC,2HAAA,OAAO,OAAA"}
@@ -0,0 +1,119 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const jsx_runtime_1 = require("react/jsx-runtime");
7
+ const contexts_1 = require("../../common/contexts");
8
+ const utils_1 = require("../../common/utils");
9
+ const types_1 = require("../../types");
10
+ const Schema_1 = require("../../types/specification/Schema");
11
+ const allOfSchema_1 = __importDefault(require("../allOfSchema"));
12
+ const arrayTypeSchema_1 = __importDefault(require("../arrayTypeSchema"));
13
+ const basicTypeSchema_1 = __importDefault(require("../basicTypeSchema"));
14
+ const objectSchema_1 = __importDefault(require("../objectSchema"));
15
+ const oneOfSchema_1 = __importDefault(require("../oneOfSchema"));
16
+ const persistAsyncSchema_1 = __importDefault(require("../persistAsyncSchema"));
17
+ const promotedOneOfSchema_1 = __importDefault(require("../promotedOneOfSchema"));
18
+ const readOnlySchema_1 = __importDefault(require("../readOnlySchema"));
19
+ const validationAsyncSchema_1 = __importDefault(require("../validationAsyncSchema"));
20
+ const GenericSchemaForm = (props) => {
21
+ const { schema, model = null, errors = null, hideTitle = false, disabled = false } = props;
22
+ const schemaProps = Object.assign(Object.assign({}, props), { model, errors, hideTitle, disabled });
23
+ const type = (0, utils_1.getSchemaType)(schema);
24
+ const log = (0, contexts_1.useLogger)();
25
+ const logInvalidSchemaWarning = () => log.error('Invalid schema or model', `Schema of type ${type || 'undefined'} requested, but schema did not pass validation.`);
26
+ switch (type) {
27
+ case 'readOnly':
28
+ return (0, jsx_runtime_1.jsx)(readOnlySchema_1.default, Object.assign({}, schemaProps));
29
+ case 'persistAsync':
30
+ if ((0, types_1.isPersistAsyncSchema)(schema) && (0, types_1.isNullableStringModel)(model) && (0, types_1.isBasicError)(errors)) {
31
+ const filteredProps = Object.assign(Object.assign({}, schemaProps), { schema, model, errors });
32
+ return (0, jsx_runtime_1.jsx)(persistAsyncSchema_1.default, Object.assign({}, filteredProps));
33
+ }
34
+ else {
35
+ // TODO: MC-3224 Remove this once people have had a chance to fix errors
36
+ logInvalidSchemaWarning();
37
+ return (0, jsx_runtime_1.jsx)(persistAsyncSchema_1.default, Object.assign({}, props));
38
+ }
39
+ case 'validationAsync':
40
+ if ((0, types_1.isValidationAsyncSchema)(schema) && (0, types_1.isNullableBasicModel)(model) && (0, types_1.isBasicError)(errors)) {
41
+ const filteredProps = Object.assign(Object.assign({}, schemaProps), { schema, model, errors });
42
+ return (0, jsx_runtime_1.jsx)(validationAsyncSchema_1.default, Object.assign({}, filteredProps));
43
+ }
44
+ else {
45
+ // TODO: MC-3224
46
+ logInvalidSchemaWarning();
47
+ return (0, jsx_runtime_1.jsx)(validationAsyncSchema_1.default, Object.assign({}, props));
48
+ }
49
+ case 'basic': {
50
+ if ((0, types_1.isBasicSchema)(schema) && (0, types_1.isNullableBasicModel)(model) && (0, types_1.isBasicError)(errors)) {
51
+ const filteredProps = Object.assign(Object.assign({ infoMessage: null }, schemaProps), { schema,
52
+ model,
53
+ errors });
54
+ return (0, jsx_runtime_1.jsx)(basicTypeSchema_1.default, Object.assign({}, filteredProps));
55
+ }
56
+ else {
57
+ const filteredProps = Object.assign(Object.assign({ infoMessage: null }, schemaProps), { schema,
58
+ model,
59
+ errors });
60
+ // TODO: MC-3224
61
+ logInvalidSchemaWarning();
62
+ return (0, jsx_runtime_1.jsx)(basicTypeSchema_1.default, Object.assign({}, filteredProps));
63
+ }
64
+ }
65
+ case 'object':
66
+ if ((0, types_1.isObjectSchema)(schema) && (0, types_1.isNullableObjectModel)(model)) {
67
+ const filteredProps = Object.assign(Object.assign({}, schemaProps), { schema, model, errors });
68
+ return (0, jsx_runtime_1.jsx)(objectSchema_1.default, Object.assign({}, filteredProps), JSON.stringify(schema));
69
+ }
70
+ else {
71
+ // TODO: MC-3224
72
+ logInvalidSchemaWarning();
73
+ return (0, jsx_runtime_1.jsx)(objectSchema_1.default, Object.assign({}, props));
74
+ }
75
+ case 'array':
76
+ if ((0, types_1.isArraySchema)(schema) && (0, types_1.isNullableArrayModel)(model) && (0, types_1.isBasicError)(errors)) {
77
+ const filteredProps = Object.assign(Object.assign({}, schemaProps), { schema, model, errors });
78
+ return (0, jsx_runtime_1.jsx)(arrayTypeSchema_1.default, Object.assign({}, filteredProps));
79
+ }
80
+ else {
81
+ // TODO: MC-3224
82
+ logInvalidSchemaWarning();
83
+ return (0, jsx_runtime_1.jsx)(arrayTypeSchema_1.default, Object.assign({}, props));
84
+ }
85
+ case 'promotedOneOf':
86
+ if ((0, Schema_1.isOneOfObjectSchema)(schema) && (0, types_1.isNullableObjectModel)(model)) {
87
+ const filteredProps = Object.assign(Object.assign({}, schemaProps), { schema, model, errors });
88
+ return (0, jsx_runtime_1.jsx)(promotedOneOfSchema_1.default, Object.assign({}, filteredProps));
89
+ }
90
+ else {
91
+ // TODO: MC-3224
92
+ logInvalidSchemaWarning();
93
+ return (0, jsx_runtime_1.jsx)(promotedOneOfSchema_1.default, Object.assign({}, props));
94
+ }
95
+ case 'oneOf':
96
+ if ((0, types_1.isOneOfSchema)(schema)) {
97
+ const filteredProps = Object.assign(Object.assign({}, schemaProps), { schema, model, errors });
98
+ return (0, jsx_runtime_1.jsx)(oneOfSchema_1.default, Object.assign({}, filteredProps));
99
+ }
100
+ else {
101
+ // TODO: MC-3224
102
+ logInvalidSchemaWarning();
103
+ return (0, jsx_runtime_1.jsx)(oneOfSchema_1.default, Object.assign({}, props));
104
+ }
105
+ case 'allOf':
106
+ if ((0, Schema_1.isAllOfSchema)(schema) && (0, types_1.isObjectModel)(model)) {
107
+ const filteredProps = Object.assign(Object.assign({}, schemaProps), { schema, model, errors });
108
+ return (0, jsx_runtime_1.jsx)(allOfSchema_1.default, Object.assign({}, filteredProps));
109
+ }
110
+ else {
111
+ // TODO: MC-3224
112
+ logInvalidSchemaWarning();
113
+ return (0, jsx_runtime_1.jsx)(allOfSchema_1.default, Object.assign({}, props));
114
+ }
115
+ }
116
+ return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {});
117
+ };
118
+ exports.default = GenericSchemaForm;
119
+ //# sourceMappingURL=GenericSchema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GenericSchema.js","sourceRoot":"","sources":["../../../src/jsonSchemaForm/genericSchema/GenericSchema.tsx"],"names":[],"mappings":";;;;;;AA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AAM,CAAC,IAAI,IAAA,qBAAa,EAAC,KAAK,CAAC,EAAE;gBACjD,MAAM,aAAa,mCAAQ,WAAW,KAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAE,CAAC;gBAChE,OAAO,uBAAC,qBAAW,oBAAK,aAAa,EAAI,CAAC;aAC3C;iBAAM;gBACL,gBAAgB;gBAChB,uBAAuB,EAAE,CAAC;gBAC1B,OAAO,uBAAC,qBAAW,oBAAM,KAA0B,EAAI,CAAC;aACzD;KACJ;IAED,OAAO,kDAAK,CAAC;AACf,CAAC,CAAC;AAcF,kBAAe,iBAAiB,CAAC"}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.default = void 0;
7
+ var GenericSchema_1 = require("./GenericSchema");
8
+ Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(GenericSchema_1).default; } });
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/jsonSchemaForm/genericSchema/index.ts"],"names":[],"mappings":";;;;;;AAAA,iDAA0C;AAAjC,yHAAA,OAAO,OAAA"}
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const jsx_runtime_1 = require("react/jsx-runtime");
7
+ const components_1 = require("@transferwise/components");
8
+ const react_intl_1 = require("react-intl");
9
+ const Help_messages_1 = __importDefault(require("./Help.messages"));
10
+ const Help = (props) => {
11
+ const intl = (0, react_intl_1.useIntl)();
12
+ return ((0, jsx_runtime_1.jsx)(components_1.Info, { className: "m-l-1", content: (0, jsx_runtime_1.jsx)(components_1.Markdown, { children: props.help.markdown }), presentation: "POPOVER", size: "sm", "aria-label": intl.formatMessage(Help_messages_1.default.helpAria) }));
13
+ };
14
+ exports.default = Help;
15
+ //# sourceMappingURL=Help.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Help.js","sourceRoot":"","sources":["../../../src/jsonSchemaForm/help/Help.tsx"],"names":[],"mappings":";;;;;;AAAA,yDAA0D;AAC1D,2CAAqC;AAErC,oEAAuC;AAIvC,MAAM,IAAI,GAAG,CAAC,KAAY,EAAE,EAAE;IAC5B,MAAM,IAAI,GAAG,IAAA,oBAAO,GAAE,CAAC;IAEvB,OAAO,CACL,uBAAC,iBAAI,IACH,SAAS,EAAC,OAAO,EACjB,OAAO,EAAE,uBAAC,qBAAQ,cAAE,KAAK,CAAC,IAAI,CAAC,QAAQ,GAAY,EACnD,YAAY,EAAC,SAAS,EACtB,IAAI,EAAC,IAAI,gBACG,IAAI,CAAC,aAAa,CAAC,uBAAQ,CAAC,QAAQ,CAAC,GACjD,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,IAAI,CAAC"}
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const react_intl_1 = require("react-intl");
4
+ exports.default = (0, react_intl_1.defineMessages)({
5
+ helpAria: {
6
+ id: 'dynamicFlows.Help.ariaLabel',
7
+ defaultMessage: 'Click here for more info.',
8
+ description: 'Aria label for help.',
9
+ },
10
+ });
11
+ //# sourceMappingURL=Help.messages.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Help.messages.js","sourceRoot":"","sources":["../../../src/jsonSchemaForm/help/Help.messages.js"],"names":[],"mappings":";;AAAA,2CAA4C;AAE5C,kBAAe,IAAA,2BAAc,EAAC;IAC5B,QAAQ,EAAE;QACR,EAAE,EAAE,6BAA6B;QACjC,cAAc,EAAE,2BAA2B;QAC3C,WAAW,EAAE,sBAAsB;KACpC;CACF,CAAC,CAAC"}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.default = void 0;
7
+ var Help_1 = require("./Help");
8
+ Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(Help_1).default; } });
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/jsonSchemaForm/help/index.ts"],"names":[],"mappings":";;;;;;AAAA,+BAAiC;AAAxB,gHAAA,OAAO,OAAA"}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.default = void 0;
7
+ var JsonSchemaForm_1 = require("./JsonSchemaForm");
8
+ Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(JsonSchemaForm_1).default; } });
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/jsonSchemaForm/index.ts"],"names":[],"mappings":";;;;;;AAAA,mDAA2C;AAAlC,0HAAA,OAAO,OAAA"}
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const jsx_runtime_1 = require("react/jsx-runtime");
7
+ const classnames_1 = __importDefault(require("classnames"));
8
+ const react_1 = require("react");
9
+ const utils_1 = require("../../common/utils");
10
+ const validators_1 = require("../../common/validators");
11
+ const layout_1 = require("../../layout");
12
+ const genericSchema_1 = __importDefault(require("../genericSchema"));
13
+ const getSchemaColumnClasses = (width) => {
14
+ return {
15
+ 'col-xs-12': true,
16
+ 'col-sm-6': width === 'md',
17
+ 'col-sm-4': width === 'sm',
18
+ };
19
+ };
20
+ const ObjectSchema = (props) => {
21
+ const [model, setModel] = (0, react_1.useState)(() => (Object.assign({}, (0, validators_1.getValidObjectModelParts)(props.model, props.schema))));
22
+ const onChangeProperty = (propertyName, onChangeProps) => {
23
+ if (onChangeProps.model !== null) {
24
+ // FIXME we should not mutate the model here
25
+ // eslint-disable-next-line fp/no-mutation
26
+ model[propertyName] = onChangeProps.model;
27
+ }
28
+ else {
29
+ delete model[propertyName];
30
+ }
31
+ setModel(model);
32
+ props.onChange(Object.assign(Object.assign({}, onChangeProps), { model }));
33
+ };
34
+ const isRequired = (propertyName) => props.schema.required && props.schema.required.includes(propertyName);
35
+ (0, react_1.useEffect)(() => {
36
+ // When the schema changes, only retain valid parts of the model
37
+ const newModel = (0, validators_1.getValidObjectModelParts)(model, props.schema) || {};
38
+ setModel(newModel);
39
+ if (!(0, utils_1.isEqual)(newModel, model)) {
40
+ props.onChange({
41
+ model: newModel,
42
+ triggerSchema: props.schema,
43
+ triggerModel: newModel,
44
+ });
45
+ }
46
+ }, [props.schema]);
47
+ const allorderedPropertiesSet = new Set([
48
+ ...(props.schema.displayOrder || []),
49
+ ...Object.keys(props.schema.properties),
50
+ ]);
51
+ const isPropertyDefined = (propertyName) => typeof props.schema.properties[propertyName] !== 'undefined';
52
+ // eslint-disable-next-line unicorn/prefer-spread
53
+ const orderedPropertyNames = Array.from(allorderedPropertiesSet).filter(isPropertyDefined);
54
+ // TODO: LOW avoid type assertion -- what happens when props.errors is not an object?
55
+ const propsErrors = props.errors;
56
+ return ((0, jsx_runtime_1.jsxs)("fieldset", { children: [props.schema.title && !props.hideTitle && (0, jsx_runtime_1.jsxs)("legend", { children: [" ", props.schema.title, " "] }), props.schema.description && !props.hideTitle && (0, jsx_runtime_1.jsxs)("p", { children: [" ", props.schema.description, " "] }), props.schema.alert && (0, jsx_runtime_1.jsx)(layout_1.DynamicAlert, { component: props.schema.alert }), (0, jsx_runtime_1.jsx)("div", Object.assign({ className: "row" }, { children: orderedPropertyNames.map((propertyName) => ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: (0, classnames_1.default)(getSchemaColumnClasses(props.schema.properties[propertyName].width)) }, { children: (0, jsx_runtime_1.jsx)(genericSchema_1.default, { schema: props.schema.properties[propertyName], model: props.model && props.model[propertyName], errors: propsErrors && propsErrors[propertyName], submitted: props.submitted, required: isRequired(propertyName), disabled: props.disabled, onChange: (onChangeProps) => onChangeProperty(propertyName, onChangeProps), onPersistAsync: props.onPersistAsync }) }), propertyName))) }))] }));
57
+ };
58
+ ObjectSchema.defaultProps = {
59
+ hideTitle: false,
60
+ disabled: false,
61
+ };
62
+ exports.default = ObjectSchema;
63
+ //# sourceMappingURL=ObjectSchema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ObjectSchema.js","sourceRoot":"","sources":["../../../src/jsonSchemaForm/objectSchema/ObjectSchema.tsx"],"names":[],"mappings":";;;;;;AAAA,4DAAoC;AACpC,iCAA4C;AAE5C,8CAA6C;AAC7C,wDAAmE;AACnE,yCAA4C;AAG5C,qEAA6C;AAG7C,MAAM,sBAAsB,GAAG,CAAC,KAAyB,EAAE,EAAE;IAC3D,OAAO;QACL,WAAW,EAAE,IAAI;QACjB,UAAU,EAAE,KAAK,KAAK,IAAI;QAC1B,UAAU,EAAE,KAAK,KAAK,IAAI;KAC3B,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,YAAY,GAAG,CAAC,KAAwB,EAAE,EAAE;IAChD,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,IAAA,gBAAQ,EAAc,GAAG,EAAE,CAAC,mBACjD,IAAA,qCAAwB,EAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,EACtD,CAAC,CAAC;IAEJ,MAAM,gBAAgB,GAAG,CAAC,YAAoB,EAAE,aAA4B,EAAE,EAAE;QAC9E,IAAI,aAAa,CAAC,KAAK,KAAK,IAAI,EAAE;YAChC,4CAA4C;YAC5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CAeb,CACP,CAAC,IACE,IACG,CACZ,CAAC;AACJ,CAAC,CAAC;AAQF,YAAY,CAAC,YAAY,GAAG;IAC1B,SAAS,EAAE,KAAK;IAChB,QAAQ,EAAE,KAAK;CAChB,CAAC;AAEF,kBAAe,YAAY,CAAC"}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.default = void 0;
7
+ var ObjectSchema_1 = require("./ObjectSchema");
8
+ Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(ObjectSchema_1).default; } });
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/jsonSchemaForm/objectSchema/index.ts"],"names":[],"mappings":";;;;;;AAAA,+CAAyC;AAAhC,wHAAA,OAAO,OAAA"}