aibox-custom-component-packages 0.0.8 → 0.0.9

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 (267) hide show
  1. package/es/AddOrEditSupplierDialog.mjs +6 -836
  2. package/es/ApplicationTypeTag.mjs +2 -58
  3. package/es/AuthSection.mjs +3 -199
  4. package/es/AutoShowTooltip.mjs +2 -90
  5. package/es/AvailableRangePreview.mjs +2 -7
  6. package/es/AvailableRangeSetting.mjs +5 -276
  7. package/es/CodeView.mjs +6 -7
  8. package/es/CommonTagsList.mjs +3 -209
  9. package/es/CreateMcpForm.mjs +10 -385
  10. package/es/CustomSidebar.mjs +2 -717
  11. package/es/CustomTitle.mjs +6 -7
  12. package/es/CustomToggle.mjs +2 -224
  13. package/es/DialogContainer.mjs +2 -136
  14. package/es/DocSyncSelect.mjs +2 -2661
  15. package/es/FileDisplay.mjs +4 -4
  16. package/es/FilePreview.mjs +3 -179
  17. package/es/FileUploader.mjs +2 -265
  18. package/es/Logo.mjs +2 -72
  19. package/es/McpFormDialog.mjs +11 -8
  20. package/es/McpParamsSet.mjs +8 -630
  21. package/es/MdEditor.mjs +2 -201
  22. package/es/PageContainer.mjs +4 -584
  23. package/es/ParameterTable.mjs +6 -2290
  24. package/es/PublishRecord.mjs +2 -180
  25. package/es/RadioGroup.mjs +2 -119
  26. package/es/SourcePublish.mjs +7 -1156
  27. package/es/Table.mjs +6 -10
  28. package/es/assets/AddOrEditSupplierDialog.css +1 -1
  29. package/es/assets/AiboxTable.css +1 -1
  30. package/es/assets/ApplicationTypeTag.css +1 -1
  31. package/es/assets/AuthSection.css +1 -1
  32. package/es/assets/AutoShowTooltip.css +1 -1
  33. package/es/assets/{index3.css → AvailableRangePreview.css} +1 -1
  34. package/es/assets/CodeView.css +1 -0
  35. package/es/assets/CreateMcpForm.css +1 -1
  36. package/es/assets/CustomSidebar.css +1 -1
  37. package/es/assets/CustomToggle.css +1 -1
  38. package/es/assets/DialogContainer.css +1 -1
  39. package/es/assets/DocSyncSelect.css +1 -1
  40. package/es/assets/FileDisplay.css +1 -0
  41. package/es/assets/FilePreview.css +1 -1
  42. package/es/assets/FileUploader.css +1 -1
  43. package/es/assets/Logo.css +1 -1
  44. package/es/assets/{index4.css → McpFormDialog.css} +1 -1
  45. package/es/assets/McpParamsSet.css +1 -1
  46. package/es/assets/MdEditor.css +1 -1
  47. package/es/assets/PageContainer.css +1 -1
  48. package/es/assets/ParameterTable.css +1 -1
  49. package/es/assets/PublishRecord.css +1 -1
  50. package/es/assets/RadioGroup.css +1 -1
  51. package/es/assets/SourcePublish.css +1 -1
  52. package/es/assets/legacy.css +1 -1
  53. package/es/assets/usePreview.css +10 -1
  54. package/es/chunks/AddOrEditSupplierDialog.BKR0RsiJ.js +721 -0
  55. package/es/chunks/AddOrEditSupplierDialog.CjNRipPe.js +721 -0
  56. package/es/chunks/AiboxTable.CrWMAX84.js +635 -0
  57. package/es/chunks/ApplicationTypeTag.Cbdi0D65.js +47 -0
  58. package/es/chunks/AuthSection.DWD_FxtJ.js +201 -0
  59. package/es/chunks/AutoShowTooltip.C_DI9t2Z.js +82 -0
  60. package/es/chunks/AvailableRangePreview.Bz9QkkAM.js +194 -0
  61. package/es/chunks/AvailableRangeSetting.Bq_K1zar.js +229 -0
  62. package/es/chunks/CodeView.CWuSIL_F.js +148 -0
  63. package/es/chunks/CommonTagsList.DSPdgjc3.js +156 -0
  64. package/es/chunks/CreateMcpForm.BBVVd2RN.js +308 -0
  65. package/es/chunks/CreateMcpForm.C8YfDSEM.js +308 -0
  66. package/es/chunks/CustomSidebar.BSGAhmVY.js +585 -0
  67. package/es/chunks/CustomToggle.BxxsaD-W.js +181 -0
  68. package/es/chunks/DialogContainer.DL7aTMDS.js +129 -0
  69. package/es/chunks/DocSyncSelect.Kk88o9gO.js +2290 -0
  70. package/es/chunks/FileDisplay.B5laA4uX.js +1649 -0
  71. package/es/chunks/FileDisplay.BCTNdpl9.js +1649 -0
  72. package/es/chunks/FileDisplay.CBNYrdsK.js +1560 -0
  73. package/es/chunks/FileDisplay.CJ7KCID6.js +1650 -0
  74. package/es/chunks/FilePreview.B9u8ODHp.js +123 -0
  75. package/es/chunks/FilePreview.De4zHsfc.js +123 -0
  76. package/es/chunks/FileUploader.DD-lopf-.js +216 -0
  77. package/es/chunks/Logo.0myMjGux.js +62 -0
  78. package/es/chunks/McpFormDialog.4HDExbTn.js +297 -0
  79. package/es/chunks/McpFormDialog.DNzqqhaX.js +297 -0
  80. package/es/chunks/McpParamsSet.Tlo_lPn-.js +501 -0
  81. package/es/chunks/MdEditor.DtL0Se7T.js +163 -0
  82. package/es/chunks/PageContainer.DXddaRs1.js +462 -0
  83. package/es/chunks/ParameterTable.BCdnj1gW.js +2010 -0
  84. package/es/chunks/PublishRecord.DEzC7hmP.js +133 -0
  85. package/es/chunks/RadioGroup.Czc1JtkN.js +107 -0
  86. package/es/chunks/SourcePublish.Dx-ltk9U.js +956 -0
  87. package/es/chunks/_plugin-vue_export-helper.Ct3qlEzt.js +8 -0
  88. package/es/chunks/chunk.EU29TkMc.js +20 -0
  89. package/es/chunks/config.MfNKPMiA.js +35 -0
  90. package/es/chunks/config.l1J_qxeB.js +270 -0
  91. package/es/chunks/enums.DDPWAqdV.js +13 -0
  92. package/es/chunks/field-types.zf28gvKR.js +7 -0
  93. package/es/chunks/files.DvOT1nf3.js +14 -0
  94. package/es/chunks/i18n.CxsxtRq_.js +418 -0
  95. package/es/chunks/layout.C9wKDpv-.js +19 -0
  96. package/es/chunks/publish.Z0XAASut.js +50 -0
  97. package/es/chunks/request.CfOHcfgX.js +5 -0
  98. package/es/chunks/usePreview.CMMjOD_o.js +148 -0
  99. package/es/chunks/usePreview.agdxmOk8.js +126 -0
  100. package/es/chunks/withinstall.dLh4K-0g.js +7 -0
  101. package/es/index.mjs +258 -412
  102. package/index.css +1 -1
  103. package/lib/AddOrEditSupplierDialog.js +1 -1
  104. package/lib/ApplicationTypeTag.js +1 -1
  105. package/lib/AuthSection.js +1 -1
  106. package/lib/AutoShowTooltip.js +1 -1
  107. package/lib/AvailableRangePreview.js +1 -1
  108. package/lib/AvailableRangeSetting.js +1 -1
  109. package/lib/CodeView.js +1 -1
  110. package/lib/CommonTagsList.js +1 -1
  111. package/lib/CreateMcpForm.js +1 -1
  112. package/lib/CustomSidebar.js +1 -1
  113. package/lib/CustomTitle.js +1 -1
  114. package/lib/CustomToggle.js +1 -1
  115. package/lib/DialogContainer.js +1 -1
  116. package/lib/DocSyncSelect.js +1 -2
  117. package/lib/FileDisplay.js +1 -1
  118. package/lib/FilePreview.js +1 -1
  119. package/lib/FileUploader.js +1 -1
  120. package/lib/Logo.js +1 -1
  121. package/lib/McpFormDialog.js +1 -1
  122. package/lib/McpParamsSet.js +1 -1
  123. package/lib/MdEditor.js +1 -1
  124. package/lib/PageContainer.js +1 -1
  125. package/lib/ParameterTable.js +1 -1
  126. package/lib/PublishRecord.js +1 -5
  127. package/lib/RadioGroup.js +1 -1
  128. package/lib/SourcePublish.js +1 -1
  129. package/lib/Table.js +1 -1
  130. package/lib/assets/AddOrEditSupplierDialog.css +1 -1
  131. package/lib/assets/AiboxTable.css +1 -1
  132. package/lib/assets/ApplicationTypeTag.css +1 -1
  133. package/lib/assets/AuthSection.css +1 -1
  134. package/lib/assets/AutoShowTooltip.css +1 -1
  135. package/lib/assets/{index3.css → AvailableRangePreview.css} +1 -1
  136. package/lib/assets/CodeView.css +1 -0
  137. package/lib/assets/CreateMcpForm.css +1 -1
  138. package/lib/assets/CustomSidebar.css +1 -1
  139. package/lib/assets/CustomToggle.css +1 -1
  140. package/lib/assets/DialogContainer.css +1 -1
  141. package/lib/assets/DocSyncSelect.css +1 -1
  142. package/lib/assets/FileDisplay.css +1 -0
  143. package/lib/assets/FilePreview.css +1 -1
  144. package/lib/assets/FileUploader.css +1 -1
  145. package/lib/assets/Logo.css +1 -1
  146. package/lib/assets/{index4.css → McpFormDialog.css} +1 -1
  147. package/lib/assets/McpParamsSet.css +1 -1
  148. package/lib/assets/MdEditor.css +1 -1
  149. package/lib/assets/PageContainer.css +1 -1
  150. package/lib/assets/ParameterTable.css +1 -1
  151. package/lib/assets/PublishRecord.css +1 -1
  152. package/lib/assets/RadioGroup.css +1 -1
  153. package/lib/assets/SourcePublish.css +1 -1
  154. package/lib/assets/legacy.css +1 -1
  155. package/lib/assets/usePreview.css +10 -1
  156. package/lib/chunks/AddOrEditSupplierDialog.D0DSQZiS.js +1 -0
  157. package/lib/chunks/AddOrEditSupplierDialog.XtPxc5yr.js +1 -0
  158. package/lib/chunks/AiboxTable.DFyqwoGc.js +1 -0
  159. package/lib/chunks/ApplicationTypeTag.CZReMt-9.js +1 -0
  160. package/lib/chunks/AuthSection.CP9c-YTW.js +1 -0
  161. package/lib/chunks/AutoShowTooltip.D3QQ36Bm.js +1 -0
  162. package/lib/chunks/AvailableRangePreview.DvREyHNH.js +1 -0
  163. package/lib/chunks/AvailableRangeSetting.DDHTOLJA.js +1 -0
  164. package/lib/chunks/CodeView.DeBxLqyC.js +1 -0
  165. package/lib/chunks/CommonTagsList.DbNcVId5.js +1 -0
  166. package/lib/chunks/CreateMcpForm.Cm9eHXWg.js +1 -0
  167. package/lib/chunks/CreateMcpForm.DNijYbgd.js +1 -0
  168. package/lib/chunks/CustomSidebar.Dojb1xoS.js +1 -0
  169. package/lib/chunks/CustomToggle.Dz7MRyOY.js +1 -0
  170. package/lib/chunks/DialogContainer.C0Hsohgn.js +1 -0
  171. package/lib/chunks/DocSyncSelect.1gaXRzps.js +2 -0
  172. package/lib/chunks/FileDisplay.B4gn0Jhp.js +59 -0
  173. package/lib/chunks/FileDisplay.B7JWIcFg.js +59 -0
  174. package/lib/chunks/FileDisplay.BSNmvK44.js +59 -0
  175. package/lib/chunks/FileDisplay.DjtHza32.js +59 -0
  176. package/lib/chunks/FilePreview.DX9e8_nx.js +1 -0
  177. package/lib/chunks/FilePreview.b1Gine59.js +1 -0
  178. package/lib/chunks/FileUploader.6IW_QL-h.js +1 -0
  179. package/lib/chunks/Logo.Jr7hhaH0.js +1 -0
  180. package/lib/chunks/McpFormDialog.CL2bInts.js +6 -0
  181. package/lib/chunks/McpFormDialog.DbhQIwYW.js +6 -0
  182. package/lib/chunks/McpParamsSet.BYrxVvDL.js +1 -0
  183. package/lib/chunks/MdEditor.rVQbuxCg.js +1 -0
  184. package/lib/chunks/PageContainer.elwvD8VL.js +1 -0
  185. package/lib/chunks/ParameterTable.CeufAEXh.js +1 -0
  186. package/lib/chunks/PublishRecord.B7xYlRKJ.js +5 -0
  187. package/lib/chunks/RadioGroup.cl57IvY3.js +1 -0
  188. package/lib/chunks/SourcePublish.K4tntn9l.js +1 -0
  189. package/lib/chunks/_plugin-vue_export-helper.Bgn9wawX.js +1 -0
  190. package/lib/chunks/chunk.BbA6Ugdl.js +1 -0
  191. package/lib/chunks/config.CDNV0bUm.js +1 -0
  192. package/lib/chunks/config.CZl1kYtI.js +1 -0
  193. package/lib/chunks/enums.DbdzzIzx.js +1 -0
  194. package/lib/chunks/field-types.C6f_z2S_.js +1 -0
  195. package/lib/chunks/files.BEXWmB32.js +1 -0
  196. package/lib/chunks/i18n.BGe5gOau.js +1 -0
  197. package/lib/chunks/layout.CK394aWE.js +1 -0
  198. package/lib/chunks/publish.DsepP8ll.js +1 -0
  199. package/lib/chunks/request.BuoFTs7h.js +1 -0
  200. package/lib/chunks/usePreview.7CCbmgQM.js +1 -0
  201. package/lib/chunks/usePreview.Dmhz8azZ.js +1 -0
  202. package/lib/chunks/withinstall.65aRnaVc.js +1 -0
  203. package/lib/index.js +2 -2
  204. package/package.json +5 -5
  205. package/es/AiboxTabs.mjs +0 -71
  206. package/es/assets/AiboxTabs.css +0 -1
  207. package/es/assets/index.css +0 -1
  208. package/es/assets/index2.css +0 -1
  209. package/es/assets/index5.css +0 -1
  210. package/es/chunks/AiboxTable.CF4T_OCu.js +0 -645
  211. package/es/chunks/AiboxTable.DUGBBVXh.js +0 -645
  212. package/es/chunks/_plugin-vue_export-helper.CHgC5LLL.js +0 -9
  213. package/es/chunks/config.DPkdwjwD.js +0 -49
  214. package/es/chunks/config.Dklrsn-B.js +0 -49
  215. package/es/chunks/config.RrNwuFkQ.js +0 -325
  216. package/es/chunks/config.gNZ_rT87.js +0 -325
  217. package/es/chunks/enums.Dvec-maC.js +0 -62
  218. package/es/chunks/enums.WrpwbF4w.js +0 -14
  219. package/es/chunks/field-types.CPnMOjle.js +0 -13
  220. package/es/chunks/files.cduUqjHX.js +0 -16
  221. package/es/chunks/i18n.DDMVloiU.js +0 -443
  222. package/es/chunks/i18n.k9Q_HVMs.js +0 -443
  223. package/es/chunks/index.BDd6hHiU.js +0 -172
  224. package/es/chunks/index.BT1khSY9.js +0 -111
  225. package/es/chunks/index.CDvh263l.js +0 -257
  226. package/es/chunks/index.CF_YHLP5.js +0 -257
  227. package/es/chunks/index.CSjjAi3w.js +0 -396
  228. package/es/chunks/index.CdEBk4F_.js +0 -134
  229. package/es/chunks/index.DdD1VsH1.js +0 -396
  230. package/es/chunks/index.Dx-mCS4E.js +0 -1298
  231. package/es/chunks/index.bCzIhWFw.js +0 -7
  232. package/es/chunks/layout.BREUWPEJ.js +0 -26
  233. package/es/chunks/layout.CygCXa6s.js +0 -26
  234. package/es/chunks/publish.DlD0o09n.js +0 -50
  235. package/es/chunks/request.24c3shPx.js +0 -5
  236. package/es/chunks/usePreview.B5lboHeg.js +0 -153
  237. package/es/chunks/usePreview.BHvXwaNi.js +0 -157
  238. package/lib/AiboxTabs.js +0 -1
  239. package/lib/assets/AiboxTabs.css +0 -1
  240. package/lib/assets/index.css +0 -1
  241. package/lib/assets/index2.css +0 -1
  242. package/lib/assets/index5.css +0 -1
  243. package/lib/chunks/AiboxTable.BnoHJ7xL.js +0 -1
  244. package/lib/chunks/AiboxTable.CJOPGJtU.js +0 -1
  245. package/lib/chunks/_plugin-vue_export-helper.BHFhmbuH.js +0 -1
  246. package/lib/chunks/config.1oaIKLGn.js +0 -1
  247. package/lib/chunks/config.BF7MO0O5.js +0 -1
  248. package/lib/chunks/enums.DnuzPZCR.js +0 -1
  249. package/lib/chunks/enums.DpU2er5r.js +0 -1
  250. package/lib/chunks/field-types.Ch_2yDfg.js +0 -1
  251. package/lib/chunks/files.B3-8UC0v.js +0 -1
  252. package/lib/chunks/i18n.DgOp_D7R.js +0 -1
  253. package/lib/chunks/index.BNivYbtq.js +0 -1
  254. package/lib/chunks/index.B_keI1Aq.js +0 -1
  255. package/lib/chunks/index.Bc71XWQn.js +0 -1
  256. package/lib/chunks/index.C7aZx6RG.js +0 -6
  257. package/lib/chunks/index.CH7XdMru.js +0 -1
  258. package/lib/chunks/index.CJFk1R2u.js +0 -59
  259. package/lib/chunks/index.CaidDlAx.js +0 -1
  260. package/lib/chunks/index.CkihWzK6.js +0 -1
  261. package/lib/chunks/index.DGWHQFdx.js +0 -6
  262. package/lib/chunks/layout.DbBSbLgm.js +0 -1
  263. package/lib/chunks/layout.sgE9JoNq.js +0 -1
  264. package/lib/chunks/publish.3TrK3fZf.js +0 -1
  265. package/lib/chunks/request.D8T4MgGX.js +0 -1
  266. package/lib/chunks/usePreview.2PZJSy5w.js +0 -1
  267. package/lib/chunks/usePreview.BojIDW7Z.js +0 -1
@@ -0,0 +1,123 @@
1
+ import { t as e } from "./withinstall.dLh4K-0g.js";
2
+ import { t } from "./enums.DDPWAqdV.js";
3
+ import { h as n, o as r, t as i } from "./usePreview.agdxmOk8.js";
4
+ import { t as a } from "./_plugin-vue_export-helper.Ct3qlEzt.js";
5
+ import { Fragment as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createTextVNode as d, createVNode as f, openBlock as p, renderList as m, renderSlot as h, resolveDynamicComponent as g, toDisplayString as _, unref as v, withCtx as y } from "vue";
6
+ import { ElButton as b, ElCol as x, ElIcon as S, ElRow as C } from "element-plus";
7
+ import { IconDelete as w, IconHide as T } from "color-message-aibox-vue";
8
+ import '../assets/FilePreview.css';//#region components/FilePreview/index.vue
9
+ var E = {
10
+ key: 0,
11
+ class: "panel-preview"
12
+ }, D = { class: "panel-preview__item" }, O = ["onClick"], k = ["src", "alt"], A = { class: "panel-preview__name ellipsis" }, j = { key: 0 }, M = { key: 1 }, N = {
13
+ key: 1,
14
+ class: "upload-preview"
15
+ }, P = ["src", "alt"], F = { class: "preview-item__mask" }, I = e(/* @__PURE__ */ a({
16
+ __name: "index",
17
+ props: {
18
+ fileList: {
19
+ type: Array,
20
+ default: () => []
21
+ },
22
+ canEdit: {
23
+ type: Boolean,
24
+ default: !0
25
+ },
26
+ previewType: {
27
+ type: String,
28
+ default: t.面板
29
+ },
30
+ isStream: {
31
+ type: Boolean,
32
+ default: !1
33
+ },
34
+ isCustom: {
35
+ type: Boolean,
36
+ default: !1
37
+ }
38
+ },
39
+ emits: ["on-remove", "on-preview"],
40
+ setup(e, { emit: a }) {
41
+ let { downloadPrew: I, downloadStreamPrew: L } = i(), R = e, z = a, B = (e) => n(e);
42
+ function V(e) {
43
+ R.isCustom ? z("on-preview", e) : R.isStream ? L(e) : I(e);
44
+ }
45
+ function H(e, t) {
46
+ z("on-remove", e, t);
47
+ }
48
+ return (n, i) => (p(), l(o, null, [e.previewType === v(t).面板 ? (p(), l("div", E, [h(n.$slots, "PanelUploader", {}, void 0, !0), e.fileList.length ? (p(), s(v(C), {
49
+ key: 0,
50
+ gutter: 20,
51
+ class: "panel-preview__row"
52
+ }, {
53
+ default: y(() => [(p(!0), l(o, null, m(e.fileList, (t, n) => (p(), s(v(x), {
54
+ span: 8,
55
+ key: t.bnid
56
+ }, {
57
+ default: y(() => [u("div", D, [u("div", {
58
+ class: "panel-preview__box",
59
+ onClick: (e) => V(t)
60
+ }, [v(r)(t.suffix, t.url) ? (p(), l("img", {
61
+ key: 0,
62
+ src: t.url,
63
+ alt: t.name,
64
+ class: "panel-preview__img"
65
+ }, null, 8, k)) : (p(), s(v(S), {
66
+ key: 1,
67
+ size: "32px",
68
+ class: "panel-preview__img"
69
+ }, {
70
+ default: y(() => [(p(), s(g(B(t))))]),
71
+ _: 2
72
+ }, 1024)), u("span", A, _(t.name), 1)], 8, O), t.isUploading ? (p(), l("div", j, [f(v(b), {
73
+ text: "",
74
+ size: "small",
75
+ loading: ""
76
+ }, {
77
+ default: y(() => [...i[0] ||= [d("上传中...", -1)]]),
78
+ _: 1
79
+ })])) : (p(), l("div", M, [e.canEdit ? (p(), s(v(S), {
80
+ key: 0,
81
+ size: "18",
82
+ style: { cursor: "pointer" },
83
+ onClick: (e) => H(n, t)
84
+ }, {
85
+ default: y(() => [f(v(w))]),
86
+ _: 1
87
+ }, 8, ["onClick"])) : c("", !0)]))])]),
88
+ _: 2
89
+ }, 1024))), 128))]),
90
+ _: 1
91
+ })) : c("", !0)])) : c("", !0), e.previewType === v(t).卡片 ? (p(), l("ul", N, [(p(!0), l(o, null, m(e.fileList, (t, n) => (p(), l("li", {
92
+ class: "preview-item",
93
+ key: t.bnid
94
+ }, [v(r)(t.suffix, t.url) ? (p(), l("img", {
95
+ key: 0,
96
+ src: t.url,
97
+ alt: t.name,
98
+ class: "preview-item__img"
99
+ }, null, 8, P)) : (p(), s(v(S), {
100
+ key: 1,
101
+ size: "32px",
102
+ class: "preview-item__img"
103
+ }, {
104
+ default: y(() => [(p(), s(g(B(t))))]),
105
+ _: 2
106
+ }, 1024)), u("div", F, [f(v(S), {
107
+ class: "preview-item__mask--view",
108
+ onClick: (e) => V(t)
109
+ }, {
110
+ default: y(() => [f(v(T))]),
111
+ _: 1
112
+ }, 8, ["onClick"]), e.canEdit ? (p(), s(v(S), {
113
+ key: 0,
114
+ class: "preview-item__mask--delete",
115
+ onClick: (e) => H(n, t)
116
+ }, {
117
+ default: y(() => [f(v(w))]),
118
+ _: 1
119
+ }, 8, ["onClick"])) : c("", !0)])]))), 128)), h(n.$slots, "CardUploader", {}, void 0, !0)])) : c("", !0)], 64));
120
+ }
121
+ }, [["__scopeId", "data-v-d6028d96"]]));
122
+ //#endregion
123
+ export { I as t };
@@ -0,0 +1,123 @@
1
+ import { t as e } from "./withinstall.dLh4K-0g.js";
2
+ import { t } from "./enums.DDPWAqdV.js";
3
+ import { O as n, t as r, y as i } from "./usePreview.CMMjOD_o.js";
4
+ import { t as a } from "./_plugin-vue_export-helper.Ct3qlEzt.js";
5
+ import { Fragment as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createTextVNode as d, createVNode as f, openBlock as p, renderList as m, renderSlot as h, resolveDynamicComponent as g, toDisplayString as _, unref as v, withCtx as y } from "vue";
6
+ import { ElButton as b, ElCol as x, ElIcon as S, ElRow as C } from "element-plus";
7
+ import { IconDelete as w, IconHide as T } from "color-message-aibox-vue";
8
+ import '../assets/FilePreview.css';//#region components/FilePreview/index.vue
9
+ var E = {
10
+ key: 0,
11
+ class: "panel-preview"
12
+ }, D = { class: "panel-preview__item" }, O = ["onClick"], k = ["src", "alt"], A = { class: "panel-preview__name ellipsis" }, j = { key: 0 }, M = { key: 1 }, N = {
13
+ key: 1,
14
+ class: "upload-preview"
15
+ }, P = ["src", "alt"], F = { class: "preview-item__mask" }, I = e(/* @__PURE__ */ a({
16
+ __name: "index",
17
+ props: {
18
+ fileList: {
19
+ type: Array,
20
+ default: () => []
21
+ },
22
+ canEdit: {
23
+ type: Boolean,
24
+ default: !0
25
+ },
26
+ previewType: {
27
+ type: String,
28
+ default: t.面板
29
+ },
30
+ isStream: {
31
+ type: Boolean,
32
+ default: !1
33
+ },
34
+ isCustom: {
35
+ type: Boolean,
36
+ default: !1
37
+ }
38
+ },
39
+ emits: ["on-remove", "on-preview"],
40
+ setup(e, { emit: a }) {
41
+ let { downloadPrew: I, downloadStreamPrew: L } = r(), R = e, z = a, B = (e) => n(e);
42
+ function V(e) {
43
+ R.isCustom ? z("on-preview", e) : R.isStream ? L(e) : I(e);
44
+ }
45
+ function H(e, t) {
46
+ z("on-remove", e, t);
47
+ }
48
+ return (n, r) => (p(), l(o, null, [e.previewType === v(t).面板 ? (p(), l("div", E, [h(n.$slots, "PanelUploader", {}, void 0, !0), e.fileList.length ? (p(), s(v(C), {
49
+ key: 0,
50
+ gutter: 20,
51
+ class: "panel-preview__row"
52
+ }, {
53
+ default: y(() => [(p(!0), l(o, null, m(e.fileList, (t, n) => (p(), s(v(x), {
54
+ span: 8,
55
+ key: t.bnid
56
+ }, {
57
+ default: y(() => [u("div", D, [u("div", {
58
+ class: "panel-preview__box",
59
+ onClick: (e) => V(t)
60
+ }, [v(i)(t.suffix, t.url) ? (p(), l("img", {
61
+ key: 0,
62
+ src: t.url,
63
+ alt: t.name,
64
+ class: "panel-preview__img"
65
+ }, null, 8, k)) : (p(), s(v(S), {
66
+ key: 1,
67
+ size: "32px",
68
+ class: "panel-preview__img"
69
+ }, {
70
+ default: y(() => [(p(), s(g(B(t))))]),
71
+ _: 2
72
+ }, 1024)), u("span", A, _(t.name), 1)], 8, O), t.isUploading ? (p(), l("div", j, [f(v(b), {
73
+ text: "",
74
+ size: "small",
75
+ loading: ""
76
+ }, {
77
+ default: y(() => [...r[0] ||= [d("上传中...", -1)]]),
78
+ _: 1
79
+ })])) : (p(), l("div", M, [e.canEdit ? (p(), s(v(S), {
80
+ key: 0,
81
+ size: "18",
82
+ style: { cursor: "pointer" },
83
+ onClick: (e) => H(n, t)
84
+ }, {
85
+ default: y(() => [f(v(w))]),
86
+ _: 1
87
+ }, 8, ["onClick"])) : c("", !0)]))])]),
88
+ _: 2
89
+ }, 1024))), 128))]),
90
+ _: 1
91
+ })) : c("", !0)])) : c("", !0), e.previewType === v(t).卡片 ? (p(), l("ul", N, [(p(!0), l(o, null, m(e.fileList, (t, n) => (p(), l("li", {
92
+ class: "preview-item",
93
+ key: t.bnid
94
+ }, [v(i)(t.suffix, t.url) ? (p(), l("img", {
95
+ key: 0,
96
+ src: t.url,
97
+ alt: t.name,
98
+ class: "preview-item__img"
99
+ }, null, 8, P)) : (p(), s(v(S), {
100
+ key: 1,
101
+ size: "32px",
102
+ class: "preview-item__img"
103
+ }, {
104
+ default: y(() => [(p(), s(g(B(t))))]),
105
+ _: 2
106
+ }, 1024)), u("div", F, [f(v(S), {
107
+ class: "preview-item__mask--view",
108
+ onClick: (e) => V(t)
109
+ }, {
110
+ default: y(() => [f(v(T))]),
111
+ _: 1
112
+ }, 8, ["onClick"]), e.canEdit ? (p(), s(v(S), {
113
+ key: 0,
114
+ class: "preview-item__mask--delete",
115
+ onClick: (e) => H(n, t)
116
+ }, {
117
+ default: y(() => [f(v(w))]),
118
+ _: 1
119
+ }, 8, ["onClick"])) : c("", !0)])]))), 128)), h(n.$slots, "CardUploader", {}, void 0, !0)])) : c("", !0)], 64));
120
+ }
121
+ }, [["__scopeId", "data-v-d6028d96"]]));
122
+ //#endregion
123
+ export { I as t };
@@ -0,0 +1,216 @@
1
+ import { t as e } from "./withinstall.dLh4K-0g.js";
2
+ import { m as t } from "./i18n.CxsxtRq_.js";
3
+ import { t as n } from "./files.DvOT1nf3.js";
4
+ import { Fragment as r, computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createTextVNode as l, createVNode as u, normalizeClass as d, normalizeStyle as f, openBlock as p, ref as m, renderSlot as h, resolveDirective as g, resolveDynamicComponent as _, toDisplayString as v, unref as y, withCtx as b, withDirectives as x } from "vue";
5
+ import { ElButton as S, ElIcon as C, ElImage as w, ElMessage as T, ElUpload as E } from "element-plus";
6
+ import { File as D, IconAdd as O, IconEdit2 as k, IconUpload2 as A, MySpace as ee, Space as te } from "color-message-aibox-vue";
7
+ import { APPLICATION_TYPE as j, ICON_PATH_MAP as M, SOURCE_TYPE as N } from "color-star-custom-components";
8
+ import '../assets/FileUploader.css';//#region components/FileUploader/config.js
9
+ var P = {
10
+ 卡片: "Card",
11
+ 按钮: "Button",
12
+ 面板: "Panel",
13
+ 自定义: "Custom"
14
+ }, F = { class: "card-uploader__mask" }, I = {
15
+ key: 4,
16
+ class: "pd-l-24 pd-r-24"
17
+ }, L = { class: "panel-uploader__text" }, R = { class: "panel-uploader__text--tip" }, z = { class: "text-3271fe" }, B = { class: "text-262626" }, V = { class: "text-3271fe" }, H = { class: "text-262626" }, U = {
18
+ key: 0,
19
+ class: "panel-uploader__text--tip font-style"
20
+ }, W = { class: "panel-uploader__text--tip font-style" }, G = {
21
+ __name: "index",
22
+ props: {
23
+ uploadType: {
24
+ type: String,
25
+ default: "Card"
26
+ },
27
+ acceptType: {
28
+ type: String,
29
+ default: ""
30
+ },
31
+ multiple: {
32
+ type: Boolean,
33
+ default: !1
34
+ },
35
+ limitCount: {
36
+ type: Number,
37
+ default: 1e3
38
+ },
39
+ limitSize: {
40
+ type: Number,
41
+ default: 8
42
+ },
43
+ warnTips: {
44
+ type: String,
45
+ default: ""
46
+ },
47
+ warnTips2: {
48
+ type: String,
49
+ default: ""
50
+ },
51
+ isMiio: {
52
+ type: Boolean,
53
+ default: !0
54
+ },
55
+ businessType: {
56
+ type: String,
57
+ default: "common"
58
+ },
59
+ defaultUploadIcon: {
60
+ type: String,
61
+ default: ""
62
+ }
63
+ },
64
+ emits: ["on-success"],
65
+ setup(e, { emit: G }) {
66
+ let { t: K } = t(), q = m(!1), J = m(null), { commonUpload: Y } = n(), X = e, Z = G, Q = (e) => {
67
+ let t = e.match(/\.([^.]+)$/);
68
+ return t ? t[1] : null;
69
+ }, ne = (e, t, n) => {
70
+ let r = !0, i = e.name && e.name.toLowerCase();
71
+ if (console.log(e.name, i, "fileName"), t && t.indexOf(Q(i)) === -1 && (T({
72
+ type: "warning",
73
+ message: K("COMPONENTS.UPLOAD_TYPE_TIP", { type: t })
74
+ }), r = !1), e.size > 1024 * 1024 * n) {
75
+ let e = K("COMPONENTS.UPLOAD_SIZE_TIP", { size: n });
76
+ T.warning(e), r = !1;
77
+ }
78
+ return r;
79
+ }, re = {
80
+ space: te,
81
+ "my-space": ee
82
+ }, ie = {
83
+ plugin: M.application[N.PLUGIN],
84
+ agent: M.agent[j.autonomous],
85
+ dialogue: M.agent[j.dialogue],
86
+ model: M.application[N.MODEL],
87
+ workflow: M.application[N.WORKFLOW],
88
+ mcp: M.application[N.MCP]
89
+ }, ae = i(() => ({
90
+ Card: "card-uploader",
91
+ Button: "button-uploader",
92
+ Panel: "panel-uploader"
93
+ })[X.uploadType]), $ = i(() => X.defaultUploadIcon ? re[X.defaultUploadIcon] : ""), oe = () => {
94
+ T({
95
+ type: "warning",
96
+ message: K("COMPONENTS.UPLOAD_COUNT_TIP", { count: X.limitCount })
97
+ });
98
+ }, se = async (e) => {
99
+ if (ne(e, X.acceptType, X.limitSize)) if (X.isMiio) {
100
+ q.value = !0;
101
+ let { data: t } = await Y({ file: e.raw }, X.businessType).finally(() => {
102
+ q.value = !1;
103
+ });
104
+ console.log(t, "data"), Z("on-success", t);
105
+ } else Z("on-success", e);
106
+ else J.value.handleRemove(e);
107
+ };
108
+ return (t, n) => {
109
+ let i = g("loading");
110
+ return p(), s("div", {
111
+ class: d(["file-uploader", e.defaultUploadIcon]),
112
+ style: f({
113
+ border: !e.defaultUploadIcon && e.uploadType === "Card" ? "1px dashed var(--el-border-color)" : "none",
114
+ "border-radius": !e.defaultUploadIcon && e.uploadType === "Card" ? "8px" : "0",
115
+ "background-image": $.value ? `url('${$.value}')` : "none"
116
+ })
117
+ }, [x((p(), a(y(E), {
118
+ ref_key: "uploader",
119
+ ref: J,
120
+ class: d(ae.value),
121
+ action: "",
122
+ "auto-upload": !1,
123
+ limit: e.limitCount,
124
+ "show-file-list": !1,
125
+ accept: e.acceptType,
126
+ multiple: e.multiple,
127
+ drag: e.uploadType === y(P).面板,
128
+ "on-change": se,
129
+ "on-exceed": oe
130
+ }, {
131
+ default: b(() => [
132
+ $.value ? (p(), a(y(C), {
133
+ key: 0,
134
+ size: "64",
135
+ class: "absolute"
136
+ }, {
137
+ default: b(() => [(p(), a(_($.value)))]),
138
+ _: 1
139
+ })) : (p(), s(r, { key: 1 }, [e.defaultUploadIcon ? (p(), a(y(w), {
140
+ key: 0,
141
+ style: {
142
+ width: "64px",
143
+ height: "64px"
144
+ },
145
+ src: ie[e.defaultUploadIcon],
146
+ class: "absolute"
147
+ }, null, 8, ["src"])) : o("", !0)], 64)),
148
+ c("div", F, [u(y(C), {
149
+ color: "#fff",
150
+ size: "16px"
151
+ }, {
152
+ default: b(() => [u(y(k))]),
153
+ _: 1
154
+ })]),
155
+ e.uploadType === y(P).卡片 ? (p(), a(y(C), {
156
+ key: 2,
157
+ class: "card-uploader__icon"
158
+ }, {
159
+ default: b(() => [e.defaultUploadIcon ? o("", !0) : (p(), a(y(O), { key: 0 })), h(t.$slots, "text-slot")]),
160
+ _: 3
161
+ })) : o("", !0),
162
+ e.uploadType === y(P).按钮 ? (p(), a(y(S), {
163
+ key: 3,
164
+ type: "primary"
165
+ }, {
166
+ default: b(() => [u(y(C), { style: { "margin-right": "5px" } }, {
167
+ default: b(() => [u(y(A))]),
168
+ _: 1
169
+ }), l(" " + v(y(K)("COMMON_BUTTON.UPLOAD_TEXT")), 1)]),
170
+ _: 1
171
+ })) : o("", !0),
172
+ e.uploadType === y(P).面板 ? (p(), s("div", I, [u(y(C), { size: "48px" }, {
173
+ default: b(() => [u(y(D))]),
174
+ _: 1
175
+ }), c("div", L, [
176
+ c("div", R, [
177
+ c("span", z, v(y(K)("COMMON_BUTTON.CLICK_TEXT")), 1),
178
+ c("span", B, v(y(K)("COMMON_BUTTON.OR_TEXT")), 1),
179
+ c("span", V, v(y(K)("COMMON_BUTTON.DRAG_TEXT")), 1),
180
+ c("span", H, v(y(K)("COMMON_BUTTON.FILE_UPLOAD_TEXT")), 1)
181
+ ]),
182
+ e.warnTips2 ? (p(), s("div", U, v(e.warnTips2), 1)) : o("", !0),
183
+ c("div", W, v(e.warnTips), 1)
184
+ ])])) : o("", !0),
185
+ e.uploadType === y(P).自定义 ? h(t.$slots, "upload-box", { key: 5 }) : o("", !0)
186
+ ]),
187
+ _: 3
188
+ }, 8, [
189
+ "class",
190
+ "limit",
191
+ "accept",
192
+ "multiple",
193
+ "drag"
194
+ ])), [[i, q.value]])], 6);
195
+ };
196
+ }
197
+ }, K = (e) => {
198
+ let { t: n } = t(), r = e.toLowerCase(), i = "", a = "", o = n("WORKFLOW_COM.TIP_TEXT_3");
199
+ return r.includes("file") ? (a = "jpg、jpeg、png、webp、doc、docx、ppt、pptx、pdf、txt、xls、xlsx、csv、mp4、mkv、webm、ts、avi、mov、flv、3gp、ogv、mp3、wav、aac、flac、ogg", i = n("WORKFLOW_COM.SUPPORT_FORMATS", { formats: a })) : r.includes("image") ? (a = "jpg、jpeg、png、webp", i = n("WORKFLOW_COM.SUPPORT_FORMATS", { formats: a })) : r.includes("doc") ? (a = "doc、docx", i = n("WORKFLOW_COM.SUPPORT_FORMATS", { formats: a })) : r.includes("ppt") ? (a = "ppt、pptx", i = n("WORKFLOW_COM.SUPPORT_FORMATS", { formats: a })) : r.includes("pdf") ? (a = "pdf", i = n("WORKFLOW_COM.SUPPORT_FORMATS", { formats: a })) : r.includes("txt") ? (a = "txt", i = n("WORKFLOW_COM.SUPPORT_FORMATS", { formats: a })) : r.includes("excel") ? (a = "xls、xlsx、csv", i = n("WORKFLOW_COM.SUPPORT_FORMATS", { formats: a })) : r.includes("audio") ? (a = "mp3、wav、aac、flac、ogg", i = n("WORKFLOW_COM.SUPPORT_FORMATS", { formats: a })) : r.includes("video") && (a = "mp4、mkv、webm、ts、avi、mov、flv、3gp、ogv", i = n("WORKFLOW_COM.SUPPORT_FORMATS", { formats: a })), i + o;
200
+ }, q = (e) => {
201
+ let t = e.toLowerCase();
202
+ if (t.includes("file")) return ".jpg,.jpeg,.png,.webp,.doc,.docx,.ppt,.pptx,.pdf,.txt,.xls,.xlsx,.csv,.mp4,.mkv,.webm,.ts,.avi,.mov,.flv,.3gp,.ogv,.mp3,.wav,.aac,.flac,.ogg";
203
+ if (t.includes("image")) return ".jpg,.jpeg,.png,.webp";
204
+ if (t.includes("doc")) return ".doc,.docx";
205
+ if (t.includes("ppt")) return ".ppt,.pptx";
206
+ if (t.includes("pdf")) return ".pdf";
207
+ if (t.includes("txt")) return ".txt";
208
+ if (t.includes("excel")) return ".xls,.xlsx,.csv";
209
+ if (t.includes("audio")) return ".mp3,.wav,.aac,.flac,.ogg";
210
+ if (t.includes("video")) return ".mp4,.mkv,.webm,.ts,.avi,.mov,.flv,.3gp,.ogv";
211
+ }, J = (e) => {
212
+ let t = e.match(/array(\w+)/);
213
+ return t && t[1] ? t[1].toLowerCase() : null;
214
+ }, Y = e(G);
215
+ //#endregion
216
+ export { P as a, K as i, J as n, q as r, Y as t };