fastapi-rtk 1.1.5 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.bundled/jsonforms/cjs/_virtual/index10.cjs +2 -2
- package/dist/.bundled/jsonforms/cjs/_virtual/index3.cjs +2 -2
- package/dist/.bundled/jsonforms/cjs/_virtual/index4.cjs +2 -2
- package/dist/.bundled/jsonforms/cjs/_virtual/index5.cjs +2 -2
- package/dist/.bundled/jsonforms/cjs/_virtual/index6.cjs +2 -2
- package/dist/.bundled/jsonforms/cjs/_virtual/index7.cjs +2 -2
- package/dist/.bundled/jsonforms/cjs/_virtual/index8.cjs +2 -2
- package/dist/.bundled/jsonforms/cjs/_virtual/index9.cjs +2 -2
- package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/MantineInputs/MantineFileInput.cjs +1 -1
- package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/complex/MantineTableControl/MantineTableControl.cjs +1 -1
- package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/hooks/useNavigationComponent.cjs +4 -4
- package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/hooks/useToolbarComponent.cjs +5 -5
- package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/layouts/Array/MantineArrayLayout.cjs +6 -6
- package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/layouts/Group/variants/GroupFieldset.cjs +4 -4
- package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/layouts/MantineHotizontalLayoutRenderer.cjs +2 -2
- package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/layouts/MantineVerticalLayoutRenderer.cjs +2 -2
- package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/testers/isJsonArrayControl.cjs +1 -1
- package/dist/.bundled/jsonforms/esm/_virtual/index10.mjs +2 -2
- package/dist/.bundled/jsonforms/esm/_virtual/index3.mjs +2 -2
- package/dist/.bundled/jsonforms/esm/_virtual/index4.mjs +2 -2
- package/dist/.bundled/jsonforms/esm/_virtual/index5.mjs +2 -2
- package/dist/.bundled/jsonforms/esm/_virtual/index6.mjs +2 -2
- package/dist/.bundled/jsonforms/esm/_virtual/index7.mjs +2 -2
- package/dist/.bundled/jsonforms/esm/_virtual/index8.mjs +2 -2
- package/dist/.bundled/jsonforms/esm/_virtual/index9.mjs +2 -2
- package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/MantineInputs/MantineFileInput.mjs +1 -1
- package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/complex/MantineTableControl/MantineTableControl.mjs +1 -1
- package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/hooks/useNavigationComponent.mjs +1 -1
- package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/hooks/useToolbarComponent.mjs +1 -1
- package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/layouts/Array/MantineArrayLayout.mjs +1 -1
- package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/layouts/Group/variants/GroupFieldset.mjs +1 -1
- package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/layouts/MantineHotizontalLayoutRenderer.mjs +1 -1
- package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/layouts/MantineVerticalLayoutRenderer.mjs +1 -1
- package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/testers/isJsonArrayControl.mjs +1 -1
- package/dist/.bundled/jsonforms/lib/smoke.test.d.ts +1 -0
- package/dist/.external/cjs/ajv@8.20.0/ajv/dist/compile/codegen/index.cjs +1 -1
- package/dist/.external/cjs/ajv@8.20.0/ajv/dist/compile/index.cjs +1 -1
- package/dist/.external/cjs/ajv@8.20.0/ajv/dist/compile/validate/index.cjs +1 -1
- package/dist/.external/cjs/ajv@8.20.0/ajv/dist/vocabularies/applicator/index.cjs +1 -1
- package/dist/.external/cjs/ajv@8.20.0/ajv/dist/vocabularies/core/index.cjs +1 -1
- package/dist/.external/cjs/ajv@8.20.0/ajv/dist/vocabularies/discriminator/index.cjs +1 -1
- package/dist/.external/cjs/ajv@8.20.0/ajv/dist/vocabularies/format/index.cjs +1 -1
- package/dist/.external/cjs/ajv@8.20.0/ajv/dist/vocabularies/validation/index.cjs +1 -1
- package/dist/.external/esm/ajv@8.20.0/ajv/dist/compile/codegen/index.mjs +1 -1
- package/dist/.external/esm/ajv@8.20.0/ajv/dist/compile/index.mjs +1 -1
- package/dist/.external/esm/ajv@8.20.0/ajv/dist/compile/validate/index.mjs +1 -1
- package/dist/.external/esm/ajv@8.20.0/ajv/dist/vocabularies/applicator/index.mjs +1 -1
- package/dist/.external/esm/ajv@8.20.0/ajv/dist/vocabularies/core/index.mjs +1 -1
- package/dist/.external/esm/ajv@8.20.0/ajv/dist/vocabularies/discriminator/index.mjs +1 -1
- package/dist/.external/esm/ajv@8.20.0/ajv/dist/vocabularies/format/index.mjs +1 -1
- package/dist/.external/esm/ajv@8.20.0/ajv/dist/vocabularies/validation/index.mjs +1 -1
- 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._2zjbhqlotlhjxtgwdmcgs6toey/mantine-react-table/dist/index.esm.mjs +3 -3
- package/dist/constants/lib/index.test.d.ts +1 -0
- package/dist/core/cjs/ActionIcons/Add/Add.cjs +3 -5
- package/dist/core/cjs/ActionIcons/Delete/Delete.cjs +16 -13
- package/dist/core/cjs/ActionIcons/Download/Download.cjs +7 -9
- package/dist/core/cjs/ActionIcons/Edit/Edit.cjs +21 -18
- package/dist/core/cjs/ActionIcons/Refresh/Refresh.cjs +15 -13
- package/dist/core/cjs/ActionIcons/Upload/Upload.cjs +9 -10
- package/dist/core/cjs/ActionIcons/View/View.cjs +21 -18
- package/dist/core/cjs/ActionIcons/utils/BaseActionIcon.cjs +15 -0
- package/dist/core/cjs/Dialogs/AddDialog.cjs +10 -8
- package/dist/core/cjs/Dialogs/DeleteDialog.cjs +9 -4
- package/dist/core/cjs/Dialogs/EditDialog.cjs +24 -9
- package/dist/core/cjs/Tables/DataGrid/Toolbar/Filter/FilterMenu.cjs +1 -1
- package/dist/core/cjs/Tables/NextGenDataGrid/NextGenDataGrid.cjs +4 -4
- package/dist/core/cjs/Tables/NextGenDataGrid/components/OptimizedMRT_RowSelectColumn/getOptimizedMRT_RowSelectColumnDef.cjs +3 -3
- package/dist/core/cjs/Tables/NextGenDataGrid/hooks/useColumns/AdvancedFilters.cjs +1 -1
- package/dist/core/cjs/Tables/NextGenDataGrid/hooks/useToolbar/basicToolbars.cjs +6 -6
- package/dist/core/cjs/Tables/NextGenDataGrid/hooks/useToolbar/mrtToolbars.cjs +96 -0
- package/dist/core/cjs/Tables/NextGenDataGrid/patch/MRT_TableContainer.cjs +1 -1
- package/dist/core/cjs/Tables/NextGenDataGrid/patch/body/MRT_TableBodyRow.cjs +1 -1
- package/dist/core/cjs/Tables/NextGenDataGrid/patch/head/MRT_TableHead.cjs +1 -1
- package/dist/core/cjs/Tables/NextGenDataGrid/patch/toolbar/MRT_ToolbarAlertBanner.cjs +37 -30
- package/dist/core/cjs/Wrappers/ApiProvider/ApiProvider.cjs +0 -2
- package/dist/core/cjs/Wrappers/ApiProvider/hooks/useProvideApi.cjs +2 -5
- package/dist/core/cjs/Wrappers/ApiProvider/hooks/utils/useApiActions.cjs +23 -94
- package/dist/core/esm/ActionIcons/Add/Add.mjs +3 -5
- package/dist/core/esm/ActionIcons/Delete/Delete.mjs +17 -14
- package/dist/core/esm/ActionIcons/Download/Download.mjs +8 -10
- package/dist/core/esm/ActionIcons/Edit/Edit.mjs +22 -19
- package/dist/core/esm/ActionIcons/Refresh/Refresh.mjs +15 -13
- package/dist/core/esm/ActionIcons/Upload/Upload.mjs +10 -11
- package/dist/core/esm/ActionIcons/View/View.mjs +22 -19
- package/dist/core/esm/ActionIcons/utils/BaseActionIcon.mjs +15 -0
- package/dist/core/esm/Dialogs/AddDialog.mjs +10 -8
- package/dist/core/esm/Dialogs/DeleteDialog.mjs +9 -4
- package/dist/core/esm/Dialogs/EditDialog.mjs +24 -9
- package/dist/core/esm/Tables/DataGrid/Toolbar/Filter/FilterMenu.mjs +1 -1
- package/dist/core/esm/Tables/NextGenDataGrid/NextGenDataGrid.mjs +4 -4
- package/dist/core/esm/Tables/NextGenDataGrid/components/OptimizedMRT_RowSelectColumn/getOptimizedMRT_RowSelectColumnDef.mjs +3 -3
- package/dist/core/esm/Tables/NextGenDataGrid/hooks/useColumns/AdvancedFilters.mjs +1 -1
- package/dist/core/esm/Tables/NextGenDataGrid/hooks/useToolbar/basicToolbars.mjs +6 -6
- package/dist/core/esm/Tables/NextGenDataGrid/hooks/useToolbar/mrtToolbars.mjs +96 -0
- package/dist/core/esm/Tables/NextGenDataGrid/patch/MRT_TableContainer.mjs +1 -1
- package/dist/core/esm/Tables/NextGenDataGrid/patch/body/MRT_TableBodyRow.mjs +1 -1
- package/dist/core/esm/Tables/NextGenDataGrid/patch/head/MRT_TableHead.mjs +1 -1
- package/dist/core/esm/Tables/NextGenDataGrid/patch/toolbar/MRT_ToolbarAlertBanner.mjs +37 -30
- package/dist/core/esm/Wrappers/ApiProvider/ApiProvider.mjs +0 -2
- package/dist/core/esm/Wrappers/ApiProvider/hooks/useProvideApi.mjs +2 -5
- package/dist/core/esm/Wrappers/ApiProvider/hooks/utils/useApiActions.mjs +23 -94
- package/dist/core/lib/ActionIcons/Actions.test.d.ts +1 -0
- package/dist/core/lib/ActionIcons/Add/Add.test.d.ts +1 -0
- package/dist/core/lib/ActionIcons/Delete/Delete.test.d.ts +1 -0
- package/dist/core/lib/ActionIcons/Download/Download.test.d.ts +1 -0
- package/dist/core/lib/ActionIcons/Edit/Edit.test.d.ts +1 -0
- package/dist/core/lib/ActionIcons/Refresh/Refresh.test.d.ts +1 -0
- package/dist/core/lib/ActionIcons/Upload/Upload.test.d.ts +1 -0
- package/dist/core/lib/ActionIcons/View/View.test.d.ts +1 -0
- package/dist/core/lib/ActionIcons/utils/BaseActionIcon.d.ts +18 -0
- package/dist/core/lib/ActionIcons/utils/BaseActionIcon.test.d.ts +1 -0
- package/dist/core/lib/Dialogs/AddDialog.test.d.ts +1 -0
- package/dist/core/lib/Dialogs/DeleteDialog.test.d.ts +1 -0
- package/dist/core/lib/Dialogs/EditDialog.test.d.ts +1 -0
- package/dist/core/lib/Dialogs/ViewDialog.test.d.ts +1 -0
- package/dist/core/lib/Inputs/DateTimePicker.test.d.ts +1 -0
- package/dist/core/lib/Inputs/TimePicker.test.d.ts +1 -0
- package/dist/core/lib/Menu/UserMenu/UserMenu.test.d.ts +1 -0
- package/dist/core/lib/Modals/CommonModal.test.d.ts +1 -0
- package/dist/core/lib/Modals/normalProps.test.d.ts +1 -0
- package/dist/core/lib/Modals/overlayProps.test.d.ts +1 -0
- package/dist/core/lib/Selectors/LanguageSelector.test.d.ts +1 -0
- package/dist/core/lib/Tables/DataGrid/DataGrid.test.d.ts +1 -0
- package/dist/core/lib/Tables/DataGrid/ErrorDialog.test.d.ts +1 -0
- package/dist/core/lib/Tables/NextGenDataGrid/FallbackWrapper.test.d.ts +1 -0
- package/dist/core/lib/Tables/NextGenDataGrid/NextGenDataGrid.test.d.ts +1 -0
- package/dist/core/lib/Tables/NextGenDataGrid/hooks/useToolbar/mrtToolbars.d.ts +5 -0
- package/dist/core/lib/Tables/NextGenDataGrid/utils.test.d.ts +1 -0
- package/dist/core/lib/Wrappers/ApiProvider/ApiProvider.d.ts +1 -6
- package/dist/core/lib/Wrappers/ApiProvider/ApiProvider.test.d.ts +1 -0
- package/dist/core/lib/Wrappers/ApiProvider/hooks/useProvideApi.d.ts +3 -3
- package/dist/core/lib/Wrappers/ApiProvider/hooks/useProvideApi.test.d.ts +1 -0
- package/dist/core/lib/Wrappers/ApiProvider/hooks/useProvideBulk.test.d.ts +1 -0
- package/dist/core/lib/Wrappers/ApiProvider/hooks/useProvideForm.test.d.ts +1 -0
- package/dist/core/lib/Wrappers/ApiProvider/hooks/utils/useApiActions.d.ts +2 -5
- package/dist/core/lib/Wrappers/ApiProvider/hooks/utils/useApiActions.test.d.ts +1 -0
- package/dist/core/lib/Wrappers/ApiProvider/hooks/utils/useLatest.test.d.ts +1 -0
- package/dist/core/lib/Wrappers/ApiProvider/hooks/utils/useStreamingData.test.d.ts +1 -0
- package/dist/core/lib/Wrappers/ApiProvider/utils/api/createItem.test.d.ts +1 -0
- package/dist/core/lib/Wrappers/ApiProvider/utils/api/deleteItem.test.d.ts +1 -0
- package/dist/core/lib/Wrappers/ApiProvider/utils/api/downloadItems.test.d.ts +1 -0
- package/dist/core/lib/Wrappers/ApiProvider/utils/api/formCreateItem.test.d.ts +1 -0
- package/dist/core/lib/Wrappers/ApiProvider/utils/api/formUpdateItem.test.d.ts +1 -0
- package/dist/core/lib/Wrappers/ApiProvider/utils/api/getInfo.test.d.ts +1 -0
- package/dist/core/lib/Wrappers/ApiProvider/utils/api/getItem.test.d.ts +1 -0
- package/dist/core/lib/Wrappers/ApiProvider/utils/api/getItems.test.d.ts +1 -0
- package/dist/core/lib/Wrappers/ApiProvider/utils/api/updateItem.test.d.ts +1 -0
- package/dist/core/lib/Wrappers/ApiProvider/utils/api/uploadItems.test.d.ts +1 -0
- package/dist/core/lib/Wrappers/ApiProvider/utils/bulkActions/postBulkAction.test.d.ts +1 -0
- package/dist/core/lib/Wrappers/ApiProvider/utils/convertInfo.test.d.ts +1 -0
- package/dist/core/lib/Wrappers/ApiProvider/utils/createQueryParams.test.d.ts +1 -0
- package/dist/core/lib/Wrappers/ApiProvider/utils/getDefaultValues.test.d.ts +1 -0
- package/dist/core/lib/Wrappers/ApiProvider/utils/getValidationSchema.test.d.ts +1 -0
- package/dist/core/lib/Wrappers/InfiniteScroll/InfiniteScroll.test.d.ts +1 -0
- package/dist/core/lib/Wrappers/LazyLoadWrapper/LazyLoadWrapper.test.d.ts +1 -0
- package/dist/core/lib/Wrappers/Provider/Provider.test.d.ts +1 -0
- package/dist/core/lib/Wrappers/Provider/hooks/useProvideAuth.test.d.ts +1 -0
- package/dist/core/lib/Wrappers/Provider/hooks/useProvideInfo.test.d.ts +1 -0
- package/dist/core/lib/Wrappers/Provider/hooks/useProvideLang.test.d.ts +1 -0
- package/dist/core/lib/Wrappers/Provider/utils/authFetch.test.d.ts +1 -0
- package/dist/core/lib/Wrappers/Provider/utils/userCRUD.test.d.ts +1 -0
- package/dist/core/lib/hooks/api/useApi.d.ts +8 -0
- package/dist/core/lib/hooks/api/useApi.test.d.ts +1 -0
- package/dist/core/lib/hooks/api/useBulkActions.test.d.ts +1 -0
- package/dist/core/lib/hooks/api/useForms.test.d.ts +1 -0
- package/dist/core/lib/hooks/auth/useAuth.test.d.ts +1 -0
- package/dist/core/lib/hooks/auth/useInfo.test.d.ts +1 -0
- package/dist/core/lib/hooks/lang/useLang.test.d.ts +1 -0
- package/dist/core/lib/test-helpers/uiWrap.d.ts +12 -0
- package/dist/hooks/lib/useActionIcon/useActionIcon.test.d.ts +1 -0
- package/dist/hooks/lib/useCustomFetch/useCustomFetch.test.d.ts +1 -0
- package/dist/hooks/lib/useSyncValues/useSyncValues.test.d.ts +1 -0
- package/dist/hooks/lib/useTrueOnce/useTrueOnce.test.d.ts +1 -0
- package/dist/jsonforms/cjs/MantineInputs/MantineFileInput.cjs +1 -1
- package/dist/jsonforms/cjs/complex/MantineTableControl/MantineTableControl.cjs +1 -1
- package/dist/jsonforms/cjs/hooks/useNavigationComponent.cjs +4 -4
- package/dist/jsonforms/cjs/hooks/useToolbarComponent.cjs +5 -5
- package/dist/jsonforms/cjs/layouts/Array/MantineArrayLayout.cjs +6 -6
- package/dist/jsonforms/cjs/layouts/Group/variants/GroupFieldset.cjs +4 -4
- package/dist/jsonforms/cjs/layouts/MantineHotizontalLayoutRenderer.cjs +2 -2
- package/dist/jsonforms/cjs/layouts/MantineVerticalLayoutRenderer.cjs +2 -2
- package/dist/jsonforms/cjs/testers/isJsonArrayControl.cjs +1 -1
- package/dist/jsonforms/esm/MantineInputs/MantineFileInput.mjs +1 -1
- package/dist/jsonforms/esm/complex/MantineTableControl/MantineTableControl.mjs +1 -1
- package/dist/jsonforms/esm/hooks/useNavigationComponent.mjs +1 -1
- package/dist/jsonforms/esm/hooks/useToolbarComponent.mjs +1 -1
- package/dist/jsonforms/esm/layouts/Array/MantineArrayLayout.mjs +1 -1
- package/dist/jsonforms/esm/layouts/Group/variants/GroupFieldset.mjs +1 -1
- package/dist/jsonforms/esm/layouts/MantineHotizontalLayoutRenderer.mjs +1 -1
- package/dist/jsonforms/esm/layouts/MantineVerticalLayoutRenderer.mjs +1 -1
- package/dist/jsonforms/esm/testers/isJsonArrayControl.mjs +1 -1
- package/dist/jsonforms/lib/JsonFormsWithCustomizer/JsonFormsWithCustomizer.test.d.ts +1 -0
- package/dist/jsonforms/lib/MantineInputs/MantineBooleanInput.test.d.ts +1 -0
- package/dist/jsonforms/lib/MantineInputs/MantineDateInput.test.d.ts +1 -0
- package/dist/jsonforms/lib/MantineInputs/MantineDateTimeInput.test.d.ts +1 -0
- package/dist/jsonforms/lib/MantineInputs/MantineEnumArrayInput.test.d.ts +1 -0
- package/dist/jsonforms/lib/MantineInputs/MantineEnumInput.test.d.ts +1 -0
- package/dist/jsonforms/lib/MantineInputs/MantineFileInput.test.d.ts +1 -0
- package/dist/jsonforms/lib/MantineInputs/MantineImageInput.test.d.ts +1 -0
- package/dist/jsonforms/lib/MantineInputs/MantineIntegerInput.test.d.ts +1 -0
- package/dist/jsonforms/lib/MantineInputs/MantineJsonInput.test.d.ts +1 -0
- package/dist/jsonforms/lib/MantineInputs/MantineNumberInput.test.d.ts +1 -0
- package/dist/jsonforms/lib/MantineInputs/MantineObjectInput.test.d.ts +1 -0
- package/dist/jsonforms/lib/MantineInputs/MantineOneOfEnumInput.test.d.ts +1 -0
- package/dist/jsonforms/lib/MantineInputs/MantineTextInput.test.d.ts +1 -0
- package/dist/jsonforms/lib/MantineInputs/MantineTimeInput.test.d.ts +1 -0
- package/dist/jsonforms/lib/complex/MantineArrayControl/MantineArrayControl.dispatch.test.d.ts +1 -0
- package/dist/jsonforms/lib/complex/MantineArrayControl/MantineArrayControl.test.d.ts +1 -0
- package/dist/jsonforms/lib/complex/MantineEnumArrayControl.dispatch.test.d.ts +1 -0
- package/dist/jsonforms/lib/complex/MantineEnumArrayControl.test.d.ts +1 -0
- package/dist/jsonforms/lib/complex/MantineObjectControl.dispatch.test.d.ts +1 -0
- package/dist/jsonforms/lib/complex/MantineObjectControl.test.d.ts +1 -0
- package/dist/jsonforms/lib/complex/MantineTableControl/MantineTableControl.test.d.ts +1 -0
- package/dist/jsonforms/lib/controls/MantineBooleanControl.test.d.ts +1 -0
- package/dist/jsonforms/lib/controls/MantineDateControl.test.d.ts +1 -0
- package/dist/jsonforms/lib/controls/MantineDateTimeControl.test.d.ts +1 -0
- package/dist/jsonforms/lib/controls/MantineEnumControl.test.d.ts +1 -0
- package/dist/jsonforms/lib/controls/MantineFileControl.test.d.ts +1 -0
- package/dist/jsonforms/lib/controls/MantineImageControl.test.d.ts +1 -0
- package/dist/jsonforms/lib/controls/MantineIntegerControl.test.d.ts +1 -0
- package/dist/jsonforms/lib/controls/MantineJsonControl.test.d.ts +1 -0
- package/dist/jsonforms/lib/controls/MantineNumberControl.test.d.ts +1 -0
- package/dist/jsonforms/lib/controls/MantineOneOfEnumControl.test.d.ts +1 -0
- package/dist/jsonforms/lib/controls/MantineTextControl.test.d.ts +1 -0
- package/dist/jsonforms/lib/controls/MantineTimeControl.test.d.ts +1 -0
- package/dist/jsonforms/lib/hooks/useThemeCustomizer.d.ts +6 -0
- package/dist/jsonforms/lib/hooks/useThemeCustomizer.test.d.ts +1 -0
- package/dist/jsonforms/lib/labels/MantineLabelRenderer.test.d.ts +1 -0
- package/dist/jsonforms/lib/layouts/Array/MantineArrayLayoutRenderer.dispatch.test.d.ts +1 -0
- package/dist/jsonforms/lib/layouts/Array/MantineArrayLayoutRenderer.test.d.ts +1 -0
- package/dist/jsonforms/lib/layouts/Categorization/MantineCategorizationLayoutRenderer.dispatch.test.d.ts +1 -0
- package/dist/jsonforms/lib/layouts/Categorization/MantineCategorizationLayoutRenderer.test.d.ts +1 -0
- package/dist/jsonforms/lib/layouts/Group/MantineGroupLayoutRenderer.dispatch.test.d.ts +1 -0
- package/dist/jsonforms/lib/layouts/Group/MantineGroupLayoutRenderer.test.d.ts +1 -0
- package/dist/jsonforms/lib/layouts/MantineHotizontalLayoutRenderer.dispatch.test.d.ts +1 -0
- package/dist/jsonforms/lib/layouts/MantineHotizontalLayoutRenderer.test.d.ts +1 -0
- package/dist/jsonforms/lib/layouts/MantineVerticalLayoutRenderer.dispatch.test.d.ts +1 -0
- package/dist/jsonforms/lib/layouts/MantineVerticalLayoutRenderer.test.d.ts +1 -0
- package/dist/jsonforms/lib/renderers/mantineCells.test.d.ts +1 -0
- package/dist/jsonforms/lib/renderers/mantineRenderers.test.d.ts +1 -0
- package/dist/jsonforms/lib/test-helpers/inputWrap.d.ts +167 -0
- package/dist/jsonforms/lib/test-helpers/jsonFormsWrap.d.ts +9 -0
- package/dist/jsonforms/lib/testers/isEnumArrayArrayControl.test.d.ts +1 -0
- package/dist/jsonforms/lib/testers/isEnumArrayControl.test.d.ts +1 -0
- package/dist/jsonforms/lib/testers/isFileControl.test.d.ts +1 -0
- package/dist/jsonforms/lib/testers/isFilesControl.test.d.ts +1 -0
- package/dist/jsonforms/lib/testers/isImageControl.test.d.ts +1 -0
- package/dist/jsonforms/lib/testers/isImagesControl.test.d.ts +1 -0
- package/dist/jsonforms/lib/testers/isJsonArrayControl.d.ts +6 -2
- package/dist/jsonforms/lib/testers/isJsonArrayControl.test.d.ts +1 -0
- package/dist/jsonforms/lib/testers/isJsonControl.test.d.ts +1 -0
- package/dist/jsonforms/lib/utils/getAbsoluteValue.test.d.ts +1 -0
- package/dist/jsonforms/lib/utils/isSchemaTypeInclude.test.d.ts +1 -0
- package/dist/jsonforms/lib/utils/layout.test.d.ts +1 -0
- package/dist/jsonforms/lib/utils/utcConverter.test.d.ts +1 -0
- package/dist/jsonforms/lib/utils/withAjvProps.test.d.ts +1 -0
- package/dist/jsonforms/lib/utils/withDebounce.test.d.ts +1 -0
- package/dist/jsonforms/lib/utils/withLabelMappingProps.test.d.ts +1 -0
- package/dist/utils/lib/FastAPIRTKLogger/FastAPIRTKLogger.test.d.ts +1 -0
- package/dist/utils/lib/Memoizer/MemoWrapper.test.d.ts +1 -0
- package/dist/utils/lib/Memoizer/RenderWrapper.test.d.ts +1 -0
- package/dist/utils/lib/convertId/convertId.test.d.ts +1 -0
- package/dist/utils/lib/convertToFormData/convertToFormData.test.d.ts +1 -0
- package/dist/utils/lib/createFetchParams/createFetchParams.test.d.ts +1 -0
- package/dist/utils/lib/createSafeContext/createSafeContext.test.d.ts +1 -0
- package/dist/utils/lib/deepMerge/deepMerge.test.d.ts +1 -0
- package/dist/utils/lib/getByPath/getByPath.test.d.ts +1 -0
- package/dist/utils/lib/getItemId/getItemId.test.d.ts +1 -0
- package/dist/utils/lib/getItemName/getItemName.test.d.ts +1 -0
- package/dist/utils/lib/getValue/getValue.test.d.ts +1 -0
- package/dist/utils/lib/getValueOrDefault/getValueOrDefault.test.d.ts +1 -0
- package/dist/utils/lib/isTruthy/isTruthy.test.d.ts +1 -0
- package/dist/utils/lib/mergeProps/mergeProps.test.d.ts +1 -0
- package/dist/utils/lib/parseFromValuesOrFunc/parseFromValuesOrFunc.test.d.ts +1 -0
- package/dist/utils/lib/parseResponse/parseResponse.test.d.ts +1 -0
- package/dist/utils/lib/parseValue/parseValue.test.d.ts +1 -0
- package/dist/utils/lib/urlJoin/urlJoin.test.d.ts +1 -0
- package/dist/utils/lib/useWatchRef/useWatchRef.test.d.ts +1 -0
- package/dist/zustand/lib/useProxy/useProxy.test.d.ts +1 -0
- package/dist/zustand/lib/utils/compareStateWithStore.test.d.ts +1 -0
- package/dist/zustand/lib/utils/createProxy.test.d.ts +1 -0
- package/package.json +24 -11
- package/dist/core/lib/Tables/NextGenDataGrid/hooks/useSize.d.ts +0 -20
- /package/dist/.external/cjs/{mantine-form-yup-resolver@2.0.0_@mantine_form@8.3.18_yup@1.7.1 → mantine-form-yup-resolver@2.0.0_@mantine_form@9.1.1_yup@1.7.1}/mantine-form-yup-resolver/dist/esm/index.cjs +0 -0
- /package/dist/.external/esm/{mantine-form-yup-resolver@2.0.0_@mantine_form@8.3.18_yup@1.7.1 → mantine-form-yup-resolver@2.0.0_@mantine_form@9.1.1_yup@1.7.1}/mantine-form-yup-resolver/dist/esm/index.mjs +0 -0
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { DEBOUNCE_LOADING_DELAY, DEFAULT_DELIMITER, DEFAULT_QUOTECHAR, DELIMITER_DATA, QUOTECHAR_DATA } from "fastapi-rtk/constants";
|
|
3
|
-
import {
|
|
4
|
-
import { Modal, Stack, Group, Select, FileInput, Button, Tooltip, ActionIcon } from "@mantine/core";
|
|
3
|
+
import { Modal, Stack, Group, Select, FileInput, Button } from "@mantine/core";
|
|
5
4
|
import { useDisclosure, useDebouncedState } from "@mantine/hooks";
|
|
6
5
|
import { memo, useState } from "react";
|
|
7
6
|
import ForwardRef$2 from "../../_virtual/file-type-csv.mjs";
|
|
@@ -9,21 +8,21 @@ import ForwardRef$1 from "../../_virtual/quote.mjs";
|
|
|
9
8
|
import ForwardRef from "../../_virtual/separator-vertical.mjs";
|
|
10
9
|
import ForwardRef$3 from "../../_virtual/upload.mjs";
|
|
11
10
|
import { useApi } from "../../hooks/api/useApi.mjs";
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
import { BaseActionIcon } from "../utils/BaseActionIcon.mjs";
|
|
12
|
+
const Upload = memo((props) => {
|
|
13
|
+
const { upload, refetch, setError, resetError } = useApi();
|
|
14
14
|
const [opened, { toggle, close }] = useDisclosure();
|
|
15
15
|
const [loading, setLoading] = useDebouncedState(false, DEBOUNCE_LOADING_DELAY);
|
|
16
16
|
const [file, setFile] = useState();
|
|
17
17
|
const [delimiter, setDelimiter] = useState(DEFAULT_DELIMITER);
|
|
18
18
|
const [quotechar, setQuotechar] = useState(DEFAULT_QUOTECHAR);
|
|
19
|
-
const actionIconProps = useActionIcon({ onClick: toggle, ...props });
|
|
20
19
|
const onUpload = () => {
|
|
21
20
|
setLoading(true);
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
21
|
+
resetError();
|
|
22
|
+
upload(file, { delimiter, quotechar }).then(() => {
|
|
23
|
+
refetch();
|
|
24
|
+
}).catch((error) => {
|
|
25
|
+
setError({ message: "Could not upload", originalError: error });
|
|
27
26
|
}).finally(() => {
|
|
28
27
|
setLoading(false);
|
|
29
28
|
close();
|
|
@@ -86,7 +85,7 @@ const Upload = memo(({ tooltipProps, iconProps, ...props }) => {
|
|
|
86
85
|
] })
|
|
87
86
|
}
|
|
88
87
|
),
|
|
89
|
-
/* @__PURE__ */ jsx(
|
|
88
|
+
/* @__PURE__ */ jsx(BaseActionIcon, { Icon: ForwardRef$3, label: "Upload CSV", loading, onClick: toggle, ...props })
|
|
90
89
|
] });
|
|
91
90
|
});
|
|
92
91
|
Upload.displayName = "Upload";
|
|
@@ -1,35 +1,38 @@
|
|
|
1
|
-
import { jsx
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { DEBOUNCE_LOADING_DELAY } from "fastapi-rtk/constants";
|
|
3
|
-
import { useActionIcon } from "fastapi-rtk/hooks";
|
|
4
|
-
import { Tooltip, ActionIcon } from "@mantine/core";
|
|
5
3
|
import { useDebouncedState } from "@mantine/hooks";
|
|
6
4
|
import { memo } from "react";
|
|
7
5
|
import ForwardRef from "../../_virtual/eye.mjs";
|
|
8
6
|
import { useApi } from "../../hooks/api/useApi.mjs";
|
|
9
7
|
import { useForms } from "../../hooks/api/useForms.mjs";
|
|
10
8
|
import "../../Wrappers/Provider/Contexts/LangContext.mjs";
|
|
9
|
+
import { BaseActionIcon } from "../utils/BaseActionIcon.mjs";
|
|
11
10
|
import { useTranslation } from "../../../../.external/esm/react-i18next@15.7.4_i18next@25.10.10_react-dom@19.2.6_react@19.2.6_typescript@5.9.3/react-i18next/dist/es/useTranslation.mjs";
|
|
12
|
-
const View = memo(({ id,
|
|
13
|
-
const { getEntry } = useApi();
|
|
11
|
+
const View = memo(({ id, ...props }) => {
|
|
12
|
+
const { getEntry, setError, resetError } = useApi();
|
|
14
13
|
const { t } = useTranslation();
|
|
15
14
|
const { setOpened, setItem } = useForms("view");
|
|
16
15
|
const [loading, setLoading] = useDebouncedState(false, DEBOUNCE_LOADING_DELAY);
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
return /* @__PURE__ */ jsx(
|
|
17
|
+
BaseActionIcon,
|
|
18
|
+
{
|
|
19
|
+
Icon: ForwardRef,
|
|
20
|
+
label: t("View"),
|
|
21
|
+
size: "sm",
|
|
22
|
+
loading,
|
|
23
|
+
onClick: () => {
|
|
24
|
+
setLoading(true);
|
|
25
|
+
resetError();
|
|
26
|
+
getEntry(id).then((entry) => {
|
|
22
27
|
setItem(entry);
|
|
23
28
|
setOpened(true);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
});
|
|
32
|
-
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(Tooltip, { label: t("View"), children: /* @__PURE__ */ jsx(ActionIcon, { ...actionIconProps, children: /* @__PURE__ */ jsx(ForwardRef, { ...iconProps }) }) }) });
|
|
29
|
+
}).catch((error) => {
|
|
30
|
+
setError({ message: "Could not fetch item with id {{id}}", data: { id }, originalError: error });
|
|
31
|
+
}).finally(() => setLoading(false));
|
|
32
|
+
},
|
|
33
|
+
...props
|
|
34
|
+
}
|
|
35
|
+
);
|
|
33
36
|
});
|
|
34
37
|
View.displayName = "View";
|
|
35
38
|
export {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useActionIcon } from "fastapi-rtk/hooks";
|
|
3
|
+
import { ThemeIcon, Loader, Tooltip, ActionIcon } from "@mantine/core";
|
|
4
|
+
import { memo } from "react";
|
|
5
|
+
const BaseActionIcon = memo(({ Icon, label, tooltipProps, iconProps, loading, ...props }) => {
|
|
6
|
+
const actionIconProps = useActionIcon(props);
|
|
7
|
+
if (loading) {
|
|
8
|
+
return /* @__PURE__ */ jsx(ThemeIcon, { variant: "transparent", size: actionIconProps.size, c: actionIconProps.c, children: /* @__PURE__ */ jsx(Loader, { size: "100%", color: actionIconProps.c }) });
|
|
9
|
+
}
|
|
10
|
+
return /* @__PURE__ */ jsx(Tooltip, { withinPortal: true, ...tooltipProps, label: (tooltipProps == null ? void 0 : tooltipProps.label) ?? label, children: /* @__PURE__ */ jsx(ActionIcon, { "aria-label": label, ...actionIconProps, children: /* @__PURE__ */ jsx(Icon, { ...iconProps }) }) });
|
|
11
|
+
});
|
|
12
|
+
BaseActionIcon.displayName = "BaseActionIcon";
|
|
13
|
+
export {
|
|
14
|
+
BaseActionIcon
|
|
15
|
+
};
|
|
@@ -5,7 +5,7 @@ import { deepMerge } from "fastapi-rtk/utils";
|
|
|
5
5
|
import { useProps, Stack } from "@mantine/core";
|
|
6
6
|
import { useForm } from "@mantine/form";
|
|
7
7
|
import { useDebouncedState } from "@mantine/hooks";
|
|
8
|
-
import { yupResolver } from "../../../.external/esm/mantine-form-yup-resolver@2.0.0_@mantine_form@
|
|
8
|
+
import { yupResolver } from "../../../.external/esm/mantine-form-yup-resolver@2.0.0_@mantine_form@9.1.1_yup@1.7.1/mantine-form-yup-resolver/dist/esm/index.mjs";
|
|
9
9
|
import { useMemo, useCallback, useEffect } from "react";
|
|
10
10
|
import { useApi } from "../hooks/api/useApi.mjs";
|
|
11
11
|
import { useForms } from "../hooks/api/useForms.mjs";
|
|
@@ -26,7 +26,7 @@ function AddDialog({
|
|
|
26
26
|
...props
|
|
27
27
|
}) {
|
|
28
28
|
var _a;
|
|
29
|
-
const { info, refetch, refetchInfo, addEntry } = useApi();
|
|
29
|
+
const { info, refetch, refetchInfo, addEntry, setError, resetError } = useApi();
|
|
30
30
|
const { t } = useTranslation();
|
|
31
31
|
const { opened, setOpened, state, getState, setState, reset, view, setView } = useForms("add");
|
|
32
32
|
const [loading, setLoading] = useDebouncedState(false, DEBOUNCE_LOADING_DELAY);
|
|
@@ -40,18 +40,20 @@ function AddDialog({
|
|
|
40
40
|
(e) => {
|
|
41
41
|
e == null ? void 0 : e.preventDefault();
|
|
42
42
|
setLoading(true);
|
|
43
|
+
resetError();
|
|
43
44
|
addEntry(getState().data).then((res) => {
|
|
44
45
|
onSuccess == null ? void 0 : onSuccess(res);
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}
|
|
49
|
-
|
|
46
|
+
refetch();
|
|
47
|
+
refetchInfo();
|
|
48
|
+
}).catch((error) => {
|
|
49
|
+
setError({ message: "Could not add item", originalError: error });
|
|
50
|
+
onError == null ? void 0 : onError(error);
|
|
51
|
+
}).finally(() => {
|
|
50
52
|
setLoading(false);
|
|
51
53
|
setOpened(false);
|
|
52
54
|
});
|
|
53
55
|
},
|
|
54
|
-
[addEntry, getState, onError, onSuccess, refetch, refetchInfo, setLoading, setOpened]
|
|
56
|
+
[addEntry, getState, onError, onSuccess, refetch, refetchInfo, resetError, setError, setLoading, setOpened]
|
|
55
57
|
);
|
|
56
58
|
const { fab } = useInfo();
|
|
57
59
|
const form = useForm({ initialValues: info.add.defaultValues, validate: yupResolver(info.add.schema) });
|
|
@@ -10,7 +10,7 @@ import { useForms } from "../hooks/api/useForms.mjs";
|
|
|
10
10
|
import "../Wrappers/Provider/Contexts/LangContext.mjs";
|
|
11
11
|
import { useTranslation } from "../../../.external/esm/react-i18next@15.7.4_i18next@25.10.10_react-dom@19.2.6_react@19.2.6_typescript@5.9.3/react-i18next/dist/es/useTranslation.mjs";
|
|
12
12
|
const DeleteDialog = ({ deleteText, onSuccess, onError, ...props }) => {
|
|
13
|
-
const { refetch, refetchInfo, deleteEntry } = useApi();
|
|
13
|
+
const { refetch, refetchInfo, deleteEntry, setError, resetError } = useApi();
|
|
14
14
|
const { t } = useTranslation();
|
|
15
15
|
const { opened, setOpened, getItem, reset, view, setView } = useForms("delete");
|
|
16
16
|
const [loading, setLoading] = useDebouncedState(false, DEBOUNCE_LOADING_DELAY);
|
|
@@ -21,16 +21,21 @@ const DeleteDialog = ({ deleteText, onSuccess, onError, ...props }) => {
|
|
|
21
21
|
(e) => {
|
|
22
22
|
e == null ? void 0 : e.preventDefault();
|
|
23
23
|
setLoading(true);
|
|
24
|
-
|
|
24
|
+
resetError();
|
|
25
|
+
const id = getItem();
|
|
26
|
+
deleteEntry(id).then((res) => {
|
|
25
27
|
onSuccess == null ? void 0 : onSuccess(res);
|
|
26
28
|
refetch();
|
|
27
29
|
refetchInfo();
|
|
28
|
-
}).catch(
|
|
30
|
+
}).catch((error) => {
|
|
31
|
+
setError({ message: "Could not delete item with id {{id}}", data: { id }, originalError: error });
|
|
32
|
+
onError == null ? void 0 : onError(error);
|
|
33
|
+
}).finally(() => {
|
|
29
34
|
setLoading(false);
|
|
30
35
|
setOpened(false);
|
|
31
36
|
});
|
|
32
37
|
},
|
|
33
|
-
[setLoading, deleteEntry, getItem, onError, onSuccess, refetch, refetchInfo, setOpened]
|
|
38
|
+
[setLoading, resetError, deleteEntry, getItem, onError, onSuccess, refetch, refetchInfo, setError, setOpened]
|
|
34
39
|
);
|
|
35
40
|
return /* @__PURE__ */ jsx(
|
|
36
41
|
CommonModal,
|
|
@@ -6,7 +6,7 @@ import { useProps, Stack } from "@mantine/core";
|
|
|
6
6
|
import { useForm } from "@mantine/form";
|
|
7
7
|
import { useDebouncedState } from "@mantine/hooks";
|
|
8
8
|
import { l as lodashExports } from "../_virtual/lodash.mjs";
|
|
9
|
-
import { yupResolver } from "../../../.external/esm/mantine-form-yup-resolver@2.0.0_@mantine_form@
|
|
9
|
+
import { yupResolver } from "../../../.external/esm/mantine-form-yup-resolver@2.0.0_@mantine_form@9.1.1_yup@1.7.1/mantine-form-yup-resolver/dist/esm/index.mjs";
|
|
10
10
|
import { useMemo, useRef, useEffect, useCallback } from "react";
|
|
11
11
|
import { convertToFormInputs as convertToFormInputs$1 } from "../ActionIcons/utils/convertToFormInputs.mjs";
|
|
12
12
|
import { convertToFormInputs } from "../fab-react-toolkit-patch/utils/convertToFormInputs.mjs";
|
|
@@ -29,7 +29,7 @@ function EditDialog({
|
|
|
29
29
|
...props
|
|
30
30
|
}) {
|
|
31
31
|
var _a;
|
|
32
|
-
const { info, refetch, refetchInfo, updateEntry } = useApi();
|
|
32
|
+
const { info, refetch, refetchInfo, updateEntry, setError, resetError } = useApi();
|
|
33
33
|
const { t } = useTranslation();
|
|
34
34
|
const { opened, setOpened, item, getItem, state, getState, setState, reset, view, setView } = useForms("edit");
|
|
35
35
|
const [loading, setLoading] = useDebouncedState(false, DEBOUNCE_LOADING_DELAY);
|
|
@@ -59,6 +59,7 @@ function EditDialog({
|
|
|
59
59
|
(e) => {
|
|
60
60
|
e == null ? void 0 : e.preventDefault();
|
|
61
61
|
setLoading(true);
|
|
62
|
+
resetError();
|
|
62
63
|
const new_data = Object.entries(getState().data).reduce((acc, [key, value]) => {
|
|
63
64
|
if (lodashExports.isEqual(value, initialStateRef.current.data[key])) {
|
|
64
65
|
return acc;
|
|
@@ -66,18 +67,32 @@ function EditDialog({
|
|
|
66
67
|
acc[key] = value;
|
|
67
68
|
return acc;
|
|
68
69
|
}, {});
|
|
69
|
-
|
|
70
|
+
const id = getItemId(getItem());
|
|
71
|
+
updateEntry(id, new_data).then((res) => {
|
|
70
72
|
onSuccess == null ? void 0 : onSuccess(res);
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}
|
|
75
|
-
|
|
73
|
+
refetch();
|
|
74
|
+
refetchInfo();
|
|
75
|
+
}).catch((error) => {
|
|
76
|
+
setError({ message: "Could not update item with id {{id}}", data: { id }, originalError: error });
|
|
77
|
+
onError == null ? void 0 : onError(error);
|
|
78
|
+
}).finally(() => {
|
|
76
79
|
setLoading(false);
|
|
77
80
|
setOpened(false);
|
|
78
81
|
});
|
|
79
82
|
},
|
|
80
|
-
[
|
|
83
|
+
[
|
|
84
|
+
setLoading,
|
|
85
|
+
resetError,
|
|
86
|
+
getState,
|
|
87
|
+
updateEntry,
|
|
88
|
+
getItem,
|
|
89
|
+
onError,
|
|
90
|
+
onSuccess,
|
|
91
|
+
refetch,
|
|
92
|
+
refetchInfo,
|
|
93
|
+
setError,
|
|
94
|
+
setOpened
|
|
95
|
+
]
|
|
81
96
|
);
|
|
82
97
|
const form = useForm({ initialValues: info.edit.defaultValues, validate: yupResolver(info.edit.schema) });
|
|
83
98
|
const onSubmitFunc = fab ? form.onSubmit((values, e) => {
|
|
@@ -2,7 +2,7 @@ import { jsxs, jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { useProps, Box, Flex, ActionIcon, Divider, Text, ScrollArea, Button, Group } from "@mantine/core";
|
|
3
3
|
import { useForm } from "@mantine/form";
|
|
4
4
|
import { randomId } from "@mantine/hooks";
|
|
5
|
-
import { yupResolver } from "../../../../../../.external/esm/mantine-form-yup-resolver@2.0.0_@mantine_form@
|
|
5
|
+
import { yupResolver } from "../../../../../../.external/esm/mantine-form-yup-resolver@2.0.0_@mantine_form@9.1.1_yup@1.7.1/mantine-form-yup-resolver/dist/esm/index.mjs";
|
|
6
6
|
import { useEffect } from "react";
|
|
7
7
|
import { object as create$3, array as create$2, mixed as create$8, string as create$6 } from "../../../../../../.external/esm/yup@1.7.1/yup/index.esm.mjs";
|
|
8
8
|
import ForwardRef$1 from "../../../../_virtual/plus.mjs";
|
|
@@ -205,10 +205,10 @@ const NextGenDataGrid = forwardRef((props, ref) => {
|
|
|
205
205
|
const mrtProps = useMemo(() => deepMerge(_mrtProps, optimizationsProps), [_mrtProps, optimizationsProps]);
|
|
206
206
|
const mrtTable = useMantineReactTable(mrtProps);
|
|
207
207
|
mrtTable.refs.selectionStoreRef = useRef(selectionStoreFactory());
|
|
208
|
-
mrtTable.refs.
|
|
209
|
-
mrtTable.refs.
|
|
210
|
-
mrtTable.refs.
|
|
211
|
-
mrtTable.refs.
|
|
208
|
+
mrtTable.refs.optionsRef = useRef(tableOptions);
|
|
209
|
+
mrtTable.refs.optionsRef.current = tableOptions;
|
|
210
|
+
mrtTable.refs.optimizationsRef = useRef(optimizations);
|
|
211
|
+
mrtTable.refs.optimizationsRef.current = optimizations;
|
|
212
212
|
const useOnLoadProps = useMemo(() => fetchOnMount, [fetchOnMount]);
|
|
213
213
|
const useViewProps = useMemo(() => form, [form]);
|
|
214
214
|
const useTableSelectionProps = useMemo(
|
|
@@ -16,10 +16,10 @@ const Cell = ({ renderedRowIndex, row, table }) => {
|
|
|
16
16
|
[storeOnChange, rowId]
|
|
17
17
|
);
|
|
18
18
|
row.getCanSelect = () => {
|
|
19
|
-
if (typeof table.refs.
|
|
20
|
-
return table.refs.
|
|
19
|
+
if (typeof table.refs.optionsRef.current.enableRowSelection === "function") {
|
|
20
|
+
return table.refs.optionsRef.current.enableRowSelection(row);
|
|
21
21
|
}
|
|
22
|
-
return table.refs.
|
|
22
|
+
return table.refs.optionsRef.current.enableRowSelection ?? true;
|
|
23
23
|
};
|
|
24
24
|
const {
|
|
25
25
|
options: { mantineSelectCheckboxProps }
|
|
@@ -62,7 +62,7 @@ function AdvancedFilters({ col }) {
|
|
|
62
62
|
index >= 0 && index + 1 < formFilters.length && /* @__PURE__ */ jsx(Grid.Col, { span: 12, py: 0, children: /* @__PURE__ */ jsx(Divider, { my: "sm", label: "AND", align: "center" }) })
|
|
63
63
|
] }, `${filter.col}-${index}`) : null
|
|
64
64
|
).filter(Boolean);
|
|
65
|
-
return /* @__PURE__ */ jsxs(Grid, { w: fields.length ? "25rem" : "100%", gap: "
|
|
65
|
+
return /* @__PURE__ */ jsxs(Grid, { w: fields.length ? "25rem" : "100%", gap: "xs", children: [
|
|
66
66
|
fields.length ? fields : /* @__PURE__ */ jsx(Grid.Col, { span: 12, children: /* @__PURE__ */ jsx(Text, { align: "center", c: "gray", style: { fontStyle: "italic" }, children: "No filters" }) }),
|
|
67
67
|
/* @__PURE__ */ jsx(Grid.Col, { span: 12, children: /* @__PURE__ */ jsx(Stack, { children: /* @__PURE__ */ jsx(
|
|
68
68
|
AdvancedFiltersMenu,
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { MRT_ToggleFullScreenButton, MRT_ToggleDensePaddingButton, MRT_ShowHideColumnsButton, MRT_ToggleFiltersButton, MRT_ToggleGlobalFilterButton } from "../../../../../../.external/esm/mantine-react-table@2.0.0-beta.9_@mantine_core@7.17.8_@mantine_dates@7.17.8_@mantine_hooks@7._2zjbhqlotlhjxtgwdmcgs6toey/mantine-react-table/dist/index.esm.mjs";
|
|
3
2
|
import { Add } from "../../../../ActionIcons/Add/Add.mjs";
|
|
4
3
|
import { Download } from "../../../../ActionIcons/Download/Download.mjs";
|
|
5
4
|
import { Refresh } from "../../../../ActionIcons/Refresh/Refresh.mjs";
|
|
5
|
+
import { ToggleFullScreenButton, ToggleDensePaddingButton, ShowHideColumnsButton, ToggleFiltersButton, ToggleGlobalFilterButton } from "./mrtToolbars.mjs";
|
|
6
6
|
function getBasicToolbars(table, rules) {
|
|
7
7
|
const toolbars = {
|
|
8
|
-
toggleGlobalFilter: (props) => /* @__PURE__ */ jsx(
|
|
9
|
-
filter: (props) => /* @__PURE__ */ jsx(
|
|
8
|
+
toggleGlobalFilter: (props) => /* @__PURE__ */ jsx(ToggleGlobalFilterButton, { table, ...props }, "basic-toggleGlobalFilter"),
|
|
9
|
+
filter: (props) => /* @__PURE__ */ jsx(ToggleFiltersButton, { table, ...props }, "basic-filter"),
|
|
10
10
|
refresh: (props) => /* @__PURE__ */ jsx(Refresh, { tooltipProps: { label: table.options.localization.refresh }, ...props }, "basic-refresh"),
|
|
11
11
|
add: (props) => /* @__PURE__ */ jsx(Add, { tooltipProps: { label: table.options.localization.add }, ...props }, "basic-add"),
|
|
12
12
|
download: (props) => /* @__PURE__ */ jsx(Download, { tooltipProps: { label: table.options.localization.download }, ...props }, "basic-download"),
|
|
13
13
|
// upload: (props) => (
|
|
14
14
|
// <Upload key="basic-upload" tooltipProps={{ label: table.options.localization.upload }} {...props} />
|
|
15
15
|
// ), //! Disabled until further notice
|
|
16
|
-
showHideColumns: (props) => /* @__PURE__ */ jsx(
|
|
17
|
-
toggleDensePadding: (props) => /* @__PURE__ */ jsx(
|
|
18
|
-
toggleFullScreen: (props) => /* @__PURE__ */ jsx(
|
|
16
|
+
showHideColumns: (props) => /* @__PURE__ */ jsx(ShowHideColumnsButton, { table, ...props }, "basic-showHideColumns"),
|
|
17
|
+
toggleDensePadding: (props) => /* @__PURE__ */ jsx(ToggleDensePaddingButton, { table, ...props }, "basic-toggleDensePadding"),
|
|
18
|
+
toggleFullScreen: (props) => /* @__PURE__ */ jsx(ToggleFullScreenButton, { table, ...props }, "basic-toggleFullScreen")
|
|
19
19
|
};
|
|
20
20
|
Object.entries(rules).forEach(([key, value]) => {
|
|
21
21
|
if (!value) {
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useActionIcon } from "fastapi-rtk/hooks";
|
|
3
|
+
import { Menu, Tooltip, ActionIcon } from "@mantine/core";
|
|
4
|
+
import { MRT_ShowHideColumnsMenu } from "../../../../../../.external/esm/mantine-react-table@2.0.0-beta.9_@mantine_core@7.17.8_@mantine_dates@7.17.8_@mantine_hooks@7._2zjbhqlotlhjxtgwdmcgs6toey/mantine-react-table/dist/index.esm.mjs";
|
|
5
|
+
import { memo, useState } from "react";
|
|
6
|
+
import { BaseActionIcon } from "../../../../ActionIcons/utils/BaseActionIcon.mjs";
|
|
7
|
+
const DENSITY_NEXT = { md: "xs", xl: "md", xs: "xl" };
|
|
8
|
+
const ToggleGlobalFilterButton = memo(({ table, ...props }) => {
|
|
9
|
+
const { globalFilter, showGlobalFilter } = table.getState();
|
|
10
|
+
const { IconSearch, IconSearchOff } = table.options.icons;
|
|
11
|
+
return /* @__PURE__ */ jsx(
|
|
12
|
+
BaseActionIcon,
|
|
13
|
+
{
|
|
14
|
+
Icon: showGlobalFilter ? IconSearchOff : IconSearch,
|
|
15
|
+
label: table.options.localization.showHideSearch,
|
|
16
|
+
disabled: !!globalFilter,
|
|
17
|
+
onClick: () => {
|
|
18
|
+
table.setShowGlobalFilter(!showGlobalFilter);
|
|
19
|
+
setTimeout(() => {
|
|
20
|
+
var _a;
|
|
21
|
+
return (_a = table.refs.searchInputRef.current) == null ? void 0 : _a.focus();
|
|
22
|
+
}, 100);
|
|
23
|
+
},
|
|
24
|
+
...props
|
|
25
|
+
}
|
|
26
|
+
);
|
|
27
|
+
});
|
|
28
|
+
ToggleGlobalFilterButton.displayName = "ToggleGlobalFilterButton";
|
|
29
|
+
const ToggleFiltersButton = memo(({ table, ...props }) => {
|
|
30
|
+
const { showColumnFilters } = table.getState();
|
|
31
|
+
const { IconFilter, IconFilterOff } = table.options.icons;
|
|
32
|
+
return /* @__PURE__ */ jsx(
|
|
33
|
+
BaseActionIcon,
|
|
34
|
+
{
|
|
35
|
+
Icon: showColumnFilters ? IconFilterOff : IconFilter,
|
|
36
|
+
label: table.options.localization.showHideFilters,
|
|
37
|
+
onClick: () => table.setShowColumnFilters((current) => !current),
|
|
38
|
+
...props
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
});
|
|
42
|
+
ToggleFiltersButton.displayName = "ToggleFiltersButton";
|
|
43
|
+
const ToggleDensePaddingButton = memo(({ table, ...props }) => {
|
|
44
|
+
const { density } = table.getState();
|
|
45
|
+
const { IconBaselineDensityLarge, IconBaselineDensityMedium, IconBaselineDensitySmall } = table.options.icons;
|
|
46
|
+
const Icon = density === "xs" ? IconBaselineDensitySmall : density === "md" ? IconBaselineDensityMedium : IconBaselineDensityLarge;
|
|
47
|
+
return /* @__PURE__ */ jsx(
|
|
48
|
+
BaseActionIcon,
|
|
49
|
+
{
|
|
50
|
+
Icon,
|
|
51
|
+
label: table.options.localization.toggleDensity,
|
|
52
|
+
onClick: () => table.setDensity((current) => DENSITY_NEXT[current]),
|
|
53
|
+
...props
|
|
54
|
+
}
|
|
55
|
+
);
|
|
56
|
+
});
|
|
57
|
+
ToggleDensePaddingButton.displayName = "ToggleDensePaddingButton";
|
|
58
|
+
const ToggleFullScreenButton = memo(({ table, tooltipProps, ...props }) => {
|
|
59
|
+
const { isFullScreen } = table.getState();
|
|
60
|
+
const { IconMaximize, IconMinimize } = table.options.icons;
|
|
61
|
+
const [tooltipOpened, setTooltipOpened] = useState(false);
|
|
62
|
+
const label = table.options.localization.toggleFullScreen;
|
|
63
|
+
return /* @__PURE__ */ jsx(
|
|
64
|
+
BaseActionIcon,
|
|
65
|
+
{
|
|
66
|
+
Icon: isFullScreen ? IconMinimize : IconMaximize,
|
|
67
|
+
label,
|
|
68
|
+
tooltipProps: { opened: tooltipOpened, ...tooltipProps },
|
|
69
|
+
onClick: () => {
|
|
70
|
+
setTooltipOpened(false);
|
|
71
|
+
table.setIsFullScreen((current) => !current);
|
|
72
|
+
},
|
|
73
|
+
onMouseEnter: () => setTooltipOpened(true),
|
|
74
|
+
onMouseLeave: () => setTooltipOpened(false),
|
|
75
|
+
...props
|
|
76
|
+
}
|
|
77
|
+
);
|
|
78
|
+
});
|
|
79
|
+
ToggleFullScreenButton.displayName = "ToggleFullScreenButton";
|
|
80
|
+
const ShowHideColumnsButton = memo(({ table, tooltipProps, iconProps, ...props }) => {
|
|
81
|
+
const { IconColumns } = table.options.icons;
|
|
82
|
+
const label = table.options.localization.showHideColumns;
|
|
83
|
+
const actionIconProps = useActionIcon(props);
|
|
84
|
+
return /* @__PURE__ */ jsxs(Menu, { closeOnItemClick: false, withinPortal: true, children: [
|
|
85
|
+
/* @__PURE__ */ jsx(Tooltip, { withinPortal: true, ...tooltipProps, label: (tooltipProps == null ? void 0 : tooltipProps.label) ?? label, children: /* @__PURE__ */ jsx(Menu.Target, { children: /* @__PURE__ */ jsx(ActionIcon, { "aria-label": label, ...actionIconProps, children: /* @__PURE__ */ jsx(IconColumns, { ...iconProps }) }) }) }),
|
|
86
|
+
/* @__PURE__ */ jsx(MRT_ShowHideColumnsMenu, { table })
|
|
87
|
+
] });
|
|
88
|
+
});
|
|
89
|
+
ShowHideColumnsButton.displayName = "ShowHideColumnsButton";
|
|
90
|
+
export {
|
|
91
|
+
ShowHideColumnsButton,
|
|
92
|
+
ToggleDensePaddingButton,
|
|
93
|
+
ToggleFiltersButton,
|
|
94
|
+
ToggleFullScreenButton,
|
|
95
|
+
ToggleGlobalFilterButton
|
|
96
|
+
};
|
|
@@ -36,7 +36,7 @@ const MRT_TableContainer = ({ table, ...rest }) => {
|
|
|
36
36
|
const createModalOpen = createDisplayMode === "modal" && creatingRow;
|
|
37
37
|
const editModalOpen = editDisplayMode === "modal" && editingRow;
|
|
38
38
|
const tableContainerWrapperProps = parseFromValuesOrFunc(mantineTableContainerWrapperProps, { table });
|
|
39
|
-
const optimizations = table.refs.
|
|
39
|
+
const optimizations = table.refs.optimizationsRef.current;
|
|
40
40
|
return /* @__PURE__ */ jsxs(
|
|
41
41
|
Box,
|
|
42
42
|
{
|
|
@@ -40,7 +40,7 @@ const MRT_TableBodyRow = ({
|
|
|
40
40
|
const visibleCells = row.getVisibleCells();
|
|
41
41
|
const { virtualColumns, virtualPaddingLeft, virtualPaddingRight } = columnVirtualizer ?? {};
|
|
42
42
|
const store = table.refs.selectionStoreRef.current;
|
|
43
|
-
const optimizations = table.refs.
|
|
43
|
+
const optimizations = table.refs.optimizationsRef.current;
|
|
44
44
|
const isOptimizedRowSelected = useSelectionStore(store, (state) => state.rowSelection[row.id] ?? false);
|
|
45
45
|
const isRowSelected = getIsRowSelected({ row, table }) || isOptimizedRowSelected;
|
|
46
46
|
const isRowPinned = enableRowPinning && row.getIsPinned();
|
|
@@ -29,7 +29,7 @@ const MRT_TableHead = ({ columnVirtualizer, table, ...rest }) => {
|
|
|
29
29
|
} = table;
|
|
30
30
|
const { rowSelection } = getState();
|
|
31
31
|
const totalRowCount = rowCount ?? getPrePaginationRowModel().flatRows.length;
|
|
32
|
-
const optimizations = table.refs.
|
|
32
|
+
const optimizations = table.refs.optimizationsRef.current;
|
|
33
33
|
const store = table.refs.selectionStoreRef.current;
|
|
34
34
|
const optimizedRowSelection = useSelectionStore(store, (state) => state.rowSelection);
|
|
35
35
|
const selectedRowCount = useMemo(
|
|
@@ -26,7 +26,7 @@ const MRT_ToolbarAlertBanner = ({ stackAlertBanner, table, ...rest }) => {
|
|
|
26
26
|
}
|
|
27
27
|
} = table;
|
|
28
28
|
const { density, grouping, rowSelection, showAlertBanner } = getState();
|
|
29
|
-
const optimizations = table.refs.
|
|
29
|
+
const optimizations = table.refs.optimizationsRef.current;
|
|
30
30
|
const store = table.refs.selectionStoreRef.current;
|
|
31
31
|
const optimizedRowSelection = useSelectionStore(store, (state) => state.rowSelection);
|
|
32
32
|
const optimizedSelectAllHandler = useSelectionStore(store, (state) => state.toggleAllRowsSelected);
|
|
@@ -90,42 +90,49 @@ const MRT_ToolbarAlertBanner = ({ stackAlertBanner, table, ...rest }) => {
|
|
|
90
90
|
)
|
|
91
91
|
] }, `${index}-${columnId}`))
|
|
92
92
|
] }) : null;
|
|
93
|
-
return /* @__PURE__ */ jsx(
|
|
94
|
-
|
|
93
|
+
return /* @__PURE__ */ jsx(
|
|
94
|
+
Collapse,
|
|
95
95
|
{
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
classes.alert,
|
|
101
|
-
stackAlertBanner && !positionToolbarAlertBanner && classes["alert-stacked"],
|
|
102
|
-
!stackAlertBanner && positionToolbarAlertBanner === "bottom" && classes["alert-bottom"],
|
|
103
|
-
alertProps == null ? void 0 : alertProps.className
|
|
104
|
-
),
|
|
105
|
-
children: (renderToolbarAlertBannerContent == null ? void 0 : renderToolbarAlertBannerContent({
|
|
106
|
-
groupedAlert,
|
|
107
|
-
selectedAlert,
|
|
108
|
-
table
|
|
109
|
-
})) ?? /* @__PURE__ */ jsxs(
|
|
110
|
-
Flex,
|
|
96
|
+
expanded: showAlertBanner || !!selectedAlert || !!groupedAlert,
|
|
97
|
+
transitionDuration: stackAlertBanner ? 200 : 0,
|
|
98
|
+
children: /* @__PURE__ */ jsx(
|
|
99
|
+
Alert,
|
|
111
100
|
{
|
|
101
|
+
color: "blue",
|
|
102
|
+
icon: false,
|
|
103
|
+
...alertProps,
|
|
112
104
|
className: clsx(
|
|
113
|
-
classes
|
|
114
|
-
|
|
115
|
-
|
|
105
|
+
classes.alert,
|
|
106
|
+
stackAlertBanner && !positionToolbarAlertBanner && classes["alert-stacked"],
|
|
107
|
+
!stackAlertBanner && positionToolbarAlertBanner === "bottom" && classes["alert-bottom"],
|
|
108
|
+
alertProps == null ? void 0 : alertProps.className
|
|
116
109
|
),
|
|
117
|
-
children:
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
110
|
+
children: (renderToolbarAlertBannerContent == null ? void 0 : renderToolbarAlertBannerContent({
|
|
111
|
+
groupedAlert,
|
|
112
|
+
selectedAlert,
|
|
113
|
+
table
|
|
114
|
+
})) ?? /* @__PURE__ */ jsxs(
|
|
115
|
+
Flex,
|
|
116
|
+
{
|
|
117
|
+
className: clsx(
|
|
118
|
+
classes["toolbar-alert"],
|
|
119
|
+
positionToolbarAlertBanner === "head-overlay" && classes["head-overlay"],
|
|
120
|
+
density
|
|
121
|
+
),
|
|
122
|
+
children: [
|
|
123
|
+
enableRowSelection && enableSelectAll && positionToolbarAlertBanner === "head-overlay" && /* @__PURE__ */ jsx(MRT_SelectCheckbox, { table }),
|
|
124
|
+
/* @__PURE__ */ jsxs(Stack, { children: [
|
|
125
|
+
alertProps == null ? void 0 : alertProps.children,
|
|
126
|
+
selectedAlert,
|
|
127
|
+
groupedAlert
|
|
128
|
+
] })
|
|
129
|
+
]
|
|
130
|
+
}
|
|
131
|
+
)
|
|
125
132
|
}
|
|
126
133
|
)
|
|
127
134
|
}
|
|
128
|
-
)
|
|
135
|
+
);
|
|
129
136
|
};
|
|
130
137
|
export {
|
|
131
138
|
MRT_ToolbarAlertBanner
|
|
@@ -24,7 +24,6 @@ function ApiProvider({
|
|
|
24
24
|
infoQueryProps,
|
|
25
25
|
dataQueryProps,
|
|
26
26
|
streamingQueryProps,
|
|
27
|
-
throwOnError,
|
|
28
27
|
streaming,
|
|
29
28
|
children
|
|
30
29
|
}) {
|
|
@@ -44,7 +43,6 @@ function ApiProvider({
|
|
|
44
43
|
infoQueryProps,
|
|
45
44
|
dataQueryProps,
|
|
46
45
|
streamingQueryProps,
|
|
47
|
-
throwOnError,
|
|
48
46
|
streaming
|
|
49
47
|
},
|
|
50
48
|
apiParams
|
|
@@ -54,7 +54,6 @@ function useProvideApi({
|
|
|
54
54
|
infoQueryProps,
|
|
55
55
|
dataQueryProps,
|
|
56
56
|
streamingQueryProps,
|
|
57
|
-
throwOnError = false,
|
|
58
57
|
streaming: streamingMode = false
|
|
59
58
|
}, api = defaultApi) {
|
|
60
59
|
var _a;
|
|
@@ -221,10 +220,7 @@ function useProvideApi({
|
|
|
221
220
|
pathRef,
|
|
222
221
|
infoRef,
|
|
223
222
|
queryParamsRef,
|
|
224
|
-
currentLanguage
|
|
225
|
-
resetError,
|
|
226
|
-
setError,
|
|
227
|
-
throwOnError
|
|
223
|
+
currentLanguage
|
|
228
224
|
});
|
|
229
225
|
const specialKey = useMemo(() => {
|
|
230
226
|
var _a2, _b;
|
|
@@ -271,6 +267,7 @@ function useProvideApi({
|
|
|
271
267
|
upload,
|
|
272
268
|
getFileURL: (item) => getItemURL("file", item),
|
|
273
269
|
getImageURL: (item) => getItemURL("image", item),
|
|
270
|
+
setError,
|
|
274
271
|
resetError
|
|
275
272
|
};
|
|
276
273
|
}
|