react-crud-mobile 1.3.73 → 1.3.75
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/elements/core/UIHeader.d.ts +3 -0
- package/dist/react-crud-mobile.cjs.development.js +30 -39
- 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 -39
- package/dist/react-crud-mobile.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/elements/core/UIHeader.tsx +38 -0
- package/src/elements/core/UIOrder.tsx +2 -0
- package/src/elements/core/UISelect.tsx +1 -7
- package/src/elements/core/UIView.tsx +4 -40
|
@@ -492,20 +492,6 @@ function UIButton(props) {
|
|
|
492
492
|
});
|
|
493
493
|
}
|
|
494
494
|
|
|
495
|
-
//import { ThemeUtils, Utils } from 'react-crud-utils';
|
|
496
|
-
//import { StatusBar } from 'react-native';
|
|
497
|
-
var MobileUtils = /*#__PURE__*/function () {
|
|
498
|
-
function MobileUtils() {}
|
|
499
|
-
MobileUtils.syncTheme = function syncTheme() {
|
|
500
|
-
// let current = ThemeUtils.getCurrentTheme();
|
|
501
|
-
//let dec: any = { light: 'light-content', dark: 'dark-content' };
|
|
502
|
-
//let name = Utils.nvl(dec[current?.theme], dec.light);
|
|
503
|
-
//StatusBar.setBarStyle?.(name);
|
|
504
|
-
//StatusBar.setBackgroundColor?.(current?.colors?.theme);
|
|
505
|
-
};
|
|
506
|
-
return MobileUtils;
|
|
507
|
-
}();
|
|
508
|
-
|
|
509
495
|
function UISelect(props) {
|
|
510
496
|
var _theme$styles, _theme$colors, _scope$original, _scope$original2;
|
|
511
497
|
var _useState = React.useState(false),
|
|
@@ -547,9 +533,6 @@ function UISelect(props) {
|
|
|
547
533
|
return modalVisible;
|
|
548
534
|
};
|
|
549
535
|
//v4
|
|
550
|
-
React.useEffect(function () {
|
|
551
|
-
MobileUtils.syncTheme();
|
|
552
|
-
}, [modalVisible]);
|
|
553
536
|
return /*#__PURE__*/jsxRuntime.jsxs(reactNative.View, {
|
|
554
537
|
style: style('selectRoot'),
|
|
555
538
|
children: [/*#__PURE__*/jsxRuntime.jsxs(reactNative.TouchableOpacity, {
|
|
@@ -1524,27 +1507,13 @@ var styles$8 = /*#__PURE__*/reactNative.StyleSheet.create({
|
|
|
1524
1507
|
}
|
|
1525
1508
|
});
|
|
1526
1509
|
|
|
1527
|
-
function
|
|
1510
|
+
function UIHeader(_ref) {
|
|
1528
1511
|
var _theme$styles, _theme$styles2;
|
|
1529
|
-
var scope = _ref.scope
|
|
1530
|
-
children = _ref.children;
|
|
1512
|
+
var scope = _ref.scope;
|
|
1531
1513
|
var theme = scope.getTheme();
|
|
1532
1514
|
var header = scope.getPart('header', null, []);
|
|
1533
1515
|
var headerStyle = reactCrudUtils.Utils.nvl((_theme$styles = theme.styles) == null || (_theme$styles = _theme$styles.defaults) == null ? void 0 : _theme$styles.header, {});
|
|
1534
1516
|
var headerTextStyle = reactCrudUtils.Utils.nvl((_theme$styles2 = theme.styles) == null || (_theme$styles2 = _theme$styles2.defaults) == null ? void 0 : _theme$styles2.headerText, {});
|
|
1535
|
-
var scrollRef = React.useRef(null);
|
|
1536
|
-
var original = scope.original;
|
|
1537
|
-
React.useEffect(function () {
|
|
1538
|
-
MobileUtils.syncTheme();
|
|
1539
|
-
}, []);
|
|
1540
|
-
var onScroll = function onScroll() {
|
|
1541
|
-
var crud = reactCrudUtils.ViewUtils.getCrud();
|
|
1542
|
-
reactCrudUtils.Utils.each(crud.scroll, function (s) {
|
|
1543
|
-
if (s.onScroll) {
|
|
1544
|
-
s.onScroll.call(s);
|
|
1545
|
-
}
|
|
1546
|
-
});
|
|
1547
|
-
};
|
|
1548
1517
|
var headerStyleFull = reactCrudUtils.Utils.call(function () {
|
|
1549
1518
|
var css = scope.getStyle('header', headerStyle);
|
|
1550
1519
|
var bg = css.backgroundColor;
|
|
@@ -1565,6 +1534,27 @@ function UIView(_ref) {
|
|
|
1565
1534
|
children: header
|
|
1566
1535
|
});
|
|
1567
1536
|
};
|
|
1537
|
+
return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
1538
|
+
children: hasHeader && /*#__PURE__*/jsxRuntime.jsx(reactNative.View, {
|
|
1539
|
+
style: headerStyleFull,
|
|
1540
|
+
children: /*#__PURE__*/jsxRuntime.jsx(AuxHeader, {})
|
|
1541
|
+
})
|
|
1542
|
+
});
|
|
1543
|
+
}
|
|
1544
|
+
|
|
1545
|
+
function UIView(_ref) {
|
|
1546
|
+
var scope = _ref.scope,
|
|
1547
|
+
children = _ref.children;
|
|
1548
|
+
var scrollRef = React.useRef(null);
|
|
1549
|
+
var original = scope.original;
|
|
1550
|
+
var onScroll = function onScroll() {
|
|
1551
|
+
var crud = reactCrudUtils.ViewUtils.getCrud();
|
|
1552
|
+
reactCrudUtils.Utils.each(crud.scroll, function (s) {
|
|
1553
|
+
if (s.onScroll) {
|
|
1554
|
+
s.onScroll.call(s);
|
|
1555
|
+
}
|
|
1556
|
+
});
|
|
1557
|
+
};
|
|
1568
1558
|
scope.put('scrollRef', scrollRef);
|
|
1569
1559
|
reactCrudUtils.ComponentUtils.setViewScope(scope);
|
|
1570
1560
|
var Container = function Container() {
|
|
@@ -1594,9 +1584,8 @@ function UIView(_ref) {
|
|
|
1594
1584
|
});
|
|
1595
1585
|
};
|
|
1596
1586
|
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1597
|
-
children: [
|
|
1598
|
-
|
|
1599
|
-
children: /*#__PURE__*/jsxRuntime.jsx(AuxHeader, {})
|
|
1587
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(UIHeader, {
|
|
1588
|
+
scope: scope
|
|
1600
1589
|
}), /*#__PURE__*/jsxRuntime.jsx(Container, {}), /*#__PURE__*/jsxRuntime.jsx(UIToast, {})]
|
|
1601
1590
|
});
|
|
1602
1591
|
}
|
|
@@ -1666,14 +1655,16 @@ function UIOrder(props) {
|
|
|
1666
1655
|
var _useState = React.useState(items),
|
|
1667
1656
|
data = _useState[0],
|
|
1668
1657
|
setData = _useState[1];
|
|
1669
|
-
return /*#__PURE__*/jsxRuntime.
|
|
1658
|
+
return /*#__PURE__*/jsxRuntime.jsxs(reactNativeGestureHandler.GestureHandlerRootView, {
|
|
1670
1659
|
style: _extends({
|
|
1671
1660
|
flex: 1,
|
|
1672
1661
|
width: '100%'
|
|
1673
1662
|
}, scope.getStyle('order', {
|
|
1674
1663
|
justifyContent: 'flex-start'
|
|
1675
1664
|
})),
|
|
1676
|
-
children: /*#__PURE__*/jsxRuntime.jsx(
|
|
1665
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(UIHeader, {
|
|
1666
|
+
scope: scope
|
|
1667
|
+
}), /*#__PURE__*/jsxRuntime.jsx(DraggableFlatList__default, {
|
|
1677
1668
|
data: data,
|
|
1678
1669
|
renderItem: renderItem,
|
|
1679
1670
|
keyExtractor: function keyExtractor(item) {
|
|
@@ -1684,7 +1675,7 @@ function UIOrder(props) {
|
|
|
1684
1675
|
setData(data);
|
|
1685
1676
|
scope.changeValue(data);
|
|
1686
1677
|
}
|
|
1687
|
-
})
|
|
1678
|
+
})]
|
|
1688
1679
|
});
|
|
1689
1680
|
}
|
|
1690
1681
|
var styles$a = /*#__PURE__*/reactNative.StyleSheet.create({
|