@aplus-frontend/ui 7.0.0-beta.2 → 7.0.0

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 (303) hide show
  1. package/es/index.mjs +216 -218
  2. package/es/src/ag-grid/editable/form-item.vue.mjs +68 -63
  3. package/es/src/ag-grid/editable/index.vue.mjs +66 -61
  4. package/es/src/ag-grid/editable/interface.d.ts +3 -1
  5. package/es/src/ag-grid/hooks/use-columns-def.mjs +71 -70
  6. package/es/src/ag-grid/hooks/use-editable-form-item-api.mjs +65 -63
  7. package/es/src/ag-grid/index.vue.mjs +1 -0
  8. package/es/src/ag-grid/interface.d.ts +1 -0
  9. package/es/src/ag-grid/style/custom-header.d.ts +2 -2
  10. package/es/src/ag-grid/style/editable.d.ts +2 -2
  11. package/es/src/ag-grid/style/index.d.ts +30 -3
  12. package/es/src/ag-grid/style/index.mjs +56 -43
  13. package/es/src/ag-grid/theme.mjs +12 -11
  14. package/es/src/ap-action/item/index.vue2.mjs +14 -12
  15. package/es/src/ap-action/item-dropdown/index.vue.mjs +18 -17
  16. package/es/src/ap-action/style/dropdown-item.d.ts +2 -2
  17. package/es/src/ap-action/style/dropdown-item.mjs +4 -4
  18. package/es/src/ap-action/style/index.d.ts +7 -4
  19. package/es/src/ap-action/style/index.mjs +29 -23
  20. package/es/src/ap-button/ap-button.vue.mjs +45 -49
  21. package/es/src/ap-button/style/index.d.ts +2 -2
  22. package/es/src/ap-button/style/index.mjs +5 -4
  23. package/es/src/ap-button/utils/index.mjs +16 -16
  24. package/es/src/ap-descriptions/style/index.d.ts +2 -2
  25. package/es/src/ap-download/ap-download.vue.d.ts +4 -4
  26. package/es/src/ap-download/ap-download.vue.mjs +27 -27
  27. package/es/src/ap-download/hooks/useStyle.mjs +9 -9
  28. package/es/src/ap-download/interface.d.ts +4 -0
  29. package/es/src/ap-download/style/index.d.ts +2 -2
  30. package/es/src/ap-drawer/style/index.d.ts +2 -2
  31. package/es/src/ap-field/style/index.d.ts +2 -2
  32. package/es/src/ap-form/style/drawer-form.d.ts +2 -2
  33. package/es/src/ap-form/style/item-group.d.ts +2 -2
  34. package/es/src/ap-form/style/item-text-group.d.ts +2 -2
  35. package/es/src/ap-form/style/item.d.ts +3 -4
  36. package/es/src/ap-form/style/item.mjs +12 -16
  37. package/es/src/ap-form/style/modal-form.d.ts +4 -3
  38. package/es/src/ap-form/style/modal-form.mjs +26 -13
  39. package/es/src/ap-form/style/search-form-sorter.d.ts +4 -3
  40. package/es/src/ap-form/style/search-form-sorter.mjs +20 -13
  41. package/es/src/ap-form/style/search-form.d.ts +2 -2
  42. package/es/src/ap-form/style/token.d.ts +25 -1
  43. package/es/src/ap-grid/hooks/use-table-style.mjs +1 -1
  44. package/es/src/ap-grid/index.vue.mjs +2 -2
  45. package/es/src/ap-grid/style/editable.d.ts +2 -2
  46. package/es/src/ap-grid/style/index.d.ts +6 -3
  47. package/es/src/ap-grid/style/index.mjs +10 -7
  48. package/es/src/ap-grid/utils/col.mjs +33 -33
  49. package/es/src/ap-list/style/index.d.ts +2 -2
  50. package/es/src/ap-modal/interface.d.ts +31 -11
  51. package/es/src/ap-modal/utils/createModal.mjs +52 -45
  52. package/es/src/ap-pro-card/style/divider.d.ts +2 -2
  53. package/es/src/ap-pro-card/style/index.d.ts +2 -2
  54. package/es/src/ap-pro-card/style/operation.d.ts +2 -2
  55. package/es/src/ap-pro-card/style/statistic.d.ts +2 -2
  56. package/es/src/ap-pro-card/style/statistics-card.d.ts +2 -2
  57. package/es/src/ap-pro-card/style/title.d.ts +2 -2
  58. package/es/src/ap-table/ap-table.vue2.mjs +2 -2
  59. package/es/src/ap-table/style/ellipsis.d.ts +2 -2
  60. package/es/src/ap-table/style/index-comp.d.ts +2 -2
  61. package/es/src/ap-table/style/index.d.ts +2 -2
  62. package/es/src/ap-table/style/setting.d.ts +2 -2
  63. package/es/src/ap-table/utils.mjs +14 -11
  64. package/es/src/ap-tag/ap-tag.vue.mjs +7 -6
  65. package/es/src/ap-tag/style/group.d.ts +2 -2
  66. package/es/src/ap-tag/style/index.d.ts +2 -2
  67. package/es/src/ap-upload/style/index.d.ts +2 -2
  68. package/es/src/business/ag-grid-modal/style/index.d.ts +2 -2
  69. package/es/src/business/ag-grid-modal/style/selected-items.d.ts +2 -2
  70. package/es/src/business/ag-grid-modal/utils.mjs +23 -23
  71. package/es/src/business/ap-appendix/style/index.d.ts +5 -4
  72. package/es/src/business/ap-appendix/style/index.mjs +20 -17
  73. package/es/src/business/ap-appendix/style/token.d.ts +4 -0
  74. package/es/src/business/ap-appendix/style/token.mjs +6 -0
  75. package/es/src/business/ap-attachment/ApAttachment.mjs +64 -60
  76. package/es/src/business/ap-attachment/style/index.d.ts +2 -2
  77. package/es/src/business/ap-attachment/style/index.mjs +1 -0
  78. package/es/src/business/ap-batch-action/style/index.d.ts +3 -3
  79. package/es/src/business/ap-batch-action/style/index.mjs +4 -4
  80. package/es/src/business/ap-batch-action-group/ApBatchActionGroup.vue2.mjs +50 -56
  81. package/es/src/business/ap-batch-action-group/style/index.d.ts +3 -0
  82. package/es/src/business/ap-batch-action-group/style/index.mjs +14 -0
  83. package/es/src/business/ap-card/style/index.d.ts +3 -3
  84. package/es/src/business/ap-card/style/index.mjs +8 -8
  85. package/es/src/business/ap-copy/style/index.d.ts +2 -2
  86. package/es/src/business/ap-draggable-grid/style/index.d.ts +2 -2
  87. package/es/src/business/ap-expand-alert/ApExpandAlert.vue.d.ts +3 -2
  88. package/es/src/business/ap-expand-alert/ApExpandAlert.vue2.mjs +57 -49
  89. package/es/src/business/ap-expand-alert/index.d.ts +5 -2
  90. package/es/src/business/ap-expand-alert/interface.d.ts +1 -1
  91. package/es/src/business/ap-expand-alert/style/index.d.ts +2 -2
  92. package/es/src/business/ap-image/style/index.d.ts +3 -3
  93. package/es/src/business/ap-image/style/index.mjs +6 -6
  94. package/es/src/business/ap-input-radio/style/index.d.ts +2 -2
  95. package/es/src/business/ap-label/style/index.d.ts +2 -2
  96. package/es/src/business/ap-ladder/style/index.d.ts +2 -2
  97. package/es/src/business/ap-product-info/style/index.d.ts +2 -2
  98. package/es/src/business/ap-radio-group/style/index.d.ts +2 -2
  99. package/es/src/business/ap-radio-group/style/index.mjs +3 -3
  100. package/es/src/business/ap-select-layout/style/index.d.ts +2 -2
  101. package/es/src/business/ap-size-input/style/index.d.ts +2 -2
  102. package/es/src/business/ap-status/style/index.d.ts +2 -2
  103. package/es/src/business/ap-summary/style/index.d.ts +2 -2
  104. package/es/src/business/ap-table-modal/style/index.d.ts +2 -2
  105. package/es/src/business/ap-table-modal/table-modal.vue2.mjs +23 -23
  106. package/es/src/business/ap-title/style/index.d.ts +2 -2
  107. package/es/src/business/ap-upload-file/ap-upload-single/style/index.d.ts +2 -2
  108. package/es/src/business/ap-value-select-card/style/index.d.ts +2 -2
  109. package/es/src/business/ap-view/style/index.d.ts +3 -3
  110. package/es/src/business/ap-view/style/index.mjs +19 -22
  111. package/es/src/business/batch-input-group/style/index.d.ts +5 -2
  112. package/es/src/business/batch-input-group/style/index.mjs +9 -5
  113. package/es/src/business/hooks/usePageListAgGrid.mjs +7 -6
  114. package/es/src/check-card/style/index.d.ts +2 -2
  115. package/es/src/check-card/style/index.mjs +37 -31
  116. package/es/src/config-provider/config-provider.d.ts +1 -2
  117. package/es/src/config-provider/hooks/use-global-config.d.ts +1 -2
  118. package/es/src/config-provider/hooks/use-global-config.mjs +42 -33
  119. package/es/src/config-provider/hooks/use-token.d.ts +7 -2
  120. package/es/src/config-provider/hooks/use-token.mjs +6 -3
  121. package/es/src/config-provider/index.d.ts +1 -2
  122. package/es/src/design-token/constants.d.ts +1 -6
  123. package/es/src/design-token/constants.mjs +2 -100
  124. package/es/src/design-token/index.d.ts +1 -1
  125. package/es/src/design-token/index.mjs +5 -6
  126. package/es/src/design-token/interface.d.ts +9 -1
  127. package/es/src/design-token/interface.mjs +1 -0
  128. package/es/src/editable-table/style/index.d.ts +2 -2
  129. package/es/src/full-screen/index.vue.mjs +31 -30
  130. package/es/src/full-screen/style/index.d.ts +2 -2
  131. package/es/src/index.mjs +196 -198
  132. package/es/src/mask/style/index.d.ts +2 -2
  133. package/es/src/mask/style/index.mjs +2 -2
  134. package/es/src/scroll-bar/style/index.d.ts +2 -2
  135. package/es/src/scroll-bar/style/index.mjs +17 -17
  136. package/es/src/scroll-view/style/index.d.ts +2 -2
  137. package/es/src/splitter/style/index.d.ts +11 -3
  138. package/es/src/splitter/style/index.mjs +1 -2
  139. package/es/src/text/style/group.d.ts +2 -2
  140. package/es/src/text/style/index.d.ts +6 -3
  141. package/es/src/text/style/index.mjs +22 -18
  142. package/es/src/utils/cssinjs/index.d.ts +3 -7
  143. package/es/src/utils/cssinjs/index.mjs +55 -39
  144. package/es/src/utils/cssinjs/instance.mjs +7 -7
  145. package/es/src/utils/cssinjs/plugin-append-cssvar.d.ts +6 -0
  146. package/es/src/utils/cssinjs/plugin-append-cssvar.mjs +6 -0
  147. package/es/src/utils/cssinjs/plugin-specificity.mjs +6 -6
  148. package/es/src/utils/cssinjs/utils.d.ts +6 -0
  149. package/es/src/utils/cssinjs/utils.mjs +15 -0
  150. package/es/src/version.d.ts +1 -1
  151. package/es/src/version.mjs +1 -1
  152. package/lib/index.js +1 -1
  153. package/lib/src/ag-grid/editable/form-item.vue.js +1 -1
  154. package/lib/src/ag-grid/editable/index.vue.js +1 -1
  155. package/lib/src/ag-grid/editable/interface.d.ts +3 -1
  156. package/lib/src/ag-grid/hooks/use-columns-def.js +1 -1
  157. package/lib/src/ag-grid/hooks/use-editable-form-item-api.js +1 -1
  158. package/lib/src/ag-grid/index.vue.js +1 -1
  159. package/lib/src/ag-grid/interface.d.ts +1 -0
  160. package/lib/src/ag-grid/style/custom-header.d.ts +2 -2
  161. package/lib/src/ag-grid/style/editable.d.ts +2 -2
  162. package/lib/src/ag-grid/style/index.d.ts +30 -3
  163. package/lib/src/ag-grid/style/index.js +1 -1
  164. package/lib/src/ag-grid/theme.js +1 -1
  165. package/lib/src/ap-action/item/index.vue2.js +1 -1
  166. package/lib/src/ap-action/item-dropdown/index.vue.js +1 -1
  167. package/lib/src/ap-action/style/dropdown-item.d.ts +2 -2
  168. package/lib/src/ap-action/style/dropdown-item.js +1 -1
  169. package/lib/src/ap-action/style/index.d.ts +7 -4
  170. package/lib/src/ap-action/style/index.js +1 -1
  171. package/lib/src/ap-button/ap-button.vue.js +1 -1
  172. package/lib/src/ap-button/style/index.d.ts +2 -2
  173. package/lib/src/ap-button/style/index.js +1 -1
  174. package/lib/src/ap-button/utils/index.js +1 -1
  175. package/lib/src/ap-descriptions/style/index.d.ts +2 -2
  176. package/lib/src/ap-download/ap-download.vue.d.ts +4 -4
  177. package/lib/src/ap-download/ap-download.vue.js +1 -1
  178. package/lib/src/ap-download/hooks/useStyle.js +1 -1
  179. package/lib/src/ap-download/interface.d.ts +4 -0
  180. package/lib/src/ap-download/style/index.d.ts +2 -2
  181. package/lib/src/ap-drawer/style/index.d.ts +2 -2
  182. package/lib/src/ap-field/style/index.d.ts +2 -2
  183. package/lib/src/ap-form/style/drawer-form.d.ts +2 -2
  184. package/lib/src/ap-form/style/item-group.d.ts +2 -2
  185. package/lib/src/ap-form/style/item-text-group.d.ts +2 -2
  186. package/lib/src/ap-form/style/item.d.ts +3 -4
  187. package/lib/src/ap-form/style/item.js +1 -1
  188. package/lib/src/ap-form/style/modal-form.d.ts +4 -3
  189. package/lib/src/ap-form/style/modal-form.js +1 -1
  190. package/lib/src/ap-form/style/search-form-sorter.d.ts +4 -3
  191. package/lib/src/ap-form/style/search-form-sorter.js +1 -1
  192. package/lib/src/ap-form/style/search-form.d.ts +2 -2
  193. package/lib/src/ap-form/style/token.d.ts +25 -1
  194. package/lib/src/ap-grid/hooks/use-table-style.js +1 -1
  195. package/lib/src/ap-grid/index.vue.js +1 -1
  196. package/lib/src/ap-grid/style/editable.d.ts +2 -2
  197. package/lib/src/ap-grid/style/index.d.ts +6 -3
  198. package/lib/src/ap-grid/style/index.js +1 -1
  199. package/lib/src/ap-grid/utils/col.js +1 -1
  200. package/lib/src/ap-list/style/index.d.ts +2 -2
  201. package/lib/src/ap-modal/interface.d.ts +31 -11
  202. package/lib/src/ap-modal/utils/createModal.js +1 -1
  203. package/lib/src/ap-pro-card/style/divider.d.ts +2 -2
  204. package/lib/src/ap-pro-card/style/index.d.ts +2 -2
  205. package/lib/src/ap-pro-card/style/operation.d.ts +2 -2
  206. package/lib/src/ap-pro-card/style/statistic.d.ts +2 -2
  207. package/lib/src/ap-pro-card/style/statistics-card.d.ts +2 -2
  208. package/lib/src/ap-pro-card/style/title.d.ts +2 -2
  209. package/lib/src/ap-table/ap-table.vue2.js +1 -1
  210. package/lib/src/ap-table/style/ellipsis.d.ts +2 -2
  211. package/lib/src/ap-table/style/index-comp.d.ts +2 -2
  212. package/lib/src/ap-table/style/index.d.ts +2 -2
  213. package/lib/src/ap-table/style/setting.d.ts +2 -2
  214. package/lib/src/ap-table/utils.js +1 -1
  215. package/lib/src/ap-tag/ap-tag.vue.js +1 -1
  216. package/lib/src/ap-tag/style/group.d.ts +2 -2
  217. package/lib/src/ap-tag/style/index.d.ts +2 -2
  218. package/lib/src/ap-upload/style/index.d.ts +2 -2
  219. package/lib/src/business/ag-grid-modal/style/index.d.ts +2 -2
  220. package/lib/src/business/ag-grid-modal/style/selected-items.d.ts +2 -2
  221. package/lib/src/business/ag-grid-modal/utils.js +1 -1
  222. package/lib/src/business/ap-appendix/style/index.d.ts +5 -4
  223. package/lib/src/business/ap-appendix/style/index.js +1 -1
  224. package/lib/src/business/ap-appendix/style/token.d.ts +4 -0
  225. package/lib/src/business/ap-appendix/style/token.js +1 -0
  226. package/lib/src/business/ap-attachment/ApAttachment.js +1 -1
  227. package/lib/src/business/ap-attachment/style/index.d.ts +2 -2
  228. package/lib/src/business/ap-attachment/style/index.js +1 -1
  229. package/lib/src/business/ap-batch-action/style/index.d.ts +3 -3
  230. package/lib/src/business/ap-batch-action/style/index.js +1 -1
  231. package/lib/src/business/ap-batch-action-group/ApBatchActionGroup.vue2.js +1 -1
  232. package/lib/src/business/ap-batch-action-group/style/index.d.ts +3 -0
  233. package/lib/src/business/ap-batch-action-group/style/index.js +1 -0
  234. package/lib/src/business/ap-card/style/index.d.ts +3 -3
  235. package/lib/src/business/ap-card/style/index.js +1 -1
  236. package/lib/src/business/ap-copy/style/index.d.ts +2 -2
  237. package/lib/src/business/ap-draggable-grid/style/index.d.ts +2 -2
  238. package/lib/src/business/ap-expand-alert/ApExpandAlert.vue.d.ts +3 -2
  239. package/lib/src/business/ap-expand-alert/ApExpandAlert.vue2.js +1 -1
  240. package/lib/src/business/ap-expand-alert/index.d.ts +5 -2
  241. package/lib/src/business/ap-expand-alert/interface.d.ts +1 -1
  242. package/lib/src/business/ap-expand-alert/style/index.d.ts +2 -2
  243. package/lib/src/business/ap-image/style/index.d.ts +3 -3
  244. package/lib/src/business/ap-image/style/index.js +1 -1
  245. package/lib/src/business/ap-input-radio/style/index.d.ts +2 -2
  246. package/lib/src/business/ap-label/style/index.d.ts +2 -2
  247. package/lib/src/business/ap-ladder/style/index.d.ts +2 -2
  248. package/lib/src/business/ap-product-info/style/index.d.ts +2 -2
  249. package/lib/src/business/ap-radio-group/style/index.d.ts +2 -2
  250. package/lib/src/business/ap-radio-group/style/index.js +1 -1
  251. package/lib/src/business/ap-select-layout/style/index.d.ts +2 -2
  252. package/lib/src/business/ap-size-input/style/index.d.ts +2 -2
  253. package/lib/src/business/ap-status/style/index.d.ts +2 -2
  254. package/lib/src/business/ap-summary/style/index.d.ts +2 -2
  255. package/lib/src/business/ap-table-modal/style/index.d.ts +2 -2
  256. package/lib/src/business/ap-table-modal/table-modal.vue2.js +1 -1
  257. package/lib/src/business/ap-title/style/index.d.ts +2 -2
  258. package/lib/src/business/ap-upload-file/ap-upload-single/style/index.d.ts +2 -2
  259. package/lib/src/business/ap-value-select-card/style/index.d.ts +2 -2
  260. package/lib/src/business/ap-view/style/index.d.ts +3 -3
  261. package/lib/src/business/ap-view/style/index.js +1 -1
  262. package/lib/src/business/batch-input-group/style/index.d.ts +5 -2
  263. package/lib/src/business/batch-input-group/style/index.js +1 -1
  264. package/lib/src/business/hooks/usePageListAgGrid.js +1 -1
  265. package/lib/src/check-card/style/index.d.ts +2 -2
  266. package/lib/src/check-card/style/index.js +1 -1
  267. package/lib/src/config-provider/config-provider.d.ts +1 -2
  268. package/lib/src/config-provider/hooks/use-global-config.d.ts +1 -2
  269. package/lib/src/config-provider/hooks/use-global-config.js +1 -1
  270. package/lib/src/config-provider/hooks/use-token.d.ts +7 -2
  271. package/lib/src/config-provider/hooks/use-token.js +1 -1
  272. package/lib/src/config-provider/index.d.ts +1 -2
  273. package/lib/src/design-token/constants.d.ts +1 -6
  274. package/lib/src/design-token/constants.js +1 -1
  275. package/lib/src/design-token/index.d.ts +1 -1
  276. package/lib/src/design-token/index.js +1 -1
  277. package/lib/src/design-token/interface.d.ts +9 -1
  278. package/lib/src/design-token/interface.js +1 -0
  279. package/lib/src/editable-table/style/index.d.ts +2 -2
  280. package/lib/src/full-screen/index.vue.js +1 -1
  281. package/lib/src/full-screen/style/index.d.ts +2 -2
  282. package/lib/src/index.js +1 -1
  283. package/lib/src/mask/style/index.d.ts +2 -2
  284. package/lib/src/mask/style/index.js +2 -2
  285. package/lib/src/scroll-bar/style/index.d.ts +2 -2
  286. package/lib/src/scroll-bar/style/index.js +1 -1
  287. package/lib/src/scroll-view/style/index.d.ts +2 -2
  288. package/lib/src/splitter/style/index.d.ts +11 -3
  289. package/lib/src/splitter/style/index.js +1 -1
  290. package/lib/src/text/style/group.d.ts +2 -2
  291. package/lib/src/text/style/index.d.ts +6 -3
  292. package/lib/src/text/style/index.js +1 -1
  293. package/lib/src/utils/cssinjs/index.d.ts +3 -7
  294. package/lib/src/utils/cssinjs/index.js +1 -1
  295. package/lib/src/utils/cssinjs/instance.js +1 -1
  296. package/lib/src/utils/cssinjs/plugin-append-cssvar.d.ts +6 -0
  297. package/lib/src/utils/cssinjs/plugin-append-cssvar.js +1 -0
  298. package/lib/src/utils/cssinjs/plugin-specificity.js +1 -1
  299. package/lib/src/utils/cssinjs/utils.d.ts +6 -0
  300. package/lib/src/utils/cssinjs/utils.js +1 -0
  301. package/lib/src/version.d.ts +1 -1
  302. package/lib/src/version.js +1 -1
  303. package/package.json +1 -1
@@ -6,51 +6,53 @@ let $ = 0;
6
6
  function I() {
7
7
  return `_ag_grid${$++}`;
8
8
  }
9
- const J = (l, v, n, w) => {
9
+ const J = (l, c, n, w) => {
10
10
  const K = E([]);
11
- function j(s, t) {
12
- const r = d(n)?.length || 0;
13
- if (F(l.maxLength) && r >= l.maxLength || !s && x(l.rowKey))
11
+ function j(f, s) {
12
+ const v = d(n)?.length || 0;
13
+ if (F(l.maxLength) && v >= l.maxLength || !f && x(l.rowKey))
14
14
  return;
15
- const f = {
16
- ...s || { [l.rowKey]: I() }
15
+ const t = {
16
+ ...f || { [l.rowKey]: I() }
17
17
  };
18
- v?.setFieldValue(
18
+ c?.setFieldValue(
19
19
  w,
20
- f,
20
+ t,
21
21
  !1,
22
- (i, c) => {
23
- const e = y(f, void 0, l.rowKey);
24
- i[c] ? i[c][e] = f : i[c] = { [e]: f }, n.value ? V(t) ? n.value.push(f) : (K.value = n.value.map(
25
- (u, o) => o < t ? null : y(u, o, l.rowKey)
26
- ).filter(Boolean), n.value.splice(t, 0, f)) : n.value = [f], v?.setFieldValue(
22
+ (i, r) => {
23
+ const e = y(t, void 0, l.rowKey);
24
+ i[r] ? i[r][e] = t : i[r] = { [e]: t }, n.value ? V(s) ? n.value.push(t) : (K.value = n.value.map(
25
+ (u, o) => o < s ? null : y(u, o, l.rowKey)
26
+ ).filter(Boolean), n.value.splice(s, 0, t)) : n.value = [t], c?.setFieldValue(
27
27
  l.name,
28
- f,
28
+ t,
29
29
  !0,
30
30
  (u, o) => {
31
31
  if (!u[o]) {
32
- u[o] = [f];
32
+ u[o] = [t];
33
33
  return;
34
34
  }
35
- V(t) ? u[o].push(f) : u[o].splice(t, 0, f);
35
+ V(s) ? u[o].push(t) : u[o].splice(s, 0, t);
36
36
  }
37
37
  );
38
38
  }
39
39
  );
40
40
  }
41
- function k(s, t = "suffix") {
42
- const r = d(n)?.length || 0, f = h(s) ? s : s.length;
43
- if (F(l.maxLength) && r + f > l.maxLength || h(s) && x(l.rowKey))
41
+ function k(f, s = "suffix") {
42
+ if (!f)
44
43
  return;
45
- const i = h(s) ? new Array(s).fill(0).map(() => ({ [l.rowKey]: I() })) : S(s), c = U(i, l.rowKey);
46
- v?.setFieldValue(
44
+ const v = d(n)?.length || 0, t = h(f) ? f : f.length;
45
+ if (F(l.maxLength) && v + t > l.maxLength || h(f) && x(l.rowKey))
46
+ return;
47
+ const i = h(f) ? new Array(f).fill(0).map(() => ({ [l.rowKey]: I() })) : S(f), r = U(i, l.rowKey);
48
+ c?.setFieldValue(
47
49
  w,
48
- c,
50
+ r,
49
51
  !1,
50
52
  (e, u) => {
51
- e[u] ? Object.assign(e[u], c) : e[u] = c, n.value ? t === "suffix" ? n.value.push(...i) : (K.value = n.value.map(
53
+ e[u] ? Object.assign(e[u], r) : e[u] = r, n.value ? s === "suffix" ? n.value.push(...i) : (K.value = n.value.map(
52
54
  (o, g) => y(o, g, l.rowKey)
53
- ), n.value.unshift(...i)) : n.value = [...i], v?.setFieldValue(
55
+ ), n.value.unshift(...i)) : n.value = [...i], c?.setFieldValue(
54
56
  l.name,
55
57
  i,
56
58
  !0,
@@ -59,31 +61,31 @@ const J = (l, v, n, w) => {
59
61
  o[g] = [...i];
60
62
  return;
61
63
  }
62
- t === "suffix" ? o[g].push(...i) : o[g].unshift(...i);
64
+ s === "suffix" ? o[g].push(...i) : o[g].unshift(...i);
63
65
  }
64
66
  );
65
67
  }
66
68
  );
67
69
  }
68
- function L(s) {
69
- const t = R(s) ? s : [s];
70
- v?.setFieldValue(
70
+ function L(f) {
71
+ const s = R(f) ? f : [f];
72
+ c?.setFieldValue(
71
73
  w,
72
74
  void 0,
73
75
  !1,
74
- (r, f) => {
75
- for (const e of t) {
76
+ (v, t) => {
77
+ for (const e of s) {
76
78
  const u = y(e, void 0, l.rowKey);
77
- delete r[f][u];
79
+ delete v[t][u];
78
80
  }
79
81
  const i = n.value.filter(
80
- (e) => !t.includes(e)
81
- ), c = n.value.findIndex(
82
- (e) => t.includes(e)
82
+ (e) => !s.includes(e)
83
+ ), r = n.value.findIndex(
84
+ (e) => s.includes(e)
83
85
  );
84
86
  K.value = n.value.map(
85
- (e, u) => u <= c ? null : y(e, u, l.rowKey)
86
- ).filter(Boolean), i.length ? n.value = i : n.value.splice(0, n.value.length), v.setFieldValue(
87
+ (e, u) => u <= r ? null : y(e, u, l.rowKey)
88
+ ).filter(Boolean), i.length ? n.value = i : n.value.splice(0, n.value.length), c.setFieldValue(
87
89
  l.name,
88
90
  void 0,
89
91
  !0,
@@ -94,23 +96,23 @@ const J = (l, v, n, w) => {
94
96
  }
95
97
  );
96
98
  }
97
- function O(s) {
98
- const t = new Set(R(s) ? s : [s]);
99
- t.size !== 0 && v?.setFieldValue(
99
+ function O(f) {
100
+ const s = new Set(R(f) ? f : [f]);
101
+ s.size !== 0 && c?.setFieldValue(
100
102
  w,
101
103
  void 0,
102
104
  !1,
103
- (r, f) => {
104
- for (const e of t)
105
- delete r[f][e];
105
+ (v, t) => {
106
+ for (const e of s)
107
+ delete v[t][e];
106
108
  const i = n.value.filter(
107
- (e, u) => !t.has(y(e, u, l.rowKey))
108
- ), c = n.value.findIndex(
109
- (e, u) => t.has(y(e, u, l.rowKey))
109
+ (e, u) => !s.has(y(e, u, l.rowKey))
110
+ ), r = n.value.findIndex(
111
+ (e, u) => s.has(y(e, u, l.rowKey))
110
112
  );
111
113
  K.value = n.value.map(
112
- (e, u) => u <= c ? null : y(e, u, l.rowKey)
113
- ).filter(Boolean), i.length ? n.value = i : n.value.splice(0, n.value.length), v.setFieldValue(
114
+ (e, u) => u <= r ? null : y(e, u, l.rowKey)
115
+ ).filter(Boolean), i.length ? n.value = i : n.value.splice(0, n.value.length), c.setFieldValue(
114
116
  l.name,
115
117
  void 0,
116
118
  !0,
@@ -121,41 +123,41 @@ const J = (l, v, n, w) => {
121
123
  }
122
124
  );
123
125
  }
124
- function T(s) {
125
- return d(n)?.[s];
126
+ function T(f) {
127
+ return d(n)?.[f];
126
128
  }
127
129
  function B() {
128
130
  return d(n);
129
131
  }
130
- function _(s, t, r = !0) {
131
- v?.setFieldValue?.(
132
+ function _(f, s, v = !0) {
133
+ c?.setFieldValue?.(
132
134
  w,
133
135
  void 0,
134
136
  !1,
135
- (f, i) => {
136
- const c = n.value.findIndex(
137
- (u, o) => s === o
137
+ (t, i) => {
138
+ const r = n.value.findIndex(
139
+ (u, o) => f === o
138
140
  );
139
- if (!~c)
141
+ if (!~r)
140
142
  return;
141
143
  const e = y(
142
- n.value[c],
143
- c,
144
+ n.value[r],
145
+ r,
144
146
  l.rowKey
145
147
  );
146
- if (e && !(!f[i] || !f[i][e])) {
147
- if (!r) {
148
- const u = Object.keys(f[i][e]);
148
+ if (e && !(!t[i] || !t[i][e])) {
149
+ if (!v) {
150
+ const u = Object.keys(t[i][e]);
149
151
  for (const o of u)
150
- o !== l.rowKey && delete f[i][e][o];
152
+ o !== l.rowKey && delete t[i][e][o];
151
153
  }
152
- Object.assign(f[i][e], { ...t });
154
+ Object.assign(t[i][e], { ...s });
153
155
  }
154
156
  }
155
157
  );
156
158
  }
157
159
  function z() {
158
- v?.setFieldValue(w, {}), v?.setFieldValue(l.name, []);
160
+ c?.setFieldValue(w, {}), c?.setFieldValue(l.name, []);
159
161
  }
160
162
  return {
161
163
  add: j,
@@ -509,6 +509,7 @@ const Ft = /* @__PURE__ */ uo({
509
509
  "row-class-rules": e.rowClassRules,
510
510
  "no-rows-overlay-component": $o,
511
511
  "suppress-cell-focus": "",
512
+ "enable-cell-span": "",
512
513
  "dom-layout": e.autoHeight ? "autoHeight" : "normal",
513
514
  onSortChanged: Be,
514
515
  onGridReady: r[0] || (r[0] = (a) => s.value = a.api),
@@ -90,6 +90,7 @@ export type AgGridColumnType<RecordType = any, ExtraValueType = 'text', ValueTyp
90
90
  minWidth?: number;
91
91
  maxWidth?: number;
92
92
  colSpan?: ColDef<RecordType>['colSpan'];
93
+ spanRows?: ColDef<RecordType>['spanRows'];
93
94
  /**
94
95
  * 为当前单元格添加类名
95
96
  * @returns
@@ -1,5 +1,5 @@
1
1
  import { GenStyleFunc } from '../../design-token/interface';
2
- import { Ref } from 'vue';
2
+ import { ComputedRef } from 'vue';
3
3
  export declare const genAgGridCustomHeaderCellStyle: GenStyleFunc;
4
- declare const _default: (prefixCls: string) => Ref<string | undefined, string | undefined>;
4
+ declare const _default: (prefixCls: string) => ComputedRef<string>;
5
5
  export default _default;
@@ -1,5 +1,5 @@
1
1
  import { GenStyleFunc } from '../../design-token/interface';
2
- import { Ref } from 'vue';
2
+ import { ComputedRef } from 'vue';
3
3
  export declare const genEditableAgGridStyle: GenStyleFunc;
4
- declare const _default: (prefixCls: string) => Ref<string | undefined, string | undefined>;
4
+ declare const _default: (prefixCls: string) => ComputedRef<string>;
5
5
  export default _default;
@@ -1,5 +1,32 @@
1
1
  import { GenStyleFunc } from '../../design-token/interface';
2
- import { Ref } from 'vue';
3
- export declare const genAgGridStyle: GenStyleFunc;
4
- declare const _default: (prefixCls: string) => Ref<string | undefined, string | undefined>;
2
+ import { ComputedRef } from 'vue';
3
+ export type AgGridToken = {
4
+ /**
5
+ * 卡片模式下表单容器的下边距尺寸
6
+ */
7
+ agGridSearchFormWrapperMarginBlockEnd: number;
8
+ /**
9
+ * 小尺寸表格单元格垂直边距
10
+ */
11
+ agGridCellPaddingBlockMini: number;
12
+ /**
13
+ * 中等尺寸单元格垂直边距
14
+ */
15
+ agGridCellPaddingBlockMedium: number;
16
+ /**
17
+ * 多行文本时最多显示的行
18
+ */
19
+ agGridLineClamp: number;
20
+ /**
21
+ * 单元格省略时提示框最大宽度
22
+ */
23
+ agGridEllipsisTooltipMaxWidth: number;
24
+ /**
25
+ * 表格省略时提示框内边距
26
+ */
27
+ agGridEllipsisTooltipPadding: number | string;
28
+ };
29
+ export declare const defaultToken: AgGridToken;
30
+ export declare const genAgGridStyle: GenStyleFunc<AgGridToken>;
31
+ declare const _default: (prefixCls: string) => ComputedRef<string>;
5
32
  export default _default;
@@ -1,38 +1,45 @@
1
1
  import { genSettingTriggerBtnStyle as l } from "../../ap-table/style/index.mjs";
2
- import { multiRows as a, resetScrollbar as t } from "../../style/index.mjs";
2
+ import { multiRows as a, resetScrollbar as d } from "../../style/index.mjs";
3
3
  import { genComponentStyleHook as r } from "../../utils/cssinjs/index.mjs";
4
- const n = (e) => {
5
- const { componentCls: i } = e;
4
+ const t = {
5
+ agGridSearchFormWrapperMarginBlockEnd: 10,
6
+ agGridCellPaddingBlockMedium: 9,
7
+ agGridCellPaddingBlockMini: 6,
8
+ agGridLineClamp: 2,
9
+ agGridEllipsisTooltipMaxWidth: 300,
10
+ agGridEllipsisTooltipPadding: "6px 8px"
11
+ }, n = (i) => {
12
+ const { componentCls: e } = i;
6
13
  return {
7
- [i]: {
8
- ...t(e),
14
+ [e]: {
15
+ ...d(i),
9
16
  "&-adaptive": {
10
17
  height: "100%",
11
18
  display: "flex",
12
19
  flexDirection: "column",
13
- [`${i}-grid-wrapper`]: {
20
+ [`${e}-grid-wrapper`]: {
14
21
  minHeight: 0,
15
22
  flex: 1,
16
23
  position: "relative"
17
24
  }
18
25
  },
19
26
  "&-wrapper": {
20
- padding: e.space,
21
- paddingBlockEnd: e.spaceLG,
27
+ padding: i.space,
28
+ paddingBlockEnd: i.spaceLG,
22
29
  backgroundColor: "#fff",
23
30
  // 如果渲染了分页器,则取消容器的底部边距,防止双重边距
24
31
  "&:has(ul.ant-pagination)": {
25
32
  paddingBottom: 0
26
33
  }
27
34
  },
28
- [`${i}__search-wrapper`]: {
29
- padding: e.space,
35
+ [`${e}__search-wrapper`]: {
36
+ padding: i.space,
30
37
  paddingBlockEnd: 0,
31
38
  backgroundColor: "#fff",
32
- borderRadius: e.borderRadius,
33
- marginBlockEnd: "10px"
39
+ borderRadius: i.borderRadius,
40
+ marginBlockEnd: i.agGridSearchFormWrapperMarginBlockEnd
34
41
  },
35
- [`${i}__table-wrapper`]: {
42
+ [`${e}__table-wrapper`]: {
36
43
  flex: 1,
37
44
  minHeight: 0,
38
45
  maxHeight: "100%",
@@ -40,17 +47,17 @@ const n = (e) => {
40
47
  display: "flex",
41
48
  flexDirection: "column"
42
49
  },
43
- [`${i}__table-wrapper-card`]: {
44
- padding: e.space,
45
- paddingBlockEnd: e.spaceLG,
46
- borderRadius: e.borderRadius,
50
+ [`${e}__table-wrapper-card`]: {
51
+ padding: i.space,
52
+ paddingBlockEnd: i.spaceLG,
53
+ borderRadius: i.borderRadius,
47
54
  backgroundColor: "#fff",
48
55
  "&:has(ul.ant-pagination)": {
49
56
  paddingBlockEnd: 0
50
57
  }
51
58
  },
52
- [`${i}-pagination`]: {
53
- marginBlock: e.space,
59
+ [`${e}-pagination`]: {
60
+ marginBlock: i.space,
54
61
  display: "flex",
55
62
  flexWrap: "wrap",
56
63
  alignItems: "center",
@@ -58,12 +65,12 @@ const n = (e) => {
58
65
  ".ant-pagination-total-text": {
59
66
  flex: 1,
60
67
  height: "unset",
61
- lineHeight: e.lineHeight,
68
+ lineHeight: i.lineHeight,
62
69
  display: "flex",
63
70
  alignItems: "center"
64
71
  }
65
72
  },
66
- [`${i}__table-loading-wrapper`]: {
73
+ [`${e}__table-loading-wrapper`]: {
67
74
  position: "absolute",
68
75
  top: 0,
69
76
  left: 0,
@@ -75,38 +82,38 @@ const n = (e) => {
75
82
  alignItems: "center",
76
83
  backgroundColor: "hsla(0,0%,100%,.5)"
77
84
  },
78
- [`${i}-table-header`]: {
85
+ [`${e}-table-header`]: {
79
86
  "&__title": {
80
- ...a(e),
87
+ ...a(i),
81
88
  fontWeight: 700,
82
- textAlign: "right",
89
+ // textAlign: 'right',
83
90
  "&--single": {
84
91
  flex: "unset"
85
92
  }
86
93
  }
87
94
  },
88
- ...l(e),
89
- [`${i}__cell--left`]: {
95
+ ...l(i),
96
+ [`${e}__cell--left`]: {
90
97
  textAlign: "left"
91
98
  },
92
- [`${i}__cell--center`]: {
99
+ [`${e}__cell--center`]: {
93
100
  textAlign: "center"
94
101
  },
95
- [`${i}__cell--right`]: {
102
+ [`${e}__cell--right`]: {
96
103
  textAlign: "right"
97
104
  },
98
- [`${i}__cell--multiline`]: {
105
+ [`${e}__cell--multiline`]: {
99
106
  ".ag-cell-value": {
100
107
  display: "-webkit-box",
101
108
  "-webkit-box-orient": "vertical",
102
- "-webkit-line-clamp": "var(--ag-grid-line-clamp)",
109
+ "-webkit-line-clamp": i.agGridLineClamp,
103
110
  wordBreak: "break-all"
104
111
  }
105
112
  },
106
113
  "&-size-mini": {
107
114
  ".ag-cell": {
108
- lineHeight: e.lineHeight,
109
- paddingBlock: "6px",
115
+ lineHeight: i.lineHeight,
116
+ paddingBlock: i.agGridCellPaddingBlockMini,
110
117
  width: "100%",
111
118
  display: "flex",
112
119
  alignItems: "center",
@@ -117,8 +124,8 @@ const n = (e) => {
117
124
  },
118
125
  "&-size-medium": {
119
126
  ".ag-cell": {
120
- lineHeight: e.lineHeight,
121
- paddingBlock: "9px",
127
+ lineHeight: i.lineHeight,
128
+ paddingBlock: i.agGridCellPaddingBlockMedium,
122
129
  display: "flex",
123
130
  alignItems: "center",
124
131
  "& > div": {
@@ -126,13 +133,13 @@ const n = (e) => {
126
133
  }
127
134
  }
128
135
  },
129
- [`${i}__tooltip`]: {
130
- fontSize: e.fontSize,
131
- maxWidth: "300px",
136
+ [`${e}__tooltip`]: {
137
+ fontSize: i.fontSize,
138
+ maxWidth: i.agGridEllipsisTooltipMaxWidth,
132
139
  wordBreak: "break-all",
133
140
  backgroundColor: "#fff",
134
- padding: "6px 8px",
135
- borderRadius: "4px",
141
+ padding: i.agGridEllipsisTooltipPadding,
142
+ borderRadius: i.borderRadius,
136
143
  boxShadow: "0 6px 16px 0 rgba(0, 0, 0, 0.08),0 3px 6px -4px rgba(0, 0, 0, 0.12),0 9px 28px 8px rgba(0, 0, 0, 0.05)"
137
144
  },
138
145
  ".ag-unselectable": {
@@ -144,10 +151,16 @@ const n = (e) => {
144
151
  }
145
152
  }
146
153
  };
147
- }, o = r("AgGrid", (e) => [
148
- n(e)
149
- ]);
154
+ }, s = r(
155
+ "AgGrid",
156
+ (i) => [n(i)],
157
+ t,
158
+ {
159
+ skipUnit: ["agGridLineClamp"]
160
+ }
161
+ );
150
162
  export {
151
- o as default,
163
+ s as default,
164
+ t as defaultToken,
152
165
  n as genAgGridStyle
153
166
  };
@@ -1,10 +1,11 @@
1
- import { useToken as n } from "@aplus-frontend/antdv/es/theme/internal";
1
+ import { useToken as l } from "@aplus-frontend/antdv/es/theme/internal";
2
2
  import { themeQuartz as c } from "ag-grid-community";
3
- import { computed as l } from "vue";
4
- const h = (o, r, a) => {
5
- const [, t] = n();
6
- return l(() => {
7
- const d = o.value === "mini", e = t.value;
3
+ import { computed as i } from "vue";
4
+ import { useToken as u } from "../config-provider/hooks/use-token.mjs";
5
+ const B = (r, a, t) => {
6
+ const [, n] = l(), { token: o } = u();
7
+ return i(() => {
8
+ const d = r.value === "mini", e = n.value;
8
9
  return c.withParams({
9
10
  headerHeight: "36px",
10
11
  headerFontSize: "12px",
@@ -15,17 +16,17 @@ const h = (o, r, a) => {
15
16
  headerRowBorder: { color: e.colorBorderSecondary },
16
17
  selectedRowBackgroundColor: e.controlItemBgActive,
17
18
  checkboxCheckedBackgroundColor: e.colorPrimary,
18
- rowHoverColor: "var(--ap-color-bg-2)",
19
- headerBackgroundColor: "var(--ap-table-header-bg)",
19
+ rowHoverColor: o.value.colorBg2,
20
+ headerBackgroundColor: o.value.tableHeaderBg,
20
21
  headerColumnResizeHandleHeight: "50%",
21
22
  headerColumnResizeHandleWidth: "1px",
22
23
  wrapperBorderRadius: "4px",
23
- ...a.value || {},
24
- rowHeight: r.value,
24
+ ...t.value || {},
25
+ rowHeight: a.value,
25
26
  spacing: d ? "5px" : "6.5px"
26
27
  });
27
28
  });
28
29
  };
29
30
  export {
30
- h as useTheme
31
+ B as useTheme
31
32
  };
@@ -1,10 +1,10 @@
1
- import { defineComponent as h, useSlots as A, createPropsRestProxy as F, ref as N, computed as u, unref as n, renderSlot as y, createElementBlock as f, createCommentVNode as a, openBlock as t, mergeProps as g, createBlock as m, normalizeClass as S, createVNode as I, withCtx as L, resolveDynamicComponent as k, isVNode as P, toDisplayString as V } from "vue";
1
+ import { defineComponent as h, useSlots as A, createPropsRestProxy as F, ref as N, computed as u, unref as n, renderSlot as y, createElementBlock as f, createCommentVNode as a, openBlock as t, mergeProps as g, createBlock as m, normalizeClass as S, createVNode as V, withCtx as I, createElementVNode as L, resolveDynamicComponent as k, isVNode as P, toDisplayString as $ } from "vue";
2
2
  import "../../config-provider/index.mjs";
3
- import $ from "@aplus-frontend/antdv/es/button/LoadingIcon";
4
- import { Tooltip as w } from "@aplus-frontend/antdv";
5
- import D from "../style/index.mjs";
3
+ import w from "@aplus-frontend/antdv/es/button/LoadingIcon";
4
+ import { Tooltip as D } from "@aplus-frontend/antdv";
5
+ import E from "../style/index.mjs";
6
6
  import { useNamespace as T } from "../../config-provider/hooks/use-namespace.mjs";
7
- const x = { key: 1 }, J = /* @__PURE__ */ h({
7
+ const x = { key: 1 }, K = /* @__PURE__ */ h({
8
8
  name: "ApActionItem",
9
9
  __name: "index",
10
10
  props: {
@@ -20,7 +20,7 @@ const x = { key: 1 }, J = /* @__PURE__ */ h({
20
20
  tooltip: { default: () => ({}) }
21
21
  },
22
22
  setup(o) {
23
- const s = A(), r = F(o, ["color", "disabled", "visible", "loading", "iconFirst", "icon", "tooltip"]), { b: v, m: l, e: b } = T("action-item"), c = N(!1), d = u(() => o.iconFirst && (o.icon || s.icon)), C = D("action");
23
+ const s = A(), r = F(o, ["color", "disabled", "visible", "loading", "iconFirst", "icon", "tooltip"]), { b: v, m: l, e: b } = T("action-item"), c = N(!1), d = u(() => o.iconFirst && !!(o.icon || s.icon)), C = E("action-item");
24
24
  function p(e) {
25
25
  n(i) || o.disabled || (r.onClick?.(e), r.onAction && (c.value = !0, r.onAction(e).finally(() => c.value = !1)));
26
26
  }
@@ -41,7 +41,7 @@ const x = { key: 1 }, J = /* @__PURE__ */ h({
41
41
  class: B.value,
42
42
  onClick: p
43
43
  }), [
44
- i.value ? (t(), m(n($), {
44
+ i.value ? (t(), m(n(w), {
45
45
  key: 0,
46
46
  "prefix-cls": "btn",
47
47
  "exist-icon": !1,
@@ -51,22 +51,24 @@ const x = { key: 1 }, J = /* @__PURE__ */ h({
51
51
  key: 1,
52
52
  class: S(n(b)("icon-wrapper"))
53
53
  }, [
54
- I(n(w), g({
54
+ V(n(D), g({
55
55
  title: d.value ? e.text : null
56
56
  }, e.tooltip), {
57
- default: L(() => [
58
- (t(), m(k(e.icon || s.icon)))
57
+ default: I(() => [
58
+ L("span", null, [
59
+ (t(), m(k(e.icon || s.icon)))
60
+ ])
59
61
  ]),
60
62
  _: 1
61
63
  }, 16, ["title"])
62
64
  ], 2)) : a("", !0),
63
65
  d.value ? a("", !0) : y(e.$slots, "default", { key: 2 }, () => [
64
- P(e.text) ? (t(), m(k(e.text), { key: 0 })) : (t(), f("span", x, V(e.text || ""), 1))
66
+ P(e.text) ? (t(), m(k(e.text), { key: 0 })) : (t(), f("span", x, $(e.text || ""), 1))
65
67
  ])
66
68
  ], 16)) : a("", !0)
67
69
  ]);
68
70
  }
69
71
  });
70
72
  export {
71
- J as default
73
+ K as default
72
74
  };