react-crud-mobile 1.3.18 → 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.
- package/dist/react-crud-mobile.cjs.development.js +23 -21
- package/dist/react-crud-mobile.cjs.development.js.map +1 -1
- package/dist/react-crud-mobile.cjs.production.min.js +1 -1
- package/dist/react-crud-mobile.cjs.production.min.js.map +1 -1
- package/dist/react-crud-mobile.esm.js +24 -22
- package/dist/react-crud-mobile.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/elements/core/UISelect.tsx +11 -14
|
@@ -489,6 +489,20 @@ function UIButton(props) {
|
|
|
489
489
|
});
|
|
490
490
|
}
|
|
491
491
|
|
|
492
|
+
//import { ThemeUtils, Utils } from 'react-crud-utils';
|
|
493
|
+
//import { StatusBar } from 'react-native';
|
|
494
|
+
var MobileUtils = /*#__PURE__*/function () {
|
|
495
|
+
function MobileUtils() {}
|
|
496
|
+
MobileUtils.syncTheme = function syncTheme() {
|
|
497
|
+
// let current = ThemeUtils.getCurrentTheme();
|
|
498
|
+
//let dec: any = { light: 'light-content', dark: 'dark-content' };
|
|
499
|
+
//let name = Utils.nvl(dec[current?.theme], dec.light);
|
|
500
|
+
//StatusBar.setBarStyle?.(name);
|
|
501
|
+
//StatusBar.setBackgroundColor?.(current?.colors?.theme);
|
|
502
|
+
};
|
|
503
|
+
return MobileUtils;
|
|
504
|
+
}();
|
|
505
|
+
|
|
492
506
|
function UISelect(props) {
|
|
493
507
|
var _theme$colors;
|
|
494
508
|
var _useState = React.useState(false),
|
|
@@ -520,11 +534,16 @@ function UISelect(props) {
|
|
|
520
534
|
handlePress();
|
|
521
535
|
};
|
|
522
536
|
var style = function style(part, extra) {
|
|
523
|
-
|
|
537
|
+
var all = _extends({}, styles$3[part], extra);
|
|
538
|
+
return scope.getStyle(part, all);
|
|
524
539
|
};
|
|
525
540
|
var isModalVisible = function isModalVisible() {
|
|
526
541
|
return modalVisible;
|
|
527
542
|
};
|
|
543
|
+
//v1
|
|
544
|
+
React.useEffect(function () {
|
|
545
|
+
MobileUtils.syncTheme();
|
|
546
|
+
}, [modalVisible]);
|
|
528
547
|
return /*#__PURE__*/jsxRuntime.jsxs(reactNative.View, {
|
|
529
548
|
style: style('selectRoot'),
|
|
530
549
|
children: [/*#__PURE__*/jsxRuntime.jsxs(reactNative.TouchableOpacity, {
|
|
@@ -539,17 +558,14 @@ function UISelect(props) {
|
|
|
539
558
|
color: scope.getPart('iconColor', null, iconColor),
|
|
540
559
|
style: style('iconStyle', {})
|
|
541
560
|
})]
|
|
542
|
-
}), /*#__PURE__*/jsxRuntime.
|
|
561
|
+
}), /*#__PURE__*/jsxRuntime.jsx(reactNative.Modal, {
|
|
543
562
|
animationType: "slide",
|
|
544
563
|
transparent: true,
|
|
545
564
|
visible: isModalVisible(),
|
|
546
565
|
onRequestClose: function onRequestClose() {
|
|
547
566
|
return setModalVisible(false);
|
|
548
567
|
},
|
|
549
|
-
children:
|
|
550
|
-
barStyle: "dark-content",
|
|
551
|
-
backgroundColor: theme.colors.primary
|
|
552
|
-
}), /*#__PURE__*/jsxRuntime.jsxs(reactNative.SafeAreaView, {
|
|
568
|
+
children: /*#__PURE__*/jsxRuntime.jsxs(reactNative.SafeAreaView, {
|
|
553
569
|
style: style('modalSafe'),
|
|
554
570
|
children: [/*#__PURE__*/jsxRuntime.jsxs(reactNative.View, {
|
|
555
571
|
style: style('modalHeader'),
|
|
@@ -577,7 +593,7 @@ function UISelect(props) {
|
|
|
577
593
|
})
|
|
578
594
|
})
|
|
579
595
|
})]
|
|
580
|
-
})
|
|
596
|
+
})
|
|
581
597
|
})]
|
|
582
598
|
});
|
|
583
599
|
}
|
|
@@ -1314,20 +1330,6 @@ function UIToast() {
|
|
|
1314
1330
|
});
|
|
1315
1331
|
}
|
|
1316
1332
|
|
|
1317
|
-
//import { ThemeUtils, Utils } from 'react-crud-utils';
|
|
1318
|
-
//import { StatusBar } from 'react-native';
|
|
1319
|
-
var MobileUtils = /*#__PURE__*/function () {
|
|
1320
|
-
function MobileUtils() {}
|
|
1321
|
-
MobileUtils.syncTheme = function syncTheme() {
|
|
1322
|
-
// let current = ThemeUtils.getCurrentTheme();
|
|
1323
|
-
//let dec: any = { light: 'light-content', dark: 'dark-content' };
|
|
1324
|
-
//let name = Utils.nvl(dec[current?.theme], dec.light);
|
|
1325
|
-
//StatusBar.setBarStyle?.(name);
|
|
1326
|
-
//StatusBar.setBackgroundColor?.(current?.colors?.theme);
|
|
1327
|
-
};
|
|
1328
|
-
return MobileUtils;
|
|
1329
|
-
}();
|
|
1330
|
-
|
|
1331
1333
|
function UIModal(props) {
|
|
1332
1334
|
var _theme$styles, _main$dialog2;
|
|
1333
1335
|
var _useState = React.useState(false),
|