@univerjs/core 1.0.0-alpha.6 → 1.0.0-alpha.8
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/facade.js +6 -138
- package/lib/cjs/index.js +379 -510
- package/lib/es/facade.js +8 -134
- package/lib/es/index.js +372 -508
- package/lib/facade.js +8 -134
- package/lib/index.js +372 -508
- package/lib/types/bases/index.d.ts +1 -1
- package/lib/types/bases/typedef.d.ts +31 -0
- package/lib/types/docs/data-model/paragraph-style.d.ts +7 -1
- package/lib/types/docs/data-model/rich-text-builder.d.ts +11 -1
- package/lib/types/docs/data-model/text-x/build-utils/data-stream-change.d.ts +3 -3
- package/lib/types/docs/data-model/text-x/build-utils/index.d.ts +1 -1
- package/lib/types/docs/data-model/text-x/utils.d.ts +1 -0
- package/lib/types/docs/data-model/types.d.ts +0 -2
- package/lib/types/facade/f-univer.d.ts +1 -22
- package/lib/types/facade/index.d.ts +0 -1
- package/lib/types/index.d.ts +1 -0
- package/lib/types/services/context/context.d.ts +1 -2
- package/lib/types/services/instance/instance.service.d.ts +0 -8
- package/lib/types/services/region/region.service.d.ts +28 -0
- package/lib/types/shared/common.d.ts +0 -5
- package/lib/types/shared/object-matrix.d.ts +0 -14
- package/lib/types/shared/rectangle.d.ts +0 -15
- package/lib/types/shared/tools.d.ts +0 -2
- package/lib/types/sheets/sheet-skeleton.d.ts +2 -6
- package/lib/types/sheets/typedef.d.ts +0 -14
- package/lib/types/sheets/workbook.d.ts +0 -2
- package/lib/types/sheets/worksheet.d.ts +0 -6
- package/lib/types/types/const/page-size.d.ts +2 -0
- package/lib/types/types/enum/theme-color-type.d.ts +0 -4
- package/lib/types/types/interfaces/i-cell-custom-render.d.ts +0 -2
- package/lib/types/types/interfaces/i-document-data-interceptor.d.ts +2 -0
- package/lib/types/types/interfaces/i-document-data.d.ts +93 -12
- package/lib/types/types/interfaces/i-style-data.d.ts +43 -0
- package/lib/types/univer.d.ts +5 -0
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +21 -21
- package/package.json +4 -4
- package/lib/types/facade/f-hooks.d.ts +0 -74
package/lib/es/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BehaviorSubject, Observable, ReplaySubject, Subject, Subscription, combineLatest, debounceTime, distinctUntilChanged, filter, firstValueFrom, map, merge as merge$1, of, skip, take, tap, timer } from "rxjs";
|
|
1
|
+
import { BehaviorSubject, Observable, ReplaySubject, Subject, Subscription, combineLatest, debounceTime, distinctUntilChanged, filter, firstValueFrom, map, merge as merge$1, of, skip, take, takeWhile, tap, timer } from "rxjs";
|
|
2
2
|
import { ObjectScope, UnitRole, UniverType as UniverInstanceType } from "@univerjs/protocol";
|
|
3
3
|
import { debounceTime as debounceTime$1, filter as filter$1, first, map as map$1 } from "rxjs/operators";
|
|
4
4
|
import { Inject, Inject as Inject$1, InjectSelf, Injector, Injector as Injector$1, LookUp, Many, Optional, Quantity, RediError, Self, SkipSelf, WithNew, createIdentifier, createIdentifier as createIdentifier$1, forwardRef, isAsyncDependencyItem, isAsyncHook, isClassDependencyItem, isCtor, isDisposable, isFactoryDependencyItem, isValueDependencyItem, setDependencies } from "@wendellhu/redi";
|
|
@@ -123,7 +123,7 @@ function installShims() {
|
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
//#endregion
|
|
126
|
-
//#region \0@oxc-project+runtime@0.
|
|
126
|
+
//#region \0@oxc-project+runtime@0.140.0/helpers/esm/typeof.js
|
|
127
127
|
function _typeof(o) {
|
|
128
128
|
"@babel/helpers - typeof";
|
|
129
129
|
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
|
|
@@ -134,7 +134,7 @@ function _typeof(o) {
|
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
//#endregion
|
|
137
|
-
//#region \0@oxc-project+runtime@0.
|
|
137
|
+
//#region \0@oxc-project+runtime@0.140.0/helpers/esm/toPrimitive.js
|
|
138
138
|
function toPrimitive(t, r) {
|
|
139
139
|
if ("object" != _typeof(t) || !t) return t;
|
|
140
140
|
var e = t[Symbol.toPrimitive];
|
|
@@ -147,14 +147,14 @@ function toPrimitive(t, r) {
|
|
|
147
147
|
}
|
|
148
148
|
|
|
149
149
|
//#endregion
|
|
150
|
-
//#region \0@oxc-project+runtime@0.
|
|
150
|
+
//#region \0@oxc-project+runtime@0.140.0/helpers/esm/toPropertyKey.js
|
|
151
151
|
function toPropertyKey(t) {
|
|
152
152
|
var i = toPrimitive(t, "string");
|
|
153
153
|
return "symbol" == _typeof(i) ? i : i + "";
|
|
154
154
|
}
|
|
155
155
|
|
|
156
156
|
//#endregion
|
|
157
|
-
//#region \0@oxc-project+runtime@0.
|
|
157
|
+
//#region \0@oxc-project+runtime@0.140.0/helpers/esm/defineProperty.js
|
|
158
158
|
function _defineProperty(e, r, t) {
|
|
159
159
|
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
160
160
|
value: t,
|
|
@@ -683,76 +683,6 @@ var Tools = class Tools {
|
|
|
683
683
|
if (isIE11) return "IE11";
|
|
684
684
|
return "Unknown browser";
|
|
685
685
|
}
|
|
686
|
-
/** @deprecated This method is deprecated, please use `import { merge } from '@univerjs/core` instead */
|
|
687
|
-
static deepMerge(target, ...sources) {
|
|
688
|
-
sources.forEach((item) => item && deepItem(item));
|
|
689
|
-
function isDangerousKey(key) {
|
|
690
|
-
return key === "__proto__" || key === "constructor" || key === "prototype";
|
|
691
|
-
}
|
|
692
|
-
function deepArray(array, to) {
|
|
693
|
-
array.forEach((value, key) => {
|
|
694
|
-
if (typeof key === "string" && isDangerousKey(key)) return;
|
|
695
|
-
if (Tools.isArray(value)) {
|
|
696
|
-
var _to$key;
|
|
697
|
-
const origin = (_to$key = to[key]) !== null && _to$key !== void 0 ? _to$key : [];
|
|
698
|
-
to[key] = origin;
|
|
699
|
-
deepArray(value, origin);
|
|
700
|
-
return;
|
|
701
|
-
}
|
|
702
|
-
if (Tools.isObject(value)) {
|
|
703
|
-
var _to$key2;
|
|
704
|
-
const origin = (_to$key2 = to[key]) !== null && _to$key2 !== void 0 ? _to$key2 : {};
|
|
705
|
-
to[key] = origin;
|
|
706
|
-
deepObject(value, origin);
|
|
707
|
-
return;
|
|
708
|
-
}
|
|
709
|
-
to[key] = value;
|
|
710
|
-
});
|
|
711
|
-
}
|
|
712
|
-
function deepObject(object, to) {
|
|
713
|
-
Object.keys(object).forEach((key) => {
|
|
714
|
-
if (isDangerousKey(key)) return;
|
|
715
|
-
const value = object[key];
|
|
716
|
-
if (Tools.isObject(value)) {
|
|
717
|
-
var _to$key3;
|
|
718
|
-
const origin = (_to$key3 = to[key]) !== null && _to$key3 !== void 0 ? _to$key3 : {};
|
|
719
|
-
to[key] = origin;
|
|
720
|
-
deepObject(value, origin);
|
|
721
|
-
return;
|
|
722
|
-
}
|
|
723
|
-
if (Tools.isArray(value)) {
|
|
724
|
-
var _to$key4;
|
|
725
|
-
const origin = (_to$key4 = to[key]) !== null && _to$key4 !== void 0 ? _to$key4 : [];
|
|
726
|
-
to[key] = origin;
|
|
727
|
-
deepArray(value, origin);
|
|
728
|
-
return;
|
|
729
|
-
}
|
|
730
|
-
to[key] = value;
|
|
731
|
-
});
|
|
732
|
-
}
|
|
733
|
-
function deepItem(item) {
|
|
734
|
-
Object.keys(item).forEach((key) => {
|
|
735
|
-
if (isDangerousKey(key)) return;
|
|
736
|
-
const value = item[key];
|
|
737
|
-
if (Tools.isArray(value)) {
|
|
738
|
-
var _target$key;
|
|
739
|
-
const origin = (_target$key = target[key]) !== null && _target$key !== void 0 ? _target$key : [];
|
|
740
|
-
target[key] = origin;
|
|
741
|
-
deepArray(value, origin);
|
|
742
|
-
return;
|
|
743
|
-
}
|
|
744
|
-
if (Tools.isObject(value)) {
|
|
745
|
-
var _target$key2;
|
|
746
|
-
const origin = (_target$key2 = target[key]) !== null && _target$key2 !== void 0 ? _target$key2 : {};
|
|
747
|
-
target[key] = origin;
|
|
748
|
-
deepObject(value, origin);
|
|
749
|
-
return;
|
|
750
|
-
}
|
|
751
|
-
target[key] = value;
|
|
752
|
-
});
|
|
753
|
-
}
|
|
754
|
-
return target;
|
|
755
|
-
}
|
|
756
686
|
static diffValue(one, two) {
|
|
757
687
|
return isValueEqual(one, two);
|
|
758
688
|
}
|
|
@@ -1652,8 +1582,6 @@ let CellValueType = /* @__PURE__ */ function(CellValueType) {
|
|
|
1652
1582
|
*/
|
|
1653
1583
|
/**
|
|
1654
1584
|
* Theme color type enum
|
|
1655
|
-
*
|
|
1656
|
-
* @deprecated
|
|
1657
1585
|
*/
|
|
1658
1586
|
let ThemeColorType = /* @__PURE__ */ function(ThemeColorType) {
|
|
1659
1587
|
/**
|
|
@@ -1681,8 +1609,6 @@ let ThemeColorType = /* @__PURE__ */ function(ThemeColorType) {
|
|
|
1681
1609
|
}({});
|
|
1682
1610
|
/**
|
|
1683
1611
|
* Preset theme names.
|
|
1684
|
-
*
|
|
1685
|
-
* @deprecated
|
|
1686
1612
|
*/
|
|
1687
1613
|
let ThemeColors = /* @__PURE__ */ function(ThemeColors) {
|
|
1688
1614
|
ThemeColors["OFFICE"] = "Office";
|
|
@@ -1714,7 +1640,7 @@ let ThemeColors = /* @__PURE__ */ function(ThemeColors) {
|
|
|
1714
1640
|
//#endregion
|
|
1715
1641
|
//#region package.json
|
|
1716
1642
|
var name = "@univerjs/core";
|
|
1717
|
-
var version = "1.0.0-alpha.
|
|
1643
|
+
var version = "1.0.0-alpha.8";
|
|
1718
1644
|
|
|
1719
1645
|
//#endregion
|
|
1720
1646
|
//#region src/common/array.ts
|
|
@@ -2062,7 +1988,7 @@ function hashLogContent(...args) {
|
|
|
2062
1988
|
}
|
|
2063
1989
|
|
|
2064
1990
|
//#endregion
|
|
2065
|
-
//#region \0@oxc-project+runtime@0.
|
|
1991
|
+
//#region \0@oxc-project+runtime@0.140.0/helpers/esm/decorateParam.js
|
|
2066
1992
|
function __decorateParam(paramIndex, decorator) {
|
|
2067
1993
|
return function(target, key) {
|
|
2068
1994
|
decorator(target, key, paramIndex);
|
|
@@ -2070,7 +1996,7 @@ function __decorateParam(paramIndex, decorator) {
|
|
|
2070
1996
|
}
|
|
2071
1997
|
|
|
2072
1998
|
//#endregion
|
|
2073
|
-
//#region \0@oxc-project+runtime@0.
|
|
1999
|
+
//#region \0@oxc-project+runtime@0.140.0/helpers/esm/decorate.js
|
|
2074
2000
|
function __decorate(decorators, target, key, desc) {
|
|
2075
2001
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2076
2002
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -2431,17 +2357,7 @@ function fromCallback(callback) {
|
|
|
2431
2357
|
*/
|
|
2432
2358
|
function takeAfter(callback) {
|
|
2433
2359
|
return function complateAfter(source) {
|
|
2434
|
-
return
|
|
2435
|
-
source.subscribe({
|
|
2436
|
-
next: (v) => {
|
|
2437
|
-
subscriber.next(v);
|
|
2438
|
-
if (callback(v)) subscriber.complete();
|
|
2439
|
-
},
|
|
2440
|
-
complete: () => subscriber.complete(),
|
|
2441
|
-
error: (error) => subscriber.error(error)
|
|
2442
|
-
});
|
|
2443
|
-
return () => subscriber.unsubscribe();
|
|
2444
|
-
});
|
|
2360
|
+
return source.pipe(takeWhile((value) => !callback(value), true));
|
|
2445
2361
|
};
|
|
2446
2362
|
}
|
|
2447
2363
|
function bufferDebounceTime(time = 0) {
|
|
@@ -3383,12 +3299,13 @@ var ColorKit = class ColorKit {
|
|
|
3383
3299
|
const rgb2 = new ColorKit(color2).toRgb();
|
|
3384
3300
|
const alpha1 = (_rgb1$a = rgb1.a) !== null && _rgb1$a !== void 0 ? _rgb1$a : 1;
|
|
3385
3301
|
const alpha2 = (_rgb2$a = rgb2.a) !== null && _rgb2$a !== void 0 ? _rgb2$a : 1;
|
|
3386
|
-
|
|
3302
|
+
const rgba = {
|
|
3387
3303
|
r: (rgb2.r - rgb1.r) * amount + rgb1.r,
|
|
3388
3304
|
g: (rgb2.g - rgb1.g) * amount + rgb1.g,
|
|
3389
3305
|
b: (rgb2.b - rgb1.b) * amount + rgb1.b,
|
|
3390
3306
|
a: (alpha2 - alpha1) * amount + alpha1
|
|
3391
|
-
}
|
|
3307
|
+
};
|
|
3308
|
+
return new ColorKit(rgba);
|
|
3392
3309
|
}
|
|
3393
3310
|
static getContrastRatio(foreground, background) {
|
|
3394
3311
|
const lumA = new ColorKit(foreground).getLuminance();
|
|
@@ -3884,57 +3801,6 @@ let DOC_RANGE_TYPE = /* @__PURE__ */ function(DOC_RANGE_TYPE) {
|
|
|
3884
3801
|
DOC_RANGE_TYPE["TEXT"] = "TEXT";
|
|
3885
3802
|
return DOC_RANGE_TYPE;
|
|
3886
3803
|
}({});
|
|
3887
|
-
/**
|
|
3888
|
-
* Determines whether the cell(row, column) is within the range of the merged cells.
|
|
3889
|
-
* @deprecated please use worksheet.getCellInfoInMergeData instead
|
|
3890
|
-
*/
|
|
3891
|
-
function getCellInfoInMergeData(row, column, mergeData) {
|
|
3892
|
-
let isMerged = false;
|
|
3893
|
-
let isMergedMainCell = false;
|
|
3894
|
-
let newEndRow = row;
|
|
3895
|
-
let newEndColumn = column;
|
|
3896
|
-
let mergeRow = row;
|
|
3897
|
-
let mergeColumn = column;
|
|
3898
|
-
if (mergeData == null) return {
|
|
3899
|
-
actualRow: row,
|
|
3900
|
-
actualColumn: column,
|
|
3901
|
-
isMergedMainCell,
|
|
3902
|
-
isMerged,
|
|
3903
|
-
endRow: newEndRow,
|
|
3904
|
-
endColumn: newEndColumn,
|
|
3905
|
-
startRow: mergeRow,
|
|
3906
|
-
startColumn: mergeColumn
|
|
3907
|
-
};
|
|
3908
|
-
for (let i = 0; i < mergeData.length; i++) {
|
|
3909
|
-
const { startRow: startRowMarge, endRow: endRowMarge, startColumn: startColumnMarge, endColumn: endColumnMarge } = mergeData[i];
|
|
3910
|
-
if (row === startRowMarge && column === startColumnMarge) {
|
|
3911
|
-
newEndRow = endRowMarge;
|
|
3912
|
-
newEndColumn = endColumnMarge;
|
|
3913
|
-
mergeRow = startRowMarge;
|
|
3914
|
-
mergeColumn = startColumnMarge;
|
|
3915
|
-
isMergedMainCell = true;
|
|
3916
|
-
break;
|
|
3917
|
-
}
|
|
3918
|
-
if (row >= startRowMarge && row <= endRowMarge && column >= startColumnMarge && column <= endColumnMarge) {
|
|
3919
|
-
newEndRow = endRowMarge;
|
|
3920
|
-
newEndColumn = endColumnMarge;
|
|
3921
|
-
mergeRow = startRowMarge;
|
|
3922
|
-
mergeColumn = startColumnMarge;
|
|
3923
|
-
isMerged = true;
|
|
3924
|
-
break;
|
|
3925
|
-
}
|
|
3926
|
-
}
|
|
3927
|
-
return {
|
|
3928
|
-
actualRow: row,
|
|
3929
|
-
actualColumn: column,
|
|
3930
|
-
isMergedMainCell,
|
|
3931
|
-
isMerged,
|
|
3932
|
-
endRow: newEndRow,
|
|
3933
|
-
endColumn: newEndColumn,
|
|
3934
|
-
startRow: mergeRow,
|
|
3935
|
-
startColumn: mergeColumn
|
|
3936
|
-
};
|
|
3937
|
-
}
|
|
3938
3804
|
let CellModeEnum = /* @__PURE__ */ function(CellModeEnum) {
|
|
3939
3805
|
CellModeEnum["Raw"] = "raw";
|
|
3940
3806
|
CellModeEnum["Intercepted"] = "intercepted";
|
|
@@ -8022,24 +7888,15 @@ var ObjectMatrix = class ObjectMatrix {
|
|
|
8022
7888
|
const objectArray = this.getRowOrCreate(row);
|
|
8023
7889
|
objectArray[column] = value;
|
|
8024
7890
|
}
|
|
8025
|
-
|
|
8026
|
-
* !!
|
|
8027
|
-
* Please +1 ‘!’, who fell into this pit.
|
|
8028
|
-
* @deprecated use `realDelete` or `splice`
|
|
8029
|
-
*/
|
|
8030
|
-
deleteValue(row, column) {
|
|
7891
|
+
realDeleteValue(row, column) {
|
|
8031
7892
|
var _this$_matrix2;
|
|
8032
7893
|
(_this$_matrix2 = this._matrix) === null || _this$_matrix2 === void 0 || (_this$_matrix2 = _this$_matrix2[row]) === null || _this$_matrix2 === void 0 || delete _this$_matrix2[column];
|
|
8033
|
-
}
|
|
8034
|
-
realDeleteValue(row, column) {
|
|
8035
|
-
var _this$_matrix3;
|
|
8036
|
-
(_this$_matrix3 = this._matrix) === null || _this$_matrix3 === void 0 || (_this$_matrix3 = _this$_matrix3[row]) === null || _this$_matrix3 === void 0 || delete _this$_matrix3[column];
|
|
8037
7894
|
if (this.getRow(row)) {
|
|
8038
7895
|
const objectArray = this.getRow(row);
|
|
8039
7896
|
if (objectArray == null) return;
|
|
8040
7897
|
if (Object.keys(objectArray).length === 0) {
|
|
8041
|
-
var _this$
|
|
8042
|
-
(_this$
|
|
7898
|
+
var _this$_matrix3;
|
|
7899
|
+
(_this$_matrix3 = this._matrix) === null || _this$_matrix3 === void 0 || delete _this$_matrix3[row];
|
|
8043
7900
|
}
|
|
8044
7901
|
}
|
|
8045
7902
|
}
|
|
@@ -8238,23 +8095,10 @@ var ObjectMatrix = class ObjectMatrix {
|
|
|
8238
8095
|
});
|
|
8239
8096
|
return array;
|
|
8240
8097
|
}
|
|
8241
|
-
/**
|
|
8242
|
-
* @deprecated Use getMatrix as a substitute.
|
|
8243
|
-
*/
|
|
8244
|
-
toJSON() {
|
|
8245
|
-
return this._matrix;
|
|
8246
|
-
}
|
|
8247
8098
|
clone() {
|
|
8248
8099
|
const json = JSON.stringify(this._matrix);
|
|
8249
8100
|
return JSON.parse(json);
|
|
8250
8101
|
}
|
|
8251
|
-
/**
|
|
8252
|
-
* @deprecated Use clone as a substitute.
|
|
8253
|
-
*/
|
|
8254
|
-
getData() {
|
|
8255
|
-
const json = JSON.stringify(this._matrix);
|
|
8256
|
-
return JSON.parse(json);
|
|
8257
|
-
}
|
|
8258
8102
|
getArrayData() {
|
|
8259
8103
|
let startRow = 0;
|
|
8260
8104
|
let startColumn = 0;
|
|
@@ -8276,7 +8120,7 @@ var ObjectMatrix = class ObjectMatrix {
|
|
|
8276
8120
|
objectMatrix.setValue(rowIndex - startRow, columnIndex - startColumn, value);
|
|
8277
8121
|
});
|
|
8278
8122
|
});
|
|
8279
|
-
return objectMatrix.
|
|
8123
|
+
return objectMatrix.clone();
|
|
8280
8124
|
}
|
|
8281
8125
|
/**
|
|
8282
8126
|
* the function can only be used in all the row and column are positive integer
|
|
@@ -8422,10 +8266,6 @@ function convertCellToRange(cellInfo) {
|
|
|
8422
8266
|
endX
|
|
8423
8267
|
};
|
|
8424
8268
|
}
|
|
8425
|
-
/**
|
|
8426
|
-
* @deprecated use `convertCellToRange` instead
|
|
8427
|
-
*/
|
|
8428
|
-
const makeCellToSelection = convertCellToRange;
|
|
8429
8269
|
function makeCellRangeToRangeData(cellInfo) {
|
|
8430
8270
|
if (!cellInfo) return;
|
|
8431
8271
|
const { actualRow, actualColumn, isMerged, isMergedMainCell, startRow: mergeStartRow, startColumn: mergeStartColumn, endRow: mergeEndRow, endColumn: mergeEndColumn } = cellInfo;
|
|
@@ -9309,7 +9149,10 @@ function mergeLocales(...locales) {
|
|
|
9309
9149
|
|
|
9310
9150
|
//#endregion
|
|
9311
9151
|
//#region src/shared/lru/lru-map.ts
|
|
9312
|
-
let _Symbol$iterator
|
|
9152
|
+
let _Symbol$iterator;
|
|
9153
|
+
let _Symbol$iterator2;
|
|
9154
|
+
let _Symbol$iterator3;
|
|
9155
|
+
let _Symbol$iterator4;
|
|
9313
9156
|
const NEWER = Symbol("newer");
|
|
9314
9157
|
const OLDER = Symbol("older");
|
|
9315
9158
|
_Symbol$iterator = Symbol.iterator;
|
|
@@ -9814,6 +9657,11 @@ let CustomRangeType = /* @__PURE__ */ function(CustomRangeType) {
|
|
|
9814
9657
|
CustomRangeType[CustomRangeType["DELTED"] = 9999] = "DELTED";
|
|
9815
9658
|
return CustomRangeType;
|
|
9816
9659
|
}({});
|
|
9660
|
+
let DocxBreakType = /* @__PURE__ */ function(DocxBreakType) {
|
|
9661
|
+
DocxBreakType["COLUMN"] = "column";
|
|
9662
|
+
DocxBreakType["TEXT_WRAPPING"] = "textWrapping";
|
|
9663
|
+
return DocxBreakType;
|
|
9664
|
+
}({});
|
|
9817
9665
|
let CustomDecorationType = /* @__PURE__ */ function(CustomDecorationType) {
|
|
9818
9666
|
CustomDecorationType[CustomDecorationType["COMMENT"] = 0] = "COMMENT";
|
|
9819
9667
|
CustomDecorationType[CustomDecorationType["DELETED"] = 9999] = "DELETED";
|
|
@@ -9846,9 +9694,10 @@ let GridType = /* @__PURE__ */ function(GridType) {
|
|
|
9846
9694
|
let SectionType = /* @__PURE__ */ function(SectionType) {
|
|
9847
9695
|
SectionType[SectionType["SECTION_TYPE_UNSPECIFIED"] = 0] = "SECTION_TYPE_UNSPECIFIED";
|
|
9848
9696
|
SectionType[SectionType["CONTINUOUS"] = 1] = "CONTINUOUS";
|
|
9849
|
-
SectionType[SectionType["
|
|
9850
|
-
SectionType[SectionType["
|
|
9851
|
-
SectionType[SectionType["
|
|
9697
|
+
SectionType[SectionType["NEXT_COLUMN"] = 2] = "NEXT_COLUMN";
|
|
9698
|
+
SectionType[SectionType["NEXT_PAGE"] = 3] = "NEXT_PAGE";
|
|
9699
|
+
SectionType[SectionType["EVEN_PAGE"] = 4] = "EVEN_PAGE";
|
|
9700
|
+
SectionType[SectionType["ODD_PAGE"] = 5] = "ODD_PAGE";
|
|
9852
9701
|
return SectionType;
|
|
9853
9702
|
}({});
|
|
9854
9703
|
/**
|
|
@@ -9893,15 +9742,25 @@ let WrapTextType = /* @__PURE__ */ function(WrapTextType) {
|
|
|
9893
9742
|
return WrapTextType;
|
|
9894
9743
|
}({});
|
|
9895
9744
|
/**
|
|
9896
|
-
*
|
|
9745
|
+
* Controls how a positioned object participates in document text layout.
|
|
9746
|
+
*
|
|
9747
|
+
* `WRAP_NONE` does not by itself determine whether the object is in front of or behind text. Drawing data uses
|
|
9748
|
+
* `behindDoc` for that stacking choice.
|
|
9897
9749
|
*/
|
|
9898
9750
|
let PositionedObjectLayoutType = /* @__PURE__ */ function(PositionedObjectLayoutType) {
|
|
9751
|
+
/** Places the object in the text flow like a character and lets it affect the containing line's metrics. */
|
|
9899
9752
|
PositionedObjectLayoutType[PositionedObjectLayoutType["INLINE"] = 0] = "INLINE";
|
|
9753
|
+
/** Floats the object without reflowing text. The object and text can overlap. */
|
|
9900
9754
|
PositionedObjectLayoutType[PositionedObjectLayoutType["WRAP_NONE"] = 1] = "WRAP_NONE";
|
|
9755
|
+
/** Floats the object and wraps text around the custom polygon defined by its wrap path. */
|
|
9901
9756
|
PositionedObjectLayoutType[PositionedObjectLayoutType["WRAP_POLYGON"] = 2] = "WRAP_POLYGON";
|
|
9757
|
+
/** Floats the object and wraps text around its rectangular bounds. */
|
|
9902
9758
|
PositionedObjectLayoutType[PositionedObjectLayoutType["WRAP_SQUARE"] = 3] = "WRAP_SQUARE";
|
|
9759
|
+
/** Floats the object and allows text to flow through eligible open regions in its wrap contour. */
|
|
9903
9760
|
PositionedObjectLayoutType[PositionedObjectLayoutType["WRAP_THROUGH"] = 4] = "WRAP_THROUGH";
|
|
9761
|
+
/** Floats the object and wraps text closely around its contour instead of its rectangular bounds. */
|
|
9904
9762
|
PositionedObjectLayoutType[PositionedObjectLayoutType["WRAP_TIGHT"] = 5] = "WRAP_TIGHT";
|
|
9763
|
+
/** Floats the object in a horizontal band, leaving text only above and below it. */
|
|
9905
9764
|
PositionedObjectLayoutType[PositionedObjectLayoutType["WRAP_TOP_AND_BOTTOM"] = 6] = "WRAP_TOP_AND_BOTTOM";
|
|
9906
9765
|
return PositionedObjectLayoutType;
|
|
9907
9766
|
}({});
|
|
@@ -10539,6 +10398,8 @@ const MODERN_DOCUMENT_WIDTH = {
|
|
|
10539
10398
|
["wide"]: PAGE_SIZE["A3"].width
|
|
10540
10399
|
};
|
|
10541
10400
|
const MODERN_DOCUMENT_DEFAULT_MARGIN = 50 / .75;
|
|
10401
|
+
/** Default margin for a paginated Traditional document, in 96-DPI layout pixels. */
|
|
10402
|
+
const TRADITIONAL_DOCUMENT_DEFAULT_MARGIN = 72;
|
|
10542
10403
|
|
|
10543
10404
|
//#endregion
|
|
10544
10405
|
//#region src/sheets/range.ts
|
|
@@ -10727,7 +10588,7 @@ var Range = class Range {
|
|
|
10727
10588
|
*/
|
|
10728
10589
|
getObjectValues(options = {}) {
|
|
10729
10590
|
const { startRow, endRow, startColumn, endColumn } = this._range;
|
|
10730
|
-
const values = this._worksheet.getCellMatrix().getFragment(startRow, endRow, startColumn, endColumn).
|
|
10591
|
+
const values = this._worksheet.getCellMatrix().getFragment(startRow, endRow, startColumn, endColumn).clone();
|
|
10731
10592
|
if (options.isIncludeStyle) {
|
|
10732
10593
|
const style = this._deps.getStyles();
|
|
10733
10594
|
for (let r = 0; r <= endRow - startRow; r++) for (let c = 0; c <= endColumn - startColumn; c++) {
|
|
@@ -11483,52 +11344,6 @@ var Rectangle = class Rectangle {
|
|
|
11483
11344
|
}).length > 0);
|
|
11484
11345
|
}
|
|
11485
11346
|
/**
|
|
11486
|
-
* Gets the intersection range between two ranges
|
|
11487
|
-
* @param src
|
|
11488
|
-
* @param target
|
|
11489
|
-
* @deprecated use `getIntersectRange` instead
|
|
11490
|
-
* @example
|
|
11491
|
-
* ```typescript
|
|
11492
|
-
* const range1 = { startRow: 0, startColumn: 0, endRow: 2, endColumn: 2 };
|
|
11493
|
-
* const range2 = { startRow: 1, startColumn: 1, endRow: 3, endColumn: 3 };
|
|
11494
|
-
* const intersection = Rectangle.getIntersects(range1, range2);
|
|
11495
|
-
* // intersection = { startRow: 1, startColumn: 1, endRow: 2, endColumn: 2 }
|
|
11496
|
-
* ```
|
|
11497
|
-
*/
|
|
11498
|
-
static getIntersects(src, target) {
|
|
11499
|
-
const currentStartRow = src.startRow;
|
|
11500
|
-
const currentEndRow = src.endRow;
|
|
11501
|
-
const currentStartColumn = src.startColumn;
|
|
11502
|
-
const currentEndColumn = src.endColumn;
|
|
11503
|
-
const incomingStartRow = target.startRow;
|
|
11504
|
-
const incomingEndRow = target.endRow;
|
|
11505
|
-
const incomingStartColumn = target.startColumn;
|
|
11506
|
-
const incomingEndColumn = target.endColumn;
|
|
11507
|
-
let startColumn;
|
|
11508
|
-
let startRow;
|
|
11509
|
-
let endColumn;
|
|
11510
|
-
let endRow;
|
|
11511
|
-
if (incomingStartRow <= currentEndRow) if (incomingStartRow >= currentStartRow) startRow = incomingStartRow;
|
|
11512
|
-
else startRow = currentStartRow;
|
|
11513
|
-
else return null;
|
|
11514
|
-
if (incomingEndRow >= currentStartRow) if (incomingEndRow >= currentEndRow) endRow = currentEndRow;
|
|
11515
|
-
else endRow = incomingEndRow;
|
|
11516
|
-
else return null;
|
|
11517
|
-
if (incomingStartColumn <= currentEndColumn) if (incomingStartColumn > currentStartColumn) startColumn = incomingStartColumn;
|
|
11518
|
-
else startColumn = currentStartColumn;
|
|
11519
|
-
else return null;
|
|
11520
|
-
if (incomingEndColumn >= currentStartColumn) if (incomingEndColumn >= currentEndColumn) endColumn = currentEndColumn;
|
|
11521
|
-
else endColumn = incomingEndColumn;
|
|
11522
|
-
else return null;
|
|
11523
|
-
return {
|
|
11524
|
-
startRow,
|
|
11525
|
-
endRow,
|
|
11526
|
-
startColumn,
|
|
11527
|
-
endColumn,
|
|
11528
|
-
rangeType: 0
|
|
11529
|
-
};
|
|
11530
|
-
}
|
|
11531
|
-
/**
|
|
11532
11347
|
* Checks if one range completely contains another range
|
|
11533
11348
|
* @param src
|
|
11534
11349
|
* @param target
|
|
@@ -12977,7 +12792,8 @@ const blackLuminance = getLuminance(black.r, black.g, black.b);
|
|
|
12977
12792
|
* @returns The inverted color.
|
|
12978
12793
|
*/
|
|
12979
12794
|
function invertNormalizedColorByHSL(color) {
|
|
12980
|
-
const
|
|
12795
|
+
const originalLuminance = getLuminance(color[0], color[1], color[2]);
|
|
12796
|
+
const originalContrast = getContrastRatio(whiteLuminance, originalLuminance);
|
|
12981
12797
|
const hsl = rgbToHsl(color);
|
|
12982
12798
|
let l = 1 - hsl[2];
|
|
12983
12799
|
let newColor, newLuminance, newContrast;
|
|
@@ -13204,16 +13020,24 @@ var RegistryAsMap = class RegistryAsMap {
|
|
|
13204
13020
|
function requestImmediateMacroTask(callback) {
|
|
13205
13021
|
const channel = new MessageChannel();
|
|
13206
13022
|
let cancelled = false;
|
|
13023
|
+
const close = () => {
|
|
13024
|
+
channel.port1.onmessage = null;
|
|
13025
|
+
channel.port1.close();
|
|
13026
|
+
channel.port2.close();
|
|
13027
|
+
};
|
|
13207
13028
|
const handler = () => {
|
|
13208
|
-
if (!cancelled)
|
|
13029
|
+
if (!cancelled) {
|
|
13030
|
+
cancelled = true;
|
|
13031
|
+
close();
|
|
13032
|
+
callback();
|
|
13033
|
+
}
|
|
13209
13034
|
};
|
|
13210
13035
|
channel.port1.onmessage = handler;
|
|
13211
13036
|
channel.port2.postMessage(null);
|
|
13212
13037
|
return () => {
|
|
13038
|
+
if (cancelled) return;
|
|
13213
13039
|
cancelled = true;
|
|
13214
|
-
|
|
13215
|
-
channel.port1.close();
|
|
13216
|
-
channel.port2.close();
|
|
13040
|
+
close();
|
|
13217
13041
|
};
|
|
13218
13042
|
}
|
|
13219
13043
|
|
|
@@ -13452,10 +13276,6 @@ let DataStreamTreeTokenType = /* @__PURE__ */ function(DataStreamTreeTokenType)
|
|
|
13452
13276
|
DataStreamTreeTokenType["SPACE"] = " ";
|
|
13453
13277
|
return DataStreamTreeTokenType;
|
|
13454
13278
|
}({});
|
|
13455
|
-
/** Wrap your stream in a pair of custom range tokens. */
|
|
13456
|
-
function makeCustomRangeStream(stream) {
|
|
13457
|
-
return `${stream}`;
|
|
13458
|
-
}
|
|
13459
13279
|
|
|
13460
13280
|
//#endregion
|
|
13461
13281
|
//#region src/docs/data-model/text-x/build-utils/range-interval.ts
|
|
@@ -15801,7 +15621,7 @@ function composeBody(thisBody, otherBody, coverType = 0) {
|
|
|
15801
15621
|
const { startIndex: thisStart } = thisParagraph;
|
|
15802
15622
|
const { startIndex: otherStart } = otherParagraph;
|
|
15803
15623
|
if (thisStart === otherStart) {
|
|
15804
|
-
paragraphs.push(
|
|
15624
|
+
paragraphs.push(merge(thisParagraph, otherParagraph));
|
|
15805
15625
|
thisIndex++;
|
|
15806
15626
|
otherIndex++;
|
|
15807
15627
|
} else if (thisStart < otherStart) {
|
|
@@ -16244,7 +16064,7 @@ function transformBlockRanges(thisBlockRanges, otherBlockRanges, priority) {
|
|
|
16244
16064
|
if (!otherBlockRanges.length) return [];
|
|
16245
16065
|
return otherBlockRanges.map((otherBlockRange) => {
|
|
16246
16066
|
const thisBlockRange = thisBlockRanges.find((blockRange) => blockRange.blockId === otherBlockRange.blockId);
|
|
16247
|
-
return thisBlockRange && priority ?
|
|
16067
|
+
return thisBlockRange && priority ? merge(otherBlockRange, thisBlockRange) : otherBlockRange;
|
|
16248
16068
|
});
|
|
16249
16069
|
}
|
|
16250
16070
|
|
|
@@ -16887,16 +16707,37 @@ var DocumentDataModel = class DocumentDataModel extends DocumentDataModelSimple
|
|
|
16887
16707
|
//#region src/docs/data-model/paragraph-style.ts
|
|
16888
16708
|
function _definedStyle(style) {
|
|
16889
16709
|
if (style == null) return {};
|
|
16890
|
-
|
|
16710
|
+
const definedStyle = Tools.deepClone(style);
|
|
16711
|
+
Tools.removeNull(definedStyle);
|
|
16712
|
+
return definedStyle;
|
|
16713
|
+
}
|
|
16714
|
+
function _resolveNamedParagraphStyle(styles, styleId) {
|
|
16715
|
+
if (!styles || !styleId) return {};
|
|
16716
|
+
const visiting = /* @__PURE__ */ new Set();
|
|
16717
|
+
const resolve = (currentStyleId) => {
|
|
16718
|
+
if (visiting.has(currentStyleId)) return {};
|
|
16719
|
+
const style = styles[currentStyleId];
|
|
16720
|
+
if (!style || style.type !== 1) return {};
|
|
16721
|
+
visiting.add(currentStyleId);
|
|
16722
|
+
const base = style.basedOn ? resolve(style.basedOn) : {};
|
|
16723
|
+
visiting.delete(currentStyleId);
|
|
16724
|
+
return {
|
|
16725
|
+
...base,
|
|
16726
|
+
..._definedStyle(style.paragraphStyle)
|
|
16727
|
+
};
|
|
16728
|
+
};
|
|
16729
|
+
return resolve(styleId);
|
|
16891
16730
|
}
|
|
16892
16731
|
function resolveDocumentParagraphStyle(documentStyle, paragraphStyle, options = {}) {
|
|
16893
|
-
var _options$useLegacyMod;
|
|
16732
|
+
var _options$useLegacyMod, _definedParagraphStyl;
|
|
16733
|
+
const legacyStyle = ((_options$useLegacyMod = options.useLegacyModernDefaults) !== null && _options$useLegacyMod !== void 0 ? _options$useLegacyMod : (documentStyle === null || documentStyle === void 0 ? void 0 : documentStyle.documentFlavor) === 2) ? {
|
|
16734
|
+
lineSpacing: DEFAULT_DOCUMENT_PARAGRAPH_LINE_SPACING,
|
|
16735
|
+
spaceAbove: { v: 0 },
|
|
16736
|
+
spaceBelow: { v: 12 }
|
|
16737
|
+
} : {};
|
|
16894
16738
|
const documentDefaults = {
|
|
16895
|
-
...(
|
|
16896
|
-
|
|
16897
|
-
spaceAbove: { v: 0 },
|
|
16898
|
-
spaceBelow: { v: 12 }
|
|
16899
|
-
} : {},
|
|
16739
|
+
...(documentStyle === null || documentStyle === void 0 ? void 0 : documentStyle.documentFlavor) === 1 ? { widowControl: 1 } : {},
|
|
16740
|
+
...legacyStyle,
|
|
16900
16741
|
..._definedStyle(documentStyle === null || documentStyle === void 0 ? void 0 : documentStyle.defaultParagraphStyle)
|
|
16901
16742
|
};
|
|
16902
16743
|
if (options.excludeDocumentOuterSpacing) {
|
|
@@ -16904,10 +16745,13 @@ function resolveDocumentParagraphStyle(documentStyle, paragraphStyle, options =
|
|
|
16904
16745
|
delete documentDefaults.spaceBelow;
|
|
16905
16746
|
}
|
|
16906
16747
|
const definedParagraphStyle = _definedStyle(paragraphStyle);
|
|
16907
|
-
const
|
|
16748
|
+
const referencedParagraphStyle = _resolveNamedParagraphStyle(options.styles, options.paragraphStyleId);
|
|
16749
|
+
const namedStyleType = (_definedParagraphStyl = definedParagraphStyle.namedStyleType) !== null && _definedParagraphStyl !== void 0 ? _definedParagraphStyl : referencedParagraphStyle.namedStyleType;
|
|
16750
|
+
const namedStyle = namedStyleType == null ? null : NAMED_STYLE_SPACE_MAP[namedStyleType];
|
|
16908
16751
|
return Tools.deepClone({
|
|
16909
16752
|
...documentDefaults,
|
|
16910
16753
|
...namedStyle,
|
|
16754
|
+
...referencedParagraphStyle,
|
|
16911
16755
|
...definedParagraphStyle
|
|
16912
16756
|
});
|
|
16913
16757
|
}
|
|
@@ -17628,10 +17472,10 @@ function buildDrawingInsertBody(body, drawings, insertOffset) {
|
|
|
17628
17472
|
//#endregion
|
|
17629
17473
|
//#region src/docs/data-model/text-x/build-utils/data-stream-change.ts
|
|
17630
17474
|
/**
|
|
17631
|
-
* Finds one contiguous dataStream change. Pure structural insertions
|
|
17632
|
-
* anchored by their
|
|
17475
|
+
* Finds one contiguous dataStream change. Pure structural insertions and deletions
|
|
17476
|
+
* are anchored by their stable ids before falling back to string comparison.
|
|
17633
17477
|
* This prevents an adjacent identical sentinel from being mistaken for an
|
|
17634
|
-
* unchanged prefix and keeps the
|
|
17478
|
+
* unchanged prefix and keeps the structure metadata aligned with the TextX body.
|
|
17635
17479
|
*/
|
|
17636
17480
|
function getSingleDataStreamChange(previousBody, nextBody) {
|
|
17637
17481
|
if (previousBody == null || nextBody == null) return null;
|
|
@@ -17642,6 +17486,9 @@ function getSingleDataStreamChange(previousBody, nextBody) {
|
|
|
17642
17486
|
if (insertedLength > 0) {
|
|
17643
17487
|
const structuralInsertion = findStructuralInsertion(previousBody, nextBody, previousDataStream, nextDataStream, insertedLength);
|
|
17644
17488
|
if (structuralInsertion) return structuralInsertion;
|
|
17489
|
+
} else if (insertedLength < 0) {
|
|
17490
|
+
const structuralDeletion = findStructuralDeletion(previousBody, nextBody, previousDataStream, nextDataStream, -insertedLength);
|
|
17491
|
+
if (structuralDeletion) return structuralDeletion;
|
|
17645
17492
|
}
|
|
17646
17493
|
let start = 0;
|
|
17647
17494
|
while (start < previousDataStream.length && start < nextDataStream.length && previousDataStream[start] === nextDataStream[start]) start++;
|
|
@@ -17657,6 +17504,14 @@ function getSingleDataStreamChange(previousBody, nextBody) {
|
|
|
17657
17504
|
insertLength: nextEnd - start
|
|
17658
17505
|
};
|
|
17659
17506
|
}
|
|
17507
|
+
function findStructuralDeletion(previousBody, nextBody, previousDataStream, nextDataStream, deletedLength) {
|
|
17508
|
+
for (const start of collectNewStructuralStartOffsets(nextBody, previousBody)) if (previousDataStream.slice(0, start) === nextDataStream.slice(0, start) && previousDataStream.slice(start + deletedLength) === nextDataStream.slice(start)) return {
|
|
17509
|
+
start,
|
|
17510
|
+
deleteLength: deletedLength,
|
|
17511
|
+
insertLength: 0
|
|
17512
|
+
};
|
|
17513
|
+
return null;
|
|
17514
|
+
}
|
|
17660
17515
|
function findStructuralInsertion(previousBody, nextBody, previousDataStream, nextDataStream, insertedLength) {
|
|
17661
17516
|
for (const start of collectNewStructuralStartOffsets(previousBody, nextBody)) if (previousDataStream.slice(0, start) === nextDataStream.slice(0, start) && previousDataStream.slice(start) === nextDataStream.slice(start + insertedLength)) return {
|
|
17662
17517
|
start,
|
|
@@ -21007,8 +20862,7 @@ const FOCUSING_UNIT = "FOCUSING_UNIT";
|
|
|
21007
20862
|
const FOCUSING_SHEET = "FOCUSING_SHEET";
|
|
21008
20863
|
const FOCUSING_DOC = "FOCUSING_DOC";
|
|
21009
20864
|
const FOCUSING_SLIDE = "FOCUSING_SLIDE";
|
|
21010
|
-
|
|
21011
|
-
const FOCUSING_EDITOR_BUT_HIDDEN = "FOCUSING_EDITOR_BUT_HIDDEN";
|
|
20865
|
+
const FOCUSING_BOARD = "FOCUSING_BOARD";
|
|
21012
20866
|
const EDITOR_ACTIVATED = "EDITOR_ACTIVATED";
|
|
21013
20867
|
const FOCUSING_EDITOR_INPUT_FORMULA = "FOCUSING_EDITOR_INPUT_FORMULA";
|
|
21014
20868
|
/** The focusing state of the formula editor (Fx bar). */
|
|
@@ -21402,229 +21256,37 @@ function convertTextRotation(textRotation) {
|
|
|
21402
21256
|
}
|
|
21403
21257
|
|
|
21404
21258
|
//#endregion
|
|
21405
|
-
//#region src/sheets/
|
|
21259
|
+
//#region src/sheets/column-manager.ts
|
|
21406
21260
|
/**
|
|
21407
|
-
*
|
|
21408
|
-
* Avoids type checking overhead when we know the structure.
|
|
21261
|
+
* Manage configuration information of all columns, get column width, column length, set column width, etc.
|
|
21409
21262
|
*/
|
|
21410
|
-
|
|
21411
|
-
|
|
21412
|
-
|
|
21413
|
-
|
|
21414
|
-
|
|
21415
|
-
const result = new Array(len);
|
|
21416
|
-
for (let i = 0; i < len; i++) result[i] = cloneValue(value[i]);
|
|
21417
|
-
return result;
|
|
21418
|
-
}
|
|
21419
|
-
const result = {};
|
|
21420
|
-
const keys = Object.keys(value);
|
|
21421
|
-
for (let i = 0, len = keys.length; i < len; i++) {
|
|
21422
|
-
const key = keys[i];
|
|
21423
|
-
result[key] = cloneValue(value[key]);
|
|
21263
|
+
var ColumnManager = class {
|
|
21264
|
+
constructor(_config, data) {
|
|
21265
|
+
this._config = _config;
|
|
21266
|
+
_defineProperty(this, "_columnData", {});
|
|
21267
|
+
this._columnData = data;
|
|
21424
21268
|
}
|
|
21425
|
-
|
|
21426
|
-
|
|
21427
|
-
|
|
21428
|
-
|
|
21429
|
-
|
|
21430
|
-
|
|
21431
|
-
*/
|
|
21432
|
-
function cloneCellData(cell) {
|
|
21433
|
-
if (cell === null || cell === void 0) return cell;
|
|
21434
|
-
const result = {};
|
|
21435
|
-
if (cell.p !== void 0) result.p = cell.p === null ? null : cloneValue(cell.p);
|
|
21436
|
-
if (cell.s !== void 0) if (cell.s === null || typeof cell.s === "string") result.s = cell.s;
|
|
21437
|
-
else result.s = cloneValue(cell.s);
|
|
21438
|
-
if (cell.v !== void 0) result.v = cell.v;
|
|
21439
|
-
if (cell.t !== void 0) result.t = cell.t;
|
|
21440
|
-
if (cell.f !== void 0) result.f = cell.f;
|
|
21441
|
-
if (cell.ref !== void 0) result.ref = cell.ref;
|
|
21442
|
-
if (cell.xf !== void 0) result.xf = cell.xf;
|
|
21443
|
-
if (cell.si !== void 0) result.si = cell.si;
|
|
21444
|
-
if (cell.custom !== void 0) result.custom = cell.custom === null ? null : cloneValue(cell.custom);
|
|
21445
|
-
return result;
|
|
21446
|
-
}
|
|
21447
|
-
/**
|
|
21448
|
-
* Fast clone for ICellDataWithSpanAndDisplay. Optimized for the known structure.
|
|
21449
|
-
* This extends cloneCellData with additional span and display properties.
|
|
21450
|
-
* @param cell - The cell data with span and display info to clone
|
|
21451
|
-
* @returns A deep clone of the cell data
|
|
21452
|
-
*/
|
|
21453
|
-
function cloneCellDataWithSpanAndDisplay(cell) {
|
|
21454
|
-
if (cell === null || cell === void 0) return cell;
|
|
21455
|
-
const result = {};
|
|
21456
|
-
if (cell.p !== void 0) result.p = cell.p === null ? null : cloneValue(cell.p);
|
|
21457
|
-
if (cell.s !== void 0) if (cell.s === null || typeof cell.s === "string") result.s = cell.s;
|
|
21458
|
-
else result.s = cloneValue(cell.s);
|
|
21459
|
-
if (cell.v !== void 0) result.v = cell.v;
|
|
21460
|
-
if (cell.t !== void 0) result.t = cell.t;
|
|
21461
|
-
if (cell.f !== void 0) result.f = cell.f;
|
|
21462
|
-
if (cell.ref !== void 0) result.ref = cell.ref;
|
|
21463
|
-
if (cell.xf !== void 0) result.xf = cell.xf;
|
|
21464
|
-
if (cell.si !== void 0) result.si = cell.si;
|
|
21465
|
-
if (cell.custom !== void 0) result.custom = cell.custom === null ? null : cloneValue(cell.custom);
|
|
21466
|
-
if (cell.rowSpan !== void 0) result.rowSpan = cell.rowSpan;
|
|
21467
|
-
if (cell.colSpan !== void 0) result.colSpan = cell.colSpan;
|
|
21468
|
-
if (cell.displayV !== void 0) result.displayV = cell.displayV;
|
|
21469
|
-
return result;
|
|
21470
|
-
}
|
|
21471
|
-
/**
|
|
21472
|
-
* Fast clone for cell data matrix. Optimized for sparse matrix structure.
|
|
21473
|
-
* @param cellData - The cell data matrix to clone
|
|
21474
|
-
* @returns A deep clone of the cell data matrix
|
|
21475
|
-
*/
|
|
21476
|
-
function cloneCellDataMatrix(cellData) {
|
|
21477
|
-
const result = {};
|
|
21478
|
-
const rowKeys = Object.keys(cellData);
|
|
21479
|
-
for (let i = 0, rowLen = rowKeys.length; i < rowLen; i++) {
|
|
21480
|
-
const rowKey = rowKeys[i];
|
|
21481
|
-
const rowNum = Number(rowKey);
|
|
21482
|
-
const rowData = cellData[rowNum];
|
|
21483
|
-
if (rowData === void 0) continue;
|
|
21484
|
-
const clonedRow = {};
|
|
21485
|
-
const colKeys = Object.keys(rowData);
|
|
21486
|
-
for (let j = 0, colLen = colKeys.length; j < colLen; j++) {
|
|
21487
|
-
const colKey = colKeys[j];
|
|
21488
|
-
const colNum = Number(colKey);
|
|
21489
|
-
const cell = rowData[colNum];
|
|
21490
|
-
if (cell !== void 0 && cell !== null) clonedRow[colNum] = cloneCellData(cell);
|
|
21491
|
-
}
|
|
21492
|
-
result[rowNum] = clonedRow;
|
|
21269
|
+
/**
|
|
21270
|
+
* Get width and hidden status of columns in the sheet
|
|
21271
|
+
* @returns {IObjectArrayPrimitiveType<Partial<IColumnData>>} Column data, including width, hidden status, etc.
|
|
21272
|
+
*/
|
|
21273
|
+
getColumnData() {
|
|
21274
|
+
return this._columnData;
|
|
21493
21275
|
}
|
|
21494
|
-
|
|
21495
|
-
}
|
|
21496
|
-
|
|
21497
|
-
|
|
21498
|
-
|
|
21499
|
-
* @returns A deep clone of the row or column data
|
|
21500
|
-
*/
|
|
21501
|
-
function cloneRowColumnData(data) {
|
|
21502
|
-
const result = {};
|
|
21503
|
-
const keys = Object.keys(data);
|
|
21504
|
-
for (let i = 0, len = keys.length; i < len; i++) {
|
|
21505
|
-
const key = keys[i];
|
|
21506
|
-
const idx = Number(key);
|
|
21507
|
-
const item = data[idx];
|
|
21508
|
-
if (item === void 0) continue;
|
|
21509
|
-
const cloned = {};
|
|
21510
|
-
if ("h" in item && item.h !== void 0) cloned.h = item.h;
|
|
21511
|
-
if ("ia" in item && item.ia !== void 0) cloned.ia = item.ia;
|
|
21512
|
-
if ("ah" in item && item.ah !== void 0) cloned.ah = item.ah;
|
|
21513
|
-
if ("hd" in item && item.hd !== void 0) cloned.hd = item.hd;
|
|
21514
|
-
if ("w" in item && item.w !== void 0) cloned.w = item.w;
|
|
21515
|
-
if ("s" in item && item.s !== void 0) if (item.s === null || typeof item.s === "string") cloned.s = item.s;
|
|
21516
|
-
else cloned.s = cloneValue(item.s);
|
|
21517
|
-
if ("custom" in item && item.custom !== void 0) cloned.custom = item.custom === null ? null : cloneValue(item.custom);
|
|
21518
|
-
result[idx] = cloned;
|
|
21276
|
+
getColVisible(colPos) {
|
|
21277
|
+
const { _columnData } = this;
|
|
21278
|
+
const col = _columnData[colPos];
|
|
21279
|
+
if (!col) return true;
|
|
21280
|
+
return col.hd !== 1;
|
|
21519
21281
|
}
|
|
21520
|
-
|
|
21521
|
-
|
|
21522
|
-
|
|
21523
|
-
*
|
|
21524
|
-
|
|
21525
|
-
|
|
21526
|
-
|
|
21527
|
-
|
|
21528
|
-
const len = ranges.length;
|
|
21529
|
-
const result = new Array(len);
|
|
21530
|
-
for (let i = 0; i < len; i++) {
|
|
21531
|
-
const range = ranges[i];
|
|
21532
|
-
result[i] = {
|
|
21533
|
-
startRow: range.startRow,
|
|
21534
|
-
startColumn: range.startColumn,
|
|
21535
|
-
endRow: range.endRow,
|
|
21536
|
-
endColumn: range.endColumn,
|
|
21537
|
-
rangeType: range.rangeType,
|
|
21538
|
-
startAbsoluteRefType: range.startAbsoluteRefType,
|
|
21539
|
-
endAbsoluteRefType: range.endAbsoluteRefType
|
|
21540
|
-
};
|
|
21541
|
-
}
|
|
21542
|
-
return result;
|
|
21543
|
-
}
|
|
21544
|
-
/**
|
|
21545
|
-
* Optimized deep clone specifically for IWorksheetData.
|
|
21546
|
-
* This is significantly faster than generic deepClone because:
|
|
21547
|
-
* 1. No recursive type checking - we know the structure
|
|
21548
|
-
* 2. Direct property access instead of Object.keys iteration for known properties
|
|
21549
|
-
* 3. Specialized handlers for cellData matrix (the largest data)
|
|
21550
|
-
* 4. Primitive values copied directly without cloning
|
|
21551
|
-
*
|
|
21552
|
-
* @param worksheet - The worksheet data to clone
|
|
21553
|
-
* @returns A deep clone of the worksheet data
|
|
21554
|
-
*/
|
|
21555
|
-
function cloneWorksheetData(worksheet) {
|
|
21556
|
-
const result = {
|
|
21557
|
-
id: worksheet.id,
|
|
21558
|
-
name: worksheet.name,
|
|
21559
|
-
tabColor: worksheet.tabColor,
|
|
21560
|
-
hidden: worksheet.hidden,
|
|
21561
|
-
rowCount: worksheet.rowCount,
|
|
21562
|
-
columnCount: worksheet.columnCount,
|
|
21563
|
-
zoomRatio: worksheet.zoomRatio,
|
|
21564
|
-
scrollTop: worksheet.scrollTop,
|
|
21565
|
-
scrollLeft: worksheet.scrollLeft,
|
|
21566
|
-
defaultColumnWidth: worksheet.defaultColumnWidth,
|
|
21567
|
-
defaultRowHeight: worksheet.defaultRowHeight,
|
|
21568
|
-
showGridlines: worksheet.showGridlines,
|
|
21569
|
-
rightToLeft: worksheet.rightToLeft,
|
|
21570
|
-
freeze: {
|
|
21571
|
-
xSplit: worksheet.freeze.xSplit,
|
|
21572
|
-
ySplit: worksheet.freeze.ySplit,
|
|
21573
|
-
startRow: worksheet.freeze.startRow,
|
|
21574
|
-
startColumn: worksheet.freeze.startColumn
|
|
21575
|
-
},
|
|
21576
|
-
rowHeader: {
|
|
21577
|
-
width: worksheet.rowHeader.width,
|
|
21578
|
-
hidden: worksheet.rowHeader.hidden
|
|
21579
|
-
},
|
|
21580
|
-
columnHeader: {
|
|
21581
|
-
height: worksheet.columnHeader.height,
|
|
21582
|
-
hidden: worksheet.columnHeader.hidden
|
|
21583
|
-
},
|
|
21584
|
-
mergeData: cloneMergeData(worksheet.mergeData),
|
|
21585
|
-
cellData: cloneCellDataMatrix(worksheet.cellData),
|
|
21586
|
-
rowData: cloneRowColumnData(worksheet.rowData),
|
|
21587
|
-
columnData: cloneRowColumnData(worksheet.columnData)
|
|
21588
|
-
};
|
|
21589
|
-
if (worksheet.gridlinesColor !== void 0) result.gridlinesColor = worksheet.gridlinesColor;
|
|
21590
|
-
if (worksheet.defaultStyle !== void 0) if (worksheet.defaultStyle === null || typeof worksheet.defaultStyle === "string") result.defaultStyle = worksheet.defaultStyle;
|
|
21591
|
-
else result.defaultStyle = cloneValue(worksheet.defaultStyle);
|
|
21592
|
-
if (worksheet.custom !== void 0) result.custom = worksheet.custom === null ? null : cloneValue(worksheet.custom);
|
|
21593
|
-
return result;
|
|
21594
|
-
}
|
|
21595
|
-
|
|
21596
|
-
//#endregion
|
|
21597
|
-
//#region src/sheets/column-manager.ts
|
|
21598
|
-
/**
|
|
21599
|
-
* Manage configuration information of all columns, get column width, column length, set column width, etc.
|
|
21600
|
-
*/
|
|
21601
|
-
var ColumnManager = class {
|
|
21602
|
-
constructor(_config, data) {
|
|
21603
|
-
this._config = _config;
|
|
21604
|
-
_defineProperty(this, "_columnData", {});
|
|
21605
|
-
this._columnData = data;
|
|
21606
|
-
}
|
|
21607
|
-
/**
|
|
21608
|
-
* Get width and hidden status of columns in the sheet
|
|
21609
|
-
* @returns {IObjectArrayPrimitiveType<Partial<IColumnData>>} Column data, including width, hidden status, etc.
|
|
21610
|
-
*/
|
|
21611
|
-
getColumnData() {
|
|
21612
|
-
return this._columnData;
|
|
21613
|
-
}
|
|
21614
|
-
getColVisible(colPos) {
|
|
21615
|
-
const { _columnData } = this;
|
|
21616
|
-
const col = _columnData[colPos];
|
|
21617
|
-
if (!col) return true;
|
|
21618
|
-
return col.hd !== 1;
|
|
21619
|
-
}
|
|
21620
|
-
/**
|
|
21621
|
-
* Get the column style
|
|
21622
|
-
* @param {number} col Column index
|
|
21623
|
-
* @returns {string | Nullable<IStyleData>} Style data, may be undefined
|
|
21624
|
-
*/
|
|
21625
|
-
getColumnStyle(col) {
|
|
21626
|
-
var _this$_columnData$col;
|
|
21627
|
-
return (_this$_columnData$col = this._columnData[col]) === null || _this$_columnData$col === void 0 ? void 0 : _this$_columnData$col.s;
|
|
21282
|
+
/**
|
|
21283
|
+
* Get the column style
|
|
21284
|
+
* @param {number} col Column index
|
|
21285
|
+
* @returns {string | Nullable<IStyleData>} Style data, may be undefined
|
|
21286
|
+
*/
|
|
21287
|
+
getColumnStyle(col) {
|
|
21288
|
+
var _this$_columnData$col;
|
|
21289
|
+
return (_this$_columnData$col = this._columnData[col]) === null || _this$_columnData$col === void 0 ? void 0 : _this$_columnData$col.s;
|
|
21628
21290
|
}
|
|
21629
21291
|
/**
|
|
21630
21292
|
* Set the set column default style
|
|
@@ -22320,7 +21982,7 @@ const DEFAULT_CELL_DOCUMENT_MODEL_OPTION = {
|
|
|
22320
21982
|
/**
|
|
22321
21983
|
* The model of a Worksheet.
|
|
22322
21984
|
*/
|
|
22323
|
-
var Worksheet = class
|
|
21985
|
+
var Worksheet = class {
|
|
22324
21986
|
constructor(unitId, snapshot, _styles) {
|
|
22325
21987
|
var _this$_snapshot$id;
|
|
22326
21988
|
this.unitId = unitId;
|
|
@@ -22589,16 +22251,6 @@ var Worksheet = class Worksheet {
|
|
|
22589
22251
|
return this._snapshot.name;
|
|
22590
22252
|
}
|
|
22591
22253
|
/**
|
|
22592
|
-
* Returns WorkSheet Clone Object
|
|
22593
|
-
* @returns WorkSheet Clone Object
|
|
22594
|
-
* @deprecated
|
|
22595
|
-
*/
|
|
22596
|
-
clone() {
|
|
22597
|
-
const { _snapshot: _config } = this;
|
|
22598
|
-
const copy = cloneWorksheetData(_config);
|
|
22599
|
-
return new Worksheet(this.unitId, copy, this._styles);
|
|
22600
|
-
}
|
|
22601
|
-
/**
|
|
22602
22254
|
* Get the merged cell list of the sheet.
|
|
22603
22255
|
* @returns {IRange[]} merged cell list
|
|
22604
22256
|
*/
|
|
@@ -23385,10 +23037,6 @@ let Workbook = class Workbook extends UnitModel {
|
|
|
23385
23037
|
getSnapshot() {
|
|
23386
23038
|
return this._snapshot;
|
|
23387
23039
|
}
|
|
23388
|
-
/** @deprecated use use name property instead */
|
|
23389
|
-
getName() {
|
|
23390
|
-
return this._snapshot.name;
|
|
23391
|
-
}
|
|
23392
23040
|
setName(name) {
|
|
23393
23041
|
this._name$.next(name);
|
|
23394
23042
|
this._snapshot.name = name;
|
|
@@ -23736,22 +23384,10 @@ let UniverInstanceService = class UniverInstanceService extends Disposable {
|
|
|
23736
23384
|
var _this$_unitCreateOpti;
|
|
23737
23385
|
return (_this$_unitCreateOpti = this._unitCreateOptions.get(unitId)) !== null && _this$_unitCreateOpti !== void 0 ? _this$_unitCreateOpti : null;
|
|
23738
23386
|
}
|
|
23739
|
-
getUniverSheetInstance(unitId) {
|
|
23740
|
-
return this.getUnit(unitId, UniverInstanceType.UNIVER_SHEET);
|
|
23741
|
-
}
|
|
23742
23387
|
getAllUnitsForType(type) {
|
|
23743
23388
|
var _this$_unitsByType$ge;
|
|
23744
23389
|
return (_this$_unitsByType$ge = this._unitsByType.get(type)) !== null && _this$_unitsByType$ge !== void 0 ? _this$_unitsByType$ge : [];
|
|
23745
23390
|
}
|
|
23746
|
-
changeDoc(unitId, doc) {
|
|
23747
|
-
const allDocs = this.getAllUnitsForType(UniverInstanceType.UNIVER_DOC);
|
|
23748
|
-
const oldDoc = allDocs.find((doc) => doc.getUnitId() === unitId);
|
|
23749
|
-
if (oldDoc != null) {
|
|
23750
|
-
const index = allDocs.indexOf(oldDoc);
|
|
23751
|
-
allDocs.splice(index, 1);
|
|
23752
|
-
}
|
|
23753
|
-
this.__addUnit(doc);
|
|
23754
|
-
}
|
|
23755
23391
|
get focused() {
|
|
23756
23392
|
var _this$_getUnitById2;
|
|
23757
23393
|
const id = this._focused$.getValue();
|
|
@@ -23759,7 +23395,7 @@ let UniverInstanceService = class UniverInstanceService extends Disposable {
|
|
|
23759
23395
|
return (_this$_getUnitById2 = this._getUnitById(id)) === null || _this$_getUnitById2 === void 0 ? void 0 : _this$_getUnitById2[0];
|
|
23760
23396
|
}
|
|
23761
23397
|
focusUnit(id) {
|
|
23762
|
-
var _this$focused;
|
|
23398
|
+
var _this$focused, _this$focused2;
|
|
23763
23399
|
if (this._focused$.getValue() === id) return;
|
|
23764
23400
|
this._focused$.next(id);
|
|
23765
23401
|
if (this.focused instanceof Workbook) {
|
|
@@ -23767,24 +23403,35 @@ let UniverInstanceService = class UniverInstanceService extends Disposable {
|
|
|
23767
23403
|
this._contextService.setContextValue(FOCUSING_DOC, false);
|
|
23768
23404
|
this._contextService.setContextValue(FOCUSING_SHEET, true);
|
|
23769
23405
|
this._contextService.setContextValue(FOCUSING_SLIDE, false);
|
|
23406
|
+
this._contextService.setContextValue(FOCUSING_BOARD, false);
|
|
23770
23407
|
this.setCurrentUnitForType(id);
|
|
23771
23408
|
} else if (this.focused instanceof DocumentDataModel) {
|
|
23772
23409
|
this._contextService.setContextValue(FOCUSING_UNIT, true);
|
|
23773
23410
|
this._contextService.setContextValue(FOCUSING_DOC, true);
|
|
23774
23411
|
this._contextService.setContextValue(FOCUSING_SHEET, false);
|
|
23775
23412
|
this._contextService.setContextValue(FOCUSING_SLIDE, false);
|
|
23413
|
+
this._contextService.setContextValue(FOCUSING_BOARD, false);
|
|
23776
23414
|
this.setCurrentUnitForType(id);
|
|
23777
23415
|
} else if (((_this$focused = this.focused) === null || _this$focused === void 0 ? void 0 : _this$focused.type) === UniverInstanceType.UNIVER_SLIDE) {
|
|
23778
23416
|
this._contextService.setContextValue(FOCUSING_UNIT, true);
|
|
23779
23417
|
this._contextService.setContextValue(FOCUSING_DOC, false);
|
|
23780
23418
|
this._contextService.setContextValue(FOCUSING_SHEET, false);
|
|
23781
23419
|
this._contextService.setContextValue(FOCUSING_SLIDE, true);
|
|
23420
|
+
this._contextService.setContextValue(FOCUSING_BOARD, false);
|
|
23421
|
+
this.setCurrentUnitForType(id);
|
|
23422
|
+
} else if (((_this$focused2 = this.focused) === null || _this$focused2 === void 0 ? void 0 : _this$focused2.type) === UniverInstanceType.UNIVER_BOARD) {
|
|
23423
|
+
this._contextService.setContextValue(FOCUSING_UNIT, true);
|
|
23424
|
+
this._contextService.setContextValue(FOCUSING_DOC, false);
|
|
23425
|
+
this._contextService.setContextValue(FOCUSING_SHEET, false);
|
|
23426
|
+
this._contextService.setContextValue(FOCUSING_SLIDE, false);
|
|
23427
|
+
this._contextService.setContextValue(FOCUSING_BOARD, true);
|
|
23782
23428
|
this.setCurrentUnitForType(id);
|
|
23783
23429
|
} else {
|
|
23784
23430
|
this._contextService.setContextValue(FOCUSING_UNIT, false);
|
|
23785
23431
|
this._contextService.setContextValue(FOCUSING_DOC, false);
|
|
23786
23432
|
this._contextService.setContextValue(FOCUSING_SHEET, false);
|
|
23787
23433
|
this._contextService.setContextValue(FOCUSING_SLIDE, false);
|
|
23434
|
+
this._contextService.setContextValue(FOCUSING_BOARD, false);
|
|
23788
23435
|
}
|
|
23789
23436
|
}
|
|
23790
23437
|
getFocusedUnit() {
|
|
@@ -23821,8 +23468,8 @@ let UniverInstanceService = class UniverInstanceService extends Disposable {
|
|
|
23821
23468
|
}
|
|
23822
23469
|
}
|
|
23823
23470
|
_tryResetFocusOnRemoval(unitId) {
|
|
23824
|
-
var _this$
|
|
23825
|
-
if (((_this$
|
|
23471
|
+
var _this$focused3;
|
|
23472
|
+
if (((_this$focused3 = this.focused) === null || _this$focused3 === void 0 ? void 0 : _this$focused3.getUnitId()) === unitId) this._focused$.next(null);
|
|
23826
23473
|
}
|
|
23827
23474
|
_getUnitById(unitId) {
|
|
23828
23475
|
for (const [type, units] of this._unitsByType) {
|
|
@@ -24418,6 +24065,32 @@ PluginService = __decorate([
|
|
|
24418
24065
|
__decorateParam(2, ILogService)
|
|
24419
24066
|
], PluginService);
|
|
24420
24067
|
|
|
24068
|
+
//#endregion
|
|
24069
|
+
//#region src/services/region/region.service.ts
|
|
24070
|
+
let RegionService = class RegionService extends Disposable {
|
|
24071
|
+
constructor(_localeService) {
|
|
24072
|
+
super();
|
|
24073
|
+
this._localeService = _localeService;
|
|
24074
|
+
_defineProperty(this, "_currentRegion$", void 0);
|
|
24075
|
+
_defineProperty(this, "currentRegion$", void 0);
|
|
24076
|
+
_defineProperty(this, "_hasExplicitRegion", false);
|
|
24077
|
+
this._currentRegion$ = new BehaviorSubject(this._localeService.getCurrentLocale());
|
|
24078
|
+
this.currentRegion$ = this._currentRegion$.asObservable();
|
|
24079
|
+
this.disposeWithMe(this._localeService.currentLocale$.subscribe((locale) => {
|
|
24080
|
+
if (!this._hasExplicitRegion && locale !== this._currentRegion$.value) this._currentRegion$.next(locale);
|
|
24081
|
+
}));
|
|
24082
|
+
this.disposeWithMe(toDisposable(() => this._currentRegion$.complete()));
|
|
24083
|
+
}
|
|
24084
|
+
setRegion(region) {
|
|
24085
|
+
this._hasExplicitRegion = true;
|
|
24086
|
+
this._currentRegion$.next(region);
|
|
24087
|
+
}
|
|
24088
|
+
getCurrentRegion() {
|
|
24089
|
+
return this._currentRegion$.value;
|
|
24090
|
+
}
|
|
24091
|
+
};
|
|
24092
|
+
RegionService = __decorate([__decorateParam(0, Inject(LocaleService))], RegionService);
|
|
24093
|
+
|
|
24421
24094
|
//#endregion
|
|
24422
24095
|
//#region src/services/resource-loader/type.ts
|
|
24423
24096
|
const IResourceLoaderService = createIdentifier("resource-loader-service");
|
|
@@ -25141,6 +24814,198 @@ function delayAnimationFrame(frames = 1) {
|
|
|
25141
24814
|
});
|
|
25142
24815
|
}
|
|
25143
24816
|
|
|
24817
|
+
//#endregion
|
|
24818
|
+
//#region src/sheets/clone.ts
|
|
24819
|
+
/**
|
|
24820
|
+
* Fast clone for primitive values and simple objects.
|
|
24821
|
+
* Avoids type checking overhead when we know the structure.
|
|
24822
|
+
*/
|
|
24823
|
+
function cloneValue(value) {
|
|
24824
|
+
if (value === null || value === void 0) return value;
|
|
24825
|
+
if (typeof value !== "object") return value;
|
|
24826
|
+
if (Array.isArray(value)) {
|
|
24827
|
+
const len = value.length;
|
|
24828
|
+
const result = new Array(len);
|
|
24829
|
+
for (let i = 0; i < len; i++) result[i] = cloneValue(value[i]);
|
|
24830
|
+
return result;
|
|
24831
|
+
}
|
|
24832
|
+
const result = {};
|
|
24833
|
+
const keys = Object.keys(value);
|
|
24834
|
+
for (let i = 0, len = keys.length; i < len; i++) {
|
|
24835
|
+
const key = keys[i];
|
|
24836
|
+
result[key] = cloneValue(value[key]);
|
|
24837
|
+
}
|
|
24838
|
+
return result;
|
|
24839
|
+
}
|
|
24840
|
+
/**
|
|
24841
|
+
* Fast clone for ICellData. Optimized for the known structure.
|
|
24842
|
+
* @param cell - The cell data to clone
|
|
24843
|
+
* @returns A deep clone of the cell data
|
|
24844
|
+
*/
|
|
24845
|
+
function cloneCellData(cell) {
|
|
24846
|
+
if (cell === null || cell === void 0) return cell;
|
|
24847
|
+
const result = {};
|
|
24848
|
+
if (cell.p !== void 0) result.p = cell.p === null ? null : cloneValue(cell.p);
|
|
24849
|
+
if (cell.s !== void 0) if (cell.s === null || typeof cell.s === "string") result.s = cell.s;
|
|
24850
|
+
else result.s = cloneValue(cell.s);
|
|
24851
|
+
if (cell.v !== void 0) result.v = cell.v;
|
|
24852
|
+
if (cell.t !== void 0) result.t = cell.t;
|
|
24853
|
+
if (cell.f !== void 0) result.f = cell.f;
|
|
24854
|
+
if (cell.ref !== void 0) result.ref = cell.ref;
|
|
24855
|
+
if (cell.xf !== void 0) result.xf = cell.xf;
|
|
24856
|
+
if (cell.si !== void 0) result.si = cell.si;
|
|
24857
|
+
if (cell.custom !== void 0) result.custom = cell.custom === null ? null : cloneValue(cell.custom);
|
|
24858
|
+
return result;
|
|
24859
|
+
}
|
|
24860
|
+
/**
|
|
24861
|
+
* Fast clone for ICellDataWithSpanAndDisplay. Optimized for the known structure.
|
|
24862
|
+
* This extends cloneCellData with additional span and display properties.
|
|
24863
|
+
* @param cell - The cell data with span and display info to clone
|
|
24864
|
+
* @returns A deep clone of the cell data
|
|
24865
|
+
*/
|
|
24866
|
+
function cloneCellDataWithSpanAndDisplay(cell) {
|
|
24867
|
+
if (cell === null || cell === void 0) return cell;
|
|
24868
|
+
const result = {};
|
|
24869
|
+
if (cell.p !== void 0) result.p = cell.p === null ? null : cloneValue(cell.p);
|
|
24870
|
+
if (cell.s !== void 0) if (cell.s === null || typeof cell.s === "string") result.s = cell.s;
|
|
24871
|
+
else result.s = cloneValue(cell.s);
|
|
24872
|
+
if (cell.v !== void 0) result.v = cell.v;
|
|
24873
|
+
if (cell.t !== void 0) result.t = cell.t;
|
|
24874
|
+
if (cell.f !== void 0) result.f = cell.f;
|
|
24875
|
+
if (cell.ref !== void 0) result.ref = cell.ref;
|
|
24876
|
+
if (cell.xf !== void 0) result.xf = cell.xf;
|
|
24877
|
+
if (cell.si !== void 0) result.si = cell.si;
|
|
24878
|
+
if (cell.custom !== void 0) result.custom = cell.custom === null ? null : cloneValue(cell.custom);
|
|
24879
|
+
if (cell.rowSpan !== void 0) result.rowSpan = cell.rowSpan;
|
|
24880
|
+
if (cell.colSpan !== void 0) result.colSpan = cell.colSpan;
|
|
24881
|
+
if (cell.displayV !== void 0) result.displayV = cell.displayV;
|
|
24882
|
+
return result;
|
|
24883
|
+
}
|
|
24884
|
+
/**
|
|
24885
|
+
* Fast clone for cell data matrix. Optimized for sparse matrix structure.
|
|
24886
|
+
* @param cellData - The cell data matrix to clone
|
|
24887
|
+
* @returns A deep clone of the cell data matrix
|
|
24888
|
+
*/
|
|
24889
|
+
function cloneCellDataMatrix(cellData) {
|
|
24890
|
+
const result = {};
|
|
24891
|
+
const rowKeys = Object.keys(cellData);
|
|
24892
|
+
for (let i = 0, rowLen = rowKeys.length; i < rowLen; i++) {
|
|
24893
|
+
const rowKey = rowKeys[i];
|
|
24894
|
+
const rowNum = Number(rowKey);
|
|
24895
|
+
const rowData = cellData[rowNum];
|
|
24896
|
+
if (rowData === void 0) continue;
|
|
24897
|
+
const clonedRow = {};
|
|
24898
|
+
const colKeys = Object.keys(rowData);
|
|
24899
|
+
for (let j = 0, colLen = colKeys.length; j < colLen; j++) {
|
|
24900
|
+
const colKey = colKeys[j];
|
|
24901
|
+
const colNum = Number(colKey);
|
|
24902
|
+
const cell = rowData[colNum];
|
|
24903
|
+
if (cell !== void 0 && cell !== null) clonedRow[colNum] = cloneCellData(cell);
|
|
24904
|
+
}
|
|
24905
|
+
result[rowNum] = clonedRow;
|
|
24906
|
+
}
|
|
24907
|
+
return result;
|
|
24908
|
+
}
|
|
24909
|
+
/**
|
|
24910
|
+
* Fast clone for row/column data arrays (sparse arrays stored as objects).
|
|
24911
|
+
* @param data - The row or column data to clone
|
|
24912
|
+
* @returns A deep clone of the row or column data
|
|
24913
|
+
*/
|
|
24914
|
+
function cloneRowColumnData(data) {
|
|
24915
|
+
const result = {};
|
|
24916
|
+
const keys = Object.keys(data);
|
|
24917
|
+
for (let i = 0, len = keys.length; i < len; i++) {
|
|
24918
|
+
const key = keys[i];
|
|
24919
|
+
const idx = Number(key);
|
|
24920
|
+
const item = data[idx];
|
|
24921
|
+
if (item === void 0) continue;
|
|
24922
|
+
const cloned = {};
|
|
24923
|
+
if ("h" in item && item.h !== void 0) cloned.h = item.h;
|
|
24924
|
+
if ("ia" in item && item.ia !== void 0) cloned.ia = item.ia;
|
|
24925
|
+
if ("ah" in item && item.ah !== void 0) cloned.ah = item.ah;
|
|
24926
|
+
if ("hd" in item && item.hd !== void 0) cloned.hd = item.hd;
|
|
24927
|
+
if ("w" in item && item.w !== void 0) cloned.w = item.w;
|
|
24928
|
+
if ("s" in item && item.s !== void 0) if (item.s === null || typeof item.s === "string") cloned.s = item.s;
|
|
24929
|
+
else cloned.s = cloneValue(item.s);
|
|
24930
|
+
if ("custom" in item && item.custom !== void 0) cloned.custom = item.custom === null ? null : cloneValue(item.custom);
|
|
24931
|
+
result[idx] = cloned;
|
|
24932
|
+
}
|
|
24933
|
+
return result;
|
|
24934
|
+
}
|
|
24935
|
+
/**
|
|
24936
|
+
* Fast clone for IRange array (merge data).
|
|
24937
|
+
* @param ranges - The array of ranges to clone
|
|
24938
|
+
* @returns A shallow clone of the ranges (IRange contains only primitive values)
|
|
24939
|
+
*/
|
|
24940
|
+
function cloneMergeData(ranges) {
|
|
24941
|
+
const len = ranges.length;
|
|
24942
|
+
const result = new Array(len);
|
|
24943
|
+
for (let i = 0; i < len; i++) {
|
|
24944
|
+
const range = ranges[i];
|
|
24945
|
+
result[i] = {
|
|
24946
|
+
startRow: range.startRow,
|
|
24947
|
+
startColumn: range.startColumn,
|
|
24948
|
+
endRow: range.endRow,
|
|
24949
|
+
endColumn: range.endColumn,
|
|
24950
|
+
rangeType: range.rangeType,
|
|
24951
|
+
startAbsoluteRefType: range.startAbsoluteRefType,
|
|
24952
|
+
endAbsoluteRefType: range.endAbsoluteRefType
|
|
24953
|
+
};
|
|
24954
|
+
}
|
|
24955
|
+
return result;
|
|
24956
|
+
}
|
|
24957
|
+
/**
|
|
24958
|
+
* Optimized deep clone specifically for IWorksheetData.
|
|
24959
|
+
* This is significantly faster than generic deepClone because:
|
|
24960
|
+
* 1. No recursive type checking - we know the structure
|
|
24961
|
+
* 2. Direct property access instead of Object.keys iteration for known properties
|
|
24962
|
+
* 3. Specialized handlers for cellData matrix (the largest data)
|
|
24963
|
+
* 4. Primitive values copied directly without cloning
|
|
24964
|
+
*
|
|
24965
|
+
* @param worksheet - The worksheet data to clone
|
|
24966
|
+
* @returns A deep clone of the worksheet data
|
|
24967
|
+
*/
|
|
24968
|
+
function cloneWorksheetData(worksheet) {
|
|
24969
|
+
const result = {
|
|
24970
|
+
id: worksheet.id,
|
|
24971
|
+
name: worksheet.name,
|
|
24972
|
+
tabColor: worksheet.tabColor,
|
|
24973
|
+
hidden: worksheet.hidden,
|
|
24974
|
+
rowCount: worksheet.rowCount,
|
|
24975
|
+
columnCount: worksheet.columnCount,
|
|
24976
|
+
zoomRatio: worksheet.zoomRatio,
|
|
24977
|
+
scrollTop: worksheet.scrollTop,
|
|
24978
|
+
scrollLeft: worksheet.scrollLeft,
|
|
24979
|
+
defaultColumnWidth: worksheet.defaultColumnWidth,
|
|
24980
|
+
defaultRowHeight: worksheet.defaultRowHeight,
|
|
24981
|
+
showGridlines: worksheet.showGridlines,
|
|
24982
|
+
rightToLeft: worksheet.rightToLeft,
|
|
24983
|
+
freeze: {
|
|
24984
|
+
xSplit: worksheet.freeze.xSplit,
|
|
24985
|
+
ySplit: worksheet.freeze.ySplit,
|
|
24986
|
+
startRow: worksheet.freeze.startRow,
|
|
24987
|
+
startColumn: worksheet.freeze.startColumn
|
|
24988
|
+
},
|
|
24989
|
+
rowHeader: {
|
|
24990
|
+
width: worksheet.rowHeader.width,
|
|
24991
|
+
hidden: worksheet.rowHeader.hidden
|
|
24992
|
+
},
|
|
24993
|
+
columnHeader: {
|
|
24994
|
+
height: worksheet.columnHeader.height,
|
|
24995
|
+
hidden: worksheet.columnHeader.hidden
|
|
24996
|
+
},
|
|
24997
|
+
mergeData: cloneMergeData(worksheet.mergeData),
|
|
24998
|
+
cellData: cloneCellDataMatrix(worksheet.cellData),
|
|
24999
|
+
rowData: cloneRowColumnData(worksheet.rowData),
|
|
25000
|
+
columnData: cloneRowColumnData(worksheet.columnData)
|
|
25001
|
+
};
|
|
25002
|
+
if (worksheet.gridlinesColor !== void 0) result.gridlinesColor = worksheet.gridlinesColor;
|
|
25003
|
+
if (worksheet.defaultStyle !== void 0) if (worksheet.defaultStyle === null || typeof worksheet.defaultStyle === "string") result.defaultStyle = worksheet.defaultStyle;
|
|
25004
|
+
else result.defaultStyle = cloneValue(worksheet.defaultStyle);
|
|
25005
|
+
if (worksheet.custom !== void 0) result.custom = worksheet.custom === null ? null : cloneValue(worksheet.custom);
|
|
25006
|
+
return result;
|
|
25007
|
+
}
|
|
25008
|
+
|
|
25144
25009
|
//#endregion
|
|
25145
25010
|
//#region src/skeleton.ts
|
|
25146
25011
|
let Skeleton = class Skeleton extends Disposable {
|
|
@@ -25253,12 +25118,6 @@ let SheetSkeleton = class SheetSkeleton extends Skeleton {
|
|
|
25253
25118
|
}
|
|
25254
25119
|
resetCache() {}
|
|
25255
25120
|
/**
|
|
25256
|
-
* @deprecated should never expose a property that is provided by another module!
|
|
25257
|
-
*/
|
|
25258
|
-
getWorksheetConfig() {
|
|
25259
|
-
return this._worksheetData;
|
|
25260
|
-
}
|
|
25261
|
-
/**
|
|
25262
25121
|
* Get which Workbook and Worksheet this skeleton is attached to.
|
|
25263
25122
|
* @returns [unitId, sheetId]
|
|
25264
25123
|
*/
|
|
@@ -26316,11 +26175,12 @@ var Univer = class {
|
|
|
26316
26175
|
_defineProperty(this, "_injector", void 0);
|
|
26317
26176
|
_defineProperty(this, "_disposingCallbacks", new DisposableCollection());
|
|
26318
26177
|
const injector = this._injector = createUniverInjector(parentInjector, config === null || config === void 0 ? void 0 : config.override);
|
|
26319
|
-
const { theme, darkMode, locale, locales, direction, logLevel, logCommandExecution } = config;
|
|
26178
|
+
const { theme, darkMode, locale, region, locales, direction, logLevel, logCommandExecution } = config;
|
|
26320
26179
|
if (theme) this._injector.get(ThemeService).setTheme(theme);
|
|
26321
26180
|
if (darkMode) this._injector.get(ThemeService).setDarkMode(darkMode);
|
|
26322
26181
|
if (locales) this._injector.get(LocaleService).load(locales);
|
|
26323
26182
|
if (locale) this._injector.get(LocaleService).setLocale(locale);
|
|
26183
|
+
if (region) this._injector.get(RegionService).setRegion(region);
|
|
26324
26184
|
if (direction) this._injector.get(LocaleService).setDirection(direction);
|
|
26325
26185
|
if (logLevel) this._injector.get(ILogService).setLogLevel(logLevel);
|
|
26326
26186
|
if (logCommandExecution !== void 0) this._injector.get(IConfigService).setConfig(COMMAND_LOG_EXECUTION_CONFIG_KEY, logCommandExecution);
|
|
@@ -26351,6 +26211,9 @@ var Univer = class {
|
|
|
26351
26211
|
setLocale(locale) {
|
|
26352
26212
|
this._injector.get(LocaleService).setLocale(locale);
|
|
26353
26213
|
}
|
|
26214
|
+
setRegion(region) {
|
|
26215
|
+
this._injector.get(RegionService).setRegion(region);
|
|
26216
|
+
}
|
|
26354
26217
|
createUnit(type, data) {
|
|
26355
26218
|
return this._univerInstanceService.createUnit(type, data);
|
|
26356
26219
|
}
|
|
@@ -26396,6 +26259,7 @@ function createUniverInjector(parentInjector, override) {
|
|
|
26396
26259
|
const dependencies = mergeOverrideWithDependencies([
|
|
26397
26260
|
[ErrorService],
|
|
26398
26261
|
[LocaleService],
|
|
26262
|
+
[RegionService],
|
|
26399
26263
|
[ThemeService],
|
|
26400
26264
|
[LifecycleService],
|
|
26401
26265
|
[PluginService],
|
|
@@ -26452,4 +26316,4 @@ function createUniverInjector(parentInjector, override) {
|
|
|
26452
26316
|
installShims();
|
|
26453
26317
|
|
|
26454
26318
|
//#endregion
|
|
26455
|
-
export { ABCToNumber, AUTO_HEIGHT_FOR_MERGED_CELLS, AbsoluteRefType, ActionIterator, AlignTypeH, AlignTypeV, ArrangeTypeEnum, AsyncInterceptorManager, AsyncLock, AuthzIoLocalService, AutoFillSeries, BORDER_KEYS, BORDER_STYLE_KEYS, BaseDataModel, BaseFieldType, BaseFilterConjunction, BaseFilterOperator, BaseSortDirection, BaseViewType, BaselineOffset, BlockType, BooleanNumber, BorderStyleTypes, BorderType, BuildTextUtils, BulletAlignment, COLORS, COLOR_STYLE_KEYS, COMMAND_LOG_EXECUTION_CONFIG_KEY, CanceledError, CellModeEnum, CellValueType, ColorKit, ColorType, ColumnLayoutType, ColumnResponsiveType, ColumnSeparatorType, CommandService, CommandType, CommonHideTypes, ConfigService, ContextService, CopyPasteType, CustomCommandExecutionError, CustomDecorationType, CustomRangeType, DEFAULT_CELL, DEFAULT_DOC, DEFAULT_DOCUMENT_PARAGRAPH_LINE_SPACING, DEFAULT_DOCUMENT_PARAGRAPH_SPACE_ABOVE, DEFAULT_DOCUMENT_PARAGRAPH_SPACE_BELOW, DEFAULT_DOCUMENT_SUB_COMPONENT_ID, DEFAULT_EMPTY_DOCUMENT_VALUE, DEFAULT_NUMBER_FORMAT, DEFAULT_RANGE, DEFAULT_RANGE_ARRAY, DEFAULT_SELECTION, DEFAULT_STYLES, DEFAULT_TEXT_FORMAT, DEFAULT_TEXT_FORMAT_EXCEL, DEFAULT_WORKSHEET_COLUMN_COUNT, DEFAULT_WORKSHEET_COLUMN_COUNT_KEY, DEFAULT_WORKSHEET_COLUMN_TITLE_HEIGHT, DEFAULT_WORKSHEET_COLUMN_TITLE_HEIGHT_KEY, DEFAULT_WORKSHEET_COLUMN_WIDTH, DEFAULT_WORKSHEET_COLUMN_WIDTH_KEY, DEFAULT_WORKSHEET_ROW_COUNT, DEFAULT_WORKSHEET_ROW_COUNT_KEY, DEFAULT_WORKSHEET_ROW_HEIGHT, DEFAULT_WORKSHEET_ROW_HEIGHT_KEY, DEFAULT_WORKSHEET_ROW_TITLE_WIDTH, DEFAULT_WORKSHEET_ROW_TITLE_WIDTH_KEY, DOCS_COMMENT_EDITOR_UNIT_ID_KEY, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY, DOCS_NORMAL_EDITOR_UNIT_ID_KEY, DOC_DRAWING_PRINTING_COMPONENT_KEY, DOC_RANGE_TYPE, DashStyleType, DataStreamTreeNodeType, DataStreamTreeTokenType, DataValidationErrorStyle, DataValidationImeMode, DataValidationOperator, DataValidationRenderMode, DataValidationStatus, DataValidationType, DeleteDirection, DependentOn, DesktopLogService, DeveloperMetadataVisibility, Dimension, Direction, Disposable, DisposableCollection, DocStyleType, DocumentBlockRangeType, DocumentBlockType, DocumentDataModel, DocumentFlavor, DrawingTypeEnum, EDITOR_ACTIVATED, EXTENSION_NAMES, ErrorService, EventState, EventSubject, FOCUSING_COMMENT_EDITOR, FOCUSING_COMMON_DRAWINGS, FOCUSING_DOC,
|
|
26319
|
+
export { ABCToNumber, AUTO_HEIGHT_FOR_MERGED_CELLS, AbsoluteRefType, ActionIterator, AlignTypeH, AlignTypeV, ArrangeTypeEnum, AsyncInterceptorManager, AsyncLock, AuthzIoLocalService, AutoFillSeries, BORDER_KEYS, BORDER_STYLE_KEYS, BaseDataModel, BaseFieldType, BaseFilterConjunction, BaseFilterOperator, BaseSortDirection, BaseViewType, BaselineOffset, BlockType, BooleanNumber, BorderStyleTypes, BorderType, BuildTextUtils, BulletAlignment, COLORS, COLOR_STYLE_KEYS, COMMAND_LOG_EXECUTION_CONFIG_KEY, CanceledError, CellModeEnum, CellValueType, ColorKit, ColorType, ColumnLayoutType, ColumnResponsiveType, ColumnSeparatorType, CommandService, CommandType, CommonHideTypes, ConfigService, ContextService, CopyPasteType, CustomCommandExecutionError, CustomDecorationType, CustomRangeType, DEFAULT_CELL, DEFAULT_DOC, DEFAULT_DOCUMENT_PARAGRAPH_LINE_SPACING, DEFAULT_DOCUMENT_PARAGRAPH_SPACE_ABOVE, DEFAULT_DOCUMENT_PARAGRAPH_SPACE_BELOW, DEFAULT_DOCUMENT_SUB_COMPONENT_ID, DEFAULT_EMPTY_DOCUMENT_VALUE, DEFAULT_NUMBER_FORMAT, DEFAULT_RANGE, DEFAULT_RANGE_ARRAY, DEFAULT_SELECTION, DEFAULT_STYLES, DEFAULT_TEXT_FORMAT, DEFAULT_TEXT_FORMAT_EXCEL, DEFAULT_WORKSHEET_COLUMN_COUNT, DEFAULT_WORKSHEET_COLUMN_COUNT_KEY, DEFAULT_WORKSHEET_COLUMN_TITLE_HEIGHT, DEFAULT_WORKSHEET_COLUMN_TITLE_HEIGHT_KEY, DEFAULT_WORKSHEET_COLUMN_WIDTH, DEFAULT_WORKSHEET_COLUMN_WIDTH_KEY, DEFAULT_WORKSHEET_ROW_COUNT, DEFAULT_WORKSHEET_ROW_COUNT_KEY, DEFAULT_WORKSHEET_ROW_HEIGHT, DEFAULT_WORKSHEET_ROW_HEIGHT_KEY, DEFAULT_WORKSHEET_ROW_TITLE_WIDTH, DEFAULT_WORKSHEET_ROW_TITLE_WIDTH_KEY, DOCS_COMMENT_EDITOR_UNIT_ID_KEY, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY, DOCS_NORMAL_EDITOR_UNIT_ID_KEY, DOC_DRAWING_PRINTING_COMPONENT_KEY, DOC_RANGE_TYPE, DashStyleType, DataStreamTreeNodeType, DataStreamTreeTokenType, DataValidationErrorStyle, DataValidationImeMode, DataValidationOperator, DataValidationRenderMode, DataValidationStatus, DataValidationType, DeleteDirection, DependentOn, DesktopLogService, DeveloperMetadataVisibility, Dimension, Direction, Disposable, DisposableCollection, DocStyleType, DocumentBlockRangeType, DocumentBlockType, DocumentDataModel, DocumentFlavor, DocxBreakType, DrawingTypeEnum, EDITOR_ACTIVATED, EXTENSION_NAMES, ErrorService, EventState, EventSubject, FOCUSING_BOARD, FOCUSING_COMMENT_EDITOR, FOCUSING_COMMON_DRAWINGS, FOCUSING_DOC, FOCUSING_EDITOR_INPUT_FORMULA, FOCUSING_EDITOR_STANDALONE, FOCUSING_FX_BAR_EDITOR, FOCUSING_PANEL_EDITOR, FOCUSING_SHAPE_TEXT_EDITOR, FOCUSING_SHEET, FOCUSING_SLIDE, FOCUSING_UNIT, FOCUSING_UNIVER_EDITOR, FOCUSING_UNIVER_EDITOR_STANDALONE_SINGLE_MODE, FORMULA_EDITOR_ACTIVATED, FollowNumberWithType, FontItalic, FontStyleType, FontWeight, GridType, HorizontalAlign, IAuthzIoService, ICommandService, IConfigService, IConfirmService, IContextService, IImageIoService, ILocalStorageService, ILogService, IMentionIOService, IPermissionService, IResourceLoaderService, IResourceManagerService, IS_ROW_STYLE_PRECEDE_COLUMN_STYLE, IURLImageService, IUndoRedoService, IUniverInstanceService, ImageCacheMap, ImageSourceType, ImageUploadStatusType, Inject, InjectSelf, Injector, InterceptorEffectEnum, InterceptorManager, InterpolationPointType, json1 as JSON1, JSONX, LOCALE_META, LRUHelper, LRUMap, LifecycleService, LifecycleStages, LifecycleUnreachableError, ListGlyphType, LocalUndoRedoService, LocaleService, LocaleType, LogLevel, LookUp, MAX_COLUMN_COUNT, MAX_ROW_COUNT, MODERN_DOCUMENT_DEFAULT_MARGIN, MODERN_DOCUMENT_WIDTH, MOVE_BUFFER_VALUE, Many, MemoryCursor, MentionIOLocalService, MentionType, ModernDocumentWidthMode, NAMED_STYLE_MAP, NAMED_STYLE_SPACE_MAP, NamedStyleType, NilCommand, NumberUnitType, ObjectMatrix, ObjectRelativeFromH, ObjectRelativeFromV, Optional, PADDING_KEYS, PAGE_SIZE, PAPER_TYPES, PARAGRAPH_ID_PREFIX, PRESERVE_INSERTED_PARAGRAPH_IDS, PRESET_LIST_TYPE, PageOrientType, PaperType, ParagraphElementType, ParagraphStyleBuilder, ParagraphStyleValue, PermissionService, PermissionStatus, Plugin, PluginService, PositionedObjectLayoutType, PresetListType, ProtectionType, Quantity, QuickListType, QuickListTypeMap, RANGE_DIRECTION, RANGE_TYPE, RBush, RCDisposable, RESTORE_INSERTED_PARAGRAPH_IDS, RGBA_PAREN, RGB_PAREN, ROTATE_BUFFER_VALUE, RTree, Range, Rectangle, RediError, RedoCommand, RedoCommandId, RefAlias, RegionService, Registry, RegistryAsMap, RelativeDate, ResourceManagerService, RichTextBuilder, RichTextParagraphBuilder, RichTextRunBuilder, RichTextValue, RxDisposable, SECTION_ID_PREFIX, SHEET_EDITOR_UNITS, STYLE_KEYS, SectionType, Self, SheetSkeleton, SheetTypes, SheetViewModel, Skeleton, SkipSelf, SliceBodyType, SpacingRule, Styles, TEXT_DECORATION_KEYS, TEXT_ROTATION_KEYS, THEME_COLORS, TRADITIONAL_DOCUMENT_DEFAULT_MARGIN, TabStopAlignment, TableAlignmentType, TableLayoutType, TableRowHeightRule, TableSizeType, TableTextWrapType, TestConfirmService, TextDecoration, TextDecorationBuilder, TextDirection, TextDirectionType, TextStyleBuilder, TextStyleValue, TextX, TextXActionType, ThemeColorType, ThemeColors, ThemeService, Tools, UndoCommand, UndoCommandId, UnitModel, Univer, UniverInstanceService, UniverInstanceType, UpdateDocsAttributeType, UserManagerService, VerticalAlign, VerticalAlignmentType, WithNew, Workbook, Worksheet, WrapStrategy, WrapTextType, addLinkToDocumentModel, afterInitApply, afterTime, awaitTime, binSearchFirstGreaterThanTarget, binarySearchArray, bufferDebounceTime, cellToRange, characterSpacingControlType, checkForSubstrings, checkIfMove, checkParagraphHasBullet, checkParagraphHasIndent, checkParagraphHasIndentByStyle, cloneBodyWithFreshParagraphIds, cloneCellData, cloneCellDataMatrix, cloneCellDataWithSpanAndDisplay, cloneParagraphWithId, cloneSectionBreakWithId, cloneValue, cloneWorksheetData, codeToBlob, columnLabelToNumber, composeBody, composeInterceptors, composeStyles, concatMatrixArray, containsInteriorInsertionOffset, containsStreamIndex, convertCellToRange, convertObservableToBehaviorSubject, covertCellValue, covertCellValues, createAsyncInterceptorKey, createDefaultBaseTableSnapshot, createDefaultUser, createDocumentModelWithStyle, createIdentifier, createInterceptorKey, createInternalEditorID, createParagraphId, createRandomId, createRowColIter, createSectionId, createSheetGapTestConfig, currencySymbols, customNameCharacterCheck, dateKit, debounce, dedupe, dedupeBy, deepCompare, delayAnimationFrame, deleteContent, extractPureTextFromCell, forwardRef, fromCallback, fromEventSubject, generateIntervalsByPoints, generateRandomId, get, getArrayLength, getEmptySnapshot as getBasesEmptySnapshot, getBlockRangeInterval, getBodySlice, getBodySliceForSplitTextXAction, getBodySliceForTextXAction, getBorderStyleType, getCellCoordByIndexSimple, getCellValueType, getCellWithCoordByIndexCore, getColorStyle, getColumnGroupRangeInterval, getCustomBlockIdsInSelections, getCustomBlockInterval, getCustomBlockSlice, getCustomDecorationSlice, getCustomRangeInterval, getCustomRangeSlice, getDisplayValueFromCell, getEmptySnapshot$1 as getDocsEmptySnapshot, getDocsUpdateBody, getEmptyCell, getExclusiveRangeInterval, getInclusiveRangeInterval, getIntersectRange, getNumfmtParseValueFilter, getOriginCellValue, getParagraphContentStartOffset, getParagraphContentStartOffsets, getParagraphFollowingBlockOffset, getParagraphsSlice, getPlainText, getReverseDirection, getRichTextEditPath, getSectionBreakSlice, getSectionHeaderFooterReferenceKey, getEmptySnapshot$2 as getSheetsEmptySnapshot, getSingleDataStreamChange, getTableCellTokenInterval, getTableRangeInterval, getTableRowTokenInterval, getTableSlice, getTextRunSlice, getTransformOffsetX, getTransformOffsetY, getWorksheetUID, groupBy, handleStyleToString, hashAlgorithm, horizontalLineSegmentsSubtraction, insertMatrixArray, insertTextToContent, intersectsOperationalIntervals, invertColorByHSL, invertColorByMatrix, isAsyncDependencyItem, isAsyncHook, isBlackColor, isBooleanString, isCellCoverable, isCellV, isClassDependencyItem, isCommentEditorID, isCtor, isDefaultFormat, isDisposable, isEmptyCell, isFactoryDependencyItem, isFormulaId, isFormulaString, isICellData, isInternalEditorID, isNodeEnv, isNotNullOrUndefined, isNullCell, isNumeric, isPatternEqualWithoutDecimal, isRangesEqual, isRealNum, isSafeNumeric, isSafeUrl, isSameStyleTextRun, isTextFormat, isUnitRangesEqual, isValidRange, isValueDependencyItem, isWhiteColor, makeArray, makeCellRangeToRangeData, mapObjectMatrix, merge, mergeIntervals, mergeLocales, mergeOverrideWithDependencies, mergeSets, mergeWith, mergeWorksheetSnapshotWithDefault, mixinClass, moveMatrixArray, moveRangeByOffset, nameCharacterCheck, noop, normalizeBody, normalizeInsertedSectionIdsForDocument, normalizeTextRuns, normalizeUrl, numberToABC, numberToListABC, api_exports as numfmt, queryObjectMatrix, regexp, registerDependencies, remove, repeatStringNumTimes, replaceInDocumentBody, requestImmediateMacroTask, resolveDocumentParagraphStyle, resolveSectionHeaderFooterReference, resolveSectionHeaderFooterReferences, resolveWithBasePath, rotate, searchArray, searchInOrderedArray, selectionToArray, sequence, sequenceAsync, sequenceExecute, sequenceExecuteAsync, set, setDependencies, shallowEqual, shiftExclusiveRangeOnDelete, shiftExclusiveRangeOnInsert, shiftInclusiveRangeOnDelete, shiftInclusiveRangeOnInsert, skipParseTagNames, sliceMatrixArray, sortRules, sortRulesByDesc, sortRulesFactory, spliceArray, splitIntoGrid, takeAfter, throttle, toDisposable, touchDependencies, updateAttributeByDelete, updateAttributeByInsert, validateDocBodyStructure, validateDocumentStructure, willLoseNumericPrecision };
|