@duxweb/dvha-pro 0.0.8 → 1.0.14

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 (287) hide show
  1. package/dist/cjs/component.cjs +1 -1
  2. package/dist/cjs/components/card/card.cjs +1 -1
  3. package/dist/cjs/components/card/store.cjs +1 -0
  4. package/dist/cjs/components/chart/echart.cjs +1 -1
  5. package/dist/cjs/components/crop/imageCrop.cjs +1 -0
  6. package/dist/cjs/components/crop/imageCropModal.cjs +1 -0
  7. package/dist/cjs/components/dashboard/helloBig.cjs +1 -1
  8. package/dist/cjs/components/data/dynamicData.cjs +1 -0
  9. package/dist/cjs/components/data/dynamicSelect.cjs +1 -0
  10. package/dist/cjs/components/data/selectModal.cjs +1 -0
  11. package/dist/cjs/components/dialog/dialog.cjs +1 -1
  12. package/dist/cjs/components/drawer/drawer.cjs +1 -1
  13. package/dist/cjs/components/editor/aiEditor.cjs +1 -0
  14. package/dist/cjs/components/form/modalForm.cjs +1 -1
  15. package/dist/cjs/components/form/pageForm.cjs +1 -1
  16. package/dist/cjs/components/form/settingForm.cjs +1 -1
  17. package/dist/cjs/components/layout/list.cjs +1 -1
  18. package/dist/cjs/components/layout/table.cjs +1 -1
  19. package/dist/cjs/components/level/level.cjs +1 -0
  20. package/dist/cjs/components/media/media.cjs +1 -1
  21. package/dist/cjs/components/modal/modal.cjs +1 -1
  22. package/dist/cjs/components/modal/modalPage.cjs +1 -1
  23. package/dist/cjs/components/panel/setting.cjs +1 -1
  24. package/dist/cjs/components/stats/number.cjs +1 -0
  25. package/dist/cjs/components/stats/realTime.cjs +1 -0
  26. package/dist/cjs/components/status/blockEmpty.cjs +1 -1
  27. package/dist/cjs/components/upload/file.cjs +1 -0
  28. package/dist/cjs/components/upload/image.cjs +1 -0
  29. package/dist/cjs/components/upload/manage/item.cjs +1 -0
  30. package/dist/cjs/components/upload/manager.cjs +1 -0
  31. package/dist/cjs/components/widget/avatar.cjs +1 -0
  32. package/dist/cjs/components/widget/connect.cjs +1 -1
  33. package/dist/cjs/components/widget/image.cjs +1 -0
  34. package/dist/cjs/components/widget/placeholder.cjs +1 -0
  35. package/dist/cjs/config/uno.cjs +1 -1
  36. package/dist/cjs/config/validate.cjs +1 -1
  37. package/dist/cjs/hooks/action.cjs +1 -1
  38. package/dist/cjs/hooks/dialog.cjs +1 -1
  39. package/dist/cjs/hooks/download.cjs +1 -0
  40. package/dist/cjs/hooks/drawer.cjs +1 -1
  41. package/dist/cjs/hooks/echart.cjs +1 -1
  42. package/dist/cjs/hooks/image.cjs +1 -0
  43. package/dist/cjs/hooks/level.cjs +1 -0
  44. package/dist/cjs/hooks/modal.cjs +1 -1
  45. package/dist/cjs/hooks/table/copy.cjs +1 -1
  46. package/dist/cjs/hooks/table/image.cjs +1 -1
  47. package/dist/cjs/hooks/table/input.cjs +1 -1
  48. package/dist/cjs/hooks/table/media.cjs +1 -1
  49. package/dist/cjs/hooks/table.cjs +1 -1
  50. package/dist/cjs/index.cjs +1 -1
  51. package/dist/cjs/langs/en-US.json.cjs +1 -1
  52. package/dist/cjs/langs/zh-CN.json.cjs +1 -1
  53. package/dist/cjs/main.cjs +1 -1
  54. package/dist/cjs/pages/authLayout.cjs +1 -1
  55. package/dist/cjs/pages/layout/global.cjs +1 -1
  56. package/dist/cjs/pages/layout/page.cjs +1 -1
  57. package/dist/cjs/pages/login.cjs +1 -1
  58. package/dist/cjs/pages/menu/avatar.cjs +1 -1
  59. package/dist/cjs/pages/menu/button.cjs +1 -1
  60. package/dist/cjs/pages/menu/cmd.cjs +1 -1
  61. package/dist/cjs/pages/menu/main.cjs +1 -1
  62. package/dist/cjs/pages/menu/mobile.cjs +1 -1
  63. package/dist/cjs/pages/page.cjs +1 -1
  64. package/dist/cjs/pages/page404.cjs +1 -1
  65. package/dist/cjs/pages/pageStatus.cjs +1 -1
  66. package/dist/cjs/static/images/icon/audio.svg.cjs +1 -0
  67. package/dist/cjs/static/images/icon/excel.svg.cjs +1 -0
  68. package/dist/cjs/static/images/icon/file.svg.cjs +1 -0
  69. package/dist/cjs/static/images/icon/folder.svg.cjs +1 -0
  70. package/dist/cjs/static/images/icon/pdf.svg.cjs +1 -0
  71. package/dist/cjs/static/images/icon/ppt.svg.cjs +1 -0
  72. package/dist/cjs/static/images/icon/video.svg.cjs +1 -0
  73. package/dist/cjs/static/images/icon/word.svg.cjs +1 -0
  74. package/dist/cjs/stores/ui.cjs +1 -1
  75. package/dist/cjs/theme/uno.css.cjs +108 -12
  76. package/dist/esm/component.js +64 -47
  77. package/dist/esm/components/card/card.js +22 -21
  78. package/dist/esm/components/card/store.js +64 -0
  79. package/dist/esm/components/chart/echart.js +29 -16
  80. package/dist/esm/components/crop/imageCrop.js +105 -0
  81. package/dist/esm/components/crop/imageCropModal.js +118 -0
  82. package/dist/esm/components/dashboard/helloBig.js +3 -2
  83. package/dist/esm/components/data/dynamicData.js +145 -0
  84. package/dist/esm/components/data/dynamicSelect.js +109 -0
  85. package/dist/esm/components/data/selectModal.js +135 -0
  86. package/dist/esm/components/dialog/dialog.js +50 -38
  87. package/dist/esm/components/drawer/drawer.js +14 -12
  88. package/dist/esm/components/editor/aiEditor.js +127 -0
  89. package/dist/esm/components/form/modalForm.js +66 -40
  90. package/dist/esm/components/form/pageForm.js +31 -21
  91. package/dist/esm/components/form/settingForm.js +31 -21
  92. package/dist/esm/components/layout/list.js +67 -57
  93. package/dist/esm/components/layout/table.js +59 -49
  94. package/dist/esm/components/level/level.js +103 -0
  95. package/dist/esm/components/media/media.js +18 -16
  96. package/dist/esm/components/modal/modal.js +27 -21
  97. package/dist/esm/components/modal/modalPage.js +7 -7
  98. package/dist/esm/components/panel/setting.js +9 -6
  99. package/dist/esm/components/stats/number.js +49 -0
  100. package/dist/esm/components/stats/realTime.js +99 -0
  101. package/dist/esm/components/status/blockEmpty.js +136 -57
  102. package/dist/esm/components/upload/file.js +258 -0
  103. package/dist/esm/components/upload/image.js +189 -0
  104. package/dist/esm/components/upload/manage/item.js +178 -0
  105. package/dist/esm/components/upload/manager.js +378 -0
  106. package/dist/esm/components/widget/avatar.js +59 -0
  107. package/dist/esm/components/widget/connect.js +6 -4
  108. package/dist/esm/components/widget/image.js +67 -0
  109. package/dist/esm/components/widget/placeholder.js +83 -0
  110. package/dist/esm/config/uno.js +6 -6
  111. package/dist/esm/config/validate.js +2 -2
  112. package/dist/esm/hooks/action.js +34 -34
  113. package/dist/esm/hooks/dialog.js +13 -3
  114. package/dist/esm/hooks/download.js +100 -0
  115. package/dist/esm/hooks/drawer.js +13 -3
  116. package/dist/esm/hooks/echart.js +292 -246
  117. package/dist/esm/hooks/image.js +23 -0
  118. package/dist/esm/hooks/level.js +75 -0
  119. package/dist/esm/hooks/modal.js +14 -4
  120. package/dist/esm/hooks/table/copy.js +14 -11
  121. package/dist/esm/hooks/table/image.js +55 -17
  122. package/dist/esm/hooks/table/input.js +35 -33
  123. package/dist/esm/hooks/table/media.js +17 -7
  124. package/dist/esm/hooks/table.js +41 -25
  125. package/dist/esm/index.js +198 -160
  126. package/dist/esm/langs/en-US.json.js +6 -4
  127. package/dist/esm/langs/zh-CN.json.js +5 -3
  128. package/dist/esm/main.js +8 -6
  129. package/dist/esm/pages/authLayout.js +24 -18
  130. package/dist/esm/pages/layout/global.js +29 -23
  131. package/dist/esm/pages/layout/page.js +26 -16
  132. package/dist/esm/pages/login.js +33 -23
  133. package/dist/esm/pages/menu/avatar.js +122 -93
  134. package/dist/esm/pages/menu/button.js +23 -13
  135. package/dist/esm/pages/menu/cmd.js +41 -31
  136. package/dist/esm/pages/menu/main.js +38 -28
  137. package/dist/esm/pages/menu/mobile.js +20 -10
  138. package/dist/esm/pages/page.js +21 -14
  139. package/dist/esm/pages/page404.js +15 -5
  140. package/dist/esm/pages/pageStatus.js +22 -12
  141. package/dist/esm/static/images/icon/audio.svg.js +4 -0
  142. package/dist/esm/static/images/icon/excel.svg.js +4 -0
  143. package/dist/esm/static/images/icon/file.svg.js +4 -0
  144. package/dist/esm/static/images/icon/folder.svg.js +4 -0
  145. package/dist/esm/static/images/icon/pdf.svg.js +4 -0
  146. package/dist/esm/static/images/icon/ppt.svg.js +4 -0
  147. package/dist/esm/static/images/icon/video.svg.js +4 -0
  148. package/dist/esm/static/images/icon/word.svg.js +4 -0
  149. package/dist/esm/stores/ui.js +10 -10
  150. package/dist/esm/theme/uno.css.js +108 -12
  151. package/dist/types/components/card/index.d.ts +1 -0
  152. package/dist/types/components/card/store.d.ts +16 -0
  153. package/dist/types/components/chart/echart.d.ts +2 -2
  154. package/dist/types/components/crop/imageCrop.d.ts +40 -0
  155. package/dist/types/components/crop/imageCropModal.d.ts +7 -0
  156. package/dist/types/components/crop/index.d.ts +2 -0
  157. package/dist/types/components/data/dynamicData.d.ts +56 -0
  158. package/dist/types/components/data/dynamicSelect.d.ts +49 -0
  159. package/dist/types/components/data/index.d.ts +3 -0
  160. package/dist/types/components/data/selectModal.d.ts +61 -0
  161. package/dist/types/components/dialog/dialog.d.ts +2 -0
  162. package/dist/types/components/editor/aiEditor.d.ts +26 -0
  163. package/dist/types/components/editor/index.d.ts +1 -0
  164. package/dist/types/components/index.d.ts +7 -0
  165. package/dist/types/components/level/index.d.ts +1 -0
  166. package/dist/types/components/level/level.d.ts +60 -0
  167. package/dist/types/components/modal/index.d.ts +2 -2
  168. package/dist/types/components/modal/modal.d.ts +1 -4
  169. package/dist/types/components/stats/index.d.ts +2 -0
  170. package/dist/types/components/stats/number.d.ts +50 -0
  171. package/dist/types/components/stats/realTime.d.ts +56 -0
  172. package/dist/types/components/upload/file.d.ts +9 -0
  173. package/dist/types/components/upload/image.d.ts +99 -0
  174. package/dist/types/components/upload/index.d.ts +4 -0
  175. package/dist/types/components/upload/manage/item.d.ts +22 -0
  176. package/dist/types/components/upload/manager.d.ts +37 -0
  177. package/dist/types/components/widget/avatar.d.ts +159 -0
  178. package/dist/types/components/widget/image.d.ts +257 -0
  179. package/dist/types/components/widget/index.d.ts +2 -0
  180. package/dist/types/components/widget/placeholder.d.ts +22 -0
  181. package/dist/types/hooks/dialog.d.ts +1 -0
  182. package/dist/types/hooks/download.d.ts +31 -0
  183. package/dist/types/hooks/echart.d.ts +14 -0
  184. package/dist/types/hooks/image.d.ts +3 -0
  185. package/dist/types/hooks/index.d.ts +3 -0
  186. package/dist/types/hooks/level.d.ts +19 -0
  187. package/dist/types/main.d.ts +12 -0
  188. package/dist/types/static/images/icon/index.d.ts +8 -0
  189. package/package.json +9 -3
  190. package/dist/cjs/_virtual/_commonjsHelpers.cjs +0 -1
  191. package/dist/cjs/_virtual/browser.cjs +0 -1
  192. package/dist/cjs/_virtual/browser2.cjs +0 -1
  193. package/dist/cjs/_virtual/sourcemap-codec.umd.cjs +0 -1
  194. package/dist/cjs/_virtual/sourcemap-codec.umd2.cjs +0 -1
  195. package/dist/cjs/node_modules/.pnpm/@iconify-json_tabler@1.2.19/node_modules/@iconify-json/tabler/icons.json.cjs +0 -1
  196. package/dist/cjs/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/customisations/defaults.cjs +0 -1
  197. package/dist/cjs/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/icon/defaults.cjs +0 -1
  198. package/dist/cjs/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/icon/merge.cjs +0 -1
  199. package/dist/cjs/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/icon/transformations.cjs +0 -1
  200. package/dist/cjs/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/icon-set/get-icon.cjs +0 -1
  201. package/dist/cjs/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/icon-set/tree.cjs +0 -1
  202. package/dist/cjs/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/loader/custom.cjs +0 -1
  203. package/dist/cjs/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/loader/loader.cjs +0 -1
  204. package/dist/cjs/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/loader/modern.cjs +0 -1
  205. package/dist/cjs/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/loader/utils.cjs +0 -1
  206. package/dist/cjs/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/svg/build.cjs +0 -1
  207. package/dist/cjs/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/svg/defs.cjs +0 -1
  208. package/dist/cjs/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/svg/encode-svg-for-css.cjs +0 -1
  209. package/dist/cjs/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/svg/size.cjs +0 -1
  210. package/dist/cjs/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/svg/trim.cjs +0 -1
  211. package/dist/cjs/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/svg/url.cjs +0 -1
  212. package/dist/cjs/node_modules/.pnpm/@jridgewell_sourcemap-codec@1.5.0/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.cjs +0 -1
  213. package/dist/cjs/node_modules/.pnpm/@unocss_core@66.2.3/node_modules/@unocss/core/dist/index.cjs +0 -1
  214. package/dist/cjs/node_modules/.pnpm/@unocss_extractor-arbitrary-variants@66.2.3/node_modules/@unocss/extractor-arbitrary-variants/dist/index.cjs +0 -1
  215. package/dist/cjs/node_modules/.pnpm/@unocss_preset-icons@66.2.3/node_modules/@unocss/preset-icons/dist/browser.cjs +0 -1
  216. package/dist/cjs/node_modules/.pnpm/@unocss_preset-icons@66.2.3/node_modules/@unocss/preset-icons/dist/core.cjs +0 -1
  217. package/dist/cjs/node_modules/.pnpm/@unocss_preset-icons@66.2.3/node_modules/@unocss/preset-icons/dist/shared/preset-icons.DE2iazBM.cjs +0 -1
  218. package/dist/cjs/node_modules/.pnpm/@unocss_preset-wind4@66.2.3/node_modules/@unocss/preset-wind4/dist/colors.cjs +0 -1
  219. package/dist/cjs/node_modules/.pnpm/@unocss_preset-wind4@66.2.3/node_modules/@unocss/preset-wind4/dist/index.cjs +0 -391
  220. package/dist/cjs/node_modules/.pnpm/@unocss_preset-wind4@66.2.3/node_modules/@unocss/preset-wind4/dist/postprocess.cjs +0 -1
  221. package/dist/cjs/node_modules/.pnpm/@unocss_preset-wind4@66.2.3/node_modules/@unocss/preset-wind4/dist/shared/preset-wind4.BgkAsChl.cjs +0 -1
  222. package/dist/cjs/node_modules/.pnpm/@unocss_preset-wind4@66.2.3/node_modules/@unocss/preset-wind4/dist/shared/preset-wind4.BwwuP5Yw.cjs +0 -1
  223. package/dist/cjs/node_modules/.pnpm/@unocss_preset-wind4@66.2.3/node_modules/@unocss/preset-wind4/dist/shared/preset-wind4.CYAfjDEV.cjs +0 -1
  224. package/dist/cjs/node_modules/.pnpm/@unocss_preset-wind4@66.2.3/node_modules/@unocss/preset-wind4/dist/shared/preset-wind4.CgvxUQFi.cjs +0 -1
  225. package/dist/cjs/node_modules/.pnpm/@unocss_preset-wind4@66.2.3/node_modules/@unocss/preset-wind4/dist/shared/preset-wind4.dDC8WtZ5.cjs +0 -1
  226. package/dist/cjs/node_modules/.pnpm/@unocss_preset-wind4@66.2.3/node_modules/@unocss/preset-wind4/dist/theme.cjs +0 -1
  227. package/dist/cjs/node_modules/.pnpm/@unocss_rule-utils@66.2.3/node_modules/@unocss/rule-utils/dist/index.cjs +0 -1
  228. package/dist/cjs/node_modules/.pnpm/@vee-validate_i18n@4.15.1/node_modules/@vee-validate/i18n/dist/locale/en.json.cjs +0 -1
  229. package/dist/cjs/node_modules/.pnpm/@vee-validate_i18n@4.15.1/node_modules/@vee-validate/i18n/dist/locale/zh_CN.json.cjs +0 -1
  230. package/dist/cjs/node_modules/.pnpm/debug@4.4.1/node_modules/debug/src/browser.cjs +0 -1
  231. package/dist/cjs/node_modules/.pnpm/debug@4.4.1/node_modules/debug/src/common.cjs +0 -1
  232. package/dist/cjs/node_modules/.pnpm/destr@2.0.5/node_modules/destr/dist/index.cjs +0 -1
  233. package/dist/cjs/node_modules/.pnpm/magic-string@0.30.17/node_modules/magic-string/dist/magic-string.es.cjs +0 -10
  234. package/dist/cjs/node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.cjs +0 -1
  235. package/dist/cjs/node_modules/.pnpm/ofetch@1.4.1/node_modules/ofetch/dist/index.cjs +0 -1
  236. package/dist/cjs/node_modules/.pnpm/ofetch@1.4.1/node_modules/ofetch/dist/shared/ofetch.03887fc3.cjs +0 -1
  237. package/dist/cjs/node_modules/.pnpm/ufo@1.6.1/node_modules/ufo/dist/index.cjs +0 -1
  238. package/dist/cjs/static/images/placeholder.png.cjs +0 -1
  239. package/dist/esm/_virtual/_commonjsHelpers.js +0 -6
  240. package/dist/esm/_virtual/browser.js +0 -7
  241. package/dist/esm/_virtual/browser2.js +0 -4
  242. package/dist/esm/_virtual/sourcemap-codec.umd.js +0 -5
  243. package/dist/esm/_virtual/sourcemap-codec.umd2.js +0 -4
  244. package/dist/esm/node_modules/.pnpm/@iconify-json_tabler@1.2.19/node_modules/@iconify-json/tabler/icons.json.js +0 -17
  245. package/dist/esm/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/customisations/defaults.js +0 -14
  246. package/dist/esm/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/icon/defaults.js +0 -25
  247. package/dist/esm/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/icon/merge.js +0 -11
  248. package/dist/esm/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/icon/transformations.js +0 -9
  249. package/dist/esm/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/icon-set/get-icon.js +0 -23
  250. package/dist/esm/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/icon-set/tree.js +0 -17
  251. package/dist/esm/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/loader/custom.js +0 -40
  252. package/dist/esm/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/loader/loader.js +0 -46
  253. package/dist/esm/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/loader/modern.js +0 -55
  254. package/dist/esm/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/loader/utils.js +0 -38
  255. package/dist/esm/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/svg/build.js +0 -69
  256. package/dist/esm/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/svg/defs.js +0 -29
  257. package/dist/esm/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/svg/encode-svg-for-css.js +0 -14
  258. package/dist/esm/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/svg/size.js +0 -27
  259. package/dist/esm/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/svg/trim.js +0 -6
  260. package/dist/esm/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/svg/url.js +0 -6
  261. package/dist/esm/node_modules/.pnpm/@jridgewell_sourcemap-codec@1.5.0/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js +0 -255
  262. package/dist/esm/node_modules/.pnpm/@unocss_core@66.2.3/node_modules/@unocss/core/dist/index.js +0 -88
  263. package/dist/esm/node_modules/.pnpm/@unocss_extractor-arbitrary-variants@66.2.3/node_modules/@unocss/extractor-arbitrary-variants/dist/index.js +0 -51
  264. package/dist/esm/node_modules/.pnpm/@unocss_preset-icons@66.2.3/node_modules/@unocss/preset-icons/dist/browser.js +0 -17
  265. package/dist/esm/node_modules/.pnpm/@unocss_preset-icons@66.2.3/node_modules/@unocss/preset-icons/dist/core.js +0 -151
  266. package/dist/esm/node_modules/.pnpm/@unocss_preset-icons@66.2.3/node_modules/@unocss/preset-icons/dist/shared/preset-icons.DE2iazBM.js +0 -8
  267. package/dist/esm/node_modules/.pnpm/@unocss_preset-wind4@66.2.3/node_modules/@unocss/preset-wind4/dist/colors.js +0 -322
  268. package/dist/esm/node_modules/.pnpm/@unocss_preset-wind4@66.2.3/node_modules/@unocss/preset-wind4/dist/index.js +0 -547
  269. package/dist/esm/node_modules/.pnpm/@unocss_preset-wind4@66.2.3/node_modules/@unocss/preset-wind4/dist/postprocess.js +0 -32
  270. package/dist/esm/node_modules/.pnpm/@unocss_preset-wind4@66.2.3/node_modules/@unocss/preset-wind4/dist/shared/preset-wind4.BgkAsChl.js +0 -2307
  271. package/dist/esm/node_modules/.pnpm/@unocss_preset-wind4@66.2.3/node_modules/@unocss/preset-wind4/dist/shared/preset-wind4.BwwuP5Yw.js +0 -627
  272. package/dist/esm/node_modules/.pnpm/@unocss_preset-wind4@66.2.3/node_modules/@unocss/preset-wind4/dist/shared/preset-wind4.CYAfjDEV.js +0 -7
  273. package/dist/esm/node_modules/.pnpm/@unocss_preset-wind4@66.2.3/node_modules/@unocss/preset-wind4/dist/shared/preset-wind4.CgvxUQFi.js +0 -588
  274. package/dist/esm/node_modules/.pnpm/@unocss_preset-wind4@66.2.3/node_modules/@unocss/preset-wind4/dist/shared/preset-wind4.dDC8WtZ5.js +0 -51
  275. package/dist/esm/node_modules/.pnpm/@unocss_preset-wind4@66.2.3/node_modules/@unocss/preset-wind4/dist/theme.js +0 -553
  276. package/dist/esm/node_modules/.pnpm/@unocss_rule-utils@66.2.3/node_modules/@unocss/rule-utils/dist/index.js +0 -632
  277. package/dist/esm/node_modules/.pnpm/@vee-validate_i18n@4.15.1/node_modules/@vee-validate/i18n/dist/locale/en.json.js +0 -9
  278. package/dist/esm/node_modules/.pnpm/@vee-validate_i18n@4.15.1/node_modules/@vee-validate/i18n/dist/locale/zh_CN.json.js +0 -9
  279. package/dist/esm/node_modules/.pnpm/debug@4.4.1/node_modules/debug/src/browser.js +0 -146
  280. package/dist/esm/node_modules/.pnpm/debug@4.4.1/node_modules/debug/src/common.js +0 -97
  281. package/dist/esm/node_modules/.pnpm/destr@2.0.5/node_modules/destr/dist/index.js +0 -56
  282. package/dist/esm/node_modules/.pnpm/magic-string@0.30.17/node_modules/magic-string/dist/magic-string.es.js +0 -608
  283. package/dist/esm/node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js +0 -85
  284. package/dist/esm/node_modules/.pnpm/ofetch@1.4.1/node_modules/ofetch/dist/index.js +0 -23
  285. package/dist/esm/node_modules/.pnpm/ofetch@1.4.1/node_modules/ofetch/dist/shared/ofetch.03887fc3.js +0 -219
  286. package/dist/esm/node_modules/.pnpm/ufo@1.6.1/node_modules/ufo/dist/index.js +0 -153
  287. package/dist/esm/static/images/placeholder.png.js +0 -4
@@ -1,7 +1,7 @@
1
- import { defineComponent as t, createVNode as l } from "vue";
2
- import { useI18n as r } from "@duxweb/dvha-core";
3
- import e from "clsx";
4
- const s = /* @__PURE__ */ t({
1
+ import { defineComponent as i, createVNode as t } from "vue";
2
+ import { useI18n as o } from "@duxweb/dvha-core";
3
+ import l from "clsx";
4
+ const n = /* @__PURE__ */ i({
5
5
  name: "Message",
6
6
  props: {
7
7
  text: {
@@ -15,64 +15,143 @@ const s = /* @__PURE__ */ t({
15
15
  default: !1
16
16
  }
17
17
  },
18
- setup(a) {
18
+ setup(r) {
19
19
  const {
20
- t: c
21
- } = r();
22
- return () => l("div", {
20
+ t: e
21
+ } = o();
22
+ return () => t("div", {
23
23
  class: "flex justify-center p-2"
24
- }, [l("div", {
25
- class: e(["flex flex-row items-center", a.simple ? "flex-col" : "gap-2"])
26
- }, [l("div", null, [l("svg", {
24
+ }, [t("div", {
25
+ class: l(["flex flex-row items-center", r.simple ? "flex-col" : "gap-2"])
26
+ }, [t("div", null, [t("svg", {
27
27
  class: "size-60px",
28
- viewBox: "0 0 1024 1024",
29
- version: "1.1",
30
- xmlns: "http://www.w3.org/2000/svg",
31
- "p-id": "6634",
32
- width: "128",
33
- height: "128"
34
- }, [l("path", {
35
- d: "M77 813.758a368.464 61.243 0 1 0 736.928 0 368.464 61.243 0 1 0-736.928 0Z",
36
- fill: "rgba(var(--n-gray-color-2))",
37
- "fill-opacity": ".8",
38
- "p-id": "6635"
39
- }, null), l("path", {
40
- d: "M740.233 633.838L610.205 491.486c-6.24-6.7-15.36-10.756-24.962-10.756H305.675c-9.597 0-18.717 4.056-24.956 10.756L150.696 633.838v74.368h589.542v-74.368h-0.005z",
41
- fill: "rgba(var(--n-gray-color-6))",
42
- "p-id": "6636"
43
- }, null), l("path", {
44
- d: "M702.531 713.8L588.906 592.396c-5.44-5.835-13.625-9.026-22-9.026H323.11c-8.37 0-16.56 3.191-22 9.026L187.484 713.8v66.677h515.047V713.8z",
45
- fill: "rgba(var(--n-gray-color-9))",
46
- "p-id": "6637"
47
- }, null), l("path", {
48
- d: "M260.86 297h369.203c12.007 0 21.74 8.658 21.74 19.338v451.27c0 10.68-9.733 19.337-21.74 19.337H260.86c-12.006 0-21.74-8.657-21.74-19.337V316.338C239.12 305.658 248.855 297 260.86 297z",
49
- fill: "rgba(var(--n-gray-color-2))",
50
- "p-id": "6638"
51
- }, null), l("path", {
52
- d: "M308.947 345.118h273.03c6.002 0 10.869 4.329 10.869 9.669V475.44c0 5.34-4.867 9.669-10.87 9.669H308.947c-6.003 0-10.87-4.33-10.87-9.67V354.788c0-5.34 4.867-9.67 10.87-9.67z m1.424 192.48h270.181c6.79 0 12.294 4.896 12.294 10.935 0 6.04-5.504 10.936-12.294 10.936h-270.18c-6.79 0-12.294-4.896-12.294-10.936s5.504-10.935 12.293-10.935z m0 56.868h270.181c6.791 0 12.297 4.897 12.297 10.938 0 6.04-5.506 10.938-12.297 10.938h-270.18c-6.792 0-12.297-4.898-12.297-10.938 0-6.041 5.505-10.938 12.296-10.938z m428.66 210.309c-4.211 14.847-19.005 25.913-36.603 25.913H188.495c-17.598 0-32.391-11.071-36.598-25.913a31.651 31.651 0 0 1-1.206-8.654V633.842h143.033c15.8 0 28.533 11.835 28.533 26.203v0.194c0 14.363 12.88 25.96 28.68 25.96h189.05c15.799 0 28.68-11.704 28.68-26.072v-0.058c0-14.368 12.733-26.231 28.532-26.231h143.034v162.288c0 2.983-0.419 5.879-1.201 8.649z",
53
- fill: "rgba(var(--n-gray-color-4))",
54
- "p-id": "6639"
55
- }, null), l("path", {
56
- d: "M757.935 304.969l-37.023 12.813c-1.94 0.673-4.142 0.295-5.664-0.973-1.522-1.268-2.095-3.201-1.474-4.975l10.5-30.01C710.238 267.588 702 250.23 702 231.5c0-48.326 54.846-87.5 122.505-87.5C892.15 144 947 183.174 947 231.5S892.154 319 824.5 319c-24.544 0-47.398-5.154-66.565-14.031z",
57
- fill: "rgba(var(--n-gray-color-4))",
58
- "p-id": "6640"
59
- }, null), l("path", {
60
- d: "M856.64 233.251a15.464 13.662 0 1 0 30.928 0 15.464 13.662 0 1 0-30.928 0Z",
61
- fill: "rgba(var(--n-gray-color-1))",
62
- "p-id": "6641"
63
- }, null), l("path", {
64
- d: "M790.927 245.204H760L775.73 221.297l15.197 23.907zM810.255 221.297h27.058v23.907H810.255V221.297z",
65
- fill: "rgba(var(--n-gray-color-1))",
66
- "p-id": "6642"
67
- }, null)])]), l("div", {
28
+ viewBox: "0 0 200 200",
29
+ xmlns: "http://www.w3.org/2000/svg"
30
+ }, [t("defs", null, [t("linearGradient", {
31
+ id: "bgGradient",
32
+ x1: "0%",
33
+ y1: "0%",
34
+ x2: "100%",
35
+ y2: "100%"
36
+ }, [t("stop", {
37
+ offset: "0%",
38
+ style: "stop-color:rgb(var(--ui-color-primary));stop-opacity:0.1"
39
+ }, null), t("stop", {
40
+ offset: "100%",
41
+ style: "stop-color:rgb(var(--ui-color-primary));stop-opacity:0.05"
42
+ }, null)]), t("linearGradient", {
43
+ id: "boxGradient",
44
+ x1: "0%",
45
+ y1: "0%",
46
+ x2: "0%",
47
+ y2: "100%"
48
+ }, [t("stop", {
49
+ offset: "0%",
50
+ style: "stop-color:rgb(var(--ui-bg-elevated));stop-opacity:1"
51
+ }, null), t("stop", {
52
+ offset: "100%",
53
+ style: "stop-color:rgb(var(--ui-bg-muted));stop-opacity:1"
54
+ }, null)])]), t("circle", {
55
+ cx: "100",
56
+ cy: "100",
57
+ r: "85",
58
+ fill: "url(#bgGradient)"
59
+ }, null), t("g", {
60
+ transform: "translate(100, 100)"
61
+ }, [t("ellipse", {
62
+ cx: "0",
63
+ cy: "35",
64
+ rx: "45",
65
+ ry: "8",
66
+ fill: "rgb(var(--ui-color-gray-300))",
67
+ opacity: "0.3"
68
+ }, null), t("path", {
69
+ d: "M -35 -10 L -35 25 Q -35 30 -30 30 L 30 30 Q 35 30 35 25 L 35 -5 Q 35 -10 30 -10 L 5 -10 L -5 -20 L -30 -20 Q -35 -20 -35 -15 Z",
70
+ fill: "url(#boxGradient)",
71
+ stroke: "rgb(var(--ui-color-gray-300))",
72
+ "stroke-width": "1"
73
+ }, null), t("path", {
74
+ d: "M -5 -20 L 5 -10 L 15 -10 Q 20 -10 20 -15 Q 20 -20 15 -20 Z",
75
+ fill: "rgb(var(--ui-color-primary))",
76
+ opacity: "0.8"
77
+ }, null), t("g", {
78
+ transform: "translate(0, -5)",
79
+ opacity: "0.6"
80
+ }, [t("rect", {
81
+ x: "-8",
82
+ y: "-5",
83
+ width: "16",
84
+ height: "20",
85
+ rx: "2",
86
+ fill: "rgb(var(--ui-bg-elevated))",
87
+ stroke: "rgb(var(--ui-color-gray-400))",
88
+ "stroke-width": "0.5"
89
+ }, null), t("line", {
90
+ x1: "-5",
91
+ y1: "0",
92
+ x2: "5",
93
+ y2: "0",
94
+ stroke: "rgb(var(--ui-color-gray-400))",
95
+ "stroke-width": "1",
96
+ opacity: "0.5"
97
+ }, null), t("line", {
98
+ x1: "-5",
99
+ y1: "4",
100
+ x2: "3",
101
+ y2: "4",
102
+ stroke: "rgb(var(--ui-color-gray-400))",
103
+ "stroke-width": "1",
104
+ opacity: "0.5"
105
+ }, null), t("line", {
106
+ x1: "-5",
107
+ y1: "8",
108
+ x2: "5",
109
+ y2: "8",
110
+ stroke: "rgb(var(--ui-color-gray-400))",
111
+ "stroke-width": "1",
112
+ opacity: "0.5"
113
+ }, null)]), t("circle", {
114
+ cx: "-25",
115
+ cy: "-25",
116
+ r: "2",
117
+ fill: "rgb(var(--ui-color-primary))",
118
+ opacity: "0.4"
119
+ }, [t("animate", {
120
+ attributeName: "opacity",
121
+ values: "0.4;0.8;0.4",
122
+ dur: "2s",
123
+ repeatCount: "indefinite"
124
+ }, null)]), t("circle", {
125
+ cx: "25",
126
+ cy: "-15",
127
+ r: "1.5",
128
+ fill: "rgb(var(--ui-color-primary))",
129
+ opacity: "0.3"
130
+ }, [t("animate", {
131
+ attributeName: "opacity",
132
+ values: "0.3;0.6;0.3",
133
+ dur: "3s",
134
+ repeatCount: "indefinite"
135
+ }, null)]), t("circle", {
136
+ cx: "20",
137
+ cy: "25",
138
+ r: "1",
139
+ fill: "rgb(var(--ui-color-primary))",
140
+ opacity: "0.2"
141
+ }, [t("animate", {
142
+ attributeName: "opacity",
143
+ values: "0.2;0.5;0.2",
144
+ dur: "4s",
145
+ repeatCount: "indefinite"
146
+ }, null)])])])]), t("div", {
68
147
  class: "flex flex-col gap-0"
69
- }, [l("div", {
70
- class: e([a.simple ? "text-center text-gray-5" : ""])
71
- }, [a.text || c("pages.empty.title")]), !a.simple && l("div", {
72
- class: "text-gray-5"
73
- }, [a.desc || c("pages.empty.desc")])])])]);
148
+ }, [t("div", {
149
+ class: l(["text-default", r.simple ? "text-center" : ""])
150
+ }, [r.text || e("pages.empty.title")]), !r.simple && t("div", {
151
+ class: "text-muted"
152
+ }, [r.desc || e("pages.empty.desc")])])])]);
74
153
  }
75
154
  });
76
155
  export {
77
- s as DuxBlockEmpty
156
+ n as DuxBlockEmpty
78
157
  };
@@ -0,0 +1,258 @@
1
+ import { defineComponent as M, ref as D, computed as s, watch as k, createVNode as a, Fragment as w, createTextVNode as A, isVNode as U } from "vue";
2
+ import { useManage as Z, useI18n as j, useUpload as O } from "@duxweb/dvha-core";
3
+ import { useVModel as B, useDropZone as X } from "@vueuse/core";
4
+ import E from "mime";
5
+ import { useMessage as L, NDataTable as T, NProgress as I, NButton as h } from "naive-ui";
6
+ import "vue-router";
7
+ import "@overlastic/vue";
8
+ import { DuxMedia as W } from "../media/media.js";
9
+ import "vue-echarts";
10
+ import "vue-cropper";
11
+ import "clsx";
12
+ import "jinrishici";
13
+ import "lodash-es";
14
+ import "vue-draggable-plus";
15
+ import "aieditor";
16
+ import "vee-validate";
17
+ import "@vee-validate/i18n";
18
+ import "colorizr";
19
+ import "echarts";
20
+ import "@ant-design/colors";
21
+ import "@unocss/preset-icons/browser";
22
+ import "@unocss/preset-typography";
23
+ import "unocss/preset-wind4";
24
+ import "@vee-validate/i18n/dist/locale/en.json";
25
+ import "@vee-validate/i18n/dist/locale/zh_CN.json";
26
+ import "vue-command-palette";
27
+ import "@duxweb/dvha-naiveui";
28
+ import "../../pages/page404.js";
29
+ import { useModal as G } from "../../hooks/modal.js";
30
+ import "dayjs";
31
+ import "@tanstack/vue-query";
32
+ import "pinia";
33
+ function v(o) {
34
+ return typeof o == "function" || Object.prototype.toString.call(o) === "[object Object]" && !U(o);
35
+ }
36
+ const m = {
37
+ "image/*": "JPG, PNG, GIF, BMP, WEBP",
38
+ "video/*": "MP4, AVI, MOV, WMV, FLV",
39
+ "audio/*": "MP3, WAV, AAC, FLAC",
40
+ "text/*": "TXT, CSV, JSON, XML",
41
+ "application/pdf": "PDF",
42
+ "application/msword": "DOC",
43
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document": "DOCX",
44
+ "application/vnd.ms-excel": "XLS",
45
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": "XLSX"
46
+ }, i = {
47
+ container: "flex flex-col gap-2",
48
+ dropZone: {
49
+ base: "flex items-center justify-center p-6 rounded bg-muted border border-dashed transition-all cursor-pointer group",
50
+ active: "border-primary bg-primary/5",
51
+ hover: "border-accented hover:bg-primary/5 hover:border-primary"
52
+ },
53
+ content: "flex flex-col items-center gap-1",
54
+ icon: {
55
+ wrapper: "size-10 flex items-center justify-center rounded-full border border-dashed border-accented group-hover:border-primary transition-all cursor-pointer",
56
+ icon: "i-tabler:device-desktop-up size-5"
57
+ },
58
+ text: {
59
+ title: "mt-3 text-base font-medium",
60
+ desc: "text-sm text-muted text-center",
61
+ highlight: "text-primary font-medium"
62
+ },
63
+ table: {
64
+ empty: "flex items-center justify-center h-full text-muted",
65
+ actions: "flex gap-2"
66
+ }
67
+ }, Se = /* @__PURE__ */ M({
68
+ name: "DuxFileUpload",
69
+ props: {
70
+ path: {
71
+ type: String,
72
+ default: ""
73
+ },
74
+ managePath: {
75
+ type: String,
76
+ default: ""
77
+ },
78
+ maxNum: Number,
79
+ maxSize: Number,
80
+ multiple: Boolean,
81
+ manager: Boolean,
82
+ accept: String,
83
+ value: [String, Array],
84
+ defaultValue: [String, Array],
85
+ onUpdateValue: Function
86
+ },
87
+ setup(o, {
88
+ emit: b
89
+ }) {
90
+ const y = B(o, "value", b, {
91
+ passive: !0,
92
+ deep: !0,
93
+ defaultValue: o.defaultValue
94
+ }), u = Z(), F = L(), {
95
+ t: n
96
+ } = j(), d = D(), c = s(() => o.maxSize || 5), P = G(), f = s(() => {
97
+ var e, t;
98
+ return o.path || ((t = (e = u.config) == null ? void 0 : e.apiPath) == null ? void 0 : t.upload);
99
+ }), S = s(() => {
100
+ var e, t;
101
+ return o.managePath || ((t = (e = u.config) == null ? void 0 : e.apiPath) == null ? void 0 : t.uploadManage);
102
+ }), l = O({
103
+ path: f.value,
104
+ multiple: o.multiple,
105
+ maxFileCount: o.maxNum,
106
+ maxFileSize: c.value * 1024 * 1024,
107
+ autoUpload: !0,
108
+ accept: o.accept,
109
+ onError: (e) => F.error(e.message || n("components.upload.error"))
110
+ }), {
111
+ isOverDropZone: x
112
+ } = X(d, {
113
+ onDrop: (e) => {
114
+ e && e.length > 0 && l.addFiles(Array.from(e), "file");
115
+ }
116
+ });
117
+ k(l.dataFiles, (e) => {
118
+ var r, p;
119
+ const t = o.multiple ? e == null ? void 0 : e.map((z) => z.url) : (r = e == null ? void 0 : e[0]) == null ? void 0 : r.url;
120
+ y.value = t, (p = o.onUpdateValue) == null || p.call(o, t);
121
+ });
122
+ const g = s(() => o.accept ? o.accept.split(",").map((e) => {
123
+ const t = e.trim();
124
+ if (m[t]) return m[t];
125
+ if (t.includes("*")) {
126
+ const p = t.split("/")[0];
127
+ return m[t] || n("common.fileExtension", {
128
+ ext: p.toUpperCase()
129
+ });
130
+ }
131
+ const r = E.getExtension(t);
132
+ return r ? r.toUpperCase() : t;
133
+ }).filter(Boolean).join(", ") : ""), C = s(() => ({
134
+ pending: a("div", {
135
+ class: "text-info"
136
+ }, [n("components.upload.status.pending")]),
137
+ uploading: a("div", {
138
+ class: "text-info"
139
+ }, [n("components.upload.status.uploading")]),
140
+ success: a("div", {
141
+ class: "text-success"
142
+ }, [n("components.upload.status.success")]),
143
+ error: a("div", {
144
+ class: "text-error"
145
+ }, [n("components.upload.status.error")])
146
+ })), N = s(() => [i.dropZone.base, x.value ? i.dropZone.active : i.dropZone.hover]), V = s(() => [l.uploadFiles.value.length === 0 && "border-b border-muted"]);
147
+ return () => a("div", {
148
+ class: i.container
149
+ }, [a("div", {
150
+ ref: d,
151
+ class: N.value,
152
+ onClick: () => l.open()
153
+ }, [a("div", {
154
+ class: i.content
155
+ }, [a("div", {
156
+ class: i.icon.wrapper,
157
+ onClick: (e) => {
158
+ o.manager && (e.stopPropagation(), P.show({
159
+ title: n("components.upload.title"),
160
+ width: 800,
161
+ component: () => import("./manager.js"),
162
+ componentProps: {
163
+ path: S.value,
164
+ multiple: o.multiple,
165
+ uploadParams: {
166
+ path: f.value,
167
+ accept: o.accept,
168
+ maxNum: o.maxNum,
169
+ maxSize: c.value
170
+ }
171
+ }
172
+ }).then((t) => {
173
+ l.addDataFiles(t);
174
+ }));
175
+ }
176
+ }, [a("div", {
177
+ class: i.icon.icon
178
+ }, null)]), a("div", {
179
+ class: i.text.title
180
+ }, [n("components.upload.desc")]), a("div", {
181
+ class: i.text.desc
182
+ }, [x.value ? a("span", {
183
+ class: i.text.highlight
184
+ }, [n("components.upload.dropHere")]) : a(w, null, [g.value ? n("components.upload.supportFormats", {
185
+ formats: g.value
186
+ }) : n("components.upload.allFormats"), A(","), " ", n("components.upload.maxSize", {
187
+ size: c.value
188
+ })])])])]), a(T, {
189
+ bordered: !1,
190
+ class: V.value,
191
+ columns: [{
192
+ key: "filename",
193
+ title: n("components.upload.file.name"),
194
+ minWidth: 200,
195
+ render: (e) => a(W, {
196
+ title: e.filename,
197
+ desc: e.filetype
198
+ }, null)
199
+ }, {
200
+ key: "filesizeText",
201
+ title: n("components.upload.file.size"),
202
+ width: 120
203
+ }, {
204
+ key: "status",
205
+ title: n("components.upload.file.status"),
206
+ width: 120,
207
+ render: (e) => {
208
+ var t;
209
+ return e.status === "uploading" ? a(I, {
210
+ type: "line",
211
+ style: {
212
+ width: "24px",
213
+ height: "24px"
214
+ },
215
+ color: "rgb(var(--ui-color-primary))",
216
+ "indicator-placement": "inside",
217
+ percentage: (t = e.progress) == null ? void 0 : t.percent,
218
+ showIndicator: !1,
219
+ height: 14
220
+ }, null) : C.value[e.status];
221
+ }
222
+ }, {
223
+ key: "actions",
224
+ title: n("components.upload.actions"),
225
+ width: 120,
226
+ render: (e) => {
227
+ let t, r;
228
+ return a("div", {
229
+ class: i.table.actions
230
+ }, [a(h, {
231
+ type: "warning",
232
+ size: "small",
233
+ text: !0,
234
+ disabled: ["success", "error", "cancelled"].includes(e.status),
235
+ onClick: () => l.cancelFiles([e.id])
236
+ }, v(t = n("components.upload.cancel")) ? t : {
237
+ default: () => [t]
238
+ }), a(h, {
239
+ type: "error",
240
+ size: "small",
241
+ text: !0,
242
+ onClick: () => l.removeFiles([e.id])
243
+ }, v(r = n("components.upload.delete")) ? r : {
244
+ default: () => [r]
245
+ })]);
246
+ }
247
+ }],
248
+ data: l.uploadFiles.value
249
+ }, {
250
+ empty: () => a("div", {
251
+ class: i.table.empty
252
+ }, [n("components.upload.empty")])
253
+ })]);
254
+ }
255
+ });
256
+ export {
257
+ Se as DuxFileUpload
258
+ };
@@ -0,0 +1,189 @@
1
+ import { defineComponent as U, computed as n, watch as w, createVNode as t } from "vue";
2
+ import { useI18n as I, useManage as S, useUpload as V } from "@duxweb/dvha-core";
3
+ import { useVModel as k } from "@vueuse/core";
4
+ import j from "clsx";
5
+ import { useMessage as M, NImage as B, NButton as c, NProgress as D } from "naive-ui";
6
+ import { VueDraggable as A } from "vue-draggable-plus";
7
+ import "vue-router";
8
+ import "@overlastic/vue";
9
+ import "vue-echarts";
10
+ import "vue-cropper";
11
+ import "jinrishici";
12
+ import "lodash-es";
13
+ import "aieditor";
14
+ import "vee-validate";
15
+ import "@vee-validate/i18n";
16
+ import "colorizr";
17
+ import "echarts";
18
+ import "@ant-design/colors";
19
+ import "@unocss/preset-icons/browser";
20
+ import "@unocss/preset-typography";
21
+ import "unocss/preset-wind4";
22
+ import "@vee-validate/i18n/dist/locale/en.json";
23
+ import "@vee-validate/i18n/dist/locale/zh_CN.json";
24
+ import "vue-command-palette";
25
+ import "@duxweb/dvha-naiveui";
26
+ import "../../pages/page404.js";
27
+ import "mime";
28
+ import { useModal as L } from "../../hooks/modal.js";
29
+ import "dayjs";
30
+ import { useImagePreview as O } from "../../hooks/image.js";
31
+ import "@tanstack/vue-query";
32
+ import "pinia";
33
+ const fe = /* @__PURE__ */ U({
34
+ name: "DuxImageUpload",
35
+ props: {
36
+ path: {
37
+ type: String,
38
+ default: "upload"
39
+ },
40
+ managePath: {
41
+ type: String,
42
+ default: ""
43
+ },
44
+ maxNum: Number,
45
+ maxSize: Number,
46
+ multiple: Boolean,
47
+ manager: Boolean,
48
+ value: [String, Array],
49
+ defaultValue: [String, Array],
50
+ onUpdateValue: Function
51
+ },
52
+ setup(a, {
53
+ emit: p
54
+ }) {
55
+ const g = k(a, "value", p, {
56
+ passive: !0,
57
+ deep: !0,
58
+ defaultValue: a.defaultValue
59
+ }), v = M(), h = O(), {
60
+ t: s
61
+ } = I(), o = {
62
+ container: "flex gap-2",
63
+ imageItem: "size-80px rounded border border-muted relative group draggable flex items-center",
64
+ imageOverlay: "z-1 size-full inset-0 absolute flex items-center justify-center bg-default/80 transition-all opacity-0 group-hover:opacity-100 rounded",
65
+ uploadArea: "relative size-80px text-sm rounded flex flex-col border border-dashed bg-elevated border-muted dark:border-accented hover:bg-accented/50 hover:border-accented dark:hover:bg-accented/50 dark:hover:border-accented cursor-pointer",
66
+ uploadContent: "flex-1 flex flex-col justify-center items-center gap-1 relative",
67
+ progressContainer: "size-80px flex items-center justify-center rounded",
68
+ progressBar: "absolute left-2 right-2 bottom-2"
69
+ }, m = S(), f = n(() => a.maxSize || 5), d = n(() => {
70
+ var e, l;
71
+ return a.path || ((l = (e = m.config) == null ? void 0 : e.apiPath) == null ? void 0 : l.upload);
72
+ }), b = n(() => {
73
+ var e, l;
74
+ return a.managePath || ((l = (e = m.config) == null ? void 0 : e.apiPath) == null ? void 0 : l.uploadManage);
75
+ }), r = V({
76
+ path: d.value,
77
+ multiple: a.multiple,
78
+ maxFileCount: a.maxNum,
79
+ maxFileSize: f.value * 1024 * 1024,
80
+ autoUpload: !0,
81
+ accept: "image/*",
82
+ onError: (e) => {
83
+ v.error(e.message || s("components.upload.error"));
84
+ }
85
+ });
86
+ w(r.dataFiles, (e) => {
87
+ var i, u;
88
+ const l = a.multiple ? e == null ? void 0 : e.map((C) => C.url) : (i = e == null ? void 0 : e[0]) == null ? void 0 : i.url;
89
+ g.value = l, (u = a.onUpdateValue) == null || u.call(a, l);
90
+ });
91
+ const x = n(() => r.progress.value.totalPercent), y = n(() => r.isUploading.value), z = async () => {
92
+ r.open();
93
+ }, F = n(() => a.multiple ? a.maxNum && r.uploadFiles.value.length >= a.maxNum : !0), P = n(() => {
94
+ var e;
95
+ return (e = r.dataFiles.value) == null ? void 0 : e.map((l) => l.url);
96
+ }), N = L();
97
+ return () => t("div", null, [t(A, {
98
+ modelValue: r.uploadFiles.value,
99
+ "onUpdate:modelValue": (e) => r.uploadFiles.value = e,
100
+ class: o.container,
101
+ draggable: ".draggable"
102
+ }, {
103
+ default: () => {
104
+ var e;
105
+ return [(e = r.uploadFiles.value) == null ? void 0 : e.map((l, i) => {
106
+ const u = l.url || URL.createObjectURL(l.file);
107
+ return t("div", {
108
+ key: i,
109
+ class: j(o.imageItem)
110
+ }, [t(B, {
111
+ class: "z-0 rounded",
112
+ objectFit: "scale-down",
113
+ width: 78,
114
+ height: 78,
115
+ previewDisabled: !0,
116
+ src: u
117
+ }, null), t("div", {
118
+ class: o.imageOverlay
119
+ }, [l.status === "success" && t(c, {
120
+ quaternary: !0,
121
+ circle: !0,
122
+ size: "small",
123
+ renderIcon: () => t("div", {
124
+ class: "n-icon i-tabler:eye"
125
+ }, null),
126
+ onClick: () => h.show(P.value, i)
127
+ }, null), t(c, {
128
+ quaternary: !0,
129
+ circle: !0,
130
+ size: "small",
131
+ renderIcon: () => t("div", {
132
+ class: "n-icon i-tabler:trash"
133
+ }, null),
134
+ onClick: () => {
135
+ r.removeFiles([l.id]);
136
+ }
137
+ }, null)])]);
138
+ }), (r.uploadFiles.value.length === 0 || !F.value) && t("div", {
139
+ class: o.uploadArea,
140
+ onClick: () => {
141
+ z();
142
+ }
143
+ }, [a.manager && t("div", {
144
+ class: " py-1 text-xs bg-muted border-b border-dashed border-accented flex items-center justify-center",
145
+ onClick: (l) => {
146
+ l.stopPropagation(), N.show({
147
+ title: s("components.upload.title"),
148
+ width: "800px",
149
+ component: () => import("./manager.js"),
150
+ componentProps: {
151
+ path: b.value,
152
+ type: "image",
153
+ multiple: a.multiple,
154
+ uploadParams: {
155
+ path: d.value,
156
+ accept: "image/*",
157
+ maxNum: a.maxNum,
158
+ maxSize: a.maxSize
159
+ }
160
+ }
161
+ }).then((i) => {
162
+ r.addDataFiles(i);
163
+ });
164
+ }
165
+ }, [t("div", {
166
+ class: "i-tabler:folder size-4"
167
+ }, null)]), t("div", {
168
+ class: o.uploadContent
169
+ }, [y.value ? t("div", {
170
+ class: o.progressContainer
171
+ }, [t("div", {
172
+ class: "i-tabler:photo size-6"
173
+ }, null), t("div", {
174
+ class: o.progressBar
175
+ }, [t(D, {
176
+ type: "line",
177
+ percentage: x.value,
178
+ showIndicator: !1,
179
+ height: 4
180
+ }, null)])]) : t("div", {
181
+ class: "i-tabler:plus size-4"
182
+ }, null)])])];
183
+ }
184
+ })]);
185
+ }
186
+ });
187
+ export {
188
+ fe as DuxImageUpload
189
+ };