@xtctwins/tctwins-industry-engine 0.0.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/README.md +5 -0
- package/dist/AnnotationTool-p1JXCwLS.mjs +129 -0
- package/dist/BCFTool-Cssf2dIk.mjs +25118 -0
- package/dist/CommentTool-Bug4iFC9.mjs +167 -0
- package/dist/Industry_Viewer_Lib.es.js +12 -0
- package/dist/Industry_Viewer_Lib.umd.js +633 -0
- package/dist/InspectorTool-BJzXtOU-.mjs +674 -0
- package/dist/MeasureTool-Dkrz8dS6.mjs +168 -0
- package/dist/MouseTool-Cvc5G90V.mjs +80 -0
- package/dist/NavigateTool-DwEEE5nd.mjs +52 -0
- package/dist/RoamTool-dChjfNvn.mjs +212 -0
- package/dist/ScreenShotTool-CPrA7pEa.mjs +357 -0
- package/dist/SectionTool-Du-V6U-J.mjs +217 -0
- package/dist/SettingTool-X6AjiptI.mjs +691 -0
- package/dist/StructureTree-CHhrQiDL.mjs +1591 -0
- package/dist/XRayTool-Ci1SR92x.mjs +57 -0
- package/dist/alert-BzjOjWCu.mjs +46 -0
- package/dist/const-DeViLYl5.mjs +266 -0
- package/dist/el-checkbox-DeNYO9VE.mjs +460 -0
- package/dist/el-input-number-CsUyeV_5.mjs +858 -0
- package/dist/index-CBO0Vhj8.mjs +99354 -0
- package/dist/index.html +17 -0
- package/dist/panel.vue_vue_type_style_index_0_lang-CUi6naB0.mjs +61 -0
- package/dist/style.css +1 -0
- package/dist/tallPanel-D226sbKd.mjs +84 -0
- package/package.json +65 -0
- package/types/App.vue.d.ts +2 -0
- package/types/components/BCFComponents/BCFAddPanel.vue.d.ts +55 -0
- package/types/components/BCFComponents/BCFDetailPanel.vue.d.ts +59 -0
- package/types/components/BCFComponents/BCFDisplayList.vue.d.ts +18 -0
- package/types/components/BCFComponents/BCFFilter.vue.d.ts +14 -0
- package/types/components/BCFComponents/BCFTool.vue.d.ts +15 -0
- package/types/components/BCFComponents/addObjectOrAnno.vue.d.ts +16 -0
- package/types/components/BCFComponents/checkObjectPanel.vue.d.ts +11 -0
- package/types/components/BCFComponents/commentInput.vue.d.ts +51 -0
- package/types/components/BCFComponents/commentsView.vue.d.ts +48 -0
- package/types/components/BCFComponents/dialogPanel.vue.d.ts +15 -0
- package/types/components/BCFComponents/imageView.vue.d.ts +17 -0
- package/types/components/BCFComponents/imageZoomIn.vue.d.ts +9 -0
- package/types/components/BimViewerComponents/AnnotationTool.vue.d.ts +14 -0
- package/types/components/BimViewerComponents/ClickEvent.vue.d.ts +6 -0
- package/types/components/BimViewerComponents/CommentTool.vue.d.ts +12 -0
- package/types/components/BimViewerComponents/InspectorTool.vue.d.ts +12 -0
- package/types/components/BimViewerComponents/MeasureTool.vue.d.ts +12 -0
- package/types/components/BimViewerComponents/MouseTool.vue.d.ts +6 -0
- package/types/components/BimViewerComponents/NavigateTool.vue.d.ts +10 -0
- package/types/components/BimViewerComponents/RoamTool.vue.d.ts +12 -0
- package/types/components/BimViewerComponents/ScreenShotTool.vue.d.ts +10 -0
- package/types/components/BimViewerComponents/SectionTool.vue.d.ts +10 -0
- package/types/components/BimViewerComponents/SettingTool.vue.d.ts +13 -0
- package/types/components/BimViewerComponents/StructureTree.vue.d.ts +3053 -0
- package/types/components/BimViewerComponents/Toolbar.vue.d.ts +10 -0
- package/types/components/BimViewerComponents/XRayTool.vue.d.ts +12 -0
- package/types/components/BimViewerComponents/mobileToolbar.vue.d.ts +27 -0
- package/types/components/MobileBCFComponents/MobileBCFAdd.vue.d.ts +56 -0
- package/types/components/MobileBCFComponents/MobileBCFDetail.vue.d.ts +55 -0
- package/types/components/MobileBCFComponents/MobileBCFDisplayList.vue.d.ts +278 -0
- package/types/components/MobileBCFComponents/MobileBCFFilter.vue.d.ts +255 -0
- package/types/components/MobileBCFComponents/MobileBCFTool.vue.d.ts +15 -0
- package/types/components/MobileBCFComponents/MobileCommentInput.vue.d.ts +54 -0
- package/types/components/MobileBCFComponents/MobileCommentsView.vue.d.ts +17 -0
- package/types/components/MobileBCFComponents/selectPanel.vue.d.ts +12 -0
- package/types/components/index.d.ts +3 -0
- package/types/components/industryViewer.vue.d.ts +18 -0
- package/types/components/utilsComponents/alert.vue.d.ts +32 -0
- package/types/components/utilsComponents/closeButton.vue.d.ts +50 -0
- package/types/components/utilsComponents/closeButton_dark.vue.d.ts +32 -0
- package/types/components/utilsComponents/emptyPage.vue.d.ts +6 -0
- package/types/components/utilsComponents/loading.vue.d.ts +2 -0
- package/types/components/utilsComponents/panel.vue.d.ts +47 -0
- package/types/components/utilsComponents/rectangleButton.vue.d.ts +106 -0
- package/types/components/utilsComponents/tallPanel.vue.d.ts +69 -0
- package/types/components/utilsComponents/tallPanel_noPos.vue.d.ts +82 -0
- package/types/index.d.ts +31 -0
- package/types/main.d.ts +1 -0
- package/types/pages/viewerEntry.vue.d.ts +59 -0
- package/types/services/request/config.d.ts +8 -0
- package/types/store/bcfManager.d.ts +11 -0
- package/types/store/bcfReflect.d.ts +88 -0
- package/types/store/const.d.ts +211 -0
- package/types/store/initConfigs.d.ts +58 -0
- package/types/store/propertyReflect.d.ts +1 -0
- package/types/store/themeManager.d.ts +8 -0
- package/types/store/toolbars.d.ts +392 -0
- package/types/utils/OSSHelper.d.ts +4 -0
- package/types/utils/cacheInfo.d.ts +20 -0
- package/types/utils/dateFormat.d.ts +2 -0
- package/types/utils/dpscan.d.ts +1 -0
- package/types/utils/eventBus.d.ts +86 -0
- package/types/utils/roles.d.ts +1 -0
- package/types/utils/splitType.d.ts +3 -0
- package/types/utils/timer.d.ts +9 -0
- package/types/viewerManager/initial/viewerInitial.d.ts +7 -0
- package/types/viewerManager/load/loadModel.d.ts +1 -0
- package/types/viewerManager/viewerManager.d.ts +12 -0
|
@@ -0,0 +1,460 @@
|
|
|
1
|
+
import { inject as F, computed as v, getCurrentInstance as Z, watch as ee, nextTick as le, ref as U, toRaw as H, defineComponent as E, useSlots as ne, openBlock as x, createBlock as ae, resolveDynamicComponent as ue, unref as a, normalizeClass as C, withCtx as te, createElementVNode as J, withDirectives as N, createElementBlock as S, isRef as $, withModifiers as z, vModelCheckbox as D, renderSlot as R, Fragment as pe, createTextVNode as oe, toDisplayString as se, createCommentVNode as P, normalizeStyle as ge, provide as Ce, toRefs as xe } from "vue";
|
|
2
|
+
import { H as ie, M as de, U as G, d as Q, F as X, i as T, b as M, K as Ve, P as A, j as re, a as I, f as O, e as ye, aq as Se, J as Y, Q as ce, L as w, u as K, _ as j, D as Le, W as Be, ar as Ee, w as _e, R as be } from "./index-CBO0Vhj8.mjs";
|
|
3
|
+
const fe = {
|
|
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: Boolean,
|
|
18
|
+
checked: Boolean,
|
|
19
|
+
name: {
|
|
20
|
+
type: String,
|
|
21
|
+
default: void 0
|
|
22
|
+
},
|
|
23
|
+
trueValue: {
|
|
24
|
+
type: [String, Number],
|
|
25
|
+
default: void 0
|
|
26
|
+
},
|
|
27
|
+
falseValue: {
|
|
28
|
+
type: [String, Number],
|
|
29
|
+
default: void 0
|
|
30
|
+
},
|
|
31
|
+
trueLabel: {
|
|
32
|
+
type: [String, Number],
|
|
33
|
+
default: void 0
|
|
34
|
+
},
|
|
35
|
+
falseLabel: {
|
|
36
|
+
type: [String, Number],
|
|
37
|
+
default: void 0
|
|
38
|
+
},
|
|
39
|
+
id: {
|
|
40
|
+
type: String,
|
|
41
|
+
default: void 0
|
|
42
|
+
},
|
|
43
|
+
border: Boolean,
|
|
44
|
+
size: ie,
|
|
45
|
+
tabindex: [String, Number],
|
|
46
|
+
validateEvent: {
|
|
47
|
+
type: Boolean,
|
|
48
|
+
default: !0
|
|
49
|
+
},
|
|
50
|
+
...de(["ariaControls"])
|
|
51
|
+
}, me = {
|
|
52
|
+
[G]: (e) => Q(e) || X(e) || T(e),
|
|
53
|
+
change: (e) => Q(e) || X(e) || T(e)
|
|
54
|
+
}, _ = Symbol("checkboxGroupContextKey"), Ie = ({
|
|
55
|
+
model: e,
|
|
56
|
+
isChecked: r
|
|
57
|
+
}) => {
|
|
58
|
+
const i = F(_, void 0), n = v(() => {
|
|
59
|
+
var d, c;
|
|
60
|
+
const u = (d = i == null ? void 0 : i.max) == null ? void 0 : d.value, f = (c = i == null ? void 0 : i.min) == null ? void 0 : c.value;
|
|
61
|
+
return !M(u) && e.value.length >= u && !r.value || !M(f) && e.value.length <= f && r.value;
|
|
62
|
+
});
|
|
63
|
+
return {
|
|
64
|
+
isDisabled: Ve(v(() => (i == null ? void 0 : i.disabled.value) || n.value)),
|
|
65
|
+
isLimitDisabled: n
|
|
66
|
+
};
|
|
67
|
+
}, Fe = (e, {
|
|
68
|
+
model: r,
|
|
69
|
+
isLimitExceeded: i,
|
|
70
|
+
hasOwnLabel: n,
|
|
71
|
+
isDisabled: b,
|
|
72
|
+
isLabeledByFormItem: d
|
|
73
|
+
}) => {
|
|
74
|
+
const c = F(_, void 0), { formItem: u } = A(), { emit: f } = Z();
|
|
75
|
+
function s(l) {
|
|
76
|
+
var h, k, o, p;
|
|
77
|
+
return [!0, e.trueValue, e.trueLabel].includes(l) ? (k = (h = e.trueValue) != null ? h : e.trueLabel) != null ? k : !0 : (p = (o = e.falseValue) != null ? o : e.falseLabel) != null ? p : !1;
|
|
78
|
+
}
|
|
79
|
+
function t(l, h) {
|
|
80
|
+
f("change", s(l), h);
|
|
81
|
+
}
|
|
82
|
+
function m(l) {
|
|
83
|
+
if (i.value)
|
|
84
|
+
return;
|
|
85
|
+
const h = l.target;
|
|
86
|
+
f("change", s(h.checked), l);
|
|
87
|
+
}
|
|
88
|
+
async function V(l) {
|
|
89
|
+
i.value || !n.value && !b.value && d.value && (l.composedPath().some((o) => o.tagName === "LABEL") || (r.value = s([!1, e.falseValue, e.falseLabel].includes(r.value)), await le(), t(r.value, l)));
|
|
90
|
+
}
|
|
91
|
+
const L = v(() => (c == null ? void 0 : c.validateEvent) || e.validateEvent);
|
|
92
|
+
return ee(() => e.modelValue, () => {
|
|
93
|
+
L.value && (u == null || u.validate("change").catch((l) => re(l)));
|
|
94
|
+
}), {
|
|
95
|
+
handleChange: m,
|
|
96
|
+
onClickRoot: V
|
|
97
|
+
};
|
|
98
|
+
}, Ne = (e) => {
|
|
99
|
+
const r = U(!1), { emit: i } = Z(), n = F(_, void 0), b = v(() => M(n) === !1), d = U(!1), c = v({
|
|
100
|
+
get() {
|
|
101
|
+
var u, f;
|
|
102
|
+
return b.value ? (u = n == null ? void 0 : n.modelValue) == null ? void 0 : u.value : (f = e.modelValue) != null ? f : r.value;
|
|
103
|
+
},
|
|
104
|
+
set(u) {
|
|
105
|
+
var f, s;
|
|
106
|
+
b.value && I(u) ? (d.value = ((f = n == null ? void 0 : n.max) == null ? void 0 : f.value) !== void 0 && u.length > (n == null ? void 0 : n.max.value) && u.length > c.value.length, d.value === !1 && ((s = n == null ? void 0 : n.changeEvent) == null || s.call(n, u))) : (i(G, u), r.value = u);
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
return {
|
|
110
|
+
model: c,
|
|
111
|
+
isGroup: b,
|
|
112
|
+
isLimitExceeded: d
|
|
113
|
+
};
|
|
114
|
+
}, $e = (e, r, { model: i }) => {
|
|
115
|
+
const n = F(_, void 0), b = U(!1), d = v(() => O(e.value) ? e.label : e.value), c = v(() => {
|
|
116
|
+
const t = i.value;
|
|
117
|
+
return T(t) ? t : I(t) ? ye(d.value) ? t.map(H).some((m) => Se(m, d.value)) : t.map(H).includes(d.value) : t != null ? t === e.trueValue || t === e.trueLabel : !!t;
|
|
118
|
+
}), u = Y(v(() => {
|
|
119
|
+
var t;
|
|
120
|
+
return (t = n == null ? void 0 : n.size) == null ? void 0 : t.value;
|
|
121
|
+
}), {
|
|
122
|
+
prop: !0
|
|
123
|
+
}), f = Y(v(() => {
|
|
124
|
+
var t;
|
|
125
|
+
return (t = n == null ? void 0 : n.size) == null ? void 0 : t.value;
|
|
126
|
+
})), s = v(() => !!r.default || !O(d.value));
|
|
127
|
+
return {
|
|
128
|
+
checkboxButtonSize: u,
|
|
129
|
+
isChecked: c,
|
|
130
|
+
isFocused: b,
|
|
131
|
+
checkboxSize: f,
|
|
132
|
+
hasOwnLabel: s,
|
|
133
|
+
actualValue: d
|
|
134
|
+
};
|
|
135
|
+
}, ve = (e, r) => {
|
|
136
|
+
const { formItem: i } = A(), { model: n, isGroup: b, isLimitExceeded: d } = Ne(e), {
|
|
137
|
+
isFocused: c,
|
|
138
|
+
isChecked: u,
|
|
139
|
+
checkboxButtonSize: f,
|
|
140
|
+
checkboxSize: s,
|
|
141
|
+
hasOwnLabel: t,
|
|
142
|
+
actualValue: m
|
|
143
|
+
} = $e(e, r, { model: n }), { isDisabled: V } = Ie({ model: n, isChecked: u }), { inputId: L, isLabeledByFormItem: l } = ce(e, {
|
|
144
|
+
formItemContext: i,
|
|
145
|
+
disableIdGeneration: t,
|
|
146
|
+
disableIdManagement: b
|
|
147
|
+
}), { handleChange: h, onClickRoot: k } = Fe(e, {
|
|
148
|
+
model: n,
|
|
149
|
+
isLimitExceeded: d,
|
|
150
|
+
hasOwnLabel: t,
|
|
151
|
+
isDisabled: V,
|
|
152
|
+
isLabeledByFormItem: l
|
|
153
|
+
});
|
|
154
|
+
return (() => {
|
|
155
|
+
function p() {
|
|
156
|
+
var y, g;
|
|
157
|
+
I(n.value) && !n.value.includes(m.value) ? n.value.push(m.value) : n.value = (g = (y = e.trueValue) != null ? y : e.trueLabel) != null ? g : !0;
|
|
158
|
+
}
|
|
159
|
+
e.checked && p();
|
|
160
|
+
})(), w({
|
|
161
|
+
from: "label act as value",
|
|
162
|
+
replacement: "value",
|
|
163
|
+
version: "3.0.0",
|
|
164
|
+
scope: "el-checkbox",
|
|
165
|
+
ref: "https://element-plus.org/en-US/component/checkbox.html"
|
|
166
|
+
}, v(() => b.value && O(e.value))), w({
|
|
167
|
+
from: "true-label",
|
|
168
|
+
replacement: "true-value",
|
|
169
|
+
version: "3.0.0",
|
|
170
|
+
scope: "el-checkbox",
|
|
171
|
+
ref: "https://element-plus.org/en-US/component/checkbox.html"
|
|
172
|
+
}, v(() => !!e.trueLabel)), w({
|
|
173
|
+
from: "false-label",
|
|
174
|
+
replacement: "false-value",
|
|
175
|
+
version: "3.0.0",
|
|
176
|
+
scope: "el-checkbox",
|
|
177
|
+
ref: "https://element-plus.org/en-US/component/checkbox.html"
|
|
178
|
+
}, v(() => !!e.falseLabel)), {
|
|
179
|
+
inputId: L,
|
|
180
|
+
isLabeledByFormItem: l,
|
|
181
|
+
isChecked: u,
|
|
182
|
+
isDisabled: V,
|
|
183
|
+
isFocused: c,
|
|
184
|
+
checkboxButtonSize: f,
|
|
185
|
+
checkboxSize: s,
|
|
186
|
+
hasOwnLabel: t,
|
|
187
|
+
model: n,
|
|
188
|
+
actualValue: m,
|
|
189
|
+
handleChange: h,
|
|
190
|
+
onClickRoot: k
|
|
191
|
+
};
|
|
192
|
+
}, ze = E({
|
|
193
|
+
name: "ElCheckbox"
|
|
194
|
+
}), De = /* @__PURE__ */ E({
|
|
195
|
+
...ze,
|
|
196
|
+
props: fe,
|
|
197
|
+
emits: me,
|
|
198
|
+
setup(e) {
|
|
199
|
+
const r = e, i = ne(), {
|
|
200
|
+
inputId: n,
|
|
201
|
+
isLabeledByFormItem: b,
|
|
202
|
+
isChecked: d,
|
|
203
|
+
isDisabled: c,
|
|
204
|
+
isFocused: u,
|
|
205
|
+
checkboxSize: f,
|
|
206
|
+
hasOwnLabel: s,
|
|
207
|
+
model: t,
|
|
208
|
+
actualValue: m,
|
|
209
|
+
handleChange: V,
|
|
210
|
+
onClickRoot: L
|
|
211
|
+
} = ve(r, i), l = K("checkbox"), h = v(() => [
|
|
212
|
+
l.b(),
|
|
213
|
+
l.m(f.value),
|
|
214
|
+
l.is("disabled", c.value),
|
|
215
|
+
l.is("bordered", r.border),
|
|
216
|
+
l.is("checked", d.value)
|
|
217
|
+
]), k = v(() => [
|
|
218
|
+
l.e("input"),
|
|
219
|
+
l.is("disabled", c.value),
|
|
220
|
+
l.is("checked", d.value),
|
|
221
|
+
l.is("indeterminate", r.indeterminate),
|
|
222
|
+
l.is("focus", u.value)
|
|
223
|
+
]);
|
|
224
|
+
return (o, p) => (x(), ae(ue(!a(s) && a(b) ? "span" : "label"), {
|
|
225
|
+
class: C(a(h)),
|
|
226
|
+
"aria-controls": o.indeterminate ? o.ariaControls : null,
|
|
227
|
+
onClick: a(L)
|
|
228
|
+
}, {
|
|
229
|
+
default: te(() => {
|
|
230
|
+
var y, g, q, W;
|
|
231
|
+
return [
|
|
232
|
+
J("span", {
|
|
233
|
+
class: C(a(k))
|
|
234
|
+
}, [
|
|
235
|
+
o.trueValue || o.falseValue || o.trueLabel || o.falseLabel ? N((x(), S("input", {
|
|
236
|
+
key: 0,
|
|
237
|
+
id: a(n),
|
|
238
|
+
"onUpdate:modelValue": (B) => $(t) ? t.value = B : null,
|
|
239
|
+
class: C(a(l).e("original")),
|
|
240
|
+
type: "checkbox",
|
|
241
|
+
indeterminate: o.indeterminate,
|
|
242
|
+
name: o.name,
|
|
243
|
+
tabindex: o.tabindex,
|
|
244
|
+
disabled: a(c),
|
|
245
|
+
"true-value": (g = (y = o.trueValue) != null ? y : o.trueLabel) != null ? g : !0,
|
|
246
|
+
"false-value": (W = (q = o.falseValue) != null ? q : o.falseLabel) != null ? W : !1,
|
|
247
|
+
onChange: a(V),
|
|
248
|
+
onFocus: (B) => u.value = !0,
|
|
249
|
+
onBlur: (B) => u.value = !1,
|
|
250
|
+
onClick: z(() => {
|
|
251
|
+
}, ["stop"])
|
|
252
|
+
}, null, 42, ["id", "onUpdate:modelValue", "indeterminate", "name", "tabindex", "disabled", "true-value", "false-value", "onChange", "onFocus", "onBlur", "onClick"])), [
|
|
253
|
+
[D, a(t)]
|
|
254
|
+
]) : N((x(), S("input", {
|
|
255
|
+
key: 1,
|
|
256
|
+
id: a(n),
|
|
257
|
+
"onUpdate:modelValue": (B) => $(t) ? t.value = B : null,
|
|
258
|
+
class: C(a(l).e("original")),
|
|
259
|
+
type: "checkbox",
|
|
260
|
+
indeterminate: o.indeterminate,
|
|
261
|
+
disabled: a(c),
|
|
262
|
+
value: a(m),
|
|
263
|
+
name: o.name,
|
|
264
|
+
tabindex: o.tabindex,
|
|
265
|
+
onChange: a(V),
|
|
266
|
+
onFocus: (B) => u.value = !0,
|
|
267
|
+
onBlur: (B) => u.value = !1,
|
|
268
|
+
onClick: z(() => {
|
|
269
|
+
}, ["stop"])
|
|
270
|
+
}, null, 42, ["id", "onUpdate:modelValue", "indeterminate", "disabled", "value", "name", "tabindex", "onChange", "onFocus", "onBlur", "onClick"])), [
|
|
271
|
+
[D, a(t)]
|
|
272
|
+
]),
|
|
273
|
+
J("span", {
|
|
274
|
+
class: C(a(l).e("inner"))
|
|
275
|
+
}, null, 2)
|
|
276
|
+
], 2),
|
|
277
|
+
a(s) ? (x(), S("span", {
|
|
278
|
+
key: 0,
|
|
279
|
+
class: C(a(l).e("label"))
|
|
280
|
+
}, [
|
|
281
|
+
R(o.$slots, "default"),
|
|
282
|
+
o.$slots.default ? P("v-if", !0) : (x(), S(pe, { key: 0 }, [
|
|
283
|
+
oe(se(o.label), 1)
|
|
284
|
+
], 64))
|
|
285
|
+
], 2)) : P("v-if", !0)
|
|
286
|
+
];
|
|
287
|
+
}),
|
|
288
|
+
_: 3
|
|
289
|
+
}, 8, ["class", "aria-controls", "onClick"]));
|
|
290
|
+
}
|
|
291
|
+
});
|
|
292
|
+
var Ge = /* @__PURE__ */ j(De, [["__file", "checkbox.vue"]]);
|
|
293
|
+
const we = E({
|
|
294
|
+
name: "ElCheckboxButton"
|
|
295
|
+
}), Ue = /* @__PURE__ */ E({
|
|
296
|
+
...we,
|
|
297
|
+
props: fe,
|
|
298
|
+
emits: me,
|
|
299
|
+
setup(e) {
|
|
300
|
+
const r = e, i = ne(), {
|
|
301
|
+
isFocused: n,
|
|
302
|
+
isChecked: b,
|
|
303
|
+
isDisabled: d,
|
|
304
|
+
checkboxButtonSize: c,
|
|
305
|
+
model: u,
|
|
306
|
+
actualValue: f,
|
|
307
|
+
handleChange: s
|
|
308
|
+
} = ve(r, i), t = F(_, void 0), m = K("checkbox"), V = v(() => {
|
|
309
|
+
var l, h, k, o;
|
|
310
|
+
const p = (h = (l = t == null ? void 0 : t.fill) == null ? void 0 : l.value) != null ? h : "";
|
|
311
|
+
return {
|
|
312
|
+
backgroundColor: p,
|
|
313
|
+
borderColor: p,
|
|
314
|
+
color: (o = (k = t == null ? void 0 : t.textColor) == null ? void 0 : k.value) != null ? o : "",
|
|
315
|
+
boxShadow: p ? `-1px 0 0 0 ${p}` : void 0
|
|
316
|
+
};
|
|
317
|
+
}), L = v(() => [
|
|
318
|
+
m.b("button"),
|
|
319
|
+
m.bm("button", c.value),
|
|
320
|
+
m.is("disabled", d.value),
|
|
321
|
+
m.is("checked", b.value),
|
|
322
|
+
m.is("focus", n.value)
|
|
323
|
+
]);
|
|
324
|
+
return (l, h) => {
|
|
325
|
+
var k, o, p, y;
|
|
326
|
+
return x(), S("label", {
|
|
327
|
+
class: C(a(L))
|
|
328
|
+
}, [
|
|
329
|
+
l.trueValue || l.falseValue || l.trueLabel || l.falseLabel ? N((x(), S("input", {
|
|
330
|
+
key: 0,
|
|
331
|
+
"onUpdate:modelValue": (g) => $(u) ? u.value = g : null,
|
|
332
|
+
class: C(a(m).be("button", "original")),
|
|
333
|
+
type: "checkbox",
|
|
334
|
+
name: l.name,
|
|
335
|
+
tabindex: l.tabindex,
|
|
336
|
+
disabled: a(d),
|
|
337
|
+
"true-value": (o = (k = l.trueValue) != null ? k : l.trueLabel) != null ? o : !0,
|
|
338
|
+
"false-value": (y = (p = l.falseValue) != null ? p : l.falseLabel) != null ? y : !1,
|
|
339
|
+
onChange: a(s),
|
|
340
|
+
onFocus: (g) => n.value = !0,
|
|
341
|
+
onBlur: (g) => n.value = !1,
|
|
342
|
+
onClick: z(() => {
|
|
343
|
+
}, ["stop"])
|
|
344
|
+
}, null, 42, ["onUpdate:modelValue", "name", "tabindex", "disabled", "true-value", "false-value", "onChange", "onFocus", "onBlur", "onClick"])), [
|
|
345
|
+
[D, a(u)]
|
|
346
|
+
]) : N((x(), S("input", {
|
|
347
|
+
key: 1,
|
|
348
|
+
"onUpdate:modelValue": (g) => $(u) ? u.value = g : null,
|
|
349
|
+
class: C(a(m).be("button", "original")),
|
|
350
|
+
type: "checkbox",
|
|
351
|
+
name: l.name,
|
|
352
|
+
tabindex: l.tabindex,
|
|
353
|
+
disabled: a(d),
|
|
354
|
+
value: a(f),
|
|
355
|
+
onChange: a(s),
|
|
356
|
+
onFocus: (g) => n.value = !0,
|
|
357
|
+
onBlur: (g) => n.value = !1,
|
|
358
|
+
onClick: z(() => {
|
|
359
|
+
}, ["stop"])
|
|
360
|
+
}, null, 42, ["onUpdate:modelValue", "name", "tabindex", "disabled", "value", "onChange", "onFocus", "onBlur", "onClick"])), [
|
|
361
|
+
[D, a(u)]
|
|
362
|
+
]),
|
|
363
|
+
l.$slots.default || l.label ? (x(), S("span", {
|
|
364
|
+
key: 2,
|
|
365
|
+
class: C(a(m).be("button", "inner")),
|
|
366
|
+
style: ge(a(b) ? a(V) : void 0)
|
|
367
|
+
}, [
|
|
368
|
+
R(l.$slots, "default", {}, () => [
|
|
369
|
+
oe(se(l.label), 1)
|
|
370
|
+
])
|
|
371
|
+
], 6)) : P("v-if", !0)
|
|
372
|
+
], 2);
|
|
373
|
+
};
|
|
374
|
+
}
|
|
375
|
+
});
|
|
376
|
+
var he = /* @__PURE__ */ j(Ue, [["__file", "checkbox-button.vue"]]);
|
|
377
|
+
const Pe = Le({
|
|
378
|
+
modelValue: {
|
|
379
|
+
type: Be(Array),
|
|
380
|
+
default: () => []
|
|
381
|
+
},
|
|
382
|
+
disabled: Boolean,
|
|
383
|
+
min: Number,
|
|
384
|
+
max: Number,
|
|
385
|
+
size: ie,
|
|
386
|
+
fill: String,
|
|
387
|
+
textColor: String,
|
|
388
|
+
tag: {
|
|
389
|
+
type: String,
|
|
390
|
+
default: "div"
|
|
391
|
+
},
|
|
392
|
+
validateEvent: {
|
|
393
|
+
type: Boolean,
|
|
394
|
+
default: !0
|
|
395
|
+
},
|
|
396
|
+
...de(["ariaLabel"])
|
|
397
|
+
}), Te = {
|
|
398
|
+
[G]: (e) => I(e),
|
|
399
|
+
change: (e) => I(e)
|
|
400
|
+
}, Me = E({
|
|
401
|
+
name: "ElCheckboxGroup"
|
|
402
|
+
}), Oe = /* @__PURE__ */ E({
|
|
403
|
+
...Me,
|
|
404
|
+
props: Pe,
|
|
405
|
+
emits: Te,
|
|
406
|
+
setup(e, { emit: r }) {
|
|
407
|
+
const i = e, n = K("checkbox"), { formItem: b } = A(), { inputId: d, isLabeledByFormItem: c } = ce(i, {
|
|
408
|
+
formItemContext: b
|
|
409
|
+
}), u = async (s) => {
|
|
410
|
+
r(G, s), await le(), r("change", s);
|
|
411
|
+
}, f = v({
|
|
412
|
+
get() {
|
|
413
|
+
return i.modelValue;
|
|
414
|
+
},
|
|
415
|
+
set(s) {
|
|
416
|
+
u(s);
|
|
417
|
+
}
|
|
418
|
+
});
|
|
419
|
+
return Ce(_, {
|
|
420
|
+
...Ee(xe(i), [
|
|
421
|
+
"size",
|
|
422
|
+
"min",
|
|
423
|
+
"max",
|
|
424
|
+
"disabled",
|
|
425
|
+
"validateEvent",
|
|
426
|
+
"fill",
|
|
427
|
+
"textColor"
|
|
428
|
+
]),
|
|
429
|
+
modelValue: f,
|
|
430
|
+
changeEvent: u
|
|
431
|
+
}), ee(() => i.modelValue, () => {
|
|
432
|
+
i.validateEvent && (b == null || b.validate("change").catch((s) => re(s)));
|
|
433
|
+
}), (s, t) => {
|
|
434
|
+
var m;
|
|
435
|
+
return x(), ae(ue(s.tag), {
|
|
436
|
+
id: a(d),
|
|
437
|
+
class: C(a(n).b("group")),
|
|
438
|
+
role: "group",
|
|
439
|
+
"aria-label": a(c) ? void 0 : s.ariaLabel || "checkbox-group",
|
|
440
|
+
"aria-labelledby": a(c) ? (m = a(b)) == null ? void 0 : m.labelId : void 0
|
|
441
|
+
}, {
|
|
442
|
+
default: te(() => [
|
|
443
|
+
R(s.$slots, "default")
|
|
444
|
+
]),
|
|
445
|
+
_: 3
|
|
446
|
+
}, 8, ["id", "class", "aria-label", "aria-labelledby"]);
|
|
447
|
+
};
|
|
448
|
+
}
|
|
449
|
+
});
|
|
450
|
+
var ke = /* @__PURE__ */ j(Oe, [["__file", "checkbox-group.vue"]]);
|
|
451
|
+
const Ke = _e(Ge, {
|
|
452
|
+
CheckboxButton: he,
|
|
453
|
+
CheckboxGroup: ke
|
|
454
|
+
});
|
|
455
|
+
be(he);
|
|
456
|
+
const je = be(ke);
|
|
457
|
+
export {
|
|
458
|
+
Ke as E,
|
|
459
|
+
je as a
|
|
460
|
+
};
|