react-crud-mobile 1.3.73 → 1.3.74

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.
@@ -1515,27 +1515,13 @@ var styles$8 = /*#__PURE__*/StyleSheet.create({
1515
1515
  }
1516
1516
  });
1517
1517
 
1518
- function UIView(_ref) {
1518
+ function UIHeader(_ref) {
1519
1519
  var _theme$styles, _theme$styles2;
1520
- var scope = _ref.scope,
1521
- children = _ref.children;
1520
+ var scope = _ref.scope;
1522
1521
  var theme = scope.getTheme();
1523
1522
  var header = scope.getPart('header', null, []);
1524
1523
  var headerStyle = Utils.nvl((_theme$styles = theme.styles) == null || (_theme$styles = _theme$styles.defaults) == null ? void 0 : _theme$styles.header, {});
1525
1524
  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
1525
  var headerStyleFull = Utils.call(function () {
1540
1526
  var css = scope.getStyle('header', headerStyle);
1541
1527
  var bg = css.backgroundColor;
@@ -1556,6 +1542,30 @@ function UIView(_ref) {
1556
1542
  children: header
1557
1543
  });
1558
1544
  };
1545
+ return /*#__PURE__*/jsx(Fragment, {
1546
+ children: hasHeader && /*#__PURE__*/jsx(View, {
1547
+ style: headerStyleFull,
1548
+ children: /*#__PURE__*/jsx(AuxHeader, {})
1549
+ })
1550
+ });
1551
+ }
1552
+
1553
+ function UIView(_ref) {
1554
+ var scope = _ref.scope,
1555
+ children = _ref.children;
1556
+ var scrollRef = useRef(null);
1557
+ var original = scope.original;
1558
+ useEffect(function () {
1559
+ MobileUtils.syncTheme();
1560
+ }, []);
1561
+ var onScroll = function onScroll() {
1562
+ var crud = ViewUtils.getCrud();
1563
+ Utils.each(crud.scroll, function (s) {
1564
+ if (s.onScroll) {
1565
+ s.onScroll.call(s);
1566
+ }
1567
+ });
1568
+ };
1559
1569
  scope.put('scrollRef', scrollRef);
1560
1570
  ComponentUtils.setViewScope(scope);
1561
1571
  var Container = function Container() {
@@ -1585,9 +1595,8 @@ function UIView(_ref) {
1585
1595
  });
1586
1596
  };
1587
1597
  return /*#__PURE__*/jsxs(Fragment, {
1588
- children: [hasHeader && /*#__PURE__*/jsx(View, {
1589
- style: headerStyleFull,
1590
- children: /*#__PURE__*/jsx(AuxHeader, {})
1598
+ children: [/*#__PURE__*/jsx(UIHeader, {
1599
+ scope: scope
1591
1600
  }), /*#__PURE__*/jsx(Container, {}), /*#__PURE__*/jsx(UIToast, {})]
1592
1601
  });
1593
1602
  }
@@ -1657,14 +1666,16 @@ function UIOrder(props) {
1657
1666
  var _useState = useState(items),
1658
1667
  data = _useState[0],
1659
1668
  setData = _useState[1];
1660
- return /*#__PURE__*/jsx(GestureHandlerRootView, {
1669
+ return /*#__PURE__*/jsxs(GestureHandlerRootView, {
1661
1670
  style: _extends({
1662
1671
  flex: 1,
1663
1672
  width: '100%'
1664
1673
  }, scope.getStyle('order', {
1665
1674
  justifyContent: 'flex-start'
1666
1675
  })),
1667
- children: /*#__PURE__*/jsx(DraggableFlatList, {
1676
+ children: [/*#__PURE__*/jsx(UIHeader, {
1677
+ scope: scope
1678
+ }), /*#__PURE__*/jsx(DraggableFlatList, {
1668
1679
  data: data,
1669
1680
  renderItem: renderItem,
1670
1681
  keyExtractor: function keyExtractor(item) {
@@ -1675,7 +1686,7 @@ function UIOrder(props) {
1675
1686
  setData(data);
1676
1687
  scope.changeValue(data);
1677
1688
  }
1678
- })
1689
+ })]
1679
1690
  });
1680
1691
  }
1681
1692
  var styles$a = /*#__PURE__*/StyleSheet.create({