vxe-pc-ui 4.20.34 → 4.20.36

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 (879) hide show
  1. package/dist/all.esm.js +45718 -45038
  2. package/dist/all.esm.min.js +3 -3
  3. package/dist/style.css +307 -1
  4. package/dist/style.mini.css +1 -1
  5. package/es/alert/src/alert.js +117 -114
  6. package/es/anchor/index.d.ts +8 -8
  7. package/es/anchor/src/anchor-link.js +110 -107
  8. package/es/anchor/src/anchor.d.ts +1 -1
  9. package/es/anchor/src/anchor.js +212 -209
  10. package/es/avatar/index.d.ts +6 -6
  11. package/es/avatar/src/avatar.d.ts +1 -1
  12. package/es/avatar/src/avatar.js +132 -129
  13. package/es/backtop/index.d.ts +42 -42
  14. package/es/backtop/src/backtop.d.ts +7 -7
  15. package/es/backtop/src/backtop.js +267 -264
  16. package/es/badge/index.d.ts +6 -6
  17. package/es/badge/src/badge.d.ts +1 -1
  18. package/es/badge/src/badge.js +102 -99
  19. package/es/breadcrumb/src/breadcrumb-item.js +104 -101
  20. package/es/breadcrumb/src/breadcrumb.js +70 -67
  21. package/es/button/index.d.ts +20 -20
  22. package/es/button/src/button-group.js +88 -85
  23. package/es/button/src/button.d.ts +3 -3
  24. package/es/calendar/index.d.ts +20 -20
  25. package/es/calendar/src/calendar.d.ts +3 -3
  26. package/es/calendar/src/calendar.js +1371 -1368
  27. package/es/card/index.d.ts +12 -12
  28. package/es/card/src/card.d.ts +2 -2
  29. package/es/card/src/card.js +235 -232
  30. package/es/carousel/index.d.ts +14 -14
  31. package/es/carousel/src/carousel-item.js +78 -75
  32. package/es/carousel/src/carousel.d.ts +2 -2
  33. package/es/carousel/src/carousel.js +392 -389
  34. package/es/cascader/index.d.ts +70 -70
  35. package/es/cascader/src/cascader.d.ts +11 -11
  36. package/es/cascader/src/cascader.js +1667 -1664
  37. package/es/checkbox/index.d.ts +14 -14
  38. package/es/checkbox/src/button.d.ts +2 -2
  39. package/es/checkbox/src/button.js +198 -195
  40. package/es/checkbox/src/checkbox.d.ts +2 -2
  41. package/es/checkbox/src/checkbox.js +181 -178
  42. package/es/checkbox/src/group.d.ts +4 -4
  43. package/es/checkbox/src/group.js +210 -207
  44. package/es/checkbox-button/index.d.ts +14 -14
  45. package/es/checkbox-group/index.d.ts +26 -26
  46. package/es/collapse/index.d.ts +14 -14
  47. package/es/collapse/src/collapse-pane.js +98 -95
  48. package/es/collapse/src/collapse.d.ts +2 -2
  49. package/es/collapse/src/collapse.js +340 -337
  50. package/es/color-picker/index.d.ts +46 -46
  51. package/es/color-picker/src/color-picker.d.ts +8 -8
  52. package/es/color-picker/src/color-picker.js +1116 -1113
  53. package/es/color-picker/src/util.d.ts +9 -1
  54. package/es/components.d.ts +1 -0
  55. package/es/components.js +3 -0
  56. package/es/context-menu/index.d.ts +16 -16
  57. package/es/context-menu/src/context-menu.d.ts +3 -3
  58. package/es/context-menu/src/context-menu.js +601 -598
  59. package/es/countdown/index.d.ts +2 -2
  60. package/es/countdown/src/countdown.d.ts +1 -1
  61. package/es/countdown/src/countdown.js +224 -221
  62. package/es/date-panel/index.d.ts +46 -46
  63. package/es/date-panel/src/date-panel.d.ts +7 -7
  64. package/es/date-panel/src/date-panel.js +1905 -1902
  65. package/es/date-picker/index.d.ts +110 -110
  66. package/es/date-picker/src/date-picker.d.ts +17 -17
  67. package/es/date-picker/src/date-picker.js +1537 -1534
  68. package/es/date-range-picker/index.d.ts +114 -114
  69. package/es/date-range-picker/src/date-range-picker.d.ts +17 -17
  70. package/es/date-range-picker/src/date-range-picker.js +1412 -1409
  71. package/es/divider/index.d.ts +6 -6
  72. package/es/divider/src/divider.d.ts +1 -1
  73. package/es/divider/src/divider.js +80 -77
  74. package/es/drawer/index.d.ts +74 -74
  75. package/es/drawer/src/drawer.d.ts +13 -13
  76. package/es/drawer/src/drawer.js +778 -775
  77. package/es/dynamics/index.d.ts +12 -12
  78. package/es/empty/src/empty.js +100 -97
  79. package/es/form/index.d.ts +36 -36
  80. package/es/form/src/form-config-item.d.ts +7 -7
  81. package/es/form/src/form-group.d.ts +7 -7
  82. package/es/form/src/form-group.js +74 -71
  83. package/es/form/src/form-item.d.ts +7 -7
  84. package/es/form/src/form-item.js +76 -73
  85. package/es/form/src/form.d.ts +6 -6
  86. package/es/form/src/form.js +789 -786
  87. package/es/form-gather/index.d.ts +42 -42
  88. package/es/form-group/index.d.ts +42 -42
  89. package/es/form-item/index.d.ts +42 -42
  90. package/es/icon/src/icon.js +59 -56
  91. package/es/icon/style.css +1 -1
  92. package/es/icon/style.mini.css +1 -1
  93. package/es/icon-picker/index.d.ts +22 -22
  94. package/es/icon-picker/src/icon-picker.d.ts +4 -4
  95. package/es/icon-picker/src/icon-picker.js +719 -716
  96. package/es/image/index.d.ts +30 -30
  97. package/es/image/src/group.d.ts +2 -2
  98. package/es/image/src/group.js +130 -127
  99. package/es/image/src/image.d.ts +5 -5
  100. package/es/image/src/image.js +243 -240
  101. package/es/image/src/preview.d.ts +3 -3
  102. package/es/image/src/preview.js +627 -624
  103. package/es/image-group/index.d.ts +8 -8
  104. package/es/image-preview/index.d.ts +16 -16
  105. package/es/index.esm.js +2 -0
  106. package/es/index.js +2 -0
  107. package/es/input/index.d.ts +160 -160
  108. package/es/input/src/input.d.ts +25 -25
  109. package/es/input/src/input.js +2700 -2697
  110. package/es/layout-aside/src/layout-aside.js +138 -135
  111. package/es/layout-body/src/layout-body.js +145 -142
  112. package/es/layout-container/src/layout-container.js +71 -68
  113. package/es/layout-footer/src/layout-footer.js +60 -57
  114. package/es/layout-header/src/layout-header.js +58 -55
  115. package/es/link/src/link.js +131 -128
  116. package/es/list/src/list.js +2174 -2171
  117. package/es/loading/index.d.ts +6 -6
  118. package/es/loading/src/loading.d.ts +1 -1
  119. package/es/loading/src/loading.js +141 -138
  120. package/es/mention/src/mention.js +49 -46
  121. package/es/menu/index.d.ts +32 -32
  122. package/es/menu/src/menu.d.ts +5 -5
  123. package/es/menu/src/menu.js +799 -796
  124. package/es/modal/index.d.ts +92 -92
  125. package/es/modal/src/modal.d.ts +16 -16
  126. package/es/modal/src/modal.js +1519 -1527
  127. package/es/notice-bar/index.d.ts +8 -8
  128. package/es/notice-bar/src/notice-bar.d.ts +2 -2
  129. package/es/notice-bar/src/notice-bar.js +168 -165
  130. package/es/number-input/index.d.ts +134 -134
  131. package/es/number-input/src/number-input.d.ts +21 -21
  132. package/es/number-input/src/number-input.js +1094 -1091
  133. package/es/optgroup/index.d.ts +6 -6
  134. package/es/option/index.d.ts +6 -6
  135. package/es/pager/index.d.ts +34 -34
  136. package/es/pager/src/pager.d.ts +6 -6
  137. package/es/pager/src/pager.js +767 -764
  138. package/es/password-input/index.d.ts +72 -72
  139. package/es/password-input/src/password-input.d.ts +11 -11
  140. package/es/password-input/src/password-input.js +431 -428
  141. package/es/print/index.d.ts +6 -6
  142. package/es/print/src/page-break.js +63 -60
  143. package/es/print/src/print.d.ts +1 -1
  144. package/es/print/src/print.js +303 -300
  145. package/es/pulldown/index.d.ts +22 -22
  146. package/es/pulldown/src/pulldown.d.ts +4 -4
  147. package/es/pulldown/src/pulldown.js +403 -400
  148. package/es/radio/index.d.ts +20 -20
  149. package/es/radio/src/button.d.ts +3 -3
  150. package/es/radio/src/button.js +214 -211
  151. package/es/radio/src/group.d.ts +4 -4
  152. package/es/radio/src/group.js +195 -192
  153. package/es/radio/src/radio.d.ts +3 -3
  154. package/es/radio/src/radio.js +194 -191
  155. package/es/radio-button/index.d.ts +20 -20
  156. package/es/radio-group/index.d.ts +26 -26
  157. package/es/rate/index.d.ts +14 -14
  158. package/es/rate/src/rate.d.ts +2 -2
  159. package/es/rate/src/rate.js +164 -161
  160. package/es/result/src/result.js +116 -113
  161. package/es/row/index.d.ts +6 -6
  162. package/es/row/src/col.js +133 -130
  163. package/es/row/src/row.d.ts +1 -1
  164. package/es/row/src/row.js +111 -108
  165. package/es/scrollbar/index.d.ts +30 -30
  166. package/es/scrollbar/src/scrollbar.d.ts +5 -5
  167. package/es/scrollbar/src/scrollbar.js +518 -515
  168. package/es/segmented/index.d.ts +14 -14
  169. package/es/segmented/src/segmented.d.ts +2 -2
  170. package/es/segmented/src/segmented.js +240 -237
  171. package/es/select/index.d.ts +66 -66
  172. package/es/select/src/optgroup.d.ts +1 -1
  173. package/es/select/src/optgroup.js +44 -41
  174. package/es/select/src/option.d.ts +1 -1
  175. package/es/select/src/option.js +39 -36
  176. package/es/select/src/select.d.ts +11 -11
  177. package/es/select/src/select.js +1914 -1896
  178. package/es/slider/index.d.ts +38 -38
  179. package/es/slider/src/slider.d.ts +6 -6
  180. package/es/slider/src/slider.js +419 -416
  181. package/es/space/index.d.ts +36 -36
  182. package/es/space/src/space.d.ts +6 -6
  183. package/es/space/src/space.js +190 -187
  184. package/es/split/index.d.ts +14 -14
  185. package/es/split-pane/index.d.ts +18 -18
  186. package/es/splitter/index.d.ts +14 -14
  187. package/es/splitter/src/splitter-panel.d.ts +3 -3
  188. package/es/splitter/src/splitter-panel.js +146 -143
  189. package/es/splitter/src/splitter.d.ts +3 -3
  190. package/es/splitter/src/splitter.js +917 -914
  191. package/es/splitter-panel/index.d.ts +18 -18
  192. package/es/step-item/index.d.ts +76 -0
  193. package/es/step-item/index.js +17 -0
  194. package/es/steps/index.d.ts +288 -34
  195. package/es/steps/src/step-info.d.ts +6 -0
  196. package/es/steps/src/step-info.js +20 -0
  197. package/es/steps/src/step-item.d.ts +14 -0
  198. package/es/steps/src/step-item.js +39 -0
  199. package/es/steps/src/steps.d.ts +68 -8
  200. package/es/steps/src/steps.js +299 -47
  201. package/es/steps/src/util.d.ts +7 -0
  202. package/es/steps/src/util.js +44 -0
  203. package/es/steps/style.css +297 -0
  204. package/es/steps/style.mini.css +1 -0
  205. package/es/style.css +307 -1
  206. package/es/style.mini.css +1 -1
  207. package/es/switch/index.d.ts +24 -24
  208. package/es/switch/src/switch.d.ts +4 -4
  209. package/es/switch/src/switch.js +228 -225
  210. package/es/table-select/index.d.ts +30 -30
  211. package/es/table-select/src/table-select.d.ts +5 -5
  212. package/es/table-select/src/table-select.js +865 -862
  213. package/es/table-transfer/src/table-transfer.js +61 -58
  214. package/es/tabs/index.d.ts +26 -26
  215. package/es/tabs/src/tab-pane.js +102 -99
  216. package/es/tabs/src/tabs.d.ts +4 -4
  217. package/es/tabs/src/tabs.js +936 -933
  218. package/es/tag/index.d.ts +16 -16
  219. package/es/tag/src/tag.d.ts +3 -3
  220. package/es/tag/src/tag.js +163 -160
  221. package/es/text/src/text.js +232 -229
  222. package/es/text-ellipsis/src/text-ellipsis.js +252 -249
  223. package/es/textarea/index.d.ts +76 -76
  224. package/es/textarea/src/textarea.d.ts +12 -12
  225. package/es/textarea/src/textarea.js +434 -431
  226. package/es/timeline/index.d.ts +6 -6
  227. package/es/timeline/src/timeline.d.ts +1 -1
  228. package/es/timeline/src/timeline.js +74 -36
  229. package/es/timeline/src/util.js +7 -4
  230. package/es/tip/index.d.ts +9 -9
  231. package/es/tip/src/tip.d.ts +1 -1
  232. package/es/tip/src/tip.js +117 -114
  233. package/es/tooltip/index.d.ts +72 -72
  234. package/es/tooltip/src/tooltip.d.ts +14 -14
  235. package/es/tooltip/src/tooltip.js +552 -549
  236. package/es/tour/src/tour.js +49 -46
  237. package/es/transfer/src/transfer.js +95 -92
  238. package/es/tree/index.d.ts +44 -44
  239. package/es/tree/src/tree.d.ts +7 -7
  240. package/es/tree/src/tree.js +3379 -3376
  241. package/es/tree-select/index.d.ts +74 -74
  242. package/es/tree-select/src/tree-select.d.ts +12 -12
  243. package/es/tree-select/src/tree-select.js +969 -966
  244. package/es/ui/index.js +8 -2
  245. package/es/ui/src/log.js +1 -1
  246. package/es/ui/src/vn.d.ts +1 -1
  247. package/es/upload/index.d.ts +128 -128
  248. package/es/upload/src/upload.d.ts +21 -21
  249. package/es/upload/src/upload.js +1791 -1788
  250. package/es/vxe-icon/style.css +1 -1
  251. package/es/vxe-icon/style.mini.css +1 -1
  252. package/es/vxe-steps/style.css +297 -0
  253. package/es/vxe-steps/style.mini.css +1 -0
  254. package/es/watermark/index.d.ts +6 -6
  255. package/es/watermark/src/watermark.d.ts +1 -1
  256. package/es/watermark/src/watermark.js +158 -155
  257. package/lib/alert/index.d.ts +170 -0
  258. package/lib/alert/src/alert.d.ts +35 -0
  259. package/lib/alert/src/alert.js +117 -114
  260. package/lib/anchor/index.d.ts +140 -0
  261. package/lib/anchor/src/anchor-link.d.ts +12 -0
  262. package/lib/anchor/src/anchor-link.js +110 -107
  263. package/lib/anchor/src/anchor.d.ts +26 -0
  264. package/lib/anchor/src/anchor.js +212 -209
  265. package/lib/anchor/src/util.d.ts +3 -0
  266. package/lib/anchor-link/index.d.ts +64 -0
  267. package/lib/avatar/index.d.ts +216 -0
  268. package/lib/avatar/src/avatar.d.ts +48 -0
  269. package/lib/avatar/src/avatar.js +132 -129
  270. package/lib/backtop/index.d.ts +640 -0
  271. package/lib/backtop/src/backtop.d.ts +146 -0
  272. package/lib/backtop/src/backtop.js +267 -264
  273. package/lib/badge/index.d.ts +154 -0
  274. package/lib/badge/src/badge.d.ts +33 -0
  275. package/lib/badge/src/badge.js +102 -99
  276. package/lib/breadcrumb/index.d.ts +108 -0
  277. package/lib/breadcrumb/src/breadcrumb-item.d.ts +10 -0
  278. package/lib/breadcrumb/src/breadcrumb-item.js +104 -101
  279. package/lib/breadcrumb/src/breadcrumb.d.ts +20 -0
  280. package/lib/breadcrumb/src/breadcrumb.js +70 -67
  281. package/lib/breadcrumb-item/index.d.ts +56 -0
  282. package/lib/button/index.d.ts +592 -0
  283. package/lib/button/src/button-group.d.ts +39 -0
  284. package/lib/button/src/button-group.js +88 -85
  285. package/lib/button/src/button.d.ts +235 -0
  286. package/lib/button-group/index.d.ts +188 -0
  287. package/lib/calendar/index.d.ts +442 -0
  288. package/lib/calendar/src/calendar.d.ts +93 -0
  289. package/lib/calendar/src/calendar.js +1371 -1368
  290. package/lib/card/index.d.ts +314 -0
  291. package/lib/card/src/card.d.ts +71 -0
  292. package/lib/card/src/card.js +235 -232
  293. package/lib/carousel/index.d.ts +360 -0
  294. package/lib/carousel/src/carousel-item.d.ts +12 -0
  295. package/lib/carousel/src/carousel-item.js +78 -75
  296. package/lib/carousel/src/carousel.d.ts +79 -0
  297. package/lib/carousel/src/carousel.js +392 -389
  298. package/lib/carousel/src/util.d.ts +3 -0
  299. package/lib/carousel-item/index.d.ts +64 -0
  300. package/lib/cascader/index.d.ts +842 -0
  301. package/lib/cascader/src/cascader.d.ts +183 -0
  302. package/lib/cascader/src/cascader.js +1665 -1662
  303. package/lib/cascader/src/util.d.ts +2 -0
  304. package/lib/checkbox/index.d.ts +292 -0
  305. package/lib/checkbox/src/button.d.ts +73 -0
  306. package/lib/checkbox/src/button.js +198 -195
  307. package/lib/checkbox/src/checkbox.d.ts +71 -0
  308. package/lib/checkbox/src/checkbox.js +181 -178
  309. package/lib/checkbox/src/group.d.ts +68 -0
  310. package/lib/checkbox/src/group.js +210 -207
  311. package/lib/checkbox-button/index.d.ts +304 -0
  312. package/lib/checkbox-group/index.d.ts +320 -0
  313. package/lib/col/index.d.ts +124 -0
  314. package/lib/collapse/index.d.ts +224 -0
  315. package/lib/collapse/src/collapse-pane.d.ts +16 -0
  316. package/lib/collapse/src/collapse-pane.js +98 -95
  317. package/lib/collapse/src/collapse.d.ts +45 -0
  318. package/lib/collapse/src/collapse.js +340 -337
  319. package/lib/collapse/src/util.d.ts +3 -0
  320. package/lib/collapse-pane/index.d.ts +80 -0
  321. package/lib/color-picker/index.d.ts +636 -0
  322. package/lib/color-picker/src/color-picker.d.ts +159 -0
  323. package/lib/color-picker/src/color-picker.js +1116 -1113
  324. package/lib/color-picker/src/util.d.ts +62 -0
  325. package/lib/components.d.ts +156 -0
  326. package/lib/components.js +3 -0
  327. package/lib/context-menu/index.d.ts +338 -0
  328. package/lib/context-menu/src/context-menu.d.ts +70 -0
  329. package/lib/context-menu/src/context-menu.js +601 -598
  330. package/lib/countdown/index.d.ts +148 -0
  331. package/lib/countdown/src/countdown.d.ts +28 -0
  332. package/lib/countdown/src/countdown.js +224 -221
  333. package/lib/date-panel/index.d.ts +520 -0
  334. package/lib/date-panel/src/date-panel.d.ts +112 -0
  335. package/lib/date-panel/src/date-panel.js +1905 -1902
  336. package/lib/date-panel/src/util.d.ts +40 -0
  337. package/lib/date-picker/index.d.ts +1074 -0
  338. package/lib/date-picker/src/date-picker.d.ts +262 -0
  339. package/lib/date-picker/src/date-picker.js +1537 -1534
  340. package/lib/date-range-picker/index.d.ts +1044 -0
  341. package/lib/date-range-picker/src/date-range-picker.d.ts +245 -0
  342. package/lib/date-range-picker/src/date-range-picker.js +1412 -1409
  343. package/lib/divider/index.d.ts +198 -0
  344. package/lib/divider/src/divider.d.ts +43 -0
  345. package/lib/divider/src/divider.js +80 -77
  346. package/lib/drawer/index.d.ts +1398 -0
  347. package/lib/drawer/src/drawer.d.ts +317 -0
  348. package/lib/drawer/src/drawer.js +778 -775
  349. package/lib/drawer/src/store.d.ts +2 -0
  350. package/lib/dynamics/index.d.ts +463 -0
  351. package/lib/empty/index.d.ts +116 -0
  352. package/lib/empty/src/empty.d.ts +24 -0
  353. package/lib/empty/src/empty.js +100 -97
  354. package/lib/form/index.d.ts +836 -0
  355. package/lib/form/render/index.d.ts +1 -0
  356. package/lib/form/src/form-config-item.d.ts +187 -0
  357. package/lib/form/src/form-group.d.ts +188 -0
  358. package/lib/form/src/form-group.js +74 -71
  359. package/lib/form/src/form-item.d.ts +271 -0
  360. package/lib/form/src/form-item.js +76 -73
  361. package/lib/form/src/form.d.ts +191 -0
  362. package/lib/form/src/form.js +789 -786
  363. package/lib/form/src/itemInfo.d.ts +5 -0
  364. package/lib/form/src/render.d.ts +27 -0
  365. package/lib/form/src/util.d.ts +13 -0
  366. package/lib/form-gather/index.d.ts +840 -0
  367. package/lib/form-group/index.d.ts +828 -0
  368. package/lib/form-item/index.d.ts +828 -0
  369. package/lib/icon/index.d.ts +132 -0
  370. package/lib/icon/src/icon.d.ts +26 -0
  371. package/lib/icon/src/icon.js +59 -56
  372. package/lib/icon/style/style.css +1 -1
  373. package/lib/icon/style/style.mini.css +1 -1
  374. package/lib/icon-picker/index.d.ts +440 -0
  375. package/lib/icon-picker/src/icon-picker.d.ts +105 -0
  376. package/lib/icon-picker/src/icon-picker.js +719 -716
  377. package/lib/image/index.d.ts +442 -0
  378. package/lib/image/src/group.d.ts +57 -0
  379. package/lib/image/src/group.js +130 -127
  380. package/lib/image/src/image.d.ts +96 -0
  381. package/lib/image/src/image.js +243 -240
  382. package/lib/image/src/preview.d.ts +73 -0
  383. package/lib/image/src/preview.js +627 -624
  384. package/lib/image/src/util.d.ts +2 -0
  385. package/lib/image-group/index.d.ts +270 -0
  386. package/lib/image-preview/index.d.ts +352 -0
  387. package/lib/index.common.js +2 -0
  388. package/lib/index.d.ts +6 -0
  389. package/lib/index.js +2 -0
  390. package/lib/index.umd.js +47411 -46732
  391. package/lib/index.umd.min.js +3 -3
  392. package/lib/input/index.d.ts +1402 -0
  393. package/lib/input/src/input.d.ts +318 -0
  394. package/lib/input/src/input.js +2700 -2697
  395. package/lib/language/ar-EG.d.ts +908 -0
  396. package/lib/language/de-DE.d.ts +908 -0
  397. package/lib/language/en-US.d.ts +908 -0
  398. package/lib/language/es-ES.d.ts +908 -0
  399. package/lib/language/fr-FR.d.ts +908 -0
  400. package/lib/language/hu-HU.d.ts +908 -0
  401. package/lib/language/hy-AM.d.ts +908 -0
  402. package/lib/language/id-ID.d.ts +908 -0
  403. package/lib/language/it-IT.d.ts +908 -0
  404. package/lib/language/ja-JP.d.ts +908 -0
  405. package/lib/language/ko-KR.d.ts +908 -0
  406. package/lib/language/ms-MY.d.ts +908 -0
  407. package/lib/language/nb-NO.d.ts +908 -0
  408. package/lib/language/pt-BR.d.ts +908 -0
  409. package/lib/language/ru-RU.d.ts +908 -0
  410. package/lib/language/th-TH.d.ts +908 -0
  411. package/lib/language/ug-CN.d.ts +908 -0
  412. package/lib/language/uk-UA.d.ts +908 -0
  413. package/lib/language/uz-UZ.d.ts +908 -0
  414. package/lib/language/vi-VN.d.ts +908 -0
  415. package/lib/language/zh-CHT.d.ts +908 -0
  416. package/lib/language/zh-CN.d.ts +908 -0
  417. package/lib/language/zh-HK.d.ts +908 -0
  418. package/lib/language/zh-MO.d.ts +908 -0
  419. package/lib/language/zh-TC.d.ts +908 -0
  420. package/lib/language/zh-TW.d.ts +908 -0
  421. package/lib/layout-aside/index.d.ts +178 -0
  422. package/lib/layout-aside/src/layout-aside.d.ts +39 -0
  423. package/lib/layout-aside/src/layout-aside.js +138 -135
  424. package/lib/layout-body/index.d.ts +192 -0
  425. package/lib/layout-body/src/layout-body.d.ts +42 -0
  426. package/lib/layout-body/src/layout-body.js +145 -142
  427. package/lib/layout-container/index.d.ts +130 -0
  428. package/lib/layout-container/src/layout-container.d.ts +27 -0
  429. package/lib/layout-container/src/layout-container.js +71 -68
  430. package/lib/layout-footer/index.d.ts +56 -0
  431. package/lib/layout-footer/src/layout-footer.d.ts +10 -0
  432. package/lib/layout-footer/src/layout-footer.js +60 -57
  433. package/lib/layout-header/index.d.ts +48 -0
  434. package/lib/layout-header/src/layout-header.d.ts +8 -0
  435. package/lib/layout-header/src/layout-header.js +58 -55
  436. package/lib/link/index.d.ts +210 -0
  437. package/lib/link/src/link.d.ts +51 -0
  438. package/lib/link/src/link.js +131 -128
  439. package/lib/list/index.d.ts +538 -0
  440. package/lib/list/src/list.d.ts +110 -0
  441. package/lib/list/src/list.js +2173 -2170
  442. package/lib/list/src/store.d.ts +6 -0
  443. package/lib/list/src/util.d.ts +2 -0
  444. package/lib/loading/index.d.ts +257 -0
  445. package/lib/loading/src/loading.d.ts +56 -0
  446. package/lib/loading/src/loading.js +141 -138
  447. package/lib/locale/ar-EG.umd.d.ts +908 -0
  448. package/lib/locale/de-DE.umd.d.ts +908 -0
  449. package/lib/locale/en-US.umd.d.ts +908 -0
  450. package/lib/locale/es-ES.umd.d.ts +908 -0
  451. package/lib/locale/fr-FR.umd.d.ts +908 -0
  452. package/lib/locale/hu-HU.umd.d.ts +908 -0
  453. package/lib/locale/hy-AM.umd.d.ts +908 -0
  454. package/lib/locale/id-ID.umd.d.ts +908 -0
  455. package/lib/locale/it-IT.umd.d.ts +908 -0
  456. package/lib/locale/ja-JP.umd.d.ts +908 -0
  457. package/lib/locale/ko-KR.umd.d.ts +908 -0
  458. package/lib/locale/ms-MY.umd.d.ts +908 -0
  459. package/lib/locale/nb-NO.umd.d.ts +908 -0
  460. package/lib/locale/pt-BR.umd.d.ts +908 -0
  461. package/lib/locale/ru-RU.umd.d.ts +908 -0
  462. package/lib/locale/th-TH.umd.d.ts +908 -0
  463. package/lib/locale/ug-CN.umd.d.ts +908 -0
  464. package/lib/locale/uk-UA.umd.d.ts +908 -0
  465. package/lib/locale/uz-UZ.umd.d.ts +908 -0
  466. package/lib/locale/vi-VN.umd.d.ts +908 -0
  467. package/lib/locale/zh-CHT.umd.d.ts +908 -0
  468. package/lib/locale/zh-CN.umd.d.ts +908 -0
  469. package/lib/locale/zh-HK.umd.d.ts +908 -0
  470. package/lib/locale/zh-MO.umd.d.ts +908 -0
  471. package/lib/locale/zh-TC.umd.d.ts +908 -0
  472. package/lib/locale/zh-TW.umd.d.ts +908 -0
  473. package/lib/mention/index.d.ts +84 -0
  474. package/lib/mention/src/mention.d.ts +16 -0
  475. package/lib/mention/src/mention.js +49 -46
  476. package/lib/menu/index.d.ts +446 -0
  477. package/lib/menu/src/menu.d.ts +98 -0
  478. package/lib/menu/src/menu.js +799 -796
  479. package/lib/modal/index.d.ts +1934 -0
  480. package/lib/modal/src/modal.d.ts +457 -0
  481. package/lib/modal/src/modal.js +1519 -1527
  482. package/lib/modal/src/store.d.ts +2 -0
  483. package/lib/notice-bar/index.d.ts +232 -0
  484. package/lib/notice-bar/src/notice-bar.d.ts +49 -0
  485. package/lib/notice-bar/src/notice-bar.js +168 -165
  486. package/lib/number-input/index.d.ts +1208 -0
  487. package/lib/number-input/src/number-input.d.ts +268 -0
  488. package/lib/number-input/src/number-input.js +1094 -1091
  489. package/lib/number-input/src/util.d.ts +3 -0
  490. package/lib/optgroup/index.d.ts +150 -0
  491. package/lib/option/index.d.ts +158 -0
  492. package/lib/pager/index.d.ts +682 -0
  493. package/lib/pager/src/pager.d.ts +155 -0
  494. package/lib/pager/src/pager.js +767 -764
  495. package/lib/password-input/index.d.ts +572 -0
  496. package/lib/password-input/src/password-input.d.ts +122 -0
  497. package/lib/password-input/src/password-input.js +431 -428
  498. package/lib/print/index.d.ts +454 -0
  499. package/lib/print/src/page-break.d.ts +9 -0
  500. package/lib/print/src/page-break.js +63 -60
  501. package/lib/print/src/print.d.ts +113 -0
  502. package/lib/print/src/print.js +303 -300
  503. package/lib/print/src/util.d.ts +6 -0
  504. package/lib/print-page-break/index.d.ts +60 -0
  505. package/lib/pulldown/index.d.ts +356 -0
  506. package/lib/pulldown/src/pulldown.d.ts +99 -0
  507. package/lib/pulldown/src/pulldown.js +403 -400
  508. package/lib/radio/index.d.ts +292 -0
  509. package/lib/radio/src/button.d.ts +73 -0
  510. package/lib/radio/src/button.js +214 -211
  511. package/lib/radio/src/group.d.ts +66 -0
  512. package/lib/radio/src/group.js +195 -192
  513. package/lib/radio/src/radio.d.ts +71 -0
  514. package/lib/radio/src/radio.js +194 -191
  515. package/lib/radio-button/index.d.ts +304 -0
  516. package/lib/radio-group/index.d.ts +308 -0
  517. package/lib/rate/index.d.ts +200 -0
  518. package/lib/rate/src/rate.d.ts +41 -0
  519. package/lib/rate/src/rate.js +164 -161
  520. package/lib/result/index.d.ts +96 -0
  521. package/lib/result/src/result.d.ts +20 -0
  522. package/lib/result/src/result.js +116 -113
  523. package/lib/row/index.d.ts +192 -0
  524. package/lib/row/src/col.d.ts +26 -0
  525. package/lib/row/src/col.js +133 -130
  526. package/lib/row/src/row.d.ts +40 -0
  527. package/lib/row/src/row.js +111 -108
  528. package/lib/scrollbar/index.d.ts +660 -0
  529. package/lib/scrollbar/src/scrollbar.d.ts +167 -0
  530. package/lib/scrollbar/src/scrollbar.js +518 -515
  531. package/lib/segmented/index.d.ts +210 -0
  532. package/lib/segmented/src/segmented.d.ts +44 -0
  533. package/lib/segmented/src/segmented.js +240 -237
  534. package/lib/select/index.d.ts +1120 -0
  535. package/lib/select/src/optgroup.d.ts +31 -0
  536. package/lib/select/src/optgroup.js +44 -41
  537. package/lib/select/src/option-info.d.ts +5 -0
  538. package/lib/select/src/option.d.ts +33 -0
  539. package/lib/select/src/option.js +39 -36
  540. package/lib/select/src/select.d.ts +303 -0
  541. package/lib/select/src/select.js +1915 -1897
  542. package/lib/select/src/util.d.ts +10 -0
  543. package/lib/slider/index.d.ts +530 -0
  544. package/lib/slider/src/slider.d.ts +115 -0
  545. package/lib/slider/src/slider.js +419 -416
  546. package/lib/space/index.d.ts +548 -0
  547. package/lib/space/src/space.d.ts +126 -0
  548. package/lib/space/src/space.js +190 -187
  549. package/lib/split/index.d.ts +348 -0
  550. package/lib/split-pane/index.d.ts +230 -0
  551. package/lib/splitter/index.d.ts +348 -0
  552. package/lib/splitter/src/splitter-panel.d.ts +51 -0
  553. package/lib/splitter/src/splitter-panel.js +146 -143
  554. package/lib/splitter/src/splitter.d.ts +73 -0
  555. package/lib/splitter/src/splitter.js +917 -914
  556. package/lib/splitter/src/util.d.ts +3 -0
  557. package/lib/splitter-panel/index.d.ts +230 -0
  558. package/lib/step-item/index.d.ts +76 -0
  559. package/lib/step-item/index.js +47 -0
  560. package/lib/steps/index.d.ts +314 -0
  561. package/lib/steps/src/step-info.d.ts +6 -0
  562. package/lib/steps/src/step-info.js +49 -0
  563. package/lib/steps/src/step-item.d.ts +14 -0
  564. package/lib/steps/src/step-item.js +59 -0
  565. package/lib/steps/src/steps.d.ts +69 -0
  566. package/lib/steps/src/steps.js +298 -46
  567. package/lib/steps/src/util.d.ts +7 -0
  568. package/lib/steps/src/util.js +74 -0
  569. package/lib/steps/style/style.css +297 -0
  570. package/lib/steps/style/style.mini.css +1 -0
  571. package/lib/style.css +307 -1
  572. package/lib/style.mini.css +1 -1
  573. package/lib/switch/index.d.ts +332 -0
  574. package/lib/switch/src/switch.d.ts +71 -0
  575. package/lib/switch/src/switch.js +228 -225
  576. package/lib/tab-pane/index.d.ts +96 -0
  577. package/lib/table-select/index.d.ts +528 -0
  578. package/lib/table-select/src/table-select.d.ts +122 -0
  579. package/lib/table-select/src/table-select.js +865 -862
  580. package/lib/table-transfer/index.d.ts +100 -0
  581. package/lib/table-transfer/src/table-transfer.d.ts +20 -0
  582. package/lib/table-transfer/src/table-transfer.js +61 -58
  583. package/lib/tabs/index.d.ts +488 -0
  584. package/lib/tabs/src/tab-pane.d.ts +20 -0
  585. package/lib/tabs/src/tab-pane.js +102 -99
  586. package/lib/tabs/src/tabs.d.ts +105 -0
  587. package/lib/tabs/src/tabs.js +936 -933
  588. package/lib/tabs/src/util.d.ts +3 -0
  589. package/lib/tag/index.d.ts +332 -0
  590. package/lib/tag/src/tag.d.ts +71 -0
  591. package/lib/tag/src/tag.js +163 -160
  592. package/lib/text/index.d.ts +242 -0
  593. package/lib/text/src/text.d.ts +48 -0
  594. package/lib/text/src/text.js +232 -229
  595. package/lib/text-ellipsis/index.d.ts +218 -0
  596. package/lib/text-ellipsis/src/text-ellipsis.d.ts +53 -0
  597. package/lib/text-ellipsis/src/text-ellipsis.js +252 -249
  598. package/lib/textarea/index.d.ts +738 -0
  599. package/lib/textarea/src/textarea.d.ts +170 -0
  600. package/lib/textarea/src/textarea.js +434 -431
  601. package/lib/timeline/index.d.ts +176 -0
  602. package/lib/timeline/src/timeline-info.d.ts +6 -0
  603. package/lib/timeline/src/timeline-item.d.ts +12 -0
  604. package/lib/timeline/src/timeline.d.ts +38 -0
  605. package/lib/timeline/src/timeline.js +74 -36
  606. package/lib/timeline/src/util.d.ts +7 -0
  607. package/lib/timeline/src/util.js +7 -4
  608. package/lib/timeline-item/index.d.ts +68 -0
  609. package/lib/tip/index.d.ts +275 -0
  610. package/lib/tip/src/tip.d.ts +46 -0
  611. package/lib/tip/src/tip.js +117 -114
  612. package/lib/tooltip/index.d.ts +890 -0
  613. package/lib/tooltip/src/tooltip.d.ts +202 -0
  614. package/lib/tooltip/src/tooltip.js +552 -549
  615. package/lib/tour/index.d.ts +84 -0
  616. package/lib/tour/src/tour.d.ts +16 -0
  617. package/lib/tour/src/tour.js +49 -46
  618. package/lib/transfer/index.d.ts +100 -0
  619. package/lib/transfer/src/transfer.d.ts +20 -0
  620. package/lib/transfer/src/transfer.js +95 -92
  621. package/lib/tree/index.d.ts +1402 -0
  622. package/lib/tree/src/store.d.ts +6 -0
  623. package/lib/tree/src/tree.d.ts +313 -0
  624. package/lib/tree/src/tree.js +3379 -3376
  625. package/lib/tree/src/util.d.ts +3 -0
  626. package/lib/tree-select/index.d.ts +986 -0
  627. package/lib/tree-select/src/tree-select.d.ts +255 -0
  628. package/lib/tree-select/src/tree-select.js +969 -966
  629. package/lib/ui/index.d.ts +6 -0
  630. package/lib/ui/index.js +8 -2
  631. package/lib/ui/src/anime.d.ts +10 -0
  632. package/lib/ui/src/comp.d.ts +2 -0
  633. package/lib/ui/src/dom.d.ts +70 -0
  634. package/lib/ui/src/log.d.ts +6 -0
  635. package/lib/ui/src/log.js +1 -1
  636. package/lib/ui/src/utils.d.ts +23 -0
  637. package/lib/ui/src/vn.d.ts +6 -0
  638. package/lib/upload/index.d.ts +1778 -0
  639. package/lib/upload/src/upload.d.ts +413 -0
  640. package/lib/upload/src/upload.js +1788 -1785
  641. package/lib/upload/src/util.d.ts +16 -0
  642. package/lib/vxe-alert/index.d.ts +3 -0
  643. package/lib/vxe-anchor/index.d.ts +3 -0
  644. package/lib/vxe-anchor-link/index.d.ts +3 -0
  645. package/lib/vxe-avatar/index.d.ts +3 -0
  646. package/lib/vxe-backtop/index.d.ts +3 -0
  647. package/lib/vxe-badge/index.d.ts +3 -0
  648. package/lib/vxe-breadcrumb/index.d.ts +3 -0
  649. package/lib/vxe-breadcrumb-item/index.d.ts +3 -0
  650. package/lib/vxe-button/index.d.ts +3 -0
  651. package/lib/vxe-button-group/index.d.ts +3 -0
  652. package/lib/vxe-calendar/index.d.ts +3 -0
  653. package/lib/vxe-card/index.d.ts +3 -0
  654. package/lib/vxe-carousel/index.d.ts +3 -0
  655. package/lib/vxe-carousel-item/index.d.ts +3 -0
  656. package/lib/vxe-cascader/index.d.ts +3 -0
  657. package/lib/vxe-checkbox/index.d.ts +3 -0
  658. package/lib/vxe-checkbox-button/index.d.ts +3 -0
  659. package/lib/vxe-checkbox-group/index.d.ts +3 -0
  660. package/lib/vxe-col/index.d.ts +3 -0
  661. package/lib/vxe-collapse/index.d.ts +3 -0
  662. package/lib/vxe-collapse-pane/index.d.ts +3 -0
  663. package/lib/vxe-color-picker/index.d.ts +3 -0
  664. package/lib/vxe-context-menu/index.d.ts +3 -0
  665. package/lib/vxe-countdown/index.d.ts +3 -0
  666. package/lib/vxe-date-panel/index.d.ts +3 -0
  667. package/lib/vxe-date-picker/index.d.ts +3 -0
  668. package/lib/vxe-date-range-picker/index.d.ts +3 -0
  669. package/lib/vxe-divider/index.d.ts +3 -0
  670. package/lib/vxe-drawer/index.d.ts +3 -0
  671. package/lib/vxe-empty/index.d.ts +3 -0
  672. package/lib/vxe-form/index.d.ts +3 -0
  673. package/lib/vxe-form-gather/index.d.ts +3 -0
  674. package/lib/vxe-form-group/index.d.ts +3 -0
  675. package/lib/vxe-form-item/index.d.ts +3 -0
  676. package/lib/vxe-icon/index.d.ts +3 -0
  677. package/lib/vxe-icon/style/style.css +1 -1
  678. package/lib/vxe-icon/style/style.mini.css +1 -1
  679. package/lib/vxe-icon-picker/index.d.ts +3 -0
  680. package/lib/vxe-image/index.d.ts +3 -0
  681. package/lib/vxe-image-group/index.d.ts +3 -0
  682. package/lib/vxe-image-preview/index.d.ts +3 -0
  683. package/lib/vxe-input/index.d.ts +3 -0
  684. package/lib/vxe-layout-aside/index.d.ts +3 -0
  685. package/lib/vxe-layout-body/index.d.ts +3 -0
  686. package/lib/vxe-layout-container/index.d.ts +3 -0
  687. package/lib/vxe-layout-footer/index.d.ts +3 -0
  688. package/lib/vxe-layout-header/index.d.ts +3 -0
  689. package/lib/vxe-link/index.d.ts +3 -0
  690. package/lib/vxe-list/index.d.ts +3 -0
  691. package/lib/vxe-loading/index.d.ts +3 -0
  692. package/lib/vxe-mention/index.d.ts +3 -0
  693. package/lib/vxe-menu/index.d.ts +3 -0
  694. package/lib/vxe-modal/index.d.ts +3 -0
  695. package/lib/vxe-notice-bar/index.d.ts +3 -0
  696. package/lib/vxe-number-input/index.d.ts +3 -0
  697. package/lib/vxe-optgroup/index.d.ts +3 -0
  698. package/lib/vxe-option/index.d.ts +3 -0
  699. package/lib/vxe-pager/index.d.ts +3 -0
  700. package/lib/vxe-password-input/index.d.ts +3 -0
  701. package/lib/vxe-print/index.d.ts +3 -0
  702. package/lib/vxe-print-page-break/index.d.ts +3 -0
  703. package/lib/vxe-pulldown/index.d.ts +3 -0
  704. package/lib/vxe-radio/index.d.ts +3 -0
  705. package/lib/vxe-radio-button/index.d.ts +3 -0
  706. package/lib/vxe-radio-group/index.d.ts +3 -0
  707. package/lib/vxe-rate/index.d.ts +3 -0
  708. package/lib/vxe-result/index.d.ts +3 -0
  709. package/lib/vxe-row/index.d.ts +3 -0
  710. package/lib/vxe-scrollbar/index.d.ts +3 -0
  711. package/lib/vxe-segmented/index.d.ts +3 -0
  712. package/lib/vxe-select/index.d.ts +3 -0
  713. package/lib/vxe-slider/index.d.ts +3 -0
  714. package/lib/vxe-space/index.d.ts +3 -0
  715. package/lib/vxe-split/index.d.ts +3 -0
  716. package/lib/vxe-split-pane/index.d.ts +3 -0
  717. package/lib/vxe-splitter/index.d.ts +3 -0
  718. package/lib/vxe-splitter-panel/index.d.ts +3 -0
  719. package/lib/vxe-steps/index.d.ts +3 -0
  720. package/lib/vxe-steps/style/style.css +297 -0
  721. package/lib/vxe-steps/style/style.mini.css +1 -0
  722. package/lib/vxe-switch/index.d.ts +3 -0
  723. package/lib/vxe-tab-pane/index.d.ts +3 -0
  724. package/lib/vxe-table-select/index.d.ts +3 -0
  725. package/lib/vxe-table-transfer/index.d.ts +3 -0
  726. package/lib/vxe-tabs/index.d.ts +3 -0
  727. package/lib/vxe-tag/index.d.ts +3 -0
  728. package/lib/vxe-text/index.d.ts +3 -0
  729. package/lib/vxe-text-ellipsis/index.d.ts +3 -0
  730. package/lib/vxe-textarea/index.d.ts +3 -0
  731. package/lib/vxe-timeline/index.d.ts +3 -0
  732. package/lib/vxe-timeline-item/index.d.ts +3 -0
  733. package/lib/vxe-tip/index.d.ts +3 -0
  734. package/lib/vxe-tooltip/index.d.ts +3 -0
  735. package/lib/vxe-tour/index.d.ts +3 -0
  736. package/lib/vxe-transfer/index.d.ts +3 -0
  737. package/lib/vxe-tree/index.d.ts +3 -0
  738. package/lib/vxe-tree-select/index.d.ts +3 -0
  739. package/lib/vxe-ui/index.d.ts +3 -0
  740. package/lib/vxe-upload/index.d.ts +3 -0
  741. package/lib/vxe-watermark/index.d.ts +3 -0
  742. package/lib/watermark/index.d.ts +183 -0
  743. package/lib/watermark/src/util.d.ts +9 -0
  744. package/lib/watermark/src/watermark.d.ts +39 -0
  745. package/lib/watermark/src/watermark.js +158 -155
  746. package/package.json +9 -9
  747. package/packages/alert/src/alert.ts +2 -2
  748. package/packages/anchor/src/anchor-link.ts +2 -2
  749. package/packages/anchor/src/anchor.ts +2 -2
  750. package/packages/avatar/src/avatar.ts +2 -2
  751. package/packages/backtop/src/backtop.ts +2 -2
  752. package/packages/badge/src/badge.ts +2 -2
  753. package/packages/breadcrumb/src/breadcrumb-item.ts +2 -2
  754. package/packages/breadcrumb/src/breadcrumb.ts +2 -2
  755. package/packages/button/src/button-group.ts +2 -2
  756. package/packages/calendar/src/calendar.ts +2 -2
  757. package/packages/card/src/card.ts +2 -2
  758. package/packages/carousel/src/carousel-item.ts +2 -2
  759. package/packages/carousel/src/carousel.ts +2 -2
  760. package/packages/cascader/src/cascader.ts +2 -2
  761. package/packages/checkbox/src/button.ts +3 -15
  762. package/packages/checkbox/src/checkbox.ts +2 -2
  763. package/packages/checkbox/src/group.ts +2 -2
  764. package/packages/collapse/src/collapse-pane.ts +2 -2
  765. package/packages/collapse/src/collapse.ts +2 -2
  766. package/packages/color-picker/src/color-picker.ts +2 -2
  767. package/packages/components.ts +3 -0
  768. package/packages/context-menu/src/context-menu.ts +3 -16
  769. package/packages/countdown/src/countdown.ts +2 -2
  770. package/packages/date-panel/src/date-panel.ts +2 -2
  771. package/packages/date-picker/src/date-picker.ts +2 -2
  772. package/packages/date-range-picker/src/date-range-picker.ts +2 -2
  773. package/packages/divider/src/divider.ts +2 -2
  774. package/packages/drawer/src/drawer.ts +2 -2
  775. package/packages/empty/src/empty.ts +2 -2
  776. package/packages/form/src/form-group.ts +2 -2
  777. package/packages/form/src/form-item.ts +2 -2
  778. package/packages/form/src/form.ts +2 -2
  779. package/packages/icon/src/icon.ts +2 -2
  780. package/packages/icon-picker/src/icon-picker.ts +2 -2
  781. package/packages/image/src/group.ts +2 -2
  782. package/packages/image/src/image.ts +2 -2
  783. package/packages/image/src/preview.ts +3 -16
  784. package/packages/index.ts +2 -2
  785. package/packages/input/src/input.ts +2 -2
  786. package/packages/layout-aside/src/layout-aside.ts +2 -2
  787. package/packages/layout-body/src/layout-body.ts +2 -2
  788. package/packages/layout-container/src/layout-container.ts +3 -14
  789. package/packages/layout-footer/src/layout-footer.ts +2 -2
  790. package/packages/layout-header/src/layout-header.ts +2 -2
  791. package/packages/link/src/link.ts +2 -2
  792. package/packages/list/src/list.ts +2 -2
  793. package/packages/loading/src/loading.ts +2 -2
  794. package/packages/mention/src/mention.ts +2 -2
  795. package/packages/menu/src/menu.ts +2 -2
  796. package/packages/modal/src/modal.ts +5 -20
  797. package/packages/notice-bar/src/notice-bar.ts +2 -2
  798. package/packages/number-input/src/number-input.ts +3 -17
  799. package/packages/pager/src/pager.ts +2 -2
  800. package/packages/password-input/src/password-input.ts +2 -2
  801. package/packages/print/src/page-break.ts +2 -2
  802. package/packages/print/src/print.ts +2 -2
  803. package/packages/pulldown/src/pulldown.ts +2 -2
  804. package/packages/radio/src/button.ts +3 -16
  805. package/packages/radio/src/group.ts +3 -17
  806. package/packages/radio/src/radio.ts +2 -2
  807. package/packages/rate/src/rate.ts +2 -2
  808. package/packages/result/src/result.ts +2 -2
  809. package/packages/row/src/col.ts +2 -2
  810. package/packages/row/src/row.ts +2 -2
  811. package/packages/scrollbar/src/scrollbar.ts +3 -4
  812. package/packages/segmented/src/segmented.ts +2 -2
  813. package/packages/select/src/optgroup.ts +2 -2
  814. package/packages/select/src/option.ts +2 -2
  815. package/packages/select/src/select.ts +33 -19
  816. package/packages/slider/src/slider.ts +2 -2
  817. package/packages/space/src/space.ts +2 -2
  818. package/packages/splitter/src/splitter-panel.ts +2 -2
  819. package/packages/splitter/src/splitter.ts +2 -2
  820. package/packages/step-item/index.ts +16 -0
  821. package/packages/steps/src/step-info.ts +18 -0
  822. package/packages/steps/src/step-item.ts +41 -0
  823. package/packages/steps/src/steps.ts +273 -13
  824. package/packages/steps/src/util.ts +44 -0
  825. package/packages/switch/src/switch.ts +2 -2
  826. package/packages/table-select/src/table-select.ts +2 -2
  827. package/packages/table-transfer/src/table-transfer.ts +3 -15
  828. package/packages/tabs/src/tab-pane.ts +2 -2
  829. package/packages/tabs/src/tabs.ts +2 -2
  830. package/packages/tag/src/tag.ts +2 -2
  831. package/packages/text/src/text.ts +2 -2
  832. package/packages/text-ellipsis/src/text-ellipsis.ts +2 -2
  833. package/packages/textarea/src/textarea.ts +2 -2
  834. package/packages/timeline/src/timeline-info.ts +17 -17
  835. package/packages/timeline/src/timeline.ts +93 -49
  836. package/packages/timeline/src/util.ts +44 -41
  837. package/packages/tip/src/tip.ts +2 -2
  838. package/packages/tooltip/src/tooltip.ts +2 -2
  839. package/packages/tour/src/tour.ts +2 -2
  840. package/packages/transfer/src/transfer.ts +2 -2
  841. package/packages/tree/src/tree.ts +2 -2
  842. package/packages/tree-select/src/tree-select.ts +2 -2
  843. package/packages/ui/index.ts +8 -1
  844. package/packages/upload/src/upload.ts +2 -2
  845. package/packages/watermark/src/watermark.ts +2 -2
  846. package/styles/all.scss +1 -0
  847. package/styles/components/step-item.scss +0 -0
  848. package/styles/components/steps.scss +354 -0
  849. package/styles/theme/base.scss +9 -0
  850. package/types/all.d.ts +3 -0
  851. package/types/components/gantt.d.ts +1 -3
  852. package/types/components/select.d.ts +1 -13
  853. package/types/components/step-item.d.ts +72 -0
  854. package/types/components/steps.d.ts +67 -8
  855. package/types/components/table.d.ts +7 -66
  856. package/types/handles/form-design.d.ts +1 -4
  857. package/types/ui/global-config.d.ts +2 -0
  858. package/types/ui/global-icon.d.ts +7 -0
  859. /package/dist/{iconfont.1793330162657.ttf → iconfont.1793683457630.ttf} +0 -0
  860. /package/dist/{iconfont.1793330162657.woff → iconfont.1793683457630.woff} +0 -0
  861. /package/dist/{iconfont.1793330162657.woff2 → iconfont.1793683457630.woff2} +0 -0
  862. /package/es/icon/{iconfont.1793330162657.ttf → iconfont.1793683457630.ttf} +0 -0
  863. /package/es/icon/{iconfont.1793330162657.woff → iconfont.1793683457630.woff} +0 -0
  864. /package/es/icon/{iconfont.1793330162657.woff2 → iconfont.1793683457630.woff2} +0 -0
  865. /package/es/{iconfont.1793330162657.ttf → iconfont.1793683457630.ttf} +0 -0
  866. /package/es/{iconfont.1793330162657.woff → iconfont.1793683457630.woff} +0 -0
  867. /package/es/{iconfont.1793330162657.woff2 → iconfont.1793683457630.woff2} +0 -0
  868. /package/es/vxe-icon/{iconfont.1793330162657.ttf → iconfont.1793683457630.ttf} +0 -0
  869. /package/es/vxe-icon/{iconfont.1793330162657.woff → iconfont.1793683457630.woff} +0 -0
  870. /package/es/vxe-icon/{iconfont.1793330162657.woff2 → iconfont.1793683457630.woff2} +0 -0
  871. /package/lib/icon/style/{iconfont.1793330162657.ttf → iconfont.1793683457630.ttf} +0 -0
  872. /package/lib/icon/style/{iconfont.1793330162657.woff → iconfont.1793683457630.woff} +0 -0
  873. /package/lib/icon/style/{iconfont.1793330162657.woff2 → iconfont.1793683457630.woff2} +0 -0
  874. /package/lib/{iconfont.1793330162657.ttf → iconfont.1793683457630.ttf} +0 -0
  875. /package/lib/{iconfont.1793330162657.woff → iconfont.1793683457630.woff} +0 -0
  876. /package/lib/{iconfont.1793330162657.woff2 → iconfont.1793683457630.woff2} +0 -0
  877. /package/lib/vxe-icon/style/{iconfont.1793330162657.ttf → iconfont.1793683457630.ttf} +0 -0
  878. /package/lib/vxe-icon/style/{iconfont.1793330162657.woff → iconfont.1793683457630.woff} +0 -0
  879. /package/lib/vxe-icon/style/{iconfont.1793330162657.woff2 → iconfont.1793683457630.woff2} +0 -0
@@ -73,1639 +73,1642 @@ function createInternalData() {
73
73
  laseFocusMasked: 0
74
74
  };
75
75
  }
76
- var date_picker_default = (0, import_comp.defineVxeComponent)({
77
- name: "VxeDatePicker",
78
- props: {
79
- modelValue: [String, Number, Date],
80
- immediate: {
81
- type: Boolean,
82
- default: true
83
- },
84
- name: String,
85
- type: {
86
- type: String,
87
- default: "date"
88
- },
89
- width: [Number, String],
90
- clearable: {
91
- type: Boolean,
92
- default: () => getConfig().datePicker.clearable
93
- },
94
- readonly: {
95
- type: Boolean,
96
- default: null
97
- },
98
- disabled: {
99
- type: Boolean,
100
- default: null
101
- },
102
- placeholder: String,
103
- autoComplete: {
104
- type: String,
105
- default: "off"
106
- },
107
- form: String,
108
- className: String,
109
- inputClassName: {
110
- type: String,
111
- default: () => getConfig().datePicker.inputClassName
112
- },
113
- zIndex: Number,
114
- size: {
115
- type: String,
116
- default: () => getConfig().datePicker.size || getConfig().size
117
- },
118
- multiple: Boolean,
119
- limitCount: {
120
- type: [String, Number],
121
- default: () => getConfig().datePicker.limitCount
122
- },
123
- // date、week、month、quarter、year
124
- startDate: {
125
- type: [String, Number, Date],
126
- default: () => getConfig().datePicker.startDate
127
- },
128
- endDate: {
129
- type: [String, Number, Date],
130
- default: () => getConfig().datePicker.endDate
131
- },
132
- defaultDate: [String, Number, Date],
133
- defaultTime: [String, Number, Date],
134
- minDate: [String, Number, Date],
135
- maxDate: [String, Number, Date],
136
- startDay: {
137
- type: [String, Number],
138
- default: () => getConfig().datePicker.startDay
139
- },
140
- labelFormat: String,
141
- valueFormat: String,
142
- timeFormat: String,
143
- parseInputMethod: Function,
144
- editable: {
145
- type: Boolean,
146
- default: true
147
- },
148
- festivalMethod: Function,
149
- disabledMethod: Function,
150
- // week
151
- selectDay: {
152
- type: [String, Number],
153
- default: () => getConfig().datePicker.selectDay
154
- },
155
- showClearButton: {
156
- type: Boolean,
157
- default: () => getConfig().datePicker.showClearButton
158
- },
159
- showConfirmButton: {
160
- type: Boolean,
161
- default: () => getConfig().datePicker.showConfirmButton
162
- },
163
- autoClose: {
164
- type: Boolean,
165
- default: () => getConfig().datePicker.autoClose
166
- },
167
- maskedConfig: Object,
168
- prefixIcon: String,
169
- suffixIcon: String,
170
- /**
171
- * 已废弃,请使用 popupConfig.placement
172
- * @deprecated
173
- */
174
- placement: String,
175
- /**
176
- * 已废弃,请使用 popupConfig.transfer
177
- * @deprecated
178
- */
179
- transfer: {
180
- type: Boolean,
181
- default: null
76
+ var date_picker_default = (
77
+ /* define-vxe-component start */
78
+ (0, import_comp.defineVxeComponent)({
79
+ name: "VxeDatePicker",
80
+ props: {
81
+ modelValue: [String, Number, Date],
82
+ immediate: {
83
+ type: Boolean,
84
+ default: true
85
+ },
86
+ name: String,
87
+ type: {
88
+ type: String,
89
+ default: "date"
90
+ },
91
+ width: [Number, String],
92
+ clearable: {
93
+ type: Boolean,
94
+ default: () => getConfig().datePicker.clearable
95
+ },
96
+ readonly: {
97
+ type: Boolean,
98
+ default: null
99
+ },
100
+ disabled: {
101
+ type: Boolean,
102
+ default: null
103
+ },
104
+ placeholder: String,
105
+ autoComplete: {
106
+ type: String,
107
+ default: "off"
108
+ },
109
+ form: String,
110
+ className: String,
111
+ inputClassName: {
112
+ type: String,
113
+ default: () => getConfig().datePicker.inputClassName
114
+ },
115
+ zIndex: Number,
116
+ size: {
117
+ type: String,
118
+ default: () => getConfig().datePicker.size || getConfig().size
119
+ },
120
+ multiple: Boolean,
121
+ limitCount: {
122
+ type: [String, Number],
123
+ default: () => getConfig().datePicker.limitCount
124
+ },
125
+ // date、week、month、quarter、year
126
+ startDate: {
127
+ type: [String, Number, Date],
128
+ default: () => getConfig().datePicker.startDate
129
+ },
130
+ endDate: {
131
+ type: [String, Number, Date],
132
+ default: () => getConfig().datePicker.endDate
133
+ },
134
+ defaultDate: [String, Number, Date],
135
+ defaultTime: [String, Number, Date],
136
+ minDate: [String, Number, Date],
137
+ maxDate: [String, Number, Date],
138
+ startDay: {
139
+ type: [String, Number],
140
+ default: () => getConfig().datePicker.startDay
141
+ },
142
+ labelFormat: String,
143
+ valueFormat: String,
144
+ timeFormat: String,
145
+ parseInputMethod: Function,
146
+ editable: {
147
+ type: Boolean,
148
+ default: true
149
+ },
150
+ festivalMethod: Function,
151
+ disabledMethod: Function,
152
+ // week
153
+ selectDay: {
154
+ type: [String, Number],
155
+ default: () => getConfig().datePicker.selectDay
156
+ },
157
+ showClearButton: {
158
+ type: Boolean,
159
+ default: () => getConfig().datePicker.showClearButton
160
+ },
161
+ showConfirmButton: {
162
+ type: Boolean,
163
+ default: () => getConfig().datePicker.showConfirmButton
164
+ },
165
+ autoClose: {
166
+ type: Boolean,
167
+ default: () => getConfig().datePicker.autoClose
168
+ },
169
+ maskedConfig: Object,
170
+ prefixIcon: String,
171
+ suffixIcon: String,
172
+ /**
173
+ * 已废弃,请使用 popupConfig.placement
174
+ * @deprecated
175
+ */
176
+ placement: String,
177
+ /**
178
+ * 已废弃,请使用 popupConfig.transfer
179
+ * @deprecated
180
+ */
181
+ transfer: {
182
+ type: Boolean,
183
+ default: null
184
+ },
185
+ timeConfig: Object,
186
+ popupConfig: Object,
187
+ shortcutConfig: Object,
188
+ /**
189
+ * 已废弃 startWeek,被 startDay 替换
190
+ * @deprecated
191
+ */
192
+ startWeek: Number
182
193
  },
183
- timeConfig: Object,
184
- popupConfig: Object,
185
- shortcutConfig: Object,
186
- /**
187
- * 已废弃 startWeek,被 startDay 替换
188
- * @deprecated
189
- */
190
- startWeek: Number
191
- },
192
- emits: ["update:modelValue", "input", "change", "keydown", "keyup", "click", "focus", "blur", "clear", "confirm", "prefix-click", "suffix-click", "date-prev", "date-today", "date-next", "shortcut-click"],
193
- setup(props, context) {
194
- const { slots, emit } = context;
195
- const $xeModal = (0, import_vue.inject)("$xeModal", null);
196
- const $xeDrawer = (0, import_vue.inject)("$xeDrawer", null);
197
- const $xeTable = (0, import_vue.inject)("$xeTable", null);
198
- const $xeCard = (0, import_vue.inject)("$xeCard", null);
199
- const $xeForm = (0, import_vue.inject)("$xeForm", null);
200
- const formItemInfo = (0, import_vue.inject)("xeFormItemInfo", null);
201
- const xID = import_xe_utils.default.uniqueId();
202
- const { computeSize } = useFns.useSize(props);
203
- const reactData = (0, import_vue.reactive)(createReactData());
204
- const internalData = createInternalData();
205
- const defaultFuncProps = {
206
- parseInputMethod: getConfig().datePicker.parseInputMethod,
207
- festivalMethod: getConfig().datePicker.festivalMethod,
208
- disabledMethod: getConfig().datePicker.disabledMethod
209
- };
210
- const refElem = (0, import_vue.ref)();
211
- const refInputTarget = (0, import_vue.ref)();
212
- const refInputPanel = (0, import_vue.ref)();
213
- const refPanelWrapper = (0, import_vue.ref)();
214
- const refDatePanel = (0, import_vue.ref)();
215
- const refMaps = {
216
- refElem,
217
- refInput: refInputTarget
218
- };
219
- const $xeDatePicker = {
220
- xID,
221
- props,
222
- context,
223
- reactData,
224
- internalData,
225
- getRefMaps: () => refMaps
226
- };
227
- const computeBtnTransfer = (0, import_vue.computed)(() => {
228
- const { transfer } = props;
229
- const popupOpts = computePopupOpts.value;
230
- if (import_xe_utils.default.isBoolean(popupOpts.transfer)) {
231
- return popupOpts.transfer;
232
- }
233
- if (transfer === null) {
234
- const globalTransfer = getConfig().datePicker.transfer;
235
- if (import_xe_utils.default.isBoolean(globalTransfer)) {
236
- return globalTransfer;
237
- }
238
- if ($xeTable || $xeModal || $xeDrawer || $xeCard || $xeForm) {
239
- return true;
240
- }
241
- }
242
- return transfer;
243
- });
244
- const computeFormReadonly = (0, import_vue.computed)(() => {
245
- const { readonly } = props;
246
- if (readonly === null) {
247
- if ($xeForm) {
248
- return $xeForm.props.readonly;
249
- }
250
- return false;
251
- }
252
- return readonly;
253
- });
254
- const computeIsDisabled = (0, import_vue.computed)(() => {
255
- const { disabled } = props;
256
- if (disabled === null) {
257
- if ($xeForm) {
258
- return $xeForm.props.disabled;
194
+ emits: ["update:modelValue", "input", "change", "keydown", "keyup", "click", "focus", "blur", "clear", "confirm", "prefix-click", "suffix-click", "date-prev", "date-today", "date-next", "shortcut-click"],
195
+ setup(props, context) {
196
+ const { slots, emit } = context;
197
+ const $xeModal = (0, import_vue.inject)("$xeModal", null);
198
+ const $xeDrawer = (0, import_vue.inject)("$xeDrawer", null);
199
+ const $xeTable = (0, import_vue.inject)("$xeTable", null);
200
+ const $xeCard = (0, import_vue.inject)("$xeCard", null);
201
+ const $xeForm = (0, import_vue.inject)("$xeForm", null);
202
+ const formItemInfo = (0, import_vue.inject)("xeFormItemInfo", null);
203
+ const xID = import_xe_utils.default.uniqueId();
204
+ const { computeSize } = useFns.useSize(props);
205
+ const reactData = (0, import_vue.reactive)(createReactData());
206
+ const internalData = createInternalData();
207
+ const defaultFuncProps = {
208
+ parseInputMethod: getConfig().datePicker.parseInputMethod,
209
+ festivalMethod: getConfig().datePicker.festivalMethod,
210
+ disabledMethod: getConfig().datePicker.disabledMethod
211
+ };
212
+ const refElem = (0, import_vue.ref)();
213
+ const refInputTarget = (0, import_vue.ref)();
214
+ const refInputPanel = (0, import_vue.ref)();
215
+ const refPanelWrapper = (0, import_vue.ref)();
216
+ const refDatePanel = (0, import_vue.ref)();
217
+ const refMaps = {
218
+ refElem,
219
+ refInput: refInputTarget
220
+ };
221
+ const $xeDatePicker = {
222
+ xID,
223
+ props,
224
+ context,
225
+ reactData,
226
+ internalData,
227
+ getRefMaps: () => refMaps
228
+ };
229
+ const computeBtnTransfer = (0, import_vue.computed)(() => {
230
+ const { transfer } = props;
231
+ const popupOpts = computePopupOpts.value;
232
+ if (import_xe_utils.default.isBoolean(popupOpts.transfer)) {
233
+ return popupOpts.transfer;
259
234
  }
260
- return false;
261
- }
262
- return disabled;
263
- });
264
- const computeIsTimeType = (0, import_vue.computed)(() => {
265
- const { type } = props;
266
- return type === "time";
267
- });
268
- const computeIsTimeOrDateTimeType = (0, import_vue.computed)(() => {
269
- const { type } = props;
270
- const isTimeType = computeIsTimeType.value;
271
- return isTimeType || type === "datetime";
272
- });
273
- const computeIsDatePickerType = (0, import_vue.computed)(() => {
274
- const isTimeOrDateTimeType = computeIsTimeOrDateTimeType.value;
275
- return isTimeOrDateTimeType || ["date", "week", "month", "quarter", "year"].indexOf(props.type) > -1;
276
- });
277
- const computeIsClearable = (0, import_vue.computed)(() => {
278
- return props.clearable;
279
- });
280
- const computeIsDatePanelType = (0, import_vue.computed)(() => {
281
- const isTimeOrDateTimeType = computeIsTimeOrDateTimeType.value;
282
- return isTimeOrDateTimeType || ["date", "week", "month", "quarter", "year"].indexOf(props.type) > -1;
283
- });
284
- const computeDateListValue = (0, import_vue.computed)(() => {
285
- const { modelValue, type, multiple } = props;
286
- const isDatePanelType = computeIsDatePanelType.value;
287
- const dateValueFormat = computeDateValueFormat.value;
288
- if (multiple && modelValue && isDatePanelType) {
289
- return import_xe_utils.default.toValueString(modelValue).split(",").map((item) => {
290
- const date = (0, import_util.parseDateValue)(item, type, {
291
- valueFormat: dateValueFormat
292
- });
293
- if (import_xe_utils.default.isValidDate(date)) {
294
- return date;
235
+ if (transfer === null) {
236
+ const globalTransfer = getConfig().datePicker.transfer;
237
+ if (import_xe_utils.default.isBoolean(globalTransfer)) {
238
+ return globalTransfer;
295
239
  }
296
- return date;
297
- });
298
- }
299
- return [];
300
- });
301
- const computeCurrStyle = (0, import_vue.computed)(() => {
302
- const { width } = props;
303
- const stys = {};
304
- if (width) {
305
- stys.width = (0, import_dom.toCssUnit)(width);
306
- }
307
- return stys;
308
- });
309
- const computeDateStartDate = (0, import_vue.computed)(() => {
310
- return props.startDate ? import_xe_utils.default.toStringDate(props.startDate) : null;
311
- });
312
- const computeDateEndDate = (0, import_vue.computed)(() => {
313
- return props.endDate ? import_xe_utils.default.toStringDate(props.endDate) : null;
314
- });
315
- const computeLimitMaxCount = (0, import_vue.computed)(() => {
316
- return props.multiple ? import_xe_utils.default.toNumber(props.limitCount) : 0;
317
- });
318
- const computeDateMultipleValue = (0, import_vue.computed)(() => {
319
- const dateListValue = computeDateListValue.value;
320
- const dateValueFormat = computeDateValueFormat.value;
321
- return dateListValue.map((date) => import_xe_utils.default.toDateString(date, dateValueFormat));
322
- });
323
- const computeOverCount = (0, import_vue.computed)(() => {
324
- const { multiple } = props;
325
- const limitMaxCount = computeLimitMaxCount.value;
326
- const dateMultipleValue = computeDateMultipleValue.value;
327
- if (multiple && limitMaxCount) {
328
- return dateMultipleValue.length >= limitMaxCount;
329
- }
330
- return false;
331
- });
332
- const computeInputReadonly = (0, import_vue.computed)(() => {
333
- const { type, editable, multiple } = props;
334
- const formReadonly = computeFormReadonly.value;
335
- return formReadonly || multiple || !editable || type === "week" || type === "quarter";
336
- });
337
- const computeInpPlaceholder = (0, import_vue.computed)(() => {
338
- const { placeholder } = props;
339
- if (placeholder) {
340
- return (0, import_utils.getFuncText)(placeholder);
341
- }
342
- const globalPlaceholder = getConfig().datePicker.placeholder;
343
- if (globalPlaceholder) {
344
- return (0, import_utils.getFuncText)(globalPlaceholder);
345
- }
346
- return getI18n("vxe.base.pleaseSelect");
347
- });
348
- const computeInpImmediate = (0, import_vue.computed)(() => {
349
- const { immediate } = props;
350
- return immediate;
351
- });
352
- const computeTimeOpts = (0, import_vue.computed)(() => {
353
- return Object.assign({}, getConfig().datePicker.timeConfig, props.timeConfig);
354
- });
355
- const computePopupOpts = (0, import_vue.computed)(() => {
356
- return Object.assign({}, getConfig().datePicker.popupConfig, props.popupConfig);
357
- });
358
- const computeShortcutOpts = (0, import_vue.computed)(() => {
359
- return Object.assign({}, getConfig().datePicker.shortcutConfig, props.shortcutConfig);
360
- });
361
- const computeShortcutList = (0, import_vue.computed)(() => {
362
- const shortcutOpts = computeShortcutOpts.value;
363
- const { options } = shortcutOpts;
364
- if (options) {
365
- return options.map((option, index) => {
366
- return Object.assign(
367
- {
368
- name: `${option.name || option.code || index}`
369
- },
370
- option
371
- );
372
- });
373
- }
374
- return [];
375
- });
376
- const computeDateLabelFormat = (0, import_vue.computed)(() => {
377
- const { labelFormat } = props;
378
- return labelFormat || getI18n(`vxe.input.date.labelFormat.${props.type}`);
379
- });
380
- const computeDateValueFormat = (0, import_vue.computed)(() => {
381
- const { type, valueFormat } = props;
382
- return (0, import_util.handleValueFormat)(type, valueFormat);
383
- });
384
- const computeDateMaskedFormat = (0, import_vue.computed)(() => {
385
- const dateLabelFormat = computeDateLabelFormat.value;
386
- return dateLabelFormat;
387
- });
388
- const computeFirstDayOfWeek = (0, import_vue.computed)(() => {
389
- const { startDay } = props;
390
- return import_xe_utils.default.toNumber(startDay);
391
- });
392
- const computePanelLabel = (0, import_vue.computed)(() => {
393
- const { type, multiple } = props;
394
- const { inputValue } = reactData;
395
- const dateLabelFormat = computeDateLabelFormat.value;
396
- const dateValueFormat = computeDateValueFormat.value;
397
- const firstDayOfWeek = computeFirstDayOfWeek.value;
398
- const vals = inputValue ? multiple ? inputValue.split(",") : [inputValue] : [];
399
- return vals.map((val) => {
400
- const dateObj = (0, import_util.parseDateObj)(val, type, {
401
- valueFormat: dateValueFormat,
402
- labelFormat: dateLabelFormat,
403
- firstDay: firstDayOfWeek
404
- });
405
- return dateObj.label;
406
- }).join(", ");
407
- });
408
- const computeMaskedOpts = (0, import_vue.computed)(() => {
409
- return Object.assign({}, getConfig().datePicker.maskedConfig, props.maskedConfig);
410
- });
411
- const computeMaskChar = (0, import_vue.computed)(() => {
412
- const maskedOpts = computeMaskedOpts.value;
413
- const { maskPlaceholder } = maskedOpts;
414
- return (maskPlaceholder ? ("" + maskPlaceholder)[0] : "") || defaultMaskPlaceholder;
415
- });
416
- const updateModelValue = () => {
417
- const { modelValue } = props;
418
- let val = "";
419
- if (modelValue) {
420
- if (import_xe_utils.default.isNumber(modelValue) && /^[0-9]{11,15}$/.test(`${modelValue}`)) {
421
- val = new Date(modelValue);
422
- } else {
423
- val = modelValue;
424
- }
425
- }
426
- reactData.inputValue = val;
427
- };
428
- const handleInputLabel = (text, isUpdate) => {
429
- internalData.inputLabel = text;
430
- if (isUpdate) {
431
- reactData.labelFlag++;
432
- }
433
- };
434
- const triggerEvent = (evnt) => {
435
- const { inputValue } = reactData;
436
- dispatchEvent(evnt.type, { value: inputValue }, evnt);
437
- };
438
- const handleChange = (value, evnt) => {
439
- const { type, modelValue, valueFormat } = props;
440
- const dateValueFormat = computeDateValueFormat.value;
441
- reactData.inputValue = value;
442
- if ((0, import_util.hasTimestampValueType)(valueFormat)) {
443
- const dateVal = (0, import_util.parseDateValue)(value, type, { valueFormat: dateValueFormat });
444
- const timeNum = dateVal ? dateVal.getTime() : null;
445
- emitModel(timeNum);
446
- if (modelValue !== timeNum) {
447
- dispatchEvent("change", { value: timeNum }, evnt);
448
- if ($xeForm && formItemInfo) {
449
- $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, timeNum);
240
+ if ($xeTable || $xeModal || $xeDrawer || $xeCard || $xeForm) {
241
+ return true;
450
242
  }
451
243
  }
452
- } else if ((0, import_util.hasDateValueType)(valueFormat)) {
453
- const dateVal = (0, import_util.parseDateValue)(value, type, { valueFormat: dateValueFormat });
454
- emitModel(dateVal);
455
- if (modelValue && dateVal ? import_xe_utils.default.toStringDate(modelValue).getTime() !== dateVal.getTime() : modelValue !== dateVal) {
456
- dispatchEvent("change", { value: dateVal }, evnt);
457
- if ($xeForm && formItemInfo) {
458
- $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, dateVal);
244
+ return transfer;
245
+ });
246
+ const computeFormReadonly = (0, import_vue.computed)(() => {
247
+ const { readonly } = props;
248
+ if (readonly === null) {
249
+ if ($xeForm) {
250
+ return $xeForm.props.readonly;
459
251
  }
252
+ return false;
460
253
  }
461
- } else {
462
- emitModel(value);
463
- if (import_xe_utils.default.toValueString(modelValue) !== value) {
464
- dispatchEvent("change", { value }, evnt);
465
- if ($xeForm && formItemInfo) {
466
- $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
254
+ return readonly;
255
+ });
256
+ const computeIsDisabled = (0, import_vue.computed)(() => {
257
+ const { disabled } = props;
258
+ if (disabled === null) {
259
+ if ($xeForm) {
260
+ return $xeForm.props.disabled;
467
261
  }
262
+ return false;
468
263
  }
469
- }
470
- };
471
- const inputEvent = (evnt) => {
472
- const inputElem = evnt.target;
473
- const value = inputElem.value;
474
- handleInputLabel(value, true);
475
- dispatchEvent("input", { value }, evnt);
476
- };
477
- const changeEvent = (evnt) => {
478
- const inpImmediate = computeInpImmediate.value;
479
- if (!inpImmediate) {
480
- triggerEvent(evnt);
481
- }
482
- };
483
- const clickPrefixEvent = (evnt) => {
484
- const isDisabled = computeIsDisabled.value;
485
- if (!isDisabled) {
486
- const { inputValue } = reactData;
487
- dispatchEvent("prefix-click", { value: inputValue }, evnt);
488
- }
489
- };
490
- const hidePanel = () => {
491
- return new Promise((resolve) => {
492
- reactData.visiblePanel = false;
493
- internalData.hpTimeout = setTimeout(() => {
494
- reactData.isAniVisible = false;
495
- resolve();
496
- }, 350);
264
+ return disabled;
497
265
  });
498
- };
499
- const dateChange = (date, isReload) => {
500
- const { modelValue, multiple } = props;
501
- const isTimeOrDateTimeType = computeIsTimeOrDateTimeType.value;
502
- const dateValueFormat = computeDateValueFormat.value;
503
- const firstDayOfWeek = computeFirstDayOfWeek.value;
504
- if (props.type === "week") {
505
- const sWeek = import_xe_utils.default.toNumber(props.selectDay);
506
- date = import_xe_utils.default.getWhatWeek(date, 0, sWeek, firstDayOfWeek);
507
- }
508
- const inpVal = import_xe_utils.default.toDateString(date, dateValueFormat, { firstDay: firstDayOfWeek });
509
- if (multiple) {
510
- const overCount = computeOverCount.value;
511
- if (isTimeOrDateTimeType) {
512
- const dateListValue = isReload ? [] : [...computeDateListValue.value];
513
- const datetimeRest = [];
514
- const eqIndex = import_xe_utils.default.findIndexOf(dateListValue, (val) => import_xe_utils.default.isDateSame(date, val, "yyyyMMdd"));
515
- if (eqIndex === -1) {
516
- if (overCount) {
517
- return;
266
+ const computeIsTimeType = (0, import_vue.computed)(() => {
267
+ const { type } = props;
268
+ return type === "time";
269
+ });
270
+ const computeIsTimeOrDateTimeType = (0, import_vue.computed)(() => {
271
+ const { type } = props;
272
+ const isTimeType = computeIsTimeType.value;
273
+ return isTimeType || type === "datetime";
274
+ });
275
+ const computeIsDatePickerType = (0, import_vue.computed)(() => {
276
+ const isTimeOrDateTimeType = computeIsTimeOrDateTimeType.value;
277
+ return isTimeOrDateTimeType || ["date", "week", "month", "quarter", "year"].indexOf(props.type) > -1;
278
+ });
279
+ const computeIsClearable = (0, import_vue.computed)(() => {
280
+ return props.clearable;
281
+ });
282
+ const computeIsDatePanelType = (0, import_vue.computed)(() => {
283
+ const isTimeOrDateTimeType = computeIsTimeOrDateTimeType.value;
284
+ return isTimeOrDateTimeType || ["date", "week", "month", "quarter", "year"].indexOf(props.type) > -1;
285
+ });
286
+ const computeDateListValue = (0, import_vue.computed)(() => {
287
+ const { modelValue, type, multiple } = props;
288
+ const isDatePanelType = computeIsDatePanelType.value;
289
+ const dateValueFormat = computeDateValueFormat.value;
290
+ if (multiple && modelValue && isDatePanelType) {
291
+ return import_xe_utils.default.toValueString(modelValue).split(",").map((item) => {
292
+ const date = (0, import_util.parseDateValue)(item, type, {
293
+ valueFormat: dateValueFormat
294
+ });
295
+ if (import_xe_utils.default.isValidDate(date)) {
296
+ return date;
518
297
  }
519
- dateListValue.push(date);
298
+ return date;
299
+ });
300
+ }
301
+ return [];
302
+ });
303
+ const computeCurrStyle = (0, import_vue.computed)(() => {
304
+ const { width } = props;
305
+ const stys = {};
306
+ if (width) {
307
+ stys.width = (0, import_dom.toCssUnit)(width);
308
+ }
309
+ return stys;
310
+ });
311
+ const computeDateStartDate = (0, import_vue.computed)(() => {
312
+ return props.startDate ? import_xe_utils.default.toStringDate(props.startDate) : null;
313
+ });
314
+ const computeDateEndDate = (0, import_vue.computed)(() => {
315
+ return props.endDate ? import_xe_utils.default.toStringDate(props.endDate) : null;
316
+ });
317
+ const computeLimitMaxCount = (0, import_vue.computed)(() => {
318
+ return props.multiple ? import_xe_utils.default.toNumber(props.limitCount) : 0;
319
+ });
320
+ const computeDateMultipleValue = (0, import_vue.computed)(() => {
321
+ const dateListValue = computeDateListValue.value;
322
+ const dateValueFormat = computeDateValueFormat.value;
323
+ return dateListValue.map((date) => import_xe_utils.default.toDateString(date, dateValueFormat));
324
+ });
325
+ const computeOverCount = (0, import_vue.computed)(() => {
326
+ const { multiple } = props;
327
+ const limitMaxCount = computeLimitMaxCount.value;
328
+ const dateMultipleValue = computeDateMultipleValue.value;
329
+ if (multiple && limitMaxCount) {
330
+ return dateMultipleValue.length >= limitMaxCount;
331
+ }
332
+ return false;
333
+ });
334
+ const computeInputReadonly = (0, import_vue.computed)(() => {
335
+ const { type, editable, multiple } = props;
336
+ const formReadonly = computeFormReadonly.value;
337
+ return formReadonly || multiple || !editable || type === "week" || type === "quarter";
338
+ });
339
+ const computeInpPlaceholder = (0, import_vue.computed)(() => {
340
+ const { placeholder } = props;
341
+ if (placeholder) {
342
+ return (0, import_utils.getFuncText)(placeholder);
343
+ }
344
+ const globalPlaceholder = getConfig().datePicker.placeholder;
345
+ if (globalPlaceholder) {
346
+ return (0, import_utils.getFuncText)(globalPlaceholder);
347
+ }
348
+ return getI18n("vxe.base.pleaseSelect");
349
+ });
350
+ const computeInpImmediate = (0, import_vue.computed)(() => {
351
+ const { immediate } = props;
352
+ return immediate;
353
+ });
354
+ const computeTimeOpts = (0, import_vue.computed)(() => {
355
+ return Object.assign({}, getConfig().datePicker.timeConfig, props.timeConfig);
356
+ });
357
+ const computePopupOpts = (0, import_vue.computed)(() => {
358
+ return Object.assign({}, getConfig().datePicker.popupConfig, props.popupConfig);
359
+ });
360
+ const computeShortcutOpts = (0, import_vue.computed)(() => {
361
+ return Object.assign({}, getConfig().datePicker.shortcutConfig, props.shortcutConfig);
362
+ });
363
+ const computeShortcutList = (0, import_vue.computed)(() => {
364
+ const shortcutOpts = computeShortcutOpts.value;
365
+ const { options } = shortcutOpts;
366
+ if (options) {
367
+ return options.map((option, index) => {
368
+ return Object.assign(
369
+ {
370
+ name: `${option.name || option.code || index}`
371
+ },
372
+ option
373
+ );
374
+ });
375
+ }
376
+ return [];
377
+ });
378
+ const computeDateLabelFormat = (0, import_vue.computed)(() => {
379
+ const { labelFormat } = props;
380
+ return labelFormat || getI18n(`vxe.input.date.labelFormat.${props.type}`);
381
+ });
382
+ const computeDateValueFormat = (0, import_vue.computed)(() => {
383
+ const { type, valueFormat } = props;
384
+ return (0, import_util.handleValueFormat)(type, valueFormat);
385
+ });
386
+ const computeDateMaskedFormat = (0, import_vue.computed)(() => {
387
+ const dateLabelFormat = computeDateLabelFormat.value;
388
+ return dateLabelFormat;
389
+ });
390
+ const computeFirstDayOfWeek = (0, import_vue.computed)(() => {
391
+ const { startDay } = props;
392
+ return import_xe_utils.default.toNumber(startDay);
393
+ });
394
+ const computePanelLabel = (0, import_vue.computed)(() => {
395
+ const { type, multiple } = props;
396
+ const { inputValue } = reactData;
397
+ const dateLabelFormat = computeDateLabelFormat.value;
398
+ const dateValueFormat = computeDateValueFormat.value;
399
+ const firstDayOfWeek = computeFirstDayOfWeek.value;
400
+ const vals = inputValue ? multiple ? inputValue.split(",") : [inputValue] : [];
401
+ return vals.map((val) => {
402
+ const dateObj = (0, import_util.parseDateObj)(val, type, {
403
+ valueFormat: dateValueFormat,
404
+ labelFormat: dateLabelFormat,
405
+ firstDay: firstDayOfWeek
406
+ });
407
+ return dateObj.label;
408
+ }).join(", ");
409
+ });
410
+ const computeMaskedOpts = (0, import_vue.computed)(() => {
411
+ return Object.assign({}, getConfig().datePicker.maskedConfig, props.maskedConfig);
412
+ });
413
+ const computeMaskChar = (0, import_vue.computed)(() => {
414
+ const maskedOpts = computeMaskedOpts.value;
415
+ const { maskPlaceholder } = maskedOpts;
416
+ return (maskPlaceholder ? ("" + maskPlaceholder)[0] : "") || defaultMaskPlaceholder;
417
+ });
418
+ const updateModelValue = () => {
419
+ const { modelValue } = props;
420
+ let val = "";
421
+ if (modelValue) {
422
+ if (import_xe_utils.default.isNumber(modelValue) && /^[0-9]{11,15}$/.test(`${modelValue}`)) {
423
+ val = new Date(modelValue);
520
424
  } else {
521
- dateListValue.splice(eqIndex, 1);
425
+ val = modelValue;
522
426
  }
523
- dateListValue.forEach((item) => {
524
- if (item) {
525
- datetimeRest.push(item);
427
+ }
428
+ reactData.inputValue = val;
429
+ };
430
+ const handleInputLabel = (text, isUpdate) => {
431
+ internalData.inputLabel = text;
432
+ if (isUpdate) {
433
+ reactData.labelFlag++;
434
+ }
435
+ };
436
+ const triggerEvent = (evnt) => {
437
+ const { inputValue } = reactData;
438
+ dispatchEvent(evnt.type, { value: inputValue }, evnt);
439
+ };
440
+ const handleChange = (value, evnt) => {
441
+ const { type, modelValue, valueFormat } = props;
442
+ const dateValueFormat = computeDateValueFormat.value;
443
+ reactData.inputValue = value;
444
+ if ((0, import_util.hasTimestampValueType)(valueFormat)) {
445
+ const dateVal = (0, import_util.parseDateValue)(value, type, { valueFormat: dateValueFormat });
446
+ const timeNum = dateVal ? dateVal.getTime() : null;
447
+ emitModel(timeNum);
448
+ if (modelValue !== timeNum) {
449
+ dispatchEvent("change", { value: timeNum }, evnt);
450
+ if ($xeForm && formItemInfo) {
451
+ $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, timeNum);
526
452
  }
527
- });
528
- handleChange(datetimeRest.map((date2) => import_xe_utils.default.toDateString(date2, dateValueFormat)).join(","), { type: "update" });
453
+ }
454
+ } else if ((0, import_util.hasDateValueType)(valueFormat)) {
455
+ const dateVal = (0, import_util.parseDateValue)(value, type, { valueFormat: dateValueFormat });
456
+ emitModel(dateVal);
457
+ if (modelValue && dateVal ? import_xe_utils.default.toStringDate(modelValue).getTime() !== dateVal.getTime() : modelValue !== dateVal) {
458
+ dispatchEvent("change", { value: dateVal }, evnt);
459
+ if ($xeForm && formItemInfo) {
460
+ $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, dateVal);
461
+ }
462
+ }
529
463
  } else {
530
- const dateMultipleValue = isReload ? [] : computeDateMultipleValue.value;
531
- if (dateMultipleValue.some((val) => import_xe_utils.default.isEqual(val, inpVal))) {
532
- handleChange(dateMultipleValue.filter((val) => !import_xe_utils.default.isEqual(val, inpVal)).join(","), { type: "update" });
533
- } else {
534
- if (overCount) {
535
- return;
464
+ emitModel(value);
465
+ if (import_xe_utils.default.toValueString(modelValue) !== value) {
466
+ dispatchEvent("change", { value }, evnt);
467
+ if ($xeForm && formItemInfo) {
468
+ $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
536
469
  }
537
- handleChange(dateMultipleValue.concat([inpVal]).join(","), { type: "update" });
538
470
  }
539
471
  }
540
- } else {
541
- if (!import_xe_utils.default.isEqual(modelValue, inpVal)) {
542
- handleChange(inpVal, { type: "update" });
543
- }
544
- }
545
- };
546
- const dateRevert = () => {
547
- const panelLabel = computePanelLabel.value;
548
- handleInputLabel(panelLabel, true);
549
- };
550
- const afterCheckValue = (inpVal) => {
551
- const { type, editable, multiple, maskedConfig } = props;
552
- const { inputLabel } = internalData;
553
- const dateLabelFormat = computeDateLabelFormat.value;
554
- const maskedOpts = computeMaskedOpts.value;
555
- const dateStartDate = computeDateStartDate.value;
556
- const dateEndDate = computeDateEndDate.value;
557
- const parseInpMethod = props.parseInputMethod || defaultFuncProps.parseInputMethod;
558
- if (!inpVal) {
559
- handleChange("", { type: "check" });
560
- return;
561
- }
562
- if (editable && !multiple && ((0, import_utils.isEnableConf)(maskedConfig) || maskedOpts.enabled)) {
563
- const allMaskedKeys = dateLabelFormat.match(new RegExp(`(${inputMaskedKeys.join("|")})+`, "g"));
564
- if (allMaskedKeys) {
565
- allMaskedKeys.forEach((formatKey) => {
566
- const fkIndex = dateLabelFormat.indexOf(formatKey);
567
- if (fkIndex > -1) {
568
- const valStr = inpVal.slice(fkIndex, fkIndex + formatKey.length).replace(/\D/g, "");
569
- if (!valStr) {
472
+ };
473
+ const inputEvent = (evnt) => {
474
+ const inputElem = evnt.target;
475
+ const value = inputElem.value;
476
+ handleInputLabel(value, true);
477
+ dispatchEvent("input", { value }, evnt);
478
+ };
479
+ const changeEvent = (evnt) => {
480
+ const inpImmediate = computeInpImmediate.value;
481
+ if (!inpImmediate) {
482
+ triggerEvent(evnt);
483
+ }
484
+ };
485
+ const clickPrefixEvent = (evnt) => {
486
+ const isDisabled = computeIsDisabled.value;
487
+ if (!isDisabled) {
488
+ const { inputValue } = reactData;
489
+ dispatchEvent("prefix-click", { value: inputValue }, evnt);
490
+ }
491
+ };
492
+ const hidePanel = () => {
493
+ return new Promise((resolve) => {
494
+ reactData.visiblePanel = false;
495
+ internalData.hpTimeout = setTimeout(() => {
496
+ reactData.isAniVisible = false;
497
+ resolve();
498
+ }, 350);
499
+ });
500
+ };
501
+ const dateChange = (date, isReload) => {
502
+ const { modelValue, multiple } = props;
503
+ const isTimeOrDateTimeType = computeIsTimeOrDateTimeType.value;
504
+ const dateValueFormat = computeDateValueFormat.value;
505
+ const firstDayOfWeek = computeFirstDayOfWeek.value;
506
+ if (props.type === "week") {
507
+ const sWeek = import_xe_utils.default.toNumber(props.selectDay);
508
+ date = import_xe_utils.default.getWhatWeek(date, 0, sWeek, firstDayOfWeek);
509
+ }
510
+ const inpVal = import_xe_utils.default.toDateString(date, dateValueFormat, { firstDay: firstDayOfWeek });
511
+ if (multiple) {
512
+ const overCount = computeOverCount.value;
513
+ if (isTimeOrDateTimeType) {
514
+ const dateListValue = isReload ? [] : [...computeDateListValue.value];
515
+ const datetimeRest = [];
516
+ const eqIndex = import_xe_utils.default.findIndexOf(dateListValue, (val) => import_xe_utils.default.isDateSame(date, val, "yyyyMMdd"));
517
+ if (eqIndex === -1) {
518
+ if (overCount) {
570
519
  return;
571
520
  }
572
- let valNum = import_xe_utils.default.toNumber(valStr);
573
- if (!valNum && ["MM", "dd"].includes(formatKey)) {
574
- valNum = 1;
521
+ dateListValue.push(date);
522
+ } else {
523
+ dateListValue.splice(eqIndex, 1);
524
+ }
525
+ dateListValue.forEach((item) => {
526
+ if (item) {
527
+ datetimeRest.push(item);
528
+ }
529
+ });
530
+ handleChange(datetimeRest.map((date2) => import_xe_utils.default.toDateString(date2, dateValueFormat)).join(","), { type: "update" });
531
+ } else {
532
+ const dateMultipleValue = isReload ? [] : computeDateMultipleValue.value;
533
+ if (dateMultipleValue.some((val) => import_xe_utils.default.isEqual(val, inpVal))) {
534
+ handleChange(dateMultipleValue.filter((val) => !import_xe_utils.default.isEqual(val, inpVal)).join(","), { type: "update" });
535
+ } else {
536
+ if (overCount) {
537
+ return;
575
538
  }
576
- inpVal = inpVal.slice(0, fkIndex) + import_xe_utils.default.padStart((0, import_util.checkDateInputFormat)(valNum, formatKey), formatKey.length, "0") + inpVal.slice(fkIndex + formatKey.length);
539
+ handleChange(dateMultipleValue.concat([inpVal]).join(","), { type: "update" });
577
540
  }
541
+ }
542
+ } else {
543
+ if (!import_xe_utils.default.isEqual(modelValue, inpVal)) {
544
+ handleChange(inpVal, { type: "update" });
545
+ }
546
+ }
547
+ };
548
+ const dateRevert = () => {
549
+ const panelLabel = computePanelLabel.value;
550
+ handleInputLabel(panelLabel, true);
551
+ };
552
+ const afterCheckValue = (inpVal) => {
553
+ const { type, editable, multiple, maskedConfig } = props;
554
+ const { inputLabel } = internalData;
555
+ const dateLabelFormat = computeDateLabelFormat.value;
556
+ const maskedOpts = computeMaskedOpts.value;
557
+ const dateStartDate = computeDateStartDate.value;
558
+ const dateEndDate = computeDateEndDate.value;
559
+ const parseInpMethod = props.parseInputMethod || defaultFuncProps.parseInputMethod;
560
+ if (!inpVal) {
561
+ handleChange("", { type: "check" });
562
+ return;
563
+ }
564
+ if (editable && !multiple && ((0, import_utils.isEnableConf)(maskedConfig) || maskedOpts.enabled)) {
565
+ const allMaskedKeys = dateLabelFormat.match(new RegExp(`(${inputMaskedKeys.join("|")})+`, "g"));
566
+ if (allMaskedKeys) {
567
+ allMaskedKeys.forEach((formatKey) => {
568
+ const fkIndex = dateLabelFormat.indexOf(formatKey);
569
+ if (fkIndex > -1) {
570
+ const valStr = inpVal.slice(fkIndex, fkIndex + formatKey.length).replace(/\D/g, "");
571
+ if (!valStr) {
572
+ return;
573
+ }
574
+ let valNum = import_xe_utils.default.toNumber(valStr);
575
+ if (!valNum && ["MM", "dd"].includes(formatKey)) {
576
+ valNum = 1;
577
+ }
578
+ inpVal = inpVal.slice(0, fkIndex) + import_xe_utils.default.padStart((0, import_util.checkDateInputFormat)(valNum, formatKey), formatKey.length, "0") + inpVal.slice(fkIndex + formatKey.length);
579
+ }
580
+ });
581
+ }
582
+ }
583
+ let inpDateVal;
584
+ if (parseInpMethod) {
585
+ inpDateVal = parseInpMethod({
586
+ $datePicker: $xeDatePicker,
587
+ type,
588
+ inputValue: inpVal,
589
+ valueFormat: dateLabelFormat
590
+ }) || null;
591
+ } else {
592
+ const $datePanel = refDatePanel.value;
593
+ if ($datePanel) {
594
+ return $datePanel.checkValue(inpVal);
595
+ }
596
+ inpDateVal = (0, import_util.parseDateValue)(inpVal, type, {
597
+ valueFormat: dateLabelFormat
578
598
  });
579
599
  }
580
- }
581
- let inpDateVal;
582
- if (parseInpMethod) {
583
- inpDateVal = parseInpMethod({
584
- $datePicker: $xeDatePicker,
585
- type,
586
- inputValue: inpVal,
587
- valueFormat: dateLabelFormat
588
- }) || null;
589
- } else {
590
- const $datePanel = refDatePanel.value;
591
- if ($datePanel) {
592
- return $datePanel.checkValue(inpVal);
600
+ if (!import_xe_utils.default.isValidDate(inpDateVal)) {
601
+ dateRevert();
602
+ return;
593
603
  }
594
- inpDateVal = (0, import_util.parseDateValue)(inpVal, type, {
595
- valueFormat: dateLabelFormat
596
- });
597
- }
598
- if (!import_xe_utils.default.isValidDate(inpDateVal)) {
599
- dateRevert();
600
- return;
601
- }
602
- if (type === "time") {
603
- const timeVal = import_xe_utils.default.toDateString(inpDateVal, dateLabelFormat);
604
- if (inputLabel !== timeVal) {
605
- handleChange(inpDateVal, { type: "check" });
606
- }
607
- handleInputLabel(timeVal, true);
608
- return;
609
- }
610
- if (dateEndDate && inpDateVal > dateEndDate) {
611
- inpDateVal = dateEndDate;
612
- }
613
- if (dateStartDate && inpDateVal < dateStartDate) {
614
- inpDateVal = dateStartDate;
615
- }
616
- let isChange = false;
617
- const firstDayOfWeek = computeFirstDayOfWeek.value;
618
- if (type === "datetime") {
619
- const dateValue = reactData.inputValue;
620
- if (inpVal !== import_xe_utils.default.toDateString(dateValue, dateLabelFormat) || inpVal !== import_xe_utils.default.toDateString(inpDateVal, dateLabelFormat)) {
604
+ if (type === "time") {
605
+ const timeVal = import_xe_utils.default.toDateString(inpDateVal, dateLabelFormat);
606
+ if (inputLabel !== timeVal) {
607
+ handleChange(inpDateVal, { type: "check" });
608
+ }
609
+ handleInputLabel(timeVal, true);
610
+ return;
611
+ }
612
+ if (dateEndDate && inpDateVal > dateEndDate) {
613
+ inpDateVal = dateEndDate;
614
+ }
615
+ if (dateStartDate && inpDateVal < dateStartDate) {
616
+ inpDateVal = dateStartDate;
617
+ }
618
+ let isChange = false;
619
+ const firstDayOfWeek = computeFirstDayOfWeek.value;
620
+ if (type === "datetime") {
621
+ const dateValue = reactData.inputValue;
622
+ if (inpVal !== import_xe_utils.default.toDateString(dateValue, dateLabelFormat) || inpVal !== import_xe_utils.default.toDateString(inpDateVal, dateLabelFormat)) {
623
+ isChange = true;
624
+ }
625
+ } else {
621
626
  isChange = true;
622
627
  }
623
- } else {
624
- isChange = true;
625
- }
626
- const label = import_xe_utils.default.toDateString(inpDateVal, dateLabelFormat, { firstDay: firstDayOfWeek });
627
- handleInputLabel(label, true);
628
- if (isChange) {
629
- dateChange(inpDateVal);
630
- }
631
- };
632
- const clearValueEvent = (evnt, value) => {
633
- const isDatePickerType = computeIsDatePickerType.value;
634
- if (isDatePickerType) {
635
- hidePanel();
636
- }
637
- handleChange("", evnt);
638
- dispatchEvent("clear", { value }, evnt);
639
- };
640
- const clickSuffixEvent = (evnt) => {
641
- const isDisabled = computeIsDisabled.value;
642
- if (!isDisabled) {
643
- const { inputValue } = reactData;
644
- dispatchEvent("suffix-click", { value: inputValue }, evnt);
645
- }
646
- };
647
- const checkMaskedInputValue = (numStr, chunkFormat, isFull) => {
648
- const maskedOpts = computeMaskedOpts.value;
649
- const { align } = maskedOpts;
650
- const maskChar = computeMaskChar.value;
651
- const numVal = import_xe_utils.default.toNumber(numStr);
652
- let restVal = (0, import_util.checkDateInputFormat)(numVal, chunkFormat);
653
- if (isFull) {
654
- if (!restVal && ["MM", "dd"].includes(chunkFormat)) {
655
- restVal = 1;
656
- }
657
- }
658
- let restStr = "" + restVal;
659
- if (numStr.length > restStr.length) {
660
- restStr = restStr.padStart(numStr.length, "0");
661
- }
662
- if (isFull) {
663
- return import_xe_utils.default.padStart(restStr, chunkFormat.length, "0");
664
- }
665
- return import_xe_utils.default[align === "right" ? "padStart" : "padEnd"](restStr, chunkFormat.length, maskChar);
666
- };
667
- const handleArrowInputDate = (evnt, isUpArrow, isDwArrow, isLtArrow, isRtArrow) => {
668
- const { type, multiple } = props;
669
- if (multiple) {
670
- return;
671
- }
672
- const targetElem = refInputTarget.value;
673
- if (!targetElem) {
674
- return;
675
- }
676
- const inpValue = targetElem.value;
677
- if (!inpValue) {
678
- return;
679
- }
680
- const dateMaskedFormat = computeDateMaskedFormat.value;
681
- const dateLabelFormat = computeDateLabelFormat.value;
682
- const firstDayOfWeek = computeFirstDayOfWeek.value;
683
- const maskChar = computeMaskChar.value;
684
- const selectionStart = targetElem.selectionStart || 0;
685
- let selectKey = dateMaskedFormat[selectionStart];
686
- if (!parseInputKayMaps[selectKey]) {
687
- selectKey = dateMaskedFormat[selectionStart - 1];
688
- }
689
- const skRest = dateMaskedFormat.match(new RegExp(selectKey + "+"));
690
- if (!skRest) {
691
- return;
692
- }
693
- if (isUpArrow || isDwArrow) {
628
+ const label = import_xe_utils.default.toDateString(inpDateVal, dateLabelFormat, { firstDay: firstDayOfWeek });
629
+ handleInputLabel(label, true);
630
+ if (isChange) {
631
+ dateChange(inpDateVal);
632
+ }
633
+ };
634
+ const clearValueEvent = (evnt, value) => {
635
+ const isDatePickerType = computeIsDatePickerType.value;
636
+ if (isDatePickerType) {
637
+ hidePanel();
638
+ }
639
+ handleChange("", evnt);
640
+ dispatchEvent("clear", { value }, evnt);
641
+ };
642
+ const clickSuffixEvent = (evnt) => {
643
+ const isDisabled = computeIsDisabled.value;
644
+ if (!isDisabled) {
645
+ const { inputValue } = reactData;
646
+ dispatchEvent("suffix-click", { value: inputValue }, evnt);
647
+ }
648
+ };
649
+ const checkMaskedInputValue = (numStr, chunkFormat, isFull) => {
650
+ const maskedOpts = computeMaskedOpts.value;
651
+ const { align } = maskedOpts;
652
+ const maskChar = computeMaskChar.value;
653
+ const numVal = import_xe_utils.default.toNumber(numStr);
654
+ let restVal = (0, import_util.checkDateInputFormat)(numVal, chunkFormat);
655
+ if (isFull) {
656
+ if (!restVal && ["MM", "dd"].includes(chunkFormat)) {
657
+ restVal = 1;
658
+ }
659
+ }
660
+ let restStr = "" + restVal;
661
+ if (numStr.length > restStr.length) {
662
+ restStr = restStr.padStart(numStr.length, "0");
663
+ }
664
+ if (isFull) {
665
+ return import_xe_utils.default.padStart(restStr, chunkFormat.length, "0");
666
+ }
667
+ return import_xe_utils.default[align === "right" ? "padStart" : "padEnd"](restStr, chunkFormat.length, maskChar);
668
+ };
669
+ const handleArrowInputDate = (evnt, isUpArrow, isDwArrow, isLtArrow, isRtArrow) => {
670
+ const { type, multiple } = props;
671
+ if (multiple) {
672
+ return;
673
+ }
674
+ const targetElem = refInputTarget.value;
675
+ if (!targetElem) {
676
+ return;
677
+ }
678
+ const inpValue = targetElem.value;
679
+ if (!inpValue) {
680
+ return;
681
+ }
682
+ const dateMaskedFormat = computeDateMaskedFormat.value;
683
+ const dateLabelFormat = computeDateLabelFormat.value;
684
+ const firstDayOfWeek = computeFirstDayOfWeek.value;
685
+ const maskChar = computeMaskChar.value;
686
+ const selectionStart = targetElem.selectionStart || 0;
687
+ let selectKey = dateMaskedFormat[selectionStart];
688
+ if (!parseInputKayMaps[selectKey]) {
689
+ selectKey = dateMaskedFormat[selectionStart - 1];
690
+ }
691
+ const skRest = dateMaskedFormat.match(new RegExp(selectKey + "+"));
692
+ if (!skRest) {
693
+ return;
694
+ }
695
+ if (isUpArrow || isDwArrow) {
696
+ const chunkFormat = skRest[0] || "";
697
+ const chunkStartIndex = skRest.index || 0;
698
+ const chunkEndIndex = chunkStartIndex + chunkFormat.length;
699
+ const chunkValue = inpValue.slice(chunkStartIndex, chunkEndIndex);
700
+ if (parseInputKayMaps[selectKey]) {
701
+ const chunkNum = ((0, import_util.isAllSameChar)(chunkValue, maskChar) ? (0, import_util.getChunkDefaultNum)(selectKey) : import_xe_utils.default.toNumber(chunkValue)) + (isUpArrow ? 1 : -1);
702
+ const restValue = inpValue.slice(0, chunkStartIndex) + checkMaskedInputValue("" + chunkNum, chunkFormat, true) + inpValue.slice(chunkEndIndex);
703
+ evnt.preventDefault();
704
+ if (restValue.indexOf(maskChar) === -1) {
705
+ const inpDateVal = (0, import_util.parseDateValue)(restValue, type, {
706
+ valueFormat: dateLabelFormat
707
+ });
708
+ if (import_xe_utils.default.isValidDate(inpDateVal)) {
709
+ const label = import_xe_utils.default.toDateString(inpDateVal, dateLabelFormat, { firstDay: firstDayOfWeek });
710
+ targetElem.value = label;
711
+ handleInputLabel(label, false);
712
+ }
713
+ } else {
714
+ targetElem.value = restValue;
715
+ handleInputLabel(restValue, false);
716
+ }
717
+ }
718
+ targetElem.setSelectionRange(chunkStartIndex, chunkEndIndex);
719
+ } else if (isLtArrow || isRtArrow) {
720
+ const currKeyIndex = inputMaskedKeys.indexOf(selectKey);
721
+ if (currKeyIndex > -1) {
722
+ const allMaskedKeys = import_xe_utils.default.map(dateMaskedFormat.match(new RegExp(`(${inputMaskedKeys.join("|")})+`, "g")) || [], (fullKey) => fullKey[0]);
723
+ const currIndex = import_xe_utils.default.findIndexOf(allMaskedKeys, (key) => selectKey === key[0]);
724
+ const targetFormatKey = isLtArrow ? allMaskedKeys[currIndex - 1] || allMaskedKeys[0] : allMaskedKeys[currIndex + 1] || allMaskedKeys[allMaskedKeys.length - 1];
725
+ const targetKey = targetFormatKey ? targetFormatKey[0] : "";
726
+ const sktRest = dateMaskedFormat.match(new RegExp(targetKey + "+"));
727
+ if (sktRest) {
728
+ evnt.preventDefault();
729
+ const mtStartIndex = sktRest.index || 0;
730
+ const mtEndIndex = mtStartIndex + sktRest[0].length;
731
+ targetElem.setSelectionRange(mtStartIndex, mtEndIndex);
732
+ }
733
+ }
734
+ }
735
+ internalData.isTriggerMasked = true;
736
+ };
737
+ const handleMaskedInputDate = (evnt) => {
738
+ const { multiple } = props;
739
+ if (multiple) {
740
+ return;
741
+ }
742
+ const targetElem = refInputTarget.value;
743
+ if (!targetElem) {
744
+ return;
745
+ }
746
+ const isControlKey = (0, import_dom.hasControlKey)(evnt);
747
+ if (isControlKey) {
748
+ return;
749
+ }
750
+ evnt.preventDefault();
751
+ const eKey = evnt.key;
752
+ const isDeleleKey = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.DELETE);
753
+ const isBackspaceKey = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.BACKSPACE);
754
+ const isNumKey = eKey >= "0" && eKey <= "9";
755
+ const numKey = isNumKey ? evnt.key : "";
756
+ if (!(isDeleleKey || isBackspaceKey || isNumKey)) {
757
+ return;
758
+ }
759
+ const { isTriggerMasked } = internalData;
760
+ const maskedOpts = computeMaskedOpts.value;
761
+ const { align } = maskedOpts;
762
+ const dateMaskedFormat = computeDateMaskedFormat.value;
763
+ const maskChar = computeMaskChar.value;
764
+ let inpValue = targetElem.value || dateMaskedFormat;
765
+ const selectionStart = targetElem.selectionStart || 0;
766
+ const selectionEnd = targetElem.selectionEnd || 0;
767
+ let selectKey = dateMaskedFormat[selectionStart];
768
+ if (!parseInputKayMaps[selectKey]) {
769
+ selectKey = dateMaskedFormat[selectionStart - 1];
770
+ }
771
+ const skRest = dateMaskedFormat.match(new RegExp(selectKey + "+"));
772
+ if (!skRest) {
773
+ return;
774
+ }
775
+ const allMaskedKeys = import_xe_utils.default.map(dateMaskedFormat.match(new RegExp(`(${inputMaskedKeys.join("|")})+`, "g")) || [], (fullKey) => fullKey[0]);
694
776
  const chunkFormat = skRest[0] || "";
695
777
  const chunkStartIndex = skRest.index || 0;
696
778
  const chunkEndIndex = chunkStartIndex + chunkFormat.length;
697
- const chunkValue = inpValue.slice(chunkStartIndex, chunkEndIndex);
698
- if (parseInputKayMaps[selectKey]) {
699
- const chunkNum = ((0, import_util.isAllSameChar)(chunkValue, maskChar) ? (0, import_util.getChunkDefaultNum)(selectKey) : import_xe_utils.default.toNumber(chunkValue)) + (isUpArrow ? 1 : -1);
700
- const restValue = inpValue.slice(0, chunkStartIndex) + checkMaskedInputValue("" + chunkNum, chunkFormat, true) + inpValue.slice(chunkEndIndex);
701
- evnt.preventDefault();
702
- if (restValue.indexOf(maskChar) === -1) {
703
- const inpDateVal = (0, import_util.parseDateValue)(restValue, type, {
704
- valueFormat: dateLabelFormat
705
- });
706
- if (import_xe_utils.default.isValidDate(inpDateVal)) {
707
- const label = import_xe_utils.default.toDateString(inpDateVal, dateLabelFormat, { firstDay: firstDayOfWeek });
708
- targetElem.value = label;
709
- handleInputLabel(label, false);
779
+ const currKeyIndex = allMaskedKeys.indexOf(selectKey);
780
+ const isAllSelected = !selectionStart && selectionEnd === inpValue.length && allMaskedKeys.length > 1;
781
+ const isNotMasked = inpValue && inpValue.length !== dateMaskedFormat.length;
782
+ if (isAllSelected || isNotMasked) {
783
+ inpValue = dateMaskedFormat;
784
+ }
785
+ let chunkValue = isDeleleKey ? "" : inpValue.slice(chunkStartIndex, chunkEndIndex);
786
+ const chunkNums = chunkValue.match(/\d/g) || [];
787
+ const chunkNumList = isTriggerMasked && !isBackspaceKey ? [] : chunkNums.slice(0);
788
+ if (isNumKey) {
789
+ chunkNumList.push(numKey);
790
+ chunkValue = checkMaskedInputValue(chunkNumList.join(""), chunkFormat, false);
791
+ } else if (isBackspaceKey) {
792
+ chunkNumList.pop();
793
+ chunkValue = import_xe_utils.default[align === "right" ? "padStart" : "padEnd"](chunkNumList.join(""), chunkFormat.length, maskChar);
794
+ }
795
+ let restValue = inpValue.slice(0, chunkStartIndex) + chunkValue + inpValue.slice(chunkEndIndex);
796
+ restValue = restValue.replace(new RegExp(`(${inputMaskedKeys.join("|")})`, "g"), maskChar);
797
+ targetElem.value = restValue;
798
+ handleInputLabel(restValue, false);
799
+ if (isAllSelected) {
800
+ if (isBackspaceKey || isDeleleKey) {
801
+ const firstMaskedKeys = allMaskedKeys[0];
802
+ const firstSkRest = dateMaskedFormat.match(new RegExp(`${firstMaskedKeys}+`));
803
+ if (firstSkRest) {
804
+ const firstChunkFormat = firstSkRest[0];
805
+ targetElem.setSelectionRange(0, firstChunkFormat.length);
806
+ internalData.isTriggerMasked = true;
807
+ return;
710
808
  }
711
- } else {
712
- targetElem.value = restValue;
713
- handleInputLabel(restValue, false);
809
+ }
810
+ } else {
811
+ if (isBackspaceKey && !chunkNums.length) {
812
+ for (let i = currKeyIndex - 1; i >= 0; i--) {
813
+ const prveChunkKey = allMaskedKeys[i];
814
+ const prveSkRest = dateMaskedFormat.match(new RegExp(`${prveChunkKey}+`));
815
+ if (prveSkRest) {
816
+ const prveChunkFormat = prveSkRest[0];
817
+ const prveChunkStartIndex = prveSkRest.index || 0;
818
+ const prveChunkEndIndex = prveChunkStartIndex + prveChunkFormat.length;
819
+ let prveChunkValue = restValue.slice(prveChunkStartIndex, prveChunkEndIndex);
820
+ const prveChunkNums = prveChunkValue.match(/\d/g) || [];
821
+ if (prveChunkNums.length) {
822
+ prveChunkNums.pop();
823
+ prveChunkValue = import_xe_utils.default[align === "right" ? "padStart" : "padEnd"](prveChunkNums.join(""), prveChunkFormat.length, maskChar);
824
+ restValue = restValue.slice(0, prveChunkStartIndex) + prveChunkValue + restValue.slice(prveChunkEndIndex);
825
+ targetElem.value = restValue;
826
+ handleInputLabel(restValue, false);
827
+ targetElem.setSelectionRange(prveChunkStartIndex, prveChunkEndIndex);
828
+ return;
829
+ }
830
+ }
831
+ }
832
+ const firstMaskedKeys = allMaskedKeys[0];
833
+ const firstSkRest = dateMaskedFormat.match(new RegExp(`${firstMaskedKeys}+`));
834
+ if (firstSkRest) {
835
+ const firstChunkFormat = firstSkRest[0];
836
+ restValue = dateMaskedFormat.replace(new RegExp(`(${inputMaskedKeys.join("|")})`, "g"), maskChar);
837
+ targetElem.value = restValue;
838
+ handleInputLabel(restValue, false);
839
+ targetElem.setSelectionRange(0, firstChunkFormat.length);
840
+ internalData.isTriggerMasked = true;
841
+ return;
842
+ }
843
+ return;
714
844
  }
715
845
  }
716
- targetElem.setSelectionRange(chunkStartIndex, chunkEndIndex);
717
- } else if (isLtArrow || isRtArrow) {
718
- const currKeyIndex = inputMaskedKeys.indexOf(selectKey);
719
- if (currKeyIndex > -1) {
720
- const allMaskedKeys = import_xe_utils.default.map(dateMaskedFormat.match(new RegExp(`(${inputMaskedKeys.join("|")})+`, "g")) || [], (fullKey) => fullKey[0]);
721
- const currIndex = import_xe_utils.default.findIndexOf(allMaskedKeys, (key) => selectKey === key[0]);
722
- const targetFormatKey = isLtArrow ? allMaskedKeys[currIndex - 1] || allMaskedKeys[0] : allMaskedKeys[currIndex + 1] || allMaskedKeys[allMaskedKeys.length - 1];
723
- const targetKey = targetFormatKey ? targetFormatKey[0] : "";
724
- const sktRest = dateMaskedFormat.match(new RegExp(targetKey + "+"));
725
- if (sktRest) {
726
- evnt.preventDefault();
727
- const mtStartIndex = sktRest.index || 0;
728
- const mtEndIndex = mtStartIndex + sktRest[0].length;
729
- targetElem.setSelectionRange(mtStartIndex, mtEndIndex);
846
+ let maskStartIndex = skRest.index || 0;
847
+ let maskEndIndex = maskStartIndex + skRest[0].length;
848
+ if (chunkNumList.length >= chunkValue.length) {
849
+ const nextKeys = allMaskedKeys.slice(currKeyIndex + 1);
850
+ if (currKeyIndex > -1) {
851
+ const nextRest = nextKeys.length ? dateMaskedFormat.match(new RegExp(`(${nextKeys.join("|")})+`)) : null;
852
+ if (nextRest) {
853
+ maskStartIndex = nextRest.index || 0;
854
+ maskEndIndex = maskStartIndex + nextRest[0].length;
855
+ targetElem.setSelectionRange(maskStartIndex, maskEndIndex);
856
+ } else {
857
+ targetElem.setSelectionRange(maskStartIndex, maskEndIndex);
858
+ }
730
859
  }
860
+ internalData.isTriggerMasked = true;
861
+ return;
862
+ }
863
+ targetElem.setSelectionRange(maskStartIndex, maskEndIndex);
864
+ internalData.isTriggerMasked = false;
865
+ };
866
+ const handleMaskedSelectedDate = (evnt, isFocus) => {
867
+ internalData.fsTimeout = void 0;
868
+ const { type, multiple, modelValue } = props;
869
+ if (multiple) {
870
+ return;
871
+ }
872
+ if (!maskedTypes.includes(type)) {
873
+ return;
731
874
  }
732
- }
733
- internalData.isTriggerMasked = true;
734
- };
735
- const handleMaskedInputDate = (evnt) => {
736
- const { multiple } = props;
737
- if (multiple) {
738
- return;
739
- }
740
- const targetElem = refInputTarget.value;
741
- if (!targetElem) {
742
- return;
743
- }
744
- const isControlKey = (0, import_dom.hasControlKey)(evnt);
745
- if (isControlKey) {
746
- return;
747
- }
748
- evnt.preventDefault();
749
- const eKey = evnt.key;
750
- const isDeleleKey = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.DELETE);
751
- const isBackspaceKey = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.BACKSPACE);
752
- const isNumKey = eKey >= "0" && eKey <= "9";
753
- const numKey = isNumKey ? evnt.key : "";
754
- if (!(isDeleleKey || isBackspaceKey || isNumKey)) {
755
- return;
756
- }
757
- const { isTriggerMasked } = internalData;
758
- const maskedOpts = computeMaskedOpts.value;
759
- const { align } = maskedOpts;
760
- const dateMaskedFormat = computeDateMaskedFormat.value;
761
- const maskChar = computeMaskChar.value;
762
- let inpValue = targetElem.value || dateMaskedFormat;
763
- const selectionStart = targetElem.selectionStart || 0;
764
- const selectionEnd = targetElem.selectionEnd || 0;
765
- let selectKey = dateMaskedFormat[selectionStart];
766
- if (!parseInputKayMaps[selectKey]) {
767
- selectKey = dateMaskedFormat[selectionStart - 1];
768
- }
769
- const skRest = dateMaskedFormat.match(new RegExp(selectKey + "+"));
770
- if (!skRest) {
771
- return;
772
- }
773
- const allMaskedKeys = import_xe_utils.default.map(dateMaskedFormat.match(new RegExp(`(${inputMaskedKeys.join("|")})+`, "g")) || [], (fullKey) => fullKey[0]);
774
- const chunkFormat = skRest[0] || "";
775
- const chunkStartIndex = skRest.index || 0;
776
- const chunkEndIndex = chunkStartIndex + chunkFormat.length;
777
- const currKeyIndex = allMaskedKeys.indexOf(selectKey);
778
- const isAllSelected = !selectionStart && selectionEnd === inpValue.length && allMaskedKeys.length > 1;
779
- const isNotMasked = inpValue && inpValue.length !== dateMaskedFormat.length;
780
- if (isAllSelected || isNotMasked) {
781
- inpValue = dateMaskedFormat;
782
- }
783
- let chunkValue = isDeleleKey ? "" : inpValue.slice(chunkStartIndex, chunkEndIndex);
784
- const chunkNums = chunkValue.match(/\d/g) || [];
785
- const chunkNumList = isTriggerMasked && !isBackspaceKey ? [] : chunkNums.slice(0);
786
- if (isNumKey) {
787
- chunkNumList.push(numKey);
788
- chunkValue = checkMaskedInputValue(chunkNumList.join(""), chunkFormat, false);
789
- } else if (isBackspaceKey) {
790
- chunkNumList.pop();
791
- chunkValue = import_xe_utils.default[align === "right" ? "padStart" : "padEnd"](chunkNumList.join(""), chunkFormat.length, maskChar);
792
- }
793
- let restValue = inpValue.slice(0, chunkStartIndex) + chunkValue + inpValue.slice(chunkEndIndex);
794
- restValue = restValue.replace(new RegExp(`(${inputMaskedKeys.join("|")})`, "g"), maskChar);
795
- targetElem.value = restValue;
796
- handleInputLabel(restValue, false);
797
- if (isAllSelected) {
798
- if (isBackspaceKey || isDeleleKey) {
875
+ const targetElem = refInputTarget.value;
876
+ if (!targetElem) {
877
+ return;
878
+ }
879
+ const { laseFocusMasked } = internalData;
880
+ if (laseFocusMasked && Date.now() - laseFocusMasked < 100) {
881
+ return;
882
+ }
883
+ const dateMaskedFormat = computeDateMaskedFormat.value;
884
+ const maskChar = computeMaskChar.value;
885
+ const selectionStart = targetElem.selectionStart || 0;
886
+ const selectionEnd = targetElem.selectionEnd || 0;
887
+ const inpValue = targetElem.value;
888
+ const allMaskedKeys = import_xe_utils.default.map(dateMaskedFormat.match(new RegExp(`(${inputMaskedKeys.join("|")})+`, "g")) || [], (fullKey) => fullKey[0]);
889
+ if (!inpValue) {
890
+ let restValue = dateMaskedFormat.replace(new RegExp(`(${inputMaskedKeys.join("|")})`, "g"), maskChar);
891
+ if (isFocus && modelValue) {
892
+ const chunkNums = ("" + import_xe_utils.default.toNumber(modelValue)).match(/\d/g) || [];
893
+ let useNumIndex = 0;
894
+ restValue = dateMaskedFormat.replace(new RegExp(`(${inputMaskedKeys.join("|")})`, "g"), (txt) => chunkNums[useNumIndex++] || txt);
895
+ }
799
896
  const firstMaskedKeys = allMaskedKeys[0];
800
897
  const firstSkRest = dateMaskedFormat.match(new RegExp(`${firstMaskedKeys}+`));
801
898
  if (firstSkRest) {
899
+ evnt.preventDefault();
802
900
  const firstChunkFormat = firstSkRest[0];
901
+ targetElem.value = restValue;
902
+ handleInputLabel(restValue, false);
803
903
  targetElem.setSelectionRange(0, firstChunkFormat.length);
804
- internalData.isTriggerMasked = true;
904
+ internalData.laseFocusMasked = Date.now();
805
905
  return;
806
906
  }
807
907
  }
808
- } else {
809
- if (isBackspaceKey && !chunkNums.length) {
810
- for (let i = currKeyIndex - 1; i >= 0; i--) {
811
- const prveChunkKey = allMaskedKeys[i];
812
- const prveSkRest = dateMaskedFormat.match(new RegExp(`${prveChunkKey}+`));
813
- if (prveSkRest) {
814
- const prveChunkFormat = prveSkRest[0];
815
- const prveChunkStartIndex = prveSkRest.index || 0;
816
- const prveChunkEndIndex = prveChunkStartIndex + prveChunkFormat.length;
817
- let prveChunkValue = restValue.slice(prveChunkStartIndex, prveChunkEndIndex);
818
- const prveChunkNums = prveChunkValue.match(/\d/g) || [];
819
- if (prveChunkNums.length) {
820
- prveChunkNums.pop();
821
- prveChunkValue = import_xe_utils.default[align === "right" ? "padStart" : "padEnd"](prveChunkNums.join(""), prveChunkFormat.length, maskChar);
822
- restValue = restValue.slice(0, prveChunkStartIndex) + prveChunkValue + restValue.slice(prveChunkEndIndex);
823
- targetElem.value = restValue;
824
- handleInputLabel(restValue, false);
825
- targetElem.setSelectionRange(prveChunkStartIndex, prveChunkEndIndex);
826
- return;
827
- }
828
- }
908
+ const isAllSelected = !selectionStart && selectionEnd === inpValue.length && allMaskedKeys.length > 1;
909
+ const isNotMasked = inpValue && inpValue.length !== dateMaskedFormat.length;
910
+ if (isAllSelected || isNotMasked) {
911
+ let restValue = "";
912
+ if (isNotMasked && inpValue) {
913
+ const chunkNums = inpValue.match(/\d/g) || [];
914
+ let useNumIndex = 0;
915
+ restValue = dateMaskedFormat.replace(new RegExp(`(${inputMaskedKeys.join("|")})`, "g"), () => chunkNums[useNumIndex++] || maskChar);
916
+ } else {
917
+ dateMaskedFormat.replace(new RegExp(`(${inputMaskedKeys.join("|")})`, "g"), maskChar);
829
918
  }
830
919
  const firstMaskedKeys = allMaskedKeys[0];
831
920
  const firstSkRest = dateMaskedFormat.match(new RegExp(`${firstMaskedKeys}+`));
832
921
  if (firstSkRest) {
922
+ evnt.preventDefault();
833
923
  const firstChunkFormat = firstSkRest[0];
834
- restValue = dateMaskedFormat.replace(new RegExp(`(${inputMaskedKeys.join("|")})`, "g"), maskChar);
835
924
  targetElem.value = restValue;
836
925
  handleInputLabel(restValue, false);
837
926
  targetElem.setSelectionRange(0, firstChunkFormat.length);
838
- internalData.isTriggerMasked = true;
927
+ internalData.laseFocusMasked = Date.now();
839
928
  return;
840
929
  }
841
- return;
842
930
  }
843
- }
844
- let maskStartIndex = skRest.index || 0;
845
- let maskEndIndex = maskStartIndex + skRest[0].length;
846
- if (chunkNumList.length >= chunkValue.length) {
847
- const nextKeys = allMaskedKeys.slice(currKeyIndex + 1);
848
- if (currKeyIndex > -1) {
849
- const nextRest = nextKeys.length ? dateMaskedFormat.match(new RegExp(`(${nextKeys.join("|")})+`)) : null;
850
- if (nextRest) {
851
- maskStartIndex = nextRest.index || 0;
852
- maskEndIndex = maskStartIndex + nextRest[0].length;
853
- targetElem.setSelectionRange(maskStartIndex, maskEndIndex);
854
- } else {
855
- targetElem.setSelectionRange(maskStartIndex, maskEndIndex);
931
+ let selectKey = dateMaskedFormat[selectionStart];
932
+ if (!parseInputKayMaps[selectKey]) {
933
+ selectKey = dateMaskedFormat[selectionStart - 1];
934
+ }
935
+ if (selectKey) {
936
+ evnt.stopPropagation();
937
+ const skRest = dateMaskedFormat.match(new RegExp(selectKey + "+"));
938
+ if (skRest) {
939
+ const chunkFormat = skRest[0] || "";
940
+ const chunkStartIndex = skRest.index || 0;
941
+ const chunkEndIndex = chunkStartIndex + chunkFormat.length;
942
+ targetElem.setSelectionRange(chunkStartIndex, chunkEndIndex);
943
+ internalData.isTriggerMasked = true;
944
+ internalData.laseFocusMasked = Date.now();
856
945
  }
857
946
  }
858
- internalData.isTriggerMasked = true;
859
- return;
860
- }
861
- targetElem.setSelectionRange(maskStartIndex, maskEndIndex);
862
- internalData.isTriggerMasked = false;
863
- };
864
- const handleMaskedSelectedDate = (evnt, isFocus) => {
865
- internalData.fsTimeout = void 0;
866
- const { type, multiple, modelValue } = props;
867
- if (multiple) {
868
- return;
869
- }
870
- if (!maskedTypes.includes(type)) {
871
- return;
872
- }
873
- const targetElem = refInputTarget.value;
874
- if (!targetElem) {
875
- return;
876
- }
877
- const { laseFocusMasked } = internalData;
878
- if (laseFocusMasked && Date.now() - laseFocusMasked < 100) {
879
- return;
880
- }
881
- const dateMaskedFormat = computeDateMaskedFormat.value;
882
- const maskChar = computeMaskChar.value;
883
- const selectionStart = targetElem.selectionStart || 0;
884
- const selectionEnd = targetElem.selectionEnd || 0;
885
- const inpValue = targetElem.value;
886
- const allMaskedKeys = import_xe_utils.default.map(dateMaskedFormat.match(new RegExp(`(${inputMaskedKeys.join("|")})+`, "g")) || [], (fullKey) => fullKey[0]);
887
- if (!inpValue) {
888
- let restValue = dateMaskedFormat.replace(new RegExp(`(${inputMaskedKeys.join("|")})`, "g"), maskChar);
889
- if (isFocus && modelValue) {
890
- const chunkNums = ("" + import_xe_utils.default.toNumber(modelValue)).match(/\d/g) || [];
891
- let useNumIndex = 0;
892
- restValue = dateMaskedFormat.replace(new RegExp(`(${inputMaskedKeys.join("|")})`, "g"), (txt) => chunkNums[useNumIndex++] || txt);
893
- }
894
- const firstMaskedKeys = allMaskedKeys[0];
895
- const firstSkRest = dateMaskedFormat.match(new RegExp(`${firstMaskedKeys}+`));
896
- if (firstSkRest) {
897
- evnt.preventDefault();
898
- const firstChunkFormat = firstSkRest[0];
899
- targetElem.value = restValue;
900
- handleInputLabel(restValue, false);
901
- targetElem.setSelectionRange(0, firstChunkFormat.length);
902
- internalData.laseFocusMasked = Date.now();
903
- return;
947
+ };
948
+ const blurEvent = (evnt) => {
949
+ const { inputValue } = reactData;
950
+ const inpImmediate = computeInpImmediate.value;
951
+ const value = inputValue;
952
+ if (!inpImmediate) {
953
+ handleChange(value, evnt);
904
954
  }
905
- }
906
- const isAllSelected = !selectionStart && selectionEnd === inpValue.length && allMaskedKeys.length > 1;
907
- const isNotMasked = inpValue && inpValue.length !== dateMaskedFormat.length;
908
- if (isAllSelected || isNotMasked) {
909
- let restValue = "";
910
- if (isNotMasked && inpValue) {
911
- const chunkNums = inpValue.match(/\d/g) || [];
912
- let useNumIndex = 0;
913
- restValue = dateMaskedFormat.replace(new RegExp(`(${inputMaskedKeys.join("|")})`, "g"), () => chunkNums[useNumIndex++] || maskChar);
914
- } else {
915
- dateMaskedFormat.replace(new RegExp(`(${inputMaskedKeys.join("|")})`, "g"), maskChar);
955
+ if (!reactData.visiblePanel) {
956
+ const { inputLabel } = internalData;
957
+ reactData.isActivated = false;
958
+ afterCheckValue(inputLabel);
916
959
  }
917
- const firstMaskedKeys = allMaskedKeys[0];
918
- const firstSkRest = dateMaskedFormat.match(new RegExp(`${firstMaskedKeys}+`));
919
- if (firstSkRest) {
920
- evnt.preventDefault();
921
- const firstChunkFormat = firstSkRest[0];
922
- targetElem.value = restValue;
923
- handleInputLabel(restValue, false);
924
- targetElem.setSelectionRange(0, firstChunkFormat.length);
925
- internalData.laseFocusMasked = Date.now();
926
- return;
960
+ dispatchEvent("blur", { value }, evnt);
961
+ if ($xeForm && formItemInfo) {
962
+ $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
963
+ }
964
+ };
965
+ const focusEvent = (evnt) => {
966
+ const { multiple, editable, maskedConfig } = props;
967
+ const { fsTimeout } = internalData;
968
+ const maskedOpts = computeMaskedOpts.value;
969
+ const popupOpts = computePopupOpts.value;
970
+ const { trigger } = popupOpts;
971
+ reactData.isActivated = true;
972
+ if (fsTimeout) {
973
+ clearTimeout(fsTimeout);
974
+ }
975
+ if (!trigger || trigger === "default") {
976
+ datePickerOpenEvent(evnt);
977
+ } else if (trigger === "icon") {
978
+ hidePanel();
979
+ }
980
+ if (editable && !multiple && ((0, import_utils.isEnableConf)(maskedConfig) || maskedOpts.enabled)) {
981
+ internalData.fsTimeout = setTimeout(() => {
982
+ handleMaskedSelectedDate(evnt, true);
983
+ }, 20);
984
+ }
985
+ triggerEvent(evnt);
986
+ };
987
+ const clickEvent = (evnt) => {
988
+ const { multiple, editable, maskedConfig } = props;
989
+ const { fsTimeout } = internalData;
990
+ const maskedOpts = computeMaskedOpts.value;
991
+ if (fsTimeout) {
992
+ clearTimeout(fsTimeout);
993
+ }
994
+ if (editable && !multiple && ((0, import_utils.isEnableConf)(maskedConfig) || maskedOpts.enabled)) {
995
+ internalData.fsTimeout = setTimeout(() => {
996
+ handleMaskedSelectedDate(evnt);
997
+ }, 10);
998
+ }
999
+ triggerEvent(evnt);
1000
+ };
1001
+ const keydownEvent = (evnt) => {
1002
+ const { type, editable, maskedConfig } = props;
1003
+ const { visiblePanel } = reactData;
1004
+ const maskedOpts = computeMaskedOpts.value;
1005
+ const isUpArrow = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_UP);
1006
+ const isDwArrow = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_DOWN);
1007
+ const isLtArrow = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_LEFT);
1008
+ const isRtArrow = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_RIGHT);
1009
+ const isEnter = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ENTER);
1010
+ if (editable) {
1011
+ if (isEnter) {
1012
+ const { inputLabel } = internalData;
1013
+ if (visiblePanel) {
1014
+ hidePanel();
1015
+ }
1016
+ afterCheckValue(inputLabel);
1017
+ } else if (maskedTypes.includes(type)) {
1018
+ if ((0, import_utils.isEnableConf)(maskedConfig) || maskedOpts.enabled) {
1019
+ if (maskedOpts.isArrow && (isUpArrow || isDwArrow || isLtArrow || isRtArrow)) {
1020
+ handleArrowInputDate(evnt, isUpArrow, isDwArrow, isLtArrow, isRtArrow);
1021
+ } else if (maskedOpts.isMasked) {
1022
+ handleMaskedInputDate(evnt);
1023
+ }
1024
+ }
1025
+ }
1026
+ }
1027
+ triggerEvent(evnt);
1028
+ };
1029
+ const keyupEvent = (evnt) => {
1030
+ triggerEvent(evnt);
1031
+ };
1032
+ const confirmEvent = (evnt) => {
1033
+ const $datePanel = refDatePanel.value;
1034
+ if ($datePanel) {
1035
+ $datePanel.confirmByEvent(evnt);
927
1036
  }
928
- }
929
- let selectKey = dateMaskedFormat[selectionStart];
930
- if (!parseInputKayMaps[selectKey]) {
931
- selectKey = dateMaskedFormat[selectionStart - 1];
932
- }
933
- if (selectKey) {
934
- evnt.stopPropagation();
935
- const skRest = dateMaskedFormat.match(new RegExp(selectKey + "+"));
936
- if (skRest) {
937
- const chunkFormat = skRest[0] || "";
938
- const chunkStartIndex = skRest.index || 0;
939
- const chunkEndIndex = chunkStartIndex + chunkFormat.length;
940
- targetElem.setSelectionRange(chunkStartIndex, chunkEndIndex);
941
- internalData.isTriggerMasked = true;
942
- internalData.laseFocusMasked = Date.now();
943
- }
944
- }
945
- };
946
- const blurEvent = (evnt) => {
947
- const { inputValue } = reactData;
948
- const inpImmediate = computeInpImmediate.value;
949
- const value = inputValue;
950
- if (!inpImmediate) {
951
- handleChange(value, evnt);
952
- }
953
- if (!reactData.visiblePanel) {
954
- const { inputLabel } = internalData;
955
- reactData.isActivated = false;
956
- afterCheckValue(inputLabel);
957
- }
958
- dispatchEvent("blur", { value }, evnt);
959
- if ($xeForm && formItemInfo) {
960
- $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
961
- }
962
- };
963
- const focusEvent = (evnt) => {
964
- const { multiple, editable, maskedConfig } = props;
965
- const { fsTimeout } = internalData;
966
- const maskedOpts = computeMaskedOpts.value;
967
- const popupOpts = computePopupOpts.value;
968
- const { trigger } = popupOpts;
969
- reactData.isActivated = true;
970
- if (fsTimeout) {
971
- clearTimeout(fsTimeout);
972
- }
973
- if (!trigger || trigger === "default") {
974
- datePickerOpenEvent(evnt);
975
- } else if (trigger === "icon") {
976
1037
  hidePanel();
977
- }
978
- if (editable && !multiple && ((0, import_utils.isEnableConf)(maskedConfig) || maskedOpts.enabled)) {
979
- internalData.fsTimeout = setTimeout(() => {
980
- handleMaskedSelectedDate(evnt, true);
981
- }, 20);
982
- }
983
- triggerEvent(evnt);
984
- };
985
- const clickEvent = (evnt) => {
986
- const { multiple, editable, maskedConfig } = props;
987
- const { fsTimeout } = internalData;
988
- const maskedOpts = computeMaskedOpts.value;
989
- if (fsTimeout) {
990
- clearTimeout(fsTimeout);
991
- }
992
- if (editable && !multiple && ((0, import_utils.isEnableConf)(maskedConfig) || maskedOpts.enabled)) {
993
- internalData.fsTimeout = setTimeout(() => {
994
- handleMaskedSelectedDate(evnt);
995
- }, 10);
996
- }
997
- triggerEvent(evnt);
998
- };
999
- const keydownEvent = (evnt) => {
1000
- const { type, editable, maskedConfig } = props;
1001
- const { visiblePanel } = reactData;
1002
- const maskedOpts = computeMaskedOpts.value;
1003
- const isUpArrow = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_UP);
1004
- const isDwArrow = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_DOWN);
1005
- const isLtArrow = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_LEFT);
1006
- const isRtArrow = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_RIGHT);
1007
- const isEnter = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ENTER);
1008
- if (editable) {
1009
- if (isEnter) {
1010
- const { inputLabel } = internalData;
1011
- if (visiblePanel) {
1038
+ };
1039
+ const panelChangeEvent = (params) => {
1040
+ const { multiple, autoClose } = props;
1041
+ const { value, $event } = params;
1042
+ const isTimeOrDateTimeType = computeIsTimeOrDateTimeType.value;
1043
+ handleChange(value, $event);
1044
+ if (!multiple && !isTimeOrDateTimeType) {
1045
+ if (autoClose) {
1012
1046
  hidePanel();
1013
1047
  }
1014
- afterCheckValue(inputLabel);
1015
- } else if (maskedTypes.includes(type)) {
1016
- if ((0, import_utils.isEnableConf)(maskedConfig) || maskedOpts.enabled) {
1017
- if (maskedOpts.isArrow && (isUpArrow || isDwArrow || isLtArrow || isRtArrow)) {
1018
- handleArrowInputDate(evnt, isUpArrow, isDwArrow, isLtArrow, isRtArrow);
1019
- } else if (maskedOpts.isMasked) {
1020
- handleMaskedInputDate(evnt);
1048
+ }
1049
+ };
1050
+ const panelConfirmEvent = (params) => {
1051
+ dispatchEvent("confirm", params, params.$event);
1052
+ };
1053
+ const panelRevertEvent = (params) => {
1054
+ handleInputLabel(params.label, true);
1055
+ };
1056
+ const handleGlobalMousedownEvent = (evnt) => {
1057
+ const { visiblePanel, isActivated } = reactData;
1058
+ const el = refElem.value;
1059
+ const panelWrapperElem = refPanelWrapper.value;
1060
+ const isDisabled = computeIsDisabled.value;
1061
+ if (!isDisabled && isActivated) {
1062
+ const currActivated = (0, import_dom.getEventTargetNode)(evnt, el).flag || (0, import_dom.getEventTargetNode)(evnt, panelWrapperElem).flag;
1063
+ if (currActivated !== isActivated) {
1064
+ reactData.isActivated = currActivated;
1065
+ }
1066
+ if (!currActivated) {
1067
+ if (visiblePanel) {
1068
+ hidePanel();
1069
+ const { inputLabel } = internalData;
1070
+ afterCheckValue(inputLabel);
1021
1071
  }
1022
1072
  }
1023
1073
  }
1024
- }
1025
- triggerEvent(evnt);
1026
- };
1027
- const keyupEvent = (evnt) => {
1028
- triggerEvent(evnt);
1029
- };
1030
- const confirmEvent = (evnt) => {
1031
- const $datePanel = refDatePanel.value;
1032
- if ($datePanel) {
1033
- $datePanel.confirmByEvent(evnt);
1034
- }
1035
- hidePanel();
1036
- };
1037
- const panelChangeEvent = (params) => {
1038
- const { multiple, autoClose } = props;
1039
- const { value, $event } = params;
1040
- const isTimeOrDateTimeType = computeIsTimeOrDateTimeType.value;
1041
- handleChange(value, $event);
1042
- if (!multiple && !isTimeOrDateTimeType) {
1043
- if (autoClose) {
1044
- hidePanel();
1045
- }
1046
- }
1047
- };
1048
- const panelConfirmEvent = (params) => {
1049
- dispatchEvent("confirm", params, params.$event);
1050
- };
1051
- const panelRevertEvent = (params) => {
1052
- handleInputLabel(params.label, true);
1053
- };
1054
- const handleGlobalMousedownEvent = (evnt) => {
1055
- const { visiblePanel, isActivated } = reactData;
1056
- const el = refElem.value;
1057
- const panelWrapperElem = refPanelWrapper.value;
1058
- const isDisabled = computeIsDisabled.value;
1059
- if (!isDisabled && isActivated) {
1060
- const currActivated = (0, import_dom.getEventTargetNode)(evnt, el).flag || (0, import_dom.getEventTargetNode)(evnt, panelWrapperElem).flag;
1061
- if (currActivated !== isActivated) {
1062
- reactData.isActivated = currActivated;
1063
- }
1064
- if (!currActivated) {
1074
+ };
1075
+ const handleGlobalKeydownEvent = (evnt) => {
1076
+ const { isActivated, visiblePanel } = reactData;
1077
+ const isDisabled = computeIsDisabled.value;
1078
+ if (!isDisabled) {
1079
+ const isTab = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.TAB);
1080
+ const isEsc = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ESCAPE);
1081
+ if (isTab) {
1082
+ if (isActivated) {
1083
+ reactData.isActivated = false;
1084
+ }
1085
+ }
1065
1086
  if (visiblePanel) {
1066
- hidePanel();
1067
- const { inputLabel } = internalData;
1068
- afterCheckValue(inputLabel);
1087
+ if (isEsc || isTab) {
1088
+ hidePanel();
1089
+ }
1069
1090
  }
1070
1091
  }
1071
- }
1072
- };
1073
- const handleGlobalKeydownEvent = (evnt) => {
1074
- const { isActivated, visiblePanel } = reactData;
1075
- const isDisabled = computeIsDisabled.value;
1076
- if (!isDisabled) {
1077
- const isTab = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.TAB);
1078
- const isEsc = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ESCAPE);
1079
- if (isTab) {
1080
- if (isActivated) {
1081
- reactData.isActivated = false;
1092
+ };
1093
+ const handleGlobalBlurEvent = () => {
1094
+ const { isActivated, visiblePanel } = reactData;
1095
+ if (visiblePanel) {
1096
+ hidePanel();
1097
+ }
1098
+ if (isActivated) {
1099
+ reactData.isActivated = false;
1100
+ }
1101
+ if (visiblePanel || isActivated) {
1102
+ afterCheckValue(internalData.inputLabel);
1103
+ const targetElem = refInputTarget.value;
1104
+ if (targetElem) {
1105
+ targetElem.blur();
1082
1106
  }
1083
1107
  }
1108
+ };
1109
+ const handleGlobalResizeEvent = () => {
1110
+ const { visiblePanel } = reactData;
1084
1111
  if (visiblePanel) {
1085
- if (isEsc || isTab) {
1086
- hidePanel();
1087
- }
1112
+ updatePlacement();
1088
1113
  }
1089
- }
1090
- };
1091
- const handleGlobalBlurEvent = () => {
1092
- const { isActivated, visiblePanel } = reactData;
1093
- if (visiblePanel) {
1094
- hidePanel();
1095
- }
1096
- if (isActivated) {
1097
- reactData.isActivated = false;
1098
- }
1099
- if (visiblePanel || isActivated) {
1100
- afterCheckValue(internalData.inputLabel);
1114
+ };
1115
+ const handleGlobalScrollEvent = () => {
1116
+ const { visiblePanel } = reactData;
1117
+ if (visiblePanel) {
1118
+ updatePlacement();
1119
+ }
1120
+ };
1121
+ const updateZindex = () => {
1122
+ const popupOpts = computePopupOpts.value;
1123
+ const customZIndex = popupOpts.zIndex || props.zIndex;
1124
+ if (customZIndex) {
1125
+ reactData.panelIndex = import_xe_utils.default.toNumber(customZIndex);
1126
+ } else if (reactData.panelIndex < (0, import_utils.getLastZIndex)()) {
1127
+ reactData.panelIndex = (0, import_utils.nextZIndex)();
1128
+ }
1129
+ };
1130
+ const updatePlacement = () => {
1131
+ const { placement } = props;
1132
+ const { panelIndex } = reactData;
1101
1133
  const targetElem = refInputTarget.value;
1102
- if (targetElem) {
1103
- targetElem.blur();
1104
- }
1105
- }
1106
- };
1107
- const handleGlobalResizeEvent = () => {
1108
- const { visiblePanel } = reactData;
1109
- if (visiblePanel) {
1110
- updatePlacement();
1111
- }
1112
- };
1113
- const handleGlobalScrollEvent = () => {
1114
- const { visiblePanel } = reactData;
1115
- if (visiblePanel) {
1116
- updatePlacement();
1117
- }
1118
- };
1119
- const updateZindex = () => {
1120
- const popupOpts = computePopupOpts.value;
1121
- const customZIndex = popupOpts.zIndex || props.zIndex;
1122
- if (customZIndex) {
1123
- reactData.panelIndex = import_xe_utils.default.toNumber(customZIndex);
1124
- } else if (reactData.panelIndex < (0, import_utils.getLastZIndex)()) {
1125
- reactData.panelIndex = (0, import_utils.nextZIndex)();
1126
- }
1127
- };
1128
- const updatePlacement = () => {
1129
- const { placement } = props;
1130
- const { panelIndex } = reactData;
1131
- const targetElem = refInputTarget.value;
1132
- const panelElem = refInputPanel.value;
1133
- if (!panelElem) {
1134
+ const panelElem = refInputPanel.value;
1135
+ if (!panelElem) {
1136
+ return (0, import_vue.nextTick)();
1137
+ }
1138
+ const btnTransfer = computeBtnTransfer.value;
1139
+ const popupOpts = computePopupOpts.value;
1140
+ const handleStyle = () => {
1141
+ const ppObj = (0, import_dom.updatePanelPlacement)(targetElem, panelElem, {
1142
+ placement: popupOpts.placement || placement,
1143
+ defaultPlacement: popupOpts.defaultPlacement,
1144
+ appendTo: popupOpts.appendTo,
1145
+ teleportTo: btnTransfer
1146
+ });
1147
+ const panelStyle = Object.assign(ppObj.style, {
1148
+ zIndex: panelIndex
1149
+ });
1150
+ reactData.panelStyle = panelStyle;
1151
+ reactData.panelPlacement = ppObj.placement;
1152
+ };
1153
+ handleStyle();
1154
+ return (0, import_vue.nextTick)().then(handleStyle);
1155
+ };
1156
+ const showPanel = () => {
1157
+ const { visiblePanel } = reactData;
1158
+ const isDisabled = computeIsDisabled.value;
1159
+ if (!isDisabled && !visiblePanel) {
1160
+ if (!reactData.initialized) {
1161
+ reactData.initialized = true;
1162
+ }
1163
+ if (internalData.hpTimeout) {
1164
+ clearTimeout(internalData.hpTimeout);
1165
+ internalData.hpTimeout = void 0;
1166
+ }
1167
+ reactData.isActivated = true;
1168
+ reactData.isAniVisible = true;
1169
+ setTimeout(() => {
1170
+ reactData.visiblePanel = true;
1171
+ updatePlacement();
1172
+ }, 10);
1173
+ updateZindex();
1174
+ return updatePlacement();
1175
+ }
1134
1176
  return (0, import_vue.nextTick)();
1135
- }
1136
- const btnTransfer = computeBtnTransfer.value;
1137
- const popupOpts = computePopupOpts.value;
1138
- const handleStyle = () => {
1139
- const ppObj = (0, import_dom.updatePanelPlacement)(targetElem, panelElem, {
1140
- placement: popupOpts.placement || placement,
1141
- defaultPlacement: popupOpts.defaultPlacement,
1142
- appendTo: popupOpts.appendTo,
1143
- teleportTo: btnTransfer
1144
- });
1145
- const panelStyle = Object.assign(ppObj.style, {
1146
- zIndex: panelIndex
1147
- });
1148
- reactData.panelStyle = panelStyle;
1149
- reactData.panelPlacement = ppObj.placement;
1150
1177
  };
1151
- handleStyle();
1152
- return (0, import_vue.nextTick)().then(handleStyle);
1153
- };
1154
- const showPanel = () => {
1155
- const { visiblePanel } = reactData;
1156
- const isDisabled = computeIsDisabled.value;
1157
- if (!isDisabled && !visiblePanel) {
1158
- if (!reactData.initialized) {
1159
- reactData.initialized = true;
1160
- }
1161
- if (internalData.hpTimeout) {
1162
- clearTimeout(internalData.hpTimeout);
1163
- internalData.hpTimeout = void 0;
1178
+ const datePickerOpenEvent = (evnt) => {
1179
+ const formReadonly = computeFormReadonly.value;
1180
+ if (!formReadonly) {
1181
+ evnt.preventDefault();
1182
+ showPanel();
1164
1183
  }
1165
- reactData.isActivated = true;
1166
- reactData.isAniVisible = true;
1167
- setTimeout(() => {
1168
- reactData.visiblePanel = true;
1169
- updatePlacement();
1170
- }, 10);
1171
- updateZindex();
1172
- return updatePlacement();
1173
- }
1174
- return (0, import_vue.nextTick)();
1175
- };
1176
- const datePickerOpenEvent = (evnt) => {
1177
- const formReadonly = computeFormReadonly.value;
1178
- if (!formReadonly) {
1179
- evnt.preventDefault();
1180
- showPanel();
1181
- }
1182
- };
1183
- const clickIconEvent = (evnt) => {
1184
- const { visiblePanel } = reactData;
1185
- const popupOpts = computePopupOpts.value;
1186
- const { trigger } = popupOpts;
1187
- if (!trigger || trigger === "default" || trigger === "icon") {
1188
- if (visiblePanel) {
1189
- hidePanel();
1190
- } else {
1191
- datePickerOpenEvent(evnt);
1184
+ };
1185
+ const clickIconEvent = (evnt) => {
1186
+ const { visiblePanel } = reactData;
1187
+ const popupOpts = computePopupOpts.value;
1188
+ const { trigger } = popupOpts;
1189
+ if (!trigger || trigger === "default" || trigger === "icon") {
1190
+ if (visiblePanel) {
1191
+ hidePanel();
1192
+ } else {
1193
+ datePickerOpenEvent(evnt);
1194
+ }
1192
1195
  }
1193
- }
1194
- };
1195
- const handleShortcutEvent = ({ option, $event }) => {
1196
- const { type } = props;
1197
- const { inputValue } = reactData;
1198
- const shortcutOpts = computeShortcutOpts.value;
1199
- const { autoClose } = shortcutOpts;
1200
- const { code, clickMethod } = option;
1201
- let value = inputValue;
1202
- const shortcutParams = {
1203
- $datePicker: $xeDatePicker,
1204
- option,
1205
- value,
1206
- code
1207
1196
  };
1208
- if (!clickMethod && code) {
1209
- const gCommandOpts = commands.get(code);
1210
- const dpCommandMethod = gCommandOpts ? gCommandOpts.datePickerCommandMethod : null;
1211
- if (dpCommandMethod) {
1212
- dpCommandMethod(shortcutParams);
1213
- } else {
1214
- const dateValueFormat = computeDateValueFormat.value;
1215
- const firstDayOfWeek = computeFirstDayOfWeek.value;
1216
- switch (code) {
1217
- case "now":
1218
- case "prev":
1219
- case "next":
1220
- case "minus":
1221
- case "plus": {
1222
- const restObj = (0, import_util.getDateByCode)(code, value, type, {
1223
- valueFormat: dateValueFormat,
1224
- firstDay: firstDayOfWeek
1225
- });
1226
- value = restObj.value;
1227
- shortcutParams.value = value;
1228
- handleChange(value, $event);
1229
- break;
1197
+ const handleShortcutEvent = ({ option, $event }) => {
1198
+ const { type } = props;
1199
+ const { inputValue } = reactData;
1200
+ const shortcutOpts = computeShortcutOpts.value;
1201
+ const { autoClose } = shortcutOpts;
1202
+ const { code, clickMethod } = option;
1203
+ let value = inputValue;
1204
+ const shortcutParams = {
1205
+ $datePicker: $xeDatePicker,
1206
+ option,
1207
+ value,
1208
+ code
1209
+ };
1210
+ if (!clickMethod && code) {
1211
+ const gCommandOpts = commands.get(code);
1212
+ const dpCommandMethod = gCommandOpts ? gCommandOpts.datePickerCommandMethod : null;
1213
+ if (dpCommandMethod) {
1214
+ dpCommandMethod(shortcutParams);
1215
+ } else {
1216
+ const dateValueFormat = computeDateValueFormat.value;
1217
+ const firstDayOfWeek = computeFirstDayOfWeek.value;
1218
+ switch (code) {
1219
+ case "now":
1220
+ case "prev":
1221
+ case "next":
1222
+ case "minus":
1223
+ case "plus": {
1224
+ const restObj = (0, import_util.getDateByCode)(code, value, type, {
1225
+ valueFormat: dateValueFormat,
1226
+ firstDay: firstDayOfWeek
1227
+ });
1228
+ value = restObj.value;
1229
+ shortcutParams.value = value;
1230
+ handleChange(value, $event);
1231
+ break;
1232
+ }
1233
+ default:
1234
+ errLog("vxe.error.notCommands", [code]);
1235
+ break;
1230
1236
  }
1231
- default:
1232
- errLog("vxe.error.notCommands", [code]);
1233
- break;
1237
+ }
1238
+ } else {
1239
+ const optClickMethod = clickMethod || shortcutOpts.clickMethod;
1240
+ if (optClickMethod) {
1241
+ optClickMethod(shortcutParams);
1234
1242
  }
1235
1243
  }
1236
- } else {
1237
- const optClickMethod = clickMethod || shortcutOpts.clickMethod;
1238
- if (optClickMethod) {
1239
- optClickMethod(shortcutParams);
1244
+ if (autoClose) {
1245
+ hidePanel();
1240
1246
  }
1241
- }
1242
- if (autoClose) {
1243
- hidePanel();
1244
- }
1245
- dispatchEvent("shortcut-click", shortcutParams, $event);
1246
- };
1247
- const dispatchEvent = (type, params, evnt) => {
1248
- emit(type, createEvent(evnt, { $datePicker: $xeDatePicker }, params));
1249
- };
1250
- const emitModel = (value) => {
1251
- emit("update:modelValue", value);
1252
- };
1253
- const datePickerMethods = {
1254
- dispatchEvent,
1255
- setModelValue(value) {
1256
- reactData.inputValue = value;
1257
- emitModel(value);
1258
- },
1259
- setModelValueByEvent(evnt, value) {
1260
- handleChange(value || "", evnt);
1261
- },
1262
- focus() {
1263
- const inputElem = refInputTarget.value;
1264
- reactData.isActivated = true;
1265
- inputElem.focus();
1266
- return (0, import_vue.nextTick)();
1267
- },
1268
- blur() {
1269
- const inputElem = refInputTarget.value;
1270
- inputElem.blur();
1271
- reactData.isActivated = false;
1272
- return (0, import_vue.nextTick)();
1273
- },
1274
- select() {
1275
- const inputElem = refInputTarget.value;
1276
- inputElem.select();
1277
- reactData.isActivated = false;
1278
- return (0, import_vue.nextTick)();
1279
- },
1280
- showPanel,
1281
- hidePanel,
1282
- updatePlacement
1283
- };
1284
- Object.assign($xeDatePicker, datePickerMethods);
1285
- const renderShortcutBtn = (pos, isVertical) => {
1286
- const shortcutOpts = computeShortcutOpts.value;
1287
- const { position, align, mode } = shortcutOpts;
1288
- const shortcutList = computeShortcutList.value;
1289
- if ((0, import_utils.isEnableConf)(shortcutOpts) && shortcutList.length && (position || "left") === pos) {
1290
- return (0, import_vue.h)(
1291
- "div",
1292
- {
1293
- class: `vxe-date-picker--layout-${pos}-wrapper`
1294
- },
1295
- [
1296
- (0, import_vue.h)(import_button_group.default, {
1297
- options: shortcutList,
1298
- mode,
1299
- align,
1300
- vertical: isVertical,
1301
- onClick: handleShortcutEvent
1302
- })
1303
- ]
1304
- );
1305
- }
1306
- return renderEmptyElement($xeDatePicker);
1307
- };
1308
- const renderPanel = () => {
1309
- const popupOpts = computePopupOpts.value;
1310
- if (popupOpts.enabled === false) {
1311
- return renderEmptyElement($xeDatePicker);
1312
- }
1313
- const { type, multiple, showClearButton, showConfirmButton } = props;
1314
- const { initialized, isAniVisible, visiblePanel, panelPlacement, panelStyle, inputValue } = reactData;
1315
- const vSize = computeSize.value;
1316
- const btnTransfer = computeBtnTransfer.value;
1317
- const shortcutOpts = computeShortcutOpts.value;
1318
- const isClearable = computeIsClearable.value;
1319
- const isTimeOrDateTimeType = computeIsTimeOrDateTimeType.value;
1320
- const shortcutList = computeShortcutList.value;
1321
- const timeOpts = computeTimeOpts.value;
1322
- const dateStartDate = computeDateStartDate.value;
1323
- const dateEndDate = computeDateEndDate.value;
1324
- const { appendTo } = popupOpts;
1325
- const { position } = shortcutOpts;
1326
- const headerSlot = slots.header;
1327
- const footerSlot = slots.footer;
1328
- const topSlot = slots.top;
1329
- const bottomSlot = slots.bottom;
1330
- const leftSlot = slots.left;
1331
- const rightSlot = slots.right;
1332
- const ppClassName = popupOpts.className;
1333
- const hasShortcutBtn = shortcutList.length > 0;
1334
- const showConfirmBtn = showConfirmButton === null ? isTimeOrDateTimeType || multiple : showConfirmButton;
1335
- const showClearBtn = showClearButton === null ? isClearable && showConfirmBtn && type !== "time" : showClearButton;
1336
- return (0, import_vue.h)(
1337
- import_vue.Teleport,
1338
- {
1339
- to: (0, import_dom.getPopupContainer)(appendTo),
1340
- disabled: btnTransfer ? !initialized : true
1247
+ dispatchEvent("shortcut-click", shortcutParams, $event);
1248
+ };
1249
+ const dispatchEvent = (type, params, evnt) => {
1250
+ emit(type, createEvent(evnt, { $datePicker: $xeDatePicker }, params));
1251
+ };
1252
+ const emitModel = (value) => {
1253
+ emit("update:modelValue", value);
1254
+ };
1255
+ const datePickerMethods = {
1256
+ dispatchEvent,
1257
+ setModelValue(value) {
1258
+ reactData.inputValue = value;
1259
+ emitModel(value);
1341
1260
  },
1342
- [
1343
- (0, import_vue.h)(
1344
- "div",
1345
- {
1346
- ref: refInputPanel,
1347
- class: [
1348
- "vxe-table--ignore-clear vxe-date-picker--panel",
1349
- `type--${type}`,
1350
- ppClassName ? import_xe_utils.default.isFunction(ppClassName) ? ppClassName({ $datePicker: $xeDatePicker }) : ppClassName : "",
1351
- {
1352
- [`size--${vSize}`]: vSize,
1353
- "is--transfer": btnTransfer,
1354
- "ani--leave": isAniVisible,
1355
- "ani--enter": visiblePanel,
1356
- "show--top": !!(topSlot || headerSlot || hasShortcutBtn && (position === "top" || position === "header")),
1357
- "show--bottom": !!(bottomSlot || footerSlot || hasShortcutBtn && (position === "bottom" || position === "footer")),
1358
- "show--left": !!(leftSlot || hasShortcutBtn && position === "left"),
1359
- "show--right": !!(rightSlot || hasShortcutBtn && position === "right")
1360
- }
1361
- ],
1362
- placement: panelPlacement,
1363
- style: panelStyle
1364
- },
1365
- initialized && (visiblePanel || isAniVisible) ? [
1366
- (0, import_vue.h)(
1367
- "div",
1368
- {
1369
- ref: refPanelWrapper,
1370
- class: [
1371
- "vxe-date-picker--layout-all-wrapper",
1372
- `type--${type}`,
1373
- {
1374
- [`size--${vSize}`]: vSize
1375
- }
1376
- ]
1377
- },
1378
- [
1379
- topSlot ? (0, import_vue.h)(
1380
- "div",
1381
- {
1382
- class: "vxe-date-picker--layout-top-wrapper"
1383
- },
1384
- topSlot({})
1385
- ) : renderShortcutBtn("top"),
1386
- (0, import_vue.h)(
1387
- "div",
1388
- {
1389
- class: "vxe-date-picker--layout-body-layout-wrapper"
1390
- },
1391
- [
1392
- leftSlot ? (0, import_vue.h)(
1393
- "div",
1394
- {
1395
- class: "vxe-date-picker--layout-left-wrapper"
1396
- },
1397
- leftSlot({})
1398
- ) : renderShortcutBtn("left", true),
1399
- (0, import_vue.h)(
1400
- "div",
1401
- {
1402
- class: "vxe-date-picker--layout-body-content-wrapper"
1403
- },
1404
- [
1405
- headerSlot ? (0, import_vue.h)(
1406
- "div",
1407
- {
1408
- class: "vxe-date-picker--layout-header-wrapper"
1409
- },
1410
- headerSlot({})
1411
- ) : renderShortcutBtn("header"),
1412
- (0, import_vue.h)(
1413
- "div",
1414
- {
1415
- class: "vxe-date-picker--layout-body-wrapper"
1416
- },
1417
- [
1418
- (0, import_vue.h)(import_date_panel.default, {
1419
- ref: refDatePanel,
1420
- modelValue: reactData.inputValue,
1421
- type: props.type,
1422
- className: props.className,
1423
- multiple: props.multiple,
1424
- limitCount: props.limitCount,
1425
- startDate: dateStartDate,
1426
- endDate: dateEndDate,
1427
- defaultDate: props.defaultDate,
1428
- defaultTime: props.defaultTime,
1429
- minDate: props.minDate,
1430
- maxDate: props.maxDate,
1431
- startDay: props.startDay,
1432
- labelFormat: props.labelFormat,
1433
- valueFormat: props.valueFormat,
1434
- timeFormat: props.timeFormat,
1435
- timeConfig: timeOpts,
1436
- festivalMethod: props.festivalMethod || defaultFuncProps.festivalMethod,
1437
- disabledMethod: props.disabledMethod || defaultFuncProps.disabledMethod,
1438
- selectDay: props.selectDay,
1439
- onChange: panelChangeEvent,
1440
- onConfirm: panelConfirmEvent,
1441
- onRevert: panelRevertEvent
1442
- })
1443
- ]
1444
- ),
1445
- (0, import_vue.h)(
1446
- "div",
1447
- {
1448
- class: "vxe-date-picker--layout-footer-wrapper"
1449
- },
1450
- [
1451
- (0, import_vue.h)(
1452
- "div",
1453
- {
1454
- class: "vxe-date-picker--layout-footer-custom"
1455
- },
1456
- footerSlot ? footerSlot({}) : [renderShortcutBtn("footer")]
1457
- ),
1458
- showClearBtn || showConfirmBtn ? (0, import_vue.h)(
1459
- "div",
1460
- {
1461
- class: "vxe-date-picker--layout-footer-btns"
1462
- },
1463
- [
1464
- showClearBtn ? (0, import_vue.h)(import_button.default, {
1465
- size: "mini",
1466
- disabled: inputValue === "" || import_xe_utils.default.eqNull(inputValue),
1467
- content: getI18n("vxe.button.clear"),
1468
- onClick: clearValueEvent
1469
- }) : renderEmptyElement($xeDatePicker),
1470
- showConfirmBtn ? (0, import_vue.h)(import_button.default, {
1471
- size: "mini",
1472
- status: "primary",
1473
- content: getI18n("vxe.button.confirm"),
1474
- onClick: confirmEvent
1475
- }) : renderEmptyElement($xeDatePicker)
1476
- ]
1477
- ) : renderEmptyElement($xeDatePicker)
1478
- ]
1479
- )
1480
- ]
1481
- ),
1482
- rightSlot ? (0, import_vue.h)(
1483
- "div",
1484
- {
1485
- class: "vxe-date-picker--layout-right-wrapper"
1486
- },
1487
- rightSlot({})
1488
- ) : renderShortcutBtn("right", true)
1489
- ]
1490
- ),
1491
- bottomSlot ? (0, import_vue.h)(
1492
- "div",
1493
- {
1494
- class: "vxe-date-picker--layout-bottom-wrapper"
1495
- },
1496
- bottomSlot({})
1497
- ) : renderShortcutBtn("bottom")
1498
- ]
1499
- )
1500
- ] : []
1501
- )
1502
- ]
1503
- );
1504
- };
1505
- const renderPrefixIcon = () => {
1506
- const { prefixIcon } = props;
1507
- const prefixSlot = slots.prefix;
1508
- return prefixSlot || prefixIcon ? (0, import_vue.h)(
1509
- "div",
1510
- {
1511
- class: "vxe-date-picker--prefix",
1512
- onClick: clickPrefixEvent
1261
+ setModelValueByEvent(evnt, value) {
1262
+ handleChange(value || "", evnt);
1513
1263
  },
1514
- [
1515
- (0, import_vue.h)(
1516
- "div",
1517
- {
1518
- class: "vxe-date-picker--prefix-icon"
1519
- },
1520
- prefixSlot ? (0, import_vn.getSlotVNs)(prefixSlot({})) : [
1521
- (0, import_vue.h)("i", {
1522
- class: prefixIcon
1523
- })
1524
- ]
1525
- )
1526
- ]
1527
- ) : null;
1528
- };
1529
- const renderSuffixIcon = () => {
1530
- const { suffixIcon } = props;
1531
- const { inputValue } = reactData;
1532
- const suffixSlot = slots.suffix;
1533
- const isDisabled = computeIsDisabled.value;
1534
- const isClearable = computeIsClearable.value;
1535
- return (0, import_vue.h)(
1536
- "div",
1537
- {
1538
- class: [
1539
- "vxe-date-picker--suffix",
1540
- {
1541
- "is--clear": isClearable && !isDisabled && !(inputValue === "" || import_xe_utils.default.eqNull(inputValue))
1542
- }
1543
- ]
1264
+ focus() {
1265
+ const inputElem = refInputTarget.value;
1266
+ reactData.isActivated = true;
1267
+ inputElem.focus();
1268
+ return (0, import_vue.nextTick)();
1269
+ },
1270
+ blur() {
1271
+ const inputElem = refInputTarget.value;
1272
+ inputElem.blur();
1273
+ reactData.isActivated = false;
1274
+ return (0, import_vue.nextTick)();
1275
+ },
1276
+ select() {
1277
+ const inputElem = refInputTarget.value;
1278
+ inputElem.select();
1279
+ reactData.isActivated = false;
1280
+ return (0, import_vue.nextTick)();
1544
1281
  },
1545
- [
1546
- isClearable ? (0, import_vue.h)(
1282
+ showPanel,
1283
+ hidePanel,
1284
+ updatePlacement
1285
+ };
1286
+ Object.assign($xeDatePicker, datePickerMethods);
1287
+ const renderShortcutBtn = (pos, isVertical) => {
1288
+ const shortcutOpts = computeShortcutOpts.value;
1289
+ const { position, align, mode } = shortcutOpts;
1290
+ const shortcutList = computeShortcutList.value;
1291
+ if ((0, import_utils.isEnableConf)(shortcutOpts) && shortcutList.length && (position || "left") === pos) {
1292
+ return (0, import_vue.h)(
1547
1293
  "div",
1548
1294
  {
1549
- class: "vxe-date-picker--clear-icon",
1550
- onClick: clearValueEvent
1295
+ class: `vxe-date-picker--layout-${pos}-wrapper`
1551
1296
  },
1552
1297
  [
1553
- (0, import_vue.h)("i", {
1554
- class: getIcon().INPUT_CLEAR
1298
+ (0, import_vue.h)(import_button_group.default, {
1299
+ options: shortcutList,
1300
+ mode,
1301
+ align,
1302
+ vertical: isVertical,
1303
+ onClick: handleShortcutEvent
1555
1304
  })
1556
1305
  ]
1557
- ) : renderEmptyElement($xeDatePicker),
1558
- renderExtraSuffixIcon(),
1559
- suffixSlot || suffixIcon ? (0, import_vue.h)(
1560
- "div",
1561
- {
1562
- class: "vxe-date-picker--suffix-icon",
1563
- onClick: clickSuffixEvent
1564
- },
1565
- suffixSlot ? (0, import_vn.getSlotVNs)(suffixSlot({})) : [
1566
- (0, import_vue.h)("i", {
1567
- class: suffixIcon
1568
- })
1306
+ );
1307
+ }
1308
+ return renderEmptyElement($xeDatePicker);
1309
+ };
1310
+ const renderPanel = () => {
1311
+ const popupOpts = computePopupOpts.value;
1312
+ if (popupOpts.enabled === false) {
1313
+ return renderEmptyElement($xeDatePicker);
1314
+ }
1315
+ const { type, multiple, showClearButton, showConfirmButton } = props;
1316
+ const { initialized, isAniVisible, visiblePanel, panelPlacement, panelStyle, inputValue } = reactData;
1317
+ const vSize = computeSize.value;
1318
+ const btnTransfer = computeBtnTransfer.value;
1319
+ const shortcutOpts = computeShortcutOpts.value;
1320
+ const isClearable = computeIsClearable.value;
1321
+ const isTimeOrDateTimeType = computeIsTimeOrDateTimeType.value;
1322
+ const shortcutList = computeShortcutList.value;
1323
+ const timeOpts = computeTimeOpts.value;
1324
+ const dateStartDate = computeDateStartDate.value;
1325
+ const dateEndDate = computeDateEndDate.value;
1326
+ const { appendTo } = popupOpts;
1327
+ const { position } = shortcutOpts;
1328
+ const headerSlot = slots.header;
1329
+ const footerSlot = slots.footer;
1330
+ const topSlot = slots.top;
1331
+ const bottomSlot = slots.bottom;
1332
+ const leftSlot = slots.left;
1333
+ const rightSlot = slots.right;
1334
+ const ppClassName = popupOpts.className;
1335
+ const hasShortcutBtn = shortcutList.length > 0;
1336
+ const showConfirmBtn = showConfirmButton === null ? isTimeOrDateTimeType || multiple : showConfirmButton;
1337
+ const showClearBtn = showClearButton === null ? isClearable && showConfirmBtn && type !== "time" : showClearButton;
1338
+ return (0, import_vue.h)(
1339
+ import_vue.Teleport,
1340
+ {
1341
+ to: (0, import_dom.getPopupContainer)(appendTo),
1342
+ disabled: btnTransfer ? !initialized : true
1343
+ },
1344
+ [
1345
+ (0, import_vue.h)(
1346
+ "div",
1347
+ {
1348
+ ref: refInputPanel,
1349
+ class: [
1350
+ "vxe-table--ignore-clear vxe-date-picker--panel",
1351
+ `type--${type}`,
1352
+ ppClassName ? import_xe_utils.default.isFunction(ppClassName) ? ppClassName({ $datePicker: $xeDatePicker }) : ppClassName : "",
1353
+ {
1354
+ [`size--${vSize}`]: vSize,
1355
+ "is--transfer": btnTransfer,
1356
+ "ani--leave": isAniVisible,
1357
+ "ani--enter": visiblePanel,
1358
+ "show--top": !!(topSlot || headerSlot || hasShortcutBtn && (position === "top" || position === "header")),
1359
+ "show--bottom": !!(bottomSlot || footerSlot || hasShortcutBtn && (position === "bottom" || position === "footer")),
1360
+ "show--left": !!(leftSlot || hasShortcutBtn && position === "left"),
1361
+ "show--right": !!(rightSlot || hasShortcutBtn && position === "right")
1362
+ }
1363
+ ],
1364
+ placement: panelPlacement,
1365
+ style: panelStyle
1366
+ },
1367
+ initialized && (visiblePanel || isAniVisible) ? [
1368
+ (0, import_vue.h)(
1369
+ "div",
1370
+ {
1371
+ ref: refPanelWrapper,
1372
+ class: [
1373
+ "vxe-date-picker--layout-all-wrapper",
1374
+ `type--${type}`,
1375
+ {
1376
+ [`size--${vSize}`]: vSize
1377
+ }
1378
+ ]
1379
+ },
1380
+ [
1381
+ topSlot ? (0, import_vue.h)(
1382
+ "div",
1383
+ {
1384
+ class: "vxe-date-picker--layout-top-wrapper"
1385
+ },
1386
+ topSlot({})
1387
+ ) : renderShortcutBtn("top"),
1388
+ (0, import_vue.h)(
1389
+ "div",
1390
+ {
1391
+ class: "vxe-date-picker--layout-body-layout-wrapper"
1392
+ },
1393
+ [
1394
+ leftSlot ? (0, import_vue.h)(
1395
+ "div",
1396
+ {
1397
+ class: "vxe-date-picker--layout-left-wrapper"
1398
+ },
1399
+ leftSlot({})
1400
+ ) : renderShortcutBtn("left", true),
1401
+ (0, import_vue.h)(
1402
+ "div",
1403
+ {
1404
+ class: "vxe-date-picker--layout-body-content-wrapper"
1405
+ },
1406
+ [
1407
+ headerSlot ? (0, import_vue.h)(
1408
+ "div",
1409
+ {
1410
+ class: "vxe-date-picker--layout-header-wrapper"
1411
+ },
1412
+ headerSlot({})
1413
+ ) : renderShortcutBtn("header"),
1414
+ (0, import_vue.h)(
1415
+ "div",
1416
+ {
1417
+ class: "vxe-date-picker--layout-body-wrapper"
1418
+ },
1419
+ [
1420
+ (0, import_vue.h)(import_date_panel.default, {
1421
+ ref: refDatePanel,
1422
+ modelValue: reactData.inputValue,
1423
+ type: props.type,
1424
+ className: props.className,
1425
+ multiple: props.multiple,
1426
+ limitCount: props.limitCount,
1427
+ startDate: dateStartDate,
1428
+ endDate: dateEndDate,
1429
+ defaultDate: props.defaultDate,
1430
+ defaultTime: props.defaultTime,
1431
+ minDate: props.minDate,
1432
+ maxDate: props.maxDate,
1433
+ startDay: props.startDay,
1434
+ labelFormat: props.labelFormat,
1435
+ valueFormat: props.valueFormat,
1436
+ timeFormat: props.timeFormat,
1437
+ timeConfig: timeOpts,
1438
+ festivalMethod: props.festivalMethod || defaultFuncProps.festivalMethod,
1439
+ disabledMethod: props.disabledMethod || defaultFuncProps.disabledMethod,
1440
+ selectDay: props.selectDay,
1441
+ onChange: panelChangeEvent,
1442
+ onConfirm: panelConfirmEvent,
1443
+ onRevert: panelRevertEvent
1444
+ })
1445
+ ]
1446
+ ),
1447
+ (0, import_vue.h)(
1448
+ "div",
1449
+ {
1450
+ class: "vxe-date-picker--layout-footer-wrapper"
1451
+ },
1452
+ [
1453
+ (0, import_vue.h)(
1454
+ "div",
1455
+ {
1456
+ class: "vxe-date-picker--layout-footer-custom"
1457
+ },
1458
+ footerSlot ? footerSlot({}) : [renderShortcutBtn("footer")]
1459
+ ),
1460
+ showClearBtn || showConfirmBtn ? (0, import_vue.h)(
1461
+ "div",
1462
+ {
1463
+ class: "vxe-date-picker--layout-footer-btns"
1464
+ },
1465
+ [
1466
+ showClearBtn ? (0, import_vue.h)(import_button.default, {
1467
+ size: "mini",
1468
+ disabled: inputValue === "" || import_xe_utils.default.eqNull(inputValue),
1469
+ content: getI18n("vxe.button.clear"),
1470
+ onClick: clearValueEvent
1471
+ }) : renderEmptyElement($xeDatePicker),
1472
+ showConfirmBtn ? (0, import_vue.h)(import_button.default, {
1473
+ size: "mini",
1474
+ status: "primary",
1475
+ content: getI18n("vxe.button.confirm"),
1476
+ onClick: confirmEvent
1477
+ }) : renderEmptyElement($xeDatePicker)
1478
+ ]
1479
+ ) : renderEmptyElement($xeDatePicker)
1480
+ ]
1481
+ )
1482
+ ]
1483
+ ),
1484
+ rightSlot ? (0, import_vue.h)(
1485
+ "div",
1486
+ {
1487
+ class: "vxe-date-picker--layout-right-wrapper"
1488
+ },
1489
+ rightSlot({})
1490
+ ) : renderShortcutBtn("right", true)
1491
+ ]
1492
+ ),
1493
+ bottomSlot ? (0, import_vue.h)(
1494
+ "div",
1495
+ {
1496
+ class: "vxe-date-picker--layout-bottom-wrapper"
1497
+ },
1498
+ bottomSlot({})
1499
+ ) : renderShortcutBtn("bottom")
1500
+ ]
1501
+ )
1502
+ ] : []
1503
+ )
1504
+ ]
1505
+ );
1506
+ };
1507
+ const renderPrefixIcon = () => {
1508
+ const { prefixIcon } = props;
1509
+ const prefixSlot = slots.prefix;
1510
+ return prefixSlot || prefixIcon ? (0, import_vue.h)(
1511
+ "div",
1512
+ {
1513
+ class: "vxe-date-picker--prefix",
1514
+ onClick: clickPrefixEvent
1515
+ },
1516
+ [
1517
+ (0, import_vue.h)(
1518
+ "div",
1519
+ {
1520
+ class: "vxe-date-picker--prefix-icon"
1521
+ },
1522
+ prefixSlot ? (0, import_vn.getSlotVNs)(prefixSlot({})) : [
1523
+ (0, import_vue.h)("i", {
1524
+ class: prefixIcon
1525
+ })
1526
+ ]
1527
+ )
1528
+ ]
1529
+ ) : null;
1530
+ };
1531
+ const renderSuffixIcon = () => {
1532
+ const { suffixIcon } = props;
1533
+ const { inputValue } = reactData;
1534
+ const suffixSlot = slots.suffix;
1535
+ const isDisabled = computeIsDisabled.value;
1536
+ const isClearable = computeIsClearable.value;
1537
+ return (0, import_vue.h)(
1538
+ "div",
1539
+ {
1540
+ class: [
1541
+ "vxe-date-picker--suffix",
1542
+ {
1543
+ "is--clear": isClearable && !isDisabled && !(inputValue === "" || import_xe_utils.default.eqNull(inputValue))
1544
+ }
1569
1545
  ]
1570
- ) : renderEmptyElement($xeDatePicker)
1571
- ]
1572
- );
1573
- };
1574
- const renderExtraSuffixIcon = () => {
1575
- return (0, import_vue.h)(
1576
- "div",
1577
- {
1578
- class: "vxe-date-picker--control-icon",
1579
- onClick: clickIconEvent
1580
- },
1581
- [
1582
- (0, import_vue.h)("i", {
1583
- class: ["vxe-date-picker--date-picker-icon", getIcon().DATE_PICKER_DATE]
1584
- })
1585
- ]
1586
- );
1587
- };
1588
- const renderVN = () => {
1589
- const { className, inputClassName, type, name, autoComplete } = props;
1590
- const { inputValue, visiblePanel, isActivated, labelFlag } = reactData;
1591
- const { inputLabel } = internalData;
1592
- const vSize = computeSize.value;
1593
- const isDisabled = computeIsDisabled.value;
1594
- const formReadonly = computeFormReadonly.value;
1595
- const panelLabel = computePanelLabel.value;
1596
- if (formReadonly) {
1546
+ },
1547
+ [
1548
+ isClearable ? (0, import_vue.h)(
1549
+ "div",
1550
+ {
1551
+ class: "vxe-date-picker--clear-icon",
1552
+ onClick: clearValueEvent
1553
+ },
1554
+ [
1555
+ (0, import_vue.h)("i", {
1556
+ class: getIcon().INPUT_CLEAR
1557
+ })
1558
+ ]
1559
+ ) : renderEmptyElement($xeDatePicker),
1560
+ renderExtraSuffixIcon(),
1561
+ suffixSlot || suffixIcon ? (0, import_vue.h)(
1562
+ "div",
1563
+ {
1564
+ class: "vxe-date-picker--suffix-icon",
1565
+ onClick: clickSuffixEvent
1566
+ },
1567
+ suffixSlot ? (0, import_vn.getSlotVNs)(suffixSlot({})) : [
1568
+ (0, import_vue.h)("i", {
1569
+ class: suffixIcon
1570
+ })
1571
+ ]
1572
+ ) : renderEmptyElement($xeDatePicker)
1573
+ ]
1574
+ );
1575
+ };
1576
+ const renderExtraSuffixIcon = () => {
1597
1577
  return (0, import_vue.h)(
1598
1578
  "div",
1599
1579
  {
1600
- ref: refElem,
1601
- class: ["vxe-date-picker--readonly", `type--${type}`, className]
1580
+ class: "vxe-date-picker--control-icon",
1581
+ onClick: clickIconEvent
1602
1582
  },
1603
- panelLabel
1583
+ [
1584
+ (0, import_vue.h)("i", {
1585
+ class: ["vxe-date-picker--date-picker-icon", getIcon().DATE_PICKER_DATE]
1586
+ })
1587
+ ]
1604
1588
  );
1605
- }
1606
- const currStyle = computeCurrStyle.value;
1607
- const inputReadonly = computeInputReadonly.value;
1608
- const inpPlaceholder = computeInpPlaceholder.value;
1609
- const isClearable = computeIsClearable.value;
1610
- const prefix = renderPrefixIcon();
1611
- const suffix = renderSuffixIcon();
1612
- return (0, import_vue.h)(
1613
- "div",
1614
- {
1615
- ref: refElem,
1616
- class: [
1617
- "vxe-date-picker",
1618
- `type--${type}`,
1619
- className,
1620
- {
1621
- [`size--${vSize}`]: vSize,
1622
- "is--prefix": !!prefix,
1623
- "is--suffix": !!suffix,
1624
- "is--visible": visiblePanel,
1625
- "is--disabled": isDisabled,
1626
- "is--active": isActivated,
1627
- "show--clear": isClearable && !isDisabled && !(inputValue === "" || import_xe_utils.default.eqNull(inputValue))
1628
- }
1629
- ],
1630
- style: currStyle,
1631
- spellcheck: false
1632
- },
1633
- [
1634
- prefix || renderEmptyElement($xeDatePicker),
1635
- (0, import_vue.h)(
1589
+ };
1590
+ const renderVN = () => {
1591
+ const { className, inputClassName, type, name, autoComplete } = props;
1592
+ const { inputValue, visiblePanel, isActivated, labelFlag } = reactData;
1593
+ const { inputLabel } = internalData;
1594
+ const vSize = computeSize.value;
1595
+ const isDisabled = computeIsDisabled.value;
1596
+ const formReadonly = computeFormReadonly.value;
1597
+ const panelLabel = computePanelLabel.value;
1598
+ if (formReadonly) {
1599
+ return (0, import_vue.h)(
1636
1600
  "div",
1637
1601
  {
1638
- class: "vxe-date-picker--wrapper"
1602
+ ref: refElem,
1603
+ class: ["vxe-date-picker--readonly", `type--${type}`, className]
1639
1604
  },
1640
- [
1641
- (0, import_vue.h)("input", {
1642
- ref: refInputTarget,
1643
- class: "vxe-date-picker--inner" + (inputClassName ? " " + inputClassName : ""),
1644
- value: labelFlag ? inputLabel : "",
1645
- name,
1646
- type: "text",
1647
- placeholder: inpPlaceholder,
1648
- readonly: inputReadonly,
1649
- disabled: isDisabled,
1650
- autocomplete: autoComplete,
1651
- onKeydown: keydownEvent,
1652
- onKeyup: keyupEvent,
1653
- onClick: clickEvent,
1654
- onInput: inputEvent,
1655
- onChange: changeEvent,
1656
- onFocus: focusEvent,
1657
- onBlur: blurEvent
1658
- })
1659
- ]
1660
- ),
1661
- suffix || renderEmptyElement($xeDatePicker),
1662
- // 下拉面板
1663
- renderPanel()
1664
- ]
1605
+ panelLabel
1606
+ );
1607
+ }
1608
+ const currStyle = computeCurrStyle.value;
1609
+ const inputReadonly = computeInputReadonly.value;
1610
+ const inpPlaceholder = computeInpPlaceholder.value;
1611
+ const isClearable = computeIsClearable.value;
1612
+ const prefix = renderPrefixIcon();
1613
+ const suffix = renderSuffixIcon();
1614
+ return (0, import_vue.h)(
1615
+ "div",
1616
+ {
1617
+ ref: refElem,
1618
+ class: [
1619
+ "vxe-date-picker",
1620
+ `type--${type}`,
1621
+ className,
1622
+ {
1623
+ [`size--${vSize}`]: vSize,
1624
+ "is--prefix": !!prefix,
1625
+ "is--suffix": !!suffix,
1626
+ "is--visible": visiblePanel,
1627
+ "is--disabled": isDisabled,
1628
+ "is--active": isActivated,
1629
+ "show--clear": isClearable && !isDisabled && !(inputValue === "" || import_xe_utils.default.eqNull(inputValue))
1630
+ }
1631
+ ],
1632
+ style: currStyle,
1633
+ spellcheck: false
1634
+ },
1635
+ [
1636
+ prefix || renderEmptyElement($xeDatePicker),
1637
+ (0, import_vue.h)(
1638
+ "div",
1639
+ {
1640
+ class: "vxe-date-picker--wrapper"
1641
+ },
1642
+ [
1643
+ (0, import_vue.h)("input", {
1644
+ ref: refInputTarget,
1645
+ class: "vxe-date-picker--inner" + (inputClassName ? " " + inputClassName : ""),
1646
+ value: labelFlag ? inputLabel : "",
1647
+ name,
1648
+ type: "text",
1649
+ placeholder: inpPlaceholder,
1650
+ readonly: inputReadonly,
1651
+ disabled: isDisabled,
1652
+ autocomplete: autoComplete,
1653
+ onKeydown: keydownEvent,
1654
+ onKeyup: keyupEvent,
1655
+ onClick: clickEvent,
1656
+ onInput: inputEvent,
1657
+ onChange: changeEvent,
1658
+ onFocus: focusEvent,
1659
+ onBlur: blurEvent
1660
+ })
1661
+ ]
1662
+ ),
1663
+ suffix || renderEmptyElement($xeDatePicker),
1664
+ // 下拉面板
1665
+ renderPanel()
1666
+ ]
1667
+ );
1668
+ };
1669
+ (0, import_vue.watch)(computePanelLabel, (val) => {
1670
+ handleInputLabel(val, true);
1671
+ });
1672
+ (0, import_vue.watch)(
1673
+ () => props.modelValue,
1674
+ () => {
1675
+ updateModelValue();
1676
+ }
1665
1677
  );
1666
- };
1667
- (0, import_vue.watch)(computePanelLabel, (val) => {
1668
- handleInputLabel(val, true);
1669
- });
1670
- (0, import_vue.watch)(
1671
- () => props.modelValue,
1672
- () => {
1673
- updateModelValue();
1674
- }
1675
- );
1676
- updateModelValue();
1677
- (0, import_vue.nextTick)(() => {
1678
- globalEvents.on($xeDatePicker, "mousedown", handleGlobalMousedownEvent);
1679
- globalEvents.on($xeDatePicker, "keydown", handleGlobalKeydownEvent);
1680
- globalEvents.on($xeDatePicker, "blur", handleGlobalBlurEvent);
1681
- globalEvents.on($xeDatePicker, "resize", handleGlobalResizeEvent);
1682
- globalEvents.on($xeDatePicker, "scroll", handleGlobalScrollEvent);
1683
- });
1684
- (0, import_vue.onMounted)(() => {
1685
- const { type, multiple, maskedConfig } = props;
1686
- if ((0, import_utils.isEnableConf)(maskedConfig)) {
1687
- if (multiple) {
1688
- errLog("vxe.error.notSupportProp", ["multiple", "masked-config.enabled=true", "masked-config.enabled=false"]);
1678
+ updateModelValue();
1679
+ (0, import_vue.nextTick)(() => {
1680
+ globalEvents.on($xeDatePicker, "mousedown", handleGlobalMousedownEvent);
1681
+ globalEvents.on($xeDatePicker, "keydown", handleGlobalKeydownEvent);
1682
+ globalEvents.on($xeDatePicker, "blur", handleGlobalBlurEvent);
1683
+ globalEvents.on($xeDatePicker, "resize", handleGlobalResizeEvent);
1684
+ globalEvents.on($xeDatePicker, "scroll", handleGlobalScrollEvent);
1685
+ });
1686
+ (0, import_vue.onMounted)(() => {
1687
+ const { type, multiple, maskedConfig } = props;
1688
+ if ((0, import_utils.isEnableConf)(maskedConfig)) {
1689
+ if (multiple) {
1690
+ errLog("vxe.error.notSupportProp", ["multiple", "masked-config.enabled=true", "masked-config.enabled=false"]);
1691
+ }
1692
+ if (!maskedTypes.includes(type)) {
1693
+ warnLog("vxe.error.notSupportProp", ["masked-config.enabled=true", `type=${type}`, `type=${maskedTypes.join("|")}`]);
1694
+ }
1689
1695
  }
1690
- if (!maskedTypes.includes(type)) {
1691
- warnLog("vxe.error.notSupportProp", ["masked-config.enabled=true", `type=${type}`, `type=${maskedTypes.join("|")}`]);
1692
- }
1693
- }
1694
- });
1695
- (0, import_vue.onUnmounted)(() => {
1696
- globalEvents.off($xeDatePicker, "mousedown");
1697
- globalEvents.off($xeDatePicker, "keydown");
1698
- globalEvents.off($xeDatePicker, "blur");
1699
- globalEvents.off($xeDatePicker, "resize");
1700
- globalEvents.off($xeDatePicker, "scroll");
1701
- import_xe_utils.default.assign(reactData, createReactData());
1702
- import_xe_utils.default.assign(internalData, createInternalData());
1703
- });
1704
- (0, import_vue.provide)("$xeDatePicker", $xeDatePicker);
1705
- $xeDatePicker.renderVN = renderVN;
1706
- return $xeDatePicker;
1707
- },
1708
- render() {
1709
- return this.renderVN();
1710
- }
1711
- });
1696
+ });
1697
+ (0, import_vue.onUnmounted)(() => {
1698
+ globalEvents.off($xeDatePicker, "mousedown");
1699
+ globalEvents.off($xeDatePicker, "keydown");
1700
+ globalEvents.off($xeDatePicker, "blur");
1701
+ globalEvents.off($xeDatePicker, "resize");
1702
+ globalEvents.off($xeDatePicker, "scroll");
1703
+ import_xe_utils.default.assign(reactData, createReactData());
1704
+ import_xe_utils.default.assign(internalData, createInternalData());
1705
+ });
1706
+ (0, import_vue.provide)("$xeDatePicker", $xeDatePicker);
1707
+ $xeDatePicker.renderVN = renderVN;
1708
+ return $xeDatePicker;
1709
+ },
1710
+ render() {
1711
+ return this.renderVN();
1712
+ }
1713
+ })
1714
+ );