@xtctwins/tctwins-bimx-engine 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (168) hide show
  1. package/README.md +193 -196
  2. package/dist/{alert-ChDNxVgQ.mjs → Alert-CSiEPFGt.mjs} +8 -8
  3. package/dist/AnnotationTool-CKzHkqWM.mjs +239 -0
  4. package/dist/BIMX_Viewer_Lib.es.js +3 -3
  5. package/dist/BIMX_Viewer_Lib.umd.js +222 -175
  6. package/dist/CommentTool-5HhGDqpg.mjs +1541 -0
  7. package/dist/{HiddenTool-CoPawMRd.mjs → HiddenTool-BGFoHMWC.mjs} +16 -16
  8. package/dist/{InspectorTool-BIvnydPf.mjs → InspectorTool-DD3w7k07.mjs} +66 -66
  9. package/dist/{MeasureTool-BUi0QI_R.mjs → MeasureTool-COR8QLDf.mjs} +126 -102
  10. package/dist/{MouseTool-CdVwRiX1.mjs → MouseTool-OxODcO4X.mjs} +35 -32
  11. package/dist/{NavigateTool-DoP9z3yP.mjs → NavigateTool-Bw6GFzsg.mjs} +13 -13
  12. package/dist/{panel.vue_vue_type_style_index_0_lang-BaSZShh_.mjs → Panel.vue_vue_type_style_index_0_lang-DgM_qGLO.mjs} +2 -2
  13. package/dist/{RoamTool-POFy076i.mjs → RoamTool-X-b0hsmJ.mjs} +14 -14
  14. package/dist/ScreenShotTool-0xSJZBBw.mjs +430 -0
  15. package/dist/SectionTool-BqI2Qnk5.mjs +343 -0
  16. package/dist/SettingTool-CGkRGfZH.mjs +747 -0
  17. package/dist/StructureTree-CWAXoI0r.mjs +1662 -0
  18. package/dist/{tallPanel-DKlcFjrl.mjs → TallPanel-CR5vNQ4c.mjs} +14 -14
  19. package/dist/bimTools-D3TraX9d.mjs +75 -0
  20. package/dist/el-slider-CBVU9_og.mjs +1040 -0
  21. package/dist/{index-Dsq1epCY.mjs → index-CwRGVhoT.mjs} +55597 -53543
  22. package/dist/index.html +17 -17
  23. package/dist/style.css +1 -1
  24. package/package.json +4 -3
  25. package/types/components/BCFComponents/BCFAddPanel.vue.d.ts +38 -10
  26. package/types/components/BCFComponents/BCFDetailPanel.vue.d.ts +37 -9
  27. package/types/components/BCFComponents/BCFDisplayList.vue.d.ts +5 -7
  28. package/types/components/BCFComponents/BCFFilter.vue.d.ts +5 -7
  29. package/types/components/BCFComponents/BCFTool.vue.d.ts +4 -7
  30. package/types/components/BCFComponents/addObjectOrAnno.vue.d.ts +5 -7
  31. package/types/components/BCFComponents/checkObjectPanel.vue.d.ts +5 -6
  32. package/types/components/BCFComponents/commentInput.vue.d.ts +36 -10
  33. package/types/components/BCFComponents/commentsView.vue.d.ts +36 -7
  34. package/types/components/BCFComponents/dialogPanel.vue.d.ts +5 -8
  35. package/types/components/BCFComponents/imageView.vue.d.ts +5 -7
  36. package/types/components/BCFComponents/imageZoomIn.vue.d.ts +5 -6
  37. package/types/components/BimViewerComponents/AnnotationTool.vue.d.ts +1 -1
  38. package/types/components/BimViewerComponents/AppToolbar.vue.d.ts +18 -1
  39. package/types/components/BimViewerComponents/ClickEvent.vue.d.ts +1 -1
  40. package/types/components/BimViewerComponents/CommentTool.vue.d.ts +32 -1
  41. package/types/components/BimViewerComponents/HiddenTool.vue.d.ts +1 -1
  42. package/types/components/BimViewerComponents/InspectorTool.vue.d.ts +2 -0
  43. package/types/components/BimViewerComponents/MeasureTool.vue.d.ts +2 -0
  44. package/types/components/BimViewerComponents/MobileCommentsTool/{add.vue.d.ts → MobileCommentAdd.vue.d.ts} +6 -8
  45. package/types/components/BimViewerComponents/MobileCommentsTool/detail.vue.d.ts +4 -5
  46. package/types/components/BimViewerComponents/MobileCommentsTool/draw.vue.d.ts +2 -2
  47. package/types/components/BimViewerComponents/MobileCommentsTool/filter.vue.d.ts +478 -1
  48. package/types/components/BimViewerComponents/MobileCommentsTool/list.vue.d.ts +499 -7
  49. package/types/components/BimViewerComponents/MobileCommentsTool/zoomIn.vue.d.ts +5 -6
  50. package/types/components/BimViewerComponents/MouseTool.vue.d.ts +1 -1
  51. package/types/components/BimViewerComponents/NavigateTool.vue.d.ts +1 -1
  52. package/types/components/BimViewerComponents/PCCommentTool/pcdraw.vue.d.ts +1 -1
  53. package/types/components/BimViewerComponents/RoamTool.vue.d.ts +1 -1
  54. package/types/components/BimViewerComponents/SectionTool.vue.d.ts +4 -0
  55. package/types/components/BimViewerComponents/SettingTool.vue.d.ts +4 -6
  56. package/types/components/BimViewerComponents/StructureTree.vue.d.ts +4026 -1
  57. package/types/components/BimViewerComponents/Toolbar.vue.d.ts +1 -1
  58. package/types/components/BimViewerComponents/mobileToolbar.vue.d.ts +18 -1
  59. package/types/components/BimxViewerComp.vue.d.ts +7 -14
  60. package/types/components/MobileBCFComponents/MobileBCFAdd.vue.d.ts +37 -10
  61. package/types/components/MobileBCFComponents/MobileBCFDetail.vue.d.ts +37 -9
  62. package/types/components/MobileBCFComponents/MobileBCFDisplayList.vue.d.ts +499 -7
  63. package/types/components/MobileBCFComponents/MobileBCFFilter.vue.d.ts +478 -1
  64. package/types/components/MobileBCFComponents/MobileBCFTool.vue.d.ts +5 -8
  65. package/types/components/MobileBCFComponents/MobileCommentInput.vue.d.ts +38 -12
  66. package/types/components/MobileBCFComponents/MobileCommentsView.vue.d.ts +7 -9
  67. package/types/components/MobileBCFComponents/selectPanel.vue.d.ts +5 -7
  68. package/types/components/bcf/AddObjectOrAnno.vue.d.ts +16 -0
  69. package/types/components/bcf/BCFAddPanel.vue.d.ts +55 -0
  70. package/types/components/bcf/BCFDetailPanel.vue.d.ts +59 -0
  71. package/types/components/bcf/BCFDisplayList.vue.d.ts +18 -0
  72. package/types/components/bcf/BCFFilter.vue.d.ts +14 -0
  73. package/types/components/bcf/BCFTool.vue.d.ts +15 -0
  74. package/types/components/bcf/CheckObjectPanel.vue.d.ts +11 -0
  75. package/types/components/bcf/CommentInput.vue.d.ts +51 -0
  76. package/types/components/bcf/CommentsView.vue.d.ts +48 -0
  77. package/types/components/bcf/DialogPanel.vue.d.ts +15 -0
  78. package/types/components/bcf/ImageView.vue.d.ts +17 -0
  79. package/types/components/bcf/ImageZoomIn.vue.d.ts +9 -0
  80. package/types/components/bcf/MobileBCFAdd.vue.d.ts +56 -0
  81. package/types/components/bcf/MobileBCFDetail.vue.d.ts +55 -0
  82. package/types/components/bcf/MobileBCFDisplayList.vue.d.ts +498 -0
  83. package/types/components/bcf/MobileBCFFilter.vue.d.ts +475 -0
  84. package/types/components/bcf/MobileBCFTool.vue.d.ts +17 -0
  85. package/types/components/bcf/MobileCommentInput.vue.d.ts +54 -0
  86. package/types/components/bcf/MobileCommentsView.vue.d.ts +17 -0
  87. package/types/components/bcf/SelectPanel.vue.d.ts +12 -0
  88. package/types/components/bimxViewer.vue.d.ts +7 -14
  89. package/types/components/comment/mobile/MobileCommentAdd.vue.d.ts +14 -0
  90. package/types/components/comment/mobile/MobileDetail.vue.d.ts +11 -0
  91. package/types/components/comment/mobile/MobileDraw.vue.d.ts +17 -0
  92. package/types/components/comment/mobile/MobileFilter.vue.d.ts +475 -0
  93. package/types/components/comment/mobile/MobileList.vue.d.ts +497 -0
  94. package/types/components/comment/mobile/MobileZoomIn.vue.d.ts +9 -0
  95. package/types/components/comment/pc/PcDraw.vue.d.ts +14 -0
  96. package/types/components/shared/Alert.vue.d.ts +32 -0
  97. package/types/components/shared/CloseButton.vue.d.ts +50 -0
  98. package/types/components/shared/CloseButtonDark.vue.d.ts +32 -0
  99. package/types/components/shared/EmptyPage.vue.d.ts +6 -0
  100. package/types/components/shared/Loading.vue.d.ts +2 -0
  101. package/types/components/shared/Panel.vue.d.ts +47 -0
  102. package/types/components/shared/Prompt.vue.d.ts +8 -0
  103. package/types/components/shared/RectangleButton.vue.d.ts +106 -0
  104. package/types/components/shared/TallPanel.vue.d.ts +69 -0
  105. package/types/components/shared/TallPanelNoPos.vue.d.ts +82 -0
  106. package/types/components/tools/AnnotationTool.vue.d.ts +14 -0
  107. package/types/components/tools/AppToolbar.vue.d.ts +27 -0
  108. package/types/components/tools/ClickEvent.vue.d.ts +6 -0
  109. package/types/components/tools/CommentTool.vue.d.ts +45 -0
  110. package/types/components/tools/HiddenTool.vue.d.ts +12 -0
  111. package/types/components/tools/InspectorTool.vue.d.ts +14 -0
  112. package/types/components/tools/MeasureTool.vue.d.ts +14 -0
  113. package/types/components/tools/MouseTool.vue.d.ts +6 -0
  114. package/types/components/tools/NavigateTool.vue.d.ts +10 -0
  115. package/types/components/tools/RoamTool.vue.d.ts +12 -0
  116. package/types/components/tools/ScreenShotTool.vue.d.ts +10 -0
  117. package/types/components/tools/SectionTool.vue.d.ts +14 -0
  118. package/types/components/tools/SettingTool.vue.d.ts +13 -0
  119. package/types/components/tools/StructureTree.vue.d.ts +11645 -0
  120. package/types/components/tools/Toolbar.vue.d.ts +10 -0
  121. package/types/components/utilsComponents/alert.vue.d.ts +1 -1
  122. package/types/components/utilsComponents/closeButton.vue.d.ts +1 -1
  123. package/types/components/utilsComponents/closeButton_dark.vue.d.ts +1 -1
  124. package/types/components/utilsComponents/emptyPage.vue.d.ts +1 -1
  125. package/types/components/utilsComponents/loading.vue.d.ts +1 -1
  126. package/types/components/utilsComponents/panel.vue.d.ts +8 -2
  127. package/types/components/utilsComponents/prompt.vue.d.ts +1 -1
  128. package/types/components/utilsComponents/rectangleButton.vue.d.ts +3 -1
  129. package/types/components/utilsComponents/tallPanel.vue.d.ts +13 -3
  130. package/types/components/utilsComponents/tallPanel_noPos.vue.d.ts +13 -3
  131. package/types/composables/useBimViewerEvent.d.ts +44 -0
  132. package/types/composables/useEmitHandler.d.ts +2 -0
  133. package/types/composables/useToolActive.d.ts +1 -0
  134. package/types/composables/useToolReady.d.ts +1 -0
  135. package/types/i18n/index.d.ts +5 -1
  136. package/types/i18n/locales/en-US.d.ts +1 -0
  137. package/types/i18n/locales/zh-CN.d.ts +1 -0
  138. package/types/pages/BimxViewerEntry.vue.d.ts +5 -57
  139. package/types/pages/viewerEntry.vue.d.ts +7 -57
  140. package/types/store/bcfReflect.d.ts +13 -81
  141. package/types/store/const/app.d.ts +66 -0
  142. package/types/store/const/bimTools.d.ts +81 -0
  143. package/types/store/const/project.d.ts +48 -0
  144. package/types/store/const/theme.d.ts +16 -0
  145. package/types/store/const/toolbar.d.ts +26 -0
  146. package/types/store/const.d.ts +11 -228
  147. package/types/store/initConfigs.d.ts +1 -1
  148. package/types/store/toolbars.d.ts +68 -46
  149. package/types/store/userInfoStore.d.ts +1 -1
  150. package/types/stores/viewerStore.d.ts +112 -0
  151. package/types/types/bcf.d.ts +83 -0
  152. package/types/types/events.d.ts +88 -0
  153. package/types/utils/OSSHelper.d.ts +27 -0
  154. package/types/utils/cacheInfo.d.ts +26 -3
  155. package/types/utils/dbscan.d.ts +1 -0
  156. package/types/utils/eventBus.d.ts +1 -83
  157. package/types/viewerManager/viewerManager.d.ts +53 -3
  158. package/dist/AnnotationTool-CGRte6Cc.mjs +0 -167
  159. package/dist/CommentTool-CT3wFozB.mjs +0 -1529
  160. package/dist/ScreenShotTool-CcUyU0g7.mjs +0 -357
  161. package/dist/SectionTool-DGjjH3JO.mjs +0 -331
  162. package/dist/SettingTool-CjXfbX5r.mjs +0 -657
  163. package/dist/StructureTree-DdRX-y-V.mjs +0 -1583
  164. package/dist/const-DOnRsYpZ.mjs +0 -389
  165. package/dist/el-input-number-CK5d8pzH.mjs +0 -818
  166. package/types/components/BCFComponents/BCFCommentNew.vue.d.ts +0 -22
  167. package/types/components/BimViewerComponents/emptyPage.vue.d.ts +0 -8
  168. package/types/tests/cmt.d.ts +0 -1
@@ -1,357 +0,0 @@
1
- import { _ as pe } from "./panel.vue_vue_type_style_index_0_lang-BaSZShh_.mjs";
2
- import { X as z, Y as x, f as j, Z as O, $ as X, a0 as ve, a1 as H, a as Y, a2 as fe, a3 as be, a4 as _e, u as L, _ as T, a5 as he, a6 as ge, a7 as ye, a8 as Se, d as Ve, w as Re, a9 as W, n as ke, o as Ee, t as Ie } from "./index-Dsq1epCY.mjs";
3
- import { ref as R, inject as Be, computed as g, defineComponent as E, openBlock as k, createElementBlock as B, normalizeClass as y, unref as e, createElementVNode as v, withDirectives as q, isRef as Z, withModifiers as N, vModelRadio as J, renderSlot as F, createTextVNode as $, toDisplayString as C, nextTick as Q, normalizeStyle as Ce, onMounted as ee, provide as we, reactive as Ne, toRefs as $e, watch as oe, createBlock as ze, withCtx as P, createVNode as w, Fragment as Ge, renderList as Pe, createCommentVNode as Ue } from "vue";
4
- import { a as U } from "./const-DOnRsYpZ.mjs";
5
- const ae = z({
6
- modelValue: {
7
- type: [String, Number, Boolean],
8
- default: void 0
9
- },
10
- size: H,
11
- disabled: Boolean,
12
- label: {
13
- type: [String, Number, Boolean],
14
- default: void 0
15
- },
16
- value: {
17
- type: [String, Number, Boolean],
18
- default: void 0
19
- },
20
- name: {
21
- type: String,
22
- default: void 0
23
- }
24
- }), xe = z({
25
- ...ae,
26
- border: Boolean
27
- }), le = {
28
- [x]: (t) => j(t) || O(t) || X(t),
29
- [ve]: (t) => j(t) || O(t) || X(t)
30
- }, te = Symbol("radioGroupKey"), ne = (t, f) => {
31
- const a = R(), o = Be(te, void 0), c = g(() => !!o), p = g(() => Y(t.value) ? t.label : t.value), s = g({
32
- get() {
33
- return c.value ? o.modelValue : t.modelValue;
34
- },
35
- set(n) {
36
- c.value ? o.changeEvent(n) : f && f(x, n), a.value.checked = t.modelValue === p.value;
37
- }
38
- }), d = fe(g(() => o == null ? void 0 : o.size)), l = be(g(() => o == null ? void 0 : o.disabled)), u = R(!1), b = g(() => l.value || c.value && s.value !== p.value ? -1 : 0);
39
- return _e({
40
- from: "label act as value",
41
- replacement: "value",
42
- version: "3.0.0",
43
- scope: "el-radio",
44
- ref: "https://element-plus.org/en-US/component/radio.html"
45
- }, g(() => c.value && Y(t.value))), {
46
- radioRef: a,
47
- isGroup: c,
48
- radioGroup: o,
49
- focus: u,
50
- size: d,
51
- disabled: l,
52
- tabIndex: b,
53
- modelValue: s,
54
- actualValue: p
55
- };
56
- }, Le = E({
57
- name: "ElRadio"
58
- }), Te = /* @__PURE__ */ E({
59
- ...Le,
60
- props: xe,
61
- emits: le,
62
- setup(t, { emit: f }) {
63
- const a = t, o = L("radio"), { radioRef: c, radioGroup: p, focus: s, size: d, disabled: l, modelValue: u, actualValue: b } = ne(a, f);
64
- function n() {
65
- Q(() => f("change", u.value));
66
- }
67
- return (_, S) => {
68
- var i;
69
- return k(), B("label", {
70
- class: y([
71
- e(o).b(),
72
- e(o).is("disabled", e(l)),
73
- e(o).is("focus", e(s)),
74
- e(o).is("bordered", _.border),
75
- e(o).is("checked", e(u) === e(b)),
76
- e(o).m(e(d))
77
- ])
78
- }, [
79
- v("span", {
80
- class: y([
81
- e(o).e("input"),
82
- e(o).is("disabled", e(l)),
83
- e(o).is("checked", e(u) === e(b))
84
- ])
85
- }, [
86
- q(v("input", {
87
- ref_key: "radioRef",
88
- ref: c,
89
- "onUpdate:modelValue": (r) => Z(u) ? u.value = r : null,
90
- class: y(e(o).e("original")),
91
- value: e(b),
92
- name: _.name || ((i = e(p)) == null ? void 0 : i.name),
93
- disabled: e(l),
94
- checked: e(u) === e(b),
95
- type: "radio",
96
- onFocus: (r) => s.value = !0,
97
- onBlur: (r) => s.value = !1,
98
- onChange: n,
99
- onClick: N(() => {
100
- }, ["stop"])
101
- }, null, 42, ["onUpdate:modelValue", "value", "name", "disabled", "checked", "onFocus", "onBlur", "onClick"]), [
102
- [J, e(u)]
103
- ]),
104
- v("span", {
105
- class: y(e(o).e("inner"))
106
- }, null, 2)
107
- ], 2),
108
- v("span", {
109
- class: y(e(o).e("label")),
110
- onKeydown: N(() => {
111
- }, ["stop"])
112
- }, [
113
- F(_.$slots, "default", {}, () => [
114
- $(C(_.label), 1)
115
- ])
116
- ], 42, ["onKeydown"])
117
- ], 2);
118
- };
119
- }
120
- });
121
- var Fe = /* @__PURE__ */ T(Te, [["__file", "radio.vue"]]);
122
- const Ae = z({
123
- ...ae
124
- }), De = E({
125
- name: "ElRadioButton"
126
- }), Ke = /* @__PURE__ */ E({
127
- ...De,
128
- props: Ae,
129
- setup(t) {
130
- const f = t, a = L("radio"), { radioRef: o, focus: c, size: p, disabled: s, modelValue: d, radioGroup: l, actualValue: u } = ne(f), b = g(() => ({
131
- backgroundColor: (l == null ? void 0 : l.fill) || "",
132
- borderColor: (l == null ? void 0 : l.fill) || "",
133
- boxShadow: l != null && l.fill ? `-1px 0 0 0 ${l.fill}` : "",
134
- color: (l == null ? void 0 : l.textColor) || ""
135
- }));
136
- return (n, _) => {
137
- var S;
138
- return k(), B("label", {
139
- class: y([
140
- e(a).b("button"),
141
- e(a).is("active", e(d) === e(u)),
142
- e(a).is("disabled", e(s)),
143
- e(a).is("focus", e(c)),
144
- e(a).bm("button", e(p))
145
- ])
146
- }, [
147
- q(v("input", {
148
- ref_key: "radioRef",
149
- ref: o,
150
- "onUpdate:modelValue": (i) => Z(d) ? d.value = i : null,
151
- class: y(e(a).be("button", "original-radio")),
152
- value: e(u),
153
- type: "radio",
154
- name: n.name || ((S = e(l)) == null ? void 0 : S.name),
155
- disabled: e(s),
156
- onFocus: (i) => c.value = !0,
157
- onBlur: (i) => c.value = !1,
158
- onClick: N(() => {
159
- }, ["stop"])
160
- }, null, 42, ["onUpdate:modelValue", "value", "name", "disabled", "onFocus", "onBlur", "onClick"]), [
161
- [J, e(d)]
162
- ]),
163
- v("span", {
164
- class: y(e(a).be("button", "inner")),
165
- style: Ce(e(d) === e(u) ? e(b) : {}),
166
- onKeydown: N(() => {
167
- }, ["stop"])
168
- }, [
169
- F(n.$slots, "default", {}, () => [
170
- $(C(n.label), 1)
171
- ])
172
- ], 46, ["onKeydown"])
173
- ], 2);
174
- };
175
- }
176
- });
177
- var se = /* @__PURE__ */ T(Ke, [["__file", "radio-button.vue"]]);
178
- const Me = z({
179
- id: {
180
- type: String,
181
- default: void 0
182
- },
183
- size: H,
184
- disabled: Boolean,
185
- modelValue: {
186
- type: [String, Number, Boolean],
187
- default: void 0
188
- },
189
- fill: {
190
- type: String,
191
- default: ""
192
- },
193
- textColor: {
194
- type: String,
195
- default: ""
196
- },
197
- name: {
198
- type: String,
199
- default: void 0
200
- },
201
- validateEvent: {
202
- type: Boolean,
203
- default: !0
204
- },
205
- ...he(["ariaLabel"])
206
- }), je = le, Oe = E({
207
- name: "ElRadioGroup"
208
- }), Xe = /* @__PURE__ */ E({
209
- ...Oe,
210
- props: Me,
211
- emits: je,
212
- setup(t, { emit: f }) {
213
- const a = t, o = L("radio"), c = ge(), p = R(), { formItem: s } = ye(), { inputId: d, isLabeledByFormItem: l } = Se(a, {
214
- formItemContext: s
215
- }), u = (n) => {
216
- f(x, n), Q(() => f("change", n));
217
- };
218
- ee(() => {
219
- const n = p.value.querySelectorAll("[type=radio]"), _ = n[0];
220
- !Array.from(n).some((S) => S.checked) && _ && (_.tabIndex = 0);
221
- });
222
- const b = g(() => a.name || c.value);
223
- return we(te, Ne({
224
- ...$e(a),
225
- changeEvent: u,
226
- name: b
227
- })), oe(() => a.modelValue, () => {
228
- a.validateEvent && (s == null || s.validate("change").catch((n) => Ve(n)));
229
- }), (n, _) => (k(), B("div", {
230
- id: e(d),
231
- ref_key: "radioGroupRef",
232
- ref: p,
233
- class: y(e(o).b("group")),
234
- role: "radiogroup",
235
- "aria-label": e(l) ? void 0 : n.ariaLabel || "radio-group",
236
- "aria-labelledby": e(l) ? e(s).labelId : void 0
237
- }, [
238
- F(n.$slots, "default")
239
- ], 10, ["id", "aria-label", "aria-labelledby"]));
240
- }
241
- });
242
- var ie = /* @__PURE__ */ T(Xe, [["__file", "radio-group.vue"]]);
243
- const Ye = Re(Fe, {
244
- RadioButton: se,
245
- RadioGroup: ie
246
- }), He = W(ie);
247
- W(se);
248
- const We = { class: "wrapper" }, qe = { class: "screen_thumbnail" }, Ze = ["src"], Je = { class: "validity-period" }, Qe = {
249
- key: 0,
250
- class: "custom"
251
- }, eo = { class: "footer" }, no = /* @__PURE__ */ E({
252
- __name: "ScreenShotTool",
253
- props: ["componentId"],
254
- emits: ["closePanel"],
255
- setup(t, { emit: f }) {
256
- const a = ke(), o = Ee(), c = t, p = R(0), s = R(), d = R(), l = R(), u = f;
257
- ee(() => {
258
- s.value = 1280, d.value = 720, o.setReadyById(c.componentId);
259
- }), oe(
260
- () => o.isToolActive(c.componentId),
261
- (i) => {
262
- i && _(220, 124, !1);
263
- }
264
- );
265
- const b = (i) => {
266
- p.value = i, i !== 3 && (s.value = U[i].width, d.value = U[i].height);
267
- }, n = () => {
268
- u("closePanel");
269
- }, _ = (i, r, G) => {
270
- const h = document.getElementById("myCanvas"), I = document.createElement("a");
271
- I.download = "screenshot.png";
272
- const V = document.createElement("canvas"), m = V.getContext("2d");
273
- if (h && m) {
274
- V.width = i, V.height = r;
275
- const re = i / h.width, de = r / h.height, A = Math.max(re, de), D = h.width * A, K = h.height * A, ue = (i - D) / 2, ce = (r - K) / 2;
276
- m.clearRect(0, 0, i, r), m.fillStyle = "transparent", m.fillRect(0, 0, i, r), m.drawImage(h, 0, 0, h.width, h.height, ue, ce, D, K), G ? V.toBlob(function(me) {
277
- const M = URL.createObjectURL(me);
278
- I.href = M, I.click(), URL.revokeObjectURL(M);
279
- }) : l.value = V.toDataURL("image/png");
280
- }
281
- }, S = () => {
282
- _(s.value, d.value, !0);
283
- };
284
- return (i, r) => {
285
- const G = Ye, h = He, I = Ie, V = pe;
286
- return k(), ze(V, {
287
- class: "screen_container",
288
- width: 240,
289
- panelTitle: e(a)("screenshot.title"),
290
- "click-handle": n
291
- }, {
292
- default: P(() => [
293
- v("div", We, [
294
- v("div", qe, [
295
- v("img", {
296
- class: "thumbnail_img",
297
- src: l.value,
298
- alt: ""
299
- }, null, 8, Ze)
300
- ]),
301
- w(h, {
302
- modelValue: p.value,
303
- "onUpdate:modelValue": r[0] || (r[0] = (m) => p.value = m),
304
- onChange: b
305
- }, {
306
- default: P(() => [
307
- v("div", Je, [
308
- (k(!0), B(Ge, null, Pe(e(U), (m) => (k(), B("div", {
309
- key: m.id,
310
- class: "period_box"
311
- }, [
312
- w(G, {
313
- label: m.id
314
- }, {
315
- default: P(() => [
316
- $(C(m.name || e(a)(m.label ?? "")), 1)
317
- ]),
318
- _: 2
319
- }, 1032, ["label"])
320
- ]))), 128))
321
- ])
322
- ]),
323
- _: 1
324
- }, 8, ["modelValue"]),
325
- p.value === 3 ? (k(), B("div", Qe, [
326
- w(I, {
327
- modelValue: s.value,
328
- "onUpdate:modelValue": r[1] || (r[1] = (m) => s.value = m),
329
- placeholder: e(a)("screenshot.widthPlaceholder")
330
- }, null, 8, ["modelValue", "placeholder"]),
331
- r[3] || (r[3] = $(" x ")),
332
- w(I, {
333
- modelValue: d.value,
334
- "onUpdate:modelValue": r[2] || (r[2] = (m) => d.value = m),
335
- placeholder: e(a)("screenshot.heightPlaceholder")
336
- }, null, 8, ["modelValue", "placeholder"])
337
- ])) : Ue("", !0),
338
- v("div", eo, [
339
- v("div", {
340
- class: "btn1",
341
- onClick: n
342
- }, C(e(a)("common.cancel")), 1),
343
- v("div", {
344
- class: "btn2",
345
- onClick: S
346
- }, C(e(a)("common.save")), 1)
347
- ])
348
- ])
349
- ]),
350
- _: 1
351
- }, 8, ["panelTitle"]);
352
- };
353
- }
354
- });
355
- export {
356
- no as default
357
- };
@@ -1,331 +0,0 @@
1
- import { _ as me } from "./alert-ChDNxVgQ.mjs";
2
- import { n as pe, o as fe, T as F, p as w, q as z, O as d, H as he, v as ke, x as ge, y as we } from "./index-Dsq1epCY.mjs";
3
- import { E as be } from "./el-input-number-CK5d8pzH.mjs";
4
- import { _ as ye } from "./panel.vue_vue_type_style_index_0_lang-BaSZShh_.mjs";
5
- import { defineComponent as Se, ref as v, onMounted as Ce, watch as xe, onBeforeUnmount as Ve, openBlock as s, createElementBlock as l, Fragment as B, unref as n, createBlock as Pe, withCtx as E, createElementVNode as o, toDisplayString as u, withDirectives as H, renderList as K, vShow as W, createVNode as m, normalizeClass as Te, withModifiers as Le, createTextVNode as $e } from "vue";
6
- import { B as ze } from "./const-DOnRsYpZ.mjs";
7
- const Be = { class: "section_panel_middle" }, Ee = { class: "section_middle_title" }, Ie = { class: "section_control_button" }, Oe = ["src"], Ae = { class: "control_buttons" }, De = ["onClick"], Me = { class: "section_panel_cont" }, Ue = {
8
- key: 0,
9
- class: ""
10
- }, Ne = ["onClick"], Re = { class: "cont_item_left" }, je = ["src", "onClick"], qe = { class: "cont_item_right" }, Fe = ["src", "onClick"], He = ["src", "onClick"], Ke = ["src", "onClick"], We = {
11
- key: 1,
12
- class: "empty1"
13
- }, Ge = {
14
- key: 1,
15
- class: "mobile_section_panel"
16
- }, Je = { class: "slicing-title-box" }, Qe = { class: "slicing-title" }, Xe = { class: "slicing-title-icon" }, Ye = { class: "slicing-content-box" }, Ze = { class: "slicing-select-box" }, eo = { class: "select-item" }, oo = { class: "select-item-left" }, to = ["src"], io = ["src"], no = { class: "select-item-center" }, so = { class: "item-center-top" }, lo = { class: "item-center-bottom" }, co = { class: "select-item" }, ao = { class: "select-item-left" }, ro = ["src"], uo = ["src"], _o = { class: "select-item-center" }, vo = { class: "item-center-top" }, mo = { class: "item-center-bottom" }, po = { class: "select-item" }, fo = { class: "select-item-left" }, ho = ["src"], ko = ["src"], go = { class: "select-item-center" }, wo = { class: "item-center-top" }, bo = { class: "item-center-bottom" }, yo = /* @__PURE__ */ Se({
17
- __name: "SectionTool",
18
- props: ["componentId"],
19
- emits: ["closePanel"],
20
- setup(G, { emit: J }) {
21
- const _ = pe(), I = fe(), O = G, V = v(0);
22
- Ce(() => {
23
- I.setReadyById(O.componentId), F.currentTheme == "blue" ? V.value = 240 : F.currentTheme == "light-gray" && (V.value = 202), document.addEventListener("click", A);
24
- });
25
- const A = (e) => {
26
- y.value && e.target.id != "controlOperatePanel" && M(!1);
27
- }, D = v(!0), b = v(!1), r = v(), f = v(), y = v(!1), M = (e) => {
28
- y.value = e;
29
- };
30
- let a, S;
31
- const Q = J;
32
- xe(
33
- () => I.isToolActive(O.componentId),
34
- (e) => {
35
- w("isMobile") && (e ? (g(h.value.direction), document.addEventListener("touchmove", N)) : document.removeEventListener("touchmove", N));
36
- }
37
- );
38
- let P = !1;
39
- const U = () => {
40
- a = window.bimViewer.sectionTool, S = window.bimViewer.eventTrigger, w("isMobile") || S.on("createSection", (e) => {
41
- C(), r.value = Object.keys(ae()).map((t) => ({
42
- id: t,
43
- isLook: !0,
44
- directionLeft: !0
45
- })), ee(e.id, !0), f.value = e.id, T(e.id);
46
- }), w("isMobile") && (S.on("touchPlaneStart", () => {
47
- P = !0;
48
- }), S.on("touchPlaneEnd", () => {
49
- P = !1;
50
- }));
51
- };
52
- z.on("BimViewer", U), Ve(() => {
53
- z.off("BimViewer", U), document.removeEventListener("click", A);
54
- });
55
- const N = () => {
56
- P && X();
57
- }, c = v({
58
- x: 0,
59
- y: 0,
60
- z: 0
61
- }), h = v({
62
- direction: "x"
63
- }), k = (e) => {
64
- g(e);
65
- }, g = (e) => {
66
- switch (h.value.direction = e, e) {
67
- case "x":
68
- window.bimViewer.sectionTool.sectionDirection = 0, window.bimViewer.sectionTool.setControlPos(100 - c.value.x);
69
- break;
70
- case "y":
71
- window.bimViewer.sectionTool.sectionDirection = 1, window.bimViewer.sectionTool.setControlPos(c.value.y);
72
- break;
73
- case "z":
74
- window.bimViewer.sectionTool.sectionDirection = 2, window.bimViewer.sectionTool.setControlPos(100 - c.value.z);
75
- break;
76
- }
77
- }, X = () => {
78
- switch (h.value.direction) {
79
- case "x":
80
- c.value.x = 100 - window.bimViewer.sectionTool.getControlPos();
81
- break;
82
- case "y":
83
- c.value.y = window.bimViewer.sectionTool.getControlPos();
84
- break;
85
- case "z":
86
- c.value.z = 100 - window.bimViewer.sectionTool.getControlPos();
87
- break;
88
- }
89
- }, R = () => {
90
- a.setActive(!1), Q("closePanel"), z.emit("hideToolbar", !1);
91
- }, Y = (e) => {
92
- f.value !== e.id && (f.value = e.id, b.value = !1, C(), T(e.id));
93
- }, Z = (e) => {
94
- C(), e.isLook = !e.isLook, e.isLook ? (e.isLook = !0, te(e.id)) : ie(e.id), T(f.value);
95
- }, T = (e) => {
96
- a.showSectionPlane(e);
97
- }, j = (e) => {
98
- if (r.value)
99
- for (let t = 0; t < r.value.length; t++)
100
- r.value[t].isLook = e;
101
- }, ee = (e, t) => {
102
- for (let p = 0; p < r.value.length; p++)
103
- e == r.value[p].id && (r.value[p].isLook = t);
104
- }, q = (e) => {
105
- e.directionLeft = !e.directionLeft, ce(e.id);
106
- }, oe = (e) => {
107
- a.destroySectionPlane(e), r.value = r.value.filter((t) => t.id !== e);
108
- }, te = (e) => {
109
- a.setSectionEnable(e);
110
- }, ie = (e) => {
111
- a.setSectionDisable(e);
112
- }, ne = () => {
113
- j(!0), a.enableSections(), a.showControl(), b.value = !0;
114
- }, se = () => {
115
- j(!1), a.disableSections(), b.value = !1, f.value = "";
116
- }, le = (e) => {
117
- e.id === 0 ? (re(), r.value = []) : e.id === 1 ? de() : e.id === 2 ? ne() : e.id === 4 && (se(), C());
118
- }, ce = (e) => {
119
- a.flipSection(e);
120
- }, ae = () => a.getSectionPlanes(), re = () => {
121
- a.clear();
122
- }, de = () => {
123
- a.flipSections();
124
- }, C = () => {
125
- a.hideControl();
126
- };
127
- return (e, t) => {
128
- const p = ke, ue = ye, _e = ge, L = be, ve = me;
129
- return s(), l(B, null, [
130
- n(w)("isMobile") ? (s(), l("div", Ge, [
131
- o("div", Je, [
132
- o("div", Qe, u(n(_)("toolbar.section")), 1),
133
- o("div", Xe, [
134
- m(_e, {
135
- width: 0.4,
136
- "size-type": "rem",
137
- "click-handle": R
138
- })
139
- ])
140
- ]),
141
- o("div", Ye, [
142
- m(p, null, {
143
- default: E(() => [
144
- o("div", Ze, [
145
- o("div", eo, [
146
- o("div", oo, [
147
- h.value.direction === "x" ? (s(), l("img", {
148
- key: 0,
149
- src: n(d) + "/bim-viewer/section_look_icon.png",
150
- alt: "",
151
- onClick: t[1] || (t[1] = (i) => k("x"))
152
- }, null, 8, to)) : (s(), l("img", {
153
- key: 1,
154
- src: n(d) + "/bim-viewer/section_unlook_icon.png",
155
- alt: "",
156
- onClick: t[2] || (t[2] = (i) => k("x"))
157
- }, null, 8, io))
158
- ]),
159
- o("div", no, [
160
- o("div", so, [
161
- o("div", null, u(n(_)("section.xAxis")), 1),
162
- o("div", null, u(c.value.x) + " %", 1)
163
- ]),
164
- o("div", lo, [
165
- m(L, {
166
- modelValue: c.value.x,
167
- "onUpdate:modelValue": t[3] || (t[3] = (i) => c.value.x = i),
168
- size: "large",
169
- "show-tooltip": !1,
170
- onInput: t[4] || (t[4] = (i) => g("x"))
171
- }, null, 8, ["modelValue"])
172
- ])
173
- ])
174
- ]),
175
- o("div", co, [
176
- o("div", ao, [
177
- h.value.direction === "y" ? (s(), l("img", {
178
- key: 0,
179
- src: n(d) + "/bim-viewer/section_look_icon.png",
180
- alt: "",
181
- onClick: t[5] || (t[5] = (i) => k("y"))
182
- }, null, 8, ro)) : (s(), l("img", {
183
- key: 1,
184
- src: n(d) + "/bim-viewer/section_unlook_icon.png",
185
- alt: "",
186
- onClick: t[6] || (t[6] = (i) => k("y"))
187
- }, null, 8, uo))
188
- ]),
189
- o("div", _o, [
190
- o("div", vo, [
191
- o("div", null, u(n(_)("section.yAxis")), 1),
192
- o("div", null, u(c.value.y) + " %", 1)
193
- ]),
194
- o("div", mo, [
195
- m(L, {
196
- modelValue: c.value.y,
197
- "onUpdate:modelValue": t[7] || (t[7] = (i) => c.value.y = i),
198
- size: "large",
199
- "show-tooltip": !1,
200
- onInput: t[8] || (t[8] = (i) => g("y"))
201
- }, null, 8, ["modelValue"])
202
- ])
203
- ])
204
- ]),
205
- o("div", po, [
206
- o("div", fo, [
207
- h.value.direction === "z" ? (s(), l("img", {
208
- key: 0,
209
- src: n(d) + "/bim-viewer/section_look_icon.png",
210
- alt: "",
211
- onClick: t[9] || (t[9] = (i) => k("z"))
212
- }, null, 8, ho)) : (s(), l("img", {
213
- key: 1,
214
- src: n(d) + "/bim-viewer/section_unlook_icon.png",
215
- alt: "",
216
- onClick: t[10] || (t[10] = (i) => k("z"))
217
- }, null, 8, ko))
218
- ]),
219
- o("div", go, [
220
- o("div", wo, [
221
- o("div", null, u(n(_)("section.zAxis")), 1),
222
- o("div", null, u(c.value.z) + " %", 1)
223
- ]),
224
- o("div", bo, [
225
- m(L, {
226
- modelValue: c.value.z,
227
- "onUpdate:modelValue": t[11] || (t[11] = (i) => c.value.z = i),
228
- size: "large",
229
- "show-tooltip": !1,
230
- onInput: t[12] || (t[12] = (i) => g("z"))
231
- }, null, 8, ["modelValue"])
232
- ])
233
- ])
234
- ])
235
- ])
236
- ]),
237
- _: 1
238
- })
239
- ])
240
- ])) : (s(), Pe(ue, {
241
- key: 0,
242
- class: "section_panel",
243
- width: V.value,
244
- panelTitle: n(_)("toolbar.section"),
245
- "click-handle": R
246
- }, {
247
- default: E(() => [
248
- o("div", Be, [
249
- o("div", Ee, u(n(_)("section.allSections")), 1),
250
- o("div", Ie, [
251
- o("img", {
252
- id: "controlOperatePanel",
253
- src: n(d) + "/bim-viewer/slicing-more.png",
254
- onClick: t[0] || (t[0] = (i) => M(!y.value))
255
- }, null, 8, Oe),
256
- H(o("div", Ae, [
257
- (s(!0), l(B, null, K(n(ze), (i) => (s(), l("div", {
258
- key: i.id,
259
- class: "operation_button",
260
- onClick: ($) => le(i)
261
- }, [
262
- o("span", null, u(n(_)(i.name)), 1)
263
- ], 8, De))), 128))
264
- ], 512), [
265
- [W, y.value]
266
- ])
267
- ])
268
- ]),
269
- o("div", Me, [
270
- m(p, { height: "360px" }, {
271
- default: E(() => [
272
- r.value && r.value.length ? (s(), l("div", Ue, [
273
- (s(!0), l(B, null, K(r.value, (i, $) => (s(), l("div", {
274
- key: $,
275
- class: Te(["panel_cont_item", { panel_cont_item_choose: f.value === i.id || b.value }]),
276
- onClick: (x) => Y(i)
277
- }, [
278
- o("div", Re, [
279
- o("img", {
280
- src: `${n(d)}/bim-viewer/${i.isLook ? "section_look_icon.png" : "section_unlook_icon.png"}`,
281
- alt: "",
282
- onClick: Le((x) => Z(i), ["stop"])
283
- }, null, 8, je),
284
- $e(" " + u(n(_)("section.sectionPrefix") + ($ + 1)), 1)
285
- ]),
286
- o("div", qe, [
287
- i.directionLeft ? (s(), l("img", {
288
- key: 0,
289
- src: n(d) + "/bim-viewer/left_section_icon.png",
290
- alt: "",
291
- onClick: (x) => q(i)
292
- }, null, 8, Fe)) : (s(), l("img", {
293
- key: 1,
294
- src: n(d) + "/bim-viewer/right_section_icon.png",
295
- alt: "",
296
- onClick: (x) => q(i)
297
- }, null, 8, He)),
298
- o("img", {
299
- src: n(d) + "/bim-viewer/section_del_icon.png",
300
- alt: "",
301
- onClick: (x) => oe(i.id)
302
- }, null, 8, Ke)
303
- ])
304
- ], 10, Ne))), 128))
305
- ])) : (s(), l("div", We, [
306
- m(he, {
307
- title: n(_)("common.noData"),
308
- type: "model"
309
- }, null, 8, ["title"])
310
- ]))
311
- ]),
312
- _: 1
313
- })
314
- ])
315
- ]),
316
- _: 1
317
- }, 8, ["width", "panelTitle"])),
318
- H(m(ve, {
319
- "click-handle": () => {
320
- D.value = !1;
321
- }
322
- }, null, 8, ["click-handle"]), [
323
- [W, D.value && !n(w)("isMobile")]
324
- ])
325
- ], 64);
326
- };
327
- }
328
- }), Lo = /* @__PURE__ */ we(yo, [["__scopeId", "data-v-f710e44a"]]);
329
- export {
330
- Lo as default
331
- };