react-crud-mobile 1.3.54 → 1.3.56

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.
@@ -15,6 +15,7 @@ var Slider = _interopDefault(require('@react-native-community/slider'));
15
15
  var Toast = require('react-native-toast-message');
16
16
  var Toast__default = _interopDefault(Toast);
17
17
  var DraggableFlatList = _interopDefault(require('react-native-draggable-flatlist'));
18
+ var reactNativeGestureHandler = require('react-native-gesture-handler');
18
19
  var reactNativeSafeAreaContext = require('react-native-safe-area-context');
19
20
 
20
21
  function _extends() {
@@ -1604,21 +1605,6 @@ function UIOrder(props) {
1604
1605
  var crud = scope.crud;
1605
1606
  var original = scope.original;
1606
1607
  var cols = reactCrudUtils.Utils.nvl(scope.getPart('cols', undefined, 1));
1607
- var add = reactCrudUtils.ComponentUtils.getDefine(props, 'add');
1608
- var hideAddWhenEmpty = original.hideAddWhenEmpty;
1609
- var getStyle = function getStyle(key, extra) {
1610
- return scope.getStyle(key, _extends({}, extra, styles$a[key]));
1611
- };
1612
- var getContainerStyle = function getContainerStyle(extra) {
1613
- var row = getStyle('container', {});
1614
- if (cols > 1) {
1615
- row = _extends({}, row, {
1616
- flexDirection: 'row',
1617
- flexWrap: 'wrap'
1618
- });
1619
- }
1620
- return row;
1621
- };
1622
1608
  var LocalData = function LocalData() {
1623
1609
  var _useState = React.useState(scope.updateIndex),
1624
1610
  index = _useState[0],
@@ -1649,38 +1635,6 @@ function UIOrder(props) {
1649
1635
  }
1650
1636
  return list;
1651
1637
  });
1652
- var isShowAdd = function isShowAdd() {
1653
- if (!reactCrudUtils.Utils.isEmpty(items)) {
1654
- return true;
1655
- }
1656
- return hideAddWhenEmpty !== true;
1657
- };
1658
- var Empty = function Empty() {
1659
- if (!reactCrudUtils.Utils.isEmpty(items)) {
1660
- return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {});
1661
- }
1662
- var empty = scope.attr('empty', 'Sem registro');
1663
- if (!empty) {
1664
- return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {});
1665
- }
1666
- if (typeof empty === 'string') {
1667
- return /*#__PURE__*/jsxRuntime.jsx(reactNative.Text, {
1668
- style: scope.getStyle('empty', {
1669
- flex: 1,
1670
- fontWeight: 500,
1671
- fontSize: 20,
1672
- padding: 10,
1673
- textAlign: 'center',
1674
- justifyContent: 'center',
1675
- alignItems: 'center'
1676
- }),
1677
- children: empty
1678
- });
1679
- }
1680
- return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
1681
- children: empty
1682
- });
1683
- };
1684
1638
  var renderItem = function renderItem(_ref) {
1685
1639
  var item = _ref.item,
1686
1640
  drag = _ref.drag,
@@ -1697,9 +1651,8 @@ function UIOrder(props) {
1697
1651
  })
1698
1652
  });
1699
1653
  };
1700
- return /*#__PURE__*/jsxRuntime.jsxs(reactNative.View, {
1701
- style: getContainerStyle(),
1702
- children: [/*#__PURE__*/jsxRuntime.jsx(Empty, {}), /*#__PURE__*/jsxRuntime.jsx(DraggableFlatList, {
1654
+ return /*#__PURE__*/jsxRuntime.jsx(reactNativeGestureHandler.GestureHandlerRootView, {
1655
+ children: /*#__PURE__*/jsxRuntime.jsx(DraggableFlatList, {
1703
1656
  data: items,
1704
1657
  renderItem: renderItem,
1705
1658
  keyExtractor: function keyExtractor(item) {
@@ -1709,9 +1662,7 @@ function UIOrder(props) {
1709
1662
  var data = _ref2.data;
1710
1663
  scope.changeValue(data);
1711
1664
  }
1712
- }), isShowAdd() && /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
1713
- children: add
1714
- })]
1665
+ })
1715
1666
  }, keyData);
1716
1667
  };
1717
1668
  return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {