aibox-custom-component-packages 0.0.21 → 0.0.23
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/AiboxTabs.mjs +71 -0
- package/es/DocSyncSelect.mjs +1 -1
- package/es/ExampleComponent.mjs +35 -0
- package/es/SourcePublish.mjs +1 -1
- package/es/assets/AiboxTabs.css +1 -0
- package/es/assets/BackBar.css +1 -0
- package/es/assets/DocSyncSelect.css +1 -1
- package/es/assets/ExampleComponent.css +1 -0
- package/es/assets/SourcePublish.css +1 -1
- package/es/assets/index.css +1 -0
- package/es/assets/index2.css +1 -0
- package/es/assets/index3.css +1 -0
- package/es/assets/index4.css +1 -0
- package/es/chunks/AiboxTable.CF4T_OCu.js +645 -0
- package/es/chunks/BackBar.Bc2NIuzk.js +645 -0
- package/es/chunks/{DocSyncSelect.DlJXL1lq.js → DocSyncSelect.dhZh4w45.js} +3 -3
- package/es/chunks/{SourcePublish.BjY8OTLS.js → SourcePublish.CjzqOFwj.js} +23 -10
- package/es/chunks/_plugin-vue_export-helper.CHgC5LLL.js +9 -0
- package/es/chunks/config.8htFF04x.js +325 -0
- package/es/chunks/config.BU21Gda2.js +49 -0
- package/es/chunks/config.DPkdwjwD.js +49 -0
- package/es/chunks/config.gNZ_rT87.js +325 -0
- package/es/chunks/enums.CfSBDD6u.js +83 -0
- package/es/chunks/enums.WrpwbF4w.js +14 -0
- package/es/chunks/field-types.CPnMOjle.js +13 -0
- package/es/chunks/files.cduUqjHX.js +16 -0
- package/es/chunks/i18n.DmqkiK-h.js +444 -0
- package/es/chunks/i18n.k9Q_HVMs.js +443 -0
- package/es/chunks/index.BDd6hHiU.js +172 -0
- package/es/chunks/index.CF_YHLP5.js +257 -0
- package/es/chunks/index.DM3o2YX3.js +398 -0
- package/es/chunks/index.Dx-mCS4E.js +1298 -0
- package/es/chunks/index.bCzIhWFw.js +7 -0
- package/es/chunks/index.ml5i7aB5.js +257 -0
- package/es/chunks/layout.CygCXa6s.js +26 -0
- package/es/chunks/publish.D6friivo.js +50 -0
- package/es/chunks/publish.DlD0o09n.js +50 -0
- package/es/chunks/request.24c3shPx.js +5 -0
- package/es/chunks/usePreview.BHvXwaNi.js +157 -0
- package/es/index.mjs +2 -2
- package/lib/AiboxTabs.js +1 -0
- package/lib/DocSyncSelect.js +1 -1
- package/lib/ExampleComponent.js +1 -0
- package/lib/SourcePublish.js +1 -1
- package/lib/assets/AiboxTabs.css +1 -0
- package/lib/assets/BackBar.css +1 -0
- package/lib/assets/DocSyncSelect.css +1 -1
- package/lib/assets/ExampleComponent.css +1 -0
- package/lib/assets/SourcePublish.css +1 -1
- package/lib/assets/index.css +1 -0
- package/lib/assets/index2.css +1 -0
- package/lib/assets/index3.css +1 -0
- package/lib/assets/index4.css +1 -0
- package/lib/chunks/AiboxTable.CJOPGJtU.js +1 -0
- package/lib/chunks/BackBar.CZsNxoX1.js +1 -0
- package/lib/chunks/{DocSyncSelect.1gaXRzps.js → DocSyncSelect.kDNcepY-.js} +2 -2
- package/lib/chunks/SourcePublish.eOSEULjP.js +1 -0
- package/lib/chunks/_plugin-vue_export-helper.BHFhmbuH.js +1 -0
- package/lib/chunks/config.1oaIKLGn.js +1 -0
- package/lib/chunks/config.B0XKkp1w.js +1 -0
- package/lib/chunks/config.BCAuBVxV.js +1 -0
- package/lib/chunks/config.BF7MO0O5.js +1 -0
- package/lib/chunks/enums.Dmq4PdUc.js +1 -0
- package/lib/chunks/enums.DpU2er5r.js +1 -0
- package/lib/chunks/field-types.Ch_2yDfg.js +1 -0
- package/lib/chunks/files.B3-8UC0v.js +1 -0
- package/lib/chunks/i18n.CL5L6nx6.js +1 -0
- package/lib/chunks/i18n.DgOp_D7R.js +1 -0
- package/lib/chunks/index.4hFddClT.js +6 -0
- package/lib/chunks/index.BNivYbtq.js +1 -0
- package/lib/chunks/index.B_keI1Aq.js +1 -0
- package/lib/chunks/index.Bk-RwmaH.js +1 -0
- package/lib/chunks/index.CJFk1R2u.js +59 -0
- package/lib/chunks/index.CkihWzK6.js +1 -0
- package/lib/chunks/layout.DbBSbLgm.js +1 -0
- package/lib/chunks/publish.3TrK3fZf.js +1 -0
- package/lib/chunks/publish.Bw1acrSu.js +1 -0
- package/lib/chunks/request.D8T4MgGX.js +1 -0
- package/lib/chunks/usePreview.BojIDW7Z.js +1 -0
- package/lib/index.js +1 -1
- package/package.json +5 -5
- package/es/chunks/AddOrEditSupplierDialog.BCiXcUBu.js +0 -721
- package/es/chunks/AiboxTable.B_Yli5E8.js +0 -635
- package/es/chunks/ApplicationTypeTag.BbJwXyVa.js +0 -47
- package/es/chunks/AuthSection.CLi8HcIx.js +0 -201
- package/es/chunks/AvailableRangePreview.BgeL_bMq.js +0 -194
- package/es/chunks/AvailableRangeSetting.CGJxgfPT.js +0 -229
- package/es/chunks/CodeView.CWbewuHs.js +0 -148
- package/es/chunks/CommonTagsList.CJdBie2N.js +0 -156
- package/es/chunks/CreateMcpForm.C0HqvD-g.js +0 -308
- package/es/chunks/FileUploader.BSIhrd9M.js +0 -216
- package/es/chunks/McpFormDialog.CDH31D2Q.js +0 -297
- package/es/chunks/McpParamsSet.Bx3aRL9j.js +0 -501
- package/es/chunks/MdEditor.Bb9S_hso.js +0 -163
- package/es/chunks/ParameterTable.CoRz_932.js +0 -2010
- package/es/chunks/PublishRecord.C8h1tu3w.js +0 -133
- package/es/chunks/SourcePublish.CebmryAz.js +0 -966
- package/es/chunks/SourcePublish.Dk7O9GzI.js +0 -968
- package/es/chunks/config.CIQoQGOb.js +0 -35
- package/es/chunks/config.lm2B-n0s.js +0 -270
- package/es/chunks/i18n.CIhVBbR3.js +0 -418
- package/lib/chunks/AddOrEditSupplierDialog.XtPxc5yr.js +0 -1
- package/lib/chunks/AiboxTable.DFyqwoGc.js +0 -1
- package/lib/chunks/ApplicationTypeTag.CZReMt-9.js +0 -1
- package/lib/chunks/AuthSection.CP9c-YTW.js +0 -1
- package/lib/chunks/AvailableRangePreview.DvREyHNH.js +0 -1
- package/lib/chunks/AvailableRangeSetting.DDHTOLJA.js +0 -1
- package/lib/chunks/CodeView.DeBxLqyC.js +0 -1
- package/lib/chunks/CommonTagsList.QEP4G-Em.js +0 -1
- package/lib/chunks/CreateMcpForm.B2o0Ghjg.js +0 -1
- package/lib/chunks/FileUploader.6IW_QL-h.js +0 -1
- package/lib/chunks/McpFormDialog.FwXnBBd2.js +0 -6
- package/lib/chunks/McpParamsSet.BYrxVvDL.js +0 -1
- package/lib/chunks/MdEditor.Cp24y4DJ.js +0 -1
- package/lib/chunks/ParameterTable.CeufAEXh.js +0 -1
- package/lib/chunks/PublishRecord.BVndvj7F.js +0 -5
- package/lib/chunks/SourcePublish.Bz8MaRPm.js +0 -1
- package/lib/chunks/SourcePublish.I7ORXPok.js +0 -1
- package/lib/chunks/SourcePublish.OeB6i-Iu.js +0 -1
- package/lib/chunks/config.B9Di8LtU.js +0 -1
- package/lib/chunks/config.CZl1kYtI.js +0 -1
- package/lib/chunks/i18n.BGe5gOau.js +0 -1
|
@@ -1,201 +0,0 @@
|
|
|
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 { t as r } from "./RadioGroup.Czc1JtkN.js";
|
|
5
|
-
import { computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createTextVNode as l, createVNode as u, normalizeClass as d, openBlock as f, ref as p, toDisplayString as m, unref as h, vShow as g, watch as _, withCtx as v, withDirectives as y } from "vue";
|
|
6
|
-
import { ElIcon as b, ElInput as x, ElTooltip as S } from "element-plus";
|
|
7
|
-
import { IconTip as C } from "color-message-aibox-vue";
|
|
8
|
-
import '../assets/AuthSection.css';//#region components/AuthSection/AuthSection.vue
|
|
9
|
-
var w = { class: "auth-section" }, T = {
|
|
10
|
-
key: 2,
|
|
11
|
-
class: "auth-input-field"
|
|
12
|
-
}, E = { class: "field-label" }, D = {
|
|
13
|
-
key: 3,
|
|
14
|
-
class: "auth-input-field"
|
|
15
|
-
}, O = { class: "field-label" }, k = e(/* @__PURE__ */ n(/* @__PURE__ */ Object.assign({ name: "AuthSection" }, {
|
|
16
|
-
__name: "AuthSection",
|
|
17
|
-
props: {
|
|
18
|
-
layout: {
|
|
19
|
-
type: String,
|
|
20
|
-
default: "horizontal"
|
|
21
|
-
},
|
|
22
|
-
featData: {
|
|
23
|
-
type: Object,
|
|
24
|
-
default: () => ({ auth: {} })
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
emits: [
|
|
28
|
-
"update:featData",
|
|
29
|
-
"auth-validation-errors",
|
|
30
|
-
"resetDebugStatus"
|
|
31
|
-
],
|
|
32
|
-
setup(e, { expose: n, emit: k }) {
|
|
33
|
-
let { t: A } = t(), j = e, M = i({
|
|
34
|
-
get: () => j.featData,
|
|
35
|
-
set: (e) => N("update:featData", e)
|
|
36
|
-
}), N = k, P = () => {
|
|
37
|
-
N("resetDebugStatus");
|
|
38
|
-
}, F = [{
|
|
39
|
-
value: "none",
|
|
40
|
-
label: A("COMMON_AUTHSECTION.LABEL_NO_AUTH")
|
|
41
|
-
}, {
|
|
42
|
-
value: "apiKey",
|
|
43
|
-
label: A("COMMON_AUTHSECTION.LABEL_API_KEY")
|
|
44
|
-
}], I = [{
|
|
45
|
-
value: "bearer",
|
|
46
|
-
label: A("COMMON_AUTHSECTION.LABEL_BEARER")
|
|
47
|
-
}, {
|
|
48
|
-
value: "custom",
|
|
49
|
-
label: A("COMMON_AUTHSECTION.LABEL_CUSTOM")
|
|
50
|
-
}], L = [{
|
|
51
|
-
value: "header",
|
|
52
|
-
label: A("COMMON_AUTHSECTION.LABEL_KEY_LOCATION_HEADER")
|
|
53
|
-
}, {
|
|
54
|
-
value: "query",
|
|
55
|
-
label: A("COMMON_AUTHSECTION.LABEL_KEY_LOCATION_QUERY")
|
|
56
|
-
}], R = (e) => {
|
|
57
|
-
P(), V.value = {}, e === "apiKey" ? M.value.auth = {
|
|
58
|
-
authType: "apiKey",
|
|
59
|
-
keyType: "custom",
|
|
60
|
-
paramLocation: "header",
|
|
61
|
-
paramName: "",
|
|
62
|
-
paramValue: "",
|
|
63
|
-
token: ""
|
|
64
|
-
} : M.value.auth = { authType: "none" };
|
|
65
|
-
}, z = (e) => {
|
|
66
|
-
P(), V.value = {}, e === "bearer" ? (M.value.auth.paramName = "", M.value.auth.paramValue = "") : e === "custom" && (M.value.auth.token = "");
|
|
67
|
-
}, B = (e) => {
|
|
68
|
-
console.log(e, "value"), P(), V.value = {}, e === "query" && (M.value.auth.token = "", M.value.auth.keyType = "custom");
|
|
69
|
-
}, V = p({}), H = () => (P(), V.value = {}, M.value.auth.authType === "apiKey" && (M.value.auth.keyType === "custom" && (M.value.auth.paramName || (V.value.paramName = !0)), M.value.auth.keyType === "custom" && (M.value.auth.paramValue || (V.value.paramValue = !0)), M.value.auth.keyType === "bearer" && (M.value.auth.token || (V.value.token = !0))), V.value);
|
|
70
|
-
return _(() => V.value, () => {
|
|
71
|
-
N("auth-validation-errors", V.value);
|
|
72
|
-
}), n({ validateField: H }), (t, n) => (f(), s("div", w, [
|
|
73
|
-
u(h(r), {
|
|
74
|
-
modelValue: M.value.auth.authType,
|
|
75
|
-
"onUpdate:modelValue": n[0] ||= (e) => M.value.auth.authType = e,
|
|
76
|
-
options: F,
|
|
77
|
-
label: h(A)("COMMON_AUTHSECTION.LABEL_AUTH_TYPE"),
|
|
78
|
-
required: !0,
|
|
79
|
-
className: "auth-radio-group",
|
|
80
|
-
layout: e.layout,
|
|
81
|
-
onChange: R
|
|
82
|
-
}, null, 8, [
|
|
83
|
-
"modelValue",
|
|
84
|
-
"label",
|
|
85
|
-
"layout"
|
|
86
|
-
]),
|
|
87
|
-
M.value.auth.authType === "apiKey" ? (f(), a(h(r), {
|
|
88
|
-
key: 0,
|
|
89
|
-
modelValue: M.value.auth.paramLocation,
|
|
90
|
-
"onUpdate:modelValue": n[1] ||= (e) => M.value.auth.paramLocation = e,
|
|
91
|
-
options: L,
|
|
92
|
-
label: h(A)("COMMON_AUTHSECTION.LABEL_KEY_LOCATION"),
|
|
93
|
-
"tip-text": h(A)("COMMON_AUTHSECTION.LABEL_KEY_LOCATION_TIP"),
|
|
94
|
-
required: !0,
|
|
95
|
-
className: "location-radio-group",
|
|
96
|
-
layout: e.layout,
|
|
97
|
-
onChange: B
|
|
98
|
-
}, null, 8, [
|
|
99
|
-
"modelValue",
|
|
100
|
-
"label",
|
|
101
|
-
"tip-text",
|
|
102
|
-
"layout"
|
|
103
|
-
])) : o("", !0),
|
|
104
|
-
M.value.auth.authType === "apiKey" && M.value.auth.paramLocation === "header" ? (f(), a(h(r), {
|
|
105
|
-
key: 1,
|
|
106
|
-
modelValue: M.value.auth.keyType,
|
|
107
|
-
"onUpdate:modelValue": n[2] ||= (e) => M.value.auth.keyType = e,
|
|
108
|
-
options: I,
|
|
109
|
-
label: h(A)("COMMON_AUTHSECTION.LABEL_KEY_TYPE"),
|
|
110
|
-
"tip-text": h(A)("COMMON_AUTHSECTION.LABEL_KEY_TYPE_TIP"),
|
|
111
|
-
required: !0,
|
|
112
|
-
className: "key-radio-group",
|
|
113
|
-
layout: e.layout,
|
|
114
|
-
onChange: z
|
|
115
|
-
}, null, 8, [
|
|
116
|
-
"modelValue",
|
|
117
|
-
"label",
|
|
118
|
-
"tip-text",
|
|
119
|
-
"layout"
|
|
120
|
-
])) : o("", !0),
|
|
121
|
-
M.value.auth.authType === "apiKey" && M.value.auth.keyType === "custom" ? (f(), s("div", T, [c("div", E, [
|
|
122
|
-
n[6] ||= c("span", { class: "required" }, "*", -1),
|
|
123
|
-
l(" " + m(h(A)("COMMON_AUTHSECTION.LABEL_KEY_NAME")) + " ", 1),
|
|
124
|
-
u(h(S), {
|
|
125
|
-
content: h(A)("COMMON_AUTHSECTION.LABEL_KEY_NAME_TIP"),
|
|
126
|
-
placement: "top"
|
|
127
|
-
}, {
|
|
128
|
-
default: v(() => [u(h(b), {
|
|
129
|
-
style: { "margin-left": "4px" },
|
|
130
|
-
size: "14px",
|
|
131
|
-
color: "#999"
|
|
132
|
-
}, {
|
|
133
|
-
default: v(() => [u(h(C))]),
|
|
134
|
-
_: 1
|
|
135
|
-
})]),
|
|
136
|
-
_: 1
|
|
137
|
-
}, 8, ["content"])
|
|
138
|
-
]), u(h(x), {
|
|
139
|
-
modelValue: M.value.auth.paramName,
|
|
140
|
-
"onUpdate:modelValue": n[3] ||= (e) => M.value.auth.paramName = e,
|
|
141
|
-
placeholder: h(A)("COMMON_AUTHSECTION.LABEL_KEY_NAME_PLACEHOLDER"),
|
|
142
|
-
maxlength: "64",
|
|
143
|
-
"show-word-limit": "",
|
|
144
|
-
class: d(["key-input", { "error-input": V.value.paramName }]),
|
|
145
|
-
onBlur: H
|
|
146
|
-
}, null, 8, [
|
|
147
|
-
"modelValue",
|
|
148
|
-
"placeholder",
|
|
149
|
-
"class"
|
|
150
|
-
])])) : o("", !0),
|
|
151
|
-
M.value.auth.authType === "apiKey" ? (f(), s("div", D, [
|
|
152
|
-
c("div", O, [
|
|
153
|
-
n[7] ||= c("span", { class: "required" }, "*", -1),
|
|
154
|
-
l(" " + m(h(A)("COMMON_AUTHSECTION.LABEL_KEY_VALUE")) + " ", 1),
|
|
155
|
-
u(h(S), {
|
|
156
|
-
content: h(A)("COMMON_AUTHSECTION.LABEL_KEY_VALUE_TIP"),
|
|
157
|
-
placement: "top"
|
|
158
|
-
}, {
|
|
159
|
-
default: v(() => [u(h(b), {
|
|
160
|
-
style: { "margin-left": "4px" },
|
|
161
|
-
size: "14px",
|
|
162
|
-
color: "#999"
|
|
163
|
-
}, {
|
|
164
|
-
default: v(() => [u(h(C))]),
|
|
165
|
-
_: 1
|
|
166
|
-
})]),
|
|
167
|
-
_: 1
|
|
168
|
-
}, 8, ["content"])
|
|
169
|
-
]),
|
|
170
|
-
y(u(h(x), {
|
|
171
|
-
modelValue: M.value.auth.paramValue,
|
|
172
|
-
"onUpdate:modelValue": n[4] ||= (e) => M.value.auth.paramValue = e,
|
|
173
|
-
placeholder: h(A)("COMMON_AUTHSECTION.LABEL_KEY_VALUE_PLACEHOLDER"),
|
|
174
|
-
maxlength: "20000",
|
|
175
|
-
"show-word-limit": "",
|
|
176
|
-
class: d(["key-input", { "error-input": V.value.paramValue }]),
|
|
177
|
-
onBlur: H
|
|
178
|
-
}, null, 8, [
|
|
179
|
-
"modelValue",
|
|
180
|
-
"placeholder",
|
|
181
|
-
"class"
|
|
182
|
-
]), [[g, M.value.auth.keyType === "custom"]]),
|
|
183
|
-
y(u(h(x), {
|
|
184
|
-
modelValue: M.value.auth.token,
|
|
185
|
-
"onUpdate:modelValue": n[5] ||= (e) => M.value.auth.token = e,
|
|
186
|
-
placeholder: h(A)("COMMON_AUTHSECTION.LABEL_KEY_VALUE_PLACEHOLDER"),
|
|
187
|
-
maxlength: "20000",
|
|
188
|
-
"show-word-limit": "",
|
|
189
|
-
class: d(["key-input", { "error-input": V.value.token }]),
|
|
190
|
-
onBlur: H
|
|
191
|
-
}, null, 8, [
|
|
192
|
-
"modelValue",
|
|
193
|
-
"placeholder",
|
|
194
|
-
"class"
|
|
195
|
-
]), [[g, M.value.auth.keyType === "bearer"]])
|
|
196
|
-
])) : o("", !0)
|
|
197
|
-
]));
|
|
198
|
-
}
|
|
199
|
-
}), [["__scopeId", "data-v-6b26c051"]]));
|
|
200
|
-
//#endregion
|
|
201
|
-
export { k as t };
|
|
@@ -1,194 +0,0 @@
|
|
|
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 { i as r, n as i, o as a, t as o } from "./config.CIQoQGOb.js";
|
|
5
|
-
import { Fragment as s, computed as c, createBlock as l, createCommentVNode as u, createElementBlock as d, createElementVNode as f, createTextVNode as p, createVNode as m, nextTick as h, normalizeClass as g, onMounted as _, openBlock as v, ref as y, renderList as b, toDisplayString as x, unref as S, watch as C, withCtx as w } from "vue";
|
|
6
|
-
import { ElButton as T, ElPopover as E } from "element-plus";
|
|
7
|
-
import '../assets/AvailableRangePreview.css';//#region components/AvailableRangePreview/TagList.vue
|
|
8
|
-
var D = {
|
|
9
|
-
key: 0,
|
|
10
|
-
class: "pd-l-16 text-dee0e3 pd-r-16"
|
|
11
|
-
}, O = { class: "fz-14 text-646a73 nowrap" }, k = { class: "tag-item nowrap fz-12 pd-l-8 pd-r-8 radius-4 bg-eaf0fe text-3271fe pointer" }, A = { class: "tag-list-popover overflow-y-auto flex gap-4 flex-wrap" }, j = /* @__PURE__ */ n({
|
|
12
|
-
__name: "TagList",
|
|
13
|
-
props: {
|
|
14
|
-
label: {
|
|
15
|
-
type: String,
|
|
16
|
-
required: !0
|
|
17
|
-
},
|
|
18
|
-
items: {
|
|
19
|
-
type: Array,
|
|
20
|
-
default: () => []
|
|
21
|
-
},
|
|
22
|
-
readonly: {
|
|
23
|
-
type: Boolean,
|
|
24
|
-
default: !1
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
setup(e) {
|
|
28
|
-
let t = e, n = c(() => t.readonly ? t.items : t.items.slice(0, o.one)), r = c(() => t.items.length > o.one), i = c(() => t.items.length - o.one), a = c(() => t.items.slice(o.one));
|
|
29
|
-
return (t, o) => e.items.length > 0 ? (v(), d(s, { key: 0 }, [
|
|
30
|
-
e.readonly ? u("", !0) : (v(), d("span", D, "|")),
|
|
31
|
-
f("span", O, x(e.label), 1),
|
|
32
|
-
f("div", { class: g(["tag-list", { "flex items-center gap-4": !e.readonly }]) }, [(v(!0), d(s, null, b(n.value, (t) => (v(), d("div", {
|
|
33
|
-
key: t.memberId,
|
|
34
|
-
class: g(["tag-item fz-12 pd-l-8 pd-r-8 radius-4 bg-eaf0fe text-3271fe nowrap", { "mg-r-4 mg-b-4": e.readonly }])
|
|
35
|
-
}, x(t.memberName), 3))), 128)), !e.readonly && r.value ? (v(), l(S(E), {
|
|
36
|
-
key: 0,
|
|
37
|
-
placement: "top",
|
|
38
|
-
trigger: "click",
|
|
39
|
-
width: "300",
|
|
40
|
-
"popper-class": "tag-list-popover-wrapper"
|
|
41
|
-
}, {
|
|
42
|
-
reference: w(() => [f("span", k, " +" + x(i.value), 1)]),
|
|
43
|
-
default: w(() => [f("div", A, [(v(!0), d(s, null, b(a.value, (e) => (v(), d("span", {
|
|
44
|
-
key: e.memberId,
|
|
45
|
-
class: "tag-item nowrap fz-12 pd-l-8 pd-r-8 radius-4 bg-eaf0fe text-3271fe"
|
|
46
|
-
}, x(e.memberName), 1))), 128))])]),
|
|
47
|
-
_: 1
|
|
48
|
-
})) : u("", !0)], 2)
|
|
49
|
-
], 64)) : u("", !0);
|
|
50
|
-
}
|
|
51
|
-
}, [["__scopeId", "data-v-a2c44011"]]), M = (e, t) => e?.filter(t) || [], N = (e, t) => M(e, (e) => e.memberType === t), P = (e, t) => {
|
|
52
|
-
if (e.children) for (let n of e.children) n.memberType === i.MEMBER ? t(n) : n.memberType === i.DEPARTMENT && P(n, t);
|
|
53
|
-
}, F = (e) => {
|
|
54
|
-
let t = [];
|
|
55
|
-
return P(e, (e) => t.push(e.memberId)), t;
|
|
56
|
-
};
|
|
57
|
-
function I(e, t, n = !1) {
|
|
58
|
-
let r = c(() => {
|
|
59
|
-
if (!e.value) return [];
|
|
60
|
-
let n = [...e.value], r = N(n, i.DEPARTMENT);
|
|
61
|
-
if (r.length > 0 && t.value && t.value.length > 0) {
|
|
62
|
-
let e = /* @__PURE__ */ new Set();
|
|
63
|
-
r.forEach((n) => {
|
|
64
|
-
let r = (t) => {
|
|
65
|
-
for (let a of t) if (a.memberType === i.DEPARTMENT && a.memberId === n.memberId) return P(a, (t) => e.add(t)), !0;
|
|
66
|
-
else if (a.children && r(a.children)) return !0;
|
|
67
|
-
return !1;
|
|
68
|
-
};
|
|
69
|
-
r(t.value);
|
|
70
|
-
});
|
|
71
|
-
let a = new Set(N(n, i.MEMBER).map((e) => e.memberId));
|
|
72
|
-
e.forEach((e) => {
|
|
73
|
-
a.has(e.memberId) || n.push(e);
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
return n;
|
|
77
|
-
}), a = c(() => {
|
|
78
|
-
if (n) return N(r.value, i.MEMBER);
|
|
79
|
-
{
|
|
80
|
-
let e = /* @__PURE__ */ new Set();
|
|
81
|
-
return o.value.forEach((t) => {
|
|
82
|
-
F(t).forEach((t) => e.add(t));
|
|
83
|
-
}), M(r.value, (t) => t.memberType === i.MEMBER && !e.has(t.memberId));
|
|
84
|
-
}
|
|
85
|
-
}), o = c(() => {
|
|
86
|
-
if (n) return N(r.value, i.DEPARTMENT);
|
|
87
|
-
{
|
|
88
|
-
let e = [], n = (e) => {
|
|
89
|
-
if (!e.children || e.children.length === 0) return !1;
|
|
90
|
-
let t = F(e);
|
|
91
|
-
return t.length === 0 ? !1 : t.every((e) => r.value.some((t) => t.memberType === i.MEMBER && t.memberId === e));
|
|
92
|
-
}, a = (t, r = !1) => {
|
|
93
|
-
if (t.memberType === i.DEPARTMENT) {
|
|
94
|
-
let o = n(t);
|
|
95
|
-
if (o && !r) {
|
|
96
|
-
if (e.push({
|
|
97
|
-
memberId: t.memberId,
|
|
98
|
-
memberName: t.memberName,
|
|
99
|
-
memberType: i.DEPARTMENT,
|
|
100
|
-
bnid: t.bnid,
|
|
101
|
-
children: t.children
|
|
102
|
-
}), t.children) for (let e of t.children) a(e, !0);
|
|
103
|
-
} else if (!o && t.children) for (let e of t.children) a(e, !1);
|
|
104
|
-
}
|
|
105
|
-
};
|
|
106
|
-
for (let e of t.value) a(e, !1);
|
|
107
|
-
return e;
|
|
108
|
-
}
|
|
109
|
-
});
|
|
110
|
-
return {
|
|
111
|
-
selectedMembers: a,
|
|
112
|
-
selectedDepartments: o
|
|
113
|
-
};
|
|
114
|
-
}
|
|
115
|
-
//#endregion
|
|
116
|
-
//#region components/AvailableRangePreview/layout.vue
|
|
117
|
-
var L = { class: "text-1f2329" }, R = { class: "fz-14 text-1f2329" }, z = e({
|
|
118
|
-
__name: "layout",
|
|
119
|
-
props: {
|
|
120
|
-
allVisible: {
|
|
121
|
-
type: Boolean,
|
|
122
|
-
default: r.ALL
|
|
123
|
-
},
|
|
124
|
-
modelValue: {
|
|
125
|
-
type: Array,
|
|
126
|
-
default: () => []
|
|
127
|
-
},
|
|
128
|
-
treeList: {
|
|
129
|
-
type: Array,
|
|
130
|
-
default: () => []
|
|
131
|
-
},
|
|
132
|
-
readonly: {
|
|
133
|
-
type: Boolean,
|
|
134
|
-
default: !1
|
|
135
|
-
}
|
|
136
|
-
},
|
|
137
|
-
setup(e, { expose: n }) {
|
|
138
|
-
let { t: i } = t(), o = y(null), b = () => {
|
|
139
|
-
o.value && h(() => {
|
|
140
|
-
o.value.scrollIntoView({
|
|
141
|
-
behavior: "smooth",
|
|
142
|
-
block: "center"
|
|
143
|
-
});
|
|
144
|
-
});
|
|
145
|
-
}, E = e, { selectedMembers: D, selectedDepartments: O } = I(c(() => E.modelValue), c(() => E.treeList), E.readonly), k = c(() => [...D.value, ...O.value]);
|
|
146
|
-
return C(() => [E.allVisible, E.modelValue], () => {
|
|
147
|
-
b();
|
|
148
|
-
}, {
|
|
149
|
-
immediate: !1,
|
|
150
|
-
deep: !0
|
|
151
|
-
}), _(() => {
|
|
152
|
-
b();
|
|
153
|
-
}), n({ allSelectedItems: k }), (t, n) => (v(), d("div", {
|
|
154
|
-
ref_key: "previewRef",
|
|
155
|
-
ref: o,
|
|
156
|
-
class: g(["available-range-preview w-full overflow-hidden", { "flex items-center": !e.readonly }])
|
|
157
|
-
}, [e.readonly ? u("", !0) : (v(), d(s, { key: 0 }, [
|
|
158
|
-
f("div", L, x(S(i)("COMMON_DICT.ENUMS.AVAILABLE_RANGE")) + ": ", 1),
|
|
159
|
-
f("span", R, x(S(a).find((t) => t.value === e.allVisible)?.label), 1),
|
|
160
|
-
m(S(T), {
|
|
161
|
-
class: "mg-l-16",
|
|
162
|
-
type: "primary",
|
|
163
|
-
link: "",
|
|
164
|
-
onClick: n[0] ||= (e) => t.$emit("edit")
|
|
165
|
-
}, {
|
|
166
|
-
default: w(() => [p(x(S(i)("COMMON_BUTTON.EDIT_TEXT")), 1)]),
|
|
167
|
-
_: 1
|
|
168
|
-
})
|
|
169
|
-
], 64)), e.allVisible === S(r).PARTIAL ? (v(), d("div", {
|
|
170
|
-
key: 1,
|
|
171
|
-
class: g(["flex-1 overflow-hidden", { "flex items-center": !e.readonly }])
|
|
172
|
-
}, [S(D)?.length ? (v(), l(j, {
|
|
173
|
-
key: 0,
|
|
174
|
-
label: S(i)("COMMON_DICT.ENUMS.MEMBER") + ":",
|
|
175
|
-
items: S(D),
|
|
176
|
-
readonly: e.readonly
|
|
177
|
-
}, null, 8, [
|
|
178
|
-
"label",
|
|
179
|
-
"items",
|
|
180
|
-
"readonly"
|
|
181
|
-
])) : u("", !0), S(O)?.length ? (v(), l(j, {
|
|
182
|
-
key: 1,
|
|
183
|
-
label: S(i)("COMMON_DICT.ENUMS.DEPARTMENT") + ":",
|
|
184
|
-
items: S(O),
|
|
185
|
-
readonly: e.readonly
|
|
186
|
-
}, null, 8, [
|
|
187
|
-
"label",
|
|
188
|
-
"items",
|
|
189
|
-
"readonly"
|
|
190
|
-
])) : u("", !0)], 2)) : u("", !0)], 2));
|
|
191
|
-
}
|
|
192
|
-
}), B = e(j);
|
|
193
|
-
//#endregion
|
|
194
|
-
export { B as n, I as r, z as t };
|
|
@@ -1,229 +0,0 @@
|
|
|
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 "./request.CfOHcfgX.js";
|
|
4
|
-
import { n as r, t as i } from "./DialogContainer.DL7aTMDS.js";
|
|
5
|
-
import { a, i as o, o as s } from "./config.CIQoQGOb.js";
|
|
6
|
-
import { r as c, t as l } from "./AvailableRangePreview.BgeL_bMq.js";
|
|
7
|
-
import { Fragment as u, computed as d, createBlock as f, createCommentVNode as p, createElementBlock as m, createElementVNode as h, createTextVNode as g, createVNode as _, nextTick as v, onMounted as y, openBlock as b, ref as x, renderList as S, toDisplayString as C, unref as w, watch as T, withCtx as E } from "vue";
|
|
8
|
-
import { ElButton as D, ElMessage as O, ElRadio as k, ElRadioGroup as A } from "element-plus";
|
|
9
|
-
import { TreeShowSelect as j } from "color-star-custom-components";
|
|
10
|
-
import { emitsMap as M } from "color-star-custom-methods";
|
|
11
|
-
//#region components/AvailableRangeSetting/Dialog.vue
|
|
12
|
-
var N = { class: "dialog-content" }, P = {
|
|
13
|
-
key: 0,
|
|
14
|
-
class: "selection-area overflow-hidden"
|
|
15
|
-
}, F = { class: "dialog-footer" }, I = {
|
|
16
|
-
__name: "Dialog",
|
|
17
|
-
props: {
|
|
18
|
-
visible: {
|
|
19
|
-
type: Boolean,
|
|
20
|
-
default: !1
|
|
21
|
-
},
|
|
22
|
-
allVisible: {
|
|
23
|
-
type: Boolean,
|
|
24
|
-
default: o.ALL
|
|
25
|
-
},
|
|
26
|
-
modelValue: {
|
|
27
|
-
type: Array,
|
|
28
|
-
default: () => []
|
|
29
|
-
},
|
|
30
|
-
treeList: {
|
|
31
|
-
type: Array,
|
|
32
|
-
default: () => []
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
emits: [
|
|
36
|
-
M.updateVisible,
|
|
37
|
-
M.save,
|
|
38
|
-
M.cancel
|
|
39
|
-
],
|
|
40
|
-
setup(e, { emit: n }) {
|
|
41
|
-
let { t: l } = t(), y = e, I = n, { showDialog: L, dialogRef: R } = r(), z = x(y.allVisible), B = x([...y.modelValue]), V = x(), { selectedMembers: H, selectedDepartments: U } = c(B, d(() => y.treeList), !1);
|
|
42
|
-
T(() => y.visible, (e) => {
|
|
43
|
-
e && v(() => {
|
|
44
|
-
L();
|
|
45
|
-
});
|
|
46
|
-
}, { immediate: !0 });
|
|
47
|
-
let W = d(() => {
|
|
48
|
-
let e = [];
|
|
49
|
-
return U.value.forEach((t) => {
|
|
50
|
-
e.push({
|
|
51
|
-
...t,
|
|
52
|
-
children: void 0
|
|
53
|
-
});
|
|
54
|
-
}), H.value.forEach((t) => {
|
|
55
|
-
e.push({
|
|
56
|
-
...t,
|
|
57
|
-
children: void 0
|
|
58
|
-
});
|
|
59
|
-
}), e;
|
|
60
|
-
}), G = (e) => {
|
|
61
|
-
z.value = e, e === o.ALL && (B.value = []);
|
|
62
|
-
}, K = (e) => {
|
|
63
|
-
let { selectedNode: t } = e;
|
|
64
|
-
B.value = t || [];
|
|
65
|
-
}, q = () => {
|
|
66
|
-
I(M.cancel), I(M.updateVisible, !1);
|
|
67
|
-
}, J = () => {
|
|
68
|
-
if (z.value === o.PARTIAL && !B.value.length) {
|
|
69
|
-
O.warning(l("COMMON_DICT.ENUMS.AVAILABLE_RANGE_EMPTY_TIP"));
|
|
70
|
-
return;
|
|
71
|
-
}
|
|
72
|
-
I(M.save, {
|
|
73
|
-
type: z.value,
|
|
74
|
-
selectedItems: [...B.value]
|
|
75
|
-
}), I(M.updateVisible, !1);
|
|
76
|
-
};
|
|
77
|
-
return (t, n) => (b(), f(w(i), {
|
|
78
|
-
ref_key: "dialogRef",
|
|
79
|
-
ref: R,
|
|
80
|
-
title: w(l)("COMMON_DICT.ENUMS.AVAILABLE_RANGE_SETTING"),
|
|
81
|
-
onClose: q
|
|
82
|
-
}, {
|
|
83
|
-
footer: E(() => [h("div", F, [_(w(D), {
|
|
84
|
-
onClick: q,
|
|
85
|
-
plain: ""
|
|
86
|
-
}, {
|
|
87
|
-
default: E(() => [g(C(w(l)("COMMON_BUTTON.CANCEL_TEXT")), 1)]),
|
|
88
|
-
_: 1
|
|
89
|
-
}), _(w(D), {
|
|
90
|
-
type: "primary",
|
|
91
|
-
onClick: J
|
|
92
|
-
}, {
|
|
93
|
-
default: E(() => [g(C(w(l)("COMMON_BUTTON.SAVE_TEXT")), 1)]),
|
|
94
|
-
_: 1
|
|
95
|
-
})])]),
|
|
96
|
-
default: E(() => [h("div", N, [_(w(A), {
|
|
97
|
-
class: "pd-b-16",
|
|
98
|
-
modelValue: z.value,
|
|
99
|
-
"onUpdate:modelValue": n[0] ||= (e) => z.value = e,
|
|
100
|
-
onChange: G
|
|
101
|
-
}, {
|
|
102
|
-
default: E(() => [(b(!0), m(u, null, S(w(s), (e) => (b(), f(w(k), {
|
|
103
|
-
key: e.value,
|
|
104
|
-
value: e.value
|
|
105
|
-
}, {
|
|
106
|
-
default: E(() => [g(C(e.label), 1)]),
|
|
107
|
-
_: 2
|
|
108
|
-
}, 1032, ["value"]))), 128))]),
|
|
109
|
-
_: 1
|
|
110
|
-
}, 8, ["modelValue"]), z.value === w(o).PARTIAL ? (b(), m("div", P, [_(w(j), {
|
|
111
|
-
modelValue: B.value,
|
|
112
|
-
"onUpdate:modelValue": n[1] ||= (e) => B.value = e,
|
|
113
|
-
ref_key: "treeRef",
|
|
114
|
-
ref: V,
|
|
115
|
-
treeProps: w(a),
|
|
116
|
-
treeList: e.treeList,
|
|
117
|
-
hasFilter: !0,
|
|
118
|
-
rightTreeList: W.value,
|
|
119
|
-
itemUnitName: w(l)("COMMON_DICT.ENUMS.ITEM_UNIT_NAME"),
|
|
120
|
-
style: { height: "500px" },
|
|
121
|
-
onGetCheckedNode: K
|
|
122
|
-
}, null, 8, [
|
|
123
|
-
"modelValue",
|
|
124
|
-
"treeProps",
|
|
125
|
-
"treeList",
|
|
126
|
-
"rightTreeList",
|
|
127
|
-
"itemUnitName"
|
|
128
|
-
])])) : p("", !0)])]),
|
|
129
|
-
_: 1
|
|
130
|
-
}, 8, ["title"]));
|
|
131
|
-
}
|
|
132
|
-
}, L = () => {
|
|
133
|
-
let { $request: e, $env: t } = n();
|
|
134
|
-
return { availableRangeApi: () => e({
|
|
135
|
-
url: `${t.VITE_APP_AUTH_BASE_URL}/api/v1/admin/member/search`,
|
|
136
|
-
method: "get"
|
|
137
|
-
}) };
|
|
138
|
-
}, R = { class: "available-range-setting w-full" }, z = e(/* @__PURE__ */ Object.assign({ name: "AvailableRangeSetting" }, {
|
|
139
|
-
__name: "layout",
|
|
140
|
-
props: {
|
|
141
|
-
allVisible: {
|
|
142
|
-
type: Boolean,
|
|
143
|
-
default: o.ALL
|
|
144
|
-
},
|
|
145
|
-
modelValue: {
|
|
146
|
-
type: Array,
|
|
147
|
-
default: () => []
|
|
148
|
-
}
|
|
149
|
-
},
|
|
150
|
-
emits: [
|
|
151
|
-
M.updateAllVisible,
|
|
152
|
-
M.updateModelValue,
|
|
153
|
-
M.change
|
|
154
|
-
],
|
|
155
|
-
setup(e, { expose: t, emit: n }) {
|
|
156
|
-
let r = e, { availableRangeApi: i } = L(), a = n, o = x(!1), s = x(!1), c = x([]), u = x(r.allVisible), d = x(r.modelValue), h = x(new Set(d.value?.map((e) => e.memberId))), g = () => {
|
|
157
|
-
s.value = !0, i().then((e) => {
|
|
158
|
-
c.value = e?.data?.orgOptionSoList || [];
|
|
159
|
-
}).finally(() => {
|
|
160
|
-
s.value = !1;
|
|
161
|
-
});
|
|
162
|
-
}, v = () => {
|
|
163
|
-
o.value = !0;
|
|
164
|
-
}, S = (e) => {
|
|
165
|
-
u.value = e.type, d.value = e.selectedItems, h.value.clear(), d.value.forEach((e) => {
|
|
166
|
-
h.value.add(e.memberId);
|
|
167
|
-
}), a(M.updateAllVisible, u.value), a(M.updateModelValue, d.value), E();
|
|
168
|
-
}, C = () => {
|
|
169
|
-
o.value = !1;
|
|
170
|
-
}, E = () => {
|
|
171
|
-
let e = {
|
|
172
|
-
allVisible: u.value,
|
|
173
|
-
selectedItems: d.value
|
|
174
|
-
};
|
|
175
|
-
a(M.change, e);
|
|
176
|
-
}, D = x(null);
|
|
177
|
-
return T(() => r.allVisible, (e) => {
|
|
178
|
-
u.value = e;
|
|
179
|
-
}, { immediate: !0 }), T(() => r.modelValue, (e) => {
|
|
180
|
-
d.value = e || [], h.value.clear(), d.value.forEach((e) => {
|
|
181
|
-
h.value.add(e.memberId);
|
|
182
|
-
});
|
|
183
|
-
}, { immediate: !0 }), y(() => {
|
|
184
|
-
g();
|
|
185
|
-
}), t({ getSelectedItems: () => {
|
|
186
|
-
let e = D.value?.allSelectedItems || [];
|
|
187
|
-
return {
|
|
188
|
-
allVisible: u.value,
|
|
189
|
-
visibleScope: e.map((e) => ({
|
|
190
|
-
memberId: e.memberId,
|
|
191
|
-
memberName: e.memberName,
|
|
192
|
-
memberType: e.memberType,
|
|
193
|
-
bnid: e.bnid
|
|
194
|
-
}))
|
|
195
|
-
};
|
|
196
|
-
} }), (e, t) => (b(), m("div", R, [_(w(l), {
|
|
197
|
-
allVisible: u.value,
|
|
198
|
-
"model-value": d.value,
|
|
199
|
-
"tree-list": c.value,
|
|
200
|
-
onEdit: v,
|
|
201
|
-
ref_key: "previewRef",
|
|
202
|
-
ref: D
|
|
203
|
-
}, null, 8, [
|
|
204
|
-
"allVisible",
|
|
205
|
-
"model-value",
|
|
206
|
-
"tree-list"
|
|
207
|
-
]), o.value ? (b(), f(I, {
|
|
208
|
-
key: 0,
|
|
209
|
-
visible: o.value,
|
|
210
|
-
"onUpdate:visible": t[0] ||= (e) => o.value = e,
|
|
211
|
-
allVisible: u.value,
|
|
212
|
-
"onUpdate:allVisible": t[1] ||= (e) => u.value = e,
|
|
213
|
-
modelValue: d.value,
|
|
214
|
-
"onUpdate:modelValue": t[2] ||= (e) => d.value = e,
|
|
215
|
-
"tree-list": c.value,
|
|
216
|
-
loading: s.value,
|
|
217
|
-
onSave: S,
|
|
218
|
-
onCancel: C
|
|
219
|
-
}, null, 8, [
|
|
220
|
-
"visible",
|
|
221
|
-
"allVisible",
|
|
222
|
-
"modelValue",
|
|
223
|
-
"tree-list",
|
|
224
|
-
"loading"
|
|
225
|
-
])) : p("", !0)]));
|
|
226
|
-
}
|
|
227
|
-
}));
|
|
228
|
-
//#endregion
|
|
229
|
-
export { z as t };
|