@xtctwins/tctwins-bimx-engine 0.3.0 → 0.3.2

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-5pEYzrMO.mjs} +8 -8
  3. package/dist/AnnotationTool-B3tDIyWy.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--UgPVIZZ.mjs +1541 -0
  7. package/dist/{HiddenTool-CoPawMRd.mjs → HiddenTool-rORoKTeD.mjs} +16 -16
  8. package/dist/{InspectorTool-BIvnydPf.mjs → InspectorTool-l4bDxTia.mjs} +66 -66
  9. package/dist/{MeasureTool-BUi0QI_R.mjs → MeasureTool-d-EV6m2R.mjs} +126 -102
  10. package/dist/{MouseTool-CdVwRiX1.mjs → MouseTool-DKMcdeRD.mjs} +35 -32
  11. package/dist/{NavigateTool-DoP9z3yP.mjs → NavigateTool-BNvZ8Oat.mjs} +13 -13
  12. package/dist/{panel.vue_vue_type_style_index_0_lang-BaSZShh_.mjs → Panel.vue_vue_type_style_index_0_lang-C4tqfy-B.mjs} +2 -2
  13. package/dist/{RoamTool-POFy076i.mjs → RoamTool-DJu93SVl.mjs} +14 -14
  14. package/dist/ScreenShotTool-D2h0Qjtv.mjs +430 -0
  15. package/dist/SectionTool-DHw2Zfzv.mjs +343 -0
  16. package/dist/SettingTool-D13GBT87.mjs +747 -0
  17. package/dist/StructureTree-DHaOzAP9.mjs +1662 -0
  18. package/dist/{tallPanel-DKlcFjrl.mjs → TallPanel-DtXOSzmF.mjs} +14 -14
  19. package/dist/bimTools-D3TraX9d.mjs +75 -0
  20. package/dist/el-slider-CHaMBaUG.mjs +1040 -0
  21. package/dist/{index-Dsq1epCY.mjs → index-BDupeKSG.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,5 +1,5 @@
1
- import { defineComponent as A, ref as u, onMounted as j, onBeforeUnmount as q, watch as z, openBlock as h, createElementBlock as b, unref as r, createElementVNode as e, toDisplayString as m, createCommentVNode as L } from "vue";
2
- import { o as J, n as K, p as c, C as S, q as M, O as l, D as V, y as Q } from "./index-Dsq1epCY.mjs";
1
+ import { defineComponent as H, ref as u, onMounted as j, onBeforeUnmount as q, watch as z, openBlock as h, createElementBlock as b, unref as r, createElementVNode as e, toDisplayString as m, createCommentVNode as L } from "vue";
2
+ import { B as J, A as K, C as c, M as S, D as M, O as l, P as V, I as Q } from "./index-BDupeKSG.mjs";
3
3
  const W = { class: "roam_container_wrapper" }, Y = {
4
4
  key: 0,
5
5
  class: "roam_container"
@@ -24,20 +24,20 @@ const W = { class: "roam_container_wrapper" }, Y = {
24
24
  }, De = ["src"], ke = { class: "center-center" }, Se = ["src"], Ve = {
25
25
  id: "roamMoveRight",
26
26
  class: "center-right"
27
- }, Ue = ["src"], Fe = {
27
+ }, Pe = ["src"], Ue = {
28
28
  id: "roamMoveDown",
29
29
  class: "roam-right-down"
30
- }, Pe = ["src"], xe = /* @__PURE__ */ A({
30
+ }, Fe = ["src"], xe = /* @__PURE__ */ H({
31
31
  __name: "RoamTool",
32
32
  props: ["componentId"],
33
33
  emits: ["closePanel", "emitHandler"],
34
- setup(U, { emit: F }) {
35
- const y = J(), v = K(), E = u("speed-up"), B = u("speed-down"), f = u("1"), g = u(!1), w = u(!0), R = U, T = F, a = u(!1), I = (t) => {
34
+ setup(P, { emit: U }) {
35
+ const y = J(), v = K(), E = u("speed-up"), B = u("speed-down"), f = u("1"), g = u(!1), w = u(!0), R = P, T = U, a = u(!1), I = (t) => {
36
36
  T("emitHandler", t);
37
37
  }, n = u(c("isMobile"));
38
38
  j(() => {
39
39
  (c("isMobile") || S.showRoam === !1) && (w.value = !1), setTimeout(() => {
40
- $(), N(), O(), X(), G(), H();
40
+ $(), N(), O(), X(), G(), A();
41
41
  }, 1e3), y.setReadyById(R.componentId);
42
42
  });
43
43
  const C = () => {
@@ -64,7 +64,7 @@ const W = { class: "roam_container_wrapper" }, Y = {
64
64
  );
65
65
  const D = (t) => {
66
66
  c("isMobile") ? a.value = t : (c("hideTool") || M.emit("hideToolbar", t), t ? w.value && (g.value = !0) : g.value = !1);
67
- }, P = () => {
67
+ }, F = () => {
68
68
  w.value = !1, I({
69
69
  isTool: !0,
70
70
  event_target: "RoamTool",
@@ -122,7 +122,7 @@ const W = { class: "roam_container_wrapper" }, Y = {
122
122
  }), (s = document.getElementById("roamMoveForward")) == null || s.addEventListener(n.value ? "touchcancel" : "mouseup", () => {
123
123
  a.value && i();
124
124
  });
125
- }, H = () => {
125
+ }, A = () => {
126
126
  var t, o, s;
127
127
  (t = document.getElementById("roamMoveBackward")) == null || t.addEventListener(n.value ? "touchstart" : "mousedown", (d) => {
128
128
  a.value && (n.value && d.preventDefault(), window.bimViewer.firstPersonMode.goBackward = !0, _("goBackward"));
@@ -161,7 +161,7 @@ const W = { class: "roam_container_wrapper" }, Y = {
161
161
  e("div", oe, [
162
162
  e("div", {
163
163
  class: "btn1",
164
- onClick: P
164
+ onClick: F
165
165
  }, m(r(v)("roam.dontRemind")), 1),
166
166
  e("div", {
167
167
  class: "btn2",
@@ -268,20 +268,20 @@ const W = { class: "roam_container_wrapper" }, Y = {
268
268
  e("img", {
269
269
  src: r(l) + "/bim-viewer/roam-bar/right.svg",
270
270
  alt: ""
271
- }, null, 8, Ue)
271
+ }, null, 8, Pe)
272
272
  ])
273
273
  ]),
274
- e("div", Fe, [
274
+ e("div", Ue, [
275
275
  e("img", {
276
276
  src: r(l) + "/bim-viewer/roam-bar/bottom.svg",
277
277
  alt: ""
278
- }, null, 8, Pe)
278
+ }, null, 8, Fe)
279
279
  ])
280
280
  ])
281
281
  ])) : L("", !0)
282
282
  ]));
283
283
  }
284
- }), Oe = /* @__PURE__ */ Q(xe, [["__scopeId", "data-v-566257e2"]]);
284
+ }), Oe = /* @__PURE__ */ Q(xe, [["__scopeId", "data-v-3c440223"]]);
285
285
  export {
286
286
  Oe as default
287
287
  };
@@ -0,0 +1,430 @@
1
+ import { _ as _e } from "./Panel.vue_vue_type_style_index_0_lang-C4tqfy-B.mjs";
2
+ import { a7 as U, l as K, a8 as q, d as G, a9 as Y, b as N, aa as W, ab as he, f as H, n as X, a as Se, ac as Ve, ad as Ee, u as $, ae as Re, af as ke, ag as Be, y as Ce, N as Ie, ah as Pe, ai as J, w as xe, A as we, B as Ne, F as ze } from "./index-BDupeKSG.mjs";
3
+ import { ref as B, inject as Te, computed as h, defineComponent as z, openBlock as R, createElementBlock as C, normalizeClass as E, unref as e, createElementVNode as y, withDirectives as Q, withModifiers as x, isRef as Z, vModelRadio as ee, renderSlot as A, createTextVNode as w, toDisplayString as I, nextTick as te, normalizeStyle as Le, onMounted as ae, provide as Ue, reactive as $e, toRefs as Ae, watch as oe, Fragment as le, renderList as se, createBlock as ne, resolveDynamicComponent as De, mergeProps as Fe, withCtx as T, createVNode as P, createCommentVNode as Oe } from "vue";
4
+ import { a as L } from "./bimTools-D3TraX9d.mjs";
5
+ const ie = N({
6
+ /**
7
+ * @description binding value
8
+ */
9
+ modelValue: {
10
+ type: [
11
+ String,
12
+ Number,
13
+ Boolean
14
+ ],
15
+ default: void 0
16
+ },
17
+ /**
18
+ * @description size of the Radio
19
+ */
20
+ size: W,
21
+ /**
22
+ * @description whether Radio is disabled
23
+ */
24
+ disabled: {
25
+ type: Boolean,
26
+ default: void 0
27
+ },
28
+ /**
29
+ * @description the label of Radio
30
+ */
31
+ label: {
32
+ type: [
33
+ String,
34
+ Number,
35
+ Boolean
36
+ ],
37
+ default: void 0
38
+ },
39
+ /**
40
+ * @description the value of Radio
41
+ */
42
+ value: {
43
+ type: [
44
+ String,
45
+ Number,
46
+ Boolean
47
+ ],
48
+ default: void 0
49
+ },
50
+ /**
51
+ * @description native `name` attribute
52
+ */
53
+ name: {
54
+ type: String,
55
+ default: void 0
56
+ }
57
+ }), Me = N({
58
+ ...ie,
59
+ /**
60
+ * @description whether to add a border around Radio
61
+ */
62
+ border: Boolean
63
+ }), re = {
64
+ [Y]: (o) => K(o) || q(o) || G(o),
65
+ [U]: (o) => K(o) || q(o) || G(o)
66
+ }, de = Symbol("radioGroupKey"), je = N({ ...ie }), ue = {
67
+ label: "label",
68
+ value: "value",
69
+ disabled: "disabled"
70
+ }, Ke = N({
71
+ /**
72
+ * @description native `id` attribute
73
+ */
74
+ id: {
75
+ type: String,
76
+ default: void 0
77
+ },
78
+ /**
79
+ * @description the size of radio buttons or bordered radios
80
+ */
81
+ size: W,
82
+ /**
83
+ * @description whether the nesting radios are disabled
84
+ */
85
+ disabled: {
86
+ type: Boolean,
87
+ default: void 0
88
+ },
89
+ /**
90
+ * @description binding value
91
+ */
92
+ modelValue: {
93
+ type: [
94
+ String,
95
+ Number,
96
+ Boolean
97
+ ],
98
+ default: void 0
99
+ },
100
+ /**
101
+ * @description border and background color when button is active
102
+ */
103
+ fill: {
104
+ type: String,
105
+ default: ""
106
+ },
107
+ /**
108
+ * @description font color when button is active
109
+ */
110
+ textColor: {
111
+ type: String,
112
+ default: ""
113
+ },
114
+ /**
115
+ * @description native `name` attribute
116
+ */
117
+ name: {
118
+ type: String,
119
+ default: void 0
120
+ },
121
+ /**
122
+ * @description whether to trigger form validation
123
+ */
124
+ validateEvent: {
125
+ type: Boolean,
126
+ default: !0
127
+ },
128
+ options: { type: H(Array) },
129
+ props: {
130
+ type: H(Object),
131
+ default: () => ue
132
+ },
133
+ type: {
134
+ type: String,
135
+ values: ["radio", "button"],
136
+ default: "radio"
137
+ },
138
+ ...he(["ariaLabel"])
139
+ }), qe = re, ce = (o, S) => {
140
+ const l = B(), r = Te(de, void 0), s = h(() => !!r), f = h(() => X(o.value) ? o.label : o.value), c = h({
141
+ get() {
142
+ return s.value ? r.modelValue : o.modelValue;
143
+ },
144
+ set(g) {
145
+ s.value ? r.changeEvent(g) : S && S("update:modelValue", g), l.value.checked = o.modelValue === f.value;
146
+ }
147
+ }), i = Se(h(() => r == null ? void 0 : r.size)), n = Ve(h(() => r == null ? void 0 : r.disabled)), b = B(!1), v = h(() => n.value || s.value && c.value !== f.value ? -1 : 0);
148
+ return Ee({
149
+ from: "label act as value",
150
+ replacement: "value",
151
+ version: "3.0.0",
152
+ scope: "el-radio",
153
+ ref: "https://element-plus.org/en-US/component/radio.html"
154
+ }, h(() => s.value && X(o.value))), {
155
+ radioRef: l,
156
+ isGroup: s,
157
+ radioGroup: r,
158
+ focus: b,
159
+ size: i,
160
+ disabled: n,
161
+ tabIndex: v,
162
+ modelValue: c,
163
+ actualValue: f
164
+ };
165
+ }, Ge = [
166
+ "value",
167
+ "name",
168
+ "disabled",
169
+ "checked"
170
+ ];
171
+ var He = /* @__PURE__ */ z({
172
+ name: "ElRadio",
173
+ __name: "radio",
174
+ props: Me,
175
+ emits: re,
176
+ setup(o, { emit: S }) {
177
+ const l = o, r = S, s = $("radio"), { radioRef: f, radioGroup: c, focus: i, size: n, disabled: b, modelValue: v, actualValue: g } = ce(l, r);
178
+ function d() {
179
+ te(() => r(U, v.value));
180
+ }
181
+ return (k, a) => {
182
+ var t;
183
+ return R(), C("label", { class: E([
184
+ e(s).b(),
185
+ e(s).is("disabled", e(b)),
186
+ e(s).is("focus", e(i)),
187
+ e(s).is("bordered", o.border),
188
+ e(s).is("checked", e(v) === e(g)),
189
+ e(s).m(e(n))
190
+ ]) }, [y("span", { class: E([
191
+ e(s).e("input"),
192
+ e(s).is("disabled", e(b)),
193
+ e(s).is("checked", e(v) === e(g))
194
+ ]) }, [Q(y("input", {
195
+ ref_key: "radioRef",
196
+ ref: f,
197
+ "onUpdate:modelValue": a[0] || (a[0] = (m) => Z(v) ? v.value = m : null),
198
+ class: E(e(s).e("original")),
199
+ value: e(g),
200
+ name: o.name || ((t = e(c)) == null ? void 0 : t.name),
201
+ disabled: e(b),
202
+ checked: e(v) === e(g),
203
+ type: "radio",
204
+ onFocus: a[1] || (a[1] = (m) => i.value = !0),
205
+ onBlur: a[2] || (a[2] = (m) => i.value = !1),
206
+ onChange: d,
207
+ onClick: a[3] || (a[3] = x(() => {
208
+ }, ["stop"]))
209
+ }, null, 42, Ge), [[ee, e(v)]]), y("span", { class: E(e(s).e("inner")) }, null, 2)], 2), y("span", {
210
+ class: E(e(s).e("label")),
211
+ onKeydown: a[4] || (a[4] = x(() => {
212
+ }, ["stop"]))
213
+ }, [A(k.$slots, "default", {}, () => [w(I(o.label), 1)])], 34)], 2);
214
+ };
215
+ }
216
+ }), me = He;
217
+ const Xe = [
218
+ "value",
219
+ "name",
220
+ "disabled"
221
+ ];
222
+ var Ye = /* @__PURE__ */ z({
223
+ name: "ElRadioButton",
224
+ __name: "radio-button",
225
+ props: je,
226
+ setup(o) {
227
+ const S = o, l = $("radio"), { radioRef: r, focus: s, size: f, disabled: c, modelValue: i, radioGroup: n, actualValue: b } = ce(S), v = h(() => ({
228
+ backgroundColor: (n == null ? void 0 : n.fill) || "",
229
+ borderColor: (n == null ? void 0 : n.fill) || "",
230
+ boxShadow: n != null && n.fill ? `-1px 0 0 0 ${n.fill}` : "",
231
+ color: (n == null ? void 0 : n.textColor) || ""
232
+ }));
233
+ return (g, d) => {
234
+ var k;
235
+ return R(), C("label", { class: E([
236
+ e(l).b("button"),
237
+ e(l).is("active", e(i) === e(b)),
238
+ e(l).is("disabled", e(c)),
239
+ e(l).is("focus", e(s)),
240
+ e(l).bm("button", e(f))
241
+ ]) }, [Q(y("input", {
242
+ ref_key: "radioRef",
243
+ ref: r,
244
+ "onUpdate:modelValue": d[0] || (d[0] = (a) => Z(i) ? i.value = a : null),
245
+ class: E(e(l).be("button", "original-radio")),
246
+ value: e(b),
247
+ type: "radio",
248
+ name: o.name || ((k = e(n)) == null ? void 0 : k.name),
249
+ disabled: e(c),
250
+ onFocus: d[1] || (d[1] = (a) => s.value = !0),
251
+ onBlur: d[2] || (d[2] = (a) => s.value = !1),
252
+ onClick: d[3] || (d[3] = x(() => {
253
+ }, ["stop"]))
254
+ }, null, 42, Xe), [[ee, e(i)]]), y("span", {
255
+ class: E(e(l).be("button", "inner")),
256
+ style: Le(e(i) === e(b) ? v.value : {}),
257
+ onKeydown: d[4] || (d[4] = x(() => {
258
+ }, ["stop"]))
259
+ }, [A(g.$slots, "default", {}, () => [w(I(o.label), 1)])], 38)], 2);
260
+ };
261
+ }
262
+ }), D = Ye;
263
+ const We = [
264
+ "id",
265
+ "aria-label",
266
+ "aria-labelledby"
267
+ ];
268
+ var Je = /* @__PURE__ */ z({
269
+ name: "ElRadioGroup",
270
+ __name: "radio-group",
271
+ props: Ke,
272
+ emits: qe,
273
+ setup(o, { emit: S }) {
274
+ const l = o, r = S, s = $("radio"), f = Re(), c = B(), { formItem: i } = ke(), { inputId: n, isLabeledByFormItem: b } = Be(l, { formItemContext: i }), v = (t) => {
275
+ r(Y, t), te(() => r(U, t));
276
+ };
277
+ ae(() => {
278
+ const t = c.value.querySelectorAll("[type=radio]"), m = t[0];
279
+ !Array.from(t).some((u) => u.checked) && m && (m.tabIndex = 0);
280
+ });
281
+ const g = h(() => l.name || f.value), d = h(() => ({
282
+ ...ue,
283
+ ...l.props
284
+ })), k = (t) => {
285
+ const { label: m, value: u, disabled: _ } = d.value, V = {
286
+ label: t[m],
287
+ value: t[u],
288
+ disabled: t[_]
289
+ };
290
+ return {
291
+ ...Pe(t, [
292
+ m,
293
+ u,
294
+ _
295
+ ]),
296
+ ...V
297
+ };
298
+ }, a = h(() => l.type === "button" ? D : me);
299
+ return Ue(de, $e({
300
+ ...Ae(l),
301
+ changeEvent: v,
302
+ name: g
303
+ })), oe(() => l.modelValue, (t, m) => {
304
+ l.validateEvent && !Ce(t, m) && (i == null || i.validate("change").catch(Ie));
305
+ }), (t, m) => (R(), C("div", {
306
+ id: e(n),
307
+ ref_key: "radioGroupRef",
308
+ ref: c,
309
+ class: E(e(s).b("group")),
310
+ role: "radiogroup",
311
+ "aria-label": e(b) ? void 0 : o.ariaLabel || "radio-group",
312
+ "aria-labelledby": e(b) ? e(i).labelId : void 0
313
+ }, [A(t.$slots, "default", {}, () => [(R(!0), C(le, null, se(o.options, (u, _) => (R(), ne(De(a.value), Fe({ key: _ }, { ref_for: !0 }, k(u)), null, 16))), 128))])], 10, We));
314
+ }
315
+ }), pe = Je;
316
+ const Qe = xe(me, {
317
+ RadioButton: D,
318
+ RadioGroup: pe
319
+ }), Ze = J(pe);
320
+ J(D);
321
+ const et = { class: "wrapper" }, tt = { class: "screen_thumbnail" }, at = ["src"], ot = { class: "validity-period" }, lt = {
322
+ key: 0,
323
+ class: "custom"
324
+ }, st = { class: "footer" }, ut = /* @__PURE__ */ z({
325
+ __name: "ScreenShotTool",
326
+ props: ["componentId"],
327
+ emits: ["closePanel"],
328
+ setup(o, { emit: S }) {
329
+ const l = we(), r = Ne(), s = o, f = B(0), c = B(), i = B(), n = B(), b = S;
330
+ ae(() => {
331
+ c.value = 1280, i.value = 720, r.setReadyById(s.componentId);
332
+ }), oe(
333
+ () => r.isToolActive(s.componentId),
334
+ (a) => {
335
+ a && d(220, 124, !1);
336
+ }
337
+ );
338
+ const v = (a) => {
339
+ f.value = a, a !== 3 && (c.value = L[a].width, i.value = L[a].height);
340
+ }, g = () => {
341
+ b("closePanel");
342
+ }, d = (a, t, m) => {
343
+ const u = document.getElementById("myCanvas"), _ = document.createElement("a");
344
+ _.download = "screenshot.png";
345
+ const V = document.createElement("canvas"), p = V.getContext("2d");
346
+ if (u && p) {
347
+ V.width = a, V.height = t;
348
+ const ve = a / u.width, fe = t / u.height, F = Math.max(ve, fe), O = u.width * F, M = u.height * F, be = (a - O) / 2, ge = (t - M) / 2;
349
+ 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, M), m ? V.toBlob(function(ye) {
350
+ const j = URL.createObjectURL(ye);
351
+ _.href = j, _.click(), URL.revokeObjectURL(j);
352
+ }) : n.value = V.toDataURL("image/png");
353
+ }
354
+ }, k = () => {
355
+ d(c.value, i.value, !0);
356
+ };
357
+ return (a, t) => {
358
+ const m = Qe, u = Ze, _ = ze, V = _e;
359
+ return R(), ne(V, {
360
+ class: "screen_container",
361
+ width: 240,
362
+ panelTitle: e(l)("screenshot.title"),
363
+ "click-handle": g
364
+ }, {
365
+ default: T(() => [
366
+ y("div", et, [
367
+ y("div", tt, [
368
+ y("img", {
369
+ class: "thumbnail_img",
370
+ src: n.value,
371
+ alt: ""
372
+ }, null, 8, at)
373
+ ]),
374
+ P(u, {
375
+ modelValue: f.value,
376
+ "onUpdate:modelValue": t[0] || (t[0] = (p) => f.value = p),
377
+ onChange: v
378
+ }, {
379
+ default: T(() => [
380
+ y("div", ot, [
381
+ (R(!0), C(le, null, se(e(L), (p) => (R(), C("div", {
382
+ key: p.id,
383
+ class: "period_box"
384
+ }, [
385
+ P(m, {
386
+ value: p.id
387
+ }, {
388
+ default: T(() => [
389
+ w(I(p.name || e(l)(p.label ?? "")), 1)
390
+ ]),
391
+ _: 2
392
+ }, 1032, ["value"])
393
+ ]))), 128))
394
+ ])
395
+ ]),
396
+ _: 1
397
+ }, 8, ["modelValue"]),
398
+ f.value === 3 ? (R(), C("div", lt, [
399
+ P(_, {
400
+ modelValue: c.value,
401
+ "onUpdate:modelValue": t[1] || (t[1] = (p) => c.value = p),
402
+ placeholder: e(l)("screenshot.widthPlaceholder")
403
+ }, null, 8, ["modelValue", "placeholder"]),
404
+ t[3] || (t[3] = w(" x ", -1)),
405
+ P(_, {
406
+ modelValue: i.value,
407
+ "onUpdate:modelValue": t[2] || (t[2] = (p) => i.value = p),
408
+ placeholder: e(l)("screenshot.heightPlaceholder")
409
+ }, null, 8, ["modelValue", "placeholder"])
410
+ ])) : Oe("", !0),
411
+ y("div", st, [
412
+ y("div", {
413
+ class: "btn1",
414
+ onClick: g
415
+ }, I(e(l)("common.cancel")), 1),
416
+ y("div", {
417
+ class: "btn2",
418
+ onClick: k
419
+ }, I(e(l)("common.save")), 1)
420
+ ])
421
+ ])
422
+ ]),
423
+ _: 1
424
+ }, 8, ["panelTitle"]);
425
+ };
426
+ }
427
+ });
428
+ export {
429
+ ut as default
430
+ };