@intlayer/design-system 5.8.1 → 6.0.0-canary.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.vite/manifest.json +34 -106
- package/dist/better-auth.CMQ3rA-I-7umXOENE.js.map +1 -1
- package/dist/better-auth.CMQ3rA-I-C2nBKRMa.cjs.map +1 -1
- package/dist/components/Breadcrumb/breadcrumb.content.cjs +3 -1
- package/dist/components/Breadcrumb/breadcrumb.content.cjs.map +1 -1
- package/dist/components/Breadcrumb/breadcrumb.content.d.ts +3 -0
- package/dist/components/Breadcrumb/breadcrumb.content.d.ts.map +1 -1
- package/dist/components/Breadcrumb/breadcrumb.content.mjs +3 -1
- package/dist/components/Breadcrumb/breadcrumb.content.mjs.map +1 -1
- 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.map +1 -1
- package/dist/components/CopyButton/CopyButton.content.cjs +3 -1
- package/dist/components/CopyButton/CopyButton.content.cjs.map +1 -1
- package/dist/components/CopyButton/CopyButton.content.d.ts +3 -0
- package/dist/components/CopyButton/CopyButton.content.d.ts.map +1 -1
- package/dist/components/CopyButton/CopyButton.content.mjs +3 -1
- package/dist/components/CopyButton/CopyButton.content.mjs.map +1 -1
- package/dist/components/DictionaryEditor/DictionaryEditor.cjs +7 -3
- package/dist/components/DictionaryEditor/DictionaryEditor.cjs.map +1 -1
- package/dist/components/DictionaryEditor/DictionaryEditor.d.ts.map +1 -1
- package/dist/components/DictionaryEditor/DictionaryEditor.mjs +7 -3
- package/dist/components/DictionaryEditor/DictionaryEditor.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/ContentEditor.cjs +1 -1
- package/dist/components/DictionaryFieldEditor/ContentEditor.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/ContentEditor.mjs +1 -1
- package/dist/components/DictionaryFieldEditor/ContentEditor.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.cjs +83 -34
- package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.mjs +83 -34
- package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.cjs +13 -9
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.mjs +12 -8
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryCreationForm.content.cjs +27 -13
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryCreationForm.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryCreationForm.content.d.ts +27 -0
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryCreationForm.content.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryCreationForm.content.mjs +27 -13
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryCreationForm.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.content.cjs +9 -4
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.content.d.ts +9 -0
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.content.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.content.mjs +9 -4
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.cjs +29 -25
- 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 +27 -23
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.cjs +37 -17
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.d.ts +64 -2
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.mjs +37 -17
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.cjs +25 -12
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.d.ts +25 -0
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.mjs +25 -12
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.cjs +4 -5
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs +4 -5
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/JSONEditor.cjs +2 -2
- 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 +2 -2
- package/dist/components/DictionaryFieldEditor/JSONEditor.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.cjs +25 -12
- package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.d.ts +25 -0
- package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.mjs +25 -12
- package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs +36 -31
- 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 +36 -31
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.cjs +32 -28
- package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.d.ts +32 -5
- package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.mjs +32 -28
- package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/StructureEditor.cjs +2 -2
- package/dist/components/DictionaryFieldEditor/StructureEditor.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/StructureEditor.mjs +2 -2
- package/dist/components/DictionaryFieldEditor/StructureEditor.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/StructureView/StructureView.cjs +2 -5
- package/dist/components/DictionaryFieldEditor/StructureView/StructureView.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/StructureView/StructureView.mjs +2 -5
- package/dist/components/DictionaryFieldEditor/StructureView/StructureView.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/StructureView/structureView.content.cjs +9 -4
- package/dist/components/DictionaryFieldEditor/StructureView/structureView.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/StructureView/structureView.content.d.ts +9 -0
- package/dist/components/DictionaryFieldEditor/StructureView/structureView.content.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/StructureView/structureView.content.mjs +9 -4
- package/dist/components/DictionaryFieldEditor/StructureView/structureView.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.cjs +3 -3
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.mjs +3 -3
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcherContext.cjs +4 -6
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcherContext.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcherContext.d.ts +3 -3
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcherContext.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcherContext.mjs +4 -6
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcherContext.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/versionSwitcherDropDown.content.cjs +7 -3
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/versionSwitcherDropDown.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/versionSwitcherDropDown.content.d.ts +7 -0
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/versionSwitcherDropDown.content.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/versionSwitcherDropDown.content.mjs +7 -3
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/versionSwitcherDropDown.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/dictionaryFieldEditor.content.cjs +9 -6
- package/dist/components/DictionaryFieldEditor/dictionaryFieldEditor.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/dictionaryFieldEditor.content.d.ts +9 -4
- package/dist/components/DictionaryFieldEditor/dictionaryFieldEditor.content.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/dictionaryFieldEditor.content.mjs +9 -6
- package/dist/components/DictionaryFieldEditor/dictionaryFieldEditor.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.cjs +28 -14
- package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.d.ts +29 -2
- package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.mjs +28 -14
- package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.mjs.map +1 -1
- package/dist/components/DropDown/index.cjs +2 -2
- package/dist/components/DropDown/index.cjs.map +1 -1
- package/dist/components/DropDown/index.d.ts.map +1 -1
- package/dist/components/DropDown/index.mjs +2 -2
- package/dist/components/DropDown/index.mjs.map +1 -1
- package/dist/components/EditableField/EditableFieldTextArea.cjs +2 -5
- package/dist/components/EditableField/EditableFieldTextArea.cjs.map +1 -1
- package/dist/components/EditableField/EditableFieldTextArea.mjs +2 -5
- package/dist/components/EditableField/EditableFieldTextArea.mjs.map +1 -1
- package/dist/components/ExpandCollapse/ExpandCollapse.cjs.map +1 -1
- package/dist/components/ExpandCollapse/ExpandCollapse.d.ts +2 -2
- package/dist/components/ExpandCollapse/ExpandCollapse.d.ts.map +1 -1
- package/dist/components/ExpandCollapse/ExpandCollapse.mjs.map +1 -1
- package/dist/components/ExpandCollapse/expandCollapse.content.cjs +5 -2
- package/dist/components/ExpandCollapse/expandCollapse.content.cjs.map +1 -1
- package/dist/components/ExpandCollapse/expandCollapse.content.d.ts +3 -0
- package/dist/components/ExpandCollapse/expandCollapse.content.d.ts.map +1 -1
- package/dist/components/ExpandCollapse/expandCollapse.content.mjs +5 -2
- package/dist/components/ExpandCollapse/expandCollapse.content.mjs.map +1 -1
- package/dist/components/Flags/Flag.cjs +2 -1
- 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 -1
- package/dist/components/Flags/Flag.mjs.map +1 -1
- package/dist/components/IDE/Code.cjs +8 -8
- package/dist/components/IDE/Code.cjs.map +1 -1
- package/dist/components/IDE/Code.mjs +8 -8
- package/dist/components/IDE/Code.mjs.map +1 -1
- package/dist/components/IDE/CodeBlockClient.cjs +1 -1
- package/dist/components/IDE/CodeBlockClient.cjs.map +1 -1
- package/dist/components/IDE/CodeBlockClient.d.ts +1 -1
- package/dist/components/IDE/CodeBlockClient.d.ts.map +1 -1
- package/dist/components/IDE/CodeBlockClient.mjs +1 -1
- package/dist/components/IDE/CodeBlockClient.mjs.map +1 -1
- package/dist/components/IDE/CodeContext.cjs +1 -3
- package/dist/components/IDE/CodeContext.cjs.map +1 -1
- package/dist/components/IDE/CodeContext.mjs +1 -3
- package/dist/components/IDE/CodeContext.mjs.map +1 -1
- package/dist/components/IDE/code.content.cjs +5 -2
- package/dist/components/IDE/code.content.cjs.map +1 -1
- package/dist/components/IDE/code.content.d.ts +5 -0
- package/dist/components/IDE/code.content.d.ts.map +1 -1
- package/dist/components/IDE/code.content.mjs +5 -2
- package/dist/components/IDE/code.content.mjs.map +1 -1
- package/dist/components/IDE/copyCode.content.cjs +5 -2
- package/dist/components/IDE/copyCode.content.cjs.map +1 -1
- package/dist/components/IDE/copyCode.content.d.ts +5 -0
- package/dist/components/IDE/copyCode.content.d.ts.map +1 -1
- package/dist/components/IDE/copyCode.content.mjs +5 -2
- package/dist/components/IDE/copyCode.content.mjs.map +1 -1
- 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.map +1 -1
- package/dist/components/Loader/index.content.cjs +6 -1
- package/dist/components/Loader/index.content.cjs.map +1 -1
- package/dist/components/Loader/index.content.d.ts +33 -2
- package/dist/components/Loader/index.content.d.ts.map +1 -1
- package/dist/components/Loader/index.content.mjs +6 -1
- package/dist/components/Loader/index.content.mjs.map +1 -1
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.cjs +1 -3
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.cjs.map +1 -1
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.mjs +1 -3
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.mjs.map +1 -1
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.cjs +1 -3
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.cjs.map +1 -1
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.mjs +1 -3
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.mjs.map +1 -1
- package/dist/components/LocaleSwitcherContentDropDown/localeSwitcher.content.cjs +17 -8
- package/dist/components/LocaleSwitcherContentDropDown/localeSwitcher.content.cjs.map +1 -1
- package/dist/components/LocaleSwitcherContentDropDown/localeSwitcher.content.d.ts +17 -0
- package/dist/components/LocaleSwitcherContentDropDown/localeSwitcher.content.d.ts.map +1 -1
- package/dist/components/LocaleSwitcherContentDropDown/localeSwitcher.content.mjs +17 -8
- package/dist/components/LocaleSwitcherContentDropDown/localeSwitcher.content.mjs.map +1 -1
- package/dist/components/LocaleSwitcherDropDown/localeSwitcher.content.cjs +13 -6
- package/dist/components/LocaleSwitcherDropDown/localeSwitcher.content.cjs.map +1 -1
- package/dist/components/LocaleSwitcherDropDown/localeSwitcher.content.d.ts +13 -0
- package/dist/components/LocaleSwitcherDropDown/localeSwitcher.content.d.ts.map +1 -1
- package/dist/components/LocaleSwitcherDropDown/localeSwitcher.content.mjs +13 -6
- package/dist/components/LocaleSwitcherDropDown/localeSwitcher.content.mjs.map +1 -1
- package/dist/components/Modal/Modal.cjs +2 -4
- package/dist/components/Modal/Modal.cjs.map +1 -1
- package/dist/components/Modal/Modal.mjs +2 -4
- package/dist/components/Modal/Modal.mjs.map +1 -1
- package/dist/components/Navbar/MobileNavbar.cjs +1 -3
- package/dist/components/Navbar/MobileNavbar.cjs.map +1 -1
- package/dist/components/Navbar/MobileNavbar.mjs +1 -3
- package/dist/components/Navbar/MobileNavbar.mjs.map +1 -1
- package/dist/components/Navbar/index.cjs +2 -4
- package/dist/components/Navbar/index.cjs.map +1 -1
- package/dist/components/Navbar/index.mjs +2 -4
- package/dist/components/Navbar/index.mjs.map +1 -1
- package/dist/components/SwitchSelector/index.cjs +1 -3
- package/dist/components/SwitchSelector/index.cjs.map +1 -1
- package/dist/components/SwitchSelector/index.mjs +1 -3
- package/dist/components/SwitchSelector/index.mjs.map +1 -1
- package/dist/components/TabSelector/TabSelector.cjs +1 -3
- package/dist/components/TabSelector/TabSelector.cjs.map +1 -1
- package/dist/components/TabSelector/TabSelector.d.ts +1 -1
- package/dist/components/TabSelector/TabSelector.d.ts.map +1 -1
- package/dist/components/TabSelector/TabSelector.mjs +1 -3
- package/dist/components/TabSelector/TabSelector.mjs.map +1 -1
- package/dist/components/Table/table.content.cjs +3 -1
- package/dist/components/Table/table.content.cjs.map +1 -1
- package/dist/components/Table/table.content.d.ts +3 -0
- package/dist/components/Table/table.content.d.ts.map +1 -1
- package/dist/components/Table/table.content.mjs +3 -1
- package/dist/components/Table/table.content.mjs.map +1 -1
- package/dist/components/Tag/index.cjs +22 -88
- package/dist/components/Tag/index.cjs.map +1 -1
- package/dist/components/Tag/index.d.ts +5 -5
- package/dist/components/Tag/index.mjs +22 -88
- package/dist/components/Tag/index.mjs.map +1 -1
- package/dist/components/TextArea/AutocompleteTextArea.cjs +20 -21
- package/dist/components/TextArea/AutocompleteTextArea.cjs.map +1 -1
- package/dist/components/TextArea/AutocompleteTextArea.d.ts.map +1 -1
- package/dist/components/TextArea/AutocompleteTextArea.mjs +20 -21
- package/dist/components/TextArea/AutocompleteTextArea.mjs.map +1 -1
- package/dist/hooks/auth.cjs +26 -11
- package/dist/hooks/auth.cjs.map +1 -1
- package/dist/hooks/auth.mjs +26 -11
- package/dist/hooks/auth.mjs.map +1 -1
- package/dist/hooks/index.cjs +65 -66
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.ts +1 -3
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.mjs +4 -8
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/hooks/reactQuery.cjs +648 -0
- package/dist/hooks/reactQuery.cjs.map +1 -0
- package/dist/hooks/reactQuery.d.ts +899 -0
- package/dist/hooks/reactQuery.d.ts.map +1 -0
- package/dist/hooks/reactQuery.mjs +646 -0
- package/dist/hooks/reactQuery.mjs.map +1 -0
- package/dist/hooks/useAuth/useOAuth2.cjs +13 -10
- package/dist/hooks/useAuth/useOAuth2.cjs.map +1 -1
- package/dist/hooks/useAuth/useOAuth2.d.ts +1 -1
- package/dist/hooks/useAuth/useOAuth2.d.ts.map +1 -1
- package/dist/hooks/useAuth/useOAuth2.mjs +13 -10
- package/dist/hooks/useAuth/useOAuth2.mjs.map +1 -1
- package/dist/hooks/useAuth/useSession.cjs +23 -26
- package/dist/hooks/useAuth/useSession.cjs.map +1 -1
- package/dist/hooks/useAuth/useSession.d.ts +4 -352
- package/dist/hooks/useAuth/useSession.d.ts.map +1 -1
- package/dist/hooks/useAuth/useSession.mjs +23 -26
- package/dist/hooks/useAuth/useSession.mjs.map +1 -1
- package/dist/hooks/useIntlayerAPI.cjs +2 -3
- package/dist/hooks/useIntlayerAPI.cjs.map +1 -1
- package/dist/hooks/useIntlayerAPI.mjs +2 -3
- package/dist/hooks/useIntlayerAPI.mjs.map +1 -1
- package/dist/hooks/useUser/index.cjs +6 -9
- package/dist/hooks/useUser/index.cjs.map +1 -1
- package/dist/hooks/useUser/index.d.ts +2 -18
- package/dist/hooks/useUser/index.d.ts.map +1 -1
- package/dist/hooks/useUser/index.mjs +6 -9
- package/dist/hooks/useUser/index.mjs.map +1 -1
- package/dist/index-BCuMWKyy.js.map +1 -1
- package/dist/index-BYzBot7l.cjs.map +1 -1
- package/dist/providers/ReactQueryProvider.cjs +85 -0
- package/dist/providers/ReactQueryProvider.cjs.map +1 -0
- package/dist/providers/ReactQueryProvider.d.ts +13 -0
- package/dist/providers/ReactQueryProvider.d.ts.map +1 -0
- package/dist/providers/ReactQueryProvider.mjs +85 -0
- package/dist/providers/ReactQueryProvider.mjs.map +1 -0
- package/dist/providers/index.cjs +5 -0
- package/dist/{hooks/useAsync → providers}/index.cjs.map +1 -1
- package/dist/providers/index.d.ts +2 -0
- package/dist/providers/index.d.ts.map +1 -0
- package/dist/providers/index.mjs +5 -0
- package/dist/{hooks/useAsync → providers}/index.mjs.map +1 -1
- package/package.json +31 -21
- package/dist/hooks/intlayerAPIHooks.cjs +0 -542
- package/dist/hooks/intlayerAPIHooks.cjs.map +0 -1
- package/dist/hooks/intlayerAPIHooks.d.ts +0 -968
- package/dist/hooks/intlayerAPIHooks.d.ts.map +0 -1
- package/dist/hooks/intlayerAPIHooks.mjs +0 -542
- package/dist/hooks/intlayerAPIHooks.mjs.map +0 -1
- package/dist/hooks/useAsync/index.cjs +0 -8
- package/dist/hooks/useAsync/index.d.ts +0 -3
- package/dist/hooks/useAsync/index.d.ts.map +0 -1
- package/dist/hooks/useAsync/index.mjs +0 -8
- package/dist/hooks/useAsync/useAsync.cjs +0 -244
- package/dist/hooks/useAsync/useAsync.cjs.map +0 -1
- package/dist/hooks/useAsync/useAsync.d.ts +0 -73
- package/dist/hooks/useAsync/useAsync.d.ts.map +0 -1
- package/dist/hooks/useAsync/useAsync.mjs +0 -244
- package/dist/hooks/useAsync/useAsync.mjs.map +0 -1
- package/dist/hooks/useAsync/useAsyncStateStore.cjs +0 -150
- package/dist/hooks/useAsync/useAsyncStateStore.cjs.map +0 -1
- package/dist/hooks/useAsync/useAsyncStateStore.d.ts +0 -52
- package/dist/hooks/useAsync/useAsyncStateStore.d.ts.map +0 -1
- package/dist/hooks/useAsync/useAsyncStateStore.mjs +0 -150
- package/dist/hooks/useAsync/useAsyncStateStore.mjs.map +0 -1
- package/dist/hooks/useAsync/useAsyncWrapper.cjs +0 -10
- package/dist/hooks/useAsync/useAsyncWrapper.cjs.map +0 -1
- package/dist/hooks/useAsync/useAsyncWrapper.d.ts +0 -37
- package/dist/hooks/useAsync/useAsyncWrapper.d.ts.map +0 -1
- package/dist/hooks/useAsync/useAsyncWrapper.mjs +0 -10
- package/dist/hooks/useAsync/useAsyncWrapper.mjs.map +0 -1
- package/dist/hooks/useGetAllDictionaries.cjs +0 -35
- package/dist/hooks/useGetAllDictionaries.cjs.map +0 -1
- package/dist/hooks/useGetAllDictionaries.d.ts +0 -11
- package/dist/hooks/useGetAllDictionaries.d.ts.map +0 -1
- package/dist/hooks/useGetAllDictionaries.mjs +0 -35
- package/dist/hooks/useGetAllDictionaries.mjs.map +0 -1
|
@@ -9,11 +9,10 @@ const reactIntlayer = require("react-intlayer");
|
|
|
9
9
|
const components_Modal_Modal = require("../../Modal/Modal.cjs");
|
|
10
10
|
require("@intlayer/config/built");
|
|
11
11
|
require("../../../better-auth.CMQ3rA-I-C2nBKRMa.cjs");
|
|
12
|
-
const
|
|
13
|
-
require("../../../hooks/useAsync/useAsyncStateStore.cjs");
|
|
12
|
+
const hooks_reactQuery = require("../../../hooks/reactQuery.cjs");
|
|
14
13
|
const hooks_useAuth_useAuth = require("../../../hooks/useAuth/useAuth.cjs");
|
|
15
14
|
require("@intlayer/api");
|
|
16
|
-
require("
|
|
15
|
+
require("@tanstack/react-query");
|
|
17
16
|
require("../../../hooks/useScrollBlockage/useScrollBlockageStore.cjs");
|
|
18
17
|
const utils_cn = require("../../../utils/cn.cjs");
|
|
19
18
|
const components_Button_Button = require("../../Button/Button.cjs");
|
|
@@ -30,11 +29,10 @@ const SaveForm = ({
|
|
|
30
29
|
}) => {
|
|
31
30
|
const [isFormatAlertModalOpen, setIsFormatAlertModalOpen] = ReactExports.useState(false);
|
|
32
31
|
const { setLocaleDictionary } = editorReact.useDictionariesRecordActions();
|
|
33
|
-
const { deleteDictionary,
|
|
34
|
-
const { writeDictionary,
|
|
35
|
-
const { pushDictionaries,
|
|
32
|
+
const { mutate: deleteDictionary, isPending: isDeleting } = hooks_reactQuery.useDeleteDictionary();
|
|
33
|
+
const { mutate: writeDictionary, isPending: isWriting } = hooks_reactQuery.useWriteDictionary();
|
|
34
|
+
const { mutate: pushDictionaries, isPending: isPushing } = hooks_reactQuery.usePushDictionaries();
|
|
36
35
|
const isLoading = isWriting || isPushing;
|
|
37
|
-
const isJsonFormat = mode.includes("local") && dictionary.filePath?.endsWith(".json");
|
|
38
36
|
const { editedContent, restoreEditedContent } = editorReact.useEditedContent();
|
|
39
37
|
const {
|
|
40
38
|
deleteButton,
|
|
@@ -45,42 +43,49 @@ const SaveForm = ({
|
|
|
45
43
|
confirmation
|
|
46
44
|
} = reactIntlayer.useIntlayer("save-dictionary-details");
|
|
47
45
|
const { isAuthenticated } = hooks_useAuth_useAuth.useAuth();
|
|
48
|
-
const editedDictionary = editedContent?.[dictionary.
|
|
46
|
+
const editedDictionary = editedContent?.[dictionary.localId];
|
|
49
47
|
const isEdited = editedDictionary && JSON.stringify(editedDictionary) !== JSON.stringify(dictionary);
|
|
50
48
|
const isDistantDictionary = typeof dictionary?.id !== "undefined";
|
|
51
49
|
const handleSaveDictionaryConfirmation = async () => {
|
|
52
|
-
if (!editedContent?.[dictionary.
|
|
50
|
+
if (!editedContent?.[dictionary.localId]) return;
|
|
53
51
|
const updatedDictionary = {
|
|
54
52
|
...dictionary,
|
|
55
|
-
...editedContent?.[dictionary.
|
|
53
|
+
...editedContent?.[dictionary.localId]
|
|
56
54
|
};
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
55
|
+
writeDictionary(
|
|
56
|
+
{
|
|
57
|
+
dictionary: updatedDictionary
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
onSuccess: () => {
|
|
61
|
+
setLocaleDictionary(editedContent?.[dictionary.localId]);
|
|
62
|
+
restoreEditedContent(dictionary.localId);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
);
|
|
63
66
|
};
|
|
64
|
-
const handlePushDictionary =
|
|
65
|
-
if (!editedContent?.[dictionary.
|
|
67
|
+
const handlePushDictionary = () => {
|
|
68
|
+
if (!editedContent?.[dictionary.localId]) return;
|
|
66
69
|
const updatedDictionary = {
|
|
67
70
|
...dictionary,
|
|
68
|
-
...editedContent?.[dictionary.
|
|
71
|
+
...editedContent?.[dictionary.localId]
|
|
69
72
|
};
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
73
|
+
pushDictionaries([updatedDictionary], {
|
|
74
|
+
onSuccess: (res) => {
|
|
75
|
+
if (res) {
|
|
76
|
+
setLocaleDictionary(editedContent?.[dictionary.localId]);
|
|
77
|
+
restoreEditedContent(dictionary.localId);
|
|
78
|
+
}
|
|
74
79
|
}
|
|
75
80
|
});
|
|
76
81
|
};
|
|
77
|
-
const handleDeleteDictionary =
|
|
82
|
+
const handleDeleteDictionary = () => {
|
|
78
83
|
if (!dictionary.id) return;
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
+
deleteDictionary(dictionary.id.toString(), {
|
|
85
|
+
onSuccess: (res) => {
|
|
86
|
+
if (res) {
|
|
87
|
+
onDelete?.();
|
|
88
|
+
}
|
|
84
89
|
}
|
|
85
90
|
});
|
|
86
91
|
};
|
|
@@ -92,7 +97,7 @@ const SaveForm = ({
|
|
|
92
97
|
title: confirmation.title.value,
|
|
93
98
|
size: components_Modal_Modal.ModalSize.MD,
|
|
94
99
|
children: /* @__PURE__ */ jsxRuntime.jsxs("form", { className: "size-full px-3", children: [
|
|
95
|
-
|
|
100
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-neutral py-4 text-sm", children: confirmation.message }),
|
|
96
101
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-12 flex justify-end gap-2 max-md:flex-col", children: [
|
|
97
102
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
98
103
|
components_Form_layout_FormItemLayout.Form.Button,
|
|
@@ -151,7 +156,7 @@ const SaveForm = ({
|
|
|
151
156
|
variant: components_Button_Button.ButtonVariant.OUTLINE,
|
|
152
157
|
color: components_Button_Button.ButtonColor.TEXT,
|
|
153
158
|
className: "max-md:w-full",
|
|
154
|
-
onClick: () => restoreEditedContent(dictionary.
|
|
159
|
+
onClick: () => restoreEditedContent(dictionary.localId),
|
|
155
160
|
children: resetButton.text
|
|
156
161
|
}
|
|
157
162
|
),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SaveForm.cjs","sources":["../../../../src/components/DictionaryFieldEditor/SaveForm/SaveForm.tsx"],"sourcesContent":["'use client';\n\nimport type { Dictionary as DistantDictionary } from '@intlayer/backend';\nimport type { Dictionary } from '@intlayer/core';\nimport {\n useDictionariesRecordActions,\n useEditedContent,\n} from '@intlayer/editor-react';\nimport {\n ArrowUpFromLine,\n Download,\n RotateCcw,\n Save,\n Trash,\n} from 'lucide-react';\nimport {\n type DetailedHTMLProps,\n type FC,\n type FormHTMLAttributes,\n useState,\n} from 'react';\nimport { useIntlayer } from 'react-intlayer';\nimport { Modal, ModalSize } from '../../../components/Modal';\nimport {\n useAuth,\n useDeleteDictionary,\n usePushDictionaries,\n useWriteDictionary,\n} from '../../../hooks';\nimport { cn } from '../../../utils/cn';\nimport { ButtonColor, ButtonVariant } from '../../Button';\nimport { Form } from '../../Form';\n\ntype DictionaryDetailsProps = {\n dictionary: Dictionary;\n mode: ('local' | 'remote')[];\n onDelete?: () => void;\n} & DetailedHTMLProps<FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>;\n\nexport const SaveForm: FC<DictionaryDetailsProps> = ({\n dictionary,\n mode,\n className,\n onDelete,\n ...props\n}) => {\n const [isFormatAlertModalOpen, setIsFormatAlertModalOpen] = useState(false);\n const { setLocaleDictionary } = useDictionariesRecordActions();\n const { deleteDictionary, isLoading: isDeleting } = useDeleteDictionary();\n const { writeDictionary, isLoading: isWriting } = useWriteDictionary();\n const { pushDictionaries, isLoading: isPushing } = usePushDictionaries();\n const isLoading = isWriting || isPushing;\n const isJsonFormat =\n mode.includes('local') && dictionary.filePath?.endsWith('.json');\n\n const { editedContent, restoreEditedContent } = useEditedContent();\n const {\n deleteButton,\n resetButton,\n saveButton,\n publishButton,\n downloadButton,\n confirmation,\n } = useIntlayer('save-dictionary-details');\n const { isAuthenticated } = useAuth();\n\n const editedDictionary = editedContent?.[dictionary.key];\n\n const isEdited =\n editedDictionary &&\n JSON.stringify(editedDictionary) !== JSON.stringify(dictionary);\n\n const isDistantDictionary =\n typeof (dictionary as DistantDictionary)?.id !== 'undefined';\n\n const handleSaveDictionaryConfirmation = async () => {\n if (!editedContent?.[dictionary.key]) return;\n\n const updatedDictionary = {\n ...dictionary,\n ...editedContent?.[dictionary.key],\n };\n\n await writeDictionary({\n dictionary: updatedDictionary,\n }).then(() => {\n setLocaleDictionary(editedContent?.[dictionary.key]);\n restoreEditedContent(dictionary.key);\n });\n };\n\n const handlePushDictionary = async () => {\n if (!editedContent?.[dictionary.key]) return;\n\n const updatedDictionary = {\n ...dictionary,\n ...editedContent?.[dictionary.key],\n };\n\n await pushDictionaries([updatedDictionary]).then((res) => {\n if (res) {\n setLocaleDictionary(editedContent?.[dictionary.key]);\n restoreEditedContent(dictionary.key);\n }\n });\n };\n\n const handleDeleteDictionary = async () => {\n if (!(dictionary as DistantDictionary).id) return;\n\n await deleteDictionary(\n (dictionary as DistantDictionary).id.toString()\n ).then((res) => {\n if (res) {\n onDelete?.();\n }\n });\n };\n\n return (\n <>\n <Modal\n isOpen={isFormatAlertModalOpen}\n title={confirmation.title.value}\n size={ModalSize.MD}\n >\n <form className=\"size-full px-3\">\n {isJsonFormat ? (\n <p className=\"text-neutral py-4 text-sm\">{confirmation.message}</p>\n ) : (\n <p className=\"text-neutral py-4 text-sm\">\n {confirmation.differentFormatMessage}\n </p>\n )}\n <div className=\"mt-12 flex justify-end gap-2 max-md:flex-col\">\n <Form.Button\n label={confirmation.cancelButton.label.value}\n disabled={!isEdited || isLoading}\n color={ButtonColor.TEXT}\n className=\"max-md:w-full\"\n variant={ButtonVariant.OUTLINE}\n onClick={() => setIsFormatAlertModalOpen(false)}\n >\n {confirmation.cancelButton.text}\n </Form.Button>\n <Form.Button\n label={confirmation.confirmButton.label.value}\n disabled={!isEdited || isLoading}\n Icon={Save}\n color={ButtonColor.TEXT}\n className=\"max-md:w-full\"\n isLoading={isPushing}\n onClick={handleSaveDictionaryConfirmation}\n >\n {confirmation.confirmButton.text}\n </Form.Button>\n </div>\n </form>\n </Modal>\n <form\n className={cn('flex justify-end gap-2 max-md:flex-col', className)}\n {...props}\n >\n {mode.includes('remote') &&\n isDistantDictionary &&\n onDelete &&\n isAuthenticated && (\n <Form.Button\n label={deleteButton.label.value}\n Icon={Trash}\n color={ButtonColor.ERROR}\n variant={ButtonVariant.OUTLINE}\n className=\"max-md:w-full\"\n isLoading={isDeleting}\n onClick={handleDeleteDictionary}\n >\n {deleteButton.text}\n </Form.Button>\n )}\n {isEdited && (\n <Form.Button\n label={resetButton.label.value}\n disabled={!isEdited}\n Icon={RotateCcw}\n variant={ButtonVariant.OUTLINE}\n color={ButtonColor.TEXT}\n className=\"max-md:w-full\"\n onClick={() => restoreEditedContent(dictionary.key)}\n >\n {resetButton.text}\n </Form.Button>\n )}\n {mode.includes('local') && (\n <Form.Button\n label={downloadButton.label.value}\n disabled={!isEdited || isLoading}\n Icon={Download}\n color={ButtonColor.TEXT}\n variant={\n isAuthenticated ? ButtonVariant.OUTLINE : ButtonVariant.DEFAULT\n }\n className=\"max-md:w-full\"\n isLoading={isWriting}\n onClick={() => setIsFormatAlertModalOpen(true)}\n >\n {downloadButton.text}\n </Form.Button>\n )}\n {mode.includes('remote') && isAuthenticated && !isDistantDictionary && (\n <Form.Button\n label={publishButton.label.value}\n disabled={isLoading}\n Icon={ArrowUpFromLine}\n color={ButtonColor.TEXT}\n className=\"max-md:w-full\"\n isLoading={isPushing}\n onClick={handlePushDictionary}\n >\n {publishButton.text}\n </Form.Button>\n )}\n {mode.includes('remote') &&\n isAuthenticated &&\n isDistantDictionary &&\n isEdited && (\n <Form.Button\n label={saveButton.label.value}\n disabled={!isEdited || isLoading}\n Icon={Save}\n color=\"text\"\n className=\"max-md:w-full\"\n isLoading={isPushing}\n onClick={handlePushDictionary}\n >\n {saveButton.text}\n </Form.Button>\n )}\n </form>\n </>\n );\n};\n"],"names":["useState","useDictionariesRecordActions","useDeleteDictionary","useWriteDictionary","usePushDictionaries","useEditedContent","useIntlayer","useAuth","jsxs","Fragment","jsx","Modal","ModalSize","Form","ButtonColor","ButtonVariant","Save","cn","Trash","RotateCcw","Download","ArrowUpFromLine"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAuCO,MAAM,WAAuC,CAAC;AAAA,EACnD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,CAAC,wBAAwB,yBAAyB,IAAIA,aAAAA,SAAS,KAAK;AAC1E,QAAM,EAAE,oBAAA,IAAwBC,yCAAA;AAChC,QAAM,EAAE,kBAAkB,WAAW,WAAA,IAAeC,uBAAAA,oBAAA;AACpD,QAAM,EAAE,iBAAiB,WAAW,UAAA,IAAcC,uBAAAA,mBAAA;AAClD,QAAM,EAAE,kBAAkB,WAAW,UAAA,IAAcC,uBAAAA,oBAAA;AACnD,QAAM,YAAY,aAAa;AAC/B,QAAM,eACJ,KAAK,SAAS,OAAO,KAAK,WAAW,UAAU,SAAS,OAAO;AAEjE,QAAM,EAAE,eAAe,qBAAA,IAAyBC,6BAAA;AAChD,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA,IACEC,cAAAA,YAAY,yBAAyB;AACzC,QAAM,EAAE,gBAAA,IAAoBC,8BAAA;AAE5B,QAAM,mBAAmB,gBAAgB,WAAW,GAAG;AAEvD,QAAM,WACJ,oBACA,KAAK,UAAU,gBAAgB,MAAM,KAAK,UAAU,UAAU;AAEhE,QAAM,sBACJ,OAAQ,YAAkC,OAAO;AAEnD,QAAM,mCAAmC,YAAY;AACnD,QAAI,CAAC,gBAAgB,WAAW,GAAG,EAAG;AAEtC,UAAM,oBAAoB;AAAA,MACxB,GAAG;AAAA,MACH,GAAG,gBAAgB,WAAW,GAAG;AAAA,IAAA;AAGnC,UAAM,gBAAgB;AAAA,MACpB,YAAY;AAAA,IAAA,CACb,EAAE,KAAK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../../../src/components/DictionaryFieldEditor/SaveForm/SaveForm.tsx"],"sourcesContent":["'use client';\n\nimport type { Dictionary as DistantDictionary } from '@intlayer/backend';\nimport type { Dictionary } from '@intlayer/core';\nimport {\n useDictionariesRecordActions,\n useEditedContent,\n} from '@intlayer/editor-react';\nimport {\n ArrowUpFromLine,\n Download,\n RotateCcw,\n Save,\n Trash,\n} from 'lucide-react';\nimport {\n type DetailedHTMLProps,\n type FC,\n type FormHTMLAttributes,\n useState,\n} from 'react';\nimport { useIntlayer } from 'react-intlayer';\nimport { Modal, ModalSize } from '../../../components/Modal';\nimport {\n useAuth,\n useDeleteDictionary,\n usePushDictionaries,\n useWriteDictionary,\n} from '../../../hooks';\nimport { cn } from '../../../utils/cn';\nimport { ButtonColor, ButtonVariant } from '../../Button';\nimport { Form } from '../../Form';\n\ntype DictionaryDetailsProps = {\n dictionary: Dictionary;\n mode: ('local' | 'remote')[];\n onDelete?: () => void;\n} & DetailedHTMLProps<FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>;\n\nexport const SaveForm: FC<DictionaryDetailsProps> = ({\n dictionary,\n mode,\n className,\n\n onDelete,\n ...props\n}) => {\n const [isFormatAlertModalOpen, setIsFormatAlertModalOpen] = useState(false);\n const { setLocaleDictionary } = useDictionariesRecordActions();\n const { mutate: deleteDictionary, isPending: isDeleting } =\n useDeleteDictionary();\n const { mutate: writeDictionary, isPending: isWriting } =\n useWriteDictionary();\n const { mutate: pushDictionaries, isPending: isPushing } =\n usePushDictionaries();\n const isLoading = isWriting || isPushing;\n\n const { editedContent, restoreEditedContent } = useEditedContent();\n const {\n deleteButton,\n resetButton,\n saveButton,\n publishButton,\n downloadButton,\n confirmation,\n } = useIntlayer('save-dictionary-details');\n const { isAuthenticated } = useAuth();\n\n const editedDictionary = editedContent?.[dictionary.localId!];\n\n const isEdited =\n editedDictionary &&\n JSON.stringify(editedDictionary) !== JSON.stringify(dictionary);\n\n const isDistantDictionary =\n typeof (dictionary as DistantDictionary)?.id !== 'undefined';\n\n const handleSaveDictionaryConfirmation = async () => {\n if (!editedContent?.[dictionary.localId!]) return;\n\n const updatedDictionary = {\n ...dictionary,\n ...editedContent?.[dictionary.localId!],\n };\n\n writeDictionary(\n {\n dictionary: updatedDictionary,\n },\n {\n onSuccess: () => {\n setLocaleDictionary(editedContent?.[dictionary.localId!]);\n restoreEditedContent(dictionary.localId!);\n },\n }\n );\n };\n\n const handlePushDictionary = () => {\n if (!editedContent?.[dictionary.localId!]) return;\n\n const updatedDictionary = {\n ...dictionary,\n ...editedContent?.[dictionary.localId!],\n };\n\n pushDictionaries([updatedDictionary], {\n onSuccess: (res) => {\n if (res) {\n setLocaleDictionary(editedContent?.[dictionary.localId!]);\n restoreEditedContent(dictionary.localId!);\n }\n },\n });\n };\n\n const handleDeleteDictionary = () => {\n if (!(dictionary as DistantDictionary).id) return;\n\n deleteDictionary((dictionary as DistantDictionary).id.toString(), {\n onSuccess: (res) => {\n if (res) {\n onDelete?.();\n }\n },\n });\n };\n\n return (\n <>\n <Modal\n isOpen={isFormatAlertModalOpen}\n title={confirmation.title.value}\n size={ModalSize.MD}\n >\n <form className=\"size-full px-3\">\n <p className=\"text-neutral py-4 text-sm\">{confirmation.message}</p>\n\n <div className=\"mt-12 flex justify-end gap-2 max-md:flex-col\">\n <Form.Button\n label={confirmation.cancelButton.label.value}\n disabled={!isEdited || isLoading}\n color={ButtonColor.TEXT}\n className=\"max-md:w-full\"\n variant={ButtonVariant.OUTLINE}\n onClick={() => setIsFormatAlertModalOpen(false)}\n >\n {confirmation.cancelButton.text}\n </Form.Button>\n <Form.Button\n label={confirmation.confirmButton.label.value}\n disabled={!isEdited || isLoading}\n Icon={Save}\n color={ButtonColor.TEXT}\n className=\"max-md:w-full\"\n isLoading={isPushing}\n onClick={handleSaveDictionaryConfirmation}\n >\n {confirmation.confirmButton.text}\n </Form.Button>\n </div>\n </form>\n </Modal>\n <form\n className={cn('flex justify-end gap-2 max-md:flex-col', className)}\n {...props}\n >\n {mode.includes('remote') &&\n isDistantDictionary &&\n onDelete &&\n isAuthenticated && (\n <Form.Button\n label={deleteButton.label.value}\n Icon={Trash}\n color={ButtonColor.ERROR}\n variant={ButtonVariant.OUTLINE}\n className=\"max-md:w-full\"\n isLoading={isDeleting}\n onClick={handleDeleteDictionary}\n >\n {deleteButton.text}\n </Form.Button>\n )}\n {isEdited && (\n <Form.Button\n label={resetButton.label.value}\n disabled={!isEdited}\n Icon={RotateCcw}\n variant={ButtonVariant.OUTLINE}\n color={ButtonColor.TEXT}\n className=\"max-md:w-full\"\n onClick={() => restoreEditedContent(dictionary.localId!)}\n >\n {resetButton.text}\n </Form.Button>\n )}\n {mode.includes('local') && (\n <Form.Button\n label={downloadButton.label.value}\n disabled={!isEdited || isLoading}\n Icon={Download}\n color={ButtonColor.TEXT}\n variant={\n isAuthenticated ? ButtonVariant.OUTLINE : ButtonVariant.DEFAULT\n }\n className=\"max-md:w-full\"\n isLoading={isWriting}\n onClick={() => setIsFormatAlertModalOpen(true)}\n >\n {downloadButton.text}\n </Form.Button>\n )}\n {mode.includes('remote') && isAuthenticated && !isDistantDictionary && (\n <Form.Button\n label={publishButton.label.value}\n disabled={isLoading}\n Icon={ArrowUpFromLine}\n color={ButtonColor.TEXT}\n className=\"max-md:w-full\"\n isLoading={isPushing}\n onClick={handlePushDictionary}\n >\n {publishButton.text}\n </Form.Button>\n )}\n {mode.includes('remote') &&\n isAuthenticated &&\n isDistantDictionary &&\n isEdited && (\n <Form.Button\n label={saveButton.label.value}\n disabled={!isEdited || isLoading}\n Icon={Save}\n color=\"text\"\n className=\"max-md:w-full\"\n isLoading={isPushing}\n onClick={handlePushDictionary}\n >\n {saveButton.text}\n </Form.Button>\n )}\n </form>\n </>\n );\n};\n"],"names":["useState","useDictionariesRecordActions","useDeleteDictionary","useWriteDictionary","usePushDictionaries","useEditedContent","useIntlayer","useAuth","jsxs","Fragment","jsx","Modal","ModalSize","Form","ButtonColor","ButtonVariant","Save","cn","Trash","RotateCcw","Download","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AL;AAAA,cACC,OAAO,eAAe,MAAM;AAAA,cAC5B,UAAU,CAAC,YAAY;AAAA,cACvB,MAAMO,YAAAA;AAAAA,cACN,OAAON,yBAAAA,YAAY;AAAA,cACnB,SACE,kBAAkBC,yBAAAA,cAAc,UAAUA,yBAAAA,cAAc;AAAA,cAE1D,WAAU;AAAA,cACV,WAAW;AAAA,cACX,SAAS,MAAM,0BAA0B,IAAI;AAAA,cAE5C,UAAA,eAAe;AAAA,YAAA;AAAA,UAAA;AAAA,UAGnB,KAAK,SAAS,QAAQ,KAAK,mBAAmB,CAAC,uBAC9CL,2BAAAA;AAAAA,YAACG,sCAAAA,KAAK;AAAA,YAAL;AAAA,cACC,OAAO,cAAc,MAAM;AAAA,cAC3B,UAAU;AAAA,cACV,MAAMQ,YAAAA;AAAAA,cACN,OAAOP,yBAAAA,YAAY;AAAA,cACnB,WAAU;AAAA,cACV,WAAW;AAAA,cACX,SAAS;AAAA,cAER,UAAA,cAAc;AAAA,YAAA;AAAA,UAAA;AAAA,UAGlB,KAAK,SAAS,QAAQ,KACrB,mBACA,uBACA,YACEJ,2BAAAA;AAAAA,YAACG,sCAAAA,KAAK;AAAA,YAAL;AAAA,cACC,OAAO,WAAW,MAAM;AAAA,cACxB,UAAU,CAAC,YAAY;AAAA,cACvB,MAAMG,YAAAA;AAAAA,cACN,OAAM;AAAA,cACN,WAAU;AAAA,cACV,WAAW;AAAA,cACX,SAAS;AAAA,cAER,UAAA,WAAW;AAAA,YAAA;AAAA,UAAA;AAAA,QACd;AAAA,MAAA;AAAA,IAAA;AAAA,EAEN,GACF;AAEJ;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SaveForm.d.ts","sourceRoot":"","sources":["../../../../src/components/DictionaryFieldEditor/SaveForm/SaveForm.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAYjD,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,EAAE,EACP,KAAK,kBAAkB,EAExB,MAAM,OAAO,CAAC;AAaf,KAAK,sBAAsB,GAAG;IAC5B,UAAU,EAAE,UAAU,CAAC;IACvB,IAAI,EAAE,CAAC,OAAO,GAAG,QAAQ,CAAC,EAAE,CAAC;IAC7B,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB,GAAG,iBAAiB,CAAC,kBAAkB,CAAC,eAAe,CAAC,EAAE,eAAe,CAAC,CAAC;AAE5E,eAAO,MAAM,QAAQ,EAAE,EAAE,CAAC,sBAAsB,
|
|
1
|
+
{"version":3,"file":"SaveForm.d.ts","sourceRoot":"","sources":["../../../../src/components/DictionaryFieldEditor/SaveForm/SaveForm.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAYjD,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,EAAE,EACP,KAAK,kBAAkB,EAExB,MAAM,OAAO,CAAC;AAaf,KAAK,sBAAsB,GAAG;IAC5B,UAAU,EAAE,UAAU,CAAC;IACvB,IAAI,EAAE,CAAC,OAAO,GAAG,QAAQ,CAAC,EAAE,CAAC;IAC7B,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB,GAAG,iBAAiB,CAAC,kBAAkB,CAAC,eAAe,CAAC,EAAE,eAAe,CAAC,CAAC;AAE5E,eAAO,MAAM,QAAQ,EAAE,EAAE,CAAC,sBAAsB,CA6M/C,CAAC"}
|
|
@@ -7,11 +7,10 @@ import { useIntlayer } from "react-intlayer";
|
|
|
7
7
|
import { Modal, ModalSize } from "../../Modal/Modal.mjs";
|
|
8
8
|
import "@intlayer/config/built";
|
|
9
9
|
import "../../../better-auth.CMQ3rA-I-7umXOENE.js";
|
|
10
|
-
import { useDeleteDictionary, useWriteDictionary, usePushDictionaries } from "../../../hooks/
|
|
11
|
-
import "../../../hooks/useAsync/useAsyncStateStore.mjs";
|
|
10
|
+
import { useDeleteDictionary, useWriteDictionary, usePushDictionaries } from "../../../hooks/reactQuery.mjs";
|
|
12
11
|
import { useAuth } from "../../../hooks/useAuth/useAuth.mjs";
|
|
13
12
|
import "@intlayer/api";
|
|
14
|
-
import "
|
|
13
|
+
import "@tanstack/react-query";
|
|
15
14
|
import "../../../hooks/useScrollBlockage/useScrollBlockageStore.mjs";
|
|
16
15
|
import { cn } from "../../../utils/cn.mjs";
|
|
17
16
|
import { ButtonVariant, ButtonColor } from "../../Button/Button.mjs";
|
|
@@ -28,11 +27,10 @@ const SaveForm = ({
|
|
|
28
27
|
}) => {
|
|
29
28
|
const [isFormatAlertModalOpen, setIsFormatAlertModalOpen] = useState(false);
|
|
30
29
|
const { setLocaleDictionary } = useDictionariesRecordActions();
|
|
31
|
-
const { deleteDictionary,
|
|
32
|
-
const { writeDictionary,
|
|
33
|
-
const { pushDictionaries,
|
|
30
|
+
const { mutate: deleteDictionary, isPending: isDeleting } = useDeleteDictionary();
|
|
31
|
+
const { mutate: writeDictionary, isPending: isWriting } = useWriteDictionary();
|
|
32
|
+
const { mutate: pushDictionaries, isPending: isPushing } = usePushDictionaries();
|
|
34
33
|
const isLoading = isWriting || isPushing;
|
|
35
|
-
const isJsonFormat = mode.includes("local") && dictionary.filePath?.endsWith(".json");
|
|
36
34
|
const { editedContent, restoreEditedContent } = useEditedContent();
|
|
37
35
|
const {
|
|
38
36
|
deleteButton,
|
|
@@ -43,42 +41,49 @@ const SaveForm = ({
|
|
|
43
41
|
confirmation
|
|
44
42
|
} = useIntlayer("save-dictionary-details");
|
|
45
43
|
const { isAuthenticated } = useAuth();
|
|
46
|
-
const editedDictionary = editedContent?.[dictionary.
|
|
44
|
+
const editedDictionary = editedContent?.[dictionary.localId];
|
|
47
45
|
const isEdited = editedDictionary && JSON.stringify(editedDictionary) !== JSON.stringify(dictionary);
|
|
48
46
|
const isDistantDictionary = typeof dictionary?.id !== "undefined";
|
|
49
47
|
const handleSaveDictionaryConfirmation = async () => {
|
|
50
|
-
if (!editedContent?.[dictionary.
|
|
48
|
+
if (!editedContent?.[dictionary.localId]) return;
|
|
51
49
|
const updatedDictionary = {
|
|
52
50
|
...dictionary,
|
|
53
|
-
...editedContent?.[dictionary.
|
|
51
|
+
...editedContent?.[dictionary.localId]
|
|
54
52
|
};
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
53
|
+
writeDictionary(
|
|
54
|
+
{
|
|
55
|
+
dictionary: updatedDictionary
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
onSuccess: () => {
|
|
59
|
+
setLocaleDictionary(editedContent?.[dictionary.localId]);
|
|
60
|
+
restoreEditedContent(dictionary.localId);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
);
|
|
61
64
|
};
|
|
62
|
-
const handlePushDictionary =
|
|
63
|
-
if (!editedContent?.[dictionary.
|
|
65
|
+
const handlePushDictionary = () => {
|
|
66
|
+
if (!editedContent?.[dictionary.localId]) return;
|
|
64
67
|
const updatedDictionary = {
|
|
65
68
|
...dictionary,
|
|
66
|
-
...editedContent?.[dictionary.
|
|
69
|
+
...editedContent?.[dictionary.localId]
|
|
67
70
|
};
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
71
|
+
pushDictionaries([updatedDictionary], {
|
|
72
|
+
onSuccess: (res) => {
|
|
73
|
+
if (res) {
|
|
74
|
+
setLocaleDictionary(editedContent?.[dictionary.localId]);
|
|
75
|
+
restoreEditedContent(dictionary.localId);
|
|
76
|
+
}
|
|
72
77
|
}
|
|
73
78
|
});
|
|
74
79
|
};
|
|
75
|
-
const handleDeleteDictionary =
|
|
80
|
+
const handleDeleteDictionary = () => {
|
|
76
81
|
if (!dictionary.id) return;
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
+
deleteDictionary(dictionary.id.toString(), {
|
|
83
|
+
onSuccess: (res) => {
|
|
84
|
+
if (res) {
|
|
85
|
+
onDelete?.();
|
|
86
|
+
}
|
|
82
87
|
}
|
|
83
88
|
});
|
|
84
89
|
};
|
|
@@ -90,7 +95,7 @@ const SaveForm = ({
|
|
|
90
95
|
title: confirmation.title.value,
|
|
91
96
|
size: ModalSize.MD,
|
|
92
97
|
children: /* @__PURE__ */ jsxs("form", { className: "size-full px-3", children: [
|
|
93
|
-
|
|
98
|
+
/* @__PURE__ */ jsx("p", { className: "text-neutral py-4 text-sm", children: confirmation.message }),
|
|
94
99
|
/* @__PURE__ */ jsxs("div", { className: "mt-12 flex justify-end gap-2 max-md:flex-col", children: [
|
|
95
100
|
/* @__PURE__ */ jsx(
|
|
96
101
|
Form.Button,
|
|
@@ -149,7 +154,7 @@ const SaveForm = ({
|
|
|
149
154
|
variant: ButtonVariant.OUTLINE,
|
|
150
155
|
color: ButtonColor.TEXT,
|
|
151
156
|
className: "max-md:w-full",
|
|
152
|
-
onClick: () => restoreEditedContent(dictionary.
|
|
157
|
+
onClick: () => restoreEditedContent(dictionary.localId),
|
|
153
158
|
children: resetButton.text
|
|
154
159
|
}
|
|
155
160
|
),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SaveForm.mjs","sources":["../../../../src/components/DictionaryFieldEditor/SaveForm/SaveForm.tsx"],"sourcesContent":["'use client';\n\nimport type { Dictionary as DistantDictionary } from '@intlayer/backend';\nimport type { Dictionary } from '@intlayer/core';\nimport {\n useDictionariesRecordActions,\n useEditedContent,\n} from '@intlayer/editor-react';\nimport {\n ArrowUpFromLine,\n Download,\n RotateCcw,\n Save,\n Trash,\n} from 'lucide-react';\nimport {\n type DetailedHTMLProps,\n type FC,\n type FormHTMLAttributes,\n useState,\n} from 'react';\nimport { useIntlayer } from 'react-intlayer';\nimport { Modal, ModalSize } from '../../../components/Modal';\nimport {\n useAuth,\n useDeleteDictionary,\n usePushDictionaries,\n useWriteDictionary,\n} from '../../../hooks';\nimport { cn } from '../../../utils/cn';\nimport { ButtonColor, ButtonVariant } from '../../Button';\nimport { Form } from '../../Form';\n\ntype DictionaryDetailsProps = {\n dictionary: Dictionary;\n mode: ('local' | 'remote')[];\n onDelete?: () => void;\n} & DetailedHTMLProps<FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>;\n\nexport const SaveForm: FC<DictionaryDetailsProps> = ({\n dictionary,\n mode,\n className,\n onDelete,\n ...props\n}) => {\n const [isFormatAlertModalOpen, setIsFormatAlertModalOpen] = useState(false);\n const { setLocaleDictionary } = useDictionariesRecordActions();\n const { deleteDictionary, isLoading: isDeleting } = useDeleteDictionary();\n const { writeDictionary, isLoading: isWriting } = useWriteDictionary();\n const { pushDictionaries, isLoading: isPushing } = usePushDictionaries();\n const isLoading = isWriting || isPushing;\n const isJsonFormat =\n mode.includes('local') && dictionary.filePath?.endsWith('.json');\n\n const { editedContent, restoreEditedContent } = useEditedContent();\n const {\n deleteButton,\n resetButton,\n saveButton,\n publishButton,\n downloadButton,\n confirmation,\n } = useIntlayer('save-dictionary-details');\n const { isAuthenticated } = useAuth();\n\n const editedDictionary = editedContent?.[dictionary.key];\n\n const isEdited =\n editedDictionary &&\n JSON.stringify(editedDictionary) !== JSON.stringify(dictionary);\n\n const isDistantDictionary =\n typeof (dictionary as DistantDictionary)?.id !== 'undefined';\n\n const handleSaveDictionaryConfirmation = async () => {\n if (!editedContent?.[dictionary.key]) return;\n\n const updatedDictionary = {\n ...dictionary,\n ...editedContent?.[dictionary.key],\n };\n\n await writeDictionary({\n dictionary: updatedDictionary,\n }).then(() => {\n setLocaleDictionary(editedContent?.[dictionary.key]);\n restoreEditedContent(dictionary.key);\n });\n };\n\n const handlePushDictionary = async () => {\n if (!editedContent?.[dictionary.key]) return;\n\n const updatedDictionary = {\n ...dictionary,\n ...editedContent?.[dictionary.key],\n };\n\n await pushDictionaries([updatedDictionary]).then((res) => {\n if (res) {\n setLocaleDictionary(editedContent?.[dictionary.key]);\n restoreEditedContent(dictionary.key);\n }\n });\n };\n\n const handleDeleteDictionary = async () => {\n if (!(dictionary as DistantDictionary).id) return;\n\n await deleteDictionary(\n (dictionary as DistantDictionary).id.toString()\n ).then((res) => {\n if (res) {\n onDelete?.();\n }\n });\n };\n\n return (\n <>\n <Modal\n isOpen={isFormatAlertModalOpen}\n title={confirmation.title.value}\n size={ModalSize.MD}\n >\n <form className=\"size-full px-3\">\n {isJsonFormat ? (\n <p className=\"text-neutral py-4 text-sm\">{confirmation.message}</p>\n ) : (\n <p className=\"text-neutral py-4 text-sm\">\n {confirmation.differentFormatMessage}\n </p>\n )}\n <div className=\"mt-12 flex justify-end gap-2 max-md:flex-col\">\n <Form.Button\n label={confirmation.cancelButton.label.value}\n disabled={!isEdited || isLoading}\n color={ButtonColor.TEXT}\n className=\"max-md:w-full\"\n variant={ButtonVariant.OUTLINE}\n onClick={() => setIsFormatAlertModalOpen(false)}\n >\n {confirmation.cancelButton.text}\n </Form.Button>\n <Form.Button\n label={confirmation.confirmButton.label.value}\n disabled={!isEdited || isLoading}\n Icon={Save}\n color={ButtonColor.TEXT}\n className=\"max-md:w-full\"\n isLoading={isPushing}\n onClick={handleSaveDictionaryConfirmation}\n >\n {confirmation.confirmButton.text}\n </Form.Button>\n </div>\n </form>\n </Modal>\n <form\n className={cn('flex justify-end gap-2 max-md:flex-col', className)}\n {...props}\n >\n {mode.includes('remote') &&\n isDistantDictionary &&\n onDelete &&\n isAuthenticated && (\n <Form.Button\n label={deleteButton.label.value}\n Icon={Trash}\n color={ButtonColor.ERROR}\n variant={ButtonVariant.OUTLINE}\n className=\"max-md:w-full\"\n isLoading={isDeleting}\n onClick={handleDeleteDictionary}\n >\n {deleteButton.text}\n </Form.Button>\n )}\n {isEdited && (\n <Form.Button\n label={resetButton.label.value}\n disabled={!isEdited}\n Icon={RotateCcw}\n variant={ButtonVariant.OUTLINE}\n color={ButtonColor.TEXT}\n className=\"max-md:w-full\"\n onClick={() => restoreEditedContent(dictionary.key)}\n >\n {resetButton.text}\n </Form.Button>\n )}\n {mode.includes('local') && (\n <Form.Button\n label={downloadButton.label.value}\n disabled={!isEdited || isLoading}\n Icon={Download}\n color={ButtonColor.TEXT}\n variant={\n isAuthenticated ? ButtonVariant.OUTLINE : ButtonVariant.DEFAULT\n }\n className=\"max-md:w-full\"\n isLoading={isWriting}\n onClick={() => setIsFormatAlertModalOpen(true)}\n >\n {downloadButton.text}\n </Form.Button>\n )}\n {mode.includes('remote') && isAuthenticated && !isDistantDictionary && (\n <Form.Button\n label={publishButton.label.value}\n disabled={isLoading}\n Icon={ArrowUpFromLine}\n color={ButtonColor.TEXT}\n className=\"max-md:w-full\"\n isLoading={isPushing}\n onClick={handlePushDictionary}\n >\n {publishButton.text}\n </Form.Button>\n )}\n {mode.includes('remote') &&\n isAuthenticated &&\n isDistantDictionary &&\n isEdited && (\n <Form.Button\n label={saveButton.label.value}\n disabled={!isEdited || isLoading}\n Icon={Save}\n color=\"text\"\n className=\"max-md:w-full\"\n isLoading={isPushing}\n onClick={handlePushDictionary}\n >\n {saveButton.text}\n </Form.Button>\n )}\n </form>\n </>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAuCO,MAAM,WAAuC,CAAC;AAAA,EACnD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,CAAC,wBAAwB,yBAAyB,IAAI,SAAS,KAAK;AAC1E,QAAM,EAAE,oBAAA,IAAwB,6BAAA;AAChC,QAAM,EAAE,kBAAkB,WAAW,WAAA,IAAe,oBAAA;AACpD,QAAM,EAAE,iBAAiB,WAAW,UAAA,IAAc,mBAAA;AAClD,QAAM,EAAE,kBAAkB,WAAW,UAAA,IAAc,oBAAA;AACnD,QAAM,YAAY,aAAa;AAC/B,QAAM,eACJ,KAAK,SAAS,OAAO,KAAK,WAAW,UAAU,SAAS,OAAO;AAEjE,QAAM,EAAE,eAAe,qBAAA,IAAyB,iBAAA;AAChD,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;A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,EAEN,GACF;AAEJ;"}
|
|
1
|
+
{"version":3,"file":"SaveForm.mjs","sources":["../../../../src/components/DictionaryFieldEditor/SaveForm/SaveForm.tsx"],"sourcesContent":["'use client';\n\nimport type { Dictionary as DistantDictionary } from '@intlayer/backend';\nimport type { Dictionary } from '@intlayer/core';\nimport {\n useDictionariesRecordActions,\n useEditedContent,\n} from '@intlayer/editor-react';\nimport {\n ArrowUpFromLine,\n Download,\n RotateCcw,\n Save,\n Trash,\n} from 'lucide-react';\nimport {\n type DetailedHTMLProps,\n type FC,\n type FormHTMLAttributes,\n useState,\n} from 'react';\nimport { useIntlayer } from 'react-intlayer';\nimport { Modal, ModalSize } from '../../../components/Modal';\nimport {\n useAuth,\n useDeleteDictionary,\n usePushDictionaries,\n useWriteDictionary,\n} from '../../../hooks';\nimport { cn } from '../../../utils/cn';\nimport { ButtonColor, ButtonVariant } from '../../Button';\nimport { Form } from '../../Form';\n\ntype DictionaryDetailsProps = {\n dictionary: Dictionary;\n mode: ('local' | 'remote')[];\n onDelete?: () => void;\n} & DetailedHTMLProps<FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>;\n\nexport const SaveForm: FC<DictionaryDetailsProps> = ({\n dictionary,\n mode,\n className,\n\n onDelete,\n ...props\n}) => {\n const [isFormatAlertModalOpen, setIsFormatAlertModalOpen] = useState(false);\n const { setLocaleDictionary } = useDictionariesRecordActions();\n const { mutate: deleteDictionary, isPending: isDeleting } =\n useDeleteDictionary();\n const { mutate: writeDictionary, isPending: isWriting } =\n useWriteDictionary();\n const { mutate: pushDictionaries, isPending: isPushing } =\n usePushDictionaries();\n const isLoading = isWriting || isPushing;\n\n const { editedContent, restoreEditedContent } = useEditedContent();\n const {\n deleteButton,\n resetButton,\n saveButton,\n publishButton,\n downloadButton,\n confirmation,\n } = useIntlayer('save-dictionary-details');\n const { isAuthenticated } = useAuth();\n\n const editedDictionary = editedContent?.[dictionary.localId!];\n\n const isEdited =\n editedDictionary &&\n JSON.stringify(editedDictionary) !== JSON.stringify(dictionary);\n\n const isDistantDictionary =\n typeof (dictionary as DistantDictionary)?.id !== 'undefined';\n\n const handleSaveDictionaryConfirmation = async () => {\n if (!editedContent?.[dictionary.localId!]) return;\n\n const updatedDictionary = {\n ...dictionary,\n ...editedContent?.[dictionary.localId!],\n };\n\n writeDictionary(\n {\n dictionary: updatedDictionary,\n },\n {\n onSuccess: () => {\n setLocaleDictionary(editedContent?.[dictionary.localId!]);\n restoreEditedContent(dictionary.localId!);\n },\n }\n );\n };\n\n const handlePushDictionary = () => {\n if (!editedContent?.[dictionary.localId!]) return;\n\n const updatedDictionary = {\n ...dictionary,\n ...editedContent?.[dictionary.localId!],\n };\n\n pushDictionaries([updatedDictionary], {\n onSuccess: (res) => {\n if (res) {\n setLocaleDictionary(editedContent?.[dictionary.localId!]);\n restoreEditedContent(dictionary.localId!);\n }\n },\n });\n };\n\n const handleDeleteDictionary = () => {\n if (!(dictionary as DistantDictionary).id) return;\n\n deleteDictionary((dictionary as DistantDictionary).id.toString(), {\n onSuccess: (res) => {\n if (res) {\n onDelete?.();\n }\n },\n });\n };\n\n return (\n <>\n <Modal\n isOpen={isFormatAlertModalOpen}\n title={confirmation.title.value}\n size={ModalSize.MD}\n >\n <form className=\"size-full px-3\">\n <p className=\"text-neutral py-4 text-sm\">{confirmation.message}</p>\n\n <div className=\"mt-12 flex justify-end gap-2 max-md:flex-col\">\n <Form.Button\n label={confirmation.cancelButton.label.value}\n disabled={!isEdited || isLoading}\n color={ButtonColor.TEXT}\n className=\"max-md:w-full\"\n variant={ButtonVariant.OUTLINE}\n onClick={() => setIsFormatAlertModalOpen(false)}\n >\n {confirmation.cancelButton.text}\n </Form.Button>\n <Form.Button\n label={confirmation.confirmButton.label.value}\n disabled={!isEdited || isLoading}\n Icon={Save}\n color={ButtonColor.TEXT}\n className=\"max-md:w-full\"\n isLoading={isPushing}\n onClick={handleSaveDictionaryConfirmation}\n >\n {confirmation.confirmButton.text}\n </Form.Button>\n </div>\n </form>\n </Modal>\n <form\n className={cn('flex justify-end gap-2 max-md:flex-col', className)}\n {...props}\n >\n {mode.includes('remote') &&\n isDistantDictionary &&\n onDelete &&\n isAuthenticated && (\n <Form.Button\n label={deleteButton.label.value}\n Icon={Trash}\n color={ButtonColor.ERROR}\n variant={ButtonVariant.OUTLINE}\n className=\"max-md:w-full\"\n isLoading={isDeleting}\n onClick={handleDeleteDictionary}\n >\n {deleteButton.text}\n </Form.Button>\n )}\n {isEdited && (\n <Form.Button\n label={resetButton.label.value}\n disabled={!isEdited}\n Icon={RotateCcw}\n variant={ButtonVariant.OUTLINE}\n color={ButtonColor.TEXT}\n className=\"max-md:w-full\"\n onClick={() => restoreEditedContent(dictionary.localId!)}\n >\n {resetButton.text}\n </Form.Button>\n )}\n {mode.includes('local') && (\n <Form.Button\n label={downloadButton.label.value}\n disabled={!isEdited || isLoading}\n Icon={Download}\n color={ButtonColor.TEXT}\n variant={\n isAuthenticated ? ButtonVariant.OUTLINE : ButtonVariant.DEFAULT\n }\n className=\"max-md:w-full\"\n isLoading={isWriting}\n onClick={() => setIsFormatAlertModalOpen(true)}\n >\n {downloadButton.text}\n </Form.Button>\n )}\n {mode.includes('remote') && isAuthenticated && !isDistantDictionary && (\n <Form.Button\n label={publishButton.label.value}\n disabled={isLoading}\n Icon={ArrowUpFromLine}\n color={ButtonColor.TEXT}\n className=\"max-md:w-full\"\n isLoading={isPushing}\n onClick={handlePushDictionary}\n >\n {publishButton.text}\n </Form.Button>\n )}\n {mode.includes('remote') &&\n isAuthenticated &&\n isDistantDictionary &&\n isEdited && (\n <Form.Button\n label={saveButton.label.value}\n disabled={!isEdited || isLoading}\n Icon={Save}\n color=\"text\"\n className=\"max-md:w-full\"\n isLoading={isPushing}\n onClick={handlePushDictionary}\n >\n {saveButton.text}\n </Form.Button>\n )}\n </form>\n </>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAuCO,MAAM,WAAuC,CAAC;AAAA,EACnD;AAAA,EACA;AAAA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AA,cACN,OAAO,YAAY;AAAA,cACnB,WAAU;AAAA,cACV,WAAW;AAAA,cACX,SAAS;AAAA,cAER,UAAA,cAAc;AAAA,YAAA;AAAA,UAAA;AAAA,UAGlB,KAAK,SAAS,QAAQ,KACrB,mBACA,uBACA,YACE;AAAA,YAAC,KAAK;AAAA,YAAL;AAAA,cACC,OAAO,WAAW,MAAM;AAAA,cACxB,UAAU,CAAC,YAAY;AAAA,cACvB,MAAM;AAAA,cACN,OAAM;AAAA,cACN,WAAU;AAAA,cACV,WAAW;AAAA,cACX,SAAS;AAAA,cAER,UAAA,WAAW;AAAA,YAAA;AAAA,UAAA;AAAA,QACd;AAAA,MAAA;AAAA,IAAA;AAAA,EAEN,GACF;AAEJ;"}
|
|
@@ -18,7 +18,8 @@ const saveDictionaryContent = {
|
|
|
18
18
|
pt: "Excluir dicionário",
|
|
19
19
|
hi: "शब्दकोश हटाएं",
|
|
20
20
|
ar: "حذف القاموس",
|
|
21
|
-
ru: "Удалить словарь"
|
|
21
|
+
ru: "Удалить словарь",
|
|
22
|
+
tr: "Sözlüğü sil"
|
|
22
23
|
}),
|
|
23
24
|
label: intlayer.t({
|
|
24
25
|
en: "Click to delete dictionary",
|
|
@@ -33,7 +34,8 @@ const saveDictionaryContent = {
|
|
|
33
34
|
pt: "Clique para excluir o dicionário",
|
|
34
35
|
hi: "शब्दकोश हटाने के लिए क्लिक करें",
|
|
35
36
|
ar: "انقر لحذف القاموس",
|
|
36
|
-
ru: "Нажмите, чтобы удалить словарь"
|
|
37
|
+
ru: "Нажмите, чтобы удалить словарь",
|
|
38
|
+
tr: "Sözlüğü silmek için tıklayın"
|
|
37
39
|
})
|
|
38
40
|
},
|
|
39
41
|
resetButton: {
|
|
@@ -50,7 +52,8 @@ const saveDictionaryContent = {
|
|
|
50
52
|
pt: "Redefinir todas as alterações",
|
|
51
53
|
hi: "सभी परिवर्तनों को रीसेट करें",
|
|
52
54
|
ar: "إعادة تعيين جميع التغييرات",
|
|
53
|
-
ru: "Сбросить все изменения"
|
|
55
|
+
ru: "Сбросить все изменения",
|
|
56
|
+
tr: "Tüm değişiklikleri sıfırla"
|
|
54
57
|
}),
|
|
55
58
|
label: intlayer.t({
|
|
56
59
|
en: "Click to reset all the changes",
|
|
@@ -65,7 +68,8 @@ const saveDictionaryContent = {
|
|
|
65
68
|
pt: "Clique para redefinir todas as alterações",
|
|
66
69
|
hi: "सभी परिवर्तनों को रीसेट करने के लिए क्लिक करें",
|
|
67
70
|
ar: "انقر لإعادة تعيين جميع التغييرات",
|
|
68
|
-
ru: "Нажмите, чтобы сбросить все изменения"
|
|
71
|
+
ru: "Нажмите, чтобы сбросить все изменения",
|
|
72
|
+
tr: "Tüm değişiklikleri sıfırlamak için tıklayın"
|
|
69
73
|
})
|
|
70
74
|
},
|
|
71
75
|
saveButton: {
|
|
@@ -82,7 +86,8 @@ const saveDictionaryContent = {
|
|
|
82
86
|
pt: "Salvar alterações",
|
|
83
87
|
hi: "परिवर्तनों को सहेजें",
|
|
84
88
|
ar: "احفظ التغييرات",
|
|
85
|
-
ru: "Сохранить изменения"
|
|
89
|
+
ru: "Сохранить изменения",
|
|
90
|
+
tr: "Değişiklikleri kaydet"
|
|
86
91
|
}),
|
|
87
92
|
label: intlayer.t({
|
|
88
93
|
en: "Click to save changes",
|
|
@@ -97,7 +102,8 @@ const saveDictionaryContent = {
|
|
|
97
102
|
pt: "Clique para salvar alterações",
|
|
98
103
|
hi: "परिवर्तनों को सहेजने के लिए क्लिक करें",
|
|
99
104
|
ar: "انقر لحفظ التغييرات",
|
|
100
|
-
ru: "Нажмите, чтобы сохранить изменения"
|
|
105
|
+
ru: "Нажмите, чтобы сохранить изменения",
|
|
106
|
+
tr: "Değişiklikleri kaydetmek için tıklayın"
|
|
101
107
|
})
|
|
102
108
|
},
|
|
103
109
|
publishButton: {
|
|
@@ -114,7 +120,8 @@ const saveDictionaryContent = {
|
|
|
114
120
|
pt: "Publicar dicionário",
|
|
115
121
|
hi: "शब्दकोश प्रकाशित करें",
|
|
116
122
|
ar: "نشر القاموس",
|
|
117
|
-
ru: "Опубликовать словарь"
|
|
123
|
+
ru: "Опубликовать словарь",
|
|
124
|
+
tr: "Sözlüğü yayınla"
|
|
118
125
|
}),
|
|
119
126
|
label: intlayer.t({
|
|
120
127
|
en: "Click to publish dictionary",
|
|
@@ -129,7 +136,8 @@ const saveDictionaryContent = {
|
|
|
129
136
|
pt: "Clique para publicar dicionário",
|
|
130
137
|
hi: "शब्दकोश प्रकाशित करने के लिए क्लिक करें",
|
|
131
138
|
ar: "انقر لنشر القاموس",
|
|
132
|
-
ru: "Нажмите, чтобы опубликовать словарь"
|
|
139
|
+
ru: "Нажмите, чтобы опубликовать словарь",
|
|
140
|
+
tr: "Sözlüğü yayınlamak için tıklayın"
|
|
133
141
|
})
|
|
134
142
|
},
|
|
135
143
|
downloadButton: {
|
|
@@ -146,7 +154,8 @@ const saveDictionaryContent = {
|
|
|
146
154
|
pt: "Baixar",
|
|
147
155
|
hi: "डाउनलोड",
|
|
148
156
|
ar: "تنزيل",
|
|
149
|
-
ru: "Скачать"
|
|
157
|
+
ru: "Скачать",
|
|
158
|
+
tr: "İndir"
|
|
150
159
|
}),
|
|
151
160
|
label: intlayer.t({
|
|
152
161
|
en: "Click to download",
|
|
@@ -161,7 +170,8 @@ const saveDictionaryContent = {
|
|
|
161
170
|
pt: "Clique para baixar",
|
|
162
171
|
hi: "डाउनलोड करने के लिए क्लिक करें",
|
|
163
172
|
ar: "انقر لتنزيل",
|
|
164
|
-
ru: "Нажмите, чтобы скачать"
|
|
173
|
+
ru: "Нажмите, чтобы скачать",
|
|
174
|
+
tr: "İndirmek için tıklayın"
|
|
165
175
|
})
|
|
166
176
|
},
|
|
167
177
|
confirmation: {
|
|
@@ -178,7 +188,8 @@ const saveDictionaryContent = {
|
|
|
178
188
|
pt: "Confirmação",
|
|
179
189
|
hi: "पुष्टि करें",
|
|
180
190
|
ar: "تأكيد",
|
|
181
|
-
ru: "Подтверждение"
|
|
191
|
+
ru: "Подтверждение",
|
|
192
|
+
tr: "Onay"
|
|
182
193
|
}),
|
|
183
194
|
message: intlayer.t({
|
|
184
195
|
en: "This will overwrite the existing dictionary. Are you sure you want to continue?",
|
|
@@ -193,19 +204,8 @@ const saveDictionaryContent = {
|
|
|
193
204
|
pt: "Isso sobrescreverá o dicionário existente. Você tem certeza de que deseja continuar?",
|
|
194
205
|
hi: "यह मौजूदा शब्दकोश को ओवरराइट करने जारी है। आप क्या आप जारी रखना चाहते हैं?",
|
|
195
206
|
ar: "سيتم الكتابة على القاموس الحالي. هل أنت متأكد من أنك تريد المتابعة؟",
|
|
196
|
-
ru: "Это перезапишет существующий словарь. Вы уверены, что хотите продолжить?"
|
|
197
|
-
|
|
198
|
-
differentFormatMessage: intlayer.t({
|
|
199
|
-
en: "The dictionary is in a different format, it will be transformed into a JSON file. Are you sure you want to continue? This will overwrite the existing dictionary.",
|
|
200
|
-
"en-GB": "The dictionary is in a different format, it will be transformed into a JSON file. Are you sure you want to continue? This will overwrite the existing dictionary.",
|
|
201
|
-
fr: "Le dictionnaire est dans un format différent, il sera transformé en un fichier JSON. Êtes-vous sûr de vouloir continuer ? Cela remplacera le dictionnaire existant.",
|
|
202
|
-
es: "El diccionario está en un formato diferente, se transformará en un archivo JSON. ¿Estás seguro de que quieres continuar? Esto sobrescribirá el diccionario existente.",
|
|
203
|
-
de: "Das Wörterbuch ist in einem anderen Format, es wird in eine JSON-Datei umgewandelt. Sind Sie sicher, dass Sie fortfahren möchten? Dies wird das existierende Wörterbuch überschreiben.",
|
|
204
|
-
ja: "辞書は異なる形式です。JSONファイルに変換されます。続行しますか?既存の辞書を上書きします。",
|
|
205
|
-
ko: "사전은 다른 형식입니다. JSON 파일로 변환됩니다. 계속하시겠습니까? 이는 기존 사전을 덮어 쓸 것입니다.",
|
|
206
|
-
zh: "字典是在不同格式中,它将转换为JSON文件。你确定要继续吗?这将覆盖现有的字典。",
|
|
207
|
-
it: "Il dizionario è in un formato diverso, verrà trasformato in un file JSON. Sei sicuro di voler continuare? Questo sovrascriverà il dizionario esistente.",
|
|
208
|
-
pt: "O dicionário está em um formato diferente, ele será transformado em um arquivo JSON. Você tem certeza de que deseja continuar? Isso sobrescreverá o dicionário existente."
|
|
207
|
+
ru: "Это перезапишет существующий словарь. Вы уверены, что хотите продолжить?",
|
|
208
|
+
tr: "Bu, mevcut sözlüğün üzerine yazacaktır. Devam etmek istediğinizden emin misiniz?"
|
|
209
209
|
}),
|
|
210
210
|
confirmButton: {
|
|
211
211
|
text: intlayer.t({
|
|
@@ -221,7 +221,8 @@ const saveDictionaryContent = {
|
|
|
221
221
|
pt: "Confirmar",
|
|
222
222
|
hi: "पुष्टि करें",
|
|
223
223
|
ar: "تأكيد",
|
|
224
|
-
ru: "Подтвердить"
|
|
224
|
+
ru: "Подтвердить",
|
|
225
|
+
tr: "Onayla"
|
|
225
226
|
}),
|
|
226
227
|
label: intlayer.t({
|
|
227
228
|
en: "Click to confirm",
|
|
@@ -236,7 +237,8 @@ const saveDictionaryContent = {
|
|
|
236
237
|
pt: "Clique para confirmar",
|
|
237
238
|
hi: "पुष्टि करने के लिए क्लिक करें",
|
|
238
239
|
ar: "انقر لتأكيد",
|
|
239
|
-
ru: "Нажмите, чтобы подтвердить"
|
|
240
|
+
ru: "Нажмите, чтобы подтвердить",
|
|
241
|
+
tr: "Onaylamak için tıklayın"
|
|
240
242
|
})
|
|
241
243
|
},
|
|
242
244
|
cancelButton: {
|
|
@@ -253,7 +255,8 @@ const saveDictionaryContent = {
|
|
|
253
255
|
pt: "Cancelar",
|
|
254
256
|
hi: "रद्द करें",
|
|
255
257
|
ar: "إلغاء",
|
|
256
|
-
ru: "Отмена"
|
|
258
|
+
ru: "Отмена",
|
|
259
|
+
tr: "İptal"
|
|
257
260
|
}),
|
|
258
261
|
label: intlayer.t({
|
|
259
262
|
en: "Click to cancel",
|
|
@@ -268,7 +271,8 @@ const saveDictionaryContent = {
|
|
|
268
271
|
pt: "Clique para cancelar",
|
|
269
272
|
hi: "रद्द करने के लिए क्लिक करें",
|
|
270
273
|
ar: "انقر لإلغاء",
|
|
271
|
-
ru: "Нажмите, чтобы отменить"
|
|
274
|
+
ru: "Нажмите, чтобы отменить",
|
|
275
|
+
tr: "İptal etmek için tıklayın"
|
|
272
276
|
})
|
|
273
277
|
}
|
|
274
278
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"saveForm.content.cjs","sources":["../../../../src/components/DictionaryFieldEditor/SaveForm/saveForm.content.tsx"],"sourcesContent":["import { t, type Dictionary } from 'intlayer';\n\nexport const saveDictionaryContent = {\n key: 'save-dictionary-details',\n content: {\n deleteButton: {\n text: t({\n en: 'Delete dictionary',\n 'en-GB': 'Delete dictionary',\n fr: 'Supprimer le dictionnaire',\n es: 'Eliminar diccionario',\n de: 'Wörterbuch löschen',\n ja: '辞書を削除',\n ko: '사전 삭제',\n zh: '删除字典',\n it: 'Elimina dizionario',\n pt: 'Excluir dicionário',\n hi: 'शब्दकोश हटाएं',\n ar: 'حذف القاموس',\n ru: 'Удалить словарь',\n }),\n label: t({\n en: 'Click to delete dictionary',\n 'en-GB': 'Click to delete dictionary',\n fr: 'Cliquez pour supprimer le dictionnaire',\n es: 'Haga clic para eliminar el diccionario',\n de: 'Klicken Sie, um das Wörterbuch zu löschen',\n ja: '辞書を削除するにはクリックしてください',\n ko: '사전을 삭제하려면 클릭하세요',\n zh: '单击以删除字典',\n it: 'Fai clic per eliminare il dizionario',\n pt: 'Clique para excluir o dicionário',\n hi: 'शब्दकोश हटाने के लिए क्लिक करें',\n ar: 'انقر لحذف القاموس',\n ru: 'Нажмите, чтобы удалить словарь',\n }),\n },\n resetButton: {\n text: t({\n en: 'Reset all changes',\n 'en-GB': 'Reset all changes',\n fr: 'Réinitialiser toutes les modifications',\n es: 'Restablecer todas las modificaciones',\n de: 'Alle Änderungen zurücksetzen',\n ja: 'すべての変更をリセット',\n ko: '모든 변경 사항 초기화',\n zh: '重置所有更改',\n it: 'Reimposta tutte le modifiche',\n pt: 'Redefinir todas as alterações',\n hi: 'सभी परिवर्तनों को रीसेट करें',\n ar: 'إعادة تعيين جميع التغييرات',\n ru: 'Сбросить все изменения',\n }),\n label: t({\n en: 'Click to reset all the changes',\n 'en-GB': 'Click to reset all the changes',\n fr: 'Cliquez pour réinitialiser toutes les modifications',\n es: 'Haga clic para restablecer todas las modificaciones',\n de: 'Klicken Sie, um alle Änderungen zurückzusetzen',\n ja: 'すべての変更をリセットするにはクリックしてください',\n ko: '모든 변경 사항을 초기화하려면 클릭하세요',\n zh: '单击以重置所有更改',\n it: 'Fai clic per ripristinare tutte le modifiche',\n pt: 'Clique para redefinir todas as alterações',\n hi: 'सभी परिवर्तनों को रीसेट करने के लिए क्लिक करें',\n ar: 'انقر لإعادة تعيين جميع التغييرات',\n ru: 'Нажмите, чтобы сбросить все изменения',\n }),\n },\n saveButton: {\n text: t({\n en: 'Save changes',\n 'en-GB': 'Save changes',\n fr: 'Enregistrer les modifications',\n es: 'Guardar cambios',\n de: 'Änderungen speichern',\n ja: '変更を保存',\n ko: '변경 사항 저장',\n zh: '保存更改',\n it: 'Salva le modifiche',\n pt: 'Salvar alterações',\n hi: 'परिवर्तनों को सहेजें',\n ar: 'احفظ التغييرات',\n ru: 'Сохранить изменения',\n }),\n label: t({\n en: 'Click to save changes',\n 'en-GB': 'Click to save changes',\n fr: 'Cliquez pour enregistrer les modifications',\n es: 'Haga clic para guardar cambios',\n de: 'Klicken Sie, um Änderungen zu speichern',\n ja: '変更を保存するにはクリックしてください',\n ko: '변경 사항을 저장하려면 클릭하세요',\n zh: '单击保存更改',\n it: 'Fai clic per salvare le modifiche',\n pt: 'Clique para salvar alterações',\n hi: 'परिवर्तनों को सहेजने के लिए क्लिक करें',\n ar: 'انقر لحفظ التغييرات',\n ru: 'Нажмите, чтобы сохранить изменения',\n }),\n },\n publishButton: {\n text: t({\n en: 'Publish dictionary',\n 'en-GB': 'Publish dictionary',\n fr: 'Publier dictionnaire',\n es: 'Publicar diccionario',\n de: 'Wörterbuch veröffentlichen',\n ja: '辞書を公開',\n ko: '사전을 게시합니다',\n zh: '发布字典',\n it: 'Pubblica dizionario',\n pt: 'Publicar dicionário',\n hi: 'शब्दकोश प्रकाशित करें',\n ar: 'نشر القاموس',\n ru: 'Опубликовать словарь',\n }),\n label: t({\n en: 'Click to publish dictionary',\n 'en-GB': 'Click to publish dictionary',\n fr: 'Cliquez pour publier dictionnaire',\n es: 'Haga clic para publicar diccionario',\n de: 'Klicken Sie, um das Wörterbuch zu veröffentlichen',\n ja: '辞書を公開するにはクリックしてください',\n ko: '사전을 게시하려면 클릭하세요',\n zh: '单击以发布字典',\n it: 'Fai clic per pubblicare il dizionario',\n pt: 'Clique para publicar dicionário',\n hi: 'शब्दकोश प्रकाशित करने के लिए क्लिक करें',\n ar: 'انقر لنشر القاموس',\n ru: 'Нажмите, чтобы опубликовать словарь',\n }),\n },\n downloadButton: {\n text: t({\n en: 'Download',\n 'en-GB': 'Download',\n fr: 'Télécharger',\n es: 'Descargar',\n de: 'Herunterladen',\n ja: 'ダウンロード',\n ko: '다운로드',\n zh: '下载',\n it: 'Scarica',\n pt: 'Baixar',\n hi: 'डाउनलोड',\n ar: 'تنزيل',\n ru: 'Скачать',\n }),\n label: t({\n en: 'Click to download',\n 'en-GB': 'Click to download',\n fr: 'Cliquez pour télécharger',\n es: 'Haga clic para descargar',\n de: 'Klicken Sie, um herunterzuladen',\n ja: 'ダウンロードするにはクリックしてください',\n ko: '다운로드를 클릭하세요',\n zh: '单击下载',\n it: 'Fai clic per scaricare',\n pt: 'Clique para baixar',\n hi: 'डाउनलोड करने के लिए क्लिक करें',\n ar: 'انقر لتنزيل',\n ru: 'Нажмите, чтобы скачать',\n }),\n },\n\n confirmation: {\n title: t({\n en: 'Confirmation',\n 'en-GB': 'Confirmation',\n fr: 'Confirmation',\n es: 'Confirmation',\n de: 'Confirmation',\n ja: '確認',\n ko: '확인',\n zh: '确认',\n it: 'Conferma',\n pt: 'Confirmação',\n hi: 'पुष्टि करें',\n ar: 'تأكيد',\n ru: 'Подтверждение',\n }),\n message: t({\n en: 'This will overwrite the existing dictionary. Are you sure you want to continue?',\n 'en-GB':\n 'This will overwrite the existing dictionary. Are you sure you want to continue?',\n fr: 'Cela remplacera le dictionnaire existant. Êtes-vous sûr de vouloir continuer?',\n es: 'Esto sobrescribirá el diccionario existente. ¿Estás seguro de que quieres continuar?',\n de: 'Dies wird das existierende Wörterbuch überschreiben. Sind Sie sicher, dass Sie fortfahren möchten?',\n ja: '既存の辞書を上書きします。続行しますか?',\n ko: '이는 기존 사전을 덮어 쓸 것입니다. 계속하시겠습니까?',\n zh: '这将覆盖现有的字典。你确定要继续吗?',\n it: 'Questo sovrascriverà il dizionario esistente. Sei sicuro di voler continuare?',\n pt: 'Isso sobrescreverá o dicionário existente. Você tem certeza de que deseja continuar?',\n hi: 'यह मौजूदा शब्दकोश को ओवरराइट करने जारी है। आप क्या आप जारी रखना चाहते हैं?',\n ar: 'سيتم الكتابة على القاموس الحالي. هل أنت متأكد من أنك تريد المتابعة؟',\n ru: 'Это перезапишет существующий словарь. Вы уверены, что хотите продолжить?',\n }),\n differentFormatMessage: t({\n en: 'The dictionary is in a different format, it will be transformed into a JSON file. Are you sure you want to continue? This will overwrite the existing dictionary.',\n 'en-GB':\n 'The dictionary is in a different format, it will be transformed into a JSON file. Are you sure you want to continue? This will overwrite the existing dictionary.',\n fr: 'Le dictionnaire est dans un format différent, il sera transformé en un fichier JSON. Êtes-vous sûr de vouloir continuer ? Cela remplacera le dictionnaire existant.',\n es: 'El diccionario está en un formato diferente, se transformará en un archivo JSON. ¿Estás seguro de que quieres continuar? Esto sobrescribirá el diccionario existente.',\n de: 'Das Wörterbuch ist in einem anderen Format, es wird in eine JSON-Datei umgewandelt. Sind Sie sicher, dass Sie fortfahren möchten? Dies wird das existierende Wörterbuch überschreiben.',\n ja: '辞書は異なる形式です。JSONファイルに変換されます。続行しますか?既存の辞書を上書きします。',\n ko: '사전은 다른 형식입니다. JSON 파일로 변환됩니다. 계속하시겠습니까? 이는 기존 사전을 덮어 쓸 것입니다.',\n zh: '字典是在不同格式中,它将转换为JSON文件。你确定要继续吗?这将覆盖现有的字典。',\n it: 'Il dizionario è in un formato diverso, verrà trasformato in un file JSON. Sei sicuro di voler continuare? Questo sovrascriverà il dizionario esistente.',\n pt: 'O dicionário está em um formato diferente, ele será transformado em um arquivo JSON. Você tem certeza de que deseja continuar? Isso sobrescreverá o dicionário existente.',\n }),\n confirmButton: {\n text: t({\n en: 'Confirm',\n 'en-GB': 'Confirm',\n fr: 'Confirmer',\n es: 'Confirmar',\n de: 'Bestätigen',\n ja: '確認',\n ko: '확인',\n zh: '确认',\n it: 'Conferma',\n pt: 'Confirmar',\n hi: 'पुष्टि करें',\n ar: 'تأكيد',\n ru: 'Подтвердить',\n }),\n label: t({\n en: 'Click to confirm',\n 'en-GB': 'Click to confirm',\n fr: 'Cliquez pour confirmer',\n es: 'Haga clic para confirmar',\n de: 'Klicken Sie, um zu bestätigen',\n ja: '確認するにはクリックしてください',\n ko: '확인을 클릭하세요',\n zh: '单击确认',\n it: 'Fai clic per confermare',\n pt: 'Clique para confirmar',\n hi: 'पुष्टि करने के लिए क्लिक करें',\n ar: 'انقر لتأكيد',\n ru: 'Нажмите, чтобы подтвердить',\n }),\n },\n cancelButton: {\n text: t({\n en: 'Cancel',\n 'en-GB': 'Cancel',\n fr: 'Annuler',\n es: 'Cancelar',\n de: 'Abbrechen',\n ja: 'キャンセル',\n ko: '취소',\n zh: '取消',\n it: 'Annulla',\n pt: 'Cancelar',\n hi: 'रद्द करें',\n ar: 'إلغاء',\n ru: 'Отмена',\n }),\n label: t({\n en: 'Click to cancel',\n 'en-GB': 'Click to cancel',\n fr: 'Cliquez pour annuler',\n es: 'Haga clic para cancelar',\n de: 'Klicken Sie, um abzubrechen',\n ja: 'キャンセルするにはクリックしてください',\n ko: '취소를 클릭하세요',\n zh: '单击取消',\n it: 'Fai clic per annullare',\n pt: 'Clique para cancelar',\n hi: 'रद्द करने के लिए क्लिक करें',\n ar: 'انقر لإلغاء',\n ru: 'Нажмите, чтобы отменить',\n }),\n },\n },\n },\n} satisfies Dictionary;\n\nexport default saveDictionaryContent;\n"],"names":["t"],"mappings":";;;AAEO,MAAM,wBAAwB;AAAA,EACnC,KAAK;AAAA,EACL,SAAS;AAAA,IACP,cAAc;AAAA,MACZ,MAAMA,SAAAA,EAAE;AAAA,QACN,IAAI;AAAA,QACJ,SAAS;AAAA,QACT,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MAAA,CACL;AAAA,MACD,OAAOA,SAAAA,EAAE;AAAA,QACP,IAAI;AAAA,QACJ,SAAS;AAAA,QACT,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MAAA,CACL;AAAA,IAAA;AAAA,IAEH,aAAa;AAAA,MACX,MAAMA,SAAAA,EAAE;AAAA,QACN,IAAI;AAAA,QACJ,SAAS;AAAA,QACT,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MAAA,CACL;AAAA,MACD,OAAOA,SAAAA,EAAE;AAAA,QACP,IAAI;AAAA,QACJ,SAAS;AAAA,QACT,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA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,SAAS;AAAA,UACT,IAAI;AAAA,UACJ,IAAI;AAAA,UACJ,IAAI;AAAA,UACJ,IAAI;AAAA,UACJ,IAAI;AAAA,UACJ,IAAI;AAAA,UACJ,IAAI;AAAA,UACJ,IAAI;AAAA,UACJ,IAAI;AAAA,UACJ,IAAI;AAAA,UACJ,IAAI;AAAA,QAAA,CACL;AAAA,MAAA;AAAA,IACH;AAAA,EACF;AAEJ;;;"}
|
|
1
|
+
{"version":3,"file":"saveForm.content.cjs","sources":["../../../../src/components/DictionaryFieldEditor/SaveForm/saveForm.content.tsx"],"sourcesContent":["import { t, type Dictionary } from 'intlayer';\n\nexport const saveDictionaryContent = {\n key: 'save-dictionary-details',\n content: {\n deleteButton: {\n text: t({\n en: 'Delete dictionary',\n 'en-GB': 'Delete dictionary',\n fr: 'Supprimer le dictionnaire',\n es: 'Eliminar diccionario',\n de: 'Wörterbuch löschen',\n ja: '辞書を削除',\n ko: '사전 삭제',\n zh: '删除字典',\n it: 'Elimina dizionario',\n pt: 'Excluir dicionário',\n hi: 'शब्दकोश हटाएं',\n ar: 'حذف القاموس',\n ru: 'Удалить словарь',\n tr: 'Sözlüğü sil',\n }),\n label: t({\n en: 'Click to delete dictionary',\n 'en-GB': 'Click to delete dictionary',\n fr: 'Cliquez pour supprimer le dictionnaire',\n es: 'Haga clic para eliminar el diccionario',\n de: 'Klicken Sie, um das Wörterbuch zu löschen',\n ja: '辞書を削除するにはクリックしてください',\n ko: '사전을 삭제하려면 클릭하세요',\n zh: '单击以删除字典',\n it: 'Fai clic per eliminare il dizionario',\n pt: 'Clique para excluir o dicionário',\n hi: 'शब्दकोश हटाने के लिए क्लिक करें',\n ar: 'انقر لحذف القاموس',\n ru: 'Нажмите, чтобы удалить словарь',\n tr: 'Sözlüğü silmek için tıklayın',\n }),\n },\n resetButton: {\n text: t({\n en: 'Reset all changes',\n 'en-GB': 'Reset all changes',\n fr: 'Réinitialiser toutes les modifications',\n es: 'Restablecer todas las modificaciones',\n de: 'Alle Änderungen zurücksetzen',\n ja: 'すべての変更をリセット',\n ko: '모든 변경 사항 초기화',\n zh: '重置所有更改',\n it: 'Reimposta tutte le modifiche',\n pt: 'Redefinir todas as alterações',\n hi: 'सभी परिवर्तनों को रीसेट करें',\n ar: 'إعادة تعيين جميع التغييرات',\n ru: 'Сбросить все изменения',\n tr: 'Tüm değişiklikleri sıfırla',\n }),\n label: t({\n en: 'Click to reset all the changes',\n 'en-GB': 'Click to reset all the changes',\n fr: 'Cliquez pour réinitialiser toutes les modifications',\n es: 'Haga clic para restablecer todas las modificaciones',\n de: 'Klicken Sie, um alle Änderungen zurückzusetzen',\n ja: 'すべての変更をリセットするにはクリックしてください',\n ko: '모든 변경 사항을 초기화하려면 클릭하세요',\n zh: '单击以重置所有更改',\n it: 'Fai clic per ripristinare tutte le modifiche',\n pt: 'Clique para redefinir todas as alterações',\n hi: 'सभी परिवर्तनों को रीसेट करने के लिए क्लिक करें',\n ar: 'انقر لإعادة تعيين جميع التغييرات',\n ru: 'Нажмите, чтобы сбросить все изменения',\n tr: 'Tüm değişiklikleri sıfırlamak için tıklayın',\n }),\n },\n saveButton: {\n text: t({\n en: 'Save changes',\n 'en-GB': 'Save changes',\n fr: 'Enregistrer les modifications',\n es: 'Guardar cambios',\n de: 'Änderungen speichern',\n ja: '変更を保存',\n ko: '변경 사항 저장',\n zh: '保存更改',\n it: 'Salva le modifiche',\n pt: 'Salvar alterações',\n hi: 'परिवर्तनों को सहेजें',\n ar: 'احفظ التغييرات',\n ru: 'Сохранить изменения',\n tr: 'Değişiklikleri kaydet',\n }),\n label: t({\n en: 'Click to save changes',\n 'en-GB': 'Click to save changes',\n fr: 'Cliquez pour enregistrer les modifications',\n es: 'Haga clic para guardar cambios',\n de: 'Klicken Sie, um Änderungen zu speichern',\n ja: '変更を保存するにはクリックしてください',\n ko: '변경 사항을 저장하려면 클릭하세요',\n zh: '单击保存更改',\n it: 'Fai clic per salvare le modifiche',\n pt: 'Clique para salvar alterações',\n hi: 'परिवर्तनों को सहेजने के लिए क्लिक करें',\n ar: 'انقر لحفظ التغييرات',\n ru: 'Нажмите, чтобы сохранить изменения',\n tr: 'Değişiklikleri kaydetmek için tıklayın',\n }),\n },\n publishButton: {\n text: t({\n en: 'Publish dictionary',\n 'en-GB': 'Publish dictionary',\n fr: 'Publier dictionnaire',\n es: 'Publicar diccionario',\n de: 'Wörterbuch veröffentlichen',\n ja: '辞書を公開',\n ko: '사전을 게시합니다',\n zh: '发布字典',\n it: 'Pubblica dizionario',\n pt: 'Publicar dicionário',\n hi: 'शब्दकोश प्रकाशित करें',\n ar: 'نشر القاموس',\n ru: 'Опубликовать словарь',\n tr: 'Sözlüğü yayınla',\n }),\n label: t({\n en: 'Click to publish dictionary',\n 'en-GB': 'Click to publish dictionary',\n fr: 'Cliquez pour publier dictionnaire',\n es: 'Haga clic para publicar diccionario',\n de: 'Klicken Sie, um das Wörterbuch zu veröffentlichen',\n ja: '辞書を公開するにはクリックしてください',\n ko: '사전을 게시하려면 클릭하세요',\n zh: '单击以发布字典',\n it: 'Fai clic per pubblicare il dizionario',\n pt: 'Clique para publicar dicionário',\n hi: 'शब्दकोश प्रकाशित करने के लिए क्लिक करें',\n ar: 'انقر لنشر القاموس',\n ru: 'Нажмите, чтобы опубликовать словарь',\n tr: 'Sözlüğü yayınlamak için tıklayın',\n }),\n },\n downloadButton: {\n text: t({\n en: 'Download',\n 'en-GB': 'Download',\n fr: 'Télécharger',\n es: 'Descargar',\n de: 'Herunterladen',\n ja: 'ダウンロード',\n ko: '다운로드',\n zh: '下载',\n it: 'Scarica',\n pt: 'Baixar',\n hi: 'डाउनलोड',\n ar: 'تنزيل',\n ru: 'Скачать',\n tr: 'İndir',\n }),\n label: t({\n en: 'Click to download',\n 'en-GB': 'Click to download',\n fr: 'Cliquez pour télécharger',\n es: 'Haga clic para descargar',\n de: 'Klicken Sie, um herunterzuladen',\n ja: 'ダウンロードするにはクリックしてください',\n ko: '다운로드를 클릭하세요',\n zh: '单击下载',\n it: 'Fai clic per scaricare',\n pt: 'Clique para baixar',\n hi: 'डाउनलोड करने के लिए क्लिक करें',\n ar: 'انقر لتنزيل',\n ru: 'Нажмите, чтобы скачать',\n tr: 'İndirmek için tıklayın',\n }),\n },\n\n confirmation: {\n title: t({\n en: 'Confirmation',\n 'en-GB': 'Confirmation',\n fr: 'Confirmation',\n es: 'Confirmation',\n de: 'Confirmation',\n ja: '確認',\n ko: '확인',\n zh: '确认',\n it: 'Conferma',\n pt: 'Confirmação',\n hi: 'पुष्टि करें',\n ar: 'تأكيد',\n ru: 'Подтверждение',\n tr: 'Onay',\n }),\n message: t({\n en: 'This will overwrite the existing dictionary. Are you sure you want to continue?',\n 'en-GB':\n 'This will overwrite the existing dictionary. Are you sure you want to continue?',\n fr: 'Cela remplacera le dictionnaire existant. Êtes-vous sûr de vouloir continuer?',\n es: 'Esto sobrescribirá el diccionario existente. ¿Estás seguro de que quieres continuar?',\n de: 'Dies wird das existierende Wörterbuch überschreiben. Sind Sie sicher, dass Sie fortfahren möchten?',\n ja: '既存の辞書を上書きします。続行しますか?',\n ko: '이는 기존 사전을 덮어 쓸 것입니다. 계속하시겠습니까?',\n zh: '这将覆盖现有的字典。你确定要继续吗?',\n it: 'Questo sovrascriverà il dizionario esistente. Sei sicuro di voler continuare?',\n pt: 'Isso sobrescreverá o dicionário existente. Você tem certeza de que deseja continuar?',\n hi: 'यह मौजूदा शब्दकोश को ओवरराइट करने जारी है। आप क्या आप जारी रखना चाहते हैं?',\n ar: 'سيتم الكتابة على القاموس الحالي. هل أنت متأكد من أنك تريد المتابعة؟',\n ru: 'Это перезапишет существующий словарь. Вы уверены, что хотите продолжить?',\n tr: 'Bu, mevcut sözlüğün üzerine yazacaktır. Devam etmek istediğinizden emin misiniz?',\n }),\n confirmButton: {\n text: t({\n en: 'Confirm',\n 'en-GB': 'Confirm',\n fr: 'Confirmer',\n es: 'Confirmar',\n de: 'Bestätigen',\n ja: '確認',\n ko: '확인',\n zh: '确认',\n it: 'Conferma',\n pt: 'Confirmar',\n hi: 'पुष्टि करें',\n ar: 'تأكيد',\n ru: 'Подтвердить',\n tr: 'Onayla',\n }),\n label: t({\n en: 'Click to confirm',\n 'en-GB': 'Click to confirm',\n fr: 'Cliquez pour confirmer',\n es: 'Haga clic para confirmar',\n de: 'Klicken Sie, um zu bestätigen',\n ja: '確認するにはクリックしてください',\n ko: '확인을 클릭하세요',\n zh: '单击确认',\n it: 'Fai clic per confermare',\n pt: 'Clique para confirmar',\n hi: 'पुष्टि करने के लिए क्लिक करें',\n ar: 'انقر لتأكيد',\n ru: 'Нажмите, чтобы подтвердить',\n tr: 'Onaylamak için tıklayın',\n }),\n },\n cancelButton: {\n text: t({\n en: 'Cancel',\n 'en-GB': 'Cancel',\n fr: 'Annuler',\n es: 'Cancelar',\n de: 'Abbrechen',\n ja: 'キャンセル',\n ko: '취소',\n zh: '取消',\n it: 'Annulla',\n pt: 'Cancelar',\n hi: 'रद्द करें',\n ar: 'إلغاء',\n ru: 'Отмена',\n tr: 'İptal',\n }),\n label: t({\n en: 'Click to cancel',\n 'en-GB': 'Click to cancel',\n fr: 'Cliquez pour annuler',\n es: 'Haga clic para cancelar',\n de: 'Klicken Sie, um abzubrechen',\n ja: 'キャンセルするにはクリックしてください',\n ko: '취소를 클릭하세요',\n zh: '单击取消',\n it: 'Fai clic per annullare',\n pt: 'Clique para cancelar',\n hi: 'रद्द करने के लिए क्लिक करें',\n ar: 'انقر لإلغاء',\n ru: 'Нажмите, чтобы отменить',\n tr: 'İptal etmek için tıklayın',\n }),\n },\n },\n },\n} satisfies Dictionary;\n\nexport default saveDictionaryContent;\n"],"names":["t"],"mappings":";;;AAEO,MAAM,wBAAwB;AAAA,EACnC,KAAK;AAAA,EACL,SAAS;AAAA,IACP,cAAc;AAAA,MACZ,MAAMA,SAAAA,EAAE;AAAA,QACN,IAAI;AAAA,QACJ,SAAS;AAAA,QACT,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IA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