@intlayer/design-system 4.0.3 → 4.0.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 +34 -43
- package/dist/components/Auth/AuthModal/index.cjs +1 -1
- package/dist/components/Auth/AuthModal/index.mjs +1 -1
- package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.cjs +2 -1
- package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.cjs.map +1 -1
- package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.mjs +2 -1
- package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.mjs.map +1 -1
- package/dist/components/Auth/useAuth/index.cjs +8 -4
- package/dist/components/Auth/useAuth/index.cjs.map +1 -1
- package/dist/components/Auth/useAuth/index.d.ts +3 -1
- package/dist/components/Auth/useAuth/index.d.ts.map +1 -1
- package/dist/components/Auth/useAuth/index.mjs +8 -4
- package/dist/components/Auth/useAuth/index.mjs.map +1 -1
- package/dist/components/Auth/useAuth/useCSRF.cjs +6 -3
- package/dist/components/Auth/useAuth/useCSRF.cjs.map +1 -1
- package/dist/components/Auth/useAuth/useCSRF.d.ts +2 -1
- package/dist/components/Auth/useAuth/useCSRF.d.ts.map +1 -1
- package/dist/components/Auth/useAuth/useCSRF.mjs +5 -2
- package/dist/components/Auth/useAuth/useCSRF.mjs.map +1 -1
- package/dist/components/Auth/useAuth/useOAuth2.cjs +6 -5
- package/dist/components/Auth/useAuth/useOAuth2.cjs.map +1 -1
- package/dist/components/Auth/useAuth/useOAuth2.d.ts +2 -1
- package/dist/components/Auth/useAuth/useOAuth2.d.ts.map +1 -1
- package/dist/components/Auth/useAuth/useOAuth2.mjs +5 -4
- package/dist/components/Auth/useAuth/useOAuth2.mjs.map +1 -1
- package/dist/components/Auth/useAuth/useSession.cjs +6 -3
- package/dist/components/Auth/useAuth/useSession.cjs.map +1 -1
- package/dist/components/Auth/useAuth/useSession.d.ts +2 -1
- package/dist/components/Auth/useAuth/useSession.d.ts.map +1 -1
- package/dist/components/Auth/useAuth/useSession.mjs +6 -3
- package/dist/components/Auth/useAuth/useSession.mjs.map +1 -1
- package/dist/components/Auth/useUser/index.cjs +1 -1
- package/dist/components/Auth/useUser/index.mjs +1 -1
- package/dist/components/Button/Button.cjs +9 -9
- package/dist/components/Button/Button.cjs.map +1 -1
- package/dist/components/Button/Button.mjs +9 -9
- package/dist/components/Button/Button.mjs.map +1 -1
- package/dist/components/Container/index.d.ts +2 -2
- package/dist/components/DictionaryEditor/DictionaryEditor.cjs +5 -4
- package/dist/components/DictionaryEditor/DictionaryEditor.cjs.map +1 -1
- package/dist/components/DictionaryEditor/DictionaryEditor.d.ts +1 -0
- package/dist/components/DictionaryEditor/DictionaryEditor.d.ts.map +1 -1
- package/dist/components/DictionaryEditor/DictionaryEditor.mjs +5 -4
- package/dist/components/DictionaryEditor/DictionaryEditor.mjs.map +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/ArrayWrapper.cjs +2 -1
- package/dist/components/DictionaryEditor/NodeWrapper/ArrayWrapper.cjs.map +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/ArrayWrapper.d.ts.map +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/ArrayWrapper.mjs +2 -1
- package/dist/components/DictionaryEditor/NodeWrapper/ArrayWrapper.mjs.map +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/NestedObjectWrapper.cjs +2 -1
- package/dist/components/DictionaryEditor/NodeWrapper/NestedObjectWrapper.cjs.map +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/NestedObjectWrapper.d.ts.map +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/NestedObjectWrapper.mjs +2 -1
- package/dist/components/DictionaryEditor/NodeWrapper/NestedObjectWrapper.mjs.map +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/StringWrapper.cjs +3 -3
- package/dist/components/DictionaryEditor/NodeWrapper/StringWrapper.cjs.map +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/StringWrapper.mjs +2 -2
- 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 +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/index.mjs +1 -1
- package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.cjs +29 -12
- package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.cjs.map +1 -1
- package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.d.ts +1 -0
- package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.d.ts.map +1 -1
- package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.mjs +31 -14
- package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.mjs.map +1 -1
- package/dist/components/DictionaryEditor/validDictionaryChangeButtons.content.cjs +32 -0
- package/dist/components/DictionaryEditor/validDictionaryChangeButtons.content.cjs.map +1 -1
- package/dist/components/DictionaryEditor/validDictionaryChangeButtons.content.d.ts +4 -0
- package/dist/components/DictionaryEditor/validDictionaryChangeButtons.content.d.ts.map +1 -1
- package/dist/components/DictionaryEditor/validDictionaryChangeButtons.content.mjs +32 -0
- package/dist/components/DictionaryEditor/validDictionaryChangeButtons.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.cjs +5 -3
- 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 +5 -3
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.cjs +4 -2
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.mjs +4 -2
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.cjs +45 -14
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.d.ts +1 -0
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs +48 -17
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.cjs +32 -0
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.d.ts +4 -0
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.mjs +32 -0
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.cjs +7 -15
- 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 +8 -16
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/EditorView/EditorView.cjs +8 -5
- package/dist/components/DictionaryFieldEditor/EditorView/EditorView.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/EditorView/EditorView.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/EditorView/EditorView.mjs +7 -4
- package/dist/components/DictionaryFieldEditor/EditorView/EditorView.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.cjs +2 -2
- package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.mjs +2 -2
- package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/JSONEditor.cjs +1 -1
- package/dist/components/DictionaryFieldEditor/JSONEditor.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/JSONEditor.mjs +1 -1
- package/dist/components/DictionaryFieldEditor/JSONEditor.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.cjs +6 -5
- 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 +2 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NodeEditor.cjs +1 -9
- 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 +2 -10
- package/dist/components/DictionaryFieldEditor/NodeEditor.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NodeTypeSelector.cjs +2 -1
- 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 +2 -1
- package/dist/components/DictionaryFieldEditor/NodeTypeSelector.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs +51 -22
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.d.ts +1 -0
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs +52 -23
- 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/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcherContext.cjs +2 -2
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcherContext.mjs +2 -2
- package/dist/components/EditableField/EditableFieldLayout.cjs +8 -4
- package/dist/components/EditableField/EditableFieldLayout.cjs.map +1 -1
- package/dist/components/EditableField/EditableFieldLayout.d.ts.map +1 -1
- package/dist/components/EditableField/EditableFieldLayout.mjs +8 -4
- package/dist/components/EditableField/EditableFieldLayout.mjs.map +1 -1
- package/dist/components/IDE/CodeContext.cjs +2 -2
- package/dist/components/IDE/CodeContext.mjs +2 -2
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.cjs +4 -4
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.cjs.map +1 -1
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.mjs +4 -4
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.mjs.map +1 -1
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.cjs +2 -2
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.mjs +2 -2
- package/dist/components/Modal/Modal.cjs +11 -7
- 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 +11 -7
- package/dist/components/Modal/Modal.mjs.map +1 -1
- package/dist/components/Navbar/MobileNavbar.cjs +2 -2
- package/dist/components/Navbar/MobileNavbar.mjs +2 -2
- package/dist/components/Navbar/index.cjs +2 -2
- package/dist/components/Navbar/index.mjs +2 -2
- package/dist/components/RightDrawer/RightDrawer.cjs +32 -15
- package/dist/components/RightDrawer/RightDrawer.cjs.map +1 -1
- package/dist/components/RightDrawer/RightDrawer.d.ts.map +1 -1
- package/dist/components/RightDrawer/RightDrawer.mjs +32 -15
- package/dist/components/RightDrawer/RightDrawer.mjs.map +1 -1
- package/dist/components/SwitchSelector/index.cjs +2 -2
- package/dist/components/SwitchSelector/index.mjs +2 -2
- package/dist/components/TabSelector/TabSelector.cjs +2 -2
- package/dist/components/TabSelector/TabSelector.mjs +2 -2
- package/dist/hooks/index.cjs +1 -0
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.mjs +3 -2
- package/dist/hooks/intlayerAPIHooks.cjs +15 -1
- package/dist/hooks/intlayerAPIHooks.cjs.map +1 -1
- package/dist/hooks/intlayerAPIHooks.d.ts +53 -49
- package/dist/hooks/intlayerAPIHooks.d.ts.map +1 -1
- package/dist/hooks/intlayerAPIHooks.mjs +16 -2
- package/dist/hooks/intlayerAPIHooks.mjs.map +1 -1
- package/dist/hooks/useAsync/useAsync.cjs +14 -0
- 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 +14 -0
- package/dist/hooks/useAsync/useAsync.mjs.map +1 -1
- package/dist/hooks/useGetAllDictionaries.cjs +3 -2
- package/dist/hooks/useGetAllDictionaries.cjs.map +1 -1
- package/dist/hooks/useGetAllDictionaries.d.ts +2 -2
- package/dist/hooks/useGetAllDictionaries.d.ts.map +1 -1
- package/dist/hooks/useGetAllDictionaries.mjs +3 -2
- package/dist/hooks/useGetAllDictionaries.mjs.map +1 -1
- package/dist/hooks/useIntlayerAPI.cjs +10 -7
- package/dist/hooks/useIntlayerAPI.cjs.map +1 -1
- package/dist/hooks/useIntlayerAPI.d.ts +11 -2
- package/dist/hooks/useIntlayerAPI.d.ts.map +1 -1
- package/dist/hooks/useIntlayerAPI.mjs +10 -7
- package/dist/hooks/useIntlayerAPI.mjs.map +1 -1
- package/dist/hooks/usePersistedStore.cjs +25 -18
- package/dist/hooks/usePersistedStore.cjs.map +1 -1
- package/dist/hooks/usePersistedStore.d.ts +2 -2
- package/dist/hooks/usePersistedStore.d.ts.map +1 -1
- package/dist/hooks/usePersistedStore.mjs +26 -19
- package/dist/hooks/usePersistedStore.mjs.map +1 -1
- package/dist/index-B-VAyQ9R.js +673 -0
- package/dist/index-B-VAyQ9R.js.map +1 -0
- package/dist/index-B-adg6xa.js +206 -0
- package/dist/index-B-adg6xa.js.map +1 -0
- package/dist/index-B1nU1-65.cjs +690 -0
- package/dist/index-B1nU1-65.cjs.map +1 -0
- package/dist/index-BIV0x_z2.js +206 -0
- package/dist/index-BIV0x_z2.js.map +1 -0
- package/dist/index-BIyA5LAs.js +691 -0
- package/dist/index-BIyA5LAs.js.map +1 -0
- package/dist/index-BNH9wXVj.cjs +205 -0
- package/dist/index-BNH9wXVj.cjs.map +1 -0
- package/dist/index-BqZwP4Lr.js +691 -0
- package/dist/index-BqZwP4Lr.js.map +1 -0
- package/dist/index-Buecpjbh.cjs +690 -0
- package/dist/index-Buecpjbh.cjs.map +1 -0
- package/dist/index-CDEJjmId.js +694 -0
- package/dist/index-CDEJjmId.js.map +1 -0
- package/dist/index-CTAyk6RY.cjs +693 -0
- package/dist/index-CTAyk6RY.cjs.map +1 -0
- package/dist/index-CVC2sfEj.js +693 -0
- package/dist/index-CVC2sfEj.js.map +1 -0
- package/dist/index-CVz0RdK6.js +691 -0
- package/dist/index-CVz0RdK6.js.map +1 -0
- package/dist/index-CjF2ksU7.cjs +693 -0
- package/dist/index-CjF2ksU7.cjs.map +1 -0
- package/dist/index-CuQs5759.cjs +692 -0
- package/dist/index-CuQs5759.cjs.map +1 -0
- package/dist/index-D69JRZcQ.js +206 -0
- package/dist/index-D69JRZcQ.js.map +1 -0
- package/dist/index-DAsui9u9.cjs +205 -0
- package/dist/index-DAsui9u9.cjs.map +1 -0
- package/dist/index-D_MDocy7.cjs +690 -0
- package/dist/index-D_MDocy7.cjs.map +1 -0
- package/dist/index-Djo2Jnua.cjs +693 -0
- package/dist/index-Djo2Jnua.cjs.map +1 -0
- package/dist/index-LFTthFne.js +694 -0
- package/dist/index-LFTthFne.js.map +1 -0
- package/dist/index-SOIahRpS.cjs +205 -0
- package/dist/index-SOIahRpS.cjs.map +1 -0
- package/dist/index-T-TjVQoD.js +671 -0
- package/dist/index-T-TjVQoD.js.map +1 -0
- package/dist/index-f8_VC6c8.cjs +672 -0
- package/dist/index-f8_VC6c8.cjs.map +1 -0
- package/dist/index-llGIfxqV.cjs +670 -0
- package/dist/index-llGIfxqV.cjs.map +1 -0
- package/dist/index-xZoGTokf.js +694 -0
- package/dist/index-xZoGTokf.js.map +1 -0
- package/dist/tailwind.config.cjs.map +1 -1
- package/dist/tailwind.config.mjs.map +1 -1
- package/dist/tailwind.css +1 -1
- package/dist/useGetAllDictionaries-B1sqs2IB.cjs +34 -0
- package/dist/useGetAllDictionaries-B1sqs2IB.cjs.map +1 -0
- package/dist/useGetAllDictionaries-BbH8vTkY.js +35 -0
- package/dist/useGetAllDictionaries-BbH8vTkY.js.map +1 -0
- package/dist/useGetAllDictionaries-Bgkytpa2.cjs +34 -0
- package/dist/useGetAllDictionaries-Bgkytpa2.cjs.map +1 -0
- package/dist/useGetAllDictionaries-D8ma3h41.cjs +33 -0
- package/dist/useGetAllDictionaries-D8ma3h41.cjs.map +1 -0
- package/dist/useGetAllDictionaries-DHgHEbD5.js +34 -0
- package/dist/useGetAllDictionaries-DHgHEbD5.js.map +1 -0
- package/dist/useGetAllDictionaries-DUzm0rIa.js +35 -0
- package/dist/useGetAllDictionaries-DUzm0rIa.js.map +1 -0
- package/package.json +21 -16
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StringWrapper.cjs","sources":["../../../../src/components/DictionaryEditor/NodeWrapper/StringWrapper.tsx"],"sourcesContent":["import { getDictionaryValueByKeyPath } from '@intlayer/
|
|
1
|
+
{"version":3,"file":"StringWrapper.cjs","sources":["../../../../src/components/DictionaryEditor/NodeWrapper/StringWrapper.tsx"],"sourcesContent":["import { getDictionaryValueByKeyPath } from '@intlayer/editor';\nimport type { FC } from 'react';\nimport { cn } from '../../../utils/cn';\nimport { EditableFieldTextArea } from '../../EditableField';\nimport type { NodeWrapperProps } from './index';\n\ntype StringWrapperProps = Omit<NodeWrapperProps, 'section'> & {\n section: string;\n};\n\nexport const StringWrapper: FC<StringWrapperProps> = ({\n keyPath,\n section,\n editedContent,\n onContentChange,\n onFocusKeyPath,\n}) => {\n const editedContentValue = getDictionaryValueByKeyPath(\n editedContent,\n keyPath\n );\n\n if (editedContentValue && typeof editedContentValue !== 'string') {\n return <>Error loading section</>;\n }\n\n const level = keyPath.length;\n\n const content = editedContentValue ?? section;\n\n return (\n <button\n className={cn(\n 'w-full rounded-md p-2 text-left transition',\n 'hover:bg-card/30 dark:hover:bg-card-dark/30 [&:has(.section:hover)]:bg-transparent',\n level === 2 && 'hover:bg-card/30 dark:hover:bg-card-dark/30',\n level >= 3 && ''\n )}\n onClick={(e) => {\n e.stopPropagation();\n onFocusKeyPath(keyPath);\n }}\n >\n <EditableFieldTextArea\n defaultValue={content}\n onSave={(newValue) => onContentChange({ keyPath, newValue })}\n onCancel={() => null}\n />\n </button>\n );\n};\n"],"names":["getDictionaryValueByKeyPath","jsx","cn","EditableFieldTextArea"],"mappings":";;;;;;;AAUO,MAAM,gBAAwC,CAAC;AAAA,EACpD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,qBAAqBA,OAAA;AAAA,IACzB;AAAA,IACA;AAAA,EACF;AAEI,MAAA,sBAAsB,OAAO,uBAAuB,UAAU;AAChE,qGAAS,UAAqB,wBAAA,CAAA;AAAA,EAAA;AAGhC,QAAM,QAAQ,QAAQ;AAEtB,QAAM,UAAU,sBAAsB;AAGpC,SAAAC,2BAAA,kBAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC,SAAA;AAAA,QACT;AAAA,QACA;AAAA,QACA,UAAU,KAAK;AAAA,QACf,SAAS,KAAK;AAAA,MAChB;AAAA,MACA,SAAS,CAAC,MAAM;AACd,UAAE,gBAAgB;AAClB,uBAAe,OAAO;AAAA,MACxB;AAAA,MAEA,UAAAD,2BAAA,kBAAA;AAAA,QAACE,+CAAA;AAAA,QAAA;AAAA,UACC,cAAc;AAAA,UACd,QAAQ,CAAC,aAAa,gBAAgB,EAAE,SAAS,UAAU;AAAA,UAC3D,UAAU,MAAM;AAAA,QAAA;AAAA,MAAA;AAAA,IAClB;AAAA,EACF;AAEJ;;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { j as jsxRuntimeExports } from "../../../jsx-runtime-DQkoUcjV.js";
|
|
2
|
-
import { getDictionaryValueByKeyPath } from "@intlayer/
|
|
2
|
+
import { getDictionaryValueByKeyPath } from "@intlayer/editor";
|
|
3
|
+
import { cn } from "../../../utils/cn.mjs";
|
|
3
4
|
import "../../EditableField/EditableFieldInput.mjs";
|
|
4
5
|
import { EditableFieldTextArea } from "../../EditableField/EditableFieldTextArea.mjs";
|
|
5
|
-
import { cn } from "../../../utils/cn.mjs";
|
|
6
6
|
const StringWrapper = ({
|
|
7
7
|
keyPath,
|
|
8
8
|
section,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StringWrapper.mjs","sources":["../../../../src/components/DictionaryEditor/NodeWrapper/StringWrapper.tsx"],"sourcesContent":["import { getDictionaryValueByKeyPath } from '@intlayer/
|
|
1
|
+
{"version":3,"file":"StringWrapper.mjs","sources":["../../../../src/components/DictionaryEditor/NodeWrapper/StringWrapper.tsx"],"sourcesContent":["import { getDictionaryValueByKeyPath } from '@intlayer/editor';\nimport type { FC } from 'react';\nimport { cn } from '../../../utils/cn';\nimport { EditableFieldTextArea } from '../../EditableField';\nimport type { NodeWrapperProps } from './index';\n\ntype StringWrapperProps = Omit<NodeWrapperProps, 'section'> & {\n section: string;\n};\n\nexport const StringWrapper: FC<StringWrapperProps> = ({\n keyPath,\n section,\n editedContent,\n onContentChange,\n onFocusKeyPath,\n}) => {\n const editedContentValue = getDictionaryValueByKeyPath(\n editedContent,\n keyPath\n );\n\n if (editedContentValue && typeof editedContentValue !== 'string') {\n return <>Error loading section</>;\n }\n\n const level = keyPath.length;\n\n const content = editedContentValue ?? section;\n\n return (\n <button\n className={cn(\n 'w-full rounded-md p-2 text-left transition',\n 'hover:bg-card/30 dark:hover:bg-card-dark/30 [&:has(.section:hover)]:bg-transparent',\n level === 2 && 'hover:bg-card/30 dark:hover:bg-card-dark/30',\n level >= 3 && ''\n )}\n onClick={(e) => {\n e.stopPropagation();\n onFocusKeyPath(keyPath);\n }}\n >\n <EditableFieldTextArea\n defaultValue={content}\n onSave={(newValue) => onContentChange({ keyPath, newValue })}\n onCancel={() => null}\n />\n </button>\n );\n};\n"],"names":["jsx"],"mappings":";;;;;AAUO,MAAM,gBAAwC,CAAC;AAAA,EACpD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,qBAAqB;AAAA,IACzB;AAAA,IACA;AAAA,EACF;AAEI,MAAA,sBAAsB,OAAO,uBAAuB,UAAU;AAChE,+EAAS,UAAqB,wBAAA,CAAA;AAAA,EAAA;AAGhC,QAAM,QAAQ,QAAQ;AAEtB,QAAM,UAAU,sBAAsB;AAGpC,SAAAA,kCAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA;AAAA,QACA,UAAU,KAAK;AAAA,QACf,SAAS,KAAK;AAAA,MAChB;AAAA,MACA,SAAS,CAAC,MAAM;AACd,UAAE,gBAAgB;AAClB,uBAAe,OAAO;AAAA,MACxB;AAAA,MAEA,UAAAA,kCAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,cAAc;AAAA,UACd,QAAQ,CAAC,aAAa,gBAAgB,EAAE,SAAS,UAAU;AAAA,UAC3D,UAAU,MAAM;AAAA,QAAA;AAAA,MAAA;AAAA,IAClB;AAAA,EACF;AAEJ;"}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
require("../../../jsx-runtime-CgFM7lM3.cjs");
|
|
4
4
|
require("@intlayer/core");
|
|
5
|
-
const components_DictionaryEditor_NodeWrapper_ArrayWrapper = require("../../../index-
|
|
5
|
+
const components_DictionaryEditor_NodeWrapper_ArrayWrapper = require("../../../index-DAsui9u9.cjs");
|
|
6
6
|
exports.TranslationWrapper = components_DictionaryEditor_NodeWrapper_ArrayWrapper.TranslationWrapper;
|
|
7
7
|
//# sourceMappingURL=TranslationWrapper.cjs.map
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
3
3
|
require("../../../jsx-runtime-CgFM7lM3.cjs");
|
|
4
4
|
require("@intlayer/core");
|
|
5
5
|
require("react");
|
|
6
|
-
const components_DictionaryEditor_NodeWrapper_ArrayWrapper = require("../../../index-
|
|
6
|
+
const components_DictionaryEditor_NodeWrapper_ArrayWrapper = require("../../../index-DAsui9u9.cjs");
|
|
7
7
|
require("./StringWrapper.cjs");
|
|
8
8
|
exports.NodeWrapper = components_DictionaryEditor_NodeWrapper_ArrayWrapper.NodeWrapper;
|
|
9
9
|
exports.traceKeys = components_DictionaryEditor_NodeWrapper_ArrayWrapper.traceKeys;
|
|
@@ -9,25 +9,23 @@ const reactIntlayer = require("react-intlayer");
|
|
|
9
9
|
require("../../hooks/useScrollBlockage/useScrollBlockageStore.cjs");
|
|
10
10
|
require("../../hooks/useAsync/useAsyncStateStore.cjs");
|
|
11
11
|
const hooks_intlayerAPIHooks = require("../../hooks/intlayerAPIHooks.cjs");
|
|
12
|
-
require("@intlayer/dictionaries-entry");
|
|
13
12
|
require("deepmerge");
|
|
14
13
|
const components_Form_FormBase = require("../Form/FormBase.cjs");
|
|
15
14
|
require("../Form/FormField.cjs");
|
|
16
15
|
const components_Form_layout_FormItemLayout = require("../../Form-CSMiPnjC.cjs");
|
|
17
16
|
const components_DictionaryEditor_validDictionaryChangeButtons_content = require("./validDictionaryChangeButtons.content.cjs");
|
|
18
17
|
const components_DictionaryEditor_validDictionaryChangeButtonsSchema = require("./validDictionaryChangeButtonsSchema.cjs");
|
|
19
|
-
const ValidDictionaryChangeButtons = ({ dictionary }) => {
|
|
18
|
+
const ValidDictionaryChangeButtons = ({ dictionary, mode }) => {
|
|
20
19
|
const ValidDictionaryChangeButtonsSchemaSchema = components_DictionaryEditor_validDictionaryChangeButtonsSchema.getValidDictionaryChangeButtonsSchemaSchema();
|
|
21
|
-
const { resetButton, saveButton, publishButton } = reactIntlayer.useDictionary(
|
|
22
|
-
|
|
23
|
-
);
|
|
20
|
+
const { resetButton, saveButton, publishButton, downloadButton } = reactIntlayer.useDictionary(components_DictionaryEditor_validDictionaryChangeButtons_content.validDictionaryChangeButtonsContent);
|
|
21
|
+
const { writeDictionary } = hooks_intlayerAPIHooks.useWriteDictionary();
|
|
24
22
|
const { pushDictionaries } = hooks_intlayerAPIHooks.usePushDictionaries();
|
|
25
23
|
const { editedContent, restoreEditedContent } = editorReact.useEditedContent();
|
|
26
24
|
const { form, isSubmitting } = components_Form_FormBase.useForm(
|
|
27
25
|
ValidDictionaryChangeButtonsSchemaSchema
|
|
28
26
|
);
|
|
29
27
|
const editedDictionary = require$$0.useMemo(
|
|
30
|
-
() => editedContent[dictionary.key],
|
|
28
|
+
() => editedContent?.[dictionary.key],
|
|
31
29
|
[editedContent, dictionary.key]
|
|
32
30
|
);
|
|
33
31
|
const isEdited = require$$0.useMemo(
|
|
@@ -39,12 +37,19 @@ const ValidDictionaryChangeButtons = ({ dictionary }) => {
|
|
|
39
37
|
[dictionary]
|
|
40
38
|
);
|
|
41
39
|
const onSubmitSuccess = async () => {
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
if (mode === "remote") {
|
|
41
|
+
await pushDictionaries([
|
|
42
|
+
{
|
|
43
|
+
...dictionary,
|
|
44
|
+
...editedContent?.[dictionary.key]
|
|
45
|
+
}
|
|
46
|
+
]);
|
|
47
|
+
} else {
|
|
48
|
+
await writeDictionary({
|
|
44
49
|
...dictionary,
|
|
45
|
-
...editedContent[dictionary.key]
|
|
46
|
-
}
|
|
47
|
-
|
|
50
|
+
...editedContent?.[dictionary.key]
|
|
51
|
+
});
|
|
52
|
+
}
|
|
48
53
|
};
|
|
49
54
|
return /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx("div", { className: "mb-4", children: /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs(
|
|
50
55
|
components_Form_layout_FormItemLayout.Form,
|
|
@@ -70,7 +75,7 @@ const ValidDictionaryChangeButtons = ({ dictionary }) => {
|
|
|
70
75
|
children: resetButton.text
|
|
71
76
|
}
|
|
72
77
|
),
|
|
73
|
-
isLocalDictionary ? /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
|
|
78
|
+
mode === "remote" ? isLocalDictionary ? /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
|
|
74
79
|
components_Form_layout_FormItemLayout.Form.Button,
|
|
75
80
|
{
|
|
76
81
|
type: "submit",
|
|
@@ -94,6 +99,18 @@ const ValidDictionaryChangeButtons = ({ dictionary }) => {
|
|
|
94
99
|
isLoading: isSubmitting,
|
|
95
100
|
children: saveButton.text
|
|
96
101
|
}
|
|
102
|
+
) : /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
|
|
103
|
+
components_Form_layout_FormItemLayout.Form.Button,
|
|
104
|
+
{
|
|
105
|
+
type: "submit",
|
|
106
|
+
label: downloadButton.label,
|
|
107
|
+
disabled: !isEdited || isSubmitting,
|
|
108
|
+
Icon: lucideReact.Download,
|
|
109
|
+
color: "text",
|
|
110
|
+
isFullWidth: true,
|
|
111
|
+
isLoading: isSubmitting,
|
|
112
|
+
children: downloadButton.text
|
|
113
|
+
}
|
|
97
114
|
)
|
|
98
115
|
]
|
|
99
116
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ValidDictionaryChangeButtons.cjs","sources":["../../../src/components/DictionaryEditor/ValidDictionaryChangeButtons.tsx"],"sourcesContent":["'use client';\n\nimport { Dictionary as DistantDictionary } from '@intlayer/backend';\nimport type { Dictionary } from '@intlayer/core';\nimport { useEditedContent } from '@intlayer/editor-react';\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 { usePushDictionaries } from '../../hooks';\nimport { Form, useForm } from '../Form';\nimport { validDictionaryChangeButtonsContent } from './validDictionaryChangeButtons.content';\nimport { getValidDictionaryChangeButtonsSchemaSchema } from './validDictionaryChangeButtonsSchema';\n\ntype ValidDictionaryChangeButtonsProps = {\n dictionary: Dictionary;\n};\n\nexport const ValidDictionaryChangeButtons: FC<\n ValidDictionaryChangeButtonsProps\n> = ({ dictionary }) => {\n const ValidDictionaryChangeButtonsSchemaSchema =\n getValidDictionaryChangeButtonsSchemaSchema();\n\n const { resetButton, saveButton, publishButton }
|
|
1
|
+
{"version":3,"file":"ValidDictionaryChangeButtons.cjs","sources":["../../../src/components/DictionaryEditor/ValidDictionaryChangeButtons.tsx"],"sourcesContent":["'use client';\n\nimport { Dictionary as DistantDictionary } from '@intlayer/backend';\nimport type { Dictionary } from '@intlayer/core';\nimport { useEditedContent } from '@intlayer/editor-react';\nimport { ArrowUpFromLine, Download, 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 { usePushDictionaries, useWriteDictionary } from '../../hooks';\nimport { Form, useForm } from '../Form';\nimport { validDictionaryChangeButtonsContent } from './validDictionaryChangeButtons.content';\nimport { getValidDictionaryChangeButtonsSchemaSchema } from './validDictionaryChangeButtonsSchema';\n\ntype ValidDictionaryChangeButtonsProps = {\n dictionary: Dictionary;\n mode: 'local' | 'remote';\n};\n\nexport const ValidDictionaryChangeButtons: FC<\n ValidDictionaryChangeButtonsProps\n> = ({ dictionary, mode }) => {\n const ValidDictionaryChangeButtonsSchemaSchema =\n getValidDictionaryChangeButtonsSchemaSchema();\n\n const { resetButton, saveButton, publishButton, downloadButton } =\n useDictionary(validDictionaryChangeButtonsContent);\n\n const { writeDictionary } = useWriteDictionary();\n const { pushDictionaries } = usePushDictionaries();\n\n const { editedContent, restoreEditedContent } = useEditedContent();\n const { form, isSubmitting } = useForm(\n ValidDictionaryChangeButtonsSchemaSchema\n );\n\n const editedDictionary = useMemo(\n () => editedContent?.[dictionary.key],\n [editedContent, dictionary.key]\n );\n\n const isEdited = useMemo(\n () =>\n editedDictionary &&\n JSON.stringify(editedDictionary?.content) !==\n JSON.stringify(dictionary?.content),\n [editedDictionary, dictionary]\n );\n\n const isLocalDictionary = useMemo(\n () => typeof (dictionary as DistantDictionary)?._id === 'undefined',\n [dictionary]\n );\n\n const onSubmitSuccess = async () => {\n if (mode === 'remote') {\n await pushDictionaries([\n {\n ...dictionary,\n ...editedContent?.[dictionary.key],\n },\n ]);\n } else {\n await writeDictionary({\n ...dictionary,\n ...editedContent?.[dictionary.key],\n });\n }\n };\n\n return (\n <div className=\"mb-4\">\n <Form\n className=\"flex w-full flex-row flex-wrap justify-end gap-3\"\n {...form}\n schema={ValidDictionaryChangeButtonsSchemaSchema}\n onSubmitSuccess={onSubmitSuccess}\n >\n {isEdited && (\n <Form.Button\n type=\"button\"\n label={resetButton.label}\n disabled={!isEdited || isSubmitting}\n className=\"ml-auto\"\n Icon={RotateCcw}\n variant=\"outline\"\n color=\"text\"\n isFullWidth\n isLoading={isSubmitting}\n onClick={() => restoreEditedContent(dictionary.key)}\n >\n {resetButton.text}\n </Form.Button>\n )}\n {mode === 'remote' ? (\n isLocalDictionary ? (\n <Form.Button\n type=\"submit\"\n label={publishButton.label}\n disabled={!isEdited || isSubmitting}\n Icon={ArrowUpFromLine}\n color=\"text\"\n isFullWidth\n isLoading={isSubmitting}\n >\n {publishButton.text}\n </Form.Button>\n ) : (\n isEdited && (\n <Form.Button\n type=\"submit\"\n label={saveButton.label}\n disabled={!isEdited || isSubmitting}\n Icon={Save}\n color=\"text\"\n isFullWidth\n isLoading={isSubmitting}\n >\n {saveButton.text}\n </Form.Button>\n )\n )\n ) : (\n <Form.Button\n type=\"submit\"\n label={downloadButton.label}\n disabled={!isEdited || isSubmitting}\n Icon={Download}\n color=\"text\"\n isFullWidth\n isLoading={isSubmitting}\n >\n {downloadButton.text}\n </Form.Button>\n )}\n </Form>\n </div>\n );\n};\n"],"names":["getValidDictionaryChangeButtonsSchemaSchema","useDictionary","validDictionaryChangeButtonsContent","useWriteDictionary","usePushDictionaries","useEditedContent","useForm","useMemo","jsx","jsxs","Form","RotateCcw","ArrowUpFromLine","Save","Download"],"mappings":";;;;;;;;;;;;;;;;;AAmBO,MAAM,+BAET,CAAC,EAAE,YAAY,WAAW;AAC5B,QAAM,2CACJA,+DAAAA,4CAA4C;AAE9C,QAAM,EAAE,aAAa,YAAY,eAAe,eAAe,IAC7DC,4BAAcC,oGAAmC;AAE7C,QAAA,EAAE,gBAAgB,IAAIC,0CAAmB;AACzC,QAAA,EAAE,iBAAiB,IAAIC,2CAAoB;AAEjD,QAAM,EAAE,eAAe,qBAAqB,IAAIC,6BAAiB;AAC3D,QAAA,EAAE,MAAM,aAAA,IAAiBC,yBAAA;AAAA,IAC7B;AAAA,EACF;AAEA,QAAM,mBAAmBC,WAAA;AAAA,IACvB,MAAM,gBAAgB,WAAW,GAAG;AAAA,IACpC,CAAC,eAAe,WAAW,GAAG;AAAA,EAChC;AAEA,QAAM,WAAWA,WAAA;AAAA,IACf,MACE,oBACA,KAAK,UAAU,kBAAkB,OAAO,MACtC,KAAK,UAAU,YAAY,OAAO;AAAA,IACtC,CAAC,kBAAkB,UAAU;AAAA,EAC/B;AAEA,QAAM,oBAAoBA,WAAA;AAAA,IACxB,MAAM,OAAQ,YAAkC,QAAQ;AAAA,IACxD,CAAC,UAAU;AAAA,EACb;AAEA,QAAM,kBAAkB,YAAY;AAClC,QAAI,SAAS,UAAU;AACrB,YAAM,iBAAiB;AAAA,QACrB;AAAA,UACE,GAAG;AAAA,UACH,GAAG,gBAAgB,WAAW,GAAG;AAAA,QAAA;AAAA,MACnC,CACD;AAAA,IAAA,OACI;AACL,YAAM,gBAAgB;AAAA,QACpB,GAAG;AAAA,QACH,GAAG,gBAAgB,WAAW,GAAG;AAAA,MAAA,CAClC;AAAA,IAAA;AAAA,EAEL;AAGE,SAAAC,2BAAAA,kBAAAA,IAAC,OAAI,EAAA,WAAU,QACb,UAAAC,2BAAA,kBAAA;AAAA,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A;AAAA,MAClB;AAAA,IAAA;AAAA,EAAA,GAGN;AAEJ;;"}
|
|
@@ -2,6 +2,7 @@ import { Dictionary } from '@intlayer/core';
|
|
|
2
2
|
import { FC } from 'react';
|
|
3
3
|
type ValidDictionaryChangeButtonsProps = {
|
|
4
4
|
dictionary: Dictionary;
|
|
5
|
+
mode: 'local' | 'remote';
|
|
5
6
|
};
|
|
6
7
|
export declare const ValidDictionaryChangeButtons: FC<ValidDictionaryChangeButtonsProps>;
|
|
7
8
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ValidDictionaryChangeButtons.d.ts","sourceRoot":"","sources":["../../../src/components/DictionaryEditor/ValidDictionaryChangeButtons.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAGjD,OAAO,EAAW,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAQzC,KAAK,iCAAiC,GAAG;IACvC,UAAU,EAAE,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"ValidDictionaryChangeButtons.d.ts","sourceRoot":"","sources":["../../../src/components/DictionaryEditor/ValidDictionaryChangeButtons.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAGjD,OAAO,EAAW,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAQzC,KAAK,iCAAiC,GAAG;IACvC,UAAU,EAAE,UAAU,CAAC;IACvB,IAAI,EAAE,OAAO,GAAG,QAAQ,CAAC;CAC1B,CAAC;AAEF,eAAO,MAAM,4BAA4B,EAAE,EAAE,CAC3C,iCAAiC,CAsHlC,CAAC"}
|
|
@@ -1,31 +1,29 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { j as jsxRuntimeExports } from "../../jsx-runtime-DQkoUcjV.js";
|
|
3
3
|
import { useEditedContent } from "@intlayer/editor-react";
|
|
4
|
-
import { RotateCcw, ArrowUpFromLine, Save } from "lucide-react";
|
|
4
|
+
import { RotateCcw, ArrowUpFromLine, Save, Download } from "lucide-react";
|
|
5
5
|
import { useMemo } from "react";
|
|
6
6
|
import { useDictionary } from "react-intlayer";
|
|
7
7
|
import "../../hooks/useScrollBlockage/useScrollBlockageStore.mjs";
|
|
8
8
|
import "../../hooks/useAsync/useAsyncStateStore.mjs";
|
|
9
|
-
import { usePushDictionaries } from "../../hooks/intlayerAPIHooks.mjs";
|
|
10
|
-
import "@intlayer/dictionaries-entry";
|
|
9
|
+
import { useWriteDictionary, usePushDictionaries } from "../../hooks/intlayerAPIHooks.mjs";
|
|
11
10
|
import "deepmerge";
|
|
12
11
|
import { useForm } from "../Form/FormBase.mjs";
|
|
13
12
|
import "../Form/FormField.mjs";
|
|
14
13
|
import { F as Form } from "../../Form-DlqjTz3u.js";
|
|
15
14
|
import { validDictionaryChangeButtonsContent } from "./validDictionaryChangeButtons.content.mjs";
|
|
16
15
|
import { getValidDictionaryChangeButtonsSchemaSchema } from "./validDictionaryChangeButtonsSchema.mjs";
|
|
17
|
-
const ValidDictionaryChangeButtons = ({ dictionary }) => {
|
|
16
|
+
const ValidDictionaryChangeButtons = ({ dictionary, mode }) => {
|
|
18
17
|
const ValidDictionaryChangeButtonsSchemaSchema = getValidDictionaryChangeButtonsSchemaSchema();
|
|
19
|
-
const { resetButton, saveButton, publishButton } = useDictionary(
|
|
20
|
-
|
|
21
|
-
);
|
|
18
|
+
const { resetButton, saveButton, publishButton, downloadButton } = useDictionary(validDictionaryChangeButtonsContent);
|
|
19
|
+
const { writeDictionary } = useWriteDictionary();
|
|
22
20
|
const { pushDictionaries } = usePushDictionaries();
|
|
23
21
|
const { editedContent, restoreEditedContent } = useEditedContent();
|
|
24
22
|
const { form, isSubmitting } = useForm(
|
|
25
23
|
ValidDictionaryChangeButtonsSchemaSchema
|
|
26
24
|
);
|
|
27
25
|
const editedDictionary = useMemo(
|
|
28
|
-
() => editedContent[dictionary.key],
|
|
26
|
+
() => editedContent?.[dictionary.key],
|
|
29
27
|
[editedContent, dictionary.key]
|
|
30
28
|
);
|
|
31
29
|
const isEdited = useMemo(
|
|
@@ -37,12 +35,19 @@ const ValidDictionaryChangeButtons = ({ dictionary }) => {
|
|
|
37
35
|
[dictionary]
|
|
38
36
|
);
|
|
39
37
|
const onSubmitSuccess = async () => {
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
if (mode === "remote") {
|
|
39
|
+
await pushDictionaries([
|
|
40
|
+
{
|
|
41
|
+
...dictionary,
|
|
42
|
+
...editedContent?.[dictionary.key]
|
|
43
|
+
}
|
|
44
|
+
]);
|
|
45
|
+
} else {
|
|
46
|
+
await writeDictionary({
|
|
42
47
|
...dictionary,
|
|
43
|
-
...editedContent[dictionary.key]
|
|
44
|
-
}
|
|
45
|
-
|
|
48
|
+
...editedContent?.[dictionary.key]
|
|
49
|
+
});
|
|
50
|
+
}
|
|
46
51
|
};
|
|
47
52
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mb-4", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
48
53
|
Form,
|
|
@@ -68,7 +73,7 @@ const ValidDictionaryChangeButtons = ({ dictionary }) => {
|
|
|
68
73
|
children: resetButton.text
|
|
69
74
|
}
|
|
70
75
|
),
|
|
71
|
-
isLocalDictionary ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
76
|
+
mode === "remote" ? isLocalDictionary ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
72
77
|
Form.Button,
|
|
73
78
|
{
|
|
74
79
|
type: "submit",
|
|
@@ -92,6 +97,18 @@ const ValidDictionaryChangeButtons = ({ dictionary }) => {
|
|
|
92
97
|
isLoading: isSubmitting,
|
|
93
98
|
children: saveButton.text
|
|
94
99
|
}
|
|
100
|
+
) : /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
101
|
+
Form.Button,
|
|
102
|
+
{
|
|
103
|
+
type: "submit",
|
|
104
|
+
label: downloadButton.label,
|
|
105
|
+
disabled: !isEdited || isSubmitting,
|
|
106
|
+
Icon: Download,
|
|
107
|
+
color: "text",
|
|
108
|
+
isFullWidth: true,
|
|
109
|
+
isLoading: isSubmitting,
|
|
110
|
+
children: downloadButton.text
|
|
111
|
+
}
|
|
95
112
|
)
|
|
96
113
|
]
|
|
97
114
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ValidDictionaryChangeButtons.mjs","sources":["../../../src/components/DictionaryEditor/ValidDictionaryChangeButtons.tsx"],"sourcesContent":["'use client';\n\nimport { Dictionary as DistantDictionary } from '@intlayer/backend';\nimport type { Dictionary } from '@intlayer/core';\nimport { useEditedContent } from '@intlayer/editor-react';\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 { usePushDictionaries } from '../../hooks';\nimport { Form, useForm } from '../Form';\nimport { validDictionaryChangeButtonsContent } from './validDictionaryChangeButtons.content';\nimport { getValidDictionaryChangeButtonsSchemaSchema } from './validDictionaryChangeButtonsSchema';\n\ntype ValidDictionaryChangeButtonsProps = {\n dictionary: Dictionary;\n};\n\nexport const ValidDictionaryChangeButtons: FC<\n ValidDictionaryChangeButtonsProps\n> = ({ dictionary }) => {\n const ValidDictionaryChangeButtonsSchemaSchema =\n getValidDictionaryChangeButtonsSchemaSchema();\n\n const { resetButton, saveButton, publishButton }
|
|
1
|
+
{"version":3,"file":"ValidDictionaryChangeButtons.mjs","sources":["../../../src/components/DictionaryEditor/ValidDictionaryChangeButtons.tsx"],"sourcesContent":["'use client';\n\nimport { Dictionary as DistantDictionary } from '@intlayer/backend';\nimport type { Dictionary } from '@intlayer/core';\nimport { useEditedContent } from '@intlayer/editor-react';\nimport { ArrowUpFromLine, Download, 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 { usePushDictionaries, useWriteDictionary } from '../../hooks';\nimport { Form, useForm } from '../Form';\nimport { validDictionaryChangeButtonsContent } from './validDictionaryChangeButtons.content';\nimport { getValidDictionaryChangeButtonsSchemaSchema } from './validDictionaryChangeButtonsSchema';\n\ntype ValidDictionaryChangeButtonsProps = {\n dictionary: Dictionary;\n mode: 'local' | 'remote';\n};\n\nexport const ValidDictionaryChangeButtons: FC<\n ValidDictionaryChangeButtonsProps\n> = ({ dictionary, mode }) => {\n const ValidDictionaryChangeButtonsSchemaSchema =\n getValidDictionaryChangeButtonsSchemaSchema();\n\n const { resetButton, saveButton, publishButton, downloadButton } =\n useDictionary(validDictionaryChangeButtonsContent);\n\n const { writeDictionary } = useWriteDictionary();\n const { pushDictionaries } = usePushDictionaries();\n\n const { editedContent, restoreEditedContent } = useEditedContent();\n const { form, isSubmitting } = useForm(\n ValidDictionaryChangeButtonsSchemaSchema\n );\n\n const editedDictionary = useMemo(\n () => editedContent?.[dictionary.key],\n [editedContent, dictionary.key]\n );\n\n const isEdited = useMemo(\n () =>\n editedDictionary &&\n JSON.stringify(editedDictionary?.content) !==\n JSON.stringify(dictionary?.content),\n [editedDictionary, dictionary]\n );\n\n const isLocalDictionary = useMemo(\n () => typeof (dictionary as DistantDictionary)?._id === 'undefined',\n [dictionary]\n );\n\n const onSubmitSuccess = async () => {\n if (mode === 'remote') {\n await pushDictionaries([\n {\n ...dictionary,\n ...editedContent?.[dictionary.key],\n },\n ]);\n } else {\n await writeDictionary({\n ...dictionary,\n ...editedContent?.[dictionary.key],\n });\n }\n };\n\n return (\n <div className=\"mb-4\">\n <Form\n className=\"flex w-full flex-row flex-wrap justify-end gap-3\"\n {...form}\n schema={ValidDictionaryChangeButtonsSchemaSchema}\n onSubmitSuccess={onSubmitSuccess}\n >\n {isEdited && (\n <Form.Button\n type=\"button\"\n label={resetButton.label}\n disabled={!isEdited || isSubmitting}\n className=\"ml-auto\"\n Icon={RotateCcw}\n variant=\"outline\"\n color=\"text\"\n isFullWidth\n isLoading={isSubmitting}\n onClick={() => restoreEditedContent(dictionary.key)}\n >\n {resetButton.text}\n </Form.Button>\n )}\n {mode === 'remote' ? (\n isLocalDictionary ? (\n <Form.Button\n type=\"submit\"\n label={publishButton.label}\n disabled={!isEdited || isSubmitting}\n Icon={ArrowUpFromLine}\n color=\"text\"\n isFullWidth\n isLoading={isSubmitting}\n >\n {publishButton.text}\n </Form.Button>\n ) : (\n isEdited && (\n <Form.Button\n type=\"submit\"\n label={saveButton.label}\n disabled={!isEdited || isSubmitting}\n Icon={Save}\n color=\"text\"\n isFullWidth\n isLoading={isSubmitting}\n >\n {saveButton.text}\n </Form.Button>\n )\n )\n ) : (\n <Form.Button\n type=\"submit\"\n label={downloadButton.label}\n disabled={!isEdited || isSubmitting}\n Icon={Download}\n color=\"text\"\n isFullWidth\n isLoading={isSubmitting}\n >\n {downloadButton.text}\n </Form.Button>\n )}\n </Form>\n </div>\n );\n};\n"],"names":["jsx","jsxs"],"mappings":";;;;;;;;;;;;;;;AAmBO,MAAM,+BAET,CAAC,EAAE,YAAY,WAAW;AAC5B,QAAM,2CACJ,4CAA4C;AAE9C,QAAM,EAAE,aAAa,YAAY,eAAe,eAAe,IAC7D,cAAc,mCAAmC;AAE7C,QAAA,EAAE,gBAAgB,IAAI,mBAAmB;AACzC,QAAA,EAAE,iBAAiB,IAAI,oBAAoB;AAEjD,QAAM,EAAE,eAAe,qBAAqB,IAAI,iBAAiB;AAC3D,QAAA,EAAE,MAAM,aAAA,IAAiB;AAAA,IAC7B;AAAA,EACF;AAEA,QAAM,mBAAmB;AAAA,IACvB,MAAM,gBAAgB,WAAW,GAAG;AAAA,IACpC,CAAC,eAAe,WAAW,GAAG;AAAA,EAChC;AAEA,QAAM,WAAW;AAAA,IACf,MACE,oBACA,KAAK,UAAU,kBAAkB,OAAO,MACtC,KAAK,UAAU,YAAY,OAAO;AAAA,IACtC,CAAC,kBAAkB,UAAU;AAAA,EAC/B;AAEA,QAAM,oBAAoB;AAAA,IACxB,MAA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M;AAAA,YACN,OAAM;AAAA,YACN,aAAW;AAAA,YACX,WAAW;AAAA,YAEV,UAAW,WAAA;AAAA,UAAA;AAAA,QAAA,IAKlBA,kCAAA;AAAA,UAAC,KAAK;AAAA,UAAL;AAAA,YACC,MAAK;AAAA,YACL,OAAO,eAAe;AAAA,YACtB,UAAU,CAAC,YAAY;AAAA,YACvB,MAAM;AAAA,YACN,OAAM;AAAA,YACN,aAAW;AAAA,YACX,WAAW;AAAA,YAEV,UAAe,eAAA;AAAA,UAAA;AAAA,QAAA;AAAA,MAClB;AAAA,IAAA;AAAA,EAAA,GAGN;AAEJ;"}
|
|
@@ -93,6 +93,38 @@ const validDictionaryChangeButtonsContent = {
|
|
|
93
93
|
ar: "انقر لنشر القاموس",
|
|
94
94
|
ru: "Нажмите, чтобы опубликовать словарь"
|
|
95
95
|
})
|
|
96
|
+
},
|
|
97
|
+
downloadButton: {
|
|
98
|
+
text: intlayer.t({
|
|
99
|
+
en: "Download",
|
|
100
|
+
"en-GB": "Download",
|
|
101
|
+
fr: "Télécharger",
|
|
102
|
+
es: "Descargar",
|
|
103
|
+
de: "Herunterladen",
|
|
104
|
+
ja: "ダウンロード",
|
|
105
|
+
ko: "다운로드",
|
|
106
|
+
zh: "下载",
|
|
107
|
+
it: "Scarica",
|
|
108
|
+
pt: "Baixar",
|
|
109
|
+
hi: "डाउनलोड",
|
|
110
|
+
ar: "تنزيل",
|
|
111
|
+
ru: "Скачать"
|
|
112
|
+
}),
|
|
113
|
+
label: intlayer.t({
|
|
114
|
+
en: "Click to download",
|
|
115
|
+
"en-GB": "Click to download",
|
|
116
|
+
fr: "Cliquez pour télécharger",
|
|
117
|
+
es: "Haga clic para descargar",
|
|
118
|
+
de: "Klicken Sie, um herunterzuladen",
|
|
119
|
+
ja: "ダウンロードするにはクリックしてください",
|
|
120
|
+
ko: "다운로드를 클릭하세요",
|
|
121
|
+
zh: "单击下载",
|
|
122
|
+
it: "Fai clic per scaricare",
|
|
123
|
+
pt: "Clique para baixar",
|
|
124
|
+
hi: "डाउनलोड करने के लिए क्लिक करें",
|
|
125
|
+
ar: "انقر لتنزيل",
|
|
126
|
+
ru: "Нажмите, чтобы скачать"
|
|
127
|
+
})
|
|
96
128
|
}
|
|
97
129
|
}
|
|
98
130
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validDictionaryChangeButtons.content.cjs","sources":["../../../src/components/DictionaryEditor/validDictionaryChangeButtons.content.tsx"],"sourcesContent":["import { t, type DeclarationContent } from 'intlayer';\n\nexport const validDictionaryChangeButtonsContent = {\n key: 'valid-dictionary-change-buttons',\n content: {\n resetButton: {\n text: t({\n en: 'Reset all changes',\n fr: 'Réinitialiser toutes les modifications',\n es: 'Restablecer todas las modificaciones',\n de: 'Alle Änderungen zurücksetzen',\n ja: 'すべての変更をリセット',\n ko: '모든 변경 사항 재설정',\n zh: '重置所有更改',\n it: 'Ripristina tutte le modifiche',\n pt: 'Redefinir todas as alterações',\n hi: 'सभी परिवर्तनों को रिसेट करें',\n ar: 'إعادة تعيين جميع التغييرات',\n ru: 'Сбросить все изменения',\n }),\n label: t({\n en: 'Click to reset all the changes',\n fr: 'Cliquez pour réinitialiser toutes les modifications',\n es: 'Haga clic para restablecer todas las modificaciones',\n de: 'Klicken Sie, um alle Änderungen zurückzusetzen',\n ja: 'すべての変更をリセットするにはクリックしてください',\n ko: '모든 변경 사항을 재설정하려면 클릭하세요',\n zh: '单击以重置所有更改',\n it: 'Fai clic per ripristinare tutte le modifiche',\n pt: 'Clique para redefinir todas as alterações',\n hi: 'सभी परिवर्तनों को रिसेट करने के लिए क्लिक करें',\n ar: 'انقر لإعادة تعيين جميع التغييرات',\n ru: 'Нажмите, чтобы сбросить все изменения',\n }),\n },\n saveButton: {\n text: t({\n en: 'Save changes',\n fr: 'Enregistrer les modifications',\n es: 'Guardar cambios',\n de: 'Änderungen speichern',\n ja: '変更を保存',\n ko: '변경 사항 저장',\n zh: '保存更改',\n it: 'Salva le modifiche',\n pt: 'Salvar alterações',\n hi: 'परिवर्तन सहेजें',\n ar: 'احفظ التغييرات',\n ru: 'Сохранить изменения',\n }),\n label: t({\n en: 'Click to save changes',\n fr: 'Cliquez pour enregistrer les modifications',\n es: 'Haga clic para guardar los cambios',\n de: 'Klicken Sie, um Änderungen zu speichern',\n ja: '変更を保存するにはクリックしてください',\n ko: '변경 사항을 저장하려면 클릭하세요',\n zh: '单击以保存更改',\n it: 'Fai clic per salvare le modifiche',\n pt: 'Clique para salvar as alterações',\n hi: 'परिवर्तन सहेजने के लिए क्लिक करें',\n ar: 'انقر لحفظ التغييرات',\n ru: 'Нажмите, чтобы сохранить изменения',\n }),\n },\n publishButton: {\n text: t({\n en: 'Publish dictionary',\n fr: 'Publier le dictionnaire',\n es: 'Publicar diccionario',\n de: 'Wörterbuch veröffentlichen',\n ja: '辞書を公開',\n ko: '사전을 게시',\n zh: '发布字典',\n it: 'Pubblica il dizionario',\n pt: 'Publicar dicionário',\n hi: 'शब्दकोश प्रकाशित करें',\n ar: 'نشر القاموس',\n ru: 'Опубликовать словарь',\n }),\n label: t({\n en: 'Click to publish dictionary',\n fr: 'Cliquez pour publier le dictionnaire',\n es: 'Haga clic para publicar el diccionario',\n de: 'Klicken Sie, um das Wörterbuch zu veröffentlichen',\n ja: '辞書を公開するにはクリックしてください',\n ko: '사전을 게시하려면 클릭하세요',\n zh: '单击以发布字典',\n it: 'Fai clic per pubblicare il dizionario',\n pt: 'Clique para publicar dicionário',\n hi: 'शब्दकोश प्रकाशित करने के लिए क्लिक करें',\n ar: 'انقر لنشر القاموس',\n ru: 'Нажмите, чтобы опубликовать словарь',\n }),\n },\n },\n} satisfies DeclarationContent;\n"],"names":["t"],"mappings":";;;AAEO,MAAM,sCAAsC;AAAA,EACjD,KAAK;AAAA,EACL,SAAS;AAAA,IACP,aAAa;AAAA,MACX,MAAMA,SAAAA,EAAE;AAAA,QACN,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAA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IAAI;AAAA,QACJ,IAAI;AAAA,MAAA,CACL;AAAA,MACD,OAAOA,SAAAA,EAAE;AAAA,QACP,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MACL,CAAA;AAAA,IAAA;AAAA,EACH;AAEJ;;"}
|
|
1
|
+
{"version":3,"file":"validDictionaryChangeButtons.content.cjs","sources":["../../../src/components/DictionaryEditor/validDictionaryChangeButtons.content.tsx"],"sourcesContent":["import { t, type DeclarationContent } from 'intlayer';\n\nexport const validDictionaryChangeButtonsContent = {\n key: 'valid-dictionary-change-buttons',\n content: {\n resetButton: {\n text: t({\n en: 'Reset all changes',\n fr: 'Réinitialiser toutes les modifications',\n es: 'Restablecer todas las modificaciones',\n de: 'Alle Änderungen zurücksetzen',\n ja: 'すべての変更をリセット',\n ko: '모든 변경 사항 재설정',\n zh: '重置所有更改',\n it: 'Ripristina tutte le modifiche',\n pt: 'Redefinir todas as alterações',\n hi: 'सभी परिवर्तनों को रिसेट करें',\n ar: 'إعادة تعيين جميع التغييرات',\n ru: 'Сбросить все изменения',\n }),\n label: t({\n en: 'Click to reset all the changes',\n fr: 'Cliquez pour réinitialiser toutes les modifications',\n es: 'Haga clic para restablecer todas las modificaciones',\n de: 'Klicken Sie, um alle Änderungen zurückzusetzen',\n ja: 'すべての変更をリセットするにはクリックしてください',\n ko: '모든 변경 사항을 재설정하려면 클릭하세요',\n zh: '单击以重置所有更改',\n it: 'Fai clic per ripristinare tutte le modifiche',\n pt: 'Clique para redefinir todas as alterações',\n hi: 'सभी परिवर्तनों को रिसेट करने के लिए क्लिक करें',\n ar: 'انقر لإعادة تعيين جميع التغييرات',\n ru: 'Нажмите, чтобы сбросить все изменения',\n }),\n },\n saveButton: {\n text: t({\n en: 'Save changes',\n fr: 'Enregistrer les modifications',\n es: 'Guardar cambios',\n de: 'Änderungen speichern',\n ja: '変更を保存',\n ko: '변경 사항 저장',\n zh: '保存更改',\n it: 'Salva le modifiche',\n pt: 'Salvar alterações',\n hi: 'परिवर्तन सहेजें',\n ar: 'احفظ التغييرات',\n ru: 'Сохранить изменения',\n }),\n label: t({\n en: 'Click to save changes',\n fr: 'Cliquez pour enregistrer les modifications',\n es: 'Haga clic para guardar los cambios',\n de: 'Klicken Sie, um Änderungen zu speichern',\n ja: '変更を保存するにはクリックしてください',\n ko: '변경 사항을 저장하려면 클릭하세요',\n zh: '单击以保存更改',\n it: 'Fai clic per salvare le modifiche',\n pt: 'Clique para salvar as alterações',\n hi: 'परिवर्तन सहेजने के लिए क्लिक करें',\n ar: 'انقر لحفظ التغييرات',\n ru: 'Нажмите, чтобы сохранить изменения',\n }),\n },\n publishButton: {\n text: t({\n en: 'Publish dictionary',\n fr: 'Publier le dictionnaire',\n es: 'Publicar diccionario',\n de: 'Wörterbuch veröffentlichen',\n ja: '辞書を公開',\n ko: '사전을 게시',\n zh: '发布字典',\n it: 'Pubblica il dizionario',\n pt: 'Publicar dicionário',\n hi: 'शब्दकोश प्रकाशित करें',\n ar: 'نشر القاموس',\n ru: 'Опубликовать словарь',\n }),\n label: t({\n en: 'Click to publish dictionary',\n fr: 'Cliquez pour publier le dictionnaire',\n es: 'Haga clic para publicar el diccionario',\n de: 'Klicken Sie, um das Wörterbuch zu veröffentlichen',\n ja: '辞書を公開するにはクリックしてください',\n ko: '사전을 게시하려면 클릭하세요',\n zh: '单击以发布字典',\n it: 'Fai clic per pubblicare il dizionario',\n pt: 'Clique para publicar dicionário',\n hi: 'शब्दकोश प्रकाशित करने के लिए क्लिक करें',\n ar: 'انقر لنشر القاموس',\n ru: 'Нажмите, чтобы опубликовать словарь',\n }),\n },\n downloadButton: {\n text: t({\n en: 'Download',\n 'en-GB': 'Download',\n fr: 'Télécharger',\n es: 'Descargar',\n de: 'Herunterladen',\n ja: 'ダウンロード',\n ko: '다운로드',\n zh: '下载',\n it: 'Scarica',\n pt: 'Baixar',\n hi: 'डाउनलोड',\n ar: 'تنزيل',\n ru: 'Скачать',\n }),\n label: t({\n en: 'Click to download',\n 'en-GB': 'Click to download',\n fr: 'Cliquez pour télécharger',\n es: 'Haga clic para descargar',\n de: 'Klicken Sie, um herunterzuladen',\n ja: 'ダウンロードするにはクリックしてください',\n ko: '다운로드를 클릭하세요',\n zh: '单击下载',\n it: 'Fai clic per scaricare',\n pt: 'Clique para baixar',\n hi: 'डाउनलोड करने के लिए क्लिक करें',\n ar: 'انقر لتنزيل',\n ru: 'Нажмите, чтобы скачать',\n }),\n },\n },\n} satisfies DeclarationContent;\n"],"names":["t"],"mappings":";;;AAEO,MAAM,sCAAsC;AAAA,EACjD,KAAK;AAAA,EACL,SAAS;AAAA,IACP,aAAa;AAAA,MACX,MAAMA,SAAAA,EAAE;AAAA,QACN,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MAAA,CACL;AAAA,MACD,OAAOA,SAAAA,EAAE;AAAA,QACP,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MACL,CAAA;AAAA,IACH;AAAA,IACA,YAAY;AAAA,MACV,MAAMA,SAAAA,EAAE;AAAA,QACN,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AA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I;AAAA,QACJ,IAAI;AAAA,MAAA,CACL;AAAA,MACD,OAAOA,SAAAA,EAAE;AAAA,QACP,IAAI;AAAA,QACJ,SAAS;AAAA,QACT,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MACL,CAAA;AAAA,IAAA;AAAA,EACH;AAEJ;;"}
|
|
@@ -13,6 +13,10 @@ export declare const validDictionaryChangeButtonsContent: {
|
|
|
13
13
|
text: import('@intlayer/core').TranslationContent<string>;
|
|
14
14
|
label: import('@intlayer/core').TranslationContent<string>;
|
|
15
15
|
};
|
|
16
|
+
downloadButton: {
|
|
17
|
+
text: import('@intlayer/core').TranslationContent<string>;
|
|
18
|
+
label: import('@intlayer/core').TranslationContent<string>;
|
|
19
|
+
};
|
|
16
20
|
};
|
|
17
21
|
};
|
|
18
22
|
//# sourceMappingURL=validDictionaryChangeButtons.content.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validDictionaryChangeButtons.content.d.ts","sourceRoot":"","sources":["../../../src/components/DictionaryEditor/validDictionaryChangeButtons.content.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,mCAAmC
|
|
1
|
+
{"version":3,"file":"validDictionaryChangeButtons.content.d.ts","sourceRoot":"","sources":["../../../src/components/DictionaryEditor/validDictionaryChangeButtons.content.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;;;;;;;CA8HlB,CAAC"}
|
|
@@ -91,6 +91,38 @@ const validDictionaryChangeButtonsContent = {
|
|
|
91
91
|
ar: "انقر لنشر القاموس",
|
|
92
92
|
ru: "Нажмите, чтобы опубликовать словарь"
|
|
93
93
|
})
|
|
94
|
+
},
|
|
95
|
+
downloadButton: {
|
|
96
|
+
text: t({
|
|
97
|
+
en: "Download",
|
|
98
|
+
"en-GB": "Download",
|
|
99
|
+
fr: "Télécharger",
|
|
100
|
+
es: "Descargar",
|
|
101
|
+
de: "Herunterladen",
|
|
102
|
+
ja: "ダウンロード",
|
|
103
|
+
ko: "다운로드",
|
|
104
|
+
zh: "下载",
|
|
105
|
+
it: "Scarica",
|
|
106
|
+
pt: "Baixar",
|
|
107
|
+
hi: "डाउनलोड",
|
|
108
|
+
ar: "تنزيل",
|
|
109
|
+
ru: "Скачать"
|
|
110
|
+
}),
|
|
111
|
+
label: t({
|
|
112
|
+
en: "Click to download",
|
|
113
|
+
"en-GB": "Click to download",
|
|
114
|
+
fr: "Cliquez pour télécharger",
|
|
115
|
+
es: "Haga clic para descargar",
|
|
116
|
+
de: "Klicken Sie, um herunterzuladen",
|
|
117
|
+
ja: "ダウンロードするにはクリックしてください",
|
|
118
|
+
ko: "다운로드를 클릭하세요",
|
|
119
|
+
zh: "单击下载",
|
|
120
|
+
it: "Fai clic per scaricare",
|
|
121
|
+
pt: "Clique para baixar",
|
|
122
|
+
hi: "डाउनलोड करने के लिए क्लिक करें",
|
|
123
|
+
ar: "انقر لتنزيل",
|
|
124
|
+
ru: "Нажмите, чтобы скачать"
|
|
125
|
+
})
|
|
94
126
|
}
|
|
95
127
|
}
|
|
96
128
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validDictionaryChangeButtons.content.mjs","sources":["../../../src/components/DictionaryEditor/validDictionaryChangeButtons.content.tsx"],"sourcesContent":["import { t, type DeclarationContent } from 'intlayer';\n\nexport const validDictionaryChangeButtonsContent = {\n key: 'valid-dictionary-change-buttons',\n content: {\n resetButton: {\n text: t({\n en: 'Reset all changes',\n fr: 'Réinitialiser toutes les modifications',\n es: 'Restablecer todas las modificaciones',\n de: 'Alle Änderungen zurücksetzen',\n ja: 'すべての変更をリセット',\n ko: '모든 변경 사항 재설정',\n zh: '重置所有更改',\n it: 'Ripristina tutte le modifiche',\n pt: 'Redefinir todas as alterações',\n hi: 'सभी परिवर्तनों को रिसेट करें',\n ar: 'إعادة تعيين جميع التغييرات',\n ru: 'Сбросить все изменения',\n }),\n label: t({\n en: 'Click to reset all the changes',\n fr: 'Cliquez pour réinitialiser toutes les modifications',\n es: 'Haga clic para restablecer todas las modificaciones',\n de: 'Klicken Sie, um alle Änderungen zurückzusetzen',\n ja: 'すべての変更をリセットするにはクリックしてください',\n ko: '모든 변경 사항을 재설정하려면 클릭하세요',\n zh: '单击以重置所有更改',\n it: 'Fai clic per ripristinare tutte le modifiche',\n pt: 'Clique para redefinir todas as alterações',\n hi: 'सभी परिवर्तनों को रिसेट करने के लिए क्लिक करें',\n ar: 'انقر لإعادة تعيين جميع التغييرات',\n ru: 'Нажмите, чтобы сбросить все изменения',\n }),\n },\n saveButton: {\n text: t({\n en: 'Save changes',\n fr: 'Enregistrer les modifications',\n es: 'Guardar cambios',\n de: 'Änderungen speichern',\n ja: '変更を保存',\n ko: '변경 사항 저장',\n zh: '保存更改',\n it: 'Salva le modifiche',\n pt: 'Salvar alterações',\n hi: 'परिवर्तन सहेजें',\n ar: 'احفظ التغييرات',\n ru: 'Сохранить изменения',\n }),\n label: t({\n en: 'Click to save changes',\n fr: 'Cliquez pour enregistrer les modifications',\n es: 'Haga clic para guardar los cambios',\n de: 'Klicken Sie, um Änderungen zu speichern',\n ja: '変更を保存するにはクリックしてください',\n ko: '변경 사항을 저장하려면 클릭하세요',\n zh: '单击以保存更改',\n it: 'Fai clic per salvare le modifiche',\n pt: 'Clique para salvar as alterações',\n hi: 'परिवर्तन सहेजने के लिए क्लिक करें',\n ar: 'انقر لحفظ التغييرات',\n ru: 'Нажмите, чтобы сохранить изменения',\n }),\n },\n publishButton: {\n text: t({\n en: 'Publish dictionary',\n fr: 'Publier le dictionnaire',\n es: 'Publicar diccionario',\n de: 'Wörterbuch veröffentlichen',\n ja: '辞書を公開',\n ko: '사전을 게시',\n zh: '发布字典',\n it: 'Pubblica il dizionario',\n pt: 'Publicar dicionário',\n hi: 'शब्दकोश प्रकाशित करें',\n ar: 'نشر القاموس',\n ru: 'Опубликовать словарь',\n }),\n label: t({\n en: 'Click to publish dictionary',\n fr: 'Cliquez pour publier le dictionnaire',\n es: 'Haga clic para publicar el diccionario',\n de: 'Klicken Sie, um das Wörterbuch zu veröffentlichen',\n ja: '辞書を公開するにはクリックしてください',\n ko: '사전을 게시하려면 클릭하세요',\n zh: '单击以发布字典',\n it: 'Fai clic per pubblicare il dizionario',\n pt: 'Clique para publicar dicionário',\n hi: 'शब्दकोश प्रकाशित करने के लिए क्लिक करें',\n ar: 'انقر لنشر القاموس',\n ru: 'Нажмите, чтобы опубликовать словарь',\n }),\n },\n },\n} satisfies DeclarationContent;\n"],"names":[],"mappings":";AAEO,MAAM,sCAAsC;AAAA,EACjD,KAAK;AAAA,EACL,SAAS;AAAA,IACP,aAAa;AAAA,MACX,MAAM,EAAE;AAAA,QACN,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MAAA,CACL;AAAA,MACD,OAAO,EAAE;AAAA,QACP,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MACL,CAAA;AAAA,IACH;AAAA,IACA,YAAY;AAAA,MACV,MAAM,EAAE;AAAA,QACN,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MAAA,CACL;AAAA,MACD,OAAO,EAAE;AAAA,QACP,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MACL,CAAA;AAAA,IACH;AAAA,IACA,eAAe;AAAA,MACb,MAAM,EAAE;AAAA,QACN,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MAAA,CACL;AAAA,MACD,OAAO,EAAE;AAAA,QACP,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MACL,CAAA;AAAA,IAAA;AAAA,EACH;AAEJ;"}
|
|
1
|
+
{"version":3,"file":"validDictionaryChangeButtons.content.mjs","sources":["../../../src/components/DictionaryEditor/validDictionaryChangeButtons.content.tsx"],"sourcesContent":["import { t, type DeclarationContent } from 'intlayer';\n\nexport const validDictionaryChangeButtonsContent = {\n key: 'valid-dictionary-change-buttons',\n content: {\n resetButton: {\n text: t({\n en: 'Reset all changes',\n fr: 'Réinitialiser toutes les modifications',\n es: 'Restablecer todas las modificaciones',\n de: 'Alle Änderungen zurücksetzen',\n ja: 'すべての変更をリセット',\n ko: '모든 변경 사항 재설정',\n zh: '重置所有更改',\n it: 'Ripristina tutte le modifiche',\n pt: 'Redefinir todas as alterações',\n hi: 'सभी परिवर्तनों को रिसेट करें',\n ar: 'إعادة تعيين جميع التغييرات',\n ru: 'Сбросить все изменения',\n }),\n label: t({\n en: 'Click to reset all the changes',\n fr: 'Cliquez pour réinitialiser toutes les modifications',\n es: 'Haga clic para restablecer todas las modificaciones',\n de: 'Klicken Sie, um alle Änderungen zurückzusetzen',\n ja: 'すべての変更をリセットするにはクリックしてください',\n ko: '모든 변경 사항을 재설정하려면 클릭하세요',\n zh: '单击以重置所有更改',\n it: 'Fai clic per ripristinare tutte le modifiche',\n pt: 'Clique para redefinir todas as alterações',\n hi: 'सभी परिवर्तनों को रिसेट करने के लिए क्लिक करें',\n ar: 'انقر لإعادة تعيين جميع التغييرات',\n ru: 'Нажмите, чтобы сбросить все изменения',\n }),\n },\n saveButton: {\n text: t({\n en: 'Save changes',\n fr: 'Enregistrer les modifications',\n es: 'Guardar cambios',\n de: 'Änderungen speichern',\n ja: '変更を保存',\n ko: '변경 사항 저장',\n zh: '保存更改',\n it: 'Salva le modifiche',\n pt: 'Salvar alterações',\n hi: 'परिवर्तन सहेजें',\n ar: 'احفظ التغييرات',\n ru: 'Сохранить изменения',\n }),\n label: t({\n en: 'Click to save changes',\n fr: 'Cliquez pour enregistrer les modifications',\n es: 'Haga clic para guardar los cambios',\n de: 'Klicken Sie, um Änderungen zu speichern',\n ja: '変更を保存するにはクリックしてください',\n ko: '변경 사항을 저장하려면 클릭하세요',\n zh: '单击以保存更改',\n it: 'Fai clic per salvare le modifiche',\n pt: 'Clique para salvar as alterações',\n hi: 'परिवर्तन सहेजने के लिए क्लिक करें',\n ar: 'انقر لحفظ التغييرات',\n ru: 'Нажмите, чтобы сохранить изменения',\n }),\n },\n publishButton: {\n text: t({\n en: 'Publish dictionary',\n fr: 'Publier le dictionnaire',\n es: 'Publicar diccionario',\n de: 'Wörterbuch veröffentlichen',\n ja: '辞書を公開',\n ko: '사전을 게시',\n zh: '发布字典',\n it: 'Pubblica il dizionario',\n pt: 'Publicar dicionário',\n hi: 'शब्दकोश प्रकाशित करें',\n ar: 'نشر القاموس',\n ru: 'Опубликовать словарь',\n }),\n label: t({\n en: 'Click to publish dictionary',\n fr: 'Cliquez pour publier le dictionnaire',\n es: 'Haga clic para publicar el diccionario',\n de: 'Klicken Sie, um das Wörterbuch zu veröffentlichen',\n ja: '辞書を公開するにはクリックしてください',\n ko: '사전을 게시하려면 클릭하세요',\n zh: '单击以发布字典',\n it: 'Fai clic per pubblicare il dizionario',\n pt: 'Clique para publicar dicionário',\n hi: 'शब्दकोश प्रकाशित करने के लिए क्लिक करें',\n ar: 'انقر لنشر القاموس',\n ru: 'Нажмите, чтобы опубликовать словарь',\n }),\n },\n downloadButton: {\n text: t({\n en: 'Download',\n 'en-GB': 'Download',\n fr: 'Télécharger',\n es: 'Descargar',\n de: 'Herunterladen',\n ja: 'ダウンロード',\n ko: '다운로드',\n zh: '下载',\n it: 'Scarica',\n pt: 'Baixar',\n hi: 'डाउनलोड',\n ar: 'تنزيل',\n ru: 'Скачать',\n }),\n label: t({\n en: 'Click to download',\n 'en-GB': 'Click to download',\n fr: 'Cliquez pour télécharger',\n es: 'Haga clic para descargar',\n de: 'Klicken Sie, um herunterzuladen',\n ja: 'ダウンロードするにはクリックしてください',\n ko: '다운로드를 클릭하세요',\n zh: '单击下载',\n it: 'Fai clic per scaricare',\n pt: 'Clique para baixar',\n hi: 'डाउनलोड करने के लिए क्लिक करें',\n ar: 'انقر لتنزيل',\n ru: 'Нажмите, чтобы скачать',\n }),\n },\n },\n} satisfies DeclarationContent;\n"],"names":[],"mappings":";AAEO,MAAM,sCAAsC;AAAA,EACjD,KAAK;AAAA,EACL,SAAS;AAAA,IACP,aAAa;AAAA,MACX,MAAM,EAAE;AAAA,QACN,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ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,MAAA,CACL;AAAA,MACD,OAAO,EAAE;AAAA,QACP,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MACL,CAAA;AAAA,IACH;AAAA,IACA,gBAAgB;AAAA,MACd,MAAM,EAAE;AAAA,QACN,IAAI;AAAA,QACJ,SAAS;AAAA,QACT,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MAAA,CACL;AAAA,MACD,OAAO,EAAE;AAAA,QACP,IAAI;AAAA,QACJ,SAAS;AAAA,QACT,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MACL,CAAA;AAAA,IAAA;AAAA,EACH;AAEJ;"}
|
|
@@ -7,7 +7,7 @@ const require$$0 = require("react");
|
|
|
7
7
|
const reactIntlayer = require("react-intlayer");
|
|
8
8
|
require("../../../hooks/useScrollBlockage/useScrollBlockageStore.cjs");
|
|
9
9
|
require("../../../hooks/useAsync/useAsyncStateStore.cjs");
|
|
10
|
-
require("
|
|
10
|
+
require("@intlayer/api");
|
|
11
11
|
require("@intlayer/config/client");
|
|
12
12
|
require("../../Toaster/Toast.cjs");
|
|
13
13
|
const hooks_useGetAllDictionaries = require("../../../hooks/useGetAllDictionaries.cjs");
|
|
@@ -17,7 +17,8 @@ const components_DictionaryFieldEditor_DictionariesSelector_dictionariesSelector
|
|
|
17
17
|
const DictionariesSelector = ({
|
|
18
18
|
onClickDictionaryList,
|
|
19
19
|
isDarkMode,
|
|
20
|
-
availableLocales
|
|
20
|
+
availableLocales,
|
|
21
|
+
mode
|
|
21
22
|
}) => {
|
|
22
23
|
const { online, locale, isLoading } = hooks_useGetAllDictionaries.useGetAllDictionaries();
|
|
23
24
|
const { focusedContent } = editorReact.useFocusDictionary();
|
|
@@ -37,7 +38,8 @@ const DictionariesSelector = ({
|
|
|
37
38
|
dictionary,
|
|
38
39
|
onClickDictionaryList,
|
|
39
40
|
isDarkMode,
|
|
40
|
-
availableLocales
|
|
41
|
+
availableLocales,
|
|
42
|
+
mode
|
|
41
43
|
}
|
|
42
44
|
);
|
|
43
45
|
};
|
package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DictionariesSelector.cjs","sources":["../../../../src/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.tsx"],"sourcesContent":["'use client';\n\nimport { Locales } from '@intlayer/config';\nimport { useFocusDictionary } from '@intlayer/editor-react';\nimport { useMemo, type FC } from 'react';\n// @ts-ignore react-intlayer not build yet\nimport { useDictionary } from 'react-intlayer';\nimport { useGetAllDictionaries } from '../../../hooks';\nimport { Loader } from '../../Loader';\nimport { DictionaryFieldEditor } from '../DictionaryFieldEditor';\nimport { dictionariesSelectorContent } from './dictionariesSelector.content';\n\ntype DictionariesSelectorProps = {\n onClickDictionaryList: () => void;\n isDarkMode?: boolean;\n availableLocales: Locales[];\n};\n\nexport const DictionariesSelector: FC<DictionariesSelectorProps> = ({\n onClickDictionaryList,\n isDarkMode,\n availableLocales,\n}) => {\n const { online, locale, isLoading } = useGetAllDictionaries();\n const { focusedContent } = useFocusDictionary();\n const { noDictionaryMessage, dictionaryNotFoundMessage } = useDictionary(\n dictionariesSelectorContent\n );\n const dictionary = useMemo(\n () =>\n focusedContent?.dictionaryKey\n ? (online?.[focusedContent?.dictionaryKey] ??\n locale?.[focusedContent?.dictionaryKey])\n : null,\n [online, locale, focusedContent?.dictionaryKey]\n );\n\n if (isLoading) return <Loader />;\n\n if (!focusedContent?.dictionaryKey) return noDictionaryMessage;\n\n if (!dictionary) return dictionaryNotFoundMessage;\n\n return (\n <DictionaryFieldEditor\n dictionary={dictionary}\n onClickDictionaryList={onClickDictionaryList}\n isDarkMode={isDarkMode}\n availableLocales={availableLocales}\n />\n );\n};\n"],"names":["useGetAllDictionaries","useFocusDictionary","useDictionary","dictionariesSelectorContent","useMemo","jsx","Loader","DictionaryFieldEditor"],"mappings":";;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"DictionariesSelector.cjs","sources":["../../../../src/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.tsx"],"sourcesContent":["'use client';\n\nimport { Locales } from '@intlayer/config';\nimport { useFocusDictionary } from '@intlayer/editor-react';\nimport { useMemo, type FC } from 'react';\n// @ts-ignore react-intlayer not build yet\nimport { useDictionary } from 'react-intlayer';\nimport { useGetAllDictionaries } from '../../../hooks';\nimport { Loader } from '../../Loader';\nimport { DictionaryFieldEditor } from '../DictionaryFieldEditor';\nimport { dictionariesSelectorContent } from './dictionariesSelector.content';\n\ntype DictionariesSelectorProps = {\n onClickDictionaryList: () => void;\n isDarkMode?: boolean;\n availableLocales: Locales[];\n mode: 'local' | 'remote';\n};\n\nexport const DictionariesSelector: FC<DictionariesSelectorProps> = ({\n onClickDictionaryList,\n isDarkMode,\n availableLocales,\n mode,\n}) => {\n const { online, locale, isLoading } = useGetAllDictionaries();\n const { focusedContent } = useFocusDictionary();\n const { noDictionaryMessage, dictionaryNotFoundMessage } = useDictionary(\n dictionariesSelectorContent\n );\n const dictionary = useMemo(\n () =>\n focusedContent?.dictionaryKey\n ? (online?.[focusedContent?.dictionaryKey] ??\n locale?.[focusedContent?.dictionaryKey])\n : null,\n [online, locale, focusedContent?.dictionaryKey]\n );\n\n if (isLoading) return <Loader />;\n\n if (!focusedContent?.dictionaryKey) return noDictionaryMessage;\n\n if (!dictionary) return dictionaryNotFoundMessage;\n\n return (\n <DictionaryFieldEditor\n dictionary={dictionary}\n onClickDictionaryList={onClickDictionaryList}\n isDarkMode={isDarkMode}\n availableLocales={availableLocales}\n mode={mode}\n />\n );\n};\n"],"names":["useGetAllDictionaries","useFocusDictionary","useDictionary","dictionariesSelectorContent","useMemo","jsx","Loader","DictionaryFieldEditor"],"mappings":";;;;;;;;;;;;;;;;AAmBO,MAAM,uBAAsD,CAAC;AAAA,EAClE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,EAAE,QAAQ,QAAQ,UAAA,IAAcA,4BAAAA,sBAAsB;AACtD,QAAA,EAAE,eAAe,IAAIC,+BAAmB;AACxC,QAAA,EAAE,qBAAqB,0BAAA,IAA8BC,cAAA;AAAA,IACzDC,mFAAAA;AAAAA,EACF;AACA,QAAM,aAAaC,WAAA;AAAA,IACjB,MACE,gBAAgB,gBACX,SAAS,gBAAgB,aAAa,KACvC,SAAS,gBAAgB,aAAa,IACtC;AAAA,IACN,CAAC,QAAQ,QAAQ,gBAAgB,aAAa;AAAA,EAChD;AAEI,MAAA,UAAkB,QAAAC,iDAACC,wBAAAA,QAAO,CAAA,CAAA;AAE1B,MAAA,CAAC,gBAAgB,cAAsB,QAAA;AAEvC,MAAA,CAAC,WAAmB,QAAA;AAGtB,SAAAD,2BAAA,kBAAA;AAAA,IAACE,uDAAA;AAAA,IAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IAAA;AAAA,EACF;AAEJ;;"}
|
package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DictionariesSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3C,OAAO,EAAW,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAQzC,KAAK,yBAAyB,GAAG;IAC/B,qBAAqB,EAAE,MAAM,IAAI,CAAC;IAClC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,gBAAgB,EAAE,OAAO,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"DictionariesSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3C,OAAO,EAAW,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAQzC,KAAK,yBAAyB,GAAG;IAC/B,qBAAqB,EAAE,MAAM,IAAI,CAAC;IAClC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,gBAAgB,EAAE,OAAO,EAAE,CAAC;IAC5B,IAAI,EAAE,OAAO,GAAG,QAAQ,CAAC;CAC1B,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,EAAE,CAAC,yBAAyB,CAmC9D,CAAC"}
|
|
@@ -5,7 +5,7 @@ import { useMemo } from "react";
|
|
|
5
5
|
import { useDictionary } from "react-intlayer";
|
|
6
6
|
import "../../../hooks/useScrollBlockage/useScrollBlockageStore.mjs";
|
|
7
7
|
import "../../../hooks/useAsync/useAsyncStateStore.mjs";
|
|
8
|
-
import "
|
|
8
|
+
import "@intlayer/api";
|
|
9
9
|
import "@intlayer/config/client";
|
|
10
10
|
import "../../Toaster/Toast.mjs";
|
|
11
11
|
import { useGetAllDictionaries } from "../../../hooks/useGetAllDictionaries.mjs";
|
|
@@ -15,7 +15,8 @@ import { dictionariesSelectorContent } from "./dictionariesSelector.content.mjs"
|
|
|
15
15
|
const DictionariesSelector = ({
|
|
16
16
|
onClickDictionaryList,
|
|
17
17
|
isDarkMode,
|
|
18
|
-
availableLocales
|
|
18
|
+
availableLocales,
|
|
19
|
+
mode
|
|
19
20
|
}) => {
|
|
20
21
|
const { online, locale, isLoading } = useGetAllDictionaries();
|
|
21
22
|
const { focusedContent } = useFocusDictionary();
|
|
@@ -35,7 +36,8 @@ const DictionariesSelector = ({
|
|
|
35
36
|
dictionary,
|
|
36
37
|
onClickDictionaryList,
|
|
37
38
|
isDarkMode,
|
|
38
|
-
availableLocales
|
|
39
|
+
availableLocales,
|
|
40
|
+
mode
|
|
39
41
|
}
|
|
40
42
|
);
|
|
41
43
|
};
|