mirror of
https://github.com/inventree/InvenTree.git
synced 2026-04-21 18:50:52 +00:00
[plugin] Render tables (#11733)
* Move useFilterSet state to the @lib * Refactor useTable hook into @lib * Refactor string helper functions * Refactor constructFormUrl func * Refactor Boundary component * Refactor StoredTableState * More refactoring * Refactor CopyButton and CopyableCell * Pass table render func to plugins * Provide internal wrapper function, while allowing the "api" and "navigate" functions to be provided by the caller * Adds <InvenTreeTable /> component which is exposed to plugins * Update frontend versioning * Update docs * Handle condition where UI does not provide table rendering function * Move queryFilters out of custom state * Fix exported type * Extract searchParams - Cannot be used outside of router component - Only provide when the table is generated internally * Bump UI version * Fix for right-click context menu - Function needs to be defined with the context menu provider
This commit is contained in:
@@ -15,10 +15,20 @@ export { UserRoles, UserPermissions } from './enums/Roles';
|
||||
export type {
|
||||
InvenTreePluginContext,
|
||||
InvenTreeFormsContext,
|
||||
InvenTreeTablesContext,
|
||||
ImporterDrawerContext,
|
||||
PluginVersion,
|
||||
StockAdjustmentFormsContext
|
||||
} from './types/Plugins';
|
||||
export type { RowAction, RowViewProps } from './types/Tables';
|
||||
|
||||
export type {
|
||||
RowAction,
|
||||
RowViewProps,
|
||||
TableColumn,
|
||||
TableColumnProps,
|
||||
InvenTreeTableProps,
|
||||
InvenTreeTableRenderProps
|
||||
} from './types/Tables';
|
||||
|
||||
export type {
|
||||
ApiFormFieldChoice,
|
||||
@@ -42,6 +52,14 @@ export {
|
||||
getDetailUrl,
|
||||
navigateToLink
|
||||
} from './functions/Navigation';
|
||||
|
||||
export {
|
||||
notYetImplemented,
|
||||
permissionDenied,
|
||||
invalidResponse,
|
||||
showTimeoutNotification
|
||||
} from './functions/Notification';
|
||||
|
||||
export {
|
||||
checkPluginVersion,
|
||||
initPlugin
|
||||
@@ -53,16 +71,32 @@ export {
|
||||
formatFileSize
|
||||
} from './functions/Formatting';
|
||||
|
||||
export {
|
||||
constructFormUrl,
|
||||
mapFields,
|
||||
type NestedDict
|
||||
} from './functions/Forms';
|
||||
|
||||
export {
|
||||
shortenString,
|
||||
hashString
|
||||
} from './functions/String';
|
||||
|
||||
// Common UI components
|
||||
export {
|
||||
ActionButton,
|
||||
type ActionButtonProps
|
||||
} from './components/ActionButton';
|
||||
export { AddItemButton } from './components/AddItemButton';
|
||||
export { Boundary, DefaultFallback } from './components/Boundary';
|
||||
export { ButtonMenu } from './components/ButtonMenu';
|
||||
export { CopyButton } from './components/CopyButton';
|
||||
export { CopyableCell } from './components/CopyableCell';
|
||||
export { ProgressBar } from './components/ProgressBar';
|
||||
export { PassFailButton, YesNoButton } from './components/YesNoButton';
|
||||
export { SearchInput } from './components/SearchInput';
|
||||
export { TableColumnSelect } from './components/TableColumnSelect';
|
||||
export { default as InvenTreeTable } from './components/InvenTreeTable';
|
||||
export {
|
||||
RowViewAction,
|
||||
RowDuplicateAction,
|
||||
@@ -77,7 +111,21 @@ export {
|
||||
default as useMonitorDataOutput,
|
||||
type MonitorDataOutputProps
|
||||
} from './hooks/MonitorDataOutput';
|
||||
|
||||
export {
|
||||
default as useMonitorBackgroundTask,
|
||||
type MonitorBackgroundTaskProps
|
||||
} from './hooks/MonitorBackgroundTask';
|
||||
|
||||
export { default as useFilterSet } from './hooks/UseFilterSet';
|
||||
|
||||
export {
|
||||
default as useTable,
|
||||
type TableStateExtraProps
|
||||
} from './hooks/UseTable';
|
||||
|
||||
// State management
|
||||
export {
|
||||
type StoredTableStateProps,
|
||||
useStoredTableState
|
||||
} from './states/StoredTableState';
|
||||
|
||||
Reference in New Issue
Block a user