@flowerforce/flower-react 3.3.3-beta.0 → 3.3.3-beta.2
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.js
CHANGED
@@ -443,6 +443,9 @@ function Wrapper$1({ Component, id, flowName, currentNode, validate, asyncDeboun
|
|
443
443
|
validateFn
|
444
444
|
]);
|
445
445
|
const onChange = React.useCallback((val) => {
|
446
|
+
if (asyncValidate && asyncWaitingError) {
|
447
|
+
setCustomAsyncErrors([asyncWaitingError]);
|
448
|
+
}
|
446
449
|
dispatch({
|
447
450
|
type: `flower/addDataByPath`,
|
448
451
|
payload: {
|
@@ -452,7 +455,7 @@ function Wrapper$1({ Component, id, flowName, currentNode, validate, asyncDeboun
|
|
452
455
|
dirty: defaultValue ? !isEqual(val, defaultValue) : true
|
453
456
|
}
|
454
457
|
});
|
455
|
-
}, [flowNameFromPath, id, onBlur, dispatch]);
|
458
|
+
}, [flowNameFromPath, id, onBlur, dispatch, setCustomAsyncErrors, asyncValidate, asyncWaitingError]);
|
456
459
|
const onBlurInternal = React.useCallback((e) => {
|
457
460
|
setTouched(true);
|
458
461
|
onBlur && onBlur(e);
|
package/dist/index.esm.js
CHANGED
@@ -441,6 +441,9 @@ function Wrapper$1({ Component, id, flowName, currentNode, validate, asyncDeboun
|
|
441
441
|
validateFn
|
442
442
|
]);
|
443
443
|
const onChange = useCallback((val) => {
|
444
|
+
if (asyncValidate && asyncWaitingError) {
|
445
|
+
setCustomAsyncErrors([asyncWaitingError]);
|
446
|
+
}
|
444
447
|
dispatch({
|
445
448
|
type: `flower/addDataByPath`,
|
446
449
|
payload: {
|
@@ -450,7 +453,7 @@ function Wrapper$1({ Component, id, flowName, currentNode, validate, asyncDeboun
|
|
450
453
|
dirty: defaultValue ? !isEqual(val, defaultValue) : true
|
451
454
|
}
|
452
455
|
});
|
453
|
-
}, [flowNameFromPath, id, onBlur, dispatch]);
|
456
|
+
}, [flowNameFromPath, id, onBlur, dispatch, setCustomAsyncErrors, asyncValidate, asyncWaitingError]);
|
454
457
|
const onBlurInternal = useCallback((e) => {
|
455
458
|
setTouched(true);
|
456
459
|
onBlur && onBlur(e);
|
@@ -22,6 +22,27 @@ export type RoutePrev = string | {
|
|
22
22
|
node: string;
|
23
23
|
flowName?: string;
|
24
24
|
};
|
25
|
+
export type FlowerNavigateActionsProps = {
|
26
|
+
action: 'next';
|
27
|
+
node?: never;
|
28
|
+
route?: Route;
|
29
|
+
} | {
|
30
|
+
action: 'back';
|
31
|
+
node?: RoutePrev;
|
32
|
+
route?: never;
|
33
|
+
} | {
|
34
|
+
action: 'reset';
|
35
|
+
node?: RouteReset;
|
36
|
+
route?: never;
|
37
|
+
} | {
|
38
|
+
action: 'jump';
|
39
|
+
node?: RouteNode;
|
40
|
+
route?: never;
|
41
|
+
} | {
|
42
|
+
action: 'restart';
|
43
|
+
node?: RouteRestart;
|
44
|
+
route?: never;
|
45
|
+
};
|
25
46
|
export type FlowerNavigateProps = {
|
26
47
|
/** The name of the flow from which read the data
|
27
48
|
*
|
@@ -37,24 +58,4 @@ export type FlowerNavigateProps = {
|
|
37
58
|
* The FlowerValue returns the boolean variable "hidden" to notify you if the conditions are satisfied or not
|
38
59
|
*/
|
39
60
|
alwaysDisplay?: boolean;
|
40
|
-
} &
|
41
|
-
action?: 'next';
|
42
|
-
node?: undefined;
|
43
|
-
route?: Route;
|
44
|
-
} | {
|
45
|
-
action?: 'back';
|
46
|
-
node?: RoutePrev;
|
47
|
-
route?: undefined;
|
48
|
-
} | {
|
49
|
-
action?: 'reset';
|
50
|
-
node?: RouteReset;
|
51
|
-
route?: undefined;
|
52
|
-
} | {
|
53
|
-
action?: 'jump';
|
54
|
-
node?: RouteNode;
|
55
|
-
route?: undefined;
|
56
|
-
} | {
|
57
|
-
action?: 'restart';
|
58
|
-
node?: RouteRestart;
|
59
|
-
route?: undefined;
|
60
|
-
});
|
61
|
+
} & FlowerNavigateActionsProps;
|
package/dist/src/index.d.ts
CHANGED
@@ -24,7 +24,7 @@ export type { FlowerComponentProps } from './components/types/FlowerComponent';
|
|
24
24
|
export type { FlowerFieldProps } from './components/types/FlowerField';
|
25
25
|
export type { FlowerFlowProps } from './components/types/FlowerFlow';
|
26
26
|
export type { UseFlower, UseFlowerForm, UseFlowerProps, NavigateFunctionParams } from './components/types/FlowerHooks';
|
27
|
-
export type { RouteReset, RoutePrev, RouteNode, Route, FlowerNavigateProps } from './components/types/FlowerNavigate';
|
27
|
+
export type { RouteReset, RoutePrev, RouteNode, Route, FlowerNavigateProps, FlowerNavigateActionsProps } from './components/types/FlowerNavigate';
|
28
28
|
export type { FlowerNodeProps } from './components/types/FlowerNode';
|
29
29
|
export type { FlowerProviderProps } from './components/types/FlowerProvider';
|
30
30
|
export type { FlowerRouteProps } from './components/types/FlowerRoute';
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@flowerforce/flower-react",
|
3
|
-
"version": "3.3.3-beta.
|
3
|
+
"version": "3.3.3-beta.2",
|
4
4
|
"description": "FlowerJS components, hooks and utils for React.",
|
5
5
|
"repository": {
|
6
6
|
"type": "git",
|
@@ -34,7 +34,7 @@
|
|
34
34
|
"typescript": "^5.4.5"
|
35
35
|
},
|
36
36
|
"dependencies": {
|
37
|
-
"@flowerforce/flower-core": "3.2.3-beta.
|
37
|
+
"@flowerforce/flower-core": "3.2.3-beta.2",
|
38
38
|
"@reduxjs/toolkit": "^2.2.4",
|
39
39
|
"lodash": "^4.17.21",
|
40
40
|
"react-redux": "^9.1.2",
|