@aplus-frontend/ui 0.6.0-beta.9 → 0.6.1

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 (510) hide show
  1. package/es/index.mjs +307 -289
  2. package/es/src/ap-button/ap-button.vue.mjs +1 -1
  3. package/es/src/ap-descriptions/ap-descriptions.vue.mjs +9 -8
  4. package/es/src/ap-descriptions/help-message/index.vue2.mjs +1 -1
  5. package/es/src/ap-drawer/components/ApDrawerClose.vue.d.ts +7 -0
  6. package/es/src/ap-drawer/components/ApDrawerClose.vue.mjs +4 -0
  7. package/es/src/ap-drawer/components/ApDrawerClose.vue2.mjs +25 -0
  8. package/es/src/ap-drawer/index.d.ts +2 -0
  9. package/es/src/ap-drawer/index.mjs +5 -2
  10. package/es/src/ap-drawer/utils/createDrawer.mjs +38 -33
  11. package/es/src/ap-field/date-range/index.vue.mjs +8 -7
  12. package/es/src/ap-field/hooks/use-date-timezone.mjs +17 -8
  13. package/es/src/ap-field/number/index.vue.d.ts +2 -4
  14. package/es/src/ap-field/radio/index.vue.d.ts +2 -4
  15. package/es/src/ap-field/rate/index.vue.d.ts +2 -4
  16. package/es/src/ap-field/select/index.vue.d.ts +3 -6
  17. package/es/src/ap-field/slider/index.vue.d.ts +2 -4
  18. package/es/src/ap-field/text/index.vue2.mjs +42 -44
  19. package/es/src/ap-field/text/password.vue.mjs +15 -17
  20. package/es/src/ap-field/text-area/index.vue.d.ts +2 -2
  21. package/es/src/ap-field/tree-select/index.vue.mjs +31 -30
  22. package/es/src/ap-form/ap-form.vue2.mjs +89 -77
  23. package/es/src/ap-form/dependency/index.vue.mjs +29 -23
  24. package/es/src/ap-form/drawer-form/index.vue.d.ts +13 -7
  25. package/es/src/ap-form/drawer-form/index.vue.mjs +58 -49
  26. package/es/src/ap-form/interface.d.ts +9 -5
  27. package/es/src/ap-form/item/index.vue.d.ts +5 -10
  28. package/es/src/ap-form/item/index.vue.mjs +69 -73
  29. package/es/src/ap-form/item-group/index.vue.mjs +34 -35
  30. package/es/src/ap-form/items/select/index.vue.mjs +12 -14
  31. package/es/src/ap-form/items/text/password.vue.mjs +9 -9
  32. package/es/src/ap-form/items/text-area/index.vue.d.ts +5 -5
  33. package/es/src/ap-form/items/tree-select/index.vue.mjs +12 -14
  34. package/es/src/ap-form/modal-form/index.vue.d.ts +9 -7
  35. package/es/src/ap-form/modal-form/index.vue.mjs +64 -55
  36. package/es/src/ap-form/provider/index.vue.mjs +6 -5
  37. package/es/src/ap-form/search-form/components/popover-sorter/index.vue2.mjs +4 -1
  38. package/es/src/ap-form/search-form/hooks/use-count-per-row.mjs +31 -13
  39. package/es/src/ap-form/search-form/index.vue.d.ts +4 -8
  40. package/es/src/ap-form/search-form/index.vue.mjs +63 -62
  41. package/es/src/ap-form/set/index.vue.mjs +20 -20
  42. package/es/src/ap-grid/editable/form-item.vue.mjs +39 -36
  43. package/es/src/ap-grid/editable/index.vue.mjs +13 -10
  44. package/es/src/ap-grid/hooks/use-editable-columns.mjs +17 -17
  45. package/es/src/ap-grid/hooks/use-inner-params.d.ts +2 -1
  46. package/es/src/ap-grid/hooks/use-inner-params.mjs +24 -35
  47. package/es/src/ap-grid/hooks/use-render-columns.mjs +8 -8
  48. package/es/src/ap-grid/hooks/use-row-selection.d.ts +100 -0
  49. package/es/src/ap-grid/hooks/use-row-selection.mjs +122 -0
  50. package/es/src/ap-grid/hooks/use-table-style.d.ts +18 -0
  51. package/es/src/ap-grid/hooks/use-table-style.mjs +28 -0
  52. package/es/src/ap-grid/index.vue.mjs +295 -243
  53. package/es/src/ap-grid/interface.d.ts +32 -3
  54. package/es/src/ap-grid/utils/table.mjs +15 -15
  55. package/es/src/ap-list/index.vue.d.ts +2 -9
  56. package/es/src/ap-list/index.vue.mjs +113 -103
  57. package/es/src/ap-list/interface.d.ts +24 -3
  58. package/es/src/ap-modal/interface.d.ts +2 -1
  59. package/es/src/ap-modal/utils/createModalStream.mjs +24 -24
  60. package/es/src/ap-table/ap-table.vue.d.ts +10 -2
  61. package/es/src/ap-table/ap-table.vue2.mjs +86 -82
  62. package/es/src/ap-table/components/setting/modal/index.vue2.mjs +42 -44
  63. package/es/src/ap-table/constants.d.ts +22 -22
  64. package/es/src/ap-table/hooks/use-table-paging-ng.d.ts +24 -5
  65. package/es/src/ap-table/hooks/use-table-paging-ng.mjs +158 -130
  66. package/es/src/ap-table/interface.d.ts +17 -4
  67. package/es/src/ap-table/utils.d.ts +21 -21
  68. package/es/src/business/ap-card/ApCard.vue.d.ts +2 -4
  69. package/es/src/business/ap-card/ApCard.vue2.mjs +34 -33
  70. package/es/src/business/ap-card/index.d.ts +2 -4
  71. package/es/src/business/ap-card/interface.d.ts +5 -0
  72. package/es/src/business/ap-copy/ApCopy.d.ts +52 -0
  73. package/es/src/business/ap-copy/ApCopy.mjs +79 -0
  74. package/es/src/business/ap-copy/constans.d.ts +24 -0
  75. package/es/src/business/ap-copy/constans.mjs +25 -0
  76. package/es/src/business/ap-copy/index.d.ts +102 -0
  77. package/es/src/business/ap-copy/index.mjs +7 -0
  78. package/es/src/business/ap-copy/interface.d.ts +8 -0
  79. package/es/src/business/ap-copy/interface.mjs +1 -0
  80. package/es/src/business/ap-copy/style/css.d.ts +0 -0
  81. package/es/src/business/ap-copy/style/css.js +1 -0
  82. package/es/src/business/ap-copy/style/index.d.ts +0 -0
  83. package/es/src/business/ap-copy/style/index.js +1 -0
  84. package/es/src/business/ap-expand-alert/ApExpandAlert.vue2.mjs +51 -49
  85. package/es/src/business/ap-keep-alive/cacher/cacher.d.ts +10 -0
  86. package/es/src/business/ap-keep-alive/cacher/lru-cacher.d.ts +16 -0
  87. package/es/src/business/ap-keep-alive/cacher/lru-cacher.mjs +43 -0
  88. package/es/src/business/ap-keep-alive/hook.d.ts +10 -0
  89. package/es/src/business/ap-keep-alive/hook.mjs +33 -0
  90. package/es/src/business/ap-keep-alive/index.d.ts +108 -0
  91. package/es/src/business/ap-keep-alive/index.mjs +15 -0
  92. package/es/src/business/ap-keep-alive/interface.d.ts +36 -0
  93. package/es/src/business/ap-keep-alive/interface.mjs +54 -0
  94. package/es/src/business/ap-keep-alive/keep-alive.d.ts +54 -0
  95. package/es/src/business/ap-keep-alive/keep-alive.mjs +154 -0
  96. package/es/src/business/ap-keep-alive/keeper/ap-form-keeper.d.ts +7 -0
  97. package/es/src/business/ap-keep-alive/keeper/ap-form-keeper.mjs +21 -0
  98. package/es/src/business/ap-keep-alive/keeper/ap-grid-keeper.d.ts +14 -0
  99. package/es/src/business/ap-keep-alive/keeper/ap-grid-keeper.mjs +27 -0
  100. package/es/src/business/ap-keep-alive/keeper/ap-list-keeper.d.ts +13 -0
  101. package/es/src/business/ap-keep-alive/keeper/ap-list-keeper.mjs +18 -0
  102. package/es/src/business/ap-keep-alive/keeper/ap-radio-group-keeper.d.ts +6 -0
  103. package/es/src/business/ap-keep-alive/keeper/ap-radio-group-keeper.mjs +17 -0
  104. package/es/src/business/ap-keep-alive/keeper/ap-search-form-keeper.d.ts +7 -0
  105. package/es/src/business/ap-keep-alive/keeper/ap-search-form-keeper.mjs +18 -0
  106. package/es/src/business/ap-keep-alive/keeper/ap-table-keeper.d.ts +13 -0
  107. package/es/src/business/ap-keep-alive/keeper/ap-table-keeper.mjs +18 -0
  108. package/es/src/business/ap-keep-alive/keeper/ap-view-keeper.d.ts +6 -0
  109. package/es/src/business/ap-keep-alive/keeper/ap-view-keeper.mjs +12 -0
  110. package/es/src/business/ap-keep-alive/keeper/edit-grid-keeper.d.ts +6 -0
  111. package/es/src/business/ap-keep-alive/keeper/edit-grid-keeper.mjs +18 -0
  112. package/es/src/business/ap-keep-alive/keeper/edit-table-keeper.d.ts +6 -0
  113. package/es/src/business/ap-keep-alive/keeper/edit-table-keeper.mjs +18 -0
  114. package/es/src/business/ap-keep-alive/keeper/index.d.ts +3 -0
  115. package/es/src/business/ap-keep-alive/keeper/index.mjs +28 -0
  116. package/es/src/business/ap-keep-alive/keeper/step-keeper.d.ts +6 -0
  117. package/es/src/business/ap-keep-alive/keeper/step-keeper.mjs +17 -0
  118. package/es/src/business/ap-keep-alive/keeper/tab-keeper.d.ts +6 -0
  119. package/es/src/business/ap-keep-alive/keeper/tab-keeper.mjs +17 -0
  120. package/es/src/business/ap-keep-alive/utils.d.ts +23 -0
  121. package/es/src/business/ap-keep-alive/utils.mjs +42 -0
  122. package/es/src/business/ap-label/group/ApLabelGroup.mjs +15 -16
  123. package/es/src/business/ap-label/interface.d.ts +2 -3
  124. package/es/src/business/ap-product-info/ApProductInfo.d.ts +9 -0
  125. package/es/src/business/ap-product-info/ApProductInfo.mjs +53 -54
  126. package/es/src/business/ap-product-info/constans.d.ts +4 -0
  127. package/es/src/business/ap-product-info/constans.mjs +4 -0
  128. package/es/src/business/ap-product-info/index.d.ts +15 -0
  129. package/es/src/business/ap-product-info/interface.d.ts +1 -0
  130. package/es/src/business/ap-radio-group/ap-radio-group.vue.d.ts +21 -0
  131. package/es/src/business/ap-radio-group/ap-radio-group.vue.mjs +4 -0
  132. package/es/src/business/ap-radio-group/ap-radio-group.vue2.mjs +73 -0
  133. package/es/src/business/ap-radio-group/index.d.ts +66 -0
  134. package/es/src/business/ap-radio-group/index.mjs +8 -0
  135. package/es/src/business/ap-radio-group/interface.d.ts +11 -0
  136. package/es/src/business/ap-radio-group/interface.mjs +1 -0
  137. package/es/src/business/ap-radio-group/style/css.d.ts +0 -0
  138. package/es/src/business/ap-radio-group/style/css.js +1 -0
  139. package/es/src/business/ap-radio-group/style/index.d.ts +0 -0
  140. package/es/src/business/ap-radio-group/style/index.js +1 -0
  141. package/es/src/business/ap-table-modal/hooks/use-create-table-modal.d.ts +4 -1
  142. package/es/src/business/ap-table-modal/hooks/use-table-modal.d.ts +4 -1
  143. package/es/src/business/ap-table-modal/hooks/use-table-select-modal.d.ts +4 -1
  144. package/es/src/business/ap-table-modal/index.d.ts +32 -5
  145. package/es/src/business/ap-table-modal/table-modal.vue.d.ts +14 -3
  146. package/es/src/business/ap-table-modal/table-modal.vue2.mjs +43 -42
  147. package/es/src/business/ap-view/ap-view.vue.d.ts +4 -1
  148. package/es/src/business/ap-view/ap-view.vue2.mjs +135 -115
  149. package/es/src/business/ap-view/components/main-button-content.vue.d.ts +1 -1
  150. package/es/src/business/ap-view/components/menu-list-content.vue.d.ts +1 -1
  151. package/es/src/business/ap-view/index.d.ts +12 -3
  152. package/es/src/business/ap-view/interface.d.ts +7 -0
  153. package/es/src/business/batch-input-group/form-item.vue.mjs +14 -13
  154. package/es/src/business/batch-input-group/index.vue.mjs +10 -9
  155. package/es/src/business/hooks/usePageListApGrid.mjs +33 -28
  156. package/es/src/business/hooks/usePageListApTable.d.ts +4 -1
  157. package/es/src/business/index.d.ts +3 -0
  158. package/es/src/business/index.mjs +36 -30
  159. package/es/src/components.d.ts +1 -0
  160. package/es/src/editable-table/form-item.vue.mjs +23 -23
  161. package/es/src/full-screen/interface.d.ts +5 -6
  162. package/es/src/index.mjs +112 -97
  163. package/es/src/locale/lang/en.mjs +4 -0
  164. package/es/src/locale/lang/zh-cn.mjs +4 -0
  165. package/es/src/mask/index.vue.mjs +21 -20
  166. package/es/src/path-map.mjs +3 -1
  167. package/es/src/resize-observer/interface.d.ts +2 -3
  168. package/es/src/scroll-bar/interface.d.ts +7 -7
  169. package/es/src/scroll-view/interface.d.ts +2 -3
  170. package/es/src/splitter/SplitBar.vue2.mjs +1 -0
  171. package/es/src/splitter/Splitter.vue2.mjs +1 -0
  172. package/es/src/tests/mock-resize-observer.d.ts +2 -0
  173. package/es/src/tests/mock-warning.d.ts +1 -0
  174. package/es/src/tests/utils.d.ts +8 -0
  175. package/es/src/text/group.vue.mjs +7 -6
  176. package/es/src/text/index.vue.mjs +20 -19
  177. package/es/src/version.d.ts +2 -0
  178. package/es/src/version.mjs +4 -0
  179. package/es/src/work-order-modal/createWorkOrder.d.ts +2 -1
  180. package/es/src/work-order-modal/createWorkOrder.mjs +19 -15
  181. package/es/src/work-order-modal/interfaces.d.ts +4 -0
  182. package/es/src/work-order-modal/work-order-modal.vue.d.ts +1 -1
  183. package/es/src/work-order-modal/work-order-modal.vue.mjs +120 -105
  184. package/es/test/setup.d.ts +5 -0
  185. package/lib/index.js +1 -1
  186. package/lib/src/ap-button/ap-button.vue.js +1 -1
  187. package/lib/src/ap-descriptions/ap-descriptions.vue.js +1 -1
  188. package/lib/src/ap-descriptions/help-message/index.vue2.js +1 -1
  189. package/lib/src/ap-drawer/components/ApDrawerClose.vue.d.ts +7 -0
  190. package/lib/src/ap-drawer/components/ApDrawerClose.vue.js +1 -0
  191. package/lib/src/ap-drawer/components/ApDrawerClose.vue2.js +1 -0
  192. package/lib/src/ap-drawer/index.d.ts +2 -0
  193. package/lib/src/ap-drawer/index.js +1 -1
  194. package/lib/src/ap-drawer/utils/createDrawer.js +1 -1
  195. package/lib/src/ap-field/date-range/index.vue.js +1 -1
  196. package/lib/src/ap-field/hooks/use-date-timezone.js +1 -1
  197. package/lib/src/ap-field/number/index.vue.d.ts +2 -4
  198. package/lib/src/ap-field/radio/index.vue.d.ts +2 -4
  199. package/lib/src/ap-field/rate/index.vue.d.ts +2 -4
  200. package/lib/src/ap-field/select/index.vue.d.ts +3 -6
  201. package/lib/src/ap-field/slider/index.vue.d.ts +2 -4
  202. package/lib/src/ap-field/text/index.vue2.js +1 -1
  203. package/lib/src/ap-field/text/password.vue.js +1 -1
  204. package/lib/src/ap-field/text-area/index.vue.d.ts +2 -2
  205. package/lib/src/ap-field/tree-select/index.vue.js +1 -1
  206. package/lib/src/ap-form/ap-form.vue2.js +1 -1
  207. package/lib/src/ap-form/dependency/index.vue.js +1 -1
  208. package/lib/src/ap-form/drawer-form/index.vue.d.ts +13 -7
  209. package/lib/src/ap-form/drawer-form/index.vue.js +1 -1
  210. package/lib/src/ap-form/interface.d.ts +9 -5
  211. package/lib/src/ap-form/item/index.vue.d.ts +5 -10
  212. package/lib/src/ap-form/item/index.vue.js +1 -1
  213. package/lib/src/ap-form/item-group/index.vue.js +1 -1
  214. package/lib/src/ap-form/items/select/index.vue.js +1 -1
  215. package/lib/src/ap-form/items/text/password.vue.js +1 -1
  216. package/lib/src/ap-form/items/text-area/index.vue.d.ts +5 -5
  217. package/lib/src/ap-form/items/tree-select/index.vue.js +1 -1
  218. package/lib/src/ap-form/modal-form/index.vue.d.ts +9 -7
  219. package/lib/src/ap-form/modal-form/index.vue.js +1 -1
  220. package/lib/src/ap-form/provider/index.vue.js +1 -1
  221. package/lib/src/ap-form/search-form/components/popover-sorter/index.vue2.js +1 -1
  222. package/lib/src/ap-form/search-form/hooks/use-count-per-row.js +1 -1
  223. package/lib/src/ap-form/search-form/index.vue.d.ts +4 -8
  224. package/lib/src/ap-form/search-form/index.vue.js +1 -1
  225. package/lib/src/ap-form/set/index.vue.js +1 -1
  226. package/lib/src/ap-grid/editable/form-item.vue.js +1 -1
  227. package/lib/src/ap-grid/editable/index.vue.js +1 -1
  228. package/lib/src/ap-grid/hooks/use-editable-columns.js +1 -1
  229. package/lib/src/ap-grid/hooks/use-inner-params.d.ts +2 -1
  230. package/lib/src/ap-grid/hooks/use-inner-params.js +1 -1
  231. package/lib/src/ap-grid/hooks/use-render-columns.js +1 -1
  232. package/lib/src/ap-grid/hooks/use-row-selection.d.ts +100 -0
  233. package/lib/src/ap-grid/hooks/use-row-selection.js +1 -0
  234. package/lib/src/ap-grid/hooks/use-table-style.d.ts +18 -0
  235. package/lib/src/ap-grid/hooks/use-table-style.js +1 -0
  236. package/lib/src/ap-grid/index.vue.js +1 -1
  237. package/lib/src/ap-grid/interface.d.ts +32 -3
  238. package/lib/src/ap-grid/utils/table.js +1 -1
  239. package/lib/src/ap-list/index.vue.d.ts +2 -9
  240. package/lib/src/ap-list/index.vue.js +1 -1
  241. package/lib/src/ap-list/interface.d.ts +24 -3
  242. package/lib/src/ap-modal/interface.d.ts +2 -1
  243. package/lib/src/ap-modal/utils/createModalStream.js +1 -1
  244. package/lib/src/ap-table/ap-table.vue.d.ts +10 -2
  245. package/lib/src/ap-table/ap-table.vue2.js +1 -1
  246. package/lib/src/ap-table/components/setting/modal/index.vue2.js +1 -1
  247. package/lib/src/ap-table/constants.d.ts +22 -22
  248. package/lib/src/ap-table/hooks/use-table-paging-ng.d.ts +24 -5
  249. package/lib/src/ap-table/hooks/use-table-paging-ng.js +1 -1
  250. package/lib/src/ap-table/interface.d.ts +17 -4
  251. package/lib/src/ap-table/utils.d.ts +21 -21
  252. package/lib/src/business/ap-card/ApCard.vue.d.ts +2 -4
  253. package/lib/src/business/ap-card/ApCard.vue2.js +1 -1
  254. package/lib/src/business/ap-card/index.d.ts +2 -4
  255. package/lib/src/business/ap-card/interface.d.ts +5 -0
  256. package/lib/src/business/ap-copy/ApCopy.d.ts +52 -0
  257. package/lib/src/business/ap-copy/ApCopy.js +1 -0
  258. package/lib/src/business/ap-copy/constans.d.ts +24 -0
  259. package/lib/src/business/ap-copy/constans.js +1 -0
  260. package/lib/src/business/ap-copy/index.d.ts +102 -0
  261. package/lib/src/business/ap-copy/index.js +1 -0
  262. package/lib/src/business/ap-copy/interface.d.ts +8 -0
  263. package/lib/src/business/ap-copy/interface.js +1 -0
  264. package/lib/src/business/ap-copy/style/css.cjs +1 -0
  265. package/lib/src/business/ap-copy/style/css.d.ts +0 -0
  266. package/lib/src/business/ap-copy/style/index.cjs +1 -0
  267. package/lib/src/business/ap-copy/style/index.d.ts +0 -0
  268. package/lib/src/business/ap-expand-alert/ApExpandAlert.vue2.js +1 -1
  269. package/lib/src/business/ap-keep-alive/cacher/cacher.d.ts +10 -0
  270. package/lib/src/business/ap-keep-alive/cacher/lru-cacher.d.ts +16 -0
  271. package/lib/src/business/ap-keep-alive/cacher/lru-cacher.js +1 -0
  272. package/lib/src/business/ap-keep-alive/hook.d.ts +10 -0
  273. package/lib/src/business/ap-keep-alive/hook.js +1 -0
  274. package/lib/src/business/ap-keep-alive/index.d.ts +108 -0
  275. package/lib/src/business/ap-keep-alive/index.js +1 -0
  276. package/lib/src/business/ap-keep-alive/interface.d.ts +36 -0
  277. package/lib/src/business/ap-keep-alive/interface.js +1 -0
  278. package/lib/src/business/ap-keep-alive/keep-alive.d.ts +54 -0
  279. package/lib/src/business/ap-keep-alive/keep-alive.js +1 -0
  280. package/lib/src/business/ap-keep-alive/keeper/ap-form-keeper.d.ts +7 -0
  281. package/lib/src/business/ap-keep-alive/keeper/ap-form-keeper.js +1 -0
  282. package/lib/src/business/ap-keep-alive/keeper/ap-grid-keeper.d.ts +14 -0
  283. package/lib/src/business/ap-keep-alive/keeper/ap-grid-keeper.js +1 -0
  284. package/lib/src/business/ap-keep-alive/keeper/ap-list-keeper.d.ts +13 -0
  285. package/lib/src/business/ap-keep-alive/keeper/ap-list-keeper.js +1 -0
  286. package/lib/src/business/ap-keep-alive/keeper/ap-radio-group-keeper.d.ts +6 -0
  287. package/lib/src/business/ap-keep-alive/keeper/ap-radio-group-keeper.js +1 -0
  288. package/lib/src/business/ap-keep-alive/keeper/ap-search-form-keeper.d.ts +7 -0
  289. package/lib/src/business/ap-keep-alive/keeper/ap-search-form-keeper.js +1 -0
  290. package/lib/src/business/ap-keep-alive/keeper/ap-table-keeper.d.ts +13 -0
  291. package/lib/src/business/ap-keep-alive/keeper/ap-table-keeper.js +1 -0
  292. package/lib/src/business/ap-keep-alive/keeper/ap-view-keeper.d.ts +6 -0
  293. package/lib/src/business/ap-keep-alive/keeper/ap-view-keeper.js +1 -0
  294. package/lib/src/business/ap-keep-alive/keeper/edit-grid-keeper.d.ts +6 -0
  295. package/lib/src/business/ap-keep-alive/keeper/edit-grid-keeper.js +1 -0
  296. package/lib/src/business/ap-keep-alive/keeper/edit-table-keeper.d.ts +6 -0
  297. package/lib/src/business/ap-keep-alive/keeper/edit-table-keeper.js +1 -0
  298. package/lib/src/business/ap-keep-alive/keeper/index.d.ts +3 -0
  299. package/lib/src/business/ap-keep-alive/keeper/index.js +1 -0
  300. package/lib/src/business/ap-keep-alive/keeper/step-keeper.d.ts +6 -0
  301. package/lib/src/business/ap-keep-alive/keeper/step-keeper.js +1 -0
  302. package/lib/src/business/ap-keep-alive/keeper/tab-keeper.d.ts +6 -0
  303. package/lib/src/business/ap-keep-alive/keeper/tab-keeper.js +1 -0
  304. package/lib/src/business/ap-keep-alive/utils.d.ts +23 -0
  305. package/lib/src/business/ap-keep-alive/utils.js +1 -0
  306. package/lib/src/business/ap-label/group/ApLabelGroup.js +1 -1
  307. package/lib/src/business/ap-label/interface.d.ts +2 -3
  308. package/lib/src/business/ap-product-info/ApProductInfo.d.ts +9 -0
  309. package/lib/src/business/ap-product-info/ApProductInfo.js +1 -1
  310. package/lib/src/business/ap-product-info/constans.d.ts +4 -0
  311. package/lib/src/business/ap-product-info/constans.js +1 -1
  312. package/lib/src/business/ap-product-info/index.d.ts +15 -0
  313. package/lib/src/business/ap-product-info/interface.d.ts +1 -0
  314. package/lib/src/business/ap-radio-group/ap-radio-group.vue.d.ts +21 -0
  315. package/lib/src/business/ap-radio-group/ap-radio-group.vue.js +1 -0
  316. package/lib/src/business/ap-radio-group/ap-radio-group.vue2.js +1 -0
  317. package/lib/src/business/ap-radio-group/index.d.ts +66 -0
  318. package/lib/src/business/ap-radio-group/index.js +1 -0
  319. package/lib/src/business/ap-radio-group/interface.d.ts +11 -0
  320. package/lib/src/business/ap-radio-group/interface.js +1 -0
  321. package/lib/src/business/ap-radio-group/style/css.cjs +1 -0
  322. package/lib/src/business/ap-radio-group/style/css.d.ts +0 -0
  323. package/lib/src/business/ap-radio-group/style/index.cjs +1 -0
  324. package/lib/src/business/ap-radio-group/style/index.d.ts +0 -0
  325. package/lib/src/business/ap-table-modal/hooks/use-create-table-modal.d.ts +4 -1
  326. package/lib/src/business/ap-table-modal/hooks/use-table-modal.d.ts +4 -1
  327. package/lib/src/business/ap-table-modal/hooks/use-table-select-modal.d.ts +4 -1
  328. package/lib/src/business/ap-table-modal/index.d.ts +32 -5
  329. package/lib/src/business/ap-table-modal/table-modal.vue.d.ts +14 -3
  330. package/lib/src/business/ap-table-modal/table-modal.vue2.js +1 -1
  331. package/lib/src/business/ap-view/ap-view.vue.d.ts +4 -1
  332. package/lib/src/business/ap-view/ap-view.vue2.js +1 -1
  333. package/lib/src/business/ap-view/components/main-button-content.vue.d.ts +1 -1
  334. package/lib/src/business/ap-view/components/menu-list-content.vue.d.ts +1 -1
  335. package/lib/src/business/ap-view/index.d.ts +12 -3
  336. package/lib/src/business/ap-view/interface.d.ts +7 -0
  337. package/lib/src/business/batch-input-group/form-item.vue.js +1 -1
  338. package/lib/src/business/batch-input-group/index.vue.js +2 -2
  339. package/lib/src/business/hooks/usePageListApGrid.js +1 -1
  340. package/lib/src/business/hooks/usePageListApTable.d.ts +4 -1
  341. package/lib/src/business/index.d.ts +3 -0
  342. package/lib/src/business/index.js +1 -1
  343. package/lib/src/components.d.ts +1 -0
  344. package/lib/src/editable-table/form-item.vue.js +1 -1
  345. package/lib/src/full-screen/interface.d.ts +5 -6
  346. package/lib/src/index.js +1 -1
  347. package/lib/src/locale/lang/en.js +1 -1
  348. package/lib/src/locale/lang/zh-cn.js +1 -1
  349. package/lib/src/mask/index.vue.js +1 -1
  350. package/lib/src/path-map.js +1 -1
  351. package/lib/src/resize-observer/interface.d.ts +2 -3
  352. package/lib/src/scroll-bar/interface.d.ts +7 -7
  353. package/lib/src/scroll-view/interface.d.ts +2 -3
  354. package/lib/src/splitter/SplitBar.vue2.js +1 -1
  355. package/lib/src/splitter/Splitter.vue2.js +1 -1
  356. package/lib/src/tests/mock-resize-observer.d.ts +2 -0
  357. package/lib/src/tests/mock-warning.d.ts +1 -0
  358. package/lib/src/tests/utils.d.ts +8 -0
  359. package/lib/src/text/group.vue.js +1 -1
  360. package/lib/src/text/index.vue.js +1 -1
  361. package/lib/src/version.d.ts +2 -0
  362. package/lib/src/version.js +1 -0
  363. package/lib/src/work-order-modal/createWorkOrder.d.ts +2 -1
  364. package/lib/src/work-order-modal/createWorkOrder.js +1 -1
  365. package/lib/src/work-order-modal/interfaces.d.ts +4 -0
  366. package/lib/src/work-order-modal/work-order-modal.vue.d.ts +1 -1
  367. package/lib/src/work-order-modal/work-order-modal.vue.js +1 -1
  368. package/lib/test/setup.d.ts +5 -0
  369. package/package.json +18 -14
  370. package/theme/antd-global-overwrite/admin/alert.css +5 -18
  371. package/theme/antd-global-overwrite/admin/alert.less +25 -36
  372. package/theme/antd-global-overwrite/admin/button.css +13 -13
  373. package/theme/antd-global-overwrite/admin/button.less +24 -24
  374. package/theme/antd-global-overwrite/admin/drawer.css +3 -0
  375. package/theme/antd-global-overwrite/admin/drawer.less +5 -0
  376. package/theme/antd-global-overwrite/admin/field.css +42 -0
  377. package/theme/antd-global-overwrite/admin/field.less +43 -0
  378. package/theme/antd-global-overwrite/admin/index.css +93 -634
  379. package/theme/antd-global-overwrite/admin/index.less +1 -3
  380. package/theme/antd-global-overwrite/admin/message.css +2 -9
  381. package/theme/antd-global-overwrite/admin/message.less +2 -10
  382. package/theme/antd-global-overwrite/admin/modal.css +20 -37
  383. package/theme/antd-global-overwrite/admin/modal.less +20 -41
  384. package/theme/antd-global-overwrite/admin/table.css +11 -251
  385. package/theme/antd-global-overwrite/admin/table.less +4 -132
  386. package/theme/antd-global-overwrite/aplus/alert.css +8 -18
  387. package/theme/antd-global-overwrite/aplus/alert.less +27 -34
  388. package/theme/antd-global-overwrite/aplus/button.css +20 -20
  389. package/theme/antd-global-overwrite/aplus/button.less +24 -24
  390. package/theme/antd-global-overwrite/aplus/drawer.css +3 -0
  391. package/theme/antd-global-overwrite/aplus/drawer.less +5 -0
  392. package/theme/antd-global-overwrite/aplus/field.css +36 -0
  393. package/theme/antd-global-overwrite/aplus/field.less +36 -0
  394. package/theme/antd-global-overwrite/aplus/index.css +94 -683
  395. package/theme/antd-global-overwrite/aplus/index.less +0 -3
  396. package/theme/antd-global-overwrite/aplus/message.css +2 -9
  397. package/theme/antd-global-overwrite/aplus/message.less +2 -10
  398. package/theme/antd-global-overwrite/aplus/modal.css +19 -43
  399. package/theme/antd-global-overwrite/aplus/modal.less +20 -49
  400. package/theme/antd-global-overwrite/aplus/table.css +11 -236
  401. package/theme/antd-global-overwrite/aplus/table.less +4 -134
  402. package/theme/ap-action/item-dropdown.css +3 -3
  403. package/theme/ap-action/item.css +21 -10
  404. package/theme/ap-action/item.less +18 -6
  405. package/theme/ap-appendix/ap-appendix.css +10 -10
  406. package/theme/ap-appendix/ap-appendix.less +6 -6
  407. package/theme/ap-attachment/ap-attachment.css +4 -4
  408. package/theme/ap-batch-action/ap-batch-action.css +6 -6
  409. package/theme/ap-batch-action/ap-batch-action.less +3 -3
  410. package/theme/ap-button/ap-button.css +3 -3
  411. package/theme/ap-card/ap-card.css +4 -4
  412. package/theme/ap-card/ap-card.less +1 -1
  413. package/theme/ap-copy/ap-copy.css +96 -0
  414. package/theme/ap-copy/ap-copy.less +61 -0
  415. package/theme/ap-descriptions/ap-descriptions.css +9 -7
  416. package/theme/ap-descriptions/ap-descriptions.less +6 -4
  417. package/theme/ap-download/ap-download.css +6 -6
  418. package/theme/ap-drawer/ap-drawer.css +66 -0
  419. package/theme/ap-drawer/ap-drawer.less +27 -0
  420. package/theme/ap-expand-alert/ap-expand-alert.css +4 -3
  421. package/theme/ap-expand-alert/ap-expand-alert.less +2 -2
  422. package/theme/ap-field/checkbox.css +3 -3
  423. package/theme/ap-field/index.css +3 -3
  424. package/theme/ap-field/number.css +3 -3
  425. package/theme/ap-field/radio.css +3 -3
  426. package/theme/ap-field/text-area.css +3 -3
  427. package/theme/ap-form/ap-form-item-group.css +3 -3
  428. package/theme/ap-form/ap-form-item.css +11 -8
  429. package/theme/ap-form/ap-form-item.less +8 -5
  430. package/theme/ap-form/drawer-form.css +3 -3
  431. package/theme/ap-form/index.css +25 -20
  432. package/theme/ap-form/item-text-group.css +3 -3
  433. package/theme/ap-form/item-text.css +3 -3
  434. package/theme/ap-form/modal-form.css +3 -3
  435. package/theme/ap-form/search-form-sorter.css +14 -12
  436. package/theme/ap-form/search-form-sorter.less +7 -5
  437. package/theme/ap-form/search-form.css +25 -20
  438. package/theme/ap-form/search-form.less +3 -3
  439. package/theme/ap-grid/editable.css +3 -3
  440. package/theme/ap-grid/index.css +73 -40
  441. package/theme/ap-grid/index.less +26 -8
  442. package/theme/ap-group-search/ap-extension-select.css +3 -3
  443. package/theme/ap-group-search/ap-group-search.css +3 -3
  444. package/theme/ap-group-search/ap-popover-select.css +3 -3
  445. package/theme/ap-image/ap-image.css +3 -3
  446. package/theme/ap-input-radio/ap-input-radio.css +3 -3
  447. package/theme/ap-label/ap-label.css +3 -3
  448. package/theme/ap-ladder/ap-ladder.css +6 -6
  449. package/theme/ap-layout/ap-info-layout.css +3 -3
  450. package/theme/ap-list/index.css +3 -3
  451. package/theme/ap-product-info/ap-product-info.css +23 -33
  452. package/theme/ap-product-info/ap-product-info.less +28 -42
  453. package/theme/ap-radio-group/ap-radio-group.css +66 -0
  454. package/theme/ap-radio-group/ap-radio-group.less +26 -0
  455. package/theme/ap-select-layout/ap-select-layout.css +5 -5
  456. package/theme/ap-size-input/ap-size-input.css +3 -3
  457. package/theme/ap-status/ap-status.css +3 -3
  458. package/theme/ap-summary/index.css +3 -3
  459. package/theme/ap-table/ap-table-index.css +3 -3
  460. package/theme/ap-table/ap-table-paragraph-ellipsis.css +4 -4
  461. package/theme/ap-table/ap-table-paragraph-ellipsis.less +1 -1
  462. package/theme/ap-table/ap-table.css +80 -47
  463. package/theme/ap-table/ap-table.less +19 -7
  464. package/theme/ap-table/setting/index.css +18 -12
  465. package/theme/ap-table/setting/modal.css +10 -5
  466. package/theme/ap-table/setting/modal.less +6 -1
  467. package/theme/ap-table/setting/select-group.css +3 -3
  468. package/theme/ap-table/setting/sortable-item-meta.css +5 -5
  469. package/theme/ap-table/setting/sortable-item-meta.less +2 -2
  470. package/theme/ap-table/setting/sortable-item.css +3 -3
  471. package/theme/ap-table/setting/sorter.css +9 -8
  472. package/theme/ap-table/setting/sorter.less +4 -4
  473. package/theme/ap-table-modal/index.css +95 -60
  474. package/theme/ap-table-modal/index.less +15 -13
  475. package/theme/ap-tag/ap-tag-group.css +3 -3
  476. package/theme/ap-tag/ap-tag.css +7 -7
  477. package/theme/ap-tag/ap-tag.less +1 -1
  478. package/theme/ap-title/ap-title.css +3 -3
  479. package/theme/ap-upload/index.css +4 -4
  480. package/theme/ap-upload/multiple-file.css +3 -3
  481. package/theme/ap-upload/picture.css +3 -3
  482. package/theme/ap-upload/single-file.css +4 -4
  483. package/theme/ap-upload/upload.css +3 -3
  484. package/theme/ap-upload-single/index.css +7 -7
  485. package/theme/ap-upload-single/index.less +4 -4
  486. package/theme/ap-view/ap-view.css +10 -10
  487. package/theme/ap-view/ap-view.less +7 -7
  488. package/theme/batch-input-group/index.css +5 -5
  489. package/theme/batch-input-group/popover-input.css +5 -5
  490. package/theme/batch-input-group/popover-input.less +2 -2
  491. package/theme/check-card/index.css +11 -11
  492. package/theme/check-card/index.less +5 -5
  493. package/theme/editable-table/index.css +43 -27
  494. package/theme/full-screen/index.css +3 -3
  495. package/theme/index.css +350 -245
  496. package/theme/index.less +3 -0
  497. package/theme/mask/index.css +3 -3
  498. package/theme/mixins/config.less +3 -3
  499. package/theme/mixins/mixins.css +3 -3
  500. package/theme/mixins/mixins.less +2 -2
  501. package/theme/scroll-bar/index.css +3 -3
  502. package/theme/scroll-view/index.css +3 -3
  503. package/theme/splitter/index.css +7 -7
  504. package/theme/splitter/index.less +1 -1
  505. package/theme/text/group.css +3 -3
  506. package/theme/text/index.css +8 -8
  507. package/theme/text/index.less +4 -4
  508. package/theme/ui-mode.css +53 -83
  509. package/theme/ui-mode.less +103 -83
  510. package/theme/work-order-modal/index.css +3 -3
@@ -1,13 +1,13 @@
1
- import { defineComponent as K, computed as c, ref as w, watch as x, nextTick as f, createElementBlock as i, openBlock as a, normalizeClass as n, unref as t, createVNode as b, withCtx as m, createElementVNode as S, normalizeStyle as y, renderSlot as H, createBlock as $, toDisplayString as u, resolveDynamicComponent as I, Fragment as C, renderList as W, createCommentVNode as L, createTextVNode as j } from "vue";
2
- import { DownOutlined as J } from "@ant-design/icons-vue";
3
- import { Alert as P, Tooltip as Q } from "@aplus-frontend/antdv";
4
- import { ApActionItem as U } from "../../ap-action/index.mjs";
1
+ import { defineComponent as K, computed as c, ref as g, watch as x, nextTick as f, onMounted as W, createElementBlock as i, openBlock as a, normalizeClass as n, unref as t, createVNode as b, withCtx as m, createElementVNode as S, normalizeStyle as y, renderSlot as H, createBlock as $, toDisplayString as u, resolveDynamicComponent as I, Fragment as C, renderList as j, createCommentVNode as L, createTextVNode as J } from "vue";
2
+ import { DownOutlined as P } from "@ant-design/icons-vue";
3
+ import { Alert as Q, Tooltip as U } from "@aplus-frontend/antdv";
4
+ import { ApActionItem as X } from "../../ap-action/index.mjs";
5
5
  import "../../config-provider/index.mjs";
6
- import { isNil as X, isString as E } from "lodash-unified";
7
- import { useLocale as Y } from "../../config-provider/hooks/use-locale.mjs";
8
- import { useNamespace as Z } from "../../config-provider/hooks/use-namespace.mjs";
9
- import { useGlobalConfig as _ } from "../../config-provider/hooks/use-global-config.mjs";
10
- const ee = ["onClick"], de = /* @__PURE__ */ K({
6
+ import { isNil as Y, isString as E } from "lodash-unified";
7
+ import { useLocale as Z } from "../../config-provider/hooks/use-locale.mjs";
8
+ import { useNamespace as _ } from "../../config-provider/hooks/use-namespace.mjs";
9
+ import { useGlobalConfig as ee } from "../../config-provider/hooks/use-global-config.mjs";
10
+ const te = ["onClick"], ce = /* @__PURE__ */ K({
11
11
  __name: "ApExpandAlert",
12
12
  props: {
13
13
  type: { default: "warning" },
@@ -24,11 +24,11 @@ const ee = ["onClick"], de = /* @__PURE__ */ K({
24
24
  showIcon: { type: Boolean, default: !0 }
25
25
  },
26
26
  emits: ["choose", "expand"],
27
- setup(z, { expose: D, emit: V }) {
28
- const A = V, p = z, { t: B } = Y(), M = c(() => {
27
+ setup(z, { expose: D, emit: M }) {
28
+ const A = M, p = z, { t: B } = Z(), V = c(() => {
29
29
  if (p.type != "card")
30
30
  return p.type;
31
- }), l = w(""), d = w(null), R = c(() => ({
31
+ }), l = g(""), d = g(null), R = c(() => ({
32
32
  fontWeight: "400",
33
33
  wordBreak: "break-all",
34
34
  overflow: "hidden",
@@ -40,7 +40,7 @@ const ee = ["onClick"], de = /* @__PURE__ */ K({
40
40
  function q() {
41
41
  l.value === "1" ? (l.value = "", A("expand", "expand")) : (l.value = "1", A("expand", "collapse"));
42
42
  }
43
- const F = c(() => l.value === "1" ? B("ap.apExpandAlert.expand") : B("ap.apExpandAlert.collapse")), h = w(!0), N = c(() => l.value !== "1");
43
+ const F = c(() => l.value === "1" ? B("ap.apExpandAlert.expand") : B("ap.apExpandAlert.collapse")), h = g(!0), N = c(() => l.value !== "1");
44
44
  function v(e) {
45
45
  e ? l.value = "" : l.value = "1";
46
46
  }
@@ -49,10 +49,10 @@ const ee = ["onClick"], de = /* @__PURE__ */ K({
49
49
  () => {
50
50
  l.value = "", f(() => {
51
51
  if (d.value) {
52
- const e = Number(d.value.clientHeight), s = Number(
52
+ const e = Number(d.value.clientHeight), r = Number(
53
53
  parseInt(d.value.style.lineHeight)
54
54
  );
55
- e < s * Number(p.rows) && N.value ? h.value = !1 : h.value = !0;
55
+ e < r * Number(p.rows) && N.value ? h.value = !1 : h.value = !0;
56
56
  }
57
57
  });
58
58
  },
@@ -69,48 +69,50 @@ const ee = ["onClick"], de = /* @__PURE__ */ K({
69
69
  });
70
70
  },
71
71
  { immediate: !0 }
72
- ), x(
73
- () => p.contentStyle,
74
- (e) => {
75
- X(e.lineHeight) || f(() => {
76
- const s = document.querySelector(
77
- `#${k} .ant-alert-action`
78
- ), r = document.querySelector(
79
- `#${k} .ant-alert-icon`
80
- );
81
- console.log(s), s && s.setAttribute("style", `line-height: ${e.lineHeight}`), r && r.setAttribute("style", `line-height: ${e.lineHeight}`);
82
- });
83
- },
84
- {
85
- deep: !0,
86
- immediate: !0,
87
- flush: "post"
88
- }
89
- );
90
- const { b: T, e: o, m: O } = Z("ap-expand-alert"), k = `${T()}-key-${Date.now()}-${(Math.random() * 1e6).toFixed(0)}`, G = _("uiMode", "aplus");
72
+ ), W(() => {
73
+ x(
74
+ () => p.contentStyle,
75
+ (e) => {
76
+ Y(e.lineHeight) || f(() => {
77
+ const r = document.querySelector(
78
+ `#${k} .ant-alert-action`
79
+ ), s = document.querySelector(
80
+ `#${k} .ant-alert-icon`
81
+ );
82
+ r && r.setAttribute("style", `line-height: ${e.lineHeight}`), s && s.setAttribute("style", `line-height: ${e.lineHeight}`);
83
+ });
84
+ },
85
+ {
86
+ deep: !0,
87
+ immediate: !0,
88
+ flush: "post"
89
+ }
90
+ );
91
+ });
92
+ const { b: T, e: o, m: O } = _("ap-expand-alert"), k = `${T()}-key-${Date.now()}-${(Math.random() * 1e6).toFixed(0)}`, G = ee("uiMode", "aplus");
91
93
  return D({
92
94
  setExpand: v
93
- }), (e, s) => (a(), i("div", {
95
+ }), (e, r) => (a(), i("div", {
94
96
  id: k,
95
97
  class: n([t(T)(), `${t(O)(t(G))}`])
96
98
  }, [
97
- b(t(P), {
98
- type: M.value,
99
+ b(t(Q), {
100
+ type: V.value,
99
101
  "show-icon": e.showIcon,
100
102
  class: n([t(o)("antAlert"), e.type == "card" ? "card-alert" : ""])
101
103
  }, {
102
104
  action: m(() => [
103
- h.value ? (a(), $(t(U), {
105
+ h.value ? (a(), $(t(X), {
104
106
  key: 0,
105
107
  size: "small",
106
108
  style: { "font-size": "12px", "padding-left": "16px" },
107
- onClick: s[0] || (s[0] = (r) => q())
109
+ onClick: r[0] || (r[0] = (s) => q())
108
110
  }, {
109
111
  default: m(() => [
110
112
  S("span", {
111
113
  class: n(t(o)("expandText"))
112
114
  }, u(F.value), 3),
113
- b(t(J), {
115
+ b(t(P), {
114
116
  class: n(N.value ? t(o)("expandIcon") : t(o)("collapseIcon"))
115
117
  }, null, 8, ["class"])
116
118
  ]),
@@ -136,30 +138,30 @@ const ee = ["onClick"], de = /* @__PURE__ */ K({
136
138
  t(E)(e.data) ? (a(), i("span", {
137
139
  key: 2,
138
140
  class: n(t(o)("text"))
139
- }, u(e.data), 3)) : (a(!0), i(C, { key: 3 }, W(e.data, (r, g) => (a(), i(C, { key: g }, [
140
- b(t(Q), {
141
+ }, u(e.data), 3)) : (a(!0), i(C, { key: 3 }, j(e.data, (s, w) => (a(), i(C, { key: w }, [
142
+ b(t(U), {
141
143
  title: e.tipTitle ? e.tipTitle : null
142
144
  }, {
143
145
  default: m(() => [
144
146
  H(e.$slots, "item", {
145
- record: r,
146
- index: g
147
+ record: s,
148
+ index: w
147
149
  }, () => [
148
150
  S("span", {
149
151
  class: n(t(o)("showItem")),
150
- onClick: (te) => e.$emit("choose", r)
151
- }, u(e.mapLabel ? r[e.mapLabel] : r), 11, ee)
152
+ onClick: (ae) => e.$emit("choose", s)
153
+ }, u(e.mapLabel ? s[e.mapLabel] : s), 11, te)
152
154
  ])
153
155
  ]),
154
156
  _: 2
155
157
  }, 1032, ["title"]),
156
- g !== e.data.length - 1 ? (a(), i("span", {
158
+ w !== e.data.length - 1 ? (a(), i("span", {
157
159
  key: 0,
158
160
  class: n(t(o)("spliter")),
159
161
  style: y(e.separatorStyle)
160
162
  }, [
161
163
  t(E)(e.separator) ? (a(), i(C, { key: 0 }, [
162
- j(u(e.separator), 1)
164
+ J(u(e.separator), 1)
163
165
  ], 64)) : (a(), $(I(e.separator), { key: 1 }))
164
166
  ], 6)) : L("", !0)
165
167
  ], 64))), 128))
@@ -172,5 +174,5 @@ const ee = ["onClick"], de = /* @__PURE__ */ K({
172
174
  }
173
175
  });
174
176
  export {
175
- de as default
177
+ ce as default
176
178
  };
@@ -0,0 +1,10 @@
1
+ import { Recordable } from '../../../type';
2
+ import { cacheDataArrType, CacheInterface, PropertyKeyType } from '../interface';
3
+ export default class Cache implements CacheInterface {
4
+ store: Map<PropertyKeyType, Map<string, any>>;
5
+ constructor();
6
+ get(node: PropertyKeyType): Map<string, Recordable> | undefined;
7
+ set(node: PropertyKeyType, data: cacheDataArrType): void;
8
+ has(node: PropertyKeyType): boolean;
9
+ del(node: PropertyKeyType): boolean;
10
+ }
@@ -0,0 +1,16 @@
1
+ import { CacheInterface, PropertyKeyType, cacheDataArrType } from '../interface';
2
+ export declare class LruCacher implements CacheInterface {
3
+ store: Map<PropertyKeyType, Map<PropertyKeyType, any>>;
4
+ maxSize: number;
5
+ isExpired: boolean;
6
+ expiredTimer: ReturnType<typeof setTimeout> | null;
7
+ constructor(max?: number);
8
+ changeMaxSize(maxSize: number): void;
9
+ expireCheck(): void;
10
+ has(ModelKey: PropertyKeyType): boolean;
11
+ get(ModelKey: PropertyKeyType): Map<PropertyKey, any> | null | undefined;
12
+ set(ModelKey: PropertyKeyType, value: Map<string, any> | cacheDataArrType): void;
13
+ del(ModelKey: PropertyKeyType): void;
14
+ clear(): void;
15
+ }
16
+ export default LruCacher;
@@ -0,0 +1,43 @@
1
+ class r {
2
+ constructor(e = 50) {
3
+ this.store = /* @__PURE__ */ new Map(), this.maxSize = e, this.isExpired = !1, this.expiredTimer = null;
4
+ }
5
+ changeMaxSize(e) {
6
+ this.maxSize = e;
7
+ }
8
+ expireCheck() {
9
+ this.isExpired && (clearTimeout(this.expiredTimer), this.expiredTimer = setTimeout(() => {
10
+ this.isExpired = !1;
11
+ }));
12
+ }
13
+ has(e) {
14
+ return this.expireCheck(), this.store.has(e);
15
+ }
16
+ get(e) {
17
+ if (this.expireCheck(), !this.has(e))
18
+ return null;
19
+ const s = this.store.get(e);
20
+ return this.store.delete(e), this.store.set(e, s), s;
21
+ }
22
+ set(e, s) {
23
+ if (this.expireCheck(), !this.isExpired) {
24
+ if (this.has(e))
25
+ this.store.delete(e);
26
+ else if (this.store.size >= this.maxSize) {
27
+ const t = this.store.keys().next().value;
28
+ t && this.store.delete(t);
29
+ }
30
+ Array.isArray(s) && (s = new Map(s)), this.store.set(e, s);
31
+ }
32
+ }
33
+ del(e) {
34
+ this.isExpired = !0, this.store.delete(e);
35
+ }
36
+ clear() {
37
+ this.store.clear();
38
+ }
39
+ }
40
+ export {
41
+ r as LruCacher,
42
+ r as default
43
+ };
@@ -0,0 +1,10 @@
1
+ import { Ref } from 'vue';
2
+ import { CacheInterface, PropertyKeyType } from './interface';
3
+ type DataModel = {
4
+ getter: (key?: string) => Promise<any>;
5
+ setter: (key: string, data: any) => Promise<any>;
6
+ has: (key?: string) => Promise<any>;
7
+ };
8
+ export declare const useApKeepAliveProvide: (cache: CacheInterface, currentModuleKey: Ref<PropertyKeyType>) => void;
9
+ export declare const useApKeepAliveInject: () => DataModel;
10
+ export {};
@@ -0,0 +1,33 @@
1
+ import { provide as v, nextTick as i, inject as o } from "vue";
2
+ const a = Symbol("ApKeepAliveProvideKey"), f = (s, r) => {
3
+ v(a, {
4
+ getter: async (e) => {
5
+ await i();
6
+ const t = s.get(r.value);
7
+ return t ? e ? t == null ? void 0 : t.get(e) : Object.fromEntries(t) : {};
8
+ },
9
+ setter: async (e, t) => {
10
+ await i();
11
+ let n = s.get(r.value);
12
+ return n || (n = /* @__PURE__ */ new Map(), s.set(r.value, n)), n == null ? void 0 : n.set(e, t);
13
+ },
14
+ has: async (e) => {
15
+ if (await i(), e) {
16
+ const t = s.get(r.value);
17
+ return !!(t != null && t.has(e));
18
+ }
19
+ return s.has(r.value);
20
+ }
21
+ });
22
+ }, l = () => o(a, {
23
+ getter: async () => {
24
+ },
25
+ setter: async () => {
26
+ },
27
+ has: async () => {
28
+ }
29
+ });
30
+ export {
31
+ l as useApKeepAliveInject,
32
+ f as useApKeepAliveProvide
33
+ };
@@ -0,0 +1,108 @@
1
+ import { LruCacher } from './cacher/lru-cacher';
2
+ import { useApKeepAliveInject } from './hook';
3
+ import { matches as isNameMatches } from './utils';
4
+ import { CreateComponentPublicInstanceWithMixins, ExtractPropTypes, PropType, VNode, RendererNode, RendererElement, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, ComponentOptionsBase, VNodeProps, AllowedComponentProps, ComponentCustomProps, Plugin } from 'vue';
5
+ import { CacheInterface, MatchPattern } from './interface';
6
+ export * from './interface';
7
+ declare const ApKeepAlive: {
8
+ new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly< ExtractPropTypes<{
9
+ store: {
10
+ type: PropType<CacheInterface>;
11
+ };
12
+ debug: {
13
+ type: PropType<boolean>;
14
+ default: boolean;
15
+ };
16
+ max: {
17
+ type: PropType<number>;
18
+ default: number;
19
+ };
20
+ exclude: {
21
+ type: PropType<MatchPattern>;
22
+ };
23
+ include: {
24
+ type: PropType<MatchPattern>;
25
+ };
26
+ stopTags: {
27
+ type: PropType<string[]>;
28
+ default: () => never[];
29
+ };
30
+ }>> & Readonly<{}>, () => VNode<RendererNode, RendererElement, {
31
+ [key: string]: any;
32
+ }>[] | undefined, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
33
+ max: number;
34
+ debug: boolean;
35
+ stopTags: string[];
36
+ }, true, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
37
+ P: {};
38
+ B: {};
39
+ D: {};
40
+ C: {};
41
+ M: {};
42
+ Defaults: {};
43
+ }, Readonly< ExtractPropTypes<{
44
+ store: {
45
+ type: PropType<CacheInterface>;
46
+ };
47
+ debug: {
48
+ type: PropType<boolean>;
49
+ default: boolean;
50
+ };
51
+ max: {
52
+ type: PropType<number>;
53
+ default: number;
54
+ };
55
+ exclude: {
56
+ type: PropType<MatchPattern>;
57
+ };
58
+ include: {
59
+ type: PropType<MatchPattern>;
60
+ };
61
+ stopTags: {
62
+ type: PropType<string[]>;
63
+ default: () => never[];
64
+ };
65
+ }>> & Readonly<{}>, () => VNode<RendererNode, RendererElement, {
66
+ [key: string]: any;
67
+ }>[] | undefined, {}, {}, {}, {
68
+ max: number;
69
+ debug: boolean;
70
+ stopTags: string[];
71
+ }>;
72
+ __isFragment?: never;
73
+ __isTeleport?: never;
74
+ __isSuspense?: never;
75
+ } & ComponentOptionsBase<Readonly< ExtractPropTypes<{
76
+ store: {
77
+ type: PropType<CacheInterface>;
78
+ };
79
+ debug: {
80
+ type: PropType<boolean>;
81
+ default: boolean;
82
+ };
83
+ max: {
84
+ type: PropType<number>;
85
+ default: number;
86
+ };
87
+ exclude: {
88
+ type: PropType<MatchPattern>;
89
+ };
90
+ include: {
91
+ type: PropType<MatchPattern>;
92
+ };
93
+ stopTags: {
94
+ type: PropType<string[]>;
95
+ default: () => never[];
96
+ };
97
+ }>> & Readonly<{}>, () => VNode<RendererNode, RendererElement, {
98
+ [key: string]: any;
99
+ }>[] | undefined, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
100
+ max: number;
101
+ debug: boolean;
102
+ stopTags: string[];
103
+ }, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & ( Plugin & (new (...args: any[]) => {
104
+ $props: {
105
+ onClick?: () => void;
106
+ };
107
+ }));
108
+ export { ApKeepAlive, LruCacher, useApKeepAliveInject, isNameMatches };
@@ -0,0 +1,15 @@
1
+ import { withInstall as e } from "@aplus-frontend/utils";
2
+ import o from "./keep-alive.mjs";
3
+ import { LruCacher as i } from "./cacher/lru-cacher.mjs";
4
+ import { useApKeepAliveInject as a } from "./hook.mjs";
5
+ import { matches as c } from "./utils.mjs";
6
+ import { ApKeepAliveProps as x, forceStopTags as h } from "./interface.mjs";
7
+ const t = e(o);
8
+ export {
9
+ t as ApKeepAlive,
10
+ x as ApKeepAliveProps,
11
+ i as LruCacher,
12
+ h as forceStopTags,
13
+ c as isNameMatches,
14
+ a as useApKeepAliveInject
15
+ };
@@ -0,0 +1,36 @@
1
+ import { PropType } from 'vue';
2
+ import { Recordable } from '../../type';
3
+ export type PropertyKeyType = PropertyKey;
4
+ export interface CacheInterface {
5
+ get: (key: PropertyKeyType) => any;
6
+ set: (key: PropertyKeyType, data: any) => any;
7
+ has: (key: PropertyKeyType) => boolean;
8
+ del: (key: PropertyKeyType) => any;
9
+ [key: string]: any;
10
+ }
11
+ export type cacheDataArrType = [string, Recordable<any>][];
12
+ export type MatchPattern = string | RegExp | (string | RegExp)[];
13
+ export declare const ApKeepAliveProps: () => {
14
+ store: {
15
+ type: PropType<CacheInterface>;
16
+ };
17
+ debug: {
18
+ type: PropType<boolean>;
19
+ default: boolean;
20
+ };
21
+ max: {
22
+ type: PropType<number>;
23
+ default: number;
24
+ };
25
+ exclude: {
26
+ type: PropType<MatchPattern>;
27
+ };
28
+ include: {
29
+ type: PropType<MatchPattern>;
30
+ };
31
+ stopTags: {
32
+ type: PropType<string[]>;
33
+ default: () => never[];
34
+ };
35
+ };
36
+ export declare const forceStopTags: string[];
@@ -0,0 +1,54 @@
1
+ const e = () => ({
2
+ store: {
3
+ type: Object
4
+ },
5
+ debug: {
6
+ type: Boolean,
7
+ default: !1
8
+ },
9
+ max: {
10
+ type: Number,
11
+ default: 30
12
+ },
13
+ exclude: {
14
+ type: Array
15
+ },
16
+ include: {
17
+ type: Array
18
+ },
19
+ stopTags: {
20
+ type: Array,
21
+ default: () => []
22
+ }
23
+ }), t = [
24
+ "ATable",
25
+ "ApKeepAlive",
26
+ "EditableTable",
27
+ "EditableTableInner",
28
+ "ApFormSearchForm",
29
+ "VxeTable",
30
+ "RouterView",
31
+ "APagination",
32
+ "ApTablePagination",
33
+ "ApView",
34
+ "ApTitle",
35
+ "span",
36
+ "svg",
37
+ "iframe",
38
+ "ApTableSetting",
39
+ "ApDescriptions",
40
+ "ApList",
41
+ "ApTable",
42
+ "ApGrid",
43
+ "ApBatchActionGroup",
44
+ "ApBatchAction",
45
+ "EditableGrid",
46
+ //todo EditableGridFormItem 改名
47
+ // 'ApFormItem',
48
+ "AFormItem"
49
+ // 'AForm', 不能忽略,有嵌套情况
50
+ ];
51
+ export {
52
+ e as ApKeepAliveProps,
53
+ t as forceStopTags
54
+ };
@@ -0,0 +1,54 @@
1
+ import { VNode, DefineComponent, ExtractPropTypes, PropType, RendererNode, RendererElement, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
+ import { CacheInterface, MatchPattern } from './interface';
3
+ declare const _default: DefineComponent<ExtractPropTypes<{
4
+ store: {
5
+ type: PropType<CacheInterface>;
6
+ };
7
+ debug: {
8
+ type: PropType<boolean>;
9
+ default: boolean;
10
+ };
11
+ max: {
12
+ type: PropType<number>;
13
+ default: number;
14
+ };
15
+ exclude: {
16
+ type: PropType<MatchPattern>;
17
+ };
18
+ include: {
19
+ type: PropType<MatchPattern>;
20
+ };
21
+ stopTags: {
22
+ type: PropType<string[]>;
23
+ default: () => never[];
24
+ };
25
+ }>, () => VNode< RendererNode, RendererElement, {
26
+ [key: string]: any;
27
+ }>[] | undefined, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
28
+ store: {
29
+ type: PropType<CacheInterface>;
30
+ };
31
+ debug: {
32
+ type: PropType<boolean>;
33
+ default: boolean;
34
+ };
35
+ max: {
36
+ type: PropType<number>;
37
+ default: number;
38
+ };
39
+ exclude: {
40
+ type: PropType<MatchPattern>;
41
+ };
42
+ include: {
43
+ type: PropType<MatchPattern>;
44
+ };
45
+ stopTags: {
46
+ type: PropType<string[]>;
47
+ default: () => never[];
48
+ };
49
+ }>> & Readonly<{}>, {
50
+ max: number;
51
+ debug: boolean;
52
+ stopTags: string[];
53
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
54
+ export default _default;