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.
- package/dist/react-crud-mobile.cjs.development.js +35 -21
- 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 +35 -21
- package/dist/react-crud-mobile.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/elements/UIElement.tsx +1 -1
- package/src/elements/core/UIAutoComplete.tsx +17 -17
- package/src/elements/core/UILink.tsx +17 -17
- package/src/elements/core/UIListItem.tsx +32 -32
- package/src/elements/core/UIOption.tsx +17 -17
- package/src/elements/core/UIOrder.tsx +20 -2
- package/src/elements/core/UIRadio.tsx +17 -17
- package/src/elements/core/UISlider.tsx +61 -61
- package/src/elements/core/UIStatusBar.tsx +5 -5
- package/src/elements/core/UISwitch.tsx +27 -27
- package/src/hooks/useIsVisible.ts +39 -39
- package/src/utils/MobileUtils.ts +12 -12
@@ -1676,22 +1676,37 @@ function UIOrder(props) {
|
|
1676
1676
|
} else {
|
1677
1677
|
css = _extends({}, css, row.getStyle('rowUnSelected', {}));
|
1678
1678
|
}
|
1679
|
+
var Child = function Child() {
|
1680
|
+
if (Utils.isEmpty(props.children)) {
|
1681
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
1682
|
+
children: [/*#__PURE__*/jsx(MaterialCommunityIcons, {
|
1683
|
+
name: "drag",
|
1684
|
+
size: 24,
|
1685
|
+
color: "black"
|
1686
|
+
}), /*#__PURE__*/jsx(Text, {
|
1687
|
+
style: styles$a.text,
|
1688
|
+
children: scope.getItemLabel(item)
|
1689
|
+
})]
|
1690
|
+
});
|
1691
|
+
}
|
1692
|
+
return /*#__PURE__*/jsx(Fragment, {
|
1693
|
+
children: /*#__PURE__*/jsx(UIChildren, {
|
1694
|
+
"transient": true,
|
1695
|
+
scope: row,
|
1696
|
+
crud: row.crud,
|
1697
|
+
children: props.children
|
1698
|
+
})
|
1699
|
+
});
|
1700
|
+
};
|
1679
1701
|
return /*#__PURE__*/jsx(ScaleDecorator, {
|
1680
|
-
children: /*#__PURE__*/
|
1702
|
+
children: /*#__PURE__*/jsx(TouchableOpacity, {
|
1681
1703
|
style: [styles$a.row, {
|
1682
1704
|
backgroundColor: isActive ? 'lightblue' : 'white'
|
1683
1705
|
}, _extends({}, css)],
|
1684
1706
|
delayLongPress: 100,
|
1685
1707
|
onLongPress: drag // Initiate drag on long press
|
1686
1708
|
,
|
1687
|
-
children:
|
1688
|
-
name: "drag",
|
1689
|
-
size: 24,
|
1690
|
-
color: "black"
|
1691
|
-
}), /*#__PURE__*/jsx(Text, {
|
1692
|
-
style: styles$a.text,
|
1693
|
-
children: scope.getItemLabel(item)
|
1694
|
-
})]
|
1709
|
+
children: /*#__PURE__*/jsx(Child, {})
|
1695
1710
|
})
|
1696
1711
|
});
|
1697
1712
|
};
|
@@ -1773,18 +1788,17 @@ function UIElement(props) {
|
|
1773
1788
|
var ctx = useContext(CrudContext);
|
1774
1789
|
var theme = Utils.nvl(props.theme, ctx == null ? void 0 : ctx.theme);
|
1775
1790
|
var crud = Utils.nvl(props.crud, ctx == null ? void 0 : ctx.crud);
|
1776
|
-
var
|
1777
|
-
|
1778
|
-
|
1779
|
-
|
1780
|
-
|
1781
|
-
|
1782
|
-
|
1783
|
-
|
1784
|
-
|
1785
|
-
|
1786
|
-
|
1787
|
-
setError = _useState3[1];
|
1791
|
+
var scope = ScopeUtils.create(_extends({
|
1792
|
+
crud: crud
|
1793
|
+
}, props, {
|
1794
|
+
theme: theme
|
1795
|
+
}));
|
1796
|
+
var _useState = useState(0),
|
1797
|
+
index = _useState[0],
|
1798
|
+
setIndex = _useState[1];
|
1799
|
+
var _useState2 = useState(null),
|
1800
|
+
error = _useState2[0],
|
1801
|
+
setError = _useState2[1];
|
1788
1802
|
scope.compile(props);
|
1789
1803
|
crud = scope.crud;
|
1790
1804
|
var options = scope.getOptions();
|