aibox-custom-component-packages 0.0.26 → 0.0.27

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 (104) hide show
  1. package/es/SourcePublish.mjs +1 -1
  2. package/es/assets/SourcePublish.css +1 -1
  3. package/es/chunks/{AddOrEditSupplierDialog.DUqqhPyY.js → AddOrEditSupplierDialog.Dg8gkZJ_.js} +2 -2
  4. package/es/chunks/AiboxTable.C9hrozrD.js +635 -0
  5. package/es/chunks/{ApplicationTypeTag.CdOFw2tm.js → ApplicationTypeTag.C7wkmR5k.js} +1 -1
  6. package/es/chunks/AuthSection.B8fzLcqX.js +201 -0
  7. package/es/chunks/AvailableRangePreview.CEoRKsuA.js +194 -0
  8. package/es/chunks/AvailableRangeSetting.C9GkFsQd.js +229 -0
  9. package/es/chunks/CodeView.Bsu4N1bC.js +148 -0
  10. package/es/chunks/CommonTagsList.C5_QqxEd.js +156 -0
  11. package/es/chunks/CreateMcpForm.DF53TdcU.js +308 -0
  12. package/es/chunks/{DocSyncSelect.DP8U1-ZH.js → DocSyncSelect.BAHqN-9J.js} +3 -3
  13. package/es/chunks/FileUploader.DUj7bSMa.js +216 -0
  14. package/es/chunks/McpFormDialog.Bc7oBv3C.js +297 -0
  15. package/es/chunks/McpParamsSet.CZJmyAJo.js +501 -0
  16. package/es/chunks/MdEditor.BBlPGzuI.js +163 -0
  17. package/es/chunks/ParameterTable.CMHp6Ubd.js +2010 -0
  18. package/es/chunks/PublishRecord.Cg21VWQX.js +133 -0
  19. package/es/chunks/{SourcePublish.CjzqOFwj.js → SourcePublish.BjY8OTLS.js} +10 -23
  20. package/es/chunks/{SourcePublish.DBM7OeXm.js → SourcePublish.BqTfGtXE.js} +5 -2
  21. package/es/chunks/SourcePublish.lCN7YbeP.js +979 -0
  22. package/es/chunks/config.CK5iNO4T.js +270 -0
  23. package/es/chunks/config.D-qzWO8Q.js +35 -0
  24. package/es/chunks/i18n.C-J-jxme.js +426 -0
  25. package/es/index.mjs +1 -1
  26. package/lib/SourcePublish.js +1 -1
  27. package/lib/assets/SourcePublish.css +1 -1
  28. package/lib/chunks/SourcePublish.BqmktWp7.js +1 -0
  29. package/lib/chunks/SourcePublish.Bz8MaRPm.js +1 -0
  30. package/lib/index.js +1 -1
  31. package/package.json +3 -3
  32. package/es/AiboxTabs.mjs +0 -71
  33. package/es/ExampleComponent.mjs +0 -35
  34. package/es/assets/AiboxTabs.css +0 -1
  35. package/es/assets/BackBar.css +0 -1
  36. package/es/assets/ExampleComponent.css +0 -1
  37. package/es/assets/index.css +0 -1
  38. package/es/assets/index2.css +0 -1
  39. package/es/assets/index3.css +0 -1
  40. package/es/assets/index4.css +0 -1
  41. package/es/chunks/AiboxTable.CF4T_OCu.js +0 -645
  42. package/es/chunks/ApplicationTypeTag.CpzWFRmD.js +0 -52
  43. package/es/chunks/BackBar.Bc2NIuzk.js +0 -645
  44. package/es/chunks/DocSyncSelect.CY25GsAh.js +0 -2310
  45. package/es/chunks/DocSyncSelect.dhZh4w45.js +0 -2290
  46. package/es/chunks/_plugin-vue_export-helper.CHgC5LLL.js +0 -9
  47. package/es/chunks/config.8htFF04x.js +0 -325
  48. package/es/chunks/config.BU21Gda2.js +0 -49
  49. package/es/chunks/config.DPkdwjwD.js +0 -49
  50. package/es/chunks/config.gNZ_rT87.js +0 -325
  51. package/es/chunks/enums.CfSBDD6u.js +0 -83
  52. package/es/chunks/enums.WrpwbF4w.js +0 -14
  53. package/es/chunks/field-types.CPnMOjle.js +0 -13
  54. package/es/chunks/files.cduUqjHX.js +0 -16
  55. package/es/chunks/i18n.DmqkiK-h.js +0 -444
  56. package/es/chunks/i18n.k9Q_HVMs.js +0 -443
  57. package/es/chunks/index.BDd6hHiU.js +0 -172
  58. package/es/chunks/index.CF_YHLP5.js +0 -257
  59. package/es/chunks/index.DM3o2YX3.js +0 -398
  60. package/es/chunks/index.Dx-mCS4E.js +0 -1298
  61. package/es/chunks/index.bCzIhWFw.js +0 -7
  62. package/es/chunks/index.ml5i7aB5.js +0 -257
  63. package/es/chunks/layout.CygCXa6s.js +0 -26
  64. package/es/chunks/publish.D6friivo.js +0 -50
  65. package/es/chunks/publish.DlD0o09n.js +0 -50
  66. package/es/chunks/request.24c3shPx.js +0 -5
  67. package/es/chunks/usePreview.BHvXwaNi.js +0 -157
  68. package/lib/AiboxTabs.js +0 -1
  69. package/lib/ExampleComponent.js +0 -1
  70. package/lib/assets/AiboxTabs.css +0 -1
  71. package/lib/assets/BackBar.css +0 -1
  72. package/lib/assets/ExampleComponent.css +0 -1
  73. package/lib/assets/index.css +0 -1
  74. package/lib/assets/index2.css +0 -1
  75. package/lib/assets/index3.css +0 -1
  76. package/lib/assets/index4.css +0 -1
  77. package/lib/chunks/AiboxTable.CJOPGJtU.js +0 -1
  78. package/lib/chunks/ApplicationTypeTag.BmU_cqaw.js +0 -1
  79. package/lib/chunks/BackBar.CZsNxoX1.js +0 -1
  80. package/lib/chunks/DocSyncSelect.DndqvEn2.js +0 -2
  81. package/lib/chunks/DocSyncSelect.kDNcepY-.js +0 -2
  82. package/lib/chunks/SourcePublish.eOSEULjP.js +0 -1
  83. package/lib/chunks/_plugin-vue_export-helper.BHFhmbuH.js +0 -1
  84. package/lib/chunks/config.1oaIKLGn.js +0 -1
  85. package/lib/chunks/config.B0XKkp1w.js +0 -1
  86. package/lib/chunks/config.BCAuBVxV.js +0 -1
  87. package/lib/chunks/config.BF7MO0O5.js +0 -1
  88. package/lib/chunks/enums.Dmq4PdUc.js +0 -1
  89. package/lib/chunks/enums.DpU2er5r.js +0 -1
  90. package/lib/chunks/field-types.Ch_2yDfg.js +0 -1
  91. package/lib/chunks/files.B3-8UC0v.js +0 -1
  92. package/lib/chunks/i18n.CL5L6nx6.js +0 -1
  93. package/lib/chunks/i18n.DgOp_D7R.js +0 -1
  94. package/lib/chunks/index.4hFddClT.js +0 -6
  95. package/lib/chunks/index.BNivYbtq.js +0 -1
  96. package/lib/chunks/index.B_keI1Aq.js +0 -1
  97. package/lib/chunks/index.Bk-RwmaH.js +0 -1
  98. package/lib/chunks/index.CJFk1R2u.js +0 -59
  99. package/lib/chunks/index.CkihWzK6.js +0 -1
  100. package/lib/chunks/layout.DbBSbLgm.js +0 -1
  101. package/lib/chunks/publish.3TrK3fZf.js +0 -1
  102. package/lib/chunks/publish.Bw1acrSu.js +0 -1
  103. package/lib/chunks/request.D8T4MgGX.js +0 -1
  104. package/lib/chunks/usePreview.BojIDW7Z.js +0 -1
@@ -0,0 +1,148 @@
1
+ import { m as e } from "./i18n.C-J-jxme.js";
2
+ import { t } from "./_plugin-vue_export-helper.B3ysoDQm.js";
3
+ import { createBlock as n, createCommentVNode as r, createElementBlock as i, createVNode as a, normalizeClass as o, onMounted as s, openBlock as c, ref as l, shallowRef as u, unref as d, watch as f, withCtx as p } from "vue";
4
+ import { ElIcon as m, ElMessage as h, ElScrollbar as g } from "element-plus";
5
+ import { IconCopy1 as _ } from "color-message-aibox-vue";
6
+ import { Codemirror as v } from "vue-codemirror";
7
+ import { EditorView as y } from "@codemirror/view";
8
+ import { json as b } from "@codemirror/lang-json";
9
+ import { oneDark as x } from "@codemirror/theme-one-dark";
10
+ import { codeFolding as S } from "@codemirror/language";
11
+ import C from "copy-to-clipboard";
12
+ import '../assets/CodeView.css';//#region hooks/useCopy.js
13
+ var w = () => {
14
+ let { t } = e();
15
+ return { copyText: (e) => {
16
+ C(e) ? h({
17
+ message: t("MESSAGE_REMIND.COPY_SUCCESS"),
18
+ type: "success"
19
+ }) : h({
20
+ message: t("COMMON_STORE_LIBRARY.LABEL_COPY_FAIL"),
21
+ type: "error"
22
+ });
23
+ } };
24
+ }, T = /*#__PURE__*/ t({
25
+ __name: "index",
26
+ props: {
27
+ code: {
28
+ type: String,
29
+ default: ""
30
+ },
31
+ language: {
32
+ type: String,
33
+ default: "json"
34
+ },
35
+ customExpandDepth: {
36
+ type: Number,
37
+ default: Infinity
38
+ },
39
+ sort: {
40
+ type: Boolean,
41
+ default: !0
42
+ },
43
+ noPadding: {
44
+ type: Boolean,
45
+ default: !1
46
+ },
47
+ theme: {
48
+ type: String,
49
+ default: "light"
50
+ },
51
+ showLength: {
52
+ type: Boolean,
53
+ default: !1
54
+ },
55
+ maxHeight: {
56
+ type: String,
57
+ default: "calc(100% - 125px)"
58
+ },
59
+ showCopy: {
60
+ type: Boolean,
61
+ default: !1
62
+ },
63
+ enableFolding: {
64
+ type: Boolean,
65
+ default: !1
66
+ }
67
+ },
68
+ setup(e) {
69
+ let { copyText: t } = w(), h = e, C = l(""), T = { json: () => b() }, E = () => {
70
+ let e = h.language.toLowerCase();
71
+ return T[e] ? T[e]() : b();
72
+ }, D = u([]), O = (e) => {
73
+ let t = e.trim(), n = (e) => {
74
+ try {
75
+ return JSON.parse(e);
76
+ } catch {
77
+ return null;
78
+ }
79
+ }, r = null;
80
+ if ((t.startsWith("{") || t.startsWith("[")) && (r = n(t)), r ||= n(`{${t.replace(/,\s*$/, "")}}`), r && typeof r == "object" && !Array.isArray(r)) {
81
+ let e = r.role;
82
+ if (e) return "role: " + e;
83
+ }
84
+ return "";
85
+ }, k = () => {
86
+ let e = [
87
+ E(),
88
+ y.editable.of(!1),
89
+ y.lineWrapping
90
+ ];
91
+ h.enableFolding && e.push(S({
92
+ preparePlaceholder: (e, t) => {
93
+ try {
94
+ return O(e.doc.sliceString(t.from, t.to));
95
+ } catch (e) {
96
+ return console.error("Error getting fold preview:", e), "...";
97
+ }
98
+ },
99
+ placeholderDOM: (e, t, n) => {
100
+ let r = document.createElement("span");
101
+ return r.className = "cm-foldPlaceholder", r.onclick = t, r.style.cursor = "pointer", r.style.color = "#888", r.style.padding = "0 4px", r.style.borderRadius = "3px", r.textContent = n ? `${n}...` : "...", r;
102
+ }
103
+ })), h.theme === "dark" && e.push(x), D.value = e;
104
+ }, A = (e) => {
105
+ try {
106
+ let t = JSON.parse(e);
107
+ if (h.sort && typeof t == "object" && t) {
108
+ let e = (t) => Array.isArray(t) ? t.map(e) : typeof t == "object" && t ? Object.keys(t).sort().reduce((n, r) => (n[r] = e(t[r]), n), {}) : t;
109
+ return JSON.stringify(e(t), null, 2);
110
+ }
111
+ return JSON.stringify(t, null, 2);
112
+ } catch {
113
+ return e;
114
+ }
115
+ };
116
+ return f(() => h.code, (e) => {
117
+ h.language === "json" ? C.value = A(e) : C.value = e;
118
+ }, { immediate: !0 }), s(() => {
119
+ k();
120
+ }), (s, l) => (c(), i("div", { class: o(["code-viewer", {
121
+ "no-padding": e.noPadding,
122
+ dark: e.theme === "dark"
123
+ }]) }, [e.showCopy ? (c(), n(d(m), {
124
+ key: 0,
125
+ onClick: l[0] ||= (n) => d(t)(e.code),
126
+ class: "code-viewer__copy",
127
+ color: "#96A0AB",
128
+ size: "18px"
129
+ }, {
130
+ default: p(() => [a(d(_))]),
131
+ _: 1
132
+ })) : r("", !0), a(d(g), { "max-height": e.maxHeight }, {
133
+ default: p(() => [a(d(v), {
134
+ modelValue: C.value,
135
+ "onUpdate:modelValue": l[1] ||= (e) => C.value = e,
136
+ style: {
137
+ height: "100%",
138
+ minHeight: "100px"
139
+ },
140
+ extensions: D.value,
141
+ disabled: !0
142
+ }, null, 8, ["modelValue", "extensions"])]),
143
+ _: 1
144
+ }, 8, ["max-height"])], 2));
145
+ }
146
+ }, [["__scopeId", "data-v-011cdc70"]]);
147
+ //#endregion
148
+ export { w as n, T as t };
@@ -0,0 +1,156 @@
1
+ import { t as e } from "./withinstall.CMngc-br.js";
2
+ import { m as t } from "./i18n.C-J-jxme.js";
3
+ import { t as n } from "./_plugin-vue_export-helper.B3ysoDQm.js";
4
+ import { r } from "./config.D-qzWO8Q.js";
5
+ import { t as i } from "./AvailableRangePreview.CEoRKsuA.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.CK5iNO4T.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 };
@@ -0,0 +1,308 @@
1
+ import { t as e } from "./withinstall.CMngc-br.js";
2
+ import { m as t } from "./i18n.C-J-jxme.js";
3
+ import { t as n } from "./usePreview.yIUda0Hv.js";
4
+ import { t as r } from "./FilePreview.8h1jwcK3.js";
5
+ import { t as i } from "./_plugin-vue_export-helper.B3ysoDQm.js";
6
+ import { t as a } from "./FileUploader.DUj7bSMa.js";
7
+ import { t as o } from "./RadioGroup.CB4jkuR3.js";
8
+ import { t as s } from "./AuthSection.B8fzLcqX.js";
9
+ import { t as c } from "./MdEditor.BBlPGzuI.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-47c4a3f2"]]));
307
+ //#endregion
308
+ export { M as t };
@@ -1,6 +1,6 @@
1
1
  import { r as e, t } from "./chunk.Dqa2HsxW.js";
2
2
  import { t as n } from "./withinstall.CMngc-br.js";
3
- import { m as r } from "./i18n.yuai-sb4.js";
3
+ import { m as r } from "./i18n.C-J-jxme.js";
4
4
  import { t as i } from "./_plugin-vue_export-helper.B3ysoDQm.js";
5
5
  import { Fragment as a, computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createSlots as d, createVNode as f, defineComponent as p, effectScope as m, guardReactiveProps as h, h as g, inject as _, markRaw as v, mergeProps as y, nextTick as b, normalizeClass as x, normalizeProps as S, normalizeStyle as C, onActivated as w, onBeforeUnmount as T, onDeactivated as E, onMounted as D, onUnmounted as O, openBlock as k, provide as A, reactive as j, ref as M, renderList as N, renderSlot as P, resolveComponent as F, resolveDynamicComponent as I, shallowReactive as L, shallowRef as R, toDisplayString as z, toHandlers as B, toValue as V, unref as H, useAttrs as ee, watch as U, withCtx as W, withDirectives as te, withModifiers as ne } from "vue";
6
6
  import { ElAutoResizer as G, ElCheckbox as re, ElIcon as K, ElInput as ie, ElSegmented as q, ElTreeV2 as ae } from "element-plus";
@@ -113,7 +113,7 @@ var X = {
113
113
  }
114
114
  }), [["__scopeId", "data-v-6736cdb6"]]);
115
115
  //#endregion
116
- //#region ../../../node_modules/.pnpm/element-tree-line@0.2.1_vue@3.5.38_typescript@5.9.3_/node_modules/element-tree-line/dist/index.es.js
116
+ //#region ../../../node_modules/.pnpm/element-tree-line@0.2.1_vue@3.5.35_typescript@5.9.3_/node_modules/element-tree-line/dist/index.es.js
117
117
  function Pe(e) {
118
118
  return {
119
119
  name: "element-tree-line",
@@ -590,7 +590,7 @@ var Ie = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
590
590
  }
591
591
  }), [["__scopeId", "data-v-9066789c"]]);
592
592
  //#endregion
593
- //#region ../../../node_modules/.pnpm/vue-virtual-scroller@2.0.1_vue@3.5.38_typescript@5.9.3_/node_modules/vue-virtual-scroller/dist/vue-virtual-scroller.js
593
+ //#region ../../../node_modules/.pnpm/vue-virtual-scroller@2.0.1_vue@3.5.35_typescript@5.9.3_/node_modules/vue-virtual-scroller/dist/vue-virtual-scroller.js
594
594
  function Ze(e, t, n) {
595
595
  if (!n) return t;
596
596
  let r = e?.[n];