@aks-dev/easyui 1.0.191 → 1.0.192

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 +1 -1
  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,14 @@
1
- import { __rest } from "tslib";
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
2
12
  import * as React from "react";
3
13
  import { View, Text, Animated, StyleSheet, ActivityIndicator, TouchableOpacity, } from "react-native";
4
14
  import { SwipeListView } from "react-native-swipe-list-view";
@@ -55,42 +65,33 @@ export default React.forwardRef((props, ref) => {
55
65
  switch (mode) {
56
66
  case "FlatList": {
57
67
  let flatListProps = props;
58
- return (<Animated.FlatList {...rest} ref={ref} refreshing={refreshState == RefreshState.HeaderRefreshing} keyExtractor={(_, index) => {
68
+ return (React.createElement(Animated.FlatList, Object.assign({}, rest, { ref: ref, refreshing: refreshState == RefreshState.HeaderRefreshing, keyExtractor: (_, index) => {
59
69
  return `sg-index-FlatList-${seed}-${index}`;
60
- }} contentContainerStyle={((_a = flatListProps.data) === null || _a === void 0 ? void 0 : _a.length) ? {} : { height: "100%" }} onRefresh={onRefresh} onEndReachedThreshold={0.1} onEndReached={onEndReached} showsVerticalScrollIndicator={false} ListHeaderComponent={(_) => (<View style={{ display: "flex", flexDirection: "column" }}>
61
- <ListHeaderComponent {...flatListProps}/>
62
- {/* {flatListProps.ListHeaderComponent} */}
63
- </View>)}
64
- // ListHeaderComponent={flatListProps.ListHeaderComponent}
65
- ListFooterComponent={(_) => (<ListFooterComponent {...flatListProps}/>)}/>);
70
+ }, contentContainerStyle: ((_a = flatListProps.data) === null || _a === void 0 ? void 0 : _a.length) ? {} : { height: "100%" }, onRefresh: onRefresh, onEndReachedThreshold: 0.1, onEndReached: onEndReached, showsVerticalScrollIndicator: false, ListHeaderComponent: (_) => (React.createElement(View, { style: { display: "flex", flexDirection: "column" } },
71
+ React.createElement(ListHeaderComponent, Object.assign({}, flatListProps)))), ListFooterComponent: (_) => (React.createElement(ListFooterComponent, Object.assign({}, flatListProps))) })));
66
72
  }
67
73
  case "SectionList": {
68
74
  let sectionListProps = props;
69
- const { ItemSeparatorComponent = (_) => <View style={{ height: 1 }}/>, } = sectionListProps;
70
- return (<Animated.SectionList {...rest} ref={ref} refreshing={refreshState == RefreshState.HeaderRefreshing} onRefresh={onRefresh} keyExtractor={(_, index) => {
75
+ const { ItemSeparatorComponent = (_) => React.createElement(View, { style: { height: 1 } }), } = sectionListProps;
76
+ return (React.createElement(Animated.SectionList, Object.assign({}, rest, { ref: ref, refreshing: refreshState == RefreshState.HeaderRefreshing, onRefresh: onRefresh, keyExtractor: (_, index) => {
71
77
  return `sg-index-SectionList-${seed}-${index}`;
72
- }} contentContainerStyle={((_b = sectionListProps.sections) === null || _b === void 0 ? void 0 : _b.length) > 0 ? {} : { height: "100%" }} ItemSeparatorComponent={ItemSeparatorComponent} onEndReachedThreshold={0.1} onEndReached={onEndReached} showsVerticalScrollIndicator={false}
73
- // ListHeaderComponent={(_) => <ListHeaderComponent {...sectionListProps} />}
74
- ListHeaderComponent={(_) => (<View style={{ display: "flex", flexDirection: "column" }}>
75
- <ListHeaderComponent {...sectionListProps}/>
76
- {sectionListProps.ListHeaderComponent}
77
- </View>)} ListFooterComponent={(_) => (<ListFooterComponent {...sectionListProps}/>)} renderSectionHeader={sectionListProps.renderSectionHeader}/>);
78
+ }, contentContainerStyle: ((_b = sectionListProps.sections) === null || _b === void 0 ? void 0 : _b.length) > 0 ? {} : { height: "100%" }, ItemSeparatorComponent: ItemSeparatorComponent, onEndReachedThreshold: 0.1, onEndReached: onEndReached, showsVerticalScrollIndicator: false, ListHeaderComponent: (_) => (React.createElement(View, { style: { display: "flex", flexDirection: "column" } },
79
+ React.createElement(ListHeaderComponent, Object.assign({}, sectionListProps)),
80
+ sectionListProps.ListHeaderComponent)), ListFooterComponent: (_) => (React.createElement(ListFooterComponent, Object.assign({}, sectionListProps))), renderSectionHeader: sectionListProps.renderSectionHeader })));
78
81
  }
79
82
  case "SwipeList": {
80
83
  let swipeListProps = props;
81
- const { ItemSeparatorComponent = (_) => <View style={{ height: 1 }}/>, } = swipeListProps;
82
- const { renderHiddenItem = (data, rowMap) => (<View style={{
84
+ const { ItemSeparatorComponent = (_) => React.createElement(View, { style: { height: 1 } }), } = swipeListProps;
85
+ const { renderHiddenItem = (data, rowMap) => (React.createElement(View, { style: {
83
86
  backgroundColor: "red",
84
87
  height: "100%",
85
88
  alignItems: "flex-end",
86
89
  justifyContent: "center",
87
- }}>
88
- <Text>Right </Text>
89
- </View>), } = swipeListProps;
90
- return (<SwipeListView {...rest} rightOpenValue={-100} leftOpenValue={0} ref={ref} disableLeftSwipe={false} disableRightSwipe={true} onRefresh={onRefresh} refreshing={refreshState == RefreshState.HeaderRefreshing} ItemSeparatorComponent={ItemSeparatorComponent} onEndReachedThreshold={0.1} onEndReached={onEndReached} showsVerticalScrollIndicator={false} ListHeaderComponent={(_) => (<View style={{ display: "flex", flexDirection: "column" }}>
91
- <ListHeaderComponent {...swipeListProps}/>
92
- {swipeListProps.ListHeaderComponent}
93
- </View>)} ListFooterComponent={(args) => (<ListFooterComponent {...swipeListProps}/>)} renderHiddenItem={renderHiddenItem}/>);
90
+ } },
91
+ React.createElement(Text, null, "Right "))), } = swipeListProps;
92
+ return (React.createElement(SwipeListView, Object.assign({}, rest, { rightOpenValue: -100, leftOpenValue: 0, ref: ref, disableLeftSwipe: false, disableRightSwipe: true, onRefresh: onRefresh, refreshing: refreshState == RefreshState.HeaderRefreshing, ItemSeparatorComponent: ItemSeparatorComponent, onEndReachedThreshold: 0.1, onEndReached: onEndReached, showsVerticalScrollIndicator: false, ListHeaderComponent: (_) => (React.createElement(View, { style: { display: "flex", flexDirection: "column" } },
93
+ React.createElement(ListHeaderComponent, Object.assign({}, swipeListProps)),
94
+ swipeListProps.ListHeaderComponent)), ListFooterComponent: (args) => (React.createElement(ListFooterComponent, Object.assign({}, swipeListProps))), renderHiddenItem: renderHiddenItem })));
94
95
  }
95
96
  }
96
97
  });
@@ -99,45 +100,34 @@ const ListFooterComponent = React.memo((props) => {
99
100
  switch (refreshState) {
100
101
  case RefreshState.Idle:
101
102
  case RefreshState.FooterRefreshing:
102
- return (<View style={Object.assign(Object.assign({}, styles.container), { flexDirection: "row" })}>
103
- <ActivityIndicator color={"gray"}/>
104
- <Text style={Object.assign(Object.assign({}, styles.text), { marginLeft: 5 })}>
105
- {RefreshText.FooterRefreshing}
106
- </Text>
107
- </View>);
103
+ return (React.createElement(View, { style: Object.assign(Object.assign({}, styles.container), { flexDirection: "row" }) },
104
+ React.createElement(ActivityIndicator, { color: "gray" }),
105
+ React.createElement(Text, { style: Object.assign(Object.assign({}, styles.text), { marginLeft: 5 }) }, RefreshText.FooterRefreshing)));
108
106
  case RefreshState.NoMoreData:
109
- return (<View style={styles.container}>
110
- <Text style={Object.assign(Object.assign({}, styles.text), { color: "#999999" })}>
111
- {RefreshText.NoMoreData}
112
- </Text>
113
- </View>);
107
+ return (React.createElement(View, { style: styles.container },
108
+ React.createElement(Text, { style: Object.assign(Object.assign({}, styles.text), { color: "#999999" }) }, RefreshText.NoMoreData)));
114
109
  case RefreshState.Failure:
115
- return (<View style={styles.container}>
116
- <TouchableOpacity onPress={() => reload && reload()}>
117
- <Text style={styles.text}>{RefreshText.Failure}</Text>
118
- </TouchableOpacity>
119
- </View>);
110
+ return (React.createElement(View, { style: styles.container },
111
+ React.createElement(TouchableOpacity, { onPress: () => reload && reload() },
112
+ React.createElement(Text, { style: styles.text }, RefreshText.Failure))));
120
113
  case RefreshState.EmptyData:
121
114
  if (props.renderListEmptyComponent)
122
115
  return props.renderListEmptyComponent();
123
- return (<View style={styles.container}>
124
- <TouchableOpacity onPress={() => reload && reload()}>
125
- <Text style={styles.text}>{RefreshText.EmptyData}</Text>
126
- </TouchableOpacity>
127
- </View>);
116
+ return (React.createElement(View, { style: styles.container },
117
+ React.createElement(TouchableOpacity, { onPress: () => reload && reload() },
118
+ React.createElement(Text, { style: styles.text }, RefreshText.EmptyData))));
128
119
  default:
129
- return <View />;
120
+ return React.createElement(View, null);
130
121
  }
131
122
  });
132
123
  const ListHeaderComponent = React.memo((props) => {
133
124
  const { refreshState } = props;
134
125
  switch (refreshState) {
135
126
  case RefreshState.HeaderRefreshing:
136
- return (<View style={Object.assign({}, styles.container)}>
137
- <Text style={Object.assign({}, styles.text)}>{RefreshText.HeaderRefreshing}</Text>
138
- </View>);
127
+ return (React.createElement(View, { style: Object.assign({}, styles.container) },
128
+ React.createElement(Text, { style: Object.assign({}, styles.text) }, RefreshText.HeaderRefreshing)));
139
129
  default:
140
- return <View />;
130
+ return React.createElement(View, null);
141
131
  }
142
132
  });
143
133
  const styles = StyleSheet.create({
@@ -147,7 +137,6 @@ const styles = StyleSheet.create({
147
137
  justifyContent: "center",
148
138
  alignItems: "center",
149
139
  height: 44,
150
- // backgroundColor:'cyan'
151
140
  },
152
141
  text: {
153
142
  color: "gray",
@@ -0,0 +1,9 @@
1
+ import * as React from "react";
2
+ import { View } from "react-native";
3
+ import { default as RefreshList, RefreshState } from "./RefreshList";
4
+ const App = () => {
5
+ const [refreshState, setRefreshState] = React.useState(RefreshState.Idle);
6
+ return (React.createElement(RefreshList, { data: ["a", "b"], renderItem: ({ item, index }) => {
7
+ return React.createElement(View, null, item);
8
+ }, refreshState: refreshState, onHeaderRefresh: () => { }, onFooterRefresh: () => { } }));
9
+ };
@@ -0,0 +1,27 @@
1
+ import * as React from "react";
2
+ import { View } from "react-native";
3
+ import { default as RefreshList, RefreshState } from "./RefreshList";
4
+ const App = () => {
5
+ const [refreshState, setRefreshState] = React.useState(RefreshState.Idle);
6
+ const listRef = React.useRef(null);
7
+ return (React.createElement(RefreshList, { mode: "SectionList", sections: [
8
+ {
9
+ title: "Main dishes",
10
+ data: ["Pizza", "Burger", "Risotto"],
11
+ },
12
+ {
13
+ title: "Sides",
14
+ data: ["French Fries", "Onion Rings", "Fried Shrimps"],
15
+ },
16
+ {
17
+ title: "Drinks",
18
+ data: ["Water", "Coke", "Beer"],
19
+ },
20
+ {
21
+ title: "Desserts",
22
+ data: ["Cheese Cake", "Ice Cream"],
23
+ },
24
+ ], renderItem: ({ item, section }) => {
25
+ return React.createElement(View, null, item);
26
+ }, refreshState: refreshState, onHeaderRefresh: () => { }, onFooterRefresh: () => { }, renderSectionHeader: ({ section: { letter } }) => (React.createElement(View, { style: { backgroundColor: "red" } })) }));
27
+ };
@@ -0,0 +1,9 @@
1
+ import * as React from "react";
2
+ import { RefreshState } from "./RefreshList";
3
+ const App = () => {
4
+ const [refreshState, setRefreshState] = React.useState(RefreshState.Idle);
5
+ const listRef = React.useRef(null);
6
+ const dataList = Array(20)
7
+ .fill("")
8
+ .map((_, i) => ({ key: `${i}`, text: `item #${i}` }));
9
+ };
@@ -1,11 +1,14 @@
1
- import { __rest } from "tslib";
2
- /*
3
- * @Author: shiguo
4
- * @Date: 2022-07-11 15:42:16
5
- * @LastEditors: shiguo
6
- * @LastEditTime: 2022-07-11 16:15:02
7
- * @FilePath: /@aks-dev/easyui/lib/RichText/RichText.tsx
8
- */
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
9
12
  import React from "react";
10
13
  import { StyleSheet, Text } from "react-native";
11
14
  import { px2sp } from "../../screen/px2sp";
@@ -27,22 +30,19 @@ export default (props) => {
27
30
  positionEnd = positionStart + richStr.length;
28
31
  }
29
32
  if (prefix) {
30
- return (<Text style={styles.container} {...rest}>
31
- <Text style={Object.assign(Object.assign({}, styles.defaultRich), richStyle)}>{richStr}</Text>
32
- {textStr}
33
- </Text>);
33
+ return (React.createElement(Text, Object.assign({ style: styles.container }, rest),
34
+ React.createElement(Text, { style: Object.assign(Object.assign({}, styles.defaultRich), richStyle) }, richStr),
35
+ textStr));
34
36
  }
35
37
  if (suffix) {
36
- return (<Text style={styles.container} {...rest}>
37
- {textStr}
38
- <Text style={Object.assign(Object.assign({}, styles.defaultRich), richStyle)}>{richStr}</Text>
39
- </Text>);
38
+ return (React.createElement(Text, Object.assign({ style: styles.container }, rest),
39
+ textStr,
40
+ React.createElement(Text, { style: Object.assign(Object.assign({}, styles.defaultRich), richStyle) }, richStr)));
40
41
  }
41
- return (<Text style={styles.container} {...rest}>
42
- {textStr.substring(0, positionStart)}
43
- {positionEnd > 0 && (<Text style={Object.assign(Object.assign({}, styles.defaultRich), richStyle)}>{richStr}</Text>)}
44
- {textStr.substring(positionEnd, textStr.length)}
45
- </Text>);
42
+ return (React.createElement(Text, Object.assign({ style: styles.container }, rest),
43
+ textStr.substring(0, positionStart),
44
+ positionEnd > 0 && (React.createElement(Text, { style: Object.assign(Object.assign({}, styles.defaultRich), richStyle) }, richStr)),
45
+ textStr.substring(positionEnd, textStr.length)));
46
46
  };
47
47
  const styles = StyleSheet.create({
48
48
  container: {
@@ -52,6 +52,5 @@ const styles = StyleSheet.create({
52
52
  defaultRich: {
53
53
  color: "red",
54
54
  fontSize: px2sp(14),
55
- // fontWeight: 'bold'
56
55
  },
57
56
  });
@@ -1,16 +1,8 @@
1
- /*
2
- * @Author: shiguo
3
- * @Date: 2022-04-29 10:22:16
4
- * @LastEditors: shiguo
5
- * @LastEditTime: 2022-04-29 10:27:44
6
- * @FilePath: /@aks/easyui/lib/StickHeaderView/StickHeaderView.tsx
7
- */
8
1
  import * as React from "react";
9
2
  import { StyleSheet, Animated, } from "react-native";
10
3
  const App = (props) => {
11
4
  const { style, children, stickyHeaderY = -1, stickyScrollY = new Animated.Value(0), } = props;
12
5
  const [stickyLayoutY, setStickyLayoutY] = React.useState(0);
13
- // 兼容代码,防止没有传头部高度
14
6
  const _onLayout = (event) => {
15
7
  setStickyLayoutY(event.nativeEvent.layout.y);
16
8
  };
@@ -21,13 +13,11 @@ const App = (props) => {
21
13
  outputRange: [0, 0, 0, 1],
22
14
  });
23
15
  };
24
- return (<Animated.View onLayout={_onLayout} style={[
16
+ return (React.createElement(Animated.View, { onLayout: _onLayout, style: [
25
17
  style,
26
18
  styles.container,
27
19
  { transform: [{ translateY: translateY() }] },
28
- ]}>
29
- {children}
30
- </Animated.View>);
20
+ ] }, children));
31
21
  };
32
22
  const styles = StyleSheet.create({
33
23
  container: {
@@ -0,0 +1,37 @@
1
+ import React from "react";
2
+ import { View, StyleSheet, TouchableOpacity, Text, Animated, } from "react-native";
3
+ import { px2dp } from "../../screen/px2dp";
4
+ import { px2sp } from "../../screen/px2sp";
5
+ import StickHeaderView from "./StickHeaderView";
6
+ import WithLoadingContainer from "../WithLoadingContainer/WithLoadingContainer";
7
+ import { Status } from "../WithLoadingContainer/WithLoadingContainer";
8
+ export default ({}) => {
9
+ var _a;
10
+ const scrollY = React.useRef(new Animated.Value(0)).current;
11
+ const headHeight = React.useRef(-1);
12
+ return (React.createElement(View, { style: styles.container },
13
+ React.createElement(Animated.ScrollView, { style: { flex: 1 }, onScroll: Animated.event([
14
+ {
15
+ nativeEvent: { contentOffset: { y: scrollY } },
16
+ },
17
+ ]), scrollEventThrottle: 1 },
18
+ React.createElement(View, { onLayout: (e) => {
19
+ let { height } = e.nativeEvent.layout;
20
+ headHeight.current = height;
21
+ } }),
22
+ React.createElement(StickHeaderView, { stickyHeaderY: headHeight.current, stickyScrollY: scrollY },
23
+ React.createElement(View, null,
24
+ React.createElement(Text, { style: {
25
+ fontSize: px2sp(16),
26
+ color: "#333",
27
+ marginLeft: px2dp(30),
28
+ } }, "\u5F53\u65E5\u8BA1\u5212"))),
29
+ React.createElement(WithLoadingContainer, { status: Status.SUCCESS, emptyText: "今日无需巡检" }, (_a = Array(30)
30
+ .fill("")) === null || _a === void 0 ? void 0 : _a.map((i, index) => (React.createElement(Item, { key: `sg-item-${index}`, item: i, index: index })))))));
31
+ };
32
+ const Item = (props) => {
33
+ return React.createElement(TouchableOpacity, null);
34
+ };
35
+ const styles = StyleSheet.create({
36
+ container: {},
37
+ });
@@ -4,54 +4,43 @@ import { px2dp } from "../../screen/px2dp";
4
4
  import { px2sp } from "../../screen/px2sp";
5
5
  export default (props) => {
6
6
  const { showNav = false, activeOpacity = 0.8 } = props;
7
- return (<TouchableOpacity activeOpacity={props.onPress == undefined ? activeOpacity : 1} style={[styles.container, props.style]} disabled={props.onPress == undefined} onPress={() => props.onPress && props.onPress()}>
8
- <View style={[
9
- styles.warpper,
10
- props.showUnderline
11
- ? Object.assign({ borderBottomColor: "#f2f2f2",
12
- // borderBottomWidth: StyleSheet.hairlineWidth,
13
- borderBottomWidth: px2dp(1) }, props.underlineStyle) : {},
14
- ]}>
15
- {props.icon && (<Image style={[
16
- { width: px2dp(20), height: px2dp(20), marginRight: px2dp(8) },
17
- props.iconStyle,
18
- ]} resizeMode="contain" source={props.icon}/>)}
19
- <View style={[styles.middle, props.middleContaierStyle]}>
20
- {/* 标题 */}
21
- {(() => {
22
- var _a;
23
- if (typeof props.title === "string" ||
24
- typeof props.title === "number") {
25
- return (<Text numberOfLines={1} {...props.titleOptions} style={[styles.title, (_a = props.titleOptions) === null || _a === void 0 ? void 0 : _a.style]}>
26
- {props.title}
27
- </Text>);
28
- }
29
- if (React.isValidElement(props.title))
30
- return props.title;
31
- return <View style={styles.title}/>;
32
- })()}
33
-
34
- {(() => {
35
- var _a;
36
- if (typeof props.content === "string" ||
37
- typeof props.content === "number") {
38
- return (<Text numberOfLines={1} {...props.contentOptions} style={[styles.content, (_a = props.contentOptions) === null || _a === void 0 ? void 0 : _a.style]}>
39
- {props.content}
40
- </Text>);
41
- }
42
- if (React.isValidElement(props.content))
43
- return props.content;
44
- return undefined;
45
- })()}
46
- </View>
47
- {showNav &&
48
- (props.nav || (<Image style={{
49
- width: px2dp(9),
50
- height: px2dp(16),
51
- marginLeft: px2dp(8),
52
- }} source={require("./assets/back.png")}/>))}
53
- </View>
54
- </TouchableOpacity>);
7
+ return (React.createElement(TouchableOpacity, { activeOpacity: props.onPress == undefined ? activeOpacity : 1, style: [styles.container, props.style], disabled: props.onPress == undefined, onPress: () => props.onPress && props.onPress() },
8
+ React.createElement(View, { style: [
9
+ styles.warpper,
10
+ props.showUnderline
11
+ ? Object.assign({ borderBottomColor: "#f2f2f2", borderBottomWidth: px2dp(1) }, props.underlineStyle) : {},
12
+ ] },
13
+ props.icon && (React.createElement(Image, { style: [
14
+ { width: px2dp(20), height: px2dp(20), marginRight: px2dp(8) },
15
+ props.iconStyle,
16
+ ], resizeMode: "contain", source: props.icon })),
17
+ React.createElement(View, { style: [styles.middle, props.middleContaierStyle] },
18
+ (() => {
19
+ var _a;
20
+ if (typeof props.title === "string" ||
21
+ typeof props.title === "number") {
22
+ return (React.createElement(Text, Object.assign({ numberOfLines: 1 }, props.titleOptions, { style: [styles.title, (_a = props.titleOptions) === null || _a === void 0 ? void 0 : _a.style] }), props.title));
23
+ }
24
+ if (React.isValidElement(props.title))
25
+ return props.title;
26
+ return React.createElement(View, { style: styles.title });
27
+ })(),
28
+ (() => {
29
+ var _a;
30
+ if (typeof props.content === "string" ||
31
+ typeof props.content === "number") {
32
+ return (React.createElement(Text, Object.assign({ numberOfLines: 1 }, props.contentOptions, { style: [styles.content, (_a = props.contentOptions) === null || _a === void 0 ? void 0 : _a.style] }), props.content));
33
+ }
34
+ if (React.isValidElement(props.content))
35
+ return props.content;
36
+ return undefined;
37
+ })()),
38
+ showNav &&
39
+ (props.nav || (React.createElement(Image, { style: {
40
+ width: px2dp(9),
41
+ height: px2dp(16),
42
+ marginLeft: px2dp(8),
43
+ }, source: require("./assets/back.png") }))))));
55
44
  };
56
45
  const styles = StyleSheet.create({
57
46
  container: {
@@ -75,17 +64,14 @@ const styles = StyleSheet.create({
75
64
  flexDirection: "row",
76
65
  alignItems: "center",
77
66
  justifyContent: "space-between",
78
- // backgroundColor: 'cyan'
79
67
  },
80
68
  title: {
81
- // backgroundColor: 'red',
82
69
  flexGrow: 0,
83
70
  flexShrink: 0,
84
71
  fontSize: px2sp(14),
85
72
  color: "#333333",
86
73
  },
87
74
  content: {
88
- // backgroundColor: 'yellow',
89
75
  flexGrow: 1,
90
76
  flexShrink: 1,
91
77
  fontSize: px2sp(14),
@@ -1,11 +1,14 @@
1
- import { __rest } from "tslib";
2
- /*
3
- * @Author: shiguo
4
- * @Date: 2022-04-24 13:56:47
5
- * @LastEditors: shiguo
6
- * @LastEditTime: 2022-09-09 10:59:38
7
- * @FilePath: /@aks-dev/easyui/lib/TextInputArea/TextInputArea.tsx
8
- */
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
9
12
  import React from "react";
10
13
  import { View, Text, TextInput, StyleSheet, } from "react-native";
11
14
  import { px2dp } from "../../screen/px2dp";
@@ -19,27 +22,20 @@ export default React.forwardRef((props, ref) => {
19
22
  React.useImperativeHandle(ref, () => ({
20
23
  value: value,
21
24
  }), [value]);
22
- return (<View style={[styles.container, rest.style]}>
23
- <TextInput {...rest} style={[styles.textInput, rest.textInputStyle]} value={value} onChangeText={(txt) => {
24
- setValue(txt);
25
- on && on(txt);
26
- }} multiline={true} textAlignVertical={"top"} maxLength={maxLength} placeholder={placeholder}/>
27
-
28
- <View style={styles.corner}>
29
- <Text style={styles.limit}>
30
- <Text style={Object.assign(Object.assign({}, styles.limit), { color: value && (value === null || value === void 0 ? void 0 : value.length) > maxLength - 5 ? "red" : "#AFAFAF" })}>
31
- {(value === null || value === void 0 ? void 0 : value.length) || 0}
32
- </Text>
33
- /{maxLength}
34
- </Text>
35
- </View>
36
- </View>);
25
+ return (React.createElement(View, { style: [styles.container, rest.style] },
26
+ React.createElement(TextInput, Object.assign({}, rest, { style: [styles.textInput, rest.textInputStyle], value: value, onChangeText: (txt) => {
27
+ setValue(txt);
28
+ on && on(txt);
29
+ }, multiline: true, textAlignVertical: "top", maxLength: maxLength, placeholder: placeholder })),
30
+ React.createElement(View, { style: styles.corner },
31
+ React.createElement(Text, { style: styles.limit },
32
+ React.createElement(Text, { style: Object.assign(Object.assign({}, styles.limit), { color: value && (value === null || value === void 0 ? void 0 : value.length) > maxLength - 5 ? "red" : "#AFAFAF" }) }, (value === null || value === void 0 ? void 0 : value.length) || 0),
33
+ "/",
34
+ maxLength))));
37
35
  });
38
36
  const styles = StyleSheet.create({
39
37
  container: {
40
- // backgroundColor: '#F5F5F5',
41
38
  minHeight: px2dp(200),
42
- // borderRadius: px2dp(10),
43
39
  backgroundColor: "white",
44
40
  },
45
41
  textInput: {
@@ -47,11 +43,8 @@ const styles = StyleSheet.create({
47
43
  margin: px2dp(15),
48
44
  marginBottom: px2dp(8),
49
45
  fontSize: px2sp(14),
50
- // backgroundColor: 'red'
51
46
  },
52
47
  corner: {
53
- // position: 'absolute',
54
- // backgroundColor:'cyan',
55
48
  marginHorizontal: px2dp(15),
56
49
  marginBottom: px2dp(8),
57
50
  },
@@ -1,10 +1,3 @@
1
- /*
2
- * @Author: shiguo
3
- * @Date: 2022-04-20 14:56:47
4
- * @LastEditors: shiguo
5
- * @LastEditTime: 2022-05-09 14:35:04
6
- * @FilePath: /@aks/easyui/lib/WithLoadingContainer/WithLoadingContainer.tsx
7
- */
8
1
  import React from "react";
9
2
  import { View, Image, Text, StyleSheet, TouchableOpacity, } from "react-native";
10
3
  const loading = require("./assets/loading.gif");
@@ -20,52 +13,42 @@ export var Status;
20
13
  })(Status || (Status = {}));
21
14
  export default (props) => {
22
15
  const { status = Status.NONE, renderFailComponent, renderEmptyComponent, renderNomoreComponent, reload, failText = "网络请求失败,点击重新加载~", emptyText = "暂无数据", nomoreText = "没有更多数据了~", } = props;
23
- return (<View style={props.style}>
24
- <>
25
- {(() => {
16
+ return (React.createElement(View, { style: props.style },
17
+ React.createElement(React.Fragment, null, (() => {
26
18
  switch (status) {
27
19
  case Status.NONE:
28
20
  return undefined;
29
21
  case Status.SUCCESS:
30
22
  return props.children;
31
23
  case Status.LOADING:
32
- return <Loading />;
24
+ return React.createElement(Loading, null);
33
25
  case Status.FAIL:
34
26
  if (renderFailComponent)
35
27
  return renderFailComponent();
36
- return (<TouchableOpacity disabled={!reload} onPress={reload} style={styles.container}>
37
- <Text style={styles.text}>{failText}</Text>
38
- </TouchableOpacity>);
28
+ return (React.createElement(TouchableOpacity, { disabled: !reload, onPress: reload, style: styles.container },
29
+ React.createElement(Text, { style: styles.text }, failText)));
39
30
  case Status.EMPTY:
40
31
  if (renderEmptyComponent)
41
32
  return renderEmptyComponent();
42
- return (<TouchableOpacity disabled={!reload} onPress={reload} style={styles.container}>
43
- <Text style={styles.text}>{emptyText}</Text>
44
- </TouchableOpacity>);
33
+ return (React.createElement(TouchableOpacity, { disabled: !reload, onPress: reload, style: styles.container },
34
+ React.createElement(Text, { style: styles.text }, emptyText)));
45
35
  case Status.NOMORE:
46
- return (<>
47
- {props.children}
48
- {renderNomoreComponent ? (renderNomoreComponent()) : (<Text style={styles.text}>{nomoreText}</Text>)}
49
- </>);
36
+ return (React.createElement(React.Fragment, null,
37
+ props.children,
38
+ renderNomoreComponent ? (renderNomoreComponent()) : (React.createElement(Text, { style: styles.text }, nomoreText))));
50
39
  default:
51
- return (<Text style={[styles.text, { lineHeight: 44 }]}>
52
- (^_^)∠※ 送你一束小花
53
- </Text>);
40
+ return (React.createElement(Text, { style: [styles.text, { lineHeight: 44 }] }, "(^_^)\u2220\u203B \u9001\u4F60\u4E00\u675F\u5C0F\u82B1"));
54
41
  }
55
- })()}
56
- </>
57
- </View>);
42
+ })())));
58
43
  };
59
44
  const Loading = () => {
60
- return (<View style={styles.container}>
61
- <Image source={loading3} style={{ width: 20, height: 20 }} resizeMode="contain"/>
62
- </View>);
45
+ return (React.createElement(View, { style: styles.container },
46
+ React.createElement(Image, { source: loading3, style: { width: 20, height: 20 }, resizeMode: "contain" })));
63
47
  };
64
48
  const styles = StyleSheet.create({
65
49
  text: {
66
50
  color: "#999999",
67
51
  fontSize: 14,
68
- // textAlign: 'center',
69
52
  },
70
53
  container: {
71
54
  display: "flex",
package/dist/index.js CHANGED
@@ -1,11 +1,3 @@
1
- /*
2
- * @Author: shiguo
3
- * @Date: 2022-04-13 12:47:34
4
- * @LastEditors: shiguo
5
- * @LastEditTime: 2023-03-23 15:26:14
6
- * @FilePath: /@aks-dev/easyui/src/index.ts
7
- */
8
- /// 组件
9
1
  export * from "./components/Badge/Badge";
10
2
  export { Hud, showLoading, hideLoading, showToast, showAlertModal, showAlertBottomModal, showAlertSheetModal, showPopoverView, hidePopoverView, showScanner, hideScanner, } from "./components/Hud/Hud";
11
3
  export * from "./components/Modal/Modal";
@@ -21,10 +13,7 @@ export { default as RichText } from "./components/RichText/RichText";
21
13
  export { default as DottedLine } from "./components/DottedLine/DottedLine";
22
14
  export { default as MenuView } from "./components/MenuView/MenuView";
23
15
  export { AnimationModal } from "./components/AnimationModal/AnimationModal";
24
- /// 全局适配
25
16
  export * from "./screen";
26
- /// 工具
27
17
  import * as utils from "./utils";
28
- ///  桥接
29
18
  import * as jsbridge from "./jsbridge";
30
19
  export { utils, jsbridge };