@aks-dev/easyui 1.0.163 → 1.1.2

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.
Files changed (173) hide show
  1. package/dist/components/AnimationModal/AnimationModal.js +151 -0
  2. package/dist/components/DottedLine/DottedLine.js +50 -0
  3. package/{lib/Echarts/EchartsView.tsx → dist/components/EchartsView/EchartsView.js} +74 -113
  4. package/{lib/Echarts/helper.tsx → dist/components/EchartsView/helper.js} +17 -24
  5. package/dist/components/Hud/AlertBottomView/AlertBottomView.js +174 -0
  6. package/dist/components/Hud/AlertSheetView/AlertSheetView.js +117 -0
  7. package/dist/components/Hud/AlertView/AlertView.js +184 -0
  8. package/dist/components/Hud/Hud.js +29 -0
  9. package/dist/components/Hud/Loading/Loading.js +66 -0
  10. package/dist/components/Hud/PopoverView/PopoverView.js +47 -0
  11. package/dist/components/Hud/Scanner/Scanner.js +301 -0
  12. package/dist/components/Hud/Toast/Toast.js +71 -0
  13. package/dist/components/MenuView/MenuView.js +184 -0
  14. package/{lib/Modal/Modal.tsx → dist/components/Modal/Modal.js} +1 -4
  15. package/dist/components/MutiPictureView/MutiPictureView.js +239 -0
  16. package/dist/components/PictureViewer/PictureViewer.js +54 -0
  17. package/dist/components/RefreshList/RefreshList.js +155 -0
  18. package/dist/components/RichText/RichText.js +56 -0
  19. package/dist/components/StickHeaderView/StickHeaderView.js +37 -0
  20. package/dist/components/TableCell/TableCell.js +97 -0
  21. package/dist/components/TextInputArea/TextInputArea.js +65 -0
  22. package/dist/components/WithLoadingContainer/WithLoadingContainer.js +77 -0
  23. package/dist/index.js +31 -0
  24. package/dist/jsbridge/RNEasyui.js +46 -0
  25. package/{jsbridge/UpgradeModule.ts → dist/jsbridge/UpgradeModule.js} +25 -23
  26. package/{jsbridge/index.ts → dist/jsbridge/index.js} +2 -2
  27. package/{screen/index.ts → dist/screen/index.js} +2 -2
  28. package/dist/screen/px2dp.js +45 -0
  29. package/{screen/px2sp.ts → dist/screen/px2sp.js} +13 -20
  30. package/{screen/text-fit.ts → dist/screen/text-fit.js} +10 -20
  31. package/{utils/index.ts → dist/utils/index.js} +2 -2
  32. package/{utils/lazy.ts → dist/utils/lazy.js} +164 -165
  33. package/dist/utils/mode.js +50 -0
  34. package/package.json +31 -19
  35. package/readme.md +3 -3
  36. package/types/components/AnimationModal/AnimationModal.d.ts +27 -0
  37. package/types/components/AnimationModal/AnimationModal.d.ts.map +1 -0
  38. package/types/components/DottedLine/DottedLine.d.ts +10 -0
  39. package/types/components/DottedLine/DottedLine.d.ts.map +1 -0
  40. package/types/components/EchartsView/EchartsView.d.ts +10 -0
  41. package/types/components/EchartsView/EchartsView.d.ts.map +1 -0
  42. package/types/components/EchartsView/helper.d.ts +10 -0
  43. package/types/components/EchartsView/helper.d.ts.map +1 -0
  44. package/types/components/Hud/AlertBottomView/AlertBottomView.d.ts +25 -0
  45. package/types/components/Hud/AlertBottomView/AlertBottomView.d.ts.map +1 -0
  46. package/types/components/Hud/AlertSheetView/AlertSheetView.d.ts +19 -0
  47. package/types/components/Hud/AlertSheetView/AlertSheetView.d.ts.map +1 -0
  48. package/types/components/Hud/AlertView/AlertView.d.ts +25 -0
  49. package/types/components/Hud/AlertView/AlertView.d.ts.map +1 -0
  50. package/types/components/Hud/Hud.d.ts +11 -0
  51. package/types/components/Hud/Hud.d.ts.map +1 -0
  52. package/types/components/Hud/Loading/Loading.d.ts +11 -0
  53. package/types/components/Hud/Loading/Loading.d.ts.map +1 -0
  54. package/types/components/Hud/PopoverView/PopoverView.d.ts +17 -0
  55. package/types/components/Hud/PopoverView/PopoverView.d.ts.map +1 -0
  56. package/types/components/Hud/Scanner/Scanner.d.ts +12 -0
  57. package/types/components/Hud/Scanner/Scanner.d.ts.map +1 -0
  58. package/types/components/Hud/Toast/Toast.d.ts +9 -0
  59. package/types/components/Hud/Toast/Toast.d.ts.map +1 -0
  60. package/types/components/MenuView/MenuView.d.ts +21 -0
  61. package/types/components/MenuView/MenuView.d.ts.map +1 -0
  62. package/types/components/Modal/Modal.d.ts +2 -0
  63. package/types/components/Modal/Modal.d.ts.map +1 -0
  64. package/{lib/MutiPictureView/index.ts → types/components/MutiPictureView/MutiPictureView.d.ts} +18 -31
  65. package/types/components/MutiPictureView/MutiPictureView.d.ts.map +1 -0
  66. package/types/components/PictureViewer/PictureViewer.d.ts +17 -0
  67. package/types/components/PictureViewer/PictureViewer.d.ts.map +1 -0
  68. package/types/components/RefreshList/RefreshList.d.ts +45 -0
  69. package/types/components/RefreshList/RefreshList.d.ts.map +1 -0
  70. package/types/components/RichText/RichText.d.ts +12 -0
  71. package/types/components/RichText/RichText.d.ts.map +1 -0
  72. package/types/components/StickHeaderView/StickHeaderView.d.ts +15 -0
  73. package/types/components/StickHeaderView/StickHeaderView.d.ts.map +1 -0
  74. package/{lib/TableCell/index.ts → types/components/TableCell/TableCell.d.ts} +8 -30
  75. package/types/components/TableCell/TableCell.d.ts.map +1 -0
  76. package/types/components/TextInputArea/TextInputArea.d.ts +17 -0
  77. package/types/components/TextInputArea/TextInputArea.d.ts.map +1 -0
  78. package/types/components/WithLoadingContainer/WithLoadingContainer.d.ts +23 -0
  79. package/types/components/WithLoadingContainer/WithLoadingContainer.d.ts.map +1 -0
  80. package/types/index.d.ts +22 -0
  81. package/types/index.d.ts.map +1 -0
  82. package/types/jsbridge/RNEasyui.d.ts +23 -0
  83. package/types/jsbridge/RNEasyui.d.ts.map +1 -0
  84. package/types/jsbridge/UpgradeModule.d.ts +26 -0
  85. package/types/jsbridge/UpgradeModule.d.ts.map +1 -0
  86. package/types/jsbridge/index.d.ts +3 -0
  87. package/types/jsbridge/index.d.ts.map +1 -0
  88. package/types/screen/index.d.ts +3 -0
  89. package/types/screen/index.d.ts.map +1 -0
  90. package/{screen/index.d.ts → types/screen/px2dp.d.ts} +6 -12
  91. package/types/screen/px2dp.d.ts.map +1 -0
  92. package/types/screen/px2sp.d.ts +2 -0
  93. package/types/screen/px2sp.d.ts.map +1 -0
  94. package/types/screen/text-fit.d.ts +5 -0
  95. package/types/screen/text-fit.d.ts.map +1 -0
  96. package/types/utils/index.d.ts +3 -0
  97. package/types/utils/index.d.ts.map +1 -0
  98. package/{utils/index.d.ts → types/utils/lazy.d.ts} +15 -53
  99. package/types/utils/lazy.d.ts.map +1 -0
  100. package/types/utils/mode.d.ts +24 -0
  101. package/types/utils/mode.d.ts.map +1 -0
  102. package/android/.DS_Store +0 -0
  103. package/android/src/.DS_Store +0 -0
  104. package/android/src/main/.DS_Store +0 -0
  105. package/android/src/main/java/.DS_Store +0 -0
  106. package/android/src/main/java/com/.DS_Store +0 -0
  107. package/android/src/main/java/com/easyui/.DS_Store +0 -0
  108. package/i.sh +0 -23
  109. package/ios/.DS_Store +0 -0
  110. package/ios/assets/.DS_Store +0 -0
  111. package/ios/views/.DS_Store +0 -0
  112. package/jsbridge/RNEasyui.ts +0 -42
  113. package/jsbridge/index.d.ts +0 -67
  114. package/lib/.DS_Store +0 -0
  115. package/lib/AnimationModal/AnimationModal.tsx +0 -201
  116. package/lib/AnimationModal/index.d.ts +0 -41
  117. package/lib/Badge/Badge.tsx +0 -40
  118. package/lib/Badge/index.ts +0 -21
  119. package/lib/DottedLine/DottedLine.tsx +0 -66
  120. package/lib/DottedLine/index.ts +0 -18
  121. package/lib/Echarts/demo.tsx +0 -235
  122. package/lib/Echarts/index.ts +0 -29
  123. package/lib/Hud/.DS_Store +0 -0
  124. package/lib/Hud/AlertBottomView/AlertBottomView.tsx +0 -228
  125. package/lib/Hud/AlertBottomView/index.d.ts +0 -42
  126. package/lib/Hud/AlertSheetView/AlertSheetView.tsx +0 -179
  127. package/lib/Hud/AlertSheetView/index.d.ts +0 -35
  128. package/lib/Hud/AlertView/AlertView.tsx +0 -234
  129. package/lib/Hud/AlertView/index.d.ts +0 -46
  130. package/lib/Hud/Hud.tsx +0 -67
  131. package/lib/Hud/Loading/Loading.tsx +0 -87
  132. package/lib/Hud/Loading/index.d.ts +0 -38
  133. package/lib/Hud/PopoverView/PopoverView.tsx +0 -66
  134. package/lib/Hud/PopoverView/index.d.ts +0 -39
  135. package/lib/Hud/Scanner/Scanner.tsx +0 -250
  136. package/lib/Hud/Scanner/index.d.ts +0 -42
  137. package/lib/Hud/Toast/Toast.tsx +0 -86
  138. package/lib/Hud/Toast/index.d.ts +0 -22
  139. package/lib/Hud/index.ts +0 -20
  140. package/lib/MenuView/MenuView.tsx +0 -252
  141. package/lib/MenuView/index.ts +0 -31
  142. package/lib/Modal/index.ts +0 -10
  143. package/lib/MutiPictureView/MutiPictureView.tsx +0 -259
  144. package/lib/PictureViewer/PictureViewer.tsx +0 -80
  145. package/lib/PictureViewer/index.ts +0 -26
  146. package/lib/RefreshList/RefreshList.tsx +0 -235
  147. package/lib/RefreshList/demo.tsx +0 -30
  148. package/lib/RefreshList/demo1.tsx +0 -60
  149. package/lib/RefreshList/demo2.tsx +0 -46
  150. package/lib/RefreshList/index.ts +0 -84
  151. package/lib/RichText/RichText.tsx +0 -82
  152. package/lib/RichText/index.ts +0 -21
  153. package/lib/StickHeaderView/StickHeaderView.tsx +0 -65
  154. package/lib/StickHeaderView/demo.tsx +0 -104
  155. package/lib/StickHeaderView/index.ts +0 -26
  156. package/lib/TableCell/TableCell.tsx +0 -118
  157. package/lib/TextInputArea/TextInputArea.tsx +0 -89
  158. package/lib/TextInputArea/index.d.ts +0 -33
  159. package/lib/WithLoadingContainer/WithLoadingContainer.tsx +0 -93
  160. package/lib/WithLoadingContainer/index.ts +0 -36
  161. package/screen/px2dp.ts +0 -51
  162. package/src/index.d.ts +0 -42
  163. package/src/index.ts +0 -54
  164. package/utils/mode.ts +0 -48
  165. /package/{lib/Hud/Scanner → dist/components/Hud/Scanner/assets}/flashlight-blue.png +0 -0
  166. /package/{lib/Hud/Scanner → dist/components/Hud/Scanner/assets}/flashlight-white.png +0 -0
  167. /package/{lib/Hud/Scanner → dist/components/Hud/Scanner/assets}/icon_back_white.png +0 -0
  168. /package/{lib/MutiPictureView → dist/components/MutiPictureView/assets}/icon_add_image.png +0 -0
  169. /package/{lib/MutiPictureView → dist/components/MutiPictureView/assets}/icon_del_image.png +0 -0
  170. /package/{lib/TableCell → dist/components/TableCell/assets}/back.png +0 -0
  171. /package/{lib/WithLoadingContainer → dist/components/WithLoadingContainer/assets}/loading.gif +0 -0
  172. /package/{lib/WithLoadingContainer → dist/components/WithLoadingContainer/assets}/loading3.gif +0 -0
  173. /package/{lib → dist/components}/index.md +0 -0
@@ -0,0 +1,26 @@
1
+ /**
2
+ * @description: 获取App版本号
3
+ * @param {*}
4
+ * @return {*}
5
+ */
6
+ export declare const getAppVersion: () => any;
7
+ /**
8
+ * @description: 获取操作系统版本
9
+ *
10
+ react-native-device-info
11
+ * @return {*}
12
+ */
13
+ export declare const getOSVersion: () => any;
14
+ /**
15
+ * @description: app升级
16
+ * @return {*}
17
+ */
18
+ export type UpgradeOptions = {
19
+ title?: string;
20
+ version: string;
21
+ downloadUrl: string;
22
+ note: string;
23
+ force: boolean;
24
+ };
25
+ export declare const upgrade: (options: UpgradeOptions) => Promise<any>;
26
+ //# sourceMappingURL=UpgradeModule.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UpgradeModule.d.ts","sourceRoot":"","sources":["../../src/jsbridge/UpgradeModule.ts"],"names":[],"mappings":"AAWA;;;;GAIG;AACH,eAAO,MAAM,aAAa,WAAsC,CAAC;AACjE;;;;;GAKG;AACH,eAAO,MAAM,YAAY,WAAqC,CAAC;AAC/D;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,SAAS,cAAc,iBA0BpD,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './RNEasyui';
2
+ export * from './UpgradeModule';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/jsbridge/index.ts"],"names":[],"mappings":"AAOA,cAAc,YAAY,CAAA;AAC1B,cAAc,iBAAiB,CAAA"}
@@ -0,0 +1,3 @@
1
+ export * from '../screen/px2dp';
2
+ export * from '../screen/px2sp';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/screen/index.ts"],"names":[],"mappings":"AAQA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,iBAAiB,CAAA"}
@@ -1,17 +1,10 @@
1
- /*
2
- * @Author: shiguo
3
- * @Date: 2022-04-19 10:25:14
4
- * @LastEditors: shiguo
5
- * @LastEditTime: 2022-05-31 18:34:57
6
- * @FilePath: /@aks-dev/easyui/screen/index.ts
7
- */
8
- export declare const deviceWidth: number; //设备的宽度
9
- export declare const deviceHeight: number; //设备的高度
1
+ /**设备宽度,单位 dp */
2
+ export declare const deviceWidth: number;
3
+ export declare const deviceHeight: number;
10
4
  export declare const isAndroid: boolean;
11
5
  export declare const isIos: boolean;
12
- export declare const px2dp: (uiElePx: number) => number;
13
- export declare const px2sp: (fontSize: number) => number;
14
6
  export declare const isiPhoneX: boolean;
7
+ export declare const px2dp: (uiElePx: number) => number;
15
8
  /**
16
9
  * @description: 状态栏的高度
17
10
  * @param {*}
@@ -23,4 +16,5 @@ export declare const statusBarHeight: number;
23
16
  * @param {*}
24
17
  * @return {*}
25
18
  */
26
- export declare const navigationBarHeight: number;
19
+ export declare const navigationBarHeight: number;
20
+ //# sourceMappingURL=px2dp.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"px2dp.d.ts","sourceRoot":"","sources":["../../src/screen/px2dp.ts"],"names":[],"mappings":"AASA,gBAAgB;AAChB,eAAO,MAAM,WAAW,QAAiC,CAAC;AAC1D,eAAO,MAAM,YAAY,QAAkC,CAAC;AAC5D,eAAO,MAAM,SAAS,SAA4B,CAAC;AACnD,eAAO,MAAM,KAAK,SAAwB,CAAC;AAC3C,eAAO,MAAM,SAAS,SAA8B,CAAC;AAUrD,eAAO,MAAM,KAAK,GAAI,SAAS,MAAM,WAEpC,CAAC;AACF;;;;GAIG;AACH,eAAO,MAAM,eAAe,QAIxB,CAAC;AACL;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,QAG5B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const px2sp: (size: number) => number;
2
+ //# sourceMappingURL=px2sp.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"px2sp.d.ts","sourceRoot":"","sources":["../../src/screen/px2sp.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,KAAK,GAAI,MAAM,MAAM,WA+DjC,CAAC"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * 全局配置Text
3
+ */
4
+ export {};
5
+ //# sourceMappingURL=text-fit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text-fit.d.ts","sourceRoot":"","sources":["../../src/screen/text-fit.ts"],"names":[],"mappings":"AAOA;;GAEG"}
@@ -0,0 +1,3 @@
1
+ export * from '../utils/mode';
2
+ export * from '../utils/lazy';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAOA,cAAc,eAAe,CAAA;AAC7B,cAAc,eAAe,CAAA"}
@@ -1,65 +1,22 @@
1
- /*
2
- * @Author: shiguo
3
- * @Date: 2022-04-19 10:25:43
4
- * @LastEditors: shiguo
5
- * @LastEditTime: 2023-02-28 12:07:51
6
- * @FilePath: /@aks-dev/easyui/utils/index.ts
7
- */
8
-
9
- import * as rn from 'react-native';
10
-
11
1
  /**
12
2
  * @description: 睡眠时间
13
3
  * @param {*}毫秒值
14
4
  * @return {*}
15
5
  */
16
- type TArgs = (args: void) => void;
17
- export declare const sleep: (msec?: number) => Promise<TArgs>;
18
-
19
-
20
- /**
21
- * @description: 通过手势关闭键盘
22
- * @return {*}
23
- */
24
- export declare const keyboardDismissHandlers: rn.GestureResponderHandlers;
25
-
26
- export type CallBack = (...args: any[]) => void;
27
-
28
-
29
-
30
-
31
- /**
32
- * @description: 手势动作回调
33
- * @param {*}
34
- * @return {*}
35
- */
36
- export declare const panHandlersCallback: (props: { GrantCallback: CallBack, MoveCallback: CallBack, ReleaseCallback: CallBack }) => void;
37
-
38
- /**
39
- * @description: 拨打电话
40
- * @param {number} phone
41
- * @return {*}
42
- */
43
- export declare const callTelephone: (phone: number | string) => void;
44
-
6
+ export declare const sleep: (msec?: number) => Promise<unknown>;
45
7
  /**
46
8
  * @description: 获取随机色
47
9
  * @param {*}
48
10
  * @return {*}
49
11
  */
50
12
  export declare const randomcolor: () => string;
51
-
52
-
53
-
54
- export type SyncLoopCallBack = (item: any, index: number) => void;
13
+ type SyncLoopCallBack = (item: any, index: number) => void;
55
14
  /**
56
15
  * @description: 同步循环
57
16
  * @param {*} dataList:数据源
58
17
  * @return {*}
59
18
  */
60
19
  export declare const syncLoop: (dataList: any[], callback: SyncLoopCallBack) => Promise<string>;
61
-
62
-
63
20
  /**
64
21
  * @description: 对11位手机号码加*
65
22
  * @return {*}
@@ -76,21 +33,26 @@ export declare const isNumber: (exp: any) => boolean;
76
33
  export declare const isNull: (exp: any) => boolean;
77
34
  export declare const isNullObject: (obj: any) => boolean;
78
35
  export declare const isUndefined: (exp: any) => boolean;
36
+ /**判断两个对象是否相同 */
79
37
  export declare const isObjectValueEqual: (a: any, b: any) => boolean;
80
38
  export declare const deepEqual: (x: any, y: any) => boolean;
81
39
  export declare function deepClone(target: any): any;
82
40
  export declare const isPhoneNumber: (str: string) => boolean;
41
+ /**
42
+ *
43
+ * @param dateStr yyyy-MM-dd HH:mm:ss
44
+ * @returns {string}
45
+ */
83
46
  export declare const toDateFriendly: (dateStr: string) => string;
84
47
  export declare const isChainChar: (str: string) => boolean;
85
- export declare const isHaveChartCount: (str: string) => number;
86
- export declare const isHaveNumberCount: (str: string) => number;
48
+ export declare const isHaveChartCount: (str: string) => number | undefined;
49
+ export declare const isHaveNumberCount: (str: string) => number | undefined;
87
50
  export declare const isHaveChinese: (text: string) => boolean;
88
51
  export declare const isHaveEmojiCharact: (substring: string) => boolean;
89
-
90
-
91
52
  /**
92
- * @description: 获得32位随机字符
93
- * @return {*}
94
- */
53
+ * @description: 获得32位随机字符
54
+ * @return {*}
55
+ */
95
56
  export declare const getUuid: () => string;
96
-
57
+ export {};
58
+ //# sourceMappingURL=lazy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lazy.d.ts","sourceRoot":"","sources":["../../src/utils/lazy.ts"],"names":[],"mappings":"AAQA;;;;GAIG;AACH,eAAO,MAAM,KAAK,GAAI,OAAO,MAAM,qBAIlC,CAAC;AACF;;;;GAIG;AACH,eAAO,MAAM,WAAW,cAEvB,CAAC;AAEF,KAAK,gBAAgB,GAAG,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;AAC3D;;;;GAIG;AACH,eAAO,MAAM,QAAQ,GAAU,UAAU,GAAG,EAAE,EAAE,UAAU,gBAAgB,oBAazE,CAAC;AACF;;;GAGG;AACH,eAAO,MAAM,wBAAwB,GAAI,MAAM,MAAM,WAOpD,CAAC;AAEF;;;GAGG;AAGH,eAAO,MAAM,QAAQ,GAAI,KAAK,GAAG,YAEhC,CAAC;AAGF,eAAO,MAAM,OAAO,GAAI,KAAK,GAAG,YAE/B,CAAC;AAGF,eAAO,MAAM,QAAQ,GAAI,KAAK,GAAG,YAEhC,CAAC;AAGF,eAAO,MAAM,QAAQ,GAAI,KAAK,GAAG,YAEhC,CAAC;AAGF,eAAO,MAAM,MAAM,GAAI,KAAK,GAAG,YAE9B,CAAC;AAGF,eAAO,MAAM,YAAY,GAAI,KAAK,GAAG,YAOpC,CAAC;AAGF,eAAO,MAAM,WAAW,GAAI,KAAK,GAAG,YAEnC,CAAC;AACF,gBAAgB;AAChB,eAAO,MAAM,kBAAkB,GAAI,GAAG,GAAG,EAAE,GAAG,GAAG,YAqBhD,CAAC;AAEF,eAAO,MAAM,SAAS,GAAI,GAAG,GAAG,EAAE,GAAG,GAAG,YA4CvC,CAAC;AAGF,wBAAgB,SAAS,CAAC,MAAM,EAAE,GAAG,GAAG,GAAG,CA+B1C;AAED,eAAO,MAAM,aAAa,GAAI,KAAK,MAAM,YAMxC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,cAAc,GAAI,SAAS,MAAM,WAmC7C,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,KAAK,MAAM,YAKtC,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,KAAK,MAAM,uBAK3C,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,KAAK,MAAM,uBAK5C,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,MAAM,MAAM,YAOzC,CAAC;AACF,eAAO,MAAM,kBAAkB,GAAI,WAAW,MAAM,YAyCnD,CAAC;AACF;;;GAGG;AACH,eAAO,MAAM,OAAO,cAYnB,CAAC"}
@@ -0,0 +1,24 @@
1
+ type CallBack = (...args: any[]) => void;
2
+ /**
3
+ * @description: 通过手势关闭键盘
4
+ * @return {*}
5
+ */
6
+ export declare const keyboardDismissHandlers: import("react-native").GestureResponderHandlers;
7
+ /**
8
+ * @description: 手势动作回调
9
+ * @param {*}
10
+ * @return {*}
11
+ */
12
+ export declare const panHandlersCallback: (props: {
13
+ GrantCallback: CallBack;
14
+ MoveCallback: CallBack;
15
+ ReleaseCallback: CallBack;
16
+ }) => import("react-native").GestureResponderHandlers;
17
+ /**
18
+ * @description: 拨打电话
19
+ * @param {number} phone
20
+ * @return {*}
21
+ */
22
+ export declare const callTelephone: (phone: number | string) => void;
23
+ export {};
24
+ //# sourceMappingURL=mode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mode.d.ts","sourceRoot":"","sources":["../../src/utils/mode.ts"],"names":[],"mappings":"AASA,KAAK,QAAQ,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;AACzC;;;GAGG;AACH,eAAO,MAAM,uBAAuB,iDAGtB,CAAC;AACf;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,GAAI,OAAO;IACzC,aAAa,EAAE,QAAQ,CAAC;IACxB,YAAY,EAAE,QAAQ,CAAC;IACvB,eAAe,EAAE,QAAQ,CAAC;CAC3B,oDAQA,CAAC;AACF;;;;GAIG;AACH,eAAO,MAAM,aAAa,GAAI,OAAO,MAAM,GAAG,MAAM,SAanD,CAAC"}
package/android/.DS_Store DELETED
Binary file
Binary file
Binary file
Binary file
Binary file
package/i.sh DELETED
@@ -1,23 +0,0 @@
1
-
2
- ###
3
- # @Author: shiguo
4
- # @Date: 2022-09-26 17:09:38
5
- # @LastEditors: shiguo
6
- # @LastEditTime: 2023-09-15 17:15:13
7
- # @FilePath: /@aks-dev/easyui/i.sh
8
- ###
9
- # echo "Shell 传递参数实例!";
10
- # echo "执行的文件名:$0";
11
- # echo "第一个参数为:$1";
12
- # echo "第二个参数为:$2";
13
- # echo "第三个参数为:$3";
14
- # ./i.sh 测试更新注视
15
-
16
-
17
- #chmod u+x *.sh
18
- git add .
19
- git commit -m $1
20
- # git push origin master
21
- git push --force origin master
22
- npm version patch
23
- npm publish
package/ios/.DS_Store DELETED
Binary file
Binary file
Binary file
@@ -1,42 +0,0 @@
1
- /*
2
- * @Author: shiguo
3
- * @Date: 2022-04-19 10:23:01
4
- * @LastEditors: shiguo
5
- * @LastEditTime: 2023-03-10 14:05:17
6
- * @FilePath: /@aks-dev/easyui/jsbridge/RNEasyui.ts
7
- */
8
-
9
- import { Dimensions, NativeModules, Platform } from 'react-native';
10
-
11
- const { RNEasyui } = NativeModules;
12
-
13
-
14
-
15
- export const getDeviceBrand = () => RNEasyui.getDeviceBrand();
16
-
17
-
18
-
19
- export const getStatusBarHeight = () => {
20
- if (Platform.OS == 'android') return RNEasyui.getStatusBarHeight();
21
-
22
- const deviceHeight = Dimensions.get('window').height;
23
- const isiPhoneX = Platform.OS == 'ios' && (deviceHeight > 736)
24
- if (isiPhoneX) return Promise.resolve(44)
25
- return Promise.resolve(20)
26
- }
27
-
28
- export const getNavigationBarHeight = () => {
29
- if (Platform.OS == 'android') return RNEasyui.getNavigationBarHeight();
30
-
31
- return Promise.resolve(44)
32
-
33
- }
34
-
35
-
36
- export const gotoDesktop = () => {
37
- if (Platform.OS == 'android') RNEasyui?.gotoDesktop();
38
- }
39
-
40
-
41
-
42
-
@@ -1,67 +0,0 @@
1
- /*
2
- * @Author: shiguo
3
- * @Date: 2022-04-19 10:23:01
4
- * @LastEditors: shiguo
5
- * @LastEditTime: 2022-10-24 16:38:59
6
- * @FilePath: /@aks-dev/easyui/jsbridge/index.ts
7
- */
8
-
9
-
10
- /**
11
- * @description: 获取App版本号
12
- * @param {*}
13
- * @return {*}
14
- */
15
- export declare const getAppVersion: () => Promise<string>;
16
-
17
- /**
18
- * @description: 获取操作系统版本
19
- *
20
- react-native-device-info
21
- * @return {*}
22
- */
23
- export declare const getOSVersion: () => Promise<string>;
24
-
25
- /**
26
- * @description: 获取设备品牌
27
- * @return {*}
28
- */
29
- export declare const getDeviceBrand: () => Promise<string>;
30
-
31
-
32
- export declare type UpgradeOptions = {
33
- title?: string;
34
- version: string;
35
- downloadUrl: string;
36
- note: string;
37
- force: boolean;
38
- };
39
-
40
- /**
41
- * @description: app升级
42
- * @return {*}
43
- */
44
- export declare const upgrade: (options: UpgradeOptions) => Promise<string>;
45
-
46
-
47
-
48
- /**
49
- * @deprecated 测量不准确,已放弃
50
- * @description: 获取status_bar_height
51
- * @return {*}
52
- */
53
- export declare const getStatusBarHeight: () => Promise<number>;
54
-
55
- /**
56
- * @deprecated 测量不准确,已放弃
57
- * @description: 获取navigation_bar_height
58
- * @return {*}
59
- */
60
- export declare const getNavigationBarHeight: () => Promise<number>;
61
-
62
-
63
- /**
64
- * only android
65
- * 返回桌面
66
- */
67
- export declare const gotoDesktop: ()=>void;
package/lib/.DS_Store DELETED
Binary file
@@ -1,201 +0,0 @@
1
- /*
2
- * @Author: shiguo
3
- * @Date: 2022-05-17 15:22:06
4
- * @LastEditors: shiguo
5
- * @LastEditTime: 2023-09-27 15:17:15
6
- * @FilePath: /@aks-dev/easyui/lib/AnimationModal/AnimationModal.tsx
7
- */
8
-
9
- import * as React from "react";
10
- import { View, Animated, Easing, LayoutRectangle, PanResponder, StyleSheet, useWindowDimensions, BackHandler, MeasureOnSuccessCallback } from 'react-native';
11
- import type { AnimationModalProps } from '.';
12
- import * as utils from '../../utils/lazy';
13
- // type State = {
14
- // display: 'flex' | 'none';
15
- // }
16
- // type StateReducerProps = (state: State, action: Partial<State>) => State
17
-
18
-
19
-
20
-
21
- export const AnimationModal: React.ForwardRefExoticComponent<
22
- React.PropsWithoutRef<AnimationModalProps>
23
- & React.RefAttributes<AnimationModalProps.RefAttributes>
24
- >
25
- = React.forwardRef((props, ref) => {
26
- const {
27
- animationType = 'from-bottom',
28
- mask = false
29
- } = props || {}
30
-
31
- const { height } = useWindowDimensions()
32
-
33
- // const [state, dispatch] = React.useReducer<StateReducerProps>(
34
- // (state, action) => ({ ...state, ...action }),
35
- // {
36
- // display: 'none'
37
- // })
38
-
39
- const [display, setDisplay] = useCallbackState<'flex' | 'none'>('none')
40
-
41
- const animatedValue = React.useRef(new Animated.Value(0)).current;
42
- const timing = (value: number) => {
43
- Animated.timing(animatedValue, {
44
- toValue: value,
45
- duration: 350,
46
- useNativeDriver: true,
47
- easing: Easing.ease,
48
- }).start(({ finished }) => {
49
- /* 动画完成的回调函数 */
50
- });
51
- };
52
-
53
-
54
- const viewRef = React.useRef<{ measure: (callback: MeasureOnSuccessCallback) => void }>() as any
55
- const layoutRef = React.useRef<{
56
- /**:父容器的高度 */
57
- h0: number;
58
- /**:子容器的高度 */
59
- h1: number;
60
- }>({ h0: 0, h1: 0 })
61
- const getLayoutPromise = () => {
62
- return new Promise((resovle, reject) => {
63
- viewRef.current?.measure((...args: any[]) => {
64
- if (args.length == 6) {
65
- layoutRef.current.h1 = args[3]
66
- }
67
- resovle(args)
68
- })
69
- })
70
- }
71
-
72
-
73
-
74
- const init = React.useCallback(() => ({ show, hide, setData, getData }), [])
75
- React.useImperativeHandle<unknown, AnimationModalProps.RefAttributes>(ref, init, [])
76
- const dataRef = React.useRef<any>()
77
- const setData = (data?: any) => {
78
- dataRef.current = data
79
- return init()
80
- }
81
-
82
- const getData = () => dataRef.current
83
-
84
-
85
- const show = () => {
86
- setDisplay('flex', async () => {
87
- await utils.sleep(50)
88
- await getLayoutPromise()
89
- timing(-layoutRef.current?.h1)
90
- })
91
-
92
- return init()
93
- }
94
- const hide = () => {
95
- timing(0)
96
- setTimeout(() => {
97
- setDisplay('none')
98
- }, 300)
99
-
100
- return init()
101
- }
102
-
103
-
104
- React.useEffect(() => {
105
- let addEventListener = BackHandler.addEventListener("hardwareBackPress", () => {
106
- return display == 'flex'
107
- })
108
- return () => {
109
- addEventListener.remove()
110
- }
111
- }, [display])
112
-
113
-
114
-
115
- return (
116
- <View
117
- style={Object.assign({
118
- display: display
119
- }, styles.container, props.style)}
120
- {...PanResponder.create({
121
- onStartShouldSetPanResponder: (e, gestureState) => {
122
- let pageY = e.nativeEvent.pageY
123
- let topY = height - layoutRef.current.h1
124
- if (pageY <= topY && !mask) {
125
- return true
126
- }
127
- return false
128
- },
129
- onPanResponderGrant: (e, gestureState) => {
130
- // console.log({e})
131
- let pageY = e.nativeEvent.pageY
132
- let topY = height - layoutRef.current.h1
133
- if (pageY <= topY && !mask) {
134
- e.stopPropagation()
135
- hide()
136
- }
137
- }
138
- }).panHandlers}
139
- >
140
- <Animated.View
141
- style={Object.assign({}, styles.wrapper, { transform: [{ translateY: animatedValue }] })}
142
- // onLayout={e => {
143
- // let target: LayoutRectangle = e.nativeEvent.layout
144
- // layoutRef.current.h1 = target.height
145
- // }}
146
-
147
- ref={viewRef}
148
- >
149
- {props.children}
150
- </Animated.View>
151
- </View>
152
- )
153
- })
154
-
155
-
156
-
157
- const styles = StyleSheet.create({
158
- container: {
159
- position: 'absolute',
160
- left: 0,
161
- right: 0,
162
- top: 0,
163
- bottom: 0,
164
- zIndex: 999,
165
- // display: 'flex',
166
- flexDirection: 'column',
167
- backgroundColor: '#00000055',
168
- overflow: 'hidden',
169
- },
170
- wrapper: {
171
- position: 'absolute',
172
- display: 'flex',
173
- flexDirection: 'column',
174
- // backgroundColor: 'pink',
175
- width: '100%',
176
- top: '100%'
177
- },
178
- empty: {
179
- flex: 1, position: 'relative',
180
- // backgroundColor: 'cyan'
181
- }
182
- })
183
-
184
-
185
-
186
-
187
- const useCallbackState = <T,>(od: T): [T, (d: T, callback?: Function) => void] => {
188
- const cbRef = React.useRef<Function>()
189
- const [data, setData] = React.useState<T>(od)
190
- React.useEffect(() => {
191
- cbRef.current && cbRef.current(data)
192
- }, [data])
193
-
194
- return [
195
- data,
196
- (d: T, callback?: Function) => {
197
- cbRef.current = callback;
198
- setData(d)
199
- }
200
- ]
201
- }
@@ -1,41 +0,0 @@
1
- /*
2
- * @Author: shiguo
3
- * @Date: 2022-05-18 17:26:41
4
- * @LastEditors: shiguo
5
- * @LastEditTime: 2023-09-27 15:12:59
6
- * @FilePath: /@aks-dev/easyui/lib/AnimationModal/index.d.ts
7
- */
8
- import { StyleProp, ViewStyle } from 'react-native';
9
-
10
-
11
- export type AnimationModalProps = {
12
- children: React.ReactNode;
13
- /**
14
- * 动画方向,默认 'from-bottom'
15
- * center-in 动画暂未实现
16
- * @deprecated
17
- */
18
- animationType?: 'from-bottom' | 'center-in';
19
- /**
20
- * 是否有遮罩,默认没有
21
- */
22
- mask?: boolean;
23
- style?:Pick<StyleProp<ViewStyle>,'backgroundColor'>;
24
- }
25
-
26
-
27
- declare namespace AnimationModalProps {
28
- type RefAttributes = {
29
- show: () => RefAttributes;
30
- hide: () => RefAttributes;
31
- setData: (data?: any) => RefAttributes;
32
- getData: () => any;
33
- }
34
- }
35
-
36
-
37
-
38
- export declare const AnimationModal: React.ForwardRefExoticComponent<
39
- React.PropsWithoutRef<AnimationModalProps>
40
- & React.RefAttributes<AnimationModalProps.RefAttributes>
41
- >;