@xtctwins/tctwins-bimx-engine 0.2.55 → 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.
- package/dist/{alert-C0MgdbKf.mjs → Alert-CSiEPFGt.mjs} +5 -5
- package/dist/{AnnotationTool-CPBZcbp_.mjs → AnnotationTool-CKzHkqWM.mjs} +80 -80
- package/dist/BIMX_Viewer_Lib.es.js +1 -1
- package/dist/BIMX_Viewer_Lib.umd.js +224 -169
- package/dist/{CommentTool-ChVib2Wg.mjs → CommentTool-5HhGDqpg.mjs} +575 -555
- package/dist/{HiddenTool-CilrXe5l.mjs → HiddenTool-BGFoHMWC.mjs} +9 -9
- package/dist/{InspectorTool-BXArGZHO.mjs → InspectorTool-DD3w7k07.mjs} +27 -27
- package/dist/{MeasureTool-DtUiP4t1.mjs → MeasureTool-COR8QLDf.mjs} +118 -94
- package/dist/{MouseTool-2Nxz447f.mjs → MouseTool-OxODcO4X.mjs} +27 -24
- package/dist/{NavigateTool-COsSnxyD.mjs → NavigateTool-Bw6GFzsg.mjs} +5 -5
- package/dist/{panel.vue_vue_type_style_index_0_lang-CN9vybau.mjs → Panel.vue_vue_type_style_index_0_lang-DgM_qGLO.mjs} +4 -4
- package/dist/{RoamTool-CjRywSYn.mjs → RoamTool-X-b0hsmJ.mjs} +7 -7
- package/dist/ScreenShotTool-0xSJZBBw.mjs +430 -0
- package/dist/SectionTool-BqI2Qnk5.mjs +343 -0
- package/dist/SettingTool-CGkRGfZH.mjs +747 -0
- package/dist/StructureTree-CWAXoI0r.mjs +1662 -0
- package/dist/{tallPanel-Ddd7gAie.mjs → TallPanel-CR5vNQ4c.mjs} +8 -8
- package/dist/bimTools-D3TraX9d.mjs +75 -0
- package/dist/el-slider-CBVU9_og.mjs +1040 -0
- package/dist/{index-DTeJ8S3e.mjs → index-CwRGVhoT.mjs} +44953 -46755
- package/dist/style.css +1 -1
- package/package.json +4 -3
- package/types/components/bcf/AddObjectOrAnno.vue.d.ts +16 -0
- package/types/components/bcf/BCFAddPanel.vue.d.ts +55 -0
- package/types/components/bcf/BCFDetailPanel.vue.d.ts +59 -0
- package/types/components/bcf/BCFDisplayList.vue.d.ts +18 -0
- package/types/components/bcf/BCFFilter.vue.d.ts +14 -0
- package/types/components/bcf/BCFTool.vue.d.ts +15 -0
- package/types/components/bcf/CheckObjectPanel.vue.d.ts +11 -0
- package/types/components/bcf/CommentInput.vue.d.ts +51 -0
- package/types/components/bcf/CommentsView.vue.d.ts +48 -0
- package/types/components/bcf/DialogPanel.vue.d.ts +15 -0
- package/types/components/bcf/ImageView.vue.d.ts +17 -0
- package/types/components/bcf/ImageZoomIn.vue.d.ts +9 -0
- package/types/components/bcf/MobileBCFAdd.vue.d.ts +56 -0
- package/types/components/bcf/MobileBCFDetail.vue.d.ts +55 -0
- package/types/components/bcf/MobileBCFDisplayList.vue.d.ts +498 -0
- package/types/components/bcf/MobileBCFFilter.vue.d.ts +475 -0
- package/types/components/bcf/MobileBCFTool.vue.d.ts +17 -0
- package/types/components/bcf/MobileCommentInput.vue.d.ts +54 -0
- package/types/components/bcf/MobileCommentsView.vue.d.ts +17 -0
- package/types/components/bcf/SelectPanel.vue.d.ts +12 -0
- package/types/components/comment/mobile/MobileCommentAdd.vue.d.ts +14 -0
- package/types/components/comment/mobile/MobileDetail.vue.d.ts +11 -0
- package/types/components/comment/mobile/MobileDraw.vue.d.ts +17 -0
- package/types/components/comment/mobile/MobileFilter.vue.d.ts +475 -0
- package/types/components/comment/mobile/MobileList.vue.d.ts +497 -0
- package/types/components/comment/mobile/MobileZoomIn.vue.d.ts +9 -0
- package/types/components/comment/pc/PcDraw.vue.d.ts +14 -0
- package/types/components/shared/Alert.vue.d.ts +32 -0
- package/types/components/shared/CloseButton.vue.d.ts +50 -0
- package/types/components/shared/CloseButtonDark.vue.d.ts +32 -0
- package/types/components/shared/EmptyPage.vue.d.ts +6 -0
- package/types/components/shared/Loading.vue.d.ts +2 -0
- package/types/components/shared/Panel.vue.d.ts +47 -0
- package/types/components/shared/Prompt.vue.d.ts +8 -0
- package/types/components/shared/RectangleButton.vue.d.ts +106 -0
- package/types/components/shared/TallPanel.vue.d.ts +69 -0
- package/types/components/shared/TallPanelNoPos.vue.d.ts +82 -0
- package/types/components/tools/AnnotationTool.vue.d.ts +14 -0
- package/types/components/tools/AppToolbar.vue.d.ts +27 -0
- package/types/components/tools/ClickEvent.vue.d.ts +6 -0
- package/types/components/tools/CommentTool.vue.d.ts +45 -0
- package/types/components/tools/HiddenTool.vue.d.ts +12 -0
- package/types/components/tools/InspectorTool.vue.d.ts +14 -0
- package/types/components/tools/MeasureTool.vue.d.ts +14 -0
- package/types/components/tools/MouseTool.vue.d.ts +6 -0
- package/types/components/tools/NavigateTool.vue.d.ts +10 -0
- package/types/components/tools/RoamTool.vue.d.ts +12 -0
- package/types/components/tools/ScreenShotTool.vue.d.ts +10 -0
- package/types/components/tools/SectionTool.vue.d.ts +14 -0
- package/types/components/tools/SettingTool.vue.d.ts +13 -0
- package/types/components/tools/StructureTree.vue.d.ts +11645 -0
- package/types/components/tools/Toolbar.vue.d.ts +10 -0
- package/types/composables/useBimViewerEvent.d.ts +44 -0
- package/types/composables/useEmitHandler.d.ts +2 -0
- package/types/composables/useToolActive.d.ts +1 -0
- package/types/composables/useToolReady.d.ts +1 -0
- package/types/i18n/index.d.ts +5 -1
- package/types/i18n/locales/en-US.d.ts +1 -0
- package/types/i18n/locales/zh-CN.d.ts +1 -0
- package/types/store/bcfReflect.d.ts +13 -81
- package/types/store/const/app.d.ts +66 -0
- package/types/store/const/bimTools.d.ts +81 -0
- package/types/store/const/project.d.ts +48 -0
- package/types/store/const/theme.d.ts +16 -0
- package/types/store/const/toolbar.d.ts +26 -0
- package/types/store/const.d.ts +11 -228
- package/types/store/toolbars.d.ts +22 -0
- package/types/store/userInfoStore.d.ts +1 -1
- package/types/stores/viewerStore.d.ts +112 -0
- package/types/types/bcf.d.ts +83 -0
- package/types/types/events.d.ts +88 -0
- package/types/utils/OSSHelper.d.ts +27 -0
- package/types/utils/cacheInfo.d.ts +26 -3
- package/types/utils/dbscan.d.ts +1 -0
- package/types/utils/eventBus.d.ts +1 -83
- package/types/viewerManager/viewerManager.d.ts +53 -3
- package/dist/ScreenShotTool-g1dzvqn2.mjs +0 -500
- package/dist/SectionTool-DlnlE6Pv.mjs +0 -331
- package/dist/SettingTool-y_hp2XrJ.mjs +0 -815
- package/dist/StructureTree-CtJ4Yf5_.mjs +0 -1846
- package/dist/const-DOnRsYpZ.mjs +0 -389
- package/dist/el-input-number-BjEspzGk.mjs +0 -1169
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import { BcfTopic, BcfTopicTotal } from '../store/bcfReflect';
|
|
2
|
-
import { ToolDir } from '../store/initConfigs';
|
|
3
|
-
import { ComponentName } from '../store/toolbars';
|
|
4
|
-
import { InputComment } from '@xtctwins/tctwins-bimx-viewer/types/src/toolbar/BCFTool';
|
|
5
1
|
declare const emitter: import('mitt').Emitter<Record<import('mitt').EventType, unknown>>;
|
|
6
2
|
export default emitter;
|
|
3
|
+
export type { AnnoType, RoamEvent, MeasureTool, EventContent, InstructionContent, } from '../types/events';
|
|
7
4
|
export declare let EventMemory: {
|
|
8
5
|
BIMX_CONFIGS: {
|
|
9
6
|
viewerManager: boolean;
|
|
@@ -14,82 +11,3 @@ export declare let EventMemory: {
|
|
|
14
11
|
viewerManager: boolean;
|
|
15
12
|
};
|
|
16
13
|
};
|
|
17
|
-
export type AnnoType = "file" | "image" | "record" | "text" | "video";
|
|
18
|
-
export type RoamEvent = "goUp" | "goDown" | "goLeft" | "goRight" | "goForward" | "goBackward" | "stop";
|
|
19
|
-
export type MeasureTool = "distance" | "angle";
|
|
20
|
-
export type EventContent = {
|
|
21
|
-
/**
|
|
22
|
-
* 是否是功能
|
|
23
|
-
*/
|
|
24
|
-
isTool: boolean;
|
|
25
|
-
/**
|
|
26
|
-
* 触发的事件对象
|
|
27
|
-
*/
|
|
28
|
-
event_target: ComponentName | "BimXViewer" | "ToolBar";
|
|
29
|
-
/**
|
|
30
|
-
* 事件名称
|
|
31
|
-
*/
|
|
32
|
-
event_name: string;
|
|
33
|
-
/**
|
|
34
|
-
* 事件内容
|
|
35
|
-
*/
|
|
36
|
-
content: {
|
|
37
|
-
content?: any;
|
|
38
|
-
id?: any;
|
|
39
|
-
msg?: string;
|
|
40
|
-
code?: 200 | -1;
|
|
41
|
-
item?: any;
|
|
42
|
-
type?: string;
|
|
43
|
-
toolId?: number;
|
|
44
|
-
toolKey?: string;
|
|
45
|
-
color?: string;
|
|
46
|
-
active?: boolean;
|
|
47
|
-
enable?: boolean;
|
|
48
|
-
tool_type?: AnnoType;
|
|
49
|
-
annoId?: string;
|
|
50
|
-
object?: any;
|
|
51
|
-
currentAnnotation?: any;
|
|
52
|
-
rawFile?: any;
|
|
53
|
-
targetAnno?: any;
|
|
54
|
-
status?: string | boolean;
|
|
55
|
-
nodeId?: string | number;
|
|
56
|
-
entityId?: string | number;
|
|
57
|
-
objectId?: string | number;
|
|
58
|
-
viewer_nodeId?: string | number;
|
|
59
|
-
active_tree?: number;
|
|
60
|
-
img_data?: string;
|
|
61
|
-
roam?: RoamEvent;
|
|
62
|
-
newSets?: any;
|
|
63
|
-
newComment?: any;
|
|
64
|
-
direction?: number;
|
|
65
|
-
measureTool?: MeasureTool;
|
|
66
|
-
newMeasure?: any;
|
|
67
|
-
measurePrefer?: any;
|
|
68
|
-
bcf?: BcfTopic | BcfTopicTotal;
|
|
69
|
-
bcfId?: number;
|
|
70
|
-
bcf_guid?: string;
|
|
71
|
-
bcf_cmt?: InputComment;
|
|
72
|
-
bcf_cmt_guid?: string;
|
|
73
|
-
};
|
|
74
|
-
};
|
|
75
|
-
type instructionName = "updateCmtList" | "checkCmtDetail" | "newComment" | "updateBcfList" | "checkBcfDetail" | "changeBackgroundColor" | "setNavCube" | "setAnnoStatus" | "lastSetsContent";
|
|
76
|
-
export type InstructionContent = {
|
|
77
|
-
instruct_name: instructionName;
|
|
78
|
-
content: {
|
|
79
|
-
code?: any;
|
|
80
|
-
guid?: any;
|
|
81
|
-
msg?: any;
|
|
82
|
-
type?: any;
|
|
83
|
-
active?: boolean;
|
|
84
|
-
color?: string;
|
|
85
|
-
move?: boolean;
|
|
86
|
-
pos?: ToolDir;
|
|
87
|
-
posNum?: number[];
|
|
88
|
-
index?: number;
|
|
89
|
-
cmtList?: any;
|
|
90
|
-
cmtDetail?: any;
|
|
91
|
-
bcfList?: BcfTopicTotal[];
|
|
92
|
-
bcfDetail?: BcfTopicTotal;
|
|
93
|
-
lastSet?: any;
|
|
94
|
-
};
|
|
95
|
-
};
|
|
@@ -1,19 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ViewerManager — BIM 引擎与 Vue 组件之间的桥接层(兼容层)
|
|
3
|
+
*
|
|
4
|
+
* 从静态管理类重构为 Pinia Store 兼容层:
|
|
5
|
+
* - viewerState / entityState 通过 getter 代理到 viewerStore 的响应式状态
|
|
6
|
+
* - 所有方法委托给 viewerStore 执行核心逻辑
|
|
7
|
+
* - 保留 window.bimViewer 以兼容底层引擎库 @xtctwins/tctwins-bimx-viewer
|
|
8
|
+
*
|
|
9
|
+
* @remarks
|
|
10
|
+
* 通过 src/index.ts 导出为公共 API,保持向后兼容。
|
|
11
|
+
* 新代码推荐直接使用 useViewerStore() 获取响应式 Store 实例。
|
|
12
|
+
*/
|
|
1
13
|
export default class ViewerManager {
|
|
2
|
-
|
|
3
|
-
|
|
14
|
+
/** 查看器运行时状态(代理到 viewerStore,保持响应式) */
|
|
15
|
+
static get viewerState(): {
|
|
16
|
+
measureType: "distance" | "angle";
|
|
4
17
|
};
|
|
5
|
-
static
|
|
18
|
+
static set viewerState(val: {
|
|
19
|
+
measureType: "distance" | "angle";
|
|
20
|
+
});
|
|
21
|
+
/** 引擎实体状态缓存(代理到 viewerStore,保持响应式) */
|
|
22
|
+
static get entityState(): {
|
|
6
23
|
xrayedObjectIds: string[];
|
|
7
24
|
highlightedObjectIds: string[];
|
|
8
25
|
selectedObjectIds: string[];
|
|
9
26
|
visibleObjectIds: string[];
|
|
10
27
|
edgesObjectIds: string[];
|
|
11
28
|
};
|
|
29
|
+
static set entityState(val: {
|
|
30
|
+
xrayedObjectIds: string[];
|
|
31
|
+
highlightedObjectIds: string[];
|
|
32
|
+
selectedObjectIds: string[];
|
|
33
|
+
visibleObjectIds: string[];
|
|
34
|
+
edgesObjectIds: string[];
|
|
35
|
+
});
|
|
36
|
+
/**
|
|
37
|
+
* 将 BIMX_CONFIGS 配置同步到底层 BIM 引擎
|
|
38
|
+
*
|
|
39
|
+
* @param eventTarget - 配置项名称。传空字符串时全量同步所有配置;传具体名称时仅同步该项。
|
|
40
|
+
*/
|
|
12
41
|
static ConfigViewer(eventTarget?: string): void;
|
|
42
|
+
/**
|
|
43
|
+
* 保存查看器运行时状态
|
|
44
|
+
* @param content - 状态快照对象
|
|
45
|
+
*/
|
|
13
46
|
static SaveViewerState(content: any): void;
|
|
47
|
+
/**
|
|
48
|
+
* 通过工具 ID 激活/关闭工具
|
|
49
|
+
* @param id - 工具栏工具 ID
|
|
50
|
+
* @param active - 目标激活状态,默认取反当前状态
|
|
51
|
+
*/
|
|
14
52
|
static SetToolActiveById(id: number, active?: boolean): void;
|
|
53
|
+
/**
|
|
54
|
+
* 通过工具 key 激活/关闭工具
|
|
55
|
+
* @param key - 工具 key(如 "measure" / "section" / "roam" 等)
|
|
56
|
+
* @param active - 目标激活状态,默认取反当前状态
|
|
57
|
+
*/
|
|
15
58
|
static SetToolActiveByKey(key: string, active?: boolean): void;
|
|
59
|
+
/** 关闭所有已激活的工具 */
|
|
16
60
|
static SetAllClose(): void;
|
|
61
|
+
/** 销毁当前 BIM 查看器实例 */
|
|
17
62
|
static DestroyViewer(): void;
|
|
63
|
+
/**
|
|
64
|
+
* 显示/隐藏加载中遮罩
|
|
65
|
+
* @param show - true 显示加载中,false 隐藏
|
|
66
|
+
* @param callback - 可选回调
|
|
67
|
+
*/
|
|
18
68
|
static showRequestBusy(show: boolean, callback?: Function): void;
|
|
19
69
|
}
|
|
@@ -1,500 +0,0 @@
|
|
|
1
|
-
import { _ as he } from "./panel.vue_vue_type_style_index_0_lang-CN9vybau.mjs";
|
|
2
|
-
import { j as K, a6 as q, d as H, b as N, a7 as T, a8 as L, a9 as Y, l as W, a as Se, aa as Ve, ab as _e, u as U, ac as Ee, v as X, ad as Re, ae as Ie, af as ke, y as Be, o as Ce, ag as Pe, ah as J, w as xe, A as we, B as Ne, F as $e } from "./index-DTeJ8S3e.mjs";
|
|
3
|
-
import { ref as k, inject as ze, computed as S, defineComponent as $, createElementBlock as B, openBlock as R, normalizeClass as E, unref as e, createElementVNode as g, withDirectives as Q, withModifiers as x, isRef as Z, vModelRadio as ee, renderSlot as A, createTextVNode as w, toDisplayString as C, nextTick as oe, normalizeStyle as Ge, onMounted as ae, provide as Te, reactive as Le, toRefs as Ue, watch as te, Fragment as le, renderList as ne, createBlock as se, resolveDynamicComponent as Ae, mergeProps as De, withCtx as z, createVNode as P, createCommentVNode as Fe } from "vue";
|
|
4
|
-
import { a as G } from "./const-DOnRsYpZ.mjs";
|
|
5
|
-
const ie = N({
|
|
6
|
-
/**
|
|
7
|
-
* @description binding value
|
|
8
|
-
*/
|
|
9
|
-
modelValue: {
|
|
10
|
-
type: [String, Number, Boolean],
|
|
11
|
-
default: void 0
|
|
12
|
-
},
|
|
13
|
-
/**
|
|
14
|
-
* @description size of the Radio
|
|
15
|
-
*/
|
|
16
|
-
size: Y,
|
|
17
|
-
/**
|
|
18
|
-
* @description whether Radio is disabled
|
|
19
|
-
*/
|
|
20
|
-
disabled: {
|
|
21
|
-
type: Boolean,
|
|
22
|
-
default: void 0
|
|
23
|
-
},
|
|
24
|
-
/**
|
|
25
|
-
* @description the label of Radio
|
|
26
|
-
*/
|
|
27
|
-
label: {
|
|
28
|
-
type: [String, Number, Boolean],
|
|
29
|
-
default: void 0
|
|
30
|
-
},
|
|
31
|
-
/**
|
|
32
|
-
* @description the value of Radio
|
|
33
|
-
*/
|
|
34
|
-
value: {
|
|
35
|
-
type: [String, Number, Boolean],
|
|
36
|
-
default: void 0
|
|
37
|
-
},
|
|
38
|
-
/**
|
|
39
|
-
* @description native `name` attribute
|
|
40
|
-
*/
|
|
41
|
-
name: {
|
|
42
|
-
type: String,
|
|
43
|
-
default: void 0
|
|
44
|
-
}
|
|
45
|
-
}), je = N({
|
|
46
|
-
...ie,
|
|
47
|
-
/**
|
|
48
|
-
* @description whether to add a border around Radio
|
|
49
|
-
*/
|
|
50
|
-
border: Boolean
|
|
51
|
-
}), re = {
|
|
52
|
-
[L]: (t) => K(t) || q(t) || H(t),
|
|
53
|
-
[T]: (t) => K(t) || q(t) || H(t)
|
|
54
|
-
}, de = /* @__PURE__ */ Symbol("radioGroupKey"), ue = (t, V) => {
|
|
55
|
-
const l = k(), r = ze(de, void 0), n = S(() => !!r), f = S(() => W(t.value) ? t.label : t.value), c = S({
|
|
56
|
-
get() {
|
|
57
|
-
return n.value ? r.modelValue : t.modelValue;
|
|
58
|
-
},
|
|
59
|
-
set(y) {
|
|
60
|
-
n.value ? r.changeEvent(y) : V && V(L, y), l.value.checked = t.modelValue === f.value;
|
|
61
|
-
}
|
|
62
|
-
}), s = Se(S(() => r == null ? void 0 : r.size)), i = Ve(S(() => r == null ? void 0 : r.disabled)), b = k(!1), v = S(() => i.value || n.value && c.value !== f.value ? -1 : 0);
|
|
63
|
-
return _e(
|
|
64
|
-
{
|
|
65
|
-
from: "label act as value",
|
|
66
|
-
replacement: "value",
|
|
67
|
-
version: "3.0.0",
|
|
68
|
-
scope: "el-radio",
|
|
69
|
-
ref: "https://element-plus.org/en-US/component/radio.html"
|
|
70
|
-
},
|
|
71
|
-
S(() => n.value && W(t.value))
|
|
72
|
-
), {
|
|
73
|
-
radioRef: l,
|
|
74
|
-
isGroup: n,
|
|
75
|
-
radioGroup: r,
|
|
76
|
-
focus: b,
|
|
77
|
-
size: s,
|
|
78
|
-
disabled: i,
|
|
79
|
-
tabIndex: v,
|
|
80
|
-
modelValue: c,
|
|
81
|
-
actualValue: f
|
|
82
|
-
};
|
|
83
|
-
}, Me = ["value", "name", "disabled", "checked"];
|
|
84
|
-
var ce = /* @__PURE__ */ $({
|
|
85
|
-
name: "ElRadio",
|
|
86
|
-
__name: "radio",
|
|
87
|
-
props: je,
|
|
88
|
-
emits: re,
|
|
89
|
-
setup(t, { emit: V }) {
|
|
90
|
-
const l = t, r = V, n = U("radio"), { radioRef: f, radioGroup: c, focus: s, size: i, disabled: b, modelValue: v, actualValue: y } = ue(l, r);
|
|
91
|
-
function u() {
|
|
92
|
-
oe(() => r(T, v.value));
|
|
93
|
-
}
|
|
94
|
-
return (I, a) => {
|
|
95
|
-
var o;
|
|
96
|
-
return R(), B(
|
|
97
|
-
"label",
|
|
98
|
-
{
|
|
99
|
-
class: E([
|
|
100
|
-
e(n).b(),
|
|
101
|
-
e(n).is("disabled", e(b)),
|
|
102
|
-
e(n).is("focus", e(s)),
|
|
103
|
-
e(n).is("bordered", t.border),
|
|
104
|
-
e(n).is("checked", e(v) === e(y)),
|
|
105
|
-
e(n).m(e(i))
|
|
106
|
-
])
|
|
107
|
-
},
|
|
108
|
-
[
|
|
109
|
-
g(
|
|
110
|
-
"span",
|
|
111
|
-
{
|
|
112
|
-
class: E([
|
|
113
|
-
e(n).e("input"),
|
|
114
|
-
e(n).is("disabled", e(b)),
|
|
115
|
-
e(n).is("checked", e(v) === e(y))
|
|
116
|
-
])
|
|
117
|
-
},
|
|
118
|
-
[
|
|
119
|
-
Q(g("input", {
|
|
120
|
-
ref_key: "radioRef",
|
|
121
|
-
ref: f,
|
|
122
|
-
"onUpdate:modelValue": a[0] || (a[0] = (m) => Z(v) ? v.value = m : null),
|
|
123
|
-
class: E(e(n).e("original")),
|
|
124
|
-
value: e(y),
|
|
125
|
-
name: t.name || ((o = e(c)) == null ? void 0 : o.name),
|
|
126
|
-
disabled: e(b),
|
|
127
|
-
checked: e(v) === e(y),
|
|
128
|
-
type: "radio",
|
|
129
|
-
onFocus: a[1] || (a[1] = (m) => s.value = !0),
|
|
130
|
-
onBlur: a[2] || (a[2] = (m) => s.value = !1),
|
|
131
|
-
onChange: u,
|
|
132
|
-
onClick: a[3] || (a[3] = x(() => {
|
|
133
|
-
}, ["stop"]))
|
|
134
|
-
}, null, 42, Me), [
|
|
135
|
-
[ee, e(v)]
|
|
136
|
-
]),
|
|
137
|
-
g(
|
|
138
|
-
"span",
|
|
139
|
-
{
|
|
140
|
-
class: E(e(n).e("inner"))
|
|
141
|
-
},
|
|
142
|
-
null,
|
|
143
|
-
2
|
|
144
|
-
/* CLASS */
|
|
145
|
-
)
|
|
146
|
-
],
|
|
147
|
-
2
|
|
148
|
-
/* CLASS */
|
|
149
|
-
),
|
|
150
|
-
g(
|
|
151
|
-
"span",
|
|
152
|
-
{
|
|
153
|
-
class: E(e(n).e("label")),
|
|
154
|
-
onKeydown: a[4] || (a[4] = x(() => {
|
|
155
|
-
}, ["stop"]))
|
|
156
|
-
},
|
|
157
|
-
[
|
|
158
|
-
A(I.$slots, "default", {}, () => [
|
|
159
|
-
w(
|
|
160
|
-
C(t.label),
|
|
161
|
-
1
|
|
162
|
-
/* TEXT */
|
|
163
|
-
)
|
|
164
|
-
])
|
|
165
|
-
],
|
|
166
|
-
34
|
|
167
|
-
/* CLASS, NEED_HYDRATION */
|
|
168
|
-
)
|
|
169
|
-
],
|
|
170
|
-
2
|
|
171
|
-
/* CLASS */
|
|
172
|
-
);
|
|
173
|
-
};
|
|
174
|
-
}
|
|
175
|
-
});
|
|
176
|
-
const Oe = N({
|
|
177
|
-
...ie
|
|
178
|
-
}), Ke = ["value", "name", "disabled"];
|
|
179
|
-
var D = /* @__PURE__ */ $({
|
|
180
|
-
name: "ElRadioButton",
|
|
181
|
-
__name: "radio-button",
|
|
182
|
-
props: Oe,
|
|
183
|
-
setup(t) {
|
|
184
|
-
const V = t, l = U("radio"), { radioRef: r, focus: n, size: f, disabled: c, modelValue: s, radioGroup: i, actualValue: b } = ue(V), v = S(() => ({
|
|
185
|
-
backgroundColor: (i == null ? void 0 : i.fill) || "",
|
|
186
|
-
borderColor: (i == null ? void 0 : i.fill) || "",
|
|
187
|
-
boxShadow: i != null && i.fill ? `-1px 0 0 0 ${i.fill}` : "",
|
|
188
|
-
color: (i == null ? void 0 : i.textColor) || ""
|
|
189
|
-
}));
|
|
190
|
-
return (y, u) => {
|
|
191
|
-
var I;
|
|
192
|
-
return R(), B(
|
|
193
|
-
"label",
|
|
194
|
-
{
|
|
195
|
-
class: E([
|
|
196
|
-
e(l).b("button"),
|
|
197
|
-
e(l).is("active", e(s) === e(b)),
|
|
198
|
-
e(l).is("disabled", e(c)),
|
|
199
|
-
e(l).is("focus", e(n)),
|
|
200
|
-
e(l).bm("button", e(f))
|
|
201
|
-
])
|
|
202
|
-
},
|
|
203
|
-
[
|
|
204
|
-
Q(g("input", {
|
|
205
|
-
ref_key: "radioRef",
|
|
206
|
-
ref: r,
|
|
207
|
-
"onUpdate:modelValue": u[0] || (u[0] = (a) => Z(s) ? s.value = a : null),
|
|
208
|
-
class: E(e(l).be("button", "original-radio")),
|
|
209
|
-
value: e(b),
|
|
210
|
-
type: "radio",
|
|
211
|
-
name: t.name || ((I = e(i)) == null ? void 0 : I.name),
|
|
212
|
-
disabled: e(c),
|
|
213
|
-
onFocus: u[1] || (u[1] = (a) => n.value = !0),
|
|
214
|
-
onBlur: u[2] || (u[2] = (a) => n.value = !1),
|
|
215
|
-
onClick: u[3] || (u[3] = x(() => {
|
|
216
|
-
}, ["stop"]))
|
|
217
|
-
}, null, 42, Ke), [
|
|
218
|
-
[ee, e(s)]
|
|
219
|
-
]),
|
|
220
|
-
g(
|
|
221
|
-
"span",
|
|
222
|
-
{
|
|
223
|
-
class: E(e(l).be("button", "inner")),
|
|
224
|
-
style: Ge(e(s) === e(b) ? v.value : {}),
|
|
225
|
-
onKeydown: u[4] || (u[4] = x(() => {
|
|
226
|
-
}, ["stop"]))
|
|
227
|
-
},
|
|
228
|
-
[
|
|
229
|
-
A(y.$slots, "default", {}, () => [
|
|
230
|
-
w(
|
|
231
|
-
C(t.label),
|
|
232
|
-
1
|
|
233
|
-
/* TEXT */
|
|
234
|
-
)
|
|
235
|
-
])
|
|
236
|
-
],
|
|
237
|
-
38
|
|
238
|
-
/* CLASS, STYLE, NEED_HYDRATION */
|
|
239
|
-
)
|
|
240
|
-
],
|
|
241
|
-
2
|
|
242
|
-
/* CLASS */
|
|
243
|
-
);
|
|
244
|
-
};
|
|
245
|
-
}
|
|
246
|
-
});
|
|
247
|
-
const me = {
|
|
248
|
-
label: "label",
|
|
249
|
-
value: "value",
|
|
250
|
-
disabled: "disabled"
|
|
251
|
-
}, qe = N({
|
|
252
|
-
/**
|
|
253
|
-
* @description native `id` attribute
|
|
254
|
-
*/
|
|
255
|
-
id: {
|
|
256
|
-
type: String,
|
|
257
|
-
default: void 0
|
|
258
|
-
},
|
|
259
|
-
/**
|
|
260
|
-
* @description the size of radio buttons or bordered radios
|
|
261
|
-
*/
|
|
262
|
-
size: Y,
|
|
263
|
-
/**
|
|
264
|
-
* @description whether the nesting radios are disabled
|
|
265
|
-
*/
|
|
266
|
-
disabled: {
|
|
267
|
-
type: Boolean,
|
|
268
|
-
default: void 0
|
|
269
|
-
},
|
|
270
|
-
/**
|
|
271
|
-
* @description binding value
|
|
272
|
-
*/
|
|
273
|
-
modelValue: {
|
|
274
|
-
type: [String, Number, Boolean],
|
|
275
|
-
default: void 0
|
|
276
|
-
},
|
|
277
|
-
/**
|
|
278
|
-
* @description border and background color when button is active
|
|
279
|
-
*/
|
|
280
|
-
fill: {
|
|
281
|
-
type: String,
|
|
282
|
-
default: ""
|
|
283
|
-
},
|
|
284
|
-
/**
|
|
285
|
-
* @description font color when button is active
|
|
286
|
-
*/
|
|
287
|
-
textColor: {
|
|
288
|
-
type: String,
|
|
289
|
-
default: ""
|
|
290
|
-
},
|
|
291
|
-
/**
|
|
292
|
-
* @description native `name` attribute
|
|
293
|
-
*/
|
|
294
|
-
name: {
|
|
295
|
-
type: String,
|
|
296
|
-
default: void 0
|
|
297
|
-
},
|
|
298
|
-
/**
|
|
299
|
-
* @description whether to trigger form validation
|
|
300
|
-
*/
|
|
301
|
-
validateEvent: {
|
|
302
|
-
type: Boolean,
|
|
303
|
-
default: !0
|
|
304
|
-
},
|
|
305
|
-
options: {
|
|
306
|
-
type: X(Array)
|
|
307
|
-
},
|
|
308
|
-
props: {
|
|
309
|
-
type: X(Object),
|
|
310
|
-
default: () => me
|
|
311
|
-
},
|
|
312
|
-
type: {
|
|
313
|
-
type: String,
|
|
314
|
-
values: ["radio", "button"],
|
|
315
|
-
default: "radio"
|
|
316
|
-
},
|
|
317
|
-
...Ee(["ariaLabel"])
|
|
318
|
-
}), He = re, We = ["id", "aria-label", "aria-labelledby"];
|
|
319
|
-
var pe = /* @__PURE__ */ $({
|
|
320
|
-
name: "ElRadioGroup",
|
|
321
|
-
__name: "radio-group",
|
|
322
|
-
props: qe,
|
|
323
|
-
emits: He,
|
|
324
|
-
setup(t, { emit: V }) {
|
|
325
|
-
const l = t, r = V, n = U("radio"), f = Re(), c = k(), { formItem: s } = Ie(), { inputId: i, isLabeledByFormItem: b } = ke(l, {
|
|
326
|
-
formItemContext: s
|
|
327
|
-
}), v = (o) => {
|
|
328
|
-
r(L, o), oe(() => r(T, o));
|
|
329
|
-
};
|
|
330
|
-
ae(() => {
|
|
331
|
-
const o = c.value.querySelectorAll("[type=radio]"), m = o[0];
|
|
332
|
-
!Array.from(o).some((d) => d.checked) && m && (m.tabIndex = 0);
|
|
333
|
-
});
|
|
334
|
-
const y = S(() => l.name || f.value), u = S(() => ({
|
|
335
|
-
...me,
|
|
336
|
-
...l.props
|
|
337
|
-
})), I = (o) => {
|
|
338
|
-
const { label: m, value: d, disabled: h } = u.value, _ = {
|
|
339
|
-
label: o[m],
|
|
340
|
-
value: o[d],
|
|
341
|
-
disabled: o[h]
|
|
342
|
-
};
|
|
343
|
-
return { ...Pe(o, [m, d, h]), ..._ };
|
|
344
|
-
}, a = S(
|
|
345
|
-
() => l.type === "button" ? D : ce
|
|
346
|
-
);
|
|
347
|
-
return Te(
|
|
348
|
-
de,
|
|
349
|
-
Le({
|
|
350
|
-
...Ue(l),
|
|
351
|
-
changeEvent: v,
|
|
352
|
-
name: y
|
|
353
|
-
})
|
|
354
|
-
), te(
|
|
355
|
-
() => l.modelValue,
|
|
356
|
-
(o, m) => {
|
|
357
|
-
l.validateEvent && !Be(o, m) && (s == null || s.validate("change").catch((d) => Ce(d)));
|
|
358
|
-
}
|
|
359
|
-
), (o, m) => (R(), B("div", {
|
|
360
|
-
id: e(i),
|
|
361
|
-
ref_key: "radioGroupRef",
|
|
362
|
-
ref: c,
|
|
363
|
-
class: E(e(n).b("group")),
|
|
364
|
-
role: "radiogroup",
|
|
365
|
-
"aria-label": e(b) ? void 0 : t.ariaLabel || "radio-group",
|
|
366
|
-
"aria-labelledby": e(b) ? e(s).labelId : void 0
|
|
367
|
-
}, [
|
|
368
|
-
A(o.$slots, "default", {}, () => [
|
|
369
|
-
(R(!0), B(
|
|
370
|
-
le,
|
|
371
|
-
null,
|
|
372
|
-
ne(t.options, (d, h) => (R(), se(
|
|
373
|
-
Ae(a.value),
|
|
374
|
-
De({ key: h }, { ref_for: !0 }, I(d)),
|
|
375
|
-
null,
|
|
376
|
-
16
|
|
377
|
-
/* FULL_PROPS */
|
|
378
|
-
))),
|
|
379
|
-
128
|
|
380
|
-
/* KEYED_FRAGMENT */
|
|
381
|
-
))
|
|
382
|
-
])
|
|
383
|
-
], 10, We));
|
|
384
|
-
}
|
|
385
|
-
});
|
|
386
|
-
const Xe = xe(ce, {
|
|
387
|
-
RadioButton: D,
|
|
388
|
-
RadioGroup: pe
|
|
389
|
-
}), Ye = J(pe);
|
|
390
|
-
J(D);
|
|
391
|
-
const Je = { class: "wrapper" }, Qe = { class: "screen_thumbnail" }, Ze = ["src"], eo = { class: "validity-period" }, oo = {
|
|
392
|
-
key: 0,
|
|
393
|
-
class: "custom"
|
|
394
|
-
}, ao = { class: "footer" }, io = /* @__PURE__ */ $({
|
|
395
|
-
__name: "ScreenShotTool",
|
|
396
|
-
props: ["componentId"],
|
|
397
|
-
emits: ["closePanel"],
|
|
398
|
-
setup(t, { emit: V }) {
|
|
399
|
-
const l = we(), r = Ne(), n = t, f = k(0), c = k(), s = k(), i = k(), b = V;
|
|
400
|
-
ae(() => {
|
|
401
|
-
c.value = 1280, s.value = 720, r.setReadyById(n.componentId);
|
|
402
|
-
}), te(
|
|
403
|
-
() => r.isToolActive(n.componentId),
|
|
404
|
-
(a) => {
|
|
405
|
-
a && u(220, 124, !1);
|
|
406
|
-
}
|
|
407
|
-
);
|
|
408
|
-
const v = (a) => {
|
|
409
|
-
f.value = a, a !== 3 && (c.value = G[a].width, s.value = G[a].height);
|
|
410
|
-
}, y = () => {
|
|
411
|
-
b("closePanel");
|
|
412
|
-
}, u = (a, o, m) => {
|
|
413
|
-
const d = document.getElementById("myCanvas"), h = document.createElement("a");
|
|
414
|
-
h.download = "screenshot.png";
|
|
415
|
-
const _ = document.createElement("canvas"), p = _.getContext("2d");
|
|
416
|
-
if (d && p) {
|
|
417
|
-
_.width = a, _.height = o;
|
|
418
|
-
const ve = a / d.width, fe = o / d.height, F = Math.max(ve, fe), j = d.width * F, M = d.height * F, be = (a - j) / 2, ye = (o - M) / 2;
|
|
419
|
-
p.clearRect(0, 0, a, o), p.fillStyle = "transparent", p.fillRect(0, 0, a, o), p.drawImage(d, 0, 0, d.width, d.height, be, ye, j, M), m ? _.toBlob(function(ge) {
|
|
420
|
-
const O = URL.createObjectURL(ge);
|
|
421
|
-
h.href = O, h.click(), URL.revokeObjectURL(O);
|
|
422
|
-
}) : i.value = _.toDataURL("image/png");
|
|
423
|
-
}
|
|
424
|
-
}, I = () => {
|
|
425
|
-
u(c.value, s.value, !0);
|
|
426
|
-
};
|
|
427
|
-
return (a, o) => {
|
|
428
|
-
const m = Xe, d = Ye, h = $e, _ = he;
|
|
429
|
-
return R(), se(_, {
|
|
430
|
-
class: "screen_container",
|
|
431
|
-
width: 240,
|
|
432
|
-
panelTitle: e(l)("screenshot.title"),
|
|
433
|
-
"click-handle": y
|
|
434
|
-
}, {
|
|
435
|
-
default: z(() => [
|
|
436
|
-
g("div", Je, [
|
|
437
|
-
g("div", Qe, [
|
|
438
|
-
g("img", {
|
|
439
|
-
class: "thumbnail_img",
|
|
440
|
-
src: i.value,
|
|
441
|
-
alt: ""
|
|
442
|
-
}, null, 8, Ze)
|
|
443
|
-
]),
|
|
444
|
-
P(d, {
|
|
445
|
-
modelValue: f.value,
|
|
446
|
-
"onUpdate:modelValue": o[0] || (o[0] = (p) => f.value = p),
|
|
447
|
-
onChange: v
|
|
448
|
-
}, {
|
|
449
|
-
default: z(() => [
|
|
450
|
-
g("div", eo, [
|
|
451
|
-
(R(!0), B(le, null, ne(e(G), (p) => (R(), B("div", {
|
|
452
|
-
key: p.id,
|
|
453
|
-
class: "period_box"
|
|
454
|
-
}, [
|
|
455
|
-
P(m, {
|
|
456
|
-
value: p.id
|
|
457
|
-
}, {
|
|
458
|
-
default: z(() => [
|
|
459
|
-
w(C(p.name || e(l)(p.label ?? "")), 1)
|
|
460
|
-
]),
|
|
461
|
-
_: 2
|
|
462
|
-
}, 1032, ["value"])
|
|
463
|
-
]))), 128))
|
|
464
|
-
])
|
|
465
|
-
]),
|
|
466
|
-
_: 1
|
|
467
|
-
}, 8, ["modelValue"]),
|
|
468
|
-
f.value === 3 ? (R(), B("div", oo, [
|
|
469
|
-
P(h, {
|
|
470
|
-
modelValue: c.value,
|
|
471
|
-
"onUpdate:modelValue": o[1] || (o[1] = (p) => c.value = p),
|
|
472
|
-
placeholder: e(l)("screenshot.widthPlaceholder")
|
|
473
|
-
}, null, 8, ["modelValue", "placeholder"]),
|
|
474
|
-
o[3] || (o[3] = w(" x ", -1)),
|
|
475
|
-
P(h, {
|
|
476
|
-
modelValue: s.value,
|
|
477
|
-
"onUpdate:modelValue": o[2] || (o[2] = (p) => s.value = p),
|
|
478
|
-
placeholder: e(l)("screenshot.heightPlaceholder")
|
|
479
|
-
}, null, 8, ["modelValue", "placeholder"])
|
|
480
|
-
])) : Fe("", !0),
|
|
481
|
-
g("div", ao, [
|
|
482
|
-
g("div", {
|
|
483
|
-
class: "btn1",
|
|
484
|
-
onClick: y
|
|
485
|
-
}, C(e(l)("common.cancel")), 1),
|
|
486
|
-
g("div", {
|
|
487
|
-
class: "btn2",
|
|
488
|
-
onClick: I
|
|
489
|
-
}, C(e(l)("common.save")), 1)
|
|
490
|
-
])
|
|
491
|
-
])
|
|
492
|
-
]),
|
|
493
|
-
_: 1
|
|
494
|
-
}, 8, ["panelTitle"]);
|
|
495
|
-
};
|
|
496
|
-
}
|
|
497
|
-
});
|
|
498
|
-
export {
|
|
499
|
-
io as default
|
|
500
|
-
};
|