react-crud-mobile 1.3.73 → 1.3.75

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.
@@ -483,20 +483,6 @@ function UIButton(props) {
483
483
  });
484
484
  }
485
485
 
486
- //import { ThemeUtils, Utils } from 'react-crud-utils';
487
- //import { StatusBar } from 'react-native';
488
- var MobileUtils = /*#__PURE__*/function () {
489
- function MobileUtils() {}
490
- MobileUtils.syncTheme = function syncTheme() {
491
- // let current = ThemeUtils.getCurrentTheme();
492
- //let dec: any = { light: 'light-content', dark: 'dark-content' };
493
- //let name = Utils.nvl(dec[current?.theme], dec.light);
494
- //StatusBar.setBarStyle?.(name);
495
- //StatusBar.setBackgroundColor?.(current?.colors?.theme);
496
- };
497
- return MobileUtils;
498
- }();
499
-
500
486
  function UISelect(props) {
501
487
  var _theme$styles, _theme$colors, _scope$original, _scope$original2;
502
488
  var _useState = useState(false),
@@ -538,9 +524,6 @@ function UISelect(props) {
538
524
  return modalVisible;
539
525
  };
540
526
  //v4
541
- useEffect(function () {
542
- MobileUtils.syncTheme();
543
- }, [modalVisible]);
544
527
  return /*#__PURE__*/jsxs(View, {
545
528
  style: style('selectRoot'),
546
529
  children: [/*#__PURE__*/jsxs(TouchableOpacity, {
@@ -1515,27 +1498,13 @@ var styles$8 = /*#__PURE__*/StyleSheet.create({
1515
1498
  }
1516
1499
  });
1517
1500
 
1518
- function UIView(_ref) {
1501
+ function UIHeader(_ref) {
1519
1502
  var _theme$styles, _theme$styles2;
1520
- var scope = _ref.scope,
1521
- children = _ref.children;
1503
+ var scope = _ref.scope;
1522
1504
  var theme = scope.getTheme();
1523
1505
  var header = scope.getPart('header', null, []);
1524
1506
  var headerStyle = Utils.nvl((_theme$styles = theme.styles) == null || (_theme$styles = _theme$styles.defaults) == null ? void 0 : _theme$styles.header, {});
1525
1507
  var headerTextStyle = Utils.nvl((_theme$styles2 = theme.styles) == null || (_theme$styles2 = _theme$styles2.defaults) == null ? void 0 : _theme$styles2.headerText, {});
1526
- var scrollRef = useRef(null);
1527
- var original = scope.original;
1528
- useEffect(function () {
1529
- MobileUtils.syncTheme();
1530
- }, []);
1531
- var onScroll = function onScroll() {
1532
- var crud = ViewUtils.getCrud();
1533
- Utils.each(crud.scroll, function (s) {
1534
- if (s.onScroll) {
1535
- s.onScroll.call(s);
1536
- }
1537
- });
1538
- };
1539
1508
  var headerStyleFull = Utils.call(function () {
1540
1509
  var css = scope.getStyle('header', headerStyle);
1541
1510
  var bg = css.backgroundColor;
@@ -1556,6 +1525,27 @@ function UIView(_ref) {
1556
1525
  children: header
1557
1526
  });
1558
1527
  };
1528
+ return /*#__PURE__*/jsx(Fragment, {
1529
+ children: hasHeader && /*#__PURE__*/jsx(View, {
1530
+ style: headerStyleFull,
1531
+ children: /*#__PURE__*/jsx(AuxHeader, {})
1532
+ })
1533
+ });
1534
+ }
1535
+
1536
+ function UIView(_ref) {
1537
+ var scope = _ref.scope,
1538
+ children = _ref.children;
1539
+ var scrollRef = useRef(null);
1540
+ var original = scope.original;
1541
+ var onScroll = function onScroll() {
1542
+ var crud = ViewUtils.getCrud();
1543
+ Utils.each(crud.scroll, function (s) {
1544
+ if (s.onScroll) {
1545
+ s.onScroll.call(s);
1546
+ }
1547
+ });
1548
+ };
1559
1549
  scope.put('scrollRef', scrollRef);
1560
1550
  ComponentUtils.setViewScope(scope);
1561
1551
  var Container = function Container() {
@@ -1585,9 +1575,8 @@ function UIView(_ref) {
1585
1575
  });
1586
1576
  };
1587
1577
  return /*#__PURE__*/jsxs(Fragment, {
1588
- children: [hasHeader && /*#__PURE__*/jsx(View, {
1589
- style: headerStyleFull,
1590
- children: /*#__PURE__*/jsx(AuxHeader, {})
1578
+ children: [/*#__PURE__*/jsx(UIHeader, {
1579
+ scope: scope
1591
1580
  }), /*#__PURE__*/jsx(Container, {}), /*#__PURE__*/jsx(UIToast, {})]
1592
1581
  });
1593
1582
  }
@@ -1657,14 +1646,16 @@ function UIOrder(props) {
1657
1646
  var _useState = useState(items),
1658
1647
  data = _useState[0],
1659
1648
  setData = _useState[1];
1660
- return /*#__PURE__*/jsx(GestureHandlerRootView, {
1649
+ return /*#__PURE__*/jsxs(GestureHandlerRootView, {
1661
1650
  style: _extends({
1662
1651
  flex: 1,
1663
1652
  width: '100%'
1664
1653
  }, scope.getStyle('order', {
1665
1654
  justifyContent: 'flex-start'
1666
1655
  })),
1667
- children: /*#__PURE__*/jsx(DraggableFlatList, {
1656
+ children: [/*#__PURE__*/jsx(UIHeader, {
1657
+ scope: scope
1658
+ }), /*#__PURE__*/jsx(DraggableFlatList, {
1668
1659
  data: data,
1669
1660
  renderItem: renderItem,
1670
1661
  keyExtractor: function keyExtractor(item) {
@@ -1675,7 +1666,7 @@ function UIOrder(props) {
1675
1666
  setData(data);
1676
1667
  scope.changeValue(data);
1677
1668
  }
1678
- })
1669
+ })]
1679
1670
  });
1680
1671
  }
1681
1672
  var styles$a = /*#__PURE__*/StyleSheet.create({