@steroidsjs/core 2.3.0-beta.6 → 2.3.0-beta.7
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/README.md +17 -2
- package/package.json +5 -5
- package/{index.d.ts → src/index.d.ts} +0 -0
- package/ui/form/Form/Form.d.ts +5 -0
- package/ui/form/Form/Form.js +1 -0
package/README.md
CHANGED
|
@@ -1,9 +1,24 @@
|
|
|
1
1
|
# Steroids for React
|
|
2
2
|
|
|
3
|
-
Find documentation [here](
|
|
3
|
+
Find documentation [here](docs/index.md)
|
|
4
4
|
|
|
5
5
|
## Use package from source in project
|
|
6
6
|
|
|
7
7
|
1. Copy `tsconfig-debug.json.sample` to `tsconfig-debug.json`
|
|
8
8
|
2. Replace `outDir` path to node_modules nest path in project
|
|
9
|
-
3. Run from this directory `yarn
|
|
9
|
+
3. Run from this directory `nps watch` or 'yarn script watch'
|
|
10
|
+
|
|
11
|
+
## All scripts available
|
|
12
|
+
```
|
|
13
|
+
yarn script
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## To publish to NPM manually use the command (_nps_ **is not a typo!**):
|
|
17
|
+
```
|
|
18
|
+
nps publish.manual
|
|
19
|
+
|
|
20
|
+
#OR
|
|
21
|
+
|
|
22
|
+
yarn script publish.manual
|
|
23
|
+
```
|
|
24
|
+
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@steroidsjs/core",
|
|
3
|
-
"version": "2.3.0-beta.
|
|
3
|
+
"version": "2.3.0-beta.7",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "Vladimir Kozhin <hello@kozhindev.com>",
|
|
6
6
|
"repository": {
|
|
@@ -18,10 +18,8 @@
|
|
|
18
18
|
"url": "https://github.com/steroids/react/issues"
|
|
19
19
|
},
|
|
20
20
|
"scripts": {
|
|
21
|
-
"
|
|
22
|
-
"test": "
|
|
23
|
-
"build": "../node_modules/.bin/tsc && cp ./{package.json,LICENSE,README.md} dist/ && cp src/index.d.ts dist/",
|
|
24
|
-
"watch": "../node_modules/.bin/tsc -p tsconfig-debug.json"
|
|
21
|
+
"script": "nps",
|
|
22
|
+
"test": "nps test"
|
|
25
23
|
},
|
|
26
24
|
"dependencies": {
|
|
27
25
|
"axios": "^0.21.1",
|
|
@@ -76,6 +74,7 @@
|
|
|
76
74
|
"@typescript-eslint/eslint-plugin": "^4.15.0",
|
|
77
75
|
"@typescript-eslint/parser": "^4.15.0",
|
|
78
76
|
"@wojtekmaj/enzyme-adapter-react-17": "^0.4.1",
|
|
77
|
+
"copyfiles": "^2.4.1",
|
|
79
78
|
"enzyme": "^3.11.0",
|
|
80
79
|
"eslint": "^7.20.0",
|
|
81
80
|
"eslint-config-airbnb": "18.2.1",
|
|
@@ -85,6 +84,7 @@
|
|
|
85
84
|
"eslint-plugin-react-hooks": "^1.7.0",
|
|
86
85
|
"jest": "^26.6.3",
|
|
87
86
|
"jest-enzyme": "^7.1.2",
|
|
87
|
+
"nps": "^5.10.0",
|
|
88
88
|
"ts-jest": "^26.5.1",
|
|
89
89
|
"typescript": "4.2.2"
|
|
90
90
|
}
|
|
File without changes
|
package/ui/form/Form/Form.d.ts
CHANGED
|
@@ -64,6 +64,11 @@ export interface IFormProps {
|
|
|
64
64
|
* @param args
|
|
65
65
|
*/
|
|
66
66
|
onChange?: (...args: any[]) => any;
|
|
67
|
+
/**
|
|
68
|
+
* Обработчик события ошибки выполнения запроса
|
|
69
|
+
* @param args
|
|
70
|
+
*/
|
|
71
|
+
onError?: (...args: any[]) => any;
|
|
67
72
|
/**
|
|
68
73
|
* Обработчик успешного выполнения формы (без ошибок)
|
|
69
74
|
* @param args
|
package/ui/form/Form/Form.js
CHANGED
|
@@ -271,6 +271,7 @@ function Form(props) {
|
|
|
271
271
|
requestError_1 = _c.sent();
|
|
272
272
|
console.error(requestError_1); // eslint-disable-line no-console
|
|
273
273
|
dispatch(form_2.formSetSubmitting(props.formId, false));
|
|
274
|
+
props.onError(requestError_1);
|
|
274
275
|
reduxDispatch(notifications_1.showNotification(props.submitErrorMessage || __('Ошибка сервера'), 'danger'));
|
|
275
276
|
return [2 /*return*/, null];
|
|
276
277
|
case 12:
|