@supportworks/multi-imagepicker 7.0.4 → 7.0.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@supportworks/multi-imagepicker",
3
- "version": "7.0.4",
3
+ "version": "7.0.6",
4
4
  "description": "Android and iOS customized multiple image picker. For react-native >= 0.60.",
5
5
  "main": "index.js",
6
6
  "author": {
@@ -33,12 +33,12 @@ const ActionBar = (
33
33
  {false && <TouchableOpacity style={styles.IconContainer} onPress={onPressDetails}>
34
34
  <Icons.IconArrowRightTop />
35
35
  </TouchableOpacity>}
36
- <TouchableOpacity style={styles.IconContainer} onPress={onPressDetails}>
36
+ <TouchableOpacity style={[styles.IconContainer, (!allowSaveToDevice && !annotationAllowed && !allowShowToCustomer) ? styles.IconContainerLast : null]} onPress={onPressDetails}>
37
37
  <Icons.IconNotesWrite />
38
38
  </TouchableOpacity>
39
39
  {allowSaveToDevice && (
40
40
  <TouchableOpacity
41
- style={styles.IconContainer}
41
+ style={[styles.IconContainer, (!annotationAllowed && !allowShowToCustomer) ? styles.IconContainerLast : null]}
42
42
  onPress={onToggleSaveToDevice}
43
43
  >
44
44
  {saveToDevice
@@ -47,7 +47,7 @@ const ActionBar = (
47
47
  </TouchableOpacity>
48
48
  )}
49
49
  {annotationAllowed && (
50
- <TouchableOpacity style={styles.IconContainer} onPress={onAnnotate}>
50
+ <TouchableOpacity style={[styles.IconContainer, !allowShowToCustomer ? styles.IconContainerLast : null]} onPress={onAnnotate}>
51
51
  <Icons.IconAnnotate />
52
52
  </TouchableOpacity>
53
53
  )}
@@ -50,6 +50,7 @@ const ImageDetailsModal = (
50
50
  callback={handleClose}
51
51
  rightContent={
52
52
  <TouchableOpacity
53
+ hitSlop={{ top: 20, bottom: 20, left: 20, right: 20 }}
53
54
  onPress={onDone}
54
55
  disabled={!titleValidRef.current}
55
56
  >
@@ -57,11 +58,7 @@ const ImageDetailsModal = (
57
58
  </TouchableOpacity>
58
59
  }
59
60
  />
60
- <KeyboardAvoidingView style={styles.KeyboardAvoidingView} behavior={Platform.OS === 'ios' ? 'padding' : 'position'} enabled>
61
- {/*<ScrollView
62
- keyboardShouldPersistTaps="handled"
63
- contentContainerStyle={styles.ScrollContent}
64
- >*/}
61
+ <KeyboardAvoidingView style={styles.KeyboardAvoidingView} behavior={Platform.OS === 'ios' ? 'padding' : 'height'} enabled>
65
62
  <View style={styles.ImageContainer}>
66
63
  <Image
67
64
  source={{ uri: imageUri }}
@@ -98,7 +95,6 @@ const ImageDetailsModal = (
98
95
  callback={(payload) => setLocalDesc(payload.inputValue)}
99
96
  />
100
97
  </View>
101
- {/*</ScrollView>*/}
102
98
  </KeyboardAvoidingView>
103
99
  </SafeAreaView>
104
100
  </Modal>
@@ -210,7 +210,7 @@ const SingleImage = (
210
210
  <Image
211
211
  resizeMode='cover'
212
212
  style={[styles.Image, { width: '100%', height: '100%' }]}
213
- source={{ uri: 'file://' + imagePath + '?x=' + version + '-' + (cacheVersion || 0) }}
213
+ source={{ uri: Api.getApi().fullImagePath(imagePath) + '?x=' + version + '-' + (cacheVersion || 0) }}
214
214
  />
215
215
  <ImageIndicators
216
216
  allowShowToCustomer={allowShowToCustomer}
@@ -253,7 +253,7 @@ const SingleImage = (
253
253
  <ImageDetailsModal
254
254
  visible={showDetailsModal}
255
255
  onClose={closeDetails}
256
- imageUri={'file://' + imagePath + '?x=' + version + '-' + (cacheVersion || 0)}
256
+ imageUri={Api.getApi().fullImagePath(imagePath) + '?x=' + version + '-' + (cacheVersion || 0)}
257
257
  initialTitle={title}
258
258
  initialDesc={desc}
259
259
  titleEditable={titleEditable}
@@ -1,5 +1,5 @@
1
1
  import React, { useCallback, useState } from 'react'
2
- import { Modal, View, StyleSheet, Text } from 'react-native'
2
+ import { Modal, View, StyleSheet, Text, Platform } from 'react-native'
3
3
  import { colors, stdStyles } from '@supportworks/app-styler'
4
4
  import { CheckBox, CommonButton } from '@supportworks/core-controls'
5
5
  import { Icons } from '@supportworks/icon-library'
@@ -61,7 +61,7 @@ const styles = StyleSheet.create({
61
61
  ModalView: {
62
62
  flex: 1,
63
63
  justifyContent: 'center',
64
- alignItems: 'center'
64
+ alignItems: 'center',
65
65
  },
66
66
  InfoDialogContent: {
67
67
  backgroundColor: 'white',
@@ -77,7 +77,14 @@ const styles = StyleSheet.create({
77
77
  },
78
78
  elevation: 8,
79
79
  maxWidth: '80%',
80
- width: 334
80
+ width: 334,
81
+
82
+ ...Platform.select({
83
+ android: {
84
+ borderWidth: 2,
85
+ borderColor: colors.black05,
86
+ }
87
+ })
81
88
  },
82
89
  InfoDialogIconRow: {
83
90
  alignItems: 'center',