@webiny/app-admin 6.6.0-alpha.1 → 6.6.0-alpha.10

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 (718) hide show
  1. package/base/Admin.js +19 -2
  2. package/base/Admin.js.map +1 -1
  3. package/base/Base/DefaultFieldRenderers.js +4 -0
  4. package/base/Base/DefaultFieldRenderers.js.map +1 -1
  5. package/base/Base/FieldRenderers/AutoCompleteRenderer.js +1 -0
  6. package/base/Base/FieldRenderers/AutoCompleteRenderer.js.map +1 -1
  7. package/base/Base/FieldRenderers/BirthdayInputRenderer.d.ts +21 -0
  8. package/base/Base/FieldRenderers/BirthdayInputRenderer.js +39 -0
  9. package/base/Base/FieldRenderers/BirthdayInputRenderer.js.map +1 -0
  10. package/base/Base/FieldRenderers/BirthdayInputRenderer.test.d.ts +1 -0
  11. package/base/Base/FieldRenderers/BirthdayInputRenderer.test.js +123 -0
  12. package/base/Base/FieldRenderers/BirthdayInputRenderer.test.js.map +1 -0
  13. package/base/Base/FieldRenderers/ObjectRenderer/MultiValueDynamicZone/MultiValueDynamicZone.js +21 -4
  14. package/base/Base/FieldRenderers/ObjectRenderer/MultiValueDynamicZone/MultiValueDynamicZone.js.map +1 -1
  15. package/base/Base/FieldRenderers/ObjectRenderer/ObjectAccordionMultipleRenderer.js +11 -2
  16. package/base/Base/FieldRenderers/ObjectRenderer/ObjectAccordionMultipleRenderer.js.map +1 -1
  17. package/base/Base/FieldRenderers/ObjectRenderer/ObjectFieldComponents.d.ts +2 -0
  18. package/base/Base/FieldRenderers/ObjectRenderer/ObjectFieldComponents.js +14 -5
  19. package/base/Base/FieldRenderers/ObjectRenderer/ObjectFieldComponents.js.map +1 -1
  20. package/base/Base/FieldRenderers/ObjectRenderer/ObjectRenderer.js +16 -25
  21. package/base/Base/FieldRenderers/ObjectRenderer/ObjectRenderer.js.map +1 -1
  22. package/base/Base/FieldRenderers/ObjectRenderer/SingleValueDynamicZone.js +18 -3
  23. package/base/Base/FieldRenderers/ObjectRenderer/SingleValueDynamicZone.js.map +1 -1
  24. package/base/Base/FieldRenderers/ObjectRenderer/{TemplatePicker.d.ts → TemplatePicker/AddTemplateButton.d.ts} +1 -1
  25. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/AddTemplateButton.js +24 -0
  26. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/AddTemplateButton.js.map +1 -0
  27. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/SelectableTemplate.d.ts +13 -0
  28. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/SelectableTemplate.js +21 -0
  29. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/SelectableTemplate.js.map +1 -0
  30. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateCard.d.ts +3 -0
  31. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateCard.js +35 -0
  32. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateCard.js.map +1 -0
  33. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateGallery.d.ts +8 -0
  34. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateGallery.js +22 -0
  35. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateGallery.js.map +1 -0
  36. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateGalleryToolbar.d.ts +10 -0
  37. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateGalleryToolbar.js +52 -0
  38. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateGalleryToolbar.js.map +1 -0
  39. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateIcon.d.ts +8 -0
  40. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateIcon.js +16 -0
  41. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateIcon.js.map +1 -0
  42. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateList.d.ts +10 -0
  43. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateList.js +22 -0
  44. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateList.js.map +1 -0
  45. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateListItem.d.ts +3 -0
  46. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateListItem.js +35 -0
  47. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateListItem.js.map +1 -0
  48. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/index.d.ts +1 -0
  49. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/index.js +1 -0
  50. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/types.d.ts +6 -0
  51. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/types.js +0 -0
  52. package/base/Base/FieldRenderers/ObjectRenderer/resolveItemTitle.d.ts +8 -3
  53. package/base/Base/FieldRenderers/ObjectRenderer/resolveItemTitle.js +25 -17
  54. package/base/Base/FieldRenderers/ObjectRenderer/resolveItemTitle.js.map +1 -1
  55. package/base/Base/FieldRenderers/ObjectRenderer/resolveItemTitle.test.d.ts +1 -0
  56. package/base/Base/FieldRenderers/ObjectRenderer/resolveItemTitle.test.js +106 -0
  57. package/base/Base/FieldRenderers/ObjectRenderer/resolveItemTitle.test.js.map +1 -0
  58. package/base/Base/FieldRenderers/RadioButtonsRenderer.js +3 -2
  59. package/base/Base/FieldRenderers/RadioButtonsRenderer.js.map +1 -1
  60. package/base/Base/FieldRenderers/SelectRenderer.js +4 -2
  61. package/base/Base/FieldRenderers/SelectRenderer.js.map +1 -1
  62. package/base/Base.js +2 -1
  63. package/base/Base.js.map +1 -1
  64. package/base/createRootContainer.js +4 -0
  65. package/base/createRootContainer.js.map +1 -1
  66. package/base/resolveApiUrl.d.ts +10 -0
  67. package/base/resolveApiUrl.js +11 -3
  68. package/base/resolveApiUrl.js.map +1 -1
  69. package/base/ui/AssumedPermissionsSelector.d.ts +47 -0
  70. package/base/ui/AssumedPermissionsSelector.js +7 -0
  71. package/base/ui/AssumedPermissionsSelector.js.map +1 -0
  72. package/base/ui/DebuggerIndicator.d.ts +23 -0
  73. package/base/ui/DebuggerIndicator.js +5 -0
  74. package/base/ui/DebuggerIndicator.js.map +1 -0
  75. package/base/ui/Layout.d.ts +20 -0
  76. package/base/ui/Layout.js +2 -1
  77. package/base/ui/Layout.js.map +1 -1
  78. package/components/DeveloperMode/DeveloperMode.d.ts +1 -3
  79. package/components/DeveloperMode/DeveloperMode.js.map +1 -1
  80. package/components/Filters/Filters.js +7 -1
  81. package/components/Filters/Filters.js.map +1 -1
  82. package/components/IconPicker/IconPickerComponent.js +1 -1
  83. package/components/IconPicker/IconPickerComponent.js.map +1 -1
  84. package/components/SplitView/SplitView.d.ts +2 -2
  85. package/components/SplitView/SplitView.js +7 -7
  86. package/components/SplitView/SplitView.js.map +1 -1
  87. package/config/AdminConfig/Widget.d.ts +9 -1
  88. package/config/AdminConfig/Widget.js +6 -2
  89. package/config/AdminConfig/Widget.js.map +1 -1
  90. package/domain/Identity.js +1 -1
  91. package/domain/Identity.js.map +1 -1
  92. package/exports/admin/ui.d.ts +4 -0
  93. package/exports/admin/ui.js +4 -1
  94. package/exports/admin.d.ts +4 -0
  95. package/exports/admin.js +2 -0
  96. package/features/{aiChat/AiChatGateway.d.ts → adminAssistant/AdminAssistantGateway.d.ts} +7 -7
  97. package/features/{aiChat/AiChatGateway.js → adminAssistant/AdminAssistantGateway.js} +8 -8
  98. package/features/adminAssistant/AdminAssistantGateway.js.map +1 -0
  99. package/features/adminAssistant/AdminAssistantPresenter.d.ts +60 -0
  100. package/features/adminAssistant/AdminAssistantPresenter.js +377 -0
  101. package/features/adminAssistant/AdminAssistantPresenter.js.map +1 -0
  102. package/features/adminAssistant/abstractions.d.ts +176 -0
  103. package/features/adminAssistant/abstractions.js +6 -0
  104. package/features/adminAssistant/abstractions.js.map +1 -0
  105. package/features/adminAssistant/feature.d.ts +3 -0
  106. package/features/adminAssistant/feature.js +19 -0
  107. package/features/adminAssistant/feature.js.map +1 -0
  108. package/features/adminAssistant/index.d.ts +6 -0
  109. package/features/adminAssistant/index.js +3 -0
  110. package/features/adminAssistant/turnsFromMessages.d.ts +15 -0
  111. package/features/adminAssistant/turnsFromMessages.js +77 -0
  112. package/features/adminAssistant/turnsFromMessages.js.map +1 -0
  113. package/features/adminUsers/account/getCurrentUser/GetCurrentUserGateway.d.ts +11 -0
  114. package/features/adminUsers/account/getCurrentUser/GetCurrentUserGateway.js +44 -0
  115. package/features/adminUsers/account/getCurrentUser/GetCurrentUserGateway.js.map +1 -0
  116. package/features/adminUsers/account/getCurrentUser/GetCurrentUserUseCase.d.ts +10 -0
  117. package/features/adminUsers/account/getCurrentUser/GetCurrentUserUseCase.js +19 -0
  118. package/features/adminUsers/account/getCurrentUser/GetCurrentUserUseCase.js.map +1 -0
  119. package/features/adminUsers/account/getCurrentUser/abstractions/GetCurrentUserGateway.d.ts +16 -0
  120. package/features/adminUsers/account/getCurrentUser/abstractions/GetCurrentUserGateway.js +5 -0
  121. package/features/adminUsers/account/getCurrentUser/abstractions/GetCurrentUserGateway.js.map +1 -0
  122. package/features/adminUsers/account/getCurrentUser/abstractions/GetCurrentUserUseCase.d.ts +10 -0
  123. package/features/adminUsers/account/getCurrentUser/abstractions/GetCurrentUserUseCase.js +5 -0
  124. package/features/adminUsers/account/getCurrentUser/abstractions/GetCurrentUserUseCase.js.map +1 -0
  125. package/features/adminUsers/account/getCurrentUser/abstractions/index.d.ts +6 -0
  126. package/features/adminUsers/account/getCurrentUser/abstractions/index.js +2 -0
  127. package/features/adminUsers/account/getCurrentUser/feature.d.ts +3 -0
  128. package/features/adminUsers/account/getCurrentUser/feature.js +19 -0
  129. package/features/adminUsers/account/getCurrentUser/feature.js.map +1 -0
  130. package/features/adminUsers/account/getCurrentUser/index.d.ts +1 -0
  131. package/features/adminUsers/account/getCurrentUser/index.js +1 -0
  132. package/features/adminUsers/account/updateCurrentUser/UpdateCurrentUserGateway.d.ts +11 -0
  133. package/features/adminUsers/account/updateCurrentUser/UpdateCurrentUserGateway.js +48 -0
  134. package/features/adminUsers/account/updateCurrentUser/UpdateCurrentUserGateway.js.map +1 -0
  135. package/features/adminUsers/account/updateCurrentUser/UpdateCurrentUserUseCase.d.ts +10 -0
  136. package/features/adminUsers/account/updateCurrentUser/UpdateCurrentUserUseCase.js +19 -0
  137. package/features/adminUsers/account/updateCurrentUser/UpdateCurrentUserUseCase.js.map +1 -0
  138. package/features/adminUsers/account/updateCurrentUser/abstractions/UpdateCurrentUserGateway.d.ts +26 -0
  139. package/features/adminUsers/account/updateCurrentUser/abstractions/UpdateCurrentUserGateway.js +5 -0
  140. package/features/adminUsers/account/updateCurrentUser/abstractions/UpdateCurrentUserGateway.js.map +1 -0
  141. package/features/adminUsers/account/updateCurrentUser/abstractions/UpdateCurrentUserUseCase.d.ts +13 -0
  142. package/features/adminUsers/account/updateCurrentUser/abstractions/UpdateCurrentUserUseCase.js +5 -0
  143. package/features/adminUsers/account/updateCurrentUser/abstractions/UpdateCurrentUserUseCase.js.map +1 -0
  144. package/features/adminUsers/account/updateCurrentUser/abstractions/index.d.ts +8 -0
  145. package/features/adminUsers/account/updateCurrentUser/abstractions/index.js +2 -0
  146. package/features/adminUsers/account/updateCurrentUser/feature.d.ts +3 -0
  147. package/features/adminUsers/account/updateCurrentUser/feature.js +19 -0
  148. package/features/adminUsers/account/updateCurrentUser/feature.js.map +1 -0
  149. package/features/adminUsers/account/updateCurrentUser/index.d.ts +1 -0
  150. package/features/adminUsers/account/updateCurrentUser/index.js +1 -0
  151. package/features/adminUsers/passwordPolicy/RulesPasswordPolicy.d.ts +6 -0
  152. package/features/adminUsers/passwordPolicy/RulesPasswordPolicy.js +22 -0
  153. package/features/adminUsers/passwordPolicy/RulesPasswordPolicy.js.map +1 -0
  154. package/features/adminUsers/passwordPolicy/abstractions.d.ts +20 -0
  155. package/features/adminUsers/passwordPolicy/abstractions.js +5 -0
  156. package/features/adminUsers/passwordPolicy/abstractions.js.map +1 -0
  157. package/features/adminUsers/passwordPolicy/feature.d.ts +8 -0
  158. package/features/adminUsers/passwordPolicy/feature.js +18 -0
  159. package/features/adminUsers/passwordPolicy/feature.js.map +1 -0
  160. package/features/adminUsers/passwordPolicy/index.d.ts +3 -0
  161. package/features/adminUsers/passwordPolicy/index.js +3 -0
  162. package/features/adminUsers/passwordPolicy/readPasswordPolicyRules.d.ts +10 -0
  163. package/features/adminUsers/passwordPolicy/readPasswordPolicyRules.js +11 -0
  164. package/features/adminUsers/passwordPolicy/readPasswordPolicyRules.js.map +1 -0
  165. package/features/adminUsers/permissions/abstractions.d.ts +17 -0
  166. package/features/adminUsers/permissions/abstractions.js +6 -0
  167. package/features/adminUsers/permissions/abstractions.js.map +1 -0
  168. package/features/adminUsers/permissions/feature.d.ts +14 -0
  169. package/features/adminUsers/permissions/feature.js +7 -0
  170. package/features/adminUsers/permissions/feature.js.map +1 -0
  171. package/features/adminUsers/permissionsSchema.d.ts +10 -0
  172. package/features/adminUsers/permissionsSchema.js +18 -0
  173. package/features/adminUsers/permissionsSchema.js.map +1 -0
  174. package/features/adminUsers/users/createUser/CreateUserGateway.d.ts +11 -0
  175. package/features/adminUsers/users/createUser/CreateUserGateway.js +49 -0
  176. package/features/adminUsers/users/createUser/CreateUserGateway.js.map +1 -0
  177. package/features/adminUsers/users/createUser/CreateUserUseCase.d.ts +10 -0
  178. package/features/adminUsers/users/createUser/CreateUserUseCase.js +18 -0
  179. package/features/adminUsers/users/createUser/CreateUserUseCase.js.map +1 -0
  180. package/features/adminUsers/users/createUser/abstractions/CreateUserGateway.d.ts +21 -0
  181. package/features/adminUsers/users/createUser/abstractions/CreateUserGateway.js +5 -0
  182. package/features/adminUsers/users/createUser/abstractions/CreateUserGateway.js.map +1 -0
  183. package/features/adminUsers/users/createUser/abstractions/CreateUserUseCase.d.ts +14 -0
  184. package/features/adminUsers/users/createUser/abstractions/CreateUserUseCase.js +5 -0
  185. package/features/adminUsers/users/createUser/abstractions/CreateUserUseCase.js.map +1 -0
  186. package/features/adminUsers/users/createUser/abstractions/index.d.ts +2 -0
  187. package/features/adminUsers/users/createUser/abstractions/index.js +2 -0
  188. package/features/adminUsers/users/createUser/feature.d.ts +3 -0
  189. package/features/adminUsers/users/createUser/feature.js +19 -0
  190. package/features/adminUsers/users/createUser/feature.js.map +1 -0
  191. package/features/adminUsers/users/createUser/index.d.ts +2 -0
  192. package/features/adminUsers/users/createUser/index.js +2 -0
  193. package/features/adminUsers/users/deleteUser/DeleteUserGateway.d.ts +11 -0
  194. package/features/adminUsers/users/deleteUser/DeleteUserGateway.js +40 -0
  195. package/features/adminUsers/users/deleteUser/DeleteUserGateway.js.map +1 -0
  196. package/features/adminUsers/users/deleteUser/DeleteUserUseCase.d.ts +10 -0
  197. package/features/adminUsers/users/deleteUser/DeleteUserUseCase.js +18 -0
  198. package/features/adminUsers/users/deleteUser/DeleteUserUseCase.js.map +1 -0
  199. package/features/adminUsers/users/deleteUser/abstractions/DeleteUserGateway.d.ts +11 -0
  200. package/features/adminUsers/users/deleteUser/abstractions/DeleteUserGateway.js +5 -0
  201. package/features/adminUsers/users/deleteUser/abstractions/DeleteUserGateway.js.map +1 -0
  202. package/features/adminUsers/users/deleteUser/abstractions/DeleteUserUseCase.d.ts +11 -0
  203. package/features/adminUsers/users/deleteUser/abstractions/DeleteUserUseCase.js +5 -0
  204. package/features/adminUsers/users/deleteUser/abstractions/DeleteUserUseCase.js.map +1 -0
  205. package/features/adminUsers/users/deleteUser/abstractions/index.d.ts +2 -0
  206. package/features/adminUsers/users/deleteUser/abstractions/index.js +2 -0
  207. package/features/adminUsers/users/deleteUser/feature.d.ts +3 -0
  208. package/features/adminUsers/users/deleteUser/feature.js +19 -0
  209. package/features/adminUsers/users/deleteUser/feature.js.map +1 -0
  210. package/features/adminUsers/users/deleteUser/index.d.ts +2 -0
  211. package/features/adminUsers/users/deleteUser/index.js +2 -0
  212. package/features/adminUsers/users/getUser/GetUserGateway.d.ts +11 -0
  213. package/features/adminUsers/users/getUser/GetUserGateway.js +57 -0
  214. package/features/adminUsers/users/getUser/GetUserGateway.js.map +1 -0
  215. package/features/adminUsers/users/getUser/GetUserUseCase.d.ts +10 -0
  216. package/features/adminUsers/users/getUser/GetUserUseCase.js +18 -0
  217. package/features/adminUsers/users/getUser/GetUserUseCase.js.map +1 -0
  218. package/features/adminUsers/users/getUser/abstractions/GetUserGateway.d.ts +32 -0
  219. package/features/adminUsers/users/getUser/abstractions/GetUserGateway.js +5 -0
  220. package/features/adminUsers/users/getUser/abstractions/GetUserGateway.js.map +1 -0
  221. package/features/adminUsers/users/getUser/abstractions/GetUserUseCase.d.ts +14 -0
  222. package/features/adminUsers/users/getUser/abstractions/GetUserUseCase.js +5 -0
  223. package/features/adminUsers/users/getUser/abstractions/GetUserUseCase.js.map +1 -0
  224. package/features/adminUsers/users/getUser/abstractions/index.d.ts +2 -0
  225. package/features/adminUsers/users/getUser/abstractions/index.js +2 -0
  226. package/features/adminUsers/users/getUser/feature.d.ts +3 -0
  227. package/features/adminUsers/users/getUser/feature.js +19 -0
  228. package/features/adminUsers/users/getUser/feature.js.map +1 -0
  229. package/features/adminUsers/users/getUser/index.d.ts +2 -0
  230. package/features/adminUsers/users/getUser/index.js +2 -0
  231. package/features/adminUsers/users/listUsers/ListUsersGateway.d.ts +11 -0
  232. package/features/adminUsers/users/listUsers/ListUsersGateway.js +39 -0
  233. package/features/adminUsers/users/listUsers/ListUsersGateway.js.map +1 -0
  234. package/features/adminUsers/users/listUsers/ListUsersUseCase.d.ts +10 -0
  235. package/features/adminUsers/users/listUsers/ListUsersUseCase.js +18 -0
  236. package/features/adminUsers/users/listUsers/ListUsersUseCase.js.map +1 -0
  237. package/features/adminUsers/users/listUsers/abstractions/ListUsersGateway.d.ts +17 -0
  238. package/features/adminUsers/users/listUsers/abstractions/ListUsersGateway.js +5 -0
  239. package/features/adminUsers/users/listUsers/abstractions/ListUsersGateway.js.map +1 -0
  240. package/features/adminUsers/users/listUsers/abstractions/ListUsersUseCase.d.ts +10 -0
  241. package/features/adminUsers/users/listUsers/abstractions/ListUsersUseCase.js +5 -0
  242. package/features/adminUsers/users/listUsers/abstractions/ListUsersUseCase.js.map +1 -0
  243. package/features/adminUsers/users/listUsers/abstractions/index.d.ts +2 -0
  244. package/features/adminUsers/users/listUsers/abstractions/index.js +2 -0
  245. package/features/adminUsers/users/listUsers/feature.d.ts +3 -0
  246. package/features/adminUsers/users/listUsers/feature.js +19 -0
  247. package/features/adminUsers/users/listUsers/feature.js.map +1 -0
  248. package/features/adminUsers/users/listUsers/index.d.ts +2 -0
  249. package/features/adminUsers/users/listUsers/index.js +2 -0
  250. package/features/adminUsers/users/updateUser/UpdateUserGateway.d.ts +11 -0
  251. package/features/adminUsers/users/updateUser/UpdateUserGateway.js +59 -0
  252. package/features/adminUsers/users/updateUser/UpdateUserGateway.js.map +1 -0
  253. package/features/adminUsers/users/updateUser/UpdateUserUseCase.d.ts +10 -0
  254. package/features/adminUsers/users/updateUser/UpdateUserUseCase.js +18 -0
  255. package/features/adminUsers/users/updateUser/UpdateUserUseCase.js.map +1 -0
  256. package/features/adminUsers/users/updateUser/abstractions/UpdateUserGateway.d.ts +33 -0
  257. package/features/adminUsers/users/updateUser/abstractions/UpdateUserGateway.js +5 -0
  258. package/features/adminUsers/users/updateUser/abstractions/UpdateUserGateway.js.map +1 -0
  259. package/features/adminUsers/users/updateUser/abstractions/UpdateUserUseCase.d.ts +15 -0
  260. package/features/adminUsers/users/updateUser/abstractions/UpdateUserUseCase.js +5 -0
  261. package/features/adminUsers/users/updateUser/abstractions/UpdateUserUseCase.js.map +1 -0
  262. package/features/adminUsers/users/updateUser/abstractions/index.d.ts +2 -0
  263. package/features/adminUsers/users/updateUser/abstractions/index.js +2 -0
  264. package/features/adminUsers/users/updateUser/feature.d.ts +3 -0
  265. package/features/adminUsers/users/updateUser/feature.js +19 -0
  266. package/features/adminUsers/users/updateUser/feature.js.map +1 -0
  267. package/features/adminUsers/users/updateUser/index.d.ts +2 -0
  268. package/features/adminUsers/users/updateUser/index.js +2 -0
  269. package/features/aiChats/AiChatSaveError.d.ts +6 -0
  270. package/features/aiChats/AiChatSaveError.js +8 -0
  271. package/features/aiChats/AiChatSaveError.js.map +1 -0
  272. package/features/aiChats/AiChatsGateway.d.ts +18 -0
  273. package/features/aiChats/AiChatsGateway.js +132 -0
  274. package/features/aiChats/AiChatsGateway.js.map +1 -0
  275. package/features/aiChats/AiChatsRepository.d.ts +36 -0
  276. package/features/aiChats/AiChatsRepository.js +110 -0
  277. package/features/aiChats/AiChatsRepository.js.map +1 -0
  278. package/features/aiChats/AiChatsRequestError.d.ts +9 -0
  279. package/features/aiChats/AiChatsRequestError.js +8 -0
  280. package/features/aiChats/AiChatsRequestError.js.map +1 -0
  281. package/features/aiChats/abstractions.d.ts +76 -0
  282. package/features/aiChats/abstractions.js +6 -0
  283. package/features/aiChats/abstractions.js.map +1 -0
  284. package/features/aiChats/feature.d.ts +3 -0
  285. package/features/aiChats/feature.js +19 -0
  286. package/features/aiChats/feature.js.map +1 -0
  287. package/features/aiChats/index.d.ts +9 -0
  288. package/features/aiChats/index.js +3 -0
  289. package/features/aiChats/messageOf.d.ts +2 -0
  290. package/features/aiChats/messageOf.js +7 -0
  291. package/features/aiChats/messageOf.js.map +1 -0
  292. package/features/aiSettings/abstractions.d.ts +16 -0
  293. package/features/aiSettings/abstractions.js +5 -0
  294. package/features/aiSettings/abstractions.js.map +1 -0
  295. package/features/aiSettings/index.d.ts +2 -0
  296. package/features/aiSettings/index.js +1 -0
  297. package/features/assumePermissions/ApiStreamClientDecorator.d.ts +16 -0
  298. package/features/assumePermissions/ApiStreamClientDecorator.js +29 -0
  299. package/features/assumePermissions/ApiStreamClientDecorator.js.map +1 -0
  300. package/features/assumePermissions/AssumePermissionsContext.d.ts +17 -0
  301. package/features/assumePermissions/AssumePermissionsContext.js +32 -0
  302. package/features/assumePermissions/AssumePermissionsContext.js.map +1 -0
  303. package/features/assumePermissions/AssumePermissionsUseCase.d.ts +33 -0
  304. package/features/assumePermissions/AssumePermissionsUseCase.js +48 -0
  305. package/features/assumePermissions/AssumePermissionsUseCase.js.map +1 -0
  306. package/features/assumePermissions/GraphQLClientDecorator.d.ts +16 -0
  307. package/features/assumePermissions/GraphQLClientDecorator.js +29 -0
  308. package/features/assumePermissions/GraphQLClientDecorator.js.map +1 -0
  309. package/features/assumePermissions/ListAssumableTargetsGateway.d.ts +13 -0
  310. package/features/assumePermissions/ListAssumableTargetsGateway.js +74 -0
  311. package/features/assumePermissions/ListAssumableTargetsGateway.js.map +1 -0
  312. package/features/assumePermissions/ListAssumableTargetsUseCase.d.ts +16 -0
  313. package/features/assumePermissions/ListAssumableTargetsUseCase.js +38 -0
  314. package/features/assumePermissions/ListAssumableTargetsUseCase.js.map +1 -0
  315. package/features/assumePermissions/LogInUseCaseDecorator.d.ts +33 -0
  316. package/features/assumePermissions/LogInUseCaseDecorator.js +36 -0
  317. package/features/assumePermissions/LogInUseCaseDecorator.js.map +1 -0
  318. package/features/assumePermissions/LogOutUseCaseDecorator.d.ts +16 -0
  319. package/features/assumePermissions/LogOutUseCaseDecorator.js +21 -0
  320. package/features/assumePermissions/LogOutUseCaseDecorator.js.map +1 -0
  321. package/features/assumePermissions/abstractions.d.ts +78 -0
  322. package/features/assumePermissions/abstractions.js +8 -0
  323. package/features/assumePermissions/abstractions.js.map +1 -0
  324. package/features/assumePermissions/assumePermissionsHeader.d.ts +3 -0
  325. package/features/assumePermissions/assumePermissionsHeader.js +7 -0
  326. package/features/assumePermissions/assumePermissionsHeader.js.map +1 -0
  327. package/features/assumePermissions/feature.d.ts +4 -0
  328. package/features/assumePermissions/feature.js +32 -0
  329. package/features/assumePermissions/feature.js.map +1 -0
  330. package/features/assumePermissions/index.d.ts +4 -0
  331. package/features/assumePermissions/index.js +2 -0
  332. package/features/banners/Banners.d.ts +15 -0
  333. package/features/banners/Banners.js +39 -0
  334. package/features/banners/Banners.js.map +1 -0
  335. package/features/banners/abstractions.d.ts +34 -0
  336. package/features/banners/abstractions.js +5 -0
  337. package/features/banners/abstractions.js.map +1 -0
  338. package/features/banners/feature.d.ts +3 -0
  339. package/features/banners/feature.js +17 -0
  340. package/features/banners/feature.js.map +1 -0
  341. package/features/banners/index.d.ts +2 -0
  342. package/features/banners/index.js +2 -0
  343. package/features/dateFormatter/formatUtcOffset.d.ts +1 -0
  344. package/features/dateFormatter/formatUtcOffset.js +11 -0
  345. package/features/dateFormatter/formatUtcOffset.js.map +1 -0
  346. package/features/debugger/DebugSessionsRepository.d.ts +35 -0
  347. package/features/debugger/DebugSessionsRepository.js +57 -0
  348. package/features/debugger/DebugSessionsRepository.js.map +1 -0
  349. package/features/debugger/GraphQLExtensionsDebugHandler.d.ts +17 -0
  350. package/features/debugger/GraphQLExtensionsDebugHandler.js +21 -0
  351. package/features/debugger/GraphQLExtensionsDebugHandler.js.map +1 -0
  352. package/features/debugger/GraphQLExtensionsDebugHandler.test.d.ts +1 -0
  353. package/features/debugger/GraphQLExtensionsDebugHandler.test.js +112 -0
  354. package/features/debugger/GraphQLExtensionsDebugHandler.test.js.map +1 -0
  355. package/features/debugger/abstractions.d.ts +50 -0
  356. package/features/debugger/abstractions.js +5 -0
  357. package/features/debugger/abstractions.js.map +1 -0
  358. package/features/debugger/constants.d.ts +1 -0
  359. package/features/debugger/constants.js +4 -0
  360. package/features/debugger/constants.js.map +1 -0
  361. package/features/debugger/feature.d.ts +3 -0
  362. package/features/debugger/feature.js +19 -0
  363. package/features/debugger/feature.js.map +1 -0
  364. package/features/debugger/index.d.ts +3 -0
  365. package/features/debugger/index.js +3 -0
  366. package/features/formModel/AccessControlRuleEvaluator.d.ts +12 -0
  367. package/features/formModel/AccessControlRuleEvaluator.js +30 -0
  368. package/features/formModel/AccessControlRuleEvaluator.js.map +1 -0
  369. package/features/formModel/AccessControlRuleEvaluator.test.d.ts +1 -0
  370. package/features/formModel/AccessControlRuleEvaluator.test.js +219 -0
  371. package/features/formModel/AccessControlRuleEvaluator.test.js.map +1 -0
  372. package/features/formModel/ConditionRuleEvaluator.js +34 -4
  373. package/features/formModel/ConditionRuleEvaluator.js.map +1 -1
  374. package/features/formModel/Field.d.ts +14 -1
  375. package/features/formModel/Field.js +41 -5
  376. package/features/formModel/Field.js.map +1 -1
  377. package/features/formModel/FieldBuilder.d.ts +3 -3
  378. package/features/formModel/FieldBuilder.js +2 -1
  379. package/features/formModel/FieldBuilder.js.map +1 -1
  380. package/features/formModel/FieldBuilder.test.js +158 -1
  381. package/features/formModel/FieldBuilder.test.js.map +1 -1
  382. package/features/formModel/FocusManager.js +10 -3
  383. package/features/formModel/FocusManager.js.map +1 -1
  384. package/features/formModel/FormErrors.js +1 -1
  385. package/features/formModel/FormErrors.js.map +1 -1
  386. package/features/formModel/FormModel.d.ts +2 -0
  387. package/features/formModel/FormModel.js +32 -9
  388. package/features/formModel/FormModel.js.map +1 -1
  389. package/features/formModel/FormModel.test.js +835 -4
  390. package/features/formModel/FormModel.test.js.map +1 -1
  391. package/features/formModel/ObjectField.d.ts +12 -1
  392. package/features/formModel/ObjectField.js +70 -20
  393. package/features/formModel/ObjectField.js.map +1 -1
  394. package/features/formModel/Rules.test.js +224 -16
  395. package/features/formModel/Rules.test.js.map +1 -1
  396. package/features/formModel/abstractions.d.ts +56 -4
  397. package/features/formModel/abstractions.js +2 -1
  398. package/features/formModel/abstractions.js.map +1 -1
  399. package/features/formModel/createFieldRenderer.d.ts +42 -0
  400. package/features/formModel/createFieldRenderer.js +33 -10
  401. package/features/formModel/createFieldRenderer.js.map +1 -1
  402. package/features/formModel/feature.js +2 -0
  403. package/features/formModel/feature.js.map +1 -1
  404. package/features/formModel/fieldTypes/DateTimeFieldType.d.ts +67 -4
  405. package/features/formModel/fieldTypes/DateTimeFieldType.js +88 -22
  406. package/features/formModel/fieldTypes/DateTimeFieldType.js.map +1 -1
  407. package/features/formModel/fieldTypes/ObjectFieldType.d.ts +3 -1
  408. package/features/formModel/fieldTypes/ObjectFieldType.js +23 -1
  409. package/features/formModel/fieldTypes/ObjectFieldType.js.map +1 -1
  410. package/features/formModel/fieldTypes/dateLimits.d.ts +37 -0
  411. package/features/formModel/fieldTypes/dateLimits.js +64 -0
  412. package/features/formModel/fieldTypes/dateLimits.js.map +1 -0
  413. package/features/formModel/fieldTypes/dateLimits.test.d.ts +1 -0
  414. package/features/formModel/fieldTypes/dateLimits.test.js +60 -0
  415. package/features/formModel/fieldTypes/dateLimits.test.js.map +1 -0
  416. package/features/formModel/hasSubtreeFocusRequest.d.ts +12 -0
  417. package/features/formModel/hasSubtreeFocusRequest.js +15 -0
  418. package/features/formModel/hasSubtreeFocusRequest.js.map +1 -0
  419. package/features/formModel/index.d.ts +3 -2
  420. package/features/formModel/index.js +2 -1
  421. package/features/formModel/jsonSchema/JsonSchema.d.ts +18 -0
  422. package/features/formModel/jsonSchema/JsonSchema.js +0 -0
  423. package/features/formModel/jsonSchema/JsonSchemaFieldOptions.d.ts +4 -0
  424. package/features/formModel/jsonSchema/JsonSchemaFieldOptions.js +0 -0
  425. package/features/formModel/jsonSchema/JsonSchemaIssue.d.ts +4 -0
  426. package/features/formModel/jsonSchema/JsonSchemaIssue.js +0 -0
  427. package/features/formModel/jsonSchema/JsonSchemaValidationResult.d.ts +5 -0
  428. package/features/formModel/jsonSchema/JsonSchemaValidationResult.js +0 -0
  429. package/features/formModel/jsonSchema/JsonSchemaValidator.d.ts +4 -0
  430. package/features/formModel/jsonSchema/JsonSchemaValidator.js +0 -0
  431. package/features/formModel/jsonSchema/PlainObject.d.ts +1 -0
  432. package/features/formModel/jsonSchema/PlainObject.js +0 -0
  433. package/features/formModel/jsonSchema/buildFieldsFromJsonSchema.d.ts +5 -0
  434. package/features/formModel/jsonSchema/buildFieldsFromJsonSchema.js +154 -0
  435. package/features/formModel/jsonSchema/buildFieldsFromJsonSchema.js.map +1 -0
  436. package/features/formModel/jsonSchema/buildFieldsFromJsonSchema.test.d.ts +1 -0
  437. package/features/formModel/jsonSchema/buildFieldsFromJsonSchema.test.js +643 -0
  438. package/features/formModel/jsonSchema/buildFieldsFromJsonSchema.test.js.map +1 -0
  439. package/features/formModel/jsonSchema/createJsonSchemaValidator.d.ts +3 -0
  440. package/features/formModel/jsonSchema/createJsonSchemaValidator.js +40 -0
  441. package/features/formModel/jsonSchema/createJsonSchemaValidator.js.map +1 -0
  442. package/features/formModel/jsonSchema/createJsonSchemaValidator.test.d.ts +1 -0
  443. package/features/formModel/jsonSchema/createJsonSchemaValidator.test.js +141 -0
  444. package/features/formModel/jsonSchema/createJsonSchemaValidator.test.js.map +1 -0
  445. package/features/formModel/jsonSchema/formDataToJsonSchemaValue.d.ts +3 -0
  446. package/features/formModel/jsonSchema/formDataToJsonSchemaValue.js +52 -0
  447. package/features/formModel/jsonSchema/formDataToJsonSchemaValue.js.map +1 -0
  448. package/features/formModel/jsonSchema/formDataToJsonSchemaValue.test.d.ts +1 -0
  449. package/features/formModel/jsonSchema/formDataToJsonSchemaValue.test.js +250 -0
  450. package/features/formModel/jsonSchema/formDataToJsonSchemaValue.test.js.map +1 -0
  451. package/features/formModel/jsonSchema/getJsonSchemaKind.d.ts +3 -0
  452. package/features/formModel/jsonSchema/getJsonSchemaKind.js +31 -0
  453. package/features/formModel/jsonSchema/getJsonSchemaKind.js.map +1 -0
  454. package/features/formModel/jsonSchema/getJsonSchemaKind.test.d.ts +1 -0
  455. package/features/formModel/jsonSchema/getJsonSchemaKind.test.js +123 -0
  456. package/features/formModel/jsonSchema/getJsonSchemaKind.test.js.map +1 -0
  457. package/features/formModel/jsonSchema/isPlainObject.d.ts +2 -0
  458. package/features/formModel/jsonSchema/isPlainObject.js +4 -0
  459. package/features/formModel/jsonSchema/isPlainObject.js.map +1 -0
  460. package/features/formModel/jsonSchema/jsonSchemaValueToFormData.d.ts +3 -0
  461. package/features/formModel/jsonSchema/jsonSchemaValueToFormData.js +30 -0
  462. package/features/formModel/jsonSchema/jsonSchemaValueToFormData.js.map +1 -0
  463. package/features/formModel/jsonSchema/jsonSchemaValueToFormData.test.d.ts +1 -0
  464. package/features/formModel/jsonSchema/jsonSchemaValueToFormData.test.js +207 -0
  465. package/features/formModel/jsonSchema/jsonSchemaValueToFormData.test.js.map +1 -0
  466. package/features/formModel/jsonSchema/normalizeJsonSchema.d.ts +2 -0
  467. package/features/formModel/jsonSchema/normalizeJsonSchema.js +10 -0
  468. package/features/formModel/jsonSchema/normalizeJsonSchema.js.map +1 -0
  469. package/features/formModel/renderers.d.ts +1 -0
  470. package/features/formModel/renderers.js +1 -0
  471. package/features/notifications/Notifications.d.ts +1 -0
  472. package/features/notifications/Notifications.js +3 -0
  473. package/features/notifications/Notifications.js.map +1 -1
  474. package/features/notifications/Notifications.test.d.ts +1 -0
  475. package/features/notifications/Notifications.test.js +106 -0
  476. package/features/notifications/Notifications.test.js.map +1 -0
  477. package/features/notifications/NotificationsRenderer.d.ts +2 -1
  478. package/features/notifications/NotificationsRenderer.js +23 -4
  479. package/features/notifications/NotificationsRenderer.js.map +1 -1
  480. package/features/notifications/NotificationsRenderer.test.d.ts +1 -0
  481. package/features/notifications/NotificationsRenderer.test.js +261 -0
  482. package/features/notifications/NotificationsRenderer.test.js.map +1 -0
  483. package/features/notifications/abstractions.d.ts +13 -2
  484. package/features/notifications/abstractions.js.map +1 -1
  485. package/features/security/LogIn/LogInUseCase.d.ts +0 -1
  486. package/features/security/LogIn/LogInUseCase.js +2 -5
  487. package/features/security/LogIn/LogInUseCase.js.map +1 -1
  488. package/features/security/LogIn/hasAppPermissions.d.ts +2 -0
  489. package/features/security/LogIn/hasAppPermissions.js +8 -0
  490. package/features/security/LogIn/hasAppPermissions.js.map +1 -0
  491. package/features/wcp/ReactLicense.d.ts +6 -1
  492. package/features/wcp/ReactLicense.js +17 -2
  493. package/features/wcp/ReactLicense.js.map +1 -1
  494. package/features/wcp/WcpGateway.js +4 -0
  495. package/features/wcp/WcpGateway.js.map +1 -1
  496. package/hooks/useHotkeys.js +6 -4
  497. package/hooks/useHotkeys.js.map +1 -1
  498. package/index.d.ts +27 -3
  499. package/index.js +23 -6
  500. package/modules/AccessManagementExtension.js +3 -1
  501. package/modules/AccessManagementExtension.js.map +1 -1
  502. package/modules/DebuggerExtension.d.ts +2 -0
  503. package/modules/DebuggerExtension.js +55 -0
  504. package/modules/DebuggerExtension.js.map +1 -0
  505. package/package.json +41 -41
  506. package/presentation/accessManagement/apiKeys/ApiKeysPresenter.js +1 -2
  507. package/presentation/accessManagement/apiKeys/ApiKeysPresenter.js.map +1 -1
  508. package/presentation/accessManagement/roles/RolesPresenter.js +1 -2
  509. package/presentation/accessManagement/roles/RolesPresenter.js.map +1 -1
  510. package/presentation/accessManagement/roles/components/RolesDataList.d.ts +10 -0
  511. package/presentation/accessManagement/roles/components/RolesDataList.js +146 -0
  512. package/presentation/accessManagement/roles/components/RolesDataList.js.map +1 -0
  513. package/presentation/accessManagement/roles/components/RolesForm.d.ts +13 -0
  514. package/presentation/accessManagement/roles/components/RolesForm.js +114 -0
  515. package/presentation/accessManagement/roles/components/RolesForm.js.map +1 -0
  516. package/presentation/accessManagement/roles/components/RolesView.js +6 -216
  517. package/presentation/accessManagement/roles/components/RolesView.js.map +1 -1
  518. package/presentation/accessManagement/teams/TeamsPresenter.js +1 -2
  519. package/presentation/accessManagement/teams/TeamsPresenter.js.map +1 -1
  520. package/presentation/accessManagement/teams/components/TeamsDataList.d.ts +10 -0
  521. package/presentation/accessManagement/teams/components/TeamsDataList.js +146 -0
  522. package/presentation/accessManagement/teams/components/TeamsDataList.js.map +1 -0
  523. package/presentation/accessManagement/teams/components/TeamsForm.d.ts +13 -0
  524. package/presentation/accessManagement/teams/components/TeamsForm.js +96 -0
  525. package/presentation/accessManagement/teams/components/TeamsForm.js.map +1 -0
  526. package/presentation/accessManagement/teams/components/TeamsView.js +6 -198
  527. package/presentation/accessManagement/teams/components/TeamsView.js.map +1 -1
  528. package/presentation/adminUsers/AdminUsers.d.ts +10 -0
  529. package/presentation/adminUsers/AdminUsers.js +77 -0
  530. package/presentation/adminUsers/AdminUsers.js.map +1 -0
  531. package/presentation/adminUsers/SecurityPermission.d.ts +2 -0
  532. package/presentation/adminUsers/SecurityPermission.js +15 -0
  533. package/presentation/adminUsers/SecurityPermission.js.map +1 -0
  534. package/presentation/adminUsers/UserItem.d.ts +10 -0
  535. package/presentation/adminUsers/UserItem.js +0 -0
  536. package/presentation/adminUsers/components/AvatarImage/AvatarImage.d.ts +3 -0
  537. package/presentation/adminUsers/components/AvatarImage/AvatarImage.js +31 -0
  538. package/presentation/adminUsers/components/AvatarImage/AvatarImage.js.map +1 -0
  539. package/presentation/adminUsers/components/AvatarImage/AvatarImagePreview.d.ts +10 -0
  540. package/presentation/adminUsers/components/AvatarImage/AvatarImagePreview.js +53 -0
  541. package/presentation/adminUsers/components/AvatarImage/AvatarImagePreview.js.map +1 -0
  542. package/presentation/adminUsers/components/AvatarImage/AvatarImageTrigger.d.ts +7 -0
  543. package/presentation/adminUsers/components/AvatarImage/AvatarImageTrigger.js +28 -0
  544. package/presentation/adminUsers/components/AvatarImage/AvatarImageTrigger.js.map +1 -0
  545. package/presentation/adminUsers/components/AvatarImage/index.d.ts +1 -0
  546. package/presentation/adminUsers/components/AvatarImage/index.js +1 -0
  547. package/presentation/adminUsers/routes.d.ts +10 -0
  548. package/presentation/adminUsers/routes.js +20 -0
  549. package/presentation/adminUsers/routes.js.map +1 -0
  550. package/presentation/adminUsers/userMenu/AccountDetails.d.ts +6 -0
  551. package/presentation/adminUsers/userMenu/AccountDetails.js +20 -0
  552. package/presentation/adminUsers/userMenu/AccountDetails.js.map +1 -0
  553. package/presentation/adminUsers/userMenu/useIsDefaultTenant.d.ts +1 -0
  554. package/presentation/adminUsers/userMenu/useIsDefaultTenant.js +9 -0
  555. package/presentation/adminUsers/userMenu/useIsDefaultTenant.js.map +1 -0
  556. package/presentation/adminUsers/views/Account/Account.d.ts +2 -0
  557. package/presentation/adminUsers/views/Account/Account.js +137 -0
  558. package/presentation/adminUsers/views/Account/Account.js.map +1 -0
  559. package/presentation/adminUsers/views/Account/index.d.ts +1 -0
  560. package/presentation/adminUsers/views/Account/index.js +1 -0
  561. package/presentation/adminUsers/views/Users/UsersDataList.d.ts +3 -0
  562. package/presentation/adminUsers/views/Users/UsersDataList.js +180 -0
  563. package/presentation/adminUsers/views/Users/UsersDataList.js.map +1 -0
  564. package/presentation/adminUsers/views/Users/UsersForm.d.ts +5 -0
  565. package/presentation/adminUsers/views/Users/UsersForm.js +175 -0
  566. package/presentation/adminUsers/views/Users/UsersForm.js.map +1 -0
  567. package/presentation/adminUsers/views/Users/UsersView.d.ts +2 -0
  568. package/presentation/adminUsers/views/Users/UsersView.js +15 -0
  569. package/presentation/adminUsers/views/Users/UsersView.js.map +1 -0
  570. package/presentation/adminUsers/views/Users/components/DeleteAction.d.ts +7 -0
  571. package/presentation/adminUsers/views/Users/components/DeleteAction.js +29 -0
  572. package/presentation/adminUsers/views/Users/components/DeleteAction.js.map +1 -0
  573. package/presentation/adminUsers/views/Users/hooks/useUserForm.d.ts +27 -0
  574. package/presentation/adminUsers/views/Users/hooks/useUserForm.js +101 -0
  575. package/presentation/adminUsers/views/Users/hooks/useUserForm.js.map +1 -0
  576. package/presentation/adminUsers/views/Users/search.js +21 -0
  577. package/presentation/adminUsers/views/Users/search.js.map +1 -0
  578. package/presentation/adminUsers/views/Users/search.svg +20 -0
  579. package/presentation/adminUsers/views/utils.d.ts +3 -0
  580. package/presentation/adminUsers/views/utils.js +12 -0
  581. package/presentation/adminUsers/views/utils.js.map +1 -0
  582. package/presentation/aiChats/AiChatsPanelPresenter.d.ts +28 -0
  583. package/presentation/aiChats/AiChatsPanelPresenter.js +132 -0
  584. package/presentation/aiChats/AiChatsPanelPresenter.js.map +1 -0
  585. package/presentation/aiChats/abstractions.d.ts +69 -0
  586. package/presentation/aiChats/abstractions.js +5 -0
  587. package/presentation/aiChats/abstractions.js.map +1 -0
  588. package/presentation/aiChats/feature.d.ts +3 -0
  589. package/presentation/aiChats/feature.js +17 -0
  590. package/presentation/aiChats/feature.js.map +1 -0
  591. package/presentation/aiChats/index.d.ts +2 -0
  592. package/presentation/aiChats/index.js +2 -0
  593. package/presentation/assumePermissions/AssumePermissionsPresenter.d.ts +36 -0
  594. package/presentation/assumePermissions/AssumePermissionsPresenter.js +153 -0
  595. package/presentation/assumePermissions/AssumePermissionsPresenter.js.map +1 -0
  596. package/presentation/assumePermissions/abstractions.d.ts +30 -0
  597. package/presentation/assumePermissions/abstractions.js +5 -0
  598. package/presentation/assumePermissions/abstractions.js.map +1 -0
  599. package/presentation/assumePermissions/components/AssumePermissionsButton.d.ts +14 -0
  600. package/presentation/assumePermissions/components/AssumePermissionsButton.js +42 -0
  601. package/presentation/assumePermissions/components/AssumePermissionsButton.js.map +1 -0
  602. package/presentation/assumePermissions/components/AssumedPermissionsBanner.d.ts +11 -0
  603. package/presentation/assumePermissions/components/AssumedPermissionsBanner.js +25 -0
  604. package/presentation/assumePermissions/components/AssumedPermissionsBanner.js.map +1 -0
  605. package/presentation/assumePermissions/components/AssumedPermissionsSelector.d.ts +2 -0
  606. package/presentation/assumePermissions/components/AssumedPermissionsSelector.js +68 -0
  607. package/presentation/assumePermissions/components/AssumedPermissionsSelector.js.map +1 -0
  608. package/presentation/assumePermissions/feature.d.ts +3 -0
  609. package/presentation/assumePermissions/feature.js +17 -0
  610. package/presentation/assumePermissions/feature.js.map +1 -0
  611. package/presentation/assumePermissions/index.d.ts +4 -0
  612. package/presentation/assumePermissions/index.js +4 -0
  613. package/presentation/banners/BannersPresenter.d.ts +14 -0
  614. package/presentation/banners/BannersPresenter.js +60 -0
  615. package/presentation/banners/BannersPresenter.js.map +1 -0
  616. package/presentation/banners/abstractions.d.ts +24 -0
  617. package/presentation/banners/abstractions.js +5 -0
  618. package/presentation/banners/abstractions.js.map +1 -0
  619. package/presentation/banners/components/Banner.d.ts +10 -0
  620. package/presentation/banners/components/Banner.js +32 -0
  621. package/presentation/banners/components/Banner.js.map +1 -0
  622. package/presentation/banners/components/BannerBar.d.ts +11 -0
  623. package/presentation/banners/components/BannerBar.js +51 -0
  624. package/presentation/banners/components/BannerBar.js.map +1 -0
  625. package/presentation/banners/feature.d.ts +3 -0
  626. package/presentation/banners/feature.js +17 -0
  627. package/presentation/banners/feature.js.map +1 -0
  628. package/presentation/banners/index.d.ts +6 -0
  629. package/presentation/banners/index.js +4 -0
  630. package/presentation/banners/useBanner.d.ts +10 -0
  631. package/presentation/banners/useBanner.js +15 -0
  632. package/presentation/banners/useBanner.js.map +1 -0
  633. package/presentation/commandPalette/CommandPalettePresenter.js +3 -1
  634. package/presentation/commandPalette/CommandPalettePresenter.js.map +1 -1
  635. package/presentation/commandPalette/abstractions.d.ts +5 -0
  636. package/presentation/commandPalette/abstractions.js.map +1 -1
  637. package/presentation/commandPalette/commands/AiChatsCommand.d.ts +24 -0
  638. package/presentation/commandPalette/commands/AiChatsCommand.js +41 -0
  639. package/presentation/commandPalette/commands/AiChatsCommand.js.map +1 -0
  640. package/presentation/commandPalette/commands/AskAiCommand.d.ts +1 -0
  641. package/presentation/commandPalette/commands/AskAiCommand.js +3 -2
  642. package/presentation/commandPalette/commands/AskAiCommand.js.map +1 -1
  643. package/presentation/commandPalette/commands/feature.js +2 -0
  644. package/presentation/commandPalette/commands/feature.js.map +1 -1
  645. package/presentation/createReactiveComponent.d.ts +1 -0
  646. package/presentation/createReactiveComponent.js +1 -0
  647. package/presentation/debugger/DebuggerPresenter.d.ts +14 -0
  648. package/presentation/debugger/DebuggerPresenter.js +45 -0
  649. package/presentation/debugger/DebuggerPresenter.js.map +1 -0
  650. package/presentation/debugger/abstractions.d.ts +17 -0
  651. package/presentation/debugger/abstractions.js +5 -0
  652. package/presentation/debugger/abstractions.js.map +1 -0
  653. package/presentation/debugger/components/DebuggerIndicator.d.ts +2 -0
  654. package/presentation/debugger/components/DebuggerIndicator.js +45 -0
  655. package/presentation/debugger/components/DebuggerIndicator.js.map +1 -0
  656. package/presentation/debugger/components/DebuggerView.d.ts +4 -0
  657. package/presentation/debugger/components/DebuggerView.js +44 -0
  658. package/presentation/debugger/components/DebuggerView.js.map +1 -0
  659. package/presentation/debugger/downloadJson.d.ts +7 -0
  660. package/presentation/debugger/downloadJson.js +17 -0
  661. package/presentation/debugger/downloadJson.js.map +1 -0
  662. package/presentation/debugger/feature.d.ts +3 -0
  663. package/presentation/debugger/feature.js +17 -0
  664. package/presentation/debugger/feature.js.map +1 -0
  665. package/presentation/debugger/routes.d.ts +4 -0
  666. package/presentation/debugger/routes.js +10 -0
  667. package/presentation/debugger/routes.js.map +1 -0
  668. package/presentation/installation/components/SystemInstaller/steps/AdminUserStep.js +4 -3
  669. package/presentation/installation/components/SystemInstaller/steps/AdminUserStep.js.map +1 -1
  670. package/presentation/installation/components/SystemInstaller/steps/FinishSetup/handleStartUsing.js.map +1 -1
  671. package/presentation/installation/presenters/SystemInstaller/SystemInstallerPresenter.js.map +1 -1
  672. package/presentation/listPresenter/FolderAwareDataSource.d.ts +5 -0
  673. package/presentation/listPresenter/FolderAwareDataSource.js +4 -3
  674. package/presentation/listPresenter/FolderAwareDataSource.js.map +1 -1
  675. package/presentation/listPresenter/QueryMatcher.d.ts +28 -5
  676. package/presentation/listPresenter/QueryMatcher.js +72 -2
  677. package/presentation/listPresenter/QueryMatcher.js.map +1 -1
  678. package/presentation/listPresenter/QueryMatcher.test.d.ts +1 -0
  679. package/presentation/listPresenter/QueryMatcher.test.js +345 -0
  680. package/presentation/listPresenter/QueryMatcher.test.js.map +1 -0
  681. package/presentation/trashBin/TrashBinPresenter.js +3 -1
  682. package/presentation/trashBin/TrashBinPresenter.js.map +1 -1
  683. package/presentation/trashBin/TrashBinPresenter.test.d.ts +1 -0
  684. package/presentation/trashBin/TrashBinPresenter.test.js +91 -0
  685. package/presentation/trashBin/TrashBinPresenter.test.js.map +1 -0
  686. package/presentation/trashBin/abstractions.d.ts +1 -1
  687. package/presentation/trashBin/abstractions.js.map +1 -1
  688. package/presentation/trashBin/components/BulkActions/DeleteItems.js +5 -1
  689. package/presentation/trashBin/components/BulkActions/DeleteItems.js.map +1 -1
  690. package/presentation/trashBin/components/BulkActions/DeleteItems.test.d.ts +1 -0
  691. package/presentation/trashBin/components/BulkActions/DeleteItems.test.js +100 -0
  692. package/presentation/trashBin/components/BulkActions/DeleteItems.test.js.map +1 -0
  693. package/presentation/trashBin/hooks/useDeleteTrashBinItem.js +2 -1
  694. package/presentation/trashBin/hooks/useDeleteTrashBinItem.js.map +1 -1
  695. package/presentation/trashBin/hooks/useDeleteTrashBinItem.test.d.ts +1 -0
  696. package/presentation/trashBin/hooks/useDeleteTrashBinItem.test.js +67 -0
  697. package/presentation/trashBin/hooks/useDeleteTrashBinItem.test.js.map +1 -0
  698. package/static/svg/search.43fa797c.svg +20 -0
  699. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker.js +0 -68
  700. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker.js.map +0 -1
  701. package/features/aiChat/AiChatGateway.js.map +0 -1
  702. package/features/aiChat/AiChatPresenter.d.ts +0 -32
  703. package/features/aiChat/AiChatPresenter.js +0 -220
  704. package/features/aiChat/AiChatPresenter.js.map +0 -1
  705. package/features/aiChat/abstractions.d.ts +0 -124
  706. package/features/aiChat/abstractions.js +0 -6
  707. package/features/aiChat/abstractions.js.map +0 -1
  708. package/features/aiChat/feature.d.ts +0 -3
  709. package/features/aiChat/feature.js +0 -19
  710. package/features/aiChat/feature.js.map +0 -1
  711. package/features/aiChat/index.d.ts +0 -6
  712. package/features/aiChat/index.js +0 -3
  713. package/presentation/installation/components/SystemInstaller/steps/AdminUserStep/createPasswordValidator.d.ts +0 -8
  714. package/presentation/installation/components/SystemInstaller/steps/AdminUserStep/createPasswordValidator.js +0 -17
  715. package/presentation/installation/components/SystemInstaller/steps/AdminUserStep/createPasswordValidator.js.map +0 -1
  716. package/presentation/installation/components/SystemInstaller/steps/AdminUserStep/usePasswordValidator.d.ts +0 -1
  717. package/presentation/installation/components/SystemInstaller/steps/AdminUserStep/usePasswordValidator.js +0 -16
  718. package/presentation/installation/components/SystemInstaller/steps/AdminUserStep/usePasswordValidator.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"features/formModel/jsonSchema/buildFieldsFromJsonSchema.test.js","sources":["../../../../src/features/formModel/jsonSchema/buildFieldsFromJsonSchema.test.ts"],"sourcesContent":["import { describe } from \"vitest\";\nimport { expect } from \"vitest\";\nimport { it } from \"vitest\";\nimport { Container } from \"@webiny/di\";\nimport { FormModelFeature } from \"../feature.js\";\nimport { FormModelFactory } from \"../abstractions.js\";\nimport type { IFormModel } from \"../abstractions.js\";\nimport { IdentityContextFeature } from \"~/features/security/IdentityContext/feature.js\";\nimport type { JsonSchema } from \"./JsonSchema.js\";\nimport type { JsonSchemaFieldOptions } from \"./JsonSchemaFieldOptions.js\";\nimport { buildFieldsFromJsonSchema } from \"./buildFieldsFromJsonSchema.js\";\nimport { jsonSchemaValueToFormData } from \"./jsonSchemaValueToFormData.js\";\nimport { formDataToJsonSchemaValue } from \"./formDataToJsonSchemaValue.js\";\n\nconst OPTIONS: JsonSchemaFieldOptions = { uiRenderers: { team: \"textarea\" } };\n\nconst createForm = (schema: JsonSchema, options: JsonSchemaFieldOptions = OPTIONS): IFormModel => {\n const container = new Container();\n IdentityContextFeature.register(container);\n FormModelFeature.register(container);\n return container.resolve(FormModelFactory).create({\n fields: registry => buildFieldsFromJsonSchema(schema, registry, options)\n });\n};\n\nconst objectSchema = (properties: Record<string, JsonSchema>, required?: string[]): JsonSchema => {\n const schema: JsonSchema = { type: \"object\", properties };\n if (required) {\n schema.required = required;\n }\n return schema;\n};\n\ndescribe(\"buildFieldsFromJsonSchema\", () => {\n describe(\"strings\", () => {\n it(\"maps a string to a text input with the title as label and the description as help\", () => {\n const form = createForm(\n objectSchema({\n url: { type: \"string\", title: \"URL\", description: \"Where to post.\" }\n })\n );\n\n const vm = form.field(\"url\").vm;\n\n expect(vm.type).toBe(\"text\");\n expect(vm.renderer).toBe(\"textInput\");\n expect(vm.label).toBe(\"URL\");\n expect(vm.help).toBe(\"Where to post.\");\n });\n\n it(\"labels a property without a title with its key\", () => {\n const form = createForm(objectSchema({ webhookUrl: { type: \"string\" } }));\n\n expect(form.field(\"webhookUrl\").vm.label).toBe(\"webhookUrl\");\n expect(form.field(\"webhookUrl\").vm.help).toBeUndefined();\n });\n\n it(\"carries the default into the field value\", () => {\n const form = createForm(objectSchema({ method: { type: \"string\", default: \"POST\" } }));\n\n expect(form.field(\"method\").getValue()).toBe(\"POST\");\n });\n\n it(\"renders the textarea hint as a textarea\", () => {\n const form = createForm(objectSchema({ body: { type: \"string\", ui: \"textarea\" } }));\n\n expect(form.field(\"body\").vm.renderer).toBe(\"textarea\");\n });\n\n it(\"renders another hint with the renderer registered for it\", () => {\n const form = createForm(objectSchema({ team: { type: \"string\", ui: \"team\" } }));\n\n expect(form.field(\"team\").vm.renderer).toBe(\"textarea\");\n });\n\n it(\"renders a hint with no registered renderer as a plain text input\", () => {\n const form = createForm(objectSchema({ owner: { type: \"string\", ui: \"user\" } }));\n\n expect(form.field(\"owner\").vm.renderer).toBe(\"textInput\");\n });\n\n it(\"ignores a hint named like an object prototype member\", () => {\n const form = createForm(objectSchema({ owner: { type: \"string\", ui: \"constructor\" } }));\n\n expect(form.field(\"owner\").vm.renderer).toBe(\"textInput\");\n });\n });\n\n describe(\"enums\", () => {\n it(\"maps a string enum to a select with one option per value\", () => {\n const form = createForm(\n objectSchema({ method: { type: \"string\", enum: [\"GET\", \"POST\"] } })\n );\n\n const vm = form.field(\"method\").vm;\n\n expect(vm.renderer).toBe(\"select\");\n expect(vm.options).toEqual([\n { label: \"GET\", value: \"GET\" },\n { label: \"POST\", value: \"POST\" }\n ]);\n });\n\n it(\"maps a number enum to a number select\", () => {\n const form = createForm(objectSchema({ retries: { type: \"integer\", enum: [1, 3] } }));\n\n const vm = form.field(\"retries\").vm;\n\n expect(vm.type).toBe(\"number\");\n expect(vm.renderer).toBe(\"select\");\n expect(vm.options).toEqual([\n { label: \"1\", value: 1 },\n { label: \"3\", value: 3 }\n ]);\n });\n });\n\n describe(\"numbers\", () => {\n it(\"maps a number to a number input without a check when the schema has no bounds\", () => {\n const form = createForm(objectSchema({ ratio: { type: \"number\" } }));\n\n expect(form.field(\"ratio\").vm.type).toBe(\"number\");\n expect(form.field(\"ratio\").vm.renderer).toBe(\"numberInput\");\n expect(form.field(\"ratio\").config.schema).toBeUndefined();\n });\n\n it(\"checks both bounds with one message\", async () => {\n const form = createForm(\n objectSchema({ timeout: { type: \"integer\", minimum: 1, maximum: 120 } })\n );\n const field = form.field(\"timeout\");\n\n field.setValue(500);\n expect(await field.validate({ force: true })).toBe(false);\n expect(field.vm.validation.message).toBe(\"Enter a number from 1 to 120.\");\n\n field.setValue(0);\n expect(await field.validate({ force: true })).toBe(false);\n expect(field.vm.validation.message).toBe(\"Enter a number from 1 to 120.\");\n\n field.setValue(30);\n expect(await field.validate({ force: true })).toBe(true);\n });\n\n it(\"checks a single bound and exclusive bounds\", async () => {\n const form = createForm(\n objectSchema({\n atLeast: { type: \"number\", minimum: 5 },\n atMost: { type: \"number\", maximum: 5 },\n above: { type: \"number\", exclusiveMinimum: 5 },\n below: { type: \"number\", exclusiveMaximum: 5 }\n })\n );\n\n form.field(\"atLeast\").setValue(4);\n form.field(\"atMost\").setValue(6);\n form.field(\"above\").setValue(5);\n form.field(\"below\").setValue(5);\n\n expect(await form.field(\"atLeast\").validate({ force: true })).toBe(false);\n expect(await form.field(\"atMost\").validate({ force: true })).toBe(false);\n expect(await form.field(\"above\").validate({ force: true })).toBe(false);\n expect(await form.field(\"below\").validate({ force: true })).toBe(false);\n\n expect(form.field(\"atLeast\").vm.validation.message).toBe(\n \"Enter a number of at least 5.\"\n );\n expect(form.field(\"atMost\").vm.validation.message).toBe(\"Enter a number of at most 5.\");\n\n form.field(\"atLeast\").setValue(5);\n form.field(\"atMost\").setValue(5);\n form.field(\"above\").setValue(6);\n form.field(\"below\").setValue(4);\n\n expect(await form.field(\"atLeast\").validate({ force: true })).toBe(true);\n expect(await form.field(\"atMost\").validate({ force: true })).toBe(true);\n expect(await form.field(\"above\").validate({ force: true })).toBe(true);\n expect(await form.field(\"below\").validate({ force: true })).toBe(true);\n });\n\n it(\"rejects a fraction for an integer\", async () => {\n const form = createForm(objectSchema({ retries: { type: \"integer\" } }));\n const field = form.field(\"retries\");\n\n field.setValue(1.5);\n expect(await field.validate({ force: true })).toBe(false);\n expect(field.vm.validation.message).toBe(\"Enter a whole number.\");\n\n field.setValue(2);\n expect(await field.validate({ force: true })).toBe(true);\n });\n\n it(\"skips the check for an empty optional number\", async () => {\n const form = createForm(objectSchema({ timeout: { type: \"integer\", minimum: 1 } }));\n\n expect(await form.field(\"timeout\").validate({ force: true })).toBe(true);\n });\n });\n\n describe(\"booleans, objects and lists\", () => {\n it(\"carries a boolean default into the field value\", () => {\n const form = createForm(objectSchema({ enabled: { type: \"boolean\", default: true } }));\n\n expect(form.field(\"enabled\").getValue()).toBe(true);\n });\n\n it(\"writes an untouched boolean without a default as false\", () => {\n const schema = objectSchema({ enabled: { type: \"boolean\" } });\n const form = createForm(schema);\n\n form.setData(jsonSchemaValueToFormData(schema, {}));\n\n expect(formDataToJsonSchemaValue(schema, form.getData())).toEqual({ enabled: false });\n });\n\n it(\"maps a boolean to a switch\", () => {\n const form = createForm(objectSchema({ enabled: { type: \"boolean\" } }));\n\n expect(form.field(\"enabled\").vm.type).toBe(\"boolean\");\n expect(form.field(\"enabled\").vm.renderer).toBe(\"switch\");\n });\n\n it(\"maps an object to an object field with the nested fields\", () => {\n const form = createForm(\n objectSchema({\n auth: objectSchema({ user: { type: \"string\" }, retries: { type: \"integer\" } })\n })\n );\n const auth = form.field(\"auth\");\n\n expect(auth.vm.type).toBe(\"object\");\n auth.setValue({ user: \"ana\", retries: 2 });\n expect(form.getData()).toEqual({ auth: { user: \"ana\", retries: 2 } });\n });\n\n it(\"maps an array of strings to a tags list\", () => {\n const form = createForm(\n objectSchema({ labels: { type: \"array\", items: { type: \"string\" } } })\n );\n\n const vm = form.field(\"labels\").vm;\n\n expect(vm.isList).toBe(true);\n expect(vm.renderer).toBe(\"tags\");\n expect(vm.value).toEqual([]);\n });\n\n it(\"maps an array of objects to an object list\", () => {\n const form = createForm(\n objectSchema({\n headers: {\n type: \"array\",\n items: objectSchema({ name: { type: \"string\" }, value: { type: \"string\" } })\n }\n })\n );\n\n form.field(\"headers\").setValue([{ name: \"X-Id\", value: \"1\" }]);\n\n expect(form.field(\"headers\").vm.isList).toBe(true);\n expect(form.getData()).toEqual({ headers: [{ name: \"X-Id\", value: \"1\" }] });\n });\n });\n\n describe(\"required\", () => {\n it(\"marks the properties in `required` and uses the label in the message\", async () => {\n const form = createForm(\n objectSchema({ url: { type: \"string\", title: \"URL\" }, note: { type: \"string\" } }, [\n \"url\"\n ])\n );\n\n expect(form.field(\"url\").vm.required).toBe(true);\n expect(form.field(\"note\").vm.required).toBe(false);\n expect(await form.field(\"url\").validate({ force: true })).toBe(false);\n expect(form.field(\"url\").vm.validation.message).toBe(\"URL is required.\");\n });\n\n it(\"does not require a property that has a default\", () => {\n const form = createForm(\n objectSchema({ method: { type: \"string\", default: \"POST\" } }, [\"method\"])\n );\n\n expect(form.field(\"method\").vm.required).toBe(false);\n });\n\n it(\"requires a number, a list and an enum\", () => {\n const form = createForm(\n objectSchema(\n {\n timeout: { type: \"number\" },\n labels: { type: \"array\", items: { type: \"string\" } },\n method: { type: \"string\", enum: [\"GET\", \"POST\"] }\n },\n [\"timeout\", \"labels\", \"method\"]\n )\n );\n\n expect(form.field(\"timeout\").vm.required).toBe(true);\n expect(form.field(\"labels\").vm.required).toBe(true);\n expect(form.field(\"method\").vm.required).toBe(true);\n });\n\n it(\"does not mark a switch or a nested object required\", () => {\n const form = createForm(\n objectSchema(\n {\n enabled: { type: \"boolean\" },\n auth: objectSchema({ user: { type: \"string\" } })\n },\n [\"enabled\", \"auth\"]\n )\n );\n\n expect(form.field(\"enabled\").vm.required).toBe(false);\n expect(form.field(\"auth\").vm.required).toBe(false);\n });\n\n it(\"marks the required properties of a nested object\", () => {\n const form = createForm(\n objectSchema({ auth: objectSchema({ user: { type: \"string\" } }, [\"user\"]) })\n );\n\n expect(form.field(\"auth\").vm.type).toBe(\"object\");\n expect(form.field(\"auth.user\").vm.required).toBe(true);\n });\n });\n\n describe(\"JSON fallback\", () => {\n it(\"renders a schema of no supported shape as a JSON text field\", () => {\n const form = createForm(objectSchema({ payload: { title: \"Extra payload\" } }));\n\n const vm = form.field(\"payload\").vm;\n\n expect(vm.type).toBe(\"text\");\n expect(vm.renderer).toBe(\"codeEditor\");\n expect(vm.rendererSettings).toEqual({ language: \"json\" });\n expect(vm.label).toBe(\"Extra payload\");\n });\n\n it(\"accepts JSON text and rejects text that does not parse\", async () => {\n const form = createForm(objectSchema({ payload: {} }));\n const field = form.field(\"payload\");\n\n field.setValue('{\"a\": 1}');\n expect(await field.validate({ force: true })).toBe(true);\n\n field.setValue(\"{a: 1\");\n expect(await field.validate({ force: true })).toBe(false);\n expect(field.vm.validation.message).toBe(\"Enter valid JSON.\");\n });\n\n it(\"accepts blank text for an optional JSON field\", async () => {\n const form = createForm(objectSchema({ payload: {} }));\n const field = form.field(\"payload\");\n\n field.setValue('{\"a\":1}');\n expect(await field.validate({ force: true })).toBe(true);\n\n field.setValue(\"\");\n expect(await field.validate({ force: true })).toBe(true);\n\n field.setValue(\" \");\n expect(await field.validate({ force: true })).toBe(true);\n });\n\n it(\"requires a JSON field in `required` and names it in the message\", async () => {\n const form = createForm(objectSchema({ payload: {} }, [\"payload\"]));\n const field = form.field(\"payload\");\n\n field.setValue('{\"a\":1}');\n expect(await field.validate({ force: true })).toBe(true);\n\n field.setValue(\"\");\n expect(await field.validate({ force: true })).toBe(false);\n expect(field.vm.validation.message).toBe(\"payload is required.\");\n });\n\n it(\"stringifies a default\", () => {\n const form = createForm(objectSchema({ payload: { default: { a: 1 } } }));\n\n expect(form.field(\"payload\").getValue()).toBe('{\\n \"a\": 1\\n}');\n });\n\n it(\"uses it for a list of numbers and for a type list\", () => {\n const form = createForm(\n objectSchema({\n numbers: { type: \"array\", items: { type: \"number\" } },\n anything: { anyOf: [{ type: \"string\" }, { type: \"null\" }] }\n })\n );\n\n expect(form.field(\"numbers\").vm.renderer).toBe(\"codeEditor\");\n expect(form.field(\"anything\").vm.renderer).toBe(\"codeEditor\");\n });\n });\n\n describe(\"odd schemas\", () => {\n it(\"returns no fields for a schema that is not an object\", () => {\n const form = createForm({ type: \"string\" });\n\n expect(form.getData()).toEqual({});\n });\n\n it(\"returns no fields for an object without properties\", () => {\n const form = createForm({ type: \"object\" });\n\n expect(form.getData()).toEqual({});\n });\n\n it(\"does not crash on a property that is not a schema\", () => {\n const properties = { broken: null, flag: true } as unknown as Record<\n string,\n JsonSchema\n >;\n\n const form = createForm({ type: \"object\", properties });\n\n expect(form.field(\"broken\").vm.renderer).toBe(\"codeEditor\");\n expect(form.field(\"flag\").vm.renderer).toBe(\"codeEditor\");\n });\n\n it(\"ignores a `required` that is not a list\", () => {\n const schema = { type: \"object\", properties: { a: { type: \"string\" } }, required: \"a\" };\n\n const form = createForm(schema as unknown as JsonSchema);\n\n expect(form.field(\"a\").vm.required).toBe(false);\n });\n });\n\n describe(\"with the form data conversions\", () => {\n const SCHEMA = objectSchema(\n {\n url: { type: \"string\", title: \"URL\" },\n retries: { type: \"integer\", default: 3 },\n labels: { type: \"array\", items: { type: \"string\" } },\n payload: { title: \"Extra payload\" }\n },\n [\"url\"]\n );\n\n it(\"loads a stored value into the form and reads it back\", () => {\n const form = createForm(SCHEMA);\n const stored = { url: \"https://a.test\", labels: [\"x\"], payload: { id: 1 } };\n\n form.setData(jsonSchemaValueToFormData(SCHEMA, stored));\n\n expect(form.field(\"payload\").getValue()).toBe('{\\n \"id\": 1\\n}');\n expect(formDataToJsonSchemaValue(SCHEMA, form.getData())).toEqual({\n url: \"https://a.test\",\n retries: 3,\n labels: [\"x\"],\n payload: { id: 1 }\n });\n });\n });\n});\n"],"names":["OPTIONS","createForm","schema","options","container","Container","IdentityContextFeature","FormModelFeature","FormModelFactory","registry","buildFieldsFromJsonSchema","objectSchema","properties","required","describe","it","form","vm","expect","field","jsonSchemaValueToFormData","formDataToJsonSchemaValue","auth","SCHEMA","stored"],"mappings":";;;;;;;;AAcA,MAAMA,UAAkC;IAAE,aAAa;QAAE,MAAM;IAAW;AAAE;AAE5E,MAAMC,aAAa,CAACC,QAAoBC,UAAkCH,OAAO;IAC7E,MAAMI,YAAY,IAAIC;IACtBC,uBAAuB,QAAQ,CAACF;IAChCG,iBAAiB,QAAQ,CAACH;IAC1B,OAAOA,UAAU,OAAO,CAACI,kBAAkB,MAAM,CAAC;QAC9C,QAAQC,CAAAA,WAAYC,0BAA0BR,QAAQO,UAAUN;IACpE;AACJ;AAEA,MAAMQ,eAAe,CAACC,YAAwCC;IAC1D,MAAMX,SAAqB;QAAE,MAAM;QAAUU;IAAW;IACxD,IAAIC,UACAX,OAAO,QAAQ,GAAGW;IAEtB,OAAOX;AACX;AAEAY,SAAS,6BAA6B;IAClCA,SAAS,WAAW;QAChBC,GAAG,qFAAqF;YACpF,MAAMC,OAAOf,WACTU,aAAa;gBACT,KAAK;oBAAE,MAAM;oBAAU,OAAO;oBAAO,aAAa;gBAAiB;YACvE;YAGJ,MAAMM,KAAKD,KAAK,KAAK,CAAC,OAAO,EAAE;YAE/BE,OAAOD,GAAG,IAAI,EAAE,IAAI,CAAC;YACrBC,OAAOD,GAAG,QAAQ,EAAE,IAAI,CAAC;YACzBC,OAAOD,GAAG,KAAK,EAAE,IAAI,CAAC;YACtBC,OAAOD,GAAG,IAAI,EAAE,IAAI,CAAC;QACzB;QAEAF,GAAG,kDAAkD;YACjD,MAAMC,OAAOf,WAAWU,aAAa;gBAAE,YAAY;oBAAE,MAAM;gBAAS;YAAE;YAEtEO,OAAOF,KAAK,KAAK,CAAC,cAAc,EAAE,CA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AQC;YAE/CN,OAAOF,KAAK,KAAK,CAAC,WAAW,QAAQ,IAAI,IAAI,CAAC;YAC9CE,OAAOG,0BAA0BE,QAAQP,KAAK,OAAO,KAAK,OAAO,CAAC;gBAC9D,KAAK;gBACL,SAAS;gBACT,QAAQ;oBAAC;iBAAI;gBACb,SAAS;oBAAE,IAAI;gBAAE;YACrB;QACJ;IACJ;AACJ"}
@@ -0,0 +1,3 @@
1
+ import type { JsonSchema } from "./JsonSchema.js";
2
+ import type { JsonSchemaValidator } from "./JsonSchemaValidator.js";
3
+ export declare const createJsonSchemaValidator: (schema: JsonSchema) => JsonSchemaValidator;
@@ -0,0 +1,40 @@
1
+ import { z } from "zod";
2
+ const buildValid = ()=>({
3
+ valid: true,
4
+ issues: []
5
+ });
6
+ const buildZodSchema = (schema)=>{
7
+ try {
8
+ return z.fromJSONSchema(schema);
9
+ } catch {
10
+ return null;
11
+ }
12
+ };
13
+ const createJsonSchemaValidator = (schema)=>{
14
+ const zodSchema = buildZodSchema(schema);
15
+ return {
16
+ validate (value) {
17
+ if (!zodSchema) return buildValid();
18
+ try {
19
+ const result = zodSchema.safeParse(value);
20
+ if (result.success) return buildValid();
21
+ const issues = result.error.issues.map((issue)=>{
22
+ const path = issue.path.map(String).join(".");
23
+ return {
24
+ path,
25
+ message: issue.message
26
+ };
27
+ });
28
+ return {
29
+ valid: false,
30
+ issues
31
+ };
32
+ } catch {
33
+ return buildValid();
34
+ }
35
+ }
36
+ };
37
+ };
38
+ export { createJsonSchemaValidator };
39
+
40
+ //# sourceMappingURL=createJsonSchemaValidator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"features/formModel/jsonSchema/createJsonSchemaValidator.js","sources":["../../../../src/features/formModel/jsonSchema/createJsonSchemaValidator.ts"],"sourcesContent":["import { z } from \"zod\";\nimport type { JsonSchema } from \"./JsonSchema.js\";\nimport type { JsonSchemaValidationResult } from \"./JsonSchemaValidationResult.js\";\nimport type { JsonSchemaValidator } from \"./JsonSchemaValidator.js\";\n\nconst buildValid = (): JsonSchemaValidationResult => {\n return { valid: true, issues: [] };\n};\n\nconst buildZodSchema = (schema: JsonSchema): z.ZodType | null => {\n try {\n return z.fromJSONSchema(schema);\n } catch {\n // `z.fromJSONSchema` throws for a schema it cannot build (an unknown type, a missing $ref).\n return null;\n }\n};\n\n/*\n * Rebuilds the schema's validator with `z.fromJSONSchema` (R271). It never throws: a schema zod\n * cannot build gives a validator that reports every value as valid. An issue's `path` is the\n * dot-joined zod path (empty for the value itself), like the server's settings issues.\n */\nexport const createJsonSchemaValidator = (schema: JsonSchema): JsonSchemaValidator => {\n const zodSchema = buildZodSchema(schema);\n\n return {\n validate(value: unknown): JsonSchemaValidationResult {\n if (!zodSchema) {\n return buildValid();\n }\n try {\n const result = zodSchema.safeParse(value);\n if (result.success) {\n return buildValid();\n }\n const issues = result.error.issues.map(issue => {\n const path = issue.path.map(String).join(\".\");\n return { path, message: issue.message };\n });\n return { valid: false, issues };\n } catch {\n return buildValid();\n }\n }\n };\n};\n"],"names":["buildValid","buildZodSchema","schema","z","createJsonSchemaValidator","zodSchema","value","result","issues","issue","path","String"],"mappings":";AAKA,MAAMA,aAAa,IACR;QAAE,OAAO;QAAM,QAAQ,EAAE;IAAC;AAGrC,MAAMC,iBAAiB,CAACC;IACpB,IAAI;QACA,OAAOC,EAAE,cAAc,CAACD;IAC5B,EAAE,OAAM;QAEJ,OAAO;IACX;AACJ;AAOO,MAAME,4BAA4B,CAACF;IACtC,MAAMG,YAAYJ,eAAeC;IAEjC,OAAO;QACH,UAASI,KAAc;YACnB,IAAI,CAACD,WACD,OAAOL;YAEX,IAAI;gBACA,MAAMO,SAASF,UAAU,SAAS,CAACC;gBACnC,IAAIC,OAAO,OAAO,EACd,OAAOP;gBAEX,MAAMQ,SAASD,OAAO,KAAK,CAAC,MAAM,CAAC,GAAG,CAACE,CAAAA;oBACnC,MAAMC,OAAOD,MAAM,IAAI,CAAC,GAAG,CAACE,QAAQ,IAAI,CAAC;oBACzC,OAAO;wBAAED;wBAAM,SAASD,MAAM,OAAO;oBAAC;gBAC1C;gBACA,OAAO;oBAAE,OAAO;oBAAOD;gBAAO;YAClC,EAAE,OAAM;gBACJ,OAAOR;YACX;QACJ;IACJ;AACJ"}
@@ -0,0 +1,141 @@
1
+ import { describe, expect, it } from "vitest";
2
+ import { createJsonSchemaValidator } from "./createJsonSchemaValidator.js";
3
+ const SCHEMA = {
4
+ type: "object",
5
+ required: [
6
+ "url"
7
+ ],
8
+ properties: {
9
+ url: {
10
+ type: "string"
11
+ },
12
+ timeout: {
13
+ type: "integer",
14
+ minimum: 1,
15
+ maximum: 120
16
+ },
17
+ headers: {
18
+ type: "array",
19
+ items: {
20
+ type: "object",
21
+ required: [
22
+ "name"
23
+ ],
24
+ properties: {
25
+ name: {
26
+ type: "string"
27
+ }
28
+ }
29
+ }
30
+ }
31
+ }
32
+ };
33
+ describe("createJsonSchemaValidator", ()=>{
34
+ it("reports a valid value with no issues", ()=>{
35
+ const validator = createJsonSchemaValidator(SCHEMA);
36
+ expect(validator.validate({
37
+ url: "https://a.test",
38
+ timeout: 30
39
+ })).toEqual({
40
+ valid: true,
41
+ issues: []
42
+ });
43
+ });
44
+ it("reports each issue with its dot-joined path", ()=>{
45
+ const validator = createJsonSchemaValidator(SCHEMA);
46
+ const result = validator.validate({
47
+ timeout: 500,
48
+ headers: [
49
+ {}
50
+ ]
51
+ });
52
+ expect(result.valid).toBe(false);
53
+ const paths = result.issues.map((issue)=>issue.path).sort();
54
+ expect(paths).toEqual([
55
+ "headers.0.name",
56
+ "timeout",
57
+ "url"
58
+ ]);
59
+ const timeout = result.issues.find((issue)=>"timeout" === issue.path);
60
+ expect(timeout?.message).toBe("Too big: expected number to be <=120");
61
+ });
62
+ it("gives an issue about the value itself an empty path", ()=>{
63
+ const validator = createJsonSchemaValidator(SCHEMA);
64
+ const result = validator.validate("text");
65
+ expect(result.valid).toBe(false);
66
+ expect(result.issues[0].path).toBe("");
67
+ });
68
+ it("applies the defaults of the schema", ()=>{
69
+ const schema = {
70
+ type: "object",
71
+ required: [
72
+ "method"
73
+ ],
74
+ properties: {
75
+ method: {
76
+ type: "string",
77
+ default: "POST"
78
+ }
79
+ }
80
+ };
81
+ expect(createJsonSchemaValidator(schema).validate({}).valid).toBe(true);
82
+ });
83
+ it("reports every value as valid for a schema zod cannot build", ()=>{
84
+ const schemas = [
85
+ {
86
+ type: "weird"
87
+ },
88
+ {
89
+ type: "object",
90
+ properties: {
91
+ a: {
92
+ $ref: "#/definitions/missing"
93
+ }
94
+ }
95
+ },
96
+ null,
97
+ "text"
98
+ ];
99
+ for (const schema of schemas){
100
+ const validator = createJsonSchemaValidator(schema);
101
+ expect(validator.validate({
102
+ anything: 1
103
+ })).toEqual({
104
+ valid: true,
105
+ issues: []
106
+ });
107
+ expect(validator.validate(void 0)).toEqual({
108
+ valid: true,
109
+ issues: []
110
+ });
111
+ }
112
+ });
113
+ it("does not throw for a value zod cannot handle", ()=>{
114
+ const validator = createJsonSchemaValidator(SCHEMA);
115
+ const circular = {};
116
+ circular.self = circular;
117
+ expect(()=>validator.validate(circular)).not.toThrow();
118
+ expect(()=>validator.validate(void 0)).not.toThrow();
119
+ expect(()=>validator.validate(BigInt(1))).not.toThrow();
120
+ });
121
+ it("returns a fresh valid result on each call", ()=>{
122
+ const validator = createJsonSchemaValidator(SCHEMA);
123
+ const first = validator.validate({
124
+ url: "https://a.test"
125
+ });
126
+ const second = validator.validate({
127
+ url: "https://a.test"
128
+ });
129
+ first.issues.push({
130
+ path: "url",
131
+ message: "mutated"
132
+ });
133
+ expect(first).not.toBe(second);
134
+ expect(second).toEqual({
135
+ valid: true,
136
+ issues: []
137
+ });
138
+ });
139
+ });
140
+
141
+ //# sourceMappingURL=createJsonSchemaValidator.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"features/formModel/jsonSchema/createJsonSchemaValidator.test.js","sources":["../../../../src/features/formModel/jsonSchema/createJsonSchemaValidator.test.ts"],"sourcesContent":["import { describe } from \"vitest\";\nimport { expect } from \"vitest\";\nimport { it } from \"vitest\";\nimport type { JsonSchema } from \"./JsonSchema.js\";\nimport { createJsonSchemaValidator } from \"./createJsonSchemaValidator.js\";\n\nconst SCHEMA: JsonSchema = {\n type: \"object\",\n required: [\"url\"],\n properties: {\n url: { type: \"string\" },\n timeout: { type: \"integer\", minimum: 1, maximum: 120 },\n headers: {\n type: \"array\",\n items: {\n type: \"object\",\n required: [\"name\"],\n properties: { name: { type: \"string\" } }\n }\n }\n }\n};\n\ndescribe(\"createJsonSchemaValidator\", () => {\n it(\"reports a valid value with no issues\", () => {\n const validator = createJsonSchemaValidator(SCHEMA);\n\n expect(validator.validate({ url: \"https://a.test\", timeout: 30 })).toEqual({\n valid: true,\n issues: []\n });\n });\n\n it(\"reports each issue with its dot-joined path\", () => {\n const validator = createJsonSchemaValidator(SCHEMA);\n\n const result = validator.validate({ timeout: 500, headers: [{}] });\n\n expect(result.valid).toBe(false);\n const paths = result.issues.map(issue => issue.path).sort();\n expect(paths).toEqual([\"headers.0.name\", \"timeout\", \"url\"]);\n const timeout = result.issues.find(issue => issue.path === \"timeout\");\n expect(timeout?.message).toBe(\"Too big: expected number to be <=120\");\n });\n\n it(\"gives an issue about the value itself an empty path\", () => {\n const validator = createJsonSchemaValidator(SCHEMA);\n\n const result = validator.validate(\"text\");\n\n expect(result.valid).toBe(false);\n expect(result.issues[0].path).toBe(\"\");\n });\n\n it(\"applies the defaults of the schema\", () => {\n const schema: JsonSchema = {\n type: \"object\",\n required: [\"method\"],\n properties: { method: { type: \"string\", default: \"POST\" } }\n };\n\n expect(createJsonSchemaValidator(schema).validate({}).valid).toBe(true);\n });\n\n it(\"reports every value as valid for a schema zod cannot build\", () => {\n const schemas = [\n { type: \"weird\" },\n { type: \"object\", properties: { a: { $ref: \"#/definitions/missing\" } } },\n null,\n \"text\"\n ] as unknown as JsonSchema[];\n\n for (const schema of schemas) {\n const validator = createJsonSchemaValidator(schema);\n\n expect(validator.validate({ anything: 1 })).toEqual({ valid: true, issues: [] });\n expect(validator.validate(undefined)).toEqual({ valid: true, issues: [] });\n }\n });\n\n it(\"does not throw for a value zod cannot handle\", () => {\n const validator = createJsonSchemaValidator(SCHEMA);\n const circular: Record<string, unknown> = {};\n circular.self = circular;\n\n expect(() => validator.validate(circular)).not.toThrow();\n expect(() => validator.validate(undefined)).not.toThrow();\n expect(() => validator.validate(BigInt(1))).not.toThrow();\n });\n\n it(\"returns a fresh valid result on each call\", () => {\n const validator = createJsonSchemaValidator(SCHEMA);\n\n const first = validator.validate({ url: \"https://a.test\" });\n const second = validator.validate({ url: \"https://a.test\" });\n first.issues.push({ path: \"url\", message: \"mutated\" });\n\n expect(first).not.toBe(second);\n expect(second).toEqual({ valid: true, issues: [] });\n });\n});\n"],"names":["SCHEMA","describe","it","validator","createJsonSchemaValidator","expect","result","paths","issue","timeout","schema","schemas","undefined","circular","BigInt","first","second"],"mappings":";;AAMA,MAAMA,SAAqB;IACvB,MAAM;IACN,UAAU;QAAC;KAAM;IACjB,YAAY;QACR,KAAK;YAAE,MAAM;QAAS;QACtB,SAAS;YAAE,MAAM;YAAW,SAAS;YAAG,SAAS;QAAI;QACrD,SAAS;YACL,MAAM;YACN,OAAO;gBACH,MAAM;gBACN,UAAU;oBAAC;iBAAO;gBAClB,YAAY;oBAAE,MAAM;wBAAE,MAAM;oBAAS;gBAAE;YAC3C;QACJ;IACJ;AACJ;AAEAC,SAAS,6BAA6B;IAClCC,GAAG,wCAAwC;QACvC,MAAMC,YAAYC,0BAA0BJ;QAE5CK,OAAOF,UAAU,QAAQ,CAAC;YAAE,KAAK;YAAkB,SAAS;QAAG,IAAI,OAAO,CAAC;YACvE,OAAO;YACP,QAAQ,EAAE;QACd;IACJ;IAEAD,GAAG,+CAA+C;QAC9C,MAAMC,YAAYC,0BAA0BJ;QAE5C,MAAMM,SAASH,UAAU,QAAQ,CAAC;YAAE,SAAS;YAAK,SAAS;gBAAC,CAAC;aAAE;QAAC;QAEhEE,OAAO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;QAC/C,MAAMC,YAAYC,0BAA0BJ;QAC5C,MAAMa,WAAoC,CAAC;QAC3CA,SAAS,IAAI,GAAGA;QAEhBR,OAAO,IAAMF,UAAU,QAAQ,CAACU,WAAW,GAAG,CAAC,OAAO;QACtDR,OAAO,IAAMF,UAAU,QAAQ,CAACS,SAAY,GAAG,CAAC,OAAO;QACvDP,OAAO,IAAMF,UAAU,QAAQ,CAACW,OAAO,KAAK,GAAG,CAAC,OAAO;IAC3D;IAEAZ,GAAG,6CAA6C;QAC5C,MAAMC,YAAYC,0BAA0BJ;QAE5C,MAAMe,QAAQZ,UAAU,QAAQ,CAAC;YAAE,KAAK;QAAiB;QACzD,MAAMa,SAASb,UAAU,QAAQ,CAAC;YAAE,KAAK;QAAiB;QAC1DY,MAAM,MAAM,CAAC,IAAI,CAAC;YAAE,MAAM;YAAO,SAAS;QAAU;QAEpDV,OAAOU,OAAO,GAAG,CAAC,IAAI,CAACC;QACvBX,OAAOW,QAAQ,OAAO,CAAC;YAAE,OAAO;YAAM,QAAQ,EAAE;QAAC;IACrD;AACJ"}
@@ -0,0 +1,3 @@
1
+ import type { JsonSchema } from "./JsonSchema.js";
2
+ import type { PlainObject } from "./PlainObject.js";
3
+ export declare const formDataToJsonSchemaValue: (schema: JsonSchema, data: unknown) => PlainObject;
@@ -0,0 +1,52 @@
1
+ import { getJsonSchemaKind } from "./getJsonSchemaKind.js";
2
+ import { normalizeJsonSchema } from "./normalizeJsonSchema.js";
3
+ import { isPlainObject } from "./isPlainObject.js";
4
+ const parseJsonText = (text)=>{
5
+ try {
6
+ return JSON.parse(text);
7
+ } catch {
8
+ return text;
9
+ }
10
+ };
11
+ const isEmptyScalar = (value)=>null == value || "" === value;
12
+ const toSchemaValue = (schema, data, isRequired)=>{
13
+ const kind = getJsonSchemaKind(schema);
14
+ if ("object" === kind) {
15
+ const nested = formDataToJsonSchemaValue(schema, data);
16
+ return Object.keys(nested).length > 0 || isRequired ? nested : void 0;
17
+ }
18
+ if ("objectList" === kind) {
19
+ const items = Array.isArray(data) ? data : [];
20
+ const itemSchema = normalizeJsonSchema(schema.items);
21
+ const values = items.map((item)=>formDataToJsonSchemaValue(itemSchema, item));
22
+ return values.length > 0 || isRequired ? values : void 0;
23
+ }
24
+ if ("stringList" === kind) {
25
+ const items = Array.isArray(data) ? data : [];
26
+ return items.length > 0 || isRequired ? items : void 0;
27
+ }
28
+ if ("string" === kind && "" === data && void 0 !== schema.default) return "";
29
+ if (isEmptyScalar(data)) return;
30
+ if ("json" === kind) {
31
+ const text = String(data);
32
+ return "" === text.trim() ? void 0 : parseJsonText(text);
33
+ }
34
+ return data;
35
+ };
36
+ const formDataToJsonSchemaValue = (schema, data)=>{
37
+ const value = {};
38
+ if ("object" !== getJsonSchemaKind(schema)) return value;
39
+ const source = isPlainObject(data) ? data : {};
40
+ const requiredNames = Array.isArray(schema.required) ? schema.required : [];
41
+ const properties = schema.properties ?? {};
42
+ for (const [name, property] of Object.entries(properties)){
43
+ const isRequired = requiredNames.includes(name);
44
+ const propertySchema = normalizeJsonSchema(property);
45
+ const propertyValue = toSchemaValue(propertySchema, source[name], isRequired);
46
+ if (void 0 !== propertyValue) value[name] = propertyValue;
47
+ }
48
+ return value;
49
+ };
50
+ export { formDataToJsonSchemaValue };
51
+
52
+ //# sourceMappingURL=formDataToJsonSchemaValue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"features/formModel/jsonSchema/formDataToJsonSchemaValue.js","sources":["../../../../src/features/formModel/jsonSchema/formDataToJsonSchemaValue.ts"],"sourcesContent":["import type { JsonSchema } from \"./JsonSchema.js\";\nimport { getJsonSchemaKind } from \"./getJsonSchemaKind.js\";\nimport { normalizeJsonSchema } from \"./normalizeJsonSchema.js\";\nimport { isPlainObject } from \"./isPlainObject.js\";\nimport type { PlainObject } from \"./PlainObject.js\";\n\nconst parseJsonText = (text: string): unknown => {\n try {\n return JSON.parse(text);\n } catch {\n // The text stays as typed; the field's own check reports it before a save.\n return text;\n }\n};\n\nconst isEmptyScalar = (value: unknown): boolean => {\n return value === null || value === undefined || value === \"\";\n};\n\n/*\n * The value of one property, or `undefined` to leave the key out. An empty scalar is left out,\n * except a cleared string with a default; an empty list or object is left out too unless the\n * property is required.\n */\nconst toSchemaValue = (schema: JsonSchema, data: unknown, isRequired: boolean): unknown => {\n const kind = getJsonSchemaKind(schema);\n\n if (kind === \"object\") {\n const nested = formDataToJsonSchemaValue(schema, data);\n return Object.keys(nested).length > 0 || isRequired ? nested : undefined;\n }\n if (kind === \"objectList\") {\n const items = Array.isArray(data) ? data : [];\n const itemSchema = normalizeJsonSchema(schema.items);\n const values = items.map(item => formDataToJsonSchemaValue(itemSchema, item));\n return values.length > 0 || isRequired ? values : undefined;\n }\n if (kind === \"stringList\") {\n const items = Array.isArray(data) ? data : [];\n return items.length > 0 || isRequired ? items : undefined;\n }\n // A cleared string with a default is kept: left out, the default would come back on reload.\n if (kind === \"string\" && data === \"\" && schema.default !== undefined) {\n return \"\";\n }\n if (isEmptyScalar(data)) {\n return undefined;\n }\n if (kind === \"json\") {\n const text = String(data);\n return text.trim() === \"\" ? undefined : parseJsonText(text);\n }\n return data;\n};\n\n/*\n * Converts form data back into the stored value (R271): empty fields are left out, a JSON text\n * field is parsed (text that does not parse is kept as typed), a nested object and each list item\n * convert the same way. The inverse of `jsonSchemaValueToFormData`.\n */\nexport const formDataToJsonSchemaValue = (schema: JsonSchema, data: unknown): PlainObject => {\n const value: PlainObject = {};\n if (getJsonSchemaKind(schema) !== \"object\") {\n return value;\n }\n\n const source: PlainObject = isPlainObject(data) ? data : {};\n const requiredNames = Array.isArray(schema.required) ? schema.required : [];\n const properties = schema.properties ?? {};\n\n for (const [name, property] of Object.entries(properties)) {\n const isRequired = requiredNames.includes(name);\n const propertySchema = normalizeJsonSchema(property);\n const propertyValue = toSchemaValue(propertySchema, source[name], isRequired);\n if (propertyValue !== undefined) {\n value[name] = propertyValue;\n }\n }\n\n return value;\n};\n"],"names":["parseJsonText","text","JSON","isEmptyScalar","value","toSchemaValue","schema","data","isRequired","kind","getJsonSchemaKind","nested","formDataToJsonSchemaValue","Object","undefined","items","Array","itemSchema","normalizeJsonSchema","values","item","String","source","isPlainObject","requiredNames","properties","name","property","propertySchema","propertyValue"],"mappings":";;;AAMA,MAAMA,gBAAgB,CAACC;IACnB,IAAI;QACA,OAAOC,KAAK,KAAK,CAACD;IACtB,EAAE,OAAM;QAEJ,OAAOA;IACX;AACJ;AAEA,MAAME,gBAAgB,CAACC,QACZA,QAAAA,SAAyCA,AAAU,OAAVA;AAQpD,MAAMC,gBAAgB,CAACC,QAAoBC,MAAeC;IACtD,MAAMC,OAAOC,kBAAkBJ;IAE/B,IAAIG,AAAS,aAATA,MAAmB;QACnB,MAAME,SAASC,0BAA0BN,QAAQC;QACjD,OAAOM,OAAO,IAAI,CAACF,QAAQ,MAAM,GAAG,KAAKH,aAAaG,SAASG;IACnE;IACA,IAAIL,AAAS,iBAATA,MAAuB;QACvB,MAAMM,QAAQC,MAAM,OAAO,CAACT,QAAQA,OAAO,EAAE;QAC7C,MAAMU,aAAaC,oBAAoBZ,OAAO,KAAK;QACnD,MAAMa,SAASJ,MAAM,GAAG,CAACK,CAAAA,OAAQR,0BAA0BK,YAAYG;QACvE,OAAOD,OAAO,MAAM,GAAG,KAAKX,aAAaW,SAASL;IACtD;IACA,IAAIL,AAAS,iBAATA,MAAuB;QACvB,MAAMM,QAAQC,MAAM,OAAO,CAACT,QAAQA,OAAO,EAAE;QAC7C,OAAOQ,MAAM,MAAM,GAAG,KAAKP,aAAaO,QAAQD;IACpD;IAEA,IAAIL,AAAS,aAATA,QAAqBF,AAAS,OAATA,QAAeD,AAAmBQ,WAAnBR,OAAO,OAAO,EAClD,OAAO;IAEX,IAAIH,cAAcI,OACd;IAEJ,IAAIE,AAAS,WAATA,MAAiB;QACjB,MAAMR,OAAOoB,OAAOd;QACpB,OAAON,AAAgB,OAAhBA,KAAK,IAAI,KAAYa,SAAYd,cAAcC;IAC1D;IACA,OAAOM;AACX;AAOO,MAAMK,4BAA4B,CAACN,QAAoBC;IAC1D,MAAMH,QAAqB,CAAC;IAC5B,IAAIM,AAA8B,aAA9BA,kBAAkBJ,SAClB,OAAOF;IAGX,MAAMkB,SAAsBC,cAAchB,QAAQA,OAAO,CAAC;IAC1D,MAAMiB,gBAAgBR,MAAM,OAAO,CAACV,OAAO,QAAQ,IAAIA,OAAO,QAAQ,GAAG,EAAE;IAC3E,MAAMmB,aAAanB,OAAO,UAAU,IAAI,CAAC;IAEzC,KAAK,MAAM,CAACoB,MAAMC,SAAS,IAAId,OAAO,OAAO,CAACY,YAAa;QACvD,MAAMjB,aAAagB,cAAc,QAAQ,CAACE;QAC1C,MAAME,iBAAiBV,oBAAoBS;QAC3C,MAAME,gBAAgBxB,cAAcuB,gBAAgBN,MAAM,CAACI,KAAK,EAAElB;QAClE,IAAIqB,AAAkBf,WAAlBe,eACAzB,KAAK,CAACsB,KAAK,GAAGG;IAEtB;IAEA,OAAOzB;AACX"}
@@ -0,0 +1,250 @@
1
+ import { describe, expect, it } from "vitest";
2
+ import { formDataToJsonSchemaValue } from "./formDataToJsonSchemaValue.js";
3
+ import { jsonSchemaValueToFormData } from "./jsonSchemaValueToFormData.js";
4
+ const SCHEMA = {
5
+ type: "object",
6
+ required: [
7
+ "url",
8
+ "labels",
9
+ "auth"
10
+ ],
11
+ properties: {
12
+ url: {
13
+ type: "string"
14
+ },
15
+ note: {
16
+ type: "string"
17
+ },
18
+ timeout: {
19
+ type: "integer"
20
+ },
21
+ enabled: {
22
+ type: "boolean"
23
+ },
24
+ labels: {
25
+ type: "array",
26
+ items: {
27
+ type: "string"
28
+ }
29
+ },
30
+ tags: {
31
+ type: "array",
32
+ items: {
33
+ type: "string"
34
+ }
35
+ },
36
+ auth: {
37
+ type: "object",
38
+ properties: {
39
+ user: {
40
+ type: "string"
41
+ }
42
+ }
43
+ },
44
+ extra: {
45
+ type: "object",
46
+ properties: {
47
+ user: {
48
+ type: "string"
49
+ }
50
+ }
51
+ },
52
+ headers: {
53
+ type: "array",
54
+ items: {
55
+ type: "object",
56
+ properties: {
57
+ name: {
58
+ type: "string"
59
+ }
60
+ }
61
+ }
62
+ },
63
+ payload: {}
64
+ }
65
+ };
66
+ describe("formDataToJsonSchemaValue", ()=>{
67
+ it("leaves out empty scalars and optional empty lists and objects", ()=>{
68
+ const data = {
69
+ url: "",
70
+ note: null,
71
+ timeout: null,
72
+ enabled: null,
73
+ labels: [],
74
+ tags: [],
75
+ auth: {
76
+ user: null
77
+ },
78
+ extra: {
79
+ user: null
80
+ },
81
+ headers: [],
82
+ payload: null
83
+ };
84
+ expect(formDataToJsonSchemaValue(SCHEMA, data)).toEqual({
85
+ labels: [],
86
+ auth: {}
87
+ });
88
+ });
89
+ it("keeps a required empty list and a required empty object", ()=>{
90
+ const value = formDataToJsonSchemaValue(SCHEMA, {
91
+ labels: [],
92
+ auth: {}
93
+ });
94
+ expect(value).toEqual({
95
+ labels: [],
96
+ auth: {}
97
+ });
98
+ });
99
+ it("keeps values, including zero and false", ()=>{
100
+ const data = {
101
+ url: "https://a.test",
102
+ timeout: 0,
103
+ enabled: false,
104
+ labels: [
105
+ "a"
106
+ ],
107
+ tags: [
108
+ "t"
109
+ ],
110
+ auth: {
111
+ user: "ana"
112
+ },
113
+ extra: {
114
+ user: "bo"
115
+ },
116
+ headers: [
117
+ {
118
+ name: "X-Id"
119
+ },
120
+ {
121
+ name: ""
122
+ }
123
+ ]
124
+ };
125
+ expect(formDataToJsonSchemaValue(SCHEMA, data)).toEqual({
126
+ url: "https://a.test",
127
+ timeout: 0,
128
+ enabled: false,
129
+ labels: [
130
+ "a"
131
+ ],
132
+ tags: [
133
+ "t"
134
+ ],
135
+ auth: {
136
+ user: "ana"
137
+ },
138
+ extra: {
139
+ user: "bo"
140
+ },
141
+ headers: [
142
+ {
143
+ name: "X-Id"
144
+ },
145
+ {}
146
+ ]
147
+ });
148
+ });
149
+ it("parses the text of a JSON field", ()=>{
150
+ const data = {
151
+ labels: [],
152
+ auth: {},
153
+ payload: '{ "a": [1, 2] }'
154
+ };
155
+ expect(formDataToJsonSchemaValue(SCHEMA, data).payload).toEqual({
156
+ a: [
157
+ 1,
158
+ 2
159
+ ]
160
+ });
161
+ });
162
+ it("parses JSON text that is a string, a number or null", ()=>{
163
+ expect(formDataToJsonSchemaValue(SCHEMA, {
164
+ payload: '"x"'
165
+ }).payload).toBe("x");
166
+ expect(formDataToJsonSchemaValue(SCHEMA, {
167
+ payload: "12"
168
+ }).payload).toBe(12);
169
+ expect(formDataToJsonSchemaValue(SCHEMA, {
170
+ payload: "null"
171
+ }).payload).toBeNull();
172
+ });
173
+ it("keeps JSON text that does not parse as typed", ()=>{
174
+ expect(formDataToJsonSchemaValue(SCHEMA, {
175
+ payload: "{a: 1"
176
+ }).payload).toBe("{a: 1");
177
+ });
178
+ it("leaves out a blank JSON text", ()=>{
179
+ expect(formDataToJsonSchemaValue(SCHEMA, {
180
+ payload: " "
181
+ })).not.toHaveProperty("payload");
182
+ });
183
+ it("treats data that is not an object as empty", ()=>{
184
+ expect(formDataToJsonSchemaValue(SCHEMA, null)).toEqual({
185
+ labels: [],
186
+ auth: {}
187
+ });
188
+ expect(formDataToJsonSchemaValue(SCHEMA, "x")).toEqual({
189
+ labels: [],
190
+ auth: {}
191
+ });
192
+ });
193
+ it("returns no value for a schema that is not an object", ()=>{
194
+ expect(formDataToJsonSchemaValue({
195
+ type: "string"
196
+ }, "x")).toEqual({});
197
+ });
198
+ it("keeps a cleared string that has a default, so the default does not come back", ()=>{
199
+ const schema = {
200
+ type: "object",
201
+ properties: {
202
+ greeting: {
203
+ type: "string",
204
+ default: "Hello"
205
+ },
206
+ note: {
207
+ type: "string"
208
+ }
209
+ }
210
+ };
211
+ const saved = formDataToJsonSchemaValue(schema, {
212
+ greeting: "",
213
+ note: ""
214
+ });
215
+ expect(saved).toEqual({
216
+ greeting: ""
217
+ });
218
+ expect(jsonSchemaValueToFormData(schema, saved)).toMatchObject({
219
+ greeting: ""
220
+ });
221
+ });
222
+ it("is the inverse of jsonSchemaValueToFormData", ()=>{
223
+ const stored = {
224
+ url: "https://a.test",
225
+ timeout: 30,
226
+ enabled: true,
227
+ labels: [
228
+ "a"
229
+ ],
230
+ auth: {
231
+ user: "ana"
232
+ },
233
+ headers: [
234
+ {
235
+ name: "X-Id"
236
+ }
237
+ ],
238
+ payload: {
239
+ id: 1,
240
+ tags: [
241
+ "x"
242
+ ]
243
+ }
244
+ };
245
+ const data = jsonSchemaValueToFormData(SCHEMA, stored);
246
+ expect(formDataToJsonSchemaValue(SCHEMA, data)).toEqual(stored);
247
+ });
248
+ });
249
+
250
+ //# sourceMappingURL=formDataToJsonSchemaValue.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"features/formModel/jsonSchema/formDataToJsonSchemaValue.test.js","sources":["../../../../src/features/formModel/jsonSchema/formDataToJsonSchemaValue.test.ts"],"sourcesContent":["import { describe } from \"vitest\";\nimport { expect } from \"vitest\";\nimport { it } from \"vitest\";\nimport type { JsonSchema } from \"./JsonSchema.js\";\nimport { formDataToJsonSchemaValue } from \"./formDataToJsonSchemaValue.js\";\nimport { jsonSchemaValueToFormData } from \"./jsonSchemaValueToFormData.js\";\n\nconst SCHEMA: JsonSchema = {\n type: \"object\",\n required: [\"url\", \"labels\", \"auth\"],\n properties: {\n url: { type: \"string\" },\n note: { type: \"string\" },\n timeout: { type: \"integer\" },\n enabled: { type: \"boolean\" },\n labels: { type: \"array\", items: { type: \"string\" } },\n tags: { type: \"array\", items: { type: \"string\" } },\n auth: { type: \"object\", properties: { user: { type: \"string\" } } },\n extra: { type: \"object\", properties: { user: { type: \"string\" } } },\n headers: {\n type: \"array\",\n items: { type: \"object\", properties: { name: { type: \"string\" } } }\n },\n payload: {}\n }\n};\n\ndescribe(\"formDataToJsonSchemaValue\", () => {\n it(\"leaves out empty scalars and optional empty lists and objects\", () => {\n const data = {\n url: \"\",\n note: null,\n timeout: null,\n enabled: null,\n labels: [],\n tags: [],\n auth: { user: null },\n extra: { user: null },\n headers: [],\n payload: null\n };\n\n expect(formDataToJsonSchemaValue(SCHEMA, data)).toEqual({ labels: [], auth: {} });\n });\n\n it(\"keeps a required empty list and a required empty object\", () => {\n const value = formDataToJsonSchemaValue(SCHEMA, { labels: [], auth: {} });\n\n expect(value).toEqual({ labels: [], auth: {} });\n });\n\n it(\"keeps values, including zero and false\", () => {\n const data = {\n url: \"https://a.test\",\n timeout: 0,\n enabled: false,\n labels: [\"a\"],\n tags: [\"t\"],\n auth: { user: \"ana\" },\n extra: { user: \"bo\" },\n headers: [{ name: \"X-Id\" }, { name: \"\" }]\n };\n\n expect(formDataToJsonSchemaValue(SCHEMA, data)).toEqual({\n url: \"https://a.test\",\n timeout: 0,\n enabled: false,\n labels: [\"a\"],\n tags: [\"t\"],\n auth: { user: \"ana\" },\n extra: { user: \"bo\" },\n headers: [{ name: \"X-Id\" }, {}]\n });\n });\n\n it(\"parses the text of a JSON field\", () => {\n const data = { labels: [], auth: {}, payload: '{ \"a\": [1, 2] }' };\n\n expect(formDataToJsonSchemaValue(SCHEMA, data).payload).toEqual({ a: [1, 2] });\n });\n\n it(\"parses JSON text that is a string, a number or null\", () => {\n expect(formDataToJsonSchemaValue(SCHEMA, { payload: '\"x\"' }).payload).toBe(\"x\");\n expect(formDataToJsonSchemaValue(SCHEMA, { payload: \"12\" }).payload).toBe(12);\n expect(formDataToJsonSchemaValue(SCHEMA, { payload: \"null\" }).payload).toBeNull();\n });\n\n it(\"keeps JSON text that does not parse as typed\", () => {\n expect(formDataToJsonSchemaValue(SCHEMA, { payload: \"{a: 1\" }).payload).toBe(\"{a: 1\");\n });\n\n it(\"leaves out a blank JSON text\", () => {\n expect(formDataToJsonSchemaValue(SCHEMA, { payload: \" \" })).not.toHaveProperty(\"payload\");\n });\n\n it(\"treats data that is not an object as empty\", () => {\n expect(formDataToJsonSchemaValue(SCHEMA, null)).toEqual({ labels: [], auth: {} });\n expect(formDataToJsonSchemaValue(SCHEMA, \"x\")).toEqual({ labels: [], auth: {} });\n });\n\n it(\"returns no value for a schema that is not an object\", () => {\n expect(formDataToJsonSchemaValue({ type: \"string\" }, \"x\")).toEqual({});\n });\n\n it(\"keeps a cleared string that has a default, so the default does not come back\", () => {\n const schema: JsonSchema = {\n type: \"object\",\n properties: {\n greeting: { type: \"string\", default: \"Hello\" },\n note: { type: \"string\" }\n }\n };\n\n const saved = formDataToJsonSchemaValue(schema, { greeting: \"\", note: \"\" });\n\n expect(saved).toEqual({ greeting: \"\" });\n expect(jsonSchemaValueToFormData(schema, saved)).toMatchObject({ greeting: \"\" });\n });\n\n it(\"is the inverse of jsonSchemaValueToFormData\", () => {\n const stored = {\n url: \"https://a.test\",\n timeout: 30,\n enabled: true,\n labels: [\"a\"],\n auth: { user: \"ana\" },\n headers: [{ name: \"X-Id\" }],\n payload: { id: 1, tags: [\"x\"] }\n };\n\n const data = jsonSchemaValueToFormData(SCHEMA, stored);\n\n expect(formDataToJsonSchemaValue(SCHEMA, data)).toEqual(stored);\n });\n});\n"],"names":["SCHEMA","describe","it","data","expect","formDataToJsonSchemaValue","value","schema","saved","jsonSchemaValueToFormData","stored"],"mappings":";;;AAOA,MAAMA,SAAqB;IACvB,MAAM;IACN,UAAU;QAAC;QAAO;QAAU;KAAO;IACnC,YAAY;QACR,KAAK;YAAE,MAAM;QAAS;QACtB,MAAM;YAAE,MAAM;QAAS;QACvB,SAAS;YAAE,MAAM;QAAU;QAC3B,SAAS;YAAE,MAAM;QAAU;QAC3B,QAAQ;YAAE,MAAM;YAAS,OAAO;gBAAE,MAAM;YAAS;QAAE;QACnD,MAAM;YAAE,MAAM;YAAS,OAAO;gBAAE,MAAM;YAAS;QAAE;QACjD,MAAM;YAAE,MAAM;YAAU,YAAY;gBAAE,MAAM;oBAAE,MAAM;gBAAS;YAAE;QAAE;QACjE,OAAO;YAAE,MAAM;YAAU,YAAY;gBAAE,MAAM;oBAAE,MAAM;gBAAS;YAAE;QAAE;QAClE,SAAS;YACL,MAAM;YACN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AA0BF,QAAQC,QAAQ,aAAa,CAAC;YAAE,UAAU;QAAG;IAClF;IAEAN,GAAG,+CAA+C;QAC9C,MAAMQ,SAAS;YACX,KAAK;YACL,SAAS;YACT,SAAS;YACT,QAAQ;gBAAC;aAAI;YACb,MAAM;gBAAE,MAAM;YAAM;YACpB,SAAS;gBAAC;oBAAE,MAAM;gBAAO;aAAE;YAC3B,SAAS;gBAAE,IAAI;gBAAG,MAAM;oBAAC;iBAAI;YAAC;QAClC;QAEA,MAAMP,OAAOM,0BAA0BT,QAAQU;QAE/CN,OAAOC,0BAA0BL,QAAQG,OAAO,OAAO,CAACO;IAC5D;AACJ"}
@@ -0,0 +1,3 @@
1
+ import type { JsonSchema } from "./JsonSchema.js";
2
+ export type JsonSchemaKind = "string" | "enum" | "number" | "boolean" | "object" | "stringList" | "objectList" | "json";
3
+ export declare const getJsonSchemaKind: (schema: JsonSchema) => JsonSchemaKind;