bi-components-library 1.0.30 → 1.0.31
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/bi-components-library.css +1 -1
- package/dist/index.es.js +94 -94
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +3 -3
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as $, jsxs as Z, Fragment as st } from "react/jsx-runtime";
|
|
2
2
|
import { useState as ne, useRef as Q, useMemo as Ze, useCallback as ae, useEffect as de, useLayoutEffect as je } from "react";
|
|
3
|
-
import { Button as $e, Card as
|
|
3
|
+
import { Button as $e, Card as Ge, Modal as lt, Table as Re, Flex as We, Spin as it, Empty as ct, Select as Fe, Form as De, Input as et, Space as ut, DatePicker as dt, Dropdown as pt, Tooltip as ft, Progress as yt, Pagination as mt, theme as ht } from "antd";
|
|
4
4
|
import { createFromIconfontCN as gt, LeftOutlined as vt, SearchOutlined as bt, ReloadOutlined as xt, InfoCircleOutlined as kt, SendOutlined as wt, PauseCircleOutlined as Et, PlayCircleOutlined as $t } from "@ant-design/icons";
|
|
5
5
|
import { createPortal as tt } from "react-dom";
|
|
6
6
|
const Ct = ({
|
|
@@ -85,7 +85,7 @@ const St = ({
|
|
|
85
85
|
size: u = "default",
|
|
86
86
|
...C
|
|
87
87
|
}) => /* @__PURE__ */ $(
|
|
88
|
-
|
|
88
|
+
Ge,
|
|
89
89
|
{
|
|
90
90
|
...C,
|
|
91
91
|
title: t,
|
|
@@ -229,7 +229,7 @@ const qt = ({
|
|
|
229
229
|
defaultPageSize: l = 10,
|
|
230
230
|
...s
|
|
231
231
|
}) => /* @__PURE__ */ $(
|
|
232
|
-
|
|
232
|
+
Re,
|
|
233
233
|
{
|
|
234
234
|
...s,
|
|
235
235
|
scroll: {
|
|
@@ -562,7 +562,7 @@ const { Option: Mt } = Fe, It = ({
|
|
|
562
562
|
V.current = n;
|
|
563
563
|
const E = Q(k);
|
|
564
564
|
E.current = k;
|
|
565
|
-
const B = Q(!1),
|
|
565
|
+
const B = Q(!1), R = Ze(() => t.map((d) => {
|
|
566
566
|
const { sortable: p, render: b, ...L } = d;
|
|
567
567
|
return {
|
|
568
568
|
...L,
|
|
@@ -613,7 +613,7 @@ const { Option: Mt } = Fe, It = ({
|
|
|
613
613
|
const d = Object.keys(k).length > 0;
|
|
614
614
|
(w && !B.current || d) && (F(), B.current = !0);
|
|
615
615
|
}, [w, k, F]), /* @__PURE__ */ Z("div", { children: [
|
|
616
|
-
s && l.length > 0 && /* @__PURE__ */ $(
|
|
616
|
+
s && l.length > 0 && /* @__PURE__ */ $(Ge, { size: "small", style: { marginBottom: 16 }, children: /* @__PURE__ */ Z(
|
|
617
617
|
De,
|
|
618
618
|
{
|
|
619
619
|
form: x,
|
|
@@ -645,10 +645,10 @@ const { Option: Mt } = Fe, It = ({
|
|
|
645
645
|
}
|
|
646
646
|
) }),
|
|
647
647
|
/* @__PURE__ */ $(
|
|
648
|
-
|
|
648
|
+
Re,
|
|
649
649
|
{
|
|
650
650
|
...e,
|
|
651
|
-
columns:
|
|
651
|
+
columns: R,
|
|
652
652
|
dataSource: q,
|
|
653
653
|
loading: i,
|
|
654
654
|
pagination: {
|
|
@@ -1124,9 +1124,9 @@ function Vt(t, c, l, s, u, C = {}, T) {
|
|
|
1124
1124
|
const v = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group">`, x = "</span>";
|
|
1125
1125
|
let V = "";
|
|
1126
1126
|
e.className ? V = `<span class="${e.className}">${e.text ?? ""}</span>` : V = e.text ?? "";
|
|
1127
|
-
const E = q, B = l[E.key] !== null && l[E.key] !== void 0,
|
|
1127
|
+
const E = q, B = l[E.key] !== null && l[E.key] !== void 0, R = B ? l[E.key] : null, F = B ? l[E.key]?.name : E.text, W = B ? "" : "hidden", H = E.tooltip && !B ? "" : "hidden", ee = B ? "has-file" : "", re = B && F ? ` data-file-name="${F.replace(/"/g, """)}"` : "";
|
|
1128
1128
|
let d = "";
|
|
1129
|
-
B &&
|
|
1129
|
+
B && R && (R.type?.startsWith("image/") ? d = `<img class="upload-icon-img upload-icon-preview" src="${URL.createObjectURL(R)}" alt="preview" />` : d = "<i class='iconfont icon-exlwenjian'></i>");
|
|
1130
1130
|
const p = `<span contenteditable="false" data-type="upload" data-key="${E.key}" class="upload-chip"><span class="upload-inner-wrapper ${ee}"><span class="upload-icon">${d}</span><span class="upload-label"${re}>${F || E.text}</span>${E.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi upload-info-icon ${H}" data-upload-key="${E.key}" data-tooltip="${E.tooltip}" title="提示"></i>` : ""}<span class="file-remove-btn ${W}" title="移除文件">×</span></span></span>`;
|
|
1131
1131
|
w += v + V + p + x, k += 2;
|
|
1132
1132
|
continue;
|
|
@@ -1135,7 +1135,7 @@ function Vt(t, c, l, s, u, C = {}, T) {
|
|
|
1135
1135
|
const v = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group">`, x = "</span>";
|
|
1136
1136
|
let V = "";
|
|
1137
1137
|
e.className ? V = `<span class="${e.className}">${e.text ?? ""}</span>` : V = e.text ?? "";
|
|
1138
|
-
const E = q,
|
|
1138
|
+
const E = q, R = (E.key ? u[E.key] : void 0) || E.text || "", F = !R, W = F ? "" : R, H = F ? "show-placeholder" : "", ee = E.exclusionGroup ? ` data-group="${E.exclusionGroup}"` : "", re = E.tooltip ? ` data-tooltip="${E.tooltip.replace(/"/g, """)}" data-variable-key="${E.key || ""}"` : "", d = E.tooltip && F ? "" : "hidden", p = `<span contenteditable="true" data-type="variable" data-key="${E.key}" data-placeholder="${E.placeholder || ""}"${ee}${re} class="variable-chip ${H}">${W}${E.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi variable-info-icon ${d}" data-variable-key="${E.key}" data-tooltip="${E.tooltip.replace(/"/g, """)}" title="提示"></i>` : ""}</span>`;
|
|
1139
1139
|
w += v + V + p + x, k += 2;
|
|
1140
1140
|
continue;
|
|
1141
1141
|
}
|
|
@@ -1149,14 +1149,14 @@ function Vt(t, c, l, s, u, C = {}, T) {
|
|
|
1149
1149
|
const a = s ? ' data-locked="true" contenteditable="false"' : ' contenteditable="false"', m = (e.text ?? "").replace(/\n/g, "<br/>");
|
|
1150
1150
|
e.className ? o = `<span class="${e.className}"${a}>${m}</span>` : o = s ? `<span${a}>${m}</span>` : `<span contenteditable="false">${m}</span>`;
|
|
1151
1151
|
} else if (e.type === "variable" && e.key) {
|
|
1152
|
-
const f = u[e.key] || e.text || "", m = !f, v = m ? "" : f, x = m ? "show-placeholder" : "", V = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", E = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, """)}" data-variable-key="${e.key || ""}"` : "", B = e.tooltip && m ? "" : "hidden",
|
|
1153
|
-
e.required ? o = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group"><span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>${
|
|
1152
|
+
const f = u[e.key] || e.text || "", m = !f, v = m ? "" : f, x = m ? "show-placeholder" : "", V = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", E = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, """)}" data-variable-key="${e.key || ""}"` : "", B = e.tooltip && m ? "" : "hidden", R = `<span contenteditable="true" data-type="variable" data-key="${e.key}" data-placeholder="${e.placeholder || ""}"${V}${E} class="variable-chip ${x}">${v}${e.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi variable-info-icon ${B}" data-variable-key="${e.key}" data-tooltip="${e.tooltip.replace(/"/g, """)}" title="提示"></i>` : ""}</span>`;
|
|
1153
|
+
e.required ? o = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group"><span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>${R}</span>` : o = R;
|
|
1154
1154
|
} else if (e.type === "upload" && e.key) {
|
|
1155
1155
|
const a = l[e.key] !== null && l[e.key] !== void 0, f = a ? l[e.key] : null, m = a ? l[e.key]?.name : e.text, v = a ? "" : "hidden", x = e.tooltip && !a ? "" : "hidden", V = a ? "has-file" : "", E = a && m ? ` data-file-name="${m.replace(/"/g, """)}"` : "";
|
|
1156
1156
|
let B = "";
|
|
1157
1157
|
a && f && (f.type?.startsWith("image/") ? B = `<img class="upload-icon-img upload-icon-preview" src="${URL.createObjectURL(f)}" alt="preview" />` : B = "<i class='iconfont icon-exlwenjian'></i>");
|
|
1158
|
-
const
|
|
1159
|
-
e.required ? o = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group"><span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>${
|
|
1158
|
+
const R = `<span contenteditable="false" data-type="upload" data-key="${e.key}" class="upload-chip"><span class="upload-inner-wrapper ${V}"><span class="upload-icon">${B}</span><span class="upload-label"${E}>${m || e.text}</span>${e.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi upload-info-icon ${x}" data-upload-key="${e.key}" data-tooltip="${e.tooltip}" title="提示"></i>` : ""}<span class="file-remove-btn ${v}" title="移除文件">×</span></span></span>`;
|
|
1159
|
+
e.required ? o = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group"><span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>${R}</span>` : o = R;
|
|
1160
1160
|
} else if (e.type === "select" && e.key) {
|
|
1161
1161
|
const a = u[e.key] || e.defaultValue || "", f = (e.options || []).map((x) => {
|
|
1162
1162
|
const V = a === x.value ? "selected" : "";
|
|
@@ -1167,8 +1167,8 @@ function Vt(t, c, l, s, u, C = {}, T) {
|
|
|
1167
1167
|
const a = u[e.key] || "", f = e.maxHeight || 252, m = e.expandable !== !1, v = e.placeholder ? ` placeholder="${e.placeholder}"` : "", x = `<textarea data-type="textarea" data-key="${e.key}" class="rte-textarea" data-max-height="${f}" style="max-height:${f}px;"${v}>${a}</textarea>`, V = m ? `<button type="button" class="rte-textarea-toggle" data-key="${e.key}" data-expanded="false">展开</button>` : "", E = `<div class="rte-textarea-wrapper" data-key="${e.key}">${x}${V}</div>`;
|
|
1168
1168
|
e.required ? o = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group"><span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>${E}</span>` : o = E;
|
|
1169
1169
|
} else if (e.type === "richtext" && e.key) {
|
|
1170
|
-
const a = u[e.key] || e.text || "", f = e.minHeight || 140, m = e.placeholder ? ` data-placeholder="${e.placeholder}"` : "", v = e.expandable !== !1, x = a, V = `<div contenteditable="true" data-type="richtext" data-key="${e.key}" class="rte-richtext"${m} style="min-height:${f}px;">${x}</div>`, E = v ? `<button type="button" class="rte-richtext-toggle" data-key="${e.key}" data-expanded="false">展开</button>` : "", B = `<div class="rte-richtext-wrapper" data-key="${e.key}">${V}${E}</div>`,
|
|
1171
|
-
e.required ? o = `<div ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group rte-richtext-required"><span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>${
|
|
1170
|
+
const a = u[e.key] || e.text || "", f = e.minHeight || 140, m = e.placeholder ? ` data-placeholder="${e.placeholder}"` : "", v = e.expandable !== !1, x = a, V = `<div contenteditable="true" data-type="richtext" data-key="${e.key}" class="rte-richtext"${m} style="min-height:${f}px;">${x}</div>`, E = v ? `<button type="button" class="rte-richtext-toggle" data-key="${e.key}" data-expanded="false">展开</button>` : "", B = `<div class="rte-richtext-wrapper" data-key="${e.key}">${V}${E}</div>`, R = `<div class="rte-richtext-container" data-key="${e.key}">${B}</div>`;
|
|
1171
|
+
e.required ? o = `<div ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group rte-richtext-required"><span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>${R}</div>` : o = R;
|
|
1172
1172
|
} else if (e.type === "datepicker" && e.key) {
|
|
1173
1173
|
const a = u[e.key] || "", f = e.placeholder ? ` data-placeholder="${e.placeholder}"` : "", m = e.limitRange ? ` data-limit-range="${e.limitRange}"` : "", v = e.disableFuture ? ' data-disable-future="true"' : "", x = `<div data-type="datepicker" data-key="${e.key}" data-value="${a}" class="rte-datepicker-host"${f}${m}${v}></div>`;
|
|
1174
1174
|
e.required ? o = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group"><span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>${x}</span>` : o = x;
|
|
@@ -1178,14 +1178,14 @@ function Vt(t, c, l, s, u, C = {}, T) {
|
|
|
1178
1178
|
const v = `<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`, x = e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : "";
|
|
1179
1179
|
let V = "";
|
|
1180
1180
|
for (let E = 0; E < m; E++) {
|
|
1181
|
-
const B = `${e.key}_${E}`,
|
|
1181
|
+
const B = `${e.key}_${E}`, R = u[B] || "", F = !R, W = F ? "" : R, H = F ? "show-placeholder" : "", ee = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, """)}" data-variable-key="${e.key || ""}"` : "", re = e.tooltip && F ? "" : "hidden", d = `<span contenteditable="true" data-type="variable" data-key="${B}" data-multi-key="${e.key}" data-index="${E}" data-placeholder="${e.placeholder || ""}"${ee} class="variable-chip ${H}">${W}${e.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi variable-info-icon ${re}" data-variable-key="${e.key}" data-tooltip="${e.tooltip.replace(/"/g, """)}" title="提示"></i>` : ""}</span>`;
|
|
1182
1182
|
E === 0 ? V += `<span ${x} class="exclusion-wrapper required-upload-group required-multi-first">${v}${d}</span>` : V += d;
|
|
1183
1183
|
}
|
|
1184
1184
|
o = V;
|
|
1185
1185
|
} else {
|
|
1186
1186
|
let v = "";
|
|
1187
1187
|
for (let x = 0; x < m; x++) {
|
|
1188
|
-
const V = `${e.key}_${x}`, E = u[V] || "", B = !E,
|
|
1188
|
+
const V = `${e.key}_${x}`, E = u[V] || "", B = !E, R = B ? "" : E, F = B ? "show-placeholder" : "", W = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, """)}" data-variable-key="${e.key || ""}"` : "", H = e.tooltip && B ? "" : "hidden", ee = `<span contenteditable="true" data-type="variable" data-key="${V}" data-multi-key="${e.key}" data-index="${x}" data-placeholder="${e.placeholder || ""}"${W} class="variable-chip ${F}">${R}${e.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi variable-info-icon ${H}" data-variable-key="${e.key}" data-tooltip="${e.tooltip.replace(/"/g, """)}" title="提示"></i>` : ""}</span>`;
|
|
1189
1189
|
v += ee;
|
|
1190
1190
|
}
|
|
1191
1191
|
o = v;
|
|
@@ -1205,7 +1205,7 @@ function Pt(t, c, l, s, u = {}, C, T, w) {
|
|
|
1205
1205
|
const k = ae(() => {
|
|
1206
1206
|
if (!t.current) return;
|
|
1207
1207
|
if (c.length === 0) {
|
|
1208
|
-
t.current.innerHTML = "";
|
|
1208
|
+
t.current.innerHTML = "", t.current.style.height = "auto", t.current.style.minHeight = "";
|
|
1209
1209
|
return;
|
|
1210
1210
|
}
|
|
1211
1211
|
let e = {};
|
|
@@ -1380,7 +1380,7 @@ function Ht(t, c, l) {
|
|
|
1380
1380
|
};
|
|
1381
1381
|
}, [c, t, l]);
|
|
1382
1382
|
}
|
|
1383
|
-
function
|
|
1383
|
+
function Gt(t, c, l, s) {
|
|
1384
1384
|
de(() => {
|
|
1385
1385
|
if (!t.current) return;
|
|
1386
1386
|
const u = (k) => {
|
|
@@ -1409,7 +1409,7 @@ function Rt(t, c, l, s) {
|
|
|
1409
1409
|
};
|
|
1410
1410
|
}, [c, l, t, s]);
|
|
1411
1411
|
}
|
|
1412
|
-
function
|
|
1412
|
+
function Rt(t, c, l, s) {
|
|
1413
1413
|
de(() => {
|
|
1414
1414
|
const u = setTimeout(() => {
|
|
1415
1415
|
Oe(t, c, l), He(t, c, l, s);
|
|
@@ -1474,14 +1474,14 @@ function Ft(t, c) {
|
|
|
1474
1474
|
const E = t.current.querySelectorAll('[data-type="variable"]');
|
|
1475
1475
|
if (E.length > 0) {
|
|
1476
1476
|
let B = null;
|
|
1477
|
-
for (const
|
|
1478
|
-
if (
|
|
1479
|
-
B =
|
|
1477
|
+
for (const R of Array.from(E))
|
|
1478
|
+
if (R.style.display !== "none") {
|
|
1479
|
+
B = R;
|
|
1480
1480
|
break;
|
|
1481
1481
|
}
|
|
1482
1482
|
if (!B && E.length > 0 && (B = E[0]), B) {
|
|
1483
|
-
const
|
|
1484
|
-
|
|
1483
|
+
const R = document.createRange();
|
|
1484
|
+
R.selectNodeContents(B), R.collapse(!1), f.removeAllRanges(), f.addRange(R), B.focus();
|
|
1485
1485
|
} else
|
|
1486
1486
|
f.removeAllRanges();
|
|
1487
1487
|
} else
|
|
@@ -1524,7 +1524,7 @@ function nt() {
|
|
|
1524
1524
|
return d === void 0;
|
|
1525
1525
|
} }, V = "en", E = {};
|
|
1526
1526
|
E[V] = m;
|
|
1527
|
-
var B = "$isDayjsObject",
|
|
1527
|
+
var B = "$isDayjsObject", R = function(d) {
|
|
1528
1528
|
return d instanceof ee || !(!d || !d[B]);
|
|
1529
1529
|
}, F = function d(p, b, L) {
|
|
1530
1530
|
var N;
|
|
@@ -1540,11 +1540,11 @@ function nt() {
|
|
|
1540
1540
|
}
|
|
1541
1541
|
return !L && N && (V = N), N || !L && V;
|
|
1542
1542
|
}, W = function(d, p) {
|
|
1543
|
-
if (
|
|
1543
|
+
if (R(d)) return d.clone();
|
|
1544
1544
|
var b = typeof p == "object" ? p : {};
|
|
1545
1545
|
return b.date = d, b.args = arguments, new ee(b);
|
|
1546
1546
|
}, H = x;
|
|
1547
|
-
H.l = F, H.i =
|
|
1547
|
+
H.l = F, H.i = R, H.w = function(d, p) {
|
|
1548
1548
|
return W(d, { locale: p.$L, utc: p.$u, x: p.$x, $offset: p.$offset });
|
|
1549
1549
|
};
|
|
1550
1550
|
var ee = function() {
|
|
@@ -1769,7 +1769,7 @@ function nt() {
|
|
|
1769
1769
|
};
|
|
1770
1770
|
}), W.extend = function(d, p) {
|
|
1771
1771
|
return d.$i || (d(p, ee, W), d.$i = !0), W;
|
|
1772
|
-
}, W.locale = F, W.isDayjs =
|
|
1772
|
+
}, W.locale = F, W.isDayjs = R, W.unix = function(d) {
|
|
1773
1773
|
return W(1e3 * d);
|
|
1774
1774
|
}, W.en = E[V], W.Ls = E, W.p = {}, W;
|
|
1775
1775
|
});
|
|
@@ -2004,7 +2004,7 @@ const { RangePicker: tn } = dt, nn = ({ host: t, onChange: c }) => {
|
|
|
2004
2004
|
background: i = "transparent",
|
|
2005
2005
|
hideButtons: r
|
|
2006
2006
|
}) => {
|
|
2007
|
-
const n = Q(null), o = Q(null), [a, f] = ne({}), [m, v] = ne(null), [x, V] = ne(null), E = Q(!1), B = Q(null), [
|
|
2007
|
+
const n = Q(null), o = Q(null), [a, f] = ne({}), [m, v] = ne(null), [x, V] = ne(null), E = Q(!1), B = Q(null), [R, F] = ne(!1), W = Q(null), [H, ee] = ne(!0), [re, d] = ne(() => {
|
|
2008
2008
|
const g = {};
|
|
2009
2009
|
return t.forEach((h) => {
|
|
2010
2010
|
h.type === "multi-variable" && h.key && (g[h.key] = 1);
|
|
@@ -2021,22 +2021,22 @@ const { RangePicker: tn } = dt, nn = ({ host: t, onChange: c }) => {
|
|
|
2021
2021
|
if (g && g !== h && n.current) {
|
|
2022
2022
|
const S = {};
|
|
2023
2023
|
n.current.querySelectorAll('[data-type="variable"]').forEach((_) => {
|
|
2024
|
-
const
|
|
2025
|
-
if (
|
|
2024
|
+
const G = _.dataset.key;
|
|
2025
|
+
if (G) {
|
|
2026
2026
|
const M = _.innerText.replace(/[\u200B\n]/g, "").trim();
|
|
2027
|
-
M && (S[
|
|
2027
|
+
M && (S[G] = M);
|
|
2028
2028
|
}
|
|
2029
2029
|
}), n.current.querySelectorAll('[data-type="select"]').forEach((_) => {
|
|
2030
|
-
const
|
|
2031
|
-
if (
|
|
2030
|
+
const G = _.dataset.key;
|
|
2031
|
+
if (G) {
|
|
2032
2032
|
const M = _.value.trim();
|
|
2033
|
-
M && (S[
|
|
2033
|
+
M && (S[G] = M);
|
|
2034
2034
|
}
|
|
2035
2035
|
}), n.current.querySelectorAll('[data-type="textarea"]').forEach((_) => {
|
|
2036
|
-
const
|
|
2037
|
-
if (
|
|
2036
|
+
const G = _.dataset.key;
|
|
2037
|
+
if (G) {
|
|
2038
2038
|
const M = _.value.replace(/[\u200B]/g, "").trim();
|
|
2039
|
-
M && (S[
|
|
2039
|
+
M && (S[G] = M);
|
|
2040
2040
|
}
|
|
2041
2041
|
}), p.current[g] = {
|
|
2042
2042
|
variableValues: S,
|
|
@@ -2060,7 +2060,7 @@ const { RangePicker: tn } = dt, nn = ({ host: t, onChange: c }) => {
|
|
|
2060
2060
|
Y.current && n.current && (n.current.__tempVariableValues = Y.current.variableValues, setTimeout(() => {
|
|
2061
2061
|
Y.current && (Y.current = null);
|
|
2062
2062
|
}, 0));
|
|
2063
|
-
}), Pt(n, t, a, C, re, W, void 0, r), Bt(n, t, a, V), Ot(n, t, V, r),
|
|
2063
|
+
}), Pt(n, t, a, C, re, W, void 0, r), Bt(n, t, a, V), Ot(n, t, V, r), Gt(n, t, a, V), Ht(n, t, V), Rt(n, t, a, F), Ft(n, E);
|
|
2064
2064
|
const te = an(n);
|
|
2065
2065
|
de(() => {
|
|
2066
2066
|
if (t.length > 0) {
|
|
@@ -2074,10 +2074,10 @@ const { RangePicker: tn } = dt, nn = ({ host: t, onChange: c }) => {
|
|
|
2074
2074
|
}
|
|
2075
2075
|
const S = n.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "", I = n.current.querySelectorAll('[data-type="variable"]'), A = n.current.querySelectorAll('[data-type="upload"]');
|
|
2076
2076
|
let D = !1;
|
|
2077
|
-
I.forEach((
|
|
2078
|
-
(
|
|
2079
|
-
}), A.forEach((
|
|
2080
|
-
|
|
2077
|
+
I.forEach((G) => {
|
|
2078
|
+
(G.textContent?.replace(/[\u200B\n]/g, "").trim() || "") && (D = !0);
|
|
2079
|
+
}), A.forEach((G) => {
|
|
2080
|
+
G.querySelector(".upload-inner-wrapper.has-file") && (D = !0);
|
|
2081
2081
|
});
|
|
2082
2082
|
const _ = !S && !D;
|
|
2083
2083
|
ee(_), t.length === 0 && F(!_);
|
|
@@ -2106,9 +2106,9 @@ const { RangePicker: tn } = dt, nn = ({ host: t, onChange: c }) => {
|
|
|
2106
2106
|
if (I.nodeType === Node.ELEMENT_NODE ? A = I.closest('[data-type="variable"]') : I.nodeType === Node.TEXT_NODE && I.parentElement && (A = I.parentElement.closest('[data-type="variable"]')), A) {
|
|
2107
2107
|
const D = A.dataset.multiKey;
|
|
2108
2108
|
if (D) {
|
|
2109
|
-
const _ = /[、,,\s\n\r\t]+/,
|
|
2110
|
-
if (console.log("[Paste Event] 粘贴的内容:", h), console.log("[Paste Event] 拆分后的值:",
|
|
2111
|
-
const M = parseInt(A.dataset.index || "0", 10), j = t.find((ie) => ie.type === "multi-variable" && ie.key === D)?.maxCount || 9, U = re[D] || 1, P = Math.min(M +
|
|
2109
|
+
const _ = /[、,,\s\n\r\t]+/, G = h.split(_).map((M) => M.trim()).filter((M) => M.length > 0);
|
|
2110
|
+
if (console.log("[Paste Event] 粘贴的内容:", h), console.log("[Paste Event] 拆分后的值:", G), G.length > 1) {
|
|
2111
|
+
const M = parseInt(A.dataset.index || "0", 10), j = t.find((ie) => ie.type === "multi-variable" && ie.key === D)?.maxCount || 9, U = re[D] || 1, P = Math.min(M + G.length, j);
|
|
2112
2112
|
P > U && d((J) => ({
|
|
2113
2113
|
...J,
|
|
2114
2114
|
[D]: P
|
|
@@ -2123,7 +2123,7 @@ const { RangePicker: tn } = dt, nn = ({ host: t, onChange: c }) => {
|
|
|
2123
2123
|
K.push(ke);
|
|
2124
2124
|
}
|
|
2125
2125
|
}
|
|
2126
|
-
K.splice(M, 1, ...
|
|
2126
|
+
K.splice(M, 1, ...G.slice(0, j - M));
|
|
2127
2127
|
const oe = K.slice(0, j);
|
|
2128
2128
|
oe.length > 0 && oe[oe.length - 1] !== "" && oe.length < j && oe.push("");
|
|
2129
2129
|
const O = Math.max(oe.length, 1), le = {};
|
|
@@ -2142,7 +2142,7 @@ const { RangePicker: tn } = dt, nn = ({ host: t, onChange: c }) => {
|
|
|
2142
2142
|
[D]: O
|
|
2143
2143
|
})), console.log("[Paste Event] 粘贴完成,已填充到多个输入框,值:", oe);
|
|
2144
2144
|
return;
|
|
2145
|
-
} else
|
|
2145
|
+
} else G.length === 1 && console.log("[Paste Event] 粘贴单个值,将在失去焦点时检查是否需要拆分");
|
|
2146
2146
|
}
|
|
2147
2147
|
}
|
|
2148
2148
|
}
|
|
@@ -2178,7 +2178,7 @@ const { RangePicker: tn } = dt, nn = ({ host: t, onChange: c }) => {
|
|
|
2178
2178
|
if (h.closest(".tag-close-btn")) {
|
|
2179
2179
|
if (g.preventDefault(), g.stopPropagation(), C)
|
|
2180
2180
|
return;
|
|
2181
|
-
V(null), k ? k() : n.current && (n.current.innerHTML = "", n.current.focus());
|
|
2181
|
+
V(null), k ? k() : n.current && (n.current.innerHTML = "", n.current.style.height = "auto", n.current.style.minHeight = "", n.current.focus());
|
|
2182
2182
|
return;
|
|
2183
2183
|
}
|
|
2184
2184
|
if (C) {
|
|
@@ -2297,10 +2297,10 @@ const { RangePicker: tn } = dt, nn = ({ host: t, onChange: c }) => {
|
|
|
2297
2297
|
if (I) {
|
|
2298
2298
|
const A = document.createRange(), D = S.textContent || "";
|
|
2299
2299
|
if (D.replace(/\u200B/g, "")) {
|
|
2300
|
-
let
|
|
2301
|
-
D.startsWith("") && (
|
|
2300
|
+
let G = 0, M = D.length;
|
|
2301
|
+
D.startsWith("") && (G = 1), D.endsWith("") && D.length > 1 && (M = D.length - 1);
|
|
2302
2302
|
const j = S.firstChild;
|
|
2303
|
-
j && j.nodeType === Node.TEXT_NODE ? (A.setStart(j,
|
|
2303
|
+
j && j.nodeType === Node.TEXT_NODE ? (A.setStart(j, G), A.setEnd(j, M)) : A.selectNodeContents(S);
|
|
2304
2304
|
} else
|
|
2305
2305
|
A.selectNodeContents(S), A.collapse(!0);
|
|
2306
2306
|
I.removeAllRanges(), I.addRange(A);
|
|
@@ -2346,13 +2346,13 @@ const { RangePicker: tn } = dt, nn = ({ host: t, onChange: c }) => {
|
|
|
2346
2346
|
}
|
|
2347
2347
|
}
|
|
2348
2348
|
const _ = (A[A.length - 1] || "") === "";
|
|
2349
|
-
let
|
|
2349
|
+
let G = !1, M = -1;
|
|
2350
2350
|
for (let j = 0; j < A.length - 1; j++)
|
|
2351
2351
|
if (A[j] === "") {
|
|
2352
|
-
|
|
2352
|
+
G = !0, M = j;
|
|
2353
2353
|
break;
|
|
2354
2354
|
}
|
|
2355
|
-
if (
|
|
2355
|
+
if (G && M >= 0) {
|
|
2356
2356
|
const j = window.getSelection();
|
|
2357
2357
|
if (j && j.rangeCount > 0) {
|
|
2358
2358
|
const O = j.getRangeAt(0), le = O.startContainer, me = le.nodeType === Node.ELEMENT_NODE ? le.closest('[data-type="variable"][data-multi-key]') : le.parentElement?.closest('[data-type="variable"][data-multi-key]');
|
|
@@ -2419,8 +2419,8 @@ const { RangePicker: tn } = dt, nn = ({ host: t, onChange: c }) => {
|
|
|
2419
2419
|
const g = n.current;
|
|
2420
2420
|
if (!g) return;
|
|
2421
2421
|
const h = /* @__PURE__ */ new Map(), S = (D) => {
|
|
2422
|
-
const _ = D.target,
|
|
2423
|
-
!_ || !n.current || !n.current.contains(_) ||
|
|
2422
|
+
const _ = D.target, G = D.relatedTarget;
|
|
2423
|
+
!_ || !n.current || !n.current.contains(_) || G && n.current.contains(G) || setTimeout(() => {
|
|
2424
2424
|
if (n.current) {
|
|
2425
2425
|
if (t.length === 0) {
|
|
2426
2426
|
const M = n.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "";
|
|
@@ -2434,14 +2434,14 @@ const { RangePicker: tn } = dt, nn = ({ host: t, onChange: c }) => {
|
|
|
2434
2434
|
g.addEventListener("blur", S, !0);
|
|
2435
2435
|
const I = () => {
|
|
2436
2436
|
if (!n.current) return;
|
|
2437
|
-
h.forEach((
|
|
2438
|
-
M.removeEventListener("blur",
|
|
2437
|
+
h.forEach((G, M) => {
|
|
2438
|
+
M.removeEventListener("blur", G, !1);
|
|
2439
2439
|
}), h.clear();
|
|
2440
2440
|
const D = n.current.querySelectorAll(
|
|
2441
2441
|
'[data-type="variable"][data-multi-key]'
|
|
2442
|
-
), _ = (
|
|
2443
|
-
|
|
2444
|
-
const M =
|
|
2442
|
+
), _ = (G) => {
|
|
2443
|
+
G.stopPropagation(), G.stopImmediatePropagation();
|
|
2444
|
+
const M = G.target;
|
|
2445
2445
|
if (!M || !n.current || !n.current.contains(M))
|
|
2446
2446
|
return;
|
|
2447
2447
|
const j = M.closest('[data-type="variable"][data-multi-key]');
|
|
@@ -2454,7 +2454,7 @@ const { RangePicker: tn } = dt, nn = ({ host: t, onChange: c }) => {
|
|
|
2454
2454
|
return;
|
|
2455
2455
|
const P = j.dataset.multiKey, K = j.dataset.key, oe = j.dataset.index;
|
|
2456
2456
|
if (!P || !K || oe === void 0) return;
|
|
2457
|
-
const O =
|
|
2457
|
+
const O = G.relatedTarget;
|
|
2458
2458
|
if (!(!O || !n.current.contains(O)))
|
|
2459
2459
|
return;
|
|
2460
2460
|
const me = j.innerText.replace(/[\u200B\n]/g, "").trim();
|
|
@@ -2504,8 +2504,8 @@ const { RangePicker: tn } = dt, nn = ({ host: t, onChange: c }) => {
|
|
|
2504
2504
|
}
|
|
2505
2505
|
}
|
|
2506
2506
|
};
|
|
2507
|
-
D.forEach((
|
|
2508
|
-
|
|
2507
|
+
D.forEach((G) => {
|
|
2508
|
+
G.addEventListener("blur", _, !1), h.set(G, _);
|
|
2509
2509
|
});
|
|
2510
2510
|
}, A = setTimeout(() => {
|
|
2511
2511
|
I();
|
|
@@ -2560,8 +2560,8 @@ const { RangePicker: tn } = dt, nn = ({ host: t, onChange: c }) => {
|
|
|
2560
2560
|
if (S && S.rangeCount > 0) {
|
|
2561
2561
|
const I = S.getRangeAt(0), A = S.anchorNode;
|
|
2562
2562
|
if (C) {
|
|
2563
|
-
let _ = null,
|
|
2564
|
-
if (A && (A.nodeType === Node.ELEMENT_NODE ? (_ = A.closest(".tag-node"),
|
|
2563
|
+
let _ = null, G = null;
|
|
2564
|
+
if (A && (A.nodeType === Node.ELEMENT_NODE ? (_ = A.closest(".tag-node"), G = A.closest('[data-type="text"]')) : A.nodeType === Node.TEXT_NODE && A.parentElement && (_ = A.parentElement.closest(".tag-node"), G = A.parentElement.closest('[data-type="text"]'))), (_ || G) && I.collapsed && I.startOffset === 0) {
|
|
2565
2565
|
g.preventDefault();
|
|
2566
2566
|
return;
|
|
2567
2567
|
}
|
|
@@ -2591,7 +2591,7 @@ const { RangePicker: tn } = dt, nn = ({ host: t, onChange: c }) => {
|
|
|
2591
2591
|
}
|
|
2592
2592
|
}
|
|
2593
2593
|
}, we = () => {
|
|
2594
|
-
if (l || s || e || !
|
|
2594
|
+
if (l || s || e || !R || !n.current) return;
|
|
2595
2595
|
if (t.length === 0) {
|
|
2596
2596
|
const D = n.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "";
|
|
2597
2597
|
if (!D) return;
|
|
@@ -2605,8 +2605,8 @@ const { RangePicker: tn } = dt, nn = ({ host: t, onChange: c }) => {
|
|
|
2605
2605
|
if (D.nodeType === Node.TEXT_NODE)
|
|
2606
2606
|
h += (D.textContent || "").replace(/\u200B/g, "");
|
|
2607
2607
|
else if (D.nodeType === Node.ELEMENT_NODE) {
|
|
2608
|
-
const _ = D,
|
|
2609
|
-
if (
|
|
2608
|
+
const _ = D, G = _.dataset.type, M = _.dataset.key;
|
|
2609
|
+
if (G === "variable" && M) {
|
|
2610
2610
|
let j = "";
|
|
2611
2611
|
const U = document.createTreeWalker(
|
|
2612
2612
|
_,
|
|
@@ -2630,20 +2630,20 @@ const { RangePicker: tn } = dt, nn = ({ host: t, onChange: c }) => {
|
|
|
2630
2630
|
} else
|
|
2631
2631
|
S[M] = P, h += P;
|
|
2632
2632
|
}
|
|
2633
|
-
} else if (
|
|
2633
|
+
} else if (G === "select" && M) {
|
|
2634
2634
|
const j = _, U = (j.value || "").trim();
|
|
2635
2635
|
if (U) {
|
|
2636
2636
|
S[M] = U;
|
|
2637
2637
|
const P = j.selectedOptions?.[0];
|
|
2638
2638
|
h += P?.textContent || U;
|
|
2639
2639
|
}
|
|
2640
|
-
} else if (
|
|
2640
|
+
} else if (G === "textarea" && M) {
|
|
2641
2641
|
const U = (_.value || "").replace(/\u200B/g, "").trim();
|
|
2642
2642
|
U && (S[M] = U, h += U);
|
|
2643
|
-
} else if (
|
|
2643
|
+
} else if (G === "richtext" && M) {
|
|
2644
2644
|
const U = (_.textContent || "").replace(/\u200B/g, "").trim();
|
|
2645
2645
|
U && (S[M] = U, h += U);
|
|
2646
|
-
} else if (
|
|
2646
|
+
} else if (G === "datepicker" && M) {
|
|
2647
2647
|
const U = (_.getAttribute("data-value") || "").trim();
|
|
2648
2648
|
if (U)
|
|
2649
2649
|
if (U.includes(",")) {
|
|
@@ -2651,11 +2651,11 @@ const { RangePicker: tn } = dt, nn = ({ host: t, onChange: c }) => {
|
|
|
2651
2651
|
P.length === 2 ? (S[M] = P, h += `[${P[0]}, ${P[1]}]`) : (S[M] = U, h += U);
|
|
2652
2652
|
} else
|
|
2653
2653
|
S[M] = U, h += U;
|
|
2654
|
-
} else if (
|
|
2654
|
+
} else if (G === "upload" && M)
|
|
2655
2655
|
S[M] = a[M] ?? null, a[M] && (h += ` [附带文件: ${a[M]?.name}] `);
|
|
2656
2656
|
else {
|
|
2657
2657
|
if (_.classList.contains("tag-close-btn") || _.classList.contains("file-remove-btn")) return;
|
|
2658
|
-
_.getAttribute("contenteditable") === "false" && !
|
|
2658
|
+
_.getAttribute("contenteditable") === "false" && !G && _.classList.contains("tag-node") ? h += _.innerText : _.childNodes.forEach(I);
|
|
2659
2659
|
}
|
|
2660
2660
|
}
|
|
2661
2661
|
}
|
|
@@ -2761,7 +2761,7 @@ const { RangePicker: tn } = dt, nn = ({ host: t, onChange: c }) => {
|
|
|
2761
2761
|
{
|
|
2762
2762
|
type: "button",
|
|
2763
2763
|
onClick: we,
|
|
2764
|
-
disabled: l || s || e || !
|
|
2764
|
+
disabled: l || s || e || !R,
|
|
2765
2765
|
className: "rich-text-editor-send-button",
|
|
2766
2766
|
children: l || e ? /* @__PURE__ */ $("span", { className: "rte-send-spinner" }) : /* @__PURE__ */ $("i", { className: "iconfont icon-fasong" })
|
|
2767
2767
|
}
|
|
@@ -3043,7 +3043,7 @@ const Qe = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
|
|
|
3043
3043
|
);
|
|
3044
3044
|
return /* @__PURE__ */ Z("div", { className: "flex flex-col", children: [
|
|
3045
3045
|
/* @__PURE__ */ $(
|
|
3046
|
-
|
|
3046
|
+
Re,
|
|
3047
3047
|
{
|
|
3048
3048
|
ref: o,
|
|
3049
3049
|
...n,
|
|
@@ -3199,7 +3199,7 @@ const un = ({
|
|
|
3199
3199
|
b < d.length ? (k(d.slice(0, b + 1)), b++, m.current = window.setTimeout(L, l)) : (a(!1), p?.());
|
|
3200
3200
|
};
|
|
3201
3201
|
L();
|
|
3202
|
-
}, [l]),
|
|
3202
|
+
}, [l]), R = ae((d) => {
|
|
3203
3203
|
let p = E.current.length;
|
|
3204
3204
|
const b = () => {
|
|
3205
3205
|
p > 0 ? (k(E.current.slice(0, p - 1)), p--, m.current = window.setTimeout(b, l / 2)) : d?.();
|
|
@@ -3209,7 +3209,7 @@ const un = ({
|
|
|
3209
3209
|
if (v.current.length === 0 || V.current) return;
|
|
3210
3210
|
i(!0);
|
|
3211
3211
|
const d = v.current[x.current];
|
|
3212
|
-
E.current ?
|
|
3212
|
+
E.current ? R(() => {
|
|
3213
3213
|
B(d, () => {
|
|
3214
3214
|
f.current = window.setTimeout(() => {
|
|
3215
3215
|
q((p) => (p + 1) % v.current.length), i(!1);
|
|
@@ -3220,7 +3220,7 @@ const un = ({
|
|
|
3220
3220
|
q((p) => (p + 1) % v.current.length), i(!1);
|
|
3221
3221
|
}, 2e3);
|
|
3222
3222
|
});
|
|
3223
|
-
}, [
|
|
3223
|
+
}, [R, B]);
|
|
3224
3224
|
return de(() => (s && t.length > 0 && !r && F(), () => {
|
|
3225
3225
|
f.current && window.clearTimeout(f.current), m.current && window.clearTimeout(m.current);
|
|
3226
3226
|
}), [e, r, s, t.length, F]), de(() => {
|
|
@@ -3369,7 +3369,7 @@ const dn = ({
|
|
|
3369
3369
|
...r
|
|
3370
3370
|
// 其他原生属性
|
|
3371
3371
|
}) => {
|
|
3372
|
-
const [n, o] = ne(""), [a, f] = ne(0), [m, v] = ne(!1), [x, V] = ne(!1), [E, B] = ne(!1), [
|
|
3372
|
+
const [n, o] = ne(""), [a, f] = ne(0), [m, v] = ne(!1), [x, V] = ne(!1), [E, B] = ne(!1), [R, F] = ne(u || ""), W = Q(void 0), H = Q(void 0), ee = Q(t), re = Q(a), d = Q(x), p = Q(n), b = Q(null);
|
|
3373
3373
|
de(() => {
|
|
3374
3374
|
ee.current = t, re.current = a, d.current = x, p.current = n;
|
|
3375
3375
|
});
|
|
@@ -3415,18 +3415,18 @@ const dn = ({
|
|
|
3415
3415
|
const ue = X.target.value;
|
|
3416
3416
|
w && ue.length > w || (C ? C(ue) : F(ue), r.onChange?.(X));
|
|
3417
3417
|
}, ce = () => {
|
|
3418
|
-
const X = C ? u :
|
|
3418
|
+
const X = C ? u : R;
|
|
3419
3419
|
X.trim() && !q && (T?.(X), C || F(""));
|
|
3420
3420
|
}, pe = (X) => {
|
|
3421
3421
|
(X.ctrlKey || X.metaKey) && X.key === "Enter" && (X.preventDefault(), ce()), r.onKeyDown?.(X);
|
|
3422
|
-
}, fe = C ? u :
|
|
3422
|
+
}, fe = C ? u : R, be = q || !fe.trim() || (w ? fe.length > w : !1);
|
|
3423
3423
|
return /* @__PURE__ */ Z("div", { style: { position: "relative", ...i }, children: [
|
|
3424
3424
|
/* @__PURE__ */ Z("div", { style: { position: "relative" }, children: [
|
|
3425
3425
|
/* @__PURE__ */ $(
|
|
3426
3426
|
"textarea",
|
|
3427
3427
|
{
|
|
3428
3428
|
ref: b,
|
|
3429
|
-
value: C ? u :
|
|
3429
|
+
value: C ? u : R,
|
|
3430
3430
|
onChange: se,
|
|
3431
3431
|
onFocus: (X) => {
|
|
3432
3432
|
X.target.style.borderColor = "#1890ff", X.target.style.boxShadow = "0 0 0 2px rgba(24, 144, 255, 0.2)", Y(X);
|
|
@@ -3661,15 +3661,15 @@ const rt = ({
|
|
|
3661
3661
|
}) => {
|
|
3662
3662
|
const a = Q(null), [f, m] = ne(!1), [v, x] = ne(!1), [V, E] = ne(!1), B = ae(() => {
|
|
3663
3663
|
a.current && (a.current.play(), m(!0), q?.());
|
|
3664
|
-
}, [q]),
|
|
3664
|
+
}, [q]), R = ae(() => {
|
|
3665
3665
|
a.current && (a.current.pause(), m(!1), y?.());
|
|
3666
3666
|
}, [y]), F = ae((L) => {
|
|
3667
|
-
L.stopPropagation(), f ?
|
|
3668
|
-
}, [f, B,
|
|
3667
|
+
L.stopPropagation(), f ? R() : B();
|
|
3668
|
+
}, [f, B, R]), W = ae(() => {
|
|
3669
3669
|
x(!0), w && !f && B();
|
|
3670
3670
|
}, [w, f, B]), H = ae(() => {
|
|
3671
|
-
x(!1), w && f &&
|
|
3672
|
-
}, [w, f,
|
|
3671
|
+
x(!1), w && f && R();
|
|
3672
|
+
}, [w, f, R]), ee = ae(() => {
|
|
3673
3673
|
E(!0), e?.();
|
|
3674
3674
|
}, [e]), re = ae(() => {
|
|
3675
3675
|
m(!0), q?.();
|
|
@@ -3681,7 +3681,7 @@ const rt = ({
|
|
|
3681
3681
|
k?.(L);
|
|
3682
3682
|
}, [k]);
|
|
3683
3683
|
return /* @__PURE__ */ $(
|
|
3684
|
-
|
|
3684
|
+
Ge,
|
|
3685
3685
|
{
|
|
3686
3686
|
...o,
|
|
3687
3687
|
className: `video-card ${r || ""}`,
|
|
@@ -3855,7 +3855,7 @@ const pn = (t) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mk
|
|
|
3855
3855
|
if (!k.current) return;
|
|
3856
3856
|
const a = e, f = k.current, v = (f.offsetWidth - l * (a - 1)) / a, x = new Array(a).fill(0);
|
|
3857
3857
|
t.forEach((E, B) => {
|
|
3858
|
-
const
|
|
3858
|
+
const R = E.id || B, F = y.current.get(R);
|
|
3859
3859
|
if (!F) return;
|
|
3860
3860
|
const W = Math.min(...x), H = x.indexOf(W), ee = H * (v + l), re = x[H];
|
|
3861
3861
|
F.style.position = "absolute", F.style.left = `${ee}px`, F.style.top = `${re}px`, F.style.width = `${v}px`, x[H] += F.offsetHeight + l;
|