infinity-forge 0.8.5 → 0.8.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.
|
@@ -90,7 +90,7 @@ var conflict_error_1 = require("../../../../../system/domain/protocols/http/erro
|
|
|
90
90
|
function FormElement(_a) {
|
|
91
91
|
var button = _a.button, children = _a.children, onSucess = _a.onSucess, customSubmit = _a.customSubmit, onChangeForm = _a.onChangeForm;
|
|
92
92
|
var _b = (0, react_1.useState)({ state: '', message: '' }), stateForm = _b[0], setStateForm = _b[1];
|
|
93
|
-
var _c = (0, formik_1.useFormikContext)(), values = _c.values, setErrors = _c.setErrors, setFieldError = _c.setFieldError;
|
|
93
|
+
var _c = (0, formik_1.useFormikContext)(), values = _c.values, setErrors = _c.setErrors, setFieldError = _c.setFieldError, setFieldValue = _c.setFieldValue;
|
|
94
94
|
function onSubmit(action) {
|
|
95
95
|
return __awaiter(this, void 0, void 0, function () {
|
|
96
96
|
var _a, err_1, validationErrors_1;
|
|
@@ -102,7 +102,7 @@ function FormElement(_a) {
|
|
|
102
102
|
setErrors({});
|
|
103
103
|
_a = onSucess && !action;
|
|
104
104
|
if (!_a) return [3 /*break*/, 2];
|
|
105
|
-
return [4 /*yield*/, onSucess(values)];
|
|
105
|
+
return [4 /*yield*/, onSucess(values, { setFieldError: setFieldError, setFieldValue: setFieldValue })];
|
|
106
106
|
case 1:
|
|
107
107
|
_a = (_b.sent());
|
|
108
108
|
_b.label = 2;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/ui/components/form/handler/form-handler/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAA2C;AAE3C,iCAAyC;AAEzC,2BAA6B;AAC7B,kDAAyE;AAIzE,2CAA8B;AAC9B,mCAA2D;AAC3D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CAAA;IACrD,CAAC,iBAAG,MAAM,GAAK,CAAC,CAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,sBAAsB,KAAI,EAAE,CAAC,QAAE,CAAA;IAE7D,OAAO,CACL,wBAAC,CAAC,CAAC,WAAW,eACX,SAAS,CAAC,KAAK,KAAK,OAAO,IAAI,iCAAM,SAAS,EAAC,YAAY,YAAE,SAAS,CAAC,OAAO,GAAQ,EAEtF,QAAQ,EAET,iCAAK,SAAS,EAAC,aAAa,aACzB,MAAM,IAAI,CACT,uBAAC,WAAM,eAAK,MAAM,IAAE,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,cAAM,OAAA,YAAY,EAAE,EAAd,CAAc,EAAE,OAAO,EAAE,SAAS,CAAC,KAAK,KAAK,SAAS,IAAI,CAC5G,EAEA,YAAY;wBACX,YAAY,CAAC,MAAM,GAAG,CAAC;wBACvB,YAAY,CAAC,GAAG,CAAC,UAAC,MAAM,EAAE,KAAK,IAAK,OAAA,CAClC,uBAAC,kCAAkB,eAAiB,MAAM,IAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,YAAY,KAA/D,KAAK,CAA8D,CAC7F,EAFmC,CAEnC,CAAC,IACA,IACQ,CACjB,CAAA;AACH,CAAC;AApED,8BAoEC"}
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ButtonProps } from '../../../../ui/index.js';
|
|
3
3
|
import { ICustomSubmitProps } from './custom-submit/index.js';
|
|
4
|
+
import { FormikErrors } from 'formik';
|
|
4
5
|
export interface IFormHandler {
|
|
5
6
|
ref?: any;
|
|
6
|
-
onSucess?: (data: any
|
|
7
|
+
onSucess?: (data: any, handlers?: {
|
|
8
|
+
setFieldError: (field: string, message: string) => void;
|
|
9
|
+
setFieldValue: (field: string, value: any, shouldValidate?: boolean) => Promise<void | FormikErrors<unknown>>;
|
|
10
|
+
}) => void;
|
|
7
11
|
schema?: any;
|
|
8
12
|
button?: ButtonProps;
|
|
9
13
|
children: React.ReactNode;
|
package/package.json
CHANGED
|
@@ -1,87 +1,87 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "infinity-forge",
|
|
3
|
-
"version": "0.8.
|
|
4
|
-
"description": "codie Library",
|
|
5
|
-
"main": "./dist/index.js",
|
|
6
|
-
"module": "./dist/index.js",
|
|
7
|
-
"types": "./dist/index.d.ts",
|
|
8
|
-
"repository": {
|
|
9
|
-
"type": "git",
|
|
10
|
-
"url": "https://github.com/CodieDigital/codiedigital-library"
|
|
11
|
-
},
|
|
12
|
-
"scripts": {
|
|
13
|
-
"dev": "next -p 3016",
|
|
14
|
-
"start": "next start -p 3015",
|
|
15
|
-
"build": "concurrently --kill-others \"tsc -w\" \"tsc-alias -w --resolve-full-paths\"",
|
|
16
|
-
"nextBuild": "next build",
|
|
17
|
-
"build:esm": "tsc",
|
|
18
|
-
"build:cjs": "tsc --module commonjs --outDir dist && tsc-alias -p tsconfig.json && for /r src %i in (.otf, *.ttf) do copy \"%i\" dist\\ && for /r src %i in (.css) do copy \"%i\" dist\\ "
|
|
19
|
-
},
|
|
20
|
-
"peerDependencies": {
|
|
21
|
-
"react": ">=16"
|
|
22
|
-
},
|
|
23
|
-
"files": [
|
|
24
|
-
"dist",
|
|
25
|
-
"LICENSE",
|
|
26
|
-
"README.md"
|
|
27
|
-
],
|
|
28
|
-
"keywords": [
|
|
29
|
-
"react",
|
|
30
|
-
"typescript",
|
|
31
|
-
"awesome-project"
|
|
32
|
-
],
|
|
33
|
-
"author": "Codie Digital",
|
|
34
|
-
"license": "MIT",
|
|
35
|
-
"devDependencies": {
|
|
36
|
-
"@types/node": "^18.11.7",
|
|
37
|
-
"@types/react": "^18.0.12",
|
|
38
|
-
"@types/react-dom": "^18.2.18",
|
|
39
|
-
"@types/styled-components": "^5.1.26",
|
|
40
|
-
"prettier": "^2.6.2",
|
|
41
|
-
"react": "^18.1.0",
|
|
42
|
-
"react-dom": "^18.2.0",
|
|
43
|
-
"tslib": "^2.4.1",
|
|
44
|
-
"typescript": "^5.1.5"
|
|
45
|
-
},
|
|
46
|
-
"dependencies": {
|
|
47
|
-
"@emotion/react": "^11.11.3",
|
|
48
|
-
"@emotion/styled": "^11.11.0",
|
|
49
|
-
"@fullcalendar/core": "^6.1.10",
|
|
50
|
-
"@fullcalendar/daygrid": "^6.1.10",
|
|
51
|
-
"@fullcalendar/interaction": "^6.1.10",
|
|
52
|
-
"@fullcalendar/react": "^6.1.10",
|
|
53
|
-
"@fullcalendar/timegrid": "^6.1.10",
|
|
54
|
-
"@react-input/mask": "^1.0.21",
|
|
55
|
-
"aos": "^2.3.4",
|
|
56
|
-
"axios": "^1.4.0",
|
|
57
|
-
"concurrently": "^8.2.2",
|
|
58
|
-
"formik": "^2.4.5",
|
|
59
|
-
"fs": "^0.0.1-security",
|
|
60
|
-
"fs-extra": "^11.1.1",
|
|
61
|
-
"glider-js": "^1.7.8",
|
|
62
|
-
"inversify": "^6.0.2",
|
|
63
|
-
"js-cookie": "^3.0.5",
|
|
64
|
-
"lz-string": "^1.4.4",
|
|
65
|
-
"next": "^13.1.6",
|
|
66
|
-
"npm": "^10.2.4",
|
|
67
|
-
"path": "^0.12.7",
|
|
68
|
-
"react-countup": "^6.5.0",
|
|
69
|
-
"react-currency-input-field": "^3.8.0",
|
|
70
|
-
"react-error-boundary": "^3.1.4",
|
|
71
|
-
"react-ga": "^3.3.1",
|
|
72
|
-
"react-glider": "^4.0.2",
|
|
73
|
-
"react-google-recaptcha": "^3.1.0",
|
|
74
|
-
"react-select": "^5.8.0",
|
|
75
|
-
"react-slick": "^0.30.2",
|
|
76
|
-
"reflect-metadata": "^0.2.1",
|
|
77
|
-
"semantic-ui-css": "^2.5.0",
|
|
78
|
-
"semantic-ui-react": "^2.1.5",
|
|
79
|
-
"sharp": "^0.33.2",
|
|
80
|
-
"slick-carousel": "^1.8.1",
|
|
81
|
-
"styled-components": "^6.0.1",
|
|
82
|
-
"swr": "^2.2.5",
|
|
83
|
-
"tsc-alias": "^1.8.8",
|
|
84
|
-
"yup": "^1.3.3",
|
|
85
|
-
"zustand": "^4.3.8"
|
|
86
|
-
}
|
|
87
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "infinity-forge",
|
|
3
|
+
"version": "0.8.7",
|
|
4
|
+
"description": "codie Library",
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"module": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "https://github.com/CodieDigital/codiedigital-library"
|
|
11
|
+
},
|
|
12
|
+
"scripts": {
|
|
13
|
+
"dev": "next -p 3016",
|
|
14
|
+
"start": "next start -p 3015",
|
|
15
|
+
"build": "concurrently --kill-others \"tsc -w\" \"tsc-alias -w --resolve-full-paths\"",
|
|
16
|
+
"nextBuild": "next build",
|
|
17
|
+
"build:esm": "tsc",
|
|
18
|
+
"build:cjs": "tsc --module commonjs --outDir dist && tsc-alias -p tsconfig.json && for /r src %i in (.otf, *.ttf) do copy \"%i\" dist\\ && for /r src %i in (.css) do copy \"%i\" dist\\ "
|
|
19
|
+
},
|
|
20
|
+
"peerDependencies": {
|
|
21
|
+
"react": ">=16"
|
|
22
|
+
},
|
|
23
|
+
"files": [
|
|
24
|
+
"dist",
|
|
25
|
+
"LICENSE",
|
|
26
|
+
"README.md"
|
|
27
|
+
],
|
|
28
|
+
"keywords": [
|
|
29
|
+
"react",
|
|
30
|
+
"typescript",
|
|
31
|
+
"awesome-project"
|
|
32
|
+
],
|
|
33
|
+
"author": "Codie Digital",
|
|
34
|
+
"license": "MIT",
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@types/node": "^18.11.7",
|
|
37
|
+
"@types/react": "^18.0.12",
|
|
38
|
+
"@types/react-dom": "^18.2.18",
|
|
39
|
+
"@types/styled-components": "^5.1.26",
|
|
40
|
+
"prettier": "^2.6.2",
|
|
41
|
+
"react": "^18.1.0",
|
|
42
|
+
"react-dom": "^18.2.0",
|
|
43
|
+
"tslib": "^2.4.1",
|
|
44
|
+
"typescript": "^5.1.5"
|
|
45
|
+
},
|
|
46
|
+
"dependencies": {
|
|
47
|
+
"@emotion/react": "^11.11.3",
|
|
48
|
+
"@emotion/styled": "^11.11.0",
|
|
49
|
+
"@fullcalendar/core": "^6.1.10",
|
|
50
|
+
"@fullcalendar/daygrid": "^6.1.10",
|
|
51
|
+
"@fullcalendar/interaction": "^6.1.10",
|
|
52
|
+
"@fullcalendar/react": "^6.1.10",
|
|
53
|
+
"@fullcalendar/timegrid": "^6.1.10",
|
|
54
|
+
"@react-input/mask": "^1.0.21",
|
|
55
|
+
"aos": "^2.3.4",
|
|
56
|
+
"axios": "^1.4.0",
|
|
57
|
+
"concurrently": "^8.2.2",
|
|
58
|
+
"formik": "^2.4.5",
|
|
59
|
+
"fs": "^0.0.1-security",
|
|
60
|
+
"fs-extra": "^11.1.1",
|
|
61
|
+
"glider-js": "^1.7.8",
|
|
62
|
+
"inversify": "^6.0.2",
|
|
63
|
+
"js-cookie": "^3.0.5",
|
|
64
|
+
"lz-string": "^1.4.4",
|
|
65
|
+
"next": "^13.1.6",
|
|
66
|
+
"npm": "^10.2.4",
|
|
67
|
+
"path": "^0.12.7",
|
|
68
|
+
"react-countup": "^6.5.0",
|
|
69
|
+
"react-currency-input-field": "^3.8.0",
|
|
70
|
+
"react-error-boundary": "^3.1.4",
|
|
71
|
+
"react-ga": "^3.3.1",
|
|
72
|
+
"react-glider": "^4.0.2",
|
|
73
|
+
"react-google-recaptcha": "^3.1.0",
|
|
74
|
+
"react-select": "^5.8.0",
|
|
75
|
+
"react-slick": "^0.30.2",
|
|
76
|
+
"reflect-metadata": "^0.2.1",
|
|
77
|
+
"semantic-ui-css": "^2.5.0",
|
|
78
|
+
"semantic-ui-react": "^2.1.5",
|
|
79
|
+
"sharp": "^0.33.2",
|
|
80
|
+
"slick-carousel": "^1.8.1",
|
|
81
|
+
"styled-components": "^6.0.1",
|
|
82
|
+
"swr": "^2.2.5",
|
|
83
|
+
"tsc-alias": "^1.8.8",
|
|
84
|
+
"yup": "^1.3.3",
|
|
85
|
+
"zustand": "^4.3.8"
|
|
86
|
+
}
|
|
87
|
+
}
|