aibox-custom-component-packages 0.0.12 → 0.0.13
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/ApplicationTypeTag.mjs +1 -1
- package/es/AuthSection.mjs +1 -1
- package/es/AvailableRangePreview.mjs +1 -1
- package/es/AvailableRangeSetting.mjs +3 -3
- package/es/CodeView.mjs +1 -1
- package/es/CommonTagsList.mjs +2 -2
- package/es/CreateMcpForm.mjs +5 -5
- package/es/DocSyncSelect.mjs +1 -1
- package/es/FileUploader.mjs +1 -1
- package/es/McpFormDialog.mjs +6 -6
- package/es/McpParamsSet.mjs +5 -5
- package/es/MdEditor.mjs +1 -1
- package/es/ParameterTable.mjs +3 -3
- package/es/PublishRecord.mjs +1 -1
- package/es/SourcePublish.mjs +5 -5
- package/es/Table.mjs +1 -1
- package/es/assets/CreateMcpForm.css +1 -1
- package/es/assets/McpFormDialog.css +1 -1
- package/es/assets/MdEditor.css +1 -1
- package/es/assets/SourcePublish.css +1 -1
- package/es/chunks/AddOrEditSupplierDialog.BCiXcUBu.js +721 -0
- package/es/chunks/AiboxTable.B_Yli5E8.js +635 -0
- package/es/chunks/ApplicationTypeTag.BbJwXyVa.js +47 -0
- package/es/chunks/AuthSection.CLi8HcIx.js +201 -0
- package/es/chunks/AvailableRangePreview.BgeL_bMq.js +194 -0
- package/es/chunks/AvailableRangeSetting.CGJxgfPT.js +229 -0
- package/es/chunks/CodeView.CWbewuHs.js +148 -0
- package/es/chunks/CommonTagsList.CJdBie2N.js +156 -0
- package/es/chunks/CommonTagsList.NbXVfvLW.js +156 -0
- package/es/chunks/CreateMcpForm.C0HqvD-g.js +308 -0
- package/es/chunks/CreateMcpForm.DSE5jyiW.js +308 -0
- package/es/chunks/DocSyncSelect.DlJXL1lq.js +2290 -0
- package/es/chunks/FileUploader.BSIhrd9M.js +216 -0
- package/es/chunks/McpFormDialog.CDH31D2Q.js +297 -0
- package/es/chunks/McpFormDialog.CgnC1I7i.js +297 -0
- package/es/chunks/McpParamsSet.Bx3aRL9j.js +501 -0
- package/es/chunks/MdEditor.B9-B9aiy.js +163 -0
- package/es/chunks/MdEditor.Bb9S_hso.js +163 -0
- package/es/chunks/ParameterTable.CoRz_932.js +2010 -0
- package/es/chunks/PublishRecord.C0841sJ-.js +133 -0
- package/es/chunks/PublishRecord.C8h1tu3w.js +133 -0
- package/es/chunks/SourcePublish.BhLjt18i.js +972 -0
- package/es/chunks/SourcePublish.FiswtYfr.js +972 -0
- package/es/chunks/SourcePublish.nfXmrVHm.js +972 -0
- package/es/chunks/config.CIQoQGOb.js +35 -0
- package/es/chunks/config.TaUlPTYL.js +270 -0
- package/es/chunks/config.lm2B-n0s.js +270 -0
- package/es/chunks/i18n.CIhVBbR3.js +418 -0
- package/es/index.mjs +20 -20
- package/lib/CommonTagsList.js +1 -1
- package/lib/CreateMcpForm.js +1 -1
- package/lib/McpFormDialog.js +1 -1
- package/lib/MdEditor.js +1 -1
- package/lib/PublishRecord.js +1 -1
- package/lib/SourcePublish.js +1 -1
- package/lib/assets/CreateMcpForm.css +1 -1
- package/lib/assets/McpFormDialog.css +1 -1
- package/lib/assets/MdEditor.css +1 -1
- package/lib/assets/SourcePublish.css +1 -1
- package/lib/chunks/CommonTagsList.QEP4G-Em.js +1 -0
- package/lib/chunks/CreateMcpForm.B2o0Ghjg.js +1 -0
- package/lib/chunks/McpFormDialog.FwXnBBd2.js +6 -0
- package/lib/chunks/MdEditor.Cp24y4DJ.js +1 -0
- package/lib/chunks/PublishRecord.BVndvj7F.js +5 -0
- package/lib/chunks/SourcePublish.BBsNlnp4.js +1 -0
- package/lib/chunks/SourcePublish.CpeV-UOG.js +1 -0
- package/lib/chunks/config.B9Di8LtU.js +1 -0
- package/lib/index.js +1 -1
- package/package.json +6 -5
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { m as e } from "./i18n.CIhVBbR3.js";
|
|
2
|
+
import { t } from "./_plugin-vue_export-helper.Ct3qlEzt.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.dLh4K-0g.js";
|
|
2
|
+
import { m as t } from "./i18n.CIhVBbR3.js";
|
|
3
|
+
import { t as n } from "./_plugin-vue_export-helper.Ct3qlEzt.js";
|
|
4
|
+
import { r } from "./config.CIQoQGOb.js";
|
|
5
|
+
import { t as i } from "./AvailableRangePreview.BgeL_bMq.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.lm2B-n0s.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,156 @@
|
|
|
1
|
+
import { t as e } from "./withinstall.dLh4K-0g.js";
|
|
2
|
+
import { m as t } from "./i18n.CIhVBbR3.js";
|
|
3
|
+
import { t as n } from "./_plugin-vue_export-helper.Ct3qlEzt.js";
|
|
4
|
+
import { r } from "./config.CIQoQGOb.js";
|
|
5
|
+
import { t as i } from "./AvailableRangePreview.BgeL_bMq.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.TaUlPTYL.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 };
|