@aks-dev/easyui 1.0.193 → 1.0.195

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.

Potentially problematic release.


This version of @aks-dev/easyui might be problematic. Click here for more details.

Files changed (72) hide show
  1. package/dist/components/AnimationModal/AnimationModal.js +15 -36
  2. package/dist/components/Badge/Badge.js +7 -16
  3. package/dist/components/DottedLine/DottedLine.js +14 -13
  4. package/dist/components/Echarts/EchartsView.js +30 -73
  5. package/dist/components/Echarts/demo.js +201 -0
  6. package/dist/components/Echarts/helper.js +1 -16
  7. package/dist/components/Hud/AlertBottomView/AlertBottomView.js +43 -60
  8. package/dist/components/Hud/AlertSheetView/AlertSheetView.js +23 -30
  9. package/dist/components/Hud/AlertView/AlertView.js +46 -62
  10. package/dist/components/Hud/Hud.js +8 -19
  11. package/dist/components/Hud/Loading/Loading.js +4 -16
  12. package/dist/components/Hud/PopoverView/PopoverView.js +2 -13
  13. package/dist/components/Hud/Scanner/Scanner.js +55 -86
  14. package/dist/components/Hud/Toast/Toast.js +5 -15
  15. package/dist/components/MenuView/MenuView.js +33 -61
  16. package/dist/components/Modal/Modal.js +0 -7
  17. package/dist/components/MutiPictureView/MutiPictureView.js +27 -47
  18. package/dist/components/PictureViewer/PictureViewer.js +8 -24
  19. package/dist/components/RefreshList/RefreshList.js +41 -52
  20. package/dist/components/RefreshList/demo.js +9 -0
  21. package/dist/components/RefreshList/demo1.js +27 -0
  22. package/dist/components/RefreshList/demo2.js +9 -0
  23. package/dist/components/RichText/RichText.js +21 -22
  24. package/dist/components/StickHeaderView/StickHeaderView.js +2 -12
  25. package/dist/components/StickHeaderView/demo.js +37 -0
  26. package/dist/components/TableCell/TableCell.js +37 -51
  27. package/dist/components/TextInputArea/TextInputArea.js +21 -28
  28. package/dist/components/WithLoadingContainer/WithLoadingContainer.js +14 -31
  29. package/dist/index.js +0 -11
  30. package/dist/jsbridge/RNEasyui.js +0 -25
  31. package/dist/jsbridge/UpgradeModule.js +9 -19
  32. package/dist/jsbridge/index.js +0 -7
  33. package/dist/screen/index.js +0 -8
  34. package/dist/screen/px2dp.js +2 -25
  35. package/dist/screen/px2sp.js +5 -35
  36. package/dist/screen/text-fit.js +2 -13
  37. package/dist/utils/index.js +0 -7
  38. package/dist/utils/lazy.js +12 -67
  39. package/dist/utils/mode.js +0 -21
  40. package/package.json +9 -4
  41. package/types/components/AnimationModal/AnimationModal.d.ts +0 -8
  42. package/types/components/AnimationModal/AnimationModal.d.ts.map +1 -1
  43. package/types/components/Echarts/demo.d.ts +4 -0
  44. package/types/components/Echarts/demo.d.ts.map +1 -0
  45. package/types/components/Echarts/helper.d.ts +0 -5
  46. package/types/components/Echarts/helper.d.ts.map +1 -1
  47. package/types/components/MutiPictureView/MutiPictureView.d.ts +0 -9
  48. package/types/components/MutiPictureView/MutiPictureView.d.ts.map +1 -1
  49. package/types/components/RefreshList/demo.d.ts +2 -0
  50. package/types/components/RefreshList/demo.d.ts.map +1 -0
  51. package/types/components/RefreshList/demo1.d.ts +2 -0
  52. package/types/components/RefreshList/demo1.d.ts.map +1 -0
  53. package/types/components/RefreshList/demo2.d.ts +2 -0
  54. package/types/components/RefreshList/demo2.d.ts.map +1 -0
  55. package/types/components/StickHeaderView/StickHeaderView.d.ts +0 -6
  56. package/types/components/StickHeaderView/StickHeaderView.d.ts.map +1 -1
  57. package/types/components/StickHeaderView/demo.d.ts +4 -0
  58. package/types/components/StickHeaderView/demo.d.ts.map +1 -0
  59. package/types/components/TextInputArea/TextInputArea.d.ts +0 -1
  60. package/types/components/TextInputArea/TextInputArea.d.ts.map +1 -1
  61. package/types/jsbridge/RNEasyui.d.ts +0 -18
  62. package/types/jsbridge/RNEasyui.d.ts.map +1 -1
  63. package/types/jsbridge/UpgradeModule.d.ts +0 -15
  64. package/types/jsbridge/UpgradeModule.d.ts.map +1 -1
  65. package/types/screen/px2dp.d.ts +0 -11
  66. package/types/screen/px2dp.d.ts.map +1 -1
  67. package/types/screen/text-fit.d.ts +0 -3
  68. package/types/screen/text-fit.d.ts.map +1 -1
  69. package/types/utils/lazy.d.ts +0 -33
  70. package/types/utils/lazy.d.ts.map +1 -1
  71. package/types/utils/mode.d.ts +0 -14
  72. package/types/utils/mode.d.ts.map +1 -1
@@ -1,4 +1,12 @@
1
- import { __awaiter } from "tslib";
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
2
10
  import * as React from "react";
3
11
  import { View, Text, StyleSheet, Platform, StatusBar, TouchableOpacity, Dimensions, } from "react-native";
4
12
  import Modal from "react-native-modal";
@@ -36,70 +44,48 @@ export default React.forwardRef((_, ref) => {
36
44
  }
37
45
  }
38
46
  }, [state.visible]);
39
- return (<Modal hideModalContentWhileAnimating={true} //通过隐藏模态内容直到动画完成来增强性能
40
- useNativeDriver={true} //定义动画是否应使用本机驱动程序
41
- animationIn="slideInUp" animationOut="slideOutDown" onBackButtonPress={() => {
42
- //按下Android后退按钮时调用
47
+ return (React.createElement(Modal, { hideModalContentWhileAnimating: true, useNativeDriver: true, animationIn: "slideInUp", animationOut: "slideOutDown", onBackButtonPress: () => {
43
48
  hide();
44
- }} onBackdropPress={() => {
45
- //按下背景时调用
49
+ }, onBackdropPress: () => {
46
50
  hide();
47
- }} isVisible={state.visible} style={{ margin: 0 }} deviceHeight={Dimensions.get("screen").height}>
48
- <View style={styles.container}>
49
- <View style={[styles.wrapper, state.wrapperStyle]}>
50
- {state.title && <Text style={styles.titleText}>{state.title}</Text>}
51
- <View style={[state.contentContainerStyle]}>
52
- {(() => {
53
- if (typeof state.content == "string")
54
- return <Text style={styles.contentText}>{state.content}</Text>;
55
- if (React.isValidElement(state.content))
56
- return state.content;
57
- return <View />;
58
- })()}
59
- </View>
60
- {(state.cancelText || state.confirmText) && (<View style={styles.action}>
61
- {state.cancelText && (<TouchableOpacity style={[
62
- styles.cancel,
63
- { marginRight: state.confirmText ? px2dp(15) : 0 },
64
- state.cancelContainerStyle,
65
- ]} activeOpacity={0.8} onPress={() => {
66
- hide();
67
- cancelCallbackRef.current && cancelCallbackRef.current();
68
- cancelCallbackRef.current = undefined;
69
- }}>
70
- <Text style={[styles.cancelText, state.cancelTextStyle]}>
71
- {state.cancelText}
72
- </Text>
73
- </TouchableOpacity>)}
74
-
75
- {state.confirmText && (<TouchableOpacity style={[
76
- styles.confirm,
77
- { marginLeft: state.cancelText ? px2dp(15) : 0 },
78
- state.confirmContainerStyle,
79
- ]} activeOpacity={0.8} onPress={() => {
80
- hide();
81
- confirmCallbackRef.current && confirmCallbackRef.current();
82
- confirmCallbackRef.current = undefined;
83
- }}>
84
- <Text style={[styles.confirmText, state.confirmTextStyle]}>
85
- {state.confirmText}
86
- </Text>
87
- </TouchableOpacity>)}
88
- </View>)}
89
- </View>
90
- </View>
91
- </Modal>);
51
+ }, isVisible: state.visible, style: { margin: 0 }, deviceHeight: Dimensions.get("screen").height },
52
+ React.createElement(View, { style: styles.container },
53
+ React.createElement(View, { style: [styles.wrapper, state.wrapperStyle] },
54
+ state.title && React.createElement(Text, { style: styles.titleText }, state.title),
55
+ React.createElement(View, { style: [state.contentContainerStyle] }, (() => {
56
+ if (typeof state.content == "string")
57
+ return React.createElement(Text, { style: styles.contentText }, state.content);
58
+ if (React.isValidElement(state.content))
59
+ return state.content;
60
+ return React.createElement(View, null);
61
+ })()),
62
+ (state.cancelText || state.confirmText) && (React.createElement(View, { style: styles.action },
63
+ state.cancelText && (React.createElement(TouchableOpacity, { style: [
64
+ styles.cancel,
65
+ { marginRight: state.confirmText ? px2dp(15) : 0 },
66
+ state.cancelContainerStyle,
67
+ ], activeOpacity: 0.8, onPress: () => {
68
+ hide();
69
+ cancelCallbackRef.current && cancelCallbackRef.current();
70
+ cancelCallbackRef.current = undefined;
71
+ } },
72
+ React.createElement(Text, { style: [styles.cancelText, state.cancelTextStyle] }, state.cancelText))),
73
+ state.confirmText && (React.createElement(TouchableOpacity, { style: [
74
+ styles.confirm,
75
+ { marginLeft: state.cancelText ? px2dp(15) : 0 },
76
+ state.confirmContainerStyle,
77
+ ], activeOpacity: 0.8, onPress: () => {
78
+ hide();
79
+ confirmCallbackRef.current && confirmCallbackRef.current();
80
+ confirmCallbackRef.current = undefined;
81
+ } },
82
+ React.createElement(Text, { style: [styles.confirmText, state.confirmTextStyle] }, state.confirmText)))))))));
92
83
  });
93
84
  export const alertBottomViewRef = React.createRef();
94
85
  export const showAlertBottomModal = (props) => {
95
86
  var _a;
96
87
  (_a = alertBottomViewRef.current) === null || _a === void 0 ? void 0 : _a.show(props);
97
88
  };
98
- // const sleep = (msec?: number) => {
99
- // return new Promise(resolve => {
100
- // setTimeout(resolve, msec || 350);
101
- // });
102
- // }
103
89
  const styles = StyleSheet.create({
104
90
  container: {
105
91
  display: "flex",
@@ -122,7 +108,6 @@ const styles = StyleSheet.create({
122
108
  maxWidth: deviceWidth - px2dp(30),
123
109
  fontSize: px2sp(18),
124
110
  marginBottom: px2dp(20),
125
- // backgroundColor: 'red',
126
111
  textAlign: "center",
127
112
  fontWeight: "bold",
128
113
  color: "#1A1A1A",
@@ -135,7 +120,6 @@ const styles = StyleSheet.create({
135
120
  flexShrink: 1,
136
121
  width: undefined,
137
122
  fontSize: px2sp(15),
138
- // backgroundColor: 'red',
139
123
  color: "#1A1A1A",
140
124
  textAlign: "center",
141
125
  },
@@ -144,7 +128,6 @@ const styles = StyleSheet.create({
144
128
  flexDirection: "row",
145
129
  justifyContent: "space-between",
146
130
  alignItems: "center",
147
- // backgroundColor:"red"
148
131
  },
149
132
  cancel: {
150
133
  width: "40%",
@@ -1,4 +1,12 @@
1
- import { __awaiter } from "tslib";
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
2
10
  import * as React from "react";
3
11
  import { Dimensions, Platform, StatusBar, StyleSheet, Text, TouchableOpacity, View, } from "react-native";
4
12
  import Modal from "react-native-modal";
@@ -32,36 +40,22 @@ export default React.forwardRef((_, ref) => {
32
40
  }
33
41
  }
34
42
  }, [state.visible]);
35
- return (<Modal hideModalContentWhileAnimating={true} //通过隐藏模态内容直到动画完成来增强性能
36
- useNativeDriver={true} //定义动画是否应使用本机驱动程序
37
- animationIn="slideInUp" animationOut="slideOutDown" onBackButtonPress={() => {
38
- //按下Android后退按钮时调用
39
- hide();
40
- }} onBackdropPress={() => {
41
- //按下背景时调用
43
+ return (React.createElement(Modal, { hideModalContentWhileAnimating: true, useNativeDriver: true, animationIn: "slideInUp", animationOut: "slideOutDown", onBackButtonPress: () => {
42
44
  hide();
43
- }} isVisible={state.visible} deviceHeight={Dimensions.get("screen").height} style={{ margin: 0 }}>
44
- <View style={styles.container}>
45
- <View style={[styles.wrapper]}>
46
- <View style={styles.itemContainer}>
47
- {(_a = state.actions) === null || _a === void 0 ? void 0 : _a.map((i, idx) => (<TouchableOpacity key={`sg-action-${idx}`} style={[styles.item]} activeOpacity={1} onPress={() => {
48
- hide();
49
- i.onClick && i.onClick();
50
- }}>
51
- <Text style={[styles.itemText, { color: i.color }]} numberOfLines={2}>
52
- {i.text}
53
- </Text>
54
- </TouchableOpacity>))}
55
- </View>
56
-
57
- <TouchableOpacity style={[styles.cancel]} activeOpacity={1} onPress={() => {
45
+ }, onBackdropPress: () => {
58
46
  hide();
59
- }}>
60
- <Text style={[styles.cancelText]}>取消</Text>
61
- </TouchableOpacity>
62
- </View>
63
- </View>
64
- </Modal>);
47
+ }, isVisible: state.visible, deviceHeight: Dimensions.get("screen").height, style: { margin: 0 } },
48
+ React.createElement(View, { style: styles.container },
49
+ React.createElement(View, { style: [styles.wrapper] },
50
+ React.createElement(View, { style: styles.itemContainer }, (_a = state.actions) === null || _a === void 0 ? void 0 : _a.map((i, idx) => (React.createElement(TouchableOpacity, { key: `sg-action-${idx}`, style: [styles.item], activeOpacity: 1, onPress: () => {
51
+ hide();
52
+ i.onClick && i.onClick();
53
+ } },
54
+ React.createElement(Text, { style: [styles.itemText, { color: i.color }], numberOfLines: 2 }, i.text))))),
55
+ React.createElement(TouchableOpacity, { style: [styles.cancel], activeOpacity: 1, onPress: () => {
56
+ hide();
57
+ } },
58
+ React.createElement(Text, { style: [styles.cancelText] }, "\u53D6\u6D88"))))));
65
59
  });
66
60
  export const alertSheetViewRef = React.createRef();
67
61
  export const showAlertSheetModal = (props) => {
@@ -79,7 +73,6 @@ const styles = StyleSheet.create({
79
73
  flexGrow: 0,
80
74
  flexShrink: 0,
81
75
  width: "100%",
82
- // backgroundColor: 'pink',
83
76
  overflow: "hidden",
84
77
  borderTopLeftRadius: px2dp(10),
85
78
  borderTopRightRadius: px2dp(10),
@@ -1,4 +1,12 @@
1
- import { __awaiter } from "tslib";
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
2
10
  import * as React from "react";
3
11
  import { View, Text, StyleSheet, Platform, Modal, StatusBar, TouchableOpacity, Animated, Easing, } from "react-native";
4
12
  import { px2dp, deviceWidth } from "../../../screen/px2dp";
@@ -17,14 +25,12 @@ export default React.forwardRef((_, ref) => {
17
25
  setState(Object.assign({}, defaultState, { visible: true }, options));
18
26
  cancelCallbackRef.current = options.cancel;
19
27
  confirmCallbackRef.current = options.confirm;
20
- // await sleep(50)
21
28
  startAnimate(1);
22
29
  }),
23
30
  hide,
24
31
  }), []);
25
32
  const hide = () => __awaiter(void 0, void 0, void 0, function* () {
26
33
  startAnimate(0.3);
27
- // await sleep(50)
28
34
  setState(defaultState);
29
35
  });
30
36
  let scale_anim = React.useRef(new Animated.Value(0.3)).current;
@@ -48,67 +54,49 @@ export default React.forwardRef((_, ref) => {
48
54
  }
49
55
  }
50
56
  }, [state.visible]);
51
- return (<Modal visible={state.visible} transparent animationType="fade" onRequestClose={() => {
52
- // hide()
53
- }}>
54
- <View style={styles.container}>
55
- <Animated.View style={[
56
- styles.wrapper,
57
- state.wrapperStyle,
58
- { transform: [{ scale: scale_anim }] },
59
- ]}>
60
- {state.title && <Text style={styles.titleText}>{state.title}</Text>}
61
- {(() => {
62
- if (typeof state.content == "string")
63
- return <Text style={styles.contentText}>{state.content}</Text>;
64
- if (React.isValidElement(state.content))
65
- return state.content;
66
- return <View />;
67
- })()}
68
-
69
- {(state.cancelText || state.confirmText) && (<View style={styles.action}>
70
- {state.cancelText && (<TouchableOpacity style={[
71
- styles.cancel,
72
- { marginRight: state.confirmText ? px2dp(15) : 0 },
73
- state.cancelContainerStyle,
74
- ]} activeOpacity={0.8} disabled={state.cancelDisabled} onPress={() => {
75
- hide();
76
- cancelCallbackRef.current && cancelCallbackRef.current();
77
- cancelCallbackRef.current = undefined;
78
- }}>
79
- <Text style={[styles.cancelText, state.cancelTextStyle]}>
80
- {state.cancelText}
81
- </Text>
82
- </TouchableOpacity>)}
83
-
84
- {state.confirmText && (<TouchableOpacity style={[
85
- styles.confirm,
86
- { marginLeft: state.cancelText ? px2dp(15) : 0 },
87
- state.confirmContainerStyle,
88
- ]} activeOpacity={0.8} onPress={() => {
89
- hide();
90
- confirmCallbackRef.current && confirmCallbackRef.current();
91
- confirmCallbackRef.current = undefined;
92
- }}>
93
- <Text style={[styles.confirmText, state.confirmTextStyle]}>
94
- {state.confirmText}
95
- </Text>
96
- </TouchableOpacity>)}
97
- </View>)}
98
- </Animated.View>
99
- </View>
100
- </Modal>);
57
+ return (React.createElement(Modal, { visible: state.visible, transparent: true, animationType: "fade", onRequestClose: () => {
58
+ } },
59
+ React.createElement(View, { style: styles.container },
60
+ React.createElement(Animated.View, { style: [
61
+ styles.wrapper,
62
+ state.wrapperStyle,
63
+ { transform: [{ scale: scale_anim }] },
64
+ ] },
65
+ state.title && React.createElement(Text, { style: styles.titleText }, state.title),
66
+ (() => {
67
+ if (typeof state.content == "string")
68
+ return React.createElement(Text, { style: styles.contentText }, state.content);
69
+ if (React.isValidElement(state.content))
70
+ return state.content;
71
+ return React.createElement(View, null);
72
+ })(),
73
+ (state.cancelText || state.confirmText) && (React.createElement(View, { style: styles.action },
74
+ state.cancelText && (React.createElement(TouchableOpacity, { style: [
75
+ styles.cancel,
76
+ { marginRight: state.confirmText ? px2dp(15) : 0 },
77
+ state.cancelContainerStyle,
78
+ ], activeOpacity: 0.8, disabled: state.cancelDisabled, onPress: () => {
79
+ hide();
80
+ cancelCallbackRef.current && cancelCallbackRef.current();
81
+ cancelCallbackRef.current = undefined;
82
+ } },
83
+ React.createElement(Text, { style: [styles.cancelText, state.cancelTextStyle] }, state.cancelText))),
84
+ state.confirmText && (React.createElement(TouchableOpacity, { style: [
85
+ styles.confirm,
86
+ { marginLeft: state.cancelText ? px2dp(15) : 0 },
87
+ state.confirmContainerStyle,
88
+ ], activeOpacity: 0.8, onPress: () => {
89
+ hide();
90
+ confirmCallbackRef.current && confirmCallbackRef.current();
91
+ confirmCallbackRef.current = undefined;
92
+ } },
93
+ React.createElement(Text, { style: [styles.confirmText, state.confirmTextStyle] }, state.confirmText)))))))));
101
94
  });
102
95
  export const alertViewRef = React.createRef();
103
96
  export const showAlertModal = (props) => {
104
97
  var _a;
105
98
  (_a = alertViewRef.current) === null || _a === void 0 ? void 0 : _a.show(props);
106
99
  };
107
- // const sleep = (msec?: number) => {
108
- // return new Promise(resolve => {
109
- // setTimeout(resolve, msec || 350);
110
- // });
111
- // }
112
100
  const styles = StyleSheet.create({
113
101
  container: {
114
102
  display: "flex",
@@ -120,7 +108,6 @@ const styles = StyleSheet.create({
120
108
  wrapper: {
121
109
  flexGrow: 0,
122
110
  flexShrink: 0,
123
- // minWidth: '70%',
124
111
  minWidth: deviceWidth - px2dp(60),
125
112
  backgroundColor: "white",
126
113
  overflow: "hidden",
@@ -132,7 +119,6 @@ const styles = StyleSheet.create({
132
119
  maxWidth: deviceWidth - px2dp(90),
133
120
  fontSize: px2sp(18),
134
121
  marginBottom: px2dp(20),
135
- // backgroundColor: 'red',
136
122
  textAlign: "center",
137
123
  fontWeight: "bold",
138
124
  color: "#1A1A1A",
@@ -145,7 +131,6 @@ const styles = StyleSheet.create({
145
131
  flexShrink: 1,
146
132
  width: undefined,
147
133
  fontSize: px2sp(15),
148
- // backgroundColor: 'red',
149
134
  color: "#1A1A1A",
150
135
  textAlign: "center",
151
136
  },
@@ -154,7 +139,6 @@ const styles = StyleSheet.create({
154
139
  flexDirection: "row",
155
140
  justifyContent: "space-between",
156
141
  alignItems: "center",
157
- // backgroundColor:"red"
158
142
  },
159
143
  cancel: {
160
144
  width: "40%",
@@ -1,12 +1,4 @@
1
- /*
2
- * @Author: shiguo
3
- * @Date: 2022-04-24 14:10:04
4
- * @LastEditors: shiguo
5
- * @LastEditTime: 2023-03-23 11:13:55
6
- * @FilePath: /aks-fire-app/node_modules/@aks-dev/easyui/lib/Hud/Hud.tsx
7
- */
8
1
  import * as React from 'react';
9
- // import { StyleSheet } from 'react-native'
10
2
  import { alertViewRef, default as AlertView, showAlertModal } from './AlertView/AlertView';
11
3
  import { alertBottomViewRef, default as AlertBottomView, showAlertBottomModal } from './AlertBottomView/AlertBottomView';
12
4
  import { alertSheetViewRef, default as AlertSheetView, showAlertSheetModal } from './AlertSheetView/AlertSheetView';
@@ -14,16 +6,13 @@ import { hideLoading, Loading, loadingRef, showLoading } from './Loading/Loading
14
6
  import { showToast, Toast, toastRef } from './Toast/Toast';
15
7
  import { showPopoverView, hidePopoverView, popoverViewRef, PopoverView } from './PopoverView/PopoverView';
16
8
  import { showScanner, hideScanner, scannerRef, Scanner } from './Scanner/Scanner';
17
- export const Hud = () => React.cloneElement(<></>, {
18
- // ...StyleSheet.absoluteFillObject,
19
- // display: 'flex',
20
- }, [
21
- <Loading key="hud-0" ref={loadingRef}/>,
22
- <Toast key="hud-1" ref={toastRef}/>,
23
- <AlertView key="hud-2" ref={alertViewRef}/>,
24
- <AlertBottomView key="hud-3-0" ref={alertBottomViewRef}/>,
25
- <AlertSheetView key="hud-3-1" ref={alertSheetViewRef}/>,
26
- <PopoverView key="hud-4" ref={popoverViewRef}/>,
27
- <Scanner key="hud-5" ref={scannerRef}/>,
9
+ export const Hud = () => React.cloneElement(React.createElement(React.Fragment, null), {}, [
10
+ React.createElement(Loading, { key: "hud-0", ref: loadingRef }),
11
+ React.createElement(Toast, { key: "hud-1", ref: toastRef }),
12
+ React.createElement(AlertView, { key: "hud-2", ref: alertViewRef }),
13
+ React.createElement(AlertBottomView, { key: "hud-3-0", ref: alertBottomViewRef }),
14
+ React.createElement(AlertSheetView, { key: "hud-3-1", ref: alertSheetViewRef }),
15
+ React.createElement(PopoverView, { key: "hud-4", ref: popoverViewRef }),
16
+ React.createElement(Scanner, { key: "hud-5", ref: scannerRef }),
28
17
  ]);
29
18
  export { showAlertModal, showToast, showLoading, hideLoading, showAlertBottomModal, showAlertSheetModal, showPopoverView, hidePopoverView, showScanner, hideScanner, };
@@ -1,10 +1,3 @@
1
- /*
2
- * @Author: shiguo
3
- * @Date: 2022-04-24 14:27:02
4
- * @LastEditors: shiguo
5
- * @LastEditTime: 2022-09-09 10:55:48
6
- * @FilePath: /@aks-dev/easyui/lib/Hud/Loading/Loading.tsx
7
- */
8
1
  import React, { useImperativeHandle, useState } from "react";
9
2
  import { View, ActivityIndicator, StyleSheet, Text, Dimensions, TouchableOpacity, BackHandler, } from "react-native";
10
3
  export const Loading = React.forwardRef((_, ref) => {
@@ -13,7 +6,6 @@ export const Loading = React.forwardRef((_, ref) => {
13
6
  React.useEffect(() => {
14
7
  const onBackPress = () => show;
15
8
  BackHandler.addEventListener("hardwareBackPress", onBackPress);
16
- // return () => BackHandler.removeEventListener('hardwareBackPress', onBackPress);
17
9
  }, [show]);
18
10
  useImperativeHandle(ref, () => ({
19
11
  showLoading: (content) => {
@@ -26,14 +18,10 @@ export const Loading = React.forwardRef((_, ref) => {
26
18
  }), [show]);
27
19
  if (!show)
28
20
  return null;
29
- return (<TouchableOpacity disabled style={styles.container}>
30
- <View style={styles.warpper}>
31
- <ActivityIndicator color="white" size="large"/>
32
- <Text numberOfLines={5} style={styles.title}>
33
- {tipText}
34
- </Text>
35
- </View>
36
- </TouchableOpacity>);
21
+ return (React.createElement(TouchableOpacity, { disabled: true, style: styles.container },
22
+ React.createElement(View, { style: styles.warpper },
23
+ React.createElement(ActivityIndicator, { color: "white", size: "large" }),
24
+ React.createElement(Text, { numberOfLines: 5, style: styles.title }, tipText))));
37
25
  });
38
26
  export const loadingRef = React.createRef();
39
27
  export const showLoading = (content) => { var _a; return (_a = loadingRef.current) === null || _a === void 0 ? void 0 : _a.showLoading(content); };
@@ -1,10 +1,3 @@
1
- /*
2
- * @Author: shiguo
3
- * @Date: 2022-04-24 14:27:02
4
- * @LastEditors: shiguo
5
- * @LastEditTime: 2022-12-21 15:36:06
6
- * @FilePath: /@aks-dev/easyui/lib/Hud/PopoverView/PopoverView.tsx
7
- */
8
1
  import React, { useImperativeHandle, useState } from "react";
9
2
  import { StyleSheet, TouchableOpacity, BackHandler, } from "react-native";
10
3
  export const PopoverView = React.forwardRef((_, ref) => {
@@ -13,7 +6,6 @@ export const PopoverView = React.forwardRef((_, ref) => {
13
6
  React.useEffect(() => {
14
7
  const onBackPress = () => visible;
15
8
  BackHandler.addEventListener("hardwareBackPress", onBackPress);
16
- // return () => BackHandler.removeEventListener('hardwareBackPress', onBackPress);
17
9
  }, [visible]);
18
10
  useImperativeHandle(ref, () => ({
19
11
  showPopoverView: (options) => {
@@ -27,13 +19,10 @@ export const PopoverView = React.forwardRef((_, ref) => {
27
19
  }), [visible]);
28
20
  if (!visible)
29
21
  return null;
30
- return (<TouchableOpacity activeOpacity={1} style={[styles.container, options === null || options === void 0 ? void 0 : options.style]} disabled={options === null || options === void 0 ? void 0 : options.disabled} onPress={(e) => {
22
+ return (React.createElement(TouchableOpacity, { activeOpacity: 1, style: [styles.container, options === null || options === void 0 ? void 0 : options.style], disabled: options === null || options === void 0 ? void 0 : options.disabled, onPress: (e) => {
31
23
  setVisible(false);
32
24
  setOptions(undefined);
33
- // e.stopPropagation()
34
- }}>
35
- {React.isValidElement(options === null || options === void 0 ? void 0 : options.content) && (options === null || options === void 0 ? void 0 : options.content)}
36
- </TouchableOpacity>);
25
+ } }, React.isValidElement(options === null || options === void 0 ? void 0 : options.content) && (options === null || options === void 0 ? void 0 : options.content)));
37
26
  });
38
27
  export const popoverViewRef = React.createRef();
39
28
  export const showPopoverView = (options) => { var _a; return (_a = popoverViewRef.current) === null || _a === void 0 ? void 0 : _a.showPopoverView(options); };