@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.
- package/dist/.vite/manifest.json +112 -45
- package/dist/CopyButton-Cxu3goRg.cjs +59 -0
- package/dist/CopyButton-Cxu3goRg.cjs.map +1 -0
- package/dist/CopyButton-DlcDlf6U.js +60 -0
- package/dist/CopyButton-DlcDlf6U.js.map +1 -0
- package/dist/components/Auth/SignUpForm/signUpForm.content.d.ts +11 -11
- package/dist/components/Auth/useAuth/useSession.cjs +1 -0
- package/dist/components/Auth/useAuth/useSession.cjs.map +1 -1
- package/dist/components/Auth/useAuth/useSession.mjs +1 -0
- package/dist/components/Auth/useAuth/useSession.mjs.map +1 -1
- package/dist/components/Breadcrumb/breadcrumb.content.cjs +26 -0
- package/dist/components/Breadcrumb/breadcrumb.content.cjs.map +1 -0
- package/dist/components/Breadcrumb/breadcrumb.content.d.ts +8 -0
- package/dist/components/Breadcrumb/breadcrumb.content.d.ts.map +1 -0
- package/dist/components/Breadcrumb/breadcrumb.content.mjs +26 -0
- package/dist/components/Breadcrumb/breadcrumb.content.mjs.map +1 -0
- package/dist/components/Breadcrumb/index.cjs +103 -34
- package/dist/components/Breadcrumb/index.cjs.map +1 -1
- package/dist/components/Breadcrumb/index.d.ts +6 -2
- package/dist/components/Breadcrumb/index.d.ts.map +1 -1
- package/dist/components/Breadcrumb/index.mjs +103 -34
- package/dist/components/Breadcrumb/index.mjs.map +1 -1
- package/dist/components/Button/Button.cjs +7 -8
- package/dist/components/Button/Button.cjs.map +1 -1
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/Button/Button.mjs +7 -8
- package/dist/components/Button/Button.mjs.map +1 -1
- package/dist/components/Container/index.cjs +2 -2
- package/dist/components/Container/index.cjs.map +1 -1
- package/dist/components/Container/index.mjs +2 -2
- package/dist/components/Container/index.mjs.map +1 -1
- package/dist/components/DictionaryEditor/index.cjs +4 -0
- package/dist/components/DictionaryEditor/index.cjs.map +1 -1
- package/dist/components/DictionaryEditor/index.mjs +4 -0
- package/dist/components/DictionaryEditor/index.mjs.map +1 -1
- package/dist/components/DictionaryEditor/useEditedContentStore.cjs +3 -0
- package/dist/components/DictionaryEditor/useEditedContentStore.cjs.map +1 -1
- package/dist/components/DictionaryEditor/useEditedContentStore.d.ts +2 -2
- package/dist/components/DictionaryEditor/useEditedContentStore.d.ts.map +1 -1
- package/dist/components/DictionaryEditor/useEditedContentStore.mjs +3 -0
- package/dist/components/DictionaryEditor/useEditedContentStore.mjs.map +1 -1
- package/dist/components/DictionaryEditor/useEditionPanelStore.cjs.map +1 -1
- package/dist/components/DictionaryEditor/useEditionPanelStore.d.ts +1 -1
- package/dist/components/DictionaryEditor/useEditionPanelStore.d.ts.map +1 -1
- package/dist/components/DictionaryEditor/useEditionPanelStore.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.cjs +7 -5
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.d.ts +1 -0
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.mjs +7 -5
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.cjs +6 -3
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.d.ts +1 -0
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs +6 -3
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/JSONEditor.cjs +20 -18
- package/dist/components/DictionaryFieldEditor/JSONEditor.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/JSONEditor.d.ts +1 -0
- package/dist/components/DictionaryFieldEditor/JSONEditor.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/JSONEditor.mjs +20 -18
- package/dist/components/DictionaryFieldEditor/JSONEditor.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/KeyPathBreadcrumb.cjs +10 -2
- package/dist/components/DictionaryFieldEditor/KeyPathBreadcrumb.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/KeyPathBreadcrumb.d.ts +2 -0
- package/dist/components/DictionaryFieldEditor/KeyPathBreadcrumb.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/KeyPathBreadcrumb.mjs +10 -2
- package/dist/components/DictionaryFieldEditor/KeyPathBreadcrumb.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NodeEditor.cjs +10 -14
- package/dist/components/DictionaryFieldEditor/NodeEditor.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NodeEditor.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/NodeEditor.mjs +10 -14
- package/dist/components/DictionaryFieldEditor/NodeEditor.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs +60 -17
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs +63 -20
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.cjs +32 -0
- package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.d.ts +4 -0
- package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.mjs +32 -0
- package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.mjs.map +1 -1
- package/dist/components/DropDown/index.cjs.map +1 -1
- package/dist/components/DropDown/index.d.ts +18 -1
- package/dist/components/DropDown/index.d.ts.map +1 -1
- package/dist/components/DropDown/index.mjs.map +1 -1
- package/dist/components/Headers/index.cjs +1 -1
- package/dist/components/Headers/index.cjs.map +1 -1
- package/dist/components/Headers/index.mjs +1 -1
- package/dist/components/Headers/index.mjs.map +1 -1
- package/dist/components/IDE/CodeRender copy.cjs +141 -0
- package/dist/components/IDE/CodeRender copy.cjs.map +1 -0
- package/dist/components/IDE/CodeRender copy.d.ts +14 -0
- package/dist/components/IDE/CodeRender copy.d.ts.map +1 -0
- package/dist/components/IDE/CodeRender copy.mjs +141 -0
- package/dist/components/IDE/CodeRender copy.mjs.map +1 -0
- package/dist/components/IDE/CodeRender.cjs +39 -625
- package/dist/components/IDE/CodeRender.cjs.map +1 -1
- package/dist/components/IDE/CodeRender.d.ts +4 -5
- package/dist/components/IDE/CodeRender.d.ts.map +1 -1
- package/dist/components/IDE/CodeRender.mjs +40 -604
- package/dist/components/IDE/CodeRender.mjs.map +1 -1
- package/dist/components/IDE/CopyButton.cjs +40 -0
- package/dist/components/IDE/CopyButton.cjs.map +1 -0
- package/dist/components/IDE/CopyButton.content.cjs +26 -0
- package/dist/components/IDE/CopyButton.content.cjs.map +1 -0
- package/dist/components/IDE/CopyButton.content.d.ts +8 -0
- package/dist/components/IDE/CopyButton.content.d.ts.map +1 -0
- package/dist/components/IDE/CopyButton.content.mjs +26 -0
- package/dist/components/IDE/CopyButton.content.mjs.map +1 -0
- package/dist/components/IDE/CopyButton.d.ts +7 -0
- package/dist/components/IDE/CopyButton.d.ts.map +1 -0
- package/dist/components/IDE/CopyButton.mjs +40 -0
- package/dist/components/IDE/CopyButton.mjs.map +1 -0
- package/dist/components/IDE/IDE.cjs +1 -1
- package/dist/components/IDE/IDE.cjs.map +1 -1
- package/dist/components/IDE/IDE.mjs +1 -1
- package/dist/components/IDE/IDE.mjs.map +1 -1
- package/dist/components/IDE/MarkDownRender.cjs +10 -2
- package/dist/components/IDE/MarkDownRender.cjs.map +1 -1
- package/dist/components/IDE/MarkDownRender.d.ts.map +1 -1
- package/dist/components/IDE/MarkDownRender.mjs +10 -2
- package/dist/components/IDE/MarkDownRender.mjs.map +1 -1
- package/dist/components/IDE/MonacoCode.cjs +129 -0
- package/dist/components/IDE/MonacoCode.cjs.map +1 -0
- package/dist/components/IDE/MonacoCode.d.ts +14 -0
- package/dist/components/IDE/MonacoCode.d.ts.map +1 -0
- package/dist/components/IDE/MonacoCode.mjs +129 -0
- package/dist/components/IDE/MonacoCode.mjs.map +1 -0
- package/dist/components/Link/Link.cjs +50 -31
- package/dist/components/Link/Link.cjs.map +1 -1
- package/dist/components/Link/Link.d.ts +3 -0
- package/dist/components/Link/Link.d.ts.map +1 -1
- package/dist/components/Link/Link.mjs +51 -32
- package/dist/components/Link/Link.mjs.map +1 -1
- package/dist/components/Link/index.cjs +1 -0
- package/dist/components/Link/index.cjs.map +1 -1
- package/dist/components/Link/index.mjs +3 -2
- package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.cjs +118 -34
- package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.cjs.map +1 -1
- package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.d.ts +2 -0
- package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.d.ts.map +1 -1
- package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.mjs +119 -35
- package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.mjs.map +1 -1
- package/dist/components/LocaleSwitcherDropDown/localeSwitcher.content.cjs +63 -1
- package/dist/components/LocaleSwitcherDropDown/localeSwitcher.content.cjs.map +1 -1
- package/dist/components/LocaleSwitcherDropDown/localeSwitcher.content.d.ts +6 -0
- package/dist/components/LocaleSwitcherDropDown/localeSwitcher.content.d.ts.map +1 -1
- package/dist/components/LocaleSwitcherDropDown/localeSwitcher.content.mjs +63 -1
- package/dist/components/LocaleSwitcherDropDown/localeSwitcher.content.mjs.map +1 -1
- package/dist/components/MarkDownRender/index.cjs +4 -2
- package/dist/components/MarkDownRender/index.cjs.map +1 -1
- package/dist/components/MarkDownRender/index.d.ts +3 -1
- package/dist/components/MarkDownRender/index.d.ts.map +1 -1
- package/dist/components/MarkDownRender/index.mjs +4 -2
- package/dist/components/MarkDownRender/index.mjs.map +1 -1
- package/dist/components/Modal/Modal.cjs +8 -10
- package/dist/components/Modal/Modal.cjs.map +1 -1
- package/dist/components/Modal/Modal.d.ts.map +1 -1
- package/dist/components/Modal/Modal.mjs +8 -10
- package/dist/components/Modal/Modal.mjs.map +1 -1
- package/dist/components/Navbar/DesktopNavbar.cjs +1 -1
- package/dist/components/Navbar/DesktopNavbar.cjs.map +1 -1
- package/dist/components/Navbar/DesktopNavbar.mjs +1 -1
- package/dist/components/Navbar/DesktopNavbar.mjs.map +1 -1
- package/dist/components/index.cjs +5 -0
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.mjs +6 -1
- package/dist/components/index.mjs.map +1 -1
- package/dist/design-system.css +235 -0
- package/dist/hooks/index.cjs +6 -0
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.mjs +7 -1
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/hooks/intlayerAPIHooks.cjs +8 -2
- package/dist/hooks/intlayerAPIHooks.cjs.map +1 -1
- package/dist/hooks/intlayerAPIHooks.d.ts +4 -0
- package/dist/hooks/intlayerAPIHooks.d.ts.map +1 -1
- package/dist/hooks/intlayerAPIHooks.mjs +8 -2
- package/dist/hooks/intlayerAPIHooks.mjs.map +1 -1
- package/dist/hooks/useAsync/index.cjs +3 -0
- package/dist/hooks/useAsync/index.cjs.map +1 -1
- package/dist/hooks/useAsync/index.d.ts +1 -0
- package/dist/hooks/useAsync/index.d.ts.map +1 -1
- package/dist/hooks/useAsync/index.mjs +4 -1
- package/dist/hooks/useAsync/index.mjs.map +1 -1
- package/dist/hooks/useAsync/useAsync.cjs +2 -9
- package/dist/hooks/useAsync/useAsync.cjs.map +1 -1
- package/dist/hooks/useAsync/useAsync.d.ts.map +1 -1
- package/dist/hooks/useAsync/useAsync.mjs +3 -10
- package/dist/hooks/useAsync/useAsync.mjs.map +1 -1
- package/dist/hooks/useAsync/useAsyncStateStore.cjs +123 -69
- package/dist/hooks/useAsync/useAsyncStateStore.cjs.map +1 -1
- package/dist/hooks/useAsync/useAsyncStateStore.d.ts +35 -11
- package/dist/hooks/useAsync/useAsyncStateStore.d.ts.map +1 -1
- package/dist/hooks/useAsync/useAsyncStateStore.mjs +123 -69
- package/dist/hooks/useAsync/useAsyncStateStore.mjs.map +1 -1
- package/dist/hooks/useIntlayerAPI.d.ts +3 -0
- package/dist/hooks/useIntlayerAPI.d.ts.map +1 -1
- package/dist/hooks/useIsDarkMode.cjs +15 -0
- package/dist/hooks/useIsDarkMode.cjs.map +1 -0
- package/dist/hooks/useIsDarkMode.d.ts +2 -0
- package/dist/hooks/useIsDarkMode.d.ts.map +1 -0
- package/dist/hooks/useIsDarkMode.mjs +15 -0
- package/dist/hooks/useIsDarkMode.mjs.map +1 -0
- package/dist/libs/intlayer-api/ai.cjs +24 -0
- package/dist/libs/intlayer-api/ai.cjs.map +1 -0
- package/dist/libs/intlayer-api/ai.d.ts +10 -0
- package/dist/libs/intlayer-api/ai.d.ts.map +1 -0
- package/dist/libs/intlayer-api/ai.mjs +24 -0
- package/dist/libs/intlayer-api/ai.mjs.map +1 -0
- package/dist/libs/intlayer-api/index.cjs +3 -1
- package/dist/libs/intlayer-api/index.cjs.map +1 -1
- package/dist/libs/intlayer-api/index.d.ts +6 -0
- package/dist/libs/intlayer-api/index.d.ts.map +1 -1
- package/dist/libs/intlayer-api/index.mjs +3 -1
- package/dist/libs/intlayer-api/index.mjs.map +1 -1
- package/dist/tailwind.css +1 -1
- 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 {
|
|
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 =
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
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
|
-
|
|
55
|
-
|
|
56
|
-
|
|
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
|
|
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(
|
|
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
|
|
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;
|
|
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(
|
|
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
|
|
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.
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
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';\
|
|
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","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AAF,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,uDACC,OAAI,EAAA,WAAU,qDACX,WAAgB,gBAAA,UAAU,KAAK,KAC/BH,2BAAA,kBAAA;AAAA,QAACE,2BAAA;AAAA,QAAA;AAAA,UACC,QAAM;AAAA,UACN,YAAY;AAAA,UACZ,WAAU;AAAA,UACV,aAAY;AAAA,UAEZ,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;
|
|
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.
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
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';\
|
|
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\"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;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 {
|
|
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
|
|
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","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A,YACN,SAAQ;AAAA,YACR,OAAM;AAAA,YACN,WAAU;AAAA,YACV,WAAW;AAAA,YACX,SAAS,MAAM,qBAAqB,WAAW,GAAG;AAAA,YAEjD,UAAY,YAAA;AAAA,UAAA;AAAA,QACf;AAAA,QAED,oBACCF,2BAAA,kBAAA;AAAA,UAACD,sCAAAA,KAAK;AAAA,UAAL;AAAA,YACC,MAAK;AAAA,YACL,OAAO,cAAc;AAAA,YACrB,UAAU,CAAC,YAAY;AAAA,YACvB,MAAMI,YAAA;AAAA,YACN,OAAM;AAAA,YACN,WAAU;AAAA,YACV,WAAW;AAAA,YAEV,UAAc,cAAA;AAAA,UAAA;AAAA,YAGjB,YACEH,2BAAA,kBAAA;AAAA,UAACD,sCAAAA,KAAK;AAAA,UAAL;AAAA,YACC,MAAK;AAAA,YACL,OAAO,WAAW;AAAA,YAClB,UAAU,CAAC,YAAY;AAAA,YACvB,MAAMK,YAAA;AAAA,YACN,OAAM;AAAA,YACN,WAAU;AAAA,YACV,WAAW;AAAA,YAEV,UAAW,WAAA;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;
|
|
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"}
|