@univerjs/docs-ui 0.14.0 → 0.15.0-insiders.20251227-453e4ff

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/lib/es/index.js CHANGED
@@ -2177,14 +2177,7 @@ function Vd(n, e, t) {
2177
2177
  const S = a[I];
2178
2178
  a.splice(I, 1), f += qo(o, m, S.startIndex);
2179
2179
  const v = r[S.blockId];
2180
- if (v)
2181
- switch (v.drawingType) {
2182
- case Nr.DRAWING_IMAGE: {
2183
- f += kd(v), p++;
2184
- break;
2185
- }
2186
- }
2187
- m = S.startIndex + 1, I = a.findIndex((R) => m <= R.startIndex && g >= R.startIndex);
2180
+ v && v.drawingType === Nr.DRAWING_IMAGE && (f += kd(v), p++), m = S.startIndex + 1, I = a.findIndex((R) => m <= R.startIndex && g >= R.startIndex);
2188
2181
  }
2189
2182
  return f = f + qo(o, m, g + 1), { sliceHtml: f, customBlockLength: p };
2190
2183
  };
@@ -2193,17 +2186,7 @@ function Vd(n, e, t) {
2193
2186
  const { startIndex: g, endIndex: f, rangeType: p, rangeId: m } = u, I = A(d, g);
2194
2187
  l += I.sliceHtml;
2195
2188
  const S = A(g, f + 1);
2196
- switch (p) {
2197
- case Lr.HYPERLINK: {
2198
- l += `<a data-rangeid="${m}" href="${(R = (v = u.properties) == null ? void 0 : v.url) != null ? R : ""}">${S.sliceHtml}</a>`;
2199
- break;
2200
- }
2201
- default: {
2202
- l += S.sliceHtml;
2203
- break;
2204
- }
2205
- }
2206
- d = f + 1 + (I.customBlockLength + S.customBlockLength);
2189
+ p === Lr.HYPERLINK ? l += `<a data-rangeid="${m}" href="${(R = (v = u.properties) == null ? void 0 : v.url) != null ? R : ""}">${S.sliceHtml}</a>` : l += S.sliceHtml, d = f + 1 + (I.customBlockLength + S.customBlockLength);
2207
2190
  });
2208
2191
  const h = A(d, t);
2209
2192
  return l += h.sliceHtml, l;
@@ -7600,22 +7583,13 @@ const Ts = {
7600
7583
  type: D.OPERATION,
7601
7584
  handler: async (n, e) => {
7602
7585
  const t = n.get(la), o = n.get(Ye);
7603
- switch (e.value) {
7604
- case "open":
7605
- t.open({
7606
- header: { title: o.t("headerFooter.panel") },
7607
- children: { label: vr },
7608
- onClose: () => {
7609
- },
7610
- width: 400
7611
- });
7612
- break;
7613
- case "close":
7614
- default:
7615
- t.close();
7616
- break;
7617
- }
7618
- return !0;
7586
+ return e.value === "open" ? t.open({
7587
+ header: { title: o.t("headerFooter.panel") },
7588
+ children: { label: vr },
7589
+ onClose: () => {
7590
+ },
7591
+ width: 400
7592
+ }) : t.close(), !0;
7619
7593
  }
7620
7594
  };
7621
7595
  function bi() {
package/lib/index.js CHANGED
@@ -2177,14 +2177,7 @@ function Vd(n, e, t) {
2177
2177
  const S = a[I];
2178
2178
  a.splice(I, 1), f += qo(o, m, S.startIndex);
2179
2179
  const v = r[S.blockId];
2180
- if (v)
2181
- switch (v.drawingType) {
2182
- case Nr.DRAWING_IMAGE: {
2183
- f += kd(v), p++;
2184
- break;
2185
- }
2186
- }
2187
- m = S.startIndex + 1, I = a.findIndex((R) => m <= R.startIndex && g >= R.startIndex);
2180
+ v && v.drawingType === Nr.DRAWING_IMAGE && (f += kd(v), p++), m = S.startIndex + 1, I = a.findIndex((R) => m <= R.startIndex && g >= R.startIndex);
2188
2181
  }
2189
2182
  return f = f + qo(o, m, g + 1), { sliceHtml: f, customBlockLength: p };
2190
2183
  };
@@ -2193,17 +2186,7 @@ function Vd(n, e, t) {
2193
2186
  const { startIndex: g, endIndex: f, rangeType: p, rangeId: m } = u, I = A(d, g);
2194
2187
  l += I.sliceHtml;
2195
2188
  const S = A(g, f + 1);
2196
- switch (p) {
2197
- case Lr.HYPERLINK: {
2198
- l += `<a data-rangeid="${m}" href="${(R = (v = u.properties) == null ? void 0 : v.url) != null ? R : ""}">${S.sliceHtml}</a>`;
2199
- break;
2200
- }
2201
- default: {
2202
- l += S.sliceHtml;
2203
- break;
2204
- }
2205
- }
2206
- d = f + 1 + (I.customBlockLength + S.customBlockLength);
2189
+ p === Lr.HYPERLINK ? l += `<a data-rangeid="${m}" href="${(R = (v = u.properties) == null ? void 0 : v.url) != null ? R : ""}">${S.sliceHtml}</a>` : l += S.sliceHtml, d = f + 1 + (I.customBlockLength + S.customBlockLength);
2207
2190
  });
2208
2191
  const h = A(d, t);
2209
2192
  return l += h.sliceHtml, l;
@@ -7600,22 +7583,13 @@ const Ts = {
7600
7583
  type: D.OPERATION,
7601
7584
  handler: async (n, e) => {
7602
7585
  const t = n.get(la), o = n.get(Ye);
7603
- switch (e.value) {
7604
- case "open":
7605
- t.open({
7606
- header: { title: o.t("headerFooter.panel") },
7607
- children: { label: vr },
7608
- onClose: () => {
7609
- },
7610
- width: 400
7611
- });
7612
- break;
7613
- case "close":
7614
- default:
7615
- t.close();
7616
- break;
7617
- }
7618
- return !0;
7586
+ return e.value === "open" ? t.open({
7587
+ header: { title: o.t("headerFooter.panel") },
7588
+ children: { label: vr },
7589
+ onClose: () => {
7590
+ },
7591
+ width: 400
7592
+ }) : t.close(), !0;
7619
7593
  }
7620
7594
  };
7621
7595
  function bi() {