@intlayer/design-system 3.0.2 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (482) hide show
  1. package/dist/.vite/manifest.json +521 -395
  2. package/dist/Form-2XHQV7F_.cjs +295 -0
  3. package/dist/Form-2XHQV7F_.cjs.map +1 -0
  4. package/dist/Form-BO0i3nT9.js +300 -0
  5. package/dist/Form-BO0i3nT9.js.map +1 -0
  6. package/dist/Form-BaHDK0RZ.cjs +298 -0
  7. package/dist/Form-BaHDK0RZ.cjs.map +1 -0
  8. package/dist/Form-BfZMqK2D.js +300 -0
  9. package/dist/Form-BfZMqK2D.js.map +1 -0
  10. package/dist/Form-C13KWSZs.cjs +299 -0
  11. package/dist/Form-C13KWSZs.cjs.map +1 -0
  12. package/dist/Form-C8K2f8ph.js +300 -0
  13. package/dist/Form-C8K2f8ph.js.map +1 -0
  14. package/dist/Form-CKvCgz8c.cjs +299 -0
  15. package/dist/Form-CKvCgz8c.cjs.map +1 -0
  16. package/dist/Form-Cbk5Lhpd.js +299 -0
  17. package/dist/Form-Cbk5Lhpd.js.map +1 -0
  18. package/dist/Form-CiAgFAPb.cjs +300 -0
  19. package/dist/Form-CiAgFAPb.cjs.map +1 -0
  20. package/dist/Form-CnBKDneQ.js +296 -0
  21. package/dist/Form-CnBKDneQ.js.map +1 -0
  22. package/dist/Form-DERuauvB.cjs +300 -0
  23. package/dist/Form-DERuauvB.cjs.map +1 -0
  24. package/dist/Form-DhlDf3ML.cjs +299 -0
  25. package/dist/Form-DhlDf3ML.cjs.map +1 -0
  26. package/dist/Form-DkAZ0Jdf.cjs +299 -0
  27. package/dist/Form-DkAZ0Jdf.cjs.map +1 -0
  28. package/dist/Form-DqnNP4DA.js +300 -0
  29. package/dist/Form-DqnNP4DA.js.map +1 -0
  30. package/dist/Form-DyFBmVya.js +301 -0
  31. package/dist/Form-DyFBmVya.js.map +1 -0
  32. package/dist/Form-FW4Odjfm.js +301 -0
  33. package/dist/Form-FW4Odjfm.js.map +1 -0
  34. package/dist/components/Accordion/Accordion.d.ts +0 -1
  35. package/dist/components/Auth/AuthModal/index.d.ts +0 -1
  36. package/dist/components/Auth/AuthProvider/index.cjs +5 -21
  37. package/dist/components/Auth/AuthProvider/index.cjs.map +1 -1
  38. package/dist/components/Auth/AuthProvider/index.d.ts +4 -3
  39. package/dist/components/Auth/AuthProvider/index.d.ts.map +1 -1
  40. package/dist/components/Auth/AuthProvider/index.mjs +6 -22
  41. package/dist/components/Auth/AuthProvider/index.mjs.map +1 -1
  42. package/dist/components/Auth/AuthProvider/useSession.cjs +7 -3
  43. package/dist/components/Auth/AuthProvider/useSession.cjs.map +1 -1
  44. package/dist/components/Auth/AuthProvider/useSession.d.ts +0 -1
  45. package/dist/components/Auth/AuthProvider/useSession.d.ts.map +1 -1
  46. package/dist/components/Auth/AuthProvider/useSession.mjs +7 -3
  47. package/dist/components/Auth/AuthProvider/useSession.mjs.map +1 -1
  48. package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierClient.d.ts +0 -1
  49. package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierServer.d.ts +0 -1
  50. package/dist/components/Auth/AuthenticationBarrier/accessValidation.d.ts +0 -1
  51. package/dist/components/Auth/AuthenticationBarrier/index.d.ts +0 -1
  52. package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.cjs +1 -1
  53. package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.d.ts +0 -1
  54. package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.mjs +1 -1
  55. package/dist/components/Auth/ChangePasswordForm/ChangePasswordSchema.cjs.map +1 -1
  56. package/dist/components/Auth/ChangePasswordForm/ChangePasswordSchema.d.ts +0 -1
  57. package/dist/components/Auth/ChangePasswordForm/ChangePasswordSchema.mjs.map +1 -1
  58. package/dist/components/Auth/ChangePasswordForm/index.content.cjs.map +1 -1
  59. package/dist/components/Auth/ChangePasswordForm/index.content.d.ts +10 -10
  60. package/dist/components/Auth/ChangePasswordForm/index.content.mjs.map +1 -1
  61. package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.d.ts +0 -1
  62. package/dist/components/Auth/ExternalsLoginButtons/assets/GithubLogo.d.ts +0 -1
  63. package/dist/components/Auth/ExternalsLoginButtons/assets/GoogleLogo.d.ts +0 -1
  64. package/dist/components/Auth/ExternalsLoginButtons/externalsLoginButtons.content.cjs.map +1 -1
  65. package/dist/components/Auth/ExternalsLoginButtons/externalsLoginButtons.content.d.ts +5 -5
  66. package/dist/components/Auth/ExternalsLoginButtons/externalsLoginButtons.content.mjs.map +1 -1
  67. package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.cjs +1 -1
  68. package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.d.ts +0 -1
  69. package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.mjs +1 -1
  70. package/dist/components/Auth/ResetPasswordForm/ResetPasswordSchema.cjs.map +1 -1
  71. package/dist/components/Auth/ResetPasswordForm/ResetPasswordSchema.d.ts +0 -1
  72. package/dist/components/Auth/ResetPasswordForm/ResetPasswordSchema.mjs.map +1 -1
  73. package/dist/components/Auth/ResetPasswordForm/index.content.cjs.map +1 -1
  74. package/dist/components/Auth/ResetPasswordForm/index.content.d.ts +7 -7
  75. package/dist/components/Auth/ResetPasswordForm/index.content.mjs.map +1 -1
  76. package/dist/components/Auth/SignInForm/SignInForm.cjs +1 -1
  77. package/dist/components/Auth/SignInForm/SignInForm.d.ts +0 -1
  78. package/dist/components/Auth/SignInForm/SignInForm.mjs +1 -1
  79. package/dist/components/Auth/SignInForm/SignInSchema.cjs.map +1 -1
  80. package/dist/components/Auth/SignInForm/SignInSchema.d.ts +0 -1
  81. package/dist/components/Auth/SignInForm/SignInSchema.mjs.map +1 -1
  82. package/dist/components/Auth/SignInForm/index.content.cjs.map +1 -1
  83. package/dist/components/Auth/SignInForm/index.content.d.ts +13 -13
  84. package/dist/components/Auth/SignInForm/index.content.mjs.map +1 -1
  85. package/dist/components/Auth/SignUpForm/SignUpForm.cjs +1 -1
  86. package/dist/components/Auth/SignUpForm/SignUpForm.d.ts +0 -1
  87. package/dist/components/Auth/SignUpForm/SignUpForm.mjs +1 -1
  88. package/dist/components/Auth/SignUpForm/SignUpSchema.cjs.map +1 -1
  89. package/dist/components/Auth/SignUpForm/SignUpSchema.d.ts +0 -1
  90. package/dist/components/Auth/SignUpForm/SignUpSchema.mjs.map +1 -1
  91. package/dist/components/Auth/SignUpForm/index.content.cjs.map +1 -1
  92. package/dist/components/Auth/SignUpForm/index.content.d.ts +11 -11
  93. package/dist/components/Auth/SignUpForm/index.content.mjs.map +1 -1
  94. package/dist/components/Avatar/index.d.ts +0 -1
  95. package/dist/components/Badge/index.d.ts +1 -2
  96. package/dist/components/Breadcrumb/index.d.ts +0 -1
  97. package/dist/components/Button/Button.cjs +1 -0
  98. package/dist/components/Button/Button.cjs.map +1 -1
  99. package/dist/components/Button/Button.d.ts +2 -3
  100. package/dist/components/Button/Button.d.ts.map +1 -1
  101. package/dist/components/Button/Button.mjs +1 -0
  102. package/dist/components/Button/Button.mjs.map +1 -1
  103. package/dist/components/Command/index.d.ts +9 -10
  104. package/dist/components/Command/index.d.ts.map +1 -1
  105. package/dist/components/Container/index.cjs.map +1 -1
  106. package/dist/components/Container/index.d.ts +16 -3
  107. package/dist/components/Container/index.d.ts.map +1 -1
  108. package/dist/components/Container/index.mjs.map +1 -1
  109. package/dist/components/ContentEditor/ContentEditor.d.ts +0 -1
  110. package/dist/components/ContentEditor/ContentEditorTextArea.d.ts +0 -1
  111. package/dist/components/ContentSelector/ContentSelector.d.ts +0 -1
  112. package/dist/components/CopyToClipboard/index.d.ts +0 -1
  113. package/dist/components/DictionaryEditor/DictionaryEditor.cjs +30 -24
  114. package/dist/components/DictionaryEditor/DictionaryEditor.cjs.map +1 -1
  115. package/dist/components/DictionaryEditor/DictionaryEditor.d.ts +0 -7
  116. package/dist/components/DictionaryEditor/DictionaryEditor.d.ts.map +1 -1
  117. package/dist/components/DictionaryEditor/DictionaryEditor.mjs +30 -24
  118. package/dist/components/DictionaryEditor/DictionaryEditor.mjs.map +1 -1
  119. package/dist/components/DictionaryEditor/ItemLayout.cjs +1 -0
  120. package/dist/components/DictionaryEditor/ItemLayout.cjs.map +1 -1
  121. package/dist/components/DictionaryEditor/ItemLayout.d.ts +0 -1
  122. package/dist/components/DictionaryEditor/ItemLayout.d.ts.map +1 -1
  123. package/dist/components/DictionaryEditor/ItemLayout.mjs +1 -0
  124. package/dist/components/DictionaryEditor/ItemLayout.mjs.map +1 -1
  125. package/dist/components/DictionaryEditor/NodeWrapper/ArrayWrapper.d.ts +0 -1
  126. package/dist/components/DictionaryEditor/NodeWrapper/EnumerationWrapper.d.ts +0 -1
  127. package/dist/components/DictionaryEditor/NodeWrapper/NestedObjectWrapper.d.ts +0 -1
  128. package/dist/components/DictionaryEditor/NodeWrapper/StringWrapper.cjs +7 -5
  129. package/dist/components/DictionaryEditor/NodeWrapper/StringWrapper.cjs.map +1 -1
  130. package/dist/components/DictionaryEditor/NodeWrapper/StringWrapper.d.ts +0 -1
  131. package/dist/components/DictionaryEditor/NodeWrapper/StringWrapper.mjs +7 -5
  132. package/dist/components/DictionaryEditor/NodeWrapper/StringWrapper.mjs.map +1 -1
  133. package/dist/components/DictionaryEditor/NodeWrapper/TranslationWrapper.d.ts +0 -1
  134. package/dist/components/DictionaryEditor/NodeWrapper/index.d.ts +0 -1
  135. package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.cjs +111 -19
  136. package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.cjs.map +1 -1
  137. package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.d.ts +1 -5
  138. package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.d.ts.map +1 -1
  139. package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.mjs +112 -20
  140. package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.mjs.map +1 -1
  141. package/dist/components/DictionaryEditor/useEditedContentStore.cjs +18 -20
  142. package/dist/components/DictionaryEditor/useEditedContentStore.cjs.map +1 -1
  143. package/dist/components/DictionaryEditor/useEditedContentStore.d.ts +0 -1
  144. package/dist/components/DictionaryEditor/useEditedContentStore.d.ts.map +1 -1
  145. package/dist/components/DictionaryEditor/useEditedContentStore.mjs +19 -21
  146. package/dist/components/DictionaryEditor/useEditedContentStore.mjs.map +1 -1
  147. package/dist/components/DictionaryEditor/useEditionPanelStore.d.ts +0 -1
  148. package/dist/components/DictionaryEditor/validDictionaryChangeButtons.content.cjs +67 -0
  149. package/dist/components/DictionaryEditor/validDictionaryChangeButtons.content.cjs.map +1 -0
  150. package/dist/components/DictionaryEditor/validDictionaryChangeButtons.content.d.ts +27 -0
  151. package/dist/components/DictionaryEditor/validDictionaryChangeButtons.content.d.ts.map +1 -0
  152. package/dist/components/DictionaryEditor/validDictionaryChangeButtons.content.mjs +67 -0
  153. package/dist/components/DictionaryEditor/validDictionaryChangeButtons.content.mjs.map +1 -0
  154. package/dist/components/DictionaryEditor/validDictionaryChangeButtonsSchema.cjs +8 -0
  155. package/dist/components/DictionaryEditor/validDictionaryChangeButtonsSchema.cjs.map +1 -0
  156. package/dist/components/DictionaryEditor/validDictionaryChangeButtonsSchema.d.ts +4 -0
  157. package/dist/components/DictionaryEditor/validDictionaryChangeButtonsSchema.d.ts.map +1 -0
  158. package/dist/components/DictionaryEditor/validDictionaryChangeButtonsSchema.mjs +8 -0
  159. package/dist/components/DictionaryEditor/validDictionaryChangeButtonsSchema.mjs.map +1 -0
  160. package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.cjs +8 -2
  161. package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.cjs.map +1 -1
  162. package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.d.ts +0 -1
  163. package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.d.ts.map +1 -1
  164. package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.mjs +8 -2
  165. package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.mjs.map +1 -1
  166. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.cjs +1 -1
  167. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.cjs.map +1 -1
  168. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.d.ts +0 -1
  169. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.d.ts.map +1 -1
  170. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.mjs +1 -1
  171. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.mjs.map +1 -1
  172. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryFormSchema.cjs.map +1 -1
  173. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryFormSchema.d.ts +2 -3
  174. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryFormSchema.d.ts.map +1 -1
  175. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryFormSchema.mjs.map +1 -1
  176. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.cjs +1 -1
  177. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.cjs.map +1 -1
  178. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.d.ts +0 -1
  179. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.d.ts.map +1 -1
  180. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs +1 -1
  181. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs.map +1 -1
  182. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsSchema.cjs.map +1 -1
  183. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsSchema.d.ts +2 -3
  184. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsSchema.d.ts.map +1 -1
  185. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsSchema.mjs.map +1 -1
  186. package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.cjs +2 -2
  187. package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.cjs.map +1 -1
  188. package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.mjs +2 -2
  189. package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.mjs.map +1 -1
  190. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.cjs +37 -13
  191. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.cjs.map +1 -1
  192. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.d.ts +0 -1
  193. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.d.ts.map +1 -1
  194. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs +37 -13
  195. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs.map +1 -1
  196. package/dist/components/DictionaryFieldEditor/EditorView/EditorView.cjs +21 -6
  197. package/dist/components/DictionaryFieldEditor/EditorView/EditorView.cjs.map +1 -1
  198. package/dist/components/DictionaryFieldEditor/EditorView/EditorView.d.ts +0 -1
  199. package/dist/components/DictionaryFieldEditor/EditorView/EditorView.d.ts.map +1 -1
  200. package/dist/components/DictionaryFieldEditor/EditorView/EditorView.mjs +21 -6
  201. package/dist/components/DictionaryFieldEditor/EditorView/EditorView.mjs.map +1 -1
  202. package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.cjs +29 -14
  203. package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.cjs.map +1 -1
  204. package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.d.ts +0 -1
  205. package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.d.ts.map +1 -1
  206. package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.mjs +29 -14
  207. package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.mjs.map +1 -1
  208. package/dist/components/DictionaryFieldEditor/EnumKeyInput.cjs +1 -0
  209. package/dist/components/DictionaryFieldEditor/EnumKeyInput.cjs.map +1 -1
  210. package/dist/components/DictionaryFieldEditor/EnumKeyInput.d.ts +0 -1
  211. package/dist/components/DictionaryFieldEditor/EnumKeyInput.mjs +1 -0
  212. package/dist/components/DictionaryFieldEditor/EnumKeyInput.mjs.map +1 -1
  213. package/dist/components/DictionaryFieldEditor/KeyPathBreadcrumb.d.ts +0 -1
  214. package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.cjs +18 -2
  215. package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.cjs.map +1 -1
  216. package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.d.ts +0 -1
  217. package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.d.ts.map +1 -1
  218. package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.mjs +18 -2
  219. package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.mjs.map +1 -1
  220. package/dist/components/DictionaryFieldEditor/NodeTypeSelector.cjs +18 -2
  221. package/dist/components/DictionaryFieldEditor/NodeTypeSelector.cjs.map +1 -1
  222. package/dist/components/DictionaryFieldEditor/NodeTypeSelector.d.ts +0 -1
  223. package/dist/components/DictionaryFieldEditor/NodeTypeSelector.d.ts.map +1 -1
  224. package/dist/components/DictionaryFieldEditor/NodeTypeSelector.mjs +18 -2
  225. package/dist/components/DictionaryFieldEditor/NodeTypeSelector.mjs.map +1 -1
  226. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs +14 -15
  227. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs.map +1 -1
  228. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.d.ts +0 -1
  229. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.d.ts.map +1 -1
  230. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs +14 -15
  231. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs.map +1 -1
  232. package/dist/components/DictionaryFieldEditor/SaveForm/SaveFormSchema.d.ts +0 -1
  233. package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.cjs +12 -12
  234. package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.cjs.map +1 -1
  235. package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.d.ts +1 -1
  236. package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.mjs +12 -12
  237. package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.mjs.map +1 -1
  238. package/dist/components/DictionaryFieldEditor/getIsEditableSection.d.ts +0 -1
  239. package/dist/components/DropDown/index.d.ts +0 -1
  240. package/dist/components/DropDown/types.d.ts +0 -1
  241. package/dist/components/EditableField/EditableFieldInput.cjs +12 -5
  242. package/dist/components/EditableField/EditableFieldInput.cjs.map +1 -1
  243. package/dist/components/EditableField/EditableFieldInput.d.ts +2 -4
  244. package/dist/components/EditableField/EditableFieldInput.d.ts.map +1 -1
  245. package/dist/components/EditableField/EditableFieldInput.mjs +13 -6
  246. package/dist/components/EditableField/EditableFieldInput.mjs.map +1 -1
  247. package/dist/components/EditableField/EditableFieldLayout.d.ts +0 -1
  248. package/dist/components/EditableField/EditableFieldTextArea.cjs +17 -4
  249. package/dist/components/EditableField/EditableFieldTextArea.cjs.map +1 -1
  250. package/dist/components/EditableField/EditableFieldTextArea.d.ts +6 -3
  251. package/dist/components/EditableField/EditableFieldTextArea.d.ts.map +1 -1
  252. package/dist/components/EditableField/EditableFieldTextArea.mjs +18 -5
  253. package/dist/components/EditableField/EditableFieldTextArea.mjs.map +1 -1
  254. package/dist/components/Flags/Flag.d.ts +0 -1
  255. package/dist/components/Footer/index.d.ts +0 -1
  256. package/dist/components/Form/Form.cjs +1 -1
  257. package/dist/components/Form/Form.d.ts +2 -1
  258. package/dist/components/Form/Form.d.ts.map +1 -1
  259. package/dist/components/Form/Form.mjs +1 -1
  260. package/dist/components/Form/FormBase.d.ts +0 -1
  261. package/dist/components/Form/FormBase.d.ts.map +1 -1
  262. package/dist/components/Form/FormDescription.d.ts +0 -1
  263. package/dist/components/Form/FormField.d.ts +0 -1
  264. package/dist/components/Form/FormItem.d.ts +0 -1
  265. package/dist/components/Form/FormMessage.d.ts +0 -1
  266. package/dist/components/Form/elements/CheckboxElement.cjs +10 -0
  267. package/dist/components/Form/elements/CheckboxElement.cjs.map +1 -0
  268. package/dist/components/Form/elements/CheckboxElement.d.ts +10 -0
  269. package/dist/components/Form/elements/CheckboxElement.d.ts.map +1 -0
  270. package/dist/components/Form/elements/CheckboxElement.mjs +10 -0
  271. package/dist/components/Form/elements/CheckboxElement.mjs.map +1 -0
  272. package/dist/components/Form/elements/EditableFieldInputElement.cjs +1 -1
  273. package/dist/components/Form/elements/EditableFieldInputElement.d.ts +0 -1
  274. package/dist/components/Form/elements/EditableFieldInputElement.mjs +1 -1
  275. package/dist/components/Form/elements/EditableFieldTextAreaElement.cjs +1 -1
  276. package/dist/components/Form/elements/EditableFieldTextAreaElement.d.ts +0 -1
  277. package/dist/components/Form/elements/EditableFieldTextAreaElement.mjs +1 -1
  278. package/dist/components/Form/elements/FormElement.cjs +1 -1
  279. package/dist/components/Form/elements/FormElement.d.ts +0 -1
  280. package/dist/components/Form/elements/FormElement.mjs +1 -1
  281. package/dist/components/Form/elements/FormElementWrapper.d.ts +0 -1
  282. package/dist/components/Form/elements/InputElement.cjs +2 -1
  283. package/dist/components/Form/elements/InputElement.cjs.map +1 -1
  284. package/dist/components/Form/elements/InputElement.d.ts +2 -3
  285. package/dist/components/Form/elements/InputElement.d.ts.map +1 -1
  286. package/dist/components/Form/elements/InputElement.mjs +2 -1
  287. package/dist/components/Form/elements/InputElement.mjs.map +1 -1
  288. package/dist/components/Form/elements/InputPasswordElement.cjs +2 -1
  289. package/dist/components/Form/elements/InputPasswordElement.cjs.map +1 -1
  290. package/dist/components/Form/elements/InputPasswordElement.d.ts +2 -3
  291. package/dist/components/Form/elements/InputPasswordElement.d.ts.map +1 -1
  292. package/dist/components/Form/elements/InputPasswordElement.mjs +2 -1
  293. package/dist/components/Form/elements/InputPasswordElement.mjs.map +1 -1
  294. package/dist/components/Form/elements/MultiselectElement.cjs +1 -1
  295. package/dist/components/Form/elements/MultiselectElement.d.ts +0 -1
  296. package/dist/components/Form/elements/MultiselectElement.mjs +1 -1
  297. package/dist/components/Form/elements/SelectElement.cjs +1 -1
  298. package/dist/components/Form/elements/SelectElement.d.ts +0 -1
  299. package/dist/components/Form/elements/SelectElement.mjs +1 -1
  300. package/dist/components/Form/elements/SwitchSelectorElement.cjs +1 -1
  301. package/dist/components/Form/elements/SwitchSelectorElement.d.ts +0 -1
  302. package/dist/components/Form/elements/SwitchSelectorElement.mjs +1 -1
  303. package/dist/components/Form/elements/TextAreaElement.cjs +1 -1
  304. package/dist/components/Form/elements/TextAreaElement.d.ts +0 -1
  305. package/dist/components/Form/elements/TextAreaElement.mjs +1 -1
  306. package/dist/components/Form/elements/index.cjs +1 -1
  307. package/dist/components/Form/elements/index.mjs +1 -1
  308. package/dist/components/Form/index.cjs +1 -1
  309. package/dist/components/Form/index.mjs +1 -1
  310. package/dist/components/Form/layout/FormItemLayout.cjs +1 -1
  311. package/dist/components/Form/layout/FormItemLayout.d.ts +1 -2
  312. package/dist/components/Form/layout/FormItemLayout.d.ts.map +1 -1
  313. package/dist/components/Form/layout/FormItemLayout.mjs +1 -1
  314. package/dist/components/Form/layout/FormLabelLayout.d.ts +0 -1
  315. package/dist/components/Form/layout/RequiredStar.d.ts +0 -1
  316. package/dist/components/Form/layout/index.cjs +1 -1
  317. package/dist/components/Form/layout/index.mjs +1 -1
  318. package/dist/components/Headers/index.d.ts +0 -1
  319. package/dist/components/IDE/CodeRender.cjs.map +1 -1
  320. package/dist/components/IDE/CodeRender.d.ts +0 -1
  321. package/dist/components/IDE/CodeRender.mjs.map +1 -1
  322. package/dist/components/IDE/FileList.d.ts +0 -1
  323. package/dist/components/IDE/FileTree.d.ts +0 -1
  324. package/dist/components/IDE/IDE.d.ts +0 -1
  325. package/dist/components/IDE/MarkDownRender.d.ts +0 -1
  326. package/dist/components/InformationTag/index.d.ts +0 -1
  327. package/dist/components/Input/Checkbox.cjs +80 -0
  328. package/dist/components/Input/Checkbox.cjs.map +1 -0
  329. package/dist/components/Input/Checkbox.d.ts +14 -0
  330. package/dist/components/Input/Checkbox.d.ts.map +1 -0
  331. package/dist/components/Input/Checkbox.mjs +80 -0
  332. package/dist/components/Input/Checkbox.mjs.map +1 -0
  333. package/dist/components/Input/Input.d.ts +0 -1
  334. package/dist/components/Input/InputPassword.d.ts +0 -1
  335. package/dist/components/Input/index.cjs +3 -0
  336. package/dist/components/Input/index.cjs.map +1 -1
  337. package/dist/components/Input/index.d.ts +1 -0
  338. package/dist/components/Input/index.d.ts.map +1 -1
  339. package/dist/components/Input/index.mjs +3 -0
  340. package/dist/components/Input/index.mjs.map +1 -1
  341. package/dist/components/Label/index.d.ts +0 -1
  342. package/dist/components/Link/Link.cjs +7 -2
  343. package/dist/components/Link/Link.cjs.map +1 -1
  344. package/dist/components/Link/Link.d.ts +3 -3
  345. package/dist/components/Link/Link.d.ts.map +1 -1
  346. package/dist/components/Link/Link.mjs +7 -2
  347. package/dist/components/Link/Link.mjs.map +1 -1
  348. package/dist/components/Loader/index.d.ts +0 -1
  349. package/dist/components/Loader/spinner.d.ts +0 -1
  350. package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.d.ts +0 -1
  351. package/dist/components/Logo/LogoCircle.d.ts +0 -1
  352. package/dist/components/Logo/LogoNoFrame.d.ts +0 -1
  353. package/dist/components/Logo/LogoSquare.d.ts +0 -1
  354. package/dist/components/Logo/LogoSquircle.d.ts +0 -1
  355. package/dist/components/Logo/LogoTextOnly.d.ts +0 -1
  356. package/dist/components/Logo/LogoWithTextBelowCircle.d.ts +0 -1
  357. package/dist/components/Logo/LogoWithTextBelowNoFrame.d.ts +0 -1
  358. package/dist/components/Logo/LogoWithTextBelowSquircle.d.ts +0 -1
  359. package/dist/components/Logo/LogoWithTextCircle.d.ts +0 -1
  360. package/dist/components/Logo/LogoWithTextNoFrame.d.ts +0 -1
  361. package/dist/components/Logo/LogoWithTextSquircle.d.ts +0 -1
  362. package/dist/components/Logo/index.d.ts +0 -1
  363. package/dist/components/MarkDownRender/index.d.ts +0 -1
  364. package/dist/components/MaxHeightSmoother/index.d.ts +0 -1
  365. package/dist/components/MaxWidthSmoother/index.d.ts +0 -1
  366. package/dist/components/Modal/Modal.cjs +19 -15
  367. package/dist/components/Modal/Modal.cjs.map +1 -1
  368. package/dist/components/Modal/Modal.d.ts +3 -3
  369. package/dist/components/Modal/Modal.d.ts.map +1 -1
  370. package/dist/components/Modal/Modal.mjs +19 -15
  371. package/dist/components/Modal/Modal.mjs.map +1 -1
  372. package/dist/components/Navbar/Burger.d.ts +0 -1
  373. package/dist/components/Navbar/DesktopNavbar.cjs +10 -26
  374. package/dist/components/Navbar/DesktopNavbar.cjs.map +1 -1
  375. package/dist/components/Navbar/DesktopNavbar.d.ts +6 -6
  376. package/dist/components/Navbar/DesktopNavbar.d.ts.map +1 -1
  377. package/dist/components/Navbar/DesktopNavbar.mjs +10 -26
  378. package/dist/components/Navbar/DesktopNavbar.mjs.map +1 -1
  379. package/dist/components/Navbar/MobileNavbar.cjs +3 -57
  380. package/dist/components/Navbar/MobileNavbar.cjs.map +1 -1
  381. package/dist/components/Navbar/MobileNavbar.d.ts +6 -7
  382. package/dist/components/Navbar/MobileNavbar.d.ts.map +1 -1
  383. package/dist/components/Navbar/MobileNavbar.mjs +3 -57
  384. package/dist/components/Navbar/MobileNavbar.mjs.map +1 -1
  385. package/dist/components/Navbar/index.cjs +4 -2
  386. package/dist/components/Navbar/index.cjs.map +1 -1
  387. package/dist/components/Navbar/index.d.ts +9 -15
  388. package/dist/components/Navbar/index.d.ts.map +1 -1
  389. package/dist/components/Navbar/index.mjs +4 -2
  390. package/dist/components/Navbar/index.mjs.map +1 -1
  391. package/dist/components/Pattern/DotPattern.d.ts +0 -1
  392. package/dist/components/Pattern/GridPattern.d.ts +0 -1
  393. package/dist/components/Pattern/SpotLight.d.ts +0 -1
  394. package/dist/components/Popover/index.d.ts +0 -1
  395. package/dist/components/PressableSpan/PressableSpan.d.ts +0 -1
  396. package/dist/components/ProfileDropDown/index.d.ts +0 -1
  397. package/dist/components/RightDrawer/RightDrawer.d.ts +0 -1
  398. package/dist/components/Select/Multiselect.d.ts +2 -3
  399. package/dist/components/Select/Multiselect.d.ts.map +1 -1
  400. package/dist/components/SwitchSelector/index.d.ts +1 -2
  401. package/dist/components/TabSelector/TabSelector.cjs +2 -0
  402. package/dist/components/TabSelector/TabSelector.cjs.map +1 -1
  403. package/dist/components/TabSelector/TabSelector.d.ts +2 -3
  404. package/dist/components/TabSelector/TabSelector.d.ts.map +1 -1
  405. package/dist/components/TabSelector/TabSelector.mjs +2 -0
  406. package/dist/components/TabSelector/TabSelector.mjs.map +1 -1
  407. package/dist/components/TextArea/AutoSizeTextArea.d.ts +0 -1
  408. package/dist/components/TextArea/TextArea.cjs +1 -0
  409. package/dist/components/TextArea/TextArea.cjs.map +1 -1
  410. package/dist/components/TextArea/TextArea.d.ts +0 -1
  411. package/dist/components/TextArea/TextArea.mjs +1 -0
  412. package/dist/components/TextArea/TextArea.mjs.map +1 -1
  413. package/dist/components/ThemeSwitcherDropDown/DesktopThemeSwitcher.d.ts +0 -1
  414. package/dist/components/ThemeSwitcherDropDown/MobileThemeSwitcher.d.ts +0 -1
  415. package/dist/components/Toaster/Toast.d.ts +1 -1
  416. package/dist/components/Toaster/useToast.d.ts +0 -1
  417. package/dist/components/WithResizer/index.d.ts +0 -1
  418. package/dist/components/index.cjs +4 -3
  419. package/dist/components/index.cjs.map +1 -1
  420. package/dist/components/index.d.ts +0 -1
  421. package/dist/components/index.d.ts.map +1 -1
  422. package/dist/components/index.mjs +4 -3
  423. package/dist/hooks/intlayerAPIHooks.cjs +16 -3
  424. package/dist/hooks/intlayerAPIHooks.cjs.map +1 -1
  425. package/dist/hooks/intlayerAPIHooks.d.ts +0 -1
  426. package/dist/hooks/intlayerAPIHooks.d.ts.map +1 -1
  427. package/dist/hooks/intlayerAPIHooks.mjs +16 -3
  428. package/dist/hooks/intlayerAPIHooks.mjs.map +1 -1
  429. package/dist/hooks/useAsync/useAsync.cjs +1 -5
  430. package/dist/hooks/useAsync/useAsync.cjs.map +1 -1
  431. package/dist/hooks/useAsync/useAsync.d.ts.map +1 -1
  432. package/dist/hooks/useAsync/useAsync.mjs +1 -5
  433. package/dist/hooks/useAsync/useAsync.mjs.map +1 -1
  434. package/dist/hooks/useAsync/useAsyncWrapper.d.ts +0 -1
  435. package/dist/hooks/useGetAllDictionaries.d.ts +0 -1
  436. package/dist/hooks/useItemSelector.d.ts +0 -1
  437. package/dist/index-BUDsCMdX.cjs +204 -0
  438. package/dist/index-BUDsCMdX.cjs.map +1 -0
  439. package/dist/index-C09rI9kw.js +205 -0
  440. package/dist/index-C09rI9kw.js.map +1 -0
  441. package/dist/libs/intlayer-api/auth.d.ts +0 -1
  442. package/dist/libs/intlayer-api/dictionary.d.ts +0 -1
  443. package/dist/libs/intlayer-api/fetcher.cjs +1 -6
  444. package/dist/libs/intlayer-api/fetcher.cjs.map +1 -1
  445. package/dist/libs/intlayer-api/fetcher.d.ts.map +1 -1
  446. package/dist/libs/intlayer-api/fetcher.mjs +1 -6
  447. package/dist/libs/intlayer-api/fetcher.mjs.map +1 -1
  448. package/dist/libs/intlayer-api/index.d.ts +0 -1
  449. package/dist/libs/intlayer-api/organization.d.ts +0 -1
  450. package/dist/libs/intlayer-api/project.d.ts +0 -1
  451. package/dist/libs/intlayer-api/user.d.ts +0 -1
  452. package/dist/tailwind.css +1 -1
  453. package/dist/utils/cn.d.ts +0 -1
  454. package/dist/utils/dictionary.cjs +37 -1
  455. package/dist/utils/dictionary.cjs.map +1 -1
  456. package/dist/utils/dictionary.d.ts +1 -1
  457. package/dist/utils/dictionary.d.ts.map +1 -1
  458. package/dist/utils/dictionary.mjs +38 -2
  459. package/dist/utils/dictionary.mjs.map +1 -1
  460. package/dist/validDictionaryChangeButtons.content-BK9QaXPm.cjs +66 -0
  461. package/dist/validDictionaryChangeButtons.content-BK9QaXPm.cjs.map +1 -0
  462. package/dist/validDictionaryChangeButtons.content-CAAscqJI.cjs +66 -0
  463. package/dist/validDictionaryChangeButtons.content-CAAscqJI.cjs.map +1 -0
  464. package/dist/validDictionaryChangeButtons.content-D7AvoBdl.js +67 -0
  465. package/dist/validDictionaryChangeButtons.content-D7AvoBdl.js.map +1 -0
  466. package/dist/validDictionaryChangeButtons.content-DQwoUNCC.cjs +45 -0
  467. package/dist/validDictionaryChangeButtons.content-DQwoUNCC.cjs.map +1 -0
  468. package/dist/validDictionaryChangeButtons.content-DQxPoIe6.js +67 -0
  469. package/dist/validDictionaryChangeButtons.content-DQxPoIe6.js.map +1 -0
  470. package/dist/validDictionaryChangeButtons.content-JUcjGdBx.cjs +66 -0
  471. package/dist/validDictionaryChangeButtons.content-JUcjGdBx.cjs.map +1 -0
  472. package/dist/validDictionaryChangeButtons.content-ejY3-sbG.js +67 -0
  473. package/dist/validDictionaryChangeButtons.content-ejY3-sbG.js.map +1 -0
  474. package/dist/validDictionaryChangeButtons.content-iyT0lKy7.js +46 -0
  475. package/dist/validDictionaryChangeButtons.content-iyT0lKy7.js.map +1 -0
  476. package/dist/validDictionaryChangeButtons.content-u4qShrQh.cjs +66 -0
  477. package/dist/validDictionaryChangeButtons.content-u4qShrQh.cjs.map +1 -0
  478. package/dist/validDictionaryChangeButtons.content-y4up9NU8.js +67 -0
  479. package/dist/validDictionaryChangeButtons.content-y4up9NU8.js.map +1 -0
  480. package/dist/zod-BV4nCGJE.js.map +1 -1
  481. package/dist/zod-DSrtTSD_.cjs.map +1 -1
  482. package/package.json +81 -54
@@ -1,14 +1,13 @@
1
1
  import { z } from 'zod';
2
-
3
2
  export declare const getDictionarySchema: (projectId: string) => z.ZodObject<{
4
3
  key: z.ZodDefault<z.ZodString>;
5
4
  projectIds: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
6
5
  }, "strip", z.ZodTypeAny, {
7
- projectIds: string[];
8
6
  key: string;
7
+ projectIds: string[];
9
8
  }, {
10
- projectIds?: string[] | undefined;
11
9
  key?: string | undefined;
10
+ projectIds?: string[] | undefined;
12
11
  }>;
13
12
  export type DictionaryFormData = z.infer<ReturnType<typeof getDictionarySchema>>;
14
13
  //# sourceMappingURL=dictionaryFormSchema.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dictionaryFormSchema.d.ts","sourceRoot":"","sources":["../../../../src/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryFormSchema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,mBAAmB,cAAe,MAAM;;;;;;;;;EA0CpD,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CACtC,UAAU,CAAC,OAAO,mBAAmB,CAAC,CACvC,CAAC"}
1
+ {"version":3,"file":"dictionaryFormSchema.d.ts","sourceRoot":"","sources":["../../../../src/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryFormSchema.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,mBAAmB,cAAe,MAAM;;;;;;;;;EA0CpD,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CACtC,UAAU,CAAC,OAAO,mBAAmB,CAAC,CACvC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"dictionaryFormSchema.mjs","sources":["../../../../src/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryFormSchema.ts"],"sourcesContent":["import { t } from 'react-intlayer';\nimport { z } from 'zod';\n\nexport const getDictionarySchema = (projectId: string) => {\n const requiredErrorName = t({\n en: 'Please enter a key for your dictionary',\n fr: 'Veuillez saisir une clef pour votre dictionaire',\n es: 'Por favor, ingrese un clave para su diccionario',\n });\n\n const invalidTypeErrorName = t({\n en: 'Please enter a valid key for your dictionary',\n fr: 'Veuillez saisir une clée valide pour votre dictionaire',\n es: 'Por favor, ingrese un clave válido para su diccionario',\n });\n\n const requiredErrorProjectId = t({\n en: 'Please select a project',\n fr: 'Veuillez sélectionner un projet',\n es: 'Por favor, seleccione un proyecto',\n });\n\n const invalidTypeErrorProjectId = t({\n en: 'Please select a valid project',\n fr: 'Veuillez sélectionner un projet valide',\n es: 'Por favor, seleccione un proyecto válido',\n });\n\n return z.object({\n key: z\n .string({\n required_error: requiredErrorName,\n invalid_type_error: invalidTypeErrorName,\n })\n .min(1, { message: invalidTypeErrorName })\n .default(''),\n projectIds: z\n .array(\n z.string({\n required_error: requiredErrorProjectId,\n invalid_type_error: invalidTypeErrorProjectId,\n })\n )\n .default([projectId]),\n });\n};\n\nexport type DictionaryFormData = z.infer<\n ReturnType<typeof getDictionarySchema>\n>;\n"],"names":[],"mappings":";;AAGa,MAAA,sBAAsB,CAAC,cAAsB;AACxD,QAAM,oBAAoB,EAAE;AAAA,IAC1B,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,EAAA,CACL;AAED,QAAM,uBAAuB,EAAE;AAAA,IAC7B,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,EAAA,CACL;AAED,QAAM,yBAAyB,EAAE;AAAA,IAC/B,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,EAAA,CACL;AAED,QAAM,4BAA4B,EAAE;AAAA,IAClC,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,EAAA,CACL;AAED,SAAO,EAAE,OAAO;AAAA,IACd,KAAK,EACF,OAAO;AAAA,MACN,gBAAgB;AAAA,MAChB,oBAAoB;AAAA,IAAA,CACrB,EACA,IAAI,GAAG,EAAE,SAAS,sBAAsB,EACxC,QAAQ,EAAE;AAAA,IACb,YAAY,EACT;AAAA,MACC,EAAE,OAAO;AAAA,QACP,gBAAgB;AAAA,QAChB,oBAAoB;AAAA,MAAA,CACrB;AAAA,IAAA,EAEF,QAAQ,CAAC,SAAS,CAAC;AAAA,EAAA,CACvB;AACH;"}
1
+ {"version":3,"file":"dictionaryFormSchema.mjs","sources":["../../../../src/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryFormSchema.ts"],"sourcesContent":["// @ts-ignore react-intlayer not build yet\nimport { t } from 'react-intlayer';\nimport { z } from 'zod';\n\nexport const getDictionarySchema = (projectId: string) => {\n const requiredErrorName = t({\n en: 'Please enter a key for your dictionary',\n fr: 'Veuillez saisir une clef pour votre dictionaire',\n es: 'Por favor, ingrese un clave para su diccionario',\n });\n\n const invalidTypeErrorName = t({\n en: 'Please enter a valid key for your dictionary',\n fr: 'Veuillez saisir une clée valide pour votre dictionaire',\n es: 'Por favor, ingrese un clave válido para su diccionario',\n });\n\n const requiredErrorProjectId = t({\n en: 'Please select a project',\n fr: 'Veuillez sélectionner un projet',\n es: 'Por favor, seleccione un proyecto',\n });\n\n const invalidTypeErrorProjectId = t({\n en: 'Please select a valid project',\n fr: 'Veuillez sélectionner un projet valide',\n es: 'Por favor, seleccione un proyecto válido',\n });\n\n return z.object({\n key: z\n .string({\n required_error: requiredErrorName,\n invalid_type_error: invalidTypeErrorName,\n })\n .min(1, { message: invalidTypeErrorName })\n .default(''),\n projectIds: z\n .array(\n z.string({\n required_error: requiredErrorProjectId,\n invalid_type_error: invalidTypeErrorProjectId,\n })\n )\n .default([projectId]),\n });\n};\n\nexport type DictionaryFormData = z.infer<\n ReturnType<typeof getDictionarySchema>\n>;\n"],"names":[],"mappings":";;AAIa,MAAA,sBAAsB,CAAC,cAAsB;AACxD,QAAM,oBAAoB,EAAE;AAAA,IAC1B,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,EAAA,CACL;AAED,QAAM,uBAAuB,EAAE;AAAA,IAC7B,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,EAAA,CACL;AAED,QAAM,yBAAyB,EAAE;AAAA,IAC/B,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,EAAA,CACL;AAED,QAAM,4BAA4B,EAAE;AAAA,IAClC,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,EAAA,CACL;AAED,SAAO,EAAE,OAAO;AAAA,IACd,KAAK,EACF,OAAO;AAAA,MACN,gBAAgB;AAAA,MAChB,oBAAoB;AAAA,IAAA,CACrB,EACA,IAAI,GAAG,EAAE,SAAS,sBAAsB,EACxC,QAAQ,EAAE;AAAA,IACb,YAAY,EACT;AAAA,MACC,EAAE,OAAO;AAAA,QACP,gBAAgB;AAAA,QAChB,oBAAoB;AAAA,MAAA,CACrB;AAAA,IAAA,EAEF,QAAQ,CAAC,SAAS,CAAC;AAAA,EAAA,CACvB;AACH;"}
@@ -19,7 +19,7 @@ require("../../../libs/intlayer-api/user.cjs");
19
19
  require("../../Button/Button.cjs");
20
20
  const components_Form_FormBase = require("../../Form/FormBase.cjs");
21
21
  require("../../Form/FormField.cjs");
22
- const components_Form_layout_FormItemLayout = require("../../../Form-wWTTkxTp.cjs");
22
+ const components_Form_layout_FormItemLayout = require("../../../Form-DERuauvB.cjs");
23
23
  require("zod");
24
24
  require("../../Modal/Modal.cjs");
25
25
  require("../../Toaster/Toast.cjs");
@@ -1 +1 @@
1
- {"version":3,"file":"DictionaryDetailsForm.cjs","sources":["../../../../src/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.tsx"],"sourcesContent":["'use client';\n\nimport { Dictionary as DistantDictionary } from '@intlayer/backend';\nimport { Dictionary } from '@intlayer/core';\nimport { ArrowUpFromLine, Save } from 'lucide-react';\nimport { type FC, useEffect } from 'react';\nimport { useDictionary } from 'react-intlayer';\nimport { useGetProjects, usePushDictionaries } from '../../../hooks';\nimport { cn } from '../../../utils/cn';\nimport { useAuth } from '../../Auth';\nimport { Form, useForm } from '../../Form';\nimport { MultiSelect } from '../../Select';\nimport { useToast } from '../../Toaster';\nimport { dictionaryDetailsContent } from './dictionaryDetails.content';\nimport {\n getDictionaryDetailsSchema,\n DictionaryDetailsFormData,\n} from './DictionaryDetailsSchema';\n\ntype DictionaryDetailsProps = {\n dictionary: Dictionary;\n};\n\nexport const DictionaryDetailsForm: FC<DictionaryDetailsProps> = ({\n dictionary,\n}) => {\n const { session } = useAuth();\n const { project } = session ?? {};\n const { pushDictionaries } = usePushDictionaries();\n const { data: projects } = useGetProjects();\n\n const DictionaryDetailsSchema = getDictionaryDetailsSchema(\n String(project?._id)\n );\n const { form, isSubmitting } = useForm(DictionaryDetailsSchema, {\n defaultValues: dictionary,\n });\n const {\n pushDictionariesToasts,\n updateDictionaryToasts,\n titleInput,\n keyInput,\n descriptionInput,\n publishButton,\n saveButton,\n projectInput,\n } = useDictionary(dictionaryDetailsContent);\n const { toast } = useToast();\n\n useEffect(() => {\n form.reset(dictionary);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [dictionary, form?.reset]);\n\n const isFormEdited = form.formState.isDirty;\n const isLocalDictionary =\n typeof (dictionary as DistantDictionary)?._id === 'undefined';\n\n const onSubmitSuccess = async (data: DictionaryDetailsFormData) => {\n await pushDictionaries([\n {\n ...dictionary,\n ...data,\n },\n ])\n .then(() => {\n if (isLocalDictionary) {\n toast({\n title: pushDictionariesToasts.updated.title.value,\n description: pushDictionariesToasts.updated.description.value,\n variant: 'success',\n });\n } else {\n toast({\n title: updateDictionaryToasts.updated.title.value,\n description: updateDictionaryToasts.updated.description.value,\n variant: 'success',\n });\n }\n })\n .catch((error) => {\n if (isLocalDictionary) {\n toast({\n title: pushDictionariesToasts.failed.title.value,\n description: pushDictionariesToasts.failed.description.value,\n variant: 'error',\n });\n } else {\n toast({\n title: updateDictionaryToasts.failed.title.value,\n description: error.message,\n variant: 'error',\n });\n }\n });\n };\n\n return (\n <Form\n className=\"flex size-full flex-1 flex-col gap-8\"\n {...form}\n schema={DictionaryDetailsSchema}\n onSubmitSuccess={onSubmitSuccess}\n >\n <div className=\"flex size-full flex-1 gap-8 max-md:flex-col\">\n <Form.EditableFieldInput\n name=\"title\"\n label={titleInput.label.value}\n placeholder={titleInput.placeholder.value}\n description={titleInput.description.value}\n disabled={isSubmitting}\n />\n <Form.EditableFieldInput\n name=\"key\"\n label={keyInput.label.value}\n placeholder={keyInput.label.value}\n description={keyInput.description.value}\n disabled={isSubmitting}\n required\n />\n </div>\n\n <Form.EditableFieldTextArea\n name=\"description\"\n label={descriptionInput.label.value}\n placeholder={descriptionInput.placeholder.value}\n description={descriptionInput.description.value}\n disabled={isSubmitting}\n />\n\n <Form.MultiSelect\n name=\"projectIds\"\n label={projectInput.label.value}\n description={projectInput.description.value}\n >\n <MultiSelect.Trigger\n getBadgeValue={(value) =>\n projects?.data?.find((project) => String(project._id) === value)\n ?.name ?? value\n }\n >\n <MultiSelect.Input placeholder={projectInput.placeholder.value} />\n </MultiSelect.Trigger>\n <MultiSelect.Content>\n <MultiSelect.List>\n {projects?.data?.map((project) => (\n <MultiSelect.Item\n key={String(project._id)}\n value={String(project._id)}\n >\n {project.name}\n </MultiSelect.Item>\n ))}\n </MultiSelect.List>\n </MultiSelect.Content>\n </Form.MultiSelect>\n\n {isLocalDictionary ? (\n <Form.Button\n type=\"submit\"\n label={publishButton.label.value}\n disabled={isSubmitting || !isFormEdited}\n Icon={ArrowUpFromLine}\n isFullWidth={false}\n color=\"text\"\n isLoading={isSubmitting}\n className=\"ml-auto\"\n >\n {publishButton.text}\n </Form.Button>\n ) : (\n <Form.Button\n type=\"submit\"\n label={saveButton.label.value}\n disabled={isSubmitting}\n isFullWidth={false}\n className={cn('ml-auto', isFormEdited ? '' : 'invisible')}\n Icon={Save}\n color=\"text\"\n isLoading={isSubmitting}\n >\n {saveButton.text}\n </Form.Button>\n )}\n </Form>\n );\n};\n"],"names":["useAuth","usePushDictionaries","useGetProjects","getDictionaryDetailsSchema","useForm","useDictionary","dictionaryDetailsContent","useToast","useEffect","jsxs","Form","jsx","MultiSelect","project","ArrowUpFromLine","cn","Save"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuBO,MAAM,wBAAoD,CAAC;AAAA,EAChE;AACF,MAAM;AACE,QAAA,EAAE,YAAYA,mCAAAA;AACpB,QAAM,EAAE,QAAA,IAAY,WAAW;AACzB,QAAA,EAAE,qBAAqBC,uBAAAA;AAC7B,QAAM,EAAE,MAAM,SAAS,IAAIC,uBAAe,eAAA;AAE1C,QAAM,0BAA0BC,2EAAA;AAAA,IAC9B,OAAO,SAAS,GAAG;AAAA,EAAA;AAErB,QAAM,EAAE,MAAM,iBAAiBC,yBAAAA,QAAQ,yBAAyB;AAAA,IAC9D,eAAe;AAAA,EAAA,CAChB;AACK,QAAA;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA,IACEC,cAAAA,cAAcC,6EAAAA,wBAAwB;AACpC,QAAA,EAAE,UAAUC,4BAAAA;AAElBC,aAAAA,UAAU,MAAM;AACd,SAAK,MAAM,UAAU;AAAA,EAEpB,GAAA,CAAC,YAAY,MAAM,KAAK,CAAC;AAEtB,QAAA,eAAe,KAAK,UAAU;AAC9B,QAAA,oBACJ,OAAQ,YAAkC,QAAQ;AAE9C,QAAA,kBAAkB,OAAO,SAAoC;AACjE,UAAM,iBAAiB;AAAA,MACrB;AAAA,QACE,GAAG;AAAA,QACH,GAAG;AAAA,MACL;AAAA,IAAA,CACD,EACE,KAAK,MAAM;AACV,UAAI,mBAAmB;AACf,cAAA;AAAA,UACJ,OAAO,uBAAuB,QAAQ,MAAM;AAAA,UAC5C,aAAa,uBAAuB,QAAQ,YAAY;AAAA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OAAM;AAAA,YACN,WAAW;AAAA,YACX,WAAU;AAAA,YAET,UAAc,cAAA;AAAA,UAAA;AAAA,QAAA,IAGjBH,2BAAA,kBAAA;AAAA,UAACD,sCAAAA,KAAK;AAAA,UAAL;AAAA,YACC,MAAK;AAAA,YACL,OAAO,WAAW,MAAM;AAAA,YACxB,UAAU;AAAA,YACV,aAAa;AAAA,YACb,WAAWK,SAAAA,GAAG,WAAW,eAAe,KAAK,WAAW;AAAA,YACxD,MAAMC,YAAA;AAAA,YACN,OAAM;AAAA,YACN,WAAW;AAAA,YAEV,UAAW,WAAA;AAAA,UAAA;AAAA,QACd;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIR;;"}
1
+ {"version":3,"file":"DictionaryDetailsForm.cjs","sources":["../../../../src/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.tsx"],"sourcesContent":["'use client';\n\nimport { Dictionary as DistantDictionary } from '@intlayer/backend';\nimport { Dictionary } from '@intlayer/core';\nimport { ArrowUpFromLine, Save } from 'lucide-react';\nimport { type FC, useEffect } from 'react';\n// @ts-ignore react-intlayer not build yet\nimport { useDictionary } from 'react-intlayer';\nimport { useGetProjects, usePushDictionaries } from '../../../hooks';\nimport { cn } from '../../../utils/cn';\nimport { useAuth } from '../../Auth';\nimport { Form, useForm } from '../../Form';\nimport { MultiSelect } from '../../Select';\nimport { useToast } from '../../Toaster';\nimport { dictionaryDetailsContent } from './dictionaryDetails.content';\nimport {\n getDictionaryDetailsSchema,\n DictionaryDetailsFormData,\n} from './DictionaryDetailsSchema';\n\ntype DictionaryDetailsProps = {\n dictionary: Dictionary;\n};\n\nexport const DictionaryDetailsForm: FC<DictionaryDetailsProps> = ({\n dictionary,\n}) => {\n const { session } = useAuth();\n const { project } = session ?? {};\n const { pushDictionaries } = usePushDictionaries();\n const { data: projects } = useGetProjects();\n\n const DictionaryDetailsSchema = getDictionaryDetailsSchema(\n String(project?._id)\n );\n const { form, isSubmitting } = useForm(DictionaryDetailsSchema, {\n defaultValues: dictionary,\n });\n const {\n pushDictionariesToasts,\n updateDictionaryToasts,\n titleInput,\n keyInput,\n descriptionInput,\n publishButton,\n saveButton,\n projectInput,\n } = useDictionary(dictionaryDetailsContent);\n const { toast } = useToast();\n\n useEffect(() => {\n form.reset(dictionary);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [dictionary, form?.reset]);\n\n const isFormEdited = form.formState.isDirty;\n const isLocalDictionary =\n typeof (dictionary as DistantDictionary)?._id === 'undefined';\n\n const onSubmitSuccess = async (data: DictionaryDetailsFormData) => {\n await pushDictionaries([\n {\n ...dictionary,\n ...data,\n },\n ])\n .then(() => {\n if (isLocalDictionary) {\n toast({\n title: pushDictionariesToasts.updated.title.value,\n description: pushDictionariesToasts.updated.description.value,\n variant: 'success',\n });\n } else {\n toast({\n title: updateDictionaryToasts.updated.title.value,\n description: updateDictionaryToasts.updated.description.value,\n variant: 'success',\n });\n }\n })\n .catch((error) => {\n if (isLocalDictionary) {\n toast({\n title: pushDictionariesToasts.failed.title.value,\n description: pushDictionariesToasts.failed.description.value,\n variant: 'error',\n });\n } else {\n toast({\n title: updateDictionaryToasts.failed.title.value,\n description: error.message,\n variant: 'error',\n });\n }\n });\n };\n\n return (\n <Form\n className=\"flex size-full flex-1 flex-col gap-8\"\n {...form}\n schema={DictionaryDetailsSchema}\n onSubmitSuccess={onSubmitSuccess}\n >\n <div className=\"flex size-full flex-1 gap-8 max-md:flex-col\">\n <Form.EditableFieldInput\n name=\"title\"\n label={titleInput.label.value}\n placeholder={titleInput.placeholder.value}\n description={titleInput.description.value}\n disabled={isSubmitting}\n />\n <Form.EditableFieldInput\n name=\"key\"\n label={keyInput.label.value}\n placeholder={keyInput.label.value}\n description={keyInput.description.value}\n disabled={isSubmitting}\n required\n />\n </div>\n\n <Form.EditableFieldTextArea\n name=\"description\"\n label={descriptionInput.label.value}\n placeholder={descriptionInput.placeholder.value}\n description={descriptionInput.description.value}\n disabled={isSubmitting}\n />\n\n <Form.MultiSelect\n name=\"projectIds\"\n label={projectInput.label.value}\n description={projectInput.description.value}\n >\n <MultiSelect.Trigger\n getBadgeValue={(value) =>\n projects?.data?.find((project) => String(project._id) === value)\n ?.name ?? value\n }\n >\n <MultiSelect.Input placeholder={projectInput.placeholder.value} />\n </MultiSelect.Trigger>\n <MultiSelect.Content>\n <MultiSelect.List>\n {projects?.data?.map((project) => (\n <MultiSelect.Item\n key={String(project._id)}\n value={String(project._id)}\n >\n {project.name}\n </MultiSelect.Item>\n ))}\n </MultiSelect.List>\n </MultiSelect.Content>\n </Form.MultiSelect>\n\n {isLocalDictionary ? (\n <Form.Button\n type=\"submit\"\n label={publishButton.label.value}\n disabled={isSubmitting || !isFormEdited}\n Icon={ArrowUpFromLine}\n isFullWidth={false}\n color=\"text\"\n isLoading={isSubmitting}\n className=\"ml-auto\"\n >\n {publishButton.text}\n </Form.Button>\n ) : (\n <Form.Button\n type=\"submit\"\n label={saveButton.label.value}\n disabled={isSubmitting}\n isFullWidth={false}\n className={cn('ml-auto', isFormEdited ? '' : 'invisible')}\n Icon={Save}\n color=\"text\"\n isLoading={isSubmitting}\n >\n {saveButton.text}\n </Form.Button>\n )}\n </Form>\n );\n};\n"],"names":["useAuth","usePushDictionaries","useGetProjects","getDictionaryDetailsSchema","useForm","useDictionary","dictionaryDetailsContent","useToast","useEffect","jsxs","Form","jsx","MultiSelect","project","ArrowUpFromLine","cn","Save"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBO,MAAM,wBAAoD,CAAC;AAAA,EAChE;AACF,MAAM;AACE,QAAA,EAAE,YAAYA,mCAAAA;AACpB,QAAM,EAAE,QAAA,IAAY,WAAW;AACzB,QAAA,EAAE,qBAAqBC,uBAAAA;AAC7B,QAAM,EAAE,MAAM,SAAS,IAAIC,uBAAe,eAAA;AAE1C,QAAM,0BAA0BC,2EAAA;AAAA,IAC9B,OAAO,SAAS,GAAG;AAAA,EAAA;AAErB,QAAM,EAAE,MAAM,iBAA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;
6
5
  };
@@ -1 +1 @@
1
- {"version":3,"file":"DictionaryDetailsForm.d.ts","sourceRoot":"","sources":["../../../../src/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,OAAO,EAAE,KAAK,EAAE,EAAa,MAAM,OAAO,CAAC;AAc3C,KAAK,sBAAsB,GAAG;IAC5B,UAAU,EAAE,UAAU,CAAC;CACxB,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,EAAE,CAAC,sBAAsB,CAmK5D,CAAC"}
1
+ {"version":3,"file":"DictionaryDetailsForm.d.ts","sourceRoot":"","sources":["../../../../src/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,OAAO,EAAE,KAAK,EAAE,EAAa,MAAM,OAAO,CAAC;AAe3C,KAAK,sBAAsB,GAAG;IAC5B,UAAU,EAAE,UAAU,CAAC;CACxB,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,EAAE,CAAC,sBAAsB,CAmK5D,CAAC"}
@@ -17,7 +17,7 @@ import "../../../libs/intlayer-api/user.mjs";
17
17
  import "../../Button/Button.mjs";
18
18
  import { useForm } from "../../Form/FormBase.mjs";
19
19
  import "../../Form/FormField.mjs";
20
- import { F as Form } from "../../../Form-Cbu7ff1e.js";
20
+ import { F as Form } from "../../../Form-DyFBmVya.js";
21
21
  import "zod";
22
22
  import "../../Modal/Modal.mjs";
23
23
  import "../../Toaster/Toast.mjs";
@@ -1 +1 @@
1
- {"version":3,"file":"DictionaryDetailsForm.mjs","sources":["../../../../src/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.tsx"],"sourcesContent":["'use client';\n\nimport { Dictionary as DistantDictionary } from '@intlayer/backend';\nimport { Dictionary } from '@intlayer/core';\nimport { ArrowUpFromLine, Save } from 'lucide-react';\nimport { type FC, useEffect } from 'react';\nimport { useDictionary } from 'react-intlayer';\nimport { useGetProjects, usePushDictionaries } from '../../../hooks';\nimport { cn } from '../../../utils/cn';\nimport { useAuth } from '../../Auth';\nimport { Form, useForm } from '../../Form';\nimport { MultiSelect } from '../../Select';\nimport { useToast } from '../../Toaster';\nimport { dictionaryDetailsContent } from './dictionaryDetails.content';\nimport {\n getDictionaryDetailsSchema,\n DictionaryDetailsFormData,\n} from './DictionaryDetailsSchema';\n\ntype DictionaryDetailsProps = {\n dictionary: Dictionary;\n};\n\nexport const DictionaryDetailsForm: FC<DictionaryDetailsProps> = ({\n dictionary,\n}) => {\n const { session } = useAuth();\n const { project } = session ?? {};\n const { pushDictionaries } = usePushDictionaries();\n const { data: projects } = useGetProjects();\n\n const DictionaryDetailsSchema = getDictionaryDetailsSchema(\n String(project?._id)\n );\n const { form, isSubmitting } = useForm(DictionaryDetailsSchema, {\n defaultValues: dictionary,\n });\n const {\n pushDictionariesToasts,\n updateDictionaryToasts,\n titleInput,\n keyInput,\n descriptionInput,\n publishButton,\n saveButton,\n projectInput,\n } = useDictionary(dictionaryDetailsContent);\n const { toast } = useToast();\n\n useEffect(() => {\n form.reset(dictionary);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [dictionary, form?.reset]);\n\n const isFormEdited = form.formState.isDirty;\n const isLocalDictionary =\n typeof (dictionary as DistantDictionary)?._id === 'undefined';\n\n const onSubmitSuccess = async (data: DictionaryDetailsFormData) => {\n await pushDictionaries([\n {\n ...dictionary,\n ...data,\n },\n ])\n .then(() => {\n if (isLocalDictionary) {\n toast({\n title: pushDictionariesToasts.updated.title.value,\n description: pushDictionariesToasts.updated.description.value,\n variant: 'success',\n });\n } else {\n toast({\n title: updateDictionaryToasts.updated.title.value,\n description: updateDictionaryToasts.updated.description.value,\n variant: 'success',\n });\n }\n })\n .catch((error) => {\n if (isLocalDictionary) {\n toast({\n title: pushDictionariesToasts.failed.title.value,\n description: pushDictionariesToasts.failed.description.value,\n variant: 'error',\n });\n } else {\n toast({\n title: updateDictionaryToasts.failed.title.value,\n description: error.message,\n variant: 'error',\n });\n }\n });\n };\n\n return (\n <Form\n className=\"flex size-full flex-1 flex-col gap-8\"\n {...form}\n schema={DictionaryDetailsSchema}\n onSubmitSuccess={onSubmitSuccess}\n >\n <div className=\"flex size-full flex-1 gap-8 max-md:flex-col\">\n <Form.EditableFieldInput\n name=\"title\"\n label={titleInput.label.value}\n placeholder={titleInput.placeholder.value}\n description={titleInput.description.value}\n disabled={isSubmitting}\n />\n <Form.EditableFieldInput\n name=\"key\"\n label={keyInput.label.value}\n placeholder={keyInput.label.value}\n description={keyInput.description.value}\n disabled={isSubmitting}\n required\n />\n </div>\n\n <Form.EditableFieldTextArea\n name=\"description\"\n label={descriptionInput.label.value}\n placeholder={descriptionInput.placeholder.value}\n description={descriptionInput.description.value}\n disabled={isSubmitting}\n />\n\n <Form.MultiSelect\n name=\"projectIds\"\n label={projectInput.label.value}\n description={projectInput.description.value}\n >\n <MultiSelect.Trigger\n getBadgeValue={(value) =>\n projects?.data?.find((project) => String(project._id) === value)\n ?.name ?? value\n }\n >\n <MultiSelect.Input placeholder={projectInput.placeholder.value} />\n </MultiSelect.Trigger>\n <MultiSelect.Content>\n <MultiSelect.List>\n {projects?.data?.map((project) => (\n <MultiSelect.Item\n key={String(project._id)}\n value={String(project._id)}\n >\n {project.name}\n </MultiSelect.Item>\n ))}\n </MultiSelect.List>\n </MultiSelect.Content>\n </Form.MultiSelect>\n\n {isLocalDictionary ? (\n <Form.Button\n type=\"submit\"\n label={publishButton.label.value}\n disabled={isSubmitting || !isFormEdited}\n Icon={ArrowUpFromLine}\n isFullWidth={false}\n color=\"text\"\n isLoading={isSubmitting}\n className=\"ml-auto\"\n >\n {publishButton.text}\n </Form.Button>\n ) : (\n <Form.Button\n type=\"submit\"\n label={saveButton.label.value}\n disabled={isSubmitting}\n isFullWidth={false}\n className={cn('ml-auto', isFormEdited ? '' : 'invisible')}\n Icon={Save}\n color=\"text\"\n isLoading={isSubmitting}\n >\n {saveButton.text}\n </Form.Button>\n )}\n </Form>\n );\n};\n"],"names":["jsxs","jsx","project"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuBO,MAAM,wBAAoD,CAAC;AAAA,EAChE;AACF,MAAM;AACE,QAAA,EAAE,YAAY;AACpB,QAAM,EAAE,QAAA,IAAY,WAAW;AACzB,QAAA,EAAE,qBAAqB;AAC7B,QAAM,EAAE,MAAM,SAAS,IAAI,eAAe;AAE1C,QAAM,0BAA0B;AAAA,IAC9B,OAAO,SAAS,GAAG;AAAA,EAAA;AAErB,QAAM,EAAE,MAAM,iBAAiB,QAAQ,yBAAyB;AAAA,IAC9D,eAAe;AAAA,EAAA,CAChB;AACK,QAAA;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA,IACE,cAAc,wBAAwB;AACpC,QAAA,EAAE,UAAU;AAElB,YAAU,MAAM;AACd,SAAK,MAAM,UAAU;AAAA,EAEpB,GAAA,CAAC,YAAY,MAAM,KAAK,CAAC;AAEtB,QAAA,eAAe,KAAK,UAAU;AAC9B,QAAA,oBACJ,OAAQ,YAAkC,QAAQ;AAE9C,QAAA,kBAAkB,OAAO,SAAoC;AACjE,UAAM,iBAAiB;AAAA,MACrB;AAAA,QACE,GAAG;AAAA,QACH,GAAG;AAAA,MACL;AAAA,IAAA,CACD,EACE,KAAK,MAAM;AACV,UAAI,mBAAmB;AACf,cAAA;AAAA,UACJ,OAAO,uBAAuB,QAAQ,MAAM;AAAA,UAC5C,aAAa,uBAAuB,QAAQ,YAAY;AAAA,UACxD,SAAS;AAAA,QAAA,CACV;AAAA,MAAA,OACI;AACC,cAAA;AAAA,UACJ,OAAO,uBAAuB,QAAQ,MAAM;AAAA,UAC5C,aAAa,uBAAuB,QAAQ,YAAY;AAAA,UACxD,SAAS;AAAA,QA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;AAAA,QACd;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIR;"}
1
+ {"version":3,"file":"DictionaryDetailsForm.mjs","sources":["../../../../src/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.tsx"],"sourcesContent":["'use client';\n\nimport { Dictionary as DistantDictionary } from '@intlayer/backend';\nimport { Dictionary } from '@intlayer/core';\nimport { ArrowUpFromLine, Save } from 'lucide-react';\nimport { type FC, useEffect } from 'react';\n// @ts-ignore react-intlayer not build yet\nimport { useDictionary } from 'react-intlayer';\nimport { useGetProjects, usePushDictionaries } from '../../../hooks';\nimport { cn } from '../../../utils/cn';\nimport { useAuth } from '../../Auth';\nimport { Form, useForm } from '../../Form';\nimport { MultiSelect } from '../../Select';\nimport { useToast } from '../../Toaster';\nimport { dictionaryDetailsContent } from './dictionaryDetails.content';\nimport {\n getDictionaryDetailsSchema,\n DictionaryDetailsFormData,\n} from './DictionaryDetailsSchema';\n\ntype DictionaryDetailsProps = {\n dictionary: Dictionary;\n};\n\nexport const DictionaryDetailsForm: FC<DictionaryDetailsProps> = ({\n dictionary,\n}) => {\n const { session } = useAuth();\n const { project } = session ?? {};\n const { pushDictionaries } = usePushDictionaries();\n const { data: projects } = useGetProjects();\n\n const DictionaryDetailsSchema = getDictionaryDetailsSchema(\n String(project?._id)\n );\n const { form, isSubmitting } = useForm(DictionaryDetailsSchema, {\n defaultValues: dictionary,\n });\n const {\n pushDictionariesToasts,\n updateDictionaryToasts,\n titleInput,\n keyInput,\n descriptionInput,\n publishButton,\n saveButton,\n projectInput,\n } = useDictionary(dictionaryDetailsContent);\n const { toast } = useToast();\n\n useEffect(() => {\n form.reset(dictionary);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [dictionary, form?.reset]);\n\n const isFormEdited = form.formState.isDirty;\n const isLocalDictionary =\n typeof (dictionary as DistantDictionary)?._id === 'undefined';\n\n const onSubmitSuccess = async (data: DictionaryDetailsFormData) => {\n await pushDictionaries([\n {\n ...dictionary,\n ...data,\n },\n ])\n .then(() => {\n if (isLocalDictionary) {\n toast({\n title: pushDictionariesToasts.updated.title.value,\n description: pushDictionariesToasts.updated.description.value,\n variant: 'success',\n });\n } else {\n toast({\n title: updateDictionaryToasts.updated.title.value,\n description: updateDictionaryToasts.updated.description.value,\n variant: 'success',\n });\n }\n })\n .catch((error) => {\n if (isLocalDictionary) {\n toast({\n title: pushDictionariesToasts.failed.title.value,\n description: pushDictionariesToasts.failed.description.value,\n variant: 'error',\n });\n } else {\n toast({\n title: updateDictionaryToasts.failed.title.value,\n description: error.message,\n variant: 'error',\n });\n }\n });\n };\n\n return (\n <Form\n className=\"flex size-full flex-1 flex-col gap-8\"\n {...form}\n schema={DictionaryDetailsSchema}\n onSubmitSuccess={onSubmitSuccess}\n >\n <div className=\"flex size-full flex-1 gap-8 max-md:flex-col\">\n <Form.EditableFieldInput\n name=\"title\"\n label={titleInput.label.value}\n placeholder={titleInput.placeholder.value}\n description={titleInput.description.value}\n disabled={isSubmitting}\n />\n <Form.EditableFieldInput\n name=\"key\"\n label={keyInput.label.value}\n placeholder={keyInput.label.value}\n description={keyInput.description.value}\n disabled={isSubmitting}\n required\n />\n </div>\n\n <Form.EditableFieldTextArea\n name=\"description\"\n label={descriptionInput.label.value}\n placeholder={descriptionInput.placeholder.value}\n description={descriptionInput.description.value}\n disabled={isSubmitting}\n />\n\n <Form.MultiSelect\n name=\"projectIds\"\n label={projectInput.label.value}\n description={projectInput.description.value}\n >\n <MultiSelect.Trigger\n getBadgeValue={(value) =>\n projects?.data?.find((project) => String(project._id) === value)\n ?.name ?? value\n }\n >\n <MultiSelect.Input placeholder={projectInput.placeholder.value} />\n </MultiSelect.Trigger>\n <MultiSelect.Content>\n <MultiSelect.List>\n {projects?.data?.map((project) => (\n <MultiSelect.Item\n key={String(project._id)}\n value={String(project._id)}\n >\n {project.name}\n </MultiSelect.Item>\n ))}\n </MultiSelect.List>\n </MultiSelect.Content>\n </Form.MultiSelect>\n\n {isLocalDictionary ? (\n <Form.Button\n type=\"submit\"\n label={publishButton.label.value}\n disabled={isSubmitting || !isFormEdited}\n Icon={ArrowUpFromLine}\n isFullWidth={false}\n color=\"text\"\n isLoading={isSubmitting}\n className=\"ml-auto\"\n >\n {publishButton.text}\n </Form.Button>\n ) : (\n <Form.Button\n type=\"submit\"\n label={saveButton.label.value}\n disabled={isSubmitting}\n isFullWidth={false}\n className={cn('ml-auto', isFormEdited ? '' : 'invisible')}\n Icon={Save}\n color=\"text\"\n isLoading={isSubmitting}\n >\n {saveButton.text}\n </Form.Button>\n )}\n </Form>\n );\n};\n"],"names":["jsxs","jsx","project"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBO,MAAM,wBAAoD,CAAC;AAAA,EAChE;AACF,MAAM;AACE,QAAA,EAAE,YAAY;AACpB,QAAM,EAAE,QAAA,IAAY,WAAW;AACzB,QAAA,EAAE,qBAAqB;AAC7B,QAAM,EAAE,MAAM,SAAS,IAAI,eAAe;AAE1C,QAAM,0BAA0B;AAAA,IAC9B,OAAO,SAAS,GAAG;AAAA,EAAA;AAErB,QAAM,EAAE,MAAM,iBAAiB,QAAQ,yBAAyB;AAAA,IAC9D,eAAe;AAAA,EAAA,CAChB;AACK,QAAA;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA,IACE,cAAc,wBAAwB;AACpC,QAAA,EAAE,UAAU;AAElB,YAAU,MAAM;AACd,SAAK,MAAM,UAAU;AAAA,EAEpB,GAAA,CAAC,YAAY,MAAM,KAAK,CAAC;AAEtB,QAAA,eAAe,KAAK,UAAU;AAC9B,QAAA,oBACJ,OAAQ,YAAkC,QAAQ;AAE9C,QAAA,kBAAkB,OAAO,SAAoC;AACjE,UAAM,iBAAiB;AAAA,MACrB;AAAA,QACE,GAAG;AAAA,QACH,GAAG;AAAA,MACL;AAAA,IAAA,CACD,EACE,KAAK,MAAM;AACV,UAAI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AAA,QAAA,IAGjBA,kCAAA;AAAA,UAAC,KAAK;AAAA,UAAL;AAAA,YACC,MAAK;AAAA,YACL,OAAO,WAAW,MAAM;AAAA,YACxB,UAAU;AAAA,YACV,aAAa;AAAA,YACb,WAAW,GAAG,WAAW,eAAe,KAAK,WAAW;AAAA,YACxD,MAAM;AAAA,YACN,OAAM;AAAA,YACN,WAAW;AAAA,YAEV,UAAW,WAAA;AAAA,UAAA;AAAA,QACd;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIR;"}
@@ -1 +1 @@
1
- {"version":3,"file":"DictionaryDetailsSchema.cjs","sources":["../../../../src/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsSchema.ts"],"sourcesContent":["import { t } from 'react-intlayer';\nimport { z } from 'zod';\n\nexport const getDictionaryDetailsSchema = (projectId: string) => {\n // Title Field Error Messages\n const titleRequiredError = t({\n en: 'Please enter a name for your organization.',\n fr: 'Veuillez saisir un nom pour votre organisation.',\n es: 'Por favor, ingrese un nombre para su organización.',\n });\n\n const titleInvalidTypeError = t({\n en: 'The organization name must be a valid string.',\n fr: 'Le nom de votre organisation doit être une chaîne valide.',\n es: 'El nombre de su organización debe ser una cadena válida.',\n });\n\n const titleMinLengthError = t({\n en: 'The organization name must be at least 4 characters long.',\n fr: 'Le nom de votre organisation doit comporter au moins 4 caractères.',\n es: 'El nombre de su organización debe tener al menos 4 caracteres.',\n });\n\n // Key Field Error Messages\n const keyRequiredError = t({\n en: 'Please enter a key for your organization.',\n fr: 'Veuillez saisir une clé pour votre organisation.',\n es: 'Por favor, ingrese una clave para su organización.',\n });\n\n const keyInvalidTypeError = t({\n en: 'The key must be a valid string.',\n fr: 'La clé doit être une chaîne valide.',\n es: 'La clave debe ser una cadena válida.',\n });\n\n const keySpaceError = t({\n en: 'The key cannot contain spaces or special characters.',\n fr: \"La clé ne peut pas contenir d'espaces ou de caractères spéciaux.\",\n es: 'La clave no puede contener espacios o caracteres especiales.',\n });\n\n const keyMinLengthError = t({\n en: 'The key must be at least 4 characters long.',\n fr: 'La clé doit comporter au moins 4 caractères.',\n es: 'La clave debe tener al menos 4 caracteres.',\n });\n\n // Description Field Error Messages\n const descriptionRequiredError = t({\n en: 'Please enter a description for your organization.',\n fr: 'Veuillez saisir une description pour votre organisation.',\n es: 'Por favor, ingrese una descripción para su organización.',\n });\n\n const descriptionInvalidTypeError = t({\n en: 'The description must be a valid string.',\n fr: 'La description doit être une chaîne valide.',\n es: 'La descripción debe ser una cadena válida.',\n });\n\n const requiredErrorProjectId = t({\n en: 'Please select a project',\n fr: 'Veuillez sélectionner un projet',\n es: 'Por favor, seleccione un proyecto',\n });\n\n const invalidTypeErrorProjectId = t({\n en: 'Please select a valid project',\n fr: 'Veuillez sélectionner un projet valide',\n es: 'Por favor, seleccione un proyecto válido',\n });\n\n return z.object({\n title: z\n .string({\n required_error: titleRequiredError,\n invalid_type_error: titleInvalidTypeError,\n })\n // Can be length of 0 or > 4\n .refine((val) => val.length === 0 || val.length >= 4, {\n message: titleMinLengthError,\n })\n .optional(),\n key: z\n .string({\n required_error: keyRequiredError,\n invalid_type_error: keyInvalidTypeError,\n })\n .min(4, { message: keyMinLengthError })\n /**\n * Valid :\n * my-key\n * my_key\n *\n * Invalid :\n * my key\n * my.key\n */\n .regex(/^[a-zA-Z0-9-_]+$/, { message: keySpaceError })\n .default(''),\n description: z\n .string({\n required_error: descriptionRequiredError,\n invalid_type_error: descriptionInvalidTypeError,\n })\n .optional(),\n projectIds: z\n .array(\n z.string({\n required_error: requiredErrorProjectId,\n invalid_type_error: invalidTypeErrorProjectId,\n })\n )\n .default([projectId]),\n });\n};\n\nexport type DictionaryDetailsFormData = z.infer<\n ReturnType<typeof getDictionaryDetailsSchema>\n>;\n"],"names":["t","z"],"mappings":";;;;AAGa,MAAA,6BAA6B,CAAC,cAAsB;AAE/D,QAAM,qBAAqBA,cAAAA,EAAE;AAAA,IAC3B,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,E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,UAAU,GAAG;AAAA,MACpD,SAAS;AAAA,IACV,CAAA,EACA,SAAS;AAAA,IACZ,KAAKA,MACF,OAAO;AAAA,MACN,gBAAgB;AAAA,MAChB,oBAAoB;AAAA,IACrB,CAAA,EACA,IAAI,GAAG,EAAE,SAAS,kBAAkB,CAAC,EAUrC,MAAM,oBAAoB,EAAE,SAAS,cAAe,CAAA,EACpD,QAAQ,EAAE;AAAA,IACb,aAAaA,MACV,OAAO;AAAA,MACN,gBAAgB;AAAA,MAChB,oBAAoB;AAAA,IACrB,CAAA,EACA,SAAS;AAAA,IACZ,YAAYA,IACT,EAAA;AAAA,MACCA,IAAAA,EAAE,OAAO;AAAA,QACP,gBAAgB;AAAA,QAChB,oBAAoB;AAAA,MAAA,CACrB;AAAA,IAAA,EAEF,QAAQ,CAAC,SAAS,CAAC;AAAA,EAAA,CACvB;AACH;;"}
1
+ {"version":3,"file":"DictionaryDetailsSchema.cjs","sources":["../../../../src/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsSchema.ts"],"sourcesContent":["// @ts-ignore react-intlayer not build yet\nimport { t } from 'react-intlayer';\nimport { z } from 'zod';\n\nexport const getDictionaryDetailsSchema = (projectId: string) => {\n // Title Field Error Messages\n const titleRequiredError = t({\n en: 'Please enter a name for your organization.',\n fr: 'Veuillez saisir un nom pour votre organisation.',\n es: 'Por favor, ingrese un nombre para su organización.',\n });\n\n const titleInvalidTypeError = t({\n en: 'The organization name must be a valid string.',\n fr: 'Le nom de votre organisation doit être une chaîne valide.',\n es: 'El nombre de su organización debe ser una cadena válida.',\n });\n\n const titleMinLengthError = t({\n en: 'The organization name must be at least 4 characters long.',\n fr: 'Le nom de votre organisation doit comporter au moins 4 caractères.',\n es: 'El nombre de su organización debe tener al menos 4 caracteres.',\n });\n\n // Key Field Error Messages\n const keyRequiredError = t({\n en: 'Please enter a key for your organization.',\n fr: 'Veuillez saisir une clé pour votre organisation.',\n es: 'Por favor, ingrese una clave para su organización.',\n });\n\n const keyInvalidTypeError = t({\n en: 'The key must be a valid string.',\n fr: 'La clé doit être une chaîne valide.',\n es: 'La clave debe ser una cadena válida.',\n });\n\n const keySpaceError = t({\n en: 'The key cannot contain spaces or special characters.',\n fr: \"La clé ne peut pas contenir d'espaces ou de caractères spéciaux.\",\n es: 'La clave no puede contener espacios o caracteres especiales.',\n });\n\n const keyMinLengthError = t({\n en: 'The key must be at least 4 characters long.',\n fr: 'La clé doit comporter au moins 4 caractères.',\n es: 'La clave debe tener al menos 4 caracteres.',\n });\n\n // Description Field Error Messages\n const descriptionRequiredError = t({\n en: 'Please enter a description for your organization.',\n fr: 'Veuillez saisir une description pour votre organisation.',\n es: 'Por favor, ingrese una descripción para su organización.',\n });\n\n const descriptionInvalidTypeError = t({\n en: 'The description must be a valid string.',\n fr: 'La description doit être une chaîne valide.',\n es: 'La descripción debe ser una cadena válida.',\n });\n\n const requiredErrorProjectId = t({\n en: 'Please select a project',\n fr: 'Veuillez sélectionner un projet',\n es: 'Por favor, seleccione un proyecto',\n });\n\n const invalidTypeErrorProjectId = t({\n en: 'Please select a valid project',\n fr: 'Veuillez sélectionner un projet valide',\n es: 'Por favor, seleccione un proyecto válido',\n });\n\n return z.object({\n title: z\n .string({\n required_error: titleRequiredError,\n invalid_type_error: titleInvalidTypeError,\n })\n // Can be length of 0 or > 4\n .refine((val) => val.length === 0 || val.length >= 4, {\n message: titleMinLengthError,\n })\n .optional(),\n key: z\n .string({\n required_error: keyRequiredError,\n invalid_type_error: keyInvalidTypeError,\n })\n .min(4, { message: keyMinLengthError })\n /**\n * Valid :\n * my-key\n * my_key\n *\n * Invalid :\n * my key\n * my.key\n */\n .regex(/^[a-zA-Z0-9-_]+$/, { message: keySpaceError })\n .default(''),\n description: z\n .string({\n required_error: descriptionRequiredError,\n invalid_type_error: descriptionInvalidTypeError,\n })\n .optional(),\n projectIds: z\n .array(\n z.string({\n required_error: requiredErrorProjectId,\n invalid_type_error: invalidTypeErrorProjectId,\n })\n )\n .default([projectId]),\n });\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IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,EAAA,CACL;AAED,SAAOC,IAAAA,EAAE,OAAO;AAAA,IACd,OAAOA,MACJ,OAAO;AAAA,MACN,gBAAgB;AAAA,MAChB,oBAAoB;AAAA,IAAA,CACrB,EAEA,OAAO,CAAC,QAAQ,IAAI,WAAW,KAAK,IAAI,UAAU,GAAG;AAAA,MACpD,SAAS;AAAA,IACV,CAAA,EACA,SAAS;AAAA,IACZ,KAAKA,MACF,OAAO;AAAA,MACN,gBAAgB;AAAA,MAChB,oBAAoB;AAAA,IACrB,CAAA,EACA,IAAI,GAAG,EAAE,SAAS,kBAAkB,CAAC,EAUrC,MAAM,oBAAoB,EAAE,SAAS,cAAe,CAAA,EACpD,QAAQ,EAAE;AAAA,IACb,aAAaA,MACV,OAAO;AAAA,MACN,gBAAgB;AAAA,MAChB,oBAAoB;AAAA,IACrB,CAAA,EACA,SAAS;AAAA,IACZ,YAAYA,IACT,EAAA;AAAA,MACCA,IAAAA,EAAE,OAAO;AAAA,QACP,gBAAgB;AAAA,QAChB,oBAAoB;AAAA,MAAA,CACrB;AAAA,IAAA,EAEF,QAAQ,CAAC,SAAS,CAAC;AAAA,EAAA,CACvB;AACH;;"}
@@ -1,18 +1,17 @@
1
1
  import { z } from 'zod';
2
-
3
2
  export declare const getDictionaryDetailsSchema: (projectId: string) => z.ZodObject<{
4
3
  title: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
5
4
  key: z.ZodDefault<z.ZodString>;
6
5
  description: z.ZodOptional<z.ZodString>;
7
6
  projectIds: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
8
7
  }, "strip", z.ZodTypeAny, {
9
- projectIds: string[];
10
8
  key: string;
9
+ projectIds: string[];
11
10
  title?: string | undefined;
12
11
  description?: string | undefined;
13
12
  }, {
14
- projectIds?: string[] | undefined;
15
13
  key?: string | undefined;
14
+ projectIds?: string[] | undefined;
16
15
  title?: string | undefined;
17
16
  description?: string | undefined;
18
17
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"DictionaryDetailsSchema.d.ts","sourceRoot":"","sources":["../../../../src/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsSchema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,0BAA0B,cAAe,MAAM;;;;;;;;;;;;;;;EAiH3D,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAC7C,UAAU,CAAC,OAAO,0BAA0B,CAAC,CAC9C,CAAC"}
1
+ {"version":3,"file":"DictionaryDetailsSchema.d.ts","sourceRoot":"","sources":["../../../../src/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsSchema.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,0BAA0B,cAAe,MAAM;;;;;;;;;;;;;;;EAiH3D,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAC7C,UAAU,CAAC,OAAO,0BAA0B,CAAC,CAC9C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"DictionaryDetailsSchema.mjs","sources":["../../../../src/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsSchema.ts"],"sourcesContent":["import { t } from 'react-intlayer';\nimport { z } from 'zod';\n\nexport const getDictionaryDetailsSchema = (projectId: string) => {\n // Title Field Error Messages\n const titleRequiredError = t({\n en: 'Please enter a name for your organization.',\n fr: 'Veuillez saisir un nom pour votre organisation.',\n es: 'Por favor, ingrese un nombre para su organización.',\n });\n\n const titleInvalidTypeError = t({\n en: 'The organization name must be a valid string.',\n fr: 'Le nom de votre organisation doit être une chaîne valide.',\n es: 'El nombre de su organización debe ser una cadena válida.',\n });\n\n const titleMinLengthError = t({\n en: 'The organization name must be at least 4 characters long.',\n fr: 'Le nom de votre organisation doit comporter au moins 4 caractères.',\n es: 'El nombre de su organización debe tener al menos 4 caracteres.',\n });\n\n // Key Field Error Messages\n const keyRequiredError = t({\n en: 'Please enter a key for your organization.',\n fr: 'Veuillez saisir une clé pour votre organisation.',\n es: 'Por favor, ingrese una clave para su organización.',\n });\n\n const keyInvalidTypeError = t({\n en: 'The key must be a valid string.',\n fr: 'La clé doit être une chaîne valide.',\n es: 'La clave debe ser una cadena válida.',\n });\n\n const keySpaceError = t({\n en: 'The key cannot contain spaces or special characters.',\n fr: \"La clé ne peut pas contenir d'espaces ou de caractères spéciaux.\",\n es: 'La clave no puede contener espacios o caracteres especiales.',\n });\n\n const keyMinLengthError = t({\n en: 'The key must be at least 4 characters long.',\n fr: 'La clé doit comporter au moins 4 caractères.',\n es: 'La clave debe tener al menos 4 caracteres.',\n });\n\n // Description Field Error Messages\n const descriptionRequiredError = t({\n en: 'Please enter a description for your organization.',\n fr: 'Veuillez saisir une description pour votre organisation.',\n es: 'Por favor, ingrese una descripción para su organización.',\n });\n\n const descriptionInvalidTypeError = t({\n en: 'The description must be a valid string.',\n fr: 'La description doit être une chaîne valide.',\n es: 'La descripción debe ser una cadena válida.',\n });\n\n const requiredErrorProjectId = t({\n en: 'Please select a project',\n fr: 'Veuillez sélectionner un projet',\n es: 'Por favor, seleccione un proyecto',\n });\n\n const invalidTypeErrorProjectId = t({\n en: 'Please select a valid project',\n fr: 'Veuillez sélectionner un projet valide',\n es: 'Por favor, seleccione un proyecto válido',\n });\n\n return z.object({\n title: z\n .string({\n required_error: titleRequiredError,\n invalid_type_error: titleInvalidTypeError,\n })\n // Can be length of 0 or > 4\n .refine((val) => val.length === 0 || val.length >= 4, {\n message: titleMinLengthError,\n })\n .optional(),\n key: z\n .string({\n required_error: keyRequiredError,\n invalid_type_error: keyInvalidTypeError,\n })\n .min(4, { message: keyMinLengthError })\n /**\n * Valid :\n * my-key\n * my_key\n *\n * Invalid :\n * my key\n * my.key\n */\n .regex(/^[a-zA-Z0-9-_]+$/, { message: keySpaceError })\n .default(''),\n description: z\n .string({\n required_error: descriptionRequiredError,\n invalid_type_error: descriptionInvalidTypeError,\n })\n .optional(),\n projectIds: z\n .array(\n z.string({\n required_error: requiredErrorProjectId,\n invalid_type_error: invalidTypeErrorProjectId,\n })\n )\n .default([projectId]),\n });\n};\n\nexport type DictionaryDetailsFormData = z.infer<\n ReturnType<typeof getDictionaryDetailsSchema>\n>;\n"],"names":[],"mappings":";;AAGa,MAAA,6BAA6B,CAAC,cAAsB;AAE/D,QAAM,qBAAqB,EAAE;AAAA,IAC3B,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,EAAA,CACL;AAED,QAAM,wBAAwB,EAAE;AAAA,IAC9B,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,EAAA,CACL;AAED,QAAM,sBAAsB,EAAE;AAAA,IAC5B,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,EAAA,CACL;AAGD,QAAM,mBAAmB,EAAE;AAAA,IACzB,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,EAAA,CACL;AAED,QAAM,sBAAsB,EAAE;AAAA,IAC5B,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,EAAA,CACL;AAED,QAAM,gBAAgB,EAAE;AAAA,IACtB,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,EAAA,CACL;AAED,QAAM,oBAAoB,EAAE;AAAA,IAC1B,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,EAAA,CACL;AAGD,QAAM,2BAA2B,EAAE;AAAA,IACjC,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,EAAA,CACL;AAED,QAAM,8BAA8B,EAAE;AAAA,IACpC,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,EAAA,CACL;AAED,QAAM,yBAAyB,EAAE;AAAA,IAC/B,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,EAAA,CACL;AAED,QAAM,4BAA4B,EAAE;AAAA,IAClC,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,EAAA,CACL;AAED,SAAO,EAAE,OAAO;AAAA,IACd,OAAO,EACJ,OAAO;AAAA,MACN,gBAAgB;AAAA,MAChB,oBAAoB;AAAA,IAAA,CACrB,EAEA,OAAO,CAAC,QAAQ,IAAI,WAAW,KAAK,IAAI,UAAU,GAAG;AAAA,MACpD,SAAS;AAAA,IACV,CAAA,EACA,SAAS;AAAA,IACZ,KAAK,EACF,OAAO;AAAA,MACN,gBAAgB;AAAA,MAChB,oBAAoB;AAAA,IACrB,CAAA,EACA,IAAI,GAAG,EAAE,SAAS,kBAAkB,CAAC,EAUrC,MAAM,oBAAoB,EAAE,SAAS,cAAe,CAAA,EACpD,QAAQ,EAAE;AAAA,IACb,aAAa,EACV,OAAO;AAAA,MACN,gBAAgB;AAAA,MAChB,oBAAoB;AAAA,IACrB,CAAA,EACA,SAAS;AAAA,IACZ,YAAY,EACT;AAAA,MACC,EAAE,OAAO;AAAA,QACP,gBAAgB;AAAA,QAChB,oBAAoB;AAAA,MAAA,CACrB;AAAA,IAAA,EAEF,QAAQ,CAAC,SAAS,CAAC;AAAA,EAAA,CACvB;AACH;"}
1
+ {"version":3,"file":"DictionaryDetailsSchema.mjs","sources":["../../../../src/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsSchema.ts"],"sourcesContent":["// @ts-ignore react-intlayer not build yet\nimport { t } from 'react-intlayer';\nimport { z } from 'zod';\n\nexport const getDictionaryDetailsSchema = (projectId: string) => {\n // Title Field Error Messages\n const titleRequiredError = t({\n en: 'Please enter a name for your organization.',\n fr: 'Veuillez saisir un nom pour votre organisation.',\n es: 'Por favor, ingrese un nombre para su organización.',\n });\n\n const titleInvalidTypeError = t({\n en: 'The organization name must be a valid string.',\n fr: 'Le nom de votre organisation doit être une chaîne valide.',\n es: 'El nombre de su organización debe ser una cadena válida.',\n });\n\n const titleMinLengthError = t({\n en: 'The organization name must be at least 4 characters long.',\n fr: 'Le nom de votre organisation doit comporter au moins 4 caractères.',\n es: 'El nombre de su organización debe tener al menos 4 caracteres.',\n });\n\n // Key Field Error Messages\n const keyRequiredError = t({\n en: 'Please enter a key for your organization.',\n fr: 'Veuillez saisir une clé pour votre organisation.',\n es: 'Por favor, ingrese una clave para su organización.',\n });\n\n const keyInvalidTypeError = t({\n en: 'The key must be a valid string.',\n fr: 'La clé doit être une chaîne valide.',\n es: 'La clave debe ser una cadena válida.',\n });\n\n const keySpaceError = t({\n en: 'The key cannot contain spaces or special characters.',\n fr: \"La clé ne peut pas contenir d'espaces ou de caractères spéciaux.\",\n es: 'La clave no puede contener espacios o caracteres especiales.',\n });\n\n const keyMinLengthError = t({\n en: 'The key must be at least 4 characters long.',\n fr: 'La clé doit comporter au moins 4 caractères.',\n es: 'La clave debe tener al menos 4 caracteres.',\n });\n\n // Description Field Error Messages\n const descriptionRequiredError = t({\n en: 'Please enter a description for your organization.',\n fr: 'Veuillez saisir une description pour votre organisation.',\n es: 'Por favor, ingrese una descripción para su organización.',\n });\n\n const descriptionInvalidTypeError = t({\n en: 'The description must be a valid string.',\n fr: 'La description doit être une chaîne valide.',\n es: 'La descripción debe ser una cadena válida.',\n });\n\n const requiredErrorProjectId = t({\n en: 'Please select a project',\n fr: 'Veuillez sélectionner un projet',\n es: 'Por favor, seleccione un proyecto',\n });\n\n const invalidTypeErrorProjectId = t({\n en: 'Please select a valid project',\n fr: 'Veuillez sélectionner un projet valide',\n es: 'Por favor, seleccione un proyecto válido',\n });\n\n return z.object({\n title: z\n .string({\n required_error: titleRequiredError,\n invalid_type_error: titleInvalidTypeError,\n })\n // Can be length of 0 or > 4\n .refine((val) => val.length === 0 || val.length >= 4, {\n message: titleMinLengthError,\n })\n .optional(),\n key: z\n .string({\n required_error: keyRequiredError,\n invalid_type_error: keyInvalidTypeError,\n })\n .min(4, { message: keyMinLengthError })\n /**\n * Valid :\n * my-key\n * my_key\n *\n * Invalid :\n * my key\n * my.key\n */\n .regex(/^[a-zA-Z0-9-_]+$/, { message: keySpaceError })\n .default(''),\n description: z\n .string({\n required_error: descriptionRequiredError,\n invalid_type_error: descriptionInvalidTypeError,\n })\n .optional(),\n projectIds: z\n .array(\n z.string({\n required_error: requiredErrorProjectId,\n invalid_type_error: invalidTypeErrorProjectId,\n })\n )\n .default([projectId]),\n });\n};\n\nexport type DictionaryDetailsFormData = z.infer<\n ReturnType<typeof getDictionaryDetailsSchema>\n>;\n"],"names":[],"mappings":";;AAIa,MAAA,6BAA6B,CAAC,cAAsB;AAE/D,QAAM,qBAAqB,EAAE;AAAA,IAC3B,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,EAAA,CACL;AAED,QAAM,wBAAwB,EAAE;AAAA,IAC9B,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,EAAA,CACL;AAED,QAAM,sBAAsB,EAAE;AAAA,IAC5B,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,EAAA,CACL;AAGD,QAAM,mBAAmB,EAAE;AAAA,IACzB,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,EAAA,CACL;AAED,QAAM,sBAAsB,EAAE;AAAA,IAC5B,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,EAAA,CACL;AAED,QAAM,gBAAgB,EAAE;AAAA,IACtB,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,EAAA,CACL;AAED,QAAM,oBAAoB,EAAE;AAAA,IAC1B,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,EAAA,CACL;AAGD,QAAM,2BAA2B,EAAE;AAAA,IACjC,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,EAAA,CACL;AAED,QAAM,8BAA8B,EAAE;AAAA,IACpC,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,EAAA,CACL;AAED,QAAM,yBAAyB,EAAE;AAAA,IAC/B,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,EAAA,CACL;AAED,QAAM,4BAA4B,EAAE;AAAA,IAClC,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,EAAA,CACL;AAED,SAAO,EAAE,OAAO;AAAA,IACd,OAAO,EACJ,OAAO;AAAA,MACN,gBAAgB;AAAA,MAChB,oBAAoB;AAAA,IAAA,CACrB,EAEA,OAAO,CAAC,QAAQ,IAAI,WAAW,KAAK,IAAI,UAAU,GAAG;AAAA,MACpD,SAAS;AAAA,IACV,CAAA,EACA,SAAS;AAAA,IACZ,KAAK,EACF,OAAO;AAAA,MACN,gBAAgB;AAAA,MAChB,oBAAoB;AAAA,IACrB,CAAA,EACA,IAAI,GAAG,EAAE,SAAS,kBAAkB,CAAC,EAUrC,MAAM,oBAAoB,EAAE,SAAS,cAAe,CAAA,EACpD,QAAQ,EAAE;AAAA,IACb,aAAa,EACV,OAAO;AAAA,MACN,gBAAgB;AAAA,MAChB,oBAAoB;AAAA,IACrB,CAAA,EACA,SAAS;AAAA,IACZ,YAAY,EACT;AAAA,MACC,EAAE,OAAO;AAAA,QACP,gBAAgB;AAAA,QAChB,oBAAoB;AAAA,MAAA,CACrB;AAAA,IAAA,EAEF,QAAQ,CAAC,SAAS,CAAC;AAAA,EAAA,CACvB;AACH;"}
@@ -87,12 +87,12 @@ const dictionaryDetailsContent = {
87
87
  publishButton: {
88
88
  text: intlayer.t({
89
89
  en: "Publish dictionary",
90
- fr: "Publier les dictionnaires",
90
+ fr: "Publier le dictionnaire",
91
91
  es: "Publicar diccionario"
92
92
  }),
93
93
  label: intlayer.t({
94
94
  en: "Click to publish dictionary",
95
- fr: "Cliquez pour publier les dictionnaires",
95
+ fr: "Cliquez pour publier le dictionnaire",
96
96
  es: "Haga clic para publicar el diccionario"
97
97
  })
98
98
  },
@@ -1 +1 @@
1
- {"version":3,"file":"dictionaryDetails.content.cjs","sources":["../../../../src/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.tsx"],"sourcesContent":["import { t, type DeclarationContent } from 'intlayer';\n\nexport const dictionaryDetailsContent = {\n key: 'dictionary-details',\n content: {\n titleInput: {\n label: t({\n en: 'Title',\n fr: 'Titre',\n es: 'Título',\n }),\n description: t({\n en: 'The title of your dictionary allows you to easily identify it',\n fr: \"Le titre de votre dictionnaire permet de l'identifier facilement\",\n es: 'El título de su diccionario le permite identificar fácilmente',\n }),\n placeholder: t({\n en: 'Enter the title of your dictionary',\n fr: 'Entrez le titre de votre dictionnaire',\n es: 'Ingrese el título de su diccionario',\n }),\n },\n keyInput: {\n label: t({\n en: 'Key',\n fr: 'Clé',\n es: 'Clave',\n }),\n description: t({\n en: 'The key of your dictionary is used to identify it in the application',\n fr: \"La clé de votre dictionnaire est utilisée pour l'identifier dans l'application\",\n es: 'La clave de su diccionario se utiliza para identificarla en la aplicación',\n }),\n placeholder: t({\n en: 'Enter the key of your dictionary',\n fr: 'Entrez la clé de votre dictionnaire',\n es: 'Ingrese la clave de su diccionario',\n }),\n },\n descriptionInput: {\n label: t({\n en: 'Description',\n fr: 'Description',\n es: 'Descripción',\n }),\n placeholder: t({\n en: 'Enter the description of your dictionary',\n fr: 'Entrez la description de votre dictionnaire',\n es: 'Ingrese la descripción de su diccionario',\n }),\n description: t({\n en: 'The description of your dictionary allows you to easily identify it using keywords. It is also used to search for your dictionary, and to assist the AI in understanding your dictionary.',\n fr: \"La description de votre dictionnaire permet d'identifier facilement l'utilisateur en utilisant des mots-clés. Elle est également utilisée pour rechercher votre dictionnaire et pour aider l'IA à comprendre votre dictionnaire.\",\n es: 'La descripción de su diccionario le permite identificar fácilmente el usuario utilizando palabras clave. También se utiliza para buscar su diccionario y para ayudar a la IA a entender su diccionario.',\n }),\n },\n\n projectInput: {\n label: t({\n en: 'Projects',\n fr: 'Projets',\n es: 'Proyectos',\n }),\n description: t({\n en: 'A dictionary can be associated with one or more projects. This allows you load the dictionary on different applications, and share it across different teams.',\n fr: 'Un dictionnaire peut être associé à un ou plusieurs projets. Cela permet de charger le dictionnaire sur différentes applications et de le partager entre différentes équipes.',\n es: 'Un diccionario puede estar asociado con uno o más proyectos. Esto permite cargar el diccionario en diferentes aplicaciones y compartirlo entre diferentes equipos.',\n }),\n placeholder: t({\n en: 'Select one or more projects to associate with your dictionary',\n fr: 'Sélectionnez un ou plusieurs projets à associer à votre dictionnaire',\n es: 'Seleccione uno o más proyectos para asociar con su diccionario',\n }),\n },\n\n saveButton: {\n text: t({\n en: 'Save changes',\n fr: 'Enregistrer les modifications',\n es: 'Guardar cambios',\n }),\n label: t({\n en: 'Click to save changes',\n fr: 'Cliquez pour enregistrer les modifications',\n es: 'Haga clic para guardar los cambios',\n }),\n },\n publishButton: {\n text: t({\n en: 'Publish dictionary',\n fr: 'Publier les dictionnaires',\n es: 'Publicar diccionario',\n }),\n label: t({\n en: 'Click to publish dictionary',\n fr: 'Cliquez pour publier les dictionnaires',\n es: 'Haga clic para publicar el diccionario',\n }),\n },\n updateDictionaryToasts: {\n updated: {\n title: t({\n en: 'Dictionary updated',\n fr: 'Dictionnaire mis à jour',\n es: 'Diccionario actualizado',\n }),\n description: t({\n en: 'Your dictionary has been updated successfully',\n fr: 'Votre dictionnaire a été mis à jour avec succès',\n es: 'Su diccionario se ha actualizado con éxito',\n }),\n },\n failed: {\n title: t({\n en: 'Organization update failed',\n fr: \"La mise à jour de l'organisation a échoué\",\n es: 'La actualización de la organización ha fallado',\n }),\n },\n },\n pushDictionariesToasts: {\n updated: {\n title: t({\n en: 'Dictionary updated',\n fr: 'Dictionnaire mis à jour',\n es: 'Diccionario actualizado',\n }),\n description: t({\n en: 'Your dictionary has been updated successfully',\n fr: 'Votre dictionnaire a été mis à jour avec succès',\n es: 'Su diccionario se ha actualizado con éxito',\n }),\n },\n failed: {\n title: t({\n en: 'Dictionary update failed',\n fr: \"La mise à jour de l'dictionnaire a échoué\",\n es: 'La actualización del diccionario ha fallado',\n }),\n description: t({\n en: 'An error occurred while updating your dictionary',\n fr: \"Une erreur s'est produite lors de la mise à jour de votre dictionnaire\",\n es: 'Se produjo un error al actualizar su diccionario',\n }),\n },\n },\n },\n} satisfies DeclarationContent;\n"],"names":["t"],"mappings":";;;AAEO,MAAM,2BAA2B;AAAA,EACtC,KAAK;AAAA,EACL,SAAS;AAAA,IACP,YAAY;AAAA,MACV,OAAOA,SAAAA,EAAE;AAAA,QACP,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MAAA,CACL;AAAA,MACD,aAAaA,SAAAA,EAAE;AAAA,QACb,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MAAA,CACL;AAAA,MACD,aAAaA,SAAAA,EAAE;AAAA,QACb,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MAAA,CACL;AAAA,IACH;AAAA,IACA,UAAU;AAAA,MACR,OAAOA,SAAAA,EAAE;AAAA,QACP,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MAAA,CACL;AAAA,MACD,aAAaA,SAAAA,EAAE;AAAA,QACb,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MAAA,CACL;AAAA,MACD,aAAaA,SAAAA,EAAE;AAAA,QACb,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MAAA,CACL;AAAA,IACH;AAAA,IACA,kBAAkB;AAAA,MAChB,OAAOA,SAAAA,EAAE;AAAA,QACP,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MAAA,CACL;AAAA,MACD,aAAaA,SAAAA,EAAE;AAAA,QACb,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MAAA,CACL;AAAA,MACD,aAAaA,SAAAA,EAAE;AAAA,QACb,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MAAA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,SAAS;AAAA,QACP,OAAOA,SAAAA,EAAE;AAAA,UACP,IAAI;AAAA,UACJ,IAAI;AAAA,UACJ,IAAI;AAAA,QAAA,CACL;AAAA,QACD,aAAaA,SAAAA,EAAE;AAAA,UACb,IAAI;AAAA,UACJ,IAAI;AAAA,UACJ,IAAI;AAAA,QAAA,CACL;AAAA,MACH;AAAA,MACA,QAAQ;AAAA,QACN,OAAOA,SAAAA,EAAE;AAAA,UACP,IAAI;AAAA,UACJ,IAAI;AAAA,UACJ,IAAI;AAAA,QAAA,CACL;AAAA,QACD,aAAaA,SAAAA,EAAE;AAAA,UACb,IAAI;AAAA,UACJ,IAAI;AAAA,UACJ,IAAI;AAAA,QAAA,CACL;AAAA,MACH;AAAA,IACF;AAAA,EACF;AACF;;"}
1
+ {"version":3,"file":"dictionaryDetails.content.cjs","sources":["../../../../src/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.tsx"],"sourcesContent":["import { t, type DeclarationContent } from 'intlayer';\n\nexport const dictionaryDetailsContent = {\n key: 'dictionary-details',\n content: {\n titleInput: {\n label: t({\n en: 'Title',\n fr: 'Titre',\n es: 'Título',\n }),\n description: t({\n en: 'The title of your dictionary allows you to easily identify it',\n fr: \"Le titre de votre dictionnaire permet de l'identifier facilement\",\n es: 'El título de su diccionario le permite identificar fácilmente',\n }),\n placeholder: t({\n en: 'Enter the title of your dictionary',\n fr: 'Entrez le titre de votre dictionnaire',\n es: 'Ingrese el título de su diccionario',\n }),\n },\n keyInput: {\n label: t({\n en: 'Key',\n fr: 'Clé',\n es: 'Clave',\n }),\n description: t({\n en: 'The key of your dictionary is used to identify it in the application',\n fr: \"La clé de votre dictionnaire est utilisée pour l'identifier dans l'application\",\n es: 'La clave de su diccionario se utiliza para identificarla en la aplicación',\n }),\n placeholder: t({\n en: 'Enter the key of your dictionary',\n fr: 'Entrez la clé de votre dictionnaire',\n es: 'Ingrese la clave de su diccionario',\n }),\n },\n descriptionInput: {\n label: t({\n en: 'Description',\n fr: 'Description',\n es: 'Descripción',\n }),\n placeholder: t({\n en: 'Enter the description of your dictionary',\n fr: 'Entrez la description de votre dictionnaire',\n es: 'Ingrese la descripción de su diccionario',\n }),\n description: t({\n en: 'The description of your dictionary allows you to easily identify it using keywords. It is also used to search for your dictionary, and to assist the AI in understanding your dictionary.',\n fr: \"La description de votre dictionnaire permet d'identifier facilement l'utilisateur en utilisant des mots-clés. Elle est également utilisée pour rechercher votre dictionnaire et pour aider l'IA à comprendre votre dictionnaire.\",\n es: 'La descripción de su diccionario le permite identificar fácilmente el usuario utilizando palabras clave. También se utiliza para buscar su diccionario y para ayudar a la IA a entender su diccionario.',\n }),\n },\n\n projectInput: {\n label: t({\n en: 'Projects',\n fr: 'Projets',\n es: 'Proyectos',\n }),\n description: t({\n en: 'A dictionary can be associated with one or more projects. This allows you load the dictionary on different applications, and share it across different teams.',\n fr: 'Un dictionnaire peut être associé à un ou plusieurs projets. Cela permet de charger le dictionnaire sur différentes applications et de le partager entre différentes équipes.',\n es: 'Un diccionario puede estar asociado con uno o más proyectos. Esto permite cargar el diccionario en diferentes aplicaciones y compartirlo entre diferentes equipos.',\n }),\n placeholder: t({\n en: 'Select one or more projects to associate with your dictionary',\n fr: 'Sélectionnez un ou plusieurs projets à associer à votre dictionnaire',\n es: 'Seleccione uno o más proyectos para asociar con su diccionario',\n }),\n },\n\n saveButton: {\n text: t({\n en: 'Save changes',\n fr: 'Enregistrer les modifications',\n es: 'Guardar cambios',\n }),\n label: t({\n en: 'Click to save changes',\n fr: 'Cliquez pour enregistrer les modifications',\n es: 'Haga clic para guardar los cambios',\n }),\n },\n publishButton: {\n text: t({\n en: 'Publish dictionary',\n fr: 'Publier le dictionnaire',\n es: 'Publicar diccionario',\n }),\n label: t({\n en: 'Click to publish dictionary',\n fr: 'Cliquez pour publier le dictionnaire',\n es: 'Haga clic para publicar el diccionario',\n }),\n },\n updateDictionaryToasts: {\n updated: {\n title: t({\n en: 'Dictionary updated',\n fr: 'Dictionnaire mis à jour',\n es: 'Diccionario actualizado',\n }),\n description: t({\n en: 'Your dictionary has been updated successfully',\n fr: 'Votre dictionnaire a été mis à jour avec succès',\n es: 'Su diccionario se ha actualizado con éxito',\n }),\n },\n failed: {\n title: t({\n en: 'Organization update failed',\n fr: \"La mise à jour de l'organisation a échoué\",\n es: 'La actualización de la organización ha fallado',\n }),\n },\n },\n pushDictionariesToasts: {\n updated: {\n title: t({\n en: 'Dictionary updated',\n fr: 'Dictionnaire mis à jour',\n es: 'Diccionario actualizado',\n }),\n description: t({\n en: 'Your dictionary has been updated successfully',\n fr: 'Votre dictionnaire a été mis à jour avec succès',\n es: 'Su diccionario se ha actualizado con éxito',\n }),\n },\n failed: {\n title: t({\n en: 'Dictionary update failed',\n fr: \"La mise à jour de l'dictionnaire a échoué\",\n es: 'La actualización del diccionario ha fallado',\n }),\n description: t({\n en: 'An error occurred while updating your dictionary',\n fr: \"Une erreur s'est produite lors de la mise à jour de votre dictionnaire\",\n es: 'Se produjo un error al actualizar su diccionario',\n }),\n },\n },\n },\n} satisfies DeclarationContent;\n"],"names":["t"],"mappings":";;;AAEO,MAAM,2BAA2B;AAAA,EACtC,KAAK;AAAA,EACL,SAAS;AAAA,IACP,YAAY;AAAA,MACV,OAAOA,SAAAA,EAAE;AAAA,QACP,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MAAA,CACL;AAAA,MACD,aAAaA,SAAAA,EAAE;AAAA,QACb,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MAAA,CACL;AAAA,MACD,aAAaA,SAAAA,EAAE;AAAA,QACb,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MAAA,CACL;AAAA,IACH;AAAA,IACA,UAAU;AAAA,MACR,OAAOA,SAAAA,EAAE;AAAA,QACP,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MAAA,CACL;AAAA,MACD,aAAaA,SAAAA,EAAE;AAAA,QACb,IAA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AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MAAA,CACL;AAAA,IACH;AAAA,IACA,wBAAwB;AAAA,MACtB,SAAS;AAAA,QACP,OAAOA,SAAAA,EAAE;AAAA,UACP,IAAI;AAAA,UACJ,IAAI;AAAA,UACJ,IAAI;AAAA,QAAA,CACL;AAAA,QACD,aAAaA,SAAAA,EAAE;AAAA,UACb,IAAI;AAAA,UACJ,IAAI;AAAA,UACJ,IAAI;AAAA,QAAA,CACL;AAAA,MACH;AAAA,MACA,QAAQ;AAAA,QACN,OAAOA,SAAAA,EAAE;AAAA,UACP,IAAI;AAAA,UACJ,IAAI;AAAA,UACJ,IAAI;AAAA,QAAA,CACL;AAAA,MACH;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB,SAAS;AAAA,QACP,OAAOA,SAAAA,EAAE;AAAA,UACP,IAAI;AAAA,UACJ,IAAI;AAAA,UACJ,IAAI;AAAA,QAAA,CACL;AAAA,QACD,aAAaA,SAAAA,EAAE;AAAA,UACb,IAAI;AAAA,UACJ,IAAI;AAAA,UACJ,IAAI;AAAA,QAAA,CACL;AAAA,MACH;AAAA,MACA,QAAQ;AAAA,QACN,OAAOA,SAAAA,EAAE;AAAA,UACP,IAAI;AAAA,UACJ,IAAI;AAAA,UACJ,IAAI;AAAA,QAAA,CACL;AAAA,QACD,aAAaA,SAAAA,EAAE;AAAA,UACb,IAAI;AAAA,UACJ,IAAI;AAAA,UACJ,IAAI;AAAA,QAAA,CACL;AAAA,MACH;AAAA,IACF;AAAA,EACF;AACF;;"}
@@ -85,12 +85,12 @@ const dictionaryDetailsContent = {
85
85
  publishButton: {
86
86
  text: t({
87
87
  en: "Publish dictionary",
88
- fr: "Publier les dictionnaires",
88
+ fr: "Publier le dictionnaire",
89
89
  es: "Publicar diccionario"
90
90
  }),
91
91
  label: t({
92
92
  en: "Click to publish dictionary",
93
- fr: "Cliquez pour publier les dictionnaires",
93
+ fr: "Cliquez pour publier le dictionnaire",
94
94
  es: "Haga clic para publicar el diccionario"
95
95
  })
96
96
  },
@@ -1 +1 @@
1
- {"version":3,"file":"dictionaryDetails.content.mjs","sources":["../../../../src/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.tsx"],"sourcesContent":["import { t, type DeclarationContent } from 'intlayer';\n\nexport const dictionaryDetailsContent = {\n key: 'dictionary-details',\n content: {\n titleInput: {\n label: t({\n en: 'Title',\n fr: 'Titre',\n es: 'Título',\n }),\n description: t({\n en: 'The title of your dictionary allows you to easily identify it',\n fr: \"Le titre de votre dictionnaire permet de l'identifier facilement\",\n es: 'El título de su diccionario le permite identificar fácilmente',\n }),\n placeholder: t({\n en: 'Enter the title of your dictionary',\n fr: 'Entrez le titre de votre dictionnaire',\n es: 'Ingrese el título de su diccionario',\n }),\n },\n keyInput: {\n label: t({\n en: 'Key',\n fr: 'Clé',\n es: 'Clave',\n }),\n description: t({\n en: 'The key of your dictionary is used to identify it in the application',\n fr: \"La clé de votre dictionnaire est utilisée pour l'identifier dans l'application\",\n es: 'La clave de su diccionario se utiliza para identificarla en la aplicación',\n }),\n placeholder: t({\n en: 'Enter the key of your dictionary',\n fr: 'Entrez la clé de votre dictionnaire',\n es: 'Ingrese la clave de su diccionario',\n }),\n },\n descriptionInput: {\n label: t({\n en: 'Description',\n fr: 'Description',\n es: 'Descripción',\n }),\n placeholder: t({\n en: 'Enter the description of your dictionary',\n fr: 'Entrez la description de votre dictionnaire',\n es: 'Ingrese la descripción de su diccionario',\n }),\n description: t({\n en: 'The description of your dictionary allows you to easily identify it using keywords. It is also used to search for your dictionary, and to assist the AI in understanding your dictionary.',\n fr: \"La description de votre dictionnaire permet d'identifier facilement l'utilisateur en utilisant des mots-clés. Elle est également utilisée pour rechercher votre dictionnaire et pour aider l'IA à comprendre votre dictionnaire.\",\n es: 'La descripción de su diccionario le permite identificar fácilmente el usuario utilizando palabras clave. También se utiliza para buscar su diccionario y para ayudar a la IA a entender su diccionario.',\n }),\n },\n\n projectInput: {\n label: t({\n en: 'Projects',\n fr: 'Projets',\n es: 'Proyectos',\n }),\n description: t({\n en: 'A dictionary can be associated with one or more projects. This allows you load the dictionary on different applications, and share it across different teams.',\n fr: 'Un dictionnaire peut être associé à un ou plusieurs projets. Cela permet de charger le dictionnaire sur différentes applications et de le partager entre différentes équipes.',\n es: 'Un diccionario puede estar asociado con uno o más proyectos. Esto permite cargar el diccionario en diferentes aplicaciones y compartirlo entre diferentes equipos.',\n }),\n placeholder: t({\n en: 'Select one or more projects to associate with your dictionary',\n fr: 'Sélectionnez un ou plusieurs projets à associer à votre dictionnaire',\n es: 'Seleccione uno o más proyectos para asociar con su diccionario',\n }),\n },\n\n saveButton: {\n text: t({\n en: 'Save changes',\n fr: 'Enregistrer les modifications',\n es: 'Guardar cambios',\n }),\n label: t({\n en: 'Click to save changes',\n fr: 'Cliquez pour enregistrer les modifications',\n es: 'Haga clic para guardar los cambios',\n }),\n },\n publishButton: {\n text: t({\n en: 'Publish dictionary',\n fr: 'Publier les dictionnaires',\n es: 'Publicar diccionario',\n }),\n label: t({\n en: 'Click to publish dictionary',\n fr: 'Cliquez pour publier les dictionnaires',\n es: 'Haga clic para publicar el diccionario',\n }),\n },\n updateDictionaryToasts: {\n updated: {\n title: t({\n en: 'Dictionary updated',\n fr: 'Dictionnaire mis à jour',\n es: 'Diccionario actualizado',\n }),\n description: t({\n en: 'Your dictionary has been updated successfully',\n fr: 'Votre dictionnaire a été mis à jour avec succès',\n es: 'Su diccionario se ha actualizado con éxito',\n }),\n },\n failed: {\n title: t({\n en: 'Organization update failed',\n fr: \"La mise à jour de l'organisation a échoué\",\n es: 'La actualización de la organización ha fallado',\n }),\n },\n },\n pushDictionariesToasts: {\n updated: {\n title: t({\n en: 'Dictionary updated',\n fr: 'Dictionnaire mis à jour',\n es: 'Diccionario actualizado',\n }),\n description: t({\n en: 'Your dictionary has been updated successfully',\n fr: 'Votre dictionnaire a été mis à jour avec succès',\n es: 'Su diccionario se ha actualizado con éxito',\n }),\n },\n failed: {\n title: t({\n en: 'Dictionary update failed',\n fr: \"La mise à jour de l'dictionnaire a échoué\",\n es: 'La actualización del diccionario ha fallado',\n }),\n description: t({\n en: 'An error occurred while updating your dictionary',\n fr: \"Une erreur s'est produite lors de la mise à jour de votre dictionnaire\",\n es: 'Se produjo un error al actualizar su diccionario',\n }),\n },\n },\n },\n} satisfies DeclarationContent;\n"],"names":[],"mappings":";AAEO,MAAM,2BAA2B;AAAA,EACtC,KAAK;AAAA,EACL,SAAS;AAAA,IACP,YAAY;AAAA,MACV,OAAO,EAAE;AAAA,QACP,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MAAA,CACL;AAAA,MACD,aAAa,EAAE;AAAA,QACb,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MAAA,CACL;AAAA,MACD,aAAa,EAAE;AAAA,QACb,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MAAA,CACL;AAAA,IACH;AAAA,IACA,UAAU;AAAA,MACR,OAAO,EAAE;AAAA,QACP,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MAAA,CACL;AAAA,MACD,aAAa,EAAE;AAAA,QACb,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MAAA,CACL;AAAA,MACD,aAAa,EAAE;AAAA,QACb,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MAAA,CACL;AAAA,IACH;AAAA,IACA,kBAAkB;AAAA,MAChB,OAAO,EAAE;AAAA,QACP,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MAAA,CACL;AAAA,MACD,aAAa,EAAE;AAAA,QACb,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MAAA,CACL;AAAA,MACD,aAAa,EAAE;AAAA,QACb,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MAAA,CACL;AAAA,IACH;AAAA,IA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,aAAa,EAAE;AAAA,UACb,IAAI;AAAA,UACJ,IAAI;AAAA,UACJ,IAAI;AAAA,QAAA,CACL;AAAA,MACH;AAAA,MACA,QAAQ;AAAA,QACN,OAAO,EAAE;AAAA,UACP,IAAI;AAAA,UACJ,IAAI;AAAA,UACJ,IAAI;AAAA,QAAA,CACL;AAAA,QACD,aAAa,EAAE;AAAA,UACb,IAAI;AAAA,UACJ,IAAI;AAAA,UACJ,IAAI;AAAA,QAAA,CACL;AAAA,MACH;AAAA,IACF;AAAA,EACF;AACF;"}
1
+ {"version":3,"file":"dictionaryDetails.content.mjs","sources":["../../../../src/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.tsx"],"sourcesContent":["import { t, type DeclarationContent } from 'intlayer';\n\nexport const dictionaryDetailsContent = {\n key: 'dictionary-details',\n content: {\n titleInput: {\n label: t({\n en: 'Title',\n fr: 'Titre',\n es: 'Título',\n }),\n description: t({\n en: 'The title of your dictionary allows you to easily identify it',\n fr: \"Le titre de votre dictionnaire permet de l'identifier facilement\",\n es: 'El título de su diccionario le permite identificar fácilmente',\n }),\n placeholder: t({\n en: 'Enter the title of your dictionary',\n fr: 'Entrez le titre de votre dictionnaire',\n es: 'Ingrese el título de su diccionario',\n }),\n },\n keyInput: {\n label: t({\n en: 'Key',\n fr: 'Clé',\n es: 'Clave',\n }),\n description: t({\n en: 'The key of your dictionary is used to identify it in the application',\n fr: \"La clé de votre dictionnaire est utilisée pour l'identifier dans l'application\",\n es: 'La clave de su diccionario se utiliza para identificarla en la aplicación',\n }),\n placeholder: t({\n en: 'Enter the key of your dictionary',\n fr: 'Entrez la clé de votre dictionnaire',\n es: 'Ingrese la clave de su diccionario',\n }),\n },\n descriptionInput: {\n label: t({\n en: 'Description',\n fr: 'Description',\n es: 'Descripción',\n }),\n placeholder: t({\n en: 'Enter the description of your dictionary',\n fr: 'Entrez la description de votre dictionnaire',\n es: 'Ingrese la descripción de su diccionario',\n }),\n description: t({\n en: 'The description of your dictionary allows you to easily identify it using keywords. It is also used to search for your dictionary, and to assist the AI in understanding your dictionary.',\n fr: \"La description de votre dictionnaire permet d'identifier facilement l'utilisateur en utilisant des mots-clés. Elle est également utilisée pour rechercher votre dictionnaire et pour aider l'IA à comprendre votre dictionnaire.\",\n es: 'La descripción de su diccionario le permite identificar fácilmente el usuario utilizando palabras clave. También se utiliza para buscar su diccionario y para ayudar a la IA a entender su diccionario.',\n }),\n },\n\n projectInput: {\n label: t({\n en: 'Projects',\n fr: 'Projets',\n es: 'Proyectos',\n }),\n description: t({\n en: 'A dictionary can be associated with one or more projects. This allows you load the dictionary on different applications, and share it across different teams.',\n fr: 'Un dictionnaire peut être associé à un ou plusieurs projets. Cela permet de charger le dictionnaire sur différentes applications et de le partager entre différentes équipes.',\n es: 'Un diccionario puede estar asociado con uno o más proyectos. Esto permite cargar el diccionario en diferentes aplicaciones y compartirlo entre diferentes equipos.',\n }),\n placeholder: t({\n en: 'Select one or more projects to associate with your dictionary',\n fr: 'Sélectionnez un ou plusieurs projets à associer à votre dictionnaire',\n es: 'Seleccione uno o más proyectos para asociar con su diccionario',\n }),\n },\n\n saveButton: {\n text: t({\n en: 'Save changes',\n fr: 'Enregistrer les modifications',\n es: 'Guardar cambios',\n }),\n label: t({\n en: 'Click to save changes',\n fr: 'Cliquez pour enregistrer les modifications',\n es: 'Haga clic para guardar los cambios',\n }),\n },\n publishButton: {\n text: t({\n en: 'Publish dictionary',\n fr: 'Publier le dictionnaire',\n es: 'Publicar diccionario',\n }),\n label: t({\n en: 'Click to publish dictionary',\n fr: 'Cliquez pour publier le dictionnaire',\n es: 'Haga clic para publicar el diccionario',\n }),\n },\n updateDictionaryToasts: {\n updated: {\n title: t({\n en: 'Dictionary updated',\n fr: 'Dictionnaire mis à jour',\n es: 'Diccionario actualizado',\n }),\n description: t({\n en: 'Your dictionary has been updated successfully',\n fr: 'Votre dictionnaire a été mis à jour avec succès',\n es: 'Su diccionario se ha actualizado con éxito',\n }),\n },\n failed: {\n title: t({\n en: 'Organization update failed',\n fr: \"La mise à jour de l'organisation a échoué\",\n es: 'La actualización de la organización ha fallado',\n }),\n },\n },\n pushDictionariesToasts: {\n updated: {\n title: t({\n en: 'Dictionary updated',\n fr: 'Dictionnaire mis à jour',\n es: 'Diccionario actualizado',\n }),\n description: t({\n en: 'Your dictionary has been updated successfully',\n fr: 'Votre dictionnaire a été mis à jour avec succès',\n es: 'Su diccionario se ha actualizado con éxito',\n }),\n },\n failed: {\n title: t({\n en: 'Dictionary update failed',\n fr: \"La mise à jour de l'dictionnaire a échoué\",\n es: 'La actualización del diccionario ha fallado',\n }),\n description: t({\n en: 'An error occurred while updating your dictionary',\n fr: \"Une erreur s'est produite lors de la mise à jour de votre dictionnaire\",\n es: 'Se produjo un error al actualizar su diccionario',\n }),\n },\n },\n },\n} satisfies DeclarationContent;\n"],"names":[],"mappings":";AAEO,MAAM,2BAA2B;AAAA,EACtC,KAAK;AAAA,EACL,SAAS;AAAA,IACP,YAAY;AAAA,MACV,OAAO,EAAE;AAAA,QACP,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MAAA,CACL;AAAA,MACD,aAAa,EAAE;AAAA,QACb,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MAAA,CACL;AAAA,MACD,aAAa,EAAE;AAAA,QACb,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MAAA,CACL;AAAA,IACH;AAAA,IACA,UAAU;AAAA,MACR,OAAO,EAAE;AAAA,QACP,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MAAA,CACL;AAAA,MACD,aAAa,EAAE;AAAA,QACb,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MAAA,CACL;AAAA,MACD,aAAa,EAAE;AAAA,QACb,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MAAA,CACL;AAAA,IACH;AAAA,IACA,kBAAkB;AAAA,MAChB,O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L;AAAA,MACH;AAAA,MACA,QAAQ;AAAA,QACN,OAAO,EAAE;AAAA,UACP,IAAI;AAAA,UACJ,IAAI;AAAA,UACJ,IAAI;AAAA,QAAA,CACL;AAAA,MACH;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB,SAAS;AAAA,QACP,OAAO,EAAE;AAAA,UACP,IAAI;AAAA,UACJ,IAAI;AAAA,UACJ,IAAI;AAAA,QAAA,CACL;AAAA,QACD,aAAa,EAAE;AAAA,UACb,IAAI;AAAA,UACJ,IAAI;AAAA,UACJ,IAAI;AAAA,QAAA,CACL;AAAA,MACH;AAAA,MACA,QAAQ;AAAA,QACN,OAAO,EAAE;AAAA,UACP,IAAI;AAAA,UACJ,IAAI;AAAA,UACJ,IAAI;AAAA,QAAA,CACL;AAAA,QACD,aAAa,EAAE;AAAA,UACb,IAAI;AAAA,UACJ,IAAI;AAAA,UACJ,IAAI;AAAA,QAAA,CACL;AAAA,MACH;AAAA,IACF;AAAA,EACF;AACF;"}
@@ -3,17 +3,33 @@
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
4
  const jsxRuntime = require("../../jsx-runtime-DvCoRj5u.cjs");
5
5
  const lucideReact = require("lucide-react");
6
+ const require$$0 = require("react");
6
7
  const reactIntlayer = require("react-intlayer");
7
8
  const components_Button_Button = require("../Button/Button.cjs");
8
9
  const components_Container_index = require("../Container/index.cjs");
9
10
  const components_DictionaryEditor_useEditedContentStore = require("../DictionaryEditor/useEditedContentStore.cjs");
10
11
  const components_DictionaryEditor_useEditionPanelStore = require("../DictionaryEditor/useEditionPanelStore.cjs");
11
12
  require("@intlayer/core");
12
- require("react");
13
13
  require("clsx");
14
14
  require("tailwind-merge");
15
- require("../TextArea/AutoSizeTextArea.cjs");
16
- require("../TextArea/TextArea.cjs");
15
+ require("../EditableField/EditableFieldInput.cjs");
16
+ require("../EditableField/EditableFieldTextArea.cjs");
17
+ require("../../hooks/useScrollBlockage/useScrollBlockageStore.cjs");
18
+ require("../../hooks/useAsync/useAsyncStateStore.cjs");
19
+ require("../Auth/AuthProvider/index.cjs");
20
+ require("../../libs/intlayer-api/auth.cjs");
21
+ require("../../libs/intlayer-api/dictionary.cjs");
22
+ require("../../libs/intlayer-api/organization.cjs");
23
+ require("../../libs/intlayer-api/project.cjs");
24
+ require("../../libs/intlayer-api/user.cjs");
25
+ require("@intlayer/dictionaries-entry");
26
+ require("deepmerge");
27
+ require("../Form/FormBase.cjs");
28
+ require("../Form/FormField.cjs");
29
+ require("../../Form-DERuauvB.cjs");
30
+ require("../Toaster/Toast.cjs");
31
+ require("../DictionaryEditor/validDictionaryChangeButtons.content.cjs");
32
+ require("zod");
17
33
  const components_Headers_index = require("../Headers/index.cjs");
18
34
  const components_DictionaryFieldEditor_DictionaryDetails_DictionaryDetailsForm = require("./DictionaryDetails/DictionaryDetailsForm.cjs");
19
35
  const components_DictionaryFieldEditor_dictionaryFieldEditor_content = require("./dictionaryFieldEditor.content.cjs");
@@ -26,24 +42,32 @@ const DictionaryFieldEditor = ({
26
42
  onClickDictionaryList
27
43
  }) => {
28
44
  const { content: dictionaryContent, key } = dictionary;
29
- const editedContent = components_DictionaryEditor_useEditedContentStore.useEditedContentStore((s) => s.editedContent);
30
- const { returnToDictionaryList, titleContent, titleInformation } = reactIntlayer.useDictionary(components_DictionaryFieldEditor_dictionaryFieldEditor_content.dictionaryFieldEditorContent);
31
- const { focusedContent, setFocusedContentKeyPath, setFocusedContent } = components_DictionaryEditor_useEditionPanelStore.useEditionPanelStore((s) => ({
32
- focusedContent: s.focusedContent,
33
- setFocusedContentKeyPath: s.setFocusedContentKeyPath,
34
- setFocusedContent: s.setFocusedContent
45
+ const { editedContent, dictionaryRecord, setDictionariesRecord } = components_DictionaryEditor_useEditedContentStore.useEditedContentStore((s) => ({
46
+ editedContent: s.editedContent,
47
+ dictionaryRecord: s.dictionariesRecord,
48
+ setDictionariesRecord: s.setDictionariesRecord
35
49
  }));
50
+ const { returnToDictionaryList, titleContent, titleInformation } = reactIntlayer.useDictionary(components_DictionaryFieldEditor_dictionaryFieldEditor_content.dictionaryFieldEditorContent);
51
+ const { focusedContent, setFocusedContentKeyPath } = components_DictionaryEditor_useEditionPanelStore.useEditionPanelStore(
52
+ (s) => ({
53
+ focusedContent: s.focusedContent,
54
+ setFocusedContentKeyPath: s.setFocusedContentKeyPath
55
+ })
56
+ );
36
57
  const focusedKeyPath = focusedContent?.keyPath;
37
58
  const section = editedContent[key]?.content ?? dictionaryContent;
59
+ require$$0.useEffect(() => {
60
+ if (dictionaryRecord[key]) return;
61
+ setDictionariesRecord({
62
+ [key]: dictionary
63
+ });
64
+ }, [dictionary, key, setDictionariesRecord, dictionaryRecord]);
38
65
  return /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs("div", { className: "flex size-full flex-1 flex-col gap-10", children: [
39
66
  /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", children: [
40
67
  /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
41
68
  components_Button_Button.Button,
42
69
  {
43
- onClick: () => {
44
- setFocusedContent(null);
45
- onClickDictionaryList?.();
46
- },
70
+ onClick: () => onClickDictionaryList?.(),
47
71
  variant: "hoverable",
48
72
  size: "icon-md",
49
73
  color: "text",
@@ -1 +1 @@
1
- {"version":3,"file":"DictionaryFieldEditor.cjs","sources":["../../../src/components/DictionaryFieldEditor/DictionaryFieldEditor.tsx"],"sourcesContent":["'use client';\n\nimport { Dictionary } from '@intlayer/core';\nimport { ArrowLeft } from 'lucide-react';\nimport { type FC } from 'react';\nimport { useDictionary } from 'react-intlayer';\nimport { Button } from '../Button';\nimport { Container } from '../Container';\nimport {\n useEditedContentStore,\n useEditionPanelStore,\n} from '../DictionaryEditor';\nimport { H2 } from '../Headers';\nimport { DictionaryDetailsForm } from './DictionaryDetails/DictionaryDetailsForm';\nimport { dictionaryFieldEditorContent } from './dictionaryFieldEditor.content';\nimport { EditorView } from './EditorView/EditorView';\nimport { KeyPathBreadcrumb } from './KeyPathBreadcrumb';\nimport { NavigationViewNode } from './NavigationView/NavigationViewNode';\nimport { SaveForm } from './SaveForm/SaveForm';\n\ntype DictionaryFieldEditorProps = {\n dictionary: Dictionary;\n onClickDictionaryList?: () => void;\n};\n\nexport const DictionaryFieldEditor: FC<DictionaryFieldEditorProps> = ({\n dictionary,\n onClickDictionaryList,\n}) => {\n const { content: dictionaryContent, key } = dictionary;\n const editedContent = useEditedContentStore((s) => s.editedContent);\n const { returnToDictionaryList, titleContent, titleInformation } =\n useDictionary(dictionaryFieldEditorContent);\n\n const { focusedContent, setFocusedContentKeyPath, setFocusedContent } =\n useEditionPanelStore((s) => ({\n focusedContent: s.focusedContent,\n setFocusedContentKeyPath: s.setFocusedContentKeyPath,\n setFocusedContent: s.setFocusedContent,\n }));\n\n const focusedKeyPath = focusedContent?.keyPath;\n\n const section = editedContent[key]?.content ?? dictionaryContent;\n\n return (\n <div className=\"flex size-full flex-1 flex-col gap-10\">\n <div className=\"flex items-center gap-2\">\n <Button\n onClick={() => {\n setFocusedContent(null);\n onClickDictionaryList?.();\n }}\n variant=\"hoverable\"\n size=\"icon-md\"\n color=\"text\"\n id=\"return-to-dictionary-list\"\n Icon={ArrowLeft}\n label={returnToDictionaryList.label.value}\n />\n <label\n className=\"cursor-pointer text-xs hover:underline\"\n htmlFor=\"return-to-dictionary-list\"\n >\n {returnToDictionaryList.text}\n </label>\n </div>\n\n <Container\n className=\"flex size-full justify-center gap-10 p-6\"\n roundedSize=\"xl\"\n >\n <H2>{titleInformation}</H2>\n\n <DictionaryDetailsForm dictionary={dictionary} />\n </Container>\n\n <Container\n className=\"flex size-full justify-center gap-10 p-6\"\n roundedSize=\"xl\"\n >\n <H2>{titleContent}</H2>\n\n <KeyPathBreadcrumb\n dictionaryKey={key}\n keyPath={focusedKeyPath ?? []}\n onClickKeyPath={setFocusedContentKeyPath}\n />\n <div className=\"flex gap-2 max-md:flex-col\">\n <Container\n border\n background={false}\n className=\"top-6 flex h-full flex-col items-start gap-0.5 overflow-auto p-2 md:sticky md:max-w-[50%]\"\n roundedSize=\"xl\"\n >\n <NavigationViewNode\n keyPath={[]}\n section={section}\n dictionaryKey={key}\n />\n </Container>\n <div className=\"top-6 flex h-full flex-1 flex-col gap-6 md:sticky\">\n {(focusedKeyPath?.length ?? 0) > 0 && (\n <Container\n border\n background={false}\n className=\"h-full flex-1 overflow-hidden\"\n roundedSize=\"xl\"\n >\n <EditorView dictionary={dictionary} dictionaryKey={key} />\n </Container>\n )}\n <SaveForm dictionary={dictionary} />\n </div>\n </div>\n </Container>\n </div>\n );\n};\n"],"names":["useEditedContentStore","useDictionary","dictionaryFieldEditorContent","useEditionPanelStore","jsxs","jsx","Button","ArrowLeft","Container","H2","DictionaryDetailsForm","KeyPathBreadcrumb","NavigationViewNode","EditorView","SaveForm"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAyBO,MAAM,wBAAwD,CAAC;AAAA,EACpE;AAAA,EACA;AACF,MAAM;AACJ,QAAM,EAAE,SAAS,mBAAmB,IAAA,IAAQ;AAC5C,QAAM,gBAAgBA,kDAAAA,sBAAsB,CAAC,MAAM,EAAE,aAAa;AAClE,QAAM,EAAE,wBAAwB,cAAc,iBAAiB,IAC7DC,cAAAA,cAAcC,+DAAAA,4BAA4B;AAE5C,QAAM,EAAE,gBAAgB,0BAA0B,sBAChDC,iDAAAA,qBAAqB,CAAC,OAAO;AAAA,IAC3B,gBAAgB,EAAE;AAAA,IAClB,0BAA0B,EAAE;AAAA,IAC5B,mBAAmB,EAAE;AAAA,EACrB,EAAA;AAEJ,QAAM,iBAAiB,gBAAgB;AAEvC,QAAM,UAAU,cAAc,GAAG,GAAG,WAAW;AAG7C,SAAAC,2BAAA,kBAAA,KAAC,OAAI,EAAA,WAAU,yCACb,UAAA;AAAA,IAACA,2BAAAA,kBAAAA,KAAA,OAAA,EAAI,WAAU,2BACb,UAAA;AAAA,MAAAC,2BAAA,kBAAA;AAAA,QAACC,yB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oBACC,SAAS,CAAC;AAAA,oBACV;AAAA,oBACA,eAAe;AAAA,kBAAA;AAAA,gBACjB;AAAA,cAAA;AAAA,YACF;AAAA,YACAR,2BAAAA,kBAAAA,KAAC,OAAI,EAAA,WAAU,qDACX,UAAA;AAAA,eAAgB,gBAAA,UAAU,KAAK,KAC/BC,2BAAA,kBAAA;AAAA,gBAACG,2BAAA;AAAA,gBAAA;AAAA,kBACC,QAAM;AAAA,kBACN,YAAY;AAAA,kBACZ,WAAU;AAAA,kBACV,aAAY;AAAA,kBAEZ,UAACH,2BAAA,kBAAA,IAAAQ,uDAAA,YAAA,EAAW,YAAwB,eAAe,KAAK;AAAA,gBAAA;AAAA,cAC1D;AAAA,cAEFR,iDAACS,mDAAAA,YAAS,YAAwB;AAAA,YAAA,GACpC;AAAA,UAAA,GACF;AAAA,QAAA;AAAA,MAAA;AAAA,IACF;AAAA,EACF,EAAA,CAAA;AAEJ;;"}
1
+ {"version":3,"file":"DictionaryFieldEditor.cjs","sources":["../../../src/components/DictionaryFieldEditor/DictionaryFieldEditor.tsx"],"sourcesContent":["'use client';\n\nimport { Dictionary } from '@intlayer/core';\nimport { ArrowLeft } from 'lucide-react';\nimport { useEffect, type FC } from 'react';\n// @ts-ignore react-intlayer not build yet\nimport { useDictionary } from 'react-intlayer';\nimport { Button } from '../Button';\nimport { Container } from '../Container';\nimport {\n useEditedContentStore,\n useEditionPanelStore,\n} from '../DictionaryEditor';\nimport { H2 } from '../Headers';\nimport { DictionaryDetailsForm } from './DictionaryDetails/DictionaryDetailsForm';\nimport { dictionaryFieldEditorContent } from './dictionaryFieldEditor.content';\nimport { EditorView } from './EditorView/EditorView';\nimport { KeyPathBreadcrumb } from './KeyPathBreadcrumb';\nimport { NavigationViewNode } from './NavigationView/NavigationViewNode';\nimport { SaveForm } from './SaveForm/SaveForm';\n\ntype DictionaryFieldEditorProps = {\n dictionary: Dictionary;\n onClickDictionaryList?: () => void;\n};\n\nexport const DictionaryFieldEditor: FC<DictionaryFieldEditorProps> = ({\n dictionary,\n onClickDictionaryList,\n}) => {\n const { content: dictionaryContent, key } = dictionary;\n const { editedContent, dictionaryRecord, setDictionariesRecord } =\n useEditedContentStore((s) => ({\n editedContent: s.editedContent,\n dictionaryRecord: s.dictionariesRecord,\n setDictionariesRecord: s.setDictionariesRecord,\n }));\n const { returnToDictionaryList, titleContent, titleInformation } =\n useDictionary(dictionaryFieldEditorContent);\n\n const { focusedContent, setFocusedContentKeyPath } = useEditionPanelStore(\n (s) => ({\n focusedContent: s.focusedContent,\n setFocusedContentKeyPath: s.setFocusedContentKeyPath,\n })\n );\n\n const focusedKeyPath = focusedContent?.keyPath;\n\n const section = editedContent[key]?.content ?? dictionaryContent;\n\n useEffect(() => {\n if (dictionaryRecord[key]) return;\n\n setDictionariesRecord({\n [key]: dictionary,\n });\n }, [dictionary, key, setDictionariesRecord, dictionaryRecord]);\n\n return (\n <div className=\"flex size-full flex-1 flex-col gap-10\">\n <div className=\"flex items-center gap-2\">\n <Button\n onClick={() => onClickDictionaryList?.()}\n variant=\"hoverable\"\n size=\"icon-md\"\n color=\"text\"\n id=\"return-to-dictionary-list\"\n Icon={ArrowLeft}\n label={returnToDictionaryList.label.value}\n />\n <label\n className=\"cursor-pointer text-xs hover:underline\"\n htmlFor=\"return-to-dictionary-list\"\n >\n {returnToDictionaryList.text}\n </label>\n </div>\n\n <Container\n className=\"flex size-full justify-center gap-10 p-6\"\n roundedSize=\"xl\"\n >\n <H2>{titleInformation}</H2>\n\n <DictionaryDetailsForm dictionary={dictionary} />\n </Container>\n\n <Container\n className=\"flex size-full justify-center gap-10 p-6\"\n roundedSize=\"xl\"\n >\n <H2>{titleContent}</H2>\n\n <KeyPathBreadcrumb\n dictionaryKey={key}\n keyPath={focusedKeyPath ?? []}\n onClickKeyPath={setFocusedContentKeyPath}\n />\n <div className=\"flex gap-2 max-md:flex-col\">\n <Container\n border\n background={false}\n className=\"top-6 flex h-full flex-col items-start gap-0.5 overflow-auto p-2 md:sticky md:max-w-[50%]\"\n roundedSize=\"xl\"\n >\n <NavigationViewNode\n keyPath={[]}\n section={section}\n dictionaryKey={key}\n />\n </Container>\n <div className=\"top-6 flex h-full flex-1 flex-col gap-6 md:sticky\">\n {(focusedKeyPath?.length ?? 0) > 0 && (\n <Container\n border\n background={false}\n className=\"h-full flex-1 overflow-hidden\"\n roundedSize=\"xl\"\n >\n <EditorView dictionary={dictionary} dictionaryKey={key} />\n </Container>\n )}\n <SaveForm dictionary={dictionary} />\n </div>\n </div>\n </Container>\n </div>\n );\n};\n"],"names":["useEditedContentStore","useDictionary","dictionaryFieldEditorContent","useEditionPanelStore","useEffect","jsxs","jsx","Button","ArrowLeft","Container","H2","DictionaryDetailsForm","KeyPathBreadcrumb","NavigationViewNode","EditorView","SaveForm"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BO,MAAM,wBAAwD,CAAC;AAAA,EACpE;AAAA,EACA;AACF,MAAM;AACJ,QAAM,EAAE,SAAS,mBAAmB,IAAA,IAAQ;AAC5C,QAAM,EAAE,eAAe,kBAAkB,0BACvCA,kDAAAA,sBAAsB,CAAC,OAAO;AAAA,IAC5B,eAAe,EAAE;AAAA,IACjB,kBAAkB,EAAE;AAAA,IACpB,uBAAuB,EAAE;AAAA,EACzB,EAAA;AACJ,QAAM,EAAE,wBAAwB,cAAc,iBAAiB,IAC7DC,cAAAA,cAAcC,+DAAAA,4BAA4B;AAEtC,QAAA,EAAE,gBAAgB,yBAAA,IAA6BC,iDAAA;AAAA,IACnD,CAAC,OAAO;AAAA,MACN,gBAAgB,EAAE;AAAA,MAClB,0BAA0B,EAAE;AAAA,IAAA;AAAA,EAC9B;AAGF,QAAM,iBAAiB,gBAAgB;AAEvC,QAAM,UAAU,cAAc,GAAG,GAAG,WAAW;AAE/CC,aAAAA,UAAU,MAAM;AACV,QAAA,iBAAiB,GAAG,EAAG;AAEL,0BAAA;AAAA,MACpB,CAAC,GAAG,GAAG;AAAA,IAAA,C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AA,YAAAC,2BAAA,kBAAA;AAAA,cAACG,2BAAA;AAAA,cAAA;AAAA,gBACC,QAAM;AAAA,gBACN,YAAY;AAAA,gBACZ,WAAU;AAAA,gBACV,aAAY;AAAA,gBAEZ,UAAAH,2BAAA,kBAAA;AAAA,kBAACO,mEAAA;AAAA,kBAAA;AAAA,oBACC,SAAS,CAAC;AAAA,oBACV;AAAA,oBACA,eAAe;AAAA,kBAAA;AAAA,gBACjB;AAAA,cAAA;AAAA,YACF;AAAA,YACAR,2BAAAA,kBAAAA,KAAC,OAAI,EAAA,WAAU,qDACX,UAAA;AAAA,eAAgB,gBAAA,UAAU,KAAK,KAC/BC,2BAAA,kBAAA;AAAA,gBAACG,2BAAA;AAAA,gBAAA;AAAA,kBACC,QAAM;AAAA,kBACN,YAAY;AAAA,kBACZ,WAAU;AAAA,kBACV,aAAY;AAAA,kBAEZ,UAACH,2BAAA,kBAAA,IAAAQ,uDAAA,YAAA,EAAW,YAAwB,eAAe,KAAK;AAAA,gBAAA;AAAA,cAC1D;AAAA,cAEFR,iDAACS,mDAAAA,YAAS,YAAwB;AAAA,YAAA,GACpC;AAAA,UAAA,GACF;AAAA,QAAA;AAAA,MAAA;AAAA,IACF;AAAA,EACF,EAAA,CAAA;AAEJ;;"}
@@ -1,6 +1,5 @@
1
1
  import { Dictionary } from '@intlayer/core';
2
2
  import { FC } from 'react';
3
-
4
3
  type DictionaryFieldEditorProps = {
5
4
  dictionary: Dictionary;
6
5
  onClickDictionaryList?: () => void;
@@ -1 +1 @@
1
- {"version":3,"file":"DictionaryFieldEditor.d.ts","sourceRoot":"","sources":["../../../src/components/DictionaryFieldEditor/DictionaryFieldEditor.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAgBhC,KAAK,0BAA0B,GAAG;IAChC,UAAU,EAAE,UAAU,CAAC;IACvB,qBAAqB,CAAC,EAAE,MAAM,IAAI,CAAC;CACpC,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,EAAE,CAAC,0BAA0B,CA6FhE,CAAC"}
1
+ {"version":3,"file":"DictionaryFieldEditor.d.ts","sourceRoot":"","sources":["../../../src/components/DictionaryFieldEditor/DictionaryFieldEditor.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,OAAO,EAAa,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAiB3C,KAAK,0BAA0B,GAAG;IAChC,UAAU,EAAE,UAAU,CAAC;IACvB,qBAAqB,CAAC,EAAE,MAAM,IAAI,CAAC;CACpC,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,EAAE,CAAC,0BAA0B,CAuGhE,CAAC"}