intlayer-editor 3.5.5 → 3.5.6
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/cjs/DictionaryEditionDrawer/DictionaryEditionDrawer.cjs +7 -8
- package/dist/cjs/DictionaryEditionDrawer/DictionaryEditionDrawer.cjs.map +1 -1
- package/dist/cjs/DictionaryEditionDrawer/dictionaryEditionDrawer.content.cjs +41 -1
- package/dist/cjs/DictionaryEditionDrawer/dictionaryEditionDrawer.content.cjs.map +1 -1
- package/dist/cjs/IntlayerEditorProvider.cjs +2 -1
- package/dist/cjs/IntlayerEditorProvider.cjs.map +1 -1
- package/dist/esm/DictionaryEditionDrawer/DictionaryEditionDrawer.mjs +8 -9
- package/dist/esm/DictionaryEditionDrawer/DictionaryEditionDrawer.mjs.map +1 -1
- package/dist/esm/DictionaryEditionDrawer/dictionaryEditionDrawer.content.mjs +41 -1
- package/dist/esm/DictionaryEditionDrawer/dictionaryEditionDrawer.content.mjs.map +1 -1
- package/dist/esm/IntlayerEditorProvider.mjs +3 -2
- package/dist/esm/IntlayerEditorProvider.mjs.map +1 -1
- package/dist/types/DictionaryEditionDrawer/DictionaryEditionDrawer.d.ts +1 -0
- package/dist/types/DictionaryEditionDrawer/DictionaryEditionDrawer.d.ts.map +1 -1
- package/dist/types/DictionaryEditionDrawer/dictionaryEditionDrawer.content.d.ts +2 -0
- package/dist/types/DictionaryEditionDrawer/dictionaryEditionDrawer.content.d.ts.map +1 -1
- package/dist/types/IntlayerEditorProvider.d.ts.map +1 -1
- package/package.json +11 -11
|
@@ -43,7 +43,8 @@ var import_shallow = require("zustand/shallow");
|
|
|
43
43
|
var import_dictionaryListDrawerIdentifier = require('../DictionaryListDrawer/dictionaryListDrawerIdentifier.cjs');
|
|
44
44
|
var import_dictionaryEditionDrawer = __toESM(require('./dictionaryEditionDrawer.content.cjs'));
|
|
45
45
|
var import_useDictionaryEditionDrawer = require('./useDictionaryEditionDrawer.cjs');
|
|
46
|
-
const DictionaryEditionDrawerContent = ({ locale, identifier, handleOnBack, isDarkMode }) => {
|
|
46
|
+
const DictionaryEditionDrawerContent = ({ locale, localeList, identifier, handleOnBack, isDarkMode }) => {
|
|
47
|
+
const { modalTitle } = (0, import_react_intlayer.useDictionary)(import_dictionaryEditionDrawer.default);
|
|
47
48
|
const [keyPathEditionModal, setKeyPathEditionModal] = (0, import_react.useState)(null);
|
|
48
49
|
const { setDictionariesRecord, focusedContent } = (0, import_useDictionaryEditionDrawer.useDictionaryEditionDrawer)(identifier);
|
|
49
50
|
const { all: dictionaries } = (0, import_hooks.useGetAllDictionaries)();
|
|
@@ -66,11 +67,7 @@ const DictionaryEditionDrawerContent = ({ locale, identifier, handleOnBack, isDa
|
|
|
66
67
|
isOpen: keyPathEditionModal !== null,
|
|
67
68
|
onClose: () => setKeyPathEditionModal(null),
|
|
68
69
|
hasCloseButton: true,
|
|
69
|
-
title:
|
|
70
|
-
en: "Edit field",
|
|
71
|
-
fr: "Modifier le champ",
|
|
72
|
-
es: "Editar campo"
|
|
73
|
-
}),
|
|
70
|
+
title: modalTitle,
|
|
74
71
|
size: "xl",
|
|
75
72
|
transparency: "lg",
|
|
76
73
|
children: dictionary && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
@@ -78,7 +75,8 @@ const DictionaryEditionDrawerContent = ({ locale, identifier, handleOnBack, isDa
|
|
|
78
75
|
{
|
|
79
76
|
dictionary,
|
|
80
77
|
onClickDictionaryList,
|
|
81
|
-
isDarkMode
|
|
78
|
+
isDarkMode,
|
|
79
|
+
availableLocales: localeList
|
|
82
80
|
}
|
|
83
81
|
)
|
|
84
82
|
}
|
|
@@ -134,7 +132,8 @@ const DictionaryEditionDrawer = ({
|
|
|
134
132
|
locale,
|
|
135
133
|
identifier: id,
|
|
136
134
|
handleOnBack,
|
|
137
|
-
isDarkMode
|
|
135
|
+
isDarkMode,
|
|
136
|
+
localeList
|
|
138
137
|
}
|
|
139
138
|
)
|
|
140
139
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/DictionaryEditionDrawer/DictionaryEditionDrawer.tsx"],"sourcesContent":["'use client';\n\nimport type { Locales } from '@intlayer/config/client';\nimport type { Dictionary, KeyPath } from '@intlayer/core';\nimport {\n RightDrawer,\n DictionaryEditor,\n LocaleSwitcher,\n Modal,\n useEditionPanelStore,\n DictionaryFieldEditor,\n useRightDrawerStore,\n} from '@intlayer/design-system';\nimport { useGetAllDictionaries } from '@intlayer/design-system/hooks';\nimport { useCallback, useEffect, useState, type FC } from 'react';\nimport { t, useDictionary } from 'react-intlayer';\nimport { useShallow } from 'zustand/shallow';\nimport { dictionaryListDrawerIdentifier } from '../DictionaryListDrawer/dictionaryListDrawerIdentifier';\nimport dictionaryEditionDrawerContent from './dictionaryEditionDrawer.content';\nimport {\n type FileContent as FileContentWithDictionaryPath,\n useDictionaryEditionDrawer,\n getDrawerIdentifier,\n} from './useDictionaryEditionDrawer';\n\ntype DictionaryEditionDrawerContentProps = {\n focusedContent: FileContentWithDictionaryPath;\n locale: Locales;\n identifier: string;\n handleOnBack: () => void;\n isDarkMode?: boolean;\n};\n\nexport const DictionaryEditionDrawerContent: FC<\n DictionaryEditionDrawerContentProps\n> = ({ locale, identifier, handleOnBack, isDarkMode }) => {\n const [keyPathEditionModal, setKeyPathEditionModal] = useState<\n KeyPath[] | null\n >(null);\n const { setDictionariesRecord, focusedContent } =\n useDictionaryEditionDrawer(identifier);\n const { all: dictionaries } = useGetAllDictionaries();\n\n const onClickDictionaryList = useCallback(() => {\n setKeyPathEditionModal(null);\n handleOnBack();\n }, [handleOnBack]);\n\n useEffect(() => {\n if (dictionaries) {\n setDictionariesRecord(dictionaries);\n }\n }, [setDictionariesRecord, dictionaries]);\n\n const dictionaryKey = focusedContent?.dictionaryKey;\n\n if (!dictionaryKey) return <>No dictionary focused</>;\n\n const dictionary: Dictionary = dictionaries[dictionaryKey];\n\n return (\n <>\n <Modal\n isOpen={keyPathEditionModal !== null}\n onClose={() => setKeyPathEditionModal(null)}\n hasCloseButton\n title={
|
|
1
|
+
{"version":3,"sources":["../../../src/DictionaryEditionDrawer/DictionaryEditionDrawer.tsx"],"sourcesContent":["'use client';\n\nimport type { Locales } from '@intlayer/config/client';\nimport type { Dictionary, KeyPath } from '@intlayer/core';\nimport {\n RightDrawer,\n DictionaryEditor,\n LocaleSwitcher,\n Modal,\n useEditionPanelStore,\n DictionaryFieldEditor,\n useRightDrawerStore,\n} from '@intlayer/design-system';\nimport { useGetAllDictionaries } from '@intlayer/design-system/hooks';\nimport { useCallback, useEffect, useState, type FC } from 'react';\nimport { t, useDictionary } from 'react-intlayer';\nimport { useShallow } from 'zustand/shallow';\nimport { dictionaryListDrawerIdentifier } from '../DictionaryListDrawer/dictionaryListDrawerIdentifier';\nimport dictionaryEditionDrawerContent from './dictionaryEditionDrawer.content';\nimport {\n type FileContent as FileContentWithDictionaryPath,\n useDictionaryEditionDrawer,\n getDrawerIdentifier,\n} from './useDictionaryEditionDrawer';\n\ntype DictionaryEditionDrawerContentProps = {\n focusedContent: FileContentWithDictionaryPath;\n locale: Locales;\n localeList: Locales[];\n identifier: string;\n handleOnBack: () => void;\n isDarkMode?: boolean;\n};\n\nexport const DictionaryEditionDrawerContent: FC<\n DictionaryEditionDrawerContentProps\n> = ({ locale, localeList, identifier, handleOnBack, isDarkMode }) => {\n const { modalTitle } = useDictionary(dictionaryEditionDrawerContent);\n const [keyPathEditionModal, setKeyPathEditionModal] = useState<\n KeyPath[] | null\n >(null);\n const { setDictionariesRecord, focusedContent } =\n useDictionaryEditionDrawer(identifier);\n const { all: dictionaries } = useGetAllDictionaries();\n\n const onClickDictionaryList = useCallback(() => {\n setKeyPathEditionModal(null);\n handleOnBack();\n }, [handleOnBack]);\n\n useEffect(() => {\n if (dictionaries) {\n setDictionariesRecord(dictionaries);\n }\n }, [setDictionariesRecord, dictionaries]);\n\n const dictionaryKey = focusedContent?.dictionaryKey;\n\n if (!dictionaryKey) return <>No dictionary focused</>;\n\n const dictionary: Dictionary = dictionaries[dictionaryKey];\n\n return (\n <>\n <Modal\n isOpen={keyPathEditionModal !== null}\n onClose={() => setKeyPathEditionModal(null)}\n hasCloseButton\n title={modalTitle}\n size=\"xl\"\n transparency=\"lg\"\n >\n {dictionary && (\n <DictionaryFieldEditor\n dictionary={dictionary}\n onClickDictionaryList={onClickDictionaryList}\n isDarkMode={isDarkMode}\n availableLocales={localeList}\n />\n )}\n </Modal>\n <DictionaryEditor\n dictionary={dictionary}\n locale={locale}\n onClickEdit={setKeyPathEditionModal}\n />\n </>\n );\n};\n\ntype DictionaryEditionDrawerProps = DictionaryEditionDrawerControllerProps & {\n dictionaryKey: string;\n isDarkMode?: boolean;\n};\n\nexport const DictionaryEditionDrawer: FC<DictionaryEditionDrawerProps> = ({\n locale,\n localeList,\n setLocale,\n dictionaryKey,\n isDarkMode,\n}) => {\n const { backButtonText } = useDictionary(dictionaryEditionDrawerContent);\n const id = getDrawerIdentifier(dictionaryKey);\n\n const { focusedContent, close } = useDictionaryEditionDrawer(dictionaryKey);\n const { openDictionaryListDrawer } = useRightDrawerStore((s) => ({\n openDictionaryListDrawer: () => s.open(dictionaryListDrawerIdentifier),\n }));\n\n const handleOnBack = () => {\n close();\n openDictionaryListDrawer();\n };\n\n return (\n <RightDrawer\n title={dictionaryKey}\n identifier={id}\n header={\n <LocaleSwitcher\n setLocale={setLocale}\n locale={locale}\n localeList={localeList}\n />\n }\n backButton={{\n onBack: handleOnBack,\n text: backButtonText,\n }}\n >\n {focusedContent && (\n <DictionaryEditionDrawerContent\n focusedContent={focusedContent}\n locale={locale}\n identifier={id}\n handleOnBack={handleOnBack}\n isDarkMode={isDarkMode}\n localeList={localeList}\n />\n )}\n </RightDrawer>\n );\n};\n\ntype DictionaryEditionDrawerControllerProps = {\n locale: Locales;\n localeList: Locales[];\n setLocale: (locale: Locales) => void;\n};\n\nexport const DictionaryEditionDrawerController: FC<\n DictionaryEditionDrawerControllerProps\n> = ({ locale, localeList, setLocale }) => {\n const focusedContent = useEditionPanelStore(\n useShallow((s) => s.focusedContent)\n );\n const dictionaryKey: string | undefined = focusedContent?.dictionaryKey;\n\n if (!dictionaryKey) {\n return <></>;\n }\n\n return (\n <DictionaryEditionDrawer\n locale={locale}\n localeList={localeList}\n setLocale={setLocale}\n dictionaryKey={dictionaryKey}\n />\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA0D6B;AAtD7B,2BAQO;AACP,mBAAsC;AACtC,mBAA0D;AAC1D,4BAAiC;AACjC,qBAA2B;AAC3B,4CAA+C;AAC/C,qCAA2C;AAC3C,wCAIO;AAWA,MAAM,iCAET,CAAC,EAAE,QAAQ,YAAY,YAAY,cAAc,WAAW,MAAM;AACpE,QAAM,EAAE,WAAW,QAAI,qCAAc,+BAAAA,OAA8B;AACnE,QAAM,CAAC,qBAAqB,sBAAsB,QAAI,uBAEpD,IAAI;AACN,QAAM,EAAE,uBAAuB,eAAe,QAC5C,8DAA2B,UAAU;AACvC,QAAM,EAAE,KAAK,aAAa,QAAI,oCAAsB;AAEpD,QAAM,4BAAwB,0BAAY,MAAM;AAC9C,2BAAuB,IAAI;AAC3B,iBAAa;AAAA,EACf,GAAG,CAAC,YAAY,CAAC;AAEjB,8BAAU,MAAM;AACd,QAAI,cAAc;AAChB,4BAAsB,YAAY;AAAA,IACpC;AAAA,EACF,GAAG,CAAC,uBAAuB,YAAY,CAAC;AAExC,QAAM,gBAAgB,gBAAgB;AAEtC,MAAI,CAAC,cAAe,QAAO,2EAAE,mCAAqB;AAElD,QAAM,aAAyB,aAAa,aAAa;AAEzD,SACE,4EACE;AAAA;AAAA,MAAC;AAAA;AAAA,QACC,QAAQ,wBAAwB;AAAA,QAChC,SAAS,MAAM,uBAAuB,IAAI;AAAA,QAC1C,gBAAc;AAAA,QACd,OAAO;AAAA,QACP,MAAK;AAAA,QACL,cAAa;AAAA,QAEZ,wBACC;AAAA,UAAC;AAAA;AAAA,YACC;AAAA,YACA;AAAA,YACA;AAAA,YACA,kBAAkB;AAAA;AAAA,QACpB;AAAA;AAAA,IAEJ;AAAA,IACA;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA,aAAa;AAAA;AAAA,IACf;AAAA,KACF;AAEJ;AAOO,MAAM,0BAA4D,CAAC;AAAA,EACxE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,EAAE,eAAe,QAAI,qCAAc,+BAAAA,OAA8B;AACvE,QAAM,SAAK,uDAAoB,aAAa;AAE5C,QAAM,EAAE,gBAAgB,MAAM,QAAI,8DAA2B,aAAa;AAC1E,QAAM,EAAE,yBAAyB,QAAI,0CAAoB,CAAC,OAAO;AAAA,IAC/D,0BAA0B,MAAM,EAAE,KAAK,oEAA8B;AAAA,EACvE,EAAE;AAEF,QAAM,eAAe,MAAM;AACzB,UAAM;AACN,6BAAyB;AAAA,EAC3B;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,OAAO;AAAA,MACP,YAAY;AAAA,MACZ,QACE;AAAA,QAAC;AAAA;AAAA,UACC;AAAA,UACA;AAAA,UACA;AAAA;AAAA,MACF;AAAA,MAEF,YAAY;AAAA,QACV,QAAQ;AAAA,QACR,MAAM;AAAA,MACR;AAAA,MAEC,4BACC;AAAA,QAAC;AAAA;AAAA,UACC;AAAA,UACA;AAAA,UACA,YAAY;AAAA,UACZ;AAAA,UACA;AAAA,UACA;AAAA;AAAA,MACF;AAAA;AAAA,EAEJ;AAEJ;AAQO,MAAM,oCAET,CAAC,EAAE,QAAQ,YAAY,UAAU,MAAM;AACzC,QAAM,qBAAiB;AAAA,QACrB,2BAAW,CAAC,MAAM,EAAE,cAAc;AAAA,EACpC;AACA,QAAM,gBAAoC,gBAAgB;AAE1D,MAAI,CAAC,eAAe;AAClB,WAAO,2EAAE;AAAA,EACX;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAAA,EACF;AAEJ;","names":["dictionaryEditionDrawerContent"]}
|
|
@@ -28,7 +28,47 @@ const dictionaryEditionDrawerContent = {
|
|
|
28
28
|
backButtonText: (0, import_intlayer.t)({
|
|
29
29
|
en: "Dictionary list",
|
|
30
30
|
fr: "Liste des dictionnaires",
|
|
31
|
-
es: "Lista de diccionarios"
|
|
31
|
+
es: "Lista de diccionarios",
|
|
32
|
+
de: "W\xF6rterbuchliste",
|
|
33
|
+
ja: "\u8F9E\u66F8\u30EA\u30B9\u30C8",
|
|
34
|
+
ko: "\uC0AC\uC804 \uBAA9\uB85D",
|
|
35
|
+
zh: "\u8BCD\u5178\u5217\u8868",
|
|
36
|
+
it: "Elenco di dizionari",
|
|
37
|
+
pt: "Lista de dicion\xE1rios",
|
|
38
|
+
hi: "\u0936\u092C\u094D\u0926\u0915\u094B\u0936 \u0938\u0942\u091A\u0940",
|
|
39
|
+
ar: "\u0642\u0627\u0626\u0645\u0629 \u0627\u0644\u0642\u0648\u0627\u0645\u0644",
|
|
40
|
+
ru: "\u0421\u043F\u0438\u0441\u043E\u043A \u0441\u043B\u043E\u0432\u0430\u0440\u0435\u0439",
|
|
41
|
+
"en-GB": "Dictionary list"
|
|
42
|
+
}),
|
|
43
|
+
modalTitle: (0, import_intlayer.t)({
|
|
44
|
+
en: "Edit dictionary",
|
|
45
|
+
fr: "Modifier le dictionnaire",
|
|
46
|
+
es: "Editar el diccionario",
|
|
47
|
+
de: "W\xF6rterbuch bearbeiten",
|
|
48
|
+
ja: "\u8F9E\u66F8\u3092\u7DE8\u96C6",
|
|
49
|
+
ko: "\uC0AC\uC804 \uD3B8\uC9D1",
|
|
50
|
+
zh: "\u7F16\u8F91\u8BCD\u5178",
|
|
51
|
+
it: "Modifica dizionario",
|
|
52
|
+
pt: "Editar dicion\xE1rio",
|
|
53
|
+
hi: "\u0936\u092C\u094D\u0926\u0915\u094B\u0936 \u0938\u0902\u092A\u093E\u0926\u093F\u0924 \u0915\u0930\u0947\u0902",
|
|
54
|
+
ar: "\u062A\u062D\u0631\u064A\u0631 \u0642\u0627\u0645\u0648\u0633",
|
|
55
|
+
ru: "\u0420\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0441\u043B\u043E\u0432\u0430\u0440\u044C",
|
|
56
|
+
"en-GB": "Edit dictionary"
|
|
57
|
+
}),
|
|
58
|
+
noDictionaryFocused: (0, import_intlayer.t)({
|
|
59
|
+
en: "No dictionary focused",
|
|
60
|
+
fr: "Aucun dictionnaire s\xE9lectionn\xE9",
|
|
61
|
+
es: "No hay diccionario enfocado",
|
|
62
|
+
de: "Kein W\xF6rterbuch ausgew\xE4hlt",
|
|
63
|
+
ja: "\u30D5\u30A9\u30FC\u30AB\u30B9\u3055\u308C\u305F\u8F9E\u66F8\u304C\u3042\u308A\u307E\u305B\u3093",
|
|
64
|
+
ko: "\uD3EC\uCEE4\uC2A4\uAC00 \uC788\uB294 \uC0AC\uC804\uC774 \uC5C6\uC2B5\uB2C8\uB2E4",
|
|
65
|
+
zh: "\u6CA1\u6709\u805A\u7126\u7684\u8BCD\u5178",
|
|
66
|
+
it: "Nessun dizionario selezionato",
|
|
67
|
+
pt: "Nenhum dicion\xE1rio focalizado",
|
|
68
|
+
hi: "\u0915\u094B\u0908 \u092B\u094B\u0915\u0938 \u0936\u092C\u094D\u0926\u0915\u094B\u0936 \u0928\u0939\u0940\u0902 \u0939\u0948",
|
|
69
|
+
ar: "\u0644\u0627 \u064A\u0648\u062C\u062F \u0642\u0627\u0645\u0648\u0633 \u0645\u0631\u062A\u0628\u0637",
|
|
70
|
+
ru: "\u041D\u0435\u0442 \u0444\u043E\u043A\u0443\u0441\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u043E\u0433\u043E \u0441\u043B\u043E\u0432\u0430\u0440\u044F",
|
|
71
|
+
"en-GB": "No dictionary focused"
|
|
32
72
|
})
|
|
33
73
|
}
|
|
34
74
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/DictionaryEditionDrawer/dictionaryEditionDrawer.content.ts"],"sourcesContent":["import { t, type DeclarationContent } from 'intlayer';\n\nconst dictionaryEditionDrawerContent = {\n key: 'dictionary-edition-drawer',\n content: {\n backButtonText: t({\n en: 'Dictionary list',\n fr: 'Liste des dictionnaires',\n es: 'Lista de diccionarios',\n }),\n },\n} satisfies DeclarationContent;\n\nexport default dictionaryEditionDrawerContent;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAA2C;AAE3C,MAAM,iCAAiC;AAAA,EACrC,KAAK;AAAA,EACL,SAAS;AAAA,IACP,oBAAgB,mBAAE;AAAA,MAChB,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,
|
|
1
|
+
{"version":3,"sources":["../../../src/DictionaryEditionDrawer/dictionaryEditionDrawer.content.ts"],"sourcesContent":["import { t, type DeclarationContent } from 'intlayer';\n\nconst dictionaryEditionDrawerContent = {\n key: 'dictionary-edition-drawer',\n content: {\n backButtonText: t({\n en: 'Dictionary list',\n fr: 'Liste des dictionnaires',\n es: 'Lista de diccionarios',\n de: 'Wörterbuchliste',\n ja: '辞書リスト',\n ko: '사전 목록',\n zh: '词典列表',\n it: 'Elenco di dizionari',\n pt: 'Lista de dicionários',\n hi: 'शब्दकोश सूची',\n ar: 'قائمة القوامل',\n ru: 'Список словарей',\n 'en-GB': 'Dictionary list',\n }),\n modalTitle: t({\n en: 'Edit dictionary',\n fr: 'Modifier le dictionnaire',\n es: 'Editar el diccionario',\n de: 'Wörterbuch bearbeiten',\n ja: '辞書を編集',\n ko: '사전 편집',\n zh: '编辑词典',\n it: 'Modifica dizionario',\n pt: 'Editar dicionário',\n hi: 'शब्दकोश संपादित करें',\n ar: 'تحرير قاموس',\n ru: 'Редактировать словарь',\n 'en-GB': 'Edit dictionary',\n }),\n noDictionaryFocused: t({\n en: 'No dictionary focused',\n fr: 'Aucun dictionnaire sélectionné',\n es: 'No hay diccionario enfocado',\n de: 'Kein Wörterbuch ausgewählt',\n ja: 'フォーカスされた辞書がありません',\n ko: '포커스가 있는 사전이 없습니다',\n zh: '没有聚焦的词典',\n it: 'Nessun dizionario selezionato',\n pt: 'Nenhum dicionário focalizado',\n hi: 'कोई फोकस शब्दकोश नहीं है',\n ar: 'لا يوجد قاموس مرتبط',\n ru: 'Нет фокусированного словаря',\n 'en-GB': 'No dictionary focused',\n }),\n },\n} satisfies DeclarationContent;\n\nexport default dictionaryEditionDrawerContent;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAA2C;AAE3C,MAAM,iCAAiC;AAAA,EACrC,KAAK;AAAA,EACL,SAAS;AAAA,IACP,oBAAgB,mBAAE;AAAA,MAChB,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,SAAS;AAAA,IACX,CAAC;AAAA,IACD,gBAAY,mBAAE;AAAA,MACZ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,SAAS;AAAA,IACX,CAAC;AAAA,IACD,yBAAqB,mBAAE;AAAA,MACrB,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,SAAS;AAAA,IACX,CAAC;AAAA,EACH;AACF;AAEA,IAAO,0CAAQ;","names":[]}
|
|
@@ -32,6 +32,7 @@ var import_react_intlayer = require("react-intlayer");
|
|
|
32
32
|
var import_editor = require("react-intlayer/editor");
|
|
33
33
|
var import_ContentSelectorWrapper = require('./ContentSelectorWrapper.cjs');
|
|
34
34
|
var import_react = require("react");
|
|
35
|
+
var import_hooks = require("@intlayer/design-system/hooks");
|
|
35
36
|
const IntlayerEditorContext = (0, import_react.createContext)({
|
|
36
37
|
isEditorEnabled: false
|
|
37
38
|
});
|
|
@@ -76,7 +77,7 @@ const IntlayerEditorProvider = ({
|
|
|
76
77
|
}, [isEnabled, editor.enabled, editor.clientId, editor.clientSecret]);
|
|
77
78
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(IntlayerEditorContext.Provider, { value: { isEditorEnabled }, children: [
|
|
78
79
|
children,
|
|
79
|
-
isEditorEnabled && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
80
|
+
isEditorEnabled && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_hooks.AsyncStateProvider, { children: [
|
|
80
81
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
81
82
|
import_DictionaryEditionDrawer.DictionaryEditionDrawerController,
|
|
82
83
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/IntlayerEditorProvider.tsx"],"sourcesContent":["'use client';\n\nimport { appLogger, getConfiguration } from '@intlayer/config/client';\nimport { DictionaryEditionDrawerController } from './DictionaryEditionDrawer/index';\nimport { DictionaryListDrawer } from './DictionaryListDrawer/index';\nimport { useIntlayerContext } from 'react-intlayer';\nimport { useContentSelectorContext } from 'react-intlayer/editor';\nimport { ContentSelectorWrapper } from './ContentSelectorWrapper';\nimport {\n type FC,\n type PropsWithChildren,\n createContext,\n useContext,\n useEffect,\n useMemo,\n} from 'react';\n\ntype IntlayerEditorValue = {\n isEditorEnabled: boolean;\n};\n\n/**\n * Context that store the current locale on the client side\n */\nexport const IntlayerEditorContext = createContext<IntlayerEditorValue>({\n isEditorEnabled: false,\n});\n\n/**\n * Hook that provides the current locale\n */\nexport const useIntlayerEditorContext = () => useContext(IntlayerEditorContext);\n\nexport type IntlayerEditorProviderProps = PropsWithChildren<{\n isEnabled?: boolean;\n}>;\n\n/**\n * Provider that store the current locale on the client side\n */\nexport const IntlayerEditorProvider: FC<IntlayerEditorProviderProps> = ({\n children,\n isEnabled = true,\n}) => {\n const { editor, internationalization } = getConfiguration();\n\n const { setState } = useContentSelectorContext();\n\n const { locale, setLocale } = useIntlayerContext();\n\n const isEditorEnabled = useMemo(\n () =>\n Boolean(\n editor.enabled && editor.clientId && editor.clientSecret && isEnabled\n ),\n [editor.enabled && editor.clientId && editor.clientSecret && isEnabled]\n );\n\n useEffect(() => {\n setState({\n ContentSelectorWrapper,\n });\n }, [setState]);\n\n useEffect(() => {\n if (isEnabled && editor.enabled) {\n if (!editor.clientId) {\n appLogger(\n 'Editor is enabled but clientId is not set. Please set it in the editor configuration. See http://localhost:3000/doc/concept/editor.',\n {\n level: 'error',\n }\n );\n }\n\n if (!editor.clientSecret) {\n appLogger(\n 'Editor is enabled but clientSecret is not set. Please set it in the editor configuration. See http://localhost:3000/doc/concept/editor.',\n {\n level: 'error',\n }\n );\n }\n }\n }, [isEnabled, editor.enabled, editor.clientId, editor.clientSecret]);\n\n return (\n <IntlayerEditorContext.Provider value={{ isEditorEnabled }}>\n {children}\n\n {isEditorEnabled && (\n
|
|
1
|
+
{"version":3,"sources":["../../src/IntlayerEditorProvider.tsx"],"sourcesContent":["'use client';\n\nimport { appLogger, getConfiguration } from '@intlayer/config/client';\nimport { DictionaryEditionDrawerController } from './DictionaryEditionDrawer/index';\nimport { DictionaryListDrawer } from './DictionaryListDrawer/index';\nimport { useIntlayerContext } from 'react-intlayer';\nimport { useContentSelectorContext } from 'react-intlayer/editor';\nimport { ContentSelectorWrapper } from './ContentSelectorWrapper';\nimport {\n type FC,\n type PropsWithChildren,\n createContext,\n useContext,\n useEffect,\n useMemo,\n} from 'react';\nimport { AsyncStateProvider } from '@intlayer/design-system/hooks';\n\ntype IntlayerEditorValue = {\n isEditorEnabled: boolean;\n};\n\n/**\n * Context that store the current locale on the client side\n */\nexport const IntlayerEditorContext = createContext<IntlayerEditorValue>({\n isEditorEnabled: false,\n});\n\n/**\n * Hook that provides the current locale\n */\nexport const useIntlayerEditorContext = () => useContext(IntlayerEditorContext);\n\nexport type IntlayerEditorProviderProps = PropsWithChildren<{\n isEnabled?: boolean;\n}>;\n\n/**\n * Provider that store the current locale on the client side\n */\nexport const IntlayerEditorProvider: FC<IntlayerEditorProviderProps> = ({\n children,\n isEnabled = true,\n}) => {\n const { editor, internationalization } = getConfiguration();\n\n const { setState } = useContentSelectorContext();\n\n const { locale, setLocale } = useIntlayerContext();\n\n const isEditorEnabled = useMemo(\n () =>\n Boolean(\n editor.enabled && editor.clientId && editor.clientSecret && isEnabled\n ),\n [editor.enabled && editor.clientId && editor.clientSecret && isEnabled]\n );\n\n useEffect(() => {\n setState({\n ContentSelectorWrapper,\n });\n }, [setState]);\n\n useEffect(() => {\n if (isEnabled && editor.enabled) {\n if (!editor.clientId) {\n appLogger(\n 'Editor is enabled but clientId is not set. Please set it in the editor configuration. See http://localhost:3000/doc/concept/editor.',\n {\n level: 'error',\n }\n );\n }\n\n if (!editor.clientSecret) {\n appLogger(\n 'Editor is enabled but clientSecret is not set. Please set it in the editor configuration. See http://localhost:3000/doc/concept/editor.',\n {\n level: 'error',\n }\n );\n }\n }\n }, [isEnabled, editor.enabled, editor.clientId, editor.clientSecret]);\n\n return (\n <IntlayerEditorContext.Provider value={{ isEditorEnabled }}>\n {children}\n\n {isEditorEnabled && (\n <AsyncStateProvider>\n <DictionaryEditionDrawerController\n locale={locale}\n localeList={internationalization.locales}\n setLocale={setLocale}\n />\n <DictionaryListDrawer />\n </AsyncStateProvider>\n )}\n </IntlayerEditorContext.Provider>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA4FQ;AA1FR,oBAA4C;AAC5C,qCAAkD;AAClD,kCAAqC;AACrC,4BAAmC;AACnC,oBAA0C;AAC1C,oCAAuC;AACvC,mBAOO;AACP,mBAAmC;AAS5B,MAAM,4BAAwB,4BAAmC;AAAA,EACtE,iBAAiB;AACnB,CAAC;AAKM,MAAM,2BAA2B,UAAM,yBAAW,qBAAqB;AASvE,MAAM,yBAA0D,CAAC;AAAA,EACtE;AAAA,EACA,YAAY;AACd,MAAM;AACJ,QAAM,EAAE,QAAQ,qBAAqB,QAAI,gCAAiB;AAE1D,QAAM,EAAE,SAAS,QAAI,yCAA0B;AAE/C,QAAM,EAAE,QAAQ,UAAU,QAAI,0CAAmB;AAEjD,QAAM,sBAAkB;AAAA,IACtB,MACE;AAAA,MACE,OAAO,WAAW,OAAO,YAAY,OAAO,gBAAgB;AAAA,IAC9D;AAAA,IACF,CAAC,OAAO,WAAW,OAAO,YAAY,OAAO,gBAAgB,SAAS;AAAA,EACxE;AAEA,8BAAU,MAAM;AACd,aAAS;AAAA,MACP;AAAA,IACF,CAAC;AAAA,EACH,GAAG,CAAC,QAAQ,CAAC;AAEb,8BAAU,MAAM;AACd,QAAI,aAAa,OAAO,SAAS;AAC/B,UAAI,CAAC,OAAO,UAAU;AACpB;AAAA,UACE;AAAA,UACA;AAAA,YACE,OAAO;AAAA,UACT;AAAA,QACF;AAAA,MACF;AAEA,UAAI,CAAC,OAAO,cAAc;AACxB;AAAA,UACE;AAAA,UACA;AAAA,YACE,OAAO;AAAA,UACT;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,EACF,GAAG,CAAC,WAAW,OAAO,SAAS,OAAO,UAAU,OAAO,YAAY,CAAC;AAEpE,SACE,6CAAC,sBAAsB,UAAtB,EAA+B,OAAO,EAAE,gBAAgB,GACtD;AAAA;AAAA,IAEA,mBACC,6CAAC,mCACC;AAAA;AAAA,QAAC;AAAA;AAAA,UACC;AAAA,UACA,YAAY,qBAAqB;AAAA,UACjC;AAAA;AAAA,MACF;AAAA,MACA,4CAAC,oDAAqB;AAAA,OACxB;AAAA,KAEJ;AAEJ;","names":[]}
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
} from "@intlayer/design-system";
|
|
12
12
|
import { useGetAllDictionaries } from "@intlayer/design-system/hooks";
|
|
13
13
|
import { useCallback, useEffect, useState } from "react";
|
|
14
|
-
import {
|
|
14
|
+
import { useDictionary } from "react-intlayer";
|
|
15
15
|
import { useShallow } from "zustand/shallow";
|
|
16
16
|
import { dictionaryListDrawerIdentifier } from '../DictionaryListDrawer/dictionaryListDrawerIdentifier.mjs';
|
|
17
17
|
import dictionaryEditionDrawerContent from './dictionaryEditionDrawer.content.mjs';
|
|
@@ -19,7 +19,8 @@ import {
|
|
|
19
19
|
useDictionaryEditionDrawer,
|
|
20
20
|
getDrawerIdentifier
|
|
21
21
|
} from './useDictionaryEditionDrawer.mjs';
|
|
22
|
-
const DictionaryEditionDrawerContent = ({ locale, identifier, handleOnBack, isDarkMode }) => {
|
|
22
|
+
const DictionaryEditionDrawerContent = ({ locale, localeList, identifier, handleOnBack, isDarkMode }) => {
|
|
23
|
+
const { modalTitle } = useDictionary(dictionaryEditionDrawerContent);
|
|
23
24
|
const [keyPathEditionModal, setKeyPathEditionModal] = useState(null);
|
|
24
25
|
const { setDictionariesRecord, focusedContent } = useDictionaryEditionDrawer(identifier);
|
|
25
26
|
const { all: dictionaries } = useGetAllDictionaries();
|
|
@@ -42,11 +43,7 @@ const DictionaryEditionDrawerContent = ({ locale, identifier, handleOnBack, isDa
|
|
|
42
43
|
isOpen: keyPathEditionModal !== null,
|
|
43
44
|
onClose: () => setKeyPathEditionModal(null),
|
|
44
45
|
hasCloseButton: true,
|
|
45
|
-
title:
|
|
46
|
-
en: "Edit field",
|
|
47
|
-
fr: "Modifier le champ",
|
|
48
|
-
es: "Editar campo"
|
|
49
|
-
}),
|
|
46
|
+
title: modalTitle,
|
|
50
47
|
size: "xl",
|
|
51
48
|
transparency: "lg",
|
|
52
49
|
children: dictionary && /* @__PURE__ */ jsx(
|
|
@@ -54,7 +51,8 @@ const DictionaryEditionDrawerContent = ({ locale, identifier, handleOnBack, isDa
|
|
|
54
51
|
{
|
|
55
52
|
dictionary,
|
|
56
53
|
onClickDictionaryList,
|
|
57
|
-
isDarkMode
|
|
54
|
+
isDarkMode,
|
|
55
|
+
availableLocales: localeList
|
|
58
56
|
}
|
|
59
57
|
)
|
|
60
58
|
}
|
|
@@ -110,7 +108,8 @@ const DictionaryEditionDrawer = ({
|
|
|
110
108
|
locale,
|
|
111
109
|
identifier: id,
|
|
112
110
|
handleOnBack,
|
|
113
|
-
isDarkMode
|
|
111
|
+
isDarkMode,
|
|
112
|
+
localeList
|
|
114
113
|
}
|
|
115
114
|
)
|
|
116
115
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/DictionaryEditionDrawer/DictionaryEditionDrawer.tsx"],"sourcesContent":["'use client';\n\nimport type { Locales } from '@intlayer/config/client';\nimport type { Dictionary, KeyPath } from '@intlayer/core';\nimport {\n RightDrawer,\n DictionaryEditor,\n LocaleSwitcher,\n Modal,\n useEditionPanelStore,\n DictionaryFieldEditor,\n useRightDrawerStore,\n} from '@intlayer/design-system';\nimport { useGetAllDictionaries } from '@intlayer/design-system/hooks';\nimport { useCallback, useEffect, useState, type FC } from 'react';\nimport { t, useDictionary } from 'react-intlayer';\nimport { useShallow } from 'zustand/shallow';\nimport { dictionaryListDrawerIdentifier } from '../DictionaryListDrawer/dictionaryListDrawerIdentifier';\nimport dictionaryEditionDrawerContent from './dictionaryEditionDrawer.content';\nimport {\n type FileContent as FileContentWithDictionaryPath,\n useDictionaryEditionDrawer,\n getDrawerIdentifier,\n} from './useDictionaryEditionDrawer';\n\ntype DictionaryEditionDrawerContentProps = {\n focusedContent: FileContentWithDictionaryPath;\n locale: Locales;\n identifier: string;\n handleOnBack: () => void;\n isDarkMode?: boolean;\n};\n\nexport const DictionaryEditionDrawerContent: FC<\n DictionaryEditionDrawerContentProps\n> = ({ locale, identifier, handleOnBack, isDarkMode }) => {\n const [keyPathEditionModal, setKeyPathEditionModal] = useState<\n KeyPath[] | null\n >(null);\n const { setDictionariesRecord, focusedContent } =\n useDictionaryEditionDrawer(identifier);\n const { all: dictionaries } = useGetAllDictionaries();\n\n const onClickDictionaryList = useCallback(() => {\n setKeyPathEditionModal(null);\n handleOnBack();\n }, [handleOnBack]);\n\n useEffect(() => {\n if (dictionaries) {\n setDictionariesRecord(dictionaries);\n }\n }, [setDictionariesRecord, dictionaries]);\n\n const dictionaryKey = focusedContent?.dictionaryKey;\n\n if (!dictionaryKey) return <>No dictionary focused</>;\n\n const dictionary: Dictionary = dictionaries[dictionaryKey];\n\n return (\n <>\n <Modal\n isOpen={keyPathEditionModal !== null}\n onClose={() => setKeyPathEditionModal(null)}\n hasCloseButton\n title={
|
|
1
|
+
{"version":3,"sources":["../../../src/DictionaryEditionDrawer/DictionaryEditionDrawer.tsx"],"sourcesContent":["'use client';\n\nimport type { Locales } from '@intlayer/config/client';\nimport type { Dictionary, KeyPath } from '@intlayer/core';\nimport {\n RightDrawer,\n DictionaryEditor,\n LocaleSwitcher,\n Modal,\n useEditionPanelStore,\n DictionaryFieldEditor,\n useRightDrawerStore,\n} from '@intlayer/design-system';\nimport { useGetAllDictionaries } from '@intlayer/design-system/hooks';\nimport { useCallback, useEffect, useState, type FC } from 'react';\nimport { t, useDictionary } from 'react-intlayer';\nimport { useShallow } from 'zustand/shallow';\nimport { dictionaryListDrawerIdentifier } from '../DictionaryListDrawer/dictionaryListDrawerIdentifier';\nimport dictionaryEditionDrawerContent from './dictionaryEditionDrawer.content';\nimport {\n type FileContent as FileContentWithDictionaryPath,\n useDictionaryEditionDrawer,\n getDrawerIdentifier,\n} from './useDictionaryEditionDrawer';\n\ntype DictionaryEditionDrawerContentProps = {\n focusedContent: FileContentWithDictionaryPath;\n locale: Locales;\n localeList: Locales[];\n identifier: string;\n handleOnBack: () => void;\n isDarkMode?: boolean;\n};\n\nexport const DictionaryEditionDrawerContent: FC<\n DictionaryEditionDrawerContentProps\n> = ({ locale, localeList, identifier, handleOnBack, isDarkMode }) => {\n const { modalTitle } = useDictionary(dictionaryEditionDrawerContent);\n const [keyPathEditionModal, setKeyPathEditionModal] = useState<\n KeyPath[] | null\n >(null);\n const { setDictionariesRecord, focusedContent } =\n useDictionaryEditionDrawer(identifier);\n const { all: dictionaries } = useGetAllDictionaries();\n\n const onClickDictionaryList = useCallback(() => {\n setKeyPathEditionModal(null);\n handleOnBack();\n }, [handleOnBack]);\n\n useEffect(() => {\n if (dictionaries) {\n setDictionariesRecord(dictionaries);\n }\n }, [setDictionariesRecord, dictionaries]);\n\n const dictionaryKey = focusedContent?.dictionaryKey;\n\n if (!dictionaryKey) return <>No dictionary focused</>;\n\n const dictionary: Dictionary = dictionaries[dictionaryKey];\n\n return (\n <>\n <Modal\n isOpen={keyPathEditionModal !== null}\n onClose={() => setKeyPathEditionModal(null)}\n hasCloseButton\n title={modalTitle}\n size=\"xl\"\n transparency=\"lg\"\n >\n {dictionary && (\n <DictionaryFieldEditor\n dictionary={dictionary}\n onClickDictionaryList={onClickDictionaryList}\n isDarkMode={isDarkMode}\n availableLocales={localeList}\n />\n )}\n </Modal>\n <DictionaryEditor\n dictionary={dictionary}\n locale={locale}\n onClickEdit={setKeyPathEditionModal}\n />\n </>\n );\n};\n\ntype DictionaryEditionDrawerProps = DictionaryEditionDrawerControllerProps & {\n dictionaryKey: string;\n isDarkMode?: boolean;\n};\n\nexport const DictionaryEditionDrawer: FC<DictionaryEditionDrawerProps> = ({\n locale,\n localeList,\n setLocale,\n dictionaryKey,\n isDarkMode,\n}) => {\n const { backButtonText } = useDictionary(dictionaryEditionDrawerContent);\n const id = getDrawerIdentifier(dictionaryKey);\n\n const { focusedContent, close } = useDictionaryEditionDrawer(dictionaryKey);\n const { openDictionaryListDrawer } = useRightDrawerStore((s) => ({\n openDictionaryListDrawer: () => s.open(dictionaryListDrawerIdentifier),\n }));\n\n const handleOnBack = () => {\n close();\n openDictionaryListDrawer();\n };\n\n return (\n <RightDrawer\n title={dictionaryKey}\n identifier={id}\n header={\n <LocaleSwitcher\n setLocale={setLocale}\n locale={locale}\n localeList={localeList}\n />\n }\n backButton={{\n onBack: handleOnBack,\n text: backButtonText,\n }}\n >\n {focusedContent && (\n <DictionaryEditionDrawerContent\n focusedContent={focusedContent}\n locale={locale}\n identifier={id}\n handleOnBack={handleOnBack}\n isDarkMode={isDarkMode}\n localeList={localeList}\n />\n )}\n </RightDrawer>\n );\n};\n\ntype DictionaryEditionDrawerControllerProps = {\n locale: Locales;\n localeList: Locales[];\n setLocale: (locale: Locales) => void;\n};\n\nexport const DictionaryEditionDrawerController: FC<\n DictionaryEditionDrawerControllerProps\n> = ({ locale, localeList, setLocale }) => {\n const focusedContent = useEditionPanelStore(\n useShallow((s) => s.focusedContent)\n );\n const dictionaryKey: string | undefined = focusedContent?.dictionaryKey;\n\n if (!dictionaryKey) {\n return <></>;\n }\n\n return (\n <DictionaryEditionDrawer\n locale={locale}\n localeList={localeList}\n setLocale={setLocale}\n dictionaryKey={dictionaryKey}\n />\n );\n};\n"],"mappings":";AA0D6B,wBAKzB,YALyB;AAtD7B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,6BAA6B;AACtC,SAAS,aAAa,WAAW,gBAAyB;AAC1D,SAAY,qBAAqB;AACjC,SAAS,kBAAkB;AAC3B,SAAS,sCAAsC;AAC/C,OAAO,oCAAoC;AAC3C;AAAA,EAEE;AAAA,EACA;AAAA,OACK;AAWA,MAAM,iCAET,CAAC,EAAE,QAAQ,YAAY,YAAY,cAAc,WAAW,MAAM;AACpE,QAAM,EAAE,WAAW,IAAI,cAAc,8BAA8B;AACnE,QAAM,CAAC,qBAAqB,sBAAsB,IAAI,SAEpD,IAAI;AACN,QAAM,EAAE,uBAAuB,eAAe,IAC5C,2BAA2B,UAAU;AACvC,QAAM,EAAE,KAAK,aAAa,IAAI,sBAAsB;AAEpD,QAAM,wBAAwB,YAAY,MAAM;AAC9C,2BAAuB,IAAI;AAC3B,iBAAa;AAAA,EACf,GAAG,CAAC,YAAY,CAAC;AAEjB,YAAU,MAAM;AACd,QAAI,cAAc;AAChB,4BAAsB,YAAY;AAAA,IACpC;AAAA,EACF,GAAG,CAAC,uBAAuB,YAAY,CAAC;AAExC,QAAM,gBAAgB,gBAAgB;AAEtC,MAAI,CAAC,cAAe,QAAO,gCAAE,mCAAqB;AAElD,QAAM,aAAyB,aAAa,aAAa;AAEzD,SACE,iCACE;AAAA;AAAA,MAAC;AAAA;AAAA,QACC,QAAQ,wBAAwB;AAAA,QAChC,SAAS,MAAM,uBAAuB,IAAI;AAAA,QAC1C,gBAAc;AAAA,QACd,OAAO;AAAA,QACP,MAAK;AAAA,QACL,cAAa;AAAA,QAEZ,wBACC;AAAA,UAAC;AAAA;AAAA,YACC;AAAA,YACA;AAAA,YACA;AAAA,YACA,kBAAkB;AAAA;AAAA,QACpB;AAAA;AAAA,IAEJ;AAAA,IACA;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA,aAAa;AAAA;AAAA,IACf;AAAA,KACF;AAEJ;AAOO,MAAM,0BAA4D,CAAC;AAAA,EACxE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,EAAE,eAAe,IAAI,cAAc,8BAA8B;AACvE,QAAM,KAAK,oBAAoB,aAAa;AAE5C,QAAM,EAAE,gBAAgB,MAAM,IAAI,2BAA2B,aAAa;AAC1E,QAAM,EAAE,yBAAyB,IAAI,oBAAoB,CAAC,OAAO;AAAA,IAC/D,0BAA0B,MAAM,EAAE,KAAK,8BAA8B;AAAA,EACvE,EAAE;AAEF,QAAM,eAAe,MAAM;AACzB,UAAM;AACN,6BAAyB;AAAA,EAC3B;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,OAAO;AAAA,MACP,YAAY;AAAA,MACZ,QACE;AAAA,QAAC;AAAA;AAAA,UACC;AAAA,UACA;AAAA,UACA;AAAA;AAAA,MACF;AAAA,MAEF,YAAY;AAAA,QACV,QAAQ;AAAA,QACR,MAAM;AAAA,MACR;AAAA,MAEC,4BACC;AAAA,QAAC;AAAA;AAAA,UACC;AAAA,UACA;AAAA,UACA,YAAY;AAAA,UACZ;AAAA,UACA;AAAA,UACA;AAAA;AAAA,MACF;AAAA;AAAA,EAEJ;AAEJ;AAQO,MAAM,oCAET,CAAC,EAAE,QAAQ,YAAY,UAAU,MAAM;AACzC,QAAM,iBAAiB;AAAA,IACrB,WAAW,CAAC,MAAM,EAAE,cAAc;AAAA,EACpC;AACA,QAAM,gBAAoC,gBAAgB;AAE1D,MAAI,CAAC,eAAe;AAClB,WAAO,gCAAE;AAAA,EACX;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAAA,EACF;AAEJ;","names":[]}
|
|
@@ -5,7 +5,47 @@ const dictionaryEditionDrawerContent = {
|
|
|
5
5
|
backButtonText: t({
|
|
6
6
|
en: "Dictionary list",
|
|
7
7
|
fr: "Liste des dictionnaires",
|
|
8
|
-
es: "Lista de diccionarios"
|
|
8
|
+
es: "Lista de diccionarios",
|
|
9
|
+
de: "W\xF6rterbuchliste",
|
|
10
|
+
ja: "\u8F9E\u66F8\u30EA\u30B9\u30C8",
|
|
11
|
+
ko: "\uC0AC\uC804 \uBAA9\uB85D",
|
|
12
|
+
zh: "\u8BCD\u5178\u5217\u8868",
|
|
13
|
+
it: "Elenco di dizionari",
|
|
14
|
+
pt: "Lista de dicion\xE1rios",
|
|
15
|
+
hi: "\u0936\u092C\u094D\u0926\u0915\u094B\u0936 \u0938\u0942\u091A\u0940",
|
|
16
|
+
ar: "\u0642\u0627\u0626\u0645\u0629 \u0627\u0644\u0642\u0648\u0627\u0645\u0644",
|
|
17
|
+
ru: "\u0421\u043F\u0438\u0441\u043E\u043A \u0441\u043B\u043E\u0432\u0430\u0440\u0435\u0439",
|
|
18
|
+
"en-GB": "Dictionary list"
|
|
19
|
+
}),
|
|
20
|
+
modalTitle: t({
|
|
21
|
+
en: "Edit dictionary",
|
|
22
|
+
fr: "Modifier le dictionnaire",
|
|
23
|
+
es: "Editar el diccionario",
|
|
24
|
+
de: "W\xF6rterbuch bearbeiten",
|
|
25
|
+
ja: "\u8F9E\u66F8\u3092\u7DE8\u96C6",
|
|
26
|
+
ko: "\uC0AC\uC804 \uD3B8\uC9D1",
|
|
27
|
+
zh: "\u7F16\u8F91\u8BCD\u5178",
|
|
28
|
+
it: "Modifica dizionario",
|
|
29
|
+
pt: "Editar dicion\xE1rio",
|
|
30
|
+
hi: "\u0936\u092C\u094D\u0926\u0915\u094B\u0936 \u0938\u0902\u092A\u093E\u0926\u093F\u0924 \u0915\u0930\u0947\u0902",
|
|
31
|
+
ar: "\u062A\u062D\u0631\u064A\u0631 \u0642\u0627\u0645\u0648\u0633",
|
|
32
|
+
ru: "\u0420\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0441\u043B\u043E\u0432\u0430\u0440\u044C",
|
|
33
|
+
"en-GB": "Edit dictionary"
|
|
34
|
+
}),
|
|
35
|
+
noDictionaryFocused: t({
|
|
36
|
+
en: "No dictionary focused",
|
|
37
|
+
fr: "Aucun dictionnaire s\xE9lectionn\xE9",
|
|
38
|
+
es: "No hay diccionario enfocado",
|
|
39
|
+
de: "Kein W\xF6rterbuch ausgew\xE4hlt",
|
|
40
|
+
ja: "\u30D5\u30A9\u30FC\u30AB\u30B9\u3055\u308C\u305F\u8F9E\u66F8\u304C\u3042\u308A\u307E\u305B\u3093",
|
|
41
|
+
ko: "\uD3EC\uCEE4\uC2A4\uAC00 \uC788\uB294 \uC0AC\uC804\uC774 \uC5C6\uC2B5\uB2C8\uB2E4",
|
|
42
|
+
zh: "\u6CA1\u6709\u805A\u7126\u7684\u8BCD\u5178",
|
|
43
|
+
it: "Nessun dizionario selezionato",
|
|
44
|
+
pt: "Nenhum dicion\xE1rio focalizado",
|
|
45
|
+
hi: "\u0915\u094B\u0908 \u092B\u094B\u0915\u0938 \u0936\u092C\u094D\u0926\u0915\u094B\u0936 \u0928\u0939\u0940\u0902 \u0939\u0948",
|
|
46
|
+
ar: "\u0644\u0627 \u064A\u0648\u062C\u062F \u0642\u0627\u0645\u0648\u0633 \u0645\u0631\u062A\u0628\u0637",
|
|
47
|
+
ru: "\u041D\u0435\u0442 \u0444\u043E\u043A\u0443\u0441\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u043E\u0433\u043E \u0441\u043B\u043E\u0432\u0430\u0440\u044F",
|
|
48
|
+
"en-GB": "No dictionary focused"
|
|
9
49
|
})
|
|
10
50
|
}
|
|
11
51
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/DictionaryEditionDrawer/dictionaryEditionDrawer.content.ts"],"sourcesContent":["import { t, type DeclarationContent } from 'intlayer';\n\nconst dictionaryEditionDrawerContent = {\n key: 'dictionary-edition-drawer',\n content: {\n backButtonText: t({\n en: 'Dictionary list',\n fr: 'Liste des dictionnaires',\n es: 'Lista de diccionarios',\n }),\n },\n} satisfies DeclarationContent;\n\nexport default dictionaryEditionDrawerContent;\n"],"mappings":"AAAA,SAAS,SAAkC;AAE3C,MAAM,iCAAiC;AAAA,EACrC,KAAK;AAAA,EACL,SAAS;AAAA,IACP,gBAAgB,EAAE;AAAA,MAChB,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,
|
|
1
|
+
{"version":3,"sources":["../../../src/DictionaryEditionDrawer/dictionaryEditionDrawer.content.ts"],"sourcesContent":["import { t, type DeclarationContent } from 'intlayer';\n\nconst dictionaryEditionDrawerContent = {\n key: 'dictionary-edition-drawer',\n content: {\n backButtonText: t({\n en: 'Dictionary list',\n fr: 'Liste des dictionnaires',\n es: 'Lista de diccionarios',\n de: 'Wörterbuchliste',\n ja: '辞書リスト',\n ko: '사전 목록',\n zh: '词典列表',\n it: 'Elenco di dizionari',\n pt: 'Lista de dicionários',\n hi: 'शब्दकोश सूची',\n ar: 'قائمة القوامل',\n ru: 'Список словарей',\n 'en-GB': 'Dictionary list',\n }),\n modalTitle: t({\n en: 'Edit dictionary',\n fr: 'Modifier le dictionnaire',\n es: 'Editar el diccionario',\n de: 'Wörterbuch bearbeiten',\n ja: '辞書を編集',\n ko: '사전 편집',\n zh: '编辑词典',\n it: 'Modifica dizionario',\n pt: 'Editar dicionário',\n hi: 'शब्दकोश संपादित करें',\n ar: 'تحرير قاموس',\n ru: 'Редактировать словарь',\n 'en-GB': 'Edit dictionary',\n }),\n noDictionaryFocused: t({\n en: 'No dictionary focused',\n fr: 'Aucun dictionnaire sélectionné',\n es: 'No hay diccionario enfocado',\n de: 'Kein Wörterbuch ausgewählt',\n ja: 'フォーカスされた辞書がありません',\n ko: '포커스가 있는 사전이 없습니다',\n zh: '没有聚焦的词典',\n it: 'Nessun dizionario selezionato',\n pt: 'Nenhum dicionário focalizado',\n hi: 'कोई फोकस शब्दकोश नहीं है',\n ar: 'لا يوجد قاموس مرتبط',\n ru: 'Нет фокусированного словаря',\n 'en-GB': 'No dictionary focused',\n }),\n },\n} satisfies DeclarationContent;\n\nexport default dictionaryEditionDrawerContent;\n"],"mappings":"AAAA,SAAS,SAAkC;AAE3C,MAAM,iCAAiC;AAAA,EACrC,KAAK;AAAA,EACL,SAAS;AAAA,IACP,gBAAgB,EAAE;AAAA,MAChB,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,SAAS;AAAA,IACX,CAAC;AAAA,IACD,YAAY,EAAE;AAAA,MACZ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,SAAS;AAAA,IACX,CAAC;AAAA,IACD,qBAAqB,EAAE;AAAA,MACrB,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,SAAS;AAAA,IACX,CAAC;AAAA,EACH;AACF;AAEA,IAAO,0CAAQ;","names":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { appLogger, getConfiguration } from "@intlayer/config/client";
|
|
4
4
|
import { DictionaryEditionDrawerController } from './DictionaryEditionDrawer/index.mjs';
|
|
5
5
|
import { DictionaryListDrawer } from './DictionaryListDrawer/index.mjs';
|
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
useEffect,
|
|
13
13
|
useMemo
|
|
14
14
|
} from "react";
|
|
15
|
+
import { AsyncStateProvider } from "@intlayer/design-system/hooks";
|
|
15
16
|
const IntlayerEditorContext = createContext({
|
|
16
17
|
isEditorEnabled: false
|
|
17
18
|
});
|
|
@@ -56,7 +57,7 @@ const IntlayerEditorProvider = ({
|
|
|
56
57
|
}, [isEnabled, editor.enabled, editor.clientId, editor.clientSecret]);
|
|
57
58
|
return /* @__PURE__ */ jsxs(IntlayerEditorContext.Provider, { value: { isEditorEnabled }, children: [
|
|
58
59
|
children,
|
|
59
|
-
isEditorEnabled && /* @__PURE__ */ jsxs(
|
|
60
|
+
isEditorEnabled && /* @__PURE__ */ jsxs(AsyncStateProvider, { children: [
|
|
60
61
|
/* @__PURE__ */ jsx(
|
|
61
62
|
DictionaryEditionDrawerController,
|
|
62
63
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/IntlayerEditorProvider.tsx"],"sourcesContent":["'use client';\n\nimport { appLogger, getConfiguration } from '@intlayer/config/client';\nimport { DictionaryEditionDrawerController } from './DictionaryEditionDrawer/index';\nimport { DictionaryListDrawer } from './DictionaryListDrawer/index';\nimport { useIntlayerContext } from 'react-intlayer';\nimport { useContentSelectorContext } from 'react-intlayer/editor';\nimport { ContentSelectorWrapper } from './ContentSelectorWrapper';\nimport {\n type FC,\n type PropsWithChildren,\n createContext,\n useContext,\n useEffect,\n useMemo,\n} from 'react';\n\ntype IntlayerEditorValue = {\n isEditorEnabled: boolean;\n};\n\n/**\n * Context that store the current locale on the client side\n */\nexport const IntlayerEditorContext = createContext<IntlayerEditorValue>({\n isEditorEnabled: false,\n});\n\n/**\n * Hook that provides the current locale\n */\nexport const useIntlayerEditorContext = () => useContext(IntlayerEditorContext);\n\nexport type IntlayerEditorProviderProps = PropsWithChildren<{\n isEnabled?: boolean;\n}>;\n\n/**\n * Provider that store the current locale on the client side\n */\nexport const IntlayerEditorProvider: FC<IntlayerEditorProviderProps> = ({\n children,\n isEnabled = true,\n}) => {\n const { editor, internationalization } = getConfiguration();\n\n const { setState } = useContentSelectorContext();\n\n const { locale, setLocale } = useIntlayerContext();\n\n const isEditorEnabled = useMemo(\n () =>\n Boolean(\n editor.enabled && editor.clientId && editor.clientSecret && isEnabled\n ),\n [editor.enabled && editor.clientId && editor.clientSecret && isEnabled]\n );\n\n useEffect(() => {\n setState({\n ContentSelectorWrapper,\n });\n }, [setState]);\n\n useEffect(() => {\n if (isEnabled && editor.enabled) {\n if (!editor.clientId) {\n appLogger(\n 'Editor is enabled but clientId is not set. Please set it in the editor configuration. See http://localhost:3000/doc/concept/editor.',\n {\n level: 'error',\n }\n );\n }\n\n if (!editor.clientSecret) {\n appLogger(\n 'Editor is enabled but clientSecret is not set. Please set it in the editor configuration. See http://localhost:3000/doc/concept/editor.',\n {\n level: 'error',\n }\n );\n }\n }\n }, [isEnabled, editor.enabled, editor.clientId, editor.clientSecret]);\n\n return (\n <IntlayerEditorContext.Provider value={{ isEditorEnabled }}>\n {children}\n\n {isEditorEnabled && (\n
|
|
1
|
+
{"version":3,"sources":["../../src/IntlayerEditorProvider.tsx"],"sourcesContent":["'use client';\n\nimport { appLogger, getConfiguration } from '@intlayer/config/client';\nimport { DictionaryEditionDrawerController } from './DictionaryEditionDrawer/index';\nimport { DictionaryListDrawer } from './DictionaryListDrawer/index';\nimport { useIntlayerContext } from 'react-intlayer';\nimport { useContentSelectorContext } from 'react-intlayer/editor';\nimport { ContentSelectorWrapper } from './ContentSelectorWrapper';\nimport {\n type FC,\n type PropsWithChildren,\n createContext,\n useContext,\n useEffect,\n useMemo,\n} from 'react';\nimport { AsyncStateProvider } from '@intlayer/design-system/hooks';\n\ntype IntlayerEditorValue = {\n isEditorEnabled: boolean;\n};\n\n/**\n * Context that store the current locale on the client side\n */\nexport const IntlayerEditorContext = createContext<IntlayerEditorValue>({\n isEditorEnabled: false,\n});\n\n/**\n * Hook that provides the current locale\n */\nexport const useIntlayerEditorContext = () => useContext(IntlayerEditorContext);\n\nexport type IntlayerEditorProviderProps = PropsWithChildren<{\n isEnabled?: boolean;\n}>;\n\n/**\n * Provider that store the current locale on the client side\n */\nexport const IntlayerEditorProvider: FC<IntlayerEditorProviderProps> = ({\n children,\n isEnabled = true,\n}) => {\n const { editor, internationalization } = getConfiguration();\n\n const { setState } = useContentSelectorContext();\n\n const { locale, setLocale } = useIntlayerContext();\n\n const isEditorEnabled = useMemo(\n () =>\n Boolean(\n editor.enabled && editor.clientId && editor.clientSecret && isEnabled\n ),\n [editor.enabled && editor.clientId && editor.clientSecret && isEnabled]\n );\n\n useEffect(() => {\n setState({\n ContentSelectorWrapper,\n });\n }, [setState]);\n\n useEffect(() => {\n if (isEnabled && editor.enabled) {\n if (!editor.clientId) {\n appLogger(\n 'Editor is enabled but clientId is not set. Please set it in the editor configuration. See http://localhost:3000/doc/concept/editor.',\n {\n level: 'error',\n }\n );\n }\n\n if (!editor.clientSecret) {\n appLogger(\n 'Editor is enabled but clientSecret is not set. Please set it in the editor configuration. See http://localhost:3000/doc/concept/editor.',\n {\n level: 'error',\n }\n );\n }\n }\n }, [isEnabled, editor.enabled, editor.clientId, editor.clientSecret]);\n\n return (\n <IntlayerEditorContext.Provider value={{ isEditorEnabled }}>\n {children}\n\n {isEditorEnabled && (\n <AsyncStateProvider>\n <DictionaryEditionDrawerController\n locale={locale}\n localeList={internationalization.locales}\n setLocale={setLocale}\n />\n <DictionaryListDrawer />\n </AsyncStateProvider>\n )}\n </IntlayerEditorContext.Provider>\n );\n};\n"],"mappings":";AA4FQ,SACE,KADF;AA1FR,SAAS,WAAW,wBAAwB;AAC5C,SAAS,yCAAyC;AAClD,SAAS,4BAA4B;AACrC,SAAS,0BAA0B;AACnC,SAAS,iCAAiC;AAC1C,SAAS,8BAA8B;AACvC;AAAA,EAGE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,0BAA0B;AAS5B,MAAM,wBAAwB,cAAmC;AAAA,EACtE,iBAAiB;AACnB,CAAC;AAKM,MAAM,2BAA2B,MAAM,WAAW,qBAAqB;AASvE,MAAM,yBAA0D,CAAC;AAAA,EACtE;AAAA,EACA,YAAY;AACd,MAAM;AACJ,QAAM,EAAE,QAAQ,qBAAqB,IAAI,iBAAiB;AAE1D,QAAM,EAAE,SAAS,IAAI,0BAA0B;AAE/C,QAAM,EAAE,QAAQ,UAAU,IAAI,mBAAmB;AAEjD,QAAM,kBAAkB;AAAA,IACtB,MACE;AAAA,MACE,OAAO,WAAW,OAAO,YAAY,OAAO,gBAAgB;AAAA,IAC9D;AAAA,IACF,CAAC,OAAO,WAAW,OAAO,YAAY,OAAO,gBAAgB,SAAS;AAAA,EACxE;AAEA,YAAU,MAAM;AACd,aAAS;AAAA,MACP;AAAA,IACF,CAAC;AAAA,EACH,GAAG,CAAC,QAAQ,CAAC;AAEb,YAAU,MAAM;AACd,QAAI,aAAa,OAAO,SAAS;AAC/B,UAAI,CAAC,OAAO,UAAU;AACpB;AAAA,UACE;AAAA,UACA;AAAA,YACE,OAAO;AAAA,UACT;AAAA,QACF;AAAA,MACF;AAEA,UAAI,CAAC,OAAO,cAAc;AACxB;AAAA,UACE;AAAA,UACA;AAAA,YACE,OAAO;AAAA,UACT;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,EACF,GAAG,CAAC,WAAW,OAAO,SAAS,OAAO,UAAU,OAAO,YAAY,CAAC;AAEpE,SACE,qBAAC,sBAAsB,UAAtB,EAA+B,OAAO,EAAE,gBAAgB,GACtD;AAAA;AAAA,IAEA,mBACC,qBAAC,sBACC;AAAA;AAAA,QAAC;AAAA;AAAA,UACC;AAAA,UACA,YAAY,qBAAqB;AAAA,UACjC;AAAA;AAAA,MACF;AAAA,MACA,oBAAC,wBAAqB;AAAA,OACxB;AAAA,KAEJ;AAEJ;","names":[]}
|
|
@@ -4,6 +4,7 @@ import { type FileContent as FileContentWithDictionaryPath } from './useDictiona
|
|
|
4
4
|
type DictionaryEditionDrawerContentProps = {
|
|
5
5
|
focusedContent: FileContentWithDictionaryPath;
|
|
6
6
|
locale: Locales;
|
|
7
|
+
localeList: Locales[];
|
|
7
8
|
identifier: string;
|
|
8
9
|
handleOnBack: () => void;
|
|
9
10
|
isDarkMode?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DictionaryEditionDrawer.d.ts","sourceRoot":"","sources":["../../../src/DictionaryEditionDrawer/DictionaryEditionDrawer.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAYvD,OAAO,EAAoC,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAKlE,OAAO,EACL,KAAK,WAAW,IAAI,6BAA6B,EAGlD,MAAM,8BAA8B,CAAC;AAEtC,KAAK,mCAAmC,GAAG;IACzC,cAAc,EAAE,6BAA6B,CAAC;IAC9C,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,8BAA8B,EAAE,EAAE,CAC7C,mCAAmC,
|
|
1
|
+
{"version":3,"file":"DictionaryEditionDrawer.d.ts","sourceRoot":"","sources":["../../../src/DictionaryEditionDrawer/DictionaryEditionDrawer.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAYvD,OAAO,EAAoC,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAKlE,OAAO,EACL,KAAK,WAAW,IAAI,6BAA6B,EAGlD,MAAM,8BAA8B,CAAC;AAEtC,KAAK,mCAAmC,GAAG;IACzC,cAAc,EAAE,6BAA6B,CAAC;IAC9C,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,OAAO,EAAE,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,8BAA8B,EAAE,EAAE,CAC7C,mCAAmC,CAqDpC,CAAC;AAEF,KAAK,4BAA4B,GAAG,sCAAsC,GAAG;IAC3E,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,EAAE,CAAC,4BAA4B,CAgDpE,CAAC;AAEF,KAAK,sCAAsC,GAAG;IAC5C,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,OAAO,EAAE,CAAC;IACtB,SAAS,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;CACtC,CAAC;AAEF,eAAO,MAAM,iCAAiC,EAAE,EAAE,CAChD,sCAAsC,CAmBvC,CAAC"}
|
|
@@ -2,6 +2,8 @@ declare const dictionaryEditionDrawerContent: {
|
|
|
2
2
|
key: string;
|
|
3
3
|
content: {
|
|
4
4
|
backButtonText: import("@intlayer/core").TranslationContent<string>;
|
|
5
|
+
modalTitle: import("@intlayer/core").TranslationContent<string>;
|
|
6
|
+
noDictionaryFocused: import("@intlayer/core").TranslationContent<string>;
|
|
5
7
|
};
|
|
6
8
|
};
|
|
7
9
|
export default dictionaryEditionDrawerContent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dictionaryEditionDrawer.content.d.ts","sourceRoot":"","sources":["../../../src/DictionaryEditionDrawer/dictionaryEditionDrawer.content.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,8BAA8B
|
|
1
|
+
{"version":3,"file":"dictionaryEditionDrawer.content.d.ts","sourceRoot":"","sources":["../../../src/DictionaryEditionDrawer/dictionaryEditionDrawer.content.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,8BAA8B;;;;;;;CAiDN,CAAC;AAE/B,eAAe,8BAA8B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IntlayerEditorProvider.d.ts","sourceRoot":"","sources":["../../src/IntlayerEditorProvider.tsx"],"names":[],"mappings":"AAQA,OAAO,EACL,KAAK,EAAE,EACP,KAAK,iBAAiB,EAKvB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"IntlayerEditorProvider.d.ts","sourceRoot":"","sources":["../../src/IntlayerEditorProvider.tsx"],"names":[],"mappings":"AAQA,OAAO,EACL,KAAK,EAAE,EACP,KAAK,iBAAiB,EAKvB,MAAM,OAAO,CAAC;AAGf,KAAK,mBAAmB,GAAG;IACzB,eAAe,EAAE,OAAO,CAAC;CAC1B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,qBAAqB,8CAEhC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,wBAAwB,2BAA0C,CAAC;AAEhF,MAAM,MAAM,2BAA2B,GAAG,iBAAiB,CAAC;IAC1D,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,sBAAsB,EAAE,EAAE,CAAC,2BAA2B,CA8DlE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "intlayer-editor",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.6",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "IntLayer Editor is a tool that allow you to edit your IntLayer declaration files using a graphical interface.",
|
|
6
6
|
"keywords": [
|
|
@@ -74,10 +74,10 @@
|
|
|
74
74
|
"react": "^18.3.1",
|
|
75
75
|
"react-dom": "^18.3.1",
|
|
76
76
|
"zustand": "^5.0.1",
|
|
77
|
-
"@intlayer/config": "^3.5.
|
|
78
|
-
"intlayer": "^3.5.
|
|
79
|
-
"@intlayer/
|
|
80
|
-
"
|
|
77
|
+
"@intlayer/config": "^3.5.6",
|
|
78
|
+
"@intlayer/core": "^3.5.6",
|
|
79
|
+
"@intlayer/design-system": "^3.5.6",
|
|
80
|
+
"intlayer": "^3.5.6"
|
|
81
81
|
},
|
|
82
82
|
"devDependencies": {
|
|
83
83
|
"@babel/generator": "7.26.2",
|
|
@@ -98,17 +98,17 @@
|
|
|
98
98
|
"tsc-alias": "^1.8.10",
|
|
99
99
|
"tsup": "^8.3.5",
|
|
100
100
|
"typescript": "^5.7.2",
|
|
101
|
-
"@utils/eslint-config": "^1.0.4",
|
|
102
101
|
"@utils/ts-config": "^1.0.4",
|
|
102
|
+
"@utils/eslint-config": "^1.0.4",
|
|
103
103
|
"@utils/ts-config-types": "^1.0.4",
|
|
104
104
|
"@utils/tsup-config": "^1.0.4"
|
|
105
105
|
},
|
|
106
106
|
"peerDependencies": {
|
|
107
|
-
"@intlayer/
|
|
108
|
-
"@intlayer/
|
|
109
|
-
"
|
|
110
|
-
"intlayer": "^3.5.
|
|
111
|
-
"react-intlayer": "^3.5.
|
|
107
|
+
"@intlayer/core": "^3.5.6",
|
|
108
|
+
"@intlayer/config": "^3.5.6",
|
|
109
|
+
"intlayer": "^3.5.6",
|
|
110
|
+
"@intlayer/design-system": "^3.5.6",
|
|
111
|
+
"react-intlayer": "^3.5.6"
|
|
112
112
|
},
|
|
113
113
|
"engines": {
|
|
114
114
|
"node": ">=14.18"
|