bi-components-library 1.3.2-next.27 → 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,43 +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 (s && !o) {
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({
39359
+ type: "text",
39360
+ className: "rte-markdown-parsing",
39361
+ text: "解析中...",
39362
+ exclusionGroup: a.exclusionGroup
39363
+ }), u && (s.forEach((c, d) => {
39364
+ r.push({
39365
+ type: "markdown-module",
39366
+ key: a.key,
39367
+ moduleIndex: d,
39368
+ text: c.title,
39369
+ placeholder: "可编辑,内容不能为空",
39370
+ exclusionGroup: a.exclusionGroup,
39371
+ required: a.required
39372
+ });
39373
+ }), l = !0);
39374
+ continue;
39375
+ }
39376
+ if (o && !u) {
39357
39377
  r.push({
39358
39378
  type: "text",
39379
+ key: a.key,
39359
39380
  className: "rte-markdown-parsing",
39360
- text: "解析中..."
39381
+ text: "解析中...",
39382
+ exclusionGroup: a.exclusionGroup
39361
39383
  });
39362
39384
  continue;
39363
39385
  }
39364
- if (o) {
39365
- i.forEach((u, c) => {
39386
+ if (u) {
39387
+ s.forEach((c, d) => {
39366
39388
  r.push({
39367
39389
  type: "markdown-module",
39368
- key: l.key,
39369
- moduleIndex: c,
39370
- text: u.title,
39390
+ key: a.key,
39391
+ moduleIndex: d,
39392
+ text: c.title,
39371
39393
  placeholder: "可编辑,内容不能为空",
39372
- // 模块继承父节点的互斥组 + 必填语义
39373
- exclusionGroup: l.exclusionGroup,
39374
- required: l.required
39394
+ exclusionGroup: a.exclusionGroup,
39395
+ required: a.required
39375
39396
  });
39376
- });
39397
+ }), l = !0;
39377
39398
  continue;
39378
39399
  }
39379
- r.push(l);
39400
+ r.push(a);
39380
39401
  continue;
39381
39402
  }
39382
- 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) => {
39383
39415
  r.push({
39384
39416
  type: "report-module",
39385
- key: l.key,
39386
- moduleIndex: s,
39387
- text: i.title,
39388
- exclusionGroup: l.exclusionGroup,
39389
- required: l.required
39417
+ key: a.key,
39418
+ moduleIndex: o,
39419
+ text: s.title,
39420
+ exclusionGroup: a.exclusionGroup,
39421
+ required: a.required
39390
39422
  });
39391
39423
  });
39392
39424
  }