react-crud-mobile 1.3.145 → 1.3.147
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/UI.d.ts +2 -0
- package/dist/elements/core/GestureView.d.ts +9 -0
- package/dist/react-crud-mobile.cjs.development.js +48 -10
- 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 +48 -10
- package/dist/react-crud-mobile.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/elements/UI.tsx +2 -0
- package/src/elements/core/GestureView.tsx +16 -0
- package/src/elements/core/UIModal.tsx +19 -5
- package/src/elements/core/UIOrder.tsx +23 -5
package/dist/elements/UI.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ListType, UserType, InputType, ChartType, ContainerType, ListInputType, TabsType, DefineType, ButtonType, IconType, LinkType, SliderType } from 'react-crud-utils';
|
|
3
3
|
import SafeView from './core/SafeView';
|
|
4
|
+
import GestureView from './core/GestureView';
|
|
4
5
|
declare const UI: {
|
|
5
6
|
Order: (props: ListType) => import("react").JSX.Element;
|
|
6
7
|
List: (props: ListType) => import("react").JSX.Element;
|
|
@@ -44,5 +45,6 @@ declare const UI: {
|
|
|
44
45
|
Quantity: (props: ListInputType) => import("react").JSX.Element;
|
|
45
46
|
Slider: (props: SliderType) => import("react").JSX.Element;
|
|
46
47
|
SafeView: typeof SafeView;
|
|
48
|
+
GestureView: typeof GestureView;
|
|
47
49
|
};
|
|
48
50
|
export default UI;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { StyleProp, ViewStyle } from 'react-native';
|
|
3
|
+
interface SafeViewType {
|
|
4
|
+
safeStyle?: StyleProp<ViewStyle> | any;
|
|
5
|
+
viewStyle?: StyleProp<ViewStyle> | any;
|
|
6
|
+
children?: any;
|
|
7
|
+
}
|
|
8
|
+
export default function GestureView(props: SafeViewType): import("react").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -1355,7 +1355,7 @@ function UIModal(_ref) {
|
|
|
1355
1355
|
var _useState2 = React.useState(0),
|
|
1356
1356
|
index = _useState2[0],
|
|
1357
1357
|
setIndex = _useState2[1];
|
|
1358
|
-
//
|
|
1358
|
+
//v6
|
|
1359
1359
|
var label = scope.getLabel();
|
|
1360
1360
|
var theme = scope.getTheme();
|
|
1361
1361
|
var headerStyle = reactCrudUtils.Utils.nvl((_theme$styles = theme.styles) == null || (_theme$styles = _theme$styles.defaults) == null ? void 0 : _theme$styles.header, {});
|
|
@@ -1413,7 +1413,6 @@ function UIModal(_ref) {
|
|
|
1413
1413
|
var children = _ref2.children;
|
|
1414
1414
|
var disableScroll = scope.getPart('disableScroll', false);
|
|
1415
1415
|
var disableContent = scope.getPart('disableContent', false);
|
|
1416
|
-
console.log(scope.original);
|
|
1417
1416
|
if (disableContent) {
|
|
1418
1417
|
return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
1419
1418
|
children: children
|
|
@@ -1437,10 +1436,22 @@ function UIModal(_ref) {
|
|
|
1437
1436
|
children: children
|
|
1438
1437
|
});
|
|
1439
1438
|
};
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1439
|
+
var ModalView = function ModalView(_ref3) {
|
|
1440
|
+
var children = _ref3.children;
|
|
1441
|
+
var original = scope.original;
|
|
1442
|
+
if (original.gesture) {
|
|
1443
|
+
return /*#__PURE__*/jsxRuntime.jsx(reactNativeGestureHandler.GestureHandlerRootView, {
|
|
1444
|
+
style: {
|
|
1445
|
+
flex: 1
|
|
1446
|
+
},
|
|
1447
|
+
children: children
|
|
1448
|
+
});
|
|
1449
|
+
}
|
|
1450
|
+
return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
1451
|
+
children: children
|
|
1452
|
+
});
|
|
1453
|
+
};
|
|
1454
|
+
return /*#__PURE__*/jsxRuntime.jsx(ModalView, {
|
|
1444
1455
|
children: /*#__PURE__*/jsxRuntime.jsxs(reactNative.Modal, {
|
|
1445
1456
|
animationType: "slide",
|
|
1446
1457
|
transparent: true,
|
|
@@ -1665,7 +1676,24 @@ function UIOrder(props) {
|
|
|
1665
1676
|
var _useState = React.useState(items),
|
|
1666
1677
|
data = _useState[0],
|
|
1667
1678
|
setData = _useState[1];
|
|
1668
|
-
|
|
1679
|
+
var OrderView = function OrderView(_ref2) {
|
|
1680
|
+
var children = _ref2.children;
|
|
1681
|
+
if (original.gesture !== false) {
|
|
1682
|
+
return /*#__PURE__*/jsxRuntime.jsx(reactNativeGestureHandler.GestureHandlerRootView, {
|
|
1683
|
+
style: _extends({
|
|
1684
|
+
flex: 1,
|
|
1685
|
+
width: '100%'
|
|
1686
|
+
}, scope.getStyle('order', {
|
|
1687
|
+
justifyContent: 'flex-start'
|
|
1688
|
+
})),
|
|
1689
|
+
children: children
|
|
1690
|
+
});
|
|
1691
|
+
}
|
|
1692
|
+
return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
1693
|
+
children: children
|
|
1694
|
+
});
|
|
1695
|
+
};
|
|
1696
|
+
return /*#__PURE__*/jsxRuntime.jsxs(OrderView, {
|
|
1669
1697
|
children: [/*#__PURE__*/jsxRuntime.jsx(UIHeader, {
|
|
1670
1698
|
scope: scope
|
|
1671
1699
|
}), /*#__PURE__*/jsxRuntime.jsx(DraggableFlatList__default, {
|
|
@@ -1678,8 +1706,8 @@ function UIOrder(props) {
|
|
|
1678
1706
|
}
|
|
1679
1707
|
return key;
|
|
1680
1708
|
},
|
|
1681
|
-
onDragEnd: function onDragEnd(
|
|
1682
|
-
var data =
|
|
1709
|
+
onDragEnd: function onDragEnd(_ref3) {
|
|
1710
|
+
var data = _ref3.data;
|
|
1683
1711
|
setData(data);
|
|
1684
1712
|
scope.changeValue(data);
|
|
1685
1713
|
}
|
|
@@ -2384,6 +2412,15 @@ function SafeView(props) {
|
|
|
2384
2412
|
});
|
|
2385
2413
|
}
|
|
2386
2414
|
|
|
2415
|
+
function GestureView(props) {
|
|
2416
|
+
return /*#__PURE__*/jsxRuntime.jsx(reactNativeGestureHandler.GestureHandlerRootView, {
|
|
2417
|
+
style: {
|
|
2418
|
+
flex: 1
|
|
2419
|
+
},
|
|
2420
|
+
children: props.children
|
|
2421
|
+
});
|
|
2422
|
+
}
|
|
2423
|
+
|
|
2387
2424
|
var _excluded$1 = ["type"];
|
|
2388
2425
|
var UI = {
|
|
2389
2426
|
Order: function Order(props) {
|
|
@@ -2594,7 +2631,8 @@ var UI = {
|
|
|
2594
2631
|
type: "slider"
|
|
2595
2632
|
}));
|
|
2596
2633
|
},
|
|
2597
|
-
SafeView: SafeView
|
|
2634
|
+
SafeView: SafeView,
|
|
2635
|
+
GestureView: GestureView
|
|
2598
2636
|
};
|
|
2599
2637
|
|
|
2600
2638
|
exports.UI = UI;
|