@intlayer/design-system 5.7.8 → 5.8.1-canary.0
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 +127 -91
- package/dist/{better-auth.8zoxzg-F-D8e0X4ys.js → better-auth.CMQ3rA-I-7umXOENE.js} +1 -7
- package/dist/better-auth.CMQ3rA-I-7umXOENE.js.map +1 -0
- package/dist/{better-auth.8zoxzg-F-BEBqzpjz.cjs → better-auth.CMQ3rA-I-C2nBKRMa.cjs} +1 -7
- package/dist/better-auth.CMQ3rA-I-C2nBKRMa.cjs.map +1 -0
- package/dist/components/Accordion/Accordion.cjs +2 -2
- package/dist/components/Accordion/Accordion.cjs.map +1 -1
- package/dist/components/Accordion/Accordion.d.ts.map +1 -1
- package/dist/components/Accordion/Accordion.mjs +3 -3
- package/dist/components/Accordion/Accordion.mjs.map +1 -1
- package/dist/components/Badge/index.cjs +69 -12
- package/dist/components/Badge/index.cjs.map +1 -1
- package/dist/components/Badge/index.d.ts +18 -2
- package/dist/components/Badge/index.d.ts.map +1 -1
- package/dist/components/Badge/index.mjs +69 -12
- package/dist/components/Badge/index.mjs.map +1 -1
- package/dist/components/Breadcrumb/index.cjs +4 -5
- package/dist/components/Breadcrumb/index.cjs.map +1 -1
- package/dist/components/Breadcrumb/index.d.ts +2 -1
- package/dist/components/Breadcrumb/index.d.ts.map +1 -1
- package/dist/components/Breadcrumb/index.mjs +7 -8
- package/dist/components/Breadcrumb/index.mjs.map +1 -1
- package/dist/components/Button/Button.cjs +95 -40
- package/dist/components/Button/Button.cjs.map +1 -1
- package/dist/components/Button/Button.d.ts +42 -1
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/Button/Button.mjs +96 -41
- package/dist/components/Button/Button.mjs.map +1 -1
- package/dist/components/Button/index.cjs +5 -0
- package/dist/components/Button/index.cjs.map +1 -1
- package/dist/components/Button/index.mjs +7 -2
- package/dist/components/Container/index.cjs +67 -0
- package/dist/components/Container/index.cjs.map +1 -1
- package/dist/components/Container/index.d.ts +53 -0
- package/dist/components/Container/index.d.ts.map +1 -1
- package/dist/components/Container/index.mjs +67 -0
- package/dist/components/Container/index.mjs.map +1 -1
- package/dist/components/ContentEditor/ContentEditor.cjs +3 -1
- package/dist/components/ContentEditor/ContentEditor.cjs.map +1 -1
- package/dist/components/ContentEditor/ContentEditor.d.ts.map +1 -1
- package/dist/components/ContentEditor/ContentEditor.mjs +3 -1
- package/dist/components/ContentEditor/ContentEditor.mjs.map +1 -1
- package/dist/components/ContentEditor/ContentEditorInput.cjs +7 -7
- package/dist/components/ContentEditor/ContentEditorInput.cjs.map +1 -1
- package/dist/components/ContentEditor/ContentEditorInput.d.ts +1 -1
- package/dist/components/ContentEditor/ContentEditorInput.d.ts.map +1 -1
- package/dist/components/ContentEditor/ContentEditorInput.mjs +9 -9
- package/dist/components/ContentEditor/ContentEditorInput.mjs.map +1 -1
- package/dist/components/CopyButton/CopyButton.content.cjs.map +1 -0
- package/dist/components/CopyButton/CopyButton.content.d.ts.map +1 -0
- package/dist/components/CopyButton/CopyButton.content.mjs.map +1 -0
- package/dist/components/CopyButton/index.cjs +4 -5
- package/dist/components/CopyButton/index.cjs.map +1 -1
- package/dist/components/CopyButton/index.d.ts.map +1 -1
- package/dist/components/CopyButton/index.mjs +6 -7
- package/dist/components/CopyButton/index.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.cjs +29 -33
- package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.mjs +32 -36
- package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.cjs +4 -6
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.mjs +5 -7
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryCreationForm.content.cjs +2 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryCreationForm.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryCreationForm.content.d.ts +1 -0
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryCreationForm.content.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryCreationForm.content.mjs +1 -0
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryCreationForm.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.cjs +2 -3
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.mjs +3 -4
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.cjs +5 -5
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs +6 -6
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.cjs +2 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.d.ts +3 -24
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.mjs +1 -0
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.cjs +2 -3
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.cjs +2 -1
- 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 +1 -0
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.mjs +3 -4
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.cjs +6 -10
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs +9 -13
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.cjs +8 -9
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.d.ts +1 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.mjs +10 -11
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.cjs +2 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.d.ts +1 -0
- package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.mjs +1 -0
- package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NodeTypeSelector.cjs +1 -2
- package/dist/components/DictionaryFieldEditor/NodeTypeSelector.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NodeTypeSelector.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/NodeTypeSelector.mjs +2 -3
- package/dist/components/DictionaryFieldEditor/NodeTypeSelector.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs +14 -14
- 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 +16 -16
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.cjs +2 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.d.ts +3 -24
- package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.mjs +1 -0
- package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/StructureView/StructureView.cjs +11 -12
- package/dist/components/DictionaryFieldEditor/StructureView/StructureView.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/StructureView/StructureView.mjs +13 -14
- package/dist/components/DictionaryFieldEditor/StructureView/StructureView.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/StructureView/structureView.content.cjs +3 -2
- package/dist/components/DictionaryFieldEditor/StructureView/structureView.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/StructureView/structureView.content.d.ts +1 -0
- package/dist/components/DictionaryFieldEditor/StructureView/structureView.content.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/StructureView/structureView.content.mjs +2 -1
- package/dist/components/DictionaryFieldEditor/StructureView/structureView.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.cjs +5 -8
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.mjs +7 -10
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcherContext.cjs +1 -1
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcherContext.mjs +1 -1
- package/dist/components/DictionaryFieldEditor/dictionaryFieldEditor.content.cjs +2 -1
- package/dist/components/DictionaryFieldEditor/dictionaryFieldEditor.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/dictionaryFieldEditor.content.d.ts +1 -0
- package/dist/components/DictionaryFieldEditor/dictionaryFieldEditor.content.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/dictionaryFieldEditor.content.mjs +1 -0
- package/dist/components/DictionaryFieldEditor/dictionaryFieldEditor.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.cjs +2 -1
- package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.d.ts +1 -0
- package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.mjs +1 -0
- package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.mjs.map +1 -1
- package/dist/components/DropDown/index.cjs +11 -2
- package/dist/components/DropDown/index.cjs.map +1 -1
- package/dist/components/DropDown/index.d.ts +7 -2
- package/dist/components/DropDown/index.d.ts.map +1 -1
- package/dist/components/DropDown/index.mjs +12 -3
- package/dist/components/DropDown/index.mjs.map +1 -1
- package/dist/components/EditableField/EditableFieldLayout.cjs +9 -9
- package/dist/components/EditableField/EditableFieldLayout.cjs.map +1 -1
- package/dist/components/EditableField/EditableFieldLayout.d.ts +1 -1
- package/dist/components/EditableField/EditableFieldLayout.d.ts.map +1 -1
- package/dist/components/EditableField/EditableFieldLayout.mjs +10 -10
- package/dist/components/EditableField/EditableFieldLayout.mjs.map +1 -1
- package/dist/components/EditableField/EditableFieldTextArea.cjs +1 -1
- package/dist/components/EditableField/EditableFieldTextArea.mjs +1 -1
- package/dist/components/ExpandCollapse/ExpandCollapse.cjs +56 -0
- package/dist/components/ExpandCollapse/ExpandCollapse.cjs.map +1 -0
- package/dist/components/ExpandCollapse/ExpandCollapse.d.ts +9 -0
- package/dist/components/ExpandCollapse/ExpandCollapse.d.ts.map +1 -0
- package/dist/components/ExpandCollapse/ExpandCollapse.mjs +56 -0
- package/dist/components/ExpandCollapse/ExpandCollapse.mjs.map +1 -0
- package/dist/components/ExpandCollapse/expandCollapse.content.cjs +41 -0
- package/dist/components/ExpandCollapse/expandCollapse.content.cjs.map +1 -0
- package/dist/components/ExpandCollapse/expandCollapse.content.d.ts +40 -0
- package/dist/components/ExpandCollapse/expandCollapse.content.d.ts.map +1 -0
- package/dist/components/ExpandCollapse/expandCollapse.content.mjs +42 -0
- package/dist/components/ExpandCollapse/expandCollapse.content.mjs.map +1 -0
- package/dist/components/ExpandCollapse/index.cjs +5 -0
- package/dist/components/ExpandCollapse/index.cjs.map +1 -0
- package/dist/components/ExpandCollapse/index.d.ts +2 -0
- package/dist/components/ExpandCollapse/index.d.ts.map +1 -0
- package/dist/components/ExpandCollapse/index.mjs +5 -0
- package/dist/components/ExpandCollapse/index.mjs.map +1 -0
- package/dist/components/Form/FormBase.cjs +1 -1
- package/dist/components/Form/FormBase.mjs +1 -1
- package/dist/components/Form/elements/FormElementWrapper.cjs +2 -2
- package/dist/components/Form/elements/FormElementWrapper.mjs +2 -2
- package/dist/components/IDE/Code.cjs +12 -1
- package/dist/components/IDE/Code.cjs.map +1 -1
- package/dist/components/IDE/Code.d.ts +1 -0
- package/dist/components/IDE/Code.d.ts.map +1 -1
- package/dist/components/IDE/Code.mjs +12 -1
- package/dist/components/IDE/Code.mjs.map +1 -1
- package/dist/components/IDE/CodeBlockClient.cjs +2 -2
- package/dist/components/IDE/CodeBlockClient.cjs.map +1 -1
- package/dist/components/IDE/CodeBlockClient.mjs +2 -2
- package/dist/components/IDE/CodeBlockClient.mjs.map +1 -1
- package/dist/components/IDE/CodeBlockServer.cjs +2 -2
- package/dist/components/IDE/CodeBlockServer.cjs.map +1 -1
- package/dist/components/IDE/CodeBlockServer.mjs +2 -2
- package/dist/components/IDE/CodeBlockServer.mjs.map +1 -1
- package/dist/components/IDE/CodeContext.cjs +1 -1
- package/dist/components/IDE/CodeContext.mjs +1 -1
- package/dist/components/IDE/CopyCode.cjs +2 -3
- package/dist/components/IDE/CopyCode.cjs.map +1 -1
- package/dist/components/IDE/CopyCode.d.ts.map +1 -1
- package/dist/components/IDE/CopyCode.mjs +4 -5
- package/dist/components/IDE/CopyCode.mjs.map +1 -1
- package/dist/components/Input/Checkbox.cjs +21 -0
- package/dist/components/Input/Checkbox.cjs.map +1 -1
- package/dist/components/Input/Checkbox.d.ts +21 -1
- package/dist/components/Input/Checkbox.d.ts.map +1 -1
- package/dist/components/Input/Checkbox.mjs +21 -0
- package/dist/components/Input/Checkbox.mjs.map +1 -1
- package/dist/components/Input/Input.cjs +12 -0
- package/dist/components/Input/Input.cjs.map +1 -1
- package/dist/components/Input/Input.d.ts +13 -2
- package/dist/components/Input/Input.d.ts.map +1 -1
- package/dist/components/Input/Input.mjs +12 -0
- package/dist/components/Input/Input.mjs.map +1 -1
- package/dist/components/Input/index.cjs +4 -0
- package/dist/components/Input/index.cjs.map +1 -1
- package/dist/components/Input/index.mjs +6 -2
- package/dist/components/Link/Link.cjs +60 -19
- package/dist/components/Link/Link.cjs.map +1 -1
- package/dist/components/Link/Link.d.ts +27 -2
- package/dist/components/Link/Link.d.ts.map +1 -1
- package/dist/components/Link/Link.mjs +60 -19
- package/dist/components/Link/Link.mjs.map +1 -1
- package/dist/components/Link/index.cjs +3 -0
- package/dist/components/Link/index.cjs.map +1 -1
- package/dist/components/Link/index.mjs +4 -1
- package/dist/components/Loader/index.content.d.ts +2 -24
- package/dist/components/Loader/index.content.d.ts.map +1 -1
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.cjs +8 -9
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.cjs.map +1 -1
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.d.ts.map +1 -1
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.mjs +11 -12
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.mjs.map +1 -1
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.cjs +1 -1
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.mjs +1 -1
- package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.cjs +4 -5
- 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 +6 -7
- package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.mjs.map +1 -1
- package/dist/components/MarkDownRender/index.cjs +17 -23
- package/dist/components/MarkDownRender/index.cjs.map +1 -1
- package/dist/components/MarkDownRender/index.d.ts.map +1 -1
- package/dist/components/MarkDownRender/index.mjs +18 -24
- package/dist/components/MarkDownRender/index.mjs.map +1 -1
- package/dist/components/Modal/Modal.cjs +14 -5
- package/dist/components/Modal/Modal.cjs.map +1 -1
- package/dist/components/Modal/Modal.d.ts +10 -4
- package/dist/components/Modal/Modal.d.ts.map +1 -1
- package/dist/components/Modal/Modal.mjs +16 -7
- package/dist/components/Modal/Modal.mjs.map +1 -1
- package/dist/components/Modal/index.cjs +1 -0
- package/dist/components/Modal/index.cjs.map +1 -1
- package/dist/components/Modal/index.mjs +3 -2
- package/dist/components/Navbar/DesktopNavbar.cjs +2 -2
- package/dist/components/Navbar/DesktopNavbar.cjs.map +1 -1
- package/dist/components/Navbar/DesktopNavbar.d.ts.map +1 -1
- package/dist/components/Navbar/DesktopNavbar.mjs +3 -3
- package/dist/components/Navbar/DesktopNavbar.mjs.map +1 -1
- package/dist/components/Navbar/MobileNavbar.cjs +1 -1
- package/dist/components/Navbar/MobileNavbar.mjs +1 -1
- package/dist/components/Navbar/index.cjs +2 -2
- package/dist/components/Navbar/index.cjs.map +1 -1
- package/dist/components/Navbar/index.mjs +2 -2
- package/dist/components/Navbar/index.mjs.map +1 -1
- package/dist/components/Popover/index.cjs +12 -0
- package/dist/components/Popover/index.cjs.map +1 -1
- package/dist/components/Popover/index.d.ts +10 -2
- package/dist/components/Popover/index.d.ts.map +1 -1
- package/dist/components/Popover/index.mjs +13 -1
- package/dist/components/Popover/index.mjs.map +1 -1
- package/dist/components/RightDrawer/RightDrawer.cjs +5 -5
- package/dist/components/RightDrawer/RightDrawer.cjs.map +1 -1
- package/dist/components/RightDrawer/RightDrawer.mjs +6 -6
- package/dist/components/RightDrawer/RightDrawer.mjs.map +1 -1
- package/dist/components/Select/Multiselect.cjs +1 -1
- package/dist/components/Select/Multiselect.cjs.map +1 -1
- package/dist/components/Select/Multiselect.mjs +2 -2
- package/dist/components/Select/Multiselect.mjs.map +1 -1
- package/dist/components/Select/Select.cjs +12 -1
- package/dist/components/Select/Select.cjs.map +1 -1
- package/dist/components/Select/Select.d.ts +5 -1
- package/dist/components/Select/Select.d.ts.map +1 -1
- package/dist/components/Select/Select.mjs +12 -1
- package/dist/components/Select/Select.mjs.map +1 -1
- package/dist/components/Select/index.cjs +1 -0
- package/dist/components/Select/index.cjs.map +1 -1
- package/dist/components/Select/index.mjs +2 -1
- package/dist/components/SocialNetworks/index.cjs +1 -1
- package/dist/components/SocialNetworks/index.cjs.map +1 -1
- package/dist/components/SocialNetworks/index.mjs +1 -1
- package/dist/components/SocialNetworks/index.mjs.map +1 -1
- package/dist/components/SwitchSelector/index.cjs +89 -18
- package/dist/components/SwitchSelector/index.cjs.map +1 -1
- package/dist/components/SwitchSelector/index.d.ts +16 -2
- package/dist/components/SwitchSelector/index.d.ts.map +1 -1
- package/dist/components/SwitchSelector/index.mjs +90 -19
- package/dist/components/SwitchSelector/index.mjs.map +1 -1
- package/dist/components/TabSelector/TabSelector.cjs +12 -1
- package/dist/components/TabSelector/TabSelector.cjs.map +1 -1
- package/dist/components/TabSelector/TabSelector.d.ts +12 -1
- package/dist/components/TabSelector/TabSelector.d.ts.map +1 -1
- package/dist/components/TabSelector/TabSelector.mjs +13 -2
- package/dist/components/TabSelector/TabSelector.mjs.map +1 -1
- package/dist/components/TabSelector/index.cjs +1 -0
- package/dist/components/TabSelector/index.cjs.map +1 -1
- package/dist/components/TabSelector/index.d.ts +1 -0
- package/dist/components/TabSelector/index.d.ts.map +1 -1
- package/dist/components/TabSelector/index.mjs +3 -2
- package/dist/components/Table/Table.cjs +58 -0
- package/dist/components/Table/Table.cjs.map +1 -0
- package/dist/components/Table/Table.d.ts +7 -0
- package/dist/components/Table/Table.d.ts.map +1 -0
- package/dist/components/Table/Table.mjs +58 -0
- package/dist/components/Table/Table.mjs.map +1 -0
- package/dist/components/Table/index.cjs +5 -0
- package/dist/components/Table/index.cjs.map +1 -0
- package/dist/components/Table/index.d.ts +2 -0
- package/dist/components/Table/index.d.ts.map +1 -0
- package/dist/components/Table/index.mjs +5 -0
- package/dist/components/Table/index.mjs.map +1 -0
- package/dist/components/Table/table.content.cjs +24 -0
- package/dist/components/Table/table.content.cjs.map +1 -0
- package/dist/components/Table/table.content.d.ts +40 -0
- package/dist/components/Table/table.content.d.ts.map +1 -0
- package/dist/components/Table/table.content.mjs +25 -0
- package/dist/components/Table/table.content.mjs.map +1 -0
- package/dist/components/Tag/index.cjs +131 -22
- package/dist/components/Tag/index.cjs.map +1 -1
- package/dist/components/Tag/index.d.ts +37 -5
- package/dist/components/Tag/index.d.ts.map +1 -1
- package/dist/components/Tag/index.mjs +132 -23
- package/dist/components/Tag/index.mjs.map +1 -1
- package/dist/components/TextArea/AutocompleteTextArea.cjs +1 -1
- package/dist/components/TextArea/AutocompleteTextArea.mjs +1 -1
- package/dist/components/TextArea/TextArea.cjs.map +1 -1
- package/dist/components/TextArea/TextArea.d.ts +5 -3
- package/dist/components/TextArea/TextArea.d.ts.map +1 -1
- package/dist/components/TextArea/TextArea.mjs.map +1 -1
- package/dist/components/ThemeSwitcherDropDown/DesktopThemeSwitcher.cjs +1 -1
- package/dist/components/ThemeSwitcherDropDown/DesktopThemeSwitcher.cjs.map +1 -1
- package/dist/components/ThemeSwitcherDropDown/DesktopThemeSwitcher.mjs +2 -2
- package/dist/components/ThemeSwitcherDropDown/DesktopThemeSwitcher.mjs.map +1 -1
- package/dist/components/index.cjs +36 -0
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.mjs +49 -13
- package/dist/components/index.mjs.map +1 -1
- package/dist/hooks/auth.cjs +2 -2
- package/dist/hooks/auth.cjs.map +1 -1
- package/dist/hooks/auth.mjs +1 -1
- package/dist/hooks/auth.mjs.map +1 -1
- package/dist/hooks/intlayerAPIHooks.cjs +1 -1
- package/dist/hooks/intlayerAPIHooks.d.ts +1 -1
- package/dist/hooks/intlayerAPIHooks.d.ts.map +1 -1
- package/dist/hooks/intlayerAPIHooks.mjs +1 -1
- package/dist/hooks/useAsync/useAsync.cjs +6 -6
- package/dist/hooks/useAsync/useAsync.cjs.map +1 -1
- package/dist/hooks/useAsync/useAsync.mjs +6 -6
- package/dist/hooks/useAsync/useAsync.mjs.map +1 -1
- package/dist/hooks/useUser/index.cjs +1 -1
- package/dist/hooks/useUser/index.mjs +1 -1
- package/dist/index-BCuMWKyy.js.map +1 -1
- package/dist/index-BYzBot7l.cjs.map +1 -1
- package/dist/{parse-BJVwmz92.cjs → parse-Ltyyb1op.cjs} +9 -11
- package/dist/parse-Ltyyb1op.cjs.map +1 -0
- package/dist/{parse-pnJgclyf.js → parse-Vrm0h1r9.js} +30 -32
- package/dist/parse-Vrm0h1r9.js.map +1 -0
- package/dist/{schemas-BIuxHDyZ.js → schemas-DEXdAbCK.js} +75 -46
- package/dist/schemas-DEXdAbCK.js.map +1 -0
- package/dist/{schemas-Q6C7ZNs3.cjs → schemas-lh5OFOvX.cjs} +75 -46
- package/dist/schemas-lh5OFOvX.cjs.map +1 -0
- package/dist/{zod-K7y5gPX4.cjs → zod-BvUVjPTw.cjs} +11 -11
- package/dist/zod-BvUVjPTw.cjs.map +1 -0
- package/dist/{zod-D4WapgbL.js → zod-CJrbzxwg.js} +11 -11
- package/dist/zod-CJrbzxwg.js.map +1 -0
- package/package.json +42 -35
- package/dist/better-auth.8zoxzg-F-BEBqzpjz.cjs.map +0 -1
- package/dist/better-auth.8zoxzg-F-D8e0X4ys.js.map +0 -1
- package/dist/components/Headers/SectionScroller.cjs +0 -29
- package/dist/components/Headers/SectionScroller.cjs.map +0 -1
- package/dist/components/Headers/SectionScroller.d.ts +0 -2
- package/dist/components/Headers/SectionScroller.d.ts.map +0 -1
- package/dist/components/Headers/SectionScroller.mjs +0 -29
- package/dist/components/Headers/SectionScroller.mjs.map +0 -1
- package/dist/components/IDE/CopyButton.content.cjs.map +0 -1
- package/dist/components/IDE/CopyButton.content.d.ts.map +0 -1
- package/dist/components/IDE/CopyButton.content.mjs.map +0 -1
- package/dist/parse-BJVwmz92.cjs.map +0 -1
- package/dist/parse-pnJgclyf.js.map +0 -1
- package/dist/schemas-BIuxHDyZ.js.map +0 -1
- package/dist/schemas-Q6C7ZNs3.cjs.map +0 -1
- package/dist/zod-D4WapgbL.js.map +0 -1
- package/dist/zod-K7y5gPX4.cjs.map +0 -1
- /package/dist/components/{IDE → CopyButton}/CopyButton.content.cjs +0 -0
- /package/dist/components/{IDE → CopyButton}/CopyButton.content.d.ts +0 -0
- /package/dist/components/{IDE → CopyButton}/CopyButton.content.mjs +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../src/components/CopyButton/index.tsx"],"sourcesContent":["'use client';\n\nimport { CopyCheckIcon, CopyIcon } from 'lucide-react';\nimport { useEffect, useState, type FC } from 'react';\nimport {
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../src/components/CopyButton/index.tsx"],"sourcesContent":["'use client';\n\nimport { CopyCheckIcon, CopyIcon } from 'lucide-react';\nimport { useEffect, useState, type FC } from 'react';\nimport { useIntlayer } from 'react-intlayer';\nimport {\n Button,\n ButtonColor,\n ButtonProps,\n ButtonSize,\n ButtonVariant,\n} from '../Button';\n\ntype CopyButtonProps = {\n content: string;\n} & Partial<ButtonProps>;\n\nexport const CopyButton: FC<CopyButtonProps> = ({ content, ...props }) => {\n const [copied, setCopied] = useState(false);\n const { label } = useIntlayer('copy-button');\n\n const handleCopy = async () => {\n try {\n await navigator.clipboard.writeText(content);\n setCopied(true);\n } catch (error) {\n console.error('Failed to copy text: ', error);\n }\n };\n\n useEffect(() => {\n const timer = setTimeout(() => {\n setCopied(false);\n }, 1000);\n return () => clearTimeout(timer);\n }, [copied]);\n\n return (\n <Button\n Icon={copied ? CopyCheckIcon : CopyIcon}\n onClick={handleCopy}\n variant={ButtonVariant.HOVERABLE}\n color={ButtonColor.TEXT}\n size={ButtonSize.ICON_SM}\n {...props}\n label={props.label ?? label.value}\n />\n );\n};\n"],"names":[],"mappings":";;;;;;AAiBO,MAAM,aAAkC,CAAC,EAAE,SAAS,GAAG,YAAY;AACxE,QAAM,CAAC,QAAQ,SAAS,IAAI,SAAS,KAAK;AAC1C,QAAM,EAAE,MAAA,IAAU,YAAY,aAAa;AAE3C,QAAM,aAAa,YAAY;AAC7B,QAAI;AACF,YAAM,UAAU,UAAU,UAAU,OAAO;AAC3C,gBAAU,IAAI;AAAA,IAChB,SAAS,OAAO;AACd,cAAQ,MAAM,yBAAyB,KAAK;AAAA,IAC9C;AAAA,EACF;AAEA,YAAU,MAAM;AACd,UAAM,QAAQ,WAAW,MAAM;AAC7B,gBAAU,KAAK;AAAA,IACjB,GAAG,GAAI;AACP,WAAO,MAAM,aAAa,KAAK;AAAA,EACjC,GAAG,CAAC,MAAM,CAAC;AAEX,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,MAAM,SAAS,gBAAgB;AAAA,MAC/B,SAAS;AAAA,MACT,SAAS,cAAc;AAAA,MACvB,OAAO,YAAY;AAAA,MACnB,MAAM,WAAW;AAAA,MAChB,GAAG;AAAA,MACJ,OAAO,MAAM,SAAS,MAAM;AAAA,IAAA;AAAA,EAAA;AAGlC;"}
|
|
@@ -8,7 +8,7 @@ const lucideReact = require("lucide-react");
|
|
|
8
8
|
const ReactExports = require("react");
|
|
9
9
|
const reactIntlayer = require("react-intlayer");
|
|
10
10
|
require("@intlayer/config/built");
|
|
11
|
-
require("../../../better-auth.
|
|
11
|
+
require("../../../better-auth.CMQ3rA-I-C2nBKRMa.cjs");
|
|
12
12
|
const hooks_intlayerAPIHooks = require("../../../hooks/intlayerAPIHooks.cjs");
|
|
13
13
|
require("../../../hooks/useAsync/useAsyncStateStore.cjs");
|
|
14
14
|
require("@intlayer/api");
|
|
@@ -19,18 +19,16 @@ const components_Button_Button = require("../../Button/Button.cjs");
|
|
|
19
19
|
const components_Container_index = require("../../Container/index.cjs");
|
|
20
20
|
const components_ContentEditor_ContentEditorInput = require("../../ContentEditor/ContentEditorInput.cjs");
|
|
21
21
|
const components_ContentEditor_ContentEditorTextArea = require("../../ContentEditor/ContentEditorTextArea.cjs");
|
|
22
|
+
const components_Input_Input = require("../../Input/Input.cjs");
|
|
23
|
+
require("../../Input/Checkbox.cjs");
|
|
22
24
|
const components_Label_index = require("../../Label/index.cjs");
|
|
23
25
|
require("@intlayer/config/client");
|
|
24
26
|
require("fuse.js");
|
|
25
27
|
require("../../DropDown/index.cjs");
|
|
26
|
-
require("../../Input/Input.cjs");
|
|
27
|
-
require("../../Input/Checkbox.cjs");
|
|
28
28
|
const components_SwitchSelector_index = require("../../SwitchSelector/index.cjs");
|
|
29
|
-
require("../../LocaleSwitcherContentDropDown/localeSwitcher.content.cjs");
|
|
30
29
|
const components_LocaleSwitcherContentDropDown_LocaleSwitcherContentContext = require("../../LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.cjs");
|
|
31
30
|
const components_MarkDownRender_index = require("../../MarkDownRender/index.cjs");
|
|
32
31
|
const components_DictionaryFieldEditor_EnumKeyInput = require("../EnumKeyInput.cjs");
|
|
33
|
-
const components_DictionaryFieldEditor_NavigationView_navigationViewNode_content = require("../NavigationView/navigationViewNode.content.cjs");
|
|
34
32
|
const traceKeys = ["filePath", "id", "nodeType"];
|
|
35
33
|
const ContentEditorTextArea = ({
|
|
36
34
|
keyPath,
|
|
@@ -43,16 +41,16 @@ const ContentEditorTextArea = ({
|
|
|
43
41
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
44
42
|
components_ContentEditor_ContentEditorTextArea.ContentEditorTextArea,
|
|
45
43
|
{
|
|
46
|
-
variant:
|
|
44
|
+
variant: components_Input_Input.InputVariant.DEFAULT,
|
|
47
45
|
onContentChange: (newValue) => addEditedContent(dictionary.key, newValue, keyPath),
|
|
48
46
|
additionalButtons: /* @__PURE__ */ jsxRuntime.jsx(
|
|
49
47
|
components_Button_Button.Button,
|
|
50
48
|
{
|
|
51
49
|
Icon: lucideReact.WandSparkles,
|
|
52
50
|
label: "Audit",
|
|
53
|
-
variant:
|
|
54
|
-
size:
|
|
55
|
-
color:
|
|
51
|
+
variant: components_Button_Button.ButtonVariant.HOVERABLE,
|
|
52
|
+
size: components_Button_Button.ButtonSize.ICON_SM,
|
|
53
|
+
color: components_Button_Button.ButtonColor.TEXT,
|
|
56
54
|
className: "cursor-pointer hover:scale-110",
|
|
57
55
|
isLoading: isAuditing,
|
|
58
56
|
onClick: () => {
|
|
@@ -93,7 +91,7 @@ const ContentEditorInput = ({
|
|
|
93
91
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
94
92
|
components_ContentEditor_ContentEditorInput.ContentEditorInput,
|
|
95
93
|
{
|
|
96
|
-
variant:
|
|
94
|
+
variant: components_Input_Input.InputVariant.DEFAULT,
|
|
97
95
|
onContentChange: (newValue) => addEditedContent(dictionary.key, newValue, keyPath),
|
|
98
96
|
...props
|
|
99
97
|
}
|
|
@@ -121,8 +119,8 @@ const ContentEditorToggle = ({
|
|
|
121
119
|
choices: toggleContent,
|
|
122
120
|
value: true,
|
|
123
121
|
onChange: (value) => addEditedContent(dictionary.key, value, keyPath),
|
|
124
|
-
color:
|
|
125
|
-
size:
|
|
122
|
+
color: components_SwitchSelector_index.SwitchSelectorColor.TEXT,
|
|
123
|
+
size: components_SwitchSelector_index.SwitchSelectorSize.SM,
|
|
126
124
|
...props
|
|
127
125
|
}
|
|
128
126
|
);
|
|
@@ -166,9 +164,7 @@ const EnumerationTextEditor = ({
|
|
|
166
164
|
renderSection
|
|
167
165
|
}) => {
|
|
168
166
|
const { addEditedContent } = editorReact.useEditedContent();
|
|
169
|
-
const { addNewEnumeration, removeEnumeration } = reactIntlayer.
|
|
170
|
-
components_DictionaryFieldEditor_NavigationView_navigationViewNode_content.navigationViewContent
|
|
171
|
-
);
|
|
167
|
+
const { addNewEnumeration, removeEnumeration } = reactIntlayer.useIntlayer("navigation-view");
|
|
172
168
|
const content = section[core.NodeType.Enumeration];
|
|
173
169
|
const firstKey = Object.keys(content)[0];
|
|
174
170
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
@@ -184,8 +180,8 @@ const EnumerationTextEditor = ({
|
|
|
184
180
|
components_Button_Button.Button,
|
|
185
181
|
{
|
|
186
182
|
label: removeEnumeration.label.value,
|
|
187
|
-
variant:
|
|
188
|
-
color:
|
|
183
|
+
variant: components_Button_Button.ButtonVariant.HOVERABLE,
|
|
184
|
+
color: components_Button_Button.ButtonColor.TEXT,
|
|
189
185
|
Icon: lucideReact.Trash,
|
|
190
186
|
className: "ml-auto",
|
|
191
187
|
onClick: () => addEditedContent(
|
|
@@ -230,9 +226,9 @@ const EnumerationTextEditor = ({
|
|
|
230
226
|
components_Button_Button.Button,
|
|
231
227
|
{
|
|
232
228
|
label: addNewEnumeration.label.value,
|
|
233
|
-
variant:
|
|
234
|
-
color:
|
|
235
|
-
textAlign:
|
|
229
|
+
variant: components_Button_Button.ButtonVariant.HOVERABLE,
|
|
230
|
+
color: components_Button_Button.ButtonColor.NEUTRAL,
|
|
231
|
+
textAlign: components_Button_Button.ButtonTextAlign.LEFT,
|
|
236
232
|
isFullWidth: true,
|
|
237
233
|
onClick: () => addEditedContent(
|
|
238
234
|
dictionary.key,
|
|
@@ -279,7 +275,7 @@ const ArrayTextEditor = ({
|
|
|
279
275
|
renderSection
|
|
280
276
|
}) => {
|
|
281
277
|
const { addEditedContent } = editorReact.useEditedContent();
|
|
282
|
-
const { addNewElement, removeElement } = reactIntlayer.
|
|
278
|
+
const { addNewElement, removeElement } = reactIntlayer.useIntlayer("navigation-view");
|
|
283
279
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
284
280
|
/* @__PURE__ */ jsxRuntime.jsx("table", { className: "w-full", children: /* @__PURE__ */ jsxRuntime.jsx("tbody", { className: "flex w-full flex-col gap-2", children: section.map((subSection, index) => /* @__PURE__ */ jsxRuntime.jsxs(ReactExports.Fragment, { children: [
|
|
285
281
|
/* @__PURE__ */ jsxRuntime.jsxs("tr", { className: "mt-2 flex w-full justify-between gap-2 p-2", children: [
|
|
@@ -288,10 +284,10 @@ const ArrayTextEditor = ({
|
|
|
288
284
|
components_Button_Button.Button,
|
|
289
285
|
{
|
|
290
286
|
label: removeElement.label.value,
|
|
291
|
-
variant:
|
|
292
|
-
color:
|
|
287
|
+
variant: components_Button_Button.ButtonVariant.HOVERABLE,
|
|
288
|
+
color: components_Button_Button.ButtonColor.NEUTRAL,
|
|
293
289
|
className: "ml-auto",
|
|
294
|
-
textAlign:
|
|
290
|
+
textAlign: components_Button_Button.ButtonTextAlign.LEFT,
|
|
295
291
|
onClick: () => {
|
|
296
292
|
const newKeyPath = [
|
|
297
293
|
...keyPath,
|
|
@@ -327,9 +323,9 @@ const ArrayTextEditor = ({
|
|
|
327
323
|
components_Button_Button.Button,
|
|
328
324
|
{
|
|
329
325
|
label: addNewElement.label.value,
|
|
330
|
-
variant:
|
|
331
|
-
color:
|
|
332
|
-
textAlign:
|
|
326
|
+
variant: components_Button_Button.ButtonVariant.HOVERABLE,
|
|
327
|
+
color: components_Button_Button.ButtonColor.NEUTRAL,
|
|
328
|
+
textAlign: components_Button_Button.ButtonTextAlign.LEFT,
|
|
333
329
|
isFullWidth: true,
|
|
334
330
|
onClick: () => {
|
|
335
331
|
const newKeyPath = [
|
|
@@ -421,8 +417,8 @@ const MarkdownTextEditor = ({
|
|
|
421
417
|
choices: toggleContent2,
|
|
422
418
|
value: mode,
|
|
423
419
|
onChange: setMode,
|
|
424
|
-
color:
|
|
425
|
-
size:
|
|
420
|
+
color: components_SwitchSelector_index.SwitchSelectorColor.TEXT,
|
|
421
|
+
size: components_SwitchSelector_index.SwitchSelectorSize.SM,
|
|
426
422
|
className: "ml-auto"
|
|
427
423
|
}
|
|
428
424
|
),
|
|
@@ -494,7 +490,7 @@ const NestedTextEditor = ({
|
|
|
494
490
|
{
|
|
495
491
|
"aria-label": "Edit field",
|
|
496
492
|
type: "text",
|
|
497
|
-
variant:
|
|
493
|
+
variant: components_Input_Input.InputVariant.DEFAULT,
|
|
498
494
|
...props,
|
|
499
495
|
onContentChange: (newValue) => {
|
|
500
496
|
addEditedContent(
|
|
@@ -515,7 +511,7 @@ const NestedTextEditor = ({
|
|
|
515
511
|
{
|
|
516
512
|
"aria-label": "Edit field",
|
|
517
513
|
type: "text",
|
|
518
|
-
variant:
|
|
514
|
+
variant: components_Input_Input.InputVariant.DEFAULT,
|
|
519
515
|
...props,
|
|
520
516
|
onContentChange: (newValue) => {
|
|
521
517
|
addEditedContent(
|
|
@@ -539,7 +535,7 @@ const TextEditor = ({
|
|
|
539
535
|
renderSection,
|
|
540
536
|
isDarkMode
|
|
541
537
|
}) => {
|
|
542
|
-
const { tsxNotEditable } = reactIntlayer.
|
|
538
|
+
const { tsxNotEditable } = reactIntlayer.useIntlayer("navigation-view");
|
|
543
539
|
const nodeType = core.getNodeType(section);
|
|
544
540
|
if (nodeType === core.NodeType.ReactNode) {
|
|
545
541
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
@@ -662,7 +658,7 @@ const TextEditor = ({
|
|
|
662
658
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full p-2", children: typeof renderSection === "function" ? renderSection(section) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
663
659
|
ContentEditorTextArea,
|
|
664
660
|
{
|
|
665
|
-
variant:
|
|
661
|
+
variant: components_Input_Input.InputVariant.DEFAULT,
|
|
666
662
|
"aria-label": "Edit field",
|
|
667
663
|
keyPath,
|
|
668
664
|
dictionary,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextEditor.cjs","sources":["../../../../src/components/DictionaryFieldEditor/ContentEditorView/TextEditor.tsx"],"sourcesContent":["'use client';\n\nimport type { Locales } from '@intlayer/config';\nimport {\n type ConditionContent,\n type ContentNode,\n type Dictionary,\n type EnumerationContent,\n type KeyPath,\n type MarkdownContent,\n type NestedContent,\n type TranslationContent,\n FileContent,\n getEmptyNode,\n getLocaleName,\n getNodeType,\n InsertionContent,\n NodeType,\n} from '@intlayer/core';\nimport { useConfiguration, useEditedContent } from '@intlayer/editor-react';\nimport { Plus, Trash, WandSparkles } from 'lucide-react';\nimport { type FC, Fragment, ReactNode, useState } from 'react';\nimport { useDictionary, useLocale } from 'react-intlayer';\nimport { useAuditContentDeclarationField } from '../../../hooks';\nimport { renameKey } from '../../../utils/object';\nimport { Button } from '../../Button';\nimport { Container } from '../../Container';\nimport {\n type ContentEditorInputProps as ContentEditorInputPropsBase,\n ContentEditorInput as ContentEditorInputBase,\n} from '../../ContentEditor/ContentEditorInput';\nimport {\n type ContentEditorTextAreaProps as ContentEditorTextAreaPropsBase,\n ContentEditorTextArea as ContentEditorTextAreaBase,\n} from '../../ContentEditor/ContentEditorTextArea';\nimport { Label } from '../../Label';\nimport { useLocaleSwitcherContent } from '../../LocaleSwitcherContentDropDown';\nimport { MarkdownRenderer } from '../../MarkDownRender';\nimport {\n type SwitchSelectorChoices,\n type SwitchSelectorProps,\n SwitchSelector,\n} from '../../SwitchSelector';\nimport { EnumKeyInput } from '../EnumKeyInput';\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};\n\nconst ContentEditorTextArea: FC<ContentEditorTextAreaProps> = ({\n keyPath,\n dictionary,\n ...props\n}) => {\n const { editedContent, addEditedContent } = useEditedContent();\n const configuration = useConfiguration();\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({\n ...dictionary,\n ...(editedContent?.[dictionary.key] ?? {}),\n }),\n keyPath,\n locales: configuration.internationalization.locales ?? [],\n aiOptions: {\n apiKey: configuration.ai?.apiKey,\n model: configuration.ai?.model,\n temperature: configuration.ai?.temperature,\n },\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\ntype ContentEditorInputProps = Omit<\n ContentEditorInputPropsBase,\n 'onContentChange'\n> & {\n keyPath: KeyPath[];\n dictionary: Dictionary;\n};\n\nconst ContentEditorInput: FC<ContentEditorInputProps> = ({\n keyPath,\n dictionary,\n ...props\n}) => {\n const { addEditedContent } = useEditedContent();\n\n return (\n <ContentEditorInputBase\n variant=\"default\"\n onContentChange={(newValue) =>\n addEditedContent(dictionary.key, newValue, keyPath)\n }\n {...props}\n />\n );\n};\n\nconst toggleContent = [\n {\n content: 'False',\n value: false,\n },\n {\n content: 'True',\n value: true,\n },\n] as SwitchSelectorChoices<boolean>;\n\ntype ContentEditorToggleProps = SwitchSelectorProps & {\n dictionary: Dictionary;\n keyPath: KeyPath[];\n};\n\nconst ContentEditorToggle: FC<ContentEditorToggleProps> = ({\n dictionary,\n keyPath,\n ...props\n}) => {\n const { addEditedContent } = useEditedContent();\n\n return (\n <SwitchSelector\n choices={toggleContent}\n value={true}\n onChange={(value) => addEditedContent(dictionary.key, value, keyPath)}\n color=\"text\"\n size=\"sm\"\n {...props}\n />\n );\n};\n\nexport type TextEditorProps = {\n dictionary: Dictionary;\n keyPath: KeyPath[];\n section: ContentNode;\n isDarkMode?: boolean;\n renderSection?: (content: string) => ReactNode;\n onContentChange?: (newValue: string) => void;\n};\n\nconst TranslationTextEditor: FC<TextEditorProps> = ({\n section,\n keyPath,\n dictionary,\n renderSection,\n}: TextEditorProps) => {\n const { locale, defaultLocale } = useLocale();\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 const content = (section as TranslationContent<string>)[NodeType.Translation];\n\n return (\n <table className=\"w-full\">\n <tbody className=\"flex w-full flex-col gap-2\">\n {localesList.map((translationKey) => (\n <Fragment key={translationKey}>\n <tr className=\"mt-2 w-full p-2 text-xs\">\n {getLocaleName(translationKey, locale)}\n </tr>\n <tr>\n <TextEditorContainer\n section={\n content[translationKey] ??\n getEmptyNode(content[defaultLocale])\n }\n keyPath={[\n ...keyPath,\n { type: NodeType.Translation, key: translationKey },\n ]}\n dictionary={dictionary}\n renderSection={renderSection}\n />\n </tr>\n </Fragment>\n ))}\n </tbody>\n </table>\n );\n};\n\nconst EnumerationTextEditor: FC<TextEditorProps> = ({\n section,\n keyPath,\n dictionary,\n renderSection,\n}) => {\n const { addEditedContent } = useEditedContent();\n const { addNewEnumeration, removeEnumeration } = useDictionary(\n navigationViewContent\n );\n\n const content = (section as EnumerationContent<string>)[NodeType.Enumeration];\n const firstKey = Object.keys(content)[0] as keyof typeof content;\n\n return (\n <div className=\"flex flex-col gap-2\">\n <table className=\"w-full\">\n <tbody className=\"flex w-full flex-col gap-2\">\n {Object.keys(\n (section as EnumerationContent<ContentNode>)[NodeType.Enumeration]\n ).map((enumKey) => {\n const childrenKeyPath = [\n ...keyPath,\n { type: NodeType.Enumeration },\n ] as KeyPath[];\n return (\n <Fragment key={enumKey}>\n <tr className=\"mt-2 w-full\">\n <div className=\"flex flex-1\">\n <Button\n label={removeEnumeration.label.value}\n variant=\"hoverable\"\n color=\"text\"\n Icon={Trash}\n className=\"ml-auto\"\n onClick={() =>\n addEditedContent(\n dictionary.key,\n undefined,\n childrenKeyPath\n )\n }\n >\n {removeEnumeration.text}\n </Button>\n </div>\n </tr>\n <tr className=\"w-full p-2\">\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 </tr>\n <tr className=\"block w-full\">\n <TextEditor\n section={\n content[enumKey as keyof typeof content] ??\n getEmptyNode(content[firstKey])\n }\n keyPath={childrenKeyPath}\n dictionary={dictionary}\n renderSection={renderSection}\n />\n </tr>\n </Fragment>\n );\n })}\n </tbody>\n </table>\n\n <Button\n label={addNewEnumeration.label.value}\n variant=\"hoverable\"\n color=\"neutral\"\n textAlign=\"left\"\n isFullWidth\n onClick={() =>\n addEditedContent(\n dictionary.key,\n getEmptyNode(content[firstKey]) ?? '',\n [...keyPath, { type: NodeType.Enumeration, key: 'unknown' }]\n )\n }\n Icon={Plus}\n className=\"m-2\"\n >\n {addNewEnumeration.text}\n </Button>\n </div>\n );\n};\n\nconst ConditionTextEditor: FC<TextEditorProps> = ({\n section,\n keyPath,\n dictionary,\n renderSection,\n}) => {\n const content = (section as ConditionContent<string>)[NodeType.Condition];\n\n return (\n <table className=\"w-full\">\n <tbody className=\"flex w-full flex-col gap-2\">\n {['true', 'false', 'fallback'].map((condKey) => (\n <Fragment key={condKey}>\n <tr key={condKey} className=\"mt-2 block w-full p-2 text-xs\">\n {String(condKey)}\n </tr>\n <tr key={condKey} className=\"block w-full\">\n <TextEditorContainer\n section={\n content[condKey as keyof typeof content] ??\n getEmptyNode(content['true'])\n }\n keyPath={[\n ...keyPath,\n {\n type: NodeType.Condition,\n key: condKey,\n } as KeyPath,\n ]}\n dictionary={dictionary}\n renderSection={renderSection}\n />\n </tr>\n </Fragment>\n ))}\n </tbody>\n </table>\n );\n};\n\nconst ArrayTextEditor: FC<TextEditorProps> = ({\n section,\n keyPath,\n dictionary,\n renderSection,\n}) => {\n const { addEditedContent } = useEditedContent();\n const { addNewElement, removeElement } = useDictionary(navigationViewContent);\n\n return (\n <div className=\"flex flex-col gap-2\">\n <table className=\"w-full\">\n <tbody className=\"flex w-full flex-col gap-2\">\n {(section as unknown as ContentNode[]).map((subSection, index) => (\n <Fragment key={JSON.stringify(subSection)}>\n <tr className=\"mt-2 flex w-full justify-between gap-2 p-2\">\n <span className=\"text-xs\">{String(index)}</span>\n <Button\n label={removeElement.label.value}\n variant=\"hoverable\"\n color=\"neutral\"\n className=\"ml-auto\"\n textAlign=\"left\"\n onClick={() => {\n const newKeyPath: KeyPath[] = [\n ...keyPath,\n {\n type: NodeType.Array,\n key: (section as unknown as ContentNode[]).length,\n },\n ];\n addEditedContent(dictionary.key, undefined, newKeyPath);\n }}\n Icon={Trash}\n >\n {removeElement.text}\n </Button>\n </tr>\n\n <tr className=\"block w-full\">\n <TextEditorContainer\n section={\n subSection ??\n getEmptyNode((section as unknown as ContentNode[])[0])\n }\n keyPath={[\n ...keyPath,\n {\n type: NodeType.Array,\n key: index,\n },\n ]}\n dictionary={dictionary}\n renderSection={renderSection}\n />\n </tr>\n </Fragment>\n ))}\n </tbody>\n </table>\n <Button\n label={addNewElement.label.value}\n variant=\"hoverable\"\n color=\"neutral\"\n textAlign=\"left\"\n isFullWidth\n onClick={() => {\n const newKeyPath: KeyPath[] = [\n ...keyPath,\n {\n type: NodeType.Array,\n key: (section as unknown as ContentNode[]).length,\n },\n ];\n addEditedContent(\n dictionary.key,\n getEmptyNode((section as unknown as ContentNode[])[0]) ?? '',\n newKeyPath,\n false\n );\n }}\n Icon={Plus}\n >\n {addNewElement.text}\n </Button>\n </div>\n );\n};\n\nconst ObjectTextEditor: FC<TextEditorProps> = ({\n section,\n keyPath,\n dictionary,\n renderSection,\n}) => (\n <>\n <table className=\"w-full\">\n <tbody className=\"flex flex-col gap-2\">\n {Object.keys(section as unknown as Record<string, ContentNode>).map(\n (key) => {\n const childKeyPath: KeyPath[] = [\n ...keyPath,\n { type: NodeType.Object, key },\n ];\n const typedSection = section as unknown as Record<\n string,\n ContentNode\n >;\n const firstKey = Object.keys(\n typedSection\n )[0] as keyof typeof section;\n const subSection =\n typedSection[key as keyof typeof section] ??\n getEmptyNode(typedSection[firstKey]);\n\n return (\n <Fragment key={key}>\n <tr\n key={JSON.stringify(subSection)}\n className=\"mt-2 p-2 text-xs\"\n >\n {String(key)}\n </tr>\n <tr key={JSON.stringify(subSection)} className=\"block w-full\">\n <TextEditor\n section={subSection}\n keyPath={childKeyPath}\n dictionary={dictionary}\n renderSection={renderSection}\n />\n </tr>\n </Fragment>\n );\n }\n )}\n </tbody>\n </table>\n </>\n);\n\nenum MarkdownViewMode {\n Edit,\n Preview,\n}\n\nconst MarkdownTextEditor: FC<TextEditorProps> = ({\n section,\n keyPath,\n dictionary,\n isDarkMode,\n onContentChange,\n}) => {\n const [mode, setMode] = useState(MarkdownViewMode.Edit);\n const toggleContent = [\n {\n content: 'Edit',\n value: MarkdownViewMode.Edit,\n },\n {\n content: 'Preview',\n value: MarkdownViewMode.Preview,\n },\n ] as SwitchSelectorChoices<MarkdownViewMode>;\n const childKeyPath: KeyPath[] = [...keyPath, { type: NodeType.Markdown }];\n\n const content = (section as MarkdownContent<ContentNode>)[\n NodeType.Markdown\n ] as ContentNode;\n\n return (\n <div className=\"flex w-full flex-col justify-center gap-6 p-2\">\n <SwitchSelector\n choices={toggleContent}\n value={mode}\n onChange={setMode}\n color=\"text\"\n size=\"sm\"\n className=\"ml-auto\"\n />\n\n <TextEditorContainer\n section={content}\n keyPath={childKeyPath}\n dictionary={dictionary}\n renderSection={\n mode === MarkdownViewMode.Preview\n ? (content) => (\n <MarkdownRenderer isDarkMode={isDarkMode}>\n {content}\n </MarkdownRenderer>\n )\n : undefined\n }\n onContentChange={onContentChange}\n />\n </div>\n );\n};\n\nconst InsertionTextEditor: FC<TextEditorProps> = ({\n section,\n keyPath,\n ...props\n}) => {\n const childKeyPath: KeyPath[] = [...keyPath, { type: NodeType.Insertion }];\n\n const content = (section as InsertionContent<ContentNode>)[\n NodeType.Insertion\n ];\n\n return (\n <div className=\"flex w-full flex-col justify-center gap-6 p-2\">\n <TextEditorContainer\n section={content}\n keyPath={childKeyPath}\n {...props}\n />\n </div>\n );\n};\n\nconst FileTextEditor: FC<TextEditorProps> = ({\n section,\n keyPath,\n ...props\n}) => {\n const childKeyPath: KeyPath[] = [...keyPath, { type: NodeType.File }];\n\n const fileUrl = (section as FileContent)[NodeType.File];\n const { content } = section as FileContent;\n\n return (\n <div className=\"flex w-full flex-col justify-center gap-6 p-2\">\n <span className=\"text-neutral text-sm\">{fileUrl} </span>\n <TextEditorContainer\n section={content}\n keyPath={childKeyPath}\n {...props}\n />\n </div>\n );\n};\n\nconst NestedTextEditor: FC<TextEditorProps> = ({\n keyPath,\n dictionary,\n renderSection,\n section,\n ...props\n}) => {\n const { addEditedContent } = useEditedContent();\n\n const content = (section as NestedContent)[NodeType.Nested];\n const childrenKeyPath = [...keyPath, { type: NodeType.Nested }] as KeyPath[];\n\n return (\n <div className=\"w-full p-2\">\n <Label>Dictionary key</Label>\n <ContentEditorInputBase\n aria-label=\"Edit field\"\n type=\"text\"\n variant=\"default\"\n {...props}\n onContentChange={(newValue) => {\n addEditedContent(\n dictionary.key,\n {\n ...content,\n dictionaryKey: String(newValue),\n },\n childrenKeyPath\n );\n }}\n >\n {content.dictionaryKey ?? ''}\n </ContentEditorInputBase>\n\n <Label>Path (optional)</Label>\n <ContentEditorInputBase\n aria-label=\"Edit field\"\n type=\"text\"\n variant=\"default\"\n {...props}\n onContentChange={(newValue) => {\n addEditedContent(\n dictionary.key,\n {\n ...content,\n path: newValue !== '' ? newValue : undefined,\n },\n childrenKeyPath\n );\n }}\n >\n {content.path ?? ''}\n </ContentEditorInputBase>\n </div>\n );\n};\n\nexport const TextEditor: FC<TextEditorProps> = ({\n section,\n keyPath,\n dictionary,\n renderSection,\n isDarkMode,\n}) => {\n const { tsxNotEditable } = useDictionary(navigationViewContent);\n const nodeType = getNodeType(section);\n\n if (nodeType === NodeType.ReactNode) {\n return (\n <>\n <span>[React Node]</span>\n <span className=\"text-neutral text-xs\">{tsxNotEditable}</span>\n </>\n );\n }\n\n if (nodeType === NodeType.Nested) {\n return (\n <NestedTextEditor\n dictionary={dictionary}\n renderSection={renderSection}\n keyPath={keyPath}\n section={section}\n />\n );\n }\n\n if (nodeType === NodeType.Translation) {\n return (\n <TranslationTextEditor\n dictionary={dictionary}\n renderSection={renderSection}\n keyPath={keyPath}\n section={section}\n />\n );\n }\n\n if (nodeType === NodeType.Enumeration) {\n return (\n <EnumerationTextEditor\n dictionary={dictionary}\n renderSection={renderSection}\n keyPath={keyPath}\n section={section}\n />\n );\n }\n\n if (nodeType === NodeType.Condition) {\n return (\n <ConditionTextEditor\n dictionary={dictionary}\n renderSection={renderSection}\n keyPath={keyPath}\n section={section}\n />\n );\n }\n\n if (nodeType === NodeType.Insertion) {\n return (\n <InsertionTextEditor\n dictionary={dictionary}\n renderSection={renderSection}\n keyPath={keyPath}\n section={section}\n />\n );\n }\n\n if (nodeType === NodeType.Markdown) {\n return (\n <MarkdownTextEditor\n dictionary={dictionary}\n keyPath={keyPath}\n section={section}\n isDarkMode={isDarkMode}\n />\n );\n }\n\n if (nodeType === NodeType.File) {\n return (\n <FileTextEditor\n dictionary={dictionary}\n renderSection={renderSection}\n keyPath={keyPath}\n section={section}\n />\n );\n }\n\n if (nodeType === NodeType.Array) {\n return (\n <ArrayTextEditor\n dictionary={dictionary}\n renderSection={renderSection}\n keyPath={keyPath}\n section={section}\n />\n );\n }\n\n if (nodeType === NodeType.Object) {\n return (\n <ObjectTextEditor\n dictionary={dictionary}\n renderSection={renderSection}\n keyPath={keyPath}\n section={section}\n />\n );\n }\n\n if (nodeType === NodeType.Number) {\n return (\n <div className=\"w-full p-2\">\n <ContentEditorInput\n dictionary={dictionary}\n keyPath={keyPath}\n type=\"number\"\n aria-label=\"Edit field\"\n >\n {section as number}\n </ContentEditorInput>\n </div>\n );\n }\n\n if (nodeType === NodeType.Text) {\n return (\n <div className=\"w-full p-2\">\n {typeof renderSection === 'function' ? (\n renderSection(section as string)\n ) : (\n <ContentEditorTextArea\n variant=\"default\"\n aria-label=\"Edit field\"\n keyPath={keyPath}\n dictionary={dictionary}\n >\n {section as string}\n </ContentEditorTextArea>\n )}\n </div>\n );\n }\n\n if (nodeType === NodeType.Boolean) {\n return (\n <div className=\"w-full p-2\">\n <ContentEditorToggle\n dictionary={dictionary}\n keyPath={keyPath}\n value={section as boolean}\n />\n </div>\n );\n }\n\n return (\n <div className=\"w-full p-2\">\n Error. Format not supported.\n {JSON.stringify(section, null, 2)}\n {JSON.stringify(keyPath, null, 2)}\n NodeType : {nodeType}\n </div>\n );\n};\n\nexport const TextEditorContainer: FC<TextEditorProps> = (props) => (\n <Container\n border\n background=\"none\"\n className=\"top-6 flex h-full flex-1 flex-col gap-6 overflow-hidden p-2 md:sticky\"\n roundedSize=\"xl\"\n >\n <TextEditor {...props} />\n </Container>\n);\n"],"names":["useEditedContent","useConfiguration","useAuditContentDeclarationField","jsx","ContentEditorTextAreaBase","Button","WandSparkles","editedContent","ContentEditorInputBase","SwitchSelector","useLocale","useLocaleSwitcherContent","NodeType","jsxs","Fragment","getLocaleName","getEmptyNode","useDictionary","navigationViewContent","Trash","EnumKeyInput","renameKey","Plus","useState","toggleContent","content","MarkdownRenderer","Label","getNodeType","Container"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8CO,MAAM,YAAsB,CAAC,YAAY,MAAM,UAAU;AAUhE,MAAM,wBAAwD,CAAC;AAAA,EAC7D;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,EAAE,eAAe,iBAAA,IAAqBA,6BAAA;AAC5C,QAAM,gBAAgBC,YAAAA,iBAAA;AACtB,QAAM,EAAE,8BAA8B,WAAW,WAAA,IAC/CC,uBAAAA,gCAAA;AAEF,SACEC,2BAAAA;AAAAA,IAACC,+CAAAA;AAAAA,IAAA;AAAA,MACC,SAAQ;AAAA,MACR,iBAAiB,CAAC,aAChB,iBAAiB,WAAW,KAAK,UAAU,OAAO;AAAA,MAEpD,mBACED,2BAAAA;AAAAA,QAACE,yBAAAA;AAAAA,QAAA;AAAA,UACC,MAAMC,YAAAA;AAAAA,UACN,OAAM;AAAA,UACN,SAAQ;AAAA,UACR,MAAK;AAAA,UACL,OAAM;AAAA,UACN,WAAU;AAAA,UACV,WAAW;AAAA,UACX,SAAS,MAAM;AACb,yCAA6B;AAAA,cAC3B,aAAa,KAAK,UAAU;AAAA,gBAC1B,GAAG;AAAA,gBACH,GAAI,gBAAgB,WAAW,GAAG,KAAK,CAAA;AAAA,cAAC,CACzC;AAAA,cACD;AAAA,cACA,SAAS,cAAc,qBAAqB,WAAW,CAAA;AAAA,cACvD,WAAW;AAAA,gBAC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AAEA,MAAI,aAAaS,KAAAA,SAAS,SAAS;AACjC,WACET,2BAAAA,IAAC,OAAA,EAAI,WAAU,cACb,UAAAA,2BAAAA;AAAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA,OAAO;AAAA,MAAA;AAAA,IAAA,GAEX;AAAA,EAEJ;AAEA,SACEU,2BAAAA,KAAC,OAAA,EAAI,WAAU,cAAa,UAAA;AAAA,IAAA;AAAA,IAEzB,KAAK,UAAU,SAAS,MAAM,CAAC;AAAA,IAC/B,KAAK,UAAU,SAAS,MAAM,CAAC;AAAA,IAAE;AAAA,IACtB;AAAA,EAAA,GACd;AAEJ;AAEO,MAAM,sBAA2C,CAAC,UACvDV,2BAAAA;AAAAA,EAAC0B,2BAAAA;AAAAA,EAAA;AAAA,IACC,QAAM;AAAA,IACN,YAAW;AAAA,IACX,WAAU;AAAA,IACV,aAAY;AAAA,IAEZ,UAAA1B,2BAAAA,IAAC,YAAA,EAAY,GAAG,MAAA,CAAO;AAAA,EAAA;AACzB;;;;"}
|
|
1
|
+
{"version":3,"file":"TextEditor.cjs","sources":["../../../../src/components/DictionaryFieldEditor/ContentEditorView/TextEditor.tsx"],"sourcesContent":["'use client';\n\nimport type { Locales } from '@intlayer/config';\nimport {\n type ConditionContent,\n type ContentNode,\n type Dictionary,\n type EnumerationContent,\n type KeyPath,\n type MarkdownContent,\n type NestedContent,\n type TranslationContent,\n FileContent,\n getEmptyNode,\n getLocaleName,\n getNodeType,\n InsertionContent,\n NodeType,\n} from '@intlayer/core';\nimport { useConfiguration, useEditedContent } from '@intlayer/editor-react';\nimport { Plus, Trash, WandSparkles } from 'lucide-react';\nimport { type FC, Fragment, ReactNode, useState } from 'react';\nimport { useIntlayer, useLocale } from 'react-intlayer';\nimport { useAuditContentDeclarationField } from '../../../hooks';\nimport { renameKey } from '../../../utils/object';\nimport {\n Button,\n ButtonColor,\n ButtonSize,\n ButtonTextAlign,\n ButtonVariant,\n} from '../../Button';\nimport { Container } from '../../Container';\nimport {\n type ContentEditorInputProps as ContentEditorInputPropsBase,\n ContentEditorInput as ContentEditorInputBase,\n} from '../../ContentEditor/ContentEditorInput';\nimport {\n type ContentEditorTextAreaProps as ContentEditorTextAreaPropsBase,\n ContentEditorTextArea as ContentEditorTextAreaBase,\n} from '../../ContentEditor/ContentEditorTextArea';\nimport { InputVariant } from '../../Input';\nimport { Label } from '../../Label';\nimport { useLocaleSwitcherContent } from '../../LocaleSwitcherContentDropDown';\nimport { MarkdownRenderer } from '../../MarkDownRender';\nimport {\n type SwitchSelectorChoices,\n type SwitchSelectorProps,\n SwitchSelector,\n SwitchSelectorColor,\n SwitchSelectorSize,\n} from '../../SwitchSelector';\nimport { EnumKeyInput } from '../EnumKeyInput';\n\nexport const traceKeys: string[] = ['filePath', 'id', 'nodeType'];\n\ntype ContentEditorTextAreaProps = Omit<\n ContentEditorTextAreaPropsBase,\n 'onContentChange'\n> & {\n keyPath: KeyPath[];\n dictionary: Dictionary;\n};\n\nconst ContentEditorTextArea: FC<ContentEditorTextAreaProps> = ({\n keyPath,\n dictionary,\n ...props\n}) => {\n const { editedContent, addEditedContent } = useEditedContent();\n const configuration = useConfiguration();\n const { auditContentDeclarationField, isLoading: isAuditing } =\n useAuditContentDeclarationField();\n\n return (\n <ContentEditorTextAreaBase\n variant={InputVariant.DEFAULT}\n onContentChange={(newValue) =>\n addEditedContent(dictionary.key, newValue, keyPath)\n }\n additionalButtons={\n <Button\n Icon={WandSparkles}\n label=\"Audit\"\n variant={ButtonVariant.HOVERABLE}\n size={ButtonSize.ICON_SM}\n color={ButtonColor.TEXT}\n className=\"cursor-pointer hover:scale-110\"\n isLoading={isAuditing}\n onClick={() => {\n auditContentDeclarationField({\n fileContent: JSON.stringify({\n ...dictionary,\n ...(editedContent?.[dictionary.key] ?? {}),\n }),\n keyPath,\n locales: configuration.internationalization.locales ?? [],\n aiOptions: {\n apiKey: configuration.ai?.apiKey,\n model: configuration.ai?.model,\n temperature: configuration.ai?.temperature,\n },\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\ntype ContentEditorInputProps = Omit<\n ContentEditorInputPropsBase,\n 'onContentChange'\n> & {\n keyPath: KeyPath[];\n dictionary: Dictionary;\n};\n\nconst ContentEditorInput: FC<ContentEditorInputProps> = ({\n keyPath,\n dictionary,\n ...props\n}) => {\n const { addEditedContent } = useEditedContent();\n\n return (\n <ContentEditorInputBase\n variant={InputVariant.DEFAULT}\n onContentChange={(newValue) =>\n addEditedContent(dictionary.key, newValue, keyPath)\n }\n {...props}\n />\n );\n};\n\nconst toggleContent = [\n {\n content: 'False',\n value: false,\n },\n {\n content: 'True',\n value: true,\n },\n] as SwitchSelectorChoices<boolean>;\n\ntype ContentEditorToggleProps = SwitchSelectorProps & {\n dictionary: Dictionary;\n keyPath: KeyPath[];\n};\n\nconst ContentEditorToggle: FC<ContentEditorToggleProps> = ({\n dictionary,\n keyPath,\n ...props\n}) => {\n const { addEditedContent } = useEditedContent();\n\n return (\n <SwitchSelector\n choices={toggleContent}\n value={true}\n onChange={(value) => addEditedContent(dictionary.key, value, keyPath)}\n color={SwitchSelectorColor.TEXT}\n size={SwitchSelectorSize.SM}\n {...props}\n />\n );\n};\n\nexport type TextEditorProps = {\n dictionary: Dictionary;\n keyPath: KeyPath[];\n section: ContentNode;\n isDarkMode?: boolean;\n renderSection?: (content: string) => ReactNode;\n onContentChange?: (newValue: string) => void;\n};\n\nconst TranslationTextEditor: FC<TextEditorProps> = ({\n section,\n keyPath,\n dictionary,\n renderSection,\n}: TextEditorProps) => {\n const { locale, defaultLocale } = useLocale();\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 const content = (section as TranslationContent<string>)[NodeType.Translation];\n\n return (\n <table className=\"w-full\">\n <tbody className=\"flex w-full flex-col gap-2\">\n {localesList.map((translationKey) => (\n <Fragment key={translationKey}>\n <tr className=\"mt-2 w-full p-2 text-xs\">\n {getLocaleName(translationKey, locale)}\n </tr>\n <tr>\n <TextEditorContainer\n section={\n content[translationKey] ??\n getEmptyNode(content[defaultLocale])\n }\n keyPath={[\n ...keyPath,\n { type: NodeType.Translation, key: translationKey },\n ]}\n dictionary={dictionary}\n renderSection={renderSection}\n />\n </tr>\n </Fragment>\n ))}\n </tbody>\n </table>\n );\n};\n\nconst EnumerationTextEditor: FC<TextEditorProps> = ({\n section,\n keyPath,\n dictionary,\n renderSection,\n}) => {\n const { addEditedContent } = useEditedContent();\n const { addNewEnumeration, removeEnumeration } =\n useIntlayer('navigation-view');\n\n const content = (section as EnumerationContent<string>)[NodeType.Enumeration];\n const firstKey = Object.keys(content)[0] as keyof typeof content;\n\n return (\n <div className=\"flex flex-col gap-2\">\n <table className=\"w-full\">\n <tbody className=\"flex w-full flex-col gap-2\">\n {Object.keys(\n (section as EnumerationContent<ContentNode>)[NodeType.Enumeration]\n ).map((enumKey) => {\n const childrenKeyPath = [\n ...keyPath,\n { type: NodeType.Enumeration },\n ] as KeyPath[];\n return (\n <Fragment key={enumKey}>\n <tr className=\"mt-2 w-full\">\n <div className=\"flex flex-1\">\n <Button\n label={removeEnumeration.label.value}\n variant={ButtonVariant.HOVERABLE}\n color={ButtonColor.TEXT}\n Icon={Trash}\n className=\"ml-auto\"\n onClick={() =>\n addEditedContent(\n dictionary.key,\n undefined,\n childrenKeyPath\n )\n }\n >\n {removeEnumeration.text}\n </Button>\n </div>\n </tr>\n <tr className=\"w-full p-2\">\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 </tr>\n <tr className=\"block w-full\">\n <TextEditor\n section={\n content[enumKey as keyof typeof content] ??\n getEmptyNode(content[firstKey])\n }\n keyPath={childrenKeyPath}\n dictionary={dictionary}\n renderSection={renderSection}\n />\n </tr>\n </Fragment>\n );\n })}\n </tbody>\n </table>\n\n <Button\n label={addNewEnumeration.label.value}\n variant={ButtonVariant.HOVERABLE}\n color={ButtonColor.NEUTRAL}\n textAlign={ButtonTextAlign.LEFT}\n isFullWidth\n onClick={() =>\n addEditedContent(\n dictionary.key,\n getEmptyNode(content[firstKey]) ?? '',\n [...keyPath, { type: NodeType.Enumeration, key: 'unknown' }]\n )\n }\n Icon={Plus}\n className=\"m-2\"\n >\n {addNewEnumeration.text}\n </Button>\n </div>\n );\n};\n\nconst ConditionTextEditor: FC<TextEditorProps> = ({\n section,\n keyPath,\n dictionary,\n renderSection,\n}) => {\n const content = (section as ConditionContent<string>)[NodeType.Condition];\n\n return (\n <table className=\"w-full\">\n <tbody className=\"flex w-full flex-col gap-2\">\n {['true', 'false', 'fallback'].map((condKey) => (\n <Fragment key={condKey}>\n <tr key={condKey} className=\"mt-2 block w-full p-2 text-xs\">\n {String(condKey)}\n </tr>\n <tr key={condKey} className=\"block w-full\">\n <TextEditorContainer\n section={\n content[condKey as keyof typeof content] ??\n getEmptyNode(content['true'])\n }\n keyPath={[\n ...keyPath,\n {\n type: NodeType.Condition,\n key: condKey,\n } as KeyPath,\n ]}\n dictionary={dictionary}\n renderSection={renderSection}\n />\n </tr>\n </Fragment>\n ))}\n </tbody>\n </table>\n );\n};\n\nconst ArrayTextEditor: FC<TextEditorProps> = ({\n section,\n keyPath,\n dictionary,\n renderSection,\n}) => {\n const { addEditedContent } = useEditedContent();\n const { addNewElement, removeElement } = useIntlayer('navigation-view');\n\n return (\n <div className=\"flex flex-col gap-2\">\n <table className=\"w-full\">\n <tbody className=\"flex w-full flex-col gap-2\">\n {(section as unknown as ContentNode[]).map((subSection, index) => (\n <Fragment key={JSON.stringify(subSection)}>\n <tr className=\"mt-2 flex w-full justify-between gap-2 p-2\">\n <span className=\"text-xs\">{String(index)}</span>\n <Button\n label={removeElement.label.value}\n variant={ButtonVariant.HOVERABLE}\n color={ButtonColor.NEUTRAL}\n className=\"ml-auto\"\n textAlign={ButtonTextAlign.LEFT}\n onClick={() => {\n const newKeyPath: KeyPath[] = [\n ...keyPath,\n {\n type: NodeType.Array,\n key: (section as unknown as ContentNode[]).length,\n },\n ];\n addEditedContent(dictionary.key, undefined, newKeyPath);\n }}\n Icon={Trash}\n >\n {removeElement.text}\n </Button>\n </tr>\n\n <tr className=\"block w-full\">\n <TextEditorContainer\n section={\n subSection ??\n getEmptyNode((section as unknown as ContentNode[])[0])\n }\n keyPath={[\n ...keyPath,\n {\n type: NodeType.Array,\n key: index,\n },\n ]}\n dictionary={dictionary}\n renderSection={renderSection}\n />\n </tr>\n </Fragment>\n ))}\n </tbody>\n </table>\n <Button\n label={addNewElement.label.value}\n variant={ButtonVariant.HOVERABLE}\n color={ButtonColor.NEUTRAL}\n textAlign={ButtonTextAlign.LEFT}\n isFullWidth\n onClick={() => {\n const newKeyPath: KeyPath[] = [\n ...keyPath,\n {\n type: NodeType.Array,\n key: (section as unknown as ContentNode[]).length,\n },\n ];\n addEditedContent(\n dictionary.key,\n getEmptyNode((section as unknown as ContentNode[])[0]) ?? '',\n newKeyPath,\n false\n );\n }}\n Icon={Plus}\n >\n {addNewElement.text}\n </Button>\n </div>\n );\n};\n\nconst ObjectTextEditor: FC<TextEditorProps> = ({\n section,\n keyPath,\n dictionary,\n renderSection,\n}) => (\n <>\n <table className=\"w-full\">\n <tbody className=\"flex flex-col gap-2\">\n {Object.keys(section as unknown as Record<string, ContentNode>).map(\n (key) => {\n const childKeyPath: KeyPath[] = [\n ...keyPath,\n { type: NodeType.Object, key },\n ];\n const typedSection = section as unknown as Record<\n string,\n ContentNode\n >;\n const firstKey = Object.keys(\n typedSection\n )[0] as keyof typeof section;\n const subSection =\n typedSection[key as keyof typeof section] ??\n getEmptyNode(typedSection[firstKey]);\n\n return (\n <Fragment key={key}>\n <tr\n key={JSON.stringify(subSection)}\n className=\"mt-2 p-2 text-xs\"\n >\n {String(key)}\n </tr>\n <tr key={JSON.stringify(subSection)} className=\"block w-full\">\n <TextEditor\n section={subSection}\n keyPath={childKeyPath}\n dictionary={dictionary}\n renderSection={renderSection}\n />\n </tr>\n </Fragment>\n );\n }\n )}\n </tbody>\n </table>\n </>\n);\n\nenum MarkdownViewMode {\n Edit,\n Preview,\n}\n\nconst MarkdownTextEditor: FC<TextEditorProps> = ({\n section,\n keyPath,\n dictionary,\n isDarkMode,\n onContentChange,\n}) => {\n const [mode, setMode] = useState(MarkdownViewMode.Edit);\n const toggleContent = [\n {\n content: 'Edit',\n value: MarkdownViewMode.Edit,\n },\n {\n content: 'Preview',\n value: MarkdownViewMode.Preview,\n },\n ] as SwitchSelectorChoices<MarkdownViewMode>;\n const childKeyPath: KeyPath[] = [...keyPath, { type: NodeType.Markdown }];\n\n const content = (section as MarkdownContent<ContentNode>)[\n NodeType.Markdown\n ] as ContentNode;\n\n return (\n <div className=\"flex w-full flex-col justify-center gap-6 p-2\">\n <SwitchSelector\n choices={toggleContent}\n value={mode}\n onChange={setMode}\n color={SwitchSelectorColor.TEXT}\n size={SwitchSelectorSize.SM}\n className=\"ml-auto\"\n />\n\n <TextEditorContainer\n section={content}\n keyPath={childKeyPath}\n dictionary={dictionary}\n renderSection={\n mode === MarkdownViewMode.Preview\n ? (content) => (\n <MarkdownRenderer isDarkMode={isDarkMode}>\n {content}\n </MarkdownRenderer>\n )\n : undefined\n }\n onContentChange={onContentChange}\n />\n </div>\n );\n};\n\nconst InsertionTextEditor: FC<TextEditorProps> = ({\n section,\n keyPath,\n ...props\n}) => {\n const childKeyPath: KeyPath[] = [...keyPath, { type: NodeType.Insertion }];\n\n const content = (section as InsertionContent<ContentNode>)[\n NodeType.Insertion\n ];\n\n return (\n <div className=\"flex w-full flex-col justify-center gap-6 p-2\">\n <TextEditorContainer\n section={content}\n keyPath={childKeyPath}\n {...props}\n />\n </div>\n );\n};\n\nconst FileTextEditor: FC<TextEditorProps> = ({\n section,\n keyPath,\n ...props\n}) => {\n const childKeyPath: KeyPath[] = [...keyPath, { type: NodeType.File }];\n\n const fileUrl = (section as FileContent)[NodeType.File];\n const { content } = section as FileContent;\n\n return (\n <div className=\"flex w-full flex-col justify-center gap-6 p-2\">\n <span className=\"text-neutral text-sm\">{fileUrl} </span>\n <TextEditorContainer\n section={content}\n keyPath={childKeyPath}\n {...props}\n />\n </div>\n );\n};\n\nconst NestedTextEditor: FC<TextEditorProps> = ({\n keyPath,\n dictionary,\n renderSection,\n section,\n ...props\n}) => {\n const { addEditedContent } = useEditedContent();\n\n const content = (section as NestedContent)[NodeType.Nested];\n const childrenKeyPath = [...keyPath, { type: NodeType.Nested }] as KeyPath[];\n\n return (\n <div className=\"w-full p-2\">\n <Label>Dictionary key</Label>\n <ContentEditorInputBase\n aria-label=\"Edit field\"\n type=\"text\"\n variant={InputVariant.DEFAULT}\n {...props}\n onContentChange={(newValue) => {\n addEditedContent(\n dictionary.key,\n {\n ...content,\n dictionaryKey: String(newValue),\n },\n childrenKeyPath\n );\n }}\n >\n {content.dictionaryKey ?? ''}\n </ContentEditorInputBase>\n\n <Label>Path (optional)</Label>\n <ContentEditorInputBase\n aria-label=\"Edit field\"\n type=\"text\"\n variant={InputVariant.DEFAULT}\n {...props}\n onContentChange={(newValue) => {\n addEditedContent(\n dictionary.key,\n {\n ...content,\n path: newValue !== '' ? newValue : undefined,\n },\n childrenKeyPath\n );\n }}\n >\n {content.path ?? ''}\n </ContentEditorInputBase>\n </div>\n );\n};\n\nexport const TextEditor: FC<TextEditorProps> = ({\n section,\n keyPath,\n dictionary,\n renderSection,\n isDarkMode,\n}) => {\n const { tsxNotEditable } = useIntlayer('navigation-view');\n const nodeType = getNodeType(section);\n\n if (nodeType === NodeType.ReactNode) {\n return (\n <>\n <span>[React Node]</span>\n <span className=\"text-neutral text-xs\">{tsxNotEditable}</span>\n </>\n );\n }\n\n if (nodeType === NodeType.Nested) {\n return (\n <NestedTextEditor\n dictionary={dictionary}\n renderSection={renderSection}\n keyPath={keyPath}\n section={section}\n />\n );\n }\n\n if (nodeType === NodeType.Translation) {\n return (\n <TranslationTextEditor\n dictionary={dictionary}\n renderSection={renderSection}\n keyPath={keyPath}\n section={section}\n />\n );\n }\n\n if (nodeType === NodeType.Enumeration) {\n return (\n <EnumerationTextEditor\n dictionary={dictionary}\n renderSection={renderSection}\n keyPath={keyPath}\n section={section}\n />\n );\n }\n\n if (nodeType === NodeType.Condition) {\n return (\n <ConditionTextEditor\n dictionary={dictionary}\n renderSection={renderSection}\n keyPath={keyPath}\n section={section}\n />\n );\n }\n\n if (nodeType === NodeType.Insertion) {\n return (\n <InsertionTextEditor\n dictionary={dictionary}\n renderSection={renderSection}\n keyPath={keyPath}\n section={section}\n />\n );\n }\n\n if (nodeType === NodeType.Markdown) {\n return (\n <MarkdownTextEditor\n dictionary={dictionary}\n keyPath={keyPath}\n section={section}\n isDarkMode={isDarkMode}\n />\n );\n }\n\n if (nodeType === NodeType.File) {\n return (\n <FileTextEditor\n dictionary={dictionary}\n renderSection={renderSection}\n keyPath={keyPath}\n section={section}\n />\n );\n }\n\n if (nodeType === NodeType.Array) {\n return (\n <ArrayTextEditor\n dictionary={dictionary}\n renderSection={renderSection}\n keyPath={keyPath}\n section={section}\n />\n );\n }\n\n if (nodeType === NodeType.Object) {\n return (\n <ObjectTextEditor\n dictionary={dictionary}\n renderSection={renderSection}\n keyPath={keyPath}\n section={section}\n />\n );\n }\n\n if (nodeType === NodeType.Number) {\n return (\n <div className=\"w-full p-2\">\n <ContentEditorInput\n dictionary={dictionary}\n keyPath={keyPath}\n type=\"number\"\n aria-label=\"Edit field\"\n >\n {section as number}\n </ContentEditorInput>\n </div>\n );\n }\n\n if (nodeType === NodeType.Text) {\n return (\n <div className=\"w-full p-2\">\n {typeof renderSection === 'function' ? (\n renderSection(section as string)\n ) : (\n <ContentEditorTextArea\n variant={InputVariant.DEFAULT}\n aria-label=\"Edit field\"\n keyPath={keyPath}\n dictionary={dictionary}\n >\n {section as string}\n </ContentEditorTextArea>\n )}\n </div>\n );\n }\n\n if (nodeType === NodeType.Boolean) {\n return (\n <div className=\"w-full p-2\">\n <ContentEditorToggle\n dictionary={dictionary}\n keyPath={keyPath}\n value={section as boolean}\n />\n </div>\n );\n }\n\n return (\n <div className=\"w-full p-2\">\n Error. Format not supported.\n {JSON.stringify(section, null, 2)}\n {JSON.stringify(keyPath, null, 2)}\n NodeType : {nodeType}\n </div>\n );\n};\n\nexport const TextEditorContainer: FC<TextEditorProps> = (props) => (\n <Container\n border\n background=\"none\"\n className=\"top-6 flex h-full flex-1 flex-col gap-6 overflow-hidden p-2 md:sticky\"\n roundedSize=\"xl\"\n >\n <TextEditor {...props} />\n </Container>\n);\n"],"names":["useEditedContent","useConfiguration","useAuditContentDeclarationField","jsx","ContentEditorTextAreaBase","InputVariant","Button","WandSparkles","ButtonVariant","ButtonSize","ButtonColor","editedContent","ContentEditorInputBase","SwitchSelector","SwitchSelectorColor","SwitchSelectorSize","useLocale","useLocaleSwitcherContent","NodeType","jsxs","Fragment","getLocaleName","getEmptyNode","useIntlayer","Trash","EnumKeyInput","renameKey","ButtonTextAlign","Plus","useState","toggleContent","content","MarkdownRenderer","Label","getNodeType","Container"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsDO,MAAM,YAAsB,CAAC,YAAY,MAAM,UAAU;AAUhE,MAAM,wBAAwD,CAAC;AAAA,EAC7D;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,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A,QACA;AAAA,QACA,OAAO;AAAA,MAAA;AAAA,IAAA,GAEX;AAAA,EAEJ;AAEA,SACEgB,2BAAAA,KAAC,OAAA,EAAI,WAAU,cAAa,UAAA;AAAA,IAAA;AAAA,IAEzB,KAAK,UAAU,SAAS,MAAM,CAAC;AAAA,IAC/B,KAAK,UAAU,SAAS,MAAM,CAAC;AAAA,IAAE;AAAA,IACtB;AAAA,EAAA,GACd;AAEJ;AAEO,MAAM,sBAA2C,CAAC,UACvDhB,2BAAAA;AAAAA,EAACgC,2BAAAA;AAAAA,EAAA;AAAA,IACC,QAAM;AAAA,IACN,YAAW;AAAA,IACX,WAAU;AAAA,IACV,aAAY;AAAA,IAEZ,UAAAhC,2BAAAA,IAAC,YAAA,EAAY,GAAG,MAAA,CAAO;AAAA,EAAA;AACzB;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextEditor.d.ts","sourceRoot":"","sources":["../../../../src/components/DictionaryFieldEditor/ContentEditorView/TextEditor.tsx"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,WAAW,EAChB,KAAK,UAAU,EAEf,KAAK,OAAO,EAUb,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EAAE,KAAK,EAAE,EAAY,SAAS,EAAY,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"TextEditor.d.ts","sourceRoot":"","sources":["../../../../src/components/DictionaryFieldEditor/ContentEditorView/TextEditor.tsx"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,WAAW,EAChB,KAAK,UAAU,EAEf,KAAK,OAAO,EAUb,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EAAE,KAAK,EAAE,EAAY,SAAS,EAAY,MAAM,OAAO,CAAC;AAiC/D,eAAO,MAAM,SAAS,EAAE,MAAM,EAAmC,CAAC;AAgIlE,MAAM,MAAM,eAAe,GAAG;IAC5B,UAAU,EAAE,UAAU,CAAC;IACvB,OAAO,EAAE,OAAO,EAAE,CAAC;IACnB,OAAO,EAAE,WAAW,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,SAAS,CAAC;IAC/C,eAAe,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;CAC9C,CAAC;AAqfF,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CA4K1C,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,EAAE,CAAC,eAAe,CASnD,CAAC"}
|
|
@@ -4,31 +4,29 @@ import { getNodeType, NodeType, getLocaleName, getEmptyNode } from "@intlayer/co
|
|
|
4
4
|
import { useEditedContent, useConfiguration } from "@intlayer/editor-react";
|
|
5
5
|
import { Trash, Plus, WandSparkles } from "lucide-react";
|
|
6
6
|
import { Fragment as Fragment$1, useState } from "react";
|
|
7
|
-
import {
|
|
7
|
+
import { useIntlayer, useLocale } from "react-intlayer";
|
|
8
8
|
import "@intlayer/config/built";
|
|
9
|
-
import "../../../better-auth.
|
|
9
|
+
import "../../../better-auth.CMQ3rA-I-7umXOENE.js";
|
|
10
10
|
import { useAuditContentDeclarationField } from "../../../hooks/intlayerAPIHooks.mjs";
|
|
11
11
|
import "../../../hooks/useAsync/useAsyncStateStore.mjs";
|
|
12
12
|
import "@intlayer/api";
|
|
13
13
|
import "deepmerge";
|
|
14
14
|
import "../../../hooks/useScrollBlockage/useScrollBlockageStore.mjs";
|
|
15
15
|
import { renameKey } from "../../../utils/object.mjs";
|
|
16
|
-
import { Button } from "../../Button/Button.mjs";
|
|
16
|
+
import { Button, ButtonColor, ButtonVariant, ButtonTextAlign, ButtonSize } from "../../Button/Button.mjs";
|
|
17
17
|
import { Container } from "../../Container/index.mjs";
|
|
18
18
|
import { ContentEditorInput as ContentEditorInput$1 } from "../../ContentEditor/ContentEditorInput.mjs";
|
|
19
19
|
import { ContentEditorTextArea as ContentEditorTextArea$1 } from "../../ContentEditor/ContentEditorTextArea.mjs";
|
|
20
|
+
import { InputVariant } from "../../Input/Input.mjs";
|
|
21
|
+
import "../../Input/Checkbox.mjs";
|
|
20
22
|
import { Label } from "../../Label/index.mjs";
|
|
21
23
|
import "@intlayer/config/client";
|
|
22
24
|
import "fuse.js";
|
|
23
25
|
import "../../DropDown/index.mjs";
|
|
24
|
-
import "../../
|
|
25
|
-
import "../../Input/Checkbox.mjs";
|
|
26
|
-
import { SwitchSelector } from "../../SwitchSelector/index.mjs";
|
|
27
|
-
import "../../LocaleSwitcherContentDropDown/localeSwitcher.content.mjs";
|
|
26
|
+
import { SwitchSelector, SwitchSelectorSize, SwitchSelectorColor } from "../../SwitchSelector/index.mjs";
|
|
28
27
|
import { useLocaleSwitcherContent } from "../../LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.mjs";
|
|
29
28
|
import { MarkdownRenderer } from "../../MarkDownRender/index.mjs";
|
|
30
29
|
import { EnumKeyInput } from "../EnumKeyInput.mjs";
|
|
31
|
-
import { navigationViewContent } from "../NavigationView/navigationViewNode.content.mjs";
|
|
32
30
|
const traceKeys = ["filePath", "id", "nodeType"];
|
|
33
31
|
const ContentEditorTextArea = ({
|
|
34
32
|
keyPath,
|
|
@@ -41,16 +39,16 @@ const ContentEditorTextArea = ({
|
|
|
41
39
|
return /* @__PURE__ */ jsx(
|
|
42
40
|
ContentEditorTextArea$1,
|
|
43
41
|
{
|
|
44
|
-
variant:
|
|
42
|
+
variant: InputVariant.DEFAULT,
|
|
45
43
|
onContentChange: (newValue) => addEditedContent(dictionary.key, newValue, keyPath),
|
|
46
44
|
additionalButtons: /* @__PURE__ */ jsx(
|
|
47
45
|
Button,
|
|
48
46
|
{
|
|
49
47
|
Icon: WandSparkles,
|
|
50
48
|
label: "Audit",
|
|
51
|
-
variant:
|
|
52
|
-
size:
|
|
53
|
-
color:
|
|
49
|
+
variant: ButtonVariant.HOVERABLE,
|
|
50
|
+
size: ButtonSize.ICON_SM,
|
|
51
|
+
color: ButtonColor.TEXT,
|
|
54
52
|
className: "cursor-pointer hover:scale-110",
|
|
55
53
|
isLoading: isAuditing,
|
|
56
54
|
onClick: () => {
|
|
@@ -91,7 +89,7 @@ const ContentEditorInput = ({
|
|
|
91
89
|
return /* @__PURE__ */ jsx(
|
|
92
90
|
ContentEditorInput$1,
|
|
93
91
|
{
|
|
94
|
-
variant:
|
|
92
|
+
variant: InputVariant.DEFAULT,
|
|
95
93
|
onContentChange: (newValue) => addEditedContent(dictionary.key, newValue, keyPath),
|
|
96
94
|
...props
|
|
97
95
|
}
|
|
@@ -119,8 +117,8 @@ const ContentEditorToggle = ({
|
|
|
119
117
|
choices: toggleContent,
|
|
120
118
|
value: true,
|
|
121
119
|
onChange: (value) => addEditedContent(dictionary.key, value, keyPath),
|
|
122
|
-
color:
|
|
123
|
-
size:
|
|
120
|
+
color: SwitchSelectorColor.TEXT,
|
|
121
|
+
size: SwitchSelectorSize.SM,
|
|
124
122
|
...props
|
|
125
123
|
}
|
|
126
124
|
);
|
|
@@ -164,9 +162,7 @@ const EnumerationTextEditor = ({
|
|
|
164
162
|
renderSection
|
|
165
163
|
}) => {
|
|
166
164
|
const { addEditedContent } = useEditedContent();
|
|
167
|
-
const { addNewEnumeration, removeEnumeration } =
|
|
168
|
-
navigationViewContent
|
|
169
|
-
);
|
|
165
|
+
const { addNewEnumeration, removeEnumeration } = useIntlayer("navigation-view");
|
|
170
166
|
const content = section[NodeType.Enumeration];
|
|
171
167
|
const firstKey = Object.keys(content)[0];
|
|
172
168
|
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
@@ -182,8 +178,8 @@ const EnumerationTextEditor = ({
|
|
|
182
178
|
Button,
|
|
183
179
|
{
|
|
184
180
|
label: removeEnumeration.label.value,
|
|
185
|
-
variant:
|
|
186
|
-
color:
|
|
181
|
+
variant: ButtonVariant.HOVERABLE,
|
|
182
|
+
color: ButtonColor.TEXT,
|
|
187
183
|
Icon: Trash,
|
|
188
184
|
className: "ml-auto",
|
|
189
185
|
onClick: () => addEditedContent(
|
|
@@ -228,9 +224,9 @@ const EnumerationTextEditor = ({
|
|
|
228
224
|
Button,
|
|
229
225
|
{
|
|
230
226
|
label: addNewEnumeration.label.value,
|
|
231
|
-
variant:
|
|
232
|
-
color:
|
|
233
|
-
textAlign:
|
|
227
|
+
variant: ButtonVariant.HOVERABLE,
|
|
228
|
+
color: ButtonColor.NEUTRAL,
|
|
229
|
+
textAlign: ButtonTextAlign.LEFT,
|
|
234
230
|
isFullWidth: true,
|
|
235
231
|
onClick: () => addEditedContent(
|
|
236
232
|
dictionary.key,
|
|
@@ -277,7 +273,7 @@ const ArrayTextEditor = ({
|
|
|
277
273
|
renderSection
|
|
278
274
|
}) => {
|
|
279
275
|
const { addEditedContent } = useEditedContent();
|
|
280
|
-
const { addNewElement, removeElement } =
|
|
276
|
+
const { addNewElement, removeElement } = useIntlayer("navigation-view");
|
|
281
277
|
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
282
278
|
/* @__PURE__ */ jsx("table", { className: "w-full", children: /* @__PURE__ */ jsx("tbody", { className: "flex w-full flex-col gap-2", children: section.map((subSection, index) => /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
283
279
|
/* @__PURE__ */ jsxs("tr", { className: "mt-2 flex w-full justify-between gap-2 p-2", children: [
|
|
@@ -286,10 +282,10 @@ const ArrayTextEditor = ({
|
|
|
286
282
|
Button,
|
|
287
283
|
{
|
|
288
284
|
label: removeElement.label.value,
|
|
289
|
-
variant:
|
|
290
|
-
color:
|
|
285
|
+
variant: ButtonVariant.HOVERABLE,
|
|
286
|
+
color: ButtonColor.NEUTRAL,
|
|
291
287
|
className: "ml-auto",
|
|
292
|
-
textAlign:
|
|
288
|
+
textAlign: ButtonTextAlign.LEFT,
|
|
293
289
|
onClick: () => {
|
|
294
290
|
const newKeyPath = [
|
|
295
291
|
...keyPath,
|
|
@@ -325,9 +321,9 @@ const ArrayTextEditor = ({
|
|
|
325
321
|
Button,
|
|
326
322
|
{
|
|
327
323
|
label: addNewElement.label.value,
|
|
328
|
-
variant:
|
|
329
|
-
color:
|
|
330
|
-
textAlign:
|
|
324
|
+
variant: ButtonVariant.HOVERABLE,
|
|
325
|
+
color: ButtonColor.NEUTRAL,
|
|
326
|
+
textAlign: ButtonTextAlign.LEFT,
|
|
331
327
|
isFullWidth: true,
|
|
332
328
|
onClick: () => {
|
|
333
329
|
const newKeyPath = [
|
|
@@ -419,8 +415,8 @@ const MarkdownTextEditor = ({
|
|
|
419
415
|
choices: toggleContent2,
|
|
420
416
|
value: mode,
|
|
421
417
|
onChange: setMode,
|
|
422
|
-
color:
|
|
423
|
-
size:
|
|
418
|
+
color: SwitchSelectorColor.TEXT,
|
|
419
|
+
size: SwitchSelectorSize.SM,
|
|
424
420
|
className: "ml-auto"
|
|
425
421
|
}
|
|
426
422
|
),
|
|
@@ -492,7 +488,7 @@ const NestedTextEditor = ({
|
|
|
492
488
|
{
|
|
493
489
|
"aria-label": "Edit field",
|
|
494
490
|
type: "text",
|
|
495
|
-
variant:
|
|
491
|
+
variant: InputVariant.DEFAULT,
|
|
496
492
|
...props,
|
|
497
493
|
onContentChange: (newValue) => {
|
|
498
494
|
addEditedContent(
|
|
@@ -513,7 +509,7 @@ const NestedTextEditor = ({
|
|
|
513
509
|
{
|
|
514
510
|
"aria-label": "Edit field",
|
|
515
511
|
type: "text",
|
|
516
|
-
variant:
|
|
512
|
+
variant: InputVariant.DEFAULT,
|
|
517
513
|
...props,
|
|
518
514
|
onContentChange: (newValue) => {
|
|
519
515
|
addEditedContent(
|
|
@@ -537,7 +533,7 @@ const TextEditor = ({
|
|
|
537
533
|
renderSection,
|
|
538
534
|
isDarkMode
|
|
539
535
|
}) => {
|
|
540
|
-
const { tsxNotEditable } =
|
|
536
|
+
const { tsxNotEditable } = useIntlayer("navigation-view");
|
|
541
537
|
const nodeType = getNodeType(section);
|
|
542
538
|
if (nodeType === NodeType.ReactNode) {
|
|
543
539
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
@@ -660,7 +656,7 @@ const TextEditor = ({
|
|
|
660
656
|
return /* @__PURE__ */ jsx("div", { className: "w-full p-2", children: typeof renderSection === "function" ? renderSection(section) : /* @__PURE__ */ jsx(
|
|
661
657
|
ContentEditorTextArea,
|
|
662
658
|
{
|
|
663
|
-
variant:
|
|
659
|
+
variant: InputVariant.DEFAULT,
|
|
664
660
|
"aria-label": "Edit field",
|
|
665
661
|
keyPath,
|
|
666
662
|
dictionary,
|