china-mobile-international-custom-components 0.0.54 → 0.0.56

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 (47) hide show
  1. package/es/AddOrEditSupplierDialog.mjs +920 -22
  2. package/es/ApplicationIcon.mjs +38 -37
  3. package/es/AuthSection.mjs +191 -0
  4. package/es/CodeView.mjs +170 -0
  5. package/es/CommonTagsList.mjs +31 -30
  6. package/es/CreateMcpForm.mjs +331 -0
  7. package/es/FilePreview.mjs +229 -0
  8. package/es/FileUploader.mjs +92 -87
  9. package/es/McpFormDialog.mjs +187 -0
  10. package/es/RadioGroup.mjs +119 -0
  11. package/es/SourcePublish.mjs +2 -2
  12. package/es/assets/AddOrEditSupplierDialog.css +1 -1
  13. package/es/assets/AuthSection.css +1 -0
  14. package/es/assets/CodeView.css +1 -0
  15. package/es/assets/CreateMcpForm.css +1 -0
  16. package/es/assets/FilePreview.css +1 -0
  17. package/es/assets/McpFormDialog.css +1 -0
  18. package/es/assets/RadioGroup.css +1 -0
  19. package/es/assets/usePreview.css +1 -0
  20. package/es/chunks/config.CgrPt4Zx.js +435 -0
  21. package/es/chunks/mcp-tool.Nc4HT9IM.js +4 -0
  22. package/es/chunks/usePreview.BMkgYO7E.js +124 -0
  23. package/es/index.mjs +167 -149
  24. package/lib/AddOrEditSupplierDialog.js +1 -1
  25. package/lib/ApplicationIcon.js +1 -1
  26. package/lib/AuthSection.js +1 -0
  27. package/lib/CodeView.js +1 -0
  28. package/lib/CommonTagsList.js +1 -1
  29. package/lib/CreateMcpForm.js +1 -0
  30. package/lib/FilePreview.js +1 -0
  31. package/lib/FileUploader.js +1 -1
  32. package/lib/McpFormDialog.js +1 -0
  33. package/lib/RadioGroup.js +1 -0
  34. package/lib/SourcePublish.js +1 -1
  35. package/lib/assets/AddOrEditSupplierDialog.css +1 -1
  36. package/lib/assets/AuthSection.css +1 -0
  37. package/lib/assets/CodeView.css +1 -0
  38. package/lib/assets/CreateMcpForm.css +1 -0
  39. package/lib/assets/FilePreview.css +1 -0
  40. package/lib/assets/McpFormDialog.css +1 -0
  41. package/lib/assets/RadioGroup.css +1 -0
  42. package/lib/assets/usePreview.css +1 -0
  43. package/lib/chunks/config.BvBtwI1A.js +1 -0
  44. package/lib/chunks/mcp-tool.fb1SS2wA.js +1 -0
  45. package/lib/chunks/usePreview.BzTCNJfE.js +1 -0
  46. package/lib/index.js +1 -1
  47. package/package.json +7 -1
@@ -1,9 +1,10 @@
1
- import { w as f } from "./chunks/index.bCzIhWFw.js";
2
- import { computed as s, createElementBlock as w, openBlock as o, createBlock as n, unref as c, normalizeStyle as u, withCtx as l, createVNode as h, resolveDynamicComponent as p } from "vue";
3
- import { WorkflowIcon3 as W, WorkflowIcon1 as b, Model as m, Plugin as P, Workflow as z } from "color-message-aibox-vue";
4
- import { S as t, A as d } from "./chunks/config.DE5PZU2F.js";
5
- import { ElImage as y, ElIcon as B } from "element-plus";
6
- const E = "data:image/webp;base64,UklGRiIOAABXRUJQVlA4WAoAAAAwAAAAdwAAdwAASUNDUMgBAAAAAAHIAAAAAAQwAABtbnRyUkdCIFhZWiAH4AABAAEAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA9tYAAQAAAADTLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlkZXNjAAAA8AAAACRyWFlaAAABFAAAABRnWFlaAAABKAAAABRiWFlaAAABPAAAABR3dHB0AAABUAAAABRyVFJDAAABZAAAAChnVFJDAAABZAAAAChiVFJDAAABZAAAAChjcHJ0AAABjAAAADxtbHVjAAAAAAAAAAEAAAAMZW5VUwAAAAgAAAAcAHMAUgBHAEJYWVogAAAAAAAAb6IAADj1AAADkFhZWiAAAAAAAABimQAAt4UAABjaWFlaIAAAAAAAACSgAAAPhAAAts9YWVogAAAAAAAA9tYAAQAAAADTLXBhcmEAAAAAAAQAAAACZmYAAP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7HcTfsoqEotU91HVuut6qyi24hp9if9u9Wjedv9jSh/oTS2/v35Sm4O4Px7oANiY+kd/yiUbQrwvkA7faluOmbwQeOAyPnwycu9y25gFFRQAEdc5sU+nU2KyizwbYZAvyAICukLuoAeUZU6XRlCSopztinzAd6WUvt2tBCpI/wYUib0wierTnMEovOC1bKSQ7nGlKMWuU/G21At2x9p+xl9hknOtO7WSBAACh9Rt18XS9vHec6VImH0vo7SAZHubzj8YhVwMApaBNtvXajYcKf/JlzWiUivVhX6sOHvoJlZM/TN0K+jtdmtudHYE92dncN2P8wB0/pN35qrXz1BjFTRRDAilGLvk/FW1PWdBh4AHwd//S0cObfXUq3lwZL344YIUF3tIZVBThf1EostiUw46Xjro3sN6gyr3YilDFj0hDRDeEw/a6Xxx7n7UVPz0zSMuV51Fdy9Fsz7bwfb4BWoaeORj4/x6e0u+LEP9IX7NHnpevC2MNut9HG7D5EQSHCQJ7Fb6NbPP7vwr+X38cob3TJwUcKCXfPlzrXbubI9X8+uwR94DnNgeEs9zj3oc+G9p2mgMZ0JVb/+VpItopl6dIQIllUM4CheqpvTFtr//tDcVvF9SHb1wzOgb7pJwWckTDeWUYtxxrJ8wpQ8tp3fPTmartKaANaYFZ4jkA7s8VHJ/ILy4jwcU07ipNx1xcgg4QEI/1mQEKtVrIBHF0EnLslfB0hbEP1b2Obhchoz7b+iTylrsYVK/uyYzbNWxeAnZWhmj+uu2Ujehru+hPqAq//sYRuliYOf3nttegTec12a5Z7/0GvjgRo2IHxAlaIy6NMngItAPTKYZ6EuxHR4LPN/wU+1YRDHRvjqBzW+Yp88j5E3nJ92l6Hq3Qk6wn6orXoAtAeXGG8etZkypE3R83V1UEgQGuiMdeuJesXJrRlTA0tEKnD29sV7ZT84IQWJLDpL/2zmEXEkjZh2gznyaBL5AUuAkfs9HjAqiqLVq7HzKI/mt+//rWYFmBkRr6KvGzD/4t3frg7ktAAAAA=", Y = /* @__PURE__ */ Object.assign({
1
+ import { w as d } from "./chunks/index.bCzIhWFw.js";
2
+ import { computed as s, createElementBlock as I, openBlock as n, createBlock as c, unref as a, normalizeStyle as T, withCtx as r, createVNode as w, resolveDynamicComponent as u } from "vue";
3
+ import { WorkflowIcon3 as z, WorkflowIcon1 as g, Model as E, Plugin as k, Workflow as v } from "color-message-aibox-vue";
4
+ import { S as o, A as m } from "./chunks/config.DE5PZU2F.js";
5
+ import { ElImage as A, ElIcon as f } from "element-plus";
6
+ import { m as M } from "./chunks/mcp-tool.Nc4HT9IM.js";
7
+ const O = /* @__PURE__ */ Object.assign({
7
8
  name: "ApplicationIcon"
8
9
  }, {
9
10
  __name: "layout",
@@ -18,7 +19,7 @@ const E = "data:image/webp;base64,UklGRiIOAABXRUJQVlA4WAoAAAAwAAAAdwAAdwAASUNDUM
18
19
  },
19
20
  applicationType: {
20
21
  type: String,
21
- default: t.AGENT
22
+ default: o.AGENT
22
23
  },
23
24
  // 图标字段名,用于指定从row中获取图标的字段
24
25
  iconField: {
@@ -26,53 +27,53 @@ const E = "data:image/webp;base64,UklGRiIOAABXRUJQVlA4WAoAAAAwAAAAdwAAdwAASUNDUM
26
27
  default: "icon"
27
28
  }
28
29
  },
29
- setup(e) {
30
- const A = e, a = s(() => {
31
- const i = A.row?.[A.iconField];
30
+ setup(t) {
31
+ const e = t, l = s(() => {
32
+ const i = e.row?.[e.iconField];
32
33
  if (i)
33
34
  return i;
34
- if (A.applicationType === t.MCP)
35
- return E;
36
- }), r = s(() => A.applicationType === t.AGENT ? {
37
- [d.autonomous]: b,
38
- [d.dialogue]: W
39
- }[A.row?.type] : {
40
- [t.WORKFLOW]: z,
41
- [t.PLUGIN]: P,
42
- [t.MODEL]: m
43
- }[A.applicationType]);
44
- return (i, I) => (o(), w("div", null, [
45
- a.value ? (o(), n(c(y), {
35
+ if (e.applicationType === o.MCP)
36
+ return M;
37
+ }), p = s(() => e.applicationType === o.AGENT ? {
38
+ [m.autonomous]: g,
39
+ [m.dialogue]: z
40
+ }[e.row?.type] : {
41
+ [o.WORKFLOW]: v,
42
+ [o.PLUGIN]: k,
43
+ [o.MODEL]: E
44
+ }[e.applicationType]);
45
+ return (i, y) => (n(), I("div", null, [
46
+ l.value ? (n(), c(a(A), {
46
47
  key: 0,
47
- style: u({ width: e.size + "px", height: e.size + "px" }),
48
- src: a.value,
48
+ style: T({ width: t.size + "px", height: t.size + "px" }),
49
+ src: l.value,
49
50
  fit: "cover",
50
51
  class: "radius-8"
51
52
  }, {
52
- error: l(() => [
53
- h(c(B), { size: e.size }, {
54
- default: l(() => [
55
- (o(), n(p(r.value)))
53
+ error: r(() => [
54
+ w(a(f), { size: t.size }, {
55
+ default: r(() => [
56
+ (n(), c(u(p.value)))
56
57
  ]),
57
58
  _: 1
58
59
  }, 8, ["size"])
59
60
  ]),
60
61
  _: 1
61
- }, 8, ["style", "src"])) : (o(), n(c(B), {
62
+ }, 8, ["style", "src"])) : (n(), c(a(f), {
62
63
  key: 1,
63
- size: e.size
64
+ size: t.size
64
65
  }, {
65
- default: l(() => [
66
- (o(), n(p(r.value)))
66
+ default: r(() => [
67
+ (n(), c(u(p.value)))
67
68
  ]),
68
69
  _: 1
69
70
  }, 8, ["size"]))
70
71
  ]));
71
72
  }
72
- }), N = f(Y);
73
+ }), W = d(O);
73
74
  export {
74
- d as APPLICATION_TYPE,
75
- N as ApplicationIcon,
76
- t as SOURCE_TYPE,
77
- N as default
75
+ m as APPLICATION_TYPE,
76
+ W as ApplicationIcon,
77
+ o as SOURCE_TYPE,
78
+ W as default
78
79
  };
@@ -0,0 +1,191 @@
1
+ import { w as Y } from "./chunks/index.bCzIhWFw.js";
2
+ import { mergeModels as A, useModel as x, ref as D, watch as w, createElementBlock as h, openBlock as i, createVNode as r, createBlock as c, createCommentVNode as d, unref as a, createElementVNode as E, createTextVNode as N, toDisplayString as L, withCtx as T, normalizeClass as O, withDirectives as C, vShow as M } from "vue";
3
+ import { RadioGroup as y } from "./RadioGroup.mjs";
4
+ import { ElTooltip as f, ElIcon as I, ElInput as _ } from "element-plus";
5
+ import { u as P } from "./chunks/i18n.Bd7hh14j.js";
6
+ import { IconTip as V } from "color-message-aibox-vue";
7
+ import { _ as R } from "./chunks/_plugin-vue_export-helper.CHgC5LLL.js";
8
+ import './assets/AuthSection.css';const q = { class: "auth-section" }, z = {
9
+ key: 2,
10
+ class: "auth-input-field"
11
+ }, F = { class: "field-label" }, G = {
12
+ key: 3,
13
+ class: "auth-input-field"
14
+ }, Q = { class: "field-label" }, j = {
15
+ __name: "AuthSection",
16
+ props: /* @__PURE__ */ A({
17
+ layout: {
18
+ type: String,
19
+ default: "horizontal"
20
+ }
21
+ }, {
22
+ featData: {
23
+ default: () => ({
24
+ auth: {}
25
+ })
26
+ },
27
+ featDataModifiers: {}
28
+ }),
29
+ emits: /* @__PURE__ */ A(["auth-validation-errors", "resetDebugStatus"], ["update:featData"]),
30
+ setup(s, { expose: U, emit: k }) {
31
+ const { t } = P(), e = x(s, "featData"), v = k, p = () => {
32
+ v("resetDebugStatus");
33
+ }, S = [
34
+ { value: "none", label: t("COMMON_AUTHSECTION.LABEL_NO_AUTH") },
35
+ { value: "apiKey", label: t("COMMON_AUTHSECTION.LABEL_API_KEY") }
36
+ ], B = [
37
+ { value: "bearer", label: t("COMMON_AUTHSECTION.LABEL_BEARER") },
38
+ { value: "custom", label: t("COMMON_AUTHSECTION.LABEL_CUSTOM") }
39
+ ], H = [
40
+ { value: "header", label: t("COMMON_AUTHSECTION.LABEL_KEY_LOCATION_HEADER") },
41
+ { value: "query", label: t("COMMON_AUTHSECTION.LABEL_KEY_LOCATION_QUERY") }
42
+ ], K = (n) => {
43
+ p(), u.value = {}, n === "apiKey" ? e.value.auth = {
44
+ authType: "apiKey",
45
+ keyType: "custom",
46
+ paramLocation: "header",
47
+ paramName: "",
48
+ paramValue: "",
49
+ token: ""
50
+ } : e.value.auth = {
51
+ authType: "none"
52
+ };
53
+ }, b = (n) => {
54
+ p(), u.value = {}, n === "bearer" ? (e.value.auth.paramName = "", e.value.auth.paramValue = "") : n === "custom" && (e.value.auth.token = "");
55
+ }, g = (n) => {
56
+ console.log(n, "value"), p(), u.value = {}, n === "query" && (e.value.auth.token = "", e.value.auth.keyType = "custom");
57
+ }, u = D({}), m = () => (p(), u.value = {}, e.value.auth.authType === "apiKey" && (e.value.auth.keyType === "custom" && (e.value.auth.paramName || (u.value.paramName = !0)), e.value.auth.keyType === "custom" && (e.value.auth.paramValue || (u.value.paramValue = !0)), e.value.auth.keyType === "bearer" && (e.value.auth.token || (u.value.token = !0))), u.value);
58
+ return w(
59
+ () => u.value,
60
+ () => {
61
+ v("auth-validation-errors", u.value);
62
+ }
63
+ ), U({
64
+ validateField: m
65
+ }), (n, l) => (i(), h("div", q, [
66
+ r(a(y), {
67
+ modelValue: e.value.auth.authType,
68
+ "onUpdate:modelValue": l[0] || (l[0] = (o) => e.value.auth.authType = o),
69
+ options: S,
70
+ label: a(t)("COMMON_AUTHSECTION.LABEL_AUTH_TYPE"),
71
+ required: !0,
72
+ className: "auth-radio-group",
73
+ layout: s.layout,
74
+ onChange: K
75
+ }, null, 8, ["modelValue", "label", "layout"]),
76
+ e.value.auth.authType === "apiKey" ? (i(), c(a(y), {
77
+ key: 0,
78
+ modelValue: e.value.auth.paramLocation,
79
+ "onUpdate:modelValue": l[1] || (l[1] = (o) => e.value.auth.paramLocation = o),
80
+ options: H,
81
+ label: a(t)("COMMON_AUTHSECTION.LABEL_KEY_LOCATION"),
82
+ "tip-text": a(t)("COMMON_AUTHSECTION.LABEL_KEY_LOCATION_TIP"),
83
+ required: !0,
84
+ className: "location-radio-group",
85
+ layout: s.layout,
86
+ onChange: g
87
+ }, null, 8, ["modelValue", "label", "tip-text", "layout"])) : d("", !0),
88
+ e.value.auth.authType === "apiKey" && e.value.auth.paramLocation === "header" ? (i(), c(a(y), {
89
+ key: 1,
90
+ modelValue: e.value.auth.keyType,
91
+ "onUpdate:modelValue": l[2] || (l[2] = (o) => e.value.auth.keyType = o),
92
+ options: B,
93
+ label: a(t)("COMMON_AUTHSECTION.LABEL_KEY_TYPE"),
94
+ "tip-text": a(t)("COMMON_AUTHSECTION.LABEL_KEY_TYPE_TIP"),
95
+ required: !0,
96
+ className: "key-radio-group",
97
+ layout: s.layout,
98
+ onChange: b
99
+ }, null, 8, ["modelValue", "label", "tip-text", "layout"])) : d("", !0),
100
+ e.value.auth.authType === "apiKey" && e.value.auth.keyType === "custom" ? (i(), h("div", z, [
101
+ E("div", F, [
102
+ l[6] || (l[6] = E("span", { class: "required" }, "*", -1)),
103
+ N(" " + L(a(t)("COMMON_AUTHSECTION.LABEL_KEY_NAME")) + " ", 1),
104
+ r(a(f), {
105
+ content: a(t)("COMMON_AUTHSECTION.LABEL_KEY_NAME_TIP"),
106
+ placement: "top"
107
+ }, {
108
+ default: T(() => [
109
+ r(a(I), {
110
+ style: { "margin-left": "4px" },
111
+ size: "14px",
112
+ color: "#999"
113
+ }, {
114
+ default: T(() => [
115
+ r(a(V))
116
+ ]),
117
+ _: 1
118
+ })
119
+ ]),
120
+ _: 1
121
+ }, 8, ["content"])
122
+ ]),
123
+ r(a(_), {
124
+ modelValue: e.value.auth.paramName,
125
+ "onUpdate:modelValue": l[3] || (l[3] = (o) => e.value.auth.paramName = o),
126
+ placeholder: a(t)("COMMON_AUTHSECTION.LABEL_KEY_NAME_PLACEHOLDER"),
127
+ maxlength: "64",
128
+ "show-word-limit": "",
129
+ class: O(["key-input", {
130
+ "error-input": u.value.paramName
131
+ }]),
132
+ onBlur: m
133
+ }, null, 8, ["modelValue", "placeholder", "class"])
134
+ ])) : d("", !0),
135
+ e.value.auth.authType === "apiKey" ? (i(), h("div", G, [
136
+ E("div", Q, [
137
+ l[7] || (l[7] = E("span", { class: "required" }, "*", -1)),
138
+ N(" " + L(a(t)("COMMON_AUTHSECTION.LABEL_KEY_VALUE")) + " ", 1),
139
+ r(a(f), {
140
+ content: a(t)("COMMON_AUTHSECTION.LABEL_KEY_VALUE_TIP"),
141
+ placement: "top"
142
+ }, {
143
+ default: T(() => [
144
+ r(a(I), {
145
+ style: { "margin-left": "4px" },
146
+ size: "14px",
147
+ color: "#999"
148
+ }, {
149
+ default: T(() => [
150
+ r(a(V))
151
+ ]),
152
+ _: 1
153
+ })
154
+ ]),
155
+ _: 1
156
+ }, 8, ["content"])
157
+ ]),
158
+ C(r(a(_), {
159
+ modelValue: e.value.auth.paramValue,
160
+ "onUpdate:modelValue": l[4] || (l[4] = (o) => e.value.auth.paramValue = o),
161
+ placeholder: a(t)("COMMON_AUTHSECTION.LABEL_KEY_VALUE_PLACEHOLDER"),
162
+ maxlength: "20000",
163
+ "show-word-limit": "",
164
+ class: O(["key-input", {
165
+ "error-input": u.value.paramValue
166
+ }]),
167
+ onBlur: m
168
+ }, null, 8, ["modelValue", "placeholder", "class"]), [
169
+ [M, e.value.auth.keyType === "custom"]
170
+ ]),
171
+ C(r(a(_), {
172
+ modelValue: e.value.auth.token,
173
+ "onUpdate:modelValue": l[5] || (l[5] = (o) => e.value.auth.token = o),
174
+ placeholder: a(t)("COMMON_AUTHSECTION.LABEL_KEY_VALUE_PLACEHOLDER"),
175
+ maxlength: "20000",
176
+ "show-word-limit": "",
177
+ class: O(["key-input", {
178
+ "error-input": u.value.token
179
+ }]),
180
+ onBlur: m
181
+ }, null, 8, ["modelValue", "placeholder", "class"]), [
182
+ [M, e.value.auth.keyType === "bearer"]
183
+ ])
184
+ ])) : d("", !0)
185
+ ]));
186
+ }
187
+ }, J = /* @__PURE__ */ R(j, [["__scopeId", "data-v-ce4d7772"]]), le = Y(J);
188
+ export {
189
+ le as AuthSection,
190
+ le as default
191
+ };
@@ -0,0 +1,170 @@
1
+ import { w as _ } from "./chunks/index.bCzIhWFw.js";
2
+ import { ref as O, shallowRef as B, watch as k, onMounted as A, resolveComponent as f, createElementBlock as N, openBlock as m, normalizeClass as b, createBlock as M, createCommentVNode as I, createVNode as c, withCtx as g, unref as y } from "vue";
3
+ import { Codemirror as P } from "vue-codemirror";
4
+ import { EditorView as h } from "@codemirror/view";
5
+ import { json as x } from "@codemirror/lang-json";
6
+ import { oneDark as L } from "@codemirror/theme-one-dark";
7
+ import { codeFolding as V } from "@codemirror/language";
8
+ import { IconCopy1 as R } from "color-message-aibox-vue";
9
+ import F from "copy-to-clipboard";
10
+ import { u as j } from "./chunks/i18n.Bd7hh14j.js";
11
+ import { _ as D } from "./chunks/_plugin-vue_export-helper.CHgC5LLL.js";
12
+ import './assets/CodeView.css';const J = {
13
+ __name: "index",
14
+ props: {
15
+ code: {
16
+ type: String,
17
+ default: ""
18
+ },
19
+ language: {
20
+ type: String,
21
+ default: "json"
22
+ },
23
+ customExpandDepth: {
24
+ type: Number,
25
+ default: 1 / 0
26
+ },
27
+ sort: {
28
+ type: Boolean,
29
+ default: !0
30
+ },
31
+ noPadding: {
32
+ type: Boolean,
33
+ default: !1
34
+ },
35
+ theme: {
36
+ type: String,
37
+ default: "light"
38
+ },
39
+ showLength: {
40
+ type: Boolean,
41
+ default: !1
42
+ },
43
+ maxHeight: {
44
+ type: String,
45
+ default: "calc(100vh - 125px)"
46
+ },
47
+ showCopy: {
48
+ type: Boolean,
49
+ default: !1
50
+ },
51
+ // 是否自定义折叠
52
+ enableFolding: {
53
+ type: Boolean,
54
+ default: !1
55
+ }
56
+ },
57
+ setup(l) {
58
+ const { t: u } = j(), a = l, s = O(""), d = {
59
+ json: () => x()
60
+ }, C = () => {
61
+ const r = a.language.toLowerCase();
62
+ return d[r] ? d[r]() : x();
63
+ }, p = B([]), v = (r) => {
64
+ const o = r.trim(), n = (t) => {
65
+ try {
66
+ return JSON.parse(t);
67
+ } catch {
68
+ return null;
69
+ }
70
+ };
71
+ let e = null;
72
+ if ((o.startsWith("{") || o.startsWith("[")) && (e = n(o)), !e) {
73
+ const t = `{${o.replace(/,\s*$/, "")}}`;
74
+ e = n(t);
75
+ }
76
+ if (e && typeof e == "object" && !Array.isArray(e)) {
77
+ const t = e.role;
78
+ if (t) return "role: " + t;
79
+ }
80
+ return "";
81
+ }, w = () => {
82
+ const r = [
83
+ C(),
84
+ h.editable.of(!1),
85
+ // 只读模式
86
+ h.lineWrapping
87
+ // 自动换行
88
+ ];
89
+ a.enableFolding && r.push(
90
+ // 配置代码折叠,自定义折叠后的显示内容
91
+ V({
92
+ preparePlaceholder: (o, n) => {
93
+ try {
94
+ const e = o.doc.sliceString(n.from, n.to);
95
+ return v(e);
96
+ } catch (e) {
97
+ return console.error("Error getting fold preview:", e), "...";
98
+ }
99
+ },
100
+ placeholderDOM: (o, n, e) => {
101
+ const t = document.createElement("span");
102
+ return t.className = "cm-foldPlaceholder", t.onclick = n, t.style.cursor = "pointer", t.style.color = "#888", t.style.padding = "0 4px", t.style.borderRadius = "3px", t.textContent = e ? `${e}...` : "...", t;
103
+ }
104
+ })
105
+ ), a.theme === "dark" && r.push(L), p.value = r;
106
+ }, E = (r) => {
107
+ try {
108
+ const o = JSON.parse(r);
109
+ if (a.sort && typeof o == "object" && o !== null) {
110
+ const n = (e) => Array.isArray(e) ? e.map(n) : typeof e == "object" && e !== null ? Object.keys(e).sort().reduce((t, i) => (t[i] = n(e[i]), t), {}) : e;
111
+ return JSON.stringify(n(o), null, 2);
112
+ }
113
+ return JSON.stringify(o, null, 2);
114
+ } catch {
115
+ return r;
116
+ }
117
+ }, S = (r) => {
118
+ F(r) ? ElMessage({
119
+ message: u("MESSAGE_REMIND.COPY_SUCCESS"),
120
+ type: "success"
121
+ }) : ElMessage({
122
+ message: u("COMMON_STORE_LIBRARY.LABEL_COPY_FAIL"),
123
+ type: "error"
124
+ });
125
+ };
126
+ return k(
127
+ () => a.code,
128
+ (r) => {
129
+ a.language === "json" ? s.value = E(r) : s.value = r;
130
+ },
131
+ { immediate: !0 }
132
+ ), A(() => {
133
+ w();
134
+ }), (r, o) => {
135
+ const n = f("el-icon"), e = f("el-scrollbar");
136
+ return m(), N("div", {
137
+ class: b(["code-viewer", { "no-padding": l.noPadding, dark: l.theme === "dark" }])
138
+ }, [
139
+ l.showCopy ? (m(), M(n, {
140
+ key: 0,
141
+ onClick: o[0] || (o[0] = (t) => S(l.code)),
142
+ class: "code-viewer__copy",
143
+ color: "#96A0AB",
144
+ size: "18px"
145
+ }, {
146
+ default: g(() => [
147
+ c(y(R))
148
+ ]),
149
+ _: 1
150
+ })) : I("", !0),
151
+ c(e, { "max-height": l.maxHeight }, {
152
+ default: g(() => [
153
+ c(y(P), {
154
+ modelValue: s.value,
155
+ "onUpdate:modelValue": o[1] || (o[1] = (t) => s.value = t),
156
+ style: { height: "100%", minHeight: "100px" },
157
+ extensions: p.value,
158
+ disabled: !0
159
+ }, null, 8, ["modelValue", "extensions"])
160
+ ]),
161
+ _: 1
162
+ }, 8, ["max-height"])
163
+ ], 2);
164
+ };
165
+ }
166
+ }, T = /* @__PURE__ */ D(J, [["__scopeId", "data-v-29ff9bad"]]), Z = _(T);
167
+ export {
168
+ Z as CodeView,
169
+ Z as default
170
+ };
@@ -1,9 +1,9 @@
1
1
  import { w as D } from "./chunks/index.bCzIhWFw.js";
2
- import { computed as c, createBlock as p, openBlock as t, unref as s, withCtx as h, createElementVNode as m, createCommentVNode as _, resolveDynamicComponent as x, toDisplayString as i, createElementBlock as l, withModifiers as M, Fragment as v, renderList as g, createVNode as b, normalizeStyle as B, createTextVNode as k } from "vue";
2
+ import { computed as c, createBlock as p, openBlock as t, unref as s, withCtx as h, createElementVNode as m, createCommentVNode as _, resolveDynamicComponent as x, toDisplayString as u, createElementBlock as l, withModifiers as M, Fragment as v, renderList as T, createVNode as b, normalizeStyle as B, createTextVNode as k } from "vue";
3
3
  import { ElTag as w, ElIcon as U, ElPopover as z } from "element-plus";
4
4
  import { u as G } from "./chunks/i18n.Bd7hh14j.js";
5
- import { I as H, e as O, d as E, c as V, P as A, R as L, C as R, f as F } from "./chunks/config.DcoKERMt.js";
6
- import { P as T, A as $ } from "./chunks/index.5lH4UH_M.js";
5
+ import { I as H, e as O, d as E, c as V, P as A, R as L, C as R, f as F } from "./chunks/config.CgrPt4Zx.js";
6
+ import { P as N, A as $ } from "./chunks/index.5lH4UH_M.js";
7
7
  import { _ as j } from "./chunks/_plugin-vue_export-helper.CHgC5LLL.js";
8
8
  import './assets/CommonTagsList.css';const K = { class: "status-tag-content flex items-center" }, W = { class: "status-text fz-12" }, Y = {
9
9
  __name: "StatusTag",
@@ -26,20 +26,20 @@ import './assets/CommonTagsList.css';const K = { class: "status-tag-content flex
26
26
  }
27
27
  },
28
28
  setup(r) {
29
- const S = r, a = c(() => S.inActive === H.UNPUBLISHED ? T.UNPUBLISHED : S.channelStatus), N = c(() => O[a.value]), y = c(() => E[a.value]), d = c(() => V[a.value]), I = c(() => A[a.value]);
30
- return (u, e) => (t(), p(s(w), { type: N.value }, {
29
+ const S = r, a = c(() => S.inActive === H.UNPUBLISHED ? N.UNPUBLISHED : S.channelStatus), C = c(() => O[a.value]), y = c(() => E[a.value]), d = c(() => V[a.value]), g = c(() => A[a.value]);
30
+ return (i, e) => (t(), p(s(w), { type: C.value }, {
31
31
  default: h(() => [
32
32
  m("div", K, [
33
33
  r.showIcon && d.value ? (t(), p(s(U), {
34
34
  key: 0,
35
- color: I.value
35
+ color: g.value
36
36
  }, {
37
37
  default: h(() => [
38
38
  (t(), p(x(d.value)))
39
39
  ]),
40
40
  _: 1
41
41
  }, 8, ["color"])) : _("", !0),
42
- m("span", W, i(r.statusText || y.value), 1)
42
+ m("span", W, u(r.statusText || y.value), 1)
43
43
  ])
44
44
  ]),
45
45
  _: 1
@@ -77,35 +77,35 @@ import './assets/CommonTagsList.css';const K = { class: "status-tag-content flex
77
77
  }
78
78
  },
79
79
  setup(r) {
80
- const { t: S } = G(), a = r, N = c(() => a.publishChannelList || []), y = c(() => {
80
+ const { t: S } = G(), a = r, C = c(() => a.publishChannelList || []), y = c(() => {
81
81
  if (!a.publishChannelList?.length) return [];
82
- const u = a.publishChannelList.reduce((e, o) => {
83
- const f = o.inActive === H.UNPUBLISHED ? T.UNPUBLISHED : o.channelStatus;
82
+ const i = a.publishChannelList.reduce((e, o) => {
83
+ const f = o.inActive === H.UNPUBLISHED ? N.UNPUBLISHED : o.channelStatus;
84
84
  return e[f] || (e[f] = []), e[f].push(o), e;
85
85
  }, {});
86
- return Object.entries(u).map(([e, o]) => ({
86
+ return Object.entries(i).map(([e, o]) => ({
87
87
  status: parseInt(e),
88
88
  channels: o
89
89
  })).sort((e, o) => o.status - e.status);
90
90
  }), d = c(() => {
91
91
  if (!a.publishChannelList?.length) return [];
92
- const u = S("COMMON_TAGS_LIST.UNKNOWN_CHANNEL");
92
+ const i = S("COMMON_TAGS_LIST.UNKNOWN_CHANNEL");
93
93
  return a.publishChannelList.filter((e) => e.visibleScope && e.visibleScope.length > 0).map((e) => ({
94
- channelName: L[e.channelType]?.name(a.sourceType) || u,
94
+ channelName: L[e.channelType]?.name(a.sourceType) || i,
95
95
  channelType: e.channelType,
96
96
  visibleScope: e.visibleScope,
97
97
  allVisible: e.allVisible
98
98
  }));
99
- }), I = (u) => {
100
- const e = F[u];
99
+ }), g = (i) => {
100
+ const e = F[i];
101
101
  return R[e];
102
102
  };
103
- return (u, e) => (t(), l("div", {
103
+ return (i, e) => (t(), l("div", {
104
104
  class: "commont-status-box",
105
105
  onClick: e[0] || (e[0] = M(() => {
106
106
  }, ["stop"]))
107
107
  }, [
108
- (t(!0), l(v, null, g(N.value, (o, f) => (t(), p(s(z), {
108
+ (t(!0), l(v, null, T(C.value, (o, f) => (t(), p(s(z), {
109
109
  key: f,
110
110
  placement: "bottom",
111
111
  trigger: "click",
@@ -122,7 +122,7 @@ import './assets/CommonTagsList.css';const K = { class: "status-tag-content flex
122
122
  ]),
123
123
  default: h(() => [
124
124
  m("div", q, [
125
- (t(!0), l(v, null, g(y.value, (n, C) => (t(), l(v, {
125
+ (t(!0), l(v, null, T(y.value, (n, I) => (t(), l(v, {
126
126
  key: n.status
127
127
  }, [
128
128
  n.channels.length > 0 ? (t(), l("div", J, [
@@ -138,35 +138,36 @@ import './assets/CommonTagsList.css';const K = { class: "status-tag-content flex
138
138
  m("div", {
139
139
  class: "content-item-name fz-14 mg-l-4",
140
140
  style: B({ color: s(A)[n.status] })
141
- }, i(s(E)[n.status]) + "(" + i(n.channels.length) + ") ", 5)
141
+ }, u(s(E)[n.status]) + "(" + u(n.channels.length) + ") ", 5)
142
142
  ]),
143
143
  m("div", Z, [
144
- (t(!0), l(v, null, g(n.channels, (P) => (t(), l("div", {
144
+ (t(!0), l(v, null, T(n.channels, (P) => (t(), l("div", {
145
145
  class: "b-item-box mg-r-8 radius-4 fz-12 pd-t-4 pd-b-4 pd-l-8 pd-r-8 mg-b-8 text-1f2329 bg-f5f6f7",
146
146
  key: P.channelType
147
- }, i(s(L)?.[P.channelType]?.name(
147
+ }, u(s(L)?.[P.channelType]?.name(
148
148
  r.sourceType
149
149
  )), 1))), 128))
150
150
  ])
151
151
  ])) : _("", !0),
152
- C < y.value.length - 1 ? (t(), l("div", ee)) : _("", !0)
152
+ I < y.value.length - 1 ? (t(), l("div", ee)) : _("", !0)
153
153
  ], 64))), 128)),
154
154
  d.value.length > 0 ? (t(), l("div", te, [
155
- (t(!0), l(v, null, g(d.value, (n, C) => (t(), l("div", {
155
+ (t(!0), l(v, null, T(d.value, (n, I) => (t(), l("div", {
156
156
  key: n.channelType,
157
157
  class: "channel-visible-range"
158
158
  }, [
159
159
  m("div", se, [
160
160
  b(s(U), {
161
161
  class: "mg-r-2",
162
- size: "14"
162
+ size: "14",
163
+ color: g(n.channelType)?.iconColor
163
164
  }, {
164
165
  default: h(() => [
165
- (t(), p(x(I(n.channelType)?.icon)))
166
+ (t(), p(x(g(n.channelType)?.icon)))
166
167
  ]),
167
168
  _: 2
168
- }, 1024),
169
- k(" " + i(n.channelName) + " " + i(s(S)("COMMON_TAGS_LIST.AVAILABLE_SCOPE")), 1)
169
+ }, 1032, ["color"]),
170
+ k(" " + u(n.channelName) + " " + u(s(S)("COMMON_TAGS_LIST.AVAILABLE_SCOPE")), 1)
170
171
  ]),
171
172
  b(s($), {
172
173
  "all-visible": n.allVisible,
@@ -174,7 +175,7 @@ import './assets/CommonTagsList.css';const K = { class: "status-tag-content flex
174
175
  "tree-list": [],
175
176
  readonly: !0
176
177
  }, null, 8, ["all-visible", "model-value"]),
177
- C < d.value.length - 1 ? (t(), l("div", ne)) : _("", !0)
178
+ I < d.value.length - 1 ? (t(), l("div", ne)) : _("", !0)
178
179
  ]))), 128))
179
180
  ])) : _("", !0)
180
181
  ])
@@ -183,10 +184,10 @@ import './assets/CommonTagsList.css';const K = { class: "status-tag-content flex
183
184
  }, 1024))), 128)),
184
185
  r.publishChannelList?.length ? _("", !0) : (t(), p(s(w), {
185
186
  key: 0,
186
- type: s(O)[s(T).UNPUBLISHED]
187
+ type: s(O)[s(N).UNPUBLISHED]
187
188
  }, {
188
189
  default: h(() => [
189
- k(i(s(E)[s(T).UNPUBLISHED]), 1)
190
+ k(u(s(E)[s(N).UNPUBLISHED]), 1)
190
191
  ]),
191
192
  _: 1
192
193
  }, 8, ["type"]))