@intlayer/design-system 3.3.2 → 3.3.3
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 +233 -180
- package/dist/{Form-DERuauvB.cjs → Form-BDcoNTLV.cjs} +2 -2
- package/dist/{Form-DERuauvB.cjs.map → Form-BDcoNTLV.cjs.map} +1 -1
- package/dist/{Form-CQpKjeW6.js → Form-DhsgC7kB.js} +2 -2
- package/dist/{Form-CQpKjeW6.js.map → Form-DhsgC7kB.js.map} +1 -1
- package/dist/components/Accordion/Accordion.cjs +1 -1
- package/dist/components/Accordion/Accordion.mjs +1 -1
- package/dist/components/Auth/AuthModal/index.cjs +1 -1
- package/dist/components/Auth/AuthModal/index.mjs +1 -1
- package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierClient.cjs +1 -1
- package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierClient.mjs +1 -1
- package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.cjs +2 -2
- package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.mjs +2 -2
- package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.cjs +1 -1
- package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.mjs +1 -1
- package/dist/components/Auth/ExternalsLoginButtons/assets/GithubLogo.cjs +1 -1
- package/dist/components/Auth/ExternalsLoginButtons/assets/GithubLogo.mjs +1 -1
- package/dist/components/Auth/ExternalsLoginButtons/assets/GoogleLogo.cjs +1 -1
- package/dist/components/Auth/ExternalsLoginButtons/assets/GoogleLogo.mjs +1 -1
- package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.cjs +2 -2
- package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.mjs +2 -2
- package/dist/components/Auth/SignInForm/SignInForm.cjs +2 -2
- package/dist/components/Auth/SignInForm/SignInForm.mjs +2 -2
- package/dist/components/Auth/SignUpForm/SignUpForm.cjs +2 -2
- package/dist/components/Auth/SignUpForm/SignUpForm.mjs +2 -2
- package/dist/components/Avatar/index.cjs +1 -1
- package/dist/components/Avatar/index.mjs +1 -1
- package/dist/components/Badge/index.cjs +1 -1
- package/dist/components/Badge/index.d.ts +1 -1
- package/dist/components/Badge/index.mjs +1 -1
- package/dist/components/Breadcrumb/index.cjs +39 -20
- package/dist/components/Breadcrumb/index.cjs.map +1 -1
- package/dist/components/Breadcrumb/index.d.ts +2 -2
- package/dist/components/Breadcrumb/index.d.ts.map +1 -1
- package/dist/components/Breadcrumb/index.mjs +39 -20
- package/dist/components/Breadcrumb/index.mjs.map +1 -1
- package/dist/components/Button/Button.cjs +10 -4
- package/dist/components/Button/Button.cjs.map +1 -1
- package/dist/components/Button/Button.d.ts +2 -2
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/Button/Button.mjs +10 -4
- package/dist/components/Button/Button.mjs.map +1 -1
- package/dist/components/Command/index.cjs +1 -1
- package/dist/components/Command/index.d.ts.map +1 -1
- package/dist/components/Command/index.mjs +1 -1
- package/dist/components/Container/index.cjs +11 -2
- package/dist/components/Container/index.cjs.map +1 -1
- package/dist/components/Container/index.d.ts +2 -0
- package/dist/components/Container/index.d.ts.map +1 -1
- package/dist/components/Container/index.mjs +11 -2
- package/dist/components/Container/index.mjs.map +1 -1
- package/dist/components/ContentEditor/ContentEditor.cjs +1 -1
- package/dist/components/ContentEditor/ContentEditor.mjs +1 -1
- package/dist/components/ContentEditor/ContentEditorTextArea.cjs +18 -5
- package/dist/components/ContentEditor/ContentEditorTextArea.cjs.map +1 -1
- package/dist/components/ContentEditor/ContentEditorTextArea.d.ts +2 -0
- package/dist/components/ContentEditor/ContentEditorTextArea.d.ts.map +1 -1
- package/dist/components/ContentEditor/ContentEditorTextArea.mjs +18 -5
- package/dist/components/ContentEditor/ContentEditorTextArea.mjs.map +1 -1
- package/dist/components/ContentSelector/ContentSelector.cjs +1 -1
- package/dist/components/ContentSelector/ContentSelector.mjs +1 -1
- package/dist/components/CopyToClipboard/index.cjs +1 -1
- package/dist/components/CopyToClipboard/index.mjs +1 -1
- package/dist/components/DictionaryEditor/DictionaryEditor.cjs +11 -5
- package/dist/components/DictionaryEditor/DictionaryEditor.cjs.map +1 -1
- package/dist/components/DictionaryEditor/DictionaryEditor.d.ts.map +1 -1
- package/dist/components/DictionaryEditor/DictionaryEditor.mjs +11 -5
- package/dist/components/DictionaryEditor/DictionaryEditor.mjs.map +1 -1
- package/dist/components/DictionaryEditor/ItemLayout.cjs +1 -1
- package/dist/components/DictionaryEditor/ItemLayout.mjs +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/ArrayWrapper.cjs +2 -2
- package/dist/components/DictionaryEditor/NodeWrapper/ArrayWrapper.mjs +2 -2
- package/dist/components/DictionaryEditor/NodeWrapper/EnumerationWrapper.cjs +2 -2
- package/dist/components/DictionaryEditor/NodeWrapper/EnumerationWrapper.mjs +2 -2
- package/dist/components/DictionaryEditor/NodeWrapper/NestedObjectWrapper.cjs +2 -2
- package/dist/components/DictionaryEditor/NodeWrapper/NestedObjectWrapper.mjs +2 -2
- package/dist/components/DictionaryEditor/NodeWrapper/StringWrapper.cjs +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/StringWrapper.mjs +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/TranslationWrapper.cjs +2 -2
- package/dist/components/DictionaryEditor/NodeWrapper/TranslationWrapper.mjs +2 -2
- package/dist/components/DictionaryEditor/NodeWrapper/index.cjs +2 -2
- package/dist/components/DictionaryEditor/NodeWrapper/index.d.ts +2 -2
- package/dist/components/DictionaryEditor/NodeWrapper/index.d.ts.map +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/index.mjs +2 -2
- package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.cjs +2 -2
- package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.mjs +2 -2
- package/dist/components/DictionaryEditor/useEditedContentStore.cjs +13 -10
- package/dist/components/DictionaryEditor/useEditedContentStore.cjs.map +1 -1
- package/dist/components/DictionaryEditor/useEditedContentStore.d.ts +1 -0
- package/dist/components/DictionaryEditor/useEditedContentStore.d.ts.map +1 -1
- package/dist/components/DictionaryEditor/useEditedContentStore.mjs +13 -10
- package/dist/components/DictionaryEditor/useEditedContentStore.mjs.map +1 -1
- package/dist/components/DictionaryEditor/validDictionaryChangeButtons.content.cjs +6 -6
- package/dist/components/DictionaryEditor/validDictionaryChangeButtons.content.cjs.map +1 -1
- package/dist/components/DictionaryEditor/validDictionaryChangeButtons.content.mjs +6 -6
- package/dist/components/DictionaryEditor/validDictionaryChangeButtons.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.cjs +2 -2
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.mjs +2 -2
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.cjs +2 -2
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.mjs +2 -2
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.cjs +2 -2
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs +2 -2
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.cjs +36 -55
- 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 +37 -56
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/EditorView/EditorView.cjs +50 -23
- package/dist/components/DictionaryFieldEditor/EditorView/EditorView.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/EditorView/EditorView.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/EditorView/EditorView.mjs +51 -24
- package/dist/components/DictionaryFieldEditor/EditorView/EditorView.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.cjs +2 -2
- package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.mjs +2 -2
- package/dist/components/DictionaryFieldEditor/EnumKeyInput.cjs +1 -1
- package/dist/components/DictionaryFieldEditor/EnumKeyInput.mjs +1 -1
- package/dist/components/DictionaryFieldEditor/JSONEditor.cjs +59 -0
- package/dist/components/DictionaryFieldEditor/JSONEditor.cjs.map +1 -0
- package/dist/components/DictionaryFieldEditor/JSONEditor.d.ts +8 -0
- package/dist/components/DictionaryFieldEditor/JSONEditor.d.ts.map +1 -0
- package/dist/components/DictionaryFieldEditor/JSONEditor.mjs +59 -0
- package/dist/components/DictionaryFieldEditor/JSONEditor.mjs.map +1 -0
- package/dist/components/DictionaryFieldEditor/KeyPathBreadcrumb.cjs +1 -1
- package/dist/components/DictionaryFieldEditor/KeyPathBreadcrumb.mjs +1 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.cjs +2 -2
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.mjs +2 -2
- package/dist/components/DictionaryFieldEditor/NodeEditor.cjs +98 -0
- package/dist/components/DictionaryFieldEditor/NodeEditor.cjs.map +1 -0
- package/dist/components/DictionaryFieldEditor/NodeEditor.d.ts +8 -0
- package/dist/components/DictionaryFieldEditor/NodeEditor.d.ts.map +1 -0
- package/dist/components/DictionaryFieldEditor/NodeEditor.mjs +98 -0
- package/dist/components/DictionaryFieldEditor/NodeEditor.mjs.map +1 -0
- package/dist/components/DictionaryFieldEditor/NodeTypeSelector.cjs +2 -2
- package/dist/components/DictionaryFieldEditor/NodeTypeSelector.mjs +2 -2
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs +6 -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 +6 -4
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.cjs +6 -6
- package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.mjs +6 -6
- package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/editorView.content.cjs +12 -0
- package/dist/components/DictionaryFieldEditor/editorView.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/editorView.content.d.ts +4 -0
- package/dist/components/DictionaryFieldEditor/editorView.content.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/editorView.content.mjs +12 -0
- package/dist/components/DictionaryFieldEditor/editorView.content.mjs.map +1 -1
- package/dist/components/DropDown/index.cjs +1 -1
- package/dist/components/DropDown/index.mjs +1 -1
- package/dist/components/EditableField/EditableFieldInput.cjs +1 -1
- package/dist/components/EditableField/EditableFieldInput.mjs +1 -1
- package/dist/components/EditableField/EditableFieldLayout.cjs +9 -3
- package/dist/components/EditableField/EditableFieldLayout.cjs.map +1 -1
- package/dist/components/EditableField/EditableFieldLayout.d.ts +3 -3
- package/dist/components/EditableField/EditableFieldLayout.d.ts.map +1 -1
- package/dist/components/EditableField/EditableFieldLayout.mjs +9 -3
- package/dist/components/EditableField/EditableFieldLayout.mjs.map +1 -1
- package/dist/components/EditableField/EditableFieldTextArea.cjs +23 -6
- 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 +24 -7
- package/dist/components/EditableField/EditableFieldTextArea.mjs.map +1 -1
- package/dist/components/Flags/Flag.cjs +1 -1
- package/dist/components/Flags/Flag.mjs +1 -1
- package/dist/components/Footer/index.cjs +1 -1
- package/dist/components/Footer/index.mjs +1 -1
- package/dist/components/Form/Form.cjs +2 -2
- package/dist/components/Form/Form.mjs +2 -2
- package/dist/components/Form/FormBase.cjs +1 -1
- package/dist/components/Form/FormBase.d.ts.map +1 -1
- package/dist/components/Form/FormBase.mjs +1 -1
- package/dist/components/Form/FormControl.cjs +1 -1
- package/dist/components/Form/FormControl.mjs +1 -1
- package/dist/components/Form/FormDescription.cjs +1 -1
- package/dist/components/Form/FormDescription.mjs +1 -1
- package/dist/components/Form/FormField.cjs +1 -1
- package/dist/components/Form/FormField.mjs +1 -1
- package/dist/components/Form/FormItem.cjs +1 -1
- package/dist/components/Form/FormItem.mjs +1 -1
- package/dist/components/Form/FormLabel.cjs +1 -1
- package/dist/components/Form/FormLabel.mjs +1 -1
- package/dist/components/Form/FormMessage.cjs +1 -1
- package/dist/components/Form/FormMessage.mjs +1 -1
- package/dist/components/Form/elements/CheckboxElement.cjs +2 -2
- package/dist/components/Form/elements/CheckboxElement.mjs +2 -2
- package/dist/components/Form/elements/EditableFieldInputElement.cjs +2 -2
- package/dist/components/Form/elements/EditableFieldInputElement.mjs +2 -2
- package/dist/components/Form/elements/EditableFieldTextAreaElement.cjs +2 -2
- package/dist/components/Form/elements/EditableFieldTextAreaElement.mjs +2 -2
- package/dist/components/Form/elements/FormElement.cjs +2 -2
- package/dist/components/Form/elements/FormElement.mjs +2 -2
- package/dist/components/Form/elements/FormElementWrapper.cjs +1 -1
- package/dist/components/Form/elements/FormElementWrapper.mjs +1 -1
- package/dist/components/Form/elements/InputElement.cjs +2 -2
- package/dist/components/Form/elements/InputElement.mjs +2 -2
- package/dist/components/Form/elements/InputPasswordElement.cjs +2 -2
- package/dist/components/Form/elements/InputPasswordElement.mjs +2 -2
- package/dist/components/Form/elements/MultiselectElement.cjs +2 -2
- package/dist/components/Form/elements/MultiselectElement.mjs +2 -2
- package/dist/components/Form/elements/SelectElement.cjs +2 -2
- package/dist/components/Form/elements/SelectElement.mjs +2 -2
- package/dist/components/Form/elements/SwitchSelectorElement.cjs +2 -2
- package/dist/components/Form/elements/SwitchSelectorElement.mjs +2 -2
- package/dist/components/Form/elements/TextAreaElement.cjs +2 -2
- package/dist/components/Form/elements/TextAreaElement.mjs +2 -2
- package/dist/components/Form/elements/index.cjs +1 -1
- package/dist/components/Form/elements/index.mjs +1 -1
- package/dist/components/Form/index.cjs +1 -1
- package/dist/components/Form/index.mjs +1 -1
- package/dist/components/Form/layout/FormItemLayout.cjs +2 -2
- package/dist/components/Form/layout/FormItemLayout.mjs +2 -2
- package/dist/components/Form/layout/FormLabelLayout.cjs +1 -1
- package/dist/components/Form/layout/FormLabelLayout.mjs +1 -1
- package/dist/components/Form/layout/RequiredStar.cjs +1 -1
- package/dist/components/Form/layout/RequiredStar.mjs +1 -1
- package/dist/components/Form/layout/index.cjs +1 -1
- package/dist/components/Form/layout/index.mjs +1 -1
- package/dist/components/Headers/index.cjs +1 -1
- package/dist/components/Headers/index.mjs +1 -1
- package/dist/components/IDE/CodeRender.cjs +1 -1
- package/dist/components/IDE/CodeRender.mjs +1 -1
- package/dist/components/IDE/FileList.cjs +1 -1
- package/dist/components/IDE/FileList.mjs +1 -1
- package/dist/components/IDE/FileTree.cjs +1 -1
- package/dist/components/IDE/FileTree.mjs +1 -1
- package/dist/components/IDE/IDE.cjs +1 -1
- package/dist/components/IDE/IDE.mjs +1 -1
- package/dist/components/IDE/MarkDownRender.cjs +1 -1
- package/dist/components/IDE/MarkDownRender.mjs +1 -1
- package/dist/components/InformationTag/index.cjs +1 -1
- package/dist/components/InformationTag/index.mjs +1 -1
- package/dist/components/Input/Checkbox.cjs +1 -1
- package/dist/components/Input/Checkbox.d.ts +1 -1
- package/dist/components/Input/Checkbox.mjs +1 -1
- package/dist/components/Input/Input.cjs +1 -1
- package/dist/components/Input/Input.mjs +1 -1
- package/dist/components/Input/InputPassword.cjs +1 -1
- package/dist/components/Input/InputPassword.mjs +1 -1
- package/dist/components/Label/index.cjs +1 -1
- package/dist/components/Label/index.mjs +1 -1
- package/dist/components/Link/Link.cjs +1 -1
- package/dist/components/Link/Link.d.ts +1 -1
- package/dist/components/Link/Link.mjs +1 -1
- package/dist/components/Loader/index.cjs +1 -1
- package/dist/components/Loader/index.mjs +1 -1
- package/dist/components/Loader/spinner.cjs +1 -1
- package/dist/components/Loader/spinner.mjs +1 -1
- package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.cjs +1 -1
- package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.mjs +1 -1
- package/dist/components/Logo/LogoCircle.cjs +1 -1
- package/dist/components/Logo/LogoCircle.mjs +1 -1
- package/dist/components/Logo/LogoNoFrame.cjs +1 -1
- package/dist/components/Logo/LogoNoFrame.mjs +1 -1
- package/dist/components/Logo/LogoSquare.cjs +1 -1
- package/dist/components/Logo/LogoSquare.mjs +1 -1
- package/dist/components/Logo/LogoSquircle.cjs +1 -1
- package/dist/components/Logo/LogoSquircle.mjs +1 -1
- package/dist/components/Logo/LogoTextOnly.cjs +1 -1
- package/dist/components/Logo/LogoTextOnly.mjs +1 -1
- package/dist/components/Logo/LogoWithTextBelowCircle.cjs +1 -1
- package/dist/components/Logo/LogoWithTextBelowCircle.mjs +1 -1
- package/dist/components/Logo/LogoWithTextBelowNoFrame.cjs +1 -1
- package/dist/components/Logo/LogoWithTextBelowNoFrame.mjs +1 -1
- package/dist/components/Logo/LogoWithTextBelowSquircle.cjs +1 -1
- package/dist/components/Logo/LogoWithTextBelowSquircle.mjs +1 -1
- package/dist/components/Logo/LogoWithTextCircle.cjs +1 -1
- package/dist/components/Logo/LogoWithTextCircle.mjs +1 -1
- package/dist/components/Logo/LogoWithTextNoFrame.cjs +1 -1
- package/dist/components/Logo/LogoWithTextNoFrame.mjs +1 -1
- package/dist/components/Logo/LogoWithTextSquircle.cjs +1 -1
- package/dist/components/Logo/LogoWithTextSquircle.mjs +1 -1
- package/dist/components/Logo/index.cjs +1 -1
- package/dist/components/Logo/index.mjs +1 -1
- package/dist/components/MarkDownRender/index.cjs +1 -1
- package/dist/components/MarkDownRender/index.mjs +1 -1
- package/dist/components/MaxHeightSmoother/index.cjs +1 -1
- package/dist/components/MaxHeightSmoother/index.mjs +1 -1
- package/dist/components/MaxWidthSmoother/index.cjs +1 -1
- package/dist/components/MaxWidthSmoother/index.mjs +1 -1
- package/dist/components/Modal/Modal.cjs +1 -1
- package/dist/components/Modal/Modal.cjs.map +1 -1
- package/dist/components/Modal/Modal.d.ts.map +1 -1
- package/dist/components/Modal/Modal.mjs +1 -1
- package/dist/components/Modal/Modal.mjs.map +1 -1
- package/dist/components/Navbar/Burger.cjs +1 -1
- package/dist/components/Navbar/Burger.mjs +1 -1
- package/dist/components/Navbar/DesktopNavbar.cjs +1 -1
- package/dist/components/Navbar/DesktopNavbar.mjs +1 -1
- package/dist/components/Navbar/MobileNavbar.cjs +1 -1
- package/dist/components/Navbar/MobileNavbar.mjs +1 -1
- package/dist/components/Navbar/index.cjs +1 -1
- package/dist/components/Navbar/index.mjs +1 -1
- package/dist/components/Pattern/DotPattern.cjs +1 -1
- package/dist/components/Pattern/DotPattern.mjs +1 -1
- package/dist/components/Pattern/GridPattern.cjs +1 -1
- package/dist/components/Pattern/GridPattern.mjs +1 -1
- package/dist/components/Pattern/SpotLight.cjs +1 -1
- package/dist/components/Pattern/SpotLight.mjs +1 -1
- package/dist/components/Popover/index.cjs +1 -1
- package/dist/components/Popover/index.mjs +1 -1
- package/dist/components/PressableSpan/PressableSpan.cjs +1 -1
- package/dist/components/PressableSpan/PressableSpan.mjs +1 -1
- package/dist/components/ProfileDropDown/index.cjs +1 -1
- package/dist/components/ProfileDropDown/index.mjs +1 -1
- package/dist/components/RightDrawer/RightDrawer.cjs +1 -1
- package/dist/components/RightDrawer/RightDrawer.mjs +1 -1
- package/dist/components/Select/Multiselect.cjs +1 -1
- package/dist/components/Select/Multiselect.d.ts.map +1 -1
- package/dist/components/Select/Multiselect.mjs +1 -1
- package/dist/components/Select/Select.cjs +1 -1
- package/dist/components/Select/Select.mjs +1 -1
- package/dist/components/SwitchSelector/index.cjs +1 -1
- package/dist/components/SwitchSelector/index.d.ts +1 -1
- package/dist/components/SwitchSelector/index.mjs +1 -1
- package/dist/components/TabSelector/TabSelector.cjs +1 -1
- package/dist/components/TabSelector/TabSelector.d.ts +1 -1
- package/dist/components/TabSelector/TabSelector.mjs +1 -1
- package/dist/components/Tag/index.cjs +1 -1
- package/dist/components/Tag/index.mjs +1 -1
- package/dist/components/TextArea/AutoSizeTextArea.cjs +1 -1
- package/dist/components/TextArea/AutoSizeTextArea.mjs +1 -1
- package/dist/components/TextArea/TextArea.cjs +1 -1
- package/dist/components/TextArea/TextArea.mjs +1 -1
- package/dist/components/ThemeSwitcherDropDown/DesktopThemeSwitcher.cjs +1 -1
- package/dist/components/ThemeSwitcherDropDown/DesktopThemeSwitcher.mjs +1 -1
- package/dist/components/ThemeSwitcherDropDown/MobileThemeSwitcher.cjs +1 -1
- package/dist/components/ThemeSwitcherDropDown/MobileThemeSwitcher.mjs +1 -1
- package/dist/components/Toaster/Toast.cjs +1 -1
- package/dist/components/Toaster/Toast.mjs +1 -1
- package/dist/components/Toaster/Toaster.cjs +1 -1
- package/dist/components/Toaster/Toaster.mjs +1 -1
- package/dist/components/WithResizer/index.cjs +1 -1
- package/dist/components/WithResizer/index.mjs +1 -1
- package/dist/components/index.cjs +3 -1
- 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 +3 -1
- package/dist/components/index.mjs.map +1 -1
- package/dist/hooks/intlayerAPIHooks.cjs +1 -1
- package/dist/hooks/intlayerAPIHooks.mjs +1 -1
- package/dist/hooks/useAsync/useAsync.cjs.map +1 -1
- package/dist/hooks/useAsync/useAsync.mjs.map +1 -1
- package/dist/{index-BZQDMSxb.cjs → index-BtZWYJhL.cjs} +2 -2
- package/dist/index-BtZWYJhL.cjs.map +1 -0
- package/dist/{index-pLq_417z.js → index-D9oaKvKC.js} +2 -2
- package/dist/index-D9oaKvKC.js.map +1 -0
- package/dist/{jsx-runtime-BgSF1HG2.js → jsx-runtime-DaNGiM0W.js} +15 -9
- package/dist/{jsx-runtime-BgSF1HG2.js.map → jsx-runtime-DaNGiM0W.js.map} +1 -1
- package/dist/{jsx-runtime-DvCoRj5u.cjs → jsx-runtime-XHKiWCTo.cjs} +15 -9
- package/dist/{jsx-runtime-DvCoRj5u.cjs.map → jsx-runtime-XHKiWCTo.cjs.map} +1 -1
- package/dist/tailwind.css +1 -1
- package/dist/zod-BV4nCGJE.js.map +1 -1
- package/dist/zod-DSrtTSD_.cjs.map +1 -1
- package/package.json +46 -45
- package/tailwind.config.js +215 -0
- package/dist/Form-2XHQV7F_.cjs +0 -295
- package/dist/Form-2XHQV7F_.cjs.map +0 -1
- package/dist/Form-BO0i3nT9.js +0 -300
- package/dist/Form-BO0i3nT9.js.map +0 -1
- package/dist/Form-BaHDK0RZ.cjs +0 -298
- package/dist/Form-BaHDK0RZ.cjs.map +0 -1
- package/dist/Form-BfZMqK2D.js +0 -300
- package/dist/Form-BfZMqK2D.js.map +0 -1
- package/dist/Form-C13KWSZs.cjs +0 -299
- package/dist/Form-C13KWSZs.cjs.map +0 -1
- package/dist/Form-C8K2f8ph.js +0 -300
- package/dist/Form-C8K2f8ph.js.map +0 -1
- package/dist/Form-CKvCgz8c.cjs +0 -299
- package/dist/Form-CKvCgz8c.cjs.map +0 -1
- package/dist/Form-Cbk5Lhpd.js +0 -299
- package/dist/Form-Cbk5Lhpd.js.map +0 -1
- package/dist/Form-Cbu7ff1e.js +0 -278
- package/dist/Form-Cbu7ff1e.js.map +0 -1
- package/dist/Form-CiAgFAPb.cjs +0 -300
- package/dist/Form-CiAgFAPb.cjs.map +0 -1
- package/dist/Form-CnBKDneQ.js +0 -296
- package/dist/Form-CnBKDneQ.js.map +0 -1
- package/dist/Form-DhlDf3ML.cjs +0 -299
- package/dist/Form-DhlDf3ML.cjs.map +0 -1
- package/dist/Form-DkAZ0Jdf.cjs +0 -299
- package/dist/Form-DkAZ0Jdf.cjs.map +0 -1
- package/dist/Form-DqnNP4DA.js +0 -300
- package/dist/Form-DqnNP4DA.js.map +0 -1
- package/dist/Form-DyFBmVya.js +0 -301
- package/dist/Form-DyFBmVya.js.map +0 -1
- package/dist/Form-FW4Odjfm.js +0 -301
- package/dist/Form-FW4Odjfm.js.map +0 -1
- package/dist/Form-wWTTkxTp.cjs +0 -277
- package/dist/Form-wWTTkxTp.cjs.map +0 -1
- package/dist/TabSelector-BmkzVPXl.js +0 -660
- package/dist/TabSelector-BmkzVPXl.js.map +0 -1
- package/dist/TabSelector-o_NRBvPQ.cjs +0 -659
- package/dist/TabSelector-o_NRBvPQ.cjs.map +0 -1
- package/dist/components/Auth/AuthProvider/index.cjs +0 -55
- package/dist/components/Auth/AuthProvider/index.cjs.map +0 -1
- package/dist/components/Auth/AuthProvider/index.d.ts +0 -31
- package/dist/components/Auth/AuthProvider/index.d.ts.map +0 -1
- package/dist/components/Auth/AuthProvider/index.mjs +0 -55
- package/dist/components/Auth/AuthProvider/index.mjs.map +0 -1
- package/dist/components/Auth/AuthProvider/useCSRF.cjs +0 -22
- package/dist/components/Auth/AuthProvider/useCSRF.cjs.map +0 -1
- package/dist/components/Auth/AuthProvider/useCSRF.d.ts +0 -5
- package/dist/components/Auth/AuthProvider/useCSRF.d.ts.map +0 -1
- package/dist/components/Auth/AuthProvider/useCSRF.mjs +0 -22
- package/dist/components/Auth/AuthProvider/useCSRF.mjs.map +0 -1
- package/dist/components/Auth/AuthProvider/useOAuth2.cjs +0 -26
- package/dist/components/Auth/AuthProvider/useOAuth2.cjs.map +0 -1
- package/dist/components/Auth/AuthProvider/useOAuth2.d.ts +0 -4
- package/dist/components/Auth/AuthProvider/useOAuth2.d.ts.map +0 -1
- package/dist/components/Auth/AuthProvider/useOAuth2.mjs +0 -26
- package/dist/components/Auth/AuthProvider/useOAuth2.mjs.map +0 -1
- package/dist/components/Auth/AuthProvider/useSession.cjs +0 -70
- package/dist/components/Auth/AuthProvider/useSession.cjs.map +0 -1
- package/dist/components/Auth/AuthProvider/useSession.d.ts +0 -8
- package/dist/components/Auth/AuthProvider/useSession.d.ts.map +0 -1
- package/dist/components/Auth/AuthProvider/useSession.mjs +0 -70
- package/dist/components/Auth/AuthProvider/useSession.mjs.map +0 -1
- package/dist/hooks/useAsync/useProxyState.d.ts +0 -3
- package/dist/hooks/useAsync/useProxyState.d.ts.map +0 -1
- package/dist/hooks/usePersistenceStore.cjs +0 -22
- package/dist/hooks/usePersistenceStore.cjs.map +0 -1
- package/dist/hooks/usePersistenceStore.d.ts +0 -2
- package/dist/hooks/usePersistenceStore.d.ts.map +0 -1
- package/dist/hooks/usePersistenceStore.mjs +0 -22
- package/dist/hooks/usePersistenceStore.mjs.map +0 -1
- package/dist/index-BUDsCMdX.cjs +0 -204
- package/dist/index-BUDsCMdX.cjs.map +0 -1
- package/dist/index-BZQDMSxb.cjs.map +0 -1
- package/dist/index-C09rI9kw.js +0 -205
- package/dist/index-C09rI9kw.js.map +0 -1
- package/dist/index-pLq_417z.js.map +0 -1
- package/dist/stripe-BsI0lJWz.js +0 -22
- package/dist/stripe-BsI0lJWz.js.map +0 -1
- package/dist/stripe-C-u5RvGh.js +0 -22
- package/dist/stripe-C-u5RvGh.js.map +0 -1
- package/dist/stripe-CF_E65Vu.js +0 -22
- package/dist/stripe-CF_E65Vu.js.map +0 -1
- package/dist/stripe-CpGvfq6T.cjs +0 -21
- package/dist/stripe-CpGvfq6T.cjs.map +0 -1
- package/dist/stripe-DEv4DjAL.cjs +0 -21
- package/dist/stripe-DEv4DjAL.cjs.map +0 -1
- package/dist/stripe-DuG0uaEn.cjs +0 -21
- package/dist/stripe-DuG0uaEn.cjs.map +0 -1
- package/dist/useProxyState-D5GLrY2y.js +0 -20
- package/dist/useProxyState-D5GLrY2y.js.map +0 -1
- package/dist/useProxyState-DewdF3no.cjs +0 -19
- package/dist/useProxyState-DewdF3no.cjs.map +0 -1
- package/dist/validDictionaryChangeButtons.content-BK9QaXPm.cjs +0 -66
- package/dist/validDictionaryChangeButtons.content-BK9QaXPm.cjs.map +0 -1
- package/dist/validDictionaryChangeButtons.content-CAAscqJI.cjs +0 -66
- package/dist/validDictionaryChangeButtons.content-CAAscqJI.cjs.map +0 -1
- package/dist/validDictionaryChangeButtons.content-D7AvoBdl.js +0 -67
- package/dist/validDictionaryChangeButtons.content-D7AvoBdl.js.map +0 -1
- package/dist/validDictionaryChangeButtons.content-DQwoUNCC.cjs +0 -45
- package/dist/validDictionaryChangeButtons.content-DQwoUNCC.cjs.map +0 -1
- package/dist/validDictionaryChangeButtons.content-DQxPoIe6.js +0 -67
- package/dist/validDictionaryChangeButtons.content-DQxPoIe6.js.map +0 -1
- package/dist/validDictionaryChangeButtons.content-JUcjGdBx.cjs +0 -66
- package/dist/validDictionaryChangeButtons.content-JUcjGdBx.cjs.map +0 -1
- package/dist/validDictionaryChangeButtons.content-ejY3-sbG.js +0 -67
- package/dist/validDictionaryChangeButtons.content-ejY3-sbG.js.map +0 -1
- package/dist/validDictionaryChangeButtons.content-iyT0lKy7.js +0 -46
- package/dist/validDictionaryChangeButtons.content-iyT0lKy7.js.map +0 -1
- package/dist/validDictionaryChangeButtons.content-u4qShrQh.cjs +0 -66
- package/dist/validDictionaryChangeButtons.content-u4qShrQh.cjs.map +0 -1
- package/dist/validDictionaryChangeButtons.content-y4up9NU8.js +0 -67
- package/dist/validDictionaryChangeButtons.content-y4up9NU8.js.map +0 -1
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use strict";
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
-
const jsxRuntime = require("../../jsx-runtime-
|
|
4
|
+
const jsxRuntime = require("../../jsx-runtime-XHKiWCTo.cjs");
|
|
5
5
|
const lucideReact = require("lucide-react");
|
|
6
6
|
const require$$0 = require("react");
|
|
7
|
+
const components_Button_Button = require("../Button/Button.cjs");
|
|
7
8
|
const components_TextArea_AutoSizeTextArea = require("../TextArea/AutoSizeTextArea.cjs");
|
|
8
9
|
require("../TextArea/TextArea.cjs");
|
|
9
10
|
const ContentEditorTextArea = ({
|
|
10
11
|
children,
|
|
11
12
|
onContentChange,
|
|
13
|
+
disabled,
|
|
14
|
+
validate,
|
|
12
15
|
...props
|
|
13
16
|
}) => {
|
|
14
17
|
const [newValue, setNewValue] = require$$0.useState(children);
|
|
@@ -25,6 +28,7 @@ const ContentEditorTextArea = ({
|
|
|
25
28
|
require$$0.useEffect(() => {
|
|
26
29
|
setNewValue(children);
|
|
27
30
|
}, [children]);
|
|
31
|
+
const isValid = validate?.(newValue) ?? true;
|
|
28
32
|
return /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs(
|
|
29
33
|
"div",
|
|
30
34
|
{
|
|
@@ -43,18 +47,27 @@ const ContentEditorTextArea = ({
|
|
|
43
47
|
),
|
|
44
48
|
isEdited && /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs("div", { className: "flex w-full items-center justify-end gap-2", children: [
|
|
45
49
|
/* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
|
|
46
|
-
|
|
50
|
+
components_Button_Button.Button,
|
|
47
51
|
{
|
|
52
|
+
Icon: lucideReact.Check,
|
|
53
|
+
label: "Validate",
|
|
54
|
+
variant: "hoverable",
|
|
55
|
+
color: "text",
|
|
56
|
+
size: "icon-sm",
|
|
48
57
|
className: "cursor-pointer hover:scale-110",
|
|
49
|
-
|
|
58
|
+
disabled: disabled || !isValid,
|
|
50
59
|
onClick: handleValid
|
|
51
60
|
}
|
|
52
61
|
),
|
|
53
62
|
/* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
|
|
54
|
-
|
|
63
|
+
components_Button_Button.Button,
|
|
55
64
|
{
|
|
65
|
+
Icon: lucideReact.X,
|
|
66
|
+
label: "Cancel",
|
|
67
|
+
variant: "hoverable",
|
|
68
|
+
size: "icon-sm",
|
|
69
|
+
color: "text",
|
|
56
70
|
className: "cursor-pointer hover:scale-110",
|
|
57
|
-
size: 20,
|
|
58
71
|
onClick: handleCancel
|
|
59
72
|
}
|
|
60
73
|
)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentEditorTextArea.cjs","sources":["../../../src/components/ContentEditor/ContentEditorTextArea.tsx"],"sourcesContent":["'use client';\n\nimport { Check, X } from 'lucide-react';\nimport { useState, type FC, type ChangeEventHandler, useEffect } from 'react';\nimport { AutoSizedTextArea, AutoSizedTextAreaProps } from '../TextArea';\n\nexport type ContentEditorTextAreaProps = {\n children: string;\n onContentChange: (content: string) => void;\n} & Omit<AutoSizedTextAreaProps, 'children'>;\n\nexport const ContentEditorTextArea: FC<ContentEditorTextAreaProps> = ({\n children,\n onContentChange,\n ...props\n}) => {\n const [newValue, setNewValue] = useState<string>(children);\n const [resetIncrementor, setResetIncrementor] = useState<number>(0); // To reset the div on cancel\n const isEdited: boolean = newValue !== children;\n\n const handleCancel = () => {\n setNewValue(children);\n setResetIncrementor((prev) => prev + 1);\n };\n const handleValid = () => {\n onContentChange(newValue);\n };\n\n const handleOnContentChange: ChangeEventHandler<HTMLTextAreaElement> = (e) =>\n setNewValue(e.currentTarget.value ?? '');\n\n useEffect(() => {\n setNewValue(children);\n }, [children]);\n\n return (\n <div\n className=\"flex size-full flex-col items-center justify-between gap-2\"\n key={children}\n >\n <AutoSizedTextArea\n onChange={handleOnContentChange}\n key={resetIncrementor}\n variant=\"invisible\"\n className=\"size-full\"\n defaultValue={children}\n {...props}\n />\n {isEdited && (\n <div className=\"flex w-full items-center justify-end gap-2\">\n <Check\n className=\"cursor-pointer hover:scale-110\"\n
|
|
1
|
+
{"version":3,"file":"ContentEditorTextArea.cjs","sources":["../../../src/components/ContentEditor/ContentEditorTextArea.tsx"],"sourcesContent":["'use client';\n\nimport { Check, X } from 'lucide-react';\nimport { useState, type FC, type ChangeEventHandler, useEffect } from 'react';\nimport { Button } from '../Button';\nimport { AutoSizedTextArea, AutoSizedTextAreaProps } from '../TextArea';\n\nexport type ContentEditorTextAreaProps = {\n children: string;\n onContentChange: (content: string) => void;\n disabled?: boolean;\n validate?: (content: string) => boolean;\n} & Omit<AutoSizedTextAreaProps, 'children'>;\n\nexport const ContentEditorTextArea: FC<ContentEditorTextAreaProps> = ({\n children,\n onContentChange,\n disabled,\n validate,\n ...props\n}) => {\n const [newValue, setNewValue] = useState<string>(children);\n const [resetIncrementor, setResetIncrementor] = useState<number>(0); // To reset the div on cancel\n const isEdited: boolean = newValue !== children;\n\n const handleCancel = () => {\n setNewValue(children);\n setResetIncrementor((prev) => prev + 1);\n };\n const handleValid = () => {\n onContentChange(newValue);\n };\n\n const handleOnContentChange: ChangeEventHandler<HTMLTextAreaElement> = (e) =>\n setNewValue(e.currentTarget.value ?? '');\n\n useEffect(() => {\n setNewValue(children);\n }, [children]);\n\n const isValid = validate?.(newValue) ?? true;\n\n return (\n <div\n className=\"flex size-full flex-col items-center justify-between gap-2\"\n key={children}\n >\n <AutoSizedTextArea\n onChange={handleOnContentChange}\n key={resetIncrementor}\n variant=\"invisible\"\n className=\"size-full\"\n defaultValue={children}\n {...props}\n />\n {isEdited && (\n <div className=\"flex w-full items-center justify-end gap-2\">\n <Button\n Icon={Check}\n label=\"Validate\"\n variant=\"hoverable\"\n color=\"text\"\n size=\"icon-sm\"\n className=\"cursor-pointer hover:scale-110\"\n disabled={disabled || !isValid}\n onClick={handleValid}\n />\n <Button\n Icon={X}\n label=\"Cancel\"\n variant=\"hoverable\"\n size=\"icon-sm\"\n color=\"text\"\n className=\"cursor-pointer hover:scale-110\"\n onClick={handleCancel}\n />\n </div>\n )}\n </div>\n );\n};\n"],"names":["useState","useEffect","jsxs","jsx","AutoSizedTextArea","Button","Check","X"],"mappings":";;;;;;;;;AAcO,MAAM,wBAAwD,CAAC;AAAA,EACpE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,CAAC,UAAU,WAAW,IAAIA,oBAAiB,QAAQ;AACzD,QAAM,CAAC,kBAAkB,mBAAmB,IAAIA,oBAAiB,CAAC;AAClE,QAAM,WAAoB,aAAa;AAEvC,QAAM,eAAe,MAAM;AACzB,gBAAY,QAAQ;AACA,wBAAA,CAAC,SAAS,OAAO,CAAC;AAAA,EAAA;AAExC,QAAM,cAAc,MAAM;AACxB,oBAAgB,QAAQ;AAAA,EAAA;AAG1B,QAAM,wBAAiE,CAAC,MACtE,YAAY,EAAE,cAAc,SAAS,EAAE;AAEzCC,aAAAA,UAAU,MAAM;AACd,gBAAY,QAAQ;AAAA,EAAA,GACnB,CAAC,QAAQ,CAAC;AAEP,QAAA,UAAU,WAAW,QAAQ,KAAK;AAGtC,SAAAC,2BAAA,kBAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAU;AAAA,MAGV,UAAA;AAAA,QAAAC,2BAAA,kBAAA;AAAA,UAACC,qCAAA;AAAA,UAAA;AAAA,YACC,UAAU;AAAA,YAEV,SAAQ;AAAA,YACR,WAAU;AAAA,YACV,cAAc;AAAA,YACb,GAAG;AAAA,UAAA;AAAA,UAJC;AAAA,QAKP;AAAA,QACC,YACCF,2BAAA,kBAAA,KAAC,OAAI,EAAA,WAAU,8CACb,UAAA;AAAA,UAAAC,2BAAA,kBAAA;AAAA,YAACE,yBAAA;AAAA,YAAA;AAAA,cACC,MAAMC,YAAA;AAAA,cACN,OAAM;AAAA,cACN,SAAQ;AAAA,cACR,OAAM;AAAA,cACN,MAAK;AAAA,cACL,WAAU;AAAA,cACV,UAAU,YAAY,CAAC;AAAA,cACvB,SAAS;AAAA,YAAA;AAAA,UACX;AAAA,UACAH,2BAAA,kBAAA;AAAA,YAACE,yBAAA;AAAA,YAAA;AAAA,cACC,MAAME,YAAA;AAAA,cACN,OAAM;AAAA,cACN,SAAQ;AAAA,cACR,MAAK;AAAA,cACL,OAAM;AAAA,cACN,WAAU;AAAA,cACV,SAAS;AAAA,YAAA;AAAA,UACX;AAAA,QAAA,GACF;AAAA,MAAA;AAAA,IAAA;AAAA,IA/BG;AAAA,EAAA;AAmCX;;"}
|
|
@@ -3,6 +3,8 @@ import { AutoSizedTextAreaProps } from '../TextArea';
|
|
|
3
3
|
export type ContentEditorTextAreaProps = {
|
|
4
4
|
children: string;
|
|
5
5
|
onContentChange: (content: string) => void;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
validate?: (content: string) => boolean;
|
|
6
8
|
} & Omit<AutoSizedTextAreaProps, 'children'>;
|
|
7
9
|
export declare const ContentEditorTextArea: FC<ContentEditorTextAreaProps>;
|
|
8
10
|
//# sourceMappingURL=ContentEditorTextArea.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentEditorTextArea.d.ts","sourceRoot":"","sources":["../../../src/components/ContentEditor/ContentEditorTextArea.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAY,KAAK,EAAE,EAAsC,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ContentEditorTextArea.d.ts","sourceRoot":"","sources":["../../../src/components/ContentEditor/ContentEditorTextArea.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAY,KAAK,EAAE,EAAsC,MAAM,OAAO,CAAC;AAE9E,OAAO,EAAqB,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAExE,MAAM,MAAM,0BAA0B,GAAG;IACvC,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC;CACzC,GAAG,IAAI,CAAC,sBAAsB,EAAE,UAAU,CAAC,CAAC;AAE7C,eAAO,MAAM,qBAAqB,EAAE,EAAE,CAAC,0BAA0B,CAkEhE,CAAC"}
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { j as jsxRuntimeExports } from "../../jsx-runtime-
|
|
2
|
+
import { j as jsxRuntimeExports } from "../../jsx-runtime-DaNGiM0W.js";
|
|
3
3
|
import { Check, X } from "lucide-react";
|
|
4
4
|
import { useState, useEffect } from "react";
|
|
5
|
+
import { Button } from "../Button/Button.mjs";
|
|
5
6
|
import { AutoSizedTextArea } from "../TextArea/AutoSizeTextArea.mjs";
|
|
6
7
|
import "../TextArea/TextArea.mjs";
|
|
7
8
|
const ContentEditorTextArea = ({
|
|
8
9
|
children,
|
|
9
10
|
onContentChange,
|
|
11
|
+
disabled,
|
|
12
|
+
validate,
|
|
10
13
|
...props
|
|
11
14
|
}) => {
|
|
12
15
|
const [newValue, setNewValue] = useState(children);
|
|
@@ -23,6 +26,7 @@ const ContentEditorTextArea = ({
|
|
|
23
26
|
useEffect(() => {
|
|
24
27
|
setNewValue(children);
|
|
25
28
|
}, [children]);
|
|
29
|
+
const isValid = validate?.(newValue) ?? true;
|
|
26
30
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
27
31
|
"div",
|
|
28
32
|
{
|
|
@@ -41,18 +45,27 @@ const ContentEditorTextArea = ({
|
|
|
41
45
|
),
|
|
42
46
|
isEdited && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex w-full items-center justify-end gap-2", children: [
|
|
43
47
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
44
|
-
|
|
48
|
+
Button,
|
|
45
49
|
{
|
|
50
|
+
Icon: Check,
|
|
51
|
+
label: "Validate",
|
|
52
|
+
variant: "hoverable",
|
|
53
|
+
color: "text",
|
|
54
|
+
size: "icon-sm",
|
|
46
55
|
className: "cursor-pointer hover:scale-110",
|
|
47
|
-
|
|
56
|
+
disabled: disabled || !isValid,
|
|
48
57
|
onClick: handleValid
|
|
49
58
|
}
|
|
50
59
|
),
|
|
51
60
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
52
|
-
|
|
61
|
+
Button,
|
|
53
62
|
{
|
|
63
|
+
Icon: X,
|
|
64
|
+
label: "Cancel",
|
|
65
|
+
variant: "hoverable",
|
|
66
|
+
size: "icon-sm",
|
|
67
|
+
color: "text",
|
|
54
68
|
className: "cursor-pointer hover:scale-110",
|
|
55
|
-
size: 20,
|
|
56
69
|
onClick: handleCancel
|
|
57
70
|
}
|
|
58
71
|
)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentEditorTextArea.mjs","sources":["../../../src/components/ContentEditor/ContentEditorTextArea.tsx"],"sourcesContent":["'use client';\n\nimport { Check, X } from 'lucide-react';\nimport { useState, type FC, type ChangeEventHandler, useEffect } from 'react';\nimport { AutoSizedTextArea, AutoSizedTextAreaProps } from '../TextArea';\n\nexport type ContentEditorTextAreaProps = {\n children: string;\n onContentChange: (content: string) => void;\n} & Omit<AutoSizedTextAreaProps, 'children'>;\n\nexport const ContentEditorTextArea: FC<ContentEditorTextAreaProps> = ({\n children,\n onContentChange,\n ...props\n}) => {\n const [newValue, setNewValue] = useState<string>(children);\n const [resetIncrementor, setResetIncrementor] = useState<number>(0); // To reset the div on cancel\n const isEdited: boolean = newValue !== children;\n\n const handleCancel = () => {\n setNewValue(children);\n setResetIncrementor((prev) => prev + 1);\n };\n const handleValid = () => {\n onContentChange(newValue);\n };\n\n const handleOnContentChange: ChangeEventHandler<HTMLTextAreaElement> = (e) =>\n setNewValue(e.currentTarget.value ?? '');\n\n useEffect(() => {\n setNewValue(children);\n }, [children]);\n\n return (\n <div\n className=\"flex size-full flex-col items-center justify-between gap-2\"\n key={children}\n >\n <AutoSizedTextArea\n onChange={handleOnContentChange}\n key={resetIncrementor}\n variant=\"invisible\"\n className=\"size-full\"\n defaultValue={children}\n {...props}\n />\n {isEdited && (\n <div className=\"flex w-full items-center justify-end gap-2\">\n <Check\n className=\"cursor-pointer hover:scale-110\"\n
|
|
1
|
+
{"version":3,"file":"ContentEditorTextArea.mjs","sources":["../../../src/components/ContentEditor/ContentEditorTextArea.tsx"],"sourcesContent":["'use client';\n\nimport { Check, X } from 'lucide-react';\nimport { useState, type FC, type ChangeEventHandler, useEffect } from 'react';\nimport { Button } from '../Button';\nimport { AutoSizedTextArea, AutoSizedTextAreaProps } from '../TextArea';\n\nexport type ContentEditorTextAreaProps = {\n children: string;\n onContentChange: (content: string) => void;\n disabled?: boolean;\n validate?: (content: string) => boolean;\n} & Omit<AutoSizedTextAreaProps, 'children'>;\n\nexport const ContentEditorTextArea: FC<ContentEditorTextAreaProps> = ({\n children,\n onContentChange,\n disabled,\n validate,\n ...props\n}) => {\n const [newValue, setNewValue] = useState<string>(children);\n const [resetIncrementor, setResetIncrementor] = useState<number>(0); // To reset the div on cancel\n const isEdited: boolean = newValue !== children;\n\n const handleCancel = () => {\n setNewValue(children);\n setResetIncrementor((prev) => prev + 1);\n };\n const handleValid = () => {\n onContentChange(newValue);\n };\n\n const handleOnContentChange: ChangeEventHandler<HTMLTextAreaElement> = (e) =>\n setNewValue(e.currentTarget.value ?? '');\n\n useEffect(() => {\n setNewValue(children);\n }, [children]);\n\n const isValid = validate?.(newValue) ?? true;\n\n return (\n <div\n className=\"flex size-full flex-col items-center justify-between gap-2\"\n key={children}\n >\n <AutoSizedTextArea\n onChange={handleOnContentChange}\n key={resetIncrementor}\n variant=\"invisible\"\n className=\"size-full\"\n defaultValue={children}\n {...props}\n />\n {isEdited && (\n <div className=\"flex w-full items-center justify-end gap-2\">\n <Button\n Icon={Check}\n label=\"Validate\"\n variant=\"hoverable\"\n color=\"text\"\n size=\"icon-sm\"\n className=\"cursor-pointer hover:scale-110\"\n disabled={disabled || !isValid}\n onClick={handleValid}\n />\n <Button\n Icon={X}\n label=\"Cancel\"\n variant=\"hoverable\"\n size=\"icon-sm\"\n color=\"text\"\n className=\"cursor-pointer hover:scale-110\"\n onClick={handleCancel}\n />\n </div>\n )}\n </div>\n );\n};\n"],"names":["jsxs","jsx"],"mappings":";;;;;;;AAcO,MAAM,wBAAwD,CAAC;AAAA,EACpE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,CAAC,UAAU,WAAW,IAAI,SAAiB,QAAQ;AACzD,QAAM,CAAC,kBAAkB,mBAAmB,IAAI,SAAiB,CAAC;AAClE,QAAM,WAAoB,aAAa;AAEvC,QAAM,eAAe,MAAM;AACzB,gBAAY,QAAQ;AACA,wBAAA,CAAC,SAAS,OAAO,CAAC;AAAA,EAAA;AAExC,QAAM,cAAc,MAAM;AACxB,oBAAgB,QAAQ;AAAA,EAAA;AAG1B,QAAM,wBAAiE,CAAC,MACtE,YAAY,EAAE,cAAc,SAAS,EAAE;AAEzC,YAAU,MAAM;AACd,gBAAY,QAAQ;AAAA,EAAA,GACnB,CAAC,QAAQ,CAAC;AAEP,QAAA,UAAU,WAAW,QAAQ,KAAK;AAGtC,SAAAA,kCAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAU;AAAA,MAGV,UAAA;AAAA,QAAAC,kCAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,UAAU;AAAA,YAEV,SAAQ;AAAA,YACR,WAAU;AAAA,YACV,cAAc;AAAA,YACb,GAAG;AAAA,UAAA;AAAA,UAJC;AAAA,QAKP;AAAA,QACC,YACCD,kCAAA,KAAC,OAAI,EAAA,WAAU,8CACb,UAAA;AAAA,UAAAC,kCAAA;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,MAAM;AAAA,cACN,OAAM;AAAA,cACN,SAAQ;AAAA,cACR,OAAM;AAAA,cACN,MAAK;AAAA,cACL,WAAU;AAAA,cACV,UAAU,YAAY,CAAC;AAAA,cACvB,SAAS;AAAA,YAAA;AAAA,UACX;AAAA,UACAA,kCAAA;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,MAAM;AAAA,cACN,OAAM;AAAA,cACN,SAAQ;AAAA,cACR,MAAK;AAAA,cACL,OAAM;AAAA,cACN,WAAU;AAAA,cACV,SAAS;AAAA,YAAA;AAAA,UACX;AAAA,QAAA,GACF;AAAA,MAAA;AAAA,IAAA;AAAA,IA/BG;AAAA,EAAA;AAmCX;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use strict";
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
-
const jsxRuntime = require("../../jsx-runtime-
|
|
4
|
+
const jsxRuntime = require("../../jsx-runtime-XHKiWCTo.cjs");
|
|
5
5
|
const components_PressableSpan_PressableSpan = require("../PressableSpan/PressableSpan.cjs");
|
|
6
6
|
const ContentSelector = ({
|
|
7
7
|
children,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { j as jsxRuntimeExports } from "../../jsx-runtime-
|
|
2
|
+
import { j as jsxRuntimeExports } from "../../jsx-runtime-DaNGiM0W.js";
|
|
3
3
|
import { PressableSpan } from "../PressableSpan/PressableSpan.mjs";
|
|
4
4
|
const ContentSelector = ({
|
|
5
5
|
children,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use strict";
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
-
const jsxRuntime = require("../../jsx-runtime-
|
|
4
|
+
const jsxRuntime = require("../../jsx-runtime-XHKiWCTo.cjs");
|
|
5
5
|
const require$$0 = require("react");
|
|
6
6
|
const lucideReact = require("lucide-react");
|
|
7
7
|
const utils_cn = require("../../utils/cn.cjs");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { j as jsxRuntimeExports } from "../../jsx-runtime-
|
|
2
|
+
import { j as jsxRuntimeExports } from "../../jsx-runtime-DaNGiM0W.js";
|
|
3
3
|
import { useState } from "react";
|
|
4
4
|
import { CopyCheck, CopyIcon } from "lucide-react";
|
|
5
5
|
import { cn } from "../../utils/cn.mjs";
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use strict";
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
-
const jsxRuntime = require("../../jsx-runtime-
|
|
5
|
-
const
|
|
4
|
+
const jsxRuntime = require("../../jsx-runtime-XHKiWCTo.cjs");
|
|
5
|
+
const require$$0 = require("react");
|
|
6
|
+
const components_DictionaryEditor_NodeWrapper_ArrayWrapper = require("../../index-BtZWYJhL.cjs");
|
|
6
7
|
const components_DictionaryEditor_useEditedContentStore = require("./useEditedContentStore.cjs");
|
|
7
8
|
const components_DictionaryEditor_useEditionPanelStore = require("./useEditionPanelStore.cjs");
|
|
8
9
|
const components_DictionaryEditor_ValidDictionaryChangeButtons = require("./ValidDictionaryChangeButtons.cjs");
|
|
@@ -22,15 +23,20 @@ const DictionaryEditor = ({
|
|
|
22
23
|
);
|
|
23
24
|
const focusedKeyPath = focusedContent?.keyPath;
|
|
24
25
|
return /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs("div", { className: "flex h-full flex-col justify-between gap-2", children: [
|
|
25
|
-
/* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */
|
|
26
|
+
/* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ require$$0.createElement(
|
|
26
27
|
components_DictionaryEditor_NodeWrapper_ArrayWrapper.NodeWrapper,
|
|
27
28
|
{
|
|
28
29
|
...props,
|
|
29
30
|
keyPath: [],
|
|
30
|
-
|
|
31
|
+
key: JSON.stringify(
|
|
32
|
+
(editedContent[dictionary.key] ?? dictionary).content
|
|
33
|
+
),
|
|
34
|
+
editedContent: editedContent[dictionary.key]?.content,
|
|
31
35
|
focusedKeyPath,
|
|
32
36
|
section: dictionary.content,
|
|
33
|
-
onContentChange: (content) =>
|
|
37
|
+
onContentChange: (content) => {
|
|
38
|
+
addEditedContent(dictionary.key, content.newValue, content.keyPath);
|
|
39
|
+
},
|
|
34
40
|
onFocusKeyPath: setFocusedContentKeyPath
|
|
35
41
|
}
|
|
36
42
|
) }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DictionaryEditor.cjs","sources":["../../../src/components/DictionaryEditor/DictionaryEditor.tsx"],"sourcesContent":["'use client';\n\nimport type { Locales } from '@intlayer/config/client';\nimport type { Dictionary, KeyPath } from '@intlayer/core';\nimport type { FC } from 'react';\nimport { NodeWrapper } from './NodeWrapper';\nimport { useEditedContentStore } from './useEditedContentStore';\nimport { useEditionPanelStore } from './useEditionPanelStore';\nimport { ValidDictionaryChangeButtons } from './ValidDictionaryChangeButtons';\n\ntype DictionaryEditorProps = {\n dictionary: Dictionary;\n locale: Locales;\n onClickEdit?: (keyPath: KeyPath[]) => void;\n};\n\nexport const DictionaryEditor: FC<DictionaryEditorProps> = ({\n dictionary,\n ...props\n}) => {\n const { addEditedContent, editedContent } = useEditedContentStore((s) => ({\n addEditedContent: s.addEditedContent,\n editedContent: s.editedContent,\n }));\n const { focusedContent, setFocusedContentKeyPath } = useEditionPanelStore(\n (s) => ({\n focusedContent: s.focusedContent,\n setFocusedContentKeyPath: s.setFocusedContentKeyPath,\n })\n );\n\n const focusedKeyPath = focusedContent?.keyPath;\n\n return (\n <div className=\"flex h-full flex-col justify-between gap-2\">\n <div>\n <NodeWrapper\n {...props}\n keyPath={[]}\n editedContent={editedContent.content}\n focusedKeyPath={focusedKeyPath}\n section={dictionary.content}\n onContentChange={(content)
|
|
1
|
+
{"version":3,"file":"DictionaryEditor.cjs","sources":["../../../src/components/DictionaryEditor/DictionaryEditor.tsx"],"sourcesContent":["'use client';\n\nimport type { Locales } from '@intlayer/config/client';\nimport type { Dictionary, KeyPath } from '@intlayer/core';\nimport type { FC } from 'react';\nimport { NodeWrapper } from './NodeWrapper';\nimport { useEditedContentStore } from './useEditedContentStore';\nimport { useEditionPanelStore } from './useEditionPanelStore';\nimport { ValidDictionaryChangeButtons } from './ValidDictionaryChangeButtons';\n\ntype DictionaryEditorProps = {\n dictionary: Dictionary;\n locale: Locales;\n onClickEdit?: (keyPath: KeyPath[]) => void;\n};\n\nexport const DictionaryEditor: FC<DictionaryEditorProps> = ({\n dictionary,\n ...props\n}) => {\n const { addEditedContent, editedContent } = useEditedContentStore((s) => ({\n addEditedContent: s.addEditedContent,\n editedContent: s.editedContent,\n }));\n const { focusedContent, setFocusedContentKeyPath } = useEditionPanelStore(\n (s) => ({\n focusedContent: s.focusedContent,\n setFocusedContentKeyPath: s.setFocusedContentKeyPath,\n })\n );\n\n const focusedKeyPath = focusedContent?.keyPath;\n\n return (\n <div className=\"flex h-full flex-col justify-between gap-2\">\n <div>\n <NodeWrapper\n {...props}\n keyPath={[]}\n key={JSON.stringify(\n (editedContent[dictionary.key] ?? dictionary).content\n )}\n editedContent={editedContent[dictionary.key]?.content}\n focusedKeyPath={focusedKeyPath}\n section={dictionary.content}\n onContentChange={(content) => {\n addEditedContent(dictionary.key, content.newValue, content.keyPath);\n }}\n onFocusKeyPath={setFocusedContentKeyPath}\n />\n </div>\n <ValidDictionaryChangeButtons dictionary={dictionary} />\n </div>\n );\n};\n"],"names":["useEditedContentStore","useEditionPanelStore","jsxs","jsx","createElement","NodeWrapper","ValidDictionaryChangeButtons"],"mappings":";;;;;;;;;AAgBO,MAAM,mBAA8C,CAAC;AAAA,EAC1D;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,EAAE,kBAAkB,cAAkB,IAAAA,kDAAA,sBAAsB,CAAC,OAAO;AAAA,IACxE,kBAAkB,EAAE;AAAA,IACpB,eAAe,EAAE;AAAA,EACjB,EAAA;AACI,QAAA,EAAE,gBAAgB,yBAAA,IAA6BC,iDAAA;AAAA,IACnD,CAAC,OAAO;AAAA,MACN,gBAAgB,EAAE;AAAA,MAClB,0BAA0B,EAAE;AAAA,IAAA;AAAA,EAC9B;AAGF,QAAM,iBAAiB,gBAAgB;AAGrC,SAAAC,2BAAA,kBAAA,KAAC,OAAI,EAAA,WAAU,8CACb,UAAA;AAAA,IAAAC,iDAAC,OACC,EAAA,UAAAC,2BAAA;AAAA,MAACC,qDAAA;AAAA,MAAA;AAAA,QACE,GAAG;AAAA,QACJ,SAAS,CAAC;AAAA,QACV,KAAK,KAAK;AAAA,WACP,cAAc,WAAW,GAAG,KAAK,YAAY;AAAA,QAChD;AAAA,QACA,eAAe,cAAc,WAAW,GAAG,GAAG;AAAA,QAC9C;AAAA,QACA,SAAS,WAAW;AAAA,QACpB,iBAAiB,CAAC,YAAY;AAC5B,2BAAiB,WAAW,KAAK,QAAQ,UAAU,QAAQ,OAAO;AAAA,QACpE;AAAA,QACA,gBAAgB;AAAA,MAAA;AAAA,IAAA,GAEpB;AAAA,IACAF,iDAACG,yDAAAA,gCAA6B,YAAwB;AAAA,EACxD,EAAA,CAAA;AAEJ;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DictionaryEditor.d.ts","sourceRoot":"","sources":["../../../src/components/DictionaryEditor/DictionaryEditor.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAMhC,KAAK,qBAAqB,GAAG;IAC3B,UAAU,EAAE,UAAU,CAAC;IACvB,MAAM,EAAE,OAAO,CAAC;IAChB,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;CAC5C,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,
|
|
1
|
+
{"version":3,"file":"DictionaryEditor.d.ts","sourceRoot":"","sources":["../../../src/components/DictionaryEditor/DictionaryEditor.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAMhC,KAAK,qBAAqB,GAAG;IAC3B,UAAU,EAAE,UAAU,CAAC;IACvB,MAAM,EAAE,OAAO,CAAC;IAChB,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;CAC5C,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,CAsCtD,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { j as jsxRuntimeExports } from "../../jsx-runtime-
|
|
3
|
-
import {
|
|
2
|
+
import { j as jsxRuntimeExports } from "../../jsx-runtime-DaNGiM0W.js";
|
|
3
|
+
import { createElement } from "react";
|
|
4
|
+
import { N as NodeWrapper } from "../../index-D9oaKvKC.js";
|
|
4
5
|
import { useEditedContentStore } from "./useEditedContentStore.mjs";
|
|
5
6
|
import { useEditionPanelStore } from "./useEditionPanelStore.mjs";
|
|
6
7
|
import { ValidDictionaryChangeButtons } from "./ValidDictionaryChangeButtons.mjs";
|
|
@@ -20,15 +21,20 @@ const DictionaryEditor = ({
|
|
|
20
21
|
);
|
|
21
22
|
const focusedKeyPath = focusedContent?.keyPath;
|
|
22
23
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex h-full flex-col justify-between gap-2", children: [
|
|
23
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */
|
|
24
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ createElement(
|
|
24
25
|
NodeWrapper,
|
|
25
26
|
{
|
|
26
27
|
...props,
|
|
27
28
|
keyPath: [],
|
|
28
|
-
|
|
29
|
+
key: JSON.stringify(
|
|
30
|
+
(editedContent[dictionary.key] ?? dictionary).content
|
|
31
|
+
),
|
|
32
|
+
editedContent: editedContent[dictionary.key]?.content,
|
|
29
33
|
focusedKeyPath,
|
|
30
34
|
section: dictionary.content,
|
|
31
|
-
onContentChange: (content) =>
|
|
35
|
+
onContentChange: (content) => {
|
|
36
|
+
addEditedContent(dictionary.key, content.newValue, content.keyPath);
|
|
37
|
+
},
|
|
32
38
|
onFocusKeyPath: setFocusedContentKeyPath
|
|
33
39
|
}
|
|
34
40
|
) }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DictionaryEditor.mjs","sources":["../../../src/components/DictionaryEditor/DictionaryEditor.tsx"],"sourcesContent":["'use client';\n\nimport type { Locales } from '@intlayer/config/client';\nimport type { Dictionary, KeyPath } from '@intlayer/core';\nimport type { FC } from 'react';\nimport { NodeWrapper } from './NodeWrapper';\nimport { useEditedContentStore } from './useEditedContentStore';\nimport { useEditionPanelStore } from './useEditionPanelStore';\nimport { ValidDictionaryChangeButtons } from './ValidDictionaryChangeButtons';\n\ntype DictionaryEditorProps = {\n dictionary: Dictionary;\n locale: Locales;\n onClickEdit?: (keyPath: KeyPath[]) => void;\n};\n\nexport const DictionaryEditor: FC<DictionaryEditorProps> = ({\n dictionary,\n ...props\n}) => {\n const { addEditedContent, editedContent } = useEditedContentStore((s) => ({\n addEditedContent: s.addEditedContent,\n editedContent: s.editedContent,\n }));\n const { focusedContent, setFocusedContentKeyPath } = useEditionPanelStore(\n (s) => ({\n focusedContent: s.focusedContent,\n setFocusedContentKeyPath: s.setFocusedContentKeyPath,\n })\n );\n\n const focusedKeyPath = focusedContent?.keyPath;\n\n return (\n <div className=\"flex h-full flex-col justify-between gap-2\">\n <div>\n <NodeWrapper\n {...props}\n keyPath={[]}\n editedContent={editedContent.content}\n focusedKeyPath={focusedKeyPath}\n section={dictionary.content}\n onContentChange={(content)
|
|
1
|
+
{"version":3,"file":"DictionaryEditor.mjs","sources":["../../../src/components/DictionaryEditor/DictionaryEditor.tsx"],"sourcesContent":["'use client';\n\nimport type { Locales } from '@intlayer/config/client';\nimport type { Dictionary, KeyPath } from '@intlayer/core';\nimport type { FC } from 'react';\nimport { NodeWrapper } from './NodeWrapper';\nimport { useEditedContentStore } from './useEditedContentStore';\nimport { useEditionPanelStore } from './useEditionPanelStore';\nimport { ValidDictionaryChangeButtons } from './ValidDictionaryChangeButtons';\n\ntype DictionaryEditorProps = {\n dictionary: Dictionary;\n locale: Locales;\n onClickEdit?: (keyPath: KeyPath[]) => void;\n};\n\nexport const DictionaryEditor: FC<DictionaryEditorProps> = ({\n dictionary,\n ...props\n}) => {\n const { addEditedContent, editedContent } = useEditedContentStore((s) => ({\n addEditedContent: s.addEditedContent,\n editedContent: s.editedContent,\n }));\n const { focusedContent, setFocusedContentKeyPath } = useEditionPanelStore(\n (s) => ({\n focusedContent: s.focusedContent,\n setFocusedContentKeyPath: s.setFocusedContentKeyPath,\n })\n );\n\n const focusedKeyPath = focusedContent?.keyPath;\n\n return (\n <div className=\"flex h-full flex-col justify-between gap-2\">\n <div>\n <NodeWrapper\n {...props}\n keyPath={[]}\n key={JSON.stringify(\n (editedContent[dictionary.key] ?? dictionary).content\n )}\n editedContent={editedContent[dictionary.key]?.content}\n focusedKeyPath={focusedKeyPath}\n section={dictionary.content}\n onContentChange={(content) => {\n addEditedContent(dictionary.key, content.newValue, content.keyPath);\n }}\n onFocusKeyPath={setFocusedContentKeyPath}\n />\n </div>\n <ValidDictionaryChangeButtons dictionary={dictionary} />\n </div>\n );\n};\n"],"names":["jsxs","jsx"],"mappings":";;;;;;;AAgBO,MAAM,mBAA8C,CAAC;AAAA,EAC1D;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,EAAE,kBAAkB,cAAkB,IAAA,sBAAsB,CAAC,OAAO;AAAA,IACxE,kBAAkB,EAAE;AAAA,IACpB,eAAe,EAAE;AAAA,EACjB,EAAA;AACI,QAAA,EAAE,gBAAgB,yBAAA,IAA6B;AAAA,IACnD,CAAC,OAAO;AAAA,MACN,gBAAgB,EAAE;AAAA,MAClB,0BAA0B,EAAE;AAAA,IAAA;AAAA,EAC9B;AAGF,QAAM,iBAAiB,gBAAgB;AAGrC,SAAAA,kCAAA,KAAC,OAAI,EAAA,WAAU,8CACb,UAAA;AAAA,IAAAC,sCAAC,OACC,EAAA,UAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACE,GAAG;AAAA,QACJ,SAAS,CAAC;AAAA,QACV,KAAK,KAAK;AAAA,WACP,cAAc,WAAW,GAAG,KAAK,YAAY;AAAA,QAChD;AAAA,QACA,eAAe,cAAc,WAAW,GAAG,GAAG;AAAA,QAC9C;AAAA,QACA,SAAS,WAAW;AAAA,QACpB,iBAAiB,CAAC,YAAY;AAC5B,2BAAiB,WAAW,KAAK,QAAQ,UAAU,QAAQ,OAAO;AAAA,QACpE;AAAA,QACA,gBAAgB;AAAA,MAAA;AAAA,IAAA,GAEpB;AAAA,IACAA,sCAAC,gCAA6B,YAAwB;AAAA,EACxD,EAAA,CAAA;AAEJ;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const jsxRuntime = require("../../jsx-runtime-
|
|
3
|
+
const jsxRuntime = require("../../jsx-runtime-XHKiWCTo.cjs");
|
|
4
4
|
const utils_cn = require("../../utils/cn.cjs");
|
|
5
5
|
const components_Accordion_Accordion = require("../Accordion/Accordion.cjs");
|
|
6
6
|
const ItemLayout = ({
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
require("../../../jsx-runtime-
|
|
3
|
+
require("../../../jsx-runtime-XHKiWCTo.cjs");
|
|
4
4
|
require("@intlayer/core");
|
|
5
5
|
require("lucide-react");
|
|
6
6
|
require("../ItemLayout.cjs");
|
|
7
|
-
const components_DictionaryEditor_NodeWrapper_ArrayWrapper = require("../../../index-
|
|
7
|
+
const components_DictionaryEditor_NodeWrapper_ArrayWrapper = require("../../../index-BtZWYJhL.cjs");
|
|
8
8
|
exports.ArrayWrapper = components_DictionaryEditor_NodeWrapper_ArrayWrapper.ArrayWrapper;
|
|
9
9
|
//# sourceMappingURL=ArrayWrapper.cjs.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "../../../jsx-runtime-
|
|
1
|
+
import "../../../jsx-runtime-DaNGiM0W.js";
|
|
2
2
|
import "@intlayer/core";
|
|
3
3
|
import "lucide-react";
|
|
4
4
|
import "../ItemLayout.mjs";
|
|
5
|
-
import { A } from "../../../index-
|
|
5
|
+
import { A } from "../../../index-D9oaKvKC.js";
|
|
6
6
|
export {
|
|
7
7
|
A as ArrayWrapper
|
|
8
8
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
require("../../../jsx-runtime-
|
|
3
|
+
require("../../../jsx-runtime-XHKiWCTo.cjs");
|
|
4
4
|
require("react");
|
|
5
5
|
require("@intlayer/core");
|
|
6
|
-
const components_DictionaryEditor_NodeWrapper_ArrayWrapper = require("../../../index-
|
|
6
|
+
const components_DictionaryEditor_NodeWrapper_ArrayWrapper = require("../../../index-BtZWYJhL.cjs");
|
|
7
7
|
exports.EnumerationWrapper = components_DictionaryEditor_NodeWrapper_ArrayWrapper.EnumerationWrapper;
|
|
8
8
|
//# sourceMappingURL=EnumerationWrapper.cjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "../../../jsx-runtime-
|
|
1
|
+
import "../../../jsx-runtime-DaNGiM0W.js";
|
|
2
2
|
import "react";
|
|
3
3
|
import "@intlayer/core";
|
|
4
|
-
import { E } from "../../../index-
|
|
4
|
+
import { E } from "../../../index-D9oaKvKC.js";
|
|
5
5
|
export {
|
|
6
6
|
E as EnumerationWrapper
|
|
7
7
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
require("../../../jsx-runtime-
|
|
3
|
+
require("../../../jsx-runtime-XHKiWCTo.cjs");
|
|
4
4
|
require("@intlayer/core");
|
|
5
5
|
require("lucide-react");
|
|
6
6
|
require("../ItemLayout.cjs");
|
|
7
|
-
const components_DictionaryEditor_NodeWrapper_ArrayWrapper = require("../../../index-
|
|
7
|
+
const components_DictionaryEditor_NodeWrapper_ArrayWrapper = require("../../../index-BtZWYJhL.cjs");
|
|
8
8
|
exports.NestedObjectWrapper = components_DictionaryEditor_NodeWrapper_ArrayWrapper.NestedObjectWrapper;
|
|
9
9
|
//# sourceMappingURL=NestedObjectWrapper.cjs.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "../../../jsx-runtime-
|
|
1
|
+
import "../../../jsx-runtime-DaNGiM0W.js";
|
|
2
2
|
import "@intlayer/core";
|
|
3
3
|
import "lucide-react";
|
|
4
4
|
import "../ItemLayout.mjs";
|
|
5
|
-
import { a } from "../../../index-
|
|
5
|
+
import { a } from "../../../index-D9oaKvKC.js";
|
|
6
6
|
export {
|
|
7
7
|
a as NestedObjectWrapper
|
|
8
8
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const jsxRuntime = require("../../../jsx-runtime-
|
|
3
|
+
const jsxRuntime = require("../../../jsx-runtime-XHKiWCTo.cjs");
|
|
4
4
|
require("../../EditableField/EditableFieldInput.cjs");
|
|
5
5
|
const components_EditableField_EditableFieldTextArea = require("../../EditableField/EditableFieldTextArea.cjs");
|
|
6
6
|
const utils_cn = require("../../../utils/cn.cjs");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as jsxRuntimeExports } from "../../../jsx-runtime-
|
|
1
|
+
import { j as jsxRuntimeExports } from "../../../jsx-runtime-DaNGiM0W.js";
|
|
2
2
|
import "../../EditableField/EditableFieldInput.mjs";
|
|
3
3
|
import { EditableFieldTextArea } from "../../EditableField/EditableFieldTextArea.mjs";
|
|
4
4
|
import { cn } from "../../../utils/cn.mjs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
require("../../../jsx-runtime-
|
|
3
|
+
require("../../../jsx-runtime-XHKiWCTo.cjs");
|
|
4
4
|
require("@intlayer/core");
|
|
5
|
-
const components_DictionaryEditor_NodeWrapper_ArrayWrapper = require("../../../index-
|
|
5
|
+
const components_DictionaryEditor_NodeWrapper_ArrayWrapper = require("../../../index-BtZWYJhL.cjs");
|
|
6
6
|
exports.TranslationWrapper = components_DictionaryEditor_NodeWrapper_ArrayWrapper.TranslationWrapper;
|
|
7
7
|
//# sourceMappingURL=TranslationWrapper.cjs.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
require("../../../jsx-runtime-
|
|
3
|
+
require("../../../jsx-runtime-XHKiWCTo.cjs");
|
|
4
4
|
require("@intlayer/core");
|
|
5
5
|
require("react");
|
|
6
|
-
const components_DictionaryEditor_NodeWrapper_ArrayWrapper = require("../../../index-
|
|
6
|
+
const components_DictionaryEditor_NodeWrapper_ArrayWrapper = require("../../../index-BtZWYJhL.cjs");
|
|
7
7
|
require("./StringWrapper.cjs");
|
|
8
8
|
exports.NodeWrapper = components_DictionaryEditor_NodeWrapper_ArrayWrapper.NodeWrapper;
|
|
9
9
|
exports.traceKeys = components_DictionaryEditor_NodeWrapper_ArrayWrapper.traceKeys;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Locales } from '@intlayer/config/client';
|
|
2
|
-
import { KeyPath, DictionaryValue
|
|
2
|
+
import { KeyPath, DictionaryValue } from '@intlayer/core';
|
|
3
3
|
import { FC } from 'react';
|
|
4
4
|
export declare const traceKeys: string[];
|
|
5
5
|
export type NodeWrapperProps = {
|
|
@@ -10,7 +10,7 @@ export type NodeWrapperProps = {
|
|
|
10
10
|
newValue: string;
|
|
11
11
|
}) => void;
|
|
12
12
|
locale: Locales;
|
|
13
|
-
editedContent:
|
|
13
|
+
editedContent: DictionaryValue;
|
|
14
14
|
focusedKeyPath: KeyPath[] | undefined;
|
|
15
15
|
onFocusKeyPath: (keyPath: KeyPath[]) => void;
|
|
16
16
|
onClickEdit?: (keyPath: KeyPath[]) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/DictionaryEditor/NodeWrapper/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAIL,KAAK,OAAO,EACZ,KAAK,eAAe,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/DictionaryEditor/NodeWrapper/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAIL,KAAK,OAAO,EACZ,KAAK,eAAe,EACrB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAIL,KAAK,EAAE,EACR,MAAM,OAAO,CAAC;AAOf,eAAO,MAAM,SAAS,EAAE,MAAM,EAAmC,CAAC;AAKlE,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,EAAE,OAAO,EAAE,CAAC;IACnB,OAAO,EAAE,eAAe,CAAC;IACzB,eAAe,EAAE,CAAC,OAAO,EAAE;QAAE,OAAO,EAAE,OAAO,EAAE,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IAC7E,MAAM,EAAE,OAAO,CAAC;IAChB,aAAa,EAAE,eAAe,CAAC;IAC/B,cAAc,EAAE,OAAO,EAAE,GAAG,SAAS,CAAC;IACtC,cAAc,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;IAC7C,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;CAC5C,CAAC;AAsCF,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CAsD5C,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "../../../jsx-runtime-
|
|
1
|
+
import "../../../jsx-runtime-DaNGiM0W.js";
|
|
2
2
|
import "@intlayer/core";
|
|
3
3
|
import "react";
|
|
4
|
-
import { N, t } from "../../../index-
|
|
4
|
+
import { N, t } from "../../../index-D9oaKvKC.js";
|
|
5
5
|
import "./StringWrapper.mjs";
|
|
6
6
|
export {
|
|
7
7
|
N as NodeWrapper,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use strict";
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
-
const jsxRuntime = require("../../jsx-runtime-
|
|
4
|
+
const jsxRuntime = require("../../jsx-runtime-XHKiWCTo.cjs");
|
|
5
5
|
const lucideReact = require("lucide-react");
|
|
6
6
|
const require$$0 = require("react");
|
|
7
7
|
const reactIntlayer = require("react-intlayer");
|
|
@@ -12,7 +12,7 @@ require("@intlayer/dictionaries-entry");
|
|
|
12
12
|
require("deepmerge");
|
|
13
13
|
const components_Form_FormBase = require("../Form/FormBase.cjs");
|
|
14
14
|
require("../Form/FormField.cjs");
|
|
15
|
-
const components_Form_layout_FormItemLayout = require("../../Form-
|
|
15
|
+
const components_Form_layout_FormItemLayout = require("../../Form-BDcoNTLV.cjs");
|
|
16
16
|
const components_DictionaryEditor_useEditedContentStore = require("./useEditedContentStore.cjs");
|
|
17
17
|
const components_DictionaryEditor_validDictionaryChangeButtons_content = require("./validDictionaryChangeButtons.content.cjs");
|
|
18
18
|
const components_DictionaryEditor_validDictionaryChangeButtonsSchema = require("./validDictionaryChangeButtonsSchema.cjs");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { j as jsxRuntimeExports } from "../../jsx-runtime-
|
|
2
|
+
import { j as jsxRuntimeExports } from "../../jsx-runtime-DaNGiM0W.js";
|
|
3
3
|
import { RotateCcw, ArrowUpFromLine, Save } from "lucide-react";
|
|
4
4
|
import { useMemo } from "react";
|
|
5
5
|
import { useDictionary } from "react-intlayer";
|
|
@@ -10,7 +10,7 @@ import "@intlayer/dictionaries-entry";
|
|
|
10
10
|
import "deepmerge";
|
|
11
11
|
import { useForm } from "../Form/FormBase.mjs";
|
|
12
12
|
import "../Form/FormField.mjs";
|
|
13
|
-
import { F as Form } from "../../Form-
|
|
13
|
+
import { F as Form } from "../../Form-DhsgC7kB.js";
|
|
14
14
|
import { useEditedContentStore } from "./useEditedContentStore.mjs";
|
|
15
15
|
import { validDictionaryChangeButtonsContent } from "./validDictionaryChangeButtons.content.mjs";
|
|
16
16
|
import { getValidDictionaryChangeButtonsSchemaSchema } from "./validDictionaryChangeButtonsSchema.mjs";
|
|
@@ -348,6 +348,15 @@ const useEditedContentStore = zustand.create(
|
|
|
348
348
|
...dictionariesRecord
|
|
349
349
|
}
|
|
350
350
|
})),
|
|
351
|
+
setEditedContent: (dictionaryKey, newValue) => set((state) => ({
|
|
352
|
+
editedContent: {
|
|
353
|
+
...state.editedContent,
|
|
354
|
+
[dictionaryKey]: {
|
|
355
|
+
...state.editedContent[dictionaryKey],
|
|
356
|
+
content: newValue
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
})),
|
|
351
360
|
addEditedContent: (dictionaryKey, newValue, keyPath = [], overwrite = true) => set((state) => {
|
|
352
361
|
const dictionaryContent = state.editedContent[dictionaryKey]?.content ?? JSON.parse(
|
|
353
362
|
JSON.stringify(state.dictionariesRecord[dictionaryKey].content)
|
|
@@ -441,16 +450,10 @@ const useEditedContentStore = zustand.create(
|
|
|
441
450
|
},
|
|
442
451
|
restoreEditedContent: (dictionaryKey) => {
|
|
443
452
|
set((state) => {
|
|
444
|
-
const
|
|
445
|
-
|
|
453
|
+
const updatedEditedContent = { ...state.editedContent };
|
|
454
|
+
delete updatedEditedContent[dictionaryKey];
|
|
446
455
|
return {
|
|
447
|
-
editedContent:
|
|
448
|
-
...state.editedContent,
|
|
449
|
-
[dictionaryKey]: {
|
|
450
|
-
...state.editedContent[dictionaryKey],
|
|
451
|
-
content: clonedContent
|
|
452
|
-
}
|
|
453
|
-
}
|
|
456
|
+
editedContent: updatedEditedContent
|
|
454
457
|
};
|
|
455
458
|
});
|
|
456
459
|
},
|
|
@@ -476,7 +479,7 @@ const useEditedContentStore = zustand.create(
|
|
|
476
479
|
set({ editedContent: {} });
|
|
477
480
|
},
|
|
478
481
|
getEditedContentValue: (dictionaryKey, keyPath) => utils_dictionary.getDictionaryValueByKeyPath(
|
|
479
|
-
get().editedContent[dictionaryKey],
|
|
482
|
+
get().editedContent[dictionaryKey]?.content ?? {},
|
|
480
483
|
keyPath
|
|
481
484
|
)
|
|
482
485
|
}),
|