@aplus-frontend/ui 0.6.0-beta.0 → 0.6.0-beta.10

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 (335) hide show
  1. package/es/src/ap-action/group/index.vue.d.ts +1 -1
  2. package/es/src/ap-action/item-dropdown/index.vue.d.ts +1 -1
  3. package/es/src/ap-button/ap-button.vue.mjs +1 -1
  4. package/es/src/ap-field/date/helper.mjs +12 -12
  5. package/es/src/ap-field/date/index.vue.d.ts +1 -1
  6. package/es/src/ap-field/date-range/index.vue.d.ts +1 -1
  7. package/es/src/ap-field/number/index.vue.d.ts +1 -1
  8. package/es/src/ap-field/rate/index.vue.d.ts +1 -1
  9. package/es/src/ap-field/select/index.vue.d.ts +1 -1
  10. package/es/src/ap-field/tree-select/index.vue.d.ts +1 -1
  11. package/es/src/ap-form/ap-form.vue2.mjs +57 -58
  12. package/es/src/ap-form/interface.d.ts +8 -0
  13. package/es/src/ap-form/item/index.vue.d.ts +1 -1
  14. package/es/src/ap-form/item/index.vue.mjs +33 -28
  15. package/es/src/ap-form/items/checkbox/index.vue.mjs +1 -0
  16. package/es/src/ap-form/items/date/index.vue.mjs +8 -7
  17. package/es/src/ap-form/items/date-range/index.vue.mjs +1 -0
  18. package/es/src/ap-form/items/number/index.vue.d.ts +8 -8
  19. package/es/src/ap-form/items/number/index.vue.mjs +9 -8
  20. package/es/src/ap-form/items/radio/index.vue.mjs +1 -0
  21. package/es/src/ap-form/items/select/index.vue.d.ts +8 -8
  22. package/es/src/ap-form/items/select/index.vue.mjs +7 -6
  23. package/es/src/ap-form/items/switch/index.vue.mjs +1 -0
  24. package/es/src/ap-form/items/text/index.vue.d.ts +2 -2
  25. package/es/src/ap-form/items/text/index.vue2.mjs +8 -7
  26. package/es/src/ap-form/items/text/password.vue.d.ts +2 -2
  27. package/es/src/ap-form/items/text/password.vue.mjs +1 -0
  28. package/es/src/ap-form/items/text-area/index.vue.mjs +1 -0
  29. package/es/src/ap-form/items/tree-select/index.vue.d.ts +8 -8
  30. package/es/src/ap-form/items/tree-select/index.vue.mjs +6 -5
  31. package/es/src/ap-form/render/item.vue.d.ts +1 -1
  32. package/es/src/ap-form/render/item.vue.mjs +5 -4
  33. package/es/src/ap-form/search-form/components/popover-filter.vue.d.ts +131 -2
  34. package/es/src/ap-form/search-form/components/popover-filter.vue2.mjs +41 -37
  35. package/es/src/ap-form/search-form/components/popover-sorter/index.vue2.mjs +88 -69
  36. package/es/src/ap-form/search-form/components/popover-sorter/sortable-item.vue2.mjs +8 -8
  37. package/es/src/ap-form/search-form/index.vue.d.ts +6 -2
  38. package/es/src/ap-form/search-form/index.vue.mjs +91 -89
  39. package/es/src/ap-grid/constants.d.ts +3 -3
  40. package/es/src/ap-grid/constants.mjs +9 -9
  41. package/es/src/ap-grid/editable/form-item.vue.mjs +95 -84
  42. package/es/src/ap-grid/editable/index.vue.mjs +90 -79
  43. package/es/src/ap-grid/hooks/use-inner-params.d.ts +2 -1
  44. package/es/src/ap-grid/hooks/use-inner-params.mjs +24 -35
  45. package/es/src/ap-grid/index.vue.mjs +171 -148
  46. package/es/src/ap-grid/interface.d.ts +3 -3
  47. package/es/src/ap-grid/utils/table.mjs +32 -32
  48. package/es/src/ap-info-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue.d.ts +1 -1
  49. package/es/src/ap-table/ap-table.vue2.mjs +209 -198
  50. package/es/src/ap-table/components/setting/tree-select/index.vue2.mjs +1 -1
  51. package/es/src/ap-table/constants.d.ts +30 -30
  52. package/es/src/ap-table/hooks/use-table-paging-ng.d.ts +9 -2
  53. package/es/src/ap-table/hooks/use-table-paging-ng.mjs +147 -130
  54. package/es/src/ap-table/utils.d.ts +14 -14
  55. package/es/src/ap-tag/ap-tag-group.vue.mjs +32 -28
  56. package/es/src/ap-tag/ap-tag.vue.d.ts +1 -0
  57. package/es/src/ap-tag/ap-tag.vue.mjs +18 -12
  58. package/es/src/ap-tag/interface.d.ts +4 -0
  59. package/es/src/business/ap-expand-alert/ApExpandAlert.vue.d.ts +3 -3
  60. package/es/src/business/ap-expand-alert/ApExpandAlert.vue2.mjs +93 -73
  61. package/es/src/business/ap-expand-alert/index.d.ts +4 -4
  62. package/es/src/business/ap-export-group/ApExportGroup.vue.d.ts +1 -0
  63. package/es/src/business/ap-export-group/ApExportGroup.vue2.mjs +109 -99
  64. package/es/src/business/ap-export-group/index.d.ts +3 -0
  65. package/es/src/business/ap-export-group/interface.d.ts +7 -2
  66. package/es/src/business/ap-input-radio/ApInputRadio.vue2.mjs +27 -25
  67. package/es/src/business/ap-label/ApLabel.d.ts +1 -1
  68. package/es/src/business/ap-label/constans.mjs +1 -1
  69. package/es/src/business/ap-label/index.d.ts +3 -3
  70. package/es/src/business/ap-ladder/ApLadder.d.ts +1 -1
  71. package/es/src/business/ap-ladder/index.d.ts +3 -3
  72. package/es/src/business/ap-status/interface.d.ts +1 -1
  73. package/es/src/business/ap-table-modal/modal-title.vue2.mjs +2 -2
  74. package/es/src/business/ap-view/ap-view.vue.d.ts +1 -0
  75. package/es/src/business/ap-view/ap-view.vue2.mjs +136 -117
  76. package/es/src/business/ap-view/components/main-button-content.vue2.mjs +60 -48
  77. package/es/src/business/ap-view/components/menu-list-content.vue2.mjs +86 -80
  78. package/es/src/business/ap-view/hooks/use-view-provide.d.ts +1 -0
  79. package/es/src/business/ap-view/index.d.ts +3 -0
  80. package/es/src/business/ap-view/interface.d.ts +8 -0
  81. package/es/src/business/batch-input-group/form-item.vue.d.ts +1 -1
  82. package/es/src/business/batch-input-group/form-item.vue.mjs +1 -0
  83. package/es/src/business/batch-input-group/index.vue.d.ts +1 -1
  84. package/es/src/business/hooks/usePageListApGrid.mjs +3 -5
  85. package/es/src/check-card/group.vue.d.ts +1 -1
  86. package/es/src/check-card/index.vue2.mjs +1 -1
  87. package/es/src/config-provider/config-provider-props.d.ts +0 -5
  88. package/es/src/config-provider/config-provider-props.mjs +0 -4
  89. package/es/src/config-provider/config-provider.d.ts +0 -138
  90. package/es/src/config-provider/config-provider.mjs +21 -26
  91. package/es/src/config-provider/hooks/use-global-config.d.ts +0 -5
  92. package/es/src/config-provider/index.d.ts +0 -652
  93. package/es/src/design-token/index.mjs +9 -3
  94. package/es/src/editable-table/form-item.vue.d.ts +2 -14
  95. package/es/src/editable-table/form-item.vue.mjs +85 -77
  96. package/es/src/editable-table/index.vue.d.ts +2 -16
  97. package/es/src/editable-table/index.vue.mjs +86 -78
  98. package/es/src/editable-table/interface.d.ts +7 -0
  99. package/es/src/locale/lang/en.mjs +1 -1
  100. package/es/src/locale/lang/zh-cn.mjs +1 -1
  101. package/lib/src/ap-action/group/index.vue.d.ts +1 -1
  102. package/lib/src/ap-action/item-dropdown/index.vue.d.ts +1 -1
  103. package/lib/src/ap-button/ap-button.vue.js +1 -1
  104. package/lib/src/ap-field/date/helper.js +1 -1
  105. package/lib/src/ap-field/date/index.vue.d.ts +1 -1
  106. package/lib/src/ap-field/date-range/index.vue.d.ts +1 -1
  107. package/lib/src/ap-field/number/index.vue.d.ts +1 -1
  108. package/lib/src/ap-field/rate/index.vue.d.ts +1 -1
  109. package/lib/src/ap-field/select/index.vue.d.ts +1 -1
  110. package/lib/src/ap-field/tree-select/index.vue.d.ts +1 -1
  111. package/lib/src/ap-form/ap-form.vue2.js +1 -1
  112. package/lib/src/ap-form/interface.d.ts +8 -0
  113. package/lib/src/ap-form/item/index.vue.d.ts +1 -1
  114. package/lib/src/ap-form/item/index.vue.js +1 -1
  115. package/lib/src/ap-form/items/checkbox/index.vue.js +1 -1
  116. package/lib/src/ap-form/items/date/index.vue.js +1 -1
  117. package/lib/src/ap-form/items/date-range/index.vue.js +1 -1
  118. package/lib/src/ap-form/items/number/index.vue.d.ts +8 -8
  119. package/lib/src/ap-form/items/number/index.vue.js +1 -1
  120. package/lib/src/ap-form/items/radio/index.vue.js +1 -1
  121. package/lib/src/ap-form/items/select/index.vue.d.ts +8 -8
  122. package/lib/src/ap-form/items/select/index.vue.js +1 -1
  123. package/lib/src/ap-form/items/switch/index.vue.js +1 -1
  124. package/lib/src/ap-form/items/text/index.vue.d.ts +2 -2
  125. package/lib/src/ap-form/items/text/index.vue2.js +1 -1
  126. package/lib/src/ap-form/items/text/password.vue.d.ts +2 -2
  127. package/lib/src/ap-form/items/text/password.vue.js +1 -1
  128. package/lib/src/ap-form/items/text-area/index.vue.js +1 -1
  129. package/lib/src/ap-form/items/tree-select/index.vue.d.ts +8 -8
  130. package/lib/src/ap-form/items/tree-select/index.vue.js +1 -1
  131. package/lib/src/ap-form/render/item.vue.d.ts +1 -1
  132. package/lib/src/ap-form/render/item.vue.js +1 -1
  133. package/lib/src/ap-form/search-form/components/popover-filter.vue.d.ts +131 -2
  134. package/lib/src/ap-form/search-form/components/popover-filter.vue2.js +1 -1
  135. package/lib/src/ap-form/search-form/components/popover-sorter/index.vue2.js +1 -1
  136. package/lib/src/ap-form/search-form/components/popover-sorter/sortable-item.vue2.js +1 -1
  137. package/lib/src/ap-form/search-form/index.vue.d.ts +6 -2
  138. package/lib/src/ap-form/search-form/index.vue.js +1 -1
  139. package/lib/src/ap-grid/constants.d.ts +3 -3
  140. package/lib/src/ap-grid/constants.js +1 -1
  141. package/lib/src/ap-grid/editable/form-item.vue.js +1 -1
  142. package/lib/src/ap-grid/editable/index.vue.js +1 -1
  143. package/lib/src/ap-grid/hooks/use-inner-params.d.ts +2 -1
  144. package/lib/src/ap-grid/hooks/use-inner-params.js +1 -1
  145. package/lib/src/ap-grid/index.vue.js +1 -1
  146. package/lib/src/ap-grid/interface.d.ts +3 -3
  147. package/lib/src/ap-grid/utils/table.js +1 -1
  148. package/lib/src/ap-info-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue.d.ts +1 -1
  149. package/lib/src/ap-table/ap-table.vue2.js +1 -1
  150. package/lib/src/ap-table/components/setting/tree-select/index.vue2.js +1 -1
  151. package/lib/src/ap-table/constants.d.ts +30 -30
  152. package/lib/src/ap-table/hooks/use-table-paging-ng.d.ts +9 -2
  153. package/lib/src/ap-table/hooks/use-table-paging-ng.js +1 -1
  154. package/lib/src/ap-table/utils.d.ts +14 -14
  155. package/lib/src/ap-tag/ap-tag-group.vue.js +1 -1
  156. package/lib/src/ap-tag/ap-tag.vue.d.ts +1 -0
  157. package/lib/src/ap-tag/ap-tag.vue.js +1 -1
  158. package/lib/src/ap-tag/interface.d.ts +4 -0
  159. package/lib/src/business/ap-expand-alert/ApExpandAlert.vue.d.ts +3 -3
  160. package/lib/src/business/ap-expand-alert/ApExpandAlert.vue2.js +1 -1
  161. package/lib/src/business/ap-expand-alert/index.d.ts +4 -4
  162. package/lib/src/business/ap-export-group/ApExportGroup.vue.d.ts +1 -0
  163. package/lib/src/business/ap-export-group/ApExportGroup.vue2.js +1 -1
  164. package/lib/src/business/ap-export-group/index.d.ts +3 -0
  165. package/lib/src/business/ap-export-group/interface.d.ts +7 -2
  166. package/lib/src/business/ap-input-radio/ApInputRadio.vue2.js +1 -1
  167. package/lib/src/business/ap-label/ApLabel.d.ts +1 -1
  168. package/lib/src/business/ap-label/constans.js +1 -1
  169. package/lib/src/business/ap-label/index.d.ts +3 -3
  170. package/lib/src/business/ap-ladder/ApLadder.d.ts +1 -1
  171. package/lib/src/business/ap-ladder/index.d.ts +3 -3
  172. package/lib/src/business/ap-status/interface.d.ts +1 -1
  173. package/lib/src/business/ap-table-modal/modal-title.vue2.js +1 -1
  174. package/lib/src/business/ap-view/ap-view.vue.d.ts +1 -0
  175. package/lib/src/business/ap-view/ap-view.vue2.js +1 -1
  176. package/lib/src/business/ap-view/components/main-button-content.vue2.js +1 -1
  177. package/lib/src/business/ap-view/components/menu-list-content.vue2.js +1 -1
  178. package/lib/src/business/ap-view/hooks/use-view-provide.d.ts +1 -0
  179. package/lib/src/business/ap-view/index.d.ts +3 -0
  180. package/lib/src/business/ap-view/interface.d.ts +8 -0
  181. package/lib/src/business/batch-input-group/form-item.vue.d.ts +1 -1
  182. package/lib/src/business/batch-input-group/form-item.vue.js +1 -1
  183. package/lib/src/business/batch-input-group/index.vue.d.ts +1 -1
  184. package/lib/src/business/hooks/usePageListApGrid.js +1 -1
  185. package/lib/src/check-card/group.vue.d.ts +1 -1
  186. package/lib/src/check-card/index.vue2.js +1 -1
  187. package/lib/src/config-provider/config-provider-props.d.ts +0 -5
  188. package/lib/src/config-provider/config-provider-props.js +1 -1
  189. package/lib/src/config-provider/config-provider.d.ts +0 -138
  190. package/lib/src/config-provider/config-provider.js +1 -1
  191. package/lib/src/config-provider/hooks/use-global-config.d.ts +0 -5
  192. package/lib/src/config-provider/index.d.ts +0 -652
  193. package/lib/src/design-token/index.js +1 -1
  194. package/lib/src/editable-table/form-item.vue.d.ts +2 -14
  195. package/lib/src/editable-table/form-item.vue.js +1 -1
  196. package/lib/src/editable-table/index.vue.d.ts +2 -16
  197. package/lib/src/editable-table/index.vue.js +1 -1
  198. package/lib/src/editable-table/interface.d.ts +7 -0
  199. package/lib/src/locale/lang/en.js +1 -1
  200. package/lib/src/locale/lang/zh-cn.js +1 -1
  201. package/package.json +4 -4
  202. package/theme/antd-global-overwrite/admin/index.css +14 -27
  203. package/theme/antd-global-overwrite/admin/index.less +1 -0
  204. package/theme/antd-global-overwrite/admin/modal.css +8 -24
  205. package/theme/antd-global-overwrite/admin/modal.less +9 -24
  206. package/theme/antd-global-overwrite/admin/table.css +3 -3
  207. package/theme/antd-global-overwrite/admin/table.less +3 -3
  208. package/theme/antd-global-overwrite/admin/tooltip.css +3 -0
  209. package/theme/antd-global-overwrite/admin/tooltip.less +3 -0
  210. package/theme/antd-global-overwrite/aplus/index.css +13 -20
  211. package/theme/antd-global-overwrite/aplus/index.less +1 -0
  212. package/theme/antd-global-overwrite/aplus/modal.css +7 -17
  213. package/theme/antd-global-overwrite/aplus/modal.less +8 -18
  214. package/theme/antd-global-overwrite/aplus/table.css +3 -3
  215. package/theme/antd-global-overwrite/aplus/table.less +3 -3
  216. package/theme/antd-global-overwrite/aplus/tooltip.css +3 -0
  217. package/theme/antd-global-overwrite/aplus/tooltip.less +3 -0
  218. package/theme/ap-action/item-dropdown.css +24 -6
  219. package/theme/ap-action/item-dropdown.less +1 -1
  220. package/theme/ap-action/item.css +25 -7
  221. package/theme/ap-action/item.less +1 -1
  222. package/theme/ap-appendix/ap-appendix.css +28 -8
  223. package/theme/ap-appendix/ap-appendix.less +6 -4
  224. package/theme/ap-attachment/ap-attachment.css +28 -9
  225. package/theme/ap-attachment/ap-attachment.less +6 -6
  226. package/theme/ap-batch-action/ap-batch-action.css +28 -7
  227. package/theme/ap-batch-action/ap-batch-action.less +6 -3
  228. package/theme/ap-button/ap-button.css +22 -4
  229. package/theme/ap-card/ap-card.css +22 -4
  230. package/theme/ap-descriptions/ap-descriptions.css +27 -9
  231. package/theme/ap-descriptions/ap-descriptions.less +5 -5
  232. package/theme/ap-download/ap-download.css +29 -14
  233. package/theme/ap-download/ap-download.less +8 -11
  234. package/theme/ap-expand-alert/ap-expand-alert.css +24 -6
  235. package/theme/ap-expand-alert/ap-expand-alert.less +5 -5
  236. package/theme/ap-field/checkbox.css +23 -5
  237. package/theme/ap-field/checkbox.less +2 -1
  238. package/theme/ap-field/index.css +24 -6
  239. package/theme/ap-field/number.css +22 -4
  240. package/theme/ap-field/radio.css +23 -5
  241. package/theme/ap-field/radio.less +1 -1
  242. package/theme/ap-field/text-area.css +22 -4
  243. package/theme/ap-form/ap-form-item-group.css +22 -4
  244. package/theme/ap-form/ap-form-item.css +33 -10
  245. package/theme/ap-form/ap-form-item.less +17 -9
  246. package/theme/ap-form/drawer-form.css +22 -4
  247. package/theme/ap-form/index.css +61 -26
  248. package/theme/ap-form/item-text-group.css +22 -4
  249. package/theme/ap-form/item-text.css +22 -4
  250. package/theme/ap-form/modal-form.css +22 -4
  251. package/theme/ap-form/search-form-sorter.css +36 -17
  252. package/theme/ap-form/search-form-sorter.less +8 -7
  253. package/theme/ap-form/search-form.css +61 -26
  254. package/theme/ap-form/search-form.less +17 -6
  255. package/theme/ap-grid/editable.css +24 -6
  256. package/theme/ap-grid/editable.less +3 -2
  257. package/theme/ap-grid/index.css +117 -43
  258. package/theme/ap-grid/index.less +35 -11
  259. package/theme/ap-group-search/ap-extension-select.css +22 -4
  260. package/theme/ap-group-search/ap-group-search.css +22 -4
  261. package/theme/ap-group-search/ap-popover-select.css +22 -4
  262. package/theme/ap-image/ap-image.css +22 -4
  263. package/theme/ap-input-radio/ap-input-radio.css +22 -4
  264. package/theme/ap-label/ap-label.css +22 -4
  265. package/theme/ap-ladder/ap-ladder.css +26 -7
  266. package/theme/ap-ladder/ap-ladder.less +4 -3
  267. package/theme/ap-layout/ap-info-layout.css +22 -4
  268. package/theme/ap-list/index.css +23 -5
  269. package/theme/ap-list/index.less +2 -1
  270. package/theme/ap-product-info/ap-product-info.css +22 -4
  271. package/theme/ap-select-layout/ap-select-layout.css +30 -12
  272. package/theme/ap-select-layout/ap-select-layout.less +8 -8
  273. package/theme/ap-size-input/ap-size-input.css +22 -4
  274. package/theme/ap-status/ap-status.css +24 -7
  275. package/theme/ap-status/ap-status.less +2 -4
  276. package/theme/ap-summary/index.css +25 -7
  277. package/theme/ap-summary/index.less +3 -3
  278. package/theme/ap-table/ap-table-index.css +27 -9
  279. package/theme/ap-table/ap-table-index.less +5 -5
  280. package/theme/ap-table/ap-table-paragraph-ellipsis.css +22 -4
  281. package/theme/ap-table/ap-table-paragraph-ellipsis.less +1 -1
  282. package/theme/ap-table/ap-table.css +109 -55
  283. package/theme/ap-table/ap-table.less +11 -9
  284. package/theme/ap-table/setting/index.css +30 -13
  285. package/theme/ap-table/setting/modal.css +26 -9
  286. package/theme/ap-table/setting/modal.less +1 -2
  287. package/theme/ap-table/setting/select-group.css +24 -5
  288. package/theme/ap-table/setting/select-group.less +2 -1
  289. package/theme/ap-table/setting/sortable-item-meta.css +22 -4
  290. package/theme/ap-table/setting/sortable-item.css +22 -4
  291. package/theme/ap-table/setting/sorter.css +24 -7
  292. package/theme/ap-table-modal/index.css +109 -55
  293. package/theme/ap-tag/ap-tag-group.css +24 -6
  294. package/theme/ap-tag/ap-tag-group.less +4 -5
  295. package/theme/ap-tag/ap-tag.css +45 -18
  296. package/theme/ap-tag/ap-tag.less +37 -24
  297. package/theme/ap-title/ap-title.css +29 -9
  298. package/theme/ap-title/ap-title.less +7 -5
  299. package/theme/ap-upload/index.css +30 -12
  300. package/theme/ap-upload/multiple-file.css +24 -6
  301. package/theme/ap-upload/multiple-file.less +2 -2
  302. package/theme/ap-upload/picture.css +26 -8
  303. package/theme/ap-upload/picture.less +4 -4
  304. package/theme/ap-upload/single-file.css +24 -6
  305. package/theme/ap-upload/single-file.less +2 -2
  306. package/theme/ap-upload/upload.css +22 -4
  307. package/theme/ap-upload-single/index.css +22 -4
  308. package/theme/ap-view/ap-view.css +26 -4
  309. package/theme/ap-view/ap-view.less +4 -0
  310. package/theme/batch-input-group/index.css +25 -6
  311. package/theme/batch-input-group/popover-input.css +23 -4
  312. package/theme/batch-input-group/popover-input.less +1 -0
  313. package/theme/check-card/index.css +44 -26
  314. package/theme/check-card/index.less +17 -15
  315. package/theme/editable-table/index.css +77 -40
  316. package/theme/editable-table/index.less +9 -7
  317. package/theme/full-screen/index.css +22 -4
  318. package/theme/index.css +390 -182
  319. package/theme/index.less +1 -0
  320. package/theme/mask/index.css +22 -4
  321. package/theme/mixins/config.less +27 -5
  322. package/theme/mixins/mixins.css +22 -4
  323. package/theme/mixins/mixins.less +25 -0
  324. package/theme/scroll-bar/index.css +22 -4
  325. package/theme/scroll-view/index.css +22 -4
  326. package/theme/splitter/index.css +29 -11
  327. package/theme/text/group.css +22 -4
  328. package/theme/text/index.css +25 -7
  329. package/theme/ui-mode.css +94 -0
  330. package/theme/ui-mode.less +95 -0
  331. package/theme/work-order-modal/index.css +22 -4
  332. package/es/src/config-provider/css-var.d.ts +0 -139
  333. package/es/src/config-provider/css-var.mjs +0 -278
  334. package/lib/src/config-provider/css-var.d.ts +0 -139
  335. package/lib/src/config-provider/css-var.js +0 -1
@@ -1,18 +1,20 @@
1
- import { defineComponent as M, computed as N, ref as p, createVNode as g, watch as S, onMounted as Y, createBlock as $, openBlock as j, unref as w, normalizeClass as x, withCtx as z, createElementVNode as W } from "vue";
1
+ import { defineComponent as Y, computed as E, ref as d, createVNode as _, watch as z, createBlock as M, openBlock as W, unref as v, mergeProps as h, withCtx as q, createElementVNode as H, normalizeClass as J } from "vue";
2
2
  import "../../config-provider/index.mjs";
3
- import q from "./icons/line-down.vue.mjs";
4
- import { ApBatchActionGroup as H } from "../ap-batch-action-group/index.mjs";
3
+ import Q from "./icons/line-down.vue.mjs";
4
+ import { ApBatchActionGroup as X } from "../ap-batch-action-group/index.mjs";
5
5
  import "./components/main-button-content.vue.mjs";
6
6
  import "./components/menu-list-content.vue.mjs";
7
- import { useViewProvide as J } from "./hooks/use-view-provide.mjs";
8
- import { useInjectApTable as Q } from "../../ap-table/context.mjs";
7
+ import { useViewProvide as Z } from "./hooks/use-view-provide.mjs";
8
+ import { useInjectApTable as U } from "../../ap-table/context.mjs";
9
9
  import { SYSTEM_VIEW_KEY as y } from "./utils/enum.mjs";
10
- import { useGlobalConfig as X } from "../../config-provider/hooks/use-global-config.mjs";
11
- import { useNamespace as Z } from "../../config-provider/hooks/use-namespace.mjs";
12
- import { useLocale as U } from "../../config-provider/hooks/use-locale.mjs";
13
- import h from "./components/main-button-content.vue2.mjs";
14
- import R from "./components/menu-list-content.vue2.mjs";
15
- const fe = /* @__PURE__ */ M({
10
+ import { isValid as R } from "@aplus-frontend/utils";
11
+ import { useGlobalConfig as C } from "../../config-provider/hooks/use-global-config.mjs";
12
+ import { useNamespace as O } from "../../config-provider/hooks/use-namespace.mjs";
13
+ import { useLocale as S } from "../../config-provider/hooks/use-locale.mjs";
14
+ import D from "./components/main-button-content.vue2.mjs";
15
+ import ee from "./components/menu-list-content.vue2.mjs";
16
+ const Ve = /* @__PURE__ */ Y({
17
+ name: "ApView",
16
18
  __name: "ap-view",
17
19
  props: {
18
20
  tableKey: {},
@@ -20,152 +22,169 @@ const fe = /* @__PURE__ */ M({
20
22
  viewCacheOption: {},
21
23
  maxViewNum: {
22
24
  default: 20
25
+ },
26
+ isDefaultSystemView: {
27
+ type: Boolean,
28
+ default: !1
23
29
  }
24
30
  },
25
- setup(E) {
26
- const c = E, L = X("viewCacheOption"), {
27
- b: d
28
- } = Z("ap-view"), {
29
- t: T
30
- } = U(), V = N(() => ({
31
+ setup(F) {
32
+ const f = F, k = C("viewCacheOption"), {
33
+ b: K
34
+ } = O("ap-view"), {
35
+ t: A
36
+ } = S(), b = E(() => ({
31
37
  viewKey: y,
32
- viewName: T("ap.apView.systemView")
38
+ viewName: A("ap.apView.systemView")
33
39
  })), {
34
- getSearchFormValues: k,
35
- setSearchFormValues: A,
36
- submit: B,
37
- reset: F
38
- } = Q(), G = p(!1), K = p(!1), r = p("system"), P = {
40
+ getSearchFormValues: B,
41
+ setSearchFormValues: L,
42
+ submit: P,
43
+ reset: T
44
+ } = U(), j = d(!1), g = d(!1), V = d("");
45
+ let N = !1;
46
+ const G = {
39
47
  dropdownType: "dropdown",
40
- content: g(h, {
41
- maxViewNum: c.maxViewNum
48
+ content: _(D, {
49
+ maxViewNum: f.maxViewNum
42
50
  }, null)
43
- }, o = p([V.value]), D = N(() => o.value.map((t) => ({
51
+ }, o = d([b.value]), $ = E(() => o.value.map((t) => ({
44
52
  id: t.viewKey,
45
- content: g(R, {
53
+ content: _(ee, {
46
54
  view: t
47
55
  }, null)
48
- }))), n = {
49
- getSearchFormValues: k,
50
- setSearchFormValues: A,
51
- submit: B,
52
- reset: F,
53
- ...c.saveDataSource
54
- }, e = {
55
- ...L.value,
56
- ...c.viewCacheOption
57
- }, _ = () => {
58
- const t = o.value.find((s) => s.isDefault);
56
+ }))), e = {
57
+ getSearchFormValues: B,
58
+ setSearchFormValues: L,
59
+ submit: P,
60
+ reset: T,
61
+ ...f.saveDataSource
62
+ }, i = {
63
+ ...k.value,
64
+ ...f.viewCacheOption
65
+ }, x = () => {
66
+ if (f.isDefaultSystemView)
67
+ return y;
68
+ const t = o.value.find((l) => l.isDefault);
59
69
  return (t == null ? void 0 : t.viewKey) ?? y;
60
- }, m = {
70
+ }, p = (t) => {
71
+ V.value = t;
72
+ const l = o.value.find((s) => s.viewKey === V.value);
73
+ l && setTimeout(() => {
74
+ var s, n, m, a, r, u;
75
+ l.viewKey === y ? N ? (s = e == null ? void 0 : e.submit) == null || s.call(e) : (n = e == null ? void 0 : e.reset) == null || n.call(e) : ((r = e == null ? void 0 : e.setSearchFormValues) == null || r.call(e, {
76
+ ...Object.fromEntries(Object.keys(((m = e == null ? void 0 : e.getSearchFormValues) == null ? void 0 : m.call(e)) ?? {}).map((w) => [w, void 0])) ?? {},
77
+ ...((a = l.viewConfig) == null ? void 0 : a.searchForm) ?? {}
78
+ }), (u = e == null ? void 0 : e.submit) == null || u.call(e)), N = !1;
79
+ });
80
+ }, c = {
61
81
  getViewList: async (t) => {
62
- var s;
82
+ var l;
63
83
  try {
64
84
  const {
65
- tableKey: a
66
- } = t, l = await ((s = e == null ? void 0 : e.getViewList) == null ? void 0 : s.call(e, {
67
- tableKey: a
85
+ tableKey: s
86
+ } = t, n = await ((l = i == null ? void 0 : i.getViewList) == null ? void 0 : l.call(i, {
87
+ tableKey: s
68
88
  }));
69
- return o.value = [V.value, ...l ?? []], r.value = _(), o.value;
89
+ return o.value = [b.value, ...n ?? []], p(x()), o.value;
70
90
  } catch {
71
- return o.value = [V.value], r.value = y, o.value;
91
+ return o.value = [b.value], p(y), o.value;
72
92
  }
73
93
  },
74
94
  addView: async (t) => {
75
- var u;
95
+ var r;
76
96
  const {
77
- tableKey: s,
78
- viewKey: a,
79
- viewName: l,
80
- isDefault: i,
81
- viewConfig: f
97
+ tableKey: l,
98
+ viewKey: s,
99
+ viewName: n,
100
+ isDefault: m,
101
+ viewConfig: a
82
102
  } = t;
83
- await ((u = e == null ? void 0 : e.addView) == null ? void 0 : u.call(e, {
84
- tableKey: s,
85
- viewKey: a,
86
- viewName: l,
87
- isDefault: i,
88
- viewConfig: f
89
- })), i && (o.value = o.value.map((v) => ({
90
- ...v,
103
+ await ((r = i == null ? void 0 : i.addView) == null ? void 0 : r.call(i, {
104
+ tableKey: l,
105
+ viewKey: s,
106
+ viewName: n,
107
+ isDefault: m,
108
+ viewConfig: a
109
+ })), m && (o.value = o.value.map((u) => ({
110
+ ...u,
91
111
  isDefault: !1
92
112
  }))), o.value = [...o.value, {
93
- viewKey: a,
94
- viewName: l,
95
- isDefault: i,
96
- viewConfig: f
97
- }], r.value = a;
113
+ viewKey: s,
114
+ viewName: n,
115
+ isDefault: m,
116
+ viewConfig: a
117
+ }], p(s);
98
118
  },
99
119
  changeView: async (t) => {
100
- var v;
120
+ var u;
101
121
  const {
102
- tableKey: s,
103
- viewKey: a,
104
- viewName: l,
105
- isDefault: i,
106
- viewConfig: f
122
+ tableKey: l,
123
+ viewKey: s,
124
+ viewName: n,
125
+ isDefault: m,
126
+ viewConfig: a
107
127
  } = t;
108
- await ((v = e == null ? void 0 : e.changeView) == null ? void 0 : v.call(e, {
109
- tableKey: s,
110
- viewKey: a,
111
- viewName: l,
112
- isDefault: i,
113
- viewConfig: f
114
- })), i && (o.value = o.value.map((b) => ({
115
- ...b,
128
+ await ((u = i == null ? void 0 : i.changeView) == null ? void 0 : u.call(i, {
129
+ tableKey: l,
130
+ viewKey: s,
131
+ viewName: n,
132
+ isDefault: m,
133
+ viewConfig: a
134
+ })), m && (o.value = o.value.map((w) => ({
135
+ ...w,
116
136
  isDefault: !1
117
137
  })));
118
- const u = o.value.find((b) => b.viewKey === a);
119
- u && (u.viewName = l, u.isDefault = i, u.viewConfig = f), r.value = a;
138
+ const r = o.value.find((w) => w.viewKey === s);
139
+ r && (r.viewName = n, r.isDefault = m, r.viewConfig = a), p(s);
120
140
  },
121
141
  removeView: async (t) => {
122
- var l;
142
+ var n;
123
143
  const {
124
- tableKey: s,
125
- viewKey: a
144
+ tableKey: l,
145
+ viewKey: s
126
146
  } = t;
127
- await ((l = e == null ? void 0 : e.removeView) == null ? void 0 : l.call(e, {
128
- tableKey: s,
129
- viewKey: a
130
- })), o.value = o.value.filter((i) => i.viewKey !== a), a === r.value && (r.value = _());
147
+ await ((n = i == null ? void 0 : i.removeView) == null ? void 0 : n.call(i, {
148
+ tableKey: l,
149
+ viewKey: s
150
+ })), o.value = o.value.filter((m) => m.viewKey !== s), s === V.value && p(x());
131
151
  }
132
152
  }, I = {
133
- tableKey: c.tableKey,
134
- currentViewKey: r,
135
- popoverOpen: G,
136
- menuOpen: K,
153
+ tableKey: f.tableKey,
154
+ currentViewKey: V,
155
+ changeCurrentViewKey: p,
156
+ popoverOpen: j,
157
+ menuOpen: g,
137
158
  viewList: o,
138
- viewListCRUD: m,
139
- saveDataSource: n
159
+ viewListCRUD: c,
160
+ saveDataSource: e
140
161
  };
141
- return S(r, (t) => {
142
- const s = o.value.find((a) => a.viewKey === t);
143
- s && setTimeout(() => {
144
- var a, l, i;
145
- s.viewKey === y ? (a = n.reset) == null || a.call(n) : ((l = n.setSearchFormValues) == null || l.call(n, s.viewConfig ?? {}), (i = n.submit) == null || i.call(n));
146
- });
147
- }), J(I), Y(() => {
148
- var t;
149
- (t = m == null ? void 0 : m.getViewList) == null || t.call(m, {
150
- tableKey: c.tableKey
151
- });
152
- }), (t, s) => (j(), $(w(H), {
153
- open: K.value,
154
- "onUpdate:open": s[0] || (s[0] = (a) => K.value = a),
155
- class: x([w(d)()]),
156
- "button-props": P,
157
- "menu-list": D.value,
158
- "overlay-class-name": [w(d)("overlay")],
162
+ return Z(I), z(() => f.tableKey, (t) => {
163
+ var l;
164
+ R(t) && (N = !0, (l = c == null ? void 0 : c.getViewList) == null || l.call(c, {
165
+ tableKey: t
166
+ }));
167
+ }, {
168
+ immediate: !0
169
+ }), (t, l) => (W(), M(v(X), h({
170
+ ...t.$attrs
171
+ }, {
172
+ open: g.value,
173
+ "onUpdate:open": l[0] || (l[0] = (s) => g.value = s),
174
+ class: [v(K)()],
175
+ "button-props": G,
176
+ "menu-list": $.value,
177
+ "overlay-class-name": [v(K)("overlay")],
159
178
  trigger: "click",
160
179
  placement: "bottom"
161
- }, {
162
- icon: z(() => [W("div", {
163
- class: x([w(d)("icon")])
164
- }, [g(q)], 2)]),
180
+ }), {
181
+ icon: q(() => [H("div", {
182
+ class: J([v(K)("icon")])
183
+ }, [_(Q)], 2)]),
165
184
  _: 1
166
- }, 8, ["open", "class", "menu-list", "overlay-class-name"]));
185
+ }, 16, ["open", "class", "menu-list", "overlay-class-name"]));
167
186
  }
168
187
  });
169
188
  export {
170
- fe as default
189
+ Ve as default
171
190
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as $, ref as I, computed as T, watch as Y, createBlock as D, openBlock as E, unref as e, withCtx as t, createElementVNode as u, normalizeClass as m, createVNode as a, createSlots as K, toDisplayString as p, createTextVNode as v } from "vue";
1
+ import { defineComponent as z, ref as $, computed as I, watch as Y, createBlock as D, openBlock as E, unref as e, withCtx as t, createElementVNode as f, normalizeClass as r, createVNode as a, createSlots as K, toDisplayString as s, createTextVNode as v } from "vue";
2
2
  import { Popover as j, Tooltip as q, Space as N, Checkbox as B } from "@aplus-frontend/antdv";
3
3
  import "../../../config-provider/index.mjs";
4
4
  import L from "../icons/line-eye.vue.mjs";
@@ -6,42 +6,55 @@ import "../../../ap-form/ap-form.vue.mjs";
6
6
  import { ApField as M } from "../../../ap-field/index.mjs";
7
7
  import "../../../ap-button/index.mjs";
8
8
  import O from "dayjs";
9
- import { useViewInject as S } from "../hooks/use-view-provide.mjs";
10
- import { generateUniqueKey as A } from "../utils/uuid.mjs";
11
- import { useLocale as P } from "../../../config-provider/hooks/use-locale.mjs";
12
- import { useNamespace as R } from "../../../config-provider/hooks/use-namespace.mjs";
9
+ import { useViewInject as A } from "../hooks/use-view-provide.mjs";
10
+ import { generateUniqueKey as P } from "../utils/uuid.mjs";
11
+ import { cloneDeep as R } from "lodash-unified";
12
+ import { useLocale as U } from "../../../config-provider/hooks/use-locale.mjs";
13
+ import { useNamespace as G } from "../../../config-provider/hooks/use-namespace.mjs";
13
14
  import w from "../../../ap-form/ap-form.vue2.mjs";
14
- import h from "../../../ap-button/ap-button.vue.mjs";
15
- const le = /* @__PURE__ */ $({
15
+ import F from "../../../ap-button/ap-button.vue.mjs";
16
+ const re = /* @__PURE__ */ z({
16
17
  __name: "main-button-content",
17
18
  props: {
18
19
  maxViewNum: {}
19
20
  },
20
21
  setup(b) {
21
- const c = b, { t: o } = P(), { b: n } = R("ap-view"), _ = I(), { tableKey: k, popoverOpen: r, viewList: f, saveDataSource: s, viewListCRUD: V } = S(), y = T({
22
- get: () => r.value && f.value.length < c.maxViewNum + 1,
23
- set: (l) => {
24
- f.value.length < c.maxViewNum + 1 && (r.value = l);
22
+ const d = b, { t: o } = U(), { b: l } = G("ap-view"), V = $(), { tableKey: k, popoverOpen: c, viewList: u, saveDataSource: n, viewListCRUD: _ } = A(), y = I({
23
+ get: () => c.value && u.value.length < d.maxViewNum + 1,
24
+ set: (p) => {
25
+ u.value.length < d.maxViewNum + 1 && (c.value = p);
25
26
  }
26
27
  });
27
- Y(r, (l) => {
28
+ Y(c, (p) => {
28
29
  var i;
29
- l && ((i = _.value) == null || i.resetFields());
30
+ p && ((i = V.value) == null || i.resetFields(), setTimeout(() => {
31
+ var m;
32
+ (m = V.value) == null || m.setFieldsValue({
33
+ isDefault: !u.value.some((h) => h.isDefault)
34
+ });
35
+ }));
30
36
  });
31
- const F = async (l) => {
37
+ const C = async (p) => {
32
38
  var g, x;
33
- const { viewName: i, isDefault: d } = l, C = A(), z = ((g = s == null ? void 0 : s.getSearchFormValues) == null ? void 0 : g.call(s, !0)) ?? {};
34
- await ((x = V.addView) == null ? void 0 : x.call(V, {
39
+ const { viewName: i, isDefault: m } = p, h = P(), T = {
40
+ searchForm: R(
41
+ (g = n == null ? void 0 : n.getSearchFormValues) == null ? void 0 : g.call(
42
+ n,
43
+ !!(n != null && n.searchFormTransform)
44
+ )
45
+ )
46
+ };
47
+ await ((x = _.addView) == null ? void 0 : x.call(_, {
35
48
  tableKey: k,
36
- viewKey: C,
49
+ viewKey: h,
37
50
  viewName: i,
38
- isDefault: d,
39
- viewConfig: z
40
- })), r.value = !1;
51
+ isDefault: m,
52
+ viewConfig: T
53
+ })), c.value = !1;
41
54
  };
42
- return (l, i) => (E(), D(e(j), {
55
+ return (p, i) => (E(), D(e(j), {
43
56
  open: y.value,
44
- "onUpdate:open": i[1] || (i[1] = (d) => y.value = d),
57
+ "onUpdate:open": i[1] || (i[1] = (m) => y.value = m),
45
58
  placement: "bottom",
46
59
  trigger: "click",
47
60
  arrow: !1,
@@ -50,26 +63,25 @@ const le = /* @__PURE__ */ $({
50
63
  }
51
64
  }, {
52
65
  content: t(() => [
53
- u("div", {
54
- class: m([e(n)("main-content-popover")])
66
+ f("div", {
67
+ class: r([e(l)("main-content-popover")])
55
68
  }, [
56
69
  a(w, {
57
70
  ref_key: "formRef",
58
- ref: _,
71
+ ref: V,
59
72
  layout: "vertical",
60
73
  "initial-values": {
61
- isDefault: !0,
62
74
  viewName: `${e(o)("ap.apView.newView")} ${e(O)().format("YYYY-MM-DD").toString()}`
63
75
  },
64
- onFinish: F
76
+ onFinish: C
65
77
  }, {
66
78
  default: t(() => [
67
- u("div", {
68
- class: m([e(n)("main-content-popover-title-content")])
79
+ f("div", {
80
+ class: r([e(l)("main-content-popover-title-content")])
69
81
  }, [
70
- u("div", {
71
- class: m([e(n)("main-content-popover-title-content-title")])
72
- }, p(e(o)("ap.apView.saveNewView")), 3),
82
+ f("div", {
83
+ class: r([e(l)("main-content-popover-title-content-title")])
84
+ }, s(e(o)("ap.apView.saveNewView")), 3),
73
85
  a(w.FormItem, {
74
86
  name: "isDefault",
75
87
  "value-prop-name": "checked"
@@ -77,7 +89,7 @@ const le = /* @__PURE__ */ $({
77
89
  default: t(() => [
78
90
  a(e(B), null, {
79
91
  default: t(() => [
80
- v(p(e(o)("ap.apView.setDefault")), 1)
92
+ v(s(e(o)("ap.apView.setDefault")), 1)
81
93
  ]),
82
94
  _: 1
83
95
  })
@@ -100,27 +112,27 @@ const le = /* @__PURE__ */ $({
100
112
  _: 1
101
113
  }, 8, ["label", "rules"]),
102
114
  a(w.FormItem, {
103
- class: m([e(n)("main-content-popover-btn")])
115
+ class: r([e(l)("main-content-popover-btn")])
104
116
  }, {
105
117
  default: t(() => [
106
118
  a(e(N), { size: 8 }, {
107
119
  default: t(() => [
108
- a(e(h), {
120
+ a(e(F), {
109
121
  size: "small",
110
- onClick: i[0] || (i[0] = (d) => r.value = !1)
122
+ onClick: i[0] || (i[0] = (m) => c.value = !1)
111
123
  }, {
112
124
  default: t(() => [
113
- v(p(e(o)("ap.apView.cancel")), 1)
125
+ v(s(e(o)("ap.apView.cancel")), 1)
114
126
  ]),
115
127
  _: 1
116
128
  }),
117
- a(e(h), {
129
+ a(e(F), {
118
130
  type: "primary",
119
131
  size: "small",
120
132
  "html-type": "submit"
121
133
  }, {
122
134
  default: t(() => [
123
- v(p(e(o)("ap.apView.save")), 1)
135
+ v(s(e(o)("ap.apView.save")), 1)
124
136
  ]),
125
137
  _: 1
126
138
  })
@@ -136,10 +148,10 @@ const le = /* @__PURE__ */ $({
136
148
  ], 2)
137
149
  ]),
138
150
  default: t(() => [
139
- u("div", {
140
- class: m({
141
- [e(n)("main-content")]: !0,
142
- [e(n)("main-content-disabled")]: e(f).length >= c.maxViewNum + 1
151
+ f("div", {
152
+ class: r({
153
+ [e(l)("main-content")]: !0,
154
+ [e(l)("main-content-disabled")]: e(u).length >= d.maxViewNum + 1
143
155
  })
144
156
  }, [
145
157
  a(e(q), { placement: "bottom" }, K({
@@ -147,19 +159,19 @@ const le = /* @__PURE__ */ $({
147
159
  a(e(N), { size: 4 }, {
148
160
  default: t(() => [
149
161
  a(L, {
150
- class: m([e(n)("icon")])
162
+ class: r([e(l)("icon")])
151
163
  }, null, 8, ["class"]),
152
- u("div", null, p(e(o)("ap.apView.saveView")), 1)
164
+ f("div", null, s(e(o)("ap.apView.saveView")), 1)
153
165
  ]),
154
166
  _: 1
155
167
  })
156
168
  ]),
157
169
  _: 2
158
170
  }, [
159
- e(f).length >= c.maxViewNum + 1 ? {
171
+ e(u).length >= d.maxViewNum + 1 ? {
160
172
  name: "title",
161
173
  fn: t(() => [
162
- v(p(e(o)("ap.apView.maxTip")), 1)
174
+ v(s(e(o)("ap.apView.maxTip")), 1)
163
175
  ]),
164
176
  key: "0"
165
177
  } : void 0
@@ -171,5 +183,5 @@ const le = /* @__PURE__ */ $({
171
183
  }
172
184
  });
173
185
  export {
174
- le as default
186
+ re as default
175
187
  };