@fto-consult/expo-ui 5.11.24 → 5.12.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/babel.config.js +1 -1
- package/package.json +122 -123
- 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,123 +1,122 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@fto-consult/expo-ui",
|
|
3
|
-
"version": "5.
|
|
4
|
-
"description": "Bibliothèque de composants UI Expo,react-native",
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"publish1": "npm publish --access=public",
|
|
8
|
-
"unpublish": "npm -f unpublish @fto-consult/expo-ui",
|
|
9
|
-
"build-web": "",
|
|
10
|
-
"dev": "npx expo start -c --no-minify",
|
|
11
|
-
"start": "npx expo start --dev --no-minify",
|
|
12
|
-
"start-d": "npx expo start -c --no-dev --no-minify",
|
|
13
|
-
"start-p": "npm run start-d",
|
|
14
|
-
"expo-start-client": "npx expo start --dev --no-minify --dev-client",
|
|
15
|
-
"start-m": "npx expo start - c--dev--no -minify",
|
|
16
|
-
"android": "npx expo start --android -c",
|
|
17
|
-
"ios": "npx expo start --ios",
|
|
18
|
-
"web": "npx expo start --web",
|
|
19
|
-
"web-c": "npx expo start --web -c",
|
|
20
|
-
"eject": "expo eject",
|
|
21
|
-
"emulator": "npm run android-emulator",
|
|
22
|
-
"web-server": "npx serve web-build",
|
|
23
|
-
"build-android": "eas build --clear-cache -p android --profile preview",
|
|
24
|
-
"build-android-local": "eas build --platform android --local",
|
|
25
|
-
"build-android-dist": "eas build --clear-cache -p android",
|
|
26
|
-
"build-ios": "eas build --clear-cache -p ios --profile preview",
|
|
27
|
-
"build-ios-dist": "eas build --clear-cache -p ios",
|
|
28
|
-
"install-apk": "adb -s emulator-5554 install myapp.apk",
|
|
29
|
-
"android-emulator": "emulator -avd EMULATOR",
|
|
30
|
-
"flipper": "npx cross-env METRO_SERVER_PORT=19000 E:\\Studies\\react-native\\debugger\\Flipper-win\\Flipper.exe",
|
|
31
|
-
"test:build": "electron-webpack && electron-builder --dir -c.compression=store -c.mac.identity=null",
|
|
32
|
-
"compile-electron": "webpack --env platform=electron",
|
|
33
|
-
"compile-electron-p": "webpack --config ./electron/webpack.config.js --mode=production",
|
|
34
|
-
"electron": "electron ./electron",
|
|
35
|
-
"logcat": "adb -d logcat com.ftc.apps.salite1:E > errors.txt",
|
|
36
|
-
"logcat-export": "adb -d logcat com.ftc.apps.salite1 *:S > logcat.txt",
|
|
37
|
-
"electron-c": "npm run compile-electron && npm run electron",
|
|
38
|
-
"electron-p": "npm run compile-electron-p && npm run electron",
|
|
39
|
-
"update-app-version": "node ./update-app-version.js",
|
|
40
|
-
"find-licenses": "node ./find-licenses.js",
|
|
41
|
-
"fix-dependencies": "expo-cli doctor --fix-dependencies",
|
|
42
|
-
"delete-node-modules": "rimraf ./**/node_modules",
|
|
43
|
-
"modifier-url-remote-git": "git remote set-url origin 'https://borispipo@github.com/borispipo/smart-eneo.git'"
|
|
44
|
-
},
|
|
45
|
-
"bin": "./bin/index.js",
|
|
46
|
-
"repository": {
|
|
47
|
-
"type": "git",
|
|
48
|
-
"url": "git+https://github.com/borispipo/expo-ui.git"
|
|
49
|
-
},
|
|
50
|
-
"keywords": [
|
|
51
|
-
"Expo",
|
|
52
|
-
"React-Native"
|
|
53
|
-
],
|
|
54
|
-
"author": "Boris Fouomene",
|
|
55
|
-
"license": "ISC",
|
|
56
|
-
"bugs": {
|
|
57
|
-
"url": "https://github.com/borispipo/expo-ui/issues"
|
|
58
|
-
},
|
|
59
|
-
"homepage": "https://github.com/borispipo/expo-ui#readme",
|
|
60
|
-
"dependencies": {
|
|
61
|
-
"@emotion/native": "^11.11.0",
|
|
62
|
-
"@expo/html-elements": "^0.
|
|
63
|
-
"@expo/vector-icons": "^13.0.0",
|
|
64
|
-
"@fto-consult/common": "^3.18.
|
|
65
|
-
"@gorhom/portal": "^1.0.14",
|
|
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": "
|
|
70
|
-
"@react-native/assets-registry": "^0.72.0",
|
|
71
|
-
"@react-navigation/native": "^6.1.6",
|
|
72
|
-
"@react-navigation/native-stack": "^6.9.12",
|
|
73
|
-
"@shopify/flash-list": "
|
|
74
|
-
"apexcharts": "^3.41.0",
|
|
75
|
-
"expo": "^48.0.19",
|
|
76
|
-
"expo-camera": "
|
|
77
|
-
"expo-clipboard": "
|
|
78
|
-
"expo-font": "
|
|
79
|
-
"expo-image-picker": "
|
|
80
|
-
"expo-linking": "
|
|
81
|
-
"expo-sqlite": "
|
|
82
|
-
"expo-status-bar": "
|
|
83
|
-
"expo-system-ui": "
|
|
84
|
-
"expo-web-browser": "
|
|
85
|
-
"file-saver": "^2.0.5",
|
|
86
|
-
"fs-extra": "^11.1.1",
|
|
87
|
-
"google-libphonenumber": "^3.2.32",
|
|
88
|
-
"htmlparser2-without-node-native": "^3.9.2",
|
|
89
|
-
"process": "^0.11.10",
|
|
90
|
-
"prop-types": "^15.8.1",
|
|
91
|
-
"react": "^18.2.0",
|
|
92
|
-
"react-content-loader": "^6.2.1",
|
|
93
|
-
"react-dom": "^18.2.0",
|
|
94
|
-
"react-native": "
|
|
95
|
-
"react-native-big-list": "^1.6.1",
|
|
96
|
-
"react-native-blob-util": "^0.
|
|
97
|
-
"react-native-gesture-handler": "~2.9.0",
|
|
98
|
-
"react-native-iphone-x-helper": "^1.3.1",
|
|
99
|
-
"react-native-mime-types": "^2.3.0",
|
|
100
|
-
"react-native-paper": "^5.9.1",
|
|
101
|
-
"react-native-paper-dates": "^0.18.12",
|
|
102
|
-
"react-native-reanimated": "~2.14.4",
|
|
103
|
-
"react-native-safe-area-context": "
|
|
104
|
-
"react-native-screens": "
|
|
105
|
-
"react-native-svg": "13.4.0",
|
|
106
|
-
"react-native-web": "~0.18.
|
|
107
|
-
"react-native-webview": "
|
|
108
|
-
"react-
|
|
109
|
-
"
|
|
110
|
-
"
|
|
111
|
-
"
|
|
112
|
-
"
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
"@
|
|
117
|
-
"@expo/
|
|
118
|
-
"
|
|
119
|
-
"babel-plugin-
|
|
120
|
-
"babel-plugin-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@fto-consult/expo-ui",
|
|
3
|
+
"version": "5.12.0",
|
|
4
|
+
"description": "Bibliothèque de composants UI Expo,react-native",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"publish1": "npm publish --access=public",
|
|
8
|
+
"unpublish": "npm -f unpublish @fto-consult/expo-ui",
|
|
9
|
+
"build-web": "",
|
|
10
|
+
"dev": "npx expo start -c --no-minify",
|
|
11
|
+
"start": "npx expo start --dev --no-minify",
|
|
12
|
+
"start-d": "npx expo start -c --no-dev --no-minify",
|
|
13
|
+
"start-p": "npm run start-d",
|
|
14
|
+
"expo-start-client": "npx expo start --dev --no-minify --dev-client",
|
|
15
|
+
"start-m": "npx expo start - c--dev--no -minify",
|
|
16
|
+
"android": "npx expo start --android -c",
|
|
17
|
+
"ios": "npx expo start --ios",
|
|
18
|
+
"web": "npx expo start --web",
|
|
19
|
+
"web-c": "npx expo start --web -c",
|
|
20
|
+
"eject": "expo eject",
|
|
21
|
+
"emulator": "npm run android-emulator",
|
|
22
|
+
"web-server": "npx serve web-build",
|
|
23
|
+
"build-android": "eas build --clear-cache -p android --profile preview",
|
|
24
|
+
"build-android-local": "eas build --platform android --local",
|
|
25
|
+
"build-android-dist": "eas build --clear-cache -p android",
|
|
26
|
+
"build-ios": "eas build --clear-cache -p ios --profile preview",
|
|
27
|
+
"build-ios-dist": "eas build --clear-cache -p ios",
|
|
28
|
+
"install-apk": "adb -s emulator-5554 install myapp.apk",
|
|
29
|
+
"android-emulator": "emulator -avd EMULATOR",
|
|
30
|
+
"flipper": "npx cross-env METRO_SERVER_PORT=19000 E:\\Studies\\react-native\\debugger\\Flipper-win\\Flipper.exe",
|
|
31
|
+
"test:build": "electron-webpack && electron-builder --dir -c.compression=store -c.mac.identity=null",
|
|
32
|
+
"compile-electron": "webpack --env platform=electron",
|
|
33
|
+
"compile-electron-p": "webpack --config ./electron/webpack.config.js --mode=production",
|
|
34
|
+
"electron": "electron ./electron",
|
|
35
|
+
"logcat": "adb -d logcat com.ftc.apps.salite1:E > errors.txt",
|
|
36
|
+
"logcat-export": "adb -d logcat com.ftc.apps.salite1 *:S > logcat.txt",
|
|
37
|
+
"electron-c": "npm run compile-electron && npm run electron",
|
|
38
|
+
"electron-p": "npm run compile-electron-p && npm run electron",
|
|
39
|
+
"update-app-version": "node ./update-app-version.js",
|
|
40
|
+
"find-licenses": "node ./find-licenses.js",
|
|
41
|
+
"fix-dependencies": "expo-cli doctor --fix-dependencies",
|
|
42
|
+
"delete-node-modules": "rimraf ./**/node_modules",
|
|
43
|
+
"modifier-url-remote-git": "git remote set-url origin 'https://borispipo@github.com/borispipo/smart-eneo.git'"
|
|
44
|
+
},
|
|
45
|
+
"bin": "./bin/index.js",
|
|
46
|
+
"repository": {
|
|
47
|
+
"type": "git",
|
|
48
|
+
"url": "git+https://github.com/borispipo/expo-ui.git"
|
|
49
|
+
},
|
|
50
|
+
"keywords": [
|
|
51
|
+
"Expo",
|
|
52
|
+
"React-Native"
|
|
53
|
+
],
|
|
54
|
+
"author": "Boris Fouomene",
|
|
55
|
+
"license": "ISC",
|
|
56
|
+
"bugs": {
|
|
57
|
+
"url": "https://github.com/borispipo/expo-ui/issues"
|
|
58
|
+
},
|
|
59
|
+
"homepage": "https://github.com/borispipo/expo-ui#readme",
|
|
60
|
+
"dependencies": {
|
|
61
|
+
"@emotion/native": "^11.11.0",
|
|
62
|
+
"@expo/html-elements": "^0.5.1",
|
|
63
|
+
"@expo/vector-icons": "^13.0.0",
|
|
64
|
+
"@fto-consult/common": "^3.18.32",
|
|
65
|
+
"@gorhom/portal": "^1.0.14",
|
|
66
|
+
"@pchmn/expo-material3-theme": "^1.0.1",
|
|
67
|
+
"@react-native-async-storage/async-storage": "1.17.11",
|
|
68
|
+
"@react-native-community/datetimepicker": "6.7.3",
|
|
69
|
+
"@react-native-community/netinfo": "9.3.7",
|
|
70
|
+
"@react-native/assets-registry": "^0.72.0",
|
|
71
|
+
"@react-navigation/native": "^6.1.6",
|
|
72
|
+
"@react-navigation/native-stack": "^6.9.12",
|
|
73
|
+
"@shopify/flash-list": "1.4.0",
|
|
74
|
+
"apexcharts": "^3.41.0",
|
|
75
|
+
"expo": "^48.0.19",
|
|
76
|
+
"expo-camera": "~13.2.1",
|
|
77
|
+
"expo-clipboard": "~4.1.2",
|
|
78
|
+
"expo-font": "~11.1.1",
|
|
79
|
+
"expo-image-picker": "~14.1.1",
|
|
80
|
+
"expo-linking": "~4.0.1",
|
|
81
|
+
"expo-sqlite": "~11.1.1",
|
|
82
|
+
"expo-status-bar": "~1.4.4",
|
|
83
|
+
"expo-system-ui": "~2.2.1",
|
|
84
|
+
"expo-web-browser": "~12.1.1",
|
|
85
|
+
"file-saver": "^2.0.5",
|
|
86
|
+
"fs-extra": "^11.1.1",
|
|
87
|
+
"google-libphonenumber": "^3.2.32",
|
|
88
|
+
"htmlparser2-without-node-native": "^3.9.2",
|
|
89
|
+
"process": "^0.11.10",
|
|
90
|
+
"prop-types": "^15.8.1",
|
|
91
|
+
"react": "^18.2.0",
|
|
92
|
+
"react-content-loader": "^6.2.1",
|
|
93
|
+
"react-dom": "^18.2.0",
|
|
94
|
+
"react-native": "0.71.8",
|
|
95
|
+
"react-native-big-list": "^1.6.1",
|
|
96
|
+
"react-native-blob-util": "^0.18.3",
|
|
97
|
+
"react-native-gesture-handler": "~2.9.0",
|
|
98
|
+
"react-native-iphone-x-helper": "^1.3.1",
|
|
99
|
+
"react-native-mime-types": "^2.3.0",
|
|
100
|
+
"react-native-paper": "^5.9.1",
|
|
101
|
+
"react-native-paper-dates": "^0.18.12",
|
|
102
|
+
"react-native-reanimated": "~2.14.4",
|
|
103
|
+
"react-native-safe-area-context": "4.5.0",
|
|
104
|
+
"react-native-screens": "~3.20.0",
|
|
105
|
+
"react-native-svg": "13.4.0",
|
|
106
|
+
"react-native-web": "~0.18.10",
|
|
107
|
+
"react-native-webview": "11.26.0",
|
|
108
|
+
"react-navigation": "^4.4.4",
|
|
109
|
+
"react-virtuoso": "^4.3.11",
|
|
110
|
+
"sharp-cli": "^4.1.1",
|
|
111
|
+
"tippy.js": "^6.3.7",
|
|
112
|
+
"websql": "^2.0.3",
|
|
113
|
+
"xlsx": "^0.18.5"
|
|
114
|
+
},
|
|
115
|
+
"devDependencies": {
|
|
116
|
+
"@expo/metro-config": "^0.7.1",
|
|
117
|
+
"@expo/webpack-config": "^18.0.1",
|
|
118
|
+
"babel-plugin-inline-dotenv": "^1.7.0",
|
|
119
|
+
"babel-plugin-module-resolver": "^4.1.0",
|
|
120
|
+
"babel-plugin-transform-inline-environment-variables": "^0.4.4"
|
|
121
|
+
}
|
|
122
|
+
}
|
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
|
},
|