@chem-po/react-native 0.0.22 → 0.0.24
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/lib/commonjs/components/form/input/file/index.js +3 -1
- package/lib/commonjs/components/form/input/file/index.js.map +1 -1
- package/lib/commonjs/components/image/ImageViewModal.js +285 -0
- package/lib/commonjs/components/image/ImageViewModal.js.map +1 -0
- package/lib/commonjs/components/image/index.js +17 -0
- package/lib/commonjs/components/image/index.js.map +1 -0
- package/lib/commonjs/components/index.js +8 -8
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/components/loading/LoadingImage.js +11 -6
- package/lib/commonjs/components/loading/LoadingImage.js.map +1 -1
- package/lib/module/components/form/input/file/index.js +3 -1
- package/lib/module/components/form/input/file/index.js.map +1 -1
- package/lib/module/components/image/ImageViewModal.js +277 -0
- package/lib/module/components/image/ImageViewModal.js.map +1 -0
- package/lib/module/components/image/index.js +2 -0
- package/lib/module/components/image/index.js.map +1 -0
- package/lib/module/components/index.js +1 -1
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/components/loading/LoadingImage.js +11 -6
- package/lib/module/components/loading/LoadingImage.js.map +1 -1
- package/lib/typescript/components/form/input/file/index.d.ts +2 -1
- package/lib/typescript/components/form/input/file/index.d.ts.map +1 -1
- package/lib/typescript/components/image/ImageViewModal.d.ts +9 -0
- package/lib/typescript/components/image/ImageViewModal.d.ts.map +1 -0
- package/lib/typescript/components/image/index.d.ts +2 -0
- package/lib/typescript/components/image/index.d.ts.map +1 -0
- package/lib/typescript/components/index.d.ts +1 -1
- package/lib/typescript/components/index.d.ts.map +1 -1
- package/lib/typescript/components/loading/LoadingImage.d.ts +2 -2
- package/lib/typescript/components/loading/LoadingImage.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/components/form/input/file/index.tsx +3 -0
- package/src/components/image/ImageViewModal.tsx +261 -0
- package/src/components/image/index.ts +1 -0
- package/src/components/index.ts +1 -1
- package/src/components/loading/LoadingImage.tsx +10 -6
- package/lib/commonjs/components/overlay/ImageViewOverlay.js +0 -127
- package/lib/commonjs/components/overlay/ImageViewOverlay.js.map +0 -1
- package/lib/commonjs/components/overlay/index.js +0 -17
- package/lib/commonjs/components/overlay/index.js.map +0 -1
- package/lib/module/components/overlay/ImageViewOverlay.js +0 -119
- package/lib/module/components/overlay/ImageViewOverlay.js.map +0 -1
- package/lib/module/components/overlay/index.js +0 -2
- package/lib/module/components/overlay/index.js.map +0 -1
- package/lib/typescript/components/overlay/ImageViewOverlay.d.ts +0 -6
- package/lib/typescript/components/overlay/ImageViewOverlay.d.ts.map +0 -1
- package/lib/typescript/components/overlay/index.d.ts +0 -2
- package/lib/typescript/components/overlay/index.d.ts.map +0 -1
- package/src/components/overlay/ImageViewOverlay.tsx +0 -104
- package/src/components/overlay/index.ts +0 -1
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
import { useScreen } from '@chem-po/react'
|
|
2
|
+
import { Ionicons } from '@expo/vector-icons'
|
|
3
|
+
import React, { useCallback, useMemo, useRef, useState } from 'react'
|
|
4
|
+
import { Animated, Image, Modal, StyleSheet, TouchableOpacity, View } from 'react-native'
|
|
5
|
+
import { Gesture, GestureDetector, GestureHandlerRootView } from 'react-native-gesture-handler'
|
|
6
|
+
import { LoadingLogo } from '../loading/Loading'
|
|
7
|
+
|
|
8
|
+
interface ImageViewModalProps {
|
|
9
|
+
isOpen: boolean
|
|
10
|
+
onClose: () => void
|
|
11
|
+
src: string | null
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export const ImageViewModal: React.FC<ImageViewModalProps> = ({ isOpen, onClose, src }) => {
|
|
15
|
+
const [loading, setLoading] = useState(true)
|
|
16
|
+
const screenWidth = useScreen(s => s.width)
|
|
17
|
+
const screenHeight = useScreen(s => s.height)
|
|
18
|
+
const [imageSize, setImageSize] = useState({ width: screenWidth / 2, height: screenHeight / 2 })
|
|
19
|
+
|
|
20
|
+
// Animated values for zoom and pan
|
|
21
|
+
const scale = useRef(new Animated.Value(1)).current
|
|
22
|
+
const translateX = useRef(new Animated.Value(0)).current
|
|
23
|
+
const translateY = useRef(new Animated.Value(0)).current
|
|
24
|
+
|
|
25
|
+
// Gesture state
|
|
26
|
+
const savedScale = useRef(1)
|
|
27
|
+
const savedTranslateX = useRef(0)
|
|
28
|
+
const savedTranslateY = useRef(0)
|
|
29
|
+
const currentScale = useRef(1)
|
|
30
|
+
const currentTranslateX = useRef(0)
|
|
31
|
+
const currentTranslateY = useRef(0)
|
|
32
|
+
|
|
33
|
+
const { height, width } = useMemo(() => {
|
|
34
|
+
if (loading) return imageSize
|
|
35
|
+
const ratio = imageSize.width / imageSize.height
|
|
36
|
+
let h = Math.min(imageSize.height, screenHeight * 0.9)
|
|
37
|
+
let w = h * ratio
|
|
38
|
+
if (w > screenWidth * 0.9) {
|
|
39
|
+
w = Math.min(imageSize.width, screenWidth * 0.9)
|
|
40
|
+
h = w / ratio
|
|
41
|
+
}
|
|
42
|
+
return { height: h, width: w }
|
|
43
|
+
}, [screenHeight, screenWidth, imageSize, loading])
|
|
44
|
+
|
|
45
|
+
const onLoadStart = useCallback(() => setLoading(true), [])
|
|
46
|
+
const onLoad = useCallback((e: any) => {
|
|
47
|
+
const { width: naturalWidth, height: naturalHeight } = e.nativeEvent.source
|
|
48
|
+
setImageSize({ width: naturalWidth, height: naturalHeight })
|
|
49
|
+
setLoading(false)
|
|
50
|
+
}, [])
|
|
51
|
+
|
|
52
|
+
// Reset zoom and pan when modal opens/closes
|
|
53
|
+
const resetTransform = useCallback(() => {
|
|
54
|
+
scale.setValue(1)
|
|
55
|
+
translateX.setValue(0)
|
|
56
|
+
translateY.setValue(0)
|
|
57
|
+
savedScale.current = 1
|
|
58
|
+
savedTranslateX.current = 0
|
|
59
|
+
savedTranslateY.current = 0
|
|
60
|
+
currentScale.current = 1
|
|
61
|
+
currentTranslateX.current = 0
|
|
62
|
+
currentTranslateY.current = 0
|
|
63
|
+
}, [scale, translateX, translateY])
|
|
64
|
+
|
|
65
|
+
// Reset when modal closes or src changes
|
|
66
|
+
React.useEffect(() => {
|
|
67
|
+
if (!isOpen || !src) {
|
|
68
|
+
resetTransform()
|
|
69
|
+
}
|
|
70
|
+
}, [isOpen, src, resetTransform])
|
|
71
|
+
|
|
72
|
+
// Pan gesture
|
|
73
|
+
const panGesture = Gesture.Pan()
|
|
74
|
+
.onUpdate(event => {
|
|
75
|
+
// Only allow panning if zoomed in
|
|
76
|
+
if (savedScale.current > 1) {
|
|
77
|
+
const newTranslateX = savedTranslateX.current + event.translationX
|
|
78
|
+
const newTranslateY = savedTranslateY.current + event.translationY
|
|
79
|
+
|
|
80
|
+
// Calculate bounds to prevent panning too far
|
|
81
|
+
const maxTranslateX = (width * savedScale.current - width) / 2
|
|
82
|
+
const maxTranslateY = (height * savedScale.current - height) / 2
|
|
83
|
+
|
|
84
|
+
const boundedTranslateX = Math.max(-maxTranslateX, Math.min(maxTranslateX, newTranslateX))
|
|
85
|
+
const boundedTranslateY = Math.max(-maxTranslateY, Math.min(maxTranslateY, newTranslateY))
|
|
86
|
+
|
|
87
|
+
translateX.setValue(boundedTranslateX)
|
|
88
|
+
translateY.setValue(boundedTranslateY)
|
|
89
|
+
currentTranslateX.current = boundedTranslateX
|
|
90
|
+
currentTranslateY.current = boundedTranslateY
|
|
91
|
+
}
|
|
92
|
+
})
|
|
93
|
+
.onEnd(() => {
|
|
94
|
+
savedTranslateX.current = currentTranslateX.current
|
|
95
|
+
savedTranslateY.current = currentTranslateY.current
|
|
96
|
+
})
|
|
97
|
+
|
|
98
|
+
// Pinch gesture
|
|
99
|
+
const pinchGesture = Gesture.Pinch()
|
|
100
|
+
.onUpdate(event => {
|
|
101
|
+
const newScale = savedScale.current * event.scale
|
|
102
|
+
// Limit zoom between 1x and 5x
|
|
103
|
+
const boundedScale = Math.max(1, Math.min(5, newScale))
|
|
104
|
+
scale.setValue(boundedScale)
|
|
105
|
+
currentScale.current = boundedScale
|
|
106
|
+
|
|
107
|
+
// If zooming out to 1x, reset position
|
|
108
|
+
if (boundedScale <= 1) {
|
|
109
|
+
translateX.setValue(0)
|
|
110
|
+
translateY.setValue(0)
|
|
111
|
+
currentTranslateX.current = 0
|
|
112
|
+
currentTranslateY.current = 0
|
|
113
|
+
}
|
|
114
|
+
})
|
|
115
|
+
.onEnd(() => {
|
|
116
|
+
savedScale.current = currentScale.current
|
|
117
|
+
// If scale is close to 1, snap back to 1
|
|
118
|
+
if (savedScale.current < 1.1) {
|
|
119
|
+
Animated.parallel([
|
|
120
|
+
Animated.spring(scale, { toValue: 1, useNativeDriver: true }),
|
|
121
|
+
Animated.spring(translateX, { toValue: 0, useNativeDriver: true }),
|
|
122
|
+
Animated.spring(translateY, { toValue: 0, useNativeDriver: true }),
|
|
123
|
+
]).start()
|
|
124
|
+
savedScale.current = 1
|
|
125
|
+
savedTranslateX.current = 0
|
|
126
|
+
savedTranslateY.current = 0
|
|
127
|
+
currentScale.current = 1
|
|
128
|
+
currentTranslateX.current = 0
|
|
129
|
+
currentTranslateY.current = 0
|
|
130
|
+
} else {
|
|
131
|
+
savedTranslateX.current = currentTranslateX.current
|
|
132
|
+
savedTranslateY.current = currentTranslateY.current
|
|
133
|
+
}
|
|
134
|
+
})
|
|
135
|
+
|
|
136
|
+
// Double tap to zoom
|
|
137
|
+
const doubleTapGesture = Gesture.Tap()
|
|
138
|
+
.numberOfTaps(2)
|
|
139
|
+
.onEnd(() => {
|
|
140
|
+
if (savedScale.current > 1) {
|
|
141
|
+
// Zoom out
|
|
142
|
+
Animated.parallel([
|
|
143
|
+
Animated.spring(scale, { toValue: 1, useNativeDriver: true }),
|
|
144
|
+
Animated.spring(translateX, { toValue: 0, useNativeDriver: true }),
|
|
145
|
+
Animated.spring(translateY, { toValue: 0, useNativeDriver: true }),
|
|
146
|
+
]).start()
|
|
147
|
+
savedScale.current = 1
|
|
148
|
+
savedTranslateX.current = 0
|
|
149
|
+
savedTranslateY.current = 0
|
|
150
|
+
currentScale.current = 1
|
|
151
|
+
currentTranslateX.current = 0
|
|
152
|
+
currentTranslateY.current = 0
|
|
153
|
+
} else {
|
|
154
|
+
// Zoom in to 2x
|
|
155
|
+
Animated.spring(scale, { toValue: 2, useNativeDriver: true }).start()
|
|
156
|
+
savedScale.current = 2
|
|
157
|
+
currentScale.current = 2
|
|
158
|
+
}
|
|
159
|
+
})
|
|
160
|
+
|
|
161
|
+
// Test simple single tap gesture
|
|
162
|
+
|
|
163
|
+
// Combine gestures - simplified approach
|
|
164
|
+
const combinedGestures = Gesture.Race(
|
|
165
|
+
doubleTapGesture,
|
|
166
|
+
Gesture.Simultaneous(panGesture, pinchGesture),
|
|
167
|
+
)
|
|
168
|
+
|
|
169
|
+
if (!isOpen) {
|
|
170
|
+
return null
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
return (
|
|
174
|
+
<Modal visible={isOpen} transparent animationType="fade" onRequestClose={onClose}>
|
|
175
|
+
<GestureHandlerRootView style={styles.gestureRoot}>
|
|
176
|
+
<View style={styles.modalOverlay}>
|
|
177
|
+
<TouchableOpacity
|
|
178
|
+
style={styles.backgroundTouchable}
|
|
179
|
+
activeOpacity={1}
|
|
180
|
+
onPress={onClose}
|
|
181
|
+
/>
|
|
182
|
+
<View style={styles.contentContainer}>
|
|
183
|
+
<GestureDetector gesture={combinedGestures}>
|
|
184
|
+
<Animated.View
|
|
185
|
+
style={[
|
|
186
|
+
styles.imageContainer,
|
|
187
|
+
{
|
|
188
|
+
width,
|
|
189
|
+
height,
|
|
190
|
+
opacity: loading ? 0 : 1,
|
|
191
|
+
transform: [{ scale }, { translateX }, { translateY }],
|
|
192
|
+
},
|
|
193
|
+
]}>
|
|
194
|
+
<Image
|
|
195
|
+
source={src ? { uri: src } : undefined}
|
|
196
|
+
style={styles.image}
|
|
197
|
+
onLoadStart={onLoadStart}
|
|
198
|
+
onLoad={onLoad}
|
|
199
|
+
resizeMode="contain"
|
|
200
|
+
/>
|
|
201
|
+
</Animated.View>
|
|
202
|
+
</GestureDetector>
|
|
203
|
+
|
|
204
|
+
<TouchableOpacity style={styles.closeButton} onPress={onClose}>
|
|
205
|
+
<Ionicons name="close" size={24} color="white" />
|
|
206
|
+
</TouchableOpacity>
|
|
207
|
+
|
|
208
|
+
{loading || !src ? (
|
|
209
|
+
<View style={styles.loadingContainer}>
|
|
210
|
+
<LoadingLogo isLoading={loading} size={70} />
|
|
211
|
+
</View>
|
|
212
|
+
) : null}
|
|
213
|
+
</View>
|
|
214
|
+
</View>
|
|
215
|
+
</GestureHandlerRootView>
|
|
216
|
+
</Modal>
|
|
217
|
+
)
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
const styles = StyleSheet.create({
|
|
221
|
+
gestureRoot: {
|
|
222
|
+
flex: 1,
|
|
223
|
+
},
|
|
224
|
+
modalOverlay: {
|
|
225
|
+
flex: 1,
|
|
226
|
+
backgroundColor: 'rgba(0, 0, 0, 0.7)',
|
|
227
|
+
},
|
|
228
|
+
backgroundTouchable: {
|
|
229
|
+
...StyleSheet.absoluteFillObject,
|
|
230
|
+
},
|
|
231
|
+
contentContainer: {
|
|
232
|
+
flex: 1,
|
|
233
|
+
justifyContent: 'center',
|
|
234
|
+
alignItems: 'center',
|
|
235
|
+
padding: 16,
|
|
236
|
+
},
|
|
237
|
+
imageContainer: {
|
|
238
|
+
overflow: 'hidden',
|
|
239
|
+
borderRadius: 4,
|
|
240
|
+
},
|
|
241
|
+
image: {
|
|
242
|
+
width: '100%',
|
|
243
|
+
height: '100%',
|
|
244
|
+
},
|
|
245
|
+
closeButton: {
|
|
246
|
+
position: 'absolute',
|
|
247
|
+
top: 16,
|
|
248
|
+
right: 16,
|
|
249
|
+
width: 40,
|
|
250
|
+
height: 40,
|
|
251
|
+
borderRadius: 20,
|
|
252
|
+
backgroundColor: 'rgba(0, 0, 0, 0.5)',
|
|
253
|
+
justifyContent: 'center',
|
|
254
|
+
alignItems: 'center',
|
|
255
|
+
},
|
|
256
|
+
loadingContainer: {
|
|
257
|
+
...StyleSheet.absoluteFillObject,
|
|
258
|
+
justifyContent: 'center',
|
|
259
|
+
alignItems: 'center',
|
|
260
|
+
},
|
|
261
|
+
})
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ImageViewModal'
|
package/src/components/index.ts
CHANGED
|
@@ -2,14 +2,14 @@ import { useMounted } from '@chem-po/react'
|
|
|
2
2
|
import { Ionicons } from '@expo/vector-icons'
|
|
3
3
|
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'
|
|
4
4
|
import { DimensionValue, Image, StyleSheet, TouchableOpacity, View, ViewStyle } from 'react-native'
|
|
5
|
-
import {
|
|
5
|
+
import { ImageViewModal } from '../image/ImageViewModal'
|
|
6
6
|
import { LoadingLogo } from './Loading'
|
|
7
7
|
|
|
8
8
|
export interface LoadingImageProps {
|
|
9
9
|
src?: string | null
|
|
10
10
|
loadingOverride?: boolean
|
|
11
11
|
onLoad?: (e: any) => void
|
|
12
|
-
|
|
12
|
+
withFullView?: boolean
|
|
13
13
|
buttonFullView?: boolean
|
|
14
14
|
style?: ViewStyle
|
|
15
15
|
width?: DimensionValue
|
|
@@ -25,7 +25,7 @@ export const LoadingImage = ({
|
|
|
25
25
|
onLoad,
|
|
26
26
|
width,
|
|
27
27
|
height,
|
|
28
|
-
|
|
28
|
+
withFullView,
|
|
29
29
|
buttonFullView,
|
|
30
30
|
style,
|
|
31
31
|
}: LoadingImageProps) => {
|
|
@@ -77,13 +77,16 @@ export const LoadingImage = ({
|
|
|
77
77
|
},
|
|
78
78
|
style,
|
|
79
79
|
]}>
|
|
80
|
-
{
|
|
80
|
+
{!withFullView || buttonFullView ? (
|
|
81
81
|
ImageComponent
|
|
82
82
|
) : (
|
|
83
83
|
<TouchableOpacity
|
|
84
84
|
activeOpacity={0.9}
|
|
85
85
|
onPress={() => setViewing(true)}
|
|
86
|
-
style={
|
|
86
|
+
style={{
|
|
87
|
+
width: width ? undefined : '100%',
|
|
88
|
+
height: height ? undefined : '100%',
|
|
89
|
+
}}>
|
|
87
90
|
{ImageComponent}
|
|
88
91
|
</TouchableOpacity>
|
|
89
92
|
)}
|
|
@@ -100,11 +103,12 @@ export const LoadingImage = ({
|
|
|
100
103
|
styles.loadingContainer,
|
|
101
104
|
{
|
|
102
105
|
opacity: loading ? 1 : 0,
|
|
106
|
+
pointerEvents: loading ? 'auto' : 'none',
|
|
103
107
|
},
|
|
104
108
|
]}>
|
|
105
109
|
<LoadingLogo isLoading={loading} size={10} />
|
|
106
110
|
</View>
|
|
107
|
-
{viewing && <
|
|
111
|
+
{viewing && <ImageViewModal isOpen src={src ?? emptyPng} onClose={() => setViewing(false)} />}
|
|
108
112
|
</View>
|
|
109
113
|
)
|
|
110
114
|
}
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.ImageViewOverlay = void 0;
|
|
7
|
-
var _react = require("@chem-po/react");
|
|
8
|
-
var _vectorIcons = require("@expo/vector-icons");
|
|
9
|
-
var _react2 = _interopRequireWildcard(require("react"));
|
|
10
|
-
var _reactNative = require("react-native");
|
|
11
|
-
var _Loading = require("../loading/Loading");
|
|
12
|
-
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
13
|
-
const ImageViewOverlay = ({
|
|
14
|
-
src,
|
|
15
|
-
onClose
|
|
16
|
-
}) => {
|
|
17
|
-
const [loading, setLoading] = (0, _react2.useState)(true);
|
|
18
|
-
const screenWidth = (0, _react.useScreen)(s => s.width);
|
|
19
|
-
const screenHeight = (0, _react.useScreen)(s => s.height);
|
|
20
|
-
const [imageSize, setImageSize] = (0, _react2.useState)({
|
|
21
|
-
width: screenWidth / 2,
|
|
22
|
-
height: screenHeight / 2
|
|
23
|
-
});
|
|
24
|
-
const {
|
|
25
|
-
height,
|
|
26
|
-
width
|
|
27
|
-
} = (0, _react2.useMemo)(() => {
|
|
28
|
-
if (loading) return imageSize;
|
|
29
|
-
const ratio = imageSize.width / imageSize.height;
|
|
30
|
-
let h = Math.min(imageSize.height, screenHeight * 0.9);
|
|
31
|
-
let w = h * ratio;
|
|
32
|
-
if (w > screenWidth * 0.9) {
|
|
33
|
-
w = Math.min(imageSize.width, screenWidth * 0.9);
|
|
34
|
-
h = w / ratio;
|
|
35
|
-
}
|
|
36
|
-
return {
|
|
37
|
-
height: h,
|
|
38
|
-
width: w
|
|
39
|
-
};
|
|
40
|
-
}, [screenHeight, screenWidth, imageSize, loading]);
|
|
41
|
-
const onLoadStart = (0, _react2.useCallback)(() => setLoading(true), []);
|
|
42
|
-
const onLoad = (0, _react2.useCallback)(e => {
|
|
43
|
-
const {
|
|
44
|
-
width: naturalWidth,
|
|
45
|
-
height: naturalHeight
|
|
46
|
-
} = e.nativeEvent.source;
|
|
47
|
-
setImageSize({
|
|
48
|
-
width: naturalWidth,
|
|
49
|
-
height: naturalHeight
|
|
50
|
-
});
|
|
51
|
-
setLoading(false);
|
|
52
|
-
}, []);
|
|
53
|
-
return /*#__PURE__*/_react2.default.createElement(_reactNative.Modal, {
|
|
54
|
-
visible: true,
|
|
55
|
-
transparent: true,
|
|
56
|
-
animationType: "fade",
|
|
57
|
-
onRequestClose: onClose
|
|
58
|
-
}, /*#__PURE__*/_react2.default.createElement(_reactNative.View, {
|
|
59
|
-
style: styles.modalOverlay
|
|
60
|
-
}, /*#__PURE__*/_react2.default.createElement(_reactNative.View, {
|
|
61
|
-
style: styles.contentContainer
|
|
62
|
-
}, /*#__PURE__*/_react2.default.createElement(_reactNative.View, {
|
|
63
|
-
style: [styles.imageContainer, {
|
|
64
|
-
width,
|
|
65
|
-
height,
|
|
66
|
-
opacity: loading ? 0 : 1
|
|
67
|
-
}]
|
|
68
|
-
}, /*#__PURE__*/_react2.default.createElement(_reactNative.Image, {
|
|
69
|
-
source: {
|
|
70
|
-
uri: src
|
|
71
|
-
},
|
|
72
|
-
style: styles.image,
|
|
73
|
-
onLoadStart: onLoadStart,
|
|
74
|
-
onLoad: onLoad,
|
|
75
|
-
resizeMode: "contain"
|
|
76
|
-
})), /*#__PURE__*/_react2.default.createElement(_reactNative.TouchableOpacity, {
|
|
77
|
-
style: styles.closeButton,
|
|
78
|
-
onPress: onClose
|
|
79
|
-
}, /*#__PURE__*/_react2.default.createElement(_vectorIcons.Ionicons, {
|
|
80
|
-
name: "close",
|
|
81
|
-
size: 24,
|
|
82
|
-
color: "white"
|
|
83
|
-
})), loading && /*#__PURE__*/_react2.default.createElement(_reactNative.View, {
|
|
84
|
-
style: styles.loadingContainer
|
|
85
|
-
}, /*#__PURE__*/_react2.default.createElement(_Loading.LoadingLogo, {
|
|
86
|
-
isLoading: loading,
|
|
87
|
-
size: 70
|
|
88
|
-
})))));
|
|
89
|
-
};
|
|
90
|
-
exports.ImageViewOverlay = ImageViewOverlay;
|
|
91
|
-
const styles = _reactNative.StyleSheet.create({
|
|
92
|
-
modalOverlay: {
|
|
93
|
-
flex: 1,
|
|
94
|
-
backgroundColor: 'rgba(0, 0, 0, 0.7)'
|
|
95
|
-
},
|
|
96
|
-
contentContainer: {
|
|
97
|
-
flex: 1,
|
|
98
|
-
justifyContent: 'center',
|
|
99
|
-
alignItems: 'center',
|
|
100
|
-
padding: 16
|
|
101
|
-
},
|
|
102
|
-
imageContainer: {
|
|
103
|
-
overflow: 'hidden',
|
|
104
|
-
borderRadius: 4
|
|
105
|
-
},
|
|
106
|
-
image: {
|
|
107
|
-
width: '100%',
|
|
108
|
-
height: '100%'
|
|
109
|
-
},
|
|
110
|
-
closeButton: {
|
|
111
|
-
position: 'absolute',
|
|
112
|
-
top: 16,
|
|
113
|
-
right: 16,
|
|
114
|
-
width: 40,
|
|
115
|
-
height: 40,
|
|
116
|
-
borderRadius: 20,
|
|
117
|
-
backgroundColor: 'rgba(0, 0, 0, 0.5)',
|
|
118
|
-
justifyContent: 'center',
|
|
119
|
-
alignItems: 'center'
|
|
120
|
-
},
|
|
121
|
-
loadingContainer: {
|
|
122
|
-
..._reactNative.StyleSheet.absoluteFillObject,
|
|
123
|
-
justifyContent: 'center',
|
|
124
|
-
alignItems: 'center'
|
|
125
|
-
}
|
|
126
|
-
});
|
|
127
|
-
//# sourceMappingURL=ImageViewOverlay.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_vectorIcons","_react2","_interopRequireWildcard","_reactNative","_Loading","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ImageViewOverlay","src","onClose","loading","setLoading","useState","screenWidth","useScreen","s","width","screenHeight","height","imageSize","setImageSize","useMemo","ratio","h","Math","min","w","onLoadStart","useCallback","onLoad","naturalWidth","naturalHeight","nativeEvent","source","createElement","Modal","visible","transparent","animationType","onRequestClose","View","style","styles","modalOverlay","contentContainer","imageContainer","opacity","Image","uri","image","resizeMode","TouchableOpacity","closeButton","onPress","Ionicons","name","size","color","loadingContainer","LoadingLogo","isLoading","exports","StyleSheet","create","flex","backgroundColor","justifyContent","alignItems","padding","overflow","borderRadius","position","top","right","absoluteFillObject"],"sourceRoot":"..\\..\\..\\..\\src","sources":["components/overlay/ImageViewOverlay.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAC,uBAAA,CAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,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esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
var _ImageViewOverlay = require("./ImageViewOverlay");
|
|
7
|
-
Object.keys(_ImageViewOverlay).forEach(function (key) {
|
|
8
|
-
if (key === "default" || key === "__esModule") return;
|
|
9
|
-
if (key in exports && exports[key] === _ImageViewOverlay[key]) return;
|
|
10
|
-
Object.defineProperty(exports, key, {
|
|
11
|
-
enumerable: true,
|
|
12
|
-
get: function () {
|
|
13
|
-
return _ImageViewOverlay[key];
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
});
|
|
17
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_ImageViewOverlay","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get"],"sourceRoot":"..\\..\\..\\..\\src","sources":["components/overlay/index.ts"],"mappings":";;;;;AAAA,IAAAA,iBAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,iBAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,iBAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,iBAAA,CAAAK,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
import { useScreen } from '@chem-po/react';
|
|
2
|
-
import { Ionicons } from '@expo/vector-icons';
|
|
3
|
-
import React, { useCallback, useMemo, useState } from 'react';
|
|
4
|
-
import { Image, Modal, StyleSheet, TouchableOpacity, View } from 'react-native';
|
|
5
|
-
import { LoadingLogo } from '../loading/Loading';
|
|
6
|
-
export const ImageViewOverlay = ({
|
|
7
|
-
src,
|
|
8
|
-
onClose
|
|
9
|
-
}) => {
|
|
10
|
-
const [loading, setLoading] = useState(true);
|
|
11
|
-
const screenWidth = useScreen(s => s.width);
|
|
12
|
-
const screenHeight = useScreen(s => s.height);
|
|
13
|
-
const [imageSize, setImageSize] = useState({
|
|
14
|
-
width: screenWidth / 2,
|
|
15
|
-
height: screenHeight / 2
|
|
16
|
-
});
|
|
17
|
-
const {
|
|
18
|
-
height,
|
|
19
|
-
width
|
|
20
|
-
} = useMemo(() => {
|
|
21
|
-
if (loading) return imageSize;
|
|
22
|
-
const ratio = imageSize.width / imageSize.height;
|
|
23
|
-
let h = Math.min(imageSize.height, screenHeight * 0.9);
|
|
24
|
-
let w = h * ratio;
|
|
25
|
-
if (w > screenWidth * 0.9) {
|
|
26
|
-
w = Math.min(imageSize.width, screenWidth * 0.9);
|
|
27
|
-
h = w / ratio;
|
|
28
|
-
}
|
|
29
|
-
return {
|
|
30
|
-
height: h,
|
|
31
|
-
width: w
|
|
32
|
-
};
|
|
33
|
-
}, [screenHeight, screenWidth, imageSize, loading]);
|
|
34
|
-
const onLoadStart = useCallback(() => setLoading(true), []);
|
|
35
|
-
const onLoad = useCallback(e => {
|
|
36
|
-
const {
|
|
37
|
-
width: naturalWidth,
|
|
38
|
-
height: naturalHeight
|
|
39
|
-
} = e.nativeEvent.source;
|
|
40
|
-
setImageSize({
|
|
41
|
-
width: naturalWidth,
|
|
42
|
-
height: naturalHeight
|
|
43
|
-
});
|
|
44
|
-
setLoading(false);
|
|
45
|
-
}, []);
|
|
46
|
-
return /*#__PURE__*/React.createElement(Modal, {
|
|
47
|
-
visible: true,
|
|
48
|
-
transparent: true,
|
|
49
|
-
animationType: "fade",
|
|
50
|
-
onRequestClose: onClose
|
|
51
|
-
}, /*#__PURE__*/React.createElement(View, {
|
|
52
|
-
style: styles.modalOverlay
|
|
53
|
-
}, /*#__PURE__*/React.createElement(View, {
|
|
54
|
-
style: styles.contentContainer
|
|
55
|
-
}, /*#__PURE__*/React.createElement(View, {
|
|
56
|
-
style: [styles.imageContainer, {
|
|
57
|
-
width,
|
|
58
|
-
height,
|
|
59
|
-
opacity: loading ? 0 : 1
|
|
60
|
-
}]
|
|
61
|
-
}, /*#__PURE__*/React.createElement(Image, {
|
|
62
|
-
source: {
|
|
63
|
-
uri: src
|
|
64
|
-
},
|
|
65
|
-
style: styles.image,
|
|
66
|
-
onLoadStart: onLoadStart,
|
|
67
|
-
onLoad: onLoad,
|
|
68
|
-
resizeMode: "contain"
|
|
69
|
-
})), /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
70
|
-
style: styles.closeButton,
|
|
71
|
-
onPress: onClose
|
|
72
|
-
}, /*#__PURE__*/React.createElement(Ionicons, {
|
|
73
|
-
name: "close",
|
|
74
|
-
size: 24,
|
|
75
|
-
color: "white"
|
|
76
|
-
})), loading && /*#__PURE__*/React.createElement(View, {
|
|
77
|
-
style: styles.loadingContainer
|
|
78
|
-
}, /*#__PURE__*/React.createElement(LoadingLogo, {
|
|
79
|
-
isLoading: loading,
|
|
80
|
-
size: 70
|
|
81
|
-
})))));
|
|
82
|
-
};
|
|
83
|
-
const styles = StyleSheet.create({
|
|
84
|
-
modalOverlay: {
|
|
85
|
-
flex: 1,
|
|
86
|
-
backgroundColor: 'rgba(0, 0, 0, 0.7)'
|
|
87
|
-
},
|
|
88
|
-
contentContainer: {
|
|
89
|
-
flex: 1,
|
|
90
|
-
justifyContent: 'center',
|
|
91
|
-
alignItems: 'center',
|
|
92
|
-
padding: 16
|
|
93
|
-
},
|
|
94
|
-
imageContainer: {
|
|
95
|
-
overflow: 'hidden',
|
|
96
|
-
borderRadius: 4
|
|
97
|
-
},
|
|
98
|
-
image: {
|
|
99
|
-
width: '100%',
|
|
100
|
-
height: '100%'
|
|
101
|
-
},
|
|
102
|
-
closeButton: {
|
|
103
|
-
position: 'absolute',
|
|
104
|
-
top: 16,
|
|
105
|
-
right: 16,
|
|
106
|
-
width: 40,
|
|
107
|
-
height: 40,
|
|
108
|
-
borderRadius: 20,
|
|
109
|
-
backgroundColor: 'rgba(0, 0, 0, 0.5)',
|
|
110
|
-
justifyContent: 'center',
|
|
111
|
-
alignItems: 'center'
|
|
112
|
-
},
|
|
113
|
-
loadingContainer: {
|
|
114
|
-
...StyleSheet.absoluteFillObject,
|
|
115
|
-
justifyContent: 'center',
|
|
116
|
-
alignItems: 'center'
|
|
117
|
-
}
|
|
118
|
-
});
|
|
119
|
-
//# sourceMappingURL=ImageViewOverlay.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["useScreen","Ionicons","React","useCallback","useMemo","useState","Image","Modal","StyleSheet","TouchableOpacity","View","LoadingLogo","ImageViewOverlay","src","onClose","loading","setLoading","screenWidth","s","width","screenHeight","height","imageSize","setImageSize","ratio","h","Math","min","w","onLoadStart","onLoad","e","naturalWidth","naturalHeight","nativeEvent","source","createElement","visible","transparent","animationType","onRequestClose","style","styles","modalOverlay","contentContainer","imageContainer","opacity","uri","image","resizeMode","closeButton","onPress","name","size","color","loadingContainer","isLoading","create","flex","backgroundColor","justifyContent","alignItems","padding","overflow","borderRadius","position","top","right","absoluteFillObject"],"sourceRoot":"..\\..\\..\\..\\src","sources":["components/overlay/ImageViewOverlay.tsx"],"mappings":"AAAA,SAASA,SAAS,QAAQ,gBAAgB;AAC1C,SAASC,QAAQ,QAAQ,oBAAoB;AAC7C,OAAOC,KAAK,IAAIC,WAAW,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AAC7D,SAASC,KAAK,EAAEC,KAAK,EAAEC,UAAU,EAAEC,gBAAgB,EAAEC,IAAI,QAAQ,cAAc;AAC/E,SAASC,WAAW,QAAQ,oBAAoB;AAEhD,OAAO,MAAMC,gBAAgB,GAAGA,CAAC;EAAEC,GAAG;EAAEC;AAA8C,CAAC,KAAK;EAC1F,MAAM,CAACC,OAAO,EAAEC,UAAU,CAAC,GAAGX,QAAQ,CAAC,IAAI,CAAC;EAC5C,MAAMY,WAAW,GAAGjB,SAAS,CAACkB,CAAC,IAAIA,CAAC,CAACC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sC,IAAI,EAAE;EAAG,CAAE,CACxC,CAEJ,CACF,CACD,CAAC;AAEZ,CAAC;AAED,MAAMX,MAAM,GAAGlC,UAAU,CAACiD,MAAM,CAAC;EAC/Bd,YAAY,EAAE;IACZe,IAAI,EAAE,CAAC;IACPC,eAAe,EAAE;EACnB,CAAC;EACDf,gBAAgB,EAAE;IAChBc,IAAI,EAAE,CAAC;IACPE,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE,QAAQ;IACpBC,OAAO,EAAE;EACX,CAAC;EACDjB,cAAc,EAAE;IACdkB,QAAQ,EAAE,QAAQ;IAClBC,YAAY,EAAE;EAChB,CAAC;EACDhB,KAAK,EAAE;IACL7B,KAAK,EAAE,MAAM;IACbE,MAAM,EAAE;EACV,CAAC;EACD6B,WAAW,EAAE;IACXe,QAAQ,EAAE,UAAU;IACpBC,GAAG,EAAE,EAAE;IACPC,KAAK,EAAE,EAAE;IACThD,KAAK,EAAE,EAAE;IACTE,MAAM,EAAE,EAAE;IACV2C,YAAY,EAAE,EAAE;IAChBL,eAAe,EAAE,oBAAoB;IACrCC,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE;EACd,CAAC;EACDN,gBAAgB,EAAE;IAChB,GAAG/C,UAAU,CAAC4D,kBAAkB;IAChCR,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE;EACd;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"..\\..\\..\\..\\src","sources":["components/overlay/index.ts"],"mappings":"AAAA,cAAc,oBAAoB","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ImageViewOverlay.d.ts","sourceRoot":"","sources":["../../../../src/components/overlay/ImageViewOverlay.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAyC,MAAM,OAAO,CAAA;AAI7D,eAAO,MAAM,gBAAgB,GAAI,kBAAkB;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,IAAI,CAAA;CAAE,sBA4DtF,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/overlay/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA"}
|