@sunny-base-web/ui 0.8.49 → 0.8.51
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/index.js +3 -3
- package/dist/index.mjs +244 -244
- package/package.json +6 -6
package/dist/index.mjs
CHANGED
|
@@ -824,13 +824,13 @@ const fc = Object.assign(Xn, {
|
|
|
824
824
|
}, h = async () => {
|
|
825
825
|
const S = o.onBeforeCancel;
|
|
826
826
|
typeof S == "function" && await S() === !1 || (b.value = !1, d.value = !1, i("close"));
|
|
827
|
-
}, g = h,
|
|
827
|
+
}, g = h, k = async () => {
|
|
828
828
|
const S = o.onBeforeOk;
|
|
829
829
|
if (typeof S == "function")
|
|
830
830
|
try {
|
|
831
831
|
u.value = !0, await S() !== !1 && (b.value = !1, i("ok"), d.value = !1);
|
|
832
|
-
} catch (
|
|
833
|
-
console.error(
|
|
832
|
+
} catch ($) {
|
|
833
|
+
console.error($);
|
|
834
834
|
} finally {
|
|
835
835
|
u.value = !1;
|
|
836
836
|
}
|
|
@@ -839,9 +839,9 @@ const fc = Object.assign(Xn, {
|
|
|
839
839
|
};
|
|
840
840
|
return n({
|
|
841
841
|
toggleMaximize: p
|
|
842
|
-
}), (S,
|
|
842
|
+
}), (S, $) => (F(), ee(m(Nt), ae({
|
|
843
843
|
visible: d.value,
|
|
844
|
-
"onUpdate:visible":
|
|
844
|
+
"onUpdate:visible": $[2] || ($[2] = (V) => d.value = V),
|
|
845
845
|
title: e.title,
|
|
846
846
|
width: e.width,
|
|
847
847
|
top: e.top,
|
|
@@ -852,15 +852,15 @@ const fc = Object.assign(Xn, {
|
|
|
852
852
|
closable: !1
|
|
853
853
|
}, S.$attrs, {
|
|
854
854
|
"modal-class": "sunny-modal",
|
|
855
|
-
onClick:
|
|
855
|
+
onClick: $[3] || ($[3] = Ve(() => {
|
|
856
856
|
}, ["stop"])),
|
|
857
|
-
onMousedown:
|
|
857
|
+
onMousedown: $[4] || ($[4] = Ve(() => {
|
|
858
858
|
}, ["stop"]))
|
|
859
859
|
}), {
|
|
860
860
|
title: L(() => [
|
|
861
861
|
B("div", {
|
|
862
862
|
class: "sunny-modal__header",
|
|
863
|
-
onDblclick:
|
|
863
|
+
onDblclick: $[1] || ($[1] = (V) => o.fullscreen && p())
|
|
864
864
|
}, [
|
|
865
865
|
B("div", pc, [
|
|
866
866
|
ie(S.$slots, "title", {}, () => [
|
|
@@ -876,7 +876,7 @@ const fc = Object.assign(Xn, {
|
|
|
876
876
|
B("button", {
|
|
877
877
|
type: "button",
|
|
878
878
|
class: "sunny-modal__action-btn sunny-modal__action-btn--help",
|
|
879
|
-
onClick:
|
|
879
|
+
onClick: $[0] || ($[0] = Ve(() => {
|
|
880
880
|
}, ["stop"]))
|
|
881
881
|
}, [
|
|
882
882
|
j(m($o))
|
|
@@ -923,7 +923,7 @@ const fc = Object.assign(Xn, {
|
|
|
923
923
|
type: "primary",
|
|
924
924
|
size: "mini",
|
|
925
925
|
loading: u.value || m(l).okLoading || m(l).confirmLoading
|
|
926
|
-
}, m(l).okButtonProps, { onClick:
|
|
926
|
+
}, m(l).okButtonProps, { onClick: k }), {
|
|
927
927
|
icon: L(() => [
|
|
928
928
|
j(m(ko))
|
|
929
929
|
]),
|
|
@@ -1329,16 +1329,16 @@ const Rc = ["aria-live", "aria-busy"], Mc = ["aria-label"], Oc = {
|
|
|
1329
1329
|
"left-shadow": !u.value && b.value,
|
|
1330
1330
|
"right-shadow": !i.value && p.value
|
|
1331
1331
|
}));
|
|
1332
|
-
function g(
|
|
1333
|
-
const S =
|
|
1334
|
-
o.value =
|
|
1332
|
+
function g(k) {
|
|
1333
|
+
const S = k.target, $ = S?.scrollTop ?? 0, V = S?.scrollLeft ?? 0, R = S?.clientHeight ?? 0, x = S?.clientWidth ?? 0, O = S?.scrollHeight ?? 0, P = S?.scrollWidth ?? 0;
|
|
1334
|
+
o.value = $ <= 0, u.value = V <= 0, l.value = Math.abs($) + R >= O - Yr, i.value = Math.abs(V) + x >= P - Yr, r("scrollAt", {
|
|
1335
1335
|
bottom: l.value,
|
|
1336
1336
|
left: u.value,
|
|
1337
1337
|
right: i.value,
|
|
1338
1338
|
top: o.value
|
|
1339
1339
|
});
|
|
1340
1340
|
}
|
|
1341
|
-
return (
|
|
1341
|
+
return (k, S) => (F(), ee(m(Bc), {
|
|
1342
1342
|
class: fe([[m(Dt)(t.class), h.value], "sunny-scrollbar relative"]),
|
|
1343
1343
|
"on-scroll": g
|
|
1344
1344
|
}, {
|
|
@@ -1350,7 +1350,7 @@ const Rc = ["aria-live", "aria-busy"], Mc = ["aria-label"], Oc = {
|
|
|
1350
1350
|
"border-t border-border": e.shadowBorder && !o.value
|
|
1351
1351
|
}, "scrollbar-top-shadow pointer-events-none absolute top-0 z-10 h-12 w-full opacity-0 transition-opacity duration-300 ease-in-out will-change-[opacity]"])
|
|
1352
1352
|
}, null, 2)) : se("", !0),
|
|
1353
|
-
ie(
|
|
1353
|
+
ie(k.$slots, "default", {}, void 0, !0),
|
|
1354
1354
|
y.value ? (F(), Y("div", {
|
|
1355
1355
|
key: 1,
|
|
1356
1356
|
class: fe([{
|
|
@@ -1443,8 +1443,8 @@ function Up(e) {
|
|
|
1443
1443
|
// ✅ 添加 exportAdapter 到全局配置
|
|
1444
1444
|
apiPrefix: g
|
|
1445
1445
|
}), t)
|
|
1446
|
-
for (const
|
|
1447
|
-
wo(
|
|
1446
|
+
for (const k of Object.keys(t))
|
|
1447
|
+
wo(k, t[k]);
|
|
1448
1448
|
}
|
|
1449
1449
|
const Uc = { class: "sunny-file-upload" }, Wc = { class: "font-bold text-gray-700 mb-2" }, Hc = { class: "flex flex-wrap items-center text-sm mb-3 select-none" }, qc = { class: "cursor-pointer text-blue-600 hover:text-blue-700 flex items-center mr-4 transition-colors" }, Gc = { class: "text-xs text-blue-600" }, Jc = { class: "text-xs text-gray-400" }, Yc = { class: "border border-dashed border-gray-300 rounded-lg p-4 transition-all duration-300" }, Kc = { class: "grid grid-cols-1 sm:grid-cols-2 gap-4" }, Qc = { class: "flex-1 min-w-0 pr-8" }, Zc = ["title"], Xc = { class: "flex items-center text-xs text-gray-500" }, eu = { class: "mr-3 min-w-[3em]" }, tu = { class: "ml-2 w-8 text-right" }, Kr = 1024, Wp = /* @__PURE__ */ te({
|
|
1450
1450
|
__name: "index",
|
|
@@ -1500,7 +1500,7 @@ const Uc = { class: "sunny-file-upload" }, Wc = { class: "font-bold text-gray-70
|
|
|
1500
1500
|
if (T === 0) return "0 B";
|
|
1501
1501
|
const w = Math.floor(Math.log(T) / Math.log(Kr));
|
|
1502
1502
|
return (T / Math.pow(Kr, w)).toPrecision(3) + " " + t[w];
|
|
1503
|
-
},
|
|
1503
|
+
}, k = (T) => {
|
|
1504
1504
|
const w = T.type || "", E = (T.name || "").split(".").pop()?.toLowerCase() || "", D = {
|
|
1505
1505
|
"vscode-icons:file-type-excel": ["xls", "xlsx", "csv"],
|
|
1506
1506
|
"vscode-icons:file-type-powerpoint": ["ppt", "pptx"],
|
|
@@ -1516,7 +1516,7 @@ const Uc = { class: "sunny-file-upload" }, Wc = { class: "font-bold text-gray-70
|
|
|
1516
1516
|
}, S = () => {
|
|
1517
1517
|
const T = JSON.stringify(u.value);
|
|
1518
1518
|
o("update:modelValue", T), o("change", T);
|
|
1519
|
-
},
|
|
1519
|
+
}, $ = (T, w) => {
|
|
1520
1520
|
if (w.status !== "init") return;
|
|
1521
1521
|
const v = y.value;
|
|
1522
1522
|
if (u.value.length >= v.limit) {
|
|
@@ -1607,7 +1607,7 @@ const Uc = { class: "sunny-file-upload" }, Wc = { class: "font-bold text-gray-70
|
|
|
1607
1607
|
"auto-upload": !1,
|
|
1608
1608
|
multiple: "",
|
|
1609
1609
|
accept: y.value.accept,
|
|
1610
|
-
onChange:
|
|
1610
|
+
onChange: $
|
|
1611
1611
|
}, {
|
|
1612
1612
|
"upload-button": L(() => [
|
|
1613
1613
|
B("span", qc, [
|
|
@@ -1658,7 +1658,7 @@ const Uc = { class: "sunny-file-upload" }, Wc = { class: "font-bold text-gray-70
|
|
|
1658
1658
|
class: "bg-gray-50 hover:bg-gray-100 rounded p-3 relative flex items-center border border-transparent hover:border-gray-200 transition-colors group"
|
|
1659
1659
|
}, [
|
|
1660
1660
|
j(m(To), {
|
|
1661
|
-
icon:
|
|
1661
|
+
icon: k(v),
|
|
1662
1662
|
class: "w-10 h-10 mr-3 flex-shrink-0"
|
|
1663
1663
|
}, null, 8, ["icon"]),
|
|
1664
1664
|
B("div", Qc, [
|
|
@@ -1775,33 +1775,33 @@ const Uc = { class: "sunny-file-upload" }, Wc = { class: "font-bold text-gray-70
|
|
|
1775
1775
|
"[SunnySimpleUpload] Missing required config: delAction. Please provide via props or configure globally using setupBusinessForm()."
|
|
1776
1776
|
);
|
|
1777
1777
|
const o = N(() => JSON.parse(t.modelValue || "[]")), i = n, l = (d) => {
|
|
1778
|
-
const { onProgress: y, onError: b, onSuccess: p, fileItem: h, name: g } = d,
|
|
1779
|
-
if (
|
|
1780
|
-
ue.error(`最多只能上传 ${
|
|
1778
|
+
const { onProgress: y, onError: b, onSuccess: p, fileItem: h, name: g } = d, k = r.value;
|
|
1779
|
+
if (k.limit && o.value.length >= k.limit) {
|
|
1780
|
+
ue.error(`最多只能上传 ${k.limit} 个文件`), b();
|
|
1781
1781
|
return;
|
|
1782
1782
|
}
|
|
1783
|
-
if (
|
|
1784
|
-
ue.error(`文件大小不能超过 ${
|
|
1783
|
+
if (k.maxSize && h.file.size > k.maxSize * 1024 * 1024) {
|
|
1784
|
+
ue.error(`文件大小不能超过 ${k.maxSize} MB`), b();
|
|
1785
1785
|
return;
|
|
1786
1786
|
}
|
|
1787
1787
|
var S = new FormData();
|
|
1788
|
-
S.append("fileName", h.file), S.append("encryptFile",
|
|
1789
|
-
|
|
1788
|
+
S.append("fileName", h.file), S.append("encryptFile", k.encryptFile === !0 ? "1" : "0"), S.append("storeType", k.storeType), k.s3FileDir && S.append("s3FileDir", k.s3FileDir), k.preSigned && S.append("preSigned", k.preSigned === !0 ? "1" : "0"), k.preSignedExpire && S.append("preSignedExpire", String(k.preSignedExpire)), st.post(
|
|
1789
|
+
k.action,
|
|
1790
1790
|
// ✅ 使用合并后的 action
|
|
1791
1791
|
S,
|
|
1792
1792
|
{
|
|
1793
|
-
onUploadProgress: (
|
|
1794
|
-
const V = Math.floor(
|
|
1793
|
+
onUploadProgress: ($) => {
|
|
1794
|
+
const V = Math.floor($.loaded / $.total * 100);
|
|
1795
1795
|
y(V);
|
|
1796
1796
|
}
|
|
1797
1797
|
}
|
|
1798
|
-
).then((
|
|
1799
|
-
if (
|
|
1800
|
-
ue.success(
|
|
1798
|
+
).then(($) => {
|
|
1799
|
+
if ($.data.code === 200) {
|
|
1800
|
+
ue.success($.data.message || "上传成功"), p($.data.result);
|
|
1801
1801
|
const V = [...o.value, h];
|
|
1802
1802
|
i("update:modelValue", JSON.stringify(V)), i("change", JSON.stringify(V));
|
|
1803
1803
|
} else
|
|
1804
|
-
ue.error(
|
|
1804
|
+
ue.error($.data.message || "上传失败"), b();
|
|
1805
1805
|
}).catch(() => {
|
|
1806
1806
|
b();
|
|
1807
1807
|
});
|
|
@@ -1851,7 +1851,7 @@ const Uc = { class: "sunny-file-upload" }, Wc = { class: "font-bold text-gray-70
|
|
|
1851
1851
|
loading: !1,
|
|
1852
1852
|
color: g.status === "error" ? "red" : "green",
|
|
1853
1853
|
closable: "",
|
|
1854
|
-
onClose: (
|
|
1854
|
+
onClose: (k) => u(g)
|
|
1855
1855
|
}, {
|
|
1856
1856
|
default: L(() => [
|
|
1857
1857
|
we(Q(g.name), 1)
|
|
@@ -1948,21 +1948,21 @@ const Uc = { class: "sunny-file-upload" }, Wc = { class: "font-bold text-gray-70
|
|
|
1948
1948
|
r("update:modelValue", p), r("change", p);
|
|
1949
1949
|
}, d = (p) => {
|
|
1950
1950
|
if (p === !0) {
|
|
1951
|
-
const g = o.value.map((
|
|
1952
|
-
const V = t.options.find((R) => R.value ===
|
|
1951
|
+
const g = o.value.map(($) => $.value), k = t.modelValue.filter(($) => {
|
|
1952
|
+
const V = t.options.find((R) => R.value === $);
|
|
1953
1953
|
return V && V.disabled;
|
|
1954
|
-
}), S = Array.from(/* @__PURE__ */ new Set([
|
|
1954
|
+
}), S = Array.from(/* @__PURE__ */ new Set([...k, ...g]));
|
|
1955
1955
|
r("update:modelValue", S), r("change", S);
|
|
1956
1956
|
} else {
|
|
1957
|
-
const g = t.modelValue.filter((
|
|
1958
|
-
const S = t.options.find((
|
|
1957
|
+
const g = t.modelValue.filter((k) => {
|
|
1958
|
+
const S = t.options.find(($) => $.value === k);
|
|
1959
1959
|
return S && S.disabled;
|
|
1960
1960
|
});
|
|
1961
1961
|
r("update:modelValue", g), r("change", g);
|
|
1962
1962
|
}
|
|
1963
1963
|
}, y = () => {
|
|
1964
1964
|
const p = t.modelValue.filter((h) => {
|
|
1965
|
-
const g = t.options.find((
|
|
1965
|
+
const g = t.options.find((k) => k.value === h);
|
|
1966
1966
|
return g && g.disabled;
|
|
1967
1967
|
});
|
|
1968
1968
|
r("update:modelValue", p), r("change", p);
|
|
@@ -1971,10 +1971,10 @@ const Uc = { class: "sunny-file-upload" }, Wc = { class: "font-bold text-gray-70
|
|
|
1971
1971
|
if (!h) return;
|
|
1972
1972
|
const g = h.getData("text");
|
|
1973
1973
|
if (!g) return;
|
|
1974
|
-
const
|
|
1975
|
-
if (
|
|
1974
|
+
const k = g.split(/\r?\n/).map((R) => R.trim()).filter((R) => R);
|
|
1975
|
+
if (k.length === 0) return;
|
|
1976
1976
|
const S = [];
|
|
1977
|
-
let
|
|
1977
|
+
let $ = 0;
|
|
1978
1978
|
const V = (R) => {
|
|
1979
1979
|
const x = R.cMeta;
|
|
1980
1980
|
return !x || Object.keys(x).length === 0 ? !0 : !t.filterModel || Object.keys(t.filterModel).length === 0 ? !1 : Object.entries(x).every(([O, P]) => {
|
|
@@ -1982,26 +1982,26 @@ const Uc = { class: "sunny-file-upload" }, Wc = { class: "font-bold text-gray-70
|
|
|
1982
1982
|
return T == null ? !1 : String(T) === String(P);
|
|
1983
1983
|
});
|
|
1984
1984
|
};
|
|
1985
|
-
if (
|
|
1985
|
+
if (k.forEach((R) => {
|
|
1986
1986
|
if (t.matchStrategy === "value" || t.matchStrategy === "both") {
|
|
1987
1987
|
const x = t.options.find((O) => String(O.value) === R);
|
|
1988
1988
|
if (x && !x.disabled && V(x)) {
|
|
1989
|
-
S.push(x.value),
|
|
1989
|
+
S.push(x.value), $++;
|
|
1990
1990
|
return;
|
|
1991
1991
|
}
|
|
1992
1992
|
}
|
|
1993
1993
|
if (t.matchStrategy === "label" || t.matchStrategy === "both") {
|
|
1994
1994
|
const x = t.options.find((O) => O.label === R);
|
|
1995
|
-
x && !x.disabled && V(x) && (S.push(x.value),
|
|
1995
|
+
x && !x.disabled && V(x) && (S.push(x.value), $++);
|
|
1996
1996
|
}
|
|
1997
1997
|
}), S.length > 0) {
|
|
1998
1998
|
p.preventDefault();
|
|
1999
1999
|
const R = Array.from(/* @__PURE__ */ new Set([...t.modelValue, ...S]));
|
|
2000
|
-
r("update:modelValue", R), r("change", R), ue.success(`成功识别并选中 ${
|
|
2000
|
+
r("update:modelValue", R), r("change", R), ue.success(`成功识别并选中 ${$} 项 (Matched ${$} items)`);
|
|
2001
2001
|
}
|
|
2002
2002
|
};
|
|
2003
2003
|
return (p, h) => {
|
|
2004
|
-
const g = Te("a-checkbox"),
|
|
2004
|
+
const g = Te("a-checkbox"), k = Te("a-tooltip");
|
|
2005
2005
|
return F(), ee(m(au), ae(p.$attrs, {
|
|
2006
2006
|
"model-value": e.modelValue,
|
|
2007
2007
|
options: e.options,
|
|
@@ -2025,7 +2025,7 @@ const Uc = { class: "sunny-file-upload" }, Wc = { class: "font-bold text-gray-70
|
|
|
2025
2025
|
_: 1
|
|
2026
2026
|
}, 8, ["model-value", "indeterminate"]),
|
|
2027
2027
|
B("div", iu, [
|
|
2028
|
-
j(
|
|
2028
|
+
j(k, { content: "清除所有选中项" }, {
|
|
2029
2029
|
default: L(() => [
|
|
2030
2030
|
B("div", {
|
|
2031
2031
|
class: "w-6 h-6 flex items-center justify-center rounded cursor-pointer text-[var(--color-text-3)] hover:bg-[var(--color-fill-3)] transition-all",
|
|
@@ -2037,7 +2037,7 @@ const Uc = { class: "sunny-file-upload" }, Wc = { class: "font-bold text-gray-70
|
|
|
2037
2037
|
_: 1
|
|
2038
2038
|
}),
|
|
2039
2039
|
h[1] || (h[1] = B("div", { class: "w-[1px] h-3 bg-[var(--color-neutral-3)] mx-1" }, null, -1)),
|
|
2040
|
-
j(
|
|
2040
|
+
j(k, {
|
|
2041
2041
|
content: "支持从 Excel 或文本编辑器(↓列数据)复制多行数据,粘贴至搜索框即可自动匹配并选中。",
|
|
2042
2042
|
position: "left"
|
|
2043
2043
|
}, {
|
|
@@ -2053,10 +2053,10 @@ const Uc = { class: "sunny-file-upload" }, Wc = { class: "font-bold text-gray-70
|
|
|
2053
2053
|
]),
|
|
2054
2054
|
_: 2
|
|
2055
2055
|
}, [
|
|
2056
|
-
Pe(p.$slots, (S,
|
|
2057
|
-
name:
|
|
2056
|
+
Pe(p.$slots, (S, $) => ({
|
|
2057
|
+
name: $,
|
|
2058
2058
|
fn: L((V) => [
|
|
2059
|
-
ie(p.$slots,
|
|
2059
|
+
ie(p.$slots, $, Ie(tt(V || {})))
|
|
2060
2060
|
])
|
|
2061
2061
|
}))
|
|
2062
2062
|
]), 1040, ["model-value", "options", "filter-model"]);
|
|
@@ -2100,16 +2100,16 @@ const Uc = { class: "sunny-file-upload" }, Wc = { class: "font-bold text-gray-70
|
|
|
2100
2100
|
"End"
|
|
2101
2101
|
].includes(h.key) || h.preventDefault();
|
|
2102
2102
|
}, y = (h, g) => {
|
|
2103
|
-
const
|
|
2104
|
-
|
|
2103
|
+
const k = [...t.modelValue];
|
|
2104
|
+
k.splice(g, 1), r("update:modelValue", k), r("change", k);
|
|
2105
2105
|
}, b = () => {
|
|
2106
2106
|
r("update:modelValue", []), r("change", []), r("clear");
|
|
2107
2107
|
}, p = () => {
|
|
2108
2108
|
t.disabled || r("search");
|
|
2109
2109
|
};
|
|
2110
2110
|
return (h, g) => {
|
|
2111
|
-
const
|
|
2112
|
-
return F(), ee(
|
|
2111
|
+
const k = Te("a-input-tag"), S = Te("a-tag"), $ = Te("a-popover");
|
|
2112
|
+
return F(), ee($, {
|
|
2113
2113
|
"popup-visible": u.value,
|
|
2114
2114
|
"onUpdate:popupVisible": g[1] || (g[1] = (V) => u.value = V),
|
|
2115
2115
|
trigger: "focus",
|
|
@@ -2137,7 +2137,7 @@ const Uc = { class: "sunny-file-upload" }, Wc = { class: "font-bold text-gray-70
|
|
|
2137
2137
|
], 32)) : se("", !0)
|
|
2138
2138
|
]),
|
|
2139
2139
|
default: L(() => [
|
|
2140
|
-
j(
|
|
2140
|
+
j(k, ae({ ref: "inputTagRef" }, h.$attrs, {
|
|
2141
2141
|
"model-value": l.value,
|
|
2142
2142
|
"input-value": "",
|
|
2143
2143
|
disabled: e.disabled,
|
|
@@ -2865,34 +2865,34 @@ function Cu(e) {
|
|
|
2865
2865
|
const o = N(() => n.value), i = N(() => e()), l = N(() => {
|
|
2866
2866
|
const h = i.value;
|
|
2867
2867
|
if (!h) return !0;
|
|
2868
|
-
const { if: g } = h,
|
|
2869
|
-
return ze(g) ? !!g(
|
|
2868
|
+
const { if: g } = h, k = o.value;
|
|
2869
|
+
return ze(g) ? !!g(k, r) : zn(g) ? g : !0;
|
|
2870
2870
|
}), u = N(() => {
|
|
2871
2871
|
const h = i.value;
|
|
2872
2872
|
if (!h) return !0;
|
|
2873
|
-
const { show: g } = h,
|
|
2874
|
-
return ze(g) ? !!g(
|
|
2873
|
+
const { show: g } = h, k = o.value;
|
|
2874
|
+
return ze(g) ? !!g(k, r) : zn(g) ? g : !0;
|
|
2875
2875
|
}), d = N(() => {
|
|
2876
2876
|
const h = i.value;
|
|
2877
2877
|
if (!h) return !1;
|
|
2878
|
-
const { disabled: g } = h,
|
|
2879
|
-
return ze(g) ? !!g(
|
|
2878
|
+
const { disabled: g } = h, k = o.value;
|
|
2879
|
+
return ze(g) ? !!g(k, r) : zn(g) ? g : !1;
|
|
2880
2880
|
}), y = N(() => {
|
|
2881
2881
|
const h = i.value;
|
|
2882
2882
|
if (!h) return !1;
|
|
2883
|
-
const { required: g } = h,
|
|
2884
|
-
return ze(g) ? !!g(
|
|
2883
|
+
const { required: g } = h, k = o.value;
|
|
2884
|
+
return ze(g) ? !!g(k, r) : !1;
|
|
2885
2885
|
}), b = N(() => {
|
|
2886
2886
|
const h = i.value;
|
|
2887
2887
|
if (!h) return {};
|
|
2888
|
-
const { componentProps: g } = h,
|
|
2889
|
-
return ze(g) ? g(
|
|
2888
|
+
const { componentProps: g } = h, k = o.value;
|
|
2889
|
+
return ze(g) ? g(k, r) || {} : {};
|
|
2890
2890
|
}), p = N(() => {
|
|
2891
2891
|
const h = i.value;
|
|
2892
2892
|
if (!h) return;
|
|
2893
|
-
const { rules: g } = h,
|
|
2893
|
+
const { rules: g } = h, k = o.value;
|
|
2894
2894
|
if (ze(g))
|
|
2895
|
-
return g(
|
|
2895
|
+
return g(k, r);
|
|
2896
2896
|
});
|
|
2897
2897
|
return {
|
|
2898
2898
|
dynamicComponentProps: b,
|
|
@@ -2922,13 +2922,13 @@ const xu = /* @__PURE__ */ te({
|
|
|
2922
2922
|
// 是否必填
|
|
2923
2923
|
isShow: g
|
|
2924
2924
|
// 是否显示 (v-show)
|
|
2925
|
-
} = Cu(() => n.schema.dependencies),
|
|
2925
|
+
} = Cu(() => n.schema.dependencies), k = N(() => {
|
|
2926
2926
|
const { component: U } = n.schema;
|
|
2927
2927
|
return jt(U) && Ic[U] || U;
|
|
2928
2928
|
}), S = N(() => {
|
|
2929
2929
|
const { component: U } = n.schema;
|
|
2930
2930
|
return U === "Slot";
|
|
2931
|
-
}),
|
|
2931
|
+
}), $ = N(() => {
|
|
2932
2932
|
if (!S.value || !u) return !1;
|
|
2933
2933
|
const U = n.schema.fieldName;
|
|
2934
2934
|
return U ? !!u[U] : !1;
|
|
@@ -3067,11 +3067,11 @@ const xu = /* @__PURE__ */ te({
|
|
|
3067
3067
|
"wrapper-col-props": D.value
|
|
3068
3068
|
}, e.schema.formFieldProps), {
|
|
3069
3069
|
default: L(() => [
|
|
3070
|
-
|
|
3070
|
+
$.value ? (F(), ee(er(m(R)), {
|
|
3071
3071
|
key: 0,
|
|
3072
3072
|
field: q,
|
|
3073
3073
|
"error-message": pe
|
|
3074
|
-
}, null, 8, ["field", "error-message"])) : (F(), ee(er(
|
|
3074
|
+
}, null, 8, ["field", "error-message"])) : (F(), ee(er(k.value), ae({ key: 1 }, v(q), { disabled: E.value }), null, 16, ["disabled"]))
|
|
3075
3075
|
]),
|
|
3076
3076
|
_: 2
|
|
3077
3077
|
}, 1040, ["label", "help", "validate-status", "required", "label-col-props", "wrapper-col-props"])
|
|
@@ -3108,23 +3108,23 @@ const xu = /* @__PURE__ */ te({
|
|
|
3108
3108
|
async function b(g) {
|
|
3109
3109
|
if (r.formApi) {
|
|
3110
3110
|
g?.preventDefault(), g?.stopPropagation();
|
|
3111
|
-
const
|
|
3111
|
+
const k = m(i), { valid: S } = await r.formApi.validate();
|
|
3112
3112
|
if (!S)
|
|
3113
3113
|
return;
|
|
3114
|
-
const
|
|
3115
|
-
await
|
|
3114
|
+
const $ = ut(await r.formApi.getValues()) ?? {};
|
|
3115
|
+
await k.handleSubmit?.($);
|
|
3116
3116
|
}
|
|
3117
3117
|
}
|
|
3118
3118
|
async function p(g) {
|
|
3119
3119
|
g?.preventDefault(), g?.stopPropagation();
|
|
3120
|
-
const
|
|
3120
|
+
const k = m(i);
|
|
3121
3121
|
if (r.formApi) {
|
|
3122
3122
|
const S = ut(await r.formApi.getValues()) ?? {};
|
|
3123
|
-
|
|
3123
|
+
k.handleReset ? await k.handleReset(S) : r.formApi.resetForm();
|
|
3124
3124
|
} else if (l)
|
|
3125
|
-
if (
|
|
3125
|
+
if (k.handleReset) {
|
|
3126
3126
|
const S = l.values;
|
|
3127
|
-
await
|
|
3127
|
+
await k.handleReset(S);
|
|
3128
3128
|
} else
|
|
3129
3129
|
l.resetForm();
|
|
3130
3130
|
o("reset");
|
|
@@ -3136,7 +3136,7 @@ const xu = /* @__PURE__ */ te({
|
|
|
3136
3136
|
}
|
|
3137
3137
|
);
|
|
3138
3138
|
const h = N(() => {
|
|
3139
|
-
const g = m(i),
|
|
3139
|
+
const g = m(i), k = g.actionPosition || "right", S = [
|
|
3140
3140
|
"flex",
|
|
3141
3141
|
"items-center",
|
|
3142
3142
|
"gap-3",
|
|
@@ -3147,7 +3147,7 @@ const xu = /* @__PURE__ */ te({
|
|
|
3147
3147
|
// 用户自定义类名
|
|
3148
3148
|
g.actionWrapperClass
|
|
3149
3149
|
];
|
|
3150
|
-
switch (
|
|
3150
|
+
switch (k) {
|
|
3151
3151
|
case "center": {
|
|
3152
3152
|
S.push("justify-center");
|
|
3153
3153
|
break;
|
|
@@ -3166,7 +3166,7 @@ const xu = /* @__PURE__ */ te({
|
|
|
3166
3166
|
return n({
|
|
3167
3167
|
handleReset: p,
|
|
3168
3168
|
handleSubmit: b
|
|
3169
|
-
}), (g,
|
|
3169
|
+
}), (g, k) => (F(), Y("div", {
|
|
3170
3170
|
class: fe(h.value)
|
|
3171
3171
|
}, [
|
|
3172
3172
|
m(m(i)).actionButtonsReverse ? se("", !0) : (F(), Y(Oe, { key: 0 }, [
|
|
@@ -3229,8 +3229,8 @@ const xu = /* @__PURE__ */ te({
|
|
|
3229
3229
|
api: r.searchPlanConfig.api,
|
|
3230
3230
|
onSearch: r.searchPlanConfig.onSearch,
|
|
3231
3231
|
onDefaultPlanLoaded: r.searchPlanConfig.onDefaultPlanLoaded,
|
|
3232
|
-
"onUpdate:currentSearchPlan":
|
|
3233
|
-
"onUpdate:searchPlanList":
|
|
3232
|
+
"onUpdate:currentSearchPlan": k[0] || (k[0] = (S) => r.searchPlanConfig?.onUpdateCurrentSearchPlan && r.searchPlanConfig.onUpdateCurrentSearchPlan(S)),
|
|
3233
|
+
"onUpdate:searchPlanList": k[1] || (k[1] = (S) => r.searchPlanConfig?.onUpdateSearchPlanList && r.searchPlanConfig.onUpdateSearchPlanList(S))
|
|
3234
3234
|
}, {
|
|
3235
3235
|
trigger: L(({ open: S }) => [
|
|
3236
3236
|
B("button", {
|
|
@@ -3251,7 +3251,7 @@ const xu = /* @__PURE__ */ te({
|
|
|
3251
3251
|
m(m(i)).showCollapseButton ? (F(), Y("div", {
|
|
3252
3252
|
key: 3,
|
|
3253
3253
|
class: "cursor-pointer text-[rgb(var(--primary-6))] hover:opacity-80 transition-opacity select-none flex items-center gap-0.5",
|
|
3254
|
-
onClick:
|
|
3254
|
+
onClick: k[2] || (k[2] = (S) => u.value = !u.value)
|
|
3255
3255
|
}, [
|
|
3256
3256
|
u.value ? (F(), ee(m(_l), {
|
|
3257
3257
|
key: 0,
|
|
@@ -3299,9 +3299,9 @@ function $u(e) {
|
|
|
3299
3299
|
if (u) {
|
|
3300
3300
|
const b = ["xxl", "xl", "lg", "md", "sm", "xs"], p = b.indexOf(y);
|
|
3301
3301
|
for (let h = p; h < b.length; h++) {
|
|
3302
|
-
const g = b[h],
|
|
3303
|
-
if (
|
|
3304
|
-
return typeof
|
|
3302
|
+
const g = b[h], k = u[g];
|
|
3303
|
+
if (k !== void 0)
|
|
3304
|
+
return typeof k == "object" ? k.span ?? 24 : k;
|
|
3305
3305
|
}
|
|
3306
3306
|
if (u.span !== void 0)
|
|
3307
3307
|
return u.span;
|
|
@@ -3365,7 +3365,7 @@ const Pu = { class: "h-full flex flex-col justify-end" }, Fo = /* @__PURE__ */ t
|
|
|
3365
3365
|
...b.value.reduce((w, v) => (v.fieldName && (w[v.fieldName] = v.defaultValue), w), {}),
|
|
3366
3366
|
...u.values || {}
|
|
3367
3367
|
}
|
|
3368
|
-
}), { handleSubmit: g, resetForm:
|
|
3368
|
+
}), { handleSubmit: g, resetForm: k, setValues: S, values: $, validate: V, errors: R, meta: x } = h;
|
|
3369
3369
|
u.form = h, n({
|
|
3370
3370
|
/**
|
|
3371
3371
|
* 验证表单
|
|
@@ -3382,9 +3382,9 @@ const Pu = { class: "h-full flex flex-col justify-end" }, Fo = /* @__PURE__ */ t
|
|
|
3382
3382
|
}), $t(() => {
|
|
3383
3383
|
r.formApi && r.formApi.mount({
|
|
3384
3384
|
handleSubmit: g,
|
|
3385
|
-
resetForm:
|
|
3385
|
+
resetForm: k,
|
|
3386
3386
|
setValues: S,
|
|
3387
|
-
values:
|
|
3387
|
+
values: $,
|
|
3388
3388
|
validate: V,
|
|
3389
3389
|
errors: R,
|
|
3390
3390
|
meta: x
|
|
@@ -3542,8 +3542,8 @@ const Pu = { class: "h-full flex flex-col justify-end" }, Fo = /* @__PURE__ */ t
|
|
|
3542
3542
|
if (p.length === 0) return;
|
|
3543
3543
|
const h = [];
|
|
3544
3544
|
for (const g of p) {
|
|
3545
|
-
const
|
|
3546
|
-
Ki(
|
|
3545
|
+
const k = Gr(b, g), S = Gr(u, g);
|
|
3546
|
+
Ki(k, S) || (h.push(g), Qi(u, g, k));
|
|
3547
3547
|
}
|
|
3548
3548
|
if (h.length > 0) {
|
|
3549
3549
|
const g = await n.formApi.getValues();
|
|
@@ -3708,10 +3708,10 @@ const Tu = /* @__PURE__ */ te({
|
|
|
3708
3708
|
]),
|
|
3709
3709
|
_: 2
|
|
3710
3710
|
}, [
|
|
3711
|
-
Pe(m(i), (g,
|
|
3712
|
-
name:
|
|
3711
|
+
Pe(m(i), (g, k) => ({
|
|
3712
|
+
name: k,
|
|
3713
3713
|
fn: L((S) => [
|
|
3714
|
-
ie(p.$slots,
|
|
3714
|
+
ie(p.$slots, k, Ie(tt(S)))
|
|
3715
3715
|
])
|
|
3716
3716
|
}))
|
|
3717
3717
|
]), 1536)
|
|
@@ -4312,12 +4312,12 @@ function Ju(e, n) {
|
|
|
4312
4312
|
let t = null, r = null, o = null, i = null, l = null, u = !1, d = !1;
|
|
4313
4313
|
const y = (S) => {
|
|
4314
4314
|
if (!S) return window;
|
|
4315
|
-
let
|
|
4316
|
-
for (;
|
|
4317
|
-
const V = window.getComputedStyle(
|
|
4315
|
+
let $ = S.parentElement;
|
|
4316
|
+
for (; $; ) {
|
|
4317
|
+
const V = window.getComputedStyle($);
|
|
4318
4318
|
if (/(auto|scroll)/.test(V.overflow + V.overflowY + V.overflowX))
|
|
4319
|
-
return
|
|
4320
|
-
|
|
4319
|
+
return $;
|
|
4320
|
+
$ = $.parentElement;
|
|
4321
4321
|
}
|
|
4322
4322
|
return window;
|
|
4323
4323
|
}, b = () => {
|
|
@@ -4332,36 +4332,36 @@ function Ju(e, n) {
|
|
|
4332
4332
|
}));
|
|
4333
4333
|
}, g = () => {
|
|
4334
4334
|
!e.value || i || (i = document.createElement("div"), i.className = "vxe-table--sticky-scrollbar", i.style.position = "fixed", i.style.bottom = "0", i.style.overflowX = "auto", i.style.overflowY = "hidden", i.style.zIndex = "101", i.style.display = "none", l = document.createElement("div"), i.appendChild(l), i.addEventListener("scroll", h), document.body.appendChild(i), o = e.value.$el.querySelector(".vxe-table--body-wrapper"), o && o.addEventListener("scroll", p));
|
|
4335
|
-
},
|
|
4335
|
+
}, k = () => {
|
|
4336
4336
|
if (!e.value || !t) return;
|
|
4337
4337
|
if (!n.sticky) {
|
|
4338
4338
|
b();
|
|
4339
4339
|
return;
|
|
4340
4340
|
}
|
|
4341
|
-
const S = e.value.$el,
|
|
4341
|
+
const S = e.value.$el, $ = S.getBoundingClientRect(), V = t.getBoundingClientRect(), R = y(S);
|
|
4342
4342
|
let x = { top: 0, bottom: window.innerHeight };
|
|
4343
|
-
if (R !== window && R instanceof HTMLElement && (x = R.getBoundingClientRect()), x.bottom > 0 && x.top < window.innerHeight &&
|
|
4343
|
+
if (R !== window && R instanceof HTMLElement && (x = R.getBoundingClientRect()), x.bottom > 0 && x.top < window.innerHeight && $.top < x.top && $.bottom > V.height) {
|
|
4344
4344
|
const P = Math.max(0, x.top);
|
|
4345
|
-
|
|
4345
|
+
$.bottom - V.height > P ? (!t.classList.contains("is-sticky") || t.style.top !== `${P}px` || t.style.left !== `${$.left}px`) && (t.style.position = "fixed", t.style.top = `${P}px`, t.style.left = `${$.left}px`, t.style.width = `${$.width}px`, t.style.zIndex = "100", t.classList.add("is-sticky"), r || (r = document.createElement("div"), t.parentNode?.insertBefore(r, t)), r.style.height = `${V.height}px`) : b();
|
|
4346
4346
|
} else
|
|
4347
4347
|
t.classList.contains("is-sticky") && (t.style.position = "", t.style.top = "", t.style.left = "", t.style.width = "", t.classList.remove("is-sticky"), r && r.parentNode && (r.parentNode.removeChild(r), r = null));
|
|
4348
4348
|
if ((!i || !o) && g(), i && o && l) {
|
|
4349
4349
|
const P = o.scrollWidth, T = o.clientWidth;
|
|
4350
4350
|
if (P > T) {
|
|
4351
4351
|
const w = window.innerHeight;
|
|
4352
|
-
|
|
4352
|
+
$.bottom > w && $.top < w ? (i.style.display = "block", i.style.width = `${$.width}px`, i.style.left = `${$.left}px`, l.style.width = `${P}px`, Math.abs(i.scrollLeft - o.scrollLeft) > 1 && (i.scrollLeft = o.scrollLeft)) : i.style.display = "none";
|
|
4353
4353
|
} else
|
|
4354
4354
|
i.style.display = "none";
|
|
4355
4355
|
}
|
|
4356
4356
|
};
|
|
4357
4357
|
be(() => n.sticky, () => {
|
|
4358
|
-
|
|
4358
|
+
k();
|
|
4359
4359
|
}), $t(() => {
|
|
4360
4360
|
setTimeout(() => {
|
|
4361
|
-
e.value && (t = e.value.$el.querySelector(".vxe-table--header-wrapper"), t && (window.addEventListener("scroll",
|
|
4361
|
+
e.value && (t = e.value.$el.querySelector(".vxe-table--header-wrapper"), t && (window.addEventListener("scroll", k, !0), window.addEventListener("resize", k)), g());
|
|
4362
4362
|
}, 100);
|
|
4363
4363
|
}), po(() => {
|
|
4364
|
-
window.removeEventListener("scroll",
|
|
4364
|
+
window.removeEventListener("scroll", k, !0), window.removeEventListener("resize", k), r && r.parentNode && r.parentNode.removeChild(r), i && i.parentNode && i.parentNode.removeChild(i), o && o.removeEventListener("scroll", p);
|
|
4365
4365
|
});
|
|
4366
4366
|
}
|
|
4367
4367
|
const Yu = { class: "my-filter-complex" }, Ku = {
|
|
@@ -4393,18 +4393,18 @@ const Yu = { class: "my-filter-complex" }, Ku = {
|
|
|
4393
4393
|
}), u = () => {
|
|
4394
4394
|
const { renderParams: p } = n, h = t.value;
|
|
4395
4395
|
if (p && h) {
|
|
4396
|
-
const { $table: g } = p,
|
|
4397
|
-
g.updateFilterOptionStatus(h,
|
|
4396
|
+
const { $table: g } = p, k = !!h.data;
|
|
4397
|
+
g.updateFilterOptionStatus(h, k);
|
|
4398
4398
|
}
|
|
4399
4399
|
}, d = () => {
|
|
4400
4400
|
const { renderParams: p } = n, h = {};
|
|
4401
4401
|
if (p) {
|
|
4402
4402
|
const { $table: g } = p;
|
|
4403
4403
|
g.getColumns().forEach((S) => {
|
|
4404
|
-
const { field:
|
|
4405
|
-
if (
|
|
4404
|
+
const { field: $, filters: V } = S;
|
|
4405
|
+
if ($ && V && V.length) {
|
|
4406
4406
|
const R = V[0];
|
|
4407
|
-
R.data && (h[
|
|
4407
|
+
R.data && (h[$] = R.data);
|
|
4408
4408
|
}
|
|
4409
4409
|
});
|
|
4410
4410
|
}
|
|
@@ -4412,18 +4412,18 @@ const Yu = { class: "my-filter-complex" }, Ku = {
|
|
|
4412
4412
|
}, y = () => {
|
|
4413
4413
|
const { renderParams: p } = n;
|
|
4414
4414
|
if (p) {
|
|
4415
|
-
const { $table: h, $grid: g } = p,
|
|
4416
|
-
|
|
4415
|
+
const { $table: h, $grid: g } = p, k = t.value;
|
|
4416
|
+
k && h.updateFilterOptionStatus(k, !!k.data);
|
|
4417
4417
|
const S = d();
|
|
4418
4418
|
g.commitProxy("query", S), g.closeFilter();
|
|
4419
4419
|
}
|
|
4420
4420
|
}, b = () => {
|
|
4421
4421
|
const { renderParams: p } = n, h = t.value;
|
|
4422
4422
|
if (p && h) {
|
|
4423
|
-
const { $table: g, $grid:
|
|
4423
|
+
const { $table: g, $grid: k } = p;
|
|
4424
4424
|
h.data = "", g.updateFilterOptionStatus(h, !1);
|
|
4425
4425
|
const S = d();
|
|
4426
|
-
|
|
4426
|
+
k.commitProxy("query", S), k.closeFilter();
|
|
4427
4427
|
}
|
|
4428
4428
|
};
|
|
4429
4429
|
return (p, h) => (F(), Y("div", Yu, [
|
|
@@ -4507,20 +4507,20 @@ function Kp(e) {
|
|
|
4507
4507
|
const n = Z(), t = new Gu(n), { gridEvents: r, gridOptions: o } = e, i = o?.showSelectionCount, l = o?.gridTip, u = Z(0), d = () => {
|
|
4508
4508
|
const h = n.value?.getGrid?.() || n.value;
|
|
4509
4509
|
if (!h) return;
|
|
4510
|
-
const g = h.getCheckboxRecords?.() || [],
|
|
4511
|
-
u.value = g.length +
|
|
4510
|
+
const g = h.getCheckboxRecords?.() || [], k = h.getCheckboxReserveRecords?.() || [];
|
|
4511
|
+
u.value = g.length + k.length;
|
|
4512
4512
|
}, y = () => {
|
|
4513
4513
|
const h = n.value?.getGrid?.() || n.value;
|
|
4514
|
-
h && (h.clearCheckboxRow(), (h.getCheckboxReserveRecords?.() || []).forEach((
|
|
4515
|
-
h.setCheckboxRow(
|
|
4514
|
+
h && (h.clearCheckboxRow(), (h.getCheckboxReserveRecords?.() || []).forEach((k) => {
|
|
4515
|
+
h.setCheckboxRow(k, !1);
|
|
4516
4516
|
}), u.value = 0);
|
|
4517
|
-
}, b = Object.entries(r || {}).reduce((h, [g,
|
|
4517
|
+
}, b = Object.entries(r || {}).reduce((h, [g, k]) => {
|
|
4518
4518
|
const S = `on${g.charAt(0).toUpperCase() + g.slice(1)}`;
|
|
4519
|
-
return h[S] =
|
|
4519
|
+
return h[S] = k, h;
|
|
4520
4520
|
}, {});
|
|
4521
4521
|
return [te(
|
|
4522
|
-
(h, { attrs: g, slots:
|
|
4523
|
-
const S = u.value,
|
|
4522
|
+
(h, { attrs: g, slots: k }) => () => {
|
|
4523
|
+
const S = u.value, $ = (i || l) && o?.toolbarConfig ? {
|
|
4524
4524
|
...o.toolbarConfig,
|
|
4525
4525
|
slots: {
|
|
4526
4526
|
...o.toolbarConfig.slots,
|
|
@@ -4557,45 +4557,45 @@ function Kp(e) {
|
|
|
4557
4557
|
...h,
|
|
4558
4558
|
...g,
|
|
4559
4559
|
...o,
|
|
4560
|
-
|
|
4560
|
+
...$ ? { toolbarConfig: $ } : {},
|
|
4561
4561
|
...b,
|
|
4562
4562
|
...i ? { onCheckboxChange: d, onCheckboxAll: d } : {}
|
|
4563
|
-
},
|
|
4563
|
+
}, k);
|
|
4564
4564
|
}
|
|
4565
4565
|
), t];
|
|
4566
4566
|
}
|
|
4567
4567
|
function ed(e) {
|
|
4568
4568
|
const { props: n, emit: t, attrs: r } = e, o = N(() => n.contextMenuActions || n.actions || []), i = N(() => {
|
|
4569
|
-
const S = r["field-names"],
|
|
4569
|
+
const S = r["field-names"], $ = r.fieldNames;
|
|
4570
4570
|
return {
|
|
4571
4571
|
key: "key",
|
|
4572
4572
|
title: "title",
|
|
4573
4573
|
children: "children",
|
|
4574
|
-
...S ||
|
|
4574
|
+
...S || $ || {}
|
|
4575
4575
|
};
|
|
4576
4576
|
}), l = (S) => {
|
|
4577
|
-
const
|
|
4578
|
-
return S[
|
|
4577
|
+
const $ = i.value.key || "key";
|
|
4578
|
+
return S[$] ?? S.key;
|
|
4579
4579
|
}, u = () => r.data || [], d = (S) => {
|
|
4580
|
-
const
|
|
4581
|
-
return
|
|
4582
|
-
}, y = (S,
|
|
4583
|
-
(
|
|
4584
|
-
) : [], p = (S,
|
|
4580
|
+
const $ = l(S);
|
|
4581
|
+
return $ == null ? !1 : u().some((V) => l(V) === $ || V === S);
|
|
4582
|
+
}, y = (S, $, V) => typeof S == "boolean" ? S : typeof S == "function" ? S($) : V, b = (S) => S ? !n.enableRootContextMenu && d(S) ? [] : o.value.filter(
|
|
4583
|
+
($) => y($.visible, S, !0)
|
|
4584
|
+
) : [], p = (S, $) => y(S.disabled, $, !1);
|
|
4585
4585
|
return {
|
|
4586
4586
|
canShowContextMenu: (S) => b(S).length > 0,
|
|
4587
4587
|
getNodeActions: b,
|
|
4588
4588
|
isActionDisabled: p,
|
|
4589
4589
|
getNodeTitle: (S) => {
|
|
4590
|
-
const
|
|
4591
|
-
return String(S?.[
|
|
4590
|
+
const $ = i.value.title || "title", V = l(S);
|
|
4591
|
+
return String(S?.[$] ?? S?.title ?? V ?? "");
|
|
4592
4592
|
},
|
|
4593
|
-
handleActionClick: async (S,
|
|
4594
|
-
const V = b(
|
|
4595
|
-
V && (p(V,
|
|
4593
|
+
handleActionClick: async (S, $) => {
|
|
4594
|
+
const V = b($).find((R) => R.key === String(S));
|
|
4595
|
+
V && (p(V, $) || (V.handler && await V.handler($), t("action", {
|
|
4596
4596
|
key: V.key,
|
|
4597
4597
|
action: V,
|
|
4598
|
-
node:
|
|
4598
|
+
node: $
|
|
4599
4599
|
})));
|
|
4600
4600
|
}
|
|
4601
4601
|
};
|
|
@@ -4621,28 +4621,28 @@ const td = { class: "sunny-resource-tree" }, nd = { class: "sunny-resource-tree_
|
|
|
4621
4621
|
props: r,
|
|
4622
4622
|
emit: o,
|
|
4623
4623
|
attrs: i
|
|
4624
|
-
}), g = (
|
|
4625
|
-
h(
|
|
4626
|
-
},
|
|
4624
|
+
}), g = ($, V) => {
|
|
4625
|
+
h($, V);
|
|
4626
|
+
}, k = N(() => Object.keys(l).filter(($) => $ !== "title")), S = ($, ...V) => u.value?.[$]?.(...V);
|
|
4627
4627
|
return n({
|
|
4628
4628
|
getTree: () => u.value,
|
|
4629
|
-
toggleCheck: (
|
|
4630
|
-
scrollIntoView: (
|
|
4629
|
+
toggleCheck: ($, V) => S("toggleCheck", $, V),
|
|
4630
|
+
scrollIntoView: ($) => S("scrollIntoView", $),
|
|
4631
4631
|
getSelectedNodes: () => S("getSelectedNodes"),
|
|
4632
|
-
getCheckedNodes: (
|
|
4632
|
+
getCheckedNodes: ($) => S("getCheckedNodes", $),
|
|
4633
4633
|
getHalfCheckedNodes: () => S("getHalfCheckedNodes"),
|
|
4634
4634
|
getExpandedNodes: () => S("getExpandedNodes"),
|
|
4635
|
-
checkAll: (
|
|
4636
|
-
checkNode: (
|
|
4637
|
-
selectAll: (
|
|
4638
|
-
selectNode: (
|
|
4639
|
-
expandAll: (
|
|
4640
|
-
expandNode: (
|
|
4641
|
-
}), (
|
|
4635
|
+
checkAll: ($) => S("checkAll", $),
|
|
4636
|
+
checkNode: ($, V, R) => S("checkNode", $, V, R),
|
|
4637
|
+
selectAll: ($) => S("selectAll", $),
|
|
4638
|
+
selectNode: ($, V) => S("selectNode", $, V),
|
|
4639
|
+
expandAll: ($) => S("expandAll", $),
|
|
4640
|
+
expandNode: ($, V) => S("expandNode", $, V)
|
|
4641
|
+
}), ($, V) => (F(), Y("div", td, [
|
|
4642
4642
|
j(m(Ui), ae({
|
|
4643
4643
|
ref_key: "treeRef",
|
|
4644
4644
|
ref: u
|
|
4645
|
-
},
|
|
4645
|
+
}, $.$attrs), qe({
|
|
4646
4646
|
title: L((R) => [
|
|
4647
4647
|
m(d)(R) ? (F(), ee(m(Wi), {
|
|
4648
4648
|
key: 0,
|
|
@@ -4666,22 +4666,22 @@ const td = { class: "sunny-resource-tree" }, nd = { class: "sunny-resource-tree_
|
|
|
4666
4666
|
]),
|
|
4667
4667
|
default: L(() => [
|
|
4668
4668
|
B("span", nd, [
|
|
4669
|
-
ie(
|
|
4669
|
+
ie($.$slots, "title", Ie(tt(R)), () => [
|
|
4670
4670
|
we(Q(m(p)(R)), 1)
|
|
4671
4671
|
], !0)
|
|
4672
4672
|
])
|
|
4673
4673
|
]),
|
|
4674
4674
|
_: 2
|
|
4675
|
-
}, 1032, ["onSelect"])) : ie(
|
|
4675
|
+
}, 1032, ["onSelect"])) : ie($.$slots, "title", Ie(ae({ key: 1 }, R)), () => [
|
|
4676
4676
|
we(Q(m(p)(R)), 1)
|
|
4677
4677
|
], !0)
|
|
4678
4678
|
]),
|
|
4679
4679
|
_: 2
|
|
4680
4680
|
}, [
|
|
4681
|
-
Pe(
|
|
4681
|
+
Pe(k.value, (R) => ({
|
|
4682
4682
|
name: R,
|
|
4683
4683
|
fn: L((x) => [
|
|
4684
|
-
ie(
|
|
4684
|
+
ie($.$slots, R, Ie(tt(x || {})), void 0, !0)
|
|
4685
4685
|
])
|
|
4686
4686
|
}))
|
|
4687
4687
|
]), 1040)
|
|
@@ -4748,11 +4748,11 @@ function od(e, n) {
|
|
|
4748
4748
|
t.value = !1;
|
|
4749
4749
|
}
|
|
4750
4750
|
}
|
|
4751
|
-
},
|
|
4751
|
+
}, k = (v) => {
|
|
4752
4752
|
i.value.current = v, g();
|
|
4753
4753
|
}, S = (v) => {
|
|
4754
4754
|
i.value.pageSize = v, i.value.current = 1, g();
|
|
4755
|
-
},
|
|
4755
|
+
}, $ = (v, E) => {
|
|
4756
4756
|
const D = y(v), G = o.value.findIndex((U) => y(U) === D);
|
|
4757
4757
|
E ? G === -1 && (e.multiple ? o.value.push(v) : o.value = [v]) : G > -1 && o.value.splice(G, 1);
|
|
4758
4758
|
};
|
|
@@ -4767,22 +4767,22 @@ function od(e, n) {
|
|
|
4767
4767
|
initDefaultValues: p,
|
|
4768
4768
|
resetFormValues: h,
|
|
4769
4769
|
handleSearch: g,
|
|
4770
|
-
handlePageChange:
|
|
4770
|
+
handlePageChange: k,
|
|
4771
4771
|
handlePageSizeChange: S,
|
|
4772
4772
|
handleCheckboxChange: (v) => {
|
|
4773
4773
|
const { row: E, checked: D } = v;
|
|
4774
|
-
|
|
4774
|
+
$(E, D);
|
|
4775
4775
|
},
|
|
4776
4776
|
handleCheckboxAll: (v) => {
|
|
4777
4777
|
const { checked: E, records: D } = v;
|
|
4778
|
-
E ? D.forEach((G) =>
|
|
4778
|
+
E ? D.forEach((G) => $(G, !0)) : l.value.forEach((G) => $(G, !1));
|
|
4779
4779
|
},
|
|
4780
4780
|
handleRadioChange: (v) => {
|
|
4781
4781
|
const { row: E } = v;
|
|
4782
4782
|
o.value = [E];
|
|
4783
4783
|
},
|
|
4784
4784
|
removeRow: (v) => {
|
|
4785
|
-
|
|
4785
|
+
$(v, !1);
|
|
4786
4786
|
},
|
|
4787
4787
|
handleOk: () => {
|
|
4788
4788
|
n("update:modelValue", o.value), n("confirm", o.value), n("update:visible", !1);
|
|
@@ -4790,7 +4790,7 @@ function od(e, n) {
|
|
|
4790
4790
|
handleCancel: () => {
|
|
4791
4791
|
o.value = [], n("update:modelValue", []), n("cancel"), n("update:visible", !1);
|
|
4792
4792
|
},
|
|
4793
|
-
toggleRowSelection:
|
|
4793
|
+
toggleRowSelection: $,
|
|
4794
4794
|
reset: () => {
|
|
4795
4795
|
l.value = [], o.value = [], i.value.current = 1, i.value.total = 0, n("update:modelValue", []);
|
|
4796
4796
|
}
|
|
@@ -4834,9 +4834,9 @@ const ad = { class: "flex flex-col h-full" }, sd = { class: "mb-4 border-b borde
|
|
|
4834
4834
|
selectedRows: p,
|
|
4835
4835
|
pagination: h,
|
|
4836
4836
|
tableData: g,
|
|
4837
|
-
actualFieldNames:
|
|
4837
|
+
actualFieldNames: k,
|
|
4838
4838
|
actualRowKey: S,
|
|
4839
|
-
initDefaultValues:
|
|
4839
|
+
initDefaultValues: $,
|
|
4840
4840
|
resetFormValues: V,
|
|
4841
4841
|
handleSearch: R,
|
|
4842
4842
|
handlePageChange: x,
|
|
@@ -4916,7 +4916,7 @@ const ad = { class: "flex flex-col h-full" }, sd = { class: "mb-4 border-b borde
|
|
|
4916
4916
|
return be(
|
|
4917
4917
|
() => o.visible,
|
|
4918
4918
|
(ce) => {
|
|
4919
|
-
ce && (
|
|
4919
|
+
ce && ($(), o.resetOnOpen && (g.value = [], h.value.total = 0, et(() => {
|
|
4920
4920
|
J();
|
|
4921
4921
|
})));
|
|
4922
4922
|
},
|
|
@@ -5032,11 +5032,11 @@ const ad = { class: "flex flex-col h-full" }, sd = { class: "mb-4 border-b borde
|
|
|
5032
5032
|
class: "relative group px-2 py-1 mb-1 bg-white border border-gray-200 rounded hover:shadow-sm transition-all h-[42px] flex flex-col justify-center"
|
|
5033
5033
|
}, [
|
|
5034
5034
|
j(m(ir), {
|
|
5035
|
-
content: `${ne[m(
|
|
5035
|
+
content: `${ne[m(k).desc]}`
|
|
5036
5036
|
}, {
|
|
5037
5037
|
default: L(() => [
|
|
5038
|
-
B("div", dd, Q(ne[m(
|
|
5039
|
-
B("div", fd, Q(ne[m(
|
|
5038
|
+
B("div", dd, Q(ne[m(k).value] || "-"), 1),
|
|
5039
|
+
B("div", fd, Q(ne[m(k).label] || " "), 1)
|
|
5040
5040
|
]),
|
|
5041
5041
|
_: 2
|
|
5042
5042
|
}, 1032, ["content"]),
|
|
@@ -5080,8 +5080,8 @@ function wd(e, n) {
|
|
|
5080
5080
|
...g,
|
|
5081
5081
|
cNum: e.cNum
|
|
5082
5082
|
});
|
|
5083
|
-
} catch (
|
|
5084
|
-
throw console.error("[SunnyBusinessSearch] Search failed:",
|
|
5083
|
+
} catch (k) {
|
|
5084
|
+
throw console.error("[SunnyBusinessSearch] Search failed:", k), k;
|
|
5085
5085
|
}
|
|
5086
5086
|
}, d = async () => {
|
|
5087
5087
|
if (!e.cNum) return;
|
|
@@ -5182,10 +5182,10 @@ const Sd = { class: "sunny-business-search w-full" }, Cd = /* @__PURE__ */ te({
|
|
|
5182
5182
|
"onUpdate:modelValue": h[0] || (h[0] = (g) => l.value = g),
|
|
5183
5183
|
onSearch: m(u)
|
|
5184
5184
|
}), qe({ _: 2 }, [
|
|
5185
|
-
Pe(p.$slots, (g,
|
|
5186
|
-
name:
|
|
5185
|
+
Pe(p.$slots, (g, k) => ({
|
|
5186
|
+
name: k,
|
|
5187
5187
|
fn: L((S) => [
|
|
5188
|
-
ie(p.$slots,
|
|
5188
|
+
ie(p.$slots, k, Ie(tt(S || {})))
|
|
5189
5189
|
])
|
|
5190
5190
|
}))
|
|
5191
5191
|
]), 1040, ["model-value", "placeholder", "disabled", "max-tag-count", "field-names", "onSearch"]),
|
|
@@ -5701,9 +5701,9 @@ const kd = { class: "inline-block" }, $d = ["disabled"], Pd = { class: "p-5 rela
|
|
|
5701
5701
|
handleDelete: p,
|
|
5702
5702
|
handleSelect: h,
|
|
5703
5703
|
handleReset: g,
|
|
5704
|
-
handleSearch:
|
|
5704
|
+
handleSearch: k,
|
|
5705
5705
|
handleClose: S,
|
|
5706
|
-
handleOpen:
|
|
5706
|
+
handleOpen: $,
|
|
5707
5707
|
loadSearchPlans: V,
|
|
5708
5708
|
loadDefaultSearchPlan: R
|
|
5709
5709
|
} = xd(t, r, i, o, t.api);
|
|
@@ -5723,7 +5723,7 @@ const kd = { class: "inline-block" }, $d = ["disabled"], Pd = { class: "p-5 rela
|
|
|
5723
5723
|
}
|
|
5724
5724
|
});
|
|
5725
5725
|
const x = async () => {
|
|
5726
|
-
await
|
|
5726
|
+
await $();
|
|
5727
5727
|
}, O = () => {
|
|
5728
5728
|
console.log("SunnyUseForm mounted"), o && (t.modelValue || t.model) && o.setValues(t.modelValue || t.model).catch((W) => {
|
|
5729
5729
|
console.error("setValues error:", W);
|
|
@@ -5789,7 +5789,7 @@ const kd = { class: "inline-block" }, $d = ["disabled"], Pd = { class: "p-5 rela
|
|
|
5789
5789
|
B("button", {
|
|
5790
5790
|
class: "px-3 py-1.5 bg-[rgb(var(--primary-6))] border border-[rgb(var(--primary-6))] text-white text-sm rounded hover:bg-[rgb(var(--primary-7))] transition-colors disabled:cursor-not-allowed disabled:opacity-60",
|
|
5791
5791
|
onClick: J[4] || (J[4] = //@ts-ignore
|
|
5792
|
-
(...q) => m(
|
|
5792
|
+
(...q) => m(k) && m(k)(...q)),
|
|
5793
5793
|
disabled: t.loading
|
|
5794
5794
|
}, Q(m(ve)("common.searchPlan.search")), 9, Gd)
|
|
5795
5795
|
])
|
|
@@ -5930,7 +5930,7 @@ const kd = { class: "inline-block" }, $d = ["disabled"], Pd = { class: "p-5 rela
|
|
|
5930
5930
|
} catch (V) {
|
|
5931
5931
|
p.value = !0, ue.error(V?.message || "加载失败");
|
|
5932
5932
|
}
|
|
5933
|
-
},
|
|
5933
|
+
}, k = (V) => {
|
|
5934
5934
|
i("selectChange", V, l?.proxy);
|
|
5935
5935
|
}, S = ul((V) => {
|
|
5936
5936
|
if (V !== "") {
|
|
@@ -5955,7 +5955,7 @@ const kd = { class: "inline-block" }, $d = ["disabled"], Pd = { class: "p-5 rela
|
|
|
5955
5955
|
});
|
|
5956
5956
|
} else
|
|
5957
5957
|
d.value = y.value;
|
|
5958
|
-
}, u.value.nSearchinterval || 700),
|
|
5958
|
+
}, u.value.nSearchinterval || 700), $ = () => {
|
|
5959
5959
|
S("");
|
|
5960
5960
|
};
|
|
5961
5961
|
return be(
|
|
@@ -5975,8 +5975,8 @@ const kd = { class: "inline-block" }, $d = ["disabled"], Pd = { class: "p-5 rela
|
|
|
5975
5975
|
loading: b.value,
|
|
5976
5976
|
error: p.value
|
|
5977
5977
|
}, V.$attrs, {
|
|
5978
|
-
onChange:
|
|
5979
|
-
onClear:
|
|
5978
|
+
onChange: k,
|
|
5979
|
+
onClear: $,
|
|
5980
5980
|
onSearch: m(S),
|
|
5981
5981
|
triggerProps: {
|
|
5982
5982
|
contentClass: "customize-select-content"
|
|
@@ -6034,16 +6034,16 @@ const kd = { class: "inline-block" }, $d = ["disabled"], Pd = { class: "p-5 rela
|
|
|
6034
6034
|
} finally {
|
|
6035
6035
|
y.value = !1;
|
|
6036
6036
|
}
|
|
6037
|
-
},
|
|
6037
|
+
}, k = () => {
|
|
6038
6038
|
g();
|
|
6039
6039
|
}, S = () => {
|
|
6040
6040
|
l.value = !1, i("close");
|
|
6041
6041
|
};
|
|
6042
6042
|
n({
|
|
6043
|
-
open:
|
|
6043
|
+
open: k,
|
|
6044
6044
|
close: S
|
|
6045
6045
|
});
|
|
6046
|
-
const
|
|
6046
|
+
const $ = ({ newIndex: x, oldIndex: O }) => {
|
|
6047
6047
|
const P = u.value.splice(O, 1)[0];
|
|
6048
6048
|
u.value.splice(x, 0, P);
|
|
6049
6049
|
}, V = async () => {
|
|
@@ -6159,7 +6159,7 @@ const kd = { class: "inline-block" }, $d = ["disabled"], Pd = { class: "p-5 rela
|
|
|
6159
6159
|
"row-config": {
|
|
6160
6160
|
drag: !0
|
|
6161
6161
|
},
|
|
6162
|
-
onRowDragEnd:
|
|
6162
|
+
onRowDragEnd: $
|
|
6163
6163
|
}, {
|
|
6164
6164
|
default: L(() => [
|
|
6165
6165
|
j(T, {
|
|
@@ -6267,7 +6267,7 @@ function Xd(e) {
|
|
|
6267
6267
|
colName: String(n.title || n.field),
|
|
6268
6268
|
colWidth: n.width ?? n.minWidth,
|
|
6269
6269
|
colDataType: "default",
|
|
6270
|
-
colType: "
|
|
6270
|
+
colType: "span",
|
|
6271
6271
|
nSfExport: 1,
|
|
6272
6272
|
...t && t.length > 0 ? { selOpts: t, selId: "" } : {}
|
|
6273
6273
|
};
|
|
@@ -6304,7 +6304,7 @@ const ef = /* @__PURE__ */ te({
|
|
|
6304
6304
|
conditionMap: o.conditionMap || {},
|
|
6305
6305
|
exportList: l.value,
|
|
6306
6306
|
exportUserWebConfig: u.value
|
|
6307
|
-
},
|
|
6307
|
+
}, $ = Be.apiPrefix, V = o.customExportUrl ? `${o.customExportUrl}` : `${$}${o.exportUrl}/export/exportExecuteStream`, R = Be.exportAdapter;
|
|
6308
6308
|
let x;
|
|
6309
6309
|
R ? x = await R.export(V, S) : x = await (await import("axios")).default.post(V, S, { responseType: "blob" });
|
|
6310
6310
|
const O = new FileReader();
|
|
@@ -6328,11 +6328,11 @@ const ef = /* @__PURE__ */ te({
|
|
|
6328
6328
|
p.close();
|
|
6329
6329
|
}
|
|
6330
6330
|
});
|
|
6331
|
-
const
|
|
6332
|
-
const V = l.value.splice(
|
|
6331
|
+
const k = ({ newIndex: S, oldIndex: $ }) => {
|
|
6332
|
+
const V = l.value.splice($, 1)[0];
|
|
6333
6333
|
l.value.splice(S, 0, V);
|
|
6334
6334
|
};
|
|
6335
|
-
return (S,
|
|
6335
|
+
return (S, $) => {
|
|
6336
6336
|
const V = Te("vxe-checkbox"), R = Te("vxe-column"), x = Te("vxe-table");
|
|
6337
6337
|
return F(), ee(m(b), null, {
|
|
6338
6338
|
default: L(() => [
|
|
@@ -6348,7 +6348,7 @@ const ef = /* @__PURE__ */ te({
|
|
|
6348
6348
|
default: L(() => [
|
|
6349
6349
|
j(m(it), {
|
|
6350
6350
|
modelValue: u.value.nSheetRowNum,
|
|
6351
|
-
"onUpdate:modelValue":
|
|
6351
|
+
"onUpdate:modelValue": $[0] || ($[0] = (O) => u.value.nSheetRowNum = O),
|
|
6352
6352
|
placeholder: u.value.hintSheetRowNum,
|
|
6353
6353
|
"allow-clear": ""
|
|
6354
6354
|
}, {
|
|
@@ -6371,7 +6371,7 @@ const ef = /* @__PURE__ */ te({
|
|
|
6371
6371
|
default: L(() => [
|
|
6372
6372
|
j(m(ht), {
|
|
6373
6373
|
modelValue: u.value.maxExportNumber,
|
|
6374
|
-
"onUpdate:modelValue":
|
|
6374
|
+
"onUpdate:modelValue": $[1] || ($[1] = (O) => u.value.maxExportNumber = O),
|
|
6375
6375
|
placeholder: u.value.hintMaxExportNumber
|
|
6376
6376
|
}, null, 8, ["modelValue", "placeholder"])
|
|
6377
6377
|
]),
|
|
@@ -6388,7 +6388,7 @@ const ef = /* @__PURE__ */ te({
|
|
|
6388
6388
|
"row-config": {
|
|
6389
6389
|
drag: !0
|
|
6390
6390
|
},
|
|
6391
|
-
onRowDragEnd:
|
|
6391
|
+
onRowDragEnd: k
|
|
6392
6392
|
}, {
|
|
6393
6393
|
default: L(() => [
|
|
6394
6394
|
j(R, {
|
|
@@ -6525,7 +6525,7 @@ const tf = { class: "import-modal-body" }, nf = { class: "option-label" }, rf =
|
|
|
6525
6525
|
} finally {
|
|
6526
6526
|
d.value = !1;
|
|
6527
6527
|
}
|
|
6528
|
-
},
|
|
6528
|
+
}, k = (x) => {
|
|
6529
6529
|
x.value = x;
|
|
6530
6530
|
}, S = async () => {
|
|
6531
6531
|
try {
|
|
@@ -6539,13 +6539,13 @@ const tf = { class: "import-modal-body" }, nf = { class: "option-label" }, rf =
|
|
|
6539
6539
|
} catch (x) {
|
|
6540
6540
|
ue.error(x.message || "模板下载失败"), i("download-error", x);
|
|
6541
6541
|
}
|
|
6542
|
-
},
|
|
6542
|
+
}, $ = () => {
|
|
6543
6543
|
l.value = !0, u.value = [], y.value = !1;
|
|
6544
6544
|
}, V = () => {
|
|
6545
6545
|
u.value = [], l.value = !1, i("close");
|
|
6546
6546
|
};
|
|
6547
6547
|
n({
|
|
6548
|
-
open:
|
|
6548
|
+
open: $,
|
|
6549
6549
|
close: V
|
|
6550
6550
|
});
|
|
6551
6551
|
const R = () => {
|
|
@@ -6572,7 +6572,7 @@ const tf = { class: "import-modal-body" }, nf = { class: "option-label" }, rf =
|
|
|
6572
6572
|
multiple: "",
|
|
6573
6573
|
"custom-request": g,
|
|
6574
6574
|
onBeforeUpload: p,
|
|
6575
|
-
onChange:
|
|
6575
|
+
onChange: k
|
|
6576
6576
|
}, {
|
|
6577
6577
|
"upload-button": L(() => [
|
|
6578
6578
|
j(P, null, {
|
|
@@ -7108,10 +7108,10 @@ var fr = (() => {
|
|
|
7108
7108
|
Object.assign(t, i), i = null, t.arguments && t.arguments, t.thisProgram && (l = t.thisProgram), t.quit && t.quit;
|
|
7109
7109
|
var g;
|
|
7110
7110
|
t.wasmBinary && (g = t.wasmBinary), typeof WebAssembly != "object" && Fe("no native wasm support detected");
|
|
7111
|
-
var
|
|
7111
|
+
var k, S = !1, $, V, R, x, O, P, T, w;
|
|
7112
7112
|
function v() {
|
|
7113
|
-
var a =
|
|
7114
|
-
t.HEAP8 =
|
|
7113
|
+
var a = k.buffer;
|
|
7114
|
+
t.HEAP8 = $ = new Int8Array(a), t.HEAP16 = R = new Int16Array(a), t.HEAPU8 = V = new Uint8Array(a), t.HEAPU16 = x = new Uint16Array(a), t.HEAP32 = O = new Int32Array(a), t.HEAPU32 = P = new Uint32Array(a), t.HEAPF32 = T = new Float32Array(a), t.HEAPF64 = w = new Float64Array(a);
|
|
7115
7115
|
}
|
|
7116
7116
|
var E = [], D = [], G = [];
|
|
7117
7117
|
function U() {
|
|
@@ -7194,7 +7194,7 @@ var fr = (() => {
|
|
|
7194
7194
|
a: ri
|
|
7195
7195
|
};
|
|
7196
7196
|
function s(f, C) {
|
|
7197
|
-
return _e = f.exports,
|
|
7197
|
+
return _e = f.exports, k = _e.ia, v(), kr = _e.ma, pe(_e.ja), Ne(), _e;
|
|
7198
7198
|
}
|
|
7199
7199
|
ne();
|
|
7200
7200
|
function c(f) {
|
|
@@ -7231,13 +7231,13 @@ var fr = (() => {
|
|
|
7231
7231
|
}, this.get_destructor = function() {
|
|
7232
7232
|
return P[this.ptr + 8 >> 2];
|
|
7233
7233
|
}, this.set_caught = function(s) {
|
|
7234
|
-
s = s ? 1 : 0,
|
|
7234
|
+
s = s ? 1 : 0, $[this.ptr + 12 >> 0] = s;
|
|
7235
7235
|
}, this.get_caught = function() {
|
|
7236
|
-
return
|
|
7236
|
+
return $[this.ptr + 12 >> 0] != 0;
|
|
7237
7237
|
}, this.set_rethrown = function(s) {
|
|
7238
|
-
s = s ? 1 : 0,
|
|
7238
|
+
s = s ? 1 : 0, $[this.ptr + 13 >> 0] = s;
|
|
7239
7239
|
}, this.get_rethrown = function() {
|
|
7240
|
-
return
|
|
7240
|
+
return $[this.ptr + 13 >> 0] != 0;
|
|
7241
7241
|
}, this.init = function(s, c) {
|
|
7242
7242
|
this.set_adjusted_ptr(0), this.set_type(s), this.set_destructor(c);
|
|
7243
7243
|
}, this.set_adjusted_ptr = function(s) {
|
|
@@ -7845,7 +7845,7 @@ var fr = (() => {
|
|
|
7845
7845
|
switch (s) {
|
|
7846
7846
|
case 1:
|
|
7847
7847
|
return c ? function(f) {
|
|
7848
|
-
return this.fromWireType(
|
|
7848
|
+
return this.fromWireType($[f >> 0]);
|
|
7849
7849
|
} : function(f) {
|
|
7850
7850
|
return this.fromWireType(V[f >> 0]);
|
|
7851
7851
|
};
|
|
@@ -7933,7 +7933,7 @@ var fr = (() => {
|
|
|
7933
7933
|
}, ps = (a, s, c) => {
|
|
7934
7934
|
switch (s) {
|
|
7935
7935
|
case 1:
|
|
7936
|
-
return c ? (f) =>
|
|
7936
|
+
return c ? (f) => $[f >> 0] : (f) => V[f >> 0];
|
|
7937
7937
|
case 2:
|
|
7938
7938
|
return c ? (f) => R[f >> 1] : (f) => x[f >> 1];
|
|
7939
7939
|
case 4:
|
|
@@ -7966,7 +7966,7 @@ var fr = (() => {
|
|
|
7966
7966
|
var f = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array], C = f[s];
|
|
7967
7967
|
function _(A) {
|
|
7968
7968
|
var M = P[A >> 2], z = P[A + 4 >> 2];
|
|
7969
|
-
return new C(
|
|
7969
|
+
return new C($.buffer, z, M);
|
|
7970
7970
|
}
|
|
7971
7971
|
c = Re(c), Qe(a, {
|
|
7972
7972
|
name: c,
|
|
@@ -8236,9 +8236,9 @@ var fr = (() => {
|
|
|
8236
8236
|
}, zs = () => {
|
|
8237
8237
|
Fe("");
|
|
8238
8238
|
}, Is = (a, s, c) => V.copyWithin(a, s, s + c), Us = () => 2147483648, Ws = (a) => {
|
|
8239
|
-
var s =
|
|
8239
|
+
var s = k.buffer, c = (a - s.byteLength + 65535) / 65536;
|
|
8240
8240
|
try {
|
|
8241
|
-
return
|
|
8241
|
+
return k.grow(c), v(), 1;
|
|
8242
8242
|
} catch {
|
|
8243
8243
|
}
|
|
8244
8244
|
}, Hs = (a) => {
|
|
@@ -8276,8 +8276,8 @@ var fr = (() => {
|
|
|
8276
8276
|
return Mt.strings;
|
|
8277
8277
|
}, Gs = (a, s) => {
|
|
8278
8278
|
for (var c = 0; c < a.length; ++c)
|
|
8279
|
-
|
|
8280
|
-
|
|
8279
|
+
$[s++ >> 0] = a.charCodeAt(c);
|
|
8280
|
+
$[s >> 0] = 0;
|
|
8281
8281
|
}, Js = (a, s) => {
|
|
8282
8282
|
var c = 0;
|
|
8283
8283
|
return Mt().forEach((f, C) => {
|
|
@@ -8308,7 +8308,7 @@ var fr = (() => {
|
|
|
8308
8308
|
return Ar(a, C, 0, C.length), C;
|
|
8309
8309
|
}
|
|
8310
8310
|
var ei = (a, s) => {
|
|
8311
|
-
|
|
8311
|
+
$.set(a, s);
|
|
8312
8312
|
}, ti = (a, s, c, f) => {
|
|
8313
8313
|
var C = P[f + 40 >> 2], _ = {
|
|
8314
8314
|
tm_sec: O[f >> 2],
|
|
@@ -8847,13 +8847,13 @@ class pr extends EventTarget {
|
|
|
8847
8847
|
topRight: { x: u, y: d },
|
|
8848
8848
|
bottomLeft: { x: y, y: b },
|
|
8849
8849
|
bottomRight: { x: p, y: h }
|
|
8850
|
-
} = o.position, g = Math.min(i, u, y, p),
|
|
8850
|
+
} = o.position, g = Math.min(i, u, y, p), k = Math.min(l, d, b, h), S = Math.max(i, u, y, p), $ = Math.max(l, d, b, h);
|
|
8851
8851
|
return {
|
|
8852
8852
|
boundingBox: new DOMRectReadOnly(
|
|
8853
8853
|
g,
|
|
8854
|
-
|
|
8854
|
+
k,
|
|
8855
8855
|
S - g,
|
|
8856
|
-
|
|
8856
|
+
$ - k
|
|
8857
8857
|
),
|
|
8858
8858
|
rawValue: o.text,
|
|
8859
8859
|
format: lf(o.format),
|
|
@@ -8944,7 +8944,7 @@ const Nf = async (e, {
|
|
|
8944
8944
|
h && n(p);
|
|
8945
8945
|
const g = p.length > 0;
|
|
8946
8946
|
g && t(p), !g && b && t(p);
|
|
8947
|
-
const
|
|
8947
|
+
const k = {
|
|
8948
8948
|
lastScanned: u,
|
|
8949
8949
|
lastScanHadContent: g,
|
|
8950
8950
|
// It can happen that a QR code is constantly in view of the camera but
|
|
@@ -8954,7 +8954,7 @@ const Nf = async (e, {
|
|
|
8954
8954
|
// if we detect nothing, only if we detect something new.
|
|
8955
8955
|
contentBefore: h ? p.map((S) => S.rawValue) : y
|
|
8956
8956
|
};
|
|
8957
|
-
window.requestAnimationFrame(i(
|
|
8957
|
+
window.requestAnimationFrame(i(k));
|
|
8958
8958
|
}
|
|
8959
8959
|
}
|
|
8960
8960
|
};
|
|
@@ -9163,16 +9163,16 @@ function ep(e, n) {
|
|
|
9163
9163
|
ideal: d[b]
|
|
9164
9164
|
};
|
|
9165
9165
|
p.exact !== void 0 && typeof p.exact == "number" && (p.min = p.max = p.exact);
|
|
9166
|
-
var h = function(
|
|
9167
|
-
return
|
|
9166
|
+
var h = function(k, S) {
|
|
9167
|
+
return k ? k + S.charAt(0).toUpperCase() + S.slice(1) : S === "deviceId" ? "sourceId" : S;
|
|
9168
9168
|
};
|
|
9169
9169
|
if (p.ideal !== void 0) {
|
|
9170
9170
|
y.optional = y.optional || [];
|
|
9171
9171
|
var g = {};
|
|
9172
9172
|
typeof p.ideal == "number" ? (g[h("min", b)] = p.ideal, y.optional.push(g), g = {}, g[h("max", b)] = p.ideal, y.optional.push(g)) : (g[h("", b)] = p.ideal, y.optional.push(g));
|
|
9173
9173
|
}
|
|
9174
|
-
p.exact !== void 0 && typeof p.exact != "number" ? (y.mandatory = y.mandatory || {}, y.mandatory[h("", b)] = p.exact) : ["min", "max"].forEach(function(
|
|
9175
|
-
p[
|
|
9174
|
+
p.exact !== void 0 && typeof p.exact != "number" ? (y.mandatory = y.mandatory || {}, y.mandatory[h("", b)] = p.exact) : ["min", "max"].forEach(function(k) {
|
|
9175
|
+
p[k] !== void 0 && (y.mandatory = y.mandatory || {}, y.mandatory[h(k, b)] = p[k]);
|
|
9176
9176
|
});
|
|
9177
9177
|
}
|
|
9178
9178
|
}), d.advanced && (y.optional = (y.optional || []).concat(d.advanced)), y;
|
|
@@ -9180,8 +9180,8 @@ function ep(e, n) {
|
|
|
9180
9180
|
if (n.version >= 61)
|
|
9181
9181
|
return y(d);
|
|
9182
9182
|
if (d = JSON.parse(JSON.stringify(d)), d && ct(d.audio) === "object") {
|
|
9183
|
-
var b = function(
|
|
9184
|
-
S in
|
|
9183
|
+
var b = function(k, S, $) {
|
|
9184
|
+
S in k && !($ in k) && (k[$] = k[S], delete k[S]);
|
|
9185
9185
|
};
|
|
9186
9186
|
d = JSON.parse(JSON.stringify(d)), b(d.audio, "autoGainControl", "googAutoGainControl"), b(d.audio, "noiseSuppression", "googNoiseSuppression"), d.audio = r(d.audio);
|
|
9187
9187
|
}
|
|
@@ -9195,16 +9195,16 @@ function ep(e, n) {
|
|
|
9195
9195
|
delete d.video.facingMode;
|
|
9196
9196
|
var g;
|
|
9197
9197
|
if (p.exact === "environment" || p.ideal === "environment" ? g = ["back", "rear"] : (p.exact === "user" || p.ideal === "user") && (g = ["front"]), g)
|
|
9198
|
-
return t.mediaDevices.enumerateDevices().then(function(
|
|
9199
|
-
|
|
9200
|
-
return
|
|
9198
|
+
return t.mediaDevices.enumerateDevices().then(function(k) {
|
|
9199
|
+
k = k.filter(function($) {
|
|
9200
|
+
return $.kind === "videoinput";
|
|
9201
9201
|
});
|
|
9202
|
-
var S =
|
|
9202
|
+
var S = k.find(function($) {
|
|
9203
9203
|
return g.some(function(V) {
|
|
9204
|
-
return
|
|
9204
|
+
return $.label.toLowerCase().includes(V);
|
|
9205
9205
|
});
|
|
9206
9206
|
});
|
|
9207
|
-
return !S &&
|
|
9207
|
+
return !S && k.length && g.includes("back") && (S = k[k.length - 1]), S && (d.video.deviceId = p.exact ? {
|
|
9208
9208
|
exact: S.deviceId
|
|
9209
9209
|
} : {
|
|
9210
9210
|
ideal: S.deviceId
|
|
@@ -9731,7 +9731,7 @@ const gp = /* @__PURE__ */ te({
|
|
|
9731
9731
|
), Nf(d.value, {
|
|
9732
9732
|
detectHandler: (P) => r("detect", P),
|
|
9733
9733
|
formats: i.value,
|
|
9734
|
-
locateHandler:
|
|
9734
|
+
locateHandler: k,
|
|
9735
9735
|
minDelay: O()
|
|
9736
9736
|
});
|
|
9737
9737
|
}
|
|
@@ -9739,7 +9739,7 @@ const gp = /* @__PURE__ */ te({
|
|
|
9739
9739
|
const g = (x) => {
|
|
9740
9740
|
const O = x.getContext("2d");
|
|
9741
9741
|
Xe(O !== null, "canvas 2d context should always be non-null"), O.clearRect(0, 0, x.width, x.height);
|
|
9742
|
-
},
|
|
9742
|
+
}, k = (x) => {
|
|
9743
9743
|
const O = u.value;
|
|
9744
9744
|
Xe(
|
|
9745
9745
|
O !== void 0,
|
|
@@ -9786,7 +9786,7 @@ const gp = /* @__PURE__ */ te({
|
|
|
9786
9786
|
// If z-index is not defined, elements are stacked in the order they appear in the DOM.
|
|
9787
9787
|
// The first element is at the very bottom and subsequent elements are added on top.
|
|
9788
9788
|
"z-index": "0"
|
|
9789
|
-
},
|
|
9789
|
+
}, $ = {
|
|
9790
9790
|
width: "100%",
|
|
9791
9791
|
height: "100%",
|
|
9792
9792
|
position: "absolute",
|
|
@@ -9822,9 +9822,9 @@ const gp = /* @__PURE__ */ te({
|
|
|
9822
9822
|
id: "qrcode-stream-tracking-layer",
|
|
9823
9823
|
ref_key: "trackingLayerRef",
|
|
9824
9824
|
ref: u,
|
|
9825
|
-
style:
|
|
9825
|
+
style: $
|
|
9826
9826
|
}, null, 512),
|
|
9827
|
-
B("div", { style:
|
|
9827
|
+
B("div", { style: $ }, [
|
|
9828
9828
|
ie(x.$slots, "default")
|
|
9829
9829
|
])
|
|
9830
9830
|
]));
|