mrxy-yk 0.0.1-beta.11

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 (236) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +34 -0
  3. package/dist/@type/components/a-map-canvas/index.d.ts +1 -0
  4. package/dist/@type/components/adaptive-box/AdaptiveBox.d.ts +42 -0
  5. package/dist/@type/components/coordinate-pickup/CoordinatePickup.d.ts +29 -0
  6. package/dist/@type/components/drag-drop-box/DragDropBox.d.ts +33 -0
  7. package/dist/@type/components/drag-drop-container/DragDropContainer.d.ts +39 -0
  8. package/dist/@type/components/drag-drop-container/type.d.ts +3 -0
  9. package/dist/@type/components/echarts-canvas/EChartsCanvas.d.ts +21 -0
  10. package/dist/@type/components/in-body/InBody.d.ts +22 -0
  11. package/dist/@type/components/index.d.ts +12 -0
  12. package/dist/@type/components/position-anchor/PositionAnchor.d.ts +23 -0
  13. package/dist/@type/components/progress-bar/ProgressBar.d.ts +35 -0
  14. package/dist/@type/components/progress-bar/type.d.ts +5 -0
  15. package/dist/@type/components/progress-ring/ProgressRing.d.ts +22 -0
  16. package/dist/@type/components/scroll-container/ScrollContainer.d.ts +35 -0
  17. package/dist/@type/components/show-log/ShowLog.d.ts +25 -0
  18. package/dist/@type/components/ys-video/@type/index.d.ts +151 -0
  19. package/dist/@type/components/ys-video/YsVideo.d.ts +18 -0
  20. package/dist/@type/components/ys-video/components/BtnLineRec.d.ts +7 -0
  21. package/dist/@type/components/ys-video/type.d.ts +9 -0
  22. package/dist/@type/config/index.d.ts +23 -0
  23. package/dist/@type/directive/index.d.ts +1 -0
  24. package/dist/@type/directive/ref-height/index.d.ts +3 -0
  25. package/dist/@type/directive/ref-height/type.d.ts +11 -0
  26. package/dist/@type/directive/table-scroll-carousel/index.d.ts +3 -0
  27. package/dist/@type/element-plus/components/attrs.d.ts +2 -0
  28. package/dist/@type/element-plus/components/date-picker/DatePicker.d.ts +16 -0
  29. package/dist/@type/element-plus/components/date-picker/index.d.ts +22 -0
  30. package/dist/@type/element-plus/components/date-picker/type.d.ts +17 -0
  31. package/dist/@type/element-plus/components/empty/Empty.d.ts +31 -0
  32. package/dist/@type/element-plus/components/empty/config.d.ts +24 -0
  33. package/dist/@type/element-plus/components/empty/hooks/index.d.ts +2 -0
  34. package/dist/@type/element-plus/components/empty/hooks/type.d.ts +12 -0
  35. package/dist/@type/element-plus/components/empty/type.d.ts +9 -0
  36. package/dist/@type/element-plus/components/form-dialog/FormDialog.d.ts +400 -0
  37. package/dist/@type/element-plus/components/form-dialog/type.d.ts +4 -0
  38. package/dist/@type/element-plus/components/images/Images.d.ts +16 -0
  39. package/dist/@type/element-plus/components/images/index.d.ts +9 -0
  40. package/dist/@type/element-plus/components/index.d.ts +9 -0
  41. package/dist/@type/element-plus/components/pagination/Pagination.d.ts +18 -0
  42. package/dist/@type/element-plus/components/table-column/TableColumn.d.ts +27 -0
  43. package/dist/@type/element-plus/components/upload/accept/index.d.ts +1 -0
  44. package/dist/@type/element-plus/components/upload/index.d.ts +42 -0
  45. package/dist/@type/element-plus/components/upload/select-file/SelectFile.d.ts +822 -0
  46. package/dist/@type/element-plus/components/upload/upload-files/UploadFiles.d.ts +844 -0
  47. package/dist/@type/element-plus/components/upload/upload-images/UploadImages.d.ts +842 -0
  48. package/dist/@type/element-plus/hooks/dialog/index.d.ts +2 -0
  49. package/dist/@type/element-plus/hooks/dialog/type.d.ts +20 -0
  50. package/dist/@type/element-plus/hooks/form/index.d.ts +2 -0
  51. package/dist/@type/element-plus/hooks/form/type.d.ts +45 -0
  52. package/dist/@type/element-plus/hooks/form-dialog/index.d.ts +2 -0
  53. package/dist/@type/element-plus/hooks/form-dialog/type.d.ts +70 -0
  54. package/dist/@type/element-plus/hooks/index.d.ts +5 -0
  55. package/dist/@type/element-plus/hooks/table-sort/index.d.ts +20 -0
  56. package/dist/@type/element-plus/hooks/table-sort/type.d.ts +21 -0
  57. package/dist/@type/element-plus/index.d.ts +2 -0
  58. package/dist/@type/element-plus/type.d.ts +15 -0
  59. package/dist/@type/element-plus/utils/form-rule/index.d.ts +4 -0
  60. package/dist/@type/element-plus/utils/form-rule/rule.d.ts +22 -0
  61. package/dist/@type/element-plus/utils/form-rule/type.d.ts +14 -0
  62. package/dist/@type/element-plus/utils/index.d.ts +2 -0
  63. package/dist/@type/element-plus/utils/table-util/index.d.ts +25 -0
  64. package/dist/@type/entity/BigFloat.d.ts +48 -0
  65. package/dist/@type/entity/Pages.d.ts +9 -0
  66. package/dist/@type/entity/RejectError.d.ts +24 -0
  67. package/dist/@type/entity/index.d.ts +3 -0
  68. package/dist/@type/hooks/index.d.ts +1 -0
  69. package/dist/@type/hooks/table-search/index.d.ts +3 -0
  70. package/dist/@type/hooks/table-search/type.d.ts +54 -0
  71. package/dist/@type/icons/index.d.ts +2 -0
  72. package/dist/@type/index.d.ts +13 -0
  73. package/dist/@type/resolver/index.d.ts +3 -0
  74. package/dist/@type/type.d.ts +11 -0
  75. package/dist/@type/typings.d.ts +20 -0
  76. package/dist/@type/utils/amap/@type/AMap.d.ts +24 -0
  77. package/dist/@type/utils/amap/@type/Bounds.d.ts +18 -0
  78. package/dist/@type/utils/amap/@type/Control.d.ts +19 -0
  79. package/dist/@type/utils/amap/@type/Event.d.ts +11 -0
  80. package/dist/@type/utils/amap/@type/Icon.d.ts +12 -0
  81. package/dist/@type/utils/amap/@type/InfoWindow.d.ts +40 -0
  82. package/dist/@type/utils/amap/@type/LngLat.d.ts +34 -0
  83. package/dist/@type/utils/amap/@type/Map.d.ts +218 -0
  84. package/dist/@type/utils/amap/@type/Marker.d.ts +137 -0
  85. package/dist/@type/utils/amap/@type/MarkerCluster.d.ts +65 -0
  86. package/dist/@type/utils/amap/@type/MoveAnimation.d.ts +33 -0
  87. package/dist/@type/utils/amap/@type/Pixel.d.ts +11 -0
  88. package/dist/@type/utils/amap/@type/Polyline.d.ts +80 -0
  89. package/dist/@type/utils/amap/@type/Size.d.ts +9 -0
  90. package/dist/@type/utils/amap/@type/index.d.ts +23 -0
  91. package/dist/@type/utils/amap/@type/other.d.ts +11 -0
  92. package/dist/@type/utils/amap/index.d.ts +3 -0
  93. package/dist/@type/utils/amap/type.d.ts +21 -0
  94. package/dist/@type/utils/amap/utils/coordinates.d.ts +24 -0
  95. package/dist/@type/utils/amap/utils/index.d.ts +12 -0
  96. package/dist/@type/utils/amap/utils/type.d.ts +4 -0
  97. package/dist/@type/utils/echarts/hooks/index.d.ts +76 -0
  98. package/dist/@type/utils/echarts/index.d.ts +3 -0
  99. package/dist/@type/utils/echarts/modules/coordinate/basic.d.ts +27 -0
  100. package/dist/@type/utils/echarts/modules/coordinate/cartesian.d.ts +25 -0
  101. package/dist/@type/utils/echarts/modules/coordinate/polar.d.ts +14 -0
  102. package/dist/@type/utils/echarts/modules/index.d.ts +5 -0
  103. package/dist/@type/utils/echarts/modules/series/bar.d.ts +16 -0
  104. package/dist/@type/utils/echarts/modules/series/line.d.ts +16 -0
  105. package/dist/@type/utils/echarts/modules/series/pie.d.ts +28 -0
  106. package/dist/@type/utils/echarts/modules/type.d.ts +83 -0
  107. package/dist/@type/utils/echarts/type.d.ts +8 -0
  108. package/dist/@type/utils/echarts/utils/assignOption.d.ts +7 -0
  109. package/dist/@type/utils/echarts/utils/index.d.ts +27 -0
  110. package/dist/@type/utils/fn-periodically/FnBatchPeriodically.d.ts +32 -0
  111. package/dist/@type/utils/fn-periodically/FnPeriodically.d.ts +37 -0
  112. package/dist/@type/utils/fn-periodically/index.d.ts +2 -0
  113. package/dist/@type/utils/fn-periodically/type.d.ts +30 -0
  114. package/dist/@type/utils/index.d.ts +6 -0
  115. package/dist/@type/utils/match-unit/dataset.d.ts +8 -0
  116. package/dist/@type/utils/match-unit/index.d.ts +10 -0
  117. package/dist/@type/utils/match-unit/type.d.ts +39 -0
  118. package/dist/@type/utils/mitt/hooks/inject-events/index.d.ts +7 -0
  119. package/dist/@type/utils/mitt/hooks/inject-events/type.d.ts +9 -0
  120. package/dist/@type/utils/prototype/index.d.ts +5 -0
  121. package/dist/@type/utils/prototype/lib/ArrayUtil.d.ts +87 -0
  122. package/dist/@type/utils/prototype/lib/ComponentUtil.d.ts +18 -0
  123. package/dist/@type/utils/prototype/lib/FileUtil.d.ts +19 -0
  124. package/dist/@type/utils/prototype/lib/NumberUtil.d.ts +9 -0
  125. package/dist/@type/utils/prototype/lib/ObjectUtil.d.ts +152 -0
  126. package/dist/@type/utils/prototype/lib/PromiseUtil.d.ts +7 -0
  127. package/dist/@type/utils/prototype/type.d.ts +28 -0
  128. package/dist/@type/utils/sandbox/Sandbox.d.ts +25 -0
  129. package/dist/@type/utils/transition-fade/index.d.ts +32 -0
  130. package/dist/@type/utils/transition-fade/type.d.ts +6 -0
  131. package/dist/_virtual/_plugin-vue_export-helper.es.js +10 -0
  132. package/dist/components/adaptive-box/AdaptiveBox.vue.es.js +7 -0
  133. package/dist/components/adaptive-box/AdaptiveBox.vue.es2.js +170 -0
  134. package/dist/components/coordinate-pickup/CoordinatePickup.vue.es.js +10 -0
  135. package/dist/components/coordinate-pickup/CoordinatePickup.vue.es2.js +302 -0
  136. package/dist/components/drag-drop-box/DragDropBox.vue.es.js +7 -0
  137. package/dist/components/drag-drop-box/DragDropBox.vue.es2.js +59 -0
  138. package/dist/components/drag-drop-container/DragDropContainer.vue.es.js +7 -0
  139. package/dist/components/drag-drop-container/DragDropContainer.vue.es2.js +113 -0
  140. package/dist/components/echarts-canvas/EChartsCanvas.vue.es.js +7 -0
  141. package/dist/components/echarts-canvas/EChartsCanvas.vue.es2.js +73 -0
  142. package/dist/components/in-body/InBody.vue.es.js +24 -0
  143. package/dist/components/in-body/InBody.vue.es2.js +4 -0
  144. package/dist/components/index.es.js +26 -0
  145. package/dist/components/position-anchor/PositionAnchor.vue.es.js +7 -0
  146. package/dist/components/position-anchor/PositionAnchor.vue.es2.js +22 -0
  147. package/dist/components/progress-bar/ProgressBar.vue.es.js +7 -0
  148. package/dist/components/progress-bar/ProgressBar.vue.es2.js +126 -0
  149. package/dist/components/progress-ring/ProgressRing.vue.es.js +7 -0
  150. package/dist/components/progress-ring/ProgressRing.vue.es2.js +87 -0
  151. package/dist/components/scroll-container/ScrollContainer.vue.es.js +7 -0
  152. package/dist/components/scroll-container/ScrollContainer.vue.es2.js +89 -0
  153. package/dist/components/show-log/ShowLog.vue.es.js +7 -0
  154. package/dist/components/show-log/ShowLog.vue.es2.js +61 -0
  155. package/dist/components/ys-video/YsVideo.vue.es.js +7 -0
  156. package/dist/components/ys-video/YsVideo.vue.es2.js +122 -0
  157. package/dist/components/ys-video/components/BtnLineRec.vue.es.js +7 -0
  158. package/dist/components/ys-video/components/BtnLineRec.vue.es2.js +57 -0
  159. package/dist/components/ys-video/images/btn-play.png.es.js +4 -0
  160. package/dist/config/index.es.js +16 -0
  161. package/dist/directive/index.es.js +4 -0
  162. package/dist/directive/ref-height/index.es.js +49 -0
  163. package/dist/element-plus/components/date-picker/DatePicker.vue.es.js +107 -0
  164. package/dist/element-plus/components/date-picker/DatePicker.vue.es2.js +4 -0
  165. package/dist/element-plus/components/date-picker/index.es.js +213 -0
  166. package/dist/element-plus/components/empty/Empty.vue.es.js +92 -0
  167. package/dist/element-plus/components/empty/Empty.vue.es3.js +5 -0
  168. package/dist/element-plus/components/empty/config.es.js +10 -0
  169. package/dist/element-plus/components/empty/hooks/index.es.js +24 -0
  170. package/dist/element-plus/components/form-dialog/FormDialog.vue.es.js +135 -0
  171. package/dist/element-plus/components/form-dialog/FormDialog.vue.es2.js +4 -0
  172. package/dist/element-plus/components/images/Images.vue.es.js +7 -0
  173. package/dist/element-plus/components/images/Images.vue.es2.js +93 -0
  174. package/dist/element-plus/components/images/index.es.js +10 -0
  175. package/dist/element-plus/components/index.es.js +21 -0
  176. package/dist/element-plus/components/pagination/Pagination.vue.es.js +7 -0
  177. package/dist/element-plus/components/pagination/Pagination.vue.es2.js +66 -0
  178. package/dist/element-plus/components/table-column/TableColumn.vue.es.js +34 -0
  179. package/dist/element-plus/components/table-column/TableColumn.vue.es2.js +4 -0
  180. package/dist/element-plus/components/upload/accept/index.es.js +12 -0
  181. package/dist/element-plus/components/upload/index.es.js +35 -0
  182. package/dist/element-plus/components/upload/select-file/SelectFile.vue.es.js +7 -0
  183. package/dist/element-plus/components/upload/select-file/SelectFile.vue.es2.js +66 -0
  184. package/dist/element-plus/components/upload/upload-files/UploadFiles.vue.es.js +7 -0
  185. package/dist/element-plus/components/upload/upload-files/UploadFiles.vue.es2.js +204 -0
  186. package/dist/element-plus/components/upload/upload-images/UploadImages.vue.es.js +7 -0
  187. package/dist/element-plus/components/upload/upload-images/UploadImages.vue.es2.js +212 -0
  188. package/dist/element-plus/hooks/dialog/index.es.js +44 -0
  189. package/dist/element-plus/hooks/form/index.es.js +45 -0
  190. package/dist/element-plus/hooks/form-dialog/index.es.js +53 -0
  191. package/dist/element-plus/hooks/table-sort/index.es.js +30 -0
  192. package/dist/element-plus/index.es.js +51 -0
  193. package/dist/element-plus/utils/form-rule/rule.es.js +107 -0
  194. package/dist/element-plus/utils/table-util/index.es.js +56 -0
  195. package/dist/entity/BigFloat.es.js +102 -0
  196. package/dist/entity/Pages.es.js +11 -0
  197. package/dist/entity/RejectError.es.js +35 -0
  198. package/dist/entity/index.es.js +8 -0
  199. package/dist/hooks/index.es.js +4 -0
  200. package/dist/hooks/table-search/index.es.js +72 -0
  201. package/dist/icons/images/Image.svg.es.js +4 -0
  202. package/dist/icons/images/ImageError.svg.es.js +4 -0
  203. package/dist/icons/index.es.js +12 -0
  204. package/dist/index.es.js +111 -0
  205. package/dist/mrxy-yk.css +1 -0
  206. package/dist/resolver/index.es.js +24 -0
  207. package/dist/styles/plugins/colors/index.scss +52 -0
  208. package/dist/styles/plugins/colors/var.scss +77 -0
  209. package/dist/styles/plugins/template.scss +37 -0
  210. package/dist/utils/amap/index.es.js +21 -0
  211. package/dist/utils/amap/utils/coordinates.es.js +61 -0
  212. package/dist/utils/amap/utils/index.es.js +39 -0
  213. package/dist/utils/echarts/hooks/index.es.js +32 -0
  214. package/dist/utils/echarts/modules/coordinate/basic.es.js +103 -0
  215. package/dist/utils/echarts/modules/coordinate/cartesian.es.js +79 -0
  216. package/dist/utils/echarts/modules/series/bar.es.js +43 -0
  217. package/dist/utils/echarts/modules/series/line.es.js +47 -0
  218. package/dist/utils/echarts/modules/series/pie.es.js +126 -0
  219. package/dist/utils/echarts/utils/assignOption.es.js +40 -0
  220. package/dist/utils/echarts/utils/index.es.js +99 -0
  221. package/dist/utils/fn-periodically/FnBatchPeriodically.es.js +70 -0
  222. package/dist/utils/fn-periodically/FnPeriodically.es.js +85 -0
  223. package/dist/utils/index.es.js +49 -0
  224. package/dist/utils/match-unit/dataset.es.js +143 -0
  225. package/dist/utils/match-unit/index.es.js +56 -0
  226. package/dist/utils/mitt/hooks/inject-events/index.es.js +27 -0
  227. package/dist/utils/prototype/lib/ArrayUtil.es.js +115 -0
  228. package/dist/utils/prototype/lib/ComponentUtil.es.js +45 -0
  229. package/dist/utils/prototype/lib/NumberUtil.es.js +17 -0
  230. package/dist/utils/prototype/lib/ObjectUtil.es.js +277 -0
  231. package/dist/utils/prototype/lib/PromiseUtil.es.js +18 -0
  232. package/dist/utils/transition-fade/index.es.js +79 -0
  233. package/global.d.ts +55 -0
  234. package/package.json +134 -0
  235. package/web-types-mr.json +923 -0
  236. package/web-types-yk.json +923 -0
@@ -0,0 +1,19 @@
1
+ export declare class FileUtil {
2
+ /**
3
+ * 通过地址下载文件
4
+ * @param href
5
+ * @param fileName
6
+ */
7
+ static downloadByHref(href: string, fileName: string): void;
8
+ /**
9
+ * 通过File对象下载文件
10
+ * @param file
11
+ */
12
+ static downloadByFile(file: File): void;
13
+ /**
14
+ * 将多个File对象压缩成zip并下载
15
+ * @param files
16
+ * @param zipFileName
17
+ */
18
+ static downloadZipByFiles(files: File[], zipFileName: string): Promise<void>;
19
+ }
@@ -0,0 +1,9 @@
1
+ export declare class NumberUtil {
2
+ /**
3
+ * 保留最大小数位数
4
+ * @param value
5
+ * @param fractionDigits
6
+ */
7
+ static toFixed(value: string | number, fractionDigits: number): number;
8
+ static formatEnUs(value: string | number): string;
9
+ }
@@ -0,0 +1,152 @@
1
+ import { ObjectUtilNamespace as O } from '../type';
2
+ export declare class ObjectUtil {
3
+ /**
4
+ * 限制值在范围之间
5
+ * @param value
6
+ * @param min
7
+ * @param max
8
+ * @param cycle 值溢出时是否从对向开始计数,如小于最小值时返回最大值
9
+ */
10
+ static toBetween(value: number, min: number, max: number, cycle?: boolean): number;
11
+ /**
12
+ * 立即执行函数表达式(Immediately Invoked Function Expression,简称 IIFE)。
13
+ * 立即执行函数
14
+ * ``` ts
15
+ * // 解决表达式容易和前一行的代码合并的问题,例如以下代码就会报错
16
+ * const arr = []
17
+ * (function() {
18
+ * // 代码逻辑
19
+ * })();
20
+ * ```
21
+ * @param fn
22
+ */
23
+ static iiFn<T>(fn: {
24
+ (): T;
25
+ }): T;
26
+ /**
27
+ * 立即执行函数
28
+ * 同`iiFn`,无返回值函数
29
+ * @param fn
30
+ */
31
+ static iiFnVoid(fn: {
32
+ (): any;
33
+ }): void;
34
+ /**
35
+ * 复制文本到粘贴板
36
+ * @param text
37
+ */
38
+ static copyToClipboard(text: string): Promise<void>;
39
+ /**
40
+ * 深层循环,可用于代替一部分递归的使用
41
+ * 常见数据处理:
42
+ * 双数组合并成一个children字段
43
+ * ``` ts
44
+ * deepForEach([{ groupList: [], deviceList: [] }], (item, resolve, parent) => {
45
+ * if (parent) parent.children.unshift(item)
46
+ * item.children = [...item.deviceList]
47
+ * if (item.groupList.length) resolve(item.groupList.reverse())
48
+ * })
49
+ * ```
50
+ */
51
+ static deepForEach<T = any, P = T, R = T>(arraySource: T[], callback: O.DeepForEachEachCallback<T, P>): R[];
52
+ /**
53
+ * 前缘防抖 - 立即触发,多次调用触发第一次
54
+ * @param fn
55
+ * @param delay
56
+ */
57
+ static leadingDebounce<T extends any[], R, F extends {
58
+ (...args: T): void;
59
+ }>(fn: F, delay?: number): F;
60
+ /**
61
+ * 延迟
62
+ * @param delay
63
+ */
64
+ static sleep(delay: number): Promise<void>;
65
+ /**
66
+ * 防抖 - 延迟触发,多次调用触发最后一次
67
+ * @param fn
68
+ * @param delay
69
+ */
70
+ static debounce<T extends any[], F extends {
71
+ (...args: T): void;
72
+ }>(fn: F, delay?: number): F;
73
+ /**
74
+ * 节流 - 触发后一段时间内不会再次触发
75
+ * @param fn
76
+ * @param delay
77
+ */
78
+ static throttle<T extends any[], F extends {
79
+ (...args: T): void;
80
+ }>(fn: F, delay?: number): F;
81
+ /**
82
+ * 根据地址获取源数据中的值
83
+ * @param source
84
+ * @param address
85
+ * @param char
86
+ */
87
+ static getAttr<T = unknown>(source: unknown, address: string, char?: string): T | undefined;
88
+ /**
89
+ * 判断参数是否为null|undefined|''
90
+ * @param value
91
+ */
92
+ static isNotEmpty(value: unknown): boolean;
93
+ /**
94
+ * 判断参数是否为null|undefined|''
95
+ * @param value
96
+ */
97
+ static isEmpty(value: unknown): boolean;
98
+ /**
99
+ * 如果value不为空返回value否则返回arg
100
+ * @param value
101
+ * @param arg
102
+ */
103
+ static isEmptyToVal<T, P>(value: T, arg: P): T | P;
104
+ /**
105
+ * 根据source更新target中的属性值
106
+ * @param target
107
+ * @param source
108
+ * @param template
109
+ */
110
+ static updateVal(target: Record<string, unknown>, source: Record<string, unknown>, template?: Record<string, unknown>): void;
111
+ /**
112
+ * 初始化对象数据
113
+ * @param target
114
+ * @param source
115
+ */
116
+ static initClassVal<T>(target: T, source: Partial<T>): void;
117
+ /**
118
+ * 深度克隆 - 不会拷贝函数,不能拷贝自引用的对象,无法正确拷贝非JSON的对象如Date
119
+ * 深度:√
120
+ * 自引用:√
121
+ * 非JSON对象:√
122
+ * 函数:Error
123
+ * @param arg
124
+ */
125
+ static copy<T>(arg: T): T;
126
+ /**
127
+ * 将对象转成JSON对象
128
+ * @param arg
129
+ */
130
+ static toJSON<T = any>(arg: T): T;
131
+ /**
132
+ * 合并两个对象
133
+ * @param target
134
+ * @param source
135
+ * @param option
136
+ */
137
+ static assignDeep<T, S>(target: T, source: S, option?: O.AssignDeepOption): T & S;
138
+ /**
139
+ * assignDeep 的递归函数
140
+ * @param target
141
+ * @param source
142
+ * @param option
143
+ * @private
144
+ */
145
+ private static _assignDeep_;
146
+ static isBoolean(arg: unknown): arg is boolean;
147
+ static isString(arg: unknown): arg is string;
148
+ static isNumber(arg: unknown): arg is number;
149
+ static isObject(arg: unknown): arg is Record<string, unknown>;
150
+ static isDate(arg: unknown): arg is Date;
151
+ static isUndefined(arg: unknown): arg is undefined;
152
+ }
@@ -0,0 +1,7 @@
1
+ export declare class PromiseUtil {
2
+ /**
3
+ * 安全的使用 Promise await,捕获catch的错误,避免使用await的时候报错影响业务
4
+ * @param promise
5
+ */
6
+ static safe<T, K = any>(promise: Promise<T>): Promise<[T?, K?]>;
7
+ }
@@ -0,0 +1,28 @@
1
+ import { FunctionalComponent, SVGAttributes } from 'vue';
2
+ export namespace ObjectUtilNamespace {
3
+ export type AssignDeepOption = {
4
+ // deep: 允许添加新的属性,
5
+ deep?: boolean,
6
+ // object: 深度合并对象,
7
+ object?: boolean,
8
+ // array: 深度合并数组
9
+ array?: boolean
10
+ }
11
+
12
+ // 添加到下一次的函数类型
13
+ export type DeepForEachResolveFn<T, P = T> = { (children: T[], parent?: P): void }
14
+ // 循环每一项的回调函数
15
+ export type DeepForEachEachCallback<T, P = T> = {
16
+ (item: T, resolve: DeepForEachResolveFn<T, P>, parent: P, level: number): void
17
+ }
18
+ // 内部的循环对象
19
+ export type DeepForEachCycle<T, P> = { value: T, parent: P, level: number }
20
+ }
21
+
22
+ export namespace ArrayUtilNamespace {
23
+ export type ReduceCallbackFn<T, R> = { (previousValue: R, currentValue: T, currentIndex: number, array: T[]): R | void }
24
+ }
25
+
26
+ export namespace ComponentUtilNamespace {
27
+ export type IconsLibrary = Record<string, FunctionalComponent<SVGAttributes>>
28
+ }
@@ -0,0 +1,25 @@
1
+ /**
2
+ * 自定义 沙箱环境
3
+ */
4
+ export declare class Sandbox<SP> {
5
+ sandboxProxy: SP;
6
+ constructor(option: SP);
7
+ static init(): void;
8
+ /**
9
+ * 在沙箱中运行代码
10
+ * @param code
11
+ */
12
+ run(code: string): void;
13
+ /**
14
+ * 在沙箱中运行代码并获取结果
15
+ * @param code
16
+ */
17
+ get(code: string): any;
18
+ /**
19
+ * 深度代理
20
+ * @param target
21
+ * @param handler
22
+ * @private
23
+ */
24
+ private deepProxy;
25
+ }
@@ -0,0 +1,32 @@
1
+ import { TransitionConstructorOptionType } from './type';
2
+ /**
3
+ * 控制Dom位置过渡,因为主要使用getBoundingClientRect获取位置,
4
+ * 所以不支持在缩放下使用
5
+ */
6
+ export declare class TransitionFade {
7
+ private elList;
8
+ private elRectMap;
9
+ private readonly duration;
10
+ constructor(option?: TransitionConstructorOptionType);
11
+ private readonly autoUpDateElList;
12
+ private readonly updateElListHook;
13
+ /**
14
+ * 更新ElList
15
+ * @private
16
+ */
17
+ private updateElList;
18
+ /**
19
+ * DOM状态修改之前需要先执行ready记录当前状态
20
+ */
21
+ ready(): Promise<void>;
22
+ /**
23
+ * DOM状态修改后执行动画,如果ElList没有新增或者减少可以连续使用go函数,不需要每次执行ready函数
24
+ * @param duration
25
+ */
26
+ go(duration?: number): void;
27
+ /**
28
+ * 手动设置ElList
29
+ * @param elementList
30
+ */
31
+ setElList(elementList: Element[] | HTMLCollection): void;
32
+ }
@@ -0,0 +1,6 @@
1
+ export type TransitionConstructorOptionType = {
2
+ // 自动更新ElList
3
+ updateElListHook?: { (): Element[] | HTMLCollection },
4
+ // 动画过度时间
5
+ duration?: number
6
+ }
@@ -0,0 +1,10 @@
1
+ var _export_sfc = (sfc, props) => {
2
+ const target = sfc.__vccOpts || sfc;
3
+ for (const [key, val] of props) {
4
+ target[key] = val;
5
+ }
6
+ return target;
7
+ };
8
+ export {
9
+ _export_sfc as default
10
+ };
@@ -0,0 +1,7 @@
1
+ import _sfc_main from "./AdaptiveBox.vue.es2.js";
2
+ /* empty css */
3
+ import _export_sfc from "../../_virtual/_plugin-vue_export-helper.es.js";
4
+ var AdaptiveBox = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-78619194"]]);
5
+ export {
6
+ AdaptiveBox as default
7
+ };
@@ -0,0 +1,170 @@
1
+ import { defineComponent, onMounted, onBeforeUnmount, useTemplateRef, ref, createElementBlock, openBlock, createElementVNode, normalizeStyle, unref, renderSlot } from "vue";
2
+ import { ObjectUtil } from "../../utils/prototype/lib/ObjectUtil.es.js";
3
+ const _hoisted_1 = { class: "adaptive-box" };
4
+ const errorValue = 0.01;
5
+ var _sfc_main = /* @__PURE__ */ defineComponent({
6
+ __name: "AdaptiveBox",
7
+ props: {
8
+ reference: { default: void 0 },
9
+ minWidth: { default: -Infinity },
10
+ maxWidth: { default: Infinity },
11
+ updateWidth: { type: Boolean, default: false },
12
+ observeNodeUpdate: { type: Boolean, default: false },
13
+ mode: { default: "equal-width" }
14
+ },
15
+ setup(__props, { expose: __expose }) {
16
+ const props = __props;
17
+ onMounted(function() {
18
+ initReference();
19
+ resize();
20
+ initResizeMonitor();
21
+ });
22
+ onBeforeUnmount(function() {
23
+ removeResizeMonitor();
24
+ });
25
+ let _reference = null;
26
+ const adaptiveBoxRef = useTemplateRef("adaptiveBoxRef");
27
+ const adaptiveContentRef = useTemplateRef("adaptiveContentRef");
28
+ function initReference() {
29
+ _reference = props.reference ?? window;
30
+ resizeHandel = resizeType[props.mode];
31
+ }
32
+ const resizeType = {
33
+ "equal-width": resizeIsEqualWidth,
34
+ contain: resizeIsContain,
35
+ "full-height": resizeIsFullHeight
36
+ };
37
+ let resizeHandel = null;
38
+ function resize() {
39
+ if (resizeHandel) resizeHandel();
40
+ }
41
+ function resizeIsEqualWidth() {
42
+ const referenceWidth = isWindow(_reference) ? _reference.innerWidth : _reference.offsetWidth;
43
+ const $content = adaptiveContentRef.value;
44
+ let scale = referenceWidth / $content.offsetWidth;
45
+ let width = $content.offsetWidth * scale;
46
+ if (props.minWidth && width < props.minWidth) {
47
+ scale = props.minWidth / $content.scrollWidth;
48
+ width = props.minWidth;
49
+ }
50
+ if (props.maxWidth && width > props.maxWidth) {
51
+ scale = props.maxWidth / $content.scrollWidth;
52
+ width = props.maxWidth;
53
+ }
54
+ if (Math.abs(1 - scale) < errorValue) scale = 1;
55
+ $content.style.transform = `scale(${scale})`;
56
+ const height = $content.offsetHeight * scale;
57
+ adaptiveBoxRef.value.style.height = `${height}px`;
58
+ if (props.updateWidth) {
59
+ adaptiveBoxRef.value.style.width = `${width}px`;
60
+ }
61
+ }
62
+ function resizeIsContain() {
63
+ let referenceWidth;
64
+ let referenceHeight;
65
+ if (isWindow(_reference)) {
66
+ referenceWidth = _reference.innerWidth;
67
+ referenceHeight = _reference.innerHeight;
68
+ } else {
69
+ referenceWidth = _reference.offsetWidth;
70
+ referenceHeight = _reference.offsetHeight;
71
+ }
72
+ const $content = adaptiveContentRef.value;
73
+ let scale = referenceWidth / $content.offsetWidth;
74
+ let height = $content.offsetHeight * scale;
75
+ let width = $content.offsetWidth * scale;
76
+ if (height > referenceHeight) {
77
+ scale = referenceHeight / $content.offsetHeight;
78
+ height = $content.offsetHeight * scale;
79
+ width = $content.offsetWidth * scale;
80
+ }
81
+ if (Math.abs(1 - scale) < errorValue) scale = 1;
82
+ $content.style.transform = `scale(${scale})`;
83
+ adaptiveBoxRef.value.style.height = `${height}px`;
84
+ adaptiveBoxRef.value.style.width = `${width}px`;
85
+ }
86
+ const fullHeight = ref("");
87
+ function resizeIsFullHeight() {
88
+ let referenceWidth;
89
+ let referenceHeight;
90
+ if (isWindow(_reference)) {
91
+ referenceWidth = _reference.innerWidth;
92
+ referenceHeight = _reference.innerHeight;
93
+ } else {
94
+ referenceWidth = _reference.offsetWidth;
95
+ referenceHeight = _reference.offsetHeight;
96
+ }
97
+ const $content = adaptiveContentRef.value;
98
+ let scale = referenceWidth / $content.offsetWidth;
99
+ let width = $content.offsetWidth * scale;
100
+ if (props.minWidth && width < props.minWidth) {
101
+ scale = props.minWidth / $content.scrollWidth;
102
+ width = props.minWidth;
103
+ }
104
+ if (props.maxWidth && width > props.maxWidth) {
105
+ scale = props.maxWidth / $content.scrollWidth;
106
+ width = props.maxWidth;
107
+ }
108
+ if (Math.abs(1 - scale) < errorValue) scale = 1;
109
+ $content.style.transform = `scale(${scale})`;
110
+ const height = referenceHeight / scale;
111
+ adaptiveBoxRef.value.style.height = `${referenceHeight}px`;
112
+ adaptiveContentRef.value.style.height = fullHeight.value = `${height}px`;
113
+ if (props.updateWidth) {
114
+ adaptiveBoxRef.value.style.width = `${width}px`;
115
+ }
116
+ }
117
+ function isWindow(obj) {
118
+ return obj === window;
119
+ }
120
+ function initResizeMonitor() {
121
+ if (isWindow(_reference)) window.addEventListener("resize", resize);
122
+ else loadResizeObserver();
123
+ if (props.observeNodeUpdate) observeNode();
124
+ }
125
+ function removeResizeMonitor() {
126
+ window.removeEventListener("resize", resize);
127
+ if (observer) observer.disconnect();
128
+ if (resizeObserver) resizeObserver.disconnect();
129
+ }
130
+ let resizeObserver = null;
131
+ function loadResizeObserver() {
132
+ if (!isWindow(_reference)) {
133
+ resizeObserver = new ResizeObserver(ObjectUtil.debounce(resize, 50));
134
+ resizeObserver.observe(_reference);
135
+ }
136
+ }
137
+ let observer = null;
138
+ function observeNode() {
139
+ const config = {
140
+ attributes: true,
141
+ childList: true,
142
+ subtree: true
143
+ };
144
+ observer = new MutationObserver(resize);
145
+ observer.observe(adaptiveBoxRef.value, config);
146
+ }
147
+ __expose({ resize });
148
+ return (_ctx, _cache) => {
149
+ return openBlock(), createElementBlock("div", _hoisted_1, [
150
+ createElementVNode("div", {
151
+ ref_key: "adaptiveBoxRef",
152
+ ref: adaptiveBoxRef,
153
+ class: "adaptive-box__body"
154
+ }, [
155
+ createElementVNode("div", {
156
+ ref_key: "adaptiveContentRef",
157
+ ref: adaptiveContentRef,
158
+ class: "adaptive-box__content",
159
+ style: normalizeStyle({ "--adaptive-height": unref(fullHeight) })
160
+ }, [
161
+ renderSlot(_ctx.$slots, "default", {}, void 0, true)
162
+ ], 4)
163
+ ], 512)
164
+ ]);
165
+ };
166
+ }
167
+ });
168
+ export {
169
+ _sfc_main as default
170
+ };
@@ -0,0 +1,10 @@
1
+ import _sfc_main from "./CoordinatePickup.vue.es2.js";
2
+ /* empty css */
3
+ /* empty css */
4
+ /* empty css */
5
+ /* empty css */
6
+ import _export_sfc from "../../_virtual/_plugin-vue_export-helper.es.js";
7
+ var CoordinatePickup = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-f60f53ce"]]);
8
+ export {
9
+ CoordinatePickup as default
10
+ };