@opentiny/tiny-engine-plugin-resource 2.8.2-alpha.1

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/dist/index.js ADDED
@@ -0,0 +1,2642 @@
1
+ import "./style.css";
2
+ import { callEntry as L, getMetaApi as K, META_SERVICE as Q, getMergeMeta as me, useNotify as R, useLayout as D, useModal as ne, useCompile as qe } from "@opentiny/tiny-engine-meta-register";
3
+ import { ref as pe, reactive as Ue, computed as Fe, resolveComponent as G, createBlock as Ce, createCommentVNode as Pe, openBlock as ae, withCtx as k, createElementVNode as H, createVNode as _, createTextVNode as ye, watch as Xe, createElementBlock as be, Fragment as Ie, normalizeClass as Ge, renderList as Oe, toDisplayString as Ne, Teleport as Ze, provide as Ke, onMounted as Qe, withModifiers as We } from "vue";
4
+ import { SvgButton as P, ButtonGroup as Ee, PluginSetting as z, SearchEmpty as V, PluginPanel as ve } from "@opentiny/tiny-engine-common";
5
+ import { Input as Be, Form as $e, FormItem as et, CollapseItem as tt, Collapse as nt, TinyButton as je, FileUpload as ot, Alert as rt, DialogBox as it, Popover as at, Checkbox as st, GridColumn as ct, Grid as lt, Divider as ut } from "@opentiny/vue";
6
+ import { iconPopup as oe } from "@opentiny/vue-icon";
7
+ const He = {
8
+ id: "engine.plugins.resource",
9
+ title: "资源管理",
10
+ type: "plugins",
11
+ icon: "plugin-icon-resource"
12
+ }, le = "/material-center/api", F = L((s) => K(Q.Http).get(`${le}/resource/find/${s}`), {
13
+ metaData: {
14
+ id: "engine.plugins.resource.http.fetchResourceListByGroupId"
15
+ },
16
+ ctx: () => ({
17
+ getMetaApi: K,
18
+ getMergeMeta: me,
19
+ META_SERVICE: Q,
20
+ baseUrl: le,
21
+ fetchResourceListByGroupId: F,
22
+ fetchResourceList: Se,
23
+ createResource: xe,
24
+ batchCreateResource: O,
25
+ deleteResource: we,
26
+ fetchResourceGroupByAppId: ce,
27
+ createResourceGroup: de,
28
+ updateResourceGroup: T
29
+ })
30
+ }), Se = L(() => K(Q.Http).get(`${le}/resource/like`), {
31
+ metaData: {
32
+ id: "engine.plugins.resource.http.fetchResourceList"
33
+ },
34
+ ctx: () => ({
35
+ getMetaApi: K,
36
+ getMergeMeta: me,
37
+ META_SERVICE: Q,
38
+ baseUrl: le,
39
+ fetchResourceListByGroupId: F,
40
+ fetchResourceList: Se,
41
+ createResource: xe,
42
+ batchCreateResource: O,
43
+ deleteResource: we,
44
+ fetchResourceGroupByAppId: ce,
45
+ createResourceGroup: de,
46
+ updateResourceGroup: T
47
+ })
48
+ }), xe = L((s) => {
49
+ var n;
50
+ return K(Q.Http).post(`${le}/resource/create`, {
51
+ appId: K(Q.GlobalService).getBaseInfo().id,
52
+ platformId: (n = me("engine.config")) == null ? void 0 : n.platformId,
53
+ ...s
54
+ });
55
+ }, {
56
+ metaData: {
57
+ id: "engine.plugins.resource.http.createResource"
58
+ },
59
+ ctx: () => ({
60
+ getMetaApi: K,
61
+ getMergeMeta: me,
62
+ META_SERVICE: Q,
63
+ baseUrl: le,
64
+ fetchResourceListByGroupId: F,
65
+ fetchResourceList: Se,
66
+ createResource: xe,
67
+ batchCreateResource: O,
68
+ deleteResource: we,
69
+ fetchResourceGroupByAppId: ce,
70
+ createResourceGroup: de,
71
+ updateResourceGroup: T
72
+ })
73
+ }), O = L((s) => K(Q.Http).post(`${le}/resource/create/batch`, s.map((n) => {
74
+ var v;
75
+ return {
76
+ appId: K(Q.GlobalService).getBaseInfo().id,
77
+ platformId: (v = me("engine.config")) == null ? void 0 : v.platformId,
78
+ ...n
79
+ };
80
+ })), {
81
+ metaData: {
82
+ id: "engine.plugins.resource.http.batchCreateResource"
83
+ },
84
+ ctx: () => ({
85
+ getMetaApi: K,
86
+ getMergeMeta: me,
87
+ META_SERVICE: Q,
88
+ baseUrl: le,
89
+ fetchResourceListByGroupId: F,
90
+ fetchResourceList: Se,
91
+ createResource: xe,
92
+ batchCreateResource: O,
93
+ deleteResource: we,
94
+ fetchResourceGroupByAppId: ce,
95
+ createResourceGroup: de,
96
+ updateResourceGroup: T
97
+ })
98
+ }), we = L((s) => K(Q.Http).get(`${le}/resource/delete/${s}`), {
99
+ metaData: {
100
+ id: "engine.plugins.resource.http.deleteResource"
101
+ },
102
+ ctx: () => ({
103
+ getMetaApi: K,
104
+ getMergeMeta: me,
105
+ META_SERVICE: Q,
106
+ baseUrl: le,
107
+ fetchResourceListByGroupId: F,
108
+ fetchResourceList: Se,
109
+ createResource: xe,
110
+ batchCreateResource: O,
111
+ deleteResource: we,
112
+ fetchResourceGroupByAppId: ce,
113
+ createResourceGroup: de,
114
+ updateResourceGroup: T
115
+ })
116
+ }), ce = L(() => K(Q.Http).get(`${le}/resource-group/${K(Q.GlobalService).getBaseInfo().id}`), {
117
+ metaData: {
118
+ id: "engine.plugins.resource.http.fetchResourceGroupByAppId"
119
+ },
120
+ ctx: () => ({
121
+ getMetaApi: K,
122
+ getMergeMeta: me,
123
+ META_SERVICE: Q,
124
+ baseUrl: le,
125
+ fetchResourceListByGroupId: F,
126
+ fetchResourceList: Se,
127
+ createResource: xe,
128
+ batchCreateResource: O,
129
+ deleteResource: we,
130
+ fetchResourceGroupByAppId: ce,
131
+ createResourceGroup: de,
132
+ updateResourceGroup: T
133
+ })
134
+ }), de = L((s) => {
135
+ var n;
136
+ return K(Q.Http).post(`${le}/resource-group/create`, {
137
+ appId: K(Q.GlobalService).getBaseInfo().id,
138
+ platformId: (n = me("engine.config")) == null ? void 0 : n.platformId,
139
+ ...s
140
+ });
141
+ }, {
142
+ metaData: {
143
+ id: "engine.plugins.resource.http.createResourceGroup"
144
+ },
145
+ ctx: () => ({
146
+ getMetaApi: K,
147
+ getMergeMeta: me,
148
+ META_SERVICE: Q,
149
+ baseUrl: le,
150
+ fetchResourceListByGroupId: F,
151
+ fetchResourceList: Se,
152
+ createResource: xe,
153
+ batchCreateResource: O,
154
+ deleteResource: we,
155
+ fetchResourceGroupByAppId: ce,
156
+ createResourceGroup: de,
157
+ updateResourceGroup: T
158
+ })
159
+ }), T = L((s, n) => K(Q.Http).put(`${le}/resource-group/update/${s}`, n), {
160
+ metaData: {
161
+ id: "engine.plugins.resource.http.updateResourceGroup"
162
+ },
163
+ ctx: () => ({
164
+ getMetaApi: K,
165
+ getMergeMeta: me,
166
+ META_SERVICE: Q,
167
+ baseUrl: le,
168
+ fetchResourceListByGroupId: F,
169
+ fetchResourceList: Se,
170
+ createResource: xe,
171
+ batchCreateResource: O,
172
+ deleteResource: we,
173
+ fetchResourceGroupByAppId: ce,
174
+ createResourceGroup: de,
175
+ updateResourceGroup: T
176
+ })
177
+ }), Re = pe(!1), ge = Ue({
178
+ title: "分组设置",
179
+ activeName: "general",
180
+ data: {
181
+ name: "",
182
+ description: ""
183
+ }
184
+ }), ue = L((s) => {
185
+ s && (ge.data = {
186
+ ...s
187
+ }), Re.value = !0;
188
+ }, {
189
+ metaData: {
190
+ id: "engine.plugins.resource.ResourceSetting.openResourceSettingPanel"
191
+ },
192
+ ctx: () => ({
193
+ useLayout: D,
194
+ useNotify: R,
195
+ PluginSetting: z,
196
+ ButtonGroup: Ee,
197
+ SvgButton: P,
198
+ createResourceGroup: de,
199
+ updateResourceGroup: T,
200
+ isShow: Re,
201
+ state: ge,
202
+ openResourceSettingPanel: ue,
203
+ closeResourceSettingPanel: se
204
+ })
205
+ }), se = L(() => {
206
+ Re.value = !1;
207
+ }, {
208
+ metaData: {
209
+ id: "engine.plugins.resource.ResourceSetting.closeResourceSettingPanel"
210
+ },
211
+ ctx: () => ({
212
+ useLayout: D,
213
+ useNotify: R,
214
+ PluginSetting: z,
215
+ ButtonGroup: Ee,
216
+ SvgButton: P,
217
+ createResourceGroup: de,
218
+ updateResourceGroup: T,
219
+ isShow: Re,
220
+ state: ge,
221
+ openResourceSettingPanel: ue,
222
+ closeResourceSettingPanel: se
223
+ })
224
+ }), dt = {
225
+ components: {
226
+ PluginSetting: z,
227
+ SvgButton: P,
228
+ TinyButton: je,
229
+ TinyCollapse: nt,
230
+ TinyCollapseItem: tt,
231
+ TinyFormItem: et,
232
+ TinyForm: $e,
233
+ TinyInput: Be,
234
+ ButtonGroup: Ee
235
+ },
236
+ props: {},
237
+ emits: ["refreshCategory"],
238
+ setup(s, {
239
+ emit: n
240
+ }) {
241
+ const {
242
+ PLUGIN_NAME: v,
243
+ getPluginByLayout: t
244
+ } = D(), m = Fe(() => t(v.Resource)), c = pe(), r = Ue({
245
+ name: [{
246
+ required: !0,
247
+ message: "必填",
248
+ trigger: "blur"
249
+ }, {
250
+ min: 1,
251
+ max: 32,
252
+ message: "长度在1-32之间",
253
+ trigger: "blur"
254
+ }, {
255
+ type: "string",
256
+ validator: (a, i, l) => {
257
+ /^[\w\-\u4e00-\u9fa5]+$/.test(i) ? l() : l(new Error("分组名称只能包含中文、英文、数字、下划线、中划线等字符"));
258
+ }
259
+ }]
260
+ }), e = L(() => {
261
+ c.value.validate((a) => {
262
+ a && (ge.data.id ? T(ge.data.id, {
263
+ name: ge.data.name,
264
+ description: ge.data.description
265
+ }).then(() => {
266
+ n("refreshCategory"), se(), R({
267
+ message: "修改资源分组成功",
268
+ type: "success"
269
+ });
270
+ }).catch((i) => {
271
+ R({
272
+ message: i,
273
+ type: "error"
274
+ });
275
+ }) : de(ge.data).then(() => {
276
+ n("refreshCategory"), se(), R({
277
+ message: "添加资源分组成功",
278
+ type: "success"
279
+ });
280
+ }).catch((i) => {
281
+ R({
282
+ message: i,
283
+ type: "error"
284
+ });
285
+ }));
286
+ });
287
+ }, {
288
+ metaData: {
289
+ id: "engine.plugins.resource.ResourceSetting.saveResourceSetting"
290
+ },
291
+ ctx: () => ({
292
+ props: s,
293
+ emit: n,
294
+ PLUGIN_NAME: v,
295
+ getPluginByLayout: t,
296
+ align: m,
297
+ generalForm: c,
298
+ rules: r,
299
+ saveResourceSetting: e,
300
+ cancelResourceSetting: o,
301
+ useLayout: D,
302
+ useNotify: R,
303
+ PluginSetting: z,
304
+ ButtonGroup: Ee,
305
+ SvgButton: P,
306
+ createResourceGroup: de,
307
+ updateResourceGroup: T,
308
+ isShow: Re,
309
+ state: ge,
310
+ openResourceSettingPanel: ue,
311
+ closeResourceSettingPanel: se
312
+ })
313
+ }), o = L(() => {
314
+ se();
315
+ }, {
316
+ metaData: {
317
+ id: "engine.plugins.resource.ResourceSetting.cancelResourceSetting"
318
+ },
319
+ ctx: () => ({
320
+ props: s,
321
+ emit: n,
322
+ PLUGIN_NAME: v,
323
+ getPluginByLayout: t,
324
+ align: m,
325
+ generalForm: c,
326
+ rules: r,
327
+ saveResourceSetting: e,
328
+ cancelResourceSetting: o,
329
+ useLayout: D,
330
+ useNotify: R,
331
+ PluginSetting: z,
332
+ ButtonGroup: Ee,
333
+ SvgButton: P,
334
+ createResourceGroup: de,
335
+ updateResourceGroup: T,
336
+ isShow: Re,
337
+ state: ge,
338
+ openResourceSettingPanel: ue,
339
+ closeResourceSettingPanel: se
340
+ })
341
+ });
342
+ return {
343
+ PLUGIN_NAME: v,
344
+ align: m,
345
+ isShow: Re,
346
+ generalForm: c,
347
+ state: ge,
348
+ rules: r,
349
+ saveResourceSetting: e,
350
+ cancelResourceSetting: o
351
+ };
352
+ }
353
+ }, Ve = (s, n) => {
354
+ const v = s.__vccOpts || s;
355
+ for (const [t, m] of n)
356
+ v[t] = m;
357
+ return v;
358
+ }, pt = { class: "resource-setting-content" };
359
+ function ft(s, n, v, t, m, c) {
360
+ const r = G("tiny-button"), e = G("svg-button"), o = G("button-group"), a = G("tiny-input"), i = G("tiny-form-item"), l = G("tiny-form"), u = G("tiny-collapse-item"), b = G("tiny-collapse"), g = G("plugin-setting");
361
+ return t.isShow ? (ae(), Ce(g, {
362
+ key: 0,
363
+ "fixed-name": t.PLUGIN_NAME.Resource,
364
+ align: t.align,
365
+ title: t.state.title
366
+ }, {
367
+ header: k(() => [
368
+ _(o, null, {
369
+ default: k(() => [
370
+ _(r, {
371
+ type: "primary",
372
+ onClick: t.saveResourceSetting
373
+ }, {
374
+ default: k(() => [...n[3] || (n[3] = [
375
+ ye("保存", -1)
376
+ ])]),
377
+ _: 1
378
+ }, 8, ["onClick"]),
379
+ _(e, {
380
+ name: "close",
381
+ onClick: t.cancelResourceSetting
382
+ }, null, 8, ["onClick"])
383
+ ]),
384
+ _: 1
385
+ })
386
+ ]),
387
+ content: k(() => [
388
+ H("div", pt, [
389
+ _(b, {
390
+ modelValue: t.state.activeName,
391
+ "onUpdate:modelValue": n[2] || (n[2] = (h) => t.state.activeName = h),
392
+ class: "resource-setting-collapse"
393
+ }, {
394
+ default: k(() => [
395
+ _(u, {
396
+ title: "基本设置",
397
+ name: "general"
398
+ }, {
399
+ default: k(() => [
400
+ _(l, {
401
+ ref: "generalForm",
402
+ model: t.state.data,
403
+ rules: t.rules,
404
+ "label-width": "80px",
405
+ "label-position": "left",
406
+ class: "general-config-form"
407
+ }, {
408
+ default: k(() => [
409
+ _(i, {
410
+ prop: "name",
411
+ label: "分组名称"
412
+ }, {
413
+ default: k(() => [
414
+ _(a, {
415
+ modelValue: t.state.data.name,
416
+ "onUpdate:modelValue": n[0] || (n[0] = (h) => t.state.data.name = h)
417
+ }, null, 8, ["modelValue"])
418
+ ]),
419
+ _: 1
420
+ }),
421
+ _(i, {
422
+ prop: "description",
423
+ label: "分组描述"
424
+ }, {
425
+ default: k(() => [
426
+ _(a, {
427
+ type: "textarea",
428
+ modelValue: t.state.data.description,
429
+ "onUpdate:modelValue": n[1] || (n[1] = (h) => t.state.data.description = h)
430
+ }, null, 8, ["modelValue"])
431
+ ]),
432
+ _: 1
433
+ })
434
+ ]),
435
+ _: 1
436
+ }, 8, ["model", "rules"])
437
+ ]),
438
+ _: 1
439
+ })
440
+ ]),
441
+ _: 1
442
+ }, 8, ["modelValue"])
443
+ ])
444
+ ]),
445
+ _: 1
446
+ }, 8, ["fixed-name", "align", "title"])) : Pe("", !0);
447
+ }
448
+ const he = /* @__PURE__ */ Ve(dt, [["render", ft], ["__scopeId", "data-v-86b98f69"]]);
449
+ var gt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
450
+ function mt(s) {
451
+ return s && s.__esModule && Object.prototype.hasOwnProperty.call(s, "default") ? s.default : s;
452
+ }
453
+ var ze = { exports: {} };
454
+ /*!
455
+ * clipboard.js v2.0.11
456
+ * https://clipboardjs.com/
457
+ *
458
+ * Licensed MIT © Zeno Rocha
459
+ */
460
+ (function(s, n) {
461
+ (function(t, m) {
462
+ s.exports = m();
463
+ })(gt, function() {
464
+ return (
465
+ /******/
466
+ function() {
467
+ var v = {
468
+ /***/
469
+ 686: (
470
+ /***/
471
+ function(c, r, e) {
472
+ e.d(r, {
473
+ default: function() {
474
+ return (
475
+ /* binding */
476
+ Je
477
+ );
478
+ }
479
+ });
480
+ var o = e(279), a = /* @__PURE__ */ e.n(o), i = e(370), l = /* @__PURE__ */ e.n(i), u = e(817), b = /* @__PURE__ */ e.n(u);
481
+ function g(w) {
482
+ try {
483
+ return document.execCommand(w);
484
+ } catch {
485
+ return !1;
486
+ }
487
+ }
488
+ var h = function(f) {
489
+ var p = b()(f);
490
+ return g("cut"), p;
491
+ }, y = h;
492
+ function I(w) {
493
+ var f = document.documentElement.getAttribute("dir") === "rtl", p = document.createElement("textarea");
494
+ p.style.fontSize = "12pt", p.style.border = "0", p.style.padding = "0", p.style.margin = "0", p.style.position = "absolute", p.style[f ? "right" : "left"] = "-9999px";
495
+ var S = window.pageYOffset || document.documentElement.scrollTop;
496
+ return p.style.top = "".concat(S, "px"), p.setAttribute("readonly", ""), p.value = w, p;
497
+ }
498
+ var j = function(f, p) {
499
+ var S = I(f);
500
+ p.container.appendChild(S);
501
+ var x = b()(S);
502
+ return g("copy"), S.remove(), x;
503
+ }, X = function(f) {
504
+ var p = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
505
+ container: document.body
506
+ }, S = "";
507
+ return typeof f == "string" ? S = j(f, p) : f instanceof HTMLInputElement && !["text", "search", "url", "tel", "password"].includes(f == null ? void 0 : f.type) ? S = j(f.value, p) : (S = b()(f), g("copy")), S;
508
+ }, Y = X;
509
+ function d(w) {
510
+ "@babel/helpers - typeof";
511
+ return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? d = function(p) {
512
+ return typeof p;
513
+ } : d = function(p) {
514
+ return p && typeof Symbol == "function" && p.constructor === Symbol && p !== Symbol.prototype ? "symbol" : typeof p;
515
+ }, d(w);
516
+ }
517
+ var U = function() {
518
+ var f = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, p = f.action, S = p === void 0 ? "copy" : p, x = f.container, A = f.target, fe = f.text;
519
+ if (S !== "copy" && S !== "cut")
520
+ throw new Error('Invalid "action" value, use either "copy" or "cut"');
521
+ if (A !== void 0)
522
+ if (A && d(A) === "object" && A.nodeType === 1) {
523
+ if (S === "copy" && A.hasAttribute("disabled"))
524
+ throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');
525
+ if (S === "cut" && (A.hasAttribute("readonly") || A.hasAttribute("disabled")))
526
+ throw new Error(`Invalid "target" attribute. You can't cut text from elements with "readonly" or "disabled" attributes`);
527
+ } else
528
+ throw new Error('Invalid "target" value, use a valid Element');
529
+ if (fe)
530
+ return Y(fe, {
531
+ container: x
532
+ });
533
+ if (A)
534
+ return S === "cut" ? y(A) : Y(A, {
535
+ container: x
536
+ });
537
+ }, $ = U;
538
+ function J(w) {
539
+ "@babel/helpers - typeof";
540
+ return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? J = function(p) {
541
+ return typeof p;
542
+ } : J = function(p) {
543
+ return p && typeof Symbol == "function" && p.constructor === Symbol && p !== Symbol.prototype ? "symbol" : typeof p;
544
+ }, J(w);
545
+ }
546
+ function ee(w, f) {
547
+ if (!(w instanceof f))
548
+ throw new TypeError("Cannot call a class as a function");
549
+ }
550
+ function W(w, f) {
551
+ for (var p = 0; p < f.length; p++) {
552
+ var S = f[p];
553
+ S.enumerable = S.enumerable || !1, S.configurable = !0, "value" in S && (S.writable = !0), Object.defineProperty(w, S.key, S);
554
+ }
555
+ }
556
+ function te(w, f, p) {
557
+ return f && W(w.prototype, f), p && W(w, p), w;
558
+ }
559
+ function C(w, f) {
560
+ if (typeof f != "function" && f !== null)
561
+ throw new TypeError("Super expression must either be null or a function");
562
+ w.prototype = Object.create(f && f.prototype, { constructor: { value: w, writable: !0, configurable: !0 } }), f && E(w, f);
563
+ }
564
+ function E(w, f) {
565
+ return E = Object.setPrototypeOf || function(S, x) {
566
+ return S.__proto__ = x, S;
567
+ }, E(w, f);
568
+ }
569
+ function q(w) {
570
+ var f = Ae();
571
+ return function() {
572
+ var S = Te(w), x;
573
+ if (f) {
574
+ var A = Te(this).constructor;
575
+ x = Reflect.construct(S, arguments, A);
576
+ } else
577
+ x = S.apply(this, arguments);
578
+ return Le(this, x);
579
+ };
580
+ }
581
+ function Le(w, f) {
582
+ return f && (J(f) === "object" || typeof f == "function") ? f : ke(w);
583
+ }
584
+ function ke(w) {
585
+ if (w === void 0)
586
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
587
+ return w;
588
+ }
589
+ function Ae() {
590
+ if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
591
+ if (typeof Proxy == "function") return !0;
592
+ try {
593
+ return Date.prototype.toString.call(Reflect.construct(Date, [], function() {
594
+ })), !0;
595
+ } catch {
596
+ return !1;
597
+ }
598
+ }
599
+ function Te(w) {
600
+ return Te = Object.setPrototypeOf ? Object.getPrototypeOf : function(p) {
601
+ return p.__proto__ || Object.getPrototypeOf(p);
602
+ }, Te(w);
603
+ }
604
+ function Me(w, f) {
605
+ var p = "data-clipboard-".concat(w);
606
+ if (f.hasAttribute(p))
607
+ return f.getAttribute(p);
608
+ }
609
+ var Ye = /* @__PURE__ */ function(w) {
610
+ C(p, w);
611
+ var f = q(p);
612
+ function p(S, x) {
613
+ var A;
614
+ return ee(this, p), A = f.call(this), A.resolveOptions(x), A.listenClick(S), A;
615
+ }
616
+ return te(p, [{
617
+ key: "resolveOptions",
618
+ value: function() {
619
+ var x = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
620
+ this.action = typeof x.action == "function" ? x.action : this.defaultAction, this.target = typeof x.target == "function" ? x.target : this.defaultTarget, this.text = typeof x.text == "function" ? x.text : this.defaultText, this.container = J(x.container) === "object" ? x.container : document.body;
621
+ }
622
+ /**
623
+ * Adds a click event listener to the passed trigger.
624
+ * @param {String|HTMLElement|HTMLCollection|NodeList} trigger
625
+ */
626
+ }, {
627
+ key: "listenClick",
628
+ value: function(x) {
629
+ var A = this;
630
+ this.listener = l()(x, "click", function(fe) {
631
+ return A.onClick(fe);
632
+ });
633
+ }
634
+ /**
635
+ * Defines a new `ClipboardAction` on each click event.
636
+ * @param {Event} e
637
+ */
638
+ }, {
639
+ key: "onClick",
640
+ value: function(x) {
641
+ var A = x.delegateTarget || x.currentTarget, fe = this.action(A) || "copy", De = $({
642
+ action: fe,
643
+ container: this.container,
644
+ target: this.target(A),
645
+ text: this.text(A)
646
+ });
647
+ this.emit(De ? "success" : "error", {
648
+ action: fe,
649
+ text: De,
650
+ trigger: A,
651
+ clearSelection: function() {
652
+ A && A.focus(), window.getSelection().removeAllRanges();
653
+ }
654
+ });
655
+ }
656
+ /**
657
+ * Default `action` lookup function.
658
+ * @param {Element} trigger
659
+ */
660
+ }, {
661
+ key: "defaultAction",
662
+ value: function(x) {
663
+ return Me("action", x);
664
+ }
665
+ /**
666
+ * Default `target` lookup function.
667
+ * @param {Element} trigger
668
+ */
669
+ }, {
670
+ key: "defaultTarget",
671
+ value: function(x) {
672
+ var A = Me("target", x);
673
+ if (A)
674
+ return document.querySelector(A);
675
+ }
676
+ /**
677
+ * Allow fire programmatically a copy action
678
+ * @param {String|HTMLElement} target
679
+ * @param {Object} options
680
+ * @returns Text copied.
681
+ */
682
+ }, {
683
+ key: "defaultText",
684
+ /**
685
+ * Default `text` lookup function.
686
+ * @param {Element} trigger
687
+ */
688
+ value: function(x) {
689
+ return Me("text", x);
690
+ }
691
+ /**
692
+ * Destroy lifecycle.
693
+ */
694
+ }, {
695
+ key: "destroy",
696
+ value: function() {
697
+ this.listener.destroy();
698
+ }
699
+ }], [{
700
+ key: "copy",
701
+ value: function(x) {
702
+ var A = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
703
+ container: document.body
704
+ };
705
+ return Y(x, A);
706
+ }
707
+ /**
708
+ * Allow fire programmatically a cut action
709
+ * @param {String|HTMLElement} target
710
+ * @returns Text cutted.
711
+ */
712
+ }, {
713
+ key: "cut",
714
+ value: function(x) {
715
+ return y(x);
716
+ }
717
+ /**
718
+ * Returns the support of the given action, or all actions if no action is
719
+ * given.
720
+ * @param {String} [action]
721
+ */
722
+ }, {
723
+ key: "isSupported",
724
+ value: function() {
725
+ var x = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ["copy", "cut"], A = typeof x == "string" ? [x] : x, fe = !!document.queryCommandSupported;
726
+ return A.forEach(function(De) {
727
+ fe = fe && !!document.queryCommandSupported(De);
728
+ }), fe;
729
+ }
730
+ }]), p;
731
+ }(a()), Je = Ye;
732
+ }
733
+ ),
734
+ /***/
735
+ 828: (
736
+ /***/
737
+ function(c) {
738
+ var r = 9;
739
+ if (typeof Element < "u" && !Element.prototype.matches) {
740
+ var e = Element.prototype;
741
+ e.matches = e.matchesSelector || e.mozMatchesSelector || e.msMatchesSelector || e.oMatchesSelector || e.webkitMatchesSelector;
742
+ }
743
+ function o(a, i) {
744
+ for (; a && a.nodeType !== r; ) {
745
+ if (typeof a.matches == "function" && a.matches(i))
746
+ return a;
747
+ a = a.parentNode;
748
+ }
749
+ }
750
+ c.exports = o;
751
+ }
752
+ ),
753
+ /***/
754
+ 438: (
755
+ /***/
756
+ function(c, r, e) {
757
+ var o = e(828);
758
+ function a(u, b, g, h, y) {
759
+ var I = l.apply(this, arguments);
760
+ return u.addEventListener(g, I, y), {
761
+ destroy: function() {
762
+ u.removeEventListener(g, I, y);
763
+ }
764
+ };
765
+ }
766
+ function i(u, b, g, h, y) {
767
+ return typeof u.addEventListener == "function" ? a.apply(null, arguments) : typeof g == "function" ? a.bind(null, document).apply(null, arguments) : (typeof u == "string" && (u = document.querySelectorAll(u)), Array.prototype.map.call(u, function(I) {
768
+ return a(I, b, g, h, y);
769
+ }));
770
+ }
771
+ function l(u, b, g, h) {
772
+ return function(y) {
773
+ y.delegateTarget = o(y.target, b), y.delegateTarget && h.call(u, y);
774
+ };
775
+ }
776
+ c.exports = i;
777
+ }
778
+ ),
779
+ /***/
780
+ 879: (
781
+ /***/
782
+ function(c, r) {
783
+ r.node = function(e) {
784
+ return e !== void 0 && e instanceof HTMLElement && e.nodeType === 1;
785
+ }, r.nodeList = function(e) {
786
+ var o = Object.prototype.toString.call(e);
787
+ return e !== void 0 && (o === "[object NodeList]" || o === "[object HTMLCollection]") && "length" in e && (e.length === 0 || r.node(e[0]));
788
+ }, r.string = function(e) {
789
+ return typeof e == "string" || e instanceof String;
790
+ }, r.fn = function(e) {
791
+ var o = Object.prototype.toString.call(e);
792
+ return o === "[object Function]";
793
+ };
794
+ }
795
+ ),
796
+ /***/
797
+ 370: (
798
+ /***/
799
+ function(c, r, e) {
800
+ var o = e(879), a = e(438);
801
+ function i(g, h, y) {
802
+ if (!g && !h && !y)
803
+ throw new Error("Missing required arguments");
804
+ if (!o.string(h))
805
+ throw new TypeError("Second argument must be a String");
806
+ if (!o.fn(y))
807
+ throw new TypeError("Third argument must be a Function");
808
+ if (o.node(g))
809
+ return l(g, h, y);
810
+ if (o.nodeList(g))
811
+ return u(g, h, y);
812
+ if (o.string(g))
813
+ return b(g, h, y);
814
+ throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList");
815
+ }
816
+ function l(g, h, y) {
817
+ return g.addEventListener(h, y), {
818
+ destroy: function() {
819
+ g.removeEventListener(h, y);
820
+ }
821
+ };
822
+ }
823
+ function u(g, h, y) {
824
+ return Array.prototype.forEach.call(g, function(I) {
825
+ I.addEventListener(h, y);
826
+ }), {
827
+ destroy: function() {
828
+ Array.prototype.forEach.call(g, function(I) {
829
+ I.removeEventListener(h, y);
830
+ });
831
+ }
832
+ };
833
+ }
834
+ function b(g, h, y) {
835
+ return a(document.body, g, h, y);
836
+ }
837
+ c.exports = i;
838
+ }
839
+ ),
840
+ /***/
841
+ 817: (
842
+ /***/
843
+ function(c) {
844
+ function r(e) {
845
+ var o;
846
+ if (e.nodeName === "SELECT")
847
+ e.focus(), o = e.value;
848
+ else if (e.nodeName === "INPUT" || e.nodeName === "TEXTAREA") {
849
+ var a = e.hasAttribute("readonly");
850
+ a || e.setAttribute("readonly", ""), e.select(), e.setSelectionRange(0, e.value.length), a || e.removeAttribute("readonly"), o = e.value;
851
+ } else {
852
+ e.hasAttribute("contenteditable") && e.focus();
853
+ var i = window.getSelection(), l = document.createRange();
854
+ l.selectNodeContents(e), i.removeAllRanges(), i.addRange(l), o = i.toString();
855
+ }
856
+ return o;
857
+ }
858
+ c.exports = r;
859
+ }
860
+ ),
861
+ /***/
862
+ 279: (
863
+ /***/
864
+ function(c) {
865
+ function r() {
866
+ }
867
+ r.prototype = {
868
+ on: function(e, o, a) {
869
+ var i = this.e || (this.e = {});
870
+ return (i[e] || (i[e] = [])).push({
871
+ fn: o,
872
+ ctx: a
873
+ }), this;
874
+ },
875
+ once: function(e, o, a) {
876
+ var i = this;
877
+ function l() {
878
+ i.off(e, l), o.apply(a, arguments);
879
+ }
880
+ return l._ = o, this.on(e, l, a);
881
+ },
882
+ emit: function(e) {
883
+ var o = [].slice.call(arguments, 1), a = ((this.e || (this.e = {}))[e] || []).slice(), i = 0, l = a.length;
884
+ for (i; i < l; i++)
885
+ a[i].fn.apply(a[i].ctx, o);
886
+ return this;
887
+ },
888
+ off: function(e, o) {
889
+ var a = this.e || (this.e = {}), i = a[e], l = [];
890
+ if (i && o)
891
+ for (var u = 0, b = i.length; u < b; u++)
892
+ i[u].fn !== o && i[u].fn._ !== o && l.push(i[u]);
893
+ return l.length ? a[e] = l : delete a[e], this;
894
+ }
895
+ }, c.exports = r, c.exports.TinyEmitter = r;
896
+ }
897
+ )
898
+ /******/
899
+ }, t = {};
900
+ function m(c) {
901
+ if (t[c])
902
+ return t[c].exports;
903
+ var r = t[c] = {
904
+ /******/
905
+ // no module.id needed
906
+ /******/
907
+ // no module.loaded needed
908
+ /******/
909
+ exports: {}
910
+ /******/
911
+ };
912
+ return v[c](r, r.exports, m), r.exports;
913
+ }
914
+ return function() {
915
+ m.n = function(c) {
916
+ var r = c && c.__esModule ? (
917
+ /******/
918
+ function() {
919
+ return c.default;
920
+ }
921
+ ) : (
922
+ /******/
923
+ function() {
924
+ return c;
925
+ }
926
+ );
927
+ return m.d(r, { a: r }), r;
928
+ };
929
+ }(), function() {
930
+ m.d = function(c, r) {
931
+ for (var e in r)
932
+ m.o(r, e) && !m.o(c, e) && Object.defineProperty(c, e, { enumerable: !0, get: r[e] });
933
+ };
934
+ }(), function() {
935
+ m.o = function(c, r) {
936
+ return Object.prototype.hasOwnProperty.call(c, r);
937
+ };
938
+ }(), m(686);
939
+ }().default
940
+ );
941
+ });
942
+ })(ze);
943
+ var yt = ze.exports;
944
+ const vt = /* @__PURE__ */ mt(yt), re = (s) => {
945
+ const n = (s == null ? void 0 : s.appendToBody) === void 0 ? !0 : s.appendToBody;
946
+ return {
947
+ toClipboard(v, t) {
948
+ return new Promise((m, c) => {
949
+ const r = document.createElement("button"), e = new vt(r, {
950
+ text: () => v,
951
+ action: () => "copy",
952
+ container: t !== void 0 ? t : document.body
953
+ });
954
+ e.on("success", (o) => {
955
+ e.destroy(), m(o);
956
+ }), e.on("error", (o) => {
957
+ e.destroy(), c(o);
958
+ }), n && document.body.appendChild(r), r.click(), n && document.body.removeChild(r);
959
+ });
960
+ }
961
+ };
962
+ }, Z = pe(!1), ie = pe(!1), M = Ue({
963
+ title: "资源设置",
964
+ group: {},
965
+ sourceList: []
966
+ }), B = L((s) => {
967
+ M.group = {
968
+ ...s
969
+ }, Z.value = !0;
970
+ }, {
971
+ metaData: {
972
+ id: "engine.plugins.resource.ResourceList.openResourceListPanel"
973
+ },
974
+ ctx: () => ({
975
+ useClipboard: re,
976
+ iconPopup: oe,
977
+ useLayout: D,
978
+ useModal: ne,
979
+ useNotify: R,
980
+ PluginSetting: z,
981
+ SvgButton: P,
982
+ SearchEmpty: V,
983
+ fetchResourceListByGroupId: F,
984
+ batchCreateResource: O,
985
+ updateResourceGroup: T,
986
+ isShow: Z,
987
+ enableBatchAction: ie,
988
+ state: M,
989
+ openResourceListPanel: B,
990
+ closeResourceListPanel: N
991
+ })
992
+ }), N = L(() => {
993
+ Z.value = !1;
994
+ }, {
995
+ metaData: {
996
+ id: "engine.plugins.resource.ResourceList.closeResourceListPanel"
997
+ },
998
+ ctx: () => ({
999
+ useClipboard: re,
1000
+ iconPopup: oe,
1001
+ useLayout: D,
1002
+ useModal: ne,
1003
+ useNotify: R,
1004
+ PluginSetting: z,
1005
+ SvgButton: P,
1006
+ SearchEmpty: V,
1007
+ fetchResourceListByGroupId: F,
1008
+ batchCreateResource: O,
1009
+ updateResourceGroup: T,
1010
+ isShow: Z,
1011
+ enableBatchAction: ie,
1012
+ state: M,
1013
+ openResourceListPanel: B,
1014
+ closeResourceListPanel: N
1015
+ })
1016
+ }), ht = {
1017
+ components: {
1018
+ PluginSetting: z,
1019
+ SvgButton: P,
1020
+ TinyButton: je,
1021
+ TinyDivider: ut,
1022
+ TinyGrid: lt,
1023
+ TinyGridColumn: ct,
1024
+ TinyInput: Be,
1025
+ TinyCheckbox: st,
1026
+ TinyPopover: at,
1027
+ TinyDialogBox: it,
1028
+ TinyAlert: rt,
1029
+ TinyFileUpload: ot,
1030
+ SearchEmpty: V,
1031
+ TinyIconPopup: oe()
1032
+ },
1033
+ setup() {
1034
+ const {
1035
+ PLUGIN_NAME: s,
1036
+ getPluginByLayout: n
1037
+ } = D(), {
1038
+ toClipboard: v
1039
+ } = re(), {
1040
+ confirm: t
1041
+ } = ne(), m = Fe(() => n(s.Resource)), c = pe("all"), r = pe(""), e = pe(""), o = pe([]), a = pe(!1), i = pe(), l = pe([]), u = {
1042
+ name: [{
1043
+ required: !0,
1044
+ message: "资源名称必填"
1045
+ }, {
1046
+ type: "string",
1047
+ validator: ({
1048
+ row: C
1049
+ }, E) => new Promise((q, Le) => {
1050
+ /^[a-zA-Z0-9_\-=+(){}[\]\u4e00-\u9fa5]+\.(png|jpg|jpeg|svg|PNG|JPG|JPEG|SVG)$/.test(E) ? l.value.find((Ae) => Ae._RID !== C._RID && Ae.name === E) ? Le(new Error("已存在的资源名称")) : q() : Le(new Error("资源名称格式错误"));
1051
+ })
1052
+ }],
1053
+ resourceUrl: {
1054
+ type: "string",
1055
+ validator: ({
1056
+ row: C
1057
+ }, E) => {
1058
+ const {
1059
+ type: q
1060
+ } = C;
1061
+ return new Promise((Le, ke) => {
1062
+ q === "url" && (E ? /^(http|https):\/\/[^\s]+$/.test(E) || ke(new Error("URL以http或https开头")) : ke(new Error("资源URL必填"))), Le();
1063
+ });
1064
+ }
1065
+ }
1066
+ }, b = L((C) => {
1067
+ let E = "";
1068
+ const q = new FileReader();
1069
+ q.readAsDataURL(C.raw), q.onload = () => {
1070
+ E = q.result;
1071
+ }, q.onloadend = () => {
1072
+ l.value.push({
1073
+ type: "upload",
1074
+ name: C.name,
1075
+ resourceData: E
1076
+ });
1077
+ };
1078
+ }, {
1079
+ metaData: {
1080
+ id: "engine.plugins.resource.ResourceList.chooseFileChange"
1081
+ },
1082
+ ctx: () => ({
1083
+ PLUGIN_NAME: s,
1084
+ getPluginByLayout: n,
1085
+ toClipboard: v,
1086
+ confirm: t,
1087
+ align: m,
1088
+ sourceType: c,
1089
+ copyTipContent: r,
1090
+ copySourceId: e,
1091
+ selectedSources: o,
1092
+ enableUrlForm: a,
1093
+ addSourceGridRef: i,
1094
+ addSourceData: l,
1095
+ validRules: u,
1096
+ chooseFileChange: b,
1097
+ sourceTypeChange: g,
1098
+ cancelResourceList: h,
1099
+ getSourceList: y,
1100
+ copySourceLink: I,
1101
+ selectSource: j,
1102
+ deleteSource: X,
1103
+ batchDeleteSource: Y,
1104
+ openAddSourceForm: d,
1105
+ addSourceGridRow: U,
1106
+ saveRowEvent: $,
1107
+ cancelRowEvent: J,
1108
+ removeSource: ee,
1109
+ submitSourceAdd: W,
1110
+ cancelAddSource: te,
1111
+ useClipboard: re,
1112
+ iconPopup: oe,
1113
+ useLayout: D,
1114
+ useModal: ne,
1115
+ useNotify: R,
1116
+ PluginSetting: z,
1117
+ SvgButton: P,
1118
+ SearchEmpty: V,
1119
+ fetchResourceListByGroupId: F,
1120
+ batchCreateResource: O,
1121
+ updateResourceGroup: T,
1122
+ isShow: Z,
1123
+ enableBatchAction: ie,
1124
+ state: M,
1125
+ openResourceListPanel: B,
1126
+ closeResourceListPanel: N
1127
+ })
1128
+ }), g = L((C) => {
1129
+ c.value = C;
1130
+ }, {
1131
+ metaData: {
1132
+ id: "engine.plugins.resource.ResourceList.sourceTypeChange"
1133
+ },
1134
+ ctx: () => ({
1135
+ PLUGIN_NAME: s,
1136
+ getPluginByLayout: n,
1137
+ toClipboard: v,
1138
+ confirm: t,
1139
+ align: m,
1140
+ sourceType: c,
1141
+ copyTipContent: r,
1142
+ copySourceId: e,
1143
+ selectedSources: o,
1144
+ enableUrlForm: a,
1145
+ addSourceGridRef: i,
1146
+ addSourceData: l,
1147
+ validRules: u,
1148
+ chooseFileChange: b,
1149
+ sourceTypeChange: g,
1150
+ cancelResourceList: h,
1151
+ getSourceList: y,
1152
+ copySourceLink: I,
1153
+ selectSource: j,
1154
+ deleteSource: X,
1155
+ batchDeleteSource: Y,
1156
+ openAddSourceForm: d,
1157
+ addSourceGridRow: U,
1158
+ saveRowEvent: $,
1159
+ cancelRowEvent: J,
1160
+ removeSource: ee,
1161
+ submitSourceAdd: W,
1162
+ cancelAddSource: te,
1163
+ useClipboard: re,
1164
+ iconPopup: oe,
1165
+ useLayout: D,
1166
+ useModal: ne,
1167
+ useNotify: R,
1168
+ PluginSetting: z,
1169
+ SvgButton: P,
1170
+ SearchEmpty: V,
1171
+ fetchResourceListByGroupId: F,
1172
+ batchCreateResource: O,
1173
+ updateResourceGroup: T,
1174
+ isShow: Z,
1175
+ enableBatchAction: ie,
1176
+ state: M,
1177
+ openResourceListPanel: B,
1178
+ closeResourceListPanel: N
1179
+ })
1180
+ }), h = L(() => {
1181
+ N();
1182
+ }, {
1183
+ metaData: {
1184
+ id: "engine.plugins.resource.ResourceList.cancelResourceList"
1185
+ },
1186
+ ctx: () => ({
1187
+ PLUGIN_NAME: s,
1188
+ getPluginByLayout: n,
1189
+ toClipboard: v,
1190
+ confirm: t,
1191
+ align: m,
1192
+ sourceType: c,
1193
+ copyTipContent: r,
1194
+ copySourceId: e,
1195
+ selectedSources: o,
1196
+ enableUrlForm: a,
1197
+ addSourceGridRef: i,
1198
+ addSourceData: l,
1199
+ validRules: u,
1200
+ chooseFileChange: b,
1201
+ sourceTypeChange: g,
1202
+ cancelResourceList: h,
1203
+ getSourceList: y,
1204
+ copySourceLink: I,
1205
+ selectSource: j,
1206
+ deleteSource: X,
1207
+ batchDeleteSource: Y,
1208
+ openAddSourceForm: d,
1209
+ addSourceGridRow: U,
1210
+ saveRowEvent: $,
1211
+ cancelRowEvent: J,
1212
+ removeSource: ee,
1213
+ submitSourceAdd: W,
1214
+ cancelAddSource: te,
1215
+ useClipboard: re,
1216
+ iconPopup: oe,
1217
+ useLayout: D,
1218
+ useModal: ne,
1219
+ useNotify: R,
1220
+ PluginSetting: z,
1221
+ SvgButton: P,
1222
+ SearchEmpty: V,
1223
+ fetchResourceListByGroupId: F,
1224
+ batchCreateResource: O,
1225
+ updateResourceGroup: T,
1226
+ isShow: Z,
1227
+ enableBatchAction: ie,
1228
+ state: M,
1229
+ openResourceListPanel: B,
1230
+ closeResourceListPanel: N
1231
+ })
1232
+ }), y = L(() => {
1233
+ F(M.group.id).then((C) => {
1234
+ Array.isArray(C) && (M.sourceList = C);
1235
+ }).catch((C) => {
1236
+ R({
1237
+ type: "error",
1238
+ message: C
1239
+ });
1240
+ });
1241
+ }, {
1242
+ metaData: {
1243
+ id: "engine.plugins.resource.ResourceList.getSourceList"
1244
+ },
1245
+ ctx: () => ({
1246
+ PLUGIN_NAME: s,
1247
+ getPluginByLayout: n,
1248
+ toClipboard: v,
1249
+ confirm: t,
1250
+ align: m,
1251
+ sourceType: c,
1252
+ copyTipContent: r,
1253
+ copySourceId: e,
1254
+ selectedSources: o,
1255
+ enableUrlForm: a,
1256
+ addSourceGridRef: i,
1257
+ addSourceData: l,
1258
+ validRules: u,
1259
+ chooseFileChange: b,
1260
+ sourceTypeChange: g,
1261
+ cancelResourceList: h,
1262
+ getSourceList: y,
1263
+ copySourceLink: I,
1264
+ selectSource: j,
1265
+ deleteSource: X,
1266
+ batchDeleteSource: Y,
1267
+ openAddSourceForm: d,
1268
+ addSourceGridRow: U,
1269
+ saveRowEvent: $,
1270
+ cancelRowEvent: J,
1271
+ removeSource: ee,
1272
+ submitSourceAdd: W,
1273
+ cancelAddSource: te,
1274
+ useClipboard: re,
1275
+ iconPopup: oe,
1276
+ useLayout: D,
1277
+ useModal: ne,
1278
+ useNotify: R,
1279
+ PluginSetting: z,
1280
+ SvgButton: P,
1281
+ SearchEmpty: V,
1282
+ fetchResourceListByGroupId: F,
1283
+ batchCreateResource: O,
1284
+ updateResourceGroup: T,
1285
+ isShow: Z,
1286
+ enableBatchAction: ie,
1287
+ state: M,
1288
+ openResourceListPanel: B,
1289
+ closeResourceListPanel: N
1290
+ })
1291
+ }), I = L(async (C) => {
1292
+ e.value = C.id;
1293
+ try {
1294
+ await v(C.resourceUrl), r.value = "复制URL成功";
1295
+ } catch (E) {
1296
+ r.value = "复制失败", console.error("Clipboard operation failed:", E);
1297
+ } finally {
1298
+ e.value = "";
1299
+ }
1300
+ }, {
1301
+ metaData: {
1302
+ id: "engine.plugins.resource.ResourceList.copySourceLink"
1303
+ },
1304
+ ctx: () => ({
1305
+ PLUGIN_NAME: s,
1306
+ getPluginByLayout: n,
1307
+ toClipboard: v,
1308
+ confirm: t,
1309
+ align: m,
1310
+ sourceType: c,
1311
+ copyTipContent: r,
1312
+ copySourceId: e,
1313
+ selectedSources: o,
1314
+ enableUrlForm: a,
1315
+ addSourceGridRef: i,
1316
+ addSourceData: l,
1317
+ validRules: u,
1318
+ chooseFileChange: b,
1319
+ sourceTypeChange: g,
1320
+ cancelResourceList: h,
1321
+ getSourceList: y,
1322
+ copySourceLink: I,
1323
+ selectSource: j,
1324
+ deleteSource: X,
1325
+ batchDeleteSource: Y,
1326
+ openAddSourceForm: d,
1327
+ addSourceGridRow: U,
1328
+ saveRowEvent: $,
1329
+ cancelRowEvent: J,
1330
+ removeSource: ee,
1331
+ submitSourceAdd: W,
1332
+ cancelAddSource: te,
1333
+ useClipboard: re,
1334
+ iconPopup: oe,
1335
+ useLayout: D,
1336
+ useModal: ne,
1337
+ useNotify: R,
1338
+ PluginSetting: z,
1339
+ SvgButton: P,
1340
+ SearchEmpty: V,
1341
+ fetchResourceListByGroupId: F,
1342
+ batchCreateResource: O,
1343
+ updateResourceGroup: T,
1344
+ isShow: Z,
1345
+ enableBatchAction: ie,
1346
+ state: M,
1347
+ openResourceListPanel: B,
1348
+ closeResourceListPanel: N
1349
+ })
1350
+ }), j = L((C, E) => {
1351
+ C ? o.value.push(E) : o.value = o.value.filter((q) => q.id !== E.id);
1352
+ }, {
1353
+ metaData: {
1354
+ id: "engine.plugins.resource.ResourceList.selectSource"
1355
+ },
1356
+ ctx: () => ({
1357
+ PLUGIN_NAME: s,
1358
+ getPluginByLayout: n,
1359
+ toClipboard: v,
1360
+ confirm: t,
1361
+ align: m,
1362
+ sourceType: c,
1363
+ copyTipContent: r,
1364
+ copySourceId: e,
1365
+ selectedSources: o,
1366
+ enableUrlForm: a,
1367
+ addSourceGridRef: i,
1368
+ addSourceData: l,
1369
+ validRules: u,
1370
+ chooseFileChange: b,
1371
+ sourceTypeChange: g,
1372
+ cancelResourceList: h,
1373
+ getSourceList: y,
1374
+ copySourceLink: I,
1375
+ selectSource: j,
1376
+ deleteSource: X,
1377
+ batchDeleteSource: Y,
1378
+ openAddSourceForm: d,
1379
+ addSourceGridRow: U,
1380
+ saveRowEvent: $,
1381
+ cancelRowEvent: J,
1382
+ removeSource: ee,
1383
+ submitSourceAdd: W,
1384
+ cancelAddSource: te,
1385
+ useClipboard: re,
1386
+ iconPopup: oe,
1387
+ useLayout: D,
1388
+ useModal: ne,
1389
+ useNotify: R,
1390
+ PluginSetting: z,
1391
+ SvgButton: P,
1392
+ SearchEmpty: V,
1393
+ fetchResourceListByGroupId: F,
1394
+ batchCreateResource: O,
1395
+ updateResourceGroup: T,
1396
+ isShow: Z,
1397
+ enableBatchAction: ie,
1398
+ state: M,
1399
+ openResourceListPanel: B,
1400
+ closeResourceListPanel: N
1401
+ })
1402
+ }), X = L((C) => {
1403
+ t({
1404
+ title: "删除资源",
1405
+ message: "即将删除资源,删除后不可恢复。",
1406
+ exec: () => {
1407
+ T(M.group.id, {
1408
+ name: M.group.name,
1409
+ description: M.group.description,
1410
+ resources: M.sourceList.map((E) => E.id === C.id ? null : {
1411
+ id: E.id
1412
+ }).filter((E) => E !== null)
1413
+ }).then(() => {
1414
+ y(), o.value = [];
1415
+ }).catch((E) => {
1416
+ R({
1417
+ type: "error",
1418
+ message: E
1419
+ });
1420
+ });
1421
+ }
1422
+ });
1423
+ }, {
1424
+ metaData: {
1425
+ id: "engine.plugins.resource.ResourceList.deleteSource"
1426
+ },
1427
+ ctx: () => ({
1428
+ PLUGIN_NAME: s,
1429
+ getPluginByLayout: n,
1430
+ toClipboard: v,
1431
+ confirm: t,
1432
+ align: m,
1433
+ sourceType: c,
1434
+ copyTipContent: r,
1435
+ copySourceId: e,
1436
+ selectedSources: o,
1437
+ enableUrlForm: a,
1438
+ addSourceGridRef: i,
1439
+ addSourceData: l,
1440
+ validRules: u,
1441
+ chooseFileChange: b,
1442
+ sourceTypeChange: g,
1443
+ cancelResourceList: h,
1444
+ getSourceList: y,
1445
+ copySourceLink: I,
1446
+ selectSource: j,
1447
+ deleteSource: X,
1448
+ batchDeleteSource: Y,
1449
+ openAddSourceForm: d,
1450
+ addSourceGridRow: U,
1451
+ saveRowEvent: $,
1452
+ cancelRowEvent: J,
1453
+ removeSource: ee,
1454
+ submitSourceAdd: W,
1455
+ cancelAddSource: te,
1456
+ useClipboard: re,
1457
+ iconPopup: oe,
1458
+ useLayout: D,
1459
+ useModal: ne,
1460
+ useNotify: R,
1461
+ PluginSetting: z,
1462
+ SvgButton: P,
1463
+ SearchEmpty: V,
1464
+ fetchResourceListByGroupId: F,
1465
+ batchCreateResource: O,
1466
+ updateResourceGroup: T,
1467
+ isShow: Z,
1468
+ enableBatchAction: ie,
1469
+ state: M,
1470
+ openResourceListPanel: B,
1471
+ closeResourceListPanel: N
1472
+ })
1473
+ }), Y = L(() => {
1474
+ if (!o.value.length) {
1475
+ R({
1476
+ type: "info",
1477
+ message: "请先选择一个资源"
1478
+ });
1479
+ return;
1480
+ }
1481
+ t({
1482
+ title: "删除资源",
1483
+ message: `即将删除${o.value.length}个资源,删除后不可恢复。`,
1484
+ exec: () => {
1485
+ T(M.group.id, {
1486
+ name: M.group.name,
1487
+ description: M.group.description,
1488
+ resources: M.sourceList.map((C) => o.value.find((E) => E.id === C.id) ? null : {
1489
+ id: C.id
1490
+ }).filter((C) => C !== null)
1491
+ }).then(() => {
1492
+ y(), o.value = [];
1493
+ }).catch((C) => {
1494
+ R({
1495
+ type: "error",
1496
+ message: C
1497
+ });
1498
+ });
1499
+ }
1500
+ });
1501
+ }, {
1502
+ metaData: {
1503
+ id: "engine.plugins.resource.ResourceList.batchDeleteSource"
1504
+ },
1505
+ ctx: () => ({
1506
+ PLUGIN_NAME: s,
1507
+ getPluginByLayout: n,
1508
+ toClipboard: v,
1509
+ confirm: t,
1510
+ align: m,
1511
+ sourceType: c,
1512
+ copyTipContent: r,
1513
+ copySourceId: e,
1514
+ selectedSources: o,
1515
+ enableUrlForm: a,
1516
+ addSourceGridRef: i,
1517
+ addSourceData: l,
1518
+ validRules: u,
1519
+ chooseFileChange: b,
1520
+ sourceTypeChange: g,
1521
+ cancelResourceList: h,
1522
+ getSourceList: y,
1523
+ copySourceLink: I,
1524
+ selectSource: j,
1525
+ deleteSource: X,
1526
+ batchDeleteSource: Y,
1527
+ openAddSourceForm: d,
1528
+ addSourceGridRow: U,
1529
+ saveRowEvent: $,
1530
+ cancelRowEvent: J,
1531
+ removeSource: ee,
1532
+ submitSourceAdd: W,
1533
+ cancelAddSource: te,
1534
+ useClipboard: re,
1535
+ iconPopup: oe,
1536
+ useLayout: D,
1537
+ useModal: ne,
1538
+ useNotify: R,
1539
+ PluginSetting: z,
1540
+ SvgButton: P,
1541
+ SearchEmpty: V,
1542
+ fetchResourceListByGroupId: F,
1543
+ batchCreateResource: O,
1544
+ updateResourceGroup: T,
1545
+ isShow: Z,
1546
+ enableBatchAction: ie,
1547
+ state: M,
1548
+ openResourceListPanel: B,
1549
+ closeResourceListPanel: N
1550
+ })
1551
+ }), d = L(() => {
1552
+ l.value = [], a.value = !0;
1553
+ }, {
1554
+ metaData: {
1555
+ id: "engine.plugins.resource.ResourceList.openAddSourceForm"
1556
+ },
1557
+ ctx: () => ({
1558
+ PLUGIN_NAME: s,
1559
+ getPluginByLayout: n,
1560
+ toClipboard: v,
1561
+ confirm: t,
1562
+ align: m,
1563
+ sourceType: c,
1564
+ copyTipContent: r,
1565
+ copySourceId: e,
1566
+ selectedSources: o,
1567
+ enableUrlForm: a,
1568
+ addSourceGridRef: i,
1569
+ addSourceData: l,
1570
+ validRules: u,
1571
+ chooseFileChange: b,
1572
+ sourceTypeChange: g,
1573
+ cancelResourceList: h,
1574
+ getSourceList: y,
1575
+ copySourceLink: I,
1576
+ selectSource: j,
1577
+ deleteSource: X,
1578
+ batchDeleteSource: Y,
1579
+ openAddSourceForm: d,
1580
+ addSourceGridRow: U,
1581
+ saveRowEvent: $,
1582
+ cancelRowEvent: J,
1583
+ removeSource: ee,
1584
+ submitSourceAdd: W,
1585
+ cancelAddSource: te,
1586
+ useClipboard: re,
1587
+ iconPopup: oe,
1588
+ useLayout: D,
1589
+ useModal: ne,
1590
+ useNotify: R,
1591
+ PluginSetting: z,
1592
+ SvgButton: P,
1593
+ SearchEmpty: V,
1594
+ fetchResourceListByGroupId: F,
1595
+ batchCreateResource: O,
1596
+ updateResourceGroup: T,
1597
+ isShow: Z,
1598
+ enableBatchAction: ie,
1599
+ state: M,
1600
+ openResourceListPanel: B,
1601
+ closeResourceListPanel: N
1602
+ })
1603
+ }), U = L(() => {
1604
+ const C = {
1605
+ type: "url",
1606
+ name: "",
1607
+ resourceUrl: "",
1608
+ description: "",
1609
+ isAdd: !0
1610
+ };
1611
+ l.value.push(C), i.value.setActiveRow(C);
1612
+ }, {
1613
+ metaData: {
1614
+ id: "engine.plugins.resource.ResourceList.addSourceGridRow"
1615
+ },
1616
+ ctx: () => ({
1617
+ PLUGIN_NAME: s,
1618
+ getPluginByLayout: n,
1619
+ toClipboard: v,
1620
+ confirm: t,
1621
+ align: m,
1622
+ sourceType: c,
1623
+ copyTipContent: r,
1624
+ copySourceId: e,
1625
+ selectedSources: o,
1626
+ enableUrlForm: a,
1627
+ addSourceGridRef: i,
1628
+ addSourceData: l,
1629
+ validRules: u,
1630
+ chooseFileChange: b,
1631
+ sourceTypeChange: g,
1632
+ cancelResourceList: h,
1633
+ getSourceList: y,
1634
+ copySourceLink: I,
1635
+ selectSource: j,
1636
+ deleteSource: X,
1637
+ batchDeleteSource: Y,
1638
+ openAddSourceForm: d,
1639
+ addSourceGridRow: U,
1640
+ saveRowEvent: $,
1641
+ cancelRowEvent: J,
1642
+ removeSource: ee,
1643
+ submitSourceAdd: W,
1644
+ cancelAddSource: te,
1645
+ useClipboard: re,
1646
+ iconPopup: oe,
1647
+ useLayout: D,
1648
+ useModal: ne,
1649
+ useNotify: R,
1650
+ PluginSetting: z,
1651
+ SvgButton: P,
1652
+ SearchEmpty: V,
1653
+ fetchResourceListByGroupId: F,
1654
+ batchCreateResource: O,
1655
+ updateResourceGroup: T,
1656
+ isShow: Z,
1657
+ enableBatchAction: ie,
1658
+ state: M,
1659
+ openResourceListPanel: B,
1660
+ closeResourceListPanel: N
1661
+ })
1662
+ }), $ = L((C) => {
1663
+ i.value.validate((E) => {
1664
+ E && i.value.clearActived().then(() => {
1665
+ C == null || delete C.isAdd, i.value.refreshData();
1666
+ });
1667
+ });
1668
+ }, {
1669
+ metaData: {
1670
+ id: "engine.plugins.resource.ResourceList.saveRowEvent"
1671
+ },
1672
+ ctx: () => ({
1673
+ PLUGIN_NAME: s,
1674
+ getPluginByLayout: n,
1675
+ toClipboard: v,
1676
+ confirm: t,
1677
+ align: m,
1678
+ sourceType: c,
1679
+ copyTipContent: r,
1680
+ copySourceId: e,
1681
+ selectedSources: o,
1682
+ enableUrlForm: a,
1683
+ addSourceGridRef: i,
1684
+ addSourceData: l,
1685
+ validRules: u,
1686
+ chooseFileChange: b,
1687
+ sourceTypeChange: g,
1688
+ cancelResourceList: h,
1689
+ getSourceList: y,
1690
+ copySourceLink: I,
1691
+ selectSource: j,
1692
+ deleteSource: X,
1693
+ batchDeleteSource: Y,
1694
+ openAddSourceForm: d,
1695
+ addSourceGridRow: U,
1696
+ saveRowEvent: $,
1697
+ cancelRowEvent: J,
1698
+ removeSource: ee,
1699
+ submitSourceAdd: W,
1700
+ cancelAddSource: te,
1701
+ useClipboard: re,
1702
+ iconPopup: oe,
1703
+ useLayout: D,
1704
+ useModal: ne,
1705
+ useNotify: R,
1706
+ PluginSetting: z,
1707
+ SvgButton: P,
1708
+ SearchEmpty: V,
1709
+ fetchResourceListByGroupId: F,
1710
+ batchCreateResource: O,
1711
+ updateResourceGroup: T,
1712
+ isShow: Z,
1713
+ enableBatchAction: ie,
1714
+ state: M,
1715
+ openResourceListPanel: B,
1716
+ closeResourceListPanel: N
1717
+ })
1718
+ }), J = L((C) => {
1719
+ var E;
1720
+ (E = C.row) != null && E.isAdd ? l.value.splice(C.rowIndex, 1) : i.value.revertData();
1721
+ }, {
1722
+ metaData: {
1723
+ id: "engine.plugins.resource.ResourceList.cancelRowEvent"
1724
+ },
1725
+ ctx: () => ({
1726
+ PLUGIN_NAME: s,
1727
+ getPluginByLayout: n,
1728
+ toClipboard: v,
1729
+ confirm: t,
1730
+ align: m,
1731
+ sourceType: c,
1732
+ copyTipContent: r,
1733
+ copySourceId: e,
1734
+ selectedSources: o,
1735
+ enableUrlForm: a,
1736
+ addSourceGridRef: i,
1737
+ addSourceData: l,
1738
+ validRules: u,
1739
+ chooseFileChange: b,
1740
+ sourceTypeChange: g,
1741
+ cancelResourceList: h,
1742
+ getSourceList: y,
1743
+ copySourceLink: I,
1744
+ selectSource: j,
1745
+ deleteSource: X,
1746
+ batchDeleteSource: Y,
1747
+ openAddSourceForm: d,
1748
+ addSourceGridRow: U,
1749
+ saveRowEvent: $,
1750
+ cancelRowEvent: J,
1751
+ removeSource: ee,
1752
+ submitSourceAdd: W,
1753
+ cancelAddSource: te,
1754
+ useClipboard: re,
1755
+ iconPopup: oe,
1756
+ useLayout: D,
1757
+ useModal: ne,
1758
+ useNotify: R,
1759
+ PluginSetting: z,
1760
+ SvgButton: P,
1761
+ SearchEmpty: V,
1762
+ fetchResourceListByGroupId: F,
1763
+ batchCreateResource: O,
1764
+ updateResourceGroup: T,
1765
+ isShow: Z,
1766
+ enableBatchAction: ie,
1767
+ state: M,
1768
+ openResourceListPanel: B,
1769
+ closeResourceListPanel: N
1770
+ })
1771
+ }), ee = L((C) => {
1772
+ l.value.splice(C.rowIndex, 1);
1773
+ }, {
1774
+ metaData: {
1775
+ id: "engine.plugins.resource.ResourceList.removeSource"
1776
+ },
1777
+ ctx: () => ({
1778
+ PLUGIN_NAME: s,
1779
+ getPluginByLayout: n,
1780
+ toClipboard: v,
1781
+ confirm: t,
1782
+ align: m,
1783
+ sourceType: c,
1784
+ copyTipContent: r,
1785
+ copySourceId: e,
1786
+ selectedSources: o,
1787
+ enableUrlForm: a,
1788
+ addSourceGridRef: i,
1789
+ addSourceData: l,
1790
+ validRules: u,
1791
+ chooseFileChange: b,
1792
+ sourceTypeChange: g,
1793
+ cancelResourceList: h,
1794
+ getSourceList: y,
1795
+ copySourceLink: I,
1796
+ selectSource: j,
1797
+ deleteSource: X,
1798
+ batchDeleteSource: Y,
1799
+ openAddSourceForm: d,
1800
+ addSourceGridRow: U,
1801
+ saveRowEvent: $,
1802
+ cancelRowEvent: J,
1803
+ removeSource: ee,
1804
+ submitSourceAdd: W,
1805
+ cancelAddSource: te,
1806
+ useClipboard: re,
1807
+ iconPopup: oe,
1808
+ useLayout: D,
1809
+ useModal: ne,
1810
+ useNotify: R,
1811
+ PluginSetting: z,
1812
+ SvgButton: P,
1813
+ SearchEmpty: V,
1814
+ fetchResourceListByGroupId: F,
1815
+ batchCreateResource: O,
1816
+ updateResourceGroup: T,
1817
+ isShow: Z,
1818
+ enableBatchAction: ie,
1819
+ state: M,
1820
+ openResourceListPanel: B,
1821
+ closeResourceListPanel: N
1822
+ })
1823
+ }), W = L(() => {
1824
+ i.value.fullValidate((C) => {
1825
+ if (!C)
1826
+ return;
1827
+ const E = l.value.map((q) => ({
1828
+ name: q.name,
1829
+ resourceGroupId: M.group.id,
1830
+ resourceData: (q == null ? void 0 : q.resourceData) || "",
1831
+ resourceUrl: (q == null ? void 0 : q.resourceUrl) || "",
1832
+ category: "image"
1833
+ }));
1834
+ O(E).then(() => {
1835
+ y(), a.value = !1, l.value = [];
1836
+ }).catch((q) => {
1837
+ R({
1838
+ type: "error",
1839
+ message: q
1840
+ });
1841
+ });
1842
+ });
1843
+ }, {
1844
+ metaData: {
1845
+ id: "engine.plugins.resource.ResourceList.submitSourceAdd"
1846
+ },
1847
+ ctx: () => ({
1848
+ PLUGIN_NAME: s,
1849
+ getPluginByLayout: n,
1850
+ toClipboard: v,
1851
+ confirm: t,
1852
+ align: m,
1853
+ sourceType: c,
1854
+ copyTipContent: r,
1855
+ copySourceId: e,
1856
+ selectedSources: o,
1857
+ enableUrlForm: a,
1858
+ addSourceGridRef: i,
1859
+ addSourceData: l,
1860
+ validRules: u,
1861
+ chooseFileChange: b,
1862
+ sourceTypeChange: g,
1863
+ cancelResourceList: h,
1864
+ getSourceList: y,
1865
+ copySourceLink: I,
1866
+ selectSource: j,
1867
+ deleteSource: X,
1868
+ batchDeleteSource: Y,
1869
+ openAddSourceForm: d,
1870
+ addSourceGridRow: U,
1871
+ saveRowEvent: $,
1872
+ cancelRowEvent: J,
1873
+ removeSource: ee,
1874
+ submitSourceAdd: W,
1875
+ cancelAddSource: te,
1876
+ useClipboard: re,
1877
+ iconPopup: oe,
1878
+ useLayout: D,
1879
+ useModal: ne,
1880
+ useNotify: R,
1881
+ PluginSetting: z,
1882
+ SvgButton: P,
1883
+ SearchEmpty: V,
1884
+ fetchResourceListByGroupId: F,
1885
+ batchCreateResource: O,
1886
+ updateResourceGroup: T,
1887
+ isShow: Z,
1888
+ enableBatchAction: ie,
1889
+ state: M,
1890
+ openResourceListPanel: B,
1891
+ closeResourceListPanel: N
1892
+ })
1893
+ }), te = L(() => {
1894
+ a.value = !1;
1895
+ }, {
1896
+ metaData: {
1897
+ id: "engine.plugins.resource.ResourceList.cancelAddSource"
1898
+ },
1899
+ ctx: () => ({
1900
+ PLUGIN_NAME: s,
1901
+ getPluginByLayout: n,
1902
+ toClipboard: v,
1903
+ confirm: t,
1904
+ align: m,
1905
+ sourceType: c,
1906
+ copyTipContent: r,
1907
+ copySourceId: e,
1908
+ selectedSources: o,
1909
+ enableUrlForm: a,
1910
+ addSourceGridRef: i,
1911
+ addSourceData: l,
1912
+ validRules: u,
1913
+ chooseFileChange: b,
1914
+ sourceTypeChange: g,
1915
+ cancelResourceList: h,
1916
+ getSourceList: y,
1917
+ copySourceLink: I,
1918
+ selectSource: j,
1919
+ deleteSource: X,
1920
+ batchDeleteSource: Y,
1921
+ openAddSourceForm: d,
1922
+ addSourceGridRow: U,
1923
+ saveRowEvent: $,
1924
+ cancelRowEvent: J,
1925
+ removeSource: ee,
1926
+ submitSourceAdd: W,
1927
+ cancelAddSource: te,
1928
+ useClipboard: re,
1929
+ iconPopup: oe,
1930
+ useLayout: D,
1931
+ useModal: ne,
1932
+ useNotify: R,
1933
+ PluginSetting: z,
1934
+ SvgButton: P,
1935
+ SearchEmpty: V,
1936
+ fetchResourceListByGroupId: F,
1937
+ batchCreateResource: O,
1938
+ updateResourceGroup: T,
1939
+ isShow: Z,
1940
+ enableBatchAction: ie,
1941
+ state: M,
1942
+ openResourceListPanel: B,
1943
+ closeResourceListPanel: N
1944
+ })
1945
+ });
1946
+ return Xe(() => M.group.id, () => {
1947
+ y();
1948
+ }), {
1949
+ PLUGIN_NAME: s,
1950
+ align: m,
1951
+ isShow: Z,
1952
+ state: M,
1953
+ enableBatchAction: ie,
1954
+ sourceType: c,
1955
+ copyTipContent: r,
1956
+ copySourceId: e,
1957
+ enableUrlForm: a,
1958
+ addSourceGridRef: i,
1959
+ addSourceData: l,
1960
+ validRules: u,
1961
+ chooseFileChange: b,
1962
+ sourceTypeChange: g,
1963
+ cancelResourceList: h,
1964
+ copySourceLink: I,
1965
+ selectSource: j,
1966
+ deleteSource: X,
1967
+ batchDeleteSource: Y,
1968
+ openAddSourceForm: d,
1969
+ addSourceGridRow: U,
1970
+ saveRowEvent: $,
1971
+ cancelRowEvent: J,
1972
+ removeSource: ee,
1973
+ submitSourceAdd: W,
1974
+ cancelAddSource: te
1975
+ };
1976
+ }
1977
+ }, _t = { class: "resource-list-content" }, bt = { class: "action-wrap" }, Ct = { class: "batch-action" }, St = { class: "source-list-wrap" }, xt = { class: "source-image-wrap" }, wt = ["src"], Rt = { class: "source-action" }, Lt = { class: "actions" }, kt = ["onClick"], Et = ["onClick"], At = { class: "action-popover" }, Tt = { class: "source-name-wrap" }, Dt = ["title"], Pt = { class: "resource-action" }, It = { key: 0 }, Ut = { key: 0 };
1978
+ function Mt(s, n, v, t, m, c) {
1979
+ const r = G("svg-button"), e = G("svg-icon"), o = G("tiny-button"), a = G("tiny-divider"), i = G("tiny-checkbox"), l = G("tiny-popover"), u = G("tiny-icon-popup"), b = G("search-empty"), g = G("plugin-setting"), h = G("tiny-alert"), y = G("tiny-file-upload"), I = G("tiny-input"), j = G("tiny-grid-column"), X = G("tiny-grid"), Y = G("tiny-dialog-box");
1980
+ return ae(), be(Ie, null, [
1981
+ t.isShow ? (ae(), Ce(g, {
1982
+ key: 0,
1983
+ "fixed-name": t.PLUGIN_NAME.Resource,
1984
+ align: t.align,
1985
+ title: t.state.title
1986
+ }, {
1987
+ header: k(() => [
1988
+ _(r, {
1989
+ name: "close",
1990
+ onClick: t.cancelResourceList
1991
+ }, null, 8, ["onClick"])
1992
+ ]),
1993
+ content: k(() => [
1994
+ H("div", _t, [
1995
+ _(o, {
1996
+ round: "",
1997
+ onClick: t.openAddSourceForm
1998
+ }, {
1999
+ default: k(() => [
2000
+ _(e, { name: "add" }),
2001
+ n[4] || (n[4] = ye("添加资源", -1))
2002
+ ]),
2003
+ _: 1
2004
+ }, 8, ["onClick"]),
2005
+ n[7] || (n[7] = H("span", { class: "resource-description" }, "支持上传png、jpg、svg文件,支持批量上传", -1)),
2006
+ H("div", bt, [
2007
+ H("div", null, [
2008
+ H("span", {
2009
+ class: Ge([{ "resource-type-active": t.sourceType === "all" }]),
2010
+ onClick: n[0] || (n[0] = (d) => t.sourceTypeChange("all"))
2011
+ }, "全部", 2),
2012
+ _(a, { direction: "vertical" }),
2013
+ H("span", {
2014
+ class: Ge([{ "resource-type-active": t.sourceType === "image" }]),
2015
+ onClick: n[1] || (n[1] = (d) => t.sourceTypeChange("image"))
2016
+ }, "图片", 2)
2017
+ ]),
2018
+ H("div", Ct, [
2019
+ t.enableBatchAction ? (ae(), Ce(o, {
2020
+ key: 0,
2021
+ class: "action-item",
2022
+ onClick: t.batchDeleteSource
2023
+ }, {
2024
+ default: k(() => [
2025
+ _(e, { name: "delete" }),
2026
+ n[5] || (n[5] = H("span", null, "删除", -1))
2027
+ ]),
2028
+ _: 1
2029
+ }, 8, ["onClick"])) : Pe("", !0),
2030
+ _(o, {
2031
+ onClick: n[2] || (n[2] = (d) => t.enableBatchAction = !t.enableBatchAction),
2032
+ class: "action-item"
2033
+ }, {
2034
+ default: k(() => [...n[6] || (n[6] = [
2035
+ ye(" 批量操作 ", -1)
2036
+ ])]),
2037
+ _: 1
2038
+ })
2039
+ ])
2040
+ ]),
2041
+ H("div", St, [
2042
+ (ae(!0), be(Ie, null, Oe(t.state.sourceList, (d) => (ae(), be("div", {
2043
+ key: d.id,
2044
+ class: "source-list-item"
2045
+ }, [
2046
+ H("div", xt, [
2047
+ H("img", {
2048
+ src: d.thumbnailUrl ?? d.resourceUrl
2049
+ }, null, 8, wt),
2050
+ t.enableBatchAction ? (ae(), Ce(i, {
2051
+ key: 0,
2052
+ name: "tiny-checkbox",
2053
+ onChange: (U) => t.selectSource(U, d)
2054
+ }, null, 8, ["onChange"])) : Pe("", !0),
2055
+ H("div", Rt, [
2056
+ _(l, {
2057
+ placement: "bottom",
2058
+ "visible-arrow": !1,
2059
+ offset: -18,
2060
+ trigger: "hover"
2061
+ }, {
2062
+ reference: k(() => [
2063
+ H("div", At, [
2064
+ _(u)
2065
+ ])
2066
+ ]),
2067
+ default: k(() => [
2068
+ H("div", Lt, [
2069
+ _(l, {
2070
+ placement: "bottom",
2071
+ "visible-arrow": !1,
2072
+ trigger: "manual",
2073
+ content: t.copyTipContent,
2074
+ modelValue: (d == null ? void 0 : d.id) === t.copySourceId
2075
+ }, {
2076
+ reference: k(() => [
2077
+ H("span", {
2078
+ onClick: (U) => t.copySourceLink(d)
2079
+ }, "复制", 8, kt)
2080
+ ]),
2081
+ _: 2
2082
+ }, 1032, ["content", "modelValue"]),
2083
+ H("span", {
2084
+ onClick: (U) => t.deleteSource(d)
2085
+ }, "删除", 8, Et)
2086
+ ])
2087
+ ]),
2088
+ _: 2
2089
+ }, 1024)
2090
+ ]),
2091
+ H("div", Tt, [
2092
+ H("span", {
2093
+ title: d.name
2094
+ }, Ne(d.name), 9, Dt)
2095
+ ])
2096
+ ])
2097
+ ]))), 128))
2098
+ ])
2099
+ ]),
2100
+ _(b, {
2101
+ isShow: !t.state.sourceList.length
2102
+ }, null, 8, ["isShow"])
2103
+ ]),
2104
+ _: 1
2105
+ }, 8, ["fixed-name", "align", "title"])) : Pe("", !0),
2106
+ (ae(), Ce(Ze, { to: "body" }, [
2107
+ _(Y, {
2108
+ visible: t.enableUrlForm,
2109
+ "onUpdate:visible": n[3] || (n[3] = (d) => t.enableUrlForm = d),
2110
+ title: "添加资源",
2111
+ width: "700px"
2112
+ }, {
2113
+ footer: k(() => [
2114
+ _(o, {
2115
+ type: "primary",
2116
+ size: "mini",
2117
+ class: "text-button",
2118
+ onClick: t.submitSourceAdd,
2119
+ round: ""
2120
+ }, {
2121
+ default: k(() => [...n[13] || (n[13] = [
2122
+ ye("确 定", -1)
2123
+ ])]),
2124
+ _: 1
2125
+ }, 8, ["onClick"]),
2126
+ _(o, {
2127
+ size: "mini",
2128
+ onClick: t.cancelAddSource,
2129
+ round: ""
2130
+ }, {
2131
+ default: k(() => [...n[14] || (n[14] = [
2132
+ ye("取 消", -1)
2133
+ ])]),
2134
+ _: 1
2135
+ }, 8, ["onClick"])
2136
+ ]),
2137
+ default: k(() => [
2138
+ _(h, {
2139
+ closable: !1,
2140
+ description: "资源名称只能包含中文、英文、数字、下划线、中划线、=、+、()、{}、[]等字符,且以文件后缀名为结尾"
2141
+ }),
2142
+ H("div", Pt, [
2143
+ _(y, {
2144
+ accept: ".png, .jpg, .jpeg, .svg",
2145
+ action: "#",
2146
+ multiple: !0,
2147
+ "auto-upload": !1,
2148
+ "show-file-list": !1,
2149
+ onChange: t.chooseFileChange
2150
+ }, {
2151
+ trigger: k(() => [
2152
+ _(o, { round: "" }, {
2153
+ default: k(() => [
2154
+ _(e, { name: "add" }),
2155
+ n[8] || (n[8] = ye("上传资源", -1))
2156
+ ]),
2157
+ _: 1
2158
+ })
2159
+ ]),
2160
+ _: 1
2161
+ }, 8, ["onChange"]),
2162
+ _(o, {
2163
+ round: "",
2164
+ onClick: t.addSourceGridRow
2165
+ }, {
2166
+ default: k(() => [
2167
+ _(e, { name: "edit" }),
2168
+ n[9] || (n[9] = ye("通过URL添加", -1))
2169
+ ]),
2170
+ _: 1
2171
+ }, 8, ["onClick"])
2172
+ ]),
2173
+ _(X, {
2174
+ ref: "addSourceGridRef",
2175
+ data: t.addSourceData,
2176
+ "show-overflow": "tooltip",
2177
+ "edit-config": { trigger: "click", mode: "row", autoClear: !1 },
2178
+ "valid-config": { message: "inline" },
2179
+ "edit-rules": t.validRules
2180
+ }, {
2181
+ default: k(() => [
2182
+ _(j, {
2183
+ field: "name",
2184
+ title: "资源名称",
2185
+ width: "170",
2186
+ "show-icon": !1,
2187
+ editor: {}
2188
+ }, {
2189
+ edit: k((d) => [
2190
+ d.row.type === "upload" ? (ae(), be("span", It, Ne(d.row.name), 1)) : (ae(), Ce(I, {
2191
+ key: 1,
2192
+ modelValue: d.row.name,
2193
+ "onUpdate:modelValue": (U) => d.row.name = U,
2194
+ disabled: d.row.type === "upload",
2195
+ placeholder: "请输入资源名称"
2196
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "disabled"]))
2197
+ ]),
2198
+ _: 1
2199
+ }),
2200
+ _(j, {
2201
+ field: "resourceUrl",
2202
+ title: "资源URL",
2203
+ width: "170",
2204
+ "show-icon": !1,
2205
+ editor: {}
2206
+ }, {
2207
+ edit: k((d) => [
2208
+ d.row.type === "upload" ? (ae(), be("span", Ut)) : (ae(), Ce(I, {
2209
+ key: 1,
2210
+ modelValue: d.row.resourceUrl,
2211
+ "onUpdate:modelValue": (U) => d.row.resourceUrl = U,
2212
+ disabled: d.row.type === "upload",
2213
+ placeholder: "请输入资源URL"
2214
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "disabled"]))
2215
+ ]),
2216
+ _: 1
2217
+ }),
2218
+ _(j, {
2219
+ field: "description",
2220
+ title: "描述",
2221
+ "show-icon": !1,
2222
+ editor: {}
2223
+ }, {
2224
+ edit: k((d) => [
2225
+ _(I, {
2226
+ modelValue: d.row.description,
2227
+ "onUpdate:modelValue": (U) => d.row.description = U,
2228
+ placeholder: "请输入资源描述"
2229
+ }, null, 8, ["modelValue", "onUpdate:modelValue"])
2230
+ ]),
2231
+ _: 1
2232
+ }),
2233
+ _(j, {
2234
+ title: "操作",
2235
+ width: "100"
2236
+ }, {
2237
+ default: k((d) => [
2238
+ s.$refs.addSourceGridRef && s.$refs.addSourceGridRef.hasActiveRow(d.row) ? (ae(), be(Ie, { key: 0 }, [
2239
+ _(o, {
2240
+ type: "text",
2241
+ onClick: (U) => t.saveRowEvent(d.row)
2242
+ }, {
2243
+ default: k(() => [...n[10] || (n[10] = [
2244
+ ye(" 保存 ", -1)
2245
+ ])]),
2246
+ _: 1
2247
+ }, 8, ["onClick"]),
2248
+ _(o, {
2249
+ type: "text",
2250
+ onClick: (U) => t.cancelRowEvent(d)
2251
+ }, {
2252
+ default: k(() => [...n[11] || (n[11] = [
2253
+ ye(" 取消 ", -1)
2254
+ ])]),
2255
+ _: 1
2256
+ }, 8, ["onClick"])
2257
+ ], 64)) : (ae(), Ce(o, {
2258
+ key: 1,
2259
+ type: "text",
2260
+ onClick: (U) => t.removeSource(d)
2261
+ }, {
2262
+ default: k(() => [...n[12] || (n[12] = [
2263
+ ye("删除", -1)
2264
+ ])]),
2265
+ _: 1
2266
+ }, 8, ["onClick"]))
2267
+ ]),
2268
+ _: 1
2269
+ })
2270
+ ]),
2271
+ _: 1
2272
+ }, 8, ["data", "edit-rules"])
2273
+ ]),
2274
+ _: 1
2275
+ }, 8, ["visible"])
2276
+ ]))
2277
+ ], 64);
2278
+ }
2279
+ const _e = /* @__PURE__ */ Ve(ht, [["render", Mt], ["__scopeId", "data-v-31d8bba7"]]), Gt = {
2280
+ components: {
2281
+ PluginPanel: ve,
2282
+ SvgButton: P,
2283
+ SearchEmpty: V,
2284
+ ResourceSetting: he,
2285
+ ResourceList: _e
2286
+ },
2287
+ props: {
2288
+ title: {
2289
+ type: String,
2290
+ default: "资源管理"
2291
+ },
2292
+ fixedPanels: {
2293
+ type: Array
2294
+ }
2295
+ },
2296
+ emits: ["close"],
2297
+ setup(s, {
2298
+ emit: n
2299
+ }) {
2300
+ const {
2301
+ PLUGIN_NAME: v
2302
+ } = D(), t = "在这里新增图片资源,包括上传图片和使用uri。", m = Ue({
2303
+ emitEvent: n
2304
+ });
2305
+ Ke("panelState", m);
2306
+ const c = pe([]), r = L(() => {
2307
+ N(), se(), n("close");
2308
+ }, {
2309
+ metaData: {
2310
+ id: "engine.plugins.resource.Main.pluginPanelClosed"
2311
+ },
2312
+ ctx: () => ({
2313
+ props: s,
2314
+ emit: n,
2315
+ PLUGIN_NAME: v,
2316
+ docsContent: t,
2317
+ panelState: m,
2318
+ resourceList: c,
2319
+ pluginPanelClosed: r,
2320
+ setItemActive: e,
2321
+ openCategoryForm: o,
2322
+ getCategoryList: a,
2323
+ refreshCategory: i,
2324
+ openResourceList: l,
2325
+ useLayout: D,
2326
+ useNotify: R,
2327
+ PluginPanel: ve,
2328
+ SvgButton: P,
2329
+ SearchEmpty: V,
2330
+ ResourceSetting: he,
2331
+ openResourceSettingPanel: ue,
2332
+ closeResourceSettingPanel: se,
2333
+ ResourceList: _e,
2334
+ openResourceListPanel: B,
2335
+ closeResourceListPanel: N,
2336
+ fetchResourceGroupByAppId: ce
2337
+ })
2338
+ }), e = L((u) => {
2339
+ c.value.forEach((b) => {
2340
+ u.id === b.id ? b.active = !0 : b.active = !1;
2341
+ });
2342
+ }, {
2343
+ metaData: {
2344
+ id: "engine.plugins.resource.Main.setItemActive"
2345
+ },
2346
+ ctx: () => ({
2347
+ props: s,
2348
+ emit: n,
2349
+ PLUGIN_NAME: v,
2350
+ docsContent: t,
2351
+ panelState: m,
2352
+ resourceList: c,
2353
+ pluginPanelClosed: r,
2354
+ setItemActive: e,
2355
+ openCategoryForm: o,
2356
+ getCategoryList: a,
2357
+ refreshCategory: i,
2358
+ openResourceList: l,
2359
+ useLayout: D,
2360
+ useNotify: R,
2361
+ PluginPanel: ve,
2362
+ SvgButton: P,
2363
+ SearchEmpty: V,
2364
+ ResourceSetting: he,
2365
+ openResourceSettingPanel: ue,
2366
+ closeResourceSettingPanel: se,
2367
+ ResourceList: _e,
2368
+ openResourceListPanel: B,
2369
+ closeResourceListPanel: N,
2370
+ fetchResourceGroupByAppId: ce
2371
+ })
2372
+ }), o = L((u) => {
2373
+ u ? (e(u), ue(u)) : ue(), N();
2374
+ }, {
2375
+ metaData: {
2376
+ id: "engine.plugins.resource.Main.openCategoryForm"
2377
+ },
2378
+ ctx: () => ({
2379
+ props: s,
2380
+ emit: n,
2381
+ PLUGIN_NAME: v,
2382
+ docsContent: t,
2383
+ panelState: m,
2384
+ resourceList: c,
2385
+ pluginPanelClosed: r,
2386
+ setItemActive: e,
2387
+ openCategoryForm: o,
2388
+ getCategoryList: a,
2389
+ refreshCategory: i,
2390
+ openResourceList: l,
2391
+ useLayout: D,
2392
+ useNotify: R,
2393
+ PluginPanel: ve,
2394
+ SvgButton: P,
2395
+ SearchEmpty: V,
2396
+ ResourceSetting: he,
2397
+ openResourceSettingPanel: ue,
2398
+ closeResourceSettingPanel: se,
2399
+ ResourceList: _e,
2400
+ openResourceListPanel: B,
2401
+ closeResourceListPanel: N,
2402
+ fetchResourceGroupByAppId: ce
2403
+ })
2404
+ }), a = L(() => {
2405
+ ce().then((u) => {
2406
+ Array.isArray(u) && (c.value = u);
2407
+ }).catch((u) => {
2408
+ R({
2409
+ type: "error",
2410
+ message: u
2411
+ });
2412
+ });
2413
+ }, {
2414
+ metaData: {
2415
+ id: "engine.plugins.resource.Main.getCategoryList"
2416
+ },
2417
+ ctx: () => ({
2418
+ props: s,
2419
+ emit: n,
2420
+ PLUGIN_NAME: v,
2421
+ docsContent: t,
2422
+ panelState: m,
2423
+ resourceList: c,
2424
+ pluginPanelClosed: r,
2425
+ setItemActive: e,
2426
+ openCategoryForm: o,
2427
+ getCategoryList: a,
2428
+ refreshCategory: i,
2429
+ openResourceList: l,
2430
+ useLayout: D,
2431
+ useNotify: R,
2432
+ PluginPanel: ve,
2433
+ SvgButton: P,
2434
+ SearchEmpty: V,
2435
+ ResourceSetting: he,
2436
+ openResourceSettingPanel: ue,
2437
+ closeResourceSettingPanel: se,
2438
+ ResourceList: _e,
2439
+ openResourceListPanel: B,
2440
+ closeResourceListPanel: N,
2441
+ fetchResourceGroupByAppId: ce
2442
+ })
2443
+ }), i = L(() => {
2444
+ a();
2445
+ }, {
2446
+ metaData: {
2447
+ id: "engine.plugins.resource.Main.refreshCategory"
2448
+ },
2449
+ ctx: () => ({
2450
+ props: s,
2451
+ emit: n,
2452
+ PLUGIN_NAME: v,
2453
+ docsContent: t,
2454
+ panelState: m,
2455
+ resourceList: c,
2456
+ pluginPanelClosed: r,
2457
+ setItemActive: e,
2458
+ openCategoryForm: o,
2459
+ getCategoryList: a,
2460
+ refreshCategory: i,
2461
+ openResourceList: l,
2462
+ useLayout: D,
2463
+ useNotify: R,
2464
+ PluginPanel: ve,
2465
+ SvgButton: P,
2466
+ SearchEmpty: V,
2467
+ ResourceSetting: he,
2468
+ openResourceSettingPanel: ue,
2469
+ closeResourceSettingPanel: se,
2470
+ ResourceList: _e,
2471
+ openResourceListPanel: B,
2472
+ closeResourceListPanel: N,
2473
+ fetchResourceGroupByAppId: ce
2474
+ })
2475
+ }), l = L((u) => {
2476
+ e(u), B(u), se();
2477
+ }, {
2478
+ metaData: {
2479
+ id: "engine.plugins.resource.Main.openResourceList"
2480
+ },
2481
+ ctx: () => ({
2482
+ props: s,
2483
+ emit: n,
2484
+ PLUGIN_NAME: v,
2485
+ docsContent: t,
2486
+ panelState: m,
2487
+ resourceList: c,
2488
+ pluginPanelClosed: r,
2489
+ setItemActive: e,
2490
+ openCategoryForm: o,
2491
+ getCategoryList: a,
2492
+ refreshCategory: i,
2493
+ openResourceList: l,
2494
+ useLayout: D,
2495
+ useNotify: R,
2496
+ PluginPanel: ve,
2497
+ SvgButton: P,
2498
+ SearchEmpty: V,
2499
+ ResourceSetting: he,
2500
+ openResourceSettingPanel: ue,
2501
+ closeResourceSettingPanel: se,
2502
+ ResourceList: _e,
2503
+ openResourceListPanel: B,
2504
+ closeResourceListPanel: N,
2505
+ fetchResourceGroupByAppId: ce
2506
+ })
2507
+ });
2508
+ return Qe(L(L(() => {
2509
+ a();
2510
+ }, {
2511
+ metaData: {
2512
+ id: "engine.plugins.resource.Main.onMounted[0]"
2513
+ },
2514
+ ctx: () => ({
2515
+ props: s,
2516
+ emit: n,
2517
+ PLUGIN_NAME: v,
2518
+ docsContent: t,
2519
+ panelState: m,
2520
+ resourceList: c,
2521
+ pluginPanelClosed: r,
2522
+ setItemActive: e,
2523
+ openCategoryForm: o,
2524
+ getCategoryList: a,
2525
+ refreshCategory: i,
2526
+ openResourceList: l,
2527
+ useLayout: D,
2528
+ useNotify: R,
2529
+ PluginPanel: ve,
2530
+ SvgButton: P,
2531
+ SearchEmpty: V,
2532
+ ResourceSetting: he,
2533
+ openResourceSettingPanel: ue,
2534
+ closeResourceSettingPanel: se,
2535
+ ResourceList: _e,
2536
+ openResourceListPanel: B,
2537
+ closeResourceListPanel: N,
2538
+ fetchResourceGroupByAppId: ce
2539
+ })
2540
+ }), {
2541
+ metaData: {
2542
+ id: "engine.plugins.resource.Main.onMounted[0]"
2543
+ },
2544
+ ctx: () => ({
2545
+ props: s,
2546
+ emit: n,
2547
+ PLUGIN_NAME: v,
2548
+ docsContent: t,
2549
+ panelState: m,
2550
+ resourceList: c,
2551
+ pluginPanelClosed: r,
2552
+ setItemActive: e,
2553
+ openCategoryForm: o,
2554
+ getCategoryList: a,
2555
+ refreshCategory: i,
2556
+ openResourceList: l,
2557
+ _callEntry: L,
2558
+ _useCompile: qe,
2559
+ _metaData: He,
2560
+ useLayout: D,
2561
+ useNotify: R,
2562
+ PluginPanel: ve,
2563
+ SvgButton: P,
2564
+ SearchEmpty: V,
2565
+ ResourceSetting: he,
2566
+ openResourceSettingPanel: ue,
2567
+ closeResourceSettingPanel: se,
2568
+ ResourceList: _e,
2569
+ openResourceListPanel: B,
2570
+ closeResourceListPanel: N,
2571
+ fetchResourceGroupByAppId: ce
2572
+ })
2573
+ })), {
2574
+ PLUGIN_NAME: v,
2575
+ docsContent: t,
2576
+ resourceList: c,
2577
+ pluginPanelClosed: r,
2578
+ openCategoryForm: o,
2579
+ openResourceList: l,
2580
+ refreshCategory: i
2581
+ };
2582
+ }
2583
+ }, Nt = { class: "plugin-resource" }, Vt = { class: "resource-list" }, Ft = ["onClick"];
2584
+ function Ot(s, n, v, t, m, c) {
2585
+ const r = G("svg-button"), e = G("svg-icon"), o = G("search-empty"), a = G("plugin-panel"), i = G("resource-setting"), l = G("resource-list");
2586
+ return ae(), be("div", Nt, [
2587
+ _(a, {
2588
+ title: v.title,
2589
+ "fixed-name": t.PLUGIN_NAME.Resource,
2590
+ fixedPanels: v.fixedPanels,
2591
+ onClose: t.pluginPanelClosed,
2592
+ docsContent: t.docsContent,
2593
+ isShowDocsIcon: !0
2594
+ }, {
2595
+ header: k(() => [
2596
+ _(r, {
2597
+ class: "add-folder-icon",
2598
+ name: "add-folder",
2599
+ placement: "bottom",
2600
+ tips: "新建分组",
2601
+ onClick: t.openCategoryForm
2602
+ }, null, 8, ["onClick"])
2603
+ ]),
2604
+ content: k(() => {
2605
+ var u;
2606
+ return [
2607
+ H("div", Vt, [
2608
+ (ae(!0), be(Ie, null, Oe(t.resourceList, (b) => (ae(), be("div", {
2609
+ key: b.id,
2610
+ class: Ge(["resource-item", { "active-item": b.active }]),
2611
+ onClick: (g) => t.openResourceList(b)
2612
+ }, [
2613
+ H("span", null, [
2614
+ _(e, { name: "plugin-icon-resource" }),
2615
+ H("span", null, Ne(b.name), 1)
2616
+ ]),
2617
+ _(e, {
2618
+ name: "setting",
2619
+ class: "item-setting",
2620
+ onClick: We((g) => t.openCategoryForm(b), ["stop"])
2621
+ }, null, 8, ["onClick"])
2622
+ ], 10, Ft))), 128))
2623
+ ]),
2624
+ _(o, {
2625
+ isShow: !((u = t.resourceList) != null && u.length)
2626
+ }, null, 8, ["isShow"])
2627
+ ];
2628
+ }),
2629
+ _: 1
2630
+ }, 8, ["title", "fixed-name", "fixedPanels", "onClose", "docsContent"]),
2631
+ _(i, { onRefreshCategory: t.refreshCategory }, null, 8, ["onRefreshCategory"]),
2632
+ _(l)
2633
+ ]);
2634
+ }
2635
+ const Bt = /* @__PURE__ */ Ve(Gt, [["render", Ot], ["__scopeId", "data-v-62c9d32e"]]), Zt = {
2636
+ ...He,
2637
+ entry: Bt
2638
+ };
2639
+ export {
2640
+ Zt as default
2641
+ };
2642
+ //# sourceMappingURL=index.js.map