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
|
@@ -11,16 +11,16 @@ export function useProvideApi({ path, initialQueryParams, relation, fetchInfo, c
|
|
|
11
11
|
throwOnError?: boolean;
|
|
12
12
|
streaming?: boolean;
|
|
13
13
|
}, api?: {
|
|
14
|
-
getItem: (path: any, id: any) => Promise<string | Record<string, any>>;
|
|
15
|
-
getItems: (path: string, queryParams: Record<string, any>,
|
|
16
|
-
createItem: (path: any, data: any) => Promise<string | Record<string, any>>;
|
|
17
|
-
updateItem: (path: any, id: any, data: any) => Promise<string | Record<string, any>>;
|
|
18
|
-
deleteItem: (path: any, id: any) => Promise<string | Record<string, any>>;
|
|
14
|
+
getItem: (path: any, id: any, options: any) => Promise<string | Record<string, any>>;
|
|
15
|
+
getItems: (path: string, queryParams: Record<string, any>, options: RequestInit) => Promise<Record<string, any> | string>;
|
|
16
|
+
createItem: (path: any, data: any, options: any) => Promise<string | Record<string, any>>;
|
|
17
|
+
updateItem: (path: any, id: any, data: any, options: any) => Promise<string | Record<string, any>>;
|
|
18
|
+
deleteItem: (path: any, id: any, options: any) => Promise<string | Record<string, any>>;
|
|
19
19
|
downloadItems: (path: any, queryParams: any, { label, export_mode, delimiter, quotechar }?: {}) => Promise<void>;
|
|
20
20
|
uploadItems: (path: any, file: any, { delimiter, quotechar }?: {}) => Promise<string | Record<string, any>>;
|
|
21
|
-
getInfo: (path: string,
|
|
22
|
-
formCreateItem: (path: any, data: any) => Promise<string | Record<string, any>>;
|
|
23
|
-
formUpdateItem: (path: any, id: any, data: any) => Promise<string | Record<string, any>>;
|
|
21
|
+
getInfo: (path: string, options: RequestInit) => Promise<Record<string, any>>;
|
|
22
|
+
formCreateItem: (path: any, data: any, options: any) => Promise<string | Record<string, any>>;
|
|
23
|
+
formUpdateItem: (path: any, id: any, data: any, options: any) => Promise<string | Record<string, any>>;
|
|
24
24
|
}): {
|
|
25
25
|
path: any;
|
|
26
26
|
data: unknown;
|
|
@@ -34,7 +34,11 @@ export function useProvideApi({ path, initialQueryParams, relation, fetchInfo, c
|
|
|
34
34
|
page_size: number;
|
|
35
35
|
};
|
|
36
36
|
loading: boolean;
|
|
37
|
+
infoLoading: boolean;
|
|
38
|
+
dataLoading: boolean;
|
|
37
39
|
error: undefined;
|
|
40
|
+
infoError: Error;
|
|
41
|
+
dataError: Error;
|
|
38
42
|
streaming: {
|
|
39
43
|
data: {};
|
|
40
44
|
isEnd: boolean;
|
|
@@ -5,7 +5,7 @@ export namespace defaultBulk {
|
|
|
5
5
|
export function useProvideBulk({ path }: {
|
|
6
6
|
path: any;
|
|
7
7
|
}, bulk?: {
|
|
8
|
-
postBulk: (path: any, handler: any, data: any) => Promise<string | Record<string, any>>;
|
|
8
|
+
postBulk: (path: any, handler: any, data: any, options: any) => Promise<string | Record<string, any>>;
|
|
9
9
|
}): {
|
|
10
10
|
bulkActions: {
|
|
11
11
|
selectedIds: any[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export function createItem(path: any, data: any): Promise<string | Record<string, any>>;
|
|
1
|
+
export function createItem(path: any, data: any, options: any): Promise<string | Record<string, any>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export function deleteItem(path: any, id: any): Promise<string | Record<string, any>>;
|
|
1
|
+
export function deleteItem(path: any, id: any, options: any): Promise<string | Record<string, any>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export function formCreateItem(path: any, data: any): Promise<string | Record<string, any>>;
|
|
1
|
+
export function formCreateItem(path: any, data: any, options: any): Promise<string | Record<string, any>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export function formUpdateItem(path: any, id: any, data: any): Promise<string | Record<string, any>>;
|
|
1
|
+
export function formUpdateItem(path: any, id: any, data: any, options: any): Promise<string | Record<string, any>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export function getInfo(path: string,
|
|
1
|
+
export function getInfo(path: string, options: RequestInit): Promise<Record<string, any>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export function getItem(path: any, id: any): Promise<string | Record<string, any>>;
|
|
1
|
+
export function getItem(path: any, id: any, options: any): Promise<string | Record<string, any>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export function getItems(path: string, queryParams: Record<string, any>,
|
|
1
|
+
export function getItems(path: string, queryParams: Record<string, any>, options: RequestInit): Promise<Record<string, any> | string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export function updateItem(path: any, id: any, data: any): Promise<string | Record<string, any>>;
|
|
1
|
+
export function updateItem(path: any, id: any, data: any, options: any): Promise<string | Record<string, any>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export function postBulk(path: any, handler: any, data: any): Promise<string | Record<string, any>>;
|
|
1
|
+
export function postBulk(path: any, handler: any, data: any, options: any): Promise<string | Record<string, any>>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export const InnerInnerLangContextProvider: import('react').ComponentType<{
|
|
2
|
+
value: any;
|
|
3
|
+
children: any;
|
|
4
|
+
}>;
|
|
5
|
+
export const useLangProvider: (options?: SafeContextOptions) => any;
|
|
6
|
+
export function InnerLangContextProvider({ children, MRTLocalization, ...props }: {
|
|
7
|
+
[x: string]: any;
|
|
8
|
+
children: any;
|
|
9
|
+
MRTLocalization: any;
|
|
10
|
+
}): import("react").JSX.Element;
|
|
11
|
+
export function LangContextProvider({ children, langProps, props }: {
|
|
12
|
+
children: any;
|
|
13
|
+
langProps: any;
|
|
14
|
+
props: any;
|
|
15
|
+
}): import("react").JSX.Element;
|
|
@@ -1,4 +1,32 @@
|
|
|
1
1
|
export function Provider(props: ProviderProps): JSX.Element;
|
|
2
|
+
export type GetI18nProps = {
|
|
3
|
+
/**
|
|
4
|
+
* - The props for `i18n.init`
|
|
5
|
+
*/
|
|
6
|
+
initProps?: Record<string, any>;
|
|
7
|
+
/**
|
|
8
|
+
* - A function that takes the i18n instance and returns back a i18n instance
|
|
9
|
+
*/
|
|
10
|
+
callback?: (i18n: Record<string, any>) => Record<string, any>;
|
|
11
|
+
};
|
|
12
|
+
export type LangProps = {
|
|
13
|
+
/**
|
|
14
|
+
* - The i18n instance to be used for translations. If not provided, it will use `getI18n` function from fastapi-rtk
|
|
15
|
+
*/
|
|
16
|
+
i18n?: Record<string, any>;
|
|
17
|
+
/**
|
|
18
|
+
* - The props to pass to the `getI18n` function if `i18n` is not provided
|
|
19
|
+
*/
|
|
20
|
+
getI18nProps?: GetI18nProps;
|
|
21
|
+
/**
|
|
22
|
+
* - The language to be used for translations. If not provided, defaults to language from local storage or `en`
|
|
23
|
+
*/
|
|
24
|
+
lang?: string | ((i18n: Record<string, any>) => string);
|
|
25
|
+
/**
|
|
26
|
+
* - The localization resources for the MRT (Mantine React Table)
|
|
27
|
+
*/
|
|
28
|
+
MRTLocalization?: Record<string, Record<string, string>>;
|
|
29
|
+
};
|
|
2
30
|
export type ProviderProps = {
|
|
3
31
|
/**
|
|
4
32
|
* - The base URL for the API
|
|
@@ -24,4 +52,8 @@ export type ProviderProps = {
|
|
|
24
52
|
* - Whether to inherit the Mantine theme
|
|
25
53
|
*/
|
|
26
54
|
inheritMantineTheme?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* - The props for the language context
|
|
57
|
+
*/
|
|
58
|
+
langProps?: LangProps;
|
|
27
59
|
};
|
|
@@ -349,6 +349,14 @@ export type ApiContext = {
|
|
|
349
349
|
* - Indicates whether the API request is currently loading.
|
|
350
350
|
*/
|
|
351
351
|
loading: boolean;
|
|
352
|
+
/**
|
|
353
|
+
* - Indicates whether the API info request is currently loading.
|
|
354
|
+
*/
|
|
355
|
+
infoLoading: boolean;
|
|
356
|
+
/**
|
|
357
|
+
* - Indicates whether the API data request is currently loading.
|
|
358
|
+
*/
|
|
359
|
+
dataLoading: boolean;
|
|
352
360
|
/**
|
|
353
361
|
* - An error object if the API request failed.
|
|
354
362
|
*/
|
|
@@ -356,6 +364,14 @@ export type ApiContext = {
|
|
|
356
364
|
message: string;
|
|
357
365
|
originalError: Error;
|
|
358
366
|
};
|
|
367
|
+
/**
|
|
368
|
+
* - An error object if the API info request failed.
|
|
369
|
+
*/
|
|
370
|
+
infoError?: Error;
|
|
371
|
+
/**
|
|
372
|
+
* - An error object if the API data request failed.
|
|
373
|
+
*/
|
|
374
|
+
dataError?: Error;
|
|
359
375
|
/**
|
|
360
376
|
* - An object containing streaming data and a function to fetch more data. Only available when the `ApiProvider` is configured for streaming.
|
|
361
377
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function useForms(type:
|
|
1
|
+
export function useForms(type: "view" | "add" | "edit" | "delete", options: SafeContextOptions): FormsContext;
|
|
2
2
|
export type SafeContextOptions = {
|
|
3
3
|
/**
|
|
4
4
|
* - Whether to throw an error if the context is not provided.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { useTranslation } from 'react-i18next';
|
|
2
|
+
export function useLang(options: SafeContextOptions): LangContext;
|
|
3
|
+
export { useTranslation };
|
|
4
|
+
export type SafeContextOptions = {
|
|
5
|
+
/**
|
|
6
|
+
* - Whether to throw an error if the context is not provided.
|
|
7
|
+
*/
|
|
8
|
+
throwOnError?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* - The default value to return if the context is not provided.
|
|
11
|
+
*/
|
|
12
|
+
defaultValue?: any;
|
|
13
|
+
};
|
|
14
|
+
export type LangContext = {
|
|
15
|
+
/**
|
|
16
|
+
* - The current language code (e.g., 'en', 'de').
|
|
17
|
+
*/
|
|
18
|
+
currentLanguage: string;
|
|
19
|
+
/**
|
|
20
|
+
* - Function to change the current language.
|
|
21
|
+
*/
|
|
22
|
+
setLanguage: (lng: string) => void;
|
|
23
|
+
/**
|
|
24
|
+
* - The translation object from `react-i18next`. Same as using `useTranslation` from `react-i18next`.
|
|
25
|
+
*/
|
|
26
|
+
translation: Record<string, any>;
|
|
27
|
+
/**
|
|
28
|
+
* - `useTranslation` from `react-i18next`.
|
|
29
|
+
*/
|
|
30
|
+
useTranslation: () => Record<string, any>;
|
|
31
|
+
/**
|
|
32
|
+
* - The language code stored in local storage.
|
|
33
|
+
*/
|
|
34
|
+
localStorageLanguage: string;
|
|
35
|
+
/**
|
|
36
|
+
* - Function to set the language code in local storage.
|
|
37
|
+
*/
|
|
38
|
+
setLocalStorageLanguage: (lng: string) => void;
|
|
39
|
+
};
|
package/dist/core/lib/index.d.ts
CHANGED
|
@@ -6,21 +6,21 @@ export { Edit } from './ActionIcons/Edit/Edit';
|
|
|
6
6
|
export { Refresh } from './ActionIcons/Refresh/Refresh';
|
|
7
7
|
export { Upload } from './ActionIcons/Upload/Upload';
|
|
8
8
|
export { View } from './ActionIcons/View/View';
|
|
9
|
+
export * from './Dialogs';
|
|
10
|
+
export * from './Modals';
|
|
11
|
+
export * from './sub-packages-exporter';
|
|
9
12
|
export { useApi } from './hooks/api/useApi';
|
|
10
13
|
export { useBulkActions } from './hooks/api/useBulkActions';
|
|
11
14
|
export { useForms } from './hooks/api/useForms';
|
|
12
15
|
export { useAuth } from './hooks/auth/useAuth';
|
|
13
16
|
export { useInfo } from './hooks/auth/useInfo';
|
|
14
17
|
export { UserMenu } from './Menu/UserMenu/UserMenu';
|
|
15
|
-
export {
|
|
16
|
-
export { EditDialog } from './ActionIcons/Edit/EditDialog';
|
|
17
|
-
export { CommonModal } from './ActionIcons/Modals/CommonModal';
|
|
18
|
-
export { ViewDialog } from './ActionIcons/View/ViewDialog';
|
|
18
|
+
export { LanguageSelector } from './Selectors/LanguageSelector';
|
|
19
19
|
export { ApiProvider } from './Wrappers/ApiProvider/ApiProvider';
|
|
20
20
|
export { InfiniteScroll } from './Wrappers/InfiniteScroll/InfiniteScroll';
|
|
21
21
|
export { LazyLoadWrapper } from './Wrappers/LazyLoadWrapper/LazyLoadWrapper';
|
|
22
22
|
export { Provider } from './Wrappers/Provider/Provider';
|
|
23
|
-
export * from './sub-packages-exporter';
|
|
24
23
|
export { Filter } from './Tables/DataGrid/Toolbar/Filter/Filter';
|
|
24
|
+
export { useLang, useTranslation } from './hooks/lang/useLang';
|
|
25
25
|
export { DataGrid, DataGrid as Datagrid } from './Tables/DataGrid/DataGrid';
|
|
26
26
|
export { NextGenDataGrid, NextGenDataGrid as NextGenDatagrid, NextGenDataGrid as NextGendatagrid, NextGenDataGrid as Nextgendatagrid } from './Tables/NextGenDataGrid/NextGenDataGrid';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
View: string;
|
|
3
|
+
Add: string;
|
|
4
|
+
'Add Item': string;
|
|
5
|
+
Edit: string;
|
|
6
|
+
Delete: string;
|
|
7
|
+
Refresh: string;
|
|
8
|
+
Download: string;
|
|
9
|
+
Cancel: string;
|
|
10
|
+
Overlay: string;
|
|
11
|
+
'Exit overlay': string;
|
|
12
|
+
'Full screen': string;
|
|
13
|
+
'Exit full screen': string;
|
|
14
|
+
'Are you sure you want to delete this item?': string;
|
|
15
|
+
'No filters': string;
|
|
16
|
+
'Advanced Filters': string;
|
|
17
|
+
};
|
|
18
|
+
export default _default;
|
package/dist/core/styles.css
CHANGED
|
@@ -1,4 +1,22 @@
|
|
|
1
|
-
.
|
|
1
|
+
._iconSmall_sxv3z_1 {
|
|
2
|
+
width: 14px;
|
|
3
|
+
height: 14px;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
._iconLarge_sxv3z_6 {
|
|
7
|
+
width: 34px;
|
|
8
|
+
height: 34px;
|
|
9
|
+
margin-top: 10px;
|
|
10
|
+
margin-left: 10px;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
._iconLarge_sxv3z_6:hover {
|
|
14
|
+
cursor: pointer;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
._btn_sxv3z_17:hover {
|
|
18
|
+
/* background-color: var(--mantine-color-gray-1);; */
|
|
19
|
+
}._field_zdaf7_1 {
|
|
2
20
|
/* Include font styles from theme.fn.fontStyles() if needed */
|
|
3
21
|
font-size: var(--mantine-font-size-md);
|
|
4
22
|
vertical-align: top;
|
|
@@ -49,24 +67,6 @@
|
|
|
49
67
|
}
|
|
50
68
|
._scrollbar_isyo2_1 {
|
|
51
69
|
z-index: 1;
|
|
52
|
-
}._iconSmall_sxv3z_1 {
|
|
53
|
-
width: 14px;
|
|
54
|
-
height: 14px;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
._iconLarge_sxv3z_6 {
|
|
58
|
-
width: 34px;
|
|
59
|
-
height: 34px;
|
|
60
|
-
margin-top: 10px;
|
|
61
|
-
margin-left: 10px;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
._iconLarge_sxv3z_6:hover {
|
|
65
|
-
cursor: pointer;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
._btn_sxv3z_17:hover {
|
|
69
|
-
/* background-color: var(--mantine-color-gray-1);; */
|
|
70
70
|
}.MRT_TableBody-module_root__kGhRy {
|
|
71
71
|
background-color: var(--mrt-base-background-color);
|
|
72
72
|
position: relative;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const FastAPIRTKLogger = {
|
|
4
|
+
log: (...args) => console.log("fastapi-rtk:", ...args),
|
|
5
|
+
error: (...args) => console.error("fastapi-rtk:", ...args),
|
|
6
|
+
warn: (...args) => console.warn("fastapi-rtk:", ...args)
|
|
7
|
+
};
|
|
8
|
+
exports.FastAPIRTKLogger = FastAPIRTKLogger;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const reactRouterDom = require("react-router-dom");
|
|
4
|
-
function createFetchParams({ path, method, body = void 0, queryParams = void 0 }) {
|
|
4
|
+
function createFetchParams({ path, method, body = void 0, queryParams = void 0, options: userOptions }) {
|
|
5
5
|
const data = Object.entries(queryParams || {}).reduce((acc, [key, value]) => {
|
|
6
6
|
if (Array.isArray(value) || typeof value === "object") {
|
|
7
7
|
value = JSON.stringify(value);
|
|
@@ -15,12 +15,14 @@ function createFetchParams({ path, method, body = void 0, queryParams = void 0 }
|
|
|
15
15
|
method,
|
|
16
16
|
mode: "cors",
|
|
17
17
|
credentials: "include",
|
|
18
|
-
headers: {
|
|
19
|
-
"Content-Type": "application/json"
|
|
20
|
-
},
|
|
21
18
|
redirect: "follow",
|
|
22
19
|
referrerPolicy: "no-referrer",
|
|
23
|
-
body: body ? JSON.stringify(body) : null
|
|
20
|
+
body: body ? JSON.stringify(body) : null,
|
|
21
|
+
...userOptions,
|
|
22
|
+
headers: {
|
|
23
|
+
"Content-Type": "application/json",
|
|
24
|
+
...userOptions == null ? void 0 : userOptions.headers
|
|
25
|
+
}
|
|
24
26
|
};
|
|
25
27
|
return { fetchPath: path, options };
|
|
26
28
|
}
|
package/dist/utils/cjs/index.cjs
CHANGED
|
@@ -5,6 +5,7 @@ const convertToFormData = require("./convertToFormData/convertToFormData.cjs");
|
|
|
5
5
|
const createFetchParams = require("./createFetchParams/createFetchParams.cjs");
|
|
6
6
|
const createSafeContext = require("./createSafeContext/createSafeContext.cjs");
|
|
7
7
|
const deepMerge = require("./deepMerge/deepMerge.cjs");
|
|
8
|
+
const FastAPIRTKLogger = require("./FastAPIRTKLogger/FastAPIRTKLogger.cjs");
|
|
8
9
|
const getByPath = require("./getByPath/getByPath.cjs");
|
|
9
10
|
const getItemId = require("./getItemId/getItemId.cjs");
|
|
10
11
|
const getItemName = require("./getItemName/getItemName.cjs");
|
|
@@ -21,6 +22,7 @@ exports.convertToFormData = convertToFormData.convertToFormData;
|
|
|
21
22
|
exports.createFetchParams = createFetchParams.createFetchParams;
|
|
22
23
|
exports.createSafeContext = createSafeContext.createSafeContext;
|
|
23
24
|
exports.deepMerge = deepMerge.deepMerge;
|
|
25
|
+
exports.FastAPIRTKLogger = FastAPIRTKLogger.FastAPIRTKLogger;
|
|
24
26
|
exports.getByPath = getByPath.getByPath;
|
|
25
27
|
exports.getItemId = getItemId.getItemId;
|
|
26
28
|
exports.getItemName = getItemName.getItemName;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createSearchParams } from "react-router-dom";
|
|
2
|
-
function createFetchParams({ path, method, body = void 0, queryParams = void 0 }) {
|
|
2
|
+
function createFetchParams({ path, method, body = void 0, queryParams = void 0, options: userOptions }) {
|
|
3
3
|
const data = Object.entries(queryParams || {}).reduce((acc, [key, value]) => {
|
|
4
4
|
if (Array.isArray(value) || typeof value === "object") {
|
|
5
5
|
value = JSON.stringify(value);
|
|
@@ -13,12 +13,14 @@ function createFetchParams({ path, method, body = void 0, queryParams = void 0 }
|
|
|
13
13
|
method,
|
|
14
14
|
mode: "cors",
|
|
15
15
|
credentials: "include",
|
|
16
|
-
headers: {
|
|
17
|
-
"Content-Type": "application/json"
|
|
18
|
-
},
|
|
19
16
|
redirect: "follow",
|
|
20
17
|
referrerPolicy: "no-referrer",
|
|
21
|
-
body: body ? JSON.stringify(body) : null
|
|
18
|
+
body: body ? JSON.stringify(body) : null,
|
|
19
|
+
...userOptions,
|
|
20
|
+
headers: {
|
|
21
|
+
"Content-Type": "application/json",
|
|
22
|
+
...userOptions == null ? void 0 : userOptions.headers
|
|
23
|
+
}
|
|
22
24
|
};
|
|
23
25
|
return { fetchPath: path, options };
|
|
24
26
|
}
|
package/dist/utils/esm/index.mjs
CHANGED
|
@@ -3,6 +3,7 @@ import { convertToFormData } from "./convertToFormData/convertToFormData.mjs";
|
|
|
3
3
|
import { createFetchParams } from "./createFetchParams/createFetchParams.mjs";
|
|
4
4
|
import { createSafeContext } from "./createSafeContext/createSafeContext.mjs";
|
|
5
5
|
import { deepMerge } from "./deepMerge/deepMerge.mjs";
|
|
6
|
+
import { FastAPIRTKLogger } from "./FastAPIRTKLogger/FastAPIRTKLogger.mjs";
|
|
6
7
|
import { getByPath } from "./getByPath/getByPath.mjs";
|
|
7
8
|
import { getItemId } from "./getItemId/getItemId.mjs";
|
|
8
9
|
import { getItemName } from "./getItemName/getItemName.mjs";
|
|
@@ -15,6 +16,7 @@ import { parseResponse } from "./parseResponse/parseResponse.mjs";
|
|
|
15
16
|
import { parseValue } from "./parseValue/parseValue.mjs";
|
|
16
17
|
import { normalize, urlJoin } from "./urlJoin/urlJoin.mjs";
|
|
17
18
|
export {
|
|
19
|
+
FastAPIRTKLogger,
|
|
18
20
|
convertId,
|
|
19
21
|
convertToFormData,
|
|
20
22
|
createFetchParams,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './FastAPIRTKLogger';
|
|
@@ -1,19 +1,10 @@
|
|
|
1
|
-
export function createFetchParams({ path, method, body, queryParams }: {
|
|
1
|
+
export function createFetchParams({ path, method, body, queryParams, options: userOptions }: {
|
|
2
2
|
path: any;
|
|
3
3
|
method: any;
|
|
4
4
|
body?: any;
|
|
5
5
|
queryParams?: any;
|
|
6
|
+
options: any;
|
|
6
7
|
}): {
|
|
7
8
|
fetchPath: any;
|
|
8
|
-
options:
|
|
9
|
-
method: any;
|
|
10
|
-
mode: string;
|
|
11
|
-
credentials: string;
|
|
12
|
-
headers: {
|
|
13
|
-
'Content-Type': string;
|
|
14
|
-
};
|
|
15
|
-
redirect: string;
|
|
16
|
-
referrerPolicy: string;
|
|
17
|
-
body: string;
|
|
18
|
-
};
|
|
9
|
+
options: any;
|
|
19
10
|
};
|
|
@@ -3,6 +3,7 @@ export * from './convertToFormData/index';
|
|
|
3
3
|
export * from './createFetchParams/index';
|
|
4
4
|
export * from './createSafeContext/index';
|
|
5
5
|
export * from './deepMerge/index';
|
|
6
|
+
export * from './FastAPIRTKLogger/index';
|
|
6
7
|
export * from './getByPath/index';
|
|
7
8
|
export * from './getItemId/index';
|
|
8
9
|
export * from './getItemName/index';
|
package/package.json
CHANGED
|
@@ -1,61 +0,0 @@
|
|
|
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 utils = require("fastapi-rtk/utils");
|
|
6
|
-
const core = require("@mantine/core");
|
|
7
|
-
const hooks = require("@mantine/hooks");
|
|
8
|
-
const React = require("react");
|
|
9
|
-
const useApi = require("../../hooks/api/useApi.cjs");
|
|
10
|
-
const useForms = require("../../hooks/api/useForms.cjs");
|
|
11
|
-
const CommonModal = require("../Modals/CommonModal.cjs");
|
|
12
|
-
const normalProps = require("../Modals/normalProps.cjs");
|
|
13
|
-
const overlayProps = require("../Modals/overlayProps.cjs");
|
|
14
|
-
function AddDialog({ jsonForms: __jsonForms, ...props }) {
|
|
15
|
-
const { info, refetch, refetchInfo, addEntry } = useApi.useApi();
|
|
16
|
-
const { opened, setOpened, state, getState, setState, reset, view, setView } = useForms.useForms("add");
|
|
17
|
-
const [loading, setLoading] = hooks.useDebouncedState(false, constants.DEBOUNCE_LOADING_DELAY);
|
|
18
|
-
const { jsonForms: _jsonForms } = core.useProps("AddDialog", {}, {});
|
|
19
|
-
const jsonForms = React.useMemo(() => utils.deepMerge(_jsonForms, __jsonForms), [_jsonForms, __jsonForms]);
|
|
20
|
-
const onSubmit = React.useCallback(
|
|
21
|
-
(e) => {
|
|
22
|
-
e == null ? void 0 : e.preventDefault();
|
|
23
|
-
setLoading(true);
|
|
24
|
-
addEntry(getState().data).then((res) => {
|
|
25
|
-
if (res) {
|
|
26
|
-
refetch();
|
|
27
|
-
refetchInfo();
|
|
28
|
-
}
|
|
29
|
-
}).catch(() => {
|
|
30
|
-
}).finally(() => {
|
|
31
|
-
setLoading(false);
|
|
32
|
-
setOpened(false);
|
|
33
|
-
});
|
|
34
|
-
},
|
|
35
|
-
[addEntry, getState, refetch, refetchInfo, setLoading, setOpened]
|
|
36
|
-
);
|
|
37
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
38
|
-
CommonModal.CommonModal,
|
|
39
|
-
{
|
|
40
|
-
fabSchema: info.add,
|
|
41
|
-
schema: info.add_schema,
|
|
42
|
-
uischema: info.add_uischema,
|
|
43
|
-
state,
|
|
44
|
-
setState,
|
|
45
|
-
view,
|
|
46
|
-
setView,
|
|
47
|
-
jsonForms,
|
|
48
|
-
onSubmit,
|
|
49
|
-
buttonText: "Add",
|
|
50
|
-
buttonLoading: loading,
|
|
51
|
-
opened,
|
|
52
|
-
onClose: () => setOpened(false),
|
|
53
|
-
onExitTransitionEnd: reset,
|
|
54
|
-
...view === constants.VIEW_MODE.OVERLAY ? overlayProps.overlayProps : {},
|
|
55
|
-
...view === constants.VIEW_MODE.NORMAL ? normalProps.normalProps : {},
|
|
56
|
-
...props,
|
|
57
|
-
title: props.title ?? (info == null ? void 0 : info.add_title)
|
|
58
|
-
}
|
|
59
|
-
);
|
|
60
|
-
}
|
|
61
|
-
exports.AddDialog = AddDialog;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const jsxRuntime = require("react/jsx-runtime");
|
|
3
|
-
const utils = require("fastapi-rtk/utils");
|
|
4
|
-
const React = require("react");
|
|
5
|
-
const DataGrid = require("../../Tables/DataGrid/DataGrid.cjs");
|
|
6
|
-
const ApiProvider = require("../../Wrappers/ApiProvider/ApiProvider.cjs");
|
|
7
|
-
const useApi = require("../../hooks/api/useApi.cjs");
|
|
8
|
-
function RelationPanel({ relatedPath, ...relation }) {
|
|
9
|
-
const { path } = useApi.useApi();
|
|
10
|
-
utils.urlJoin(
|
|
11
|
-
path ? path.substring(0, path.lastIndexOf("/")) : "",
|
|
12
|
-
relatedPath.substring(0, relatedPath.lastIndexOf("/"))
|
|
13
|
-
);
|
|
14
|
-
return /* @__PURE__ */ jsxRuntime.jsx(ApiProvider.ApiProvider, { resource_name: relatedPath.replace("/", ""), relation, children: /* @__PURE__ */ jsxRuntime.jsx(DataGrid.DataGrid, { hideToolbar: true, hideDownload: false }) });
|
|
15
|
-
}
|
|
16
|
-
const RelationPanel$1 = React.memo(RelationPanel);
|
|
17
|
-
module.exports = RelationPanel$1;
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
-
const utils = require("fastapi-rtk/utils");
|
|
5
|
-
const core = require("@mantine/core");
|
|
6
|
-
const RelationPanel = require("./RelationPanel.cjs");
|
|
7
|
-
function ViewDialog({ item, info, opened, onClose, ...props }) {
|
|
8
|
-
const defaultProps = {
|
|
9
|
-
modal: {},
|
|
10
|
-
tabs: {},
|
|
11
|
-
tabsList: {},
|
|
12
|
-
tabsPanel: {}
|
|
13
|
-
};
|
|
14
|
-
const { modal, tabs, tabsList, tabsPanel } = core.useProps("ViewDialog", defaultProps, props);
|
|
15
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
16
|
-
core.Modal,
|
|
17
|
-
{
|
|
18
|
-
opened,
|
|
19
|
-
onClose,
|
|
20
|
-
title: `${item == null ? void 0 : item.show_title} (#${utils.convertId(utils.getItemId(item))})`,
|
|
21
|
-
size: "lg",
|
|
22
|
-
centered: true,
|
|
23
|
-
zIndex: 1e3,
|
|
24
|
-
...modal,
|
|
25
|
-
children: item && /* @__PURE__ */ jsxRuntime.jsxs(core.Tabs, { defaultValue: "details", ...tabs, children: [
|
|
26
|
-
/* @__PURE__ */ jsxRuntime.jsxs(core.Tabs.List, { ...tabsList, children: [
|
|
27
|
-
/* @__PURE__ */ jsxRuntime.jsx(core.Tabs.Tab, { value: "details", children: "Details" }),
|
|
28
|
-
info.relations.map((relation, index) => {
|
|
29
|
-
return /* @__PURE__ */ jsxRuntime.jsx(core.Tabs.Tab, { value: relation.name, children: relation.name }, index);
|
|
30
|
-
})
|
|
31
|
-
] }),
|
|
32
|
-
/* @__PURE__ */ jsxRuntime.jsx(core.Tabs.Panel, { pt: "xs", value: "details", ...tabsPanel, children: /* @__PURE__ */ jsxRuntime.jsx(core.Paper, { p: "xs", withBorder: true, children: /* @__PURE__ */ jsxRuntime.jsx(core.Stack, { spacing: "md", children: /* @__PURE__ */ jsxRuntime.jsx(core.ScrollArea, { h: 450, type: "auto", children: item.show_columns.map((column, index) => {
|
|
33
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(core.Grid, { maw: 500, children: [
|
|
34
|
-
/* @__PURE__ */ jsxRuntime.jsx(core.Grid.Col, { span: 4, children: /* @__PURE__ */ jsxRuntime.jsx(core.Text, { size: "md", children: item.label_columns[column] }) }),
|
|
35
|
-
/* @__PURE__ */ jsxRuntime.jsx(core.Grid.Col, { span: 1, children: /* @__PURE__ */ jsxRuntime.jsx(core.Text, { size: "xs", children: ":" }) }),
|
|
36
|
-
/* @__PURE__ */ jsxRuntime.jsx(core.Grid.Col, { span: 6, children: /* @__PURE__ */ jsxRuntime.jsx(core.Text, { size: "md", children: utils.getValue(item.result, column) }) })
|
|
37
|
-
] }, index);
|
|
38
|
-
}) }) }) }) }),
|
|
39
|
-
info.relations.map((relation, index) => {
|
|
40
|
-
return /* @__PURE__ */ jsxRuntime.jsx(core.Tabs.Panel, { pt: "xs", value: relation.name, children: /* @__PURE__ */ jsxRuntime.jsx(core.Paper, { withBorder: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
41
|
-
RelationPanel,
|
|
42
|
-
{
|
|
43
|
-
relatedPath: relation.path,
|
|
44
|
-
id: utils.convertId(utils.getItemId(item)),
|
|
45
|
-
foreign_key: relation.foreign_key,
|
|
46
|
-
type: relation.type
|
|
47
|
-
}
|
|
48
|
-
) }) }, index);
|
|
49
|
-
})
|
|
50
|
-
] })
|
|
51
|
-
}
|
|
52
|
-
);
|
|
53
|
-
}
|
|
54
|
-
exports.ViewDialog = ViewDialog;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
-
const core = require("@mantine/core");
|
|
5
|
-
function AlertDialog({ opened, onClose, handleAccept, handleReject }) {
|
|
6
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7
|
-
core.Modal,
|
|
8
|
-
{
|
|
9
|
-
opened,
|
|
10
|
-
onClose,
|
|
11
|
-
"aria-labelledby": "alert-dialog-title",
|
|
12
|
-
"aria-describedby": "alert-dialog-description",
|
|
13
|
-
title: "Item löschen?",
|
|
14
|
-
centered: true,
|
|
15
|
-
children: [
|
|
16
|
-
"Sind Sie Sicher, dass Sie das Item löschen wollen?",
|
|
17
|
-
/* @__PURE__ */ jsxRuntime.jsxs(core.Group, { align: "right", mt: "xl", justify: "flex-end", children: [
|
|
18
|
-
/* @__PURE__ */ jsxRuntime.jsx(core.Button, { onClick: handleReject, variant: "default", children: "Abbrechen" }),
|
|
19
|
-
/* @__PURE__ */ jsxRuntime.jsx(core.Button, { onClick: handleAccept, color: "red", children: "Löschen" })
|
|
20
|
-
] })
|
|
21
|
-
]
|
|
22
|
-
}
|
|
23
|
-
);
|
|
24
|
-
}
|
|
25
|
-
exports.AlertDialog = AlertDialog;
|