@flowerforce/flower-react 3.4.1 → 3.5.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 CHANGED
@@ -1,3 +1,15 @@
1
+ ## 3.5.0 (2024-10-08)
2
+
3
+
4
+ ### 🚀 Features
5
+
6
+ - added "hasFocus" in useFlower and "focused" on FlowerField ([#66](https://github.com/flowerforce/flower/pull/66))
7
+
8
+
9
+ ### 🧱 Updated Dependencies
10
+
11
+ - Updated flower-core to 3.3.0
12
+
1
13
  ## 3.4.1 (2024-10-02)
2
14
 
3
15
 
package/dist/index.cjs.js CHANGED
@@ -47,6 +47,7 @@ const getDataByFlow = (name) => reselect.createSelector(selectFlower(name), flow
47
47
  const getDataFromState = (name, id) => reselect.createSelector(getDataByFlow(name), flowerCore.Selectors.getDataFromState(id));
48
48
  const makeSelectNodeErrors = (name, currentNodeId) => reselect.createSelector(selectFlowerFormNode(name, currentNodeId), flowerCore.Selectors.makeSelectNodeErrors);
49
49
  const makeSelectNodeFieldTouched = (name, currentNodeId, fieldId) => reselect.createSelector(selectFlowerFormNode(name, currentNodeId), flowerCore.Selectors.makeSelectNodeFormFieldTouched(fieldId));
50
+ const makeSelectNodeFieldFocused = (name, currentNodeId, fieldId) => reselect.createSelector(selectFlowerFormNode(name, currentNodeId), flowerCore.Selectors.makeSelectNodeFormFieldFocused(fieldId));
50
51
  const makeSelectNodeFieldDirty = (name, currentNodeId, fieldId) => reselect.createSelector(selectFlowerFormNode(name, currentNodeId), flowerCore.Selectors.makeSelectNodeFormFieldDirty(fieldId));
51
52
  const makeSelectNodeFormSubmitted = (name, currentNodeId) => reselect.createSelector(selectFlowerFormNode(name, currentNodeId), flowerCore.Selectors.makeSelectNodeFormSubmitted);
52
53
  const getAllData = reselect.createSelector(selectGlobal, mapData);
@@ -407,7 +408,7 @@ function isIntrinsicElement$1(x) {
407
408
  return typeof x === 'string';
408
409
  }
409
410
  //TODO make types for wrapper function props
410
- function Wrapper$1({ Component, id, flowName, currentNode, validate, asyncDebounce = 0, asyncValidate, asyncInitialError, asyncWaitingError, destroyValue, onBlur, hidden, onUpdate, defaultValue, ...props }) {
411
+ function Wrapper$1({ Component, id, flowName, currentNode, validate, asyncDebounce = 0, asyncValidate, asyncInitialError, asyncWaitingError, destroyValue, onBlur, onFocus, hidden, onUpdate, defaultValue, ...props }) {
411
412
  const dispatch = useDispatch();
412
413
  const [customAsyncErrors, setCustomAsyncErrors] = React.useState(asyncValidate && [asyncInitialError]);
413
414
  const [isValidating, setIsValidating] = React.useState(undefined);
@@ -416,6 +417,7 @@ function Wrapper$1({ Component, id, flowName, currentNode, validate, asyncDeboun
416
417
  const errors = useSelector(makeSelectFieldError(flowName, id, validate), flowerCore.CoreUtils.allEqual);
417
418
  const dirty = useSelector(makeSelectNodeFieldDirty(flowName, currentNode, id));
418
419
  const touched = useSelector(makeSelectNodeFieldTouched(flowName, currentNode, id));
420
+ const focused = useSelector(makeSelectNodeFieldFocused(flowName, currentNode, id));
419
421
  const refValue = React.useRef();
420
422
  const isSubmitted = useSelector(makeSelectNodeFormSubmitted(flowName, currentNode));
421
423
  const allErrors = React.useMemo(() => [...errors, ...(customAsyncErrors || []).filter(Boolean)], [errors, customAsyncErrors]);
@@ -430,6 +432,17 @@ function Wrapper$1({ Component, id, flowName, currentNode, validate, asyncDeboun
430
432
  }
431
433
  });
432
434
  }, [dispatch, flowName, currentNode, id]);
435
+ const setFocus = React.useCallback((focused) => {
436
+ dispatch({
437
+ type: 'flower/formFieldFocus',
438
+ payload: {
439
+ name: flowName,
440
+ id,
441
+ currentNode,
442
+ focused
443
+ }
444
+ });
445
+ }, [dispatch, flowName, currentNode, id]);
433
446
  const validateFn = React.useCallback(async (value) => {
434
447
  if (asyncWaitingError) {
435
448
  setCustomAsyncErrors([asyncWaitingError]);
@@ -459,8 +472,13 @@ function Wrapper$1({ Component, id, flowName, currentNode, validate, asyncDeboun
459
472
  }, [flowNameFromPath, id, dispatch, setCustomAsyncErrors, asyncValidate, asyncWaitingError]);
460
473
  const onBlurInternal = React.useCallback((e) => {
461
474
  setTouched(true);
475
+ setFocus(false);
462
476
  onBlur && onBlur(e);
463
- }, [onBlur, setTouched]);
477
+ }, [onBlur, setTouched, setFocus]);
478
+ const onFocusInternal = React.useCallback((e) => {
479
+ setFocus(true);
480
+ onFocus && onFocus(e);
481
+ }, [onFocus, setFocus]);
464
482
  React.useEffect(() => {
465
483
  if (asyncValidate) {
466
484
  if (refValue.current === value)
@@ -534,11 +552,13 @@ function Wrapper$1({ Component, id, flowName, currentNode, validate, asyncDeboun
534
552
  hasError: !!allErrors.length,
535
553
  onChange,
536
554
  onBlur: onBlurInternal,
555
+ onFocus: onFocusInternal,
556
+ focused: !!focused,
537
557
  touched,
538
558
  dirty,
539
559
  hidden,
540
560
  isValidating,
541
- isSubmitted
561
+ isSubmitted,
542
562
  }), [
543
563
  props,
544
564
  id,
@@ -548,9 +568,11 @@ function Wrapper$1({ Component, id, flowName, currentNode, validate, asyncDeboun
548
568
  dirty,
549
569
  onChange,
550
570
  onBlurInternal,
571
+ onFocusInternal,
551
572
  hidden,
552
573
  isValidating,
553
- isSubmitted
574
+ isSubmitted,
575
+ focused
554
576
  ]);
555
577
  if (typeof Component === 'function') {
556
578
  return Component(newProps);
@@ -876,7 +898,7 @@ const useFlowerForm = ({ flowName: customFlowName, name } = {}) => {
876
898
  const store = useStore();
877
899
  const flowName = customFlowName || name || flowNameDefault || '';
878
900
  const currentNode = useSelector(makeSelectCurrentNodeId(flowName));
879
- const { errors, customErrors, isValid, isSubmitted, isDirty, isValidating } = useSelector(makeSelectNodeErrors(flowName, currentNode));
901
+ const { errors, customErrors, isValid, isSubmitted, isDirty, hasFocus, isValidating } = useSelector(makeSelectNodeErrors(flowName, currentNode));
880
902
  const getData = React.useCallback((path) => {
881
903
  const { flowNameFromPath = flowName, path: newpath } = flowerCore.CoreUtils.getPath(path);
882
904
  return _get(store.getState(), [
@@ -936,6 +958,7 @@ const useFlowerForm = ({ flowName: customFlowName, name } = {}) => {
936
958
  return {
937
959
  isSubmitted,
938
960
  isDirty,
961
+ hasFocus,
939
962
  errors,
940
963
  customErrors,
941
964
  isValid,
package/dist/index.esm.js CHANGED
@@ -45,6 +45,7 @@ const getDataByFlow = (name) => createSelector(selectFlower(name), Selectors.get
45
45
  const getDataFromState = (name, id) => createSelector(getDataByFlow(name), Selectors.getDataFromState(id));
46
46
  const makeSelectNodeErrors = (name, currentNodeId) => createSelector(selectFlowerFormNode(name, currentNodeId), Selectors.makeSelectNodeErrors);
47
47
  const makeSelectNodeFieldTouched = (name, currentNodeId, fieldId) => createSelector(selectFlowerFormNode(name, currentNodeId), Selectors.makeSelectNodeFormFieldTouched(fieldId));
48
+ const makeSelectNodeFieldFocused = (name, currentNodeId, fieldId) => createSelector(selectFlowerFormNode(name, currentNodeId), Selectors.makeSelectNodeFormFieldFocused(fieldId));
48
49
  const makeSelectNodeFieldDirty = (name, currentNodeId, fieldId) => createSelector(selectFlowerFormNode(name, currentNodeId), Selectors.makeSelectNodeFormFieldDirty(fieldId));
49
50
  const makeSelectNodeFormSubmitted = (name, currentNodeId) => createSelector(selectFlowerFormNode(name, currentNodeId), Selectors.makeSelectNodeFormSubmitted);
50
51
  const getAllData = createSelector(selectGlobal, mapData);
@@ -405,7 +406,7 @@ function isIntrinsicElement$1(x) {
405
406
  return typeof x === 'string';
406
407
  }
407
408
  //TODO make types for wrapper function props
408
- function Wrapper$1({ Component, id, flowName, currentNode, validate, asyncDebounce = 0, asyncValidate, asyncInitialError, asyncWaitingError, destroyValue, onBlur, hidden, onUpdate, defaultValue, ...props }) {
409
+ function Wrapper$1({ Component, id, flowName, currentNode, validate, asyncDebounce = 0, asyncValidate, asyncInitialError, asyncWaitingError, destroyValue, onBlur, onFocus, hidden, onUpdate, defaultValue, ...props }) {
409
410
  const dispatch = useDispatch();
410
411
  const [customAsyncErrors, setCustomAsyncErrors] = useState(asyncValidate && [asyncInitialError]);
411
412
  const [isValidating, setIsValidating] = useState(undefined);
@@ -414,6 +415,7 @@ function Wrapper$1({ Component, id, flowName, currentNode, validate, asyncDeboun
414
415
  const errors = useSelector(makeSelectFieldError(flowName, id, validate), CoreUtils.allEqual);
415
416
  const dirty = useSelector(makeSelectNodeFieldDirty(flowName, currentNode, id));
416
417
  const touched = useSelector(makeSelectNodeFieldTouched(flowName, currentNode, id));
418
+ const focused = useSelector(makeSelectNodeFieldFocused(flowName, currentNode, id));
417
419
  const refValue = useRef();
418
420
  const isSubmitted = useSelector(makeSelectNodeFormSubmitted(flowName, currentNode));
419
421
  const allErrors = useMemo(() => [...errors, ...(customAsyncErrors || []).filter(Boolean)], [errors, customAsyncErrors]);
@@ -428,6 +430,17 @@ function Wrapper$1({ Component, id, flowName, currentNode, validate, asyncDeboun
428
430
  }
429
431
  });
430
432
  }, [dispatch, flowName, currentNode, id]);
433
+ const setFocus = useCallback((focused) => {
434
+ dispatch({
435
+ type: 'flower/formFieldFocus',
436
+ payload: {
437
+ name: flowName,
438
+ id,
439
+ currentNode,
440
+ focused
441
+ }
442
+ });
443
+ }, [dispatch, flowName, currentNode, id]);
431
444
  const validateFn = useCallback(async (value) => {
432
445
  if (asyncWaitingError) {
433
446
  setCustomAsyncErrors([asyncWaitingError]);
@@ -457,8 +470,13 @@ function Wrapper$1({ Component, id, flowName, currentNode, validate, asyncDeboun
457
470
  }, [flowNameFromPath, id, dispatch, setCustomAsyncErrors, asyncValidate, asyncWaitingError]);
458
471
  const onBlurInternal = useCallback((e) => {
459
472
  setTouched(true);
473
+ setFocus(false);
460
474
  onBlur && onBlur(e);
461
- }, [onBlur, setTouched]);
475
+ }, [onBlur, setTouched, setFocus]);
476
+ const onFocusInternal = useCallback((e) => {
477
+ setFocus(true);
478
+ onFocus && onFocus(e);
479
+ }, [onFocus, setFocus]);
462
480
  useEffect(() => {
463
481
  if (asyncValidate) {
464
482
  if (refValue.current === value)
@@ -532,11 +550,13 @@ function Wrapper$1({ Component, id, flowName, currentNode, validate, asyncDeboun
532
550
  hasError: !!allErrors.length,
533
551
  onChange,
534
552
  onBlur: onBlurInternal,
553
+ onFocus: onFocusInternal,
554
+ focused: !!focused,
535
555
  touched,
536
556
  dirty,
537
557
  hidden,
538
558
  isValidating,
539
- isSubmitted
559
+ isSubmitted,
540
560
  }), [
541
561
  props,
542
562
  id,
@@ -546,9 +566,11 @@ function Wrapper$1({ Component, id, flowName, currentNode, validate, asyncDeboun
546
566
  dirty,
547
567
  onChange,
548
568
  onBlurInternal,
569
+ onFocusInternal,
549
570
  hidden,
550
571
  isValidating,
551
- isSubmitted
572
+ isSubmitted,
573
+ focused
552
574
  ]);
553
575
  if (typeof Component === 'function') {
554
576
  return Component(newProps);
@@ -874,7 +896,7 @@ const useFlowerForm = ({ flowName: customFlowName, name } = {}) => {
874
896
  const store = useStore();
875
897
  const flowName = customFlowName || name || flowNameDefault || '';
876
898
  const currentNode = useSelector(makeSelectCurrentNodeId(flowName));
877
- const { errors, customErrors, isValid, isSubmitted, isDirty, isValidating } = useSelector(makeSelectNodeErrors(flowName, currentNode));
899
+ const { errors, customErrors, isValid, isSubmitted, isDirty, hasFocus, isValidating } = useSelector(makeSelectNodeErrors(flowName, currentNode));
878
900
  const getData = useCallback((path) => {
879
901
  const { flowNameFromPath = flowName, path: newpath } = CoreUtils.getPath(path);
880
902
  return _get(store.getState(), [
@@ -934,6 +956,7 @@ const useFlowerForm = ({ flowName: customFlowName, name } = {}) => {
934
956
  return {
935
957
  isSubmitted,
936
958
  isDirty,
959
+ hasFocus,
937
960
  errors,
938
961
  customErrors,
939
962
  isValid,
@@ -29,10 +29,14 @@ export type FlowerFieldProps<T extends Record<string, any> = Record<string, any>
29
29
  * onChange("John") will write "John" at the key 'name' of the loginForm object in the flow's data.
30
30
  */
31
31
  onChange: (props: any) => void;
32
- /** The function executed to test all the validation rules*/
32
+ /** The function executed on blur input*/
33
33
  onBlur: () => void;
34
+ /** The function executed on focus input*/
35
+ onFocus: () => void;
34
36
  /** This value is set to true when the form has been submitted at least once or a next invoked */
35
37
  isSubmitted: boolean;
38
+ /** This parameter will notify you whether the form field has been focues */
39
+ focused: boolean | undefined;
36
40
  /** This parameter will notify you whether the form field has been touched */
37
41
  touched: boolean;
38
42
  /** This parameter will notify you if the form field is filled in at least once */
@@ -109,4 +113,9 @@ export type FlowerFieldProps<T extends Record<string, any> = Record<string, any>
109
113
  * The onBlur function will test all the validation rules
110
114
  */
111
115
  onBlur?: (e: any) => void;
116
+ /** The function executed at the "onFocus" event, for example for Input components
117
+ *
118
+ * The onFocus function will test all the validation rules
119
+ */
120
+ onFocus?: (e: any) => void;
112
121
  };
@@ -7,6 +7,8 @@ export type UseFlowerForm = (options?: UseFlowerProps) => {
7
7
  isSubmitted: boolean;
8
8
  /** This value is set to true when at least once field is dirted. */
9
9
  isDirty: boolean;
10
+ /** This value is the id of the focused element. */
11
+ hasFocus: string | undefined;
10
12
  /** An object containing all the form errors */
11
13
  errors: Record<string, any>;
12
14
  /** An object containing all the form custom errors */
@@ -930,6 +930,7 @@ declare const makeSelectNodeErrors: (name: string, currentNodeId: string) => ((s
930
930
  }) => {
931
931
  isSubmitted: boolean;
932
932
  isDirty: boolean;
933
+ hasFocus: string | undefined;
933
934
  errors: any;
934
935
  customErrors: any;
935
936
  isValid: boolean;
@@ -942,6 +943,7 @@ declare const makeSelectNodeErrors: (name: string, currentNodeId: string) => ((s
942
943
  resultFunc: (resultFuncArgs_0: import("@flowerforce/flower-core").Form<Record<string, any>>) => {
943
944
  isSubmitted: boolean;
944
945
  isDirty: boolean;
946
+ hasFocus: string | undefined;
945
947
  errors: any;
946
948
  customErrors: any;
947
949
  isValid: boolean;
@@ -950,6 +952,7 @@ declare const makeSelectNodeErrors: (name: string, currentNodeId: string) => ((s
950
952
  memoizedResultFunc: ((resultFuncArgs_0: import("@flowerforce/flower-core").Form<Record<string, any>>) => {
951
953
  isSubmitted: boolean;
952
954
  isDirty: boolean;
955
+ hasFocus: string | undefined;
953
956
  errors: any;
954
957
  customErrors: any;
955
958
  isValid: boolean;
@@ -962,6 +965,7 @@ declare const makeSelectNodeErrors: (name: string, currentNodeId: string) => ((s
962
965
  lastResult: () => {
963
966
  isSubmitted: boolean;
964
967
  isDirty: boolean;
968
+ hasFocus: string | undefined;
965
969
  errors: any;
966
970
  customErrors: any;
967
971
  isValid: boolean;
@@ -1117,6 +1121,89 @@ declare const makeSelectNodeFieldTouched: (name: string, currentNodeId: string,
1117
1121
  argsMemoize: typeof import("reselect").weakMapMemoize;
1118
1122
  memoize: typeof import("reselect").weakMapMemoize;
1119
1123
  };
1124
+ declare const makeSelectNodeFieldFocused: (name: string, currentNodeId: string, fieldId: string) => ((state: {
1125
+ flower: {
1126
+ [x: string]: import("@flowerforce/flower-core").Flower<Record<string, any>>;
1127
+ };
1128
+ }) => string | undefined) & {
1129
+ clearCache: () => void;
1130
+ resultsCount: () => number;
1131
+ resetResultsCount: () => void;
1132
+ } & {
1133
+ resultFunc: (resultFuncArgs_0: import("@flowerforce/flower-core").Form<Record<string, any>>) => string | undefined;
1134
+ memoizedResultFunc: ((resultFuncArgs_0: import("@flowerforce/flower-core").Form<Record<string, any>>) => string | undefined) & {
1135
+ clearCache: () => void;
1136
+ resultsCount: () => number;
1137
+ resetResultsCount: () => void;
1138
+ };
1139
+ lastResult: () => string | undefined;
1140
+ dependencies: [((state: {
1141
+ flower: {
1142
+ [x: string]: import("@flowerforce/flower-core").Flower<Record<string, any>>;
1143
+ };
1144
+ }) => import("@flowerforce/flower-core").Form<Record<string, any>>) & {
1145
+ clearCache: () => void;
1146
+ resultsCount: () => number;
1147
+ resetResultsCount: () => void;
1148
+ } & {
1149
+ resultFunc: (resultFuncArgs_0: import("@flowerforce/flower-core").Flower<Record<string, any>>) => import("@flowerforce/flower-core").Form<Record<string, any>>;
1150
+ memoizedResultFunc: ((resultFuncArgs_0: import("@flowerforce/flower-core").Flower<Record<string, any>>) => import("@flowerforce/flower-core").Form<Record<string, any>>) & {
1151
+ clearCache: () => void;
1152
+ resultsCount: () => number;
1153
+ resetResultsCount: () => void;
1154
+ };
1155
+ lastResult: () => import("@flowerforce/flower-core").Form<Record<string, any>>;
1156
+ dependencies: [((state: {
1157
+ flower: {
1158
+ [x: string]: import("@flowerforce/flower-core").Flower<Record<string, any>>;
1159
+ };
1160
+ }) => import("@flowerforce/flower-core").Flower<Record<string, any>>) & {
1161
+ clearCache: () => void;
1162
+ resultsCount: () => number;
1163
+ resetResultsCount: () => void;
1164
+ } & {
1165
+ resultFunc: (resultFuncArgs_0: {
1166
+ [x: string]: import("@flowerforce/flower-core").Flower<Record<string, any>>;
1167
+ }) => import("@flowerforce/flower-core").Flower<Record<string, any>>;
1168
+ memoizedResultFunc: ((resultFuncArgs_0: {
1169
+ [x: string]: import("@flowerforce/flower-core").Flower<Record<string, any>>;
1170
+ }) => import("@flowerforce/flower-core").Flower<Record<string, any>>) & {
1171
+ clearCache: () => void;
1172
+ resultsCount: () => number;
1173
+ resetResultsCount: () => void;
1174
+ };
1175
+ lastResult: () => import("@flowerforce/flower-core").Flower<Record<string, any>>;
1176
+ dependencies: [<T extends Record<string, any>>(state: {
1177
+ flower: {
1178
+ [x: string]: import("@flowerforce/flower-core").Flower<T>;
1179
+ };
1180
+ }) => {
1181
+ [x: string]: import("@flowerforce/flower-core").Flower<T>;
1182
+ }];
1183
+ recomputations: () => number;
1184
+ resetRecomputations: () => void;
1185
+ dependencyRecomputations: () => number;
1186
+ resetDependencyRecomputations: () => void;
1187
+ } & {
1188
+ argsMemoize: typeof import("reselect").weakMapMemoize;
1189
+ memoize: typeof import("reselect").weakMapMemoize;
1190
+ }];
1191
+ recomputations: () => number;
1192
+ resetRecomputations: () => void;
1193
+ dependencyRecomputations: () => number;
1194
+ resetDependencyRecomputations: () => void;
1195
+ } & {
1196
+ argsMemoize: typeof import("reselect").weakMapMemoize;
1197
+ memoize: typeof import("reselect").weakMapMemoize;
1198
+ }];
1199
+ recomputations: () => number;
1200
+ resetRecomputations: () => void;
1201
+ dependencyRecomputations: () => number;
1202
+ resetDependencyRecomputations: () => void;
1203
+ } & {
1204
+ argsMemoize: typeof import("reselect").weakMapMemoize;
1205
+ memoize: typeof import("reselect").weakMapMemoize;
1206
+ };
1120
1207
  declare const makeSelectNodeFieldDirty: (name: string, currentNodeId: string, fieldId: string) => ((state: {
1121
1208
  flower: {
1122
1209
  [x: string]: import("@flowerforce/flower-core").Flower<Record<string, any>>;
@@ -1563,6 +1650,7 @@ export declare const selectorRulesDisabled: (id: string, rules: RulesObject<any>
1563
1650
  resultFunc: (resultFuncArgs_0: Record<string, any> | undefined, resultFuncArgs_1: {
1564
1651
  isSubmitted: boolean;
1565
1652
  isDirty: boolean;
1653
+ hasFocus: string | undefined;
1566
1654
  errors: any;
1567
1655
  customErrors: any;
1568
1656
  isValid: boolean;
@@ -1571,6 +1659,7 @@ export declare const selectorRulesDisabled: (id: string, rules: RulesObject<any>
1571
1659
  memoizedResultFunc: ((resultFuncArgs_0: Record<string, any> | undefined, resultFuncArgs_1: {
1572
1660
  isSubmitted: boolean;
1573
1661
  isDirty: boolean;
1662
+ hasFocus: string | undefined;
1574
1663
  errors: any;
1575
1664
  customErrors: any;
1576
1665
  isValid: boolean;
@@ -1622,6 +1711,7 @@ export declare const selectorRulesDisabled: (id: string, rules: RulesObject<any>
1622
1711
  }) => {
1623
1712
  isSubmitted: boolean;
1624
1713
  isDirty: boolean;
1714
+ hasFocus: string | undefined;
1625
1715
  errors: any;
1626
1716
  customErrors: any;
1627
1717
  isValid: boolean;
@@ -1634,6 +1724,7 @@ export declare const selectorRulesDisabled: (id: string, rules: RulesObject<any>
1634
1724
  resultFunc: (resultFuncArgs_0: import("@flowerforce/flower-core").Form<Record<string, any>>) => {
1635
1725
  isSubmitted: boolean;
1636
1726
  isDirty: boolean;
1727
+ hasFocus: string | undefined;
1637
1728
  errors: any;
1638
1729
  customErrors: any;
1639
1730
  isValid: boolean;
@@ -1642,6 +1733,7 @@ export declare const selectorRulesDisabled: (id: string, rules: RulesObject<any>
1642
1733
  memoizedResultFunc: ((resultFuncArgs_0: import("@flowerforce/flower-core").Form<Record<string, any>>) => {
1643
1734
  isSubmitted: boolean;
1644
1735
  isDirty: boolean;
1736
+ hasFocus: string | undefined;
1645
1737
  errors: any;
1646
1738
  customErrors: any;
1647
1739
  isValid: boolean;
@@ -1654,6 +1746,7 @@ export declare const selectorRulesDisabled: (id: string, rules: RulesObject<any>
1654
1746
  lastResult: () => {
1655
1747
  isSubmitted: boolean;
1656
1748
  isDirty: boolean;
1749
+ hasFocus: string | undefined;
1657
1750
  errors: any;
1658
1751
  customErrors: any;
1659
1752
  isValid: boolean;
@@ -1734,4 +1827,4 @@ export declare const selectorRulesDisabled: (id: string, rules: RulesObject<any>
1734
1827
  argsMemoize: typeof import("reselect").weakMapMemoize;
1735
1828
  memoize: typeof import("reselect").weakMapMemoize;
1736
1829
  };
1737
- export { selectFlowerHistory, makeSelectNodesIds, makeSelectCurrentNodeId, makeSelectStartNodeId, makeSelectCurrentNodeDisabled, getAllData, getDataByFlow, getDataFromState, makeSelectNodeErrors, makeSelectNodeFieldTouched, makeSelectNodeFieldDirty, makeSelectFieldError, makeSelectNodeFormSubmitted, makeSelectPrevNodeRetain };
1830
+ export { selectFlowerHistory, makeSelectNodesIds, makeSelectCurrentNodeId, makeSelectStartNodeId, makeSelectCurrentNodeDisabled, getAllData, getDataByFlow, getDataFromState, makeSelectNodeErrors, makeSelectNodeFieldTouched, makeSelectNodeFieldFocused, makeSelectNodeFieldDirty, makeSelectFieldError, makeSelectNodeFormSubmitted, makeSelectPrevNodeRetain };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flowerforce/flower-react",
3
- "version": "3.4.1",
3
+ "version": "3.5.0",
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",
37
+ "@flowerforce/flower-core": "3.3.0",
38
38
  "@reduxjs/toolkit": "^2.2.4",
39
39
  "lodash": "^4.17.21",
40
40
  "react-redux": "^9.1.2",