@intlayer/design-system 3.5.5 → 3.5.7

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 +297 -54
  2. package/dist/CodeBlockShiki-BlmZyrr7.cjs +29 -0
  3. package/dist/CodeBlockShiki-BlmZyrr7.cjs.map +1 -0
  4. package/dist/CodeBlockShiki-CcpV9SVi.js +29 -0
  5. package/dist/CodeBlockShiki-CcpV9SVi.js.map +1 -0
  6. package/dist/Form-0D7KBafQ.cjs +311 -0
  7. package/dist/Form-0D7KBafQ.cjs.map +1 -0
  8. package/dist/Form-7BqwvjVI.cjs +320 -0
  9. package/dist/Form-7BqwvjVI.cjs.map +1 -0
  10. package/dist/Form-B2UufQRJ.cjs +319 -0
  11. package/dist/Form-B2UufQRJ.cjs.map +1 -0
  12. package/dist/Form-BB0kpER9.cjs +301 -0
  13. package/dist/Form-BB0kpER9.cjs.map +1 -0
  14. package/dist/Form-BDcoNTLV.cjs.map +1 -1
  15. package/dist/Form-BTogr-fp.js +312 -0
  16. package/dist/Form-BTogr-fp.js.map +1 -0
  17. package/dist/Form-BVkkvSKP.js +312 -0
  18. package/dist/Form-BVkkvSKP.js.map +1 -0
  19. package/dist/Form-Be6Uhb5-.js +312 -0
  20. package/dist/Form-Be6Uhb5-.js.map +1 -0
  21. package/dist/Form-BmQQnl-6.js +312 -0
  22. package/dist/Form-BmQQnl-6.js.map +1 -0
  23. package/dist/Form-Bp_ubH9I.cjs +311 -0
  24. package/dist/Form-Bp_ubH9I.cjs.map +1 -0
  25. package/dist/Form-BtqRbgLu.cjs +311 -0
  26. package/dist/Form-BtqRbgLu.cjs.map +1 -0
  27. package/dist/Form-COVZyto7.cjs +311 -0
  28. package/dist/Form-COVZyto7.cjs.map +1 -0
  29. package/dist/Form-CVD_3nCD.js +312 -0
  30. package/dist/Form-CVD_3nCD.js.map +1 -0
  31. package/dist/Form-Cfklj1_H.js +320 -0
  32. package/dist/Form-Cfklj1_H.js.map +1 -0
  33. package/dist/Form-ClAAiVNm.cjs +311 -0
  34. package/dist/Form-ClAAiVNm.cjs.map +1 -0
  35. package/dist/Form-DGLgTAdY.js +302 -0
  36. package/dist/Form-DGLgTAdY.js.map +1 -0
  37. package/dist/Form-DhsgC7kB.js.map +1 -1
  38. package/dist/Form-OK9zfg6E.js +321 -0
  39. package/dist/Form-OK9zfg6E.js.map +1 -0
  40. package/dist/components/Accordion/Accordion.cjs +7 -15
  41. package/dist/components/Accordion/Accordion.cjs.map +1 -1
  42. package/dist/components/Accordion/Accordion.d.ts +0 -1
  43. package/dist/components/Accordion/Accordion.d.ts.map +1 -1
  44. package/dist/components/Accordion/Accordion.mjs +8 -16
  45. package/dist/components/Accordion/Accordion.mjs.map +1 -1
  46. package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.cjs +1 -1
  47. package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.mjs +1 -1
  48. package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.cjs +1 -1
  49. package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.mjs +1 -1
  50. package/dist/components/Auth/SignInForm/SignInForm.cjs +1 -1
  51. package/dist/components/Auth/SignInForm/SignInForm.mjs +1 -1
  52. package/dist/components/Auth/SignUpForm/SignUpForm.cjs +1 -1
  53. package/dist/components/Auth/SignUpForm/SignUpForm.mjs +1 -1
  54. package/dist/components/Auth/SignUpForm/signUpForm.content.d.ts +11 -11
  55. package/dist/components/Breadcrumb/index.cjs +5 -2
  56. package/dist/components/Breadcrumb/index.cjs.map +1 -1
  57. package/dist/components/Breadcrumb/index.d.ts.map +1 -1
  58. package/dist/components/Breadcrumb/index.mjs +5 -2
  59. package/dist/components/Breadcrumb/index.mjs.map +1 -1
  60. package/dist/components/Button/Button.cjs +47 -25
  61. package/dist/components/Button/Button.cjs.map +1 -1
  62. package/dist/components/Button/Button.d.ts +2 -0
  63. package/dist/components/Button/Button.d.ts.map +1 -1
  64. package/dist/components/Button/Button.mjs +47 -25
  65. package/dist/components/Button/Button.mjs.map +1 -1
  66. package/dist/components/ClickOutsideDiv/index.cjs +26 -0
  67. package/dist/components/ClickOutsideDiv/index.cjs.map +1 -0
  68. package/dist/components/ClickOutsideDiv/index.d.ts +6 -0
  69. package/dist/components/ClickOutsideDiv/index.d.ts.map +1 -0
  70. package/dist/components/ClickOutsideDiv/index.mjs +26 -0
  71. package/dist/components/ClickOutsideDiv/index.mjs.map +1 -0
  72. package/dist/components/Container/index.cjs +1 -1
  73. package/dist/components/Container/index.cjs.map +1 -1
  74. package/dist/components/Container/index.mjs +1 -1
  75. package/dist/components/Container/index.mjs.map +1 -1
  76. package/dist/components/ContentEditor/ContentEditorCode.cjs +78 -0
  77. package/dist/components/ContentEditor/ContentEditorCode.cjs.map +1 -0
  78. package/dist/components/ContentEditor/ContentEditorCode.d.ts +11 -0
  79. package/dist/components/ContentEditor/ContentEditorCode.d.ts.map +1 -0
  80. package/dist/components/ContentEditor/ContentEditorCode.mjs +78 -0
  81. package/dist/components/ContentEditor/ContentEditorCode.mjs.map +1 -0
  82. package/dist/components/ContentEditor/ContentEditorTextArea.cjs +30 -26
  83. package/dist/components/ContentEditor/ContentEditorTextArea.cjs.map +1 -1
  84. package/dist/components/ContentEditor/ContentEditorTextArea.d.ts +2 -1
  85. package/dist/components/ContentEditor/ContentEditorTextArea.d.ts.map +1 -1
  86. package/dist/components/ContentEditor/ContentEditorTextArea.mjs +30 -26
  87. package/dist/components/ContentEditor/ContentEditorTextArea.mjs.map +1 -1
  88. package/dist/components/CopyToClipboard/index.cjs +1 -1
  89. package/dist/components/CopyToClipboard/index.cjs.map +1 -1
  90. package/dist/components/CopyToClipboard/index.d.ts.map +1 -1
  91. package/dist/components/CopyToClipboard/index.mjs +1 -1
  92. package/dist/components/CopyToClipboard/index.mjs.map +1 -1
  93. package/dist/components/DictionaryEditor/ItemLayout.cjs +0 -1
  94. package/dist/components/DictionaryEditor/ItemLayout.cjs.map +1 -1
  95. package/dist/components/DictionaryEditor/ItemLayout.d.ts.map +1 -1
  96. package/dist/components/DictionaryEditor/ItemLayout.mjs +0 -1
  97. package/dist/components/DictionaryEditor/ItemLayout.mjs.map +1 -1
  98. package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.cjs +4 -4
  99. package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.cjs.map +1 -1
  100. package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.mjs +4 -4
  101. package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.mjs.map +1 -1
  102. package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.cjs +5 -3
  103. package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.cjs.map +1 -1
  104. package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.d.ts +2 -0
  105. package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.d.ts.map +1 -1
  106. package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.mjs +5 -3
  107. package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.mjs.map +1 -1
  108. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.cjs +1 -1
  109. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.mjs +1 -1
  110. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.cjs +162 -70
  111. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.cjs.map +1 -1
  112. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.d.ts.map +1 -1
  113. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs +164 -72
  114. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs.map +1 -1
  115. package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.cjs +123 -0
  116. package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.cjs.map +1 -1
  117. package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.d.ts +14 -0
  118. package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.d.ts.map +1 -1
  119. package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.mjs +123 -0
  120. package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.mjs.map +1 -1
  121. package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.cjs +9 -2
  122. package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.cjs.map +1 -1
  123. package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.cjs +15 -0
  124. package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.cjs.map +1 -1
  125. package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.d.ts +1 -0
  126. package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.d.ts.map +1 -1
  127. package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.mjs +15 -0
  128. package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.mjs.map +1 -1
  129. package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.d.ts +6 -0
  130. package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.d.ts.map +1 -1
  131. package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.mjs +9 -2
  132. package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.mjs.map +1 -1
  133. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.cjs +13 -5
  134. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.cjs.map +1 -1
  135. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.d.ts +2 -0
  136. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.d.ts.map +1 -1
  137. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs +13 -5
  138. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs.map +1 -1
  139. package/dist/components/DictionaryFieldEditor/EditorView/EditorView.cjs +8 -6
  140. package/dist/components/DictionaryFieldEditor/EditorView/EditorView.cjs.map +1 -1
  141. package/dist/components/DictionaryFieldEditor/EditorView/EditorView.d.ts +2 -0
  142. package/dist/components/DictionaryFieldEditor/EditorView/EditorView.d.ts.map +1 -1
  143. package/dist/components/DictionaryFieldEditor/EditorView/EditorView.mjs +8 -6
  144. package/dist/components/DictionaryFieldEditor/EditorView/EditorView.mjs.map +1 -1
  145. package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.cjs +129 -66
  146. package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.cjs.map +1 -1
  147. package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.d.ts +4 -2
  148. package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.d.ts.map +1 -1
  149. package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.mjs +128 -65
  150. package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.mjs.map +1 -1
  151. package/dist/components/DictionaryFieldEditor/JSONEditor.cjs +1 -1
  152. package/dist/components/DictionaryFieldEditor/JSONEditor.mjs +1 -1
  153. package/dist/components/DictionaryFieldEditor/LocaleSelector/LocaleSelector.d.ts +8 -0
  154. package/dist/components/DictionaryFieldEditor/LocaleSelector/LocaleSelector.d.ts.map +1 -0
  155. package/dist/components/DictionaryFieldEditor/LocaleSelector/LocaleSelectorContext.d.ts +13 -0
  156. package/dist/components/DictionaryFieldEditor/LocaleSelector/LocaleSelectorContext.d.ts.map +1 -0
  157. package/dist/components/DictionaryFieldEditor/LocaleSelector/localeSelector.content.d.ts +9 -0
  158. package/dist/components/DictionaryFieldEditor/LocaleSelector/localeSelector.content.d.ts.map +1 -0
  159. package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.cjs +15 -19
  160. package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.cjs.map +1 -1
  161. package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.d.ts.map +1 -1
  162. package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.mjs +15 -19
  163. package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.mjs.map +1 -1
  164. package/dist/components/DictionaryFieldEditor/NodeEditor.cjs +24 -11
  165. package/dist/components/DictionaryFieldEditor/NodeEditor.cjs.map +1 -1
  166. package/dist/components/DictionaryFieldEditor/NodeEditor.d.ts +2 -0
  167. package/dist/components/DictionaryFieldEditor/NodeEditor.d.ts.map +1 -1
  168. package/dist/components/DictionaryFieldEditor/NodeEditor.mjs +24 -11
  169. package/dist/components/DictionaryFieldEditor/NodeEditor.mjs.map +1 -1
  170. package/dist/components/DictionaryFieldEditor/NodeTypeSelector.cjs +2 -2
  171. package/dist/components/DictionaryFieldEditor/NodeTypeSelector.cjs.map +1 -1
  172. package/dist/components/DictionaryFieldEditor/NodeTypeSelector.mjs +2 -2
  173. package/dist/components/DictionaryFieldEditor/NodeTypeSelector.mjs.map +1 -1
  174. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs +3 -5
  175. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs.map +1 -1
  176. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.d.ts.map +1 -1
  177. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs +4 -6
  178. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs.map +1 -1
  179. package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.cjs +13 -13
  180. package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.cjs.map +1 -1
  181. package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.mjs +13 -13
  182. package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.mjs.map +1 -1
  183. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.cjs +73 -0
  184. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.cjs.map +1 -0
  185. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.d.ts +7 -0
  186. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.d.ts.map +1 -0
  187. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.mjs +73 -0
  188. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.mjs.map +1 -0
  189. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcherContext.cjs +37 -0
  190. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcherContext.cjs.map +1 -0
  191. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcherContext.d.ts +14 -0
  192. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcherContext.d.ts.map +1 -0
  193. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcherContext.mjs +37 -0
  194. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcherContext.mjs.map +1 -0
  195. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/index.cjs +8 -0
  196. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/index.cjs.map +1 -0
  197. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/index.d.ts +3 -0
  198. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/index.d.ts.map +1 -0
  199. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/index.mjs +8 -0
  200. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/index.mjs.map +1 -0
  201. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/versionSwitcherDropDown.content.cjs +54 -0
  202. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/versionSwitcherDropDown.content.cjs.map +1 -0
  203. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/versionSwitcherDropDown.content.d.ts +10 -0
  204. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/versionSwitcherDropDown.content.d.ts.map +1 -0
  205. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/versionSwitcherDropDown.content.mjs +55 -0
  206. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/versionSwitcherDropDown.content.mjs.map +1 -0
  207. package/dist/components/DictionaryFieldEditor/index.cjs +5 -0
  208. package/dist/components/DictionaryFieldEditor/index.cjs.map +1 -1
  209. package/dist/components/DictionaryFieldEditor/index.d.ts +1 -0
  210. package/dist/components/DictionaryFieldEditor/index.d.ts.map +1 -1
  211. package/dist/components/DictionaryFieldEditor/index.mjs +6 -1
  212. package/dist/components/DictionaryFieldEditor/index.mjs.map +1 -1
  213. package/dist/components/EditableField/EditableFieldInput.cjs +5 -1
  214. package/dist/components/EditableField/EditableFieldInput.cjs.map +1 -1
  215. package/dist/components/EditableField/EditableFieldInput.d.ts.map +1 -1
  216. package/dist/components/EditableField/EditableFieldInput.mjs +6 -2
  217. package/dist/components/EditableField/EditableFieldInput.mjs.map +1 -1
  218. package/dist/components/EditableField/EditableFieldTextArea.cjs +2 -8
  219. package/dist/components/EditableField/EditableFieldTextArea.cjs.map +1 -1
  220. package/dist/components/EditableField/EditableFieldTextArea.d.ts.map +1 -1
  221. package/dist/components/EditableField/EditableFieldTextArea.mjs +2 -8
  222. package/dist/components/EditableField/EditableFieldTextArea.mjs.map +1 -1
  223. package/dist/components/Form/Form.cjs +1 -1
  224. package/dist/components/Form/Form.d.ts +2 -0
  225. package/dist/components/Form/Form.d.ts.map +1 -1
  226. package/dist/components/Form/Form.mjs +1 -1
  227. package/dist/components/Form/FormLabel.cjs +6 -2
  228. package/dist/components/Form/FormLabel.cjs.map +1 -1
  229. package/dist/components/Form/FormLabel.d.ts.map +1 -1
  230. package/dist/components/Form/FormLabel.mjs +6 -2
  231. package/dist/components/Form/FormLabel.mjs.map +1 -1
  232. package/dist/components/Form/elements/AutoSizeTextAreaElement.cjs +7 -0
  233. package/dist/components/Form/elements/AutoSizeTextAreaElement.cjs.map +1 -0
  234. package/dist/components/Form/elements/AutoSizeTextAreaElement.d.ts +9 -0
  235. package/dist/components/Form/elements/AutoSizeTextAreaElement.d.ts.map +1 -0
  236. package/dist/components/Form/elements/AutoSizeTextAreaElement.mjs +7 -0
  237. package/dist/components/Form/elements/AutoSizeTextAreaElement.mjs.map +1 -0
  238. package/dist/components/Form/elements/CheckboxElement.cjs +1 -1
  239. package/dist/components/Form/elements/CheckboxElement.mjs +1 -1
  240. package/dist/components/Form/elements/EditableFieldInputElement.cjs +1 -1
  241. package/dist/components/Form/elements/EditableFieldInputElement.d.ts +1 -1
  242. package/dist/components/Form/elements/EditableFieldInputElement.d.ts.map +1 -1
  243. package/dist/components/Form/elements/EditableFieldInputElement.mjs +1 -1
  244. package/dist/components/Form/elements/EditableFieldTextAreaElement.cjs +1 -1
  245. package/dist/components/Form/elements/EditableFieldTextAreaElement.d.ts +1 -1
  246. package/dist/components/Form/elements/EditableFieldTextAreaElement.d.ts.map +1 -1
  247. package/dist/components/Form/elements/EditableFieldTextAreaElement.mjs +1 -1
  248. package/dist/components/Form/elements/FormElement.cjs +1 -1
  249. package/dist/components/Form/elements/FormElement.mjs +1 -1
  250. package/dist/components/Form/elements/InputElement.cjs +1 -1
  251. package/dist/components/Form/elements/InputElement.mjs +1 -1
  252. package/dist/components/Form/elements/InputPasswordElement.cjs +1 -1
  253. package/dist/components/Form/elements/InputPasswordElement.mjs +1 -1
  254. package/dist/components/Form/elements/MultiselectElement.cjs +1 -1
  255. package/dist/components/Form/elements/MultiselectElement.mjs +1 -1
  256. package/dist/components/Form/elements/SelectElement.cjs +1 -1
  257. package/dist/components/Form/elements/SelectElement.d.ts.map +1 -1
  258. package/dist/components/Form/elements/SelectElement.mjs +1 -1
  259. package/dist/components/Form/elements/SwitchSelectorElement.cjs +1 -1
  260. package/dist/components/Form/elements/SwitchSelectorElement.mjs +1 -1
  261. package/dist/components/Form/elements/TextAreaElement.cjs +1 -1
  262. package/dist/components/Form/elements/TextAreaElement.mjs +1 -1
  263. package/dist/components/Form/elements/index.cjs +1 -1
  264. package/dist/components/Form/elements/index.mjs +1 -1
  265. package/dist/components/Form/index.cjs +1 -1
  266. package/dist/components/Form/index.mjs +1 -1
  267. package/dist/components/Form/layout/FormItemLayout.cjs +1 -1
  268. package/dist/components/Form/layout/FormItemLayout.d.ts.map +1 -1
  269. package/dist/components/Form/layout/FormItemLayout.mjs +1 -1
  270. package/dist/components/Form/layout/index.cjs +1 -1
  271. package/dist/components/Form/layout/index.mjs +1 -1
  272. package/dist/components/IDE/Code.cjs +77 -0
  273. package/dist/components/IDE/Code.cjs.map +1 -0
  274. package/dist/components/IDE/Code.d.ts +18 -0
  275. package/dist/components/IDE/Code.d.ts.map +1 -0
  276. package/dist/components/IDE/Code.mjs +77 -0
  277. package/dist/components/IDE/Code.mjs.map +1 -0
  278. package/dist/components/IDE/CodeBlock.cjs +54 -0
  279. package/dist/components/IDE/CodeBlock.cjs.map +1 -0
  280. package/dist/components/IDE/CodeBlock.d.ts +12 -0
  281. package/dist/components/IDE/CodeBlock.d.ts.map +1 -0
  282. package/dist/components/IDE/CodeBlock.mjs +54 -0
  283. package/dist/components/IDE/CodeBlock.mjs.map +1 -0
  284. package/dist/components/IDE/CodeBlockClient.cjs +55 -0
  285. package/dist/components/IDE/CodeBlockClient.cjs.map +1 -0
  286. package/dist/components/IDE/CodeBlockClient.mjs +55 -0
  287. package/dist/components/IDE/CodeBlockClient.mjs.map +1 -0
  288. package/dist/components/IDE/CodeBlockLoader.cjs +28 -0
  289. package/dist/components/IDE/CodeBlockLoader.cjs.map +1 -0
  290. package/dist/components/IDE/CodeBlockLoader.d.ts +4 -0
  291. package/dist/components/IDE/CodeBlockLoader.d.ts.map +1 -0
  292. package/dist/components/IDE/CodeBlockLoader.mjs +28 -0
  293. package/dist/components/IDE/CodeBlockLoader.mjs.map +1 -0
  294. package/dist/components/IDE/CodeBlockServer.cjs +53 -0
  295. package/dist/components/IDE/CodeBlockServer.cjs.map +1 -0
  296. package/dist/components/IDE/CodeBlockServer.d.ts +12 -0
  297. package/dist/components/IDE/CodeBlockServer.d.ts.map +1 -0
  298. package/dist/components/IDE/CodeBlockServer.mjs +53 -0
  299. package/dist/components/IDE/CodeBlockServer.mjs.map +1 -0
  300. package/dist/components/IDE/CodeBlockShiki.d.ts +3 -0
  301. package/dist/components/IDE/CodeBlockShiki.d.ts.map +1 -0
  302. package/dist/components/IDE/CodeBlockclient.d.ts +12 -0
  303. package/dist/components/IDE/CodeBlockclient.d.ts.map +1 -0
  304. package/dist/components/IDE/CodeConditionalRenderer.cjs +20 -0
  305. package/dist/components/IDE/CodeConditionalRenderer.cjs.map +1 -0
  306. package/dist/components/IDE/CodeConditionalRenderer.d.ts +4 -0
  307. package/dist/components/IDE/CodeConditionalRenderer.d.ts.map +1 -0
  308. package/dist/components/IDE/CodeConditionalRenderer.mjs +20 -0
  309. package/dist/components/IDE/CodeConditionalRenderer.mjs.map +1 -0
  310. package/dist/components/IDE/CodeContext.cjs +57 -0
  311. package/dist/components/IDE/CodeContext.cjs.map +1 -0
  312. package/dist/components/IDE/CodeContext.d.ts +26 -0
  313. package/dist/components/IDE/CodeContext.d.ts.map +1 -0
  314. package/dist/components/IDE/CodeContext.mjs +57 -0
  315. package/dist/components/IDE/CodeContext.mjs.map +1 -0
  316. package/dist/components/IDE/CodeFormatSelector.cjs +30 -0
  317. package/dist/components/IDE/CodeFormatSelector.cjs.map +1 -0
  318. package/dist/components/IDE/CodeFormatSelector.d.ts +3 -0
  319. package/dist/components/IDE/CodeFormatSelector.d.ts.map +1 -0
  320. package/dist/components/IDE/CodeFormatSelector.mjs +30 -0
  321. package/dist/components/IDE/CodeFormatSelector.mjs.map +1 -0
  322. package/dist/components/IDE/CodeRenderer.cjs +27 -0
  323. package/dist/components/IDE/CodeRenderer.cjs.map +1 -0
  324. package/dist/components/IDE/CodeRenderer.d.ts +5 -0
  325. package/dist/components/IDE/CodeRenderer.d.ts.map +1 -0
  326. package/dist/components/IDE/CodeRenderer.mjs +27 -0
  327. package/dist/components/IDE/CodeRenderer.mjs.map +1 -0
  328. package/dist/components/IDE/ContentDeclarationFormatSelector.cjs +28 -0
  329. package/dist/components/IDE/ContentDeclarationFormatSelector.cjs.map +1 -0
  330. package/dist/components/IDE/ContentDeclarationFormatSelector.d.ts +3 -0
  331. package/dist/components/IDE/ContentDeclarationFormatSelector.d.ts.map +1 -0
  332. package/dist/components/IDE/ContentDeclarationFormatSelector.mjs +28 -0
  333. package/dist/components/IDE/ContentDeclarationFormatSelector.mjs.map +1 -0
  334. package/dist/components/IDE/EditableCodeBlock.d.ts +9 -0
  335. package/dist/components/IDE/EditableCodeBlock.d.ts.map +1 -0
  336. package/dist/components/IDE/MarkDownRender.cjs +2 -3
  337. package/dist/components/IDE/MarkDownRender.cjs.map +1 -1
  338. package/dist/components/IDE/MarkDownRender.d.ts.map +1 -1
  339. package/dist/components/IDE/MarkDownRender.mjs +1 -2
  340. package/dist/components/IDE/MarkDownRender.mjs.map +1 -1
  341. package/dist/components/IDE/PackageManagerSelector.cjs +20 -0
  342. package/dist/components/IDE/PackageManagerSelector.cjs.map +1 -0
  343. package/dist/components/IDE/PackageManagerSelector.d.ts +3 -0
  344. package/dist/components/IDE/PackageManagerSelector.d.ts.map +1 -0
  345. package/dist/components/IDE/PackageManagerSelector.mjs +20 -0
  346. package/dist/components/IDE/PackageManagerSelector.mjs.map +1 -0
  347. package/dist/components/IDE/index.cjs +2 -2
  348. package/dist/components/IDE/index.d.ts +1 -1
  349. package/dist/components/IDE/index.d.ts.map +1 -1
  350. package/dist/components/IDE/index.mjs +1 -1
  351. package/dist/components/Link/Link.cjs +3 -4
  352. package/dist/components/Link/Link.cjs.map +1 -1
  353. package/dist/components/Link/Link.d.ts +1 -1
  354. package/dist/components/Link/Link.d.ts.map +1 -1
  355. package/dist/components/Link/Link.mjs +3 -4
  356. package/dist/components/Link/Link.mjs.map +1 -1
  357. package/dist/components/Loader/index.cjs +6 -1
  358. package/dist/components/Loader/index.cjs.map +1 -1
  359. package/dist/components/Loader/index.content.cjs +23 -0
  360. package/dist/components/Loader/index.content.cjs.map +1 -0
  361. package/dist/components/Loader/index.content.d.ts +8 -0
  362. package/dist/components/Loader/index.content.d.ts.map +1 -0
  363. package/dist/components/Loader/index.content.mjs +23 -0
  364. package/dist/components/Loader/index.content.mjs.map +1 -0
  365. package/dist/components/Loader/index.d.ts +2 -2
  366. package/dist/components/Loader/index.d.ts.map +1 -1
  367. package/dist/components/Loader/index.mjs +6 -1
  368. package/dist/components/Loader/index.mjs.map +1 -1
  369. package/dist/components/LocaleSwitcherContentDropDown/LocaleSelectorContext.d.ts +13 -0
  370. package/dist/components/LocaleSwitcherContentDropDown/LocaleSelectorContext.d.ts.map +1 -0
  371. package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.cjs +218 -0
  372. package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.cjs.map +1 -0
  373. package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.d.ts +8 -0
  374. package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.d.ts.map +1 -0
  375. package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.mjs +218 -0
  376. package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.mjs.map +1 -0
  377. package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.cjs +42 -0
  378. package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.cjs.map +1 -0
  379. package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.d.ts +15 -0
  380. package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.d.ts.map +1 -0
  381. package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.mjs +42 -0
  382. package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.mjs.map +1 -0
  383. package/dist/components/LocaleSwitcherContentDropDown/index.cjs +8 -0
  384. package/dist/components/LocaleSwitcherContentDropDown/index.cjs.map +1 -0
  385. package/dist/components/LocaleSwitcherContentDropDown/index.d.ts +3 -0
  386. package/dist/components/LocaleSwitcherContentDropDown/index.d.ts.map +1 -0
  387. package/dist/components/LocaleSwitcherContentDropDown/index.mjs +8 -0
  388. package/dist/components/LocaleSwitcherContentDropDown/index.mjs.map +1 -0
  389. package/dist/components/LocaleSwitcherContentDropDown/localeSwitcher.content.cjs +118 -0
  390. package/dist/components/LocaleSwitcherContentDropDown/localeSwitcher.content.cjs.map +1 -0
  391. package/dist/components/LocaleSwitcherContentDropDown/localeSwitcher.content.d.ts +18 -0
  392. package/dist/components/LocaleSwitcherContentDropDown/localeSwitcher.content.d.ts.map +1 -0
  393. package/dist/components/LocaleSwitcherContentDropDown/localeSwitcher.content.mjs +119 -0
  394. package/dist/components/LocaleSwitcherContentDropDown/localeSwitcher.content.mjs.map +1 -0
  395. package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.cjs +14 -22
  396. package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.cjs.map +1 -1
  397. package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.d.ts.map +1 -1
  398. package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.mjs +14 -22
  399. package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.mjs.map +1 -1
  400. package/dist/components/MarkDownRender/index.cjs +59 -30
  401. package/dist/components/MarkDownRender/index.cjs.map +1 -1
  402. package/dist/components/MarkDownRender/index.d.ts +2 -0
  403. package/dist/components/MarkDownRender/index.d.ts.map +1 -1
  404. package/dist/components/MarkDownRender/index.mjs +60 -31
  405. package/dist/components/MarkDownRender/index.mjs.map +1 -1
  406. package/dist/components/Modal/Modal.cjs +21 -13
  407. package/dist/components/Modal/Modal.cjs.map +1 -1
  408. package/dist/components/Modal/Modal.d.ts +2 -2
  409. package/dist/components/Modal/Modal.d.ts.map +1 -1
  410. package/dist/components/Modal/Modal.mjs +22 -14
  411. package/dist/components/Modal/Modal.mjs.map +1 -1
  412. package/dist/components/SwitchSelector/index.cjs +4 -0
  413. package/dist/components/SwitchSelector/index.cjs.map +1 -1
  414. package/dist/components/SwitchSelector/index.d.ts.map +1 -1
  415. package/dist/components/SwitchSelector/index.mjs +5 -1
  416. package/dist/components/SwitchSelector/index.mjs.map +1 -1
  417. package/dist/components/index.cjs +17 -5
  418. package/dist/components/index.cjs.map +1 -1
  419. package/dist/components/index.d.ts +3 -1
  420. package/dist/components/index.d.ts.map +1 -1
  421. package/dist/components/index.mjs +16 -4
  422. package/dist/components/index.mjs.map +1 -1
  423. package/dist/hooks/index.cjs +9 -1
  424. package/dist/hooks/index.cjs.map +1 -1
  425. package/dist/hooks/index.mjs +10 -2
  426. package/dist/hooks/intlayerAPIHooks.cjs +82 -5
  427. package/dist/hooks/intlayerAPIHooks.cjs.map +1 -1
  428. package/dist/hooks/intlayerAPIHooks.d.ts +13 -2
  429. package/dist/hooks/intlayerAPIHooks.d.ts.map +1 -1
  430. package/dist/hooks/intlayerAPIHooks.mjs +82 -5
  431. package/dist/hooks/intlayerAPIHooks.mjs.map +1 -1
  432. package/dist/hooks/useAsync/useAsync.cjs +81 -78
  433. package/dist/hooks/useAsync/useAsync.cjs.map +1 -1
  434. package/dist/hooks/useAsync/useAsync.d.ts +5 -25
  435. package/dist/hooks/useAsync/useAsync.d.ts.map +1 -1
  436. package/dist/hooks/useAsync/useAsync.mjs +81 -78
  437. package/dist/hooks/useAsync/useAsync.mjs.map +1 -1
  438. package/dist/hooks/useAsync/useAsyncStateStore.cjs +3 -7
  439. package/dist/hooks/useAsync/useAsyncStateStore.cjs.map +1 -1
  440. package/dist/hooks/useAsync/useAsyncStateStore.d.ts +1 -1
  441. package/dist/hooks/useAsync/useAsyncStateStore.d.ts.map +1 -1
  442. package/dist/hooks/useAsync/useAsyncStateStore.mjs +3 -7
  443. package/dist/hooks/useAsync/useAsyncStateStore.mjs.map +1 -1
  444. package/dist/hooks/useGetAllDictionaries.cjs +5 -3
  445. package/dist/hooks/useGetAllDictionaries.cjs.map +1 -1
  446. package/dist/hooks/useGetAllDictionaries.d.ts +4 -1
  447. package/dist/hooks/useGetAllDictionaries.d.ts.map +1 -1
  448. package/dist/hooks/useGetAllDictionaries.mjs +5 -3
  449. package/dist/hooks/useGetAllDictionaries.mjs.map +1 -1
  450. package/dist/hooks/useIntlayerAPI.d.ts +12 -2
  451. package/dist/hooks/useIntlayerAPI.d.ts.map +1 -1
  452. package/dist/hooks/usePersistedStore.cjs +22 -8
  453. package/dist/hooks/usePersistedStore.cjs.map +1 -1
  454. package/dist/hooks/usePersistedStore.d.ts.map +1 -1
  455. package/dist/hooks/usePersistedStore.mjs +22 -8
  456. package/dist/hooks/usePersistedStore.mjs.map +1 -1
  457. package/dist/libs/intlayer-api/ai.cjs +43 -3
  458. package/dist/libs/intlayer-api/ai.cjs.map +1 -1
  459. package/dist/libs/intlayer-api/ai.d.ts +11 -3
  460. package/dist/libs/intlayer-api/ai.d.ts.map +1 -1
  461. package/dist/libs/intlayer-api/ai.mjs +43 -3
  462. package/dist/libs/intlayer-api/ai.mjs.map +1 -1
  463. package/dist/libs/intlayer-api/dictionary.cjs +2 -2
  464. package/dist/libs/intlayer-api/dictionary.cjs.map +1 -1
  465. package/dist/libs/intlayer-api/dictionary.d.ts +3 -3
  466. package/dist/libs/intlayer-api/dictionary.d.ts.map +1 -1
  467. package/dist/libs/intlayer-api/dictionary.mjs +2 -2
  468. package/dist/libs/intlayer-api/dictionary.mjs.map +1 -1
  469. package/dist/libs/intlayer-api/index.cjs +3 -1
  470. package/dist/libs/intlayer-api/index.cjs.map +1 -1
  471. package/dist/libs/intlayer-api/index.d.ts +24 -4
  472. package/dist/libs/intlayer-api/index.d.ts.map +1 -1
  473. package/dist/libs/intlayer-api/index.mjs +3 -1
  474. package/dist/libs/intlayer-api/index.mjs.map +1 -1
  475. package/dist/libs/intlayer-api/tag.cjs +52 -0
  476. package/dist/libs/intlayer-api/tag.cjs.map +1 -0
  477. package/dist/libs/intlayer-api/tag.d.ts +16 -0
  478. package/dist/libs/intlayer-api/tag.d.ts.map +1 -0
  479. package/dist/libs/intlayer-api/tag.mjs +52 -0
  480. package/dist/libs/intlayer-api/tag.mjs.map +1 -0
  481. package/dist/tailwind.css +1 -1
  482. package/package.json +18 -19
@@ -1 +1 @@
1
- {"version":3,"file":"useDictionaryDetailsSchema.mjs","sources":["../../../../src/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.ts"],"sourcesContent":["// @ts-ignore react-intlayer not build yet\nimport { useDictionary } from 'react-intlayer';\nimport { z } from 'zod';\nimport { useDictionaryDetailsSchemaContent } from './useDictionaryDetailsSchema.content';\n\nexport const useDictionaryDetailsSchema = (projectId: string) => {\n const {\n titleRequiredError,\n titleInvalidTypeError,\n titleMinLengthError,\n keyRequiredError,\n keyInvalidTypeError,\n keySpaceError,\n keyMinLengthError,\n descriptionRequiredError,\n descriptionInvalidTypeError,\n requiredErrorProjectId,\n invalidTypeErrorProjectId,\n } = useDictionary(useDictionaryDetailsSchemaContent);\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 useDictionaryDetailsSchema>\n>;\n"],"names":[],"mappings":";;;AAKa,MAAA,6BAA6B,CAAC,cAAsB;AACzD,QAAA;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA,IACE,cAAc,iCAAiC;AAEnD,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,MACrB,CAAA;AAAA,IAAA,EAEF,QAAQ,CAAC,SAAS,CAAC;AAAA,EAAA,CACvB;AACH;"}
1
+ {"version":3,"file":"useDictionaryDetailsSchema.mjs","sources":["../../../../src/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.ts"],"sourcesContent":["// @ts-ignore react-intlayer not build yet\nimport { useDictionary } from 'react-intlayer';\nimport { z } from 'zod';\nimport { useDictionaryDetailsSchemaContent } from './useDictionaryDetailsSchema.content';\n\nexport const useDictionaryDetailsSchema = (projectId: string) => {\n const {\n titleRequiredError,\n titleInvalidTypeError,\n titleMinLengthError,\n keyRequiredError,\n keyInvalidTypeError,\n keySpaceError,\n keyMinLengthError,\n descriptionRequiredError,\n descriptionInvalidTypeError,\n requiredErrorProjectId,\n invalidTypeErrorProjectId,\n invalidTypeErrorTags,\n } = useDictionary(useDictionaryDetailsSchemaContent);\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 tags: z\n .array(\n z.string({\n invalid_type_error: invalidTypeErrorTags,\n })\n )\n .default([]),\n publishedVersion: z.string().default('-1'),\n });\n};\n\nexport type DictionaryDetailsFormData = z.infer<\n ReturnType<typeof useDictionaryDetailsSchema>\n>;\n"],"names":[],"mappings":";;;AAKa,MAAA,6BAA6B,CAAC,cAAsB;AACzD,QAAA;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA,IACE,cAAc,iCAAiC;AAEnD,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,MACrB,CAAA;AAAA,IAAA,EAEF,QAAQ,CAAC,SAAS,CAAC;AAAA,IACtB,MAAM,EACH;AAAA,MACC,EAAE,OAAO;AAAA,QACP,oBAAoB;AAAA,MACrB,CAAA;AAAA,IAAA,EAEF,QAAQ,CAAA,CAAE;AAAA,IACb,kBAAkB,EAAE,OAAO,EAAE,QAAQ,IAAI;AAAA,EAAA,CAC1C;AACH;"}
@@ -24,11 +24,18 @@ require("@intlayer/dictionaries-entry");
24
24
  require("deepmerge");
25
25
  require("../Form/FormBase.cjs");
26
26
  require("../Form/FormField.cjs");
27
- require("../../Form-BDcoNTLV.cjs");
27
+ require("../../Form-7BqwvjVI.cjs");
28
28
  require("../DictionaryEditor/validDictionaryChangeButtons.content.cjs");
29
29
  require("zod");
30
30
  const components_Headers_index = require("../Headers/index.cjs");
31
+ require("fuse.js");
32
+ require("../DropDown/index.cjs");
33
+ require("../Input/Input.cjs");
34
+ require("../Input/InputPassword.cjs");
35
+ require("../Input/Checkbox.cjs");
31
36
  const components_SwitchSelector_index = require("../SwitchSelector/index.cjs");
37
+ require("../LocaleSwitcherContentDropDown/localeSwitcher.content.cjs");
38
+ const components_LocaleSwitcherContentDropDown_LocaleSwitcherContentContext = require("../LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.cjs");
32
39
  const components_DictionaryFieldEditor_DictionaryDetails_DictionaryDetailsForm = require("./DictionaryDetails/DictionaryDetailsForm.cjs");
33
40
  const components_DictionaryFieldEditor_dictionaryFieldEditor_content = require("./dictionaryFieldEditor.content.cjs");
34
41
  const components_DictionaryFieldEditor_JSONEditor = require("./JSONEditor.cjs");
@@ -37,7 +44,8 @@ const components_DictionaryFieldEditor_SaveForm_SaveForm = require("./SaveForm/S
37
44
  const DictionaryFieldEditor = ({
38
45
  dictionary,
39
46
  onClickDictionaryList,
40
- isDarkMode
47
+ isDarkMode,
48
+ availableLocales
41
49
  }) => {
42
50
  const { key } = dictionary;
43
51
  const [editorView, setEditorView] = require$$0.useState(
@@ -58,7 +66,7 @@ const DictionaryFieldEditor = ({
58
66
  [key]: dictionary
59
67
  });
60
68
  }, [dictionary, key, setDictionariesRecord, dictionaryRecord]);
61
- return /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs("div", { className: "flex size-full flex-1 flex-col gap-10", children: [
69
+ return /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(components_LocaleSwitcherContentDropDown_LocaleSwitcherContentContext.LocaleSwitcherContentProvider, { availableLocales, children: /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs("div", { className: "flex size-full flex-1 flex-col gap-10", children: [
62
70
  /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", children: [
63
71
  /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
64
72
  components_Button_Button.Button,
@@ -121,13 +129,13 @@ const DictionaryFieldEditor = ({
121
129
  ]
122
130
  }
123
131
  ),
124
- editorView === 0 && /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(components_DictionaryFieldEditor_NodeEditor.NodeEditor, { dictionary }),
132
+ editorView === 0 && /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(components_DictionaryFieldEditor_NodeEditor.NodeEditor, { dictionary, locales: availableLocales }),
125
133
  editorView === 1 && /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(components_DictionaryFieldEditor_JSONEditor.JSONEditor, { dictionary, isDarkMode }),
126
134
  /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(components_DictionaryFieldEditor_SaveForm_SaveForm.SaveForm, { dictionary })
127
135
  ]
128
136
  }
129
137
  )
130
- ] });
138
+ ] }) });
131
139
  };
132
140
  exports.DictionaryFieldEditor = DictionaryFieldEditor;
133
141
  //# sourceMappingURL=DictionaryFieldEditor.cjs.map
@@ -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 { useEffect, useState, type FC } from 'react';\n// @ts-ignore react-intlayer not build yet\nimport { useDictionary } from 'react-intlayer';\nimport { useShallow } from 'zustand/react/shallow';\nimport { Button } from '../Button';\nimport { Container } from '../Container';\nimport { useEditedContentStore } from '../DictionaryEditor';\nimport { H2 } from '../Headers';\nimport { SwitchSelector } from '../SwitchSelector';\nimport { DictionaryDetailsForm } from './DictionaryDetails/DictionaryDetailsForm';\nimport { dictionaryFieldEditorContent } from './dictionaryFieldEditor.content';\nimport { JSONEditor } from './JSONEditor';\nimport { NodeEditor } from './NodeEditor';\nimport { SaveForm } from './SaveForm/SaveForm';\n\ntype DictionaryFieldEditorProps = {\n dictionary: Dictionary;\n onClickDictionaryList?: () => void;\n isDarkMode?: boolean;\n};\n\nenum EditorViewType {\n NodeEditor,\n JSONEditor,\n}\n\nexport const DictionaryFieldEditor: FC<DictionaryFieldEditorProps> = ({\n dictionary,\n onClickDictionaryList,\n isDarkMode,\n}) => {\n const { key } = dictionary;\n const [editorView, setEditorView] = useState<EditorViewType>(\n EditorViewType.NodeEditor\n );\n const { dictionaryRecord, setDictionariesRecord } = useEditedContentStore(\n useShallow((s) => ({\n editedContent: s.editedContent,\n dictionaryRecord: s.dictionariesRecord,\n setDictionariesRecord: s.setDictionariesRecord,\n }))\n );\n const { returnToDictionaryList, titleContent, titleInformation } =\n useDictionary(dictionaryFieldEditorContent);\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}\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 <SwitchSelector\n defaultValue={editorView}\n onChange={(value) => setEditorView(value)}\n color=\"text\"\n size=\"sm\"\n className=\"ml-auto\"\n choices={[\n {\n content: 'Node editor',\n value: EditorViewType.NodeEditor,\n },\n {\n content: 'JSON editor',\n value: EditorViewType.JSONEditor,\n },\n ]}\n />\n {editorView === EditorViewType.NodeEditor && (\n <NodeEditor dictionary={dictionary} />\n )}\n {editorView === EditorViewType.JSONEditor && (\n <JSONEditor dictionary={dictionary} isDarkMode={isDarkMode} />\n )}\n <SaveForm dictionary={dictionary} />\n </Container>\n </div>\n );\n};\n"],"names":["useState","useEditedContentStore","useShallow","useDictionary","dictionaryFieldEditorContent","useEffect","jsxs","jsx","Button","ArrowLeft","Container","H2","DictionaryDetailsForm","SwitchSelector","NodeEditor","JSONEditor","SaveForm"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BO,MAAM,wBAAwD,CAAC;AAAA,EACpE;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACE,QAAA,EAAE,QAAQ;AACV,QAAA,CAAC,YAAY,aAAa,IAAIA,WAAA;AAAA,IAClC;AAAA;AAAA,EACF;AACM,QAAA,EAAE,kBAAkB,sBAAA,IAA0BC,kDAAA;AAAA,IAClDC,QAAA,WAAW,CAAC,OAAO;AAAA,MACjB,eAAe,EAAE;AAAA,MACjB,kBAAkB,EAAE;AAAA,MACpB,uBAAuB,EAAE;AAAA,IAAA,EACzB;AAAA,EACJ;AACA,QAAM,EAAE,wBAAwB,cAAc,iBAAiB,IAC7DC,cAAAA,cAAcC,+DAAAA,4BAA4B;AAE5CC,aAAAA,UAAU,MAAM;AACV,QAAA,iBAAiB,GAAG,EAAG;AAEL,0BAAA;AAAA,MACpB,CAAC,GAAG,GAAG;AAAA,IAAA,CACR;AAAA,KACA,CAAC,YAAY,KAAK,uBAAuB,gBAAgB,CAAC;AAG3D,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,yBAAA;AAAA,QAAA;AAAA,UACC,SAAS,MAAM,wBAAwB;AAAA,UACvC,SAAQ;AAAA,UACR,MAAK;AAAA,UACL,OAAM;AAAA,UACN,IAAG;AAAA,UACH,MAAMC,YAAA;AAAA,UACN,OAAO,uBAAuB;AAAA,QAAA;AAAA,MAChC;AAAA,MACAF,2BAAA,kBAAA;AAAA,QAAC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DictionaryFieldEditor/DictionaryFieldEditor.tsx"],"sourcesContent":["'use client';\n\nimport { Locales } from '@intlayer/config';\nimport { Dictionary } from '@intlayer/core';\nimport { ArrowLeft } from 'lucide-react';\nimport { useEffect, useState, type FC } from 'react';\n// @ts-ignore react-intlayer not build yet\nimport { useDictionary } from 'react-intlayer';\nimport { useShallow } from 'zustand/react/shallow';\nimport { Button } from '../Button';\nimport { Container } from '../Container';\nimport { useEditedContentStore } from '../DictionaryEditor';\nimport { H2 } from '../Headers';\nimport { LocaleSwitcherContentProvider } from '../LocaleSwitcherContentDropDown';\nimport { SwitchSelector } from '../SwitchSelector';\nimport { DictionaryDetailsForm } from './DictionaryDetails/DictionaryDetailsForm';\nimport { dictionaryFieldEditorContent } from './dictionaryFieldEditor.content';\nimport { JSONEditor } from './JSONEditor';\nimport { NodeEditor } from './NodeEditor';\nimport { SaveForm } from './SaveForm/SaveForm';\n\ntype DictionaryFieldEditorProps = {\n dictionary: Dictionary;\n onClickDictionaryList?: () => void;\n isDarkMode?: boolean;\n availableLocales: Locales[];\n};\n\nenum EditorViewType {\n NodeEditor,\n JSONEditor,\n}\n\nexport const DictionaryFieldEditor: FC<DictionaryFieldEditorProps> = ({\n dictionary,\n onClickDictionaryList,\n isDarkMode,\n availableLocales,\n}) => {\n const { key } = dictionary;\n const [editorView, setEditorView] = useState<EditorViewType>(\n EditorViewType.NodeEditor\n );\n const { dictionaryRecord, setDictionariesRecord } = useEditedContentStore(\n useShallow((s) => ({\n editedContent: s.editedContent,\n dictionaryRecord: s.dictionariesRecord,\n setDictionariesRecord: s.setDictionariesRecord,\n }))\n );\n const { returnToDictionaryList, titleContent, titleInformation } =\n useDictionary(dictionaryFieldEditorContent);\n\n useEffect(() => {\n if (dictionaryRecord[key]) return;\n\n setDictionariesRecord({\n [key]: dictionary,\n });\n }, [dictionary, key, setDictionariesRecord, dictionaryRecord]);\n\n return (\n <LocaleSwitcherContentProvider availableLocales={availableLocales}>\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}\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 <SwitchSelector\n defaultValue={editorView}\n onChange={(value) => setEditorView(value)}\n color=\"text\"\n size=\"sm\"\n className=\"ml-auto\"\n choices={[\n {\n content: 'Node editor',\n value: EditorViewType.NodeEditor,\n },\n {\n content: 'JSON editor',\n value: EditorViewType.JSONEditor,\n },\n ]}\n />\n {editorView === EditorViewType.NodeEditor && (\n <NodeEditor dictionary={dictionary} locales={availableLocales} />\n )}\n {editorView === EditorViewType.JSONEditor && (\n <JSONEditor dictionary={dictionary} isDarkMode={isDarkMode} />\n )}\n <SaveForm dictionary={dictionary} />\n </Container>\n </div>\n </LocaleSwitcherContentProvider>\n );\n};\n"],"names":["useState","useEditedContentStore","useShallow","useDictionary","dictionaryFieldEditorContent","useEffect","LocaleSwitcherContentProvider","jsxs","jsx","Button","ArrowLeft","Container","H2","DictionaryDetailsForm","SwitchSelector","NodeEditor","JSONEditor","SaveForm"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCO,MAAM,wBAAwD,CAAC;AAAA,EACpE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACE,QAAA,EAAE,QAAQ;AACV,QAAA,CAAC,YAAY,aAAa,IAAIA,WAAA;AAAA,IAClC;AA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,QAAA;AAAA,MAAA;AAAA,IACjD;AAAA,IAEAN,2BAAA,kBAAA;AAAA,MAACI,2BAAA;AAAA,MAAA;AAAA,QACC,WAAU;AAAA,QACV,aAAY;AAAA,QAEZ,UAAA;AAAA,UAAAH,2BAAAA,kBAAAA,IAACI,+BAAI,UAAa,aAAA,CAAA;AAAA,UAClBJ,2BAAA,kBAAA;AAAA,YAACM,gCAAA;AAAA,YAAA;AAAA,cACC,cAAc;AAAA,cACd,UAAU,CAAC,UAAU,cAAc,KAAK;AAAA,cACxC,OAAM;AAAA,cACN,MAAK;AAAA,cACL,WAAU;AAAA,cACV,SAAS;AAAA,gBACP;AAAA,kBACE,SAAS;AAAA,kBACT,OAAO;AAAA;AAAA,gBACT;AAAA,gBACA;AAAA,kBACE,SAAS;AAAA,kBACT,OAAO;AAAA;AAAA,gBAAA;AAAA,cACT;AAAA,YACF;AAAA,UACF;AAAA,UACC,eAAe,KACdN,iDAACO,4CAAAA,YAAW,EAAA,YAAwB,SAAS,kBAAkB;AAAA,UAEhE,eAAe,KACbP,2BAAA,kBAAA,IAAAQ,4CAAA,YAAA,EAAW,YAAwB,YAAwB;AAAA,UAE9DR,iDAACS,mDAAAA,YAAS,WAAwB,CAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EACpC,EAAA,CACF,EACF,CAAA;AAEJ;;"}
@@ -1,9 +1,11 @@
1
+ import { Locales } from '@intlayer/config';
1
2
  import { Dictionary } from '@intlayer/core';
2
3
  import { FC } from 'react';
3
4
  type DictionaryFieldEditorProps = {
4
5
  dictionary: Dictionary;
5
6
  onClickDictionaryList?: () => void;
6
7
  isDarkMode?: boolean;
8
+ availableLocales: Locales[];
7
9
  };
8
10
  export declare const DictionaryFieldEditor: FC<DictionaryFieldEditorProps>;
9
11
  export {};
@@ -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,EAAuB,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAerD,KAAK,0BAA0B,GAAG;IAChC,UAAU,EAAE,UAAU,CAAC;IACvB,qBAAqB,CAAC,EAAE,MAAM,IAAI,CAAC;IACnC,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAOF,eAAO,MAAM,qBAAqB,EAAE,EAAE,CAAC,0BAA0B,CAwFhE,CAAC"}
1
+ {"version":3,"file":"DictionaryFieldEditor.d.ts","sourceRoot":"","sources":["../../../src/components/DictionaryFieldEditor/DictionaryFieldEditor.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,OAAO,EAAuB,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAgBrD,KAAK,0BAA0B,GAAG;IAChC,UAAU,EAAE,UAAU,CAAC;IACvB,qBAAqB,CAAC,EAAE,MAAM,IAAI,CAAC;IACnC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,gBAAgB,EAAE,OAAO,EAAE,CAAC;CAC7B,CAAC;AAOF,eAAO,MAAM,qBAAqB,EAAE,EAAE,CAAC,0BAA0B,CA2FhE,CAAC"}
@@ -22,11 +22,18 @@ import "@intlayer/dictionaries-entry";
22
22
  import "deepmerge";
23
23
  import "../Form/FormBase.mjs";
24
24
  import "../Form/FormField.mjs";
25
- import "../../Form-DhsgC7kB.js";
25
+ import "../../Form-OK9zfg6E.js";
26
26
  import "../DictionaryEditor/validDictionaryChangeButtons.content.mjs";
27
27
  import "zod";
28
28
  import { H2 } from "../Headers/index.mjs";
29
+ import "fuse.js";
30
+ import "../DropDown/index.mjs";
31
+ import "../Input/Input.mjs";
32
+ import "../Input/InputPassword.mjs";
33
+ import "../Input/Checkbox.mjs";
29
34
  import { SwitchSelector } from "../SwitchSelector/index.mjs";
35
+ import "../LocaleSwitcherContentDropDown/localeSwitcher.content.mjs";
36
+ import { LocaleSwitcherContentProvider } from "../LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.mjs";
30
37
  import { DictionaryDetailsForm } from "./DictionaryDetails/DictionaryDetailsForm.mjs";
31
38
  import { dictionaryFieldEditorContent } from "./dictionaryFieldEditor.content.mjs";
32
39
  import { JSONEditor } from "./JSONEditor.mjs";
@@ -35,7 +42,8 @@ import { SaveForm } from "./SaveForm/SaveForm.mjs";
35
42
  const DictionaryFieldEditor = ({
36
43
  dictionary,
37
44
  onClickDictionaryList,
38
- isDarkMode
45
+ isDarkMode,
46
+ availableLocales
39
47
  }) => {
40
48
  const { key } = dictionary;
41
49
  const [editorView, setEditorView] = useState(
@@ -56,7 +64,7 @@ const DictionaryFieldEditor = ({
56
64
  [key]: dictionary
57
65
  });
58
66
  }, [dictionary, key, setDictionariesRecord, dictionaryRecord]);
59
- return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex size-full flex-1 flex-col gap-10", children: [
67
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(LocaleSwitcherContentProvider, { availableLocales, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex size-full flex-1 flex-col gap-10", children: [
60
68
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", children: [
61
69
  /* @__PURE__ */ jsxRuntimeExports.jsx(
62
70
  Button,
@@ -119,13 +127,13 @@ const DictionaryFieldEditor = ({
119
127
  ]
120
128
  }
121
129
  ),
122
- editorView === 0 && /* @__PURE__ */ jsxRuntimeExports.jsx(NodeEditor, { dictionary }),
130
+ editorView === 0 && /* @__PURE__ */ jsxRuntimeExports.jsx(NodeEditor, { dictionary, locales: availableLocales }),
123
131
  editorView === 1 && /* @__PURE__ */ jsxRuntimeExports.jsx(JSONEditor, { dictionary, isDarkMode }),
124
132
  /* @__PURE__ */ jsxRuntimeExports.jsx(SaveForm, { dictionary })
125
133
  ]
126
134
  }
127
135
  )
128
- ] });
136
+ ] }) });
129
137
  };
130
138
  export {
131
139
  DictionaryFieldEditor
@@ -1 +1 @@
1
- {"version":3,"file":"DictionaryFieldEditor.mjs","sources":["../../../src/components/DictionaryFieldEditor/DictionaryFieldEditor.tsx"],"sourcesContent":["'use client';\n\nimport { Dictionary } from '@intlayer/core';\nimport { ArrowLeft } from 'lucide-react';\nimport { useEffect, useState, type FC } from 'react';\n// @ts-ignore react-intlayer not build yet\nimport { useDictionary } from 'react-intlayer';\nimport { useShallow } from 'zustand/react/shallow';\nimport { Button } from '../Button';\nimport { Container } from '../Container';\nimport { useEditedContentStore } from '../DictionaryEditor';\nimport { H2 } from '../Headers';\nimport { SwitchSelector } from '../SwitchSelector';\nimport { DictionaryDetailsForm } from './DictionaryDetails/DictionaryDetailsForm';\nimport { dictionaryFieldEditorContent } from './dictionaryFieldEditor.content';\nimport { JSONEditor } from './JSONEditor';\nimport { NodeEditor } from './NodeEditor';\nimport { SaveForm } from './SaveForm/SaveForm';\n\ntype DictionaryFieldEditorProps = {\n dictionary: Dictionary;\n onClickDictionaryList?: () => void;\n isDarkMode?: boolean;\n};\n\nenum EditorViewType {\n NodeEditor,\n JSONEditor,\n}\n\nexport const DictionaryFieldEditor: FC<DictionaryFieldEditorProps> = ({\n dictionary,\n onClickDictionaryList,\n isDarkMode,\n}) => {\n const { key } = dictionary;\n const [editorView, setEditorView] = useState<EditorViewType>(\n EditorViewType.NodeEditor\n );\n const { dictionaryRecord, setDictionariesRecord } = useEditedContentStore(\n useShallow((s) => ({\n editedContent: s.editedContent,\n dictionaryRecord: s.dictionariesRecord,\n setDictionariesRecord: s.setDictionariesRecord,\n }))\n );\n const { returnToDictionaryList, titleContent, titleInformation } =\n useDictionary(dictionaryFieldEditorContent);\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}\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 <SwitchSelector\n defaultValue={editorView}\n onChange={(value) => setEditorView(value)}\n color=\"text\"\n size=\"sm\"\n className=\"ml-auto\"\n choices={[\n {\n content: 'Node editor',\n value: EditorViewType.NodeEditor,\n },\n {\n content: 'JSON editor',\n value: EditorViewType.JSONEditor,\n },\n ]}\n />\n {editorView === EditorViewType.NodeEditor && (\n <NodeEditor dictionary={dictionary} />\n )}\n {editorView === EditorViewType.JSONEditor && (\n <JSONEditor dictionary={dictionary} isDarkMode={isDarkMode} />\n )}\n <SaveForm dictionary={dictionary} />\n </Container>\n </div>\n );\n};\n"],"names":["jsxs","jsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BO,MAAM,wBAAwD,CAAC;AAAA,EACpE;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACE,QAAA,EAAE,QAAQ;AACV,QAAA,CAAC,YAAY,aAAa,IAAI;AAAA,IAClC;AAAA;AAAA,EACF;AACM,QAAA,EAAE,kBAAkB,sBAAA,IAA0B;AAAA,IAClD,WAAW,CAAC,OAAO;AAAA,MACjB,eAAe,EAAE;AAAA,MACjB,kBAAkB,EAAE;AAAA,MACpB,uBAAuB,EAAE;A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cACN,MAAK;AAAA,cACL,WAAU;AAAA,cACV,SAAS;AAAA,gBACP;AAAA,kBACE,SAAS;AAAA,kBACT,OAAO;AAAA;AAAA,gBACT;AAAA,gBACA;AAAA,kBACE,SAAS;AAAA,kBACT,OAAO;AAAA;AAAA,gBAAA;AAAA,cACT;AAAA,YACF;AAAA,UACF;AAAA,UACC,eAAe,KACbA,kCAAAA,IAAA,YAAA,EAAW,WAAwB,CAAA;AAAA,UAErC,eAAe,KACbA,kCAAA,IAAA,YAAA,EAAW,YAAwB,YAAwB;AAAA,UAE9DA,sCAAC,YAAS,WAAwB,CAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EACpC,GACF;AAEJ;"}
1
+ {"version":3,"file":"DictionaryFieldEditor.mjs","sources":["../../../src/components/DictionaryFieldEditor/DictionaryFieldEditor.tsx"],"sourcesContent":["'use client';\n\nimport { Locales } from '@intlayer/config';\nimport { Dictionary } from '@intlayer/core';\nimport { ArrowLeft } from 'lucide-react';\nimport { useEffect, useState, type FC } from 'react';\n// @ts-ignore react-intlayer not build yet\nimport { useDictionary } from 'react-intlayer';\nimport { useShallow } from 'zustand/react/shallow';\nimport { Button } from '../Button';\nimport { Container } from '../Container';\nimport { useEditedContentStore } from '../DictionaryEditor';\nimport { H2 } from '../Headers';\nimport { LocaleSwitcherContentProvider } from '../LocaleSwitcherContentDropDown';\nimport { SwitchSelector } from '../SwitchSelector';\nimport { DictionaryDetailsForm } from './DictionaryDetails/DictionaryDetailsForm';\nimport { dictionaryFieldEditorContent } from './dictionaryFieldEditor.content';\nimport { JSONEditor } from './JSONEditor';\nimport { NodeEditor } from './NodeEditor';\nimport { SaveForm } from './SaveForm/SaveForm';\n\ntype DictionaryFieldEditorProps = {\n dictionary: Dictionary;\n onClickDictionaryList?: () => void;\n isDarkMode?: boolean;\n availableLocales: Locales[];\n};\n\nenum EditorViewType {\n NodeEditor,\n JSONEditor,\n}\n\nexport const DictionaryFieldEditor: FC<DictionaryFieldEditorProps> = ({\n dictionary,\n onClickDictionaryList,\n isDarkMode,\n availableLocales,\n}) => {\n const { key } = dictionary;\n const [editorView, setEditorView] = useState<EditorViewType>(\n EditorViewType.NodeEditor\n );\n const { dictionaryRecord, setDictionariesRecord } = useEditedContentStore(\n useShallow((s) => ({\n editedContent: s.editedContent,\n dictionaryRecord: s.dictionariesRecord,\n setDictionariesRecord: s.setDictionariesRecord,\n }))\n );\n const { returnToDictionaryList, titleContent, titleInformation } =\n useDictionary(dictionaryFieldEditorContent);\n\n useEffect(() => {\n if (dictionaryRecord[key]) return;\n\n setDictionariesRecord({\n [key]: dictionary,\n });\n }, [dictionary, key, setDictionariesRecord, dictionaryRecord]);\n\n return (\n <LocaleSwitcherContentProvider availableLocales={availableLocales}>\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}\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 <SwitchSelector\n defaultValue={editorView}\n onChange={(value) => setEditorView(value)}\n color=\"text\"\n size=\"sm\"\n className=\"ml-auto\"\n choices={[\n {\n content: 'Node editor',\n value: EditorViewType.NodeEditor,\n },\n {\n content: 'JSON editor',\n value: EditorViewType.JSONEditor,\n },\n ]}\n />\n {editorView === EditorViewType.NodeEditor && (\n <NodeEditor dictionary={dictionary} locales={availableLocales} />\n )}\n {editorView === EditorViewType.JSONEditor && (\n <JSONEditor dictionary={dictionary} isDarkMode={isDarkMode} />\n )}\n <SaveForm dictionary={dictionary} />\n </Container>\n </div>\n </LocaleSwitcherContentProvider>\n );\n};\n"],"names":["jsxs","jsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCO,MAAM,wBAAwD,CAAC;AAAA,EACpE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACE,QAAA,EAAE,QAAQ;AACV,QAAA,CAAC,YAAY,aAAa,IAAI;AAAA,IAClC;AAAA;AAAA,EACF;AACM,QAAA,EAAE,kBAAkB,sBAAA,IAA0B;AAAA,IAClD,WAAW,CAAC,OAAO;AAAA,MACjB,eAAe,EAAE;AAAA,MACjB,kBAAkB,EAAE;AAAA,MACpB,uBAAuB,EAAE;AAAA,IAAA,EACzB;AAAA,EACJ;AACA,QAAM,EAAE,wBAAwB,cAAc,iBAAiB,IAC7D,cAAc,4BAA4B;AAE5C,YAAU,MAAM;AACV,QAAA,iBAAiB,GAAG,EAAG;AAEL,0BAAA;AAAA,MACpB,CAAC,GAAG,GAAG;AAAA,IAAA,CACR;AAAA,KACA,CAAC,YAAY,KAAK,uBAAuB,gBAAgB,CAAC;AAE7D,+CACG,+BAA8B,EAAA,kBAC7B,UAACA,uCAAA,OAAA,EAAI,WAAU,yCACb,UAAA;AAAA,IAACA,kCAAAA,KAAA,OAAA,EAAI,WAAU,2BACb,UAAA;AAAA,MAAAC,kCAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,SAAS,MAAM,wBAAwB;AAAA,UACvC,SAAQ;AAAA,UACR,MAAK;AAAA,UACL,OAAM;AAAA,UACN,IAAG;AAAA,UACH,MAAM;AAAA,UACN,OAAO,uBAAuB;AAAA,QAAA;AAAA,MAChC;AAAA,MACAA,kCAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,WAAU;AAAA,UACV,SAAQ;AAAA,UAEP,UAAuB,uBAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IAC1B,GACF;AAAA,IAEAD,kCAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,WAAU;AAAA,QACV,aAAY;AAAA,QAEZ,UAAA;AAAA,UAAAC,kCAAAA,IAAC,MAAI,UAAiB,iBAAA,CAAA;AAAA,UAEtBA,sCAAC,yBAAsB,WAAwB,CAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IACjD;AAAA,IAEAD,kCAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,WAAU;AAAA,QACV,aAAY;AAAA,QAEZ,UAAA;AAAA,UAAAC,kCAAAA,IAAC,MAAI,UAAa,aAAA,CAAA;AAAA,UAClBA,kCAAA;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,cAAc;AAAA,cACd,UAAU,CAAC,UAAU,cAAc,KAAK;AAAA,cACxC,OAAM;AAAA,cACN,MAAK;AAAA,cACL,WAAU;AAAA,cACV,SAAS;AAAA,gBACP;AAAA,kBACE,SAAS;AAAA,kBACT,OAAO;AAAA;AAAA,gBACT;AAAA,gBACA;AAAA,kBACE,SAAS;AAAA,kBACT,OAAO;AAAA;AAAA,gBAAA;AAAA,cACT;AAAA,YACF;AAAA,UACF;AAAA,UACC,eAAe,KACdA,sCAAC,YAAW,EAAA,YAAwB,SAAS,kBAAkB;AAAA,UAEhE,eAAe,KACbA,kCAAA,IAAA,YAAA,EAAW,YAAwB,YAAwB;AAAA,UAE9DA,sCAAC,YAAS,WAAwB,CAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EACpC,EAAA,CACF,EACF,CAAA;AAEJ;"}
@@ -25,7 +25,7 @@ require("@intlayer/dictionaries-entry");
25
25
  require("deepmerge");
26
26
  require("../../Form/FormBase.cjs");
27
27
  require("../../Form/FormField.cjs");
28
- require("../../../Form-BDcoNTLV.cjs");
28
+ require("../../../Form-7BqwvjVI.cjs");
29
29
  require("../../DictionaryEditor/validDictionaryChangeButtons.content.cjs");
30
30
  require("zod");
31
31
  const components_Label_index = require("../../Label/index.cjs");
@@ -35,7 +35,8 @@ const components_DictionaryFieldEditor_NodeTypeSelector = require("../NodeTypeSe
35
35
  const components_DictionaryFieldEditor_EditorView_TextEditor = require("./TextEditor.cjs");
36
36
  const EditorView = ({
37
37
  dictionaryKey,
38
- dictionary
38
+ dictionary,
39
+ locales
39
40
  }) => {
40
41
  const { focusedContent, setFocusedContentKeyPath } = components_DictionaryEditor_useEditionPanelStore.useEditionPanelStore(
41
42
  shallow.useShallow((s) => ({
@@ -87,7 +88,8 @@ const EditorView = ({
87
88
  {
88
89
  keyPath,
89
90
  section,
90
- dictionaryKey
91
+ dictionary,
92
+ locales
91
93
  },
92
94
  keyPath.join(".")
93
95
  ),
@@ -105,7 +107,7 @@ const EditorView = ({
105
107
  {
106
108
  name: "key",
107
109
  "aria-label": "Key",
108
- placeholder: titleInput.placeholder.value,
110
+ placeholder: titleInput.placeholder,
109
111
  defaultValue: utils_camelCase.camelCaseToSentence(initialKeyName),
110
112
  onSave: (value) => handleRenameNodeKey(value),
111
113
  className: "h-8",
@@ -136,7 +138,7 @@ const EditorView = ({
136
138
  isEdited && /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
137
139
  components_Button_Button.Button,
138
140
  {
139
- label: restoreButton.label.value,
141
+ label: restoreButton.label,
140
142
  variant: "outline",
141
143
  color: "text-inverse",
142
144
  Icon: lucideReact.RotateCcw,
@@ -147,7 +149,7 @@ const EditorView = ({
147
149
  /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
148
150
  components_Button_Button.Button,
149
151
  {
150
- label: deleteButton.label.value,
152
+ label: deleteButton.label,
151
153
  variant: "outline",
152
154
  color: "error",
153
155
  Icon: lucideReact.X,
@@ -1 +1 @@
1
- {"version":3,"file":"EditorView.cjs","sources":["../../../../src/components/DictionaryFieldEditor/EditorView/EditorView.tsx"],"sourcesContent":["'use client';\n\nimport { type KeyPath, type Dictionary } from '@intlayer/core';\nimport { RotateCcw, X } from 'lucide-react';\nimport { useMemo, type FC } from 'react';\n// @ts-ignore react-intlayer not build yet\nimport { useDictionary } from 'react-intlayer';\nimport { useShallow } from 'zustand/react/shallow';\nimport { EditableFieldInput } from '../..//EditableField';\nimport {\n camelCaseToSentence,\n sentenceToCamelCase,\n} from '../../../utils/camelCase';\nimport { getDictionaryValueByKeyPath } from '../../../utils/dictionary';\nimport { Button } from '../../Button';\nimport {\n useEditedContentStore,\n useEditionPanelStore,\n} from '../../DictionaryEditor';\nimport { Label } from '../../Label';\nimport { editorViewContent } from '../editorView.content';\nimport { getIsEditableSection } from '../getIsEditableSection';\nimport { NodeTypeSelector } from '../NodeTypeSelector';\nimport { TextEditor } from './TextEditor';\n\ntype EditorViewProps = {\n dictionaryKey: string;\n dictionary: Dictionary;\n};\n\nexport const EditorView: FC<EditorViewProps> = ({\n dictionaryKey,\n dictionary,\n}) => {\n const { focusedContent, setFocusedContentKeyPath } = useEditionPanelStore(\n useShallow((s) => ({\n setFocusedContentKeyPath: s.setFocusedContentKeyPath,\n focusedContent: s.focusedContent,\n }))\n );\n const keyPath = focusedContent?.keyPath ?? [];\n const initialKeyName = keyPath[keyPath.length - 1]?.key ?? '';\n const { titleInput, deleteButton, nodeTypeSelector, restoreButton } =\n useDictionary(editorViewContent);\n\n const {\n editedContent,\n renameEditedContent,\n addEditedContent,\n removeEditedContent,\n } = useEditedContentStore(\n useShallow((s) => ({\n editedContent: s.editedContent,\n renameEditedContent: s.renameEditedContent,\n addEditedContent: s.addEditedContent,\n removeEditedContent: s.removeEditedContent,\n }))\n );\n\n const editedSection = editedContent[dictionaryKey]?.content\n ? getDictionaryValueByKeyPath(editedContent[dictionaryKey].content, keyPath)\n : undefined;\n\n const dictionarySection = getDictionaryValueByKeyPath(\n dictionary.content,\n keyPath\n );\n\n const section = editedSection ?? dictionarySection;\n\n const isEdited = useMemo(\n () =>\n editedSection &&\n JSON.stringify(editedSection) !== JSON.stringify(dictionarySection),\n [editedSection, dictionarySection]\n );\n\n const isEditableSection = getIsEditableSection(section);\n\n const handleRenameNodeKey = (keyName: string) => {\n const camelCaseSentence = sentenceToCamelCase(keyName);\n renameEditedContent(dictionaryKey, camelCaseSentence, keyPath);\n const prevKeyPath: KeyPath[] = keyPath.slice(0, -1);\n const lastKeyPath: KeyPath = keyPath[keyPath.length - 1];\n const newKeyPath: KeyPath[] = [\n ...prevKeyPath,\n { ...lastKeyPath, key: camelCaseSentence } as KeyPath,\n ];\n setFocusedContentKeyPath(newKeyPath);\n };\n\n return (\n <>\n {isEditableSection && (\n <TextEditor\n key={keyPath.join('.')}\n keyPath={keyPath}\n section={section}\n dictionaryKey={dictionaryKey}\n />\n )}\n\n {keyPath.length > 0 ? (\n <form\n className=\"bg-text text-text-dark dark:bg-text-dark dark:text-text flex w-full flex-col items-start justify-between gap-6 px-4 py-2\"\n key={JSON.stringify(focusedContent?.keyPath)}\n >\n <div className=\"flex w-full flex-wrap items-start justify-between gap-6\">\n {typeof initialKeyName === 'string' && (\n <div className=\"flex flex-col gap-3\">\n <Label>{titleInput.label}</Label>\n <div className=\"flex flex-wrap items-center gap-4\">\n <EditableFieldInput\n name=\"key\"\n aria-label=\"Key\"\n key={initialKeyName}\n placeholder={titleInput.placeholder.value}\n defaultValue={camelCaseToSentence(initialKeyName)}\n onSave={(value) => handleRenameNodeKey(value)}\n className=\"h-8\"\n variant=\"invisible\"\n />\n <span className=\"text-neutral dark:text-neutral-dark text-sm\">\n ({initialKeyName})\n </span>\n </div>\n </div>\n )}\n\n <div>\n <Label>{nodeTypeSelector.label}</Label>\n\n <NodeTypeSelector\n keyPath={keyPath}\n dictionaryKey={dictionaryKey}\n section={section}\n />\n </div>\n </div>\n {keyPath.length > 0 && (\n <div className=\"ml-auto flex gap-2\">\n {isEdited && (\n <Button\n label={restoreButton.label.value}\n variant=\"outline\"\n color=\"text-inverse\"\n Icon={RotateCcw}\n onClick={() => removeEditedContent(dictionaryKey, keyPath)}\n >\n {restoreButton.text}\n </Button>\n )}\n <Button\n label={deleteButton.label.value}\n variant=\"outline\"\n color=\"error\"\n Icon={X}\n onClick={() => {\n addEditedContent(dictionaryKey, undefined, keyPath);\n\n const parentKeyPath: KeyPath[] = keyPath.slice(0, -1);\n setFocusedContentKeyPath(parentKeyPath);\n }}\n >\n {deleteButton.text}\n </Button>\n </div>\n )}\n </form>\n ) : (\n <span className=\"h-8\"></span>\n )}\n </>\n );\n};\n"],"names":["useEditionPanelStore","useShallow","useDictionary","editorViewContent","useEditedContentStore","getDictionaryValueByKeyPath","useMemo","getIsEditableSection","sentenceToCamelCase","jsxs","Fragment","jsx","TextEditor","Label","EditableFieldInput","camelCaseToSentence","NodeTypeSelector","Button","RotateCcw","X"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BO,MAAM,aAAkC,CAAC;AAAA,EAC9C;AAAA,EACA;AACF,MAAM;AACE,QAAA,EAAE,gBAAgB,yBAAA,IAA6BA,iDAAA;AAAA,IACnDC,QAAA,WAAW,CAAC,OAAO;AAAA,MACjB,0BAA0B,EAAE;AAAA,MAC5B,gBAAgB,EAAE;AAAA,IAAA,EAClB;AAAA,EACJ;AACM,QAAA,UAAU,gBAAgB,WAAW,CAAC;AAC5C,QAAM,iBAAiB,QAAQ,QAAQ,SAAS,CAAC,GAAG,OAAO;AAC3D,QAAM,EAAE,YAAY,cAAc,kBAAkB,cAAc,IAChEC,4BAAcC,qEAAiB;AAE3B,QAAA;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA,IACEC,kDAAA;AAAA,IACFH,QAAA,WAAW,CAAC,OAAO;AAAA,MACjB,eAAe,EAAE;AAAA,MACjB,qBAAqB,EAAE;AAAA,MACvB,kBAAkB,EAAE;AAAA,MACpB,qBAAqB,EAAE;AAAA,IAAA,EACvB;AAAA,EACJ;AAEM,QAAA,gBAAgB,cAAc,aAAa,GAAG,UAChDI,iBAAAA,4BAA4B,cAAc,aAAa,EAAE,SAAS,OAAO,IACzE;AAEJ,QAAM,oBAAoBA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AM,gBAA2B,QAAQ,MAAM,GAAG,EAAE;AACpD,2CAAyB,aAAa;AAAA,gBACxC;AAAA,gBAEC,UAAa,aAAA;AAAA,cAAA;AAAA,YAAA;AAAA,UAChB,EACF,CAAA;AAAA,QAAA;AAAA,MAAA;AAAA,MA7DG,KAAK,UAAU,gBAAgB,OAAO;AAAA,IAiE7C,IAAAR,iDAAC,QAAK,EAAA,WAAU,MAAM,CAAA;AAAA,EAAA,GAE1B;AAEJ;;"}
1
+ {"version":3,"file":"EditorView.cjs","sources":["../../../../src/components/DictionaryFieldEditor/EditorView/EditorView.tsx"],"sourcesContent":["'use client';\n\nimport { type Locales } from '@intlayer/config';\nimport { type KeyPath, type Dictionary } from '@intlayer/core';\nimport { RotateCcw, X } from 'lucide-react';\nimport { useMemo, type FC } from 'react';\n// @ts-ignore react-intlayer not build yet\nimport { useDictionary } from 'react-intlayer';\nimport { useShallow } from 'zustand/react/shallow';\nimport { EditableFieldInput } from '../..//EditableField';\nimport {\n camelCaseToSentence,\n sentenceToCamelCase,\n} from '../../../utils/camelCase';\nimport { getDictionaryValueByKeyPath } from '../../../utils/dictionary';\nimport { Button } from '../../Button';\nimport {\n useEditedContentStore,\n useEditionPanelStore,\n} from '../../DictionaryEditor';\nimport { Label } from '../../Label';\nimport { editorViewContent } from '../editorView.content';\nimport { getIsEditableSection } from '../getIsEditableSection';\nimport { NodeTypeSelector } from '../NodeTypeSelector';\nimport { TextEditor } from './TextEditor';\n\ntype EditorViewProps = {\n dictionaryKey: string;\n dictionary: Dictionary;\n locales: Locales[];\n};\n\nexport const EditorView: FC<EditorViewProps> = ({\n dictionaryKey,\n dictionary,\n locales,\n}) => {\n const { focusedContent, setFocusedContentKeyPath } = useEditionPanelStore(\n useShallow((s) => ({\n setFocusedContentKeyPath: s.setFocusedContentKeyPath,\n focusedContent: s.focusedContent,\n }))\n );\n const keyPath = focusedContent?.keyPath ?? [];\n const initialKeyName = keyPath[keyPath.length - 1]?.key ?? '';\n const { titleInput, deleteButton, nodeTypeSelector, restoreButton } =\n useDictionary(editorViewContent);\n\n const {\n editedContent,\n renameEditedContent,\n addEditedContent,\n removeEditedContent,\n } = useEditedContentStore(\n useShallow((s) => ({\n editedContent: s.editedContent,\n renameEditedContent: s.renameEditedContent,\n addEditedContent: s.addEditedContent,\n removeEditedContent: s.removeEditedContent,\n }))\n );\n\n const editedSection = editedContent[dictionaryKey]?.content\n ? getDictionaryValueByKeyPath(editedContent[dictionaryKey].content, keyPath)\n : undefined;\n\n const dictionarySection = getDictionaryValueByKeyPath(\n dictionary.content,\n keyPath\n );\n\n const section = editedSection ?? dictionarySection;\n\n const isEdited = useMemo(\n () =>\n editedSection &&\n JSON.stringify(editedSection) !== JSON.stringify(dictionarySection),\n [editedSection, dictionarySection]\n );\n\n const isEditableSection = getIsEditableSection(section);\n\n const handleRenameNodeKey = (keyName: string) => {\n const camelCaseSentence = sentenceToCamelCase(keyName);\n renameEditedContent(dictionaryKey, camelCaseSentence, keyPath);\n const prevKeyPath: KeyPath[] = keyPath.slice(0, -1);\n const lastKeyPath: KeyPath = keyPath[keyPath.length - 1];\n const newKeyPath: KeyPath[] = [\n ...prevKeyPath,\n { ...lastKeyPath, key: camelCaseSentence } as KeyPath,\n ];\n setFocusedContentKeyPath(newKeyPath);\n };\n\n return (\n <>\n {isEditableSection && (\n <TextEditor\n key={keyPath.join('.')}\n keyPath={keyPath}\n section={section}\n dictionary={dictionary}\n locales={locales}\n />\n )}\n\n {keyPath.length > 0 ? (\n <form\n className=\"bg-text text-text-dark dark:bg-text-dark dark:text-text flex w-full flex-col items-start justify-between gap-6 px-4 py-2\"\n key={JSON.stringify(focusedContent?.keyPath)}\n >\n <div className=\"flex w-full flex-wrap items-start justify-between gap-6\">\n {typeof initialKeyName === 'string' && (\n <div className=\"flex flex-col gap-3\">\n <Label>{titleInput.label}</Label>\n <div className=\"flex flex-wrap items-center gap-4\">\n <EditableFieldInput\n name=\"key\"\n aria-label=\"Key\"\n key={initialKeyName}\n placeholder={titleInput.placeholder}\n defaultValue={camelCaseToSentence(initialKeyName)}\n onSave={(value) => handleRenameNodeKey(value)}\n className=\"h-8\"\n variant=\"invisible\"\n />\n <span className=\"text-neutral dark:text-neutral-dark text-sm\">\n ({initialKeyName})\n </span>\n </div>\n </div>\n )}\n\n <div>\n <Label>{nodeTypeSelector.label}</Label>\n\n <NodeTypeSelector\n keyPath={keyPath}\n dictionaryKey={dictionaryKey}\n section={section}\n />\n </div>\n </div>\n {keyPath.length > 0 && (\n <div className=\"ml-auto flex gap-2\">\n {isEdited && (\n <Button\n label={restoreButton.label}\n variant=\"outline\"\n color=\"text-inverse\"\n Icon={RotateCcw}\n onClick={() => removeEditedContent(dictionaryKey, keyPath)}\n >\n {restoreButton.text}\n </Button>\n )}\n <Button\n label={deleteButton.label}\n variant=\"outline\"\n color=\"error\"\n Icon={X}\n onClick={() => {\n addEditedContent(dictionaryKey, undefined, keyPath);\n\n const parentKeyPath: KeyPath[] = keyPath.slice(0, -1);\n setFocusedContentKeyPath(parentKeyPath);\n }}\n >\n {deleteButton.text}\n </Button>\n </div>\n )}\n </form>\n ) : (\n <span className=\"h-8\"></span>\n )}\n </>\n );\n};\n"],"names":["useEditionPanelStore","useShallow","useDictionary","editorViewContent","useEditedContentStore","getDictionaryValueByKeyPath","useMemo","getIsEditableSection","sentenceToCamelCase","jsxs","Fragment","jsx","TextEditor","Label","EditableFieldInput","camelCaseToSentence","NodeTypeSelector","Button","RotateCcw","X"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCO,MAAM,aAAkC,CAAC;AAAA,EAC9C;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACE,QAAA,EAAE,gBAAgB,yBAAA,IAA6BA,iDAAA;AAAA,IACnDC,QAAA,WAAW,CAAC,OAAO;AAAA,MACjB,0BAA0B,EAAE;AAAA,MAC5B,gBAAgB,EAAE;AAAA,IAAA,EAClB;AAAA,EACJ;AACM,QAAA,UAAU,gBAAgB,WAAW,CAA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AA,KAAA,OAAA,EAAI,WAAU,sBACZ,UAAA;AAAA,YACC,YAAAE,2BAAA,kBAAA;AAAA,cAACM,yBAAA;AAAA,cAAA;AAAA,gBACC,OAAO,cAAc;AAAA,gBACrB,SAAQ;AAAA,gBACR,OAAM;AAAA,gBACN,MAAMC,YAAA;AAAA,gBACN,SAAS,MAAM,oBAAoB,eAAe,OAAO;AAAA,gBAExD,UAAc,cAAA;AAAA,cAAA;AAAA,YACjB;AAAA,YAEFP,2BAAA,kBAAA;AAAA,cAACM,yBAAA;AAAA,cAAA;AAAA,gBACC,OAAO,aAAa;AAAA,gBACpB,SAAQ;AAAA,gBACR,OAAM;AAAA,gBACN,MAAME,YAAA;AAAA,gBACN,SAAS,MAAM;AACI,mCAAA,eAAe,QAAW,OAAO;AAElD,wBAAM,gBAA2B,QAAQ,MAAM,GAAG,EAAE;AACpD,2CAAyB,aAAa;AAAA,gBACxC;AAAA,gBAEC,UAAa,aAAA;AAAA,cAAA;AAAA,YAAA;AAAA,UAChB,EACF,CAAA;AAAA,QAAA;AAAA,MAAA;AAAA,MA7DG,KAAK,UAAU,gBAAgB,OAAO;AAAA,IAiE7C,IAAAR,iDAAC,QAAK,EAAA,WAAU,MAAM,CAAA;AAAA,EAAA,GAE1B;AAEJ;;"}
@@ -1,8 +1,10 @@
1
+ import { Locales } from '@intlayer/config';
1
2
  import { Dictionary } from '@intlayer/core';
2
3
  import { FC } from 'react';
3
4
  type EditorViewProps = {
4
5
  dictionaryKey: string;
5
6
  dictionary: Dictionary;
7
+ locales: Locales[];
6
8
  };
7
9
  export declare const EditorView: FC<EditorViewProps>;
8
10
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"EditorView.d.ts","sourceRoot":"","sources":["../../../../src/components/DictionaryFieldEditor/EditorView/EditorView.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAgB,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE/D,OAAO,EAAW,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAqBzC,KAAK,eAAe,GAAG;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,UAAU,CAAC;CACxB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CAgJ1C,CAAC"}
1
+ {"version":3,"file":"EditorView.d.ts","sourceRoot":"","sources":["../../../../src/components/DictionaryFieldEditor/EditorView/EditorView.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAgB,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE/D,OAAO,EAAW,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAqBzC,KAAK,eAAe,GAAG;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,UAAU,CAAC;IACvB,OAAO,EAAE,OAAO,EAAE,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CAkJ1C,CAAC"}
@@ -23,7 +23,7 @@ import "@intlayer/dictionaries-entry";
23
23
  import "deepmerge";
24
24
  import "../../Form/FormBase.mjs";
25
25
  import "../../Form/FormField.mjs";
26
- import "../../../Form-DhsgC7kB.js";
26
+ import "../../../Form-OK9zfg6E.js";
27
27
  import "../../DictionaryEditor/validDictionaryChangeButtons.content.mjs";
28
28
  import "zod";
29
29
  import { Label } from "../../Label/index.mjs";
@@ -33,7 +33,8 @@ import { NodeTypeSelector } from "../NodeTypeSelector.mjs";
33
33
  import { TextEditor } from "./TextEditor.mjs";
34
34
  const EditorView = ({
35
35
  dictionaryKey,
36
- dictionary
36
+ dictionary,
37
+ locales
37
38
  }) => {
38
39
  const { focusedContent, setFocusedContentKeyPath } = useEditionPanelStore(
39
40
  useShallow((s) => ({
@@ -85,7 +86,8 @@ const EditorView = ({
85
86
  {
86
87
  keyPath,
87
88
  section,
88
- dictionaryKey
89
+ dictionary,
90
+ locales
89
91
  },
90
92
  keyPath.join(".")
91
93
  ),
@@ -103,7 +105,7 @@ const EditorView = ({
103
105
  {
104
106
  name: "key",
105
107
  "aria-label": "Key",
106
- placeholder: titleInput.placeholder.value,
108
+ placeholder: titleInput.placeholder,
107
109
  defaultValue: camelCaseToSentence(initialKeyName),
108
110
  onSave: (value) => handleRenameNodeKey(value),
109
111
  className: "h-8",
@@ -134,7 +136,7 @@ const EditorView = ({
134
136
  isEdited && /* @__PURE__ */ jsxRuntimeExports.jsx(
135
137
  Button,
136
138
  {
137
- label: restoreButton.label.value,
139
+ label: restoreButton.label,
138
140
  variant: "outline",
139
141
  color: "text-inverse",
140
142
  Icon: RotateCcw,
@@ -145,7 +147,7 @@ const EditorView = ({
145
147
  /* @__PURE__ */ jsxRuntimeExports.jsx(
146
148
  Button,
147
149
  {
148
- label: deleteButton.label.value,
150
+ label: deleteButton.label,
149
151
  variant: "outline",
150
152
  color: "error",
151
153
  Icon: X,
@@ -1 +1 @@
1
- {"version":3,"file":"EditorView.mjs","sources":["../../../../src/components/DictionaryFieldEditor/EditorView/EditorView.tsx"],"sourcesContent":["'use client';\n\nimport { type KeyPath, type Dictionary } from '@intlayer/core';\nimport { RotateCcw, X } from 'lucide-react';\nimport { useMemo, type FC } from 'react';\n// @ts-ignore react-intlayer not build yet\nimport { useDictionary } from 'react-intlayer';\nimport { useShallow } from 'zustand/react/shallow';\nimport { EditableFieldInput } from '../..//EditableField';\nimport {\n camelCaseToSentence,\n sentenceToCamelCase,\n} from '../../../utils/camelCase';\nimport { getDictionaryValueByKeyPath } from '../../../utils/dictionary';\nimport { Button } from '../../Button';\nimport {\n useEditedContentStore,\n useEditionPanelStore,\n} from '../../DictionaryEditor';\nimport { Label } from '../../Label';\nimport { editorViewContent } from '../editorView.content';\nimport { getIsEditableSection } from '../getIsEditableSection';\nimport { NodeTypeSelector } from '../NodeTypeSelector';\nimport { TextEditor } from './TextEditor';\n\ntype EditorViewProps = {\n dictionaryKey: string;\n dictionary: Dictionary;\n};\n\nexport const EditorView: FC<EditorViewProps> = ({\n dictionaryKey,\n dictionary,\n}) => {\n const { focusedContent, setFocusedContentKeyPath } = useEditionPanelStore(\n useShallow((s) => ({\n setFocusedContentKeyPath: s.setFocusedContentKeyPath,\n focusedContent: s.focusedContent,\n }))\n );\n const keyPath = focusedContent?.keyPath ?? [];\n const initialKeyName = keyPath[keyPath.length - 1]?.key ?? '';\n const { titleInput, deleteButton, nodeTypeSelector, restoreButton } =\n useDictionary(editorViewContent);\n\n const {\n editedContent,\n renameEditedContent,\n addEditedContent,\n removeEditedContent,\n } = useEditedContentStore(\n useShallow((s) => ({\n editedContent: s.editedContent,\n renameEditedContent: s.renameEditedContent,\n addEditedContent: s.addEditedContent,\n removeEditedContent: s.removeEditedContent,\n }))\n );\n\n const editedSection = editedContent[dictionaryKey]?.content\n ? getDictionaryValueByKeyPath(editedContent[dictionaryKey].content, keyPath)\n : undefined;\n\n const dictionarySection = getDictionaryValueByKeyPath(\n dictionary.content,\n keyPath\n );\n\n const section = editedSection ?? dictionarySection;\n\n const isEdited = useMemo(\n () =>\n editedSection &&\n JSON.stringify(editedSection) !== JSON.stringify(dictionarySection),\n [editedSection, dictionarySection]\n );\n\n const isEditableSection = getIsEditableSection(section);\n\n const handleRenameNodeKey = (keyName: string) => {\n const camelCaseSentence = sentenceToCamelCase(keyName);\n renameEditedContent(dictionaryKey, camelCaseSentence, keyPath);\n const prevKeyPath: KeyPath[] = keyPath.slice(0, -1);\n const lastKeyPath: KeyPath = keyPath[keyPath.length - 1];\n const newKeyPath: KeyPath[] = [\n ...prevKeyPath,\n { ...lastKeyPath, key: camelCaseSentence } as KeyPath,\n ];\n setFocusedContentKeyPath(newKeyPath);\n };\n\n return (\n <>\n {isEditableSection && (\n <TextEditor\n key={keyPath.join('.')}\n keyPath={keyPath}\n section={section}\n dictionaryKey={dictionaryKey}\n />\n )}\n\n {keyPath.length > 0 ? (\n <form\n className=\"bg-text text-text-dark dark:bg-text-dark dark:text-text flex w-full flex-col items-start justify-between gap-6 px-4 py-2\"\n key={JSON.stringify(focusedContent?.keyPath)}\n >\n <div className=\"flex w-full flex-wrap items-start justify-between gap-6\">\n {typeof initialKeyName === 'string' && (\n <div className=\"flex flex-col gap-3\">\n <Label>{titleInput.label}</Label>\n <div className=\"flex flex-wrap items-center gap-4\">\n <EditableFieldInput\n name=\"key\"\n aria-label=\"Key\"\n key={initialKeyName}\n placeholder={titleInput.placeholder.value}\n defaultValue={camelCaseToSentence(initialKeyName)}\n onSave={(value) => handleRenameNodeKey(value)}\n className=\"h-8\"\n variant=\"invisible\"\n />\n <span className=\"text-neutral dark:text-neutral-dark text-sm\">\n ({initialKeyName})\n </span>\n </div>\n </div>\n )}\n\n <div>\n <Label>{nodeTypeSelector.label}</Label>\n\n <NodeTypeSelector\n keyPath={keyPath}\n dictionaryKey={dictionaryKey}\n section={section}\n />\n </div>\n </div>\n {keyPath.length > 0 && (\n <div className=\"ml-auto flex gap-2\">\n {isEdited && (\n <Button\n label={restoreButton.label.value}\n variant=\"outline\"\n color=\"text-inverse\"\n Icon={RotateCcw}\n onClick={() => removeEditedContent(dictionaryKey, keyPath)}\n >\n {restoreButton.text}\n </Button>\n )}\n <Button\n label={deleteButton.label.value}\n variant=\"outline\"\n color=\"error\"\n Icon={X}\n onClick={() => {\n addEditedContent(dictionaryKey, undefined, keyPath);\n\n const parentKeyPath: KeyPath[] = keyPath.slice(0, -1);\n setFocusedContentKeyPath(parentKeyPath);\n }}\n >\n {deleteButton.text}\n </Button>\n </div>\n )}\n </form>\n ) : (\n <span className=\"h-8\"></span>\n )}\n </>\n );\n};\n"],"names":["jsxs","Fragment","jsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BO,MAAM,aAAkC,CAAC;AAAA,EAC9C;AAAA,EACA;AACF,MAAM;AACE,QAAA,EAAE,gBAAgB,yBAAA,IAA6B;AAAA,IACnD,WAAW,CAAC,OAAO;AAAA,MACjB,0BAA0B,EAAE;AAAA,MAC5B,gB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Ac,MAAM;AAAA,gBAC3B,SAAQ;AAAA,gBACR,OAAM;AAAA,gBACN,MAAM;AAAA,gBACN,SAAS,MAAM,oBAAoB,eAAe,OAAO;AAAA,gBAExD,UAAc,cAAA;AAAA,cAAA;AAAA,YACjB;AAAA,YAEFA,kCAAA;AAAA,cAAC;AAAA,cAAA;AAAA,gBACC,OAAO,aAAa,MAAM;AAAA,gBAC1B,SAAQ;AAAA,gBACR,OAAM;AAAA,gBACN,MAAM;AAAA,gBACN,SAAS,MAAM;AACI,mCAAA,eAAe,QAAW,OAAO;AAElD,wBAAM,gBAA2B,QAAQ,MAAM,GAAG,EAAE;AACpD,2CAAyB,aAAa;AAAA,gBACxC;AAAA,gBAEC,UAAa,aAAA;AAAA,cAAA;AAAA,YAAA;AAAA,UAChB,EACF,CAAA;AAAA,QAAA;AAAA,MAAA;AAAA,MA7DG,KAAK,UAAU,gBAAgB,OAAO;AAAA,IAiE7C,IAAAA,sCAAC,QAAK,EAAA,WAAU,MAAM,CAAA;AAAA,EAAA,GAE1B;AAEJ;"}
1
+ {"version":3,"file":"EditorView.mjs","sources":["../../../../src/components/DictionaryFieldEditor/EditorView/EditorView.tsx"],"sourcesContent":["'use client';\n\nimport { type Locales } from '@intlayer/config';\nimport { type KeyPath, type Dictionary } from '@intlayer/core';\nimport { RotateCcw, X } from 'lucide-react';\nimport { useMemo, type FC } from 'react';\n// @ts-ignore react-intlayer not build yet\nimport { useDictionary } from 'react-intlayer';\nimport { useShallow } from 'zustand/react/shallow';\nimport { EditableFieldInput } from '../..//EditableField';\nimport {\n camelCaseToSentence,\n sentenceToCamelCase,\n} from '../../../utils/camelCase';\nimport { getDictionaryValueByKeyPath } from '../../../utils/dictionary';\nimport { Button } from '../../Button';\nimport {\n useEditedContentStore,\n useEditionPanelStore,\n} from '../../DictionaryEditor';\nimport { Label } from '../../Label';\nimport { editorViewContent } from '../editorView.content';\nimport { getIsEditableSection } from '../getIsEditableSection';\nimport { NodeTypeSelector } from '../NodeTypeSelector';\nimport { TextEditor } from './TextEditor';\n\ntype EditorViewProps = {\n dictionaryKey: string;\n dictionary: Dictionary;\n locales: Locales[];\n};\n\nexport const EditorView: FC<EditorViewProps> = ({\n dictionaryKey,\n dictionary,\n locales,\n}) => {\n const { focusedContent, setFocusedContentKeyPath } = useEditionPanelStore(\n useShallow((s) => ({\n setFocusedContentKeyPath: s.setFocusedContentKeyPath,\n focusedContent: s.focusedContent,\n }))\n );\n const keyPath = focusedContent?.keyPath ?? [];\n const initialKeyName = keyPath[keyPath.length - 1]?.key ?? '';\n const { titleInput, deleteButton, nodeTypeSelector, restoreButton } =\n useDictionary(editorViewContent);\n\n const {\n editedContent,\n renameEditedContent,\n addEditedContent,\n removeEditedContent,\n } = useEditedContentStore(\n useShallow((s) => ({\n editedContent: s.editedContent,\n renameEditedContent: s.renameEditedContent,\n addEditedContent: s.addEditedContent,\n removeEditedContent: s.removeEditedContent,\n }))\n );\n\n const editedSection = editedContent[dictionaryKey]?.content\n ? getDictionaryValueByKeyPath(editedContent[dictionaryKey].content, keyPath)\n : undefined;\n\n const dictionarySection = getDictionaryValueByKeyPath(\n dictionary.content,\n keyPath\n );\n\n const section = editedSection ?? dictionarySection;\n\n const isEdited = useMemo(\n () =>\n editedSection &&\n JSON.stringify(editedSection) !== JSON.stringify(dictionarySection),\n [editedSection, dictionarySection]\n );\n\n const isEditableSection = getIsEditableSection(section);\n\n const handleRenameNodeKey = (keyName: string) => {\n const camelCaseSentence = sentenceToCamelCase(keyName);\n renameEditedContent(dictionaryKey, camelCaseSentence, keyPath);\n const prevKeyPath: KeyPath[] = keyPath.slice(0, -1);\n const lastKeyPath: KeyPath = keyPath[keyPath.length - 1];\n const newKeyPath: KeyPath[] = [\n ...prevKeyPath,\n { ...lastKeyPath, key: camelCaseSentence } as KeyPath,\n ];\n setFocusedContentKeyPath(newKeyPath);\n };\n\n return (\n <>\n {isEditableSection && (\n <TextEditor\n key={keyPath.join('.')}\n keyPath={keyPath}\n section={section}\n dictionary={dictionary}\n locales={locales}\n />\n )}\n\n {keyPath.length > 0 ? (\n <form\n className=\"bg-text text-text-dark dark:bg-text-dark dark:text-text flex w-full flex-col items-start justify-between gap-6 px-4 py-2\"\n key={JSON.stringify(focusedContent?.keyPath)}\n >\n <div className=\"flex w-full flex-wrap items-start justify-between gap-6\">\n {typeof initialKeyName === 'string' && (\n <div className=\"flex flex-col gap-3\">\n <Label>{titleInput.label}</Label>\n <div className=\"flex flex-wrap items-center gap-4\">\n <EditableFieldInput\n name=\"key\"\n aria-label=\"Key\"\n key={initialKeyName}\n placeholder={titleInput.placeholder}\n defaultValue={camelCaseToSentence(initialKeyName)}\n onSave={(value) => handleRenameNodeKey(value)}\n className=\"h-8\"\n variant=\"invisible\"\n />\n <span className=\"text-neutral dark:text-neutral-dark text-sm\">\n ({initialKeyName})\n </span>\n </div>\n </div>\n )}\n\n <div>\n <Label>{nodeTypeSelector.label}</Label>\n\n <NodeTypeSelector\n keyPath={keyPath}\n dictionaryKey={dictionaryKey}\n section={section}\n />\n </div>\n </div>\n {keyPath.length > 0 && (\n <div className=\"ml-auto flex gap-2\">\n {isEdited && (\n <Button\n label={restoreButton.label}\n variant=\"outline\"\n color=\"text-inverse\"\n Icon={RotateCcw}\n onClick={() => removeEditedContent(dictionaryKey, keyPath)}\n >\n {restoreButton.text}\n </Button>\n )}\n <Button\n label={deleteButton.label}\n variant=\"outline\"\n color=\"error\"\n Icon={X}\n onClick={() => {\n addEditedContent(dictionaryKey, undefined, keyPath);\n\n const parentKeyPath: KeyPath[] = keyPath.slice(0, -1);\n setFocusedContentKeyPath(parentKeyPath);\n }}\n >\n {deleteButton.text}\n </Button>\n </div>\n )}\n </form>\n ) : (\n <span className=\"h-8\"></span>\n )}\n </>\n );\n};\n"],"names":["jsxs","Fragment","jsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCO,MAAM,aAAkC,CAAC;AAAA,EAC9C;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACE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