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.
Files changed (79) hide show
  1. package/es/AiboxTabs.mjs +73 -0
  2. package/es/AvailableRangePreview.mjs +7 -0
  3. package/es/AvailableRangeSetting.mjs +271 -0
  4. package/es/CommonTagsList.mjs +209 -0
  5. package/es/DialogContainer.mjs +136 -0
  6. package/es/FileUploader.mjs +11 -0
  7. package/es/PageContainer.mjs +13 -0
  8. package/es/PublishRecord.mjs +179 -0
  9. package/es/SourcePublish.mjs +1154 -0
  10. package/es/Table.mjs +10 -0
  11. package/es/assets/AiboxTabs.css +1 -0
  12. package/es/assets/BackBar.css +1 -0
  13. package/es/assets/CommonTagsList.css +1 -0
  14. package/es/assets/DialogContainer.css +1 -0
  15. package/es/assets/PublishRecord.css +1 -0
  16. package/es/assets/SourcePublish.css +1 -0
  17. package/es/assets/index2.css +1 -0
  18. package/es/chunks/BackBar.Bc2NIuzk.js +645 -0
  19. package/es/chunks/BackBar.Cv1wxUcM.js +645 -0
  20. package/es/chunks/BackBar.DJV4JaUM.js +645 -0
  21. package/es/chunks/_plugin-vue_export-helper.CHgC5LLL.js +9 -0
  22. package/es/chunks/config.8htFF04x.js +325 -0
  23. package/es/chunks/config.BPp4hMBq.js +325 -0
  24. package/es/chunks/config.BU21Gda2.js +49 -0
  25. package/es/chunks/config.BzCGum_W.js +49 -0
  26. package/es/chunks/config.CFWGjEdA.js +49 -0
  27. package/es/chunks/config.CfWAdyUH.js +325 -0
  28. package/es/chunks/config.DTMcCH58.js +325 -0
  29. package/es/chunks/enums.CfSBDD6u.js +83 -0
  30. package/es/chunks/i18n.DmqkiK-h.js +444 -0
  31. package/es/chunks/i18n.Vhq-tZPw.js +94 -0
  32. package/es/chunks/i18n.ro9yz7rE.js +94 -0
  33. package/es/chunks/index.DB0ayMv8.js +257 -0
  34. package/es/chunks/index.aMb6IVQD.js +257 -0
  35. package/es/chunks/index.bCzIhWFw.js +7 -0
  36. package/es/chunks/index.ml5i7aB5.js +257 -0
  37. package/es/chunks/index.s-YxIOfq.js +301 -0
  38. package/es/chunks/publish.BCb7nCo9.js +50 -0
  39. package/es/chunks/publish.D6friivo.js +50 -0
  40. package/es/chunks/publish.Dqzn7qEl.js +50 -0
  41. package/es/i18n.mjs +17 -0
  42. package/es/index.mjs +312 -10
  43. package/lib/AiboxTabs.js +1 -0
  44. package/lib/AvailableRangePreview.js +1 -0
  45. package/lib/AvailableRangeSetting.js +1 -0
  46. package/lib/CommonTagsList.js +1 -0
  47. package/lib/DialogContainer.js +1 -0
  48. package/lib/FileUploader.js +1 -0
  49. package/lib/PageContainer.js +1 -0
  50. package/lib/PublishRecord.js +5 -0
  51. package/lib/SourcePublish.js +1 -0
  52. package/lib/Table.js +1 -0
  53. package/lib/assets/AiboxTabs.css +1 -0
  54. package/lib/assets/BackBar.css +1 -0
  55. package/lib/assets/CommonTagsList.css +1 -0
  56. package/lib/assets/DialogContainer.css +1 -0
  57. package/lib/assets/PublishRecord.css +1 -0
  58. package/lib/assets/SourcePublish.css +1 -0
  59. package/lib/assets/index2.css +1 -0
  60. package/lib/chunks/BackBar.CZsNxoX1.js +1 -0
  61. package/lib/chunks/BackBar.s5_vN6jt.js +1 -0
  62. package/lib/chunks/_plugin-vue_export-helper.BHFhmbuH.js +1 -0
  63. package/lib/chunks/config.B0XKkp1w.js +1 -0
  64. package/lib/chunks/config.BCAuBVxV.js +1 -0
  65. package/lib/chunks/config.Bs7sh3aP.js +1 -0
  66. package/lib/chunks/config.C1w4hgfw.js +1 -0
  67. package/lib/chunks/config.ClERt2RF.js +1 -0
  68. package/lib/chunks/enums.Dmq4PdUc.js +1 -0
  69. package/lib/chunks/i18n.CL5L6nx6.js +1 -0
  70. package/lib/chunks/i18n.aAXi5igh.js +1 -0
  71. package/lib/chunks/index.BNqTEn3K.js +1 -0
  72. package/lib/chunks/index.Bk-RwmaH.js +1 -0
  73. package/lib/chunks/index.BsN4urmi.js +1 -0
  74. package/lib/chunks/index.CkihWzK6.js +1 -0
  75. package/lib/chunks/publish.Bw1acrSu.js +1 -0
  76. package/lib/chunks/publish.CA1uSVnm.js +1 -0
  77. package/lib/i18n.js +1 -0
  78. package/lib/index.js +4 -1
  79. package/package.json +55 -9
@@ -0,0 +1,1154 @@
1
+ import { w as we } from "./chunks/index.bCzIhWFw.js";
2
+ import { createElementBlock as V, openBlock as r, renderSlot as Ce, shallowRef as Ne, ref as v, onMounted as fe, normalizeStyle as ke, createVNode as c, unref as e, withCtx as i, createBlock as _, resolveDynamicComponent as xe, createCommentVNode as P, normalizeClass as Re, createElementVNode as f, createTextVNode as N, toDisplayString as g, inject as De, getCurrentInstance as Fe, computed as ye, watch as Ge, Fragment as Z, renderList as $, nextTick as te, resolveDirective as Me, withDirectives as Ke, withModifiers as Xe } from "vue";
3
+ import { u as F } from "./chunks/i18n.DmqkiK-h.js";
4
+ import { useRouter as Ue, useRoute as Oe } from "vue-router";
5
+ import { ElIcon as ne, ElTooltip as ve, ElCheckbox as Ye, ElMessage as z, ElButton as Le, ElForm as Pe, ElFormItem as X, ElSelect as ee, ElOption as le, ElTag as be, ElInputNumber as We, ElInput as me, ElSwitch as ge } from "element-plus";
6
+ import { _ as Y } from "./chunks/_plugin-vue_export-helper.CHgC5LLL.js";
7
+ import { g as Ee } from "./chunks/publish.D6friivo.js";
8
+ import { C as Ie, g as ze, c as Te, h as p, A as ae, i as je, j as qe, S as se, b as Qe, a as Je, I as _e, s as Ae } from "./chunks/config.8htFF04x.js";
9
+ import { L as tt, O as at, P as st, d as nt, e as it, f as ot, R as ut } from "./chunks/config.8htFF04x.js";
10
+ import { AvailableRangeSetting as Ze } from "./AvailableRangeSetting.mjs";
11
+ import { IconTip as he } from "color-message-aibox-vue";
12
+ import { _ as $e, a as el } from "./chunks/BackBar.Bc2NIuzk.js";
13
+ import { SOURCE_TYPE as j } from "color-star-custom-components";
14
+ import { P as dt } from "./chunks/config.B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qcZRHAncwgZhoA8GtrmfIzC2ve/xVlKrjss/nlRp1fj7Z3kmscW0RluEse1Pr9yHy9PE5qNJlWoT0kjzDm/K2ffCysAiQna+yIEd26zb6fmaGX4yqVLSzgiKUWX+/KkegqnWfFMP7N0FQBYhg2K6f6vzxmVVT63Hp1S8E+IsNM+sJR6Hl4bI9m9Zuy1FIyIiIiIiIrzyPx3JLklkX69sAAAAAElFTkSuQmCC", al = {}, sl = { class: "style-title" };
16
+ function nl(t, O) {
17
+ return r(), V("div", sl, [
18
+ Ce(t.$slots, "default", {}, void 0, !0)
19
+ ]);
20
+ }
21
+ const Se = /* @__PURE__ */ Y(al, [["render", nl], ["__scopeId", "data-v-57d98e1c"]]), il = {}, ol = { class: "card-container" };
22
+ function ul(t, O) {
23
+ return r(), V("div", ol, [
24
+ Ce(t.$slots, "default", {}, void 0, !0)
25
+ ]);
26
+ }
27
+ const pe = /* @__PURE__ */ Y(il, [["render", ul], ["__scopeId", "data-v-639f8796"]]), rl = {
28
+ __name: "PublishIcon",
29
+ props: {
30
+ publishType: {
31
+ type: [String, Number],
32
+ default: ""
33
+ },
34
+ size: {
35
+ type: [String, Number],
36
+ default: 30
37
+ }
38
+ },
39
+ setup(t) {
40
+ const O = t, m = Object.keys(Ie).reduce((U, B) => {
41
+ const A = Ie[B];
42
+ return U[B] = {
43
+ ...A,
44
+ icon: Ne(A.icon)
45
+ }, U;
46
+ }, {}), y = v({});
47
+ return fe(() => {
48
+ const U = ze[O.publishType] || "h5";
49
+ y.value = m[U];
50
+ }), (U, B) => (r(), V("div", {
51
+ class: "channel-icon flex items-center justify-center radius-8",
52
+ style: ke({ background: y.value?.backgroundColor })
53
+ }, [
54
+ c(e(ne), {
55
+ size: t.size,
56
+ color: y.value?.iconColor
57
+ }, {
58
+ default: i(() => [
59
+ (r(), _(xe(y.value?.icon)))
60
+ ]),
61
+ _: 1
62
+ }, 8, ["size", "color"])
63
+ ], 4));
64
+ }
65
+ }, dl = /* @__PURE__ */ Y(rl, [["__scopeId", "data-v-cd6ad511"]]), cl = { class: "permission-setting" }, Sl = {
66
+ key: 1,
67
+ class: "flex items-center gap-12 pd-t-16 pd-b-16"
68
+ }, pl = {
69
+ class: "min-w-110 fz-14 text-left flex-shrink-0",
70
+ style: { color: "var(--el-text-color-primary)" }
71
+ }, fl = { class: "flex items-center gap-6" }, vl = {
72
+ class: "flex flex-col lh-18",
73
+ style: { "align-items": "flex-start" }
74
+ }, El = {
75
+ class: "fz-12",
76
+ style: { color: "var(--el-text-color-secondary)" }
77
+ }, hl = {
78
+ __name: "PermissionSetting",
79
+ props: {
80
+ // 是否显示可见范围设置
81
+ showAvailableRange: {
82
+ type: Boolean,
83
+ default: !0
84
+ },
85
+ // 是否显示权限设置
86
+ showPermissionSetting: {
87
+ type: Boolean,
88
+ default: !0
89
+ },
90
+ // 详情数据,包含所有配置信息
91
+ detail: {
92
+ type: Object,
93
+ default: () => ({})
94
+ },
95
+ // 鉴权类型
96
+ authType: {
97
+ type: String,
98
+ default: ""
99
+ }
100
+ },
101
+ emits: ["update:detail"],
102
+ setup(t, { expose: O, emit: m }) {
103
+ const { t: y } = F(), U = t, B = m, A = v(null), I = (C) => {
104
+ const d = { ...U.detail, openStatus: C };
105
+ B("update:detail", d);
106
+ }, k = (C) => {
107
+ const d = { ...U.detail, allVisible: C };
108
+ B("update:detail", d);
109
+ }, L = (C) => {
110
+ const d = { ...U.detail, visibleScope: C };
111
+ B("update:detail", d);
112
+ };
113
+ return O({
114
+ validateVisibleRange: () => {
115
+ if (U.authType === "0")
116
+ return {
117
+ isValid: !0,
118
+ data: {
119
+ visibleScope: [],
120
+ allVisible: !0,
121
+ openStatus: 1
122
+ }
123
+ };
124
+ if (!U.showAvailableRange)
125
+ return {
126
+ isValid: !0,
127
+ data: {
128
+ // authType 为 "1" 时,如果 openStatus 未设置,默认为 0(非免费资源)
129
+ openStatus: U.detail.openStatus ?? 0
130
+ }
131
+ };
132
+ if (!A.value)
133
+ return { isValid: !0, data: null };
134
+ const C = A.value.getSelectedItems();
135
+ return C?.allVisible === void 0 ? (z.warning(y("MESSAGE_REMIND.SELECT_VISIBLE_RANGE")), {
136
+ isValid: !1,
137
+ data: null
138
+ }) : {
139
+ isValid: !0,
140
+ data: {
141
+ ...C,
142
+ openStatus: U.detail.openStatus ?? 0
143
+ }
144
+ };
145
+ }
146
+ }), (C, d) => (r(), V("div", cl, [
147
+ t.showAvailableRange ? (r(), _(e(Ze), {
148
+ key: 0,
149
+ "all-visible": t.detail.allVisible,
150
+ "model-value": t.detail.visibleScope,
151
+ class: Re(["pd-t-16", {
152
+ "pd-b-16": !t.showPermissionSetting
153
+ }]),
154
+ ref_key: "availableRangeSettingRef",
155
+ ref: A,
156
+ "onUpdate:allVisible": k,
157
+ "onUpdate:modelValue": L
158
+ }, null, 8, ["all-visible", "model-value", "class"])) : P("", !0),
159
+ t.showPermissionSetting ? (r(), V("div", Sl, [
160
+ f("div", pl, [
161
+ d[0] || (d[0] = f("span", {
162
+ class: "mg-r-2",
163
+ style: { color: "var(--el-color-danger)" }
164
+ }, "*", -1)),
165
+ N(" " + g(e(y)("PUTRESOURCEONSHELFDIALOG_TEXT.RESOURCE_PERMISSION_SETTING")) + " ", 1),
166
+ c(e(ve), {
167
+ content: e(y)("PUTRESOURCEONSHELFDIALOG_TEXT.RESOURCE_PERMISSION_SETTING_TOOLTIP"),
168
+ placement: "top"
169
+ }, {
170
+ default: i(() => [
171
+ c(e(ne), {
172
+ class: "mg-l-4",
173
+ size: "14px"
174
+ }, {
175
+ default: i(() => [
176
+ c(e(he))
177
+ ]),
178
+ _: 1
179
+ })
180
+ ]),
181
+ _: 1
182
+ }, 8, ["content"])
183
+ ]),
184
+ f("div", fl, [
185
+ c(e(Ye), {
186
+ "model-value": t.detail.openStatus,
187
+ "onUpdate:modelValue": I,
188
+ "true-value": e(Te).TRUE,
189
+ "false-value": e(Te).FALSE,
190
+ class: "mg-r-0"
191
+ }, {
192
+ default: i(() => [
193
+ f("div", vl, g(e(y)("PUTRESOURCEONSHELFDIALOG_TEXT.FREE_RESOURCE")), 1)
194
+ ]),
195
+ _: 1
196
+ }, 8, ["model-value", "true-value", "false-value"]),
197
+ f("span", El, g(e(y)("PUTRESOURCEONSHELFDIALOG_TEXT.FREE_RESOURCE_MCPKEY")), 1)
198
+ ])
199
+ ])) : P("", !0)
200
+ ]));
201
+ }
202
+ }, yl = /* @__PURE__ */ Y(hl, [["__scopeId", "data-v-3adfc427"]]), bl = {
203
+ __name: "FeishuTooltip",
204
+ props: {
205
+ channelType: {
206
+ type: [String, Number],
207
+ required: !0
208
+ }
209
+ },
210
+ setup(t) {
211
+ const { t: O } = F();
212
+ return (m, y) => t.channelType === e(p).FEISHU_WEB ? (r(), _(e(ve), {
213
+ key: 0,
214
+ placement: "top"
215
+ }, {
216
+ content: i(() => [
217
+ N(g(e(O)("SOURCE_PUBLISH.FEISHU_WEB_TOOLTIP")), 1)
218
+ ]),
219
+ default: i(() => [
220
+ c(e(ne), {
221
+ size: "14px",
222
+ color: "#999",
223
+ style: { "margin-left": "5px" }
224
+ }, {
225
+ default: i(() => [
226
+ c(e(he))
227
+ ]),
228
+ _: 1
229
+ })
230
+ ]),
231
+ _: 1
232
+ })) : P("", !0);
233
+ }
234
+ }, ml = {
235
+ __name: "ApiTooltip",
236
+ props: {
237
+ channelType: {
238
+ type: [String, Number],
239
+ required: !0
240
+ },
241
+ isAuth: {
242
+ type: Boolean,
243
+ required: !0
244
+ }
245
+ },
246
+ setup(t) {
247
+ const { t: O } = F();
248
+ return (m, y) => e(ae).includes(t.channelType) ? (r(), _(e(ve), {
249
+ key: 0,
250
+ placement: "top"
251
+ }, {
252
+ content: i(() => [
253
+ N(g(t.isAuth ? e(O)("SOURCE_PUBLISH.PUBLISH_AUTHORIZE_MSG") || "请先完成授权" : e(O)("SOURCE_PUBLISH.PUBLISH_ACCESS_TOKEN_MSG") || "调用需要创建访问凭证"), 1)
254
+ ]),
255
+ default: i(() => [
256
+ c(e(ne), {
257
+ size: "14px",
258
+ color: "#999",
259
+ style: { "margin-left": "5px" }
260
+ }, {
261
+ default: i(() => [
262
+ c(e(he))
263
+ ]),
264
+ _: 1
265
+ })
266
+ ]),
267
+ _: 1
268
+ })) : P("", !0);
269
+ }
270
+ }, gl = { class: "publish-settings" }, Il = { class: "channel-name flex items-center overflow-hidden w-full" }, Tl = { class: "channel-title flex-1 overflow-hidden" }, _l = { class: "channel-title__name" }, Al = { class: "channel-title__desc" }, Cl = {
271
+ key: 0,
272
+ class: "expand-content"
273
+ }, Rl = { class: "select-label" }, Ul = { class: "select-label" }, Ol = { class: "select-label" }, Ll = { class: "action-container" }, Pl = { class: "select-label" }, Bl = {
274
+ __name: "PublishSettings",
275
+ props: {
276
+ modelValue: {
277
+ type: Array,
278
+ default: () => []
279
+ },
280
+ // 3 智能体 4 工作流 5 插件 8 MCP
281
+ sourceType: {
282
+ type: String,
283
+ default: j.AGENT
284
+ },
285
+ channelManagement: {
286
+ type: Array,
287
+ default: () => []
288
+ },
289
+ isBackendSystem: {
290
+ type: Boolean,
291
+ default: !1
292
+ },
293
+ disabled: {
294
+ type: Boolean,
295
+ default: !1
296
+ },
297
+ authType: {
298
+ type: String,
299
+ default: ""
300
+ }
301
+ },
302
+ emits: ["validateField", "update:modelValue"],
303
+ setup(t, { expose: O, emit: m }) {
304
+ const y = De(je), U = Fe(), B = Ue();
305
+ Oe();
306
+ const A = m, I = t, { checkToken: k } = Ee(), L = v(null), w = v(null), C = v(!1), d = v(""), b = v({}), { t: R } = F(), q = v([]), x = ye(() => {
307
+ const n = qe(I.sourceType, I.channelManagement) || [];
308
+ return I.isBackendSystem ? n.filter((a) => a.channelType !== "3") : n;
309
+ }), Q = (n) => q.value?.find((a) => a.id === n.id)?.id ? _e.PUBLISHED : _e.UNPUBLISHED, h = {
310
+ bakInt: [
311
+ {
312
+ required: !0,
313
+ trigger: "change"
314
+ }
315
+ ]
316
+ }, ie = ye(() => [
317
+ {
318
+ type: "selection",
319
+ selectable: (a) => I.disabled || a.id == p.AIBox ? !1 : ae.includes(a.id) ? C.value : !0,
320
+ show: !I.isBackendSystem
321
+ },
322
+ {
323
+ label: R("SOURCE_PUBLISH.PUBLISH_CHANNEL") || "发布渠道",
324
+ prop: "name",
325
+ slot: "name",
326
+ show: !0
327
+ },
328
+ {
329
+ type: "expand",
330
+ prop: "expand",
331
+ width: 1,
332
+ show: !0
333
+ },
334
+ {
335
+ label: "",
336
+ prop: "status",
337
+ slot: "status",
338
+ width: 100,
339
+ show: !I.isBackendSystem
340
+ },
341
+ {
342
+ label: "",
343
+ prop: "action",
344
+ slot: "action",
345
+ show: !0
346
+ },
347
+ {
348
+ label: "",
349
+ prop: "inActive",
350
+ slot: "inActive",
351
+ width: 100,
352
+ show: I.isBackendSystem
353
+ }
354
+ ].filter((a) => a.show)), oe = [
355
+ {
356
+ label: R("COMMON_HOOKS.SERVICE_TYPE_ENUMLIST.LABEL_1") || "专享服务",
357
+ value: "PRIVATE"
358
+ },
359
+ {
360
+ label: R("COMMON_HOOKS.SERVICE_TYPE_ENUMLIST.LABEL_2") || "开发者计算",
361
+ value: "DEVELOPER"
362
+ }
363
+ ], G = v(!1), M = v([]), W = (n) => {
364
+ if (q.value = n, G.value) {
365
+ G.value = !1, M.value = n, A("update:modelValue", n), A("validateField");
366
+ return;
367
+ }
368
+ const a = n.some(
369
+ (H) => H.id === p.FEISHU_WEB
370
+ ), s = n.some((H) => H.id === p.H5), o = M.value.some(
371
+ (H) => H.id === p.FEISHU_WEB
372
+ ), Be = M.value.some(
373
+ (H) => H.id === p.H5
374
+ ), He = a && !o, Ve = !s && Be;
375
+ if (He && !s) {
376
+ const H = x.value.find(
377
+ (ce) => ce.id === p.H5
378
+ );
379
+ if (H) {
380
+ G.value = !0, z.warning(R("SOURCE_PUBLISH.FEISHU_H5_LINKAGE_SELECT")), te(() => {
381
+ L.value?.handleToggleRowSelection(H, !0);
382
+ });
383
+ return;
384
+ }
385
+ }
386
+ if (Ve && a) {
387
+ const H = x.value.find(
388
+ (ce) => ce.id === p.FEISHU_WEB
389
+ );
390
+ if (H) {
391
+ G.value = !0, z.warning(R("SOURCE_PUBLISH.H5_FEISHU_LINKAGE_DESELECT")), te(() => {
392
+ L.value?.handleToggleRowSelection(H, !1);
393
+ });
394
+ return;
395
+ }
396
+ }
397
+ M.value = n, A("update:modelValue", n), A("validateField");
398
+ }, ue = (n) => {
399
+ const a = Q(n);
400
+ L.value?.handleToggleRowSelection(n, a);
401
+ }, re = (n, a) => {
402
+ n.allVisible = a.allVisible, n.visibleScope = a.visibleScope, n.openStatus = a.openStatus;
403
+ }, J = async () => {
404
+ const n = await k();
405
+ C.value = n.data || !1;
406
+ }, K = (n, a) => {
407
+ a && (b.value.bakInt = a.bakInt, d.value = a.serviceType, l.value = a.currency);
408
+ const s = x.value.filter((o) => n.includes(o.id));
409
+ s.forEach((o) => {
410
+ L.value?.handleToggleRowSelection(o, !0);
411
+ }), te(() => {
412
+ W(s);
413
+ });
414
+ }, de = () => "no-expand", E = () => {
415
+ B.push({ name: "ApiManage" });
416
+ }, l = v(""), S = v([]), u = v(!1);
417
+ Ge(
418
+ () => I.modelValue,
419
+ (n) => {
420
+ const a = [];
421
+ if (n && n.find((s) => se.includes(s.id))) {
422
+ const s = n.find(
423
+ (o) => se.includes(o.id)
424
+ );
425
+ s && a.push(s.id), u.value = !0;
426
+ } else
427
+ u.value = !1;
428
+ n && n.find((s) => s.id === p.FEISHU_WEB) && a.push(p.FEISHU_WEB), S.value = a;
429
+ },
430
+ { immediate: !0, deep: !0 }
431
+ );
432
+ const D = (n) => {
433
+ const a = `permissionSettingRef_${n}`, s = U?.refs?.[a];
434
+ if (s) {
435
+ const o = s.validateVisibleRange();
436
+ return o.isValid ? o.data : null;
437
+ }
438
+ return null;
439
+ }, T = async () => w.value ? (w.value.scrollToField("bakInt"), w.value.validate().catch(() => (z.warning(R("SOURCE_PUBLISH.PUBLISH_CATEGORY_MSG")), Promise.reject(!1)))) : !0;
440
+ return fe(() => {
441
+ J();
442
+ }), O({
443
+ get bakInt() {
444
+ return b.value.bakInt;
445
+ },
446
+ serviceType: d,
447
+ currency: l,
448
+ channels: x,
449
+ categoryForm: b,
450
+ handleToggleRowSelection: K,
451
+ getVisibleRangeData: D,
452
+ validateCategory: T
453
+ }), (n, a) => (r(), V("div", gl, [
454
+ c($e, {
455
+ columns: ie.value,
456
+ data: x.value,
457
+ "on-row-key": (s) => s.id,
458
+ total: x.value.length,
459
+ style: { width: "100%" },
460
+ hasPage: !1,
461
+ "show-handle-nums": 1,
462
+ onRowClassName: de,
463
+ "expand-row-keys": S.value,
464
+ "default-expand-all": !1,
465
+ onOnMultiSelection: W,
466
+ ref_key: "aiboxTableRef",
467
+ ref: L
468
+ }, {
469
+ name: i(({ row: s }) => [
470
+ f("div", Il, [
471
+ c(dl, {
472
+ "publish-type": s.id,
473
+ size: 24
474
+ }, null, 8, ["publish-type"]),
475
+ f("div", Tl, [
476
+ f("p", _l, [
477
+ N(g(s.name(t.sourceType)) + " ", 1),
478
+ c(ml, {
479
+ "channel-type": s.id,
480
+ "is-auth": C.value
481
+ }, null, 8, ["channel-type", "is-auth"]),
482
+ c(bl, {
483
+ "channel-type": s.id
484
+ }, null, 8, ["channel-type"])
485
+ ]),
486
+ f("p", Al, g(s.description), 1)
487
+ ])
488
+ ])
489
+ ]),
490
+ expand: i(({ row: s }) => [
491
+ s.id === e(p).PLUGIN_STORE ? (r(), V("div", Cl, [
492
+ c(e(ee), {
493
+ modelValue: b.value.bakInt,
494
+ "onUpdate:modelValue": a[0] || (a[0] = (o) => b.value.bakInt = o),
495
+ placeholder: e(R)("SOURCE_PUBLISH.DEFAULT_SELECT_MSG") || "请选择",
496
+ style: { width: "200px" },
497
+ disabled: t.disabled
498
+ }, {
499
+ prefix: i(() => [
500
+ f("div", Rl, g(e(R)("SOURCE_PUBLISH.CATEGORY") || "分类"), 1),
501
+ a[4] || (a[4] = f("div", { class: "divider" }, null, -1))
502
+ ]),
503
+ default: i(() => [
504
+ (r(!0), V(Z, null, $(e(y), (o) => (r(), _(e(le), {
505
+ key: o.value,
506
+ label: o.label,
507
+ value: o.value
508
+ }, null, 8, ["label", "value"]))), 128))
509
+ ]),
510
+ _: 1
511
+ }, 8, ["modelValue", "placeholder", "disabled"]),
512
+ I.authType == "1" ? (r(), _(e(ee), {
513
+ key: 0,
514
+ modelValue: d.value,
515
+ "onUpdate:modelValue": a[1] || (a[1] = (o) => d.value = o),
516
+ placeholder: e(R)("SOURCE_PUBLISH.DEFAULT_SELECT_MSG") || "请选择",
517
+ style: { width: "200px" },
518
+ disabled: t.disabled
519
+ }, {
520
+ prefix: i(() => [
521
+ f("div", Ul, g(e(R)("SOURCE_PUBLISH.SERVICE_TYPE") || "服务类型"), 1),
522
+ a[5] || (a[5] = f("div", { class: "divider" }, null, -1))
523
+ ]),
524
+ default: i(() => [
525
+ (r(), V(Z, null, $(oe, (o) => c(e(le), {
526
+ key: o.value,
527
+ label: o.label,
528
+ value: o.value
529
+ }, null, 8, ["label", "value"])), 64))
530
+ ]),
531
+ _: 1
532
+ }, 8, ["modelValue", "placeholder", "disabled"])) : P("", !0),
533
+ d.value === n.q.CURRENCY ? (r(), _(e(We), {
534
+ key: 1,
535
+ modelValue: l.value,
536
+ "onUpdate:modelValue": a[2] || (a[2] = (o) => l.value = o),
537
+ precision: 2,
538
+ style: { width: "200px" },
539
+ "controls-position": "right",
540
+ disabled: t.disabled
541
+ }, {
542
+ prefix: i(() => [
543
+ f("div", Ol, g(e(R)("SOURCE_PUBLISH.CONSUME_VALUE") || "消费值"), 1),
544
+ a[6] || (a[6] = f("div", { class: "divider" }, null, -1))
545
+ ]),
546
+ _: 1
547
+ }, 8, ["modelValue", "disabled"])) : P("", !0)
548
+ ])) : P("", !0),
549
+ [
550
+ e(p).FEISHU_WEB,
551
+ e(p).AGENT_STORE,
552
+ e(p).MCP_STORE
553
+ ].includes(s.id) ? (r(), _(yl, {
554
+ key: 1,
555
+ "show-permission-setting": s.id === e(p).MCP_STORE && I.authType !== "0",
556
+ "show-available-range": I.authType !== "0",
557
+ "auth-type": I.authType,
558
+ detail: s,
559
+ ref: `permissionSettingRef_${s.id}`,
560
+ "onUpdate:detail": (o) => re(s, o)
561
+ }, null, 8, ["show-permission-setting", "show-available-range", "auth-type", "detail", "onUpdate:detail"])) : P("", !0)
562
+ ]),
563
+ status: i(({ row: s }) => [
564
+ e(Je).includes(s.id) ? (r(), _(e(be), {
565
+ key: 0,
566
+ type: "success"
567
+ }, {
568
+ default: i(() => [
569
+ N(g(e(R)("SOURCE_PUBLISH.PUBLISH_AUTHORIZE_STATUS") || "已授权"), 1)
570
+ ]),
571
+ _: 1
572
+ })) : e(ae).includes(s.id) ? (r(), _(e(be), {
573
+ key: 1,
574
+ type: C.value ? "success" : "info"
575
+ }, {
576
+ default: i(() => [
577
+ N(g(C.value ? e(R)("SOURCE_PUBLISH.PUBLISH_AUTHORIZE_STATUS") || "已授权" : e(R)("SOURCE_PUBLISH.PUBLISH_UNAUTHORIZE_STATUS") || "未授权"), 1)
578
+ ]),
579
+ _: 1
580
+ }, 8, ["type"])) : P("", !0)
581
+ ]),
582
+ inActive: i(({ row: s }) => [
583
+ c(e(ee), {
584
+ "model-value": Q(s),
585
+ disabled: t.disabled,
586
+ onChange: (o) => ue(s)
587
+ }, {
588
+ default: i(() => [
589
+ (r(!0), V(Z, null, $(e(Qe), (o) => (r(), _(e(le), {
590
+ key: o.value,
591
+ label: o.label,
592
+ value: o.value
593
+ }, null, 8, ["label", "value"]))), 128))
594
+ ]),
595
+ _: 1
596
+ }, 8, ["model-value", "disabled", "onChange"])
597
+ ]),
598
+ action: i(({ row: s }) => [
599
+ f("div", Ll, [
600
+ e(ae).includes(s.id) && !t.isBackendSystem ? (r(), _(e(Le), {
601
+ key: 0,
602
+ type: "primary",
603
+ link: "",
604
+ onClick: (o) => E()
605
+ }, {
606
+ default: i(() => [
607
+ N(g(e(R)("SOURCE_PUBLISH.CONFIG") || "配置"), 1)
608
+ ]),
609
+ _: 1
610
+ }, 8, ["onClick"])) : P("", !0),
611
+ e(se).slice(0, 3).includes(s.id) && t.sourceType != e(j).PLUGIN && u.value ? (r(), _(e(Pe), {
612
+ key: 1,
613
+ ref_key: "categoryFormRef",
614
+ ref: w,
615
+ model: b.value,
616
+ rules: h
617
+ }, {
618
+ default: i(() => [
619
+ c(e(X), { prop: "bakInt" }, {
620
+ default: i(() => [
621
+ c(e(ee), {
622
+ modelValue: b.value.bakInt,
623
+ "onUpdate:modelValue": a[3] || (a[3] = (o) => b.value.bakInt = o),
624
+ placeholder: e(R)("SOURCE_PUBLISH.DEFAULT_SELECT_MSG") || "请选择",
625
+ style: { width: "150px" },
626
+ disabled: t.disabled
627
+ }, {
628
+ prefix: i(() => [
629
+ f("div", Pl, g(e(R)("SOURCE_PUBLISH.CATEGORY") || "分类"), 1),
630
+ a[7] || (a[7] = f("div", { class: "divider" }, null, -1))
631
+ ]),
632
+ default: i(() => [
633
+ (r(!0), V(Z, null, $(e(y), (o) => (r(), _(e(le), {
634
+ key: o.value,
635
+ label: o.label,
636
+ value: o.value
637
+ }, null, 8, ["label", "value"]))), 128))
638
+ ]),
639
+ _: 1
640
+ }, 8, ["modelValue", "placeholder", "disabled"])
641
+ ]),
642
+ _: 1
643
+ })
644
+ ]),
645
+ _: 1
646
+ }, 8, ["model"])) : P("", !0)
647
+ ])
648
+ ]),
649
+ _: 1
650
+ }, 8, ["columns", "data", "on-row-key", "total", "expand-row-keys"])
651
+ ]));
652
+ }
653
+ }, Hl = /* @__PURE__ */ Y(Bl, [["__scopeId", "data-v-a56e8ff6"]]), Vl = { class: "publish-container__back" }, wl = { class: "publish-container__config" }, Nl = { class: "publish-container__config" }, kl = {
654
+ __name: "layout",
655
+ props: {
656
+ showPublishConfig: {
657
+ type: Boolean,
658
+ default: !0
659
+ },
660
+ propsSourceBnid: {
661
+ type: String,
662
+ default: ""
663
+ },
664
+ propsSourceType: {
665
+ type: String,
666
+ default: ""
667
+ },
668
+ propsAuthType: {
669
+ type: String,
670
+ default: ""
671
+ },
672
+ businessSpace: {
673
+ type: String,
674
+ default: ""
675
+ },
676
+ isBackendSystem: {
677
+ type: Boolean,
678
+ default: !1
679
+ },
680
+ disabled: {
681
+ type: Boolean,
682
+ default: !1
683
+ },
684
+ rowBnid: {
685
+ type: String,
686
+ default: ""
687
+ },
688
+ isShowBack: {
689
+ type: Boolean,
690
+ default: !0
691
+ },
692
+ isRepublish: {
693
+ type: Boolean,
694
+ default: !1
695
+ },
696
+ isOfficialRelease: {
697
+ type: Boolean,
698
+ default: !1
699
+ }
700
+ },
701
+ setup(t, { expose: O }) {
702
+ const m = v(null), y = v(null), U = Oe(), B = Ue(), A = v(!1), I = v(!1), k = v(!1), L = v(""), w = v(""), C = v(""), { t: d } = F(), b = t, {
703
+ sourcePublish: R,
704
+ checkVersion: q,
705
+ getPublishVersionDetail: x,
706
+ sourceRePublish: Q
707
+ } = Ee(), h = v({
708
+ versionNumber: "0.0.1",
709
+ selectedData: [],
710
+ showExec: 1
711
+ }), ie = v({
712
+ versionNumber: [
713
+ {
714
+ required: !0,
715
+ message: d("SOURCE_PUBLISH.VERSION_NUMBER_MSG") || "请输入版本号",
716
+ trigger: "blur"
717
+ },
718
+ {
719
+ pattern: /^\d+\.\d+\.\d+$/,
720
+ message: "版本号格式必须为数字.数字.数字,如:1.0.0",
721
+ trigger: "blur"
722
+ },
723
+ {
724
+ validator: async (E, l, S) => {
725
+ if (I.value) return;
726
+ I.value = !0;
727
+ const { data: u } = await q({
728
+ sourceType: L.value,
729
+ sourceId: w.value,
730
+ versionNumber: h.value.versionNumber
731
+ }).finally(() => {
732
+ I.value = !1;
733
+ });
734
+ if (u) {
735
+ const D = d("SOURCE_PUBLISH.VERSION_NUMBER_EXIST_MSG") || "版本号已存在";
736
+ S(new Error(D));
737
+ } else
738
+ S();
739
+ },
740
+ trigger: "blur"
741
+ }
742
+ ],
743
+ selectedData: [
744
+ {
745
+ required: !b.isBackendSystem,
746
+ message: d("SOURCE_PUBLISH.PUBLISH_CHANNEL_MSG") || "请至少选择一个发布渠道",
747
+ trigger: "change"
748
+ },
749
+ {
750
+ validator: (E, l, S) => {
751
+ if (h.value.selectedData.length === 0) {
752
+ b.isBackendSystem && S();
753
+ const u = d("SOURCE_PUBLISH.PUBLISH_CHANNEL_MSG") || "请至少选择一个发布渠道";
754
+ S(new Error(u));
755
+ } else
756
+ S();
757
+ },
758
+ trigger: "change"
759
+ }
760
+ ]
761
+ }), oe = () => {
762
+ y.value?.validateField("selectedData");
763
+ }, G = (E) => {
764
+ const l = E.replace(/[^0-9.]/g, ""), S = l.split(".");
765
+ S.length > 3 ? h.value.versionNumber = S.slice(0, 3).join(".") : h.value.versionNumber = l;
766
+ }, M = async () => {
767
+ W(() => {
768
+ const E = window.history.state;
769
+ E && B.replace({
770
+ path: E.back,
771
+ query: { active: "publish", from: U.query.from }
772
+ });
773
+ });
774
+ }, W = async (E) => {
775
+ const l = await re();
776
+ if (!l) return;
777
+ A.value = !0;
778
+ const S = b.isRepublish ? Q : R;
779
+ try {
780
+ const { code: u } = await S(l);
781
+ u === 0 && typeof E == "function" && E();
782
+ } finally {
783
+ A.value = !1;
784
+ }
785
+ }, ue = (E) => {
786
+ K.value, K.value.forEach((l) => {
787
+ E.find((u) => u.channelType === l.channelType) || E.push({
788
+ channelType: l.channelType,
789
+ inActive: 0,
790
+ allVisible: l.allVisible || !1,
791
+ visibleScope: l.visibleScope || null
792
+ });
793
+ });
794
+ }, re = async () => {
795
+ if (await y.value.validate()) {
796
+ let l = {};
797
+ const S = [];
798
+ for (const T of h.value.selectedData) {
799
+ const n = {
800
+ channelType: Number(T.id)
801
+ }, a = [
802
+ p.FEISHU_WEB,
803
+ p.AGENT_STORE,
804
+ p.MCP_STORE
805
+ ], s = m.value.getVisibleRangeData(T.id);
806
+ if (a.includes(T.id) && !s)
807
+ return !1;
808
+ s && Object.keys(s).length > 0 && (n.visibleScope = s.visibleScope, n.allVisible = s.allVisible, n.openStatus = s.openStatus), b.isRepublish && (n.inActive = 1, n.visibleScope = s?.visibleScope || null, n.allVisible = s?.allVisible || !1), S.push(n);
809
+ }
810
+ if (b.isBackendSystem) {
811
+ const T = Number(p.AIBox);
812
+ S.some(
813
+ (a) => a.channelType === T
814
+ ) || S.push({ channelType: T });
815
+ }
816
+ b.isRepublish && ue(S), b.isRepublish ? (S.forEach((T) => {
817
+ T.visibleScope || (T.visibleScope = null), T.allVisible || (T.allVisible = !1), se.includes((T.channelType || "").toString()) && (T.bakInt = m.value.bakInt);
818
+ }), l = {
819
+ channels: S,
820
+ bnid: b.rowBnid,
821
+ sourceType: L.value,
822
+ sourceId: w.value,
823
+ serviceType: "2"
824
+ }) : l = {
825
+ ...h.value,
826
+ channels: S,
827
+ sourceType: L.value,
828
+ sourceId: w.value,
829
+ workspaceBnid: b.businessSpace || ""
830
+ }, L.value == j.WORKFLOW && (l.forcePublish = !0);
831
+ let u = !1;
832
+ const D = h.value.selectedData.map((T) => T.id);
833
+ if (u = D.find(
834
+ (T) => [
835
+ p.AGENT_STORE,
836
+ p.WORKFLOW_STORE,
837
+ p.PLUGIN_STORE,
838
+ p.MCP_STORE
839
+ ].includes(T)
840
+ ), u) {
841
+ if (await m.value?.validateCategory?.() === !1)
842
+ return !1;
843
+ if (l.bakInt = m.value.bakInt, D.includes(p.PLUGIN_STORE) && C.value == "1" && (l.serviceType = m.value.serviceType, !l.serviceType)) {
844
+ const n = d("SOURCE_PUBLISH.PUBLISH_SERVICE_TYPE_MSG") || "请选择服务类型";
845
+ return z.warning(n), !1;
846
+ }
847
+ }
848
+ return l.official = b.isOfficialRelease, delete l.selectedData, l;
849
+ } else
850
+ return console.log("error submit!"), !1;
851
+ }, J = v({}), K = v([]), de = async () => {
852
+ k.value = !0;
853
+ const { data: E } = await x(
854
+ L.value,
855
+ w.value
856
+ );
857
+ if (k.value = !1, E) {
858
+ const l = E.versionNumber.split(".");
859
+ l.length === 3 ? l[2] = parseInt(l[2]) + 1 : l.push("1"), J.value = E, h.value.versionNumber = l.join("."), h.value.versionDesc = E.versionDesc, h.value.showExec = E.showExec, h.value.showKnowledge = E.showKnowledge, m.value && (m.value.categoryForm.bakInt = E?.bakInt || "");
860
+ }
861
+ K.value = E?.channels || [], te(() => {
862
+ let l = [];
863
+ const S = {};
864
+ if (E?.channels.forEach((u) => {
865
+ l.push(String(u.channelType)), (u.bakInt || u.bakInt == 0) && (S.bakInt = String(u.bakInt)), (u.serviceType || u.serviceType == 0) && (S.serviceType = String(u.serviceType)), (u.currency || u.currency == 0) && (S.currency = u.currency);
866
+ }), l.length == 0)
867
+ L.value == j.AGENT ? l = [p.AGENT_STORE, p.AIBox] : l = [p.AIBox];
868
+ else {
869
+ const u = l.find((D) => D == p.AIBox);
870
+ L.value == j.AGENT && !u && l.push(p.AIBox);
871
+ }
872
+ m.value?.handleToggleRowSelection(l, S);
873
+ });
874
+ };
875
+ return fe(() => {
876
+ L.value = b.propsSourceType, C.value = b.propsAuthType, w.value = b.propsSourceBnid, de();
877
+ }), O({
878
+ handleSourcePublish: W,
879
+ publishData: J,
880
+ submitLoading: A
881
+ }), (E, l) => {
882
+ const S = Me("loading");
883
+ return Ke((r(), V("div", {
884
+ class: Re(["publish-container", t.isBackendSystem ? "backend-system" : ""]),
885
+ id: "source-publish-container"
886
+ }, [
887
+ t.isBackendSystem ? P("", !0) : (r(), _(el, {
888
+ key: 0,
889
+ "back-bar-style": "#f7f8fa"
890
+ }, {
891
+ default: i(() => [
892
+ f("div", Vl, [
893
+ f("span", null, g(e(d)("SOURCE_PUBLISH.PUBLISH") || "发布"), 1),
894
+ c(e(Le), {
895
+ type: "primary",
896
+ class: "publish-container__sure",
897
+ onClick: M,
898
+ loading: A.value,
899
+ disabled: t.disabled
900
+ }, {
901
+ default: i(() => [
902
+ N(g(e(d)("SOURCE_PUBLISH.SURE_PUBLISH") || "确认发布"), 1)
903
+ ]),
904
+ _: 1
905
+ }, 8, ["loading", "disabled"])
906
+ ])
907
+ ]),
908
+ _: 1
909
+ })),
910
+ c(e(Pe), {
911
+ ref_key: "formRef",
912
+ ref: y,
913
+ model: h.value,
914
+ "label-width": "80px",
915
+ class: "publish-container__form",
916
+ rules: ie.value,
917
+ "label-position": "top",
918
+ disabled: t.disabled,
919
+ onSubmit: l[5] || (l[5] = Xe(() => {
920
+ }, ["prevent"]))
921
+ }, {
922
+ default: i(() => [
923
+ t.isRepublish ? P("", !0) : (r(), _(Se, { key: 0 }, {
924
+ default: i(() => [
925
+ N(g(e(d)("SOURCE_PUBLISH.PUBLISH_RECORD") || "发布记录"), 1)
926
+ ]),
927
+ _: 1
928
+ })),
929
+ t.isRepublish ? P("", !0) : (r(), _(pe, { key: 1 }, {
930
+ default: i(() => [
931
+ c(e(X), {
932
+ label: e(d)("SOURCE_PUBLISH.VERSION_NUMBER") || "版本号",
933
+ prop: "versionNumber"
934
+ }, {
935
+ default: i(() => [
936
+ c(e(me), {
937
+ modelValue: h.value.versionNumber,
938
+ "onUpdate:modelValue": l[0] || (l[0] = (u) => h.value.versionNumber = u),
939
+ placeholder: e(d)("SOURCE_PUBLISH.VERSION_PLACEHOLDER") || "版本示例:0.0.1",
940
+ onInput: G
941
+ }, null, 8, ["modelValue", "placeholder"])
942
+ ]),
943
+ _: 1
944
+ }, 8, ["label"]),
945
+ c(e(X), {
946
+ label: e(d)("SOURCE_PUBLISH.VERSION_DESC") || "版本描述",
947
+ prop: "versionDesc"
948
+ }, {
949
+ default: i(() => [
950
+ c(e(me), {
951
+ type: "textarea",
952
+ modelValue: h.value.versionDesc,
953
+ "onUpdate:modelValue": l[1] || (l[1] = (u) => h.value.versionDesc = u),
954
+ rows: 4,
955
+ maxlength: "2000",
956
+ "show-word-limit": "",
957
+ placeholder: e(d)("SOURCE_PUBLISH.VERSION_DESC") || "版本描述"
958
+ }, null, 8, ["modelValue", "placeholder"])
959
+ ]),
960
+ _: 1
961
+ }, 8, ["label"])
962
+ ]),
963
+ _: 1
964
+ })),
965
+ t.showPublishConfig && !t.isRepublish ? (r(), _(Se, { key: 2 }, {
966
+ default: i(() => [
967
+ N(g(e(d)("SOURCE_PUBLISH.PUBLISH_CONFIG") || "发布配置"), 1)
968
+ ]),
969
+ _: 1
970
+ })) : P("", !0),
971
+ t.showPublishConfig && !t.isRepublish ? (r(), _(pe, { key: 3 }, {
972
+ default: i(() => [
973
+ c(e(X), { prop: "showExec" }, {
974
+ default: i(() => [
975
+ f("div", wl, [
976
+ f("p", null, [
977
+ l[6] || (l[6] = f("img", {
978
+ src: ll,
979
+ width: "20",
980
+ height: "20",
981
+ alt: ""
982
+ }, null, -1)),
983
+ f("span", null, g(e(d)("SOURCE_PUBLISH.SHOW_EXECUTE_PROCESS") || "展示执行过程"), 1)
984
+ ]),
985
+ c(e(ge), {
986
+ modelValue: h.value.showExec,
987
+ "onUpdate:modelValue": l[2] || (l[2] = (u) => h.value.showExec = u),
988
+ "active-value": 1,
989
+ "inactive-value": 0
990
+ }, null, 8, ["modelValue"])
991
+ ])
992
+ ]),
993
+ _: 1
994
+ }),
995
+ c(e(X), { prop: "showKnowledge" }, {
996
+ default: i(() => [
997
+ f("div", Nl, [
998
+ f("p", null, [
999
+ l[7] || (l[7] = f("img", {
1000
+ src: tl,
1001
+ width: "20",
1002
+ height: "20",
1003
+ alt: ""
1004
+ }, null, -1)),
1005
+ f("span", null, g(e(d)("SOURCE_PUBLISH.SHOW_RECALL_KNOWLEDGE") || "展示召回的知识库内容"), 1)
1006
+ ]),
1007
+ c(e(ge), {
1008
+ modelValue: h.value.showKnowledge,
1009
+ "onUpdate:modelValue": l[3] || (l[3] = (u) => h.value.showKnowledge = u),
1010
+ "active-value": 1,
1011
+ "inactive-value": 0
1012
+ }, null, 8, ["modelValue"])
1013
+ ])
1014
+ ]),
1015
+ _: 1
1016
+ })
1017
+ ]),
1018
+ _: 1
1019
+ })) : P("", !0),
1020
+ t.isRepublish ? P("", !0) : (r(), _(Se, { key: 4 }, {
1021
+ default: i(() => [
1022
+ l[8] || (l[8] = f("span", { class: "publish-container__required" }, "*", -1)),
1023
+ N(g(e(d)("SOURCE_PUBLISH.PUBLISH_SETTING") || "发布设置"), 1)
1024
+ ]),
1025
+ _: 1
1026
+ })),
1027
+ c(pe, null, {
1028
+ default: i(() => [
1029
+ c(e(X), { prop: "selectedData" }, {
1030
+ default: i(() => [
1031
+ c(Hl, {
1032
+ ref_key: "publishSettingsRef",
1033
+ ref: m,
1034
+ "source-type": L.value,
1035
+ "channel-management": K.value,
1036
+ modelValue: h.value.selectedData,
1037
+ "onUpdate:modelValue": l[4] || (l[4] = (u) => h.value.selectedData = u),
1038
+ "is-backend-system": t.isBackendSystem,
1039
+ disabled: t.disabled,
1040
+ "auth-type": C.value,
1041
+ onValidateField: oe
1042
+ }, null, 8, ["source-type", "channel-management", "modelValue", "is-backend-system", "disabled", "auth-type"])
1043
+ ]),
1044
+ _: 1
1045
+ })
1046
+ ]),
1047
+ _: 1
1048
+ })
1049
+ ]),
1050
+ _: 1
1051
+ }, 8, ["model", "rules", "disabled"])
1052
+ ], 2)), [
1053
+ [S, k.value]
1054
+ ]);
1055
+ };
1056
+ }
1057
+ }, xl = /* @__PURE__ */ Y(kl, [["__scopeId", "data-v-d37f49c4"]]), Jl = () => {
1058
+ const { t } = F();
1059
+ return {
1060
+ serviceType: [
1061
+ // {
1062
+ // label: '平台代币',
1063
+ // value: serviceTypeMap.CURRENCY
1064
+ // },
1065
+ {
1066
+ get label() {
1067
+ return t("COMMON_DICT.SERVICE_TYPE.PRIVATE");
1068
+ },
1069
+ value: Ae.PRIVATE
1070
+ },
1071
+ {
1072
+ get label() {
1073
+ return t("COMMON_DICT.SERVICE_TYPE.DEVELOPER");
1074
+ },
1075
+ value: Ae.DEVELOPER
1076
+ }
1077
+ ],
1078
+ serviceStatus: [
1079
+ // {
1080
+ // label: '抵扣中', //(服务类型为货币结算且当前色元额度充足)
1081
+ // value: 'CURRENCY_USING'
1082
+ // },
1083
+ // {
1084
+ // label: '额度不足', // (服务类型为货币结算且当前色元额度不足)
1085
+ // value: 'CURRENCY_NO_ENOUGH'
1086
+ // },
1087
+ {
1088
+ get label() {
1089
+ return t("COMMON_DICT.SERVICE_STATUS.IN_CALL");
1090
+ },
1091
+ value: "IN_CALL"
1092
+ },
1093
+ {
1094
+ get label() {
1095
+ return t("COMMON_DICT.SERVICE_STATUS.NO_CONFIG");
1096
+ },
1097
+ value: "NO_CONFIG"
1098
+ }
1099
+ // {
1100
+ // label: '开发者结算',
1101
+ // value: 'DEVELOPER'
1102
+ // }
1103
+ ]
1104
+ };
1105
+ }, Zl = () => {
1106
+ const { getStoreDetailType: t } = Ee(), { t: O } = F(), m = v([]), y = v([]);
1107
+ return {
1108
+ storeDetailType: m,
1109
+ allStoreDetailType: y,
1110
+ fetchStoreDetailType: async () => {
1111
+ await t().then((B) => {
1112
+ const A = B?.data?.map((k) => ({
1113
+ label: k.desc,
1114
+ value: String(k.code)
1115
+ })), I = {
1116
+ value: "0",
1117
+ label: O("STOREDETAILTYPE_STORECONTENTLAYOUT.LABEL_ALL")
1118
+ };
1119
+ m.value = A, y.value = [I, ...A];
1120
+ });
1121
+ }
1122
+ };
1123
+ }, $l = we(xl);
1124
+ export {
1125
+ ae as API_CHANNEL_TYPES,
1126
+ Je as AUTHORIZED_CHANNEL_TYPES,
1127
+ ml as ApiTooltip,
1128
+ Ie as CHANNEL_ICON_CONFIG,
1129
+ bl as FeishuTooltip,
1130
+ _e as INACTIVE_ENUM,
1131
+ Qe as INACTIVE_LIST,
1132
+ tt as LIBRARY_PAGE,
1133
+ at as OFFICIAL_LABEL,
1134
+ Te as OPEN_STATUS_VALUE,
1135
+ dt as PUBLISH_STATUS,
1136
+ st as PUBLISH_STATUS_COLORS,
1137
+ nt as PUBLISH_STATUS_ICONS,
1138
+ it as PUBLISH_STATUS_TEXT,
1139
+ ot as PUBLISH_STATUS_TYPE,
1140
+ ze as PUBLISH_TYPE_ICON_MAPPING,
1141
+ yl as PermissionSetting,
1142
+ dl as PublishIcon,
1143
+ Hl as PublishSettings,
1144
+ ut as RELEASE_CHANNEL_CONFIG,
1145
+ p as RELEASE_CHANNEL_TYPE,
1146
+ se as STORE_CHANNEL_TYPES,
1147
+ je as STORE_DETAIL_TYPE,
1148
+ $l as SourcePublish,
1149
+ $l as default,
1150
+ qe as getChannelsByType,
1151
+ Ae as serviceTypeMap,
1152
+ Jl as useServiceConfig,
1153
+ Zl as useStoreDetailType
1154
+ };