react-crud-mobile 1.3.57 → 1.3.58
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 +31 -19
- 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 +30 -19
- package/dist/react-crud-mobile.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/elements/core/UIOrder.tsx +27 -18
|
@@ -14,7 +14,9 @@ var vectorIcons = require('@expo/vector-icons');
|
|
|
14
14
|
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
|
-
var DraggableFlatList =
|
|
17
|
+
var DraggableFlatList = require('react-native-draggable-flatlist');
|
|
18
|
+
var DraggableFlatList__default = _interopDefault(DraggableFlatList);
|
|
19
|
+
var reactNativeGestureHandler = require('react-native-gesture-handler');
|
|
18
20
|
var reactNativeSafeAreaContext = require('react-native-safe-area-context');
|
|
19
21
|
|
|
20
22
|
function _extends() {
|
|
@@ -1651,30 +1653,40 @@ function UIOrder(props) {
|
|
|
1651
1653
|
var item = _ref.item,
|
|
1652
1654
|
drag = _ref.drag,
|
|
1653
1655
|
isActive = _ref.isActive;
|
|
1654
|
-
return /*#__PURE__*/jsxRuntime.jsx(
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1656
|
+
return /*#__PURE__*/jsxRuntime.jsx(DraggableFlatList.ScaleDecorator, {
|
|
1657
|
+
children: /*#__PURE__*/jsxRuntime.jsx(reactNative.TouchableOpacity, {
|
|
1658
|
+
style: [styles$a.row, {
|
|
1659
|
+
backgroundColor: isActive ? 'lightblue' : 'white'
|
|
1660
|
+
}],
|
|
1661
|
+
onLongPress: drag // Initiate drag on long press
|
|
1662
|
+
,
|
|
1663
|
+
children: /*#__PURE__*/jsxRuntime.jsx(reactNative.Text, {
|
|
1664
|
+
style: styles$a.text,
|
|
1665
|
+
children: scope.getItemLabel(item)
|
|
1666
|
+
})
|
|
1663
1667
|
})
|
|
1664
1668
|
});
|
|
1665
1669
|
};
|
|
1670
|
+
var _useState2 = React.useState(items),
|
|
1671
|
+
setData = _useState2[1];
|
|
1666
1672
|
return /*#__PURE__*/jsxRuntime.jsx(reactNative.View, {
|
|
1667
1673
|
style: getContainerStyle(),
|
|
1668
|
-
children: /*#__PURE__*/jsxRuntime.jsx(
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
keyExtractor: function keyExtractor(item) {
|
|
1672
|
-
return scope.getItemValue(item);
|
|
1674
|
+
children: /*#__PURE__*/jsxRuntime.jsx(reactNativeGestureHandler.GestureHandlerRootView, {
|
|
1675
|
+
style: {
|
|
1676
|
+
flex: 1
|
|
1673
1677
|
},
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
+
children: /*#__PURE__*/jsxRuntime.jsx(DraggableFlatList__default, {
|
|
1679
|
+
data: items,
|
|
1680
|
+
renderItem: renderItem,
|
|
1681
|
+
keyExtractor: function keyExtractor(item) {
|
|
1682
|
+
return scope.getItemValue(item);
|
|
1683
|
+
},
|
|
1684
|
+
onDragEnd: function onDragEnd(_ref2) {
|
|
1685
|
+
var data = _ref2.data;
|
|
1686
|
+
setData(data);
|
|
1687
|
+
scope.changeValue(data);
|
|
1688
|
+
}
|
|
1689
|
+
})
|
|
1678
1690
|
})
|
|
1679
1691
|
}, keyData);
|
|
1680
1692
|
};
|