@xtctwins/tctwins-bimx-engine 0.1.21 → 0.1.23

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 (38) hide show
  1. package/dist/{AnnotationTool-BvFG1vTX.mjs → AnnotationTool-DojqlWub.mjs} +12 -12
  2. package/dist/BIMX_Viewer_Lib.es.js +4 -4
  3. package/dist/BIMX_Viewer_Lib.umd.js +89 -94
  4. package/dist/CommentTool-CR9lVrzW.mjs +338 -0
  5. package/dist/HiddenTool-Wi-kOd2H.mjs +58 -0
  6. package/dist/InspectorTool-DIayiHOO.mjs +625 -0
  7. package/dist/MeasureTool-CHZ67WhG.mjs +1540 -0
  8. package/dist/{NavigateTool-CCIb1X4u.mjs → NavigateTool-CQoj_On8.mjs} +7 -7
  9. package/dist/{RoamTool-B1w0efz8.mjs → RoamTool-C3CV1E9g.mjs} +20 -20
  10. package/dist/{ScreenShotTool-BviRVFSg.mjs → ScreenShotTool-BIIBp4eQ.mjs} +67 -67
  11. package/dist/SectionTool-CihpG2Fy.mjs +624 -0
  12. package/dist/SettingTool-nEoxPwEr.mjs +525 -0
  13. package/dist/StructureTree-CJH8jkPI.mjs +1427 -0
  14. package/dist/{debounce-Cg3LHv0T.mjs → debounce-BjnjVRfm.mjs} +13 -13
  15. package/dist/{el-checkbox-lp8vWAXQ.mjs → el-checkbox-CSuEX00S.mjs} +46 -46
  16. package/dist/{el-input-Bwqgf3wZ.mjs → el-input-Bm753NUP.mjs} +66 -68
  17. package/dist/{el-input-number-0OWyX276.mjs → el-input-number-BvvuoubO.mjs} +75 -75
  18. package/dist/{index-DX-eYsBm.mjs → index-BlDGbvS0.mjs} +2885 -2877
  19. package/dist/{index-CQ8depiU.mjs → index-BognDb0Q.mjs} +3 -3
  20. package/dist/{index-CYEu_kT4.mjs → index-CtoOocrY.mjs} +1 -1
  21. package/dist/{isEqual-Bg-tyY30.mjs → isEqual-BULlB8Co.mjs} +9 -9
  22. package/dist/panel.vue_vue_type_style_index_0_lang-tTB1oDNs.mjs +97 -0
  23. package/dist/style.css +1 -1
  24. package/dist/tallPanel-CmlMVBG1.mjs +49 -0
  25. package/package.json +2 -2
  26. package/types/components/utilsComponents/tallPanel.vue.d.ts +41 -0
  27. package/types/pages/BIMXViewer.vue.d.ts +2 -0
  28. package/types/services/fileApi/fileManager.d.ts +5 -5
  29. package/types/store/initConfigs.d.ts +1 -1
  30. package/types/store/themeManager.d.ts +2 -1
  31. package/dist/CommentTool-B6ruuuGV.mjs +0 -338
  32. package/dist/HiddenTool-DW-lRdW5.mjs +0 -58
  33. package/dist/InspectorTool-Cc288ySp.mjs +0 -515
  34. package/dist/MeasureTool-DdfM3U_3.mjs +0 -1542
  35. package/dist/SectionTool-jSjWX32j.mjs +0 -630
  36. package/dist/SettingTool-CVMZAx2H.mjs +0 -536
  37. package/dist/StructureTree-4OCdRRPG.mjs +0 -2672
  38. package/dist/panel.vue_vue_type_style_index_0_scope_true_lang-BfE1I0S9.mjs +0 -82
@@ -0,0 +1,338 @@
1
+ import { j as ge, k as V, l as H, O as u, m as we, n as fe } from "./index-BlDGbvS0.mjs";
2
+ import { a as Ce } from "./el-input-Bm753NUP.mjs";
3
+ import { defineComponent as ke, onMounted as xe, ref as a, watch as be, openBlock as s, createElementBlock as n, unref as c, createElementVNode as t, Fragment as S, renderList as y, normalizeClass as T, normalizeStyle as M, toDisplayString as j, withModifiers as G, createCommentVNode as N, createVNode as X, withCtx as Se, pushScopeId as ye, popScopeId as Te } from "vue";
4
+ import { C as Z, F as Ie, L as Ee, T as ze } from "./const-CbUmfuHy.mjs";
5
+ const h = (p) => (ye("data-v-de358d46"), p = p(), Te(), p), Le = { class: "comment_component" }, Be = /* @__PURE__ */ h(() => /* @__PURE__ */ t("div", {
6
+ id: "comments_panel",
7
+ class: "comments_panel"
8
+ }, null, -1)), Ve = {
9
+ key: 0,
10
+ id: "comments_toolbar",
11
+ class: "comments_toolbar"
12
+ }, Me = { class: "comments_toolbar_wrapper" }, Ne = { class: "comments_toolbar_group" }, Re = ["onClick"], Ae = ["src"], We = ["src"], De = {
13
+ key: 2,
14
+ class: "edit-tips"
15
+ }, Oe = { class: "edit_tips_content" }, Pe = {
16
+ key: 0,
17
+ class: "tips-weight"
18
+ }, $e = ["onClick"], Fe = {
19
+ key: 1,
20
+ class: "tips-weight"
21
+ }, Ue = ["onClick"], He = { class: "tips-color" }, je = ["onClick"], Ge = /* @__PURE__ */ h(() => /* @__PURE__ */ t("div", { class: "splitLine" }, null, -1)), Xe = { class: "comments_toolbar_group" }, Ze = ["src"], qe = ["src"], Je = ["src"], Ke = ["src"], Qe = /* @__PURE__ */ h(() => /* @__PURE__ */ t("div", { class: "splitLine" }, null, -1)), Ye = {
22
+ key: 1,
23
+ class: "mobile_comments_toolbar"
24
+ }, et = /* @__PURE__ */ h(() => /* @__PURE__ */ t("div", { class: "comment-title-box" }, [
25
+ /* @__PURE__ */ t("div", { class: "comment-title" }, "批注")
26
+ ], -1)), tt = { class: "comment-list" }, ot = ["onClick"], st = { class: "comment-icon" }, nt = ["src"], lt = { class: "comment-name" }, it = { class: "comment-icon" }, ct = ["src"], at = /* @__PURE__ */ h(() => /* @__PURE__ */ t("div", {
27
+ class: "comment-name",
28
+ style: { color: "#df1c1c" }
29
+ }, " 删除 ", -1)), rt = {
30
+ key: 2,
31
+ class: "comment_create_text_box"
32
+ }, dt = { class: "label-text-edit" }, vt = { class: "text-edit-head" }, mt = ["src"], ut = /* @__PURE__ */ h(() => /* @__PURE__ */ t("div", { class: "text-edit-title" }, "创建文字批注", -1)), _t = { class: "text-edit-body" }, ht = { class: "text-edit-input" }, pt = /* @__PURE__ */ ke({
33
+ __name: "CommentTool",
34
+ props: ["componentId"],
35
+ emits: ["closePanel", "emitHandler"],
36
+ setup(p, { emit: q }) {
37
+ const R = ge(), A = p;
38
+ xe(() => {
39
+ R.setReadyById(A.componentId);
40
+ });
41
+ let W, i, _;
42
+ const r = a(0), L = a(1), B = a(1), D = a(1), J = a(Z), v = a(), g = a(!1), w = a(!1), I = a(!1), E = a(!1), f = a(""), O = a(), C = a({
43
+ show: !1,
44
+ // 是否显示
45
+ title: "标题",
46
+ // 弹窗标题
47
+ content: "内容",
48
+ // 弹窗内容
49
+ submitName: "确认",
50
+ // 弹窗按钮
51
+ confirm: () => {
52
+ console.log("点击了确认"), C.value.show = !1;
53
+ },
54
+ close: () => {
55
+ console.log("点击了关闭"), C.value.show = !1;
56
+ }
57
+ }), P = q, K = (e) => {
58
+ P("emitHandler", e);
59
+ };
60
+ be(
61
+ () => R.isToolActive(A.componentId),
62
+ (e) => {
63
+ var m;
64
+ e ? (r.value = 1, k("path"), setTimeout(() => {
65
+ var d;
66
+ V("isMobile") && ((d = document.getElementById("svgImage")) == null || d.addEventListener("touchstart", $));
67
+ }, 100)) : V("isMobile") && ((m = document.getElementById("svgImage")) == null || m.removeEventListener("touchstart", $));
68
+ }
69
+ );
70
+ const $ = (e) => {
71
+ e.target.tagName == "image" && (r.value === 5 ? (f.value = "", O.value = e, E.value = !0) : I.value = !1);
72
+ };
73
+ H.on("BimViewer", () => {
74
+ console.log("BimViewer"), W = window.BimViewer, i = window.BimViewer.commentTool, _ = window.BimViewer.eventTrigger, k(""), _.on("createNew", () => {
75
+ r.value = 0, k("");
76
+ }), _.on("newState", () => {
77
+ g.value = !0, w.value = !1;
78
+ }), _.on("noPreviousState", () => {
79
+ g.value = !1;
80
+ }), _.on("noNewState", () => {
81
+ w.value = !1;
82
+ }), _.on("choseTarget", (e) => {
83
+ I.value = !0, r.value = 0, k("");
84
+ });
85
+ });
86
+ const Q = () => {
87
+ f.value ? (i.clickCreateText(O.value, f.value), E.value = !1) : Y("请输入内容");
88
+ }, Y = (e, m) => {
89
+ C.value = {
90
+ show: !0,
91
+ // 是否显示
92
+ title: "提示",
93
+ // 弹窗标题
94
+ content: e,
95
+ // 弹窗内容
96
+ submitName: "确定",
97
+ // 弹窗按钮
98
+ confirm: () => {
99
+ console.log("点击了确认"), C.value.show = !1;
100
+ },
101
+ close: () => {
102
+ console.log("点击了关闭"), C.value.show = !1;
103
+ }
104
+ };
105
+ };
106
+ H.on("withdraw", () => {
107
+ g.value = !1, w.value = !1;
108
+ });
109
+ const F = (e) => {
110
+ r.value === e.id && (r.value = 0), L.value = 1, B.value = 1, v.value = e.buttontype, r.value = e.id, k(e.buttontype);
111
+ }, ee = () => {
112
+ i.saveComments();
113
+ const e = document.getElementById("svgImage");
114
+ if (e) {
115
+ const m = new XMLSerializer().serializeToString(e), d = document.createElement("canvas"), z = d.getContext("2d"), l = window.devicePixelRatio || 1, o = e.clientWidth * l, x = e.clientHeight * l;
116
+ d.width = o, d.height = x;
117
+ const b = new Image();
118
+ b.onload = function() {
119
+ d.width = b.width, d.height = b.height, z && z.drawImage(b, 0, 0), K({
120
+ isTool: !0,
121
+ event_target: "CommentTool",
122
+ event_name: "saveComment",
123
+ content: {
124
+ img_data: d.toDataURL("image/png").split(",")[1]
125
+ }
126
+ }), U();
127
+ }, b.src = `data:image/svg+xml;charset=utf-8,${encodeURIComponent(m)}`;
128
+ }
129
+ }, U = () => {
130
+ W.SetCommentsToolActive(!1), P("closePanel");
131
+ }, te = () => {
132
+ window.BimViewer.commentTool.deleteCurrentComments(), I.value = !1;
133
+ }, k = (e) => {
134
+ i.setCurrentMode(e);
135
+ }, oe = (e) => {
136
+ L.value = e.id, v.value === "path" ? de(e.size) : v.value === "arrow" ? ue(e.size) : v.value === "rect" ? me(e.size) : v.value === "ellipse" && ve(e.size);
137
+ }, se = (e) => {
138
+ B.value = e.id, v.value === "path" ? le(e.color) : v.value === "arrow" ? ae(e.color) : v.value === "rect" ? ce(e.color) : v.value === "ellipse" ? ie(e.color) : v.value === "text" && re(e.color);
139
+ }, ne = (e) => {
140
+ D.value = e.id, _e(e.fontSize);
141
+ }, le = (e) => {
142
+ i.pathColor = e;
143
+ }, ie = (e) => {
144
+ i.ellipseColor = e;
145
+ }, ce = (e) => {
146
+ i.rectColor = e;
147
+ }, ae = (e) => {
148
+ i.arrowColor = e;
149
+ }, re = (e) => {
150
+ i.textColor = e;
151
+ }, de = (e) => {
152
+ i.pathStrokeWidth = e;
153
+ }, ve = (e) => {
154
+ i.ellipseStrokeWidth = e;
155
+ }, me = (e) => {
156
+ i.rectStrokeWidth = e;
157
+ }, ue = (e) => {
158
+ i.arrowSize = e;
159
+ }, _e = (e) => {
160
+ i.textFontSize = e;
161
+ }, he = () => {
162
+ i.ReDo(() => {
163
+ }), g.value = !0;
164
+ }, pe = () => {
165
+ i.UnDo(() => {
166
+ }), w.value = !0;
167
+ };
168
+ return (e, m) => {
169
+ const d = we, z = Ce;
170
+ return s(), n("div", Le, [
171
+ Be,
172
+ c(V)("isMobile") ? (s(), n("div", Ye, [
173
+ et,
174
+ X(d, null, {
175
+ default: Se(() => [
176
+ t("div", tt, [
177
+ (s(!0), n(S, null, y(c(Z), (l, o) => (s(), n("div", {
178
+ key: o,
179
+ class: T(["comment-item", {
180
+ "comment-item-active": r.value === l.id
181
+ }]),
182
+ onClick: (x) => F(l)
183
+ }, [
184
+ t("div", null, [
185
+ t("div", st, [
186
+ t("img", {
187
+ src: c(u) + `/bim-viewer/annotations/${r.value === l.id ? l.svgActive : l.svg}.svg`
188
+ }, null, 8, nt)
189
+ ]),
190
+ t("div", lt, j(l.name), 1)
191
+ ])
192
+ ], 10, ot))), 128)),
193
+ I.value ? (s(), n("div", {
194
+ key: 0,
195
+ class: "comment-item",
196
+ onClick: te
197
+ }, [
198
+ t("div", null, [
199
+ t("div", it, [
200
+ t("img", {
201
+ src: c(u) + "/bim-viewer/delete.svg",
202
+ alt: ""
203
+ }, null, 8, ct)
204
+ ]),
205
+ at
206
+ ])
207
+ ])) : N("", !0)
208
+ ])
209
+ ]),
210
+ _: 1
211
+ })
212
+ ])) : (s(), n("div", Ve, [
213
+ t("div", Me, [
214
+ t("div", Ne, [
215
+ (s(!0), n(S, null, y(J.value, (l) => (s(), n("div", {
216
+ key: l.id,
217
+ class: T(["comments_tool_btn", { comments_tool_btn_active: r.value === l.id }]),
218
+ onClick: (o) => F(l)
219
+ }, [
220
+ r.value === l.id ? (s(), n("img", {
221
+ key: 0,
222
+ src: c(u) + "/bim-viewer/annotations/" + l.imgActive + ".png"
223
+ }, null, 8, Ae)) : (s(), n("img", {
224
+ key: 1,
225
+ src: c(u) + "/bim-viewer/annotations/" + l.img + ".png"
226
+ }, null, 8, We)),
227
+ r.value === l.id ? (s(), n("div", De, [
228
+ t("div", Oe, [
229
+ l.buttontype === "text" ? (s(), n("div", Pe, [
230
+ (s(!0), n(S, null, y(c(Ie), (o) => (s(), n("div", {
231
+ key: o.id,
232
+ class: T(["text1", { text2: D.value === o.id }]),
233
+ style: M({ "font-size": o.id === 0 ? "18px" : o.id === 1 ? "16px" : "12px" }),
234
+ onClick: (x) => ne(o)
235
+ }, j(o.name), 15, $e))), 128))
236
+ ])) : (s(), n("div", Fe, [
237
+ (s(!0), n(S, null, y(c(Ee), (o) => (s(), n("div", {
238
+ key: o.id,
239
+ class: T(["weight", { choose_weight: L.value === o.id }]),
240
+ style: M({
241
+ width: o.id === 0 ? "6px" : o.id === 1 ? "14px" : "20px",
242
+ height: o.id === 0 ? "6px" : o.id === 1 ? "14px" : "20px"
243
+ }),
244
+ onClick: G((x) => oe(o), ["stop"])
245
+ }, null, 14, Ue))), 128))
246
+ ])),
247
+ t("div", He, [
248
+ (s(!0), n(S, null, y(c(ze), (o) => (s(), n("div", {
249
+ key: o.id,
250
+ class: T(["color-item", { choose_color: B.value === o.id }]),
251
+ style: M({
252
+ background: o.color,
253
+ border: o.id === 5 ? "1px solid #CBCFD9" : "",
254
+ width: o.id === 5 ? "18px" : "1rem",
255
+ height: o.id === 5 ? "18px" : "1rem"
256
+ }),
257
+ onClick: G((x) => se(o), ["stop"])
258
+ }, null, 14, je))), 128))
259
+ ])
260
+ ])
261
+ ])) : N("", !0)
262
+ ], 10, Re))), 128))
263
+ ]),
264
+ Ge,
265
+ t("div", Xe, [
266
+ t("div", {
267
+ class: "comments_tool_btn",
268
+ onClick: pe
269
+ }, [
270
+ g.value ? (s(), n("img", {
271
+ key: 0,
272
+ src: c(u) + "/bim-viewer/annotations/left-revoke-active.png"
273
+ }, null, 8, Ze)) : (s(), n("img", {
274
+ key: 1,
275
+ src: c(u) + "/bim-viewer/annotations/left-revoke.png"
276
+ }, null, 8, qe))
277
+ ]),
278
+ t("div", {
279
+ class: "comments_tool_btn",
280
+ onClick: he
281
+ }, [
282
+ w.value ? (s(), n("img", {
283
+ key: 0,
284
+ src: c(u) + "/bim-viewer/annotations/right-revoke-active.png"
285
+ }, null, 8, Je)) : (s(), n("img", {
286
+ key: 1,
287
+ src: c(u) + "/bim-viewer/annotations/right-revoke.png"
288
+ }, null, 8, Ke))
289
+ ])
290
+ ]),
291
+ Qe,
292
+ t("div", { class: "comments_toolbar_group" }, [
293
+ t("div", {
294
+ class: "comments_cancel",
295
+ onClick: U
296
+ }, " 取消 "),
297
+ t("div", {
298
+ class: "comments_save",
299
+ onClick: ee
300
+ }, " 保存 ")
301
+ ])
302
+ ])
303
+ ])),
304
+ E.value ? (s(), n("div", rt, [
305
+ t("div", dt, [
306
+ t("div", vt, [
307
+ t("img", {
308
+ class: "text-edit-back",
309
+ src: c(u) + "/bim-viewer/back_gray.svg",
310
+ alt: "",
311
+ onClick: m[0] || (m[0] = (l) => E.value = !1)
312
+ }, null, 8, mt),
313
+ ut,
314
+ t("div", {
315
+ class: "text-edit-finish",
316
+ onClick: Q
317
+ }, " 完成 ")
318
+ ]),
319
+ t("div", _t, [
320
+ t("div", ht, [
321
+ X(z, {
322
+ modelValue: f.value,
323
+ "onUpdate:modelValue": m[1] || (m[1] = (l) => f.value = l),
324
+ type: "textarea",
325
+ placeholder: "请输入文本内容",
326
+ autosize: { minRows: 2 }
327
+ }, null, 8, ["modelValue"])
328
+ ])
329
+ ])
330
+ ])
331
+ ])) : N("", !0)
332
+ ]);
333
+ };
334
+ }
335
+ }), kt = /* @__PURE__ */ fe(pt, [["__scopeId", "data-v-de358d46"]]);
336
+ export {
337
+ kt as default
338
+ };
@@ -0,0 +1,58 @@
1
+ import { defineComponent as g, onMounted as b, ref as E, openBlock as l, createElementBlock as d, createElementVNode as o, Fragment as B, renderList as V, unref as c, normalizeClass as a, toDisplayString as S, pushScopeId as k, popScopeId as y } from "vue";
2
+ import { j as C, l as I, k as H, O, n as x } from "./index-BlDGbvS0.mjs";
3
+ import { H as T } from "./const-CbUmfuHy.mjs";
4
+ const j = (n) => (k("data-v-1535adf3"), n = n(), y(), n), A = { class: "hidden_wrapper" }, D = /* @__PURE__ */ j(() => /* @__PURE__ */ o("div", { class: "hidden_title_box" }, [
5
+ /* @__PURE__ */ o("div", { class: "hidden_title" }, "其他")
6
+ ], -1)), L = { class: "hidden_content" }, M = ["onClick"], N = ["src"], R = /* @__PURE__ */ g({
7
+ __name: "HiddenTool",
8
+ props: ["componentId"],
9
+ emits: ["closePanel", "emitHandler"],
10
+ setup(n, { emit: $ }) {
11
+ const _ = C(), w = n;
12
+ b(() => {
13
+ _.setReadyById(w.componentId);
14
+ });
15
+ const t = E(0);
16
+ I.on("BimViewer", () => {
17
+ const { eventTrigger: e } = window.BimViewer;
18
+ H("isMobile") ? e.on("touchEntity", (s) => {
19
+ window.BimViewer.disableClickEvent && r(s);
20
+ }) : e.on("pickedEntity", (s) => {
21
+ window.BimViewer.disableClickEvent && r(s);
22
+ });
23
+ });
24
+ const r = (e) => {
25
+ t.value != -1 && (t.value == 1 ? p(e) : t.value == 2 ? u(e) : t.value == 3 && m(e));
26
+ }, p = (e) => {
27
+ window.BimViewer.setEntityVisible(e);
28
+ }, u = (e) => {
29
+ window.BimViewer.setEntityHighlighted(e);
30
+ }, m = (e) => {
31
+ window.BimViewer.setEntitySelected(e);
32
+ }, v = () => {
33
+ window.BimViewer.setAllObjectsVisible(!0), window.BimViewer.setAllObjectsHighlighted(!1), window.BimViewer.setAllObjectsSelected(!1);
34
+ }, h = (e) => {
35
+ e == 0 ? (t.value = e, v()) : t.value = e;
36
+ };
37
+ return (e, s) => (l(), d("div", A, [
38
+ D,
39
+ o("div", L, [
40
+ (l(!0), d(B, null, V(c(T), (i, f) => (l(), d("div", {
41
+ key: f,
42
+ class: a(["button_", { button_active: t.value == i.id }]),
43
+ onClick: (z) => h(i.id)
44
+ }, [
45
+ o("img", {
46
+ src: c(O) + `/bim-viewer/hidden-bar/${t.value == i.id ? i.img_active : i.img}.svg`
47
+ }, null, 8, N),
48
+ o("span", {
49
+ class: a({ active_text: t.value == i.id })
50
+ }, S(i.name), 3)
51
+ ], 10, M))), 128))
52
+ ])
53
+ ]));
54
+ }
55
+ }), q = /* @__PURE__ */ x(R, [["__scopeId", "data-v-1535adf3"]]);
56
+ export {
57
+ q as default
58
+ };