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