@intlayer/design-system 5.3.3 → 5.3.5

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 (192) hide show
  1. package/dist/.vite/manifest.json +67 -49
  2. package/dist/{Form-MjLzPGze.js → Form-CriPBaZk.js} +11 -1
  3. package/dist/Form-CriPBaZk.js.map +1 -0
  4. package/dist/{Form-BpxW17v4.cjs → Form-DJrUK3mm.cjs} +11 -1
  5. package/dist/Form-DJrUK3mm.cjs.map +1 -0
  6. package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.cjs +1 -1
  7. package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.mjs +1 -1
  8. package/dist/components/Auth/DefineNewPasswordForm/DefineNewPasswordForm.cjs +1 -1
  9. package/dist/components/Auth/DefineNewPasswordForm/DefineNewPasswordForm.mjs +1 -1
  10. package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.cjs +1 -1
  11. package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.mjs +1 -1
  12. package/dist/components/Auth/SignInForm/SignInForm.cjs +1 -1
  13. package/dist/components/Auth/SignInForm/SignInForm.mjs +1 -1
  14. package/dist/components/Auth/SignUpForm/SignUpForm.cjs +1 -1
  15. package/dist/components/Auth/SignUpForm/SignUpForm.mjs +1 -1
  16. package/dist/components/Auth/VerifyEmailForm/VerifyEmailForm.cjs +1 -1
  17. package/dist/components/Auth/VerifyEmailForm/VerifyEmailForm.mjs +1 -1
  18. package/dist/components/ContentEditor/ContentEditor.cjs.map +1 -1
  19. package/dist/components/ContentEditor/ContentEditor.d.ts +3 -2
  20. package/dist/components/ContentEditor/ContentEditor.d.ts.map +1 -1
  21. package/dist/components/ContentEditor/ContentEditor.mjs.map +1 -1
  22. package/dist/components/ContentEditor/ContentEditorTextArea.cjs +1 -1
  23. package/dist/components/ContentEditor/ContentEditorTextArea.mjs +1 -1
  24. package/dist/components/DictionaryEditor/DictionaryEditor.cjs +2 -1
  25. package/dist/components/DictionaryEditor/DictionaryEditor.cjs.map +1 -1
  26. package/dist/components/DictionaryEditor/DictionaryEditor.d.ts.map +1 -1
  27. package/dist/components/DictionaryEditor/DictionaryEditor.mjs +2 -1
  28. package/dist/components/DictionaryEditor/DictionaryEditor.mjs.map +1 -1
  29. package/dist/components/DictionaryEditor/NodeWrapper/ArrayWrapper.cjs +1 -1
  30. package/dist/components/DictionaryEditor/NodeWrapper/ArrayWrapper.mjs +1 -1
  31. package/dist/components/DictionaryEditor/NodeWrapper/ConditionWrapper.cjs +1 -1
  32. package/dist/components/DictionaryEditor/NodeWrapper/ConditionWrapper.mjs +1 -1
  33. package/dist/components/DictionaryEditor/NodeWrapper/EnumerationWrapper.cjs +1 -1
  34. package/dist/components/DictionaryEditor/NodeWrapper/EnumerationWrapper.mjs +1 -1
  35. package/dist/components/DictionaryEditor/NodeWrapper/FileWrapper.cjs +58 -0
  36. package/dist/components/DictionaryEditor/NodeWrapper/FileWrapper.cjs.map +1 -0
  37. package/dist/components/DictionaryEditor/NodeWrapper/FileWrapper.d.ts +9 -0
  38. package/dist/components/DictionaryEditor/NodeWrapper/FileWrapper.d.ts.map +1 -0
  39. package/dist/components/DictionaryEditor/NodeWrapper/FileWrapper.mjs +58 -0
  40. package/dist/components/DictionaryEditor/NodeWrapper/FileWrapper.mjs.map +1 -0
  41. package/dist/components/DictionaryEditor/NodeWrapper/InsertionWrapper.cjs +7 -0
  42. package/dist/components/DictionaryEditor/NodeWrapper/InsertionWrapper.cjs.map +1 -0
  43. package/dist/components/DictionaryEditor/NodeWrapper/InsertionWrapper.d.ts +9 -0
  44. package/dist/components/DictionaryEditor/NodeWrapper/InsertionWrapper.d.ts.map +1 -0
  45. package/dist/components/DictionaryEditor/NodeWrapper/InsertionWrapper.mjs +7 -0
  46. package/dist/components/DictionaryEditor/NodeWrapper/InsertionWrapper.mjs.map +1 -0
  47. package/dist/components/DictionaryEditor/NodeWrapper/MarkdownWrapper.cjs +4 -15
  48. package/dist/components/DictionaryEditor/NodeWrapper/MarkdownWrapper.cjs.map +1 -1
  49. package/dist/components/DictionaryEditor/NodeWrapper/MarkdownWrapper.d.ts +2 -2
  50. package/dist/components/DictionaryEditor/NodeWrapper/MarkdownWrapper.d.ts.map +1 -1
  51. package/dist/components/DictionaryEditor/NodeWrapper/MarkdownWrapper.mjs +4 -15
  52. package/dist/components/DictionaryEditor/NodeWrapper/MarkdownWrapper.mjs.map +1 -1
  53. package/dist/components/DictionaryEditor/NodeWrapper/NestedObjectWrapper.cjs +1 -1
  54. package/dist/components/DictionaryEditor/NodeWrapper/NestedObjectWrapper.mjs +1 -1
  55. package/dist/components/DictionaryEditor/NodeWrapper/StringWrapper.cjs +8 -5
  56. package/dist/components/DictionaryEditor/NodeWrapper/StringWrapper.cjs.map +1 -1
  57. package/dist/components/DictionaryEditor/NodeWrapper/StringWrapper.d.ts +2 -2
  58. package/dist/components/DictionaryEditor/NodeWrapper/StringWrapper.d.ts.map +1 -1
  59. package/dist/components/DictionaryEditor/NodeWrapper/StringWrapper.mjs +8 -5
  60. package/dist/components/DictionaryEditor/NodeWrapper/StringWrapper.mjs.map +1 -1
  61. package/dist/components/DictionaryEditor/NodeWrapper/TranslationWrapper.cjs +1 -1
  62. package/dist/components/DictionaryEditor/NodeWrapper/TranslationWrapper.mjs +1 -1
  63. package/dist/components/DictionaryEditor/NodeWrapper/index.cjs +2 -2
  64. package/dist/components/DictionaryEditor/NodeWrapper/index.d.ts +4 -2
  65. package/dist/components/DictionaryEditor/NodeWrapper/index.d.ts.map +1 -1
  66. package/dist/components/DictionaryEditor/NodeWrapper/index.mjs +2 -2
  67. package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.cjs +102 -22
  68. package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.cjs.map +1 -1
  69. package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.d.ts +3 -1
  70. package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.d.ts.map +1 -1
  71. package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.mjs +102 -22
  72. package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.mjs.map +1 -1
  73. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.cjs +1 -1
  74. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.mjs +1 -1
  75. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.cjs +1 -1
  76. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs +1 -1
  77. package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.cjs +48 -114
  78. package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.cjs.map +1 -1
  79. package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.d.ts.map +1 -1
  80. package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.mjs +49 -115
  81. package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.mjs.map +1 -1
  82. package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.cjs +0 -51
  83. package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.cjs.map +1 -1
  84. package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.d.ts +0 -105
  85. package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.d.ts.map +1 -1
  86. package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.mjs +0 -51
  87. package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.mjs.map +1 -1
  88. package/dist/components/DictionaryFieldEditor/NodeTypeSelector.cjs +6 -5
  89. package/dist/components/DictionaryFieldEditor/NodeTypeSelector.cjs.map +1 -1
  90. package/dist/components/DictionaryFieldEditor/NodeTypeSelector.d.ts.map +1 -1
  91. package/dist/components/DictionaryFieldEditor/NodeTypeSelector.mjs +7 -6
  92. package/dist/components/DictionaryFieldEditor/NodeTypeSelector.mjs.map +1 -1
  93. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs +117 -78
  94. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs.map +1 -1
  95. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.d.ts.map +1 -1
  96. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs +120 -81
  97. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs.map +1 -1
  98. package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.cjs +108 -0
  99. package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.cjs.map +1 -1
  100. package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.d.ts +231 -0
  101. package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.d.ts.map +1 -1
  102. package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.mjs +108 -0
  103. package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.mjs.map +1 -1
  104. package/dist/components/DictionaryFieldEditor/getIsEditableSection.cjs +10 -2
  105. package/dist/components/DictionaryFieldEditor/getIsEditableSection.cjs.map +1 -1
  106. package/dist/components/DictionaryFieldEditor/getIsEditableSection.d.ts.map +1 -1
  107. package/dist/components/DictionaryFieldEditor/getIsEditableSection.mjs +11 -3
  108. package/dist/components/DictionaryFieldEditor/getIsEditableSection.mjs.map +1 -1
  109. package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.cjs +30 -0
  110. package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.cjs.map +1 -1
  111. package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.d.ts +66 -0
  112. package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.d.ts.map +1 -1
  113. package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.mjs +30 -0
  114. package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.mjs.map +1 -1
  115. package/dist/components/Form/Form.cjs +1 -1
  116. package/dist/components/Form/Form.mjs +1 -1
  117. package/dist/components/Form/elements/AutoSizeTextAreaElement.cjs +1 -1
  118. package/dist/components/Form/elements/AutoSizeTextAreaElement.mjs +1 -1
  119. package/dist/components/Form/elements/CheckboxElement.cjs +1 -1
  120. package/dist/components/Form/elements/CheckboxElement.mjs +1 -1
  121. package/dist/components/Form/elements/EditableFieldInputElement.cjs +1 -1
  122. package/dist/components/Form/elements/EditableFieldInputElement.d.ts +2 -2
  123. package/dist/components/Form/elements/EditableFieldInputElement.d.ts.map +1 -1
  124. package/dist/components/Form/elements/EditableFieldInputElement.mjs +1 -1
  125. package/dist/components/Form/elements/EditableFieldTextAreaElement.cjs +1 -1
  126. package/dist/components/Form/elements/EditableFieldTextAreaElement.d.ts +2 -2
  127. package/dist/components/Form/elements/EditableFieldTextAreaElement.d.ts.map +1 -1
  128. package/dist/components/Form/elements/EditableFieldTextAreaElement.mjs +1 -1
  129. package/dist/components/Form/elements/FormElement.cjs +1 -1
  130. package/dist/components/Form/elements/FormElement.mjs +1 -1
  131. package/dist/components/Form/elements/InputElement.cjs +1 -1
  132. package/dist/components/Form/elements/InputElement.d.ts +2 -2
  133. package/dist/components/Form/elements/InputElement.d.ts.map +1 -1
  134. package/dist/components/Form/elements/InputElement.mjs +1 -1
  135. package/dist/components/Form/elements/InputPasswordElement.cjs +1 -1
  136. package/dist/components/Form/elements/InputPasswordElement.d.ts +2 -2
  137. package/dist/components/Form/elements/InputPasswordElement.d.ts.map +1 -1
  138. package/dist/components/Form/elements/InputPasswordElement.mjs +1 -1
  139. package/dist/components/Form/elements/MultiselectElement.cjs +1 -1
  140. package/dist/components/Form/elements/MultiselectElement.mjs +1 -1
  141. package/dist/components/Form/elements/SelectElement.cjs +1 -1
  142. package/dist/components/Form/elements/SelectElement.mjs +1 -1
  143. package/dist/components/Form/elements/SwitchSelectorElement.cjs +1 -1
  144. package/dist/components/Form/elements/SwitchSelectorElement.mjs +1 -1
  145. package/dist/components/Form/elements/TextAreaElement.cjs +1 -1
  146. package/dist/components/Form/elements/TextAreaElement.d.ts +3 -3
  147. package/dist/components/Form/elements/TextAreaElement.d.ts.map +1 -1
  148. package/dist/components/Form/elements/TextAreaElement.mjs +1 -1
  149. package/dist/components/Form/elements/index.cjs +1 -1
  150. package/dist/components/Form/elements/index.mjs +1 -1
  151. package/dist/components/Form/index.cjs +1 -1
  152. package/dist/components/Form/index.mjs +1 -1
  153. package/dist/components/Form/layout/FormItemLayout.cjs +1 -1
  154. package/dist/components/Form/layout/FormItemLayout.mjs +1 -1
  155. package/dist/components/Form/layout/FormLabelLayout.cjs +12 -4
  156. package/dist/components/Form/layout/FormLabelLayout.cjs.map +1 -1
  157. package/dist/components/Form/layout/FormLabelLayout.d.ts.map +1 -1
  158. package/dist/components/Form/layout/FormLabelLayout.mjs +12 -4
  159. package/dist/components/Form/layout/FormLabelLayout.mjs.map +1 -1
  160. package/dist/components/Form/layout/index.cjs +1 -1
  161. package/dist/components/Form/layout/index.mjs +1 -1
  162. package/dist/components/Input/Input.cjs.map +1 -1
  163. package/dist/components/Input/Input.d.ts +1 -7
  164. package/dist/components/Input/Input.d.ts.map +1 -1
  165. package/dist/components/Input/Input.mjs.map +1 -1
  166. package/dist/components/TextArea/TextArea.cjs.map +1 -1
  167. package/dist/components/TextArea/TextArea.d.ts +1 -7
  168. package/dist/components/TextArea/TextArea.d.ts.map +1 -1
  169. package/dist/components/TextArea/TextArea.mjs.map +1 -1
  170. package/dist/components/index.cjs +1 -1
  171. package/dist/components/index.mjs +1 -1
  172. package/dist/hooks/intlayerAPIHooks.cjs.map +1 -1
  173. package/dist/hooks/intlayerAPIHooks.d.ts +54 -54
  174. package/dist/hooks/intlayerAPIHooks.d.ts.map +1 -1
  175. package/dist/hooks/intlayerAPIHooks.mjs.map +1 -1
  176. package/dist/hooks/useIntlayerAPI.d.ts +1 -1
  177. package/dist/hooks/useIntlayerAPI.d.ts.map +1 -1
  178. package/dist/{index-CVTE3oHq.js → index-CEoL1j7H.js} +48 -3
  179. package/dist/index-CEoL1j7H.js.map +1 -0
  180. package/dist/{index-BpCAhDMe.cjs → index-s_Ar0FDw.cjs} +48 -3
  181. package/dist/index-s_Ar0FDw.cjs.map +1 -0
  182. package/dist/utils/camelCase.cjs +2 -2
  183. package/dist/utils/camelCase.cjs.map +1 -1
  184. package/dist/utils/camelCase.d.ts +1 -1
  185. package/dist/utils/camelCase.d.ts.map +1 -1
  186. package/dist/utils/camelCase.mjs +2 -2
  187. package/dist/utils/camelCase.mjs.map +1 -1
  188. package/package.json +17 -19
  189. package/dist/Form-BpxW17v4.cjs.map +0 -1
  190. package/dist/Form-MjLzPGze.js.map +0 -1
  191. package/dist/index-BpCAhDMe.cjs.map +0 -1
  192. package/dist/index-CVTE3oHq.js.map +0 -1
@@ -4,7 +4,7 @@ import { useState, useEffect } from "react";
4
4
  import { useDictionary } from "react-intlayer";
5
5
  import { useForm } from "../../Form/FormBase.mjs";
6
6
  import "../../Form/FormField.mjs";
7
- import { F as Form } from "../../../Form-MjLzPGze.js";
7
+ import { F as Form } from "../../../Form-CriPBaZk.js";
8
8
  import { resetPasswordContent } from "./resetPasswordContent.content.mjs";
9
9
  import { useResetPasswordSchema } from "./useResetPasswordSchema.mjs";
10
10
  const ResetPasswordForm = ({
@@ -5,7 +5,7 @@ const jsxRuntime = require("react/jsx-runtime");
5
5
  const reactIntlayer = require("react-intlayer");
6
6
  const components_Form_FormBase = require("../../Form/FormBase.cjs");
7
7
  require("../../Form/FormField.cjs");
8
- const components_Form_layout_FormItemLayout = require("../../../Form-BpxW17v4.cjs");
8
+ const components_Form_layout_FormItemLayout = require("../../../Form-DJrUK3mm.cjs");
9
9
  const components_Auth_ExternalsLoginButtons_ExternalsLoginButtons = require("../ExternalsLoginButtons/ExternalsLoginButtons.cjs");
10
10
  const components_Auth_SignInForm_signIn_content = require("./signIn.content.cjs");
11
11
  const components_Auth_SignInForm_useSignInSchema = require("./useSignInSchema.cjs");
@@ -3,7 +3,7 @@ import { jsxs, Fragment, jsx } from "react/jsx-runtime";
3
3
  import { useDictionary } from "react-intlayer";
4
4
  import { useForm } from "../../Form/FormBase.mjs";
5
5
  import "../../Form/FormField.mjs";
6
- import { F as Form } from "../../../Form-MjLzPGze.js";
6
+ import { F as Form } from "../../../Form-CriPBaZk.js";
7
7
  import { ExternalsLoginButtons } from "../ExternalsLoginButtons/ExternalsLoginButtons.mjs";
8
8
  import { signInContent } from "./signIn.content.mjs";
9
9
  import { useSignInSchema } from "./useSignInSchema.mjs";
@@ -5,7 +5,7 @@ const jsxRuntime = require("react/jsx-runtime");
5
5
  const reactIntlayer = require("react-intlayer");
6
6
  const components_Form_FormBase = require("../../Form/FormBase.cjs");
7
7
  require("../../Form/FormField.cjs");
8
- const components_Form_layout_FormItemLayout = require("../../../Form-BpxW17v4.cjs");
8
+ const components_Form_layout_FormItemLayout = require("../../../Form-DJrUK3mm.cjs");
9
9
  const components_Auth_SignUpForm_signUpForm_content = require("./signUpForm.content.cjs");
10
10
  const components_Auth_SignUpForm_useSignUpSchema = require("./useSignUpSchema.cjs");
11
11
  const SignUpForm = ({
@@ -3,7 +3,7 @@ import { jsxs, jsx } from "react/jsx-runtime";
3
3
  import { useDictionary } from "react-intlayer";
4
4
  import { useForm } from "../../Form/FormBase.mjs";
5
5
  import "../../Form/FormField.mjs";
6
- import { F as Form } from "../../../Form-MjLzPGze.js";
6
+ import { F as Form } from "../../../Form-CriPBaZk.js";
7
7
  import content from "./signUpForm.content.mjs";
8
8
  import { useSignUpSchema } from "./useSignUpSchema.mjs";
9
9
  const SignUpForm = ({
@@ -9,7 +9,7 @@ const reactIntlayer = require("react-intlayer");
9
9
  const components_Button_Button = require("../../Button/Button.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-BpxW17v4.cjs");
12
+ const components_Form_layout_FormItemLayout = require("../../../Form-DJrUK3mm.cjs");
13
13
  const components_Headers_index = require("../../Headers/index.cjs");
14
14
  const components_Loader_index = require("../../Loader/index.cjs");
15
15
  const components_Auth_useUser_index = require("../useUser/index.cjs");
@@ -7,7 +7,7 @@ import { useDictionary } from "react-intlayer";
7
7
  import { Button } from "../../Button/Button.mjs";
8
8
  import { useForm } from "../../Form/FormBase.mjs";
9
9
  import "../../Form/FormField.mjs";
10
- import { F as Form } from "../../../Form-MjLzPGze.js";
10
+ import { F as Form } from "../../../Form-CriPBaZk.js";
11
11
  import { H3 } from "../../Headers/index.mjs";
12
12
  import { Loader } from "../../Loader/index.mjs";
13
13
  import { useUser } from "../useUser/index.mjs";
@@ -1 +1 @@
1
- {"version":3,"file":"ContentEditor.cjs","sources":["../../../src/components/ContentEditor/ContentEditor.tsx"],"sourcesContent":["'use client';\n\nimport { Check, X } from 'lucide-react';\nimport {\n type HTMLAttributes,\n useState,\n type FC,\n type ChangeEventHandler,\n} from 'react';\nimport { cn } from '../../utils/cn';\nimport { AutoSizedTextArea } from '../TextArea/AutoSizeTextArea';\n\nexport type ContentEditorProps = {\n children: string;\n onContentChange: (content: string) => void;\n isEditing?: boolean;\n} & HTMLAttributes<HTMLTextAreaElement>;\n\nexport const ContentEditor: FC<ContentEditorProps> = ({\n children,\n onContentChange,\n isEditing,\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.target.value ?? '');\n\n return (\n <div className=\"flex flex-row items-center justify-between gap-2\">\n <AutoSizedTextArea\n className={cn(\n 'break-word outline-hidden m-3 inline w-full bg-transparent',\n isEditing ? 'cursor-text' : 'cursor-pointer'\n )}\n onChange={handleOnContentChange}\n key={resetIncrementor}\n variant=\"invisible\"\n defaultValue={children}\n {...props}\n />\n {isEdited && (\n <div className=\"flex flex-row items-center justify-between gap-2\">\n <Check\n className=\"cursor-pointer hover:scale-110\"\n size={16}\n onClick={handleValid}\n />\n <X\n className=\"cursor-pointer hover:scale-110\"\n size={16}\n onClick={handleCancel}\n />\n </div>\n )}\n </div>\n );\n};\n"],"names":["useState","jsxs","jsx","AutoSizedTextArea","cn","Check","X"],"mappings":";;;;;;;;AAkBO,MAAM,gBAAwC,CAAC;AAAA,EACpD;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,CAAC,UAAU,WAAW,IAAIA,aAAAA,SAAiB,QAAQ;AACzD,QAAM,CAAC,kBAAkB,mBAAmB,IAAIA,aAAAA,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,OAAO,SAAS,EAAE;AAGhC,SAAAC,2BAAA,KAAC,OAAI,EAAA,WAAU,oDACb,UAAA;AAAA,IAAAC,2BAAA;AAAA,MAACC,qCAAA;AAAA,MAAA;AAAA,QACC,WAAWC,SAAA;AAAA,UACT;AAAA,UACA,YAAY,gBAAgB;AAAA,QAC9B;AAAA,QACA,UAAU;AAAA,QAEV,SAAQ;AAAA,QACR,cAAc;AAAA,QACb,GAAG;AAAA,MAAA;AAAA,MAHC;AAAA,IAIP;AAAA,IACC,YACCH,2BAAA,KAAC,OAAI,EAAA,WAAU,oDACb,UAAA;AAAA,MAAAC,2BAAA;AAAA,QAACG,YAAA;AAAA,QAAA;AAAA,UACC,WAAU;AAAA,UACV,MAAM;AAAA,UACN,SAAS;AAAA,QAAA;AAAA,MACX;AAAA,MACAH,2BAAA;AAAA,QAACI,YAAA;AAAA,QAAA;AAAA,UACC,WAAU;AAAA,UACV,MAAM;AAAA,UACN,SAAS;AAAA,QAAA;AAAA,MAAA;AAAA,IACX,EACF,CAAA;AAAA,EAAA,GAEJ;AAEJ;;"}
1
+ {"version":3,"file":"ContentEditor.cjs","sources":["../../../src/components/ContentEditor/ContentEditor.tsx"],"sourcesContent":["'use client';\n\nimport { Check, X } from 'lucide-react';\nimport { useState, type FC, type ChangeEventHandler } from 'react';\nimport { cn } from '../../utils/cn';\nimport {\n AutoSizedTextArea,\n AutoSizedTextAreaProps,\n} from '../TextArea/AutoSizeTextArea';\n\nexport type ContentEditorProps = {\n children: string;\n onContentChange: (content: string) => void;\n isEditing?: boolean;\n} & AutoSizedTextAreaProps;\n\nexport const ContentEditor: FC<ContentEditorProps> = ({\n children,\n onContentChange,\n isEditing,\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.target.value ?? '');\n\n return (\n <div className=\"flex flex-row items-center justify-between gap-2\">\n <AutoSizedTextArea\n className={cn(\n 'break-word outline-hidden m-3 inline w-full bg-transparent',\n isEditing ? 'cursor-text' : 'cursor-pointer'\n )}\n onChange={handleOnContentChange}\n key={resetIncrementor}\n variant=\"invisible\"\n defaultValue={children}\n {...props}\n />\n {isEdited && (\n <div className=\"flex flex-row items-center justify-between gap-2\">\n <Check\n className=\"cursor-pointer hover:scale-110\"\n size={16}\n onClick={handleValid}\n />\n <X\n className=\"cursor-pointer hover:scale-110\"\n size={16}\n onClick={handleCancel}\n />\n </div>\n )}\n </div>\n );\n};\n"],"names":["useState","jsxs","jsx","AutoSizedTextArea","cn","Check","X"],"mappings":";;;;;;;;AAgBO,MAAM,gBAAwC,CAAC;AAAA,EACpD;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,CAAC,UAAU,WAAW,IAAIA,aAAAA,SAAiB,QAAQ;AACzD,QAAM,CAAC,kBAAkB,mBAAmB,IAAIA,aAAAA,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,OAAO,SAAS,EAAE;AAGhC,SAAAC,2BAAA,KAAC,OAAI,EAAA,WAAU,oDACb,UAAA;AAAA,IAAAC,2BAAA;AAAA,MAACC,qCAAA;AAAA,MAAA;AAAA,QACC,WAAWC,SAAA;AAAA,UACT;AAAA,UACA,YAAY,gBAAgB;AAAA,QAC9B;AAAA,QACA,UAAU;AAAA,QAEV,SAAQ;AAAA,QACR,cAAc;AAAA,QACb,GAAG;AAAA,MAAA;AAAA,MAHC;AAAA,IAIP;AAAA,IACC,YACCH,2BAAA,KAAC,OAAI,EAAA,WAAU,oDACb,UAAA;AAAA,MAAAC,2BAAA;AAAA,QAACG,YAAA;AAAA,QAAA;AAAA,UACC,WAAU;AAAA,UACV,MAAM;AAAA,UACN,SAAS;AAAA,QAAA;AAAA,MACX;AAAA,MACAH,2BAAA;AAAA,QAACI,YAAA;AAAA,QAAA;AAAA,UACC,WAAU;AAAA,UACV,MAAM;AAAA,UACN,SAAS;AAAA,QAAA;AAAA,MAAA;AAAA,IACX,EACF,CAAA;AAAA,EAAA,GAEJ;AAEJ;;"}
@@ -1,8 +1,9 @@
1
- import { HTMLAttributes, FC } from 'react';
1
+ import { FC } from 'react';
2
+ import { AutoSizedTextAreaProps } from '../TextArea/AutoSizeTextArea';
2
3
  export type ContentEditorProps = {
3
4
  children: string;
4
5
  onContentChange: (content: string) => void;
5
6
  isEditing?: boolean;
6
- } & HTMLAttributes<HTMLTextAreaElement>;
7
+ } & AutoSizedTextAreaProps;
7
8
  export declare const ContentEditor: FC<ContentEditorProps>;
8
9
  //# sourceMappingURL=ContentEditor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ContentEditor.d.ts","sourceRoot":"","sources":["../../../src/components/ContentEditor/ContentEditor.tsx"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,cAAc,EAEnB,KAAK,EAAE,EAER,MAAM,OAAO,CAAC;AAIf,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,GAAG,cAAc,CAAC,mBAAmB,CAAC,CAAC;AAExC,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,CAkDhD,CAAC"}
1
+ {"version":3,"file":"ContentEditor.d.ts","sourceRoot":"","sources":["../../../src/components/ContentEditor/ContentEditor.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAY,KAAK,EAAE,EAA2B,MAAM,OAAO,CAAC;AAEnE,OAAO,EAEL,sBAAsB,EACvB,MAAM,8BAA8B,CAAC;AAEtC,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,GAAG,sBAAsB,CAAC;AAE3B,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,CAkDhD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ContentEditor.mjs","sources":["../../../src/components/ContentEditor/ContentEditor.tsx"],"sourcesContent":["'use client';\n\nimport { Check, X } from 'lucide-react';\nimport {\n type HTMLAttributes,\n useState,\n type FC,\n type ChangeEventHandler,\n} from 'react';\nimport { cn } from '../../utils/cn';\nimport { AutoSizedTextArea } from '../TextArea/AutoSizeTextArea';\n\nexport type ContentEditorProps = {\n children: string;\n onContentChange: (content: string) => void;\n isEditing?: boolean;\n} & HTMLAttributes<HTMLTextAreaElement>;\n\nexport const ContentEditor: FC<ContentEditorProps> = ({\n children,\n onContentChange,\n isEditing,\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.target.value ?? '');\n\n return (\n <div className=\"flex flex-row items-center justify-between gap-2\">\n <AutoSizedTextArea\n className={cn(\n 'break-word outline-hidden m-3 inline w-full bg-transparent',\n isEditing ? 'cursor-text' : 'cursor-pointer'\n )}\n onChange={handleOnContentChange}\n key={resetIncrementor}\n variant=\"invisible\"\n defaultValue={children}\n {...props}\n />\n {isEdited && (\n <div className=\"flex flex-row items-center justify-between gap-2\">\n <Check\n className=\"cursor-pointer hover:scale-110\"\n size={16}\n onClick={handleValid}\n />\n <X\n className=\"cursor-pointer hover:scale-110\"\n size={16}\n onClick={handleCancel}\n />\n </div>\n )}\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;AAkBO,MAAM,gBAAwC,CAAC;AAAA,EACpD;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,OAAO,SAAS,EAAE;AAGhC,SAAA,qBAAC,OAAI,EAAA,WAAU,oDACb,UAAA;AAAA,IAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,WAAW;AAAA,UACT;AAAA,UACA,YAAY,gBAAgB;AAAA,QAC9B;AAAA,QACA,UAAU;AAAA,QAEV,SAAQ;AAAA,QACR,cAAc;AAAA,QACb,GAAG;AAAA,MAAA;AAAA,MAHC;AAAA,IAIP;AAAA,IACC,YACC,qBAAC,OAAI,EAAA,WAAU,oDACb,UAAA;AAAA,MAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,WAAU;AAAA,UACV,MAAM;AAAA,UACN,SAAS;AAAA,QAAA;AAAA,MACX;AAAA,MACA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,WAAU;AAAA,UACV,MAAM;AAAA,UACN,SAAS;AAAA,QAAA;AAAA,MAAA;AAAA,IACX,EACF,CAAA;AAAA,EAAA,GAEJ;AAEJ;"}
1
+ {"version":3,"file":"ContentEditor.mjs","sources":["../../../src/components/ContentEditor/ContentEditor.tsx"],"sourcesContent":["'use client';\n\nimport { Check, X } from 'lucide-react';\nimport { useState, type FC, type ChangeEventHandler } from 'react';\nimport { cn } from '../../utils/cn';\nimport {\n AutoSizedTextArea,\n AutoSizedTextAreaProps,\n} from '../TextArea/AutoSizeTextArea';\n\nexport type ContentEditorProps = {\n children: string;\n onContentChange: (content: string) => void;\n isEditing?: boolean;\n} & AutoSizedTextAreaProps;\n\nexport const ContentEditor: FC<ContentEditorProps> = ({\n children,\n onContentChange,\n isEditing,\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.target.value ?? '');\n\n return (\n <div className=\"flex flex-row items-center justify-between gap-2\">\n <AutoSizedTextArea\n className={cn(\n 'break-word outline-hidden m-3 inline w-full bg-transparent',\n isEditing ? 'cursor-text' : 'cursor-pointer'\n )}\n onChange={handleOnContentChange}\n key={resetIncrementor}\n variant=\"invisible\"\n defaultValue={children}\n {...props}\n />\n {isEdited && (\n <div className=\"flex flex-row items-center justify-between gap-2\">\n <Check\n className=\"cursor-pointer hover:scale-110\"\n size={16}\n onClick={handleValid}\n />\n <X\n className=\"cursor-pointer hover:scale-110\"\n size={16}\n onClick={handleCancel}\n />\n </div>\n )}\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;AAgBO,MAAM,gBAAwC,CAAC;AAAA,EACpD;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,OAAO,SAAS,EAAE;AAGhC,SAAA,qBAAC,OAAI,EAAA,WAAU,oDACb,UAAA;AAAA,IAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,WAAW;AAAA,UACT;AAAA,UACA,YAAY,gBAAgB;AAAA,QAC9B;AAAA,QACA,UAAU;AAAA,QAEV,SAAQ;AAAA,QACR,cAAc;AAAA,QACb,GAAG;AAAA,MAAA;AAAA,MAHC;AAAA,IAIP;AAAA,IACC,YACC,qBAAC,OAAI,EAAA,WAAU,oDACb,UAAA;AAAA,MAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,WAAU;AAAA,UACV,MAAM;AAAA,UACN,SAAS;AAAA,QAAA;AAAA,MACX;AAAA,MACA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,WAAU;AAAA,UACV,MAAM;AAAA,UACN,SAAS;AAAA,QAAA;AAAA,MAAA;AAAA,IACX,EACF,CAAA;AAAA,EAAA,GAEJ;AAEJ;"}
@@ -17,7 +17,7 @@ require("@intlayer/api");
17
17
  require("@hookform/resolvers");
18
18
  require("react-hook-form");
19
19
  require("../Form/FormField.cjs");
20
- require("../../Form-BpxW17v4.cjs");
20
+ require("../../Form-DJrUK3mm.cjs");
21
21
  require("../Auth/SignInForm/signIn.content.cjs");
22
22
  require("zod");
23
23
  require("../Auth/SignInForm/useSignInSchema.content.cjs");
@@ -15,7 +15,7 @@ import "@intlayer/api";
15
15
  import "@hookform/resolvers";
16
16
  import "react-hook-form";
17
17
  import "../Form/FormField.mjs";
18
- import "../../Form-MjLzPGze.js";
18
+ import "../../Form-CriPBaZk.js";
19
19
  import "../Auth/SignInForm/signIn.content.mjs";
20
20
  import "zod";
21
21
  import "../Auth/SignInForm/useSignInSchema.content.mjs";
@@ -5,7 +5,7 @@ const jsxRuntime = require("react/jsx-runtime");
5
5
  const ReactExports = require("react");
6
6
  const editorReact = require("@intlayer/editor-react");
7
7
  const components_DictionaryFieldEditor_SaveForm_SaveForm = require("../DictionaryFieldEditor/SaveForm/SaveForm.cjs");
8
- const components_DictionaryEditor_NodeWrapper_ArrayWrapper = require("../../index-BpCAhDMe.cjs");
8
+ const components_DictionaryEditor_NodeWrapper_ArrayWrapper = require("../../index-s_Ar0FDw.cjs");
9
9
  const DictionaryEditor = ({
10
10
  dictionary,
11
11
  mode,
@@ -20,6 +20,7 @@ const DictionaryEditor = ({
20
20
  {
21
21
  ...props,
22
22
  keyPath: [],
23
+ dictionary,
23
24
  key: JSON.stringify(
24
25
  (editedContent?.[dictionary.key] ?? dictionary).content
25
26
  ),
@@ -1 +1 @@
1
- {"version":3,"file":"DictionaryEditor.cjs","sources":["../../../src/components/DictionaryEditor/DictionaryEditor.tsx"],"sourcesContent":["'use client';\n\nimport type { Locales } from '@intlayer/config/client';\nimport type { Dictionary } from '@intlayer/core';\nimport { useEditedContent, useFocusDictionary } from '@intlayer/editor-react';\nimport type { FC } from 'react';\nimport { SaveForm } from '../DictionaryFieldEditor/SaveForm/SaveForm';\nimport { NodeWrapper } from './NodeWrapper';\n\ntype DictionaryEditorProps = {\n dictionary: Dictionary;\n locale: Locales;\n mode: ('local' | 'remote')[];\n};\n\nexport const DictionaryEditor: FC<DictionaryEditorProps> = ({\n dictionary,\n mode,\n ...props\n}) => {\n const { editedContent, addEditedContent } = useEditedContent();\n const { focusedContent, setFocusedContentKeyPath } = useFocusDictionary();\n\n const focusedKeyPath = focusedContent?.keyPath;\n\n return (\n <div className=\"flex flex-1 flex-col justify-between gap-2\">\n <div>\n <NodeWrapper\n {...props}\n keyPath={[]}\n key={JSON.stringify(\n (editedContent?.[dictionary.key] ?? dictionary).content\n )}\n editedContent={editedContent?.[dictionary.key]?.content}\n focusedKeyPath={focusedKeyPath}\n section={dictionary.content}\n onContentChange={(content) => {\n addEditedContent(dictionary.key, content.newValue, content.keyPath);\n }}\n onFocusKeyPath={setFocusedContentKeyPath}\n />\n </div>\n <SaveForm dictionary={dictionary} mode={mode} className=\"mb-4 flex-col\" />\n </div>\n );\n};\n"],"names":["useEditedContent","useFocusDictionary","jsxs","jsx","createElement","NodeWrapper","SaveForm"],"mappings":";;;;;;;;AAeO,MAAM,mBAA8C,CAAC;AAAA,EAC1D;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,EAAE,eAAe,iBAAiB,IAAIA,6BAAiB;AAC7D,QAAM,EAAE,gBAAgB,yBAAyB,IAAIC,+BAAmB;AAExE,QAAM,iBAAiB,gBAAgB;AAGrC,SAAAC,2BAAA,KAAC,OAAI,EAAA,WAAU,8CACb,UAAA;AAAA,IAAAC,+BAAC,OACC,EAAA,UAAAC,6BAAA;AAAA,MAACC,qDAAA;AAAA,MAAA;AAAA,QACE,GAAG;AAAA,QACJ,SAAS,CAAC;AAAA,QACV,KAAK,KAAK;AAAA,WACP,gBAAgB,WAAW,GAAG,KAAK,YAAY;AAAA,QAClD;AAAA,QACA,eAAe,gBAAgB,WAAW,GAAG,GAAG;AAAA,QAChD;AAAA,QACA,SAAS,WAAW;AAAA,QACpB,iBAAiB,CAAC,YAAY;AAC5B,2BAAiB,WAAW,KAAK,QAAQ,UAAU,QAAQ,OAAO;AAAA,QACpE;AAAA,QACA,gBAAgB;AAAA,MAAA;AAAA,IAAA,GAEpB;AAAA,IACCF,2BAAA,IAAAG,mDAAA,UAAA,EAAS,YAAwB,MAAY,WAAU,gBAAgB,CAAA;AAAA,EAAA,GAC1E;AAEJ;;"}
1
+ {"version":3,"file":"DictionaryEditor.cjs","sources":["../../../src/components/DictionaryEditor/DictionaryEditor.tsx"],"sourcesContent":["'use client';\n\nimport type { Locales } from '@intlayer/config/client';\nimport type { Dictionary } from '@intlayer/core';\nimport { useEditedContent, useFocusDictionary } from '@intlayer/editor-react';\nimport type { FC } from 'react';\nimport { SaveForm } from '../DictionaryFieldEditor/SaveForm/SaveForm';\nimport { NodeWrapper } from './NodeWrapper';\n\ntype DictionaryEditorProps = {\n dictionary: Dictionary;\n locale: Locales;\n mode: ('local' | 'remote')[];\n};\n\nexport const DictionaryEditor: FC<DictionaryEditorProps> = ({\n dictionary,\n mode,\n ...props\n}) => {\n const { editedContent, addEditedContent } = useEditedContent();\n const { focusedContent, setFocusedContentKeyPath } = useFocusDictionary();\n\n const focusedKeyPath = focusedContent?.keyPath;\n\n return (\n <div className=\"flex flex-1 flex-col justify-between gap-2\">\n <div>\n <NodeWrapper\n {...props}\n keyPath={[]}\n dictionary={dictionary}\n key={JSON.stringify(\n (editedContent?.[dictionary.key] ?? dictionary).content\n )}\n editedContent={editedContent?.[dictionary.key]?.content}\n focusedKeyPath={focusedKeyPath}\n section={dictionary.content}\n onContentChange={(content) => {\n addEditedContent(dictionary.key, content.newValue, content.keyPath);\n }}\n onFocusKeyPath={setFocusedContentKeyPath}\n />\n </div>\n <SaveForm dictionary={dictionary} mode={mode} className=\"mb-4 flex-col\" />\n </div>\n );\n};\n"],"names":["useEditedContent","useFocusDictionary","jsxs","jsx","createElement","NodeWrapper","SaveForm"],"mappings":";;;;;;;;AAeO,MAAM,mBAA8C,CAAC;AAAA,EAC1D;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,EAAE,eAAe,iBAAiB,IAAIA,6BAAiB;AAC7D,QAAM,EAAE,gBAAgB,yBAAyB,IAAIC,+BAAmB;AAExE,QAAM,iBAAiB,gBAAgB;AAGrC,SAAAC,2BAAA,KAAC,OAAI,EAAA,WAAU,8CACb,UAAA;AAAA,IAAAC,+BAAC,OACC,EAAA,UAAAC,6BAAA;AAAA,MAACC,qDAAA;AAAA,MAAA;AAAA,QACE,GAAG;AAAA,QACJ,SAAS,CAAC;AAAA,QACV;AAAA,QACA,KAAK,KAAK;AAAA,WACP,gBAAgB,WAAW,GAAG,KAAK,YAAY;AAAA,QAClD;AAAA,QACA,eAAe,gBAAgB,WAAW,GAAG,GAAG;AAAA,QAChD;AAAA,QACA,SAAS,WAAW;AAAA,QACpB,iBAAiB,CAAC,YAAY;AAC5B,2BAAiB,WAAW,KAAK,QAAQ,UAAU,QAAQ,OAAO;AAAA,QACpE;AAAA,QACA,gBAAgB;AAAA,MAAA;AAAA,IAAA,GAEpB;AAAA,IACCF,2BAAA,IAAAG,mDAAA,UAAA,EAAS,YAAwB,MAAY,WAAU,gBAAgB,CAAA;AAAA,EAAA,GAC1E;AAEJ;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"DictionaryEditor.d.ts","sourceRoot":"","sources":["../../../src/components/DictionaryEditor/DictionaryEditor.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEjD,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAIhC,KAAK,qBAAqB,GAAG;IAC3B,UAAU,EAAE,UAAU,CAAC;IACvB,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE,CAAC,OAAO,GAAG,QAAQ,CAAC,EAAE,CAAC;CAC9B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,CA+BtD,CAAC"}
1
+ {"version":3,"file":"DictionaryEditor.d.ts","sourceRoot":"","sources":["../../../src/components/DictionaryEditor/DictionaryEditor.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEjD,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAIhC,KAAK,qBAAqB,GAAG;IAC3B,UAAU,EAAE,UAAU,CAAC;IACvB,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE,CAAC,OAAO,GAAG,QAAQ,CAAC,EAAE,CAAC;CAC9B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,CAgCtD,CAAC"}
@@ -3,7 +3,7 @@ import { jsxs, jsx } from "react/jsx-runtime";
3
3
  import { createElement } from "react";
4
4
  import { useEditedContent, useFocusDictionary } from "@intlayer/editor-react";
5
5
  import { SaveForm } from "../DictionaryFieldEditor/SaveForm/SaveForm.mjs";
6
- import { N as NodeWrapper } from "../../index-CVTE3oHq.js";
6
+ import { N as NodeWrapper } from "../../index-CEoL1j7H.js";
7
7
  const DictionaryEditor = ({
8
8
  dictionary,
9
9
  mode,
@@ -18,6 +18,7 @@ const DictionaryEditor = ({
18
18
  {
19
19
  ...props,
20
20
  keyPath: [],
21
+ dictionary,
21
22
  key: JSON.stringify(
22
23
  (editedContent?.[dictionary.key] ?? dictionary).content
23
24
  ),
@@ -1 +1 @@
1
- {"version":3,"file":"DictionaryEditor.mjs","sources":["../../../src/components/DictionaryEditor/DictionaryEditor.tsx"],"sourcesContent":["'use client';\n\nimport type { Locales } from '@intlayer/config/client';\nimport type { Dictionary } from '@intlayer/core';\nimport { useEditedContent, useFocusDictionary } from '@intlayer/editor-react';\nimport type { FC } from 'react';\nimport { SaveForm } from '../DictionaryFieldEditor/SaveForm/SaveForm';\nimport { NodeWrapper } from './NodeWrapper';\n\ntype DictionaryEditorProps = {\n dictionary: Dictionary;\n locale: Locales;\n mode: ('local' | 'remote')[];\n};\n\nexport const DictionaryEditor: FC<DictionaryEditorProps> = ({\n dictionary,\n mode,\n ...props\n}) => {\n const { editedContent, addEditedContent } = useEditedContent();\n const { focusedContent, setFocusedContentKeyPath } = useFocusDictionary();\n\n const focusedKeyPath = focusedContent?.keyPath;\n\n return (\n <div className=\"flex flex-1 flex-col justify-between gap-2\">\n <div>\n <NodeWrapper\n {...props}\n keyPath={[]}\n key={JSON.stringify(\n (editedContent?.[dictionary.key] ?? dictionary).content\n )}\n editedContent={editedContent?.[dictionary.key]?.content}\n focusedKeyPath={focusedKeyPath}\n section={dictionary.content}\n onContentChange={(content) => {\n addEditedContent(dictionary.key, content.newValue, content.keyPath);\n }}\n onFocusKeyPath={setFocusedContentKeyPath}\n />\n </div>\n <SaveForm dictionary={dictionary} mode={mode} className=\"mb-4 flex-col\" />\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;AAeO,MAAM,mBAA8C,CAAC;AAAA,EAC1D;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,EAAE,eAAe,iBAAiB,IAAI,iBAAiB;AAC7D,QAAM,EAAE,gBAAgB,yBAAyB,IAAI,mBAAmB;AAExE,QAAM,iBAAiB,gBAAgB;AAGrC,SAAA,qBAAC,OAAI,EAAA,WAAU,8CACb,UAAA;AAAA,IAAA,oBAAC,OACC,EAAA,UAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACE,GAAG;AAAA,QACJ,SAAS,CAAC;AAAA,QACV,KAAK,KAAK;AAAA,WACP,gBAAgB,WAAW,GAAG,KAAK,YAAY;AAAA,QAClD;AAAA,QACA,eAAe,gBAAgB,WAAW,GAAG,GAAG;AAAA,QAChD;AAAA,QACA,SAAS,WAAW;AAAA,QACpB,iBAAiB,CAAC,YAAY;AAC5B,2BAAiB,WAAW,KAAK,QAAQ,UAAU,QAAQ,OAAO;AAAA,QACpE;AAAA,QACA,gBAAgB;AAAA,MAAA;AAAA,IAAA,GAEpB;AAAA,IACC,oBAAA,UAAA,EAAS,YAAwB,MAAY,WAAU,gBAAgB,CAAA;AAAA,EAAA,GAC1E;AAEJ;"}
1
+ {"version":3,"file":"DictionaryEditor.mjs","sources":["../../../src/components/DictionaryEditor/DictionaryEditor.tsx"],"sourcesContent":["'use client';\n\nimport type { Locales } from '@intlayer/config/client';\nimport type { Dictionary } from '@intlayer/core';\nimport { useEditedContent, useFocusDictionary } from '@intlayer/editor-react';\nimport type { FC } from 'react';\nimport { SaveForm } from '../DictionaryFieldEditor/SaveForm/SaveForm';\nimport { NodeWrapper } from './NodeWrapper';\n\ntype DictionaryEditorProps = {\n dictionary: Dictionary;\n locale: Locales;\n mode: ('local' | 'remote')[];\n};\n\nexport const DictionaryEditor: FC<DictionaryEditorProps> = ({\n dictionary,\n mode,\n ...props\n}) => {\n const { editedContent, addEditedContent } = useEditedContent();\n const { focusedContent, setFocusedContentKeyPath } = useFocusDictionary();\n\n const focusedKeyPath = focusedContent?.keyPath;\n\n return (\n <div className=\"flex flex-1 flex-col justify-between gap-2\">\n <div>\n <NodeWrapper\n {...props}\n keyPath={[]}\n dictionary={dictionary}\n key={JSON.stringify(\n (editedContent?.[dictionary.key] ?? dictionary).content\n )}\n editedContent={editedContent?.[dictionary.key]?.content}\n focusedKeyPath={focusedKeyPath}\n section={dictionary.content}\n onContentChange={(content) => {\n addEditedContent(dictionary.key, content.newValue, content.keyPath);\n }}\n onFocusKeyPath={setFocusedContentKeyPath}\n />\n </div>\n <SaveForm dictionary={dictionary} mode={mode} className=\"mb-4 flex-col\" />\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;AAeO,MAAM,mBAA8C,CAAC;AAAA,EAC1D;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,EAAE,eAAe,iBAAiB,IAAI,iBAAiB;AAC7D,QAAM,EAAE,gBAAgB,yBAAyB,IAAI,mBAAmB;AAExE,QAAM,iBAAiB,gBAAgB;AAGrC,SAAA,qBAAC,OAAI,EAAA,WAAU,8CACb,UAAA;AAAA,IAAA,oBAAC,OACC,EAAA,UAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACE,GAAG;AAAA,QACJ,SAAS,CAAC;AAAA,QACV;AAAA,QACA,KAAK,KAAK;AAAA,WACP,gBAAgB,WAAW,GAAG,KAAK,YAAY;AAAA,QAClD;AAAA,QACA,eAAe,gBAAgB,WAAW,GAAG,GAAG;AAAA,QAChD;AAAA,QACA,SAAS,WAAW;AAAA,QACpB,iBAAiB,CAAC,YAAY;AAC5B,2BAAiB,WAAW,KAAK,QAAQ,UAAU,QAAQ,OAAO;AAAA,QACpE;AAAA,QACA,gBAAgB;AAAA,MAAA;AAAA,IAAA,GAEpB;AAAA,IACC,oBAAA,UAAA,EAAS,YAAwB,MAAY,WAAU,gBAAgB,CAAA;AAAA,EAAA,GAC1E;AAEJ;"}
@@ -3,6 +3,6 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  require("react/jsx-runtime");
4
4
  require("@intlayer/core");
5
5
  require("../ItemLayout.cjs");
6
- const components_DictionaryEditor_NodeWrapper_ArrayWrapper = require("../../../index-BpCAhDMe.cjs");
6
+ const components_DictionaryEditor_NodeWrapper_ArrayWrapper = require("../../../index-s_Ar0FDw.cjs");
7
7
  exports.ArrayWrapper = components_DictionaryEditor_NodeWrapper_ArrayWrapper.ArrayWrapper;
8
8
  //# sourceMappingURL=ArrayWrapper.cjs.map
@@ -1,7 +1,7 @@
1
1
  import "react/jsx-runtime";
2
2
  import "@intlayer/core";
3
3
  import "../ItemLayout.mjs";
4
- import { A } from "../../../index-CVTE3oHq.js";
4
+ import { A } from "../../../index-CEoL1j7H.js";
5
5
  export {
6
6
  A as ArrayWrapper
7
7
  };
@@ -3,6 +3,6 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  require("react/jsx-runtime");
4
4
  require("react");
5
5
  require("@intlayer/core");
6
- const components_DictionaryEditor_NodeWrapper_ArrayWrapper = require("../../../index-BpCAhDMe.cjs");
6
+ const components_DictionaryEditor_NodeWrapper_ArrayWrapper = require("../../../index-s_Ar0FDw.cjs");
7
7
  exports.ConditionWrapper = components_DictionaryEditor_NodeWrapper_ArrayWrapper.ConditionWrapper;
8
8
  //# sourceMappingURL=ConditionWrapper.cjs.map
@@ -1,7 +1,7 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
3
  import "@intlayer/core";
4
- import { C } from "../../../index-CVTE3oHq.js";
4
+ import { C } from "../../../index-CEoL1j7H.js";
5
5
  export {
6
6
  C as ConditionWrapper
7
7
  };
@@ -3,6 +3,6 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  require("react/jsx-runtime");
4
4
  require("react");
5
5
  require("@intlayer/core");
6
- const components_DictionaryEditor_NodeWrapper_ArrayWrapper = require("../../../index-BpCAhDMe.cjs");
6
+ const components_DictionaryEditor_NodeWrapper_ArrayWrapper = require("../../../index-s_Ar0FDw.cjs");
7
7
  exports.EnumerationWrapper = components_DictionaryEditor_NodeWrapper_ArrayWrapper.EnumerationWrapper;
8
8
  //# sourceMappingURL=EnumerationWrapper.cjs.map
@@ -1,7 +1,7 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
3
  import "@intlayer/core";
4
- import { E } from "../../../index-CVTE3oHq.js";
4
+ import { E } from "../../../index-CEoL1j7H.js";
5
5
  export {
6
6
  E as EnumerationWrapper
7
7
  };
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const jsxRuntime = require("react/jsx-runtime");
4
+ const core = require("@intlayer/core");
5
+ const editorReact = require("@intlayer/editor-react");
6
+ const components_DictionaryEditor_NodeWrapper_StringWrapper = require("./StringWrapper.cjs");
7
+ const FileWrapper = (props) => {
8
+ const { keyPath, section } = props;
9
+ const { addEditedContent } = editorReact.useEditedContent();
10
+ const editedContentValue = core.getContentNodeByKeyPath(
11
+ props.editedContent,
12
+ keyPath
13
+ );
14
+ const subSection = section[core.NodeType.File];
15
+ const { content } = section;
16
+ const newKeyPath = [
17
+ ...keyPath,
18
+ {
19
+ type: core.NodeType.File
20
+ }
21
+ ];
22
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ml-2 grid grid-cols-[auto,1fr] gap-2", children: [
23
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-neutral text-sm", children: [
24
+ subSection,
25
+ " "
26
+ ] }),
27
+ /* @__PURE__ */ jsxRuntime.jsx(
28
+ components_DictionaryEditor_NodeWrapper_StringWrapper.StringWrapper,
29
+ {
30
+ ...props,
31
+ keyPath: newKeyPath,
32
+ section: content,
33
+ editedContentValue: editedContentValue?.content,
34
+ onContentChange: (content2) => {
35
+ console.log("lll", {
36
+ subSection,
37
+ file: {
38
+ ...section,
39
+ content: content2.newValue
40
+ },
41
+ keyPath,
42
+ newKeyPath
43
+ });
44
+ addEditedContent(
45
+ props.dictionary.key,
46
+ {
47
+ ...section,
48
+ content: content2.newValue
49
+ },
50
+ keyPath
51
+ );
52
+ }
53
+ }
54
+ )
55
+ ] });
56
+ };
57
+ exports.FileWrapper = FileWrapper;
58
+ //# sourceMappingURL=FileWrapper.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FileWrapper.cjs","sources":["../../../../src/components/DictionaryEditor/NodeWrapper/FileWrapper.tsx"],"sourcesContent":["import {\n getContentNodeByKeyPath,\n NodeType,\n type FileContent,\n type KeyPath,\n} from '@intlayer/core';\nimport type { FC } from 'react';\nimport { useEditedContent } from '@intlayer/editor-react';\nimport { StringWrapper, type StringWrapperProps } from './StringWrapper';\n\ntype FileWrapperProps = Omit<StringWrapperProps, 'section'> & {\n section: FileContent;\n};\n\nexport const FileWrapper: FC<FileWrapperProps> = (props) => {\n const { keyPath, section } = props;\n const { addEditedContent } = useEditedContent();\n const editedContentValue = getContentNodeByKeyPath(\n props.editedContent,\n keyPath\n ) as FileContent | undefined;\n\n const subSection = section[NodeType.File];\n const { content } = section;\n\n const newKeyPath: KeyPath[] = [\n ...keyPath,\n {\n type: NodeType.File,\n },\n ];\n\n return (\n <div className=\"ml-2 grid grid-cols-[auto,1fr] gap-2\">\n <span className=\"text-neutral text-sm\">{subSection} </span>\n <StringWrapper\n {...props}\n keyPath={newKeyPath}\n section={content}\n editedContentValue={editedContentValue?.content}\n onContentChange={(content) => {\n console.log('lll', {\n subSection,\n file: {\n ...section,\n content: content.newValue,\n },\n keyPath,\n newKeyPath,\n });\n addEditedContent(\n props.dictionary.key,\n {\n ...section,\n content: content.newValue,\n } as FileContent,\n keyPath\n );\n }}\n />\n </div>\n );\n};\n"],"names":["useEditedContent","getContentNodeByKeyPath","NodeType","jsxs","jsx","StringWrapper","content"],"mappings":";;;;;;AAca,MAAA,cAAoC,CAAC,UAAU;AACpD,QAAA,EAAE,SAAS,QAAA,IAAY;AACvB,QAAA,EAAE,iBAAiB,IAAIA,6BAAiB;AAC9C,QAAM,qBAAqBC,KAAA;AAAA,IACzB,MAAM;AAAA,IACN;AAAA,EACF;AAEM,QAAA,aAAa,QAAQC,KAAA,SAAS,IAAI;AAClC,QAAA,EAAE,YAAY;AAEpB,QAAM,aAAwB;AAAA,IAC5B,GAAG;AAAA,IACH;AAAA,MACE,MAAMA,KAAAA,SAAS;AAAA,IAAA;AAAA,EAEnB;AAGE,SAAAC,2BAAA,KAAC,OAAI,EAAA,WAAU,wCACb,UAAA;AAAA,IAACA,2BAAAA,KAAA,QAAA,EAAK,WAAU,wBAAwB,UAAA;AAAA,MAAA;AAAA,MAAW;AAAA,IAAA,GAAC;AAAA,IACpDC,2BAAA;AAAA,MAACC,sDAAA;AAAA,MAAA;AAAA,QACE,GAAG;AAAA,QACJ,SAAS;AAAA,QACT,SAAS;AAAA,QACT,oBAAoB,oBAAoB;AAAA,QACxC,iBAAiB,CAACC,aAAY;AAC5B,kBAAQ,IAAI,OAAO;AAAA,YACjB;AAAA,YACA,MAAM;AAAA,cACJ,GAAG;AAAA,cACH,SAASA,SAAQ;AAAA,YACnB;AAAA,YACA;AAAA,YACA;AAAA,UAAA,CACD;AACD;AAAA,YACE,MAAM,WAAW;AAAA,YACjB;AAAA,cACE,GAAG;AAAA,cACH,SAASA,SAAQ;AAAA,YACnB;AAAA,YACA;AAAA,UACF;AAAA,QAAA;AAAA,MACF;AAAA,IAAA;AAAA,EACF,GACF;AAEJ;;"}
@@ -0,0 +1,9 @@
1
+ import { FileContent } from '@intlayer/core';
2
+ import { FC } from 'react';
3
+ import { StringWrapperProps } from './StringWrapper';
4
+ type FileWrapperProps = Omit<StringWrapperProps, 'section'> & {
5
+ section: FileContent;
6
+ };
7
+ export declare const FileWrapper: FC<FileWrapperProps>;
8
+ export {};
9
+ //# sourceMappingURL=FileWrapper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FileWrapper.d.ts","sourceRoot":"","sources":["../../../../src/components/DictionaryEditor/NodeWrapper/FileWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,WAAW,EAEjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,EAAiB,KAAK,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAEzE,KAAK,gBAAgB,GAAG,IAAI,CAAC,kBAAkB,EAAE,SAAS,CAAC,GAAG;IAC5D,OAAO,EAAE,WAAW,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CAgD5C,CAAC"}
@@ -0,0 +1,58 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { getContentNodeByKeyPath, NodeType } from "@intlayer/core";
3
+ import { useEditedContent } from "@intlayer/editor-react";
4
+ import { StringWrapper } from "./StringWrapper.mjs";
5
+ const FileWrapper = (props) => {
6
+ const { keyPath, section } = props;
7
+ const { addEditedContent } = useEditedContent();
8
+ const editedContentValue = getContentNodeByKeyPath(
9
+ props.editedContent,
10
+ keyPath
11
+ );
12
+ const subSection = section[NodeType.File];
13
+ const { content } = section;
14
+ const newKeyPath = [
15
+ ...keyPath,
16
+ {
17
+ type: NodeType.File
18
+ }
19
+ ];
20
+ return /* @__PURE__ */ jsxs("div", { className: "ml-2 grid grid-cols-[auto,1fr] gap-2", children: [
21
+ /* @__PURE__ */ jsxs("span", { className: "text-neutral text-sm", children: [
22
+ subSection,
23
+ " "
24
+ ] }),
25
+ /* @__PURE__ */ jsx(
26
+ StringWrapper,
27
+ {
28
+ ...props,
29
+ keyPath: newKeyPath,
30
+ section: content,
31
+ editedContentValue: editedContentValue?.content,
32
+ onContentChange: (content2) => {
33
+ console.log("lll", {
34
+ subSection,
35
+ file: {
36
+ ...section,
37
+ content: content2.newValue
38
+ },
39
+ keyPath,
40
+ newKeyPath
41
+ });
42
+ addEditedContent(
43
+ props.dictionary.key,
44
+ {
45
+ ...section,
46
+ content: content2.newValue
47
+ },
48
+ keyPath
49
+ );
50
+ }
51
+ }
52
+ )
53
+ ] });
54
+ };
55
+ export {
56
+ FileWrapper
57
+ };
58
+ //# sourceMappingURL=FileWrapper.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FileWrapper.mjs","sources":["../../../../src/components/DictionaryEditor/NodeWrapper/FileWrapper.tsx"],"sourcesContent":["import {\n getContentNodeByKeyPath,\n NodeType,\n type FileContent,\n type KeyPath,\n} from '@intlayer/core';\nimport type { FC } from 'react';\nimport { useEditedContent } from '@intlayer/editor-react';\nimport { StringWrapper, type StringWrapperProps } from './StringWrapper';\n\ntype FileWrapperProps = Omit<StringWrapperProps, 'section'> & {\n section: FileContent;\n};\n\nexport const FileWrapper: FC<FileWrapperProps> = (props) => {\n const { keyPath, section } = props;\n const { addEditedContent } = useEditedContent();\n const editedContentValue = getContentNodeByKeyPath(\n props.editedContent,\n keyPath\n ) as FileContent | undefined;\n\n const subSection = section[NodeType.File];\n const { content } = section;\n\n const newKeyPath: KeyPath[] = [\n ...keyPath,\n {\n type: NodeType.File,\n },\n ];\n\n return (\n <div className=\"ml-2 grid grid-cols-[auto,1fr] gap-2\">\n <span className=\"text-neutral text-sm\">{subSection} </span>\n <StringWrapper\n {...props}\n keyPath={newKeyPath}\n section={content}\n editedContentValue={editedContentValue?.content}\n onContentChange={(content) => {\n console.log('lll', {\n subSection,\n file: {\n ...section,\n content: content.newValue,\n },\n keyPath,\n newKeyPath,\n });\n addEditedContent(\n props.dictionary.key,\n {\n ...section,\n content: content.newValue,\n } as FileContent,\n keyPath\n );\n }}\n />\n </div>\n );\n};\n"],"names":["content"],"mappings":";;;;AAca,MAAA,cAAoC,CAAC,UAAU;AACpD,QAAA,EAAE,SAAS,QAAA,IAAY;AACvB,QAAA,EAAE,iBAAiB,IAAI,iBAAiB;AAC9C,QAAM,qBAAqB;AAAA,IACzB,MAAM;AAAA,IACN;AAAA,EACF;AAEM,QAAA,aAAa,QAAQ,SAAS,IAAI;AAClC,QAAA,EAAE,YAAY;AAEpB,QAAM,aAAwB;AAAA,IAC5B,GAAG;AAAA,IACH;AAAA,MACE,MAAM,SAAS;AAAA,IAAA;AAAA,EAEnB;AAGE,SAAA,qBAAC,OAAI,EAAA,WAAU,wCACb,UAAA;AAAA,IAAC,qBAAA,QAAA,EAAK,WAAU,wBAAwB,UAAA;AAAA,MAAA;AAAA,MAAW;AAAA,IAAA,GAAC;AAAA,IACpD;AAAA,MAAC;AAAA,MAAA;AAAA,QACE,GAAG;AAAA,QACJ,SAAS;AAAA,QACT,SAAS;AAAA,QACT,oBAAoB,oBAAoB;AAAA,QACxC,iBAAiB,CAACA,aAAY;AAC5B,kBAAQ,IAAI,OAAO;AAAA,YACjB;AAAA,YACA,MAAM;AAAA,cACJ,GAAG;AAAA,cACH,SAASA,SAAQ;AAAA,YACnB;AAAA,YACA;AAAA,YACA;AAAA,UAAA,CACD;AACD;AAAA,YACE,MAAM,WAAW;AAAA,YACjB;AAAA,cACE,GAAG;AAAA,cACH,SAASA,SAAQ;AAAA,YACnB;AAAA,YACA;AAAA,UACF;AAAA,QAAA;AAAA,MACF;AAAA,IAAA;AAAA,EACF,GACF;AAEJ;"}
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ require("react/jsx-runtime");
4
+ require("@intlayer/core");
5
+ const components_DictionaryEditor_NodeWrapper_ArrayWrapper = require("../../../index-s_Ar0FDw.cjs");
6
+ exports.InsertionWrapper = components_DictionaryEditor_NodeWrapper_ArrayWrapper.InsertionWrapper;
7
+ //# sourceMappingURL=InsertionWrapper.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InsertionWrapper.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
@@ -0,0 +1,9 @@
1
+ import { InsertionContent, ContentNode } from '@intlayer/core';
2
+ import { FC } from 'react';
3
+ import { NodeWrapperProps } from './index';
4
+ type InsertionWrapperProps = Omit<NodeWrapperProps, 'section'> & {
5
+ section: InsertionContent<ContentNode>;
6
+ };
7
+ export declare const InsertionWrapper: FC<InsertionWrapperProps>;
8
+ export {};
9
+ //# sourceMappingURL=InsertionWrapper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InsertionWrapper.d.ts","sourceRoot":"","sources":["../../../../src/components/DictionaryEditor/NodeWrapper/InsertionWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,gBAAgB,EACrB,KAAK,WAAW,EACjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAAe,KAAK,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE7D,KAAK,qBAAqB,GAAG,IAAI,CAAC,gBAAgB,EAAE,SAAS,CAAC,GAAG;IAC/D,OAAO,EAAE,gBAAgB,CAAC,WAAW,CAAC,CAAC;CACxC,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,CAiBtD,CAAC"}
@@ -0,0 +1,7 @@
1
+ import "react/jsx-runtime";
2
+ import "@intlayer/core";
3
+ import { I } from "../../../index-CEoL1j7H.js";
4
+ export {
5
+ I as InsertionWrapper
6
+ };
7
+ //# sourceMappingURL=InsertionWrapper.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InsertionWrapper.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
@@ -1,18 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const jsxRuntime = require("react/jsx-runtime");
4
- const core = require("@intlayer/core");
5
- const components_DictionaryEditor_NodeWrapper_StringWrapper = require("./StringWrapper.cjs");
6
- const MarkdownWrapper = (props) => {
7
- const { keyPath, section } = props;
8
- const newKeyPath = [
9
- ...keyPath,
10
- {
11
- type: core.NodeType.Markdown
12
- }
13
- ];
14
- const subSection = section[core.NodeType.Markdown];
15
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ml-2 grid grid-cols-[auto,1fr] gap-2", children: /* @__PURE__ */ jsxRuntime.jsx(components_DictionaryEditor_NodeWrapper_StringWrapper.StringWrapper, { ...props, keyPath: newKeyPath, section: subSection }) });
16
- };
17
- exports.MarkdownWrapper = MarkdownWrapper;
3
+ require("react/jsx-runtime");
4
+ require("@intlayer/core");
5
+ const components_DictionaryEditor_NodeWrapper_ArrayWrapper = require("../../../index-s_Ar0FDw.cjs");
6
+ exports.MarkdownWrapper = components_DictionaryEditor_NodeWrapper_ArrayWrapper.MarkdownWrapper;
18
7
  //# sourceMappingURL=MarkdownWrapper.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"MarkdownWrapper.cjs","sources":["../../../../src/components/DictionaryEditor/NodeWrapper/MarkdownWrapper.tsx"],"sourcesContent":["import { type KeyPath, NodeType, type MarkdownContent } from '@intlayer/core';\nimport type { FC } from 'react';\nimport { type NodeWrapperProps } from './index';\nimport { StringWrapper } from './StringWrapper';\n\ntype MarkdownWrapperProps = Omit<NodeWrapperProps, 'section'> & {\n section: MarkdownContent;\n};\n\nexport const MarkdownWrapper: FC<MarkdownWrapperProps> = (props) => {\n const { keyPath, section } = props;\n\n const newKeyPath: KeyPath[] = [\n ...keyPath,\n {\n type: NodeType.Markdown,\n },\n ];\n\n const subSection = section[NodeType.Markdown];\n\n return (\n <div className=\"ml-2 grid grid-cols-[auto,1fr] gap-2\">\n <StringWrapper {...props} keyPath={newKeyPath} section={subSection} />\n </div>\n );\n};\n"],"names":["NodeType","jsx","StringWrapper"],"mappings":";;;;;AASa,MAAA,kBAA4C,CAAC,UAAU;AAC5D,QAAA,EAAE,SAAS,QAAA,IAAY;AAE7B,QAAM,aAAwB;AAAA,IAC5B,GAAG;AAAA,IACH;AAAA,MACE,MAAMA,KAAAA,SAAS;AAAA,IAAA;AAAA,EAEnB;AAEM,QAAA,aAAa,QAAQA,KAAA,SAAS,QAAQ;AAE5C,SACGC,2BAAAA,IAAA,OAAA,EAAI,WAAU,wCACb,UAACA,+BAAAC,sDAAAA,eAAA,EAAe,GAAG,OAAO,SAAS,YAAY,SAAS,WAAY,CAAA,GACtE;AAEJ;;"}
1
+ {"version":3,"file":"MarkdownWrapper.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
@@ -1,8 +1,8 @@
1
- import { MarkdownContent } from '@intlayer/core';
1
+ import { MarkdownContent, ContentNode } from '@intlayer/core';
2
2
  import { FC } from 'react';
3
3
  import { NodeWrapperProps } from './index';
4
4
  type MarkdownWrapperProps = Omit<NodeWrapperProps, 'section'> & {
5
- section: MarkdownContent;
5
+ section: MarkdownContent<ContentNode>;
6
6
  };
7
7
  export declare const MarkdownWrapper: FC<MarkdownWrapperProps>;
8
8
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"MarkdownWrapper.d.ts","sourceRoot":"","sources":["../../../../src/components/DictionaryEditor/NodeWrapper/MarkdownWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA0B,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC9E,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAGhD,KAAK,oBAAoB,GAAG,IAAI,CAAC,gBAAgB,EAAE,SAAS,CAAC,GAAG;IAC9D,OAAO,EAAE,eAAe,CAAC;CAC1B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CAiBpD,CAAC"}
1
+ {"version":3,"file":"MarkdownWrapper.d.ts","sourceRoot":"","sources":["../../../../src/components/DictionaryEditor/NodeWrapper/MarkdownWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,eAAe,EACpB,KAAK,WAAW,EACjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAAe,KAAK,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE7D,KAAK,oBAAoB,GAAG,IAAI,CAAC,gBAAgB,EAAE,SAAS,CAAC,GAAG;IAC9D,OAAO,EAAE,eAAe,CAAC,WAAW,CAAC,CAAC;CACvC,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CAiBpD,CAAC"}
@@ -1,18 +1,7 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import { NodeType } from "@intlayer/core";
3
- import { StringWrapper } from "./StringWrapper.mjs";
4
- const MarkdownWrapper = (props) => {
5
- const { keyPath, section } = props;
6
- const newKeyPath = [
7
- ...keyPath,
8
- {
9
- type: NodeType.Markdown
10
- }
11
- ];
12
- const subSection = section[NodeType.Markdown];
13
- return /* @__PURE__ */ jsx("div", { className: "ml-2 grid grid-cols-[auto,1fr] gap-2", children: /* @__PURE__ */ jsx(StringWrapper, { ...props, keyPath: newKeyPath, section: subSection }) });
14
- };
1
+ import "react/jsx-runtime";
2
+ import "@intlayer/core";
3
+ import { M } from "../../../index-CEoL1j7H.js";
15
4
  export {
16
- MarkdownWrapper
5
+ M as MarkdownWrapper
17
6
  };
18
7
  //# sourceMappingURL=MarkdownWrapper.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"MarkdownWrapper.mjs","sources":["../../../../src/components/DictionaryEditor/NodeWrapper/MarkdownWrapper.tsx"],"sourcesContent":["import { type KeyPath, NodeType, type MarkdownContent } from '@intlayer/core';\nimport type { FC } from 'react';\nimport { type NodeWrapperProps } from './index';\nimport { StringWrapper } from './StringWrapper';\n\ntype MarkdownWrapperProps = Omit<NodeWrapperProps, 'section'> & {\n section: MarkdownContent;\n};\n\nexport const MarkdownWrapper: FC<MarkdownWrapperProps> = (props) => {\n const { keyPath, section } = props;\n\n const newKeyPath: KeyPath[] = [\n ...keyPath,\n {\n type: NodeType.Markdown,\n },\n ];\n\n const subSection = section[NodeType.Markdown];\n\n return (\n <div className=\"ml-2 grid grid-cols-[auto,1fr] gap-2\">\n <StringWrapper {...props} keyPath={newKeyPath} section={subSection} />\n </div>\n );\n};\n"],"names":[],"mappings":";;;AASa,MAAA,kBAA4C,CAAC,UAAU;AAC5D,QAAA,EAAE,SAAS,QAAA,IAAY;AAE7B,QAAM,aAAwB;AAAA,IAC5B,GAAG;AAAA,IACH;AAAA,MACE,MAAM,SAAS;AAAA,IAAA;AAAA,EAEnB;AAEM,QAAA,aAAa,QAAQ,SAAS,QAAQ;AAE5C,SACG,oBAAA,OAAA,EAAI,WAAU,wCACb,UAAC,oBAAA,eAAA,EAAe,GAAG,OAAO,SAAS,YAAY,SAAS,WAAY,CAAA,GACtE;AAEJ;"}
1
+ {"version":3,"file":"MarkdownWrapper.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
@@ -3,6 +3,6 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  require("react/jsx-runtime");
4
4
  require("@intlayer/core");
5
5
  require("../ItemLayout.cjs");
6
- const components_DictionaryEditor_NodeWrapper_ArrayWrapper = require("../../../index-BpCAhDMe.cjs");
6
+ const components_DictionaryEditor_NodeWrapper_ArrayWrapper = require("../../../index-s_Ar0FDw.cjs");
7
7
  exports.NestedObjectWrapper = components_DictionaryEditor_NodeWrapper_ArrayWrapper.NestedObjectWrapper;
8
8
  //# sourceMappingURL=NestedObjectWrapper.cjs.map
@@ -1,7 +1,7 @@
1
1
  import "react/jsx-runtime";
2
2
  import "@intlayer/core";
3
3
  import "../ItemLayout.mjs";
4
- import { a } from "../../../index-CVTE3oHq.js";
4
+ import { a } from "../../../index-CEoL1j7H.js";
5
5
  export {
6
6
  a as NestedObjectWrapper
7
7
  };
@@ -13,15 +13,17 @@ const StringWrapper = ({
13
13
  keyPath,
14
14
  section,
15
15
  editedContent,
16
+ editedContentValue: editedContentValueProp,
16
17
  onContentChange,
17
- onFocusKeyPath
18
+ onFocusKeyPath,
19
+ renderSection
18
20
  }) => {
19
- const editedContentValue = core.getContentNodeByKeyPath(editedContent, keyPath);
21
+ const editedContentValue = editedContentValueProp ?? core.getContentNodeByKeyPath(editedContent, keyPath);
20
22
  if (editedContentValue && typeof editedContentValue !== "string") {
21
23
  return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: "Error loading section - Edited content Incoherence with the original content format" });
22
24
  }
23
25
  const level = keyPath.length;
24
- const content = editedContentValue ?? section;
26
+ const content = String(editedContentValue ?? section);
25
27
  return /* @__PURE__ */ jsxRuntime.jsx(
26
28
  "span",
27
29
  {
@@ -37,10 +39,11 @@ const StringWrapper = ({
37
39
  e.stopPropagation();
38
40
  onFocusKeyPath(keyPath);
39
41
  },
40
- children: /* @__PURE__ */ jsxRuntime.jsx(
42
+ children: typeof renderSection === "function" ? renderSection(content) : /* @__PURE__ */ jsxRuntime.jsx(
41
43
  components_EditableField_EditableFieldTextArea.EditableFieldTextArea,
42
44
  {
43
- defaultValue: String(content),
45
+ "aria-label": "Editable field",
46
+ defaultValue: content,
44
47
  onSave: (newValue) => onContentChange({ keyPath, newValue }),
45
48
  onCancel: () => null
46
49
  }