@intlayer/design-system 5.3.3 → 5.3.4
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 +72 -54
- package/dist/{Form-MjLzPGze.js → Form-CriPBaZk.js} +11 -1
- package/dist/Form-CriPBaZk.js.map +1 -0
- package/dist/{Form-BpxW17v4.cjs → Form-DJrUK3mm.cjs} +11 -1
- package/dist/Form-DJrUK3mm.cjs.map +1 -0
- package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.cjs +1 -1
- package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.mjs +1 -1
- package/dist/components/Auth/DefineNewPasswordForm/DefineNewPasswordForm.cjs +1 -1
- package/dist/components/Auth/DefineNewPasswordForm/DefineNewPasswordForm.mjs +1 -1
- package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.cjs +1 -1
- package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.mjs +1 -1
- package/dist/components/Auth/SignInForm/SignInForm.cjs +1 -1
- package/dist/components/Auth/SignInForm/SignInForm.mjs +1 -1
- package/dist/components/Auth/SignUpForm/SignUpForm.cjs +1 -1
- package/dist/components/Auth/SignUpForm/SignUpForm.mjs +1 -1
- package/dist/components/Auth/VerifyEmailForm/VerifyEmailForm.cjs +1 -1
- package/dist/components/Auth/VerifyEmailForm/VerifyEmailForm.mjs +1 -1
- package/dist/components/ContentEditor/ContentEditor.cjs.map +1 -1
- package/dist/components/ContentEditor/ContentEditor.d.ts +3 -2
- package/dist/components/ContentEditor/ContentEditor.d.ts.map +1 -1
- package/dist/components/ContentEditor/ContentEditor.mjs.map +1 -1
- package/dist/components/ContentEditor/ContentEditorTextArea.cjs +1 -1
- package/dist/components/ContentEditor/ContentEditorTextArea.mjs +1 -1
- package/dist/components/DictionaryEditor/DictionaryEditor.cjs +2 -1
- package/dist/components/DictionaryEditor/DictionaryEditor.cjs.map +1 -1
- package/dist/components/DictionaryEditor/DictionaryEditor.d.ts.map +1 -1
- package/dist/components/DictionaryEditor/DictionaryEditor.mjs +2 -1
- package/dist/components/DictionaryEditor/DictionaryEditor.mjs.map +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/ArrayWrapper.cjs +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/ArrayWrapper.mjs +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/ConditionWrapper.cjs +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/ConditionWrapper.mjs +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/EnumerationWrapper.cjs +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/EnumerationWrapper.mjs +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/FileWrapper.cjs +58 -0
- package/dist/components/DictionaryEditor/NodeWrapper/FileWrapper.cjs.map +1 -0
- package/dist/components/DictionaryEditor/NodeWrapper/FileWrapper.d.ts +9 -0
- package/dist/components/DictionaryEditor/NodeWrapper/FileWrapper.d.ts.map +1 -0
- package/dist/components/DictionaryEditor/NodeWrapper/FileWrapper.mjs +58 -0
- package/dist/components/DictionaryEditor/NodeWrapper/FileWrapper.mjs.map +1 -0
- package/dist/components/DictionaryEditor/NodeWrapper/InsertionWrapper.cjs +21 -0
- package/dist/components/DictionaryEditor/NodeWrapper/InsertionWrapper.cjs.map +1 -0
- package/dist/components/DictionaryEditor/NodeWrapper/InsertionWrapper.d.ts +9 -0
- package/dist/components/DictionaryEditor/NodeWrapper/InsertionWrapper.d.ts.map +1 -0
- package/dist/components/DictionaryEditor/NodeWrapper/InsertionWrapper.mjs +21 -0
- package/dist/components/DictionaryEditor/NodeWrapper/InsertionWrapper.mjs.map +1 -0
- package/dist/components/DictionaryEditor/NodeWrapper/MarkdownWrapper.cjs +4 -15
- package/dist/components/DictionaryEditor/NodeWrapper/MarkdownWrapper.cjs.map +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/MarkdownWrapper.d.ts +2 -2
- package/dist/components/DictionaryEditor/NodeWrapper/MarkdownWrapper.d.ts.map +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/MarkdownWrapper.mjs +4 -15
- package/dist/components/DictionaryEditor/NodeWrapper/MarkdownWrapper.mjs.map +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/NestedObjectWrapper.cjs +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/NestedObjectWrapper.mjs +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/StringWrapper.cjs +8 -5
- package/dist/components/DictionaryEditor/NodeWrapper/StringWrapper.cjs.map +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/StringWrapper.d.ts +2 -2
- package/dist/components/DictionaryEditor/NodeWrapper/StringWrapper.d.ts.map +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/StringWrapper.mjs +8 -5
- package/dist/components/DictionaryEditor/NodeWrapper/StringWrapper.mjs.map +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/TranslationWrapper.cjs +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/TranslationWrapper.mjs +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/index.cjs +2 -2
- package/dist/components/DictionaryEditor/NodeWrapper/index.d.ts +4 -2
- package/dist/components/DictionaryEditor/NodeWrapper/index.d.ts.map +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/index.mjs +2 -2
- package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.cjs +102 -22
- package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.d.ts +3 -1
- package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.mjs +102 -22
- package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.cjs +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.mjs +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.cjs +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs +1 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.cjs +48 -114
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.mjs +49 -115
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.cjs +0 -51
- package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.d.ts +0 -105
- package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.mjs +0 -51
- package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NodeTypeSelector.cjs +6 -5
- package/dist/components/DictionaryFieldEditor/NodeTypeSelector.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NodeTypeSelector.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/NodeTypeSelector.mjs +7 -6
- package/dist/components/DictionaryFieldEditor/NodeTypeSelector.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs +1 -1
- package/dist/components/DictionaryFieldEditor/getIsEditableSection.cjs +10 -2
- package/dist/components/DictionaryFieldEditor/getIsEditableSection.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/getIsEditableSection.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/getIsEditableSection.mjs +11 -3
- package/dist/components/DictionaryFieldEditor/getIsEditableSection.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.cjs +30 -0
- package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.d.ts +66 -0
- package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.mjs +30 -0
- package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.mjs.map +1 -1
- package/dist/components/Form/Form.cjs +1 -1
- package/dist/components/Form/Form.mjs +1 -1
- package/dist/components/Form/elements/AutoSizeTextAreaElement.cjs +1 -1
- package/dist/components/Form/elements/AutoSizeTextAreaElement.mjs +1 -1
- package/dist/components/Form/elements/CheckboxElement.cjs +1 -1
- package/dist/components/Form/elements/CheckboxElement.mjs +1 -1
- package/dist/components/Form/elements/EditableFieldInputElement.cjs +1 -1
- package/dist/components/Form/elements/EditableFieldInputElement.d.ts +2 -2
- package/dist/components/Form/elements/EditableFieldInputElement.d.ts.map +1 -1
- package/dist/components/Form/elements/EditableFieldInputElement.mjs +1 -1
- package/dist/components/Form/elements/EditableFieldTextAreaElement.cjs +1 -1
- package/dist/components/Form/elements/EditableFieldTextAreaElement.d.ts +2 -2
- package/dist/components/Form/elements/EditableFieldTextAreaElement.d.ts.map +1 -1
- package/dist/components/Form/elements/EditableFieldTextAreaElement.mjs +1 -1
- package/dist/components/Form/elements/FormElement.cjs +1 -1
- package/dist/components/Form/elements/FormElement.mjs +1 -1
- package/dist/components/Form/elements/InputElement.cjs +1 -1
- package/dist/components/Form/elements/InputElement.d.ts +2 -2
- package/dist/components/Form/elements/InputElement.d.ts.map +1 -1
- package/dist/components/Form/elements/InputElement.mjs +1 -1
- package/dist/components/Form/elements/InputPasswordElement.cjs +1 -1
- package/dist/components/Form/elements/InputPasswordElement.d.ts +2 -2
- package/dist/components/Form/elements/InputPasswordElement.d.ts.map +1 -1
- package/dist/components/Form/elements/InputPasswordElement.mjs +1 -1
- package/dist/components/Form/elements/MultiselectElement.cjs +1 -1
- package/dist/components/Form/elements/MultiselectElement.mjs +1 -1
- package/dist/components/Form/elements/SelectElement.cjs +1 -1
- package/dist/components/Form/elements/SelectElement.mjs +1 -1
- package/dist/components/Form/elements/SwitchSelectorElement.cjs +1 -1
- package/dist/components/Form/elements/SwitchSelectorElement.mjs +1 -1
- package/dist/components/Form/elements/TextAreaElement.cjs +1 -1
- package/dist/components/Form/elements/TextAreaElement.d.ts +3 -3
- package/dist/components/Form/elements/TextAreaElement.d.ts.map +1 -1
- package/dist/components/Form/elements/TextAreaElement.mjs +1 -1
- package/dist/components/Form/elements/index.cjs +1 -1
- package/dist/components/Form/elements/index.mjs +1 -1
- package/dist/components/Form/index.cjs +1 -1
- package/dist/components/Form/index.mjs +1 -1
- package/dist/components/Form/layout/FormItemLayout.cjs +1 -1
- package/dist/components/Form/layout/FormItemLayout.mjs +1 -1
- package/dist/components/Form/layout/FormLabelLayout.cjs +12 -4
- package/dist/components/Form/layout/FormLabelLayout.cjs.map +1 -1
- package/dist/components/Form/layout/FormLabelLayout.d.ts.map +1 -1
- package/dist/components/Form/layout/FormLabelLayout.mjs +12 -4
- package/dist/components/Form/layout/FormLabelLayout.mjs.map +1 -1
- package/dist/components/Form/layout/index.cjs +1 -1
- package/dist/components/Form/layout/index.mjs +1 -1
- package/dist/components/Input/Input.cjs.map +1 -1
- package/dist/components/Input/Input.d.ts +1 -7
- package/dist/components/Input/Input.d.ts.map +1 -1
- package/dist/components/Input/Input.mjs.map +1 -1
- package/dist/components/TextArea/TextArea.cjs.map +1 -1
- package/dist/components/TextArea/TextArea.d.ts +1 -7
- package/dist/components/TextArea/TextArea.d.ts.map +1 -1
- package/dist/components/TextArea/TextArea.mjs.map +1 -1
- package/dist/components/index.cjs +1 -1
- package/dist/components/index.mjs +1 -1
- package/dist/hooks/intlayerAPIHooks.cjs.map +1 -1
- package/dist/hooks/intlayerAPIHooks.d.ts +54 -54
- package/dist/hooks/intlayerAPIHooks.d.ts.map +1 -1
- package/dist/hooks/intlayerAPIHooks.mjs.map +1 -1
- package/dist/hooks/useIntlayerAPI.d.ts +1 -1
- package/dist/hooks/useIntlayerAPI.d.ts.map +1 -1
- package/dist/{index-CVTE3oHq.js → index-Au2tP3vA.js} +27 -3
- package/dist/index-Au2tP3vA.js.map +1 -0
- package/dist/{index-BpCAhDMe.cjs → index-DbyCRREy.cjs} +27 -3
- package/dist/index-DbyCRREy.cjs.map +1 -0
- package/dist/utils/camelCase.cjs +2 -2
- package/dist/utils/camelCase.cjs.map +1 -1
- package/dist/utils/camelCase.d.ts +1 -1
- package/dist/utils/camelCase.d.ts.map +1 -1
- package/dist/utils/camelCase.mjs +2 -2
- package/dist/utils/camelCase.mjs.map +1 -1
- package/package.json +16 -18
- package/dist/Form-BpxW17v4.cjs.map +0 -1
- package/dist/Form-MjLzPGze.js.map +0 -1
- package/dist/index-BpCAhDMe.cjs.map +0 -1
- package/dist/index-CVTE3oHq.js.map +0 -1
|
@@ -6,7 +6,7 @@ const ReactExports = require("react");
|
|
|
6
6
|
const reactIntlayer = require("react-intlayer");
|
|
7
7
|
const components_Form_FormBase = require("../../Form/FormBase.cjs");
|
|
8
8
|
require("../../Form/FormField.cjs");
|
|
9
|
-
const components_Form_layout_FormItemLayout = require("../../../Form-
|
|
9
|
+
const components_Form_layout_FormItemLayout = require("../../../Form-DJrUK3mm.cjs");
|
|
10
10
|
const components_Auth_ResetPasswordForm_resetPasswordContent_content = require("./resetPasswordContent.content.cjs");
|
|
11
11
|
const components_Auth_ResetPasswordForm_useResetPasswordSchema = require("./useResetPasswordSchema.cjs");
|
|
12
12
|
const ResetPasswordForm = ({
|
|
@@ -4,7 +4,7 @@ import { useState, useEffect } from "react";
|
|
|
4
4
|
import { useDictionary } from "react-intlayer";
|
|
5
5
|
import { useForm } from "../../Form/FormBase.mjs";
|
|
6
6
|
import "../../Form/FormField.mjs";
|
|
7
|
-
import { F as Form } from "../../../Form-
|
|
7
|
+
import { F as Form } from "../../../Form-CriPBaZk.js";
|
|
8
8
|
import { resetPasswordContent } from "./resetPasswordContent.content.mjs";
|
|
9
9
|
import { useResetPasswordSchema } from "./useResetPasswordSchema.mjs";
|
|
10
10
|
const ResetPasswordForm = ({
|
|
@@ -5,7 +5,7 @@ const jsxRuntime = require("react/jsx-runtime");
|
|
|
5
5
|
const reactIntlayer = require("react-intlayer");
|
|
6
6
|
const components_Form_FormBase = require("../../Form/FormBase.cjs");
|
|
7
7
|
require("../../Form/FormField.cjs");
|
|
8
|
-
const components_Form_layout_FormItemLayout = require("../../../Form-
|
|
8
|
+
const components_Form_layout_FormItemLayout = require("../../../Form-DJrUK3mm.cjs");
|
|
9
9
|
const components_Auth_ExternalsLoginButtons_ExternalsLoginButtons = require("../ExternalsLoginButtons/ExternalsLoginButtons.cjs");
|
|
10
10
|
const components_Auth_SignInForm_signIn_content = require("./signIn.content.cjs");
|
|
11
11
|
const components_Auth_SignInForm_useSignInSchema = require("./useSignInSchema.cjs");
|
|
@@ -3,7 +3,7 @@ import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
|
3
3
|
import { useDictionary } from "react-intlayer";
|
|
4
4
|
import { useForm } from "../../Form/FormBase.mjs";
|
|
5
5
|
import "../../Form/FormField.mjs";
|
|
6
|
-
import { F as Form } from "../../../Form-
|
|
6
|
+
import { F as Form } from "../../../Form-CriPBaZk.js";
|
|
7
7
|
import { ExternalsLoginButtons } from "../ExternalsLoginButtons/ExternalsLoginButtons.mjs";
|
|
8
8
|
import { signInContent } from "./signIn.content.mjs";
|
|
9
9
|
import { useSignInSchema } from "./useSignInSchema.mjs";
|
|
@@ -5,7 +5,7 @@ const jsxRuntime = require("react/jsx-runtime");
|
|
|
5
5
|
const reactIntlayer = require("react-intlayer");
|
|
6
6
|
const components_Form_FormBase = require("../../Form/FormBase.cjs");
|
|
7
7
|
require("../../Form/FormField.cjs");
|
|
8
|
-
const components_Form_layout_FormItemLayout = require("../../../Form-
|
|
8
|
+
const components_Form_layout_FormItemLayout = require("../../../Form-DJrUK3mm.cjs");
|
|
9
9
|
const components_Auth_SignUpForm_signUpForm_content = require("./signUpForm.content.cjs");
|
|
10
10
|
const components_Auth_SignUpForm_useSignUpSchema = require("./useSignUpSchema.cjs");
|
|
11
11
|
const SignUpForm = ({
|
|
@@ -3,7 +3,7 @@ import { jsxs, jsx } from "react/jsx-runtime";
|
|
|
3
3
|
import { useDictionary } from "react-intlayer";
|
|
4
4
|
import { useForm } from "../../Form/FormBase.mjs";
|
|
5
5
|
import "../../Form/FormField.mjs";
|
|
6
|
-
import { F as Form } from "../../../Form-
|
|
6
|
+
import { F as Form } from "../../../Form-CriPBaZk.js";
|
|
7
7
|
import content from "./signUpForm.content.mjs";
|
|
8
8
|
import { useSignUpSchema } from "./useSignUpSchema.mjs";
|
|
9
9
|
const SignUpForm = ({
|
|
@@ -9,7 +9,7 @@ const reactIntlayer = require("react-intlayer");
|
|
|
9
9
|
const components_Button_Button = require("../../Button/Button.cjs");
|
|
10
10
|
const components_Form_FormBase = require("../../Form/FormBase.cjs");
|
|
11
11
|
require("../../Form/FormField.cjs");
|
|
12
|
-
const components_Form_layout_FormItemLayout = require("../../../Form-
|
|
12
|
+
const components_Form_layout_FormItemLayout = require("../../../Form-DJrUK3mm.cjs");
|
|
13
13
|
const components_Headers_index = require("../../Headers/index.cjs");
|
|
14
14
|
const components_Loader_index = require("../../Loader/index.cjs");
|
|
15
15
|
const components_Auth_useUser_index = require("../useUser/index.cjs");
|
|
@@ -7,7 +7,7 @@ import { useDictionary } from "react-intlayer";
|
|
|
7
7
|
import { Button } from "../../Button/Button.mjs";
|
|
8
8
|
import { useForm } from "../../Form/FormBase.mjs";
|
|
9
9
|
import "../../Form/FormField.mjs";
|
|
10
|
-
import { F as Form } from "../../../Form-
|
|
10
|
+
import { F as Form } from "../../../Form-CriPBaZk.js";
|
|
11
11
|
import { H3 } from "../../Headers/index.mjs";
|
|
12
12
|
import { Loader } from "../../Loader/index.mjs";
|
|
13
13
|
import { useUser } from "../useUser/index.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentEditor.cjs","sources":["../../../src/components/ContentEditor/ContentEditor.tsx"],"sourcesContent":["'use client';\n\nimport { Check, X } from 'lucide-react';\nimport {
|
|
1
|
+
{"version":3,"file":"ContentEditor.cjs","sources":["../../../src/components/ContentEditor/ContentEditor.tsx"],"sourcesContent":["'use client';\n\nimport { Check, X } from 'lucide-react';\nimport { useState, type FC, type ChangeEventHandler } from 'react';\nimport { cn } from '../../utils/cn';\nimport {\n AutoSizedTextArea,\n AutoSizedTextAreaProps,\n} from '../TextArea/AutoSizeTextArea';\n\nexport type ContentEditorProps = {\n children: string;\n onContentChange: (content: string) => void;\n isEditing?: boolean;\n} & AutoSizedTextAreaProps;\n\nexport const ContentEditor: FC<ContentEditorProps> = ({\n children,\n onContentChange,\n isEditing,\n ...props\n}) => {\n const [newValue, setNewValue] = useState<string>(children);\n const [resetIncrementor, setResetIncrementor] = useState<number>(0); // To reset the div on cancel\n const isEdited: boolean = newValue !== children;\n\n const handleCancel = () => {\n setNewValue(children);\n setResetIncrementor((prev) => prev + 1);\n };\n const handleValid = () => {\n onContentChange(newValue);\n };\n\n const handleOnContentChange: ChangeEventHandler<HTMLTextAreaElement> = (e) =>\n setNewValue(e.target.value ?? '');\n\n return (\n <div className=\"flex flex-row items-center justify-between gap-2\">\n <AutoSizedTextArea\n className={cn(\n 'break-word outline-hidden m-3 inline w-full bg-transparent',\n isEditing ? 'cursor-text' : 'cursor-pointer'\n )}\n onChange={handleOnContentChange}\n key={resetIncrementor}\n variant=\"invisible\"\n defaultValue={children}\n {...props}\n />\n {isEdited && (\n <div className=\"flex flex-row items-center justify-between gap-2\">\n <Check\n className=\"cursor-pointer hover:scale-110\"\n size={16}\n onClick={handleValid}\n />\n <X\n className=\"cursor-pointer hover:scale-110\"\n size={16}\n onClick={handleCancel}\n />\n </div>\n )}\n </div>\n );\n};\n"],"names":["useState","jsxs","jsx","AutoSizedTextArea","cn","Check","X"],"mappings":";;;;;;;;AAgBO,MAAM,gBAAwC,CAAC;AAAA,EACpD;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,CAAC,UAAU,WAAW,IAAIA,aAAAA,SAAiB,QAAQ;AACzD,QAAM,CAAC,kBAAkB,mBAAmB,IAAIA,aAAAA,SAAiB,CAAC;AAClE,QAAM,WAAoB,aAAa;AAEvC,QAAM,eAAe,MAAM;AACzB,gBAAY,QAAQ;AACA,wBAAA,CAAC,SAAS,OAAO,CAAC;AAAA,EACxC;AACA,QAAM,cAAc,MAAM;AACxB,oBAAgB,QAAQ;AAAA,EAC1B;AAEA,QAAM,wBAAiE,CAAC,MACtE,YAAY,EAAE,OAAO,SAAS,EAAE;AAGhC,SAAAC,2BAAA,KAAC,OAAI,EAAA,WAAU,oDACb,UAAA;AAAA,IAAAC,2BAAA;AAAA,MAACC,qCAAA;AAAA,MAAA;AAAA,QACC,WAAWC,SAAA;AAAA,UACT;AAAA,UACA,YAAY,gBAAgB;AAAA,QAC9B;AAAA,QACA,UAAU;AAAA,QAEV,SAAQ;AAAA,QACR,cAAc;AAAA,QACb,GAAG;AAAA,MAAA;AAAA,MAHC;AAAA,IAIP;AAAA,IACC,YACCH,2BAAA,KAAC,OAAI,EAAA,WAAU,oDACb,UAAA;AAAA,MAAAC,2BAAA;AAAA,QAACG,YAAA;AAAA,QAAA;AAAA,UACC,WAAU;AAAA,UACV,MAAM;AAAA,UACN,SAAS;AAAA,QAAA;AAAA,MACX;AAAA,MACAH,2BAAA;AAAA,QAACI,YAAA;AAAA,QAAA;AAAA,UACC,WAAU;AAAA,UACV,MAAM;AAAA,UACN,SAAS;AAAA,QAAA;AAAA,MAAA;AAAA,IACX,EACF,CAAA;AAAA,EAAA,GAEJ;AAEJ;;"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { AutoSizedTextAreaProps } from '../TextArea/AutoSizeTextArea';
|
|
2
3
|
export type ContentEditorProps = {
|
|
3
4
|
children: string;
|
|
4
5
|
onContentChange: (content: string) => void;
|
|
5
6
|
isEditing?: boolean;
|
|
6
|
-
} &
|
|
7
|
+
} & AutoSizedTextAreaProps;
|
|
7
8
|
export declare const ContentEditor: FC<ContentEditorProps>;
|
|
8
9
|
//# sourceMappingURL=ContentEditor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentEditor.d.ts","sourceRoot":"","sources":["../../../src/components/ContentEditor/ContentEditor.tsx"],"names":[],"mappings":"AAGA,OAAO,
|
|
1
|
+
{"version":3,"file":"ContentEditor.d.ts","sourceRoot":"","sources":["../../../src/components/ContentEditor/ContentEditor.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAY,KAAK,EAAE,EAA2B,MAAM,OAAO,CAAC;AAEnE,OAAO,EAEL,sBAAsB,EACvB,MAAM,8BAA8B,CAAC;AAEtC,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,GAAG,sBAAsB,CAAC;AAE3B,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,CAkDhD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentEditor.mjs","sources":["../../../src/components/ContentEditor/ContentEditor.tsx"],"sourcesContent":["'use client';\n\nimport { Check, X } from 'lucide-react';\nimport {
|
|
1
|
+
{"version":3,"file":"ContentEditor.mjs","sources":["../../../src/components/ContentEditor/ContentEditor.tsx"],"sourcesContent":["'use client';\n\nimport { Check, X } from 'lucide-react';\nimport { useState, type FC, type ChangeEventHandler } from 'react';\nimport { cn } from '../../utils/cn';\nimport {\n AutoSizedTextArea,\n AutoSizedTextAreaProps,\n} from '../TextArea/AutoSizeTextArea';\n\nexport type ContentEditorProps = {\n children: string;\n onContentChange: (content: string) => void;\n isEditing?: boolean;\n} & AutoSizedTextAreaProps;\n\nexport const ContentEditor: FC<ContentEditorProps> = ({\n children,\n onContentChange,\n isEditing,\n ...props\n}) => {\n const [newValue, setNewValue] = useState<string>(children);\n const [resetIncrementor, setResetIncrementor] = useState<number>(0); // To reset the div on cancel\n const isEdited: boolean = newValue !== children;\n\n const handleCancel = () => {\n setNewValue(children);\n setResetIncrementor((prev) => prev + 1);\n };\n const handleValid = () => {\n onContentChange(newValue);\n };\n\n const handleOnContentChange: ChangeEventHandler<HTMLTextAreaElement> = (e) =>\n setNewValue(e.target.value ?? '');\n\n return (\n <div className=\"flex flex-row items-center justify-between gap-2\">\n <AutoSizedTextArea\n className={cn(\n 'break-word outline-hidden m-3 inline w-full bg-transparent',\n isEditing ? 'cursor-text' : 'cursor-pointer'\n )}\n onChange={handleOnContentChange}\n key={resetIncrementor}\n variant=\"invisible\"\n defaultValue={children}\n {...props}\n />\n {isEdited && (\n <div className=\"flex flex-row items-center justify-between gap-2\">\n <Check\n className=\"cursor-pointer hover:scale-110\"\n size={16}\n onClick={handleValid}\n />\n <X\n className=\"cursor-pointer hover:scale-110\"\n size={16}\n onClick={handleCancel}\n />\n </div>\n )}\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;AAgBO,MAAM,gBAAwC,CAAC;AAAA,EACpD;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,CAAC,UAAU,WAAW,IAAI,SAAiB,QAAQ;AACzD,QAAM,CAAC,kBAAkB,mBAAmB,IAAI,SAAiB,CAAC;AAClE,QAAM,WAAoB,aAAa;AAEvC,QAAM,eAAe,MAAM;AACzB,gBAAY,QAAQ;AACA,wBAAA,CAAC,SAAS,OAAO,CAAC;AAAA,EACxC;AACA,QAAM,cAAc,MAAM;AACxB,oBAAgB,QAAQ;AAAA,EAC1B;AAEA,QAAM,wBAAiE,CAAC,MACtE,YAAY,EAAE,OAAO,SAAS,EAAE;AAGhC,SAAA,qBAAC,OAAI,EAAA,WAAU,oDACb,UAAA;AAAA,IAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,WAAW;AAAA,UACT;AAAA,UACA,YAAY,gBAAgB;AAAA,QAC9B;AAAA,QACA,UAAU;AAAA,QAEV,SAAQ;AAAA,QACR,cAAc;AAAA,QACb,GAAG;AAAA,MAAA;AAAA,MAHC;AAAA,IAIP;AAAA,IACC,YACC,qBAAC,OAAI,EAAA,WAAU,oDACb,UAAA;AAAA,MAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,WAAU;AAAA,UACV,MAAM;AAAA,UACN,SAAS;AAAA,QAAA;AAAA,MACX;AAAA,MACA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,WAAU;AAAA,UACV,MAAM;AAAA,UACN,SAAS;AAAA,QAAA;AAAA,MAAA;AAAA,IACX,EACF,CAAA;AAAA,EAAA,GAEJ;AAEJ;"}
|
|
@@ -17,7 +17,7 @@ require("@intlayer/api");
|
|
|
17
17
|
require("@hookform/resolvers");
|
|
18
18
|
require("react-hook-form");
|
|
19
19
|
require("../Form/FormField.cjs");
|
|
20
|
-
require("../../Form-
|
|
20
|
+
require("../../Form-DJrUK3mm.cjs");
|
|
21
21
|
require("../Auth/SignInForm/signIn.content.cjs");
|
|
22
22
|
require("zod");
|
|
23
23
|
require("../Auth/SignInForm/useSignInSchema.content.cjs");
|
|
@@ -15,7 +15,7 @@ import "@intlayer/api";
|
|
|
15
15
|
import "@hookform/resolvers";
|
|
16
16
|
import "react-hook-form";
|
|
17
17
|
import "../Form/FormField.mjs";
|
|
18
|
-
import "../../Form-
|
|
18
|
+
import "../../Form-CriPBaZk.js";
|
|
19
19
|
import "../Auth/SignInForm/signIn.content.mjs";
|
|
20
20
|
import "zod";
|
|
21
21
|
import "../Auth/SignInForm/useSignInSchema.content.mjs";
|
|
@@ -5,7 +5,7 @@ const jsxRuntime = require("react/jsx-runtime");
|
|
|
5
5
|
const ReactExports = require("react");
|
|
6
6
|
const editorReact = require("@intlayer/editor-react");
|
|
7
7
|
const components_DictionaryFieldEditor_SaveForm_SaveForm = require("../DictionaryFieldEditor/SaveForm/SaveForm.cjs");
|
|
8
|
-
const components_DictionaryEditor_NodeWrapper_ArrayWrapper = require("../../index-
|
|
8
|
+
const components_DictionaryEditor_NodeWrapper_ArrayWrapper = require("../../index-DbyCRREy.cjs");
|
|
9
9
|
const DictionaryEditor = ({
|
|
10
10
|
dictionary,
|
|
11
11
|
mode,
|
|
@@ -20,6 +20,7 @@ const DictionaryEditor = ({
|
|
|
20
20
|
{
|
|
21
21
|
...props,
|
|
22
22
|
keyPath: [],
|
|
23
|
+
dictionary,
|
|
23
24
|
key: JSON.stringify(
|
|
24
25
|
(editedContent?.[dictionary.key] ?? dictionary).content
|
|
25
26
|
),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DictionaryEditor.cjs","sources":["../../../src/components/DictionaryEditor/DictionaryEditor.tsx"],"sourcesContent":["'use client';\n\nimport type { Locales } from '@intlayer/config/client';\nimport type { Dictionary } from '@intlayer/core';\nimport { useEditedContent, useFocusDictionary } from '@intlayer/editor-react';\nimport type { FC } from 'react';\nimport { SaveForm } from '../DictionaryFieldEditor/SaveForm/SaveForm';\nimport { NodeWrapper } from './NodeWrapper';\n\ntype DictionaryEditorProps = {\n dictionary: Dictionary;\n locale: Locales;\n mode: ('local' | 'remote')[];\n};\n\nexport const DictionaryEditor: FC<DictionaryEditorProps> = ({\n dictionary,\n mode,\n ...props\n}) => {\n const { editedContent, addEditedContent } = useEditedContent();\n const { focusedContent, setFocusedContentKeyPath } = useFocusDictionary();\n\n const focusedKeyPath = focusedContent?.keyPath;\n\n return (\n <div className=\"flex flex-1 flex-col justify-between gap-2\">\n <div>\n <NodeWrapper\n {...props}\n keyPath={[]}\n key={JSON.stringify(\n (editedContent?.[dictionary.key] ?? dictionary).content\n )}\n editedContent={editedContent?.[dictionary.key]?.content}\n focusedKeyPath={focusedKeyPath}\n section={dictionary.content}\n onContentChange={(content) => {\n addEditedContent(dictionary.key, content.newValue, content.keyPath);\n }}\n onFocusKeyPath={setFocusedContentKeyPath}\n />\n </div>\n <SaveForm dictionary={dictionary} mode={mode} className=\"mb-4 flex-col\" />\n </div>\n );\n};\n"],"names":["useEditedContent","useFocusDictionary","jsxs","jsx","createElement","NodeWrapper","SaveForm"],"mappings":";;;;;;;;AAeO,MAAM,mBAA8C,CAAC;AAAA,EAC1D;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,EAAE,eAAe,iBAAiB,IAAIA,6BAAiB;AAC7D,QAAM,EAAE,gBAAgB,yBAAyB,IAAIC,+BAAmB;AAExE,QAAM,iBAAiB,gBAAgB;AAGrC,SAAAC,2BAAA,KAAC,OAAI,EAAA,WAAU,8CACb,UAAA;AAAA,IAAAC,+BAAC,OACC,EAAA,UAAAC,6BAAA;AAAA,MAACC,qDAAA;AAAA,MAAA;AAAA,QACE,GAAG;AAAA,QACJ,SAAS,CAAC;AAAA,QACV,KAAK,KAAK;AAAA,WACP,gBAAgB,WAAW,GAAG,KAAK,YAAY;AAAA,QAClD;AAAA,QACA,eAAe,gBAAgB,WAAW,GAAG,GAAG;AAAA,QAChD;AAAA,QACA,SAAS,WAAW;AAAA,QACpB,iBAAiB,CAAC,YAAY;AAC5B,2BAAiB,WAAW,KAAK,QAAQ,UAAU,QAAQ,OAAO;AAAA,QACpE;AAAA,QACA,gBAAgB;AAAA,MAAA;AAAA,IAAA,GAEpB;AAAA,IACCF,2BAAA,IAAAG,mDAAA,UAAA,EAAS,YAAwB,MAAY,WAAU,gBAAgB,CAAA;AAAA,EAAA,GAC1E;AAEJ;;"}
|
|
1
|
+
{"version":3,"file":"DictionaryEditor.cjs","sources":["../../../src/components/DictionaryEditor/DictionaryEditor.tsx"],"sourcesContent":["'use client';\n\nimport type { Locales } from '@intlayer/config/client';\nimport type { Dictionary } from '@intlayer/core';\nimport { useEditedContent, useFocusDictionary } from '@intlayer/editor-react';\nimport type { FC } from 'react';\nimport { SaveForm } from '../DictionaryFieldEditor/SaveForm/SaveForm';\nimport { NodeWrapper } from './NodeWrapper';\n\ntype DictionaryEditorProps = {\n dictionary: Dictionary;\n locale: Locales;\n mode: ('local' | 'remote')[];\n};\n\nexport const DictionaryEditor: FC<DictionaryEditorProps> = ({\n dictionary,\n mode,\n ...props\n}) => {\n const { editedContent, addEditedContent } = useEditedContent();\n const { focusedContent, setFocusedContentKeyPath } = useFocusDictionary();\n\n const focusedKeyPath = focusedContent?.keyPath;\n\n return (\n <div className=\"flex flex-1 flex-col justify-between gap-2\">\n <div>\n <NodeWrapper\n {...props}\n keyPath={[]}\n dictionary={dictionary}\n key={JSON.stringify(\n (editedContent?.[dictionary.key] ?? dictionary).content\n )}\n editedContent={editedContent?.[dictionary.key]?.content}\n focusedKeyPath={focusedKeyPath}\n section={dictionary.content}\n onContentChange={(content) => {\n addEditedContent(dictionary.key, content.newValue, content.keyPath);\n }}\n onFocusKeyPath={setFocusedContentKeyPath}\n />\n </div>\n <SaveForm dictionary={dictionary} mode={mode} className=\"mb-4 flex-col\" />\n </div>\n );\n};\n"],"names":["useEditedContent","useFocusDictionary","jsxs","jsx","createElement","NodeWrapper","SaveForm"],"mappings":";;;;;;;;AAeO,MAAM,mBAA8C,CAAC;AAAA,EAC1D;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,EAAE,eAAe,iBAAiB,IAAIA,6BAAiB;AAC7D,QAAM,EAAE,gBAAgB,yBAAyB,IAAIC,+BAAmB;AAExE,QAAM,iBAAiB,gBAAgB;AAGrC,SAAAC,2BAAA,KAAC,OAAI,EAAA,WAAU,8CACb,UAAA;AAAA,IAAAC,+BAAC,OACC,EAAA,UAAAC,6BAAA;AAAA,MAACC,qDAAA;AAAA,MAAA;AAAA,QACE,GAAG;AAAA,QACJ,SAAS,CAAC;AAAA,QACV;AAAA,QACA,KAAK,KAAK;AAAA,WACP,gBAAgB,WAAW,GAAG,KAAK,YAAY;AAAA,QAClD;AAAA,QACA,eAAe,gBAAgB,WAAW,GAAG,GAAG;AAAA,QAChD;AAAA,QACA,SAAS,WAAW;AAAA,QACpB,iBAAiB,CAAC,YAAY;AAC5B,2BAAiB,WAAW,KAAK,QAAQ,UAAU,QAAQ,OAAO;AAAA,QACpE;AAAA,QACA,gBAAgB;AAAA,MAAA;AAAA,IAAA,GAEpB;AAAA,IACCF,2BAAA,IAAAG,mDAAA,UAAA,EAAS,YAAwB,MAAY,WAAU,gBAAgB,CAAA;AAAA,EAAA,GAC1E;AAEJ;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DictionaryEditor.d.ts","sourceRoot":"","sources":["../../../src/components/DictionaryEditor/DictionaryEditor.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEjD,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAIhC,KAAK,qBAAqB,GAAG;IAC3B,UAAU,EAAE,UAAU,CAAC;IACvB,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE,CAAC,OAAO,GAAG,QAAQ,CAAC,EAAE,CAAC;CAC9B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,
|
|
1
|
+
{"version":3,"file":"DictionaryEditor.d.ts","sourceRoot":"","sources":["../../../src/components/DictionaryEditor/DictionaryEditor.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEjD,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAIhC,KAAK,qBAAqB,GAAG;IAC3B,UAAU,EAAE,UAAU,CAAC;IACvB,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE,CAAC,OAAO,GAAG,QAAQ,CAAC,EAAE,CAAC;CAC9B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,CAgCtD,CAAC"}
|
|
@@ -3,7 +3,7 @@ import { jsxs, jsx } from "react/jsx-runtime";
|
|
|
3
3
|
import { createElement } from "react";
|
|
4
4
|
import { useEditedContent, useFocusDictionary } from "@intlayer/editor-react";
|
|
5
5
|
import { SaveForm } from "../DictionaryFieldEditor/SaveForm/SaveForm.mjs";
|
|
6
|
-
import { N as NodeWrapper } from "../../index-
|
|
6
|
+
import { N as NodeWrapper } from "../../index-Au2tP3vA.js";
|
|
7
7
|
const DictionaryEditor = ({
|
|
8
8
|
dictionary,
|
|
9
9
|
mode,
|
|
@@ -18,6 +18,7 @@ const DictionaryEditor = ({
|
|
|
18
18
|
{
|
|
19
19
|
...props,
|
|
20
20
|
keyPath: [],
|
|
21
|
+
dictionary,
|
|
21
22
|
key: JSON.stringify(
|
|
22
23
|
(editedContent?.[dictionary.key] ?? dictionary).content
|
|
23
24
|
),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DictionaryEditor.mjs","sources":["../../../src/components/DictionaryEditor/DictionaryEditor.tsx"],"sourcesContent":["'use client';\n\nimport type { Locales } from '@intlayer/config/client';\nimport type { Dictionary } from '@intlayer/core';\nimport { useEditedContent, useFocusDictionary } from '@intlayer/editor-react';\nimport type { FC } from 'react';\nimport { SaveForm } from '../DictionaryFieldEditor/SaveForm/SaveForm';\nimport { NodeWrapper } from './NodeWrapper';\n\ntype DictionaryEditorProps = {\n dictionary: Dictionary;\n locale: Locales;\n mode: ('local' | 'remote')[];\n};\n\nexport const DictionaryEditor: FC<DictionaryEditorProps> = ({\n dictionary,\n mode,\n ...props\n}) => {\n const { editedContent, addEditedContent } = useEditedContent();\n const { focusedContent, setFocusedContentKeyPath } = useFocusDictionary();\n\n const focusedKeyPath = focusedContent?.keyPath;\n\n return (\n <div className=\"flex flex-1 flex-col justify-between gap-2\">\n <div>\n <NodeWrapper\n {...props}\n keyPath={[]}\n key={JSON.stringify(\n (editedContent?.[dictionary.key] ?? dictionary).content\n )}\n editedContent={editedContent?.[dictionary.key]?.content}\n focusedKeyPath={focusedKeyPath}\n section={dictionary.content}\n onContentChange={(content) => {\n addEditedContent(dictionary.key, content.newValue, content.keyPath);\n }}\n onFocusKeyPath={setFocusedContentKeyPath}\n />\n </div>\n <SaveForm dictionary={dictionary} mode={mode} className=\"mb-4 flex-col\" />\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;AAeO,MAAM,mBAA8C,CAAC;AAAA,EAC1D;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,EAAE,eAAe,iBAAiB,IAAI,iBAAiB;AAC7D,QAAM,EAAE,gBAAgB,yBAAyB,IAAI,mBAAmB;AAExE,QAAM,iBAAiB,gBAAgB;AAGrC,SAAA,qBAAC,OAAI,EAAA,WAAU,8CACb,UAAA;AAAA,IAAA,oBAAC,OACC,EAAA,UAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACE,GAAG;AAAA,QACJ,SAAS,CAAC;AAAA,QACV,KAAK,KAAK;AAAA,WACP,gBAAgB,WAAW,GAAG,KAAK,YAAY;AAAA,QAClD;AAAA,QACA,eAAe,gBAAgB,WAAW,GAAG,GAAG;AAAA,QAChD;AAAA,QACA,SAAS,WAAW;AAAA,QACpB,iBAAiB,CAAC,YAAY;AAC5B,2BAAiB,WAAW,KAAK,QAAQ,UAAU,QAAQ,OAAO;AAAA,QACpE;AAAA,QACA,gBAAgB;AAAA,MAAA;AAAA,IAAA,GAEpB;AAAA,IACC,oBAAA,UAAA,EAAS,YAAwB,MAAY,WAAU,gBAAgB,CAAA;AAAA,EAAA,GAC1E;AAEJ;"}
|
|
1
|
+
{"version":3,"file":"DictionaryEditor.mjs","sources":["../../../src/components/DictionaryEditor/DictionaryEditor.tsx"],"sourcesContent":["'use client';\n\nimport type { Locales } from '@intlayer/config/client';\nimport type { Dictionary } from '@intlayer/core';\nimport { useEditedContent, useFocusDictionary } from '@intlayer/editor-react';\nimport type { FC } from 'react';\nimport { SaveForm } from '../DictionaryFieldEditor/SaveForm/SaveForm';\nimport { NodeWrapper } from './NodeWrapper';\n\ntype DictionaryEditorProps = {\n dictionary: Dictionary;\n locale: Locales;\n mode: ('local' | 'remote')[];\n};\n\nexport const DictionaryEditor: FC<DictionaryEditorProps> = ({\n dictionary,\n mode,\n ...props\n}) => {\n const { editedContent, addEditedContent } = useEditedContent();\n const { focusedContent, setFocusedContentKeyPath } = useFocusDictionary();\n\n const focusedKeyPath = focusedContent?.keyPath;\n\n return (\n <div className=\"flex flex-1 flex-col justify-between gap-2\">\n <div>\n <NodeWrapper\n {...props}\n keyPath={[]}\n dictionary={dictionary}\n key={JSON.stringify(\n (editedContent?.[dictionary.key] ?? dictionary).content\n )}\n editedContent={editedContent?.[dictionary.key]?.content}\n focusedKeyPath={focusedKeyPath}\n section={dictionary.content}\n onContentChange={(content) => {\n addEditedContent(dictionary.key, content.newValue, content.keyPath);\n }}\n onFocusKeyPath={setFocusedContentKeyPath}\n />\n </div>\n <SaveForm dictionary={dictionary} mode={mode} className=\"mb-4 flex-col\" />\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;AAeO,MAAM,mBAA8C,CAAC;AAAA,EAC1D;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,EAAE,eAAe,iBAAiB,IAAI,iBAAiB;AAC7D,QAAM,EAAE,gBAAgB,yBAAyB,IAAI,mBAAmB;AAExE,QAAM,iBAAiB,gBAAgB;AAGrC,SAAA,qBAAC,OAAI,EAAA,WAAU,8CACb,UAAA;AAAA,IAAA,oBAAC,OACC,EAAA,UAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACE,GAAG;AAAA,QACJ,SAAS,CAAC;AAAA,QACV;AAAA,QACA,KAAK,KAAK;AAAA,WACP,gBAAgB,WAAW,GAAG,KAAK,YAAY;AAAA,QAClD;AAAA,QACA,eAAe,gBAAgB,WAAW,GAAG,GAAG;AAAA,QAChD;AAAA,QACA,SAAS,WAAW;AAAA,QACpB,iBAAiB,CAAC,YAAY;AAC5B,2BAAiB,WAAW,KAAK,QAAQ,UAAU,QAAQ,OAAO;AAAA,QACpE;AAAA,QACA,gBAAgB;AAAA,MAAA;AAAA,IAAA,GAEpB;AAAA,IACC,oBAAA,UAAA,EAAS,YAAwB,MAAY,WAAU,gBAAgB,CAAA;AAAA,EAAA,GAC1E;AAEJ;"}
|
|
@@ -3,6 +3,6 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
3
3
|
require("react/jsx-runtime");
|
|
4
4
|
require("@intlayer/core");
|
|
5
5
|
require("../ItemLayout.cjs");
|
|
6
|
-
const components_DictionaryEditor_NodeWrapper_ArrayWrapper = require("../../../index-
|
|
6
|
+
const components_DictionaryEditor_NodeWrapper_ArrayWrapper = require("../../../index-DbyCRREy.cjs");
|
|
7
7
|
exports.ArrayWrapper = components_DictionaryEditor_NodeWrapper_ArrayWrapper.ArrayWrapper;
|
|
8
8
|
//# sourceMappingURL=ArrayWrapper.cjs.map
|
|
@@ -3,6 +3,6 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
3
3
|
require("react/jsx-runtime");
|
|
4
4
|
require("react");
|
|
5
5
|
require("@intlayer/core");
|
|
6
|
-
const components_DictionaryEditor_NodeWrapper_ArrayWrapper = require("../../../index-
|
|
6
|
+
const components_DictionaryEditor_NodeWrapper_ArrayWrapper = require("../../../index-DbyCRREy.cjs");
|
|
7
7
|
exports.ConditionWrapper = components_DictionaryEditor_NodeWrapper_ArrayWrapper.ConditionWrapper;
|
|
8
8
|
//# sourceMappingURL=ConditionWrapper.cjs.map
|
|
@@ -3,6 +3,6 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
3
3
|
require("react/jsx-runtime");
|
|
4
4
|
require("react");
|
|
5
5
|
require("@intlayer/core");
|
|
6
|
-
const components_DictionaryEditor_NodeWrapper_ArrayWrapper = require("../../../index-
|
|
6
|
+
const components_DictionaryEditor_NodeWrapper_ArrayWrapper = require("../../../index-DbyCRREy.cjs");
|
|
7
7
|
exports.EnumerationWrapper = components_DictionaryEditor_NodeWrapper_ArrayWrapper.EnumerationWrapper;
|
|
8
8
|
//# sourceMappingURL=EnumerationWrapper.cjs.map
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const core = require("@intlayer/core");
|
|
5
|
+
const editorReact = require("@intlayer/editor-react");
|
|
6
|
+
const components_DictionaryEditor_NodeWrapper_StringWrapper = require("./StringWrapper.cjs");
|
|
7
|
+
const FileWrapper = (props) => {
|
|
8
|
+
const { keyPath, section } = props;
|
|
9
|
+
const { addEditedContent } = editorReact.useEditedContent();
|
|
10
|
+
const editedContentValue = core.getContentNodeByKeyPath(
|
|
11
|
+
props.editedContent,
|
|
12
|
+
keyPath
|
|
13
|
+
);
|
|
14
|
+
const subSection = section[core.NodeType.File];
|
|
15
|
+
const { content } = section;
|
|
16
|
+
const newKeyPath = [
|
|
17
|
+
...keyPath,
|
|
18
|
+
{
|
|
19
|
+
type: core.NodeType.File
|
|
20
|
+
}
|
|
21
|
+
];
|
|
22
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ml-2 grid grid-cols-[auto,1fr] gap-2", children: [
|
|
23
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-neutral text-sm", children: [
|
|
24
|
+
subSection,
|
|
25
|
+
" "
|
|
26
|
+
] }),
|
|
27
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
28
|
+
components_DictionaryEditor_NodeWrapper_StringWrapper.StringWrapper,
|
|
29
|
+
{
|
|
30
|
+
...props,
|
|
31
|
+
keyPath: newKeyPath,
|
|
32
|
+
section: content,
|
|
33
|
+
editedContentValue: editedContentValue?.content,
|
|
34
|
+
onContentChange: (content2) => {
|
|
35
|
+
console.log("lll", {
|
|
36
|
+
subSection,
|
|
37
|
+
file: {
|
|
38
|
+
...section,
|
|
39
|
+
content: content2.newValue
|
|
40
|
+
},
|
|
41
|
+
keyPath,
|
|
42
|
+
newKeyPath
|
|
43
|
+
});
|
|
44
|
+
addEditedContent(
|
|
45
|
+
props.dictionary.key,
|
|
46
|
+
{
|
|
47
|
+
...section,
|
|
48
|
+
content: content2.newValue
|
|
49
|
+
},
|
|
50
|
+
keyPath
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
)
|
|
55
|
+
] });
|
|
56
|
+
};
|
|
57
|
+
exports.FileWrapper = FileWrapper;
|
|
58
|
+
//# sourceMappingURL=FileWrapper.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FileWrapper.cjs","sources":["../../../../src/components/DictionaryEditor/NodeWrapper/FileWrapper.tsx"],"sourcesContent":["import {\n getContentNodeByKeyPath,\n NodeType,\n type FileContent,\n type KeyPath,\n} from '@intlayer/core';\nimport type { FC } from 'react';\nimport { useEditedContent } from '@intlayer/editor-react';\nimport { StringWrapper, type StringWrapperProps } from './StringWrapper';\n\ntype FileWrapperProps = Omit<StringWrapperProps, 'section'> & {\n section: FileContent;\n};\n\nexport const FileWrapper: FC<FileWrapperProps> = (props) => {\n const { keyPath, section } = props;\n const { addEditedContent } = useEditedContent();\n const editedContentValue = getContentNodeByKeyPath(\n props.editedContent,\n keyPath\n ) as FileContent | undefined;\n\n const subSection = section[NodeType.File];\n const { content } = section;\n\n const newKeyPath: KeyPath[] = [\n ...keyPath,\n {\n type: NodeType.File,\n },\n ];\n\n return (\n <div className=\"ml-2 grid grid-cols-[auto,1fr] gap-2\">\n <span className=\"text-neutral text-sm\">{subSection} </span>\n <StringWrapper\n {...props}\n keyPath={newKeyPath}\n section={content}\n editedContentValue={editedContentValue?.content}\n onContentChange={(content) => {\n console.log('lll', {\n subSection,\n file: {\n ...section,\n content: content.newValue,\n },\n keyPath,\n newKeyPath,\n });\n addEditedContent(\n props.dictionary.key,\n {\n ...section,\n content: content.newValue,\n } as FileContent,\n keyPath\n );\n }}\n />\n </div>\n );\n};\n"],"names":["useEditedContent","getContentNodeByKeyPath","NodeType","jsxs","jsx","StringWrapper","content"],"mappings":";;;;;;AAca,MAAA,cAAoC,CAAC,UAAU;AACpD,QAAA,EAAE,SAAS,QAAA,IAAY;AACvB,QAAA,EAAE,iBAAiB,IAAIA,6BAAiB;AAC9C,QAAM,qBAAqBC,KAAA;AAAA,IACzB,MAAM;AAAA,IACN;AAAA,EACF;AAEM,QAAA,aAAa,QAAQC,KAAA,SAAS,IAAI;AAClC,QAAA,EAAE,YAAY;AAEpB,QAAM,aAAwB;AAAA,IAC5B,GAAG;AAAA,IACH;AAAA,MACE,MAAMA,KAAAA,SAAS;AAAA,IAAA;AAAA,EAEnB;AAGE,SAAAC,2BAAA,KAAC,OAAI,EAAA,WAAU,wCACb,UAAA;AAAA,IAACA,2BAAAA,KAAA,QAAA,EAAK,WAAU,wBAAwB,UAAA;AAAA,MAAA;AAAA,MAAW;AAAA,IAAA,GAAC;AAAA,IACpDC,2BAAA;AAAA,MAACC,sDAAA;AAAA,MAAA;AAAA,QACE,GAAG;AAAA,QACJ,SAAS;AAAA,QACT,SAAS;AAAA,QACT,oBAAoB,oBAAoB;AAAA,QACxC,iBAAiB,CAACC,aAAY;AAC5B,kBAAQ,IAAI,OAAO;AAAA,YACjB;AAAA,YACA,MAAM;AAAA,cACJ,GAAG;AAAA,cACH,SAASA,SAAQ;AAAA,YACnB;AAAA,YACA;AAAA,YACA;AAAA,UAAA,CACD;AACD;AAAA,YACE,MAAM,WAAW;AAAA,YACjB;AAAA,cACE,GAAG;AAAA,cACH,SAASA,SAAQ;AAAA,YACnB;AAAA,YACA;AAAA,UACF;AAAA,QAAA;AAAA,MACF;AAAA,IAAA;AAAA,EACF,GACF;AAEJ;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FileContent } from '@intlayer/core';
|
|
2
|
+
import { FC } from 'react';
|
|
3
|
+
import { StringWrapperProps } from './StringWrapper';
|
|
4
|
+
type FileWrapperProps = Omit<StringWrapperProps, 'section'> & {
|
|
5
|
+
section: FileContent;
|
|
6
|
+
};
|
|
7
|
+
export declare const FileWrapper: FC<FileWrapperProps>;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=FileWrapper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FileWrapper.d.ts","sourceRoot":"","sources":["../../../../src/components/DictionaryEditor/NodeWrapper/FileWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,WAAW,EAEjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,EAAiB,KAAK,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAEzE,KAAK,gBAAgB,GAAG,IAAI,CAAC,kBAAkB,EAAE,SAAS,CAAC,GAAG;IAC5D,OAAO,EAAE,WAAW,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CAgD5C,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { getContentNodeByKeyPath, NodeType } from "@intlayer/core";
|
|
3
|
+
import { useEditedContent } from "@intlayer/editor-react";
|
|
4
|
+
import { StringWrapper } from "./StringWrapper.mjs";
|
|
5
|
+
const FileWrapper = (props) => {
|
|
6
|
+
const { keyPath, section } = props;
|
|
7
|
+
const { addEditedContent } = useEditedContent();
|
|
8
|
+
const editedContentValue = getContentNodeByKeyPath(
|
|
9
|
+
props.editedContent,
|
|
10
|
+
keyPath
|
|
11
|
+
);
|
|
12
|
+
const subSection = section[NodeType.File];
|
|
13
|
+
const { content } = section;
|
|
14
|
+
const newKeyPath = [
|
|
15
|
+
...keyPath,
|
|
16
|
+
{
|
|
17
|
+
type: NodeType.File
|
|
18
|
+
}
|
|
19
|
+
];
|
|
20
|
+
return /* @__PURE__ */ jsxs("div", { className: "ml-2 grid grid-cols-[auto,1fr] gap-2", children: [
|
|
21
|
+
/* @__PURE__ */ jsxs("span", { className: "text-neutral text-sm", children: [
|
|
22
|
+
subSection,
|
|
23
|
+
" "
|
|
24
|
+
] }),
|
|
25
|
+
/* @__PURE__ */ jsx(
|
|
26
|
+
StringWrapper,
|
|
27
|
+
{
|
|
28
|
+
...props,
|
|
29
|
+
keyPath: newKeyPath,
|
|
30
|
+
section: content,
|
|
31
|
+
editedContentValue: editedContentValue?.content,
|
|
32
|
+
onContentChange: (content2) => {
|
|
33
|
+
console.log("lll", {
|
|
34
|
+
subSection,
|
|
35
|
+
file: {
|
|
36
|
+
...section,
|
|
37
|
+
content: content2.newValue
|
|
38
|
+
},
|
|
39
|
+
keyPath,
|
|
40
|
+
newKeyPath
|
|
41
|
+
});
|
|
42
|
+
addEditedContent(
|
|
43
|
+
props.dictionary.key,
|
|
44
|
+
{
|
|
45
|
+
...section,
|
|
46
|
+
content: content2.newValue
|
|
47
|
+
},
|
|
48
|
+
keyPath
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
)
|
|
53
|
+
] });
|
|
54
|
+
};
|
|
55
|
+
export {
|
|
56
|
+
FileWrapper
|
|
57
|
+
};
|
|
58
|
+
//# sourceMappingURL=FileWrapper.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FileWrapper.mjs","sources":["../../../../src/components/DictionaryEditor/NodeWrapper/FileWrapper.tsx"],"sourcesContent":["import {\n getContentNodeByKeyPath,\n NodeType,\n type FileContent,\n type KeyPath,\n} from '@intlayer/core';\nimport type { FC } from 'react';\nimport { useEditedContent } from '@intlayer/editor-react';\nimport { StringWrapper, type StringWrapperProps } from './StringWrapper';\n\ntype FileWrapperProps = Omit<StringWrapperProps, 'section'> & {\n section: FileContent;\n};\n\nexport const FileWrapper: FC<FileWrapperProps> = (props) => {\n const { keyPath, section } = props;\n const { addEditedContent } = useEditedContent();\n const editedContentValue = getContentNodeByKeyPath(\n props.editedContent,\n keyPath\n ) as FileContent | undefined;\n\n const subSection = section[NodeType.File];\n const { content } = section;\n\n const newKeyPath: KeyPath[] = [\n ...keyPath,\n {\n type: NodeType.File,\n },\n ];\n\n return (\n <div className=\"ml-2 grid grid-cols-[auto,1fr] gap-2\">\n <span className=\"text-neutral text-sm\">{subSection} </span>\n <StringWrapper\n {...props}\n keyPath={newKeyPath}\n section={content}\n editedContentValue={editedContentValue?.content}\n onContentChange={(content) => {\n console.log('lll', {\n subSection,\n file: {\n ...section,\n content: content.newValue,\n },\n keyPath,\n newKeyPath,\n });\n addEditedContent(\n props.dictionary.key,\n {\n ...section,\n content: content.newValue,\n } as FileContent,\n keyPath\n );\n }}\n />\n </div>\n );\n};\n"],"names":["content"],"mappings":";;;;AAca,MAAA,cAAoC,CAAC,UAAU;AACpD,QAAA,EAAE,SAAS,QAAA,IAAY;AACvB,QAAA,EAAE,iBAAiB,IAAI,iBAAiB;AAC9C,QAAM,qBAAqB;AAAA,IACzB,MAAM;AAAA,IACN;AAAA,EACF;AAEM,QAAA,aAAa,QAAQ,SAAS,IAAI;AAClC,QAAA,EAAE,YAAY;AAEpB,QAAM,aAAwB;AAAA,IAC5B,GAAG;AAAA,IACH;AAAA,MACE,MAAM,SAAS;AAAA,IAAA;AAAA,EAEnB;AAGE,SAAA,qBAAC,OAAI,EAAA,WAAU,wCACb,UAAA;AAAA,IAAC,qBAAA,QAAA,EAAK,WAAU,wBAAwB,UAAA;AAAA,MAAA;AAAA,MAAW;AAAA,IAAA,GAAC;AAAA,IACpD;AAAA,MAAC;AAAA,MAAA;AAAA,QACE,GAAG;AAAA,QACJ,SAAS;AAAA,QACT,SAAS;AAAA,QACT,oBAAoB,oBAAoB;AAAA,QACxC,iBAAiB,CAACA,aAAY;AAC5B,kBAAQ,IAAI,OAAO;AAAA,YACjB;AAAA,YACA,MAAM;AAAA,cACJ,GAAG;AAAA,cACH,SAASA,SAAQ;AAAA,YACnB;AAAA,YACA;AAAA,YACA;AAAA,UAAA,CACD;AACD;AAAA,YACE,MAAM,WAAW;AAAA,YACjB;AAAA,cACE,GAAG;AAAA,cACH,SAASA,SAAQ;AAAA,YACnB;AAAA,YACA;AAAA,UACF;AAAA,QAAA;AAAA,MACF;AAAA,IAAA;AAAA,EACF,GACF;AAEJ;"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const core = require("@intlayer/core");
|
|
5
|
+
const components_DictionaryEditor_NodeWrapper_ArrayWrapper = require("../../../index-DbyCRREy.cjs");
|
|
6
|
+
const InsertionWrapper = (props) => {
|
|
7
|
+
const { keyPath, section } = props;
|
|
8
|
+
const newKeyPath = [
|
|
9
|
+
...keyPath,
|
|
10
|
+
{
|
|
11
|
+
type: core.NodeType.Insertion
|
|
12
|
+
}
|
|
13
|
+
];
|
|
14
|
+
const subSection = section[core.NodeType.Insertion];
|
|
15
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ml-2 grid grid-cols-[auto,1fr] gap-2", children: [
|
|
16
|
+
/* @__PURE__ */ jsxRuntime.jsx(components_DictionaryEditor_NodeWrapper_ArrayWrapper.NodeWrapper, { ...props, keyPath: newKeyPath, section: subSection }),
|
|
17
|
+
";"
|
|
18
|
+
] });
|
|
19
|
+
};
|
|
20
|
+
exports.InsertionWrapper = InsertionWrapper;
|
|
21
|
+
//# sourceMappingURL=InsertionWrapper.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InsertionWrapper.cjs","sources":["../../../../src/components/DictionaryEditor/NodeWrapper/InsertionWrapper.tsx"],"sourcesContent":["import {\n type KeyPath,\n NodeType,\n type InsertionContent,\n type ContentNode,\n} from '@intlayer/core';\nimport type { FC } from 'react';\nimport { NodeWrapper, type NodeWrapperProps } from './index';\n\ntype InsertionWrapperProps = Omit<NodeWrapperProps, 'section'> & {\n section: InsertionContent<ContentNode>;\n};\n\nexport const InsertionWrapper: FC<InsertionWrapperProps> = (props) => {\n const { keyPath, section } = props;\n\n const newKeyPath: KeyPath[] = [\n ...keyPath,\n {\n type: NodeType.Insertion,\n },\n ];\n\n const subSection = section[NodeType.Insertion];\n\n return (\n <div className=\"ml-2 grid grid-cols-[auto,1fr] gap-2\">\n <NodeWrapper {...props} keyPath={newKeyPath} section={subSection} />;\n </div>\n );\n};\n"],"names":["NodeType","jsxs","jsx","NodeWrapper"],"mappings":";;;;;AAaa,MAAA,mBAA8C,CAAC,UAAU;AAC9D,QAAA,EAAE,SAAS,QAAA,IAAY;AAE7B,QAAM,aAAwB;AAAA,IAC5B,GAAG;AAAA,IACH;AAAA,MACE,MAAMA,KAAAA,SAAS;AAAA,IAAA;AAAA,EAEnB;AAEM,QAAA,aAAa,QAAQA,KAAA,SAAS,SAAS;AAG3C,SAAAC,2BAAA,KAAC,OAAI,EAAA,WAAU,wCACb,UAAA;AAAA,IAAAC,+BAACC,qDAAAA,eAAa,GAAG,OAAO,SAAS,YAAY,SAAS,YAAY;AAAA,IAAE;AAAA,EAAA,GACtE;AAEJ;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { InsertionContent, ContentNode } from '@intlayer/core';
|
|
2
|
+
import { FC } from 'react';
|
|
3
|
+
import { NodeWrapperProps } from './index';
|
|
4
|
+
type InsertionWrapperProps = Omit<NodeWrapperProps, 'section'> & {
|
|
5
|
+
section: InsertionContent<ContentNode>;
|
|
6
|
+
};
|
|
7
|
+
export declare const InsertionWrapper: FC<InsertionWrapperProps>;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=InsertionWrapper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InsertionWrapper.d.ts","sourceRoot":"","sources":["../../../../src/components/DictionaryEditor/NodeWrapper/InsertionWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,gBAAgB,EACrB,KAAK,WAAW,EACjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAAe,KAAK,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE7D,KAAK,qBAAqB,GAAG,IAAI,CAAC,gBAAgB,EAAE,SAAS,CAAC,GAAG;IAC/D,OAAO,EAAE,gBAAgB,CAAC,WAAW,CAAC,CAAC;CACxC,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,CAiBtD,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { NodeType } from "@intlayer/core";
|
|
3
|
+
import { N as NodeWrapper } from "../../../index-Au2tP3vA.js";
|
|
4
|
+
const InsertionWrapper = (props) => {
|
|
5
|
+
const { keyPath, section } = props;
|
|
6
|
+
const newKeyPath = [
|
|
7
|
+
...keyPath,
|
|
8
|
+
{
|
|
9
|
+
type: NodeType.Insertion
|
|
10
|
+
}
|
|
11
|
+
];
|
|
12
|
+
const subSection = section[NodeType.Insertion];
|
|
13
|
+
return /* @__PURE__ */ jsxs("div", { className: "ml-2 grid grid-cols-[auto,1fr] gap-2", children: [
|
|
14
|
+
/* @__PURE__ */ jsx(NodeWrapper, { ...props, keyPath: newKeyPath, section: subSection }),
|
|
15
|
+
";"
|
|
16
|
+
] });
|
|
17
|
+
};
|
|
18
|
+
export {
|
|
19
|
+
InsertionWrapper
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=InsertionWrapper.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InsertionWrapper.mjs","sources":["../../../../src/components/DictionaryEditor/NodeWrapper/InsertionWrapper.tsx"],"sourcesContent":["import {\n type KeyPath,\n NodeType,\n type InsertionContent,\n type ContentNode,\n} from '@intlayer/core';\nimport type { FC } from 'react';\nimport { NodeWrapper, type NodeWrapperProps } from './index';\n\ntype InsertionWrapperProps = Omit<NodeWrapperProps, 'section'> & {\n section: InsertionContent<ContentNode>;\n};\n\nexport const InsertionWrapper: FC<InsertionWrapperProps> = (props) => {\n const { keyPath, section } = props;\n\n const newKeyPath: KeyPath[] = [\n ...keyPath,\n {\n type: NodeType.Insertion,\n },\n ];\n\n const subSection = section[NodeType.Insertion];\n\n return (\n <div className=\"ml-2 grid grid-cols-[auto,1fr] gap-2\">\n <NodeWrapper {...props} keyPath={newKeyPath} section={subSection} />;\n </div>\n );\n};\n"],"names":[],"mappings":";;;AAaa,MAAA,mBAA8C,CAAC,UAAU;AAC9D,QAAA,EAAE,SAAS,QAAA,IAAY;AAE7B,QAAM,aAAwB;AAAA,IAC5B,GAAG;AAAA,IACH;AAAA,MACE,MAAM,SAAS;AAAA,IAAA;AAAA,EAEnB;AAEM,QAAA,aAAa,QAAQ,SAAS,SAAS;AAG3C,SAAA,qBAAC,OAAI,EAAA,WAAU,wCACb,UAAA;AAAA,IAAA,oBAAC,eAAa,GAAG,OAAO,SAAS,YAAY,SAAS,YAAY;AAAA,IAAE;AAAA,EAAA,GACtE;AAEJ;"}
|
|
@@ -1,18 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
const { keyPath, section } = props;
|
|
8
|
-
const newKeyPath = [
|
|
9
|
-
...keyPath,
|
|
10
|
-
{
|
|
11
|
-
type: core.NodeType.Markdown
|
|
12
|
-
}
|
|
13
|
-
];
|
|
14
|
-
const subSection = section[core.NodeType.Markdown];
|
|
15
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ml-2 grid grid-cols-[auto,1fr] gap-2", children: /* @__PURE__ */ jsxRuntime.jsx(components_DictionaryEditor_NodeWrapper_StringWrapper.StringWrapper, { ...props, keyPath: newKeyPath, section: subSection }) });
|
|
16
|
-
};
|
|
17
|
-
exports.MarkdownWrapper = MarkdownWrapper;
|
|
3
|
+
require("react/jsx-runtime");
|
|
4
|
+
require("@intlayer/core");
|
|
5
|
+
const components_DictionaryEditor_NodeWrapper_ArrayWrapper = require("../../../index-DbyCRREy.cjs");
|
|
6
|
+
exports.MarkdownWrapper = components_DictionaryEditor_NodeWrapper_ArrayWrapper.MarkdownWrapper;
|
|
18
7
|
//# sourceMappingURL=MarkdownWrapper.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarkdownWrapper.cjs","sources":[
|
|
1
|
+
{"version":3,"file":"MarkdownWrapper.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { MarkdownContent } from '@intlayer/core';
|
|
1
|
+
import { MarkdownContent, ContentNode } from '@intlayer/core';
|
|
2
2
|
import { FC } from 'react';
|
|
3
3
|
import { NodeWrapperProps } from './index';
|
|
4
4
|
type MarkdownWrapperProps = Omit<NodeWrapperProps, 'section'> & {
|
|
5
|
-
section: MarkdownContent
|
|
5
|
+
section: MarkdownContent<ContentNode>;
|
|
6
6
|
};
|
|
7
7
|
export declare const MarkdownWrapper: FC<MarkdownWrapperProps>;
|
|
8
8
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarkdownWrapper.d.ts","sourceRoot":"","sources":["../../../../src/components/DictionaryEditor/NodeWrapper/MarkdownWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"MarkdownWrapper.d.ts","sourceRoot":"","sources":["../../../../src/components/DictionaryEditor/NodeWrapper/MarkdownWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,eAAe,EACpB,KAAK,WAAW,EACjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAAe,KAAK,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE7D,KAAK,oBAAoB,GAAG,IAAI,CAAC,gBAAgB,EAAE,SAAS,CAAC,GAAG;IAC9D,OAAO,EAAE,eAAe,CAAC,WAAW,CAAC,CAAC;CACvC,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CAiBpD,CAAC"}
|
|
@@ -1,18 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
const MarkdownWrapper = (props) => {
|
|
5
|
-
const { keyPath, section } = props;
|
|
6
|
-
const newKeyPath = [
|
|
7
|
-
...keyPath,
|
|
8
|
-
{
|
|
9
|
-
type: NodeType.Markdown
|
|
10
|
-
}
|
|
11
|
-
];
|
|
12
|
-
const subSection = section[NodeType.Markdown];
|
|
13
|
-
return /* @__PURE__ */ jsx("div", { className: "ml-2 grid grid-cols-[auto,1fr] gap-2", children: /* @__PURE__ */ jsx(StringWrapper, { ...props, keyPath: newKeyPath, section: subSection }) });
|
|
14
|
-
};
|
|
1
|
+
import "react/jsx-runtime";
|
|
2
|
+
import "@intlayer/core";
|
|
3
|
+
import { M } from "../../../index-Au2tP3vA.js";
|
|
15
4
|
export {
|
|
16
|
-
MarkdownWrapper
|
|
5
|
+
M as MarkdownWrapper
|
|
17
6
|
};
|
|
18
7
|
//# sourceMappingURL=MarkdownWrapper.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarkdownWrapper.mjs","sources":[
|
|
1
|
+
{"version":3,"file":"MarkdownWrapper.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
|
|
@@ -3,6 +3,6 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
3
3
|
require("react/jsx-runtime");
|
|
4
4
|
require("@intlayer/core");
|
|
5
5
|
require("../ItemLayout.cjs");
|
|
6
|
-
const components_DictionaryEditor_NodeWrapper_ArrayWrapper = require("../../../index-
|
|
6
|
+
const components_DictionaryEditor_NodeWrapper_ArrayWrapper = require("../../../index-DbyCRREy.cjs");
|
|
7
7
|
exports.NestedObjectWrapper = components_DictionaryEditor_NodeWrapper_ArrayWrapper.NestedObjectWrapper;
|
|
8
8
|
//# sourceMappingURL=NestedObjectWrapper.cjs.map
|