@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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plusscommunities/pluss-core-app",
3
- "version": "8.0.28",
3
+ "version": "8.0.29",
4
4
  "description": "Core extension package for Pluss Communities platform",
5
5
  "exports": {
6
6
  ".": {
@@ -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
- <View style={styles.container}>
296
- <SafeAreaView style={[{ width }, styles.headerContainer]}>
297
- {!cropMode ? (
298
- <View
299
- style={[
300
- styles.headerButtonContainer,
301
- { justifyContent: "flex-end" },
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
- <Text style={styles.headerButtonText}>{"Cancel"}</Text>
321
- </TouchableOpacity>
322
- <TouchableOpacity
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
- style={styles.headerButton}
333
- >
334
- <Text style={styles.headerButtonText}>
335
- {processing ? "Processing" : "Done"}
336
- </Text>
337
- </TouchableOpacity>
338
- </View>
339
- )}
340
- </SafeAreaView>
341
- <View
342
- onLayout={this.onContentLayout}
343
- style={[styles.contentContainer, { width }]}
344
- >
345
- <ScrollView
346
- style={{ position: "relative", flex: 1 }}
347
- contentContainerStyle={{ backgroundColor: "black" }}
348
- maximumZoomScale={5}
349
- minimumZoomScale={0.5}
350
- onScroll={this.onHandleScroll}
351
- bounces={false}
352
- showsHorizontalScrollIndicator={false}
353
- showsVerticalScrollIndicator={false}
354
- ref={(c) => (this.scrollView = c)}
355
- scrollEventThrottle={16}
356
- scrollEnabled={false}
357
- pinchGestureEnabled={false}
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
- <AutoHeightImage
360
- style={{ backgroundColor: "black" }}
361
- source={{ uri }}
362
- resizeMode={imageRatio >= 1 ? "contain" : "contain"}
363
- width={width}
364
- height={originalHeight}
365
- onLayout={this.calculateMaxSizes}
366
- />
367
- {!!cropMode && (
368
- <ImageCropOverlay
369
- onLayoutChanged={(top, left, width, height) => {
370
- this.currentSize.width = width;
371
- this.currentSize.height = height;
372
- this.currentPos.top = top;
373
- this.currentPos.left = left;
374
- }}
375
- initialWidth={cropWidth}
376
- initialHeight={cropHeight}
377
- initialTop={cropInitialTop}
378
- initialLeft={cropInitialLeft}
379
- minHeight={100}
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
- </ScrollView>
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
- </View>
390
+ </SafeAreaProvider>
387
391
  ) : (
388
392
  <View style={styles.container}>
389
393
  <Text style={styles.prepareMessageText}>Preparing...</Text>