aibox-custom-component-packages 0.0.13 → 0.0.15
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/SourcePublish.mjs +1 -1
- package/es/assets/SourcePublish.css +1 -1
- package/es/chunks/{SourcePublish.BhLjt18i.js → SourcePublish.Dk7O9GzI.js} +2 -6
- package/es/index.mjs +1 -1
- package/lib/SourcePublish.js +1 -1
- package/lib/assets/SourcePublish.css +1 -1
- package/lib/chunks/SourcePublish.OeB6i-Iu.js +1 -0
- package/lib/index.js +1 -1
- package/package.json +2 -2
- package/es/chunks/AddOrEditSupplierDialog.BKR0RsiJ.js +0 -721
- package/es/chunks/AddOrEditSupplierDialog.CjNRipPe.js +0 -721
- package/es/chunks/AddOrEditSupplierDialog.CnsquSx2.js +0 -721
- package/es/chunks/AiboxTable.CDqNvRfJ.js +0 -635
- package/es/chunks/AiboxTable.CrWMAX84.js +0 -635
- package/es/chunks/ApplicationTypeTag.Cbdi0D65.js +0 -47
- package/es/chunks/ApplicationTypeTag.Df4BZxds.js +0 -47
- package/es/chunks/AuthSection.DFfj5MtZ.js +0 -201
- package/es/chunks/AuthSection.DWD_FxtJ.js +0 -201
- package/es/chunks/AvailableRangePreview.Bz9QkkAM.js +0 -194
- package/es/chunks/AvailableRangePreview.WFzbRasx.js +0 -194
- package/es/chunks/AvailableRangeSetting.Bq_K1zar.js +0 -229
- package/es/chunks/AvailableRangeSetting.Cty5Cdmh.js +0 -229
- package/es/chunks/CodeView.CWuSIL_F.js +0 -148
- package/es/chunks/CodeView.Dhxe1PQP.js +0 -148
- package/es/chunks/CommonTagsList.DSPdgjc3.js +0 -156
- package/es/chunks/CommonTagsList.NbXVfvLW.js +0 -156
- package/es/chunks/CommonTagsList.qam_Fp76.js +0 -156
- package/es/chunks/CreateMcpForm.BBVVd2RN.js +0 -308
- package/es/chunks/CreateMcpForm.BWUyeP01.js +0 -308
- package/es/chunks/CreateMcpForm.C8YfDSEM.js +0 -308
- package/es/chunks/CreateMcpForm.DSE5jyiW.js +0 -308
- package/es/chunks/CustomSidebar.BSGAhmVY.js +0 -585
- package/es/chunks/DocSyncSelect.D-WIvZZN.js +0 -2290
- package/es/chunks/DocSyncSelect.Kk88o9gO.js +0 -2290
- package/es/chunks/FileDisplay.B5laA4uX.js +0 -1649
- package/es/chunks/FileDisplay.BCTNdpl9.js +0 -1649
- package/es/chunks/FileDisplay.CBNYrdsK.js +0 -1560
- package/es/chunks/FilePreview.B9u8ODHp.js +0 -123
- package/es/chunks/FileUploader.BaikPGWb.js +0 -216
- package/es/chunks/FileUploader.DD-lopf-.js +0 -216
- package/es/chunks/McpFormDialog.4HDExbTn.js +0 -297
- package/es/chunks/McpFormDialog.CgnC1I7i.js +0 -297
- package/es/chunks/McpFormDialog.D3txmoEF.js +0 -297
- package/es/chunks/McpFormDialog.DNzqqhaX.js +0 -297
- package/es/chunks/McpParamsSet.DlWx6E5S.js +0 -501
- package/es/chunks/McpParamsSet.Tlo_lPn-.js +0 -501
- package/es/chunks/MdEditor.B9-B9aiy.js +0 -163
- package/es/chunks/MdEditor.CeEo0P6j.js +0 -163
- package/es/chunks/MdEditor.DtL0Se7T.js +0 -163
- package/es/chunks/ParameterTable.BCdnj1gW.js +0 -2010
- package/es/chunks/ParameterTable.hUsxEU6F.js +0 -2010
- package/es/chunks/PublishRecord.9PLs9yUj.js +0 -133
- package/es/chunks/PublishRecord.C0841sJ-.js +0 -133
- package/es/chunks/PublishRecord.DEzC7hmP.js +0 -133
- package/es/chunks/SourcePublish.C97G36H2.js +0 -972
- package/es/chunks/SourcePublish.DkyY1KEk.js +0 -972
- package/es/chunks/SourcePublish.Dx-ltk9U.js +0 -956
- package/es/chunks/SourcePublish.FiswtYfr.js +0 -972
- package/es/chunks/SourcePublish.nfXmrVHm.js +0 -972
- package/es/chunks/config.BEZNFeRN.js +0 -35
- package/es/chunks/config.LzgBLhTz.js +0 -270
- package/es/chunks/config.MfNKPMiA.js +0 -35
- package/es/chunks/config.TaUlPTYL.js +0 -270
- package/es/chunks/config.l1J_qxeB.js +0 -270
- package/es/chunks/i18n.CIjLjyDK.js +0 -418
- package/es/chunks/i18n.CxsxtRq_.js +0 -418
- package/es/chunks/usePreview.agdxmOk8.js +0 -126
- package/lib/chunks/AddOrEditSupplierDialog.D0DSQZiS.js +0 -1
- package/lib/chunks/CommonTagsList.DbNcVId5.js +0 -1
- package/lib/chunks/CreateMcpForm.Cm9eHXWg.js +0 -1
- package/lib/chunks/CreateMcpForm.DNijYbgd.js +0 -1
- package/lib/chunks/CustomSidebar.Dojb1xoS.js +0 -1
- package/lib/chunks/FileDisplay.B4gn0Jhp.js +0 -59
- package/lib/chunks/FileDisplay.B7JWIcFg.js +0 -59
- package/lib/chunks/FileDisplay.DjtHza32.js +0 -59
- package/lib/chunks/FilePreview.b1Gine59.js +0 -1
- package/lib/chunks/McpFormDialog.BgNPOGB-.js +0 -6
- package/lib/chunks/McpFormDialog.CL2bInts.js +0 -6
- package/lib/chunks/McpFormDialog.DbhQIwYW.js +0 -6
- package/lib/chunks/MdEditor.rVQbuxCg.js +0 -1
- package/lib/chunks/PublishRecord.B7xYlRKJ.js +0 -5
- package/lib/chunks/SourcePublish.BBsNlnp4.js +0 -1
- package/lib/chunks/SourcePublish.C9JAqJcV.js +0 -1
- package/lib/chunks/SourcePublish.CpeV-UOG.js +0 -1
- package/lib/chunks/SourcePublish.K4tntn9l.js +0 -1
- package/lib/chunks/SourcePublish.tNsaCp3r.js +0 -1
- package/lib/chunks/config.CDNV0bUm.js +0 -1
- package/lib/chunks/usePreview.Dmhz8azZ.js +0 -1
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./withinstall.dLh4K-0g.js";
|
|
2
|
-
import { m as t } from "./i18n.CIjLjyDK.js";
|
|
3
|
-
import { t as n } from "./_plugin-vue_export-helper.Ct3qlEzt.js";
|
|
4
|
-
import { r } from "./config.BEZNFeRN.js";
|
|
5
|
-
import { t as i } from "./AvailableRangePreview.WFzbRasx.js";
|
|
6
|
-
import { d as a, f as o, l as s, m as c, p as l, r as u, u as d } from "./config.LzgBLhTz.js";
|
|
7
|
-
import { Fragment as f, computed as p, createBlock as m, createCommentVNode as h, createElementBlock as g, createElementVNode as _, createTextVNode as v, createVNode as y, normalizeStyle as b, openBlock as x, renderList as S, resolveDynamicComponent as C, toDisplayString as w, unref as T, withCtx as E, withModifiers as D } from "vue";
|
|
8
|
-
import { ElIcon as O, ElPopover as k, ElTag as A } from "element-plus";
|
|
9
|
-
import '../assets/CommonTagsList.css';//#region components/CommonTagsList/StatusTag.vue
|
|
10
|
-
var j = { class: "status-tag-content flex items-center" }, M = { class: "status-text fz-12" }, N = /* @__PURE__ */ n({
|
|
11
|
-
__name: "StatusTag",
|
|
12
|
-
props: {
|
|
13
|
-
channelStatus: {
|
|
14
|
-
type: [String, Number],
|
|
15
|
-
default: null
|
|
16
|
-
},
|
|
17
|
-
statusText: {
|
|
18
|
-
type: String,
|
|
19
|
-
default: null
|
|
20
|
-
},
|
|
21
|
-
showIcon: {
|
|
22
|
-
type: Boolean,
|
|
23
|
-
default: !1
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
setup(e) {
|
|
27
|
-
let t = e, n = p(() => o[t.channelStatus]), r = p(() => a[t.channelStatus]), i = p(() => d[t.channelStatus]), c = p(() => s[t.channelStatus]);
|
|
28
|
-
return (t, a) => (x(), m(T(A), { type: n.value }, {
|
|
29
|
-
default: E(() => [_("div", j, [e.showIcon && i.value ? (x(), m(T(O), {
|
|
30
|
-
key: 0,
|
|
31
|
-
color: c.value
|
|
32
|
-
}, {
|
|
33
|
-
default: E(() => [(x(), m(C(i.value)))]),
|
|
34
|
-
_: 1
|
|
35
|
-
}, 8, ["color"])) : h("", !0), _("span", M, w(e.statusText || r.value), 1)])]),
|
|
36
|
-
_: 1
|
|
37
|
-
}, 8, ["type"]));
|
|
38
|
-
}
|
|
39
|
-
}, [["__scopeId", "data-v-1efeeed8"]]), P = { class: "commont-status-box" }, F = {
|
|
40
|
-
class: "common-content w-full overflow-y-auto",
|
|
41
|
-
style: { "max-height": "200px" }
|
|
42
|
-
}, I = {
|
|
43
|
-
key: 0,
|
|
44
|
-
class: "content-item"
|
|
45
|
-
}, L = { class: "content-item-top flex items-center" }, R = { class: "item-bottom-box mg-l-4 pd-t-8 flex flex-wrap" }, z = {
|
|
46
|
-
key: 1,
|
|
47
|
-
class: "icon-placeholder w-full mg-t-4 mg-b-8 bg-e6e8ea",
|
|
48
|
-
style: { height: "1px" }
|
|
49
|
-
}, B = {
|
|
50
|
-
key: 0,
|
|
51
|
-
class: "all-visible-ranges-section mg-t-12"
|
|
52
|
-
}, V = { class: "channel-name fz-12 weight-500 mg-b-4 text-1f2329 flex items-center" }, H = {
|
|
53
|
-
key: 0,
|
|
54
|
-
class: "range-separator w-full mg-t-8 mg-b-8 bg-e6e8ea",
|
|
55
|
-
style: { height: "1px" }
|
|
56
|
-
}, U = e(/* @__PURE__ */ Object.assign({ name: "CommonTagsList" }, {
|
|
57
|
-
__name: "layout",
|
|
58
|
-
props: {
|
|
59
|
-
publishChannelList: {
|
|
60
|
-
type: Array,
|
|
61
|
-
default: () => []
|
|
62
|
-
},
|
|
63
|
-
sourceType: {
|
|
64
|
-
type: [String, Number],
|
|
65
|
-
default: null
|
|
66
|
-
}
|
|
67
|
-
},
|
|
68
|
-
setup(e) {
|
|
69
|
-
let { t: n } = t(), j = e, M = p(() => {
|
|
70
|
-
let e = j.publishChannelList || [], t = e.filter((e) => e.channelStatus === r.PUBLISHED).map((e) => ({
|
|
71
|
-
...e,
|
|
72
|
-
displayText: c?.[e.channelType]?.name(j.sourceType) || ""
|
|
73
|
-
})), n = e.filter((e) => e.channelStatus !== r.PUBLISHED).reduce((e, t) => {
|
|
74
|
-
let n = t.channelStatus;
|
|
75
|
-
return e[n] || (e[n] = []), e[n].push(t), e;
|
|
76
|
-
}, {}), i = Object.entries(n).map(([e, t]) => ({
|
|
77
|
-
channelStatus: parseInt(e),
|
|
78
|
-
displayText: `${a[parseInt(e)]}(${t.length})`,
|
|
79
|
-
isGroup: !0,
|
|
80
|
-
channels: t
|
|
81
|
-
})).sort((e, t) => t.channelStatus - e.channelStatus);
|
|
82
|
-
return [...t, ...i];
|
|
83
|
-
}), U = p(() => {
|
|
84
|
-
if (!j.publishChannelList?.length) return [];
|
|
85
|
-
let e = j.publishChannelList.reduce((e, t) => {
|
|
86
|
-
let n = t.channelStatus;
|
|
87
|
-
return e[n] || (e[n] = []), e[n].push(t), e;
|
|
88
|
-
}, {});
|
|
89
|
-
return Object.entries(e).map(([e, t]) => ({
|
|
90
|
-
status: parseInt(e),
|
|
91
|
-
channels: t
|
|
92
|
-
})).sort((e, t) => e.status === r.PUBLISHED ? -1 : t.status === r.PUBLISHED ? 1 : t.status - e.status);
|
|
93
|
-
}), W = p(() => {
|
|
94
|
-
if (!j.publishChannelList?.length) return [];
|
|
95
|
-
let e = n("COMMON_TAGS_LIST.UNKNOWN_CHANNEL");
|
|
96
|
-
return j.publishChannelList.filter((e) => !e.visibleScope || e.visibleScope.length === 0 ? !1 : e.channelStatus === r.PUBLISHED).map((t) => ({
|
|
97
|
-
channelName: c[t.channelType]?.name(j.sourceType) || e,
|
|
98
|
-
channelType: t.channelType,
|
|
99
|
-
visibleScope: t.visibleScope,
|
|
100
|
-
allVisible: t.allVisible
|
|
101
|
-
}));
|
|
102
|
-
}), G = (e) => u[l[e]];
|
|
103
|
-
return (t, l) => (x(), g("div", P, [(x(!0), g(f, null, S(M.value, (t, r) => (x(), m(T(k), {
|
|
104
|
-
key: r,
|
|
105
|
-
placement: "bottom",
|
|
106
|
-
trigger: "click",
|
|
107
|
-
width: "300"
|
|
108
|
-
}, {
|
|
109
|
-
reference: E(() => [y(N, {
|
|
110
|
-
onClick: l[0] ||= D(() => {}, ["stop"]),
|
|
111
|
-
"channel-status": t.channelStatus,
|
|
112
|
-
"status-text": t.displayText,
|
|
113
|
-
"show-icon": !0,
|
|
114
|
-
class: "mg-r-4 mg-b-4"
|
|
115
|
-
}, null, 8, ["channel-status", "status-text"])]),
|
|
116
|
-
default: E(() => [_("div", F, [(x(!0), g(f, null, S(U.value, (t, n) => (x(), g(f, { key: t.status }, [t.channels.length > 0 ? (x(), g("div", I, [_("div", L, [y(T(O), { style: b({ color: T(s)[t.status] }) }, {
|
|
117
|
-
default: E(() => [(x(), m(C(T(d)[t.status])))]),
|
|
118
|
-
_: 2
|
|
119
|
-
}, 1032, ["style"]), _("div", {
|
|
120
|
-
class: "content-item-name fz-14 mg-l-4",
|
|
121
|
-
style: b({ color: T(s)[t.status] })
|
|
122
|
-
}, w(T(a)[t.status]) + "(" + w(t.channels.length) + ") ", 5)]), _("div", R, [(x(!0), g(f, null, S(t.channels, (t) => (x(), g("div", {
|
|
123
|
-
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",
|
|
124
|
-
key: t.channelType
|
|
125
|
-
}, w(T(c)?.[t.channelType]?.name(e.sourceType)), 1))), 128))])])) : h("", !0), n < U.value.length - 1 ? (x(), g("div", z)) : h("", !0)], 64))), 128)), W.value.length > 0 ? (x(), g("div", B, [(x(!0), g(f, null, S(W.value, (e, t) => (x(), g("div", {
|
|
126
|
-
key: e.channelType,
|
|
127
|
-
class: "channel-visible-range"
|
|
128
|
-
}, [
|
|
129
|
-
_("div", V, [y(T(O), {
|
|
130
|
-
class: "mg-r-2",
|
|
131
|
-
size: "14",
|
|
132
|
-
color: G(e.channelType)?.iconColor
|
|
133
|
-
}, {
|
|
134
|
-
default: E(() => [(x(), m(C(G(e.channelType)?.icon)))]),
|
|
135
|
-
_: 2
|
|
136
|
-
}, 1032, ["color"]), v(" " + w(e.channelName) + " " + w(T(n)("COMMON_TAGS_LIST.AVAILABLE_SCOPE")), 1)]),
|
|
137
|
-
y(T(i), {
|
|
138
|
-
"all-visible": e.allVisible,
|
|
139
|
-
"model-value": e.visibleScope,
|
|
140
|
-
"tree-list": [],
|
|
141
|
-
readonly: !0
|
|
142
|
-
}, null, 8, ["all-visible", "model-value"]),
|
|
143
|
-
t < W.value.length - 1 ? (x(), g("div", H)) : h("", !0)
|
|
144
|
-
]))), 128))])) : h("", !0)])]),
|
|
145
|
-
_: 2
|
|
146
|
-
}, 1024))), 128)), e.publishChannelList?.length ? h("", !0) : (x(), m(T(A), {
|
|
147
|
-
key: 0,
|
|
148
|
-
type: T(o)[T(r).UNPUBLISHED]
|
|
149
|
-
}, {
|
|
150
|
-
default: E(() => [v(w(T(a)[T(r).UNPUBLISHED]), 1)]),
|
|
151
|
-
_: 1
|
|
152
|
-
}, 8, ["type"]))]));
|
|
153
|
-
}
|
|
154
|
-
}));
|
|
155
|
-
//#endregion
|
|
156
|
-
export { N as n, U as t };
|
|
@@ -1,308 +0,0 @@
|
|
|
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 "./usePreview.agdxmOk8.js";
|
|
4
|
-
import { t as r } from "./FilePreview.B9u8ODHp.js";
|
|
5
|
-
import { t as i } from "./_plugin-vue_export-helper.Ct3qlEzt.js";
|
|
6
|
-
import { t as a } from "./FileUploader.DD-lopf-.js";
|
|
7
|
-
import { t as o } from "./RadioGroup.Czc1JtkN.js";
|
|
8
|
-
import { t as s } from "./AuthSection.DWD_FxtJ.js";
|
|
9
|
-
import { t as c } from "./MdEditor.DtL0Se7T.js";
|
|
10
|
-
import { createBlock as l, createCommentVNode as u, createElementVNode as d, createTextVNode as f, createVNode as p, openBlock as m, reactive as h, ref as g, toDisplayString as _, unref as v, watch as y, withCtx as b } from "vue";
|
|
11
|
-
import { ElForm as x, ElFormItem as S, ElIcon as C, ElInput as w, ElMessage as T, ElTooltip as E } from "element-plus";
|
|
12
|
-
import { IconTip as D } from "color-message-aibox-vue";
|
|
13
|
-
import '../assets/CreateMcpForm.css';//#region components/CreateMcpForm/config.js
|
|
14
|
-
var O = () => {
|
|
15
|
-
let { t: e } = t();
|
|
16
|
-
return {
|
|
17
|
-
rulesObj: {
|
|
18
|
-
name: [{
|
|
19
|
-
required: !0,
|
|
20
|
-
message: e("LIBRARY_CREATEMCPFORM.MCP_NAME_PLACEHOLDER"),
|
|
21
|
-
trigger: "blur"
|
|
22
|
-
}, {
|
|
23
|
-
max: 20,
|
|
24
|
-
message: e("LIBRARY_CREATEMCPFORM.MCP_NAME_MAX"),
|
|
25
|
-
trigger: "blur"
|
|
26
|
-
}],
|
|
27
|
-
description: [{
|
|
28
|
-
required: !0,
|
|
29
|
-
message: e("LIBRARY_CREATEMCPFORM.MCP_DESCRIPTION_REQUIRED"),
|
|
30
|
-
trigger: "blur"
|
|
31
|
-
}, {
|
|
32
|
-
max: 200,
|
|
33
|
-
message: e("LIBRARY_CREATEMCPFORM.MCP_DESCRIPTION_MAX"),
|
|
34
|
-
trigger: "blur"
|
|
35
|
-
}],
|
|
36
|
-
overview: [{
|
|
37
|
-
required: !0,
|
|
38
|
-
message: e("LIBRARY_CREATEMCPFORM.MCP_OVERVIEW_REQUIRED"),
|
|
39
|
-
trigger: "blur"
|
|
40
|
-
}],
|
|
41
|
-
address: [{
|
|
42
|
-
type: "url",
|
|
43
|
-
required: !0,
|
|
44
|
-
message: e("LIBRARY_CREATEMCPFORM.SERVICE_URL_INVALID"),
|
|
45
|
-
trigger: ["blur", "change"]
|
|
46
|
-
}],
|
|
47
|
-
communicationType: [{
|
|
48
|
-
required: !0,
|
|
49
|
-
message: e("LIBRARY_CREATEMCPFORM.TRANSFER_METHOD_REQUIRED"),
|
|
50
|
-
trigger: "change"
|
|
51
|
-
}],
|
|
52
|
-
applyLink: [{
|
|
53
|
-
type: "url",
|
|
54
|
-
message: e("LIBRARY_CREATEMCPFORM.DOCUMENTATION_URL_INVALID"),
|
|
55
|
-
trigger: ["blur", "change"]
|
|
56
|
-
}]
|
|
57
|
-
},
|
|
58
|
-
communicationTypeOpts: [{
|
|
59
|
-
label: "SSE",
|
|
60
|
-
value: "SSE"
|
|
61
|
-
}, {
|
|
62
|
-
label: "Streamable HTTP",
|
|
63
|
-
value: "HTTP"
|
|
64
|
-
}]
|
|
65
|
-
};
|
|
66
|
-
}, k = { class: "label-with-icon" }, A = { class: "label-with-icon" }, j = { class: "auth-section-wrapper" }, M = e(/* @__PURE__ */ i({
|
|
67
|
-
__name: "CreateMcpForm",
|
|
68
|
-
props: { showOverview: {
|
|
69
|
-
type: Boolean,
|
|
70
|
-
default: !1
|
|
71
|
-
} },
|
|
72
|
-
setup(e, { expose: i }) {
|
|
73
|
-
let M = e, { t: N } = t(), { previewImage: P } = n(), F = g(null), I = g(null), { rulesObj: L, communicationTypeOpts: R } = O(), z = h({
|
|
74
|
-
icon: "",
|
|
75
|
-
iconUrl: "",
|
|
76
|
-
name: "",
|
|
77
|
-
description: "",
|
|
78
|
-
overview: "",
|
|
79
|
-
communicationType: "HTTP",
|
|
80
|
-
address: "",
|
|
81
|
-
applyLink: ""
|
|
82
|
-
}), B = g(R), V = g({ auth: {
|
|
83
|
-
authType: "none",
|
|
84
|
-
keyType: "custom",
|
|
85
|
-
paramLocation: "header",
|
|
86
|
-
paramName: "",
|
|
87
|
-
paramValue: "",
|
|
88
|
-
token: ""
|
|
89
|
-
} }), H = g({ ...L }), U = () => {
|
|
90
|
-
M.showOverview ? H.value.overview = L.overview : delete H.value.overview;
|
|
91
|
-
};
|
|
92
|
-
y(() => M.showOverview, () => {
|
|
93
|
-
U();
|
|
94
|
-
}, { immediate: !0 });
|
|
95
|
-
let W = g([]), G = (e) => {
|
|
96
|
-
z.iconUrl = e.url, z.icon = e.bnid, W.value = [e];
|
|
97
|
-
}, K = () => {
|
|
98
|
-
z.iconUrl = "", z.icon = "", W.value = [];
|
|
99
|
-
}, q = (e) => {
|
|
100
|
-
P(e.url);
|
|
101
|
-
};
|
|
102
|
-
return i({
|
|
103
|
-
validate: async (e) => {
|
|
104
|
-
if (!F.value) return !1;
|
|
105
|
-
if (U(), I.value?.validateField) {
|
|
106
|
-
let t = I.value.validateField();
|
|
107
|
-
if (Object.keys(t).length > 0) return t.paramName ? T.error(N("LIBRARY_CREATEMCPFORM.PARAMETER_NAME_REQUIRED") || "请输入密钥参数名") : t.paramValue || t.token ? T.error(N("LIBRARY_CREATEMCPFORM.INPUT_API_KEY_REQUIRED") || "请输入密钥值") : T.error(N("LIBRARY_CREATEMCPFORM.MCP_AUTH_REQUIRED") || "请完善鉴权信息"), e?.(Error(N("LIBRARY_CREATEMCPFORM.MCP_AUTH_REQUIRED") || "请完善鉴权信息")), !1;
|
|
108
|
-
}
|
|
109
|
-
return F.value.validate(e);
|
|
110
|
-
},
|
|
111
|
-
getFormData: () => ({
|
|
112
|
-
name: z.name,
|
|
113
|
-
icon: z.icon,
|
|
114
|
-
description: z.description,
|
|
115
|
-
overview: M.showOverview ? z.overview : "",
|
|
116
|
-
address: z.address,
|
|
117
|
-
communicationType: z.communicationType,
|
|
118
|
-
authType: V.value.auth.authType === "none" ? 0 : 1,
|
|
119
|
-
authLocation: V.value.auth.paramLocation === "header" ? 0 : 1,
|
|
120
|
-
apiKeyName: V.value.auth.keyType === "bearer" ? "Authorization" : V.value.auth.paramName || "",
|
|
121
|
-
apiKeyValue: V.value.auth.keyType === "bearer" ? V.value.auth.token ? `Bearer ${V.value.auth.token}` : "" : V.value.auth.paramValue || "",
|
|
122
|
-
applyLink: z.applyLink || "",
|
|
123
|
-
headerPrefixType: 1
|
|
124
|
-
}),
|
|
125
|
-
setFormData: (e) => {
|
|
126
|
-
if (!e) return;
|
|
127
|
-
Object.assign(z, {
|
|
128
|
-
name: e.name || "",
|
|
129
|
-
description: e.description || "",
|
|
130
|
-
overview: e.overview || "",
|
|
131
|
-
icon: e.icon || "",
|
|
132
|
-
iconUrl: e.iconUrl || "",
|
|
133
|
-
communicationType: e.communicationType || "SSE",
|
|
134
|
-
address: e.address || "",
|
|
135
|
-
applyLink: e.applyLink || ""
|
|
136
|
-
});
|
|
137
|
-
let t = e.authType === 1 || e.authType === "1";
|
|
138
|
-
if (V.value.auth.authType = t ? "apiKey" : "none", V.value.auth.paramLocation = e.authLocation === 0 || e.authLocation === "0" ? "header" : "query", t) {
|
|
139
|
-
let t = !e.apiKeyName || e.apiKeyName === "Authorization";
|
|
140
|
-
if (V.value.auth.keyType = t ? "bearer" : "custom", t) {
|
|
141
|
-
V.value.auth.paramName = "", V.value.auth.paramValue = "";
|
|
142
|
-
let t = e.apiKeyValue || "";
|
|
143
|
-
V.value.auth.token = t.startsWith("Bearer ") ? t.substring(7) : t;
|
|
144
|
-
} else V.value.auth.paramName = e.apiKeyName || "", V.value.auth.paramValue = e.apiKeyValue || "", V.value.auth.token = "";
|
|
145
|
-
} else V.value.auth.keyType = "custom", V.value.auth.paramName = "", V.value.auth.paramValue = "", V.value.auth.token = "";
|
|
146
|
-
e.icon && e.icon !== "0" && e.iconUrl && (W.value = [{
|
|
147
|
-
bnid: e.icon,
|
|
148
|
-
url: e.iconUrl
|
|
149
|
-
}]);
|
|
150
|
-
}
|
|
151
|
-
}), (t, n) => (m(), l(v(x), {
|
|
152
|
-
ref_key: "ruleFormRef",
|
|
153
|
-
ref: F,
|
|
154
|
-
model: z,
|
|
155
|
-
rules: H.value,
|
|
156
|
-
"label-width": "auto",
|
|
157
|
-
"label-position": "top",
|
|
158
|
-
class: "scrollable-form"
|
|
159
|
-
}, {
|
|
160
|
-
default: b(() => [
|
|
161
|
-
p(v(S), {
|
|
162
|
-
class: "scrollable-form__item",
|
|
163
|
-
label: v(N)("LIBRARY_CREATEMCPFORM.MCP_ICON"),
|
|
164
|
-
prop: "icon"
|
|
165
|
-
}, {
|
|
166
|
-
label: b(() => [d("div", k, [d("span", null, _(v(N)("LIBRARY_CREATEMCPFORM.MCP_ICON")), 1), p(v(E), { placement: "top" }, {
|
|
167
|
-
content: b(() => [
|
|
168
|
-
f(_(v(N)("LIBRARY_CREATEMCPFORM.MCP_ICON_TIP")), 1),
|
|
169
|
-
n[7] ||= d("br", null, null, -1),
|
|
170
|
-
f(" " + _(v(N)("LIBRARY_CREATEMCPFORM.MCP_ICON_SIZE_TIP")), 1)
|
|
171
|
-
]),
|
|
172
|
-
default: b(() => [p(v(C), {
|
|
173
|
-
size: "14px",
|
|
174
|
-
color: "#999"
|
|
175
|
-
}, {
|
|
176
|
-
default: b(() => [p(v(D))]),
|
|
177
|
-
_: 1
|
|
178
|
-
})]),
|
|
179
|
-
_: 1
|
|
180
|
-
})])]),
|
|
181
|
-
default: b(() => [p(v(r), {
|
|
182
|
-
fileList: W.value,
|
|
183
|
-
previewType: "Card",
|
|
184
|
-
isCustom: !0,
|
|
185
|
-
onOnRemove: K,
|
|
186
|
-
onOnPreview: q
|
|
187
|
-
}, {
|
|
188
|
-
CardUploader: b(() => [W.value.length === 0 ? (m(), l(v(a), {
|
|
189
|
-
key: 0,
|
|
190
|
-
"upload-type": "Card",
|
|
191
|
-
onOnSuccess: G,
|
|
192
|
-
limitSize: 5,
|
|
193
|
-
acceptType: ".jpg,.png",
|
|
194
|
-
businessType: "mcp",
|
|
195
|
-
defaultUploadIcon: "mcp"
|
|
196
|
-
})) : u("", !0)]),
|
|
197
|
-
_: 1
|
|
198
|
-
}, 8, ["fileList"])]),
|
|
199
|
-
_: 1
|
|
200
|
-
}, 8, ["label"]),
|
|
201
|
-
p(v(S), {
|
|
202
|
-
class: "scrollable-form__item",
|
|
203
|
-
label: v(N)("LIBRARY_CREATEMCPFORM.MCP_NAME"),
|
|
204
|
-
prop: "name"
|
|
205
|
-
}, {
|
|
206
|
-
default: b(() => [p(v(w), {
|
|
207
|
-
modelValue: z.name,
|
|
208
|
-
"onUpdate:modelValue": n[0] ||= (e) => z.name = e,
|
|
209
|
-
placeholder: v(N)("LIBRARY_CREATEMCPFORM.MCP_NAME_REQUIRED"),
|
|
210
|
-
maxlength: "20",
|
|
211
|
-
"show-word-limit": ""
|
|
212
|
-
}, null, 8, ["modelValue", "placeholder"])]),
|
|
213
|
-
_: 1
|
|
214
|
-
}, 8, ["label"]),
|
|
215
|
-
p(v(S), {
|
|
216
|
-
class: "scrollable-form__item",
|
|
217
|
-
label: v(N)("LIBRARY_CREATEMCPFORM.MCP_DESCRIPTION"),
|
|
218
|
-
prop: "description"
|
|
219
|
-
}, {
|
|
220
|
-
default: b(() => [p(v(w), {
|
|
221
|
-
modelValue: z.description,
|
|
222
|
-
"onUpdate:modelValue": n[1] ||= (e) => z.description = e,
|
|
223
|
-
type: "textarea",
|
|
224
|
-
rows: 3,
|
|
225
|
-
placeholder: v(N)("LIBRARY_CREATEMCPFORM.MCP_DESCRIPTION_REQUIRED"),
|
|
226
|
-
maxlength: "200",
|
|
227
|
-
"show-word-limit": ""
|
|
228
|
-
}, null, 8, ["modelValue", "placeholder"])]),
|
|
229
|
-
_: 1
|
|
230
|
-
}, 8, ["label"]),
|
|
231
|
-
e.showOverview ? (m(), l(v(S), {
|
|
232
|
-
key: 0,
|
|
233
|
-
class: "scrollable-form__item",
|
|
234
|
-
label: v(N)("LIBRARY_CREATEMCPFORM.MCP_OVERVIEW"),
|
|
235
|
-
prop: "overview"
|
|
236
|
-
}, {
|
|
237
|
-
default: b(() => [p(v(c), {
|
|
238
|
-
modelValue: z.overview,
|
|
239
|
-
"onUpdate:modelValue": n[2] ||= (e) => z.overview = e,
|
|
240
|
-
height: "300px",
|
|
241
|
-
placeholder: v(N)("LIBRARY_CREATEMCPFORM.MCP_OVERVIEW_REQUIRED"),
|
|
242
|
-
businessType: "mcp"
|
|
243
|
-
}, null, 8, ["modelValue", "placeholder"])]),
|
|
244
|
-
_: 1
|
|
245
|
-
}, 8, ["label"])) : u("", !0),
|
|
246
|
-
p(v(S), {
|
|
247
|
-
class: "scrollable-form__item",
|
|
248
|
-
label: v(N)("LIBRARY_CREATEMCPFORM.TRANSFER_METHOD"),
|
|
249
|
-
prop: "communicationType"
|
|
250
|
-
}, {
|
|
251
|
-
default: b(() => [p(v(o), {
|
|
252
|
-
modelValue: z.communicationType,
|
|
253
|
-
"onUpdate:modelValue": n[3] ||= (e) => z.communicationType = e,
|
|
254
|
-
options: B.value,
|
|
255
|
-
layout: "vertical",
|
|
256
|
-
"class-name": "scrollable-form__item-radio"
|
|
257
|
-
}, null, 8, ["modelValue", "options"])]),
|
|
258
|
-
_: 1
|
|
259
|
-
}, 8, ["label"]),
|
|
260
|
-
p(v(S), {
|
|
261
|
-
class: "scrollable-form__item",
|
|
262
|
-
label: v(N)("LIBRARY_CREATEMCPFORM.SERVICE_URL"),
|
|
263
|
-
prop: "address"
|
|
264
|
-
}, {
|
|
265
|
-
default: b(() => [p(v(w), {
|
|
266
|
-
modelValue: z.address,
|
|
267
|
-
"onUpdate:modelValue": n[4] ||= (e) => z.address = e,
|
|
268
|
-
placeholder: v(N)("LIBRARY_CREATEMCPFORM.SERVICE_URL_REQUIRED")
|
|
269
|
-
}, null, 8, ["modelValue", "placeholder"])]),
|
|
270
|
-
_: 1
|
|
271
|
-
}, 8, ["label"]),
|
|
272
|
-
V.value.auth.authType === "apiKey" ? (m(), l(v(S), {
|
|
273
|
-
key: 1,
|
|
274
|
-
class: "scrollable-form__item",
|
|
275
|
-
prop: "applyLink"
|
|
276
|
-
}, {
|
|
277
|
-
label: b(() => [d("div", A, [d("span", null, _(v(N)("LIBRARY_CREATEMCPFORM.DOCUMENTATION_URL")), 1), p(v(E), { placement: "top" }, {
|
|
278
|
-
content: b(() => [f(_(v(N)("LIBRARY_CREATEMCPFORM.DOCUMENTATION_URL_TIP")), 1)]),
|
|
279
|
-
default: b(() => [p(v(C), {
|
|
280
|
-
size: "14px",
|
|
281
|
-
color: "#999"
|
|
282
|
-
}, {
|
|
283
|
-
default: b(() => [p(v(D))]),
|
|
284
|
-
_: 1
|
|
285
|
-
})]),
|
|
286
|
-
_: 1
|
|
287
|
-
})])]),
|
|
288
|
-
default: b(() => [p(v(w), {
|
|
289
|
-
modelValue: z.applyLink,
|
|
290
|
-
"onUpdate:modelValue": n[5] ||= (e) => z.applyLink = e,
|
|
291
|
-
placeholder: v(N)("LIBRARY_CREATEMCPFORM.DOCUMENTATION_URL_REQUIRED")
|
|
292
|
-
}, null, 8, ["modelValue", "placeholder"])]),
|
|
293
|
-
_: 1
|
|
294
|
-
})) : u("", !0),
|
|
295
|
-
d("div", j, [p(v(s), {
|
|
296
|
-
ref_key: "authSectionRef",
|
|
297
|
-
ref: I,
|
|
298
|
-
featData: V.value,
|
|
299
|
-
"onUpdate:featData": n[6] ||= (e) => V.value = e,
|
|
300
|
-
layout: "vertical"
|
|
301
|
-
}, null, 8, ["featData"])])
|
|
302
|
-
]),
|
|
303
|
-
_: 1
|
|
304
|
-
}, 8, ["model", "rules"]));
|
|
305
|
-
}
|
|
306
|
-
}, [["__scopeId", "data-v-b8579cd8"]]));
|
|
307
|
-
//#endregion
|
|
308
|
-
export { M as t };
|