@supportworks/multi-imagepicker 8.4.7 → 8.4.8

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": "8.4.7",
3
+ "version": "8.4.8",
4
4
  "description": "Android and iOS customized multiple image picker. For react-native >= 0.60.",
5
5
  "main": "index.js",
6
6
  "author": {
@@ -19,7 +19,7 @@
19
19
  "@supportworks/app-styler": ">=1.0.6",
20
20
  "@supportworks/camera": ">=0.2.3",
21
21
  "@supportworks/core-controls": ">=5.0.0",
22
- "@supportworks/icon-library": ">=1.4.3",
22
+ "@supportworks/icon-library": ">=1.11.59",
23
23
  "@supportworks/navbars": ">=3.0.0",
24
24
  "expo-sensors": "*",
25
25
  "@supportworks/swmaterialdesign": ">=1.1.3",
@@ -36,7 +36,6 @@ import {
36
36
  Platform,
37
37
  useWindowDimensions
38
38
  } from 'react-native'
39
- import Svg, { Path } from 'react-native-svg'
40
39
  import { useSafeAreaInsets } from 'react-native-safe-area-context'
41
40
  import { check, openSettings, PERMISSIONS, request, RESULTS } from 'react-native-permissions'
42
41
 
@@ -205,19 +204,6 @@ const buildZoomRangeForPosition = (cameras: CameraInfo[], position: 'front' | 'b
205
204
  return { min: minZoom, max: maxZoom }
206
205
  }
207
206
 
208
- // Outlines from the camera icons in photos-upload_v2.1.sketch.
209
- const FlipCameraIcon = ({ size = 24, color = colors.white }) => (
210
- <Svg width={size} height={size} viewBox="0 0 24 24">
211
- <Path fill={color} fillRule="evenodd" d="M20.0000 5.0000 L16.8300 5.0000 L15.0000 3.0000 L9.0000 3.0000 L7.1700 5.0000 L4.0000 5.0000 C2.9000 5.0000 2.0000 5.9000 2.0000 7.0000 L2.0000 19.0000 C2.0000 20.1000 2.9000 21.0000 4.0000 21.0000 L20.0000 21.0000 C21.1000 21.0000 22.0000 20.1000 22.0000 19.0000 L22.0000 7.0000 C22.0000 5.9000 21.1000 5.0000 20.0000 5.0000 Z M12.0000 18.0000 C9.2400 18.0000 7.0000 15.7600 7.0000 13.0000 L5.0000 13.0000 L7.5000 10.5000 L10.0000 13.0000 L8.0000 13.0000 C8.0000 15.2100 9.7900 17.0000 12.0000 17.0000 C12.5800 17.0000 13.1300 16.8700 13.6200 16.6500 L14.3600 17.3900 C13.6500 17.7600 12.8600 18.0000 12.0000 18.0000 Z M16.5000 15.5000 L14.0000 13.0000 L16.0000 13.0000 C16.0000 10.7900 14.2100 9.0000 12.0000 9.0000 C11.4200 9.0000 10.8700 9.1300 10.3800 9.3500 L9.6400 8.6200 C10.3500 8.2400 11.1400 8.0000 12.0000 8.0000 C14.7600 8.0000 17.0000 10.2400 17.0000 13.0000 L19.0000 13.0000 L16.5000 15.5000 Z" />
212
- </Svg>
213
- )
214
-
215
- const FlashIcon = ({ enabled }: { enabled: boolean }) => (
216
- <Svg width={24} height={24} viewBox="0 0 24 24">
217
- <Path fill={colors.white} d={enabled ? 'M7 2v11h3v9l7-12h-4l4-8Z' : 'M17.0000 10.0000 L13.3900 10.0000 L15.6700 12.2800 L17.0000 10.0000 Z M17.0000 2.0000 L7.0000 2.0000 L7.0000 3.6100 L13.1300 9.7400 L17.0000 2.0000 Z M3.4100 2.8600 L2.0000 4.2700 L7.0000 9.2700 L7.0000 13.0000 L10.0000 13.0000 L10.0000 22.0000 L13.5800 15.8500 L17.7300 20.0000 L19.1400 18.5900 L3.4100 2.8600 Z'} />
218
- </Svg>
219
- )
220
-
221
207
  const CameraModal: React.FC<CameraTestModalProps> = ({ onDone, onCancel, cameraRef: externalCameraRef, limit, angleGuideEnabled, testImageSource, enableZoomSlider = false }) => {
222
208
  const internalCameraRef = useRef<CameraViewRef>(null)
223
209
  const cameraRef = externalCameraRef || internalCameraRef
@@ -730,6 +716,7 @@ const CameraModal: React.FC<CameraTestModalProps> = ({ onDone, onCancel, cameraR
730
716
  })
731
717
  }
732
718
 
719
+ const FlashIcon = isFlashEnabled ? Icons.IconFlashOn : Icons.IconFlashOff
733
720
  const latestCapturedImage = capturedImages[capturedImages.length - 1]
734
721
  const hasCapturedImages = capturedImages.length > 0
735
722
  const shouldShowGalleryPreview = limit !== 1
@@ -934,7 +921,7 @@ const CameraModal: React.FC<CameraTestModalProps> = ({ onDone, onCancel, cameraR
934
921
  onPress={handleToggleFlash}
935
922
  disabled={isFrontCamera}
936
923
  >
937
- <FlashIcon enabled={isFlashEnabled} />
924
+ <FlashIcon width={24} height={24} fill={colors.white} fillOpacity={1} />
938
925
  </TouchableOpacity>
939
926
  )}
940
927
  {showCameraSwitchControl && (
@@ -944,7 +931,7 @@ const CameraModal: React.FC<CameraTestModalProps> = ({ onDone, onCancel, cameraR
944
931
  accessibilityLabel="Switch camera"
945
932
  onPress={handleToggleCamera}
946
933
  >
947
- <FlipCameraIcon size={sideButtonIconSize} color={colors.white} />
934
+ <Icons.IconCameraSwitch width={sideButtonIconSize} height={sideButtonIconSize} fill={colors.white} fillOpacity={1} />
948
935
  </TouchableOpacity>
949
936
  )}
950
937
  </View>