@inventreedb/ui 0.8.2 → 0.10.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 (66) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/.vite/manifest.json +44 -11
  3. package/dist/components/RowActions.js +4 -4
  4. package/dist/hooks/MonitorBackgroundTask.d.ts +20 -0
  5. package/dist/hooks/MonitorBackgroundTask.js +77 -0
  6. package/dist/hooks/MonitorBackgroundTask.js.map +1 -0
  7. package/dist/hooks/MonitorDataOutput.d.ts +6 -5
  8. package/dist/hooks/MonitorDataOutput.js +19 -25
  9. package/dist/hooks/MonitorDataOutput.js.map +1 -1
  10. package/dist/index.d.ts +2 -1
  11. package/dist/index.js +4 -2
  12. package/dist/index.js.map +1 -1
  13. package/dist/node_modules/@tabler/icons-react/dist/esm/createReactComponent.js +1 -1
  14. package/dist/node_modules/@tabler/icons-react/dist/esm/createReactComponent.js.map +1 -1
  15. package/dist/node_modules/@tabler/icons-react/dist/esm/defaultAttributes.js +1 -1
  16. package/dist/node_modules/@tabler/icons-react/dist/esm/defaultAttributes.js.map +1 -1
  17. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowRight.js +1 -1
  18. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowRight.js.map +1 -1
  19. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconCircleCheck.js +2 -2
  20. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconCircleCheck.js.map +1 -1
  21. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconCircleX.js +2 -2
  22. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconCircleX.js.map +1 -1
  23. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconCopy.js +2 -2
  24. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconCopy.js.map +1 -1
  25. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconDots.js +2 -2
  26. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconDots.js.map +1 -1
  27. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconEdit.js +2 -2
  28. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconEdit.js.map +1 -1
  29. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconExclamationCircle.js +2 -2
  30. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconExclamationCircle.js.map +1 -1
  31. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconPlus.js +1 -1
  32. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconPlus.js.map +1 -1
  33. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconSearch.js +2 -2
  34. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconSearch.js.map +1 -1
  35. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconTrash.js +1 -1
  36. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconTrash.js.map +1 -1
  37. package/dist/node_modules/@tanstack/query-core/build/modern/environmentManager.js +22 -0
  38. package/dist/node_modules/@tanstack/query-core/build/modern/environmentManager.js.map +1 -0
  39. package/dist/node_modules/@tanstack/query-core/build/modern/focusManager.js +1 -2
  40. package/dist/node_modules/@tanstack/query-core/build/modern/focusManager.js.map +1 -1
  41. package/dist/node_modules/@tanstack/query-core/build/modern/notifyManager.js +2 -1
  42. package/dist/node_modules/@tanstack/query-core/build/modern/notifyManager.js.map +1 -1
  43. package/dist/node_modules/@tanstack/query-core/build/modern/onlineManager.js +1 -2
  44. package/dist/node_modules/@tanstack/query-core/build/modern/onlineManager.js.map +1 -1
  45. package/dist/node_modules/@tanstack/query-core/build/modern/query.js.map +1 -1
  46. package/dist/node_modules/@tanstack/query-core/build/modern/queryObserver.js +25 -18
  47. package/dist/node_modules/@tanstack/query-core/build/modern/queryObserver.js.map +1 -1
  48. package/dist/node_modules/@tanstack/query-core/build/modern/retryer.js.map +1 -1
  49. package/dist/node_modules/@tanstack/query-core/build/modern/timeoutManager.js +70 -0
  50. package/dist/node_modules/@tanstack/query-core/build/modern/timeoutManager.js.map +1 -0
  51. package/dist/node_modules/@tanstack/query-core/build/modern/utils.js +3 -2
  52. package/dist/node_modules/@tanstack/query-core/build/modern/utils.js.map +1 -1
  53. package/dist/node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.js +3 -2
  54. package/dist/node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.js.map +1 -1
  55. package/dist/node_modules/@tanstack/react-query/build/modern/useBaseQuery.js +7 -5
  56. package/dist/node_modules/@tanstack/react-query/build/modern/useBaseQuery.js.map +1 -1
  57. package/dist/types/Forms.d.ts +2 -0
  58. package/dist/types/Plugins.d.ts +11 -0
  59. package/dist/types/Plugins.js +3 -3
  60. package/dist/types/Plugins.js.map +1 -1
  61. package/lib/hooks/MonitorBackgroundTask.tsx +118 -0
  62. package/lib/hooks/MonitorDataOutput.tsx +25 -29
  63. package/lib/index.ts +8 -1
  64. package/lib/types/Forms.tsx +2 -0
  65. package/lib/types/Plugins.tsx +10 -0
  66. package/package.json +31 -28
@@ -48,6 +48,13 @@ export type InvenTreeFormsContext = {
48
48
  stockActions: StockAdjustmentFormsContext;
49
49
  };
50
50
 
51
+ export type ImporterDrawerContext = {
52
+ open: (sessionId: number, options?: { onClose?: () => void }) => void;
53
+ close: () => void;
54
+ isOpen: () => boolean;
55
+ sessionId: () => number | null;
56
+ };
57
+
51
58
  /**
52
59
  * A set of properties which are passed to a plugin,
53
60
  * for rendering an element in the user interface.
@@ -59,6 +66,8 @@ export type InvenTreeFormsContext = {
59
66
  * @param globalSettings - The global settings (see ../states/SettingsState.tsx)
60
67
  * @param navigate - The navigation function (see react-router-dom)
61
68
  * @param theme - The current Mantine theme
69
+ * @param forms - A set of functions for opening various API forms (see ../components/Forms.tsx)
70
+ * @param importer - A set of functions for controlling the global importer drawer (see ../components/importer/GlobalImporterDrawer.tsx)
62
71
  * @param colorScheme - The current Mantine color scheme (e.g. 'light' / 'dark')
63
72
  * @param host - The current host URL
64
73
  * @param i18n - The i18n instance for translations (from @lingui/core)
@@ -87,6 +96,7 @@ export type InvenTreePluginContext = {
87
96
  navigate: NavigateFunction;
88
97
  theme: MantineTheme;
89
98
  forms: InvenTreeFormsContext;
99
+ importer: ImporterDrawerContext;
90
100
  colorScheme: MantineColorScheme;
91
101
  model?: ModelType | string;
92
102
  id?: string | number | null;
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.8.2",
4
+ "version": "0.10.0",
5
5
  "private": false,
6
6
  "type": "module",
7
7
  "license": "MIT",
@@ -45,9 +45,9 @@
45
45
  "@codemirror/language": "^6.12.2",
46
46
  "@codemirror/lint": "^6.9.5",
47
47
  "@codemirror/search": "^6.6.0",
48
- "@codemirror/state": "^6.5.4",
48
+ "@codemirror/state": "^6.6.0",
49
49
  "@codemirror/theme-one-dark": "^6.1.3",
50
- "@codemirror/view": "6.38.2",
50
+ "@codemirror/view": "^6.40.0",
51
51
  "@emotion/react": "^11.13.3",
52
52
  "@fortawesome/fontawesome-svg-core": "^7.0.0",
53
53
  "@fortawesome/free-regular-svg-icons": "^7.0.0",
@@ -72,16 +72,16 @@
72
72
  "@mantine/spotlight": "^8.2.7",
73
73
  "@mantine/vanilla-extract": "^8.2.7",
74
74
  "@messageformat/date-skeleton": "^1.1.0",
75
- "@sentry/react": "^10.7.0",
75
+ "@sentry/react": "^10.43.0",
76
76
  "@tabler/icons-react": "^3.17.0",
77
77
  "@tanstack/react-query": "^5.56.2",
78
- "@uiw/codemirror-theme-vscode": "4.25.1",
79
- "@uiw/react-codemirror": "^4.25.7",
80
- "@uiw/react-split": "^5.9.3",
81
- "@vanilla-extract/css": "^1.17.1",
82
- "axios": "^1.8.4",
78
+ "@uiw/codemirror-theme-vscode": "^4.25.8",
79
+ "@uiw/react-codemirror": "^4.25.8",
80
+ "@uiw/react-split": "^5.9.4",
81
+ "@vanilla-extract/css": "^1.18.0",
82
+ "axios": "^1.13.6",
83
83
  "clsx": "^2.1.1",
84
- "codemirror": "6.0.2",
84
+ "codemirror": "^6.0.2",
85
85
  "dayjs": "^1.11.13",
86
86
  "dompurify": "^3.2.4",
87
87
  "easymde": "^2.18.0",
@@ -91,11 +91,11 @@
91
91
  "mantine-contextmenu": "^8.2.0",
92
92
  "mantine-datatable": "^8.2.0",
93
93
  "qrcode": "^1.5.4",
94
- "react": "^19.1.2",
95
- "react-dom": "^19.1.2",
94
+ "react": "^19.2.4",
95
+ "react-dom": "^19.2.4",
96
96
  "react-grid-layout": "1.4.4",
97
97
  "react-hook-form": "^7.62.0",
98
- "react-is": "^19.1.2",
98
+ "react-is": "^19.2.4",
99
99
  "react-router-dom": "^6.26.2",
100
100
  "react-select": "^5.9.0",
101
101
  "react-simplemde-editor": "^5.2.0",
@@ -105,35 +105,38 @@
105
105
  "zustand": "^5.0.8"
106
106
  },
107
107
  "devDependencies": {
108
- "@babel/core": "^7.26.10",
109
- "@babel/preset-react": "^7.26.3",
110
- "@babel/preset-typescript": "^7.27.0",
111
- "@babel/runtime": "^7.27.0",
108
+ "@babel/core": "^7.29.0",
109
+ "@babel/preset-react": "^7.28.5",
110
+ "@babel/preset-typescript": "^7.28.5",
111
+ "@babel/runtime": "^7.28.6",
112
112
  "@codecov/vite-plugin": "^1.9.1",
113
113
  "@lingui/babel-plugin-lingui-macro": "^5.9.2",
114
114
  "@lingui/cli": "^5.9.2",
115
115
  "@lingui/macro": "^5.9.2",
116
- "@playwright/test": "1.56.0",
117
- "@types/node": "^24.3.0",
116
+ "@playwright/test": "^1.58.2",
117
+ "@types/node": "^25.5.0",
118
118
  "@types/qrcode": "^1.5.5",
119
- "@types/react": "^19.1.10",
120
- "@types/react-dom": "^19.1.7",
119
+ "@types/react": "^19.2.14",
120
+ "@types/react-dom": "^19.2.3",
121
121
  "@types/react-grid-layout": "^1.3.5",
122
122
  "@types/react-router-dom": "^5.3.3",
123
123
  "@types/react-window": "^1.8.8",
124
- "@vanilla-extract/vite-plugin": "^5.1.1",
125
- "@vitejs/plugin-react": "^5.0.2",
124
+ "@vanilla-extract/vite-plugin": "^5.1.4",
125
+ "@vitejs/plugin-react": "^5.2.0",
126
126
  "babel-plugin-macros": "^3.1.0",
127
127
  "nyc": "^18.0.0",
128
128
  "otpauth": "^9.4.1",
129
129
  "path": "^0.12.7",
130
- "rollup": "^4.0.0",
131
- "rollup-plugin-license": "^3.5.3",
132
- "typescript": "^5.8.2",
130
+ "rollup": "^4.59.0",
131
+ "rollup-plugin-license": "^3.7.0",
132
+ "typescript": "^5.9.3",
133
133
  "vite": "7.1.11",
134
134
  "vite-plugin-babel-macros": "^1.0.6",
135
- "vite-plugin-dts": "^4.5.3",
135
+ "vite-plugin-dts": "^4.5.4",
136
136
  "vite-plugin-externals": "^0.6.2",
137
- "vite-plugin-istanbul": "^7.2.1"
137
+ "vite-plugin-istanbul": "^8.0.0"
138
+ },
139
+ "resolutions": {
140
+ "undici": "^6.24.0"
138
141
  }
139
142
  }