@xtctwins/tctwins-industry-engine 0.0.11 → 0.1.0

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 (105) hide show
  1. package/README.md +196 -3
  2. package/dist/01.xtc +0 -0
  3. package/dist/02.xtc +0 -0
  4. package/dist/03.xtc +0 -0
  5. package/dist/AnnotationTool-DfcSXn-d.mjs +166 -0
  6. package/dist/CameraViewTool-C91GKumm.mjs +164 -0
  7. package/dist/CommentTool-CR1yMDYP.mjs +1528 -0
  8. package/dist/HiddenTool-iCXaAMtS.mjs +56 -0
  9. package/dist/Industry_Viewer_Lib.es.js +10 -5
  10. package/dist/Industry_Viewer_Lib.umd.js +264 -237
  11. package/dist/InspectorTool-MyLTC7qp.mjs +679 -0
  12. package/dist/MeasureTool-BpomWCXl.mjs +593 -0
  13. package/dist/MouseTool-COWvA8Jk.mjs +84 -0
  14. package/dist/NavigateTool-DeMrrYoS.mjs +51 -0
  15. package/dist/OperateTool-DSZCJVkD.mjs +185 -0
  16. package/dist/RoamTool-0E0ls2Cx.mjs +287 -0
  17. package/dist/ScreenShotTool-viitj9zy.mjs +429 -0
  18. package/dist/SectionTool-Bz1c26fa.mjs +241 -0
  19. package/dist/SettingTool-BlsqUNQM.mjs +1745 -0
  20. package/dist/StructureTree-Dke0hMRC.mjs +1685 -0
  21. package/dist/alert-CgfjcpRo.mjs +52 -0
  22. package/dist/index-COQ8NdId.mjs +138714 -0
  23. package/dist/index.html +17 -0
  24. package/dist/{panel.vue_vue_type_style_index_0_lang-D3swRKXl.mjs → panel.vue_vue_type_style_index_0_lang-B-dNXuRK.mjs} +3 -3
  25. package/dist/style.css +3 -1
  26. package/dist/{tallPanel-eXWPdhmU.mjs → tallPanel-B-5hSZt6.mjs} +24 -24
  27. package/dist/timer-DoTiGoWP.mjs +30 -0
  28. package/package.json +85 -66
  29. package/types/App.vue.d.ts +3 -1
  30. package/types/components/BCFComponents/BCFAddPanel.vue.d.ts +1 -1
  31. package/types/components/BCFComponents/BCFDetailPanel.vue.d.ts +1 -1
  32. package/types/components/BCFComponents/BCFFilter.vue.d.ts +2 -2
  33. package/types/components/BCFComponents/commentInput.vue.d.ts +1 -1
  34. package/types/components/BCFComponents/commentsView.vue.d.ts +6 -6
  35. package/types/components/BCFComponents/imageView.vue.d.ts +1 -1
  36. package/types/components/BimViewerComponents/AnnotationTool.vue.d.ts +1 -1
  37. package/types/components/BimViewerComponents/CameraViewTool.vue.d.ts +12 -0
  38. package/types/components/BimViewerComponents/CommentTool.vue.d.ts +34 -1
  39. package/types/components/BimViewerComponents/MobileCommentsTool/add.vue.d.ts +14 -0
  40. package/types/components/BimViewerComponents/MobileCommentsTool/detail.vue.d.ts +11 -0
  41. package/types/components/BimViewerComponents/MobileCommentsTool/draw.vue.d.ts +17 -0
  42. package/types/components/BimViewerComponents/MobileCommentsTool/filter.vue.d.ts +275 -0
  43. package/types/components/BimViewerComponents/MobileCommentsTool/list.vue.d.ts +297 -0
  44. package/types/components/BimViewerComponents/MobileCommentsTool/zoomIn.vue.d.ts +9 -0
  45. package/types/components/BimViewerComponents/OperateTool.vue.d.ts +12 -0
  46. package/types/components/BimViewerComponents/PCCommentTool/pcdraw.vue.d.ts +14 -0
  47. package/types/components/BimViewerComponents/SectionModeBar.vue.d.ts +2 -0
  48. package/types/components/BimViewerComponents/StructureTree.vue.d.ts +8035 -419
  49. package/types/components/{industryViewer.vue.d.ts → BimxViewerComp.vue.d.ts} +7 -0
  50. package/types/components/IndustryViewerComp.vue.d.ts +25 -0
  51. package/types/components/MobileBCFComponents/MobileBCFAdd.vue.d.ts +1 -1
  52. package/types/components/MobileBCFComponents/MobileBCFDetail.vue.d.ts +1 -1
  53. package/types/components/MobileBCFComponents/MobileBCFDisplayList.vue.d.ts +100 -308
  54. package/types/components/MobileBCFComponents/MobileBCFFilter.vue.d.ts +100 -308
  55. package/types/components/MobileBCFComponents/MobileBCFTool.vue.d.ts +2 -0
  56. package/types/components/MobileBCFComponents/MobileCommentInput.vue.d.ts +4 -4
  57. package/types/components/utilsComponents/alert.vue.d.ts +9 -0
  58. package/types/components/utilsComponents/prompt.vue.d.ts +8 -0
  59. package/types/components/utilsComponents/rectangleButton.vue.d.ts +1 -1
  60. package/types/i18n/index.d.ts +1767 -0
  61. package/types/i18n/locales/en-US.d.ts +439 -0
  62. package/types/i18n/locales/zh-CN.d.ts +439 -0
  63. package/types/i18n/types.d.ts +144 -0
  64. package/types/index.d.ts +8 -5
  65. package/types/pages/{viewerEntry.vue.d.ts → BimxViewerEntry.vue.d.ts} +20 -8
  66. package/types/pages/IndustryViewerEntry.vue.d.ts +71 -0
  67. package/types/services/request/api.d.ts +3 -0
  68. package/types/services/request/index.d.ts +14 -0
  69. package/types/services/request/types.d.ts +12 -0
  70. package/types/store/bcfReflect.d.ts +8 -7
  71. package/types/store/const.d.ts +32 -3
  72. package/types/store/initConfigs.d.ts +3 -3
  73. package/types/store/localeStore.d.ts +12 -0
  74. package/types/store/propertyReflect.d.ts +1 -1
  75. package/types/store/toolbars.d.ts +596 -75
  76. package/types/store/userInfoStore.d.ts +32 -0
  77. package/types/tests/bcf.d.ts +8 -0
  78. package/types/utils/OSSHelper.d.ts +3 -0
  79. package/types/utils/eventBus.d.ts +23 -5
  80. package/types/utils/roles.d.ts +1 -1
  81. package/types/utils/splitType.d.ts +1 -0
  82. package/types/viewerManager/initial/viewerInitial.d.ts +14 -1
  83. package/types/viewerManager/load/loadModel.d.ts +137 -1
  84. package/types/viewerManager/sectionManager.d.ts +524 -0
  85. package/types/viewerManager/viewerManager.d.ts +19 -1
  86. package/dist/AnnotationTool-BZlQ0NIM.mjs +0 -131
  87. package/dist/BCFTool-DAqDUYS-.mjs +0 -25118
  88. package/dist/CommentTool-BwHOJoFe.mjs +0 -168
  89. package/dist/InspectorTool-BK5pX2nZ.mjs +0 -674
  90. package/dist/MeasureTool-D92Tyu14.mjs +0 -167
  91. package/dist/MouseTool-Dpl4JLyb.mjs +0 -84
  92. package/dist/NavigateTool-B5ySsqph.mjs +0 -52
  93. package/dist/RoamTool-Nk4hYPJB.mjs +0 -212
  94. package/dist/ScreenShotTool-D1cS2DkF.mjs +0 -445
  95. package/dist/SectionTool-D3885F5s.mjs +0 -217
  96. package/dist/SettingTool-BI_soRCO.mjs +0 -770
  97. package/dist/StructureTree-CCWwAbnr.mjs +0 -1824
  98. package/dist/XRayTool-IRgKMGU8.mjs +0 -57
  99. package/dist/alert-x4uA_EPv.mjs +0 -46
  100. package/dist/const-DeViLYl5.mjs +0 -266
  101. package/dist/el-checkbox-_VjUMARt.mjs +0 -544
  102. package/dist/el-input-number-Chi40nla.mjs +0 -1028
  103. package/dist/index-CaiiH-9N.mjs +0 -101871
  104. /package/types/components/BimViewerComponents/{mobileToolbar.vue.d.ts → AppToolbar.vue.d.ts} +0 -0
  105. /package/types/components/BimViewerComponents/{XRayTool.vue.d.ts → HiddenTool.vue.d.ts} +0 -0
@@ -0,0 +1,429 @@
1
+ import { _ as _e } from "./panel.vue_vue_type_style_index_0_lang-B-dNXuRK.mjs";
2
+ import { am as U, o as q, an as K, g as G, ao as Y, b as N, ap as J, aq as he, j as H, q as X, a as Se, ar as Ve, as as Ee, u as $, at as Re, au as ke, av as Ce, C as Ie, N as Be, aw as Pe, ax as W, w as xe, F as we, G as Ne, ay as T, J as ze } from "./index-COQ8NdId.mjs";
3
+ import { ref as C, inject as Te, computed as h, defineComponent as z, openBlock as R, createElementBlock as I, normalizeClass as E, unref as e, createElementVNode as y, withDirectives as Q, withModifiers as x, isRef as Z, vModelRadio as ee, renderSlot as D, createTextVNode as w, toDisplayString as B, nextTick as te, normalizeStyle as Le, onMounted as ae, provide as Ue, reactive as $e, toRefs as De, watch as oe, Fragment as le, renderList as se, createBlock as ne, resolveDynamicComponent as Fe, mergeProps as Ae, withCtx as L, createVNode as P, createCommentVNode as Oe } from "vue";
4
+ const ie = N({
5
+ /**
6
+ * @description binding value
7
+ */
8
+ modelValue: {
9
+ type: [
10
+ String,
11
+ Number,
12
+ Boolean
13
+ ],
14
+ default: void 0
15
+ },
16
+ /**
17
+ * @description size of the Radio
18
+ */
19
+ size: J,
20
+ /**
21
+ * @description whether Radio is disabled
22
+ */
23
+ disabled: {
24
+ type: Boolean,
25
+ default: void 0
26
+ },
27
+ /**
28
+ * @description the label of Radio
29
+ */
30
+ label: {
31
+ type: [
32
+ String,
33
+ Number,
34
+ Boolean
35
+ ],
36
+ default: void 0
37
+ },
38
+ /**
39
+ * @description the value of Radio
40
+ */
41
+ value: {
42
+ type: [
43
+ String,
44
+ Number,
45
+ Boolean
46
+ ],
47
+ default: void 0
48
+ },
49
+ /**
50
+ * @description native `name` attribute
51
+ */
52
+ name: {
53
+ type: String,
54
+ default: void 0
55
+ }
56
+ }), je = N({
57
+ ...ie,
58
+ /**
59
+ * @description whether to add a border around Radio
60
+ */
61
+ border: Boolean
62
+ }), re = {
63
+ [Y]: (o) => q(o) || K(o) || G(o),
64
+ [U]: (o) => q(o) || K(o) || G(o)
65
+ }, de = Symbol("radioGroupKey"), Me = N({ ...ie }), ue = {
66
+ label: "label",
67
+ value: "value",
68
+ disabled: "disabled"
69
+ }, qe = N({
70
+ /**
71
+ * @description native `id` attribute
72
+ */
73
+ id: {
74
+ type: String,
75
+ default: void 0
76
+ },
77
+ /**
78
+ * @description the size of radio buttons or bordered radios
79
+ */
80
+ size: J,
81
+ /**
82
+ * @description whether the nesting radios are disabled
83
+ */
84
+ disabled: {
85
+ type: Boolean,
86
+ default: void 0
87
+ },
88
+ /**
89
+ * @description binding value
90
+ */
91
+ modelValue: {
92
+ type: [
93
+ String,
94
+ Number,
95
+ Boolean
96
+ ],
97
+ default: void 0
98
+ },
99
+ /**
100
+ * @description border and background color when button is active
101
+ */
102
+ fill: {
103
+ type: String,
104
+ default: ""
105
+ },
106
+ /**
107
+ * @description font color when button is active
108
+ */
109
+ textColor: {
110
+ type: String,
111
+ default: ""
112
+ },
113
+ /**
114
+ * @description native `name` attribute
115
+ */
116
+ name: {
117
+ type: String,
118
+ default: void 0
119
+ },
120
+ /**
121
+ * @description whether to trigger form validation
122
+ */
123
+ validateEvent: {
124
+ type: Boolean,
125
+ default: !0
126
+ },
127
+ options: { type: H(Array) },
128
+ props: {
129
+ type: H(Object),
130
+ default: () => ue
131
+ },
132
+ type: {
133
+ type: String,
134
+ values: ["radio", "button"],
135
+ default: "radio"
136
+ },
137
+ ...he(["ariaLabel"])
138
+ }), Ke = re, ce = (o, S) => {
139
+ const l = C(), r = Te(de, void 0), s = h(() => !!r), f = h(() => X(o.value) ? o.label : o.value), c = h({
140
+ get() {
141
+ return s.value ? r.modelValue : o.modelValue;
142
+ },
143
+ set(g) {
144
+ s.value ? r.changeEvent(g) : S && S("update:modelValue", g), l.value.checked = o.modelValue === f.value;
145
+ }
146
+ }), i = Se(h(() => r == null ? void 0 : r.size)), n = Ve(h(() => r == null ? void 0 : r.disabled)), b = C(!1), v = h(() => n.value || s.value && c.value !== f.value ? -1 : 0);
147
+ return Ee({
148
+ from: "label act as value",
149
+ replacement: "value",
150
+ version: "3.0.0",
151
+ scope: "el-radio",
152
+ ref: "https://element-plus.org/en-US/component/radio.html"
153
+ }, h(() => s.value && X(o.value))), {
154
+ radioRef: l,
155
+ isGroup: s,
156
+ radioGroup: r,
157
+ focus: b,
158
+ size: i,
159
+ disabled: n,
160
+ tabIndex: v,
161
+ modelValue: c,
162
+ actualValue: f
163
+ };
164
+ }, Ge = [
165
+ "value",
166
+ "name",
167
+ "disabled",
168
+ "checked"
169
+ ];
170
+ var He = /* @__PURE__ */ z({
171
+ name: "ElRadio",
172
+ __name: "radio",
173
+ props: je,
174
+ emits: re,
175
+ setup(o, { emit: S }) {
176
+ const l = o, r = S, s = $("radio"), { radioRef: f, radioGroup: c, focus: i, size: n, disabled: b, modelValue: v, actualValue: g } = ce(l, r);
177
+ function d() {
178
+ te(() => r(U, v.value));
179
+ }
180
+ return (k, a) => {
181
+ var t;
182
+ return R(), I("label", { class: E([
183
+ e(s).b(),
184
+ e(s).is("disabled", e(b)),
185
+ e(s).is("focus", e(i)),
186
+ e(s).is("bordered", o.border),
187
+ e(s).is("checked", e(v) === e(g)),
188
+ e(s).m(e(n))
189
+ ]) }, [y("span", { class: E([
190
+ e(s).e("input"),
191
+ e(s).is("disabled", e(b)),
192
+ e(s).is("checked", e(v) === e(g))
193
+ ]) }, [Q(y("input", {
194
+ ref_key: "radioRef",
195
+ ref: f,
196
+ "onUpdate:modelValue": a[0] || (a[0] = (m) => Z(v) ? v.value = m : null),
197
+ class: E(e(s).e("original")),
198
+ value: e(g),
199
+ name: o.name || ((t = e(c)) == null ? void 0 : t.name),
200
+ disabled: e(b),
201
+ checked: e(v) === e(g),
202
+ type: "radio",
203
+ onFocus: a[1] || (a[1] = (m) => i.value = !0),
204
+ onBlur: a[2] || (a[2] = (m) => i.value = !1),
205
+ onChange: d,
206
+ onClick: a[3] || (a[3] = x(() => {
207
+ }, ["stop"]))
208
+ }, null, 42, Ge), [[ee, e(v)]]), y("span", { class: E(e(s).e("inner")) }, null, 2)], 2), y("span", {
209
+ class: E(e(s).e("label")),
210
+ onKeydown: a[4] || (a[4] = x(() => {
211
+ }, ["stop"]))
212
+ }, [D(k.$slots, "default", {}, () => [w(B(o.label), 1)])], 34)], 2);
213
+ };
214
+ }
215
+ }), me = He;
216
+ const Xe = [
217
+ "value",
218
+ "name",
219
+ "disabled"
220
+ ];
221
+ var Ye = /* @__PURE__ */ z({
222
+ name: "ElRadioButton",
223
+ __name: "radio-button",
224
+ props: Me,
225
+ setup(o) {
226
+ const S = o, l = $("radio"), { radioRef: r, focus: s, size: f, disabled: c, modelValue: i, radioGroup: n, actualValue: b } = ce(S), v = h(() => ({
227
+ backgroundColor: (n == null ? void 0 : n.fill) || "",
228
+ borderColor: (n == null ? void 0 : n.fill) || "",
229
+ boxShadow: n != null && n.fill ? `-1px 0 0 0 ${n.fill}` : "",
230
+ color: (n == null ? void 0 : n.textColor) || ""
231
+ }));
232
+ return (g, d) => {
233
+ var k;
234
+ return R(), I("label", { class: E([
235
+ e(l).b("button"),
236
+ e(l).is("active", e(i) === e(b)),
237
+ e(l).is("disabled", e(c)),
238
+ e(l).is("focus", e(s)),
239
+ e(l).bm("button", e(f))
240
+ ]) }, [Q(y("input", {
241
+ ref_key: "radioRef",
242
+ ref: r,
243
+ "onUpdate:modelValue": d[0] || (d[0] = (a) => Z(i) ? i.value = a : null),
244
+ class: E(e(l).be("button", "original-radio")),
245
+ value: e(b),
246
+ type: "radio",
247
+ name: o.name || ((k = e(n)) == null ? void 0 : k.name),
248
+ disabled: e(c),
249
+ onFocus: d[1] || (d[1] = (a) => s.value = !0),
250
+ onBlur: d[2] || (d[2] = (a) => s.value = !1),
251
+ onClick: d[3] || (d[3] = x(() => {
252
+ }, ["stop"]))
253
+ }, null, 42, Xe), [[ee, e(i)]]), y("span", {
254
+ class: E(e(l).be("button", "inner")),
255
+ style: Le(e(i) === e(b) ? v.value : {}),
256
+ onKeydown: d[4] || (d[4] = x(() => {
257
+ }, ["stop"]))
258
+ }, [D(g.$slots, "default", {}, () => [w(B(o.label), 1)])], 38)], 2);
259
+ };
260
+ }
261
+ }), F = Ye;
262
+ const Je = [
263
+ "id",
264
+ "aria-label",
265
+ "aria-labelledby"
266
+ ];
267
+ var We = /* @__PURE__ */ z({
268
+ name: "ElRadioGroup",
269
+ __name: "radio-group",
270
+ props: qe,
271
+ emits: Ke,
272
+ setup(o, { emit: S }) {
273
+ const l = o, r = S, s = $("radio"), f = Re(), c = C(), { formItem: i } = ke(), { inputId: n, isLabeledByFormItem: b } = Ce(l, { formItemContext: i }), v = (t) => {
274
+ r(Y, t), te(() => r(U, t));
275
+ };
276
+ ae(() => {
277
+ const t = c.value.querySelectorAll("[type=radio]"), m = t[0];
278
+ !Array.from(t).some((u) => u.checked) && m && (m.tabIndex = 0);
279
+ });
280
+ const g = h(() => l.name || f.value), d = h(() => ({
281
+ ...ue,
282
+ ...l.props
283
+ })), k = (t) => {
284
+ const { label: m, value: u, disabled: _ } = d.value, V = {
285
+ label: t[m],
286
+ value: t[u],
287
+ disabled: t[_]
288
+ };
289
+ return {
290
+ ...Pe(t, [
291
+ m,
292
+ u,
293
+ _
294
+ ]),
295
+ ...V
296
+ };
297
+ }, a = h(() => l.type === "button" ? F : me);
298
+ return Ue(de, $e({
299
+ ...De(l),
300
+ changeEvent: v,
301
+ name: g
302
+ })), oe(() => l.modelValue, (t, m) => {
303
+ l.validateEvent && !Ie(t, m) && (i == null || i.validate("change").catch(Be));
304
+ }), (t, m) => (R(), I("div", {
305
+ id: e(n),
306
+ ref_key: "radioGroupRef",
307
+ ref: c,
308
+ class: E(e(s).b("group")),
309
+ role: "radiogroup",
310
+ "aria-label": e(b) ? void 0 : o.ariaLabel || "radio-group",
311
+ "aria-labelledby": e(b) ? e(i).labelId : void 0
312
+ }, [D(t.$slots, "default", {}, () => [(R(!0), I(le, null, se(o.options, (u, _) => (R(), ne(Fe(a.value), Ae({ key: _ }, { ref_for: !0 }, k(u)), null, 16))), 128))])], 10, Je));
313
+ }
314
+ }), pe = We;
315
+ const Qe = xe(me, {
316
+ RadioButton: F,
317
+ RadioGroup: pe
318
+ }), Ze = W(pe);
319
+ W(F);
320
+ const et = { class: "wrapper" }, tt = { class: "screen_thumbnail" }, at = ["src"], ot = { class: "validity-period" }, lt = {
321
+ key: 0,
322
+ class: "custom"
323
+ }, st = { class: "footer" }, dt = /* @__PURE__ */ z({
324
+ __name: "ScreenShotTool",
325
+ props: ["componentId"],
326
+ emits: ["closePanel"],
327
+ setup(o, { emit: S }) {
328
+ const l = we(), r = Ne(), s = o, f = C(0), c = C(), i = C(), n = C(), b = S;
329
+ ae(() => {
330
+ c.value = 1280, i.value = 720, r.setReadyById(s.componentId);
331
+ }), oe(
332
+ () => r.isToolActive(s.componentId),
333
+ (a) => {
334
+ a && d(220, 124, !1);
335
+ }
336
+ );
337
+ const v = (a) => {
338
+ f.value = a, a !== 3 && (c.value = T[a].width, i.value = T[a].height);
339
+ }, g = () => {
340
+ b("closePanel");
341
+ }, d = (a, t, m) => {
342
+ const u = document.getElementById("myCanvas"), _ = document.createElement("a");
343
+ _.download = "screenshot.png";
344
+ const V = document.createElement("canvas"), p = V.getContext("2d");
345
+ if (u && p) {
346
+ V.width = a, V.height = t;
347
+ const ve = a / u.width, fe = t / u.height, A = Math.max(ve, fe), O = u.width * A, j = u.height * A, be = (a - O) / 2, ge = (t - j) / 2;
348
+ p.clearRect(0, 0, a, t), p.fillStyle = "transparent", p.fillRect(0, 0, a, t), p.drawImage(u, 0, 0, u.width, u.height, be, ge, O, j), m ? V.toBlob(function(ye) {
349
+ const M = URL.createObjectURL(ye);
350
+ _.href = M, _.click(), URL.revokeObjectURL(M);
351
+ }) : n.value = V.toDataURL("image/png");
352
+ }
353
+ }, k = () => {
354
+ d(c.value, i.value, !0);
355
+ };
356
+ return (a, t) => {
357
+ const m = Qe, u = Ze, _ = ze, V = _e;
358
+ return R(), ne(V, {
359
+ class: "screen_container",
360
+ width: 240,
361
+ panelTitle: e(l)("screenshot.title"),
362
+ "click-handle": g
363
+ }, {
364
+ default: L(() => [
365
+ y("div", et, [
366
+ y("div", tt, [
367
+ y("img", {
368
+ class: "thumbnail_img",
369
+ src: n.value,
370
+ alt: ""
371
+ }, null, 8, at)
372
+ ]),
373
+ P(u, {
374
+ modelValue: f.value,
375
+ "onUpdate:modelValue": t[0] || (t[0] = (p) => f.value = p),
376
+ onChange: v
377
+ }, {
378
+ default: L(() => [
379
+ y("div", ot, [
380
+ (R(!0), I(le, null, se(e(T), (p) => (R(), I("div", {
381
+ key: p.id,
382
+ class: "period_box"
383
+ }, [
384
+ P(m, {
385
+ label: p.id
386
+ }, {
387
+ default: L(() => [
388
+ w(B(p.name || e(l)(p.label ?? "")), 1)
389
+ ]),
390
+ _: 2
391
+ }, 1032, ["label"])
392
+ ]))), 128))
393
+ ])
394
+ ]),
395
+ _: 1
396
+ }, 8, ["modelValue"]),
397
+ f.value === 3 ? (R(), I("div", lt, [
398
+ P(_, {
399
+ modelValue: c.value,
400
+ "onUpdate:modelValue": t[1] || (t[1] = (p) => c.value = p),
401
+ placeholder: e(l)("screenshot.widthPlaceholder")
402
+ }, null, 8, ["modelValue", "placeholder"]),
403
+ t[3] || (t[3] = w(" x ", -1)),
404
+ P(_, {
405
+ modelValue: i.value,
406
+ "onUpdate:modelValue": t[2] || (t[2] = (p) => i.value = p),
407
+ placeholder: e(l)("screenshot.heightPlaceholder")
408
+ }, null, 8, ["modelValue", "placeholder"])
409
+ ])) : Oe("", !0),
410
+ y("div", st, [
411
+ y("div", {
412
+ class: "btn1",
413
+ onClick: g
414
+ }, B(e(l)("common.cancel")), 1),
415
+ y("div", {
416
+ class: "btn2",
417
+ onClick: k
418
+ }, B(e(l)("common.save")), 1)
419
+ ])
420
+ ])
421
+ ]),
422
+ _: 1
423
+ }, 8, ["panelTitle"]);
424
+ };
425
+ }
426
+ });
427
+ export {
428
+ dt as default
429
+ };
@@ -0,0 +1,241 @@
1
+ import { _ as be } from "./alert-CgfjcpRo.mjs";
2
+ import { F as ge, G as ke, T as q, H as b, I as f, a1 as W, a2 as h, P as g, a3 as Se, K as we, a4 as ye, L as Ce, M as xe } from "./index-COQ8NdId.mjs";
3
+ import { _ as Le } from "./panel.vue_vue_type_style_index_0_lang-B-dNXuRK.mjs";
4
+ import { defineComponent as Be, ref as _, onMounted as Pe, watch as Te, onBeforeUnmount as Ve, openBlock as a, createElementBlock as d, Fragment as I, unref as n, createBlock as Ee, withCtx as J, createElementVNode as o, toDisplayString as v, withDirectives as Q, renderList as X, vShow as Y, createVNode as L, normalizeClass as Z, withModifiers as Ie, createTextVNode as Me } from "vue";
5
+ const Oe = { class: "section_panel_middle" }, Ae = { class: "section_middle_title" }, $e = { class: "section_control_button" }, De = ["src"], He = { class: "control_buttons" }, Ne = ["onClick"], ze = { class: "section_panel_cont" }, Re = {
6
+ key: 0,
7
+ class: ""
8
+ }, Fe = ["onClick"], Ue = { class: "cont_item_left" }, je = ["src", "onClick"], Ge = { class: "cont_item_right" }, Ke = ["src", "onClick"], qe = ["src", "onClick"], We = ["src", "onClick"], Je = {
9
+ key: 1,
10
+ class: "empty1"
11
+ }, Qe = {
12
+ key: 1,
13
+ class: "mobile_section_panel"
14
+ }, Xe = { class: "slicing-title-box" }, Ye = { class: "slicing-title" }, Ze = { class: "slicing-title-icon" }, eo = { class: "slicing-content-box" }, oo = { class: "mobile_box_buttons" }, to = /* @__PURE__ */ Be({
15
+ __name: "SectionTool",
16
+ props: ["componentId"],
17
+ emits: ["closePanel"],
18
+ setup(ee, { emit: oe }) {
19
+ const r = ge(), M = ke(), O = ee, B = _(0);
20
+ Pe(() => {
21
+ M.setReadyById(O.componentId), q.currentTheme == "blue" ? B.value = 240 : q.currentTheme == "light-gray" && (B.value = 202), w(), window.addEventListener("resize", w), document.addEventListener("click", A);
22
+ });
23
+ const A = (e) => {
24
+ S.value && e.target.id != "controlOperatePanel" && H(!1);
25
+ }, $ = _(!0), k = _(!1), i = _(), u = _(), S = _(!1), D = _(360), H = (e) => {
26
+ S.value = e;
27
+ };
28
+ let s, N;
29
+ const z = oe;
30
+ Te(
31
+ () => M.isToolActive(O.componentId),
32
+ (e) => {
33
+ e && (P(), w(), b("isMobile") && F());
34
+ }
35
+ );
36
+ const R = () => {
37
+ s = window.bimViewer.sectionTool, N = window.bimViewer.eventTrigger, b("isMobile") || N.on("createSection", (e) => {
38
+ y(), i.value = Object.keys(K()).map((t) => ({
39
+ id: t,
40
+ isLook: !0,
41
+ directionLeft: !0
42
+ })), ae(e.id, !0), u.value = e.id, T(e.id);
43
+ });
44
+ };
45
+ f.on("BimViewer", R), f.on(W, P), Ve(() => {
46
+ f.off("BimViewer", R), f.off(W, P), window.removeEventListener("resize", w), document.removeEventListener("click", A);
47
+ });
48
+ function te() {
49
+ $.value = !1;
50
+ }
51
+ function w() {
52
+ if (b("isMobile")) return;
53
+ const e = parseFloat(getComputedStyle(document.documentElement).getPropertyValue("--section-content-height")) || 360, t = document.querySelector(".bimx-components-wrapper"), c = ((t == null ? void 0 : t.clientHeight) || window.innerHeight) - 216;
54
+ D.value = Math.max(140, Math.min(e, c));
55
+ }
56
+ const m = _(!1);
57
+ function F() {
58
+ m.value = h.IsBoxVisible();
59
+ }
60
+ function ne() {
61
+ h.ResetBox(), F();
62
+ }
63
+ function ie() {
64
+ m.value = h.ToggleBoxVisible();
65
+ }
66
+ function se() {
67
+ h.CloseBox(), h.SetActive(!1), z("closePanel"), f.emit("hideToolbar", !1);
68
+ }
69
+ function P() {
70
+ if (!s) return;
71
+ const e = K() || {}, t = i.value || [], c = Object.keys(e).map((p) => {
72
+ const C = t.find((V) => V.id === p);
73
+ return {
74
+ id: p,
75
+ isLook: !!e[p].active,
76
+ directionLeft: C ? C.directionLeft : !0
77
+ };
78
+ });
79
+ i.value = c, u.value = c.length ? c[0].id : "", m.value = h.IsBoxVisible();
80
+ }
81
+ const U = () => {
82
+ s.setActive(!1), z("closePanel"), f.emit("hideToolbar", !1);
83
+ }, le = (e) => {
84
+ u.value !== e.id && (u.value = e.id, k.value = !1, y(), T(e.id));
85
+ }, ce = (e) => {
86
+ y(), e.isLook = !e.isLook, e.isLook ? (e.isLook = !0, de(e.id)) : _e(e.id), T(u.value);
87
+ }, T = (e) => {
88
+ s.showSectionPlane(e);
89
+ }, j = (e) => {
90
+ if (i.value)
91
+ for (let t = 0; t < i.value.length; t++)
92
+ i.value[t].isLook = e;
93
+ }, ae = (e, t) => {
94
+ for (let c = 0; c < i.value.length; c++)
95
+ e == i.value[c].id && (i.value[c].isLook = t);
96
+ }, G = (e) => {
97
+ e.directionLeft = !e.directionLeft, he(e.id);
98
+ }, re = (e) => {
99
+ s.destroySectionPlane(e), i.value = i.value.filter((t) => t.id !== e);
100
+ }, de = (e) => {
101
+ s.setSectionEnable(e);
102
+ }, _e = (e) => {
103
+ s.setSectionDisable(e);
104
+ }, ue = () => {
105
+ j(!0), s.enableSections(), s.showControl(), k.value = !0;
106
+ }, ve = () => {
107
+ j(!1), s.disableSections(), k.value = !1, u.value = "";
108
+ }, fe = (e) => {
109
+ e.id === 0 ? (me(), i.value = []) : e.id === 1 ? pe() : e.id === 2 ? ue() : e.id === 4 && (ve(), y());
110
+ }, he = (e) => {
111
+ s.flipSection(e);
112
+ }, K = () => s.getSectionPlanes(), me = () => {
113
+ s.clear();
114
+ }, pe = () => {
115
+ s.flipSections();
116
+ }, y = () => {
117
+ s.hideControl();
118
+ };
119
+ return (e, t) => {
120
+ const c = we, p = Le, C = Ce, V = be;
121
+ return a(), d(I, null, [
122
+ n(b)("isMobile") ? (a(), d("div", Qe, [
123
+ o("div", Xe, [
124
+ o("div", Ye, v(n(r)("section.boxMode")), 1),
125
+ o("div", Ze, [
126
+ L(C, {
127
+ width: 0.4,
128
+ "size-type": "rem",
129
+ "click-handle": U
130
+ })
131
+ ])
132
+ ]),
133
+ o("div", eo, [
134
+ o("div", oo, [
135
+ o("div", {
136
+ class: "mobile_box_button",
137
+ onClick: ne
138
+ }, v(n(r)("common.reset")), 1),
139
+ o("div", {
140
+ class: Z(["mobile_box_button", { mobile_box_button_active: m.value }]),
141
+ onClick: ie
142
+ }, v(n(r)(m.value ? "section.boxHide" : "section.boxShow")), 3),
143
+ o("div", {
144
+ class: "mobile_box_button",
145
+ onClick: se
146
+ }, v(n(r)("common.close")), 1)
147
+ ])
148
+ ])
149
+ ])) : (a(), Ee(p, {
150
+ key: 0,
151
+ class: "section_panel",
152
+ width: B.value,
153
+ panelTitle: n(r)("toolbar.section"),
154
+ "click-handle": U
155
+ }, {
156
+ default: J(() => [
157
+ o("div", Oe, [
158
+ o("div", Ae, v(n(r)("section.allSections")), 1),
159
+ o("div", $e, [
160
+ o("img", {
161
+ id: "controlOperatePanel",
162
+ src: n(g) + "/bim-viewer/slicing-more.png",
163
+ onClick: t[0] || (t[0] = (l) => H(!S.value))
164
+ }, null, 8, De),
165
+ Q(o("div", He, [
166
+ (a(!0), d(I, null, X(n(Se), (l) => (a(), d("div", {
167
+ key: l.id,
168
+ class: "operation_button",
169
+ onClick: (E) => fe(l)
170
+ }, [
171
+ o("span", null, v(n(r)(l.name)), 1)
172
+ ], 8, Ne))), 128))
173
+ ], 512), [
174
+ [Y, S.value]
175
+ ])
176
+ ])
177
+ ]),
178
+ o("div", ze, [
179
+ L(c, {
180
+ height: D.value + "px"
181
+ }, {
182
+ default: J(() => [
183
+ i.value && i.value.length ? (a(), d("div", Re, [
184
+ (a(!0), d(I, null, X(i.value, (l, E) => (a(), d("div", {
185
+ key: E,
186
+ class: Z(["panel_cont_item", { panel_cont_item_choose: u.value === l.id || k.value }]),
187
+ onClick: (x) => le(l)
188
+ }, [
189
+ o("div", Ue, [
190
+ o("img", {
191
+ src: `${n(g)}/bim-viewer/${l.isLook ? "section_look_icon.png" : "section_unlook_icon.png"}`,
192
+ alt: "",
193
+ onClick: Ie((x) => ce(l), ["stop"])
194
+ }, null, 8, je),
195
+ Me(" " + v(n(r)("section.sectionPrefix") + (E + 1)), 1)
196
+ ]),
197
+ o("div", Ge, [
198
+ l.directionLeft ? (a(), d("img", {
199
+ key: 0,
200
+ src: n(g) + "/bim-viewer/left_section_icon.png",
201
+ alt: "",
202
+ onClick: (x) => G(l)
203
+ }, null, 8, Ke)) : (a(), d("img", {
204
+ key: 1,
205
+ src: n(g) + "/bim-viewer/right_section_icon.png",
206
+ alt: "",
207
+ onClick: (x) => G(l)
208
+ }, null, 8, qe)),
209
+ o("img", {
210
+ src: n(g) + "/bim-viewer/section_del_icon.png",
211
+ alt: "",
212
+ onClick: (x) => re(l.id)
213
+ }, null, 8, We)
214
+ ])
215
+ ], 10, Fe))), 128))
216
+ ])) : (a(), d("div", Je, [
217
+ L(ye, {
218
+ title: n(r)("common.noData"),
219
+ type: "model"
220
+ }, null, 8, ["title"])
221
+ ]))
222
+ ]),
223
+ _: 1
224
+ }, 8, ["height"])
225
+ ])
226
+ ]),
227
+ _: 1
228
+ }, 8, ["width", "panelTitle"])),
229
+ Q(L(V, {
230
+ title: n(r)("alert.selectSectionPlane"),
231
+ "click-handle": te
232
+ }, null, 8, ["title"]), [
233
+ [Y, $.value && !n(b)("isMobile")]
234
+ ])
235
+ ], 64);
236
+ };
237
+ }
238
+ }), co = /* @__PURE__ */ xe(to, [["__scopeId", "data-v-3a586562"]]);
239
+ export {
240
+ co as default
241
+ };