@fto-consult/expo-ui 5.11.24 → 5.11.25
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/babel.config.js +1 -1
- package/package.json +23 -24
- package/readMe.md +1 -1
- package/src/auth/avatarProps/index.js +1 -1
- package/src/components/AppBar/Content.js +4 -4
- package/src/components/AppBar/index.js +39 -18
- package/src/components/BottomSheet/Sheet.js +1 -2
- package/src/components/Button/index.js +3 -3
- package/src/components/Checkbox/index.js +2 -3
- package/src/components/Chip/index.js +6 -6
- package/src/components/Color/ColorPicker.js +7 -7
- package/src/components/Color/index.js +5 -5
- package/src/components/Countries/Flag.js +1 -1
- package/src/components/Countries/SelectCountry.js +1 -1
- package/src/components/Datagrid/Common/Common.js +0 -1
- package/src/components/Datagrid/Common/utils.js +1 -2
- package/src/components/Date/DatePickerInput/index.js +4 -4
- package/src/components/Date/Time.js +3 -3
- package/src/components/Dialog/confirm/showConfirmOrAlertOrPrompt.js +1 -1
- package/src/components/DragResize/DragResizeBlock.js +3 -3
- package/src/components/Drawer/DrawerItems/_DrawerItem.js +1 -1
- package/src/components/Drawer/DrawerLayout/index.js +3 -3
- package/src/components/Dropdown/index.js +9 -17
- package/src/components/Expandable/index.js +4 -4
- package/src/components/Fab/GroupComponent.js +6 -7
- package/src/components/Filter/BetweenComponent.js +1 -1
- package/src/components/Filter/index.js +1 -1
- package/src/components/Form/Fields/Field.js +7 -16
- package/src/components/Form/Fields/IdField.js +1 -1
- package/src/components/Form/Fields/SelectTableData/Component.js +1 -1
- package/src/components/Form/FormData/FormData.js +1 -1
- package/src/components/Form/List/List.js +15 -15
- package/src/components/Grid/Cell.js +1 -1
- package/src/components/HeavyScreen/index.js +5 -8
- package/src/components/Icon/Icon.js +13 -5
- package/src/components/Icon/IconButton.js +1 -1
- package/src/components/Image/index.js +6 -7
- package/src/components/Label/index.js +4 -4
- package/src/components/Menu/Item.js +1 -1
- package/src/components/Menu/Menu.js +5 -5
- package/src/components/Modal/index.js +6 -6
- package/src/components/PhoneInput/index.js +3 -3
- package/src/components/Radio/index.js +2 -3
- package/src/components/SelectCurrency/Format.js +3 -4
- package/src/components/SelectCurrency/index.js +3 -3
- package/src/components/SimpleSelect/index.js +6 -9
- package/src/components/Slider/index.js +2 -3
- package/src/components/Snackbar/index.js +1 -1
- package/src/components/SplashScreen/index.js +1 -1
- package/src/components/Switch/index.js +3 -4
- package/src/components/Tab/TabItem.js +1 -1
- package/src/components/TextField/index.js +18 -21
- package/src/components/Tooltip/Popover/index.web.js +1 -1
- package/src/components/Tooltip/index.js +1 -1
- package/src/index.js +2 -1
- package/src/layouts/ProfilAvatar/index.js +2 -2
- package/src/layouts/Screen/ScreenWithOrWithoutAuthContainer.js +1 -1
- package/src/layouts/Screen/TableData.js +1 -1
- package/src/screens/ScreenWrapper.js +1 -1
- package/src/components/Chart/appexChart/index.html +0 -30
package/babel.config.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fto-consult/expo-ui",
|
|
3
|
-
"version": "5.11.
|
|
3
|
+
"version": "5.11.25",
|
|
4
4
|
"description": "Bibliothèque de composants UI Expo,react-native",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -59,14 +59,14 @@
|
|
|
59
59
|
"homepage": "https://github.com/borispipo/expo-ui#readme",
|
|
60
60
|
"dependencies": {
|
|
61
61
|
"@emotion/native": "^11.11.0",
|
|
62
|
-
"@expo/html-elements": "^0.
|
|
62
|
+
"@expo/html-elements": "^0.5.1",
|
|
63
63
|
"@expo/vector-icons": "^13.0.0",
|
|
64
|
-
"@fto-consult/common": "^3.18.
|
|
64
|
+
"@fto-consult/common": "^3.18.32",
|
|
65
65
|
"@gorhom/portal": "^1.0.14",
|
|
66
66
|
"@pchmn/expo-material3-theme": "^1.0.1",
|
|
67
|
-
"@react-native-async-storage/async-storage": "
|
|
68
|
-
"@react-native-community/datetimepicker": "
|
|
69
|
-
"@react-native-community/netinfo": "
|
|
67
|
+
"@react-native-async-storage/async-storage": "1.18.2",
|
|
68
|
+
"@react-native-community/datetimepicker": "7.2.0",
|
|
69
|
+
"@react-native-community/netinfo": "9.3.10",
|
|
70
70
|
"@react-native/assets-registry": "^0.72.0",
|
|
71
71
|
"@react-navigation/native": "^6.1.6",
|
|
72
72
|
"@react-navigation/native-stack": "^6.9.12",
|
|
@@ -76,12 +76,12 @@
|
|
|
76
76
|
"expo-camera": "^13.2.1",
|
|
77
77
|
"expo-clipboard": "^4.1.2",
|
|
78
78
|
"expo-font": "^11.1.1",
|
|
79
|
-
"expo-image-picker": "
|
|
80
|
-
"expo-linking": "
|
|
81
|
-
"expo-sqlite": "
|
|
82
|
-
"expo-status-bar": "
|
|
83
|
-
"expo-system-ui": "
|
|
84
|
-
"expo-web-browser": "
|
|
79
|
+
"expo-image-picker": "~14.3.1",
|
|
80
|
+
"expo-linking": "~5.0.2",
|
|
81
|
+
"expo-sqlite": "~11.3.1",
|
|
82
|
+
"expo-status-bar": "~1.6.0",
|
|
83
|
+
"expo-system-ui": "~2.4.0",
|
|
84
|
+
"expo-web-browser": "~12.3.2",
|
|
85
85
|
"file-saver": "^2.0.5",
|
|
86
86
|
"fs-extra": "^11.1.1",
|
|
87
87
|
"google-libphonenumber": "^3.2.32",
|
|
@@ -91,29 +91,28 @@
|
|
|
91
91
|
"react": "^18.2.0",
|
|
92
92
|
"react-content-loader": "^6.2.1",
|
|
93
93
|
"react-dom": "^18.2.0",
|
|
94
|
-
"react-native": "
|
|
94
|
+
"react-native": "0.72.1",
|
|
95
95
|
"react-native-big-list": "^1.6.1",
|
|
96
|
-
"react-native-blob-util": "^0.
|
|
97
|
-
"react-native-gesture-handler": "~2.
|
|
96
|
+
"react-native-blob-util": "^0.18.3",
|
|
97
|
+
"react-native-gesture-handler": "~2.12.0",
|
|
98
98
|
"react-native-iphone-x-helper": "^1.3.1",
|
|
99
99
|
"react-native-mime-types": "^2.3.0",
|
|
100
100
|
"react-native-paper": "^5.9.1",
|
|
101
101
|
"react-native-paper-dates": "^0.18.12",
|
|
102
|
-
"react-native-reanimated": "~
|
|
103
|
-
"react-native-safe-area-context": "
|
|
104
|
-
"react-native-screens": "^3.
|
|
105
|
-
"react-native-svg": "13.
|
|
106
|
-
"react-native-web": "~0.
|
|
107
|
-
"react-native-webview": "
|
|
102
|
+
"react-native-reanimated": "~3.3.0",
|
|
103
|
+
"react-native-safe-area-context": "4.6.3",
|
|
104
|
+
"react-native-screens": "^3.22.1",
|
|
105
|
+
"react-native-svg": "13.9.0",
|
|
106
|
+
"react-native-web": "~0.19.6",
|
|
107
|
+
"react-native-webview": "13.2.2",
|
|
108
|
+
"react-navigation": "^4.4.4",
|
|
108
109
|
"react-virtuoso": "^4.3.11",
|
|
109
|
-
"sharp-cli": "^
|
|
110
|
+
"sharp-cli": "^4.1.1",
|
|
110
111
|
"tippy.js": "^6.3.7",
|
|
111
112
|
"websql": "^2.0.3",
|
|
112
113
|
"xlsx": "^0.18.5"
|
|
113
114
|
},
|
|
114
115
|
"devDependencies": {
|
|
115
|
-
"@babel/plugin-proposal-export-namespace-from": "^7.18.9",
|
|
116
|
-
"@babel/preset-react": "^7.18.6",
|
|
117
116
|
"@expo/metro-config": "^0.7.1",
|
|
118
117
|
"@expo/webpack-config": "^18.0.1",
|
|
119
118
|
"babel-plugin-inline-dotenv": "^1.7.0",
|
package/readMe.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
## Installation des dépendences, packages de dévéloppement
|
|
2
2
|
|
|
3
3
|
```javascript
|
|
4
|
-
npm i --D @babel/
|
|
4
|
+
npm i --D @babel/preset-react babel-plugin-inline-dotenv babel-plugin-module-resolver babel-plugin-transform-inline-environment-variables @expo/metro-config @expo/webpack-config
|
|
5
5
|
```
|
|
6
6
|
|
|
7
7
|
## **#ELECTRON**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from '$react';
|
|
2
|
-
import {Platform,StyleSheet,
|
|
2
|
+
import {Platform,StyleSheet,Pressable,View} from 'react-native';
|
|
3
3
|
import Label from "$ecomponents/Label";
|
|
4
4
|
import theme,{Colors,StyleProp} from "$theme";
|
|
5
5
|
import PropTypes from "prop-types";
|
|
@@ -30,7 +30,7 @@ const AppbarContent = React.forwardRef(({
|
|
|
30
30
|
const subtitleColor = Colors.setAlpha(titleTextColor,0.7);
|
|
31
31
|
|
|
32
32
|
return (
|
|
33
|
-
<
|
|
33
|
+
<Pressable testID={testID+"_Container"} {...defaultObj(containerProps)} onPress={onPress} disabled={!onPress}>
|
|
34
34
|
<View
|
|
35
35
|
pointerEvents="box-none"
|
|
36
36
|
style={[styles.container, style]}
|
|
@@ -54,7 +54,7 @@ const AppbarContent = React.forwardRef(({
|
|
|
54
54
|
numberOfLines={1}
|
|
55
55
|
accessible
|
|
56
56
|
// @ts-ignore Type '"heading"' is not assignable to type ...
|
|
57
|
-
|
|
57
|
+
role={Platform.OS === 'web' ? 'heading' : 'header'}
|
|
58
58
|
>
|
|
59
59
|
{title}
|
|
60
60
|
</Label>
|
|
@@ -69,7 +69,7 @@ const AppbarContent = React.forwardRef(({
|
|
|
69
69
|
</Label>
|
|
70
70
|
) : null}
|
|
71
71
|
</View>
|
|
72
|
-
</
|
|
72
|
+
</Pressable>
|
|
73
73
|
);
|
|
74
74
|
});
|
|
75
75
|
|
|
@@ -7,7 +7,7 @@ import theme,{Colors,flattenStyle} from "$theme";
|
|
|
7
7
|
import {StyleSheet} from "react-native";
|
|
8
8
|
import {goBack as navGoBack,useNavigation,useRoute,useScreenOptions } from "$cnavigation";
|
|
9
9
|
import PropTypes from "prop-types";
|
|
10
|
-
import { Dimensions,View,
|
|
10
|
+
import { Dimensions,View,Pressable} from "react-native";
|
|
11
11
|
import Content from "./Content";
|
|
12
12
|
import Icon from "$ecomponents/Icon";
|
|
13
13
|
import {Elevations} from "$ecomponents/Surface";
|
|
@@ -81,9 +81,9 @@ const AppBarComponent = React.forwardRef((props,ref)=> {
|
|
|
81
81
|
}
|
|
82
82
|
backAction = React.isValidElement(backAction)? backAction : null;
|
|
83
83
|
if(!backAction && BackActionComponent){
|
|
84
|
-
backAction = <BackActionComponent back={options.back} ref={backActionRef} {...backActionProps} onPress={onBackActionPress} />
|
|
84
|
+
backAction = <BackActionComponent containerColor="transparent" testID="RN_AppBarBackAction" back={options.back} ref={backActionRef} {...backActionProps} onPress={onBackActionPress} />
|
|
85
85
|
} else if(backAction){
|
|
86
|
-
backAction = <
|
|
86
|
+
backAction = <Pressable
|
|
87
87
|
{...backActionProps}
|
|
88
88
|
ref = {backActionRef}
|
|
89
89
|
onPress={onBackActionPress}
|
|
@@ -114,23 +114,30 @@ const AppBarComponent = React.forwardRef((props,ref)=> {
|
|
|
114
114
|
titleProps = defaultObj(titleProps);
|
|
115
115
|
React.setRef(ref,context);
|
|
116
116
|
testID = defaultStr(testID,"RN_AppBarComponent")
|
|
117
|
+
const renderedActions = renderSplitedActions(splitedActions,{
|
|
118
|
+
...defaultObj(menuProps,appBarProps.menuProps),
|
|
119
|
+
anchorProps : {
|
|
120
|
+
style : anchorStyle,
|
|
121
|
+
color : anchorStyle.color,
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
const renderedRight = React.isValidElement(rightContent) && rightContent || right;
|
|
125
|
+
const hasRight = React.isValidElement(renderedActions) || React.isValidElement(renderedRight);
|
|
117
126
|
return (
|
|
118
127
|
<Appbar.Header elevation={elevation} {...appBarProps} testID={testID} style={[styles.header,{backgroundColor},elevStyle,appBarProps.style]} onLayout={onPageResize}>
|
|
119
|
-
{
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
})}
|
|
133
|
-
{React.isValidElement(rightContent) && rightContent || right}
|
|
128
|
+
<View style={styles.title2Back} testID={testID+"_AppBarBack2Titlte"}>
|
|
129
|
+
{backAction}
|
|
130
|
+
<Content {...defaultObj(appBarProps.contentProps)}
|
|
131
|
+
title={title}
|
|
132
|
+
titleProps = {{...titleProps,style:[styles.title,{color:primaryText},titleProps.style]}}
|
|
133
|
+
subtitle = {defaultVal(subtitle,params.subtitle,options.subtitle)}
|
|
134
|
+
subtitleProps = {subtitleProps}
|
|
135
|
+
/>
|
|
136
|
+
</View>
|
|
137
|
+
{hasRight ? <View testID={testID+"_Actions"} style={styles.actions2right}>
|
|
138
|
+
{renderedActions}
|
|
139
|
+
{renderedRight}
|
|
140
|
+
</View> : null}
|
|
134
141
|
</Appbar.Header>
|
|
135
142
|
);
|
|
136
143
|
});
|
|
@@ -144,9 +151,23 @@ const styles = StyleSheet.create({
|
|
|
144
151
|
fontSize : TITLE_FONT_SIZE,
|
|
145
152
|
fontWeight : 'bold'
|
|
146
153
|
},
|
|
154
|
+
title2Back : {
|
|
155
|
+
flexDirection : "row",
|
|
156
|
+
justifyContent : "start",
|
|
157
|
+
alignItems : "center",
|
|
158
|
+
},
|
|
159
|
+
actions2right : {
|
|
160
|
+
flexDirection : "row",
|
|
161
|
+
justifyContent : "start",
|
|
162
|
+
alignItems : "center",
|
|
163
|
+
},
|
|
147
164
|
header : {
|
|
148
165
|
paddingHorizontal : 5,
|
|
149
166
|
paddingRight : 10,
|
|
167
|
+
justifyContent : "space-between",
|
|
168
|
+
alignItems : "center",
|
|
169
|
+
flexDirection : "row",
|
|
170
|
+
w : "100%"
|
|
150
171
|
},
|
|
151
172
|
})
|
|
152
173
|
|
|
@@ -17,9 +17,8 @@ import View from "$ecomponents/View";
|
|
|
17
17
|
import {Easing} from "react-native";
|
|
18
18
|
import Portal from "$ecomponents/Portal";
|
|
19
19
|
import { ScrollView } from "react-native";
|
|
20
|
-
|
|
20
|
+
import BackHandler from "$ecomponents/BackHandler";
|
|
21
21
|
import {
|
|
22
|
-
BackHandler,
|
|
23
22
|
TouchableOpacity,
|
|
24
23
|
Animated,
|
|
25
24
|
PanResponder,
|
|
@@ -50,7 +50,7 @@ const ButtonComponent = React.forwardRef((prs,ref) => {
|
|
|
50
50
|
accessible,
|
|
51
51
|
backgroundColor,
|
|
52
52
|
borderColor,
|
|
53
|
-
|
|
53
|
+
role,
|
|
54
54
|
contentContainerProps,
|
|
55
55
|
loadingProps,
|
|
56
56
|
rounded,
|
|
@@ -243,7 +243,7 @@ const ButtonComponent = React.forwardRef((prs,ref) => {
|
|
|
243
243
|
// @ts-expect-error We keep old a11y props for backwards compat with old RN versions
|
|
244
244
|
accessibilityTraits={disabled ? ['button', 'disabled'] : 'button'}
|
|
245
245
|
accessibilityComponentType="button"
|
|
246
|
-
|
|
246
|
+
role={disabled?role || "button":undefined}
|
|
247
247
|
accessibilityState={{ disabled }}
|
|
248
248
|
accessible={accessible}
|
|
249
249
|
disabled={disabled}
|
|
@@ -254,7 +254,7 @@ const ButtonComponent = React.forwardRef((prs,ref) => {
|
|
|
254
254
|
>
|
|
255
255
|
<View testID={testID+"_Content"} {...contentProps} style={[styles.content, contentStyle,noPadding && theme.styles.noPadding,noMargin && theme.styles.noMargin]}>
|
|
256
256
|
{React.isValidElement(left)? left : typeof left =='function' ?left(leftRProps):null}
|
|
257
|
-
{icon && isLoading !== true ? (
|
|
257
|
+
{icon && isLoading !== true && false ? (
|
|
258
258
|
<View style={[iconStyle,{color:textColor},iconProps.style]} testID={testID+"_IconContainer"}>
|
|
259
259
|
{React.isValidElement(icon)?icon : <Icon
|
|
260
260
|
testID={testID+"_Icon"}
|
|
@@ -37,7 +37,6 @@ const CheckboxComponent = React.forwardRef((props,ref)=>{
|
|
|
37
37
|
labelStyle,
|
|
38
38
|
helperText,
|
|
39
39
|
position,
|
|
40
|
-
editable,
|
|
41
40
|
disabled,
|
|
42
41
|
readOnly,
|
|
43
42
|
primaryOnCheck,
|
|
@@ -48,7 +47,7 @@ const CheckboxComponent = React.forwardRef((props,ref)=>{
|
|
|
48
47
|
...p
|
|
49
48
|
} = props;
|
|
50
49
|
disabled = defaultBool(disabled,false);
|
|
51
|
-
const isEditable = !disabled && readOnly !== true
|
|
50
|
+
const isEditable = !disabled && readOnly !== true ? true : false;
|
|
52
51
|
const pointerEvents = isEditable ? "auto" : "none";
|
|
53
52
|
p = defaultObj(p);
|
|
54
53
|
checkedValue = defaultVal(checkedValue,1);
|
|
@@ -124,7 +123,7 @@ const CheckboxComponent = React.forwardRef((props,ref)=>{
|
|
|
124
123
|
{...p}
|
|
125
124
|
testID = {testID}
|
|
126
125
|
disabled = {disabled}
|
|
127
|
-
|
|
126
|
+
readOnly = {!isEditable}
|
|
128
127
|
pointerEvents = {pointerEvents}
|
|
129
128
|
style = {[styles.checkbox,style]}
|
|
130
129
|
position = {position}
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
Animated,
|
|
5
5
|
Platform,
|
|
6
6
|
StyleSheet,
|
|
7
|
-
|
|
7
|
+
Pressable,
|
|
8
8
|
} from 'react-native';
|
|
9
9
|
import Icon from "$ecomponents/Icon";
|
|
10
10
|
import {Text,TouchableRipple } from 'react-native-paper';
|
|
@@ -131,7 +131,7 @@ const ChipComponent = React.forwardRef(({
|
|
|
131
131
|
// @ts-expect-error We keep old a11y props for backwards compat with old RN versions
|
|
132
132
|
accessibilityTraits={accessibilityTraits}
|
|
133
133
|
accessibilityComponentType="button"
|
|
134
|
-
|
|
134
|
+
role="button"
|
|
135
135
|
accessibilityState={accessibilityState}
|
|
136
136
|
testID={testID+"_Container"}
|
|
137
137
|
>
|
|
@@ -195,12 +195,12 @@ const ChipComponent = React.forwardRef(({
|
|
|
195
195
|
</TouchableRipple>
|
|
196
196
|
{onClose ? (
|
|
197
197
|
<View style={styles.closeButtonStyle} testID={testID+"_CloseButtonContainer"}>
|
|
198
|
-
<
|
|
198
|
+
<Pressable
|
|
199
199
|
onPress={onPress}
|
|
200
200
|
// @ts-expect-error We keep old a11y props for backwards compat with old RN versions
|
|
201
201
|
accessibilityTraits="button"
|
|
202
202
|
accessibilityComponentType="button"
|
|
203
|
-
|
|
203
|
+
role="button"
|
|
204
204
|
accessibilityLabel={closeIconAccessibilityLabel}
|
|
205
205
|
testID={testID+"_CloseButtonRipple"}
|
|
206
206
|
>
|
|
@@ -217,7 +217,7 @@ const ChipComponent = React.forwardRef(({
|
|
|
217
217
|
/>
|
|
218
218
|
)}
|
|
219
219
|
</View>
|
|
220
|
-
</
|
|
220
|
+
</Pressable>
|
|
221
221
|
</View>
|
|
222
222
|
) : null}
|
|
223
223
|
</Surface>
|
|
@@ -247,7 +247,7 @@ const styles = StyleSheet.create({
|
|
|
247
247
|
text: {
|
|
248
248
|
minHeight: 24,
|
|
249
249
|
lineHeight: 24,
|
|
250
|
-
|
|
250
|
+
verticalAlign: 'center',
|
|
251
251
|
marginVertical: 4,
|
|
252
252
|
},
|
|
253
253
|
avatar: {
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
Image,
|
|
8
8
|
PanResponder,
|
|
9
9
|
StyleSheet,
|
|
10
|
-
|
|
10
|
+
Pressable,
|
|
11
11
|
} from 'react-native';
|
|
12
12
|
|
|
13
13
|
import Elevations from '$ecomponents/Surface/Elevations';
|
|
@@ -399,20 +399,20 @@ export default class ColorPickerComponent extends Component {
|
|
|
399
399
|
renderSwatches () {
|
|
400
400
|
this.swatches = this.props.palette.map((c,i) => (
|
|
401
401
|
<View testID={"RN_ColorPicker_SWATCHES"} style={[styles.swatch,theme.styles.cursorPointer,{backgroundColor:c}]} key={'S'+i} hitSlop={this.props.swatchesHitSlop}>
|
|
402
|
-
<
|
|
402
|
+
<Pressable onPress={x=>this.onSwatchPress(c,i)} hitSlop={this.props.swatchesHitSlop}>
|
|
403
403
|
<Animated.View style={[styles.swatchTouch,{backgroundColor:c,transform:[{scale:this.swatchAnim[i].interpolate({inputRange:[0,0.5,1],outputRange:[0.666,1,0.666]})}]}]} />
|
|
404
|
-
</
|
|
404
|
+
</Pressable>
|
|
405
405
|
</View>
|
|
406
406
|
))
|
|
407
407
|
}
|
|
408
408
|
renderDiscs () {
|
|
409
409
|
this.disc = (`1`).repeat(this.props.discreteLength).split('').map((c,i) => (
|
|
410
410
|
<View testID={"RN_ColorPicker_DISC"} style={[styles.swatch,{backgroundColor:this.state.hueSaturation}]} key={'D'+i} hitSlop={this.props.swatchesHitSlop}>
|
|
411
|
-
<
|
|
411
|
+
<Pressable style={[theme.styles.cursorPointer]} onPress={x=>this.onDiscPress(c,i)} hitSlop={this.props.swatchesHitSlop}>
|
|
412
412
|
<Animated.View style={[styles.swatchTouch,{backgroundColor:this.state.hueSaturation,transform:[{scale:this.discAnim[i].interpolate({inputRange:[0,0.5,1],outputRange:[0.666,1,0.666]})}]}]}>
|
|
413
413
|
<View style={[styles.wheelImg,{backgroundColor:'#000',opacity:1-(i>=9?1:(i*11/100))}]}></View>
|
|
414
414
|
</Animated.View>
|
|
415
|
-
</
|
|
415
|
+
</Pressable>
|
|
416
416
|
</View>
|
|
417
417
|
)).reverse()
|
|
418
418
|
this.tryForceUpdate()
|
|
@@ -428,7 +428,7 @@ export default class ColorPickerComponent extends Component {
|
|
|
428
428
|
sliderHidden,
|
|
429
429
|
discrete,
|
|
430
430
|
disabled,
|
|
431
|
-
|
|
431
|
+
readOnly,
|
|
432
432
|
row,
|
|
433
433
|
testID : customTestId,
|
|
434
434
|
} = this.props
|
|
@@ -520,7 +520,7 @@ export default class ColorPickerComponent extends Component {
|
|
|
520
520
|
testID={`${testID}_ColorPickerInput`}
|
|
521
521
|
enableCopy
|
|
522
522
|
label = ''
|
|
523
|
-
|
|
523
|
+
readOnly = {readOnly}
|
|
524
524
|
disabled = {disabled}
|
|
525
525
|
defaultValue = {hex}
|
|
526
526
|
{...restProps}
|
|
@@ -10,11 +10,11 @@ import {isMobileOrTabletMedia} from "$cplatform/dimensions";
|
|
|
10
10
|
import {defaultStr,defaultObj} from "$cutils";
|
|
11
11
|
|
|
12
12
|
const ColorPickerComponent = React.forwardRef ((props,ref)=>{
|
|
13
|
-
let {defaultValue,label,rippleColor,onChange,text,containerProp,
|
|
13
|
+
let {defaultValue,label,rippleColor,onChange,text,containerProp,disabled,readOnly,...rest} = props;
|
|
14
14
|
containerProp = defaultObj(containerProp);
|
|
15
15
|
disabled = defaultBool(disabled,false);
|
|
16
16
|
readOnly = defaultBool(readOnly,false);
|
|
17
|
-
const isEditable = !disabled && readOnly !== true
|
|
17
|
+
const isEditable = !disabled && readOnly !== true ? true : false;
|
|
18
18
|
const pointerEvents = isEditable ? "auto" : "none";
|
|
19
19
|
const isMob = isMobileOrTabletMedia();
|
|
20
20
|
const _label = defaultStr(label,text);
|
|
@@ -69,7 +69,7 @@ const ColorPickerComponent = React.forwardRef ((props,ref)=>{
|
|
|
69
69
|
return <>
|
|
70
70
|
<TouchableOpacity
|
|
71
71
|
{...containerProp}
|
|
72
|
-
|
|
72
|
+
role="button"
|
|
73
73
|
disabled = {!isEditable}
|
|
74
74
|
pointerEvents = {pointerEvents}
|
|
75
75
|
accessibilityLabel={defaultStr(label,text)}
|
|
@@ -84,7 +84,7 @@ const ColorPickerComponent = React.forwardRef ((props,ref)=>{
|
|
|
84
84
|
mode = {mode}
|
|
85
85
|
ref = {ref}
|
|
86
86
|
label = {defaultVal(label,_label)}
|
|
87
|
-
|
|
87
|
+
readOnly = {true}
|
|
88
88
|
disabled = {disabled}
|
|
89
89
|
selectionColor = {selectionColor}
|
|
90
90
|
color = {selectionColor}
|
|
@@ -124,7 +124,7 @@ const ColorPickerComponent = React.forwardRef ((props,ref)=>{
|
|
|
124
124
|
color={color}
|
|
125
125
|
thumbSize={40}
|
|
126
126
|
disabled = {disabled}
|
|
127
|
-
|
|
127
|
+
readOnly = {!isEditable}
|
|
128
128
|
onColorChange={onColorChange}
|
|
129
129
|
onColorChangeComplete={onColorChangeComplete}
|
|
130
130
|
/>
|
|
@@ -39,7 +39,7 @@ export const getCountryFieldProps = (props)=>{
|
|
|
39
39
|
},
|
|
40
40
|
renderItem : ({item})=>{
|
|
41
41
|
return <View style={[styles.renderedImage]}>
|
|
42
|
-
{(isNonNullString(item.image) || isNumber(item.image)) && <Image
|
|
42
|
+
{(isNonNullString(item.image) || isNumber(item.image)) && <Image readOnly= {true} accessibilityIgnoresInvertColors {...imageProps} style={[styles.flagImage,{marginRight:10},imageProps.style]} source={isNumber(item.image)?item.image:{uri:item.image}}/>}
|
|
43
43
|
<Label>{item.label}</Label>
|
|
44
44
|
</View>
|
|
45
45
|
},
|
|
@@ -74,7 +74,6 @@ export const renderRowCell = (arg)=>{
|
|
|
74
74
|
multiple : undefined,
|
|
75
75
|
readOnly : undefined,
|
|
76
76
|
disabled : undefined,
|
|
77
|
-
editable : undefined,
|
|
78
77
|
data : rowData,
|
|
79
78
|
columnField,
|
|
80
79
|
}
|
|
@@ -116,7 +115,7 @@ export const renderRowCell = (arg)=>{
|
|
|
116
115
|
columnDef = defaultObj(columnDef)
|
|
117
116
|
columnDef = {...columnDef,...defaultObj(columnDef.datagrid)};
|
|
118
117
|
columnDef.size = defaultDecimal(columnDef.size,50);
|
|
119
|
-
columnDef.
|
|
118
|
+
columnDef.readOnly = defaultBool(columnDef.readOnly,true)
|
|
120
119
|
columnDef.rounded = defaultBool(columnDef.rounded,columnDef.round,true);
|
|
121
120
|
columnDef.src = rowData[columnField];
|
|
122
121
|
_render = <Image {...columnDef}/>
|
|
@@ -38,7 +38,7 @@ const DatePickerInput = React.forwardRef(({
|
|
|
38
38
|
left : customLeft,
|
|
39
39
|
helperText,
|
|
40
40
|
format,
|
|
41
|
-
disabled,readOnly
|
|
41
|
+
disabled,readOnly
|
|
42
42
|
,text,
|
|
43
43
|
withLabel,
|
|
44
44
|
style,
|
|
@@ -90,7 +90,7 @@ const DatePickerInput = React.forwardRef(({
|
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
|
|
93
|
-
const isEditable = disabled !== true && readOnly !== true
|
|
93
|
+
const isEditable = disabled !== true && readOnly !== true ?true : false;
|
|
94
94
|
withModal = defaultBool(withModal,true);
|
|
95
95
|
if(!isEditable){
|
|
96
96
|
withModal = false;
|
|
@@ -174,7 +174,7 @@ const DatePickerInput = React.forwardRef(({
|
|
|
174
174
|
affix = {false}
|
|
175
175
|
{...rest}
|
|
176
176
|
style = {[styles.input,style]}
|
|
177
|
-
|
|
177
|
+
readOnly = {!isEditable}
|
|
178
178
|
disabled = {disabled}
|
|
179
179
|
left = {left}
|
|
180
180
|
right = {right}
|
|
@@ -183,7 +183,7 @@ const DatePickerInput = React.forwardRef(({
|
|
|
183
183
|
label={labelText}
|
|
184
184
|
defaultValue={formattedValue}
|
|
185
185
|
placeholder={inputFormatLabel}
|
|
186
|
-
|
|
186
|
+
inputMode={'number-pad'}
|
|
187
187
|
mask={inputFormat}
|
|
188
188
|
keyboardAppearance={theme.dark ? 'dark' : 'default'}
|
|
189
189
|
error={hasError}
|
|
@@ -44,10 +44,10 @@ export const timeToString = (value,withSeconds)=>{
|
|
|
44
44
|
return value.substring(0,5);
|
|
45
45
|
}
|
|
46
46
|
export default function TimePickerComponent (props){
|
|
47
|
-
let {right:customRight,upper,anchorProps,dialogProps,withLabel,inputProps,containerProps,mode,onChange,withSeconds,cancelLabel,confirmLabel,label,text,upperCase,defaultValue,disabled,
|
|
47
|
+
let {right:customRight,upper,anchorProps,dialogProps,withLabel,inputProps,containerProps,mode,onChange,withSeconds,cancelLabel,confirmLabel,label,text,upperCase,defaultValue,disabled,withModal,readOnly,...rest} = props;
|
|
48
48
|
rest = defaultObj(rest);
|
|
49
49
|
inputProps = defaultObj(inputProps);
|
|
50
|
-
const isEditable = disabled !== true && readOnly !== true
|
|
50
|
+
const isEditable = disabled !== true && readOnly !== true?true : false;
|
|
51
51
|
withModal = defaultBool(withModal,true);
|
|
52
52
|
if(!isEditable){
|
|
53
53
|
withModal = false;
|
|
@@ -127,7 +127,7 @@ export default function TimePickerComponent (props){
|
|
|
127
127
|
label = {label}
|
|
128
128
|
right = {right}
|
|
129
129
|
disabled = {disabled}
|
|
130
|
-
|
|
130
|
+
readOnly = {true}
|
|
131
131
|
handleOpacity = {false}
|
|
132
132
|
style = {[rest.style,!disabled && {opacity:1,color:theme.colors.text}]}
|
|
133
133
|
contentContainerProps = {{...defaultObj(rest.contentContainerProps),pointerEvents:'auto'}}
|
|
@@ -8,7 +8,7 @@ import React, {Component} from 'react';
|
|
|
8
8
|
import {
|
|
9
9
|
Dimensions,
|
|
10
10
|
View,
|
|
11
|
-
|
|
11
|
+
Pressable,
|
|
12
12
|
} from 'react-native';
|
|
13
13
|
import PropTypes from 'prop-types';
|
|
14
14
|
|
|
@@ -713,7 +713,7 @@ export class DragResizeBlock extends Component {
|
|
|
713
713
|
},containerProps.style]}
|
|
714
714
|
testID = {testID}
|
|
715
715
|
>
|
|
716
|
-
<
|
|
716
|
+
<Pressable
|
|
717
717
|
onPress={this.onPress}
|
|
718
718
|
testID = {testID+"_TouchableFeedBack"}
|
|
719
719
|
>
|
|
@@ -727,7 +727,7 @@ export class DragResizeBlock extends Component {
|
|
|
727
727
|
>
|
|
728
728
|
{children}
|
|
729
729
|
</View>
|
|
730
|
-
</
|
|
730
|
+
</Pressable>
|
|
731
731
|
|
|
732
732
|
{isDisabled ? null : this.renderConnectors()}
|
|
733
733
|
|
|
@@ -81,7 +81,7 @@ const DrawerItem = ({icon,iconProps,borderRadius,color,minimized,contentContaine
|
|
|
81
81
|
// @ts-expect-error We keep old a11y props for backwards compat with old RN versions
|
|
82
82
|
accessibilityTraits={active ? ['button', 'selected'] : 'button'}
|
|
83
83
|
accessibilityComponentType="button"
|
|
84
|
-
|
|
84
|
+
role="button"
|
|
85
85
|
accessibilityState={{ selected: active }}
|
|
86
86
|
accessibilityLabel={accessibilityLabel}
|
|
87
87
|
>
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
Keyboard,
|
|
6
6
|
PanResponder,
|
|
7
7
|
StyleSheet,
|
|
8
|
-
|
|
8
|
+
Pressable,
|
|
9
9
|
I18nManager,
|
|
10
10
|
} from 'react-native';
|
|
11
11
|
import PropTypes from "prop-types";
|
|
@@ -174,7 +174,7 @@ export default class DrawerLayout extends React.PureComponent {
|
|
|
174
174
|
style={{ flex: 1, backgroundColor: 'transparent',flexDirection:permanent?'row':'column'}}
|
|
175
175
|
{...this._panResponder.panHandlers}
|
|
176
176
|
>
|
|
177
|
-
{!permanent && <
|
|
177
|
+
{!permanent && <Pressable
|
|
178
178
|
pointerEvents={pointerEvents}
|
|
179
179
|
testID = {testID+"_TouchableWithoutFeedBack"}
|
|
180
180
|
onPress={this._onOverlayClick}
|
|
@@ -185,7 +185,7 @@ export default class DrawerLayout extends React.PureComponent {
|
|
|
185
185
|
ref = {this._backdropRef}
|
|
186
186
|
style={[styles.overlay,{backgroundColor:theme.colors.backdrop}, animatedOverlayStyles]}
|
|
187
187
|
/>
|
|
188
|
-
</
|
|
188
|
+
</Pressable>}
|
|
189
189
|
{posRight && content}
|
|
190
190
|
<Animated.View
|
|
191
191
|
testID={testID+"_NavigationViewContainer"}
|