@fto-consult/expo-ui 2.48.0 → 2.48.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fto-consult/expo-ui",
3
- "version": "2.48.0",
3
+ "version": "2.48.2",
4
4
  "description": "Bibliothèque de composants UI Expo,react-native",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -93,7 +93,7 @@ const AppBarComponent = React.forwardRef((props,ref)=> {
93
93
  const [context] = React.useState({});
94
94
  actions = typeof actions =='function'? actions(getCallAgs()) : actions;
95
95
  const dimensions = Dimensions.get("window");
96
- const [layout,setLayout] = React.useStateIfMounted({
96
+ const [layout,setLayout] = React.useState({
97
97
  width : dimensions.width,
98
98
  height : dimensions.height,
99
99
  })
@@ -12,7 +12,7 @@ const BottomSheetMenuComponent = React.forwardRef((props,ref)=>{
12
12
  rest = defaultObj(rest);
13
13
  const isControlled = controlled ? true : false;
14
14
  const visibleRef = React.useRef(null);
15
- const [state,setState] = React.useStateIfMounted({
15
+ const [state,setState] = React.useState({
16
16
  visible : false,
17
17
  height : undefined,
18
18
  });
@@ -58,7 +58,7 @@ const CheckboxComponent = React.forwardRef((props,ref)=>{
58
58
  }
59
59
  delete p.checked;
60
60
  defaultValue = defaultVal(defaultValue,value,0);
61
- const [status,setStatus] = React.useStateIfMounted(defaultValue == checkedValue ? checkedStatus : uncheckedStatus)
61
+ const [status,setStatus] = React.useState(defaultValue == checkedValue ? checkedStatus : uncheckedStatus)
62
62
  const previousStatus = React.usePrevious(status);
63
63
  const checked = status===checkedStatus?true:false;
64
64
  if(checked){
@@ -19,7 +19,7 @@ const ColorPickerComponent = React.forwardRef ((props,ref)=>{
19
19
  const isMob = isMobileOrTabletMedia();
20
20
  const _label = defaultStr(label,text);
21
21
  const pickerRef = React.useRef(null);
22
- const [state,setState] = React.useStateIfMounted({
22
+ const [state,setState] = React.useState({
23
23
  color : Colors.isValid(defaultValue)? defaultValue : undefined,
24
24
  visible : false,
25
25
  })
@@ -45,7 +45,7 @@ const DatagridAccordionRow = React.forwardRef((props,ref)=>{
45
45
  isScrolling = isS;
46
46
  }
47
47
  }
48
- const [state,setState] = React.useStateIfMounted({
48
+ const [state,setState] = React.useState({
49
49
  expanded : false,
50
50
  });
51
51
  const toggleExpander = ()=>{
@@ -16,7 +16,7 @@ export default function DatagridActions (_props){
16
16
  let {actions,actionProps,selectedRowsActions,bindResizeEvent,context,selectedRows:_selectedRows,...props} = _props;
17
17
  props = defaultObj(props);
18
18
  context = defaultObj(context);
19
- const [state,setState] = React.useStateIfMounted({
19
+ const [state,setState] = React.useState({
20
20
  selectedRows : defaultObj(_selectedRows),
21
21
  });
22
22
  const selectedRowsCallBackRef = React.useRef(null);
@@ -80,7 +80,7 @@ export default function DGGridFooters (props){
80
80
  } else {
81
81
  Component = defaultVal(Component,View)
82
82
  }
83
- const [state,setState] = React.useStateIfMounted({
83
+ const [state,setState] = React.useState({
84
84
  columns,
85
85
  data,
86
86
  })
@@ -65,7 +65,7 @@ const DatePickerInput = React.forwardRef(({
65
65
  inputMode = defaultStr(inputMode,"start");
66
66
  locale = defaultStr(locale,defaultLocale);
67
67
  const theme = useTheme()
68
- const [state,setState] = React.useStateIfMounted({
68
+ const [state,setState] = React.useState({
69
69
  errorText : null,
70
70
  inputDate : toDateObj(defaultValue,format),
71
71
  visible : false
@@ -54,7 +54,7 @@ export default function TimePickerComponent (props){
54
54
  }
55
55
  withSeconds = defaultBool(withSeconds,true);
56
56
  const prevDefaultValue = React.usePrevious(defaultValue);
57
- const [state,setState] = React.useStateIfMounted({
57
+ const [state,setState] = React.useState({
58
58
  visible : false,
59
59
  ...parseTime(defaultValue,withSeconds),
60
60
  })
@@ -308,7 +308,7 @@ DialogComponent.propTypes= {
308
308
 
309
309
 
310
310
  export const DialogControlledComponent = React.forwardRef(({visible:dVisible,...props},ref)=>{
311
- const [visible,setVisible] = React.useStateIfMounted(defaultBool(dVisible,false));
311
+ const [visible,setVisible] = React.useState(defaultBool(dVisible,false));
312
312
  const {onDismiss,onClose,onVisibilityChanged,...rest} = props;
313
313
  React.useEffect(()=>{
314
314
  if(typeof dVisible =='boolean' && dVisible !== visible){
@@ -11,7 +11,7 @@ export default function ExpandableItem(props){
11
11
  let {children,expanded,expandedIcon,testID,minimized,onPress,expandIconProps,unexpandedIcon,onToggleExpand,wrapperProps,...rest} = props;
12
12
  testID = defaultStr(testID,"RN_ExpandableDrawerItemComponent")
13
13
  wrapperProps = defaultObj(wrapperProps);
14
- const [expandedControled,setExpended] = React.useStateIfMounted(defaultBool(expanded,false))
14
+ const [expandedControled,setExpended] = React.useState(defaultBool(expanded,false))
15
15
  let _expanded = expanded;
16
16
  if(!isBool(expanded)){
17
17
  _expanded = expandedControled;
@@ -91,7 +91,7 @@ const DrawerComponent = React.forwardRef((props,ref)=>{
91
91
  if(minimized === undefined){
92
92
  minimized = false;
93
93
  }
94
- const [state,_setState] = React.useStateIfMounted({
94
+ const [state,_setState] = React.useState({
95
95
  minimized,
96
96
  permanent,
97
97
  });
@@ -605,7 +605,7 @@ class DropdownComponent extends AppComponent {
605
605
  }
606
606
  UNSAFE_componentWillReceiveProps(nextProps){
607
607
  const {items,defaultValue,selected} = nextProps;
608
- if(items !== this.props.items){
608
+ if(!React.areEquals(items,this.props.items)){
609
609
  const nState = this.prepareItems({items,defaultValue,selected});
610
610
  return this.updateSelected(nState);
611
611
  }
@@ -983,6 +983,9 @@ class DropdownComponent extends AppComponent {
983
983
  const ListComponent = isBigList ? BigList : List;
984
984
  const autoFocus = canAutoFocusSearchField({visible,items:renderingItems});
985
985
  dialogProps = defaultObj(dialogProps);
986
+ if(this.props.name =="RG_Compta"){
987
+ restProps.testMeCompta = true;
988
+ }
986
989
  return (
987
990
  <Fragment>
988
991
  {!withBottomSheet && isMob && anchor}
@@ -125,7 +125,7 @@ const FabGroupComponent = React.forwardRef((props,innerRef)=>{
125
125
  const fabIdRef = React.useRef(defaultStr(fabId,uniqid("fab-id-ref")));
126
126
  fabId = fabIdRef.current;
127
127
  const isMountedRef = React.useRef(false);
128
- const [state, setState] = React.useStateIfMounted({
128
+ const [state, setState] = React.useState({
129
129
  open: typeof customOpen =='boolean'? customOpen : false,
130
130
  display : typeof customDisplay ==='boolean'? customDisplay : true,
131
131
  });
@@ -89,8 +89,8 @@ export const getFilterComponentProps = (_props)=>{
89
89
  } else if(type == 'switch' || type =='radio' || type ==='checkbox') {
90
90
  type = 'select';
91
91
  let {checkedLabel,checkedTooltip,uncheckedTooltip,checkedValue,uncheckedLabel,uncheckedValue,...pR} = props;
92
- checkedLabel = defaultVal(checkedLabel,'Non')
93
- uncheckedLabel = defaultVal(uncheckedLabel,'Oui')
92
+ checkedLabel = defaultVal(checkedLabel,'Oui')
93
+ uncheckedLabel = defaultVal(uncheckedLabel,'Non')
94
94
  checkedValue = defaultVal(checkedValue,1); uncheckedValue = defaultVal(uncheckedValue,0)
95
95
  props = pR;
96
96
  props.items = [{code:checkedValue,label:checkedLabel},{code:uncheckedValue,label:uncheckedLabel}];
@@ -10,7 +10,7 @@ const Checkbox = React.forwardRef((props,ref)=>{
10
10
  const {checked:customChecked,color:customColor,primary,secondary,primaryOnCheck,secondaryOnCheck,onChange,checkedIcon:customCheckedIcon,uncheckedIcon:customUncheckedIcon,onPress,...rest} = props;
11
11
  const checkedIcon = defaultStr(checkedIcon,CHECKED_ICON);
12
12
  const uncheckedIcon = defaultStr(uncheckedIcon,UNCHECKED_ICON);
13
- const [checked,setIsChecked] = React.useStateIfMounted(!!checked);
13
+ const [checked,setIsChecked] = React.useState(!!checked);
14
14
  const isMounted = React.useIsMounted();
15
15
  const prevChecked = React.usePrevious(checked);
16
16
  const callOnChangeRef = React.useRef(true);
@@ -26,7 +26,7 @@ const Checkbox = React.forwardRef((props,ref)=>{
26
26
  onChange({value:checked?1:0,checked});
27
27
  }
28
28
  },[checked])
29
- const [context] = React.useStateIfMounted({
29
+ const [context] = React.useState({
30
30
  check : (callOnChange)=>{
31
31
  if(!isMounted()) return;
32
32
  if(typeof callOnChange =='boolean'){
@@ -9,7 +9,7 @@ import Dialog from "$ecomponents/Dialog";
9
9
  const ImageEditorComponent = React.forwardRef((props,ref)=>{
10
10
  let {source,dialogProps,visible,imageProps,...rest} = props;
11
11
  const isMounted = React.useIsMounted();
12
- const [context] = React.useStateIfMounted({});
12
+ const [context] = React.useState({});
13
13
  imageProps = defaultObj(imageProps);
14
14
  dialogProps = defaultObj(dialogProps);
15
15
  context.dialogRef = React.useRef(null);
@@ -7,11 +7,11 @@ import {defaultObj} from "$utils";
7
7
  const ImageEditorComponent = React.forwardRef((props,ref)=>{
8
8
  let {source,uri,onSuccess,imageUri,lockAspectRatio,dialogProps,onDismiss,visible,imageProps,...rest} = props;
9
9
  const isMounted = React.useIsMounted();
10
- const [context] = React.useStateIfMounted({});
10
+ const [context] = React.useState({});
11
11
  imageProps = defaultObj(imageProps);
12
12
  dialogProps = defaultObj(dialogProps);
13
13
  context.dialogRef = React.useRef(null);
14
- const [imageData,setImageData] = React.useStateIfMounted(null);
14
+ const [imageData,setImageData] = React.useState(null);
15
15
 
16
16
 
17
17
  return <View style={[styles.container]}>
@@ -113,7 +113,7 @@ LabelComponentExported.propTypes = {
113
113
  export default LabelComponentExported;
114
114
 
115
115
  LabelComponentExported.withRef = React.forwardRef((props,ref)=>{
116
- const [state,setState] = React.useStateIfMounted({
116
+ const [state,setState] = React.useState({
117
117
  children : props.children,
118
118
  });
119
119
  const context = {
@@ -30,7 +30,7 @@ const MenuComponent = React.forwardRef((props,ref)=>{
30
30
  testID = defaultStr(testID,"RN_MenuComponent");
31
31
  anchorProps.testID = defaultStr(anchorProps.testID,testID+"_Anchor");
32
32
  menuProps = defaultObj(menuProps);
33
- const [visible, setVisible] = React.useStateIfMounted(false);
33
+ const [visible, setVisible] = React.useState(false);
34
34
  const prevSibible = React.usePrevious(visible);
35
35
  const openMenu = (event,callback) => {
36
36
  if(callback === true && typeof onAnchorPress ==='function' && onAnchorPress(event) ===false){
@@ -92,7 +92,7 @@ const ModalComponent = React.forwardRef((props,ref)=>{
92
92
  removeListeners();
93
93
  }
94
94
  setTimeout(()=>{
95
- if(prevVisible.current ===visible) return;
95
+ if(prevVisible ===visible) return;
96
96
  if(visible){
97
97
  if(onShow){
98
98
  onShow();
@@ -61,7 +61,7 @@ export default function PhoneInputComponent(props){
61
61
  contentContainerProps = defaultObj(contentContainerProps);
62
62
  contentContainerProps.style = [styles.inputContainer,contentContainerProps.style];
63
63
  const ref = React.useRef(null);
64
- const [state,setState] = React.useStateIfMounted({
64
+ const [state,setState] = React.useState({
65
65
  visible : false,
66
66
  ...prepareState({defaultValue,country})
67
67
  })
@@ -55,7 +55,7 @@ const RadioComponent = React.forwardRef((props,ref)=>{
55
55
  }
56
56
  delete p.checked;
57
57
  defaultValue = defaultVal(defaultValue,value,0);
58
- const [status,setStatus] = React.useStateIfMounted(defaultValue == checkedValue ? checkedStatus : uncheckedStatus)
58
+ const [status,setStatus] = React.useState(defaultValue == checkedValue ? checkedStatus : uncheckedStatus)
59
59
  const previousStatus = React.usePrevious(status);
60
60
  const checked = status===checkedStatus?true:false;
61
61
  if(checked){
@@ -255,7 +255,7 @@ const SimpleSelect = React.forwardRef((props,ref)=>{
255
255
  />
256
256
  const inputRef = React.useRef(null);
257
257
  const canFilter = !props.disabled && !props.readOnly && props.editable !== false && visible;
258
- const [filterText,setFilterText] = React.useStateIfMounted("");
258
+ const [filterText,setFilterText] = React.useState("");
259
259
  let filterRegex = undefined;
260
260
  if(canFilter && isNonNullString(filterText)){
261
261
  filterRegex = new RegExp(filterText.replace(matchOperators, '\\$&'), 'gi');
@@ -45,7 +45,7 @@ const SliderComponent = React.forwardRef((props,ref)=>{
45
45
  valueProps = defaultObj(valueProps);
46
46
  contentProps = defaultObj(contentProps);
47
47
  const defVal = prepareValue({value,defaultValue});
48
- const [sValue,setSValue] = React.useStateIfMounted(defVal)
48
+ const [sValue,setSValue] = React.useState(defVal)
49
49
  const prevValue = React.usePrevious(isArray(sValue) && isDecimal(sValue[0])? sValue[0]:sValue);
50
50
  React.useEffect(()=>{
51
51
  const value = isArray(sValue) && isDecimal(sValue[0]) ? sValue[0] : isDecimal(sValue)? sValue : undefined;
@@ -59,7 +59,7 @@ const SwitchComponent = React.forwardRef((props,ref)=>{
59
59
  defaultValue = on ?checkedValue : uncheckedValue;
60
60
  }
61
61
  defaultValue = defaultVal(defaultValue,value,0);
62
- const [isSwitchOn,setIsSwitchOn] = React.useStateIfMounted(defaultValue == checkedValue ? true : false)
62
+ const [isSwitchOn,setIsSwitchOn] = React.useState(defaultValue == checkedValue ? true : false)
63
63
  const toggleIsSwitchOn = (a)=> {
64
64
  if(typeof onPress ==='function' && onPress(a) === false){
65
65
  return;
@@ -0,0 +1,18 @@
1
+ // Copyright 2023 @fto-consult/Boris Fouomene. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style
3
+ // license that can be found in the LICENSE file.
4
+ import React from "$react";
5
+ import { View } from "react-native";
6
+ import PropTypes from "prop-types";
7
+ export default function TableFiltersComponent({visible,children:cChildren,...rest}){
8
+ const children = React.useMemo(()=>{
9
+ return cChildren;
10
+ },[cChildren]);
11
+ return <View {...rest} style={[rest.style,!visible && {height:0,opacity:0,display:'none'}]}>
12
+ {children}
13
+ </View>
14
+ }
15
+
16
+ TableFiltersComponent.propTypes = {
17
+ visible : PropTypes.bool,
18
+ }
@@ -7,11 +7,13 @@ import Label from "$ecomponents/Label";
7
7
  import { StyleSheet,View as RNView,ScrollView,Dimensions} from "react-native";
8
8
  import { getRowStyle } from "$ecomponents/Datagrid/utils";
9
9
  import {isMobileNative} from "$cplatform";
10
+ import {isMobileMedia} from "$dimensions";
10
11
  import theme from "$theme";
11
12
  import AbsoluteScrollView from "./AbsoluteScrollView";
12
13
  import Cell from "./Cell";
13
14
  import Row from "./Row";
14
15
  import List from "./List";
16
+ import FiltersOrFooters from "./FiltersOrFooters";
15
17
  const isSCrollingRef = React.createRef();
16
18
  const scrollLists = (opts,refs)=>{
17
19
  refs.map((ref)=>{
@@ -57,7 +59,7 @@ const TableComponent = React.forwardRef(({containerProps,sortedColumn,listContai
57
59
  const emptyData = renderListContent === false ?null : typeof renderEmpty =='function' && !Object.size(data,true)? renderEmpty() : null;
58
60
  const hasEmptyData = emptyData && React.isValidElement(emptyData);
59
61
  const layoutRef = React.useRef({});
60
- React.useOnRender(onRender);
62
+
61
63
  const preparedColumns = React.useStableMemo(()=>{
62
64
  const cols = {},headers = {},footers = {},filters = {},vColumnsMapping = [],visibleColumns = [],columnsNames = [];
63
65
  let hasFooters = false;
@@ -151,10 +153,14 @@ const TableComponent = React.forwardRef(({containerProps,sortedColumn,listContai
151
153
  const prevData = React.usePrevious(data);
152
154
  const prevColumns = React.usePrevious(columns);
153
155
  const itemsRef = React.useRef(null);
156
+ const hasChangedDataRef = React.useRef(false);
157
+ hasChangedDataRef.current = false;
154
158
  const items = React.useMemo(()=>{
155
159
  if(data === prevData && prevColumns == columns && Array.isArray(itemsRef.current)){
160
+ hasChangedDataRef.current = false;
156
161
  return itemsRef.current;
157
162
  }
163
+ hasChangedDataRef.current = true;
158
164
  const items = [];
159
165
  const filter = typeof customFilter =='function'? customFilter : x=>true;
160
166
  data.map((item,index)=>{
@@ -230,15 +236,6 @@ const TableComponent = React.forwardRef(({containerProps,sortedColumn,listContai
230
236
  get headerScrollViewContext(){return headerScrollViewRef.current},
231
237
  }
232
238
  const showTableHeaders = showHeaders !== false || showFilters ;
233
- const hContent = showTableHeaders && headersContent.length ? <View testID={testID+"_Header"} {...headerContainerProps} style={[styles.header,headerContainerProps.style,footersContent.length]}>
234
- {headersContent}
235
- </View> : null,
236
- fContent = showTableHeaders && footersContent.length ? <View testID={testID+"_Footer"} {...footerContainerProps} style={[styles.header,styles.footers,footerContainerProps.style,theme.styles.pt0,theme.styles.pb0,theme.styles.ml0,theme.styles.mr0]}>
237
- {footersContent}
238
- </View> : null,
239
- filtersContent = fFilters.length ? <View testID={testID+"_Filters"} style={[styles.header,styles.footers,theme.styles.pt0,theme.styles.pb0,theme.styles.ml0,theme.styles.mr0]}>
240
- {fFilters}
241
- </View> : null
242
239
  const absoluteScrollViewRefCanScroll = React.useRef(true);
243
240
  React.setRef(tableRef,context);
244
241
  const cStyle = {width:listWidth}
@@ -254,6 +251,20 @@ const TableComponent = React.forwardRef(({containerProps,sortedColumn,listContai
254
251
  }
255
252
  }
256
253
  }
254
+ React.useOnRender((a,b,c)=>{
255
+ if(onRender){
256
+ onRender(a,b,c);
257
+ }
258
+ if(hasChangedDataRef.current){
259
+ if(headerScrollViewRef.current && headerScrollViewRef.current.scrollTo){
260
+ headerScrollViewRef.current.scrollTo({
261
+ x : 0,
262
+ y : 0,
263
+ animated : true,
264
+ })
265
+ }
266
+ }
267
+ });
257
268
  return <View testID= {testID+"_Container"} {...containerProps} onLayout={(e)=>{
258
269
  layoutRef.current = e.nativeEvent.layout;
259
270
  if(containerProps.onLayout){
@@ -266,7 +277,8 @@ const TableComponent = React.forwardRef(({containerProps,sortedColumn,listContai
266
277
  {...headerScrollViewProps}
267
278
  contentContainerStyle = {[allScrollViewProps.contentContainerStyle,headerScrollViewProps.contentContainerStyle,{flex:1,flexWrap: 'wrap'}]}
268
279
  style = {[allScrollViewProps.style,headerScrollViewProps.style,{height:'100%',flex:1,flexWrap:'wrap'}]}
269
- ref={headerScrollViewRef} horizontal {...allScrollViewProps}
280
+ ref={headerScrollViewRef}
281
+ horizontal {...allScrollViewProps}
270
282
  onScroll = {getOnScrollCb([scrollViewRef,footerScrollViewRef],null,(args)=>{
271
283
  return;
272
284
  const nativeEvent = args.nativeEvent;
@@ -275,9 +287,15 @@ const TableComponent = React.forwardRef(({containerProps,sortedColumn,listContai
275
287
  showsHorizontalScrollIndicator
276
288
  >
277
289
  <View testID={testID+"Header2FootersWrapper"} style={[theme.styles.w100]}>
278
- {hContent}
279
- {filtersContent}
280
- {fContent}
290
+ <FiltersOrFooters visible={!!(showTableHeaders && headersContent.length)} testID={testID+"_Header"} {...headerContainerProps} style={[styles.header,headerContainerProps.style,footersContent.length]}>
291
+ {headersContent}
292
+ </FiltersOrFooters>
293
+ <FiltersOrFooters visible = {!!fFilters.length} testID={testID+"_Filters"} style={[styles.header,styles.footers,theme.styles.pt0,theme.styles.pb0,theme.styles.ml0,theme.styles.mr0]}>
294
+ {fFilters}
295
+ </FiltersOrFooters>
296
+ <FiltersOrFooters visible={!!(showTableHeaders && footersContent.length)} testID={testID+"_Footer"} {...footerContainerProps} style={[styles.header,styles.footers,footerContainerProps.style,theme.styles.pt0,theme.styles.pb0,theme.styles.ml0,theme.styles.mr0]}>
297
+ {footersContent}
298
+ </FiltersOrFooters>
281
299
  </View>
282
300
  </ScrollView>
283
301
  </RNView>
@@ -126,7 +126,7 @@ const TextFieldComponent = React.forwardRef((componentProps,inputRef)=>{
126
126
  }
127
127
  }
128
128
  const isSecureText = type =="password"?true : false;
129
- const [secureTextEntry,setSecureTextEntry] = React.useStateIfMounted(isSecureText);
129
+ const [secureTextEntry,setSecureTextEntry] = React.useState(isSecureText);
130
130
  const prevSecureTextEntry = React.usePrevious(secureTextEntry);
131
131
  containerProps = defaultObj(containerProps);
132
132
  mode = defaultStr(mode,theme.textFieldMode);
@@ -138,7 +138,7 @@ const TextFieldComponent = React.forwardRef((componentProps,inputRef)=>{
138
138
  const isNormalMode = mode == normalMode ? true : false;
139
139
  const isFlatMode = mode == flatMode ? true : false;
140
140
 
141
- const [inputState, setInputState] = React.useStateIfMounted({
141
+ const [inputState, setInputState] = React.useState({
142
142
  focused : false,
143
143
  touched: false,
144
144
  });
@@ -152,7 +152,7 @@ const TextFieldComponent = React.forwardRef((componentProps,inputRef)=>{
152
152
  if((upper !== true && lower !== true) || isAndroid) return typeof t =='string'? t : "";
153
153
  return isNonNullString(t)? (upper ? t.toUpperCase() : lower ? t.toLowerCase():t) : ""
154
154
  };
155
- const [text, _setText] = React.useStateIfMounted(toCase(defaultValue));
155
+ const [text, _setText] = React.useState(toCase(defaultValue));
156
156
  const previousText = React.usePrevious(text);
157
157
 
158
158