react-crud-mobile 1.3.379 → 1.3.381
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 +19 -5
- 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 +19 -5
- package/dist/react-crud-mobile.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/elements/core/UIOrder.tsx +22 -3
@@ -1763,8 +1763,12 @@ function UIOrder(props) {
|
|
1763
1763
|
}, [items]);
|
1764
1764
|
var onChange = function onChange(updated) {
|
1765
1765
|
var array = [];
|
1766
|
+
var items = scope.getItems();
|
1767
|
+
items.splice(0);
|
1766
1768
|
reactCrudUtils.Utils.each(updated, function (o) {
|
1767
|
-
|
1769
|
+
var v = o.object;
|
1770
|
+
array.push(v);
|
1771
|
+
items.push(v);
|
1768
1772
|
});
|
1769
1773
|
scope.changeValue(array);
|
1770
1774
|
};
|
@@ -1864,9 +1868,18 @@ function UIOrder(props) {
|
|
1864
1868
|
return updated;
|
1865
1869
|
});
|
1866
1870
|
};
|
1867
|
-
|
1871
|
+
var Empty = function Empty() {
|
1872
|
+
if (reactCrudUtils.Utils.isEmpty(items)) {
|
1873
|
+
var empty = scope.part('empty', 'Sem registro');
|
1874
|
+
if (empty !== false) return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
|
1875
|
+
children: empty
|
1876
|
+
});
|
1877
|
+
}
|
1878
|
+
return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {});
|
1879
|
+
};
|
1880
|
+
return /*#__PURE__*/jsxRuntime.jsxs(reactNative.View, {
|
1868
1881
|
style: styles$a.container,
|
1869
|
-
children: /*#__PURE__*/jsxRuntime.jsx(reactNative.View, {
|
1882
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Empty, {}), /*#__PURE__*/jsxRuntime.jsx(reactNative.View, {
|
1870
1883
|
style: {
|
1871
1884
|
height: items.length * ITEM_HEIGHT,
|
1872
1885
|
width: '100%'
|
@@ -1876,8 +1889,9 @@ function UIOrder(props) {
|
|
1876
1889
|
var y = positions[item.value];
|
1877
1890
|
if (!y) return null;
|
1878
1891
|
var isDragging = draggingId === item.value;
|
1892
|
+
var itemStyle = scope.getStyle('row', _extends({}, styles$a.item));
|
1879
1893
|
return /*#__PURE__*/jsxRuntime.jsxs(reactNative.Animated.View, _extends({}, (_panRespondersRef$cur = (_panRespondersRef$cur2 = panRespondersRef.current[item.value]) == null ? void 0 : _panRespondersRef$cur2.panHandlers) != null ? _panRespondersRef$cur : {}, {
|
1880
|
-
style: [
|
1894
|
+
style: [itemStyle, {
|
1881
1895
|
position: 'absolute',
|
1882
1896
|
left: 0,
|
1883
1897
|
right: 0,
|
@@ -1911,7 +1925,7 @@ function UIOrder(props) {
|
|
1911
1925
|
})]
|
1912
1926
|
}), item.value);
|
1913
1927
|
})
|
1914
|
-
})
|
1928
|
+
})]
|
1915
1929
|
});
|
1916
1930
|
}
|
1917
1931
|
var styles$a = /*#__PURE__*/reactNative.StyleSheet.create({
|