china-mobile-international-custom-components 0.1.23 → 0.1.24
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.
- package/es/AddOrEditSupplierDialog.mjs +2 -2
- package/es/AgentDetail.mjs +5 -5
- package/es/ApplicationTypeTag.mjs +3 -3
- package/es/AuthSection.mjs +2 -2
- package/es/AutoShowTooltip.mjs +1 -1
- package/es/AvailableRangePreview.mjs +1 -1
- package/es/AvailableRangeSetting.mjs +5 -5
- package/es/CodeView.mjs +1 -1
- package/es/CommonTagsList.mjs +62 -62
- package/es/CreateMcpForm.mjs +6 -6
- package/es/CustomSidebar.mjs +1 -1
- package/es/CustomTitle.mjs +1 -1
- package/es/CustomToggle.mjs +11 -11
- package/es/DialogContainer.mjs +5 -5
- package/es/DocSyncSelect.mjs +2 -2
- package/es/FileDisplay.mjs +1 -1
- package/es/FilePreview.mjs +9 -9
- package/es/FileUploader.mjs +2 -2
- package/es/ImageComponent.mjs +5 -0
- package/es/Logo.mjs +2 -2
- package/es/McpFormDialog.mjs +1 -1
- package/es/McpParamsSet.mjs +4 -4
- package/es/MdEditor.mjs +3 -3
- package/es/PageContainer.mjs +2 -2
- package/es/ParameterTable.mjs +2 -2
- package/es/PublishRecord.mjs +6 -6
- package/es/RadioGroup.mjs +5 -5
- package/es/SourcePublish.mjs +6 -6
- package/es/Table.mjs +2 -2
- package/es/WorkFlowDialog.mjs +3 -3
- package/es/WorkflowComponent.mjs +1 -1
- package/es/assets/ImageComponent.css +0 -0
- package/es/chunks/AddAgentDialog.BEDSZ4er.js +244 -0
- package/es/chunks/AddDialog.RuOrCghd.js +1969 -0
- package/es/chunks/BackBar.Ck5CV5ZM.js +629 -0
- package/es/chunks/CreatePluginDialog.DbQIt3Mz.js +775 -0
- package/es/chunks/CreateWorkflow.CIYJ3nGZ.js +268 -0
- package/es/chunks/ImageComponent.BgYVT3ZJ.js +74 -0
- package/es/chunks/ToolList.2k07ztsY.js +106 -0
- package/es/chunks/config.B_uTnClF.js +47 -0
- package/es/chunks/config.e_OOovlY.js +358 -0
- package/es/chunks/i18n.9cHOVn6X.js +4049 -0
- package/es/chunks/index.BGLAHzZm.js +398 -0
- package/es/chunks/index.CCNAKdQj.js +1279 -0
- package/es/chunks/index.CXIY0q5X.js +172 -0
- package/es/chunks/index.Cv9pn5nk.js +4 -0
- package/es/chunks/index.CyiNa6lr.js +256 -0
- package/es/chunks/index.JG8-HCzk.js +29609 -0
- package/es/chunks/layout.BAvYghmE.js +650 -0
- package/es/chunks/layout.Iob_aYQ7.js +26 -0
- package/es/chunks/view.BSjGhafy.js +824 -0
- package/es/index.mjs +66 -66
- package/lib/CommonTagsList.js +1 -1
- package/lib/ImageComponent.js +1 -0
- package/lib/assets/ImageComponent.css +0 -0
- package/lib/chunks/ImageComponent.CdPLM_LX.js +1 -0
- package/lib/chunks/index.Cbkv4rXa.js +1 -0
- package/lib/index.js +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import { ref as w, shallowRef as O, watch as B, onMounted as k, openBlock as m, createElementBlock as A, normalizeClass as N, createBlock as I, unref as s, withCtx as y, createVNode as u, createCommentVNode as M } from "vue";
|
|
2
|
+
import { ElMessage as g, ElIcon as P, ElScrollbar as b } from "element-plus";
|
|
3
|
+
import { Codemirror as L } from "vue-codemirror";
|
|
4
|
+
import { EditorView as h } from "@codemirror/view";
|
|
5
|
+
import { json as x } from "@codemirror/lang-json";
|
|
6
|
+
import { oneDark as V } from "@codemirror/theme-one-dark";
|
|
7
|
+
import { codeFolding as _ } from "@codemirror/language";
|
|
8
|
+
import { IconCopy1 as R } from "color-message-aibox-vue";
|
|
9
|
+
import { u as T } from "./i18n.9cHOVn6X.js";
|
|
10
|
+
import F from "copy-to-clipboard";
|
|
11
|
+
import { _ as j } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
12
|
+
import '../assets/index2.css';const D = () => {
|
|
13
|
+
const { t: a } = T();
|
|
14
|
+
return {
|
|
15
|
+
copyText: (l) => {
|
|
16
|
+
F(l) ? g({
|
|
17
|
+
message: a("MESSAGE_REMIND.COPY_SUCCESS"),
|
|
18
|
+
type: "success"
|
|
19
|
+
}) : g({
|
|
20
|
+
message: a("COMMON_STORE_LIBRARY.LABEL_COPY_FAIL"),
|
|
21
|
+
type: "error"
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
}, J = {
|
|
26
|
+
__name: "index",
|
|
27
|
+
props: {
|
|
28
|
+
code: {
|
|
29
|
+
type: String,
|
|
30
|
+
default: ""
|
|
31
|
+
},
|
|
32
|
+
language: {
|
|
33
|
+
type: String,
|
|
34
|
+
default: "json"
|
|
35
|
+
},
|
|
36
|
+
customExpandDepth: {
|
|
37
|
+
type: Number,
|
|
38
|
+
default: 1 / 0
|
|
39
|
+
},
|
|
40
|
+
sort: {
|
|
41
|
+
type: Boolean,
|
|
42
|
+
default: !0
|
|
43
|
+
},
|
|
44
|
+
noPadding: {
|
|
45
|
+
type: Boolean,
|
|
46
|
+
default: !1
|
|
47
|
+
},
|
|
48
|
+
theme: {
|
|
49
|
+
type: String,
|
|
50
|
+
default: "light"
|
|
51
|
+
},
|
|
52
|
+
showLength: {
|
|
53
|
+
type: Boolean,
|
|
54
|
+
default: !1
|
|
55
|
+
},
|
|
56
|
+
maxHeight: {
|
|
57
|
+
type: String,
|
|
58
|
+
default: "calc(100% - 125px)"
|
|
59
|
+
},
|
|
60
|
+
showCopy: {
|
|
61
|
+
type: Boolean,
|
|
62
|
+
default: !1
|
|
63
|
+
},
|
|
64
|
+
// 是否自定义折叠
|
|
65
|
+
enableFolding: {
|
|
66
|
+
type: Boolean,
|
|
67
|
+
default: !1
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
setup(a) {
|
|
71
|
+
const { copyText: d } = D(), l = a, i = w(""), p = {
|
|
72
|
+
json: () => x()
|
|
73
|
+
}, C = () => {
|
|
74
|
+
const r = l.language.toLowerCase();
|
|
75
|
+
return p[r] ? p[r]() : x();
|
|
76
|
+
}, f = O([]), E = (r) => {
|
|
77
|
+
const t = r.trim(), n = (o) => {
|
|
78
|
+
try {
|
|
79
|
+
return JSON.parse(o);
|
|
80
|
+
} catch {
|
|
81
|
+
return null;
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
let e = null;
|
|
85
|
+
if ((t.startsWith("{") || t.startsWith("[")) && (e = n(t)), !e) {
|
|
86
|
+
const o = `{${t.replace(/,\s*$/, "")}}`;
|
|
87
|
+
e = n(o);
|
|
88
|
+
}
|
|
89
|
+
if (e && typeof e == "object" && !Array.isArray(e)) {
|
|
90
|
+
const o = e.role;
|
|
91
|
+
if (o) return "role: " + o;
|
|
92
|
+
}
|
|
93
|
+
return "";
|
|
94
|
+
}, S = () => {
|
|
95
|
+
const r = [
|
|
96
|
+
C(),
|
|
97
|
+
h.editable.of(!1),
|
|
98
|
+
// 只读模式
|
|
99
|
+
h.lineWrapping
|
|
100
|
+
// 自动换行
|
|
101
|
+
];
|
|
102
|
+
l.enableFolding && r.push(
|
|
103
|
+
// 配置代码折叠,自定义折叠后的显示内容
|
|
104
|
+
_({
|
|
105
|
+
preparePlaceholder: (t, n) => {
|
|
106
|
+
try {
|
|
107
|
+
const e = t.doc.sliceString(n.from, n.to);
|
|
108
|
+
return E(e);
|
|
109
|
+
} catch (e) {
|
|
110
|
+
return console.error("Error getting fold preview:", e), "...";
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
placeholderDOM: (t, n, e) => {
|
|
114
|
+
const o = document.createElement("span");
|
|
115
|
+
return o.className = "cm-foldPlaceholder", o.onclick = n, o.style.cursor = "pointer", o.style.color = "#888", o.style.padding = "0 4px", o.style.borderRadius = "3px", o.textContent = e ? `${e}...` : "...", o;
|
|
116
|
+
}
|
|
117
|
+
})
|
|
118
|
+
), l.theme === "dark" && r.push(V), f.value = r;
|
|
119
|
+
}, v = (r) => {
|
|
120
|
+
try {
|
|
121
|
+
const t = JSON.parse(r);
|
|
122
|
+
if (l.sort && typeof t == "object" && t !== null) {
|
|
123
|
+
const n = (e) => Array.isArray(e) ? e.map(n) : typeof e == "object" && e !== null ? Object.keys(e).sort().reduce((o, c) => (o[c] = n(e[c]), o), {}) : e;
|
|
124
|
+
return JSON.stringify(n(t), null, 2);
|
|
125
|
+
}
|
|
126
|
+
return JSON.stringify(t, null, 2);
|
|
127
|
+
} catch {
|
|
128
|
+
return r;
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
return B(
|
|
132
|
+
() => l.code,
|
|
133
|
+
(r) => {
|
|
134
|
+
l.language === "json" ? i.value = v(r) : i.value = r;
|
|
135
|
+
},
|
|
136
|
+
{ immediate: !0 }
|
|
137
|
+
), k(() => {
|
|
138
|
+
S();
|
|
139
|
+
}), (r, t) => (m(), A("div", {
|
|
140
|
+
class: N(["code-viewer", { "no-padding": a.noPadding, dark: a.theme === "dark" }])
|
|
141
|
+
}, [
|
|
142
|
+
a.showCopy ? (m(), I(s(P), {
|
|
143
|
+
key: 0,
|
|
144
|
+
onClick: t[0] || (t[0] = (n) => s(d)(a.code)),
|
|
145
|
+
class: "code-viewer__copy",
|
|
146
|
+
color: "#96A0AB",
|
|
147
|
+
size: "18px"
|
|
148
|
+
}, {
|
|
149
|
+
default: y(() => [
|
|
150
|
+
u(s(R))
|
|
151
|
+
]),
|
|
152
|
+
_: 1
|
|
153
|
+
})) : M("", !0),
|
|
154
|
+
u(s(b), { "max-height": a.maxHeight }, {
|
|
155
|
+
default: y(() => [
|
|
156
|
+
u(s(L), {
|
|
157
|
+
modelValue: i.value,
|
|
158
|
+
"onUpdate:modelValue": t[1] || (t[1] = (n) => i.value = n),
|
|
159
|
+
style: { height: "100%", minHeight: "100px" },
|
|
160
|
+
extensions: f.value,
|
|
161
|
+
disabled: !0
|
|
162
|
+
}, null, 8, ["modelValue", "extensions"])
|
|
163
|
+
]),
|
|
164
|
+
_: 1
|
|
165
|
+
}, 8, ["max-height"])
|
|
166
|
+
], 2));
|
|
167
|
+
}
|
|
168
|
+
}, Z = /* @__PURE__ */ j(J, [["__scopeId", "data-v-011cdc70"]]);
|
|
169
|
+
export {
|
|
170
|
+
Z as C,
|
|
171
|
+
D as u
|
|
172
|
+
};
|