@xtctwins/tctwins-industry-engine 0.0.3 → 0.0.5

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 (31) hide show
  1. package/README.md +1 -1
  2. package/dist/{AnnotationTool-B_8kk4PT.mjs → AnnotationTool-gF-4Y6K3.mjs} +3 -3
  3. package/dist/{BCFTool-CCEs0Hcv.mjs → BCFTool-DMkglMsI.mjs} +2 -2
  4. package/dist/{CommentTool-Ceu3dEvG.mjs → CommentTool-BLNdsHN9.mjs} +2 -2
  5. package/dist/Industry_Viewer_Lib.es.js +1 -1
  6. package/dist/Industry_Viewer_Lib.umd.js +100 -100
  7. package/dist/{InspectorTool-DizW4rLc.mjs → InspectorTool-C1nlbmWJ.mjs} +3 -3
  8. package/dist/MeasureTool-BvDO40WF.mjs +167 -0
  9. package/dist/MouseTool-DrwOVFVx.mjs +82 -0
  10. package/dist/{NavigateTool-DYsv1Kx-.mjs → NavigateTool-zh-iJfrl.mjs} +1 -1
  11. package/dist/{RoamTool-B0_CFWw5.mjs → RoamTool-DdSDRfM4.mjs} +2 -2
  12. package/dist/{ScreenShotTool-BBapcvr-.mjs → ScreenShotTool-CQUOzhV5.mjs} +2 -2
  13. package/dist/{SectionTool-CRrzpXtp.mjs → SectionTool-DaHti6oc.mjs} +4 -4
  14. package/dist/{SettingTool-4JZBHK89.mjs → SettingTool-DSchgfMF.mjs} +4 -4
  15. package/dist/{StructureTree-COEz3wVF.mjs → StructureTree-KtS5Jbi9.mjs} +4 -4
  16. package/dist/{XRayTool-BSGbsSyp.mjs → XRayTool-BQeQkSiQ.mjs} +2 -2
  17. package/dist/{alert-DXy73YAR.mjs → alert-ritjjP_P.mjs} +1 -1
  18. package/dist/{el-checkbox-CHHqPLrg.mjs → el-checkbox-Fqeb-3AB.mjs} +1 -1
  19. package/dist/{el-input-number-HgHfv0L_.mjs → el-input-number-C3sw_WaE.mjs} +1 -1
  20. package/dist/{index-CDNB06AU.mjs → index-D-d1Xugc.mjs} +8098 -8089
  21. package/dist/{panel.vue_vue_type_style_index_0_lang-moPEUl7t.mjs → panel.vue_vue_type_style_index_0_lang-D9JdP9df.mjs} +1 -1
  22. package/dist/style.css +1 -1
  23. package/dist/{tallPanel-zfPrZtgS.mjs → tallPanel-CmLb45ew.mjs} +1 -1
  24. package/package.json +1 -1
  25. package/types/components/BimViewerComponents/StructureTree.vue.d.ts +4 -3040
  26. package/types/components/MobileBCFComponents/MobileBCFDisplayList.vue.d.ts +1 -248
  27. package/types/components/MobileBCFComponents/MobileBCFFilter.vue.d.ts +1 -248
  28. package/types/store/toolbars.d.ts +58 -0
  29. package/types/viewerManager/viewerManager.d.ts +5 -5
  30. package/dist/MeasureTool-DwPFiKtr.mjs +0 -168
  31. package/dist/MouseTool-C5bYjpv8.mjs +0 -80
@@ -186,6 +186,35 @@ export declare const useToolbarStore: import('pinia').StoreDefinition<"toolbar",
186
186
  visibleToolIds: number[];
187
187
  readyToolIds: number[];
188
188
  }>) => (key: string) => boolean;
189
+ hasToolActive: (state: {
190
+ tools: {
191
+ id: number;
192
+ key: string;
193
+ name: string;
194
+ hasActiveState: boolean;
195
+ component: ComponentName | "";
196
+ isShowDelimiter: boolean;
197
+ img: string;
198
+ imgActive: string;
199
+ isActive: boolean;
200
+ }[];
201
+ visibleToolIds: number[];
202
+ readyToolIds: number[];
203
+ } & import('pinia').PiniaCustomStateProperties<{
204
+ tools: Tool[];
205
+ visibleToolIds: number[];
206
+ readyToolIds: number[];
207
+ }>) => (extraTool?: number[]) => {
208
+ id: number;
209
+ key: string;
210
+ name: string;
211
+ hasActiveState: boolean;
212
+ component: ComponentName | "";
213
+ isShowDelimiter: boolean;
214
+ img: string;
215
+ imgActive: string;
216
+ isActive: boolean;
217
+ } | undefined;
189
218
  }, {
190
219
  toggleToolVisibility(toolId: any): void;
191
220
  setEnableTools(toolIds: number[]): void;
@@ -373,6 +402,35 @@ export declare function getToolbarStore(): import('pinia').Store<"toolbar", {
373
402
  visibleToolIds: number[];
374
403
  readyToolIds: number[];
375
404
  }>) => (key: string) => boolean;
405
+ hasToolActive: (state: {
406
+ tools: {
407
+ id: number;
408
+ key: string;
409
+ name: string;
410
+ hasActiveState: boolean;
411
+ component: ComponentName | "";
412
+ isShowDelimiter: boolean;
413
+ img: string;
414
+ imgActive: string;
415
+ isActive: boolean;
416
+ }[];
417
+ visibleToolIds: number[];
418
+ readyToolIds: number[];
419
+ } & import('pinia').PiniaCustomStateProperties<{
420
+ tools: Tool[];
421
+ visibleToolIds: number[];
422
+ readyToolIds: number[];
423
+ }>) => (extraTool?: number[]) => {
424
+ id: number;
425
+ key: string;
426
+ name: string;
427
+ hasActiveState: boolean;
428
+ component: ComponentName | "";
429
+ isShowDelimiter: boolean;
430
+ img: string;
431
+ imgActive: string;
432
+ isActive: boolean;
433
+ } | undefined;
376
434
  }, {
377
435
  toggleToolVisibility(toolId: any): void;
378
436
  setEnableTools(toolIds: number[]): void;
@@ -3,11 +3,11 @@ export default class ViewerManager {
3
3
  measureType: string;
4
4
  };
5
5
  static entityState: {
6
- xrayedObjectIds: never[];
7
- highlightedObjectIds: never[];
8
- selectedObjectIds: never[];
9
- visibleObjectIds: never[];
10
- edgesObjectIds: never[];
6
+ xrayedObjectIds: string[];
7
+ highlightedObjectIds: string[];
8
+ selectedObjectIds: string[];
9
+ visibleObjectIds: string[];
10
+ edgesObjectIds: string[];
11
11
  };
12
12
  static ConfigViewer(eventTarget?: string): void;
13
13
  static SaveViewerState(content: any): void;
@@ -1,168 +0,0 @@
1
- import { defineComponent as ge, ref as s, onMounted as U, onBeforeUnmount as _e, watch as Me, openBlock as I, createElementBlock as A, Fragment as F, createElementVNode as t, renderList as fe, unref as a, normalizeClass as he, toDisplayString as ye, createCommentVNode as we, normalizeStyle as O, withDirectives as Te, vShow as pe } from "vue";
2
- import { p as Be, T as q, t as P, O as h, V as W, q as g, z as be } from "./index-CDNB06AU.mjs";
3
- import { M as L } from "./const-DeViLYl5.mjs";
4
- const Ie = { class: "mobile_measure_panel" }, Ae = { class: "measure-list" }, Ee = ["onClick"], De = { class: "measure-icon" }, Re = ["src"], Ve = { class: "measure-name" }, Se = { class: "measure-icon" }, ke = ["src"], Le = { class: "mouse_btn" }, xe = ["src"], Ce = ["src"], $e = ["src"], ze = /* @__PURE__ */ ge({
5
- __name: "MeasureTool",
6
- props: ["componentId"],
7
- emits: ["closePanel", "emitHandler"],
8
- setup(j, { emit: J }) {
9
- const y = Be(), K = j, x = s(0);
10
- U(() => {
11
- y.setReadyById(K.componentId), q.currentTheme == "blue" ? x.value = 224 : q.currentTheme == "light-gray" && (x.value = 202);
12
- });
13
- let u, w, T, i;
14
- const n = s(1), C = s(), E = s(), _ = s(), D = s(), R = s(), Q = s(), Z = s(), G = s(), ee = s(1), se = s("m"), te = s(3), l = s(!1), oe = J, $ = (e) => {
15
- oe("emitHandler", e);
16
- }, z = () => {
17
- T = window.bimViewer, W.SaveViewerState({ measure: "distance" }), w = window.bimViewer.measureAngleTool, u = window.bimViewer.measureDistanceTool, i = window.bimViewer.eventTrigger, g("isMobile") && (i.on("newAngleMeasure", (e) => {
18
- l.value = !1;
19
- }), i.on("newDistanceMeasure", (e) => {
20
- l.value = !1;
21
- })), i.on("createAngleMeasure", (e) => {
22
- R.value = e.id, D.value = e.result, g("isMobile") && (l.value = !0), m("createAngleMeasure", { newMeasure: e });
23
- }), i.on("createDistanceMeasure", (e) => {
24
- C.value = e.id, _.value = e.id, E.value = e.result, Q.value = e.xResult ? e.xResult : 0, Z.value = e.yResult ? e.yResult : 0, G.value = e.zResult ? e.zResult : 0, g("isMobile") && (l.value = !0), m("createAngleMeasure", { newMeasure: e });
25
- }), i.on("clickDistanceMeasure", (e) => {
26
- n.value == 2 && V(L[0]), C.value = e.id, ie(e.id), g("isMobile") && (l.value = !0), m("clickDistanceMeasure", { id: e.id });
27
- }), i.on("clickAngleMeasure", (e) => {
28
- n.value == 1 && V(L[1]), ae(e.id), g("isMobile") && (l.value = !0), m("clickAngleMeasure", { id: e.id });
29
- }), u.precision = te.value, u.unit = se.value, u.scale = ee.value;
30
- };
31
- P.on("BimViewer", z), _e(() => {
32
- P.off("BimViewer", z);
33
- }), Me(
34
- () => y.isToolActive(3),
35
- (e) => {
36
- ce(e);
37
- }
38
- );
39
- const m = (e, o) => {
40
- $({
41
- isTool: !0,
42
- event_name: e,
43
- event_target: "MeasureTool",
44
- content: o
45
- });
46
- }, V = (e) => {
47
- n.value !== e.id && (n.value = e.id, W.SaveViewerState({ measure: e.code }), le(e), g("isMobile") && (l.value = !1));
48
- }, le = (e) => {
49
- let o = e.code;
50
- window.bimViewer.measureTool.setActiveByType(o, !0), $({
51
- isTool: !0,
52
- event_name: "",
53
- event_target: "MeasureTool",
54
- content: {
55
- measureTool: o
56
- }
57
- });
58
- }, ne = () => {
59
- E.value = "", D.value = "", n.value === 1 ? (re(_.value), m("destroyMeasureDistance", { id: _.value })) : n.value === 2 && (ue(R.value), m("destroyMeasurementAngle", { id: _.value })), l.value = !1;
60
- }, ae = (e) => {
61
- R.value = e, D.value = w.getMeasureResultByID(e);
62
- }, ue = (e) => w.destroyMeasurementById(e), ie = (e) => {
63
- _.value = e, E.value = u.getMeasureResultByID(e);
64
- }, re = (e) => u.destroyMeasurementById(e), ce = (e) => {
65
- u.setAllVisible(e), w.setAllVisible(e);
66
- };
67
- let N;
68
- U(() => {
69
- N = document.getElementById("top_bar");
70
- });
71
- const d = s(!1);
72
- let p = !1, B = 0, b = 0, S = 0, k = 0;
73
- const r = s(260), c = s(500), ve = () => {
74
- d.value = !d.value, d.value ? me() : de();
75
- }, X = (e) => {
76
- p ? T.measureTool.currentTool.onSimulateMousedown([r.value, c.value]) : e.touches.length == 1 && (B = e.touches[0].clientX, b = e.touches[0].clientY, p = !0);
77
- }, Y = (e) => {
78
- if (e.touches.length == 1) {
79
- const o = e.touches[0].clientX, M = e.touches[0].clientY;
80
- S = o - B, k = M - b, r.value += S, c.value += k;
81
- let f = new Int16Array(2);
82
- f[0] = r.value + 5, f[1] = c.value + N.offsetHeight + 6, B = o, b = M, T.measureTool.currentTool.onSimulateMousemove([r.value, c.value]);
83
- }
84
- }, H = (e) => {
85
- p && T.measureTool.currentTool.onSimulateMouseup([r.value, c.value]);
86
- }, me = () => {
87
- const e = document.getElementById("measure_mouseGroup");
88
- e == null || e.addEventListener("touchstart", X), e == null || e.addEventListener("touchmove", Y), e == null || e.addEventListener("touchend", H), r.value = 260, c.value = 500, B = 0, b = 0, S = 0, k = 0, p = !1;
89
- }, de = () => {
90
- const e = document.getElementById("measure_mouseGroup");
91
- e == null || e.removeEventListener("touchstart", X), e == null || e.removeEventListener("touchmove", Y), e == null || e.removeEventListener("touchend", H);
92
- };
93
- return (e, o) => {
94
- var M, f;
95
- return I(), A(F, null, [
96
- t("div", Ie, [
97
- t("div", Ae, [
98
- (I(!0), A(F, null, fe(a(L), (v) => (I(), A("div", {
99
- key: v.id,
100
- class: he(["measure-item", {
101
- "measure-item-active": n.value === v.id
102
- }]),
103
- onClick: (Ne) => V(v)
104
- }, [
105
- t("div", De, [
106
- t("img", {
107
- src: a(h) + `/industry-viewer/measure-bar/${n.value === v.id ? v.svgActive : v.svg}.svg`,
108
- alt: ""
109
- }, null, 8, Re),
110
- t("div", Ve, ye(v.name), 1)
111
- ])
112
- ], 10, Ee))), 128)),
113
- l.value ? (I(), A("div", {
114
- key: 0,
115
- class: "measure-item",
116
- onClick: ne
117
- }, [
118
- t("div", Se, [
119
- t("img", {
120
- src: a(h) + "/industry-viewer/delete.svg",
121
- alt: ""
122
- }, null, 8, ke),
123
- o[0] || (o[0] = t("div", {
124
- class: "measure-name",
125
- style: { color: "#df1c1c" }
126
- }, " 删除 ", -1))
127
- ])
128
- ])) : we("", !0)
129
- ]),
130
- t("div", Le, [
131
- t("div", {
132
- class: "mouse",
133
- onClick: ve
134
- }, [
135
- t("img", {
136
- src: `${a(h)}/industry-viewer/action-bar/${d.value ? (M = a(y).getToolById(15)) == null ? void 0 : M.imgActive : (f = a(y).getToolById(15)) == null ? void 0 : f.img}.svg`
137
- }, null, 8, xe),
138
- t("span", {
139
- style: O({ color: d.value ? "#1457F7" : "#262626" })
140
- }, "虚拟鼠标", 4)
141
- ])
142
- ])
143
- ]),
144
- Te(t("div", {
145
- id: "measure_mouseGroup",
146
- class: "mouse_group",
147
- style: O({ left: `${r.value}px`, top: `${c.value}px` })
148
- }, [
149
- t("img", {
150
- id: "mouse_icon",
151
- class: "mouse_icon",
152
- src: `${a(h)}/industry-viewer/mouse-icon.svg`
153
- }, null, 8, Ce),
154
- t("img", {
155
- id: "mouse_img",
156
- class: "mouse_img",
157
- src: `${a(h)}/industry-viewer/mouse-active-large.svg`
158
- }, null, 8, $e)
159
- ], 4), [
160
- [pe, d.value]
161
- ])
162
- ], 64);
163
- };
164
- }
165
- }), Ue = /* @__PURE__ */ be(ze, [["__scopeId", "data-v-19c2280e"]]);
166
- export {
167
- Ue as default
168
- };
@@ -1,80 +0,0 @@
1
- import { defineComponent as x, onMounted as A, onBeforeUnmount as O, ref as _, watch as $, openBlock as F, createElementBlock as M, withDirectives as j, createElementVNode as p, normalizeStyle as C, unref as k, vShow as N } from "vue";
2
- import { p as R, t as o, O as V } from "./index-CDNB06AU.mjs";
3
- const U = { class: "mouse_tool" }, z = ["src"], D = ["src"], q = /* @__PURE__ */ x({
4
- __name: "MouseTool",
5
- props: ["componentId"],
6
- setup(T) {
7
- const g = R(), y = T;
8
- let E;
9
- A(() => {
10
- g.setReadyById(y.componentId), E = document.getElementById("top_bar");
11
- });
12
- let t;
13
- const w = () => {
14
- t = window.bimViewer, t.eventTrigger.on("pickedNothing", () => {
15
- s.value = !1;
16
- });
17
- };
18
- o.on("BimViewer", w);
19
- const B = () => {
20
- s.value = !1;
21
- };
22
- o.on("unFocus", B), O(() => {
23
- o.off("BimViewer", w), o.off("unFocus", B);
24
- });
25
- const a = _(260), u = _(500), s = _(!1);
26
- let d = !1, n = !1, c = 0, i = 0, m = 0, v = 0;
27
- $(
28
- () => g.isToolActive(y.componentId),
29
- (e) => {
30
- e ? X() : (n = !1, d = !1, c = 0, i = 0, m = 0, v = 0, Y());
31
- }
32
- );
33
- let l = "";
34
- const S = (e) => {
35
- n || e.touches.length == 1 && (d = !0, c = e.touches[0].clientX, i = e.touches[0].clientY);
36
- }, I = (e) => {
37
- n && (s.value = !0, o.emit("focusEntity", l));
38
- }, L = (e) => {
39
- if (d && e.touches.length == 1) {
40
- const f = e.touches[0].clientX, b = e.touches[0].clientY;
41
- m = f - c, v = b - i, a.value += m, u.value += v;
42
- let h = new Int16Array(2);
43
- h[0] = a.value + 5, h[1] = u.value + E.offsetHeight + 6;
44
- const r = t.viewer.scene.pick({
45
- canvasPos: h
46
- });
47
- r ? (n = !0, l !== r.entity.id && (l = r.entity.id, t.setAllObjectsSelected(!1), t.setEntitySelected(r.entity))) : (l = "", t.setAllObjectsSelected(!1)), c = f, i = b;
48
- }
49
- }, X = () => {
50
- const e = document.getElementById("mouseGroup");
51
- e == null || e.addEventListener("touchstart", S), e == null || e.addEventListener("touchmove", L), e == null || e.addEventListener("click", I);
52
- }, Y = () => {
53
- const e = document.getElementById("mouseGroup");
54
- e == null || e.removeEventListener("touchstart", S), e == null || e.removeEventListener("touchmove", L), e == null || e.removeEventListener("click", I);
55
- };
56
- return (e, f) => (F(), M("div", U, [
57
- j(p("div", {
58
- id: "mouseGroup",
59
- class: "mouse_group",
60
- style: C({ left: `${a.value}px`, top: `${u.value}px` })
61
- }, [
62
- p("img", {
63
- id: "mouse_icon",
64
- class: "mouse_icon",
65
- src: `${k(V)}/industry-viewer/mouse-icon.svg`
66
- }, null, 8, z),
67
- p("img", {
68
- id: "mouse_img",
69
- class: "mouse_img",
70
- src: `${k(V)}/industry-viewer/mouse-active-large.svg`
71
- }, null, 8, D)
72
- ], 4), [
73
- [N, !s.value]
74
- ])
75
- ]));
76
- }
77
- });
78
- export {
79
- q as default
80
- };