bi-components-library 1.2.58 → 1.2.59
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.es.js +97 -97
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +7 -7
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -925,8 +925,8 @@ const Ge = (e) => e === "multi-variable" || e === "multi-variable-select", od =
|
|
|
925
925
|
const ye = window.getComputedStyle(le);
|
|
926
926
|
ye.display !== "none" && ye.visibility !== "hidden" && (de = Math.ceil(le.getBoundingClientRect().width));
|
|
927
927
|
}
|
|
928
|
-
const
|
|
929
|
-
E((ye) => ye ===
|
|
928
|
+
const ve = Math.min(240, Math.max(80, $ + K + Y + de + 4));
|
|
929
|
+
E((ye) => ye === ve ? ye : ve);
|
|
930
930
|
}, [N]);
|
|
931
931
|
return Xe(() => {
|
|
932
932
|
const A = window.requestAnimationFrame(() => {
|
|
@@ -4113,13 +4113,13 @@ const Yd = ({
|
|
|
4113
4113
|
c((J) => {
|
|
4114
4114
|
const Y = { ...J }, le = [];
|
|
4115
4115
|
for (let de = 0; de < K; de++) {
|
|
4116
|
-
const
|
|
4117
|
-
ye != null &&
|
|
4116
|
+
const ve = `${D}-${de}`, ye = Y[ve];
|
|
4117
|
+
ye != null && ve !== W && le.push(ye);
|
|
4118
4118
|
}
|
|
4119
4119
|
for (let de = 0; de < K; de++)
|
|
4120
4120
|
delete Y[`${D}-${de}`];
|
|
4121
|
-
return le.forEach((de,
|
|
4122
|
-
Y[`${D}-${
|
|
4121
|
+
return le.forEach((de, ve) => {
|
|
4122
|
+
Y[`${D}-${ve}`] = de;
|
|
4123
4123
|
}), Y;
|
|
4124
4124
|
});
|
|
4125
4125
|
} else
|
|
@@ -4143,7 +4143,7 @@ const Yd = ({
|
|
|
4143
4143
|
if (u.current && (J?.accept ? u.current.accept = J.accept : J?.acceptType === "image" ? u.current.accept = "image/*" : J?.acceptType === "file" ? u.current.accept = ".csv,.xlsx,.xls,.txt,.pdf,.doc,.docx,.json" : u.current.accept = ""), W) {
|
|
4144
4144
|
const Y = l.find((le) => le.type === "upload" && le.key === W);
|
|
4145
4145
|
if (Y && typeof Y.maxCount == "number" && typeof Y.minCount == "number") {
|
|
4146
|
-
const le = Y.maxCount, de = o[z] != null,
|
|
4146
|
+
const le = Y.maxCount, de = o[z] != null, ve = D != null ? Number.parseInt(D, 10) : NaN;
|
|
4147
4147
|
if (de) {
|
|
4148
4148
|
u.current && (u.current.multiple = !1), h(null), f(null), y(z), s?.(), u.current?.click();
|
|
4149
4149
|
return;
|
|
@@ -4151,7 +4151,7 @@ const Yd = ({
|
|
|
4151
4151
|
let ye = 0;
|
|
4152
4152
|
for (let je = 0; je < le; je++)
|
|
4153
4153
|
o[`${W}-${je}`] != null && (ye += 1);
|
|
4154
|
-
ye < le && u.current ? (u.current.multiple = !0, h(W), f(Number.isFinite(
|
|
4154
|
+
ye < le && u.current ? (u.current.multiple = !0, h(W), f(Number.isFinite(ve) ? ve : null), y(null), s?.(), u.current.click()) : (u.current && (u.current.multiple = !1), h(null), f(null), y(z), s?.(), u.current?.click());
|
|
4155
4155
|
} else
|
|
4156
4156
|
u.current && (u.current.multiple = !1), h(null), f(null), y(z), s?.(), u.current?.click();
|
|
4157
4157
|
} else
|
|
@@ -4918,11 +4918,11 @@ const Yd = ({
|
|
|
4918
4918
|
}));
|
|
4919
4919
|
const D = [];
|
|
4920
4920
|
for (let le = 0; le < z; le++) {
|
|
4921
|
-
const de = `${w}_${le}`,
|
|
4921
|
+
const de = `${w}_${le}`, ve = n.current.querySelector(
|
|
4922
4922
|
`[data-type="variable"][data-key="${de}"][data-multi-key="${w}"]`
|
|
4923
4923
|
);
|
|
4924
|
-
if (
|
|
4925
|
-
const ye =
|
|
4924
|
+
if (ve) {
|
|
4925
|
+
const ye = ve.innerText.replace(/[\u200B\n]/g, "").trim();
|
|
4926
4926
|
D.push(ye);
|
|
4927
4927
|
}
|
|
4928
4928
|
}
|
|
@@ -4939,8 +4939,8 @@ const Yd = ({
|
|
|
4939
4939
|
}), n.current.querySelectorAll(
|
|
4940
4940
|
'[data-type="variable"]'
|
|
4941
4941
|
).forEach((le) => {
|
|
4942
|
-
const de = le.dataset.key,
|
|
4943
|
-
if (de &&
|
|
4942
|
+
const de = le.dataset.key, ve = le.dataset.multiKey;
|
|
4943
|
+
if (de && ve !== w) {
|
|
4944
4944
|
const ye = le.innerText.replace(/[\u200B\n]/g, "").trim();
|
|
4945
4945
|
ye && (J[de] = ye);
|
|
4946
4946
|
}
|
|
@@ -12259,11 +12259,11 @@ function im(e, t, a) {
|
|
|
12259
12259
|
function z(J) {
|
|
12260
12260
|
return Y;
|
|
12261
12261
|
function Y(le) {
|
|
12262
|
-
const de = le !== null && J[le],
|
|
12262
|
+
const de = le !== null && J[le], ve = le !== null && J.null, ye = [
|
|
12263
12263
|
// To do: add more extension tests.
|
|
12264
12264
|
/* c8 ignore next 2 */
|
|
12265
12265
|
...Array.isArray(de) ? de : de ? [de] : [],
|
|
12266
|
-
...Array.isArray(
|
|
12266
|
+
...Array.isArray(ve) ? ve : ve ? [ve] : []
|
|
12267
12267
|
];
|
|
12268
12268
|
return W(ye)(le);
|
|
12269
12269
|
}
|
|
@@ -12453,7 +12453,7 @@ function mm(e) {
|
|
|
12453
12453
|
autolinkProtocol: A,
|
|
12454
12454
|
autolinkEmail: A,
|
|
12455
12455
|
atxHeading: r(nt),
|
|
12456
|
-
blockQuote: r(
|
|
12456
|
+
blockQuote: r(ve),
|
|
12457
12457
|
characterEscape: A,
|
|
12458
12458
|
characterReference: A,
|
|
12459
12459
|
codeFenced: r(ye),
|
|
@@ -12849,7 +12849,7 @@ function mm(e) {
|
|
|
12849
12849
|
const ne = this.stack[this.stack.length - 1];
|
|
12850
12850
|
ne.url = "mailto:" + this.sliceSerialize(X);
|
|
12851
12851
|
}
|
|
12852
|
-
function
|
|
12852
|
+
function ve() {
|
|
12853
12853
|
return {
|
|
12854
12854
|
type: "blockquote",
|
|
12855
12855
|
children: []
|
|
@@ -29856,11 +29856,11 @@ function zo() {
|
|
|
29856
29856
|
}, T.valueOf = function() {
|
|
29857
29857
|
return this.$d.getTime();
|
|
29858
29858
|
}, T.startOf = function(P, q) {
|
|
29859
|
-
var H = this, F = !!I.u(q) || q, _ = I.p(P), z = function(de,
|
|
29860
|
-
var ye = I.w(H.$u ? Date.UTC(H.$y,
|
|
29859
|
+
var H = this, F = !!I.u(q) || q, _ = I.p(P), z = function(de, ve) {
|
|
29860
|
+
var ye = I.w(H.$u ? Date.UTC(H.$y, ve, de) : new Date(H.$y, ve, de), H);
|
|
29861
29861
|
return F ? ye : ye.endOf(o);
|
|
29862
|
-
}, W = function(de,
|
|
29863
|
-
return I.w(H.toDate()[de].apply(H.toDate("s"), (F ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(
|
|
29862
|
+
}, W = function(de, ve) {
|
|
29863
|
+
return I.w(H.toDate()[de].apply(H.toDate("s"), (F ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(ve)), H);
|
|
29864
29864
|
}, D = this.$W, $ = this.$M, K = this.$D, J = "set" + (this.$u ? "UTC" : "");
|
|
29865
29865
|
switch (_) {
|
|
29866
29866
|
case f:
|
|
@@ -29913,15 +29913,15 @@ function zo() {
|
|
|
29913
29913
|
}, T.format = function(P) {
|
|
29914
29914
|
var q = this, H = this.$locale();
|
|
29915
29915
|
if (!this.isValid()) return H.invalidDate || E;
|
|
29916
|
-
var F = P || "YYYY-MM-DDTHH:mm:ssZ", _ = I.z(this), z = this.$H, W = this.$m, D = this.$M, $ = H.weekdays, K = H.months, J = H.meridiem, Y = function(
|
|
29917
|
-
return
|
|
29918
|
-
}, le = function(
|
|
29919
|
-
return I.s(z % 12 || 12,
|
|
29920
|
-
}, de = J || function(
|
|
29921
|
-
var Me =
|
|
29916
|
+
var F = P || "YYYY-MM-DDTHH:mm:ssZ", _ = I.z(this), z = this.$H, W = this.$m, D = this.$M, $ = H.weekdays, K = H.months, J = H.meridiem, Y = function(ve, ye, je, Me) {
|
|
29917
|
+
return ve && (ve[ye] || ve(q, F)) || je[ye].slice(0, Me);
|
|
29918
|
+
}, le = function(ve) {
|
|
29919
|
+
return I.s(z % 12 || 12, ve, "0");
|
|
29920
|
+
}, de = J || function(ve, ye, je) {
|
|
29921
|
+
var Me = ve < 12 ? "AM" : "PM";
|
|
29922
29922
|
return je ? Me.toLowerCase() : Me;
|
|
29923
29923
|
};
|
|
29924
|
-
return F.replace(g, function(
|
|
29924
|
+
return F.replace(g, function(ve, ye) {
|
|
29925
29925
|
return ye || function(je) {
|
|
29926
29926
|
switch (je) {
|
|
29927
29927
|
case "YY":
|
|
@@ -29974,7 +29974,7 @@ function zo() {
|
|
|
29974
29974
|
return _;
|
|
29975
29975
|
}
|
|
29976
29976
|
return null;
|
|
29977
|
-
}(
|
|
29977
|
+
}(ve) || _.replace(":", "");
|
|
29978
29978
|
});
|
|
29979
29979
|
}, T.utcOffset = function() {
|
|
29980
29980
|
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
@@ -30313,7 +30313,7 @@ const { RangePicker: Zy } = Rc, eT = ({ host: e, onChange: t }) => {
|
|
|
30313
30313
|
hideCurrentSessionReport: _,
|
|
30314
30314
|
reportNameResolve: z
|
|
30315
30315
|
}) => {
|
|
30316
|
-
const [W, D] = Bc.useMessage(), $ = Z(null), K = Z(null), J = Z(null), Y = Z(null), le = Z(null), de = Z(null), [
|
|
30316
|
+
const [W, D] = Bc.useMessage(), $ = Z(null), K = Z(null), J = Z(null), Y = Z(null), le = Z(null), de = Z(null), [ve, ye] = ie(!1), je = Z("");
|
|
30317
30317
|
if (!je.current) {
|
|
30318
30318
|
const Q = Math.random().toString(36).slice(2, 8);
|
|
30319
30319
|
je.current = `rte_${Q}`;
|
|
@@ -30326,17 +30326,17 @@ const { RangePicker: Zy } = Rc, eT = ({ host: e, onChange: t }) => {
|
|
|
30326
30326
|
re(() => {
|
|
30327
30327
|
if (!w) return;
|
|
30328
30328
|
if (!(w.length === nt.length && w.every((se, oe) => {
|
|
30329
|
-
const
|
|
30330
|
-
return
|
|
30329
|
+
const ge = nt[oe];
|
|
30330
|
+
return ge && se.name === ge.name && se.size === ge.size && se.lastModified === ge.lastModified;
|
|
30331
30331
|
})))
|
|
30332
|
-
if (w.reduce((
|
|
30333
|
-
const
|
|
30332
|
+
if (w.reduce((ge, be) => ge + be.size, 0) > 52428800) {
|
|
30333
|
+
const ge = [];
|
|
30334
30334
|
let be = 0;
|
|
30335
30335
|
for (const fe of w) {
|
|
30336
30336
|
if (be + fe.size > 52428800) break;
|
|
30337
|
-
|
|
30337
|
+
ge.push(fe), be += fe.size;
|
|
30338
30338
|
}
|
|
30339
|
-
W.error("文件总大小不能超过 50MB"), Et(
|
|
30339
|
+
W.error("文件总大小不能超过 50MB"), Et(ge);
|
|
30340
30340
|
} else
|
|
30341
30341
|
Jt.current = !0, Et(w);
|
|
30342
30342
|
}, [w]), re(() => {
|
|
@@ -30369,10 +30369,10 @@ const { RangePicker: Zy } = Rc, eT = ({ host: e, onChange: t }) => {
|
|
|
30369
30369
|
});
|
|
30370
30370
|
}, []), Yo = ue((Q) => {
|
|
30371
30371
|
if (!Q.target.files || Q.target.files.length === 0) return;
|
|
30372
|
-
const se = 10 * 1024 * 1024, oe = 50 * 1024 * 1024,
|
|
30372
|
+
const se = 10 * 1024 * 1024, oe = 50 * 1024 * 1024, ge = (fe) => fe.type?.startsWith("image/") || /\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(fe.name || ""), be = Array.from(Q.target.files).filter((fe) => ge(fe) && fe.size > se ? (W.error("图片大小不能超过 10MB"), !1) : !0);
|
|
30373
30373
|
Et((fe) => {
|
|
30374
|
-
const
|
|
30375
|
-
let Se =
|
|
30374
|
+
const Ee = fe.reduce((Ne, De) => Ne + De.size, 0), xe = [];
|
|
30375
|
+
let Se = Ee;
|
|
30376
30376
|
for (const Ne of be) {
|
|
30377
30377
|
if (Se + Ne.size > oe) {
|
|
30378
30378
|
W.error("文件总大小不能超过 50MB");
|
|
@@ -30383,7 +30383,7 @@ const { RangePicker: Zy } = Rc, eT = ({ host: e, onChange: t }) => {
|
|
|
30383
30383
|
return xe.length > 0 ? [...fe, ...xe] : fe;
|
|
30384
30384
|
}), Q.target.value = "", setTimeout(ma, 0);
|
|
30385
30385
|
}, [W, ma]), Wo = ue((Q) => {
|
|
30386
|
-
Et((se) => se.filter((oe,
|
|
30386
|
+
Et((se) => se.filter((oe, ge) => ge !== Q)), setTimeout(ma, 0);
|
|
30387
30387
|
}, [ma]), jo = ue(() => {
|
|
30388
30388
|
const Q = He.current;
|
|
30389
30389
|
Q && Q.scrollBy({ left: 200, behavior: "smooth" });
|
|
@@ -30396,7 +30396,7 @@ const { RangePicker: Zy } = Rc, eT = ({ host: e, onChange: t }) => {
|
|
|
30396
30396
|
re(() => {
|
|
30397
30397
|
l && ye(!1);
|
|
30398
30398
|
}, [l]), re(() => {
|
|
30399
|
-
const Q = (
|
|
30399
|
+
const Q = (ge) => ge instanceof Element ? !!ge.closest(
|
|
30400
30400
|
[
|
|
30401
30401
|
".rte-agent-dropdown",
|
|
30402
30402
|
".rte-report-dropdown-overlay",
|
|
@@ -30405,11 +30405,11 @@ const { RangePicker: Zy } = Rc, eT = ({ host: e, onChange: t }) => {
|
|
|
30405
30405
|
".ant-select-dropdown",
|
|
30406
30406
|
".ant-image-preview-root"
|
|
30407
30407
|
].join(",")
|
|
30408
|
-
) : !1, se = (
|
|
30409
|
-
const be = $.current, fe =
|
|
30408
|
+
) : !1, se = (ge) => {
|
|
30409
|
+
const be = $.current, fe = ge.target;
|
|
30410
30410
|
be && (fe instanceof Node && be.contains(fe) || Q(fe) || ye(!1));
|
|
30411
|
-
}, oe = (
|
|
30412
|
-
const be = $.current, fe =
|
|
30411
|
+
}, oe = (ge) => {
|
|
30412
|
+
const be = $.current, fe = ge.target;
|
|
30413
30413
|
if (be) {
|
|
30414
30414
|
if (fe instanceof Node && be.contains(fe)) {
|
|
30415
30415
|
l || ye(!0);
|
|
@@ -30477,10 +30477,10 @@ const { RangePicker: Zy } = Rc, eT = ({ host: e, onChange: t }) => {
|
|
|
30477
30477
|
let se = !1;
|
|
30478
30478
|
e.forEach((oe) => {
|
|
30479
30479
|
if (Ge(oe.type) && oe.key) {
|
|
30480
|
-
const
|
|
30480
|
+
const ge = L[oe.key], be = Array.isArray(ge) ? ge.filter((fe) => fe.trim().length > 0) : ge;
|
|
30481
30481
|
if (Array.isArray(be) && be.length > 0) {
|
|
30482
|
-
const fe = oe.maxCount ?? 9,
|
|
30483
|
-
xt[oe.key] !==
|
|
30482
|
+
const fe = oe.maxCount ?? 9, Ee = Math.min(be.length + 1, fe);
|
|
30483
|
+
xt[oe.key] !== Ee && (Q[oe.key] = Ee, se = !0);
|
|
30484
30484
|
}
|
|
30485
30485
|
}
|
|
30486
30486
|
}), se && (ya(), Ta((oe) => ({ ...oe, ...Q })));
|
|
@@ -30514,14 +30514,14 @@ const { RangePicker: Zy } = Rc, eT = ({ host: e, onChange: t }) => {
|
|
|
30514
30514
|
const Q = Y.current;
|
|
30515
30515
|
if (!Q || !z) return;
|
|
30516
30516
|
const se = (oe) => {
|
|
30517
|
-
const
|
|
30518
|
-
if (!
|
|
30519
|
-
const be =
|
|
30517
|
+
const ge = oe.target;
|
|
30518
|
+
if (!ge) return;
|
|
30519
|
+
const be = ge.closest?.('[data-type="variable"][data-multi-key]');
|
|
30520
30520
|
if (!be) return;
|
|
30521
30521
|
const fe = be.dataset.key;
|
|
30522
30522
|
if (!fe) return;
|
|
30523
|
-
const
|
|
30524
|
-
if (ln.current && (
|
|
30523
|
+
const Ee = tn.current?.key === fe;
|
|
30524
|
+
if (ln.current && (Ee || !Q.contains(be)))
|
|
30525
30525
|
return;
|
|
30526
30526
|
const xe = Q.contains(be) ? be : Q.querySelector(
|
|
30527
30527
|
`[data-type="variable"][data-key="${fe}"]`
|
|
@@ -30531,7 +30531,7 @@ const { RangePicker: Zy } = Rc, eT = ({ host: e, onChange: t }) => {
|
|
|
30531
30531
|
li(fe, Se, ze);
|
|
30532
30532
|
};
|
|
30533
30533
|
return Q.addEventListener("focusout", se), () => Q.removeEventListener("focusout", se);
|
|
30534
|
-
}, [Y, li, Oe, z]), yd(Y, [Oe]), hl.current = (Q, se, oe,
|
|
30534
|
+
}, [Y, li, Oe, z]), yd(Y, [Oe]), hl.current = (Q, se, oe, ge) => {
|
|
30535
30535
|
const be = Y.current;
|
|
30536
30536
|
if (!be) return;
|
|
30537
30537
|
let fe = be.querySelector(
|
|
@@ -30554,15 +30554,15 @@ const { RangePicker: Zy } = Rc, eT = ({ host: e, onChange: t }) => {
|
|
|
30554
30554
|
$t.current[Q] = { name: se, url: oe };
|
|
30555
30555
|
return;
|
|
30556
30556
|
}
|
|
30557
|
-
if (!
|
|
30557
|
+
if (!ge?.forceApply) {
|
|
30558
30558
|
const Se = fe.getAttribute("data-report-url"), Ne = (fe.innerText || "").replace(/[\u200B\n]/g, "").trim();
|
|
30559
30559
|
if (!(!Se && Ne === "") && !(Se === oe || Ne === oe)) return;
|
|
30560
30560
|
}
|
|
30561
30561
|
$t.current[Q] = { name: se, url: oe };
|
|
30562
|
-
const
|
|
30563
|
-
|
|
30562
|
+
const Ee = fe.querySelector(".rte-report-dropdown-host");
|
|
30563
|
+
Ee && (Ee.style.display = "", Ee.style.visibility = "", Ee.classList.remove("hidden"), Ee.classList.add("rte-report-dropdown-host-quiet"));
|
|
30564
30564
|
const xe = [document.createTextNode(se)];
|
|
30565
|
-
|
|
30565
|
+
Ee && xe.push(Ee), fe.classList.remove("show-placeholder", "rte-variable-with-icon"), fe.classList.add("rte-report-name-chip"), fe.setAttribute("data-report-url", oe), fe.setAttribute("data-report-name", se), fe.contentEditable = "false", fe.replaceChildren(...xe), Qn(fe), document.dispatchEvent(
|
|
30566
30566
|
new CustomEvent("rte-report-dropdown-force-close", {
|
|
30567
30567
|
detail: { key: Q }
|
|
30568
30568
|
})
|
|
@@ -30592,15 +30592,15 @@ const { RangePicker: Zy } = Rc, eT = ({ host: e, onChange: t }) => {
|
|
|
30592
30592
|
const un = Z(/* @__PURE__ */ new Set()), ni = Z(Oe), ri = Z(L);
|
|
30593
30593
|
(ni.current !== Oe || ri.current !== L) && (ni.current = Oe, ri.current = L, un.current = /* @__PURE__ */ new Set()), re(() => {
|
|
30594
30594
|
if (!L || !Oe || Oe.length === 0) return;
|
|
30595
|
-
const Q = Oe.filter((
|
|
30595
|
+
const Q = Oe.filter((Ee) => Ee.type === "upload" && Ee.key);
|
|
30596
30596
|
if (Q.length === 0) return;
|
|
30597
|
-
const se = {}, oe = (
|
|
30598
|
-
xe && (xe instanceof File ? se[
|
|
30597
|
+
const se = {}, oe = (Ee, xe) => {
|
|
30598
|
+
xe && (xe instanceof File ? se[Ee] = xe : typeof xe == "string" && xe.trim() && (se[Ee] = xe.trim()));
|
|
30599
30599
|
};
|
|
30600
|
-
for (const
|
|
30601
|
-
const xe =
|
|
30600
|
+
for (const Ee of Q) {
|
|
30601
|
+
const xe = Ee.key;
|
|
30602
30602
|
if (un.current.has(xe)) continue;
|
|
30603
|
-
const Se = L[xe], Ne = typeof
|
|
30603
|
+
const Se = L[xe], Ne = typeof Ee.maxCount == "number" && Ee.maxCount > 1;
|
|
30604
30604
|
if (Array.isArray(Se) && Se.length > 0) {
|
|
30605
30605
|
Ne ? Se.forEach((De, ze) => oe(`${xe}-${ze}`, De)) : oe(xe, Se[0]);
|
|
30606
30606
|
continue;
|
|
@@ -30610,17 +30610,17 @@ const { RangePicker: Zy } = Rc, eT = ({ host: e, onChange: t }) => {
|
|
|
30610
30610
|
continue;
|
|
30611
30611
|
}
|
|
30612
30612
|
if (Ne)
|
|
30613
|
-
for (let De = 0; De <
|
|
30613
|
+
for (let De = 0; De < Ee.maxCount; De++) {
|
|
30614
30614
|
const ze = `${xe}-${De}`, ct = L[ze];
|
|
30615
30615
|
if (!ct) break;
|
|
30616
30616
|
oe(ze, ct);
|
|
30617
30617
|
}
|
|
30618
30618
|
}
|
|
30619
30619
|
if (Object.keys(se).length === 0) return;
|
|
30620
|
-
for (const
|
|
30621
|
-
L[
|
|
30622
|
-
Bt((
|
|
30623
|
-
const xe = { ...
|
|
30620
|
+
for (const Ee of Q)
|
|
30621
|
+
L[Ee.key] !== void 0 && un.current.add(Ee.key);
|
|
30622
|
+
Bt((Ee) => {
|
|
30623
|
+
const xe = { ...Ee };
|
|
30624
30624
|
let Se = !1;
|
|
30625
30625
|
for (const Ne of Q) {
|
|
30626
30626
|
const De = Ne.key;
|
|
@@ -30628,24 +30628,24 @@ const { RangePicker: Zy } = Rc, eT = ({ host: e, onChange: t }) => {
|
|
|
30628
30628
|
if (typeof Ne.maxCount == "number" && Ne.maxCount > 1)
|
|
30629
30629
|
for (let ct = 0; ct < Ne.maxCount; ct++) {
|
|
30630
30630
|
const dn = `${De}-${ct}`;
|
|
30631
|
-
!se[dn] &&
|
|
30631
|
+
!se[dn] && Ee[dn] && (xe[dn] = null, Se = !0);
|
|
30632
30632
|
}
|
|
30633
30633
|
}
|
|
30634
30634
|
for (const [Ne, De] of Object.entries(se))
|
|
30635
|
-
|
|
30636
|
-
return Se ? xe :
|
|
30635
|
+
Ee[Ne] !== De && (xe[Ne] = De, Se = !0);
|
|
30636
|
+
return Se ? xe : Ee;
|
|
30637
30637
|
});
|
|
30638
|
-
const
|
|
30639
|
-
([,
|
|
30638
|
+
const ge = Object.entries(se).filter(
|
|
30639
|
+
([, Ee]) => typeof Ee == "string"
|
|
30640
30640
|
);
|
|
30641
|
-
if (
|
|
30642
|
-
const be = async (
|
|
30643
|
-
const xe =
|
|
30641
|
+
if (ge.length === 0) return;
|
|
30642
|
+
const be = async (Ee) => {
|
|
30643
|
+
const xe = Ee.split("/").pop()?.split("?")[0] || "file", Se = decodeURIComponent(xe), Ne = async (De) => {
|
|
30644
30644
|
const ze = await De.blob();
|
|
30645
30645
|
return new File([ze], Se, { type: ze.type || "application/octet-stream" });
|
|
30646
30646
|
};
|
|
30647
30647
|
try {
|
|
30648
|
-
const De = `/api/image-proxy?url=${encodeURIComponent(
|
|
30648
|
+
const De = `/api/image-proxy?url=${encodeURIComponent(Ee)}`, ze = await fetch(De);
|
|
30649
30649
|
if (ze.ok) return Ne(ze);
|
|
30650
30650
|
} catch {
|
|
30651
30651
|
}
|
|
@@ -30653,14 +30653,14 @@ const { RangePicker: Zy } = Rc, eT = ({ host: e, onChange: t }) => {
|
|
|
30653
30653
|
};
|
|
30654
30654
|
let fe = !1;
|
|
30655
30655
|
return Promise.all(
|
|
30656
|
-
|
|
30656
|
+
ge.map(async ([Ee, xe]) => {
|
|
30657
30657
|
const Se = await be(xe);
|
|
30658
|
-
return Se ? { key:
|
|
30658
|
+
return Se ? { key: Ee, file: Se } : null;
|
|
30659
30659
|
})
|
|
30660
|
-
).then((
|
|
30660
|
+
).then((Ee) => {
|
|
30661
30661
|
if (fe) return;
|
|
30662
30662
|
const xe = {};
|
|
30663
|
-
for (const Se of
|
|
30663
|
+
for (const Se of Ee)
|
|
30664
30664
|
Se && (xe[Se.key] = Se.file);
|
|
30665
30665
|
Object.keys(xe).length > 0 && Bt((Se) => {
|
|
30666
30666
|
const Ne = { ...Se };
|
|
@@ -30679,21 +30679,21 @@ const { RangePicker: Zy } = Rc, eT = ({ host: e, onChange: t }) => {
|
|
|
30679
30679
|
const Q = e.filter((oe) => oe.type === "report-url" && oe.key), se = e.filter((oe) => oe.type === "multi-variable-select" && oe.key);
|
|
30680
30680
|
if (!(Q.length === 0 && se.length === 0)) {
|
|
30681
30681
|
for (const oe of Q) {
|
|
30682
|
-
const
|
|
30683
|
-
if (xa.current.has(
|
|
30684
|
-
const be = L[
|
|
30682
|
+
const ge = oe.key;
|
|
30683
|
+
if (xa.current.has(ge)) continue;
|
|
30684
|
+
const be = L[ge] ?? L[`${ge}__url`];
|
|
30685
30685
|
if (!be || typeof be == "string" && !be.trim()) continue;
|
|
30686
30686
|
const fe = Array.isArray(be) ? be[0] : String(be);
|
|
30687
|
-
fe && (xa.current.add(
|
|
30688
|
-
_t.current(
|
|
30687
|
+
fe && (xa.current.add(ge), setTimeout(() => {
|
|
30688
|
+
_t.current(ge, fe);
|
|
30689
30689
|
}, 100));
|
|
30690
30690
|
}
|
|
30691
30691
|
for (const oe of se) {
|
|
30692
|
-
const
|
|
30693
|
-
!Array.isArray(be) || be.length === 0 || be.forEach((fe,
|
|
30692
|
+
const ge = oe.key, be = L[ge];
|
|
30693
|
+
!Array.isArray(be) || be.length === 0 || be.forEach((fe, Ee) => {
|
|
30694
30694
|
const xe = typeof fe == "string" ? fe.trim() : "";
|
|
30695
30695
|
if (!xe) return;
|
|
30696
|
-
const Se = `${
|
|
30696
|
+
const Se = `${ge}_${Ee}`;
|
|
30697
30697
|
xa.current.has(Se) || (xa.current.add(Se), setTimeout(() => {
|
|
30698
30698
|
_t.current(Se, xe);
|
|
30699
30699
|
}, 100));
|
|
@@ -30902,14 +30902,14 @@ const { RangePicker: Zy } = Rc, eT = ({ host: e, onChange: t }) => {
|
|
|
30902
30902
|
// 折叠时覆盖 CSS 的 min-height:58px,否则 min-height > max-height 时 min-height 优先,导致露出第二行
|
|
30903
30903
|
minHeight: b ? 0 : void 0,
|
|
30904
30904
|
overflow: _c,
|
|
30905
|
-
overscrollBehavior: "contain",
|
|
30905
|
+
overscrollBehavior: ve ? "contain" : "auto",
|
|
30906
30906
|
transition: kc,
|
|
30907
30907
|
willChange: "max-height"
|
|
30908
30908
|
};
|
|
30909
30909
|
return /* @__PURE__ */ he(
|
|
30910
30910
|
"div",
|
|
30911
30911
|
{
|
|
30912
|
-
className: `rich-text-editor ${
|
|
30912
|
+
className: `rich-text-editor ${ve ? "rte-editor-selected" : ""}`,
|
|
30913
30913
|
style: xc,
|
|
30914
30914
|
"data-disabled": l,
|
|
30915
30915
|
ref: $,
|
|
@@ -30933,7 +30933,7 @@ const { RangePicker: Zy } = Rc, eT = ({ host: e, onChange: t }) => {
|
|
|
30933
30933
|
ref: He,
|
|
30934
30934
|
onScroll: ma,
|
|
30935
30935
|
children: nt.map((Q, se) => {
|
|
30936
|
-
const oe = Q.type?.startsWith("image/") || /\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(Q.name || ""),
|
|
30936
|
+
const oe = Q.type?.startsWith("image/") || /\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(Q.name || ""), ge = Q.size < 1024 ? `${Q.size}B` : Q.size < 1024 * 1024 ? `${Math.round(Q.size / 1024)}KB` : `${(Q.size / (1024 * 1024)).toFixed(1)}MB`;
|
|
30937
30937
|
return /* @__PURE__ */ he("div", { className: "rte-footer-file-chip", children: [
|
|
30938
30938
|
oe ? /* @__PURE__ */ V(
|
|
30939
30939
|
Il,
|
|
@@ -30957,7 +30957,7 @@ const { RangePicker: Zy } = Rc, eT = ({ host: e, onChange: t }) => {
|
|
|
30957
30957
|
})()}` }) }) }),
|
|
30958
30958
|
/* @__PURE__ */ he("div", { className: "rte-footer-file-info", children: [
|
|
30959
30959
|
/* @__PURE__ */ V("span", { className: "rte-footer-file-name", title: Q.name, children: Q.name }),
|
|
30960
|
-
/* @__PURE__ */ V("span", { className: "rte-footer-file-size", children:
|
|
30960
|
+
/* @__PURE__ */ V("span", { className: "rte-footer-file-size", children: ge })
|
|
30961
30961
|
] }),
|
|
30962
30962
|
/* @__PURE__ */ V(
|
|
30963
30963
|
"span",
|
|
@@ -31692,10 +31692,10 @@ const sT = ({
|
|
|
31692
31692
|
const q = ue((Y, le) => {
|
|
31693
31693
|
let de = 0;
|
|
31694
31694
|
N(!0);
|
|
31695
|
-
const
|
|
31696
|
-
de < Y.length ? (E(Y.slice(0, de + 1)), de++, I.current = window.setTimeout(
|
|
31695
|
+
const ve = () => {
|
|
31696
|
+
de < Y.length ? (E(Y.slice(0, de + 1)), de++, I.current = window.setTimeout(ve, a)) : (N(!1), le?.());
|
|
31697
31697
|
};
|
|
31698
|
-
|
|
31698
|
+
ve();
|
|
31699
31699
|
}, [a]), H = ue((Y) => {
|
|
31700
31700
|
let le = T.current.length;
|
|
31701
31701
|
const de = () => {
|