aibox-custom-component-packages 0.0.7 → 0.0.8

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 (182) hide show
  1. package/es/AddOrEditSupplierDialog.mjs +309 -259
  2. package/es/ApplicationTypeTag.mjs +14 -14
  3. package/es/AuthSection.mjs +11 -11
  4. package/es/AutoShowTooltip.mjs +1 -1
  5. package/es/AvailableRangePreview.mjs +1 -1
  6. package/es/AvailableRangeSetting.mjs +9 -5
  7. package/es/CodeView.mjs +1 -1
  8. package/es/CommonTagsList.mjs +5 -5
  9. package/es/CreateMcpForm.mjs +13 -12
  10. package/es/CustomSidebar.mjs +159 -154
  11. package/es/CustomTitle.mjs +1 -1
  12. package/es/CustomToggle.mjs +131 -77
  13. package/es/DocSyncSelect.mjs +2661 -0
  14. package/es/FileDisplay.mjs +2 -4
  15. package/es/FilePreview.mjs +16 -16
  16. package/es/FileUploader.mjs +71 -74
  17. package/es/Logo.mjs +72 -0
  18. package/es/McpFormDialog.mjs +1 -1
  19. package/es/McpParamsSet.mjs +34 -34
  20. package/es/MdEditor.mjs +2 -2
  21. package/es/PageContainer.mjs +438 -216
  22. package/es/ParameterTable.mjs +23 -21
  23. package/es/PublishRecord.mjs +58 -57
  24. package/es/RadioGroup.mjs +1 -1
  25. package/es/SourcePublish.mjs +95 -93
  26. package/es/Table.mjs +2 -2
  27. package/es/assets/AddOrEditSupplierDialog.css +1 -1
  28. package/es/assets/AiboxTable.css +1 -1
  29. package/es/assets/ApplicationTypeTag.css +1 -1
  30. package/es/assets/AuthSection.css +1 -1
  31. package/es/assets/AutoShowTooltip.css +1 -1
  32. package/es/assets/CommonTagsList.css +1 -1
  33. package/es/assets/CreateMcpForm.css +1 -1
  34. package/es/assets/CustomSidebar.css +1 -1
  35. package/es/assets/CustomToggle.css +1 -1
  36. package/es/assets/DocSyncSelect.css +1 -0
  37. package/es/assets/FilePreview.css +1 -1
  38. package/es/assets/Logo.css +1 -0
  39. package/es/assets/McpParamsSet.css +1 -1
  40. package/es/assets/MdEditor.css +1 -1
  41. package/es/assets/PageContainer.css +1 -1
  42. package/es/assets/ParameterTable.css +1 -1
  43. package/es/assets/PublishRecord.css +1 -1
  44. package/es/assets/RadioGroup.css +1 -1
  45. package/es/assets/SourcePublish.css +1 -1
  46. package/es/assets/index.css +1 -1
  47. package/es/assets/index2.css +1 -1
  48. package/es/assets/index3.css +1 -1
  49. package/es/assets/index4.css +1 -1
  50. package/es/assets/layout.css +1 -1
  51. package/es/chunks/{BackBar.B5Er8ZdJ.js → AiboxTable.CF4T_OCu.js} +122 -122
  52. package/es/chunks/enums.WrpwbF4w.js +14 -0
  53. package/es/chunks/index.BDd6hHiU.js +172 -0
  54. package/es/chunks/{index.CLyfh6p1.js → index.CF_YHLP5.js} +16 -16
  55. package/es/chunks/index.DdD1VsH1.js +396 -0
  56. package/es/chunks/index.Dx-mCS4E.js +1298 -0
  57. package/es/chunks/layout.CygCXa6s.js +26 -0
  58. package/es/chunks/{usePreview.C36fNlVd.js → usePreview.BHvXwaNi.js} +82 -78
  59. package/es/index.mjs +409 -325
  60. package/index.css +1 -1
  61. package/lib/AddOrEditSupplierDialog.js +1 -1
  62. package/lib/ApplicationTypeTag.js +1 -1
  63. package/lib/AuthSection.js +1 -1
  64. package/lib/AutoShowTooltip.js +1 -1
  65. package/lib/AvailableRangePreview.js +1 -1
  66. package/lib/AvailableRangeSetting.js +1 -1
  67. package/lib/CodeView.js +1 -1
  68. package/lib/CommonTagsList.js +1 -1
  69. package/lib/CreateMcpForm.js +1 -1
  70. package/lib/CustomSidebar.js +1 -1
  71. package/lib/CustomTitle.js +1 -1
  72. package/lib/CustomToggle.js +1 -1
  73. package/lib/DocSyncSelect.js +2 -0
  74. package/lib/FileDisplay.js +1 -1
  75. package/lib/FilePreview.js +1 -1
  76. package/lib/FileUploader.js +1 -1
  77. package/lib/Logo.js +1 -0
  78. package/lib/McpFormDialog.js +1 -1
  79. package/lib/McpParamsSet.js +1 -1
  80. package/lib/MdEditor.js +1 -1
  81. package/lib/PageContainer.js +1 -1
  82. package/lib/ParameterTable.js +1 -1
  83. package/lib/PublishRecord.js +2 -2
  84. package/lib/RadioGroup.js +1 -1
  85. package/lib/SourcePublish.js +1 -1
  86. package/lib/Table.js +1 -1
  87. package/lib/assets/AddOrEditSupplierDialog.css +1 -1
  88. package/lib/assets/AiboxTable.css +1 -1
  89. package/lib/assets/ApplicationTypeTag.css +1 -1
  90. package/lib/assets/AuthSection.css +1 -1
  91. package/lib/assets/AutoShowTooltip.css +1 -1
  92. package/lib/assets/CommonTagsList.css +1 -1
  93. package/lib/assets/CreateMcpForm.css +1 -1
  94. package/lib/assets/CustomSidebar.css +1 -1
  95. package/lib/assets/CustomToggle.css +1 -1
  96. package/lib/assets/DocSyncSelect.css +1 -0
  97. package/lib/assets/FilePreview.css +1 -1
  98. package/lib/assets/Logo.css +1 -0
  99. package/lib/assets/McpParamsSet.css +1 -1
  100. package/lib/assets/MdEditor.css +1 -1
  101. package/lib/assets/PageContainer.css +1 -1
  102. package/lib/assets/ParameterTable.css +1 -1
  103. package/lib/assets/PublishRecord.css +1 -1
  104. package/lib/assets/RadioGroup.css +1 -1
  105. package/lib/assets/SourcePublish.css +1 -1
  106. package/lib/assets/index.css +1 -1
  107. package/lib/assets/index2.css +1 -1
  108. package/lib/assets/index3.css +1 -1
  109. package/lib/assets/index4.css +1 -1
  110. package/lib/assets/layout.css +1 -1
  111. package/lib/chunks/AiboxTable.CJOPGJtU.js +1 -0
  112. package/lib/chunks/enums.DpU2er5r.js +1 -0
  113. package/lib/chunks/index.BNivYbtq.js +1 -0
  114. package/lib/chunks/{index.DME62Yfo.js → index.B_keI1Aq.js} +1 -1
  115. package/lib/chunks/index.C7aZx6RG.js +6 -0
  116. package/lib/chunks/index.CJFk1R2u.js +59 -0
  117. package/lib/chunks/layout.DbBSbLgm.js +1 -0
  118. package/lib/chunks/usePreview.BojIDW7Z.js +1 -0
  119. package/lib/index.js +2 -1
  120. package/package.json +2 -2
  121. package/es/ExampleComponent.mjs +0 -35
  122. package/es/assets/BackBar.css +0 -1
  123. package/es/assets/ExampleComponent.css +0 -1
  124. package/es/chunks/BackBar.Bc2NIuzk.js +0 -645
  125. package/es/chunks/BackBar.Cv1wxUcM.js +0 -645
  126. package/es/chunks/BackBar.DJV4JaUM.js +0 -645
  127. package/es/chunks/config.8htFF04x.js +0 -325
  128. package/es/chunks/config.BPp4hMBq.js +0 -325
  129. package/es/chunks/config.BU21Gda2.js +0 -49
  130. package/es/chunks/config.BzCGum_W.js +0 -49
  131. package/es/chunks/config.CFWGjEdA.js +0 -49
  132. package/es/chunks/config.CfWAdyUH.js +0 -325
  133. package/es/chunks/config.DTMcCH58.js +0 -325
  134. package/es/chunks/config.DqhQdkz7.js +0 -325
  135. package/es/chunks/enums.CfSBDD6u.js +0 -83
  136. package/es/chunks/enums.DuBbLcd-.js +0 -83
  137. package/es/chunks/i18n.DmqkiK-h.js +0 -444
  138. package/es/chunks/i18n.Vhq-tZPw.js +0 -94
  139. package/es/chunks/i18n.ro9yz7rE.js +0 -94
  140. package/es/chunks/index.BSA3IKSF.js +0 -111
  141. package/es/chunks/index.CgbxJCEU.js +0 -265
  142. package/es/chunks/index.CuDwuRO7.js +0 -265
  143. package/es/chunks/index.DB0ayMv8.js +0 -257
  144. package/es/chunks/index.DWR4lc30.js +0 -203
  145. package/es/chunks/index.GuEzdh6b.js +0 -257
  146. package/es/chunks/index.aMb6IVQD.js +0 -257
  147. package/es/chunks/index.ml5i7aB5.js +0 -257
  148. package/es/chunks/index.s-YxIOfq.js +0 -301
  149. package/es/chunks/index.uOZzvHrF.js +0 -135
  150. package/es/chunks/publish.BCb7nCo9.js +0 -50
  151. package/es/chunks/publish.D6friivo.js +0 -50
  152. package/es/chunks/publish.Dqzn7qEl.js +0 -50
  153. package/es/i18n.mjs +0 -17
  154. package/lib/ExampleComponent.js +0 -1
  155. package/lib/assets/BackBar.css +0 -1
  156. package/lib/assets/ExampleComponent.css +0 -1
  157. package/lib/chunks/BackBar.C8Xrc6qW.js +0 -1
  158. package/lib/chunks/BackBar.CZsNxoX1.js +0 -1
  159. package/lib/chunks/BackBar.s5_vN6jt.js +0 -1
  160. package/lib/chunks/config.B0XKkp1w.js +0 -1
  161. package/lib/chunks/config.BCAuBVxV.js +0 -1
  162. package/lib/chunks/config.Bs7sh3aP.js +0 -1
  163. package/lib/chunks/config.C1w4hgfw.js +0 -1
  164. package/lib/chunks/config.ClERt2RF.js +0 -1
  165. package/lib/chunks/enums.Dmq4PdUc.js +0 -1
  166. package/lib/chunks/i18n.CL5L6nx6.js +0 -1
  167. package/lib/chunks/i18n.aAXi5igh.js +0 -1
  168. package/lib/chunks/index.BNqTEn3K.js +0 -1
  169. package/lib/chunks/index.BZcSlgOO.js +0 -1
  170. package/lib/chunks/index.Bk-RwmaH.js +0 -1
  171. package/lib/chunks/index.BsN4urmi.js +0 -1
  172. package/lib/chunks/index.D7wBInWr.js +0 -1
  173. package/lib/chunks/index.DWohILMv.js +0 -1
  174. package/lib/chunks/index.LK2ulXTE.js +0 -1
  175. package/lib/chunks/index.qDAoOzk9.js +0 -1
  176. package/lib/chunks/index.s8vGOJKG.js +0 -1
  177. package/lib/chunks/publish.Bw1acrSu.js +0 -1
  178. package/lib/chunks/publish.CA1uSVnm.js +0 -1
  179. package/lib/chunks/usePreview.E5SeS2uw.js +0 -1
  180. package/lib/i18n.js +0 -1
  181. /package/es/assets/{index6.css → legacy.css} +0 -0
  182. /package/lib/assets/{index6.css → legacy.css} +0 -0
@@ -1,111 +0,0 @@
1
- import { w as I } from "./index.bCzIhWFw.js";
2
- import { resolveComponent as v, resolveDirective as h, createElementBlock as t, createCommentVNode as w, openBlock as l, Fragment as y, renderList as N, withDirectives as k, createElementVNode as d, createBlock as a, createVNode as f, withCtx as u, unref as n, resolveDynamicComponent as S, createTextVNode as V, toDisplayString as g } from "vue";
3
- import { m as E, c as x, u as M } from "./usePreview.C36fNlVd.js";
4
- import { Error as B } from "color-message-aibox-vue";
5
- import { _ as R } from "./_plugin-vue_export-helper.CHgC5LLL.js";
6
- import '../assets/index.css';const $ = (o) => {
7
- if (!o) return "";
8
- let s = 0;
9
- for (; Math.abs(o) >= 1024 && (o = o / 1024, s++, s !== 4); )
10
- ;
11
- const r = ["B", "KB", "MB", "GB", "TB"];
12
- return Math.round(o * 100) / 100 + " " + r[s];
13
- }, T = {
14
- key: 0,
15
- class: "file-display"
16
- }, j = { class: "file-img overflow-hidden" }, A = {
17
- key: 0,
18
- class: "file-img__failed w-full h-full flex items-center justify-center"
19
- }, G = { class: "file-display__item--name text-ellipsis" }, K = { class: "file-display__item--size" }, P = {
20
- __name: "index",
21
- props: {
22
- fileList: {
23
- type: Array,
24
- default: () => []
25
- },
26
- showRemove: {
27
- type: Boolean,
28
- default: !0
29
- },
30
- showLoading: {
31
- type: Boolean,
32
- default: !1
33
- }
34
- },
35
- emits: ["remove-file"],
36
- setup(o, { emit: s }) {
37
- const { previewImage: r } = E(), _ = s, C = (i, m) => {
38
- _("remove-file", i, m);
39
- }, L = (i) => {
40
- x(i.suffix, i.url) ? r(i.url) : window.open(i.url, "_blank");
41
- };
42
- return (i, m) => {
43
- const c = v("el-icon"), b = v("el-image"), D = h("loading"), z = h("ellipsis-tooltip");
44
- return o.fileList.length ? (l(), t("div", T, [
45
- (l(!0), t(y, null, N(o.fileList, (e, p) => (l(), t("div", {
46
- key: p,
47
- class: "file-display__item"
48
- }, [
49
- k((l(), t("div", j, [
50
- e.failed && o.showLoading ? (l(), t("div", A, [
51
- f(c, {
52
- size: "22px",
53
- color: "#f56c6c"
54
- }, {
55
- default: u(() => [
56
- f(n(B))
57
- ]),
58
- _: 1
59
- })
60
- ])) : (l(), t(y, { key: 1 }, [
61
- n(x)(e.suffix, e.url) ? (l(), a(b, {
62
- key: 0,
63
- src: e.url,
64
- "zoom-rate": 1.2,
65
- "max-scale": 7,
66
- "min-scale": 0.2,
67
- onClick: (F) => L(e),
68
- fit: "cover"
69
- }, null, 8, ["src", "onClick"])) : (l(), a(c, {
70
- key: 1,
71
- size: "38px"
72
- }, {
73
- default: u(() => [
74
- (l(), a(S(n(M)(e))))
75
- ]),
76
- _: 2
77
- }, 1024))
78
- ], 64))
79
- ])), [
80
- [D, !e.bnid && !e.failed && o.showLoading]
81
- ]),
82
- d("div", null, [
83
- k((l(), t("p", G, [
84
- V(g(e.name), 1)
85
- ])), [
86
- [z, e.name]
87
- ]),
88
- d("p", K, [
89
- d("span", null, g(n($)(e.size)), 1)
90
- ])
91
- ]),
92
- o.showRemove ? (l(), a(c, {
93
- key: 0,
94
- class: "icon-remove",
95
- size: "18",
96
- onClick: (F) => C(p, e.bnid)
97
- }, {
98
- default: u(() => [
99
- f(n(B))
100
- ]),
101
- _: 1
102
- }, 8, ["onClick"])) : w("", !0)
103
- ]))), 128))
104
- ])) : w("", !0);
105
- };
106
- }
107
- }, U = /* @__PURE__ */ R(P, [["__scopeId", "data-v-444edb90"]]), W = I(U);
108
- export {
109
- W as F,
110
- $ as f
111
- };
@@ -1,265 +0,0 @@
1
- import { w as j } from "./index.bCzIhWFw.js";
2
- import { ref as E, computed as h, resolveDirective as z, createElementBlock as _, openBlock as i, normalizeStyle as X, normalizeClass as I, withDirectives as V, createBlock as r, unref as a, withCtx as f, createElementVNode as p, createCommentVNode as m, renderSlot as N, resolveDynamicComponent as $, Fragment as Y, createVNode as T, createTextVNode as G, toDisplayString as O } from "vue";
3
- import { ElUpload as H, ElIcon as y, ElImage as Z, ElButton as q, ElMessage as w } from "element-plus";
4
- import { f as J } from "./files.cduUqjHX.js";
5
- import { u as L } from "./i18n.DDMVloiU.js";
6
- import { MySpace as Q, Space as ee, IconEdit2 as te, IconAdd as ae, IconUpload2 as le, File as oe } from "color-message-aibox-vue";
7
- import { ICON_PATH_MAP as g, SOURCE_TYPE as C, APPLICATION_TYPE as F } from "color-star-custom-components";
8
- import "./enums.DuBbLcd-.js";
9
- import '../assets/index4.css';const v = {
10
- 卡片: "Card",
11
- 按钮: "Button",
12
- 面板: "Panel",
13
- 自定义: "Custom"
14
- }, se = { class: "card-uploader__mask" }, ne = {
15
- key: 4,
16
- class: "pd-l-24 pd-r-24"
17
- }, ie = { class: "panel-uploader__text" }, ce = { class: "panel-uploader__text--tip" }, de = { class: "text-3271fe" }, pe = { class: "text-262626" }, ue = { class: "text-3271fe" }, re = { class: "text-262626" }, fe = {
18
- key: 0,
19
- class: "panel-uploader__text--tip font-style"
20
- }, me = { class: "panel-uploader__text--tip font-style" }, Oe = {
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: t }) {
66
- const { t: o } = L(), n = E(!1), l = E(null), { commonUpload: M } = J(), d = e, S = t, A = (s) => {
67
- const u = /\.([^.]+)$/, c = s.match(u);
68
- return c ? c[1] : null;
69
- }, W = (s, u, c) => {
70
- let P = !0;
71
- const R = s.name && s.name.toLowerCase();
72
- if (console.log(s.name, R, "fileName"), u && u.indexOf(A(R)) === -1) {
73
- const U = o("COMPONENTS.UPLOAD_TYPE_TIP", { type: u });
74
- w({
75
- type: "warning",
76
- message: U
77
- }), P = !1;
78
- }
79
- if (s.size > 1024 * 1024 * c) {
80
- const U = o("COMPONENTS.UPLOAD_SIZE_TIP", { size: c });
81
- w.warning(U), P = !1;
82
- }
83
- return P;
84
- }, b = {
85
- space: ee,
86
- "my-space": Q
87
- }, k = {
88
- plugin: g.application[C.PLUGIN],
89
- agent: g.agent[F.autonomous],
90
- dialogue: g.agent[F.dialogue],
91
- model: g.application[C.MODEL],
92
- workflow: g.application[C.WORKFLOW],
93
- mcp: g.application[C.MCP]
94
- }, B = h(() => ({
95
- Card: "card-uploader",
96
- Button: "button-uploader",
97
- Panel: "panel-uploader"
98
- })[d.uploadType]), x = h(() => d.defaultUploadIcon ? b[d.defaultUploadIcon] : ""), K = () => {
99
- const s = o(
100
- "COMPONENTS.UPLOAD_COUNT_TIP",
101
- { count: d.limitCount }
102
- );
103
- w({
104
- type: "warning",
105
- message: s
106
- });
107
- }, D = async (s) => {
108
- if (W(s, d.acceptType, d.limitSize))
109
- if (d.isMiio) {
110
- n.value = !0;
111
- const { data: c } = await M(
112
- {
113
- file: s.raw
114
- },
115
- d.businessType
116
- ).finally(() => {
117
- n.value = !1;
118
- });
119
- console.log(c, "data"), S("on-success", c);
120
- } else
121
- S("on-success", s);
122
- else
123
- l.value.handleRemove(s);
124
- };
125
- return (s, u) => {
126
- const c = z("loading");
127
- return i(), _("div", {
128
- class: I(["file-uploader", e.defaultUploadIcon]),
129
- style: X({
130
- border: !e.defaultUploadIcon && e.uploadType === "Card" ? "1px dashed var(--el-border-color)" : "none",
131
- "border-radius": !e.defaultUploadIcon && e.uploadType === "Card" ? "8px" : "0",
132
- "background-image": x.value ? `url('${x.value}')` : "none"
133
- })
134
- }, [
135
- V((i(), r(a(H), {
136
- ref_key: "uploader",
137
- ref: l,
138
- class: I(B.value),
139
- action: "",
140
- "auto-upload": !1,
141
- limit: e.limitCount,
142
- "show-file-list": !1,
143
- accept: e.acceptType,
144
- multiple: e.multiple,
145
- drag: e.uploadType === a(v).面板,
146
- "on-change": D,
147
- "on-exceed": K
148
- }, {
149
- default: f(() => [
150
- x.value ? (i(), r(a(y), {
151
- key: 0,
152
- size: "64",
153
- class: "absolute"
154
- }, {
155
- default: f(() => [
156
- (i(), r($(x.value)))
157
- ]),
158
- _: 1
159
- })) : (i(), _(Y, { key: 1 }, [
160
- e.defaultUploadIcon ? (i(), r(a(Z), {
161
- key: 0,
162
- style: { width: "64px", height: "64px" },
163
- src: k[e.defaultUploadIcon],
164
- class: "absolute"
165
- }, null, 8, ["src"])) : m("", !0)
166
- ], 64)),
167
- p("div", se, [
168
- T(a(y), {
169
- color: "#fff",
170
- size: "16px"
171
- }, {
172
- default: f(() => [
173
- T(a(te))
174
- ]),
175
- _: 1
176
- })
177
- ]),
178
- e.uploadType === a(v).卡片 ? (i(), r(a(y), {
179
- key: 2,
180
- class: "card-uploader__icon"
181
- }, {
182
- default: f(() => [
183
- e.defaultUploadIcon ? m("", !0) : (i(), r(a(ae), { key: 0 })),
184
- N(s.$slots, "text-slot")
185
- ]),
186
- _: 3
187
- })) : m("", !0),
188
- e.uploadType === a(v).按钮 ? (i(), r(a(q), {
189
- key: 3,
190
- type: "primary"
191
- }, {
192
- default: f(() => [
193
- T(a(y), { style: { "margin-right": "5px" } }, {
194
- default: f(() => [
195
- T(a(le))
196
- ]),
197
- _: 1
198
- }),
199
- G(" " + O(a(o)("COMMON_BUTTON.UPLOAD_TEXT")), 1)
200
- ]),
201
- _: 1
202
- })) : m("", !0),
203
- e.uploadType === a(v).面板 ? (i(), _("div", ne, [
204
- T(a(y), { size: "48px" }, {
205
- default: f(() => [
206
- T(a(oe))
207
- ]),
208
- _: 1
209
- }),
210
- p("div", ie, [
211
- p("div", ce, [
212
- p("span", de, O(a(o)("COMMON_BUTTON.CLICK_TEXT")), 1),
213
- p("span", pe, O(a(o)("COMMON_BUTTON.OR_TEXT")), 1),
214
- p("span", ue, O(a(o)("COMMON_BUTTON.DRAG_TEXT")), 1),
215
- p("span", re, O(a(o)("COMMON_BUTTON.FILE_UPLOAD_TEXT")), 1)
216
- ]),
217
- e.warnTips2 ? (i(), _("div", fe, O(e.warnTips2), 1)) : m("", !0),
218
- p("div", me, O(e.warnTips), 1)
219
- ])
220
- ])) : m("", !0),
221
- e.uploadType === a(v).自定义 ? N(s.$slots, "upload-box", { key: 5 }) : m("", !0)
222
- ]),
223
- _: 3
224
- }, 8, ["class", "limit", "accept", "multiple", "drag"])), [
225
- [c, n.value]
226
- ])
227
- ], 6);
228
- };
229
- }
230
- }, Pe = (e) => {
231
- const { t } = L();
232
- let o = e.toLowerCase(), n = "", l = "";
233
- const M = t("WORKFLOW_COM.TIP_TEXT_3");
234
- return o.includes("file") ? (l = "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", n = t("WORKFLOW_COM.SUPPORT_FORMATS", { formats: l })) : o.includes("image") ? (l = "jpg、jpeg、png、webp", n = t("WORKFLOW_COM.SUPPORT_FORMATS", { formats: l })) : o.includes("doc") ? (l = "doc、docx", n = t("WORKFLOW_COM.SUPPORT_FORMATS", { formats: l })) : o.includes("ppt") ? (l = "ppt、pptx", n = t("WORKFLOW_COM.SUPPORT_FORMATS", { formats: l })) : o.includes("pdf") ? (l = "pdf", n = t("WORKFLOW_COM.SUPPORT_FORMATS", { formats: l })) : o.includes("txt") ? (l = "txt", n = t("WORKFLOW_COM.SUPPORT_FORMATS", { formats: l })) : o.includes("excel") ? (l = "xls、xlsx、csv", n = t("WORKFLOW_COM.SUPPORT_FORMATS", { formats: l })) : o.includes("audio") ? (l = "mp3、wav、aac、flac、ogg", n = t("WORKFLOW_COM.SUPPORT_FORMATS", { formats: l })) : o.includes("video") && (l = "mp4、mkv、webm、ts、avi、mov、flv、3gp、ogv", n = t("WORKFLOW_COM.SUPPORT_FORMATS", { formats: l })), n + M;
235
- }, Ue = (e) => {
236
- let t = e.toLowerCase();
237
- if (t.includes("file"))
238
- 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";
239
- if (t.includes("image"))
240
- return ".jpg,.jpeg,.png,.webp";
241
- if (t.includes("doc"))
242
- return ".doc,.docx";
243
- if (t.includes("ppt"))
244
- return ".ppt,.pptx";
245
- if (t.includes("pdf"))
246
- return ".pdf";
247
- if (t.includes("txt"))
248
- return ".txt";
249
- if (t.includes("excel"))
250
- return ".xls,.xlsx,.csv";
251
- if (t.includes("audio"))
252
- return ".mp3,.wav,.aac,.flac,.ogg";
253
- if (t.includes("video"))
254
- return ".mp4,.mkv,.webm,.ts,.avi,.mov,.flv,.3gp,.ogv";
255
- }, we = (e) => {
256
- const t = e.match(/array(\\w+)/);
257
- return t && t[1] ? t[1].toLowerCase() : null;
258
- }, Se = j(Oe);
259
- export {
260
- Se as F,
261
- v as U,
262
- Pe as a,
263
- we as e,
264
- Ue as g
265
- };
@@ -1,265 +0,0 @@
1
- import { w as j } from "./index.bCzIhWFw.js";
2
- import { ref as E, computed as h, resolveDirective as z, createElementBlock as _, openBlock as i, normalizeStyle as X, normalizeClass as I, withDirectives as V, createBlock as r, unref as a, withCtx as f, createElementVNode as p, createCommentVNode as m, renderSlot as N, resolveDynamicComponent as $, Fragment as Y, createVNode as T, createTextVNode as G, toDisplayString as O } from "vue";
3
- import { ElUpload as H, ElIcon as y, ElImage as Z, ElButton as q, ElMessage as w } from "element-plus";
4
- import { f as J } from "./files.cduUqjHX.js";
5
- import { u as L } from "./i18n.DDMVloiU.js";
6
- import { MySpace as Q, Space as ee, IconEdit2 as te, IconAdd as ae, IconUpload2 as le, File as oe } from "color-message-aibox-vue";
7
- import { ICON_PATH_MAP as g, SOURCE_TYPE as C, APPLICATION_TYPE as F } from "color-star-custom-components";
8
- import "./enums.Dvec-maC.js";
9
- import '../assets/index4.css';const v = {
10
- 卡片: "Card",
11
- 按钮: "Button",
12
- 面板: "Panel",
13
- 自定义: "Custom"
14
- }, se = { class: "card-uploader__mask" }, ne = {
15
- key: 4,
16
- class: "pd-l-24 pd-r-24"
17
- }, ie = { class: "panel-uploader__text" }, ce = { class: "panel-uploader__text--tip" }, de = { class: "text-3271fe" }, pe = { class: "text-262626" }, ue = { class: "text-3271fe" }, re = { class: "text-262626" }, fe = {
18
- key: 0,
19
- class: "panel-uploader__text--tip font-style"
20
- }, me = { class: "panel-uploader__text--tip font-style" }, Oe = {
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: t }) {
66
- const { t: o } = L(), n = E(!1), l = E(null), { commonUpload: M } = J(), d = e, S = t, A = (s) => {
67
- const u = /\.([^.]+)$/, c = s.match(u);
68
- return c ? c[1] : null;
69
- }, W = (s, u, c) => {
70
- let P = !0;
71
- const R = s.name && s.name.toLowerCase();
72
- if (console.log(s.name, R, "fileName"), u && u.indexOf(A(R)) === -1) {
73
- const U = o("COMPONENTS.UPLOAD_TYPE_TIP", { type: u });
74
- w({
75
- type: "warning",
76
- message: U
77
- }), P = !1;
78
- }
79
- if (s.size > 1024 * 1024 * c) {
80
- const U = o("COMPONENTS.UPLOAD_SIZE_TIP", { size: c });
81
- w.warning(U), P = !1;
82
- }
83
- return P;
84
- }, b = {
85
- space: ee,
86
- "my-space": Q
87
- }, k = {
88
- plugin: g.application[C.PLUGIN],
89
- agent: g.agent[F.autonomous],
90
- dialogue: g.agent[F.dialogue],
91
- model: g.application[C.MODEL],
92
- workflow: g.application[C.WORKFLOW],
93
- mcp: g.application[C.MCP]
94
- }, B = h(() => ({
95
- Card: "card-uploader",
96
- Button: "button-uploader",
97
- Panel: "panel-uploader"
98
- })[d.uploadType]), x = h(() => d.defaultUploadIcon ? b[d.defaultUploadIcon] : ""), K = () => {
99
- const s = o(
100
- "COMPONENTS.UPLOAD_COUNT_TIP",
101
- { count: d.limitCount }
102
- );
103
- w({
104
- type: "warning",
105
- message: s
106
- });
107
- }, D = async (s) => {
108
- if (W(s, d.acceptType, d.limitSize))
109
- if (d.isMiio) {
110
- n.value = !0;
111
- const { data: c } = await M(
112
- {
113
- file: s.raw
114
- },
115
- d.businessType
116
- ).finally(() => {
117
- n.value = !1;
118
- });
119
- console.log(c, "data"), S("on-success", c);
120
- } else
121
- S("on-success", s);
122
- else
123
- l.value.handleRemove(s);
124
- };
125
- return (s, u) => {
126
- const c = z("loading");
127
- return i(), _("div", {
128
- class: I(["file-uploader", e.defaultUploadIcon]),
129
- style: X({
130
- border: !e.defaultUploadIcon && e.uploadType === "Card" ? "1px dashed var(--el-border-color)" : "none",
131
- "border-radius": !e.defaultUploadIcon && e.uploadType === "Card" ? "8px" : "0",
132
- "background-image": x.value ? `url('${x.value}')` : "none"
133
- })
134
- }, [
135
- V((i(), r(a(H), {
136
- ref_key: "uploader",
137
- ref: l,
138
- class: I(B.value),
139
- action: "",
140
- "auto-upload": !1,
141
- limit: e.limitCount,
142
- "show-file-list": !1,
143
- accept: e.acceptType,
144
- multiple: e.multiple,
145
- drag: e.uploadType === a(v).面板,
146
- "on-change": D,
147
- "on-exceed": K
148
- }, {
149
- default: f(() => [
150
- x.value ? (i(), r(a(y), {
151
- key: 0,
152
- size: "64",
153
- class: "absolute"
154
- }, {
155
- default: f(() => [
156
- (i(), r($(x.value)))
157
- ]),
158
- _: 1
159
- })) : (i(), _(Y, { key: 1 }, [
160
- e.defaultUploadIcon ? (i(), r(a(Z), {
161
- key: 0,
162
- style: { width: "64px", height: "64px" },
163
- src: k[e.defaultUploadIcon],
164
- class: "absolute"
165
- }, null, 8, ["src"])) : m("", !0)
166
- ], 64)),
167
- p("div", se, [
168
- T(a(y), {
169
- color: "#fff",
170
- size: "16px"
171
- }, {
172
- default: f(() => [
173
- T(a(te))
174
- ]),
175
- _: 1
176
- })
177
- ]),
178
- e.uploadType === a(v).卡片 ? (i(), r(a(y), {
179
- key: 2,
180
- class: "card-uploader__icon"
181
- }, {
182
- default: f(() => [
183
- e.defaultUploadIcon ? m("", !0) : (i(), r(a(ae), { key: 0 })),
184
- N(s.$slots, "text-slot")
185
- ]),
186
- _: 3
187
- })) : m("", !0),
188
- e.uploadType === a(v).按钮 ? (i(), r(a(q), {
189
- key: 3,
190
- type: "primary"
191
- }, {
192
- default: f(() => [
193
- T(a(y), { style: { "margin-right": "5px" } }, {
194
- default: f(() => [
195
- T(a(le))
196
- ]),
197
- _: 1
198
- }),
199
- G(" " + O(a(o)("COMMON_BUTTON.UPLOAD_TEXT")), 1)
200
- ]),
201
- _: 1
202
- })) : m("", !0),
203
- e.uploadType === a(v).面板 ? (i(), _("div", ne, [
204
- T(a(y), { size: "48px" }, {
205
- default: f(() => [
206
- T(a(oe))
207
- ]),
208
- _: 1
209
- }),
210
- p("div", ie, [
211
- p("div", ce, [
212
- p("span", de, O(a(o)("COMMON_BUTTON.CLICK_TEXT")), 1),
213
- p("span", pe, O(a(o)("COMMON_BUTTON.OR_TEXT")), 1),
214
- p("span", ue, O(a(o)("COMMON_BUTTON.DRAG_TEXT")), 1),
215
- p("span", re, O(a(o)("COMMON_BUTTON.FILE_UPLOAD_TEXT")), 1)
216
- ]),
217
- e.warnTips2 ? (i(), _("div", fe, O(e.warnTips2), 1)) : m("", !0),
218
- p("div", me, O(e.warnTips), 1)
219
- ])
220
- ])) : m("", !0),
221
- e.uploadType === a(v).自定义 ? N(s.$slots, "upload-box", { key: 5 }) : m("", !0)
222
- ]),
223
- _: 3
224
- }, 8, ["class", "limit", "accept", "multiple", "drag"])), [
225
- [c, n.value]
226
- ])
227
- ], 6);
228
- };
229
- }
230
- }, Pe = (e) => {
231
- const { t } = L();
232
- let o = e.toLowerCase(), n = "", l = "";
233
- const M = t("WORKFLOW_COM.TIP_TEXT_3");
234
- return o.includes("file") ? (l = "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", n = t("WORKFLOW_COM.SUPPORT_FORMATS", { formats: l })) : o.includes("image") ? (l = "jpg、jpeg、png、webp", n = t("WORKFLOW_COM.SUPPORT_FORMATS", { formats: l })) : o.includes("doc") ? (l = "doc、docx", n = t("WORKFLOW_COM.SUPPORT_FORMATS", { formats: l })) : o.includes("ppt") ? (l = "ppt、pptx", n = t("WORKFLOW_COM.SUPPORT_FORMATS", { formats: l })) : o.includes("pdf") ? (l = "pdf", n = t("WORKFLOW_COM.SUPPORT_FORMATS", { formats: l })) : o.includes("txt") ? (l = "txt", n = t("WORKFLOW_COM.SUPPORT_FORMATS", { formats: l })) : o.includes("excel") ? (l = "xls、xlsx、csv", n = t("WORKFLOW_COM.SUPPORT_FORMATS", { formats: l })) : o.includes("audio") ? (l = "mp3、wav、aac、flac、ogg", n = t("WORKFLOW_COM.SUPPORT_FORMATS", { formats: l })) : o.includes("video") && (l = "mp4、mkv、webm、ts、avi、mov、flv、3gp、ogv", n = t("WORKFLOW_COM.SUPPORT_FORMATS", { formats: l })), n + M;
235
- }, Ue = (e) => {
236
- let t = e.toLowerCase();
237
- if (t.includes("file"))
238
- 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";
239
- if (t.includes("image"))
240
- return ".jpg,.jpeg,.png,.webp";
241
- if (t.includes("doc"))
242
- return ".doc,.docx";
243
- if (t.includes("ppt"))
244
- return ".ppt,.pptx";
245
- if (t.includes("pdf"))
246
- return ".pdf";
247
- if (t.includes("txt"))
248
- return ".txt";
249
- if (t.includes("excel"))
250
- return ".xls,.xlsx,.csv";
251
- if (t.includes("audio"))
252
- return ".mp3,.wav,.aac,.flac,.ogg";
253
- if (t.includes("video"))
254
- return ".mp4,.mkv,.webm,.ts,.avi,.mov,.flv,.3gp,.ogv";
255
- }, we = (e) => {
256
- const t = e.match(/array(\\w+)/);
257
- return t && t[1] ? t[1].toLowerCase() : null;
258
- }, Se = j(Oe);
259
- export {
260
- Se as F,
261
- v as U,
262
- Pe as a,
263
- we as e,
264
- Ue as g
265
- };