@univerjs/core 1.0.0-alpha.0 → 1.0.0-alpha.1
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 +168 -15
- package/lib/es/index.js +165 -16
- package/lib/index.js +165 -16
- package/lib/types/docs/data-model/text-x/apply-utils/common.d.ts +3 -1
- package/lib/types/docs/data-model/text-x/utils.d.ts +2 -1
- package/lib/types/docs/data-model/types.d.ts +6 -0
- package/lib/types/index.d.ts +1 -1
- package/lib/types/types/interfaces/i-document-data.d.ts +43 -0
- package/lib/umd/index.js +11 -11
- package/package.json +4 -4
package/lib/cjs/index.js
CHANGED
|
@@ -640,10 +640,9 @@ function diffArrays(oneArray, twoArray) {
|
|
|
640
640
|
}
|
|
641
641
|
function diffObject(oneObject, twoObject) {
|
|
642
642
|
const oneKeys = Object.keys(oneObject);
|
|
643
|
-
|
|
644
|
-
if (oneKeys.length !== twoKeys.length) return false;
|
|
643
|
+
if (oneKeys.length !== Object.keys(twoObject).length) return false;
|
|
645
644
|
for (const key of oneKeys) {
|
|
646
|
-
if (!
|
|
645
|
+
if (!Object.prototype.propertyIsEnumerable.call(twoObject, key)) return false;
|
|
647
646
|
const oneValue = oneObject[key];
|
|
648
647
|
const twoValue = twoObject[key];
|
|
649
648
|
if (!isValueEqual(oneValue, twoValue)) return false;
|
|
@@ -787,11 +786,9 @@ var Tools = class Tools {
|
|
|
787
786
|
return clone;
|
|
788
787
|
}
|
|
789
788
|
if (this.isObject(value)) {
|
|
789
|
+
const source = value;
|
|
790
790
|
const clone = {};
|
|
791
|
-
Object.
|
|
792
|
-
const item = value[key];
|
|
793
|
-
clone[key] = Tools.deepClone(item);
|
|
794
|
-
});
|
|
791
|
+
for (const key in source) if (Object.prototype.hasOwnProperty.call(source, key)) clone[key] = Tools.deepClone(source[key]);
|
|
795
792
|
Object.setPrototypeOf(clone, Object.getPrototypeOf(value));
|
|
796
793
|
return clone;
|
|
797
794
|
}
|
|
@@ -2926,6 +2923,18 @@ function generateRandomId(n = 21, alphabet) {
|
|
|
2926
2923
|
|
|
2927
2924
|
//#endregion
|
|
2928
2925
|
//#region src/types/interfaces/i-document-data.ts
|
|
2926
|
+
/**
|
|
2927
|
+
* The top-level block types in a document body.
|
|
2928
|
+
* These block types are used to represent the structure of the document and can be used to identify different sections or elements within the document.
|
|
2929
|
+
*/
|
|
2930
|
+
let DocumentBlockType = /* @__PURE__ */ function(DocumentBlockType) {
|
|
2931
|
+
DocumentBlockType["PARAGRAPH"] = "paragraph";
|
|
2932
|
+
DocumentBlockType["BLOCK_RANGE"] = "blockRange";
|
|
2933
|
+
DocumentBlockType["TABLE"] = "table";
|
|
2934
|
+
DocumentBlockType["CUSTOM_BLOCK"] = "customBlock";
|
|
2935
|
+
DocumentBlockType["COLUMN_GROUP"] = "columnGroup";
|
|
2936
|
+
return DocumentBlockType;
|
|
2937
|
+
}({});
|
|
2929
2938
|
let DocStyleType = /* @__PURE__ */ function(DocStyleType) {
|
|
2930
2939
|
DocStyleType[DocStyleType["character"] = 0] = "character";
|
|
2931
2940
|
DocStyleType[DocStyleType["paragraph"] = 1] = "paragraph";
|
|
@@ -3204,6 +3213,16 @@ let TableTextWrapType = /* @__PURE__ */ function(TableTextWrapType) {
|
|
|
3204
3213
|
TableTextWrapType[TableTextWrapType["WRAP"] = 1] = "WRAP";
|
|
3205
3214
|
return TableTextWrapType;
|
|
3206
3215
|
}({});
|
|
3216
|
+
let ColumnLayoutType = /* @__PURE__ */ function(ColumnLayoutType) {
|
|
3217
|
+
ColumnLayoutType["FIXED"] = "fixed";
|
|
3218
|
+
ColumnLayoutType["AUTO"] = "auto";
|
|
3219
|
+
return ColumnLayoutType;
|
|
3220
|
+
}({});
|
|
3221
|
+
let ColumnResponsiveType = /* @__PURE__ */ function(ColumnResponsiveType) {
|
|
3222
|
+
ColumnResponsiveType["STACK"] = "stack";
|
|
3223
|
+
ColumnResponsiveType["SHRINK"] = "shrink";
|
|
3224
|
+
return ColumnResponsiveType;
|
|
3225
|
+
}({});
|
|
3207
3226
|
let TableRowHeightRule = /* @__PURE__ */ function(TableRowHeightRule) {
|
|
3208
3227
|
TableRowHeightRule[TableRowHeightRule["AUTO"] = 0] = "AUTO";
|
|
3209
3228
|
TableRowHeightRule[TableRowHeightRule["AT_LEAST"] = 1] = "AT_LEAST";
|
|
@@ -3823,6 +3842,7 @@ function getEmptySnapshot$1(unitID = generateRandomId(6), locale = "enUS", title
|
|
|
3823
3842
|
textRuns: [],
|
|
3824
3843
|
customBlocks: [],
|
|
3825
3844
|
tables: [],
|
|
3845
|
+
columnGroups: [],
|
|
3826
3846
|
blockRanges: [],
|
|
3827
3847
|
customRanges: [],
|
|
3828
3848
|
customDecorations: [],
|
|
@@ -9290,7 +9310,7 @@ var RefAlias = class {
|
|
|
9290
9310
|
setValue(key, attr, value) {
|
|
9291
9311
|
const item = this.getValue(key);
|
|
9292
9312
|
if (item) {
|
|
9293
|
-
if (Object.
|
|
9313
|
+
if (Object.prototype.hasOwnProperty.call(item, attr)) item[attr] = value;
|
|
9294
9314
|
}
|
|
9295
9315
|
}
|
|
9296
9316
|
deleteValue(key, keyGroup) {
|
|
@@ -9665,7 +9685,7 @@ function insertTables(body, insertBody, textLength, currentIndex) {
|
|
|
9665
9685
|
for (let i = 0, len = tables.length; i < len; i++) {
|
|
9666
9686
|
const table = tables[i];
|
|
9667
9687
|
const { startIndex, endIndex } = table;
|
|
9668
|
-
if (startIndex
|
|
9688
|
+
if (startIndex >= currentIndex) {
|
|
9669
9689
|
table.startIndex += textLength;
|
|
9670
9690
|
table.endIndex += textLength;
|
|
9671
9691
|
} else if (endIndex > currentIndex) table.endIndex += textLength;
|
|
@@ -9681,6 +9701,30 @@ function insertTables(body, insertBody, textLength, currentIndex) {
|
|
|
9681
9701
|
tables.sort(sortRulesFactory("startIndex"));
|
|
9682
9702
|
}
|
|
9683
9703
|
}
|
|
9704
|
+
function insertColumnGroups(body, insertBody, textLength, currentIndex) {
|
|
9705
|
+
var _insertBody$columnGro;
|
|
9706
|
+
if (!body.columnGroups && !((_insertBody$columnGro = insertBody.columnGroups) === null || _insertBody$columnGro === void 0 ? void 0 : _insertBody$columnGro.length)) return;
|
|
9707
|
+
if (!body.columnGroups) body.columnGroups = [];
|
|
9708
|
+
const { columnGroups } = body;
|
|
9709
|
+
for (let i = 0, len = columnGroups.length; i < len; i++) {
|
|
9710
|
+
const columnGroup = columnGroups[i];
|
|
9711
|
+
const { startIndex, endIndex } = columnGroup;
|
|
9712
|
+
if (startIndex >= currentIndex) {
|
|
9713
|
+
columnGroup.startIndex += textLength;
|
|
9714
|
+
columnGroup.endIndex += textLength;
|
|
9715
|
+
} else if (endIndex >= currentIndex) columnGroup.endIndex += textLength;
|
|
9716
|
+
}
|
|
9717
|
+
const insertColumnGroups = insertBody.columnGroups;
|
|
9718
|
+
if (insertColumnGroups) {
|
|
9719
|
+
for (let i = 0, len = insertColumnGroups.length; i < len; i++) {
|
|
9720
|
+
const columnGroup = insertColumnGroups[i];
|
|
9721
|
+
columnGroup.startIndex += currentIndex;
|
|
9722
|
+
columnGroup.endIndex += currentIndex;
|
|
9723
|
+
}
|
|
9724
|
+
columnGroups.push(...insertColumnGroups);
|
|
9725
|
+
columnGroups.sort(sortRulesFactory("startIndex"));
|
|
9726
|
+
}
|
|
9727
|
+
}
|
|
9684
9728
|
function insertBlockRanges(body, insertBody, textLength, currentIndex) {
|
|
9685
9729
|
var _insertBody$blockRang;
|
|
9686
9730
|
if (!body.blockRanges && !((_insertBody$blockRang = insertBody.blockRanges) === null || _insertBody$blockRang === void 0 ? void 0 : _insertBody$blockRang.length)) return;
|
|
@@ -10012,6 +10056,39 @@ function deleteTables(body, textLength, currentIndex) {
|
|
|
10012
10056
|
}
|
|
10013
10057
|
return removeTables;
|
|
10014
10058
|
}
|
|
10059
|
+
function deleteColumnGroups(body, textLength, currentIndex) {
|
|
10060
|
+
const { columnGroups } = body;
|
|
10061
|
+
const startIndex = currentIndex;
|
|
10062
|
+
const endIndex = currentIndex + textLength - 1;
|
|
10063
|
+
const removeColumnGroups = [];
|
|
10064
|
+
if (columnGroups) {
|
|
10065
|
+
const newColumnGroups = [];
|
|
10066
|
+
for (let i = 0, len = columnGroups.length; i < len; i++) {
|
|
10067
|
+
const columnGroup = columnGroups[i];
|
|
10068
|
+
const { startIndex: st, endIndex: ed } = columnGroup;
|
|
10069
|
+
if (startIndex <= st && endIndex >= ed) {
|
|
10070
|
+
removeColumnGroups.push({
|
|
10071
|
+
...columnGroup,
|
|
10072
|
+
startIndex: st - currentIndex,
|
|
10073
|
+
endIndex: ed - currentIndex
|
|
10074
|
+
});
|
|
10075
|
+
continue;
|
|
10076
|
+
} else if (st <= startIndex && ed >= endIndex) {
|
|
10077
|
+
const segments = horizontalLineSegmentsSubtraction(st, ed, startIndex, endIndex);
|
|
10078
|
+
if (segments.length === 0) continue;
|
|
10079
|
+
columnGroup.startIndex = segments[0];
|
|
10080
|
+
columnGroup.endIndex = segments[1];
|
|
10081
|
+
if (columnGroup.startIndex === columnGroup.endIndex) continue;
|
|
10082
|
+
} else if (endIndex < st) {
|
|
10083
|
+
columnGroup.startIndex -= textLength;
|
|
10084
|
+
columnGroup.endIndex -= textLength;
|
|
10085
|
+
}
|
|
10086
|
+
newColumnGroups.push(columnGroup);
|
|
10087
|
+
}
|
|
10088
|
+
body.columnGroups = newColumnGroups;
|
|
10089
|
+
}
|
|
10090
|
+
return removeColumnGroups;
|
|
10091
|
+
}
|
|
10015
10092
|
function deleteCustomRanges(body, textLength, currentIndex) {
|
|
10016
10093
|
const { customRanges } = body;
|
|
10017
10094
|
const startIndex = currentIndex;
|
|
@@ -10537,6 +10614,7 @@ function updateAttribute(body, updateBody, textLength, currentIndex, coverType)
|
|
|
10537
10614
|
sectionBreaks: updateSectionBreaks(body, updateBody, textLength, currentIndex, coverType),
|
|
10538
10615
|
customBlocks: updateCustomBlocks(body, updateBody, textLength, currentIndex, coverType),
|
|
10539
10616
|
tables: updateTables(body, updateBody, textLength, currentIndex, coverType),
|
|
10617
|
+
columnGroups: updateColumnGroups(body, updateBody, textLength, currentIndex, coverType),
|
|
10540
10618
|
blockRanges: updateBlockRanges(body, updateBody, textLength, currentIndex, coverType),
|
|
10541
10619
|
customRanges: updateCustomRanges(body, updateBody, textLength, currentIndex, coverType),
|
|
10542
10620
|
customDecorations: updateCustomDecorations(body, updateBody, textLength, currentIndex, coverType)
|
|
@@ -10783,6 +10861,38 @@ function updateTables(body, updateBody, textLength, currentIndex, coverType) {
|
|
|
10783
10861
|
insertTables(body, updateBody, textLength, currentIndex);
|
|
10784
10862
|
return removeTables;
|
|
10785
10863
|
}
|
|
10864
|
+
function updateColumnGroups(body, updateBody, textLength, currentIndex, coverType) {
|
|
10865
|
+
const { columnGroups } = body;
|
|
10866
|
+
const { columnGroups: updateDataColumnGroups } = updateBody;
|
|
10867
|
+
if (columnGroups == null || updateDataColumnGroups == null) return;
|
|
10868
|
+
const removeColumnGroups = deleteColumnGroups(body, textLength, currentIndex);
|
|
10869
|
+
if (coverType !== 1) {
|
|
10870
|
+
const newUpdateColumnGroups = [];
|
|
10871
|
+
for (const updateColumnGroup of updateDataColumnGroups) {
|
|
10872
|
+
const { startIndex: updateStartIndex, endIndex: updateEndIndex } = updateColumnGroup;
|
|
10873
|
+
let splitUpdateColumnGroups = [];
|
|
10874
|
+
for (const removeColumnGroup of removeColumnGroups) {
|
|
10875
|
+
const { startIndex: removeStartIndex, endIndex: removeEndIndex } = removeColumnGroup;
|
|
10876
|
+
if (removeStartIndex >= updateStartIndex && removeEndIndex <= updateEndIndex) {
|
|
10877
|
+
if (coverType === 0) splitUpdateColumnGroups.push({
|
|
10878
|
+
...removeColumnGroup,
|
|
10879
|
+
...updateColumnGroup
|
|
10880
|
+
});
|
|
10881
|
+
else splitUpdateColumnGroups.push({
|
|
10882
|
+
...updateColumnGroup,
|
|
10883
|
+
...removeColumnGroup
|
|
10884
|
+
});
|
|
10885
|
+
break;
|
|
10886
|
+
}
|
|
10887
|
+
}
|
|
10888
|
+
newUpdateColumnGroups.push(...splitUpdateColumnGroups);
|
|
10889
|
+
splitUpdateColumnGroups = [];
|
|
10890
|
+
}
|
|
10891
|
+
updateBody.columnGroups = newUpdateColumnGroups;
|
|
10892
|
+
}
|
|
10893
|
+
insertColumnGroups(body, updateBody, textLength, currentIndex);
|
|
10894
|
+
return removeColumnGroups;
|
|
10895
|
+
}
|
|
10786
10896
|
function updateBlockRanges(body, updateBody, textLength, currentIndex, coverType) {
|
|
10787
10897
|
const { blockRanges } = body;
|
|
10788
10898
|
const { blockRanges: updateDataBlockRanges } = updateBody;
|
|
@@ -10934,6 +11044,20 @@ function getBlockRangeSlice(body, startOffset, endOffset) {
|
|
|
10934
11044
|
}
|
|
10935
11045
|
return newBlockRanges;
|
|
10936
11046
|
}
|
|
11047
|
+
function getColumnGroupSlice(body, startOffset, endOffset) {
|
|
11048
|
+
const { columnGroups = [] } = body;
|
|
11049
|
+
const newColumnGroups = [];
|
|
11050
|
+
for (const columnGroup of columnGroups) {
|
|
11051
|
+
const clonedColumnGroup = Tools.deepClone(columnGroup);
|
|
11052
|
+
const { startIndex, endIndex } = clonedColumnGroup;
|
|
11053
|
+
if (startIndex >= startOffset && endIndex < endOffset) newColumnGroups.push({
|
|
11054
|
+
...clonedColumnGroup,
|
|
11055
|
+
startIndex: startIndex - startOffset,
|
|
11056
|
+
endIndex: endIndex - startOffset
|
|
11057
|
+
});
|
|
11058
|
+
}
|
|
11059
|
+
return newColumnGroups;
|
|
11060
|
+
}
|
|
10937
11061
|
function getParagraphsSlice(body, startOffset, endOffset, type = 1) {
|
|
10938
11062
|
const { paragraphs = [] } = body;
|
|
10939
11063
|
const newParagraphs = [];
|
|
@@ -10996,6 +11120,8 @@ function getBodySlice(body, startOffset, endOffset, returnEmptyArray = true, typ
|
|
|
10996
11120
|
if (newTables.length) docBody.tables = newTables;
|
|
10997
11121
|
const newBlockRanges = getBlockRangeSlice(body, startOffset, endOffset);
|
|
10998
11122
|
if (newBlockRanges.length) docBody.blockRanges = newBlockRanges;
|
|
11123
|
+
const newColumnGroups = getColumnGroupSlice(body, startOffset, endOffset);
|
|
11124
|
+
if (newColumnGroups.length) docBody.columnGroups = newColumnGroups;
|
|
10999
11125
|
docBody.paragraphs = getParagraphsSlice(body, startOffset, endOffset, type);
|
|
11000
11126
|
if (type === 1) {
|
|
11001
11127
|
const customDecorations = getCustomDecorationSlice(body, startOffset, endOffset);
|
|
@@ -11009,7 +11135,7 @@ function getBodySlice(body, startOffset, endOffset, returnEmptyArray = true, typ
|
|
|
11009
11135
|
return docBody;
|
|
11010
11136
|
}
|
|
11011
11137
|
function normalizeBody(body) {
|
|
11012
|
-
const { dataStream, textRuns, paragraphs, customRanges, customDecorations, tables, blockRanges } = body;
|
|
11138
|
+
const { dataStream, textRuns, paragraphs, customRanges, customDecorations, tables, columnGroups, blockRanges } = body;
|
|
11013
11139
|
let leftOffset = 0;
|
|
11014
11140
|
let rightOffset = 0;
|
|
11015
11141
|
customRanges === null || customRanges === void 0 || customRanges.forEach((range) => {
|
|
@@ -11040,6 +11166,10 @@ function normalizeBody(body) {
|
|
|
11040
11166
|
table.startIndex += leftOffset;
|
|
11041
11167
|
table.endIndex += rightOffset;
|
|
11042
11168
|
});
|
|
11169
|
+
columnGroups === null || columnGroups === void 0 || columnGroups.forEach((columnGroup) => {
|
|
11170
|
+
columnGroup.startIndex += leftOffset;
|
|
11171
|
+
columnGroup.endIndex += rightOffset;
|
|
11172
|
+
});
|
|
11043
11173
|
return {
|
|
11044
11174
|
...body,
|
|
11045
11175
|
dataStream: newData,
|
|
@@ -11048,6 +11178,7 @@ function normalizeBody(body) {
|
|
|
11048
11178
|
customRanges,
|
|
11049
11179
|
customDecorations,
|
|
11050
11180
|
tables,
|
|
11181
|
+
columnGroups,
|
|
11051
11182
|
blockRanges
|
|
11052
11183
|
};
|
|
11053
11184
|
}
|
|
@@ -11110,8 +11241,8 @@ function composeCustomDecorations(updateDataCustomDecorations, originCustomDecor
|
|
|
11110
11241
|
function composeBody(thisBody, otherBody, coverType = 0) {
|
|
11111
11242
|
if (otherBody.dataStream !== "") throw new Error("Cannot compose other body with non-empty dataStream");
|
|
11112
11243
|
const retBody = { dataStream: thisBody.dataStream };
|
|
11113
|
-
const { textRuns: thisTextRuns, paragraphs: thisParagraphs = [], customRanges: thisCustomRanges, customDecorations: thisCustomDecorations = [], blockRanges: thisBlockRanges = [] } = thisBody;
|
|
11114
|
-
const { textRuns: otherTextRuns, paragraphs: otherParagraphs = [], customRanges: otherCustomRanges, customDecorations: otherCustomDecorations = [], blockRanges: otherBlockRanges = [] } = otherBody;
|
|
11244
|
+
const { textRuns: thisTextRuns, paragraphs: thisParagraphs = [], customRanges: thisCustomRanges, customDecorations: thisCustomDecorations = [], columnGroups: thisColumnGroups = [], blockRanges: thisBlockRanges = [] } = thisBody;
|
|
11245
|
+
const { textRuns: otherTextRuns, paragraphs: otherParagraphs = [], customRanges: otherCustomRanges, customDecorations: otherCustomDecorations = [], columnGroups: otherColumnGroups = [], blockRanges: otherBlockRanges = [] } = otherBody;
|
|
11115
11246
|
retBody.textRuns = composeTextRuns(otherTextRuns, thisTextRuns, coverType);
|
|
11116
11247
|
retBody.customRanges = composeCustomRanges(otherCustomRanges, thisCustomRanges, coverType);
|
|
11117
11248
|
const customDecorations = composeCustomDecorations(otherCustomDecorations, thisCustomDecorations, coverType);
|
|
@@ -11141,6 +11272,8 @@ function composeBody(thisBody, otherBody, coverType = 0) {
|
|
|
11141
11272
|
if (paragraphs.length) retBody.paragraphs = paragraphs;
|
|
11142
11273
|
const blockRanges = composeDocumentBlockRanges(thisBlockRanges, otherBlockRanges);
|
|
11143
11274
|
if (blockRanges.length) retBody.blockRanges = blockRanges;
|
|
11275
|
+
const columnGroups = composeColumnGroups(thisColumnGroups, otherColumnGroups);
|
|
11276
|
+
if (columnGroups.length) retBody.columnGroups = columnGroups;
|
|
11144
11277
|
return retBody;
|
|
11145
11278
|
}
|
|
11146
11279
|
function composeDocumentBlockRanges(thisRanges, otherRanges) {
|
|
@@ -11150,11 +11283,18 @@ function composeDocumentBlockRanges(thisRanges, otherRanges) {
|
|
|
11150
11283
|
otherRanges.forEach((range) => byId.set(range.blockId, Tools.deepClone(range)));
|
|
11151
11284
|
return Array.from(byId.values()).sort((left, right) => left.startIndex - right.startIndex);
|
|
11152
11285
|
}
|
|
11286
|
+
function composeColumnGroups(thisRanges, otherRanges) {
|
|
11287
|
+
if (!thisRanges.length) return otherRanges;
|
|
11288
|
+
if (!otherRanges.length) return thisRanges;
|
|
11289
|
+
const byId = new Map(thisRanges.map((range) => [range.columnGroupId, Tools.deepClone(range)]));
|
|
11290
|
+
otherRanges.forEach((range) => byId.set(range.columnGroupId, Tools.deepClone(range)));
|
|
11291
|
+
return Array.from(byId.values()).sort((left, right) => left.startIndex - right.startIndex);
|
|
11292
|
+
}
|
|
11153
11293
|
function isUselessRetainAction(action) {
|
|
11154
11294
|
const { body } = action;
|
|
11155
11295
|
if (body == null) return true;
|
|
11156
|
-
const { textRuns, paragraphs, customRanges, customBlocks, customDecorations, tables, blockRanges } = body;
|
|
11157
|
-
if (textRuns == null && paragraphs == null && customRanges == null && customBlocks == null && customDecorations == null && tables == null && blockRanges == null) return true;
|
|
11296
|
+
const { textRuns, paragraphs, customRanges, customBlocks, customDecorations, tables, columnGroups, blockRanges } = body;
|
|
11297
|
+
if (textRuns == null && paragraphs == null && customRanges == null && customBlocks == null && customDecorations == null && tables == null && columnGroups == null && blockRanges == null) return true;
|
|
11158
11298
|
return false;
|
|
11159
11299
|
}
|
|
11160
11300
|
function getRichTextEditPath(docDataModel, segmentId = "") {
|
|
@@ -11257,6 +11397,7 @@ function updateAttributeByDelete(body, textLength, currentIndex) {
|
|
|
11257
11397
|
const removeSectionBreaks = deleteSectionBreaks(body, textLength, currentIndex);
|
|
11258
11398
|
const removeCustomBlocks = deleteCustomBlocks(body, textLength, currentIndex);
|
|
11259
11399
|
const removeTables = deleteTables(body, textLength, currentIndex);
|
|
11400
|
+
const removeColumnGroups = deleteColumnGroups(body, textLength, currentIndex);
|
|
11260
11401
|
const removeBlockRanges = deleteBlockRanges(body, textLength, currentIndex);
|
|
11261
11402
|
const removeCustomRanges = deleteCustomRanges(body, textLength, currentIndex);
|
|
11262
11403
|
const removeCustomDecorations = deleteCustomDecorations(body, textLength, currentIndex);
|
|
@@ -11272,6 +11413,7 @@ function updateAttributeByDelete(body, textLength, currentIndex) {
|
|
|
11272
11413
|
sectionBreaks: removeSectionBreaks,
|
|
11273
11414
|
customBlocks: removeCustomBlocks,
|
|
11274
11415
|
tables: removeTables,
|
|
11416
|
+
columnGroups: removeColumnGroups,
|
|
11275
11417
|
blockRanges: removeBlockRanges,
|
|
11276
11418
|
customRanges: removeCustomRanges,
|
|
11277
11419
|
customDecorations: removeCustomDecorations
|
|
@@ -11287,6 +11429,7 @@ function updateAttributeByInsert(body, insertBody, textLength, currentIndex) {
|
|
|
11287
11429
|
insertSectionBreaks(body, insertBody, textLength, currentIndex);
|
|
11288
11430
|
insertCustomBlocks(body, insertBody, textLength, currentIndex);
|
|
11289
11431
|
insertTables(body, insertBody, textLength, currentIndex);
|
|
11432
|
+
insertColumnGroups(body, insertBody, textLength, currentIndex);
|
|
11290
11433
|
insertBlockRanges(body, insertBody, textLength, currentIndex);
|
|
11291
11434
|
insertCustomRanges(body, insertBody, textLength, currentIndex);
|
|
11292
11435
|
insertCustomDecorations(body, insertBody, textLength, currentIndex);
|
|
@@ -11898,6 +12041,8 @@ let DataStreamTreeNodeType = /* @__PURE__ */ function(DataStreamTreeNodeType) {
|
|
|
11898
12041
|
DataStreamTreeNodeType["TABLE"] = "TABLE";
|
|
11899
12042
|
DataStreamTreeNodeType["TABLE_ROW"] = "TABLE_ROW";
|
|
11900
12043
|
DataStreamTreeNodeType["TABLE_CELL"] = "TABLE_CELL";
|
|
12044
|
+
DataStreamTreeNodeType["COLUMN_GROUP"] = "COLUMN_GROUP";
|
|
12045
|
+
DataStreamTreeNodeType["COLUMN"] = "COLUMN";
|
|
11901
12046
|
DataStreamTreeNodeType["BLOCK"] = "BLOCK";
|
|
11902
12047
|
DataStreamTreeNodeType["CUSTOM_BLOCK"] = "CUSTOM_BLOCK";
|
|
11903
12048
|
return DataStreamTreeNodeType;
|
|
@@ -11911,6 +12056,10 @@ let DataStreamTreeTokenType = /* @__PURE__ */ function(DataStreamTreeTokenType)
|
|
|
11911
12056
|
DataStreamTreeTokenType["TABLE_CELL_END"] = "";
|
|
11912
12057
|
DataStreamTreeTokenType["TABLE_ROW_END"] = "";
|
|
11913
12058
|
DataStreamTreeTokenType["TABLE_END"] = "";
|
|
12059
|
+
DataStreamTreeTokenType["COLUMN_GROUP_START"] = "";
|
|
12060
|
+
DataStreamTreeTokenType["COLUMN_START"] = "";
|
|
12061
|
+
DataStreamTreeTokenType["COLUMN_END"] = "";
|
|
12062
|
+
DataStreamTreeTokenType["COLUMN_GROUP_END"] = "";
|
|
11914
12063
|
DataStreamTreeTokenType["BLOCK_START"] = "";
|
|
11915
12064
|
DataStreamTreeTokenType["BLOCK_END"] = "";
|
|
11916
12065
|
/**
|
|
@@ -15601,7 +15750,7 @@ const IURLImageService = (0, _wendellhu_redi.createIdentifier)("core.url-image.s
|
|
|
15601
15750
|
//#endregion
|
|
15602
15751
|
//#region package.json
|
|
15603
15752
|
var name = "@univerjs/core";
|
|
15604
|
-
var version = "1.0.0-alpha.
|
|
15753
|
+
var version = "1.0.0-alpha.1";
|
|
15605
15754
|
|
|
15606
15755
|
//#endregion
|
|
15607
15756
|
//#region src/sheets/empty-snapshot.ts
|
|
@@ -20958,6 +21107,8 @@ exports.CellModeEnum = CellModeEnum;
|
|
|
20958
21107
|
exports.CellValueType = CellValueType;
|
|
20959
21108
|
exports.ColorKit = ColorKit;
|
|
20960
21109
|
exports.ColorType = ColorType;
|
|
21110
|
+
exports.ColumnLayoutType = ColumnLayoutType;
|
|
21111
|
+
exports.ColumnResponsiveType = ColumnResponsiveType;
|
|
20961
21112
|
exports.ColumnSeparatorType = ColumnSeparatorType;
|
|
20962
21113
|
Object.defineProperty(exports, 'CommandService', {
|
|
20963
21114
|
enumerable: true,
|
|
@@ -21023,6 +21174,7 @@ exports.Disposable = Disposable;
|
|
|
21023
21174
|
exports.DisposableCollection = DisposableCollection;
|
|
21024
21175
|
exports.DocStyleType = DocStyleType;
|
|
21025
21176
|
exports.DocumentBlockRangeType = DocumentBlockRangeType;
|
|
21177
|
+
exports.DocumentBlockType = DocumentBlockType;
|
|
21026
21178
|
exports.DocumentDataModel = DocumentDataModel;
|
|
21027
21179
|
exports.DocumentFlavor = DocumentFlavor;
|
|
21028
21180
|
exports.DrawingTypeEnum = DrawingTypeEnum;
|
|
@@ -21194,6 +21346,7 @@ exports.RANGE_DIRECTION = RANGE_DIRECTION;
|
|
|
21194
21346
|
exports.RANGE_TYPE = RANGE_TYPE;
|
|
21195
21347
|
exports.RBush = rbush.default;
|
|
21196
21348
|
exports.RCDisposable = RCDisposable;
|
|
21349
|
+
exports.RESTORE_INSERTED_PARAGRAPH_IDS = RESTORE_INSERTED_PARAGRAPH_IDS;
|
|
21197
21350
|
exports.RGBA_PAREN = RGBA_PAREN;
|
|
21198
21351
|
exports.RGB_PAREN = RGB_PAREN;
|
|
21199
21352
|
exports.ROTATE_BUFFER_VALUE = ROTATE_BUFFER_VALUE;
|