@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":"ContentEditorTextArea.cjs","sources":["../../../src/components/ContentEditor/ContentEditorTextArea.tsx"],"sourcesContent":["'use client';\n\nimport { Check, X } from 'lucide-react';\nimport { useState, type FC, type ChangeEventHandler, useEffect } from 'react';\nimport { Button } from '../Button';\nimport { AutoSizedTextArea, AutoSizedTextAreaProps } from '../TextArea';\n\nexport type ContentEditorTextAreaProps = {\n children: string;\n onContentChange: (content: string) => void;\n disabled?: boolean;\n validate?: (content: string) => boolean;\n} & Omit<AutoSizedTextAreaProps, 'children'>;\n\nexport const ContentEditorTextArea: FC<ContentEditorTextAreaProps> = ({\n children,\n onContentChange,\n disabled,\n validate,\n ...props\n}) => {\n const [newValue, setNewValue] = useState<string>(children);\n const [resetIncrementor, setResetIncrementor] = useState<number>(0); // To reset the div on cancel\n const isEdited: boolean = newValue !== children;\n\n const handleCancel = () => {\n setNewValue(children);\n setResetIncrementor((prev) => prev + 1);\n };\n const handleValid = () => {\n onContentChange(newValue);\n };\n\n const handleOnContentChange: ChangeEventHandler<HTMLTextAreaElement> = (e) =>\n setNewValue(e.currentTarget.value ?? '');\n\n useEffect(() => {\n setNewValue(children);\n }, [children]);\n\n const isValid = validate?.(newValue) ?? true;\n\n return (\n <div\n className=\"flex size-full flex-col items-center justify-between gap-2\"\n key={children}\n >\n <AutoSizedTextArea\n onChange={handleOnContentChange}\n key={resetIncrementor}\n variant=\"invisible\"\n className=\"size-full\"\n defaultValue={children}\n {...props}\n />\n {isEdited && (\n <div className=\"flex w-full items-center justify-end gap-2\">\n <Button\n Icon={Check}\n label=\"Validate\"\n variant=\"hoverable\"\n color=\"text\"\n size=\"icon-sm\"\n className=\"cursor-pointer hover:scale-110\"\n disabled={disabled || !isValid}\n onClick={handleValid}\n />\n <Button\n Icon={X}\n label=\"Cancel\"\n variant=\"hoverable\"\n size=\"icon-sm\"\n color=\"text\"\n className=\"cursor-pointer hover:scale-110\"\n onClick={handleCancel}\n />\n </div>\n )}\n </div>\n );\n};\n"],"names":["useState","useEffect","jsxs","jsx","AutoSizedTextArea","Button","Check","X"],"mappings":";;;;;;;;;AAcO,MAAM,wBAAwD,CAAC;AAAA,EACpE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,CAAC,UAAU,WAAW,IAAIA,WAAAA,SAAiB,QAAQ;AACzD,QAAM,CAAC,kBAAkB,mBAAmB,IAAIA,WAAAA,SAAiB,CAAC;AAClE,QAAM,WAAoB,aAAa;AAEvC,QAAM,eAAe,MAAM;AACzB,gBAAY,QAAQ;AACA,wBAAA,CAAC,SAAS,OAAO,CAAC;AAAA,EACxC;AACA,QAAM,cAAc,MAAM;AACxB,oBAAgB,QAAQ;AAAA,EAC1B;AAEA,QAAM,wBAAiE,CAAC,MACtE,YAAY,EAAE,cAAc,SAAS,EAAE;AAEzCC,aAAAA,UAAU,MAAM;AACd,gBAAY,QAAQ;AAAA,EAAA,GACnB,CAAC,QAAQ,CAAC;AAEP,QAAA,UAAU,WAAW,QAAQ,KAAK;AAGtC,SAAAC,2BAAA,kBAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAU;AAAA,MAGV,UAAA;AAAA,QAAAC,2BAAA,kBAAA;AAAA,UAACC,qCAAA;AAAA,UAAA;AAAA,YACC,UAAU;AAAA,YAEV,SAAQ;AAAA,YACR,WAAU;AAAA,YACV,cAAc;AAAA,YACb,GAAG;AAAA,UAAA;AAAA,UAJC;AAAA,QAKP;AAAA,QACC,YACCF,2BAAA,kBAAA,KAAC,OAAI,EAAA,WAAU,8CACb,UAAA;AAAA,UAAAC,2BAAA,kBAAA;AAAA,YAACE,yBAAA;AAAA,YAAA;AAAA,cACC,MAAMC,YAAA;AAAA,cACN,OAAM;AAAA,cACN,SAAQ;AAAA,cACR,OAAM;AAAA,cACN,MAAK;AAAA,cACL,WAAU;AAAA,cACV,UAAU,YAAY,CAAC;AAAA,cACvB,SAAS;AAAA,YAAA;AAAA,UACX;AAAA,UACAH,2BAAA,kBAAA;AAAA,YAACE,yBAAA;AAAA,YAAA;AAAA,cACC,MAAME,YAAA;AAAA,cACN,OAAM;AAAA,cACN,SAAQ;AAAA,cACR,MAAK;AAAA,cACL,OAAM;AAAA,cACN,WAAU;AAAA,cACV,SAAS;AAAA,YAAA;AAAA,UAAA;AAAA,QACX,EACF,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,IA/BG;AAAA,EAiCP;AAEJ;;"}
1
+ {"version":3,"file":"ContentEditorTextArea.cjs","sources":["../../../src/components/ContentEditor/ContentEditorTextArea.tsx"],"sourcesContent":["'use client';\n\nimport { Check, X } from 'lucide-react';\nimport {\n useState,\n type FC,\n type ChangeEventHandler,\n useEffect,\n ReactNode,\n} from 'react';\nimport { Button } from '../Button';\nimport { AutoSizedTextArea, AutoSizedTextAreaProps } from '../TextArea';\n\nexport type ContentEditorTextAreaProps = {\n children: string;\n onContentChange: (content: string) => void;\n disabled?: boolean;\n validate?: (content: string) => boolean;\n additionalButtons?: ReactNode;\n} & Omit<AutoSizedTextAreaProps, 'children'>;\n\nexport const ContentEditorTextArea: FC<ContentEditorTextAreaProps> = ({\n children,\n onContentChange,\n disabled,\n validate,\n additionalButtons,\n ...props\n}) => {\n const [newValue, setNewValue] = useState<string>(children);\n const [resetIncrementor, setResetIncrementor] = useState<number>(0); // To reset the div on cancel\n const isEdited: boolean = newValue !== children;\n\n const handleCancel = () => {\n setNewValue(children);\n setResetIncrementor((prev) => prev + 1);\n };\n const handleValid = () => {\n onContentChange(newValue);\n };\n\n const handleOnContentChange: ChangeEventHandler<HTMLTextAreaElement> = (e) =>\n setNewValue(e.currentTarget.value ?? '');\n\n useEffect(() => {\n setNewValue(children);\n }, [children]);\n\n const isValid = validate?.(newValue) ?? true;\n\n return (\n <div\n className=\"flex size-full flex-col items-center justify-between gap-2\"\n key={children}\n >\n <AutoSizedTextArea\n onChange={handleOnContentChange}\n key={resetIncrementor}\n variant=\"invisible\"\n className=\"size-full\"\n defaultValue={children}\n {...props}\n />\n {(isEdited || additionalButtons) && (\n <div className=\"flex w-full items-center justify-end gap-2\">\n {isEdited && (\n <>\n <Button\n Icon={Check}\n label=\"Validate\"\n variant=\"hoverable\"\n color=\"text\"\n size=\"icon-sm\"\n className=\"cursor-pointer hover:scale-110\"\n disabled={disabled || !isValid}\n onClick={handleValid}\n />\n <Button\n Icon={X}\n label=\"Cancel\"\n variant=\"hoverable\"\n size=\"icon-sm\"\n color=\"text\"\n className=\"cursor-pointer hover:scale-110\"\n onClick={handleCancel}\n />\n </>\n )}\n {additionalButtons}\n </div>\n )}\n </div>\n );\n};\n"],"names":["useState","useEffect","jsxs","jsx","AutoSizedTextArea","Fragment","Button","Check","X"],"mappings":";;;;;;;;;AAqBO,MAAM,wBAAwD,CAAC;AAAA,EACpE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,CAAC,UAAU,WAAW,IAAIA,WAAAA,SAAiB,QAAQ;AACzD,QAAM,CAAC,kBAAkB,mBAAmB,IAAIA,WAAAA,SAAiB,CAAC;AAClE,QAAM,WAAoB,aAAa;AAEvC,QAAM,eAAe,MAAM;AACzB,gBAAY,QAAQ;AACA,wBAAA,CAAC,SAAS,OAAO,CAAC;AAAA,EACxC;AACA,QAAM,cAAc,MAAM;AACxB,oBAAgB,QAAQ;AAAA,EAC1B;AAEA,QAAM,wBAAiE,CAAC,MACtE,YAAY,EAAE,cAAc,SAAS,EAAE;AAEzCC,aAAAA,UAAU,MAAM;AACd,gBAAY,QAAQ;AAAA,EAAA,GACnB,CAAC,QAAQ,CAAC;AAEP,QAAA,UAAU,WAAW,QAAQ,KAAK;AAGtC,SAAAC,2BAAA,kBAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAU;AAAA,MAGV,UAAA;AAAA,QAAAC,2BAAA,kBAAA;AAAA,UAACC,qCAAA;AAAA,UAAA;AAAA,YACC,UAAU;AAAA,YAEV,SAAQ;AAAA,YACR,WAAU;AAAA,YACV,cAAc;AAAA,YACb,GAAG;AAAA,UAAA;AAAA,UAJC;AAAA,QAKP;AAAA,SACE,YAAY,sBACXF,2BAAA,kBAAA,KAAA,OAAA,EAAI,WAAU,8CACZ,UAAA;AAAA,UAAA,YAEGA,2BAAA,kBAAA,KAAAG,uCAAA,EAAA,UAAA;AAAA,YAAAF,2BAAA,kBAAA;AAAA,cAACG,yBAAA;AAAA,cAAA;AAAA,gBACC,MAAMC,YAAA;AAAA,gBACN,OAAM;AAAA,gBACN,SAAQ;AAAA,gBACR,OAAM;AAAA,gBACN,MAAK;AAAA,gBACL,WAAU;AAAA,gBACV,UAAU,YAAY,CAAC;AAAA,gBACvB,SAAS;AAAA,cAAA;AAAA,YACX;AAAA,YACAJ,2BAAA,kBAAA;AAAA,cAACG,yBAAA;AAAA,cAAA;AAAA,gBACC,MAAME,YAAA;AAAA,gBACN,OAAM;AAAA,gBACN,SAAQ;AAAA,gBACR,MAAK;AAAA,gBACL,OAAM;AAAA,gBACN,WAAU;AAAA,gBACV,SAAS;AAAA,cAAA;AAAA,YAAA;AAAA,UACX,GACF;AAAA,UAED;AAAA,QAAA,EACH,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,IApCG;AAAA,EAsCP;AAEJ;;"}
@@ -1,10 +1,11 @@
1
- import { FC } from 'react';
1
+ import { FC, ReactNode } from 'react';
2
2
  import { AutoSizedTextAreaProps } from '../TextArea';
3
3
  export type ContentEditorTextAreaProps = {
4
4
  children: string;
5
5
  onContentChange: (content: string) => void;
6
6
  disabled?: boolean;
7
7
  validate?: (content: string) => boolean;
8
+ additionalButtons?: ReactNode;
8
9
  } & Omit<AutoSizedTextAreaProps, 'children'>;
9
10
  export declare const ContentEditorTextArea: FC<ContentEditorTextAreaProps>;
10
11
  //# sourceMappingURL=ContentEditorTextArea.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ContentEditorTextArea.d.ts","sourceRoot":"","sources":["../../../src/components/ContentEditor/ContentEditorTextArea.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAY,KAAK,EAAE,EAAsC,MAAM,OAAO,CAAC;AAE9E,OAAO,EAAqB,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAExE,MAAM,MAAM,0BAA0B,GAAG;IACvC,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC;CACzC,GAAG,IAAI,CAAC,sBAAsB,EAAE,UAAU,CAAC,CAAC;AAE7C,eAAO,MAAM,qBAAqB,EAAE,EAAE,CAAC,0BAA0B,CAkEhE,CAAC"}
1
+ {"version":3,"file":"ContentEditorTextArea.d.ts","sourceRoot":"","sources":["../../../src/components/ContentEditor/ContentEditorTextArea.tsx"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,EAAE,EAGP,SAAS,EACV,MAAM,OAAO,CAAC;AAEf,OAAO,EAAqB,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAExE,MAAM,MAAM,0BAA0B,GAAG;IACvC,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC;IACxC,iBAAiB,CAAC,EAAE,SAAS,CAAC;CAC/B,GAAG,IAAI,CAAC,sBAAsB,EAAE,UAAU,CAAC,CAAC;AAE7C,eAAO,MAAM,qBAAqB,EAAE,EAAE,CAAC,0BAA0B,CAwEhE,CAAC"}
@@ -10,6 +10,7 @@ const ContentEditorTextArea = ({
10
10
  onContentChange,
11
11
  disabled,
12
12
  validate,
13
+ additionalButtons,
13
14
  ...props
14
15
  }) => {
15
16
  const [newValue, setNewValue] = useState(children);
@@ -43,32 +44,35 @@ const ContentEditorTextArea = ({
43
44
  },
44
45
  resetIncrementor
45
46
  ),
46
- isEdited && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex w-full items-center justify-end gap-2", children: [
47
- /* @__PURE__ */ jsxRuntimeExports.jsx(
48
- Button,
49
- {
50
- Icon: Check,
51
- label: "Validate",
52
- variant: "hoverable",
53
- color: "text",
54
- size: "icon-sm",
55
- className: "cursor-pointer hover:scale-110",
56
- disabled: disabled || !isValid,
57
- onClick: handleValid
58
- }
59
- ),
60
- /* @__PURE__ */ jsxRuntimeExports.jsx(
61
- Button,
62
- {
63
- Icon: X,
64
- label: "Cancel",
65
- variant: "hoverable",
66
- size: "icon-sm",
67
- color: "text",
68
- className: "cursor-pointer hover:scale-110",
69
- onClick: handleCancel
70
- }
71
- )
47
+ (isEdited || additionalButtons) && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex w-full items-center justify-end gap-2", children: [
48
+ isEdited && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
49
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
50
+ Button,
51
+ {
52
+ Icon: Check,
53
+ label: "Validate",
54
+ variant: "hoverable",
55
+ color: "text",
56
+ size: "icon-sm",
57
+ className: "cursor-pointer hover:scale-110",
58
+ disabled: disabled || !isValid,
59
+ onClick: handleValid
60
+ }
61
+ ),
62
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
63
+ Button,
64
+ {
65
+ Icon: X,
66
+ label: "Cancel",
67
+ variant: "hoverable",
68
+ size: "icon-sm",
69
+ color: "text",
70
+ className: "cursor-pointer hover:scale-110",
71
+ onClick: handleCancel
72
+ }
73
+ )
74
+ ] }),
75
+ additionalButtons
72
76
  ] })
73
77
  ]
74
78
  },
@@ -1 +1 @@
1
- {"version":3,"file":"ContentEditorTextArea.mjs","sources":["../../../src/components/ContentEditor/ContentEditorTextArea.tsx"],"sourcesContent":["'use client';\n\nimport { Check, X } from 'lucide-react';\nimport { useState, type FC, type ChangeEventHandler, useEffect } from 'react';\nimport { Button } from '../Button';\nimport { AutoSizedTextArea, AutoSizedTextAreaProps } from '../TextArea';\n\nexport type ContentEditorTextAreaProps = {\n children: string;\n onContentChange: (content: string) => void;\n disabled?: boolean;\n validate?: (content: string) => boolean;\n} & Omit<AutoSizedTextAreaProps, 'children'>;\n\nexport const ContentEditorTextArea: FC<ContentEditorTextAreaProps> = ({\n children,\n onContentChange,\n disabled,\n validate,\n ...props\n}) => {\n const [newValue, setNewValue] = useState<string>(children);\n const [resetIncrementor, setResetIncrementor] = useState<number>(0); // To reset the div on cancel\n const isEdited: boolean = newValue !== children;\n\n const handleCancel = () => {\n setNewValue(children);\n setResetIncrementor((prev) => prev + 1);\n };\n const handleValid = () => {\n onContentChange(newValue);\n };\n\n const handleOnContentChange: ChangeEventHandler<HTMLTextAreaElement> = (e) =>\n setNewValue(e.currentTarget.value ?? '');\n\n useEffect(() => {\n setNewValue(children);\n }, [children]);\n\n const isValid = validate?.(newValue) ?? true;\n\n return (\n <div\n className=\"flex size-full flex-col items-center justify-between gap-2\"\n key={children}\n >\n <AutoSizedTextArea\n onChange={handleOnContentChange}\n key={resetIncrementor}\n variant=\"invisible\"\n className=\"size-full\"\n defaultValue={children}\n {...props}\n />\n {isEdited && (\n <div className=\"flex w-full items-center justify-end gap-2\">\n <Button\n Icon={Check}\n label=\"Validate\"\n variant=\"hoverable\"\n color=\"text\"\n size=\"icon-sm\"\n className=\"cursor-pointer hover:scale-110\"\n disabled={disabled || !isValid}\n onClick={handleValid}\n />\n <Button\n Icon={X}\n label=\"Cancel\"\n variant=\"hoverable\"\n size=\"icon-sm\"\n color=\"text\"\n className=\"cursor-pointer hover:scale-110\"\n onClick={handleCancel}\n />\n </div>\n )}\n </div>\n );\n};\n"],"names":["jsxs","jsx"],"mappings":";;;;;;;AAcO,MAAM,wBAAwD,CAAC;AAAA,EACpE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,CAAC,UAAU,WAAW,IAAI,SAAiB,QAAQ;AACzD,QAAM,CAAC,kBAAkB,mBAAmB,IAAI,SAAiB,CAAC;AAClE,QAAM,WAAoB,aAAa;AAEvC,QAAM,eAAe,MAAM;AACzB,gBAAY,QAAQ;AACA,wBAAA,CAAC,SAAS,OAAO,CAAC;AAAA,EACxC;AACA,QAAM,cAAc,MAAM;AACxB,oBAAgB,QAAQ;AAAA,EAC1B;AAEA,QAAM,wBAAiE,CAAC,MACtE,YAAY,EAAE,cAAc,SAAS,EAAE;AAEzC,YAAU,MAAM;AACd,gBAAY,QAAQ;AAAA,EAAA,GACnB,CAAC,QAAQ,CAAC;AAEP,QAAA,UAAU,WAAW,QAAQ,KAAK;AAGtC,SAAAA,kCAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAU;AAAA,MAGV,UAAA;AAAA,QAAAC,kCAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,UAAU;AAAA,YAEV,SAAQ;AAAA,YACR,WAAU;AAAA,YACV,cAAc;AAAA,YACb,GAAG;AAAA,UAAA;AAAA,UAJC;AAAA,QAKP;AAAA,QACC,YACCD,kCAAA,KAAC,OAAI,EAAA,WAAU,8CACb,UAAA;AAAA,UAAAC,kCAAA;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,MAAM;AAAA,cACN,OAAM;AAAA,cACN,SAAQ;AAAA,cACR,OAAM;AAAA,cACN,MAAK;AAAA,cACL,WAAU;AAAA,cACV,UAAU,YAAY,CAAC;AAAA,cACvB,SAAS;AAAA,YAAA;AAAA,UACX;AAAA,UACAA,kCAAA;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,MAAM;AAAA,cACN,OAAM;AAAA,cACN,SAAQ;AAAA,cACR,MAAK;AAAA,cACL,OAAM;AAAA,cACN,WAAU;AAAA,cACV,SAAS;AAAA,YAAA;AAAA,UAAA;AAAA,QACX,EACF,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,IA/BG;AAAA,EAiCP;AAEJ;"}
1
+ {"version":3,"file":"ContentEditorTextArea.mjs","sources":["../../../src/components/ContentEditor/ContentEditorTextArea.tsx"],"sourcesContent":["'use client';\n\nimport { Check, X } from 'lucide-react';\nimport {\n useState,\n type FC,\n type ChangeEventHandler,\n useEffect,\n ReactNode,\n} from 'react';\nimport { Button } from '../Button';\nimport { AutoSizedTextArea, AutoSizedTextAreaProps } from '../TextArea';\n\nexport type ContentEditorTextAreaProps = {\n children: string;\n onContentChange: (content: string) => void;\n disabled?: boolean;\n validate?: (content: string) => boolean;\n additionalButtons?: ReactNode;\n} & Omit<AutoSizedTextAreaProps, 'children'>;\n\nexport const ContentEditorTextArea: FC<ContentEditorTextAreaProps> = ({\n children,\n onContentChange,\n disabled,\n validate,\n additionalButtons,\n ...props\n}) => {\n const [newValue, setNewValue] = useState<string>(children);\n const [resetIncrementor, setResetIncrementor] = useState<number>(0); // To reset the div on cancel\n const isEdited: boolean = newValue !== children;\n\n const handleCancel = () => {\n setNewValue(children);\n setResetIncrementor((prev) => prev + 1);\n };\n const handleValid = () => {\n onContentChange(newValue);\n };\n\n const handleOnContentChange: ChangeEventHandler<HTMLTextAreaElement> = (e) =>\n setNewValue(e.currentTarget.value ?? '');\n\n useEffect(() => {\n setNewValue(children);\n }, [children]);\n\n const isValid = validate?.(newValue) ?? true;\n\n return (\n <div\n className=\"flex size-full flex-col items-center justify-between gap-2\"\n key={children}\n >\n <AutoSizedTextArea\n onChange={handleOnContentChange}\n key={resetIncrementor}\n variant=\"invisible\"\n className=\"size-full\"\n defaultValue={children}\n {...props}\n />\n {(isEdited || additionalButtons) && (\n <div className=\"flex w-full items-center justify-end gap-2\">\n {isEdited && (\n <>\n <Button\n Icon={Check}\n label=\"Validate\"\n variant=\"hoverable\"\n color=\"text\"\n size=\"icon-sm\"\n className=\"cursor-pointer hover:scale-110\"\n disabled={disabled || !isValid}\n onClick={handleValid}\n />\n <Button\n Icon={X}\n label=\"Cancel\"\n variant=\"hoverable\"\n size=\"icon-sm\"\n color=\"text\"\n className=\"cursor-pointer hover:scale-110\"\n onClick={handleCancel}\n />\n </>\n )}\n {additionalButtons}\n </div>\n )}\n </div>\n );\n};\n"],"names":["jsxs","jsx","Fragment"],"mappings":";;;;;;;AAqBO,MAAM,wBAAwD,CAAC;AAAA,EACpE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,CAAC,UAAU,WAAW,IAAI,SAAiB,QAAQ;AACzD,QAAM,CAAC,kBAAkB,mBAAmB,IAAI,SAAiB,CAAC;AAClE,QAAM,WAAoB,aAAa;AAEvC,QAAM,eAAe,MAAM;AACzB,gBAAY,QAAQ;AACA,wBAAA,CAAC,SAAS,OAAO,CAAC;AAAA,EACxC;AACA,QAAM,cAAc,MAAM;AACxB,oBAAgB,QAAQ;AAAA,EAC1B;AAEA,QAAM,wBAAiE,CAAC,MACtE,YAAY,EAAE,cAAc,SAAS,EAAE;AAEzC,YAAU,MAAM;AACd,gBAAY,QAAQ;AAAA,EAAA,GACnB,CAAC,QAAQ,CAAC;AAEP,QAAA,UAAU,WAAW,QAAQ,KAAK;AAGtC,SAAAA,kCAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAU;AAAA,MAGV,UAAA;AAAA,QAAAC,kCAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,UAAU;AAAA,YAEV,SAAQ;AAAA,YACR,WAAU;AAAA,YACV,cAAc;AAAA,YACb,GAAG;AAAA,UAAA;AAAA,UAJC;AAAA,QAKP;AAAA,SACE,YAAY,sBACXD,kCAAA,KAAA,OAAA,EAAI,WAAU,8CACZ,UAAA;AAAA,UAAA,YAEGA,kCAAA,KAAAE,4BAAA,EAAA,UAAA;AAAA,YAAAD,kCAAA;AAAA,cAAC;AAAA,cAAA;AAAA,gBACC,MAAM;AAAA,gBACN,OAAM;AAAA,gBACN,SAAQ;AAAA,gBACR,OAAM;AAAA,gBACN,MAAK;AAAA,gBACL,WAAU;AAAA,gBACV,UAAU,YAAY,CAAC;AAAA,gBACvB,SAAS;AAAA,cAAA;AAAA,YACX;AAAA,YACAA,kCAAA;AAAA,cAAC;AAAA,cAAA;AAAA,gBACC,MAAM;AAAA,gBACN,OAAM;AAAA,gBACN,SAAQ;AAAA,gBACR,MAAK;AAAA,gBACL,OAAM;AAAA,gBACN,WAAU;AAAA,gBACV,SAAS;AAAA,cAAA;AAAA,YAAA;AAAA,UACX,GACF;AAAA,UAED;AAAA,QAAA,EACH,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,IApCG;AAAA,EAsCP;AAEJ;"}
@@ -2,8 +2,8 @@
2
2
  "use strict";
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
4
  const jsxRuntime = require("../../jsx-runtime-XHKiWCTo.cjs");
5
- const require$$0 = require("react");
6
5
  const lucideReact = require("lucide-react");
6
+ const require$$0 = require("react");
7
7
  const utils_cn = require("../../utils/cn.cjs");
8
8
  const CopyToClipboard = ({
9
9
  text,
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/components/CopyToClipboard/index.tsx"],"sourcesContent":["'use client';\n\nimport { FC, PropsWithChildren, useState } from 'react';\nimport { CopyCheck, CopyIcon } from 'lucide-react';\nimport { cn } from '../../utils/cn';\n\nexport type CopyToClipboardProps = PropsWithChildren<{\n text: string;\n className?: string;\n}>;\n\nexport const CopyToClipboard: FC<CopyToClipboardProps> = ({\n text,\n children,\n className,\n}) => {\n const [isCopied, setIsCopied] = useState(false);\n\n const handleCopy = () => {\n navigator.clipboard.writeText(text).then(() => {\n setIsCopied(true);\n setTimeout(() => setIsCopied(false), 1000);\n });\n };\n\n return (\n <span className={cn('gap-2', className)}>\n {children}\n\n <span className=\"inline-flex\">\n {text &&\n (isCopied ? (\n <CopyCheck\n size={12}\n aria-label=\"copied\"\n role=\"button\"\n data-testid=\"copy-to-clipboard\"\n className=\"ml-1 mt-1\"\n />\n ) : (\n <CopyIcon\n size={12}\n onClick={handleCopy}\n aria-label=\"copy\"\n role=\"button\"\n data-testid=\"copy-to-clipboard\"\n className=\"ml-1 mt-1 cursor-pointer\"\n />\n ))}\n </span>\n </span>\n );\n};\n"],"names":["useState","cn","jsx","CopyCheck","CopyIcon"],"mappings":";;;;;;;AAWO,MAAM,kBAA4C,CAAC;AAAA,EACxD;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,CAAC,UAAU,WAAW,IAAIA,WAAAA,SAAS,KAAK;AAE9C,QAAM,aAAa,MAAM;AACvB,cAAU,UAAU,UAAU,IAAI,EAAE,KAAK,MAAM;AAC7C,kBAAY,IAAI;AAChB,iBAAW,MAAM,YAAY,KAAK,GAAG,GAAI;AAAA,IAAA,CAC1C;AAAA,EACH;AAEA,2DACG,QAAK,EAAA,WAAWC,SAAG,GAAA,SAAS,SAAS,GACnC,UAAA;AAAA,IAAA;AAAA,IAEAC,2BAAA,kBAAA,IAAA,QAAA,EAAK,WAAU,eACb,mBACE,WACCA,2BAAA,kBAAA;AAAA,MAACC,YAAA;AAAA,MAAA;AAAA,QACC,MAAM;AAAA,QACN,cAAW;AAAA,QACX,MAAK;AAAA,QACL,eAAY;AAAA,QACZ,WAAU;AAAA,MAAA;AAAA,IAAA,IAGZD,2BAAA,kBAAA;AAAA,MAACE,YAAA;AAAA,MAAA;AAAA,QACC,MAAM;AAAA,QACN,SAAS;AAAA,QACT,cAAW;AAAA,QACX,MAAK;AAAA,QACL,eAAY;AAAA,QACZ,WAAU;AAAA,MAAA;AAAA,IAAA,GAGlB,CAAA;AAAA,EAAA,GACF;AAEJ;;"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/CopyToClipboard/index.tsx"],"sourcesContent":["'use client';\n\nimport { CopyCheck, CopyIcon } from 'lucide-react';\nimport { FC, PropsWithChildren, useState } from 'react';\nimport { cn } from '../../utils/cn';\n\nexport type CopyToClipboardProps = PropsWithChildren<{\n text: string;\n className?: string;\n}>;\n\nexport const CopyToClipboard: FC<CopyToClipboardProps> = ({\n text,\n children,\n className,\n}) => {\n const [isCopied, setIsCopied] = useState(false);\n\n const handleCopy = () => {\n navigator.clipboard.writeText(text).then(() => {\n setIsCopied(true);\n setTimeout(() => setIsCopied(false), 1000);\n });\n };\n\n return (\n <span className={cn('gap-2', className)}>\n {children}\n\n <span className=\"inline-flex\">\n {text &&\n (isCopied ? (\n <CopyCheck\n size={12}\n aria-label=\"copied\"\n role=\"button\"\n data-testid=\"copy-to-clipboard\"\n className=\"ml-1 mt-1\"\n />\n ) : (\n <CopyIcon\n size={12}\n onClick={handleCopy}\n aria-label=\"copy\"\n role=\"button\"\n data-testid=\"copy-to-clipboard\"\n className=\"ml-1 mt-1 cursor-pointer\"\n />\n ))}\n </span>\n </span>\n );\n};\n"],"names":["useState","cn","jsx","CopyCheck","CopyIcon"],"mappings":";;;;;;;AAWO,MAAM,kBAA4C,CAAC;AAAA,EACxD;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,CAAC,UAAU,WAAW,IAAIA,WAAAA,SAAS,KAAK;AAE9C,QAAM,aAAa,MAAM;AACvB,cAAU,UAAU,UAAU,IAAI,EAAE,KAAK,MAAM;AAC7C,kBAAY,IAAI;AAChB,iBAAW,MAAM,YAAY,KAAK,GAAG,GAAI;AAAA,IAAA,CAC1C;AAAA,EACH;AAEA,2DACG,QAAK,EAAA,WAAWC,SAAG,GAAA,SAAS,SAAS,GACnC,UAAA;AAAA,IAAA;AAAA,IAEAC,2BAAA,kBAAA,IAAA,QAAA,EAAK,WAAU,eACb,mBACE,WACCA,2BAAA,kBAAA;AAAA,MAACC,YAAA;AAAA,MAAA;AAAA,QACC,MAAM;AAAA,QACN,cAAW;AAAA,QACX,MAAK;AAAA,QACL,eAAY;AAAA,QACZ,WAAU;AAAA,MAAA;AAAA,IAAA,IAGZD,2BAAA,kBAAA;AAAA,MAACE,YAAA;AAAA,MAAA;AAAA,QACC,MAAM;AAAA,QACN,SAAS;AAAA,QACT,cAAW;AAAA,QACX,MAAK;AAAA,QACL,eAAY;AAAA,QACZ,WAAU;AAAA,MAAA;AAAA,IAAA,GAGlB,CAAA;AAAA,EAAA,GACF;AAEJ;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/CopyToClipboard/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,EAAE,EAAE,iBAAiB,EAAY,MAAM,OAAO,CAAC;AAIxD,MAAM,MAAM,oBAAoB,GAAG,iBAAiB,CAAC;IACnD,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC,CAAC;AAEH,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CAyCpD,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/CopyToClipboard/index.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,EAAE,EAAE,iBAAiB,EAAY,MAAM,OAAO,CAAC;AAGxD,MAAM,MAAM,oBAAoB,GAAG,iBAAiB,CAAC;IACnD,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC,CAAC;AAEH,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CAyCpD,CAAC"}
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { j as jsxRuntimeExports } from "../../jsx-runtime-DaNGiM0W.js";
3
- import { useState } from "react";
4
3
  import { CopyCheck, CopyIcon } from "lucide-react";
4
+ import { useState } from "react";
5
5
  import { cn } from "../../utils/cn.mjs";
6
6
  const CopyToClipboard = ({
7
7
  text,
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../src/components/CopyToClipboard/index.tsx"],"sourcesContent":["'use client';\n\nimport { FC, PropsWithChildren, useState } from 'react';\nimport { CopyCheck, CopyIcon } from 'lucide-react';\nimport { cn } from '../../utils/cn';\n\nexport type CopyToClipboardProps = PropsWithChildren<{\n text: string;\n className?: string;\n}>;\n\nexport const CopyToClipboard: FC<CopyToClipboardProps> = ({\n text,\n children,\n className,\n}) => {\n const [isCopied, setIsCopied] = useState(false);\n\n const handleCopy = () => {\n navigator.clipboard.writeText(text).then(() => {\n setIsCopied(true);\n setTimeout(() => setIsCopied(false), 1000);\n });\n };\n\n return (\n <span className={cn('gap-2', className)}>\n {children}\n\n <span className=\"inline-flex\">\n {text &&\n (isCopied ? (\n <CopyCheck\n size={12}\n aria-label=\"copied\"\n role=\"button\"\n data-testid=\"copy-to-clipboard\"\n className=\"ml-1 mt-1\"\n />\n ) : (\n <CopyIcon\n size={12}\n onClick={handleCopy}\n aria-label=\"copy\"\n role=\"button\"\n data-testid=\"copy-to-clipboard\"\n className=\"ml-1 mt-1 cursor-pointer\"\n />\n ))}\n </span>\n </span>\n );\n};\n"],"names":["jsx"],"mappings":";;;;;AAWO,MAAM,kBAA4C,CAAC;AAAA,EACxD;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,CAAC,UAAU,WAAW,IAAI,SAAS,KAAK;AAE9C,QAAM,aAAa,MAAM;AACvB,cAAU,UAAU,UAAU,IAAI,EAAE,KAAK,MAAM;AAC7C,kBAAY,IAAI;AAChB,iBAAW,MAAM,YAAY,KAAK,GAAG,GAAI;AAAA,IAAA,CAC1C;AAAA,EACH;AAEA,gDACG,QAAK,EAAA,WAAW,GAAG,SAAS,SAAS,GACnC,UAAA;AAAA,IAAA;AAAA,IAEAA,kCAAA,IAAA,QAAA,EAAK,WAAU,eACb,mBACE,WACCA,kCAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,MAAM;AAAA,QACN,cAAW;AAAA,QACX,MAAK;AAAA,QACL,eAAY;AAAA,QACZ,WAAU;AAAA,MAAA;AAAA,IAAA,IAGZA,kCAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,MAAM;AAAA,QACN,SAAS;AAAA,QACT,cAAW;AAAA,QACX,MAAK;AAAA,QACL,eAAY;AAAA,QACZ,WAAU;AAAA,MAAA;AAAA,IAAA,GAGlB,CAAA;AAAA,EAAA,GACF;AAEJ;"}
1
+ {"version":3,"file":"index.mjs","sources":["../../../src/components/CopyToClipboard/index.tsx"],"sourcesContent":["'use client';\n\nimport { CopyCheck, CopyIcon } from 'lucide-react';\nimport { FC, PropsWithChildren, useState } from 'react';\nimport { cn } from '../../utils/cn';\n\nexport type CopyToClipboardProps = PropsWithChildren<{\n text: string;\n className?: string;\n}>;\n\nexport const CopyToClipboard: FC<CopyToClipboardProps> = ({\n text,\n children,\n className,\n}) => {\n const [isCopied, setIsCopied] = useState(false);\n\n const handleCopy = () => {\n navigator.clipboard.writeText(text).then(() => {\n setIsCopied(true);\n setTimeout(() => setIsCopied(false), 1000);\n });\n };\n\n return (\n <span className={cn('gap-2', className)}>\n {children}\n\n <span className=\"inline-flex\">\n {text &&\n (isCopied ? (\n <CopyCheck\n size={12}\n aria-label=\"copied\"\n role=\"button\"\n data-testid=\"copy-to-clipboard\"\n className=\"ml-1 mt-1\"\n />\n ) : (\n <CopyIcon\n size={12}\n onClick={handleCopy}\n aria-label=\"copy\"\n role=\"button\"\n data-testid=\"copy-to-clipboard\"\n className=\"ml-1 mt-1 cursor-pointer\"\n />\n ))}\n </span>\n </span>\n );\n};\n"],"names":["jsx"],"mappings":";;;;;AAWO,MAAM,kBAA4C,CAAC;AAAA,EACxD;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,CAAC,UAAU,WAAW,IAAI,SAAS,KAAK;AAE9C,QAAM,aAAa,MAAM;AACvB,cAAU,UAAU,UAAU,IAAI,EAAE,KAAK,MAAM;AAC7C,kBAAY,IAAI;AAChB,iBAAW,MAAM,YAAY,KAAK,GAAG,GAAI;AAAA,IAAA,CAC1C;AAAA,EACH;AAEA,gDACG,QAAK,EAAA,WAAW,GAAG,SAAS,SAAS,GACnC,UAAA;AAAA,IAAA;AAAA,IAEAA,kCAAA,IAAA,QAAA,EAAK,WAAU,eACb,mBACE,WACCA,kCAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,MAAM;AAAA,QACN,cAAW;AAAA,QACX,MAAK;AAAA,QACL,eAAY;AAAA,QACZ,WAAU;AAAA,MAAA;AAAA,IAAA,IAGZA,kCAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,MAAM;AAAA,QACN,SAAS;AAAA,QACT,cAAW;AAAA,QACX,MAAK;AAAA,QACL,eAAY;AAAA,QACZ,WAAU;AAAA,MAAA;AAAA,IAAA,GAGlB,CAAA;AAAA,EAAA,GACF;AAEJ;"}
@@ -27,7 +27,6 @@ const ItemLayout = ({
27
27
  {
28
28
  isOpen: isSelected,
29
29
  label: title,
30
- identifier: `accordion_${title}`,
31
30
  header: /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs("div", { className: "flex w-full", children: [
32
31
  /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs("div", { className: "flex w-full items-center justify-between", children: [
33
32
  /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
@@ -1 +1 @@
1
- {"version":3,"file":"ItemLayout.cjs","sources":["../../../src/components/DictionaryEditor/ItemLayout.tsx"],"sourcesContent":["import type { ReactNode, FC, HTMLAttributes } from 'react';\nimport { cn } from '../../utils/cn';\nimport { Accordion } from '../Accordion';\n\ninterface ItemWrapperProps extends HTMLAttributes<HTMLDivElement> {\n level: number;\n children: ReactNode;\n title: string;\n description: string;\n rightParam?: ReactNode;\n isSelected: boolean;\n}\n\nexport const ItemLayout: FC<ItemWrapperProps> = ({\n level,\n title,\n description,\n children,\n rightParam,\n isSelected,\n ...props\n}) => (\n <div\n className={cn(\n 'rounded-md p-2 transition',\n 'hover:bg-card/30 dark:hover:bg-card-dark/30 [&:has(.section:hover)]:bg-transparent',\n level === 2 && 'hover:bg-card/30 dark:hover:bg-card-dark/30',\n level >= 3 && '',\n isSelected === true && 'bg-card/40 dark:bg-card-dark/40'\n )}\n {...props}\n >\n <Accordion\n isOpen={isSelected}\n label={title}\n identifier={`accordion_${title}`}\n header={\n <div className=\"flex w-full\">\n <div className=\"flex w-full items-center justify-between\">\n <span\n className={cn(\n level === 0 && 'text-2xl',\n level === 1 && 'text-xl',\n level === 2 && 'text-lg',\n level >= 3 && 'text-base'\n )}\n >\n {title}\n </span>\n {rightParam && (\n <div className=\"flex w-auto items-center justify-between p-3\">\n {rightParam}\n </div>\n )}\n </div>\n {description && (\n <p className=\"text-card pl-3 text-sm\">{description}</p>\n )}\n </div>\n }\n >\n {children}\n </Accordion>\n </div>\n);\n"],"names":["jsx","cn","Accordion","jsxs"],"mappings":";;;;;AAaO,MAAM,aAAmC,CAAC;AAAA,EAC/C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MACEA,2BAAA,kBAAA;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWC,SAAA;AAAA,MACT;AAAA,MACA;AAAA,MACA,UAAU,KAAK;AAAA,MACf,SAAS,KAAK;AAAA,MACd,eAAe,QAAQ;AAAA,IACzB;AAAA,IACC,GAAG;AAAA,IAEJ,UAAAD,2BAAA,kBAAA;AAAA,MAACE,+BAAA;AAAA,MAAA;AAAA,QACC,QAAQ;AAAA,QACR,OAAO;AAAA,QACP,YAAY,aAAa,KAAK;AAAA,QAC9B,QACEC,2BAAA,kBAAA,KAAC,OAAI,EAAA,WAAU,eACb,UAAA;AAAA,UAACA,2BAAAA,kBAAAA,KAAA,OAAA,EAAI,WAAU,4CACb,UAAA;AAAA,YAAAH,2BAAA,kBAAA;AAAA,cAAC;AAAA,cAAA;AAAA,gBACC,WAAWC,SAAA;AAAA,kBACT,UAAU,KAAK;AAAA,kBACf,UAAU,KAAK;AAAA,kBACf,UAAU,KAAK;AAAA,kBACf,SAAS,KAAK;AAAA,gBAChB;AAAA,gBAEC,UAAA;AAAA,cAAA;AAAA,YACH;AAAA,YACC,cACCD,2BAAA,kBAAA,IAAC,OAAI,EAAA,WAAU,gDACZ,UACH,WAAA,CAAA;AAAA,UAAA,GAEJ;AAAA,UACC,eACCA,2BAAA,kBAAA,IAAC,KAAE,EAAA,WAAU,0BAA0B,UAAY,YAAA,CAAA;AAAA,QAAA,GAEvD;AAAA,QAGD;AAAA,MAAA;AAAA,IAAA;AAAA,EACH;AACF;;"}
1
+ {"version":3,"file":"ItemLayout.cjs","sources":["../../../src/components/DictionaryEditor/ItemLayout.tsx"],"sourcesContent":["import type { ReactNode, FC, HTMLAttributes } from 'react';\nimport { cn } from '../../utils/cn';\nimport { Accordion } from '../Accordion';\n\ninterface ItemWrapperProps extends HTMLAttributes<HTMLDivElement> {\n level: number;\n children: ReactNode;\n title: string;\n description: string;\n rightParam?: ReactNode;\n isSelected: boolean;\n}\n\nexport const ItemLayout: FC<ItemWrapperProps> = ({\n level,\n title,\n description,\n children,\n rightParam,\n isSelected,\n ...props\n}) => (\n <div\n className={cn(\n 'rounded-md p-2 transition',\n 'hover:bg-card/30 dark:hover:bg-card-dark/30 [&:has(.section:hover)]:bg-transparent',\n level === 2 && 'hover:bg-card/30 dark:hover:bg-card-dark/30',\n level >= 3 && '',\n isSelected === true && 'bg-card/40 dark:bg-card-dark/40'\n )}\n {...props}\n >\n <Accordion\n isOpen={isSelected}\n label={title}\n header={\n <div className=\"flex w-full\">\n <div className=\"flex w-full items-center justify-between\">\n <span\n className={cn(\n level === 0 && 'text-2xl',\n level === 1 && 'text-xl',\n level === 2 && 'text-lg',\n level >= 3 && 'text-base'\n )}\n >\n {title}\n </span>\n {rightParam && (\n <div className=\"flex w-auto items-center justify-between p-3\">\n {rightParam}\n </div>\n )}\n </div>\n {description && (\n <p className=\"text-card pl-3 text-sm\">{description}</p>\n )}\n </div>\n }\n >\n {children}\n </Accordion>\n </div>\n);\n"],"names":["jsx","cn","Accordion","jsxs"],"mappings":";;;;;AAaO,MAAM,aAAmC,CAAC;AAAA,EAC/C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MACEA,2BAAA,kBAAA;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWC,SAAA;AAAA,MACT;AAAA,MACA;AAAA,MACA,UAAU,KAAK;AAAA,MACf,SAAS,KAAK;AAAA,MACd,eAAe,QAAQ;AAAA,IACzB;AAAA,IACC,GAAG;AAAA,IAEJ,UAAAD,2BAAA,kBAAA;AAAA,MAACE,+BAAA;AAAA,MAAA;AAAA,QACC,QAAQ;AAAA,QACR,OAAO;AAAA,QACP,QACEC,2BAAA,kBAAA,KAAC,OAAI,EAAA,WAAU,eACb,UAAA;AAAA,UAACA,2BAAAA,kBAAAA,KAAA,OAAA,EAAI,WAAU,4CACb,UAAA;AAAA,YAAAH,2BAAA,kBAAA;AAAA,cAAC;AAAA,cAAA;AAAA,gBACC,WAAWC,SAAA;AAAA,kBACT,UAAU,KAAK;AAAA,kBACf,UAAU,KAAK;AAAA,kBACf,UAAU,KAAK;AAAA,kBACf,SAAS,KAAK;AAAA,gBAChB;AAAA,gBAEC,UAAA;AAAA,cAAA;AAAA,YACH;AAAA,YACC,cACCD,2BAAA,kBAAA,IAAC,OAAI,EAAA,WAAU,gDACZ,UACH,WAAA,CAAA;AAAA,UAAA,GAEJ;AAAA,UACC,eACCA,2BAAA,kBAAA,IAAC,KAAE,EAAA,WAAU,0BAA0B,UAAY,YAAA,CAAA;AAAA,QAAA,GAEvD;AAAA,QAGD;AAAA,MAAA;AAAA,IAAA;AAAA,EACH;AACF;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"ItemLayout.d.ts","sourceRoot":"","sources":["../../../src/components/DictionaryEditor/ItemLayout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAI3D,UAAU,gBAAiB,SAAQ,cAAc,CAAC,cAAc,CAAC;IAC/D,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,SAAS,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,gBAAgB,CAmD3C,CAAC"}
1
+ {"version":3,"file":"ItemLayout.d.ts","sourceRoot":"","sources":["../../../src/components/DictionaryEditor/ItemLayout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAI3D,UAAU,gBAAiB,SAAQ,cAAc,CAAC,cAAc,CAAC;IAC/D,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,SAAS,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,gBAAgB,CAkD3C,CAAC"}
@@ -25,7 +25,6 @@ const ItemLayout = ({
25
25
  {
26
26
  isOpen: isSelected,
27
27
  label: title,
28
- identifier: `accordion_${title}`,
29
28
  header: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex w-full", children: [
30
29
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex w-full items-center justify-between", children: [
31
30
  /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -1 +1 @@
1
- {"version":3,"file":"ItemLayout.mjs","sources":["../../../src/components/DictionaryEditor/ItemLayout.tsx"],"sourcesContent":["import type { ReactNode, FC, HTMLAttributes } from 'react';\nimport { cn } from '../../utils/cn';\nimport { Accordion } from '../Accordion';\n\ninterface ItemWrapperProps extends HTMLAttributes<HTMLDivElement> {\n level: number;\n children: ReactNode;\n title: string;\n description: string;\n rightParam?: ReactNode;\n isSelected: boolean;\n}\n\nexport const ItemLayout: FC<ItemWrapperProps> = ({\n level,\n title,\n description,\n children,\n rightParam,\n isSelected,\n ...props\n}) => (\n <div\n className={cn(\n 'rounded-md p-2 transition',\n 'hover:bg-card/30 dark:hover:bg-card-dark/30 [&:has(.section:hover)]:bg-transparent',\n level === 2 && 'hover:bg-card/30 dark:hover:bg-card-dark/30',\n level >= 3 && '',\n isSelected === true && 'bg-card/40 dark:bg-card-dark/40'\n )}\n {...props}\n >\n <Accordion\n isOpen={isSelected}\n label={title}\n identifier={`accordion_${title}`}\n header={\n <div className=\"flex w-full\">\n <div className=\"flex w-full items-center justify-between\">\n <span\n className={cn(\n level === 0 && 'text-2xl',\n level === 1 && 'text-xl',\n level === 2 && 'text-lg',\n level >= 3 && 'text-base'\n )}\n >\n {title}\n </span>\n {rightParam && (\n <div className=\"flex w-auto items-center justify-between p-3\">\n {rightParam}\n </div>\n )}\n </div>\n {description && (\n <p className=\"text-card pl-3 text-sm\">{description}</p>\n )}\n </div>\n }\n >\n {children}\n </Accordion>\n </div>\n);\n"],"names":["jsx","jsxs"],"mappings":";;;AAaO,MAAM,aAAmC,CAAC;AAAA,EAC/C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MACEA,kCAAA;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAW;AAAA,MACT;AAAA,MACA;AAAA,MACA,UAAU,KAAK;AAAA,MACf,SAAS,KAAK;AAAA,MACd,eAAe,QAAQ;AAAA,IACzB;AAAA,IACC,GAAG;AAAA,IAEJ,UAAAA,kCAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,QAAQ;AAAA,QACR,OAAO;AAAA,QACP,YAAY,aAAa,KAAK;AAAA,QAC9B,QACEC,kCAAA,KAAC,OAAI,EAAA,WAAU,eACb,UAAA;AAAA,UAACA,kCAAAA,KAAA,OAAA,EAAI,WAAU,4CACb,UAAA;AAAA,YAAAD,kCAAA;AAAA,cAAC;AAAA,cAAA;AAAA,gBACC,WAAW;AAAA,kBACT,UAAU,KAAK;AAAA,kBACf,UAAU,KAAK;AAAA,kBACf,UAAU,KAAK;AAAA,kBACf,SAAS,KAAK;AAAA,gBAChB;AAAA,gBAEC,UAAA;AAAA,cAAA;AAAA,YACH;AAAA,YACC,cACCA,kCAAA,IAAC,OAAI,EAAA,WAAU,gDACZ,UACH,WAAA,CAAA;AAAA,UAAA,GAEJ;AAAA,UACC,eACCA,kCAAA,IAAC,KAAE,EAAA,WAAU,0BAA0B,UAAY,YAAA,CAAA;AAAA,QAAA,GAEvD;AAAA,QAGD;AAAA,MAAA;AAAA,IAAA;AAAA,EACH;AACF;"}
1
+ {"version":3,"file":"ItemLayout.mjs","sources":["../../../src/components/DictionaryEditor/ItemLayout.tsx"],"sourcesContent":["import type { ReactNode, FC, HTMLAttributes } from 'react';\nimport { cn } from '../../utils/cn';\nimport { Accordion } from '../Accordion';\n\ninterface ItemWrapperProps extends HTMLAttributes<HTMLDivElement> {\n level: number;\n children: ReactNode;\n title: string;\n description: string;\n rightParam?: ReactNode;\n isSelected: boolean;\n}\n\nexport const ItemLayout: FC<ItemWrapperProps> = ({\n level,\n title,\n description,\n children,\n rightParam,\n isSelected,\n ...props\n}) => (\n <div\n className={cn(\n 'rounded-md p-2 transition',\n 'hover:bg-card/30 dark:hover:bg-card-dark/30 [&:has(.section:hover)]:bg-transparent',\n level === 2 && 'hover:bg-card/30 dark:hover:bg-card-dark/30',\n level >= 3 && '',\n isSelected === true && 'bg-card/40 dark:bg-card-dark/40'\n )}\n {...props}\n >\n <Accordion\n isOpen={isSelected}\n label={title}\n header={\n <div className=\"flex w-full\">\n <div className=\"flex w-full items-center justify-between\">\n <span\n className={cn(\n level === 0 && 'text-2xl',\n level === 1 && 'text-xl',\n level === 2 && 'text-lg',\n level >= 3 && 'text-base'\n )}\n >\n {title}\n </span>\n {rightParam && (\n <div className=\"flex w-auto items-center justify-between p-3\">\n {rightParam}\n </div>\n )}\n </div>\n {description && (\n <p className=\"text-card pl-3 text-sm\">{description}</p>\n )}\n </div>\n }\n >\n {children}\n </Accordion>\n </div>\n);\n"],"names":["jsx","jsxs"],"mappings":";;;AAaO,MAAM,aAAmC,CAAC;AAAA,EAC/C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MACEA,kCAAA;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAW;AAAA,MACT;AAAA,MACA;AAAA,MACA,UAAU,KAAK;AAAA,MACf,SAAS,KAAK;AAAA,MACd,eAAe,QAAQ;AAAA,IACzB;AAAA,IACC,GAAG;AAAA,IAEJ,UAAAA,kCAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,QAAQ;AAAA,QACR,OAAO;AAAA,QACP,QACEC,kCAAA,KAAC,OAAI,EAAA,WAAU,eACb,UAAA;AAAA,UAACA,kCAAAA,KAAA,OAAA,EAAI,WAAU,4CACb,UAAA;AAAA,YAAAD,kCAAA;AAAA,cAAC;AAAA,cAAA;AAAA,gBACC,WAAW;AAAA,kBACT,UAAU,KAAK;AAAA,kBACf,UAAU,KAAK;AAAA,kBACf,UAAU,KAAK;AAAA,kBACf,SAAS,KAAK;AAAA,gBAChB;AAAA,gBAEC,UAAA;AAAA,cAAA;AAAA,YACH;AAAA,YACC,cACCA,kCAAA,IAAC,OAAI,EAAA,WAAU,gDACZ,UACH,WAAA,CAAA;AAAA,UAAA,GAEJ;AAAA,UACC,eACCA,kCAAA,IAAC,KAAE,EAAA,WAAU,0BAA0B,UAAY,YAAA,CAAA;AAAA,QAAA,GAEvD;AAAA,QAGD;AAAA,MAAA;AAAA,IAAA;AAAA,EACH;AACF;"}
@@ -13,7 +13,7 @@ require("@intlayer/dictionaries-entry");
13
13
  require("deepmerge");
14
14
  const components_Form_FormBase = require("../Form/FormBase.cjs");
15
15
  require("../Form/FormField.cjs");
16
- const components_Form_layout_FormItemLayout = require("../../Form-BDcoNTLV.cjs");
16
+ const components_Form_layout_FormItemLayout = require("../../Form-7BqwvjVI.cjs");
17
17
  const components_DictionaryEditor_useEditedContentStore = require("./useEditedContentStore.cjs");
18
18
  const components_DictionaryEditor_validDictionaryChangeButtons_content = require("./validDictionaryChangeButtons.content.cjs");
19
19
  const components_DictionaryEditor_validDictionaryChangeButtonsSchema = require("./validDictionaryChangeButtonsSchema.cjs");
@@ -64,7 +64,7 @@ const ValidDictionaryChangeButtons = ({ dictionary }) => {
64
64
  components_Form_layout_FormItemLayout.Form.Button,
65
65
  {
66
66
  type: "button",
67
- label: resetButton.label.value,
67
+ label: resetButton.label,
68
68
  disabled: !isEdited || isSubmitting,
69
69
  className: "ml-auto",
70
70
  Icon: lucideReact.RotateCcw,
@@ -80,7 +80,7 @@ const ValidDictionaryChangeButtons = ({ dictionary }) => {
80
80
  components_Form_layout_FormItemLayout.Form.Button,
81
81
  {
82
82
  type: "submit",
83
- label: publishButton.label.value,
83
+ label: publishButton.label,
84
84
  disabled: !isEdited || isSubmitting,
85
85
  Icon: lucideReact.ArrowUpFromLine,
86
86
  color: "text",
@@ -92,7 +92,7 @@ const ValidDictionaryChangeButtons = ({ dictionary }) => {
92
92
  components_Form_layout_FormItemLayout.Form.Button,
93
93
  {
94
94
  type: "submit",
95
- label: saveButton.label.value,
95
+ label: saveButton.label,
96
96
  disabled: !isEdited || isSubmitting,
97
97
  Icon: lucideReact.Save,
98
98
  color: "text",
@@ -1 +1 @@
1
- {"version":3,"file":"ValidDictionaryChangeButtons.cjs","sources":["../../../src/components/DictionaryEditor/ValidDictionaryChangeButtons.tsx"],"sourcesContent":["'use client';\n\nimport { Dictionary as DistantDictionary } from '@intlayer/backend';\nimport type { Dictionary } from '@intlayer/core';\nimport { ArrowUpFromLine, RotateCcw, Save } 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 { usePushDictionaries } from '../../hooks';\nimport { Form, useForm } from '../Form';\nimport { useEditedContentStore } from './useEditedContentStore';\nimport { validDictionaryChangeButtonsContent } from './validDictionaryChangeButtons.content';\nimport { getValidDictionaryChangeButtonsSchemaSchema } from './validDictionaryChangeButtonsSchema';\n\ntype ValidDictionaryChangeButtonsProps = {\n dictionary: Dictionary;\n};\n\nexport const ValidDictionaryChangeButtons: FC<\n ValidDictionaryChangeButtonsProps\n> = ({ dictionary }) => {\n const ValidDictionaryChangeButtonsSchemaSchema =\n getValidDictionaryChangeButtonsSchemaSchema();\n\n const { resetButton, saveButton, publishButton } = useDictionary(\n validDictionaryChangeButtonsContent\n );\n\n const { pushDictionaries } = usePushDictionaries();\n\n const { editedContent, restoreEditedContent } = useEditedContentStore(\n useShallow((s) => ({\n editedContent: s.editedContent,\n restoreEditedContent: s.restoreEditedContent,\n }))\n );\n const { form, isSubmitting } = useForm(\n ValidDictionaryChangeButtonsSchemaSchema\n );\n\n const editedDictionary = useMemo(\n () => editedContent[dictionary.key],\n [editedContent, dictionary.key]\n );\n\n const isEdited = useMemo(\n () =>\n editedDictionary &&\n JSON.stringify(editedDictionary?.content) !==\n JSON.stringify(dictionary?.content),\n [editedDictionary, dictionary]\n );\n\n const isLocalDictionary = useMemo(\n () => typeof (dictionary as DistantDictionary)?._id === 'undefined',\n [dictionary]\n );\n\n const onSubmitSuccess = async () => {\n await pushDictionaries([\n {\n ...dictionary,\n ...editedContent[dictionary.key],\n },\n ]);\n };\n\n return (\n <div className=\"mb-4\">\n <Form\n className=\"flex w-full flex-row flex-wrap justify-end gap-3\"\n {...form}\n schema={ValidDictionaryChangeButtonsSchemaSchema}\n onSubmitSuccess={onSubmitSuccess}\n >\n {isEdited && (\n <Form.Button\n type=\"button\"\n label={resetButton.label.value}\n disabled={!isEdited || isSubmitting}\n className=\"ml-auto\"\n Icon={RotateCcw}\n variant=\"outline\"\n color=\"text\"\n isFullWidth\n isLoading={isSubmitting}\n onClick={() => restoreEditedContent(dictionary.key)}\n >\n {resetButton.text}\n </Form.Button>\n )}\n {isLocalDictionary ? (\n <Form.Button\n type=\"submit\"\n label={publishButton.label.value}\n disabled={!isEdited || isSubmitting}\n Icon={ArrowUpFromLine}\n color=\"text\"\n isFullWidth\n isLoading={isSubmitting}\n >\n {publishButton.text}\n </Form.Button>\n ) : (\n isEdited && (\n <Form.Button\n type=\"submit\"\n label={saveButton.label.value}\n disabled={!isEdited || isSubmitting}\n Icon={Save}\n color=\"text\"\n isFullWidth\n isLoading={isSubmitting}\n >\n {saveButton.text}\n </Form.Button>\n )\n )}\n </Form>\n </div>\n );\n};\n"],"names":["getValidDictionaryChangeButtonsSchemaSchema","useDictionary","validDictionaryChangeButtonsContent","usePushDictionaries","useEditedContentStore","useShallow","useForm","useMemo","jsx","jsxs","Form","RotateCcw","ArrowUpFromLine","Save"],"mappings":";;;;;;;;;;;;;;;;;;;AAmBO,MAAM,+BAET,CAAC,EAAE,iBAAiB;AACtB,QAAM,2CACJA,+DAAAA,4CAA4C;AAE9C,QAAM,EAAE,aAAa,YAAY,cAAkB,IAAAC,cAAA;AAAA,IACjDC,iEAAAA;AAAAA,EACF;AAEM,QAAA,EAAE,iBAAiB,IAAIC,2CAAoB;AAE3C,QAAA,EAAE,eAAe,qBAAA,IAAyBC,kDAAA;AAAA,IAC9CC,QAAA,WAAW,CAAC,OAAO;AAAA,MACjB,eAAe,EAAE;AAAA,MACjB,sBAAsB,EAAE;AAAA,IAAA,EACxB;AAAA,EACJ;AACM,QAAA,EAAE,MAAM,aAAA,IAAiBC,yBAAA;AAAA,IAC7B;AAAA,EACF;AAEA,QAAM,mBAAmBC,WAAA;AAAA,IACvB,MAAM,cAAc,WAAW,GAAG;AAAA,IAClC,CAAC,eAAe,WAAW,GAAG;AAAA,EAChC;AAEA,QAAM,WAAWA,WAAA;AAAA,IACf,MACE,oBACA,KAAK,UAAU,kBAAkB,OAAO,MACtC,KAAK,UAAU,YAAY,OAAO;AAAA,IACtC,CAAC,kBAAkB,UAAU;AAAA,EAC/B;AAEA,QAAM,oBAAoBA,WAAA;AAAA,IACxB,MAAM,OAAQ,YAAkC,QAAQ;AAAA,IACxD,CAAC,UAAU;AAAA,EACb;AAEA,QAAM,kBAAkB,YAAY;AAClC,UAAM,iBAAiB;AAAA,MACrB;AAAA,QACE,GAAG;AAAA,QACH,GAAG,cAAc,WAAW,GAAG;AAAA,MAAA;AAAA,IACjC,CACD;AAAA,EACH;AAGE,SAAAC,2BAAAA,kBAAAA,IAAC,OAAI,EAAA,WAAU,QACb,UAAAC,2BAAA,kBAAA;AAAA,IAACC,sCAAA;AAAA,IAAA;AAAA,MACC,WAAU;AAAA,MACT,GAAG;AAAA,MACJ,QAAQ;AAAA,MACR;AAAA,MAEC,UAAA;AAAA,QACC,YAAAF,2BAAA,kBAAA;AAAA,UAACE,sCAAAA,KAAK;AAAA,UAAL;AAAA,YACC,MAAK;AAAA,YACL,OAAO,YAAY,MAAM;AAAA,YACzB,UAAU,CAAC,YAAY;AAAA,YACvB,WAAU;AAAA,YACV,MAAMC,YAAA;AAAA,YACN,SAAQ;AAAA,YACR,OAAM;AAAA,YACN,aAAW;AAAA,YACX,WAAW;AAAA,YACX,SAAS,MAAM,qBAAqB,WAAW,GAAG;AAAA,YAEjD,UAAY,YAAA;AAAA,UAAA;AAAA,QACf;AAAA,QAED,oBACCH,2BAAA,kBAAA;AAAA,UAACE,sCAAAA,KAAK;AAAA,UAAL;AAAA,YACC,MAAK;AAAA,YACL,OAAO,cAAc,MAAM;AAAA,YAC3B,UAAU,CAAC,YAAY;AAAA,YACvB,MAAME,YAAA;AAAA,YACN,OAAM;AAAA,YACN,aAAW;AAAA,YACX,WAAW;AAAA,YAEV,UAAc,cAAA;AAAA,UAAA;AAAA,YAGjB,YACEJ,2BAAA,kBAAA;AAAA,UAACE,sCAAAA,KAAK;AAAA,UAAL;AAAA,YACC,MAAK;AAAA,YACL,OAAO,WAAW,MAAM;AAAA,YACxB,UAAU,CAAC,YAAY;AAAA,YACvB,MAAMG,YAAA;AAAA,YACN,OAAM;AAAA,YACN,aAAW;AAAA,YACX,WAAW;AAAA,YAEV,UAAW,WAAA;AAAA,UAAA;AAAA,QAAA;AAAA,MACd;AAAA,IAAA;AAAA,EAAA,GAIR;AAEJ;;"}
1
+ {"version":3,"file":"ValidDictionaryChangeButtons.cjs","sources":["../../../src/components/DictionaryEditor/ValidDictionaryChangeButtons.tsx"],"sourcesContent":["'use client';\n\nimport { Dictionary as DistantDictionary } from '@intlayer/backend';\nimport type { Dictionary } from '@intlayer/core';\nimport { ArrowUpFromLine, RotateCcw, Save } 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 { usePushDictionaries } from '../../hooks';\nimport { Form, useForm } from '../Form';\nimport { useEditedContentStore } from './useEditedContentStore';\nimport { validDictionaryChangeButtonsContent } from './validDictionaryChangeButtons.content';\nimport { getValidDictionaryChangeButtonsSchemaSchema } from './validDictionaryChangeButtonsSchema';\n\ntype ValidDictionaryChangeButtonsProps = {\n dictionary: Dictionary;\n};\n\nexport const ValidDictionaryChangeButtons: FC<\n ValidDictionaryChangeButtonsProps\n> = ({ dictionary }) => {\n const ValidDictionaryChangeButtonsSchemaSchema =\n getValidDictionaryChangeButtonsSchemaSchema();\n\n const { resetButton, saveButton, publishButton } = useDictionary(\n validDictionaryChangeButtonsContent\n );\n\n const { pushDictionaries } = usePushDictionaries();\n\n const { editedContent, restoreEditedContent } = useEditedContentStore(\n useShallow((s) => ({\n editedContent: s.editedContent,\n restoreEditedContent: s.restoreEditedContent,\n }))\n );\n const { form, isSubmitting } = useForm(\n ValidDictionaryChangeButtonsSchemaSchema\n );\n\n const editedDictionary = useMemo(\n () => editedContent[dictionary.key],\n [editedContent, dictionary.key]\n );\n\n const isEdited = useMemo(\n () =>\n editedDictionary &&\n JSON.stringify(editedDictionary?.content) !==\n JSON.stringify(dictionary?.content),\n [editedDictionary, dictionary]\n );\n\n const isLocalDictionary = useMemo(\n () => typeof (dictionary as DistantDictionary)?._id === 'undefined',\n [dictionary]\n );\n\n const onSubmitSuccess = async () => {\n await pushDictionaries([\n {\n ...dictionary,\n ...editedContent[dictionary.key],\n },\n ]);\n };\n\n return (\n <div className=\"mb-4\">\n <Form\n className=\"flex w-full flex-row flex-wrap justify-end gap-3\"\n {...form}\n schema={ValidDictionaryChangeButtonsSchemaSchema}\n onSubmitSuccess={onSubmitSuccess}\n >\n {isEdited && (\n <Form.Button\n type=\"button\"\n label={resetButton.label}\n disabled={!isEdited || isSubmitting}\n className=\"ml-auto\"\n Icon={RotateCcw}\n variant=\"outline\"\n color=\"text\"\n isFullWidth\n isLoading={isSubmitting}\n onClick={() => restoreEditedContent(dictionary.key)}\n >\n {resetButton.text}\n </Form.Button>\n )}\n {isLocalDictionary ? (\n <Form.Button\n type=\"submit\"\n label={publishButton.label}\n disabled={!isEdited || isSubmitting}\n Icon={ArrowUpFromLine}\n color=\"text\"\n isFullWidth\n isLoading={isSubmitting}\n >\n {publishButton.text}\n </Form.Button>\n ) : (\n isEdited && (\n <Form.Button\n type=\"submit\"\n label={saveButton.label}\n disabled={!isEdited || isSubmitting}\n Icon={Save}\n color=\"text\"\n isFullWidth\n isLoading={isSubmitting}\n >\n {saveButton.text}\n </Form.Button>\n )\n )}\n </Form>\n </div>\n );\n};\n"],"names":["getValidDictionaryChangeButtonsSchemaSchema","useDictionary","validDictionaryChangeButtonsContent","usePushDictionaries","useEditedContentStore","useShallow","useForm","useMemo","jsx","jsxs","Form","RotateCcw","ArrowUpFromLine","Save"],"mappings":";;;;;;;;;;;;;;;;;;;AAmBO,MAAM,+BAET,CAAC,EAAE,iBAAiB;AACtB,QAAM,2CACJA,+DAAAA,4CAA4C;AAE9C,QAAM,EAAE,aAAa,YAAY,cAAkB,IAAAC,cAAA;AAAA,IACjDC,iEAAAA;AAAAA,EACF;AAEM,QAAA,EAAE,iBAAiB,IAAIC,2CAAoB;AAE3C,QAAA,EAAE,eAAe,qBAAA,IAAyBC,kDAAA;AAAA,IAC9CC,QAAA,WAAW,CAAC,OAAO;AAAA,MACjB,eAAe,EAAE;AAAA,MACjB,sBAAsB,EAAE;AAAA,IAAA,EACxB;AAAA,EACJ;AACM,QAAA,EAAE,MAAM,aAAA,IAAiBC,yBAAA;AAAA,IAC7B;AAAA,EACF;AAEA,QAAM,mBAAmBC,WAAA;AAAA,IACvB,MAAM,cAAc,WAAW,GAAG;AAAA,IAClC,CAAC,eAAe,WAAW,GAAG;AAAA,EAChC;AAEA,QAAM,WAAWA,WAAA;AAAA,IACf,MACE,oBACA,KAAK,UAAU,kBAAkB,OAAO,MACtC,KAAK,UAAU,YAAY,OAAO;AAAA,IACtC,CAAC,kBAAkB,UAAU;AAAA,EAC/B;AAEA,QAAM,oBAAoBA,WAAA;AAAA,IACxB,MAAM,OAAQ,YAAkC,QAAQ;AAAA,IACxD,CAAC,UAAU;AAAA,EACb;AAEA,QAAM,kBAAkB,YAAY;AAClC,UAAM,iBAAiB;AAAA,MACrB;AAAA,QACE,GAAG;AAAA,QACH,GAAG,cAAc,WAAW,GAAG;AAAA,MAAA;AAAA,IACjC,CACD;AAAA,EACH;AAGE,SAAAC,2BAAAA,kBAAAA,IAAC,OAAI,EAAA,WAAU,QACb,UAAAC,2BAAA,kBAAA;AAAA,IAACC,sCAAA;AAAA,IAAA;AAAA,MACC,WAAU;AAAA,MACT,GAAG;AAAA,MACJ,QAAQ;AAAA,MACR;AAAA,MAEC,UAAA;AAAA,QACC,YAAAF,2BAAA,kBAAA;AAAA,UAACE,sCAAAA,KAAK;AAAA,UAAL;AAAA,YACC,MAAK;AAAA,YACL,OAAO,YAAY;AAAA,YACnB,UAAU,CAAC,YAAY;AAAA,YACvB,WAAU;AAAA,YACV,MAAMC,YAAA;AAAA,YACN,SAAQ;AAAA,YACR,OAAM;AAAA,YACN,aAAW;AAAA,YACX,WAAW;AAAA,YACX,SAAS,MAAM,qBAAqB,WAAW,GAAG;AAAA,YAEjD,UAAY,YAAA;AAAA,UAAA;AAAA,QACf;AAAA,QAED,oBACCH,2BAAA,kBAAA;AAAA,UAACE,sCAAAA,KAAK;AAAA,UAAL;AAAA,YACC,MAAK;AAAA,YACL,OAAO,cAAc;AAAA,YACrB,UAAU,CAAC,YAAY;AAAA,YACvB,MAAME,YAAA;AAAA,YACN,OAAM;AAAA,YACN,aAAW;AAAA,YACX,WAAW;AAAA,YAEV,UAAc,cAAA;AAAA,UAAA;AAAA,YAGjB,YACEJ,2BAAA,kBAAA;AAAA,UAACE,sCAAAA,KAAK;AAAA,UAAL;AAAA,YACC,MAAK;AAAA,YACL,OAAO,WAAW;AAAA,YAClB,UAAU,CAAC,YAAY;AAAA,YACvB,MAAMG,YAAA;AAAA,YACN,OAAM;AAAA,YACN,aAAW;AAAA,YACX,WAAW;AAAA,YAEV,UAAW,WAAA;AAAA,UAAA;AAAA,QAAA;AAAA,MACd;AAAA,IAAA;AAAA,EAAA,GAIR;AAEJ;;"}
@@ -11,7 +11,7 @@ import "@intlayer/dictionaries-entry";
11
11
  import "deepmerge";
12
12
  import { useForm } from "../Form/FormBase.mjs";
13
13
  import "../Form/FormField.mjs";
14
- import { F as Form } from "../../Form-DhsgC7kB.js";
14
+ import { F as Form } from "../../Form-OK9zfg6E.js";
15
15
  import { useEditedContentStore } from "./useEditedContentStore.mjs";
16
16
  import { validDictionaryChangeButtonsContent } from "./validDictionaryChangeButtons.content.mjs";
17
17
  import { getValidDictionaryChangeButtonsSchemaSchema } from "./validDictionaryChangeButtonsSchema.mjs";
@@ -62,7 +62,7 @@ const ValidDictionaryChangeButtons = ({ dictionary }) => {
62
62
  Form.Button,
63
63
  {
64
64
  type: "button",
65
- label: resetButton.label.value,
65
+ label: resetButton.label,
66
66
  disabled: !isEdited || isSubmitting,
67
67
  className: "ml-auto",
68
68
  Icon: RotateCcw,
@@ -78,7 +78,7 @@ const ValidDictionaryChangeButtons = ({ dictionary }) => {
78
78
  Form.Button,
79
79
  {
80
80
  type: "submit",
81
- label: publishButton.label.value,
81
+ label: publishButton.label,
82
82
  disabled: !isEdited || isSubmitting,
83
83
  Icon: ArrowUpFromLine,
84
84
  color: "text",
@@ -90,7 +90,7 @@ const ValidDictionaryChangeButtons = ({ dictionary }) => {
90
90
  Form.Button,
91
91
  {
92
92
  type: "submit",
93
- label: saveButton.label.value,
93
+ label: saveButton.label,
94
94
  disabled: !isEdited || isSubmitting,
95
95
  Icon: Save,
96
96
  color: "text",
@@ -1 +1 @@
1
- {"version":3,"file":"ValidDictionaryChangeButtons.mjs","sources":["../../../src/components/DictionaryEditor/ValidDictionaryChangeButtons.tsx"],"sourcesContent":["'use client';\n\nimport { Dictionary as DistantDictionary } from '@intlayer/backend';\nimport type { Dictionary } from '@intlayer/core';\nimport { ArrowUpFromLine, RotateCcw, Save } 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 { usePushDictionaries } from '../../hooks';\nimport { Form, useForm } from '../Form';\nimport { useEditedContentStore } from './useEditedContentStore';\nimport { validDictionaryChangeButtonsContent } from './validDictionaryChangeButtons.content';\nimport { getValidDictionaryChangeButtonsSchemaSchema } from './validDictionaryChangeButtonsSchema';\n\ntype ValidDictionaryChangeButtonsProps = {\n dictionary: Dictionary;\n};\n\nexport const ValidDictionaryChangeButtons: FC<\n ValidDictionaryChangeButtonsProps\n> = ({ dictionary }) => {\n const ValidDictionaryChangeButtonsSchemaSchema =\n getValidDictionaryChangeButtonsSchemaSchema();\n\n const { resetButton, saveButton, publishButton } = useDictionary(\n validDictionaryChangeButtonsContent\n );\n\n const { pushDictionaries } = usePushDictionaries();\n\n const { editedContent, restoreEditedContent } = useEditedContentStore(\n useShallow((s) => ({\n editedContent: s.editedContent,\n restoreEditedContent: s.restoreEditedContent,\n }))\n );\n const { form, isSubmitting } = useForm(\n ValidDictionaryChangeButtonsSchemaSchema\n );\n\n const editedDictionary = useMemo(\n () => editedContent[dictionary.key],\n [editedContent, dictionary.key]\n );\n\n const isEdited = useMemo(\n () =>\n editedDictionary &&\n JSON.stringify(editedDictionary?.content) !==\n JSON.stringify(dictionary?.content),\n [editedDictionary, dictionary]\n );\n\n const isLocalDictionary = useMemo(\n () => typeof (dictionary as DistantDictionary)?._id === 'undefined',\n [dictionary]\n );\n\n const onSubmitSuccess = async () => {\n await pushDictionaries([\n {\n ...dictionary,\n ...editedContent[dictionary.key],\n },\n ]);\n };\n\n return (\n <div className=\"mb-4\">\n <Form\n className=\"flex w-full flex-row flex-wrap justify-end gap-3\"\n {...form}\n schema={ValidDictionaryChangeButtonsSchemaSchema}\n onSubmitSuccess={onSubmitSuccess}\n >\n {isEdited && (\n <Form.Button\n type=\"button\"\n label={resetButton.label.value}\n disabled={!isEdited || isSubmitting}\n className=\"ml-auto\"\n Icon={RotateCcw}\n variant=\"outline\"\n color=\"text\"\n isFullWidth\n isLoading={isSubmitting}\n onClick={() => restoreEditedContent(dictionary.key)}\n >\n {resetButton.text}\n </Form.Button>\n )}\n {isLocalDictionary ? (\n <Form.Button\n type=\"submit\"\n label={publishButton.label.value}\n disabled={!isEdited || isSubmitting}\n Icon={ArrowUpFromLine}\n color=\"text\"\n isFullWidth\n isLoading={isSubmitting}\n >\n {publishButton.text}\n </Form.Button>\n ) : (\n isEdited && (\n <Form.Button\n type=\"submit\"\n label={saveButton.label.value}\n disabled={!isEdited || isSubmitting}\n Icon={Save}\n color=\"text\"\n isFullWidth\n isLoading={isSubmitting}\n >\n {saveButton.text}\n </Form.Button>\n )\n )}\n </Form>\n </div>\n );\n};\n"],"names":["jsx","jsxs"],"mappings":";;;;;;;;;;;;;;;;;AAmBO,MAAM,+BAET,CAAC,EAAE,iBAAiB;AACtB,QAAM,2CACJ,4CAA4C;AAE9C,QAAM,EAAE,aAAa,YAAY,cAAkB,IAAA;AAAA,IACjD;AAAA,EACF;AAEM,QAAA,EAAE,iBAAiB,IAAI,oBAAoB;AAE3C,QAAA,EAAE,eAAe,qBAAA,IAAyB;AAAA,IAC9C,WAAW,CAAC,OAAO;AAAA,MACjB,eAAe,EAAE;AAAA,MACjB,sBAAsB,EAAE;AAAA,IAAA,EACxB;AAAA,EACJ;AACM,QAAA,EAAE,MAAM,aAAA,IAAiB;AAAA,IAC7B;AAAA,EACF;AAEA,QAAM,mBAAmB;AAAA,IACvB,MAAM,cAAc,WAAW,GAAG;AAAA,IAClC,CAAC,eAAe,WAAW,GAAG;AAAA,EAChC;AAEA,QAAM,WAAW;AAAA,IACf,MACE,oBACA,KAAK,UAAU,kBAAkB,OAAO,MACtC,KAAK,UAAU,YAAY,OAAO;AAAA,IACtC,CAAC,kBAAkB,UAAU;AAAA,EAC/B;AAEA,QAAM,oBAAoB;AAAA,IACxB,MAAM,OAAQ,YAAkC,QAAQ;AAAA,IACxD,CAAC,UAAU;AAAA,EACb;AAEA,QAAM,kBAAkB,YAAY;AAClC,UAAM,iBAAiB;AAAA,MACrB;AAAA,QACE,GAAG;AAAA,QACH,GAAG,cAAc,WAAW,GAAG;AAAA,MAAA;AAAA,IACjC,CACD;AAAA,EACH;AAGE,SAAAA,kCAAAA,IAAC,OAAI,EAAA,WAAU,QACb,UAAAC,kCAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAU;AAAA,MACT,GAAG;AAAA,MACJ,QAAQ;AAAA,MACR;AAAA,MAEC,UAAA;AAAA,QACC,YAAAD,kCAAA;AAAA,UAAC,KAAK;AAAA,UAAL;AAAA,YACC,MAAK;AAAA,YACL,OAAO,YAAY,MAAM;AAAA,YACzB,UAAU,CAAC,YAAY;AAAA,YACvB,WAAU;AAAA,YACV,MAAM;AAAA,YACN,SAAQ;AAAA,YACR,OAAM;AAAA,YACN,aAAW;AAAA,YACX,WAAW;AAAA,YACX,SAAS,MAAM,qBAAqB,WAAW,GAAG;AAAA,YAEjD,UAAY,YAAA;AAAA,UAAA;AAAA,QACf;AAAA,QAED,oBACCA,kCAAA;AAAA,UAAC,KAAK;AAAA,UAAL;AAAA,YACC,MAAK;AAAA,YACL,OAAO,cAAc,MAAM;AAAA,YAC3B,UAAU,CAAC,YAAY;AAAA,YACvB,MAAM;AAAA,YACN,OAAM;AAAA,YACN,aAAW;AAAA,YACX,WAAW;AAAA,YAEV,UAAc,cAAA;AAAA,UAAA;AAAA,YAGjB,YACEA,kCAAA;AAAA,UAAC,KAAK;AAAA,UAAL;AAAA,YACC,MAAK;AAAA,YACL,OAAO,WAAW,MAAM;AAAA,YACxB,UAAU,CAAC,YAAY;AAAA,YACvB,MAAM;AAAA,YACN,OAAM;AAAA,YACN,aAAW;AAAA,YACX,WAAW;AAAA,YAEV,UAAW,WAAA;AAAA,UAAA;AAAA,QAAA;AAAA,MACd;AAAA,IAAA;AAAA,EAAA,GAIR;AAEJ;"}
1
+ {"version":3,"file":"ValidDictionaryChangeButtons.mjs","sources":["../../../src/components/DictionaryEditor/ValidDictionaryChangeButtons.tsx"],"sourcesContent":["'use client';\n\nimport { Dictionary as DistantDictionary } from '@intlayer/backend';\nimport type { Dictionary } from '@intlayer/core';\nimport { ArrowUpFromLine, RotateCcw, Save } 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 { usePushDictionaries } from '../../hooks';\nimport { Form, useForm } from '../Form';\nimport { useEditedContentStore } from './useEditedContentStore';\nimport { validDictionaryChangeButtonsContent } from './validDictionaryChangeButtons.content';\nimport { getValidDictionaryChangeButtonsSchemaSchema } from './validDictionaryChangeButtonsSchema';\n\ntype ValidDictionaryChangeButtonsProps = {\n dictionary: Dictionary;\n};\n\nexport const ValidDictionaryChangeButtons: FC<\n ValidDictionaryChangeButtonsProps\n> = ({ dictionary }) => {\n const ValidDictionaryChangeButtonsSchemaSchema =\n getValidDictionaryChangeButtonsSchemaSchema();\n\n const { resetButton, saveButton, publishButton } = useDictionary(\n validDictionaryChangeButtonsContent\n );\n\n const { pushDictionaries } = usePushDictionaries();\n\n const { editedContent, restoreEditedContent } = useEditedContentStore(\n useShallow((s) => ({\n editedContent: s.editedContent,\n restoreEditedContent: s.restoreEditedContent,\n }))\n );\n const { form, isSubmitting } = useForm(\n ValidDictionaryChangeButtonsSchemaSchema\n );\n\n const editedDictionary = useMemo(\n () => editedContent[dictionary.key],\n [editedContent, dictionary.key]\n );\n\n const isEdited = useMemo(\n () =>\n editedDictionary &&\n JSON.stringify(editedDictionary?.content) !==\n JSON.stringify(dictionary?.content),\n [editedDictionary, dictionary]\n );\n\n const isLocalDictionary = useMemo(\n () => typeof (dictionary as DistantDictionary)?._id === 'undefined',\n [dictionary]\n );\n\n const onSubmitSuccess = async () => {\n await pushDictionaries([\n {\n ...dictionary,\n ...editedContent[dictionary.key],\n },\n ]);\n };\n\n return (\n <div className=\"mb-4\">\n <Form\n className=\"flex w-full flex-row flex-wrap justify-end gap-3\"\n {...form}\n schema={ValidDictionaryChangeButtonsSchemaSchema}\n onSubmitSuccess={onSubmitSuccess}\n >\n {isEdited && (\n <Form.Button\n type=\"button\"\n label={resetButton.label}\n disabled={!isEdited || isSubmitting}\n className=\"ml-auto\"\n Icon={RotateCcw}\n variant=\"outline\"\n color=\"text\"\n isFullWidth\n isLoading={isSubmitting}\n onClick={() => restoreEditedContent(dictionary.key)}\n >\n {resetButton.text}\n </Form.Button>\n )}\n {isLocalDictionary ? (\n <Form.Button\n type=\"submit\"\n label={publishButton.label}\n disabled={!isEdited || isSubmitting}\n Icon={ArrowUpFromLine}\n color=\"text\"\n isFullWidth\n isLoading={isSubmitting}\n >\n {publishButton.text}\n </Form.Button>\n ) : (\n isEdited && (\n <Form.Button\n type=\"submit\"\n label={saveButton.label}\n disabled={!isEdited || isSubmitting}\n Icon={Save}\n color=\"text\"\n isFullWidth\n isLoading={isSubmitting}\n >\n {saveButton.text}\n </Form.Button>\n )\n )}\n </Form>\n </div>\n );\n};\n"],"names":["jsx","jsxs"],"mappings":";;;;;;;;;;;;;;;;;AAmBO,MAAM,+BAET,CAAC,EAAE,iBAAiB;AACtB,QAAM,2CACJ,4CAA4C;AAE9C,QAAM,EAAE,aAAa,YAAY,cAAkB,IAAA;AAAA,IACjD;AAAA,EACF;AAEM,QAAA,EAAE,iBAAiB,IAAI,oBAAoB;AAE3C,QAAA,EAAE,eAAe,qBAAA,IAAyB;AAAA,IAC9C,WAAW,CAAC,OAAO;AAAA,MACjB,eAAe,EAAE;AAAA,MACjB,sBAAsB,EAAE;AAAA,IAAA,EACxB;AAAA,EACJ;AACM,QAAA,EAAE,MAAM,aAAA,IAAiB;AAAA,IAC7B;AAAA,EACF;AAEA,QAAM,mBAAmB;AAAA,IACvB,MAAM,cAAc,WAAW,GAAG;AAAA,IAClC,CAAC,eAAe,WAAW,GAAG;AAAA,EAChC;AAEA,QAAM,WAAW;AAAA,IACf,MACE,oBACA,KAAK,UAAU,kBAAkB,OAAO,MACtC,KAAK,UAAU,YAAY,OAAO;AAAA,IACtC,CAAC,kBAAkB,UAAU;AAAA,EAC/B;AAEA,QAAM,oBAAoB;AAAA,IACxB,MAAM,OAAQ,YAAkC,QAAQ;AAAA,IACxD,CAAC,UAAU;AAAA,EACb;AAEA,QAAM,kBAAkB,YAAY;AAClC,UAAM,iBAAiB;AAAA,MACrB;AAAA,QACE,GAAG;AAAA,QACH,GAAG,cAAc,WAAW,GAAG;AAAA,MAAA;AAAA,IACjC,CACD;AAAA,EACH;AAGE,SAAAA,kCAAAA,IAAC,OAAI,EAAA,WAAU,QACb,UAAAC,kCAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAU;AAAA,MACT,GAAG;AAAA,MACJ,QAAQ;AAAA,MACR;AAAA,MAEC,UAAA;AAAA,QACC,YAAAD,kCAAA;AAAA,UAAC,KAAK;AAAA,UAAL;AAAA,YACC,MAAK;AAAA,YACL,OAAO,YAAY;AAAA,YACnB,UAAU,CAAC,YAAY;AAAA,YACvB,WAAU;AAAA,YACV,MAAM;AAAA,YACN,SAAQ;AAAA,YACR,OAAM;AAAA,YACN,aAAW;AAAA,YACX,WAAW;AAAA,YACX,SAAS,MAAM,qBAAqB,WAAW,GAAG;AAAA,YAEjD,UAAY,YAAA;AAAA,UAAA;AAAA,QACf;AAAA,QAED,oBACCA,kCAAA;AAAA,UAAC,KAAK;AAAA,UAAL;AAAA,YACC,MAAK;AAAA,YACL,OAAO,cAAc;AAAA,YACrB,UAAU,CAAC,YAAY;AAAA,YACvB,MAAM;AAAA,YACN,OAAM;AAAA,YACN,aAAW;AAAA,YACX,WAAW;AAAA,YAEV,UAAc,cAAA;AAAA,UAAA;AAAA,YAGjB,YACEA,kCAAA;AAAA,UAAC,KAAK;AAAA,UAAL;AAAA,YACC,MAAK;AAAA,YACL,OAAO,WAAW;AAAA,YAClB,UAAU,CAAC,YAAY;AAAA,YACvB,MAAM;AAAA,YACN,OAAM;AAAA,YACN,aAAW;AAAA,YACX,WAAW;AAAA,YAEV,UAAW,WAAA;AAAA,UAAA;AAAA,QAAA;AAAA,MACd;AAAA,IAAA;AAAA,EAAA,GAIR;AAEJ;"}
@@ -22,7 +22,7 @@ require("../../EditableField/EditableFieldInput.cjs");
22
22
  require("../../EditableField/EditableFieldTextArea.cjs");
23
23
  require("../../Form/FormBase.cjs");
24
24
  require("../../Form/FormField.cjs");
25
- require("../../../Form-BDcoNTLV.cjs");
25
+ require("../../../Form-7BqwvjVI.cjs");
26
26
  require("../../DictionaryEditor/validDictionaryChangeButtons.content.cjs");
27
27
  require("zod");
28
28
  const components_Loader_index = require("../../Loader/index.cjs");
@@ -30,7 +30,8 @@ const components_DictionaryFieldEditor_DictionaryFieldEditor = require("../Dicti
30
30
  const components_DictionaryFieldEditor_DictionariesSelector_dictionariesSelector_content = require("./dictionariesSelector.content.cjs");
31
31
  const DictionariesSelector = ({
32
32
  onClickDictionaryList,
33
- isDarkMode
33
+ isDarkMode,
34
+ availableLocales
34
35
  }) => {
35
36
  const { online, locale, isLoading } = hooks_useGetAllDictionaries.useGetAllDictionaries();
36
37
  const { focusedContent } = components_DictionaryEditor_useEditionPanelStore.useEditionPanelStore(
@@ -53,7 +54,8 @@ const DictionariesSelector = ({
53
54
  {
54
55
  dictionary,
55
56
  onClickDictionaryList,
56
- isDarkMode
57
+ isDarkMode,
58
+ availableLocales
57
59
  }
58
60
  );
59
61
  };
@@ -1 +1 @@
1
- {"version":3,"file":"DictionariesSelector.cjs","sources":["../../../../src/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.tsx"],"sourcesContent":["'use client';\n\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 { useGetAllDictionaries } from '../../../hooks';\nimport { useEditionPanelStore } from '../../DictionaryEditor';\nimport { Loader } from '../../Loader';\nimport { DictionaryFieldEditor } from '../DictionaryFieldEditor';\nimport { dictionariesSelectorContent } from './dictionariesSelector.content';\n\ntype DictionariesSelectorProps = {\n onClickDictionaryList: () => void;\n isDarkMode?: boolean;\n};\n\nexport const DictionariesSelector: FC<DictionariesSelectorProps> = ({\n onClickDictionaryList,\n isDarkMode,\n}) => {\n const { online, locale, isLoading } = useGetAllDictionaries();\n const { focusedContent } = useEditionPanelStore(\n useShallow((s) => ({\n focusedContent: s.focusedContent,\n }))\n );\n const { noDictionaryMessage, dictionaryNotFoundMessage } = useDictionary(\n dictionariesSelectorContent\n );\n const dictionary = useMemo(\n () =>\n focusedContent?.dictionaryKey\n ? (online?.[focusedContent?.dictionaryKey] ??\n locale?.[focusedContent?.dictionaryKey])\n : null,\n [online, locale, focusedContent?.dictionaryKey]\n );\n\n if (isLoading) return <Loader />;\n\n if (!focusedContent?.dictionaryKey) return noDictionaryMessage;\n\n if (!dictionary) return dictionaryNotFoundMessage;\n\n return (\n <DictionaryFieldEditor\n dictionary={dictionary}\n onClickDictionaryList={onClickDictionaryList}\n isDarkMode={isDarkMode}\n />\n );\n};\n"],"names":["useGetAllDictionaries","useEditionPanelStore","useShallow","useDictionary","dictionariesSelectorContent","useMemo","jsx","Loader","DictionaryFieldEditor"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBO,MAAM,uBAAsD,CAAC;AAAA,EAClE;AAAA,EACA;AACF,MAAM;AACJ,QAAM,EAAE,QAAQ,QAAQ,UAAA,IAAcA,4BAAAA,sBAAsB;AACtD,QAAA,EAAE,mBAAmBC,iDAAA;AAAA,IACzBC,QAAA,WAAW,CAAC,OAAO;AAAA,MACjB,gBAAgB,EAAE;AAAA,IAAA,EAClB;AAAA,EACJ;AACM,QAAA,EAAE,qBAAqB,0BAAA,IAA8BC,cAAA;AAAA,IACzDC,mFAAAA;AAAAA,EACF;AACA,QAAM,aAAaC,WAAA;AAAA,IACjB,MACE,gBAAgB,gBACX,SAAS,gBAAgB,aAAa,KACvC,SAAS,gBAAgB,aAAa,IACtC;AAAA,IACN,CAAC,QAAQ,QAAQ,gBAAgB,aAAa;AAAA,EAChD;AAEI,MAAA,UAAkB,QAAAC,iDAACC,wBAAAA,QAAO,CAAA,CAAA;AAE1B,MAAA,CAAC,gBAAgB,cAAsB,QAAA;AAEvC,MAAA,CAAC,WAAmB,QAAA;AAGtB,SAAAD,2BAAA,kBAAA;AAAA,IAACE,uDAAA;AAAA,IAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,IAAA;AAAA,EACF;AAEJ;;"}
1
+ {"version":3,"file":"DictionariesSelector.cjs","sources":["../../../../src/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.tsx"],"sourcesContent":["'use client';\n\nimport { Locales } from '@intlayer/config';\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 { useGetAllDictionaries } from '../../../hooks';\nimport { useEditionPanelStore } from '../../DictionaryEditor';\nimport { Loader } from '../../Loader';\nimport { DictionaryFieldEditor } from '../DictionaryFieldEditor';\nimport { dictionariesSelectorContent } from './dictionariesSelector.content';\n\ntype DictionariesSelectorProps = {\n onClickDictionaryList: () => void;\n isDarkMode?: boolean;\n availableLocales: Locales[];\n};\n\nexport const DictionariesSelector: FC<DictionariesSelectorProps> = ({\n onClickDictionaryList,\n isDarkMode,\n availableLocales,\n}) => {\n const { online, locale, isLoading } = useGetAllDictionaries();\n const { focusedContent } = useEditionPanelStore(\n useShallow((s) => ({\n focusedContent: s.focusedContent,\n }))\n );\n const { noDictionaryMessage, dictionaryNotFoundMessage } = useDictionary(\n dictionariesSelectorContent\n );\n const dictionary = useMemo(\n () =>\n focusedContent?.dictionaryKey\n ? (online?.[focusedContent?.dictionaryKey] ??\n locale?.[focusedContent?.dictionaryKey])\n : null,\n [online, locale, focusedContent?.dictionaryKey]\n );\n\n if (isLoading) return <Loader />;\n\n if (!focusedContent?.dictionaryKey) return noDictionaryMessage;\n\n if (!dictionary) return dictionaryNotFoundMessage;\n\n return (\n <DictionaryFieldEditor\n dictionary={dictionary}\n onClickDictionaryList={onClickDictionaryList}\n isDarkMode={isDarkMode}\n availableLocales={availableLocales}\n />\n );\n};\n"],"names":["useGetAllDictionaries","useEditionPanelStore","useShallow","useDictionary","dictionariesSelectorContent","useMemo","jsx","Loader","DictionaryFieldEditor"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmBO,MAAM,uBAAsD,CAAC;AAAA,EAClE;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,EAAE,QAAQ,QAAQ,UAAA,IAAcA,4BAAAA,sBAAsB;AACtD,QAAA,EAAE,mBAAmBC,iDAAA;AAAA,IACzBC,QAAA,WAAW,CAAC,OAAO;AAAA,MACjB,gBAAgB,EAAE;AAAA,IAAA,EAClB;AAAA,EACJ;AACM,QAAA,EAAE,qBAAqB,0BAAA,IAA8BC,cAAA;AAAA,IACzDC,mFAAAA;AAAAA,EACF;AACA,QAAM,aAAaC,WAAA;AAAA,IACjB,MACE,gBAAgB,gBACX,SAAS,gBAAgB,aAAa,KACvC,SAAS,gBAAgB,aAAa,IACtC;AAAA,IACN,CAAC,QAAQ,QAAQ,gBAAgB,aAAa;AAAA,EAChD;AAEI,MAAA,UAAkB,QAAAC,iDAACC,wBAAAA,QAAO,CAAA,CAAA;AAE1B,MAAA,CAAC,gBAAgB,cAAsB,QAAA;AAEvC,MAAA,CAAC,WAAmB,QAAA;AAGtB,SAAAD,2BAAA,kBAAA;AAAA,IAACE,uDAAA;AAAA,IAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IAAA;AAAA,EACF;AAEJ;;"}
@@ -1,7 +1,9 @@
1
+ import { Locales } from '@intlayer/config';
1
2
  import { FC } from 'react';
2
3
  type DictionariesSelectorProps = {
3
4
  onClickDictionaryList: () => void;
4
5
  isDarkMode?: boolean;
6
+ availableLocales: Locales[];
5
7
  };
6
8
  export declare const DictionariesSelector: FC<DictionariesSelectorProps>;
7
9
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"DictionariesSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAW,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAUzC,KAAK,yBAAyB,GAAG;IAC/B,qBAAqB,EAAE,MAAM,IAAI,CAAC;IAClC,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,EAAE,CAAC,yBAAyB,CAmC9D,CAAC"}
1
+ {"version":3,"file":"DictionariesSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAW,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAUzC,KAAK,yBAAyB,GAAG;IAC/B,qBAAqB,EAAE,MAAM,IAAI,CAAC;IAClC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,gBAAgB,EAAE,OAAO,EAAE,CAAC;CAC7B,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,EAAE,CAAC,yBAAyB,CAqC9D,CAAC"}
@@ -20,7 +20,7 @@ import "../../EditableField/EditableFieldInput.mjs";
20
20
  import "../../EditableField/EditableFieldTextArea.mjs";
21
21
  import "../../Form/FormBase.mjs";
22
22
  import "../../Form/FormField.mjs";
23
- import "../../../Form-DhsgC7kB.js";
23
+ import "../../../Form-OK9zfg6E.js";
24
24
  import "../../DictionaryEditor/validDictionaryChangeButtons.content.mjs";
25
25
  import "zod";
26
26
  import { Loader } from "../../Loader/index.mjs";
@@ -28,7 +28,8 @@ import { DictionaryFieldEditor } from "../DictionaryFieldEditor.mjs";
28
28
  import { dictionariesSelectorContent } from "./dictionariesSelector.content.mjs";
29
29
  const DictionariesSelector = ({
30
30
  onClickDictionaryList,
31
- isDarkMode
31
+ isDarkMode,
32
+ availableLocales
32
33
  }) => {
33
34
  const { online, locale, isLoading } = useGetAllDictionaries();
34
35
  const { focusedContent } = useEditionPanelStore(
@@ -51,7 +52,8 @@ const DictionariesSelector = ({
51
52
  {
52
53
  dictionary,
53
54
  onClickDictionaryList,
54
- isDarkMode
55
+ isDarkMode,
56
+ availableLocales
55
57
  }
56
58
  );
57
59
  };
@@ -1 +1 @@
1
- {"version":3,"file":"DictionariesSelector.mjs","sources":["../../../../src/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.tsx"],"sourcesContent":["'use client';\n\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 { useGetAllDictionaries } from '../../../hooks';\nimport { useEditionPanelStore } from '../../DictionaryEditor';\nimport { Loader } from '../../Loader';\nimport { DictionaryFieldEditor } from '../DictionaryFieldEditor';\nimport { dictionariesSelectorContent } from './dictionariesSelector.content';\n\ntype DictionariesSelectorProps = {\n onClickDictionaryList: () => void;\n isDarkMode?: boolean;\n};\n\nexport const DictionariesSelector: FC<DictionariesSelectorProps> = ({\n onClickDictionaryList,\n isDarkMode,\n}) => {\n const { online, locale, isLoading } = useGetAllDictionaries();\n const { focusedContent } = useEditionPanelStore(\n useShallow((s) => ({\n focusedContent: s.focusedContent,\n }))\n );\n const { noDictionaryMessage, dictionaryNotFoundMessage } = useDictionary(\n dictionariesSelectorContent\n );\n const dictionary = useMemo(\n () =>\n focusedContent?.dictionaryKey\n ? (online?.[focusedContent?.dictionaryKey] ??\n locale?.[focusedContent?.dictionaryKey])\n : null,\n [online, locale, focusedContent?.dictionaryKey]\n );\n\n if (isLoading) return <Loader />;\n\n if (!focusedContent?.dictionaryKey) return noDictionaryMessage;\n\n if (!dictionary) return dictionaryNotFoundMessage;\n\n return (\n <DictionaryFieldEditor\n dictionary={dictionary}\n onClickDictionaryList={onClickDictionaryList}\n isDarkMode={isDarkMode}\n />\n );\n};\n"],"names":["jsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBO,MAAM,uBAAsD,CAAC;AAAA,EAClE;AAAA,EACA;AACF,MAAM;AACJ,QAAM,EAAE,QAAQ,QAAQ,UAAA,IAAc,sBAAsB;AACtD,QAAA,EAAE,mBAAmB;AAAA,IACzB,WAAW,CAAC,OAAO;AAAA,MACjB,gBAAgB,EAAE;AAAA,IAAA,EAClB;AAAA,EACJ;AACM,QAAA,EAAE,qBAAqB,0BAAA,IAA8B;AAAA,IACzD;AAAA,EACF;AACA,QAAM,aAAa;AAAA,IACjB,MACE,gBAAgB,gBACX,SAAS,gBAAgB,aAAa,KACvC,SAAS,gBAAgB,aAAa,IACtC;AAAA,IACN,CAAC,QAAQ,QAAQ,gBAAgB,aAAa;AAAA,EAChD;AAEI,MAAA,UAAkB,QAAAA,sCAAC,QAAO,CAAA,CAAA;AAE1B,MAAA,CAAC,gBAAgB,cAAsB,QAAA;AAEvC,MAAA,CAAC,WAAmB,QAAA;AAGtB,SAAAA,kCAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,IAAA;AAAA,EACF;AAEJ;"}
1
+ {"version":3,"file":"DictionariesSelector.mjs","sources":["../../../../src/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.tsx"],"sourcesContent":["'use client';\n\nimport { Locales } from '@intlayer/config';\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 { useGetAllDictionaries } from '../../../hooks';\nimport { useEditionPanelStore } from '../../DictionaryEditor';\nimport { Loader } from '../../Loader';\nimport { DictionaryFieldEditor } from '../DictionaryFieldEditor';\nimport { dictionariesSelectorContent } from './dictionariesSelector.content';\n\ntype DictionariesSelectorProps = {\n onClickDictionaryList: () => void;\n isDarkMode?: boolean;\n availableLocales: Locales[];\n};\n\nexport const DictionariesSelector: FC<DictionariesSelectorProps> = ({\n onClickDictionaryList,\n isDarkMode,\n availableLocales,\n}) => {\n const { online, locale, isLoading } = useGetAllDictionaries();\n const { focusedContent } = useEditionPanelStore(\n useShallow((s) => ({\n focusedContent: s.focusedContent,\n }))\n );\n const { noDictionaryMessage, dictionaryNotFoundMessage } = useDictionary(\n dictionariesSelectorContent\n );\n const dictionary = useMemo(\n () =>\n focusedContent?.dictionaryKey\n ? (online?.[focusedContent?.dictionaryKey] ??\n locale?.[focusedContent?.dictionaryKey])\n : null,\n [online, locale, focusedContent?.dictionaryKey]\n );\n\n if (isLoading) return <Loader />;\n\n if (!focusedContent?.dictionaryKey) return noDictionaryMessage;\n\n if (!dictionary) return dictionaryNotFoundMessage;\n\n return (\n <DictionaryFieldEditor\n dictionary={dictionary}\n onClickDictionaryList={onClickDictionaryList}\n isDarkMode={isDarkMode}\n availableLocales={availableLocales}\n />\n );\n};\n"],"names":["jsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmBO,MAAM,uBAAsD,CAAC;AAAA,EAClE;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,EAAE,QAAQ,QAAQ,UAAA,IAAc,sBAAsB;AACtD,QAAA,EAAE,mBAAmB;AAAA,IACzB,WAAW,CAAC,OAAO;AAAA,MACjB,gBAAgB,EAAE;AAAA,IAAA,EAClB;AAAA,EACJ;AACM,QAAA,EAAE,qBAAqB,0BAAA,IAA8B;AAAA,IACzD;AAAA,EACF;AACA,QAAM,aAAa;AAAA,IACjB,MACE,gBAAgB,gBACX,SAAS,gBAAgB,aAAa,KACvC,SAAS,gBAAgB,aAAa,IACtC;AAAA,IACN,CAAC,QAAQ,QAAQ,gBAAgB,aAAa;AAAA,EAChD;AAEI,MAAA,UAAkB,QAAAA,sCAAC,QAAO,CAAA,CAAA;AAE1B,MAAA,CAAC,gBAAgB,cAAsB,QAAA;AAEvC,MAAA,CAAC,WAAmB,QAAA;AAGtB,SAAAA,kCAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IAAA;AAAA,EACF;AAEJ;"}
@@ -9,7 +9,7 @@ require("../../Button/Button.cjs");
9
9
  require("../../Auth/ExternalsLoginButtons/externalsLoginButtons.content.cjs");
10
10
  const components_Form_FormBase = require("../../Form/FormBase.cjs");
11
11
  require("../../Form/FormField.cjs");
12
- const components_Form_layout_FormItemLayout = require("../../../Form-BDcoNTLV.cjs");
12
+ const components_Form_layout_FormItemLayout = require("../../../Form-7BqwvjVI.cjs");
13
13
  require("../../Auth/SignInForm/signIn.content.cjs");
14
14
  require("zod");
15
15
  require("../../Auth/SignInForm/useSignInSchema.content.cjs");
@@ -7,7 +7,7 @@ import "../../Button/Button.mjs";
7
7
  import "../../Auth/ExternalsLoginButtons/externalsLoginButtons.content.mjs";
8
8
  import { useForm } from "../../Form/FormBase.mjs";
9
9
  import "../../Form/FormField.mjs";
10
- import { F as Form } from "../../../Form-DhsgC7kB.js";
10
+ import { F as Form } from "../../../Form-OK9zfg6E.js";
11
11
  import "../../Auth/SignInForm/signIn.content.mjs";
12
12
  import "zod";
13
13
  import "../../Auth/SignInForm/useSignInSchema.content.mjs";