@intlayer/design-system 5.0.6 → 5.1.1
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 +219 -381
- package/dist/{Form-DlqjTz3u.js → Form-BZUDRfoN.js} +35 -35
- package/dist/Form-BZUDRfoN.js.map +1 -0
- package/dist/{Form-CSMiPnjC.cjs → Form-yi0CMK-a.cjs} +35 -35
- package/dist/Form-yi0CMK-a.cjs.map +1 -0
- package/dist/components/Accordion/Accordion.cjs +7 -7
- package/dist/components/Accordion/Accordion.cjs.map +1 -1
- package/dist/components/Accordion/Accordion.d.ts.map +1 -1
- package/dist/components/Accordion/Accordion.mjs +4 -4
- package/dist/components/Accordion/Accordion.mjs.map +1 -1
- package/dist/components/Auth/AuthModal/index.cjs +8 -8
- package/dist/components/Auth/AuthModal/index.cjs.map +1 -1
- package/dist/components/Auth/AuthModal/index.mjs +6 -6
- package/dist/components/Auth/AuthModal/index.mjs.map +1 -1
- package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierClient.cjs +5 -5
- package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierClient.cjs.map +1 -1
- package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierClient.mjs +2 -2
- package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierClient.mjs.map +1 -1
- package/dist/components/Auth/AuthenticationBarrier/index.d.ts +1 -1
- package/dist/components/Auth/AuthenticationBarrier/index.d.ts.map +1 -1
- package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.cjs +10 -10
- package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.cjs.map +1 -1
- package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.mjs +10 -10
- package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.mjs.map +1 -1
- package/dist/components/Auth/ChangePasswordForm/useChangePasswordSchema.cjs +10 -10
- package/dist/components/Auth/ChangePasswordForm/useChangePasswordSchema.cjs.map +1 -1
- package/dist/components/Auth/ChangePasswordForm/useChangePasswordSchema.mjs +10 -10
- package/dist/components/Auth/ChangePasswordForm/useChangePasswordSchema.mjs.map +1 -1
- package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.cjs +11 -12
- package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.cjs.map +1 -1
- package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.mjs +11 -12
- package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.mjs.map +1 -1
- package/dist/components/Auth/ExternalsLoginButtons/assets/GithubLogo.cjs +3 -3
- package/dist/components/Auth/ExternalsLoginButtons/assets/GithubLogo.cjs.map +1 -1
- package/dist/components/Auth/ExternalsLoginButtons/assets/GithubLogo.mjs +3 -3
- package/dist/components/Auth/ExternalsLoginButtons/assets/GithubLogo.mjs.map +1 -1
- package/dist/components/Auth/ExternalsLoginButtons/assets/GoogleLogo.cjs +3 -3
- package/dist/components/Auth/ExternalsLoginButtons/assets/GoogleLogo.cjs.map +1 -1
- package/dist/components/Auth/ExternalsLoginButtons/assets/GoogleLogo.mjs +3 -3
- package/dist/components/Auth/ExternalsLoginButtons/assets/GoogleLogo.mjs.map +1 -1
- package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.cjs +10 -10
- package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.cjs.map +1 -1
- package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.mjs +6 -6
- package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.mjs.map +1 -1
- package/dist/components/Auth/ResetPasswordForm/useResetPasswordSchema.cjs +4 -4
- package/dist/components/Auth/ResetPasswordForm/useResetPasswordSchema.cjs.map +1 -1
- package/dist/components/Auth/ResetPasswordForm/useResetPasswordSchema.mjs +4 -4
- package/dist/components/Auth/ResetPasswordForm/useResetPasswordSchema.mjs.map +1 -1
- package/dist/components/Auth/SignInForm/SignInForm.cjs +12 -12
- package/dist/components/Auth/SignInForm/SignInForm.cjs.map +1 -1
- package/dist/components/Auth/SignInForm/SignInForm.mjs +12 -12
- package/dist/components/Auth/SignInForm/SignInForm.mjs.map +1 -1
- package/dist/components/Auth/SignInForm/useSignInSchema.cjs +6 -6
- package/dist/components/Auth/SignInForm/useSignInSchema.cjs.map +1 -1
- package/dist/components/Auth/SignInForm/useSignInSchema.mjs +6 -6
- package/dist/components/Auth/SignInForm/useSignInSchema.mjs.map +1 -1
- package/dist/components/Auth/SignUpForm/SignUpForm.cjs +10 -10
- package/dist/components/Auth/SignUpForm/SignUpForm.cjs.map +1 -1
- package/dist/components/Auth/SignUpForm/SignUpForm.mjs +10 -10
- package/dist/components/Auth/SignUpForm/SignUpForm.mjs.map +1 -1
- package/dist/components/Auth/SignUpForm/useSignUpSchema.cjs +10 -10
- package/dist/components/Auth/SignUpForm/useSignUpSchema.cjs.map +1 -1
- package/dist/components/Auth/SignUpForm/useSignUpSchema.mjs +10 -10
- package/dist/components/Auth/SignUpForm/useSignUpSchema.mjs.map +1 -1
- package/dist/components/Auth/VerifyEmailForm/VerifyEmailForm.cjs +11 -11
- package/dist/components/Auth/VerifyEmailForm/VerifyEmailForm.cjs.map +1 -1
- package/dist/components/Auth/VerifyEmailForm/VerifyEmailForm.d.ts.map +1 -1
- package/dist/components/Auth/VerifyEmailForm/VerifyEmailForm.mjs +7 -7
- package/dist/components/Auth/VerifyEmailForm/VerifyEmailForm.mjs.map +1 -1
- package/dist/components/Auth/useAuth/index.cjs +2 -2
- package/dist/components/Auth/useAuth/index.cjs.map +1 -1
- package/dist/components/Auth/useAuth/useCSRF.cjs +3 -1
- package/dist/components/Auth/useAuth/useCSRF.cjs.map +1 -1
- package/dist/components/Auth/useAuth/useCSRF.d.ts.map +1 -1
- package/dist/components/Auth/useAuth/useCSRF.mjs +3 -1
- package/dist/components/Auth/useAuth/useCSRF.mjs.map +1 -1
- package/dist/components/Auth/useAuth/useOAuth2.cjs +3 -1
- package/dist/components/Auth/useAuth/useOAuth2.cjs.map +1 -1
- package/dist/components/Auth/useAuth/useOAuth2.d.ts +1 -1
- package/dist/components/Auth/useAuth/useOAuth2.d.ts.map +1 -1
- package/dist/components/Auth/useAuth/useOAuth2.mjs +3 -1
- package/dist/components/Auth/useAuth/useOAuth2.mjs.map +1 -1
- package/dist/components/Auth/useAuth/useSession.cjs +5 -3
- package/dist/components/Auth/useAuth/useSession.cjs.map +1 -1
- package/dist/components/Auth/useAuth/useSession.d.ts.map +1 -1
- package/dist/components/Auth/useAuth/useSession.mjs +3 -1
- package/dist/components/Auth/useAuth/useSession.mjs.map +1 -1
- package/dist/components/Avatar/index.cjs +9 -9
- package/dist/components/Avatar/index.cjs.map +1 -1
- package/dist/components/Avatar/index.mjs +9 -9
- package/dist/components/Avatar/index.mjs.map +1 -1
- package/dist/components/Badge/index.cjs +2 -2
- package/dist/components/Badge/index.cjs.map +1 -1
- package/dist/components/Badge/index.mjs +2 -2
- package/dist/components/Badge/index.mjs.map +1 -1
- package/dist/components/Breadcrumb/index.cjs +20 -20
- package/dist/components/Breadcrumb/index.cjs.map +1 -1
- package/dist/components/Breadcrumb/index.d.ts.map +1 -1
- package/dist/components/Breadcrumb/index.mjs +19 -19
- package/dist/components/Breadcrumb/index.mjs.map +1 -1
- package/dist/components/Button/Button.cjs +84 -89
- package/dist/components/Button/Button.cjs.map +1 -1
- package/dist/components/Button/Button.d.ts +1 -1
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/Button/Button.mjs +84 -89
- package/dist/components/Button/Button.mjs.map +1 -1
- package/dist/components/ClickOutsideDiv/index.cjs +5 -5
- package/dist/components/ClickOutsideDiv/index.cjs.map +1 -1
- package/dist/components/ClickOutsideDiv/index.d.ts +1 -1
- package/dist/components/ClickOutsideDiv/index.d.ts.map +1 -1
- package/dist/components/ClickOutsideDiv/index.mjs +2 -2
- package/dist/components/ClickOutsideDiv/index.mjs.map +1 -1
- package/dist/components/Command/index.cjs +42 -52
- package/dist/components/Command/index.cjs.map +1 -1
- package/dist/components/Command/index.d.ts +21 -73
- package/dist/components/Command/index.d.ts.map +1 -1
- package/dist/components/Command/index.mjs +42 -52
- package/dist/components/Command/index.mjs.map +1 -1
- package/dist/components/Container/index.cjs +49 -40
- package/dist/components/Container/index.cjs.map +1 -1
- package/dist/components/Container/index.d.ts +6 -20
- package/dist/components/Container/index.d.ts.map +1 -1
- package/dist/components/Container/index.mjs +49 -40
- package/dist/components/Container/index.mjs.map +1 -1
- package/dist/components/ContentEditor/ContentEditor.cjs +9 -9
- package/dist/components/ContentEditor/ContentEditor.cjs.map +1 -1
- package/dist/components/ContentEditor/ContentEditor.mjs +6 -6
- package/dist/components/ContentEditor/ContentEditor.mjs.map +1 -1
- package/dist/components/ContentEditor/ContentEditorInput.cjs +87 -0
- package/dist/components/ContentEditor/ContentEditorInput.cjs.map +1 -0
- package/dist/components/ContentEditor/ContentEditorInput.d.ts +11 -0
- package/dist/components/ContentEditor/ContentEditorInput.d.ts.map +1 -0
- package/dist/components/ContentEditor/ContentEditorInput.mjs +87 -0
- package/dist/components/ContentEditor/ContentEditorInput.mjs.map +1 -0
- package/dist/components/ContentEditor/ContentEditorTextArea.cjs +15 -12
- package/dist/components/ContentEditor/ContentEditorTextArea.cjs.map +1 -1
- package/dist/components/ContentEditor/ContentEditorTextArea.d.ts +1 -1
- package/dist/components/ContentEditor/ContentEditorTextArea.d.ts.map +1 -1
- package/dist/components/ContentEditor/ContentEditorTextArea.mjs +11 -8
- package/dist/components/ContentEditor/ContentEditorTextArea.mjs.map +1 -1
- package/dist/components/ContentSelector/ContentSelector.cjs +2 -2
- package/dist/components/ContentSelector/ContentSelector.cjs.map +1 -1
- package/dist/components/ContentSelector/ContentSelector.mjs +2 -2
- package/dist/components/ContentSelector/ContentSelector.mjs.map +1 -1
- package/dist/components/CopyToClipboard/index.cjs +6 -6
- package/dist/components/CopyToClipboard/index.cjs.map +1 -1
- package/dist/components/CopyToClipboard/index.d.ts.map +1 -1
- package/dist/components/CopyToClipboard/index.mjs +4 -4
- package/dist/components/CopyToClipboard/index.mjs.map +1 -1
- package/dist/components/DictionaryEditor/DictionaryEditor.cjs +6 -6
- package/dist/components/DictionaryEditor/DictionaryEditor.cjs.map +1 -1
- package/dist/components/DictionaryEditor/DictionaryEditor.d.ts +1 -2
- package/dist/components/DictionaryEditor/DictionaryEditor.d.ts.map +1 -1
- package/dist/components/DictionaryEditor/DictionaryEditor.mjs +5 -5
- package/dist/components/DictionaryEditor/DictionaryEditor.mjs.map +1 -1
- package/dist/components/DictionaryEditor/ItemLayout.cjs +8 -8
- package/dist/components/DictionaryEditor/ItemLayout.cjs.map +1 -1
- package/dist/components/DictionaryEditor/ItemLayout.mjs +8 -8
- package/dist/components/DictionaryEditor/ItemLayout.mjs.map +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/ArrayWrapper.cjs +2 -4
- package/dist/components/DictionaryEditor/NodeWrapper/ArrayWrapper.cjs.map +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/ArrayWrapper.d.ts.map +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/ArrayWrapper.mjs +2 -4
- package/dist/components/DictionaryEditor/NodeWrapper/ArrayWrapper.mjs.map +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/ConditionWrapper.cjs +8 -0
- package/dist/components/DictionaryEditor/NodeWrapper/ConditionWrapper.cjs.map +1 -0
- package/dist/components/DictionaryEditor/NodeWrapper/ConditionWrapper.d.ts +9 -0
- package/dist/components/DictionaryEditor/NodeWrapper/ConditionWrapper.d.ts.map +1 -0
- package/dist/components/DictionaryEditor/NodeWrapper/ConditionWrapper.mjs +8 -0
- package/dist/components/DictionaryEditor/NodeWrapper/ConditionWrapper.mjs.map +1 -0
- package/dist/components/DictionaryEditor/NodeWrapper/EnumerationWrapper.cjs +2 -2
- package/dist/components/DictionaryEditor/NodeWrapper/EnumerationWrapper.d.ts.map +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/EnumerationWrapper.mjs +2 -2
- package/dist/components/DictionaryEditor/NodeWrapper/MarkdownWrapper.cjs +7 -0
- package/dist/components/DictionaryEditor/NodeWrapper/MarkdownWrapper.cjs.map +1 -0
- package/dist/components/DictionaryEditor/NodeWrapper/MarkdownWrapper.d.ts +9 -0
- package/dist/components/DictionaryEditor/NodeWrapper/MarkdownWrapper.d.ts.map +1 -0
- package/dist/components/DictionaryEditor/NodeWrapper/MarkdownWrapper.mjs +7 -0
- package/dist/components/DictionaryEditor/NodeWrapper/MarkdownWrapper.mjs.map +1 -0
- package/dist/components/DictionaryEditor/NodeWrapper/NestedObjectWrapper.cjs +2 -4
- package/dist/components/DictionaryEditor/NodeWrapper/NestedObjectWrapper.cjs.map +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/NestedObjectWrapper.d.ts.map +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/NestedObjectWrapper.mjs +2 -4
- package/dist/components/DictionaryEditor/NodeWrapper/NestedObjectWrapper.mjs.map +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/StringWrapper.cjs +13 -7
- package/dist/components/DictionaryEditor/NodeWrapper/StringWrapper.cjs.map +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/StringWrapper.d.ts.map +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/StringWrapper.mjs +13 -7
- package/dist/components/DictionaryEditor/NodeWrapper/StringWrapper.mjs.map +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/TranslationWrapper.cjs +2 -2
- package/dist/components/DictionaryEditor/NodeWrapper/TranslationWrapper.d.ts.map +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/TranslationWrapper.mjs +2 -2
- package/dist/components/DictionaryEditor/NodeWrapper/index.cjs +2 -3
- package/dist/components/DictionaryEditor/NodeWrapper/index.cjs.map +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/index.d.ts.map +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/index.mjs +2 -3
- package/dist/components/DictionaryEditor/NodeWrapper/index.mjs.map +1 -1
- package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.cjs +13 -21
- package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.cjs.map +1 -1
- package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.d.ts.map +1 -1
- package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.mjs +8 -16
- package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/ContentEditor.cjs +54 -0
- package/dist/components/DictionaryFieldEditor/ContentEditor.cjs.map +1 -0
- package/dist/components/DictionaryFieldEditor/ContentEditor.d.ts +8 -0
- package/dist/components/DictionaryFieldEditor/ContentEditor.d.ts.map +1 -0
- package/dist/components/DictionaryFieldEditor/ContentEditor.mjs +54 -0
- package/dist/components/DictionaryFieldEditor/ContentEditor.mjs.map +1 -0
- package/dist/components/DictionaryFieldEditor/ContentEditorView/EditorView.cjs +44 -0
- package/dist/components/DictionaryFieldEditor/ContentEditorView/EditorView.cjs.map +1 -0
- package/dist/components/DictionaryFieldEditor/{EditorView → ContentEditorView}/EditorView.d.ts +0 -2
- package/dist/components/DictionaryFieldEditor/ContentEditorView/EditorView.d.ts.map +1 -0
- package/dist/components/DictionaryFieldEditor/ContentEditorView/EditorView.mjs +44 -0
- package/dist/components/DictionaryFieldEditor/ContentEditorView/EditorView.mjs.map +1 -0
- package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.cjs +549 -0
- package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.cjs.map +1 -0
- package/dist/components/DictionaryFieldEditor/{EditorView → ContentEditorView}/TextEditor.d.ts +1 -3
- package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.d.ts.map +1 -0
- package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.mjs +549 -0
- package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.mjs.map +1 -0
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.cjs +5 -7
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.d.ts +0 -2
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.mjs +3 -5
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.cjs +11 -11
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.mjs +11 -11
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.cjs +5 -5
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.mjs +5 -5
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.cjs +190 -180
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs +186 -176
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.cjs +11 -11
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.mjs +11 -11
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.cjs +98 -77
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.d.ts +0 -2
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs +97 -76
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/EnumKeyInput.cjs +17 -17
- package/dist/components/DictionaryFieldEditor/EnumKeyInput.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/EnumKeyInput.mjs +12 -12
- package/dist/components/DictionaryFieldEditor/EnumKeyInput.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/JSONEditor.cjs +23 -14
- package/dist/components/DictionaryFieldEditor/JSONEditor.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/JSONEditor.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/JSONEditor.mjs +21 -12
- package/dist/components/DictionaryFieldEditor/JSONEditor.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/KeyPathBreadcrumb.cjs +3 -3
- package/dist/components/DictionaryFieldEditor/KeyPathBreadcrumb.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/KeyPathBreadcrumb.mjs +3 -3
- package/dist/components/DictionaryFieldEditor/KeyPathBreadcrumb.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.cjs +61 -81
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.mjs +60 -80
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.cjs +37 -37
- package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.d.ts +12 -12
- package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.mjs +37 -37
- package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NodeTypeSelector.cjs +26 -65
- package/dist/components/DictionaryFieldEditor/NodeTypeSelector.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NodeTypeSelector.d.ts +2 -3
- package/dist/components/DictionaryFieldEditor/NodeTypeSelector.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/NodeTypeSelector.mjs +24 -63
- package/dist/components/DictionaryFieldEditor/NodeTypeSelector.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs +19 -26
- 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 +15 -22
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/StructureEditor.cjs +31 -0
- package/dist/components/DictionaryFieldEditor/StructureEditor.cjs.map +1 -0
- package/dist/components/DictionaryFieldEditor/StructureEditor.d.ts +8 -0
- package/dist/components/DictionaryFieldEditor/StructureEditor.d.ts.map +1 -0
- package/dist/components/DictionaryFieldEditor/StructureEditor.mjs +31 -0
- package/dist/components/DictionaryFieldEditor/StructureEditor.mjs.map +1 -0
- package/dist/components/DictionaryFieldEditor/StructureView/StructureView.cjs +270 -0
- package/dist/components/DictionaryFieldEditor/StructureView/StructureView.cjs.map +1 -0
- package/dist/components/DictionaryFieldEditor/StructureView/StructureView.d.ts +16 -0
- package/dist/components/DictionaryFieldEditor/StructureView/StructureView.d.ts.map +1 -0
- package/dist/components/DictionaryFieldEditor/StructureView/StructureView.mjs +270 -0
- package/dist/components/DictionaryFieldEditor/StructureView/StructureView.mjs.map +1 -0
- package/dist/components/DictionaryFieldEditor/StructureView/structureView.content.cjs +76 -0
- package/dist/components/DictionaryFieldEditor/StructureView/structureView.content.cjs.map +1 -0
- package/dist/components/DictionaryFieldEditor/{editorView.content.d.ts → StructureView/structureView.content.d.ts} +4 -51
- package/dist/components/DictionaryFieldEditor/StructureView/structureView.content.d.ts.map +1 -0
- package/dist/components/DictionaryFieldEditor/StructureView/structureView.content.mjs +76 -0
- package/dist/components/DictionaryFieldEditor/StructureView/structureView.content.mjs.map +1 -0
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.cjs +11 -11
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.mjs +11 -11
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcherContext.cjs +6 -6
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcherContext.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcherContext.mjs +3 -3
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcherContext.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/dictionaryFieldEditor.content.cjs +0 -30
- package/dist/components/DictionaryFieldEditor/dictionaryFieldEditor.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/dictionaryFieldEditor.content.d.ts +0 -30
- package/dist/components/DictionaryFieldEditor/dictionaryFieldEditor.content.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/dictionaryFieldEditor.content.mjs +0 -30
- package/dist/components/DictionaryFieldEditor/dictionaryFieldEditor.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/getIsEditableSection.cjs +7 -44
- package/dist/components/DictionaryFieldEditor/getIsEditableSection.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/getIsEditableSection.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/getIsEditableSection.mjs +8 -45
- package/dist/components/DictionaryFieldEditor/getIsEditableSection.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.cjs +67 -21
- package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.d.ts +46 -0
- package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.mjs +67 -21
- package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.mjs.map +1 -1
- package/dist/components/DropDown/index.cjs +5 -5
- package/dist/components/DropDown/index.cjs.map +1 -1
- package/dist/components/DropDown/index.mjs +5 -5
- package/dist/components/DropDown/index.mjs.map +1 -1
- package/dist/components/EditableField/EditableFieldInput.cjs +15 -12
- package/dist/components/EditableField/EditableFieldInput.cjs.map +1 -1
- package/dist/components/EditableField/EditableFieldInput.d.ts +2 -1
- package/dist/components/EditableField/EditableFieldInput.d.ts.map +1 -1
- package/dist/components/EditableField/EditableFieldInput.mjs +12 -9
- package/dist/components/EditableField/EditableFieldInput.mjs.map +1 -1
- package/dist/components/EditableField/EditableFieldLayout.cjs +13 -13
- package/dist/components/EditableField/EditableFieldLayout.cjs.map +1 -1
- package/dist/components/EditableField/EditableFieldLayout.d.ts +1 -1
- package/dist/components/EditableField/EditableFieldLayout.d.ts.map +1 -1
- package/dist/components/EditableField/EditableFieldLayout.mjs +8 -8
- package/dist/components/EditableField/EditableFieldLayout.mjs.map +1 -1
- package/dist/components/EditableField/EditableFieldTextArea.cjs +19 -15
- package/dist/components/EditableField/EditableFieldTextArea.cjs.map +1 -1
- package/dist/components/EditableField/EditableFieldTextArea.d.ts +2 -1
- package/dist/components/EditableField/EditableFieldTextArea.d.ts.map +1 -1
- package/dist/components/EditableField/EditableFieldTextArea.mjs +17 -13
- package/dist/components/EditableField/EditableFieldTextArea.mjs.map +1 -1
- package/dist/components/Flags/Flag.cjs +2 -2
- package/dist/components/Flags/Flag.cjs.map +1 -1
- package/dist/components/Flags/Flag.d.ts.map +1 -1
- package/dist/components/Flags/Flag.mjs +2 -2
- package/dist/components/Flags/Flag.mjs.map +1 -1
- package/dist/components/Footer/index.cjs +8 -8
- package/dist/components/Footer/index.cjs.map +1 -1
- package/dist/components/Footer/index.mjs +8 -8
- package/dist/components/Footer/index.mjs.map +1 -1
- package/dist/components/Form/Form.cjs +2 -2
- package/dist/components/Form/Form.d.ts.map +1 -1
- package/dist/components/Form/Form.mjs +2 -2
- package/dist/components/Form/FormBase.cjs +38 -42
- package/dist/components/Form/FormBase.cjs.map +1 -1
- package/dist/components/Form/FormBase.d.ts +11 -8
- package/dist/components/Form/FormBase.d.ts.map +1 -1
- package/dist/components/Form/FormBase.mjs +39 -43
- package/dist/components/Form/FormBase.mjs.map +1 -1
- package/dist/components/Form/FormControl.cjs +4 -7
- package/dist/components/Form/FormControl.cjs.map +1 -1
- package/dist/components/Form/FormControl.d.ts +3 -1
- package/dist/components/Form/FormControl.d.ts.map +1 -1
- package/dist/components/Form/FormControl.mjs +4 -7
- package/dist/components/Form/FormControl.mjs.map +1 -1
- package/dist/components/Form/FormDescription.cjs +4 -7
- package/dist/components/Form/FormDescription.cjs.map +1 -1
- package/dist/components/Form/FormDescription.d.ts +2 -2
- package/dist/components/Form/FormDescription.d.ts.map +1 -1
- package/dist/components/Form/FormDescription.mjs +4 -7
- package/dist/components/Form/FormDescription.mjs.map +1 -1
- package/dist/components/Form/FormField.cjs +7 -7
- package/dist/components/Form/FormField.cjs.map +1 -1
- package/dist/components/Form/FormField.mjs +4 -4
- package/dist/components/Form/FormField.mjs.map +1 -1
- package/dist/components/Form/FormItem.cjs +8 -9
- package/dist/components/Form/FormItem.cjs.map +1 -1
- package/dist/components/Form/FormItem.d.ts +2 -2
- package/dist/components/Form/FormItem.d.ts.map +1 -1
- package/dist/components/Form/FormItem.mjs +5 -6
- package/dist/components/Form/FormItem.mjs.map +1 -1
- package/dist/components/Form/FormLabel.cjs +7 -7
- package/dist/components/Form/FormLabel.cjs.map +1 -1
- package/dist/components/Form/FormLabel.d.ts +3 -1
- package/dist/components/Form/FormLabel.d.ts.map +1 -1
- package/dist/components/Form/FormLabel.mjs +7 -7
- package/dist/components/Form/FormLabel.mjs.map +1 -1
- package/dist/components/Form/FormMessage.cjs +2 -2
- package/dist/components/Form/FormMessage.cjs.map +1 -1
- package/dist/components/Form/FormMessage.mjs +2 -2
- package/dist/components/Form/FormMessage.mjs.map +1 -1
- package/dist/components/Form/elements/AutoSizeTextAreaElement.cjs +2 -2
- package/dist/components/Form/elements/AutoSizeTextAreaElement.mjs +2 -2
- package/dist/components/Form/elements/CheckboxElement.cjs +4 -4
- package/dist/components/Form/elements/CheckboxElement.d.ts.map +1 -1
- package/dist/components/Form/elements/CheckboxElement.mjs +4 -4
- package/dist/components/Form/elements/EditableFieldInputElement.cjs +2 -2
- package/dist/components/Form/elements/EditableFieldInputElement.d.ts.map +1 -1
- package/dist/components/Form/elements/EditableFieldInputElement.mjs +2 -2
- package/dist/components/Form/elements/EditableFieldTextAreaElement.cjs +2 -2
- package/dist/components/Form/elements/EditableFieldTextAreaElement.d.ts.map +1 -1
- package/dist/components/Form/elements/EditableFieldTextAreaElement.mjs +2 -2
- package/dist/components/Form/elements/FormElement.cjs +2 -3
- package/dist/components/Form/elements/FormElement.cjs.map +1 -1
- package/dist/components/Form/elements/FormElement.d.ts.map +1 -1
- package/dist/components/Form/elements/FormElement.mjs +2 -3
- package/dist/components/Form/elements/FormElement.mjs.map +1 -1
- package/dist/components/Form/elements/FormElementWrapper.cjs +2 -2
- package/dist/components/Form/elements/FormElementWrapper.cjs.map +1 -1
- package/dist/components/Form/elements/FormElementWrapper.mjs +2 -2
- package/dist/components/Form/elements/FormElementWrapper.mjs.map +1 -1
- package/dist/components/Form/elements/InputElement.cjs +4 -3
- package/dist/components/Form/elements/InputElement.cjs.map +1 -1
- package/dist/components/Form/elements/InputElement.d.ts.map +1 -1
- package/dist/components/Form/elements/InputElement.mjs +4 -3
- package/dist/components/Form/elements/InputElement.mjs.map +1 -1
- package/dist/components/Form/elements/InputPasswordElement.cjs +2 -2
- package/dist/components/Form/elements/InputPasswordElement.d.ts.map +1 -1
- package/dist/components/Form/elements/InputPasswordElement.mjs +2 -2
- package/dist/components/Form/elements/MultiselectElement.cjs +2 -2
- package/dist/components/Form/elements/MultiselectElement.d.ts.map +1 -1
- 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.d.ts.map +1 -1
- package/dist/components/Form/elements/SwitchSelectorElement.mjs +2 -2
- package/dist/components/Form/elements/TextAreaElement.cjs +2 -2
- package/dist/components/Form/elements/TextAreaElement.d.ts.map +1 -1
- package/dist/components/Form/elements/TextAreaElement.mjs +2 -2
- package/dist/components/Form/elements/index.cjs +1 -1
- package/dist/components/Form/elements/index.d.ts.map +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.d.ts.map +1 -1
- package/dist/components/Form/layout/FormItemLayout.mjs +2 -2
- package/dist/components/Form/layout/FormLabelLayout.cjs +5 -5
- package/dist/components/Form/layout/FormLabelLayout.cjs.map +1 -1
- package/dist/components/Form/layout/FormLabelLayout.mjs +5 -5
- package/dist/components/Form/layout/FormLabelLayout.mjs.map +1 -1
- package/dist/components/Form/layout/RequiredStar.cjs +2 -2
- package/dist/components/Form/layout/RequiredStar.cjs.map +1 -1
- package/dist/components/Form/layout/RequiredStar.mjs +2 -2
- package/dist/components/Form/layout/RequiredStar.mjs.map +1 -1
- package/dist/components/Form/layout/index.cjs +1 -1
- package/dist/components/Form/layout/index.d.ts.map +1 -1
- package/dist/components/Form/layout/index.mjs +1 -1
- package/dist/components/Headers/SectionScroller.cjs +4 -4
- package/dist/components/Headers/SectionScroller.cjs.map +1 -1
- package/dist/components/Headers/index.cjs +12 -12
- package/dist/components/Headers/index.cjs.map +1 -1
- package/dist/components/Headers/index.d.ts.map +1 -1
- package/dist/components/Headers/index.mjs +12 -12
- package/dist/components/Headers/index.mjs.map +1 -1
- package/dist/components/IDE/Code.cjs +59 -64
- package/dist/components/IDE/Code.cjs.map +1 -1
- package/dist/components/IDE/Code.d.ts +5 -3
- package/dist/components/IDE/Code.d.ts.map +1 -1
- package/dist/components/IDE/Code.mjs +59 -64
- package/dist/components/IDE/Code.mjs.map +1 -1
- package/dist/components/IDE/CodeBlockClient.cjs +9 -9
- package/dist/components/IDE/CodeBlockClient.cjs.map +1 -1
- package/dist/components/IDE/CodeBlockClient.d.ts.map +1 -1
- package/dist/components/IDE/CodeBlockClient.mjs +5 -5
- package/dist/components/IDE/CodeBlockClient.mjs.map +1 -1
- package/dist/components/IDE/CodeBlockServer.cjs +5 -5
- package/dist/components/IDE/CodeBlockServer.cjs.map +1 -1
- package/dist/components/IDE/CodeBlockServer.d.ts.map +1 -1
- package/dist/components/IDE/CodeBlockServer.mjs +4 -4
- package/dist/components/IDE/CodeBlockServer.mjs.map +1 -1
- package/dist/components/IDE/CodeConditionalRenderer.cjs +2 -2
- package/dist/components/IDE/CodeConditionalRenderer.cjs.map +1 -1
- package/dist/components/IDE/CodeConditionalRenderer.d.ts.map +1 -1
- package/dist/components/IDE/CodeConditionalRenderer.mjs +2 -2
- package/dist/components/IDE/CodeConditionalRenderer.mjs.map +1 -1
- package/dist/components/IDE/CodeContext.cjs +6 -6
- package/dist/components/IDE/CodeContext.cjs.map +1 -1
- package/dist/components/IDE/CodeContext.mjs +3 -3
- package/dist/components/IDE/CodeContext.mjs.map +1 -1
- package/dist/components/IDE/CodeFormatSelector.cjs +7 -7
- package/dist/components/IDE/CodeFormatSelector.cjs.map +1 -1
- package/dist/components/IDE/CodeFormatSelector.mjs +7 -7
- package/dist/components/IDE/CodeFormatSelector.mjs.map +1 -1
- package/dist/components/IDE/ContentDeclarationFormatSelector.cjs +8 -8
- package/dist/components/IDE/ContentDeclarationFormatSelector.cjs.map +1 -1
- package/dist/components/IDE/ContentDeclarationFormatSelector.mjs +8 -8
- package/dist/components/IDE/ContentDeclarationFormatSelector.mjs.map +1 -1
- package/dist/components/IDE/CopyButton.cjs +5 -5
- package/dist/components/IDE/CopyButton.cjs.map +1 -1
- package/dist/components/IDE/CopyButton.mjs +2 -2
- package/dist/components/IDE/CopyButton.mjs.map +1 -1
- package/dist/components/IDE/FileList.cjs +7 -7
- package/dist/components/IDE/FileList.cjs.map +1 -1
- package/dist/components/IDE/FileList.mjs +7 -7
- package/dist/components/IDE/FileList.mjs.map +1 -1
- package/dist/components/IDE/FileTree.cjs +10 -10
- package/dist/components/IDE/FileTree.cjs.map +1 -1
- package/dist/components/IDE/FileTree.d.ts.map +1 -1
- package/dist/components/IDE/FileTree.mjs +8 -8
- package/dist/components/IDE/FileTree.mjs.map +1 -1
- package/dist/components/IDE/IDE.cjs +15 -15
- package/dist/components/IDE/IDE.cjs.map +1 -1
- package/dist/components/IDE/IDE.mjs +12 -12
- package/dist/components/IDE/IDE.mjs.map +1 -1
- package/dist/components/IDE/MarkDownRender.cjs +4 -4
- package/dist/components/IDE/MarkDownRender.cjs.map +1 -1
- package/dist/components/IDE/MarkDownRender.mjs +4 -4
- package/dist/components/IDE/MarkDownRender.mjs.map +1 -1
- package/dist/components/IDE/MonacoCode.cjs +18 -12
- package/dist/components/IDE/MonacoCode.cjs.map +1 -1
- package/dist/components/IDE/MonacoCode.d.ts.map +1 -1
- package/dist/components/IDE/MonacoCode.mjs +13 -7
- package/dist/components/IDE/MonacoCode.mjs.map +1 -1
- package/dist/components/IDE/PackageManagerSelector.cjs +7 -7
- package/dist/components/IDE/PackageManagerSelector.cjs.map +1 -1
- package/dist/components/IDE/PackageManagerSelector.mjs +7 -7
- package/dist/components/IDE/PackageManagerSelector.mjs.map +1 -1
- package/dist/components/IDE/createFileTree.cjs +1 -1
- package/dist/components/IDE/createFileTree.cjs.map +1 -1
- package/dist/components/IDE/createFileTree.mjs +1 -1
- package/dist/components/IDE/createFileTree.mjs.map +1 -1
- package/dist/components/InformationTag/index.cjs +2 -2
- package/dist/components/InformationTag/index.cjs.map +1 -1
- package/dist/components/InformationTag/index.mjs +2 -2
- package/dist/components/InformationTag/index.mjs.map +1 -1
- package/dist/components/Input/Checkbox.cjs +31 -34
- package/dist/components/Input/Checkbox.cjs.map +1 -1
- package/dist/components/Input/Checkbox.d.ts +2 -2
- package/dist/components/Input/Checkbox.d.ts.map +1 -1
- package/dist/components/Input/Checkbox.mjs +31 -34
- package/dist/components/Input/Checkbox.mjs.map +1 -1
- package/dist/components/Input/Input.cjs +18 -17
- package/dist/components/Input/Input.cjs.map +1 -1
- package/dist/components/Input/Input.d.ts +2 -2
- package/dist/components/Input/Input.d.ts.map +1 -1
- package/dist/components/Input/Input.mjs +18 -17
- package/dist/components/Input/Input.mjs.map +1 -1
- package/dist/components/Input/InputPassword.cjs +30 -40
- package/dist/components/Input/InputPassword.cjs.map +1 -1
- package/dist/components/Input/InputPassword.d.ts +2 -1
- package/dist/components/Input/InputPassword.d.ts.map +1 -1
- package/dist/components/Input/InputPassword.mjs +30 -40
- package/dist/components/Input/InputPassword.mjs.map +1 -1
- package/dist/components/Label/index.cjs +6 -6
- package/dist/components/Label/index.cjs.map +1 -1
- package/dist/components/Label/index.d.ts +2 -2
- package/dist/components/Label/index.d.ts.map +1 -1
- package/dist/components/Label/index.mjs +6 -6
- package/dist/components/Label/index.mjs.map +1 -1
- package/dist/components/Link/Link.cjs +6 -8
- package/dist/components/Link/Link.cjs.map +1 -1
- package/dist/components/Link/Link.d.ts +5 -6
- package/dist/components/Link/Link.d.ts.map +1 -1
- package/dist/components/Link/Link.mjs +7 -9
- package/dist/components/Link/Link.mjs.map +1 -1
- package/dist/components/Link/index.cjs +1 -0
- package/dist/components/Link/index.cjs.map +1 -1
- package/dist/components/Link/index.mjs +3 -2
- package/dist/components/Loader/index.cjs +4 -4
- package/dist/components/Loader/index.cjs.map +1 -1
- package/dist/components/Loader/index.d.ts.map +1 -1
- package/dist/components/Loader/index.mjs +4 -4
- package/dist/components/Loader/index.mjs.map +1 -1
- package/dist/components/Loader/spinner.cjs +9 -9
- package/dist/components/Loader/spinner.cjs.map +1 -1
- package/dist/components/Loader/spinner.mjs +9 -9
- package/dist/components/Loader/spinner.mjs.map +1 -1
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.cjs +26 -27
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.cjs.map +1 -1
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.mjs +20 -21
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.mjs.map +1 -1
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.cjs +6 -6
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.cjs.map +1 -1
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.mjs +3 -3
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.mjs.map +1 -1
- package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.cjs +22 -23
- package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.cjs.map +1 -1
- package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.mjs +16 -17
- package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.mjs.map +1 -1
- package/dist/components/Logo/LogoCircle.cjs +4 -4
- package/dist/components/Logo/LogoCircle.cjs.map +1 -1
- package/dist/components/Logo/LogoCircle.mjs +4 -4
- package/dist/components/Logo/LogoCircle.mjs.map +1 -1
- package/dist/components/Logo/LogoNoFrame.cjs +17 -17
- package/dist/components/Logo/LogoNoFrame.cjs.map +1 -1
- package/dist/components/Logo/LogoNoFrame.mjs +17 -17
- package/dist/components/Logo/LogoNoFrame.mjs.map +1 -1
- package/dist/components/Logo/LogoSquare.cjs +4 -4
- package/dist/components/Logo/LogoSquare.cjs.map +1 -1
- package/dist/components/Logo/LogoSquare.mjs +4 -4
- package/dist/components/Logo/LogoSquare.mjs.map +1 -1
- package/dist/components/Logo/LogoSquircle.cjs +8 -8
- package/dist/components/Logo/LogoSquircle.cjs.map +1 -1
- package/dist/components/Logo/LogoSquircle.mjs +8 -8
- package/dist/components/Logo/LogoSquircle.mjs.map +1 -1
- package/dist/components/Logo/LogoTextOnly.cjs +17 -17
- package/dist/components/Logo/LogoTextOnly.cjs.map +1 -1
- package/dist/components/Logo/LogoTextOnly.mjs +17 -17
- package/dist/components/Logo/LogoTextOnly.mjs.map +1 -1
- package/dist/components/Logo/LogoWithTextBelowCircle.cjs +19 -19
- package/dist/components/Logo/LogoWithTextBelowCircle.cjs.map +1 -1
- package/dist/components/Logo/LogoWithTextBelowCircle.mjs +19 -19
- package/dist/components/Logo/LogoWithTextBelowCircle.mjs.map +1 -1
- package/dist/components/Logo/LogoWithTextBelowNoFrame.cjs +17 -17
- package/dist/components/Logo/LogoWithTextBelowNoFrame.cjs.map +1 -1
- package/dist/components/Logo/LogoWithTextBelowNoFrame.mjs +17 -17
- package/dist/components/Logo/LogoWithTextBelowNoFrame.mjs.map +1 -1
- package/dist/components/Logo/LogoWithTextBelowSquircle.cjs +8 -8
- package/dist/components/Logo/LogoWithTextBelowSquircle.cjs.map +1 -1
- package/dist/components/Logo/LogoWithTextBelowSquircle.mjs +8 -8
- package/dist/components/Logo/LogoWithTextBelowSquircle.mjs.map +1 -1
- package/dist/components/Logo/LogoWithTextCircle.cjs +35 -35
- package/dist/components/Logo/LogoWithTextCircle.cjs.map +1 -1
- package/dist/components/Logo/LogoWithTextCircle.mjs +35 -35
- package/dist/components/Logo/LogoWithTextCircle.mjs.map +1 -1
- package/dist/components/Logo/LogoWithTextNoFrame.cjs +17 -17
- package/dist/components/Logo/LogoWithTextNoFrame.cjs.map +1 -1
- package/dist/components/Logo/LogoWithTextNoFrame.mjs +17 -17
- package/dist/components/Logo/LogoWithTextNoFrame.mjs.map +1 -1
- package/dist/components/Logo/LogoWithTextSquircle.cjs +8 -8
- package/dist/components/Logo/LogoWithTextSquircle.cjs.map +1 -1
- package/dist/components/Logo/LogoWithTextSquircle.mjs +8 -8
- package/dist/components/Logo/LogoWithTextSquircle.mjs.map +1 -1
- package/dist/components/Logo/index.cjs +12 -12
- package/dist/components/Logo/index.cjs.map +1 -1
- package/dist/components/Logo/index.mjs +12 -12
- package/dist/components/Logo/index.mjs.map +1 -1
- package/dist/components/MarkDownRender/index.cjs +21 -21
- package/dist/components/MarkDownRender/index.cjs.map +1 -1
- package/dist/components/MarkDownRender/index.d.ts.map +1 -1
- package/dist/components/MarkDownRender/index.mjs +22 -22
- package/dist/components/MarkDownRender/index.mjs.map +1 -1
- package/dist/components/MaxHeightSmoother/index.cjs +3 -3
- package/dist/components/MaxHeightSmoother/index.cjs.map +1 -1
- package/dist/components/MaxHeightSmoother/index.mjs +3 -3
- package/dist/components/MaxHeightSmoother/index.mjs.map +1 -1
- package/dist/components/MaxWidthSmoother/index.cjs +3 -3
- package/dist/components/MaxWidthSmoother/index.cjs.map +1 -1
- package/dist/components/MaxWidthSmoother/index.mjs +3 -3
- package/dist/components/MaxWidthSmoother/index.mjs.map +1 -1
- package/dist/components/Modal/Modal.cjs +11 -11
- package/dist/components/Modal/Modal.cjs.map +1 -1
- package/dist/components/Modal/Modal.mjs +12 -12
- package/dist/components/Modal/Modal.mjs.map +1 -1
- package/dist/components/Navbar/Burger.cjs +9 -9
- package/dist/components/Navbar/Burger.cjs.map +1 -1
- package/dist/components/Navbar/Burger.mjs +9 -9
- package/dist/components/Navbar/Burger.mjs.map +1 -1
- package/dist/components/Navbar/DesktopNavbar.cjs +4 -4
- package/dist/components/Navbar/DesktopNavbar.cjs.map +1 -1
- package/dist/components/Navbar/DesktopNavbar.d.ts.map +1 -1
- package/dist/components/Navbar/DesktopNavbar.mjs +4 -4
- package/dist/components/Navbar/DesktopNavbar.mjs.map +1 -1
- package/dist/components/Navbar/MobileNavbar.cjs +15 -15
- package/dist/components/Navbar/MobileNavbar.cjs.map +1 -1
- package/dist/components/Navbar/MobileNavbar.d.ts.map +1 -1
- package/dist/components/Navbar/MobileNavbar.mjs +11 -11
- package/dist/components/Navbar/MobileNavbar.mjs.map +1 -1
- package/dist/components/Navbar/index.cjs +4 -4
- package/dist/components/Navbar/index.cjs.map +1 -1
- package/dist/components/Navbar/index.d.ts.map +1 -1
- package/dist/components/Navbar/index.mjs +4 -4
- package/dist/components/Navbar/index.mjs.map +1 -1
- package/dist/components/Navbar/useNavigation.cjs +3 -3
- package/dist/components/Navbar/useNavigation.cjs.map +1 -1
- package/dist/components/Pattern/DotPattern.cjs +7 -7
- package/dist/components/Pattern/DotPattern.cjs.map +1 -1
- package/dist/components/Pattern/DotPattern.mjs +5 -5
- package/dist/components/Pattern/DotPattern.mjs.map +1 -1
- package/dist/components/Pattern/GridPattern.cjs +8 -8
- package/dist/components/Pattern/GridPattern.cjs.map +1 -1
- package/dist/components/Pattern/GridPattern.mjs +6 -6
- package/dist/components/Pattern/GridPattern.mjs.map +1 -1
- package/dist/components/Pattern/SpotLight.cjs +7 -7
- package/dist/components/Pattern/SpotLight.cjs.map +1 -1
- package/dist/components/Pattern/SpotLight.mjs +7 -7
- package/dist/components/Pattern/SpotLight.mjs.map +1 -1
- package/dist/components/Popover/index.cjs +3 -3
- package/dist/components/Popover/index.cjs.map +1 -1
- package/dist/components/Popover/index.mjs +3 -3
- package/dist/components/Popover/index.mjs.map +1 -1
- package/dist/components/PressableSpan/PressableSpan.cjs +8 -8
- package/dist/components/PressableSpan/PressableSpan.cjs.map +1 -1
- package/dist/components/PressableSpan/PressableSpan.mjs +2 -2
- package/dist/components/PressableSpan/PressableSpan.mjs.map +1 -1
- package/dist/components/ProfileDropDown/index.cjs +5 -5
- package/dist/components/ProfileDropDown/index.cjs.map +1 -1
- package/dist/components/ProfileDropDown/index.mjs +5 -5
- package/dist/components/ProfileDropDown/index.mjs.map +1 -1
- package/dist/components/RightDrawer/RightDrawer.cjs +14 -14
- package/dist/components/RightDrawer/RightDrawer.cjs.map +1 -1
- package/dist/components/RightDrawer/RightDrawer.d.ts.map +1 -1
- package/dist/components/RightDrawer/RightDrawer.mjs +9 -9
- package/dist/components/RightDrawer/RightDrawer.mjs.map +1 -1
- package/dist/components/Select/Multiselect.cjs +94 -100
- package/dist/components/Select/Multiselect.cjs.map +1 -1
- package/dist/components/Select/Multiselect.d.ts +9 -29
- package/dist/components/Select/Multiselect.d.ts.map +1 -1
- package/dist/components/Select/Multiselect.mjs +81 -87
- package/dist/components/Select/Multiselect.mjs.map +1 -1
- package/dist/components/Select/Select.cjs +30 -37
- package/dist/components/Select/Select.cjs.map +1 -1
- package/dist/components/Select/Select.d.ts +10 -9
- package/dist/components/Select/Select.d.ts.map +1 -1
- package/dist/components/Select/Select.mjs +30 -37
- package/dist/components/Select/Select.mjs.map +1 -1
- package/dist/components/SwitchSelector/index.cjs +11 -11
- package/dist/components/SwitchSelector/index.cjs.map +1 -1
- package/dist/components/SwitchSelector/index.d.ts +1 -1
- package/dist/components/SwitchSelector/index.d.ts.map +1 -1
- package/dist/components/SwitchSelector/index.mjs +5 -5
- package/dist/components/SwitchSelector/index.mjs.map +1 -1
- package/dist/components/TabSelector/TabSelector.cjs +7 -7
- package/dist/components/TabSelector/TabSelector.cjs.map +1 -1
- package/dist/components/TabSelector/TabSelector.mjs +3 -3
- package/dist/components/TabSelector/TabSelector.mjs.map +1 -1
- package/dist/components/Tag/index.cjs +27 -32
- package/dist/components/Tag/index.cjs.map +1 -1
- package/dist/components/Tag/index.d.ts +6 -5
- package/dist/components/Tag/index.d.ts.map +1 -1
- package/dist/components/Tag/index.mjs +27 -32
- package/dist/components/Tag/index.mjs.map +1 -1
- package/dist/components/TextArea/AutoSizeTextArea.cjs +17 -11
- package/dist/components/TextArea/AutoSizeTextArea.cjs.map +1 -1
- package/dist/components/TextArea/AutoSizeTextArea.d.ts +2 -1
- package/dist/components/TextArea/AutoSizeTextArea.d.ts.map +1 -1
- package/dist/components/TextArea/AutoSizeTextArea.mjs +12 -6
- package/dist/components/TextArea/AutoSizeTextArea.mjs.map +1 -1
- package/dist/components/TextArea/TextArea.cjs +21 -20
- package/dist/components/TextArea/TextArea.cjs.map +1 -1
- package/dist/components/TextArea/TextArea.d.ts +2 -2
- package/dist/components/TextArea/TextArea.d.ts.map +1 -1
- package/dist/components/TextArea/TextArea.mjs +21 -20
- package/dist/components/TextArea/TextArea.mjs.map +1 -1
- package/dist/components/ThemeSwitcherDropDown/DesktopThemeSwitcher.cjs +13 -13
- package/dist/components/ThemeSwitcherDropDown/DesktopThemeSwitcher.cjs.map +1 -1
- package/dist/components/ThemeSwitcherDropDown/DesktopThemeSwitcher.mjs +11 -11
- package/dist/components/ThemeSwitcherDropDown/DesktopThemeSwitcher.mjs.map +1 -1
- package/dist/components/ThemeSwitcherDropDown/MobileThemeSwitcher.cjs +7 -7
- package/dist/components/ThemeSwitcherDropDown/MobileThemeSwitcher.cjs.map +1 -1
- package/dist/components/ThemeSwitcherDropDown/MobileThemeSwitcher.d.ts.map +1 -1
- package/dist/components/ThemeSwitcherDropDown/MobileThemeSwitcher.mjs +5 -5
- package/dist/components/ThemeSwitcherDropDown/MobileThemeSwitcher.mjs.map +1 -1
- package/dist/components/Toaster/Toast.cjs +28 -29
- package/dist/components/Toaster/Toast.cjs.map +1 -1
- package/dist/components/Toaster/Toast.d.ts +11 -10
- package/dist/components/Toaster/Toast.d.ts.map +1 -1
- package/dist/components/Toaster/Toast.mjs +28 -29
- package/dist/components/Toaster/Toast.mjs.map +1 -1
- package/dist/components/Toaster/Toaster.cjs +8 -8
- package/dist/components/Toaster/Toaster.cjs.map +1 -1
- package/dist/components/Toaster/Toaster.mjs +8 -8
- package/dist/components/Toaster/Toaster.mjs.map +1 -1
- package/dist/components/Toaster/useToast.cjs +3 -3
- package/dist/components/Toaster/useToast.cjs.map +1 -1
- package/dist/components/WithResizer/index.cjs +11 -11
- package/dist/components/WithResizer/index.cjs.map +1 -1
- package/dist/components/WithResizer/index.mjs +3 -3
- package/dist/components/WithResizer/index.mjs.map +1 -1
- package/dist/components/index.cjs +2 -1
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.mjs +3 -2
- package/dist/hooks/index.cjs +1 -1
- package/dist/hooks/index.mjs +1 -1
- package/dist/hooks/intlayerAPIHooks.cjs +1 -1
- package/dist/hooks/intlayerAPIHooks.cjs.map +1 -1
- package/dist/hooks/intlayerAPIHooks.d.ts.map +1 -1
- package/dist/hooks/intlayerAPIHooks.mjs +1 -1
- package/dist/hooks/intlayerAPIHooks.mjs.map +1 -1
- package/dist/hooks/useAsync/useAsync.cjs +14 -14
- 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.map +1 -1
- package/dist/hooks/useAsync/useAsyncStateStore.cjs +6 -6
- package/dist/hooks/useAsync/useAsyncStateStore.cjs.map +1 -1
- package/dist/hooks/useAsync/useAsyncStateStore.d.ts.map +1 -1
- package/dist/hooks/useAsync/useAsyncStateStore.mjs +2 -2
- package/dist/hooks/useAsync/useAsyncStateStore.mjs.map +1 -1
- package/dist/hooks/useAsync/useAsyncWrapper.cjs.map +1 -1
- package/dist/hooks/useAsync/useAsyncWrapper.d.ts.map +1 -1
- package/dist/hooks/useAsync/useAsyncWrapper.mjs.map +1 -1
- package/dist/hooks/useDevice.cjs +3 -3
- package/dist/hooks/useDevice.cjs.map +1 -1
- package/dist/hooks/useDevice.d.ts.map +1 -1
- package/dist/hooks/useDevice.mjs.map +1 -1
- package/dist/hooks/useGetAllDictionaries.cjs +3 -3
- package/dist/hooks/useGetAllDictionaries.cjs.map +1 -1
- package/dist/hooks/useGetAllDictionaries.d.ts.map +1 -1
- package/dist/hooks/useGetAllDictionaries.mjs.map +1 -1
- package/dist/hooks/useGetElementOrWindow.cjs +3 -3
- package/dist/hooks/useGetElementOrWindow.cjs.map +1 -1
- package/dist/hooks/useIntlayerAPI.cjs +7 -5
- package/dist/hooks/useIntlayerAPI.cjs.map +1 -1
- package/dist/hooks/useIntlayerAPI.d.ts.map +1 -1
- package/dist/hooks/useIntlayerAPI.mjs +3 -1
- package/dist/hooks/useIntlayerAPI.mjs.map +1 -1
- package/dist/hooks/useIsDarkMode.cjs +3 -3
- package/dist/hooks/useIsDarkMode.cjs.map +1 -1
- package/dist/hooks/useIsMounted.cjs +3 -3
- package/dist/hooks/useIsMounted.cjs.map +1 -1
- package/dist/hooks/useItemSelector.cjs +4 -4
- package/dist/hooks/useItemSelector.cjs.map +1 -1
- package/dist/hooks/usePersistedStore.cjs +5 -5
- package/dist/hooks/usePersistedStore.cjs.map +1 -1
- package/dist/hooks/useScrollBlockage/index.cjs +1 -1
- package/dist/hooks/useScrollBlockage/index.mjs +1 -1
- package/dist/hooks/useScrollDetection.cjs +8 -8
- package/dist/hooks/useScrollDetection.cjs.map +1 -1
- package/dist/hooks/useScrollDetection.mjs +1 -1
- package/dist/{index-O_7rYrbW.js → index-BCuMWKyy.js} +3 -3
- package/dist/index-BCuMWKyy.js.map +1 -0
- package/dist/{index-BVYRWLUL.js → index-BKE0uywA.js} +2 -2
- package/dist/index-BKE0uywA.js.map +1 -0
- package/dist/index-BUe-qmA0.js +191 -0
- package/dist/index-BUe-qmA0.js.map +1 -0
- package/dist/{index-Cg-S9ry9.cjs → index-BYzBot7l.cjs} +4 -4
- package/dist/{index-O_7rYrbW.js.map → index-BYzBot7l.cjs.map} +1 -1
- package/dist/{index-DTQyeqio.cjs → index-CsenS2hX.cjs} +2 -2
- package/dist/index-CsenS2hX.cjs.map +1 -0
- package/dist/index-cg9H6eBs.cjs +190 -0
- package/dist/index-cg9H6eBs.cjs.map +1 -0
- package/dist/tailwind.config.cjs.map +1 -1
- package/dist/tailwind.config.mjs.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 +24 -24
- package/dist/Form-CSMiPnjC.cjs.map +0 -1
- package/dist/Form-DlqjTz3u.js.map +0 -1
- package/dist/components/DictionaryFieldEditor/EditorView/EditorView.cjs +0 -143
- package/dist/components/DictionaryFieldEditor/EditorView/EditorView.cjs.map +0 -1
- package/dist/components/DictionaryFieldEditor/EditorView/EditorView.d.ts.map +0 -1
- package/dist/components/DictionaryFieldEditor/EditorView/EditorView.mjs +0 -143
- package/dist/components/DictionaryFieldEditor/EditorView/EditorView.mjs.map +0 -1
- package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.cjs +0 -361
- package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.cjs.map +0 -1
- package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.d.ts.map +0 -1
- package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.mjs +0 -361
- package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.mjs.map +0 -1
- package/dist/components/DictionaryFieldEditor/NodeEditor.cjs +0 -70
- package/dist/components/DictionaryFieldEditor/NodeEditor.cjs.map +0 -1
- package/dist/components/DictionaryFieldEditor/NodeEditor.d.ts +0 -10
- package/dist/components/DictionaryFieldEditor/NodeEditor.d.ts.map +0 -1
- package/dist/components/DictionaryFieldEditor/NodeEditor.mjs +0 -70
- package/dist/components/DictionaryFieldEditor/NodeEditor.mjs.map +0 -1
- package/dist/components/DictionaryFieldEditor/editorView.content.cjs +0 -123
- package/dist/components/DictionaryFieldEditor/editorView.content.cjs.map +0 -1
- package/dist/components/DictionaryFieldEditor/editorView.content.d.ts.map +0 -1
- package/dist/components/DictionaryFieldEditor/editorView.content.mjs +0 -123
- package/dist/components/DictionaryFieldEditor/editorView.content.mjs.map +0 -1
- package/dist/index-B-adg6xa.js +0 -206
- package/dist/index-B-adg6xa.js.map +0 -1
- package/dist/index-BVYRWLUL.js.map +0 -1
- package/dist/index-Cg-S9ry9.cjs.map +0 -1
- package/dist/index-DAsui9u9.cjs +0 -205
- package/dist/index-DAsui9u9.cjs.map +0 -1
- package/dist/index-DTQyeqio.cjs.map +0 -1
- package/dist/jsx-runtime-CgFM7lM3.cjs +0 -934
- package/dist/jsx-runtime-CgFM7lM3.cjs.map +0 -1
- package/dist/jsx-runtime-DQkoUcjV.js +0 -935
- package/dist/jsx-runtime-DQkoUcjV.js.map +0 -1
|
@@ -1,116 +1,137 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use strict";
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
-
const jsxRuntime = require("
|
|
4
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
5
|
+
const editorReact = require("@intlayer/editor-react");
|
|
5
6
|
const lucideReact = require("lucide-react");
|
|
6
|
-
const
|
|
7
|
+
const ReactExports = require("react");
|
|
7
8
|
const reactIntlayer = require("react-intlayer");
|
|
8
9
|
const components_Button_Button = require("../Button/Button.cjs");
|
|
9
10
|
const components_Container_index = require("../Container/index.cjs");
|
|
10
|
-
const components_Headers_index = require("../Headers/index.cjs");
|
|
11
11
|
require("@intlayer/config/client");
|
|
12
12
|
require("@intlayer/core");
|
|
13
13
|
require("fuse.js");
|
|
14
14
|
require("../../hooks/useScrollBlockage/useScrollBlockageStore.cjs");
|
|
15
15
|
require("../../hooks/useAsync/useAsyncStateStore.cjs");
|
|
16
|
-
require("@intlayer/editor-react");
|
|
17
16
|
require("@intlayer/api");
|
|
18
17
|
require("../Toaster/Toast.cjs");
|
|
19
18
|
require("deepmerge");
|
|
20
19
|
require("../DropDown/index.cjs");
|
|
21
20
|
require("../Input/Input.cjs");
|
|
22
|
-
require("../Input/InputPassword.cjs");
|
|
23
21
|
require("../Input/Checkbox.cjs");
|
|
24
22
|
const components_SwitchSelector_index = require("../SwitchSelector/index.cjs");
|
|
25
23
|
require("../LocaleSwitcherContentDropDown/localeSwitcher.content.cjs");
|
|
26
24
|
const components_LocaleSwitcherContentDropDown_LocaleSwitcherContentContext = require("../LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.cjs");
|
|
25
|
+
const components_DictionaryFieldEditor_ContentEditor = require("./ContentEditor.cjs");
|
|
27
26
|
const components_DictionaryFieldEditor_DictionaryDetails_DictionaryDetailsForm = require("./DictionaryDetails/DictionaryDetailsForm.cjs");
|
|
28
27
|
const components_DictionaryFieldEditor_dictionaryFieldEditor_content = require("./dictionaryFieldEditor.content.cjs");
|
|
29
28
|
const components_DictionaryFieldEditor_JSONEditor = require("./JSONEditor.cjs");
|
|
30
|
-
const components_DictionaryFieldEditor_NodeEditor = require("./NodeEditor.cjs");
|
|
31
29
|
const components_DictionaryFieldEditor_SaveForm_SaveForm = require("./SaveForm/SaveForm.cjs");
|
|
30
|
+
const components_DictionaryFieldEditor_StructureEditor = require("./StructureEditor.cjs");
|
|
32
31
|
const DictionaryFieldEditor = ({
|
|
33
32
|
dictionary,
|
|
34
33
|
onClickDictionaryList,
|
|
35
34
|
isDarkMode,
|
|
36
|
-
availableLocales,
|
|
37
35
|
mode
|
|
38
36
|
}) => {
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
|
|
37
|
+
const config = editorReact.useConfiguration();
|
|
38
|
+
const [editorView, setEditorView] = ReactExports.useState(
|
|
39
|
+
1
|
|
40
|
+
/* ContentEditor */
|
|
42
41
|
);
|
|
43
|
-
const { returnToDictionaryList
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
] }),
|
|
67
|
-
mode === "remote" && /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs(
|
|
68
|
-
components_Container_index.Container,
|
|
69
|
-
{
|
|
70
|
-
className: "flex size-full justify-center gap-10 p-6",
|
|
71
|
-
roundedSize: "xl",
|
|
72
|
-
children: [
|
|
73
|
-
/* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(components_Headers_index.H2, { children: titleInformation }),
|
|
74
|
-
/* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(components_DictionaryFieldEditor_DictionaryDetails_DictionaryDetailsForm.DictionaryDetailsForm, { dictionary, mode })
|
|
75
|
-
]
|
|
76
|
-
}
|
|
77
|
-
),
|
|
78
|
-
/* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs(
|
|
79
|
-
components_Container_index.Container,
|
|
80
|
-
{
|
|
81
|
-
className: "flex size-full justify-center gap-10 p-6",
|
|
82
|
-
roundedSize: "xl",
|
|
83
|
-
children: [
|
|
84
|
-
/* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(components_Headers_index.H2, { children: titleContent }),
|
|
85
|
-
/* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
|
|
86
|
-
components_SwitchSelector_index.SwitchSelector,
|
|
42
|
+
const { returnToDictionaryList } = reactIntlayer.useDictionary(
|
|
43
|
+
components_DictionaryFieldEditor_dictionaryFieldEditor_content.dictionaryFieldEditorContent
|
|
44
|
+
);
|
|
45
|
+
const { setFocusedContent } = editorReact.useFocusDictionaryActions();
|
|
46
|
+
const { setLocaleDictionaries } = editorReact.useDictionariesRecordActions();
|
|
47
|
+
ReactExports.useEffect(() => {
|
|
48
|
+
setFocusedContent((prev) => ({
|
|
49
|
+
...prev ?? {},
|
|
50
|
+
dictionaryKey: dictionary.key
|
|
51
|
+
}));
|
|
52
|
+
setLocaleDictionaries((prev) => ({
|
|
53
|
+
...prev,
|
|
54
|
+
[dictionary.key]: dictionary
|
|
55
|
+
}));
|
|
56
|
+
}, []);
|
|
57
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
58
|
+
components_LocaleSwitcherContentDropDown_LocaleSwitcherContentContext.LocaleSwitcherContentProvider,
|
|
59
|
+
{
|
|
60
|
+
availableLocales: config.internationalization.locales ?? [],
|
|
61
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex size-full flex-1 flex-col gap-10", children: [
|
|
62
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
63
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
64
|
+
components_Button_Button.Button,
|
|
87
65
|
{
|
|
88
|
-
|
|
89
|
-
|
|
66
|
+
onClick: () => onClickDictionaryList?.(),
|
|
67
|
+
variant: "hoverable",
|
|
68
|
+
size: "icon-md",
|
|
90
69
|
color: "text",
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
{
|
|
95
|
-
content: "Node editor",
|
|
96
|
-
value: 0
|
|
97
|
-
/* NodeEditor */
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
content: "JSON editor",
|
|
101
|
-
value: 1
|
|
102
|
-
/* JSONEditor */
|
|
103
|
-
}
|
|
104
|
-
]
|
|
70
|
+
id: "return-to-dictionary-list",
|
|
71
|
+
Icon: lucideReact.ArrowLeft,
|
|
72
|
+
label: returnToDictionaryList.label.value
|
|
105
73
|
}
|
|
106
74
|
),
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
75
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
76
|
+
"label",
|
|
77
|
+
{
|
|
78
|
+
className: "cursor-pointer text-xs hover:underline",
|
|
79
|
+
htmlFor: "return-to-dictionary-list",
|
|
80
|
+
children: returnToDictionaryList.text
|
|
81
|
+
}
|
|
82
|
+
)
|
|
83
|
+
] }),
|
|
84
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
85
|
+
components_Container_index.Container,
|
|
86
|
+
{
|
|
87
|
+
className: "flex size-full justify-center gap-10 p-6",
|
|
88
|
+
roundedSize: "xl",
|
|
89
|
+
children: [
|
|
90
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
91
|
+
components_SwitchSelector_index.SwitchSelector,
|
|
92
|
+
{
|
|
93
|
+
defaultValue: editorView,
|
|
94
|
+
onChange: (value) => setEditorView(value),
|
|
95
|
+
color: "text",
|
|
96
|
+
size: "sm",
|
|
97
|
+
className: "m-auto w-full max-w-xl",
|
|
98
|
+
choices: [
|
|
99
|
+
{
|
|
100
|
+
content: "Details",
|
|
101
|
+
value: 0
|
|
102
|
+
/* DetailsEditor */
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
content: "Structure",
|
|
106
|
+
value: 2
|
|
107
|
+
/* StructureEditor */
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
content: "Content",
|
|
111
|
+
value: 1
|
|
112
|
+
/* ContentEditor */
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
content: "JSON",
|
|
116
|
+
value: 3
|
|
117
|
+
/* JSONEditor */
|
|
118
|
+
}
|
|
119
|
+
].filter(
|
|
120
|
+
({ value }) => !(mode === "local" && value === 0)
|
|
121
|
+
)
|
|
122
|
+
}
|
|
123
|
+
),
|
|
124
|
+
editorView === 0 && /* @__PURE__ */ jsxRuntime.jsx(components_DictionaryFieldEditor_DictionaryDetails_DictionaryDetailsForm.DictionaryDetailsForm, { dictionary, mode }),
|
|
125
|
+
editorView === 2 && /* @__PURE__ */ jsxRuntime.jsx(components_DictionaryFieldEditor_StructureEditor.StructureEditor, { dictionary }),
|
|
126
|
+
editorView === 1 && /* @__PURE__ */ jsxRuntime.jsx(components_DictionaryFieldEditor_ContentEditor.ContentEditor, { dictionary }),
|
|
127
|
+
editorView === 3 && /* @__PURE__ */ jsxRuntime.jsx(components_DictionaryFieldEditor_JSONEditor.JSONEditor, { dictionary, isDarkMode }),
|
|
128
|
+
/* @__PURE__ */ jsxRuntime.jsx(components_DictionaryFieldEditor_SaveForm_SaveForm.SaveForm, { dictionary, mode })
|
|
129
|
+
]
|
|
130
|
+
}
|
|
131
|
+
)
|
|
132
|
+
] })
|
|
133
|
+
}
|
|
134
|
+
);
|
|
114
135
|
};
|
|
115
136
|
exports.DictionaryFieldEditor = DictionaryFieldEditor;
|
|
116
137
|
//# sourceMappingURL=DictionaryFieldEditor.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DictionaryFieldEditor.cjs","sources":["../../../src/components/DictionaryFieldEditor/DictionaryFieldEditor.tsx"],"sourcesContent":["'use client';\n\nimport {
|
|
1
|
+
{"version":3,"file":"DictionaryFieldEditor.cjs","sources":["../../../src/components/DictionaryFieldEditor/DictionaryFieldEditor.tsx"],"sourcesContent":["'use client';\n\nimport type { Dictionary } from '@intlayer/core';\nimport {\n useConfiguration,\n useDictionariesRecordActions,\n useFocusDictionaryActions,\n} from '@intlayer/editor-react';\nimport { ArrowLeft } from 'lucide-react';\nimport { useEffect, useState, type FC } from 'react';\nimport { useDictionary } from 'react-intlayer';\nimport { Button } from '../Button';\nimport { Container } from '../Container';\nimport { LocaleSwitcherContentProvider } from '../LocaleSwitcherContentDropDown';\nimport { SwitchSelector } from '../SwitchSelector';\nimport { ContentEditor } from './ContentEditor';\nimport { DictionaryDetailsForm } from './DictionaryDetails/DictionaryDetailsForm';\nimport { dictionaryFieldEditorContent } from './dictionaryFieldEditor.content';\nimport { JSONEditor } from './JSONEditor';\nimport { SaveForm } from './SaveForm/SaveForm';\nimport { StructureEditor } from './StructureEditor';\n\ntype DictionaryFieldEditorProps = {\n dictionary: Dictionary;\n onClickDictionaryList?: () => void;\n isDarkMode?: boolean;\n mode: 'local' | 'remote';\n};\n\nenum EditorViewType {\n DetailsEditor,\n ContentEditor,\n StructureEditor,\n JSONEditor,\n}\n\nexport const DictionaryFieldEditor: FC<DictionaryFieldEditorProps> = ({\n dictionary,\n onClickDictionaryList,\n isDarkMode,\n mode,\n}) => {\n const config = useConfiguration();\n const [editorView, setEditorView] = useState<EditorViewType>(\n EditorViewType.ContentEditor\n );\n const { returnToDictionaryList } = useDictionary(\n dictionaryFieldEditorContent\n );\n const { setFocusedContent } = useFocusDictionaryActions();\n const { setLocaleDictionaries } = useDictionariesRecordActions();\n\n useEffect(() => {\n // Focus the dictionary if not focused\n setFocusedContent((prev) => ({\n ...(prev ?? {}),\n dictionaryKey: dictionary.key,\n }));\n setLocaleDictionaries((prev) => ({\n ...prev,\n [dictionary.key]: dictionary,\n }));\n }, []);\n\n return (\n <LocaleSwitcherContentProvider\n availableLocales={config.internationalization.locales ?? []}\n >\n <div className=\"flex size-full flex-1 flex-col gap-10\">\n <div className=\"flex items-center gap-2\">\n <Button\n onClick={() => onClickDictionaryList?.()}\n variant=\"hoverable\"\n size=\"icon-md\"\n color=\"text\"\n id=\"return-to-dictionary-list\"\n Icon={ArrowLeft}\n label={returnToDictionaryList.label.value}\n />\n <label\n className=\"cursor-pointer text-xs hover:underline\"\n htmlFor=\"return-to-dictionary-list\"\n >\n {returnToDictionaryList.text}\n </label>\n </div>\n\n <Container\n className=\"flex size-full justify-center gap-10 p-6\"\n roundedSize=\"xl\"\n >\n <SwitchSelector\n defaultValue={editorView}\n onChange={(value) => setEditorView(value)}\n color=\"text\"\n size=\"sm\"\n className=\"m-auto w-full max-w-xl\"\n choices={[\n {\n content: 'Details',\n value: EditorViewType.DetailsEditor,\n },\n {\n content: 'Structure',\n value: EditorViewType.StructureEditor,\n },\n {\n content: 'Content',\n value: EditorViewType.ContentEditor,\n },\n {\n content: 'JSON',\n value: EditorViewType.JSONEditor,\n },\n ].filter(\n ({ value }) =>\n !(mode === 'local' && value === EditorViewType.DetailsEditor)\n )}\n />\n {editorView === EditorViewType.DetailsEditor && (\n <DictionaryDetailsForm dictionary={dictionary} mode={mode} />\n )}\n {editorView === EditorViewType.StructureEditor && (\n <StructureEditor dictionary={dictionary} />\n )}\n {editorView === EditorViewType.ContentEditor && (\n <ContentEditor dictionary={dictionary} />\n )}\n {editorView === EditorViewType.JSONEditor && (\n <JSONEditor dictionary={dictionary} isDarkMode={isDarkMode} />\n )}\n <SaveForm dictionary={dictionary} mode={mode} />\n </Container>\n </div>\n </LocaleSwitcherContentProvider>\n );\n};\n"],"names":["useConfiguration","useState","useDictionary","dictionaryFieldEditorContent","useFocusDictionaryActions","useDictionariesRecordActions","useEffect","jsx","LocaleSwitcherContentProvider","jsxs","Button","ArrowLeft","Container","SwitchSelector","DictionaryDetailsForm","StructureEditor","ContentEditor","JSONEditor","SaveForm"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCO,MAAM,wBAAwD,CAAC;AAAA,EACpE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,SAASA,YAAAA,iBAAiB;AAC1B,QAAA,CAAC,YAAY,aAAa,IAAIC,aAAA;AAAA,IAClC;AAAA;AAAA,EACF;AACM,QAAA,EAAE,2BAA2BC,cAAA;AAAA,IACjCC,+DAAAA;AAAAA,EACF;AACM,QAAA,EAAE,kBAAkB,IAAIC,sCAA0B;AAClD,QAAA,EAAE,sBAAsB,IAAIC,yCAA6B;AAE/DC,eAAAA,UAAU,MAAM;AAEd,sBAAkB,CAAC,UAAU;AAAA,MAC3B,GAAI,QAAQ,CAAC;AAAA,MACb,eAAe,WAAW;AAAA,IAAA,EAC1B;AACF,0BAAsB,CAAC,UAAU;AAAA,MAC/B,GAAG;AAAA,MACH,CAAC,WAAW,GAAG,GAAG;AAAA,IAAA,EAClB;AAAA,EACJ,GAAG,EAAE;AAGH,SAAAC,2BAAA;AAAA,IAACC,sEAAA;AAAA,IAAA;AAAA,MACC,kBAAkB,OAAO,qBAAqB,WAAW,CAAC;AAAA,MAE1D,UAAAC,2BAAA,KAAC,OAAI,EAAA,WAAU,yCACb,UAAA;AAAA,QAACA,2BAAAA,KAAA,OAAA,EAAI,WAAU,2BACb,UAAA;AAAA,UAAAF,2BAAA;AAAA,YAACG,yBAAA;AAAA,YAAA;AAAA,cACC,SAAS,MAAM,wBAAwB;AAAA,cACvC,SAAQ;AAAA,cACR,MAAK;AAAA,cACL,OAAM;AAAA,cACN,IAAG;AAAA,cACH,MAAMC,YAAA;AAAA,cACN,OAAO,uBAAuB,MAAM;AAAA,YAAA;AAAA,UACtC;AAAA,UACAJ,2BAAA;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,WAAU;AAAA,cACV,SAAQ;AAAA,cAEP,UAAuB,uBAAA;AAAA,YAAA;AAAA,UAAA;AAAA,QAC1B,GACF;AAAA,QAEAE,2BAAA;AAAA,UAACG,2BAAA;AAAA,UAAA;AAAA,YACC,WAAU;AAAA,YACV,aAAY;AAAA,YAEZ,UAAA;AAAA,cAAAL,2BAAA;AAAA,gBAACM,gCAAA;AAAA,gBAAA;AAAA,kBACC,cAAc;AAAA,kBACd,UAAU,CAAC,UAAU,cAAc,KAAK;AAAA,kBACxC,OAAM;AAAA,kBACN,MAAK;AAAA,kBACL,WAAU;AAAA,kBACV,SAAS;AAAA,oBACP;AAAA,sBACE,SAAS;AAAA,sBACT,OAAO;AAAA;AAAA,oBACT;AAAA,oBACA;AAAA,sBACE,SAAS;AAAA,sBACT,OAAO;AAAA;AAAA,oBACT;AAAA,oBACA;AAAA,sBACE,SAAS;AAAA,sBACT,OAAO;AAAA;AAAA,oBACT;AAAA,oBACA;AAAA,sBACE,SAAS;AAAA,sBACT,OAAO;AAAA;AAAA,oBAAA;AAAA,kBACT,EACA;AAAA,oBACA,CAAC,EAAE,MAAA,MACD,EAAE,SAAS,WAAW,UAAU;AAAA,kBAAA;AAAA,gBACpC;AAAA,cACF;AAAA,cACC,eAAe,KACbN,2BAAA,IAAAO,yEAAA,uBAAA,EAAsB,YAAwB,MAAY;AAAA,cAE5D,eAAe,KACbP,2BAAAA,IAAAQ,iDAAAA,iBAAA,EAAgB,WAAwB,CAAA;AAAA,cAE1C,eAAe,KACbR,2BAAAA,IAAAS,+CAAAA,eAAA,EAAc,WAAwB,CAAA;AAAA,cAExC,eAAe,KACbT,2BAAA,IAAAU,4CAAA,YAAA,EAAW,YAAwB,YAAwB;AAAA,cAE9DV,2BAAAA,IAACW,mDAAS,UAAA,EAAA,YAAwB,KAAY,CAAA;AAAA,YAAA;AAAA,UAAA;AAAA,QAAA;AAAA,MAChD,EACF,CAAA;AAAA,IAAA;AAAA,EACF;AAEJ;;"}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import { Locales } from '@intlayer/config';
|
|
2
1
|
import { Dictionary } from '@intlayer/core';
|
|
3
2
|
import { FC } from 'react';
|
|
4
3
|
type DictionaryFieldEditorProps = {
|
|
5
4
|
dictionary: Dictionary;
|
|
6
5
|
onClickDictionaryList?: () => void;
|
|
7
6
|
isDarkMode?: boolean;
|
|
8
|
-
availableLocales: Locales[];
|
|
9
7
|
mode: 'local' | 'remote';
|
|
10
8
|
};
|
|
11
9
|
export declare const DictionaryFieldEditor: FC<DictionaryFieldEditorProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DictionaryFieldEditor.d.ts","sourceRoot":"","sources":["../../../src/components/DictionaryFieldEditor/DictionaryFieldEditor.tsx"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"DictionaryFieldEditor.d.ts","sourceRoot":"","sources":["../../../src/components/DictionaryFieldEditor/DictionaryFieldEditor.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAOjD,OAAO,EAAuB,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAarD,KAAK,0BAA0B,GAAG;IAChC,UAAU,EAAE,UAAU,CAAC;IACvB,qBAAqB,CAAC,EAAE,MAAM,IAAI,CAAC;IACnC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,IAAI,EAAE,OAAO,GAAG,QAAQ,CAAC;CAC1B,CAAC;AASF,eAAO,MAAM,qBAAqB,EAAE,EAAE,CAAC,0BAA0B,CAoGhE,CAAC"}
|
|
@@ -1,114 +1,135 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useConfiguration, useFocusDictionaryActions, useDictionariesRecordActions } from "@intlayer/editor-react";
|
|
3
4
|
import { ArrowLeft } from "lucide-react";
|
|
4
|
-
import { useState } from "react";
|
|
5
|
+
import { useState, useEffect } from "react";
|
|
5
6
|
import { useDictionary } from "react-intlayer";
|
|
6
7
|
import { Button } from "../Button/Button.mjs";
|
|
7
8
|
import { Container } from "../Container/index.mjs";
|
|
8
|
-
import { H2 } from "../Headers/index.mjs";
|
|
9
9
|
import "@intlayer/config/client";
|
|
10
10
|
import "@intlayer/core";
|
|
11
11
|
import "fuse.js";
|
|
12
12
|
import "../../hooks/useScrollBlockage/useScrollBlockageStore.mjs";
|
|
13
13
|
import "../../hooks/useAsync/useAsyncStateStore.mjs";
|
|
14
|
-
import "@intlayer/editor-react";
|
|
15
14
|
import "@intlayer/api";
|
|
16
15
|
import "../Toaster/Toast.mjs";
|
|
17
16
|
import "deepmerge";
|
|
18
17
|
import "../DropDown/index.mjs";
|
|
19
18
|
import "../Input/Input.mjs";
|
|
20
|
-
import "../Input/InputPassword.mjs";
|
|
21
19
|
import "../Input/Checkbox.mjs";
|
|
22
20
|
import { SwitchSelector } from "../SwitchSelector/index.mjs";
|
|
23
21
|
import "../LocaleSwitcherContentDropDown/localeSwitcher.content.mjs";
|
|
24
22
|
import { LocaleSwitcherContentProvider } from "../LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.mjs";
|
|
23
|
+
import { ContentEditor } from "./ContentEditor.mjs";
|
|
25
24
|
import { DictionaryDetailsForm } from "./DictionaryDetails/DictionaryDetailsForm.mjs";
|
|
26
25
|
import { dictionaryFieldEditorContent } from "./dictionaryFieldEditor.content.mjs";
|
|
27
26
|
import { JSONEditor } from "./JSONEditor.mjs";
|
|
28
|
-
import { NodeEditor } from "./NodeEditor.mjs";
|
|
29
27
|
import { SaveForm } from "./SaveForm/SaveForm.mjs";
|
|
28
|
+
import { StructureEditor } from "./StructureEditor.mjs";
|
|
30
29
|
const DictionaryFieldEditor = ({
|
|
31
30
|
dictionary,
|
|
32
31
|
onClickDictionaryList,
|
|
33
32
|
isDarkMode,
|
|
34
|
-
availableLocales,
|
|
35
33
|
mode
|
|
36
34
|
}) => {
|
|
35
|
+
const config = useConfiguration();
|
|
37
36
|
const [editorView, setEditorView] = useState(
|
|
38
|
-
|
|
39
|
-
/*
|
|
37
|
+
1
|
|
38
|
+
/* ContentEditor */
|
|
40
39
|
);
|
|
41
|
-
const { returnToDictionaryList
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
] }),
|
|
65
|
-
mode === "remote" && /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
66
|
-
Container,
|
|
67
|
-
{
|
|
68
|
-
className: "flex size-full justify-center gap-10 p-6",
|
|
69
|
-
roundedSize: "xl",
|
|
70
|
-
children: [
|
|
71
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(H2, { children: titleInformation }),
|
|
72
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(DictionaryDetailsForm, { dictionary, mode })
|
|
73
|
-
]
|
|
74
|
-
}
|
|
75
|
-
),
|
|
76
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
77
|
-
Container,
|
|
78
|
-
{
|
|
79
|
-
className: "flex size-full justify-center gap-10 p-6",
|
|
80
|
-
roundedSize: "xl",
|
|
81
|
-
children: [
|
|
82
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(H2, { children: titleContent }),
|
|
83
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
84
|
-
SwitchSelector,
|
|
40
|
+
const { returnToDictionaryList } = useDictionary(
|
|
41
|
+
dictionaryFieldEditorContent
|
|
42
|
+
);
|
|
43
|
+
const { setFocusedContent } = useFocusDictionaryActions();
|
|
44
|
+
const { setLocaleDictionaries } = useDictionariesRecordActions();
|
|
45
|
+
useEffect(() => {
|
|
46
|
+
setFocusedContent((prev) => ({
|
|
47
|
+
...prev ?? {},
|
|
48
|
+
dictionaryKey: dictionary.key
|
|
49
|
+
}));
|
|
50
|
+
setLocaleDictionaries((prev) => ({
|
|
51
|
+
...prev,
|
|
52
|
+
[dictionary.key]: dictionary
|
|
53
|
+
}));
|
|
54
|
+
}, []);
|
|
55
|
+
return /* @__PURE__ */ jsx(
|
|
56
|
+
LocaleSwitcherContentProvider,
|
|
57
|
+
{
|
|
58
|
+
availableLocales: config.internationalization.locales ?? [],
|
|
59
|
+
children: /* @__PURE__ */ jsxs("div", { className: "flex size-full flex-1 flex-col gap-10", children: [
|
|
60
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
61
|
+
/* @__PURE__ */ jsx(
|
|
62
|
+
Button,
|
|
85
63
|
{
|
|
86
|
-
|
|
87
|
-
|
|
64
|
+
onClick: () => onClickDictionaryList?.(),
|
|
65
|
+
variant: "hoverable",
|
|
66
|
+
size: "icon-md",
|
|
88
67
|
color: "text",
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
{
|
|
93
|
-
content: "Node editor",
|
|
94
|
-
value: 0
|
|
95
|
-
/* NodeEditor */
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
content: "JSON editor",
|
|
99
|
-
value: 1
|
|
100
|
-
/* JSONEditor */
|
|
101
|
-
}
|
|
102
|
-
]
|
|
68
|
+
id: "return-to-dictionary-list",
|
|
69
|
+
Icon: ArrowLeft,
|
|
70
|
+
label: returnToDictionaryList.label.value
|
|
103
71
|
}
|
|
104
72
|
),
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
73
|
+
/* @__PURE__ */ jsx(
|
|
74
|
+
"label",
|
|
75
|
+
{
|
|
76
|
+
className: "cursor-pointer text-xs hover:underline",
|
|
77
|
+
htmlFor: "return-to-dictionary-list",
|
|
78
|
+
children: returnToDictionaryList.text
|
|
79
|
+
}
|
|
80
|
+
)
|
|
81
|
+
] }),
|
|
82
|
+
/* @__PURE__ */ jsxs(
|
|
83
|
+
Container,
|
|
84
|
+
{
|
|
85
|
+
className: "flex size-full justify-center gap-10 p-6",
|
|
86
|
+
roundedSize: "xl",
|
|
87
|
+
children: [
|
|
88
|
+
/* @__PURE__ */ jsx(
|
|
89
|
+
SwitchSelector,
|
|
90
|
+
{
|
|
91
|
+
defaultValue: editorView,
|
|
92
|
+
onChange: (value) => setEditorView(value),
|
|
93
|
+
color: "text",
|
|
94
|
+
size: "sm",
|
|
95
|
+
className: "m-auto w-full max-w-xl",
|
|
96
|
+
choices: [
|
|
97
|
+
{
|
|
98
|
+
content: "Details",
|
|
99
|
+
value: 0
|
|
100
|
+
/* DetailsEditor */
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
content: "Structure",
|
|
104
|
+
value: 2
|
|
105
|
+
/* StructureEditor */
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
content: "Content",
|
|
109
|
+
value: 1
|
|
110
|
+
/* ContentEditor */
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
content: "JSON",
|
|
114
|
+
value: 3
|
|
115
|
+
/* JSONEditor */
|
|
116
|
+
}
|
|
117
|
+
].filter(
|
|
118
|
+
({ value }) => !(mode === "local" && value === 0)
|
|
119
|
+
)
|
|
120
|
+
}
|
|
121
|
+
),
|
|
122
|
+
editorView === 0 && /* @__PURE__ */ jsx(DictionaryDetailsForm, { dictionary, mode }),
|
|
123
|
+
editorView === 2 && /* @__PURE__ */ jsx(StructureEditor, { dictionary }),
|
|
124
|
+
editorView === 1 && /* @__PURE__ */ jsx(ContentEditor, { dictionary }),
|
|
125
|
+
editorView === 3 && /* @__PURE__ */ jsx(JSONEditor, { dictionary, isDarkMode }),
|
|
126
|
+
/* @__PURE__ */ jsx(SaveForm, { dictionary, mode })
|
|
127
|
+
]
|
|
128
|
+
}
|
|
129
|
+
)
|
|
130
|
+
] })
|
|
131
|
+
}
|
|
132
|
+
);
|
|
112
133
|
};
|
|
113
134
|
export {
|
|
114
135
|
DictionaryFieldEditor
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DictionaryFieldEditor.mjs","sources":["../../../src/components/DictionaryFieldEditor/DictionaryFieldEditor.tsx"],"sourcesContent":["'use client';\n\nimport {
|
|
1
|
+
{"version":3,"file":"DictionaryFieldEditor.mjs","sources":["../../../src/components/DictionaryFieldEditor/DictionaryFieldEditor.tsx"],"sourcesContent":["'use client';\n\nimport type { Dictionary } from '@intlayer/core';\nimport {\n useConfiguration,\n useDictionariesRecordActions,\n useFocusDictionaryActions,\n} from '@intlayer/editor-react';\nimport { ArrowLeft } from 'lucide-react';\nimport { useEffect, useState, type FC } from 'react';\nimport { useDictionary } from 'react-intlayer';\nimport { Button } from '../Button';\nimport { Container } from '../Container';\nimport { LocaleSwitcherContentProvider } from '../LocaleSwitcherContentDropDown';\nimport { SwitchSelector } from '../SwitchSelector';\nimport { ContentEditor } from './ContentEditor';\nimport { DictionaryDetailsForm } from './DictionaryDetails/DictionaryDetailsForm';\nimport { dictionaryFieldEditorContent } from './dictionaryFieldEditor.content';\nimport { JSONEditor } from './JSONEditor';\nimport { SaveForm } from './SaveForm/SaveForm';\nimport { StructureEditor } from './StructureEditor';\n\ntype DictionaryFieldEditorProps = {\n dictionary: Dictionary;\n onClickDictionaryList?: () => void;\n isDarkMode?: boolean;\n mode: 'local' | 'remote';\n};\n\nenum EditorViewType {\n DetailsEditor,\n ContentEditor,\n StructureEditor,\n JSONEditor,\n}\n\nexport const DictionaryFieldEditor: FC<DictionaryFieldEditorProps> = ({\n dictionary,\n onClickDictionaryList,\n isDarkMode,\n mode,\n}) => {\n const config = useConfiguration();\n const [editorView, setEditorView] = useState<EditorViewType>(\n EditorViewType.ContentEditor\n );\n const { returnToDictionaryList } = useDictionary(\n dictionaryFieldEditorContent\n );\n const { setFocusedContent } = useFocusDictionaryActions();\n const { setLocaleDictionaries } = useDictionariesRecordActions();\n\n useEffect(() => {\n // Focus the dictionary if not focused\n setFocusedContent((prev) => ({\n ...(prev ?? {}),\n dictionaryKey: dictionary.key,\n }));\n setLocaleDictionaries((prev) => ({\n ...prev,\n [dictionary.key]: dictionary,\n }));\n }, []);\n\n return (\n <LocaleSwitcherContentProvider\n availableLocales={config.internationalization.locales ?? []}\n >\n <div className=\"flex size-full flex-1 flex-col gap-10\">\n <div className=\"flex items-center gap-2\">\n <Button\n onClick={() => onClickDictionaryList?.()}\n variant=\"hoverable\"\n size=\"icon-md\"\n color=\"text\"\n id=\"return-to-dictionary-list\"\n Icon={ArrowLeft}\n label={returnToDictionaryList.label.value}\n />\n <label\n className=\"cursor-pointer text-xs hover:underline\"\n htmlFor=\"return-to-dictionary-list\"\n >\n {returnToDictionaryList.text}\n </label>\n </div>\n\n <Container\n className=\"flex size-full justify-center gap-10 p-6\"\n roundedSize=\"xl\"\n >\n <SwitchSelector\n defaultValue={editorView}\n onChange={(value) => setEditorView(value)}\n color=\"text\"\n size=\"sm\"\n className=\"m-auto w-full max-w-xl\"\n choices={[\n {\n content: 'Details',\n value: EditorViewType.DetailsEditor,\n },\n {\n content: 'Structure',\n value: EditorViewType.StructureEditor,\n },\n {\n content: 'Content',\n value: EditorViewType.ContentEditor,\n },\n {\n content: 'JSON',\n value: EditorViewType.JSONEditor,\n },\n ].filter(\n ({ value }) =>\n !(mode === 'local' && value === EditorViewType.DetailsEditor)\n )}\n />\n {editorView === EditorViewType.DetailsEditor && (\n <DictionaryDetailsForm dictionary={dictionary} mode={mode} />\n )}\n {editorView === EditorViewType.StructureEditor && (\n <StructureEditor dictionary={dictionary} />\n )}\n {editorView === EditorViewType.ContentEditor && (\n <ContentEditor dictionary={dictionary} />\n )}\n {editorView === EditorViewType.JSONEditor && (\n <JSONEditor dictionary={dictionary} isDarkMode={isDarkMode} />\n )}\n <SaveForm dictionary={dictionary} mode={mode} />\n </Container>\n </div>\n </LocaleSwitcherContentProvider>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCO,MAAM,wBAAwD,CAAC;AAAA,EACpE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,SAAS,iBAAiB;AAC1B,QAAA,CAAC,YAAY,aAAa,IAAI;AAAA,IAClC;AAAA;AAAA,EACF;AACM,QAAA,EAAE,2BAA2B;AAAA,IACjC;AAAA,EACF;AACM,QAAA,EAAE,kBAAkB,IAAI,0BAA0B;AAClD,QAAA,EAAE,sBAAsB,IAAI,6BAA6B;AAE/D,YAAU,MAAM;AAEd,sBAAkB,CAAC,UAAU;AAAA,MAC3B,GAAI,QAAQ,CAAC;AAAA,MACb,eAAe,WAAW;AAAA,IAAA,EAC1B;AACF,0BAAsB,CAAC,UAAU;AAAA,MAC/B,GAAG;AAAA,MACH,CAAC,WAAW,GAAG,GAAG;AAAA,IAAA,EAClB;AAAA,EACJ,GAAG,EAAE;AAGH,SAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,kBAAkB,OAAO,qBAAqB,WAAW,CAAC;AAAA,MAE1D,UAAA,qBAAC,OAAI,EAAA,WAAU,yCACb,UAAA;AAAA,QAAC,qBAAA,OAAA,EAAI,WAAU,2BACb,UAAA;AAAA,UAAA;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,SAAS,MAAM,wBAAwB;AAAA,cACvC,SAAQ;AAAA,cACR,MAAK;AAAA,cACL,OAAM;AAAA,cACN,IAAG;AAAA,cACH,MAAM;AAAA,cACN,OAAO,uBAAuB,MAAM;AAAA,YAAA;AAAA,UACtC;AAAA,UACA;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,WAAU;AAAA,cACV,SAAQ;AAAA,cAEP,UAAuB,uBAAA;AAAA,YAAA;AAAA,UAAA;AAAA,QAC1B,GACF;AAAA,QAEA;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,WAAU;AAAA,YACV,aAAY;AAAA,YAEZ,UAAA;AAAA,cAAA;AAAA,gBAAC;AAAA,gBAAA;AAAA,kBACC,cAAc;AAAA,kBACd,UAAU,CAAC,UAAU,cAAc,KAAK;AAAA,kBACxC,OAAM;AAAA,kBACN,MAAK;AAAA,kBACL,WAAU;AAAA,kBACV,SAAS;AAAA,oBACP;AAAA,sBACE,SAAS;AAAA,sBACT,OAAO;AAAA;AAAA,oBACT;AAAA,oBACA;AAAA,sBACE,SAAS;AAAA,sBACT,OAAO;AAAA;AAAA,oBACT;AAAA,oBACA;AAAA,sBACE,SAAS;AAAA,sBACT,OAAO;AAAA;AAAA,oBACT;AAAA,oBACA;AAAA,sBACE,SAAS;AAAA,sBACT,OAAO;AAAA;AAAA,oBAAA;AAAA,kBACT,EACA;AAAA,oBACA,CAAC,EAAE,MAAA,MACD,EAAE,SAAS,WAAW,UAAU;AAAA,kBAAA;AAAA,gBACpC;AAAA,cACF;AAAA,cACC,eAAe,KACb,oBAAA,uBAAA,EAAsB,YAAwB,MAAY;AAAA,cAE5D,eAAe,KACb,oBAAA,iBAAA,EAAgB,WAAwB,CAAA;AAAA,cAE1C,eAAe,KACb,oBAAA,eAAA,EAAc,WAAwB,CAAA;AAAA,cAExC,eAAe,KACb,oBAAA,YAAA,EAAW,YAAwB,YAAwB;AAAA,cAE9D,oBAAC,UAAS,EAAA,YAAwB,KAAY,CAAA;AAAA,YAAA;AAAA,UAAA;AAAA,QAAA;AAAA,MAChD,EACF,CAAA;AAAA,IAAA;AAAA,EACF;AAEJ;"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use strict";
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
-
const jsxRuntime = require("
|
|
5
|
-
const
|
|
4
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
5
|
+
const ReactExports = require("react");
|
|
6
6
|
const components_Input_Input = require("../Input/Input.cjs");
|
|
7
|
-
require("
|
|
7
|
+
require("lucide-react");
|
|
8
8
|
require("../Input/Checkbox.cjs");
|
|
9
9
|
require("../Select/Multiselect.cjs");
|
|
10
10
|
const components_Select_Select = require("../Select/Select.cjs");
|
|
@@ -27,14 +27,14 @@ const extractInitialState = (value) => {
|
|
|
27
27
|
return { comparator, numberValue };
|
|
28
28
|
};
|
|
29
29
|
const EnumKeyInput = ({ value, onChange }) => {
|
|
30
|
-
const { comparator: initialComparator, numberValue: initialNumberValue } =
|
|
31
|
-
const [comparator, setComparator] =
|
|
30
|
+
const { comparator: initialComparator, numberValue: initialNumberValue } = ReactExports.useMemo(() => extractInitialState(value), [value]);
|
|
31
|
+
const [comparator, setComparator] = ReactExports.useState(
|
|
32
32
|
initialComparator ?? null
|
|
33
33
|
);
|
|
34
|
-
const [numberValue, setNumberValue] =
|
|
34
|
+
const [numberValue, setNumberValue] = ReactExports.useState(
|
|
35
35
|
initialNumberValue ?? null
|
|
36
36
|
);
|
|
37
|
-
|
|
37
|
+
ReactExports.useEffect(() => {
|
|
38
38
|
if (comparator && numberValue && (comparator !== initialComparator || numberValue !== initialNumberValue)) {
|
|
39
39
|
const newValue = `${comparator}${numberValue}`;
|
|
40
40
|
onChange(newValue);
|
|
@@ -46,18 +46,18 @@ const EnumKeyInput = ({ value, onChange }) => {
|
|
|
46
46
|
numberValue,
|
|
47
47
|
onChange
|
|
48
48
|
]);
|
|
49
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
50
|
-
/* @__PURE__ */ jsxRuntime.
|
|
51
|
-
/* @__PURE__ */ jsxRuntime.
|
|
52
|
-
/* @__PURE__ */ jsxRuntime.
|
|
53
|
-
/* @__PURE__ */ jsxRuntime.
|
|
54
|
-
/* @__PURE__ */ jsxRuntime.
|
|
55
|
-
/* @__PURE__ */ jsxRuntime.
|
|
56
|
-
/* @__PURE__ */ jsxRuntime.
|
|
57
|
-
/* @__PURE__ */ jsxRuntime.
|
|
49
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-1", children: [
|
|
50
|
+
/* @__PURE__ */ jsxRuntime.jsxs(components_Select_Select.Select, { onValueChange: setComparator, defaultValue: initialComparator, children: [
|
|
51
|
+
/* @__PURE__ */ jsxRuntime.jsx(components_Select_Select.Select.Trigger, { className: "w-20", children: /* @__PURE__ */ jsxRuntime.jsx(components_Select_Select.Select.Value, { placeholder: "Select a comparator" }) }),
|
|
52
|
+
/* @__PURE__ */ jsxRuntime.jsxs(components_Select_Select.Select.Content, { children: [
|
|
53
|
+
/* @__PURE__ */ jsxRuntime.jsx(components_Select_Select.Select.Item, { value: "<", children: `<` }),
|
|
54
|
+
/* @__PURE__ */ jsxRuntime.jsx(components_Select_Select.Select.Item, { value: "<=", children: `<=` }),
|
|
55
|
+
/* @__PURE__ */ jsxRuntime.jsx(components_Select_Select.Select.Item, { value: "=", children: `=` }),
|
|
56
|
+
/* @__PURE__ */ jsxRuntime.jsx(components_Select_Select.Select.Item, { value: ">=", children: `>=` }),
|
|
57
|
+
/* @__PURE__ */ jsxRuntime.jsx(components_Select_Select.Select.Item, { value: ">", children: `>` })
|
|
58
58
|
] })
|
|
59
59
|
] }),
|
|
60
|
-
/* @__PURE__ */ jsxRuntime.
|
|
60
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
61
61
|
components_Input_Input.Input,
|
|
62
62
|
{
|
|
63
63
|
type: "number",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EnumKeyInput.cjs","sources":["../../../src/components/DictionaryFieldEditor/EnumKeyInput.tsx"],"sourcesContent":["'use client';\n\nimport { useEffect, useMemo, useState, type FC } from 'react';\nimport { Input } from '../Input';\nimport { Select } from '../Select';\n\nconst extractInitialState = (\n value: string | number\n): { comparator: string | undefined; numberValue: string | undefined } => {\n let comparator;\n let numberValue;\n\n if (typeof value === 'number' || !isNaN(Number(value))) {\n // If value is a number or numeric string, set comparator to '=' and numberValue accordingly\n comparator = '=';\n numberValue = value.toString();\n } else if (typeof value === 'string') {\n // Define possible comparators\n const comparators = ['<=', '>=', '<', '>', '='];\n // Find the comparator that matches the start of the string\n const matchedComparator = comparators.find((comp) =>\n value.startsWith(comp)\n );\n if (matchedComparator) {\n comparator = matchedComparator;\n numberValue = value.slice(matchedComparator.length);\n }\n }\n\n return { comparator, numberValue };\n};\n\ntype EnumKeyInputProps = {\n value: string | number;\n onChange: (value: string) => void;\n};\n\n/**\n * Example of values:\n * - `<1`\n * - `>-44.3`\n * - `=999`\n * - `<=1`\n * - `>=1`\n * - 88\n * - `-1`\n *\n */\nexport const EnumKeyInput: FC<EnumKeyInputProps> = ({ value, onChange }) => {\n const { comparator: initialComparator, numberValue: initialNumberValue } =\n useMemo(() => extractInitialState(value), [value]);\n const [comparator, setComparator] = useState<string | null>(\n initialComparator ?? null\n );\n const [numberValue, setNumberValue] = useState<string | null>(\n initialNumberValue ?? null\n );\n\n useEffect(() => {\n if (\n comparator &&\n numberValue &&\n (comparator !== initialComparator || numberValue !== initialNumberValue)\n ) {\n const newValue = `${comparator}${numberValue}`;\n\n onChange(newValue);\n }\n }, [\n comparator,\n initialComparator,\n initialNumberValue,\n numberValue,\n onChange,\n ]);\n\n return (\n <div className=\"flex gap-1\">\n <Select onValueChange={setComparator} defaultValue={initialComparator}>\n <Select.Trigger className=\"w-20\">\n <Select.Value placeholder=\"Select a comparator\" />\n </Select.Trigger>\n <Select.Content>\n <Select.Item value=\"<\">{`<`}</Select.Item>\n <Select.Item value=\"<=\">{`<=`}</Select.Item>\n <Select.Item value=\"=\">{`=`}</Select.Item>\n <Select.Item value=\">=\">{`>=`}</Select.Item>\n <Select.Item value=\">\">{`>`}</Select.Item>\n </Select.Content>\n </Select>\n <Input\n type=\"number\"\n defaultValue={numberValue ?? undefined}\n onChange={(e) => setNumberValue(e.target.value)}\n className=\"w-full\"\n />\n </div>\n );\n};\n"],"names":["useMemo","useState","useEffect","jsxs","Select","jsx","Input"],"mappings":";;;;;;;;;;AAMA,MAAM,sBAAsB,CAC1B,UACwE;AACpE,MAAA;AACA,MAAA;AAEA,MAAA,OAAO,UAAU,YAAY,CAAC,MAAM,OAAO,KAAK,CAAC,GAAG;AAEzC,iBAAA;AACb,kBAAc,MAAM,SAAS;AAAA,EAAA,WACpB,OAAO,UAAU,UAAU;AAEpC,UAAM,cAAc,CAAC,MAAM,MAAM,KAAK,KAAK,GAAG;AAE9C,UAAM,oBAAoB,YAAY;AAAA,MAAK,CAAC,SAC1C,MAAM,WAAW,IAAI;AAAA,IACvB;AACA,QAAI,mBAAmB;AACR,mBAAA;AACC,oBAAA,MAAM,MAAM,kBAAkB,MAAM;AAAA,IAAA;AAAA,EACpD;AAGK,SAAA,EAAE,YAAY,YAAY;AACnC;AAkBO,MAAM,eAAsC,CAAC,EAAE,OAAO,eAAe;AAC1E,QAAM,EAAE,YAAY,mBAAmB,aAAa,mBAAmB,IACrEA,
|
|
1
|
+
{"version":3,"file":"EnumKeyInput.cjs","sources":["../../../src/components/DictionaryFieldEditor/EnumKeyInput.tsx"],"sourcesContent":["'use client';\n\nimport { useEffect, useMemo, useState, type FC } from 'react';\nimport { Input } from '../Input';\nimport { Select } from '../Select';\n\nconst extractInitialState = (\n value: string | number\n): { comparator: string | undefined; numberValue: string | undefined } => {\n let comparator;\n let numberValue;\n\n if (typeof value === 'number' || !isNaN(Number(value))) {\n // If value is a number or numeric string, set comparator to '=' and numberValue accordingly\n comparator = '=';\n numberValue = value.toString();\n } else if (typeof value === 'string') {\n // Define possible comparators\n const comparators = ['<=', '>=', '<', '>', '='];\n // Find the comparator that matches the start of the string\n const matchedComparator = comparators.find((comp) =>\n value.startsWith(comp)\n );\n if (matchedComparator) {\n comparator = matchedComparator;\n numberValue = value.slice(matchedComparator.length);\n }\n }\n\n return { comparator, numberValue };\n};\n\ntype EnumKeyInputProps = {\n value: string | number;\n onChange: (value: string) => void;\n};\n\n/**\n * Example of values:\n * - `<1`\n * - `>-44.3`\n * - `=999`\n * - `<=1`\n * - `>=1`\n * - 88\n * - `-1`\n *\n */\nexport const EnumKeyInput: FC<EnumKeyInputProps> = ({ value, onChange }) => {\n const { comparator: initialComparator, numberValue: initialNumberValue } =\n useMemo(() => extractInitialState(value), [value]);\n const [comparator, setComparator] = useState<string | null>(\n initialComparator ?? null\n );\n const [numberValue, setNumberValue] = useState<string | null>(\n initialNumberValue ?? null\n );\n\n useEffect(() => {\n if (\n comparator &&\n numberValue &&\n (comparator !== initialComparator || numberValue !== initialNumberValue)\n ) {\n const newValue = `${comparator}${numberValue}`;\n\n onChange(newValue);\n }\n }, [\n comparator,\n initialComparator,\n initialNumberValue,\n numberValue,\n onChange,\n ]);\n\n return (\n <div className=\"flex gap-1\">\n <Select onValueChange={setComparator} defaultValue={initialComparator}>\n <Select.Trigger className=\"w-20\">\n <Select.Value placeholder=\"Select a comparator\" />\n </Select.Trigger>\n <Select.Content>\n <Select.Item value=\"<\">{`<`}</Select.Item>\n <Select.Item value=\"<=\">{`<=`}</Select.Item>\n <Select.Item value=\"=\">{`=`}</Select.Item>\n <Select.Item value=\">=\">{`>=`}</Select.Item>\n <Select.Item value=\">\">{`>`}</Select.Item>\n </Select.Content>\n </Select>\n <Input\n type=\"number\"\n defaultValue={numberValue ?? undefined}\n onChange={(e) => setNumberValue(e.target.value)}\n className=\"w-full\"\n />\n </div>\n );\n};\n"],"names":["useMemo","useState","useEffect","jsxs","Select","jsx","Input"],"mappings":";;;;;;;;;;AAMA,MAAM,sBAAsB,CAC1B,UACwE;AACpE,MAAA;AACA,MAAA;AAEA,MAAA,OAAO,UAAU,YAAY,CAAC,MAAM,OAAO,KAAK,CAAC,GAAG;AAEzC,iBAAA;AACb,kBAAc,MAAM,SAAS;AAAA,EAAA,WACpB,OAAO,UAAU,UAAU;AAEpC,UAAM,cAAc,CAAC,MAAM,MAAM,KAAK,KAAK,GAAG;AAE9C,UAAM,oBAAoB,YAAY;AAAA,MAAK,CAAC,SAC1C,MAAM,WAAW,IAAI;AAAA,IACvB;AACA,QAAI,mBAAmB;AACR,mBAAA;AACC,oBAAA,MAAM,MAAM,kBAAkB,MAAM;AAAA,IAAA;AAAA,EACpD;AAGK,SAAA,EAAE,YAAY,YAAY;AACnC;AAkBO,MAAM,eAAsC,CAAC,EAAE,OAAO,eAAe;AAC1E,QAAM,EAAE,YAAY,mBAAmB,aAAa,mBAAmB,IACrEA,qBAAQ,MAAM,oBAAoB,KAAK,GAAG,CAAC,KAAK,CAAC;AAC7C,QAAA,CAAC,YAAY,aAAa,IAAIC,aAAA;AAAA,IAClC,qBAAqB;AAAA,EACvB;AACM,QAAA,CAAC,aAAa,cAAc,IAAIA,aAAA;AAAA,IACpC,sBAAsB;AAAA,EACxB;AAEAC,eAAAA,UAAU,MAAM;AACd,QACE,cACA,gBACC,eAAe,qBAAqB,gBAAgB,qBACrD;AACA,YAAM,WAAW,GAAG,UAAU,GAAG,WAAW;AAE5C,eAAS,QAAQ;AAAA,IAAA;AAAA,EACnB,GACC;AAAA,IACD;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA,CACD;AAGC,SAAAC,2BAAA,KAAC,OAAI,EAAA,WAAU,cACb,UAAA;AAAA,IAAAA,2BAAA,KAACC,yBAAO,QAAA,EAAA,eAAe,eAAe,cAAc,mBAClD,UAAA;AAAA,MAACC,2BAAAA,IAAAD,yBAAAA,OAAO,SAAP,EAAe,WAAU,QACxB,UAACC,+BAAAD,yBAAAA,OAAO,OAAP,EAAa,aAAY,sBAAA,CAAsB,EAClD,CAAA;AAAA,MACAD,2BAAAA,KAACC,yBAAO,OAAA,SAAP,EACC,UAAA;AAAA,QAAAC,+BAACD,yBAAAA,OAAO,MAAP,EAAY,OAAM,KAAK,UAAI,KAAA;AAAA,uCAC3BA,yBAAAA,OAAO,MAAP,EAAY,OAAM,MAAM,UAAK,MAAA;AAAA,uCAC7BA,yBAAAA,OAAO,MAAP,EAAY,OAAM,KAAK,UAAI,KAAA;AAAA,uCAC3BA,yBAAAA,OAAO,MAAP,EAAY,OAAM,MAAM,UAAK,MAAA;AAAA,uCAC7BA,yBAAAA,OAAO,MAAP,EAAY,OAAM,KAAK,UAAI,IAAA,CAAA;AAAA,MAAA,EAC9B,CAAA;AAAA,IAAA,GACF;AAAA,IACAC,2BAAA;AAAA,MAACC,uBAAA;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,cAAc,eAAe;AAAA,QAC7B,UAAU,CAAC,MAAM,eAAe,EAAE,OAAO,KAAK;AAAA,QAC9C,WAAU;AAAA,MAAA;AAAA,IAAA;AAAA,EACZ,GACF;AAEJ;;"}
|