fastapi-rtk 0.2.33 → 0.2.37
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.7 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/notifyManager.cjs +2 -1
- package/dist/.external/cjs/{@tanstack_query-core@5.85.7 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/query.cjs +10 -0
- package/dist/.external/cjs/{@tanstack_query-core@5.85.7 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/queryObserver.cjs +5 -4
- package/dist/.external/cjs/{@tanstack_query-core@5.85.7 → @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.7 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/utils.cjs +2 -1
- package/dist/.external/cjs/{@tanstack_react-query@5.85.8_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.8_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.8_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.7 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/notifyManager.mjs +2 -1
- package/dist/.external/esm/{@tanstack_query-core@5.85.7 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/query.mjs +11 -1
- package/dist/.external/esm/{@tanstack_query-core@5.85.7 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/queryObserver.mjs +5 -4
- package/dist/.external/esm/{@tanstack_query-core@5.85.7 → @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.7 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/utils.mjs +2 -1
- package/dist/.external/esm/{@tanstack_react-query@5.85.8_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.8_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.8_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/Delete/Delete.cjs +15 -17
- 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/Refresh/Refresh.cjs +4 -1
- package/dist/core/cjs/ActionIcons/View/View.cjs +8 -9
- package/dist/core/cjs/Dialogs/AddDialog.cjs +100 -0
- package/dist/core/cjs/Dialogs/DeleteDialog.cjs +60 -0
- package/dist/core/cjs/{ActionIcons/Edit → Dialogs}/EditDialog.cjs +56 -19
- package/dist/core/cjs/Dialogs/ViewDialog.cjs +50 -0
- package/dist/core/cjs/{ActionIcons/Modals → Modals}/CommonModal.cjs +19 -60
- package/dist/core/cjs/Selectors/LanguageSelector.cjs +11 -0
- package/dist/core/cjs/Tables/DataGrid/DataGrid.cjs +7 -3
- package/dist/core/cjs/Tables/NextGenDataGrid/NextGenDataGrid.cjs +13 -5
- 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 +5 -1
- package/dist/core/cjs/Wrappers/ApiProvider/Contexts/FormContext.cjs +10 -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 +14 -4
- package/dist/core/cjs/hooks/lang/useLang.cjs +5 -0
- package/dist/core/cjs/index.cjs +20 -7
- package/dist/core/cjs/translations/de.cjs +21 -0
- package/dist/core/esm/ActionIcons/Add/Add.mjs +4 -1
- package/dist/core/esm/ActionIcons/Delete/Delete.mjs +17 -19
- 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/Refresh/Refresh.mjs +4 -1
- package/dist/core/esm/ActionIcons/View/View.mjs +10 -11
- package/dist/core/esm/Dialogs/AddDialog.mjs +100 -0
- package/dist/core/esm/Dialogs/DeleteDialog.mjs +60 -0
- package/dist/core/esm/{ActionIcons/Edit → Dialogs}/EditDialog.mjs +57 -20
- package/dist/core/esm/Dialogs/ViewDialog.mjs +50 -0
- package/dist/core/esm/{ActionIcons/Modals → Modals}/CommonModal.mjs +20 -61
- package/dist/core/esm/Selectors/LanguageSelector.mjs +11 -0
- package/dist/core/esm/Tables/DataGrid/DataGrid.mjs +7 -3
- package/dist/core/esm/Tables/NextGenDataGrid/NextGenDataGrid.mjs +13 -5
- 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 +6 -2
- package/dist/core/esm/Wrappers/ApiProvider/Contexts/FormContext.mjs +11 -1
- 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 +15 -5
- package/dist/core/esm/hooks/lang/useLang.mjs +5 -0
- package/dist/core/esm/index.mjs +18 -5
- package/dist/core/esm/translations/de.mjs +22 -0
- package/dist/core/lib/ActionIcons/View/{ViewDialog.d.ts → Unused.d.ts} +1 -1
- package/dist/core/lib/{ActionIcons/Edit/EditDialog.d.ts → Dialogs/AddDialog.d.ts} +71 -28
- package/dist/core/lib/Dialogs/DeleteDialog.d.ts +129 -0
- package/dist/core/lib/Dialogs/EditDialog.d.ts +183 -0
- package/dist/core/lib/{ActionIcons/Add/AddDialog.d.ts → Dialogs/ViewDialog.d.ts} +55 -24
- package/dist/core/lib/Dialogs/index.d.ts +4 -0
- package/dist/core/lib/{ActionIcons/Modals → Modals}/CommonModal.d.ts +48 -23
- package/dist/core/lib/Modals/index.d.ts +3 -0
- 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 +10 -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 +5 -5
- package/dist/core/lib/translations/de.d.ts +18 -0
- package/dist/core/styles.css +19 -19
- 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/ActionIcons/Add/AddDialog.cjs +0 -61
- package/dist/core/cjs/ActionIcons/View/RelationPanel.cjs +0 -17
- package/dist/core/cjs/ActionIcons/View/ViewDialog.cjs +0 -54
- package/dist/core/cjs/Dialogs/AlertDialog/AlertDialog.cjs +0 -25
- package/dist/core/esm/ActionIcons/Add/AddDialog.mjs +0 -61
- package/dist/core/esm/ActionIcons/View/RelationPanel.mjs +0 -18
- package/dist/core/esm/ActionIcons/View/ViewDialog.mjs +0 -54
- 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.7 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/focusManager.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_query-core@5.85.7 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/infiniteQueryBehavior.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_query-core@5.85.7 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/mutation.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_query-core@5.85.7 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/mutationCache.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_query-core@5.85.7 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/onlineManager.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_query-core@5.85.7 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/queryCache.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_query-core@5.85.7 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/queryClient.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_query-core@5.85.7 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/retryer.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_query-core@5.85.7 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/subscribable.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_query-core@5.85.7 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/thenable.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_react-query@5.85.8_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.8_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.8_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/cjs/{@tanstack_react-query@5.85.8_react@18.3.1 → @tanstack_react-query@5.87.1_react@18.3.1}/@tanstack/react-query/build/modern/suspense.cjs +0 -0
- /package/dist/.external/esm/{@tanstack_query-core@5.85.7 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/focusManager.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_query-core@5.85.7 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/infiniteQueryBehavior.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_query-core@5.85.7 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/mutation.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_query-core@5.85.7 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/mutationCache.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_query-core@5.85.7 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/onlineManager.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_query-core@5.85.7 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/queryCache.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_query-core@5.85.7 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/queryClient.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_query-core@5.85.7 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/retryer.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_query-core@5.85.7 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/subscribable.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_query-core@5.85.7 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/thenable.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_react-query@5.85.8_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.8_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.8_react@18.3.1 → @tanstack_react-query@5.87.1_react@18.3.1}/@tanstack/react-query/build/modern/QueryErrorResetBoundary.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_react-query@5.85.8_react@18.3.1 → @tanstack_react-query@5.87.1_react@18.3.1}/@tanstack/react-query/build/modern/suspense.mjs +0 -0
- /package/dist/core/cjs/{ActionIcons/Modals → Modals}/normalProps.cjs +0 -0
- /package/dist/core/cjs/{ActionIcons/Modals → Modals}/overlayProps.cjs +0 -0
- /package/dist/core/esm/{ActionIcons/Modals → Modals}/normalProps.mjs +0 -0
- /package/dist/core/esm/{ActionIcons/Modals → Modals}/overlayProps.mjs +0 -0
- /package/dist/core/lib/{ActionIcons/Modals → Modals}/normalProps.d.ts +0 -0
- /package/dist/core/lib/{ActionIcons/Modals → Modals}/overlayProps.d.ts +0 -0
|
@@ -1,53 +1,31 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
-
const _bundledJsonforms = require("fastapi-rtk/.bundled-jsonforms");
|
|
5
4
|
const constants = require("fastapi-rtk/constants");
|
|
6
5
|
const utils = require("fastapi-rtk/utils");
|
|
7
|
-
const iconify = require("
|
|
6
|
+
const iconify = require("../../../.external/cjs/@iconify_react@6.0.1_react@18.3.1/@iconify/react/dist/iconify.cjs");
|
|
8
7
|
const core = require("@mantine/core");
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
const
|
|
12
|
-
const FormField = require("../../Tables/DataGrid/FormField/FormField.cjs");
|
|
8
|
+
const useInfo = require("../hooks/auth/useInfo.cjs");
|
|
9
|
+
require("../Wrappers/Provider/Contexts/LangContext.cjs");
|
|
10
|
+
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");
|
|
13
11
|
function CommonModal({
|
|
14
|
-
|
|
15
|
-
//* Backward compatibility to fab-react-toolkit
|
|
16
|
-
schema,
|
|
17
|
-
uischema,
|
|
18
|
-
state,
|
|
19
|
-
setState,
|
|
12
|
+
children,
|
|
20
13
|
view,
|
|
21
14
|
setView,
|
|
22
|
-
|
|
15
|
+
onReset,
|
|
23
16
|
onSubmit,
|
|
24
17
|
boxProps,
|
|
18
|
+
resetButtonText,
|
|
25
19
|
buttonText,
|
|
26
20
|
buttonLoading,
|
|
27
21
|
withTitleOptions = true,
|
|
22
|
+
withButtons = true,
|
|
28
23
|
titleOptions,
|
|
24
|
+
actionButtons,
|
|
29
25
|
...props
|
|
30
26
|
}) {
|
|
31
|
-
var _a;
|
|
32
27
|
const { fab } = useInfo.useInfo();
|
|
33
|
-
const
|
|
34
|
-
initialValues: fabSchema.defaultValues,
|
|
35
|
-
validate: form.yupResolver(fabSchema.schema)
|
|
36
|
-
});
|
|
37
|
-
const onFormSubmitRef = React.useRef(onSubmit);
|
|
38
|
-
React.useEffect(() => {
|
|
39
|
-
if (fab) {
|
|
40
|
-
onFormSubmitRef.current = form$1.onSubmit((values, e) => {
|
|
41
|
-
setState({ data: values });
|
|
42
|
-
onSubmit(e);
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
}, [fab, onSubmit, setState]);
|
|
46
|
-
React.useEffect(() => {
|
|
47
|
-
if (JSON.stringify(state.data) !== JSON.stringify(form$1.getValues())) {
|
|
48
|
-
form$1.setValues(state.data);
|
|
49
|
-
}
|
|
50
|
-
}, [state.data]);
|
|
28
|
+
const { t } = useTranslation.useTranslation();
|
|
51
29
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
52
30
|
core.Modal,
|
|
53
31
|
{
|
|
@@ -69,7 +47,7 @@ function CommonModal({
|
|
|
69
47
|
e == null ? void 0 : e.stopPropagation();
|
|
70
48
|
setView(view !== constants.VIEW_MODE.OVERLAY ? constants.VIEW_MODE.OVERLAY : constants.VIEW_MODE.NORMAL);
|
|
71
49
|
},
|
|
72
|
-
title: view !== constants.VIEW_MODE.OVERLAY ? "Overlay" : "Exit overlay",
|
|
50
|
+
title: view !== constants.VIEW_MODE.OVERLAY ? t("Overlay") : t("Exit overlay"),
|
|
73
51
|
icon: /* @__PURE__ */ jsxRuntime.jsx(
|
|
74
52
|
iconify.Icon,
|
|
75
53
|
{
|
|
@@ -87,7 +65,7 @@ function CommonModal({
|
|
|
87
65
|
e == null ? void 0 : e.stopPropagation();
|
|
88
66
|
setView(view !== constants.VIEW_MODE.FULL_SCREEN ? constants.VIEW_MODE.FULL_SCREEN : constants.VIEW_MODE.NORMAL);
|
|
89
67
|
},
|
|
90
|
-
title: view !== constants.VIEW_MODE.FULL_SCREEN ? "Full screen" : "Exit full screen",
|
|
68
|
+
title: view !== constants.VIEW_MODE.FULL_SCREEN ? t("Full screen") : t("Exit full screen"),
|
|
91
69
|
icon: /* @__PURE__ */ jsxRuntime.jsx(
|
|
92
70
|
iconify.Icon,
|
|
93
71
|
{
|
|
@@ -112,34 +90,15 @@ function CommonModal({
|
|
|
112
90
|
pos: "relative",
|
|
113
91
|
display: "flex",
|
|
114
92
|
style: { flexDirection: "column", justifyContent: "space-between" },
|
|
115
|
-
|
|
93
|
+
onReset,
|
|
94
|
+
onSubmit,
|
|
116
95
|
...boxProps,
|
|
117
96
|
children: [
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
/* @__PURE__ */ jsxRuntime.jsx(core.
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
form: form$1,
|
|
124
|
-
name: item.name,
|
|
125
|
-
label: item.label,
|
|
126
|
-
description: item.description,
|
|
127
|
-
schema: item,
|
|
128
|
-
withAsterisk: item.required
|
|
129
|
-
},
|
|
130
|
-
index
|
|
131
|
-
)) })
|
|
132
|
-
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
133
|
-
_bundledJsonforms.JsonFormsWithCustomizer,
|
|
134
|
-
{
|
|
135
|
-
schema,
|
|
136
|
-
uischema,
|
|
137
|
-
data: state.data,
|
|
138
|
-
onChange: setState,
|
|
139
|
-
customizer: jsonForms
|
|
140
|
-
}
|
|
141
|
-
),
|
|
142
|
-
/* @__PURE__ */ jsxRuntime.jsx(core.Group, { justify: "end", mt: "xl", children: /* @__PURE__ */ jsxRuntime.jsx(core.Button, { type: "submit", loading: buttonLoading, children: buttonText }) })
|
|
97
|
+
children,
|
|
98
|
+
withButtons && /* @__PURE__ */ jsxRuntime.jsxs(core.Group, { justify: "end", mt: "xl", ...actionButtons == null ? void 0 : actionButtons.groupProps, children: [
|
|
99
|
+
(actionButtons == null ? void 0 : actionButtons.withResetButton) !== false && /* @__PURE__ */ jsxRuntime.jsx(core.Button, { type: "reset", ...actionButtons == null ? void 0 : actionButtons.resetButtonProps, children: resetButtonText }),
|
|
100
|
+
(actionButtons == null ? void 0 : actionButtons.withSubmitButton) !== false && /* @__PURE__ */ jsxRuntime.jsx(core.Button, { type: "submit", loading: buttonLoading, ...actionButtons == null ? void 0 : actionButtons.submitButtonProps, children: buttonText })
|
|
101
|
+
] })
|
|
143
102
|
]
|
|
144
103
|
}
|
|
145
104
|
)
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const constants = require("fastapi-rtk/constants");
|
|
5
|
+
const core = require("@mantine/core");
|
|
6
|
+
const useLang = require("../hooks/lang/useLang.cjs");
|
|
7
|
+
const LanguageSelector = (props) => {
|
|
8
|
+
const { currentLanguage, setLanguage } = useLang.useLang();
|
|
9
|
+
return /* @__PURE__ */ jsxRuntime.jsx(core.Select, { data: constants.BASE_LANGUAGES, value: currentLanguage, allowDeselect: false, onChange: setLanguage, ...props });
|
|
10
|
+
};
|
|
11
|
+
exports.LanguageSelector = LanguageSelector;
|
|
@@ -3,8 +3,10 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
3
3
|
const jsxRuntime = require("react/jsx-runtime");
|
|
4
4
|
const React = require("react");
|
|
5
5
|
const core = require("@mantine/core");
|
|
6
|
-
const AddDialog = require("../../
|
|
7
|
-
const
|
|
6
|
+
const AddDialog = require("../../Dialogs/AddDialog.cjs");
|
|
7
|
+
const DeleteDialog = require("../../Dialogs/DeleteDialog.cjs");
|
|
8
|
+
const EditDialog = require("../../Dialogs/EditDialog.cjs");
|
|
9
|
+
const ViewDialog = require("../../Dialogs/ViewDialog.cjs");
|
|
8
10
|
const LazyLoadWrapper = require("../../Wrappers/LazyLoadWrapper/LazyLoadWrapper.cjs");
|
|
9
11
|
const useApi = require("../../hooks/api/useApi.cjs");
|
|
10
12
|
const useForms = require("../../hooks/api/useForms.cjs");
|
|
@@ -58,8 +60,10 @@ const DataGrid = React.forwardRef((props, ref) => {
|
|
|
58
60
|
const hideCheckbox = bulkActions === null;
|
|
59
61
|
return /* @__PURE__ */ jsxRuntime.jsxs(core.Paper, { ref, h: "100%", display: "flex", pos: "relative", style: { flexDirection: "column", ...styles }, children: [
|
|
60
62
|
/* @__PURE__ */ jsxRuntime.jsxs(LazyLoadWrapper.LazyLoadWrapper, { cond: !!info, children: [
|
|
63
|
+
/* @__PURE__ */ jsxRuntime.jsx(ViewDialog.ViewDialog, {}),
|
|
61
64
|
/* @__PURE__ */ jsxRuntime.jsx(AddDialog.AddDialog, { jsonForms: form == null ? void 0 : form.add }),
|
|
62
|
-
/* @__PURE__ */ jsxRuntime.jsx(EditDialog.EditDialog, { jsonForms: form == null ? void 0 : form.edit })
|
|
65
|
+
/* @__PURE__ */ jsxRuntime.jsx(EditDialog.EditDialog, { jsonForms: form == null ? void 0 : form.edit }),
|
|
66
|
+
/* @__PURE__ */ jsxRuntime.jsx(DeleteDialog.DeleteDialog, {})
|
|
63
67
|
] }),
|
|
64
68
|
!hideToolbar ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
65
69
|
Toolbar.Toolbar,
|
|
@@ -7,8 +7,10 @@ const utils = require("fastapi-rtk/utils");
|
|
|
7
7
|
const core = require("@mantine/core");
|
|
8
8
|
const index_esm = require("../../../../.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/dist/index.esm.cjs");
|
|
9
9
|
const React = require("react");
|
|
10
|
-
const AddDialog = require("../../
|
|
11
|
-
const
|
|
10
|
+
const AddDialog = require("../../Dialogs/AddDialog.cjs");
|
|
11
|
+
const DeleteDialog = require("../../Dialogs/DeleteDialog.cjs");
|
|
12
|
+
const EditDialog = require("../../Dialogs/EditDialog.cjs");
|
|
13
|
+
const ViewDialog = require("../../Dialogs/ViewDialog.cjs");
|
|
12
14
|
const LazyLoadWrapper = require("../../Wrappers/LazyLoadWrapper/LazyLoadWrapper.cjs");
|
|
13
15
|
const useApi = require("../../hooks/api/useApi.cjs");
|
|
14
16
|
const useForms = require("../../hooks/api/useForms.cjs");
|
|
@@ -20,6 +22,7 @@ const useData = require("./hooks/useData.cjs");
|
|
|
20
22
|
const useEvent = require("./hooks/useEvent.cjs");
|
|
21
23
|
const useFilters = require("./hooks/useFilters.cjs");
|
|
22
24
|
const useGlobalFilter = require("./hooks/useGlobalFilter.cjs");
|
|
25
|
+
const useI18n = require("./hooks/useI18n.cjs");
|
|
23
26
|
const usePagination = require("./hooks/usePagination.cjs");
|
|
24
27
|
const useSize = require("./hooks/useSize.cjs");
|
|
25
28
|
const useSorting = require("./hooks/useSorting.cjs");
|
|
@@ -27,7 +30,7 @@ const useToolbar = require("./hooks/useToolbar/useToolbar.cjs");
|
|
|
27
30
|
const useToolbarAlertBanner = require("./hooks/useToolbarAlertBanner/useToolbarAlertBanner.cjs");
|
|
28
31
|
const baseProps = { enableStickyHeader: true, enableColumnPinning: true };
|
|
29
32
|
const NextGenDataGrid = React.forwardRef((props, ref) => {
|
|
30
|
-
var _a, _b, _c;
|
|
33
|
+
var _a, _b, _c, _d, _e;
|
|
31
34
|
const { info, data, queryParams, setQueryParams, refetch, specialKey } = useApi.useApi();
|
|
32
35
|
const propsFromMantineTheme = core.useProps("NextGenDataGrid", {}, {});
|
|
33
36
|
const {
|
|
@@ -147,6 +150,7 @@ const NextGenDataGrid = React.forwardRef((props, ref) => {
|
|
|
147
150
|
const checkboxProps = useCheckbox.useCheckbox(onSelectCheckbox, bulkActions);
|
|
148
151
|
const filterProps = useFilters.useFilters();
|
|
149
152
|
const toolbarAlertBannerProps = useToolbarAlertBanner.useToolbarAlertBanner(toolbar);
|
|
153
|
+
const i18nProps = useI18n.useI18n();
|
|
150
154
|
const mrtProps = React.useMemo(
|
|
151
155
|
() => utils.deepMerge(
|
|
152
156
|
baseProps,
|
|
@@ -163,6 +167,7 @@ const NextGenDataGrid = React.forwardRef((props, ref) => {
|
|
|
163
167
|
checkboxProps,
|
|
164
168
|
filterProps,
|
|
165
169
|
toolbarAlertBannerProps,
|
|
170
|
+
i18nProps,
|
|
166
171
|
table
|
|
167
172
|
),
|
|
168
173
|
[
|
|
@@ -180,6 +185,7 @@ const NextGenDataGrid = React.forwardRef((props, ref) => {
|
|
|
180
185
|
checkboxProps,
|
|
181
186
|
filterProps,
|
|
182
187
|
toolbarAlertBannerProps,
|
|
188
|
+
i18nProps,
|
|
183
189
|
table
|
|
184
190
|
]
|
|
185
191
|
);
|
|
@@ -218,8 +224,10 @@ const NextGenDataGrid = React.forwardRef((props, ref) => {
|
|
|
218
224
|
}, []);
|
|
219
225
|
return /* @__PURE__ */ jsxRuntime.jsxs(core.Box, { pos: "relative", h: "100%", w: "100%", mih: 0, flex: 1, ...wrapperProps, children: [
|
|
220
226
|
/* @__PURE__ */ jsxRuntime.jsxs(LazyLoadWrapper.LazyLoadWrapper, { cond: !!info, children: [
|
|
221
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
222
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
227
|
+
/* @__PURE__ */ jsxRuntime.jsx(ViewDialog.ViewDialog, { ...(_b = form == null ? void 0 : form.view) == null ? void 0 : _b.dialogProps }),
|
|
228
|
+
/* @__PURE__ */ jsxRuntime.jsx(AddDialog.AddDialog, { jsonForms: form == null ? void 0 : form.add, ...(_c = form == null ? void 0 : form.add) == null ? void 0 : _c.dialogProps }),
|
|
229
|
+
/* @__PURE__ */ jsxRuntime.jsx(EditDialog.EditDialog, { jsonForms: form == null ? void 0 : form.edit, ...(_d = form == null ? void 0 : form.edit) == null ? void 0 : _d.dialogProps }),
|
|
230
|
+
/* @__PURE__ */ jsxRuntime.jsx(DeleteDialog.DeleteDialog, { ...(_e = form == null ? void 0 : form.delete) == null ? void 0 : _e.dialogProps })
|
|
223
231
|
] }),
|
|
224
232
|
/* @__PURE__ */ jsxRuntime.jsx(index_esm.MantineReactTable, { table: mrtTable, ...rest }),
|
|
225
233
|
children == null ? void 0 : children({ table: mrtTable }),
|
|
@@ -10,8 +10,10 @@ const hooks = require("@mantine/hooks");
|
|
|
10
10
|
const clsx = require("../../../../../../../.external/cjs/clsx@2.1.1/clsx/dist/clsx.cjs");
|
|
11
11
|
const React = require("react");
|
|
12
12
|
const useApi = require("../../../../../hooks/api/useApi.cjs");
|
|
13
|
+
require("../../../../../Wrappers/Provider/Contexts/LangContext.cjs");
|
|
13
14
|
const utils$1 = require("../utils.cjs");
|
|
14
15
|
const HeaderInput = require("./HeaderInput.cjs");
|
|
16
|
+
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");
|
|
15
17
|
const getLocalStorageValue = (key, defaultValue) => {
|
|
16
18
|
const value = localStorage.getItem(key);
|
|
17
19
|
if (value === null) {
|
|
@@ -69,6 +71,7 @@ function ColumnHeaderFilterInput({
|
|
|
69
71
|
mrtProps
|
|
70
72
|
}) {
|
|
71
73
|
var _a, _b;
|
|
74
|
+
const { t } = useTranslation.useTranslation();
|
|
72
75
|
const { column } = mrtProps;
|
|
73
76
|
const { path, info, queryParams, setQueryParams } = useApi.useApi();
|
|
74
77
|
const schema = React.useMemo(() => {
|
|
@@ -164,7 +167,7 @@ function ColumnHeaderFilterInput({
|
|
|
164
167
|
w: "100%",
|
|
165
168
|
variant: "unstyled",
|
|
166
169
|
disabled: !(filters == null ? void 0 : filters.length),
|
|
167
|
-
title: !filters.length ? "No filters" : void 0,
|
|
170
|
+
title: !filters.length ? t("No filters") : void 0,
|
|
168
171
|
placeholder: (_a2 = mrtProps.table.options.localization.filterByColumn) == null ? void 0 : _a2.replace(
|
|
169
172
|
"{column}",
|
|
170
173
|
String(mrtProps.column.columnDef.header)
|
package/dist/core/cjs/Tables/NextGenDataGrid/hooks/useColumns/HeaderAdvancedFiltersMenuButton.cjs
CHANGED
|
@@ -5,9 +5,12 @@ const core = require("@mantine/core");
|
|
|
5
5
|
const React = require("react");
|
|
6
6
|
const useApi = require("../../../../hooks/api/useApi.cjs");
|
|
7
7
|
const useAuth = require("../../../../hooks/auth/useAuth.cjs");
|
|
8
|
+
require("../../../../Wrappers/Provider/Contexts/LangContext.cjs");
|
|
8
9
|
const AdvancedFilters = require("./AdvancedFilters.cjs");
|
|
9
10
|
const FilterMenuButton = require("./FilterMenuButton.cjs");
|
|
11
|
+
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");
|
|
10
12
|
const HeaderAdvancedFiltersMenuButton = ({ filters, mrtProps }) => {
|
|
13
|
+
const { t } = useTranslation.useTranslation();
|
|
11
14
|
const { table, column } = mrtProps;
|
|
12
15
|
const api = useApi.useApi();
|
|
13
16
|
const auth = useAuth.useAuth();
|
|
@@ -42,7 +45,7 @@ const HeaderAdvancedFiltersMenuButton = ({ filters, mrtProps }) => {
|
|
|
42
45
|
table,
|
|
43
46
|
filters,
|
|
44
47
|
filterIconWrapperProps: {
|
|
45
|
-
label: table.options.localization.advancedFilters ?? "Advanced Filters",
|
|
48
|
+
label: table.options.localization.advancedFilters ?? t("Advanced Filters"),
|
|
46
49
|
position: "top",
|
|
47
50
|
withArrow: false,
|
|
48
51
|
openDelay: 1e3
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const useApi = require("../../../hooks/api/useApi.cjs");
|
|
4
4
|
function useData() {
|
|
5
|
-
const { data, loading } = useApi.useApi();
|
|
5
|
+
const { info, data, loading, dataLoading } = useApi.useApi();
|
|
6
6
|
return {
|
|
7
7
|
data: (data == null ? void 0 : data.result) || [],
|
|
8
8
|
rowCount: (data == null ? void 0 : data.count) || 0,
|
|
9
|
-
state: { showLoadingOverlay: loading }
|
|
9
|
+
state: { showLoadingOverlay: info ? dataLoading : loading }
|
|
10
10
|
};
|
|
11
11
|
}
|
|
12
12
|
exports.useData = useData;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const useLang = require("../../../hooks/lang/useLang.cjs");
|
|
4
|
+
const useI18n = () => {
|
|
5
|
+
const { currentMRTLocalization: localization } = useLang.useLang();
|
|
6
|
+
return { localization };
|
|
7
|
+
};
|
|
8
|
+
exports.useI18n = useI18n;
|
|
@@ -48,10 +48,14 @@ function ApiProvider({
|
|
|
48
48
|
const apiProxy = zustand.useProxy(api);
|
|
49
49
|
const bulkActions = useProvideBulk$1.useProvideBulk(apiProxy, bulkParams);
|
|
50
50
|
const bulkActionsProxy = zustand.useProxy(bulkActions);
|
|
51
|
+
const formView = useProvideForm.useProvideForm();
|
|
52
|
+
const [formViewProxy] = React.useState(() => zustand.createProxy(formView));
|
|
51
53
|
const formAdd = useProvideForm.useProvideForm();
|
|
52
54
|
const [formAddProxy] = React.useState(() => zustand.createProxy(formAdd));
|
|
53
55
|
const formEdit = useProvideForm.useProvideForm();
|
|
54
56
|
const [formEditProxy] = React.useState(() => zustand.createProxy(formEdit));
|
|
55
|
-
|
|
57
|
+
const formDelete = useProvideForm.useProvideForm();
|
|
58
|
+
const [formDeleteProxy] = React.useState(() => zustand.createProxy(formDelete));
|
|
59
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ApiContext.ApiContextProvider, { value: apiProxy, children: /* @__PURE__ */ jsxRuntime.jsx(BulkActionsContext.BulkActionsContextProvider, { value: bulkActionsProxy, children: /* @__PURE__ */ jsxRuntime.jsx(FormContext.FormContextViewProvider, { value: formViewProxy, children: /* @__PURE__ */ jsxRuntime.jsx(FormContext.FormContextAddProvider, { value: formAddProxy, children: /* @__PURE__ */ jsxRuntime.jsx(FormContext.FormContextEditProvider, { value: formEditProxy, children: /* @__PURE__ */ jsxRuntime.jsx(FormContext.FormContextDeleteProvider, { value: formDeleteProxy, children }) }) }) }) }) });
|
|
56
60
|
}
|
|
57
61
|
exports.ApiProvider = ApiProvider;
|
|
@@ -1,13 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const utils = require("fastapi-rtk/utils");
|
|
4
|
+
const [FormContextViewProvider, useFormViewProvider] = utils.createSafeContext(
|
|
5
|
+
"useForms('view') must be used within an ApiProvider"
|
|
6
|
+
);
|
|
4
7
|
const [FormContextAddProvider, useFormAddProvider] = utils.createSafeContext(
|
|
5
8
|
"useForms('add') must be used within an ApiProvider"
|
|
6
9
|
);
|
|
7
10
|
const [FormContextEditProvider, useFormEditProvider] = utils.createSafeContext(
|
|
8
11
|
"useForms('edit') must be used within an ApiProvider"
|
|
9
12
|
);
|
|
13
|
+
const [FormContextDeleteProvider, useFormDeleteProvider] = utils.createSafeContext(
|
|
14
|
+
"useForms('delete') must be used within an ApiProvider"
|
|
15
|
+
);
|
|
10
16
|
exports.FormContextAddProvider = FormContextAddProvider;
|
|
17
|
+
exports.FormContextDeleteProvider = FormContextDeleteProvider;
|
|
11
18
|
exports.FormContextEditProvider = FormContextEditProvider;
|
|
19
|
+
exports.FormContextViewProvider = FormContextViewProvider;
|
|
12
20
|
exports.useFormAddProvider = useFormAddProvider;
|
|
21
|
+
exports.useFormDeleteProvider = useFormDeleteProvider;
|
|
13
22
|
exports.useFormEditProvider = useFormEditProvider;
|
|
23
|
+
exports.useFormViewProvider = useFormViewProvider;
|
|
@@ -3,8 +3,9 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
3
3
|
const React = require("react");
|
|
4
4
|
const utils = require("fastapi-rtk/utils");
|
|
5
5
|
const hooks = require("@mantine/hooks");
|
|
6
|
-
const utils$1 = require("../../../../../.external/cjs/@tanstack_query-core@5.
|
|
7
|
-
const useQuery = require("../../../../../.external/cjs/@tanstack_react-query@5.
|
|
6
|
+
const utils$1 = require("../../../../../.external/cjs/@tanstack_query-core@5.87.1/@tanstack/query-core/build/modern/utils.cjs");
|
|
7
|
+
const useQuery = require("../../../../../.external/cjs/@tanstack_react-query@5.87.1_react@18.3.1/@tanstack/react-query/build/modern/useQuery.cjs");
|
|
8
|
+
const useLang = require("../../../hooks/lang/useLang.cjs");
|
|
8
9
|
const createItem = require("../utils/api/createItem.cjs");
|
|
9
10
|
const deleteItem = require("../utils/api/deleteItem.cjs");
|
|
10
11
|
const downloadItems = require("../utils/api/downloadItems.cjs");
|
|
@@ -99,14 +100,15 @@ function useProvideApi({
|
|
|
99
100
|
const [error, setError] = React.useState();
|
|
100
101
|
const memoizedError = React.useMemo(() => error, [error]);
|
|
101
102
|
const resetError = React.useCallback(() => setError(void 0), []);
|
|
103
|
+
const { currentLanguage } = useLang.useLang();
|
|
102
104
|
const {
|
|
103
105
|
data: info,
|
|
104
106
|
isFetching: infoLoading,
|
|
105
107
|
refetch: infoRefetch,
|
|
106
108
|
error: infoError
|
|
107
109
|
} = useQuery.useQuery({
|
|
108
|
-
queryKey: [`info`, path],
|
|
109
|
-
queryFn: ({ signal }) => api.getInfo(utils.urlJoin(path, "_info"), signal).then((data2) => ({ ...convertInfo.convertInfo(data2), path })),
|
|
110
|
+
queryKey: [`info`, path, currentLanguage],
|
|
111
|
+
queryFn: ({ signal }) => api.getInfo(utils.urlJoin(path, "_info"), { signal, headers: { "Accept-Language": currentLanguage } }).then((data2) => ({ ...convertInfo.convertInfo(data2), path })),
|
|
110
112
|
placeholderData: clearInfoOnRefetch ? null : utils$1.keepPreviousData,
|
|
111
113
|
enabled: fetchInfo,
|
|
112
114
|
retry: false,
|
|
@@ -126,7 +128,10 @@ function useProvideApi({
|
|
|
126
128
|
error: dataError
|
|
127
129
|
} = useQuery.useQuery({
|
|
128
130
|
queryKey: [`data`, memoizedQueryParamsPathRef.current, JSON.stringify(memoizedQueryParams)],
|
|
129
|
-
queryFn: ({ signal }) => memoizedQueryParams ? api.getItems(utils.urlJoin(memoizedQueryParamsPathRef.current, "/"), memoizedQueryParams,
|
|
131
|
+
queryFn: ({ signal }) => memoizedQueryParams ? api.getItems(utils.urlJoin(memoizedQueryParamsPathRef.current, "/"), memoizedQueryParams, {
|
|
132
|
+
signal,
|
|
133
|
+
headers: { "Accept-Language": currentLanguage }
|
|
134
|
+
}).then((data2) => ({
|
|
130
135
|
...data2,
|
|
131
136
|
result: data2.result.map((item, index) => ({ ...item, id: data2.ids[index] })),
|
|
132
137
|
path: memoizedQueryParamsPathRef.current,
|
|
@@ -162,7 +167,9 @@ function useProvideApi({
|
|
|
162
167
|
async (id) => {
|
|
163
168
|
try {
|
|
164
169
|
resetError();
|
|
165
|
-
const response = await api.getItem(pathRef.current, utils.convertId(id)
|
|
170
|
+
const response = await api.getItem(pathRef.current, utils.convertId(id), {
|
|
171
|
+
headers: { "Accept-Language": currentLanguage }
|
|
172
|
+
});
|
|
166
173
|
return response;
|
|
167
174
|
} catch (error2) {
|
|
168
175
|
setError({ message: `Couldn't fetch item with id ${id}`, originalError: error2 });
|
|
@@ -171,7 +178,7 @@ function useProvideApi({
|
|
|
171
178
|
}
|
|
172
179
|
}
|
|
173
180
|
},
|
|
174
|
-
[api, resetError, throwOnError]
|
|
181
|
+
[api, currentLanguage, resetError, throwOnError]
|
|
175
182
|
);
|
|
176
183
|
const addEntry = React.useCallback(
|
|
177
184
|
async (item) => {
|
|
@@ -179,7 +186,9 @@ function useProvideApi({
|
|
|
179
186
|
try {
|
|
180
187
|
resetError();
|
|
181
188
|
const func = ((_a = infoRef.current) == null ? void 0 : _a.add_type) === "form" ? api.formCreateItem : api.createItem;
|
|
182
|
-
const response = await func(pathRef.current, item
|
|
189
|
+
const response = await func(pathRef.current, item, {
|
|
190
|
+
headers: { "Accept-Language": currentLanguage }
|
|
191
|
+
});
|
|
183
192
|
return response;
|
|
184
193
|
} catch (error2) {
|
|
185
194
|
setError({ message: `Couldn't add item`, originalError: error2 });
|
|
@@ -188,7 +197,7 @@ function useProvideApi({
|
|
|
188
197
|
}
|
|
189
198
|
}
|
|
190
199
|
},
|
|
191
|
-
[api.createItem, api.formCreateItem, resetError, throwOnError]
|
|
200
|
+
[api.createItem, api.formCreateItem, currentLanguage, resetError, throwOnError]
|
|
192
201
|
);
|
|
193
202
|
const updateEntry = React.useCallback(
|
|
194
203
|
async (id, item) => {
|
|
@@ -196,7 +205,9 @@ function useProvideApi({
|
|
|
196
205
|
try {
|
|
197
206
|
resetError();
|
|
198
207
|
const func = ((_a = infoRef.current) == null ? void 0 : _a.edit_type) === "form" ? api.formUpdateItem : api.updateItem;
|
|
199
|
-
const response = await func(pathRef.current, utils.convertId(id), item
|
|
208
|
+
const response = await func(pathRef.current, utils.convertId(id), item, {
|
|
209
|
+
headers: { "Accept-Language": currentLanguage }
|
|
210
|
+
});
|
|
200
211
|
return response;
|
|
201
212
|
} catch (error2) {
|
|
202
213
|
setError({ message: `Couldn't update item with id ${id}`, originalError: error2 });
|
|
@@ -205,13 +216,15 @@ function useProvideApi({
|
|
|
205
216
|
}
|
|
206
217
|
}
|
|
207
218
|
},
|
|
208
|
-
[api.formUpdateItem, api.updateItem, resetError, throwOnError]
|
|
219
|
+
[api.formUpdateItem, api.updateItem, currentLanguage, resetError, throwOnError]
|
|
209
220
|
);
|
|
210
221
|
const deleteEntry = React.useCallback(
|
|
211
222
|
async (id) => {
|
|
212
223
|
try {
|
|
213
224
|
resetError();
|
|
214
|
-
const response = await api.deleteItem(pathRef.current, utils.convertId(id)
|
|
225
|
+
const response = await api.deleteItem(pathRef.current, utils.convertId(id), {
|
|
226
|
+
headers: { "Accept-Language": currentLanguage }
|
|
227
|
+
});
|
|
215
228
|
return response;
|
|
216
229
|
} catch (error2) {
|
|
217
230
|
setError({ message: `Couldn't delete item with id ${id}`, originalError: error2 });
|
|
@@ -220,7 +233,7 @@ function useProvideApi({
|
|
|
220
233
|
}
|
|
221
234
|
}
|
|
222
235
|
},
|
|
223
|
-
[api, resetError, throwOnError]
|
|
236
|
+
[api, currentLanguage, resetError, throwOnError]
|
|
224
237
|
);
|
|
225
238
|
const download = React.useCallback(
|
|
226
239
|
async (label, { export_mode, delimiter, quotechar } = {}) => {
|
|
@@ -306,7 +319,11 @@ function useProvideApi({
|
|
|
306
319
|
info,
|
|
307
320
|
queryParams: memoizedQueryParams,
|
|
308
321
|
loading,
|
|
322
|
+
infoLoading,
|
|
323
|
+
dataLoading,
|
|
309
324
|
error: memoizedError,
|
|
325
|
+
infoError,
|
|
326
|
+
dataError,
|
|
310
327
|
streaming,
|
|
311
328
|
specialKey,
|
|
312
329
|
setQueryParams: setQueryParamsCallback,
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const utils = require("fastapi-rtk/utils");
|
|
4
|
-
const createItem = async (path, data) => {
|
|
5
|
-
const { fetchPath, options } = utils.createFetchParams({
|
|
6
|
-
|
|
4
|
+
const createItem = async (path, data, options) => {
|
|
5
|
+
const { fetchPath, options: fetchOptions } = utils.createFetchParams({
|
|
6
|
+
path: utils.urlJoin(path, "/"),
|
|
7
|
+
method: "POST",
|
|
8
|
+
body: data,
|
|
9
|
+
options
|
|
10
|
+
});
|
|
11
|
+
const response = await fetch(fetchPath, fetchOptions);
|
|
7
12
|
return await utils.parseResponse(response);
|
|
8
13
|
};
|
|
9
14
|
exports.createItem = createItem;
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const utils = require("fastapi-rtk/utils");
|
|
4
|
-
const deleteItem = async (path, id) => {
|
|
5
|
-
const { fetchPath, options } = utils.createFetchParams({
|
|
6
|
-
|
|
4
|
+
const deleteItem = async (path, id, options) => {
|
|
5
|
+
const { fetchPath, options: fetchOptions } = utils.createFetchParams({
|
|
6
|
+
path: utils.urlJoin(path, id.toString()),
|
|
7
|
+
method: "DELETE",
|
|
8
|
+
options
|
|
9
|
+
});
|
|
10
|
+
const response = await fetch(fetchPath, fetchOptions);
|
|
7
11
|
return await utils.parseResponse(response);
|
|
8
12
|
};
|
|
9
13
|
exports.deleteItem = deleteItem;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const utils = require("fastapi-rtk/utils");
|
|
4
|
-
const formCreateItem = async (path, data) => {
|
|
4
|
+
const formCreateItem = async (path, data, options) => {
|
|
5
5
|
const formData = utils.convertToFormData(data);
|
|
6
|
-
const { fetchPath, options } = utils.createFetchParams({ path: utils.urlJoin(path, "/"), method: "POST" });
|
|
7
|
-
|
|
6
|
+
const { fetchPath, options: fetchOptions } = utils.createFetchParams({ path: utils.urlJoin(path, "/"), method: "POST", options });
|
|
7
|
+
fetchOptions["headers"]["Content-Type"] = void 0;
|
|
8
|
+
fetchOptions["body"] = formData;
|
|
9
|
+
const response = await fetch(fetchPath, fetchOptions);
|
|
8
10
|
return await utils.parseResponse(response);
|
|
9
11
|
};
|
|
10
12
|
exports.formCreateItem = formCreateItem;
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const utils = require("fastapi-rtk/utils");
|
|
4
|
-
const formUpdateItem = async (path, id, data) => {
|
|
4
|
+
const formUpdateItem = async (path, id, data, options) => {
|
|
5
5
|
const formData = utils.convertToFormData(data);
|
|
6
|
-
const { fetchPath, options } = utils.createFetchParams({
|
|
7
|
-
|
|
6
|
+
const { fetchPath, options: fetchOptions } = utils.createFetchParams({
|
|
7
|
+
path: utils.urlJoin(path, id.toString()),
|
|
8
|
+
method: "PUT",
|
|
9
|
+
options
|
|
10
|
+
});
|
|
11
|
+
fetchOptions["headers"]["Content-Type"] = void 0;
|
|
12
|
+
fetchOptions["body"] = formData;
|
|
13
|
+
const response = await fetch(fetchPath, fetchOptions);
|
|
8
14
|
return await utils.parseResponse(response);
|
|
9
15
|
};
|
|
10
16
|
exports.formUpdateItem = formUpdateItem;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const utils = require("fastapi-rtk/utils");
|
|
4
|
-
const getInfo = async (path,
|
|
5
|
-
const { fetchPath, options } = utils.createFetchParams({ path, method: "GET" });
|
|
6
|
-
const response = await fetch(fetchPath,
|
|
4
|
+
const getInfo = async (path, options) => {
|
|
5
|
+
const { fetchPath, options: fetchOptions } = utils.createFetchParams({ path, method: "GET", options });
|
|
6
|
+
const response = await fetch(fetchPath, fetchOptions);
|
|
7
7
|
return await utils.parseResponse(response);
|
|
8
8
|
};
|
|
9
9
|
exports.getInfo = getInfo;
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const utils = require("fastapi-rtk/utils");
|
|
4
|
-
const getItem = async (path, id) => {
|
|
5
|
-
const { fetchPath, options } = utils.createFetchParams({
|
|
6
|
-
|
|
4
|
+
const getItem = async (path, id, options) => {
|
|
5
|
+
const { fetchPath, options: fetchOptions } = utils.createFetchParams({
|
|
6
|
+
path: utils.urlJoin(path, id.toString()),
|
|
7
|
+
method: "GET",
|
|
8
|
+
options
|
|
9
|
+
});
|
|
10
|
+
const response = await fetch(fetchPath, fetchOptions);
|
|
7
11
|
return await utils.parseResponse(response);
|
|
8
12
|
};
|
|
9
13
|
exports.getItem = getItem;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const utils = require("fastapi-rtk/utils");
|
|
4
|
-
const getItems = async (path, queryParams,
|
|
5
|
-
const { fetchPath, options } = utils.createFetchParams({ path, method: "GET", queryParams });
|
|
6
|
-
const response = await fetch(fetchPath,
|
|
4
|
+
const getItems = async (path, queryParams, options) => {
|
|
5
|
+
const { fetchPath, options: fetchOptions } = utils.createFetchParams({ path, method: "GET", queryParams, options });
|
|
6
|
+
const response = await fetch(fetchPath, fetchOptions);
|
|
7
7
|
return await utils.parseResponse(response);
|
|
8
8
|
};
|
|
9
9
|
exports.getItems = getItems;
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const utils = require("fastapi-rtk/utils");
|
|
4
|
-
const updateItem = async (path, id, data) => {
|
|
5
|
-
const { fetchPath, options } = utils.createFetchParams({
|
|
6
|
-
|
|
4
|
+
const updateItem = async (path, id, data, options) => {
|
|
5
|
+
const { fetchPath, options: fetchOptions } = utils.createFetchParams({
|
|
6
|
+
path: utils.urlJoin(path, id.toString()),
|
|
7
|
+
method: "PUT",
|
|
8
|
+
body: data,
|
|
9
|
+
options
|
|
10
|
+
});
|
|
11
|
+
const response = await fetch(fetchPath, fetchOptions);
|
|
7
12
|
return await utils.parseResponse(response);
|
|
8
13
|
};
|
|
9
14
|
exports.updateItem = updateItem;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const utils = require("fastapi-rtk/utils");
|
|
4
|
-
const postBulk = async (path, handler, data) => {
|
|
5
|
-
const { fetchPath, options } = utils.createFetchParams({
|
|
4
|
+
const postBulk = async (path, handler, data, options) => {
|
|
5
|
+
const { fetchPath, options: fetchOptions } = utils.createFetchParams({
|
|
6
6
|
path: utils.urlJoin(path, "/bulk", handler),
|
|
7
7
|
method: "POST",
|
|
8
|
-
body: data
|
|
8
|
+
body: data,
|
|
9
|
+
options
|
|
9
10
|
});
|
|
10
|
-
const response = await fetch(fetchPath,
|
|
11
|
+
const response = await fetch(fetchPath, fetchOptions);
|
|
11
12
|
return await utils.parseResponse(response);
|
|
12
13
|
};
|
|
13
14
|
exports.postBulk = postBulk;
|