@supportworks/multi-imagepicker 8.0.11 → 8.0.13

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 CHANGED
@@ -1,3 +1,10 @@
1
+
2
+ # v8.0.13 2025-12-17
3
+ * fixed android ui issues
4
+
5
+ # v8.0.12 2025-12-05
6
+ * added back previous get default showToCustomer logic, in case we want to use it later
7
+
1
8
  # v8.0.11 2025-12-05
2
9
  * always default to show customer
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@supportworks/multi-imagepicker",
3
- "version": "8.0.11",
3
+ "version": "8.0.13",
4
4
  "description": "Android and iOS customized multiple image picker. For react-native >= 0.60.",
5
5
  "main": "index.js",
6
6
  "author": {
@@ -59,18 +59,14 @@ const ImageDetailsModal = (
59
59
  </TouchableOpacity>
60
60
  }
61
61
  />
62
- <KeyboardAvoidingView style={styles.KeyboardAvoidingView} behavior={Platform.OS === 'ios' ? 'padding' : 'position'} enabled>
63
- {/*<ScrollView
64
- keyboardShouldPersistTaps="handled"
65
- contentContainerStyle={styles.ScrollContent}
66
- >*/}
67
- <View style={styles.ImageContainer}>
68
- <Image
69
- source={{ uri: imageUri }}
70
- resizeMode='contain'
71
- style={[styles.Image]}
72
- />
73
- </View>
62
+ <KeyboardAvoidingView style={styles.KeyboardAvoidingView} behavior={Platform.OS === 'ios' ? 'padding' : 'height'} enabled>
63
+ <View style={styles.ImageContainer}>
64
+ <Image
65
+ source={{ uri: imageUri }}
66
+ resizeMode='contain'
67
+ style={[styles.Image]}
68
+ />
69
+ </View>
74
70
  <View style={styles.InputContainer}>
75
71
  <TextInputSWMD
76
72
  key={`title-${inputResetKey}`}
@@ -100,7 +96,6 @@ const ImageDetailsModal = (
100
96
  callback={(payload) => setLocalDesc(payload.inputValue)}
101
97
  />
102
98
  </View>
103
- {/*</ScrollView>*/}
104
99
  </KeyboardAvoidingView>
105
100
  </View>
106
101
  </Modal>
@@ -211,7 +211,7 @@ const SingleImage = (
211
211
  <Image
212
212
  resizeMode='cover'
213
213
  style={[styles.Image, { width: '100%', height: '100%' }]}
214
- source={{ uri: 'file://' + imagePath + '?x=' + version + '-' + (cacheVersion || 0) }}
214
+ source={{ uri: Api.getApi().fullImagePath(imagePath) + '?x=' + version + '-' + (cacheVersion || 0) }}
215
215
  />
216
216
  <ImageIndicators
217
217
  allowShowToCustomer={allowShowToCustomer}
@@ -254,7 +254,7 @@ const SingleImage = (
254
254
  <ImageDetailsModal
255
255
  visible={showDetailsModal}
256
256
  onClose={closeDetails}
257
- imageUri={'file://' + imagePath + '?x=' + version + '-' + (cacheVersion || 0)}
257
+ imageUri={Api.getApi().fullImagePath(imagePath) + '?x=' + version + '-' + (cacheVersion || 0)}
258
258
  initialTitle={title}
259
259
  initialDesc={desc}
260
260
  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',
@@ -69,5 +69,21 @@ export default class MIPickerApi {
69
69
 
70
70
  async getDefaultShowToCustomer () {
71
71
  return true
72
+
73
+ /*
74
+ console.log('in getDefaultShowToCustomer')
75
+ if ((this._defaultShowToCustomer !== null) && (this._defaultShowToCustomer !== undefined)) {
76
+ return this._defaultShowToCustomer
77
+ }
78
+ console.log('in getDefaultShowToCustomer, trying to get value from AsyncStorage')
79
+ // not a value yet, so look in AsyncStorage
80
+ const retVal = await AsyncStorage.getItem('@MIP_ShowToCustomer')
81
+ if (retVal === 'N') {
82
+ console.log('getDefaultShowToCustomer: return false')
83
+ return false
84
+ } else {
85
+ console.log('getDefaultShowToCustomer: return true')
86
+ return true
87
+ }*/
72
88
  }
73
89
  }