@plusscommunities/pluss-core-app 8.0.28 → 8.0.29
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
|
@@ -19,6 +19,7 @@ import AutoHeightImage from "react-native-auto-height-image";
|
|
|
19
19
|
import {
|
|
20
20
|
withSafeAreaInsets,
|
|
21
21
|
SafeAreaView,
|
|
22
|
+
SafeAreaProvider,
|
|
22
23
|
} from "react-native-safe-area-context";
|
|
23
24
|
import ImageCropOverlay from "./ImageCropOverlay";
|
|
24
25
|
|
|
@@ -292,98 +293,101 @@ class ExpoImageManipulator extends Component {
|
|
|
292
293
|
}}
|
|
293
294
|
>
|
|
294
295
|
{uri !== undefined ? (
|
|
295
|
-
<
|
|
296
|
-
<
|
|
297
|
-
{
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
<TouchableOpacity
|
|
305
|
-
onPress={() => {
|
|
306
|
-
onPictureChoosed({ uri, base64 });
|
|
307
|
-
this.onToggleModal();
|
|
308
|
-
}}
|
|
309
|
-
style={styles.headerButton}
|
|
310
|
-
>
|
|
311
|
-
<Text style={styles.headerButtonText}>{"Done"}</Text>
|
|
312
|
-
</TouchableOpacity>
|
|
313
|
-
</View>
|
|
314
|
-
) : (
|
|
315
|
-
<View style={styles.headerButtonContainer}>
|
|
316
|
-
<TouchableOpacity
|
|
317
|
-
onPress={this.onToggleModal}
|
|
318
|
-
style={styles.headerButton}
|
|
296
|
+
<SafeAreaProvider>
|
|
297
|
+
<View style={styles.container}>
|
|
298
|
+
<SafeAreaView style={[{ width }, styles.headerContainer]}>
|
|
299
|
+
{!cropMode ? (
|
|
300
|
+
<View
|
|
301
|
+
style={[
|
|
302
|
+
styles.headerButtonContainer,
|
|
303
|
+
{ justifyContent: "flex-end" },
|
|
304
|
+
]}
|
|
319
305
|
>
|
|
320
|
-
<
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
onPress={() => {
|
|
324
|
-
this.onCropImage(() => {
|
|
325
|
-
onPictureChoosed({
|
|
326
|
-
uri: this.state.uri,
|
|
327
|
-
base64: this.state.base64,
|
|
328
|
-
});
|
|
306
|
+
<TouchableOpacity
|
|
307
|
+
onPress={() => {
|
|
308
|
+
onPictureChoosed({ uri, base64 });
|
|
329
309
|
this.onToggleModal();
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
310
|
+
}}
|
|
311
|
+
style={styles.headerButton}
|
|
312
|
+
>
|
|
313
|
+
<Text style={styles.headerButtonText}>{"Done"}</Text>
|
|
314
|
+
</TouchableOpacity>
|
|
315
|
+
</View>
|
|
316
|
+
) : (
|
|
317
|
+
<View style={styles.headerButtonContainer}>
|
|
318
|
+
<TouchableOpacity
|
|
319
|
+
onPress={this.onToggleModal}
|
|
320
|
+
style={styles.headerButton}
|
|
321
|
+
>
|
|
322
|
+
<Text style={styles.headerButtonText}>{"Cancel"}</Text>
|
|
323
|
+
</TouchableOpacity>
|
|
324
|
+
<TouchableOpacity
|
|
325
|
+
onPress={() => {
|
|
326
|
+
this.onCropImage(() => {
|
|
327
|
+
onPictureChoosed({
|
|
328
|
+
uri: this.state.uri,
|
|
329
|
+
base64: this.state.base64,
|
|
330
|
+
});
|
|
331
|
+
this.onToggleModal();
|
|
332
|
+
});
|
|
333
|
+
}}
|
|
334
|
+
style={styles.headerButton}
|
|
335
|
+
>
|
|
336
|
+
<Text style={styles.headerButtonText}>
|
|
337
|
+
{processing ? "Processing" : "Done"}
|
|
338
|
+
</Text>
|
|
339
|
+
</TouchableOpacity>
|
|
340
|
+
</View>
|
|
341
|
+
)}
|
|
342
|
+
</SafeAreaView>
|
|
343
|
+
<SafeAreaView
|
|
344
|
+
onLayout={this.onContentLayout}
|
|
345
|
+
style={[styles.contentContainer, { width }]}
|
|
346
|
+
edges={["bottom"]}
|
|
358
347
|
>
|
|
359
|
-
<
|
|
360
|
-
style={{
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
}}
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
minWidth={100}
|
|
381
|
-
topMargin={topMargin}
|
|
348
|
+
<ScrollView
|
|
349
|
+
style={{ position: "relative", flex: 1 }}
|
|
350
|
+
contentContainerStyle={{ backgroundColor: "black" }}
|
|
351
|
+
maximumZoomScale={5}
|
|
352
|
+
minimumZoomScale={0.5}
|
|
353
|
+
onScroll={this.onHandleScroll}
|
|
354
|
+
bounces={false}
|
|
355
|
+
showsHorizontalScrollIndicator={false}
|
|
356
|
+
showsVerticalScrollIndicator={false}
|
|
357
|
+
ref={(c) => (this.scrollView = c)}
|
|
358
|
+
scrollEventThrottle={16}
|
|
359
|
+
scrollEnabled={false}
|
|
360
|
+
pinchGestureEnabled={false}
|
|
361
|
+
>
|
|
362
|
+
<AutoHeightImage
|
|
363
|
+
style={{ backgroundColor: "black" }}
|
|
364
|
+
source={{ uri }}
|
|
365
|
+
resizeMode={imageRatio >= 1 ? "contain" : "contain"}
|
|
366
|
+
width={width}
|
|
367
|
+
height={originalHeight}
|
|
368
|
+
onLayout={this.calculateMaxSizes}
|
|
382
369
|
/>
|
|
383
|
-
|
|
384
|
-
|
|
370
|
+
{!!cropMode && (
|
|
371
|
+
<ImageCropOverlay
|
|
372
|
+
onLayoutChanged={(top, left, width, height) => {
|
|
373
|
+
this.currentSize.width = width;
|
|
374
|
+
this.currentSize.height = height;
|
|
375
|
+
this.currentPos.top = top;
|
|
376
|
+
this.currentPos.left = left;
|
|
377
|
+
}}
|
|
378
|
+
initialWidth={cropWidth}
|
|
379
|
+
initialHeight={cropHeight}
|
|
380
|
+
initialTop={cropInitialTop}
|
|
381
|
+
initialLeft={cropInitialLeft}
|
|
382
|
+
minHeight={100}
|
|
383
|
+
minWidth={100}
|
|
384
|
+
topMargin={topMargin}
|
|
385
|
+
/>
|
|
386
|
+
)}
|
|
387
|
+
</ScrollView>
|
|
388
|
+
</SafeAreaView>
|
|
385
389
|
</View>
|
|
386
|
-
</
|
|
390
|
+
</SafeAreaProvider>
|
|
387
391
|
) : (
|
|
388
392
|
<View style={styles.container}>
|
|
389
393
|
<Text style={styles.prepareMessageText}>Preparing...</Text>
|