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
@@ -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.
|
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:
|
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
|
1786
|
-
|
1787
|
-
|
1788
|
-
|
1789
|
-
|
1790
|
-
|
1791
|
-
|
1792
|
-
|
1793
|
-
|
1794
|
-
|
1795
|
-
|
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();
|