fastapi-rtk 0.2.32 → 0.2.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.external/cjs/{@tanstack_query-core@5.85.6 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/notifyManager.cjs +2 -1
- package/dist/.external/cjs/{@tanstack_query-core@5.85.6 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/query.cjs +10 -0
- package/dist/.external/cjs/{@tanstack_query-core@5.85.6 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/queryObserver.cjs +5 -4
- package/dist/.external/cjs/{@tanstack_query-core@5.85.6 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/removable.cjs +3 -2
- package/dist/.external/cjs/@tanstack_query-core@5.87.1/@tanstack/query-core/build/modern/timeoutManager.cjs +78 -0
- package/dist/.external/cjs/{@tanstack_query-core@5.85.6 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/utils.cjs +26 -22
- package/dist/.external/cjs/{@tanstack_react-query@5.85.6_react@18.3.1 → @tanstack_react-query@5.87.1_react@18.3.1}/@tanstack/react-query/build/modern/errorBoundaryUtils.cjs +1 -1
- package/dist/.external/cjs/{@tanstack_react-query@5.85.6_react@18.3.1 → @tanstack_react-query@5.87.1_react@18.3.1}/@tanstack/react-query/build/modern/suspense.cjs +6 -2
- package/dist/.external/cjs/{@tanstack_react-query@5.85.6_react@18.3.1 → @tanstack_react-query@5.87.1_react@18.3.1}/@tanstack/react-query/build/modern/useBaseQuery.cjs +2 -2
- package/dist/.external/cjs/{@tanstack_react-query@5.85.6_react@18.3.1 → @tanstack_react-query@5.87.1_react@18.3.1}/@tanstack/react-query/build/modern/useQuery.cjs +1 -1
- package/dist/.external/cjs/i18next@25.5.2_typescript@5.9.2/i18next/dist/esm/i18next.cjs +2213 -0
- package/dist/.external/cjs/mantine-react-table@2.0.0-beta.9_@mantine_core@7.17.8_@mantine_dates@7.17.8_@mantine_hooks@7._v6brefjjgmgbqbolvm3v6bkbsa/mantine-react-table/locales/de/index.cjs +104 -0
- package/dist/.external/cjs/mantine-react-table@2.0.0-beta.9_@mantine_core@7.17.8_@mantine_dates@7.17.8_@mantine_hooks@7._v6brefjjgmgbqbolvm3v6bkbsa/mantine-react-table/locales/en/index.cjs +104 -0
- package/dist/.external/cjs/react-i18next@15.7.3_i18next@25.5.2_react-dom@18.3.1_react@18.3.1_typescript@5.9.2/react-i18next/dist/es/I18nextProvider.cjs +18 -0
- package/dist/.external/cjs/react-i18next@15.7.3_i18next@25.5.2_react-dom@18.3.1_react@18.3.1_typescript@5.9.2/react-i18next/dist/es/context.cjs +19 -0
- package/dist/.external/cjs/react-i18next@15.7.3_i18next@25.5.2_react-dom@18.3.1_react@18.3.1_typescript@5.9.2/react-i18next/dist/es/defaults.cjs +22 -0
- package/dist/.external/cjs/react-i18next@15.7.3_i18next@25.5.2_react-dom@18.3.1_react@18.3.1_typescript@5.9.2/react-i18next/dist/es/i18nInstance.cjs +9 -0
- package/dist/.external/cjs/react-i18next@15.7.3_i18next@25.5.2_react-dom@18.3.1_react@18.3.1_typescript@5.9.2/react-i18next/dist/es/initReactI18next.cjs +12 -0
- package/dist/.external/cjs/react-i18next@15.7.3_i18next@25.5.2_react-dom@18.3.1_react@18.3.1_typescript@5.9.2/react-i18next/dist/es/unescape.cjs +28 -0
- package/dist/.external/cjs/react-i18next@15.7.3_i18next@25.5.2_react-dom@18.3.1_react@18.3.1_typescript@5.9.2/react-i18next/dist/es/useTranslation.cjs +113 -0
- package/dist/.external/cjs/react-i18next@15.7.3_i18next@25.5.2_react-dom@18.3.1_react@18.3.1_typescript@5.9.2/react-i18next/dist/es/utils.cjs +71 -0
- package/dist/.external/esm/{@tanstack_query-core@5.85.6 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/notifyManager.mjs +2 -1
- package/dist/.external/esm/{@tanstack_query-core@5.85.6 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/query.mjs +10 -0
- package/dist/.external/esm/{@tanstack_query-core@5.85.6 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/queryObserver.mjs +5 -4
- package/dist/.external/esm/{@tanstack_query-core@5.85.6 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/removable.mjs +3 -2
- package/dist/.external/esm/@tanstack_query-core@5.87.1/@tanstack/query-core/build/modern/timeoutManager.mjs +78 -0
- package/dist/.external/esm/{@tanstack_query-core@5.85.6 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/utils.mjs +26 -22
- package/dist/.external/esm/{@tanstack_react-query@5.85.6_react@18.3.1 → @tanstack_react-query@5.87.1_react@18.3.1}/@tanstack/react-query/build/modern/errorBoundaryUtils.mjs +1 -1
- package/dist/.external/esm/{@tanstack_react-query@5.85.6_react@18.3.1 → @tanstack_react-query@5.87.1_react@18.3.1}/@tanstack/react-query/build/modern/suspense.mjs +6 -2
- package/dist/.external/esm/{@tanstack_react-query@5.85.6_react@18.3.1 → @tanstack_react-query@5.87.1_react@18.3.1}/@tanstack/react-query/build/modern/useBaseQuery.mjs +2 -2
- package/dist/.external/esm/{@tanstack_react-query@5.85.6_react@18.3.1 → @tanstack_react-query@5.87.1_react@18.3.1}/@tanstack/react-query/build/modern/useQuery.mjs +1 -1
- package/dist/.external/esm/i18next@25.5.2_typescript@5.9.2/i18next/dist/esm/i18next.mjs +2213 -0
- package/dist/.external/esm/mantine-react-table@2.0.0-beta.9_@mantine_core@7.17.8_@mantine_dates@7.17.8_@mantine_hooks@7._v6brefjjgmgbqbolvm3v6bkbsa/mantine-react-table/locales/de/index.mjs +104 -0
- package/dist/.external/esm/mantine-react-table@2.0.0-beta.9_@mantine_core@7.17.8_@mantine_dates@7.17.8_@mantine_hooks@7._v6brefjjgmgbqbolvm3v6bkbsa/mantine-react-table/locales/en/index.mjs +104 -0
- package/dist/.external/esm/react-i18next@15.7.3_i18next@25.5.2_react-dom@18.3.1_react@18.3.1_typescript@5.9.2/react-i18next/dist/es/I18nextProvider.mjs +18 -0
- package/dist/.external/esm/react-i18next@15.7.3_i18next@25.5.2_react-dom@18.3.1_react@18.3.1_typescript@5.9.2/react-i18next/dist/es/context.mjs +19 -0
- package/dist/.external/esm/react-i18next@15.7.3_i18next@25.5.2_react-dom@18.3.1_react@18.3.1_typescript@5.9.2/react-i18next/dist/es/defaults.mjs +22 -0
- package/dist/.external/esm/react-i18next@15.7.3_i18next@25.5.2_react-dom@18.3.1_react@18.3.1_typescript@5.9.2/react-i18next/dist/es/i18nInstance.mjs +9 -0
- package/dist/.external/esm/react-i18next@15.7.3_i18next@25.5.2_react-dom@18.3.1_react@18.3.1_typescript@5.9.2/react-i18next/dist/es/initReactI18next.mjs +12 -0
- package/dist/.external/esm/react-i18next@15.7.3_i18next@25.5.2_react-dom@18.3.1_react@18.3.1_typescript@5.9.2/react-i18next/dist/es/unescape.mjs +28 -0
- package/dist/.external/esm/react-i18next@15.7.3_i18next@25.5.2_react-dom@18.3.1_react@18.3.1_typescript@5.9.2/react-i18next/dist/es/useTranslation.mjs +113 -0
- package/dist/.external/esm/react-i18next@15.7.3_i18next@25.5.2_react-dom@18.3.1_react@18.3.1_typescript@5.9.2/react-i18next/dist/es/utils.mjs +71 -0
- package/dist/constants/cjs/_virtual/index.cjs +27 -0
- package/dist/constants/cjs/_virtual/index2.cjs +27 -0
- package/dist/constants/cjs/_virtual/index3.cjs +4 -0
- package/dist/constants/cjs/_virtual/index4.cjs +4 -0
- package/dist/constants/cjs/index.cjs +16 -0
- package/dist/constants/esm/_virtual/index.mjs +27 -0
- package/dist/constants/esm/_virtual/index2.mjs +27 -0
- package/dist/constants/esm/_virtual/index3.mjs +4 -0
- package/dist/constants/esm/_virtual/index4.mjs +4 -0
- package/dist/constants/esm/index.mjs +16 -0
- package/dist/constants/lib/index.d.ts +13 -0
- package/dist/core/cjs/ActionIcons/Add/Add.cjs +4 -1
- package/dist/core/cjs/ActionIcons/Add/AddDialog.cjs +52 -13
- package/dist/core/cjs/ActionIcons/Delete/Delete.cjs +15 -17
- package/dist/core/cjs/ActionIcons/Delete/DeleteDialog.cjs +60 -0
- package/dist/core/cjs/ActionIcons/Download/Download.cjs +4 -1
- package/dist/core/cjs/ActionIcons/Edit/Edit.cjs +4 -1
- package/dist/core/cjs/ActionIcons/Edit/EditDialog.cjs +50 -13
- package/dist/core/cjs/ActionIcons/Modals/CommonModal.cjs +17 -58
- package/dist/core/cjs/ActionIcons/Refresh/Refresh.cjs +4 -1
- package/dist/core/cjs/ActionIcons/View/View.cjs +4 -1
- package/dist/core/cjs/Selectors/LanguageSelector.cjs +11 -0
- package/dist/core/cjs/Tables/NextGenDataGrid/NextGenDataGrid.cjs +8 -2
- package/dist/core/cjs/Tables/NextGenDataGrid/hooks/useColumns/ColumnHeaderFilterInput/ColumnHeaderFilterInput.cjs +4 -1
- package/dist/core/cjs/Tables/NextGenDataGrid/hooks/useColumns/HeaderAdvancedFiltersMenuButton.cjs +4 -1
- package/dist/core/cjs/Tables/NextGenDataGrid/hooks/useData.cjs +2 -2
- package/dist/core/cjs/Tables/NextGenDataGrid/hooks/useI18n.cjs +8 -0
- package/dist/core/cjs/Wrappers/ApiProvider/ApiProvider.cjs +3 -1
- package/dist/core/cjs/Wrappers/ApiProvider/Contexts/FormContext.cjs +5 -0
- package/dist/core/cjs/Wrappers/ApiProvider/hooks/useProvideApi.cjs +30 -13
- package/dist/core/cjs/Wrappers/ApiProvider/utils/api/createItem.cjs +8 -3
- package/dist/core/cjs/Wrappers/ApiProvider/utils/api/deleteItem.cjs +7 -3
- package/dist/core/cjs/Wrappers/ApiProvider/utils/api/formCreateItem.cjs +5 -3
- package/dist/core/cjs/Wrappers/ApiProvider/utils/api/formUpdateItem.cjs +9 -3
- package/dist/core/cjs/Wrappers/ApiProvider/utils/api/getInfo.cjs +3 -3
- package/dist/core/cjs/Wrappers/ApiProvider/utils/api/getItem.cjs +7 -3
- package/dist/core/cjs/Wrappers/ApiProvider/utils/api/getItems.cjs +3 -3
- package/dist/core/cjs/Wrappers/ApiProvider/utils/api/updateItem.cjs +8 -3
- package/dist/core/cjs/Wrappers/ApiProvider/utils/bulkActions/postBulkAction.cjs +5 -4
- package/dist/core/cjs/Wrappers/Provider/Contexts/LangContext.cjs +71 -0
- package/dist/core/cjs/Wrappers/Provider/Provider.cjs +4 -3
- package/dist/core/cjs/Wrappers/Provider/hooks/useProvideAuth.cjs +2 -2
- package/dist/core/cjs/Wrappers/Provider/hooks/useProvideInfo.cjs +1 -1
- package/dist/core/cjs/Wrappers/Provider/hooks/useProvideLang.cjs +44 -0
- package/dist/core/cjs/hooks/api/useForms.cjs +12 -4
- package/dist/core/cjs/hooks/lang/useLang.cjs +5 -0
- package/dist/core/cjs/index.cjs +5 -0
- package/dist/core/cjs/translations/de.cjs +21 -0
- package/dist/core/esm/ActionIcons/Add/Add.mjs +4 -1
- package/dist/core/esm/ActionIcons/Add/AddDialog.mjs +54 -15
- package/dist/core/esm/ActionIcons/Delete/Delete.mjs +17 -19
- package/dist/core/esm/ActionIcons/Delete/DeleteDialog.mjs +60 -0
- package/dist/core/esm/ActionIcons/Download/Download.mjs +4 -1
- package/dist/core/esm/ActionIcons/Edit/Edit.mjs +4 -1
- package/dist/core/esm/ActionIcons/Edit/EditDialog.mjs +51 -14
- package/dist/core/esm/ActionIcons/Modals/CommonModal.mjs +18 -59
- package/dist/core/esm/ActionIcons/Refresh/Refresh.mjs +4 -1
- package/dist/core/esm/ActionIcons/View/View.mjs +4 -1
- package/dist/core/esm/Selectors/LanguageSelector.mjs +11 -0
- package/dist/core/esm/Tables/NextGenDataGrid/NextGenDataGrid.mjs +8 -2
- package/dist/core/esm/Tables/NextGenDataGrid/hooks/useColumns/ColumnHeaderFilterInput/ColumnHeaderFilterInput.mjs +4 -1
- package/dist/core/esm/Tables/NextGenDataGrid/hooks/useColumns/HeaderAdvancedFiltersMenuButton.mjs +4 -1
- package/dist/core/esm/Tables/NextGenDataGrid/hooks/useData.mjs +2 -2
- package/dist/core/esm/Tables/NextGenDataGrid/hooks/useI18n.mjs +8 -0
- package/dist/core/esm/Wrappers/ApiProvider/ApiProvider.mjs +4 -2
- package/dist/core/esm/Wrappers/ApiProvider/Contexts/FormContext.mjs +5 -0
- package/dist/core/esm/Wrappers/ApiProvider/hooks/useProvideApi.mjs +30 -13
- package/dist/core/esm/Wrappers/ApiProvider/utils/api/createItem.mjs +8 -3
- package/dist/core/esm/Wrappers/ApiProvider/utils/api/deleteItem.mjs +7 -3
- package/dist/core/esm/Wrappers/ApiProvider/utils/api/formCreateItem.mjs +5 -3
- package/dist/core/esm/Wrappers/ApiProvider/utils/api/formUpdateItem.mjs +9 -3
- package/dist/core/esm/Wrappers/ApiProvider/utils/api/getInfo.mjs +3 -3
- package/dist/core/esm/Wrappers/ApiProvider/utils/api/getItem.mjs +7 -3
- package/dist/core/esm/Wrappers/ApiProvider/utils/api/getItems.mjs +3 -3
- package/dist/core/esm/Wrappers/ApiProvider/utils/api/updateItem.mjs +8 -3
- package/dist/core/esm/Wrappers/ApiProvider/utils/bulkActions/postBulkAction.mjs +5 -4
- package/dist/core/esm/Wrappers/Provider/Contexts/LangContext.mjs +71 -0
- package/dist/core/esm/Wrappers/Provider/Provider.mjs +4 -3
- package/dist/core/esm/Wrappers/Provider/hooks/useProvideAuth.mjs +2 -2
- package/dist/core/esm/Wrappers/Provider/hooks/useProvideInfo.mjs +1 -1
- package/dist/core/esm/Wrappers/Provider/hooks/useProvideLang.mjs +44 -0
- package/dist/core/esm/hooks/api/useForms.mjs +13 -5
- package/dist/core/esm/hooks/lang/useLang.mjs +5 -0
- package/dist/core/esm/index.mjs +6 -1
- package/dist/core/esm/translations/de.mjs +22 -0
- package/dist/core/lib/ActionIcons/Add/AddDialog.d.ts +55 -20
- package/dist/core/lib/ActionIcons/Delete/DeleteDialog.d.ts +127 -0
- package/dist/core/lib/ActionIcons/Edit/EditDialog.d.ts +55 -20
- package/dist/core/lib/ActionIcons/Modals/CommonModal.d.ts +45 -20
- package/dist/core/lib/Selectors/LanguageSelector.d.ts +1 -0
- package/dist/core/lib/Tables/NextGenDataGrid/hooks/useI18n.d.ts +3 -0
- package/dist/core/lib/Wrappers/ApiProvider/Contexts/FormContext.d.ts +5 -0
- package/dist/core/lib/Wrappers/ApiProvider/hooks/useProvideApi.d.ts +12 -8
- package/dist/core/lib/Wrappers/ApiProvider/hooks/useProvideBulk.d.ts +1 -1
- package/dist/core/lib/Wrappers/ApiProvider/utils/api/createItem.d.ts +1 -1
- package/dist/core/lib/Wrappers/ApiProvider/utils/api/deleteItem.d.ts +1 -1
- package/dist/core/lib/Wrappers/ApiProvider/utils/api/formCreateItem.d.ts +1 -1
- package/dist/core/lib/Wrappers/ApiProvider/utils/api/formUpdateItem.d.ts +1 -1
- package/dist/core/lib/Wrappers/ApiProvider/utils/api/getInfo.d.ts +1 -1
- package/dist/core/lib/Wrappers/ApiProvider/utils/api/getItem.d.ts +1 -1
- package/dist/core/lib/Wrappers/ApiProvider/utils/api/getItems.d.ts +1 -1
- package/dist/core/lib/Wrappers/ApiProvider/utils/api/updateItem.d.ts +1 -1
- package/dist/core/lib/Wrappers/ApiProvider/utils/bulkActions/postBulkAction.d.ts +1 -1
- package/dist/core/lib/Wrappers/Provider/Contexts/LangContext.d.ts +15 -0
- package/dist/core/lib/Wrappers/Provider/Provider.d.ts +32 -0
- package/dist/core/lib/hooks/api/useApi.d.ts +16 -0
- package/dist/core/lib/hooks/api/useForms.d.ts +1 -1
- package/dist/core/lib/hooks/lang/useLang.d.ts +39 -0
- package/dist/core/lib/index.d.ts +2 -0
- package/dist/core/lib/translations/de.d.ts +18 -0
- package/dist/utils/cjs/FastAPIRTKLogger/FastAPIRTKLogger.cjs +8 -0
- package/dist/utils/cjs/createFetchParams/createFetchParams.cjs +7 -5
- package/dist/utils/cjs/index.cjs +2 -0
- package/dist/utils/esm/FastAPIRTKLogger/FastAPIRTKLogger.mjs +8 -0
- package/dist/utils/esm/createFetchParams/createFetchParams.mjs +7 -5
- package/dist/utils/esm/index.mjs +2 -0
- package/dist/utils/lib/FastAPIRTKLogger/FastAPIRTKLogger.d.ts +5 -0
- package/dist/utils/lib/FastAPIRTKLogger/index.d.ts +1 -0
- package/dist/utils/lib/createFetchParams/createFetchParams.d.ts +3 -12
- package/dist/utils/lib/index.d.ts +1 -0
- package/package.json +1 -1
- package/dist/core/cjs/Dialogs/AlertDialog/AlertDialog.cjs +0 -25
- package/dist/core/esm/Dialogs/AlertDialog/AlertDialog.mjs +0 -25
- package/dist/core/lib/Dialogs/AlertDialog/AlertDialog.d.ts +0 -6
- /package/dist/.external/cjs/{@tanstack_query-core@5.85.6 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/focusManager.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_query-core@5.85.6 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/infiniteQueryBehavior.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_query-core@5.85.6 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/mutation.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_query-core@5.85.6 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/mutationCache.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_query-core@5.85.6 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/onlineManager.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_query-core@5.85.6 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/queryCache.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_query-core@5.85.6 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/queryClient.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_query-core@5.85.6 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/retryer.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_query-core@5.85.6 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/subscribable.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_query-core@5.85.6 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/thenable.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_react-query@5.85.6_react@18.3.1 → @tanstack_react-query@5.87.1_react@18.3.1}/@tanstack/react-query/build/modern/IsRestoringProvider.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_react-query@5.85.6_react@18.3.1 → @tanstack_react-query@5.87.1_react@18.3.1}/@tanstack/react-query/build/modern/QueryClientProvider.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_react-query@5.85.6_react@18.3.1 → @tanstack_react-query@5.87.1_react@18.3.1}/@tanstack/react-query/build/modern/QueryErrorResetBoundary.cjs +0 -0
- /package/dist/.external/esm/{@tanstack_query-core@5.85.6 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/focusManager.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_query-core@5.85.6 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/infiniteQueryBehavior.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_query-core@5.85.6 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/mutation.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_query-core@5.85.6 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/mutationCache.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_query-core@5.85.6 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/onlineManager.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_query-core@5.85.6 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/queryCache.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_query-core@5.85.6 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/queryClient.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_query-core@5.85.6 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/retryer.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_query-core@5.85.6 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/subscribable.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_query-core@5.85.6 → @tanstack_query-core@5.87.1}/@tanstack/query-core/build/modern/thenable.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_react-query@5.85.6_react@18.3.1 → @tanstack_react-query@5.87.1_react@18.3.1}/@tanstack/react-query/build/modern/IsRestoringProvider.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_react-query@5.85.6_react@18.3.1 → @tanstack_react-query@5.87.1_react@18.3.1}/@tanstack/react-query/build/modern/QueryClientProvider.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_react-query@5.85.6_react@18.3.1 → @tanstack_react-query@5.87.1_react@18.3.1}/@tanstack/react-query/build/modern/QueryErrorResetBoundary.mjs +0 -0
|
@@ -22,7 +22,21 @@ const VIEW_MODE = {
|
|
|
22
22
|
FULL_SCREEN: "fullScreen",
|
|
23
23
|
OVERLAY: "overlay"
|
|
24
24
|
};
|
|
25
|
+
const BASE_LANGUAGES = [
|
|
26
|
+
{ value: "en", label: "🇬🇧 English" },
|
|
27
|
+
{ value: "de", label: "🇩🇪 Deutsch" }
|
|
28
|
+
];
|
|
29
|
+
const LANG_LOCAL_STORAGE_PROPS = {
|
|
30
|
+
key: "i18nextLng",
|
|
31
|
+
defaultValue: "en",
|
|
32
|
+
getInitialValueInEffect: false
|
|
33
|
+
};
|
|
34
|
+
const MRT_LOCALIZATION_IMPORT_MAP = {
|
|
35
|
+
de: () => import("./_virtual/index.mjs").then((n) => n.i).then((mod) => mod.MRT_Localization_DE),
|
|
36
|
+
en: () => import("./_virtual/index2.mjs").then((n) => n.i).then((mod) => mod.MRT_Localization_EN)
|
|
37
|
+
};
|
|
25
38
|
export {
|
|
39
|
+
BASE_LANGUAGES,
|
|
26
40
|
DEBOUNCE_DELAY,
|
|
27
41
|
DEBOUNCE_LOADING_DELAY,
|
|
28
42
|
DEFAULT_DELIMITER,
|
|
@@ -31,6 +45,8 @@ export {
|
|
|
31
45
|
DEFAULT_PAGE_SIZE_OPTIONS,
|
|
32
46
|
DEFAULT_QUOTECHAR,
|
|
33
47
|
DELIMITER_DATA,
|
|
48
|
+
LANG_LOCAL_STORAGE_PROPS,
|
|
49
|
+
MRT_LOCALIZATION_IMPORT_MAP,
|
|
34
50
|
QUOTECHAR_DATA,
|
|
35
51
|
VIEW_MODE,
|
|
36
52
|
initialState
|
|
@@ -22,3 +22,16 @@ export namespace VIEW_MODE {
|
|
|
22
22
|
let FULL_SCREEN: string;
|
|
23
23
|
let OVERLAY: string;
|
|
24
24
|
}
|
|
25
|
+
export const BASE_LANGUAGES: {
|
|
26
|
+
value: string;
|
|
27
|
+
label: string;
|
|
28
|
+
}[];
|
|
29
|
+
export namespace LANG_LOCAL_STORAGE_PROPS {
|
|
30
|
+
let key: string;
|
|
31
|
+
let defaultValue: string;
|
|
32
|
+
let getInitialValueInEffect: boolean;
|
|
33
|
+
}
|
|
34
|
+
export namespace MRT_LOCALIZATION_IMPORT_MAP {
|
|
35
|
+
function de(): Promise<import("mantine-react-table").MRT_Localization>;
|
|
36
|
+
function en(): Promise<import("mantine-react-table").MRT_Localization>;
|
|
37
|
+
}
|
|
@@ -5,11 +5,14 @@ const hooks = require("fastapi-rtk/hooks");
|
|
|
5
5
|
const core = require("@mantine/core");
|
|
6
6
|
const React = require("react");
|
|
7
7
|
const useForms = require("../../hooks/api/useForms.cjs");
|
|
8
|
+
require("../../Wrappers/Provider/Contexts/LangContext.cjs");
|
|
9
|
+
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");
|
|
8
10
|
const IconPlus = require("../../../../.external/cjs/@tabler_icons-react@3.18.0_react@18.3.1/@tabler/icons-react/dist/esm/icons/IconPlus.cjs");
|
|
9
11
|
const Add = React.memo(({ tooltipProps, ...props }) => {
|
|
12
|
+
const { t } = useTranslation.useTranslation();
|
|
10
13
|
const { setOpened } = useForms.useForms("add");
|
|
11
14
|
const actionIconProps = hooks.useActionIcon({ onClick: () => setOpened(true), ...props });
|
|
12
|
-
return /* @__PURE__ */ jsxRuntime.jsx(core.Tooltip, { ...tooltipProps, label: (tooltipProps == null ? void 0 : tooltipProps.label) ?? "Add Item", children: /* @__PURE__ */ jsxRuntime.jsx(core.ActionIcon, { ...actionIconProps, children: /* @__PURE__ */ jsxRuntime.jsx(IconPlus, {}) }) });
|
|
15
|
+
return /* @__PURE__ */ jsxRuntime.jsx(core.Tooltip, { ...tooltipProps, label: (tooltipProps == null ? void 0 : tooltipProps.label) ?? t("Add Item"), children: /* @__PURE__ */ jsxRuntime.jsx(core.ActionIcon, { ...actionIconProps, children: /* @__PURE__ */ jsxRuntime.jsx(IconPlus, {}) }) });
|
|
13
16
|
});
|
|
14
17
|
Add.displayName = "Add";
|
|
15
18
|
exports.Add = Add;
|
|
@@ -1,18 +1,27 @@
|
|
|
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");
|
|
4
5
|
const constants = require("fastapi-rtk/constants");
|
|
5
6
|
const utils = require("fastapi-rtk/utils");
|
|
6
7
|
const core = require("@mantine/core");
|
|
8
|
+
const form = require("@mantine/form");
|
|
7
9
|
const hooks = require("@mantine/hooks");
|
|
10
|
+
const index = require("../../../../.external/cjs/mantine-form-yup-resolver@2.0.0_@mantine_form@8.2.8_yup@1.7.0/mantine-form-yup-resolver/dist/esm/index.cjs");
|
|
8
11
|
const React = require("react");
|
|
9
12
|
const useApi = require("../../hooks/api/useApi.cjs");
|
|
10
13
|
const useForms = require("../../hooks/api/useForms.cjs");
|
|
14
|
+
const useInfo = require("../../hooks/auth/useInfo.cjs");
|
|
15
|
+
require("../../Wrappers/Provider/Contexts/LangContext.cjs");
|
|
16
|
+
const FormField = require("../../Tables/DataGrid/FormField/FormField.cjs");
|
|
11
17
|
const CommonModal = require("../Modals/CommonModal.cjs");
|
|
12
18
|
const normalProps = require("../Modals/normalProps.cjs");
|
|
13
19
|
const overlayProps = require("../Modals/overlayProps.cjs");
|
|
14
|
-
|
|
20
|
+
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");
|
|
21
|
+
function AddDialog({ jsonForms: __jsonForms, onSuccess, onError, ...props }) {
|
|
22
|
+
var _a;
|
|
15
23
|
const { info, refetch, refetchInfo, addEntry } = useApi.useApi();
|
|
24
|
+
const { t } = useTranslation.useTranslation();
|
|
16
25
|
const { opened, setOpened, state, getState, setState, reset, view, setView } = useForms.useForms("add");
|
|
17
26
|
const [loading, setLoading] = hooks.useDebouncedState(false, constants.DEBOUNCE_LOADING_DELAY);
|
|
18
27
|
const { jsonForms: _jsonForms } = core.useProps("AddDialog", {}, {});
|
|
@@ -22,31 +31,37 @@ function AddDialog({ jsonForms: __jsonForms, ...props }) {
|
|
|
22
31
|
e == null ? void 0 : e.preventDefault();
|
|
23
32
|
setLoading(true);
|
|
24
33
|
addEntry(getState().data).then((res) => {
|
|
34
|
+
onSuccess == null ? void 0 : onSuccess(res);
|
|
25
35
|
if (res) {
|
|
26
36
|
refetch();
|
|
27
37
|
refetchInfo();
|
|
28
38
|
}
|
|
29
|
-
}).catch(() => {
|
|
30
|
-
}).finally(() => {
|
|
39
|
+
}).catch(onError).finally(() => {
|
|
31
40
|
setLoading(false);
|
|
32
41
|
setOpened(false);
|
|
33
42
|
});
|
|
34
43
|
},
|
|
35
|
-
[addEntry, getState, refetch, refetchInfo, setLoading, setOpened]
|
|
44
|
+
[addEntry, getState, onError, onSuccess, refetch, refetchInfo, setLoading, setOpened]
|
|
36
45
|
);
|
|
46
|
+
const { fab } = useInfo.useInfo();
|
|
47
|
+
const form$1 = form.useForm({ initialValues: info.add.defaultValues, validate: index.yupResolver(info.add.schema) });
|
|
48
|
+
const onSubmitFunc = fab ? form$1.onSubmit((values, e) => {
|
|
49
|
+
setState({ data: values });
|
|
50
|
+
onSubmit(e);
|
|
51
|
+
}) : onSubmit;
|
|
52
|
+
React.useEffect(() => {
|
|
53
|
+
if (JSON.stringify(state.data) !== JSON.stringify(form$1.getValues())) {
|
|
54
|
+
form$1.setValues(state.data);
|
|
55
|
+
}
|
|
56
|
+
}, [state.data]);
|
|
37
57
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
38
58
|
CommonModal.CommonModal,
|
|
39
59
|
{
|
|
40
|
-
fabSchema: info.add,
|
|
41
|
-
schema: info.add_schema,
|
|
42
|
-
uischema: info.add_uischema,
|
|
43
|
-
state,
|
|
44
|
-
setState,
|
|
45
60
|
view,
|
|
46
61
|
setView,
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
buttonText: "Add",
|
|
62
|
+
onSubmit: onSubmitFunc,
|
|
63
|
+
actionButtons: { withResetButton: false },
|
|
64
|
+
buttonText: t("Add"),
|
|
50
65
|
buttonLoading: loading,
|
|
51
66
|
opened,
|
|
52
67
|
onClose: () => setOpened(false),
|
|
@@ -54,7 +69,31 @@ function AddDialog({ jsonForms: __jsonForms, ...props }) {
|
|
|
54
69
|
...view === constants.VIEW_MODE.OVERLAY ? overlayProps.overlayProps : {},
|
|
55
70
|
...view === constants.VIEW_MODE.NORMAL ? normalProps.normalProps : {},
|
|
56
71
|
...props,
|
|
57
|
-
title: props.title ?? (info == null ? void 0 : info.add_title)
|
|
72
|
+
title: props.title ?? (info == null ? void 0 : info.add_title),
|
|
73
|
+
children: fab ? (
|
|
74
|
+
//* Backward compatibility to fab-react-toolkit
|
|
75
|
+
/* @__PURE__ */ jsxRuntime.jsx(core.Stack, { gap: "xs", children: (_a = info.add.columns) == null ? void 0 : _a.map((item, index2) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
76
|
+
FormField.FormField,
|
|
77
|
+
{
|
|
78
|
+
form: form$1,
|
|
79
|
+
name: item.name,
|
|
80
|
+
label: item.label,
|
|
81
|
+
description: item.description,
|
|
82
|
+
schema: item,
|
|
83
|
+
withAsterisk: item.required
|
|
84
|
+
},
|
|
85
|
+
index2
|
|
86
|
+
)) })
|
|
87
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
88
|
+
_bundledJsonforms.JsonFormsWithCustomizer,
|
|
89
|
+
{
|
|
90
|
+
schema: info.add_schema,
|
|
91
|
+
uischema: info.add_uischema,
|
|
92
|
+
data: state.data,
|
|
93
|
+
onChange: setState,
|
|
94
|
+
customizer: jsonForms
|
|
95
|
+
}
|
|
96
|
+
)
|
|
58
97
|
}
|
|
59
98
|
);
|
|
60
99
|
}
|
|
@@ -4,25 +4,23 @@ const jsxRuntime = require("react/jsx-runtime");
|
|
|
4
4
|
const hooks = require("fastapi-rtk/hooks");
|
|
5
5
|
const core = require("@mantine/core");
|
|
6
6
|
const React = require("react");
|
|
7
|
-
const
|
|
8
|
-
|
|
7
|
+
const useForms = require("../../hooks/api/useForms.cjs");
|
|
8
|
+
require("../../Wrappers/Provider/Contexts/LangContext.cjs");
|
|
9
|
+
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");
|
|
9
10
|
const IconTrash = require("../../../../.external/cjs/@tabler_icons-react@3.18.0_react@18.3.1/@tabler/icons-react/dist/esm/icons/IconTrash.cjs");
|
|
10
11
|
const Delete = React.memo(({ id, ...props }) => {
|
|
11
|
-
const {
|
|
12
|
-
const
|
|
13
|
-
const actionIconProps = hooks.useActionIcon({
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
})
|
|
22
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
23
|
-
/* @__PURE__ */ jsxRuntime.jsx(core.Tooltip, { label: "Delete", children: /* @__PURE__ */ jsxRuntime.jsx(core.ActionIcon, { ...actionIconProps, children: /* @__PURE__ */ jsxRuntime.jsx(IconTrash, {}) }) }),
|
|
24
|
-
/* @__PURE__ */ jsxRuntime.jsx(AlertDialog.AlertDialog, { opened: dialogOpen, onClose: handleReject, handleAccept, handleReject })
|
|
25
|
-
] });
|
|
12
|
+
const { t } = useTranslation.useTranslation();
|
|
13
|
+
const { setOpened, setItem } = useForms.useForms("delete");
|
|
14
|
+
const actionIconProps = hooks.useActionIcon({
|
|
15
|
+
onClick: (e) => {
|
|
16
|
+
e == null ? void 0 : e.stopPropagation();
|
|
17
|
+
setItem(id);
|
|
18
|
+
setOpened(true);
|
|
19
|
+
},
|
|
20
|
+
size: "sm",
|
|
21
|
+
...props
|
|
22
|
+
});
|
|
23
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx(core.Tooltip, { label: t("Delete"), children: /* @__PURE__ */ jsxRuntime.jsx(core.ActionIcon, { ...actionIconProps, children: /* @__PURE__ */ jsxRuntime.jsx(IconTrash, {}) }) }) });
|
|
26
24
|
});
|
|
27
25
|
Delete.displayName = "Delete";
|
|
28
26
|
exports.Delete = Delete;
|
|
@@ -0,0 +1,60 @@
|
|
|
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 hooks = require("@mantine/hooks");
|
|
7
|
+
const React = require("react");
|
|
8
|
+
const useApi = require("../../hooks/api/useApi.cjs");
|
|
9
|
+
const useForms = require("../../hooks/api/useForms.cjs");
|
|
10
|
+
require("../../Wrappers/Provider/Contexts/LangContext.cjs");
|
|
11
|
+
const CommonModal = require("../Modals/CommonModal.cjs");
|
|
12
|
+
const overlayProps = require("../Modals/overlayProps.cjs");
|
|
13
|
+
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");
|
|
14
|
+
const DeleteDialog = ({ onSuccess, onError, ...props }) => {
|
|
15
|
+
const { refetch, refetchInfo, deleteEntry } = useApi.useApi();
|
|
16
|
+
const { t } = useTranslation.useTranslation();
|
|
17
|
+
const { opened, setOpened, getItem, reset, view, setView } = useForms.useForms("delete");
|
|
18
|
+
const [loading, setLoading] = hooks.useDebouncedState(false, constants.DEBOUNCE_LOADING_DELAY);
|
|
19
|
+
const onReset = React.useCallback(() => {
|
|
20
|
+
setOpened(false);
|
|
21
|
+
}, [setOpened]);
|
|
22
|
+
const onSubmit = React.useCallback(
|
|
23
|
+
(e) => {
|
|
24
|
+
e == null ? void 0 : e.preventDefault();
|
|
25
|
+
setLoading(true);
|
|
26
|
+
deleteEntry(getItem()).then((res) => {
|
|
27
|
+
onSuccess == null ? void 0 : onSuccess(res);
|
|
28
|
+
refetch();
|
|
29
|
+
refetchInfo();
|
|
30
|
+
}).catch(onError).finally(() => {
|
|
31
|
+
setLoading(false);
|
|
32
|
+
setOpened(false);
|
|
33
|
+
});
|
|
34
|
+
},
|
|
35
|
+
[setLoading, deleteEntry, getItem, onError, onSuccess, refetch, refetchInfo, setOpened]
|
|
36
|
+
);
|
|
37
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
38
|
+
CommonModal.CommonModal,
|
|
39
|
+
{
|
|
40
|
+
view,
|
|
41
|
+
setView,
|
|
42
|
+
onReset,
|
|
43
|
+
onSubmit,
|
|
44
|
+
withTitleOptions: false,
|
|
45
|
+
actionButtons: { groupProps: { mt: "xs" } },
|
|
46
|
+
resetButtonText: t("Cancel"),
|
|
47
|
+
buttonText: t("Delete"),
|
|
48
|
+
buttonLoading: loading,
|
|
49
|
+
size: "md",
|
|
50
|
+
opened,
|
|
51
|
+
onClose: () => setOpened(false),
|
|
52
|
+
onExitTransitionEnd: reset,
|
|
53
|
+
...view === constants.VIEW_MODE.OVERLAY ? overlayProps.overlayProps : {},
|
|
54
|
+
...props,
|
|
55
|
+
title: props.title ?? "Delete #" + String(getItem()),
|
|
56
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(core.Text, { ta: "center", children: t("Are you sure you want to delete this item?") })
|
|
57
|
+
}
|
|
58
|
+
);
|
|
59
|
+
};
|
|
60
|
+
exports.DeleteDialog = DeleteDialog;
|
|
@@ -7,10 +7,13 @@ const core = require("@mantine/core");
|
|
|
7
7
|
const hooks = require("@mantine/hooks");
|
|
8
8
|
const React = require("react");
|
|
9
9
|
const useApi = require("../../hooks/api/useApi.cjs");
|
|
10
|
+
require("../../Wrappers/Provider/Contexts/LangContext.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 IconSeparatorVertical = require("../../../../.external/cjs/@tabler_icons-react@3.18.0_react@18.3.1/@tabler/icons-react/dist/esm/icons/IconSeparatorVertical.cjs");
|
|
11
13
|
const IconDownload = require("../../../../.external/cjs/@tabler_icons-react@3.18.0_react@18.3.1/@tabler/icons-react/dist/esm/icons/IconDownload.cjs");
|
|
12
14
|
const Download = React.memo(({ tooltipProps, ...props }) => {
|
|
13
15
|
const { download } = useApi.useApi();
|
|
16
|
+
const { t } = useTranslation.useTranslation();
|
|
14
17
|
const [opened, { toggle, close }] = hooks.useDisclosure();
|
|
15
18
|
const [loading, setLoading] = hooks.useDebouncedState(false, constants.DEBOUNCE_LOADING_DELAY);
|
|
16
19
|
const [delimiter, setDelimiter] = React.useState(constants.DEFAULT_DELIMITER);
|
|
@@ -43,7 +46,7 @@ const Download = React.memo(({ tooltipProps, ...props }) => {
|
|
|
43
46
|
),
|
|
44
47
|
/* @__PURE__ */ jsxRuntime.jsx(core.Group, { justify: "end", children: /* @__PURE__ */ jsxRuntime.jsx(core.Button, { mt: "md", onClick: onDownload, loading, children: "Download" }) })
|
|
45
48
|
] }) }),
|
|
46
|
-
loading ? /* @__PURE__ */ jsxRuntime.jsx(core.ThemeIcon, { variant: "transparent", size: actionIconProps.size, c: actionIconProps.c, children: /* @__PURE__ */ jsxRuntime.jsx(core.Loader, { size: "100%", color: actionIconProps.c }) }) : /* @__PURE__ */ jsxRuntime.jsx(core.Tooltip, { ...tooltipProps, label: (tooltipProps == null ? void 0 : tooltipProps.label) ?? "Download", children: /* @__PURE__ */ jsxRuntime.jsx(core.ActionIcon, { ...actionIconProps, children: /* @__PURE__ */ jsxRuntime.jsx(IconDownload, {}) }) })
|
|
49
|
+
loading ? /* @__PURE__ */ jsxRuntime.jsx(core.ThemeIcon, { variant: "transparent", size: actionIconProps.size, c: actionIconProps.c, children: /* @__PURE__ */ jsxRuntime.jsx(core.Loader, { size: "100%", color: actionIconProps.c }) }) : /* @__PURE__ */ jsxRuntime.jsx(core.Tooltip, { ...tooltipProps, label: (tooltipProps == null ? void 0 : tooltipProps.label) ?? t("Download"), children: /* @__PURE__ */ jsxRuntime.jsx(core.ActionIcon, { ...actionIconProps, children: /* @__PURE__ */ jsxRuntime.jsx(IconDownload, {}) }) })
|
|
47
50
|
] });
|
|
48
51
|
});
|
|
49
52
|
Download.displayName = "Download";
|
|
@@ -8,9 +8,12 @@ const hooks = require("@mantine/hooks");
|
|
|
8
8
|
const React = require("react");
|
|
9
9
|
const useApi = require("../../hooks/api/useApi.cjs");
|
|
10
10
|
const useForms = require("../../hooks/api/useForms.cjs");
|
|
11
|
+
require("../../Wrappers/Provider/Contexts/LangContext.cjs");
|
|
12
|
+
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");
|
|
11
13
|
const IconPencil = require("../../../../.external/cjs/@tabler_icons-react@3.18.0_react@18.3.1/@tabler/icons-react/dist/esm/icons/IconPencil.cjs");
|
|
12
14
|
const Edit = React.memo(({ id, ...props }) => {
|
|
13
15
|
const { getEntry } = useApi.useApi();
|
|
16
|
+
const { t } = useTranslation.useTranslation();
|
|
14
17
|
const { setOpened, setItem } = useForms.useForms("edit");
|
|
15
18
|
const [loading, setLoading] = hooks.useDebouncedState(false, constants.DEBOUNCE_LOADING_DELAY);
|
|
16
19
|
const actionIconProps = hooks$1.useActionIcon({
|
|
@@ -28,7 +31,7 @@ const Edit = React.memo(({ id, ...props }) => {
|
|
|
28
31
|
loading,
|
|
29
32
|
...props
|
|
30
33
|
});
|
|
31
|
-
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx(core.Tooltip, { label: "Edit", children: /* @__PURE__ */ jsxRuntime.jsx(core.ActionIcon, { ...actionIconProps, children: /* @__PURE__ */ jsxRuntime.jsx(IconPencil, {}) }) }) });
|
|
34
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx(core.Tooltip, { label: t("Edit"), children: /* @__PURE__ */ jsxRuntime.jsx(core.ActionIcon, { ...actionIconProps, children: /* @__PURE__ */ jsxRuntime.jsx(IconPencil, {}) }) }) });
|
|
32
35
|
});
|
|
33
36
|
Edit.displayName = "Edit";
|
|
34
37
|
exports.Edit = Edit;
|
|
@@ -1,22 +1,30 @@
|
|
|
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");
|
|
4
5
|
const constants = require("fastapi-rtk/constants");
|
|
5
6
|
const utils = require("fastapi-rtk/utils");
|
|
6
7
|
const core = require("@mantine/core");
|
|
8
|
+
const form = require("@mantine/form");
|
|
7
9
|
const hooks = require("@mantine/hooks");
|
|
8
10
|
const lodash = require("../../_virtual/lodash.cjs");
|
|
11
|
+
const index = require("../../../../.external/cjs/mantine-form-yup-resolver@2.0.0_@mantine_form@8.2.8_yup@1.7.0/mantine-form-yup-resolver/dist/esm/index.cjs");
|
|
9
12
|
const React = require("react");
|
|
10
13
|
const convertToFormInputs = require("../../fab-react-toolkit-patch/utils/convertToFormInputs.cjs");
|
|
11
14
|
const useApi = require("../../hooks/api/useApi.cjs");
|
|
12
15
|
const useForms = require("../../hooks/api/useForms.cjs");
|
|
13
16
|
const useInfo = require("../../hooks/auth/useInfo.cjs");
|
|
17
|
+
require("../../Wrappers/Provider/Contexts/LangContext.cjs");
|
|
18
|
+
const FormField = require("../../Tables/DataGrid/FormField/FormField.cjs");
|
|
14
19
|
const CommonModal = require("../Modals/CommonModal.cjs");
|
|
15
20
|
const normalProps = require("../Modals/normalProps.cjs");
|
|
16
21
|
const overlayProps = require("../Modals/overlayProps.cjs");
|
|
17
22
|
const convertToFormInputs$1 = require("../utils/convertToFormInputs.cjs");
|
|
18
|
-
|
|
23
|
+
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");
|
|
24
|
+
function EditDialog({ jsonForms: __jsonForms, onSuccess, onError, ...props }) {
|
|
25
|
+
var _a;
|
|
19
26
|
const { info, refetch, refetchInfo, updateEntry } = useApi.useApi();
|
|
27
|
+
const { t } = useTranslation.useTranslation();
|
|
20
28
|
const { opened, setOpened, item, getItem, state, getState, setState, reset, view, setView } = useForms.useForms("edit");
|
|
21
29
|
const [loading, setLoading] = hooks.useDebouncedState(false, constants.DEBOUNCE_LOADING_DELAY);
|
|
22
30
|
const { jsonForms: _jsonForms } = core.useProps("EditDialog", {}, {});
|
|
@@ -49,31 +57,36 @@ function EditDialog({ jsonForms: __jsonForms, ...props }) {
|
|
|
49
57
|
return acc;
|
|
50
58
|
}, {});
|
|
51
59
|
updateEntry(utils.getItemId(getItem()), new_data).then((res) => {
|
|
60
|
+
onSuccess == null ? void 0 : onSuccess(res);
|
|
52
61
|
if (res) {
|
|
53
62
|
refetch();
|
|
54
63
|
refetchInfo();
|
|
55
64
|
}
|
|
56
|
-
}).catch(() => {
|
|
57
|
-
}).finally(() => {
|
|
65
|
+
}).catch(onError).finally(() => {
|
|
58
66
|
setLoading(false);
|
|
59
67
|
setOpened(false);
|
|
60
68
|
});
|
|
61
69
|
},
|
|
62
|
-
[setLoading, updateEntry, getItem,
|
|
70
|
+
[setLoading, getState, updateEntry, getItem, onError, onSuccess, refetch, refetchInfo, setOpened]
|
|
63
71
|
);
|
|
72
|
+
const form$1 = form.useForm({ initialValues: info.edit.defaultValues, validate: index.yupResolver(info.edit.schema) });
|
|
73
|
+
const onSubmitFunc = fab ? form$1.onSubmit((values, e) => {
|
|
74
|
+
setState({ data: values });
|
|
75
|
+
onSubmit(e);
|
|
76
|
+
}) : onSubmit;
|
|
77
|
+
React.useEffect(() => {
|
|
78
|
+
if (JSON.stringify(state.data) !== JSON.stringify(form$1.getValues())) {
|
|
79
|
+
form$1.setValues(state.data);
|
|
80
|
+
}
|
|
81
|
+
}, [state.data]);
|
|
64
82
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
65
83
|
CommonModal.CommonModal,
|
|
66
84
|
{
|
|
67
|
-
fabSchema: info.edit,
|
|
68
|
-
schema: info.edit_schema,
|
|
69
|
-
uischema: info.edit_uischema,
|
|
70
|
-
state,
|
|
71
|
-
setState,
|
|
72
85
|
view,
|
|
73
86
|
setView,
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
buttonText: "Edit",
|
|
87
|
+
onSubmit: onSubmitFunc,
|
|
88
|
+
actionButtons: { withResetButton: false },
|
|
89
|
+
buttonText: t("Edit"),
|
|
77
90
|
buttonLoading: loading,
|
|
78
91
|
opened,
|
|
79
92
|
onClose: () => setOpened(false),
|
|
@@ -81,7 +94,31 @@ function EditDialog({ jsonForms: __jsonForms, ...props }) {
|
|
|
81
94
|
...view === constants.VIEW_MODE.OVERLAY ? overlayProps.overlayProps : {},
|
|
82
95
|
...view === constants.VIEW_MODE.NORMAL ? normalProps.normalProps : {},
|
|
83
96
|
...props,
|
|
84
|
-
title: props.title ?? (info == null ? void 0 : info.edit_title)
|
|
97
|
+
title: props.title ?? (info == null ? void 0 : info.edit_title),
|
|
98
|
+
children: fab ? (
|
|
99
|
+
//* Backward compatibility to fab-react-toolkit
|
|
100
|
+
/* @__PURE__ */ jsxRuntime.jsx(core.Stack, { gap: "xs", children: (_a = info.edit.columns) == null ? void 0 : _a.map((item2, index2) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
101
|
+
FormField.FormField,
|
|
102
|
+
{
|
|
103
|
+
form: form$1,
|
|
104
|
+
name: item2.name,
|
|
105
|
+
label: item2.label,
|
|
106
|
+
description: item2.description,
|
|
107
|
+
schema: item2,
|
|
108
|
+
withAsterisk: item2.required
|
|
109
|
+
},
|
|
110
|
+
index2
|
|
111
|
+
)) })
|
|
112
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
113
|
+
_bundledJsonforms.JsonFormsWithCustomizer,
|
|
114
|
+
{
|
|
115
|
+
schema: info.edit_schema,
|
|
116
|
+
uischema: info.edit_uischema,
|
|
117
|
+
data: state.data,
|
|
118
|
+
onChange: setState,
|
|
119
|
+
customizer: jsonForms
|
|
120
|
+
}
|
|
121
|
+
)
|
|
85
122
|
}
|
|
86
123
|
);
|
|
87
124
|
}
|
|
@@ -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
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 form = require("@mantine/form");
|
|
10
|
-
const React = require("react");
|
|
11
8
|
const useInfo = require("../../hooks/auth/useInfo.cjs");
|
|
12
|
-
|
|
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
|
)
|
|
@@ -5,8 +5,11 @@ const hooks = require("fastapi-rtk/hooks");
|
|
|
5
5
|
const core = require("@mantine/core");
|
|
6
6
|
const React = require("react");
|
|
7
7
|
const useApi = require("../../hooks/api/useApi.cjs");
|
|
8
|
+
require("../../Wrappers/Provider/Contexts/LangContext.cjs");
|
|
9
|
+
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");
|
|
8
10
|
const IconRefresh = require("../../../../.external/cjs/@tabler_icons-react@3.18.0_react@18.3.1/@tabler/icons-react/dist/esm/icons/IconRefresh.cjs");
|
|
9
11
|
const Refresh = React.memo(({ tooltipProps, ...props }) => {
|
|
12
|
+
const { t } = useTranslation.useTranslation();
|
|
10
13
|
const [loading, setLoading] = React.useState(false);
|
|
11
14
|
const { refetch } = useApi.useApi();
|
|
12
15
|
const actionIconProps = hooks.useActionIcon({
|
|
@@ -18,7 +21,7 @@ const Refresh = React.memo(({ tooltipProps, ...props }) => {
|
|
|
18
21
|
},
|
|
19
22
|
...props
|
|
20
23
|
});
|
|
21
|
-
return loading ? /* @__PURE__ */ jsxRuntime.jsx(core.ThemeIcon, { variant: "transparent", size: actionIconProps.size, c: actionIconProps.c, children: /* @__PURE__ */ jsxRuntime.jsx(core.Loader, { size: "100%", color: actionIconProps.c }) }) : /* @__PURE__ */ jsxRuntime.jsx(core.Tooltip, { ...tooltipProps, label: (tooltipProps == null ? void 0 : tooltipProps.refresh) ?? "Refresh", children: /* @__PURE__ */ jsxRuntime.jsx(core.ActionIcon, { ...actionIconProps, children: /* @__PURE__ */ jsxRuntime.jsx(IconRefresh, {}) }) });
|
|
24
|
+
return loading ? /* @__PURE__ */ jsxRuntime.jsx(core.ThemeIcon, { variant: "transparent", size: actionIconProps.size, c: actionIconProps.c, children: /* @__PURE__ */ jsxRuntime.jsx(core.Loader, { size: "100%", color: actionIconProps.c }) }) : /* @__PURE__ */ jsxRuntime.jsx(core.Tooltip, { ...tooltipProps, label: (tooltipProps == null ? void 0 : tooltipProps.refresh) ?? t("Refresh"), children: /* @__PURE__ */ jsxRuntime.jsx(core.ActionIcon, { ...actionIconProps, children: /* @__PURE__ */ jsxRuntime.jsx(IconRefresh, {}) }) });
|
|
22
25
|
});
|
|
23
26
|
Refresh.displayName = "Refresh";
|
|
24
27
|
exports.Refresh = Refresh;
|
|
@@ -7,10 +7,13 @@ const core = require("@mantine/core");
|
|
|
7
7
|
const hooks = require("@mantine/hooks");
|
|
8
8
|
const React = require("react");
|
|
9
9
|
const useApi = require("../../hooks/api/useApi.cjs");
|
|
10
|
+
require("../../Wrappers/Provider/Contexts/LangContext.cjs");
|
|
10
11
|
const ViewDialog = require("./ViewDialog.cjs");
|
|
12
|
+
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");
|
|
11
13
|
const IconEye = require("../../../../.external/cjs/@tabler_icons-react@3.18.0_react@18.3.1/@tabler/icons-react/dist/esm/icons/IconEye.cjs");
|
|
12
14
|
const View = React.memo(({ id, ...props }) => {
|
|
13
15
|
const { info, getEntry } = useApi.useApi();
|
|
16
|
+
const { t } = useTranslation.useTranslation();
|
|
14
17
|
const [item, setItem] = React.useState(null);
|
|
15
18
|
const [loading, setLoading] = hooks.useDebouncedState(false, constants.DEBOUNCE_LOADING_DELAY);
|
|
16
19
|
const [dialogOpen, setDialogOpen] = React.useState(false);
|
|
@@ -30,7 +33,7 @@ const View = React.memo(({ id, ...props }) => {
|
|
|
30
33
|
...props
|
|
31
34
|
});
|
|
32
35
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
33
|
-
/* @__PURE__ */ jsxRuntime.jsx(core.Tooltip, { label: "
|
|
36
|
+
/* @__PURE__ */ jsxRuntime.jsx(core.Tooltip, { label: t("View"), children: /* @__PURE__ */ jsxRuntime.jsx(core.ActionIcon, { ...actionIconProps, children: /* @__PURE__ */ jsxRuntime.jsx(IconEye, {}) }) }),
|
|
34
37
|
/* @__PURE__ */ jsxRuntime.jsx(ViewDialog.ViewDialog, { item, info, opened: dialogOpen, onClose: () => setDialogOpen(false) })
|
|
35
38
|
] });
|
|
36
39
|
});
|
|
@@ -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;
|