@xtctwins/tctwins-bimx-engine 0.3.18 → 0.3.20

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 (90) hide show
  1. package/README.md +196 -196
  2. package/dist/01.xtc +0 -0
  3. package/dist/02.xtc +0 -0
  4. package/dist/03.xtc +0 -0
  5. package/dist/{AnnotationTool-CzQVFGZm.mjs → AnnotationTool-BdpbH5GD.mjs} +35 -35
  6. package/dist/BIMX_Viewer_Lib.es.js +6 -6
  7. package/dist/BIMX_Viewer_Lib.umd.js +167 -214
  8. package/dist/{CameraViewTool-Cm7UrIEY.mjs → CameraViewTool-DZgfvZWz.mjs} +38 -38
  9. package/dist/{CommentTool-C7VErDw6.mjs → CommentTool-wnbLGy67.mjs} +192 -192
  10. package/dist/{HiddenTool-mH3cdTjy.mjs → HiddenTool-Cd4f17Dt.mjs} +13 -13
  11. package/dist/{InspectorTool-CG-QJKao.mjs → InspectorTool-C2nndt-g.mjs} +13 -13
  12. package/dist/{MeasureTool-DiF73s6L.mjs → MeasureTool-BsMkog4B.mjs} +125 -125
  13. package/dist/{MouseTool-DigCaD4c.mjs → MouseTool-BNJTSuhL.mjs} +8 -8
  14. package/dist/{NavigateTool-C375lcY6.mjs → NavigateTool-D2JI1BJD.mjs} +8 -8
  15. package/dist/{OperateTool-D5HFrut6.mjs → OperateTool-BebljnDn.mjs} +58 -61
  16. package/dist/{RoamTool-DO-gP6oV.mjs → RoamTool-BbTe1gv-.mjs} +27 -27
  17. package/dist/ScreenShotTool-D5h8wDJx.mjs +356 -0
  18. package/dist/{SectionTool-CjX3ikon.mjs → SectionTool-D2Sxtt9O.mjs} +70 -70
  19. package/dist/SettingTool-BhKIEnOm.mjs +1508 -0
  20. package/dist/StructureTree-Ve6eLaxT.mjs +1582 -0
  21. package/dist/{alert-COkF0N8w.mjs → alert-CBH1N-0R.mjs} +14 -14
  22. package/dist/{index-fIchFHNn.mjs → index-DL-9hfEJ.mjs} +53744 -56333
  23. package/dist/index.html +17 -17
  24. package/dist/{panel.vue_vue_type_style_index_0_lang-BtSx7l8h.mjs → panel.vue_vue_type_style_index_0_lang-C33jjUak.mjs} +1 -1
  25. package/dist/style.css +3 -3
  26. package/dist/{tallPanel-BMplV9f0.mjs → tallPanel-DXh42FgN.mjs} +12 -12
  27. package/package.json +85 -85
  28. package/types/components/BCFComponents/BCFAddPanel.vue.d.ts +10 -38
  29. package/types/components/BCFComponents/BCFCommentNew.vue.d.ts +22 -0
  30. package/types/components/BCFComponents/BCFDetailPanel.vue.d.ts +9 -37
  31. package/types/components/BCFComponents/BCFDisplayList.vue.d.ts +7 -5
  32. package/types/components/BCFComponents/BCFFilter.vue.d.ts +7 -5
  33. package/types/components/BCFComponents/BCFTool.vue.d.ts +7 -4
  34. package/types/components/BCFComponents/addObjectOrAnno.vue.d.ts +7 -5
  35. package/types/components/BCFComponents/checkObjectPanel.vue.d.ts +6 -5
  36. package/types/components/BCFComponents/commentInput.vue.d.ts +10 -36
  37. package/types/components/BCFComponents/commentsView.vue.d.ts +7 -36
  38. package/types/components/BCFComponents/dialogPanel.vue.d.ts +8 -5
  39. package/types/components/BCFComponents/imageView.vue.d.ts +7 -5
  40. package/types/components/BCFComponents/imageZoomIn.vue.d.ts +6 -5
  41. package/types/components/BimViewerComponents/AnnotationTool.vue.d.ts +1 -1
  42. package/types/components/BimViewerComponents/AppToolbar.vue.d.ts +1 -18
  43. package/types/components/BimViewerComponents/CameraViewTool.vue.d.ts +1 -1
  44. package/types/components/BimViewerComponents/ClickEvent.vue.d.ts +1 -1
  45. package/types/components/BimViewerComponents/CommentTool.vue.d.ts +1 -32
  46. package/types/components/BimViewerComponents/HiddenTool.vue.d.ts +1 -1
  47. package/types/components/BimViewerComponents/MobileCommentsTool/add.vue.d.ts +8 -6
  48. package/types/components/BimViewerComponents/MobileCommentsTool/detail.vue.d.ts +5 -4
  49. package/types/components/BimViewerComponents/MobileCommentsTool/draw.vue.d.ts +2 -2
  50. package/types/components/BimViewerComponents/MobileCommentsTool/filter.vue.d.ts +1 -270
  51. package/types/components/BimViewerComponents/MobileCommentsTool/list.vue.d.ts +7 -291
  52. package/types/components/BimViewerComponents/MobileCommentsTool/zoomIn.vue.d.ts +6 -5
  53. package/types/components/BimViewerComponents/MouseTool.vue.d.ts +1 -1
  54. package/types/components/BimViewerComponents/NavigateTool.vue.d.ts +1 -1
  55. package/types/components/BimViewerComponents/PCCommentTool/pcdraw.vue.d.ts +1 -1
  56. package/types/components/BimViewerComponents/RoamTool.vue.d.ts +1 -1
  57. package/types/components/BimViewerComponents/SettingTool.vue.d.ts +6 -4
  58. package/types/components/BimViewerComponents/StructureTree.vue.d.ts +1 -11642
  59. package/types/components/BimViewerComponents/Toolbar.vue.d.ts +1 -1
  60. package/types/components/BimViewerComponents/emptyPage.vue.d.ts +8 -0
  61. package/types/components/BimViewerComponents/mobileToolbar.vue.d.ts +10 -0
  62. package/types/components/BimxViewerComp.vue.d.ts +21 -7
  63. package/types/components/MobileBCFComponents/MobileBCFAdd.vue.d.ts +10 -37
  64. package/types/components/MobileBCFComponents/MobileBCFDetail.vue.d.ts +9 -37
  65. package/types/components/MobileBCFComponents/MobileBCFDisplayList.vue.d.ts +7 -291
  66. package/types/components/MobileBCFComponents/MobileBCFFilter.vue.d.ts +1 -270
  67. package/types/components/MobileBCFComponents/MobileBCFTool.vue.d.ts +8 -5
  68. package/types/components/MobileBCFComponents/MobileCommentInput.vue.d.ts +12 -38
  69. package/types/components/MobileBCFComponents/MobileCommentsView.vue.d.ts +9 -7
  70. package/types/components/MobileBCFComponents/selectPanel.vue.d.ts +7 -5
  71. package/types/components/bimxViewer.vue.d.ts +27 -0
  72. package/types/components/utilsComponents/alert.vue.d.ts +1 -1
  73. package/types/components/utilsComponents/closeButton.vue.d.ts +1 -1
  74. package/types/components/utilsComponents/closeButton_dark.vue.d.ts +1 -1
  75. package/types/components/utilsComponents/emptyPage.vue.d.ts +1 -1
  76. package/types/components/utilsComponents/loading.vue.d.ts +1 -1
  77. package/types/components/utilsComponents/panel.vue.d.ts +2 -8
  78. package/types/components/utilsComponents/prompt.vue.d.ts +1 -1
  79. package/types/components/utilsComponents/rectangleButton.vue.d.ts +1 -3
  80. package/types/components/utilsComponents/tallPanel.vue.d.ts +4 -14
  81. package/types/components/utilsComponents/tallPanel_noPos.vue.d.ts +4 -14
  82. package/types/pages/BimxViewerEntry.vue.d.ts +72 -5
  83. package/types/pages/viewerEntry.vue.d.ts +116 -0
  84. package/types/store/initConfigs.d.ts +1 -1
  85. package/types/store/toolbars.d.ts +50 -50
  86. package/types/tests/cmt.d.ts +1 -0
  87. package/types/viewerManager/sectionManager.d.ts +25 -25
  88. package/dist/ScreenShotTool-B5ICa8PZ.mjs +0 -429
  89. package/dist/SettingTool-D2EQy3h8.mjs +0 -1787
  90. package/dist/StructureTree-QhQyMrZn.mjs +0 -1685
@@ -1,1685 +0,0 @@
1
- import { u as ae, w as Be, b as Re, c as et, a as tt, i as se, d as nt, e as ot, r as st, f as $e, g as xe, h as at, j as ye, k as De, l as ve, m as we, n as me, o as qe, N as rt, p as dt, q as je, s as Ee, t as it, E as lt, v as ct, x as ut, _ as Ve, y as ht, z as ft, A as Z, B as pt, C as yt, D as vt, F as gt, G as kt, H as ne, I as ge, T as Me, S as ke, J as Nt, K as Ct, L as mt, M as bt } from "./index-fIchFHNn.mjs";
2
- import { _ as _t } from "./tallPanel-BMplV9f0.mjs";
3
- import { defineComponent as re, openBlock as I, createBlock as Y, Transition as Et, mergeProps as xt, unref as T, toHandlers as Dt, withCtx as A, renderSlot as be, ref as w, computed as Ke, watch as F, onMounted as Ae, onBeforeUnmount as Le, resolveDynamicComponent as Ue, normalizeStyle as Ye, normalizeClass as R, reactive as wt, nextTick as he, inject as fe, provide as pe, h as He, getCurrentInstance as We, resolveComponent as oe, withDirectives as G, createElementBlock as j, withModifiers as ee, createElementVNode as D, createCommentVNode as ie, createVNode as B, Fragment as ce, renderList as ue, vShow as Q, onUpdated as Kt, toDisplayString as q } from "vue";
4
- import { Loading as Tt, CaretRight as It } from "@element-plus/icons-vue";
5
- import { _ as St } from "./panel.vue_vue_type_style_index_0_lang-BtSx7l8h.mjs";
6
- var Bt = /* @__PURE__ */ re({
7
- name: "ElCollapseTransition",
8
- __name: "collapse-transition",
9
- setup(e) {
10
- const t = ae("collapse-transition"), o = (n) => {
11
- n.style.maxHeight = "", n.style.overflow = n.dataset.oldOverflow, n.style.paddingTop = n.dataset.oldPaddingTop, n.style.paddingBottom = n.dataset.oldPaddingBottom;
12
- }, s = {
13
- beforeEnter(n) {
14
- n.dataset || (n.dataset = {}), n.dataset.oldPaddingTop = n.style.paddingTop, n.dataset.oldPaddingBottom = n.style.paddingBottom, n.style.height && (n.dataset.elExistsHeight = n.style.height), n.style.maxHeight = 0, n.style.paddingTop = 0, n.style.paddingBottom = 0;
15
- },
16
- enter(n) {
17
- requestAnimationFrame(() => {
18
- n.dataset.oldOverflow = n.style.overflow, n.dataset.elExistsHeight ? n.style.maxHeight = n.dataset.elExistsHeight : n.scrollHeight !== 0 ? n.style.maxHeight = `${n.scrollHeight}px` : n.style.maxHeight = 0, n.style.paddingTop = n.dataset.oldPaddingTop, n.style.paddingBottom = n.dataset.oldPaddingBottom, n.style.overflow = "hidden";
19
- });
20
- },
21
- afterEnter(n) {
22
- n.style.maxHeight = "", n.style.overflow = n.dataset.oldOverflow;
23
- },
24
- enterCancelled(n) {
25
- o(n);
26
- },
27
- beforeLeave(n) {
28
- n.dataset || (n.dataset = {}), n.dataset.oldPaddingTop = n.style.paddingTop, n.dataset.oldPaddingBottom = n.style.paddingBottom, n.dataset.oldOverflow = n.style.overflow, n.style.maxHeight = `${n.scrollHeight}px`, n.style.overflow = "hidden";
29
- },
30
- leave(n) {
31
- n.scrollHeight !== 0 && (n.style.maxHeight = 0, n.style.paddingTop = 0, n.style.paddingBottom = 0);
32
- },
33
- afterLeave(n) {
34
- o(n);
35
- },
36
- leaveCancelled(n) {
37
- o(n);
38
- }
39
- };
40
- return (n, a) => (I(), Y(Et, xt({ name: T(t).b() }, Dt(s)), {
41
- default: A(() => [be(n.$slots, "default")]),
42
- _: 3
43
- }, 16, ["name"]));
44
- }
45
- }), At = Bt;
46
- const Lt = Be(At), Ot = Re({
47
- /**
48
- * @description text type
49
- */
50
- type: {
51
- type: String,
52
- values: [
53
- "primary",
54
- "success",
55
- "info",
56
- "warning",
57
- "danger",
58
- ""
59
- ],
60
- default: ""
61
- },
62
- /**
63
- * @description text size
64
- */
65
- size: {
66
- type: String,
67
- values: et,
68
- default: ""
69
- },
70
- /**
71
- * @description render ellipsis
72
- */
73
- truncated: Boolean,
74
- /**
75
- * @description maximum lines
76
- */
77
- lineClamp: { type: [String, Number] },
78
- /**
79
- * @description custom element tag
80
- */
81
- tag: {
82
- type: String,
83
- default: "span"
84
- }
85
- });
86
- var Pt = /* @__PURE__ */ re({
87
- name: "ElText",
88
- __name: "text",
89
- props: Ot,
90
- setup(e, { expose: t }) {
91
- const o = e, s = w(), n = tt(), a = ae("text"), d = Ke(() => [
92
- a.b(),
93
- a.m(o.type),
94
- a.m(n.value),
95
- a.is("truncated", o.truncated),
96
- a.is("line-clamp", !se(o.lineClamp))
97
- ]), { width: l, height: v } = nt(s), h = w(!1);
98
- let u;
99
- const r = () => {
100
- u && $e(u), u = st(() => {
101
- var c, f, b, x;
102
- if (u = void 0, h.value = !1, o.truncated) {
103
- const k = (c = s.value) == null ? void 0 : c.offsetWidth, N = (f = s.value) == null ? void 0 : f.scrollWidth;
104
- k && N && N > k && (h.value = !0);
105
- } else if (!se(o.lineClamp)) {
106
- const k = (b = s.value) == null ? void 0 : b.offsetHeight, N = (x = s.value) == null ? void 0 : x.scrollHeight;
107
- k && N && N > k && (h.value = !0);
108
- }
109
- });
110
- };
111
- return F(() => [
112
- l.value,
113
- v.value,
114
- o.truncated,
115
- o.lineClamp
116
- ], r, { flush: "post" }), ot(s, r, {
117
- attributes: !0,
118
- attributeFilter: ["class", "style"],
119
- subtree: !0,
120
- childList: !0,
121
- characterData: !0
122
- }), Ae(r), Le(() => {
123
- u && $e(u);
124
- }), t({
125
- /** @description whether the text is truncated */
126
- isTruncated: h
127
- }), (c, f) => {
128
- var b;
129
- return I(), Y(Ue(e.tag), {
130
- ref_key: "textRef",
131
- ref: s,
132
- class: R(d.value),
133
- title: c.$attrs.title ?? (h.value ? (b = s.value) == null ? void 0 : b.textContent : void 0),
134
- style: Ye({ "-webkit-line-clamp": e.lineClamp })
135
- }, {
136
- default: A(() => [be(c.$slots, "default")]),
137
- _: 3
138
- }, 8, [
139
- "class",
140
- "title",
141
- "style"
142
- ]);
143
- };
144
- }
145
- }), $t = Pt;
146
- const jt = Be($t), Oe = "RootTree", Je = "NodeInstance", ze = "TreeNodeMap", Mt = Re({
147
- data: {
148
- type: ye(Array),
149
- default: () => []
150
- },
151
- emptyText: { type: String },
152
- renderAfterExpand: {
153
- type: Boolean,
154
- default: !0
155
- },
156
- nodeKey: String,
157
- checkStrictly: Boolean,
158
- defaultExpandAll: Boolean,
159
- expandOnClickNode: {
160
- type: Boolean,
161
- default: !0
162
- },
163
- checkOnClickNode: Boolean,
164
- checkOnClickLeaf: {
165
- type: Boolean,
166
- default: !0
167
- },
168
- checkDescendants: Boolean,
169
- autoExpandParent: {
170
- type: Boolean,
171
- default: !0
172
- },
173
- defaultCheckedKeys: { type: Array },
174
- defaultExpandedKeys: { type: Array },
175
- currentNodeKey: { type: [String, Number] },
176
- renderContent: { type: ye(Function) },
177
- showCheckbox: Boolean,
178
- draggable: Boolean,
179
- allowDrag: { type: ye(Function) },
180
- allowDrop: { type: ye(Function) },
181
- props: {
182
- type: Object,
183
- default: () => ({
184
- children: "children",
185
- label: "label",
186
- disabled: "disabled"
187
- })
188
- },
189
- lazy: Boolean,
190
- highlightCurrent: Boolean,
191
- load: { type: Function },
192
- filterNodeMethod: { type: Function },
193
- accordion: Boolean,
194
- indent: {
195
- type: Number,
196
- default: 18
197
- },
198
- icon: { type: at }
199
- }), Ht = {
200
- "check-change": (e, t, o) => e && xe(t) && xe(o),
201
- "current-change": (e, t) => !0,
202
- "node-click": (e, t, o, s) => e && t && s instanceof Event,
203
- "node-contextmenu": (e, t, o, s) => e instanceof Event && t && o,
204
- "node-collapse": (e, t, o) => e && t,
205
- "node-expand": (e, t, o) => e && t,
206
- check: (e, t) => e && t,
207
- "node-drag-start": (e, t) => e && t,
208
- "node-drag-end": (e, t, o, s) => e && s,
209
- "node-drop": (e, t, o, s) => e && t && s,
210
- "node-drag-leave": (e, t, o) => e && t && o,
211
- "node-drag-enter": (e, t, o) => e && t && o,
212
- "node-drag-over": (e, t, o) => e && t && o
213
- }, Ge = "$treeNodeId", Fe = function(e, t) {
214
- !t || t.$treeNodeId || Object.defineProperty(t, Ge, {
215
- value: e.id,
216
- enumerable: !1,
217
- configurable: !1,
218
- writable: !1
219
- });
220
- }, Pe = (e, t) => t == null ? void 0 : t[e || "$treeNodeId"], Te = (e, t, o) => {
221
- const s = e.value.currentNode;
222
- o();
223
- const n = e.value.currentNode;
224
- s !== n && t("current-change", n ? n.data : null, n);
225
- }, Qe = (e) => {
226
- let t = !0, o = !0, s = !0, n = !0;
227
- for (let a = 0, d = e.length; a < d; a++) {
228
- const l = e[a];
229
- (l.checked !== !0 || l.indeterminate) && (t = !1, l.disabled || (s = !1)), (l.checked !== !1 || l.indeterminate) && (o = !1), l.isEffectivelyChecked || (n = !1);
230
- }
231
- return {
232
- all: t,
233
- none: o,
234
- allWithoutDisable: s,
235
- half: !t && !o,
236
- isEffectivelyChecked: n
237
- };
238
- }, le = function(e) {
239
- if (e.childNodes.length === 0 || e.loading) {
240
- e.isEffectivelyChecked = e.disabled || e.checked;
241
- return;
242
- }
243
- const { all: t, none: o, half: s, isEffectivelyChecked: n } = Qe(e.childNodes);
244
- e.isEffectivelyChecked = n, t ? (e.checked = !0, e.indeterminate = !1) : s ? (e.checked = !1, e.indeterminate = !0) : o && (e.checked = !1, e.indeterminate = !1);
245
- const a = e.parent;
246
- !a || a.level === 0 || e.store.checkStrictly || le(a);
247
- }, Ne = function(e, t) {
248
- const o = e.store.props, s = e.data || {}, n = o[t];
249
- if (me(n)) return n(s, e);
250
- if (qe(n)) return s[n];
251
- if (se(n)) {
252
- const a = s[t];
253
- return se(a) ? "" : a;
254
- }
255
- }, Ie = function(e, t) {
256
- e.forEach((o) => {
257
- o.canFocus = t, Ie(o.childNodes, t);
258
- });
259
- };
260
- let zt = 0;
261
- var Se = class Ce {
262
- constructor(t) {
263
- this.isLeafByUser = void 0, this.isLeaf = void 0, this.isEffectivelyChecked = !1, this.id = zt++, this.text = null, this.checked = !1, this.indeterminate = !1, this.data = null, this.expanded = !1, this.parent = null, this.visible = !0, this.isCurrent = !1, this.canFocus = !1;
264
- for (const o in t) De(t, o) && (this[o] = t[o]);
265
- this.level = 0, this.loaded = !1, this.childNodes = [], this.loading = !1, this.parent && (this.level = this.parent.level + 1);
266
- }
267
- initialize() {
268
- var a;
269
- const t = this.store;
270
- if (!t) throw new Error("[Node]store is required!");
271
- t.registerNode(this);
272
- const o = t.props;
273
- if (o && typeof o.isLeaf < "u") {
274
- const d = Ne(this, "isLeaf");
275
- xe(d) && (this.isLeafByUser = d);
276
- }
277
- if (t.lazy !== !0 && this.data ? (this.setData(this.data), t.defaultExpandAll && (this.expanded = !0, this.canFocus = !0)) : this.level > 0 && t.lazy && t.defaultExpandAll && !this.isLeafByUser && this.expand(), ve(this.data) || Fe(this, this.data), !this.data) return;
278
- const s = t.defaultExpandedKeys, n = t.key;
279
- n && !we(this.key) && s && s.includes(this.key) && this.expand(null, t.autoExpandParent), n && t.currentNodeKey !== void 0 && this.key === t.currentNodeKey && (t.currentNode && (t.currentNode.isCurrent = !1), t.currentNode = this, t.currentNode.isCurrent = !0), t.lazy && t._initDefaultCheckedNode(this), this.updateLeafState(), (this.level === 1 || ((a = this.parent) == null ? void 0 : a.expanded) === !0) && (this.canFocus = !0);
280
- }
281
- setData(t) {
282
- ve(t) || Fe(this, t), this.data = t, this.childNodes = [];
283
- let o;
284
- this.level === 0 && ve(this.data) ? o = this.data : o = Ne(this, "children") || [];
285
- for (let s = 0, n = o.length; s < n; s++) this.insertChild({ data: o[s] });
286
- }
287
- get label() {
288
- return Ne(this, "label");
289
- }
290
- get key() {
291
- const t = this.store.key;
292
- return this.data ? this.data[t] : null;
293
- }
294
- get disabled() {
295
- return Ne(this, "disabled");
296
- }
297
- get nextSibling() {
298
- const t = this.parent;
299
- if (t) {
300
- const o = t.childNodes.indexOf(this);
301
- if (o > -1) return t.childNodes[o + 1];
302
- }
303
- return null;
304
- }
305
- get previousSibling() {
306
- const t = this.parent;
307
- if (t) {
308
- const o = t.childNodes.indexOf(this);
309
- if (o > -1) return o > 0 ? t.childNodes[o - 1] : null;
310
- }
311
- return null;
312
- }
313
- contains(t, o = !0) {
314
- return (this.childNodes || []).some((s) => s === t || o && s.contains(t));
315
- }
316
- remove() {
317
- const t = this.parent;
318
- t && t.removeChild(this);
319
- }
320
- insertChild(t, o, s) {
321
- if (!t) throw new Error("InsertChild error: child is required.");
322
- if (!(t instanceof Ce)) {
323
- if (!s) {
324
- const n = this.getChildren(!0);
325
- n != null && n.includes(t.data) || (se(o) || o < 0 ? n == null || n.push(t.data) : n == null || n.splice(o, 0, t.data));
326
- }
327
- Object.assign(t, {
328
- parent: this,
329
- store: this.store
330
- }), t = wt(new Ce(t)), t instanceof Ce && t.initialize();
331
- }
332
- t.level = this.level + 1, se(o) || o < 0 ? this.childNodes.push(t) : this.childNodes.splice(o, 0, t), this.updateLeafState();
333
- }
334
- insertBefore(t, o) {
335
- let s;
336
- o && (s = this.childNodes.indexOf(o)), this.insertChild(t, s);
337
- }
338
- insertAfter(t, o) {
339
- let s;
340
- o && (s = this.childNodes.indexOf(o), s !== -1 && (s += 1)), this.insertChild(t, s);
341
- }
342
- removeChild(t) {
343
- const o = this.getChildren() || [], s = o.indexOf(t.data);
344
- s > -1 && o.splice(s, 1);
345
- const n = this.childNodes.indexOf(t);
346
- n > -1 && (this.store && this.store.deregisterNode(t), t.parent = null, this.childNodes.splice(n, 1)), this.updateLeafState();
347
- }
348
- removeChildByData(t) {
349
- const o = this.childNodes.find((s) => s.data === t);
350
- o && this.removeChild(o);
351
- }
352
- expand(t, o) {
353
- const s = () => {
354
- if (o) {
355
- let n = this.parent;
356
- for (; n && n.level > 0; )
357
- n.expanded = !0, n = n.parent;
358
- }
359
- this.expanded = !0, t && t(), Ie(this.childNodes, !0);
360
- };
361
- this.shouldLoadData() ? this.loadData((n) => {
362
- ve(n) && (this.store.checkStrictly || (this.checked ? this.setChecked(!0, !0) : le(this)), s());
363
- }) : s();
364
- }
365
- doCreateChildren(t, o = {}) {
366
- t.forEach((s) => {
367
- this.insertChild(Object.assign({ data: s }, o), void 0, !0);
368
- });
369
- }
370
- collapse() {
371
- this.expanded = !1, Ie(this.childNodes, !1);
372
- }
373
- shouldLoadData() {
374
- return !!(this.store.lazy === !0 && this.store.load && !this.loaded);
375
- }
376
- updateLeafState() {
377
- if (this.store.lazy === !0 && this.loaded !== !0 && typeof this.isLeafByUser < "u") {
378
- this.isLeaf = this.isLeafByUser, this.isEffectivelyChecked = this.isLeaf && this.disabled;
379
- return;
380
- }
381
- const t = this.childNodes;
382
- if (!this.store.lazy || this.store.lazy === !0 && this.loaded === !0) {
383
- this.isLeaf = !t || t.length === 0, this.isEffectivelyChecked = this.isLeaf && this.disabled;
384
- return;
385
- }
386
- this.isLeaf = !1;
387
- }
388
- setChecked(t, o, s, n) {
389
- if (this.indeterminate = t === "half", this.checked = t === !0, this.isEffectivelyChecked = !this.childNodes.length && (this.disabled || this.checked), this.store.checkStrictly && !o) return;
390
- if (!(this.shouldLoadData() && !this.store.checkDescendants)) {
391
- const d = () => {
392
- if (o) {
393
- const l = this.childNodes;
394
- for (let r = 0, c = l.length; r < c; r++) {
395
- const f = l[r];
396
- n = n || t !== !1;
397
- const b = f.disabled && f.isLeaf ? f.checked : n;
398
- f.setChecked(b, o, !0, n);
399
- }
400
- const { half: v, all: h, isEffectivelyChecked: u } = Qe(l);
401
- h || (this.checked = h, this.indeterminate = v), this.isEffectivelyChecked = this.childNodes.length ? u : this.disabled || this.checked;
402
- }
403
- };
404
- if (this.shouldLoadData()) {
405
- this.loadData(() => {
406
- d(), le(this);
407
- }, { checked: t !== !1 });
408
- return;
409
- } else d();
410
- }
411
- const a = this.parent;
412
- !a || a.level === 0 || !s && !this.store.checkStrictly && le(a);
413
- }
414
- getChildren(t = !1) {
415
- if (this.level === 0) return this.data;
416
- const o = this.data;
417
- if (!o) return null;
418
- const s = this.store.props;
419
- let n = "children";
420
- return s && (n = s.children || "children"), se(o[n]) && (o[n] = null), t && !o[n] && (o[n] = []), o[n];
421
- }
422
- updateChildren() {
423
- const t = this.getChildren() || [], o = this.childNodes.map((a) => a.data), s = {}, n = [];
424
- t.forEach((a, d) => {
425
- const l = a[Ge];
426
- l && o.some((v) => (v == null ? void 0 : v.$treeNodeId) === l) ? s[l] = {
427
- index: d,
428
- data: a
429
- } : n.push({
430
- index: d,
431
- data: a
432
- });
433
- }), this.store.lazy || o.forEach((a) => {
434
- s[a == null ? void 0 : a.$treeNodeId] || this.removeChildByData(a);
435
- }), n.forEach(({ index: a, data: d }) => {
436
- this.insertChild({ data: d }, a);
437
- }), this.updateLeafState();
438
- }
439
- loadData(t, o = {}) {
440
- if (this.store.lazy === !0 && this.store.load && !this.loaded && (!this.loading || Object.keys(o).length)) {
441
- this.loading = !0;
442
- const s = (a) => {
443
- this.childNodes = [], this.doCreateChildren(a, o), this.loaded = !0, this.loading = !1, this.updateLeafState(), t && t.call(this, a);
444
- }, n = () => {
445
- this.loading = !1;
446
- };
447
- this.store.load(this, s, n);
448
- } else t && t.call(this);
449
- }
450
- eachNode(t) {
451
- const o = [this];
452
- for (; o.length; ) {
453
- const s = o.shift();
454
- o.unshift(...s.childNodes), t(s);
455
- }
456
- }
457
- reInitChecked() {
458
- this.store.checkStrictly || le(this);
459
- }
460
- }, Ft = class {
461
- constructor(e) {
462
- this.lazy = !1, this.checkStrictly = !1, this.autoExpandParent = !1, this.defaultExpandAll = !1, this.checkDescendants = !1, this.currentNode = null, this.currentNodeKey = null;
463
- for (const t in e) De(e, t) && (this[t] = e[t]);
464
- this.nodesMap = {};
465
- }
466
- initialize() {
467
- if (this.root = new Se({
468
- data: this.data,
469
- store: this
470
- }), this.root.initialize(), this.lazy && this.load) {
471
- const e = this.load;
472
- e(this.root, (t) => {
473
- this.root.doCreateChildren(t), this._initDefaultCheckedNodes();
474
- }, rt);
475
- } else this._initDefaultCheckedNodes();
476
- }
477
- filter(e) {
478
- const t = this.filterNodeMethod, o = this.lazy, s = async function(n) {
479
- const a = n.root ? n.root.childNodes : n.childNodes;
480
- for (const [d, l] of a.entries())
481
- l.visible = !!(t != null && t.call(l, e, l.data, l)), d % 80 === 0 && d > 0 && await he(), await s(l);
482
- if (!n.visible && a.length) {
483
- let d = !0;
484
- d = !a.some((l) => l.visible), n.root ? n.root.visible = d === !1 : n.visible = d === !1;
485
- }
486
- e && n.visible && !n.isLeaf && (!o || n.loaded) && n.expand();
487
- };
488
- s(this);
489
- }
490
- setData(e) {
491
- e !== this.root.data ? (this.nodesMap = {}, this.root.setData(e), this._initDefaultCheckedNodes(), this.setCurrentNodeKey(this.currentNodeKey)) : this.root.updateChildren();
492
- }
493
- getNode(e) {
494
- if (e instanceof Se) return e;
495
- const t = dt(e) ? Pe(this.key, e) : e;
496
- return this.nodesMap[t] || null;
497
- }
498
- insertBefore(e, t) {
499
- var s;
500
- const o = this.getNode(t);
501
- (s = o.parent) == null || s.insertBefore({ data: e }, o);
502
- }
503
- insertAfter(e, t) {
504
- var s;
505
- const o = this.getNode(t);
506
- (s = o.parent) == null || s.insertAfter({ data: e }, o);
507
- }
508
- remove(e) {
509
- const t = this.getNode(e);
510
- t && t.parent && (t === this.currentNode && (this.currentNode = null), t.parent.removeChild(t));
511
- }
512
- append(e, t) {
513
- const o = je(t) ? this.root : this.getNode(t);
514
- o && o.insertChild({ data: e });
515
- }
516
- _initDefaultCheckedNodes() {
517
- const e = this.defaultCheckedKeys || [], t = this.nodesMap;
518
- e.forEach((o) => {
519
- const s = t[o];
520
- s && s.setChecked(!0, !this.checkStrictly);
521
- });
522
- }
523
- _initDefaultCheckedNode(e) {
524
- const t = this.defaultCheckedKeys || [];
525
- !we(e.key) && t.includes(e.key) && e.setChecked(!0, !this.checkStrictly);
526
- }
527
- setDefaultCheckedKey(e) {
528
- e !== this.defaultCheckedKeys && (this.defaultCheckedKeys = e, this._initDefaultCheckedNodes());
529
- }
530
- registerNode(e) {
531
- const t = this.key;
532
- if (!(!e || !e.data))
533
- if (!t) this.nodesMap[e.id] = e;
534
- else {
535
- const o = e.key;
536
- we(o) || (this.nodesMap[o] = e);
537
- }
538
- }
539
- deregisterNode(e) {
540
- !this.key || !e || !e.data || (e.childNodes.forEach((t) => {
541
- this.deregisterNode(t);
542
- }), delete this.nodesMap[e.key]);
543
- }
544
- getCheckedNodes(e = !1, t = !1) {
545
- const o = [], s = function(n) {
546
- (n.root ? n.root.childNodes : n.childNodes).forEach((a) => {
547
- (a.checked || t && a.indeterminate) && (!e || e && a.isLeaf) && o.push(a.data), s(a);
548
- });
549
- };
550
- return s(this), o;
551
- }
552
- getCheckedKeys(e = !1) {
553
- return this.getCheckedNodes(e).map((t) => (t || {})[this.key]);
554
- }
555
- getHalfCheckedNodes() {
556
- const e = [], t = function(o) {
557
- (o.root ? o.root.childNodes : o.childNodes).forEach((s) => {
558
- s.indeterminate && e.push(s.data), t(s);
559
- });
560
- };
561
- return t(this), e;
562
- }
563
- getHalfCheckedKeys() {
564
- return this.getHalfCheckedNodes().map((e) => (e || {})[this.key]);
565
- }
566
- _getAllNodes() {
567
- const e = [], t = this.nodesMap;
568
- for (const o in t) De(t, o) && e.push(t[o]);
569
- return e;
570
- }
571
- updateChildren(e, t) {
572
- const o = this.nodesMap[e];
573
- if (!o) return;
574
- const s = o.childNodes;
575
- for (let n = s.length - 1; n >= 0; n--) {
576
- const a = s[n];
577
- this.remove(a.data);
578
- }
579
- for (let n = 0, a = t.length; n < a; n++) {
580
- const d = t[n];
581
- this.append(d, o.data);
582
- }
583
- }
584
- _setCheckedKeys(e, t = !1, o) {
585
- const s = this._getAllNodes().sort((l, v) => l.level - v.level), n = /* @__PURE__ */ Object.create(null), a = Object.keys(o);
586
- s.forEach((l) => l.setChecked(!1, !1));
587
- const d = (l) => {
588
- l.childNodes.forEach((v) => {
589
- var h;
590
- n[v.data[e]] = !0, (h = v.childNodes) != null && h.length && d(v);
591
- });
592
- };
593
- for (let l = 0, v = s.length; l < v; l++) {
594
- const h = s[l], u = h.data[e].toString();
595
- if (!a.includes(u)) {
596
- h.checked && !n[u] && h.setChecked(!1, !1);
597
- continue;
598
- }
599
- if (h.childNodes.length && d(h), h.isLeaf || this.checkStrictly) {
600
- h.setChecked(!0, !1);
601
- continue;
602
- }
603
- if (h.setChecked(!0, !0), t) {
604
- h.setChecked(!1, !1, !0);
605
- const r = function(c) {
606
- c.childNodes.forEach((f) => {
607
- f.isLeaf || f.setChecked(!1, !1, !0), r(f);
608
- }), c.reInitChecked();
609
- };
610
- r(h);
611
- }
612
- }
613
- }
614
- setCheckedNodes(e, t = !1) {
615
- const o = this.key, s = {};
616
- e.forEach((n) => {
617
- s[(n || {})[o]] = !0;
618
- }), this._setCheckedKeys(o, t, s);
619
- }
620
- setCheckedKeys(e, t = !1) {
621
- this.defaultCheckedKeys = e;
622
- const o = this.key, s = {};
623
- e.forEach((n) => {
624
- s[n] = !0;
625
- }), this._setCheckedKeys(o, t, s);
626
- }
627
- setDefaultExpandedKeys(e) {
628
- e = e || [], this.defaultExpandedKeys = e, e.forEach((t) => {
629
- const o = this.getNode(t);
630
- o && o.expand(null, this.autoExpandParent);
631
- });
632
- }
633
- setChecked(e, t, o) {
634
- const s = this.getNode(e);
635
- s && s.setChecked(!!t, o);
636
- }
637
- getCurrentNode() {
638
- return this.currentNode;
639
- }
640
- setCurrentNode(e) {
641
- const t = this.currentNode;
642
- t && (t.isCurrent = !1), this.currentNode = e, this.currentNode.isCurrent = !0;
643
- }
644
- setUserCurrentNode(e, t = !0) {
645
- var n;
646
- const o = e[this.key], s = this.nodesMap[o];
647
- this.setCurrentNode(s), t && this.currentNode && this.currentNode.level > 1 && ((n = this.currentNode.parent) == null || n.expand(null, !0));
648
- }
649
- setCurrentNodeKey(e, t = !0) {
650
- var s;
651
- if (this.currentNodeKey = e, je(e)) {
652
- this.currentNode && (this.currentNode.isCurrent = !1), this.currentNode = null;
653
- return;
654
- }
655
- const o = this.getNode(e);
656
- o && (this.setCurrentNode(o), t && this.currentNode && this.currentNode.level > 1 && ((s = this.currentNode.parent) == null || s.expand(null, !0)));
657
- }
658
- };
659
- function Xe(e) {
660
- const t = fe(ze, null);
661
- let o = {
662
- treeNodeExpand: (s) => {
663
- var n;
664
- e.node !== s && ((n = e.node) == null || n.collapse());
665
- },
666
- children: /* @__PURE__ */ new Set()
667
- };
668
- return t && t.children.add(o), Le(() => {
669
- t && t.children.delete(o), o = null;
670
- }), pe(ze, o), { broadcastExpanded: (s) => {
671
- if (e.accordion)
672
- for (const n of o.children) n.treeNodeExpand(s);
673
- } };
674
- }
675
- const Ze = Symbol("dragEvents");
676
- function Rt({ props: e, ctx: t, el$: o, dropIndicator$: s, store: n }) {
677
- const a = ae("tree"), d = w({
678
- showDropIndicator: !1,
679
- draggingNode: null,
680
- dropNode: null,
681
- allowDrop: !0,
682
- dropType: null
683
- });
684
- return pe(Ze, {
685
- treeNodeDragStart: ({ event: u, treeNode: r }) => {
686
- if (u.dataTransfer) {
687
- if (me(e.allowDrag) && !e.allowDrag(r.node))
688
- return u.preventDefault(), !1;
689
- u.dataTransfer.effectAllowed = "move";
690
- try {
691
- u.dataTransfer.setData("text/plain", "");
692
- } catch {
693
- }
694
- d.value.draggingNode = r, t.emit("node-drag-start", r.node, u);
695
- }
696
- },
697
- treeNodeDragOver: ({ event: u, treeNode: r }) => {
698
- if (!u.dataTransfer) return;
699
- const c = r, f = d.value.dropNode;
700
- f && f.node.id !== c.node.id && Ee(f.$el, a.is("drop-inner"));
701
- const b = d.value.draggingNode;
702
- if (!b || !c) return;
703
- let x = !0, k = !0, N = !0, O = !0;
704
- me(e.allowDrop) && (x = e.allowDrop(b.node, c.node, "prev"), O = k = e.allowDrop(b.node, c.node, "inner"), N = e.allowDrop(b.node, c.node, "next")), u.dataTransfer.dropEffect = k || x || N ? "move" : "none", (x || k || N) && (f == null ? void 0 : f.node.id) !== c.node.id && (f && t.emit("node-drag-leave", b.node, f.node, u), t.emit("node-drag-enter", b.node, c.node, u)), x || k || N ? d.value.dropNode = c : d.value.dropNode = null, c.node.nextSibling === b.node && (N = !1), c.node.previousSibling === b.node && (x = !1), c.node.contains(b.node, !1) && (k = !1), (b.node === c.node || b.node.contains(c.node)) && (x = !1, k = !1, N = !1);
705
- const $ = c.$el, V = $.querySelector(`.${a.be("node", "content")}`).getBoundingClientRect(), M = o.value.getBoundingClientRect(), H = o.value.scrollTop;
706
- let P;
707
- const U = x ? k ? 0.25 : N ? 0.45 : 1 : Number.NEGATIVE_INFINITY, y = N ? k ? 0.75 : x ? 0.55 : 0 : Number.POSITIVE_INFINITY;
708
- let _ = -9999;
709
- const S = u.clientY - V.top;
710
- S < V.height * U ? P = "before" : S > V.height * y ? P = "after" : k ? P = "inner" : P = "none";
711
- const L = $.querySelector(`.${a.be("node", "expand-icon")}`).getBoundingClientRect(), te = s.value;
712
- P === "before" ? _ = L.top - M.top + H : P === "after" && (_ = L.bottom - M.top + H), te.style.top = `${_}px`, te.style.left = `${L.right - M.left}px`, P === "inner" ? it($, a.is("drop-inner")) : Ee($, a.is("drop-inner")), d.value.showDropIndicator = P === "before" || P === "after", d.value.allowDrop = d.value.showDropIndicator || O, d.value.dropType = P, t.emit("node-drag-over", b.node, c.node, u);
713
- },
714
- treeNodeDragEnd: (u) => {
715
- var b, x;
716
- const { draggingNode: r, dropType: c, dropNode: f } = d.value;
717
- if (u.preventDefault(), u.dataTransfer && (u.dataTransfer.dropEffect = "move"), r != null && r.node.data && f) {
718
- const k = { data: r.node.data };
719
- c !== "none" && r.node.remove(), c === "before" ? (b = f.node.parent) == null || b.insertBefore(k, f.node) : c === "after" ? (x = f.node.parent) == null || x.insertAfter(k, f.node) : c === "inner" && f.node.insertChild(k), c !== "none" && (n.value.registerNode(k), n.value.key && r.node.eachNode((N) => {
720
- var O;
721
- (O = n.value.nodesMap[N.data[n.value.key]]) == null || O.setChecked(N.checked, !n.value.checkStrictly);
722
- })), Ee(f.$el, a.is("drop-inner")), t.emit("node-drag-end", r.node, f.node, c, u), c !== "none" && t.emit("node-drop", r.node, f.node, c, u);
723
- }
724
- r && !f && t.emit("node-drag-end", r.node, null, c, u), d.value.showDropIndicator = !1, d.value.draggingNode = null, d.value.dropNode = null, d.value.allowDrop = !0;
725
- }
726
- }), { dragState: d };
727
- }
728
- var qt = re({
729
- name: "ElTreeNodeContent",
730
- props: {
731
- node: {
732
- type: Object,
733
- required: !0
734
- },
735
- renderContent: Function
736
- },
737
- setup(e) {
738
- const t = ae("tree"), o = fe(Je), s = fe(Oe);
739
- return () => {
740
- const n = e.node, { data: a, store: d } = n;
741
- return e.renderContent ? e.renderContent(He, {
742
- _self: o,
743
- node: n,
744
- data: a,
745
- store: d
746
- }) : be(s.ctx.slots, "default", {
747
- node: n,
748
- data: a
749
- }, () => [He(jt, {
750
- tag: "span",
751
- truncated: !0,
752
- class: t.be("node", "label")
753
- }, () => [n.label])]);
754
- };
755
- }
756
- }), Vt = qt, Ut = re({
757
- name: "ElTreeNode",
758
- components: {
759
- ElCollapseTransition: Lt,
760
- ElCheckbox: ct,
761
- NodeContent: Vt,
762
- ElIcon: lt,
763
- Loading: Tt
764
- },
765
- props: {
766
- node: {
767
- type: Se,
768
- default: () => ({})
769
- },
770
- props: {
771
- type: Object,
772
- default: () => ({})
773
- },
774
- accordion: Boolean,
775
- renderContent: Function,
776
- renderAfterExpand: Boolean,
777
- showCheckbox: Boolean
778
- },
779
- emits: ["node-expand"],
780
- setup(e, t) {
781
- const o = ae("tree"), { broadcastExpanded: s } = Xe(e), n = fe(Oe), a = w(!1), d = w(!1), l = w(), v = w(), h = w(), u = fe(Ze), r = We();
782
- pe(Je, r), n || ut("Tree", "Can not find node's tree."), e.node.expanded && (a.value = !0, d.value = !0);
783
- const c = n.props.props.children || "children";
784
- F(() => {
785
- var _;
786
- const y = (_ = e.node.data) == null ? void 0 : _[c];
787
- return y && [...y];
788
- }, () => {
789
- e.node.updateChildren();
790
- }), F(() => e.node.indeterminate, (y) => {
791
- x(e.node.checked, y);
792
- }), F(() => e.node.checked, (y) => {
793
- x(y, e.node.indeterminate);
794
- }), F(() => e.node.childNodes.length, () => e.node.reInitChecked()), F(() => e.node.expanded, (y) => {
795
- he(() => a.value = y), y && (d.value = !0);
796
- });
797
- const f = (y) => n.props.nodeKey ? Pe(n.props.nodeKey, y.data) : y.id, b = (y) => {
798
- const _ = e.props.class;
799
- if (!_) return {};
800
- let S;
801
- if (me(_)) {
802
- const { data: L } = y;
803
- S = _(L, y);
804
- } else S = _;
805
- return qe(S) ? { [S]: !0 } : S;
806
- }, x = (y, _) => {
807
- (l.value !== y || v.value !== _) && n.ctx.emit("check-change", e.node.data, y, _), l.value = y, v.value = _;
808
- }, k = (y) => {
809
- Te(n.store, n.ctx.emit, () => {
810
- var _;
811
- if ((_ = n == null ? void 0 : n.props) != null && _.nodeKey) {
812
- const S = f(e.node);
813
- n.store.value.setCurrentNodeKey(S);
814
- } else n.store.value.setCurrentNode(e.node);
815
- }), n.currentNode.value = e.node, n.props.expandOnClickNode && O(), (n.props.checkOnClickNode || e.node.isLeaf && n.props.checkOnClickLeaf && e.showCheckbox) && !e.node.disabled && $(!e.node.checked), n.ctx.emit("node-click", e.node.data, e.node, r, y);
816
- }, N = (y) => {
817
- var _;
818
- (_ = n.instance.vnode.props) != null && _.onNodeContextmenu && (y.stopPropagation(), y.preventDefault()), n.ctx.emit("node-contextmenu", y, e.node.data, e.node, r);
819
- }, O = () => {
820
- e.node.isLeaf || (a.value ? (n.ctx.emit("node-collapse", e.node.data, e.node, r), e.node.collapse()) : e.node.expand(() => {
821
- t.emit("node-expand", e.node.data, e.node, r);
822
- }));
823
- }, $ = (y) => {
824
- const _ = n == null ? void 0 : n.props.checkStrictly, S = e.node.childNodes;
825
- !_ && S.length && (y = S.some((L) => !L.isEffectivelyChecked)), e.node.setChecked(y, !_), he(() => {
826
- const L = n.store.value;
827
- n.ctx.emit("check", e.node.data, {
828
- checkedNodes: L.getCheckedNodes(),
829
- checkedKeys: L.getCheckedKeys(),
830
- halfCheckedNodes: L.getHalfCheckedNodes(),
831
- halfCheckedKeys: L.getHalfCheckedKeys()
832
- });
833
- });
834
- };
835
- return {
836
- ns: o,
837
- node$: h,
838
- tree: n,
839
- expanded: a,
840
- childNodeRendered: d,
841
- oldChecked: l,
842
- oldIndeterminate: v,
843
- getNodeKey: f,
844
- getNodeClass: b,
845
- handleSelectChange: x,
846
- handleClick: k,
847
- handleContextMenu: N,
848
- handleExpandIconClick: O,
849
- handleCheckChange: $,
850
- handleChildNodeExpand: (y, _, S) => {
851
- s(_), n.ctx.emit("node-expand", y, _, S);
852
- },
853
- handleDragStart: (y) => {
854
- n.props.draggable && u.treeNodeDragStart({
855
- event: y,
856
- treeNode: e
857
- });
858
- },
859
- handleDragOver: (y) => {
860
- y.preventDefault(), n.props.draggable && u.treeNodeDragOver({
861
- event: y,
862
- treeNode: {
863
- $el: h.value,
864
- node: e.node
865
- }
866
- });
867
- },
868
- handleDrop: (y) => {
869
- y.preventDefault();
870
- },
871
- handleDragEnd: (y) => {
872
- n.props.draggable && u.treeNodeDragEnd(y);
873
- },
874
- CaretRight: It
875
- };
876
- }
877
- });
878
- const Yt = [
879
- "aria-expanded",
880
- "aria-disabled",
881
- "aria-checked",
882
- "draggable",
883
- "data-key"
884
- ], Wt = ["aria-expanded"];
885
- function Jt(e, t, o, s, n, a) {
886
- const d = oe("el-icon"), l = oe("el-checkbox"), v = oe("loading"), h = oe("node-content"), u = oe("el-tree-node"), r = oe("el-collapse-transition");
887
- return G((I(), j("div", {
888
- ref: "node$",
889
- class: R([
890
- e.ns.b("node"),
891
- e.ns.is("expanded", e.expanded),
892
- e.ns.is("current", e.node.isCurrent),
893
- e.ns.is("hidden", !e.node.visible),
894
- e.ns.is("focusable", !e.node.disabled),
895
- e.ns.is("checked", !e.node.disabled && e.node.checked),
896
- e.getNodeClass(e.node)
897
- ]),
898
- role: "treeitem",
899
- tabindex: "-1",
900
- "aria-expanded": e.expanded,
901
- "aria-disabled": e.node.disabled,
902
- "aria-checked": e.node.checked,
903
- draggable: e.tree.props.draggable,
904
- "data-key": e.getNodeKey(e.node),
905
- onClick: t[2] || (t[2] = ee((...c) => e.handleClick && e.handleClick(...c), ["stop"])),
906
- onContextmenu: t[3] || (t[3] = (...c) => e.handleContextMenu && e.handleContextMenu(...c)),
907
- onDragstart: t[4] || (t[4] = ee((...c) => e.handleDragStart && e.handleDragStart(...c), ["stop"])),
908
- onDragover: t[5] || (t[5] = ee((...c) => e.handleDragOver && e.handleDragOver(...c), ["stop"])),
909
- onDragend: t[6] || (t[6] = ee((...c) => e.handleDragEnd && e.handleDragEnd(...c), ["stop"])),
910
- onDrop: t[7] || (t[7] = ee((...c) => e.handleDrop && e.handleDrop(...c), ["stop"]))
911
- }, [D("div", {
912
- class: R(e.ns.be("node", "content")),
913
- style: Ye({ paddingLeft: (e.node.level - 1) * e.tree.props.indent + "px" })
914
- }, [
915
- e.tree.props.icon || e.CaretRight ? (I(), Y(d, {
916
- key: 0,
917
- class: R([
918
- e.ns.be("node", "expand-icon"),
919
- e.ns.is("leaf", e.node.isLeaf),
920
- { expanded: !e.node.isLeaf && e.expanded }
921
- ]),
922
- onClick: ee(e.handleExpandIconClick, ["stop"])
923
- }, {
924
- default: A(() => [(I(), Y(Ue(e.tree.props.icon || e.CaretRight)))]),
925
- _: 1
926
- }, 8, ["class", "onClick"])) : ie("v-if", !0),
927
- e.showCheckbox ? (I(), Y(l, {
928
- key: 1,
929
- "model-value": e.node.checked,
930
- indeterminate: e.node.indeterminate,
931
- disabled: !!e.node.disabled,
932
- onClick: t[0] || (t[0] = ee(() => {
933
- }, ["stop"])),
934
- onChange: e.handleCheckChange
935
- }, null, 8, [
936
- "model-value",
937
- "indeterminate",
938
- "disabled",
939
- "onChange"
940
- ])) : ie("v-if", !0),
941
- e.node.loading ? (I(), Y(d, {
942
- key: 2,
943
- class: R([e.ns.be("node", "loading-icon"), e.ns.is("loading")])
944
- }, {
945
- default: A(() => [B(v)]),
946
- _: 1
947
- }, 8, ["class"])) : ie("v-if", !0),
948
- B(h, {
949
- node: e.node,
950
- "render-content": e.renderContent
951
- }, null, 8, ["node", "render-content"])
952
- ], 6), B(r, null, {
953
- default: A(() => [!e.renderAfterExpand || e.childNodeRendered ? G((I(), j("div", {
954
- key: 0,
955
- class: R(e.ns.be("node", "children")),
956
- role: "group",
957
- "aria-expanded": e.expanded,
958
- onClick: t[1] || (t[1] = ee(() => {
959
- }, ["stop"]))
960
- }, [(I(!0), j(ce, null, ue(e.node.childNodes, (c) => (I(), Y(u, {
961
- key: e.getNodeKey(c),
962
- "render-content": e.renderContent,
963
- "render-after-expand": e.renderAfterExpand,
964
- "show-checkbox": e.showCheckbox,
965
- node: c,
966
- accordion: e.accordion,
967
- props: e.props,
968
- onNodeExpand: e.handleChildNodeExpand
969
- }, null, 8, [
970
- "render-content",
971
- "render-after-expand",
972
- "show-checkbox",
973
- "node",
974
- "accordion",
975
- "props",
976
- "onNodeExpand"
977
- ]))), 128))], 10, Wt)), [[Q, e.expanded]]) : ie("v-if", !0)]),
978
- _: 1
979
- })], 42, Yt)), [[Q, e.node.visible]]);
980
- }
981
- var Gt = /* @__PURE__ */ Ve(Ut, [["render", Jt]]);
982
- function Qt({ el$: e }, t) {
983
- const o = ae("tree");
984
- Ae(() => {
985
- a();
986
- }), Kt(() => {
987
- var d;
988
- (d = e.value) == null || d.querySelectorAll("input[type=checkbox]").forEach((l) => {
989
- l.setAttribute("tabindex", "-1");
990
- });
991
- });
992
- function s(d, l) {
993
- var h, u;
994
- const v = t.value.getNode(d[l].dataset.key);
995
- return v.canFocus && v.visible && (((h = v.parent) == null ? void 0 : h.expanded) || ((u = v.parent) == null ? void 0 : u.level) === 0);
996
- }
997
- ht(e, "keydown", (d) => {
998
- const l = d.target;
999
- if (!l.className.includes(o.b("node"))) return;
1000
- const v = ft(d), h = Array.from(e.value.querySelectorAll(`.${o.is("focusable")}[role=treeitem]`)), u = h.indexOf(l);
1001
- let r;
1002
- if ([Z.up, Z.down].includes(v)) {
1003
- if (d.preventDefault(), v === Z.up) {
1004
- r = u === -1 ? 0 : u !== 0 ? u - 1 : h.length - 1;
1005
- const f = r;
1006
- for (; !s(h, r); ) {
1007
- if (r--, r === f) {
1008
- r = -1;
1009
- break;
1010
- }
1011
- r < 0 && (r = h.length - 1);
1012
- }
1013
- } else {
1014
- r = u === -1 ? 0 : u < h.length - 1 ? u + 1 : 0;
1015
- const f = r;
1016
- for (; !s(h, r); ) {
1017
- if (r++, r === f) {
1018
- r = -1;
1019
- break;
1020
- }
1021
- r >= h.length && (r = 0);
1022
- }
1023
- }
1024
- r !== -1 && h[r].focus();
1025
- }
1026
- [Z.left, Z.right].includes(v) && (d.preventDefault(), l.click());
1027
- const c = l.querySelector('[type="checkbox"]');
1028
- [
1029
- Z.enter,
1030
- Z.numpadEnter,
1031
- Z.space
1032
- ].includes(v) && c && (d.preventDefault(), c.click());
1033
- });
1034
- const a = () => {
1035
- var v;
1036
- if (!e.value) return;
1037
- const d = Array.from(e.value.querySelectorAll(`.${o.is("focusable")}[role=treeitem]`));
1038
- Array.from(e.value.querySelectorAll("input[type=checkbox]")).forEach((h) => {
1039
- h.setAttribute("tabindex", "-1");
1040
- });
1041
- const l = e.value.querySelectorAll(`.${o.is("checked")}[role=treeitem]`);
1042
- if (l.length) {
1043
- l[0].setAttribute("tabindex", "0");
1044
- return;
1045
- }
1046
- (v = d[0]) == null || v.setAttribute("tabindex", "0");
1047
- };
1048
- }
1049
- var Xt = re({
1050
- name: "ElTree",
1051
- components: { ElTreeNode: Gt },
1052
- props: Mt,
1053
- emits: Ht,
1054
- setup(e, t) {
1055
- const { t: o } = pt(), s = ae("tree"), n = w(new Ft({
1056
- key: e.nodeKey,
1057
- data: e.data,
1058
- lazy: e.lazy,
1059
- props: e.props,
1060
- load: e.load,
1061
- currentNodeKey: e.currentNodeKey,
1062
- checkStrictly: e.checkStrictly,
1063
- checkDescendants: e.checkDescendants,
1064
- defaultCheckedKeys: e.defaultCheckedKeys,
1065
- defaultExpandedKeys: e.defaultExpandedKeys,
1066
- autoExpandParent: e.autoExpandParent,
1067
- defaultExpandAll: e.defaultExpandAll,
1068
- filterNodeMethod: e.filterNodeMethod
1069
- }));
1070
- n.value.initialize();
1071
- const a = w(n.value.root), d = w(null), l = w(null), v = w(null), { broadcastExpanded: h } = Xe(e), { dragState: u } = Rt({
1072
- props: e,
1073
- ctx: t,
1074
- el$: l,
1075
- dropIndicator$: v,
1076
- store: n
1077
- });
1078
- Qt({ el$: l }, n);
1079
- const r = We(), c = Ke(() => {
1080
- let i = r == null ? void 0 : r.parent;
1081
- for (; i; ) {
1082
- if (i.type.name === "ElTreeSelect") return !0;
1083
- i = i.parent;
1084
- }
1085
- return !1;
1086
- }), f = Ke(() => {
1087
- const { childNodes: i } = a.value;
1088
- return (!i || i.length === 0 || i.every(({ visible: C }) => !C)) && !c.value;
1089
- });
1090
- F(() => e.currentNodeKey, (i) => {
1091
- n.value.setCurrentNodeKey(i ?? null);
1092
- }), F(() => e.defaultCheckedKeys, (i, C) => {
1093
- yt(i, C) || n.value.setDefaultCheckedKey(i ?? []);
1094
- }), F(() => e.defaultExpandedKeys, (i) => {
1095
- n.value.setDefaultExpandedKeys(i ?? []);
1096
- }), F(() => e.data, (i) => {
1097
- n.value.setData(i);
1098
- }, { deep: !0 }), F(() => e.checkStrictly, (i) => {
1099
- n.value.checkStrictly = i;
1100
- });
1101
- const b = (i) => {
1102
- if (!e.filterNodeMethod) throw new Error("[Tree] filterNodeMethod is required when filter");
1103
- n.value.filter(i);
1104
- }, x = (i) => e.nodeKey ? Pe(e.nodeKey, i.data) : i.id, k = (i) => {
1105
- if (!e.nodeKey) throw new Error(`[Tree] nodeKey is required in ${i}`);
1106
- }, N = (i) => {
1107
- k("getNodePath");
1108
- const C = n.value.getNode(i);
1109
- if (!C) return [];
1110
- const K = [C.data];
1111
- let z = C.parent;
1112
- for (; z && z !== a.value; )
1113
- K.push(z.data), z = z.parent;
1114
- return K.reverse();
1115
- }, O = (i, C) => n.value.getCheckedNodes(i, C), $ = (i) => n.value.getCheckedKeys(i), V = () => {
1116
- const i = n.value.getCurrentNode();
1117
- return i ? i.data : null;
1118
- }, M = () => {
1119
- k("getCurrentKey");
1120
- const i = V();
1121
- return i ? i[e.nodeKey] : null;
1122
- }, H = (i, C) => {
1123
- k("setCheckedNodes"), n.value.setCheckedNodes(i, C);
1124
- }, P = (i, C) => {
1125
- k("setCheckedKeys"), n.value.setCheckedKeys(i, C);
1126
- }, U = (i, C, K = !1) => {
1127
- n.value.setChecked(i, C, K);
1128
- }, y = () => n.value.getHalfCheckedNodes(), _ = () => n.value.getHalfCheckedKeys(), S = (i, C = !0) => {
1129
- k("setCurrentNode"), Te(n, t.emit, () => {
1130
- h(i), n.value.setUserCurrentNode(i, C);
1131
- });
1132
- }, L = (i = null, C = !0) => {
1133
- k("setCurrentKey"), Te(n, t.emit, () => {
1134
- h(), n.value.setCurrentNodeKey(i, C);
1135
- });
1136
- }, te = (i) => n.value.getNode(i), W = (i) => {
1137
- n.value.remove(i);
1138
- }, J = (i, C) => {
1139
- n.value.append(i, C);
1140
- }, de = (i, C) => {
1141
- n.value.insertBefore(i, C);
1142
- }, p = (i, C) => {
1143
- n.value.insertAfter(i, C);
1144
- }, g = (i, C, K) => {
1145
- h(C), t.emit("node-expand", i, C, K);
1146
- }, E = (i, C) => {
1147
- k("updateKeyChildren"), n.value.updateChildren(i, C);
1148
- };
1149
- return pe(Oe, {
1150
- ctx: t,
1151
- props: e,
1152
- store: n,
1153
- root: a,
1154
- currentNode: d,
1155
- instance: r
1156
- }), pe(vt, void 0), {
1157
- ns: s,
1158
- store: n,
1159
- root: a,
1160
- currentNode: d,
1161
- dragState: u,
1162
- el$: l,
1163
- dropIndicator$: v,
1164
- isEmpty: f,
1165
- filter: b,
1166
- getNodeKey: x,
1167
- getNodePath: N,
1168
- getCheckedNodes: O,
1169
- getCheckedKeys: $,
1170
- getCurrentNode: V,
1171
- getCurrentKey: M,
1172
- setCheckedNodes: H,
1173
- setCheckedKeys: P,
1174
- setChecked: U,
1175
- getHalfCheckedNodes: y,
1176
- getHalfCheckedKeys: _,
1177
- setCurrentNode: S,
1178
- setCurrentKey: L,
1179
- t: o,
1180
- getNode: te,
1181
- remove: W,
1182
- append: J,
1183
- insertBefore: de,
1184
- insertAfter: p,
1185
- handleNodeExpand: g,
1186
- updateKeyChildren: E
1187
- };
1188
- }
1189
- });
1190
- function Zt(e, t, o, s, n, a) {
1191
- const d = oe("el-tree-node");
1192
- return I(), j("div", {
1193
- ref: "el$",
1194
- class: R([
1195
- e.ns.b(),
1196
- e.ns.is("dragging", !!e.dragState.draggingNode),
1197
- e.ns.is("drop-not-allow", !e.dragState.allowDrop),
1198
- e.ns.is("drop-inner", e.dragState.dropType === "inner"),
1199
- { [e.ns.m("highlight-current")]: e.highlightCurrent }
1200
- ]),
1201
- role: "tree"
1202
- }, [
1203
- (I(!0), j(ce, null, ue(e.root.childNodes, (l) => (I(), Y(d, {
1204
- key: e.getNodeKey(l),
1205
- node: l,
1206
- props: e.props,
1207
- accordion: e.accordion,
1208
- "render-after-expand": e.renderAfterExpand,
1209
- "show-checkbox": e.showCheckbox,
1210
- "render-content": e.renderContent,
1211
- onNodeExpand: e.handleNodeExpand
1212
- }, null, 8, [
1213
- "node",
1214
- "props",
1215
- "accordion",
1216
- "render-after-expand",
1217
- "show-checkbox",
1218
- "render-content",
1219
- "onNodeExpand"
1220
- ]))), 128)),
1221
- e.isEmpty ? (I(), j("div", {
1222
- key: 0,
1223
- class: R(e.ns.e("empty-block"))
1224
- }, [be(e.$slots, "empty", {}, () => [D("span", { class: R(e.ns.e("empty-text")) }, q(e.emptyText ?? e.t("el.tree.emptyText")), 3)])], 2)) : ie("v-if", !0),
1225
- G(D("div", {
1226
- ref: "dropIndicator$",
1227
- class: R(e.ns.e("drop-indicator"))
1228
- }, null, 2), [[Q, e.dragState.showDropIndicator]])
1229
- ], 2);
1230
- }
1231
- var en = /* @__PURE__ */ Ve(Xt, [["render", Zt]]);
1232
- const tn = Be(en), nn = {
1233
- key: 0,
1234
- class: "panel_content"
1235
- }, on = { class: "types" }, sn = ["onClick"], an = { class: "tree" }, rn = {
1236
- key: 1,
1237
- class: "panel_content_null"
1238
- }, dn = { class: "pc_tree_type_button" }, ln = ["onClick"], cn = { class: "pc_tree_content" }, un = { class: "tree-search-box" }, hn = { class: "tree-wrapper" }, fn = ["id"], pn = { class: "tree-wrapper" }, yn = ["id"], vn = { class: "tree-wrapper" }, gn = ["id"], kn = {
1239
- key: 2,
1240
- class: "operate-tree-box"
1241
- }, Nn = { class: "operate-tree" }, Cn = { class: "tree-title-box" }, mn = { class: "tree-title" }, bn = { class: "tree-title-icon" }, _n = { class: "tree-category-box" }, En = { class: "tree-category-list" }, xn = ["onClick"], Dn = { class: "tree-search-box" }, wn = { class: "tree-content" }, Kn = { class: "tree-wrapper" }, Tn = ["id"], In = { class: "tree-wrapper" }, Sn = ["id"], Bn = { class: "tree-wrapper" }, An = ["id"], Ln = /* @__PURE__ */ re({
1242
- __name: "StructureTree",
1243
- props: ["componentId"],
1244
- emits: ["closePanel", "emitHandler"],
1245
- setup(e, { emit: t }) {
1246
- const o = gt(), s = kt(), n = e, a = w(!1), d = w(!1), l = w(), v = w(), h = w(), u = w(), r = w(0), c = w(), f = w(), b = w(), x = w(), k = w();
1247
- let N;
1248
- const O = w(""), $ = w(""), V = w("");
1249
- F(
1250
- () => s.isToolActive(n.componentId),
1251
- (p) => {
1252
- if (a.value && p) {
1253
- if (d.value || L(ke[0]), $.value == V.value || $.value == "")
1254
- return;
1255
- S($.value);
1256
- }
1257
- }
1258
- ), F(O, (p) => {
1259
- var g, E, i;
1260
- r.value === 0 ? (g = l.value) == null || g.filter(p) : r.value === 1 ? (E = v.value) == null || E.filter(p) : r.value === 2 && ((i = h.value) == null || i.filter(p));
1261
- });
1262
- const M = (p, g) => p ? g.title.includes(O.value) : !0, H = {
1263
- children: "children",
1264
- label: "title",
1265
- value: "nodeId"
1266
- }, P = t, U = (p) => {
1267
- P("emitHandler", p);
1268
- }, y = w(!1);
1269
- Ae(() => {
1270
- ne("userInfo").isInShare && ne("userInfo").isShareClient && (y.value = !0), s.setReadyById(n.componentId);
1271
- });
1272
- const _ = () => {
1273
- d.value = !1, N = window.bimViewer;
1274
- const { eventTrigger: p } = N;
1275
- p.on("treeAllReady", (g) => {
1276
- a.value = !0, u.value = g, console.log("初始化结构树数据", u.value), N.SetShowSpaceModeActive(!1);
1277
- }), ne("isMobile") || p.on("pickedEntity", (g) => {
1278
- d.value && ($.value = g.id, s.isToolActive(n.componentId) && S(g.id));
1279
- }), ne("isMobile") && (p.on("touchEntity", (g) => {
1280
- d.value !== !1 && ($.value = g.id, s.isToolActive(n.componentId) && S(g.id));
1281
- }), p.on("touchNothing", () => {
1282
- he(() => {
1283
- k.value = "";
1284
- }), U({
1285
- isTool: !0,
1286
- event_target: "StructureTree",
1287
- event_name: "touchNothing",
1288
- content: {
1289
- msg: "pickedNothing"
1290
- }
1291
- });
1292
- }));
1293
- };
1294
- ge.on("BimViewer", _), Le(() => {
1295
- ge.off("BimViewer", _);
1296
- });
1297
- const S = (p) => {
1298
- let g, E;
1299
- r.value === 0 ? g = N.objectsExplorer.objectList[p] ? N.objectsExplorer.objectList[p] : null : r.value === 1 ? g = N.classesExplorer.objectList[p] ? N.classesExplorer.objectList[p] : null : r.value === 2 && (g = N.storeysExplorer.objectList[p] ? N.storeysExplorer.objectList[p] : null), g && (k.value = g.nodeId, r.value === 0 ? (l.value.setCurrentKey(g.nodeId, !0), E = document.getElementById(g.nodeId + "0")) : r.value === 1 ? (v.value.setCurrentKey(g.nodeId, !0), E = document.getElementById(g.nodeId + "1")) : r.value === 2 && (h.value.setCurrentKey(g.nodeId, !0), E = document.getElementById(g.nodeId + "2")), setTimeout(() => {
1300
- E && he(() => {
1301
- E.scrollIntoView({ block: "center" });
1302
- });
1303
- }, 200), V.value = p, U({
1304
- isTool: !0,
1305
- event_target: "StructureTree",
1306
- event_name: "pickedEntity",
1307
- content: {
1308
- entityId: p,
1309
- viewer_nodeId: g.nodeId
1310
- }
1311
- }));
1312
- }, L = (p) => {
1313
- if (u.value) {
1314
- if (p.id == 0) {
1315
- if (!f.value) {
1316
- if (f.value = u.value.objectsData ? u.value.objectsData : [], f.value[0]) {
1317
- f.value[0].title = o("structure.all");
1318
- const g = f.value.map((E) => E.nodeId);
1319
- l.value.setCheckedKeys(g);
1320
- }
1321
- d.value = !0;
1322
- }
1323
- } else if (p.id == 1) {
1324
- if (!x.value && (b.value = u.value.classesData ? u.value.classesData : [], b.value[0])) {
1325
- b.value[0].title = o("structure.all");
1326
- const g = b.value.map((E) => E.nodeId);
1327
- v.value.setCheckedKeys(g);
1328
- }
1329
- } else if (p.id == 2 && !x.value && (x.value = u.value.storeysData ? u.value.storeysData : [], x.value[0])) {
1330
- x.value[0].title = o("structure.all");
1331
- const g = x.value.map((E) => E.nodeId);
1332
- h.value.setCheckedKeys(g);
1333
- }
1334
- U({
1335
- isTool: !0,
1336
- event_target: "StructureTree",
1337
- event_name: "changeTreeStructure",
1338
- content: {
1339
- item: p
1340
- }
1341
- }), r.value !== p.id && (r.value = p.id);
1342
- }
1343
- };
1344
- let te = [];
1345
- const W = (p, g) => {
1346
- te.includes(p.nodeId) ? p.checked = !0 : p.checked = !p.checked;
1347
- const E = N.viewer.scene.objects[p.objectId];
1348
- E ? N.setEntityVisible(E, p.checked) : i(p, p.checked), C(p, p.checked), U({
1349
- isTool: !0,
1350
- event_target: "StructureTree",
1351
- event_name: "clickTreeBox",
1352
- content: {
1353
- active_tree: r.value,
1354
- nodeId: p.nodeId,
1355
- status: p.checked
1356
- }
1357
- });
1358
- function i(K, z) {
1359
- if (K.checked = z, K.children.length == 0) {
1360
- const X = N.viewer.scene.objects[K.objectId];
1361
- X && N.setEntityVisible(X, K.checked);
1362
- } else
1363
- for (let X = 0; X < K.children.length; X++)
1364
- i(K.children[X], z);
1365
- }
1366
- function C(K, z) {
1367
- K.checked = z, K.parent && C(K.parent, z);
1368
- }
1369
- te = g.halfCheckedKeys;
1370
- }, J = (p, g) => {
1371
- const E = N.viewer.scene.objects[p.objectId];
1372
- E && (N.setAllObjectsSelected(!1), N.setEntitySelected(E), N.viewFitEntity(E)), ge.emit("tree_clickNode", E), U({
1373
- isTool: !0,
1374
- event_target: "StructureTree",
1375
- event_name: "clickTreeNode",
1376
- content: {
1377
- active_tree: r.value,
1378
- objectId: p.objectId
1379
- }
1380
- });
1381
- }, de = () => {
1382
- ge.emit("hideToolbar", !1), P("closePanel");
1383
- };
1384
- return (p, g) => {
1385
- const E = tn, i = St, C = Nt, K = Ct, z = _t, X = mt;
1386
- return !T(ne)("isMobile") && T(Me).currentTheme == "blue" ? (I(), Y(i, {
1387
- key: 0,
1388
- class: "web_tree_container",
1389
- width: 268,
1390
- panelTitle: T(o)("structure.title"),
1391
- "click-handle": de
1392
- }, {
1393
- default: A(() => [
1394
- d.value ? (I(), j("div", nn, [
1395
- D("div", on, [
1396
- (I(!0), j(ce, null, ue(T(ke), (m) => (I(), j("div", {
1397
- key: m.id,
1398
- class: R(["types-item", { "types-item-active": r.value === m.id }]),
1399
- onClick: (_e) => L(m)
1400
- }, q(T(o)(m.name)), 11, sn))), 128))
1401
- ]),
1402
- D("div", an, [
1403
- B(E, {
1404
- ref: "tree",
1405
- height: 700,
1406
- "node-key": "nodeId",
1407
- data: c.value,
1408
- "current-node-key": k.value,
1409
- "highlight-current": !0,
1410
- props: H,
1411
- "show-checkbox": "",
1412
- onCheck: W,
1413
- onNodeClick: J,
1414
- "empty-text": T(o)("common.noData")
1415
- }, null, 8, ["data", "current-node-key", "empty-text"])
1416
- ])
1417
- ])) : (I(), j("div", rn, [
1418
- D("span", null, q(T(o)("common.loading")), 1)
1419
- ]))
1420
- ]),
1421
- _: 1
1422
- }, 8, ["panelTitle"])) : !T(ne)("isMobile") && T(Me).currentTheme == "light-gray" ? (I(), Y(z, {
1423
- key: 1,
1424
- class: "pc_structure_container",
1425
- width: 286,
1426
- panelTitle: T(o)("structure.title"),
1427
- "click-handle": de,
1428
- pos: T(ne)("treePos"),
1429
- setWidth: ""
1430
- }, {
1431
- default: A(() => [
1432
- D("div", dn, [
1433
- (I(!0), j(ce, null, ue(T(ke), (m) => (I(), j("div", {
1434
- key: m.id,
1435
- class: R(["type_button", { type_button_active: r.value === m.id }]),
1436
- onClick: (_e) => L(m)
1437
- }, q(T(o)(m.name)), 11, ln))), 128))
1438
- ]),
1439
- D("div", cn, [
1440
- D("div", un, [
1441
- B(C, {
1442
- modelValue: O.value,
1443
- "onUpdate:modelValue": g[0] || (g[0] = (m) => O.value = m),
1444
- placeholder: T(o)("structure.search"),
1445
- "prefix-icon": "Search",
1446
- clearable: ""
1447
- }, null, 8, ["modelValue", "placeholder"])
1448
- ]),
1449
- G(D("div", hn, [
1450
- B(K, null, {
1451
- default: A(() => [
1452
- B(E, {
1453
- ref_key: "tree0",
1454
- ref: l,
1455
- "node-key": "nodeId",
1456
- data: f.value,
1457
- "current-node-key": k.value,
1458
- "highlight-current": !0,
1459
- props: H,
1460
- "filter-node-method": M,
1461
- "show-checkbox": "",
1462
- onCheck: W,
1463
- onNodeClick: J,
1464
- "empty-text": T(o)("common.noData")
1465
- }, {
1466
- default: A(({ node: m }) => [
1467
- D("span", {
1468
- id: m.key + "0",
1469
- class: "tree_node_text"
1470
- }, q(m.data.title), 9, fn)
1471
- ]),
1472
- _: 1
1473
- }, 8, ["data", "current-node-key", "empty-text"])
1474
- ]),
1475
- _: 1
1476
- })
1477
- ], 512), [
1478
- [Q, r.value == 0]
1479
- ]),
1480
- G(D("div", pn, [
1481
- B(K, null, {
1482
- default: A(() => [
1483
- B(E, {
1484
- ref_key: "tree1",
1485
- ref: v,
1486
- "node-key": "nodeId",
1487
- data: b.value,
1488
- "current-node-key": k.value,
1489
- "highlight-current": !0,
1490
- props: H,
1491
- "filter-node-method": M,
1492
- "show-checkbox": "",
1493
- onCheck: W,
1494
- onNodeClick: J,
1495
- "empty-text": T(o)("common.noData")
1496
- }, {
1497
- default: A(({ node: m }) => [
1498
- D("span", {
1499
- id: m.key + "1",
1500
- class: "tree_node_text"
1501
- }, q(m.data.title), 9, yn)
1502
- ]),
1503
- _: 1
1504
- }, 8, ["data", "current-node-key", "empty-text"])
1505
- ]),
1506
- _: 1
1507
- })
1508
- ], 512), [
1509
- [Q, r.value == 1]
1510
- ]),
1511
- G(D("div", vn, [
1512
- B(K, null, {
1513
- default: A(() => [
1514
- B(E, {
1515
- ref_key: "tree2",
1516
- ref: h,
1517
- "node-key": "nodeId",
1518
- data: x.value,
1519
- "current-node-key": k.value,
1520
- "highlight-current": !0,
1521
- props: H,
1522
- "filter-node-method": M,
1523
- "show-checkbox": "",
1524
- onCheck: W,
1525
- onNodeClick: J,
1526
- "empty-text": T(o)("common.noData")
1527
- }, {
1528
- default: A(({ node: m }) => [
1529
- D("span", {
1530
- id: m.key + "2",
1531
- class: "tree_node_text"
1532
- }, q(m.data.title), 9, gn)
1533
- ]),
1534
- _: 1
1535
- }, 8, ["data", "current-node-key", "empty-text"])
1536
- ]),
1537
- _: 1
1538
- })
1539
- ], 512), [
1540
- [Q, r.value == 2]
1541
- ])
1542
- ])
1543
- ]),
1544
- _: 1
1545
- }, 8, ["panelTitle", "pos"])) : (I(), j("div", kn, [
1546
- D("div", Nn, [
1547
- D("div", Cn, [
1548
- D("div", mn, q(T(o)("structure.title")), 1),
1549
- D("div", bn, [
1550
- B(X, {
1551
- class: "close",
1552
- width: 0.4,
1553
- "size-type": "rem",
1554
- "click-handle": de
1555
- })
1556
- ])
1557
- ]),
1558
- D("div", _n, [
1559
- B(K, null, {
1560
- default: A(() => [
1561
- D("div", En, [
1562
- (I(!0), j(ce, null, ue(T(ke), (m, _e) => (I(), j("div", {
1563
- key: _e,
1564
- class: R(["tree-category-item", {
1565
- "tree-category-item-active": m.id === r.value
1566
- }]),
1567
- onClick: (On) => L(m)
1568
- }, q(T(o)(m.name)), 11, xn))), 128))
1569
- ])
1570
- ]),
1571
- _: 1
1572
- })
1573
- ]),
1574
- D("div", Dn, [
1575
- B(C, {
1576
- modelValue: O.value,
1577
- "onUpdate:modelValue": g[1] || (g[1] = (m) => O.value = m),
1578
- placeholder: T(o)("structure.search"),
1579
- "prefix-icon": "Search",
1580
- clearable: ""
1581
- }, null, 8, ["modelValue", "placeholder"])
1582
- ]),
1583
- D("div", wn, [
1584
- G(D("div", Kn, [
1585
- B(K, null, {
1586
- default: A(() => [
1587
- B(E, {
1588
- ref_key: "tree0",
1589
- ref: l,
1590
- "node-key": "nodeId",
1591
- data: f.value,
1592
- "current-node-key": k.value,
1593
- "highlight-current": !0,
1594
- props: H,
1595
- "filter-node-method": M,
1596
- "show-checkbox": "",
1597
- onCheck: W,
1598
- onNodeClick: J,
1599
- "empty-text": T(o)("common.noData")
1600
- }, {
1601
- default: A(({ node: m }) => [
1602
- D("span", {
1603
- id: m.key + "0",
1604
- class: "tree_node_text"
1605
- }, q(m.data.title), 9, Tn)
1606
- ]),
1607
- _: 1
1608
- }, 8, ["data", "current-node-key", "empty-text"])
1609
- ]),
1610
- _: 1
1611
- })
1612
- ], 512), [
1613
- [Q, r.value == 0]
1614
- ]),
1615
- G(D("div", In, [
1616
- B(K, null, {
1617
- default: A(() => [
1618
- B(E, {
1619
- ref_key: "tree1",
1620
- ref: v,
1621
- "node-key": "nodeId",
1622
- data: b.value,
1623
- "current-node-key": k.value,
1624
- "highlight-current": !0,
1625
- props: H,
1626
- "filter-node-method": M,
1627
- "show-checkbox": "",
1628
- onCheck: W,
1629
- onNodeClick: J,
1630
- "empty-text": T(o)("common.noData")
1631
- }, {
1632
- default: A(({ node: m }) => [
1633
- D("span", {
1634
- id: m.key + "1",
1635
- class: "tree_node_text"
1636
- }, q(m.data.title), 9, Sn)
1637
- ]),
1638
- _: 1
1639
- }, 8, ["data", "current-node-key", "empty-text"])
1640
- ]),
1641
- _: 1
1642
- })
1643
- ], 512), [
1644
- [Q, r.value == 1]
1645
- ]),
1646
- G(D("div", Bn, [
1647
- B(K, null, {
1648
- default: A(() => [
1649
- B(E, {
1650
- ref_key: "tree2",
1651
- ref: h,
1652
- "node-key": "nodeId",
1653
- data: x.value,
1654
- "current-node-key": k.value,
1655
- "highlight-current": !0,
1656
- props: H,
1657
- "filter-node-method": M,
1658
- "show-checkbox": "",
1659
- onCheck: W,
1660
- onNodeClick: J,
1661
- "empty-text": T(o)("common.noData")
1662
- }, {
1663
- default: A(({ node: m }) => [
1664
- D("span", {
1665
- id: m.key + "2",
1666
- class: "tree_node_text"
1667
- }, q(m.data.title), 9, An)
1668
- ]),
1669
- _: 1
1670
- }, 8, ["data", "current-node-key", "empty-text"])
1671
- ]),
1672
- _: 1
1673
- })
1674
- ], 512), [
1675
- [Q, r.value == 2]
1676
- ])
1677
- ])
1678
- ])
1679
- ]));
1680
- };
1681
- }
1682
- }), zn = /* @__PURE__ */ bt(Ln, [["__scopeId", "data-v-6683aea8"]]);
1683
- export {
1684
- zn as default
1685
- };