@intlayer/design-system 3.0.2 → 3.1.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 +521 -395
- package/dist/Form-2XHQV7F_.cjs +295 -0
- package/dist/Form-2XHQV7F_.cjs.map +1 -0
- package/dist/Form-BO0i3nT9.js +300 -0
- package/dist/Form-BO0i3nT9.js.map +1 -0
- package/dist/Form-BaHDK0RZ.cjs +298 -0
- package/dist/Form-BaHDK0RZ.cjs.map +1 -0
- package/dist/Form-BfZMqK2D.js +300 -0
- package/dist/Form-BfZMqK2D.js.map +1 -0
- package/dist/Form-C13KWSZs.cjs +299 -0
- package/dist/Form-C13KWSZs.cjs.map +1 -0
- package/dist/Form-C8K2f8ph.js +300 -0
- package/dist/Form-C8K2f8ph.js.map +1 -0
- package/dist/Form-CKvCgz8c.cjs +299 -0
- package/dist/Form-CKvCgz8c.cjs.map +1 -0
- package/dist/Form-Cbk5Lhpd.js +299 -0
- package/dist/Form-Cbk5Lhpd.js.map +1 -0
- package/dist/Form-CiAgFAPb.cjs +300 -0
- package/dist/Form-CiAgFAPb.cjs.map +1 -0
- package/dist/Form-CnBKDneQ.js +296 -0
- package/dist/Form-CnBKDneQ.js.map +1 -0
- package/dist/Form-DERuauvB.cjs +300 -0
- package/dist/Form-DERuauvB.cjs.map +1 -0
- package/dist/Form-DhlDf3ML.cjs +299 -0
- package/dist/Form-DhlDf3ML.cjs.map +1 -0
- package/dist/Form-DkAZ0Jdf.cjs +299 -0
- package/dist/Form-DkAZ0Jdf.cjs.map +1 -0
- package/dist/Form-DqnNP4DA.js +300 -0
- package/dist/Form-DqnNP4DA.js.map +1 -0
- package/dist/Form-DyFBmVya.js +301 -0
- package/dist/Form-DyFBmVya.js.map +1 -0
- package/dist/Form-FW4Odjfm.js +301 -0
- package/dist/Form-FW4Odjfm.js.map +1 -0
- package/dist/components/Accordion/Accordion.d.ts +0 -1
- package/dist/components/Auth/AuthModal/index.d.ts +0 -1
- package/dist/components/Auth/AuthProvider/index.cjs +5 -21
- package/dist/components/Auth/AuthProvider/index.cjs.map +1 -1
- package/dist/components/Auth/AuthProvider/index.d.ts +4 -3
- package/dist/components/Auth/AuthProvider/index.d.ts.map +1 -1
- package/dist/components/Auth/AuthProvider/index.mjs +6 -22
- package/dist/components/Auth/AuthProvider/index.mjs.map +1 -1
- package/dist/components/Auth/AuthProvider/useSession.cjs +7 -3
- package/dist/components/Auth/AuthProvider/useSession.cjs.map +1 -1
- package/dist/components/Auth/AuthProvider/useSession.d.ts +0 -1
- package/dist/components/Auth/AuthProvider/useSession.d.ts.map +1 -1
- package/dist/components/Auth/AuthProvider/useSession.mjs +7 -3
- package/dist/components/Auth/AuthProvider/useSession.mjs.map +1 -1
- package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierClient.d.ts +0 -1
- package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierServer.d.ts +0 -1
- package/dist/components/Auth/AuthenticationBarrier/accessValidation.d.ts +0 -1
- package/dist/components/Auth/AuthenticationBarrier/index.d.ts +0 -1
- package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.cjs +1 -1
- package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.d.ts +0 -1
- package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.mjs +1 -1
- package/dist/components/Auth/ChangePasswordForm/ChangePasswordSchema.cjs.map +1 -1
- package/dist/components/Auth/ChangePasswordForm/ChangePasswordSchema.d.ts +0 -1
- package/dist/components/Auth/ChangePasswordForm/ChangePasswordSchema.mjs.map +1 -1
- package/dist/components/Auth/ChangePasswordForm/index.content.cjs.map +1 -1
- package/dist/components/Auth/ChangePasswordForm/index.content.d.ts +10 -10
- package/dist/components/Auth/ChangePasswordForm/index.content.mjs.map +1 -1
- package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.d.ts +0 -1
- package/dist/components/Auth/ExternalsLoginButtons/assets/GithubLogo.d.ts +0 -1
- package/dist/components/Auth/ExternalsLoginButtons/assets/GoogleLogo.d.ts +0 -1
- package/dist/components/Auth/ExternalsLoginButtons/externalsLoginButtons.content.cjs.map +1 -1
- package/dist/components/Auth/ExternalsLoginButtons/externalsLoginButtons.content.d.ts +5 -5
- package/dist/components/Auth/ExternalsLoginButtons/externalsLoginButtons.content.mjs.map +1 -1
- package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.cjs +1 -1
- package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.d.ts +0 -1
- package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.mjs +1 -1
- package/dist/components/Auth/ResetPasswordForm/ResetPasswordSchema.cjs.map +1 -1
- package/dist/components/Auth/ResetPasswordForm/ResetPasswordSchema.d.ts +0 -1
- package/dist/components/Auth/ResetPasswordForm/ResetPasswordSchema.mjs.map +1 -1
- package/dist/components/Auth/ResetPasswordForm/index.content.cjs.map +1 -1
- package/dist/components/Auth/ResetPasswordForm/index.content.d.ts +7 -7
- package/dist/components/Auth/ResetPasswordForm/index.content.mjs.map +1 -1
- package/dist/components/Auth/SignInForm/SignInForm.cjs +1 -1
- package/dist/components/Auth/SignInForm/SignInForm.d.ts +0 -1
- package/dist/components/Auth/SignInForm/SignInForm.mjs +1 -1
- package/dist/components/Auth/SignInForm/SignInSchema.cjs.map +1 -1
- package/dist/components/Auth/SignInForm/SignInSchema.d.ts +0 -1
- package/dist/components/Auth/SignInForm/SignInSchema.mjs.map +1 -1
- package/dist/components/Auth/SignInForm/index.content.cjs.map +1 -1
- package/dist/components/Auth/SignInForm/index.content.d.ts +13 -13
- package/dist/components/Auth/SignInForm/index.content.mjs.map +1 -1
- package/dist/components/Auth/SignUpForm/SignUpForm.cjs +1 -1
- package/dist/components/Auth/SignUpForm/SignUpForm.d.ts +0 -1
- package/dist/components/Auth/SignUpForm/SignUpForm.mjs +1 -1
- package/dist/components/Auth/SignUpForm/SignUpSchema.cjs.map +1 -1
- package/dist/components/Auth/SignUpForm/SignUpSchema.d.ts +0 -1
- package/dist/components/Auth/SignUpForm/SignUpSchema.mjs.map +1 -1
- package/dist/components/Auth/SignUpForm/index.content.cjs.map +1 -1
- package/dist/components/Auth/SignUpForm/index.content.d.ts +11 -11
- package/dist/components/Auth/SignUpForm/index.content.mjs.map +1 -1
- package/dist/components/Avatar/index.d.ts +0 -1
- package/dist/components/Badge/index.d.ts +1 -2
- package/dist/components/Breadcrumb/index.d.ts +0 -1
- package/dist/components/Button/Button.cjs +1 -0
- package/dist/components/Button/Button.cjs.map +1 -1
- package/dist/components/Button/Button.d.ts +2 -3
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/Button/Button.mjs +1 -0
- package/dist/components/Button/Button.mjs.map +1 -1
- package/dist/components/Command/index.d.ts +9 -10
- package/dist/components/Command/index.d.ts.map +1 -1
- package/dist/components/Container/index.cjs.map +1 -1
- package/dist/components/Container/index.d.ts +16 -3
- package/dist/components/Container/index.d.ts.map +1 -1
- package/dist/components/Container/index.mjs.map +1 -1
- package/dist/components/ContentEditor/ContentEditor.d.ts +0 -1
- package/dist/components/ContentEditor/ContentEditorTextArea.d.ts +0 -1
- package/dist/components/ContentSelector/ContentSelector.d.ts +0 -1
- package/dist/components/CopyToClipboard/index.d.ts +0 -1
- package/dist/components/DictionaryEditor/DictionaryEditor.cjs +30 -24
- package/dist/components/DictionaryEditor/DictionaryEditor.cjs.map +1 -1
- package/dist/components/DictionaryEditor/DictionaryEditor.d.ts +0 -7
- package/dist/components/DictionaryEditor/DictionaryEditor.d.ts.map +1 -1
- package/dist/components/DictionaryEditor/DictionaryEditor.mjs +30 -24
- package/dist/components/DictionaryEditor/DictionaryEditor.mjs.map +1 -1
- package/dist/components/DictionaryEditor/ItemLayout.cjs +1 -0
- package/dist/components/DictionaryEditor/ItemLayout.cjs.map +1 -1
- package/dist/components/DictionaryEditor/ItemLayout.d.ts +0 -1
- package/dist/components/DictionaryEditor/ItemLayout.d.ts.map +1 -1
- package/dist/components/DictionaryEditor/ItemLayout.mjs +1 -0
- package/dist/components/DictionaryEditor/ItemLayout.mjs.map +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/ArrayWrapper.d.ts +0 -1
- package/dist/components/DictionaryEditor/NodeWrapper/EnumerationWrapper.d.ts +0 -1
- package/dist/components/DictionaryEditor/NodeWrapper/NestedObjectWrapper.d.ts +0 -1
- package/dist/components/DictionaryEditor/NodeWrapper/StringWrapper.cjs +7 -5
- package/dist/components/DictionaryEditor/NodeWrapper/StringWrapper.cjs.map +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/StringWrapper.d.ts +0 -1
- package/dist/components/DictionaryEditor/NodeWrapper/StringWrapper.mjs +7 -5
- package/dist/components/DictionaryEditor/NodeWrapper/StringWrapper.mjs.map +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/TranslationWrapper.d.ts +0 -1
- package/dist/components/DictionaryEditor/NodeWrapper/index.d.ts +0 -1
- package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.cjs +111 -19
- package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.cjs.map +1 -1
- package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.d.ts +1 -5
- package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.d.ts.map +1 -1
- package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.mjs +112 -20
- package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.mjs.map +1 -1
- package/dist/components/DictionaryEditor/useEditedContentStore.cjs +18 -20
- package/dist/components/DictionaryEditor/useEditedContentStore.cjs.map +1 -1
- package/dist/components/DictionaryEditor/useEditedContentStore.d.ts +0 -1
- package/dist/components/DictionaryEditor/useEditedContentStore.d.ts.map +1 -1
- package/dist/components/DictionaryEditor/useEditedContentStore.mjs +19 -21
- package/dist/components/DictionaryEditor/useEditedContentStore.mjs.map +1 -1
- package/dist/components/DictionaryEditor/useEditionPanelStore.d.ts +0 -1
- package/dist/components/DictionaryEditor/validDictionaryChangeButtons.content.cjs +67 -0
- package/dist/components/DictionaryEditor/validDictionaryChangeButtons.content.cjs.map +1 -0
- package/dist/components/DictionaryEditor/validDictionaryChangeButtons.content.d.ts +27 -0
- package/dist/components/DictionaryEditor/validDictionaryChangeButtons.content.d.ts.map +1 -0
- package/dist/components/DictionaryEditor/validDictionaryChangeButtons.content.mjs +67 -0
- package/dist/components/DictionaryEditor/validDictionaryChangeButtons.content.mjs.map +1 -0
- package/dist/components/DictionaryEditor/validDictionaryChangeButtonsSchema.cjs +8 -0
- package/dist/components/DictionaryEditor/validDictionaryChangeButtonsSchema.cjs.map +1 -0
- package/dist/components/DictionaryEditor/validDictionaryChangeButtonsSchema.d.ts +4 -0
- package/dist/components/DictionaryEditor/validDictionaryChangeButtonsSchema.d.ts.map +1 -0
- package/dist/components/DictionaryEditor/validDictionaryChangeButtonsSchema.mjs +8 -0
- package/dist/components/DictionaryEditor/validDictionaryChangeButtonsSchema.mjs.map +1 -0
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.cjs +8 -2
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.d.ts +0 -1
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.mjs +8 -2
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.cjs +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.d.ts +0 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.mjs +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryFormSchema.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryFormSchema.d.ts +2 -3
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryFormSchema.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryFormSchema.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.cjs +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.d.ts +0 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsSchema.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsSchema.d.ts +2 -3
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsSchema.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsSchema.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.cjs +2 -2
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.mjs +2 -2
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.cjs +37 -13
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.d.ts +0 -1
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs +37 -13
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/EditorView/EditorView.cjs +21 -6
- package/dist/components/DictionaryFieldEditor/EditorView/EditorView.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/EditorView/EditorView.d.ts +0 -1
- package/dist/components/DictionaryFieldEditor/EditorView/EditorView.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/EditorView/EditorView.mjs +21 -6
- package/dist/components/DictionaryFieldEditor/EditorView/EditorView.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.cjs +29 -14
- package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.d.ts +0 -1
- package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.mjs +29 -14
- package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/EnumKeyInput.cjs +1 -0
- package/dist/components/DictionaryFieldEditor/EnumKeyInput.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/EnumKeyInput.d.ts +0 -1
- package/dist/components/DictionaryFieldEditor/EnumKeyInput.mjs +1 -0
- package/dist/components/DictionaryFieldEditor/EnumKeyInput.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/KeyPathBreadcrumb.d.ts +0 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.cjs +18 -2
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.d.ts +0 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.mjs +18 -2
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NodeTypeSelector.cjs +18 -2
- package/dist/components/DictionaryFieldEditor/NodeTypeSelector.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NodeTypeSelector.d.ts +0 -1
- package/dist/components/DictionaryFieldEditor/NodeTypeSelector.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/NodeTypeSelector.mjs +18 -2
- package/dist/components/DictionaryFieldEditor/NodeTypeSelector.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs +14 -15
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.d.ts +0 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs +14 -15
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveFormSchema.d.ts +0 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.cjs +12 -12
- package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.d.ts +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.mjs +12 -12
- package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/getIsEditableSection.d.ts +0 -1
- package/dist/components/DropDown/index.d.ts +0 -1
- package/dist/components/DropDown/types.d.ts +0 -1
- package/dist/components/EditableField/EditableFieldInput.cjs +12 -5
- package/dist/components/EditableField/EditableFieldInput.cjs.map +1 -1
- package/dist/components/EditableField/EditableFieldInput.d.ts +2 -4
- package/dist/components/EditableField/EditableFieldInput.d.ts.map +1 -1
- package/dist/components/EditableField/EditableFieldInput.mjs +13 -6
- package/dist/components/EditableField/EditableFieldInput.mjs.map +1 -1
- package/dist/components/EditableField/EditableFieldLayout.d.ts +0 -1
- package/dist/components/EditableField/EditableFieldTextArea.cjs +17 -4
- package/dist/components/EditableField/EditableFieldTextArea.cjs.map +1 -1
- package/dist/components/EditableField/EditableFieldTextArea.d.ts +6 -3
- package/dist/components/EditableField/EditableFieldTextArea.d.ts.map +1 -1
- package/dist/components/EditableField/EditableFieldTextArea.mjs +18 -5
- package/dist/components/EditableField/EditableFieldTextArea.mjs.map +1 -1
- package/dist/components/Flags/Flag.d.ts +0 -1
- package/dist/components/Footer/index.d.ts +0 -1
- package/dist/components/Form/Form.cjs +1 -1
- package/dist/components/Form/Form.d.ts +2 -1
- package/dist/components/Form/Form.d.ts.map +1 -1
- package/dist/components/Form/Form.mjs +1 -1
- package/dist/components/Form/FormBase.d.ts +0 -1
- package/dist/components/Form/FormBase.d.ts.map +1 -1
- package/dist/components/Form/FormDescription.d.ts +0 -1
- package/dist/components/Form/FormField.d.ts +0 -1
- package/dist/components/Form/FormItem.d.ts +0 -1
- package/dist/components/Form/FormMessage.d.ts +0 -1
- package/dist/components/Form/elements/CheckboxElement.cjs +10 -0
- package/dist/components/Form/elements/CheckboxElement.cjs.map +1 -0
- package/dist/components/Form/elements/CheckboxElement.d.ts +10 -0
- package/dist/components/Form/elements/CheckboxElement.d.ts.map +1 -0
- package/dist/components/Form/elements/CheckboxElement.mjs +10 -0
- package/dist/components/Form/elements/CheckboxElement.mjs.map +1 -0
- package/dist/components/Form/elements/EditableFieldInputElement.cjs +1 -1
- package/dist/components/Form/elements/EditableFieldInputElement.d.ts +0 -1
- package/dist/components/Form/elements/EditableFieldInputElement.mjs +1 -1
- package/dist/components/Form/elements/EditableFieldTextAreaElement.cjs +1 -1
- package/dist/components/Form/elements/EditableFieldTextAreaElement.d.ts +0 -1
- package/dist/components/Form/elements/EditableFieldTextAreaElement.mjs +1 -1
- package/dist/components/Form/elements/FormElement.cjs +1 -1
- package/dist/components/Form/elements/FormElement.d.ts +0 -1
- package/dist/components/Form/elements/FormElement.mjs +1 -1
- package/dist/components/Form/elements/FormElementWrapper.d.ts +0 -1
- package/dist/components/Form/elements/InputElement.cjs +2 -1
- package/dist/components/Form/elements/InputElement.cjs.map +1 -1
- package/dist/components/Form/elements/InputElement.d.ts +2 -3
- package/dist/components/Form/elements/InputElement.d.ts.map +1 -1
- package/dist/components/Form/elements/InputElement.mjs +2 -1
- package/dist/components/Form/elements/InputElement.mjs.map +1 -1
- package/dist/components/Form/elements/InputPasswordElement.cjs +2 -1
- package/dist/components/Form/elements/InputPasswordElement.cjs.map +1 -1
- package/dist/components/Form/elements/InputPasswordElement.d.ts +2 -3
- package/dist/components/Form/elements/InputPasswordElement.d.ts.map +1 -1
- package/dist/components/Form/elements/InputPasswordElement.mjs +2 -1
- package/dist/components/Form/elements/InputPasswordElement.mjs.map +1 -1
- package/dist/components/Form/elements/MultiselectElement.cjs +1 -1
- package/dist/components/Form/elements/MultiselectElement.d.ts +0 -1
- package/dist/components/Form/elements/MultiselectElement.mjs +1 -1
- package/dist/components/Form/elements/SelectElement.cjs +1 -1
- package/dist/components/Form/elements/SelectElement.d.ts +0 -1
- package/dist/components/Form/elements/SelectElement.mjs +1 -1
- package/dist/components/Form/elements/SwitchSelectorElement.cjs +1 -1
- package/dist/components/Form/elements/SwitchSelectorElement.d.ts +0 -1
- package/dist/components/Form/elements/SwitchSelectorElement.mjs +1 -1
- package/dist/components/Form/elements/TextAreaElement.cjs +1 -1
- package/dist/components/Form/elements/TextAreaElement.d.ts +0 -1
- package/dist/components/Form/elements/TextAreaElement.mjs +1 -1
- 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 +1 -1
- package/dist/components/Form/layout/FormItemLayout.d.ts +1 -2
- package/dist/components/Form/layout/FormItemLayout.d.ts.map +1 -1
- package/dist/components/Form/layout/FormItemLayout.mjs +1 -1
- package/dist/components/Form/layout/FormLabelLayout.d.ts +0 -1
- package/dist/components/Form/layout/RequiredStar.d.ts +0 -1
- package/dist/components/Form/layout/index.cjs +1 -1
- package/dist/components/Form/layout/index.mjs +1 -1
- package/dist/components/Headers/index.d.ts +0 -1
- package/dist/components/IDE/CodeRender.cjs.map +1 -1
- package/dist/components/IDE/CodeRender.d.ts +0 -1
- package/dist/components/IDE/CodeRender.mjs.map +1 -1
- package/dist/components/IDE/FileList.d.ts +0 -1
- package/dist/components/IDE/FileTree.d.ts +0 -1
- package/dist/components/IDE/IDE.d.ts +0 -1
- package/dist/components/IDE/MarkDownRender.d.ts +0 -1
- package/dist/components/InformationTag/index.d.ts +0 -1
- package/dist/components/Input/Checkbox.cjs +80 -0
- package/dist/components/Input/Checkbox.cjs.map +1 -0
- package/dist/components/Input/Checkbox.d.ts +14 -0
- package/dist/components/Input/Checkbox.d.ts.map +1 -0
- package/dist/components/Input/Checkbox.mjs +80 -0
- package/dist/components/Input/Checkbox.mjs.map +1 -0
- package/dist/components/Input/Input.d.ts +0 -1
- package/dist/components/Input/InputPassword.d.ts +0 -1
- package/dist/components/Input/index.cjs +3 -0
- package/dist/components/Input/index.cjs.map +1 -1
- package/dist/components/Input/index.d.ts +1 -0
- package/dist/components/Input/index.d.ts.map +1 -1
- package/dist/components/Input/index.mjs +3 -0
- package/dist/components/Input/index.mjs.map +1 -1
- package/dist/components/Label/index.d.ts +0 -1
- package/dist/components/Link/Link.cjs +7 -2
- package/dist/components/Link/Link.cjs.map +1 -1
- package/dist/components/Link/Link.d.ts +3 -3
- package/dist/components/Link/Link.d.ts.map +1 -1
- package/dist/components/Link/Link.mjs +7 -2
- package/dist/components/Link/Link.mjs.map +1 -1
- package/dist/components/Loader/index.d.ts +0 -1
- package/dist/components/Loader/spinner.d.ts +0 -1
- package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.d.ts +0 -1
- package/dist/components/Logo/LogoCircle.d.ts +0 -1
- package/dist/components/Logo/LogoNoFrame.d.ts +0 -1
- package/dist/components/Logo/LogoSquare.d.ts +0 -1
- package/dist/components/Logo/LogoSquircle.d.ts +0 -1
- package/dist/components/Logo/LogoTextOnly.d.ts +0 -1
- package/dist/components/Logo/LogoWithTextBelowCircle.d.ts +0 -1
- package/dist/components/Logo/LogoWithTextBelowNoFrame.d.ts +0 -1
- package/dist/components/Logo/LogoWithTextBelowSquircle.d.ts +0 -1
- package/dist/components/Logo/LogoWithTextCircle.d.ts +0 -1
- package/dist/components/Logo/LogoWithTextNoFrame.d.ts +0 -1
- package/dist/components/Logo/LogoWithTextSquircle.d.ts +0 -1
- package/dist/components/Logo/index.d.ts +0 -1
- package/dist/components/MarkDownRender/index.d.ts +0 -1
- package/dist/components/MaxHeightSmoother/index.d.ts +0 -1
- package/dist/components/MaxWidthSmoother/index.d.ts +0 -1
- package/dist/components/Modal/Modal.cjs +19 -15
- package/dist/components/Modal/Modal.cjs.map +1 -1
- package/dist/components/Modal/Modal.d.ts +3 -3
- package/dist/components/Modal/Modal.d.ts.map +1 -1
- package/dist/components/Modal/Modal.mjs +19 -15
- package/dist/components/Modal/Modal.mjs.map +1 -1
- package/dist/components/Navbar/Burger.d.ts +0 -1
- package/dist/components/Navbar/DesktopNavbar.cjs +10 -26
- package/dist/components/Navbar/DesktopNavbar.cjs.map +1 -1
- package/dist/components/Navbar/DesktopNavbar.d.ts +6 -6
- package/dist/components/Navbar/DesktopNavbar.d.ts.map +1 -1
- package/dist/components/Navbar/DesktopNavbar.mjs +10 -26
- package/dist/components/Navbar/DesktopNavbar.mjs.map +1 -1
- package/dist/components/Navbar/MobileNavbar.cjs +3 -57
- package/dist/components/Navbar/MobileNavbar.cjs.map +1 -1
- package/dist/components/Navbar/MobileNavbar.d.ts +6 -7
- package/dist/components/Navbar/MobileNavbar.d.ts.map +1 -1
- package/dist/components/Navbar/MobileNavbar.mjs +3 -57
- package/dist/components/Navbar/MobileNavbar.mjs.map +1 -1
- package/dist/components/Navbar/index.cjs +4 -2
- package/dist/components/Navbar/index.cjs.map +1 -1
- package/dist/components/Navbar/index.d.ts +9 -15
- package/dist/components/Navbar/index.d.ts.map +1 -1
- package/dist/components/Navbar/index.mjs +4 -2
- package/dist/components/Navbar/index.mjs.map +1 -1
- package/dist/components/Pattern/DotPattern.d.ts +0 -1
- package/dist/components/Pattern/GridPattern.d.ts +0 -1
- package/dist/components/Pattern/SpotLight.d.ts +0 -1
- package/dist/components/Popover/index.d.ts +0 -1
- package/dist/components/PressableSpan/PressableSpan.d.ts +0 -1
- package/dist/components/ProfileDropDown/index.d.ts +0 -1
- package/dist/components/RightDrawer/RightDrawer.d.ts +0 -1
- package/dist/components/Select/Multiselect.d.ts +2 -3
- package/dist/components/Select/Multiselect.d.ts.map +1 -1
- package/dist/components/SwitchSelector/index.d.ts +1 -2
- package/dist/components/TabSelector/TabSelector.cjs +2 -0
- package/dist/components/TabSelector/TabSelector.cjs.map +1 -1
- package/dist/components/TabSelector/TabSelector.d.ts +2 -3
- package/dist/components/TabSelector/TabSelector.d.ts.map +1 -1
- package/dist/components/TabSelector/TabSelector.mjs +2 -0
- package/dist/components/TabSelector/TabSelector.mjs.map +1 -1
- package/dist/components/TextArea/AutoSizeTextArea.d.ts +0 -1
- package/dist/components/TextArea/TextArea.cjs +1 -0
- package/dist/components/TextArea/TextArea.cjs.map +1 -1
- package/dist/components/TextArea/TextArea.d.ts +0 -1
- package/dist/components/TextArea/TextArea.mjs +1 -0
- package/dist/components/TextArea/TextArea.mjs.map +1 -1
- package/dist/components/ThemeSwitcherDropDown/DesktopThemeSwitcher.d.ts +0 -1
- package/dist/components/ThemeSwitcherDropDown/MobileThemeSwitcher.d.ts +0 -1
- package/dist/components/Toaster/Toast.d.ts +1 -1
- package/dist/components/Toaster/useToast.d.ts +0 -1
- package/dist/components/WithResizer/index.d.ts +0 -1
- package/dist/components/index.cjs +4 -3
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.d.ts +0 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.mjs +4 -3
- package/dist/hooks/intlayerAPIHooks.cjs +16 -3
- package/dist/hooks/intlayerAPIHooks.cjs.map +1 -1
- package/dist/hooks/intlayerAPIHooks.d.ts +0 -1
- package/dist/hooks/intlayerAPIHooks.d.ts.map +1 -1
- package/dist/hooks/intlayerAPIHooks.mjs +16 -3
- package/dist/hooks/intlayerAPIHooks.mjs.map +1 -1
- package/dist/hooks/useAsync/useAsync.cjs +1 -5
- package/dist/hooks/useAsync/useAsync.cjs.map +1 -1
- package/dist/hooks/useAsync/useAsync.d.ts.map +1 -1
- package/dist/hooks/useAsync/useAsync.mjs +1 -5
- package/dist/hooks/useAsync/useAsync.mjs.map +1 -1
- package/dist/hooks/useAsync/useAsyncWrapper.d.ts +0 -1
- package/dist/hooks/useGetAllDictionaries.d.ts +0 -1
- package/dist/hooks/useItemSelector.d.ts +0 -1
- package/dist/index-BUDsCMdX.cjs +204 -0
- package/dist/index-BUDsCMdX.cjs.map +1 -0
- package/dist/index-C09rI9kw.js +205 -0
- package/dist/index-C09rI9kw.js.map +1 -0
- package/dist/libs/intlayer-api/auth.d.ts +0 -1
- package/dist/libs/intlayer-api/dictionary.d.ts +0 -1
- package/dist/libs/intlayer-api/fetcher.cjs +1 -6
- package/dist/libs/intlayer-api/fetcher.cjs.map +1 -1
- package/dist/libs/intlayer-api/fetcher.d.ts.map +1 -1
- package/dist/libs/intlayer-api/fetcher.mjs +1 -6
- package/dist/libs/intlayer-api/fetcher.mjs.map +1 -1
- package/dist/libs/intlayer-api/index.d.ts +0 -1
- package/dist/libs/intlayer-api/organization.d.ts +0 -1
- package/dist/libs/intlayer-api/project.d.ts +0 -1
- package/dist/libs/intlayer-api/user.d.ts +0 -1
- package/dist/tailwind.css +1 -1
- package/dist/utils/cn.d.ts +0 -1
- package/dist/utils/dictionary.cjs +37 -1
- package/dist/utils/dictionary.cjs.map +1 -1
- package/dist/utils/dictionary.d.ts +1 -1
- package/dist/utils/dictionary.d.ts.map +1 -1
- package/dist/utils/dictionary.mjs +38 -2
- package/dist/utils/dictionary.mjs.map +1 -1
- package/dist/validDictionaryChangeButtons.content-BK9QaXPm.cjs +66 -0
- package/dist/validDictionaryChangeButtons.content-BK9QaXPm.cjs.map +1 -0
- package/dist/validDictionaryChangeButtons.content-CAAscqJI.cjs +66 -0
- package/dist/validDictionaryChangeButtons.content-CAAscqJI.cjs.map +1 -0
- package/dist/validDictionaryChangeButtons.content-D7AvoBdl.js +67 -0
- package/dist/validDictionaryChangeButtons.content-D7AvoBdl.js.map +1 -0
- package/dist/validDictionaryChangeButtons.content-DQwoUNCC.cjs +45 -0
- package/dist/validDictionaryChangeButtons.content-DQwoUNCC.cjs.map +1 -0
- package/dist/validDictionaryChangeButtons.content-DQxPoIe6.js +67 -0
- package/dist/validDictionaryChangeButtons.content-DQxPoIe6.js.map +1 -0
- package/dist/validDictionaryChangeButtons.content-JUcjGdBx.cjs +66 -0
- package/dist/validDictionaryChangeButtons.content-JUcjGdBx.cjs.map +1 -0
- package/dist/validDictionaryChangeButtons.content-ejY3-sbG.js +67 -0
- package/dist/validDictionaryChangeButtons.content-ejY3-sbG.js.map +1 -0
- package/dist/validDictionaryChangeButtons.content-iyT0lKy7.js +46 -0
- package/dist/validDictionaryChangeButtons.content-iyT0lKy7.js.map +1 -0
- package/dist/validDictionaryChangeButtons.content-u4qShrQh.cjs +66 -0
- package/dist/validDictionaryChangeButtons.content-u4qShrQh.cjs.map +1 -0
- package/dist/validDictionaryChangeButtons.content-y4up9NU8.js +67 -0
- package/dist/validDictionaryChangeButtons.content-y4up9NU8.js.map +1 -0
- package/dist/zod-BV4nCGJE.js.map +1 -1
- package/dist/zod-DSrtTSD_.cjs.map +1 -1
- package/package.json +81 -54
|
@@ -1,34 +1,40 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { j as jsxRuntimeExports } from "../../jsx-runtime-BgSF1HG2.js";
|
|
3
3
|
import { N as NodeWrapper } from "../../index-pLq_417z.js";
|
|
4
|
+
import { useEditedContentStore } from "./useEditedContentStore.mjs";
|
|
5
|
+
import { useEditionPanelStore } from "./useEditionPanelStore.mjs";
|
|
4
6
|
import { ValidDictionaryChangeButtons } from "./ValidDictionaryChangeButtons.mjs";
|
|
5
7
|
const DictionaryEditor = ({
|
|
6
8
|
dictionary,
|
|
7
|
-
onContentChange,
|
|
8
|
-
focusedKeyPath,
|
|
9
|
-
onCancelEdition,
|
|
10
|
-
onValidEdition,
|
|
11
9
|
...props
|
|
12
|
-
}) =>
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
)
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
{
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
10
|
+
}) => {
|
|
11
|
+
const { addEditedContent, editedContent } = useEditedContentStore((s) => ({
|
|
12
|
+
addEditedContent: s.addEditedContent,
|
|
13
|
+
editedContent: s.editedContent
|
|
14
|
+
}));
|
|
15
|
+
const { focusedContent, setFocusedContentKeyPath } = useEditionPanelStore(
|
|
16
|
+
(s) => ({
|
|
17
|
+
focusedContent: s.focusedContent,
|
|
18
|
+
setFocusedContentKeyPath: s.setFocusedContentKeyPath
|
|
19
|
+
})
|
|
20
|
+
);
|
|
21
|
+
const focusedKeyPath = focusedContent?.keyPath;
|
|
22
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex h-full flex-col justify-between gap-2", children: [
|
|
23
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
24
|
+
NodeWrapper,
|
|
25
|
+
{
|
|
26
|
+
...props,
|
|
27
|
+
keyPath: [],
|
|
28
|
+
editedContent: editedContent.content,
|
|
29
|
+
focusedKeyPath,
|
|
30
|
+
section: dictionary.content,
|
|
31
|
+
onContentChange: (content) => addEditedContent(dictionary.key, content.newValue, content.keyPath),
|
|
32
|
+
onFocusKeyPath: setFocusedContentKeyPath
|
|
33
|
+
}
|
|
34
|
+
) }),
|
|
35
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ValidDictionaryChangeButtons, { dictionary })
|
|
36
|
+
] });
|
|
37
|
+
};
|
|
32
38
|
export {
|
|
33
39
|
DictionaryEditor
|
|
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 { ValidDictionaryChangeButtons } from './ValidDictionaryChangeButtons';\n\ntype DictionaryEditorProps = {\n dictionary: Dictionary;\n
|
|
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) =>\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,UAAAA,kCAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACE,GAAG;AAAA,QACJ,SAAS,CAAC;AAAA,QACV,eAAe,cAAc;AAAA,QAC7B;AAAA,QACA,SAAS,WAAW;AAAA,QACpB,iBAAiB,CAAC,YAChB,iBAAiB,WAAW,KAAK,QAAQ,UAAU,QAAQ,OAAO;AAAA,QAEpE,gBAAgB;AAAA,MAAA;AAAA,IAAA,GAEpB;AAAA,IACAA,sCAAC,gCAA6B,YAAwB;AAAA,EACxD,EAAA,CAAA;AAEJ;"}
|
|
@@ -26,6 +26,7 @@ const ItemLayout = ({
|
|
|
26
26
|
components_Accordion_Accordion.Accordion,
|
|
27
27
|
{
|
|
28
28
|
isOpen: isSelected,
|
|
29
|
+
label: title,
|
|
29
30
|
identifier: `accordion_${title}`,
|
|
30
31
|
header: /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs("div", { className: "flex w-full", children: [
|
|
31
32
|
/* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs("div", { className: "flex w-full items-center justify-between", children: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ItemLayout.cjs","sources":["../../../src/components/DictionaryEditor/ItemLayout.tsx"],"sourcesContent":["import type { ReactNode, FC, HTMLAttributes } from 'react';\nimport { cn } from '../../utils/cn';\nimport { Accordion } from '../Accordion';\n\ninterface ItemWrapperProps extends HTMLAttributes<HTMLDivElement> {\n level: number;\n children: ReactNode;\n title: string;\n description: string;\n rightParam?: ReactNode;\n isSelected: boolean;\n}\n\nexport const ItemLayout: FC<ItemWrapperProps> = ({\n level,\n title,\n description,\n children,\n rightParam,\n isSelected,\n ...props\n}) => (\n <div\n className={cn(\n 'rounded-md p-2 transition',\n 'hover:bg-card/30 dark:hover:bg-card-dark/30 [&:has(.section:hover)]:bg-transparent',\n level === 2 && 'hover:bg-card/30 dark:hover:bg-card-dark/30',\n level >= 3 && '',\n isSelected === true && 'bg-card/40 dark:bg-card-dark/40'\n )}\n {...props}\n >\n <Accordion\n isOpen={isSelected}\n identifier={`accordion_${title}`}\n header={\n <div className=\"flex w-full\">\n <div className=\"flex w-full items-center justify-between\">\n <span\n className={cn(\n level === 0 && 'text-2xl',\n level === 1 && 'text-xl',\n level === 2 && 'text-lg',\n level >= 3 && 'text-base'\n )}\n >\n {title}\n </span>\n {rightParam && (\n <div className=\"flex w-auto items-center justify-between p-3\">\n {rightParam}\n </div>\n )}\n </div>\n {description && (\n <p className=\"text-card pl-3 text-sm\">{description}</p>\n )}\n </div>\n }\n >\n {children}\n </Accordion>\n </div>\n);\n"],"names":["jsx","cn","Accordion","jsxs"],"mappings":";;;;;AAaO,MAAM,aAAmC,CAAC;AAAA,EAC/C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MACEA,2BAAA,kBAAA;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWC,SAAA;AAAA,MACT;AAAA,MACA;AAAA,MACA,UAAU,KAAK;AAAA,MACf,SAAS,KAAK;AAAA,MACd,eAAe,QAAQ;AAAA,IACzB;AAAA,IACC,GAAG;AAAA,IAEJ,UAAAD,2BAAA,kBAAA;AAAA,MAACE,+BAAA;AAAA,MAAA;AAAA,QACC,QAAQ;AAAA,QACR,YAAY,aAAa,KAAK;AAAA,QAC9B,QACEC,2BAAA,kBAAA,KAAC,OAAI,EAAA,WAAU,eACb,UAAA;AAAA,UAACA,2BAAAA,kBAAAA,KAAA,OAAA,EAAI,WAAU,4CACb,UAAA;AAAA,YAAAH,2BAAA,kBAAA;AAAA,cAAC;AAAA,cAAA;AAAA,gBACC,WAAWC,SAAA;AAAA,kBACT,UAAU,KAAK;AAAA,kBACf,UAAU,KAAK;AAAA,kBACf,UAAU,KAAK;AAAA,kBACf,SAAS,KAAK;AAAA,gBAChB;AAAA,gBAEC,UAAA;AAAA,cAAA;AAAA,YACH;AAAA,YACC,cACCD,2BAAA,kBAAA,IAAC,OAAI,EAAA,WAAU,gDACZ,UACH,YAAA;AAAA,UAAA,GAEJ;AAAA,UACC,eACCA,2BAAA,kBAAA,IAAC,KAAE,EAAA,WAAU,0BAA0B,UAAY,aAAA;AAAA,QAAA,GAEvD;AAAA,QAGD;AAAA,MAAA;AAAA,IACH;AAAA,EAAA;AACF;;"}
|
|
1
|
+
{"version":3,"file":"ItemLayout.cjs","sources":["../../../src/components/DictionaryEditor/ItemLayout.tsx"],"sourcesContent":["import type { ReactNode, FC, HTMLAttributes } from 'react';\nimport { cn } from '../../utils/cn';\nimport { Accordion } from '../Accordion';\n\ninterface ItemWrapperProps extends HTMLAttributes<HTMLDivElement> {\n level: number;\n children: ReactNode;\n title: string;\n description: string;\n rightParam?: ReactNode;\n isSelected: boolean;\n}\n\nexport const ItemLayout: FC<ItemWrapperProps> = ({\n level,\n title,\n description,\n children,\n rightParam,\n isSelected,\n ...props\n}) => (\n <div\n className={cn(\n 'rounded-md p-2 transition',\n 'hover:bg-card/30 dark:hover:bg-card-dark/30 [&:has(.section:hover)]:bg-transparent',\n level === 2 && 'hover:bg-card/30 dark:hover:bg-card-dark/30',\n level >= 3 && '',\n isSelected === true && 'bg-card/40 dark:bg-card-dark/40'\n )}\n {...props}\n >\n <Accordion\n isOpen={isSelected}\n label={title}\n identifier={`accordion_${title}`}\n header={\n <div className=\"flex w-full\">\n <div className=\"flex w-full items-center justify-between\">\n <span\n className={cn(\n level === 0 && 'text-2xl',\n level === 1 && 'text-xl',\n level === 2 && 'text-lg',\n level >= 3 && 'text-base'\n )}\n >\n {title}\n </span>\n {rightParam && (\n <div className=\"flex w-auto items-center justify-between p-3\">\n {rightParam}\n </div>\n )}\n </div>\n {description && (\n <p className=\"text-card pl-3 text-sm\">{description}</p>\n )}\n </div>\n }\n >\n {children}\n </Accordion>\n </div>\n);\n"],"names":["jsx","cn","Accordion","jsxs"],"mappings":";;;;;AAaO,MAAM,aAAmC,CAAC;AAAA,EAC/C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MACEA,2BAAA,kBAAA;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWC,SAAA;AAAA,MACT;AAAA,MACA;AAAA,MACA,UAAU,KAAK;AAAA,MACf,SAAS,KAAK;AAAA,MACd,eAAe,QAAQ;AAAA,IACzB;AAAA,IACC,GAAG;AAAA,IAEJ,UAAAD,2BAAA,kBAAA;AAAA,MAACE,+BAAA;AAAA,MAAA;AAAA,QACC,QAAQ;AAAA,QACR,OAAO;AAAA,QACP,YAAY,aAAa,KAAK;AAAA,QAC9B,QACEC,2BAAA,kBAAA,KAAC,OAAI,EAAA,WAAU,eACb,UAAA;AAAA,UAACA,2BAAAA,kBAAAA,KAAA,OAAA,EAAI,WAAU,4CACb,UAAA;AAAA,YAAAH,2BAAA,kBAAA;AAAA,cAAC;AAAA,cAAA;AAAA,gBACC,WAAWC,SAAA;AAAA,kBACT,UAAU,KAAK;AAAA,kBACf,UAAU,KAAK;AAAA,kBACf,UAAU,KAAK;AAAA,kBACf,SAAS,KAAK;AAAA,gBAChB;AAAA,gBAEC,UAAA;AAAA,cAAA;AAAA,YACH;AAAA,YACC,cACCD,2BAAA,kBAAA,IAAC,OAAI,EAAA,WAAU,gDACZ,UACH,YAAA;AAAA,UAAA,GAEJ;AAAA,UACC,eACCA,2BAAA,kBAAA,IAAC,KAAE,EAAA,WAAU,0BAA0B,UAAY,aAAA;AAAA,QAAA,GAEvD;AAAA,QAGD;AAAA,MAAA;AAAA,IACH;AAAA,EAAA;AACF;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ItemLayout.d.ts","sourceRoot":"","sources":["../../../src/components/DictionaryEditor/ItemLayout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAI3D,UAAU,gBAAiB,SAAQ,cAAc,CAAC,cAAc,CAAC;IAC/D,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,SAAS,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,gBAAgB,
|
|
1
|
+
{"version":3,"file":"ItemLayout.d.ts","sourceRoot":"","sources":["../../../src/components/DictionaryEditor/ItemLayout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAI3D,UAAU,gBAAiB,SAAQ,cAAc,CAAC,cAAc,CAAC;IAC/D,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,SAAS,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,gBAAgB,CAmD3C,CAAC"}
|
|
@@ -24,6 +24,7 @@ const ItemLayout = ({
|
|
|
24
24
|
Accordion,
|
|
25
25
|
{
|
|
26
26
|
isOpen: isSelected,
|
|
27
|
+
label: title,
|
|
27
28
|
identifier: `accordion_${title}`,
|
|
28
29
|
header: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex w-full", children: [
|
|
29
30
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex w-full items-center justify-between", children: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ItemLayout.mjs","sources":["../../../src/components/DictionaryEditor/ItemLayout.tsx"],"sourcesContent":["import type { ReactNode, FC, HTMLAttributes } from 'react';\nimport { cn } from '../../utils/cn';\nimport { Accordion } from '../Accordion';\n\ninterface ItemWrapperProps extends HTMLAttributes<HTMLDivElement> {\n level: number;\n children: ReactNode;\n title: string;\n description: string;\n rightParam?: ReactNode;\n isSelected: boolean;\n}\n\nexport const ItemLayout: FC<ItemWrapperProps> = ({\n level,\n title,\n description,\n children,\n rightParam,\n isSelected,\n ...props\n}) => (\n <div\n className={cn(\n 'rounded-md p-2 transition',\n 'hover:bg-card/30 dark:hover:bg-card-dark/30 [&:has(.section:hover)]:bg-transparent',\n level === 2 && 'hover:bg-card/30 dark:hover:bg-card-dark/30',\n level >= 3 && '',\n isSelected === true && 'bg-card/40 dark:bg-card-dark/40'\n )}\n {...props}\n >\n <Accordion\n isOpen={isSelected}\n identifier={`accordion_${title}`}\n header={\n <div className=\"flex w-full\">\n <div className=\"flex w-full items-center justify-between\">\n <span\n className={cn(\n level === 0 && 'text-2xl',\n level === 1 && 'text-xl',\n level === 2 && 'text-lg',\n level >= 3 && 'text-base'\n )}\n >\n {title}\n </span>\n {rightParam && (\n <div className=\"flex w-auto items-center justify-between p-3\">\n {rightParam}\n </div>\n )}\n </div>\n {description && (\n <p className=\"text-card pl-3 text-sm\">{description}</p>\n )}\n </div>\n }\n >\n {children}\n </Accordion>\n </div>\n);\n"],"names":["jsx","jsxs"],"mappings":";;;AAaO,MAAM,aAAmC,CAAC;AAAA,EAC/C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MACEA,kCAAA;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAW;AAAA,MACT;AAAA,MACA;AAAA,MACA,UAAU,KAAK;AAAA,MACf,SAAS,KAAK;AAAA,MACd,eAAe,QAAQ;AAAA,IACzB;AAAA,IACC,GAAG;AAAA,IAEJ,UAAAA,kCAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,QAAQ;AAAA,QACR,YAAY,aAAa,KAAK;AAAA,QAC9B,QACEC,kCAAA,KAAC,OAAI,EAAA,WAAU,eACb,UAAA;AAAA,UAACA,kCAAAA,KAAA,OAAA,EAAI,WAAU,4CACb,UAAA;AAAA,YAAAD,kCAAA;AAAA,cAAC;AAAA,cAAA;AAAA,gBACC,WAAW;AAAA,kBACT,UAAU,KAAK;AAAA,kBACf,UAAU,KAAK;AAAA,kBACf,UAAU,KAAK;AAAA,kBACf,SAAS,KAAK;AAAA,gBAChB;AAAA,gBAEC,UAAA;AAAA,cAAA;AAAA,YACH;AAAA,YACC,cACCA,kCAAA,IAAC,OAAI,EAAA,WAAU,gDACZ,UACH,YAAA;AAAA,UAAA,GAEJ;AAAA,UACC,eACCA,kCAAA,IAAC,KAAE,EAAA,WAAU,0BAA0B,UAAY,aAAA;AAAA,QAAA,GAEvD;AAAA,QAGD;AAAA,MAAA;AAAA,IACH;AAAA,EAAA;AACF;"}
|
|
1
|
+
{"version":3,"file":"ItemLayout.mjs","sources":["../../../src/components/DictionaryEditor/ItemLayout.tsx"],"sourcesContent":["import type { ReactNode, FC, HTMLAttributes } from 'react';\nimport { cn } from '../../utils/cn';\nimport { Accordion } from '../Accordion';\n\ninterface ItemWrapperProps extends HTMLAttributes<HTMLDivElement> {\n level: number;\n children: ReactNode;\n title: string;\n description: string;\n rightParam?: ReactNode;\n isSelected: boolean;\n}\n\nexport const ItemLayout: FC<ItemWrapperProps> = ({\n level,\n title,\n description,\n children,\n rightParam,\n isSelected,\n ...props\n}) => (\n <div\n className={cn(\n 'rounded-md p-2 transition',\n 'hover:bg-card/30 dark:hover:bg-card-dark/30 [&:has(.section:hover)]:bg-transparent',\n level === 2 && 'hover:bg-card/30 dark:hover:bg-card-dark/30',\n level >= 3 && '',\n isSelected === true && 'bg-card/40 dark:bg-card-dark/40'\n )}\n {...props}\n >\n <Accordion\n isOpen={isSelected}\n label={title}\n identifier={`accordion_${title}`}\n header={\n <div className=\"flex w-full\">\n <div className=\"flex w-full items-center justify-between\">\n <span\n className={cn(\n level === 0 && 'text-2xl',\n level === 1 && 'text-xl',\n level === 2 && 'text-lg',\n level >= 3 && 'text-base'\n )}\n >\n {title}\n </span>\n {rightParam && (\n <div className=\"flex w-auto items-center justify-between p-3\">\n {rightParam}\n </div>\n )}\n </div>\n {description && (\n <p className=\"text-card pl-3 text-sm\">{description}</p>\n )}\n </div>\n }\n >\n {children}\n </Accordion>\n </div>\n);\n"],"names":["jsx","jsxs"],"mappings":";;;AAaO,MAAM,aAAmC,CAAC;AAAA,EAC/C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MACEA,kCAAA;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAW;AAAA,MACT;AAAA,MACA;AAAA,MACA,UAAU,KAAK;AAAA,MACf,SAAS,KAAK;AAAA,MACd,eAAe,QAAQ;AAAA,IACzB;AAAA,IACC,GAAG;AAAA,IAEJ,UAAAA,kCAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,QAAQ;AAAA,QACR,OAAO;AAAA,QACP,YAAY,aAAa,KAAK;AAAA,QAC9B,QACEC,kCAAA,KAAC,OAAI,EAAA,WAAU,eACb,UAAA;AAAA,UAACA,kCAAAA,KAAA,OAAA,EAAI,WAAU,4CACb,UAAA;AAAA,YAAAD,kCAAA;AAAA,cAAC;AAAA,cAAA;AAAA,gBACC,WAAW;AAAA,kBACT,UAAU,KAAK;AAAA,kBACf,UAAU,KAAK;AAAA,kBACf,UAAU,KAAK;AAAA,kBACf,SAAS,KAAK;AAAA,gBAChB;AAAA,gBAEC,UAAA;AAAA,cAAA;AAAA,YACH;AAAA,YACC,cACCA,kCAAA,IAAC,OAAI,EAAA,WAAU,gDACZ,UACH,YAAA;AAAA,UAAA,GAEJ;AAAA,UACC,eACCA,kCAAA,IAAC,KAAE,EAAA,WAAU,0BAA0B,UAAY,aAAA;AAAA,QAAA,GAEvD;AAAA,QAGD;AAAA,MAAA;AAAA,IACH;AAAA,EAAA;AACF;"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { EnumerationContent, DictionaryValue } from '@intlayer/core';
|
|
2
2
|
import { FC } from 'react';
|
|
3
3
|
import { NodeWrapperProps } from './index';
|
|
4
|
-
|
|
5
4
|
type EnumerationWrapperProps = Omit<NodeWrapperProps, 'section'> & {
|
|
6
5
|
section: EnumerationContent<DictionaryValue>;
|
|
7
6
|
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const jsxRuntime = require("../../../jsx-runtime-DvCoRj5u.cjs");
|
|
4
|
+
require("../../EditableField/EditableFieldInput.cjs");
|
|
5
|
+
const components_EditableField_EditableFieldTextArea = require("../../EditableField/EditableFieldTextArea.cjs");
|
|
4
6
|
const utils_cn = require("../../../utils/cn.cjs");
|
|
5
7
|
const utils_dictionary = require("../../../utils/dictionary.cjs");
|
|
6
|
-
const components_ContentEditor_ContentEditorTextArea = require("../../ContentEditor/ContentEditorTextArea.cjs");
|
|
7
8
|
const StringWrapper = ({
|
|
8
9
|
keyPath,
|
|
9
10
|
section,
|
|
@@ -24,7 +25,7 @@ const StringWrapper = ({
|
|
|
24
25
|
"button",
|
|
25
26
|
{
|
|
26
27
|
className: utils_cn.cn(
|
|
27
|
-
"w-full rounded-md p-2 transition",
|
|
28
|
+
"w-full rounded-md p-2 text-left transition",
|
|
28
29
|
"hover:bg-card/30 dark:hover:bg-card-dark/30 [&:has(.section:hover)]:bg-transparent",
|
|
29
30
|
level === 2 && "hover:bg-card/30 dark:hover:bg-card-dark/30",
|
|
30
31
|
level >= 3 && ""
|
|
@@ -34,10 +35,11 @@ const StringWrapper = ({
|
|
|
34
35
|
onFocusKeyPath(keyPath);
|
|
35
36
|
},
|
|
36
37
|
children: /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
|
|
37
|
-
|
|
38
|
+
components_EditableField_EditableFieldTextArea.EditableFieldTextArea,
|
|
38
39
|
{
|
|
39
|
-
|
|
40
|
-
|
|
40
|
+
defaultValue: content,
|
|
41
|
+
onSave: (newValue) => onContentChange({ keyPath, newValue }),
|
|
42
|
+
onCancel: () => null
|
|
41
43
|
}
|
|
42
44
|
)
|
|
43
45
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StringWrapper.cjs","sources":["../../../../src/components/DictionaryEditor/NodeWrapper/StringWrapper.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport {
|
|
1
|
+
{"version":3,"file":"StringWrapper.cjs","sources":["../../../../src/components/DictionaryEditor/NodeWrapper/StringWrapper.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { EditableFieldTextArea } from '../..//EditableField';\nimport { cn } from '../../../utils/cn';\nimport { getDictionaryValueByKeyPath } from '../../../utils/dictionary';\nimport type { NodeWrapperProps } from './index';\n\ntype StringWrapperProps = Omit<NodeWrapperProps, 'section'> & {\n section: string;\n};\n\nexport const StringWrapper: FC<StringWrapperProps> = ({\n keyPath,\n section,\n editedContent,\n onContentChange,\n onFocusKeyPath,\n}) => {\n const editedContentValue = getDictionaryValueByKeyPath(\n editedContent,\n keyPath\n );\n\n if (editedContentValue && typeof editedContentValue !== 'string') {\n return <>Error loading section</>;\n }\n\n const level = keyPath.length;\n\n const content = editedContentValue ?? section;\n\n return (\n <button\n className={cn(\n 'w-full rounded-md p-2 text-left transition',\n 'hover:bg-card/30 dark:hover:bg-card-dark/30 [&:has(.section:hover)]:bg-transparent',\n level === 2 && 'hover:bg-card/30 dark:hover:bg-card-dark/30',\n level >= 3 && ''\n )}\n onClick={(e) => {\n e.stopPropagation();\n onFocusKeyPath(keyPath);\n }}\n >\n <EditableFieldTextArea\n defaultValue={content}\n onSave={(newValue) => onContentChange({ keyPath, newValue })}\n onCancel={() => null}\n />\n </button>\n );\n};\n"],"names":["getDictionaryValueByKeyPath","jsx","cn","EditableFieldTextArea"],"mappings":";;;;;;;AAUO,MAAM,gBAAwC,CAAC;AAAA,EACpD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,qBAAqBA,iBAAA;AAAA,IACzB;AAAA,IACA;AAAA,EAAA;AAGE,MAAA,sBAAsB,OAAO,uBAAuB,UAAU;AAChE,qGAAS,UAAqB,wBAAA,CAAA;AAAA,EAChC;AAEA,QAAM,QAAQ,QAAQ;AAEtB,QAAM,UAAU,sBAAsB;AAGpC,SAAAC,2BAAA,kBAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC,SAAA;AAAA,QACT;AAAA,QACA;AAAA,QACA,UAAU,KAAK;AAAA,QACf,SAAS,KAAK;AAAA,MAChB;AAAA,MACA,SAAS,CAAC,MAAM;AACd,UAAE,gBAAgB;AAClB,uBAAe,OAAO;AAAA,MACxB;AAAA,MAEA,UAAAD,2BAAA,kBAAA;AAAA,QAACE,+CAAA;AAAA,QAAA;AAAA,UACC,cAAc;AAAA,UACd,QAAQ,CAAC,aAAa,gBAAgB,EAAE,SAAS,UAAU;AAAA,UAC3D,UAAU,MAAM;AAAA,QAAA;AAAA,MAClB;AAAA,IAAA;AAAA,EAAA;AAGN;;"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { j as jsxRuntimeExports } from "../../../jsx-runtime-BgSF1HG2.js";
|
|
2
|
+
import "../../EditableField/EditableFieldInput.mjs";
|
|
3
|
+
import { EditableFieldTextArea } from "../../EditableField/EditableFieldTextArea.mjs";
|
|
2
4
|
import { cn } from "../../../utils/cn.mjs";
|
|
3
5
|
import { getDictionaryValueByKeyPath } from "../../../utils/dictionary.mjs";
|
|
4
|
-
import { ContentEditorTextArea } from "../../ContentEditor/ContentEditorTextArea.mjs";
|
|
5
6
|
const StringWrapper = ({
|
|
6
7
|
keyPath,
|
|
7
8
|
section,
|
|
@@ -22,7 +23,7 @@ const StringWrapper = ({
|
|
|
22
23
|
"button",
|
|
23
24
|
{
|
|
24
25
|
className: cn(
|
|
25
|
-
"w-full rounded-md p-2 transition",
|
|
26
|
+
"w-full rounded-md p-2 text-left transition",
|
|
26
27
|
"hover:bg-card/30 dark:hover:bg-card-dark/30 [&:has(.section:hover)]:bg-transparent",
|
|
27
28
|
level === 2 && "hover:bg-card/30 dark:hover:bg-card-dark/30",
|
|
28
29
|
level >= 3 && ""
|
|
@@ -32,10 +33,11 @@ const StringWrapper = ({
|
|
|
32
33
|
onFocusKeyPath(keyPath);
|
|
33
34
|
},
|
|
34
35
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
35
|
-
|
|
36
|
+
EditableFieldTextArea,
|
|
36
37
|
{
|
|
37
|
-
|
|
38
|
-
|
|
38
|
+
defaultValue: content,
|
|
39
|
+
onSave: (newValue) => onContentChange({ keyPath, newValue }),
|
|
40
|
+
onCancel: () => null
|
|
39
41
|
}
|
|
40
42
|
)
|
|
41
43
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StringWrapper.mjs","sources":["../../../../src/components/DictionaryEditor/NodeWrapper/StringWrapper.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport {
|
|
1
|
+
{"version":3,"file":"StringWrapper.mjs","sources":["../../../../src/components/DictionaryEditor/NodeWrapper/StringWrapper.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { EditableFieldTextArea } from '../..//EditableField';\nimport { cn } from '../../../utils/cn';\nimport { getDictionaryValueByKeyPath } from '../../../utils/dictionary';\nimport type { NodeWrapperProps } from './index';\n\ntype StringWrapperProps = Omit<NodeWrapperProps, 'section'> & {\n section: string;\n};\n\nexport const StringWrapper: FC<StringWrapperProps> = ({\n keyPath,\n section,\n editedContent,\n onContentChange,\n onFocusKeyPath,\n}) => {\n const editedContentValue = getDictionaryValueByKeyPath(\n editedContent,\n keyPath\n );\n\n if (editedContentValue && typeof editedContentValue !== 'string') {\n return <>Error loading section</>;\n }\n\n const level = keyPath.length;\n\n const content = editedContentValue ?? section;\n\n return (\n <button\n className={cn(\n 'w-full rounded-md p-2 text-left transition',\n 'hover:bg-card/30 dark:hover:bg-card-dark/30 [&:has(.section:hover)]:bg-transparent',\n level === 2 && 'hover:bg-card/30 dark:hover:bg-card-dark/30',\n level >= 3 && ''\n )}\n onClick={(e) => {\n e.stopPropagation();\n onFocusKeyPath(keyPath);\n }}\n >\n <EditableFieldTextArea\n defaultValue={content}\n onSave={(newValue) => onContentChange({ keyPath, newValue })}\n onCancel={() => null}\n />\n </button>\n );\n};\n"],"names":["jsx"],"mappings":";;;;;AAUO,MAAM,gBAAwC,CAAC;AAAA,EACpD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,qBAAqB;AAAA,IACzB;AAAA,IACA;AAAA,EAAA;AAGE,MAAA,sBAAsB,OAAO,uBAAuB,UAAU;AAChE,+EAAS,UAAqB,wBAAA,CAAA;AAAA,EAChC;AAEA,QAAM,QAAQ,QAAQ;AAEtB,QAAM,UAAU,sBAAsB;AAGpC,SAAAA,kCAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA;AAAA,QACA,UAAU,KAAK;AAAA,QACf,SAAS,KAAK;AAAA,MAChB;AAAA,MACA,SAAS,CAAC,MAAM;AACd,UAAE,gBAAgB;AAClB,uBAAe,OAAO;AAAA,MACxB;AAAA,MAEA,UAAAA,kCAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,cAAc;AAAA,UACd,QAAQ,CAAC,aAAa,gBAAgB,EAAE,SAAS,UAAU;AAAA,UAC3D,UAAU,MAAM;AAAA,QAAA;AAAA,MAClB;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { TranslationContent, DictionaryValue } from '@intlayer/core';
|
|
2
2
|
import { FC } from 'react';
|
|
3
3
|
import { NodeWrapperProps } from './index';
|
|
4
|
-
|
|
5
4
|
type TranslationWrapperProps = Omit<NodeWrapperProps, 'section'> & {
|
|
6
5
|
section: TranslationContent<DictionaryValue>;
|
|
7
6
|
};
|
|
@@ -3,27 +3,119 @@
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
4
|
const jsxRuntime = require("../../jsx-runtime-DvCoRj5u.cjs");
|
|
5
5
|
const lucideReact = require("lucide-react");
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
const require$$0 = require("react");
|
|
7
|
+
const reactIntlayer = require("react-intlayer");
|
|
8
|
+
require("../../hooks/useScrollBlockage/useScrollBlockageStore.cjs");
|
|
9
|
+
require("../../hooks/useAsync/useAsyncStateStore.cjs");
|
|
10
|
+
const hooks_intlayerAPIHooks = require("../../hooks/intlayerAPIHooks.cjs");
|
|
11
|
+
require("@intlayer/dictionaries-entry");
|
|
12
|
+
require("deepmerge");
|
|
13
|
+
const components_Form_FormBase = require("../Form/FormBase.cjs");
|
|
14
|
+
require("../Form/FormField.cjs");
|
|
15
|
+
const components_Form_layout_FormItemLayout = require("../../Form-DERuauvB.cjs");
|
|
16
|
+
require("../Toaster/Toast.cjs");
|
|
17
|
+
const components_Toaster_useToast = require("../Toaster/useToast.cjs");
|
|
18
|
+
const components_DictionaryEditor_useEditedContentStore = require("./useEditedContentStore.cjs");
|
|
19
|
+
const components_DictionaryEditor_validDictionaryChangeButtons_content = require("./validDictionaryChangeButtons.content.cjs");
|
|
20
|
+
const components_DictionaryEditor_validDictionaryChangeButtonsSchema = require("./validDictionaryChangeButtonsSchema.cjs");
|
|
21
|
+
const ValidDictionaryChangeButtons = ({ dictionary }) => {
|
|
22
|
+
const ValidDictionaryChangeButtonsSchemaSchema = components_DictionaryEditor_validDictionaryChangeButtonsSchema.getValidDictionaryChangeButtonsSchemaSchema();
|
|
23
|
+
const { resetButton, saveButton, publishButton, updateDictionaryToasts } = reactIntlayer.useDictionary(components_DictionaryEditor_validDictionaryChangeButtons_content.validDictionaryChangeButtonsContent);
|
|
24
|
+
const { pushDictionaries } = hooks_intlayerAPIHooks.usePushDictionaries();
|
|
25
|
+
const { editedContent, restoreEditedContent } = components_DictionaryEditor_useEditedContentStore.useEditedContentStore(
|
|
26
|
+
(s) => ({
|
|
27
|
+
editedContent: s.editedContent,
|
|
28
|
+
restoreEditedContent: s.restoreEditedContent
|
|
29
|
+
})
|
|
30
|
+
);
|
|
31
|
+
const { form, isSubmitting } = components_Form_FormBase.useForm(
|
|
32
|
+
ValidDictionaryChangeButtonsSchemaSchema
|
|
33
|
+
);
|
|
34
|
+
const { toast } = components_Toaster_useToast.useToast();
|
|
35
|
+
const editedDictionary = require$$0.useMemo(
|
|
36
|
+
() => editedContent[dictionary.key],
|
|
37
|
+
[editedContent, dictionary.key]
|
|
38
|
+
);
|
|
39
|
+
const isEdited = require$$0.useMemo(
|
|
40
|
+
() => editedDictionary && JSON.stringify(editedDictionary?.content) !== JSON.stringify(dictionary?.content),
|
|
41
|
+
[editedDictionary, dictionary]
|
|
42
|
+
);
|
|
43
|
+
const isLocalDictionary = require$$0.useMemo(
|
|
44
|
+
() => typeof dictionary?._id === "undefined",
|
|
45
|
+
[dictionary]
|
|
46
|
+
);
|
|
47
|
+
const onSubmitSuccess = async () => {
|
|
48
|
+
await pushDictionaries([
|
|
12
49
|
{
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
onClick: onValidEdition
|
|
50
|
+
...dictionary,
|
|
51
|
+
...editedContent[dictionary.key]
|
|
16
52
|
}
|
|
17
|
-
)
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
53
|
+
]).then(() => {
|
|
54
|
+
toast({
|
|
55
|
+
title: updateDictionaryToasts.updated.title.value,
|
|
56
|
+
description: updateDictionaryToasts.updated.description,
|
|
57
|
+
variant: "success"
|
|
58
|
+
});
|
|
59
|
+
}).catch((error) => {
|
|
60
|
+
toast({
|
|
61
|
+
title: updateDictionaryToasts.failed.title.value,
|
|
62
|
+
description: error.message,
|
|
63
|
+
variant: "error"
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
};
|
|
67
|
+
return /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx("div", { className: "mb-4", children: /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs(
|
|
68
|
+
components_Form_layout_FormItemLayout.Form,
|
|
69
|
+
{
|
|
70
|
+
className: "flex w-full flex-row flex-wrap justify-end gap-3",
|
|
71
|
+
...form,
|
|
72
|
+
schema: ValidDictionaryChangeButtonsSchemaSchema,
|
|
73
|
+
onSubmitSuccess,
|
|
74
|
+
children: [
|
|
75
|
+
isEdited && /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
|
|
76
|
+
components_Form_layout_FormItemLayout.Form.Button,
|
|
77
|
+
{
|
|
78
|
+
type: "button",
|
|
79
|
+
label: resetButton.label.value,
|
|
80
|
+
disabled: !isEdited || isSubmitting,
|
|
81
|
+
className: "ml-auto",
|
|
82
|
+
Icon: lucideReact.RotateCcw,
|
|
83
|
+
variant: "outline",
|
|
84
|
+
color: "text",
|
|
85
|
+
isFullWidth: true,
|
|
86
|
+
isLoading: isSubmitting,
|
|
87
|
+
onClick: () => restoreEditedContent(dictionary.key),
|
|
88
|
+
children: resetButton.text
|
|
89
|
+
}
|
|
90
|
+
),
|
|
91
|
+
isLocalDictionary ? /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
|
|
92
|
+
components_Form_layout_FormItemLayout.Form.Button,
|
|
93
|
+
{
|
|
94
|
+
type: "submit",
|
|
95
|
+
label: publishButton.label.value,
|
|
96
|
+
disabled: !isEdited || isSubmitting,
|
|
97
|
+
Icon: lucideReact.ArrowUpFromLine,
|
|
98
|
+
color: "text",
|
|
99
|
+
isFullWidth: true,
|
|
100
|
+
isLoading: isSubmitting,
|
|
101
|
+
children: publishButton.text
|
|
102
|
+
}
|
|
103
|
+
) : isEdited && /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
|
|
104
|
+
components_Form_layout_FormItemLayout.Form.Button,
|
|
105
|
+
{
|
|
106
|
+
type: "submit",
|
|
107
|
+
label: saveButton.label.value,
|
|
108
|
+
disabled: !isEdited || isSubmitting,
|
|
109
|
+
Icon: lucideReact.Save,
|
|
110
|
+
color: "text",
|
|
111
|
+
isFullWidth: true,
|
|
112
|
+
isLoading: isSubmitting,
|
|
113
|
+
children: saveButton.text
|
|
114
|
+
}
|
|
115
|
+
)
|
|
116
|
+
]
|
|
117
|
+
}
|
|
118
|
+
) });
|
|
27
119
|
};
|
|
28
120
|
exports.ValidDictionaryChangeButtons = ValidDictionaryChangeButtons;
|
|
29
121
|
//# sourceMappingURL=ValidDictionaryChangeButtons.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ValidDictionaryChangeButtons.cjs","sources":["../../../src/components/DictionaryEditor/ValidDictionaryChangeButtons.tsx"],"sourcesContent":["'use client';\n\nimport type { Dictionary } from '@intlayer/core';\nimport {
|
|
1
|
+
{"version":3,"file":"ValidDictionaryChangeButtons.cjs","sources":["../../../src/components/DictionaryEditor/ValidDictionaryChangeButtons.tsx"],"sourcesContent":["'use client';\n\nimport { Dictionary as DistantDictionary } from '@intlayer/backend';\nimport type { Dictionary } from '@intlayer/core';\nimport { ArrowUpFromLine, RotateCcw, Save } from 'lucide-react';\nimport { useMemo, type FC } from 'react';\nimport { useDictionary } from 'react-intlayer';\nimport { usePushDictionaries } from '../../hooks';\nimport { Form, useForm } from '../Form';\nimport { useToast } from '../Toaster';\nimport { useEditedContentStore } from './useEditedContentStore';\nimport { validDictionaryChangeButtonsContent } from './validDictionaryChangeButtons.content';\nimport { getValidDictionaryChangeButtonsSchemaSchema } from './validDictionaryChangeButtonsSchema';\n\ntype ValidDictionaryChangeButtonsProps = {\n dictionary: Dictionary;\n};\n\nexport const ValidDictionaryChangeButtons: FC<\n ValidDictionaryChangeButtonsProps\n> = ({ dictionary }) => {\n const ValidDictionaryChangeButtonsSchemaSchema =\n getValidDictionaryChangeButtonsSchemaSchema();\n\n const { resetButton, saveButton, publishButton, updateDictionaryToasts } =\n useDictionary(validDictionaryChangeButtonsContent);\n\n const { pushDictionaries } = usePushDictionaries();\n\n const { editedContent, restoreEditedContent } = useEditedContentStore(\n (s) => ({\n editedContent: s.editedContent,\n restoreEditedContent: s.restoreEditedContent,\n })\n );\n const { form, isSubmitting } = useForm(\n ValidDictionaryChangeButtonsSchemaSchema\n );\n const { toast } = useToast();\n\n const editedDictionary = useMemo(\n () => editedContent[dictionary.key],\n [editedContent, dictionary.key]\n );\n\n const isEdited = useMemo(\n () =>\n editedDictionary &&\n JSON.stringify(editedDictionary?.content) !==\n JSON.stringify(dictionary?.content),\n [editedDictionary, dictionary]\n );\n\n const isLocalDictionary = useMemo(\n () => typeof (dictionary as DistantDictionary)?._id === 'undefined',\n [dictionary]\n );\n\n const onSubmitSuccess = async () => {\n await pushDictionaries([\n {\n ...dictionary,\n ...editedContent[dictionary.key],\n },\n ])\n .then(() => {\n toast({\n title: updateDictionaryToasts.updated.title.value,\n description: updateDictionaryToasts.updated.description,\n variant: 'success',\n });\n })\n .catch((error) => {\n toast({\n title: updateDictionaryToasts.failed.title.value,\n description: error.message,\n variant: 'error',\n });\n });\n };\n\n return (\n <div className=\"mb-4\">\n <Form\n className=\"flex w-full flex-row flex-wrap justify-end gap-3\"\n {...form}\n schema={ValidDictionaryChangeButtonsSchemaSchema}\n onSubmitSuccess={onSubmitSuccess}\n >\n {isEdited && (\n <Form.Button\n type=\"button\"\n label={resetButton.label.value}\n disabled={!isEdited || isSubmitting}\n className=\"ml-auto\"\n Icon={RotateCcw}\n variant=\"outline\"\n color=\"text\"\n isFullWidth\n isLoading={isSubmitting}\n onClick={() => restoreEditedContent(dictionary.key)}\n >\n {resetButton.text}\n </Form.Button>\n )}\n {isLocalDictionary ? (\n <Form.Button\n type=\"submit\"\n label={publishButton.label.value}\n disabled={!isEdited || isSubmitting}\n Icon={ArrowUpFromLine}\n color=\"text\"\n isFullWidth\n isLoading={isSubmitting}\n >\n {publishButton.text}\n </Form.Button>\n ) : (\n isEdited && (\n <Form.Button\n type=\"submit\"\n label={saveButton.label.value}\n disabled={!isEdited || isSubmitting}\n Icon={Save}\n color=\"text\"\n isFullWidth\n isLoading={isSubmitting}\n >\n {saveButton.text}\n </Form.Button>\n )\n )}\n </Form>\n </div>\n );\n};\n"],"names":["getValidDictionaryChangeButtonsSchemaSchema","useDictionary","validDictionaryChangeButtonsContent","usePushDictionaries","useEditedContentStore","useForm","useToast","useMemo","jsx","jsxs","Form","RotateCcw","ArrowUpFromLine","Save"],"mappings":";;;;;;;;;;;;;;;;;;;;AAkBO,MAAM,+BAET,CAAC,EAAE,iBAAiB;AACtB,QAAM,2CACJA,+DAAAA;AAEF,QAAM,EAAE,aAAa,YAAY,eAAe,2BAC9CC,cAAAA,cAAcC,iEAAAA,mCAAmC;AAE7C,QAAA,EAAE,qBAAqBC,uBAAAA;AAEvB,QAAA,EAAE,eAAe,qBAAA,IAAyBC,kDAAA;AAAA,IAC9C,CAAC,OAAO;AAAA,MACN,eAAe,EAAE;AAAA,MACjB,sBAAsB,EAAE;AAAA,IAAA;AAAA,EAC1B;AAEI,QAAA,EAAE,MAAM,aAAA,IAAiBC,yBAAA;AAAA,IAC7B;AAAA,EAAA;AAEI,QAAA,EAAE,UAAUC,4BAAAA;AAElB,QAAM,mBAAmBC,WAAA;AAAA,IACvB,MAAM,cAAc,WAAW,GAAG;AAAA,IAClC,CAAC,eAAe,WAAW,GAAG;AAAA,EAAA;AAGhC,QAAM,WAAWA,WAAA;AAAA,IACf,MACE,oBACA,KAAK,UAAU,kBAAkB,OAAO,MACtC,KAAK,UAAU,YAAY,OAAO;AAAA,IACtC,CAAC,kBAAkB,UAAU;AAAA,EAAA;AAG/B,QAAM,oBAAoBA,WAAA;AAAA,IACxB,MAAM,OAAQ,YAAkC,QAAQ;AAAA,IACxD,CAAC,UAAU;AAAA,EAAA;AAGb,QAAM,kBAAkB,YAAY;AAClC,UAAM,iBAAiB;AAAA,MACrB;AAAA,QACE,GAAG;AAAA,QACH,GAAG,cAAc,WAAW,GAAG;AAAA,MACjC;AAAA,IAAA,CACD,EACE,KAAK,MAAM;AACJ,YAAA;AAAA,QACJ,OAAO,uBAAuB,QAAQ,MAAM;AAAA,QAC5C,aAAa,uBAAuB,QAAQ;AAAA,QAC5C,SAAS;AAAA,MAAA,CACV;AAAA,IAAA,CACF,EACA,MAAM,CAAC,UAAU;AACV,YAAA;AAAA,QACJ,OAAO,uBAAuB,OAAO,MAAM;AAAA,QAC3C,aAAa,MAAM;AAAA,QACnB,SAAS;AAAA,MAAA,CACV;AAAA,IAAA,CACF;AAAA,EAAA;AAIH,SAAAC,2BAAAA,kBAAAA,IAAC,OAAI,EAAA,WAAU,QACb,UAAAC,2BAAA,kBAAA;AAAA,IAACC,sCAAA;AAAA,IAAA;AAAA,MACC,WAAU;AAAA,MACT,GAAG;AAAA,MACJ,QAAQ;AAAA,MACR;AAAA,MAEC,UAAA;AAAA,QACC,YAAAF,2BAAA,kBAAA;AAAA,UAACE,sCAAAA,KAAK;AAAA,UAAL;AAAA,YACC,MAAK;AAAA,YACL,OAAO,YAAY,MAAM;AAAA,YACzB,UAAU,CAAC,YAAY;AAAA,YACvB,WAAU;AAAA,YACV,MAAMC,YAAA;AAAA,YACN,SAAQ;AAAA,YACR,OAAM;AAAA,YACN,aAAW;AAAA,YACX,WAAW;AAAA,YACX,SAAS,MAAM,qBAAqB,WAAW,GAAG;AAAA,YAEjD,UAAY,YAAA;AAAA,UAAA;AAAA,QACf;AAAA,QAED,oBACCH,2BAAA,kBAAA;AAAA,UAACE,sCAAAA,KAAK;AAAA,UAAL;AAAA,YACC,MAAK;AAAA,YACL,OAAO,cAAc,MAAM;AAAA,YAC3B,UAAU,CAAC,YAAY;AAAA,YACvB,MAAME,YAAA;AAAA,YACN,OAAM;AAAA,YACN,aAAW;AAAA,YACX,WAAW;AAAA,YAEV,UAAc,cAAA;AAAA,UAAA;AAAA,YAGjB,YACEJ,2BAAA,kBAAA;AAAA,UAACE,sCAAAA,KAAK;AAAA,UAAL;AAAA,YACC,MAAK;AAAA,YACL,OAAO,WAAW,MAAM;AAAA,YACxB,UAAU,CAAC,YAAY;AAAA,YACvB,MAAMG,YAAA;AAAA,YACN,OAAM;AAAA,YACN,aAAW;AAAA,YACX,WAAW;AAAA,YAEV,UAAW,WAAA;AAAA,UAAA;AAAA,QACd;AAAA,MAAA;AAAA,IAAA;AAAA,EAIR,EAAA,CAAA;AAEJ;;"}
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import { Dictionary } from '@intlayer/core';
|
|
2
2
|
import { FC } from 'react';
|
|
3
|
-
|
|
4
3
|
type ValidDictionaryChangeButtonsProps = {
|
|
5
|
-
|
|
6
|
-
onCancelEdition: () => void;
|
|
7
|
-
editedContent?: Dictionary;
|
|
8
|
-
dictionaryId?: string;
|
|
4
|
+
dictionary: Dictionary;
|
|
9
5
|
};
|
|
10
6
|
export declare const ValidDictionaryChangeButtons: FC<ValidDictionaryChangeButtonsProps>;
|
|
11
7
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ValidDictionaryChangeButtons.d.ts","sourceRoot":"","sources":["../../../src/components/DictionaryEditor/ValidDictionaryChangeButtons.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ValidDictionaryChangeButtons.d.ts","sourceRoot":"","sources":["../../../src/components/DictionaryEditor/ValidDictionaryChangeButtons.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEjD,OAAO,EAAW,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AASzC,KAAK,iCAAiC,GAAG;IACvC,UAAU,EAAE,UAAU,CAAC;CACxB,CAAC;AAEF,eAAO,MAAM,4BAA4B,EAAE,EAAE,CAC3C,iCAAiC,CAoHlC,CAAC"}
|