@aplus-frontend/ui 0.0.1-beta.7 → 0.0.1-beta.8

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 (351) hide show
  1. package/es/index.mjs +165 -160
  2. package/es/src/ap-action/group/index.vue.mjs +22 -18
  3. package/es/src/ap-action/index.mjs +7 -4
  4. package/es/src/ap-action/interface.mjs +1 -0
  5. package/es/src/ap-action/item/index.vue.mjs +2 -47
  6. package/es/src/ap-action/item/index.vue2.mjs +47 -2
  7. package/es/src/ap-action/item-dropdown/index.vue.mjs +14 -11
  8. package/es/src/ap-action/item-modal/index.vue.mjs +9 -8
  9. package/es/src/ap-action/item-popconfirm/index.vue.mjs +10 -8
  10. package/es/src/ap-field/checkbox/index.vue.mjs +32 -25
  11. package/es/src/ap-field/date/index.vue.mjs +19 -20
  12. package/es/src/ap-field/date-range/index.vue.mjs +9 -9
  13. package/es/src/ap-field/index.d.ts +12 -0
  14. package/es/src/ap-field/index.mjs +42 -0
  15. package/es/src/ap-field/interface.d.ts +3 -2
  16. package/es/src/ap-field/interface.mjs +1 -0
  17. package/es/src/ap-field/number/helper.mjs +2 -2
  18. package/es/src/ap-field/number/index.vue.mjs +30 -32
  19. package/es/src/ap-field/radio/index.vue.mjs +40 -34
  20. package/es/src/ap-field/select/index.vue.mjs +1 -1
  21. package/es/src/ap-field/switch/index.vue.mjs +6 -6
  22. package/es/src/ap-field/text/index.vue.mjs +29 -29
  23. package/es/src/ap-field/text-area/index.vue.mjs +5 -5
  24. package/es/src/ap-form/ap-form-item-group/index.vue.mjs +2 -56
  25. package/es/src/ap-form/ap-form-item-group/index.vue2.mjs +56 -2
  26. package/es/src/ap-form/ap-form-item.vue.mjs +2 -74
  27. package/es/src/ap-form/ap-form-item.vue2.mjs +74 -2
  28. package/es/src/ap-form/components/interface.d.ts +0 -0
  29. package/es/src/ap-form/index.d.ts +11 -1682
  30. package/es/src/ap-form/index.mjs +11 -7
  31. package/es/src/base-button/button.vue.mjs +2 -58
  32. package/es/src/base-button/button.vue2.mjs +59 -2
  33. package/es/src/base-button/index.mjs +8 -8
  34. package/es/src/base-button/interface.mjs +1 -0
  35. package/es/src/base-button/modal-button.vue.mjs +12 -11
  36. package/es/src/base-button/pop-confirm-button.vue.mjs +15 -14
  37. package/es/src/basic/arrow.vue.mjs +2 -38
  38. package/es/src/basic/arrow.vue2.mjs +38 -2
  39. package/es/src/basic/help.vue.mjs +2 -96
  40. package/es/src/basic/help.vue2.mjs +96 -2
  41. package/es/src/basic/index.mjs +11 -7
  42. package/es/src/basic/interface.mjs +1 -0
  43. package/es/src/basic/title.vue.mjs +2 -32
  44. package/es/src/basic/title.vue2.mjs +33 -2
  45. package/es/src/config-provider/config-provider.mjs +4 -4
  46. package/es/src/config-provider/hooks/use-locale.mjs +1 -0
  47. package/es/src/config-provider/index.mjs +26 -13
  48. package/es/src/container/collapse/header.vue.mjs +2 -49
  49. package/es/src/container/collapse/header.vue2.mjs +49 -2
  50. package/es/src/container/collapse/index.vue.mjs +2 -85
  51. package/es/src/container/collapse/index.vue2.mjs +86 -2
  52. package/es/src/container/index.mjs +8 -5
  53. package/es/src/container/interface.mjs +1 -0
  54. package/es/src/container/scroll-container.vue.mjs +2 -60
  55. package/es/src/container/scroll-container.vue2.mjs +60 -2
  56. package/es/src/count-down/button.vue.mjs +2 -44
  57. package/es/src/count-down/button.vue2.mjs +44 -2
  58. package/es/src/count-down/index.mjs +8 -5
  59. package/es/src/count-down/input.vue.mjs +2 -44
  60. package/es/src/count-down/input.vue2.mjs +45 -2
  61. package/es/src/count-down/interface.mjs +1 -0
  62. package/es/src/cropper/cropper-avatar.vue.mjs +2 -94
  63. package/es/src/cropper/cropper-avatar.vue2.mjs +96 -2
  64. package/es/src/cropper/cropper-image.vue.mjs +2 -129
  65. package/es/src/cropper/cropper-image.vue2.mjs +129 -2
  66. package/es/src/cropper/cropper-modal.vue.mjs +2 -270
  67. package/es/src/cropper/cropper-modal.vue2.mjs +271 -2
  68. package/es/src/cropper/index.mjs +8 -5
  69. package/es/src/cropper/interface.mjs +1 -0
  70. package/es/src/description/description.vue.mjs +2 -169
  71. package/es/src/description/description.vue2.mjs +169 -2
  72. package/es/src/description/index.mjs +8 -5
  73. package/es/src/description/interface.mjs +1 -0
  74. package/es/src/dropdown/dropdown.vue.mjs +2 -92
  75. package/es/src/dropdown/dropdown.vue2.mjs +92 -2
  76. package/es/src/dropdown/index.mjs +5 -3
  77. package/es/src/dropdown/interface.mjs +1 -0
  78. package/es/src/hooks/index.mjs +6 -0
  79. package/es/src/hooks/useMessage.mjs +1 -1
  80. package/es/src/icon/icon.vue.mjs +2 -66
  81. package/es/src/icon/icon.vue2.mjs +67 -2
  82. package/es/src/icon/index.mjs +8 -5
  83. package/es/src/icon/interface.mjs +1 -0
  84. package/es/src/icon/svg-icon.vue.mjs +2 -32
  85. package/es/src/icon/svg-icon.vue2.mjs +32 -2
  86. package/es/src/icon-picker/icon-picker.vue.mjs +2 -166
  87. package/es/src/icon-picker/icon-picker.vue2.mjs +168 -2
  88. package/es/src/icon-picker/index.mjs +7 -5
  89. package/es/src/icon-picker/interface.mjs +1 -0
  90. package/es/src/index.mjs +161 -155
  91. package/es/src/locale/index.mjs +7 -0
  92. package/es/src/locale/interface.mjs +1 -0
  93. package/es/src/modal/basic.vue.mjs +2 -195
  94. package/es/src/modal/basic.vue2.mjs +199 -2
  95. package/es/src/modal/components/modal-close.vue.mjs +2 -72
  96. package/es/src/modal/components/modal-close.vue2.mjs +72 -2
  97. package/es/src/modal/components/modal-footer.vue.mjs +2 -43
  98. package/es/src/modal/components/modal-footer.vue2.mjs +43 -2
  99. package/es/src/modal/components/modal-header.vue.mjs +1 -18
  100. package/es/src/modal/components/modal-header.vue2.mjs +18 -1
  101. package/es/src/modal/components/modal-wrapper.vue.mjs +2 -99
  102. package/es/src/modal/components/modal-wrapper.vue2.mjs +102 -2
  103. package/es/src/modal/components/modal.mjs +6 -6
  104. package/es/src/modal/hooks/use-modal-drag.mjs +1 -1
  105. package/es/src/modal/hooks/use-modal.mjs +8 -8
  106. package/es/src/modal/index.mjs +10 -7
  107. package/es/src/modal/interface.mjs +1 -0
  108. package/es/src/pro-form/component-map.mjs +56 -41
  109. package/es/src/pro-form/components/api-tree-select.vue.mjs +1 -1
  110. package/es/src/pro-form/components/form-action.vue.mjs +2 -105
  111. package/es/src/pro-form/components/form-action.vue2.mjs +105 -2
  112. package/es/src/pro-form/components/form-item.vue.mjs +2 -352
  113. package/es/src/pro-form/components/form-item.vue2.mjs +352 -2
  114. package/es/src/pro-form/components/interface.mjs +1 -0
  115. package/es/src/pro-form/hooks/use-break-point.mjs +21 -20
  116. package/es/src/pro-form/hooks/use-component-register.d.ts +4 -0
  117. package/es/src/pro-form/hooks/use-component-register.mjs +13 -0
  118. package/es/src/pro-form/hooks/use-form-events.mjs +1 -1
  119. package/es/src/pro-form/hooks/use-form-values.mjs +1 -1
  120. package/es/src/pro-form/hooks/use-form.mjs +4 -4
  121. package/es/src/pro-form/index.d.ts +1 -0
  122. package/es/src/pro-form/index.mjs +34 -34
  123. package/es/src/pro-form/pro-form.vue.d.ts +1 -1
  124. package/es/src/pro-form/pro-form.vue.mjs +39 -37
  125. package/es/src/pro-form/types/form-item.mjs +1 -0
  126. package/es/src/pro-form/types/form.d.ts +8 -8
  127. package/es/src/pro-table/component-map.mjs +29 -37
  128. package/es/src/pro-table/components/editable/editable-cell.vue.mjs +2 -378
  129. package/es/src/pro-table/components/editable/editable-cell.vue2.mjs +378 -2
  130. package/es/src/pro-table/components/editable/index.mjs +7 -6
  131. package/es/src/pro-table/components/header-cell.vue.mjs +2 -43
  132. package/es/src/pro-table/components/header-cell.vue2.mjs +44 -2
  133. package/es/src/pro-table/components/settings/column-setting.vue.mjs +2 -307
  134. package/es/src/pro-table/components/settings/column-setting.vue2.mjs +308 -2
  135. package/es/src/pro-table/components/settings/full-screen-setting.vue.mjs +2 -30
  136. package/es/src/pro-table/components/settings/full-screen-setting.vue2.mjs +30 -2
  137. package/es/src/pro-table/components/settings/index.vue.mjs +2 -59
  138. package/es/src/pro-table/components/settings/index.vue2.mjs +63 -2
  139. package/es/src/pro-table/components/settings/redo-setting.vue.mjs +2 -26
  140. package/es/src/pro-table/components/settings/redo-setting.vue2.mjs +26 -2
  141. package/es/src/pro-table/components/settings/size-setting.vue.mjs +2 -71
  142. package/es/src/pro-table/components/settings/size-setting.vue2.mjs +71 -2
  143. package/es/src/pro-table/components/table-action.vue.mjs +2 -2
  144. package/es/src/pro-table/components/table-footer.vue.mjs +2 -61
  145. package/es/src/pro-table/components/table-footer.vue2.mjs +61 -2
  146. package/es/src/pro-table/components/table-header.vue.mjs +2 -86
  147. package/es/src/pro-table/components/table-header.vue2.mjs +89 -2
  148. package/es/src/pro-table/components/table-selection-bar.vue.mjs +2 -40
  149. package/es/src/pro-table/components/table-selection-bar.vue2.mjs +40 -2
  150. package/es/src/pro-table/components/table-title.vue.mjs +2 -41
  151. package/es/src/pro-table/components/table-title.vue2.mjs +41 -2
  152. package/es/src/pro-table/hooks/use-columns.mjs +5 -5
  153. package/es/src/pro-table/hooks/use-data-source.mjs +1 -1
  154. package/es/src/pro-table/hooks/use-pagination.mjs +4 -4
  155. package/es/src/pro-table/hooks/use-scroll-to.mjs +1 -1
  156. package/es/src/pro-table/hooks/use-table-footer.mjs +8 -7
  157. package/es/src/pro-table/hooks/use-table-header.mjs +12 -11
  158. package/es/src/pro-table/index.mjs +12 -0
  159. package/es/src/pro-table/interface.mjs +1 -0
  160. package/es/src/pro-table/pro-table.vue.mjs +55 -56
  161. package/es/src/pro-table/types/pagination.mjs +1 -0
  162. package/es/src/pro-table/types/table-action.mjs +1 -0
  163. package/es/src/pro-table/types/table.mjs +1 -0
  164. package/es/src/prompt/dialog.vue.mjs +2 -61
  165. package/es/src/prompt/dialog.vue2.mjs +58 -2
  166. package/es/src/prompt/index.mjs +9 -8
  167. package/es/src/prompt/utils.d.ts +3 -3
  168. package/es/src/scroll-bar/bar-item.mjs +4 -4
  169. package/es/src/scroll-bar/index.mjs +5 -3
  170. package/es/src/scroll-bar/interface.mjs +1 -0
  171. package/es/src/scroll-bar/scroll-bar.vue.mjs +2 -84
  172. package/es/src/scroll-bar/scroll-bar.vue2.mjs +84 -2
  173. package/es/src/strength-meter/index.mjs +5 -3
  174. package/es/src/strength-meter/interface.mjs +1 -0
  175. package/es/src/strength-meter/strength-meter.vue.mjs +2 -61
  176. package/es/src/strength-meter/strength-meter.vue2.mjs +61 -2
  177. package/es/src/transition/index.mjs +21 -24
  178. package/es/src/type.d.ts +1 -0
  179. package/es/src/utils/index.d.ts +1 -0
  180. package/es/src/utils/index.mjs +21 -8
  181. package/es/src/utils/tree.mjs +103 -13
  182. package/es/src/utils/uuid.mjs +15 -9
  183. package/lib/index.js +1 -1
  184. package/lib/src/ap-action/group/index.vue.js +1 -1
  185. package/lib/src/ap-action/index.js +1 -1
  186. package/lib/src/ap-action/interface.js +1 -0
  187. package/lib/src/ap-action/item/index.vue.js +1 -1
  188. package/lib/src/ap-action/item/index.vue2.js +1 -1
  189. package/lib/src/ap-action/item-dropdown/index.vue.js +1 -1
  190. package/lib/src/ap-action/item-modal/index.vue.js +1 -1
  191. package/lib/src/ap-action/item-popconfirm/index.vue.js +1 -1
  192. package/lib/src/ap-field/checkbox/index.vue.js +1 -1
  193. package/lib/src/ap-field/date/index.vue.js +1 -1
  194. package/lib/src/ap-field/date-range/index.vue.js +1 -1
  195. package/lib/src/ap-field/index.d.ts +12 -0
  196. package/lib/src/ap-field/index.js +1 -0
  197. package/lib/src/ap-field/interface.d.ts +3 -2
  198. package/lib/src/ap-field/interface.js +1 -0
  199. package/lib/src/ap-field/number/helper.js +1 -1
  200. package/lib/src/ap-field/number/index.vue.js +1 -1
  201. package/lib/src/ap-field/radio/index.vue.js +1 -1
  202. package/lib/src/ap-field/select/index.vue.js +1 -1
  203. package/lib/src/ap-field/switch/index.vue.js +1 -1
  204. package/lib/src/ap-field/text/index.vue.js +1 -1
  205. package/lib/src/ap-field/text-area/index.vue.js +1 -1
  206. package/lib/src/ap-form/ap-form-item-group/index.vue.js +1 -1
  207. package/lib/src/ap-form/ap-form-item-group/index.vue2.js +1 -1
  208. package/lib/src/ap-form/ap-form-item.vue.js +1 -1
  209. package/lib/src/ap-form/ap-form-item.vue2.js +1 -1
  210. package/lib/src/ap-form/components/interface.d.ts +0 -0
  211. package/lib/src/ap-form/index.d.ts +11 -1682
  212. package/lib/src/ap-form/index.js +1 -1
  213. package/lib/src/base-button/button.vue.js +1 -1
  214. package/lib/src/base-button/button.vue2.js +1 -1
  215. package/lib/src/base-button/index.js +1 -1
  216. package/lib/src/base-button/interface.js +1 -0
  217. package/lib/src/base-button/modal-button.vue.js +1 -1
  218. package/lib/src/base-button/pop-confirm-button.vue.js +1 -1
  219. package/lib/src/basic/arrow.vue.js +1 -1
  220. package/lib/src/basic/arrow.vue2.js +1 -1
  221. package/lib/src/basic/help.vue.js +1 -1
  222. package/lib/src/basic/help.vue2.js +1 -1
  223. package/lib/src/basic/index.js +1 -1
  224. package/lib/src/basic/interface.js +1 -0
  225. package/lib/src/basic/title.vue.js +1 -1
  226. package/lib/src/basic/title.vue2.js +1 -1
  227. package/lib/src/config-provider/hooks/use-locale.js +1 -1
  228. package/lib/src/config-provider/index.js +1 -1
  229. package/lib/src/container/collapse/header.vue.js +1 -1
  230. package/lib/src/container/collapse/header.vue2.js +1 -1
  231. package/lib/src/container/collapse/index.vue.js +1 -1
  232. package/lib/src/container/collapse/index.vue2.js +1 -1
  233. package/lib/src/container/index.js +1 -1
  234. package/lib/src/container/interface.js +1 -0
  235. package/lib/src/container/scroll-container.vue.js +1 -1
  236. package/lib/src/container/scroll-container.vue2.js +1 -1
  237. package/lib/src/count-down/button.vue.js +1 -1
  238. package/lib/src/count-down/button.vue2.js +1 -1
  239. package/lib/src/count-down/index.js +1 -1
  240. package/lib/src/count-down/input.vue.js +1 -1
  241. package/lib/src/count-down/input.vue2.js +1 -1
  242. package/lib/src/count-down/interface.js +1 -0
  243. package/lib/src/cropper/cropper-avatar.vue.js +1 -1
  244. package/lib/src/cropper/cropper-avatar.vue2.js +1 -1
  245. package/lib/src/cropper/cropper-image.vue.js +1 -1
  246. package/lib/src/cropper/cropper-image.vue2.js +1 -1
  247. package/lib/src/cropper/cropper-modal.vue.js +1 -1
  248. package/lib/src/cropper/cropper-modal.vue2.js +1 -1
  249. package/lib/src/cropper/index.js +1 -1
  250. package/lib/src/cropper/interface.js +1 -0
  251. package/lib/src/description/description.vue.js +1 -1
  252. package/lib/src/description/description.vue2.js +1 -1
  253. package/lib/src/description/index.js +1 -1
  254. package/lib/src/description/interface.js +1 -0
  255. package/lib/src/dropdown/dropdown.vue.js +1 -1
  256. package/lib/src/dropdown/dropdown.vue2.js +1 -1
  257. package/lib/src/dropdown/index.js +1 -1
  258. package/lib/src/dropdown/interface.js +1 -0
  259. package/lib/src/hooks/index.js +1 -0
  260. package/lib/src/icon/icon.vue.js +1 -1
  261. package/lib/src/icon/icon.vue2.js +1 -1
  262. package/lib/src/icon/index.js +1 -1
  263. package/lib/src/icon/interface.js +1 -0
  264. package/lib/src/icon/svg-icon.vue.js +1 -1
  265. package/lib/src/icon/svg-icon.vue2.js +1 -1
  266. package/lib/src/icon-picker/icon-picker.vue.js +1 -1
  267. package/lib/src/icon-picker/icon-picker.vue2.js +1 -1
  268. package/lib/src/icon-picker/index.js +1 -1
  269. package/lib/src/icon-picker/interface.js +1 -0
  270. package/lib/src/index.js +1 -1
  271. package/lib/src/locale/index.js +1 -0
  272. package/lib/src/locale/interface.js +1 -0
  273. package/lib/src/modal/basic.vue.js +1 -1
  274. package/lib/src/modal/basic.vue2.js +1 -1
  275. package/lib/src/modal/components/modal-close.vue.js +1 -1
  276. package/lib/src/modal/components/modal-close.vue2.js +1 -1
  277. package/lib/src/modal/components/modal-footer.vue.js +1 -1
  278. package/lib/src/modal/components/modal-footer.vue2.js +1 -1
  279. package/lib/src/modal/components/modal-header.vue.js +1 -1
  280. package/lib/src/modal/components/modal-header.vue2.js +1 -1
  281. package/lib/src/modal/components/modal-wrapper.vue.js +1 -1
  282. package/lib/src/modal/components/modal-wrapper.vue2.js +1 -1
  283. package/lib/src/modal/index.js +1 -1
  284. package/lib/src/modal/interface.js +1 -0
  285. package/lib/src/pro-form/component-map.js +1 -1
  286. package/lib/src/pro-form/components/form-action.vue.js +1 -1
  287. package/lib/src/pro-form/components/form-action.vue2.js +1 -1
  288. package/lib/src/pro-form/components/form-item.vue.js +1 -1
  289. package/lib/src/pro-form/components/form-item.vue2.js +1 -1
  290. package/lib/src/pro-form/components/interface.js +1 -0
  291. package/lib/src/pro-form/hooks/use-break-point.js +1 -1
  292. package/lib/src/pro-form/hooks/use-component-register.d.ts +4 -0
  293. package/lib/src/pro-form/hooks/use-component-register.js +1 -0
  294. package/lib/src/pro-form/index.d.ts +1 -0
  295. package/lib/src/pro-form/index.js +1 -1
  296. package/lib/src/pro-form/pro-form.vue.d.ts +1 -1
  297. package/lib/src/pro-form/pro-form.vue.js +1 -1
  298. package/lib/src/pro-form/types/form-item.js +1 -0
  299. package/lib/src/pro-form/types/form.d.ts +8 -8
  300. package/lib/src/pro-table/component-map.js +1 -1
  301. package/lib/src/pro-table/components/editable/editable-cell.vue.js +1 -1
  302. package/lib/src/pro-table/components/editable/editable-cell.vue2.js +1 -1
  303. package/lib/src/pro-table/components/editable/index.js +1 -1
  304. package/lib/src/pro-table/components/header-cell.vue.js +1 -1
  305. package/lib/src/pro-table/components/header-cell.vue2.js +1 -1
  306. package/lib/src/pro-table/components/settings/column-setting.vue.js +1 -1
  307. package/lib/src/pro-table/components/settings/column-setting.vue2.js +1 -1
  308. package/lib/src/pro-table/components/settings/full-screen-setting.vue.js +1 -1
  309. package/lib/src/pro-table/components/settings/full-screen-setting.vue2.js +1 -1
  310. package/lib/src/pro-table/components/settings/index.vue.js +1 -1
  311. package/lib/src/pro-table/components/settings/index.vue2.js +1 -1
  312. package/lib/src/pro-table/components/settings/redo-setting.vue.js +1 -1
  313. package/lib/src/pro-table/components/settings/redo-setting.vue2.js +1 -1
  314. package/lib/src/pro-table/components/settings/size-setting.vue.js +1 -1
  315. package/lib/src/pro-table/components/settings/size-setting.vue2.js +1 -1
  316. package/lib/src/pro-table/components/table-action.vue.js +1 -1
  317. package/lib/src/pro-table/components/table-footer.vue.js +1 -1
  318. package/lib/src/pro-table/components/table-footer.vue2.js +1 -1
  319. package/lib/src/pro-table/components/table-header.vue.js +1 -1
  320. package/lib/src/pro-table/components/table-header.vue2.js +1 -1
  321. package/lib/src/pro-table/components/table-selection-bar.vue.js +1 -1
  322. package/lib/src/pro-table/components/table-selection-bar.vue2.js +1 -1
  323. package/lib/src/pro-table/components/table-title.vue.js +1 -1
  324. package/lib/src/pro-table/components/table-title.vue2.js +1 -1
  325. package/lib/src/pro-table/hooks/use-table-footer.js +1 -1
  326. package/lib/src/pro-table/hooks/use-table-header.js +1 -1
  327. package/lib/src/pro-table/index.js +1 -0
  328. package/lib/src/pro-table/interface.js +1 -0
  329. package/lib/src/pro-table/pro-table.vue.js +1 -1
  330. package/lib/src/pro-table/types/pagination.js +1 -0
  331. package/lib/src/pro-table/types/table-action.js +1 -0
  332. package/lib/src/pro-table/types/table.js +1 -0
  333. package/lib/src/prompt/dialog.vue.js +1 -1
  334. package/lib/src/prompt/dialog.vue2.js +1 -1
  335. package/lib/src/prompt/index.js +1 -1
  336. package/lib/src/prompt/utils.d.ts +3 -3
  337. package/lib/src/scroll-bar/index.js +1 -1
  338. package/lib/src/scroll-bar/interface.js +1 -0
  339. package/lib/src/scroll-bar/scroll-bar.vue.js +1 -1
  340. package/lib/src/scroll-bar/scroll-bar.vue2.js +1 -1
  341. package/lib/src/strength-meter/index.js +1 -1
  342. package/lib/src/strength-meter/interface.js +1 -0
  343. package/lib/src/strength-meter/strength-meter.vue.js +1 -1
  344. package/lib/src/strength-meter/strength-meter.vue2.js +1 -1
  345. package/lib/src/transition/index.js +1 -1
  346. package/lib/src/type.d.ts +1 -0
  347. package/lib/src/utils/index.d.ts +1 -0
  348. package/lib/src/utils/index.js +1 -1
  349. package/lib/src/utils/tree.js +1 -1
  350. package/lib/src/utils/uuid.js +1 -1
  351. package/package.json +3 -3
@@ -1,4 +1,201 @@
1
- import f from "./basic.vue.mjs";
1
+ import { defineComponent as q, useAttrs as G, ref as m, nextTick as S, unref as o, getCurrentInstance as J, computed as d, toRef as K, watchEffect as Q, watch as U, openBlock as X, createBlock as Y, mergeProps as H, createSlots as O, withCtx as s, createVNode as h, renderSlot as $, renderList as R, normalizeProps as N, guardReactiveProps as y } from "vue";
2
+ import Z from "./components/modal.mjs";
3
+ import "./components/modal-wrapper.vue.mjs";
4
+ import "./components/modal-close.vue.mjs";
5
+ import "./components/modal-footer.vue.mjs";
6
+ import "./components/modal-header.vue.mjs";
7
+ import { basicProps as x } from "./props.mjs";
8
+ import { useFullScreen as ee } from "./hooks/use-moda-full-screen.mjs";
9
+ import { omit as g } from "lodash-unified";
10
+ import { deepMerge as oe } from "@aplus-frontend/utils";
11
+ import { isFunction as te } from "@fruits-chain/utils";
12
+ import "../config-provider/index.mjs";
13
+ import "./style/index.css";
14
+ import { useNamespace as ne } from "../config-provider/hooks/use-namespace.mjs";
15
+ import le from "./components/modal-wrapper.vue2.mjs";
16
+ import ae from "./components/modal-close.vue2.mjs";
17
+ import re from "./components/modal-header.vue2.mjs";
18
+ import se from "./components/modal-footer.vue2.mjs";
19
+ const Me = /* @__PURE__ */ q({
20
+ name: "BasicModal",
21
+ inheritAttrs: !1,
22
+ __name: "basic",
23
+ props: x,
24
+ emits: [
25
+ "open-change",
26
+ "height-change",
27
+ "cancel",
28
+ "ok",
29
+ "register",
30
+ "update:open",
31
+ "fullscreen"
32
+ ],
33
+ setup(W, { emit: _ }) {
34
+ const t = W, r = _, B = G(), n = m(!1), v = m(null), i = m(null), { b: T, bm: I } = ne("basic-modal"), w = m(0), F = {
35
+ setModalProps: A,
36
+ emitOpen: void 0,
37
+ redoModalHeight: () => {
38
+ S(() => {
39
+ o(i) && o(i).setModalHeight();
40
+ });
41
+ }
42
+ }, p = J();
43
+ p && r("register", F, p.uid);
44
+ const f = d(() => ({
45
+ ...t,
46
+ ...o(v)
47
+ })), {
48
+ handleFullScreen: E,
49
+ getWrapClassName: P,
50
+ fullScreenRef: c
51
+ } = ee({
52
+ modalWrapperRef: i,
53
+ extHeightRef: w,
54
+ wrapClassName: K(f.value, "wrapClassName")
55
+ }), l = d(() => ({
56
+ ...{
57
+ ...o(f),
58
+ open: o(n),
59
+ okButtonProps: void 0,
60
+ cancelButtonProps: void 0,
61
+ title: void 0
62
+ },
63
+ wrapClassName: o(P)
64
+ })), b = d(() => {
65
+ const e = {
66
+ ...B,
67
+ ...o(f),
68
+ open: o(n)
69
+ };
70
+ return e.wrapClassName = `${(e == null ? void 0 : e.wrapClassName) || ""} ${o(P)}vben-basic-modal-wrap`, o(c) ? g(e, ["height", "title"]) : g(e, "title");
71
+ }), j = d(() => {
72
+ if (!o(c))
73
+ return o(l).height;
74
+ });
75
+ Q(() => {
76
+ n.value = !!t.open, c.value = !!t.defaultFullscreen;
77
+ }), U(
78
+ () => o(n),
79
+ (e) => {
80
+ r("open-change", e), r("update:open", e), p && F.emitOpen && F.emitOpen(e, p.uid), S(() => {
81
+ t.scrollTop && e && o(i) && o(i).scrollTop();
82
+ });
83
+ },
84
+ {
85
+ immediate: !1
86
+ }
87
+ );
88
+ async function C(e) {
89
+ var k, a;
90
+ if (e == null || e.stopPropagation(), !((a = (k = e.target) == null ? void 0 : k.classList) != null && a.contains(I("close", "custom")))) {
91
+ if (t.closeFunc && te(t.closeFunc)) {
92
+ const u = await t.closeFunc();
93
+ n.value = !u;
94
+ return;
95
+ }
96
+ n.value = !1, r("cancel", e);
97
+ }
98
+ }
99
+ function A(e) {
100
+ v.value = oe(o(v) || {}, e), Reflect.has(e, "open") && (n.value = !!e.open), Reflect.has(e, "defaultFullscreen") && (c.value = !!e.defaultFullscreen);
101
+ }
102
+ function D(e) {
103
+ r("ok", e);
104
+ }
105
+ function L(e) {
106
+ r("height-change", e);
107
+ }
108
+ function V(e) {
109
+ w.value = e;
110
+ }
111
+ function z(e) {
112
+ t.canFullscreen && (e.stopPropagation(), M(e));
113
+ }
114
+ function M(e) {
115
+ E(e), r("fullscreen");
116
+ }
117
+ return (e, k) => (X(), Y(o(Z), H(b.value, {
118
+ onCancel: C,
119
+ class: o(T)()
120
+ }), O({
121
+ default: s(() => [
122
+ h(le, H(
123
+ {
124
+ useWrapper: l.value.useWrapper,
125
+ footerOffset: e.wrapperFooterOffset,
126
+ fullScreen: o(c),
127
+ ref_key: "modalWrapperRef",
128
+ ref: i,
129
+ loading: l.value.loading,
130
+ "loading-tip": l.value.loadingTip,
131
+ minHeight: l.value.minHeight,
132
+ height: j.value,
133
+ open: n.value,
134
+ modalFooterHeight: e.footer !== void 0 && !e.footer ? 0 : void 0
135
+ },
136
+ o(g)(l.value.wrapperProps, "open", "height", "modalFooterHeight"),
137
+ {
138
+ onExtHeight: V,
139
+ onHeightChange: L
140
+ }
141
+ ), {
142
+ default: s(() => [
143
+ $(e.$slots, "default")
144
+ ]),
145
+ _: 3
146
+ }, 16, ["useWrapper", "footerOffset", "fullScreen", "loading", "loading-tip", "minHeight", "height", "open", "modalFooterHeight"])
147
+ ]),
148
+ _: 2
149
+ }, [
150
+ e.$slots.closeIcon ? void 0 : {
151
+ name: "closeIcon",
152
+ fn: s(() => [
153
+ h(ae, {
154
+ canFullscreen: l.value.canFullscreen,
155
+ fullScreen: o(c),
156
+ onCancel: C,
157
+ onFullscreen: M
158
+ }, null, 8, ["canFullscreen", "fullScreen"])
159
+ ]),
160
+ key: "0"
161
+ },
162
+ e.$slots.title ? void 0 : {
163
+ name: "title",
164
+ fn: s(() => [
165
+ h(re, {
166
+ helpMessage: l.value.helpMessage,
167
+ title: f.value.title,
168
+ onDblclick: z
169
+ }, null, 8, ["helpMessage", "title"])
170
+ ]),
171
+ key: "1"
172
+ },
173
+ e.$slots.footer ? void 0 : {
174
+ name: "footer",
175
+ fn: s(() => [
176
+ h(se, H(b.value, {
177
+ onOk: D,
178
+ onCancel: C
179
+ }), O({ _: 2 }, [
180
+ R(Object.keys(e.$slots), (a) => ({
181
+ name: a,
182
+ fn: s((u) => [
183
+ $(e.$slots, a, N(y(u || {})))
184
+ ])
185
+ }))
186
+ ]), 1040)
187
+ ]),
188
+ key: "2"
189
+ },
190
+ R(Object.keys(o(g)(e.$slots, "default")), (a) => ({
191
+ name: a,
192
+ fn: s((u) => [
193
+ $(e.$slots, a, N(y(u || {})))
194
+ ])
195
+ }))
196
+ ]), 1040, ["class"]));
197
+ }
198
+ });
2
199
  export {
3
- f as default
200
+ Me as default
4
201
  };
@@ -1,74 +1,4 @@
1
- import { defineComponent as _, computed as b, openBlock as t, createElementBlock as i, normalizeClass as y, Fragment as B, createBlock as u, unref as l, withCtx as c, createVNode as o, createCommentVNode as h } from "vue";
2
- import { FullscreenExitOutlined as g, FullscreenOutlined as v, CloseOutlined as x } from "@ant-design/icons-vue";
3
- import { Tooltip as a } from "ant-design-vue";
4
- import "../../config-provider/index.mjs";
5
- import "../style/close.css";
6
- import { useNamespace as N } from "../../config-provider/hooks/use-namespace.mjs";
7
- import { useLocale as O } from "../../config-provider/hooks/use-locale.mjs";
8
- const P = /* @__PURE__ */ _({
9
- name: "ModalClose",
10
- __name: "modal-close",
11
- props: {
12
- canFullscreen: { type: Boolean, default: !0 },
13
- fullScreen: { type: Boolean }
14
- },
15
- emits: ["cancel", "fullscreen"],
16
- setup(p, { emit: f }) {
17
- const d = p, r = f, { b: C, m } = N("basic-modal-close"), { t: n } = O(), k = b(() => [
18
- C(),
19
- m("custom"),
20
- {
21
- [m("can-full")]: d.canFullscreen
22
- }
23
- ]);
24
- function F(e) {
25
- r("cancel", e);
26
- }
27
- function s(e) {
28
- e == null || e.stopPropagation(), e == null || e.preventDefault(), r("fullscreen");
29
- }
30
- return (e, S) => (t(), i("div", {
31
- class: y(k.value)
32
- }, [
33
- e.canFullscreen ? (t(), i(B, { key: 0 }, [
34
- e.fullScreen ? (t(), u(l(a), {
35
- key: 0,
36
- title: l(n)("ap.modal.restore"),
37
- placement: "bottom"
38
- }, {
39
- default: c(() => [
40
- o(l(g), {
41
- role: "full",
42
- onClick: s
43
- })
44
- ]),
45
- _: 1
46
- }, 8, ["title"])) : (t(), u(l(a), {
47
- key: 1,
48
- title: l(n)("ap.modal.maximize"),
49
- placement: "bottom"
50
- }, {
51
- default: c(() => [
52
- o(l(v), {
53
- role: "close",
54
- onClick: s
55
- })
56
- ]),
57
- _: 1
58
- }, 8, ["title"]))
59
- ], 64)) : h("", !0),
60
- o(l(a), {
61
- title: l(n)("ap.modal.close"),
62
- placement: "bottom"
63
- }, {
64
- default: c(() => [
65
- o(l(x), { onClick: F })
66
- ]),
67
- _: 1
68
- }, 8, ["title"])
69
- ], 2));
70
- }
71
- });
1
+ import f from "./modal-close.vue2.mjs";
72
2
  export {
73
- P as default
3
+ f as default
74
4
  };
@@ -1,4 +1,74 @@
1
- import f from "./modal-close.vue.mjs";
1
+ import { defineComponent as _, computed as b, openBlock as t, createElementBlock as i, normalizeClass as y, Fragment as B, createBlock as u, unref as l, withCtx as c, createVNode as o, createCommentVNode as h } from "vue";
2
+ import { FullscreenExitOutlined as g, FullscreenOutlined as v, CloseOutlined as x } from "@ant-design/icons-vue";
3
+ import { Tooltip as a } from "ant-design-vue";
4
+ import "../../config-provider/index.mjs";
5
+ import "../style/close.css";
6
+ import { useNamespace as N } from "../../config-provider/hooks/use-namespace.mjs";
7
+ import { useLocale as O } from "../../config-provider/hooks/use-locale.mjs";
8
+ const P = /* @__PURE__ */ _({
9
+ name: "ModalClose",
10
+ __name: "modal-close",
11
+ props: {
12
+ canFullscreen: { type: Boolean, default: !0 },
13
+ fullScreen: { type: Boolean }
14
+ },
15
+ emits: ["cancel", "fullscreen"],
16
+ setup(p, { emit: f }) {
17
+ const d = p, r = f, { b: C, m } = N("basic-modal-close"), { t: n } = O(), k = b(() => [
18
+ C(),
19
+ m("custom"),
20
+ {
21
+ [m("can-full")]: d.canFullscreen
22
+ }
23
+ ]);
24
+ function F(e) {
25
+ r("cancel", e);
26
+ }
27
+ function s(e) {
28
+ e == null || e.stopPropagation(), e == null || e.preventDefault(), r("fullscreen");
29
+ }
30
+ return (e, S) => (t(), i("div", {
31
+ class: y(k.value)
32
+ }, [
33
+ e.canFullscreen ? (t(), i(B, { key: 0 }, [
34
+ e.fullScreen ? (t(), u(l(a), {
35
+ key: 0,
36
+ title: l(n)("ap.modal.restore"),
37
+ placement: "bottom"
38
+ }, {
39
+ default: c(() => [
40
+ o(l(g), {
41
+ role: "full",
42
+ onClick: s
43
+ })
44
+ ]),
45
+ _: 1
46
+ }, 8, ["title"])) : (t(), u(l(a), {
47
+ key: 1,
48
+ title: l(n)("ap.modal.maximize"),
49
+ placement: "bottom"
50
+ }, {
51
+ default: c(() => [
52
+ o(l(v), {
53
+ role: "close",
54
+ onClick: s
55
+ })
56
+ ]),
57
+ _: 1
58
+ }, 8, ["title"]))
59
+ ], 64)) : h("", !0),
60
+ o(l(a), {
61
+ title: l(n)("ap.modal.close"),
62
+ placement: "bottom"
63
+ }, {
64
+ default: c(() => [
65
+ o(l(x), { onClick: F })
66
+ ]),
67
+ _: 1
68
+ }, 8, ["title"])
69
+ ], 2));
70
+ }
71
+ });
2
72
  export {
3
- f as default
73
+ P as default
4
74
  };
@@ -1,45 +1,4 @@
1
- import { defineComponent as B, openBlock as t, createElementBlock as C, renderSlot as n, createBlock as l, unref as e, mergeProps as c, withCtx as m, createTextVNode as s, toDisplayString as i, createCommentVNode as p } from "vue";
2
- import { Button as d } from "ant-design-vue";
3
- import { basicProps as h } from "../props.mjs";
4
- import "../../config-provider/index.mjs";
5
- import { useLocale as y } from "../../config-provider/hooks/use-locale.mjs";
6
- const N = /* @__PURE__ */ B({
7
- name: "BasicModalFooter",
8
- __name: "modal-footer",
9
- props: h,
10
- emits: ["ok", "cancel"],
11
- setup(T, { emit: u }) {
12
- const { t: r } = y(), a = u;
13
- function k(o) {
14
- a("ok", o);
15
- }
16
- function f(o) {
17
- a("cancel", o);
18
- }
19
- return (o, g) => (t(), C("div", null, [
20
- n(o.$slots, "insertFooter"),
21
- o.showCancelBtn ? (t(), l(e(d), c({ key: 0 }, o.cancelButtonProps, { onClick: f }), {
22
- default: m(() => [
23
- s(i(o.cancelText || e(r)("ap.common.cancelText")), 1)
24
- ]),
25
- _: 1
26
- }, 16)) : p("", !0),
27
- n(o.$slots, "centerFooter"),
28
- o.showOkBtn ? (t(), l(e(d), c({
29
- key: 1,
30
- type: o.okType,
31
- onClick: k,
32
- loading: o.confirmLoading
33
- }, o.okButtonProps), {
34
- default: m(() => [
35
- s(i(o.okText || e(r)("ap.common.okText")), 1)
36
- ]),
37
- _: 1
38
- }, 16, ["type", "loading"])) : p("", !0),
39
- n(o.$slots, "appendFooter")
40
- ]));
41
- }
42
- });
1
+ import f from "./modal-footer.vue2.mjs";
43
2
  export {
44
- N as default
3
+ f as default
45
4
  };
@@ -1,4 +1,45 @@
1
- import f from "./modal-footer.vue.mjs";
1
+ import { defineComponent as B, openBlock as t, createElementBlock as C, renderSlot as n, createBlock as l, unref as e, mergeProps as c, withCtx as m, createTextVNode as s, toDisplayString as i, createCommentVNode as p } from "vue";
2
+ import { Button as d } from "ant-design-vue";
3
+ import { basicProps as h } from "../props.mjs";
4
+ import "../../config-provider/index.mjs";
5
+ import { useLocale as y } from "../../config-provider/hooks/use-locale.mjs";
6
+ const N = /* @__PURE__ */ B({
7
+ name: "BasicModalFooter",
8
+ __name: "modal-footer",
9
+ props: h,
10
+ emits: ["ok", "cancel"],
11
+ setup(T, { emit: u }) {
12
+ const { t: r } = y(), a = u;
13
+ function k(o) {
14
+ a("ok", o);
15
+ }
16
+ function f(o) {
17
+ a("cancel", o);
18
+ }
19
+ return (o, g) => (t(), C("div", null, [
20
+ n(o.$slots, "insertFooter"),
21
+ o.showCancelBtn ? (t(), l(e(d), c({ key: 0 }, o.cancelButtonProps, { onClick: f }), {
22
+ default: m(() => [
23
+ s(i(o.cancelText || e(r)("ap.common.cancelText")), 1)
24
+ ]),
25
+ _: 1
26
+ }, 16)) : p("", !0),
27
+ n(o.$slots, "centerFooter"),
28
+ o.showOkBtn ? (t(), l(e(d), c({
29
+ key: 1,
30
+ type: o.okType,
31
+ onClick: k,
32
+ loading: o.confirmLoading
33
+ }, o.okButtonProps), {
34
+ default: m(() => [
35
+ s(i(o.okText || e(r)("ap.common.okText")), 1)
36
+ ]),
37
+ _: 1
38
+ }, 16, ["type", "loading"])) : p("", !0),
39
+ n(o.$slots, "appendFooter")
40
+ ]));
41
+ }
42
+ });
2
43
  export {
3
- f as default
44
+ N as default
4
45
  };
@@ -1,21 +1,4 @@
1
- import { defineComponent as t, openBlock as a, createBlock as o, unref as r, withCtx as s, createTextVNode as p, toDisplayString as l } from "vue";
2
- import { BasicTitle as i } from "../../basic/index.mjs";
3
- const f = /* @__PURE__ */ t({
4
- name: "BasicModalHeader",
5
- __name: "modal-header",
6
- props: {
7
- helpMessage: {},
8
- title: {}
9
- },
10
- setup(n) {
11
- return (e, c) => (a(), o(r(i), { helpMessage: e.helpMessage }, {
12
- default: s(() => [
13
- p(l(e.title), 1)
14
- ]),
15
- _: 1
16
- }, 8, ["helpMessage"]));
17
- }
18
- });
1
+ import f from "./modal-header.vue2.mjs";
19
2
  export {
20
3
  f as default
21
4
  };
@@ -1,4 +1,21 @@
1
- import f from "./modal-header.vue.mjs";
1
+ import { defineComponent as t, openBlock as a, createBlock as o, unref as r, withCtx as s, createTextVNode as p, toDisplayString as l } from "vue";
2
+ import { BasicTitle as i } from "../../basic/index.mjs";
3
+ const f = /* @__PURE__ */ t({
4
+ name: "BasicModalHeader",
5
+ __name: "modal-header",
6
+ props: {
7
+ helpMessage: {},
8
+ title: {}
9
+ },
10
+ setup(n) {
11
+ return (e, c) => (a(), o(r(i), { helpMessage: e.helpMessage }, {
12
+ default: s(() => [
13
+ p(l(e.title), 1)
14
+ ]),
15
+ _: 1
16
+ }, 8, ["helpMessage"]));
17
+ }
18
+ });
2
19
  export {
3
20
  f as default
4
21
  };
@@ -1,101 +1,4 @@
1
- import { defineComponent as E, ref as a, computed as b, unref as l, watchEffect as k, watch as M, onMounted as R, onUnmounted as C, nextTick as c, resolveDirective as T, openBlock as H, createBlock as F, withCtx as W, withDirectives as $, createElementBlock as B, normalizeStyle as z, renderSlot as D } from "vue";
2
- import { useWindowSizeFn as O } from "@aplus-frontend/hooks";
3
- import { ScrollContainer as A } from "../../container/index.mjs";
4
- import { createModalContext as I } from "../hooks/use-modal-context.mjs";
5
- import { useMutationObserver as N } from "@vueuse/core";
6
- import { modalWrapperProps as P } from "../props.mjs";
7
- const U = ["loading-tip"], Q = /* @__PURE__ */ E({
8
- name: "ModalWrapper",
9
- inheritAttrs: !1,
10
- __name: "modal-wrapper",
11
- props: P,
12
- emits: ["height-change", "ext-height"],
13
- setup(v, { expose: w, emit: y }) {
14
- const t = v, d = y, u = a(null), m = a(null), n = a(0), h = a(0), s = a(0);
15
- O(r.bind(null)), N(
16
- m,
17
- () => {
18
- r();
19
- },
20
- {
21
- attributes: !0,
22
- subtree: !0
23
- }
24
- ), I({
25
- redoModalHeight: r
26
- });
27
- const _ = b(() => ({
28
- minHeight: `${t.minHeight}px`,
29
- [t.fullScreen ? "height" : "maxHeight"]: `${l(n)}px`
30
- }));
31
- k(() => {
32
- t.useWrapper && r();
33
- }), M(
34
- () => t.fullScreen,
35
- (e) => {
36
- r(), e ? h.value = n.value : n.value = h.value;
37
- }
38
- ), R(() => {
39
- const { modalHeaderHeight: e, modalFooterHeight: o } = t;
40
- d("ext-height", e + o);
41
- }), C(() => {
42
- });
43
- async function x() {
44
- c(() => {
45
- var o;
46
- const e = l(u);
47
- e && ((o = e == null ? void 0 : e.scrollTo) == null || o.call(e, 0));
48
- });
49
- }
50
- async function r() {
51
- if (!t.open)
52
- return;
53
- const e = l(u);
54
- if (!e)
55
- return;
56
- const o = e.$el.parentElement;
57
- if (o) {
58
- o.style.padding = "0", await c();
59
- try {
60
- const i = o.parentElement && o.parentElement.parentElement;
61
- if (!i)
62
- return;
63
- const S = getComputedStyle(i).top, f = Number.parseInt(S);
64
- let p = window.innerHeight - f * 2 + (t.footerOffset || 0) - t.modalFooterHeight - t.modalHeaderHeight;
65
- f < 40 && (p -= 26), await c();
66
- const g = l(m);
67
- if (!g)
68
- return;
69
- await c(), s.value = g.scrollHeight, t.fullScreen ? n.value = window.innerHeight - t.modalFooterHeight - t.modalHeaderHeight - 28 : n.value = t.height ? t.height : s.value > p ? p : s.value, d("height-change", l(n));
70
- } catch (i) {
71
- console.log(i);
72
- }
73
- }
74
- }
75
- return w({ scrollTop: x, setModalHeight: r }), (e, o) => {
76
- const i = T("loading");
77
- return H(), F(l(A), {
78
- ref_key: "wrapperRef",
79
- ref: u,
80
- scrollHeight: s.value
81
- }, {
82
- default: W(() => [
83
- $((H(), B("div", {
84
- ref_key: "spinRef",
85
- ref: m,
86
- style: z(_.value),
87
- "loading-tip": e.loadingTip
88
- }, [
89
- D(e.$slots, "default")
90
- ], 12, U)), [
91
- [i, e.loading]
92
- ])
93
- ]),
94
- _: 3
95
- }, 8, ["scrollHeight"]);
96
- };
97
- }
98
- });
1
+ import f from "./modal-wrapper.vue2.mjs";
99
2
  export {
100
- Q as default
3
+ f as default
101
4
  };