react-crud-mobile 1.3.72 → 1.3.74
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 +50 -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 +50 -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/UIView.tsx +18 -43
|
@@ -1524,27 +1524,13 @@ var styles$8 = /*#__PURE__*/reactNative.StyleSheet.create({
|
|
|
1524
1524
|
}
|
|
1525
1525
|
});
|
|
1526
1526
|
|
|
1527
|
-
function
|
|
1527
|
+
function UIHeader(_ref) {
|
|
1528
1528
|
var _theme$styles, _theme$styles2;
|
|
1529
|
-
var scope = _ref.scope
|
|
1530
|
-
children = _ref.children;
|
|
1529
|
+
var scope = _ref.scope;
|
|
1531
1530
|
var theme = scope.getTheme();
|
|
1532
1531
|
var header = scope.getPart('header', null, []);
|
|
1533
1532
|
var headerStyle = reactCrudUtils.Utils.nvl((_theme$styles = theme.styles) == null || (_theme$styles = _theme$styles.defaults) == null ? void 0 : _theme$styles.header, {});
|
|
1534
1533
|
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
1534
|
var headerStyleFull = reactCrudUtils.Utils.call(function () {
|
|
1549
1535
|
var css = scope.getStyle('header', headerStyle);
|
|
1550
1536
|
var bg = css.backgroundColor;
|
|
@@ -1565,6 +1551,30 @@ function UIView(_ref) {
|
|
|
1565
1551
|
children: header
|
|
1566
1552
|
});
|
|
1567
1553
|
};
|
|
1554
|
+
return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
1555
|
+
children: hasHeader && /*#__PURE__*/jsxRuntime.jsx(reactNative.View, {
|
|
1556
|
+
style: headerStyleFull,
|
|
1557
|
+
children: /*#__PURE__*/jsxRuntime.jsx(AuxHeader, {})
|
|
1558
|
+
})
|
|
1559
|
+
});
|
|
1560
|
+
}
|
|
1561
|
+
|
|
1562
|
+
function UIView(_ref) {
|
|
1563
|
+
var scope = _ref.scope,
|
|
1564
|
+
children = _ref.children;
|
|
1565
|
+
var scrollRef = React.useRef(null);
|
|
1566
|
+
var original = scope.original;
|
|
1567
|
+
React.useEffect(function () {
|
|
1568
|
+
MobileUtils.syncTheme();
|
|
1569
|
+
}, []);
|
|
1570
|
+
var onScroll = function onScroll() {
|
|
1571
|
+
var crud = reactCrudUtils.ViewUtils.getCrud();
|
|
1572
|
+
reactCrudUtils.Utils.each(crud.scroll, function (s) {
|
|
1573
|
+
if (s.onScroll) {
|
|
1574
|
+
s.onScroll.call(s);
|
|
1575
|
+
}
|
|
1576
|
+
});
|
|
1577
|
+
};
|
|
1568
1578
|
scope.put('scrollRef', scrollRef);
|
|
1569
1579
|
reactCrudUtils.ComponentUtils.setViewScope(scope);
|
|
1570
1580
|
var Container = function Container() {
|
|
@@ -1574,30 +1584,29 @@ function UIView(_ref) {
|
|
|
1574
1584
|
children: children
|
|
1575
1585
|
});
|
|
1576
1586
|
}
|
|
1577
|
-
return /*#__PURE__*/jsxRuntime.jsx(reactNative.
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
children:
|
|
1587
|
+
return /*#__PURE__*/jsxRuntime.jsx(reactNative.View, {
|
|
1588
|
+
style: scope.getStyle('container', styles$9.container),
|
|
1589
|
+
children: /*#__PURE__*/jsxRuntime.jsx(reactNative.ScrollView, {
|
|
1590
|
+
onScroll: onScroll,
|
|
1591
|
+
scrollEventThrottle: 16,
|
|
1592
|
+
ref: scrollRef,
|
|
1593
|
+
nestedScrollEnabled: true,
|
|
1594
|
+
keyboardShouldPersistTaps: "handled",
|
|
1595
|
+
contentContainerStyle: scope.getStyle('contentContainer', {
|
|
1596
|
+
paddingBottom: 50
|
|
1597
|
+
}),
|
|
1598
|
+
style: scope.getStyle('scroll', styles$9.scroll),
|
|
1599
|
+
children: /*#__PURE__*/jsxRuntime.jsx(UIChildren, {
|
|
1600
|
+
scope: scope,
|
|
1601
|
+
children: children
|
|
1602
|
+
})
|
|
1590
1603
|
})
|
|
1591
1604
|
});
|
|
1592
1605
|
};
|
|
1593
1606
|
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1594
|
-
children: [
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
}), /*#__PURE__*/jsxRuntime.jsx(reactNative.View, {
|
|
1598
|
-
style: scope.getStyle('container', styles$9.container),
|
|
1599
|
-
children: /*#__PURE__*/jsxRuntime.jsx(Container, {})
|
|
1600
|
-
}), /*#__PURE__*/jsxRuntime.jsx(UIToast, {})]
|
|
1607
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(UIHeader, {
|
|
1608
|
+
scope: scope
|
|
1609
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Container, {}), /*#__PURE__*/jsxRuntime.jsx(UIToast, {})]
|
|
1601
1610
|
});
|
|
1602
1611
|
}
|
|
1603
1612
|
var styles$9 = /*#__PURE__*/reactNative.StyleSheet.create({
|
|
@@ -1666,14 +1675,16 @@ function UIOrder(props) {
|
|
|
1666
1675
|
var _useState = React.useState(items),
|
|
1667
1676
|
data = _useState[0],
|
|
1668
1677
|
setData = _useState[1];
|
|
1669
|
-
return /*#__PURE__*/jsxRuntime.
|
|
1678
|
+
return /*#__PURE__*/jsxRuntime.jsxs(reactNativeGestureHandler.GestureHandlerRootView, {
|
|
1670
1679
|
style: _extends({
|
|
1671
1680
|
flex: 1,
|
|
1672
1681
|
width: '100%'
|
|
1673
1682
|
}, scope.getStyle('order', {
|
|
1674
1683
|
justifyContent: 'flex-start'
|
|
1675
1684
|
})),
|
|
1676
|
-
children: /*#__PURE__*/jsxRuntime.jsx(
|
|
1685
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(UIHeader, {
|
|
1686
|
+
scope: scope
|
|
1687
|
+
}), /*#__PURE__*/jsxRuntime.jsx(DraggableFlatList__default, {
|
|
1677
1688
|
data: data,
|
|
1678
1689
|
renderItem: renderItem,
|
|
1679
1690
|
keyExtractor: function keyExtractor(item) {
|
|
@@ -1684,7 +1695,7 @@ function UIOrder(props) {
|
|
|
1684
1695
|
setData(data);
|
|
1685
1696
|
scope.changeValue(data);
|
|
1686
1697
|
}
|
|
1687
|
-
})
|
|
1698
|
+
})]
|
|
1688
1699
|
});
|
|
1689
1700
|
}
|
|
1690
1701
|
var styles$a = /*#__PURE__*/reactNative.StyleSheet.create({
|