aibox-custom-component-packages 0.0.2 → 0.0.4
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 +73 -0
- package/es/AvailableRangePreview.mjs +7 -0
- package/es/AvailableRangeSetting.mjs +271 -0
- package/es/CommonTagsList.mjs +209 -0
- package/es/DialogContainer.mjs +136 -0
- package/es/FileUploader.mjs +11 -0
- package/es/PageContainer.mjs +13 -0
- package/es/PublishRecord.mjs +179 -0
- package/es/SourcePublish.mjs +1154 -0
- package/es/Table.mjs +10 -0
- package/es/assets/AiboxTabs.css +1 -0
- package/es/assets/BackBar.css +1 -0
- package/es/assets/CommonTagsList.css +1 -0
- package/es/assets/DialogContainer.css +1 -0
- package/es/assets/PublishRecord.css +1 -0
- package/es/assets/SourcePublish.css +1 -0
- package/es/assets/index2.css +1 -0
- package/es/chunks/BackBar.Bc2NIuzk.js +645 -0
- package/es/chunks/BackBar.Cv1wxUcM.js +645 -0
- package/es/chunks/BackBar.DJV4JaUM.js +645 -0
- package/es/chunks/_plugin-vue_export-helper.CHgC5LLL.js +9 -0
- package/es/chunks/config.8htFF04x.js +325 -0
- package/es/chunks/config.BPp4hMBq.js +325 -0
- package/es/chunks/config.BU21Gda2.js +49 -0
- package/es/chunks/config.BzCGum_W.js +49 -0
- package/es/chunks/config.CFWGjEdA.js +49 -0
- package/es/chunks/config.CfWAdyUH.js +325 -0
- package/es/chunks/config.DTMcCH58.js +325 -0
- package/es/chunks/enums.CfSBDD6u.js +83 -0
- package/es/chunks/i18n.DmqkiK-h.js +444 -0
- package/es/chunks/i18n.Vhq-tZPw.js +94 -0
- package/es/chunks/i18n.ro9yz7rE.js +94 -0
- package/es/chunks/index.DB0ayMv8.js +257 -0
- package/es/chunks/index.aMb6IVQD.js +257 -0
- package/es/chunks/index.bCzIhWFw.js +7 -0
- package/es/chunks/index.ml5i7aB5.js +257 -0
- package/es/chunks/index.s-YxIOfq.js +301 -0
- package/es/chunks/publish.BCb7nCo9.js +50 -0
- package/es/chunks/publish.D6friivo.js +50 -0
- package/es/chunks/publish.Dqzn7qEl.js +50 -0
- package/es/i18n.mjs +17 -0
- package/es/index.mjs +312 -10
- package/lib/AiboxTabs.js +1 -0
- package/lib/AvailableRangePreview.js +1 -0
- package/lib/AvailableRangeSetting.js +1 -0
- package/lib/CommonTagsList.js +1 -0
- package/lib/DialogContainer.js +1 -0
- package/lib/FileUploader.js +1 -0
- package/lib/PageContainer.js +1 -0
- package/lib/PublishRecord.js +5 -0
- package/lib/SourcePublish.js +1 -0
- package/lib/Table.js +1 -0
- package/lib/assets/AiboxTabs.css +1 -0
- package/lib/assets/BackBar.css +1 -0
- package/lib/assets/CommonTagsList.css +1 -0
- package/lib/assets/DialogContainer.css +1 -0
- package/lib/assets/PublishRecord.css +1 -0
- package/lib/assets/SourcePublish.css +1 -0
- package/lib/assets/index2.css +1 -0
- package/lib/chunks/BackBar.CZsNxoX1.js +1 -0
- package/lib/chunks/BackBar.s5_vN6jt.js +1 -0
- package/lib/chunks/_plugin-vue_export-helper.BHFhmbuH.js +1 -0
- package/lib/chunks/config.B0XKkp1w.js +1 -0
- package/lib/chunks/config.BCAuBVxV.js +1 -0
- package/lib/chunks/config.Bs7sh3aP.js +1 -0
- package/lib/chunks/config.C1w4hgfw.js +1 -0
- package/lib/chunks/config.ClERt2RF.js +1 -0
- package/lib/chunks/enums.Dmq4PdUc.js +1 -0
- package/lib/chunks/i18n.CL5L6nx6.js +1 -0
- package/lib/chunks/i18n.aAXi5igh.js +1 -0
- package/lib/chunks/index.BNqTEn3K.js +1 -0
- package/lib/chunks/index.Bk-RwmaH.js +1 -0
- package/lib/chunks/index.BsN4urmi.js +1 -0
- package/lib/chunks/index.CkihWzK6.js +1 -0
- package/lib/chunks/publish.Bw1acrSu.js +1 -0
- package/lib/chunks/publish.CA1uSVnm.js +1 -0
- package/lib/i18n.js +1 -0
- package/lib/index.js +4 -1
- package/package.json +55 -9
package/es/i18n.mjs
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { i as n, c as s, h as t, f as g, g as r, b as i, d as l, e as u, j as c, l as o, a as d, s as L, t as p, u as I } from "./chunks/i18n.ro9yz7rE.js";
|
|
2
|
+
export {
|
|
3
|
+
n as cancelLanguageChangeListener,
|
|
4
|
+
s as createI18nInstance,
|
|
5
|
+
t as createTranslationHelper,
|
|
6
|
+
g as getBackendLanguage,
|
|
7
|
+
r as getBrowserLanguage,
|
|
8
|
+
i as getCurrentLocale,
|
|
9
|
+
l as getFeishuInternationalizedFields,
|
|
10
|
+
u as getMdEditorInternationalized,
|
|
11
|
+
c as getterTText,
|
|
12
|
+
o as languageMap,
|
|
13
|
+
d as localeMap,
|
|
14
|
+
L as setupLanguageChangeListener,
|
|
15
|
+
p as t,
|
|
16
|
+
I as useI18n
|
|
17
|
+
};
|
package/es/index.mjs
CHANGED
|
@@ -1,14 +1,316 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { ApiTooltip as D, FeishuTooltip as x, PermissionSetting as h, PublishIcon as H, PublishSettings as F, SourcePublish as b, useServiceConfig as $, useStoreDetailType as Y } from "./SourcePublish.mjs";
|
|
2
|
+
import { CommonTagsList as X, StatusTag as G } from "./CommonTagsList.mjs";
|
|
3
|
+
import { A as w, T as j } from "./chunks/index.ml5i7aB5.js";
|
|
4
|
+
import { AvailableRangeSetting as z } from "./AvailableRangeSetting.mjs";
|
|
5
|
+
import { AiboxTable as V } from "./Table.mjs";
|
|
6
|
+
import { DialogContainer as W, useDialog as Z } from "./DialogContainer.mjs";
|
|
7
|
+
import { PublishRecord as k } from "./PublishRecord.mjs";
|
|
8
|
+
import { AiboxTabs as q } from "./AiboxTabs.mjs";
|
|
9
|
+
import { a as J, T as K } from "./chunks/BackBar.Bc2NIuzk.js";
|
|
10
|
+
import { D as Q, M as ee, P as te, R as se, a as oe, r as re } from "./chunks/config.BU21Gda2.js";
|
|
11
|
+
import { A as ae, a as ne, C as ie, I as Te, b as ue, L as le, O as _e, c as ce, P as Ee, d as Oe, e as me, f as Ae, g as Ce, R as ge, h as fe, S as pe, i as Ne, j as Me, s as Le } from "./chunks/config.8htFF04x.js";
|
|
12
|
+
import { u as P } from "./chunks/i18n.DmqkiK-h.js";
|
|
13
|
+
import { k as qe, d as Je, j as Ke, i as Qe, c as et, e as tt, f as st, g as ot, h as rt, a as at, l as nt, b as it, s as Tt, t as ut } from "./chunks/i18n.DmqkiK-h.js";
|
|
14
|
+
import { ElMessageBox as B, ElMessage as c, ElSelect as Se, ElOption as Be } from "element-plus";
|
|
15
|
+
import de from "copy-to-clipboard";
|
|
16
|
+
import { ref as Ie, h as m } from "vue";
|
|
17
|
+
const S = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3
18
|
__proto__: null,
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
19
|
+
API_CHANNEL_TYPES: ae,
|
|
20
|
+
AUTHORIZED_CHANNEL_TYPES: ne,
|
|
21
|
+
AiboxTable: V,
|
|
22
|
+
AiboxTabs: q,
|
|
23
|
+
ApiTooltip: D,
|
|
24
|
+
AvailableRangePreview: w,
|
|
25
|
+
AvailableRangeSetting: z,
|
|
26
|
+
BackBar: J,
|
|
27
|
+
CHANNEL_ICON_CONFIG: ie,
|
|
28
|
+
CommonTagsList: X,
|
|
29
|
+
DEFAULT_SHOW_COUNT: Q,
|
|
30
|
+
DialogContainer: W,
|
|
31
|
+
FeishuTooltip: x,
|
|
32
|
+
INACTIVE_ENUM: Te,
|
|
33
|
+
INACTIVE_LIST: ue,
|
|
34
|
+
LIBRARY_PAGE: le,
|
|
35
|
+
MEMBER_DEPARTMENT_TYPES: ee,
|
|
36
|
+
OFFICIAL_LABEL: _e,
|
|
37
|
+
OPEN_STATUS_VALUE: ce,
|
|
38
|
+
PUBLISH_STATUS: te,
|
|
39
|
+
PUBLISH_STATUS_COLORS: Ee,
|
|
40
|
+
PUBLISH_STATUS_ICONS: Oe,
|
|
41
|
+
PUBLISH_STATUS_TEXT: me,
|
|
42
|
+
PUBLISH_STATUS_TYPE: Ae,
|
|
43
|
+
PUBLISH_TYPE_ICON_MAPPING: Ce,
|
|
44
|
+
PermissionSetting: h,
|
|
45
|
+
PublishIcon: H,
|
|
46
|
+
PublishRecord: k,
|
|
47
|
+
PublishSettings: F,
|
|
48
|
+
RANGE_TYPES: se,
|
|
49
|
+
RELEASE_CHANNEL_CONFIG: ge,
|
|
50
|
+
RELEASE_CHANNEL_TYPE: fe,
|
|
51
|
+
STORE_CHANNEL_TYPES: pe,
|
|
52
|
+
STORE_DETAIL_TYPE: Ne,
|
|
53
|
+
SourcePublish: b,
|
|
54
|
+
StatusTag: G,
|
|
55
|
+
TableBtns: K,
|
|
56
|
+
TagList: j,
|
|
57
|
+
availableRangeTreeProps: oe,
|
|
58
|
+
getChannelsByType: Me,
|
|
59
|
+
rangeOptions: re,
|
|
60
|
+
serviceTypeMap: Le,
|
|
61
|
+
useDialog: Z,
|
|
62
|
+
useServiceConfig: $,
|
|
63
|
+
useStoreDetailType: Y
|
|
64
|
+
}, Symbol.toStringTag, { value: "Module" })), E = (s) => {
|
|
65
|
+
switch (s) {
|
|
66
|
+
case "success":
|
|
67
|
+
return "el-button--success";
|
|
68
|
+
case "warning":
|
|
69
|
+
return "el-button--warning";
|
|
70
|
+
case "danger":
|
|
71
|
+
return "el-button--danger";
|
|
72
|
+
case "info":
|
|
73
|
+
return "el-button--info";
|
|
74
|
+
case "default":
|
|
75
|
+
return "";
|
|
76
|
+
default:
|
|
77
|
+
return "el-button--primary";
|
|
78
|
+
}
|
|
79
|
+
}, ze = () => {
|
|
80
|
+
const { t: s } = P();
|
|
81
|
+
return {
|
|
82
|
+
customMessageBox: ({
|
|
83
|
+
title: T,
|
|
84
|
+
text: O,
|
|
85
|
+
tip: A = "",
|
|
86
|
+
type: u = "warning",
|
|
87
|
+
dangerouslyUseHTMLString: n = !1,
|
|
88
|
+
cancelButtonText: o = s("COMMON_BUTTON.CANCEL_TEXT"),
|
|
89
|
+
confirmButtonText: C = s("COMMON_BUTTON.CONFIRM_TEXT"),
|
|
90
|
+
confirmButtonType: g = "primary",
|
|
91
|
+
cancelButtonType: l = "default"
|
|
92
|
+
}) => B.confirm(
|
|
93
|
+
n ? `<div class="custom-message-box">
|
|
94
|
+
<div class="custom-message-box__title" v-if="text">${O}</div>
|
|
95
|
+
<div class="custom-message-box__tip" v-if="tip">${A}</div>
|
|
96
|
+
</div>` : O,
|
|
97
|
+
T,
|
|
98
|
+
{
|
|
99
|
+
dangerouslyUseHTMLString: n,
|
|
100
|
+
type: u,
|
|
101
|
+
cancelButtonText: o,
|
|
102
|
+
confirmButtonText: C,
|
|
103
|
+
confirmButtonClass: E(g),
|
|
104
|
+
cancelButtonClass: E(l)
|
|
105
|
+
}
|
|
106
|
+
),
|
|
107
|
+
customPromptMessageBox: Pe
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
function Pe({
|
|
111
|
+
confirmButtonText: s,
|
|
112
|
+
cancelButtonText: a,
|
|
113
|
+
confirmButtonType: T = "primary",
|
|
114
|
+
cancelButtonType: O = "default",
|
|
115
|
+
confirmCallback: A,
|
|
116
|
+
cancelCallback: u,
|
|
117
|
+
inputValidatorCallback: n,
|
|
118
|
+
label: o,
|
|
119
|
+
showLabel: C = !1,
|
|
120
|
+
text: g,
|
|
121
|
+
defaultValue: l = "",
|
|
122
|
+
selectOptions: L,
|
|
123
|
+
multiple: f = !1,
|
|
124
|
+
filterable: R = !0,
|
|
125
|
+
maxLength: p
|
|
126
|
+
}) {
|
|
127
|
+
if (Array.isArray(L) && L.length) {
|
|
128
|
+
const e = Ie(
|
|
129
|
+
f ? Array.isArray(l) ? l : [] : l
|
|
130
|
+
), N = m({
|
|
131
|
+
name: "MessageBoxSelect",
|
|
132
|
+
setup() {
|
|
133
|
+
return () => m("div", { style: "padding: 6px 0; width: 100%" }, [
|
|
134
|
+
C ? m(
|
|
135
|
+
"div",
|
|
136
|
+
{
|
|
137
|
+
style: "margin-bottom: 8px; font-size: 14px; color: #262626;"
|
|
138
|
+
},
|
|
139
|
+
o || ""
|
|
140
|
+
) : null,
|
|
141
|
+
m(
|
|
142
|
+
Se,
|
|
143
|
+
{
|
|
144
|
+
modelValue: e.value,
|
|
145
|
+
"onUpdate:modelValue": (r) => e.value = r,
|
|
146
|
+
multiple: f,
|
|
147
|
+
filterable: R,
|
|
148
|
+
placeholder: `${t("COMMON_DATA.PLACEHOLDER_SELECT")}${o || ""}`,
|
|
149
|
+
teleported: !0,
|
|
150
|
+
style: "width: 370px"
|
|
151
|
+
// Select 宽度 100%
|
|
152
|
+
},
|
|
153
|
+
() => L.map(
|
|
154
|
+
(r) => m(Be, {
|
|
155
|
+
key: r?.value,
|
|
156
|
+
// 补 key
|
|
157
|
+
label: r?.label || "",
|
|
158
|
+
value: r?.value
|
|
159
|
+
})
|
|
160
|
+
)
|
|
161
|
+
)
|
|
162
|
+
]);
|
|
163
|
+
}
|
|
164
|
+
});
|
|
165
|
+
B({
|
|
166
|
+
title: g || "",
|
|
167
|
+
message: N,
|
|
168
|
+
showCancelButton: !0,
|
|
169
|
+
confirmButtonText: s || t("COMMON_BUTTON.CONFIRM_TEXT"),
|
|
170
|
+
cancelButtonText: a || t("COMMON_BUTTON.CANCEL_TEXT"),
|
|
171
|
+
confirmButtonClass: E(T),
|
|
172
|
+
cancelButtonClass: E(O),
|
|
173
|
+
draggable: !0,
|
|
174
|
+
closeOnClickModal: !1,
|
|
175
|
+
beforeClose: (r, _, I) => {
|
|
176
|
+
if (r === "confirm") {
|
|
177
|
+
if (n) {
|
|
178
|
+
const M = n(e.value);
|
|
179
|
+
if (M !== !0) {
|
|
180
|
+
const y = typeof M == "string" ? M : `${t("COMMON_DATA.PLACEHOLDER_SELECT")}${o || ""}`;
|
|
181
|
+
c.error && c.error(y);
|
|
182
|
+
return;
|
|
183
|
+
}
|
|
184
|
+
} else if (f && (!Array.isArray(e.value) || e.value.length === 0) || !f && (e.value === "" || e.value === void 0 || e.value === null)) {
|
|
185
|
+
c.error && c.error(
|
|
186
|
+
`${t("COMMON_DATA.PLACEHOLDER_SELECT")}${o || ""}`
|
|
187
|
+
);
|
|
188
|
+
return;
|
|
189
|
+
}
|
|
190
|
+
const U = () => {
|
|
191
|
+
_.confirmButtonLoading = !0, _.confirmButtonText = t("COMMON_DATA.LOADING_SUFFIX");
|
|
192
|
+
}, v = () => {
|
|
193
|
+
_.confirmButtonLoading = !1, _.confirmButtonText = s || t("COMMON_BUTTON.CONFIRM_TEXT");
|
|
194
|
+
};
|
|
195
|
+
A(e.value, I, U, v);
|
|
196
|
+
} else
|
|
197
|
+
I();
|
|
198
|
+
}
|
|
199
|
+
}).catch(() => {
|
|
200
|
+
u && u();
|
|
201
|
+
});
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
const d = {
|
|
205
|
+
confirmButtonText: s || t("COMMON_BUTTON.CONFIRM_TEXT"),
|
|
206
|
+
cancelButtonText: a || t("COMMON_BUTTON.CANCEL_TEXT"),
|
|
207
|
+
confirmButtonClass: E(T),
|
|
208
|
+
cancelButtonClass: E(O),
|
|
209
|
+
draggable: !0,
|
|
210
|
+
inputPlaceholder: `${t("COMMON_DATA.PLACEHOLDER_INPUT")}${o}`,
|
|
211
|
+
inputValue: l,
|
|
212
|
+
closeOnClickModal: !1,
|
|
213
|
+
inputValidator: (e) => !e || !e.trim() ? `${t("COMMON_DATA.PLACEHOLDER_INPUT")}${o}` : p && e.length > p ? t("COMMON_DATA.PLACEHOLDER_INPUT_MAXLENGTH") : n ? n(e) : !0,
|
|
214
|
+
beforeClose: (e, i, N) => {
|
|
215
|
+
if (e === "confirm") {
|
|
216
|
+
const r = () => {
|
|
217
|
+
i.confirmButtonLoading = !0, i.confirmButtonText = t("COMMON_DATA.LOADING_SUFFIX");
|
|
218
|
+
}, _ = () => {
|
|
219
|
+
i.confirmButtonLoading = !1, i.confirmButtonText = s || t("COMMON_BUTTON.CONFIRM_TEXT");
|
|
220
|
+
};
|
|
221
|
+
A(i.inputValue, N, r, _);
|
|
222
|
+
} else
|
|
223
|
+
N();
|
|
224
|
+
}
|
|
225
|
+
};
|
|
226
|
+
p && (d.inputAttrs = { maxlength: p }), B.prompt(C ? o : "", g || "", d).catch(
|
|
227
|
+
() => {
|
|
228
|
+
u && u();
|
|
229
|
+
}
|
|
230
|
+
);
|
|
231
|
+
}
|
|
232
|
+
const Ve = () => {
|
|
233
|
+
const { t: s } = P();
|
|
234
|
+
return {
|
|
235
|
+
copyText: (T) => {
|
|
236
|
+
de(T) ? c({
|
|
237
|
+
message: s("MESSAGE_REMIND.COPY_SUCCESS"),
|
|
238
|
+
type: "success"
|
|
239
|
+
}) : c({
|
|
240
|
+
message: s("COMMON_STORE_LIBRARY.LABEL_COPY_FAIL"),
|
|
241
|
+
type: "error"
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
};
|
|
245
|
+
}, Re = (s) => {
|
|
246
|
+
for (const a in S)
|
|
247
|
+
S[a].install && s.use(S[a]);
|
|
248
|
+
}, We = {
|
|
249
|
+
install: Re
|
|
10
250
|
};
|
|
11
251
|
export {
|
|
12
|
-
|
|
13
|
-
|
|
252
|
+
ae as API_CHANNEL_TYPES,
|
|
253
|
+
ne as AUTHORIZED_CHANNEL_TYPES,
|
|
254
|
+
V as AiboxTable,
|
|
255
|
+
q as AiboxTabs,
|
|
256
|
+
D as ApiTooltip,
|
|
257
|
+
w as AvailableRangePreview,
|
|
258
|
+
z as AvailableRangeSetting,
|
|
259
|
+
J as BackBar,
|
|
260
|
+
ie as CHANNEL_ICON_CONFIG,
|
|
261
|
+
X as CommonTagsList,
|
|
262
|
+
Q as DEFAULT_SHOW_COUNT,
|
|
263
|
+
W as DialogContainer,
|
|
264
|
+
x as FeishuTooltip,
|
|
265
|
+
Te as INACTIVE_ENUM,
|
|
266
|
+
ue as INACTIVE_LIST,
|
|
267
|
+
le as LIBRARY_PAGE,
|
|
268
|
+
ee as MEMBER_DEPARTMENT_TYPES,
|
|
269
|
+
_e as OFFICIAL_LABEL,
|
|
270
|
+
ce as OPEN_STATUS_VALUE,
|
|
271
|
+
te as PUBLISH_STATUS,
|
|
272
|
+
Ee as PUBLISH_STATUS_COLORS,
|
|
273
|
+
Oe as PUBLISH_STATUS_ICONS,
|
|
274
|
+
me as PUBLISH_STATUS_TEXT,
|
|
275
|
+
Ae as PUBLISH_STATUS_TYPE,
|
|
276
|
+
Ce as PUBLISH_TYPE_ICON_MAPPING,
|
|
277
|
+
h as PermissionSetting,
|
|
278
|
+
H as PublishIcon,
|
|
279
|
+
k as PublishRecord,
|
|
280
|
+
F as PublishSettings,
|
|
281
|
+
se as RANGE_TYPES,
|
|
282
|
+
ge as RELEASE_CHANNEL_CONFIG,
|
|
283
|
+
fe as RELEASE_CHANNEL_TYPE,
|
|
284
|
+
pe as STORE_CHANNEL_TYPES,
|
|
285
|
+
Ne as STORE_DETAIL_TYPE,
|
|
286
|
+
b as SourcePublish,
|
|
287
|
+
G as StatusTag,
|
|
288
|
+
K as TableBtns,
|
|
289
|
+
j as TagList,
|
|
290
|
+
oe as availableRangeTreeProps,
|
|
291
|
+
qe as cancelLanguageChangeListener,
|
|
292
|
+
Je as createI18nInstance,
|
|
293
|
+
Ke as createTranslationHelper,
|
|
294
|
+
Pe as customPromptMessageBox,
|
|
295
|
+
We as default,
|
|
296
|
+
Qe as getBackendLanguage,
|
|
297
|
+
et as getBrowserLanguage,
|
|
298
|
+
Me as getChannelsByType,
|
|
299
|
+
tt as getCurrentLocale,
|
|
300
|
+
st as getFeishuInternationalizedFields,
|
|
301
|
+
ot as getGlobalProperties,
|
|
302
|
+
rt as getMdEditorInternationalized,
|
|
303
|
+
at as getterTText,
|
|
304
|
+
nt as languageMap,
|
|
305
|
+
it as localeMap,
|
|
306
|
+
re as rangeOptions,
|
|
307
|
+
Le as serviceTypeMap,
|
|
308
|
+
Tt as setupLanguageChangeListener,
|
|
309
|
+
ut as t,
|
|
310
|
+
Ve as useCopy,
|
|
311
|
+
ze as useCustomMessageBox,
|
|
312
|
+
Z as useDialog,
|
|
313
|
+
P as useI18n,
|
|
314
|
+
$ as useServiceConfig,
|
|
315
|
+
Y as useStoreDetailType
|
|
14
316
|
};
|
package/lib/AiboxTabs.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require('./assets/AiboxTabs.css');const p=require("./chunks/index.CkihWzK6.js"),e=require("vue"),d=require("./chunks/_plugin-vue_export-helper.BHFhmbuH.js"),b=["onClick"],m={__name:"layout",props:{modelValue:{type:String,default:""},tabList:{type:Array,default:()=>[]},propsObj:{type:Object,default:()=>({label:"label",value:"value"})},styleType:{type:[Number,String],default:1},isShowIcon:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(t,{emit:r}){const n=r,o=t,s=a=>{n("update:modelValue",a[o.propsObj.value]),n("change",a[o.propsObj.value])};return(a,g)=>{const u=e.resolveComponent("el-icon");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["ai-box-tabs",`style-${t.styleType}`])},[e.createElementVNode("ul",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.tabList,(l,i)=>(e.openBlock(),e.createElementBlock("li",{key:l[o.propsObj.value],onClick:v=>s(l),class:e.normalizeClass(t.modelValue===l[o.propsObj.value]?"current":""),style:e.normalizeStyle(i==t.tabList.length-1?"margin-right: 0;":"")},[l.icon&&t.isShowIcon?(e.openBlock(),e.createBlock(u,{key:0,size:"18px",style:{"margin-right":"4px"},color:t.modelValue===l[o.propsObj.value]?"#262626":"#7f8387"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.icon)))]),_:2},1032,["color"])):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(l[o.propsObj.label]),1)],14,b))),128))])],2)}}},y=d._export_sfc(m,[["__scopeId","data-v-bdfc72c7"]]),c=p.withInstall(y);exports.AiboxTabs=c;exports.default=c;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require("./chunks/index.CkihWzK6.js");const e=require("./chunks/index.Bk-RwmaH.js");exports.AvailableRangePreview=e.AvailableRangePreview;exports.TagList=e.TagList;exports.default=e.AvailableRangePreview;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const I=require("./chunks/index.CkihWzK6.js"),e=require("vue"),a=require("color-star-custom-methods"),i=require("./chunks/config.B0XKkp1w.js"),R=require("./chunks/index.Bk-RwmaH.js"),V=require("element-plus"),h=require("./DialogContainer.js"),L=require("color-star-custom-components"),C=require("./chunks/i18n.CL5L6nx6.js"),P={class:"dialog-content"},B={key:0,class:"selection-area overflow-hidden"},k={class:"dialog-footer"},O={__name:"Dialog",props:{visible:{type:Boolean,default:!1},allVisible:{type:Boolean,default:i.RANGE_TYPES.ALL},modelValue:{type:Array,default:()=>[]},treeList:{type:Array,default:()=>[]}},emits:[a.emitsMap.updateVisible,a.emitsMap.save,a.emitsMap.cancel],setup(f,{emit:b}){const{t:v}=C.useI18n(),m=f,g=b,{showDialog:E,dialogRef:p}=h.useDialog(),u=e.ref(m.allVisible),s=e.ref([...m.modelValue]),d=e.ref(),{selectedMembers:n,selectedDepartments:T}=R.useSelectionDisplay(s,e.computed(()=>m.treeList),!1);e.watch(()=>m.visible,t=>{t&&e.nextTick(()=>{E()})},{immediate:!0});const A=e.computed(()=>{const t=[];return T.value.forEach(o=>{t.push({...o,children:void 0})}),n.value.forEach(o=>{t.push({...o,children:void 0})}),t}),S=t=>{u.value=t,t===i.RANGE_TYPES.ALL&&(s.value=[])},N=t=>{const{selectedNode:o}=t;s.value=o||[]},_=()=>{g(a.emitsMap.cancel),g(a.emitsMap.updateVisible,!1)},M=()=>{if(u.value===i.RANGE_TYPES.PARTIAL&&!s.value.length){V.ElMessage.warning(v("COMMON_DICT.ENUMS.AVAILABLE_RANGE_EMPTY_TIP"));return}g(a.emitsMap.save,{type:u.value,selectedItems:[...s.value]}),g(a.emitsMap.updateVisible,!1)};return(t,o)=>(e.openBlock(),e.createBlock(e.unref(h.DialogContainer),{ref_key:"dialogRef",ref:p,title:e.unref(v)("COMMON_DICT.ENUMS.AVAILABLE_RANGE_SETTING"),onClose:_},{footer:e.withCtx(()=>[e.createElementVNode("div",k,[e.createVNode(e.unref(V.ElButton),{onClick:_,plain:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(v)("COMMON_BUTTON.CANCEL_TEXT")),1)]),_:1}),e.createVNode(e.unref(V.ElButton),{type:"primary",onClick:M},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(v)("COMMON_BUTTON.SAVE_TEXT")),1)]),_:1})])]),default:e.withCtx(()=>[e.createElementVNode("div",P,[e.createVNode(e.unref(V.ElRadioGroup),{class:"pd-b-16",modelValue:u.value,"onUpdate:modelValue":o[0]||(o[0]=l=>u.value=l),onChange:S},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(i.rangeOptions),l=>(e.openBlock(),e.createBlock(e.unref(V.ElRadio),{key:l.value,value:l.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"]),u.value===e.unref(i.RANGE_TYPES).PARTIAL?(e.openBlock(),e.createElementBlock("div",B,[e.createVNode(e.unref(L.TreeShowSelect),{modelValue:s.value,"onUpdate:modelValue":o[1]||(o[1]=l=>s.value=l),ref_key:"treeRef",ref:d,treeProps:e.unref(i.availableRangeTreeProps),treeList:f.treeList,hasFilter:!0,rightTreeList:A.value,itemUnitName:e.unref(v)("COMMON_DICT.ENUMS.ITEM_UNIT_NAME"),style:{height:"500px"},onGetCheckedNode:N},null,8,["modelValue","treeProps","treeList","rightTreeList","itemUnitName"])])):e.createCommentVNode("",!0)])]),_:1},8,["title"]))}},U=()=>{const{$request:f,$env:b}=C.getGlobalProperties();return{availableRangeApi:()=>f({url:`${b.VITE_APP_AUTH_BASE_URL}/api/v1/admin/member/search`,method:"get"})}},w={class:"available-range-setting w-full"},D=Object.assign({name:"AvailableRangeSetting"},{__name:"layout",props:{allVisible:{type:Boolean,default:i.RANGE_TYPES.ALL},modelValue:{type:Array,default:()=>[]}},emits:[a.emitsMap.updateAllVisible,a.emitsMap.updateModelValue,a.emitsMap.change],setup(f,{expose:b,emit:v}){const m=f,{availableRangeApi:g}=U(),E=v,p=e.ref(!1),u=e.ref(!1),s=e.ref([]),d=e.ref(m.allVisible),n=e.ref(m.modelValue),T=e.ref(new Set(n.value?.map(l=>l.memberId))),A=()=>{u.value=!0,g().then(l=>{s.value=l?.data?.orgOptionSoList||[]}).finally(()=>{u.value=!1})},S=()=>{p.value=!0},N=l=>{d.value=l.type,n.value=l.selectedItems,T.value.clear(),n.value.forEach(r=>{T.value.add(r.memberId)}),E(a.emitsMap.updateAllVisible,d.value),E(a.emitsMap.updateModelValue,n.value),M()},_=()=>{p.value=!1},M=()=>{const l={allVisible:d.value,selectedItems:n.value};E(a.emitsMap.change,l)},t=e.ref(null),o=()=>{const l=t.value?.allSelectedItems||[];return{allVisible:d.value,visibleScope:l.map(c=>({memberId:c.memberId,memberName:c.memberName,memberType:c.memberType,bnid:c.bnid}))}};return e.watch(()=>m.allVisible,l=>{d.value=l},{immediate:!0}),e.watch(()=>m.modelValue,l=>{n.value=l||[],T.value.clear(),n.value.forEach(r=>{T.value.add(r.memberId)})},{immediate:!0}),e.onMounted(()=>{A()}),b({getSelectedItems:o}),(l,r)=>(e.openBlock(),e.createElementBlock("div",w,[e.createVNode(e.unref(R.AvailableRangePreview),{allVisible:d.value,"model-value":n.value,"tree-list":s.value,onEdit:S,ref_key:"previewRef",ref:t},null,8,["allVisible","model-value","tree-list"]),p.value?(e.openBlock(),e.createBlock(O,{key:0,visible:p.value,"onUpdate:visible":r[0]||(r[0]=c=>p.value=c),allVisible:d.value,"onUpdate:allVisible":r[1]||(r[1]=c=>d.value=c),modelValue:n.value,"onUpdate:modelValue":r[2]||(r[2]=c=>n.value=c),"tree-list":s.value,loading:u.value,onSave:N,onCancel:_},null,8,["visible","allVisible","modelValue","tree-list","loading"])):e.createCommentVNode("",!0)]))}}),y=I.withInstall(D);exports.DEFAULT_SHOW_COUNT=i.DEFAULT_SHOW_COUNT;exports.MEMBER_DEPARTMENT_TYPES=i.MEMBER_DEPARTMENT_TYPES;exports.PUBLISH_STATUS=i.PUBLISH_STATUS;exports.RANGE_TYPES=i.RANGE_TYPES;exports.availableRangeTreeProps=i.availableRangeTreeProps;exports.rangeOptions=i.rangeOptions;exports.AvailableRangeSetting=y;exports.default=y;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require('./assets/CommonTagsList.css');const g=require("./chunks/index.CkihWzK6.js"),e=require("vue"),m=require("element-plus"),y=require("./chunks/i18n.CL5L6nx6.js"),l=require("./chunks/config.BCAuBVxV.js"),L=require("./chunks/index.Bk-RwmaH.js"),E=require("./chunks/_plugin-vue_export-helper.BHFhmbuH.js"),S=require("./chunks/config.B0XKkp1w.js"),I={class:"status-tag-content flex items-center"},C={class:"status-text fz-12"},k={__name:"StatusTag",props:{channelStatus:{type:[String,Number],default:null},statusText:{type:String,default:null},showIcon:{type:Boolean,default:!1}},setup(c){const u=c,r=e.computed(()=>l.PUBLISH_STATUS_TYPE[u.channelStatus]),_=e.computed(()=>l.PUBLISH_STATUS_TEXT[u.channelStatus]),d=e.computed(()=>l.PUBLISH_STATUS_ICONS[u.channelStatus]),h=e.computed(()=>l.PUBLISH_STATUS_COLORS[u.channelStatus]);return(T,a)=>(e.openBlock(),e.createBlock(e.unref(m.ElTag),{type:r.value},{default:e.withCtx(()=>[e.createElementVNode("div",I,[c.showIcon&&d.value?(e.openBlock(),e.createBlock(e.unref(m.ElIcon),{key:0,color:h.value},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(d.value)))]),_:1},8,["color"])):e.createCommentVNode("",!0),e.createElementVNode("span",C,e.toDisplayString(c.statusText||_.value),1)])]),_:1},8,["type"]))}},f=E._export_sfc(k,[["__scopeId","data-v-59c4f44d"]]),N={class:"commont-status-box"},v={class:"common-content w-full overflow-y-auto",style:{"max-height":"200px"}},U={key:0,class:"content-item"},b={class:"content-item-top flex items-center"},P={class:"item-bottom-box mg-l-4 pd-t-8 flex flex-wrap"},x={key:1,class:"icon-placeholder w-full mg-t-4 mg-b-8 bg-e6e8ea",style:{height:"1px"}},A={key:0,class:"all-visible-ranges-section mg-t-12"},H={class:"channel-name fz-12 weight-500 mg-b-4 text-1f2329 flex items-center"},V={key:0,class:"range-separator w-full mg-t-8 mg-b-8 bg-e6e8ea",style:{height:"1px"}},O=Object.assign({name:"CommonTagsList"},{__name:"layout",props:{publishChannelList:{type:Array,default:()=>[]},sourceType:{type:[String,Number],default:null}},setup(c){const{t:u}=y.useI18n(),r=c,_=e.computed(()=>{const a=r.publishChannelList||[],n=a.filter(t=>t.channelStatus===S.PUBLISH_STATUS.PUBLISHED).map(t=>({...t,displayText:l.RELEASE_CHANNEL_CONFIG?.[t.channelType]?.name(r.sourceType)||""})),s=a.filter(t=>t.channelStatus!==S.PUBLISH_STATUS.PUBLISHED).reduce((t,o)=>{const p=o.channelStatus;return t[p]||(t[p]=[]),t[p].push(o),t},{}),i=Object.entries(s).map(([t,o])=>({channelStatus:parseInt(t),displayText:`${l.PUBLISH_STATUS_TEXT[parseInt(t)]}(${o.length})`,isGroup:!0,channels:o})).sort((t,o)=>o.channelStatus-t.channelStatus);return[...n,...i]}),d=e.computed(()=>{if(!r.publishChannelList?.length)return[];const a=r.publishChannelList.reduce((n,s)=>{const i=s.channelStatus;return n[i]||(n[i]=[]),n[i].push(s),n},{});return Object.entries(a).map(([n,s])=>({status:parseInt(n),channels:s})).sort((n,s)=>n.status===S.PUBLISH_STATUS.PUBLISHED?-1:s.status===S.PUBLISH_STATUS.PUBLISHED?1:s.status-n.status)}),h=e.computed(()=>{if(!r.publishChannelList?.length)return[];const a=u("COMMON_TAGS_LIST.UNKNOWN_CHANNEL");return r.publishChannelList.filter(n=>!n.visibleScope||n.visibleScope.length===0?!1:n.channelStatus===S.PUBLISH_STATUS.PUBLISHED).map(n=>({channelName:l.RELEASE_CHANNEL_CONFIG[n.channelType]?.name(r.sourceType)||a,channelType:n.channelType,visibleScope:n.visibleScope,allVisible:n.allVisible}))}),T=a=>{const n=l.PUBLISH_TYPE_ICON_MAPPING[a];return l.CHANNEL_ICON_CONFIG[n]};return(a,n)=>(e.openBlock(),e.createElementBlock("div",N,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(s,i)=>(e.openBlock(),e.createBlock(e.unref(m.ElPopover),{key:i,placement:"bottom",trigger:"click",width:"300"},{reference:e.withCtx(()=>[e.createVNode(f,{onClick:n[0]||(n[0]=e.withModifiers(()=>{},["stop"])),"channel-status":s.channelStatus,"status-text":s.displayText,"show-icon":!0,class:"mg-r-4 mg-b-4"},null,8,["channel-status","status-text"])]),default:e.withCtx(()=>[e.createElementVNode("div",v,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:t.status},[t.channels.length>0?(e.openBlock(),e.createElementBlock("div",U,[e.createElementVNode("div",b,[e.createVNode(e.unref(m.ElIcon),{style:e.normalizeStyle({color:e.unref(l.PUBLISH_STATUS_COLORS)[t.status]})},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(l.PUBLISH_STATUS_ICONS)[t.status])))]),_:2},1032,["style"]),e.createElementVNode("div",{class:"content-item-name fz-14 mg-l-4",style:e.normalizeStyle({color:e.unref(l.PUBLISH_STATUS_COLORS)[t.status]})},e.toDisplayString(e.unref(l.PUBLISH_STATUS_TEXT)[t.status])+"("+e.toDisplayString(t.channels.length)+") ",5)]),e.createElementVNode("div",P,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.channels,p=>(e.openBlock(),e.createElementBlock("div",{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",key:p.channelType},e.toDisplayString(e.unref(l.RELEASE_CHANNEL_CONFIG)?.[p.channelType]?.name(c.sourceType)),1))),128))])])):e.createCommentVNode("",!0),o<d.value.length-1?(e.openBlock(),e.createElementBlock("div",x)):e.createCommentVNode("",!0)],64))),128)),h.value.length>0?(e.openBlock(),e.createElementBlock("div",A,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(t,o)=>(e.openBlock(),e.createElementBlock("div",{key:t.channelType,class:"channel-visible-range"},[e.createElementVNode("div",H,[e.createVNode(e.unref(m.ElIcon),{class:"mg-r-2",size:"14",color:T(t.channelType)?.iconColor},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(T(t.channelType)?.icon)))]),_:2},1032,["color"]),e.createTextVNode(" "+e.toDisplayString(t.channelName)+" "+e.toDisplayString(e.unref(u)("COMMON_TAGS_LIST.AVAILABLE_SCOPE")),1)]),e.createVNode(e.unref(L.AvailableRangePreview),{"all-visible":t.allVisible,"model-value":t.visibleScope,"tree-list":[],readonly:!0},null,8,["all-visible","model-value"]),o<h.value.length-1?(e.openBlock(),e.createElementBlock("div",V)):e.createCommentVNode("",!0)]))),128))])):e.createCommentVNode("",!0)])]),_:2},1024))),128)),c.publishChannelList?.length?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(m.ElTag),{key:0,type:e.unref(l.PUBLISH_STATUS_TYPE)[e.unref(S.PUBLISH_STATUS).UNPUBLISHED]},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l.PUBLISH_STATUS_TEXT)[e.unref(S.PUBLISH_STATUS).UNPUBLISHED]),1)]),_:1},8,["type"]))]))}}),B=g.withInstall(O);exports.CommonTagsList=B;exports.StatusTag=f;exports.default=B;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require('./assets/DialogContainer.css');const y=require("./chunks/index.CkihWzK6.js"),e=require("vue"),C=require("element-plus"),w={class:"dialog-body"},b={__name:"DialogContainer",props:{width:{type:String,default:"720px"},title:{type:String,default:""},closable:{type:Boolean,default:!0},destroyOnclose:{type:Boolean,default:!1},customClass:{type:String,default:""},draggable:{type:Boolean,default:!0},modal:{type:Boolean,default:!0},fullscreen:{type:Boolean,default:!1}},emits:["open","opened","close","closed"],setup(l,{expose:t,emit:s}){const a=s,u=l,n=e.ref(!1),i=e.ref(!1),d=()=>{n.value=!0,e.nextTick(()=>{i.value=!0})},f=()=>{i.value=!1},g=e.computed(()=>{const o=["dialog-container"];return u.customClass&&o.push(u.customClass),u.fullscreen||o.push("not-fullscreen"),o.join(" ")}),m=()=>{a("open")},p=()=>{a("opened")},h=()=>{a("close")},v=()=>{a("closed"),e.nextTick(()=>{n.value=!1})};return e.onBeforeUnmount(()=>{n.value=!1}),t({showDialog:d,hideDialog:f}),(o,r)=>n.value?(e.openBlock(),e.createBlock(e.unref(C.ElDialog),{key:0,ref:"Dialog",modelValue:i.value,"onUpdate:modelValue":r[0]||(r[0]=D=>i.value=D),width:l.width,title:l.title,"append-to-body":"",modal:l.modal,"close-on-click-modal":!1,"close-on-press-escape":!1,"show-close":l.closable,"destroy-on-close":l.destroyOnclose,class:e.normalizeClass(g.value),draggable:l.draggable,fullscreen:l.fullscreen,onOpen:m,onOpened:p,onClose:h,onClosed:v},{header:e.withCtx(()=>[e.renderSlot(o.$slots,"title")]),footer:e.withCtx(()=>[e.renderSlot(o.$slots,"footer")]),default:e.withCtx(()=>[e.createElementVNode("div",w,[e.renderSlot(o.$slots,"default")])]),_:3},8,["modelValue","width","title","modal","show-close","destroy-on-close","class","draggable","fullscreen"])):e.createCommentVNode("",!0)}},B=(l=e.ref(!1))=>{const t=e.ref(null),s=e.ref(null);return{dialogRef:t,formRef:s,showDialog:()=>{t.value.showDialog()},hideDialog:()=>{l.value=!1,t.value.hideDialog()},resetDialog:()=>{l.value=!1,s.value&&e.nextTick(()=>{s.value.resetFields()})}}},c=y.withInstall(b);exports.DialogContainer=c;exports.default=c;exports.useDialog=B;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/enums.Dmq4PdUc.js");exports.AgentChannelEnum=e.AgentChannelEnum;exports.AgentLabelValueEnum=e.AgentLabelValueEnum;exports.AgentTypeEnum=e.AgentTypeEnum;exports.FormItemTypesEnum=e.FormItemTypesEnum;exports.RELEASE_CHANNEL_TYPE=e.RELEASE_CHANNEL_TYPE;exports.UploadTypesEnum=e.UploadTypesEnum;exports.colorValue=e.colorValue;exports.pages=e.pages;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t={ACTION:"action"},o={TABLE:"table",CARD_INFINITE:"card-infinite"},O={BOTTOM:"bottom"};exports.COLUMN_TYPES=t;exports.DIRECTION=O;exports.MODES=o;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require('./assets/PublishRecord.css');const B=require("./chunks/index.CkihWzK6.js"),e=require("vue"),a=require("element-plus"),E=require("color-message-aibox-vue"),R=require("./chunks/i18n.CL5L6nx6.js"),I=require("./chunks/publish.Bw1acrSu.js"),k=require("vue-router"),V=require("./chunks/enums.Dmq4PdUc.js"),m=require("./chunks/config.BCAuBVxV.js"),b=require("./chunks/config.B0XKkp1w.js"),P=require("./PageContainer.js"),x=require("./chunks/_plugin-vue_export-helper.BHFhmbuH.js"),D={class:"publish-record overflow-hidden"},L={class:"publish-record__item--time"},U={class:"publish-record__item--number"},w={class:"publish-record__item--version"},A=["onClick"],q={style:{"margin-left":"5px"}},H=["title"],$={key:1,class:"publish-record__empty flex flex-col items-center justify-center"},z={__name:"PublishRecord",props:{sourceType:{type:[String,Number],default:""},resourceBnid:{type:String,default:""},isBackendSystem:{type:Boolean,default:!1}},emits:["setRevisionBnid"],setup(_,{emit:g}){const{t:o}=R.useI18n(),v=g,l=_,{getPublishHistory:N,rollbackVersion:y,checkDeleteComponent:T}=I.getPublishApis(),i=k.useRoute(),u=e.ref(!1),p=e.computed(()=>r.data.length>=r.total);e.computed(()=>r.loading||p.value);const r=e.reactive({data:[],pages:{...V.pages,size:30},total:0}),O=c=>{c===P.DIRECTION.BOTTOM&&(p.value||(r.pages.page+=1,d()))},C=Object.keys(m.RELEASE_CHANNEL_CONFIG).reduce((c,s)=>{const n=m.RELEASE_CHANNEL_CONFIG[s];return c[parseInt(s)]=n.name(l.sourceType),c},{}),d=async c=>{u.value=!0;const{data:s}=await N(l.sourceType,h.value,{...r.pages}).finally(()=>{u.value=!1});s.data&&s.data.length>0&&s.data.forEach(n=>{let t="";n.channels&&n.channels.length>0&&(t=n.channels.map(f=>C[f?.channelType]).join("/")),n.channelsTag=t||o("COM_SPM.INVALID_VERSION")}),c?r.data=s.data||[]:r.data.push(...s.data||[]),r.total=s.total||0},M=async c=>{let s="";if(l.sourceType=="3"){const{data:n}=await T({bnid:c.publishedId,businessType:3});n&&n.forEach(t=>{s+=`<div style="color:#f5222d">${t}</div>`})}a.ElMessageBox.confirm(`<div class="custom-message-box">
|
|
2
|
+
<div class="custom-message-box__title">${o("COM_SPM.RESTORE_VERSION")}</div>
|
|
3
|
+
<div class="custom-message-box__tip">${o("COM_SPM.RESTORE_TIP")}</div>
|
|
4
|
+
${s}
|
|
5
|
+
</div>`,o("COMMON_DATA.TIP"),{dangerouslyUseHTMLString:!0,confirmButtonText:o("COMMON_BUTTON.CONFIRM_TEXT"),cancelButtonText:o("COMMON_BUTTON.CANCEL_TEXT"),type:"warning"}).then(async()=>{const{code:n}=await y(l.sourceType,c.bnid);if(n==0){const t=o("COM_SPM.RESTORE_SUCCESS");a.ElMessage.success(t),r.pages.page=1,d(!0),v("setRevisionBnid",c.bnid)}}).catch(()=>{})},h=e.ref("");return e.onMounted(()=>{h.value=i.params.bnId||i.params.bnid||i.params.workflowBnid||l.resourceBnid,d(!0)}),(c,s)=>{const n=e.resolveDirective("loading");return e.withDirectives((e.openBlock(),e.createElementBlock("div",D,[r?.data?.length?(e.openBlock(),e.createBlock(e.unref(a.ElScrollbar),{key:0,class:e.normalizeClass(["publish-record__list",{"backend-system":_.isBackendSystem}]),onEndReached:O},{default:e.withCtx(()=>[e.createElementVNode("ul",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.data,t=>(e.openBlock(),e.createElementBlock("li",{key:t.bind,class:"publish-record__item"},[e.createElementVNode("div",L,e.toDisplayString(t.createdAt),1),e.createElementVNode("div",U,[e.createElementVNode("p",w,[e.createVNode(e.unref(a.ElTooltip),{placement:"top",effect:"light",content:t.publishStatus==e.unref(b.PUBLISH_STATUS).PUBLISHED?e.unref(o)("COM_SPM.CURRENT_VERSION"):e.unref(o)("COM_SPM.UNPUBLISHED_VERSION")},{default:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass(["publish-record__item--edition",t.publishStatus==e.unref(b.PUBLISH_STATUS).PUBLISHED?"active":"in-active"])},[e.createTextVNode(e.toDisplayString(e.unref(o)("COM_SPM.VERSION_NUMBER",{number:t.versionNumber}))+" ",1),e.createElementVNode("span",{class:e.normalizeClass(["publish-record__item--type",t.channels?.length>=2?"publish-record__item--both":"publish-record__item--only"])},e.toDisplayString(t.channelsTag),3)],2)]),_:2},1032,["content"])]),e.createElementVNode("p",{class:"publish-record__item--back",onClick:f=>M(t)},[e.createVNode(e.unref(a.ElIcon),{size:"16px",color:"var(--el-color-primary)"},{default:e.withCtx(()=>[e.createVNode(e.unref(E.IconRefresh))]),_:1}),e.createElementVNode("span",q,e.toDisplayString(e.unref(o)("COM_SPM.RESTORE_VERSION")),1)],8,A)]),t.versionDesc?(e.openBlock(),e.createElementBlock("div",{key:0,class:"publish-record__item--content",title:t.versionDesc},e.toDisplayString(t.versionDesc),9,H)):e.createCommentVNode("",!0)]))),128))])]),_:1},8,["class"])):(e.openBlock(),e.createElementBlock("div",$,[e.createVNode(e.unref(a.ElIcon),{size:"100px",color:"var(--el-color-primary)"},{default:e.withCtx(()=>[e.createVNode(e.unref(E.Empty))]),_:1}),e.createElementVNode("span",null,e.toDisplayString(e.unref(o)("COM_SPM.NO_PUBLISH_RECORD")),1)]))])),[[n,u.value]])}}},j=x._export_sfc(z,[["__scopeId","data-v-0b0f197b"]]),S=B.withInstall(j);exports.PublishRecord=S;exports.default=S;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require('./assets/SourcePublish.css');const re=require("./chunks/index.CkihWzK6.js"),e=require("vue"),B=require("./chunks/i18n.CL5L6nx6.js"),Y=require("vue-router"),r=require("element-plus"),H=require("./chunks/_plugin-vue_export-helper.BHFhmbuH.js"),Q=require("./chunks/publish.Bw1acrSu.js"),t=require("./chunks/config.BCAuBVxV.js"),ue=require("./AvailableRangeSetting.js"),Z=require("color-message-aibox-vue"),J=require("./chunks/BackBar.CZsNxoX1.js"),w=require("color-star-custom-components"),ce=require("./chunks/config.B0XKkp1w.js"),de="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAbeSURBVHic7ZztbxRFHMc/s3vX60FrTynSAi09KIK0aJEY8I32pfFVeYeJ0fIn+BeAfwFvfOE7S2JijDH62kQD7yCK1CAF5OEOigWBwvHUe77xxXDpdXfnbndvr/V6+0muk5md/c3Od3/zsLvTgZCQkJDORXjJvPeoHCmXmUTyGZAARl6G7UxGCDLArJCcyZeYSf8kMm5PdiXg3qNyxIDjUjLt9yrbCSGYWcrxuRshGwq4/2M5JQVf0/6e5pWMkBy7+K34qV6mugJOfCKPIzgR6GW1G5ITs9+IL3SHtQIenJZTSH5szVW1GYIj52ecPdFRwIlpmegySNF5zVZHxqhw4OyMSFsPRJxyb4hyEhmKV0MCwXHgmPWAzQMnp2WiHOPxqlxWm2EKkqe/WumFdg+MM216mh12FJPATG2CTcBIhA8AkCj/dAjj3TD1Phwaa1zi9Xn48ge9ve4ofPoRDGzyWyc99xbhu1/gyfP69XEdwmdYBDSshZoGE6YBpgm68NCYO/EARofg8Jje3uTB1ogHyu6Hh/X18Bya9nHB7oEOmaxs7PZWkU19EDGdj8Vj3mx5JR7Tl+2DEWuCTUDTaCyg4bGPNAx1F50QLe5vBfqyfeDKAxtieLwgQ+jter0ZXhF1yg4Cuwe6KMyr1wiht9tyD6xTdhA4NeGGo5FnDzT0dlstILwUMIhR2OFafTXhZy+8VaBQ1NstlrzZ8kqxBJHg+kAbvprwjQWY/xeGtjTO+9dNmEvr7c6loT8Bgy2Yyiw+hXNza9CEG3lyuQTf/+rN83V2szn4+WxwLcwpjBgta8H+mnDIMr6acMgydg+s7XCXnwHDeDVuIfTAJgn7wCZxnkiHuCZswk0SNuEmsQk4llyLy2hfbAKuxsP9eiIUsElCAZvEJmCr3xCvN0IPbJKOFrA/AVET7i76t9GRAkYj8O4+6O9T8aUcnLng7+14x/WBkQi8tx/6Ni6nbeiGwX64868Pe9aE9eyB0QgcHodXNtqPCfzVvWMEjEbUchQn8bJ5uP84FLAub43qxTt3CUrlgARcj33g+C7Y8po9PZuH3+YgX/Bf73XvgWM7Ydtme3o2D79fhlyhuTqvmYDRiHp11t2lKpHNB1/G2E7Y2m9Pz+bh/JXmxYM1EDBqqg/ywwMr3z1m83BzAe4+DKacfUm9eH9cDUY8WOU+sD+hKub00jYeU+8iX+uFa3eg1MSSjzdH1LzOSi4PF/5urs+zsioeGDFhZNDdUpDBfujdoCpaKnsva+8OjXiFZfGCrGPLBezugok3VOiWng1wYA/MehRxdLtevNlrkC8GX7+WCrh9M+wY1H9nyTxXHtHXYxe4J66E//OaOxF3DMD21+3puYKyEbTnVWlJH2iasGub89wLlCC378E/D1Q81qUmuk4ivr0b5lJKAB3DA0pAp3LmUmp5Xav6dttXYCGa+/XE4Z09evFyBbh4AxYeLp9TKKq0nINIPfGX4sacy6sn3sUb6k1Ls3Wq/VkJtAlv7YfkVv3xhYdqXaHTY1OhCJduwvhO5ZG1dHfB/l3qeK3IQ1tg2GFgKpXVusSqeK0kEAFjUfX/IH0Oz5qgKpS+qx7Y65WRfynimEbE8Z1KmHwRkoPOA0aprGyshngQQB/YuxFGt9krXGUpB1dvqUq7sV0oqX5rX9JuM9YFB/cqkZwGpmqfl82v3jO93QOrf1ws2RwerL80994i3Lqr8nuxWyjB5bSaEDvdGJ14l9Nqxavws/Q0qEXmojqsiPrh+C71JteJclk9TTx94d6eNSyU4FJKTYx15dSWd+WW8jy/5bkOLfjywFd79ZV6tgSphZp5VxN3vFxRzX9oYPn7hZV8Ea7fWQXPc+uBhos7qOvv5u/D/Ufu7bgJK1J1A8+X1CNePKbmmdm8ulmLGSV0UOUF44ENePRUzfO6oipeKKpKPltyd74fHj1RPydWabxwxHka08CVKxKuzUOiV8UXn6p+SBj1z1sXoSsBqcmsCYslePDY+3ltH1pwFLC2M5YyjK8YnBoKaJARkkQ1s9WzOjqu9thagX2NtCAtYcKaHgLCjYAIMprm3vEImLWm2ZtwhVPCYLIatzb9To5XJGewYJ9Im5yujVu9sZPjRbFyyxOn/ABcvSW/7pS9At0iBDN7dohjtnSnzJdTcsQ0uCDDzccAEJB5USF5IGnfkFE7Xly9LacM+PH/1AetVVzCkT3DHra/q3JjXh6XdPYGjBJO7B7ysQFjleu35ZQwOnMLUFnh2KjG86q4mvKlUjJBFyclnTGwCJihwBfJpH3DRYe87kmlZKISZdow+ACYEJCQkKh9VGzDMAOkgQwVTmFyOjnYWLiQkJCQEPgPkazXbvPHCoAAAAAASUVORK5CYII=",Ee="data:image/png;base64,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",Se={},fe={class:"style-title"};function pe(a,m){return e.openBlock(),e.createElementBlock("div",fe,[e.renderSlot(a.$slots,"default",{},void 0,!0)])}const z=H._export_sfc(Se,[["render",pe],["__scopeId","data-v-57d98e1c"]]),_e={},Te={class:"card-container"};function he(a,m){return e.openBlock(),e.createElementBlock("div",Te,[e.renderSlot(a.$slots,"default",{},void 0,!0)])}const j=H._export_sfc(_e,[["render",he],["__scopeId","data-v-639f8796"]]),ve={__name:"PublishIcon",props:{publishType:{type:[String,Number],default:""},size:{type:[String,Number],default:30}},setup(a){const m=a,_=Object.keys(t.CHANNEL_ICON_CONFIG).reduce((N,I)=>{const v=t.CHANNEL_ICON_CONFIG[I];return N[I]={...v,icon:e.shallowRef(v.icon)},N},{}),f=e.ref({});return e.onMounted(()=>{const N=t.PUBLISH_TYPE_ICON_MAPPING[m.publishType]||"h5";f.value=_[N]}),(N,I)=>(e.openBlock(),e.createElementBlock("div",{class:"channel-icon flex items-center justify-center radius-8",style:e.normalizeStyle({background:f.value?.backgroundColor})},[e.createVNode(e.unref(r.ElIcon),{size:a.size,color:f.value?.iconColor},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(f.value?.icon)))]),_:1},8,["size","color"])],4))}},$=H._export_sfc(ve,[["__scopeId","data-v-cd6ad511"]]),Ce={class:"permission-setting"},Ae={key:1,class:"flex items-center gap-12 pd-t-16 pd-b-16"},Ne={class:"min-w-110 fz-14 text-left flex-shrink-0",style:{color:"var(--el-text-color-primary)"}},me={class:"flex items-center gap-6"},ye={class:"flex flex-col lh-18",style:{"align-items":"flex-start"}},Ie={class:"fz-12",style:{color:"var(--el-text-color-secondary)"}},ge={__name:"PermissionSetting",props:{showAvailableRange:{type:Boolean,default:!0},showPermissionSetting:{type:Boolean,default:!0},detail:{type:Object,default:()=>({})},authType:{type:String,default:""}},emits:["update:detail"],setup(a,{expose:m,emit:_}){const{t:f}=B.useI18n(),N=a,I=_,v=e.ref(null),T=C=>{const c={...N.detail,openStatus:C};I("update:detail",c)},b=C=>{const c={...N.detail,allVisible:C};I("update:detail",c)},y=C=>{const c={...N.detail,visibleScope:C};I("update:detail",c)};return m({validateVisibleRange:()=>{if(N.authType==="0")return{isValid:!0,data:{visibleScope:[],allVisible:!0,openStatus:1}};if(!N.showAvailableRange)return{isValid:!0,data:{openStatus:N.detail.openStatus??0}};if(!v.value)return{isValid:!0,data:null};const C=v.value.getSelectedItems();return C?.allVisible===void 0?(r.ElMessage.warning(f("MESSAGE_REMIND.SELECT_VISIBLE_RANGE")),{isValid:!1,data:null}):{isValid:!0,data:{...C,openStatus:N.detail.openStatus??0}}}}),(C,c)=>(e.openBlock(),e.createElementBlock("div",Ce,[a.showAvailableRange?(e.openBlock(),e.createBlock(e.unref(ue.AvailableRangeSetting),{key:0,"all-visible":a.detail.allVisible,"model-value":a.detail.visibleScope,class:e.normalizeClass(["pd-t-16",{"pd-b-16":!a.showPermissionSetting}]),ref_key:"availableRangeSettingRef",ref:v,"onUpdate:allVisible":b,"onUpdate:modelValue":y},null,8,["all-visible","model-value","class"])):e.createCommentVNode("",!0),a.showPermissionSetting?(e.openBlock(),e.createElementBlock("div",Ae,[e.createElementVNode("div",Ne,[c[0]||(c[0]=e.createElementVNode("span",{class:"mg-r-2",style:{color:"var(--el-color-danger)"}},"*",-1)),e.createTextVNode(" "+e.toDisplayString(e.unref(f)("PUTRESOURCEONSHELFDIALOG_TEXT.RESOURCE_PERMISSION_SETTING"))+" ",1),e.createVNode(e.unref(r.ElTooltip),{content:e.unref(f)("PUTRESOURCEONSHELFDIALOG_TEXT.RESOURCE_PERMISSION_SETTING_TOOLTIP"),placement:"top"},{default:e.withCtx(()=>[e.createVNode(e.unref(r.ElIcon),{class:"mg-l-4",size:"14px"},{default:e.withCtx(()=>[e.createVNode(e.unref(Z.IconTip))]),_:1})]),_:1},8,["content"])]),e.createElementVNode("div",me,[e.createVNode(e.unref(r.ElCheckbox),{"model-value":a.detail.openStatus,"onUpdate:modelValue":T,"true-value":e.unref(t.OPEN_STATUS_VALUE).TRUE,"false-value":e.unref(t.OPEN_STATUS_VALUE).FALSE,class:"mg-r-0"},{default:e.withCtx(()=>[e.createElementVNode("div",ye,e.toDisplayString(e.unref(f)("PUTRESOURCEONSHELFDIALOG_TEXT.FREE_RESOURCE")),1)]),_:1},8,["model-value","true-value","false-value"]),e.createElementVNode("span",Ie,e.toDisplayString(e.unref(f)("PUTRESOURCEONSHELFDIALOG_TEXT.FREE_RESOURCE_MCPKEY")),1)])])):e.createCommentVNode("",!0)]))}},ee=H._export_sfc(ge,[["__scopeId","data-v-3adfc427"]]),te={__name:"FeishuTooltip",props:{channelType:{type:[String,Number],required:!0}},setup(a){const{t:m}=B.useI18n();return(_,f)=>a.channelType===e.unref(t.RELEASE_CHANNEL_TYPE).FEISHU_WEB?(e.openBlock(),e.createBlock(e.unref(r.ElTooltip),{key:0,placement:"top"},{content:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(m)("SOURCE_PUBLISH.FEISHU_WEB_TOOLTIP")),1)]),default:e.withCtx(()=>[e.createVNode(e.unref(r.ElIcon),{size:"14px",color:"#999",style:{"margin-left":"5px"}},{default:e.withCtx(()=>[e.createVNode(e.unref(Z.IconTip))]),_:1})]),_:1})):e.createCommentVNode("",!0)}},le={__name:"ApiTooltip",props:{channelType:{type:[String,Number],required:!0},isAuth:{type:Boolean,required:!0}},setup(a){const{t:m}=B.useI18n();return(_,f)=>e.unref(t.API_CHANNEL_TYPES).includes(a.channelType)?(e.openBlock(),e.createBlock(e.unref(r.ElTooltip),{key:0,placement:"top"},{content:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.isAuth?e.unref(m)("SOURCE_PUBLISH.PUBLISH_AUTHORIZE_MSG")||"请先完成授权":e.unref(m)("SOURCE_PUBLISH.PUBLISH_ACCESS_TOKEN_MSG")||"调用需要创建访问凭证"),1)]),default:e.withCtx(()=>[e.createVNode(e.unref(r.ElIcon),{size:"14px",color:"#999",style:{"margin-left":"5px"}},{default:e.withCtx(()=>[e.createVNode(e.unref(Z.IconTip))]),_:1})]),_:1})):e.createCommentVNode("",!0)}},Le={class:"publish-settings"},be={class:"channel-name flex items-center overflow-hidden w-full"},Re={class:"channel-title flex-1 overflow-hidden"},Pe={class:"channel-title__name"},Be={class:"channel-title__desc"},Ve={key:0,class:"expand-content"},Ue={class:"select-label"},Oe={class:"select-label"},He={class:"select-label"},ke={class:"action-container"},we={class:"select-label"},xe={__name:"PublishSettings",props:{modelValue:{type:Array,default:()=>[]},sourceType:{type:String,default:w.SOURCE_TYPE.AGENT},channelManagement:{type:Array,default:()=>[]},isBackendSystem:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},authType:{type:String,default:""}},emits:["validateField","update:modelValue"],setup(a,{expose:m,emit:_}){const f=e.inject(t.STORE_DETAIL_TYPE),N=e.getCurrentInstance(),I=Y.useRouter();Y.useRoute();const v=_,T=a,{checkToken:b}=Q.getPublishApis(),y=e.ref(null),L=e.ref(null),C=e.ref(!1),c=e.ref(""),p=e.ref({}),{t:A}=B.useI18n(),x=e.ref([]),R=e.computed(()=>{const o=t.getChannelsByType(T.sourceType,T.channelManagement)||[];return T.isBackendSystem?o.filter(n=>n.channelType!=="3"):o}),D=o=>x.value?.find(n=>n.id===o.id)?.id?t.INACTIVE_ENUM.PUBLISHED:t.INACTIVE_ENUM.UNPUBLISHED,S={bakInt:[{required:!0,trigger:"change"}]},G=e.computed(()=>[{type:"selection",selectable:n=>T.disabled||n.id==t.RELEASE_CHANNEL_TYPE.AIBox?!1:t.API_CHANNEL_TYPES.includes(n.id)?C.value:!0,show:!T.isBackendSystem},{label:A("SOURCE_PUBLISH.PUBLISH_CHANNEL")||"发布渠道",prop:"name",slot:"name",show:!0},{type:"expand",prop:"expand",width:1,show:!0},{label:"",prop:"status",slot:"status",width:100,show:!T.isBackendSystem},{label:"",prop:"action",slot:"action",show:!0},{label:"",prop:"inActive",slot:"inActive",width:100,show:T.isBackendSystem}].filter(n=>n.show)),M=[{label:A("COMMON_HOOKS.SERVICE_TYPE_ENUMLIST.LABEL_1")||"专享服务",value:"PRIVATE"},{label:A("COMMON_HOOKS.SERVICE_TYPE_ENUMLIST.LABEL_2")||"开发者计算",value:"DEVELOPER"}],V=e.ref(!1),U=e.ref([]),k=o=>{if(x.value=o,V.value){V.value=!1,U.value=o,v("update:modelValue",o),v("validateField");return}const n=o.some(g=>g.id===t.RELEASE_CHANNEL_TYPE.FEISHU_WEB),s=o.some(g=>g.id===t.RELEASE_CHANNEL_TYPE.H5),i=U.value.some(g=>g.id===t.RELEASE_CHANNEL_TYPE.FEISHU_WEB),se=U.value.some(g=>g.id===t.RELEASE_CHANNEL_TYPE.H5),oe=n&&!i,ie=!s&&se;if(oe&&!s){const g=R.value.find(W=>W.id===t.RELEASE_CHANNEL_TYPE.H5);if(g){V.value=!0,r.ElMessage.warning(A("SOURCE_PUBLISH.FEISHU_H5_LINKAGE_SELECT")),e.nextTick(()=>{y.value?.handleToggleRowSelection(g,!0)});return}}if(ie&&n){const g=R.value.find(W=>W.id===t.RELEASE_CHANNEL_TYPE.FEISHU_WEB);if(g){V.value=!0,r.ElMessage.warning(A("SOURCE_PUBLISH.H5_FEISHU_LINKAGE_DESELECT")),e.nextTick(()=>{y.value?.handleToggleRowSelection(g,!1)});return}}U.value=o,v("update:modelValue",o),v("validateField")},K=o=>{const n=D(o);y.value?.handleToggleRowSelection(o,n)},X=(o,n)=>{o.allVisible=n.allVisible,o.visibleScope=n.visibleScope,o.openStatus=n.openStatus},F=async()=>{const o=await b();C.value=o.data||!1},O=(o,n)=>{n&&(p.value.bakInt=n.bakInt,c.value=n.serviceType,l.value=n.currency);const s=R.value.filter(i=>o.includes(i.id));s.forEach(i=>{y.value?.handleToggleRowSelection(i,!0)}),e.nextTick(()=>{k(s)})},q=()=>"no-expand",E=()=>{I.push({name:"ApiManage"})},l=e.ref(""),d=e.ref([]),u=e.ref(!1);e.watch(()=>T.modelValue,o=>{const n=[];if(o&&o.find(s=>t.STORE_CHANNEL_TYPES.includes(s.id))){const s=o.find(i=>t.STORE_CHANNEL_TYPES.includes(i.id));s&&n.push(s.id),u.value=!0}else u.value=!1;o&&o.find(s=>s.id===t.RELEASE_CHANNEL_TYPE.FEISHU_WEB)&&n.push(t.RELEASE_CHANNEL_TYPE.FEISHU_WEB),d.value=n},{immediate:!0,deep:!0});const P=o=>{const n=`permissionSettingRef_${o}`,s=N?.refs?.[n];if(s){const i=s.validateVisibleRange();return i.isValid?i.data:null}return null},h=async()=>L.value?(L.value.scrollToField("bakInt"),L.value.validate().catch(()=>(r.ElMessage.warning(A("SOURCE_PUBLISH.PUBLISH_CATEGORY_MSG")),Promise.reject(!1)))):!0;return e.onMounted(()=>{F()}),m({get bakInt(){return p.value.bakInt},serviceType:c,currency:l,channels:R,categoryForm:p,handleToggleRowSelection:O,getVisibleRangeData:P,validateCategory:h}),(o,n)=>(e.openBlock(),e.createElementBlock("div",Le,[e.createVNode(J._aiboxTable,{columns:G.value,data:R.value,"on-row-key":s=>s.id,total:R.value.length,style:{width:"100%"},hasPage:!1,"show-handle-nums":1,onRowClassName:q,"expand-row-keys":d.value,"default-expand-all":!1,onOnMultiSelection:k,ref_key:"aiboxTableRef",ref:y},{name:e.withCtx(({row:s})=>[e.createElementVNode("div",be,[e.createVNode($,{"publish-type":s.id,size:24},null,8,["publish-type"]),e.createElementVNode("div",Re,[e.createElementVNode("p",Pe,[e.createTextVNode(e.toDisplayString(s.name(a.sourceType))+" ",1),e.createVNode(le,{"channel-type":s.id,"is-auth":C.value},null,8,["channel-type","is-auth"]),e.createVNode(te,{"channel-type":s.id},null,8,["channel-type"])]),e.createElementVNode("p",Be,e.toDisplayString(s.description),1)])])]),expand:e.withCtx(({row:s})=>[s.id===e.unref(t.RELEASE_CHANNEL_TYPE).PLUGIN_STORE?(e.openBlock(),e.createElementBlock("div",Ve,[e.createVNode(e.unref(r.ElSelect),{modelValue:p.value.bakInt,"onUpdate:modelValue":n[0]||(n[0]=i=>p.value.bakInt=i),placeholder:e.unref(A)("SOURCE_PUBLISH.DEFAULT_SELECT_MSG")||"请选择",style:{width:"200px"},disabled:a.disabled},{prefix:e.withCtx(()=>[e.createElementVNode("div",Ue,e.toDisplayString(e.unref(A)("SOURCE_PUBLISH.CATEGORY")||"分类"),1),n[4]||(n[4]=e.createElementVNode("div",{class:"divider"},null,-1))]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(f),i=>(e.openBlock(),e.createBlock(e.unref(r.ElOption),{key:i.value,label:i.label,value:i.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder","disabled"]),T.authType=="1"?(e.openBlock(),e.createBlock(e.unref(r.ElSelect),{key:0,modelValue:c.value,"onUpdate:modelValue":n[1]||(n[1]=i=>c.value=i),placeholder:e.unref(A)("SOURCE_PUBLISH.DEFAULT_SELECT_MSG")||"请选择",style:{width:"200px"},disabled:a.disabled},{prefix:e.withCtx(()=>[e.createElementVNode("div",Oe,e.toDisplayString(e.unref(A)("SOURCE_PUBLISH.SERVICE_TYPE")||"服务类型"),1),n[5]||(n[5]=e.createElementVNode("div",{class:"divider"},null,-1))]),default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(M,i=>e.createVNode(e.unref(r.ElOption),{key:i.value,label:i.label,value:i.value},null,8,["label","value"])),64))]),_:1},8,["modelValue","placeholder","disabled"])):e.createCommentVNode("",!0),c.value===o.q.CURRENCY?(e.openBlock(),e.createBlock(e.unref(r.ElInputNumber),{key:1,modelValue:l.value,"onUpdate:modelValue":n[2]||(n[2]=i=>l.value=i),precision:2,style:{width:"200px"},"controls-position":"right",disabled:a.disabled},{prefix:e.withCtx(()=>[e.createElementVNode("div",He,e.toDisplayString(e.unref(A)("SOURCE_PUBLISH.CONSUME_VALUE")||"消费值"),1),n[6]||(n[6]=e.createElementVNode("div",{class:"divider"},null,-1))]),_:1},8,["modelValue","disabled"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),[e.unref(t.RELEASE_CHANNEL_TYPE).FEISHU_WEB,e.unref(t.RELEASE_CHANNEL_TYPE).AGENT_STORE,e.unref(t.RELEASE_CHANNEL_TYPE).MCP_STORE].includes(s.id)?(e.openBlock(),e.createBlock(ee,{key:1,"show-permission-setting":s.id===e.unref(t.RELEASE_CHANNEL_TYPE).MCP_STORE&&T.authType!=="0","show-available-range":T.authType!=="0","auth-type":T.authType,detail:s,ref:`permissionSettingRef_${s.id}`,"onUpdate:detail":i=>X(s,i)},null,8,["show-permission-setting","show-available-range","auth-type","detail","onUpdate:detail"])):e.createCommentVNode("",!0)]),status:e.withCtx(({row:s})=>[e.unref(t.AUTHORIZED_CHANNEL_TYPES).includes(s.id)?(e.openBlock(),e.createBlock(e.unref(r.ElTag),{key:0,type:"success"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(A)("SOURCE_PUBLISH.PUBLISH_AUTHORIZE_STATUS")||"已授权"),1)]),_:1})):e.unref(t.API_CHANNEL_TYPES).includes(s.id)?(e.openBlock(),e.createBlock(e.unref(r.ElTag),{key:1,type:C.value?"success":"info"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(C.value?e.unref(A)("SOURCE_PUBLISH.PUBLISH_AUTHORIZE_STATUS")||"已授权":e.unref(A)("SOURCE_PUBLISH.PUBLISH_UNAUTHORIZE_STATUS")||"未授权"),1)]),_:1},8,["type"])):e.createCommentVNode("",!0)]),inActive:e.withCtx(({row:s})=>[e.createVNode(e.unref(r.ElSelect),{"model-value":D(s),disabled:a.disabled,onChange:i=>K(s)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t.INACTIVE_LIST),i=>(e.openBlock(),e.createBlock(e.unref(r.ElOption),{key:i.value,label:i.label,value:i.value},null,8,["label","value"]))),128))]),_:1},8,["model-value","disabled","onChange"])]),action:e.withCtx(({row:s})=>[e.createElementVNode("div",ke,[e.unref(t.API_CHANNEL_TYPES).includes(s.id)&&!a.isBackendSystem?(e.openBlock(),e.createBlock(e.unref(r.ElButton),{key:0,type:"primary",link:"",onClick:i=>E()},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(A)("SOURCE_PUBLISH.CONFIG")||"配置"),1)]),_:1},8,["onClick"])):e.createCommentVNode("",!0),e.unref(t.STORE_CHANNEL_TYPES).slice(0,3).includes(s.id)&&a.sourceType!=e.unref(w.SOURCE_TYPE).PLUGIN&&u.value?(e.openBlock(),e.createBlock(e.unref(r.ElForm),{key:1,ref_key:"categoryFormRef",ref:L,model:p.value,rules:S},{default:e.withCtx(()=>[e.createVNode(e.unref(r.ElFormItem),{prop:"bakInt"},{default:e.withCtx(()=>[e.createVNode(e.unref(r.ElSelect),{modelValue:p.value.bakInt,"onUpdate:modelValue":n[3]||(n[3]=i=>p.value.bakInt=i),placeholder:e.unref(A)("SOURCE_PUBLISH.DEFAULT_SELECT_MSG")||"请选择",style:{width:"150px"},disabled:a.disabled},{prefix:e.withCtx(()=>[e.createElementVNode("div",we,e.toDisplayString(e.unref(A)("SOURCE_PUBLISH.CATEGORY")||"分类"),1),n[7]||(n[7]=e.createElementVNode("div",{class:"divider"},null,-1))]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(f),i=>(e.openBlock(),e.createBlock(e.unref(r.ElOption),{key:i.value,label:i.label,value:i.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder","disabled"])]),_:1})]),_:1},8,["model"])):e.createCommentVNode("",!0)])]),_:1},8,["columns","data","on-row-key","total","expand-row-keys"])]))}},ae=H._export_sfc(xe,[["__scopeId","data-v-a56e8ff6"]]),De={class:"publish-container__back"},Fe={class:"publish-container__config"},Ye={class:"publish-container__config"},Ge={__name:"layout",props:{showPublishConfig:{type:Boolean,default:!0},propsSourceBnid:{type:String,default:""},propsSourceType:{type:String,default:""},propsAuthType:{type:String,default:""},businessSpace:{type:String,default:""},isBackendSystem:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},rowBnid:{type:String,default:""},isShowBack:{type:Boolean,default:!0},isRepublish:{type:Boolean,default:!1},isOfficialRelease:{type:Boolean,default:!1}},setup(a,{expose:m}){const _=e.ref(null),f=e.ref(null),N=Y.useRoute(),I=Y.useRouter(),v=e.ref(!1),T=e.ref(!1),b=e.ref(!1),y=e.ref(""),L=e.ref(""),C=e.ref(""),{t:c}=B.useI18n(),p=a,{sourcePublish:A,checkVersion:x,getPublishVersionDetail:R,sourceRePublish:D}=Q.getPublishApis(),S=e.ref({versionNumber:"0.0.1",selectedData:[],showExec:1}),G=e.ref({versionNumber:[{required:!0,message:c("SOURCE_PUBLISH.VERSION_NUMBER_MSG")||"请输入版本号",trigger:"blur"},{pattern:/^\d+\.\d+\.\d+$/,message:"版本号格式必须为数字.数字.数字,如:1.0.0",trigger:"blur"},{validator:async(E,l,d)=>{if(T.value)return;T.value=!0;const{data:u}=await x({sourceType:y.value,sourceId:L.value,versionNumber:S.value.versionNumber}).finally(()=>{T.value=!1});if(u){const P=c("SOURCE_PUBLISH.VERSION_NUMBER_EXIST_MSG")||"版本号已存在";d(new Error(P))}else d()},trigger:"blur"}],selectedData:[{required:!p.isBackendSystem,message:c("SOURCE_PUBLISH.PUBLISH_CHANNEL_MSG")||"请至少选择一个发布渠道",trigger:"change"},{validator:(E,l,d)=>{if(S.value.selectedData.length===0){p.isBackendSystem&&d();const u=c("SOURCE_PUBLISH.PUBLISH_CHANNEL_MSG")||"请至少选择一个发布渠道";d(new Error(u))}else d()},trigger:"change"}]}),M=()=>{f.value?.validateField("selectedData")},V=E=>{const l=E.replace(/[^0-9.]/g,""),d=l.split(".");d.length>3?S.value.versionNumber=d.slice(0,3).join("."):S.value.versionNumber=l},U=async()=>{k(()=>{const E=window.history.state;E&&I.replace({path:E.back,query:{active:"publish",from:N.query.from}})})},k=async E=>{const l=await X();if(!l)return;v.value=!0;const d=p.isRepublish?D:A;try{const{code:u}=await d(l);u===0&&typeof E=="function"&&E()}finally{v.value=!1}},K=E=>{O.value,O.value.forEach(l=>{E.find(u=>u.channelType===l.channelType)||E.push({channelType:l.channelType,inActive:0,allVisible:l.allVisible||!1,visibleScope:l.visibleScope||null})})},X=async()=>{if(await f.value.validate()){let l={};const d=[];for(const h of S.value.selectedData){const o={channelType:Number(h.id)},n=[t.RELEASE_CHANNEL_TYPE.FEISHU_WEB,t.RELEASE_CHANNEL_TYPE.AGENT_STORE,t.RELEASE_CHANNEL_TYPE.MCP_STORE],s=_.value.getVisibleRangeData(h.id);if(n.includes(h.id)&&!s)return!1;s&&Object.keys(s).length>0&&(o.visibleScope=s.visibleScope,o.allVisible=s.allVisible,o.openStatus=s.openStatus),p.isRepublish&&(o.inActive=1,o.visibleScope=s?.visibleScope||null,o.allVisible=s?.allVisible||!1),d.push(o)}if(p.isBackendSystem){const h=Number(t.RELEASE_CHANNEL_TYPE.AIBox);d.some(n=>n.channelType===h)||d.push({channelType:h})}p.isRepublish&&K(d),p.isRepublish?(d.forEach(h=>{h.visibleScope||(h.visibleScope=null),h.allVisible||(h.allVisible=!1),t.STORE_CHANNEL_TYPES.includes((h.channelType||"").toString())&&(h.bakInt=_.value.bakInt)}),l={channels:d,bnid:p.rowBnid,sourceType:y.value,sourceId:L.value,serviceType:"2"}):l={...S.value,channels:d,sourceType:y.value,sourceId:L.value,workspaceBnid:p.businessSpace||""},y.value==w.SOURCE_TYPE.WORKFLOW&&(l.forcePublish=!0);let u=!1;const P=S.value.selectedData.map(h=>h.id);if(u=P.find(h=>[t.RELEASE_CHANNEL_TYPE.AGENT_STORE,t.RELEASE_CHANNEL_TYPE.WORKFLOW_STORE,t.RELEASE_CHANNEL_TYPE.PLUGIN_STORE,t.RELEASE_CHANNEL_TYPE.MCP_STORE].includes(h)),u){if(await _.value?.validateCategory?.()===!1)return!1;if(l.bakInt=_.value.bakInt,P.includes(t.RELEASE_CHANNEL_TYPE.PLUGIN_STORE)&&C.value=="1"&&(l.serviceType=_.value.serviceType,!l.serviceType)){const o=c("SOURCE_PUBLISH.PUBLISH_SERVICE_TYPE_MSG")||"请选择服务类型";return r.ElMessage.warning(o),!1}}return l.official=p.isOfficialRelease,delete l.selectedData,l}else return console.log("error submit!"),!1},F=e.ref({}),O=e.ref([]),q=async()=>{b.value=!0;const{data:E}=await R(y.value,L.value);if(b.value=!1,E){const l=E.versionNumber.split(".");l.length===3?l[2]=parseInt(l[2])+1:l.push("1"),F.value=E,S.value.versionNumber=l.join("."),S.value.versionDesc=E.versionDesc,S.value.showExec=E.showExec,S.value.showKnowledge=E.showKnowledge,_.value&&(_.value.categoryForm.bakInt=E?.bakInt||"")}O.value=E?.channels||[],e.nextTick(()=>{let l=[];const d={};if(E?.channels.forEach(u=>{l.push(String(u.channelType)),(u.bakInt||u.bakInt==0)&&(d.bakInt=String(u.bakInt)),(u.serviceType||u.serviceType==0)&&(d.serviceType=String(u.serviceType)),(u.currency||u.currency==0)&&(d.currency=u.currency)}),l.length==0)y.value==w.SOURCE_TYPE.AGENT?l=[t.RELEASE_CHANNEL_TYPE.AGENT_STORE,t.RELEASE_CHANNEL_TYPE.AIBox]:l=[t.RELEASE_CHANNEL_TYPE.AIBox];else{const u=l.find(P=>P==t.RELEASE_CHANNEL_TYPE.AIBox);y.value==w.SOURCE_TYPE.AGENT&&!u&&l.push(t.RELEASE_CHANNEL_TYPE.AIBox)}_.value?.handleToggleRowSelection(l,d)})};return e.onMounted(()=>{y.value=p.propsSourceType,C.value=p.propsAuthType,L.value=p.propsSourceBnid,q()}),m({handleSourcePublish:k,publishData:F,submitLoading:v}),(E,l)=>{const d=e.resolveDirective("loading");return e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["publish-container",a.isBackendSystem?"backend-system":""]),id:"source-publish-container"},[a.isBackendSystem?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(J._sfc_main,{key:0,"back-bar-style":"#f7f8fa"},{default:e.withCtx(()=>[e.createElementVNode("div",De,[e.createElementVNode("span",null,e.toDisplayString(e.unref(c)("SOURCE_PUBLISH.PUBLISH")||"发布"),1),e.createVNode(e.unref(r.ElButton),{type:"primary",class:"publish-container__sure",onClick:U,loading:v.value,disabled:a.disabled},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(c)("SOURCE_PUBLISH.SURE_PUBLISH")||"确认发布"),1)]),_:1},8,["loading","disabled"])])]),_:1})),e.createVNode(e.unref(r.ElForm),{ref_key:"formRef",ref:f,model:S.value,"label-width":"80px",class:"publish-container__form",rules:G.value,"label-position":"top",disabled:a.disabled,onSubmit:l[5]||(l[5]=e.withModifiers(()=>{},["prevent"]))},{default:e.withCtx(()=>[a.isRepublish?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(z,{key:0},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(c)("SOURCE_PUBLISH.PUBLISH_RECORD")||"发布记录"),1)]),_:1})),a.isRepublish?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(j,{key:1},{default:e.withCtx(()=>[e.createVNode(e.unref(r.ElFormItem),{label:e.unref(c)("SOURCE_PUBLISH.VERSION_NUMBER")||"版本号",prop:"versionNumber"},{default:e.withCtx(()=>[e.createVNode(e.unref(r.ElInput),{modelValue:S.value.versionNumber,"onUpdate:modelValue":l[0]||(l[0]=u=>S.value.versionNumber=u),placeholder:e.unref(c)("SOURCE_PUBLISH.VERSION_PLACEHOLDER")||"版本示例:0.0.1",onInput:V},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(e.unref(r.ElFormItem),{label:e.unref(c)("SOURCE_PUBLISH.VERSION_DESC")||"版本描述",prop:"versionDesc"},{default:e.withCtx(()=>[e.createVNode(e.unref(r.ElInput),{type:"textarea",modelValue:S.value.versionDesc,"onUpdate:modelValue":l[1]||(l[1]=u=>S.value.versionDesc=u),rows:4,maxlength:"2000","show-word-limit":"",placeholder:e.unref(c)("SOURCE_PUBLISH.VERSION_DESC")||"版本描述"},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})),a.showPublishConfig&&!a.isRepublish?(e.openBlock(),e.createBlock(z,{key:2},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(c)("SOURCE_PUBLISH.PUBLISH_CONFIG")||"发布配置"),1)]),_:1})):e.createCommentVNode("",!0),a.showPublishConfig&&!a.isRepublish?(e.openBlock(),e.createBlock(j,{key:3},{default:e.withCtx(()=>[e.createVNode(e.unref(r.ElFormItem),{prop:"showExec"},{default:e.withCtx(()=>[e.createElementVNode("div",Fe,[e.createElementVNode("p",null,[l[6]||(l[6]=e.createElementVNode("img",{src:de,width:"20",height:"20",alt:""},null,-1)),e.createElementVNode("span",null,e.toDisplayString(e.unref(c)("SOURCE_PUBLISH.SHOW_EXECUTE_PROCESS")||"展示执行过程"),1)]),e.createVNode(e.unref(r.ElSwitch),{modelValue:S.value.showExec,"onUpdate:modelValue":l[2]||(l[2]=u=>S.value.showExec=u),"active-value":1,"inactive-value":0},null,8,["modelValue"])])]),_:1}),e.createVNode(e.unref(r.ElFormItem),{prop:"showKnowledge"},{default:e.withCtx(()=>[e.createElementVNode("div",Ye,[e.createElementVNode("p",null,[l[7]||(l[7]=e.createElementVNode("img",{src:Ee,width:"20",height:"20",alt:""},null,-1)),e.createElementVNode("span",null,e.toDisplayString(e.unref(c)("SOURCE_PUBLISH.SHOW_RECALL_KNOWLEDGE")||"展示召回的知识库内容"),1)]),e.createVNode(e.unref(r.ElSwitch),{modelValue:S.value.showKnowledge,"onUpdate:modelValue":l[3]||(l[3]=u=>S.value.showKnowledge=u),"active-value":1,"inactive-value":0},null,8,["modelValue"])])]),_:1})]),_:1})):e.createCommentVNode("",!0),a.isRepublish?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(z,{key:4},{default:e.withCtx(()=>[l[8]||(l[8]=e.createElementVNode("span",{class:"publish-container__required"},"*",-1)),e.createTextVNode(e.toDisplayString(e.unref(c)("SOURCE_PUBLISH.PUBLISH_SETTING")||"发布设置"),1)]),_:1})),e.createVNode(j,null,{default:e.withCtx(()=>[e.createVNode(e.unref(r.ElFormItem),{prop:"selectedData"},{default:e.withCtx(()=>[e.createVNode(ae,{ref_key:"publishSettingsRef",ref:_,"source-type":y.value,"channel-management":O.value,modelValue:S.value.selectedData,"onUpdate:modelValue":l[4]||(l[4]=u=>S.value.selectedData=u),"is-backend-system":a.isBackendSystem,disabled:a.disabled,"auth-type":C.value,onValidateField:M},null,8,["source-type","channel-management","modelValue","is-backend-system","disabled","auth-type"])]),_:1})]),_:1})]),_:1},8,["model","rules","disabled"])],2)),[[d,b.value]])}}},Me=H._export_sfc(Ge,[["__scopeId","data-v-d37f49c4"]]),Ke=()=>{const{t:a}=B.useI18n();return{serviceType:[{get label(){return a("COMMON_DICT.SERVICE_TYPE.PRIVATE")},value:t.serviceTypeMap.PRIVATE},{get label(){return a("COMMON_DICT.SERVICE_TYPE.DEVELOPER")},value:t.serviceTypeMap.DEVELOPER}],serviceStatus:[{get label(){return a("COMMON_DICT.SERVICE_STATUS.IN_CALL")},value:"IN_CALL"},{get label(){return a("COMMON_DICT.SERVICE_STATUS.NO_CONFIG")},value:"NO_CONFIG"}]}},Xe=()=>{const{getStoreDetailType:a}=Q.getPublishApis(),{t:m}=B.useI18n(),_=e.ref([]),f=e.ref([]);return{storeDetailType:_,allStoreDetailType:f,fetchStoreDetailType:async()=>{await a().then(I=>{const v=I?.data?.map(b=>({label:b.desc,value:String(b.code)})),T={value:"0",label:m("STOREDETAILTYPE_STORECONTENTLAYOUT.LABEL_ALL")};_.value=v,f.value=[T,...v]})}}},ne=re.withInstall(Me);exports.API_CHANNEL_TYPES=t.API_CHANNEL_TYPES;exports.AUTHORIZED_CHANNEL_TYPES=t.AUTHORIZED_CHANNEL_TYPES;exports.CHANNEL_ICON_CONFIG=t.CHANNEL_ICON_CONFIG;exports.INACTIVE_ENUM=t.INACTIVE_ENUM;exports.INACTIVE_LIST=t.INACTIVE_LIST;exports.LIBRARY_PAGE=t.LIBRARY_PAGE;exports.OFFICIAL_LABEL=t.OFFICIAL_LABEL;exports.OPEN_STATUS_VALUE=t.OPEN_STATUS_VALUE;exports.PUBLISH_STATUS_COLORS=t.PUBLISH_STATUS_COLORS;exports.PUBLISH_STATUS_ICONS=t.PUBLISH_STATUS_ICONS;exports.PUBLISH_STATUS_TEXT=t.PUBLISH_STATUS_TEXT;exports.PUBLISH_STATUS_TYPE=t.PUBLISH_STATUS_TYPE;exports.PUBLISH_TYPE_ICON_MAPPING=t.PUBLISH_TYPE_ICON_MAPPING;exports.RELEASE_CHANNEL_CONFIG=t.RELEASE_CHANNEL_CONFIG;exports.RELEASE_CHANNEL_TYPE=t.RELEASE_CHANNEL_TYPE;exports.STORE_CHANNEL_TYPES=t.STORE_CHANNEL_TYPES;exports.STORE_DETAIL_TYPE=t.STORE_DETAIL_TYPE;exports.getChannelsByType=t.getChannelsByType;exports.serviceTypeMap=t.serviceTypeMap;exports.PUBLISH_STATUS=ce.PUBLISH_STATUS;exports.ApiTooltip=le;exports.FeishuTooltip=te;exports.PermissionSetting=ee;exports.PublishIcon=$;exports.PublishSettings=ae;exports.SourcePublish=ne;exports.default=ne;exports.useServiceConfig=Ke;exports.useStoreDetailType=Xe;
|
package/lib/Table.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("./chunks/index.CkihWzK6.js"),e=require("./chunks/BackBar.CZsNxoX1.js"),a=t.withInstall(e._aiboxTable);exports.BackBar=e._sfc_main;exports.TableBtns=e.TableBtns;exports.AiboxTable=a;exports.default=a;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.ai-box-tabs[data-v-bdfc72c7]{display:inline-block;height:32px}.ai-box-tabs ul[data-v-bdfc72c7]{display:flex;align-items:center}.ai-box-tabs ul li[data-v-bdfc72c7]{padding:6px 16px;border-radius:4px;margin-right:8px;color:#606266;font-size:14px;cursor:pointer;transition:all .3s}.ai-box-tabs ul li[data-v-bdfc72c7]:hover{color:var(--el-color-primary);background-color:#f0f2f5}.ai-box-tabs ul .current[data-v-bdfc72c7]{background:#f5f7fa;color:#262626;font-weight:500}.style-2[data-v-bdfc72c7]{background-color:#f5f5f5!important;padding:0 4px;height:32px;display:inline-flex;align-items:center;box-sizing:border-box;border-radius:8px;overflow:hidden}.style-2 li[data-v-bdfc72c7]{color:#666!important;display:flex;align-items:center;height:26px;border-radius:14px;padding:0 16px!important}.style-2 li[data-v-bdfc72c7]:hover{border-radius:8px;background-color:#e1edf7!important}.style-2 li.current[data-v-bdfc72c7]{border-radius:8px;color:#262626!important;background:#fff!important}.style-3[data-v-bdfc72c7]{background:#ffffff80;border:1px solid rgba(255,255,255,.2);padding:0 4px;height:36px;display:inline-flex;align-items:center;box-sizing:border-box;border-radius:18px;overflow:hidden}.style-3 li[data-v-bdfc72c7]{color:#7f8387!important;display:flex;align-items:center;height:28px;border-radius:14px;padding:0 16px!important}.style-3 li[data-v-bdfc72c7]:hover{background-color:#e1edf7!important;border-radius:14px}.style-3 li.current[data-v-bdfc72c7]{color:#262626!important;background:#fff!important;border-radius:14px}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@charset "UTF-8";.table-btns[data-v-a15d8f7e]{display:flex;align-items:center;cursor:pointer;color:var(--el-color-primary)}.table-btns[data-v-a15d8f7e]>*:not(:first-child){margin-left:10px}.table-btns .btn-box[data-v-a15d8f7e]{display:flex;justify-content:center;align-items:center;width:24px;height:24px;outline:none;border-radius:4px}.table-btns .btn-box[data-v-a15d8f7e]:hover{background:#ecedee}.custom-dropdown{border-radius:8px;background:#fff;box-shadow:0 6px 40px 16px #00000005,0 4px 28px #00000005,0 3px 16px -8px #0000000a}.custom-dropdown .el-dropdown-menu{min-width:106px;padding:5px 4px!important;border-radius:8px}.custom-dropdown .el-dropdown-menu .el-dropdown-menu__item{font-size:14px;color:var(--color-text-base);border-radius:4px}.custom-dropdown .el-dropdown-menu .el-dropdown-menu__item:not(.is-disabled):hover,.custom-dropdown .el-dropdown-menu .el-dropdown-menu__item:not(.is-disabled):focus{background-color:#f5f5f5}.custom-dropdown .el-dropdown-menu .el-dropdown-menu__item.is-delete{color:#f5222d}.aibox-table[data-v-1e856800]{background:#fff;border-radius:4px;position:relative}.aibox-table__handle[data-v-1e856800]{height:54px;box-sizing:border-box;padding:0 20px 18px;display:flex;justify-content:space-between;align-items:center}.aibox-table__handle .handle-left[data-v-1e856800],.aibox-table__handle .handle-right[data-v-1e856800]{display:flex;align-items:center}.aibox-table__pages[data-v-1e856800]{position:absolute;bottom:-45px;right:0}.aibox-table__page[data-v-1e856800]{margin-top:10px;display:flex;justify-content:end;margin-bottom:10px}.aibox-table__header[data-v-1e856800]{height:55px;line-height:55px;font-family:"Alibaba PuHuiTi 3-55";font-weight:700;font-size:14px;color:var(--color-text-base)}.aibox-table__header.secondary-header .el-table__cell[data-v-1e856800]{background-color:#fafafa!important}.aibox-table .el-table__cell[data-v-1e856800]{padding:0}.aibox-table__slot-wrapper[data-v-1e856800]{width:100%}.el-table[data-v-1e856800]{--el-table-row-hover-bg-color: #fafafa}.el-table .cell[data-v-1e856800]{padding:16px;line-height:1.5;min-height:48px}.row-click-style .el-table__row[data-v-1e856800]:hover{cursor:pointer}.aibox-table.no-pagination .el-table--border[data-v-1e856800]:after,.aibox-table.no-pagination .el-table--border[data-v-1e856800]:before,.aibox-table.no-pagination .el-table--border .el-table__inner-wrapper[data-v-1e856800]:after,.aibox-table.no-pagination .el-table__inner-wrapper[data-v-1e856800]:before{background-color:transparent!important}[data-v-1e856800]::deep(.aibox-table__select-all-disabled .el-checkbox){pointer-events:none}[data-v-1e856800]::deep(.aibox-table__select-all-disabled .el-checkbox__input){cursor:not-allowed}[data-v-1e856800]::deep(.aibox-table__select-all-disabled .el-checkbox__inner){background-color:var(--el-checkbox-disabled-input-fill);border-color:var(--el-checkbox-disabled-border-color)}.back-bar{box-sizing:border-box;display:flex;align-items:center;width:100%;padding:12px 20px;height:64px;background:#f7f8fa;border-bottom:1px solid #f0f0f0}.back-bar__icon{display:flex;align-items:center;justify-content:center;height:18px;width:18px;border-radius:4px;margin-right:10px;cursor:pointer}.back-bar__icon:hover{background:#f0f0f0}.back-bar .back-bar__title{font-weight:700;font-size:16px;color:#262626;line-height:22px}.back-bar__tip{margin-left:10px;display:flex;align-items:center;cursor:help}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.status-tag-content[data-v-59c4f44d]{gap:4px}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.el-overlay-dialog{display:flex;justify-content:center;align-items:center}.el-overlay-dialog .el-dialog{margin:0}.el-dialog{display:flex;flex-direction:column}.el-dialog .el-dialog__body{flex:1;overflow:auto}.not-fullscreen{max-height:calc(100% - 60px)}.dialog-container{border-radius:8px;padding:20px 24px}.dialog-container .el-dialog__headerbtn{top:6px}.dialog-container .el-dialog__headerbtn .el-dialog__close{font-size:20px}.dialog-container .el-dialog__header{font-size:16px;font-weight:700;border-top-left-radius:4px;border-top-right-radius:4px}.dialog-container .el-dialog__footer{padding-top:30px}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.publish-record[data-v-0b0f197b]{height:100%;display:flex;align-items:center;justify-content:center}.publish-record__list[data-v-0b0f197b]{width:800px;height:100%}.publish-record .backend-system[data-v-0b0f197b]{height:50vh}.publish-record__item[data-v-0b0f197b]{margin-bottom:40px}.publish-record__item--time[data-v-0b0f197b]{font-weight:400;font-size:13px;color:var(--color-text-light1);margin-bottom:16px}.publish-record__item--edition[data-v-0b0f197b]{font-weight:700;font-size:16px;position:relative;padding-left:10px}.publish-record__item--edition.active[data-v-0b0f197b]:before{background:var(--el-color-primary)}.publish-record__item--edition.in-active[data-v-0b0f197b]:before{background:var(--el-color-danger)}.publish-record__item--edition[data-v-0b0f197b]:before{content:"";position:absolute;top:50%;left:0;transform:translateY(-50%);width:5px;height:5px;border-radius:50%}.publish-record__item--type[data-v-0b0f197b]{font-weight:400;border-radius:4px;padding:0 4px;margin-left:5px;display:inline-block;line-height:22px}.publish-record__item--both[data-v-0b0f197b]{background:#f4ffee;border:1px solid #aeed96;color:#389e0d}.publish-record__item--only[data-v-0b0f197b]{background:#e5ebff;border:1px solid #99b0ff;color:var(--el-color-primary)}.publish-record__item--number[data-v-0b0f197b]{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}.publish-record__item--content[data-v-0b0f197b]{font-weight:400;font-size:12px;color:var(--color-text-light2);margin-bottom:16px;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden;cursor:pointer}.publish-record__item--back[data-v-0b0f197b]{color:var(--el-color-primary);display:flex;align-items:center;padding:4px 6px}.publish-record__item--back[data-v-0b0f197b]:hover{background:#e5ebff;border-radius:4px;cursor:pointer}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@charset "UTF-8";.style-title[data-v-57d98e1c]{font-weight:500;font-size:18px;margin:24px 0 16px}.card-container[data-v-639f8796]{padding:16px;background:#fff;border-radius:10px;border:1px solid #f0f0f0}.channel-icon[data-v-cd6ad511]{width:34px;height:34px}.gap-6[data-v-3adfc427]{gap:6px}.gap-12[data-v-3adfc427]{gap:12px}.publish-settings[data-v-a56e8ff6]{width:100%}.publish-settings .channel-name[data-v-a56e8ff6]{display:flex;align-items:center}.publish-settings .channel-name .channel-title[data-v-a56e8ff6]{margin-left:10px;line-height:18px}.publish-settings .channel-name .channel-title__name[data-v-a56e8ff6]{font-size:14px}.publish-settings .channel-name .channel-title__desc[data-v-a56e8ff6]{font-size:13px;color:var(--color-text-light1)}.publish-settings .action-container[data-v-a56e8ff6]{text-align:right;width:100%;display:flex;justify-content:flex-end;align-items:center;gap:10px}.publish-settings .select-label[data-v-a56e8ff6]{color:#262626}.publish-settings .divider[data-v-a56e8ff6]{margin:0 2px;height:12px;border-right:1px solid #f0f0f0}.publish-settings .expand-content[data-v-a56e8ff6]{padding:20px 16px;display:flex;flex-direction:column;gap:20px;background:#fff}.publish-settings[data-v-a56e8ff6] .no-expand .el-table__expand-icon{display:none!important}.publish-container[data-v-d37f49c4]{background-color:#f7f8fa;height:100%}.publish-container__back[data-v-d37f49c4]{width:100%;display:flex;align-items:center;justify-content:space-between}.publish-container__form[data-v-d37f49c4]{width:800px;margin:0 auto;height:calc(100% - 70px);overflow:auto}.publish-container__form .channel-name[data-v-d37f49c4]{display:flex;align-items:center}.publish-container__form .channel-name .channel-icon[data-v-d37f49c4]{display:flex;justify-content:center;align-items:center;border-radius:8px;width:34px;height:34px}.publish-container__form .channel-name .channel-title[data-v-d37f49c4]{margin-left:10px;line-height:18px}.publish-container__form .channel-name .channel-title__name[data-v-d37f49c4]{font-size:14px}.publish-container__form .channel-name .channel-title__desc[data-v-d37f49c4]{font-size:13px;color:var(--color-text-light1)}.publish-container__config[data-v-d37f49c4]{width:100%;padding:7px 20px;display:flex;align-items:center;justify-content:space-between;background:#fafafa;border-radius:4px}.publish-container__config p[data-v-d37f49c4]{display:flex;align-items:center}.publish-container__config p img[data-v-d37f49c4]{margin-right:10px}.publish-container__required[data-v-d37f49c4]{color:var(--el-color-danger);font-size:14px}.publish-container[data-v-d37f49c4] .el-form .el-form-item:last-child{margin-bottom:0}.publish-container[data-v-d37f49c4] .card-container:last-child{padding:0 16px 16px}.backend-system[data-v-d37f49c4]{background-color:transparent}.backend-system .publish-container__form[data-v-d37f49c4]{height:auto}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.nowrap[data-v-eecd9e0b]{white-space:nowrap}.tag-list .tag-item[data-v-eecd9e0b]{display:inline-block;line-height:22px}.gap-4[data-v-eecd9e0b]{gap:4px}.tag-list-popover[data-v-eecd9e0b]{max-height:300px}.tag-list-popover-wrapper{z-index:10000!important}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";require('../assets/BackBar.css');const e=require("vue"),E=require("./i18n.CL5L6nx6.js"),C=require("color-message-aibox-vue"),a=require("element-plus"),S=require("./_plugin-vue_export-helper.BHFhmbuH.js"),F=require("vue-router"),L={class:"table-btns"},H={class:"btn-box"},I={__name:"TableBtns",props:{config:{type:Array,required:!0,default(){return[]}},showNums:{type:Number,default:0,validator(n){return n%1===0&&n>=0}},row:{type:Object,default:()=>({})}},setup(n){const p=n,{t:k}=E.useI18n(),r=(d,f)=>{d&&d(f)},i=e.computed(()=>p.config.filter(d=>{const f=d.permission!==void 0?d.permission:!0;let c=!0;return d.dataPermission&&(c=d.dataPermission),f&&c})),h=e.computed(()=>({show:i.value.slice(0,p.showNums),hide:i.value.slice(p.showNums)}));return(d,f)=>(e.openBlock(),e.createElementBlock("div",L,[i.value.length>n.showNums?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.show,(c,b)=>(e.openBlock(),e.createBlock(e.unref(a.ElButton),{key:b,type:"primary",link:"",onClick:g=>r(c.fn,c.row)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.label),1)]),_:2},1032,["onClick"]))),128)),e.createVNode(e.unref(a.ElDropdown),{"popper-class":"custom-dropdown",trigger:"click"},{dropdown:e.withCtx(()=>[e.createVNode(e.unref(a.ElDropdownMenu),{style:{padding:"14px 0"}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.hide,(c,b)=>(e.openBlock(),e.createBlock(e.unref(a.ElDropdownItem),{key:b,class:e.normalizeClass({"is-delete":c.label===e.unref(k)("COMMON_BUTTON.DELETE_TEXT")||c.label===e.unref(k)("COMMON_BUTTON.DISABLE_TEXT")||c.isDanger}),onClick:g=>r(c.fn,c.row)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.label),1)]),_:2},1032,["class","onClick"]))),128))]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("div",H,[e.createVNode(e.unref(a.ElIcon),{style:{"font-size":"20px",color:"#999"}},{default:e.withCtx(()=>[e.createVNode(e.unref(C.IconMore))]),_:1})])]),_:1})],64)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(i.value,(c,b)=>(e.openBlock(),e.createBlock(e.unref(a.ElButton),{type:"primary",link:"",key:b,onClick:g=>r(c.fn,c.row)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.label),1)]),_:2},1032,["onClick"]))),128))]))}},_=S._export_sfc(I,[["__scopeId","data-v-a15d8f7e"]]),W={key:0,class:"aibox-table__handle"},q={class:"handle-left"},j={class:"handle-right"},K={class:"aibox-table__content"},X={key:0},U={class:"aibox-table__slot-wrapper"},G={class:"aibox-table__slot-wrapper"},Y=["innerHTML"],Z=["innerHTML"],J={class:"aibox-table__slot-wrapper"},Q=["onClick"],ee={class:"aibox-table__slot-wrapper"},le=["onClick"],te={class:"aibox-table__slot-wrapper"},oe={class:"flex items-center"},ne={class:"aibox-table__slot-wrapper"},ae={key:0,class:"aibox-table__slot-wrapper"},re={__name:"AiboxTable",props:{columns:{type:Array,default:()=>[]},data:{type:Array,default:()=>[]},total:{type:[String,Number],default:0},hasPage:{type:Boolean,default:!0},onRowKey:{type:Function,default:()=>{}},onRowClassName:{type:Function,default:()=>{}},maxHeight:{type:[String,Number],default:null},isLoading:{type:Boolean,default:!1},pages:{type:Object,default:()=>({page:1,size:10})},showChangeSize:{type:Boolean,default:!0},isCustomEmpty:{type:Boolean,default:!1},hasBorder:{type:Boolean,default:!1},hasHeaderHandle:{type:Boolean,default:!1},isSecondaryHeader:{type:Boolean,default:!1},defaultSort:{type:Object},spanMethod:{type:Function,default:()=>{}},showSummary:{type:Boolean,default:!1},summaryMethod:{type:Function,default:()=>[]},showHandleNums:{type:Number,default:0},selectionType:{type:String,default:"checkbox"},expandRowKeys:{type:Array,default:()=>[]},isCanRowClick:{type:Boolean,default:!1},isPagePostion:{type:Boolean,default:!0},treeProps:{type:Object,default:()=>({children:"children",hasChildren:"hasChildren"})},defaultExpandAll:{type:Boolean,default:!0},pagerCount:{type:Number,default:7},size:{type:String,default:"default"}},emits:["onPageChange","onMultiSelection","onSortChange","onCellDblclick","onRowClick"],setup(n,{expose:p,emit:k}){const r=n,{t:i}=E.useI18n(),h=e.ref(null),d=e.ref([]),f=e.computed(()=>typeof r.total=="string"?Number(r.total):r.total),c=e.computed(()=>r.showChangeSize?"total, sizes, prev, pager, next, jumper":"total, prev, pager, next, jumper"),b=e.computed(()=>f.value>10&&r.hasPage),g=e.computed(()=>r.columns?.find?.(s=>s?.type==="selection")?.selectable||B),N=e.computed(()=>{const o=r.data||[];if(!o.length)return!1;const s=g.value;return!o.some((l,t)=>s(l,t))}),v=({column:o})=>o?.type==="selection"&&N.value?"aibox-table__select-all-disabled":"",u=k,B=()=>!0,T=o=>r.onRowKey(o,s=>s),V=o=>r.onRowClassName(o),$=o=>{u("onPageChange",{...r.pages,page:o})},M=o=>{u("onPageChange",{page:1,size:o})},D=o=>{r.selectionType!=="radio"&&u("onMultiSelection",o)},m=o=>{if(r.selectionType==="radio"){const s=d.value;if(x(),s.length==1){const[l]=s,t=l.id!==o.id;t?(d.value=[o],u("onMultiSelection",[o])):(d.value=[],u("onMultiSelection",[])),y(o,t)}else y(o,!0),d.value=[o],u("onMultiSelection",[o])}},x=()=>{h.value?.clearSelection(),u("onMultiSelection",[])},z=()=>{h.value?.clearSort()},A=o=>{u("onSortChange",o)},P=(o,s,l,t)=>{u("onCellDblclick",o,s,l,t)},R=o=>{r.selectionType==="radio"&&m(o)},O=(o,s,l)=>{s?.type==="action"||!r.isCanRowClick||u("onRowClick",o,s,l)},y=(o,s)=>{h.value?.toggleRowSelection(o,s)};return p({handleClearSelection:x,handleToggleRowSelection:y,clearSort:z}),(o,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([{"row-click-style":n.isCanRowClick,"no-pagination":!b.value},"aibox-table"])},[n.hasHeaderHandle?(e.openBlock(),e.createElementBlock("div",W,[e.createElementVNode("div",q,[e.renderSlot(o.$slots,"handleLeft",{},void 0,!0)]),e.createElementVNode("div",j,[e.renderSlot(o.$slots,"handleRight",{},void 0,!0)])])):e.createCommentVNode("",!0),e.createElementVNode("div",K,[e.createVNode(e.unref(a.ElTable),{ref_key:"aiboxTable",ref:h,"element-loading-text":e.unref(i)("COMMON_DATA.LOADING_SUFFIX"),"tree-props":n.treeProps,"header-row-class-name":n.isSecondaryHeader?"aibox-table__header secondary-header":"aibox-table__header","header-cell-class-name":v,"row-class-name":V,data:n.data,border:n.hasBorder,style:{width:"100%"},"row-key":T,height:n.maxHeight,"default-sort":n.defaultSort,"span-method":n.spanMethod,"expand-row-keys":n.expandRowKeys,onSelectionChange:D,onSortChange:A,onCellDblclick:P,onCurrentChange:m,"show-summary":n.showSummary,"summary-method":n.summaryMethod,onSelect:R,onRowClick:O,"default-expand-all":n.defaultExpandAll},{empty:e.withCtx(()=>[n.isCustomEmpty?(e.openBlock(),e.createElementBlock("div",ae,[e.renderSlot(o.$slots,"customEmpty",{},void 0,!0)])):(e.openBlock(),e.createBlock(e.unref(a.ElEmpty),{key:1,description:e.unref(i)("COMMON_DATA.EMPTY"),"image-size":80},null,8,["description"]))]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.columns,l=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[l.type==="selection"?(e.openBlock(),e.createBlock(e.unref(a.ElTableColumn),{key:l.type,type:"selection",fixed:"left",width:l.width||"50px","reserve-selection":!0,selectable:l.selectable||B},null,8,["width","selectable"])):l.type==="index"?(e.openBlock(),e.createBlock(e.unref(a.ElTableColumn),{key:`${l.type-l.label}`,type:"index",label:e.unref(i)("COMMON_DATA.SNO_INDEX"),fixed:"left",width:l.width||"100px"},{default:e.withCtx(t=>[n.isLoading?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",X,e.toDisplayString((n.pages.page-1)*n.pages.size+t.$index+1),1))]),_:1},8,["label","width"])):l.slot?(e.openBlock(),e.createBlock(e.unref(a.ElTableColumn),{align:l.align||"left",key:l.prop,prop:l.prop,label:l.label,width:l.width,"min-width":l.minWidth,"label-class-name":"label-space-style","class-name":"multi-row",fixed:l.fixed,sortable:l.sortable,"show-overflow-tooltip":l.showOverflowTooltip},e.createSlots({default:e.withCtx(t=>[e.createElementVNode("div",G,[e.renderSlot(o.$slots,l.slot,{row:t.row,index:t.$index,minWidth:l.minWidth},void 0,!0)])]),_:2},[l.headerSlot?{name:"header",fn:e.withCtx(()=>[e.createElementVNode("div",U,[e.renderSlot(o.$slots,l.headerSlot,{item:l,minWidth:l.minWidth},void 0,!0)])]),key:"0"}:void 0]),1032,["align","prop","label","width","min-width","fixed","sortable","show-overflow-tooltip"])):l.callback?(e.openBlock(),e.createBlock(e.unref(a.ElTableColumn),{align:l.align||"left",key:l.callback,prop:l.prop,label:l.label,width:l.width,"min-width":l.minWidth,"show-overflow-tooltip":"",fixed:l.fixed,sortable:l.sortable},{default:e.withCtx(t=>[e.createElementVNode("span",{innerHTML:l.callback&&l.callback(t.row)},null,8,Y)]),_:2},1032,["align","prop","label","width","min-width","fixed","sortable"])):l.type==="multistage"?(e.openBlock(),e.createBlock(e.unref(a.ElTableColumn),{key:`${l.prop}`,label:l.label,prop:l.prop,width:l.width,"min-width":l.minWidth,"show-overflow-tooltip":"",align:l.align||"left","header-align":l.headerAlign||"left"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.children,t=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[t.callback?(e.openBlock(),e.createBlock(e.unref(a.ElTableColumn),{key:t.callback,prop:t.prop,label:t.label,"min-width":t.minWidth,"show-overflow-tooltip":""},{default:e.withCtx(w=>[e.createElementVNode("span",{innerHTML:t.callback&&t.callback(w.row)},null,8,Z)]),_:2},1032,["prop","label","min-width"])):t.slot?(e.openBlock(),e.createBlock(e.unref(a.ElTableColumn),{key:t.prop,"min-width":t.minWidth,prop:t.prop,label:t.label},{default:e.withCtx(w=>[e.createElementVNode("div",J,[e.renderSlot(o.$slots,t.slot,{row:w.row,column:w.column,index:w.$index},void 0,!0)])]),_:2},1032,["min-width","prop","label"])):t.custom?(e.openBlock(),e.createBlock(e.unref(a.ElTableColumn),{key:`${t.prop}`,prop:t.prop,label:t.label,"min-width":t.minWidth,"show-overflow-tooltip":""},{header:e.withCtx(()=>[e.createElementVNode("span",{onClick:()=>t.headerClick({parent:l.label,...t}),style:{color:"#5b9bd1",cursor:"pointer"}},e.toDisplayString(t.label),9,Q)]),default:e.withCtx(w=>[e.createElementVNode("div",ee,[e.renderSlot(o.$slots,"custom",{data:{col:{parent:l.label,...t},row:w.row}},void 0,!0)])]),_:2},1032,["prop","label","min-width"])):(e.openBlock(),e.createBlock(e.unref(a.ElTableColumn),{key:`${t.prop}-${t.label}`,prop:t.prop,label:t.label,width:t.width,"min-width":t.minWidth,"show-overflow-tooltip":"","header-align":t.headerAlign?t.headerAlign:"left",align:t.align?t.align:"left"},null,8,["prop","label","width","min-width","header-align","align"]))],64))),256))]),_:2},1032,["label","prop","width","min-width","align","header-align"])):l.custom?(e.openBlock(),e.createBlock(e.unref(a.ElTableColumn),{key:`${l.prop}-${l.custom}`,prop:l.prop,label:l.label,"min-width":l.minWidth,"show-overflow-tooltip":""},{header:e.withCtx(()=>[e.createElementVNode("span",{onClick:()=>l.headerClick({parent:"",...l}),style:{color:"#5b9bd1",cursor:"pointer"}},e.toDisplayString(l.label),9,le)]),default:e.withCtx(t=>[e.createElementVNode("div",te,[e.renderSlot(o.$slots,"custom",{data:{col:{parent:"",...l},row:t.row}},void 0,!0)])]),_:2},1032,["prop","label","min-width"])):l.type==="action"?(e.openBlock(),e.createBlock(e.unref(a.ElTableColumn),{key:`${l.prop-Math.random()}`,label:l.label,width:l.width,type:"action",fixed:"right"},{default:e.withCtx(t=>[e.createElementVNode("div",oe,[e.renderSlot(o.$slots,"goto",{row:t.row},void 0,!0),l?.config?.(t.row)?.length?(e.openBlock(),e.createBlock(_,{key:0,"show-nums":n.showHandleNums,config:l.config(t.row,t.$index),row:t.row},null,8,["show-nums","config","row"])):e.createCommentVNode("",!0)])]),_:2},1032,["label","width"])):l.type==="expand"?(e.openBlock(),e.createBlock(e.unref(a.ElTableColumn),{type:"expand",key:"expand"+l.prop,width:l.width},{default:e.withCtx(t=>[e.createElementVNode("div",ne,[e.renderSlot(o.$slots,"expand",{row:t.row,column:t.column},void 0,!0)])]),_:3},8,["width"])):(e.openBlock(),e.createBlock(e.unref(a.ElTableColumn),{key:`${l.prop-l.label}`,prop:l.prop,label:l.label,width:l.width,"min-width":l.minWidth,fixed:l.fixed,sortable:l.sortable,"show-overflow-tooltip":"",align:l.align||"left"},e.createSlots({_:2},[l.headerSlot?{name:"header",fn:e.withCtx(()=>[e.renderSlot(o.$slots,l.headerSlot,{item:l,minWidth:l.minWidth},void 0,!0)]),key:"0"}:void 0]),1032,["prop","label","width","min-width","fixed","sortable","align"]))],64))),256))]),_:3},8,["element-loading-text","tree-props","header-row-class-name","data","border","height","default-sort","span-method","expand-row-keys","show-summary","summary-method","default-expand-all"])]),f.value>10&&n.hasPage?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass([n.isPagePostion?"aibox-table__pages":"aibox-table__page"])},[e.createVNode(e.unref(a.ElPagination),{layout:c.value,"current-page":n.pages.page,"page-sizes":[10,20,50,100],"page-size":n.pages.size,total:f.value,"pager-count":n.pagerCount,size:n.size,onSizeChange:M,onCurrentChange:$},null,8,["layout","current-page","page-size","total","pager-count","size"])],2)):e.createCommentVNode("",!0)],2))}},ce=S._export_sfc(re,[["__scopeId","data-v-1e856800"]]),se={class:"back-bar__icon"},de={key:0,class:"back-bar__title"},ie={key:1,class:"back-bar__tip"},ue={__name:"BackBar",props:{goBackFn:{type:Function,default:null},backBarStyle:{type:String,default:"#fff"},title:{type:String,default:""},tipContent:{type:String,default:""}},setup(n){const p=n,k=F.useRouter(),r=()=>{p.goBackFn?p.goBackFn():k.back()};return(i,h)=>(e.openBlock(),e.createElementBlock("div",{class:"back-bar",style:e.normalizeStyle({"background-color":n.backBarStyle})},[e.createElementVNode("div",se,[e.createVNode(e.unref(a.ElIcon),{onClick:e.withModifiers(r,["stop"])},{default:e.withCtx(()=>[e.createVNode(e.unref(C.IconZuo))]),_:1})]),e.renderSlot(i.$slots,"default"),n.title?(e.openBlock(),e.createElementBlock("div",de,e.toDisplayString(n.title),1)):e.createCommentVNode("",!0),n.tipContent?(e.openBlock(),e.createElementBlock("div",ie,[e.createVNode(e.unref(a.ElTooltip),{content:n.tipContent,placement:"right"},{default:e.withCtx(()=>[e.createVNode(e.unref(a.ElIcon),{size:"14"},{default:e.withCtx(()=>[e.createVNode(e.unref(C.IconTip))]),_:1})]),_:1},8,["content"])])):e.createCommentVNode("",!0)],4))}};exports.TableBtns=_;exports._aiboxTable=ce;exports._sfc_main=ue;
|