react-crud-mobile 1.3.184 → 1.3.186

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.
@@ -1685,22 +1685,37 @@ function UIOrder(props) {
1685
1685
  } else {
1686
1686
  css = _extends({}, css, row.getStyle('rowUnSelected', {}));
1687
1687
  }
1688
+ var Child = function Child() {
1689
+ if (reactCrudUtils.Utils.isEmpty(props.children)) {
1690
+ return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
1691
+ children: [/*#__PURE__*/jsxRuntime.jsx(vectorIcons.MaterialCommunityIcons, {
1692
+ name: "drag",
1693
+ size: 24,
1694
+ color: "black"
1695
+ }), /*#__PURE__*/jsxRuntime.jsx(reactNative.Text, {
1696
+ style: styles$a.text,
1697
+ children: scope.getItemLabel(item)
1698
+ })]
1699
+ });
1700
+ }
1701
+ return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
1702
+ children: /*#__PURE__*/jsxRuntime.jsx(UIChildren, {
1703
+ "transient": true,
1704
+ scope: row,
1705
+ crud: row.crud,
1706
+ children: props.children
1707
+ })
1708
+ });
1709
+ };
1688
1710
  return /*#__PURE__*/jsxRuntime.jsx(DraggableFlatList.ScaleDecorator, {
1689
- children: /*#__PURE__*/jsxRuntime.jsxs(reactNative.TouchableOpacity, {
1711
+ children: /*#__PURE__*/jsxRuntime.jsx(reactNative.TouchableOpacity, {
1690
1712
  style: [styles$a.row, {
1691
1713
  backgroundColor: isActive ? 'lightblue' : 'white'
1692
1714
  }, _extends({}, css)],
1693
1715
  delayLongPress: 100,
1694
1716
  onLongPress: drag // Initiate drag on long press
1695
1717
  ,
1696
- children: [/*#__PURE__*/jsxRuntime.jsx(vectorIcons.MaterialCommunityIcons, {
1697
- name: "drag",
1698
- size: 24,
1699
- color: "black"
1700
- }), /*#__PURE__*/jsxRuntime.jsx(reactNative.Text, {
1701
- style: styles$a.text,
1702
- children: scope.getItemLabel(item)
1703
- })]
1718
+ children: /*#__PURE__*/jsxRuntime.jsx(Child, {})
1704
1719
  })
1705
1720
  });
1706
1721
  };
@@ -1782,18 +1797,17 @@ function UIElement(props) {
1782
1797
  var ctx = React.useContext(CrudContext);
1783
1798
  var theme = reactCrudUtils.Utils.nvl(props.theme, ctx == null ? void 0 : ctx.theme);
1784
1799
  var crud = reactCrudUtils.Utils.nvl(props.crud, ctx == null ? void 0 : ctx.crud);
1785
- var _useState = React.useState(reactCrudUtils.ScopeUtils.create(_extends({
1786
- crud: crud
1787
- }, props, {
1788
- theme: theme
1789
- }))),
1790
- scope = _useState[0];
1791
- var _useState2 = React.useState(0),
1792
- index = _useState2[0],
1793
- setIndex = _useState2[1];
1794
- var _useState3 = React.useState(null),
1795
- error = _useState3[0],
1796
- setError = _useState3[1];
1800
+ var scope = reactCrudUtils.ScopeUtils.create(_extends({
1801
+ crud: crud
1802
+ }, props, {
1803
+ theme: theme
1804
+ }));
1805
+ var _useState = React.useState(0),
1806
+ index = _useState[0],
1807
+ setIndex = _useState[1];
1808
+ var _useState2 = React.useState(null),
1809
+ error = _useState2[0],
1810
+ setError = _useState2[1];
1797
1811
  scope.compile(props);
1798
1812
  crud = scope.crud;
1799
1813
  var options = scope.getOptions();