@inventreedb/ui 0.11.3 → 1.4.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.
Files changed (127) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/dist/.vite/manifest.json +6 -5
  3. package/dist/components/InvenTreeTable.js +4 -3
  4. package/dist/components/InvenTreeTable.js.map +1 -1
  5. package/dist/components/RowActions.js +3 -2
  6. package/dist/components/RowActions.js.map +1 -1
  7. package/dist/components/nav/DetailDrawer.d.ts +1 -0
  8. package/dist/components/nav/DetailDrawer.js +1 -0
  9. package/dist/components/nav/DetailDrawer.js.map +1 -1
  10. package/dist/enums/ModelInformation.js +1 -0
  11. package/dist/enums/ModelInformation.js.map +1 -1
  12. package/dist/functions/Events.js +4 -3
  13. package/dist/functions/Events.js.map +1 -1
  14. package/dist/functions/Navigation.js +5 -2
  15. package/dist/functions/Navigation.js.map +1 -1
  16. package/dist/functions/Plugins.js +4 -2
  17. package/dist/functions/Plugins.js.map +1 -1
  18. package/dist/hooks/MonitorBackgroundTask.js +10 -8
  19. package/dist/hooks/MonitorBackgroundTask.js.map +1 -1
  20. package/dist/hooks/MonitorDataOutput.js +4 -3
  21. package/dist/hooks/MonitorDataOutput.js.map +1 -1
  22. package/dist/hooks/UseFilterSet.js +7 -6
  23. package/dist/hooks/UseFilterSet.js.map +1 -1
  24. package/dist/hooks/UseTable.js +1 -1
  25. package/dist/index.d.ts +3 -1
  26. package/dist/index.js +4 -1
  27. package/dist/index.js.map +1 -1
  28. package/dist/node_modules/@mantine/hooks/esm/use-debounced-value/use-debounced-value.js +40 -15
  29. package/dist/node_modules/@mantine/hooks/esm/use-debounced-value/use-debounced-value.js.map +1 -1
  30. package/dist/node_modules/@mantine/hooks/esm/use-document-visibility/use-document-visibility.js +1 -1
  31. package/dist/node_modules/@mantine/hooks/esm/use-document-visibility/use-document-visibility.js.map +1 -1
  32. package/dist/node_modules/@mantine/hooks/esm/use-local-storage/create-storage.js +57 -62
  33. package/dist/node_modules/@mantine/hooks/esm/use-local-storage/create-storage.js.map +1 -1
  34. package/dist/node_modules/@mantine/hooks/esm/use-local-storage/use-local-storage.js.map +1 -1
  35. package/dist/node_modules/@mantine/hooks/esm/use-window-event/use-window-event.js +5 -3
  36. package/dist/node_modules/@mantine/hooks/esm/use-window-event/use-window-event.js.map +1 -1
  37. package/dist/node_modules/@mantine/hooks/esm/utils/random-id/random-id.js.map +1 -1
  38. package/dist/node_modules/@remix-run/router/dist/router.js +10 -0
  39. package/dist/node_modules/@remix-run/router/dist/router.js.map +1 -1
  40. package/dist/node_modules/@sentry/browser/build/npm/esm/prod/report-dialog.js +2 -2
  41. package/dist/node_modules/@sentry/browser/build/npm/esm/prod/report-dialog.js.map +1 -1
  42. package/dist/node_modules/@sentry/core/build/esm/scope.js +6 -5
  43. package/dist/node_modules/@sentry/core/build/esm/scope.js.map +1 -1
  44. package/dist/node_modules/@sentry/core/build/esm/utils/chain-and-copy-promiselike.js +1 -1
  45. package/dist/node_modules/@sentry/core/build/esm/utils/chain-and-copy-promiselike.js.map +1 -1
  46. package/dist/node_modules/@sentry/core/build/esm/utils/is.js +1 -1
  47. package/dist/node_modules/@sentry/core/build/esm/utils/is.js.map +1 -1
  48. package/dist/node_modules/@sentry/core/build/esm/utils/misc.js +1 -1
  49. package/dist/node_modules/@sentry/core/build/esm/utils/misc.js.map +1 -1
  50. package/dist/node_modules/@sentry/core/build/esm/utils/randomSafeContext.js +1 -1
  51. package/dist/node_modules/@sentry/core/build/esm/utils/randomSafeContext.js.map +1 -1
  52. package/dist/node_modules/@sentry/core/build/esm/utils/time.js +1 -1
  53. package/dist/node_modules/@sentry/core/build/esm/utils/time.js.map +1 -1
  54. package/dist/node_modules/@tabler/icons-react/dist/esm/createReactComponent.js +6 -0
  55. package/dist/node_modules/@tabler/icons-react/dist/esm/createReactComponent.js.map +1 -1
  56. package/dist/node_modules/@tabler/icons-react/dist/esm/defaultAttributes.js +6 -0
  57. package/dist/node_modules/@tabler/icons-react/dist/esm/defaultAttributes.js.map +1 -1
  58. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconAdjustments.js +6 -0
  59. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconAdjustments.js.map +1 -1
  60. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowRight.js +6 -0
  61. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowRight.js.map +1 -1
  62. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconCheck.js +6 -0
  63. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconCheck.js.map +1 -1
  64. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronLeft.js +6 -0
  65. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronLeft.js.map +1 -1
  66. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconCircleCheck.js +6 -0
  67. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconCircleCheck.js.map +1 -1
  68. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconCircleX.js +6 -0
  69. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconCircleX.js.map +1 -1
  70. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconCopy.js +6 -0
  71. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconCopy.js.map +1 -1
  72. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconDots.js +6 -0
  73. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconDots.js.map +1 -1
  74. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconEdit.js +6 -0
  75. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconEdit.js.map +1 -1
  76. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconExclamationCircle.js +6 -0
  77. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconExclamationCircle.js.map +1 -1
  78. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconPlus.js +6 -0
  79. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconPlus.js.map +1 -1
  80. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconSearch.js +6 -0
  81. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconSearch.js.map +1 -1
  82. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconTrash.js +6 -0
  83. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconTrash.js.map +1 -1
  84. package/dist/node_modules/@tanstack/query-core/build/modern/focusManager.js +31 -20
  85. package/dist/node_modules/@tanstack/query-core/build/modern/focusManager.js.map +1 -1
  86. package/dist/node_modules/@tanstack/query-core/build/modern/onlineManager.js +27 -17
  87. package/dist/node_modules/@tanstack/query-core/build/modern/onlineManager.js.map +1 -1
  88. package/dist/node_modules/@tanstack/query-core/build/modern/queryObserver.js +179 -177
  89. package/dist/node_modules/@tanstack/query-core/build/modern/queryObserver.js.map +1 -1
  90. package/dist/node_modules/@tanstack/query-core/build/modern/timeoutManager.js +31 -21
  91. package/dist/node_modules/@tanstack/query-core/build/modern/timeoutManager.js.map +1 -1
  92. package/dist/node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.js +1 -1
  93. package/dist/node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.js.map +1 -1
  94. package/dist/node_modules/@tanstack/react-query/build/modern/suspense.js +1 -1
  95. package/dist/node_modules/@tanstack/react-query/build/modern/suspense.js.map +1 -1
  96. package/dist/node_modules/@tanstack/react-query/build/modern/useBaseQuery.js +7 -4
  97. package/dist/node_modules/@tanstack/react-query/build/modern/useBaseQuery.js.map +1 -1
  98. package/dist/node_modules/react/cjs/react-jsx-runtime.development.js +10 -1
  99. package/dist/node_modules/react/cjs/react-jsx-runtime.development.js.map +1 -1
  100. package/dist/node_modules/react/cjs/react-jsx-runtime.production.js +10 -1
  101. package/dist/node_modules/react/cjs/react-jsx-runtime.production.js.map +1 -1
  102. package/dist/node_modules/react-router/dist/index.js +11 -1
  103. package/dist/node_modules/react-router/dist/index.js.map +1 -1
  104. package/dist/node_modules/react-router-dom/dist/index.js +10 -0
  105. package/dist/node_modules/react-router-dom/dist/index.js.map +1 -1
  106. package/dist/states/StoredTableState.js +2 -1
  107. package/dist/states/StoredTableState.js.map +1 -1
  108. package/dist/states/types.d.ts +3 -0
  109. package/dist/types/Forms.d.ts +2 -0
  110. package/dist/types/Panel.d.ts +26 -0
  111. package/dist/types/Plugins.d.ts +14 -2
  112. package/dist/types/Plugins.js +2 -2
  113. package/dist/types/Plugins.js.map +1 -1
  114. package/dist/types/Rendering.d.ts +53 -0
  115. package/dist/types/Tables.d.ts +3 -1
  116. package/lib/components/RowActions.tsx +2 -2
  117. package/lib/components/nav/DetailDrawer.tsx +1 -1
  118. package/lib/enums/ModelInformation.tsx +1 -0
  119. package/lib/hooks/UseFilterSet.tsx +8 -8
  120. package/lib/index.ts +9 -1
  121. package/lib/states/types.tsx +7 -0
  122. package/lib/types/Forms.tsx +2 -0
  123. package/lib/types/Panel.tsx +30 -0
  124. package/lib/types/Plugins.tsx +20 -1
  125. package/lib/types/Rendering.tsx +60 -0
  126. package/lib/types/Tables.tsx +3 -1
  127. package/package.json +18 -17
@@ -64,7 +64,7 @@ export type TableState = {
64
64
  */
65
65
  export type TableColumnProps<T = any> = {
66
66
  accessor?: string;
67
- title?: string;
67
+ title?: string | ReactNode;
68
68
  ordering?: string;
69
69
  sortable?: boolean;
70
70
  switchable?: boolean;
@@ -131,6 +131,7 @@ export type RowViewProps = RowAction & RowModelProps;
131
131
  * @param barcodeActions : any[] - List of barcode actions
132
132
  * @param tableFilters : TableFilter[] - List of custom filters
133
133
  * @param tableActions : any[] - List of custom action groups
134
+ * @param isRecordSelectable : (record: any, index: number) => boolean - Callback function to determine if a row is selectable
134
135
  * @param detailAction: boolean - Enable detail action for each row (default = true)
135
136
  * @param dataFormatter : (data: any) => any - Callback function to reformat data returned by server (if not in default format)
136
137
  * @param rowActions : (record: any) => RowAction[] - Callback function to generate row actions
@@ -161,6 +162,7 @@ export type InvenTreeTableProps<T = any> = {
161
162
  barcodeActions?: React.ReactNode[];
162
163
  tableFilters?: TableFilter[];
163
164
  tableActions?: React.ReactNode[];
165
+ isRecordSelectable?: (record: T, index: number) => boolean;
164
166
  rowExpansion?: DataTableRowExpansionProps<T>;
165
167
  dataFormatter?: (data: any) => any;
166
168
  rowActions?: (record: T) => RowAction[];
@@ -139,8 +139,8 @@ export function RowActions({
139
139
  aria-label={`row-action-menu-${index ?? ''}`}
140
140
  onClick={openMenu}
141
141
  disabled={disabled}
142
- variant='subtle'
143
- color='gray'
142
+ variant='transparent'
143
+ size='sm'
144
144
  >
145
145
  <IconDots />
146
146
  </ActionIcon>
@@ -26,7 +26,7 @@ export interface DrawerProps {
26
26
  closeOnEscape?: boolean;
27
27
  }
28
28
 
29
- function DetailDrawerComponent({
29
+ export function DetailDrawerComponent({
30
30
  title,
31
31
  position = 'right',
32
32
  size,
@@ -186,6 +186,7 @@ export const ModelInformationDict: ModelDict = {
186
186
  label_multiple: () => t`Sales Order Shipments`,
187
187
  url_overview: '/sales/index/shipments',
188
188
  url_detail: '/sales/shipment/:pk/',
189
+ admin_url: '/order/salesordershipment/',
189
190
  api_endpoint: ApiEndpoints.sales_order_shipment_list,
190
191
  supports_barcode: true,
191
192
  icon: 'shipment'
@@ -1,5 +1,5 @@
1
1
  import { useLocalStorage } from '@mantine/hooks';
2
- import { useCallback, useMemo } from 'react';
2
+ import { useCallback, useEffect, useMemo } from 'react';
3
3
  import type { FilterSetState, TableFilter } from '../types/Filters';
4
4
 
5
5
  export default function useFilterSet(
@@ -16,15 +16,15 @@ export default function useFilterSet(
16
16
  getInitialValueInEffect: false
17
17
  });
18
18
 
19
- const activeFilters: TableFilter[] = useMemo(() => {
19
+ useEffect(() => {
20
20
  if (storedFilters == null) {
21
- // If there are no stored filters, set initial values
22
- const filters = initialFilters || [];
23
- setStoredFilters(filters);
24
- return filters;
21
+ setStoredFilters(initialFilters || []);
25
22
  }
26
- return storedFilters || [];
27
- }, [storedFilters]);
23
+ }, [storedFilters, initialFilters, setStoredFilters]);
24
+
25
+ const activeFilters: TableFilter[] = useMemo(() => {
26
+ return storedFilters ?? initialFilters ?? [];
27
+ }, [storedFilters, initialFilters]);
28
28
 
29
29
  // Callback to clear all active filters from the table
30
30
  const clearActiveFilters = useCallback(() => {
package/lib/index.ts CHANGED
@@ -21,6 +21,12 @@ export type {
21
21
  StockAdjustmentFormsContext
22
22
  } from './types/Plugins';
23
23
 
24
+ export type {
25
+ PanelIndicatorType,
26
+ PanelType,
27
+ PanelGroupType
28
+ } from './types/Panel';
29
+
24
30
  export type {
25
31
  RowAction,
26
32
  RowViewProps,
@@ -135,7 +141,8 @@ export {
135
141
  export {
136
142
  type DrawerProps,
137
143
  DetailDrawer,
138
- DetailDrawerLink
144
+ DetailDrawerLink,
145
+ DetailDrawerComponent
139
146
  } from './components/nav/DetailDrawer';
140
147
  export { StylishText } from './components/StylishText';
141
148
 
@@ -144,3 +151,4 @@ export {
144
151
  type StoredTableStateProps,
145
152
  useStoredTableState
146
153
  } from './states/StoredTableState';
154
+ export { useLocalLibState } from './states/LocalLibState';
@@ -0,0 +1,7 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { InstanceRenderInterface } from '../types/Rendering';
3
+
4
+ export type setRenderProps = (
5
+ model: string,
6
+ renderer: (props: Readonly<InstanceRenderInterface>) => ReactNode
7
+ ) => void;
@@ -45,6 +45,7 @@ export type ApiFormFieldHeader = {
45
45
  * @param api_url : The API endpoint to fetch data from (for related fields)
46
46
  * @param pk_field : The primary key field for the related field (default = "pk")
47
47
  * @param model : The model to use for related fields
48
+ * @param custom_model : Optional custom model name (plugins may register renderers for custom models)
48
49
  * @param modelRenderer : Optional function to render the related model instance (for related fields)
49
50
  * @param filters : Optional API filters to apply to related fields
50
51
  * @param child: Optional definition of a child field (for nested objects)
@@ -101,6 +102,7 @@ export type ApiFormFieldType = {
101
102
  api_url?: string;
102
103
  pk_field?: string;
103
104
  model?: ModelType;
105
+ custom_model?: string;
104
106
  modelRenderer?: (instance: any) => ReactNode;
105
107
  filters?: any;
106
108
  child?: ApiFormFieldType;
@@ -0,0 +1,30 @@
1
+ import type { ReactNode } from 'react';
2
+
3
+ // The type of indicator dot to be shown against a panel
4
+ export type PanelIndicatorType = 'info' | 'warning' | 'danger' | null;
5
+
6
+ /**
7
+ * Type used to specify a single panel in a panel group
8
+ */
9
+ export type PanelType = {
10
+ name: string;
11
+ label: string;
12
+ controls?: ReactNode;
13
+ icon?: ReactNode;
14
+ notification_dot?: PanelIndicatorType | (() => Promise<PanelIndicatorType>);
15
+ content?: ReactNode;
16
+ hidden?: boolean;
17
+ disabled?: boolean;
18
+ showHeadline?: boolean;
19
+ supportsDirty?: boolean;
20
+ };
21
+
22
+ /**
23
+ * Type used to specify a group of panels
24
+ */
25
+ export type PanelGroupType = {
26
+ id: string;
27
+ label: string;
28
+ panelIDs?: string[];
29
+ panels?: PanelType[];
30
+ };
@@ -2,16 +2,24 @@ import type { I18n } from '@lingui/core';
2
2
  import type { MantineColorScheme, MantineTheme } from '@mantine/core';
3
3
  import type { QueryClient } from '@tanstack/react-query';
4
4
  import type { AxiosInstance } from 'axios';
5
+ import type { JSX } from 'react';
5
6
  import type { NavigateFunction } from 'react-router-dom';
6
7
  import type { ModelDict } from '../enums/ModelInformation';
7
8
  import type { ModelType } from '../enums/ModelType';
9
+ import type { setRenderProps } from '../states/types';
8
10
  import type {
9
11
  ApiFormModalProps,
12
+ ApiFormProps,
10
13
  BulkEditApiFormModalProps,
11
14
  StockOperationProps
12
15
  } from './Forms';
13
16
  import type { UseModalReturn } from './Modals';
14
- import type { RenderInstanceProps } from './Rendering';
17
+ import type {
18
+ RemoteInstanceProps,
19
+ RenderInlineModelProps,
20
+ RenderInstanceProps,
21
+ ThumbnailProps
22
+ } from './Rendering';
15
23
  import type { SettingsStateProps } from './Settings';
16
24
  import type { InvenTreeTableRenderProps } from './Tables';
17
25
  import type { UserStateProps } from './User';
@@ -46,6 +54,7 @@ export type InvenTreeFormsContext = {
46
54
  create: (props: ApiFormModalProps) => UseModalReturn;
47
55
  delete: (props: ApiFormModalProps) => UseModalReturn;
48
56
  edit: (props: ApiFormModalProps) => UseModalReturn;
57
+ editApiForm: (props: { id?: string; props: ApiFormProps }) => React.ReactNode;
49
58
  stockActions: StockAdjustmentFormsContext;
50
59
  };
51
60
 
@@ -97,6 +106,13 @@ export type InvenTreePluginContext = {
97
106
  globalSettings: SettingsStateProps;
98
107
  modelInformation: ModelDict;
99
108
  renderInstance: (props: Readonly<RenderInstanceProps>) => React.ReactNode;
109
+ renderRemoteInstance: (
110
+ props: Readonly<RemoteInstanceProps>
111
+ ) => React.ReactNode;
112
+ renderInlineModel: (
113
+ props: Readonly<RenderInlineModelProps>
114
+ ) => React.ReactNode;
115
+ thumbnail: (props: Readonly<ThumbnailProps>) => JSX.Element;
100
116
  host: string;
101
117
  i18n: I18n;
102
118
  locale: string;
@@ -104,6 +120,9 @@ export type InvenTreePluginContext = {
104
120
  theme: MantineTheme;
105
121
  colorScheme: MantineColorScheme;
106
122
  forms: InvenTreeFormsContext;
123
+ stateFnc: {
124
+ setRenderer: setRenderProps;
125
+ };
107
126
  tables: InvenTreeTablesContext<any>;
108
127
  importer: ImporterDrawerContext;
109
128
  model?: ModelType | string;
@@ -1,4 +1,11 @@
1
+ import type {
2
+ QueryObserverResult,
3
+ UseQueryResult
4
+ } from '@tanstack/react-query';
5
+ import type { ReactNode } from 'react';
6
+ import type { ApiEndpoints } from '..';
1
7
  import type { ModelType } from '../enums/ModelType';
8
+ import type { PathParams } from './Core';
2
9
 
3
10
  /**
4
11
  * Interface for rendering a model instance.
@@ -22,4 +29,57 @@ export type ModelRendererDict = EnumDictionary<
22
29
 
23
30
  export type RenderInstanceProps = {
24
31
  model: ModelType | undefined;
32
+ custom_model?: string;
25
33
  } & InstanceRenderInterface;
34
+
35
+ export interface UseInstanceResult {
36
+ instance: any;
37
+ setInstance: (instance: any) => void;
38
+ refreshInstance: () => void;
39
+ refreshInstancePromise: () => Promise<QueryObserverResult<any, any>>;
40
+ instanceQuery: UseQueryResult;
41
+ isLoaded: boolean;
42
+ }
43
+
44
+ export interface useInstanceProps {
45
+ endpoint: ApiEndpoints;
46
+ pk?: string | number | undefined;
47
+ hasPrimaryKey?: boolean;
48
+ params?: any;
49
+ pathParams?: PathParams;
50
+ disabled?: boolean;
51
+ defaultValue?: any;
52
+ refetchOnMount?: boolean;
53
+ refetchOnWindowFocus?: boolean;
54
+ updateInterval?: number;
55
+ }
56
+
57
+ export interface RemoteInstanceProps {
58
+ model: ModelType;
59
+ modelUrl?: string;
60
+ modelRenderer?: (instance: any) => ReactNode;
61
+ pk: number;
62
+ }
63
+ export interface ThumbnailProps {
64
+ src?: string;
65
+ alt?: string;
66
+ size?: number;
67
+ text?: ReactNode;
68
+ align?: string;
69
+ link?: string;
70
+ hover?: boolean;
71
+ hoverSize?: number;
72
+ }
73
+
74
+ export interface RenderInlineModelProps {
75
+ primary: ReactNode;
76
+ secondary?: ReactNode;
77
+ showSecondary?: boolean;
78
+ prefix?: ReactNode;
79
+ suffix?: ReactNode;
80
+ image?: string;
81
+ labels?: string[];
82
+ url?: string;
83
+ navigate?: any;
84
+ tooltip?: string;
85
+ }
@@ -100,7 +100,7 @@ export type TableState = {
100
100
  */
101
101
  export type TableColumnProps<T = any> = {
102
102
  accessor?: string;
103
- title?: string;
103
+ title?: string | ReactNode;
104
104
  ordering?: string;
105
105
  sortable?: boolean;
106
106
  switchable?: boolean;
@@ -173,6 +173,7 @@ export type RowViewProps = RowAction & RowModelProps;
173
173
  * @param barcodeActions : any[] - List of barcode actions
174
174
  * @param tableFilters : TableFilter[] - List of custom filters
175
175
  * @param tableActions : any[] - List of custom action groups
176
+ * @param isRecordSelectable : (record: any, index: number) => boolean - Callback function to determine if a row is selectable
176
177
  * @param detailAction: boolean - Enable detail action for each row (default = true)
177
178
  * @param dataFormatter : (data: any) => any - Callback function to reformat data returned by server (if not in default format)
178
179
  * @param rowActions : (record: any) => RowAction[] - Callback function to generate row actions
@@ -203,6 +204,7 @@ export type InvenTreeTableProps<T = any> = {
203
204
  barcodeActions?: React.ReactNode[];
204
205
  tableFilters?: TableFilter[];
205
206
  tableActions?: React.ReactNode[];
207
+ isRecordSelectable?: (record: T, index: number) => boolean;
206
208
  rowExpansion?: DataTableRowExpansionProps<T>;
207
209
  dataFormatter?: (data: any) => any;
208
210
  rowActions?: (record: T) => RowAction[];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@inventreedb/ui",
3
3
  "description": "UI components for the InvenTree project",
4
- "version": "0.11.3",
4
+ "version": "1.4.0",
5
5
  "private": false,
6
6
  "type": "module",
7
7
  "license": "MIT",
@@ -60,17 +60,17 @@
60
60
  "@github/webauthn-json": "^2.1.1",
61
61
  "@lingui/core": "^5.9.2",
62
62
  "@lingui/react": "^5.9.2",
63
- "@mantine/carousel": "^8.2.7",
64
- "@mantine/charts": "^8.2.7",
65
- "@mantine/core": "^8.2.7",
66
- "@mantine/dates": "^8.2.7",
67
- "@mantine/dropzone": "^8.2.7",
68
- "@mantine/form": "^8.2.7",
69
- "@mantine/hooks": "^8.2.7",
70
- "@mantine/modals": "^8.2.7",
71
- "@mantine/notifications": "^8.2.7",
72
- "@mantine/spotlight": "^8.2.7",
73
- "@mantine/vanilla-extract": "^8.2.7",
63
+ "@mantine/carousel": "^9.2.1",
64
+ "@mantine/charts": "^9.2.1",
65
+ "@mantine/core": "^9.2.1",
66
+ "@mantine/dates": "^9.2.1",
67
+ "@mantine/dropzone": "^9.2.1",
68
+ "@mantine/form": "^9.2.1",
69
+ "@mantine/hooks": "^9.2.1",
70
+ "@mantine/modals": "^9.2.1",
71
+ "@mantine/notifications": "^9.2.1",
72
+ "@mantine/spotlight": "^9.2.1",
73
+ "@mantine/vanilla-extract": "^9.2.1",
74
74
  "@messageformat/date-skeleton": "^1.1.0",
75
75
  "@sentry/react": "^10.43.0",
76
76
  "@tabler/icons-react": "^3.17.0",
@@ -84,12 +84,13 @@
84
84
  "codemirror": "^6.0.2",
85
85
  "dayjs": "^1.11.13",
86
86
  "dompurify": "^3.2.4",
87
- "easymde": "^2.18.0",
87
+ "easymde": "^2.20.0",
88
+ "embla-carousel": "^8.5.2",
88
89
  "embla-carousel-react": "^8.5.2",
89
90
  "fuse.js": "^7.0.0",
90
91
  "html5-qrcode": "^2.3.8",
91
- "mantine-contextmenu": "^8.2.0",
92
- "mantine-datatable": "^8.2.0",
92
+ "mantine-contextmenu": "^9.2.1",
93
+ "mantine-datatable": "^9.2.0",
93
94
  "qrcode": "^1.5.4",
94
95
  "react": "^19.2.4",
95
96
  "react-dom": "^19.2.4",
@@ -131,7 +132,7 @@
131
132
  "rollup": "^4.59.0",
132
133
  "rollup-plugin-license": "^3.7.0",
133
134
  "typescript": "^5.9.3",
134
- "vite": "7.3.2",
135
+ "vite": "^6.4.2",
135
136
  "vite-plugin-babel-macros": "^1.0.6",
136
137
  "vite-plugin-dts": "^4.5.4",
137
138
  "vite-plugin-externals": "^0.6.2",
@@ -139,6 +140,6 @@
139
140
  },
140
141
  "resolutions": {
141
142
  "undici": "^6.24.0",
142
- "vite": "^8.0.5"
143
+ "vite": "^6.4.2"
143
144
  }
144
145
  }