@aplus-frontend/ui 6.26.1 → 6.26.3

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 (438) hide show
  1. package/es/src/ag-grid/components/header-cell/index.vue2.mjs +26 -29
  2. package/es/src/ag-grid/hooks/use-columns-def.mjs +69 -72
  3. package/es/src/ag-grid/hooks/use-columns.mjs +11 -13
  4. package/es/src/ag-grid/hooks/use-row-selection.mjs +43 -43
  5. package/es/src/ag-grid/hooks/use-search-form.mjs +33 -36
  6. package/es/src/ag-grid/index.vue.mjs +251 -268
  7. package/es/src/ag-grid/interface.d.ts +4 -0
  8. package/es/src/ag-grid/renderer/checkbox.mjs +4 -5
  9. package/es/src/ag-grid/renderer/date-range.mjs +11 -12
  10. package/es/src/ag-grid/renderer/date.mjs +12 -13
  11. package/es/src/ag-grid/renderer/radio.mjs +9 -10
  12. package/es/src/ag-grid/renderer/select.mjs +10 -17
  13. package/es/src/ag-grid/renderer/tree-select.mjs +8 -10
  14. package/es/src/ap-action/item/index.vue2.mjs +19 -20
  15. package/es/src/ap-action/item-dropdown/index.vue.mjs +23 -24
  16. package/es/src/ap-action/item-modal/index.vue.mjs +15 -16
  17. package/es/src/ap-action/item-popconfirm/index.vue.mjs +17 -18
  18. package/es/src/ap-button/ap-confirm-button.vue.mjs +18 -19
  19. package/es/src/ap-button/utils/index.mjs +27 -28
  20. package/es/src/ap-descriptions/ap-descriptions.vue.mjs +78 -86
  21. package/es/src/ap-descriptions/formatter/index.mjs +60 -61
  22. package/es/src/ap-descriptions/helper.mjs +6 -6
  23. package/es/src/ap-download/ap-download.vue.mjs +42 -46
  24. package/es/src/ap-download/hooks/index.mjs +13 -13
  25. package/es/src/ap-download/utils/getFileInfo.mjs +21 -21
  26. package/es/src/ap-drawer/utils/createDrawer.mjs +43 -52
  27. package/es/src/ap-field/checkbox/index.vue.mjs +31 -34
  28. package/es/src/ap-field/checkbox/read.vue2.mjs +11 -14
  29. package/es/src/ap-field/date/index.vue.mjs +66 -68
  30. package/es/src/ap-field/date-range/index.vue.mjs +99 -107
  31. package/es/src/ap-field/date-range/read.vue2.mjs +28 -32
  32. package/es/src/ap-field/hooks/use-date-timezone.mjs +1 -4
  33. package/es/src/ap-field/hooks/use-default-presets.mjs +18 -24
  34. package/es/src/ap-field/hooks/use-options.mjs +11 -11
  35. package/es/src/ap-field/number/helper.mjs +17 -17
  36. package/es/src/ap-field/number/index.vue.mjs +2 -4
  37. package/es/src/ap-field/radio/index.vue.mjs +38 -42
  38. package/es/src/ap-field/radio/read.vue2.mjs +12 -13
  39. package/es/src/ap-field/rate/index.vue.mjs +23 -25
  40. package/es/src/ap-field/segmented/index.vue.mjs +38 -39
  41. package/es/src/ap-field/select/index.vue.mjs +90 -107
  42. package/es/src/ap-field/select/read.vue2.mjs +13 -20
  43. package/es/src/ap-field/select/use-select-options.mjs +24 -25
  44. package/es/src/ap-field/slider/index.vue.mjs +28 -30
  45. package/es/src/ap-field/switch/index.vue.mjs +38 -39
  46. package/es/src/ap-field/text/index.vue2.mjs +43 -52
  47. package/es/src/ap-field/text/password.vue.mjs +20 -22
  48. package/es/src/ap-field/text-area/index.vue.mjs +25 -31
  49. package/es/src/ap-field/tree-select/index.vue.mjs +61 -65
  50. package/es/src/ap-field/tree-select/read.vue2.mjs +26 -28
  51. package/es/src/ap-field/tree-select/use-request.mjs +40 -41
  52. package/es/src/ap-form/ap-form.vue2.mjs +127 -142
  53. package/es/src/ap-form/drawer-form/index.vue.d.ts +3 -3
  54. package/es/src/ap-form/drawer-form/index.vue.mjs +109 -146
  55. package/es/src/ap-form/hooks/use-watch.mjs +25 -26
  56. package/es/src/ap-form/item/index.vue.mjs +76 -81
  57. package/es/src/ap-form/item-group/index.vue.mjs +20 -20
  58. package/es/src/ap-form/items/date/index.vue.mjs +18 -21
  59. package/es/src/ap-form/items/date-range/index.vue.mjs +24 -27
  60. package/es/src/ap-form/items/number/index.vue.d.ts +3 -3
  61. package/es/src/ap-form/items/number/index.vue.mjs +2 -4
  62. package/es/src/ap-form/items/radio/index.vue.mjs +8 -10
  63. package/es/src/ap-form/items/select/index.vue.d.ts +7 -7
  64. package/es/src/ap-form/items/select/index.vue.mjs +30 -36
  65. package/es/src/ap-form/items/text/index.vue2.mjs +20 -27
  66. package/es/src/ap-form/items/text/password.vue.mjs +12 -14
  67. package/es/src/ap-form/items/text-area/index.vue.mjs +18 -23
  68. package/es/src/ap-form/items/tree-select/index.vue.d.ts +3 -3
  69. package/es/src/ap-form/items/tree-select/index.vue.mjs +28 -34
  70. package/es/src/ap-form/list/index.vue.mjs +26 -26
  71. package/es/src/ap-form/modal-form/index.vue.d.ts +3 -3
  72. package/es/src/ap-form/modal-form/index.vue.mjs +98 -130
  73. package/es/src/ap-form/provider/index.vue.mjs +24 -24
  74. package/es/src/ap-form/search-form/components/popover-filter.vue2.mjs +9 -9
  75. package/es/src/ap-form/search-form/hooks/use-collapse-input-count.mjs +23 -24
  76. package/es/src/ap-form/search-form/hooks/use-sorter.mjs +25 -26
  77. package/es/src/ap-form/search-form/index.vue.d.ts +3 -3
  78. package/es/src/ap-form/search-form/index.vue.mjs +96 -103
  79. package/es/src/ap-form/search-form/utils.mjs +17 -17
  80. package/es/src/ap-form/set/index.vue.mjs +16 -20
  81. package/es/src/ap-form/utils/get.mjs +11 -11
  82. package/es/src/ap-grid/editable/form-item.vue.mjs +85 -92
  83. package/es/src/ap-grid/editable/index.vue.mjs +102 -116
  84. package/es/src/ap-grid/hooks/use-editable-columns.mjs +40 -43
  85. package/es/src/ap-grid/hooks/use-inner-params.mjs +15 -15
  86. package/es/src/ap-grid/hooks/use-row-selection.mjs +76 -76
  87. package/es/src/ap-grid/index.vue.mjs +309 -334
  88. package/es/src/ap-grid/utils/col.mjs +78 -81
  89. package/es/src/ap-grid/utils/editable.mjs +17 -18
  90. package/es/src/ap-grid/utils/renderer.mjs +7 -11
  91. package/es/src/ap-grid/utils/table.mjs +45 -46
  92. package/es/src/ap-grid/utils/to-tree-array.mjs +9 -10
  93. package/es/src/ap-list/hooks/use-offline-list.mjs +16 -17
  94. package/es/src/ap-list/index.vue.mjs +120 -131
  95. package/es/src/ap-modal/utils/createModal.mjs +60 -67
  96. package/es/src/ap-modal/utils/createModalStream.mjs +65 -73
  97. package/es/src/ap-modal/utils/methods.mjs +17 -22
  98. package/es/src/ap-modal/utils/util.mjs +1 -1
  99. package/es/src/ap-pro-card/components/card/index.vue2.mjs +114 -127
  100. package/es/src/ap-pro-card/components/statistic/index.vue2.mjs +34 -52
  101. package/es/src/ap-pro-card/components/statistic-card/index.vue.d.ts +3 -1
  102. package/es/src/ap-pro-card/components/statistic-card/index.vue2.mjs +47 -57
  103. package/es/src/ap-table/ap-table.vue2.mjs +270 -303
  104. package/es/src/ap-table/components/paragraph-ellipsis/index.vue2.mjs +54 -60
  105. package/es/src/ap-table/components/setting/modal/index.vue2.mjs +56 -57
  106. package/es/src/ap-table/components/setting/select-group/index.vue2.mjs +61 -70
  107. package/es/src/ap-table/components/setting/sortable/index.vue2.mjs +35 -38
  108. package/es/src/ap-table/components/setting/sortable/item.vue2.mjs +104 -109
  109. package/es/src/ap-table/components/setting/sorter/index.vue2.mjs +37 -39
  110. package/es/src/ap-table/components/setting/tree-select/index.vue2.mjs +51 -57
  111. package/es/src/ap-table/components/setting/utils.mjs +44 -46
  112. package/es/src/ap-table/constants.d.ts +6 -6
  113. package/es/src/ap-table/hooks/use-sticky-scroll.mjs +7 -10
  114. package/es/src/ap-table/hooks/use-table-column-state.mjs +76 -79
  115. package/es/src/ap-table/hooks/use-table-content-height.mjs +20 -22
  116. package/es/src/ap-table/hooks/use-table-paging-ng.mjs +172 -178
  117. package/es/src/ap-table/hooks/use-table-paging.mjs +129 -134
  118. package/es/src/ap-table/utils.mjs +123 -130
  119. package/es/src/ap-upload/apUpload.vue.mjs +43 -46
  120. package/es/src/ap-upload/components/MultipleFile.vue2.mjs +92 -94
  121. package/es/src/ap-upload/components/Picture.vue2.mjs +145 -151
  122. package/es/src/ap-upload/components/SingleFile.vue2.mjs +144 -148
  123. package/es/src/ap-upload/hooks/useOss.mjs +35 -35
  124. package/es/src/ap-upload/utils/accept.mjs +37 -38
  125. package/es/src/ap-upload/utils/returnData.mjs +14 -14
  126. package/es/src/business/ap-appendix/ap-appendix.vue2.mjs +85 -89
  127. package/es/src/business/ap-appendix/utils/index.mjs +13 -13
  128. package/es/src/business/ap-attachment/ApAttachment.mjs +80 -87
  129. package/es/src/business/ap-batch-action/ApBatchAction.vue2.mjs +35 -42
  130. package/es/src/business/ap-batch-action-group/ApBatchActionGroup.vue2.mjs +59 -74
  131. package/es/src/business/ap-batch-action-group/MenuItemGroup.vue2.mjs +25 -27
  132. package/es/src/business/ap-batch-action-group/index.d.ts +6 -0
  133. package/es/src/business/ap-button-group/ApButtonGroup.vue2.mjs +28 -28
  134. package/es/src/business/ap-card/ApCard.vue2.mjs +40 -52
  135. package/es/src/business/ap-copy/ApCopy.mjs +38 -39
  136. package/es/src/business/ap-draggable-grid/ApDraggableGrid.vue2.mjs +118 -112
  137. package/es/src/business/ap-export-group/ApExportGroup.vue2.mjs +138 -151
  138. package/es/src/business/ap-export-group/convertExportField.mjs +9 -10
  139. package/es/src/business/ap-export-group/handleExportDownload.mjs +8 -8
  140. package/es/src/business/ap-image/ApImage.vue2.mjs +57 -62
  141. package/es/src/business/ap-image/hooks/useOss.mjs +26 -26
  142. package/es/src/business/ap-input-radio/ApInputRadio.vue2.mjs +31 -34
  143. package/es/src/business/ap-keep-alive/hook.mjs +14 -20
  144. package/es/src/business/ap-keep-alive/keep-alive.mjs +88 -93
  145. package/es/src/business/ap-keep-alive/keeper/ap-form-keeper.mjs +10 -12
  146. package/es/src/business/ap-keep-alive/keeper/ap-grid-keeper.mjs +10 -12
  147. package/es/src/business/ap-keep-alive/keeper/ap-list-keeper.mjs +8 -10
  148. package/es/src/business/ap-keep-alive/keeper/ap-radio-group-keeper.mjs +5 -6
  149. package/es/src/business/ap-keep-alive/keeper/ap-search-form-keeper.mjs +8 -10
  150. package/es/src/business/ap-keep-alive/keeper/ap-table-keeper.mjs +8 -10
  151. package/es/src/business/ap-keep-alive/keeper/ap-view-keeper.mjs +4 -5
  152. package/es/src/business/ap-keep-alive/keeper/edit-grid-keeper.mjs +8 -10
  153. package/es/src/business/ap-keep-alive/keeper/edit-table-keeper.mjs +8 -10
  154. package/es/src/business/ap-keep-alive/keeper/step-keeper.mjs +5 -6
  155. package/es/src/business/ap-keep-alive/keeper/tab-keeper.mjs +5 -6
  156. package/es/src/business/ap-keep-alive/utils.mjs +25 -26
  157. package/es/src/business/ap-ladder/ApLadder.mjs +11 -14
  158. package/es/src/business/ap-radio-group/ap-radio-group.vue2.mjs +39 -45
  159. package/es/src/business/ap-select-layout/select-layout.vue2.mjs +114 -124
  160. package/es/src/business/ap-size-input/ApSizeInput.mjs +46 -49
  161. package/es/src/business/ap-summary/ap-summary.vue2.mjs +43 -44
  162. package/es/src/business/ap-summary/utils.mjs +23 -29
  163. package/es/src/business/ap-table-modal/hooks/use-create-table-modal.mjs +33 -44
  164. package/es/src/business/ap-table-modal/hooks/use-table-select-modal.mjs +23 -23
  165. package/es/src/business/ap-table-modal/table-layout/index.vue2.mjs +27 -30
  166. package/es/src/business/ap-table-modal/table-modal.vue2.mjs +90 -92
  167. package/es/src/business/ap-upload-file/ap-upload-single/ap-upload-single.vue.mjs +170 -183
  168. package/es/src/business/ap-upload-file/hook/useOss.mjs +17 -17
  169. package/es/src/business/ap-upload-file/hook/useProps.mjs +14 -16
  170. package/es/src/business/ap-upload-file/utils/accept.mjs +35 -36
  171. package/es/src/business/ap-upload-file/utils/fileList.mjs +10 -12
  172. package/es/src/business/ap-upload-file/utils/upload.mjs +40 -40
  173. package/es/src/business/ap-value-select-card/index.vue2.mjs +122 -119
  174. package/es/src/business/ap-value-select-card/utils.mjs +1 -1
  175. package/es/src/business/ap-view/ap-view.vue2.mjs +134 -147
  176. package/es/src/business/ap-view/components/main-button-content.vue.d.ts +2 -2
  177. package/es/src/business/ap-view/components/main-button-content.vue2.mjs +90 -94
  178. package/es/src/business/ap-view/components/menu-list-content.vue.d.ts +2 -2
  179. package/es/src/business/ap-view/components/menu-list-content.vue2.mjs +126 -135
  180. package/es/src/business/batch-input-group/form-item.vue.mjs +43 -51
  181. package/es/src/business/batch-input-group/index.vue.mjs +113 -127
  182. package/es/src/business/batch-input-group/popover-input/index.vue2.mjs +40 -42
  183. package/es/src/business/hooks/useGridRefresh.mjs +11 -12
  184. package/es/src/business/hooks/useKeepAliveFlag.mjs +4 -4
  185. package/es/src/business/hooks/usePageListAgGrid.mjs +43 -48
  186. package/es/src/business/hooks/usePageListApGrid.mjs +48 -53
  187. package/es/src/business/hooks/usePageListApTable.mjs +27 -32
  188. package/es/src/business/hooks/useTableRefresh.mjs +39 -41
  189. package/es/src/check-card/index.vue2.mjs +51 -56
  190. package/es/src/config-provider/config-provider.mjs +12 -12
  191. package/es/src/config-provider/hooks/use-global-config.mjs +20 -23
  192. package/es/src/config-provider/hooks/use-locale.mjs +17 -17
  193. package/es/src/editable-table/form-item.vue.mjs +82 -88
  194. package/es/src/editable-table/hooks/use-get-columns.mjs +40 -43
  195. package/es/src/editable-table/index.vue.mjs +100 -113
  196. package/es/src/editable-table/utils.mjs +88 -95
  197. package/es/src/hooks/useControllableValue.mjs +18 -18
  198. package/es/src/hooks/useResize.mjs +16 -16
  199. package/es/src/mask/index.vue.mjs +11 -11
  200. package/es/src/resize-observer/index.vue.mjs +20 -22
  201. package/es/src/scroll-bar/index.vue.mjs +2 -8
  202. package/es/src/scroll-bar/internal.vue.mjs +59 -65
  203. package/es/src/scroll-view/hooks/use-scroll-wrapper.mjs +23 -25
  204. package/es/src/scroll-view/index.vue.mjs +40 -42
  205. package/es/src/splitter/Splitter.vue2.mjs +48 -52
  206. package/es/src/splitter/hooks/useItems.mjs +14 -15
  207. package/es/src/splitter/hooks/useResize.mjs +31 -34
  208. package/es/src/splitter/hooks/useSizes.mjs +34 -34
  209. package/es/src/text/index.vue.mjs +24 -24
  210. package/es/src/utils/config-provider-preset.mjs +17 -21
  211. package/es/src/utils/copy.mjs +9 -9
  212. package/es/src/utils/index.mjs +43 -43
  213. package/es/src/version.d.ts +1 -1
  214. package/es/src/version.mjs +1 -1
  215. package/es/src/work-order-modal/createWorkOrder.mjs +17 -18
  216. package/es/src/work-order-modal/work-order-modal.vue.d.ts +2 -2
  217. package/es/src/work-order-modal/work-order-modal.vue.mjs +109 -123
  218. package/lib/src/ag-grid/components/header-cell/index.vue2.js +1 -1
  219. package/lib/src/ag-grid/hooks/use-columns-def.js +1 -1
  220. package/lib/src/ag-grid/hooks/use-columns.js +1 -1
  221. package/lib/src/ag-grid/hooks/use-row-selection.js +1 -1
  222. package/lib/src/ag-grid/hooks/use-search-form.js +1 -1
  223. package/lib/src/ag-grid/index.vue.js +1 -1
  224. package/lib/src/ag-grid/interface.d.ts +4 -0
  225. package/lib/src/ag-grid/renderer/checkbox.js +1 -1
  226. package/lib/src/ag-grid/renderer/date-range.js +1 -1
  227. package/lib/src/ag-grid/renderer/date.js +1 -1
  228. package/lib/src/ag-grid/renderer/radio.js +1 -1
  229. package/lib/src/ag-grid/renderer/select.js +1 -1
  230. package/lib/src/ag-grid/renderer/tree-select.js +1 -1
  231. package/lib/src/ap-action/item/index.vue2.js +1 -1
  232. package/lib/src/ap-action/item-dropdown/index.vue.js +1 -1
  233. package/lib/src/ap-action/item-modal/index.vue.js +1 -1
  234. package/lib/src/ap-action/item-popconfirm/index.vue.js +1 -1
  235. package/lib/src/ap-button/ap-confirm-button.vue.js +1 -1
  236. package/lib/src/ap-button/utils/index.js +1 -1
  237. package/lib/src/ap-descriptions/ap-descriptions.vue.js +1 -1
  238. package/lib/src/ap-descriptions/formatter/index.js +1 -1
  239. package/lib/src/ap-descriptions/helper.js +1 -1
  240. package/lib/src/ap-download/ap-download.vue.js +1 -1
  241. package/lib/src/ap-download/hooks/index.js +1 -1
  242. package/lib/src/ap-download/utils/getFileInfo.js +1 -1
  243. package/lib/src/ap-drawer/utils/createDrawer.js +1 -1
  244. package/lib/src/ap-field/checkbox/index.vue.js +1 -1
  245. package/lib/src/ap-field/checkbox/read.vue2.js +1 -1
  246. package/lib/src/ap-field/date/index.vue.js +1 -1
  247. package/lib/src/ap-field/date-range/index.vue.js +1 -1
  248. package/lib/src/ap-field/date-range/read.vue2.js +1 -1
  249. package/lib/src/ap-field/hooks/use-date-timezone.js +1 -1
  250. package/lib/src/ap-field/hooks/use-default-presets.js +1 -1
  251. package/lib/src/ap-field/hooks/use-options.js +1 -1
  252. package/lib/src/ap-field/number/helper.js +1 -1
  253. package/lib/src/ap-field/number/index.vue.js +1 -1
  254. package/lib/src/ap-field/radio/index.vue.js +1 -1
  255. package/lib/src/ap-field/radio/read.vue2.js +1 -1
  256. package/lib/src/ap-field/rate/index.vue.js +1 -1
  257. package/lib/src/ap-field/segmented/index.vue.js +1 -1
  258. package/lib/src/ap-field/select/index.vue.js +1 -1
  259. package/lib/src/ap-field/select/read.vue2.js +1 -1
  260. package/lib/src/ap-field/select/use-select-options.js +1 -1
  261. package/lib/src/ap-field/slider/index.vue.js +1 -1
  262. package/lib/src/ap-field/switch/index.vue.js +1 -1
  263. package/lib/src/ap-field/text/index.vue2.js +1 -1
  264. package/lib/src/ap-field/text/password.vue.js +1 -1
  265. package/lib/src/ap-field/text-area/index.vue.js +1 -1
  266. package/lib/src/ap-field/tree-select/index.vue.js +1 -1
  267. package/lib/src/ap-field/tree-select/read.vue2.js +1 -1
  268. package/lib/src/ap-field/tree-select/use-request.js +1 -1
  269. package/lib/src/ap-form/ap-form.vue2.js +1 -1
  270. package/lib/src/ap-form/drawer-form/index.vue.d.ts +3 -3
  271. package/lib/src/ap-form/drawer-form/index.vue.js +1 -1
  272. package/lib/src/ap-form/hooks/use-watch.js +1 -1
  273. package/lib/src/ap-form/item/index.vue.js +1 -1
  274. package/lib/src/ap-form/item-group/index.vue.js +1 -1
  275. package/lib/src/ap-form/items/date/index.vue.js +1 -1
  276. package/lib/src/ap-form/items/date-range/index.vue.js +1 -1
  277. package/lib/src/ap-form/items/number/index.vue.d.ts +3 -3
  278. package/lib/src/ap-form/items/number/index.vue.js +1 -1
  279. package/lib/src/ap-form/items/radio/index.vue.js +1 -1
  280. package/lib/src/ap-form/items/select/index.vue.d.ts +7 -7
  281. package/lib/src/ap-form/items/select/index.vue.js +1 -1
  282. package/lib/src/ap-form/items/text/index.vue2.js +1 -1
  283. package/lib/src/ap-form/items/text/password.vue.js +1 -1
  284. package/lib/src/ap-form/items/text-area/index.vue.js +1 -1
  285. package/lib/src/ap-form/items/tree-select/index.vue.d.ts +3 -3
  286. package/lib/src/ap-form/items/tree-select/index.vue.js +1 -1
  287. package/lib/src/ap-form/list/index.vue.js +1 -1
  288. package/lib/src/ap-form/modal-form/index.vue.d.ts +3 -3
  289. package/lib/src/ap-form/modal-form/index.vue.js +1 -1
  290. package/lib/src/ap-form/provider/index.vue.js +1 -1
  291. package/lib/src/ap-form/search-form/components/popover-filter.vue2.js +1 -1
  292. package/lib/src/ap-form/search-form/hooks/use-collapse-input-count.js +1 -1
  293. package/lib/src/ap-form/search-form/hooks/use-sorter.js +1 -1
  294. package/lib/src/ap-form/search-form/index.vue.d.ts +3 -3
  295. package/lib/src/ap-form/search-form/index.vue.js +1 -1
  296. package/lib/src/ap-form/search-form/utils.js +1 -1
  297. package/lib/src/ap-form/set/index.vue.js +1 -1
  298. package/lib/src/ap-form/utils/get.js +1 -1
  299. package/lib/src/ap-grid/editable/form-item.vue.js +1 -1
  300. package/lib/src/ap-grid/editable/index.vue.js +1 -1
  301. package/lib/src/ap-grid/hooks/use-editable-columns.js +1 -1
  302. package/lib/src/ap-grid/hooks/use-inner-params.js +1 -1
  303. package/lib/src/ap-grid/hooks/use-row-selection.js +1 -1
  304. package/lib/src/ap-grid/index.vue.js +1 -1
  305. package/lib/src/ap-grid/utils/col.js +1 -1
  306. package/lib/src/ap-grid/utils/editable.js +1 -1
  307. package/lib/src/ap-grid/utils/renderer.js +1 -1
  308. package/lib/src/ap-grid/utils/table.js +1 -1
  309. package/lib/src/ap-grid/utils/to-tree-array.js +1 -1
  310. package/lib/src/ap-list/hooks/use-offline-list.js +1 -1
  311. package/lib/src/ap-list/index.vue.js +1 -1
  312. package/lib/src/ap-modal/utils/createModal.js +1 -1
  313. package/lib/src/ap-modal/utils/createModalStream.js +1 -1
  314. package/lib/src/ap-modal/utils/methods.js +1 -1
  315. package/lib/src/ap-modal/utils/util.js +1 -1
  316. package/lib/src/ap-pro-card/components/card/index.vue2.js +1 -1
  317. package/lib/src/ap-pro-card/components/statistic/index.vue2.js +1 -1
  318. package/lib/src/ap-pro-card/components/statistic-card/index.vue.d.ts +3 -1
  319. package/lib/src/ap-pro-card/components/statistic-card/index.vue2.js +1 -1
  320. package/lib/src/ap-table/ap-table.vue2.js +1 -1
  321. package/lib/src/ap-table/components/paragraph-ellipsis/index.vue2.js +1 -1
  322. package/lib/src/ap-table/components/setting/modal/index.vue2.js +1 -1
  323. package/lib/src/ap-table/components/setting/select-group/index.vue2.js +1 -1
  324. package/lib/src/ap-table/components/setting/sortable/index.vue2.js +1 -1
  325. package/lib/src/ap-table/components/setting/sortable/item.vue2.js +1 -1
  326. package/lib/src/ap-table/components/setting/sorter/index.vue2.js +1 -1
  327. package/lib/src/ap-table/components/setting/tree-select/index.vue2.js +1 -1
  328. package/lib/src/ap-table/components/setting/utils.js +1 -1
  329. package/lib/src/ap-table/constants.d.ts +6 -6
  330. package/lib/src/ap-table/hooks/use-sticky-scroll.js +1 -1
  331. package/lib/src/ap-table/hooks/use-table-column-state.js +1 -1
  332. package/lib/src/ap-table/hooks/use-table-content-height.js +1 -1
  333. package/lib/src/ap-table/hooks/use-table-paging-ng.js +1 -1
  334. package/lib/src/ap-table/hooks/use-table-paging.js +1 -1
  335. package/lib/src/ap-table/utils.js +1 -1
  336. package/lib/src/ap-upload/apUpload.vue.js +1 -1
  337. package/lib/src/ap-upload/components/MultipleFile.vue2.js +1 -1
  338. package/lib/src/ap-upload/components/Picture.vue2.js +1 -1
  339. package/lib/src/ap-upload/components/SingleFile.vue2.js +1 -1
  340. package/lib/src/ap-upload/hooks/useOss.js +1 -1
  341. package/lib/src/ap-upload/utils/accept.js +1 -1
  342. package/lib/src/ap-upload/utils/returnData.js +1 -1
  343. package/lib/src/business/ap-appendix/ap-appendix.vue2.js +1 -1
  344. package/lib/src/business/ap-appendix/utils/index.js +1 -1
  345. package/lib/src/business/ap-attachment/ApAttachment.js +1 -1
  346. package/lib/src/business/ap-batch-action/ApBatchAction.vue2.js +1 -1
  347. package/lib/src/business/ap-batch-action-group/ApBatchActionGroup.vue2.js +1 -1
  348. package/lib/src/business/ap-batch-action-group/MenuItemGroup.vue2.js +1 -1
  349. package/lib/src/business/ap-batch-action-group/index.d.ts +6 -0
  350. package/lib/src/business/ap-button-group/ApButtonGroup.vue2.js +1 -1
  351. package/lib/src/business/ap-card/ApCard.vue2.js +1 -1
  352. package/lib/src/business/ap-copy/ApCopy.js +1 -1
  353. package/lib/src/business/ap-draggable-grid/ApDraggableGrid.vue2.js +1 -1
  354. package/lib/src/business/ap-export-group/ApExportGroup.vue2.js +1 -1
  355. package/lib/src/business/ap-export-group/convertExportField.js +1 -1
  356. package/lib/src/business/ap-export-group/handleExportDownload.js +1 -1
  357. package/lib/src/business/ap-image/ApImage.vue2.js +1 -1
  358. package/lib/src/business/ap-image/hooks/useOss.js +1 -1
  359. package/lib/src/business/ap-input-radio/ApInputRadio.vue2.js +1 -1
  360. package/lib/src/business/ap-keep-alive/hook.js +1 -1
  361. package/lib/src/business/ap-keep-alive/keep-alive.js +1 -1
  362. package/lib/src/business/ap-keep-alive/keeper/ap-form-keeper.js +1 -1
  363. package/lib/src/business/ap-keep-alive/keeper/ap-grid-keeper.js +1 -1
  364. package/lib/src/business/ap-keep-alive/keeper/ap-list-keeper.js +1 -1
  365. package/lib/src/business/ap-keep-alive/keeper/ap-radio-group-keeper.js +1 -1
  366. package/lib/src/business/ap-keep-alive/keeper/ap-search-form-keeper.js +1 -1
  367. package/lib/src/business/ap-keep-alive/keeper/ap-table-keeper.js +1 -1
  368. package/lib/src/business/ap-keep-alive/keeper/ap-view-keeper.js +1 -1
  369. package/lib/src/business/ap-keep-alive/keeper/edit-grid-keeper.js +1 -1
  370. package/lib/src/business/ap-keep-alive/keeper/edit-table-keeper.js +1 -1
  371. package/lib/src/business/ap-keep-alive/keeper/step-keeper.js +1 -1
  372. package/lib/src/business/ap-keep-alive/keeper/tab-keeper.js +1 -1
  373. package/lib/src/business/ap-keep-alive/utils.js +1 -1
  374. package/lib/src/business/ap-ladder/ApLadder.js +1 -1
  375. package/lib/src/business/ap-radio-group/ap-radio-group.vue2.js +1 -1
  376. package/lib/src/business/ap-select-layout/select-layout.vue2.js +1 -1
  377. package/lib/src/business/ap-size-input/ApSizeInput.js +1 -1
  378. package/lib/src/business/ap-summary/ap-summary.vue2.js +1 -1
  379. package/lib/src/business/ap-summary/utils.js +1 -1
  380. package/lib/src/business/ap-table-modal/hooks/use-create-table-modal.js +1 -1
  381. package/lib/src/business/ap-table-modal/hooks/use-table-select-modal.js +1 -1
  382. package/lib/src/business/ap-table-modal/table-layout/index.vue2.js +1 -1
  383. package/lib/src/business/ap-table-modal/table-modal.vue2.js +1 -1
  384. package/lib/src/business/ap-upload-file/ap-upload-single/ap-upload-single.vue.js +1 -1
  385. package/lib/src/business/ap-upload-file/hook/useOss.js +1 -1
  386. package/lib/src/business/ap-upload-file/hook/useProps.js +1 -1
  387. package/lib/src/business/ap-upload-file/utils/accept.js +1 -1
  388. package/lib/src/business/ap-upload-file/utils/fileList.js +1 -1
  389. package/lib/src/business/ap-upload-file/utils/upload.js +1 -1
  390. package/lib/src/business/ap-value-select-card/index.vue2.js +1 -1
  391. package/lib/src/business/ap-value-select-card/utils.js +1 -1
  392. package/lib/src/business/ap-view/ap-view.vue2.js +1 -1
  393. package/lib/src/business/ap-view/components/main-button-content.vue.d.ts +2 -2
  394. package/lib/src/business/ap-view/components/main-button-content.vue2.js +1 -1
  395. package/lib/src/business/ap-view/components/menu-list-content.vue.d.ts +2 -2
  396. package/lib/src/business/ap-view/components/menu-list-content.vue2.js +1 -1
  397. package/lib/src/business/batch-input-group/form-item.vue.js +1 -1
  398. package/lib/src/business/batch-input-group/index.vue.js +2 -2
  399. package/lib/src/business/batch-input-group/popover-input/index.vue2.js +2 -2
  400. package/lib/src/business/hooks/useGridRefresh.js +1 -1
  401. package/lib/src/business/hooks/useKeepAliveFlag.js +1 -1
  402. package/lib/src/business/hooks/usePageListAgGrid.js +1 -1
  403. package/lib/src/business/hooks/usePageListApGrid.js +1 -1
  404. package/lib/src/business/hooks/usePageListApTable.js +1 -1
  405. package/lib/src/business/hooks/useTableRefresh.js +1 -1
  406. package/lib/src/check-card/index.vue2.js +1 -1
  407. package/lib/src/config-provider/config-provider.js +1 -1
  408. package/lib/src/config-provider/hooks/use-global-config.js +1 -1
  409. package/lib/src/config-provider/hooks/use-locale.js +1 -1
  410. package/lib/src/editable-table/form-item.vue.js +1 -1
  411. package/lib/src/editable-table/hooks/use-get-columns.js +1 -1
  412. package/lib/src/editable-table/index.vue.js +1 -1
  413. package/lib/src/editable-table/utils.js +1 -1
  414. package/lib/src/hooks/useControllableValue.js +1 -1
  415. package/lib/src/hooks/useResize.js +1 -1
  416. package/lib/src/mask/index.vue.js +1 -1
  417. package/lib/src/resize-observer/index.vue.js +1 -1
  418. package/lib/src/scroll-bar/index.vue.js +1 -1
  419. package/lib/src/scroll-bar/internal.vue.js +1 -1
  420. package/lib/src/scroll-view/hooks/use-scroll-wrapper.js +1 -1
  421. package/lib/src/scroll-view/index.vue.js +1 -1
  422. package/lib/src/splitter/Splitter.vue2.js +1 -1
  423. package/lib/src/splitter/hooks/useItems.js +1 -1
  424. package/lib/src/splitter/hooks/useResize.js +1 -1
  425. package/lib/src/splitter/hooks/useSizes.js +1 -1
  426. package/lib/src/text/index.vue.js +1 -1
  427. package/lib/src/utils/config-provider-preset.js +1 -1
  428. package/lib/src/utils/copy.js +1 -1
  429. package/lib/src/utils/index.js +1 -1
  430. package/lib/src/version.d.ts +1 -1
  431. package/lib/src/version.js +1 -1
  432. package/lib/src/work-order-modal/createWorkOrder.js +1 -1
  433. package/lib/src/work-order-modal/work-order-modal.vue.d.ts +2 -2
  434. package/lib/src/work-order-modal/work-order-modal.vue.js +1 -1
  435. package/package.json +7 -7
  436. package/theme/ap-draggable-grid/ap-draggable-grid.css +7 -3
  437. package/theme/ap-draggable-grid/ap-draggable-grid.less +5 -3
  438. package/theme/index.css +7 -3
@@ -1,16 +1,16 @@
1
- import { defineComponent as q, useSlots as J, ref as y, watch as C, unref as r, createBlock as Q, openBlock as X, withCtx as h, createVNode as b, mergeProps as Y, createSlots as Z, renderList as M, renderSlot as ee, normalizeProps as te, guardReactiveProps as ae } from "vue";
2
- import { Table as ne } from "@aplus-frontend/antdv";
3
- import { ApForm as x } from "../ap-form/index.mjs";
4
- import { isEqual as oe, isArray as v, isUndefined as le, isNumber as g, cloneDeep as ue, omit as R } from "lodash-unified";
1
+ import { defineComponent as H, useSlots as W, ref as g, watch as v, unref as s, createBlock as $, openBlock as q, withCtx as p, createVNode as y, mergeProps as J, createSlots as Q, renderList as X, renderSlot as Y, normalizeProps as Z, guardReactiveProps as M } from "vue";
2
+ import { Table as ee } from "@aplus-frontend/antdv";
3
+ import { ApForm as m } from "../ap-form/index.mjs";
4
+ import { isEqual as te, isArray as c, isUndefined as ae, isNumber as h, cloneDeep as ne, omit as w } from "lodash-unified";
5
5
  import "../config-provider/index.mjs";
6
6
  import "../hooks/index.mjs";
7
- import { isDef as F } from "../utils/index.mjs";
8
- import { scrollToRowIndex as se } from "./utils.mjs";
9
- import re from "./hooks/use-get-columns.mjs";
10
- import { useNamespace as ie } from "../config-provider/hooks/use-namespace.mjs";
11
- import { useControllableValue as fe } from "../hooks/useControllableValue.mjs";
12
- import { useGlobalConfig as de } from "../config-provider/hooks/use-global-config.mjs";
13
- const Fe = /* @__PURE__ */ q({
7
+ import { isDef as C } from "../utils/index.mjs";
8
+ import { scrollToRowIndex as oe } from "./utils.mjs";
9
+ import le from "./hooks/use-get-columns.mjs";
10
+ import { useNamespace as se } from "../config-provider/hooks/use-namespace.mjs";
11
+ import { useControllableValue as ue } from "../hooks/useControllableValue.mjs";
12
+ import { useGlobalConfig as re } from "../config-provider/hooks/use-global-config.mjs";
13
+ const Ce = /* @__PURE__ */ H({
14
14
  name: "EditableTable",
15
15
  __name: "index",
16
16
  props: {
@@ -44,6 +44,7 @@ const Fe = /* @__PURE__ */ q({
44
44
  },
45
45
  prefixCls: {},
46
46
  rowKey: {
47
+ type: [String, Function],
47
48
  default: "key"
48
49
  },
49
50
  tableLayout: {
@@ -109,149 +110,135 @@ const Fe = /* @__PURE__ */ q({
109
110
  onFieldChange: {}
110
111
  },
111
112
  emits: ["update:value"],
112
- setup(B, {
113
- expose: V,
114
- emit: T
113
+ setup(b, {
114
+ expose: R,
115
+ emit: F
115
116
  }) {
116
- const o = B, {
117
- b: D
118
- } = ie("editable-table"), L = J(), S = T, w = y(), {
119
- value: m,
120
- updateValue: _
121
- } = fe(o, S), i = y(), E = de("valueTypeMap"), c = x.useWatch(o.name, i);
122
- C(() => c.value, (e) => {
123
- var t;
124
- _(e), (t = o.onChange) == null || t.call(o, e);
117
+ const t = b, {
118
+ b: B
119
+ } = se("editable-table"), V = W(), T = F, x = g(), {
120
+ value: i,
121
+ updateValue: S
122
+ } = ue(t, T), u = g(), D = re("valueTypeMap"), d = m.useWatch(t.name, u);
123
+ v(() => d.value, (e) => {
124
+ S(e), t.onChange?.(e);
125
125
  }, {
126
126
  deep: !0,
127
127
  flush: "post"
128
- }), C(m, (e) => {
129
- var t;
130
- e !== r(c) && (oe(e, r(c)) || (t = i.value) == null || t.setFieldValue(o.name, e));
128
+ }), v(i, (e) => {
129
+ e !== s(d) && (te(e, s(d)) || u.value?.setFieldValue(t.name, e));
131
130
  }, {
132
131
  deep: !0
133
132
  });
134
- const N = re(o, E);
135
- function k() {
136
- var e;
137
- (e = i.value) == null || e.resetFields();
133
+ const L = le(t, D);
134
+ function _() {
135
+ u.value?.resetFields();
138
136
  }
139
- function A(e) {
140
- return e ? (v(e) ? e : [e]).map((a) => v(a) ? [o.name, ...a] : [o.name, a]) : void 0;
137
+ function E(e) {
138
+ return e ? (c(e) ? e : [e]).map((n) => c(n) ? [t.name, ...n] : [t.name, n]) : void 0;
141
139
  }
142
- async function z(e, t) {
143
- var n;
144
- const a = await ((n = i.value) == null ? void 0 : n.validateFields(A(e), t));
145
- return a == null ? void 0 : a[o.name];
140
+ async function N(e, l) {
141
+ return (await u.value?.validateFields(E(e), l))?.[t.name];
146
142
  }
147
- function I(e, t) {
148
- var l, u, s;
149
- const a = ((l = r(m)) == null ? void 0 : l.length) || 0;
150
- if (F(o.maxLength) && a >= o.maxLength)
143
+ function k(e, l) {
144
+ const n = s(i)?.length || 0;
145
+ if (C(t.maxLength) && n >= t.maxLength)
151
146
  return;
152
- const n = {
147
+ const a = {
153
148
  ...e || {}
154
149
  };
155
- (s = (u = i.value) == null ? void 0 : u.setFieldValue) == null || s.call(u, o.name, n, !0, (f, d) => {
156
- if (!f[d]) {
157
- f[d] = [n];
150
+ u.value?.setFieldValue?.(t.name, a, !0, (o, r) => {
151
+ if (!o[r]) {
152
+ o[r] = [a];
158
153
  return;
159
154
  }
160
- le(t) ? f[d].push(n) : f[d].splice(t, 0, n);
155
+ ae(l) ? o[r].push(a) : o[r].splice(l, 0, a);
161
156
  });
162
157
  }
163
- function K(e, t = "suffix") {
164
- var u, s, f;
165
- const a = ((u = r(m)) == null ? void 0 : u.length) || 0, n = g(e) ? e : e.length;
166
- if (F(o.maxLength) && a + n > o.maxLength)
158
+ function A(e, l = "suffix") {
159
+ const n = s(i)?.length || 0, a = h(e) ? e : e.length;
160
+ if (C(t.maxLength) && n + a > t.maxLength)
167
161
  return;
168
- const l = g(e) ? new Array(e).fill(0).map(() => ({})) : ue(e);
169
- (f = (s = i.value) == null ? void 0 : s.setFieldValue) == null || f.call(s, o.name, l, !0, (d, p) => {
170
- if (!d[p]) {
171
- d[p] = [...l];
162
+ const o = h(e) ? new Array(e).fill(0).map(() => ({})) : ne(e);
163
+ u.value?.setFieldValue?.(t.name, o, !0, (r, f) => {
164
+ if (!r[f]) {
165
+ r[f] = [...o];
172
166
  return;
173
167
  }
174
- t === "suffix" ? d[p].push(...l) : d[p].unshift(...l);
168
+ l === "suffix" ? r[f].push(...o) : r[f].unshift(...o);
175
169
  });
176
170
  }
177
- function P(e) {
178
- var a, n;
179
- const t = new Set(g(e) ? [e] : e);
180
- (n = (a = i.value) == null ? void 0 : a.setFieldValue) == null || n.call(a, o.name, void 0, !0, (l, u) => {
181
- l[u] = l[u].filter((s, f) => !t.has(f));
171
+ function z(e) {
172
+ const l = new Set(h(e) ? [e] : e);
173
+ u.value?.setFieldValue?.(t.name, void 0, !0, (n, a) => {
174
+ n[a] = n[a].filter((o, r) => !l.has(r));
182
175
  });
183
176
  }
184
- function j(e) {
185
- var a, n;
186
- const t = new Set(v(e) ? e : [e]);
187
- t.size !== 0 && ((n = (a = i.value) == null ? void 0 : a.setFieldValue) == null || n.call(a, o.name, void 0, !0, (l, u) => {
188
- l[u] = l[u].filter((s) => !t.has(s[o.rowKey]));
189
- }));
177
+ function I(e) {
178
+ const l = new Set(c(e) ? e : [e]);
179
+ l.size !== 0 && u.value?.setFieldValue?.(t.name, void 0, !0, (n, a) => {
180
+ n[a] = n[a].filter((o) => !l.has(o[t.rowKey]));
181
+ });
190
182
  }
191
- function O() {
192
- return r(m);
183
+ function K() {
184
+ return s(i);
193
185
  }
194
- function U(e) {
195
- var t;
196
- (t = i.value) == null || t.setFieldValue(o.name, e);
186
+ function P(e) {
187
+ u.value?.setFieldValue(t.name, e);
197
188
  }
198
- function G(e) {
199
- var t;
200
- return (t = r(m)) == null ? void 0 : t[e];
189
+ function j(e) {
190
+ return s(i)?.[e];
201
191
  }
202
- function H(e, t, a = !0) {
203
- var n, l;
204
- (l = (n = i.value) == null ? void 0 : n.setFieldValue) == null || l.call(n, o.name, void 0, !0, (u, s) => {
205
- !u[s] || !u[s][e] || (u[s][e] = {
206
- ...a ? u[s][e] : {},
207
- ...t
192
+ function O(e, l, n = !0) {
193
+ u.value?.setFieldValue?.(t.name, void 0, !0, (a, o) => {
194
+ !a[o] || !a[o][e] || (a[o][e] = {
195
+ ...n ? a[o][e] : {},
196
+ ...l
208
197
  });
209
198
  });
210
199
  }
211
- function W(e, t) {
212
- var n;
213
- const a = e === "end" ? m.value.length - 1 : e;
214
- se(a, (n = w.value) == null ? void 0 : n.$el, t);
200
+ function U(e, l) {
201
+ const n = e === "end" ? i.value.length - 1 : e;
202
+ oe(n, x.value?.$el, l);
215
203
  }
216
- function $() {
217
- var e, t;
218
- (t = (e = i.value) == null ? void 0 : e.setFieldValue) == null || t.call(e, o.name, []);
204
+ function G() {
205
+ u.value?.setFieldValue?.(t.name, []);
219
206
  }
220
- return V({
221
- resetFields: k,
222
- validateFields: z,
223
- add: I,
224
- remove: P,
225
- getRowData: G,
226
- getRowsData: O,
227
- setRowData: H,
228
- addMultiple: K,
229
- scrollTo: W,
230
- clear: $,
231
- setTableData: U,
232
- removeByKey: j
233
- }), (e, t) => (X(), Q(r(x), {
207
+ return R({
208
+ resetFields: _,
209
+ validateFields: N,
210
+ add: k,
211
+ remove: z,
212
+ getRowData: j,
213
+ getRowsData: K,
214
+ setRowData: O,
215
+ addMultiple: A,
216
+ scrollTo: U,
217
+ clear: G,
218
+ setTableData: P,
219
+ removeByKey: I
220
+ }), (e, l) => (q(), $(s(m), {
234
221
  ref_key: "formRef",
235
- ref: i,
222
+ ref: u,
236
223
  "initial-values": {
237
- [o.name]: r(m)
224
+ [t.name]: s(i)
238
225
  }
239
226
  }, {
240
- default: h(() => [b(r(x).FormItem, {
227
+ default: p(() => [y(s(m).FormItem, {
241
228
  name: e.name,
242
229
  "no-style": ""
243
230
  }, {
244
- default: h(() => [b(r(ne), Y(r(R)(o, ["name", "value", "onUpdate:value", "maxLength", "onChange"]), {
231
+ default: p(() => [y(s(ee), J(s(w)(t, ["name", "value", "onUpdate:value", "maxLength", "onChange"]), {
245
232
  ref_key: "tableRef",
246
- ref: w,
247
- class: r(D)(),
248
- columns: r(N),
249
- "data-source": r(m)
250
- }), Z({
233
+ ref: x,
234
+ class: s(B)(),
235
+ columns: s(L),
236
+ "data-source": s(i)
237
+ }), Q({
251
238
  _: 2
252
- }, [M(r(R)(L, ["headerCell"]), (a, n) => ({
253
- name: n,
254
- fn: h((l) => [ee(e.$slots, n, te(ae(l || {})))])
239
+ }, [X(s(w)(V, ["headerCell"]), (n, a) => ({
240
+ name: a,
241
+ fn: p((o) => [Y(e.$slots, a, Z(M(o || {})))])
255
242
  }))]), 1040, ["class", "columns", "data-source"])]),
256
243
  _: 3
257
244
  }, 8, ["name"])]),
@@ -260,5 +247,5 @@ const Fe = /* @__PURE__ */ q({
260
247
  }
261
248
  });
262
249
  export {
263
- Fe as default
250
+ Ce as default
264
251
  };
@@ -1,136 +1,129 @@
1
- import { isVNode as I, createVNode as s, mergeProps as S, createTextVNode as F, Fragment as q } from "vue";
2
- import { isFunction as T, isArray as h, isBoolean as w, omit as P, isString as V } from "lodash-unified";
3
- import { apTableFormItemMap as C, noRenderAsFormItemValueList as N, apTableRenderItemMap as j } from "../ap-table/constants.mjs";
4
- import { isDef as v } from "../utils/index.mjs";
5
- import { getValueStr as A } from "../ap-field/number/helper.mjs";
6
- import R from "scroll-into-view-if-needed";
7
- import { Typography as O, Tooltip as W } from "@aplus-frontend/antdv";
1
+ import { isVNode as C, createVNode as i, mergeProps as R, createTextVNode as h, Fragment as I } from "vue";
2
+ import { isFunction as c, isArray as T, isBoolean as S, omit as F, isString as x } from "lodash-unified";
3
+ import { apTableFormItemMap as q, noRenderAsFormItemValueList as w, apTableRenderItemMap as P } from "../ap-table/constants.mjs";
4
+ import { isDef as V } from "../utils/index.mjs";
5
+ import { getValueStr as N } from "../ap-field/number/helper.mjs";
6
+ import j from "scroll-into-view-if-needed";
7
+ import { Typography as v, Tooltip as A } from "@aplus-frontend/antdv";
8
8
  import "../ap-form/index.mjs";
9
- import { objectToString as _, getTableRenderType as k } from "../ap-table/utils.mjs";
10
- import { QuestionCircleOutlined as D } from "@ant-design/icons-vue";
11
- import b from "../ap-form/item/index.vue.mjs";
12
- function g(t) {
13
- return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !I(t);
9
+ import { objectToString as M, getTableRenderType as O } from "../ap-table/utils.mjs";
10
+ import { QuestionCircleOutlined as W } from "@ant-design/icons-vue";
11
+ import y from "../ap-form/item/index.vue.mjs";
12
+ function m(e) {
13
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !C(e);
14
14
  }
15
- function E(t) {
16
- return C[t];
15
+ function _(e) {
16
+ return q[e];
17
17
  }
18
- function B(t) {
19
- if (t.markRequired)
18
+ function k(e) {
19
+ if (e.markRequired)
20
20
  return !0;
21
- if (!t.fieldProps)
21
+ if (!e.fieldProps)
22
22
  return !1;
23
- const e = T(t.fieldProps) ? t.fieldProps({}) : t.fieldProps;
24
- return v(e.required) ? e.required : (h(e.rules) ? e.rules : e.rules ? [e.rules] : []).some((o) => o.required);
23
+ const t = c(e.fieldProps) ? e.fieldProps({}) : e.fieldProps;
24
+ return V(t.required) ? t.required : (T(t.rules) ? t.rules : t.rules ? [t.rules] : []).some((o) => o.required);
25
25
  }
26
- function L(t, e) {
27
- if (t.valueType === "text" || t.valueType === "textArea")
28
- return e || "--";
29
- if (t.valueType === "number") {
30
- const i = t.fieldProps ? T(t.fieldProps) ? t.fieldProps({}) : t.fieldProps : {};
31
- return A(e, i) || "--";
26
+ function D(e, t) {
27
+ if (e.valueType === "text" || e.valueType === "textArea")
28
+ return t || "--";
29
+ if (e.valueType === "number") {
30
+ const r = e.fieldProps ? c(e.fieldProps) ? e.fieldProps({}) : e.fieldProps : {};
31
+ return N(t, r) || "--";
32
32
  }
33
- return _(e);
33
+ return M(t);
34
34
  }
35
- function M(t, e) {
36
- const i = [t];
37
- if (e) {
38
- const o = h(e) ? e : [e];
39
- i.unshift(...o);
35
+ function $(e, t) {
36
+ const r = [e];
37
+ if (t) {
38
+ const o = T(t) ? t : [t];
39
+ r.unshift(...o);
40
40
  }
41
- return i.join(" ");
41
+ return r.join(" ");
42
42
  }
43
- function tt(t, e = document.body, i = {}) {
44
- const o = e.querySelectorAll("tr.ant-table-row")[t];
45
- o && R(o, {
43
+ function ee(e, t = document.body, r = {}) {
44
+ const o = t.querySelectorAll("tr.ant-table-row")[e];
45
+ o && j(o, {
46
46
  scrollMode: "if-needed",
47
47
  block: "nearest",
48
48
  behavior: "smooth",
49
- ...i
49
+ ...r
50
50
  });
51
51
  }
52
- function Q(t, e, i) {
53
- return N.includes(t.valueType) ? i : t.copyable || t.ellipsis ? s(O.Paragraph, {
54
- copyable: t.copyable ? {
55
- text: e,
52
+ function E(e, t, r) {
53
+ return w.includes(e.valueType) ? r : e.copyable || e.ellipsis ? i(v.Paragraph, {
54
+ copyable: e.copyable ? {
55
+ text: t,
56
56
  tooltip: !1
57
57
  } : !1,
58
- ellipsis: t.ellipsis ? w(t.ellipsis) ? {
59
- tooltip: e
58
+ ellipsis: e.ellipsis ? S(e.ellipsis) ? {
59
+ tooltip: t
60
60
  } : {
61
- ...t.ellipsis,
62
- tooltip: e
61
+ ...e.ellipsis,
62
+ tooltip: t
63
63
  } : !1,
64
- content: t.ellipsis ? L(t, e) : i
65
- }, null) : i;
64
+ content: e.ellipsis ? D(e, t) : r
65
+ }, null) : r;
66
66
  }
67
- function et(t, e, i, o, u, r) {
68
- var m, c;
69
- if (e) {
70
- if (t.customRenderFormItem) {
71
- const d = t.customRenderFormItem(t, i.field, e, u);
72
- return s(b, P(i, ["field"]), g(d) ? d : {
73
- default: () => [d]
67
+ function te(e, t, r, o, p, n) {
68
+ if (t) {
69
+ if (e.customRenderFormItem) {
70
+ const f = e.customRenderFormItem(e, r.field, t, p);
71
+ return i(y, F(r, ["field"]), m(f) ? f : {
72
+ default: () => [f]
74
73
  });
75
74
  }
76
- const l = E(t.valueType);
77
- if (l)
78
- return s(l, i, null);
79
- const n = r == null ? void 0 : r[t.valueType], p = (m = n == null ? void 0 : n.renderFormItem) == null ? void 0 : m.call(n, i.field);
80
- return p ? s(b, i, g(p) ? p : {
81
- default: () => [p]
75
+ const a = _(e.valueType);
76
+ if (a)
77
+ return i(a, r, null);
78
+ const l = n?.[e.valueType]?.renderFormItem?.(r.field);
79
+ return l ? i(y, r, m(l) ? l : {
80
+ default: () => [l]
82
81
  }) : null;
83
82
  }
84
- let f;
85
- const y = k(t), a = j[y];
86
- if (a)
87
- f = s(a, S(i.field, {
88
- mode: "read"
89
- }), null);
90
- else {
91
- const l = r == null ? void 0 : r[y];
92
- f = (c = l == null ? void 0 : l.render) == null ? void 0 : c.call(l, o, u, i.field);
93
- }
94
- return f ? Q(t, o, f) : null;
83
+ let s;
84
+ const u = O(e), d = P[u];
85
+ return d ? s = i(d, R(r.field, {
86
+ mode: "read"
87
+ }), null) : s = n?.[u]?.render?.(o, p, r.field), s ? E(e, o, s) : null;
95
88
  }
96
- function it(t, e, i, o, u) {
97
- const r = o == null ? void 0 : o({
98
- title: t.title,
99
- column: t
100
- }), f = (r == null ? void 0 : r.filter((d) => d.type !== Symbol.for("v-cmt"))) || [];
101
- if (r && f.length > 0)
102
- return r;
103
- const a = B(t), c = V(t.title) ? {
104
- class: e,
105
- title: t.title
106
- } : {}, l = s("div", c, [a ? s("span", {
107
- class: i
108
- }, [F("*")]) : null, t.title]), n = t.tooltip ? T(t.tooltip) ? t.tooltip(t) : s(q, null, [t.tooltip]) : null;
109
- return n ? s("span", {
89
+ function re(e, t, r, o, p) {
90
+ const n = o?.({
91
+ title: e.title,
92
+ column: e
93
+ }), s = n?.filter((b) => b.type !== Symbol.for("v-cmt")) || [];
94
+ if (n && s.length > 0)
95
+ return n;
96
+ const d = k(e), g = x(e.title) ? {
97
+ class: t,
98
+ title: e.title
99
+ } : {}, l = i("div", g, [d ? i("span", {
100
+ class: r
101
+ }, [h("*")]) : null, e.title]), f = e.tooltip ? c(e.tooltip) ? e.tooltip(e) : i(I, null, [e.tooltip]) : null;
102
+ return f ? i("span", {
110
103
  style: {
111
104
  display: "inline-flex",
112
105
  alignItems: "center",
113
106
  maxWidth: "100%"
114
107
  }
115
- }, [l, s(W, {
116
- title: n,
108
+ }, [l, i(A, {
109
+ title: f,
117
110
  placement: "bottom"
118
111
  }, {
119
- default: () => [s(D, {
112
+ default: () => [i(W, {
120
113
  style: {
121
114
  padding: "4px",
122
- color: u,
115
+ color: p,
123
116
  verticalAlign: "middle"
124
117
  }
125
118
  }, null)]
126
119
  })]) : l;
127
120
  }
128
121
  export {
129
- B as getColumnIsRequired,
130
- E as getEditableComponent,
131
- it as getEditableTableTitle,
132
- et as getFinalNode,
133
- L as getRawDisplayValue,
134
- M as mergeClass,
135
- tt as scrollToRowIndex
122
+ k as getColumnIsRequired,
123
+ _ as getEditableComponent,
124
+ re as getEditableTableTitle,
125
+ te as getFinalNode,
126
+ D as getRawDisplayValue,
127
+ $ as mergeClass,
128
+ ee as scrollToRowIndex
136
129
  };
@@ -1,31 +1,31 @@
1
- import { ref as V, nextTick as n, watch as N } from "vue";
2
- import { isUndefined as d } from "lodash-unified";
3
- function g(a, t, e) {
4
- const f = (e == null ? void 0 : e.defaultValuePropName) || "defaultValue", l = (e == null ? void 0 : e.valuePropName) || "value", u = V(m());
5
- async function v(r) {
6
- e != null && e.beforeUpdateValue && (c(), !await e.beforeUpdateValue(r)) || (a[l] === void 0 && (u.value = r), t(`update:${l}`, r));
1
+ import { ref as v, nextTick as c, watch as m } from "vue";
2
+ import { isUndefined as n } from "lodash-unified";
3
+ function P(e, f, u) {
4
+ const r = u?.defaultValuePropName || "defaultValue", t = u?.valuePropName || "value", a = v(o());
5
+ async function i(l) {
6
+ u?.beforeUpdateValue && (d(), !await u.beforeUpdateValue(l)) || (e[t] === void 0 && (a.value = l), f(`update:${t}`, l));
7
7
  }
8
- function c() {
9
- u.value === void 0 && (u.value = "", n(() => {
10
- u.value = void 0;
8
+ function d() {
9
+ a.value === void 0 && (a.value = "", c(() => {
10
+ a.value = void 0;
11
11
  }));
12
12
  }
13
- function m() {
14
- return d(a[l]) ? d(a[f]) ? e == null ? void 0 : e.defaultValue : a[f] : a[l];
13
+ function o() {
14
+ return n(e[t]) ? n(e[r]) ? u?.defaultValue : e[r] : e[t];
15
15
  }
16
- return N(
17
- () => a[l],
18
- (r) => {
19
- u.value = r;
16
+ return m(
17
+ () => e[t],
18
+ (l) => {
19
+ a.value = l;
20
20
  },
21
21
  {
22
22
  deep: !0
23
23
  }
24
24
  ), {
25
- value: u,
26
- updateValue: v
25
+ value: a,
26
+ updateValue: i
27
27
  };
28
28
  }
29
29
  export {
30
- g as useControllableValue
30
+ P as useControllableValue
31
31
  };
@@ -1,23 +1,23 @@
1
- import { isClient as s } from "@vueuse/core";
2
- import { isFunction as a } from "lodash-unified";
3
- const i = /* @__PURE__ */ new WeakMap();
4
- let n;
5
- s && (n = new ResizeObserver((e) => {
6
- e.forEach((t) => {
7
- const o = i.get(t.target);
8
- a(o) && o(t);
1
+ import { isClient as t } from "@vueuse/core";
2
+ import { isFunction as i } from "lodash-unified";
3
+ const s = /* @__PURE__ */ new WeakMap();
4
+ let r;
5
+ t && (r = new ResizeObserver((e) => {
6
+ e.forEach((o) => {
7
+ const n = s.get(o.target);
8
+ i(n) && n(o);
9
9
  });
10
10
  }));
11
- function f(e, t) {
12
- i.set(e, t), n == null || n.observe(e);
11
+ function a(e, o) {
12
+ s.set(e, o), r?.observe(e);
13
13
  }
14
- function r(e) {
15
- i.has(e) && i.delete(e), n == null || n.unobserve(e);
14
+ function f(e) {
15
+ s.has(e) && s.delete(e), r?.unobserve(e);
16
16
  }
17
- const p = () => ({
18
- observe: f,
19
- unobserve: r
17
+ const u = () => ({
18
+ observe: a,
19
+ unobserve: f
20
20
  });
21
21
  export {
22
- p as useResize
22
+ u as useResize
23
23
  };