vxe-table 4.23.5 → 4.23.7

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 (482) hide show
  1. package/dist/all.esm.js +32456 -33938
  2. package/dist/style.css +4501 -1
  3. package/dist/style.mini.css +1 -0
  4. package/es/colgroup/index.d.ts +760 -0
  5. package/es/colgroup/index.js +16 -13
  6. package/es/column/index.d.ts +760 -0
  7. package/es/column/index.js +16 -13
  8. package/es/components.d.ts +9 -0
  9. package/es/components.js +29 -29
  10. package/es/grid/index.d.ts +2824 -0
  11. package/es/grid/index.js +14 -9
  12. package/es/grid/src/emits.d.ts +2 -0
  13. package/es/grid/src/emits.js +18 -15
  14. package/es/grid/src/grid.d.ts +556 -0
  15. package/es/grid/src/grid.js +1695 -1758
  16. package/es/grid/src/props.d.ts +200 -0
  17. package/es/grid/src/props.js +19 -6
  18. package/es/{vxe-grid/style.min.css → grid/style.mini.css} +1 -1
  19. package/es/index.d.ts +3 -0
  20. package/es/index.esm.js +6 -3
  21. package/es/index.js +6 -0
  22. package/es/locale/lang/ar-EG.d.ts +908 -2
  23. package/es/locale/lang/ar-EG.js +906 -903
  24. package/es/locale/lang/de-DE.d.ts +908 -2
  25. package/es/locale/lang/de-DE.js +906 -903
  26. package/es/locale/lang/en-US.d.ts +908 -2
  27. package/es/locale/lang/en-US.js +906 -903
  28. package/es/locale/lang/es-ES.d.ts +908 -2
  29. package/es/locale/lang/es-ES.js +906 -903
  30. package/es/locale/lang/fr-FR.d.ts +908 -2
  31. package/es/locale/lang/fr-FR.js +906 -903
  32. package/es/locale/lang/hu-HU.d.ts +908 -2
  33. package/es/locale/lang/hu-HU.js +906 -903
  34. package/es/locale/lang/hy-AM.d.ts +908 -2
  35. package/es/locale/lang/hy-AM.js +906 -903
  36. package/es/locale/lang/id-ID.d.ts +908 -2
  37. package/es/locale/lang/id-ID.js +906 -903
  38. package/es/locale/lang/it-IT.d.ts +908 -2
  39. package/es/locale/lang/it-IT.js +906 -903
  40. package/es/locale/lang/ja-JP.d.ts +908 -2
  41. package/es/locale/lang/ja-JP.js +906 -903
  42. package/es/locale/lang/ko-KR.d.ts +908 -2
  43. package/es/locale/lang/ko-KR.js +906 -903
  44. package/es/locale/lang/ms-MY.d.ts +908 -2
  45. package/es/locale/lang/ms-MY.js +906 -903
  46. package/es/locale/lang/nb-NO.d.ts +908 -2
  47. package/es/locale/lang/nb-NO.js +906 -903
  48. package/es/locale/lang/pt-BR.d.ts +908 -2
  49. package/es/locale/lang/pt-BR.js +906 -903
  50. package/es/locale/lang/ru-RU.d.ts +908 -2
  51. package/es/locale/lang/ru-RU.js +906 -903
  52. package/es/locale/lang/th-TH.d.ts +908 -2
  53. package/es/locale/lang/th-TH.js +906 -903
  54. package/es/locale/lang/ug-CN.d.ts +908 -2
  55. package/es/locale/lang/ug-CN.js +906 -903
  56. package/es/locale/lang/uk-UA.d.ts +908 -2
  57. package/es/locale/lang/uk-UA.js +906 -903
  58. package/es/locale/lang/uz-UZ.d.ts +908 -2
  59. package/es/locale/lang/uz-UZ.js +906 -903
  60. package/es/locale/lang/vi-VN.d.ts +908 -2
  61. package/es/locale/lang/vi-VN.js +906 -903
  62. package/es/locale/lang/zh-CHT.d.ts +908 -2
  63. package/es/locale/lang/zh-CHT.js +906 -903
  64. package/es/locale/lang/zh-CN.d.ts +908 -2
  65. package/es/locale/lang/zh-CN.js +906 -903
  66. package/es/locale/lang/zh-HK.d.ts +908 -2
  67. package/es/locale/lang/zh-HK.js +910 -2
  68. package/es/locale/lang/zh-MO.d.ts +908 -2
  69. package/es/locale/lang/zh-MO.js +910 -2
  70. package/es/locale/lang/zh-TC.d.ts +908 -0
  71. package/es/locale/lang/zh-TC.js +910 -2
  72. package/es/locale/lang/zh-TW.d.ts +908 -2
  73. package/es/locale/lang/zh-TW.js +910 -2
  74. package/es/style.css +4501 -1
  75. package/es/style.mini.css +1 -0
  76. package/es/table/index.d.ts +2672 -0
  77. package/es/table/index.js +16 -11
  78. package/es/table/module/custom/hook.d.ts +1 -0
  79. package/es/table/module/custom/hook.js +462 -483
  80. package/es/table/module/custom/panel.d.ts +17 -0
  81. package/es/table/module/custom/panel.js +1482 -1559
  82. package/es/table/module/edit/hook.d.ts +1 -0
  83. package/es/table/module/edit/hook.js +1008 -1078
  84. package/es/table/module/export/export-panel.d.ts +27 -0
  85. package/es/table/module/export/export-panel.js +523 -575
  86. package/es/table/module/export/hook.d.ts +1 -0
  87. package/es/table/module/export/hook.js +1805 -1884
  88. package/es/table/module/export/import-panel.d.ts +27 -0
  89. package/es/table/module/export/import-panel.js +244 -252
  90. package/es/table/module/export/util.d.ts +5 -0
  91. package/es/table/module/export/util.js +20 -17
  92. package/es/table/module/filter/hook.d.ts +1 -0
  93. package/es/table/module/filter/hook.js +472 -487
  94. package/es/table/module/filter/panel.d.ts +16 -0
  95. package/es/table/module/filter/panel.js +251 -275
  96. package/es/table/module/keyboard/hook.d.ts +1 -0
  97. package/es/table/module/keyboard/hook.js +445 -497
  98. package/es/table/module/menu/hook.d.ts +1 -0
  99. package/es/table/module/menu/hook.js +295 -315
  100. package/es/table/module/menu/panel.d.ts +2 -0
  101. package/es/table/module/menu/panel.js +164 -183
  102. package/es/table/module/validator/hook.d.ts +1 -0
  103. package/es/table/module/validator/hook.js +522 -571
  104. package/es/table/render/index.d.ts +1 -0
  105. package/es/table/render/index.js +1402 -1362
  106. package/es/table/src/body.d.ts +24 -0
  107. package/es/table/src/body.js +850 -865
  108. package/es/table/src/cell.d.ts +192 -0
  109. package/es/table/src/cell.js +1209 -1207
  110. package/es/table/src/column.d.ts +263 -0
  111. package/es/table/src/column.js +178 -174
  112. package/es/table/src/columnInfo.d.ts +13 -0
  113. package/es/table/src/columnInfo.js +202 -196
  114. package/es/table/src/emits.d.ts +2 -0
  115. package/es/table/src/emits.js +126 -119
  116. package/es/table/src/footer.d.ts +45 -0
  117. package/es/table/src/footer.js +336 -340
  118. package/es/table/src/group.d.ts +178 -0
  119. package/es/table/src/group.js +49 -46
  120. package/es/table/src/header.d.ts +26 -0
  121. package/es/table/src/header.js +517 -519
  122. package/es/table/src/props.d.ts +238 -0
  123. package/es/table/src/props.js +331 -328
  124. package/es/table/src/store.d.ts +6 -0
  125. package/es/table/src/store.js +9 -6
  126. package/es/table/src/table.d.ts +539 -0
  127. package/es/table/src/table.js +14061 -15071
  128. package/es/table/src/use/cell-view.d.ts +10 -0
  129. package/es/table/src/use/cell-view.js +36 -33
  130. package/es/table/src/use/index.d.ts +1 -0
  131. package/es/table/src/use/index.js +1 -1
  132. package/es/table/src/util.d.ts +74 -0
  133. package/es/table/src/util.js +1038 -1026
  134. package/es/table/style.css +1 -1
  135. package/es/table/style.mini.css +1 -0
  136. package/es/toolbar/index.d.ts +340 -0
  137. package/es/toolbar/index.js +14 -9
  138. package/es/toolbar/src/toolbar.d.ts +75 -0
  139. package/es/toolbar/src/toolbar.js +605 -613
  140. package/es/toolbar/{style.min.css → style.mini.css} +1 -1
  141. package/es/ui/index.d.ts +86 -0
  142. package/es/ui/index.js +457 -501
  143. package/es/ui/src/anime.d.ts +10 -0
  144. package/es/ui/src/anime.js +40 -40
  145. package/es/ui/src/comp.d.ts +2 -0
  146. package/es/ui/src/comp.js +5 -2
  147. package/es/ui/src/dom.d.ts +80 -0
  148. package/es/ui/src/dom.js +377 -380
  149. package/es/ui/src/log.d.ts +6 -0
  150. package/es/ui/src/log.js +18 -13
  151. package/es/ui/src/utils.d.ts +23 -0
  152. package/es/ui/src/utils.js +57 -53
  153. package/es/ui/src/vn.d.ts +7 -0
  154. package/es/ui/src/vn.js +49 -42
  155. package/es/v-x-e-table/index.d.ts +3 -0
  156. package/es/v-x-e-table/index.js +6 -3
  157. package/es/vxe-colgroup/index.d.ts +3 -0
  158. package/es/vxe-colgroup/index.js +6 -3
  159. package/es/vxe-column/index.d.ts +3 -0
  160. package/es/vxe-column/index.js +6 -3
  161. package/es/vxe-grid/index.d.ts +3 -0
  162. package/es/vxe-grid/index.js +6 -3
  163. package/{lib/grid/style/style.min.css → es/vxe-grid/style.mini.css} +1 -1
  164. package/es/vxe-table/index.d.ts +3 -0
  165. package/es/vxe-table/index.js +6 -3
  166. package/es/vxe-table/style.css +1 -1
  167. package/es/vxe-table/style.mini.css +1 -0
  168. package/es/vxe-toolbar/index.d.ts +3 -0
  169. package/es/vxe-toolbar/index.js +6 -3
  170. package/es/vxe-toolbar/{style.min.css → style.mini.css} +1 -1
  171. package/es/vxe-ui/index.d.ts +3 -0
  172. package/es/vxe-ui/index.js +6 -3
  173. package/lib/colgroup/index.js +44 -18
  174. package/lib/colgroup/style/index.js +1 -1
  175. package/lib/column/index.js +44 -18
  176. package/lib/column/style/index.js +1 -1
  177. package/lib/components.js +58 -92
  178. package/lib/grid/index.js +42 -14
  179. package/lib/grid/src/emits.js +37 -6
  180. package/lib/grid/src/grid.js +850 -1195
  181. package/lib/grid/src/props.js +27 -11
  182. package/lib/grid/style/index.js +1 -1
  183. package/lib/{vxe-grid/style/style.min.css → grid/style/style.mini.css} +1 -1
  184. package/lib/iconfont.1792979665397.ttf +0 -0
  185. package/lib/iconfont.1792979665397.woff +0 -0
  186. package/lib/iconfont.1792979665397.woff2 +0 -0
  187. package/lib/index.common.js +35 -19
  188. package/lib/index.js +37 -0
  189. package/lib/index.umd.js +30584 -24324
  190. package/lib/index.umd.min.js +3 -1
  191. package/lib/locale/ar-EG.umd.js +948 -0
  192. package/lib/locale/de-DE.umd.js +948 -0
  193. package/lib/locale/en-US.umd.js +948 -0
  194. package/lib/locale/es-ES.umd.js +948 -0
  195. package/lib/locale/fr-FR.umd.js +948 -0
  196. package/lib/locale/hu-HU.umd.js +948 -0
  197. package/lib/locale/hy-AM.umd.js +948 -0
  198. package/lib/locale/id-ID.umd.js +948 -0
  199. package/lib/locale/it-IT.umd.js +948 -0
  200. package/lib/locale/ja-JP.umd.js +948 -0
  201. package/lib/locale/ko-KR.umd.js +948 -0
  202. package/lib/locale/lang/ar-EG.js +681 -664
  203. package/lib/locale/lang/ar-EG.umd.js +913 -892
  204. package/lib/locale/lang/de-DE.js +681 -664
  205. package/lib/locale/lang/de-DE.umd.js +913 -892
  206. package/lib/locale/lang/en-US.js +678 -661
  207. package/lib/locale/lang/en-US.umd.js +913 -892
  208. package/lib/locale/lang/es-ES.js +681 -664
  209. package/lib/locale/lang/es-ES.umd.js +913 -892
  210. package/lib/locale/lang/fr-FR.js +654 -637
  211. package/lib/locale/lang/fr-FR.umd.js +913 -892
  212. package/lib/locale/lang/hu-HU.js +681 -664
  213. package/lib/locale/lang/hu-HU.umd.js +913 -892
  214. package/lib/locale/lang/hy-AM.js +681 -664
  215. package/lib/locale/lang/hy-AM.umd.js +913 -892
  216. package/lib/locale/lang/id-ID.js +681 -664
  217. package/lib/locale/lang/id-ID.umd.js +913 -892
  218. package/lib/locale/lang/it-IT.js +661 -644
  219. package/lib/locale/lang/it-IT.umd.js +912 -891
  220. package/lib/locale/lang/ja-JP.js +710 -693
  221. package/lib/locale/lang/ja-JP.umd.js +913 -892
  222. package/lib/locale/lang/ko-KR.js +681 -664
  223. package/lib/locale/lang/ko-KR.umd.js +913 -892
  224. package/lib/locale/lang/ms-MY.js +681 -664
  225. package/lib/locale/lang/ms-MY.umd.js +913 -892
  226. package/lib/locale/lang/nb-NO.js +681 -664
  227. package/lib/locale/lang/nb-NO.umd.js +913 -892
  228. package/lib/locale/lang/pt-BR.js +681 -664
  229. package/lib/locale/lang/pt-BR.umd.js +913 -892
  230. package/lib/locale/lang/ru-RU.js +690 -673
  231. package/lib/locale/lang/ru-RU.umd.js +913 -892
  232. package/lib/locale/lang/th-TH.js +681 -664
  233. package/lib/locale/lang/th-TH.umd.js +913 -892
  234. package/lib/locale/lang/ug-CN.js +681 -664
  235. package/lib/locale/lang/ug-CN.umd.js +913 -892
  236. package/lib/locale/lang/uk-UA.js +674 -657
  237. package/lib/locale/lang/uk-UA.umd.js +913 -892
  238. package/lib/locale/lang/uz-UZ.js +583 -566
  239. package/lib/locale/lang/uz-UZ.umd.js +908 -887
  240. package/lib/locale/lang/vi-VN.js +681 -664
  241. package/lib/locale/lang/vi-VN.umd.js +913 -892
  242. package/lib/locale/lang/zh-CHT.js +681 -664
  243. package/lib/locale/lang/zh-CHT.umd.js +913 -892
  244. package/lib/locale/lang/zh-CN.js +681 -664
  245. package/lib/locale/lang/zh-CN.umd.js +913 -892
  246. package/lib/locale/lang/zh-HK.js +928 -7
  247. package/lib/locale/lang/zh-HK.umd.js +945 -20
  248. package/lib/locale/lang/zh-MO.js +928 -7
  249. package/lib/locale/lang/zh-MO.umd.js +945 -20
  250. package/lib/locale/lang/zh-TC.js +928 -7
  251. package/lib/locale/lang/zh-TC.umd.js +948 -0
  252. package/lib/locale/lang/zh-TW.js +928 -7
  253. package/lib/locale/lang/zh-TW.umd.js +945 -20
  254. package/lib/locale/ms-MY.umd.js +948 -0
  255. package/lib/locale/nb-NO.umd.js +948 -0
  256. package/lib/locale/pt-BR.umd.js +948 -0
  257. package/lib/locale/ru-RU.umd.js +948 -0
  258. package/lib/locale/th-TH.umd.js +948 -0
  259. package/lib/locale/ug-CN.umd.js +948 -0
  260. package/lib/locale/uk-UA.umd.js +948 -0
  261. package/lib/locale/uz-UZ.umd.js +948 -0
  262. package/lib/locale/vi-VN.umd.js +948 -0
  263. package/lib/locale/zh-CHT.umd.js +948 -0
  264. package/lib/locale/zh-CN.umd.js +948 -0
  265. package/lib/locale/zh-HK.umd.js +948 -0
  266. package/lib/locale/zh-MO.umd.js +948 -0
  267. package/lib/locale/zh-TC.umd.js +948 -0
  268. package/lib/locale/zh-TW.umd.js +948 -0
  269. package/lib/style.css +4501 -1
  270. package/lib/style.mini.css +1 -0
  271. package/lib/table/index.js +45 -17
  272. package/lib/table/module/custom/hook.js +132 -252
  273. package/lib/table/module/custom/panel.js +919 -970
  274. package/lib/table/module/edit/hook.js +248 -618
  275. package/lib/table/module/export/export-panel.js +390 -347
  276. package/lib/table/module/export/hook.js +745 -1179
  277. package/lib/table/module/export/import-panel.js +170 -136
  278. package/lib/table/module/export/util.js +37 -14
  279. package/lib/table/module/filter/hook.js +127 -227
  280. package/lib/table/module/filter/panel.js +177 -208
  281. package/lib/table/module/keyboard/hook.js +93 -172
  282. package/lib/table/module/menu/hook.js +86 -165
  283. package/lib/table/module/menu/panel.js +176 -141
  284. package/lib/table/module/validator/hook.js +164 -271
  285. package/lib/table/render/index.js +700 -1147
  286. package/lib/table/src/body.js +426 -559
  287. package/lib/table/src/cell.js +619 -987
  288. package/lib/table/src/column.js +55 -30
  289. package/lib/table/src/columnInfo.js +88 -110
  290. package/lib/table/src/emits.js +145 -13
  291. package/lib/table/src/footer.js +181 -240
  292. package/lib/table/src/group.js +56 -34
  293. package/lib/table/src/header.js +292 -367
  294. package/lib/table/src/props.js +27 -12
  295. package/lib/table/src/store.js +25 -9
  296. package/lib/table/src/table.js +14179 -1023
  297. package/lib/table/src/use/cell-view.js +47 -37
  298. package/lib/table/src/use/index.js +17 -15
  299. package/lib/table/src/util.js +236 -337
  300. package/lib/table/style/index.js +1 -1
  301. package/lib/table/style/style.css +1 -1
  302. package/lib/table/style/style.mini.css +1 -0
  303. package/lib/toolbar/index.js +42 -14
  304. package/lib/toolbar/src/toolbar.js +271 -379
  305. package/lib/toolbar/style/index.js +1 -1
  306. package/lib/toolbar/style/{style.min.css → style.mini.css} +1 -1
  307. package/lib/ui/index.js +153 -195
  308. package/lib/ui/src/anime.js +49 -29
  309. package/lib/ui/src/comp.js +23 -6
  310. package/lib/ui/src/dom.js +114 -147
  311. package/lib/ui/src/log.js +34 -18
  312. package/lib/ui/src/utils.js +57 -45
  313. package/lib/ui/src/vn.js +60 -34
  314. package/lib/ui/style/index.js +1 -1
  315. package/lib/v-x-e-table/index.js +35 -19
  316. package/lib/vxe-colgroup/index.js +35 -19
  317. package/lib/vxe-colgroup/style/index.js +1 -1
  318. package/lib/vxe-column/index.js +35 -19
  319. package/lib/vxe-column/style/index.js +1 -1
  320. package/lib/vxe-grid/index.js +35 -19
  321. package/lib/vxe-grid/style/index.js +1 -1
  322. package/{es/grid/style.min.css → lib/vxe-grid/style/style.mini.css} +1 -1
  323. package/lib/vxe-table/index.js +35 -19
  324. package/lib/vxe-table/style/index.js +1 -1
  325. package/lib/vxe-table/style/style.css +1 -1
  326. package/lib/vxe-table/style/style.mini.css +1 -0
  327. package/lib/vxe-toolbar/index.js +35 -19
  328. package/lib/vxe-toolbar/style/index.js +1 -1
  329. package/lib/vxe-toolbar/style/{style.min.css → style.mini.css} +1 -1
  330. package/lib/vxe-ui/index.js +35 -19
  331. package/lib/vxe-ui/style/index.js +1 -1
  332. package/package.json +8 -4
  333. package/packages/locale/lang/zh-HK.ts +907 -3
  334. package/packages/locale/lang/zh-MO.ts +907 -3
  335. package/packages/locale/lang/zh-TC.ts +907 -3
  336. package/packages/locale/lang/zh-TW.ts +907 -3
  337. package/packages/ui/index.ts +1 -28
  338. package/dist/style.min.css +0 -1
  339. package/es/index.css +0 -1
  340. package/es/index.min.css +0 -1
  341. package/es/style.min.css +0 -1
  342. package/es/table/style.min.css +0 -1
  343. package/es/vxe-table/style.min.css +0 -1
  344. package/es/vxe-v-x-e-table/index.js +0 -3
  345. package/lib/colgroup/index.min.js +0 -1
  346. package/lib/column/index.min.js +0 -1
  347. package/lib/components.min.js +0 -1
  348. package/lib/grid/index.min.js +0 -1
  349. package/lib/grid/src/emits.min.js +0 -1
  350. package/lib/grid/src/grid.min.js +0 -1
  351. package/lib/grid/src/props.min.js +0 -1
  352. package/lib/index.css +0 -1
  353. package/lib/index.min.css +0 -1
  354. package/lib/locale/lang/ar-EG.d.ts +0 -2
  355. package/lib/locale/lang/ar-EG.min.js +0 -1
  356. package/lib/locale/lang/de-DE.d.ts +0 -2
  357. package/lib/locale/lang/de-DE.min.js +0 -1
  358. package/lib/locale/lang/en-US.d.ts +0 -2
  359. package/lib/locale/lang/en-US.min.js +0 -1
  360. package/lib/locale/lang/es-ES.d.ts +0 -2
  361. package/lib/locale/lang/es-ES.min.js +0 -1
  362. package/lib/locale/lang/fr-FR.d.ts +0 -2
  363. package/lib/locale/lang/fr-FR.min.js +0 -1
  364. package/lib/locale/lang/hu-HU.d.ts +0 -2
  365. package/lib/locale/lang/hu-HU.min.js +0 -1
  366. package/lib/locale/lang/hy-AM.d.ts +0 -2
  367. package/lib/locale/lang/hy-AM.min.js +0 -1
  368. package/lib/locale/lang/id-ID.d.ts +0 -2
  369. package/lib/locale/lang/id-ID.min.js +0 -1
  370. package/lib/locale/lang/it-IT.d.ts +0 -2
  371. package/lib/locale/lang/it-IT.min.js +0 -1
  372. package/lib/locale/lang/ja-JP.d.ts +0 -2
  373. package/lib/locale/lang/ja-JP.min.js +0 -1
  374. package/lib/locale/lang/ko-KR.d.ts +0 -2
  375. package/lib/locale/lang/ko-KR.min.js +0 -1
  376. package/lib/locale/lang/ms-MY.d.ts +0 -2
  377. package/lib/locale/lang/ms-MY.min.js +0 -1
  378. package/lib/locale/lang/nb-NO.d.ts +0 -2
  379. package/lib/locale/lang/nb-NO.min.js +0 -1
  380. package/lib/locale/lang/pt-BR.d.ts +0 -2
  381. package/lib/locale/lang/pt-BR.min.js +0 -1
  382. package/lib/locale/lang/ru-RU.d.ts +0 -2
  383. package/lib/locale/lang/ru-RU.min.js +0 -1
  384. package/lib/locale/lang/th-TH.d.ts +0 -2
  385. package/lib/locale/lang/th-TH.min.js +0 -1
  386. package/lib/locale/lang/ug-CN.d.ts +0 -2
  387. package/lib/locale/lang/ug-CN.min.js +0 -1
  388. package/lib/locale/lang/uk-UA.d.ts +0 -2
  389. package/lib/locale/lang/uk-UA.min.js +0 -1
  390. package/lib/locale/lang/uz-UZ.d.ts +0 -2
  391. package/lib/locale/lang/uz-UZ.min.js +0 -1
  392. package/lib/locale/lang/vi-VN.d.ts +0 -2
  393. package/lib/locale/lang/vi-VN.min.js +0 -1
  394. package/lib/locale/lang/zh-CHT.d.ts +0 -2
  395. package/lib/locale/lang/zh-CHT.min.js +0 -1
  396. package/lib/locale/lang/zh-CN.d.ts +0 -2
  397. package/lib/locale/lang/zh-CN.min.js +0 -1
  398. package/lib/locale/lang/zh-HK.d.ts +0 -2
  399. package/lib/locale/lang/zh-HK.min.js +0 -1
  400. package/lib/locale/lang/zh-MO.d.ts +0 -2
  401. package/lib/locale/lang/zh-MO.min.js +0 -1
  402. package/lib/locale/lang/zh-TC.min.js +0 -1
  403. package/lib/locale/lang/zh-TW.d.ts +0 -2
  404. package/lib/locale/lang/zh-TW.min.js +0 -1
  405. package/lib/style.min.css +0 -1
  406. package/lib/table/index.min.js +0 -1
  407. package/lib/table/module/custom/hook.min.js +0 -1
  408. package/lib/table/module/custom/panel.min.js +0 -1
  409. package/lib/table/module/edit/hook.min.js +0 -1
  410. package/lib/table/module/export/export-panel.min.js +0 -1
  411. package/lib/table/module/export/hook.min.js +0 -1
  412. package/lib/table/module/export/import-panel.min.js +0 -1
  413. package/lib/table/module/export/util.min.js +0 -1
  414. package/lib/table/module/filter/hook.min.js +0 -1
  415. package/lib/table/module/filter/panel.min.js +0 -1
  416. package/lib/table/module/keyboard/hook.min.js +0 -1
  417. package/lib/table/module/menu/hook.min.js +0 -1
  418. package/lib/table/module/menu/panel.min.js +0 -1
  419. package/lib/table/module/validator/hook.min.js +0 -1
  420. package/lib/table/render/index.min.js +0 -1
  421. package/lib/table/src/body.min.js +0 -1
  422. package/lib/table/src/cell.min.js +0 -1
  423. package/lib/table/src/column.min.js +0 -1
  424. package/lib/table/src/columnInfo.min.js +0 -1
  425. package/lib/table/src/emits.min.js +0 -1
  426. package/lib/table/src/footer.min.js +0 -1
  427. package/lib/table/src/group.min.js +0 -1
  428. package/lib/table/src/header.min.js +0 -1
  429. package/lib/table/src/props.min.js +0 -1
  430. package/lib/table/src/store.min.js +0 -1
  431. package/lib/table/src/table.min.js +0 -1
  432. package/lib/table/src/use/cell-view.min.js +0 -1
  433. package/lib/table/src/use/index.min.js +0 -1
  434. package/lib/table/src/util.min.js +0 -1
  435. package/lib/table/style/style.min.css +0 -1
  436. package/lib/toolbar/index.min.js +0 -1
  437. package/lib/toolbar/src/toolbar.min.js +0 -1
  438. package/lib/ui/index.min.js +0 -1
  439. package/lib/ui/src/anime.min.js +0 -1
  440. package/lib/ui/src/comp.min.js +0 -1
  441. package/lib/ui/src/dom.min.js +0 -1
  442. package/lib/ui/src/log.min.js +0 -1
  443. package/lib/ui/src/utils.min.js +0 -1
  444. package/lib/ui/src/vn.min.js +0 -1
  445. package/lib/ui/style/style.min.css +0 -0
  446. package/lib/v-x-e-table/index.min.js +0 -1
  447. package/lib/v-x-e-table/style/index.js +0 -1
  448. package/lib/v-x-e-table/style/style.css +0 -0
  449. package/lib/v-x-e-table/style/style.min.css +0 -0
  450. package/lib/vxe-colgroup/index.min.js +0 -1
  451. package/lib/vxe-colgroup/style/style.min.css +0 -0
  452. package/lib/vxe-column/index.min.js +0 -1
  453. package/lib/vxe-column/style/style.min.css +0 -0
  454. package/lib/vxe-grid/index.min.js +0 -1
  455. package/lib/vxe-table/index.min.js +0 -1
  456. package/lib/vxe-table/style/style.min.css +0 -1
  457. package/lib/vxe-toolbar/index.min.js +0 -1
  458. package/lib/vxe-ui/index.min.js +0 -1
  459. package/lib/vxe-ui/style/style.min.css +0 -0
  460. package/lib/vxe-v-x-e-table/index.js +0 -21
  461. package/lib/vxe-v-x-e-table/index.min.js +0 -1
  462. package/lib/vxe-v-x-e-table/style/index.js +0 -1
  463. package/lib/vxe-v-x-e-table/style/style.css +0 -0
  464. package/lib/vxe-v-x-e-table/style/style.min.css +0 -0
  465. /package/{es/iconfont.1792838769925.ttf → dist/iconfont.1792979665397.ttf} +0 -0
  466. /package/{es/iconfont.1792838769925.woff → dist/iconfont.1792979665397.woff} +0 -0
  467. /package/{es/iconfont.1792838769925.woff2 → dist/iconfont.1792979665397.woff2} +0 -0
  468. /package/es/colgroup/{style.min.css → style.mini.css} +0 -0
  469. /package/es/column/{style.min.css → style.mini.css} +0 -0
  470. /package/{lib/iconfont.1792838769925.ttf → es/iconfont.1792979665397.ttf} +0 -0
  471. /package/{lib/iconfont.1792838769925.woff → es/iconfont.1792979665397.woff} +0 -0
  472. /package/{lib/iconfont.1792838769925.woff2 → es/iconfont.1792979665397.woff2} +0 -0
  473. /package/es/ui/{style.min.css → style.mini.css} +0 -0
  474. /package/es/{v-x-e-table/style.css → vxe-colgroup/style.mini.css} +0 -0
  475. /package/es/{v-x-e-table/style.min.css → vxe-column/style.mini.css} +0 -0
  476. /package/es/{vxe-colgroup/style.min.css → vxe-ui/style.mini.css} +0 -0
  477. /package/{es/vxe-column/style.min.css → lib/colgroup/style/style.mini.css} +0 -0
  478. /package/{es/vxe-ui/style.min.css → lib/column/style/style.mini.css} +0 -0
  479. /package/{es/vxe-v-x-e-table/style.css → lib/ui/style/style.mini.css} +0 -0
  480. /package/{es/vxe-v-x-e-table/style.min.css → lib/vxe-colgroup/style/style.mini.css} +0 -0
  481. /package/lib/{colgroup/style/style.min.css → vxe-column/style/style.mini.css} +0 -0
  482. /package/lib/{column/style/style.min.css → vxe-ui/style/style.mini.css} +0 -0
package/es/ui/src/dom.js CHANGED
@@ -1,415 +1,412 @@
1
- import XEUtils from 'xe-utils';
1
+ import XEUtils from "xe-utils";
2
2
  const reClsMap = {};
3
3
  let tpImgEl;
4
- export function initTpImg() {
5
- if (!tpImgEl) {
6
- tpImgEl = new Image();
7
- tpImgEl.src = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=';
8
- }
9
- return tpImgEl;
10
- }
11
- export function getTpImg() {
12
- if (!tpImgEl) {
13
- return initTpImg();
14
- }
15
- return tpImgEl;
16
- }
17
- export function getPropClass(property, params) {
18
- return property ? (XEUtils.isFunction(property) ? property(params) : property) || '' : '';
4
+ function initTpImg() {
5
+ if (!tpImgEl) {
6
+ tpImgEl = new Image();
7
+ tpImgEl.src = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=";
8
+ }
9
+ return tpImgEl;
10
+ }
11
+ function getTpImg() {
12
+ if (!tpImgEl) {
13
+ return initTpImg();
14
+ }
15
+ return tpImgEl;
16
+ }
17
+ function getPropClass(property, params) {
18
+ return property ? (XEUtils.isFunction(property) ? property(params) : property) || "" : "";
19
19
  }
20
20
  function getClsRE(cls) {
21
- if (!reClsMap[cls]) {
22
- reClsMap[cls] = new RegExp(`(?:^|\\s)${cls}(?!\\S)`, 'g');
23
- }
24
- return reClsMap[cls];
21
+ if (!reClsMap[cls]) {
22
+ reClsMap[cls] = new RegExp(`(?:^|\\s)${cls}(?!\\S)`, "g");
23
+ }
24
+ return reClsMap[cls];
25
25
  }
26
26
  function getNodeOffset(elem, container, rest) {
27
- if (elem) {
28
- const parentElem = elem.parentNode;
29
- rest.top += elem.offsetTop;
30
- rest.left += elem.offsetLeft;
31
- if (parentElem && parentElem !== document.documentElement && parentElem !== document.body) {
32
- rest.top -= parentElem.scrollTop;
33
- rest.left -= parentElem.scrollLeft;
34
- }
35
- if (container && (elem === container || elem.offsetParent === container) ? 0 : elem.offsetParent) {
36
- return getNodeOffset(elem.offsetParent, container, rest);
37
- }
27
+ if (elem) {
28
+ const parentElem = elem.parentNode;
29
+ rest.top += elem.offsetTop;
30
+ rest.left += elem.offsetLeft;
31
+ if (parentElem && parentElem !== document.documentElement && parentElem !== document.body) {
32
+ rest.top -= parentElem.scrollTop;
33
+ rest.left -= parentElem.scrollLeft;
38
34
  }
39
- return rest;
40
- }
41
- export function isPx(val) {
42
- return val && /^\d+(\.\d+)?(px)?$/.test(val);
43
- }
44
- export function isScale(val) {
45
- return val && /^\d+(\.\d+)?%$/.test(val);
46
- }
47
- export function hasClass(elem, cls) {
48
- if (elem) {
49
- if (elem.classList) {
50
- return elem.classList.contains(cls);
51
- }
52
- return !!(elem.className && elem.className.match && elem.className.match(getClsRE(cls)));
35
+ if (container && (elem === container || elem.offsetParent === container) ? 0 : elem.offsetParent) {
36
+ return getNodeOffset(elem.offsetParent, container, rest);
53
37
  }
54
- return false;
38
+ }
39
+ return rest;
55
40
  }
56
- export function removeClass(elem, cls) {
57
- if (elem && hasClass(elem, cls)) {
58
- elem.className = elem.className.replace(getClsRE(cls), '');
59
- }
60
- }
61
- export function addClass(elem, cls) {
62
- if (elem && !hasClass(elem, cls)) {
63
- removeClass(elem, cls);
64
- elem.className = `${elem.className} ${cls}`;
65
- }
41
+ function isPx(val) {
42
+ return val && /^\d+(\.\d+)?(px)?$/.test(val);
66
43
  }
67
- export function hasControlKey(evnt) {
68
- return evnt.ctrlKey || evnt.metaKey;
44
+ function isScale(val) {
45
+ return val && /^\d+(\.\d+)?%$/.test(val);
69
46
  }
70
- export function toCssUnit(val, unit = 'px') {
71
- if (XEUtils.isNumber(val) || /^\d+$/.test(`${val}`)) {
72
- return `${val}${unit}`;
47
+ function hasClass(elem, cls) {
48
+ if (elem) {
49
+ if (elem.classList) {
50
+ return elem.classList.contains(cls);
73
51
  }
74
- return `${val || ''}`;
75
- }
76
- export function queryElement(elem, selector) {
77
- if (elem) {
78
- return elem.querySelector(selector);
52
+ return !!(elem.className && elem.className.match && elem.className.match(getClsRE(cls)));
53
+ }
54
+ return false;
55
+ }
56
+ function removeClass(elem, cls) {
57
+ if (elem && hasClass(elem, cls)) {
58
+ elem.className = elem.className.replace(getClsRE(cls), "");
59
+ }
60
+ }
61
+ function addClass(elem, cls) {
62
+ if (elem && !hasClass(elem, cls)) {
63
+ removeClass(elem, cls);
64
+ elem.className = `${elem.className} ${cls}`;
65
+ }
66
+ }
67
+ function hasControlKey(evnt) {
68
+ return evnt.ctrlKey || evnt.metaKey;
69
+ }
70
+ function toCssUnit(val, unit = "px") {
71
+ if (XEUtils.isNumber(val) || /^\d+$/.test(`${val}`)) {
72
+ return `${val}${unit}`;
73
+ }
74
+ return `${val || ""}`;
75
+ }
76
+ function queryElement(elem, selector) {
77
+ if (elem) {
78
+ return elem.querySelector(selector);
79
+ }
80
+ return null;
81
+ }
82
+ function getDomNode() {
83
+ const documentElement = document.documentElement;
84
+ const bodyElem = document.body;
85
+ return {
86
+ scrollTop: documentElement.scrollTop || bodyElem.scrollTop,
87
+ scrollLeft: documentElement.scrollLeft || bodyElem.scrollLeft,
88
+ visibleHeight: documentElement.clientHeight || bodyElem.clientHeight,
89
+ visibleWidth: documentElement.clientWidth || bodyElem.clientWidth
90
+ };
91
+ }
92
+ function getOffsetHeight(elem) {
93
+ return elem ? elem.offsetHeight : 0;
94
+ }
95
+ function getPaddingTopBottomSize(elem) {
96
+ if (elem) {
97
+ const computedStyle = getComputedStyle(elem);
98
+ const paddingTop = XEUtils.toNumber(computedStyle.paddingTop);
99
+ const paddingBottom = XEUtils.toNumber(computedStyle.paddingBottom);
100
+ return paddingTop + paddingBottom;
101
+ }
102
+ return 0;
103
+ }
104
+ function setScrollTop(elem, scrollTop) {
105
+ if (elem) {
106
+ elem.scrollTop = scrollTop;
107
+ }
108
+ }
109
+ function setScrollLeft(elem, scrollLeft) {
110
+ if (elem) {
111
+ elem.scrollLeft = scrollLeft;
112
+ }
113
+ }
114
+ function updateCellTitle(overflowElem, column) {
115
+ const content = column.type === "html" ? overflowElem.innerText : overflowElem.textContent;
116
+ if (overflowElem.getAttribute("title") !== content) {
117
+ overflowElem.setAttribute("title", content);
118
+ }
119
+ }
120
+ function checkTargetElement(target, exEls, endEl) {
121
+ let targetEl = target;
122
+ if (!exEls || !exEls.length) {
123
+ return false;
124
+ }
125
+ const [exEl1, exEl2, exEl3] = exEls;
126
+ while (targetEl) {
127
+ if (exEl1 === targetEl || exEl2 && targetEl === exEl2 || exEl3 && targetEl === exEl3) {
128
+ return true;
79
129
  }
80
- return null;
81
- }
82
- export function getDomNode() {
83
- const documentElement = document.documentElement;
84
- const bodyElem = document.body;
85
- return {
86
- scrollTop: documentElement.scrollTop || bodyElem.scrollTop,
87
- scrollLeft: documentElement.scrollLeft || bodyElem.scrollLeft,
88
- visibleHeight: documentElement.clientHeight || bodyElem.clientHeight,
89
- visibleWidth: documentElement.clientWidth || bodyElem.clientWidth
90
- };
91
- }
92
- export function getOffsetHeight(elem) {
93
- return elem ? elem.offsetHeight : 0;
94
- }
95
- export function getPaddingTopBottomSize(elem) {
96
- if (elem) {
97
- const computedStyle = getComputedStyle(elem);
98
- const paddingTop = XEUtils.toNumber(computedStyle.paddingTop);
99
- const paddingBottom = XEUtils.toNumber(computedStyle.paddingBottom);
100
- return paddingTop + paddingBottom;
130
+ if (endEl && targetEl === endEl) {
131
+ return false;
101
132
  }
102
- return 0;
103
- }
104
- export function setScrollTop(elem, scrollTop) {
105
- if (elem) {
106
- elem.scrollTop = scrollTop;
133
+ targetEl = targetEl.parentElement;
134
+ }
135
+ return false;
136
+ }
137
+ function getEventTargetNode(evnt, container, queryCls, queryMethod) {
138
+ let targetElem;
139
+ let target = evnt.target.shadowRoot && evnt.composed ? evnt.composedPath()[0] || evnt.target : evnt.target;
140
+ while (target && target.nodeType && target !== document) {
141
+ if (queryCls && hasClass(target, queryCls) && (!queryMethod || queryMethod(target))) {
142
+ targetElem = target;
143
+ } else if (target === container) {
144
+ return { flag: queryCls ? !!targetElem : true, container, targetElem };
107
145
  }
146
+ target = target.parentNode;
147
+ }
148
+ return { flag: false };
108
149
  }
109
- export function setScrollLeft(elem, scrollLeft) {
110
- if (elem) {
111
- elem.scrollLeft = scrollLeft;
112
- }
150
+ function getOffsetPos(elem, container) {
151
+ return getNodeOffset(elem, container, { left: 0, top: 0 });
113
152
  }
114
- // export function setScrollLeftAndTop (elem: HTMLElement | null, scrollLeft: number, scrollTop: number) {
115
- // if (elem) {
116
- // elem.scrollLeft = scrollLeft
117
- // elem.scrollTop = scrollTop
118
- // }
119
- // }
120
- export function updateCellTitle(overflowElem, column) {
121
- const content = column.type === 'html' ? overflowElem.innerText : overflowElem.textContent;
122
- if (overflowElem.getAttribute('title') !== content) {
123
- overflowElem.setAttribute('title', content);
124
- }
153
+ function getAbsolutePos(elem) {
154
+ const bounding = elem.getBoundingClientRect();
155
+ const boundingTop = bounding.top;
156
+ const boundingLeft = bounding.left;
157
+ const { scrollTop, scrollLeft, visibleHeight, visibleWidth } = getDomNode();
158
+ return { boundingTop, top: scrollTop + boundingTop, boundingLeft, left: scrollLeft + boundingLeft, visibleHeight, visibleWidth };
125
159
  }
126
- export function checkTargetElement(target, exEls, endEl) {
127
- let targetEl = target;
128
- if (!exEls || !exEls.length) {
129
- return false;
130
- }
131
- const [exEl1, exEl2, exEl3] = exEls;
132
- while (targetEl) {
133
- if (exEl1 === targetEl || (exEl2 && targetEl === exEl2) || (exEl3 && targetEl === exEl3)) {
134
- return true;
135
- }
136
- if (endEl && targetEl === endEl) {
137
- return false;
138
- }
139
- targetEl = targetEl.parentElement;
140
- }
141
- return false;
160
+ function hasEventInputTarget(target) {
161
+ const tagName = target ? target.tagName : "";
162
+ return tagName && ["input", "textarea"].includes(tagName.toLowerCase());
142
163
  }
143
- /**
144
- * 检查触发源是否属于目标节点
145
- */
146
- export function getEventTargetNode(evnt, container, queryCls, queryMethod) {
147
- let targetElem;
148
- let target = (evnt.target.shadowRoot && evnt.composed) ? (evnt.composedPath()[0] || evnt.target) : evnt.target;
149
- while (target && target.nodeType && target !== document) {
150
- if (queryCls && hasClass(target, queryCls) && (!queryMethod || queryMethod(target))) {
151
- targetElem = target;
152
- }
153
- else if (target === container) {
154
- return { flag: queryCls ? !!targetElem : true, container, targetElem: targetElem };
155
- }
156
- target = target.parentNode;
157
- }
158
- return { flag: false };
159
- }
160
- /**
161
- * 获取元素相对于 document 的位置
162
- */
163
- export function getOffsetPos(elem, container) {
164
- return getNodeOffset(elem, container, { left: 0, top: 0 });
165
- }
166
- export function getAbsolutePos(elem) {
167
- const bounding = elem.getBoundingClientRect();
168
- const boundingTop = bounding.top;
169
- const boundingLeft = bounding.left;
170
- const { scrollTop, scrollLeft, visibleHeight, visibleWidth } = getDomNode();
171
- return { boundingTop, top: scrollTop + boundingTop, boundingLeft, left: scrollLeft + boundingLeft, visibleHeight, visibleWidth };
172
- }
173
- export function hasEventInputTarget(target) {
174
- const tagName = target ? target.tagName : '';
175
- return tagName && ['input', 'textarea'].includes((tagName.toLowerCase()));
176
- }
177
- /**
178
- * 判断是否由内部可复用控件触发,输入框带有 vxe-reusekeep-control
179
- */
180
164
  function hasReusekeepControl(elem) {
181
- if (elem) {
182
- return hasClass(elem, 'vxe-reusekeep-control');
165
+ if (elem) {
166
+ return hasClass(elem, "vxe-reusekeep-control");
167
+ }
168
+ return false;
169
+ }
170
+ function hasAxternalInputTarget(target) {
171
+ return hasEventInputTarget(target) ? !hasReusekeepControl(target) : false;
172
+ }
173
+ const scrollIntoViewIfNeeded = "scrollIntoViewIfNeeded";
174
+ const scrollIntoView = "scrollIntoView";
175
+ function scrollToView(elem) {
176
+ if (elem) {
177
+ if (elem[scrollIntoViewIfNeeded]) {
178
+ elem[scrollIntoViewIfNeeded]();
179
+ } else if (elem[scrollIntoView]) {
180
+ elem[scrollIntoView]();
183
181
  }
184
- return false;
185
- }
186
- export function hasAxternalInputTarget(target) {
187
- return hasEventInputTarget(target) ? !hasReusekeepControl(target) : false;
188
- }
189
- const scrollIntoViewIfNeeded = 'scrollIntoViewIfNeeded';
190
- const scrollIntoView = 'scrollIntoView';
191
- export function scrollToView(elem) {
192
- if (elem) {
193
- if (elem[scrollIntoViewIfNeeded]) {
194
- elem[scrollIntoViewIfNeeded]();
195
- }
196
- else if (elem[scrollIntoView]) {
197
- elem[scrollIntoView]();
198
- }
182
+ }
183
+ }
184
+ function triggerEvent(targetElem, type) {
185
+ if (targetElem) {
186
+ targetElem.dispatchEvent(new Event(type));
187
+ }
188
+ }
189
+ function isNodeElement(elem) {
190
+ return elem && elem.nodeType === 1;
191
+ }
192
+ function scrollTopTo(diffNum, cb) {
193
+ const duration = Math.abs(diffNum);
194
+ const startTime = performance.now();
195
+ let countTop = 0;
196
+ const step = (timestamp) => {
197
+ let progress = (timestamp - startTime) / duration;
198
+ if (progress < 0) {
199
+ progress = 0;
200
+ } else if (progress > 1) {
201
+ progress = 1;
199
202
  }
200
- }
201
- export function triggerEvent(targetElem, type) {
202
- if (targetElem) {
203
- targetElem.dispatchEvent(new Event(type));
203
+ const easedProgress = Math.pow(progress, 2);
204
+ const offsetTop = Math.floor(diffNum * easedProgress) - countTop;
205
+ countTop += offsetTop;
206
+ cb(offsetTop);
207
+ if (progress < 1) {
208
+ requestAnimationFrame(step);
204
209
  }
205
- }
206
- export function isNodeElement(elem) {
207
- return elem && elem.nodeType === 1;
208
- }
209
- export function scrollTopTo(diffNum, cb) {
210
- const duration = Math.abs(diffNum);
211
- const startTime = performance.now();
212
- let countTop = 0;
213
- const step = (timestamp) => {
214
- let progress = (timestamp - startTime) / duration;
215
- if (progress < 0) {
216
- progress = 0;
217
- }
218
- else if (progress > 1) {
219
- progress = 1;
220
- }
221
- const easedProgress = Math.pow(progress, 2);
222
- const offsetTop = Math.floor((diffNum * easedProgress)) - countTop;
223
- countTop += offsetTop;
224
- cb(offsetTop);
225
- if (progress < 1) {
226
- requestAnimationFrame(step);
227
- }
228
- };
229
- requestAnimationFrame(step);
210
+ };
211
+ requestAnimationFrame(step);
230
212
  }
231
213
  let wtlFrame;
232
- export function wheelScrollLeftTo(scrollLeft, cb) {
233
- if (wtlFrame) {
234
- cancelAnimationFrame(wtlFrame);
235
- }
236
- wtlFrame = requestAnimationFrame(() => {
237
- cb(scrollLeft);
238
- wtlFrame = null;
239
- });
214
+ function wheelScrollLeftTo(scrollLeft, cb) {
215
+ if (wtlFrame) {
216
+ cancelAnimationFrame(wtlFrame);
217
+ }
218
+ wtlFrame = requestAnimationFrame(() => {
219
+ cb(scrollLeft);
220
+ wtlFrame = null;
221
+ });
240
222
  }
241
223
  let wtaFrame;
242
- export function wheelScrollTopTo(diffNum, cb) {
243
- if (wtaFrame) {
244
- cancelAnimationFrame(wtaFrame);
245
- }
246
- wtaFrame = requestAnimationFrame(() => {
247
- const offsetTop = diffNum;
248
- cb(offsetTop);
249
- wtaFrame = null;
250
- });
251
- }
252
- /**
253
- * 通用定位计算
254
- */
255
- export function updatePanelPlacement(targetElem, panelElem, options) {
256
- const { defaultTop, defaultLeft, placement, defaultPlacement, appendTo, teleportTo, marginSize, isMinWidth } = Object.assign({
257
- appendTo: '',
258
- teleportTo: false,
259
- marginSize: 18,
260
- isMinWidth: true
261
- }, options);
262
- let panelPlacement = 'bottom';
263
- let top = '';
264
- let bottom = '';
265
- let left = 0;
266
- let minWidth = '';
267
- let arrowLeft = '';
268
- const stys = {};
269
- if (panelElem && targetElem) {
270
- const bodyEl = document.body;
271
- const parentWrapperEl = getPopupWrapperElement(teleportTo ? getPopupAppendElement(appendTo) : panelElem);
272
- if (parentWrapperEl) {
273
- const targetWidth = targetElem.offsetWidth;
274
- const targetHeight = targetElem.offsetHeight;
275
- const panelWidth = panelElem.offsetWidth;
276
- const panelHeight = panelElem.offsetHeight;
277
- const parentWrapperRect = parentWrapperEl.getBoundingClientRect();
278
- const panelRect = panelElem.getBoundingClientRect();
279
- const targetRect = targetElem.getBoundingClientRect();
280
- const visibleHeight = bodyEl.clientHeight;
281
- const visibleWidth = bodyEl.clientWidth;
282
- const parentWrapperScrollLeft = parentWrapperEl.scrollLeft;
283
- const parentWrapperScrollTop = parentWrapperEl.scrollTop;
284
- const parentWrapperOffsetLeft = parentWrapperRect.left;
285
- const parentWrapperOffsetTop = parentWrapperRect.top;
286
- const targetLeft = targetRect.left;
287
- const targetTop = targetRect.top;
288
- minWidth = targetElem.offsetWidth;
289
- if (teleportTo) {
290
- left = (defaultLeft || (targetLeft - (panelWidth - targetWidth) / 2)) - parentWrapperScrollLeft;
291
- top = (defaultTop || (targetTop + targetHeight)) - parentWrapperScrollTop;
292
- if (placement === 'top') {
293
- panelPlacement = 'top';
294
- top = targetTop - panelHeight;
295
- }
296
- else if (!placement) {
297
- if (defaultPlacement === 'top') {
298
- panelPlacement = 'top';
299
- if (!defaultTop) {
300
- top = targetTop - panelHeight;
301
- }
302
- // 如果上面不够放,则向下
303
- if (top < marginSize) {
304
- panelPlacement = 'bottom';
305
- top = targetTop + targetHeight;
306
- }
307
- // 如果下面不够放,则向上(优先)
308
- if (top + panelHeight + marginSize > visibleHeight) {
309
- panelPlacement = 'top';
310
- top = targetTop - panelHeight;
311
- }
312
- }
313
- else {
314
- // 如果下面不够放,则向上
315
- if (top + panelHeight + marginSize > visibleHeight) {
316
- panelPlacement = 'top';
317
- top = targetTop - panelHeight;
318
- }
319
- // 如果上面不够放,则向下(优先)
320
- if (top < marginSize) {
321
- panelPlacement = 'bottom';
322
- top = targetTop + targetHeight;
323
- }
324
- }
325
- }
326
- // 如果溢出右边
327
- if (left + panelWidth + marginSize > visibleWidth) {
328
- left -= left + panelWidth + marginSize - visibleWidth;
329
- }
330
- // 如果溢出左边
331
- if (left < marginSize) {
332
- left = marginSize;
333
- }
334
- // 偏移
335
- top -= parentWrapperOffsetTop;
336
- left -= parentWrapperOffsetLeft;
337
- }
338
- else {
339
- if (placement === 'top') {
340
- panelPlacement = 'top';
341
- bottom = targetHeight;
342
- }
343
- else if (!placement) {
344
- // 如果下面不够放,则向上
345
- top = targetHeight;
346
- if (targetTop + targetHeight + panelHeight + marginSize > visibleHeight) {
347
- // 如果上面不够放,则向下(优先)
348
- if (targetTop - targetHeight - panelHeight > marginSize) {
349
- panelPlacement = 'top';
350
- top = '';
351
- bottom = targetHeight;
352
- }
353
- }
354
- }
355
- // 是否超出右侧
356
- if (panelRect.left + panelRect.width + marginSize > visibleWidth) {
357
- left = -(panelRect.left + panelRect.width + marginSize - visibleWidth);
358
- }
359
- }
360
- if (XEUtils.isNumber(top)) {
361
- stys.top = toCssUnit(top);
224
+ function wheelScrollTopTo(diffNum, cb) {
225
+ if (wtaFrame) {
226
+ cancelAnimationFrame(wtaFrame);
227
+ }
228
+ wtaFrame = requestAnimationFrame(() => {
229
+ const offsetTop = diffNum;
230
+ cb(offsetTop);
231
+ wtaFrame = null;
232
+ });
233
+ }
234
+ function updatePanelPlacement(targetElem, panelElem, options) {
235
+ const { defaultTop, defaultLeft, placement, defaultPlacement, appendTo, teleportTo, marginSize, isMinWidth } = Object.assign({
236
+ appendTo: "",
237
+ teleportTo: false,
238
+ marginSize: 18,
239
+ isMinWidth: true
240
+ }, options);
241
+ let panelPlacement = "bottom";
242
+ let top = "";
243
+ let bottom = "";
244
+ let left = 0;
245
+ let minWidth = "";
246
+ let arrowLeft = "";
247
+ const stys = {};
248
+ if (panelElem && targetElem) {
249
+ const bodyEl = document.body;
250
+ const parentWrapperEl = getPopupWrapperElement(teleportTo ? getPopupAppendElement(appendTo) : panelElem);
251
+ if (parentWrapperEl) {
252
+ const targetWidth = targetElem.offsetWidth;
253
+ const targetHeight = targetElem.offsetHeight;
254
+ const panelWidth = panelElem.offsetWidth;
255
+ const panelHeight = panelElem.offsetHeight;
256
+ const parentWrapperRect = parentWrapperEl.getBoundingClientRect();
257
+ const panelRect = panelElem.getBoundingClientRect();
258
+ const targetRect = targetElem.getBoundingClientRect();
259
+ const visibleHeight = bodyEl.clientHeight;
260
+ const visibleWidth = bodyEl.clientWidth;
261
+ const parentWrapperScrollLeft = parentWrapperEl.scrollLeft;
262
+ const parentWrapperScrollTop = parentWrapperEl.scrollTop;
263
+ const parentWrapperOffsetLeft = parentWrapperRect.left;
264
+ const parentWrapperOffsetTop = parentWrapperRect.top;
265
+ const targetLeft = targetRect.left;
266
+ const targetTop = targetRect.top;
267
+ minWidth = targetElem.offsetWidth;
268
+ if (teleportTo) {
269
+ left = (defaultLeft || targetLeft - (panelWidth - targetWidth) / 2) - parentWrapperScrollLeft;
270
+ top = (defaultTop || targetTop + targetHeight) - parentWrapperScrollTop;
271
+ if (placement === "top") {
272
+ panelPlacement = "top";
273
+ top = targetTop - panelHeight;
274
+ } else if (!placement) {
275
+ if (defaultPlacement === "top") {
276
+ panelPlacement = "top";
277
+ if (!defaultTop) {
278
+ top = targetTop - panelHeight;
362
279
  }
363
- if (XEUtils.isNumber(bottom)) {
364
- stys.bottom = toCssUnit(bottom);
280
+ if (top < marginSize) {
281
+ panelPlacement = "bottom";
282
+ top = targetTop + targetHeight;
365
283
  }
366
- if (XEUtils.isNumber(left)) {
367
- stys.left = toCssUnit(left);
284
+ if (top + panelHeight + marginSize > visibleHeight) {
285
+ panelPlacement = "top";
286
+ top = targetTop - panelHeight;
368
287
  }
369
- if (isMinWidth && XEUtils.isNumber(minWidth)) {
370
- stys.minWidth = toCssUnit(minWidth);
288
+ } else {
289
+ if (top + panelHeight + marginSize > visibleHeight) {
290
+ panelPlacement = "top";
291
+ top = targetTop - panelHeight;
371
292
  }
372
- // 箭头
373
- if (left === targetLeft) {
374
- if (targetWidth <= panelWidth) {
375
- arrowLeft = targetWidth / 2;
376
- }
293
+ if (top < marginSize) {
294
+ panelPlacement = "bottom";
295
+ top = targetTop + targetHeight;
377
296
  }
378
- else if (left < targetLeft) {
379
- if (left + panelWidth > targetLeft + targetWidth) {
380
- arrowLeft = (targetLeft - left) + targetWidth / 2;
381
- }
382
- else {
383
- arrowLeft = (targetLeft - left) + (panelWidth - (targetLeft - left)) / 2;
384
- }
297
+ }
298
+ }
299
+ if (left + panelWidth + marginSize > visibleWidth) {
300
+ left -= left + panelWidth + marginSize - visibleWidth;
301
+ }
302
+ if (left < marginSize) {
303
+ left = marginSize;
304
+ }
305
+ top -= parentWrapperOffsetTop;
306
+ left -= parentWrapperOffsetLeft;
307
+ } else {
308
+ if (placement === "top") {
309
+ panelPlacement = "top";
310
+ bottom = targetHeight;
311
+ } else if (!placement) {
312
+ top = targetHeight;
313
+ if (targetTop + targetHeight + panelHeight + marginSize > visibleHeight) {
314
+ if (targetTop - targetHeight - panelHeight > marginSize) {
315
+ panelPlacement = "top";
316
+ top = "";
317
+ bottom = targetHeight;
385
318
  }
319
+ }
386
320
  }
321
+ if (panelRect.left + panelRect.width + marginSize > visibleWidth) {
322
+ left = -(panelRect.left + panelRect.width + marginSize - visibleWidth);
323
+ }
324
+ }
325
+ if (XEUtils.isNumber(top)) {
326
+ stys.top = toCssUnit(top);
327
+ }
328
+ if (XEUtils.isNumber(bottom)) {
329
+ stys.bottom = toCssUnit(bottom);
330
+ }
331
+ if (XEUtils.isNumber(left)) {
332
+ stys.left = toCssUnit(left);
333
+ }
334
+ if (isMinWidth && XEUtils.isNumber(minWidth)) {
335
+ stys.minWidth = toCssUnit(minWidth);
336
+ }
337
+ if (left === targetLeft) {
338
+ if (targetWidth <= panelWidth) {
339
+ arrowLeft = targetWidth / 2;
340
+ }
341
+ } else if (left < targetLeft) {
342
+ if (left + panelWidth > targetLeft + targetWidth) {
343
+ arrowLeft = targetLeft - left + targetWidth / 2;
344
+ } else {
345
+ arrowLeft = targetLeft - left + (panelWidth - (targetLeft - left)) / 2;
346
+ }
347
+ }
387
348
  }
388
- return {
389
- top: top || 0,
390
- bottom: bottom || 0,
391
- left: left || 0,
392
- arrowLeft: arrowLeft || 0,
393
- style: stys,
394
- placement: panelPlacement
395
- };
396
- }
397
- export function getPopupWrapperElement(panelElem) {
398
- if (!panelElem) {
399
- return null;
400
- }
401
- const bodyEl = document.body;
402
- const parentEl = panelElem.parentElement;
403
- return (parentEl === bodyEl ? document.documentElement : parentEl) || null;
404
- }
405
- export function getPopupContainer(appendTo) {
406
- const selectElem = appendTo && XEUtils.isFunction(appendTo) ? appendTo({}) : appendTo;
407
- return selectElem || 'body';
408
- }
409
- export function getPopupAppendElement(appendTo) {
410
- const selectElem = getPopupContainer(appendTo);
411
- if (XEUtils.isString(selectElem)) {
412
- return document.querySelector(selectElem) || document.body;
413
- }
414
- return selectElem;
415
- }
349
+ }
350
+ return {
351
+ top: top || 0,
352
+ bottom: bottom || 0,
353
+ left: left || 0,
354
+ arrowLeft: arrowLeft || 0,
355
+ style: stys,
356
+ placement: panelPlacement
357
+ };
358
+ }
359
+ function getPopupWrapperElement(panelElem) {
360
+ if (!panelElem) {
361
+ return null;
362
+ }
363
+ const bodyEl = document.body;
364
+ const parentEl = panelElem.parentElement;
365
+ return (parentEl === bodyEl ? document.documentElement : parentEl) || null;
366
+ }
367
+ function getPopupContainer(appendTo) {
368
+ const selectElem = appendTo && XEUtils.isFunction(appendTo) ? appendTo({}) : appendTo;
369
+ return selectElem || "body";
370
+ }
371
+ function getPopupAppendElement(appendTo) {
372
+ const selectElem = getPopupContainer(appendTo);
373
+ if (XEUtils.isString(selectElem)) {
374
+ return document.querySelector(selectElem) || document.body;
375
+ }
376
+ return selectElem;
377
+ }
378
+ export {
379
+ addClass,
380
+ checkTargetElement,
381
+ getAbsolutePos,
382
+ getDomNode,
383
+ getEventTargetNode,
384
+ getOffsetHeight,
385
+ getOffsetPos,
386
+ getPaddingTopBottomSize,
387
+ getPopupAppendElement,
388
+ getPopupContainer,
389
+ getPopupWrapperElement,
390
+ getPropClass,
391
+ getTpImg,
392
+ hasAxternalInputTarget,
393
+ hasClass,
394
+ hasControlKey,
395
+ hasEventInputTarget,
396
+ initTpImg,
397
+ isNodeElement,
398
+ isPx,
399
+ isScale,
400
+ queryElement,
401
+ removeClass,
402
+ scrollToView,
403
+ scrollTopTo,
404
+ setScrollLeft,
405
+ setScrollTop,
406
+ toCssUnit,
407
+ triggerEvent,
408
+ updateCellTitle,
409
+ updatePanelPlacement,
410
+ wheelScrollLeftTo,
411
+ wheelScrollTopTo
412
+ };