bi-components-library 1.3.2-next.28 → 1.3.2-next.29

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 CHANGED
@@ -24265,7 +24265,7 @@ function hp(e, t) {
24265
24265
  const h = l ?? "";
24266
24266
  Xe(() => {
24267
24267
  const D = u.current;
24268
- D && D.textContent !== h && (D.textContent = h);
24268
+ D && (h ? D.textContent !== h && (D.textContent = h) : D.innerHTML !== "" && (D.innerHTML = ""));
24269
24269
  }, [h]);
24270
24270
  const m = V(
24271
24271
  (D) => {
@@ -39350,61 +39350,75 @@ async function DI(e) {
39350
39350
  }
39351
39351
  function LI(e, t, n = /* @__PURE__ */ new Set()) {
39352
39352
  const r = [];
39353
- for (const l of e) {
39354
- if ((l.type === "markdown" || l.type === "markdown-name") && l.key) {
39355
- const i = t.markdownModules[l.key], s = n.has(l.key), o = !!i && i.length > 0;
39356
- if (l.type === "markdown-name") {
39357
- r.push(l), s && !o && r.push({
39353
+ let l = !1;
39354
+ for (const a of e) {
39355
+ if ((a.type === "markdown" || a.type === "markdown-name") && a.key) {
39356
+ const s = t.markdownModules[a.key], o = n.has(a.key), u = !!s && s.length > 0;
39357
+ if (a.type === "markdown-name") {
39358
+ r.push(a), o && !u && r.push({
39358
39359
  type: "text",
39359
39360
  className: "rte-markdown-parsing",
39360
39361
  text: "解析中...",
39361
- exclusionGroup: l.exclusionGroup
39362
- }), o && i.forEach((u, c) => {
39362
+ exclusionGroup: a.exclusionGroup
39363
+ }), u && (s.forEach((c, d) => {
39363
39364
  r.push({
39364
39365
  type: "markdown-module",
39365
- key: l.key,
39366
- moduleIndex: c,
39367
- text: u.title,
39366
+ key: a.key,
39367
+ moduleIndex: d,
39368
+ text: c.title,
39368
39369
  placeholder: "可编辑,内容不能为空",
39369
- exclusionGroup: l.exclusionGroup,
39370
- required: l.required
39370
+ exclusionGroup: a.exclusionGroup,
39371
+ required: a.required
39371
39372
  });
39372
- });
39373
+ }), l = !0);
39373
39374
  continue;
39374
39375
  }
39375
- if (s && !o) {
39376
+ if (o && !u) {
39376
39377
  r.push({
39377
39378
  type: "text",
39379
+ key: a.key,
39378
39380
  className: "rte-markdown-parsing",
39379
- text: "解析中..."
39381
+ text: "解析中...",
39382
+ exclusionGroup: a.exclusionGroup
39380
39383
  });
39381
39384
  continue;
39382
39385
  }
39383
- if (o) {
39384
- i.forEach((u, c) => {
39386
+ if (u) {
39387
+ s.forEach((c, d) => {
39385
39388
  r.push({
39386
39389
  type: "markdown-module",
39387
- key: l.key,
39388
- moduleIndex: c,
39389
- text: u.title,
39390
+ key: a.key,
39391
+ moduleIndex: d,
39392
+ text: c.title,
39390
39393
  placeholder: "可编辑,内容不能为空",
39391
- exclusionGroup: l.exclusionGroup,
39392
- required: l.required
39394
+ exclusionGroup: a.exclusionGroup,
39395
+ required: a.required
39393
39396
  });
39394
- });
39397
+ }), l = !0;
39395
39398
  continue;
39396
39399
  }
39397
- r.push(l);
39400
+ r.push(a);
39398
39401
  continue;
39399
39402
  }
39400
- r.push(l), l.type === "report-url" && l.key && t.reportModules[l.key] && t.reportModules[l.key].forEach((i, s) => {
39403
+ if (l) {
39404
+ if (a.type === "text" && a.text?.startsWith(`
39405
+ `)) {
39406
+ r.push({ ...a, text: a.text.slice(1) }), l = !1;
39407
+ continue;
39408
+ }
39409
+ if (a.exclusionGroup === "separator") {
39410
+ r.push(a);
39411
+ continue;
39412
+ }
39413
+ }
39414
+ r.push(a), a.type === "report-url" && a.key && t.reportModules[a.key] && t.reportModules[a.key].forEach((s, o) => {
39401
39415
  r.push({
39402
39416
  type: "report-module",
39403
- key: l.key,
39404
- moduleIndex: s,
39405
- text: i.title,
39406
- exclusionGroup: l.exclusionGroup,
39407
- required: l.required
39417
+ key: a.key,
39418
+ moduleIndex: o,
39419
+ text: s.title,
39420
+ exclusionGroup: a.exclusionGroup,
39421
+ required: a.required
39408
39422
  });
39409
39423
  });
39410
39424
  }