@intlayer/design-system 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/.vite/manifest.json +241 -17
- package/dist/CodeBlockShiki-BlmZyrr7.cjs +29 -0
- package/dist/CodeBlockShiki-BlmZyrr7.cjs.map +1 -0
- package/dist/CodeBlockShiki-CcpV9SVi.js +29 -0
- package/dist/CodeBlockShiki-CcpV9SVi.js.map +1 -0
- package/dist/Form-BB0kpER9.cjs +301 -0
- package/dist/Form-BB0kpER9.cjs.map +1 -0
- package/dist/Form-BDcoNTLV.cjs.map +1 -1
- package/dist/Form-DGLgTAdY.js +302 -0
- package/dist/Form-DGLgTAdY.js.map +1 -0
- package/dist/Form-DhsgC7kB.js.map +1 -1
- package/dist/components/Auth/SignUpForm/signUpForm.content.d.ts +11 -11
- package/dist/components/Breadcrumb/index.cjs +5 -2
- package/dist/components/Breadcrumb/index.cjs.map +1 -1
- package/dist/components/Breadcrumb/index.d.ts.map +1 -1
- package/dist/components/Breadcrumb/index.mjs +5 -2
- package/dist/components/Breadcrumb/index.mjs.map +1 -1
- package/dist/components/ClickOutsideDiv/index.cjs +26 -0
- package/dist/components/ClickOutsideDiv/index.cjs.map +1 -0
- package/dist/components/ClickOutsideDiv/index.d.ts +6 -0
- package/dist/components/ClickOutsideDiv/index.d.ts.map +1 -0
- package/dist/components/ClickOutsideDiv/index.mjs +26 -0
- package/dist/components/ClickOutsideDiv/index.mjs.map +1 -0
- package/dist/components/ContentEditor/ContentEditorCode.cjs +78 -0
- package/dist/components/ContentEditor/ContentEditorCode.cjs.map +1 -0
- package/dist/components/ContentEditor/ContentEditorCode.d.ts +11 -0
- package/dist/components/ContentEditor/ContentEditorCode.d.ts.map +1 -0
- package/dist/components/ContentEditor/ContentEditorCode.mjs +78 -0
- package/dist/components/ContentEditor/ContentEditorCode.mjs.map +1 -0
- package/dist/components/ContentEditor/ContentEditorTextArea.cjs +30 -26
- package/dist/components/ContentEditor/ContentEditorTextArea.cjs.map +1 -1
- package/dist/components/ContentEditor/ContentEditorTextArea.d.ts +2 -1
- package/dist/components/ContentEditor/ContentEditorTextArea.d.ts.map +1 -1
- package/dist/components/ContentEditor/ContentEditorTextArea.mjs +30 -26
- package/dist/components/ContentEditor/ContentEditorTextArea.mjs.map +1 -1
- package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.cjs +3 -3
- package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.cjs.map +1 -1
- package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.mjs +3 -3
- package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.cjs +4 -2
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.d.ts +2 -0
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.mjs +4 -2
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.cjs +161 -69
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs +163 -71
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.cjs +123 -0
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.d.ts +14 -0
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.mjs +123 -0
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.cjs +9 -2
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.cjs +15 -0
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.d.ts +1 -0
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.mjs +15 -0
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.d.ts +6 -0
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.mjs +9 -2
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.cjs +12 -4
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.d.ts +2 -0
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs +12 -4
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/EditorView/EditorView.cjs +7 -5
- package/dist/components/DictionaryFieldEditor/EditorView/EditorView.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/EditorView/EditorView.d.ts +2 -0
- package/dist/components/DictionaryFieldEditor/EditorView/EditorView.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/EditorView/EditorView.mjs +7 -5
- package/dist/components/DictionaryFieldEditor/EditorView/EditorView.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.cjs +117 -55
- package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.d.ts +4 -2
- package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.mjs +115 -53
- package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/LocaleSelector/LocaleSelector.d.ts +8 -0
- package/dist/components/DictionaryFieldEditor/LocaleSelector/LocaleSelector.d.ts.map +1 -0
- package/dist/components/DictionaryFieldEditor/LocaleSelector/LocaleSelectorContext.d.ts +13 -0
- package/dist/components/DictionaryFieldEditor/LocaleSelector/LocaleSelectorContext.d.ts.map +1 -0
- package/dist/components/DictionaryFieldEditor/LocaleSelector/localeSelector.content.d.ts +9 -0
- package/dist/components/DictionaryFieldEditor/LocaleSelector/localeSelector.content.d.ts.map +1 -0
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.cjs +10 -10
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.mjs +10 -10
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NodeEditor.cjs +23 -10
- package/dist/components/DictionaryFieldEditor/NodeEditor.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NodeEditor.d.ts +2 -0
- package/dist/components/DictionaryFieldEditor/NodeEditor.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/NodeEditor.mjs +23 -10
- package/dist/components/DictionaryFieldEditor/NodeEditor.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NodeTypeSelector.cjs +1 -1
- package/dist/components/DictionaryFieldEditor/NodeTypeSelector.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NodeTypeSelector.mjs +1 -1
- package/dist/components/DictionaryFieldEditor/NodeTypeSelector.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs +2 -4
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs +3 -5
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.cjs +13 -13
- package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.mjs +13 -13
- package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.cjs +73 -0
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.cjs.map +1 -0
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.d.ts +7 -0
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.d.ts.map +1 -0
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.mjs +73 -0
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.mjs.map +1 -0
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcherContext.cjs +37 -0
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcherContext.cjs.map +1 -0
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcherContext.d.ts +14 -0
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcherContext.d.ts.map +1 -0
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcherContext.mjs +37 -0
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcherContext.mjs.map +1 -0
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/index.cjs +8 -0
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/index.cjs.map +1 -0
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/index.d.ts +3 -0
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/index.d.ts.map +1 -0
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/index.mjs +8 -0
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/index.mjs.map +1 -0
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/versionSwitcherDropDown.content.cjs +54 -0
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/versionSwitcherDropDown.content.cjs.map +1 -0
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/versionSwitcherDropDown.content.d.ts +10 -0
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/versionSwitcherDropDown.content.d.ts.map +1 -0
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/versionSwitcherDropDown.content.mjs +55 -0
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/versionSwitcherDropDown.content.mjs.map +1 -0
- package/dist/components/DictionaryFieldEditor/index.cjs +5 -0
- package/dist/components/DictionaryFieldEditor/index.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/index.d.ts +1 -0
- package/dist/components/DictionaryFieldEditor/index.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/index.mjs +6 -1
- package/dist/components/DictionaryFieldEditor/index.mjs.map +1 -1
- package/dist/components/EditableField/EditableFieldInput.cjs +5 -1
- package/dist/components/EditableField/EditableFieldInput.cjs.map +1 -1
- package/dist/components/EditableField/EditableFieldInput.d.ts.map +1 -1
- package/dist/components/EditableField/EditableFieldInput.mjs +6 -2
- package/dist/components/EditableField/EditableFieldInput.mjs.map +1 -1
- package/dist/components/EditableField/EditableFieldTextArea.cjs +2 -8
- package/dist/components/EditableField/EditableFieldTextArea.cjs.map +1 -1
- package/dist/components/EditableField/EditableFieldTextArea.d.ts.map +1 -1
- package/dist/components/EditableField/EditableFieldTextArea.mjs +2 -8
- package/dist/components/EditableField/EditableFieldTextArea.mjs.map +1 -1
- package/dist/components/Form/FormLabel.cjs +6 -2
- package/dist/components/Form/FormLabel.cjs.map +1 -1
- package/dist/components/Form/FormLabel.d.ts.map +1 -1
- package/dist/components/Form/FormLabel.mjs +6 -2
- package/dist/components/Form/FormLabel.mjs.map +1 -1
- package/dist/components/Form/elements/EditableFieldInputElement.d.ts +1 -1
- package/dist/components/Form/elements/EditableFieldInputElement.d.ts.map +1 -1
- package/dist/components/Form/elements/EditableFieldTextAreaElement.d.ts +1 -1
- package/dist/components/Form/elements/EditableFieldTextAreaElement.d.ts.map +1 -1
- package/dist/components/Form/elements/SelectElement.d.ts.map +1 -1
- package/dist/components/IDE/Code.cjs +77 -0
- package/dist/components/IDE/Code.cjs.map +1 -0
- package/dist/components/IDE/Code.d.ts +18 -0
- package/dist/components/IDE/Code.d.ts.map +1 -0
- package/dist/components/IDE/Code.mjs +77 -0
- package/dist/components/IDE/Code.mjs.map +1 -0
- package/dist/components/IDE/CodeBlock.cjs +54 -0
- package/dist/components/IDE/CodeBlock.cjs.map +1 -0
- package/dist/components/IDE/CodeBlock.d.ts +12 -0
- package/dist/components/IDE/CodeBlock.d.ts.map +1 -0
- package/dist/components/IDE/CodeBlock.mjs +54 -0
- package/dist/components/IDE/CodeBlock.mjs.map +1 -0
- package/dist/components/IDE/CodeBlockClient.cjs +55 -0
- package/dist/components/IDE/CodeBlockClient.cjs.map +1 -0
- package/dist/components/IDE/CodeBlockClient.mjs +55 -0
- package/dist/components/IDE/CodeBlockClient.mjs.map +1 -0
- package/dist/components/IDE/CodeBlockLoader.cjs +28 -0
- package/dist/components/IDE/CodeBlockLoader.cjs.map +1 -0
- package/dist/components/IDE/CodeBlockLoader.d.ts +4 -0
- package/dist/components/IDE/CodeBlockLoader.d.ts.map +1 -0
- package/dist/components/IDE/CodeBlockLoader.mjs +28 -0
- package/dist/components/IDE/CodeBlockLoader.mjs.map +1 -0
- package/dist/components/IDE/CodeBlockServer.cjs +53 -0
- package/dist/components/IDE/CodeBlockServer.cjs.map +1 -0
- package/dist/components/IDE/CodeBlockServer.d.ts +12 -0
- package/dist/components/IDE/CodeBlockServer.d.ts.map +1 -0
- package/dist/components/IDE/CodeBlockServer.mjs +53 -0
- package/dist/components/IDE/CodeBlockServer.mjs.map +1 -0
- package/dist/components/IDE/CodeBlockShiki.d.ts +3 -0
- package/dist/components/IDE/CodeBlockShiki.d.ts.map +1 -0
- package/dist/components/IDE/CodeBlockclient.d.ts +12 -0
- package/dist/components/IDE/CodeBlockclient.d.ts.map +1 -0
- package/dist/components/IDE/CodeConditionalRenderer.cjs +20 -0
- package/dist/components/IDE/CodeConditionalRenderer.cjs.map +1 -0
- package/dist/components/IDE/CodeConditionalRenderer.d.ts +4 -0
- package/dist/components/IDE/CodeConditionalRenderer.d.ts.map +1 -0
- package/dist/components/IDE/CodeConditionalRenderer.mjs +20 -0
- package/dist/components/IDE/CodeConditionalRenderer.mjs.map +1 -0
- package/dist/components/IDE/CodeContext.cjs +57 -0
- package/dist/components/IDE/CodeContext.cjs.map +1 -0
- package/dist/components/IDE/CodeContext.d.ts +26 -0
- package/dist/components/IDE/CodeContext.d.ts.map +1 -0
- package/dist/components/IDE/CodeContext.mjs +57 -0
- package/dist/components/IDE/CodeContext.mjs.map +1 -0
- package/dist/components/IDE/CodeFormatSelector.cjs +30 -0
- package/dist/components/IDE/CodeFormatSelector.cjs.map +1 -0
- package/dist/components/IDE/CodeFormatSelector.d.ts +3 -0
- package/dist/components/IDE/CodeFormatSelector.d.ts.map +1 -0
- package/dist/components/IDE/CodeFormatSelector.mjs +30 -0
- package/dist/components/IDE/CodeFormatSelector.mjs.map +1 -0
- package/dist/components/IDE/CodeRenderer.cjs +27 -0
- package/dist/components/IDE/CodeRenderer.cjs.map +1 -0
- package/dist/components/IDE/CodeRenderer.d.ts +5 -0
- package/dist/components/IDE/CodeRenderer.d.ts.map +1 -0
- package/dist/components/IDE/CodeRenderer.mjs +27 -0
- package/dist/components/IDE/CodeRenderer.mjs.map +1 -0
- package/dist/components/IDE/ContentDeclarationFormatSelector.cjs +28 -0
- package/dist/components/IDE/ContentDeclarationFormatSelector.cjs.map +1 -0
- package/dist/components/IDE/ContentDeclarationFormatSelector.d.ts +3 -0
- package/dist/components/IDE/ContentDeclarationFormatSelector.d.ts.map +1 -0
- package/dist/components/IDE/ContentDeclarationFormatSelector.mjs +28 -0
- package/dist/components/IDE/ContentDeclarationFormatSelector.mjs.map +1 -0
- package/dist/components/IDE/EditableCodeBlock.d.ts +9 -0
- package/dist/components/IDE/EditableCodeBlock.d.ts.map +1 -0
- package/dist/components/IDE/MarkDownRender.cjs +2 -3
- package/dist/components/IDE/MarkDownRender.cjs.map +1 -1
- package/dist/components/IDE/MarkDownRender.d.ts.map +1 -1
- package/dist/components/IDE/MarkDownRender.mjs +1 -2
- package/dist/components/IDE/MarkDownRender.mjs.map +1 -1
- package/dist/components/IDE/PackageManagerSelector.cjs +20 -0
- package/dist/components/IDE/PackageManagerSelector.cjs.map +1 -0
- package/dist/components/IDE/PackageManagerSelector.d.ts +3 -0
- package/dist/components/IDE/PackageManagerSelector.d.ts.map +1 -0
- package/dist/components/IDE/PackageManagerSelector.mjs +20 -0
- package/dist/components/IDE/PackageManagerSelector.mjs.map +1 -0
- package/dist/components/IDE/index.cjs +2 -2
- package/dist/components/IDE/index.d.ts +1 -1
- package/dist/components/IDE/index.d.ts.map +1 -1
- package/dist/components/IDE/index.mjs +1 -1
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSelectorContext.d.ts +13 -0
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSelectorContext.d.ts.map +1 -0
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.cjs +218 -0
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.cjs.map +1 -0
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.d.ts +8 -0
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.d.ts.map +1 -0
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.mjs +218 -0
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.mjs.map +1 -0
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.cjs +42 -0
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.cjs.map +1 -0
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.d.ts +15 -0
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.d.ts.map +1 -0
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.mjs +42 -0
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.mjs.map +1 -0
- package/dist/components/LocaleSwitcherContentDropDown/index.cjs +8 -0
- package/dist/components/LocaleSwitcherContentDropDown/index.cjs.map +1 -0
- package/dist/components/LocaleSwitcherContentDropDown/index.d.ts +3 -0
- package/dist/components/LocaleSwitcherContentDropDown/index.d.ts.map +1 -0
- package/dist/components/LocaleSwitcherContentDropDown/index.mjs +8 -0
- package/dist/components/LocaleSwitcherContentDropDown/index.mjs.map +1 -0
- package/dist/components/LocaleSwitcherContentDropDown/localeSwitcher.content.cjs +118 -0
- package/dist/components/LocaleSwitcherContentDropDown/localeSwitcher.content.cjs.map +1 -0
- package/dist/components/LocaleSwitcherContentDropDown/localeSwitcher.content.d.ts +18 -0
- package/dist/components/LocaleSwitcherContentDropDown/localeSwitcher.content.d.ts.map +1 -0
- package/dist/components/LocaleSwitcherContentDropDown/localeSwitcher.content.mjs +119 -0
- package/dist/components/LocaleSwitcherContentDropDown/localeSwitcher.content.mjs.map +1 -0
- package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.cjs +14 -22
- package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.cjs.map +1 -1
- package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.d.ts.map +1 -1
- package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.mjs +14 -22
- package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.mjs.map +1 -1
- package/dist/components/MarkDownRender/index.cjs +20 -26
- package/dist/components/MarkDownRender/index.cjs.map +1 -1
- package/dist/components/MarkDownRender/index.d.ts +2 -0
- package/dist/components/MarkDownRender/index.d.ts.map +1 -1
- package/dist/components/MarkDownRender/index.mjs +20 -26
- package/dist/components/MarkDownRender/index.mjs.map +1 -1
- package/dist/components/Modal/Modal.cjs +3 -3
- package/dist/components/Modal/Modal.cjs.map +1 -1
- package/dist/components/Modal/Modal.d.ts +1 -1
- package/dist/components/Modal/Modal.d.ts.map +1 -1
- package/dist/components/Modal/Modal.mjs +3 -3
- package/dist/components/Modal/Modal.mjs.map +1 -1
- package/dist/components/SwitchSelector/index.cjs +4 -0
- package/dist/components/SwitchSelector/index.cjs.map +1 -1
- package/dist/components/SwitchSelector/index.d.ts.map +1 -1
- package/dist/components/SwitchSelector/index.mjs +5 -1
- package/dist/components/SwitchSelector/index.mjs.map +1 -1
- package/dist/components/index.cjs +16 -4
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.d.ts +3 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.mjs +15 -3
- package/dist/components/index.mjs.map +1 -1
- package/dist/hooks/index.cjs +8 -1
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.mjs +9 -2
- package/dist/hooks/intlayerAPIHooks.cjs +80 -5
- package/dist/hooks/intlayerAPIHooks.cjs.map +1 -1
- package/dist/hooks/intlayerAPIHooks.d.ts +12 -2
- package/dist/hooks/intlayerAPIHooks.d.ts.map +1 -1
- package/dist/hooks/intlayerAPIHooks.mjs +80 -5
- package/dist/hooks/intlayerAPIHooks.mjs.map +1 -1
- package/dist/hooks/useAsync/useAsyncStateStore.cjs +1 -5
- package/dist/hooks/useAsync/useAsyncStateStore.cjs.map +1 -1
- package/dist/hooks/useAsync/useAsyncStateStore.d.ts.map +1 -1
- package/dist/hooks/useAsync/useAsyncStateStore.mjs +1 -5
- package/dist/hooks/useAsync/useAsyncStateStore.mjs.map +1 -1
- package/dist/hooks/useGetAllDictionaries.cjs +4 -2
- package/dist/hooks/useGetAllDictionaries.cjs.map +1 -1
- package/dist/hooks/useGetAllDictionaries.d.ts +4 -1
- package/dist/hooks/useGetAllDictionaries.d.ts.map +1 -1
- package/dist/hooks/useGetAllDictionaries.mjs +4 -2
- package/dist/hooks/useGetAllDictionaries.mjs.map +1 -1
- package/dist/hooks/useIntlayerAPI.d.ts +11 -2
- package/dist/hooks/useIntlayerAPI.d.ts.map +1 -1
- package/dist/hooks/usePersistedStore.cjs +17 -5
- package/dist/hooks/usePersistedStore.cjs.map +1 -1
- package/dist/hooks/usePersistedStore.d.ts.map +1 -1
- package/dist/hooks/usePersistedStore.mjs +17 -5
- package/dist/hooks/usePersistedStore.mjs.map +1 -1
- package/dist/libs/intlayer-api/ai.cjs +33 -3
- package/dist/libs/intlayer-api/ai.cjs.map +1 -1
- package/dist/libs/intlayer-api/ai.d.ts +9 -3
- package/dist/libs/intlayer-api/ai.d.ts.map +1 -1
- package/dist/libs/intlayer-api/ai.mjs +33 -3
- package/dist/libs/intlayer-api/ai.mjs.map +1 -1
- package/dist/libs/intlayer-api/dictionary.cjs +2 -2
- package/dist/libs/intlayer-api/dictionary.cjs.map +1 -1
- package/dist/libs/intlayer-api/dictionary.d.ts +3 -3
- package/dist/libs/intlayer-api/dictionary.d.ts.map +1 -1
- package/dist/libs/intlayer-api/dictionary.mjs +2 -2
- package/dist/libs/intlayer-api/dictionary.mjs.map +1 -1
- package/dist/libs/intlayer-api/index.cjs +3 -1
- package/dist/libs/intlayer-api/index.cjs.map +1 -1
- package/dist/libs/intlayer-api/index.d.ts +22 -4
- package/dist/libs/intlayer-api/index.d.ts.map +1 -1
- package/dist/libs/intlayer-api/index.mjs +3 -1
- package/dist/libs/intlayer-api/index.mjs.map +1 -1
- package/dist/libs/intlayer-api/tag.cjs +52 -0
- package/dist/libs/intlayer-api/tag.cjs.map +1 -0
- package/dist/libs/intlayer-api/tag.d.ts +16 -0
- package/dist/libs/intlayer-api/tag.d.ts.map +1 -0
- package/dist/libs/intlayer-api/tag.mjs +52 -0
- package/dist/libs/intlayer-api/tag.mjs.map +1 -0
- package/dist/tailwind.css +1 -1
- package/package.json +13 -14
|
@@ -2,12 +2,16 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
4
|
const jsxRuntime = require("../../../jsx-runtime-XHKiWCTo.cjs");
|
|
5
|
-
const client = require("@intlayer/config/client");
|
|
6
5
|
const core = require("@intlayer/core");
|
|
7
6
|
const lucideReact = require("lucide-react");
|
|
8
7
|
const require$$0 = require("react");
|
|
9
8
|
const reactIntlayer = require("react-intlayer");
|
|
10
9
|
const shallow = require("../../../shallow-lhDIFtEp.cjs");
|
|
10
|
+
require("../../../hooks/useScrollBlockage/useScrollBlockageStore.cjs");
|
|
11
|
+
require("../../../hooks/useAsync/useAsyncStateStore.cjs");
|
|
12
|
+
const hooks_intlayerAPIHooks = require("../../../hooks/intlayerAPIHooks.cjs");
|
|
13
|
+
require("@intlayer/dictionaries-entry");
|
|
14
|
+
require("deepmerge");
|
|
11
15
|
const utils_dictionary = require("../../../utils/dictionary.cjs");
|
|
12
16
|
const utils_object = require("../../../utils/object.cjs");
|
|
13
17
|
const components_Button_Button = require("../../Button/Button.cjs");
|
|
@@ -18,21 +22,71 @@ require("clsx");
|
|
|
18
22
|
require("tailwind-merge");
|
|
19
23
|
require("../../EditableField/EditableFieldInput.cjs");
|
|
20
24
|
require("../../EditableField/EditableFieldTextArea.cjs");
|
|
21
|
-
require("../../../hooks/useScrollBlockage/useScrollBlockageStore.cjs");
|
|
22
|
-
require("../../../hooks/useAsync/useAsyncStateStore.cjs");
|
|
23
|
-
require("../../../libs/intlayer-api/index.cjs");
|
|
24
|
-
require("../../Toaster/Toast.cjs");
|
|
25
|
-
require("@intlayer/dictionaries-entry");
|
|
26
|
-
require("deepmerge");
|
|
27
25
|
require("../../Form/FormBase.cjs");
|
|
28
26
|
require("../../Form/FormField.cjs");
|
|
29
27
|
require("../../../Form-BDcoNTLV.cjs");
|
|
30
28
|
require("../../DictionaryEditor/validDictionaryChangeButtons.content.cjs");
|
|
31
29
|
require("zod");
|
|
30
|
+
require("@intlayer/config/client");
|
|
31
|
+
require("fuse.js");
|
|
32
|
+
require("../../Container/index.cjs");
|
|
33
|
+
require("../../DropDown/index.cjs");
|
|
34
|
+
require("../../Input/Input.cjs");
|
|
35
|
+
require("../../Input/InputPassword.cjs");
|
|
36
|
+
require("../../Input/Checkbox.cjs");
|
|
37
|
+
require("../../SwitchSelector/index.cjs");
|
|
38
|
+
require("../../LocaleSwitcherContentDropDown/localeSwitcher.content.cjs");
|
|
39
|
+
const components_LocaleSwitcherContentDropDown_LocaleSwitcherContentContext = require("../../LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.cjs");
|
|
32
40
|
const components_DictionaryFieldEditor_EnumKeyInput = require("../EnumKeyInput.cjs");
|
|
33
41
|
const components_DictionaryFieldEditor_getIsEditableSection = require("../getIsEditableSection.cjs");
|
|
34
42
|
const components_DictionaryFieldEditor_NavigationView_navigationViewNode_content = require("../NavigationView/navigationViewNode.content.cjs");
|
|
35
43
|
const traceKeys = ["filePath", "id", "nodeType"];
|
|
44
|
+
const ContentEditorTextArea = ({
|
|
45
|
+
keyPath,
|
|
46
|
+
dictionary,
|
|
47
|
+
locales,
|
|
48
|
+
...props
|
|
49
|
+
}) => {
|
|
50
|
+
const addEditedContent = components_DictionaryEditor_useEditedContentStore.useEditedContentStore(
|
|
51
|
+
shallow.useShallow((s) => s.addEditedContent)
|
|
52
|
+
);
|
|
53
|
+
const { auditContentDeclarationField, isLoading: isAuditing } = hooks_intlayerAPIHooks.useAuditContentDeclarationField();
|
|
54
|
+
return /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
|
|
55
|
+
components_ContentEditor_ContentEditorTextArea.ContentEditorTextArea,
|
|
56
|
+
{
|
|
57
|
+
variant: "default",
|
|
58
|
+
onContentChange: (newValue) => addEditedContent(dictionary.key, newValue, keyPath),
|
|
59
|
+
additionalButtons: /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
|
|
60
|
+
components_Button_Button.Button,
|
|
61
|
+
{
|
|
62
|
+
Icon: lucideReact.WandSparkles,
|
|
63
|
+
label: "Audit",
|
|
64
|
+
variant: "hoverable",
|
|
65
|
+
size: "icon-sm",
|
|
66
|
+
color: "text",
|
|
67
|
+
className: "cursor-pointer hover:scale-110",
|
|
68
|
+
isLoading: isAuditing,
|
|
69
|
+
onClick: () => {
|
|
70
|
+
auditContentDeclarationField({
|
|
71
|
+
fileContent: JSON.stringify(dictionary),
|
|
72
|
+
keyPath,
|
|
73
|
+
locales
|
|
74
|
+
}).then((response) => {
|
|
75
|
+
if (!response.data) return;
|
|
76
|
+
try {
|
|
77
|
+
const editedContent = response.data.fileContent;
|
|
78
|
+
addEditedContent(dictionary.key, editedContent, keyPath);
|
|
79
|
+
} catch (error) {
|
|
80
|
+
console.error(error);
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
),
|
|
86
|
+
...props
|
|
87
|
+
}
|
|
88
|
+
);
|
|
89
|
+
};
|
|
36
90
|
const createReactElement = (element) => {
|
|
37
91
|
if (typeof element === "string") {
|
|
38
92
|
return element;
|
|
@@ -61,31 +115,35 @@ const createReactElement = (element) => {
|
|
|
61
115
|
const TranslationTextEditor = ({
|
|
62
116
|
section,
|
|
63
117
|
keyPath,
|
|
64
|
-
|
|
118
|
+
dictionary,
|
|
119
|
+
locales
|
|
65
120
|
}) => {
|
|
66
|
-
const {
|
|
67
|
-
const
|
|
68
|
-
|
|
121
|
+
const { selectedLocales, availableLocales } = components_LocaleSwitcherContentDropDown_LocaleSwitcherContentContext.useLocaleSwitcherContent();
|
|
122
|
+
const sectionContent = section[core.NodeType.Translation];
|
|
123
|
+
const sectionContentKeys = Object.keys(sectionContent);
|
|
124
|
+
const isFiltered = availableLocales.length > selectedLocales.length;
|
|
125
|
+
const localesList = isFiltered ? selectedLocales : (
|
|
126
|
+
// If the translation include content in other locales, we display all of them
|
|
127
|
+
[.../* @__PURE__ */ new Set([...availableLocales, ...sectionContentKeys])]
|
|
69
128
|
);
|
|
70
|
-
return /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx("table", { className: "w-full gap-2", children: /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx("tbody", { children:
|
|
129
|
+
return /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx("table", { className: "w-full gap-2", children: /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx("tbody", { children: localesList.map((translationKey) => /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs(
|
|
71
130
|
"tr",
|
|
72
131
|
{
|
|
73
132
|
className: "border-text dark:border-text-dark w-full border-t-[1.5px]",
|
|
74
133
|
lang: translationKey,
|
|
75
134
|
children: [
|
|
76
|
-
/* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx("td", { className: "border-text dark:border-text-dark border-r-[1.5px] p-2", children: core.getLocaleName(translationKey) }),
|
|
135
|
+
selectedLocales.length > 1 && /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx("td", { className: "border-text dark:border-text-dark border-r-[1.5px] p-2", children: core.getLocaleName(translationKey) }),
|
|
77
136
|
/* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx("td", { className: "w-full p-2", children: /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
|
|
78
|
-
|
|
137
|
+
ContentEditorTextArea,
|
|
79
138
|
{
|
|
80
139
|
variant: "default",
|
|
81
140
|
"aria-label": "Edit field",
|
|
82
|
-
|
|
141
|
+
keyPath: [
|
|
83
142
|
...keyPath,
|
|
84
|
-
{
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
]),
|
|
143
|
+
{ type: core.NodeType.Translation, key: translationKey }
|
|
144
|
+
],
|
|
145
|
+
dictionary,
|
|
146
|
+
locales,
|
|
89
147
|
children: section[core.NodeType.Translation][translationKey]
|
|
90
148
|
}
|
|
91
149
|
) })
|
|
@@ -97,7 +155,8 @@ const TranslationTextEditor = ({
|
|
|
97
155
|
const EnumerationTextEditor = ({
|
|
98
156
|
section,
|
|
99
157
|
keyPath,
|
|
100
|
-
|
|
158
|
+
dictionary,
|
|
159
|
+
locales
|
|
101
160
|
}) => {
|
|
102
161
|
const addEditedContent = components_DictionaryEditor_useEditedContentStore.useEditedContentStore(
|
|
103
162
|
shallow.useShallow((s) => s.addEditedContent)
|
|
@@ -121,7 +180,7 @@ const EnumerationTextEditor = ({
|
|
|
121
180
|
color: "text",
|
|
122
181
|
Icon: lucideReact.X,
|
|
123
182
|
className: "w-16",
|
|
124
|
-
onClick: () => addEditedContent(
|
|
183
|
+
onClick: () => addEditedContent(dictionary.key, void 0, [
|
|
125
184
|
...keyPath,
|
|
126
185
|
{
|
|
127
186
|
type: core.NodeType.Enumeration,
|
|
@@ -145,23 +204,22 @@ const EnumerationTextEditor = ({
|
|
|
145
204
|
...section,
|
|
146
205
|
[core.NodeType.Enumeration]: newValueContent
|
|
147
206
|
};
|
|
148
|
-
addEditedContent(
|
|
207
|
+
addEditedContent(dictionary.key, newValue, keyPath);
|
|
149
208
|
}
|
|
150
209
|
}
|
|
151
210
|
)
|
|
152
211
|
] }) }),
|
|
153
212
|
/* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx("td", { className: "w-full p-2", children: /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
|
|
154
|
-
|
|
213
|
+
ContentEditorTextArea,
|
|
155
214
|
{
|
|
156
215
|
variant: "default",
|
|
157
216
|
"aria-label": "Edit field",
|
|
158
|
-
|
|
217
|
+
keyPath: [
|
|
159
218
|
...keyPath,
|
|
160
|
-
{
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
]),
|
|
219
|
+
{ type: core.NodeType.Enumeration, key: enumKey }
|
|
220
|
+
],
|
|
221
|
+
dictionary,
|
|
222
|
+
locales,
|
|
165
223
|
children: section[core.NodeType.Enumeration][enumKey]
|
|
166
224
|
}
|
|
167
225
|
) })
|
|
@@ -177,7 +235,7 @@ const EnumerationTextEditor = ({
|
|
|
177
235
|
color: "neutral",
|
|
178
236
|
textAlign: "left",
|
|
179
237
|
onClick: () => addEditedContent(
|
|
180
|
-
|
|
238
|
+
dictionary.key,
|
|
181
239
|
"",
|
|
182
240
|
[...keyPath, { type: core.NodeType.Enumeration, key: "unknown" }],
|
|
183
241
|
false
|
|
@@ -192,7 +250,8 @@ const EnumerationTextEditor = ({
|
|
|
192
250
|
const ArrayTextEditor = ({
|
|
193
251
|
section,
|
|
194
252
|
keyPath,
|
|
195
|
-
|
|
253
|
+
dictionary,
|
|
254
|
+
locales
|
|
196
255
|
}) => {
|
|
197
256
|
const addEditedContent = components_DictionaryEditor_useEditedContentStore.useEditedContentStore(
|
|
198
257
|
shallow.useShallow((s) => s.addEditedContent)
|
|
@@ -206,19 +265,19 @@ const ArrayTextEditor = ({
|
|
|
206
265
|
children: [
|
|
207
266
|
/* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx("td", { className: "border-text dark:border-text-dark border-r-[1.5px] p-2", children: index }),
|
|
208
267
|
/* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx("td", { className: "w-full p-2", children: /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
|
|
209
|
-
|
|
268
|
+
ContentEditorTextArea,
|
|
210
269
|
{
|
|
211
270
|
variant: "default",
|
|
212
271
|
"aria-label": "Edit field",
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
272
|
+
keyPath: [
|
|
273
|
+
...keyPath,
|
|
274
|
+
{
|
|
275
|
+
type: core.NodeType.Array,
|
|
276
|
+
key: index
|
|
277
|
+
}
|
|
278
|
+
],
|
|
279
|
+
dictionary,
|
|
280
|
+
locales,
|
|
222
281
|
children: subSection
|
|
223
282
|
}
|
|
224
283
|
) })
|
|
@@ -241,7 +300,7 @@ const ArrayTextEditor = ({
|
|
|
241
300
|
key: section.length
|
|
242
301
|
}
|
|
243
302
|
];
|
|
244
|
-
addEditedContent(
|
|
303
|
+
addEditedContent(dictionary.key, "", newKeyPath, false);
|
|
245
304
|
},
|
|
246
305
|
Icon: lucideReact.Plus,
|
|
247
306
|
children: addNewElement.text
|
|
@@ -252,11 +311,9 @@ const ArrayTextEditor = ({
|
|
|
252
311
|
const TextEditor = ({
|
|
253
312
|
section,
|
|
254
313
|
keyPath,
|
|
255
|
-
|
|
314
|
+
dictionary,
|
|
315
|
+
locales
|
|
256
316
|
}) => {
|
|
257
|
-
const addEditedContent = components_DictionaryEditor_useEditedContentStore.useEditedContentStore(
|
|
258
|
-
shallow.useShallow((s) => s.addEditedContent)
|
|
259
|
-
);
|
|
260
317
|
const { tsxNotEditable } = reactIntlayer.useDictionary(components_DictionaryFieldEditor_NavigationView_navigationViewNode_content.navigationViewContent);
|
|
261
318
|
const nodeType = utils_dictionary.getSectionType(section);
|
|
262
319
|
const isEditableSection = components_DictionaryFieldEditor_getIsEditableSection.getIsEditableSection(section);
|
|
@@ -272,9 +329,10 @@ const TextEditor = ({
|
|
|
272
329
|
return /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
|
|
273
330
|
TranslationTextEditor,
|
|
274
331
|
{
|
|
275
|
-
|
|
332
|
+
dictionary,
|
|
276
333
|
keyPath,
|
|
277
|
-
section
|
|
334
|
+
section,
|
|
335
|
+
locales
|
|
278
336
|
}
|
|
279
337
|
);
|
|
280
338
|
}
|
|
@@ -282,9 +340,10 @@ const TextEditor = ({
|
|
|
282
340
|
return /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
|
|
283
341
|
EnumerationTextEditor,
|
|
284
342
|
{
|
|
285
|
-
|
|
343
|
+
dictionary,
|
|
286
344
|
keyPath,
|
|
287
|
-
section
|
|
345
|
+
section,
|
|
346
|
+
locales
|
|
288
347
|
}
|
|
289
348
|
);
|
|
290
349
|
}
|
|
@@ -292,20 +351,23 @@ const TextEditor = ({
|
|
|
292
351
|
return /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
|
|
293
352
|
ArrayTextEditor,
|
|
294
353
|
{
|
|
295
|
-
|
|
354
|
+
dictionary,
|
|
296
355
|
keyPath,
|
|
297
|
-
section
|
|
356
|
+
section,
|
|
357
|
+
locales
|
|
298
358
|
}
|
|
299
359
|
);
|
|
300
360
|
}
|
|
301
361
|
}
|
|
302
362
|
if (nodeType === core.NodeType.Text) {
|
|
303
363
|
return /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx("div", { className: "border-text dark:border-text-dark w-full border-t-[1.5px] p-2", children: /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
|
|
304
|
-
|
|
364
|
+
ContentEditorTextArea,
|
|
305
365
|
{
|
|
306
366
|
variant: "default",
|
|
307
367
|
"aria-label": "Edit field",
|
|
308
|
-
|
|
368
|
+
keyPath,
|
|
369
|
+
dictionary,
|
|
370
|
+
locales,
|
|
309
371
|
children: section
|
|
310
372
|
}
|
|
311
373
|
) });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextEditor.cjs","sources":["../../../../src/components/DictionaryFieldEditor/EditorView/TextEditor.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n'use client';\n\nimport { getConfiguration } from '@intlayer/config/client';\nimport {\n type EnumerationContent,\n type TranslationContent,\n NodeType,\n type KeyPath,\n type DictionaryValue,\n getLocaleName,\n} from '@intlayer/core';\nimport { Plus, X } from 'lucide-react';\nimport {\n createElement,\n type ReactElement,\n type ReactNode,\n type FC,\n} from 'react';\n// @ts-ignore react-intlayer not build yet\nimport { useDictionary } from 'react-intlayer';\nimport { useShallow } from 'zustand/react/shallow';\nimport { getSectionType } from '../../../utils/dictionary';\nimport { renameKey } from '../../../utils/object';\nimport { Button } from '../../Button';\nimport { ContentEditorTextArea } from '../../ContentEditor/ContentEditorTextArea';\nimport { useEditedContentStore } from '../../DictionaryEditor';\nimport { EnumKeyInput } from '../EnumKeyInput';\nimport { getIsEditableSection } from '../getIsEditableSection';\nimport { navigationViewContent } from '../NavigationView/navigationViewNode.content';\n\nexport const traceKeys: string[] = ['filePath', 'id', 'nodeType'];\n\nconst createReactElement = (element: ReactElement) => {\n if (typeof element === 'string') {\n // If it's a string, simply return it (used for text content)\n return element;\n }\n\n const convertChildrenAsArray = (element: ReactElement): ReactElement => {\n if (element?.props && typeof element.props.children === 'object') {\n const childrenResult: ReactNode[] = [];\n const { children } = element.props;\n\n // Create the children elements recursively, if any\n Object.keys(children).forEach((key) =>\n childrenResult.push(createReactElement(children[key]))\n );\n\n return {\n ...element,\n props: { ...element.props, children: childrenResult },\n };\n }\n\n return {\n ...element,\n props: { ...element.props, children: element.props.children },\n };\n };\n\n const fixedElement = convertChildrenAsArray(element);\n\n const { type, props } = fixedElement;\n\n // Create and return the React element\n return createElement(type ?? 'div', props, ...props.children);\n};\n\nexport type TextEditorProps = {\n dictionaryKey: string;\n keyPath: KeyPath[];\n section: DictionaryValue;\n};\n\nconst TranslationTextEditor: FC<TextEditorProps> = ({\n section,\n keyPath,\n dictionaryKey,\n}: TextEditorProps) => {\n const { locales } = getConfiguration().internationalization;\n const addEditedContent = useEditedContentStore(\n useShallow((s) => s.addEditedContent)\n );\n\n return (\n <table className=\"w-full gap-2\">\n <tbody>\n {locales.map((translationKey) => (\n <tr\n key={translationKey}\n className=\"border-text dark:border-text-dark w-full border-t-[1.5px]\"\n lang={translationKey}\n >\n <td className=\"border-text dark:border-text-dark border-r-[1.5px] p-2\">\n {getLocaleName(translationKey)}\n </td>\n <td className=\"w-full p-2\">\n <ContentEditorTextArea\n variant=\"default\"\n aria-label=\"Edit field\"\n onContentChange={(newValue) =>\n addEditedContent(dictionaryKey, newValue, [\n ...keyPath,\n {\n type: NodeType.Translation,\n key: translationKey,\n },\n ])\n }\n >\n {\n (section as TranslationContent<string>)[NodeType.Translation][\n translationKey\n ] as string\n }\n </ContentEditorTextArea>\n </td>\n </tr>\n ))}\n </tbody>\n </table>\n );\n};\n\nconst EnumerationTextEditor: FC<TextEditorProps> = ({\n section,\n keyPath,\n dictionaryKey,\n}) => {\n const addEditedContent = useEditedContentStore(\n useShallow((s) => s.addEditedContent)\n );\n const { addNewEnumeration } = useDictionary(navigationViewContent);\n\n return (\n <table className=\"w-full table-fixed gap-2\">\n <tbody>\n {Object.keys(\n (section as EnumerationContent<DictionaryValue>)[NodeType.Enumeration]\n ).map((enumKey) => (\n <tr\n key={enumKey}\n className=\"border-text dark:border-text-dark w-full border-y-[1.5px]\"\n >\n <td className=\"border-text dark:border-text-dark w-44 border-r-[1.5px] p-2\">\n <div className=\"flex gap-1\">\n <Button\n label=\"Remove\"\n variant=\"hoverable\"\n size=\"icon-md\"\n color=\"text\"\n Icon={X}\n className=\"w-16\"\n onClick={() =>\n addEditedContent(dictionaryKey, undefined, [\n ...keyPath,\n {\n type: NodeType.Enumeration,\n key: enumKey,\n },\n ])\n }\n />\n <EnumKeyInput\n value={enumKey}\n onChange={(value) => {\n const preValueContent = (\n section as EnumerationContent<string>\n )[NodeType.Enumeration];\n const newValueContent = renameKey(\n preValueContent,\n enumKey as keyof typeof preValueContent,\n value\n );\n const newValue = {\n ...(section as EnumerationContent<string>),\n [NodeType.Enumeration]: newValueContent,\n };\n\n addEditedContent(dictionaryKey, newValue, keyPath);\n }}\n />\n </div>\n </td>\n <td className=\"w-full p-2\">\n <ContentEditorTextArea\n variant=\"default\"\n aria-label=\"Edit field\"\n onContentChange={(newValue) =>\n addEditedContent(dictionaryKey, newValue, [\n ...keyPath,\n {\n type: NodeType.Enumeration,\n key: enumKey,\n },\n ])\n }\n >\n {\n (section as EnumerationContent<string>)[NodeType.Enumeration][\n enumKey as any\n ] as string\n }\n </ContentEditorTextArea>\n </td>\n </tr>\n ))}\n </tbody>\n\n <tfoot>\n <Button\n label={addNewEnumeration.label}\n variant=\"hoverable\"\n color=\"neutral\"\n textAlign=\"left\"\n onClick={() =>\n addEditedContent(\n dictionaryKey,\n '',\n [...keyPath, { type: NodeType.Enumeration, key: 'unknown' }],\n false\n )\n }\n Icon={Plus}\n className=\"m-2\"\n >\n {addNewEnumeration.text}\n </Button>\n </tfoot>\n </table>\n );\n};\n\nconst ArrayTextEditor: FC<TextEditorProps> = ({\n section,\n keyPath,\n dictionaryKey,\n}) => {\n const addEditedContent = useEditedContentStore(\n useShallow((s) => s.addEditedContent)\n );\n const { addNewElement } = useDictionary(navigationViewContent);\n\n return (\n <table className=\"w-full gap-2\">\n <tbody>\n {(section as DictionaryValue[]).map((subSection, index) => (\n <tr\n key={JSON.stringify(subSection)}\n className=\"border-text dark:border-text-dark w-full border-t-[1.5px]\"\n >\n <td className=\"border-text dark:border-text-dark border-r-[1.5px] p-2\">\n {index}\n </td>\n <td className=\"w-full p-2\">\n <ContentEditorTextArea\n variant=\"default\"\n aria-label=\"Edit field\"\n onContentChange={(newValue) => {\n addEditedContent(dictionaryKey, newValue, [\n ...keyPath,\n {\n type: NodeType.Array,\n key: index,\n },\n ]);\n }}\n >\n {subSection as string}\n </ContentEditorTextArea>\n </td>\n </tr>\n ))}\n </tbody>\n <tfoot>\n <Button\n label={addNewElement.label}\n variant=\"hoverable\"\n color=\"neutral\"\n textAlign=\"left\"\n onClick={() => {\n const newKeyPath: KeyPath[] = [\n ...keyPath,\n {\n type: NodeType.Array,\n key: (section as DictionaryValue[]).length,\n },\n ];\n addEditedContent(dictionaryKey, '', newKeyPath, false);\n }}\n Icon={Plus}\n >\n {addNewElement.text}\n </Button>\n </tfoot>\n </table>\n );\n};\n\nexport const TextEditor: FC<TextEditorProps> = ({\n section,\n keyPath,\n dictionaryKey,\n}) => {\n const addEditedContent = useEditedContentStore(\n useShallow((s) => s.addEditedContent)\n );\n const { tsxNotEditable } = useDictionary(navigationViewContent);\n const nodeType = getSectionType(section);\n const isEditableSection = getIsEditableSection(section);\n\n if (!isEditableSection) return <></>;\n\n if (typeof section === 'object') {\n if (nodeType === NodeType.ReactNode) {\n return (\n <>\n {createReactElement(section as unknown as ReactElement)}\n <span className=\"text-neutral dark:text-neutral-dark text-xs\">\n {tsxNotEditable}\n </span>\n </>\n );\n }\n\n if (nodeType === NodeType.Translation) {\n return (\n <TranslationTextEditor\n dictionaryKey={dictionaryKey}\n keyPath={keyPath}\n section={section}\n />\n );\n }\n\n if (nodeType === NodeType.Enumeration) {\n return (\n <EnumerationTextEditor\n dictionaryKey={dictionaryKey}\n keyPath={keyPath}\n section={section}\n />\n );\n }\n\n if (nodeType === NodeType.Array) {\n return (\n <ArrayTextEditor\n dictionaryKey={dictionaryKey}\n keyPath={keyPath}\n section={section}\n />\n );\n }\n }\n\n if (nodeType === NodeType.Text) {\n return (\n <div className=\"border-text dark:border-text-dark w-full border-t-[1.5px] p-2\">\n <ContentEditorTextArea\n variant=\"default\"\n aria-label=\"Edit field\"\n onContentChange={(newValue) =>\n addEditedContent(dictionaryKey, newValue, keyPath)\n }\n >\n {section as string}\n </ContentEditorTextArea>\n </div>\n );\n }\n\n return <>Error loading section</>;\n};\n"],"names":["element","createElement","getConfiguration","useEditedContentStore","useShallow","jsx","jsxs","getLocaleName","ContentEditorTextArea","NodeType","useDictionary","navigationViewContent","Button","X","EnumKeyInput","renameKey","Plus","getSectionType","getIsEditableSection","Fragment"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BO,MAAM,YAAsB,CAAC,YAAY,MAAM,UAAU;AAEhE,MAAM,qBAAqB,CAAC,YAA0B;AAChD,MAAA,OAAO,YAAY,UAAU;AAExB,WAAA;AAAA,EAAA;AAGH,QAAA,yBAAyB,CAACA,aAAwC;AACtE,QAAIA,UAAS,SAAS,OAAOA,SAAQ,MAAM,aAAa,UAAU;AAChE,YAAM,iBAA8B,CAAC;AAC/B,YAAA,EAAE,aAAaA,SAAQ;AAGtB,aAAA,KAAK,QAAQ,EAAE;AAAA,QAAQ,CAAC,QAC7B,eAAe,KAAK,mBAAmB,SAAS,GAAG,CAAC,CAAC;AAAA,MACvD;AAEO,aAAA;AAAA,QACL,GAAGA;AAAAA,QACH,OAAO,EAAE,GAAGA,SAAQ,OAAO,UAAU,eAAe;AAAA,MACtD;AAAA,IAAA;AAGK,WAAA;AAAA,MACL,GAAGA;AAAAA,MACH,OAAO,EAAE,GAAGA,SAAQ,OAAO,UAAUA,SAAQ,MAAM,SAAS;AAAA,IAC9D;AAAA,EACF;AAEM,QAAA,eAAe,uBAAuB,OAAO;AAE7C,QAAA,EAAE,MAAM,MAAA,IAAU;AAGxB,SAAOC,WAAAA,cAAc,QAAQ,OAAO,OAAO,GAAG,MAAM,QAAQ;AAC9D;AAQA,MAAM,wBAA6C,CAAC;AAAA,EAClD;AAAA,EACA;AAAA,EACA;AACF,MAAuB;AACrB,QAAM,EAAE,QAAA,IAAYC,OAAA,iBAAA,EAAmB;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,kBAAA,KAAAa,uCAAA,EAAA,UAAA;AAAA,QAAA,mBAAmB,OAAkC;AAAA,QACrDd,2BAAA,kBAAA,IAAA,QAAA,EAAK,WAAU,+CACb,UACH,eAAA,CAAA;AAAA,MAAA,GACF;AAAA,IAAA;AAIA,QAAA,aAAaI,cAAS,aAAa;AAEnC,aAAAJ,2BAAA,kBAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC;AAAA,UACA;AAAA,UACA;AAAA,QAAA;AAAA,MACF;AAAA,IAAA;AAIA,QAAA,aAAaI,cAAS,aAAa;AAEnC,aAAAJ,2BAAA,kBAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC;AAAA,UACA;AAAA,UACA;AAAA,QAAA;AAAA,MACF;AAAA,IAAA;AAIA,QAAA,aAAaI,cAAS,OAAO;AAE7B,aAAAJ,2BAAA,kBAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC;AAAA,UACA;AAAA,UACA;AAAA,QAAA;AAAA,MACF;AAAA,IAAA;AAAA,EAEJ;AAGE,MAAA,aAAaI,cAAS,MAAM;AAE5B,WAAAJ,2BAAAA,kBAAAA,IAAC,OAAI,EAAA,WAAU,iEACb,UAAAA,2BAAA,kBAAA;AAAA,MAACG,+CAAA;AAAA,MAAA;AAAA,QACC,SAAQ;AAAA,QACR,cAAW;AAAA,QACX,iBAAiB,CAAC,aAChB,iBAAiB,eAAe,UAAU,OAAO;AAAA,QAGlD,UAAA;AAAA,MAAA;AAAA,IAAA,GAEL;AAAA,EAAA;AAIJ,mGAAS,UAAqB,wBAAA,CAAA;AAChC;;;"}
|
|
1
|
+
{"version":3,"file":"TextEditor.cjs","sources":["../../../../src/components/DictionaryFieldEditor/EditorView/TextEditor.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n'use client';\n\nimport { Locales } from '@intlayer/config';\nimport {\n type EnumerationContent,\n type TranslationContent,\n NodeType,\n type KeyPath,\n type DictionaryValue,\n getLocaleName,\n Dictionary,\n} from '@intlayer/core';\nimport { Plus, WandSparkles, X } from 'lucide-react';\nimport {\n createElement,\n type ReactElement,\n type ReactNode,\n type FC,\n} from 'react';\n// @ts-ignore react-intlayer not build yet\nimport { useDictionary } from 'react-intlayer';\nimport { useShallow } from 'zustand/react/shallow';\nimport { useAuditContentDeclarationField } from '../../../hooks';\nimport { getSectionType } from '../../../utils/dictionary';\nimport { renameKey } from '../../../utils/object';\nimport { Button } from '../../Button';\nimport {\n ContentEditorTextArea as ContentEditorTextAreaBase,\n ContentEditorTextAreaProps as ContentEditorTextAreaPropsBase,\n} from '../../ContentEditor/ContentEditorTextArea';\nimport { useEditedContentStore } from '../../DictionaryEditor';\nimport { useLocaleSwitcherContent } from '../../LocaleSwitcherContentDropDown';\nimport { EnumKeyInput } from '../EnumKeyInput';\nimport { getIsEditableSection } from '../getIsEditableSection';\nimport { navigationViewContent } from '../NavigationView/navigationViewNode.content';\n\nexport const traceKeys: string[] = ['filePath', 'id', 'nodeType'];\n\ntype ContentEditorTextAreaProps = Omit<\n ContentEditorTextAreaPropsBase,\n 'onContentChange'\n> & {\n keyPath: KeyPath[];\n dictionary: Dictionary;\n locales: Locales[];\n};\n\nconst ContentEditorTextArea: FC<ContentEditorTextAreaProps> = ({\n keyPath,\n dictionary,\n locales,\n ...props\n}) => {\n const addEditedContent = useEditedContentStore(\n useShallow((s) => s.addEditedContent)\n );\n const { auditContentDeclarationField, isLoading: isAuditing } =\n useAuditContentDeclarationField();\n\n return (\n <ContentEditorTextAreaBase\n variant=\"default\"\n onContentChange={(newValue) =>\n addEditedContent(dictionary.key, newValue, keyPath)\n }\n additionalButtons={\n <Button\n Icon={WandSparkles}\n label=\"Audit\"\n variant=\"hoverable\"\n size=\"icon-sm\"\n color=\"text\"\n className=\"cursor-pointer hover:scale-110\"\n isLoading={isAuditing}\n onClick={() => {\n auditContentDeclarationField({\n fileContent: JSON.stringify(dictionary),\n keyPath,\n locales,\n }).then((response) => {\n if (!response.data) return;\n\n try {\n const editedContent = response.data.fileContent as string;\n\n addEditedContent(dictionary.key, editedContent, keyPath);\n } catch (error) {\n console.error(error);\n }\n });\n }}\n />\n }\n {...props}\n />\n );\n};\n\nconst createReactElement = (element: ReactElement) => {\n if (typeof element === 'string') {\n // If it's a string, simply return it (used for text content)\n return element;\n }\n\n const convertChildrenAsArray = (element: ReactElement): ReactElement => {\n if (element?.props && typeof element.props.children === 'object') {\n const childrenResult: ReactNode[] = [];\n const { children } = element.props;\n\n // Create the children elements recursively, if any\n Object.keys(children).forEach((key) =>\n childrenResult.push(createReactElement(children[key]))\n );\n\n return {\n ...element,\n props: { ...element.props, children: childrenResult },\n };\n }\n\n return {\n ...element,\n props: { ...element.props, children: element.props.children },\n };\n };\n\n const fixedElement = convertChildrenAsArray(element);\n\n const { type, props } = fixedElement;\n\n // Create and return the React element\n return createElement(type ?? 'div', props, ...props.children);\n};\n\nexport type TextEditorProps = {\n dictionary: Dictionary;\n keyPath: KeyPath[];\n section: DictionaryValue;\n locales: Locales[];\n};\n\nconst TranslationTextEditor: FC<TextEditorProps> = ({\n section,\n keyPath,\n dictionary,\n locales,\n}: TextEditorProps) => {\n const { selectedLocales, availableLocales } = useLocaleSwitcherContent();\n\n const sectionContent = (section as TranslationContent<string>)[\n NodeType.Translation\n ] as Record<Locales, string>;\n\n const sectionContentKeys = Object.keys(sectionContent) as Locales[];\n\n const isFiltered = availableLocales.length > selectedLocales.length;\n\n const localesList = isFiltered\n ? selectedLocales\n : // If the translation include content in other locales, we display all of them\n [...new Set([...availableLocales, ...sectionContentKeys])];\n\n return (\n <table className=\"w-full gap-2\">\n <tbody>\n {localesList.map((translationKey) => (\n <tr\n key={translationKey}\n className=\"border-text dark:border-text-dark w-full border-t-[1.5px]\"\n lang={translationKey}\n >\n {selectedLocales.length > 1 && (\n <td className=\"border-text dark:border-text-dark border-r-[1.5px] p-2\">\n {getLocaleName(translationKey)}\n </td>\n )}\n <td className=\"w-full p-2\">\n <ContentEditorTextArea\n variant=\"default\"\n aria-label=\"Edit field\"\n keyPath={[\n ...keyPath,\n { type: NodeType.Translation, key: translationKey },\n ]}\n dictionary={dictionary}\n locales={locales}\n >\n {\n (section as TranslationContent<string>)[NodeType.Translation][\n translationKey\n ] as string\n }\n </ContentEditorTextArea>\n </td>\n </tr>\n ))}\n </tbody>\n </table>\n );\n};\n\nconst EnumerationTextEditor: FC<TextEditorProps> = ({\n section,\n keyPath,\n dictionary,\n locales,\n}) => {\n const addEditedContent = useEditedContentStore(\n useShallow((s) => s.addEditedContent)\n );\n const { addNewEnumeration } = useDictionary(navigationViewContent);\n\n return (\n <table className=\"w-full table-fixed gap-2\">\n <tbody>\n {Object.keys(\n (section as EnumerationContent<DictionaryValue>)[NodeType.Enumeration]\n ).map((enumKey) => (\n <tr\n key={enumKey}\n className=\"border-text dark:border-text-dark w-full border-y-[1.5px]\"\n >\n <td className=\"border-text dark:border-text-dark w-44 border-r-[1.5px] p-2\">\n <div className=\"flex gap-1\">\n <Button\n label=\"Remove\"\n variant=\"hoverable\"\n size=\"icon-md\"\n color=\"text\"\n Icon={X}\n className=\"w-16\"\n onClick={() =>\n addEditedContent(dictionary.key, undefined, [\n ...keyPath,\n {\n type: NodeType.Enumeration,\n key: enumKey,\n },\n ])\n }\n />\n <EnumKeyInput\n value={enumKey}\n onChange={(value) => {\n const preValueContent = (\n section as EnumerationContent<string>\n )[NodeType.Enumeration];\n const newValueContent = renameKey(\n preValueContent,\n enumKey as keyof typeof preValueContent,\n value\n );\n const newValue = {\n ...(section as EnumerationContent<string>),\n [NodeType.Enumeration]: newValueContent,\n };\n\n addEditedContent(dictionary.key, newValue, keyPath);\n }}\n />\n </div>\n </td>\n <td className=\"w-full p-2\">\n <ContentEditorTextArea\n variant=\"default\"\n aria-label=\"Edit field\"\n keyPath={[\n ...keyPath,\n { type: NodeType.Enumeration, key: enumKey },\n ]}\n dictionary={dictionary}\n locales={locales}\n >\n {\n (section as EnumerationContent<string>)[NodeType.Enumeration][\n enumKey as any\n ] as string\n }\n </ContentEditorTextArea>\n </td>\n </tr>\n ))}\n </tbody>\n\n <tfoot>\n <Button\n label={addNewEnumeration.label}\n variant=\"hoverable\"\n color=\"neutral\"\n textAlign=\"left\"\n onClick={() =>\n addEditedContent(\n dictionary.key,\n '',\n [...keyPath, { type: NodeType.Enumeration, key: 'unknown' }],\n false\n )\n }\n Icon={Plus}\n className=\"m-2\"\n >\n {addNewEnumeration.text}\n </Button>\n </tfoot>\n </table>\n );\n};\n\nconst ArrayTextEditor: FC<TextEditorProps> = ({\n section,\n keyPath,\n dictionary,\n locales,\n}) => {\n const addEditedContent = useEditedContentStore(\n useShallow((s) => s.addEditedContent)\n );\n const { addNewElement } = useDictionary(navigationViewContent);\n\n return (\n <table className=\"w-full gap-2\">\n <tbody>\n {(section as DictionaryValue[]).map((subSection, index) => (\n <tr\n key={JSON.stringify(subSection)}\n className=\"border-text dark:border-text-dark w-full border-t-[1.5px]\"\n >\n <td className=\"border-text dark:border-text-dark border-r-[1.5px] p-2\">\n {index}\n </td>\n <td className=\"w-full p-2\">\n <ContentEditorTextArea\n variant=\"default\"\n aria-label=\"Edit field\"\n keyPath={[\n ...keyPath,\n {\n type: NodeType.Array,\n key: index,\n },\n ]}\n dictionary={dictionary}\n locales={locales}\n >\n {subSection as string}\n </ContentEditorTextArea>\n </td>\n </tr>\n ))}\n </tbody>\n <tfoot>\n <Button\n label={addNewElement.label}\n variant=\"hoverable\"\n color=\"neutral\"\n textAlign=\"left\"\n onClick={() => {\n const newKeyPath: KeyPath[] = [\n ...keyPath,\n {\n type: NodeType.Array,\n key: (section as DictionaryValue[]).length,\n },\n ];\n addEditedContent(dictionary.key, '', newKeyPath, false);\n }}\n Icon={Plus}\n >\n {addNewElement.text}\n </Button>\n </tfoot>\n </table>\n );\n};\n\nexport const TextEditor: FC<TextEditorProps> = ({\n section,\n keyPath,\n dictionary,\n locales,\n}) => {\n const { tsxNotEditable } = useDictionary(navigationViewContent);\n const nodeType = getSectionType(section);\n const isEditableSection = getIsEditableSection(section);\n\n if (!isEditableSection) return <></>;\n\n if (typeof section === 'object') {\n if (nodeType === NodeType.ReactNode) {\n return (\n <>\n {createReactElement(section as unknown as ReactElement)}\n <span className=\"text-neutral dark:text-neutral-dark text-xs\">\n {tsxNotEditable}\n </span>\n </>\n );\n }\n\n if (nodeType === NodeType.Translation) {\n return (\n <TranslationTextEditor\n dictionary={dictionary}\n keyPath={keyPath}\n section={section}\n locales={locales}\n />\n );\n }\n\n if (nodeType === NodeType.Enumeration) {\n return (\n <EnumerationTextEditor\n dictionary={dictionary}\n keyPath={keyPath}\n section={section}\n locales={locales}\n />\n );\n }\n\n if (nodeType === NodeType.Array) {\n return (\n <ArrayTextEditor\n dictionary={dictionary}\n keyPath={keyPath}\n section={section}\n locales={locales}\n />\n );\n }\n }\n\n if (nodeType === NodeType.Text) {\n return (\n <div className=\"border-text dark:border-text-dark w-full border-t-[1.5px] p-2\">\n <ContentEditorTextArea\n variant=\"default\"\n aria-label=\"Edit field\"\n keyPath={keyPath}\n dictionary={dictionary}\n locales={locales}\n >\n {section as string}\n </ContentEditorTextArea>\n </div>\n );\n }\n\n return <>Error loading section</>;\n};\n"],"names":["useEditedContentStore","useShallow","useAuditContentDeclarationField","jsx","ContentEditorTextAreaBase","Button","WandSparkles","element","createElement","useLocaleSwitcherContent","NodeType","jsxs","getLocaleName","useDictionary","navigationViewContent","X","EnumKeyInput","renameKey","Plus","getSectionType","getIsEditableSection","Fragment"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCO,MAAM,YAAsB,CAAC,YAAY,MAAM,UAAU;AAWhE,MAAM,wBAAwD,CAAC;AAAA,EAC7D;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,mBAAmBA,kDAAA;AAAA,IACvBC,mBAAW,CAAC,MAAM,EAAE,gBAAgB;AAAA,EACtC;AACA,QAAM,EAAE,8BAA8B,WAAW,WAAA,IAC/CC,uBAAAA,gCAAgC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A,QACC,SAAQ;AAAA,QACR,cAAW;AAAA,QACX;AAAA,QACA;AAAA,QACA;AAAA,QAEC,UAAA;AAAA,MAAA;AAAA,IAAA,GAEL;AAAA,EAAA;AAIJ,mGAAS,UAAqB,wBAAA,CAAA;AAChC;;;"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Locales } from '@intlayer/config';
|
|
2
|
+
import { KeyPath, DictionaryValue, Dictionary } from '@intlayer/core';
|
|
2
3
|
import { FC } from 'react';
|
|
3
4
|
export declare const traceKeys: string[];
|
|
4
5
|
export type TextEditorProps = {
|
|
5
|
-
|
|
6
|
+
dictionary: Dictionary;
|
|
6
7
|
keyPath: KeyPath[];
|
|
7
8
|
section: DictionaryValue;
|
|
9
|
+
locales: Locales[];
|
|
8
10
|
};
|
|
9
11
|
export declare const TextEditor: FC<TextEditorProps>;
|
|
10
12
|
//# sourceMappingURL=TextEditor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextEditor.d.ts","sourceRoot":"","sources":["../../../../src/components/DictionaryFieldEditor/EditorView/TextEditor.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TextEditor.d.ts","sourceRoot":"","sources":["../../../../src/components/DictionaryFieldEditor/EditorView/TextEditor.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAIL,KAAK,OAAO,EACZ,KAAK,eAAe,EAEpB,UAAU,EACX,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAIL,KAAK,EAAE,EACR,MAAM,OAAO,CAAC;AAkBf,eAAO,MAAM,SAAS,EAAE,MAAM,EAAmC,CAAC;AAkGlE,MAAM,MAAM,eAAe,GAAG;IAC5B,UAAU,EAAE,UAAU,CAAC;IACvB,OAAO,EAAE,OAAO,EAAE,CAAC;IACnB,OAAO,EAAE,eAAe,CAAC;IACzB,OAAO,EAAE,OAAO,EAAE,CAAC;CACpB,CAAC;AA4OF,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CA2E1C,CAAC"}
|