@ones-editor/editor 2.1.7-beta.31 → 2.1.7-beta.32
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/@ones-editor/tsconfig.tsbuildinfo +1 -1
- package/dist/index.js +23 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -73889,6 +73889,22 @@ ${content}
|
|
|
73889
73889
|
}
|
|
73890
73890
|
return colsWidth;
|
|
73891
73891
|
}
|
|
73892
|
+
function hasRowHeader(table) {
|
|
73893
|
+
const rows = table.rows;
|
|
73894
|
+
const firstRow = rows[0];
|
|
73895
|
+
if (!firstRow) {
|
|
73896
|
+
return false;
|
|
73897
|
+
}
|
|
73898
|
+
const cells = firstRow.cells;
|
|
73899
|
+
return Array.from(cells).every((cell) => cell.tagName === "TH");
|
|
73900
|
+
}
|
|
73901
|
+
function hasColHeader(table) {
|
|
73902
|
+
const rows = table.rows;
|
|
73903
|
+
return Array.from(rows).every((row) => {
|
|
73904
|
+
const cells = row.cells;
|
|
73905
|
+
return cells.length > 0 && cells[0].tagName === "TH";
|
|
73906
|
+
});
|
|
73907
|
+
}
|
|
73892
73908
|
function tableElementToBlock(table, options) {
|
|
73893
73909
|
var _a;
|
|
73894
73910
|
const grid = createGrid(table);
|
|
@@ -73939,6 +73955,8 @@ ${content}
|
|
|
73939
73955
|
if (children.length === 0) {
|
|
73940
73956
|
return [];
|
|
73941
73957
|
}
|
|
73958
|
+
const hasRowTitle = hasRowHeader(table);
|
|
73959
|
+
const hasColTitle = hasColHeader(table);
|
|
73942
73960
|
return [{
|
|
73943
73961
|
cols: grid.colCount,
|
|
73944
73962
|
rows: grid.rowCount,
|
|
@@ -73946,7 +73964,9 @@ ${content}
|
|
|
73946
73964
|
type: "table",
|
|
73947
73965
|
children,
|
|
73948
73966
|
...spanData,
|
|
73949
|
-
colsWidth
|
|
73967
|
+
colsWidth,
|
|
73968
|
+
hasRowTitle,
|
|
73969
|
+
hasColTitle
|
|
73950
73970
|
}];
|
|
73951
73971
|
}
|
|
73952
73972
|
function convertAllTables(node, options) {
|
|
@@ -89205,7 +89225,7 @@ ${data2.flowchartText}
|
|
|
89205
89225
|
}
|
|
89206
89226
|
}
|
|
89207
89227
|
});
|
|
89208
|
-
editor.version = "2.1.7-beta.
|
|
89228
|
+
editor.version = "2.1.7-beta.32";
|
|
89209
89229
|
return editor;
|
|
89210
89230
|
}
|
|
89211
89231
|
function isDoc(doc2) {
|
|
@@ -89319,7 +89339,7 @@ ${data2.flowchartText}
|
|
|
89319
89339
|
}
|
|
89320
89340
|
}
|
|
89321
89341
|
OnesEditorToolbar.register(editor);
|
|
89322
|
-
editor.version = "2.1.7-beta.
|
|
89342
|
+
editor.version = "2.1.7-beta.32";
|
|
89323
89343
|
return editor;
|
|
89324
89344
|
}
|
|
89325
89345
|
async function showDocVersions(editor, options, serverUrl) {
|