@xtctwins/tctwins-industry-engine 0.0.10 → 0.0.12
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/README.md +3 -3
- package/dist/{AnnotationTool-B6o3pWgm.mjs → AnnotationTool-f7CrC7Dr.mjs} +14 -14
- package/dist/{BCFTool-D-PM2few.mjs → BCFTool-CdN6SGDL.mjs} +5269 -5269
- package/dist/{CommentTool-CycO4Znf.mjs → CommentTool-Cfht7mQS.mjs} +28 -28
- package/dist/Industry_Viewer_Lib.es.js +3 -3
- package/dist/Industry_Viewer_Lib.umd.js +144 -152
- package/dist/{InspectorTool-D9zBnlUA.mjs → InspectorTool-M_oBYVQA.mjs} +31 -31
- package/dist/{MeasureTool-BfIIQ3PS.mjs → MeasureTool-CxWeQFgY.mjs} +24 -24
- package/dist/{MouseTool-nmX9TlQA.mjs → MouseTool-BHbi-fg3.mjs} +20 -20
- package/dist/{NavigateTool-BM2rj2oZ.mjs → NavigateTool-BdUVi4Be.mjs} +6 -6
- package/dist/{RoamTool-C12h52G0.mjs → RoamTool-Uuxa-94w.mjs} +12 -12
- package/dist/ScreenShotTool-CZUm8l2Z.mjs +445 -0
- package/dist/{SectionTool-DyyT_8pR.mjs → SectionTool-DZToybAI.mjs} +46 -46
- package/dist/SettingTool-CYM0qsUs.mjs +770 -0
- package/dist/StructureTree-DeXxENMk.mjs +1824 -0
- package/dist/{XRayTool-WdvB7EF1.mjs → XRayTool-Bug-FcKJ.mjs} +13 -13
- package/dist/{alert-xMo21PgA.mjs → alert-DGyQ9rEq.mjs} +5 -5
- package/dist/el-checkbox-ClYe-8uK.mjs +544 -0
- package/dist/el-input-number-Df5HOHuh.mjs +1028 -0
- package/dist/{index-uIV4CiDG.mjs → index-BNrMlQLr.mjs} +37845 -35391
- package/dist/{panel.vue_vue_type_style_index_0_lang-rC-OVibm.mjs → panel.vue_vue_type_style_index_0_lang-CCuIP-Pp.mjs} +6 -6
- package/dist/style.css +1 -1
- package/dist/{tallPanel-Dre_48W4.mjs → tallPanel-CqKqC6yK.mjs} +14 -14
- package/package.json +66 -65
- package/types/components/BimViewerComponents/StructureTree.vue.d.ts +2652 -1668
- package/types/components/MobileBCFComponents/MobileBCFDisplayList.vue.d.ts +264 -36
- package/types/components/MobileBCFComponents/MobileBCFFilter.vue.d.ts +264 -36
- package/dist/ScreenShotTool-KUZgYA8Z.mjs +0 -357
- package/dist/SettingTool-Djrs40Xu.mjs +0 -691
- package/dist/StructureTree-b_gLP-TO.mjs +0 -1591
- package/dist/el-checkbox-DO8tNsp2.mjs +0 -460
- package/dist/el-input-number-B9oE-lvA.mjs +0 -858
- package/dist/index.html +0 -17
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as h, onMounted as V, ref as E, onBeforeUnmount as k,
|
|
2
|
-
import {
|
|
1
|
+
import { defineComponent as h, onMounted as V, ref as E, onBeforeUnmount as k, createElementBlock as s, openBlock as r, createElementVNode as l, Fragment as B, renderList as x, unref as d, normalizeClass as w, toDisplayString as C } from "vue";
|
|
2
|
+
import { z as A, B as m, O as S, A as O, G as T } from "./index-BNrMlQLr.mjs";
|
|
3
3
|
import { X as I } from "./const-DeViLYl5.mjs";
|
|
4
4
|
const R = { class: "xray_wrapper" }, H = { class: "xray_content" }, X = ["onClick"], j = ["src"], L = /* @__PURE__ */ h({
|
|
5
5
|
__name: "XRayTool",
|
|
6
6
|
props: ["componentId"],
|
|
7
7
|
emits: ["closePanel", "emitHandler"],
|
|
8
8
|
setup(u, { emit: z }) {
|
|
9
|
-
const n =
|
|
9
|
+
const n = A(), _ = u;
|
|
10
10
|
V(() => {
|
|
11
11
|
n.setReadyById(_.componentId);
|
|
12
12
|
});
|
|
@@ -22,27 +22,27 @@ const R = { class: "xray_wrapper" }, H = { class: "xray_content" }, X = ["onClic
|
|
|
22
22
|
m.off("BimViewer", a);
|
|
23
23
|
});
|
|
24
24
|
const c = (e) => {
|
|
25
|
-
t.value != -1 && (t.value == 1 ? v(e) : t.value == 2 ?
|
|
25
|
+
t.value != -1 && (t.value == 1 ? v(e) : t.value == 2 ? b(e) : t.value == 3 && f(e));
|
|
26
26
|
}, v = (e) => {
|
|
27
27
|
window.bimViewer.setEntityVisible(e);
|
|
28
|
-
},
|
|
28
|
+
}, b = (e) => {
|
|
29
29
|
window.bimViewer.setEntityHighlighted(e);
|
|
30
|
-
},
|
|
30
|
+
}, f = (e) => {
|
|
31
31
|
window.bimViewer.setEntitySelected(e);
|
|
32
|
-
},
|
|
32
|
+
}, p = () => {
|
|
33
33
|
window.bimViewer.setAllObjectsVisible(!0), window.bimViewer.setAllObjectsHighlighted(!1), window.bimViewer.setAllObjectsSelected(!1);
|
|
34
34
|
}, y = (e) => {
|
|
35
|
-
e == 0 ? (t.value = e,
|
|
35
|
+
e == 0 ? (t.value = e, p()) : t.value = e;
|
|
36
36
|
};
|
|
37
|
-
return (e, o) => (
|
|
37
|
+
return (e, o) => (r(), s("div", R, [
|
|
38
38
|
l("div", H, [
|
|
39
|
-
(
|
|
39
|
+
(r(!0), s(B, null, x(d(I), (i, g) => (r(), s("div", {
|
|
40
40
|
key: g,
|
|
41
41
|
class: w(["button_", { button_active: t.value == i.id }]),
|
|
42
42
|
onClick: (M) => y(i.id)
|
|
43
43
|
}, [
|
|
44
44
|
l("img", {
|
|
45
|
-
src: d(
|
|
45
|
+
src: d(S) + `/industry-viewer/xray-bar/${t.value == i.id ? i.img_active : i.img}.svg`
|
|
46
46
|
}, null, 8, j),
|
|
47
47
|
l("span", {
|
|
48
48
|
class: w({ active_text: t.value == i.id })
|
|
@@ -51,7 +51,7 @@ const R = { class: "xray_wrapper" }, H = { class: "xray_content" }, X = ["onClic
|
|
|
51
51
|
])
|
|
52
52
|
]));
|
|
53
53
|
}
|
|
54
|
-
}),
|
|
54
|
+
}), F = /* @__PURE__ */ T(L, [["__scopeId", "data-v-e5edb869"]]);
|
|
55
55
|
export {
|
|
56
|
-
|
|
56
|
+
F as default
|
|
57
57
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { O as s,
|
|
2
|
-
import { defineComponent as c,
|
|
1
|
+
import { O as s, F as l, G as _ } from "./index-BNrMlQLr.mjs";
|
|
2
|
+
import { defineComponent as c, createElementBlock as a, openBlock as i, createElementVNode as e, unref as r, createVNode as d } from "vue";
|
|
3
3
|
const p = { class: "alert_wrapper" }, m = { class: "alert_box_wrapper" }, u = { class: "alert_box" }, f = { class: "alert_img" }, h = ["src"], v = { class: "alert_close" }, g = /* @__PURE__ */ c({
|
|
4
4
|
__name: "alert",
|
|
5
5
|
props: {
|
|
@@ -20,7 +20,7 @@ const p = { class: "alert_wrapper" }, m = { class: "alert_box_wrapper" }, u = {
|
|
|
20
20
|
setup(n) {
|
|
21
21
|
return (k, t) => {
|
|
22
22
|
const o = l;
|
|
23
|
-
return
|
|
23
|
+
return i(), a("div", p, [
|
|
24
24
|
e("div", m, [
|
|
25
25
|
e("div", u, [
|
|
26
26
|
e("div", f, [
|
|
@@ -40,7 +40,7 @@ const p = { class: "alert_wrapper" }, m = { class: "alert_box_wrapper" }, u = {
|
|
|
40
40
|
]);
|
|
41
41
|
};
|
|
42
42
|
}
|
|
43
|
-
}),
|
|
43
|
+
}), x = /* @__PURE__ */ _(g, [["__scopeId", "data-v-0dbc2d3a"]]);
|
|
44
44
|
export {
|
|
45
|
-
|
|
45
|
+
x as _
|
|
46
46
|
};
|
|
@@ -0,0 +1,544 @@
|
|
|
1
|
+
import { inject as L, computed as p, getCurrentInstance as J, watch as ee, nextTick as le, ref as G, toRaw as W, defineComponent as U, useSlots as ae, createBlock as z, openBlock as S, resolveDynamicComponent as F, unref as c, normalizeClass as V, withCtx as te, createElementVNode as I, createElementBlock as B, createCommentVNode as P, withDirectives as ne, mergeProps as M, isRef as oe, withModifiers as ue, vModelCheckbox as se, renderSlot as R, Fragment as ie, createTextVNode as re, toDisplayString as ce, normalizeStyle as Ve, provide as Le, toRefs as Ee, renderList as Be } from "vue";
|
|
2
|
+
import { j as X, L as Y, d as $, S as de, P as be, U as N, au as _e, i as O, Q as ve, X as j, n as me, M as T, e as _, l as A, k as Ie, x as fe, a as Z, Y as he, R as w, _ as K, u as q, b as Ne, t as D, av as we, Z as De, w as Ge, $ as pe } from "./index-BNrMlQLr.mjs";
|
|
3
|
+
const ke = {
|
|
4
|
+
modelValue: {
|
|
5
|
+
type: [Number, String, Boolean],
|
|
6
|
+
default: void 0
|
|
7
|
+
},
|
|
8
|
+
label: {
|
|
9
|
+
type: [String, Boolean, Number, Object],
|
|
10
|
+
default: void 0
|
|
11
|
+
},
|
|
12
|
+
value: {
|
|
13
|
+
type: [String, Boolean, Number, Object],
|
|
14
|
+
default: void 0
|
|
15
|
+
},
|
|
16
|
+
indeterminate: Boolean,
|
|
17
|
+
disabled: {
|
|
18
|
+
type: Boolean,
|
|
19
|
+
default: void 0
|
|
20
|
+
},
|
|
21
|
+
checked: Boolean,
|
|
22
|
+
name: {
|
|
23
|
+
type: String,
|
|
24
|
+
default: void 0
|
|
25
|
+
},
|
|
26
|
+
trueValue: {
|
|
27
|
+
type: [String, Number],
|
|
28
|
+
default: void 0
|
|
29
|
+
},
|
|
30
|
+
falseValue: {
|
|
31
|
+
type: [String, Number],
|
|
32
|
+
default: void 0
|
|
33
|
+
},
|
|
34
|
+
trueLabel: {
|
|
35
|
+
type: [String, Number],
|
|
36
|
+
default: void 0
|
|
37
|
+
},
|
|
38
|
+
falseLabel: {
|
|
39
|
+
type: [String, Number],
|
|
40
|
+
default: void 0
|
|
41
|
+
},
|
|
42
|
+
id: {
|
|
43
|
+
type: String,
|
|
44
|
+
default: void 0
|
|
45
|
+
},
|
|
46
|
+
border: Boolean,
|
|
47
|
+
size: be,
|
|
48
|
+
tabindex: [String, Number],
|
|
49
|
+
validateEvent: {
|
|
50
|
+
type: Boolean,
|
|
51
|
+
default: !0
|
|
52
|
+
},
|
|
53
|
+
ariaLabel: String,
|
|
54
|
+
...de(["ariaControls"])
|
|
55
|
+
}, xe = {
|
|
56
|
+
[N]: (e) => X(e) || Y(e) || $(e),
|
|
57
|
+
change: (e) => X(e) || Y(e) || $(e)
|
|
58
|
+
}, E = Symbol("checkboxGroupContextKey"), ze = ({
|
|
59
|
+
model: e,
|
|
60
|
+
isChecked: t
|
|
61
|
+
}) => {
|
|
62
|
+
const r = L(E, void 0), a = L(_e, void 0), m = p(() => {
|
|
63
|
+
var d, o;
|
|
64
|
+
const h = (d = r == null ? void 0 : r.max) == null ? void 0 : d.value, v = (o = r == null ? void 0 : r.min) == null ? void 0 : o.value;
|
|
65
|
+
return !O(h) && e.value.length >= h && !t.value || !O(v) && e.value.length <= v && t.value;
|
|
66
|
+
});
|
|
67
|
+
return {
|
|
68
|
+
isDisabled: ve(
|
|
69
|
+
p(() => {
|
|
70
|
+
var d, o;
|
|
71
|
+
return r === void 0 ? (d = a == null ? void 0 : a.disabled) != null ? d : m.value : ((o = r.disabled) == null ? void 0 : o.value) || m.value;
|
|
72
|
+
})
|
|
73
|
+
),
|
|
74
|
+
isLimitDisabled: m
|
|
75
|
+
};
|
|
76
|
+
}, Fe = (e, {
|
|
77
|
+
model: t,
|
|
78
|
+
isLimitExceeded: r,
|
|
79
|
+
hasOwnLabel: a,
|
|
80
|
+
isDisabled: m,
|
|
81
|
+
isLabeledByFormItem: f
|
|
82
|
+
}) => {
|
|
83
|
+
const d = L(E, void 0), { formItem: o } = j(), { emit: h } = J();
|
|
84
|
+
function v(n) {
|
|
85
|
+
var l, u, b, i;
|
|
86
|
+
return [!0, e.trueValue, e.trueLabel].includes(n) ? (u = (l = e.trueValue) != null ? l : e.trueLabel) != null ? u : !0 : (i = (b = e.falseValue) != null ? b : e.falseLabel) != null ? i : !1;
|
|
87
|
+
}
|
|
88
|
+
function s(n, l) {
|
|
89
|
+
h(T, v(n), l);
|
|
90
|
+
}
|
|
91
|
+
function g(n) {
|
|
92
|
+
if (r.value)
|
|
93
|
+
return;
|
|
94
|
+
const l = n.target;
|
|
95
|
+
h(T, v(l.checked), n);
|
|
96
|
+
}
|
|
97
|
+
async function x(n) {
|
|
98
|
+
r.value || !a.value && !m.value && f.value && (n.composedPath().some(
|
|
99
|
+
(b) => b.tagName === "LABEL"
|
|
100
|
+
) || (t.value = v(
|
|
101
|
+
[!1, e.falseValue, e.falseLabel].includes(t.value)
|
|
102
|
+
), await le(), s(t.value, n)));
|
|
103
|
+
}
|
|
104
|
+
const y = p(
|
|
105
|
+
() => (d == null ? void 0 : d.validateEvent) || e.validateEvent
|
|
106
|
+
);
|
|
107
|
+
return ee(
|
|
108
|
+
() => e.modelValue,
|
|
109
|
+
() => {
|
|
110
|
+
y.value && (o == null || o.validate("change").catch((n) => me(n)));
|
|
111
|
+
}
|
|
112
|
+
), {
|
|
113
|
+
handleChange: g,
|
|
114
|
+
onClickRoot: x
|
|
115
|
+
};
|
|
116
|
+
}, Pe = (e) => {
|
|
117
|
+
const t = G(!1), { emit: r } = J(), a = L(E, void 0), m = p(() => O(a) === !1), f = G(!1), d = p({
|
|
118
|
+
get() {
|
|
119
|
+
var o, h;
|
|
120
|
+
return m.value ? (o = a == null ? void 0 : a.modelValue) == null ? void 0 : o.value : (h = e.modelValue) != null ? h : t.value;
|
|
121
|
+
},
|
|
122
|
+
set(o) {
|
|
123
|
+
var h, v;
|
|
124
|
+
m.value && _(o) ? (f.value = ((h = a == null ? void 0 : a.max) == null ? void 0 : h.value) !== void 0 && o.length > (a == null ? void 0 : a.max.value) && o.length > d.value.length, f.value === !1 && ((v = a == null ? void 0 : a.changeEvent) == null || v.call(a, o))) : (r(N, o), t.value = o);
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
return {
|
|
128
|
+
model: d,
|
|
129
|
+
isGroup: m,
|
|
130
|
+
isLimitExceeded: f
|
|
131
|
+
};
|
|
132
|
+
}, $e = (e, t, { model: r }) => {
|
|
133
|
+
const a = L(E, void 0), m = G(!1), f = p(() => A(e.value) ? e.label : e.value), d = p(() => {
|
|
134
|
+
const s = r.value;
|
|
135
|
+
return $(s) ? s : _(s) ? Ie(f.value) ? s.map(W).some((g) => fe(g, f.value)) : s.map(W).includes(f.value) : s != null ? s === e.trueValue || s === e.trueLabel : !!s;
|
|
136
|
+
}), o = Z(
|
|
137
|
+
p(() => {
|
|
138
|
+
var s;
|
|
139
|
+
return (s = a == null ? void 0 : a.size) == null ? void 0 : s.value;
|
|
140
|
+
}),
|
|
141
|
+
{
|
|
142
|
+
prop: !0
|
|
143
|
+
}
|
|
144
|
+
), h = Z(p(() => {
|
|
145
|
+
var s;
|
|
146
|
+
return (s = a == null ? void 0 : a.size) == null ? void 0 : s.value;
|
|
147
|
+
})), v = p(() => !!t.default || !A(f.value));
|
|
148
|
+
return {
|
|
149
|
+
checkboxButtonSize: o,
|
|
150
|
+
isChecked: d,
|
|
151
|
+
isFocused: m,
|
|
152
|
+
checkboxSize: h,
|
|
153
|
+
hasOwnLabel: v,
|
|
154
|
+
actualValue: f
|
|
155
|
+
};
|
|
156
|
+
}, ge = (e, t) => {
|
|
157
|
+
const { formItem: r } = j(), { model: a, isGroup: m, isLimitExceeded: f } = Pe(e), {
|
|
158
|
+
isFocused: d,
|
|
159
|
+
isChecked: o,
|
|
160
|
+
checkboxButtonSize: h,
|
|
161
|
+
checkboxSize: v,
|
|
162
|
+
hasOwnLabel: s,
|
|
163
|
+
actualValue: g
|
|
164
|
+
} = $e(e, t, { model: a }), { isDisabled: x } = ze({ model: a, isChecked: o }), { inputId: y, isLabeledByFormItem: n } = he(e, {
|
|
165
|
+
formItemContext: r,
|
|
166
|
+
disableIdGeneration: s,
|
|
167
|
+
disableIdManagement: m
|
|
168
|
+
}), { handleChange: l, onClickRoot: u } = Fe(e, {
|
|
169
|
+
model: a,
|
|
170
|
+
isLimitExceeded: f,
|
|
171
|
+
hasOwnLabel: s,
|
|
172
|
+
isDisabled: x,
|
|
173
|
+
isLabeledByFormItem: n
|
|
174
|
+
});
|
|
175
|
+
return (() => {
|
|
176
|
+
function i() {
|
|
177
|
+
var k, C;
|
|
178
|
+
_(a.value) && !a.value.includes(g.value) ? a.value.push(g.value) : a.value = (C = (k = e.trueValue) != null ? k : e.trueLabel) != null ? C : !0;
|
|
179
|
+
}
|
|
180
|
+
e.checked && i();
|
|
181
|
+
})(), w(
|
|
182
|
+
{
|
|
183
|
+
from: "label act as value",
|
|
184
|
+
replacement: "value",
|
|
185
|
+
version: "3.0.0",
|
|
186
|
+
scope: "el-checkbox",
|
|
187
|
+
ref: "https://element-plus.org/en-US/component/checkbox.html"
|
|
188
|
+
},
|
|
189
|
+
p(() => m.value && A(e.value))
|
|
190
|
+
), w(
|
|
191
|
+
{
|
|
192
|
+
from: "true-label",
|
|
193
|
+
replacement: "true-value",
|
|
194
|
+
version: "3.0.0",
|
|
195
|
+
scope: "el-checkbox",
|
|
196
|
+
ref: "https://element-plus.org/en-US/component/checkbox.html"
|
|
197
|
+
},
|
|
198
|
+
p(() => !!e.trueLabel)
|
|
199
|
+
), w(
|
|
200
|
+
{
|
|
201
|
+
from: "false-label",
|
|
202
|
+
replacement: "false-value",
|
|
203
|
+
version: "3.0.0",
|
|
204
|
+
scope: "el-checkbox",
|
|
205
|
+
ref: "https://element-plus.org/en-US/component/checkbox.html"
|
|
206
|
+
},
|
|
207
|
+
p(() => !!e.falseLabel)
|
|
208
|
+
), {
|
|
209
|
+
inputId: y,
|
|
210
|
+
isLabeledByFormItem: n,
|
|
211
|
+
isChecked: o,
|
|
212
|
+
isDisabled: x,
|
|
213
|
+
isFocused: d,
|
|
214
|
+
checkboxButtonSize: h,
|
|
215
|
+
checkboxSize: v,
|
|
216
|
+
hasOwnLabel: s,
|
|
217
|
+
model: a,
|
|
218
|
+
actualValue: g,
|
|
219
|
+
handleChange: l,
|
|
220
|
+
onClickRoot: u
|
|
221
|
+
};
|
|
222
|
+
}, Oe = ["id", "indeterminate", "name", "tabindex", "disabled"], Te = U({
|
|
223
|
+
name: "ElCheckbox",
|
|
224
|
+
__name: "checkbox",
|
|
225
|
+
props: ke,
|
|
226
|
+
emits: xe,
|
|
227
|
+
setup(e) {
|
|
228
|
+
const t = e, r = ae(), {
|
|
229
|
+
inputId: a,
|
|
230
|
+
isLabeledByFormItem: m,
|
|
231
|
+
isChecked: f,
|
|
232
|
+
isDisabled: d,
|
|
233
|
+
isFocused: o,
|
|
234
|
+
checkboxSize: h,
|
|
235
|
+
hasOwnLabel: v,
|
|
236
|
+
model: s,
|
|
237
|
+
actualValue: g,
|
|
238
|
+
handleChange: x,
|
|
239
|
+
onClickRoot: y
|
|
240
|
+
} = ge(t, r), n = p(() => {
|
|
241
|
+
var i, k, C, Q;
|
|
242
|
+
return t.trueValue || t.falseValue || t.trueLabel || t.falseLabel ? {
|
|
243
|
+
"true-value": (k = (i = t.trueValue) != null ? i : t.trueLabel) != null ? k : !0,
|
|
244
|
+
"false-value": (Q = (C = t.falseValue) != null ? C : t.falseLabel) != null ? Q : !1
|
|
245
|
+
} : {
|
|
246
|
+
value: g.value
|
|
247
|
+
};
|
|
248
|
+
}), l = q("checkbox"), u = p(() => [
|
|
249
|
+
l.b(),
|
|
250
|
+
l.m(h.value),
|
|
251
|
+
l.is("disabled", d.value),
|
|
252
|
+
l.is("bordered", t.border),
|
|
253
|
+
l.is("checked", f.value)
|
|
254
|
+
]), b = p(() => [
|
|
255
|
+
l.e("input"),
|
|
256
|
+
l.is("disabled", d.value),
|
|
257
|
+
l.is("checked", f.value),
|
|
258
|
+
l.is("indeterminate", t.indeterminate),
|
|
259
|
+
l.is("focus", o.value)
|
|
260
|
+
]);
|
|
261
|
+
return (i, k) => (S(), z(F(!c(v) && c(m) ? "span" : "label"), {
|
|
262
|
+
for: !c(v) && c(m) ? null : c(a),
|
|
263
|
+
class: V(u.value),
|
|
264
|
+
"aria-controls": i.indeterminate ? i.ariaControls : null,
|
|
265
|
+
"aria-checked": i.indeterminate ? "mixed" : void 0,
|
|
266
|
+
"aria-label": i.ariaLabel,
|
|
267
|
+
onClick: c(y)
|
|
268
|
+
}, {
|
|
269
|
+
default: te(() => [
|
|
270
|
+
I(
|
|
271
|
+
"span",
|
|
272
|
+
{
|
|
273
|
+
class: V(b.value)
|
|
274
|
+
},
|
|
275
|
+
[
|
|
276
|
+
ne(I("input", M({
|
|
277
|
+
id: c(a),
|
|
278
|
+
"onUpdate:modelValue": k[0] || (k[0] = (C) => oe(s) ? s.value = C : null),
|
|
279
|
+
class: c(l).e("original"),
|
|
280
|
+
type: "checkbox",
|
|
281
|
+
indeterminate: i.indeterminate,
|
|
282
|
+
name: i.name,
|
|
283
|
+
tabindex: i.tabindex,
|
|
284
|
+
disabled: c(d)
|
|
285
|
+
}, n.value, {
|
|
286
|
+
onChange: k[1] || (k[1] = (...C) => c(x) && c(x)(...C)),
|
|
287
|
+
onFocus: k[2] || (k[2] = (C) => o.value = !0),
|
|
288
|
+
onBlur: k[3] || (k[3] = (C) => o.value = !1),
|
|
289
|
+
onClick: k[4] || (k[4] = ue(() => {
|
|
290
|
+
}, ["stop"]))
|
|
291
|
+
}), null, 16, Oe), [
|
|
292
|
+
[se, c(s)]
|
|
293
|
+
]),
|
|
294
|
+
I(
|
|
295
|
+
"span",
|
|
296
|
+
{
|
|
297
|
+
class: V(c(l).e("inner"))
|
|
298
|
+
},
|
|
299
|
+
null,
|
|
300
|
+
2
|
|
301
|
+
)
|
|
302
|
+
],
|
|
303
|
+
2
|
|
304
|
+
),
|
|
305
|
+
c(v) ? (S(), B(
|
|
306
|
+
"span",
|
|
307
|
+
{
|
|
308
|
+
key: 0,
|
|
309
|
+
class: V(c(l).e("label"))
|
|
310
|
+
},
|
|
311
|
+
[
|
|
312
|
+
R(i.$slots, "default"),
|
|
313
|
+
i.$slots.default ? P("v-if", !0) : (S(), B(
|
|
314
|
+
ie,
|
|
315
|
+
{ key: 0 },
|
|
316
|
+
[
|
|
317
|
+
re(
|
|
318
|
+
ce(i.label),
|
|
319
|
+
1
|
|
320
|
+
)
|
|
321
|
+
],
|
|
322
|
+
64
|
|
323
|
+
))
|
|
324
|
+
],
|
|
325
|
+
2
|
|
326
|
+
)) : P("v-if", !0)
|
|
327
|
+
]),
|
|
328
|
+
_: 3
|
|
329
|
+
}, 8, ["for", "class", "aria-controls", "aria-checked", "aria-label", "onClick"]));
|
|
330
|
+
}
|
|
331
|
+
});
|
|
332
|
+
var Ce = /* @__PURE__ */ K(Te, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/checkbox/src/checkbox.vue"]]);
|
|
333
|
+
const Ae = ["name", "tabindex", "disabled"], Ue = U({
|
|
334
|
+
name: "ElCheckboxButton",
|
|
335
|
+
__name: "checkbox-button",
|
|
336
|
+
props: ke,
|
|
337
|
+
emits: xe,
|
|
338
|
+
setup(e) {
|
|
339
|
+
const t = e, r = ae(), {
|
|
340
|
+
isFocused: a,
|
|
341
|
+
isChecked: m,
|
|
342
|
+
isDisabled: f,
|
|
343
|
+
checkboxButtonSize: d,
|
|
344
|
+
model: o,
|
|
345
|
+
actualValue: h,
|
|
346
|
+
handleChange: v
|
|
347
|
+
} = ge(t, r), s = p(() => {
|
|
348
|
+
var l, u, b, i;
|
|
349
|
+
return t.trueValue || t.falseValue || t.trueLabel || t.falseLabel ? {
|
|
350
|
+
"true-value": (u = (l = t.trueValue) != null ? l : t.trueLabel) != null ? u : !0,
|
|
351
|
+
"false-value": (i = (b = t.falseValue) != null ? b : t.falseLabel) != null ? i : !1
|
|
352
|
+
} : {
|
|
353
|
+
value: h.value
|
|
354
|
+
};
|
|
355
|
+
}), g = L(E, void 0), x = q("checkbox"), y = p(() => {
|
|
356
|
+
var l, u, b, i;
|
|
357
|
+
const k = (u = (l = g == null ? void 0 : g.fill) == null ? void 0 : l.value) != null ? u : "";
|
|
358
|
+
return {
|
|
359
|
+
backgroundColor: k,
|
|
360
|
+
borderColor: k,
|
|
361
|
+
color: (i = (b = g == null ? void 0 : g.textColor) == null ? void 0 : b.value) != null ? i : "",
|
|
362
|
+
boxShadow: k ? `-1px 0 0 0 ${k}` : void 0
|
|
363
|
+
};
|
|
364
|
+
}), n = p(() => [
|
|
365
|
+
x.b("button"),
|
|
366
|
+
x.bm("button", d.value),
|
|
367
|
+
x.is("disabled", f.value),
|
|
368
|
+
x.is("checked", m.value),
|
|
369
|
+
x.is("focus", a.value)
|
|
370
|
+
]);
|
|
371
|
+
return (l, u) => (S(), B(
|
|
372
|
+
"label",
|
|
373
|
+
{
|
|
374
|
+
class: V(n.value)
|
|
375
|
+
},
|
|
376
|
+
[
|
|
377
|
+
ne(I("input", M({
|
|
378
|
+
"onUpdate:modelValue": u[0] || (u[0] = (b) => oe(o) ? o.value = b : null),
|
|
379
|
+
class: c(x).be("button", "original"),
|
|
380
|
+
type: "checkbox",
|
|
381
|
+
name: l.name,
|
|
382
|
+
tabindex: l.tabindex,
|
|
383
|
+
disabled: c(f)
|
|
384
|
+
}, s.value, {
|
|
385
|
+
onChange: u[1] || (u[1] = (...b) => c(v) && c(v)(...b)),
|
|
386
|
+
onFocus: u[2] || (u[2] = (b) => a.value = !0),
|
|
387
|
+
onBlur: u[3] || (u[3] = (b) => a.value = !1),
|
|
388
|
+
onClick: u[4] || (u[4] = ue(() => {
|
|
389
|
+
}, ["stop"]))
|
|
390
|
+
}), null, 16, Ae), [
|
|
391
|
+
[se, c(o)]
|
|
392
|
+
]),
|
|
393
|
+
l.$slots.default || l.label ? (S(), B(
|
|
394
|
+
"span",
|
|
395
|
+
{
|
|
396
|
+
key: 0,
|
|
397
|
+
class: V(c(x).be("button", "inner")),
|
|
398
|
+
style: Ve(c(m) ? y.value : void 0)
|
|
399
|
+
},
|
|
400
|
+
[
|
|
401
|
+
R(l.$slots, "default", {}, () => [
|
|
402
|
+
re(
|
|
403
|
+
ce(l.label),
|
|
404
|
+
1
|
|
405
|
+
)
|
|
406
|
+
])
|
|
407
|
+
],
|
|
408
|
+
6
|
|
409
|
+
)) : P("v-if", !0)
|
|
410
|
+
],
|
|
411
|
+
2
|
|
412
|
+
));
|
|
413
|
+
}
|
|
414
|
+
});
|
|
415
|
+
var H = /* @__PURE__ */ K(Ue, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/checkbox/src/checkbox-button.vue"]]);
|
|
416
|
+
const Me = Ne({
|
|
417
|
+
modelValue: {
|
|
418
|
+
type: D(Array),
|
|
419
|
+
default: () => []
|
|
420
|
+
},
|
|
421
|
+
disabled: {
|
|
422
|
+
type: Boolean,
|
|
423
|
+
default: void 0
|
|
424
|
+
},
|
|
425
|
+
min: Number,
|
|
426
|
+
max: Number,
|
|
427
|
+
size: be,
|
|
428
|
+
fill: String,
|
|
429
|
+
textColor: String,
|
|
430
|
+
tag: {
|
|
431
|
+
type: String,
|
|
432
|
+
default: "div"
|
|
433
|
+
},
|
|
434
|
+
validateEvent: {
|
|
435
|
+
type: Boolean,
|
|
436
|
+
default: !0
|
|
437
|
+
},
|
|
438
|
+
options: {
|
|
439
|
+
type: D(Array)
|
|
440
|
+
},
|
|
441
|
+
props: {
|
|
442
|
+
type: D(Object),
|
|
443
|
+
default: () => ye
|
|
444
|
+
},
|
|
445
|
+
type: {
|
|
446
|
+
type: String,
|
|
447
|
+
values: ["checkbox", "button"],
|
|
448
|
+
default: "checkbox"
|
|
449
|
+
},
|
|
450
|
+
...de(["ariaLabel"])
|
|
451
|
+
}), Re = {
|
|
452
|
+
[N]: (e) => _(e),
|
|
453
|
+
change: (e) => _(e)
|
|
454
|
+
}, ye = {
|
|
455
|
+
label: "label",
|
|
456
|
+
value: "value",
|
|
457
|
+
disabled: "disabled"
|
|
458
|
+
}, je = U({
|
|
459
|
+
name: "ElCheckboxGroup",
|
|
460
|
+
__name: "checkbox-group",
|
|
461
|
+
props: Me,
|
|
462
|
+
emits: Re,
|
|
463
|
+
setup(e, { emit: t }) {
|
|
464
|
+
const r = e, a = t, m = q("checkbox"), f = ve(), { formItem: d } = j(), { inputId: o, isLabeledByFormItem: h } = he(r, {
|
|
465
|
+
formItemContext: d
|
|
466
|
+
}), v = async (n) => {
|
|
467
|
+
a(N, n), await le(), a(T, n);
|
|
468
|
+
}, s = p({
|
|
469
|
+
get() {
|
|
470
|
+
return r.modelValue;
|
|
471
|
+
},
|
|
472
|
+
set(n) {
|
|
473
|
+
v(n);
|
|
474
|
+
}
|
|
475
|
+
}), g = p(() => ({
|
|
476
|
+
...ye,
|
|
477
|
+
...r.props
|
|
478
|
+
})), x = (n) => {
|
|
479
|
+
const { label: l, value: u, disabled: b } = g.value, i = {
|
|
480
|
+
label: n[l],
|
|
481
|
+
value: n[u],
|
|
482
|
+
disabled: n[b]
|
|
483
|
+
};
|
|
484
|
+
return { ...De(n, [l, u, b]), ...i };
|
|
485
|
+
}, y = p(
|
|
486
|
+
() => r.type === "button" ? H : Ce
|
|
487
|
+
);
|
|
488
|
+
return Le(E, {
|
|
489
|
+
...we(Ee(r), [
|
|
490
|
+
"size",
|
|
491
|
+
"min",
|
|
492
|
+
"max",
|
|
493
|
+
"validateEvent",
|
|
494
|
+
"fill",
|
|
495
|
+
"textColor"
|
|
496
|
+
]),
|
|
497
|
+
disabled: f,
|
|
498
|
+
modelValue: s,
|
|
499
|
+
changeEvent: v
|
|
500
|
+
}), ee(
|
|
501
|
+
() => r.modelValue,
|
|
502
|
+
(n, l) => {
|
|
503
|
+
r.validateEvent && !fe(n, l) && (d == null || d.validate("change").catch((u) => me(u)));
|
|
504
|
+
}
|
|
505
|
+
), (n, l) => {
|
|
506
|
+
var u;
|
|
507
|
+
return S(), z(F(n.tag), {
|
|
508
|
+
id: c(o),
|
|
509
|
+
class: V(c(m).b("group")),
|
|
510
|
+
role: "group",
|
|
511
|
+
"aria-label": c(h) ? void 0 : n.ariaLabel || "checkbox-group",
|
|
512
|
+
"aria-labelledby": c(h) ? (u = c(d)) == null ? void 0 : u.labelId : void 0
|
|
513
|
+
}, {
|
|
514
|
+
default: te(() => [
|
|
515
|
+
R(n.$slots, "default", {}, () => [
|
|
516
|
+
(S(!0), B(
|
|
517
|
+
ie,
|
|
518
|
+
null,
|
|
519
|
+
Be(n.options, (b, i) => (S(), z(
|
|
520
|
+
F(y.value),
|
|
521
|
+
M({ key: i }, { ref_for: !0 }, x(b)),
|
|
522
|
+
null,
|
|
523
|
+
16
|
|
524
|
+
))),
|
|
525
|
+
128
|
|
526
|
+
))
|
|
527
|
+
])
|
|
528
|
+
]),
|
|
529
|
+
_: 3
|
|
530
|
+
}, 8, ["id", "class", "aria-label", "aria-labelledby"]);
|
|
531
|
+
};
|
|
532
|
+
}
|
|
533
|
+
});
|
|
534
|
+
var Se = /* @__PURE__ */ K(je, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/checkbox/src/checkbox-group.vue"]]);
|
|
535
|
+
const He = Ge(Ce, {
|
|
536
|
+
CheckboxButton: H,
|
|
537
|
+
CheckboxGroup: Se
|
|
538
|
+
});
|
|
539
|
+
pe(H);
|
|
540
|
+
const Qe = pe(Se);
|
|
541
|
+
export {
|
|
542
|
+
He as E,
|
|
543
|
+
Qe as a
|
|
544
|
+
};
|