@supportworks/multi-imagepicker 7.0.0 → 7.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/changes.md +1 -0
- package/package.json +1 -1
- package/src/components/SelectedImages.js +1 -0
- package/TestMIP.js +0 -103
package/changes.md
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* converted components to functional components
|
|
4
4
|
* made significant UI updates based on DEV-7191 (Photos To Add)
|
|
5
5
|
* this version likely only useful for RN <= 0.72 due to SafeAreaView changes later
|
|
6
|
+
* plus, this v7 does not have the CameraModal that v8 has, so can't use that in RN 72, non-expo apps
|
|
6
7
|
|
|
7
8
|
# v6.0.0 2025-06-08
|
|
8
9
|
* removed runtime permissions request for android photos and videos, as necessary for Google Play Store compliance
|
package/package.json
CHANGED
package/TestMIP.js
DELETED
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { Text, View, StyleSheet } from 'react-native'
|
|
3
|
-
import AddImages from './src/components/AddImages'
|
|
4
|
-
// import { AddImages as AddImagesOLD } from '../../../../node_modules/@supportworks/multi-imagepicker/index'
|
|
5
|
-
import Project from '../../../lib/Project'
|
|
6
|
-
import { SafeAreaView } from 'react-native-safe-area-context'
|
|
7
|
-
import { CommonButton } from '@supportworks/core-controls'
|
|
8
|
-
import { MultiImagePicker } from './index'
|
|
9
|
-
import { colors } from '@supportworks/app-styler'
|
|
10
|
-
import AsyncStorage from '@react-native-async-storage/async-storage'
|
|
11
|
-
|
|
12
|
-
export class TestMIP extends React.Component {
|
|
13
|
-
constructor (props) {
|
|
14
|
-
super(props)
|
|
15
|
-
this.onImagesAddedAI = this.onImagesAddedAI.bind(this)
|
|
16
|
-
this.onImagesAddedMIP = this.onImagesAddedMIP.bind(this)
|
|
17
|
-
this.addOnePictureToProject = this.addOnePictureToProject.bind(this)
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
triggerAction () {
|
|
21
|
-
this.addImages.triggerAction()
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
/* triggerActionOLD () {
|
|
25
|
-
this.addImagesOLD.triggerAction()
|
|
26
|
-
} */
|
|
27
|
-
|
|
28
|
-
onImagesAddedAI () {
|
|
29
|
-
// callback from AddImages, after images added
|
|
30
|
-
const cRef = this
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
addOnePictureToProject (imgObj, description, prospect) {
|
|
34
|
-
console.log('-----TestMIP addOnePictureToProject, imgObj: ' + JSON.stringify(imgObj))
|
|
35
|
-
console.log('-----TestMIP addOnePictureToProject, description: ' + description)
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
onImagesAddedMIP (payload) {
|
|
39
|
-
// callback from MultiImagePicker, after images added
|
|
40
|
-
const cRef = this
|
|
41
|
-
|
|
42
|
-
const imgArr = payload.imageArray
|
|
43
|
-
const imgDescArr = payload.imageDescArray
|
|
44
|
-
const imgValidArr = payload.imageValidArray
|
|
45
|
-
console.log('-----TestMIP onImagesAddedMIP: ' + JSON.stringify(payload))
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
render () {
|
|
49
|
-
const cRef = this
|
|
50
|
-
|
|
51
|
-
return (
|
|
52
|
-
<SafeAreaView>
|
|
53
|
-
<View style={{ padding: 16 }}>
|
|
54
|
-
<CommonButton variant='filled' size='large' label='Open Multi Image Picker - AddImages' onPress={() => cRef.triggerAction()} />
|
|
55
|
-
</View>
|
|
56
|
-
<AddImages
|
|
57
|
-
ref={o => cRef.addImages = o} prospectInst={Project} callback={cRef.onImagesAddedAI}
|
|
58
|
-
annotationAllowed
|
|
59
|
-
showToCustomerAllowed
|
|
60
|
-
addPicture={(imgObj, description, prospect) => cRef.addOnePictureToProject(imgObj, description, null)}
|
|
61
|
-
/>
|
|
62
|
-
|
|
63
|
-
<MultiImagePicker callback={cRef.onImagesAddedMIP}>
|
|
64
|
-
<View style={styles.MIP}>
|
|
65
|
-
<Text style={{ color: 'white' }}>Open Multi Image Picker - MultiImagePicker</Text>
|
|
66
|
-
</View>
|
|
67
|
-
</MultiImagePicker>
|
|
68
|
-
|
|
69
|
-
<View style={{ padding: 16 }}>
|
|
70
|
-
<CommonButton variant='filled' size='large' label='Reset CRM Dialog Flag' onPress={async () => await AsyncStorage.removeItem('@MIP_UploadWarningsModal_Skip')} />
|
|
71
|
-
</View>
|
|
72
|
-
|
|
73
|
-
<View style={{ padding: 16 }}>
|
|
74
|
-
<CommonButton variant='filled' size='large' label='Reset ShowToCust Flag' onPress={async () => await AsyncStorage.removeItem('@MIP_ShowToCustomer')} />
|
|
75
|
-
</View>
|
|
76
|
-
|
|
77
|
-
{/* <View style={{ padding: 16 }}>
|
|
78
|
-
<CommonButton variant='filled' size='large' label='Open Multi Image Picker - AddImages OLD' onPress={() => cRef.triggerActionOLD()} color={'secondary'} />
|
|
79
|
-
</View>
|
|
80
|
-
<AddImagesOLD
|
|
81
|
-
ref={o => cRef.addImagesOLD = o} prospectInst={Project} callback={cRef.onImagesAddedAI}
|
|
82
|
-
annotationAllowed
|
|
83
|
-
showToCustomerAllowed
|
|
84
|
-
addPicture={(imgObj, description, prospect) => cRef.addOnePictureToProject(imgObj, description, null)}
|
|
85
|
-
/> */}
|
|
86
|
-
</SafeAreaView>
|
|
87
|
-
)
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
const styles = StyleSheet.create({
|
|
92
|
-
MIP: {
|
|
93
|
-
flexDirection: 'row',
|
|
94
|
-
alignItems: 'center',
|
|
95
|
-
justifyContent: 'center',
|
|
96
|
-
padding: 16,
|
|
97
|
-
backgroundColor: colors.buttonPrimary,
|
|
98
|
-
borderRadius: 16,
|
|
99
|
-
margin: 16
|
|
100
|
-
}
|
|
101
|
-
})
|
|
102
|
-
|
|
103
|
-
export default TestMIP
|