react-crud-mobile 1.3.19 → 1.3.20

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.
@@ -1,6 +1,6 @@
1
1
  import React, { useState, useEffect, useRef, useContext, useLayoutEffect, createContext } from 'react';
2
2
  import { Utils, ScopeUtils, CrudUtils, ViewUtils, ComponentUtils, HtmlUtils, ThemeUtils, useTheme } from 'react-crud-utils';
3
- import { View, StyleSheet, TouchableOpacity, Text, Linking, TouchableHighlight, Modal, StatusBar, SafeAreaView, Switch, TextInput, Platform, Dimensions, ScrollView, Alert, Image, KeyboardAvoidingView, TouchableWithoutFeedback, Keyboard } from 'react-native';
3
+ import { View, StyleSheet, TouchableOpacity, Text, Linking, TouchableHighlight, Modal, SafeAreaView, StatusBar, Switch, TextInput, Platform, Dimensions, ScrollView, Alert, Image, KeyboardAvoidingView, TouchableWithoutFeedback, Keyboard } from 'react-native';
4
4
  import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
5
5
  import Ionicons from '@expo/vector-icons/Ionicons';
6
6
  import { Ionicons as Ionicons$1, AntDesign, Entypo, EvilIcons, MaterialCommunityIcons } from '@expo/vector-icons';
@@ -481,6 +481,20 @@ function UIButton(props) {
481
481
  });
482
482
  }
483
483
 
484
+ //import { ThemeUtils, Utils } from 'react-crud-utils';
485
+ //import { StatusBar } from 'react-native';
486
+ var MobileUtils = /*#__PURE__*/function () {
487
+ function MobileUtils() {}
488
+ MobileUtils.syncTheme = function syncTheme() {
489
+ // let current = ThemeUtils.getCurrentTheme();
490
+ //let dec: any = { light: 'light-content', dark: 'dark-content' };
491
+ //let name = Utils.nvl(dec[current?.theme], dec.light);
492
+ //StatusBar.setBarStyle?.(name);
493
+ //StatusBar.setBackgroundColor?.(current?.colors?.theme);
494
+ };
495
+ return MobileUtils;
496
+ }();
497
+
484
498
  function UISelect(props) {
485
499
  var _theme$colors;
486
500
  var _useState = useState(false),
@@ -512,12 +526,16 @@ function UISelect(props) {
512
526
  handlePress();
513
527
  };
514
528
  var style = function style(part, extra) {
515
- return _extends({}, styles$3[part], scope.getStyle(part), extra);
529
+ var all = _extends({}, styles$3[part], extra);
530
+ return scope.getStyle(part, all);
516
531
  };
517
532
  var isModalVisible = function isModalVisible() {
518
533
  return modalVisible;
519
534
  };
520
535
  //v1
536
+ useEffect(function () {
537
+ MobileUtils.syncTheme();
538
+ }, [modalVisible]);
521
539
  return /*#__PURE__*/jsxs(View, {
522
540
  style: style('selectRoot'),
523
541
  children: [/*#__PURE__*/jsxs(TouchableOpacity, {
@@ -532,17 +550,14 @@ function UISelect(props) {
532
550
  color: scope.getPart('iconColor', null, iconColor),
533
551
  style: style('iconStyle', {})
534
552
  })]
535
- }), /*#__PURE__*/jsxs(Modal, {
553
+ }), /*#__PURE__*/jsx(Modal, {
536
554
  animationType: "slide",
537
555
  transparent: true,
538
556
  visible: isModalVisible(),
539
557
  onRequestClose: function onRequestClose() {
540
558
  return setModalVisible(false);
541
559
  },
542
- children: [/*#__PURE__*/jsx(StatusBar, {
543
- barStyle: "dark-content",
544
- backgroundColor: theme.colors.primary
545
- }), /*#__PURE__*/jsxs(SafeAreaView, {
560
+ children: /*#__PURE__*/jsxs(SafeAreaView, {
546
561
  style: style('modalSafe'),
547
562
  children: [/*#__PURE__*/jsxs(View, {
548
563
  style: style('modalHeader'),
@@ -570,7 +585,7 @@ function UISelect(props) {
570
585
  })
571
586
  })
572
587
  })]
573
- })]
588
+ })
574
589
  })]
575
590
  });
576
591
  }
@@ -1307,20 +1322,6 @@ function UIToast() {
1307
1322
  });
1308
1323
  }
1309
1324
 
1310
- //import { ThemeUtils, Utils } from 'react-crud-utils';
1311
- //import { StatusBar } from 'react-native';
1312
- var MobileUtils = /*#__PURE__*/function () {
1313
- function MobileUtils() {}
1314
- MobileUtils.syncTheme = function syncTheme() {
1315
- // let current = ThemeUtils.getCurrentTheme();
1316
- //let dec: any = { light: 'light-content', dark: 'dark-content' };
1317
- //let name = Utils.nvl(dec[current?.theme], dec.light);
1318
- //StatusBar.setBarStyle?.(name);
1319
- //StatusBar.setBackgroundColor?.(current?.colors?.theme);
1320
- };
1321
- return MobileUtils;
1322
- }();
1323
-
1324
1325
  function UIModal(props) {
1325
1326
  var _theme$styles, _main$dialog2;
1326
1327
  var _useState = useState(false),