Add others screens
This commit is contained in:
parent
00ef7bbd89
commit
ff5e85bf61
15 changed files with 2299 additions and 17 deletions
|
|
@ -2,9 +2,13 @@
|
|||
## Dependencies
|
||||
- i18n-js
|
||||
- @react-native-community/netinfo
|
||||
- @react-native-community/slider
|
||||
- axios
|
||||
- lodash
|
||||
- expo
|
||||
- expo-av
|
||||
- expo-video-player
|
||||
- expo-barcode-scanner
|
||||
- react-redux
|
||||
- redux
|
||||
- realm
|
||||
|
|
@ -18,4 +22,7 @@
|
|||
- react-native-b-crypt-bridge
|
||||
- react-native-animated-tree-view with https://github.com/shariqahmed525/react-native-animated-tree-view/pull/3/
|
||||
- react-native-pdf
|
||||
- react-native-blob-util
|
||||
- react-native-blob-util
|
||||
- react-native-flash-message
|
||||
- @react-native-picker/picker
|
||||
- vcard-parser
|
||||
|
|
@ -2,6 +2,7 @@
|
|||
package="com.comapp">
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.CAMERA" />
|
||||
|
||||
<application
|
||||
android:name=".MainApplication"
|
||||
|
|
@ -23,4 +24,8 @@
|
|||
</intent-filter>
|
||||
</activity>
|
||||
</application>
|
||||
<supports-screens android:smallScreens="false"
|
||||
android:normalScreens="false"
|
||||
android:largeScreens="true"
|
||||
android:xlargeScreens="true"/>
|
||||
</manifest>
|
||||
|
|
|
|||
439
ComApp/package-lock.json
generated
439
ComApp/package-lock.json
generated
|
|
@ -9,10 +9,17 @@
|
|||
"version": "0.0.1",
|
||||
"dependencies": {
|
||||
"@react-native-community/netinfo": "^9.3.2",
|
||||
"@react-native-community/slider": "^4.3.2",
|
||||
"@react-native-picker/picker": "^2.4.6",
|
||||
"@react-navigation/native": "^6.0.13",
|
||||
"@react-navigation/native-stack": "^6.9.0",
|
||||
"@rneui/base": "^0.0.0-edge.2",
|
||||
"@rneui/themed": "^0.0.0-edge.2",
|
||||
"axios": "^0.27.2",
|
||||
"expo": "^46.0.13",
|
||||
"expo-av": "^12.0.4",
|
||||
"expo-barcode-scanner": "^11.4.0",
|
||||
"expo-video-player": "^2.2.0",
|
||||
"i18n-js": "^4.1.1",
|
||||
"install": "^0.13.0",
|
||||
"lodash": "^4.17.21",
|
||||
|
|
@ -22,6 +29,7 @@
|
|||
"react-native-animated-tree-view": "^0.1.4",
|
||||
"react-native-b-crypt-bridge": "file:react-native-b-crypt-bridge-2.0.0.tgz",
|
||||
"react-native-blob-util": "^0.16.2",
|
||||
"react-native-flash-message": "^0.3.1",
|
||||
"react-native-pdf": "^6.6.2",
|
||||
"react-native-progress": "^5.0.0",
|
||||
"react-native-safe-area-context": "^4.4.1",
|
||||
|
|
@ -30,7 +38,8 @@
|
|||
"react-native-vector-icons": "^9.2.0",
|
||||
"react-redux": "^8.0.4",
|
||||
"realm": "^11.0.0-rc.2",
|
||||
"redux": "^4.2.0"
|
||||
"redux": "^4.2.0",
|
||||
"vcard-parser": "^1.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.12.9",
|
||||
|
|
@ -4070,6 +4079,23 @@
|
|||
"react-native": ">=0.59"
|
||||
}
|
||||
},
|
||||
"node_modules/@react-native-community/slider": {
|
||||
"version": "4.3.2",
|
||||
"resolved": "https://registry.npmjs.org/@react-native-community/slider/-/slider-4.3.2.tgz",
|
||||
"integrity": "sha512-pKIx+l3yFQAVMcqGsnRcJAqZbVeR69CRbW85nZHhLuR/mOT0NbKWJIAEy7MC+e84DMTw0RJnEflRQO2/j8wcxQ==",
|
||||
"dependencies": {
|
||||
"@types/react-test-renderer": "^18.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@react-native-picker/picker": {
|
||||
"version": "2.4.6",
|
||||
"resolved": "https://registry.npmjs.org/@react-native-picker/picker/-/picker-2.4.6.tgz",
|
||||
"integrity": "sha512-TyrQZKwi7tbGbETxpQpaf0Jld6Fw/RRWVPAShRobTUWwUglveP71mtdLwuNJV+1NXI6PqW/OvCEk9ZmFfGj0fQ==",
|
||||
"peerDependencies": {
|
||||
"react": ">=16",
|
||||
"react-native": ">=0.57"
|
||||
}
|
||||
},
|
||||
"node_modules/@react-native/assets": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@react-native/assets/-/assets-1.0.0.tgz",
|
||||
|
|
@ -4186,6 +4212,62 @@
|
|||
"resolved": "https://registry.npmjs.org/@realm.io/common/-/common-0.1.5.tgz",
|
||||
"integrity": "sha512-Y+UnICLvsPFpe2WOXWIdJUaV3G2qDocN8al/Yz13mYMkjODXHL4VhyfEKR2hvcAubv+7isdegEyYNdo3zQzbFA=="
|
||||
},
|
||||
"node_modules/@rneui/base": {
|
||||
"version": "0.0.0-edge.2",
|
||||
"resolved": "https://registry.npmjs.org/@rneui/base/-/base-0.0.0-edge.2.tgz",
|
||||
"integrity": "sha512-MFyiK0Kz23v5mwOUotZdD8cudREa0t9lFwb2+6MyyG1SN2I8CUyqqsZBBwUMInXbspeOtJGtWOPv61TM/2esFQ==",
|
||||
"dependencies": {
|
||||
"@rneui/base-edge": "github:react-native-elements/react-native-elements#base"
|
||||
}
|
||||
},
|
||||
"node_modules/@rneui/base-edge": {
|
||||
"name": "@rneui/base",
|
||||
"version": "4.0.0-rc.6",
|
||||
"resolved": "git+ssh://git@github.com/react-native-elements/react-native-elements.git#9ab2c462fc905e606bc6372e8f516cdd10f12ceb",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/react-native-vector-icons": "^6.4.10",
|
||||
"color": "^3.2.1",
|
||||
"deepmerge": "^4.2.2",
|
||||
"hoist-non-react-statics": "^3.3.2",
|
||||
"react-native-ratings": "^8.1.0",
|
||||
"react-native-size-matters": "^0.4.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/react-native-elements"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react-native-safe-area-context": "^3.1.9 || ^4.0.0",
|
||||
"react-native-vector-icons": ">7.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@rneui/base-edge/node_modules/deepmerge": {
|
||||
"version": "4.2.2",
|
||||
"resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz",
|
||||
"integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@rneui/themed": {
|
||||
"version": "0.0.0-edge.2",
|
||||
"resolved": "https://registry.npmjs.org/@rneui/themed/-/themed-0.0.0-edge.2.tgz",
|
||||
"integrity": "sha512-MnsZarge+2V1//ov9jCAxkKzjS5RejZf/eRpE9tVOmvDZeEO1Q/9LIV00ZJxEHnjJHpozs5UvBkwb8KAwFL/0Q==",
|
||||
"dependencies": {
|
||||
"@rneui/themed-edge": "github:react-native-elements/react-native-elements#themed"
|
||||
}
|
||||
},
|
||||
"node_modules/@rneui/themed-edge": {
|
||||
"name": "@rneui/themed",
|
||||
"version": "4.0.0-rc.6",
|
||||
"resolved": "git+ssh://git@github.com/react-native-elements/react-native-elements.git#c6336871730b0624a41c91267f06ad61dc7ea2ca",
|
||||
"license": "MIT",
|
||||
"funding": {
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/react-native-elements"
|
||||
}
|
||||
},
|
||||
"node_modules/@segment/loosely-validate-event": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@segment/loosely-validate-event/-/loosely-validate-event-2.0.0.tgz",
|
||||
|
|
@ -4383,6 +4465,31 @@
|
|||
"csstype": "^3.0.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/react-native": {
|
||||
"version": "0.70.4",
|
||||
"resolved": "https://registry.npmjs.org/@types/react-native/-/react-native-0.70.4.tgz",
|
||||
"integrity": "sha512-z5tKfblHLG6jts2AQcioDw4N+F2EzflO9n495yNyqyMYRkSIVTLX64MHBeqMp5wfOY5mshy0GsOgnFSXrXKQSg==",
|
||||
"dependencies": {
|
||||
"@types/react": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/react-native-vector-icons": {
|
||||
"version": "6.4.12",
|
||||
"resolved": "https://registry.npmjs.org/@types/react-native-vector-icons/-/react-native-vector-icons-6.4.12.tgz",
|
||||
"integrity": "sha512-gSXtv3NMOsRwSXJ/gvGebm7CNjHbkeFKCse9h/Pvi+x2yjCLOkJR1FBfec06DhaFJpsK7Y8WRQpwOS0eLqx5Rg==",
|
||||
"dependencies": {
|
||||
"@types/react": "*",
|
||||
"@types/react-native": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/react-test-renderer": {
|
||||
"version": "18.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/react-test-renderer/-/react-test-renderer-18.0.0.tgz",
|
||||
"integrity": "sha512-C7/5FBJ3g3sqUahguGi03O79b8afNeSD6T8/GU50oQrJCU0bVCCGQHaGKUbg2Ce8VQEEqTw8/HiS6lXHHdgkdQ==",
|
||||
"dependencies": {
|
||||
"@types/react": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/scheduler": {
|
||||
"version": "0.16.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz",
|
||||
|
|
@ -6267,6 +6374,15 @@
|
|||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/color": {
|
||||
"version": "3.2.1",
|
||||
"resolved": "https://registry.npmjs.org/color/-/color-3.2.1.tgz",
|
||||
"integrity": "sha512-aBl7dZI9ENN6fUGC7mWpMTPNHmWUSNan9tuWN6ahh5ZLNk9baLJOnSMlrQkHcrfFgz2/RigjUVAjdx36VcemKA==",
|
||||
"dependencies": {
|
||||
"color-convert": "^1.9.3",
|
||||
"color-string": "^1.6.0"
|
||||
}
|
||||
},
|
||||
"node_modules/color-convert": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
|
||||
|
|
@ -6285,6 +6401,28 @@
|
|||
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/color-string": {
|
||||
"version": "1.9.1",
|
||||
"resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz",
|
||||
"integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==",
|
||||
"dependencies": {
|
||||
"color-name": "^1.0.0",
|
||||
"simple-swizzle": "^0.2.2"
|
||||
}
|
||||
},
|
||||
"node_modules/color/node_modules/color-convert": {
|
||||
"version": "1.9.3",
|
||||
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
|
||||
"integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
|
||||
"dependencies": {
|
||||
"color-name": "1.1.3"
|
||||
}
|
||||
},
|
||||
"node_modules/color/node_modules/color-name": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
|
||||
"integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw=="
|
||||
},
|
||||
"node_modules/colorette": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/colorette/-/colorette-1.4.0.tgz",
|
||||
|
|
@ -8058,6 +8196,29 @@
|
|||
"url-parse": "^1.5.9"
|
||||
}
|
||||
},
|
||||
"node_modules/expo-av": {
|
||||
"version": "12.0.4",
|
||||
"resolved": "https://registry.npmjs.org/expo-av/-/expo-av-12.0.4.tgz",
|
||||
"integrity": "sha512-wq3wx6J1aacZEPZce9TK1+o4YTAOWyb5cJ4CqfsgHcXeUdHyO3qbva/5uecigpEYlCxOlWYFhAz2T0dQ7nWSpQ==",
|
||||
"dependencies": {
|
||||
"@expo/config-plugins": "~5.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"expo": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/expo-barcode-scanner": {
|
||||
"version": "11.4.0",
|
||||
"resolved": "https://registry.npmjs.org/expo-barcode-scanner/-/expo-barcode-scanner-11.4.0.tgz",
|
||||
"integrity": "sha512-Q4BreQHY5U1aGF+rfqeGSzcdlayTKnSe/qTIfkXTmXFsL7bu3hMqdh5J/DL00Dfmc7C0IR8EiV75rqRrY4t0nA==",
|
||||
"dependencies": {
|
||||
"@expo/config-plugins": "~5.0.0",
|
||||
"expo-image-loader": "~3.2.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"expo": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/expo-constants": {
|
||||
"version": "13.2.4",
|
||||
"resolved": "https://registry.npmjs.org/expo-constants/-/expo-constants-13.2.4.tgz",
|
||||
|
|
@ -8120,6 +8281,14 @@
|
|||
"expo": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/expo-image-loader": {
|
||||
"version": "3.2.0",
|
||||
"resolved": "https://registry.npmjs.org/expo-image-loader/-/expo-image-loader-3.2.0.tgz",
|
||||
"integrity": "sha512-LU3Q2prn64/HxdToDmxgMIRXS1ZvD9Q3iCxRVTZn1fPQNNDciIQFE5okaa74Ogx20DFHs90r6WoUd7w9Af1OGQ==",
|
||||
"peerDependencies": {
|
||||
"expo": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/expo-keep-awake": {
|
||||
"version": "10.2.0",
|
||||
"resolved": "https://registry.npmjs.org/expo-keep-awake/-/expo-keep-awake-10.2.0.tgz",
|
||||
|
|
@ -8250,6 +8419,19 @@
|
|||
"invariant": "^2.2.4"
|
||||
}
|
||||
},
|
||||
"node_modules/expo-video-player": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/expo-video-player/-/expo-video-player-2.2.0.tgz",
|
||||
"integrity": "sha512-DDai4zmTF265EHOagnWWA22o/xwP4FI1YVUzhTibN5vB3nLqSL9ABBI+H++I9T0p7sCRgQhgoy4whaWWcN4ZfQ==",
|
||||
"dependencies": {
|
||||
"tslib": "^2.4.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@react-native-community/slider": ">=4.0.0",
|
||||
"expo": ">=38.0.0",
|
||||
"expo-av": ">=5.0.2"
|
||||
}
|
||||
},
|
||||
"node_modules/expo/node_modules/cross-spawn": {
|
||||
"version": "6.0.5",
|
||||
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
|
||||
|
|
@ -15274,8 +15456,6 @@
|
|||
},
|
||||
"node_modules/npm/node_modules/string_decoder": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
|
||||
"integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
|
||||
"inBundle": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
|
|
@ -16676,12 +16856,34 @@
|
|||
"nullthrows": "^1.1.1"
|
||||
}
|
||||
},
|
||||
"node_modules/react-native-flash-message": {
|
||||
"version": "0.3.1",
|
||||
"resolved": "https://registry.npmjs.org/react-native-flash-message/-/react-native-flash-message-0.3.1.tgz",
|
||||
"integrity": "sha512-PswNvDdHBOavmIM7G4loLuEwML3oB8E8wVCuOPQ0Q6hRbExwTaF6gsTJvo5fQkyUsCi27ainSkL/F0ZijIkVig==",
|
||||
"dependencies": {
|
||||
"prop-types": "^15.8.1",
|
||||
"react-native-iphone-x-helper": "^1.3.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"prop-types": "^15.0 || ^16.0",
|
||||
"react": "*",
|
||||
"react-native": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/react-native-gradle-plugin": {
|
||||
"version": "0.70.3",
|
||||
"resolved": "https://registry.npmjs.org/react-native-gradle-plugin/-/react-native-gradle-plugin-0.70.3.tgz",
|
||||
"integrity": "sha512-oOanj84fJEXUg9FoEAQomA8ISG+DVIrTZ3qF7m69VQUJyOGYyDZmPqKcjvRku4KXlEH6hWO9i4ACLzNBh8gC0A==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/react-native-iphone-x-helper": {
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/react-native-iphone-x-helper/-/react-native-iphone-x-helper-1.3.1.tgz",
|
||||
"integrity": "sha512-HOf0jzRnq2/aFUcdCJ9w9JGzN3gdEg0zFE4FyYlp4jtidqU03D5X7ZegGKfT1EWteR0gPBGp9ye5T5FvSWi9Yg==",
|
||||
"peerDependencies": {
|
||||
"react-native": ">=0.42.0"
|
||||
}
|
||||
},
|
||||
"node_modules/react-native-pdf": {
|
||||
"version": "6.6.2",
|
||||
"resolved": "https://registry.npmjs.org/react-native-pdf/-/react-native-pdf-6.6.2.tgz",
|
||||
|
|
@ -16702,6 +16904,18 @@
|
|||
"react-native-svg": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/react-native-ratings": {
|
||||
"version": "8.1.0",
|
||||
"resolved": "https://registry.npmjs.org/react-native-ratings/-/react-native-ratings-8.1.0.tgz",
|
||||
"integrity": "sha512-+QOJ4G3NjVkI1D+tk4EGx1dCvVfbD2nQdkrj9cXrcAoEiwmbep4z4bZbCKmWMpQ5h2dqbxABU8/eBnbDmvAc3g==",
|
||||
"dependencies": {
|
||||
"lodash": "^4.17.15"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "*",
|
||||
"react-native": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/react-native-safe-area-context": {
|
||||
"version": "4.4.1",
|
||||
"resolved": "https://registry.npmjs.org/react-native-safe-area-context/-/react-native-safe-area-context-4.4.1.tgz",
|
||||
|
|
@ -16724,6 +16938,14 @@
|
|||
"react-native": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/react-native-size-matters": {
|
||||
"version": "0.4.0",
|
||||
"resolved": "https://registry.npmjs.org/react-native-size-matters/-/react-native-size-matters-0.4.0.tgz",
|
||||
"integrity": "sha512-8/C0htHrFWeUm9N8JegmadovUfgTWkGBkDPZ1N3YkXtDWb+98Ya2gThiKcu445r8c7YhcrBfnHz/mYsXIusaOQ==",
|
||||
"peerDependencies": {
|
||||
"react-native": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/react-native-svg": {
|
||||
"version": "13.2.0",
|
||||
"resolved": "https://registry.npmjs.org/react-native-svg/-/react-native-svg-13.2.0.tgz",
|
||||
|
|
@ -18106,6 +18328,19 @@
|
|||
"node": ">= 5.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/simple-swizzle": {
|
||||
"version": "0.2.2",
|
||||
"resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz",
|
||||
"integrity": "sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==",
|
||||
"dependencies": {
|
||||
"is-arrayish": "^0.3.1"
|
||||
}
|
||||
},
|
||||
"node_modules/simple-swizzle/node_modules/is-arrayish": {
|
||||
"version": "0.3.2",
|
||||
"resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz",
|
||||
"integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ=="
|
||||
},
|
||||
"node_modules/sisteransi": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz",
|
||||
|
|
@ -19731,6 +19966,11 @@
|
|||
"node": ">= 0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/vcard-parser": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/vcard-parser/-/vcard-parser-1.0.0.tgz",
|
||||
"integrity": "sha512-rSEjrjBK3of4VimMR5vBjLLcN5ZCSp9yuVzyx5i4Fwx74Yd0s+DnHtSit/wAAtj1a7/T/qQc0ykwXADoD0+fTQ=="
|
||||
},
|
||||
"node_modules/verror": {
|
||||
"version": "1.10.0",
|
||||
"resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz",
|
||||
|
|
@ -22971,6 +23211,20 @@
|
|||
"integrity": "sha512-fR7wSIhmIUX+Skzgkr2vj5xopWa0lvvEWoXP1m7//jZjEgOZnu9DgdUimLHDrMo6AtZyUNrJscsFEepihTLlPQ==",
|
||||
"requires": {}
|
||||
},
|
||||
"@react-native-community/slider": {
|
||||
"version": "4.3.2",
|
||||
"resolved": "https://registry.npmjs.org/@react-native-community/slider/-/slider-4.3.2.tgz",
|
||||
"integrity": "sha512-pKIx+l3yFQAVMcqGsnRcJAqZbVeR69CRbW85nZHhLuR/mOT0NbKWJIAEy7MC+e84DMTw0RJnEflRQO2/j8wcxQ==",
|
||||
"requires": {
|
||||
"@types/react-test-renderer": "^18.0.0"
|
||||
}
|
||||
},
|
||||
"@react-native-picker/picker": {
|
||||
"version": "2.4.6",
|
||||
"resolved": "https://registry.npmjs.org/@react-native-picker/picker/-/picker-2.4.6.tgz",
|
||||
"integrity": "sha512-TyrQZKwi7tbGbETxpQpaf0Jld6Fw/RRWVPAShRobTUWwUglveP71mtdLwuNJV+1NXI6PqW/OvCEk9ZmFfGj0fQ==",
|
||||
"requires": {}
|
||||
},
|
||||
"@react-native/assets": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@react-native/assets/-/assets-1.0.0.tgz",
|
||||
|
|
@ -23057,6 +23311,45 @@
|
|||
"resolved": "https://registry.npmjs.org/@realm.io/common/-/common-0.1.5.tgz",
|
||||
"integrity": "sha512-Y+UnICLvsPFpe2WOXWIdJUaV3G2qDocN8al/Yz13mYMkjODXHL4VhyfEKR2hvcAubv+7isdegEyYNdo3zQzbFA=="
|
||||
},
|
||||
"@rneui/base": {
|
||||
"version": "0.0.0-edge.2",
|
||||
"resolved": "https://registry.npmjs.org/@rneui/base/-/base-0.0.0-edge.2.tgz",
|
||||
"integrity": "sha512-MFyiK0Kz23v5mwOUotZdD8cudREa0t9lFwb2+6MyyG1SN2I8CUyqqsZBBwUMInXbspeOtJGtWOPv61TM/2esFQ==",
|
||||
"requires": {
|
||||
"@rneui/base-edge": "github:react-native-elements/react-native-elements#base"
|
||||
}
|
||||
},
|
||||
"@rneui/base-edge": {
|
||||
"version": "git+ssh://git@github.com/react-native-elements/react-native-elements.git#9ab2c462fc905e606bc6372e8f516cdd10f12ceb",
|
||||
"from": "@rneui/base-edge@github:react-native-elements/react-native-elements#base",
|
||||
"requires": {
|
||||
"@types/react-native-vector-icons": "^6.4.10",
|
||||
"color": "^3.2.1",
|
||||
"deepmerge": "^4.2.2",
|
||||
"hoist-non-react-statics": "^3.3.2",
|
||||
"react-native-ratings": "^8.1.0",
|
||||
"react-native-size-matters": "^0.4.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"deepmerge": {
|
||||
"version": "4.2.2",
|
||||
"resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz",
|
||||
"integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"@rneui/themed": {
|
||||
"version": "0.0.0-edge.2",
|
||||
"resolved": "https://registry.npmjs.org/@rneui/themed/-/themed-0.0.0-edge.2.tgz",
|
||||
"integrity": "sha512-MnsZarge+2V1//ov9jCAxkKzjS5RejZf/eRpE9tVOmvDZeEO1Q/9LIV00ZJxEHnjJHpozs5UvBkwb8KAwFL/0Q==",
|
||||
"requires": {
|
||||
"@rneui/themed-edge": "github:react-native-elements/react-native-elements#themed"
|
||||
}
|
||||
},
|
||||
"@rneui/themed-edge": {
|
||||
"version": "git+ssh://git@github.com/react-native-elements/react-native-elements.git#c6336871730b0624a41c91267f06ad61dc7ea2ca",
|
||||
"from": "@rneui/themed-edge@github:react-native-elements/react-native-elements#themed"
|
||||
},
|
||||
"@segment/loosely-validate-event": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@segment/loosely-validate-event/-/loosely-validate-event-2.0.0.tgz",
|
||||
|
|
@ -23232,6 +23525,31 @@
|
|||
"csstype": "^3.0.2"
|
||||
}
|
||||
},
|
||||
"@types/react-native": {
|
||||
"version": "0.70.4",
|
||||
"resolved": "https://registry.npmjs.org/@types/react-native/-/react-native-0.70.4.tgz",
|
||||
"integrity": "sha512-z5tKfblHLG6jts2AQcioDw4N+F2EzflO9n495yNyqyMYRkSIVTLX64MHBeqMp5wfOY5mshy0GsOgnFSXrXKQSg==",
|
||||
"requires": {
|
||||
"@types/react": "*"
|
||||
}
|
||||
},
|
||||
"@types/react-native-vector-icons": {
|
||||
"version": "6.4.12",
|
||||
"resolved": "https://registry.npmjs.org/@types/react-native-vector-icons/-/react-native-vector-icons-6.4.12.tgz",
|
||||
"integrity": "sha512-gSXtv3NMOsRwSXJ/gvGebm7CNjHbkeFKCse9h/Pvi+x2yjCLOkJR1FBfec06DhaFJpsK7Y8WRQpwOS0eLqx5Rg==",
|
||||
"requires": {
|
||||
"@types/react": "*",
|
||||
"@types/react-native": "*"
|
||||
}
|
||||
},
|
||||
"@types/react-test-renderer": {
|
||||
"version": "18.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/react-test-renderer/-/react-test-renderer-18.0.0.tgz",
|
||||
"integrity": "sha512-C7/5FBJ3g3sqUahguGi03O79b8afNeSD6T8/GU50oQrJCU0bVCCGQHaGKUbg2Ce8VQEEqTw8/HiS6lXHHdgkdQ==",
|
||||
"requires": {
|
||||
"@types/react": "*"
|
||||
}
|
||||
},
|
||||
"@types/scheduler": {
|
||||
"version": "0.16.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz",
|
||||
|
|
@ -24559,6 +24877,30 @@
|
|||
"object-visit": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"color": {
|
||||
"version": "3.2.1",
|
||||
"resolved": "https://registry.npmjs.org/color/-/color-3.2.1.tgz",
|
||||
"integrity": "sha512-aBl7dZI9ENN6fUGC7mWpMTPNHmWUSNan9tuWN6ahh5ZLNk9baLJOnSMlrQkHcrfFgz2/RigjUVAjdx36VcemKA==",
|
||||
"requires": {
|
||||
"color-convert": "^1.9.3",
|
||||
"color-string": "^1.6.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"color-convert": {
|
||||
"version": "1.9.3",
|
||||
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
|
||||
"integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
|
||||
"requires": {
|
||||
"color-name": "1.1.3"
|
||||
}
|
||||
},
|
||||
"color-name": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
|
||||
"integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"color-convert": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
|
||||
|
|
@ -24572,6 +24914,15 @@
|
|||
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
|
||||
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
|
||||
},
|
||||
"color-string": {
|
||||
"version": "1.9.1",
|
||||
"resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz",
|
||||
"integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==",
|
||||
"requires": {
|
||||
"color-name": "^1.0.0",
|
||||
"simple-swizzle": "^0.2.2"
|
||||
}
|
||||
},
|
||||
"colorette": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/colorette/-/colorette-1.4.0.tgz",
|
||||
|
|
@ -25883,6 +26234,23 @@
|
|||
"url-parse": "^1.5.9"
|
||||
}
|
||||
},
|
||||
"expo-av": {
|
||||
"version": "12.0.4",
|
||||
"resolved": "https://registry.npmjs.org/expo-av/-/expo-av-12.0.4.tgz",
|
||||
"integrity": "sha512-wq3wx6J1aacZEPZce9TK1+o4YTAOWyb5cJ4CqfsgHcXeUdHyO3qbva/5uecigpEYlCxOlWYFhAz2T0dQ7nWSpQ==",
|
||||
"requires": {
|
||||
"@expo/config-plugins": "~5.0.0"
|
||||
}
|
||||
},
|
||||
"expo-barcode-scanner": {
|
||||
"version": "11.4.0",
|
||||
"resolved": "https://registry.npmjs.org/expo-barcode-scanner/-/expo-barcode-scanner-11.4.0.tgz",
|
||||
"integrity": "sha512-Q4BreQHY5U1aGF+rfqeGSzcdlayTKnSe/qTIfkXTmXFsL7bu3hMqdh5J/DL00Dfmc7C0IR8EiV75rqRrY4t0nA==",
|
||||
"requires": {
|
||||
"@expo/config-plugins": "~5.0.0",
|
||||
"expo-image-loader": "~3.2.0"
|
||||
}
|
||||
},
|
||||
"expo-constants": {
|
||||
"version": "13.2.4",
|
||||
"resolved": "https://registry.npmjs.org/expo-constants/-/expo-constants-13.2.4.tgz",
|
||||
|
|
@ -25930,6 +26298,12 @@
|
|||
"fontfaceobserver": "^2.1.0"
|
||||
}
|
||||
},
|
||||
"expo-image-loader": {
|
||||
"version": "3.2.0",
|
||||
"resolved": "https://registry.npmjs.org/expo-image-loader/-/expo-image-loader-3.2.0.tgz",
|
||||
"integrity": "sha512-LU3Q2prn64/HxdToDmxgMIRXS1ZvD9Q3iCxRVTZn1fPQNNDciIQFE5okaa74Ogx20DFHs90r6WoUd7w9Af1OGQ==",
|
||||
"requires": {}
|
||||
},
|
||||
"expo-keep-awake": {
|
||||
"version": "10.2.0",
|
||||
"resolved": "https://registry.npmjs.org/expo-keep-awake/-/expo-keep-awake-10.2.0.tgz",
|
||||
|
|
@ -26022,6 +26396,14 @@
|
|||
"invariant": "^2.2.4"
|
||||
}
|
||||
},
|
||||
"expo-video-player": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/expo-video-player/-/expo-video-player-2.2.0.tgz",
|
||||
"integrity": "sha512-DDai4zmTF265EHOagnWWA22o/xwP4FI1YVUzhTibN5vB3nLqSL9ABBI+H++I9T0p7sCRgQhgoy4whaWWcN4ZfQ==",
|
||||
"requires": {
|
||||
"tslib": "^2.4.0"
|
||||
}
|
||||
},
|
||||
"extend": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",
|
||||
|
|
@ -30975,8 +31357,6 @@
|
|||
},
|
||||
"string_decoder": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
|
||||
"integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
|
||||
"bundled": true,
|
||||
"requires": {
|
||||
"safe-buffer": "~5.2.0"
|
||||
|
|
@ -32051,11 +32431,26 @@
|
|||
"nullthrows": "^1.1.1"
|
||||
}
|
||||
},
|
||||
"react-native-flash-message": {
|
||||
"version": "0.3.1",
|
||||
"resolved": "https://registry.npmjs.org/react-native-flash-message/-/react-native-flash-message-0.3.1.tgz",
|
||||
"integrity": "sha512-PswNvDdHBOavmIM7G4loLuEwML3oB8E8wVCuOPQ0Q6hRbExwTaF6gsTJvo5fQkyUsCi27ainSkL/F0ZijIkVig==",
|
||||
"requires": {
|
||||
"prop-types": "^15.8.1",
|
||||
"react-native-iphone-x-helper": "^1.3.1"
|
||||
}
|
||||
},
|
||||
"react-native-gradle-plugin": {
|
||||
"version": "0.70.3",
|
||||
"resolved": "https://registry.npmjs.org/react-native-gradle-plugin/-/react-native-gradle-plugin-0.70.3.tgz",
|
||||
"integrity": "sha512-oOanj84fJEXUg9FoEAQomA8ISG+DVIrTZ3qF7m69VQUJyOGYyDZmPqKcjvRku4KXlEH6hWO9i4ACLzNBh8gC0A=="
|
||||
},
|
||||
"react-native-iphone-x-helper": {
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/react-native-iphone-x-helper/-/react-native-iphone-x-helper-1.3.1.tgz",
|
||||
"integrity": "sha512-HOf0jzRnq2/aFUcdCJ9w9JGzN3gdEg0zFE4FyYlp4jtidqU03D5X7ZegGKfT1EWteR0gPBGp9ye5T5FvSWi9Yg==",
|
||||
"requires": {}
|
||||
},
|
||||
"react-native-pdf": {
|
||||
"version": "6.6.2",
|
||||
"resolved": "https://registry.npmjs.org/react-native-pdf/-/react-native-pdf-6.6.2.tgz",
|
||||
|
|
@ -32073,6 +32468,14 @@
|
|||
"prop-types": "^15.7.2"
|
||||
}
|
||||
},
|
||||
"react-native-ratings": {
|
||||
"version": "8.1.0",
|
||||
"resolved": "https://registry.npmjs.org/react-native-ratings/-/react-native-ratings-8.1.0.tgz",
|
||||
"integrity": "sha512-+QOJ4G3NjVkI1D+tk4EGx1dCvVfbD2nQdkrj9cXrcAoEiwmbep4z4bZbCKmWMpQ5h2dqbxABU8/eBnbDmvAc3g==",
|
||||
"requires": {
|
||||
"lodash": "^4.17.15"
|
||||
}
|
||||
},
|
||||
"react-native-safe-area-context": {
|
||||
"version": "4.4.1",
|
||||
"resolved": "https://registry.npmjs.org/react-native-safe-area-context/-/react-native-safe-area-context-4.4.1.tgz",
|
||||
|
|
@ -32088,6 +32491,12 @@
|
|||
"warn-once": "^0.1.0"
|
||||
}
|
||||
},
|
||||
"react-native-size-matters": {
|
||||
"version": "0.4.0",
|
||||
"resolved": "https://registry.npmjs.org/react-native-size-matters/-/react-native-size-matters-0.4.0.tgz",
|
||||
"integrity": "sha512-8/C0htHrFWeUm9N8JegmadovUfgTWkGBkDPZ1N3YkXtDWb+98Ya2gThiKcu445r8c7YhcrBfnHz/mYsXIusaOQ==",
|
||||
"requires": {}
|
||||
},
|
||||
"react-native-svg": {
|
||||
"version": "13.2.0",
|
||||
"resolved": "https://registry.npmjs.org/react-native-svg/-/react-native-svg-13.2.0.tgz",
|
||||
|
|
@ -33033,6 +33442,21 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"simple-swizzle": {
|
||||
"version": "0.2.2",
|
||||
"resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz",
|
||||
"integrity": "sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==",
|
||||
"requires": {
|
||||
"is-arrayish": "^0.3.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"is-arrayish": {
|
||||
"version": "0.3.2",
|
||||
"resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz",
|
||||
"integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"sisteransi": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz",
|
||||
|
|
@ -34221,6 +34645,11 @@
|
|||
"resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
|
||||
"integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg=="
|
||||
},
|
||||
"vcard-parser": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/vcard-parser/-/vcard-parser-1.0.0.tgz",
|
||||
"integrity": "sha512-rSEjrjBK3of4VimMR5vBjLLcN5ZCSp9yuVzyx5i4Fwx74Yd0s+DnHtSit/wAAtj1a7/T/qQc0ykwXADoD0+fTQ=="
|
||||
},
|
||||
"verror": {
|
||||
"version": "1.10.0",
|
||||
"resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz",
|
||||
|
|
|
|||
|
|
@ -11,10 +11,17 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@react-native-community/netinfo": "^9.3.2",
|
||||
"@react-native-community/slider": "^4.3.2",
|
||||
"@react-native-picker/picker": "^2.4.6",
|
||||
"@react-navigation/native": "^6.0.13",
|
||||
"@react-navigation/native-stack": "^6.9.0",
|
||||
"@rneui/base": "^0.0.0-edge.2",
|
||||
"@rneui/themed": "^0.0.0-edge.2",
|
||||
"axios": "^0.27.2",
|
||||
"expo": "^46.0.13",
|
||||
"expo-av": "^12.0.4",
|
||||
"expo-barcode-scanner": "^11.4.0",
|
||||
"expo-video-player": "^2.2.0",
|
||||
"i18n-js": "^4.1.1",
|
||||
"install": "^0.13.0",
|
||||
"lodash": "^4.17.21",
|
||||
|
|
@ -24,6 +31,7 @@
|
|||
"react-native-animated-tree-view": "^0.1.4",
|
||||
"react-native-b-crypt-bridge": "file:react-native-b-crypt-bridge-2.0.0.tgz",
|
||||
"react-native-blob-util": "^0.16.2",
|
||||
"react-native-flash-message": "^0.3.1",
|
||||
"react-native-pdf": "^6.6.2",
|
||||
"react-native-progress": "^5.0.0",
|
||||
"react-native-safe-area-context": "^4.4.1",
|
||||
|
|
@ -32,7 +40,8 @@
|
|||
"react-native-vector-icons": "^9.2.0",
|
||||
"react-redux": "^8.0.4",
|
||||
"realm": "^11.0.0-rc.2",
|
||||
"redux": "^4.2.0"
|
||||
"redux": "^4.2.0",
|
||||
"vcard-parser": "^1.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.12.9",
|
||||
|
|
|
|||
|
|
@ -31,6 +31,10 @@ import LoginScreen from './App/Views/LoginScreen';
|
|||
import SyncScreen from './App/Views/SyncScreen';
|
||||
import DirectoriesScreen from './App/Views/DirectoriesScreen';
|
||||
import PDFScreen from './App/Views/PDFScreen';
|
||||
import VideoScreen from './App/Views/VideoScreen';
|
||||
import OnlyVideosScreen from './App/Views/OnlyVideosScreen';
|
||||
import ContactScreen from './App/Views/ContactScreen';
|
||||
import ContactDetailsScreen from './App/Views/ContactDetailsScreen';
|
||||
// Lang Flags
|
||||
import flagFR from './Resources/assets/img/flags/fr.png';
|
||||
import flagEN from './Resources/assets/img/flags/en.png';
|
||||
|
|
@ -188,6 +192,47 @@ class App extends React.Component {
|
|||
headerTitle: () => CustomNavigation.LogoTitle('PDF')
|
||||
})}
|
||||
/>
|
||||
<Stack.Screen
|
||||
name="VideoScreen"
|
||||
component={VideoScreen}
|
||||
options={(navigation, route) => ({
|
||||
headerTitle: () => CustomNavigation.LogoTitle(i18n.t('app.video'))
|
||||
})}
|
||||
/>
|
||||
<Stack.Screen
|
||||
name="OnlyVideosScreen"
|
||||
component={OnlyVideosScreen}
|
||||
options={(navigation, route) => ({
|
||||
headerTitle: () => CustomNavigation.LogoTitle(i18n.t('global.videos')),
|
||||
headerRight: () => (
|
||||
<View style={{ flexDirection: 'row', marginRight: 5 }}>
|
||||
<TextInput style={styles.searchInput} placeholder={i18n.t('global.search')} value={this.state.searchTxt} onChangeText={(text) => this.setState({ searchTxt: text })} />
|
||||
<TouchableOpacity style={styles.btnSearch} onPress={() => {
|
||||
if (this.state.searchTxt.length > 0) {
|
||||
navigation.navigation.navigate('SearchScreen', {
|
||||
needle: this.state.searchTxt,
|
||||
onlyVideos: true,
|
||||
});
|
||||
this.setState({ searchTxt: '' });
|
||||
}
|
||||
}}>
|
||||
<FontAwesome5 name={'search'} size={20} color={'white'} />
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
),
|
||||
})}
|
||||
/>
|
||||
<Stack.Screen
|
||||
name="ContactScreen"
|
||||
component={ContactScreen}
|
||||
options={{ headerTitle: () => CustomNavigation.LogoTitle(i18n.t('global.contacts')) }}
|
||||
initialParams={{ contactAdded: false }}
|
||||
/>
|
||||
<Stack.Screen
|
||||
name="ContactDetailsScreen"
|
||||
component={ContactDetailsScreen}
|
||||
options={{ headerTitle: () => CustomNavigation.LogoTitle(i18n.t('app.contact_details')) }}
|
||||
/>
|
||||
</Stack.Navigator>
|
||||
</NavigationContainer>
|
||||
</Provider>
|
||||
|
|
|
|||
847
ComApp/src/App/Views/ContactDetailsScreen.js
Normal file
847
ComApp/src/App/Views/ContactDetailsScreen.js
Normal file
|
|
@ -0,0 +1,847 @@
|
|||
import React from 'react';
|
||||
import {
|
||||
View,
|
||||
Button,
|
||||
TextInput,
|
||||
TouchableOpacity,
|
||||
Text,
|
||||
Alert,
|
||||
ScrollView
|
||||
} from 'react-native';
|
||||
// Reduxs
|
||||
import { connect } from 'react-redux';
|
||||
// Helpers
|
||||
import Helpers from "../Lib/Helpers";
|
||||
// Translations
|
||||
import i18n from "../../I18n";
|
||||
// Icons
|
||||
import FontAwesome5 from 'react-native-vector-icons/FontAwesome5';
|
||||
// Style
|
||||
import styles from '../../Resources/Styles/ContactDetailsStyle';
|
||||
// UI Elements
|
||||
import { Overlay, CheckBox, ButtonGroup } from '@rneui/themed';
|
||||
// Flash Messages
|
||||
import { showMessage } from 'react-native-flash-message';
|
||||
// Picker
|
||||
import { Picker } from '@react-native-picker/picker';
|
||||
// vCard parser
|
||||
import vCard from 'vcard-parser';
|
||||
// BarCode Scanner
|
||||
import { BarCodeScanner } from 'expo-barcode-scanner';
|
||||
|
||||
function mapStateToProps(state) {
|
||||
return {
|
||||
contacts: state.app.contacts,
|
||||
currentUser: state.app.currentUser,
|
||||
};
|
||||
}
|
||||
|
||||
let date = new Date().getDate();
|
||||
if (date < 10) {
|
||||
date = '0' + date.toString();
|
||||
}
|
||||
let month = new Date().getMonth() + 1;
|
||||
if (month < 10) {
|
||||
month = '0' + month.toString();
|
||||
}
|
||||
const year = new Date().getFullYear();
|
||||
|
||||
class ContactDetailsScreen extends React.Component {
|
||||
state = {
|
||||
action: 'add',
|
||||
visits: [],
|
||||
selectedVisit: 0,
|
||||
tmpVisitNote: '',
|
||||
newVisitTitle: date + '/' + month + '/' + year,
|
||||
selectedIndex: 0,
|
||||
showNewVisit: false,
|
||||
tmpID: 0,
|
||||
tmpNote: '',
|
||||
tmpName: '',
|
||||
tmpFirstname: '',
|
||||
tmpEmail: '',
|
||||
tmpCompany: '',
|
||||
tmpAddress: '',
|
||||
tmpPhone: '',
|
||||
tmpSelect1: '',
|
||||
tmpSelect2: '',
|
||||
tmpOther: '',
|
||||
clientChecked: false,
|
||||
prospectChecked: false,
|
||||
otherChecked: false,
|
||||
p1: false,
|
||||
p2: false,
|
||||
p3: false,
|
||||
p4: false,
|
||||
p5: false,
|
||||
p6: false,
|
||||
p7: false,
|
||||
p8: false,
|
||||
p9: false,
|
||||
showQRcodevCard: false,
|
||||
parsedType: null,
|
||||
parsedDatas: [],
|
||||
hasPermission: null,
|
||||
scanned: false,
|
||||
showDynContact: false,
|
||||
parsedName: '',
|
||||
parsedFirstname: '',
|
||||
parsedEmail: '',
|
||||
parsedCompany: '',
|
||||
parsedAddress: '',
|
||||
parsedPhone: ''
|
||||
};
|
||||
|
||||
updateContact() {
|
||||
let error = '';
|
||||
const { action } = this.props.route.params;
|
||||
// On récupère le texte courant
|
||||
if (this.state.visits.length > 0) {
|
||||
this.state.visits[
|
||||
this.state.selectedVisit
|
||||
].note = this.state.tmpVisitNote;
|
||||
}
|
||||
let type;
|
||||
if (this.state.clientChecked === true) {
|
||||
type = 'client';
|
||||
} else if (this.state.prospectChecked === true) {
|
||||
type = 'prospect';
|
||||
} else if (this.state.otherChecked === true) {
|
||||
type = 'other';
|
||||
if (this.state.tmpOther.length === 0) {
|
||||
error = error.concat(i18n.t('error.fill_other_field') + '.\n');
|
||||
}
|
||||
} else {
|
||||
error = error.concat(i18n.t('error.specify_type_contact') + '.\n');
|
||||
}
|
||||
if (this.state.tmpEmail.length < 5 || !Helpers.isEmailValid(this.state.tmpEmail)) {
|
||||
error = error.concat(i18n.t('error.invalid_email_address') + '.\n');
|
||||
}
|
||||
if (this.state.tmpName.length === 0) {
|
||||
error = error.concat(i18n.t('error.invalid_name') + '.\n');
|
||||
}
|
||||
if (this.state.tmpFirstname.length === 0) {
|
||||
error = error.concat(i18n.t('error.invalid_firstname') + '.\n');
|
||||
}
|
||||
|
||||
if (error.length > 0) {
|
||||
Alert.alert(i18n.t('global.warning') + ' !', error, [
|
||||
{ text: 'OK' },
|
||||
],
|
||||
{ cancelable: false },
|
||||
);
|
||||
} else {
|
||||
const products = [
|
||||
this.state.p1,
|
||||
this.state.p2,
|
||||
this.state.p3,
|
||||
this.state.p4,
|
||||
this.state.p5,
|
||||
this.state.p6,
|
||||
this.state.p7,
|
||||
this.state.p8,
|
||||
this.state.p9
|
||||
];
|
||||
const contact = {
|
||||
id: Helpers.generateUUID(),
|
||||
email: this.state.tmpEmail,
|
||||
type: type,
|
||||
other: this.state.tmpOther,
|
||||
select1: this.state.tmpSelect1,
|
||||
select2: this.state.tmpSelect2,
|
||||
name: this.state.tmpName,
|
||||
firstname: this.state.tmpFirstname,
|
||||
company: this.state.tmpCompany,
|
||||
address: this.state.tmpAddress,
|
||||
phone: this.state.tmpPhone,
|
||||
products: JSON.stringify(products),
|
||||
notes: this.state.tmpNote,
|
||||
visits: JSON.stringify(this.state.visits),
|
||||
to_delete: false,
|
||||
synced: false,
|
||||
};
|
||||
if (action === 'edit') {
|
||||
contact.id = this.state.tmpID;
|
||||
this.props.dispatch({ type: 'UPDATE_CONTACT', data: contact });
|
||||
this.populate();
|
||||
showMessage({
|
||||
message: i18n.t('contact_details_s.contact_saved') + '.',
|
||||
type: 'success',
|
||||
duration: 500,
|
||||
});
|
||||
} else {
|
||||
contact.user_id = this.props.currentUser.id;
|
||||
this.props.dispatch({ type: 'ADD_CONTACT', data: contact });
|
||||
this.props.navigation.navigate('ContactScreen', { contactAdded: true });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
updateContactType(type) {
|
||||
if (type === 'client') {
|
||||
this.setState({
|
||||
clientChecked: true,
|
||||
prospectChecked: false,
|
||||
otherChecked: false,
|
||||
tmpOther: '',
|
||||
});
|
||||
} else if (type === 'prospect') {
|
||||
this.setState({
|
||||
clientChecked: false,
|
||||
prospectChecked: true,
|
||||
otherChecked: false,
|
||||
tmpOther: '',
|
||||
});
|
||||
} else {
|
||||
this.setState({
|
||||
clientChecked: false,
|
||||
prospectChecked: false,
|
||||
otherChecked: true,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
newVisit() {
|
||||
this.state.visits.unshift({ title: this.state.newVisitTitle, note: '' });
|
||||
this.state.visits[this.state.selectedVisit].note = this.state.tmpVisitNote;
|
||||
this.setState({
|
||||
tmpVisitNote: '',
|
||||
visits: this.state.visits,
|
||||
showNewVisit: false,
|
||||
selectedVisit: 0,
|
||||
});
|
||||
}
|
||||
|
||||
deleteVisit() {
|
||||
Alert.alert(
|
||||
i18n.t('global.confirmation'),
|
||||
i18n.t('contact_details_s.confirm_visit_delete'),
|
||||
[
|
||||
{
|
||||
text: i18n.t('global.no'),
|
||||
onPress: () => console.log('Cancel Pressed'),
|
||||
style: 'cancel',
|
||||
},
|
||||
{
|
||||
text: i18n.t('global.yes'),
|
||||
onPress: () => {
|
||||
this.state.visits.splice(this.state.selectedVisit, 1);
|
||||
if (this.state.visits.length === 0) {
|
||||
this.setState({
|
||||
visits: this.state.visits,
|
||||
selectedVisit: 0,
|
||||
tmpVisitNote: '',
|
||||
});
|
||||
} else {
|
||||
this.setState({
|
||||
visits: this.state.visits,
|
||||
selectedVisit: 0,
|
||||
tmpVisitNote: this.state.visits[0].note,
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
],
|
||||
{ cancelable: false },
|
||||
);
|
||||
}
|
||||
|
||||
populate() {
|
||||
const { contactId } = this.props.route.params;
|
||||
const contact = this.props.contacts.filter(tmp => tmp.id === contactId)[0];
|
||||
this.setState({
|
||||
tmpID: contact.id,
|
||||
tmpNote: contact.notes,
|
||||
tmpName: contact.name,
|
||||
tmpFirstname: contact.firstname,
|
||||
tmpEmail: contact.email,
|
||||
tmpCompany: contact.company,
|
||||
tmpAddress: contact.address,
|
||||
tmpPhone: contact.phone,
|
||||
tmpSelect1: contact.select1,
|
||||
tmpSelect2: contact.select2,
|
||||
tmpOther: contact.other,
|
||||
tmpProducts: contact.product,
|
||||
});
|
||||
if (contact.type === 'client') {
|
||||
this.setState({ clientChecked: true });
|
||||
} else if (contact.type === 'prospect') {
|
||||
this.setState({ prospectChecked: true });
|
||||
} else {
|
||||
this.setState({ otherChecked: true });
|
||||
}
|
||||
if (contact.visits !== null) {
|
||||
const tmp = JSON.parse(contact.visits);
|
||||
this.setState({ visits: tmp });
|
||||
if (tmp.length > 0) {
|
||||
this.setState({ tmpVisitNote: tmp[this.state.selectedVisit].note });
|
||||
}
|
||||
}
|
||||
if (contact.products !== null) {
|
||||
const tmp = JSON.parse(contact.products);
|
||||
this.setState({
|
||||
p1: tmp[0],
|
||||
p2: tmp[1],
|
||||
p3: tmp[2],
|
||||
p4: tmp[3],
|
||||
p5: tmp[4],
|
||||
p6: tmp[5],
|
||||
p7: tmp[6],
|
||||
p8: tmp[7],
|
||||
p9: tmp[8],
|
||||
p10: tmp[9],
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
const { action } = this.props.route.params;
|
||||
if (action === 'edit') {
|
||||
this.setState({ action: 'edit' });
|
||||
this.populate();
|
||||
}
|
||||
|
||||
BarCodeScanner.requestPermissionsAsync().then(res => {
|
||||
this.setState({ hasPermission: res.status === 'granted' });
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
render() {
|
||||
const handleBarCodeScanned = ({ type, data }) => {
|
||||
this.setState({ scanned: true });
|
||||
if (data.includes('VCARD')) {
|
||||
let datas = vCard.parse(data);
|
||||
let tmpDatas = [];
|
||||
if (datas['n'] !== undefined) {
|
||||
const nx = Object.assign({ n1: [{ value: datas['n'][0].value[0] }] }, { n2: [{ value: datas['n'][0].value[1] }] });
|
||||
datas = Object.assign(datas, nx);
|
||||
}
|
||||
if (datas['adr'] !== undefined) {
|
||||
let tmp = datas['adr'][0].value;
|
||||
let tmpadr = '';
|
||||
for (let i = 0; i < tmp.length; i++) {
|
||||
if (tmp[i].length > 0) {
|
||||
if (tmpadr.length > 0) {
|
||||
tmpadr = tmpadr + ', ' + tmp[i];
|
||||
} else {
|
||||
tmpadr = tmp[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
datas['adr'] = [{ value: tmpadr }];
|
||||
}
|
||||
Object.keys(datas).map((objectKey, index) => {
|
||||
if (objectKey === 'email' || objectKey === 'adr' || objectKey === 'tel' || objectKey === 'org' || objectKey === 'n1' || objectKey === 'n2') {
|
||||
let value = datas[objectKey][0].value;
|
||||
if (typeof value === 'string') {
|
||||
tmpDatas.push(value);
|
||||
}
|
||||
}
|
||||
});
|
||||
this.setState({ parsedType: 'vcard', parsedDatas: tmpDatas, showQRcodevCard: false, showDynContact: true })
|
||||
} else {
|
||||
Alert.alert(i18n.t('contact_details_s.qrcode_not_vcard_format'));
|
||||
}
|
||||
};
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
<ScrollView style={{ flex: 1 }}>
|
||||
<View
|
||||
style={{
|
||||
flexDirection: 'row',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
}}>
|
||||
<CheckBox
|
||||
checkedColor={'#ce3029'}
|
||||
center
|
||||
title={i18n.t('contact_details_s.customer')}
|
||||
checkedIcon="dot-circle-o"
|
||||
uncheckedIcon="circle-o"
|
||||
checked={this.state.clientChecked}
|
||||
containerStyle={styles.clearRadio}
|
||||
onPress={() => this.updateContactType('client')}
|
||||
/>
|
||||
<CheckBox
|
||||
checkedColor={'#ce3029'}
|
||||
center
|
||||
title={i18n.t('contact_details_s.prospect')}
|
||||
checkedIcon="dot-circle-o"
|
||||
uncheckedIcon="circle-o"
|
||||
checked={this.state.prospectChecked}
|
||||
containerStyle={styles.clearRadio}
|
||||
onPress={() => this.updateContactType('prospect')}
|
||||
/>
|
||||
<CheckBox
|
||||
checkedColor={'#ce3029'}
|
||||
center
|
||||
title={i18n.t('contact_details_s.other')}
|
||||
checkedIcon="dot-circle-o"
|
||||
uncheckedIcon="circle-o"
|
||||
checked={this.state.otherChecked}
|
||||
containerStyle={styles.clearRadio}
|
||||
onPress={() => this.updateContactType('other')}
|
||||
/>
|
||||
{this.state.otherChecked === true && (
|
||||
<TextInput
|
||||
style={{
|
||||
backgroundColor: 'white',
|
||||
margin: 10,
|
||||
padding: 10,
|
||||
flex: 2,
|
||||
}}
|
||||
value={this.state.tmpOther}
|
||||
placeholder={i18n.t('contact_details_s.description')}
|
||||
onChangeText={text => this.setState({ tmpOther: text })}
|
||||
/>
|
||||
)}
|
||||
</View>
|
||||
<View style={{ flexDirection: 'row' }}>
|
||||
<TextInput
|
||||
style={{ backgroundColor: 'white', margin: 10, padding: 10, flex: 1 }}
|
||||
value={this.state.tmpName}
|
||||
placeholder={i18n.t('global.name') + ' (' + i18n.t('global.required') + ')'}
|
||||
onChangeText={text => this.setState({ tmpName: text })}
|
||||
/>
|
||||
<TextInput
|
||||
style={{ backgroundColor: 'white', margin: 10, padding: 10, flex: 1 }}
|
||||
value={this.state.tmpFirstname}
|
||||
placeholder={i18n.t('global.firstname') + ' (' + i18n.t('global.required') + ')'}
|
||||
onChangeText={text => this.setState({ tmpFirstname: text })}
|
||||
/>
|
||||
</View>
|
||||
<TextInput
|
||||
style={styles.input}
|
||||
value={this.state.tmpEmail}
|
||||
placeholder={i18n.t('global.email') + ' (' + i18n.t('global.required') + ')'}
|
||||
onChangeText={text => this.setState({ tmpEmail: text })}
|
||||
autoCapitalize={'none'}
|
||||
autoCorrect={false}
|
||||
keyboardType={'email-address'}
|
||||
/>
|
||||
<TextInput
|
||||
style={styles.input}
|
||||
value={this.state.tmpCompany}
|
||||
placeholder={i18n.t('global.company')}
|
||||
onChangeText={text => this.setState({ tmpCompany: text })}
|
||||
/>
|
||||
<TextInput
|
||||
style={styles.input}
|
||||
value={this.state.tmpAddress}
|
||||
placeholder={i18n.t('global.address')}
|
||||
onChangeText={text => this.setState({ tmpAddress: text })}
|
||||
/>
|
||||
<TextInput
|
||||
style={styles.input}
|
||||
value={this.state.tmpPhone}
|
||||
placeholder={i18n.t('global.phone')}
|
||||
onChangeText={text => this.setState({ tmpPhone: text })}
|
||||
autoCompleteType={'tel'}
|
||||
dataDetectorTypes={'phoneNumber'}
|
||||
keyboardType={'phone-pad'}
|
||||
/>
|
||||
<View style={{ flexDirection: 'row' }}>
|
||||
<View style={{ flex: 1, flexDirection: 'row' }}>
|
||||
<FontAwesome5 name="sort-down" size={20} color={'black'} style={{ zIndex: 1, position: 'absolute', right: 25, top: 20 }} />
|
||||
<Picker
|
||||
selectedValue={this.state.tmpSelect1}
|
||||
style={styles.select}
|
||||
onValueChange={(itemValue, itemIndex) => {
|
||||
if (itemValue !== '0') {
|
||||
this.setState({ tmpSelect1: itemValue });
|
||||
}
|
||||
}}>
|
||||
<Picker.Item label={i18n.t('custom.select-1.title')} value="0" />
|
||||
<Picker.Item label={i18n.t('custom.select-1.c1')} value="commerce-de-detail" />
|
||||
<Picker.Item label={i18n.t('custom.select-1.c2')} value={'home-service-freezer-center'} />
|
||||
<Picker.Item label={i18n.t('custom.select-1.c3')} value={'restauration-service-a-table'} />
|
||||
<Picker.Item label={i18n.t('custom.select-1.c4')} value={'fast-food-et-snacking'} />
|
||||
<Picker.Item label={i18n.t('custom.select-1.c5')} value={'cafetaria-self-service'} />
|
||||
<Picker.Item label={i18n.t('custom.select-1.c6')} value={'societe-de-restauration'} />
|
||||
<Picker.Item label={i18n.t('custom.select-1.c7')} value={'restauration-gre-a-gre-cuisine-centrale'} />
|
||||
<Picker.Item label={i18n.t('custom.select-1.c8')} value={'distributeur-independant'} />
|
||||
<Picker.Item label={i18n.t('custom.select-1.c9')} value={'boulangerie-patisserie'} />
|
||||
<Picker.Item label={i18n.t('custom.select-1.c10')} value={'pai'} />
|
||||
<Picker.Item label={i18n.t('custom.select-1.c11')} value={'destockeur'} />
|
||||
<Picker.Item label={i18n.t('custom.select-1.c12')} value={'commerce-halal'} />
|
||||
<Picker.Item label={i18n.t('custom.select-1.c13')} value={'restauration-d-hebergement'} />
|
||||
<Picker.Item label={i18n.t('custom.select-1.c14')} value={'centrale-restauration-commerciale'} />
|
||||
<Picker.Item label={i18n.t('custom.select-1.c15')} value={'restauration-evenementielle-et-parc'} />
|
||||
<Picker.Item label={i18n.t('custom.select-1.c16')} value={'restauration-de-transport'} />
|
||||
<Picker.Item label={i18n.t('custom.select-1.c17')} value={'marche-public'} />
|
||||
<Picker.Item label={i18n.t('custom.select-1.c18')} value={'cash'} />
|
||||
<Picker.Item label={i18n.t('custom.select-1.c19')} value={'distributeur-national'} />
|
||||
<Picker.Item label={i18n.t('custom.select-1.c20')} value={'rungis'} />
|
||||
<Picker.Item label={i18n.t('custom.select-1.c21')} value={'abbatoir'} />
|
||||
<Picker.Item label={i18n.t('custom.select-1.c22')} value={'autre'} />
|
||||
</Picker>
|
||||
</View>
|
||||
<View style={{ flex: 1, flexDirection: 'row' }}>
|
||||
<FontAwesome5 name="sort-down" size={20} color={'black'} style={{ zIndex: 1, position: 'absolute', right: 25, top: 20 }} />
|
||||
<Picker
|
||||
selectedValue={this.state.tmpSelect2}
|
||||
style={styles.select}
|
||||
onValueChange={(itemValue, itemIndex) => {
|
||||
if (itemValue !== '0') {
|
||||
this.setState({ tmpSelect2: itemValue });
|
||||
}
|
||||
}}>
|
||||
<Picker.Item label={i18n.t('custom.select-2.title')} value="0" />
|
||||
<Picker.Item label={i18n.t('custom.select-2.c1')} value={'celvia-dinde'} />
|
||||
<Picker.Item label={i18n.t('custom.select-2.c2')} value={'celvia-elabores'} />
|
||||
<Picker.Item label={i18n.t('custom.select-2.c3')} value={'celvia-serent'} />
|
||||
<Picker.Item label={i18n.t('custom.select-2.c4')} value={'procanar'} />
|
||||
<Picker.Item label={i18n.t('custom.select-2.c5')} value={'celtys'} />
|
||||
<Picker.Item label={i18n.t('custom.select-2.c6')} value={'farmor'} />
|
||||
<Picker.Item label={i18n.t('custom.select-2.c7')} value={'robichon'} />
|
||||
<Picker.Item label={i18n.t('custom.select-2.c8')} value={'les-volailles-de-keranna'} />
|
||||
<Picker.Item label={i18n.t('custom.select-2.c9')} value={'bosher-volaille'} />
|
||||
<Picker.Item label={i18n.t('custom.select-2.c10')} value={'ldc-bretagne'} />
|
||||
<Picker.Item label={i18n.t('custom.select-2.c11')} value={'doux-farmor'} />
|
||||
<Picker.Item label={i18n.t('custom.select-2.c12')} value={'favreau'} />
|
||||
</Picker>
|
||||
</View>
|
||||
</View>
|
||||
<View
|
||||
style={{
|
||||
flexDirection: 'row',
|
||||
flexWrap: 'wrap',
|
||||
justifyContent: 'center',
|
||||
}}>
|
||||
<CheckBox
|
||||
checkedColor={'#ce3029'}
|
||||
title={i18n.t('custom.interest.p1')}
|
||||
checked={this.state.p1}
|
||||
onPress={() => this.setState({ p1: !this.state.p1 })}
|
||||
containerStyle={styles.clearCheckbox}
|
||||
/>
|
||||
<CheckBox
|
||||
checkedColor={'#ce3029'}
|
||||
title={i18n.t('custom.interest.p2')}
|
||||
checked={this.state.p2}
|
||||
onPress={() => this.setState({ p2: !this.state.p2 })}
|
||||
containerStyle={styles.clearCheckbox}
|
||||
/>
|
||||
<CheckBox
|
||||
checkedColor={'#ce3029'}
|
||||
title={i18n.t('custom.interest.p3')}
|
||||
checked={this.state.p3}
|
||||
onPress={() => this.setState({ p3: !this.state.p3 })}
|
||||
containerStyle={styles.clearCheckbox}
|
||||
/>
|
||||
<CheckBox
|
||||
checkedColor={'#ce3029'}
|
||||
title={i18n.t('custom.interest.p4')}
|
||||
checked={this.state.p4}
|
||||
onPress={() => this.setState({ p4: !this.state.p4 })}
|
||||
containerStyle={styles.clearCheckbox}
|
||||
/>
|
||||
</View>
|
||||
</ScrollView>
|
||||
<View style={{ flex: 1, margin: 5 }}>
|
||||
<View style={{ flex: 1 }}>
|
||||
<ButtonGroup
|
||||
buttons={[i18n.t('contact_details_s.visits'), i18n.t('contact_details_s.notes')]}
|
||||
selectedButtonStyle={{ backgroundColor: '#ce3029' }}
|
||||
containerStyle={{ height: 30 }}
|
||||
selectedIndex={this.state.selectedIndex}
|
||||
onPress={index => this.setState({ selectedIndex: index })}
|
||||
/>
|
||||
{this.state.selectedIndex === 0 && (
|
||||
<View style={{ flex: 1 }}>
|
||||
<View style={{ flexDirection: 'row' }}>
|
||||
{this.state.visits.length > 0 && (
|
||||
<View style={{ flex: 2, flexDirection: 'row' }}>
|
||||
<FontAwesome5 name="sort-down" size={20} color={'black'} style={{ zIndex: 1, position: 'absolute', right: 25, top: 20 }} />
|
||||
<Picker
|
||||
style={styles.select}
|
||||
selectedValue={this.state.selectedVisit}
|
||||
onValueChange={(itemValue, itemIndex) => {
|
||||
this.state.visits[
|
||||
this.state.selectedVisit
|
||||
].note = this.state.tmpVisitNote;
|
||||
this.setState({
|
||||
visits: this.state.visits,
|
||||
selectedVisit: itemIndex,
|
||||
tmpVisitNote: this.state.visits[itemIndex].note,
|
||||
});
|
||||
}}>
|
||||
{this.state.visits.map((item, index) => {
|
||||
return <Picker.Item label={item.title} value={index} />;
|
||||
})}
|
||||
</Picker>
|
||||
</View>
|
||||
)}
|
||||
{this.state.visits.length === 0 && (
|
||||
<View
|
||||
style={{
|
||||
flex: 1,
|
||||
flexDirection: 'row',
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
}}>
|
||||
<Text>{i18n.t('contact_details_s.no_visits')}.</Text>
|
||||
</View>
|
||||
)}
|
||||
<View
|
||||
style={{
|
||||
flex: 1,
|
||||
flexDirection: 'row',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'space-evenly',
|
||||
margin: 10,
|
||||
}}>
|
||||
<TouchableOpacity
|
||||
style={styles.button}
|
||||
onPress={() => this.setState({ showNewVisit: true })}>
|
||||
<FontAwesome5 name="plus-circle" size={20} color={'#ce3029'} />
|
||||
</TouchableOpacity>
|
||||
{this.state.visits.length > 0 && (
|
||||
<TouchableOpacity
|
||||
style={styles.button}
|
||||
onPress={() => this.deleteVisit()}>
|
||||
<FontAwesome5 name="trash" size={20} color={'#ce3029'} />
|
||||
</TouchableOpacity>
|
||||
)}
|
||||
</View>
|
||||
</View>
|
||||
{this.state.visits.length > 0 && (
|
||||
<TextInput
|
||||
style={styles.textArea}
|
||||
underlineColorAndroid="transparent"
|
||||
placeholder={i18n.t('contact_details_s.notes') + '...'}
|
||||
placeholderTextColor="grey"
|
||||
multiline={true}
|
||||
value={this.state.tmpVisitNote}
|
||||
onChangeText={text => this.setState({ tmpVisitNote: text })}
|
||||
/>
|
||||
)}
|
||||
</View>
|
||||
)}
|
||||
{this.state.selectedIndex === 1 && (
|
||||
<TextInput
|
||||
style={styles.textArea}
|
||||
underlineColorAndroid="transparent"
|
||||
placeholder={i18n.t('contact_details_s.notes') + '...'}
|
||||
placeholderTextColor="grey"
|
||||
multiline={true}
|
||||
value={this.state.tmpNote}
|
||||
onChangeText={text => this.setState({ tmpNote: text })}
|
||||
/>
|
||||
)}
|
||||
</View>
|
||||
<View style={{ flexDirection: 'row', justifyContent: 'space-evenly' }}>
|
||||
{this.state.action === 'add' && (
|
||||
<>
|
||||
<Button title="QRCode vCard" onPress={() => this.setState({ showQRcodevCard: true })} color={'#ce3029'} />
|
||||
</>
|
||||
)}
|
||||
<Button title={i18n.t('global.save')} onPress={() => this.updateContact()} color={'#ce3029'} />
|
||||
</View>
|
||||
</View>
|
||||
<Overlay
|
||||
isVisible={this.state.showNewVisit}
|
||||
windowBackgroundColor="rgba(255, 255, 255, .9)"
|
||||
overlayBackgroundColor="white"
|
||||
width={400}
|
||||
height={300}>
|
||||
<View
|
||||
style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>
|
||||
<Text style={{ marginBottom: 10 }}>{i18n.t('contact_details_s.visit_name')} :</Text>
|
||||
<TextInput
|
||||
placeholder={i18n.t('contact_details_s.visit_name')}
|
||||
value={this.state.newVisitTitle}
|
||||
onChangeText={text => this.setState({ newVisitTitle: text })}
|
||||
style={{
|
||||
borderWidth: 1,
|
||||
borderColor: 'lightgrey',
|
||||
width: 300,
|
||||
marginBottom: 15,
|
||||
paddingLeft: 10,
|
||||
}}
|
||||
/>
|
||||
<View
|
||||
style={{
|
||||
flexDirection: 'row',
|
||||
justifyContent: 'space-evenly',
|
||||
alignItems: 'center',
|
||||
width: 400,
|
||||
}}>
|
||||
<Button
|
||||
title={i18n.t('global.cancel')}
|
||||
onPress={() => this.setState({ showNewVisit: false })}
|
||||
color={'#ce3029'}
|
||||
/>
|
||||
<Button title={i18n.t('global.add')} onPress={() => this.newVisit()} color={'#ce3029'} />
|
||||
</View>
|
||||
</View>
|
||||
</Overlay>
|
||||
<Overlay
|
||||
isVisible={this.state.showQRcodevCard}
|
||||
windowBackgroundColor="rgba(255, 255, 255, .9)"
|
||||
overlayBackgroundColor="white"
|
||||
width={400}
|
||||
height={300}>
|
||||
<View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>
|
||||
{this.state.hasPermission === true && (
|
||||
<BarCodeScanner
|
||||
onBarCodeScanned={this.state.scanned ? undefined : handleBarCodeScanned}
|
||||
barCodeTypes={[BarCodeScanner.Constants.BarCodeType.qr]}
|
||||
style={{ flex: 1, width: 380, height: 200 }}
|
||||
/>
|
||||
)}
|
||||
{this.state.hasPermission === false && (
|
||||
<Text>{i18n.t('error.camera_permission_denied')}.</Text>
|
||||
)}
|
||||
{this.state.hasPermission === null && (
|
||||
<Text>{i18n.t('error.pending_camera_permission')}.</Text>
|
||||
)}
|
||||
<View
|
||||
style={{
|
||||
flexDirection: 'row',
|
||||
justifyContent: 'space-evenly',
|
||||
alignItems: 'center',
|
||||
width: 400,
|
||||
}}>
|
||||
<Button
|
||||
title={i18n.t('global.cancel')}
|
||||
onPress={() => this.setState({ showQRcodevCard: false, scanned: false })}
|
||||
color={'#ce3029'}
|
||||
/>
|
||||
{this.state.scanned && <Button title={i18n.t('global.retry')} onPress={() => this.setState({ scanned: false })} color={'#ce3029'} />}
|
||||
</View>
|
||||
</View>
|
||||
</Overlay>
|
||||
<Overlay
|
||||
isVisible={this.state.showDynContact}
|
||||
windowBackgroundColor="rgba(255, 255, 255, .9)"
|
||||
overlayBackgroundColor="white"
|
||||
width={400}
|
||||
height={400}>
|
||||
<View style={{ flex: 1, alignItems: 'center', justifyContent: 'space-evenly' }}>
|
||||
<View style={{ flexDirection: 'row', alignItems: 'center' }}>
|
||||
<Text style={{ flex: 1, paddingLeft: 10 }}>{i18n.t('global.name')}</Text>
|
||||
<Picker
|
||||
selectedValue={this.state.parsedName}
|
||||
style={{ height: 50, width: 250 }}
|
||||
onValueChange={(itemValue, itemIndex) => {
|
||||
this.setState({ parsedName: itemValue });
|
||||
}}>
|
||||
<Picker.Item label="" value="0" key={0} />
|
||||
{this.state.parsedType === 'vcard' && this.state.parsedDatas.map((item, index) => {
|
||||
return <Picker.Item label={item} value={item} key={(index + 1).toString()} />;
|
||||
})}
|
||||
</Picker>
|
||||
</View>
|
||||
<View style={{ flexDirection: 'row', alignItems: 'center' }}>
|
||||
<Text style={{ flex: 1, paddingLeft: 10 }}>{i18n.t('global.firstname')}</Text>
|
||||
<Picker
|
||||
selectedValue={this.state.parsedFirstname}
|
||||
style={{ height: 50, width: 250 }}
|
||||
onValueChange={(itemValue, itemIndex) =>
|
||||
this.setState({ parsedFirstname: itemValue })
|
||||
}>
|
||||
<Picker.Item label="" value="0" key={0} />
|
||||
{this.state.parsedType === 'vcard' && this.state.parsedDatas.map((item, index) => {
|
||||
return <Picker.Item label={item} value={item} key={(index + 1).toString()} />;
|
||||
})}
|
||||
</Picker>
|
||||
</View>
|
||||
<View style={{ flexDirection: 'row', alignItems: 'center' }}>
|
||||
<Text style={{ flex: 1, paddingLeft: 10 }}>{i18n.t('global.email')}</Text>
|
||||
<Picker
|
||||
selectedValue={this.state.parsedEmail}
|
||||
style={{ height: 50, width: 250 }}
|
||||
onValueChange={(itemValue, itemIndex) =>
|
||||
this.setState({ parsedEmail: itemValue })
|
||||
}>
|
||||
<Picker.Item label="" value="0" key={0} />
|
||||
{this.state.parsedType === 'vcard' && this.state.parsedDatas.map((item, index) => {
|
||||
return <Picker.Item label={item} value={item} key={(index + 1).toString()} />;
|
||||
})}
|
||||
</Picker>
|
||||
</View>
|
||||
<View style={{ flexDirection: 'row', alignItems: 'center' }}>
|
||||
<Text style={{ flex: 1, paddingLeft: 10 }}>{i18n.t('global.company')}</Text>
|
||||
<Picker
|
||||
selectedValue={this.state.parsedCompany}
|
||||
style={{ height: 50, width: 250 }}
|
||||
onValueChange={(itemValue, itemIndex) =>
|
||||
this.setState({ parsedCompany: itemValue })
|
||||
}>
|
||||
<Picker.Item label="" value="0" key={0} />
|
||||
{this.state.parsedType === 'vcard' && this.state.parsedDatas.map((item, index) => {
|
||||
return <Picker.Item label={item} value={item} key={(index + 1).toString()} />;
|
||||
})}
|
||||
</Picker>
|
||||
</View>
|
||||
<View style={{ flexDirection: 'row', alignItems: 'center' }}>
|
||||
<Text style={{ flex: 1, paddingLeft: 10 }}>{i18n.t('global.address')}</Text>
|
||||
<Picker
|
||||
selectedValue={this.state.parsedAddress}
|
||||
style={{ height: 50, width: 250 }}
|
||||
onValueChange={(itemValue, itemIndex) =>
|
||||
this.setState({ parsedAddress: itemValue })
|
||||
}>
|
||||
<Picker.Item label="" value="0" key={0} />
|
||||
{this.state.parsedType === 'vcard' && this.state.parsedDatas.map((item, index) => {
|
||||
return <Picker.Item label={item} value={item} key={(index + 1).toString()} />;
|
||||
})}
|
||||
</Picker>
|
||||
</View>
|
||||
<View style={{ flexDirection: 'row', alignItems: 'center' }}>
|
||||
<Text style={{ flex: 1, paddingLeft: 10 }}>{i18n.t('global.phone')}</Text>
|
||||
<Picker
|
||||
selectedValue={this.state.parsedPhone}
|
||||
style={{ height: 50, width: 250 }}
|
||||
onValueChange={(itemValue, itemIndex) =>
|
||||
this.setState({ parsedPhone: itemValue })
|
||||
}>
|
||||
<Picker.Item label="" value="0" key={0} />
|
||||
{this.state.parsedType === 'vcard' && this.state.parsedDatas.map((item, index) => {
|
||||
return <Picker.Item label={item} value={item} key={(index + 1).toString()} />;
|
||||
})}
|
||||
</Picker>
|
||||
</View>
|
||||
<View
|
||||
style={{
|
||||
flexDirection: 'row',
|
||||
justifyContent: 'space-evenly',
|
||||
alignItems: 'center',
|
||||
width: 400,
|
||||
}}>
|
||||
<Button
|
||||
title={i18n.t('global.cancel')}
|
||||
onPress={() => this.setState({ showDynContact: false, scanned: false, parsedName: '', parsedFirstname: '', parsedEmail: '', parsedCompany: '', parsedAddress: '', parsedPhone: '' })}
|
||||
color={'#ce3029'}
|
||||
/>
|
||||
<Button
|
||||
title={i18n.t('global.next')}
|
||||
onPress={() => this.setState({
|
||||
tmpName: this.state.parsedName,
|
||||
tmpFirstname: this.state.parsedFirstname,
|
||||
tmpEmail: this.state.parsedEmail,
|
||||
tmpCompany: this.state.parsedCompany,
|
||||
tmpAddress: this.state.parsedAddress,
|
||||
tmpPhone: this.state.parsedPhone,
|
||||
parsedName: '',
|
||||
parsedFirstname: '',
|
||||
parsedEmail: '',
|
||||
parsedCompany: '',
|
||||
parsedAddress: '',
|
||||
parsedPhone: '',
|
||||
showDynContact: false,
|
||||
scanned: false,
|
||||
})}
|
||||
color={'#ce3029'}
|
||||
/>
|
||||
</View>
|
||||
</View>
|
||||
</Overlay>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps)(ContactDetailsScreen);
|
||||
540
ComApp/src/App/Views/ContactScreen.js
Normal file
540
ComApp/src/App/Views/ContactScreen.js
Normal file
|
|
@ -0,0 +1,540 @@
|
|||
import React from 'react';
|
||||
import {
|
||||
View,
|
||||
Button,
|
||||
FlatList,
|
||||
Text,
|
||||
TouchableOpacity,
|
||||
Alert,
|
||||
TextInput,
|
||||
} from 'react-native';
|
||||
// Reduxs
|
||||
import { connect } from 'react-redux';
|
||||
// Helpers
|
||||
import Helpers from "../Lib/Helpers";
|
||||
// Translations
|
||||
import i18n from "../../I18n";
|
||||
// Icons
|
||||
import FontAwesome5 from 'react-native-vector-icons/FontAwesome5';
|
||||
// Flash Messages
|
||||
import { showMessage } from 'react-native-flash-message';
|
||||
// Overlay
|
||||
import { Overlay } from '@rneui/themed';
|
||||
// Picker
|
||||
import { Picker } from '@react-native-picker/picker';
|
||||
// Style
|
||||
import styles from '../../Resources/Styles/ContactStyle';
|
||||
|
||||
function mapStateToProps(state) {
|
||||
return {
|
||||
users: state.app.users,
|
||||
contacts: state.app.contacts,
|
||||
documents: state.app.documents,
|
||||
currentUser: state.app.currentUser,
|
||||
};
|
||||
}
|
||||
|
||||
class ContactScreen extends React.Component {
|
||||
state = {
|
||||
contacts: [],
|
||||
sortType: 'asc',
|
||||
sortField: 'name',
|
||||
searchTxt: '',
|
||||
showTransferContact: false,
|
||||
selectedTransferUser: 0,
|
||||
contactToTransfer: {},
|
||||
showSendBrochure: false,
|
||||
selectedDocument: -1,
|
||||
sendDocumentList: [],
|
||||
selectedSendBrochureEmail: -1,
|
||||
tmpSendBrochureEmail: '',
|
||||
tmpSendBrochureSubject: '',
|
||||
tmpSendBrochureMessage: '',
|
||||
sortedDocuments: [],
|
||||
sortedEmails: [],
|
||||
};
|
||||
|
||||
sendBrochure() {
|
||||
if (
|
||||
this.state.tmpSendBrochureEmail !== '' &&
|
||||
this.state.tmpSendBrochureSubject !== '' &&
|
||||
this.state.tmpSendBrochureMessage !== '' &&
|
||||
this.state.sendDocumentList.length > 0 &&
|
||||
Helpers.isEmailValid(this.state.tmpSendBrochureEmail)
|
||||
) {
|
||||
const email = {
|
||||
email: this.state.tmpSendBrochureEmail,
|
||||
subject: this.state.tmpSendBrochureSubject,
|
||||
message: this.state.tmpSendBrochureMessage,
|
||||
documents: JSON.stringify(this.state.sendDocumentList),
|
||||
user_id: this.props.currentUser.id
|
||||
};
|
||||
this.props.dispatch({ type: 'SEND_BROCHURE', data: email });
|
||||
this.setState({
|
||||
showSendBrochure: false,
|
||||
tmpSendBrochureEmail: '',
|
||||
tmpSendBrochureSubject: '',
|
||||
tmpSendBrochureMessage: '',
|
||||
selectedSendBrochureEmail: -1,
|
||||
selectedDocument: -1,
|
||||
sendDocumentList: [],
|
||||
});
|
||||
showMessage({
|
||||
message: i18n.t('global.message_sent') + '.',
|
||||
description: i18n.t('global.message_will_be_sent_after_sync') + '.',
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
});
|
||||
} else {
|
||||
Alert.alert(
|
||||
i18n.t('error.incomplete_form'),
|
||||
i18n.t('error.fill_all_fields_and_1_doc_min') + '.',
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
transferContact() {
|
||||
const nextUser = this.props.users.filter(user => user.id !== this.props.currentUser.id)[this.state.selectedTransferUser];
|
||||
const transferContact = this.state.contactToTransfer;
|
||||
const contact = {
|
||||
id: transferContact.id,
|
||||
email: transferContact.email,
|
||||
type: transferContact.type,
|
||||
other: transferContact.other,
|
||||
network: transferContact.network,
|
||||
name: transferContact.name,
|
||||
firstname: transferContact.firstname,
|
||||
office: transferContact.office,
|
||||
company: transferContact.company,
|
||||
address: transferContact.address,
|
||||
phone: transferContact.phone,
|
||||
products: transferContact.products,
|
||||
notes: transferContact.note,
|
||||
visits: transferContact.visits,
|
||||
to_delete: false,
|
||||
synced: false,
|
||||
user_id: nextUser.id,
|
||||
};
|
||||
this.props.dispatch({ type: 'UPDATE_CONTACT', data: contact });
|
||||
this.setState({ showTransferContact: false });
|
||||
showMessage({
|
||||
message: i18n.t('contact_s.contact_transferred') + '.',
|
||||
description: i18n.t('contact_s.contact_will_be_sent_after_sync') + '.',
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
});
|
||||
}
|
||||
|
||||
deleteContact(id) {
|
||||
Alert.alert(
|
||||
i18n.t('global.confirmation'),
|
||||
i18n.t('contact_s.confirm_contact_delete'),
|
||||
[
|
||||
{
|
||||
text: i18n.t('global.no'),
|
||||
onPress: () => console.log('Cancel Pressed'),
|
||||
style: 'cancel',
|
||||
},
|
||||
{
|
||||
text: i18n.t('global.yes'),
|
||||
onPress: () => {
|
||||
this.setState({ contacts: [], sortedEmails: [] });
|
||||
this.props.dispatch({ type: 'DELETE_CONTACT', data: id });
|
||||
showMessage({
|
||||
message: i18n.t('contact_s.contact_deleted') + '.',
|
||||
type: 'success',
|
||||
duration: 500,
|
||||
});
|
||||
},
|
||||
},
|
||||
],
|
||||
{ cancelable: false },
|
||||
);
|
||||
}
|
||||
|
||||
Item(item) {
|
||||
return (
|
||||
<View style={styles.item}>
|
||||
<TouchableOpacity
|
||||
onPress={() =>
|
||||
this.props.navigation.navigate('ContactDetailsScreen', {
|
||||
action: 'edit',
|
||||
contactId: item.id,
|
||||
})
|
||||
}>
|
||||
<Text style={styles.clickable}>
|
||||
{item.name.toUpperCase()} {item.firstname}
|
||||
</Text>
|
||||
</TouchableOpacity>
|
||||
<Text style={styles.company}>{item.company}</Text>
|
||||
<Text style={styles.email}>{item.email}</Text>
|
||||
<View style={styles.buttons}>
|
||||
<TouchableOpacity
|
||||
style={styles.button}
|
||||
onPress={() => {
|
||||
this.deleteContact(item.id);
|
||||
}}>
|
||||
<FontAwesome5 name="trash" size={20} color={'#ce3029'} />
|
||||
</TouchableOpacity>
|
||||
<TouchableOpacity
|
||||
style={styles.button}
|
||||
onPress={() => {
|
||||
this.setState({
|
||||
showTransferContact: true,
|
||||
contactToTransfer: item,
|
||||
});
|
||||
}}>
|
||||
<FontAwesome5 name="paper-plane" size={20} color={'#ce3029'} />
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
sortContacts(field) {
|
||||
let sort;
|
||||
if (field !== this.state.sortField) {
|
||||
sort = 'asc';
|
||||
} else {
|
||||
if (this.state.sortType === 'asc') {
|
||||
sort = 'desc';
|
||||
} else {
|
||||
sort = 'asc';
|
||||
}
|
||||
}
|
||||
this.setState({ contacts: this.state.contacts.sort(Helpers.compareValues(field, sort)), sortType: sort, sortField: field });
|
||||
}
|
||||
|
||||
HeaderItem() {
|
||||
return (
|
||||
<View style={styles.item}>
|
||||
<TouchableOpacity onPress={() => {
|
||||
this.sortContacts('name');
|
||||
}}>
|
||||
<Text style={styles.clickable}>{i18n.t('global.name')} <FontAwesome5 name={'sort'} /></Text>
|
||||
</TouchableOpacity>
|
||||
<TouchableOpacity onPress={() => {
|
||||
this.sortContacts('company');
|
||||
}}>
|
||||
<Text style={styles.clickable}>{i18n.t('global.company')} <FontAwesome5 name={'sort'} /></Text>
|
||||
</TouchableOpacity>
|
||||
<Text style={styles.email}>{i18n.t('global.email')}</Text>
|
||||
<Text style={styles.buttons} />
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
handleSearchBtn() {
|
||||
if (this.state.searchTxt.length > 0) {
|
||||
let obj = this.props.contacts;
|
||||
let array = Object.keys(obj).map(function (key) { return obj[key]; });
|
||||
this.setState({ contacts: array.sort(Helpers.compareValues('name', 'asc')), sortType: 'asc', searchTxt: '' });
|
||||
}
|
||||
}
|
||||
handleSearchTxt(text) {
|
||||
this.setState({ searchTxt: text });
|
||||
if (text.length > 0) {
|
||||
let tmpContactsName = this.props.contacts.filter(item => item.name.toLowerCase().indexOf(text.toLowerCase()) >= 0);
|
||||
let tmpContactsCompany = this.props.contacts.filter(item => item.company.toLowerCase().indexOf(text.toLowerCase()) >= 0);
|
||||
let resSearch = Object.assign(tmpContactsName, tmpContactsCompany);
|
||||
this.setState({ contacts: resSearch.sort(Helpers.compareValues('name', 'asc')), sortType: 'asc' });
|
||||
} else {
|
||||
let obj = this.props.contacts;
|
||||
let array = Object.keys(obj).map(function (key) { return obj[key]; });
|
||||
this.setState({ contacts: array.sort(Helpers.compareValues('name', 'asc')), sortType: 'asc' });
|
||||
}
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.init();
|
||||
}
|
||||
|
||||
componentDidUpdate(prevProps, prevState, snapshot) {
|
||||
if (prevProps.contacts !== this.props.contacts) {
|
||||
this.init();
|
||||
}
|
||||
}
|
||||
|
||||
init() {
|
||||
let objContacts = this.props.contacts;
|
||||
let objDocs = this.props.documents;
|
||||
let arrayContacts = Object.keys(objContacts).map(function (key) { return objContacts[key]; });
|
||||
let arrayEmails = Object.keys(objContacts).map(function (key) { return objContacts[key]; });
|
||||
let arrayDocs = Object.keys(objDocs).map(function (key) { return objDocs[key]; });
|
||||
|
||||
this.setState({
|
||||
contacts: arrayContacts.sort(Helpers.compareValues('name', 'asc')),
|
||||
sortedDocuments: arrayDocs.sort(Helpers.compareValues('title', 'asc')),
|
||||
sortedEmails: arrayEmails.sort(Helpers.compareValues('email', 'asc')),
|
||||
sortType: 'asc',
|
||||
sortField: 'name',
|
||||
});
|
||||
}
|
||||
|
||||
render() {
|
||||
const { contactAdded } = this.props.route.params;
|
||||
if (contactAdded === true) {
|
||||
this.props.navigation.setParams({ contactAdded: false });
|
||||
showMessage({
|
||||
message: i18n.t('contact_s.contact_added') + '.',
|
||||
type: 'success',
|
||||
duration: 500,
|
||||
});
|
||||
}
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
<View
|
||||
style={{
|
||||
marginTop: 20,
|
||||
flexDirection: 'row',
|
||||
justifyContent: 'space-evenly',
|
||||
alignItems: 'center',
|
||||
}}>
|
||||
<Button
|
||||
color={'#ce3029'}
|
||||
title={i18n.t('global.add')}
|
||||
onPress={() =>
|
||||
this.props.navigation.navigate('ContactDetailsScreen', {
|
||||
action: 'add',
|
||||
})
|
||||
}
|
||||
/>
|
||||
<Button
|
||||
color={'#ce3029'}
|
||||
title={i18n.t('contact_s.send_flyer')}
|
||||
onPress={() => this.setState({ showSendBrochure: true })}
|
||||
/>
|
||||
<View style={{ flexDirection: 'row' }}>
|
||||
<TextInput placeholder={i18n.t('global.search')} style={styles.inputSearch} value={this.state.searchTxt} onChangeText={(text) => this.handleSearchTxt(text)} />
|
||||
<TouchableOpacity style={styles.btnSearch} onPress={() => this.handleSearchBtn()}>
|
||||
{this.state.searchTxt.length > 0 ? (
|
||||
<FontAwesome5 name={'times'} size={20} color={'white'} />
|
||||
) : (
|
||||
<FontAwesome5 name={'search'} size={20} color={'white'} />
|
||||
)}
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
</View>
|
||||
<View style={{ flex: 1, marginTop: 20 }}>
|
||||
<FlatList
|
||||
data={this.state.contacts}
|
||||
renderItem={({ item }) => this.Item(item)}
|
||||
ListHeaderComponent={this.HeaderItem.bind(this)}
|
||||
keyExtractor={item => item.id.toString()}
|
||||
/>
|
||||
</View>
|
||||
<Overlay
|
||||
isVisible={this.state.showTransferContact}
|
||||
windowBackgroundColor="rgba(255, 255, 255, .9)"
|
||||
overlayBackgroundColor="white"
|
||||
width={400}
|
||||
height={300}>
|
||||
<View
|
||||
style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>
|
||||
<Text style={{ marginBottom: 10 }}>{i18n.t('contact_s.select_contact')} :</Text>
|
||||
<Picker
|
||||
style={{
|
||||
width: 300,
|
||||
marginBottom: 15,
|
||||
paddingLeft: 10,
|
||||
}}
|
||||
selectedValue={this.state.selectedTransferUser}
|
||||
onValueChange={(itemValue, itemIndex) => {
|
||||
this.setState({ selectedTransferUser: itemIndex });
|
||||
}}>
|
||||
{this.props.users.filter(user => user.id !== this.props.currentUser.id).map((item, index) => {
|
||||
return <Picker.Item label={item.email} value={index} key={item.id.toString()} />;
|
||||
})}
|
||||
</Picker>
|
||||
<View
|
||||
style={{
|
||||
flexDirection: 'row',
|
||||
justifyContent: 'space-evenly',
|
||||
alignItems: 'center',
|
||||
width: 400,
|
||||
}}>
|
||||
<Button
|
||||
color={'#ce3029'}
|
||||
title={i18n.t('global.cancel')}
|
||||
onPress={() => this.setState({ showTransferContact: false })}
|
||||
/>
|
||||
<Button
|
||||
color={'#ce3029'}
|
||||
title={i18n.t('contact_s.transfer')}
|
||||
onPress={() => this.transferContact()}
|
||||
/>
|
||||
</View>
|
||||
</View>
|
||||
</Overlay>
|
||||
<Overlay
|
||||
isVisible={this.state.showSendBrochure}
|
||||
windowBackgroundColor="rgba(255, 255, 255, .9)"
|
||||
overlayBackgroundColor="white"
|
||||
width={600}
|
||||
height={500}>
|
||||
<View style={{ flex: 1 }}>
|
||||
<View style={{ flex: 2, flexDirection: 'row' }}>
|
||||
<View
|
||||
style={{
|
||||
flex: 1,
|
||||
alignItems: 'center',
|
||||
justifyContent: 'flex-start',
|
||||
}}>
|
||||
<TextInput
|
||||
style={styles.txtSendBrochure}
|
||||
placeholder={i18n.t('global.email')}
|
||||
autoCompleteType="email"
|
||||
autoCapitalize="none"
|
||||
keyboardType={'email-address'}
|
||||
value={this.state.tmpSendBrochureEmail}
|
||||
onChangeText={text =>
|
||||
this.setState({ tmpSendBrochureEmail: text })
|
||||
}
|
||||
/>
|
||||
<Picker
|
||||
style={{
|
||||
width: 300,
|
||||
marginBottom: 15,
|
||||
paddingLeft: 10,
|
||||
}}
|
||||
selectedValue={this.state.selectedSendBrochureEmail}
|
||||
onValueChange={(itemValue, itemIndex) => {
|
||||
if (itemValue !== '-1') {
|
||||
this.setState({
|
||||
tmpSendBrochureEmail: this.state.sortedEmails[itemIndex - 1]
|
||||
.email,
|
||||
});
|
||||
}
|
||||
}}>
|
||||
<Picker.Item label={i18n.t('contact_s.contact_list') + ' :'} value="-1" />
|
||||
{this.state.sortedEmails.map((item, index) => {
|
||||
return <Picker.Item label={item.email} value={index} key={item.id.toString()} />;
|
||||
})}
|
||||
</Picker>
|
||||
<TextInput
|
||||
style={styles.txtSendBrochure}
|
||||
placeholder={i18n.t('global.subject')}
|
||||
value={this.state.tmpSendBrochureSubject}
|
||||
onChangeText={text =>
|
||||
this.setState({ tmpSendBrochureSubject: text })
|
||||
}
|
||||
/>
|
||||
<TextInput
|
||||
style={styles.textAreaSendBrochure}
|
||||
placeholder={i18n.t('global.message')}
|
||||
value={this.state.tmpSendBrochureMessage}
|
||||
multiline={true}
|
||||
underlineColorAndroid="transparent"
|
||||
onChangeText={text =>
|
||||
this.setState({ tmpSendBrochureMessage: text })
|
||||
}
|
||||
/>
|
||||
<Picker
|
||||
style={{
|
||||
width: 300,
|
||||
marginBottom: 15,
|
||||
paddingLeft: 10,
|
||||
}}
|
||||
selectedValue={this.state.selectedDocument}
|
||||
onValueChange={(itemValue, itemIndex) => {
|
||||
if (
|
||||
itemValue !== '-1' &&
|
||||
this.state.sendDocumentList.length < 8
|
||||
) {
|
||||
let tmp = this.state.sendDocumentList;
|
||||
const toPush = this.state.sortedDocuments[itemIndex - 1];
|
||||
const test = this.state.sendDocumentList.filter(
|
||||
item => item.id === toPush.id,
|
||||
);
|
||||
if (test.length === 0) {
|
||||
tmp.push(toPush);
|
||||
this.setState({
|
||||
sendDocumentList: tmp,
|
||||
});
|
||||
}
|
||||
}
|
||||
}}>
|
||||
<Picker.Item label={i18n.t('contact_s.documents_list') + ' :'} value="-1" />
|
||||
{this.state.sortedDocuments.map((item, index) => {
|
||||
return (
|
||||
<Picker.Item
|
||||
label={
|
||||
item.title + ' (' + item.type.toUpperCase() + ')'
|
||||
}
|
||||
value={index}
|
||||
key={item.id.toString()}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
</Picker>
|
||||
</View>
|
||||
<View
|
||||
style={{
|
||||
flex: 1,
|
||||
borderWidth: 1,
|
||||
borderColor: 'lightgrey',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
width: 600,
|
||||
}}>
|
||||
{this.state.sendDocumentList.map((item, index) => {
|
||||
return (
|
||||
<TouchableOpacity
|
||||
onPress={() => {
|
||||
let tmp = this.state.sendDocumentList;
|
||||
tmp.splice(this.props.documents[index], 1);
|
||||
this.setState({
|
||||
sendDocumentList: tmp,
|
||||
});
|
||||
}}>
|
||||
<View
|
||||
style={{
|
||||
borderWidth: 1,
|
||||
borderColor: 'lightgrey',
|
||||
padding: 5,
|
||||
margin: 5,
|
||||
borderRadius: 5,
|
||||
}}>
|
||||
<Text>
|
||||
{item.title} ({item.type.toUpperCase()}){' '}
|
||||
<FontAwesome5 name="minus" size={15} />
|
||||
</Text>
|
||||
</View>
|
||||
</TouchableOpacity>
|
||||
);
|
||||
})}
|
||||
</View>
|
||||
</View>
|
||||
<View
|
||||
style={{
|
||||
flexDirection: 'row',
|
||||
justifyContent: 'space-evenly',
|
||||
alignItems: 'center',
|
||||
width: 600,
|
||||
marginTop: 15,
|
||||
}}>
|
||||
<Button
|
||||
color={'#ce3029'}
|
||||
title={i18n.t('global.cancel')}
|
||||
onPress={() =>
|
||||
this.setState({
|
||||
showSendBrochure: false,
|
||||
tmpSendBrochureEmail: '',
|
||||
tmpSendBrochureSubject: '',
|
||||
tmpSendBrochureMessage: '',
|
||||
selectedSendBrochureEmail: -1,
|
||||
selectedDocument: -1,
|
||||
sendDocumentList: [],
|
||||
})
|
||||
}
|
||||
/>
|
||||
<Button title={i18n.t('global.send')} onPress={() => this.sendBrochure()} color={'#ce3029'} />
|
||||
</View>
|
||||
</View>
|
||||
</Overlay>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps)(ContactScreen);
|
||||
|
|
@ -33,11 +33,11 @@ class HomeScreen extends React.Component {
|
|||
<Image source={{ uri: FileSystem.documentDirectory + 'HomeButtonImage.png' }} style={styles.btnImg} />
|
||||
<Text style={styles.btnTxt}>{i18n.t('global.videos')}</Text>
|
||||
</TouchableOpacity>
|
||||
<TouchableOpacity onPress={() => { }} style={styles.button}>
|
||||
<TouchableOpacity onPress={() => this.props.navigation.navigate('OnlyVideosScreen')} style={styles.button}>
|
||||
<Image source={{ uri: FileSystem.documentDirectory + 'HomeButtonImage.png' }} style={styles.btnImg} />
|
||||
<Text style={styles.btnTxt}>{i18n.t('global.videos')}</Text>
|
||||
</TouchableOpacity>
|
||||
<TouchableOpacity onPress={() => { }} style={styles.button}>
|
||||
<TouchableOpacity onPress={() => this.props.navigation.navigate('ContactScreen')} style={styles.button}>
|
||||
<Image source={{ uri: FileSystem.documentDirectory + 'HomeButtonImage.png' }} style={styles.btnImg} />
|
||||
<Text style={styles.btnTxt}>{i18n.t('global.contacts')}</Text>
|
||||
</TouchableOpacity>
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ class LoginScreen extends React.Component {
|
|||
return;
|
||||
}
|
||||
const lastUser = Setting.get('lastUser');
|
||||
if (lastUser === false || lastUser === undefined) {
|
||||
if (lastUser === false || lastUser === undefined || lastUser.value === user.id.toString()) {
|
||||
this.loginAction(user);
|
||||
} else {
|
||||
// Si user !== last user && last user not synced
|
||||
|
|
|
|||
60
ComApp/src/App/Views/OnlyVideosScreen.js
Normal file
60
ComApp/src/App/Views/OnlyVideosScreen.js
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
import React from 'react';
|
||||
import {
|
||||
View,
|
||||
ScrollView,
|
||||
TouchableOpacity,
|
||||
Text,
|
||||
} from 'react-native';
|
||||
// Redux
|
||||
import { connect } from 'react-redux';
|
||||
// Icons
|
||||
import FontAwesome5 from 'react-native-vector-icons/FontAwesome5';
|
||||
// Style
|
||||
import styles from '../../Resources/Styles/OnlyVideosStyle';
|
||||
|
||||
function mapStateToProps(state) {
|
||||
return {
|
||||
documents: state.app.documents,
|
||||
};
|
||||
}
|
||||
|
||||
class OnlyVideosScreen extends React.Component {
|
||||
state = {
|
||||
documents: [],
|
||||
};
|
||||
|
||||
componentDidMount() {
|
||||
this.setState({ documents: this.props.documents.filter(tmp => tmp.type === 'mp4') });
|
||||
}
|
||||
|
||||
render() {
|
||||
let documentList = this.state.documents.map(document => {
|
||||
return (
|
||||
<TouchableOpacity
|
||||
key={document.id.toString()}
|
||||
style={styles.file}
|
||||
onPress={() => {
|
||||
this.props.dispatch({ type: 'SET_CURRENT_OPENED_DOC', data: document });
|
||||
this.props.navigation.navigate('VideoScreen', { uuid: document.uuid });
|
||||
}}>
|
||||
{document.type === 'pdf' ? (
|
||||
<FontAwesome5 name="file-pdf" color={'white'} size={60} />
|
||||
) : (
|
||||
<FontAwesome5 name="file-video" color={'white'} size={60} />
|
||||
)}
|
||||
<Text style={styles.fileTxt}>{document.title}</Text>
|
||||
</TouchableOpacity>
|
||||
);
|
||||
});
|
||||
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
<ScrollView style={styles.scrollview}>
|
||||
<View style={styles.filesContainer}>{documentList}</View>
|
||||
</ScrollView>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps)(OnlyVideosScreen);
|
||||
32
ComApp/src/App/Views/VideoScreen.js
Normal file
32
ComApp/src/App/Views/VideoScreen.js
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
import React from 'react';
|
||||
import { View, Dimensions } from 'react-native';
|
||||
// FileSytem
|
||||
import * as FileSystem from 'expo-file-system';
|
||||
// Video
|
||||
import { Video } from 'expo-av';
|
||||
import VideoPlayer from 'expo-video-player';
|
||||
|
||||
class VideoScreen extends React.Component {
|
||||
render() {
|
||||
const { uuid } = this.props.route.params;
|
||||
return (
|
||||
<View>
|
||||
<VideoPlayer
|
||||
height={Dimensions.get('window').height - 100}
|
||||
videoProps={{
|
||||
shouldPlay: true,
|
||||
resizeMode: Video.RESIZE_MODE_COVER,
|
||||
source: {
|
||||
uri: FileSystem.documentDirectory + uuid + '.mp4',
|
||||
},
|
||||
}}
|
||||
showFullscreenButton={false}
|
||||
sliderColor={'#ce3029'}
|
||||
showControlsOnLoad={true}
|
||||
/>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default VideoScreen;
|
||||
43
ComApp/src/Resources/Styles/ContactDetailsStyle.js
Normal file
43
ComApp/src/Resources/Styles/ContactDetailsStyle.js
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
import { StyleSheet } from 'react-native';
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
container: {
|
||||
flex: 1,
|
||||
flexDirection: 'row',
|
||||
},
|
||||
input: {
|
||||
backgroundColor: 'white',
|
||||
margin: 10,
|
||||
padding: 10,
|
||||
},
|
||||
clearCheckbox: {
|
||||
backgroundColor: '#00000000',
|
||||
borderWidth: 0,
|
||||
},
|
||||
clearRadio: {
|
||||
flex: 1,
|
||||
backgroundColor: '#00000000',
|
||||
borderWidth: 0,
|
||||
},
|
||||
select: {
|
||||
flex: 2,
|
||||
margin: 10,
|
||||
backgroundColor: 'white',
|
||||
},
|
||||
textArea: {
|
||||
flex: 1,
|
||||
margin: 10,
|
||||
padding: 10,
|
||||
backgroundColor: 'white',
|
||||
textAlignVertical: 'top',
|
||||
},
|
||||
button: {
|
||||
width: 35,
|
||||
height: 35,
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
margin: 2,
|
||||
},
|
||||
});
|
||||
|
||||
export default styles;
|
||||
76
ComApp/src/Resources/Styles/ContactStyle.js
Normal file
76
ComApp/src/Resources/Styles/ContactStyle.js
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
import { StyleSheet, Dimensions } from 'react-native';
|
||||
|
||||
const { width } = Dimensions.get('window');
|
||||
const styles = StyleSheet.create({
|
||||
container: {
|
||||
flex: 1,
|
||||
flexDirection: 'column',
|
||||
},
|
||||
item: {
|
||||
flexDirection: 'row',
|
||||
justifyContent: 'space-between',
|
||||
alignItems: 'center',
|
||||
borderBottomWidth: 1,
|
||||
padding: 15,
|
||||
marginHorizontal: 15,
|
||||
},
|
||||
clickable: {
|
||||
textAlign: 'center',
|
||||
fontSize: 18,
|
||||
width: width / 4,
|
||||
color: '#ce3029',
|
||||
fontWeight: 'bold'
|
||||
},
|
||||
company: {
|
||||
textAlign: 'center',
|
||||
fontSize: 15,
|
||||
width: width / 4,
|
||||
},
|
||||
email: {
|
||||
textAlign: 'center',
|
||||
fontSize: 15,
|
||||
width: width / 4,
|
||||
},
|
||||
buttons: {
|
||||
justifyContent: 'center',
|
||||
flexDirection: 'row',
|
||||
fontSize: 15,
|
||||
width: width / 4,
|
||||
},
|
||||
button: {
|
||||
width: 35,
|
||||
height: 35,
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
margin: 2,
|
||||
},
|
||||
txtSendBrochure: {
|
||||
borderWidth: 1,
|
||||
borderColor: 'lightgrey',
|
||||
width: 280,
|
||||
marginBottom: 5,
|
||||
paddingLeft: 10,
|
||||
},
|
||||
textAreaSendBrochure: {
|
||||
borderWidth: 1,
|
||||
borderColor: 'lightgrey',
|
||||
width: 280,
|
||||
height: 150,
|
||||
marginBottom: 5,
|
||||
paddingLeft: 10,
|
||||
textAlignVertical: 'top',
|
||||
},
|
||||
inputSearch: {
|
||||
backgroundColor: 'white',
|
||||
width: 200,
|
||||
paddingLeft: 20
|
||||
},
|
||||
btnSearch: {
|
||||
width: 50,
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
backgroundColor: '#ce3029'
|
||||
}
|
||||
});
|
||||
|
||||
export default styles;
|
||||
34
ComApp/src/Resources/Styles/OnlyVideosStyle.js
Normal file
34
ComApp/src/Resources/Styles/OnlyVideosStyle.js
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
import { StyleSheet } from 'react-native';
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
container: {
|
||||
flex: 1,
|
||||
flexDirection: 'row',
|
||||
},
|
||||
scrollview: {
|
||||
flex: 2,
|
||||
},
|
||||
filesContainer: {
|
||||
flex: 1,
|
||||
flexDirection: 'row',
|
||||
flexWrap: 'wrap',
|
||||
justifyContent: 'center',
|
||||
},
|
||||
file: {
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
height: 200,
|
||||
width: 180,
|
||||
backgroundColor: '#ce3029',
|
||||
margin: 10,
|
||||
},
|
||||
fileTxt: {
|
||||
textAlign: 'center',
|
||||
color: 'white',
|
||||
fontWeight: 'bold',
|
||||
fontSize: 18,
|
||||
padding: 5
|
||||
}
|
||||
});
|
||||
|
||||
export default styles;
|
||||
169
ComApp/yarn.lock
169
ComApp/yarn.lock
|
|
@ -2060,6 +2060,18 @@
|
|||
"resolved" "https://registry.npmjs.org/@react-native-community/netinfo/-/netinfo-9.3.2.tgz"
|
||||
"version" "9.3.2"
|
||||
|
||||
"@react-native-community/slider@^4.3.2", "@react-native-community/slider@>=4.0.0":
|
||||
"integrity" "sha512-pKIx+l3yFQAVMcqGsnRcJAqZbVeR69CRbW85nZHhLuR/mOT0NbKWJIAEy7MC+e84DMTw0RJnEflRQO2/j8wcxQ=="
|
||||
"resolved" "https://registry.npmjs.org/@react-native-community/slider/-/slider-4.3.2.tgz"
|
||||
"version" "4.3.2"
|
||||
dependencies:
|
||||
"@types/react-test-renderer" "^18.0.0"
|
||||
|
||||
"@react-native-picker/picker@^2.4.6":
|
||||
"integrity" "sha512-TyrQZKwi7tbGbETxpQpaf0Jld6Fw/RRWVPAShRobTUWwUglveP71mtdLwuNJV+1NXI6PqW/OvCEk9ZmFfGj0fQ=="
|
||||
"resolved" "https://registry.npmjs.org/@react-native-picker/picker/-/picker-2.4.6.tgz"
|
||||
"version" "2.4.6"
|
||||
|
||||
"@react-native/assets@1.0.0":
|
||||
"integrity" "sha512-KrwSpS1tKI70wuKl68DwJZYEvXktDHdZMG0k2AXD/rJVSlB23/X2CB2cutVR0HwNMJIal9HOUOBB2rVfa6UGtQ=="
|
||||
"resolved" "https://registry.npmjs.org/@react-native/assets/-/assets-1.0.0.tgz"
|
||||
|
|
@ -2122,6 +2134,35 @@
|
|||
"resolved" "https://registry.npmjs.org/@realm.io/common/-/common-0.1.5.tgz"
|
||||
"version" "0.1.5"
|
||||
|
||||
"@rneui/base-edge@github:react-native-elements/react-native-elements#base":
|
||||
"resolved" "git+ssh://git@github.com/react-native-elements/react-native-elements.git#9ab2c462fc905e606bc6372e8f516cdd10f12ceb"
|
||||
"version" "4.0.0-rc.6"
|
||||
dependencies:
|
||||
"@types/react-native-vector-icons" "^6.4.10"
|
||||
"color" "^3.2.1"
|
||||
"deepmerge" "^4.2.2"
|
||||
"hoist-non-react-statics" "^3.3.2"
|
||||
"react-native-ratings" "^8.1.0"
|
||||
"react-native-size-matters" "^0.4.0"
|
||||
|
||||
"@rneui/base@^0.0.0-edge.2":
|
||||
"integrity" "sha512-MFyiK0Kz23v5mwOUotZdD8cudREa0t9lFwb2+6MyyG1SN2I8CUyqqsZBBwUMInXbspeOtJGtWOPv61TM/2esFQ=="
|
||||
"resolved" "https://registry.npmjs.org/@rneui/base/-/base-0.0.0-edge.2.tgz"
|
||||
"version" "0.0.0-edge.2"
|
||||
dependencies:
|
||||
"@rneui/base-edge" "github:react-native-elements/react-native-elements#base"
|
||||
|
||||
"@rneui/themed-edge@github:react-native-elements/react-native-elements#themed":
|
||||
"resolved" "git+ssh://git@github.com/react-native-elements/react-native-elements.git#c6336871730b0624a41c91267f06ad61dc7ea2ca"
|
||||
"version" "4.0.0-rc.6"
|
||||
|
||||
"@rneui/themed@^0.0.0-edge.2":
|
||||
"integrity" "sha512-MnsZarge+2V1//ov9jCAxkKzjS5RejZf/eRpE9tVOmvDZeEO1Q/9LIV00ZJxEHnjJHpozs5UvBkwb8KAwFL/0Q=="
|
||||
"resolved" "https://registry.npmjs.org/@rneui/themed/-/themed-0.0.0-edge.2.tgz"
|
||||
"version" "0.0.0-edge.2"
|
||||
dependencies:
|
||||
"@rneui/themed-edge" "github:react-native-elements/react-native-elements#themed"
|
||||
|
||||
"@segment/loosely-validate-event@^2.0.0":
|
||||
"integrity" "sha512-ZMCSfztDBqwotkl848ODgVcAmN4OItEWDCkshcKz0/W6gGSQayuuCtWV/MlodFivAZD793d6UgANd6wCXUfrIw=="
|
||||
"resolved" "https://registry.npmjs.org/@segment/loosely-validate-event/-/loosely-validate-event-2.0.0.tgz"
|
||||
|
|
@ -2266,6 +2307,28 @@
|
|||
"resolved" "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz"
|
||||
"version" "15.7.5"
|
||||
|
||||
"@types/react-native-vector-icons@^6.4.10":
|
||||
"integrity" "sha512-gSXtv3NMOsRwSXJ/gvGebm7CNjHbkeFKCse9h/Pvi+x2yjCLOkJR1FBfec06DhaFJpsK7Y8WRQpwOS0eLqx5Rg=="
|
||||
"resolved" "https://registry.npmjs.org/@types/react-native-vector-icons/-/react-native-vector-icons-6.4.12.tgz"
|
||||
"version" "6.4.12"
|
||||
dependencies:
|
||||
"@types/react" "*"
|
||||
"@types/react-native" "*"
|
||||
|
||||
"@types/react-native@*":
|
||||
"integrity" "sha512-z5tKfblHLG6jts2AQcioDw4N+F2EzflO9n495yNyqyMYRkSIVTLX64MHBeqMp5wfOY5mshy0GsOgnFSXrXKQSg=="
|
||||
"resolved" "https://registry.npmjs.org/@types/react-native/-/react-native-0.70.4.tgz"
|
||||
"version" "0.70.4"
|
||||
dependencies:
|
||||
"@types/react" "*"
|
||||
|
||||
"@types/react-test-renderer@^18.0.0":
|
||||
"integrity" "sha512-C7/5FBJ3g3sqUahguGi03O79b8afNeSD6T8/GU50oQrJCU0bVCCGQHaGKUbg2Ce8VQEEqTw8/HiS6lXHHdgkdQ=="
|
||||
"resolved" "https://registry.npmjs.org/@types/react-test-renderer/-/react-test-renderer-18.0.0.tgz"
|
||||
"version" "18.0.0"
|
||||
dependencies:
|
||||
"@types/react" "*"
|
||||
|
||||
"@types/react@*", "@types/react@^16.8 || ^17.0 || ^18.0":
|
||||
"integrity" "sha512-7QUCOxvFgnD5Jk8ZKlUAhVcRj7GuJRjnjjiY/IUBWKgOlnvDvTMLD4RTF7NPyVmbRhNrbomZiOepg7M/2Kj1mA=="
|
||||
"resolved" "https://registry.npmjs.org/@types/react/-/react-18.0.21.tgz"
|
||||
|
|
@ -3484,6 +3547,13 @@
|
|||
dependencies:
|
||||
"color-name" "1.1.3"
|
||||
|
||||
"color-convert@^1.9.3":
|
||||
"integrity" "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg=="
|
||||
"resolved" "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz"
|
||||
"version" "1.9.3"
|
||||
dependencies:
|
||||
"color-name" "1.1.3"
|
||||
|
||||
"color-convert@^2.0.1":
|
||||
"integrity" "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ=="
|
||||
"resolved" "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz"
|
||||
|
|
@ -3491,7 +3561,7 @@
|
|||
dependencies:
|
||||
"color-name" "~1.1.4"
|
||||
|
||||
"color-name@~1.1.4":
|
||||
"color-name@^1.0.0", "color-name@~1.1.4":
|
||||
"integrity" "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
|
||||
"resolved" "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz"
|
||||
"version" "1.1.4"
|
||||
|
|
@ -3501,9 +3571,25 @@
|
|||
"resolved" "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz"
|
||||
"version" "1.1.3"
|
||||
|
||||
"color-string@^1.6.0":
|
||||
"integrity" "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg=="
|
||||
"resolved" "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz"
|
||||
"version" "1.9.1"
|
||||
dependencies:
|
||||
"color-name" "^1.0.0"
|
||||
"simple-swizzle" "^0.2.2"
|
||||
|
||||
"color-support@^1.1.3":
|
||||
"version" "1.1.3"
|
||||
|
||||
"color@^3.2.1":
|
||||
"integrity" "sha512-aBl7dZI9ENN6fUGC7mWpMTPNHmWUSNan9tuWN6ahh5ZLNk9baLJOnSMlrQkHcrfFgz2/RigjUVAjdx36VcemKA=="
|
||||
"resolved" "https://registry.npmjs.org/color/-/color-3.2.1.tgz"
|
||||
"version" "3.2.1"
|
||||
dependencies:
|
||||
"color-convert" "^1.9.3"
|
||||
"color-string" "^1.6.0"
|
||||
|
||||
"colorette@^1.0.7":
|
||||
"integrity" "sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g=="
|
||||
"resolved" "https://registry.npmjs.org/colorette/-/colorette-1.4.0.tgz"
|
||||
|
|
@ -4551,6 +4637,21 @@
|
|||
"path-browserify" "^1.0.0"
|
||||
"url-parse" "^1.5.9"
|
||||
|
||||
"expo-av@^12.0.4", "expo-av@>=5.0.2":
|
||||
"integrity" "sha512-wq3wx6J1aacZEPZce9TK1+o4YTAOWyb5cJ4CqfsgHcXeUdHyO3qbva/5uecigpEYlCxOlWYFhAz2T0dQ7nWSpQ=="
|
||||
"resolved" "https://registry.npmjs.org/expo-av/-/expo-av-12.0.4.tgz"
|
||||
"version" "12.0.4"
|
||||
dependencies:
|
||||
"@expo/config-plugins" "~5.0.0"
|
||||
|
||||
"expo-barcode-scanner@^11.4.0":
|
||||
"integrity" "sha512-Q4BreQHY5U1aGF+rfqeGSzcdlayTKnSe/qTIfkXTmXFsL7bu3hMqdh5J/DL00Dfmc7C0IR8EiV75rqRrY4t0nA=="
|
||||
"resolved" "https://registry.npmjs.org/expo-barcode-scanner/-/expo-barcode-scanner-11.4.0.tgz"
|
||||
"version" "11.4.0"
|
||||
dependencies:
|
||||
"@expo/config-plugins" "~5.0.0"
|
||||
"expo-image-loader" "~3.2.0"
|
||||
|
||||
"expo-constants@~13.2.2", "expo-constants@~13.2.4":
|
||||
"integrity" "sha512-Zobau8EuTk2GgafwkfGnWM6CmSLB7X8qnQXVuXe0nd3v92hfQUmRWGhJwH88uxXj3LrfqctM6PaJ8taG1vxfBw=="
|
||||
"resolved" "https://registry.npmjs.org/expo-constants/-/expo-constants-13.2.4.tgz"
|
||||
|
|
@ -4579,6 +4680,11 @@
|
|||
dependencies:
|
||||
"fontfaceobserver" "^2.1.0"
|
||||
|
||||
"expo-image-loader@~3.2.0":
|
||||
"integrity" "sha512-LU3Q2prn64/HxdToDmxgMIRXS1ZvD9Q3iCxRVTZn1fPQNNDciIQFE5okaa74Ogx20DFHs90r6WoUd7w9Af1OGQ=="
|
||||
"resolved" "https://registry.npmjs.org/expo-image-loader/-/expo-image-loader-3.2.0.tgz"
|
||||
"version" "3.2.0"
|
||||
|
||||
"expo-keep-awake@~10.2.0":
|
||||
"integrity" "sha512-kIRtO4Hmrvxh4E45IPWG/NiUZsuRe1AQwBT09pq+kx8nm6tUS4B9TeL6+1NFy+qVBLbGKDqoQD5Ez7XYTFtBeQ=="
|
||||
"resolved" "https://registry.npmjs.org/expo-keep-awake/-/expo-keep-awake-10.2.0.tgz"
|
||||
|
|
@ -4603,7 +4709,14 @@
|
|||
"compare-versions" "^3.4.0"
|
||||
"invariant" "^2.2.4"
|
||||
|
||||
"expo@*", "expo@^46.0.13":
|
||||
"expo-video-player@^2.2.0":
|
||||
"integrity" "sha512-DDai4zmTF265EHOagnWWA22o/xwP4FI1YVUzhTibN5vB3nLqSL9ABBI+H++I9T0p7sCRgQhgoy4whaWWcN4ZfQ=="
|
||||
"resolved" "https://registry.npmjs.org/expo-video-player/-/expo-video-player-2.2.0.tgz"
|
||||
"version" "2.2.0"
|
||||
dependencies:
|
||||
"tslib" "^2.4.0"
|
||||
|
||||
"expo@*", "expo@^46.0.13", "expo@>=38.0.0":
|
||||
"integrity" "sha512-xaU8GlJ7j3vo1U5tSbFDsoJqUfTkRF4XDEUj/Dr/jqUf0GcvlMKuGe6HvnbMO9slxYQlYlWJUzvlAx38TLhxyA=="
|
||||
"resolved" "https://registry.npmjs.org/expo/-/expo-46.0.13.tgz"
|
||||
"version" "46.0.13"
|
||||
|
|
@ -5680,6 +5793,11 @@
|
|||
"resolved" "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz"
|
||||
"version" "0.2.1"
|
||||
|
||||
"is-arrayish@^0.3.1":
|
||||
"integrity" "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ=="
|
||||
"resolved" "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz"
|
||||
"version" "0.3.2"
|
||||
|
||||
"is-bigint@^1.0.1":
|
||||
"integrity" "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg=="
|
||||
"resolved" "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz"
|
||||
|
|
@ -8886,11 +9004,24 @@
|
|||
"jscodeshift" "^0.13.1"
|
||||
"nullthrows" "^1.1.1"
|
||||
|
||||
"react-native-flash-message@^0.3.1":
|
||||
"integrity" "sha512-PswNvDdHBOavmIM7G4loLuEwML3oB8E8wVCuOPQ0Q6hRbExwTaF6gsTJvo5fQkyUsCi27ainSkL/F0ZijIkVig=="
|
||||
"resolved" "https://registry.npmjs.org/react-native-flash-message/-/react-native-flash-message-0.3.1.tgz"
|
||||
"version" "0.3.1"
|
||||
dependencies:
|
||||
"prop-types" "^15.8.1"
|
||||
"react-native-iphone-x-helper" "^1.3.1"
|
||||
|
||||
"react-native-gradle-plugin@^0.70.3":
|
||||
"integrity" "sha512-oOanj84fJEXUg9FoEAQomA8ISG+DVIrTZ3qF7m69VQUJyOGYyDZmPqKcjvRku4KXlEH6hWO9i4ACLzNBh8gC0A=="
|
||||
"resolved" "https://registry.npmjs.org/react-native-gradle-plugin/-/react-native-gradle-plugin-0.70.3.tgz"
|
||||
"version" "0.70.3"
|
||||
|
||||
"react-native-iphone-x-helper@^1.3.1":
|
||||
"integrity" "sha512-HOf0jzRnq2/aFUcdCJ9w9JGzN3gdEg0zFE4FyYlp4jtidqU03D5X7ZegGKfT1EWteR0gPBGp9ye5T5FvSWi9Yg=="
|
||||
"resolved" "https://registry.npmjs.org/react-native-iphone-x-helper/-/react-native-iphone-x-helper-1.3.1.tgz"
|
||||
"version" "1.3.1"
|
||||
|
||||
"react-native-pdf@^6.6.2":
|
||||
"integrity" "sha512-gqxNPSzL0lNN1dGYAz9ObSLb0shUTB8x1u69qKLMSmwuxFTpGui5PNNgpH8q/nlpL9zBzMVVc/AXEuDCwRyxEQ=="
|
||||
"resolved" "https://registry.npmjs.org/react-native-pdf/-/react-native-pdf-6.6.2.tgz"
|
||||
|
|
@ -8906,7 +9037,14 @@
|
|||
dependencies:
|
||||
"prop-types" "^15.7.2"
|
||||
|
||||
"react-native-safe-area-context@^4.4.1", "react-native-safe-area-context@>= 3.0.0":
|
||||
"react-native-ratings@^8.1.0":
|
||||
"integrity" "sha512-+QOJ4G3NjVkI1D+tk4EGx1dCvVfbD2nQdkrj9cXrcAoEiwmbep4z4bZbCKmWMpQ5h2dqbxABU8/eBnbDmvAc3g=="
|
||||
"resolved" "https://registry.npmjs.org/react-native-ratings/-/react-native-ratings-8.1.0.tgz"
|
||||
"version" "8.1.0"
|
||||
dependencies:
|
||||
"lodash" "^4.17.15"
|
||||
|
||||
"react-native-safe-area-context@^3.1.9 || ^4.0.0", "react-native-safe-area-context@^4.4.1", "react-native-safe-area-context@>= 3.0.0":
|
||||
"integrity" "sha512-N9XTjiuD73ZpVlejHrUWIFZc+6Z14co1K/p1IFMkImU7+avD69F3y+lhkqA2hN/+vljdZrBSiOwXPkuo43nFQA=="
|
||||
"resolved" "https://registry.npmjs.org/react-native-safe-area-context/-/react-native-safe-area-context-4.4.1.tgz"
|
||||
"version" "4.4.1"
|
||||
|
|
@ -8919,6 +9057,11 @@
|
|||
"react-freeze" "^1.0.0"
|
||||
"warn-once" "^0.1.0"
|
||||
|
||||
"react-native-size-matters@^0.4.0":
|
||||
"integrity" "sha512-8/C0htHrFWeUm9N8JegmadovUfgTWkGBkDPZ1N3YkXtDWb+98Ya2gThiKcu445r8c7YhcrBfnHz/mYsXIusaOQ=="
|
||||
"resolved" "https://registry.npmjs.org/react-native-size-matters/-/react-native-size-matters-0.4.0.tgz"
|
||||
"version" "0.4.0"
|
||||
|
||||
"react-native-svg@*", "react-native-svg@^13.2.0":
|
||||
"integrity" "sha512-bDvMeFReA3F9pVp0EhACPrEerRcITzTu9N2m2lAPinhIMVvwzGzVXyFsXI8fCMSoeOIh+77hKvukoCedh06tLw=="
|
||||
"resolved" "https://registry.npmjs.org/react-native-svg/-/react-native-svg-13.2.0.tgz"
|
||||
|
|
@ -8927,7 +9070,7 @@
|
|||
"css-select" "^5.1.0"
|
||||
"css-tree" "^1.1.3"
|
||||
|
||||
"react-native-vector-icons@^9.2.0":
|
||||
"react-native-vector-icons@^9.2.0", "react-native-vector-icons@>7.0.0":
|
||||
"integrity" "sha512-wKYLaFuQST/chH3AJRjmOLoLy3JEs1JR6zMNgTaemFpNoXs0ztRnTxcxFD9xhX7cJe1/zoN5BpQYe7kL0m5yyA=="
|
||||
"resolved" "https://registry.npmjs.org/react-native-vector-icons/-/react-native-vector-icons-9.2.0.tgz"
|
||||
"version" "9.2.0"
|
||||
|
|
@ -8935,7 +9078,7 @@
|
|||
"prop-types" "^15.7.2"
|
||||
"yargs" "^16.1.1"
|
||||
|
||||
"react-native@*", "react-native@>=0.59", "react-native@>=0.70.0", "react-native@0.70.1":
|
||||
"react-native@*", "react-native@>=0.42.0", "react-native@>=0.57", "react-native@>=0.59", "react-native@>=0.70.0", "react-native@0.70.1":
|
||||
"integrity" "sha512-AUh4NZLFdvyjSiYWCtTROCrC7loxeeZ/TzBnkZwp3kb9XmMu7/kzvWn2c5sEMnzW7X/0JSul8jXexGVdpnCoSA=="
|
||||
"resolved" "https://registry.npmjs.org/react-native/-/react-native-0.70.1.tgz"
|
||||
"version" "0.70.1"
|
||||
|
|
@ -9007,7 +9150,7 @@
|
|||
"react-shallow-renderer" "^16.15.0"
|
||||
"scheduler" "^0.22.0"
|
||||
|
||||
"react@*", "react@^16.0.0 || ^17.0.0 || ^18.0.0", "react@^16.8 || ^17.0 || ^18.0", "react@^16.8.0 || ^17.0.0 || ^18.0.0", "react@^18.1.0", "react@>=17.0.0", "react@18.1.0":
|
||||
"react@*", "react@^16.0.0 || ^17.0.0 || ^18.0.0", "react@^16.8 || ^17.0 || ^18.0", "react@^16.8.0 || ^17.0.0 || ^18.0.0", "react@^18.1.0", "react@>=16", "react@>=17.0.0", "react@18.1.0":
|
||||
"integrity" "sha512-4oL8ivCz5ZEPyclFQXaNksK3adutVS8l2xzZU0cqEFrE9Sb7fC0EFK5uEk74wIreL1DERyjvsU915j1pcT2uEQ=="
|
||||
"resolved" "https://registry.npmjs.org/react/-/react-18.1.0.tgz"
|
||||
"version" "18.1.0"
|
||||
|
|
@ -9703,6 +9846,13 @@
|
|||
"bplist-parser" "0.3.1"
|
||||
"plist" "^3.0.5"
|
||||
|
||||
"simple-swizzle@^0.2.2":
|
||||
"integrity" "sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg=="
|
||||
"resolved" "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz"
|
||||
"version" "0.2.2"
|
||||
dependencies:
|
||||
"is-arrayish" "^0.3.1"
|
||||
|
||||
"sisteransi@^1.0.5":
|
||||
"integrity" "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg=="
|
||||
"resolved" "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz"
|
||||
|
|
@ -10420,7 +10570,7 @@
|
|||
"resolved" "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz"
|
||||
"version" "1.14.1"
|
||||
|
||||
"tslib@^2.0.1", "tslib@^2.1.0":
|
||||
"tslib@^2.0.1", "tslib@^2.1.0", "tslib@^2.4.0":
|
||||
"integrity" "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ=="
|
||||
"resolved" "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz"
|
||||
"version" "2.4.0"
|
||||
|
|
@ -10795,6 +10945,11 @@
|
|||
"resolved" "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz"
|
||||
"version" "1.1.2"
|
||||
|
||||
"vcard-parser@^1.0.0":
|
||||
"integrity" "sha512-rSEjrjBK3of4VimMR5vBjLLcN5ZCSp9yuVzyx5i4Fwx74Yd0s+DnHtSit/wAAtj1a7/T/qQc0ykwXADoD0+fTQ=="
|
||||
"resolved" "https://registry.npmjs.org/vcard-parser/-/vcard-parser-1.0.0.tgz"
|
||||
"version" "1.0.0"
|
||||
|
||||
"verror@1.10.0":
|
||||
"integrity" "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw=="
|
||||
"resolved" "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue