@aplus-frontend/ui 7.5.0 → 7.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (367) hide show
  1. package/es/index.mjs +200 -198
  2. package/es/src/ag-grid/editable/form-item.vue.mjs +14 -14
  3. package/es/src/ag-grid/editable/index.vue.mjs +20 -20
  4. package/es/src/ag-grid/hooks/use-columns-def.mjs +32 -31
  5. package/es/src/ag-grid/hooks/use-editable-api.mjs +9 -8
  6. package/es/src/ag-grid/hooks/use-editable-columns.mjs +26 -25
  7. package/es/src/ag-grid/hooks/use-editable-form-item-api.mjs +11 -10
  8. package/es/src/ag-grid/index.vue.mjs +37 -36
  9. package/es/src/ag-grid/renderer/number.mjs +7 -7
  10. package/es/src/ag-grid/style/custom-header.mjs +3 -3
  11. package/es/src/ag-grid/style/index.mjs +1 -1
  12. package/es/src/ap-action/style/index.mjs +1 -1
  13. package/es/src/ap-drawer/style/index.mjs +12 -12
  14. package/es/src/ap-field/date/index.vue.mjs +14 -14
  15. package/es/src/ap-field/date/read.vue2.mjs +3 -3
  16. package/es/src/ap-field/date-range/index.vue.mjs +8 -8
  17. package/es/src/ap-field/date-range/read.vue2.mjs +3 -3
  18. package/es/src/ap-field/hooks/use-default-placeholder.mjs +5 -4
  19. package/es/src/ap-field/number/helper.mjs +1 -1
  20. package/es/src/ap-field/number/index.vue.mjs +9 -9
  21. package/es/src/ap-field/number/read.vue2.mjs +5 -5
  22. package/es/src/ap-field/style/checkbox.d.ts +2 -2
  23. package/es/src/ap-field/style/number.d.ts +2 -2
  24. package/es/src/ap-field/style/radio.d.ts +2 -2
  25. package/es/src/ap-field/style/textarea.d.ts +2 -2
  26. package/es/src/ap-field/switch/index.vue.mjs +4 -3
  27. package/es/src/ap-form/ap-form.vue2.mjs +18 -17
  28. package/es/src/ap-form/item/index.vue.mjs +6 -6
  29. package/es/src/ap-form/item-group/helper.mjs +8 -7
  30. package/es/src/ap-form/item-group/index.vue.mjs +15 -14
  31. package/es/src/ap-form/items/number/index.vue.d.ts +2 -2
  32. package/es/src/ap-form/items/select/index.vue.d.ts +2 -2
  33. package/es/src/ap-form/items/text/index.vue.d.ts +2 -2
  34. package/es/src/ap-form/items/text/password.vue.d.ts +2 -2
  35. package/es/src/ap-form/items/tree-select/index.vue.d.ts +2 -2
  36. package/es/src/ap-form/search-form/components/popover-filter.vue.d.ts +1 -1
  37. package/es/src/ap-form/search-form/components/popover-filter.vue2.mjs +24 -22
  38. package/es/src/ap-form/search-form/components/popover-sorter/index.vue2.mjs +4 -1
  39. package/es/src/ap-form/search-form/hooks/use-sorter.mjs +9 -8
  40. package/es/src/ap-form/search-form/index.vue.mjs +12 -11
  41. package/es/src/ap-form/set/index.vue.mjs +1 -1
  42. package/es/src/ap-form/style/item.mjs +15 -15
  43. package/es/src/ap-form/style/modal-form.mjs +2 -1
  44. package/es/src/ap-form/style/search-form-sorter.mjs +1 -1
  45. package/es/src/ap-form/style/search-form.d.ts +7 -1
  46. package/es/src/ap-form/style/search-form.mjs +37 -34
  47. package/es/src/ap-grid/editable/form-item.vue.mjs +11 -10
  48. package/es/src/ap-grid/editable/index.vue.mjs +42 -41
  49. package/es/src/ap-grid/index.vue.mjs +14 -13
  50. package/es/src/ap-grid/style/editable.mjs +7 -7
  51. package/es/src/ap-grid/style/index.mjs +11 -11
  52. package/es/src/ap-grid/utils/table.mjs +14 -13
  53. package/es/src/ap-list/hooks/use-offline-list.d.ts +2 -2
  54. package/es/src/ap-list/hooks/use-offline-list.mjs +13 -12
  55. package/es/src/ap-list/style/index.mjs +1 -1
  56. package/es/src/ap-pro-card/style/divider.mjs +2 -2
  57. package/es/src/ap-pro-card/style/index.mjs +14 -14
  58. package/es/src/ap-pro-card/style/operation.mjs +1 -2
  59. package/es/src/ap-pro-card/style/statistic.mjs +12 -12
  60. package/es/src/ap-pro-card/style/statistics-card.mjs +13 -13
  61. package/es/src/ap-pro-card/style/title.mjs +13 -33
  62. package/es/src/ap-table/ap-table.vue2.mjs +4 -3
  63. package/es/src/ap-table/constants.d.ts +5 -5
  64. package/es/src/ap-table/hooks/use-table-column-state.mjs +23 -22
  65. package/es/src/ap-table/hooks/use-table-paging-ng.d.ts +2 -2
  66. package/es/src/ap-table/hooks/use-table-paging-ng.mjs +4 -3
  67. package/es/src/ap-table/style/index-comp.d.ts +2 -1
  68. package/es/src/ap-table/style/index-comp.mjs +15 -12
  69. package/es/src/ap-table/style/index.d.ts +3 -0
  70. package/es/src/ap-table/style/index.mjs +14 -11
  71. package/es/src/ap-table/style/setting.d.ts +2 -1
  72. package/es/src/ap-table/style/setting.mjs +73 -61
  73. package/es/src/ap-table/utils.mjs +61 -62
  74. package/es/src/business/ag-grid-modal/modal-layout/index.vue2.mjs +15 -15
  75. package/es/src/business/ag-grid-modal/style/index.d.ts +3 -0
  76. package/es/src/business/ag-grid-modal/style/index.mjs +24 -20
  77. package/es/src/business/ag-grid-modal/style/selected-items.mjs +8 -8
  78. package/es/src/business/ap-appendix/ap-appendix.vue2.mjs +26 -27
  79. package/es/src/business/ap-appendix/style/index.mjs +20 -21
  80. package/es/src/business/ap-attachment/style/index.d.ts +6 -0
  81. package/es/src/business/ap-attachment/style/index.mjs +28 -25
  82. package/es/src/business/ap-batch-action/style/index.d.ts +2 -2
  83. package/es/src/business/ap-batch-action/style/index.mjs +18 -18
  84. package/es/src/business/ap-card/style/index.d.ts +2 -2
  85. package/es/src/business/ap-card/style/index.mjs +8 -8
  86. package/es/src/business/ap-copy/style/index.mjs +16 -22
  87. package/es/src/business/ap-descriptions/formatter/index.mjs +1 -1
  88. package/es/src/business/ap-descriptions/style/index.mjs +8 -6
  89. package/es/src/business/ap-download/style/index.mjs +4 -4
  90. package/es/src/business/ap-draggable-grid/style/index.mjs +7 -7
  91. package/es/src/business/ap-expand-alert/style/index.mjs +30 -26
  92. package/es/src/business/ap-image/style/index.d.ts +2 -2
  93. package/es/src/business/ap-image/style/index.mjs +8 -7
  94. package/es/src/business/ap-input-radio/style/index.mjs +1 -1
  95. package/es/src/business/ap-label/style/index.d.ts +14 -0
  96. package/es/src/business/ap-label/style/index.mjs +29 -19
  97. package/es/src/business/ap-ladder/style/index.mjs +7 -6
  98. package/es/src/business/ap-product-info/style/index.d.ts +10 -0
  99. package/es/src/business/ap-product-info/style/index.mjs +35 -28
  100. package/es/src/business/ap-radio-group/style/index.mjs +3 -3
  101. package/es/src/business/ap-select-layout/select-layout.vue2.mjs +6 -6
  102. package/es/src/business/ap-select-layout/style/index.d.ts +6 -0
  103. package/es/src/business/ap-select-layout/style/index.mjs +59 -53
  104. package/es/src/business/ap-size-input/style/index.mjs +3 -3
  105. package/es/src/business/ap-status/style/index.mjs +1 -1
  106. package/es/src/business/ap-summary/style/index.d.ts +10 -0
  107. package/es/src/business/ap-summary/style/index.mjs +18 -11
  108. package/es/src/business/ap-table-modal/style/index.d.ts +11 -1
  109. package/es/src/business/ap-table-modal/style/index.mjs +17 -12
  110. package/es/src/business/ap-tag/ap-tag-group.vue.mjs +2 -2
  111. package/es/src/business/ap-tag/style/index.mjs +33 -31
  112. package/es/src/business/ap-title/style/index.d.ts +2 -1
  113. package/es/src/business/ap-title/style/index.mjs +41 -49
  114. package/es/src/business/ap-upload/style/index.mjs +10 -5
  115. package/es/src/business/ap-upload/style/multiple-file.d.ts +2 -2
  116. package/es/src/business/ap-upload/style/multiple-file.mjs +8 -7
  117. package/es/src/business/ap-upload/style/picture.d.ts +3 -2
  118. package/es/src/business/ap-upload/style/picture.mjs +26 -26
  119. package/es/src/business/ap-upload/style/single-file.d.ts +3 -2
  120. package/es/src/business/ap-upload/style/single-file.mjs +30 -29
  121. package/es/src/business/ap-upload/style/token.d.ts +19 -0
  122. package/es/src/business/ap-upload/style/token.mjs +9 -0
  123. package/es/src/business/ap-upload-file/ap-upload-single/style/index.d.ts +24 -2
  124. package/es/src/business/ap-upload-file/ap-upload-single/style/index.mjs +51 -42
  125. package/es/src/business/ap-upload-file/icon/delete-icon.vue.mjs +2 -2
  126. package/es/src/business/ap-upload-file/icon/file-icon.vue.mjs +2 -2
  127. package/es/src/business/ap-value-select-card/style/index.mjs +45 -43
  128. package/es/src/business/ap-view/components/main-button-content.vue2.mjs +14 -14
  129. package/es/src/business/ap-view/components/menu-list-content.vue2.mjs +35 -34
  130. package/es/src/business/ap-view/icons/line-delete.vue.mjs +2 -2
  131. package/es/src/business/ap-view/icons/line-down.vue.mjs +2 -2
  132. package/es/src/business/ap-view/icons/line-eye.vue.mjs +2 -2
  133. package/es/src/business/ap-view/style/index.d.ts +6 -2
  134. package/es/src/business/ap-view/style/index.mjs +43 -35
  135. package/es/src/business/batch-input-group/index.vue.d.ts +1 -1
  136. package/es/src/business/batch-input-group/index.vue.mjs +23 -22
  137. package/es/src/business/batch-input-group/style/index.mjs +2 -2
  138. package/es/src/check-card/style/index.mjs +17 -17
  139. package/es/src/design-token/constants.mjs +9 -1
  140. package/es/src/design-token/interface.d.ts +139 -12
  141. package/es/src/editable-table/form-item.vue.mjs +4 -3
  142. package/es/src/editable-table/index.vue.mjs +4 -3
  143. package/es/src/editable-table/style/index.mjs +11 -11
  144. package/es/src/editable-table/utils.d.ts +1 -1
  145. package/es/src/editable-table/utils.mjs +27 -26
  146. package/es/src/highlight/index.d.ts +3 -0
  147. package/es/src/highlight/index.mjs +2 -0
  148. package/es/src/highlight/index.vue.d.ts +31 -0
  149. package/es/src/highlight/index.vue.mjs +49 -0
  150. package/es/src/highlight/index.vue2.mjs +4 -0
  151. package/es/src/highlight/interface.d.ts +14 -0
  152. package/es/src/highlight/interface.mjs +1 -0
  153. package/es/src/highlight/style/index.d.ts +8 -0
  154. package/es/src/highlight/style/index.mjs +23 -0
  155. package/es/src/hooks/useMessage.mjs +4 -4
  156. package/es/src/index.d.ts +1 -0
  157. package/es/src/index.mjs +296 -293
  158. package/es/src/loading-bar/index.vue2.mjs +4 -3
  159. package/es/src/loading-bar/style/index.mjs +10 -10
  160. package/es/src/scroll-view/hooks/use-scroll-smooth.mjs +10 -9
  161. package/es/src/scroll-view/index.vue.mjs +4 -3
  162. package/es/src/splitter/style/index.mjs +11 -11
  163. package/es/src/text/index.vue.mjs +8 -7
  164. package/es/src/time-ago/index.vue.mjs +17 -16
  165. package/es/src/time-ago/useTimeAgo.mjs +31 -30
  166. package/es/src/utils/cssinjs/TokenUtil.d.ts +1 -0
  167. package/es/src/utils/cssinjs/TokenUtil.mjs +3 -0
  168. package/es/src/utils/decimal.d.ts +36 -0
  169. package/es/src/utils/decimal.mjs +45 -0
  170. package/es/src/utils/format.d.ts +21 -0
  171. package/es/src/utils/format.mjs +32 -0
  172. package/es/src/utils/index.d.ts +2 -1
  173. package/es/src/utils/index.mjs +20 -22
  174. package/es/src/utils/is.d.ts +54 -0
  175. package/es/src/utils/is.mjs +26 -0
  176. package/es/src/utils/slot.mjs +1 -2
  177. package/es/src/version.d.ts +1 -1
  178. package/es/src/version.mjs +1 -1
  179. package/lib/index.js +1 -1
  180. package/lib/src/ag-grid/editable/form-item.vue.js +1 -1
  181. package/lib/src/ag-grid/editable/index.vue.js +1 -1
  182. package/lib/src/ag-grid/hooks/use-columns-def.js +1 -1
  183. package/lib/src/ag-grid/hooks/use-editable-api.js +1 -1
  184. package/lib/src/ag-grid/hooks/use-editable-columns.js +1 -1
  185. package/lib/src/ag-grid/hooks/use-editable-form-item-api.js +1 -1
  186. package/lib/src/ag-grid/index.vue.js +1 -1
  187. package/lib/src/ag-grid/renderer/number.js +1 -1
  188. package/lib/src/ag-grid/style/custom-header.js +1 -1
  189. package/lib/src/ag-grid/style/index.js +1 -1
  190. package/lib/src/ap-action/style/index.js +1 -1
  191. package/lib/src/ap-drawer/style/index.js +1 -1
  192. package/lib/src/ap-field/date/index.vue.js +1 -1
  193. package/lib/src/ap-field/date/read.vue2.js +1 -1
  194. package/lib/src/ap-field/date-range/index.vue.js +1 -1
  195. package/lib/src/ap-field/date-range/read.vue2.js +1 -1
  196. package/lib/src/ap-field/hooks/use-default-placeholder.js +1 -1
  197. package/lib/src/ap-field/number/helper.js +1 -1
  198. package/lib/src/ap-field/number/index.vue.js +1 -1
  199. package/lib/src/ap-field/number/read.vue2.js +1 -1
  200. package/lib/src/ap-field/style/checkbox.d.ts +2 -2
  201. package/lib/src/ap-field/style/number.d.ts +2 -2
  202. package/lib/src/ap-field/style/radio.d.ts +2 -2
  203. package/lib/src/ap-field/style/textarea.d.ts +2 -2
  204. package/lib/src/ap-field/switch/index.vue.js +1 -1
  205. package/lib/src/ap-form/ap-form.vue2.js +1 -1
  206. package/lib/src/ap-form/item/index.vue.js +1 -1
  207. package/lib/src/ap-form/item-group/helper.js +1 -1
  208. package/lib/src/ap-form/item-group/index.vue.js +1 -1
  209. package/lib/src/ap-form/items/number/index.vue.d.ts +2 -2
  210. package/lib/src/ap-form/items/select/index.vue.d.ts +2 -2
  211. package/lib/src/ap-form/items/text/index.vue.d.ts +2 -2
  212. package/lib/src/ap-form/items/text/password.vue.d.ts +2 -2
  213. package/lib/src/ap-form/items/tree-select/index.vue.d.ts +2 -2
  214. package/lib/src/ap-form/search-form/components/popover-filter.vue.d.ts +1 -1
  215. package/lib/src/ap-form/search-form/components/popover-filter.vue2.js +1 -1
  216. package/lib/src/ap-form/search-form/components/popover-sorter/index.vue2.js +1 -1
  217. package/lib/src/ap-form/search-form/hooks/use-sorter.js +1 -1
  218. package/lib/src/ap-form/search-form/index.vue.js +1 -1
  219. package/lib/src/ap-form/set/index.vue.js +1 -1
  220. package/lib/src/ap-form/style/item.js +1 -1
  221. package/lib/src/ap-form/style/modal-form.js +1 -1
  222. package/lib/src/ap-form/style/search-form-sorter.js +1 -1
  223. package/lib/src/ap-form/style/search-form.d.ts +7 -1
  224. package/lib/src/ap-form/style/search-form.js +1 -1
  225. package/lib/src/ap-grid/editable/form-item.vue.js +1 -1
  226. package/lib/src/ap-grid/editable/index.vue.js +1 -1
  227. package/lib/src/ap-grid/index.vue.js +1 -1
  228. package/lib/src/ap-grid/style/editable.js +1 -1
  229. package/lib/src/ap-grid/style/index.js +1 -1
  230. package/lib/src/ap-grid/utils/table.js +1 -1
  231. package/lib/src/ap-list/hooks/use-offline-list.d.ts +2 -2
  232. package/lib/src/ap-list/hooks/use-offline-list.js +1 -1
  233. package/lib/src/ap-list/style/index.js +1 -1
  234. package/lib/src/ap-pro-card/style/divider.js +1 -1
  235. package/lib/src/ap-pro-card/style/index.js +1 -1
  236. package/lib/src/ap-pro-card/style/operation.js +1 -1
  237. package/lib/src/ap-pro-card/style/statistic.js +1 -1
  238. package/lib/src/ap-pro-card/style/statistics-card.js +1 -1
  239. package/lib/src/ap-pro-card/style/title.js +1 -1
  240. package/lib/src/ap-table/ap-table.vue2.js +1 -1
  241. package/lib/src/ap-table/constants.d.ts +5 -5
  242. package/lib/src/ap-table/hooks/use-table-column-state.js +1 -1
  243. package/lib/src/ap-table/hooks/use-table-paging-ng.d.ts +2 -2
  244. package/lib/src/ap-table/hooks/use-table-paging-ng.js +1 -1
  245. package/lib/src/ap-table/style/index-comp.d.ts +2 -1
  246. package/lib/src/ap-table/style/index-comp.js +1 -1
  247. package/lib/src/ap-table/style/index.d.ts +3 -0
  248. package/lib/src/ap-table/style/index.js +1 -1
  249. package/lib/src/ap-table/style/setting.d.ts +2 -1
  250. package/lib/src/ap-table/style/setting.js +1 -1
  251. package/lib/src/ap-table/utils.js +1 -1
  252. package/lib/src/business/ag-grid-modal/modal-layout/index.vue2.js +1 -1
  253. package/lib/src/business/ag-grid-modal/style/index.d.ts +3 -0
  254. package/lib/src/business/ag-grid-modal/style/index.js +1 -1
  255. package/lib/src/business/ag-grid-modal/style/selected-items.js +1 -1
  256. package/lib/src/business/ap-appendix/ap-appendix.vue2.js +1 -1
  257. package/lib/src/business/ap-appendix/style/index.js +1 -1
  258. package/lib/src/business/ap-attachment/style/index.d.ts +6 -0
  259. package/lib/src/business/ap-attachment/style/index.js +1 -1
  260. package/lib/src/business/ap-batch-action/style/index.d.ts +2 -2
  261. package/lib/src/business/ap-batch-action/style/index.js +1 -1
  262. package/lib/src/business/ap-card/style/index.d.ts +2 -2
  263. package/lib/src/business/ap-card/style/index.js +1 -1
  264. package/lib/src/business/ap-copy/style/index.js +1 -1
  265. package/lib/src/business/ap-descriptions/formatter/index.js +1 -1
  266. package/lib/src/business/ap-descriptions/style/index.js +1 -1
  267. package/lib/src/business/ap-download/style/index.js +1 -1
  268. package/lib/src/business/ap-draggable-grid/style/index.js +1 -1
  269. package/lib/src/business/ap-expand-alert/style/index.js +1 -1
  270. package/lib/src/business/ap-image/style/index.d.ts +2 -2
  271. package/lib/src/business/ap-image/style/index.js +1 -1
  272. package/lib/src/business/ap-input-radio/style/index.js +1 -1
  273. package/lib/src/business/ap-label/style/index.d.ts +14 -0
  274. package/lib/src/business/ap-label/style/index.js +1 -1
  275. package/lib/src/business/ap-ladder/style/index.js +1 -1
  276. package/lib/src/business/ap-product-info/style/index.d.ts +10 -0
  277. package/lib/src/business/ap-product-info/style/index.js +1 -1
  278. package/lib/src/business/ap-radio-group/style/index.js +1 -1
  279. package/lib/src/business/ap-select-layout/select-layout.vue2.js +1 -1
  280. package/lib/src/business/ap-select-layout/style/index.d.ts +6 -0
  281. package/lib/src/business/ap-select-layout/style/index.js +1 -1
  282. package/lib/src/business/ap-size-input/style/index.js +1 -1
  283. package/lib/src/business/ap-status/style/index.js +1 -1
  284. package/lib/src/business/ap-summary/style/index.d.ts +10 -0
  285. package/lib/src/business/ap-summary/style/index.js +1 -1
  286. package/lib/src/business/ap-table-modal/style/index.d.ts +11 -1
  287. package/lib/src/business/ap-table-modal/style/index.js +1 -1
  288. package/lib/src/business/ap-tag/ap-tag-group.vue.js +1 -1
  289. package/lib/src/business/ap-tag/style/index.js +1 -1
  290. package/lib/src/business/ap-title/style/index.d.ts +2 -1
  291. package/lib/src/business/ap-title/style/index.js +1 -1
  292. package/lib/src/business/ap-upload/style/index.js +1 -1
  293. package/lib/src/business/ap-upload/style/multiple-file.d.ts +2 -2
  294. package/lib/src/business/ap-upload/style/multiple-file.js +1 -1
  295. package/lib/src/business/ap-upload/style/picture.d.ts +3 -2
  296. package/lib/src/business/ap-upload/style/picture.js +1 -1
  297. package/lib/src/business/ap-upload/style/single-file.d.ts +3 -2
  298. package/lib/src/business/ap-upload/style/single-file.js +1 -1
  299. package/lib/src/business/ap-upload/style/token.d.ts +19 -0
  300. package/lib/src/business/ap-upload/style/token.js +1 -0
  301. package/lib/src/business/ap-upload-file/ap-upload-single/style/index.d.ts +24 -2
  302. package/lib/src/business/ap-upload-file/ap-upload-single/style/index.js +1 -1
  303. package/lib/src/business/ap-upload-file/icon/delete-icon.vue.js +1 -1
  304. package/lib/src/business/ap-upload-file/icon/file-icon.vue.js +1 -1
  305. package/lib/src/business/ap-value-select-card/style/index.js +1 -1
  306. package/lib/src/business/ap-view/components/main-button-content.vue2.js +1 -1
  307. package/lib/src/business/ap-view/components/menu-list-content.vue2.js +1 -1
  308. package/lib/src/business/ap-view/icons/line-delete.vue.js +1 -1
  309. package/lib/src/business/ap-view/icons/line-down.vue.js +1 -1
  310. package/lib/src/business/ap-view/icons/line-eye.vue.js +1 -1
  311. package/lib/src/business/ap-view/style/index.d.ts +6 -2
  312. package/lib/src/business/ap-view/style/index.js +1 -1
  313. package/lib/src/business/batch-input-group/index.vue.d.ts +1 -1
  314. package/lib/src/business/batch-input-group/index.vue.js +2 -2
  315. package/lib/src/business/batch-input-group/style/index.js +1 -1
  316. package/lib/src/check-card/style/index.js +1 -1
  317. package/lib/src/design-token/constants.js +1 -1
  318. package/lib/src/design-token/interface.d.ts +139 -12
  319. package/lib/src/editable-table/form-item.vue.js +1 -1
  320. package/lib/src/editable-table/index.vue.js +1 -1
  321. package/lib/src/editable-table/style/index.js +1 -1
  322. package/lib/src/editable-table/utils.d.ts +1 -1
  323. package/lib/src/editable-table/utils.js +1 -1
  324. package/lib/src/highlight/index.d.ts +3 -0
  325. package/lib/src/highlight/index.js +1 -0
  326. package/lib/src/highlight/index.vue.d.ts +31 -0
  327. package/lib/src/highlight/index.vue.js +1 -0
  328. package/lib/src/highlight/index.vue2.js +1 -0
  329. package/lib/src/highlight/interface.d.ts +14 -0
  330. package/lib/src/highlight/interface.js +1 -0
  331. package/lib/src/highlight/style/index.d.ts +8 -0
  332. package/lib/src/highlight/style/index.js +1 -0
  333. package/lib/src/hooks/useMessage.js +1 -1
  334. package/lib/src/index.d.ts +1 -0
  335. package/lib/src/index.js +1 -1
  336. package/lib/src/loading-bar/index.vue2.js +1 -1
  337. package/lib/src/loading-bar/style/index.js +3 -3
  338. package/lib/src/scroll-view/hooks/use-scroll-smooth.js +1 -1
  339. package/lib/src/scroll-view/index.vue.js +1 -1
  340. package/lib/src/splitter/style/index.js +1 -1
  341. package/lib/src/text/index.vue.js +1 -1
  342. package/lib/src/time-ago/index.vue.js +1 -1
  343. package/lib/src/time-ago/useTimeAgo.js +1 -1
  344. package/lib/src/utils/cssinjs/TokenUtil.d.ts +1 -0
  345. package/lib/src/utils/cssinjs/TokenUtil.js +1 -1
  346. package/lib/src/utils/decimal.d.ts +36 -0
  347. package/lib/src/utils/decimal.js +1 -0
  348. package/lib/src/utils/format.d.ts +21 -0
  349. package/lib/src/utils/format.js +1 -0
  350. package/lib/src/utils/index.d.ts +2 -1
  351. package/lib/src/utils/index.js +1 -1
  352. package/lib/src/utils/is.d.ts +54 -0
  353. package/lib/src/utils/is.js +1 -0
  354. package/lib/src/utils/slot.js +1 -1
  355. package/lib/src/version.d.ts +1 -1
  356. package/lib/src/version.js +1 -1
  357. package/package.json +6 -6
  358. package/es/src/business/ap-appendix/icons/file-icon.vue.d.ts +0 -3
  359. package/es/src/business/ap-appendix/icons/file-icon.vue.mjs +0 -18
  360. package/es/src/utils/copy-text-to-clipboard.d.ts +0 -1
  361. package/es/src/utils/tree.d.ts +0 -38
  362. package/es/src/utils/uuid.d.ts +0 -2
  363. package/lib/src/business/ap-appendix/icons/file-icon.vue.d.ts +0 -3
  364. package/lib/src/business/ap-appendix/icons/file-icon.vue.js +0 -1
  365. package/lib/src/utils/copy-text-to-clipboard.d.ts +0 -1
  366. package/lib/src/utils/tree.d.ts +0 -38
  367. package/lib/src/utils/uuid.d.ts +0 -2
@@ -1,10 +1,11 @@
1
1
  import { defineComponent as $, computed as u, ref as o, watch as n, onMounted as L, onBeforeUnmount as M, createBlock as N, openBlock as X, Transition as E, unref as h, withCtx as G, withDirectives as U, createElementVNode as _, normalizeStyle as z, normalizeClass as P, vShow as V } from "vue";
2
2
  import "../config-provider/index.mjs";
3
3
  import j from "./style/index.mjs";
4
- import { isDef as k } from "../utils/index.mjs";
4
+ import "../utils/index.mjs";
5
5
  import { useToken as H } from "../config-provider/hooks/use-token.mjs";
6
6
  import { useNamespace as J } from "../config-provider/hooks/use-namespace.mjs";
7
- const K = ["aria-valuenow"], O = 0.05, ae = /* @__PURE__ */ $({
7
+ import { isDef as k } from "../utils/is.mjs";
8
+ const K = ["aria-valuenow"], O = 0.05, te = /* @__PURE__ */ $({
8
9
  __name: "index",
9
10
  props: {
10
11
  defaultProgress: {
@@ -108,5 +109,5 @@ const K = ["aria-valuenow"], O = 0.05, ae = /* @__PURE__ */ $({
108
109
  }
109
110
  });
110
111
  export {
111
- ae as default
112
+ te as default
112
113
  };
@@ -1,10 +1,10 @@
1
- import { keyframes as e } from "@emotion/css";
1
+ import { keyframes as t } from "@emotion/css";
2
2
  import { genComponentStyleHook as i } from "../../utils/cssinjs/index.mjs";
3
- const s = {
3
+ const c = {
4
4
  loadingBarAnimateDuration: 250
5
5
  };
6
- function c() {
7
- const a = e`
6
+ function s() {
7
+ const a = t`
8
8
  0% {
9
9
  opacity: 0;
10
10
  }
@@ -12,7 +12,7 @@ function c() {
12
12
  100% {
13
13
  opacity: 1;
14
14
  }
15
- `, n = e`
15
+ `, n = t`
16
16
  0% {
17
17
  opacity: 1;
18
18
  }
@@ -24,7 +24,7 @@ function c() {
24
24
  return [a, n];
25
25
  }
26
26
  const m = (a) => {
27
- const [n, t] = c(), { componentCls: o, loadingBarAnimateDuration: r } = a;
27
+ const [n, e] = s(), { componentCls: o, loadingBarAnimateDuration: r } = a;
28
28
  return {
29
29
  [o]: {
30
30
  position: "absolute",
@@ -35,7 +35,7 @@ const m = (a) => {
35
35
  width: "100%",
36
36
  height: "100%",
37
37
  pointerEvents: "none",
38
- transition: "background-color .25s ease, transform .25s ease",
38
+ transition: `background-color ${a.motionDurationMid} ease, transform ${a.motionDurationMid} ease`,
39
39
  willChange: "transform"
40
40
  },
41
41
  "&--default": {
@@ -64,7 +64,7 @@ const m = (a) => {
64
64
  animationDuration: `${r}ms`
65
65
  },
66
66
  "&-leave-active": {
67
- animationName: t,
67
+ animationName: e,
68
68
  animationDuration: `${r}ms`
69
69
  }
70
70
  }
@@ -73,13 +73,13 @@ const m = (a) => {
73
73
  }, u = i(
74
74
  "LoadingBar",
75
75
  (a) => [m(a)],
76
- s,
76
+ c,
77
77
  {
78
78
  skipUnit: ["loadingBarAnimateDuration"]
79
79
  }
80
80
  );
81
81
  export {
82
82
  u as default,
83
- c as genFadeKeyFrames,
83
+ s as genFadeKeyFrames,
84
84
  m as genLoadingBarStyle
85
85
  };
@@ -1,20 +1,21 @@
1
1
  import "../../scroll-bar/index.mjs";
2
2
  import { useRafFn as R } from "@vueuse/core";
3
- import { isDef as f } from "../../utils/index.mjs";
3
+ import "../../utils/index.mjs";
4
4
  import { ensureRangeValue as s } from "../../scroll-bar/utils/index.mjs";
5
+ import { isDef as f } from "../../utils/is.mjs";
5
6
  const g = () => {
6
- }, b = (i) => 1 - Math.pow(1 - i, 3), V = ({
7
+ }, b = (i) => 1 - Math.pow(1 - i, 3), X = ({
7
8
  scrollOffset: i,
8
9
  maxScrollDistance: r,
9
10
  timer: l = 500,
10
- onScroll: u = g,
11
+ onScroll: m = g,
11
12
  onScrollEnd: T = g
12
13
  }) => {
13
- let m, e, t, o, n;
14
+ let u, e, t, o, n;
14
15
  const { pause: a, resume: w, isActive: p } = R(
15
16
  () => {
16
- const v = Date.now() - m, c = s(v / l, 0, 1), y = b(c);
17
- c === 1 ? (o && (i.x = t.x), n && (i.y = t.y), a(), u(o, n), T(o, n)) : (o && (t.x > e.x ? i.x = s(
17
+ const v = Date.now() - u, c = s(v / l, 0, 1), y = b(c);
18
+ c === 1 ? (o && (i.x = t.x), n && (i.y = t.y), a(), m(o, n), T(o, n)) : (o && (t.x > e.x ? i.x = s(
18
19
  e.x + (t.x - e.x) * y,
19
20
  e.x,
20
21
  r.x
@@ -30,12 +31,12 @@ const g = () => {
30
31
  t.y + (e.y - t.y) * (1 - y),
31
32
  0,
32
33
  e.y
33
- )), u(o, n));
34
+ )), m(o, n));
34
35
  },
35
36
  { immediate: !1 }
36
37
  );
37
38
  function d(x) {
38
- p.value && a(), m = Date.now(), e = {
39
+ p.value && a(), u = Date.now(), e = {
39
40
  x: i.x,
40
41
  y: i.y
41
42
  }, t = x, o = f(x.x), n = f(x.y), w();
@@ -46,5 +47,5 @@ const g = () => {
46
47
  return { start: d, stop: h, isActive: p };
47
48
  };
48
49
  export {
49
- V as useScrollSmooth
50
+ X as useScrollSmooth
50
51
  };
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as ue, ref as he, reactive as pe, computed as v, unref as a, watchEffect as _, watch as ye, createElementBlock as me, openBlock as P, withModifiers as M, normalizeStyle as A, normalizeClass as w, createElementVNode as z, renderSlot as de, createBlock as L, createCommentVNode as O, mergeProps as I } from "vue";
2
2
  import "../config-provider/index.mjs";
3
3
  import "../scroll-bar/index.mjs";
4
- import { isDef as f } from "../utils/index.mjs";
4
+ import "../utils/index.mjs";
5
5
  import { ensureRangeValue as n, getScrollable as k } from "../scroll-bar/utils/index.mjs";
6
6
  import ve from "./hooks/use-scroll-wrapper.mjs";
7
7
  import { isString as T } from "lodash-unified";
@@ -12,8 +12,9 @@ import { useScrollSmooth as Be } from "./hooks/use-scroll-smooth.mjs";
12
12
  import { getElementScrollOffset as Se } from "./utils/index.mjs";
13
13
  import ge from "./style/index.mjs";
14
14
  import { useNamespace as be } from "../config-provider/hooks/use-namespace.mjs";
15
+ import { isDef as f } from "../utils/is.mjs";
15
16
  import F from "../scroll-bar/internal.vue.mjs";
16
- const Ae = /* @__PURE__ */ ue({
17
+ const Le = /* @__PURE__ */ ue({
17
18
  name: "ScrollView",
18
19
  __name: "index",
19
20
  props: {
@@ -248,5 +249,5 @@ const Ae = /* @__PURE__ */ ue({
248
249
  }
249
250
  });
250
251
  export {
251
- Ae as default
252
+ Le as default
252
253
  };
@@ -1,5 +1,5 @@
1
- import { genComponentStyleHook as l } from "../../utils/cssinjs/index.mjs";
2
- const t = () => ({
1
+ import { genComponentStyleHook as o } from "../../utils/cssinjs/index.mjs";
2
+ const i = () => ({
3
3
  position: "absolute",
4
4
  top: "50%",
5
5
  left: "50%",
@@ -13,7 +13,7 @@ const t = () => ({
13
13
  transition: "none",
14
14
  pointerEvents: "none"
15
15
  }), s = (r) => {
16
- const { componentCls: e, namespace: o } = r, i = `--${o}-splitter-bar-preview-offset`;
16
+ const { componentCls: e, namespace: l } = r, t = `--${l}-splitter-bar-preview-offset`;
17
17
  return {
18
18
  [e]: {
19
19
  boxSizing: "border-box",
@@ -34,18 +34,18 @@ const t = () => ({
34
34
  userSelect: "none",
35
35
  [`${e}-bar-dragger`]: {
36
36
  zIndex: 1,
37
- ...t(r),
37
+ ...i(r),
38
38
  // Hover background
39
39
  "&::before": {
40
40
  content: '""',
41
41
  background: "rgba(0, 0, 0, 0.04)",
42
- ...t(r)
42
+ ...i(r)
43
43
  },
44
44
  // Spinner
45
45
  "&::after": {
46
46
  content: '""',
47
47
  background: "rgba(0, 0, 0, 0.15)",
48
- ...t(r)
48
+ ...i(r)
49
49
  },
50
50
  // Hover
51
51
  [`&:hover:not(${e}-bar-dragger-active)`]: {
@@ -74,11 +74,11 @@ const t = () => ({
74
74
  }
75
75
  },
76
76
  [`${e}-bar-collapse-bar`]: {
77
- ...t(r),
77
+ ...i(r),
78
78
  zIndex: 1e3,
79
79
  background: "rgba(0,0,0,0.04)",
80
80
  fontSize: r.fontSizeSM,
81
- borderRadius: "2px",
81
+ borderRadius: r.calc(r.borderRadius).div(2).equal(),
82
82
  color: r.textColor1,
83
83
  cursor: "pointer",
84
84
  opacity: 0,
@@ -119,7 +119,7 @@ const t = () => ({
119
119
  ...a(r),
120
120
  "&-active": {
121
121
  display: "block",
122
- transform: `translateX(var(${i}))`
122
+ transform: `translateX(var(${t}))`
123
123
  }
124
124
  },
125
125
  [`${e}-bar-dragger`]: {
@@ -161,7 +161,7 @@ const t = () => ({
161
161
  ...a(r),
162
162
  [`&${e}-bar-preview-active`]: {
163
163
  display: "block",
164
- transform: `translateY(var(${i}))`
164
+ transform: `translateY(var(${t}))`
165
165
  }
166
166
  },
167
167
  [`${e}-bar-dragger`]: {
@@ -208,7 +208,7 @@ const t = () => ({
208
208
  }
209
209
  }
210
210
  };
211
- }, g = l(
211
+ }, g = o(
212
212
  "Splitter",
213
213
  (r) => [s(r)],
214
214
  {
@@ -3,10 +3,11 @@ import { TypographyLink as H, TypographyText as J } from "@aplus-frontend/antdv"
3
3
  import { isUndefined as s, omit as u, isString as K } from "lodash-unified";
4
4
  import "../config-provider/index.mjs";
5
5
  import { useInjectApTextGroup as M } from "./context.mjs";
6
- import { isDef as Q } from "../utils/index.mjs";
7
- import W from "./style/index.mjs";
8
- import { useNamespace as X } from "../config-provider/hooks/use-namespace.mjs";
9
- const ie = /* @__PURE__ */ O({
6
+ import "../utils/index.mjs";
7
+ import Q from "./style/index.mjs";
8
+ import { useNamespace as W } from "../config-provider/hooks/use-namespace.mjs";
9
+ import { isDef as X } from "../utils/is.mjs";
10
+ const pe = /* @__PURE__ */ O({
10
11
  name: "ApText",
11
12
  __name: "index",
12
13
  props: {
@@ -72,7 +73,7 @@ const ie = /* @__PURE__ */ O({
72
73
  e: i,
73
74
  em: S,
74
75
  m: P
75
- } = X("ap-text"), h = W("ap-text"), {
76
+ } = W("ap-text"), h = Q("ap-text"), {
76
77
  colon: f,
77
78
  vertical: y,
78
79
  labelStyle: N
@@ -83,7 +84,7 @@ const ie = /* @__PURE__ */ O({
83
84
  if (e.label)
84
85
  return z(e.label) ? e.label : x(D, null, [e.label]);
85
86
  }), A = n(() => {
86
- const l = Q(e.linkProps.ellipsis) ? e.linkProps.ellipsis : !!e.ellipsis;
87
+ const l = X(e.linkProps.ellipsis) ? e.linkProps.ellipsis : !!e.ellipsis;
87
88
  return {
88
89
  href: K(e.link) ? e.link : void 0,
89
90
  ...u(e, ["linkProps"]),
@@ -127,5 +128,5 @@ const ie = /* @__PURE__ */ O({
127
128
  }
128
129
  });
129
130
  export {
130
- ie as default
131
+ pe as default
131
132
  };
@@ -5,8 +5,9 @@ import { getTimeAgoStr as D } from "./utils.mjs";
5
5
  import h from "./useTimeAgo.mjs";
6
6
  import B from "./style/index.mjs";
7
7
  import { useLocale as S } from "../config-provider/hooks/use-locale.mjs";
8
- import { useNamespace as Y } from "../config-provider/hooks/use-namespace.mjs";
9
- const b = ["title"], M = /* @__PURE__ */ f({
8
+ import { useNamespace as T } from "../config-provider/hooks/use-namespace.mjs";
9
+ const Y = ["title"], M = /* @__PURE__ */ f({
10
+ name: "TimeAgo",
10
11
  __name: "index",
11
12
  props: {
12
13
  value: {
@@ -21,24 +22,24 @@ const b = ["title"], M = /* @__PURE__ */ f({
21
22
  default: 1e4
22
23
  }
23
24
  },
24
- setup(s) {
25
- const e = s, {
26
- locale: l
25
+ setup(m) {
26
+ const t = m, {
27
+ locale: s
27
28
  } = S(), {
28
- b: m
29
- } = Y("time-ago"), i = B("time-ago"), u = h(r(e, "value"), Date.now(), r(e, "interval")), c = a(() => D(u.value, l.value)), p = a(() => {
30
- const t = e.title;
31
- if (t === !1)
29
+ b: l
30
+ } = T("time-ago"), i = B("time-ago"), u = h(r(t, "value"), Date.now(), r(t, "interval")), c = a(() => D(u.value, s.value)), p = a(() => {
31
+ const e = t.title;
32
+ if (e === !1)
32
33
  return;
33
- if (typeof t == "string")
34
- return t;
35
- const o = t === !0 ? "YYYY-MM-DD HH:mm:ss" : t.format;
36
- return y(e.value).format(o);
34
+ if (typeof e == "string")
35
+ return e;
36
+ const o = e === !0 ? "YYYY-MM-DD HH:mm:ss" : e.format;
37
+ return y(t.value).format(o);
37
38
  });
38
- return (t, o) => (g(), d("span", {
39
+ return (e, o) => (g(), d("span", {
39
40
  title: p.value,
40
- class: v([n(m)(), n(i)])
41
- }, _(c.value), 11, b));
41
+ class: v([n(l)(), n(i)])
42
+ }, _(c.value), 11, Y));
42
43
  }
43
44
  });
44
45
  export {
@@ -1,56 +1,57 @@
1
1
  import v from "dayjs";
2
- import { ref as d, watch as M, onBeforeUnmount as h } from "vue";
3
- function s(n, o) {
4
- const t = Math.abs(n - o), e = {
2
+ import { ref as M, watch as h, onBeforeUnmount as p } from "vue";
3
+ function s(n, u) {
4
+ const t = Math.abs(n - u), e = {
5
5
  diffMs: t,
6
- type: n < o ? "ago" : "late"
6
+ type: n < u ? "ago" : "late"
7
7
  };
8
- return t < 60 * 1e3 ? (e.unit = "s", e.count = Math.floor(t / 1e3)) : t < 60 * 60 * 1e3 ? (e.unit = "m", e.count = Math.floor(t / (60 * 1e3))) : t < 24 * 60 * 60 * 1e3 ? (e.unit = "h", e.count = Math.floor(t / (60 * 60 * 1e3))) : t < 30 * 24 * 60 * 60 * 1e3 ? (e.unit = "d", e.count = Math.floor(t / (24 * 60 * 60 * 1e3))) : t < 365 * 24 * 60 * 60 * 1e3 ? (e.unit = "M", e.count = Math.floor(t / (30 * 24 * 60 * 60 * 1e3))) : (e.unit = "y", e.count = Math.floor(t / 365 / (24 * 60 * 60 * 1e3))), e;
8
+ return t < 60 * 1e3 ? (e.unit = "s", e.count = Math.round(t / 1e3)) : t < 60 * 60 * 1e3 ? (e.unit = "m", e.count = Math.round(t / (60 * 1e3))) : t < 24 * 60 * 60 * 1e3 ? (e.unit = "h", e.count = Math.round(t / (60 * 60 * 1e3))) : t < 30 * 24 * 60 * 60 * 1e3 ? (e.unit = "d", e.count = Math.round(t / (24 * 60 * 60 * 1e3))) : t < 365 * 24 * 60 * 60 * 1e3 ? (e.unit = "M", e.count = Math.round(t / (30 * 24 * 60 * 60 * 1e3))) : (e.unit = "y", e.count = Math.round(t / 365 / (24 * 60 * 60 * 1e3))), e;
9
9
  }
10
- function u(n) {
10
+ function o(n) {
11
11
  return v(n).valueOf();
12
12
  }
13
- let p = 1;
14
- function g() {
15
- return p++;
13
+ let g = 1;
14
+ function b() {
15
+ return g++;
16
16
  }
17
17
  const i = /* @__PURE__ */ new Map();
18
- let l, f;
19
- function w(n, o) {
20
- i.set(n, o), i.size && !f && (clearInterval(l), l = setInterval(() => {
21
- f = !0;
18
+ let r, l;
19
+ function w(n, u) {
20
+ i.set(n, u), i.size && !l && (clearInterval(r), r = setInterval(() => {
21
+ l = !0;
22
22
  const t = Date.now();
23
23
  i.forEach((e) => {
24
- e.interval && Math.abs(t - e.updated - e.interval) <= 50 && (e.timeAgo.value = s(e.ts, t), e.updated = t);
24
+ e.interval && Math.abs(t - e.updated - e.interval) < 50 && (e.timeAgo.value = s(e.ts, t), e.updated = t);
25
25
  });
26
26
  }, 5e3));
27
27
  }
28
- function b(n) {
29
- i.delete(n), i.size || (clearInterval(l), f = !1);
28
+ function I(n) {
29
+ i.delete(n), i.size || (clearInterval(r), l = !1);
30
30
  }
31
- const y = (n, o, t) => {
32
- const e = g(), a = d(
33
- s(u(n.value), u(o))
34
- ), r = {
35
- ts: u(n.value),
31
+ const T = (n, u, t) => {
32
+ const e = b(), a = M(
33
+ s(o(n.value), o(u))
34
+ ), f = {
35
+ ts: o(n.value),
36
36
  timeAgo: a,
37
37
  interval: t.value,
38
38
  updated: Date.now()
39
39
  };
40
- return M(
40
+ return h(
41
41
  () => n.value,
42
- (m) => {
43
- const c = u(m);
44
- r.ts = c, a.value = s(c, u(o));
42
+ (c, m) => {
43
+ console.log("run target", c, m);
44
+ const d = o(c);
45
+ f.ts = d, a.value = s(d, o(u));
45
46
  }
46
- ), w(e, r), h(() => {
47
- b(e);
47
+ ), w(e, f), p(() => {
48
+ I(e);
48
49
  }), a;
49
50
  };
50
51
  export {
51
- y as default,
52
- g as getId,
52
+ T as default,
53
+ b as getId,
53
54
  s as getTimeAgo,
54
55
  w as subscribe,
55
- b as unsubscribe
56
+ I as unsubscribe
56
57
  };
@@ -6,6 +6,7 @@ export declare class TokenUtil {
6
6
  sub(cssVar: string | number | TokenUtil): this;
7
7
  mul(cssVar: string | number | TokenUtil): this;
8
8
  div(cssVar: string | number | TokenUtil): this;
9
+ colorOpacity(opacity: number): string;
9
10
  getResult(): string;
10
11
  equal(): string;
11
12
  }
@@ -14,6 +14,9 @@ class s {
14
14
  div(t) {
15
15
  return this.lowPriority && (this.result = `(${this.result})`), t instanceof s ? this.result = `${this.result} / ${t.getResult()}` : this.result = `${this.result} / ${t}`, this.lowPriority = !1, this;
16
16
  }
17
+ colorOpacity(t) {
18
+ return `color-mix(in srgb, ${this.result} ${t}%, transparent)`;
19
+ }
17
20
  getResult() {
18
21
  return this.lowPriority ? `(${this.result})` : this.result;
19
22
  }
@@ -0,0 +1,36 @@
1
+ /**
2
+ * 数值计算加
3
+ * @param params
4
+ * @returns
5
+ */
6
+ export declare function plus(...params: number[]): number | undefined;
7
+ /**
8
+ * 数值计算加(同plus)
9
+ */
10
+ export declare const add: typeof plus;
11
+ /**
12
+ * 数值计算减
13
+ * @param params
14
+ * @returns
15
+ */
16
+ export declare function sub(...params: number[]): number | undefined;
17
+ /**
18
+ * 数值计算减(同sub)
19
+ */
20
+ export declare const minus: typeof sub;
21
+ /**
22
+ * 数值计算乘
23
+ * @param params
24
+ * @returns
25
+ */
26
+ export declare function mul(...params: number[]): number | undefined;
27
+ /**
28
+ * 数值计算乘(同mul)
29
+ */
30
+ export declare const times: typeof mul;
31
+ /**
32
+ * 数值计算除
33
+ * @param params
34
+ * @returns
35
+ */
36
+ export declare function div(...params: number[]): number | undefined;
@@ -0,0 +1,45 @@
1
+ import u from "decimal.js";
2
+ function l(...e) {
3
+ if (!e || !e.length)
4
+ return;
5
+ let t = new u(0);
6
+ return e.forEach((n) => {
7
+ t = t.plus(new u(n));
8
+ }), t.toNumber();
9
+ }
10
+ const f = l;
11
+ function r(...e) {
12
+ if (!e || !e.length)
13
+ return;
14
+ let t = new u(e[0]);
15
+ for (let n = 1; n <= e.length - 1; n += 1)
16
+ t = t.sub(new u(e[n]));
17
+ return t.toNumber();
18
+ }
19
+ const c = r;
20
+ function o(...e) {
21
+ if (!e || !e.length)
22
+ return;
23
+ let t = new u(1);
24
+ return e.forEach((n) => {
25
+ t = t.mul(new u(n));
26
+ }), t.toNumber();
27
+ }
28
+ const h = o;
29
+ function w(...e) {
30
+ if (!e || !e.length)
31
+ return;
32
+ let t = new u(e[0]);
33
+ for (let n = 1; n <= e.length - 1; n += 1)
34
+ t = t.div(new u(e[n]));
35
+ return t.toNumber();
36
+ }
37
+ export {
38
+ f as add,
39
+ w as div,
40
+ c as minus,
41
+ o as mul,
42
+ l as plus,
43
+ r as sub,
44
+ h as times
45
+ };
@@ -0,0 +1,21 @@
1
+ /**
2
+ * 四舍五入取(最多)小数位
3
+ * @param num 待舍入的数字
4
+ * @param fractionDigits 小数位(默认为0)
5
+ * @returns
6
+ */
7
+ export declare function roundWith(num: number, fractionDigits?: number): number | undefined;
8
+ /**
9
+ * 向下取(最多)小数位
10
+ * @param num
11
+ * @param fractionDigits 小数位(默认为0)
12
+ * @returns
13
+ */
14
+ export declare function floorWith(num: number, fractionDigits?: number): number | undefined;
15
+ /**
16
+ * 数字千分位格式化
17
+ * @param val 待格式化的数字
18
+ * @param limitDecimals 小数位,传入后将使用四舍五入
19
+ * @returns
20
+ */
21
+ export declare function toDecimalMark(val: number, limitDecimals?: number): string | undefined;
@@ -0,0 +1,32 @@
1
+ import "./index.mjs";
2
+ import { div as p, mul as a } from "./decimal.mjs";
3
+ import { isDef as e } from "./is.mjs";
4
+ function m(r, o = 0) {
5
+ if (!e(r))
6
+ return;
7
+ const t = Math.pow(10, o);
8
+ return p(Math.round(a(r, t)), t);
9
+ }
10
+ function g(r, o = 0) {
11
+ if (!e(r))
12
+ return;
13
+ const t = Math.pow(10, o);
14
+ return p(Math.floor(a(r, t)), t);
15
+ }
16
+ function w(r, o) {
17
+ if (!e(r))
18
+ return;
19
+ let t = typeof o < "u" ? m(r, o) : r;
20
+ const i = t < 0;
21
+ i && (t = Math.abs(t));
22
+ const f = String(t).split("."), h = f[0].split(""), c = f[1] || "";
23
+ let n = "";
24
+ return h.reverse().forEach(function(s, u) {
25
+ u !== 0 && u % 3 === 0 ? n = s + "," + n : n = s + n;
26
+ }), (i ? "-" : "") + n + (c ? "." + c : "");
27
+ }
28
+ export {
29
+ g as floorWith,
30
+ m as roundWith,
31
+ w as toDecimalMark
32
+ };
@@ -1,9 +1,10 @@
1
1
  import { Recordable } from '../type';
2
+ import { isDef } from './is';
2
3
  /**
3
4
  * @description: Set ui mount node
4
5
  */
5
6
  export declare function getPopupContainer(node?: HTMLElement): HTMLElement;
6
- export declare function isDef<T = unknown>(val?: T): val is T;
7
+ export { isDef };
7
8
  export declare function getDynamicProps<T extends Record<string, unknown>, U>(props: T): Partial<U>;
8
9
  /**
9
10
  * 按条件移除