@univerjs/engine-render 0.6.10 → 0.7.0-beta.0
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/cjs/index.js +1 -1
- package/lib/es/index.js +18 -18
- package/lib/index.js +18 -18
- package/lib/umd/index.js +1 -1
- package/package.json +5 -5
package/lib/es/index.js
CHANGED
|
@@ -35514,7 +35514,7 @@ class y0 {
|
|
|
35514
35514
|
k(this, "_context");
|
|
35515
35515
|
k(this, "_width", 0);
|
|
35516
35516
|
k(this, "_height", 0);
|
|
35517
|
-
t = t || {}, this._canvasEle = v7(), this._canvasEle.style.padding = "0", this._canvasEle.style.margin = "0", this._canvasEle.style.border = "0", this._canvasEle.style.background = "transparent", this._canvasEle.style.position = "absolute", this._canvasEle.style.top = "0", this._canvasEle.style.left = "0", this._canvasEle.style.zIndex = "8", this._canvasEle.
|
|
35517
|
+
t = t || {}, this._canvasEle = v7(), this._canvasEle.style.padding = "0", this._canvasEle.style.margin = "0", this._canvasEle.style.border = "0", this._canvasEle.style.background = "transparent", this._canvasEle.style.position = "absolute", this._canvasEle.style.top = "0", this._canvasEle.style.left = "0", this._canvasEle.style.zIndex = "8", this._canvasEle.dataset.uComp = "render-canvas", this._canvasEle.tabIndex = 1, this._canvasEle.style.touchAction = "none", this._canvasEle.style.outline = "0";
|
|
35518
35518
|
const e = this._canvasEle.getContext("2d");
|
|
35519
35519
|
if (e == null)
|
|
35520
35520
|
throw new Error("context is not support");
|
|
@@ -56155,36 +56155,36 @@ let X5 = class extends X8 {
|
|
|
56155
56155
|
* In Excel, for the border rendering of merged cells to take effect, the outermost cells need to have the same border style.
|
|
56156
56156
|
*/
|
|
56157
56157
|
_setMergeBorderProps(t, e, a) {
|
|
56158
|
-
var u;
|
|
56158
|
+
var u, d, g;
|
|
56159
56159
|
if (!this.worksheet || !e.border) return;
|
|
56160
56160
|
const s = [];
|
|
56161
56161
|
let n = a.startRow, i = a.endRow, o = a.startRow, l = a.startColumn;
|
|
56162
56162
|
t === K.TOP ? (o = a.startRow, n = a.startColumn, i = a.endColumn) : t === K.BOTTOM ? (o = a.endRow, n = a.startColumn, i = a.endColumn) : t === K.LEFT ? (l = a.startColumn, n = a.startRow, i = a.endRow) : t === K.RIGHT && (l = a.endColumn, n = a.startRow, i = a.endRow);
|
|
56163
|
-
for (let
|
|
56164
|
-
t === K.TOP || t === K.BOTTOM ? l =
|
|
56165
|
-
const
|
|
56166
|
-
if (!
|
|
56163
|
+
for (let c = n; c <= i; c++) {
|
|
56164
|
+
t === K.TOP || t === K.BOTTOM ? l = c : (t === K.LEFT || t === K.RIGHT) && (o = c);
|
|
56165
|
+
const h = this.worksheet.getCell(o, l);
|
|
56166
|
+
if (!h)
|
|
56167
56167
|
break;
|
|
56168
|
-
const
|
|
56169
|
-
if (!
|
|
56168
|
+
const p = (u = h.themeStyle) == null ? void 0 : u.bd, f = this._styles.getStyleByCell(h);
|
|
56169
|
+
if (!f && !p)
|
|
56170
56170
|
break;
|
|
56171
|
-
const
|
|
56172
|
-
if (
|
|
56173
|
-
const
|
|
56171
|
+
const m = (g = (d = f == null ? void 0 : f.bd) == null ? void 0 : d[t]) != null ? g : p == null ? void 0 : p[t];
|
|
56172
|
+
if (m) {
|
|
56173
|
+
const v = b3(m.cl) || L3;
|
|
56174
56174
|
s.push({
|
|
56175
56175
|
r: o,
|
|
56176
56176
|
c: l,
|
|
56177
|
-
style:
|
|
56178
|
-
color:
|
|
56177
|
+
style: m.s,
|
|
56178
|
+
color: v
|
|
56179
56179
|
});
|
|
56180
56180
|
}
|
|
56181
56181
|
}
|
|
56182
|
-
s.forEach((
|
|
56183
|
-
const { r:
|
|
56184
|
-
e.border.getValue(
|
|
56182
|
+
s.forEach((c) => {
|
|
56183
|
+
const { r: h, c: p, style: f, color: m } = c;
|
|
56184
|
+
e.border.getValue(h, p) || e.border.setValue(h, p, {}), e.border.getValue(h, p)[t] = {
|
|
56185
56185
|
type: t,
|
|
56186
|
-
style:
|
|
56187
|
-
color:
|
|
56186
|
+
style: f,
|
|
56187
|
+
color: m
|
|
56188
56188
|
};
|
|
56189
56189
|
});
|
|
56190
56190
|
}
|
package/lib/index.js
CHANGED
|
@@ -35514,7 +35514,7 @@ class y0 {
|
|
|
35514
35514
|
k(this, "_context");
|
|
35515
35515
|
k(this, "_width", 0);
|
|
35516
35516
|
k(this, "_height", 0);
|
|
35517
|
-
t = t || {}, this._canvasEle = v7(), this._canvasEle.style.padding = "0", this._canvasEle.style.margin = "0", this._canvasEle.style.border = "0", this._canvasEle.style.background = "transparent", this._canvasEle.style.position = "absolute", this._canvasEle.style.top = "0", this._canvasEle.style.left = "0", this._canvasEle.style.zIndex = "8", this._canvasEle.
|
|
35517
|
+
t = t || {}, this._canvasEle = v7(), this._canvasEle.style.padding = "0", this._canvasEle.style.margin = "0", this._canvasEle.style.border = "0", this._canvasEle.style.background = "transparent", this._canvasEle.style.position = "absolute", this._canvasEle.style.top = "0", this._canvasEle.style.left = "0", this._canvasEle.style.zIndex = "8", this._canvasEle.dataset.uComp = "render-canvas", this._canvasEle.tabIndex = 1, this._canvasEle.style.touchAction = "none", this._canvasEle.style.outline = "0";
|
|
35518
35518
|
const e = this._canvasEle.getContext("2d");
|
|
35519
35519
|
if (e == null)
|
|
35520
35520
|
throw new Error("context is not support");
|
|
@@ -56155,36 +56155,36 @@ let X5 = class extends X8 {
|
|
|
56155
56155
|
* In Excel, for the border rendering of merged cells to take effect, the outermost cells need to have the same border style.
|
|
56156
56156
|
*/
|
|
56157
56157
|
_setMergeBorderProps(t, e, a) {
|
|
56158
|
-
var u;
|
|
56158
|
+
var u, d, g;
|
|
56159
56159
|
if (!this.worksheet || !e.border) return;
|
|
56160
56160
|
const s = [];
|
|
56161
56161
|
let n = a.startRow, i = a.endRow, o = a.startRow, l = a.startColumn;
|
|
56162
56162
|
t === K.TOP ? (o = a.startRow, n = a.startColumn, i = a.endColumn) : t === K.BOTTOM ? (o = a.endRow, n = a.startColumn, i = a.endColumn) : t === K.LEFT ? (l = a.startColumn, n = a.startRow, i = a.endRow) : t === K.RIGHT && (l = a.endColumn, n = a.startRow, i = a.endRow);
|
|
56163
|
-
for (let
|
|
56164
|
-
t === K.TOP || t === K.BOTTOM ? l =
|
|
56165
|
-
const
|
|
56166
|
-
if (!
|
|
56163
|
+
for (let c = n; c <= i; c++) {
|
|
56164
|
+
t === K.TOP || t === K.BOTTOM ? l = c : (t === K.LEFT || t === K.RIGHT) && (o = c);
|
|
56165
|
+
const h = this.worksheet.getCell(o, l);
|
|
56166
|
+
if (!h)
|
|
56167
56167
|
break;
|
|
56168
|
-
const
|
|
56169
|
-
if (!
|
|
56168
|
+
const p = (u = h.themeStyle) == null ? void 0 : u.bd, f = this._styles.getStyleByCell(h);
|
|
56169
|
+
if (!f && !p)
|
|
56170
56170
|
break;
|
|
56171
|
-
const
|
|
56172
|
-
if (
|
|
56173
|
-
const
|
|
56171
|
+
const m = (g = (d = f == null ? void 0 : f.bd) == null ? void 0 : d[t]) != null ? g : p == null ? void 0 : p[t];
|
|
56172
|
+
if (m) {
|
|
56173
|
+
const v = b3(m.cl) || L3;
|
|
56174
56174
|
s.push({
|
|
56175
56175
|
r: o,
|
|
56176
56176
|
c: l,
|
|
56177
|
-
style:
|
|
56178
|
-
color:
|
|
56177
|
+
style: m.s,
|
|
56178
|
+
color: v
|
|
56179
56179
|
});
|
|
56180
56180
|
}
|
|
56181
56181
|
}
|
|
56182
|
-
s.forEach((
|
|
56183
|
-
const { r:
|
|
56184
|
-
e.border.getValue(
|
|
56182
|
+
s.forEach((c) => {
|
|
56183
|
+
const { r: h, c: p, style: f, color: m } = c;
|
|
56184
|
+
e.border.getValue(h, p) || e.border.setValue(h, p, {}), e.border.getValue(h, p)[t] = {
|
|
56185
56185
|
type: t,
|
|
56186
|
-
style:
|
|
56187
|
-
color:
|
|
56186
|
+
style: f,
|
|
56187
|
+
color: m
|
|
56188
56188
|
};
|
|
56189
56189
|
});
|
|
56190
56190
|
}
|