@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.
- package/CHANGELOG.md +10 -0
- package/dist/.vite/manifest.json +44 -11
- package/dist/components/RowActions.js +4 -4
- package/dist/hooks/MonitorBackgroundTask.d.ts +20 -0
- package/dist/hooks/MonitorBackgroundTask.js +77 -0
- package/dist/hooks/MonitorBackgroundTask.js.map +1 -0
- package/dist/hooks/MonitorDataOutput.d.ts +6 -5
- package/dist/hooks/MonitorDataOutput.js +19 -25
- package/dist/hooks/MonitorDataOutput.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/createReactComponent.js +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/createReactComponent.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/defaultAttributes.js +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/defaultAttributes.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowRight.js +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowRight.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconCircleCheck.js +2 -2
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconCircleCheck.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconCircleX.js +2 -2
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconCircleX.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconCopy.js +2 -2
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconCopy.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconDots.js +2 -2
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconDots.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconEdit.js +2 -2
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconEdit.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconExclamationCircle.js +2 -2
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconExclamationCircle.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconPlus.js +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconPlus.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconSearch.js +2 -2
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconSearch.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconTrash.js +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconTrash.js.map +1 -1
- package/dist/node_modules/@tanstack/query-core/build/modern/environmentManager.js +22 -0
- package/dist/node_modules/@tanstack/query-core/build/modern/environmentManager.js.map +1 -0
- package/dist/node_modules/@tanstack/query-core/build/modern/focusManager.js +1 -2
- package/dist/node_modules/@tanstack/query-core/build/modern/focusManager.js.map +1 -1
- package/dist/node_modules/@tanstack/query-core/build/modern/notifyManager.js +2 -1
- package/dist/node_modules/@tanstack/query-core/build/modern/notifyManager.js.map +1 -1
- package/dist/node_modules/@tanstack/query-core/build/modern/onlineManager.js +1 -2
- package/dist/node_modules/@tanstack/query-core/build/modern/onlineManager.js.map +1 -1
- package/dist/node_modules/@tanstack/query-core/build/modern/query.js.map +1 -1
- package/dist/node_modules/@tanstack/query-core/build/modern/queryObserver.js +25 -18
- package/dist/node_modules/@tanstack/query-core/build/modern/queryObserver.js.map +1 -1
- package/dist/node_modules/@tanstack/query-core/build/modern/retryer.js.map +1 -1
- package/dist/node_modules/@tanstack/query-core/build/modern/timeoutManager.js +70 -0
- package/dist/node_modules/@tanstack/query-core/build/modern/timeoutManager.js.map +1 -0
- package/dist/node_modules/@tanstack/query-core/build/modern/utils.js +3 -2
- package/dist/node_modules/@tanstack/query-core/build/modern/utils.js.map +1 -1
- package/dist/node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.js +3 -2
- package/dist/node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.js.map +1 -1
- package/dist/node_modules/@tanstack/react-query/build/modern/useBaseQuery.js +7 -5
- package/dist/node_modules/@tanstack/react-query/build/modern/useBaseQuery.js.map +1 -1
- package/dist/types/Forms.d.ts +2 -0
- package/dist/types/Plugins.d.ts +11 -0
- package/dist/types/Plugins.js +3 -3
- package/dist/types/Plugins.js.map +1 -1
- package/lib/hooks/MonitorBackgroundTask.tsx +118 -0
- package/lib/hooks/MonitorDataOutput.tsx +25 -29
- package/lib/index.ts +8 -1
- package/lib/types/Forms.tsx +2 -0
- package/lib/types/Plugins.tsx +10 -0
- package/package.json +31 -28
package/lib/types/Plugins.tsx
CHANGED
|
@@ -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.
|
|
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.
|
|
48
|
+
"@codemirror/state": "^6.6.0",
|
|
49
49
|
"@codemirror/theme-one-dark": "^6.1.3",
|
|
50
|
-
"@codemirror/view": "6.
|
|
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.
|
|
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.
|
|
79
|
-
"@uiw/react-codemirror": "^4.25.
|
|
80
|
-
"@uiw/react-split": "^5.9.
|
|
81
|
-
"@vanilla-extract/css": "^1.
|
|
82
|
-
"axios": "^1.
|
|
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.
|
|
95
|
-
"react-dom": "^19.
|
|
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.
|
|
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.
|
|
109
|
-
"@babel/preset-react": "^7.
|
|
110
|
-
"@babel/preset-typescript": "^7.
|
|
111
|
-
"@babel/runtime": "^7.
|
|
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.
|
|
117
|
-
"@types/node": "^
|
|
116
|
+
"@playwright/test": "^1.58.2",
|
|
117
|
+
"@types/node": "^25.5.0",
|
|
118
118
|
"@types/qrcode": "^1.5.5",
|
|
119
|
-
"@types/react": "^19.
|
|
120
|
-
"@types/react-dom": "^19.
|
|
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.
|
|
125
|
-
"@vitejs/plugin-react": "^5.0
|
|
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.
|
|
131
|
-
"rollup-plugin-license": "^3.
|
|
132
|
-
"typescript": "^5.
|
|
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.
|
|
135
|
+
"vite-plugin-dts": "^4.5.4",
|
|
136
136
|
"vite-plugin-externals": "^0.6.2",
|
|
137
|
-
"vite-plugin-istanbul": "^
|
|
137
|
+
"vite-plugin-istanbul": "^8.0.0"
|
|
138
|
+
},
|
|
139
|
+
"resolutions": {
|
|
140
|
+
"undici": "^6.24.0"
|
|
138
141
|
}
|
|
139
142
|
}
|