react-crud-mobile 1.3.183 → 1.3.184
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 +25 -8
- 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 +25 -8
- package/dist/react-crud-mobile.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/elements/core/UIOrder.tsx +24 -5
@@ -1654,16 +1654,33 @@ function UIOrder(props) {
|
|
1654
1654
|
var renderItem = function renderItem(_ref) {
|
1655
1655
|
var item = _ref.item,
|
1656
1656
|
drag = _ref.drag,
|
1657
|
-
isActive = _ref.isActive
|
1658
|
-
|
1657
|
+
isActive = _ref.isActive,
|
1658
|
+
getIndex = _ref.getIndex;
|
1659
|
+
var index = getIndex();
|
1660
|
+
var name = "" + scope.key('row', index, '');
|
1661
|
+
var _useState = useState(ScopeUtils.create(_extends({}, original, {
|
1662
|
+
parent: scope,
|
1663
|
+
name: name,
|
1664
|
+
crud: scope.crud,
|
1665
|
+
index: index,
|
1666
|
+
type: 'row',
|
1667
|
+
data: item
|
1668
|
+
}))),
|
1669
|
+
row = _useState[0];
|
1670
|
+
var css = _extends({}, scope.getStyle('row'));
|
1671
|
+
if (isActive) {
|
1672
|
+
css = _extends({}, css, scope.getStyle('active'));
|
1673
|
+
}
|
1659
1674
|
if (isActive) {
|
1660
|
-
|
1675
|
+
css = _extends({}, css, row.getStyle('rowSelected', {}));
|
1676
|
+
} else {
|
1677
|
+
css = _extends({}, css, row.getStyle('rowUnSelected', {}));
|
1661
1678
|
}
|
1662
1679
|
return /*#__PURE__*/jsx(ScaleDecorator, {
|
1663
1680
|
children: /*#__PURE__*/jsxs(TouchableOpacity, {
|
1664
1681
|
style: [styles$a.row, {
|
1665
1682
|
backgroundColor: isActive ? 'lightblue' : 'white'
|
1666
|
-
}, _extends({},
|
1683
|
+
}, _extends({}, css)],
|
1667
1684
|
delayLongPress: 100,
|
1668
1685
|
onLongPress: drag // Initiate drag on long press
|
1669
1686
|
,
|
@@ -1697,16 +1714,16 @@ function UIOrder(props) {
|
|
1697
1714
|
};
|
1698
1715
|
var Header = function Header(_ref3) {
|
1699
1716
|
var pos = _ref3.pos;
|
1700
|
-
var hPos = Utils.nvl(original.headerPos, '
|
1717
|
+
var hPos = Utils.nvl(original.headerPos, 'outer');
|
1701
1718
|
if (hPos !== pos) return /*#__PURE__*/jsx(Fragment, {});
|
1702
1719
|
return /*#__PURE__*/jsx(UIHeader, {
|
1703
1720
|
scope: scope
|
1704
1721
|
});
|
1705
1722
|
};
|
1706
1723
|
var OrderData = function OrderData() {
|
1707
|
-
var
|
1708
|
-
data =
|
1709
|
-
setData =
|
1724
|
+
var _useState2 = useState(items),
|
1725
|
+
data = _useState2[0],
|
1726
|
+
setData = _useState2[1];
|
1710
1727
|
return /*#__PURE__*/jsx(DraggableFlatList, {
|
1711
1728
|
data: data,
|
1712
1729
|
ListHeaderComponent: /*#__PURE__*/jsx(Header, {
|