@torq-north/react-tools 1.4.7 → 1.4.8
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/index.cjs +105 -47
- package/dist/index.cjs.map +1 -1
- package/dist/index.es.js +105 -48
- package/dist/index.es.js.map +1 -1
- package/dist/src/Core/Api/httpError.d.ts +12 -0
- package/dist/src/Core/Api/index.d.ts +1 -0
- package/dist/src/Form/Utilities/getFieldError.d.ts +3 -0
- package/dist/src/MUI/Components/Error/ErrorOverlay.d.ts +1 -1
- package/package.json +10 -5
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface HttpValidationViolation {
|
|
2
|
+
propertyPath: string;
|
|
3
|
+
title: string;
|
|
4
|
+
}
|
|
5
|
+
export declare class HTTPError extends Error {
|
|
6
|
+
readonly status: number;
|
|
7
|
+
readonly statusText: string;
|
|
8
|
+
readonly violations: HttpValidationViolation[];
|
|
9
|
+
constructor(message: string, status: number, violations?: HttpValidationViolation[]);
|
|
10
|
+
}
|
|
11
|
+
export declare function isJsonResponse(response: Response): boolean;
|
|
12
|
+
export declare function readHttpError(response: Response): Promise<HTTPError>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@torq-north/react-tools",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.4.
|
|
4
|
+
"version": "1.4.8",
|
|
5
5
|
"description": "A collection of commonly used utilities",
|
|
6
6
|
"author": "@torq-north",
|
|
7
7
|
"license": "SEE LICENCE.md",
|
|
@@ -14,16 +14,17 @@
|
|
|
14
14
|
"dist/**/*"
|
|
15
15
|
],
|
|
16
16
|
"engines": {
|
|
17
|
-
"node": ">=
|
|
17
|
+
"node": ">=20.19.0",
|
|
18
18
|
"npm": ">=5"
|
|
19
19
|
},
|
|
20
20
|
"scripts": {
|
|
21
|
-
"test": "
|
|
21
|
+
"test": "vitest run",
|
|
22
22
|
"ladle": "npx ladle serve",
|
|
23
23
|
"build": "rollup -c",
|
|
24
24
|
"predeploy": "npm run build",
|
|
25
25
|
"deploy": "npm publish --access public",
|
|
26
|
-
"typewatch": "tsc -w --noEmit"
|
|
26
|
+
"typewatch": "tsc -w --noEmit",
|
|
27
|
+
"typecheck": "tsc --noEmit"
|
|
27
28
|
},
|
|
28
29
|
"keywords": [],
|
|
29
30
|
"peerDependencies": {
|
|
@@ -46,8 +47,11 @@
|
|
|
46
47
|
"@mui/x-date-pickers": "^8.5.1",
|
|
47
48
|
"@rollup/plugin-commonjs": "^28.0.3",
|
|
48
49
|
"@rollup/plugin-node-resolve": "^16.0.1",
|
|
50
|
+
"@testing-library/jest-dom": "^6.9.1",
|
|
51
|
+
"@testing-library/react": "^16.3.3",
|
|
49
52
|
"dayjs": "^1.11.13",
|
|
50
53
|
"final-form": "^5.0.0-3",
|
|
54
|
+
"jsdom": "^29.1.1",
|
|
51
55
|
"prettier": "^3.5.3",
|
|
52
56
|
"react": "^19.1.0",
|
|
53
57
|
"react-dom": "^19.1.0",
|
|
@@ -55,7 +59,8 @@
|
|
|
55
59
|
"rollup": "^4.41.1",
|
|
56
60
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
57
61
|
"rollup-plugin-typescript2": "^0.36.0",
|
|
58
|
-
"typescript": "^5.8.3"
|
|
62
|
+
"typescript": "^5.8.3",
|
|
63
|
+
"vitest": "^4.1.11"
|
|
59
64
|
},
|
|
60
65
|
"dependencies": {
|
|
61
66
|
"react-dropzone": "^14.2.3"
|