@intlayer/design-system 3.5.4 → 3.5.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 (224) hide show
  1. package/dist/.vite/manifest.json +112 -45
  2. package/dist/CopyButton-Cxu3goRg.cjs +59 -0
  3. package/dist/CopyButton-Cxu3goRg.cjs.map +1 -0
  4. package/dist/CopyButton-DlcDlf6U.js +60 -0
  5. package/dist/CopyButton-DlcDlf6U.js.map +1 -0
  6. package/dist/components/Auth/SignUpForm/signUpForm.content.d.ts +11 -11
  7. package/dist/components/Auth/useAuth/useSession.cjs +1 -0
  8. package/dist/components/Auth/useAuth/useSession.cjs.map +1 -1
  9. package/dist/components/Auth/useAuth/useSession.mjs +1 -0
  10. package/dist/components/Auth/useAuth/useSession.mjs.map +1 -1
  11. package/dist/components/Breadcrumb/breadcrumb.content.cjs +26 -0
  12. package/dist/components/Breadcrumb/breadcrumb.content.cjs.map +1 -0
  13. package/dist/components/Breadcrumb/breadcrumb.content.d.ts +8 -0
  14. package/dist/components/Breadcrumb/breadcrumb.content.d.ts.map +1 -0
  15. package/dist/components/Breadcrumb/breadcrumb.content.mjs +26 -0
  16. package/dist/components/Breadcrumb/breadcrumb.content.mjs.map +1 -0
  17. package/dist/components/Breadcrumb/index.cjs +103 -34
  18. package/dist/components/Breadcrumb/index.cjs.map +1 -1
  19. package/dist/components/Breadcrumb/index.d.ts +6 -2
  20. package/dist/components/Breadcrumb/index.d.ts.map +1 -1
  21. package/dist/components/Breadcrumb/index.mjs +103 -34
  22. package/dist/components/Breadcrumb/index.mjs.map +1 -1
  23. package/dist/components/Button/Button.cjs +7 -8
  24. package/dist/components/Button/Button.cjs.map +1 -1
  25. package/dist/components/Button/Button.d.ts.map +1 -1
  26. package/dist/components/Button/Button.mjs +7 -8
  27. package/dist/components/Button/Button.mjs.map +1 -1
  28. package/dist/components/Container/index.cjs +2 -2
  29. package/dist/components/Container/index.cjs.map +1 -1
  30. package/dist/components/Container/index.mjs +2 -2
  31. package/dist/components/Container/index.mjs.map +1 -1
  32. package/dist/components/DictionaryEditor/index.cjs +4 -0
  33. package/dist/components/DictionaryEditor/index.cjs.map +1 -1
  34. package/dist/components/DictionaryEditor/index.mjs +4 -0
  35. package/dist/components/DictionaryEditor/index.mjs.map +1 -1
  36. package/dist/components/DictionaryEditor/useEditedContentStore.cjs +3 -0
  37. package/dist/components/DictionaryEditor/useEditedContentStore.cjs.map +1 -1
  38. package/dist/components/DictionaryEditor/useEditedContentStore.d.ts +2 -2
  39. package/dist/components/DictionaryEditor/useEditedContentStore.d.ts.map +1 -1
  40. package/dist/components/DictionaryEditor/useEditedContentStore.mjs +3 -0
  41. package/dist/components/DictionaryEditor/useEditedContentStore.mjs.map +1 -1
  42. package/dist/components/DictionaryEditor/useEditionPanelStore.cjs.map +1 -1
  43. package/dist/components/DictionaryEditor/useEditionPanelStore.d.ts +1 -1
  44. package/dist/components/DictionaryEditor/useEditionPanelStore.d.ts.map +1 -1
  45. package/dist/components/DictionaryEditor/useEditionPanelStore.mjs.map +1 -1
  46. package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.cjs +7 -5
  47. package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.cjs.map +1 -1
  48. package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.d.ts +1 -0
  49. package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.d.ts.map +1 -1
  50. package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.mjs +7 -5
  51. package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.mjs.map +1 -1
  52. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.cjs +6 -3
  53. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.cjs.map +1 -1
  54. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.d.ts +1 -0
  55. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.d.ts.map +1 -1
  56. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs +6 -3
  57. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs.map +1 -1
  58. package/dist/components/DictionaryFieldEditor/JSONEditor.cjs +20 -18
  59. package/dist/components/DictionaryFieldEditor/JSONEditor.cjs.map +1 -1
  60. package/dist/components/DictionaryFieldEditor/JSONEditor.d.ts +1 -0
  61. package/dist/components/DictionaryFieldEditor/JSONEditor.d.ts.map +1 -1
  62. package/dist/components/DictionaryFieldEditor/JSONEditor.mjs +20 -18
  63. package/dist/components/DictionaryFieldEditor/JSONEditor.mjs.map +1 -1
  64. package/dist/components/DictionaryFieldEditor/KeyPathBreadcrumb.cjs +10 -2
  65. package/dist/components/DictionaryFieldEditor/KeyPathBreadcrumb.cjs.map +1 -1
  66. package/dist/components/DictionaryFieldEditor/KeyPathBreadcrumb.d.ts +2 -0
  67. package/dist/components/DictionaryFieldEditor/KeyPathBreadcrumb.d.ts.map +1 -1
  68. package/dist/components/DictionaryFieldEditor/KeyPathBreadcrumb.mjs +10 -2
  69. package/dist/components/DictionaryFieldEditor/KeyPathBreadcrumb.mjs.map +1 -1
  70. package/dist/components/DictionaryFieldEditor/NodeEditor.cjs +10 -14
  71. package/dist/components/DictionaryFieldEditor/NodeEditor.cjs.map +1 -1
  72. package/dist/components/DictionaryFieldEditor/NodeEditor.d.ts.map +1 -1
  73. package/dist/components/DictionaryFieldEditor/NodeEditor.mjs +10 -14
  74. package/dist/components/DictionaryFieldEditor/NodeEditor.mjs.map +1 -1
  75. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs +60 -17
  76. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs.map +1 -1
  77. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.d.ts.map +1 -1
  78. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs +63 -20
  79. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs.map +1 -1
  80. package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.cjs +32 -0
  81. package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.cjs.map +1 -1
  82. package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.d.ts +4 -0
  83. package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.d.ts.map +1 -1
  84. package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.mjs +32 -0
  85. package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.mjs.map +1 -1
  86. package/dist/components/DropDown/index.cjs.map +1 -1
  87. package/dist/components/DropDown/index.d.ts +18 -1
  88. package/dist/components/DropDown/index.d.ts.map +1 -1
  89. package/dist/components/DropDown/index.mjs.map +1 -1
  90. package/dist/components/Headers/index.cjs +1 -1
  91. package/dist/components/Headers/index.cjs.map +1 -1
  92. package/dist/components/Headers/index.mjs +1 -1
  93. package/dist/components/Headers/index.mjs.map +1 -1
  94. package/dist/components/IDE/CodeRender copy.cjs +141 -0
  95. package/dist/components/IDE/CodeRender copy.cjs.map +1 -0
  96. package/dist/components/IDE/CodeRender copy.d.ts +14 -0
  97. package/dist/components/IDE/CodeRender copy.d.ts.map +1 -0
  98. package/dist/components/IDE/CodeRender copy.mjs +141 -0
  99. package/dist/components/IDE/CodeRender copy.mjs.map +1 -0
  100. package/dist/components/IDE/CodeRender.cjs +39 -625
  101. package/dist/components/IDE/CodeRender.cjs.map +1 -1
  102. package/dist/components/IDE/CodeRender.d.ts +4 -5
  103. package/dist/components/IDE/CodeRender.d.ts.map +1 -1
  104. package/dist/components/IDE/CodeRender.mjs +40 -604
  105. package/dist/components/IDE/CodeRender.mjs.map +1 -1
  106. package/dist/components/IDE/CopyButton.cjs +40 -0
  107. package/dist/components/IDE/CopyButton.cjs.map +1 -0
  108. package/dist/components/IDE/CopyButton.content.cjs +26 -0
  109. package/dist/components/IDE/CopyButton.content.cjs.map +1 -0
  110. package/dist/components/IDE/CopyButton.content.d.ts +8 -0
  111. package/dist/components/IDE/CopyButton.content.d.ts.map +1 -0
  112. package/dist/components/IDE/CopyButton.content.mjs +26 -0
  113. package/dist/components/IDE/CopyButton.content.mjs.map +1 -0
  114. package/dist/components/IDE/CopyButton.d.ts +7 -0
  115. package/dist/components/IDE/CopyButton.d.ts.map +1 -0
  116. package/dist/components/IDE/CopyButton.mjs +40 -0
  117. package/dist/components/IDE/CopyButton.mjs.map +1 -0
  118. package/dist/components/IDE/IDE.cjs +1 -1
  119. package/dist/components/IDE/IDE.cjs.map +1 -1
  120. package/dist/components/IDE/IDE.mjs +1 -1
  121. package/dist/components/IDE/IDE.mjs.map +1 -1
  122. package/dist/components/IDE/MarkDownRender.cjs +10 -2
  123. package/dist/components/IDE/MarkDownRender.cjs.map +1 -1
  124. package/dist/components/IDE/MarkDownRender.d.ts.map +1 -1
  125. package/dist/components/IDE/MarkDownRender.mjs +10 -2
  126. package/dist/components/IDE/MarkDownRender.mjs.map +1 -1
  127. package/dist/components/IDE/MonacoCode.cjs +129 -0
  128. package/dist/components/IDE/MonacoCode.cjs.map +1 -0
  129. package/dist/components/IDE/MonacoCode.d.ts +14 -0
  130. package/dist/components/IDE/MonacoCode.d.ts.map +1 -0
  131. package/dist/components/IDE/MonacoCode.mjs +129 -0
  132. package/dist/components/IDE/MonacoCode.mjs.map +1 -0
  133. package/dist/components/Link/Link.cjs +50 -31
  134. package/dist/components/Link/Link.cjs.map +1 -1
  135. package/dist/components/Link/Link.d.ts +3 -0
  136. package/dist/components/Link/Link.d.ts.map +1 -1
  137. package/dist/components/Link/Link.mjs +51 -32
  138. package/dist/components/Link/Link.mjs.map +1 -1
  139. package/dist/components/Link/index.cjs +1 -0
  140. package/dist/components/Link/index.cjs.map +1 -1
  141. package/dist/components/Link/index.mjs +3 -2
  142. package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.cjs +118 -34
  143. package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.cjs.map +1 -1
  144. package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.d.ts +2 -0
  145. package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.d.ts.map +1 -1
  146. package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.mjs +119 -35
  147. package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.mjs.map +1 -1
  148. package/dist/components/LocaleSwitcherDropDown/localeSwitcher.content.cjs +63 -1
  149. package/dist/components/LocaleSwitcherDropDown/localeSwitcher.content.cjs.map +1 -1
  150. package/dist/components/LocaleSwitcherDropDown/localeSwitcher.content.d.ts +6 -0
  151. package/dist/components/LocaleSwitcherDropDown/localeSwitcher.content.d.ts.map +1 -1
  152. package/dist/components/LocaleSwitcherDropDown/localeSwitcher.content.mjs +63 -1
  153. package/dist/components/LocaleSwitcherDropDown/localeSwitcher.content.mjs.map +1 -1
  154. package/dist/components/MarkDownRender/index.cjs +4 -2
  155. package/dist/components/MarkDownRender/index.cjs.map +1 -1
  156. package/dist/components/MarkDownRender/index.d.ts +3 -1
  157. package/dist/components/MarkDownRender/index.d.ts.map +1 -1
  158. package/dist/components/MarkDownRender/index.mjs +4 -2
  159. package/dist/components/MarkDownRender/index.mjs.map +1 -1
  160. package/dist/components/Modal/Modal.cjs +8 -10
  161. package/dist/components/Modal/Modal.cjs.map +1 -1
  162. package/dist/components/Modal/Modal.d.ts.map +1 -1
  163. package/dist/components/Modal/Modal.mjs +8 -10
  164. package/dist/components/Modal/Modal.mjs.map +1 -1
  165. package/dist/components/Navbar/DesktopNavbar.cjs +1 -1
  166. package/dist/components/Navbar/DesktopNavbar.cjs.map +1 -1
  167. package/dist/components/Navbar/DesktopNavbar.mjs +1 -1
  168. package/dist/components/Navbar/DesktopNavbar.mjs.map +1 -1
  169. package/dist/components/index.cjs +5 -0
  170. package/dist/components/index.cjs.map +1 -1
  171. package/dist/components/index.mjs +6 -1
  172. package/dist/components/index.mjs.map +1 -1
  173. package/dist/design-system.css +235 -0
  174. package/dist/hooks/index.cjs +6 -0
  175. package/dist/hooks/index.cjs.map +1 -1
  176. package/dist/hooks/index.d.ts +1 -0
  177. package/dist/hooks/index.d.ts.map +1 -1
  178. package/dist/hooks/index.mjs +7 -1
  179. package/dist/hooks/index.mjs.map +1 -1
  180. package/dist/hooks/intlayerAPIHooks.cjs +8 -2
  181. package/dist/hooks/intlayerAPIHooks.cjs.map +1 -1
  182. package/dist/hooks/intlayerAPIHooks.d.ts +4 -0
  183. package/dist/hooks/intlayerAPIHooks.d.ts.map +1 -1
  184. package/dist/hooks/intlayerAPIHooks.mjs +8 -2
  185. package/dist/hooks/intlayerAPIHooks.mjs.map +1 -1
  186. package/dist/hooks/useAsync/index.cjs +3 -0
  187. package/dist/hooks/useAsync/index.cjs.map +1 -1
  188. package/dist/hooks/useAsync/index.d.ts +1 -0
  189. package/dist/hooks/useAsync/index.d.ts.map +1 -1
  190. package/dist/hooks/useAsync/index.mjs +4 -1
  191. package/dist/hooks/useAsync/index.mjs.map +1 -1
  192. package/dist/hooks/useAsync/useAsync.cjs +2 -9
  193. package/dist/hooks/useAsync/useAsync.cjs.map +1 -1
  194. package/dist/hooks/useAsync/useAsync.d.ts.map +1 -1
  195. package/dist/hooks/useAsync/useAsync.mjs +3 -10
  196. package/dist/hooks/useAsync/useAsync.mjs.map +1 -1
  197. package/dist/hooks/useAsync/useAsyncStateStore.cjs +123 -69
  198. package/dist/hooks/useAsync/useAsyncStateStore.cjs.map +1 -1
  199. package/dist/hooks/useAsync/useAsyncStateStore.d.ts +35 -11
  200. package/dist/hooks/useAsync/useAsyncStateStore.d.ts.map +1 -1
  201. package/dist/hooks/useAsync/useAsyncStateStore.mjs +123 -69
  202. package/dist/hooks/useAsync/useAsyncStateStore.mjs.map +1 -1
  203. package/dist/hooks/useIntlayerAPI.d.ts +3 -0
  204. package/dist/hooks/useIntlayerAPI.d.ts.map +1 -1
  205. package/dist/hooks/useIsDarkMode.cjs +15 -0
  206. package/dist/hooks/useIsDarkMode.cjs.map +1 -0
  207. package/dist/hooks/useIsDarkMode.d.ts +2 -0
  208. package/dist/hooks/useIsDarkMode.d.ts.map +1 -0
  209. package/dist/hooks/useIsDarkMode.mjs +15 -0
  210. package/dist/hooks/useIsDarkMode.mjs.map +1 -0
  211. package/dist/libs/intlayer-api/ai.cjs +24 -0
  212. package/dist/libs/intlayer-api/ai.cjs.map +1 -0
  213. package/dist/libs/intlayer-api/ai.d.ts +10 -0
  214. package/dist/libs/intlayer-api/ai.d.ts.map +1 -0
  215. package/dist/libs/intlayer-api/ai.mjs +24 -0
  216. package/dist/libs/intlayer-api/ai.mjs.map +1 -0
  217. package/dist/libs/intlayer-api/index.cjs +3 -1
  218. package/dist/libs/intlayer-api/index.cjs.map +1 -1
  219. package/dist/libs/intlayer-api/index.d.ts +6 -0
  220. package/dist/libs/intlayer-api/index.d.ts.map +1 -1
  221. package/dist/libs/intlayer-api/index.mjs +3 -1
  222. package/dist/libs/intlayer-api/index.mjs.map +1 -1
  223. package/dist/tailwind.css +1 -1
  224. package/package.json +19 -16
@@ -1,9 +1,8 @@
1
1
  import { j as jsxRuntimeExports } from "../../jsx-runtime-DaNGiM0W.js";
2
+ import { useMemo } from "react";
2
3
  import { u as useShallow } from "../../shallow-m9BpCkKh.js";
3
- import { ContentEditorTextArea } from "../ContentEditor/ContentEditorTextArea.mjs";
4
4
  import { useEditedContentStore } from "../DictionaryEditor/useEditedContentStore.mjs";
5
5
  import "../DictionaryEditor/useEditionPanelStore.mjs";
6
- import "react";
7
6
  import "@intlayer/core";
8
7
  import "lucide-react";
9
8
  import "clsx";
@@ -24,8 +23,8 @@ import "../Form/FormField.mjs";
24
23
  import "../../Form-DhsgC7kB.js";
25
24
  import "../DictionaryEditor/validDictionaryChangeButtons.content.mjs";
26
25
  import "zod";
27
- import { SaveForm } from "./SaveForm/SaveForm.mjs";
28
- const JSONEditor = ({ dictionary }) => {
26
+ import { MonacoCode } from "../IDE/MonacoCode.mjs";
27
+ const JSONEditor = ({ dictionary, isDarkMode }) => {
29
28
  const { setEditedContent, editedContent } = useEditedContentStore(
30
29
  useShallow((s) => ({
31
30
  editedContent: s.editedContent,
@@ -40,21 +39,24 @@ const JSONEditor = ({ dictionary }) => {
40
39
  return false;
41
40
  }
42
41
  };
43
- const displayedContent = editedContent[dictionary.key]?.content ?? dictionary?.content ?? {};
44
- return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
45
- /* @__PURE__ */ jsxRuntimeExports.jsx(
46
- ContentEditorTextArea,
47
- {
48
- onContentChange: (content) => setEditedContent(dictionary.key, JSON.parse(content)),
49
- validate: isValidJSON,
50
- className: "text-sm",
51
- variant: "default",
52
- children: JSON.stringify(displayedContent, null, 2)
42
+ const displayedContent = useMemo(
43
+ () => editedContent[dictionary.key]?.content ?? dictionary?.content ?? {},
44
+ // eslint-disable-next-line react-hooks/exhaustive-deps
45
+ [dictionary]
46
+ );
47
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "overflow-hidden rounded-md", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
48
+ MonacoCode,
49
+ {
50
+ language: "json",
51
+ onChange: (content) => {
52
+ if (isValidJSON(content ?? "{}")) {
53
+ setEditedContent(dictionary.key, JSON.parse(content ?? "{}"));
54
+ }
53
55
  },
54
- JSON.stringify(displayedContent)
55
- ),
56
- /* @__PURE__ */ jsxRuntimeExports.jsx(SaveForm, { dictionary })
57
- ] });
56
+ isDarkMode,
57
+ children: JSON.stringify(displayedContent, null, 2)
58
+ }
59
+ ) });
58
60
  };
59
61
  export {
60
62
  JSONEditor
@@ -1 +1 @@
1
- {"version":3,"file":"JSONEditor.mjs","sources":["../../../src/components/DictionaryFieldEditor/JSONEditor.tsx"],"sourcesContent":["import { Dictionary } from '@intlayer/core';\nimport type { FC } from 'react';\nimport { useShallow } from 'zustand/react/shallow';\nimport { ContentEditorTextArea } from '../ContentEditor/ContentEditorTextArea';\nimport { useEditedContentStore } from '../DictionaryEditor';\nimport { SaveForm } from './SaveForm/SaveForm';\n\ntype JSONEditorProps = {\n dictionary: Dictionary;\n};\n\nexport const JSONEditor: FC<JSONEditorProps> = ({ dictionary }) => {\n const { setEditedContent, editedContent } = useEditedContentStore(\n useShallow((s) => ({\n editedContent: s.editedContent,\n setEditedContent: s.setEditedContent,\n }))\n );\n\n const isValidJSON = (jsonString: string): boolean => {\n try {\n JSON.parse(jsonString);\n return true; // Valid JSON\n } catch (_error) {\n return false; // Invalid JSON\n }\n };\n\n const displayedContent =\n editedContent[dictionary.key]?.content ?? dictionary?.content ?? {};\n\n return (\n <>\n <ContentEditorTextArea\n key={JSON.stringify(displayedContent)}\n onContentChange={(content) =>\n setEditedContent(dictionary.key, JSON.parse(content))\n }\n validate={isValidJSON}\n className=\"text-sm\"\n variant=\"default\"\n >\n {JSON.stringify(displayedContent, null, 2)}\n </ContentEditorTextArea>\n <SaveForm dictionary={dictionary} />\n </>\n );\n};\n"],"names":["jsxs","Fragment","jsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAWO,MAAM,aAAkC,CAAC,EAAE,iBAAiB;AAC3D,QAAA,EAAE,kBAAkB,cAAA,IAAkB;AAAA,IAC1C,WAAW,CAAC,OAAO;AAAA,MACjB,eAAe,EAAE;AAAA,MACjB,kBAAkB,EAAE;AAAA,IAAA,EACpB;AAAA,EACJ;AAEM,QAAA,cAAc,CAAC,eAAgC;AAC/C,QAAA;AACF,WAAK,MAAM,UAAU;AACd,aAAA;AAAA,aACA,QAAQ;AACR,aAAA;AAAA,IAAA;AAAA,EAEX;AAEM,QAAA,mBACJ,cAAc,WAAW,GAAG,GAAG,WAAW,YAAY,WAAW,CAAC;AAEpE,SAEIA,kCAAA,KAAAC,4BAAA,EAAA,UAAA;AAAA,IAAAC,kCAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QAEC,iBAAiB,CAAC,YAChB,iBAAiB,WAAW,KAAK,KAAK,MAAM,OAAO,CAAC;AAAA,QAEtD,UAAU;AAAA,QACV,WAAU;AAAA,QACV,SAAQ;AAAA,QAEP,UAAK,KAAA,UAAU,kBAAkB,MAAM,CAAC;AAAA,MAAA;AAAA,MARpC,KAAK,UAAU,gBAAgB;AAAA,IAStC;AAAA,IACAA,sCAAC,YAAS,WAAwB,CAAA;AAAA,EAAA,GACpC;AAEJ;"}
1
+ {"version":3,"file":"JSONEditor.mjs","sources":["../../../src/components/DictionaryFieldEditor/JSONEditor.tsx"],"sourcesContent":["import { Dictionary } from '@intlayer/core';\nimport { useMemo, type FC } from 'react';\nimport { useShallow } from 'zustand/react/shallow';\nimport { useEditedContentStore } from '../DictionaryEditor';\nimport { MonacoCode } from '../IDE/MonacoCode';\n\ntype JSONEditorProps = {\n dictionary: Dictionary;\n isDarkMode?: boolean;\n};\n\nexport const JSONEditor: FC<JSONEditorProps> = ({ dictionary, isDarkMode }) => {\n const { setEditedContent, editedContent } = useEditedContentStore(\n useShallow((s) => ({\n editedContent: s.editedContent,\n setEditedContent: s.setEditedContent,\n }))\n );\n\n const isValidJSON = (jsonString: string): boolean => {\n try {\n JSON.parse(jsonString);\n return true; // Valid JSON\n } catch (_error) {\n return false; // Invalid JSON\n }\n };\n\n const displayedContent = useMemo(\n () => editedContent[dictionary.key]?.content ?? dictionary?.content ?? {},\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [dictionary]\n );\n\n return (\n <div className=\"overflow-hidden rounded-md\">\n <MonacoCode\n language=\"json\"\n onChange={(content) => {\n if (isValidJSON(content ?? '{}')) {\n setEditedContent(dictionary.key, JSON.parse(content ?? '{}'));\n }\n }}\n isDarkMode={isDarkMode}\n >\n {JSON.stringify(displayedContent, null, 2)}\n </MonacoCode>\n </div>\n );\n};\n"],"names":["jsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAWO,MAAM,aAAkC,CAAC,EAAE,YAAY,iBAAiB;AACvE,QAAA,EAAE,kBAAkB,cAAA,IAAkB;AAAA,IAC1C,WAAW,CAAC,OAAO;AAAA,MACjB,eAAe,EAAE;AAAA,MACjB,kBAAkB,EAAE;AAAA,IAAA,EACpB;AAAA,EACJ;AAEM,QAAA,cAAc,CAAC,eAAgC;AAC/C,QAAA;AACF,WAAK,MAAM,UAAU;AACd,aAAA;AAAA,aACA,QAAQ;AACR,aAAA;AAAA,IAAA;AAAA,EAEX;AAEA,QAAM,mBAAmB;AAAA,IACvB,MAAM,cAAc,WAAW,GAAG,GAAG,WAAW,YAAY,WAAW,CAAC;AAAA;AAAA,IAExE,CAAC,UAAU;AAAA,EACb;AAGE,SAAAA,kCAAAA,IAAC,OAAI,EAAA,WAAU,8BACb,UAAAA,kCAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,UAAS;AAAA,MACT,UAAU,CAAC,YAAY;AACjB,YAAA,YAAY,WAAW,IAAI,GAAG;AAChC,2BAAiB,WAAW,KAAK,KAAK,MAAM,WAAW,IAAI,CAAC;AAAA,QAAA;AAAA,MAEhE;AAAA,MACA;AAAA,MAEC,UAAK,KAAA,UAAU,kBAAkB,MAAM,CAAC;AAAA,IAAA;AAAA,EAAA,GAE7C;AAEJ;"}
@@ -5,7 +5,8 @@ const components_Breadcrumb_index = require("../Breadcrumb/index.cjs");
5
5
  const KeyPathBreadcrumb = ({
6
6
  keyPath,
7
7
  dictionaryKey,
8
- onClickKeyPath
8
+ onClickKeyPath,
9
+ locale
9
10
  }) => {
10
11
  const formattedKeyPath = [
11
12
  { text: dictionaryKey, onClick: () => onClickKeyPath([]) },
@@ -16,7 +17,14 @@ const KeyPathBreadcrumb = ({
16
17
  text: el.key.toString()
17
18
  }))
18
19
  ];
19
- return /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(components_Breadcrumb_index.Breadcrumb, { links: formattedKeyPath });
20
+ return /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
21
+ components_Breadcrumb_index.Breadcrumb,
22
+ {
23
+ links: formattedKeyPath,
24
+ locale,
25
+ elementType: "location"
26
+ }
27
+ );
20
28
  };
21
29
  exports.KeyPathBreadcrumb = KeyPathBreadcrumb;
22
30
  //# sourceMappingURL=KeyPathBreadcrumb.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"KeyPathBreadcrumb.cjs","sources":["../../../src/components/DictionaryFieldEditor/KeyPathBreadcrumb.tsx"],"sourcesContent":["import type { KeyPath } from '@intlayer/core';\nimport type { FC } from 'react';\nimport { Breadcrumb, type BreadcrumbLink } from '../Breadcrumb';\n\ntype KeyPathBreadcrumbProps = {\n dictionaryKey: string;\n keyPath: KeyPath[];\n onClickKeyPath: (keyPath: KeyPath[]) => void;\n};\n\nexport const KeyPathBreadcrumb: FC<KeyPathBreadcrumbProps> = ({\n keyPath,\n dictionaryKey,\n onClickKeyPath,\n}) => {\n const formattedKeyPath: BreadcrumbLink[] = [\n { text: dictionaryKey, onClick: () => onClickKeyPath([]) },\n ...keyPath.map((el, index) => ({\n onClick: () =>\n onClickKeyPath(\n keyPath\n // With keyPath = [{type: NodeType.Object, key: '0'}, {type: NodeType.Array, key: '0'}, {type: NodeType.Object, key: '1'}]\n // If index is 0 -> onFocusKeyPath([{type: NodeType.Object, key: '0'}])\n // If index is 1 -> onFocusKeyPath([{type: NodeType.Object, key: '0'}, {type: NodeType.Array, key: '0'}])\n .slice(0, index + 1)\n ),\n text: el.key.toString(),\n })),\n ];\n\n return <Breadcrumb links={formattedKeyPath} />;\n};\n"],"names":["jsx","Breadcrumb"],"mappings":";;;;AAUO,MAAM,oBAAgD,CAAC;AAAA,EAC5D;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,mBAAqC;AAAA,IACzC,EAAE,MAAM,eAAe,SAAS,MAAM,eAAe,CAAE,CAAA,EAAE;AAAA,IACzD,GAAG,QAAQ,IAAI,CAAC,IAAI,WAAW;AAAA,MAC7B,SAAS,MACP;AAAA,QACE,QAIG,MAAM,GAAG,QAAQ,CAAC;AAAA,MACvB;AAAA,MACF,MAAM,GAAG,IAAI,SAAS;AAAA,IAAA,EACtB;AAAA,EACJ;AAEO,SAAAA,2BAAA,kBAAA,IAACC,4BAAW,YAAA,EAAA,OAAO,iBAAkB,CAAA;AAC9C;;"}
1
+ {"version":3,"file":"KeyPathBreadcrumb.cjs","sources":["../../../src/components/DictionaryFieldEditor/KeyPathBreadcrumb.tsx"],"sourcesContent":["import type { Locales } from '@intlayer/config/client';\nimport type { KeyPath } from '@intlayer/core';\nimport type { FC } from 'react';\nimport { Breadcrumb, type BreadcrumbLink } from '../Breadcrumb';\n\ntype KeyPathBreadcrumbProps = {\n dictionaryKey: string;\n keyPath: KeyPath[];\n onClickKeyPath: (keyPath: KeyPath[]) => void;\n locale?: Locales;\n};\n\nexport const KeyPathBreadcrumb: FC<KeyPathBreadcrumbProps> = ({\n keyPath,\n dictionaryKey,\n onClickKeyPath,\n locale,\n}) => {\n const formattedKeyPath: BreadcrumbLink[] = [\n { text: dictionaryKey, onClick: () => onClickKeyPath([]) },\n ...keyPath.map((el, index) => ({\n onClick: () =>\n onClickKeyPath(\n keyPath\n // With keyPath = [{type: NodeType.Object, key: '0'}, {type: NodeType.Array, key: '0'}, {type: NodeType.Object, key: '1'}]\n // If index is 0 -> onFocusKeyPath([{type: NodeType.Object, key: '0'}])\n // If index is 1 -> onFocusKeyPath([{type: NodeType.Object, key: '0'}, {type: NodeType.Array, key: '0'}])\n .slice(0, index + 1)\n ),\n text: el.key.toString(),\n })),\n ];\n\n return (\n <Breadcrumb\n links={formattedKeyPath}\n locale={locale}\n elementType=\"location\"\n />\n );\n};\n"],"names":["jsx","Breadcrumb"],"mappings":";;;;AAYO,MAAM,oBAAgD,CAAC;AAAA,EAC5D;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,mBAAqC;AAAA,IACzC,EAAE,MAAM,eAAe,SAAS,MAAM,eAAe,CAAE,CAAA,EAAE;AAAA,IACzD,GAAG,QAAQ,IAAI,CAAC,IAAI,WAAW;AAAA,MAC7B,SAAS,MACP;AAAA,QACE,QAIG,MAAM,GAAG,QAAQ,CAAC;AAAA,MACvB;AAAA,MACF,MAAM,GAAG,IAAI,SAAS;AAAA,IAAA,EACtB;AAAA,EACJ;AAGE,SAAAA,2BAAA,kBAAA;AAAA,IAACC,4BAAA;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,MACP;AAAA,MACA,aAAY;AAAA,IAAA;AAAA,EACd;AAEJ;;"}
@@ -1,9 +1,11 @@
1
+ import { Locales } from '@intlayer/config/client';
1
2
  import { KeyPath } from '@intlayer/core';
2
3
  import { FC } from 'react';
3
4
  type KeyPathBreadcrumbProps = {
4
5
  dictionaryKey: string;
5
6
  keyPath: KeyPath[];
6
7
  onClickKeyPath: (keyPath: KeyPath[]) => void;
8
+ locale?: Locales;
7
9
  };
8
10
  export declare const KeyPathBreadcrumb: FC<KeyPathBreadcrumbProps>;
9
11
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"KeyPathBreadcrumb.d.ts","sourceRoot":"","sources":["../../../src/components/DictionaryFieldEditor/KeyPathBreadcrumb.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAGhC,KAAK,sBAAsB,GAAG;IAC5B,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,OAAO,EAAE,CAAC;IACnB,cAAc,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;CAC9C,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,sBAAsB,CAqBxD,CAAC"}
1
+ {"version":3,"file":"KeyPathBreadcrumb.d.ts","sourceRoot":"","sources":["../../../src/components/DictionaryFieldEditor/KeyPathBreadcrumb.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAGhC,KAAK,sBAAsB,GAAG;IAC5B,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,OAAO,EAAE,CAAC;IACnB,cAAc,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;IAC7C,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,sBAAsB,CA4BxD,CAAC"}
@@ -3,7 +3,8 @@ import { Breadcrumb } from "../Breadcrumb/index.mjs";
3
3
  const KeyPathBreadcrumb = ({
4
4
  keyPath,
5
5
  dictionaryKey,
6
- onClickKeyPath
6
+ onClickKeyPath,
7
+ locale
7
8
  }) => {
8
9
  const formattedKeyPath = [
9
10
  { text: dictionaryKey, onClick: () => onClickKeyPath([]) },
@@ -14,7 +15,14 @@ const KeyPathBreadcrumb = ({
14
15
  text: el.key.toString()
15
16
  }))
16
17
  ];
17
- return /* @__PURE__ */ jsxRuntimeExports.jsx(Breadcrumb, { links: formattedKeyPath });
18
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
19
+ Breadcrumb,
20
+ {
21
+ links: formattedKeyPath,
22
+ locale,
23
+ elementType: "location"
24
+ }
25
+ );
18
26
  };
19
27
  export {
20
28
  KeyPathBreadcrumb
@@ -1 +1 @@
1
- {"version":3,"file":"KeyPathBreadcrumb.mjs","sources":["../../../src/components/DictionaryFieldEditor/KeyPathBreadcrumb.tsx"],"sourcesContent":["import type { KeyPath } from '@intlayer/core';\nimport type { FC } from 'react';\nimport { Breadcrumb, type BreadcrumbLink } from '../Breadcrumb';\n\ntype KeyPathBreadcrumbProps = {\n dictionaryKey: string;\n keyPath: KeyPath[];\n onClickKeyPath: (keyPath: KeyPath[]) => void;\n};\n\nexport const KeyPathBreadcrumb: FC<KeyPathBreadcrumbProps> = ({\n keyPath,\n dictionaryKey,\n onClickKeyPath,\n}) => {\n const formattedKeyPath: BreadcrumbLink[] = [\n { text: dictionaryKey, onClick: () => onClickKeyPath([]) },\n ...keyPath.map((el, index) => ({\n onClick: () =>\n onClickKeyPath(\n keyPath\n // With keyPath = [{type: NodeType.Object, key: '0'}, {type: NodeType.Array, key: '0'}, {type: NodeType.Object, key: '1'}]\n // If index is 0 -> onFocusKeyPath([{type: NodeType.Object, key: '0'}])\n // If index is 1 -> onFocusKeyPath([{type: NodeType.Object, key: '0'}, {type: NodeType.Array, key: '0'}])\n .slice(0, index + 1)\n ),\n text: el.key.toString(),\n })),\n ];\n\n return <Breadcrumb links={formattedKeyPath} />;\n};\n"],"names":["jsx"],"mappings":";;AAUO,MAAM,oBAAgD,CAAC;AAAA,EAC5D;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,mBAAqC;AAAA,IACzC,EAAE,MAAM,eAAe,SAAS,MAAM,eAAe,CAAE,CAAA,EAAE;AAAA,IACzD,GAAG,QAAQ,IAAI,CAAC,IAAI,WAAW;AAAA,MAC7B,SAAS,MACP;AAAA,QACE,QAIG,MAAM,GAAG,QAAQ,CAAC;AAAA,MACvB;AAAA,MACF,MAAM,GAAG,IAAI,SAAS;AAAA,IAAA,EACtB;AAAA,EACJ;AAEO,SAAAA,kCAAA,IAAC,YAAW,EAAA,OAAO,iBAAkB,CAAA;AAC9C;"}
1
+ {"version":3,"file":"KeyPathBreadcrumb.mjs","sources":["../../../src/components/DictionaryFieldEditor/KeyPathBreadcrumb.tsx"],"sourcesContent":["import type { Locales } from '@intlayer/config/client';\nimport type { KeyPath } from '@intlayer/core';\nimport type { FC } from 'react';\nimport { Breadcrumb, type BreadcrumbLink } from '../Breadcrumb';\n\ntype KeyPathBreadcrumbProps = {\n dictionaryKey: string;\n keyPath: KeyPath[];\n onClickKeyPath: (keyPath: KeyPath[]) => void;\n locale?: Locales;\n};\n\nexport const KeyPathBreadcrumb: FC<KeyPathBreadcrumbProps> = ({\n keyPath,\n dictionaryKey,\n onClickKeyPath,\n locale,\n}) => {\n const formattedKeyPath: BreadcrumbLink[] = [\n { text: dictionaryKey, onClick: () => onClickKeyPath([]) },\n ...keyPath.map((el, index) => ({\n onClick: () =>\n onClickKeyPath(\n keyPath\n // With keyPath = [{type: NodeType.Object, key: '0'}, {type: NodeType.Array, key: '0'}, {type: NodeType.Object, key: '1'}]\n // If index is 0 -> onFocusKeyPath([{type: NodeType.Object, key: '0'}])\n // If index is 1 -> onFocusKeyPath([{type: NodeType.Object, key: '0'}, {type: NodeType.Array, key: '0'}])\n .slice(0, index + 1)\n ),\n text: el.key.toString(),\n })),\n ];\n\n return (\n <Breadcrumb\n links={formattedKeyPath}\n locale={locale}\n elementType=\"location\"\n />\n );\n};\n"],"names":["jsx"],"mappings":";;AAYO,MAAM,oBAAgD,CAAC;AAAA,EAC5D;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,mBAAqC;AAAA,IACzC,EAAE,MAAM,eAAe,SAAS,MAAM,eAAe,CAAE,CAAA,EAAE;AAAA,IACzD,GAAG,QAAQ,IAAI,CAAC,IAAI,WAAW;AAAA,MAC7B,SAAS,MACP;AAAA,QACE,QAIG,MAAM,GAAG,QAAQ,CAAC;AAAA,MACvB;AAAA,MACF,MAAM,GAAG,IAAI,SAAS;AAAA,IAAA,EACtB;AAAA,EACJ;AAGE,SAAAA,kCAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,MACP;AAAA,MACA,aAAY;AAAA,IAAA;AAAA,EACd;AAEJ;"}
@@ -30,7 +30,6 @@ require("zod");
30
30
  const components_DictionaryFieldEditor_EditorView_EditorView = require("./EditorView/EditorView.cjs");
31
31
  const components_DictionaryFieldEditor_KeyPathBreadcrumb = require("./KeyPathBreadcrumb.cjs");
32
32
  const components_DictionaryFieldEditor_NavigationView_NavigationViewNode = require("./NavigationView/NavigationViewNode.cjs");
33
- const components_DictionaryFieldEditor_SaveForm_SaveForm = require("./SaveForm/SaveForm.cjs");
34
33
  const NodeEditor = ({ dictionary }) => {
35
34
  const { content: dictionaryContent, key } = dictionary;
36
35
  const { editedContent, dictionaryRecord, setDictionariesRecord } = components_DictionaryEditor_useEditedContentStore.useEditedContentStore(
@@ -81,19 +80,16 @@ const NodeEditor = ({ dictionary }) => {
81
80
  )
82
81
  }
83
82
  ),
84
- /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs("div", { className: "top-6 flex h-full flex-1 flex-col gap-6 md:sticky", children: [
85
- (focusedKeyPath?.length ?? 0) > 0 && /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
86
- components_Container_index.Container,
87
- {
88
- border: true,
89
- background: false,
90
- className: "h-full flex-1 overflow-hidden",
91
- roundedSize: "xl",
92
- children: /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(components_DictionaryFieldEditor_EditorView_EditorView.EditorView, { dictionary, dictionaryKey: key })
93
- }
94
- ),
95
- /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(components_DictionaryFieldEditor_SaveForm_SaveForm.SaveForm, { dictionary })
96
- ] })
83
+ /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx("div", { className: "top-6 flex h-full flex-1 flex-col gap-6 md:sticky", children: (focusedKeyPath?.length ?? 0) > 0 && /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
84
+ components_Container_index.Container,
85
+ {
86
+ border: true,
87
+ background: false,
88
+ className: "h-full flex-1 overflow-hidden",
89
+ roundedSize: "xl",
90
+ children: /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(components_DictionaryFieldEditor_EditorView_EditorView.EditorView, { dictionary, dictionaryKey: key })
91
+ }
92
+ ) })
97
93
  ] })
98
94
  ] });
99
95
  };
@@ -1 +1 @@
1
- {"version":3,"file":"NodeEditor.cjs","sources":["../../../src/components/DictionaryFieldEditor/NodeEditor.tsx"],"sourcesContent":["'use client';\n\nimport { Dictionary } from '@intlayer/core';\nimport { useEffect, type FC } from 'react';\n// @ts-ignore react-intlayer not build yet\nimport { useDictionary } from 'react-intlayer';\nimport { useShallow } from 'zustand/react/shallow';\nimport { Container } from '../Container';\nimport {\n useEditedContentStore,\n useEditionPanelStore,\n} from '../DictionaryEditor';\nimport { EditorView } from './EditorView/EditorView';\nimport { KeyPathBreadcrumb } from './KeyPathBreadcrumb';\nimport { NavigationViewNode } from './NavigationView/NavigationViewNode';\nimport { SaveForm } from './SaveForm/SaveForm';\n\ntype NodeEditorProps = {\n dictionary: Dictionary;\n};\n\nexport const NodeEditor: FC<NodeEditorProps> = ({ dictionary }) => {\n const { content: dictionaryContent, key } = dictionary;\n const { editedContent, dictionaryRecord, setDictionariesRecord } =\n useEditedContentStore(\n useShallow((s) => ({\n editedContent: s.editedContent,\n dictionaryRecord: s.dictionariesRecord,\n setDictionariesRecord: s.setDictionariesRecord,\n }))\n );\n\n const { focusedContent, setFocusedContentKeyPath } = useEditionPanelStore(\n useShallow((s) => ({\n focusedContent: s.focusedContent,\n setFocusedContentKeyPath: s.setFocusedContentKeyPath,\n }))\n );\n\n const focusedKeyPath = focusedContent?.keyPath;\n\n const section = editedContent[key]?.content ?? dictionaryContent;\n\n useEffect(() => {\n if (dictionaryRecord[key]) return;\n\n setDictionariesRecord({\n [key]: dictionary,\n });\n }, [dictionary, key, setDictionariesRecord, dictionaryRecord]);\n\n return (\n <>\n <KeyPathBreadcrumb\n dictionaryKey={key}\n keyPath={focusedKeyPath ?? []}\n onClickKeyPath={setFocusedContentKeyPath}\n />\n <div className=\"flex gap-2 max-md:flex-col\">\n <Container\n border\n background={false}\n className=\"top-6 flex h-full flex-col items-start gap-0.5 overflow-auto p-2 md:sticky md:max-w-[50%]\"\n roundedSize=\"xl\"\n >\n <NavigationViewNode\n keyPath={[]}\n section={section}\n dictionaryKey={key}\n />\n </Container>\n <div className=\"top-6 flex h-full flex-1 flex-col gap-6 md:sticky\">\n {(focusedKeyPath?.length ?? 0) > 0 && (\n <Container\n border\n background={false}\n className=\"h-full flex-1 overflow-hidden\"\n roundedSize=\"xl\"\n >\n <EditorView dictionary={dictionary} dictionaryKey={key} />\n </Container>\n )}\n <SaveForm dictionary={dictionary} />\n </div>\n </div>\n </>\n );\n};\n"],"names":["useEditedContentStore","useShallow","useEditionPanelStore","useEffect","jsxs","Fragment","jsx","KeyPathBreadcrumb","Container","NavigationViewNode","EditorView","SaveForm"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqBO,MAAM,aAAkC,CAAC,EAAE,iBAAiB;AACjE,QAAM,EAAE,SAAS,mBAAmB,IAAQ,IAAA;AAC5C,QAAM,EAAE,eAAe,kBAAkB,sBACvC,IAAAA,kDAAA;AAAA,IACEC,QAAA,WAAW,CAAC,OAAO;AAAA,MACjB,eAAe,EAAE;AAAA,MACjB,kBAAkB,EAAE;AAAA,MACpB,uBAAuB,EAAE;AAAA,IAAA,EACzB;AAAA,EACJ;AAEI,QAAA,EAAE,gBAAgB,yBAAA,IAA6BC,iDAAA;AAAA,IACnDD,QAAA,WAAW,CAAC,OAAO;AAAA,MACjB,gBAAgB,EAAE;AAAA,MAClB,0BAA0B,EAAE;AAAA,IAAA,EAC5B;AAAA,EACJ;AAEA,QAAM,iBAAiB,gBAAgB;AAEvC,QAAM,UAAU,cAAc,GAAG,GAAG,WAAW;AAE/CE,aAAAA,UAAU,MAAM;AACV,QAAA,iBAAiB,GAAG,EAAG;AAEL,0BAAA;AAAA,MACpB,CAAC,GAAG,GAAG;AAAA,IAAA,CACR;AAAA,KACA,CAAC,YAAY,KAAK,uBAAuB,gBAAgB,CAAC;AAE7D,SAEIC,2BAAA,kBAAA,KAAAC,uCAAA,EAAA,UAAA;AAAA,IAAAC,2BAAA,kBAAA;AAAA,MAACC,mDAAA;AAAA,MAAA;AAAA,QACC,eAAe;AAAA,QACf,SAAS,kBAAkB,CAAC;AAAA,QAC5B,gBAAgB;AAAA,MAAA;AAAA,IAClB;AAAA,IACAH,2BAAAA,kBAAAA,KAAC,OAAI,EAAA,WAAU,8BACb,UAAA;AAAA,MAAAE,2BAAA,kBAAA;AAAA,QAACE,2BAAA;AAAA,QAAA;AAAA,UACC,QAAM;AAAA,UACN,YAAY;AAAA,UACZ,WAAU;AAAA,UACV,aAAY;AAAA,UAEZ,UAAAF,2BAAA,kBAAA;AAAA,YAACG,mEAAA;AAAA,YAAA;AAAA,cACC,SAAS,CAAC;AAAA,cACV;AAAA,cACA,eAAe;AAAA,YAAA;AAAA,UAAA;AAAA,QACjB;AAAA,MACF;AAAA,MACAL,2BAAAA,kBAAAA,KAAC,OAAI,EAAA,WAAU,qDACX,UAAA;AAAA,SAAgB,gBAAA,UAAU,KAAK,KAC/BE,2BAAA,kBAAA;AAAA,UAACE,2BAAA;AAAA,UAAA;AAAA,YACC,QAAM;AAAA,YACN,YAAY;AAAA,YACZ,WAAU;AAAA,YACV,aAAY;AAAA,YAEZ,UAACF,2BAAA,kBAAA,IAAAI,uDAAA,YAAA,EAAW,YAAwB,eAAe,IAAK,CAAA;AAAA,UAAA;AAAA,QAC1D;AAAA,QAEFJ,iDAACK,mDAAAA,YAAS,WAAwB,CAAA;AAAA,MAAA,EACpC,CAAA;AAAA,IAAA,EACF,CAAA;AAAA,EAAA,GACF;AAEJ;;"}
1
+ {"version":3,"file":"NodeEditor.cjs","sources":["../../../src/components/DictionaryFieldEditor/NodeEditor.tsx"],"sourcesContent":["'use client';\n\nimport { Dictionary } from '@intlayer/core';\nimport { useEffect, type FC } from 'react';\nimport { useShallow } from 'zustand/react/shallow';\nimport { Container } from '../Container';\nimport {\n useEditedContentStore,\n useEditionPanelStore,\n} from '../DictionaryEditor';\nimport { EditorView } from './EditorView/EditorView';\nimport { KeyPathBreadcrumb } from './KeyPathBreadcrumb';\nimport { NavigationViewNode } from './NavigationView/NavigationViewNode';\n\ntype NodeEditorProps = {\n dictionary: Dictionary;\n};\n\nexport const NodeEditor: FC<NodeEditorProps> = ({ dictionary }) => {\n const { content: dictionaryContent, key } = dictionary;\n const { editedContent, dictionaryRecord, setDictionariesRecord } =\n useEditedContentStore(\n useShallow((s) => ({\n editedContent: s.editedContent,\n dictionaryRecord: s.dictionariesRecord,\n setDictionariesRecord: s.setDictionariesRecord,\n }))\n );\n\n const { focusedContent, setFocusedContentKeyPath } = useEditionPanelStore(\n useShallow((s) => ({\n focusedContent: s.focusedContent,\n setFocusedContentKeyPath: s.setFocusedContentKeyPath,\n }))\n );\n\n const focusedKeyPath = focusedContent?.keyPath;\n\n const section = editedContent[key]?.content ?? dictionaryContent;\n\n useEffect(() => {\n if (dictionaryRecord[key]) return;\n\n setDictionariesRecord({\n [key]: dictionary,\n });\n }, [dictionary, key, setDictionariesRecord, dictionaryRecord]);\n\n return (\n <>\n <KeyPathBreadcrumb\n dictionaryKey={key}\n keyPath={focusedKeyPath ?? []}\n onClickKeyPath={setFocusedContentKeyPath}\n />\n <div className=\"flex gap-2 max-md:flex-col\">\n <Container\n border\n background={false}\n className=\"top-6 flex h-full flex-col items-start gap-0.5 overflow-auto p-2 md:sticky md:max-w-[50%]\"\n roundedSize=\"xl\"\n >\n <NavigationViewNode\n keyPath={[]}\n section={section}\n dictionaryKey={key}\n />\n </Container>\n <div className=\"top-6 flex h-full flex-1 flex-col gap-6 md:sticky\">\n {(focusedKeyPath?.length ?? 0) > 0 && (\n <Container\n border\n background={false}\n className=\"h-full flex-1 overflow-hidden\"\n roundedSize=\"xl\"\n >\n <EditorView dictionary={dictionary} dictionaryKey={key} />\n </Container>\n )}\n </div>\n </div>\n </>\n );\n};\n"],"names":["useEditedContentStore","useShallow","useEditionPanelStore","useEffect","jsxs","Fragment","jsx","KeyPathBreadcrumb","Container","NavigationViewNode","EditorView"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkBO,MAAM,aAAkC,CAAC,EAAE,iBAAiB;AACjE,QAAM,EAAE,SAAS,mBAAmB,IAAQ,IAAA;AAC5C,QAAM,EAAE,eAAe,kBAAkB,sBACvC,IAAAA,kDAAA;AAAA,IACEC,QAAA,WAAW,CAAC,OAAO;AAAA,MACjB,eAAe,EAAE;AAAA,MACjB,kBAAkB,E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AEZ,UAACF,2BAAA,kBAAA,IAAAI,uDAAA,YAAA,EAAW,YAAwB,eAAe,IAAK,CAAA;AAAA,QAAA;AAAA,MAAA,EAG9D,CAAA;AAAA,IAAA,EACF,CAAA;AAAA,EAAA,GACF;AAEJ;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"NodeEditor.d.ts","sourceRoot":"","sources":["../../../src/components/DictionaryFieldEditor/NodeEditor.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAa,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAc3C,KAAK,eAAe,GAAG;IACrB,UAAU,EAAE,UAAU,CAAC;CACxB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CAkE1C,CAAC"}
1
+ {"version":3,"file":"NodeEditor.d.ts","sourceRoot":"","sources":["../../../src/components/DictionaryFieldEditor/NodeEditor.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAa,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAW3C,KAAK,eAAe,GAAG;IACrB,UAAU,EAAE,UAAU,CAAC;CACxB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CAiE1C,CAAC"}
@@ -28,7 +28,6 @@ import "zod";
28
28
  import { EditorView } from "./EditorView/EditorView.mjs";
29
29
  import { KeyPathBreadcrumb } from "./KeyPathBreadcrumb.mjs";
30
30
  import { NavigationViewNode } from "./NavigationView/NavigationViewNode.mjs";
31
- import { SaveForm } from "./SaveForm/SaveForm.mjs";
32
31
  const NodeEditor = ({ dictionary }) => {
33
32
  const { content: dictionaryContent, key } = dictionary;
34
33
  const { editedContent, dictionaryRecord, setDictionariesRecord } = useEditedContentStore(
@@ -79,19 +78,16 @@ const NodeEditor = ({ dictionary }) => {
79
78
  )
80
79
  }
81
80
  ),
82
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "top-6 flex h-full flex-1 flex-col gap-6 md:sticky", children: [
83
- (focusedKeyPath?.length ?? 0) > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx(
84
- Container,
85
- {
86
- border: true,
87
- background: false,
88
- className: "h-full flex-1 overflow-hidden",
89
- roundedSize: "xl",
90
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(EditorView, { dictionary, dictionaryKey: key })
91
- }
92
- ),
93
- /* @__PURE__ */ jsxRuntimeExports.jsx(SaveForm, { dictionary })
94
- ] })
81
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "top-6 flex h-full flex-1 flex-col gap-6 md:sticky", children: (focusedKeyPath?.length ?? 0) > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx(
82
+ Container,
83
+ {
84
+ border: true,
85
+ background: false,
86
+ className: "h-full flex-1 overflow-hidden",
87
+ roundedSize: "xl",
88
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(EditorView, { dictionary, dictionaryKey: key })
89
+ }
90
+ ) })
95
91
  ] })
96
92
  ] });
97
93
  };
@@ -1 +1 @@
1
- {"version":3,"file":"NodeEditor.mjs","sources":["../../../src/components/DictionaryFieldEditor/NodeEditor.tsx"],"sourcesContent":["'use client';\n\nimport { Dictionary } from '@intlayer/core';\nimport { useEffect, type FC } from 'react';\n// @ts-ignore react-intlayer not build yet\nimport { useDictionary } from 'react-intlayer';\nimport { useShallow } from 'zustand/react/shallow';\nimport { Container } from '../Container';\nimport {\n useEditedContentStore,\n useEditionPanelStore,\n} from '../DictionaryEditor';\nimport { EditorView } from './EditorView/EditorView';\nimport { KeyPathBreadcrumb } from './KeyPathBreadcrumb';\nimport { NavigationViewNode } from './NavigationView/NavigationViewNode';\nimport { SaveForm } from './SaveForm/SaveForm';\n\ntype NodeEditorProps = {\n dictionary: Dictionary;\n};\n\nexport const NodeEditor: FC<NodeEditorProps> = ({ dictionary }) => {\n const { content: dictionaryContent, key } = dictionary;\n const { editedContent, dictionaryRecord, setDictionariesRecord } =\n useEditedContentStore(\n useShallow((s) => ({\n editedContent: s.editedContent,\n dictionaryRecord: s.dictionariesRecord,\n setDictionariesRecord: s.setDictionariesRecord,\n }))\n );\n\n const { focusedContent, setFocusedContentKeyPath } = useEditionPanelStore(\n useShallow((s) => ({\n focusedContent: s.focusedContent,\n setFocusedContentKeyPath: s.setFocusedContentKeyPath,\n }))\n );\n\n const focusedKeyPath = focusedContent?.keyPath;\n\n const section = editedContent[key]?.content ?? dictionaryContent;\n\n useEffect(() => {\n if (dictionaryRecord[key]) return;\n\n setDictionariesRecord({\n [key]: dictionary,\n });\n }, [dictionary, key, setDictionariesRecord, dictionaryRecord]);\n\n return (\n <>\n <KeyPathBreadcrumb\n dictionaryKey={key}\n keyPath={focusedKeyPath ?? []}\n onClickKeyPath={setFocusedContentKeyPath}\n />\n <div className=\"flex gap-2 max-md:flex-col\">\n <Container\n border\n background={false}\n className=\"top-6 flex h-full flex-col items-start gap-0.5 overflow-auto p-2 md:sticky md:max-w-[50%]\"\n roundedSize=\"xl\"\n >\n <NavigationViewNode\n keyPath={[]}\n section={section}\n dictionaryKey={key}\n />\n </Container>\n <div className=\"top-6 flex h-full flex-1 flex-col gap-6 md:sticky\">\n {(focusedKeyPath?.length ?? 0) > 0 && (\n <Container\n border\n background={false}\n className=\"h-full flex-1 overflow-hidden\"\n roundedSize=\"xl\"\n >\n <EditorView dictionary={dictionary} dictionaryKey={key} />\n </Container>\n )}\n <SaveForm dictionary={dictionary} />\n </div>\n </div>\n </>\n );\n};\n"],"names":["jsxs","Fragment","jsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqBO,MAAM,aAAkC,CAAC,EAAE,iBAAiB;AACjE,QAAM,EAAE,SAAS,mBAAmB,IAAQ,IAAA;AAC5C,QAAM,EAAE,eAAe,kBAAkB,sBACvC,IAAA;AAAA,IACE,WAAW,CAAC,OAAO;AAAA,MACjB,eAAe,EAAE;A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IAAK,CAAA;AAAA,UAAA;AAAA,QAC1D;AAAA,QAEFA,sCAAC,YAAS,WAAwB,CAAA;AAAA,MAAA,EACpC,CAAA;AAAA,IAAA,EACF,CAAA;AAAA,EAAA,GACF;AAEJ;"}
1
+ {"version":3,"file":"NodeEditor.mjs","sources":["../../../src/components/DictionaryFieldEditor/NodeEditor.tsx"],"sourcesContent":["'use client';\n\nimport { Dictionary } from '@intlayer/core';\nimport { useEffect, type FC } from 'react';\nimport { useShallow } from 'zustand/react/shallow';\nimport { Container } from '../Container';\nimport {\n useEditedContentStore,\n useEditionPanelStore,\n} from '../DictionaryEditor';\nimport { EditorView } from './EditorView/EditorView';\nimport { KeyPathBreadcrumb } from './KeyPathBreadcrumb';\nimport { NavigationViewNode } from './NavigationView/NavigationViewNode';\n\ntype NodeEditorProps = {\n dictionary: Dictionary;\n};\n\nexport const NodeEditor: FC<NodeEditorProps> = ({ dictionary }) => {\n const { content: dictionaryContent, key } = dictionary;\n const { editedContent, dictionaryRecord, setDictionariesRecord } =\n useEditedContentStore(\n useShallow((s) => ({\n editedContent: s.editedContent,\n dictionaryRecord: s.dictionariesRecord,\n setDictionariesRecord: s.setDictionariesRecord,\n }))\n );\n\n const { focusedContent, setFocusedContentKeyPath } = useEditionPanelStore(\n useShallow((s) => ({\n focusedContent: s.focusedContent,\n setFocusedContentKeyPath: s.setFocusedContentKeyPath,\n }))\n );\n\n const focusedKeyPath = focusedContent?.keyPath;\n\n const section = editedContent[key]?.content ?? dictionaryContent;\n\n useEffect(() => {\n if (dictionaryRecord[key]) return;\n\n setDictionariesRecord({\n [key]: dictionary,\n });\n }, [dictionary, key, setDictionariesRecord, dictionaryRecord]);\n\n return (\n <>\n <KeyPathBreadcrumb\n dictionaryKey={key}\n keyPath={focusedKeyPath ?? []}\n onClickKeyPath={setFocusedContentKeyPath}\n />\n <div className=\"flex gap-2 max-md:flex-col\">\n <Container\n border\n background={false}\n className=\"top-6 flex h-full flex-col items-start gap-0.5 overflow-auto p-2 md:sticky md:max-w-[50%]\"\n roundedSize=\"xl\"\n >\n <NavigationViewNode\n keyPath={[]}\n section={section}\n dictionaryKey={key}\n />\n </Container>\n <div className=\"top-6 flex h-full flex-1 flex-col gap-6 md:sticky\">\n {(focusedKeyPath?.length ?? 0) > 0 && (\n <Container\n border\n background={false}\n className=\"h-full flex-1 overflow-hidden\"\n roundedSize=\"xl\"\n >\n <EditorView dictionary={dictionary} dictionaryKey={key} />\n </Container>\n )}\n </div>\n </div>\n </>\n );\n};\n"],"names":["jsxs","Fragment","jsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkBO,MAAM,aAAkC,CAAC,EAAE,iBAAiB;AACjE,QAAM,EAAE,SAAS,mBAAmB,IAAQ,IAAA;AAC5C,QAAM,EAAE,eAAe,kBAAkB,sBACvC,IAAA;AAAA,IACE,WAAW,CAAC,OAAO;AAAA,MACjB,eAAe,EAAE;AAAA,MACjB,kBAAkB,EAAE;AAAA,MACpB,uBAAuB,EAAE;AAAA,IAAA,EACzB;AAAA,EACJ;AAEI,QAAA,EAAE,gBAAgB,yBAAA,IAA6B;AAAA,IACnD,WAAW,CAAC,OAAO;AAAA,MACjB,gBAAgB,EAAE;AAAA,MAClB,0BAA0B,EAAE;AAAA,IAAA,EAC5B;AAAA,EACJ;AAEA,QAAM,iBAAiB,gBAAgB;AAEvC,QAAM,UAAU,cAAc,GAAG,GAAG,WAAW;AAE/C,YAAU,MAAM;AACV,QAAA,iBAAiB,GAAG,EAAG;AAEL,0BAAA;AAAA,MACpB,CAAC,GAAG,GAAG;AAAA,IAAA,CACR;AAAA,KACA,CAAC,YAAY,KAAK,uBAAuB,gBAAgB,CAAC;AAE7D,SAEIA,kCAAA,KAAAC,4BAAA,EAAA,UAAA;AAAA,IAAAC,kCAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,eAAe;AAAA,QACf,SAAS,kBAAkB,CAAC;AAAA,QAC5B,gBAAgB;AAAA,MAAA;AAAA,IAClB;AAAA,IACAF,kCAAAA,KAAC,OAAI,EAAA,WAAU,8BACb,UAAA;AAAA,MAAAE,kCAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,QAAM;AAAA,UACN,YAAY;AAAA,UACZ,WAAU;AAAA,UACV,aAAY;AAAA,UAEZ,UAAAA,kCAAA;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,SAAS,CAAC;AAAA,cACV;AAAA,cACA,eAAe;AAAA,YAAA;AAAA,UAAA;AAAA,QACjB;AAAA,MACF;AAAA,4CACC,OAAI,EAAA,WAAU,qDACX,WAAgB,gBAAA,UAAU,KAAK,KAC/BA,kCAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,QAAM;AAAA,UACN,YAAY;AAAA,UACZ,WAAU;AAAA,UACV,aAAY;AAAA,UAEZ,UAACA,kCAAA,IAAA,YAAA,EAAW,YAAwB,eAAe,IAAK,CAAA;AAAA,QAAA;AAAA,MAAA,EAG9D,CAAA;AAAA,IAAA,EACF,CAAA;AAAA,EAAA,GACF;AAEJ;"}
@@ -2,41 +2,57 @@
2
2
  "use strict";
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
4
  const jsxRuntime = require("../../../jsx-runtime-XHKiWCTo.cjs");
5
+ const intlayer = require("intlayer");
5
6
  const lucideReact = require("lucide-react");
6
7
  const require$$0 = require("react");
7
8
  const reactIntlayer = require("react-intlayer");
8
9
  const shallow = require("../../../shallow-lhDIFtEp.cjs");
10
+ require("../../../libs/intlayer-api/index.cjs");
11
+ require("../../Button/Button.cjs");
12
+ require("../../Auth/ExternalsLoginButtons/externalsLoginButtons.content.cjs");
13
+ const components_Form_FormBase = require("../../Form/FormBase.cjs");
14
+ require("../../Form/FormField.cjs");
15
+ const components_Form_layout_FormItemLayout = require("../../../Form-BDcoNTLV.cjs");
16
+ require("../../Auth/SignInForm/signIn.content.cjs");
17
+ require("zod");
18
+ require("../../Auth/SignInForm/useSignInSchema.content.cjs");
19
+ require("../../Auth/SignUpForm/useSignUpSchema.content.cjs");
9
20
  require("../../../hooks/useScrollBlockage/useScrollBlockageStore.cjs");
10
21
  require("../../../hooks/useAsync/useAsyncStateStore.cjs");
11
22
  const hooks_intlayerAPIHooks = require("../../../hooks/intlayerAPIHooks.cjs");
12
23
  const hooks_useGetAllDictionaries = require("../../../hooks/useGetAllDictionaries.cjs");
24
+ const components_Auth_useAuth_index = require("../../Auth/useAuth/index.cjs");
25
+ require("../../Auth/ChangePasswordForm/changePasswordForm.content.cjs");
26
+ require("../../Auth/ChangePasswordForm/useChangePasswordSchema.content.cjs");
27
+ require("../../Auth/ResetPasswordForm/resetPasswordContent.content.cjs");
28
+ require("../../Auth/ResetPasswordForm/useResetPasswordSchema.content.cjs");
29
+ require("../../Modal/Modal.cjs");
30
+ require("clsx");
31
+ require("tailwind-merge");
13
32
  const components_DictionaryEditor_useEditedContentStore = require("../../DictionaryEditor/useEditedContentStore.cjs");
14
33
  require("../../DictionaryEditor/useEditionPanelStore.cjs");
15
34
  require("@intlayer/core");
16
- require("clsx");
17
- require("tailwind-merge");
18
- require("../../Button/Button.cjs");
19
35
  require("../../EditableField/EditableFieldInput.cjs");
20
36
  require("../../EditableField/EditableFieldTextArea.cjs");
21
- const components_Form_FormBase = require("../../Form/FormBase.cjs");
22
- require("../../Form/FormField.cjs");
23
- const components_Form_layout_FormItemLayout = require("../../../Form-BDcoNTLV.cjs");
24
37
  require("../../DictionaryEditor/validDictionaryChangeButtons.content.cjs");
25
- require("zod");
26
38
  const components_DictionaryFieldEditor_SaveForm_saveForm_content = require("./saveForm.content.cjs");
27
39
  const components_DictionaryFieldEditor_SaveForm_SaveFormSchema = require("./SaveFormSchema.cjs");
28
40
  const SaveForm = ({ dictionary }) => {
41
+ const { session } = components_Auth_useAuth_index.useAuth();
42
+ const project = session?.project;
29
43
  const { pushDictionaries } = hooks_intlayerAPIHooks.usePushDictionaries();
30
44
  const SaveFormSchema = components_DictionaryFieldEditor_SaveForm_SaveFormSchema.getSaveFormSchema();
31
45
  const { online } = hooks_useGetAllDictionaries.useGetAllDictionaries();
32
- const { editedContent, restoreEditedContent } = components_DictionaryEditor_useEditedContentStore.useEditedContentStore(
46
+ const { isLoading: isAuditing, auditFile } = hooks_intlayerAPIHooks.useAuditFile();
47
+ const { editedContent, restoreEditedContent, setEditedContent } = components_DictionaryEditor_useEditedContentStore.useEditedContentStore(
33
48
  shallow.useShallow((s) => ({
34
49
  editedContent: s.editedContent,
35
- restoreEditedContent: s.restoreEditedContent
50
+ restoreEditedContent: s.restoreEditedContent,
51
+ setEditedContent: s.setEditedContent
36
52
  }))
37
53
  );
38
54
  const { form, isSubmitting } = components_Form_FormBase.useForm(SaveFormSchema);
39
- const { resetButton, saveButton, publishButton } = reactIntlayer.useDictionary(
55
+ const { auditButton, resetButton, saveButton, publishButton } = reactIntlayer.useDictionary(
40
56
  components_DictionaryFieldEditor_SaveForm_saveForm_content.saveDictionaryContent
41
57
  );
42
58
  const editedDictionary = require$$0.useMemo(
@@ -54,36 +70,61 @@ const SaveForm = ({ dictionary }) => {
54
70
  () => typeof dictionary?._id === "undefined",
55
71
  [dictionary]
56
72
  );
57
- const onSubmitSuccess = async () => {
73
+ const onSubmitSuccess = require$$0.useCallback(async () => {
58
74
  await pushDictionaries([
59
75
  {
60
76
  ...dictionary,
61
77
  ...editedContent[dictionary.key]
62
78
  }
63
79
  ]);
64
- };
80
+ }, [dictionary, editedContent, pushDictionaries]);
81
+ const handleOnAuditFile = async () => await auditFile({
82
+ defaultLocale: project?.defaultLocale ?? intlayer.Locales.ENGLISH,
83
+ locales: project?.locales ?? [intlayer.Locales.ENGLISH],
84
+ fileContent: JSON.stringify(editedDictionary ?? dictionary)
85
+ }).then((response) => {
86
+ if (!response.data) return;
87
+ const editedDictionary2 = JSON.parse(
88
+ response.data.fileContent
89
+ );
90
+ setEditedContent(dictionary.key, editedDictionary2.content);
91
+ });
92
+ console.log("isLoading", isAuditing);
65
93
  return /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs(
66
94
  components_Form_layout_FormItemLayout.Form,
67
95
  {
68
- className: "flex w-full flex-1 flex-row justify-end gap-3",
96
+ className: "flex w-full flex-1 flex-row flex-wrap justify-end gap-3",
69
97
  ...form,
70
98
  schema: SaveFormSchema,
71
99
  onSubmitSuccess,
72
100
  children: [
101
+ /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
102
+ components_Form_layout_FormItemLayout.Form.Button,
103
+ {
104
+ type: "button",
105
+ label: auditButton.label,
106
+ disabled: isSubmitting,
107
+ Icon: lucideReact.WandSparkles,
108
+ variant: "outline",
109
+ color: "text",
110
+ className: "ml-auto max-md:w-full",
111
+ isLoading: isAuditing,
112
+ onClick: handleOnAuditFile,
113
+ children: auditButton.text
114
+ }
115
+ ),
73
116
  isEdited && /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
74
117
  components_Form_layout_FormItemLayout.Form.Button,
75
118
  {
76
119
  type: "button",
77
120
  label: resetButton.label,
78
121
  disabled: !isEdited || isSubmitting,
79
- className: "ml-auto",
80
122
  Icon: lucideReact.RotateCcw,
81
123
  variant: "outline",
82
124
  color: "text",
125
+ className: "max-md:w-full",
83
126
  isLoading: isSubmitting,
84
- onClick: () => {
85
- restoreEditedContent(dictionary.key);
86
- },
127
+ onClick: () => restoreEditedContent(dictionary.key),
87
128
  children: resetButton.text
88
129
  }
89
130
  ),
@@ -95,6 +136,7 @@ const SaveForm = ({ dictionary }) => {
95
136
  disabled: !isEdited || isSubmitting,
96
137
  Icon: lucideReact.ArrowUpFromLine,
97
138
  color: "text",
139
+ className: "max-md:w-full",
98
140
  isLoading: isSubmitting,
99
141
  children: publishButton.text
100
142
  }
@@ -106,6 +148,7 @@ const SaveForm = ({ dictionary }) => {
106
148
  disabled: !isEdited || isSubmitting,
107
149
  Icon: lucideReact.Save,
108
150
  color: "text",
151
+ className: "max-md:w-full",
109
152
  isLoading: isSubmitting,
110
153
  children: saveButton.text
111
154
  }
@@ -1 +1 @@
1
- {"version":3,"file":"SaveForm.cjs","sources":["../../../../src/components/DictionaryFieldEditor/SaveForm/SaveForm.tsx"],"sourcesContent":["'use client';\n\nimport { Dictionary as DistantDictionary } from '@intlayer/backend';\nimport { 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 { useGetAllDictionaries, usePushDictionaries } from '../../../hooks';\nimport { useEditedContentStore } from '../../DictionaryEditor';\nimport { Form, useForm } from '../../Form';\nimport { saveDictionaryContent } from './saveForm.content';\nimport { getSaveFormSchema } from './SaveFormSchema';\n\ntype DictionaryDetailsProps = {\n dictionary: Dictionary;\n};\n\nexport const SaveForm: FC<DictionaryDetailsProps> = ({ dictionary }) => {\n const { pushDictionaries } = usePushDictionaries();\n const SaveFormSchema = getSaveFormSchema();\n const { online } = useGetAllDictionaries();\n\n const { editedContent, restoreEditedContent } = useEditedContentStore(\n useShallow((s) => ({\n editedContent: s.editedContent,\n restoreEditedContent: s.restoreEditedContent,\n }))\n );\n const { form, isSubmitting } = useForm(SaveFormSchema);\n const { resetButton, saveButton, publishButton } = useDictionary(\n saveDictionaryContent\n );\n\n const editedDictionary = useMemo(\n () => editedContent[dictionary.key],\n [editedContent, dictionary.key]\n );\n\n const onlineDictionary = useMemo(() => {\n return online?.[dictionary.key];\n }, [online, dictionary.key]);\n\n const isEdited = useMemo(\n () =>\n editedDictionary &&\n onlineDictionary &&\n JSON.stringify(editedDictionary.content) !==\n JSON.stringify(onlineDictionary.content),\n [onlineDictionary, editedDictionary]\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 <Form\n className=\"flex w-full flex-1 flex-row justify-end gap-3\"\n {...form}\n schema={SaveFormSchema}\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 isLoading={isSubmitting}\n onClick={() => {\n restoreEditedContent(dictionary.key);\n }}\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 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 isLoading={isSubmitting}\n >\n {saveButton.text}\n </Form.Button>\n )\n )}\n </Form>\n );\n};\n"],"names":["usePushDictionaries","getSaveFormSchema","useGetAllDictionaries","useEditedContentStore","useShallow","useForm","useDictionary","saveDictionaryContent","useMemo","jsxs","Form","jsx","RotateCcw","ArrowUpFromLine","Save"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAmBO,MAAM,WAAuC,CAAC,EAAE,iBAAiB;AAChE,QAAA,EAAE,iBAAiB,IAAIA,2CAAoB;AACjD,QAAM,iBAAiBC,yDAAAA,kBAAkB;AACnC,QAAA,EAAE,OAAO,IAAIC,kDAAsB;AAEnC,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;AACA,QAAM,EAAE,MAAM,iBAAiBC,yBAAAA,QAAQ,cAAc;AACrD,QAAM,EAAE,aAAa,YAAY,cAAkB,IAAAC,cAAA;AAAA,IACjDC,2DAAAA;AAAAA,EACF;AAEA,Q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c;AAAA,YACrB,UAAU,CAAC,YAAY;AAAA,YACvB,MAAMG,YAAA;AAAA,YACN,OAAM;AAAA,YACN,WAAW;AAAA,YAEV,UAAc,cAAA;AAAA,UAAA;AAAA,YAGjB,YACEF,2BAAA,kBAAA;AAAA,UAACD,sCAAAA,KAAK;AAAA,UAAL;AAAA,YACC,MAAK;AAAA,YACL,OAAO,WAAW;AAAA,YAClB,UAAU,CAAC,YAAY;AAAA,YACvB,MAAMI,YAAA;AAAA,YACN,OAAM;AAAA,YACN,WAAW;AAAA,YAEV,UAAW,WAAA;AAAA,UAAA;AAAA,QAAA;AAAA,MACd;AAAA,IAAA;AAAA,EAGN;AAEJ;;"}
1
+ {"version":3,"file":"SaveForm.cjs","sources":["../../../../src/components/DictionaryFieldEditor/SaveForm/SaveForm.tsx"],"sourcesContent":["'use client';\n\nimport { Dictionary as DistantDictionary } from '@intlayer/backend';\nimport { Dictionary } from '@intlayer/core';\nimport { Locales } from 'intlayer';\nimport { ArrowUpFromLine, RotateCcw, Save, WandSparkles } from 'lucide-react';\nimport { useCallback, 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 { useAuth } from '../../../components/Auth';\nimport {\n useAuditFile,\n useGetAllDictionaries,\n usePushDictionaries,\n} from '../../../hooks';\nimport { useEditedContentStore } from '../../DictionaryEditor';\nimport { Form, useForm } from '../../Form';\nimport { saveDictionaryContent } from './saveForm.content';\nimport { getSaveFormSchema } from './SaveFormSchema';\n\ntype DictionaryDetailsProps = {\n dictionary: Dictionary;\n};\n\nexport const SaveForm: FC<DictionaryDetailsProps> = ({ dictionary }) => {\n const { session } = useAuth();\n const project = session?.project;\n const { pushDictionaries } = usePushDictionaries();\n const SaveFormSchema = getSaveFormSchema();\n const { online } = useGetAllDictionaries();\n const { isLoading: isAuditing, auditFile } = useAuditFile();\n\n const { editedContent, restoreEditedContent, setEditedContent } =\n useEditedContentStore(\n useShallow((s) => ({\n editedContent: s.editedContent,\n restoreEditedContent: s.restoreEditedContent,\n setEditedContent: s.setEditedContent,\n }))\n );\n const { form, isSubmitting } = useForm(SaveFormSchema);\n const { auditButton, resetButton, saveButton, publishButton } = useDictionary(\n saveDictionaryContent\n );\n\n const editedDictionary = useMemo(\n () => editedContent[dictionary.key],\n [editedContent, dictionary.key]\n );\n\n const onlineDictionary = useMemo(() => {\n return online?.[dictionary.key];\n }, [online, dictionary.key]);\n\n const isEdited = useMemo(\n () =>\n editedDictionary &&\n onlineDictionary &&\n JSON.stringify(editedDictionary.content) !==\n JSON.stringify(onlineDictionary.content),\n [onlineDictionary, editedDictionary]\n );\n\n const isLocalDictionary = useMemo(\n () => typeof (dictionary as DistantDictionary)?._id === 'undefined',\n [dictionary]\n );\n\n const onSubmitSuccess = useCallback(async () => {\n await pushDictionaries([\n {\n ...dictionary,\n ...editedContent[dictionary.key],\n },\n ]);\n }, [dictionary, editedContent, pushDictionaries]);\n\n const handleOnAuditFile = async () =>\n await auditFile({\n defaultLocale: project?.defaultLocale ?? Locales.ENGLISH,\n locales: project?.locales ?? [Locales.ENGLISH],\n fileContent: JSON.stringify(editedDictionary ?? dictionary),\n }).then((response) => {\n if (!response.data) return;\n\n const editedDictionary = JSON.parse(\n response.data.fileContent\n ) as Dictionary;\n\n setEditedContent(dictionary.key, editedDictionary.content);\n });\n\n console.log('isLoading', isAuditing);\n\n return (\n <Form\n className=\"flex w-full flex-1 flex-row flex-wrap justify-end gap-3\"\n {...form}\n schema={SaveFormSchema}\n onSubmitSuccess={onSubmitSuccess}\n >\n <Form.Button\n type=\"button\"\n label={auditButton.label}\n disabled={isSubmitting}\n Icon={WandSparkles}\n variant=\"outline\"\n color=\"text\"\n className=\"ml-auto max-md:w-full\"\n isLoading={isAuditing}\n onClick={handleOnAuditFile}\n >\n {auditButton.text}\n </Form.Button>\n {isEdited && (\n <Form.Button\n type=\"button\"\n label={resetButton.label}\n disabled={!isEdited || isSubmitting}\n Icon={RotateCcw}\n variant=\"outline\"\n color=\"text\"\n className=\"max-md:w-full\"\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 className=\"max-md:w-full\"\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 className=\"max-md:w-full\"\n isLoading={isSubmitting}\n >\n {saveButton.text}\n </Form.Button>\n )\n )}\n </Form>\n );\n};\n"],"names":["useAuth","usePushDictionaries","getSaveFormSchema","useGetAllDictionaries","useAuditFile","useEditedContentStore","useShallow","useForm","useDictionary","saveDictionaryContent","useMemo","useCallback","Locales","editedDictionary","jsxs","Form","jsx","WandSparkles","RotateCcw","ArrowUpFromLine","Save"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyBO,MAAM,WAAuC,CAAC,EAAE,iBAAiB;AAChE,QAAA,EAAE,QAAQ,IAAIA,sCAAQ;AAC5B,QAAM,UAAU,SAAS;AACnB,QAAA,EAAE,iBAAiB,IAAIC,2CAAoB;AACjD,QAAM,iBAAiBC,yDAAAA,kBAAkB;AACnC,QAAA,EAAE,OAAO,IAAIC,kDAAsB;AACzC,QAAM,EAAE,WAAW,YAAY,UAAA,IAAcC,uBAAAA,aAAa;AAE1D,QAAM,EAAE,eAAe,sBAAsB,iBAC3C,IAAAC,kDAAA;AAAA,IACEC,QAAA,WAAW,CAAC,OAAO;AAAA,MACjB,eAAe,EAAE;AAAA,MACjB,sBAAsB,EAAE;AAAA,MACxB,kBAAkB,EAAE;AAAA,IAAA,EACpB;AAAA,EACJ;AACF,QAAM,EAAE,MAAM,iBAAiBC,yBAAAA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AAA;AAAA,UAAA;AAAA,QAAA;AAAA,MACd;AAAA,IAAA;AAAA,EAGN;AAEJ;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"SaveForm.d.ts","sourceRoot":"","sources":["../../../../src/components/DictionaryFieldEditor/SaveForm/SaveForm.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,OAAO,EAAW,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAUzC,KAAK,sBAAsB,GAAG;IAC5B,UAAU,EAAE,UAAU,CAAC;CACxB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,EAAE,CAAC,sBAAsB,CAmG/C,CAAC"}
1
+ {"version":3,"file":"SaveForm.d.ts","sourceRoot":"","sources":["../../../../src/components/DictionaryFieldEditor/SaveForm/SaveForm.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAG5C,OAAO,EAAwB,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAetD,KAAK,sBAAsB,GAAG;IAC5B,UAAU,EAAE,UAAU,CAAC;CACxB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,EAAE,CAAC,sBAAsB,CAsI/C,CAAC"}