fastapi-rtk 0.2.32 → 0.2.36
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/.external/cjs/{@tanstack_query-core@5.85.6 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/notifyManager.cjs +2 -1
- package/dist/.external/cjs/{@tanstack_query-core@5.85.6 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/query.cjs +10 -0
- package/dist/.external/cjs/{@tanstack_query-core@5.85.6 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/queryObserver.cjs +5 -4
- package/dist/.external/cjs/{@tanstack_query-core@5.85.6 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/removable.cjs +3 -2
- package/dist/.external/cjs/@tanstack_query-core@5.87.1/@tanstack/query-core/build/modern/timeoutManager.cjs +78 -0
- package/dist/.external/cjs/{@tanstack_query-core@5.85.6 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/utils.cjs +26 -22
- package/dist/.external/cjs/{@tanstack_react-query@5.85.6_react@18.3.1 → @tanstack_react-query@5.87.1_react@18.3.1}/@tanstack/react-query/build/modern/errorBoundaryUtils.cjs +1 -1
- package/dist/.external/cjs/{@tanstack_react-query@5.85.6_react@18.3.1 → @tanstack_react-query@5.87.1_react@18.3.1}/@tanstack/react-query/build/modern/suspense.cjs +6 -2
- package/dist/.external/cjs/{@tanstack_react-query@5.85.6_react@18.3.1 → @tanstack_react-query@5.87.1_react@18.3.1}/@tanstack/react-query/build/modern/useBaseQuery.cjs +2 -2
- package/dist/.external/cjs/{@tanstack_react-query@5.85.6_react@18.3.1 → @tanstack_react-query@5.87.1_react@18.3.1}/@tanstack/react-query/build/modern/useQuery.cjs +1 -1
- package/dist/.external/cjs/i18next@25.5.2_typescript@5.9.2/i18next/dist/esm/i18next.cjs +2213 -0
- package/dist/.external/cjs/mantine-react-table@2.0.0-beta.9_@mantine_core@7.17.8_@mantine_dates@7.17.8_@mantine_hooks@7._v6brefjjgmgbqbolvm3v6bkbsa/mantine-react-table/locales/de/index.cjs +104 -0
- package/dist/.external/cjs/mantine-react-table@2.0.0-beta.9_@mantine_core@7.17.8_@mantine_dates@7.17.8_@mantine_hooks@7._v6brefjjgmgbqbolvm3v6bkbsa/mantine-react-table/locales/en/index.cjs +104 -0
- package/dist/.external/cjs/react-i18next@15.7.3_i18next@25.5.2_react-dom@18.3.1_react@18.3.1_typescript@5.9.2/react-i18next/dist/es/I18nextProvider.cjs +18 -0
- package/dist/.external/cjs/react-i18next@15.7.3_i18next@25.5.2_react-dom@18.3.1_react@18.3.1_typescript@5.9.2/react-i18next/dist/es/context.cjs +19 -0
- package/dist/.external/cjs/react-i18next@15.7.3_i18next@25.5.2_react-dom@18.3.1_react@18.3.1_typescript@5.9.2/react-i18next/dist/es/defaults.cjs +22 -0
- package/dist/.external/cjs/react-i18next@15.7.3_i18next@25.5.2_react-dom@18.3.1_react@18.3.1_typescript@5.9.2/react-i18next/dist/es/i18nInstance.cjs +9 -0
- package/dist/.external/cjs/react-i18next@15.7.3_i18next@25.5.2_react-dom@18.3.1_react@18.3.1_typescript@5.9.2/react-i18next/dist/es/initReactI18next.cjs +12 -0
- package/dist/.external/cjs/react-i18next@15.7.3_i18next@25.5.2_react-dom@18.3.1_react@18.3.1_typescript@5.9.2/react-i18next/dist/es/unescape.cjs +28 -0
- package/dist/.external/cjs/react-i18next@15.7.3_i18next@25.5.2_react-dom@18.3.1_react@18.3.1_typescript@5.9.2/react-i18next/dist/es/useTranslation.cjs +113 -0
- package/dist/.external/cjs/react-i18next@15.7.3_i18next@25.5.2_react-dom@18.3.1_react@18.3.1_typescript@5.9.2/react-i18next/dist/es/utils.cjs +71 -0
- package/dist/.external/esm/{@tanstack_query-core@5.85.6 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/notifyManager.mjs +2 -1
- package/dist/.external/esm/{@tanstack_query-core@5.85.6 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/query.mjs +10 -0
- package/dist/.external/esm/{@tanstack_query-core@5.85.6 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/queryObserver.mjs +5 -4
- package/dist/.external/esm/{@tanstack_query-core@5.85.6 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/removable.mjs +3 -2
- package/dist/.external/esm/@tanstack_query-core@5.87.1/@tanstack/query-core/build/modern/timeoutManager.mjs +78 -0
- package/dist/.external/esm/{@tanstack_query-core@5.85.6 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/utils.mjs +26 -22
- package/dist/.external/esm/{@tanstack_react-query@5.85.6_react@18.3.1 → @tanstack_react-query@5.87.1_react@18.3.1}/@tanstack/react-query/build/modern/errorBoundaryUtils.mjs +1 -1
- package/dist/.external/esm/{@tanstack_react-query@5.85.6_react@18.3.1 → @tanstack_react-query@5.87.1_react@18.3.1}/@tanstack/react-query/build/modern/suspense.mjs +6 -2
- package/dist/.external/esm/{@tanstack_react-query@5.85.6_react@18.3.1 → @tanstack_react-query@5.87.1_react@18.3.1}/@tanstack/react-query/build/modern/useBaseQuery.mjs +2 -2
- package/dist/.external/esm/{@tanstack_react-query@5.85.6_react@18.3.1 → @tanstack_react-query@5.87.1_react@18.3.1}/@tanstack/react-query/build/modern/useQuery.mjs +1 -1
- package/dist/.external/esm/i18next@25.5.2_typescript@5.9.2/i18next/dist/esm/i18next.mjs +2213 -0
- package/dist/.external/esm/mantine-react-table@2.0.0-beta.9_@mantine_core@7.17.8_@mantine_dates@7.17.8_@mantine_hooks@7._v6brefjjgmgbqbolvm3v6bkbsa/mantine-react-table/locales/de/index.mjs +104 -0
- package/dist/.external/esm/mantine-react-table@2.0.0-beta.9_@mantine_core@7.17.8_@mantine_dates@7.17.8_@mantine_hooks@7._v6brefjjgmgbqbolvm3v6bkbsa/mantine-react-table/locales/en/index.mjs +104 -0
- package/dist/.external/esm/react-i18next@15.7.3_i18next@25.5.2_react-dom@18.3.1_react@18.3.1_typescript@5.9.2/react-i18next/dist/es/I18nextProvider.mjs +18 -0
- package/dist/.external/esm/react-i18next@15.7.3_i18next@25.5.2_react-dom@18.3.1_react@18.3.1_typescript@5.9.2/react-i18next/dist/es/context.mjs +19 -0
- package/dist/.external/esm/react-i18next@15.7.3_i18next@25.5.2_react-dom@18.3.1_react@18.3.1_typescript@5.9.2/react-i18next/dist/es/defaults.mjs +22 -0
- package/dist/.external/esm/react-i18next@15.7.3_i18next@25.5.2_react-dom@18.3.1_react@18.3.1_typescript@5.9.2/react-i18next/dist/es/i18nInstance.mjs +9 -0
- package/dist/.external/esm/react-i18next@15.7.3_i18next@25.5.2_react-dom@18.3.1_react@18.3.1_typescript@5.9.2/react-i18next/dist/es/initReactI18next.mjs +12 -0
- package/dist/.external/esm/react-i18next@15.7.3_i18next@25.5.2_react-dom@18.3.1_react@18.3.1_typescript@5.9.2/react-i18next/dist/es/unescape.mjs +28 -0
- package/dist/.external/esm/react-i18next@15.7.3_i18next@25.5.2_react-dom@18.3.1_react@18.3.1_typescript@5.9.2/react-i18next/dist/es/useTranslation.mjs +113 -0
- package/dist/.external/esm/react-i18next@15.7.3_i18next@25.5.2_react-dom@18.3.1_react@18.3.1_typescript@5.9.2/react-i18next/dist/es/utils.mjs +71 -0
- package/dist/constants/cjs/_virtual/index.cjs +27 -0
- package/dist/constants/cjs/_virtual/index2.cjs +27 -0
- package/dist/constants/cjs/_virtual/index3.cjs +4 -0
- package/dist/constants/cjs/_virtual/index4.cjs +4 -0
- package/dist/constants/cjs/index.cjs +16 -0
- package/dist/constants/esm/_virtual/index.mjs +27 -0
- package/dist/constants/esm/_virtual/index2.mjs +27 -0
- package/dist/constants/esm/_virtual/index3.mjs +4 -0
- package/dist/constants/esm/_virtual/index4.mjs +4 -0
- package/dist/constants/esm/index.mjs +16 -0
- package/dist/constants/lib/index.d.ts +13 -0
- package/dist/core/cjs/ActionIcons/Add/Add.cjs +4 -1
- package/dist/core/cjs/ActionIcons/Add/AddDialog.cjs +52 -13
- package/dist/core/cjs/ActionIcons/Delete/Delete.cjs +15 -17
- package/dist/core/cjs/ActionIcons/Delete/DeleteDialog.cjs +60 -0
- package/dist/core/cjs/ActionIcons/Download/Download.cjs +4 -1
- package/dist/core/cjs/ActionIcons/Edit/Edit.cjs +4 -1
- package/dist/core/cjs/ActionIcons/Edit/EditDialog.cjs +50 -13
- package/dist/core/cjs/ActionIcons/Modals/CommonModal.cjs +17 -58
- package/dist/core/cjs/ActionIcons/Refresh/Refresh.cjs +4 -1
- package/dist/core/cjs/ActionIcons/View/View.cjs +4 -1
- package/dist/core/cjs/Selectors/LanguageSelector.cjs +11 -0
- package/dist/core/cjs/Tables/NextGenDataGrid/NextGenDataGrid.cjs +8 -2
- package/dist/core/cjs/Tables/NextGenDataGrid/hooks/useColumns/ColumnHeaderFilterInput/ColumnHeaderFilterInput.cjs +4 -1
- package/dist/core/cjs/Tables/NextGenDataGrid/hooks/useColumns/HeaderAdvancedFiltersMenuButton.cjs +4 -1
- package/dist/core/cjs/Tables/NextGenDataGrid/hooks/useData.cjs +2 -2
- package/dist/core/cjs/Tables/NextGenDataGrid/hooks/useI18n.cjs +8 -0
- package/dist/core/cjs/Wrappers/ApiProvider/ApiProvider.cjs +3 -1
- package/dist/core/cjs/Wrappers/ApiProvider/Contexts/FormContext.cjs +5 -0
- package/dist/core/cjs/Wrappers/ApiProvider/hooks/useProvideApi.cjs +30 -13
- package/dist/core/cjs/Wrappers/ApiProvider/utils/api/createItem.cjs +8 -3
- package/dist/core/cjs/Wrappers/ApiProvider/utils/api/deleteItem.cjs +7 -3
- package/dist/core/cjs/Wrappers/ApiProvider/utils/api/formCreateItem.cjs +5 -3
- package/dist/core/cjs/Wrappers/ApiProvider/utils/api/formUpdateItem.cjs +9 -3
- package/dist/core/cjs/Wrappers/ApiProvider/utils/api/getInfo.cjs +3 -3
- package/dist/core/cjs/Wrappers/ApiProvider/utils/api/getItem.cjs +7 -3
- package/dist/core/cjs/Wrappers/ApiProvider/utils/api/getItems.cjs +3 -3
- package/dist/core/cjs/Wrappers/ApiProvider/utils/api/updateItem.cjs +8 -3
- package/dist/core/cjs/Wrappers/ApiProvider/utils/bulkActions/postBulkAction.cjs +5 -4
- package/dist/core/cjs/Wrappers/Provider/Contexts/LangContext.cjs +71 -0
- package/dist/core/cjs/Wrappers/Provider/Provider.cjs +4 -3
- package/dist/core/cjs/Wrappers/Provider/hooks/useProvideAuth.cjs +2 -2
- package/dist/core/cjs/Wrappers/Provider/hooks/useProvideInfo.cjs +1 -1
- package/dist/core/cjs/Wrappers/Provider/hooks/useProvideLang.cjs +44 -0
- package/dist/core/cjs/hooks/api/useForms.cjs +12 -4
- package/dist/core/cjs/hooks/lang/useLang.cjs +5 -0
- package/dist/core/cjs/index.cjs +5 -0
- package/dist/core/cjs/translations/de.cjs +21 -0
- package/dist/core/esm/ActionIcons/Add/Add.mjs +4 -1
- package/dist/core/esm/ActionIcons/Add/AddDialog.mjs +54 -15
- package/dist/core/esm/ActionIcons/Delete/Delete.mjs +17 -19
- package/dist/core/esm/ActionIcons/Delete/DeleteDialog.mjs +60 -0
- package/dist/core/esm/ActionIcons/Download/Download.mjs +4 -1
- package/dist/core/esm/ActionIcons/Edit/Edit.mjs +4 -1
- package/dist/core/esm/ActionIcons/Edit/EditDialog.mjs +51 -14
- package/dist/core/esm/ActionIcons/Modals/CommonModal.mjs +18 -59
- package/dist/core/esm/ActionIcons/Refresh/Refresh.mjs +4 -1
- package/dist/core/esm/ActionIcons/View/View.mjs +4 -1
- package/dist/core/esm/Selectors/LanguageSelector.mjs +11 -0
- package/dist/core/esm/Tables/NextGenDataGrid/NextGenDataGrid.mjs +8 -2
- package/dist/core/esm/Tables/NextGenDataGrid/hooks/useColumns/ColumnHeaderFilterInput/ColumnHeaderFilterInput.mjs +4 -1
- package/dist/core/esm/Tables/NextGenDataGrid/hooks/useColumns/HeaderAdvancedFiltersMenuButton.mjs +4 -1
- package/dist/core/esm/Tables/NextGenDataGrid/hooks/useData.mjs +2 -2
- package/dist/core/esm/Tables/NextGenDataGrid/hooks/useI18n.mjs +8 -0
- package/dist/core/esm/Wrappers/ApiProvider/ApiProvider.mjs +4 -2
- package/dist/core/esm/Wrappers/ApiProvider/Contexts/FormContext.mjs +5 -0
- package/dist/core/esm/Wrappers/ApiProvider/hooks/useProvideApi.mjs +30 -13
- package/dist/core/esm/Wrappers/ApiProvider/utils/api/createItem.mjs +8 -3
- package/dist/core/esm/Wrappers/ApiProvider/utils/api/deleteItem.mjs +7 -3
- package/dist/core/esm/Wrappers/ApiProvider/utils/api/formCreateItem.mjs +5 -3
- package/dist/core/esm/Wrappers/ApiProvider/utils/api/formUpdateItem.mjs +9 -3
- package/dist/core/esm/Wrappers/ApiProvider/utils/api/getInfo.mjs +3 -3
- package/dist/core/esm/Wrappers/ApiProvider/utils/api/getItem.mjs +7 -3
- package/dist/core/esm/Wrappers/ApiProvider/utils/api/getItems.mjs +3 -3
- package/dist/core/esm/Wrappers/ApiProvider/utils/api/updateItem.mjs +8 -3
- package/dist/core/esm/Wrappers/ApiProvider/utils/bulkActions/postBulkAction.mjs +5 -4
- package/dist/core/esm/Wrappers/Provider/Contexts/LangContext.mjs +71 -0
- package/dist/core/esm/Wrappers/Provider/Provider.mjs +4 -3
- package/dist/core/esm/Wrappers/Provider/hooks/useProvideAuth.mjs +2 -2
- package/dist/core/esm/Wrappers/Provider/hooks/useProvideInfo.mjs +1 -1
- package/dist/core/esm/Wrappers/Provider/hooks/useProvideLang.mjs +44 -0
- package/dist/core/esm/hooks/api/useForms.mjs +13 -5
- package/dist/core/esm/hooks/lang/useLang.mjs +5 -0
- package/dist/core/esm/index.mjs +6 -1
- package/dist/core/esm/translations/de.mjs +22 -0
- package/dist/core/lib/ActionIcons/Add/AddDialog.d.ts +55 -20
- package/dist/core/lib/ActionIcons/Delete/DeleteDialog.d.ts +127 -0
- package/dist/core/lib/ActionIcons/Edit/EditDialog.d.ts +55 -20
- package/dist/core/lib/ActionIcons/Modals/CommonModal.d.ts +45 -20
- package/dist/core/lib/Selectors/LanguageSelector.d.ts +1 -0
- package/dist/core/lib/Tables/NextGenDataGrid/hooks/useI18n.d.ts +3 -0
- package/dist/core/lib/Wrappers/ApiProvider/Contexts/FormContext.d.ts +5 -0
- package/dist/core/lib/Wrappers/ApiProvider/hooks/useProvideApi.d.ts +12 -8
- package/dist/core/lib/Wrappers/ApiProvider/hooks/useProvideBulk.d.ts +1 -1
- package/dist/core/lib/Wrappers/ApiProvider/utils/api/createItem.d.ts +1 -1
- package/dist/core/lib/Wrappers/ApiProvider/utils/api/deleteItem.d.ts +1 -1
- package/dist/core/lib/Wrappers/ApiProvider/utils/api/formCreateItem.d.ts +1 -1
- package/dist/core/lib/Wrappers/ApiProvider/utils/api/formUpdateItem.d.ts +1 -1
- package/dist/core/lib/Wrappers/ApiProvider/utils/api/getInfo.d.ts +1 -1
- package/dist/core/lib/Wrappers/ApiProvider/utils/api/getItem.d.ts +1 -1
- package/dist/core/lib/Wrappers/ApiProvider/utils/api/getItems.d.ts +1 -1
- package/dist/core/lib/Wrappers/ApiProvider/utils/api/updateItem.d.ts +1 -1
- package/dist/core/lib/Wrappers/ApiProvider/utils/bulkActions/postBulkAction.d.ts +1 -1
- package/dist/core/lib/Wrappers/Provider/Contexts/LangContext.d.ts +15 -0
- package/dist/core/lib/Wrappers/Provider/Provider.d.ts +32 -0
- package/dist/core/lib/hooks/api/useApi.d.ts +16 -0
- package/dist/core/lib/hooks/api/useForms.d.ts +1 -1
- package/dist/core/lib/hooks/lang/useLang.d.ts +39 -0
- package/dist/core/lib/index.d.ts +2 -0
- package/dist/core/lib/translations/de.d.ts +18 -0
- package/dist/utils/cjs/FastAPIRTKLogger/FastAPIRTKLogger.cjs +8 -0
- package/dist/utils/cjs/createFetchParams/createFetchParams.cjs +7 -5
- package/dist/utils/cjs/index.cjs +2 -0
- package/dist/utils/esm/FastAPIRTKLogger/FastAPIRTKLogger.mjs +8 -0
- package/dist/utils/esm/createFetchParams/createFetchParams.mjs +7 -5
- package/dist/utils/esm/index.mjs +2 -0
- package/dist/utils/lib/FastAPIRTKLogger/FastAPIRTKLogger.d.ts +5 -0
- package/dist/utils/lib/FastAPIRTKLogger/index.d.ts +1 -0
- package/dist/utils/lib/createFetchParams/createFetchParams.d.ts +3 -12
- package/dist/utils/lib/index.d.ts +1 -0
- package/package.json +1 -1
- package/dist/core/cjs/Dialogs/AlertDialog/AlertDialog.cjs +0 -25
- package/dist/core/esm/Dialogs/AlertDialog/AlertDialog.mjs +0 -25
- package/dist/core/lib/Dialogs/AlertDialog/AlertDialog.d.ts +0 -6
- /package/dist/.external/cjs/{@tanstack_query-core@5.85.6 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/focusManager.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_query-core@5.85.6 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/infiniteQueryBehavior.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_query-core@5.85.6 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/mutation.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_query-core@5.85.6 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/mutationCache.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_query-core@5.85.6 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/onlineManager.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_query-core@5.85.6 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/queryCache.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_query-core@5.85.6 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/queryClient.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_query-core@5.85.6 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/retryer.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_query-core@5.85.6 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/subscribable.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_query-core@5.85.6 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/thenable.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_react-query@5.85.6_react@18.3.1 → @tanstack_react-query@5.87.1_react@18.3.1}/@tanstack/react-query/build/modern/IsRestoringProvider.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_react-query@5.85.6_react@18.3.1 → @tanstack_react-query@5.87.1_react@18.3.1}/@tanstack/react-query/build/modern/QueryClientProvider.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_react-query@5.85.6_react@18.3.1 → @tanstack_react-query@5.87.1_react@18.3.1}/@tanstack/react-query/build/modern/QueryErrorResetBoundary.cjs +0 -0
- /package/dist/.external/esm/{@tanstack_query-core@5.85.6 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/focusManager.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_query-core@5.85.6 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/infiniteQueryBehavior.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_query-core@5.85.6 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/mutation.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_query-core@5.85.6 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/mutationCache.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_query-core@5.85.6 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/onlineManager.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_query-core@5.85.6 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/queryCache.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_query-core@5.85.6 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/queryClient.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_query-core@5.85.6 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/retryer.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_query-core@5.85.6 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/subscribable.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_query-core@5.85.6 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/thenable.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_react-query@5.85.6_react@18.3.1 → @tanstack_react-query@5.87.1_react@18.3.1}/@tanstack/react-query/build/modern/IsRestoringProvider.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_react-query@5.85.6_react@18.3.1 → @tanstack_react-query@5.87.1_react@18.3.1}/@tanstack/react-query/build/modern/QueryClientProvider.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_react-query@5.85.6_react@18.3.1 → @tanstack_react-query@5.87.1_react@18.3.1}/@tanstack/react-query/build/modern/QueryErrorResetBoundary.mjs +0 -0
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const FormContext = require("../../Wrappers/ApiProvider/Contexts/FormContext.cjs");
|
|
4
|
-
const useForms = (type, options) =>
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
);
|
|
4
|
+
const useForms = (type, options) => {
|
|
5
|
+
switch (type) {
|
|
6
|
+
case "add":
|
|
7
|
+
return FormContext.useFormAddProvider(options);
|
|
8
|
+
case "edit":
|
|
9
|
+
return FormContext.useFormEditProvider(options);
|
|
10
|
+
case "delete":
|
|
11
|
+
return FormContext.useFormDeleteProvider(options);
|
|
12
|
+
default:
|
|
13
|
+
throw new Error(`useForms: Unknown form type '${type}'. Expected 'add', 'edit', or 'delete'.`);
|
|
14
|
+
}
|
|
15
|
+
};
|
|
8
16
|
exports.useForms = useForms;
|
package/dist/core/cjs/index.cjs
CHANGED
|
@@ -14,6 +14,7 @@ const useForms = require("./hooks/api/useForms.cjs");
|
|
|
14
14
|
const useAuth = require("./hooks/auth/useAuth.cjs");
|
|
15
15
|
const useInfo = require("./hooks/auth/useInfo.cjs");
|
|
16
16
|
const UserMenu = require("./Menu/UserMenu/UserMenu.cjs");
|
|
17
|
+
const LanguageSelector = require("./Selectors/LanguageSelector.cjs");
|
|
17
18
|
const AddDialog = require("./ActionIcons/Add/AddDialog.cjs");
|
|
18
19
|
const EditDialog = require("./ActionIcons/Edit/EditDialog.cjs");
|
|
19
20
|
const CommonModal = require("./ActionIcons/Modals/CommonModal.cjs");
|
|
@@ -29,7 +30,9 @@ const constants = require("fastapi-rtk/constants");
|
|
|
29
30
|
const hooks = require("fastapi-rtk/hooks");
|
|
30
31
|
const utils = require("fastapi-rtk/utils");
|
|
31
32
|
const zustand = require("fastapi-rtk/zustand");
|
|
33
|
+
require("./Wrappers/Provider/Contexts/LangContext.cjs");
|
|
32
34
|
const Filter = require("./Tables/DataGrid/Toolbar/Filter/Filter.cjs");
|
|
35
|
+
const useTranslation = require("../../.external/cjs/react-i18next@15.7.3_i18next@25.5.2_react-dom@18.3.1_react@18.3.1_typescript@5.9.2/react-i18next/dist/es/useTranslation.cjs");
|
|
33
36
|
exports.Actions = Actions.Actions;
|
|
34
37
|
exports.Add = Add.Add;
|
|
35
38
|
exports.Delete = Delete.Delete;
|
|
@@ -44,6 +47,7 @@ exports.useForms = useForms.useForms;
|
|
|
44
47
|
exports.useAuth = useAuth.useAuth;
|
|
45
48
|
exports.useInfo = useInfo.useInfo;
|
|
46
49
|
exports.UserMenu = UserMenu.UserMenu;
|
|
50
|
+
exports.LanguageSelector = LanguageSelector.LanguageSelector;
|
|
47
51
|
exports.AddDialog = AddDialog.AddDialog;
|
|
48
52
|
exports.EditDialog = EditDialog.EditDialog;
|
|
49
53
|
exports.CommonModal = CommonModal.CommonModal;
|
|
@@ -59,6 +63,7 @@ exports.InfiniteScroll = InfiniteScroll.InfiniteScroll;
|
|
|
59
63
|
exports.LazyLoadWrapper = LazyLoadWrapper.LazyLoadWrapper;
|
|
60
64
|
exports.Provider = Provider.Provider;
|
|
61
65
|
exports.Filter = Filter.Filter;
|
|
66
|
+
exports.useTranslation = useTranslation.useTranslation;
|
|
62
67
|
Object.keys(_bundledJsonforms).forEach((k) => {
|
|
63
68
|
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
64
69
|
enumerable: true,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const de = {
|
|
3
|
+
// Actions
|
|
4
|
+
View: "Ansehen",
|
|
5
|
+
Add: "Hinzufügen",
|
|
6
|
+
"Add Item": "Element hinzufügen",
|
|
7
|
+
Edit: "Bearbeiten",
|
|
8
|
+
Delete: "Löschen",
|
|
9
|
+
Refresh: "Aktualisieren",
|
|
10
|
+
Download: "Herunterladen",
|
|
11
|
+
Cancel: "Abbrechen",
|
|
12
|
+
Overlay: "Overlay",
|
|
13
|
+
"Exit overlay": "Overlay verlassen",
|
|
14
|
+
"Full screen": "Vollbild",
|
|
15
|
+
"Exit full screen": "Vollbild verlassen",
|
|
16
|
+
// Dialogs,
|
|
17
|
+
"Are you sure you want to delete this item?": "Sind Sie Sicher, dass Sie das Item löschen wollen?",
|
|
18
|
+
"No filters": "Keine Filter",
|
|
19
|
+
"Advanced Filters": "Erweiterte Filter"
|
|
20
|
+
};
|
|
21
|
+
module.exports = de;
|
|
@@ -3,11 +3,14 @@ import { useActionIcon } from "fastapi-rtk/hooks";
|
|
|
3
3
|
import { Tooltip, ActionIcon } from "@mantine/core";
|
|
4
4
|
import { memo } from "react";
|
|
5
5
|
import { useForms } from "../../hooks/api/useForms.mjs";
|
|
6
|
+
import "../../Wrappers/Provider/Contexts/LangContext.mjs";
|
|
7
|
+
import { useTranslation } from "../../../../.external/esm/react-i18next@15.7.3_i18next@25.5.2_react-dom@18.3.1_react@18.3.1_typescript@5.9.2/react-i18next/dist/es/useTranslation.mjs";
|
|
6
8
|
import IconPlus from "../../../../.external/esm/@tabler_icons-react@3.18.0_react@18.3.1/@tabler/icons-react/dist/esm/icons/IconPlus.mjs";
|
|
7
9
|
const Add = memo(({ tooltipProps, ...props }) => {
|
|
10
|
+
const { t } = useTranslation();
|
|
8
11
|
const { setOpened } = useForms("add");
|
|
9
12
|
const actionIconProps = useActionIcon({ onClick: () => setOpened(true), ...props });
|
|
10
|
-
return /* @__PURE__ */ jsx(Tooltip, { ...tooltipProps, label: (tooltipProps == null ? void 0 : tooltipProps.label) ?? "Add Item", children: /* @__PURE__ */ jsx(ActionIcon, { ...actionIconProps, children: /* @__PURE__ */ jsx(IconPlus, {}) }) });
|
|
13
|
+
return /* @__PURE__ */ jsx(Tooltip, { ...tooltipProps, label: (tooltipProps == null ? void 0 : tooltipProps.label) ?? t("Add Item"), children: /* @__PURE__ */ jsx(ActionIcon, { ...actionIconProps, children: /* @__PURE__ */ jsx(IconPlus, {}) }) });
|
|
11
14
|
});
|
|
12
15
|
Add.displayName = "Add";
|
|
13
16
|
export {
|
|
@@ -1,16 +1,25 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { JsonFormsWithCustomizer } from "fastapi-rtk/.bundled-jsonforms";
|
|
2
3
|
import { DEBOUNCE_LOADING_DELAY, VIEW_MODE } from "fastapi-rtk/constants";
|
|
3
4
|
import { deepMerge } from "fastapi-rtk/utils";
|
|
4
|
-
import { useProps } from "@mantine/core";
|
|
5
|
+
import { useProps, Stack } from "@mantine/core";
|
|
6
|
+
import { useForm } from "@mantine/form";
|
|
5
7
|
import { useDebouncedState } from "@mantine/hooks";
|
|
6
|
-
import {
|
|
8
|
+
import { yupResolver } from "../../../../.external/esm/mantine-form-yup-resolver@2.0.0_@mantine_form@8.2.8_yup@1.7.0/mantine-form-yup-resolver/dist/esm/index.mjs";
|
|
9
|
+
import { useMemo, useCallback, useEffect } from "react";
|
|
7
10
|
import { useApi } from "../../hooks/api/useApi.mjs";
|
|
8
11
|
import { useForms } from "../../hooks/api/useForms.mjs";
|
|
12
|
+
import { useInfo } from "../../hooks/auth/useInfo.mjs";
|
|
13
|
+
import "../../Wrappers/Provider/Contexts/LangContext.mjs";
|
|
14
|
+
import { FormField } from "../../Tables/DataGrid/FormField/FormField.mjs";
|
|
9
15
|
import { CommonModal } from "../Modals/CommonModal.mjs";
|
|
10
16
|
import { normalProps } from "../Modals/normalProps.mjs";
|
|
11
17
|
import { overlayProps } from "../Modals/overlayProps.mjs";
|
|
12
|
-
|
|
18
|
+
import { useTranslation } from "../../../../.external/esm/react-i18next@15.7.3_i18next@25.5.2_react-dom@18.3.1_react@18.3.1_typescript@5.9.2/react-i18next/dist/es/useTranslation.mjs";
|
|
19
|
+
function AddDialog({ jsonForms: __jsonForms, onSuccess, onError, ...props }) {
|
|
20
|
+
var _a;
|
|
13
21
|
const { info, refetch, refetchInfo, addEntry } = useApi();
|
|
22
|
+
const { t } = useTranslation();
|
|
14
23
|
const { opened, setOpened, state, getState, setState, reset, view, setView } = useForms("add");
|
|
15
24
|
const [loading, setLoading] = useDebouncedState(false, DEBOUNCE_LOADING_DELAY);
|
|
16
25
|
const { jsonForms: _jsonForms } = useProps("AddDialog", {}, {});
|
|
@@ -20,31 +29,37 @@ function AddDialog({ jsonForms: __jsonForms, ...props }) {
|
|
|
20
29
|
e == null ? void 0 : e.preventDefault();
|
|
21
30
|
setLoading(true);
|
|
22
31
|
addEntry(getState().data).then((res) => {
|
|
32
|
+
onSuccess == null ? void 0 : onSuccess(res);
|
|
23
33
|
if (res) {
|
|
24
34
|
refetch();
|
|
25
35
|
refetchInfo();
|
|
26
36
|
}
|
|
27
|
-
}).catch(() => {
|
|
28
|
-
}).finally(() => {
|
|
37
|
+
}).catch(onError).finally(() => {
|
|
29
38
|
setLoading(false);
|
|
30
39
|
setOpened(false);
|
|
31
40
|
});
|
|
32
41
|
},
|
|
33
|
-
[addEntry, getState, refetch, refetchInfo, setLoading, setOpened]
|
|
42
|
+
[addEntry, getState, onError, onSuccess, refetch, refetchInfo, setLoading, setOpened]
|
|
34
43
|
);
|
|
44
|
+
const { fab } = useInfo();
|
|
45
|
+
const form = useForm({ initialValues: info.add.defaultValues, validate: yupResolver(info.add.schema) });
|
|
46
|
+
const onSubmitFunc = fab ? form.onSubmit((values, e) => {
|
|
47
|
+
setState({ data: values });
|
|
48
|
+
onSubmit(e);
|
|
49
|
+
}) : onSubmit;
|
|
50
|
+
useEffect(() => {
|
|
51
|
+
if (JSON.stringify(state.data) !== JSON.stringify(form.getValues())) {
|
|
52
|
+
form.setValues(state.data);
|
|
53
|
+
}
|
|
54
|
+
}, [state.data]);
|
|
35
55
|
return /* @__PURE__ */ jsx(
|
|
36
56
|
CommonModal,
|
|
37
57
|
{
|
|
38
|
-
fabSchema: info.add,
|
|
39
|
-
schema: info.add_schema,
|
|
40
|
-
uischema: info.add_uischema,
|
|
41
|
-
state,
|
|
42
|
-
setState,
|
|
43
58
|
view,
|
|
44
59
|
setView,
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
buttonText: "Add",
|
|
60
|
+
onSubmit: onSubmitFunc,
|
|
61
|
+
actionButtons: { withResetButton: false },
|
|
62
|
+
buttonText: t("Add"),
|
|
48
63
|
buttonLoading: loading,
|
|
49
64
|
opened,
|
|
50
65
|
onClose: () => setOpened(false),
|
|
@@ -52,7 +67,31 @@ function AddDialog({ jsonForms: __jsonForms, ...props }) {
|
|
|
52
67
|
...view === VIEW_MODE.OVERLAY ? overlayProps : {},
|
|
53
68
|
...view === VIEW_MODE.NORMAL ? normalProps : {},
|
|
54
69
|
...props,
|
|
55
|
-
title: props.title ?? (info == null ? void 0 : info.add_title)
|
|
70
|
+
title: props.title ?? (info == null ? void 0 : info.add_title),
|
|
71
|
+
children: fab ? (
|
|
72
|
+
//* Backward compatibility to fab-react-toolkit
|
|
73
|
+
/* @__PURE__ */ jsx(Stack, { gap: "xs", children: (_a = info.add.columns) == null ? void 0 : _a.map((item, index) => /* @__PURE__ */ jsx(
|
|
74
|
+
FormField,
|
|
75
|
+
{
|
|
76
|
+
form,
|
|
77
|
+
name: item.name,
|
|
78
|
+
label: item.label,
|
|
79
|
+
description: item.description,
|
|
80
|
+
schema: item,
|
|
81
|
+
withAsterisk: item.required
|
|
82
|
+
},
|
|
83
|
+
index
|
|
84
|
+
)) })
|
|
85
|
+
) : /* @__PURE__ */ jsx(
|
|
86
|
+
JsonFormsWithCustomizer,
|
|
87
|
+
{
|
|
88
|
+
schema: info.add_schema,
|
|
89
|
+
uischema: info.add_uischema,
|
|
90
|
+
data: state.data,
|
|
91
|
+
onChange: setState,
|
|
92
|
+
customizer: jsonForms
|
|
93
|
+
}
|
|
94
|
+
)
|
|
56
95
|
}
|
|
57
96
|
);
|
|
58
97
|
}
|
|
@@ -1,26 +1,24 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx, Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { useActionIcon } from "fastapi-rtk/hooks";
|
|
3
3
|
import { Tooltip, ActionIcon } from "@mantine/core";
|
|
4
|
-
import { memo
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
4
|
+
import { memo } from "react";
|
|
5
|
+
import { useForms } from "../../hooks/api/useForms.mjs";
|
|
6
|
+
import "../../Wrappers/Provider/Contexts/LangContext.mjs";
|
|
7
|
+
import { useTranslation } from "../../../../.external/esm/react-i18next@15.7.3_i18next@25.5.2_react-dom@18.3.1_react@18.3.1_typescript@5.9.2/react-i18next/dist/es/useTranslation.mjs";
|
|
7
8
|
import IconTrash from "../../../../.external/esm/@tabler_icons-react@3.18.0_react@18.3.1/@tabler/icons-react/dist/esm/icons/IconTrash.mjs";
|
|
8
9
|
const Delete = memo(({ id, ...props }) => {
|
|
9
|
-
const {
|
|
10
|
-
const
|
|
11
|
-
const actionIconProps = useActionIcon({
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
})
|
|
20
|
-
return /* @__PURE__ */
|
|
21
|
-
/* @__PURE__ */ jsx(Tooltip, { label: "Delete", children: /* @__PURE__ */ jsx(ActionIcon, { ...actionIconProps, children: /* @__PURE__ */ jsx(IconTrash, {}) }) }),
|
|
22
|
-
/* @__PURE__ */ jsx(AlertDialog, { opened: dialogOpen, onClose: handleReject, handleAccept, handleReject })
|
|
23
|
-
] });
|
|
10
|
+
const { t } = useTranslation();
|
|
11
|
+
const { setOpened, setItem } = useForms("delete");
|
|
12
|
+
const actionIconProps = useActionIcon({
|
|
13
|
+
onClick: (e) => {
|
|
14
|
+
e == null ? void 0 : e.stopPropagation();
|
|
15
|
+
setItem(id);
|
|
16
|
+
setOpened(true);
|
|
17
|
+
},
|
|
18
|
+
size: "sm",
|
|
19
|
+
...props
|
|
20
|
+
});
|
|
21
|
+
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(Tooltip, { label: t("Delete"), children: /* @__PURE__ */ jsx(ActionIcon, { ...actionIconProps, children: /* @__PURE__ */ jsx(IconTrash, {}) }) }) });
|
|
24
22
|
});
|
|
25
23
|
Delete.displayName = "Delete";
|
|
26
24
|
export {
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { DEBOUNCE_LOADING_DELAY, VIEW_MODE } from "fastapi-rtk/constants";
|
|
3
|
+
import { Text } from "@mantine/core";
|
|
4
|
+
import { useDebouncedState } from "@mantine/hooks";
|
|
5
|
+
import { useCallback } from "react";
|
|
6
|
+
import { useApi } from "../../hooks/api/useApi.mjs";
|
|
7
|
+
import { useForms } from "../../hooks/api/useForms.mjs";
|
|
8
|
+
import "../../Wrappers/Provider/Contexts/LangContext.mjs";
|
|
9
|
+
import { CommonModal } from "../Modals/CommonModal.mjs";
|
|
10
|
+
import { overlayProps } from "../Modals/overlayProps.mjs";
|
|
11
|
+
import { useTranslation } from "../../../../.external/esm/react-i18next@15.7.3_i18next@25.5.2_react-dom@18.3.1_react@18.3.1_typescript@5.9.2/react-i18next/dist/es/useTranslation.mjs";
|
|
12
|
+
const DeleteDialog = ({ onSuccess, onError, ...props }) => {
|
|
13
|
+
const { refetch, refetchInfo, deleteEntry } = useApi();
|
|
14
|
+
const { t } = useTranslation();
|
|
15
|
+
const { opened, setOpened, getItem, reset, view, setView } = useForms("delete");
|
|
16
|
+
const [loading, setLoading] = useDebouncedState(false, DEBOUNCE_LOADING_DELAY);
|
|
17
|
+
const onReset = useCallback(() => {
|
|
18
|
+
setOpened(false);
|
|
19
|
+
}, [setOpened]);
|
|
20
|
+
const onSubmit = useCallback(
|
|
21
|
+
(e) => {
|
|
22
|
+
e == null ? void 0 : e.preventDefault();
|
|
23
|
+
setLoading(true);
|
|
24
|
+
deleteEntry(getItem()).then((res) => {
|
|
25
|
+
onSuccess == null ? void 0 : onSuccess(res);
|
|
26
|
+
refetch();
|
|
27
|
+
refetchInfo();
|
|
28
|
+
}).catch(onError).finally(() => {
|
|
29
|
+
setLoading(false);
|
|
30
|
+
setOpened(false);
|
|
31
|
+
});
|
|
32
|
+
},
|
|
33
|
+
[setLoading, deleteEntry, getItem, onError, onSuccess, refetch, refetchInfo, setOpened]
|
|
34
|
+
);
|
|
35
|
+
return /* @__PURE__ */ jsx(
|
|
36
|
+
CommonModal,
|
|
37
|
+
{
|
|
38
|
+
view,
|
|
39
|
+
setView,
|
|
40
|
+
onReset,
|
|
41
|
+
onSubmit,
|
|
42
|
+
withTitleOptions: false,
|
|
43
|
+
actionButtons: { groupProps: { mt: "xs" } },
|
|
44
|
+
resetButtonText: t("Cancel"),
|
|
45
|
+
buttonText: t("Delete"),
|
|
46
|
+
buttonLoading: loading,
|
|
47
|
+
size: "md",
|
|
48
|
+
opened,
|
|
49
|
+
onClose: () => setOpened(false),
|
|
50
|
+
onExitTransitionEnd: reset,
|
|
51
|
+
...view === VIEW_MODE.OVERLAY ? overlayProps : {},
|
|
52
|
+
...props,
|
|
53
|
+
title: props.title ?? "Delete #" + String(getItem()),
|
|
54
|
+
children: /* @__PURE__ */ jsx(Text, { ta: "center", children: t("Are you sure you want to delete this item?") })
|
|
55
|
+
}
|
|
56
|
+
);
|
|
57
|
+
};
|
|
58
|
+
export {
|
|
59
|
+
DeleteDialog
|
|
60
|
+
};
|
|
@@ -5,10 +5,13 @@ import { Modal, Stack, Select, Group, Button, ThemeIcon, Loader, Tooltip, Action
|
|
|
5
5
|
import { useDisclosure, useDebouncedState } from "@mantine/hooks";
|
|
6
6
|
import { memo, useState } from "react";
|
|
7
7
|
import { useApi } from "../../hooks/api/useApi.mjs";
|
|
8
|
+
import "../../Wrappers/Provider/Contexts/LangContext.mjs";
|
|
9
|
+
import { useTranslation } from "../../../../.external/esm/react-i18next@15.7.3_i18next@25.5.2_react-dom@18.3.1_react@18.3.1_typescript@5.9.2/react-i18next/dist/es/useTranslation.mjs";
|
|
8
10
|
import IconSeparatorVertical from "../../../../.external/esm/@tabler_icons-react@3.18.0_react@18.3.1/@tabler/icons-react/dist/esm/icons/IconSeparatorVertical.mjs";
|
|
9
11
|
import IconDownload from "../../../../.external/esm/@tabler_icons-react@3.18.0_react@18.3.1/@tabler/icons-react/dist/esm/icons/IconDownload.mjs";
|
|
10
12
|
const Download = memo(({ tooltipProps, ...props }) => {
|
|
11
13
|
const { download } = useApi();
|
|
14
|
+
const { t } = useTranslation();
|
|
12
15
|
const [opened, { toggle, close }] = useDisclosure();
|
|
13
16
|
const [loading, setLoading] = useDebouncedState(false, DEBOUNCE_LOADING_DELAY);
|
|
14
17
|
const [delimiter, setDelimiter] = useState(DEFAULT_DELIMITER);
|
|
@@ -41,7 +44,7 @@ const Download = memo(({ tooltipProps, ...props }) => {
|
|
|
41
44
|
),
|
|
42
45
|
/* @__PURE__ */ jsx(Group, { justify: "end", children: /* @__PURE__ */ jsx(Button, { mt: "md", onClick: onDownload, loading, children: "Download" }) })
|
|
43
46
|
] }) }),
|
|
44
|
-
loading ? /* @__PURE__ */ jsx(ThemeIcon, { variant: "transparent", size: actionIconProps.size, c: actionIconProps.c, children: /* @__PURE__ */ jsx(Loader, { size: "100%", color: actionIconProps.c }) }) : /* @__PURE__ */ jsx(Tooltip, { ...tooltipProps, label: (tooltipProps == null ? void 0 : tooltipProps.label) ?? "Download", children: /* @__PURE__ */ jsx(ActionIcon, { ...actionIconProps, children: /* @__PURE__ */ jsx(IconDownload, {}) }) })
|
|
47
|
+
loading ? /* @__PURE__ */ jsx(ThemeIcon, { variant: "transparent", size: actionIconProps.size, c: actionIconProps.c, children: /* @__PURE__ */ jsx(Loader, { size: "100%", color: actionIconProps.c }) }) : /* @__PURE__ */ jsx(Tooltip, { ...tooltipProps, label: (tooltipProps == null ? void 0 : tooltipProps.label) ?? t("Download"), children: /* @__PURE__ */ jsx(ActionIcon, { ...actionIconProps, children: /* @__PURE__ */ jsx(IconDownload, {}) }) })
|
|
45
48
|
] });
|
|
46
49
|
});
|
|
47
50
|
Download.displayName = "Download";
|
|
@@ -6,9 +6,12 @@ import { useDebouncedState } from "@mantine/hooks";
|
|
|
6
6
|
import { memo } from "react";
|
|
7
7
|
import { useApi } from "../../hooks/api/useApi.mjs";
|
|
8
8
|
import { useForms } from "../../hooks/api/useForms.mjs";
|
|
9
|
+
import "../../Wrappers/Provider/Contexts/LangContext.mjs";
|
|
10
|
+
import { useTranslation } from "../../../../.external/esm/react-i18next@15.7.3_i18next@25.5.2_react-dom@18.3.1_react@18.3.1_typescript@5.9.2/react-i18next/dist/es/useTranslation.mjs";
|
|
9
11
|
import IconPencil from "../../../../.external/esm/@tabler_icons-react@3.18.0_react@18.3.1/@tabler/icons-react/dist/esm/icons/IconPencil.mjs";
|
|
10
12
|
const Edit = memo(({ id, ...props }) => {
|
|
11
13
|
const { getEntry } = useApi();
|
|
14
|
+
const { t } = useTranslation();
|
|
12
15
|
const { setOpened, setItem } = useForms("edit");
|
|
13
16
|
const [loading, setLoading] = useDebouncedState(false, DEBOUNCE_LOADING_DELAY);
|
|
14
17
|
const actionIconProps = useActionIcon({
|
|
@@ -26,7 +29,7 @@ const Edit = memo(({ id, ...props }) => {
|
|
|
26
29
|
loading,
|
|
27
30
|
...props
|
|
28
31
|
});
|
|
29
|
-
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(Tooltip, { label: "Edit", children: /* @__PURE__ */ jsx(ActionIcon, { ...actionIconProps, children: /* @__PURE__ */ jsx(IconPencil, {}) }) }) });
|
|
32
|
+
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(Tooltip, { label: t("Edit"), children: /* @__PURE__ */ jsx(ActionIcon, { ...actionIconProps, children: /* @__PURE__ */ jsx(IconPencil, {}) }) }) });
|
|
30
33
|
});
|
|
31
34
|
Edit.displayName = "Edit";
|
|
32
35
|
export {
|
|
@@ -1,20 +1,28 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { JsonFormsWithCustomizer } from "fastapi-rtk/.bundled-jsonforms";
|
|
2
3
|
import { DEBOUNCE_LOADING_DELAY, initialState, VIEW_MODE } from "fastapi-rtk/constants";
|
|
3
4
|
import { deepMerge, getItemId } from "fastapi-rtk/utils";
|
|
4
|
-
import { useProps } from "@mantine/core";
|
|
5
|
+
import { useProps, Stack } from "@mantine/core";
|
|
6
|
+
import { useForm } from "@mantine/form";
|
|
5
7
|
import { useDebouncedState } from "@mantine/hooks";
|
|
6
8
|
import { l as lodashExports } from "../../_virtual/lodash.mjs";
|
|
9
|
+
import { yupResolver } from "../../../../.external/esm/mantine-form-yup-resolver@2.0.0_@mantine_form@8.2.8_yup@1.7.0/mantine-form-yup-resolver/dist/esm/index.mjs";
|
|
7
10
|
import { useMemo, useRef, useEffect, useCallback } from "react";
|
|
8
11
|
import { convertToFormInputs } from "../../fab-react-toolkit-patch/utils/convertToFormInputs.mjs";
|
|
9
12
|
import { useApi } from "../../hooks/api/useApi.mjs";
|
|
10
13
|
import { useForms } from "../../hooks/api/useForms.mjs";
|
|
11
14
|
import { useInfo } from "../../hooks/auth/useInfo.mjs";
|
|
15
|
+
import "../../Wrappers/Provider/Contexts/LangContext.mjs";
|
|
16
|
+
import { FormField } from "../../Tables/DataGrid/FormField/FormField.mjs";
|
|
12
17
|
import { CommonModal } from "../Modals/CommonModal.mjs";
|
|
13
18
|
import { normalProps } from "../Modals/normalProps.mjs";
|
|
14
19
|
import { overlayProps } from "../Modals/overlayProps.mjs";
|
|
15
20
|
import { convertToFormInputs as convertToFormInputs$1 } from "../utils/convertToFormInputs.mjs";
|
|
16
|
-
|
|
21
|
+
import { useTranslation } from "../../../../.external/esm/react-i18next@15.7.3_i18next@25.5.2_react-dom@18.3.1_react@18.3.1_typescript@5.9.2/react-i18next/dist/es/useTranslation.mjs";
|
|
22
|
+
function EditDialog({ jsonForms: __jsonForms, onSuccess, onError, ...props }) {
|
|
23
|
+
var _a;
|
|
17
24
|
const { info, refetch, refetchInfo, updateEntry } = useApi();
|
|
25
|
+
const { t } = useTranslation();
|
|
18
26
|
const { opened, setOpened, item, getItem, state, getState, setState, reset, view, setView } = useForms("edit");
|
|
19
27
|
const [loading, setLoading] = useDebouncedState(false, DEBOUNCE_LOADING_DELAY);
|
|
20
28
|
const { jsonForms: _jsonForms } = useProps("EditDialog", {}, {});
|
|
@@ -47,31 +55,36 @@ function EditDialog({ jsonForms: __jsonForms, ...props }) {
|
|
|
47
55
|
return acc;
|
|
48
56
|
}, {});
|
|
49
57
|
updateEntry(getItemId(getItem()), new_data).then((res) => {
|
|
58
|
+
onSuccess == null ? void 0 : onSuccess(res);
|
|
50
59
|
if (res) {
|
|
51
60
|
refetch();
|
|
52
61
|
refetchInfo();
|
|
53
62
|
}
|
|
54
|
-
}).catch(() => {
|
|
55
|
-
}).finally(() => {
|
|
63
|
+
}).catch(onError).finally(() => {
|
|
56
64
|
setLoading(false);
|
|
57
65
|
setOpened(false);
|
|
58
66
|
});
|
|
59
67
|
},
|
|
60
|
-
[setLoading, updateEntry, getItem,
|
|
68
|
+
[setLoading, getState, updateEntry, getItem, onError, onSuccess, refetch, refetchInfo, setOpened]
|
|
61
69
|
);
|
|
70
|
+
const form = useForm({ initialValues: info.edit.defaultValues, validate: yupResolver(info.edit.schema) });
|
|
71
|
+
const onSubmitFunc = fab ? form.onSubmit((values, e) => {
|
|
72
|
+
setState({ data: values });
|
|
73
|
+
onSubmit(e);
|
|
74
|
+
}) : onSubmit;
|
|
75
|
+
useEffect(() => {
|
|
76
|
+
if (JSON.stringify(state.data) !== JSON.stringify(form.getValues())) {
|
|
77
|
+
form.setValues(state.data);
|
|
78
|
+
}
|
|
79
|
+
}, [state.data]);
|
|
62
80
|
return /* @__PURE__ */ jsx(
|
|
63
81
|
CommonModal,
|
|
64
82
|
{
|
|
65
|
-
fabSchema: info.edit,
|
|
66
|
-
schema: info.edit_schema,
|
|
67
|
-
uischema: info.edit_uischema,
|
|
68
|
-
state,
|
|
69
|
-
setState,
|
|
70
83
|
view,
|
|
71
84
|
setView,
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
buttonText: "Edit",
|
|
85
|
+
onSubmit: onSubmitFunc,
|
|
86
|
+
actionButtons: { withResetButton: false },
|
|
87
|
+
buttonText: t("Edit"),
|
|
75
88
|
buttonLoading: loading,
|
|
76
89
|
opened,
|
|
77
90
|
onClose: () => setOpened(false),
|
|
@@ -79,7 +92,31 @@ function EditDialog({ jsonForms: __jsonForms, ...props }) {
|
|
|
79
92
|
...view === VIEW_MODE.OVERLAY ? overlayProps : {},
|
|
80
93
|
...view === VIEW_MODE.NORMAL ? normalProps : {},
|
|
81
94
|
...props,
|
|
82
|
-
title: props.title ?? (info == null ? void 0 : info.edit_title)
|
|
95
|
+
title: props.title ?? (info == null ? void 0 : info.edit_title),
|
|
96
|
+
children: fab ? (
|
|
97
|
+
//* Backward compatibility to fab-react-toolkit
|
|
98
|
+
/* @__PURE__ */ jsx(Stack, { gap: "xs", children: (_a = info.edit.columns) == null ? void 0 : _a.map((item2, index) => /* @__PURE__ */ jsx(
|
|
99
|
+
FormField,
|
|
100
|
+
{
|
|
101
|
+
form,
|
|
102
|
+
name: item2.name,
|
|
103
|
+
label: item2.label,
|
|
104
|
+
description: item2.description,
|
|
105
|
+
schema: item2,
|
|
106
|
+
withAsterisk: item2.required
|
|
107
|
+
},
|
|
108
|
+
index
|
|
109
|
+
)) })
|
|
110
|
+
) : /* @__PURE__ */ jsx(
|
|
111
|
+
JsonFormsWithCustomizer,
|
|
112
|
+
{
|
|
113
|
+
schema: info.edit_schema,
|
|
114
|
+
uischema: info.edit_uischema,
|
|
115
|
+
data: state.data,
|
|
116
|
+
onChange: setState,
|
|
117
|
+
customizer: jsonForms
|
|
118
|
+
}
|
|
119
|
+
)
|
|
83
120
|
}
|
|
84
121
|
);
|
|
85
122
|
}
|
|
@@ -1,51 +1,29 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { JsonFormsWithCustomizer } from "fastapi-rtk/.bundled-jsonforms";
|
|
3
2
|
import { VIEW_MODE } from "fastapi-rtk/constants";
|
|
4
3
|
import { deepMerge, parseFromValuesOrFunc } from "fastapi-rtk/utils";
|
|
5
4
|
import { Icon } from "../../../../.external/esm/@iconify_react@6.0.1_react@18.3.1/@iconify/react/dist/iconify.mjs";
|
|
6
|
-
import { Modal, Box,
|
|
7
|
-
import { useForm, yupResolver } from "@mantine/form";
|
|
8
|
-
import { useRef, useEffect } from "react";
|
|
5
|
+
import { Modal, Box, Group, Button, CloseButton } from "@mantine/core";
|
|
9
6
|
import { useInfo } from "../../hooks/auth/useInfo.mjs";
|
|
10
|
-
import
|
|
7
|
+
import "../../Wrappers/Provider/Contexts/LangContext.mjs";
|
|
8
|
+
import { useTranslation } from "../../../../.external/esm/react-i18next@15.7.3_i18next@25.5.2_react-dom@18.3.1_react@18.3.1_typescript@5.9.2/react-i18next/dist/es/useTranslation.mjs";
|
|
11
9
|
function CommonModal({
|
|
12
|
-
|
|
13
|
-
//* Backward compatibility to fab-react-toolkit
|
|
14
|
-
schema,
|
|
15
|
-
uischema,
|
|
16
|
-
state,
|
|
17
|
-
setState,
|
|
10
|
+
children,
|
|
18
11
|
view,
|
|
19
12
|
setView,
|
|
20
|
-
|
|
13
|
+
onReset,
|
|
21
14
|
onSubmit,
|
|
22
15
|
boxProps,
|
|
16
|
+
resetButtonText,
|
|
23
17
|
buttonText,
|
|
24
18
|
buttonLoading,
|
|
25
19
|
withTitleOptions = true,
|
|
20
|
+
withButtons = true,
|
|
26
21
|
titleOptions,
|
|
22
|
+
actionButtons,
|
|
27
23
|
...props
|
|
28
24
|
}) {
|
|
29
|
-
var _a;
|
|
30
25
|
const { fab } = useInfo();
|
|
31
|
-
const
|
|
32
|
-
initialValues: fabSchema.defaultValues,
|
|
33
|
-
validate: yupResolver(fabSchema.schema)
|
|
34
|
-
});
|
|
35
|
-
const onFormSubmitRef = useRef(onSubmit);
|
|
36
|
-
useEffect(() => {
|
|
37
|
-
if (fab) {
|
|
38
|
-
onFormSubmitRef.current = form.onSubmit((values, e) => {
|
|
39
|
-
setState({ data: values });
|
|
40
|
-
onSubmit(e);
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
}, [fab, onSubmit, setState]);
|
|
44
|
-
useEffect(() => {
|
|
45
|
-
if (JSON.stringify(state.data) !== JSON.stringify(form.getValues())) {
|
|
46
|
-
form.setValues(state.data);
|
|
47
|
-
}
|
|
48
|
-
}, [state.data]);
|
|
26
|
+
const { t } = useTranslation();
|
|
49
27
|
return /* @__PURE__ */ jsx(
|
|
50
28
|
Modal,
|
|
51
29
|
{
|
|
@@ -67,7 +45,7 @@ function CommonModal({
|
|
|
67
45
|
e == null ? void 0 : e.stopPropagation();
|
|
68
46
|
setView(view !== VIEW_MODE.OVERLAY ? VIEW_MODE.OVERLAY : VIEW_MODE.NORMAL);
|
|
69
47
|
},
|
|
70
|
-
title: view !== VIEW_MODE.OVERLAY ? "Overlay" : "Exit overlay",
|
|
48
|
+
title: view !== VIEW_MODE.OVERLAY ? t("Overlay") : t("Exit overlay"),
|
|
71
49
|
icon: /* @__PURE__ */ jsx(
|
|
72
50
|
Icon,
|
|
73
51
|
{
|
|
@@ -85,7 +63,7 @@ function CommonModal({
|
|
|
85
63
|
e == null ? void 0 : e.stopPropagation();
|
|
86
64
|
setView(view !== VIEW_MODE.FULL_SCREEN ? VIEW_MODE.FULL_SCREEN : VIEW_MODE.NORMAL);
|
|
87
65
|
},
|
|
88
|
-
title: view !== VIEW_MODE.FULL_SCREEN ? "Full screen" : "Exit full screen",
|
|
66
|
+
title: view !== VIEW_MODE.FULL_SCREEN ? t("Full screen") : t("Exit full screen"),
|
|
89
67
|
icon: /* @__PURE__ */ jsx(
|
|
90
68
|
Icon,
|
|
91
69
|
{
|
|
@@ -110,34 +88,15 @@ function CommonModal({
|
|
|
110
88
|
pos: "relative",
|
|
111
89
|
display: "flex",
|
|
112
90
|
style: { flexDirection: "column", justifyContent: "space-between" },
|
|
113
|
-
|
|
91
|
+
onReset,
|
|
92
|
+
onSubmit,
|
|
114
93
|
...boxProps,
|
|
115
94
|
children: [
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
/* @__PURE__ */ jsx(
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
form,
|
|
122
|
-
name: item.name,
|
|
123
|
-
label: item.label,
|
|
124
|
-
description: item.description,
|
|
125
|
-
schema: item,
|
|
126
|
-
withAsterisk: item.required
|
|
127
|
-
},
|
|
128
|
-
index
|
|
129
|
-
)) })
|
|
130
|
-
) : /* @__PURE__ */ jsx(
|
|
131
|
-
JsonFormsWithCustomizer,
|
|
132
|
-
{
|
|
133
|
-
schema,
|
|
134
|
-
uischema,
|
|
135
|
-
data: state.data,
|
|
136
|
-
onChange: setState,
|
|
137
|
-
customizer: jsonForms
|
|
138
|
-
}
|
|
139
|
-
),
|
|
140
|
-
/* @__PURE__ */ jsx(Group, { justify: "end", mt: "xl", children: /* @__PURE__ */ jsx(Button, { type: "submit", loading: buttonLoading, children: buttonText }) })
|
|
95
|
+
children,
|
|
96
|
+
withButtons && /* @__PURE__ */ jsxs(Group, { justify: "end", mt: "xl", ...actionButtons == null ? void 0 : actionButtons.groupProps, children: [
|
|
97
|
+
(actionButtons == null ? void 0 : actionButtons.withResetButton) !== false && /* @__PURE__ */ jsx(Button, { type: "reset", ...actionButtons == null ? void 0 : actionButtons.resetButtonProps, children: resetButtonText }),
|
|
98
|
+
(actionButtons == null ? void 0 : actionButtons.withSubmitButton) !== false && /* @__PURE__ */ jsx(Button, { type: "submit", loading: buttonLoading, ...actionButtons == null ? void 0 : actionButtons.submitButtonProps, children: buttonText })
|
|
99
|
+
] })
|
|
141
100
|
]
|
|
142
101
|
}
|
|
143
102
|
)
|
|
@@ -3,8 +3,11 @@ import { useActionIcon } from "fastapi-rtk/hooks";
|
|
|
3
3
|
import { ThemeIcon, Loader, Tooltip, ActionIcon } from "@mantine/core";
|
|
4
4
|
import { memo, useState } from "react";
|
|
5
5
|
import { useApi } from "../../hooks/api/useApi.mjs";
|
|
6
|
+
import "../../Wrappers/Provider/Contexts/LangContext.mjs";
|
|
7
|
+
import { useTranslation } from "../../../../.external/esm/react-i18next@15.7.3_i18next@25.5.2_react-dom@18.3.1_react@18.3.1_typescript@5.9.2/react-i18next/dist/es/useTranslation.mjs";
|
|
6
8
|
import IconRefresh from "../../../../.external/esm/@tabler_icons-react@3.18.0_react@18.3.1/@tabler/icons-react/dist/esm/icons/IconRefresh.mjs";
|
|
7
9
|
const Refresh = memo(({ tooltipProps, ...props }) => {
|
|
10
|
+
const { t } = useTranslation();
|
|
8
11
|
const [loading, setLoading] = useState(false);
|
|
9
12
|
const { refetch } = useApi();
|
|
10
13
|
const actionIconProps = useActionIcon({
|
|
@@ -16,7 +19,7 @@ const Refresh = memo(({ tooltipProps, ...props }) => {
|
|
|
16
19
|
},
|
|
17
20
|
...props
|
|
18
21
|
});
|
|
19
|
-
return loading ? /* @__PURE__ */ jsx(ThemeIcon, { variant: "transparent", size: actionIconProps.size, c: actionIconProps.c, children: /* @__PURE__ */ jsx(Loader, { size: "100%", color: actionIconProps.c }) }) : /* @__PURE__ */ jsx(Tooltip, { ...tooltipProps, label: (tooltipProps == null ? void 0 : tooltipProps.refresh) ?? "Refresh", children: /* @__PURE__ */ jsx(ActionIcon, { ...actionIconProps, children: /* @__PURE__ */ jsx(IconRefresh, {}) }) });
|
|
22
|
+
return loading ? /* @__PURE__ */ jsx(ThemeIcon, { variant: "transparent", size: actionIconProps.size, c: actionIconProps.c, children: /* @__PURE__ */ jsx(Loader, { size: "100%", color: actionIconProps.c }) }) : /* @__PURE__ */ jsx(Tooltip, { ...tooltipProps, label: (tooltipProps == null ? void 0 : tooltipProps.refresh) ?? t("Refresh"), children: /* @__PURE__ */ jsx(ActionIcon, { ...actionIconProps, children: /* @__PURE__ */ jsx(IconRefresh, {}) }) });
|
|
20
23
|
});
|
|
21
24
|
Refresh.displayName = "Refresh";
|
|
22
25
|
export {
|
|
@@ -5,10 +5,13 @@ import { Tooltip, ActionIcon } from "@mantine/core";
|
|
|
5
5
|
import { useDebouncedState } from "@mantine/hooks";
|
|
6
6
|
import { memo, useState } from "react";
|
|
7
7
|
import { useApi } from "../../hooks/api/useApi.mjs";
|
|
8
|
+
import "../../Wrappers/Provider/Contexts/LangContext.mjs";
|
|
8
9
|
import { ViewDialog } from "./ViewDialog.mjs";
|
|
10
|
+
import { useTranslation } from "../../../../.external/esm/react-i18next@15.7.3_i18next@25.5.2_react-dom@18.3.1_react@18.3.1_typescript@5.9.2/react-i18next/dist/es/useTranslation.mjs";
|
|
9
11
|
import IconEye from "../../../../.external/esm/@tabler_icons-react@3.18.0_react@18.3.1/@tabler/icons-react/dist/esm/icons/IconEye.mjs";
|
|
10
12
|
const View = memo(({ id, ...props }) => {
|
|
11
13
|
const { info, getEntry } = useApi();
|
|
14
|
+
const { t } = useTranslation();
|
|
12
15
|
const [item, setItem] = useState(null);
|
|
13
16
|
const [loading, setLoading] = useDebouncedState(false, DEBOUNCE_LOADING_DELAY);
|
|
14
17
|
const [dialogOpen, setDialogOpen] = useState(false);
|
|
@@ -28,7 +31,7 @@ const View = memo(({ id, ...props }) => {
|
|
|
28
31
|
...props
|
|
29
32
|
});
|
|
30
33
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
31
|
-
/* @__PURE__ */ jsx(Tooltip, { label: "
|
|
34
|
+
/* @__PURE__ */ jsx(Tooltip, { label: t("View"), children: /* @__PURE__ */ jsx(ActionIcon, { ...actionIconProps, children: /* @__PURE__ */ jsx(IconEye, {}) }) }),
|
|
32
35
|
/* @__PURE__ */ jsx(ViewDialog, { item, info, opened: dialogOpen, onClose: () => setDialogOpen(false) })
|
|
33
36
|
] });
|
|
34
37
|
});
|