@supportworks/multi-imagepicker 6.0.0 → 7.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/changes.md +5 -0
- package/index.js +15 -9
- package/package.json +2 -2
- package/src/components/ActionBar.js +104 -0
- package/src/components/AddImages.js +473 -304
- package/src/components/ImageDetailsModal.js +134 -0
- package/src/components/ImageIndicators.js +85 -0
- package/src/components/MultiImagePicker.js +284 -264
- package/src/components/SelectedImages.js +130 -67
- package/src/components/SingleImage.js +320 -182
- package/src/components/UploadWarningModal.js +105 -0
- package/src/components/loaderHandler.js +5 -5
- package/src/lib/MIPickerApi.js +78 -39
package/changes.md
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
|
|
2
|
+
# v7.0.0 2025-11-21
|
|
3
|
+
* converted components to functional components
|
|
4
|
+
* made significant UI updates based on DEV-7191 (Photos To Add)
|
|
5
|
+
* this version likely only useful for RN <= 0.72 due to SafeAreaView changes later
|
|
6
|
+
|
|
2
7
|
# v6.0.0 2025-06-08
|
|
3
8
|
* removed runtime permissions request for android photos and videos, as necessary for Google Play Store compliance
|
|
4
9
|
|
package/index.js
CHANGED
|
@@ -1,11 +1,17 @@
|
|
|
1
|
-
import MultiImagePicker from './src/components/MultiImagePicker'
|
|
2
|
-
import SelectedImages from './src/components/SelectedImages'
|
|
3
|
-
import AddImages from
|
|
4
|
-
import MIPickerApi from
|
|
1
|
+
import MultiImagePicker from './src/components/MultiImagePicker'
|
|
2
|
+
import SelectedImages from './src/components/SelectedImages'
|
|
3
|
+
import AddImages from './src/components/AddImages'
|
|
4
|
+
import MIPickerApi from './src/lib/MIPickerApi'
|
|
5
|
+
import ImageIndicators from './src/components/ImageIndicators'
|
|
6
|
+
import ActionBar from './src/components/ActionBar'
|
|
7
|
+
import ImageDetailsModal from './src/components/ImageDetailsModal'
|
|
5
8
|
|
|
6
9
|
export {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
MultiImagePicker,
|
|
11
|
+
SelectedImages,
|
|
12
|
+
AddImages,
|
|
13
|
+
MIPickerApi,
|
|
14
|
+
ImageIndicators,
|
|
15
|
+
ActionBar,
|
|
16
|
+
ImageDetailsModal
|
|
17
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@supportworks/multi-imagepicker",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.1",
|
|
4
4
|
"description": "Android and iOS customized multiple image picker. For react-native >= 0.60.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"author": {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"@supportworks/analytics": ">=1.0.1",
|
|
18
18
|
"@supportworks/api-core": ">=1.0.9",
|
|
19
19
|
"@supportworks/app-styler": ">=1.0.6",
|
|
20
|
-
"@supportworks/core-controls": ">=
|
|
20
|
+
"@supportworks/core-controls": ">=5.0.0",
|
|
21
21
|
"@supportworks/icon-library": ">=1.4.3",
|
|
22
22
|
"@supportworks/navbars": ">=0.1.3",
|
|
23
23
|
"@supportworks/swmaterialdesign": ">=1.1.3",
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import * as React from 'react'
|
|
2
|
+
import { View, TouchableOpacity, StyleSheet } from 'react-native'
|
|
3
|
+
import { Icons } from '@supportworks/icon-library'
|
|
4
|
+
import { colors } from '@supportworks/app-styler'
|
|
5
|
+
|
|
6
|
+
const ActionBar = (
|
|
7
|
+
{
|
|
8
|
+
onPressTrash = null,
|
|
9
|
+
onPressDetails = null,
|
|
10
|
+
saveToDevice = false,
|
|
11
|
+
allowSaveToDevice = null,
|
|
12
|
+
onToggleSaveToDevice = null,
|
|
13
|
+
annotationAllowed = false,
|
|
14
|
+
onAnnotate = null,
|
|
15
|
+
allowShowToCustomer = null,
|
|
16
|
+
showToCust = false,
|
|
17
|
+
onToggleShowToCust = null,
|
|
18
|
+
trashDisabled = false,
|
|
19
|
+
style = null
|
|
20
|
+
}) => {
|
|
21
|
+
return (
|
|
22
|
+
<View style={[styles.ActionBar, style]}>
|
|
23
|
+
<View style={styles.LeftGroup}>
|
|
24
|
+
<TouchableOpacity
|
|
25
|
+
style={[styles.IconContainer, styles.IconContainerFirst, trashDisabled && styles.IconDisabled]}
|
|
26
|
+
onPress={onPressTrash}
|
|
27
|
+
disabled={trashDisabled}
|
|
28
|
+
>
|
|
29
|
+
<Icons.IconTrash2_WithPad />
|
|
30
|
+
</TouchableOpacity>
|
|
31
|
+
</View>
|
|
32
|
+
<View style={styles.RightGroup}>
|
|
33
|
+
{false && <TouchableOpacity style={styles.IconContainer} onPress={onPressDetails}>
|
|
34
|
+
<Icons.IconArrowRightTop />
|
|
35
|
+
</TouchableOpacity>}
|
|
36
|
+
<TouchableOpacity style={styles.IconContainer} onPress={onPressDetails}>
|
|
37
|
+
<Icons.IconNotesWrite />
|
|
38
|
+
</TouchableOpacity>
|
|
39
|
+
{allowSaveToDevice && (
|
|
40
|
+
<TouchableOpacity
|
|
41
|
+
style={styles.IconContainer}
|
|
42
|
+
onPress={onToggleSaveToDevice}
|
|
43
|
+
>
|
|
44
|
+
{saveToDevice
|
|
45
|
+
? <Icons.IconDownloadDone2 fill={colors.buttonPrimary} fillOpacity={1} />
|
|
46
|
+
: <Icons.IconSave_WithPad />}
|
|
47
|
+
</TouchableOpacity>
|
|
48
|
+
)}
|
|
49
|
+
{annotationAllowed && (
|
|
50
|
+
<TouchableOpacity style={styles.IconContainer} onPress={onAnnotate}>
|
|
51
|
+
<Icons.IconAnnotate />
|
|
52
|
+
</TouchableOpacity>
|
|
53
|
+
)}
|
|
54
|
+
{allowShowToCustomer && <TouchableOpacity
|
|
55
|
+
style={[styles.IconContainer, styles.IconContainerLast]}
|
|
56
|
+
onPress={onToggleShowToCust}
|
|
57
|
+
>
|
|
58
|
+
{showToCust
|
|
59
|
+
? <Icons.IconSeen fill={colors.buttonPrimary} fillOpacity={1} />
|
|
60
|
+
: <Icons.IconEyeOutline_WithPad />}
|
|
61
|
+
</TouchableOpacity>}
|
|
62
|
+
</View>
|
|
63
|
+
</View>
|
|
64
|
+
)
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
const styles = StyleSheet.create({
|
|
68
|
+
ActionBar: {
|
|
69
|
+
flexDirection: 'row',
|
|
70
|
+
alignItems: 'center',
|
|
71
|
+
justifyContent: 'space-between',
|
|
72
|
+
marginTop: 8
|
|
73
|
+
},
|
|
74
|
+
LeftGroup: {
|
|
75
|
+
flexDirection: 'row',
|
|
76
|
+
alignItems: 'center',
|
|
77
|
+
justifyContent: 'flex-start',
|
|
78
|
+
flex: 1
|
|
79
|
+
},
|
|
80
|
+
RightGroup: {
|
|
81
|
+
flexDirection: 'row',
|
|
82
|
+
alignItems: 'center',
|
|
83
|
+
justifyContent: 'flex-end',
|
|
84
|
+
flex: 1
|
|
85
|
+
},
|
|
86
|
+
IconContainer: {
|
|
87
|
+
alignItems: 'center',
|
|
88
|
+
justifyContent: 'center',
|
|
89
|
+
width: 40,
|
|
90
|
+
height: 40,
|
|
91
|
+
marginHorizontal: 4
|
|
92
|
+
},
|
|
93
|
+
IconContainerFirst: {
|
|
94
|
+
marginLeft: 0
|
|
95
|
+
},
|
|
96
|
+
IconContainerLast: {
|
|
97
|
+
marginRight: 0
|
|
98
|
+
},
|
|
99
|
+
IconDisabled: {
|
|
100
|
+
opacity: 0.32
|
|
101
|
+
}
|
|
102
|
+
})
|
|
103
|
+
|
|
104
|
+
export default ActionBar
|