@univerjs/core 1.3.1 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -5
- package/lib/cjs/facade.js +20 -35
- package/lib/cjs/index.js +448 -592
- package/lib/es/facade.js +20 -35
- package/lib/es/index.js +448 -593
- package/lib/facade.js +20 -35
- package/lib/index.js +448 -593
- package/lib/types/bases/typedef.d.ts +25 -25
- package/lib/types/common/interceptor.d.ts +6 -3
- package/lib/types/common/regexp/index.d.ts +4 -4
- package/lib/types/docs/data-model/paragraph-style.d.ts +5 -2
- package/lib/types/docs/data-model/preset-list-type.d.ts +8 -8
- package/lib/types/docs/data-model/rich-text-builder.d.ts +1 -1
- package/lib/types/docs/data-model/text-x/build-utils/custom-range.d.ts +1 -1
- package/lib/types/docs/data-model/text-x/build-utils/index.d.ts +15 -13
- package/lib/types/docs/data-model/text-x/utils.d.ts +20 -20
- package/lib/types/index.d.ts +1 -0
- package/lib/types/services/lifecycle/lifecycle.d.ts +4 -4
- package/lib/types/services/resource-loader/type.d.ts +2 -2
- package/lib/types/services/user-manager/user-manager.service.d.ts +2 -2
- package/lib/types/shared/common.d.ts +1 -0
- package/lib/types/shared/r-tree.d.ts +3 -1
- package/lib/types/shared/sort-rules.d.ts +2 -2
- package/lib/types/sheets/sheet-skeleton.d.ts +12 -4
- package/lib/types/sheets/typedef.d.ts +8 -3
- package/lib/types/types/enum/sheet-types.d.ts +2 -1
- package/lib/types/types/interfaces/i-document-data.d.ts +1 -5
- package/lib/types/types/interfaces/i-drawing.d.ts +3 -1
- package/lib/types/types/interfaces/index.d.ts +0 -3
- package/lib/types/univer.d.ts +1 -1
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +26 -26
- package/package.json +8 -8
- package/lib/types/slides/slide-data-model.d.ts +0 -27
- package/lib/types/types/enum/place-holder-type.d.ts +0 -34
- package/lib/types/types/interfaces/i-image-properties.d.ts +0 -34
- package/lib/types/types/interfaces/i-placeholder.d.ts +0 -21
- package/lib/types/types/interfaces/i-shape-properties.d.ts +0 -30
package/lib/cjs/index.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
|
|
2
|
+
// \0rolldown/runtime.js
|
|
3
3
|
var __create = Object.create;
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
5
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
7
|
var __getProtoOf = Object.getPrototypeOf;
|
|
8
8
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
-
var __exportAll = (all,
|
|
10
|
-
let target = {};
|
|
9
|
+
var __exportAll = (all, flags) => {
|
|
10
|
+
let target = Object.setPrototypeOf({}, null);
|
|
11
11
|
for (var name in all) {
|
|
12
12
|
__defProp(target, name, {
|
|
13
13
|
get: all[name],
|
|
14
14
|
enumerable: true
|
|
15
15
|
});
|
|
16
16
|
}
|
|
17
|
-
if (!
|
|
17
|
+
if (!(flags & 1)) {
|
|
18
18
|
__defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
19
19
|
}
|
|
20
|
-
return target;
|
|
20
|
+
return flags & 2 ? target : Object.preventExtensions(target);
|
|
21
21
|
};
|
|
22
22
|
var __copyProps = (to, from, except, desc) => {
|
|
23
23
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
@@ -38,7 +38,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
38
38
|
enumerable: true
|
|
39
39
|
}) : target, mod));
|
|
40
40
|
|
|
41
|
-
//#endregion
|
|
42
41
|
let rxjs = require("rxjs");
|
|
43
42
|
let _univerjs_protocol = require("@univerjs/protocol");
|
|
44
43
|
let rxjs_operators = require("rxjs/operators");
|
|
@@ -56,7 +55,7 @@ let _univerjs_themes = require("@univerjs/themes");
|
|
|
56
55
|
let kdbush = require("kdbush");
|
|
57
56
|
kdbush = __toESM(kdbush);
|
|
58
57
|
|
|
59
|
-
|
|
58
|
+
// src/common/shims.ts
|
|
60
59
|
/**
|
|
61
60
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
62
61
|
*
|
|
@@ -151,8 +150,7 @@ function installShims() {
|
|
|
151
150
|
installStringAt();
|
|
152
151
|
}
|
|
153
152
|
|
|
154
|
-
|
|
155
|
-
//#region \0@oxc-project+runtime@0.153.0/helpers/esm/typeof.js
|
|
153
|
+
// \0@oxc-project+runtime@0.157.0/helpers/esm/typeof.js
|
|
156
154
|
function _typeof(o) {
|
|
157
155
|
"@babel/helpers - typeof";
|
|
158
156
|
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
|
|
@@ -162,28 +160,25 @@ function _typeof(o) {
|
|
|
162
160
|
}, _typeof(o);
|
|
163
161
|
}
|
|
164
162
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
function toPrimitive(t, r) {
|
|
163
|
+
// \0@oxc-project+runtime@0.157.0/helpers/esm/toPrimitive.js
|
|
164
|
+
function toPrimitive(t, e) {
|
|
168
165
|
if ("object" != _typeof(t) || !t) return t;
|
|
169
|
-
var
|
|
170
|
-
if (void 0 !==
|
|
171
|
-
var i =
|
|
166
|
+
var r;
|
|
167
|
+
if ("undefined" != typeof Symbol && void 0 !== (r = t[Symbol.toPrimitive])) {
|
|
168
|
+
var i = r.call(t, e || "default");
|
|
172
169
|
if ("object" != _typeof(i)) return i;
|
|
173
170
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
174
171
|
}
|
|
175
|
-
return ("string" ===
|
|
172
|
+
return ("string" === e ? String : Number)(t);
|
|
176
173
|
}
|
|
177
174
|
|
|
178
|
-
|
|
179
|
-
//#region \0@oxc-project+runtime@0.153.0/helpers/esm/toPropertyKey.js
|
|
175
|
+
// \0@oxc-project+runtime@0.157.0/helpers/esm/toPropertyKey.js
|
|
180
176
|
function toPropertyKey(t) {
|
|
181
177
|
var i = toPrimitive(t, "string");
|
|
182
178
|
return "symbol" == _typeof(i) ? i : i + "";
|
|
183
179
|
}
|
|
184
180
|
|
|
185
|
-
|
|
186
|
-
//#region \0@oxc-project+runtime@0.153.0/helpers/esm/defineProperty.js
|
|
181
|
+
// \0@oxc-project+runtime@0.157.0/helpers/esm/defineProperty.js
|
|
187
182
|
function _defineProperty(e, r, t) {
|
|
188
183
|
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
189
184
|
value: t,
|
|
@@ -193,8 +188,7 @@ function _defineProperty(e, r, t) {
|
|
|
193
188
|
}) : e[r] = t, e;
|
|
194
189
|
}
|
|
195
190
|
|
|
196
|
-
|
|
197
|
-
//#region src/shared/lifecycle.ts
|
|
191
|
+
// src/shared/lifecycle.ts
|
|
198
192
|
function isSubscriptionLike(value) {
|
|
199
193
|
return value instanceof rxjs.Subscription || value instanceof rxjs.Subject || value && "closed" in value && typeof value.unsubscribe !== "undefined";
|
|
200
194
|
}
|
|
@@ -275,15 +269,13 @@ var RCDisposable = class extends Disposable {
|
|
|
275
269
|
}
|
|
276
270
|
};
|
|
277
271
|
|
|
278
|
-
|
|
279
|
-
//#region src/common/unit.ts
|
|
272
|
+
// src/common/unit.ts
|
|
280
273
|
/**
|
|
281
274
|
* The base class for all units.
|
|
282
275
|
*/
|
|
283
276
|
var UnitModel = class extends Disposable {};
|
|
284
277
|
|
|
285
|
-
|
|
286
|
-
//#region src/common/url.ts
|
|
278
|
+
// src/common/url.ts
|
|
287
279
|
/**
|
|
288
280
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
289
281
|
*
|
|
@@ -626,8 +618,7 @@ function resolveWithBasePath(url, baseURL) {
|
|
|
626
618
|
}
|
|
627
619
|
}
|
|
628
620
|
|
|
629
|
-
|
|
630
|
-
//#region src/shared/tools.ts
|
|
621
|
+
// src/shared/tools.ts
|
|
631
622
|
/**
|
|
632
623
|
* Deep diff between two object
|
|
633
624
|
* @param oneValue The first test value
|
|
@@ -912,8 +903,7 @@ const isNodeEnv = () => {
|
|
|
912
903
|
return typeof process !== "undefined" && process.versions != null && process.versions.node != null;
|
|
913
904
|
};
|
|
914
905
|
|
|
915
|
-
|
|
916
|
-
//#region src/types/enum/auto-fill-series.ts
|
|
906
|
+
// src/types/enum/auto-fill-series.ts
|
|
917
907
|
/**
|
|
918
908
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
919
909
|
*
|
|
@@ -941,8 +931,7 @@ let AutoFillSeries = /* @__PURE__ */ function(AutoFillSeries) {
|
|
|
941
931
|
return AutoFillSeries;
|
|
942
932
|
}({});
|
|
943
933
|
|
|
944
|
-
|
|
945
|
-
//#region src/types/enum/border-style-types.ts
|
|
934
|
+
// src/types/enum/border-style-types.ts
|
|
946
935
|
/**
|
|
947
936
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
948
937
|
*
|
|
@@ -997,8 +986,7 @@ let BorderType = /* @__PURE__ */ function(BorderType) {
|
|
|
997
986
|
return BorderType;
|
|
998
987
|
}({});
|
|
999
988
|
|
|
1000
|
-
|
|
1001
|
-
//#region src/types/enum/color-type.ts
|
|
989
|
+
// src/types/enum/color-type.ts
|
|
1002
990
|
/**
|
|
1003
991
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
1004
992
|
*
|
|
@@ -1022,8 +1010,7 @@ let ColorType = /* @__PURE__ */ function(ColorType) {
|
|
|
1022
1010
|
return ColorType;
|
|
1023
1011
|
}({});
|
|
1024
1012
|
|
|
1025
|
-
|
|
1026
|
-
//#region src/types/enum/common-hide-types.ts
|
|
1013
|
+
// src/types/enum/common-hide-types.ts
|
|
1027
1014
|
/**
|
|
1028
1015
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
1029
1016
|
*
|
|
@@ -1045,8 +1032,7 @@ let CommonHideTypes = /* @__PURE__ */ function(CommonHideTypes) {
|
|
|
1045
1032
|
return CommonHideTypes;
|
|
1046
1033
|
}({});
|
|
1047
1034
|
|
|
1048
|
-
|
|
1049
|
-
//#region src/types/enum/copy-paste-type.ts
|
|
1035
|
+
// src/types/enum/copy-paste-type.ts
|
|
1050
1036
|
/**
|
|
1051
1037
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
1052
1038
|
*
|
|
@@ -1074,8 +1060,7 @@ let CopyPasteType = /* @__PURE__ */ function(CopyPasteType) {
|
|
|
1074
1060
|
return CopyPasteType;
|
|
1075
1061
|
}({});
|
|
1076
1062
|
|
|
1077
|
-
|
|
1078
|
-
//#region src/types/enum/date-system.ts
|
|
1063
|
+
// src/types/enum/date-system.ts
|
|
1079
1064
|
/**
|
|
1080
1065
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
1081
1066
|
*
|
|
@@ -1100,8 +1085,7 @@ let DateSystem = /* @__PURE__ */ function(DateSystem) {
|
|
|
1100
1085
|
return DateSystem;
|
|
1101
1086
|
}({});
|
|
1102
1087
|
|
|
1103
|
-
|
|
1104
|
-
//#region src/types/enum/delete-direction.ts
|
|
1088
|
+
// src/types/enum/delete-direction.ts
|
|
1105
1089
|
/**
|
|
1106
1090
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
1107
1091
|
*
|
|
@@ -1123,8 +1107,7 @@ let DeleteDirection = /* @__PURE__ */ function(DeleteDirection) {
|
|
|
1123
1107
|
return DeleteDirection;
|
|
1124
1108
|
}({});
|
|
1125
1109
|
|
|
1126
|
-
|
|
1127
|
-
//#region src/types/enum/developer-metadata-visibility.ts
|
|
1110
|
+
// src/types/enum/developer-metadata-visibility.ts
|
|
1128
1111
|
/**
|
|
1129
1112
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
1130
1113
|
*
|
|
@@ -1146,8 +1129,7 @@ let DeveloperMetadataVisibility = /* @__PURE__ */ function(DeveloperMetadataVisi
|
|
|
1146
1129
|
return DeveloperMetadataVisibility;
|
|
1147
1130
|
}({});
|
|
1148
1131
|
|
|
1149
|
-
|
|
1150
|
-
//#region src/types/enum/dimension.ts
|
|
1132
|
+
// src/types/enum/dimension.ts
|
|
1151
1133
|
/**
|
|
1152
1134
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
1153
1135
|
*
|
|
@@ -1175,8 +1157,7 @@ let Dimension = /* @__PURE__ */ function(Dimension) {
|
|
|
1175
1157
|
return Dimension;
|
|
1176
1158
|
}({});
|
|
1177
1159
|
|
|
1178
|
-
|
|
1179
|
-
//#region src/types/enum/direction.ts
|
|
1160
|
+
// src/types/enum/direction.ts
|
|
1180
1161
|
/**
|
|
1181
1162
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
1182
1163
|
*
|
|
@@ -1208,8 +1189,7 @@ function getReverseDirection(direction) {
|
|
|
1208
1189
|
}
|
|
1209
1190
|
}
|
|
1210
1191
|
|
|
1211
|
-
|
|
1212
|
-
//#region src/types/enum/interpolation-point-type.ts
|
|
1192
|
+
// src/types/enum/interpolation-point-type.ts
|
|
1213
1193
|
/**
|
|
1214
1194
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
1215
1195
|
*
|
|
@@ -1235,8 +1215,7 @@ let InterpolationPointType = /* @__PURE__ */ function(InterpolationPointType) {
|
|
|
1235
1215
|
return InterpolationPointType;
|
|
1236
1216
|
}({});
|
|
1237
1217
|
|
|
1238
|
-
|
|
1239
|
-
//#region src/types/enum/locale-type.ts
|
|
1218
|
+
// src/types/enum/locale-type.ts
|
|
1240
1219
|
/**
|
|
1241
1220
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
1242
1221
|
*
|
|
@@ -1377,8 +1356,7 @@ const LOCALE_META = {
|
|
|
1377
1356
|
}
|
|
1378
1357
|
};
|
|
1379
1358
|
|
|
1380
|
-
|
|
1381
|
-
//#region src/types/enum/mention-type.ts
|
|
1359
|
+
// src/types/enum/mention-type.ts
|
|
1382
1360
|
/**
|
|
1383
1361
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
1384
1362
|
*
|
|
@@ -1403,8 +1381,7 @@ let MentionType = /* @__PURE__ */ function(MentionType) {
|
|
|
1403
1381
|
return MentionType;
|
|
1404
1382
|
}({});
|
|
1405
1383
|
|
|
1406
|
-
|
|
1407
|
-
//#region src/types/enum/protection-type.ts
|
|
1384
|
+
// src/types/enum/protection-type.ts
|
|
1408
1385
|
/**
|
|
1409
1386
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
1410
1387
|
*
|
|
@@ -1426,8 +1403,7 @@ let ProtectionType = /* @__PURE__ */ function(ProtectionType) {
|
|
|
1426
1403
|
return ProtectionType;
|
|
1427
1404
|
}({});
|
|
1428
1405
|
|
|
1429
|
-
|
|
1430
|
-
//#region src/types/enum/relative-date.ts
|
|
1406
|
+
// src/types/enum/relative-date.ts
|
|
1431
1407
|
/**
|
|
1432
1408
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
1433
1409
|
*
|
|
@@ -1454,8 +1430,7 @@ let RelativeDate = /* @__PURE__ */ function(RelativeDate) {
|
|
|
1454
1430
|
return RelativeDate;
|
|
1455
1431
|
}({});
|
|
1456
1432
|
|
|
1457
|
-
|
|
1458
|
-
//#region src/types/enum/sheet-types.ts
|
|
1433
|
+
// src/types/enum/sheet-types.ts
|
|
1459
1434
|
/**
|
|
1460
1435
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
1461
1436
|
*
|
|
@@ -1475,11 +1450,11 @@ let SheetTypes = /* @__PURE__ */ function(SheetTypes) {
|
|
|
1475
1450
|
SheetTypes[SheetTypes["GRID"] = 0] = "GRID";
|
|
1476
1451
|
SheetTypes[SheetTypes["KANBAN"] = 1] = "KANBAN";
|
|
1477
1452
|
SheetTypes[SheetTypes["GANTT"] = 2] = "GANTT";
|
|
1453
|
+
SheetTypes[SheetTypes["CHART"] = 3] = "CHART";
|
|
1478
1454
|
return SheetTypes;
|
|
1479
1455
|
}({});
|
|
1480
1456
|
|
|
1481
|
-
|
|
1482
|
-
//#region src/types/enum/text-style.ts
|
|
1457
|
+
// src/types/enum/text-style.ts
|
|
1483
1458
|
/**
|
|
1484
1459
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
1485
1460
|
*
|
|
@@ -1622,8 +1597,7 @@ let CellValueType = /* @__PURE__ */ function(CellValueType) {
|
|
|
1622
1597
|
return CellValueType;
|
|
1623
1598
|
}({});
|
|
1624
1599
|
|
|
1625
|
-
|
|
1626
|
-
//#region src/types/enum/theme-color-type.ts
|
|
1600
|
+
// src/types/enum/theme-color-type.ts
|
|
1627
1601
|
/**
|
|
1628
1602
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
1629
1603
|
*
|
|
@@ -1696,13 +1670,11 @@ let ThemeColors = /* @__PURE__ */ function(ThemeColors) {
|
|
|
1696
1670
|
return ThemeColors;
|
|
1697
1671
|
}({});
|
|
1698
1672
|
|
|
1699
|
-
|
|
1700
|
-
//#region package.json
|
|
1673
|
+
// package.json
|
|
1701
1674
|
var name = "@univerjs/core";
|
|
1702
|
-
var version = "1.
|
|
1675
|
+
var version = "1.5.0";
|
|
1703
1676
|
|
|
1704
|
-
|
|
1705
|
-
//#region src/common/array.ts
|
|
1677
|
+
// src/common/array.ts
|
|
1706
1678
|
/**
|
|
1707
1679
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
1708
1680
|
*
|
|
@@ -1788,8 +1760,7 @@ function makeArray(thing) {
|
|
|
1788
1760
|
return [thing];
|
|
1789
1761
|
}
|
|
1790
1762
|
|
|
1791
|
-
|
|
1792
|
-
//#region src/common/di.ts
|
|
1763
|
+
// src/common/di.ts
|
|
1793
1764
|
/**
|
|
1794
1765
|
* Register the dependencies to the injector.
|
|
1795
1766
|
* @param injector The injector to register the dependencies.
|
|
@@ -1809,8 +1780,7 @@ function touchDependencies(injector, dependencies) {
|
|
|
1809
1780
|
});
|
|
1810
1781
|
}
|
|
1811
1782
|
|
|
1812
|
-
|
|
1813
|
-
//#region src/common/error.ts
|
|
1783
|
+
// src/common/error.ts
|
|
1814
1784
|
/**
|
|
1815
1785
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
1816
1786
|
*
|
|
@@ -1839,8 +1809,7 @@ var CanceledError = class extends CustomCommandExecutionError {
|
|
|
1839
1809
|
}
|
|
1840
1810
|
};
|
|
1841
1811
|
|
|
1842
|
-
|
|
1843
|
-
//#region src/common/sequence.ts
|
|
1812
|
+
// src/common/sequence.ts
|
|
1844
1813
|
/**
|
|
1845
1814
|
* Execute promise tasks in sequence, if one of the tasks return false, the sequence will be stopped.
|
|
1846
1815
|
* @param tasks All promise tasks that need to be triggered.
|
|
@@ -1888,8 +1857,7 @@ function sequence(tasks) {
|
|
|
1888
1857
|
};
|
|
1889
1858
|
}
|
|
1890
1859
|
|
|
1891
|
-
|
|
1892
|
-
//#region src/services/config/config.service.ts
|
|
1860
|
+
// src/services/config/config.service.ts
|
|
1893
1861
|
/**
|
|
1894
1862
|
* IConfig provides universal configuration for the whole application.
|
|
1895
1863
|
*/
|
|
@@ -1927,8 +1895,7 @@ var ConfigService = class {
|
|
|
1927
1895
|
}
|
|
1928
1896
|
};
|
|
1929
1897
|
|
|
1930
|
-
|
|
1931
|
-
//#region src/services/context/context.service.ts
|
|
1898
|
+
// src/services/context/context.service.ts
|
|
1932
1899
|
/**
|
|
1933
1900
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
1934
1901
|
*
|
|
@@ -1973,8 +1940,7 @@ var ContextService = class extends Disposable {
|
|
|
1973
1940
|
}
|
|
1974
1941
|
};
|
|
1975
1942
|
|
|
1976
|
-
|
|
1977
|
-
//#region src/services/log/log.service.ts
|
|
1943
|
+
// src/services/log/log.service.ts
|
|
1978
1944
|
/**
|
|
1979
1945
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
1980
1946
|
*
|
|
@@ -2044,16 +2010,14 @@ function hashLogContent(...args) {
|
|
|
2044
2010
|
return args.map((a) => JSON.stringify(a)).join("");
|
|
2045
2011
|
}
|
|
2046
2012
|
|
|
2047
|
-
|
|
2048
|
-
//#region \0@oxc-project+runtime@0.153.0/helpers/esm/decorateParam.js
|
|
2013
|
+
// \0@oxc-project+runtime@0.157.0/helpers/esm/decorateParam.js
|
|
2049
2014
|
function __decorateParam(paramIndex, decorator) {
|
|
2050
2015
|
return function(target, key) {
|
|
2051
2016
|
decorator(target, key, paramIndex);
|
|
2052
2017
|
};
|
|
2053
2018
|
}
|
|
2054
2019
|
|
|
2055
|
-
|
|
2056
|
-
//#region \0@oxc-project+runtime@0.153.0/helpers/esm/decorate.js
|
|
2020
|
+
// \0@oxc-project+runtime@0.157.0/helpers/esm/decorate.js
|
|
2057
2021
|
function __decorate(decorators, target, key, desc) {
|
|
2058
2022
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2059
2023
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -2061,8 +2025,7 @@ function __decorate(decorators, target, key, desc) {
|
|
|
2061
2025
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2062
2026
|
}
|
|
2063
2027
|
|
|
2064
|
-
|
|
2065
|
-
//#region src/services/command/command.service.ts
|
|
2028
|
+
// src/services/command/command.service.ts
|
|
2066
2029
|
/**
|
|
2067
2030
|
* The config key for enabling command execution logging.
|
|
2068
2031
|
* Set via `logCommandExecution` in `IUniverConfig` when calling `new Univer()`.
|
|
@@ -2405,8 +2368,7 @@ function sequenceExecuteAsync(tasks, commandService, options) {
|
|
|
2405
2368
|
return sequenceAsync(promises);
|
|
2406
2369
|
}
|
|
2407
2370
|
|
|
2408
|
-
|
|
2409
|
-
//#region src/shared/rxjs.ts
|
|
2371
|
+
// src/shared/rxjs.ts
|
|
2410
2372
|
/**
|
|
2411
2373
|
* Creates an observable from a callback function.
|
|
2412
2374
|
*
|
|
@@ -2452,8 +2414,7 @@ function convertObservableToBehaviorSubject(observable, initValue) {
|
|
|
2452
2414
|
return subject;
|
|
2453
2415
|
}
|
|
2454
2416
|
|
|
2455
|
-
|
|
2456
|
-
//#region src/shared/after-init-apply.ts
|
|
2417
|
+
// src/shared/after-init-apply.ts
|
|
2457
2418
|
const afterInitApply = (commandService) => {
|
|
2458
2419
|
return new Promise((res) => {
|
|
2459
2420
|
(0, rxjs.merge)(fromCallback(commandService.onCommandExecuted.bind(commandService)).pipe((0, rxjs_operators.filter)(([info]) => {
|
|
@@ -2464,8 +2425,7 @@ const afterInitApply = (commandService) => {
|
|
|
2464
2425
|
});
|
|
2465
2426
|
};
|
|
2466
2427
|
|
|
2467
|
-
|
|
2468
|
-
//#region src/shared/array-search.ts
|
|
2428
|
+
// src/shared/array-search.ts
|
|
2469
2429
|
/**
|
|
2470
2430
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
2471
2431
|
*
|
|
@@ -2567,8 +2527,7 @@ function searchArray(arr, target, firstMatch = false) {
|
|
|
2567
2527
|
return index;
|
|
2568
2528
|
}
|
|
2569
2529
|
|
|
2570
|
-
|
|
2571
|
-
//#region src/shared/blob.ts
|
|
2530
|
+
// src/shared/blob.ts
|
|
2572
2531
|
/**
|
|
2573
2532
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
2574
2533
|
*
|
|
@@ -2589,8 +2548,7 @@ function codeToBlob(code) {
|
|
|
2589
2548
|
return window.URL.createObjectURL(blob);
|
|
2590
2549
|
}
|
|
2591
2550
|
|
|
2592
|
-
|
|
2593
|
-
//#region src/shared/check-if-move.ts
|
|
2551
|
+
// src/shared/check-if-move.ts
|
|
2594
2552
|
const MOVE_BUFFER_VALUE = 2;
|
|
2595
2553
|
const ROTATE_BUFFER_VALUE = 1;
|
|
2596
2554
|
function checkIfMove(transform, previousTransform) {
|
|
@@ -2604,8 +2562,7 @@ function checkIfMove(transform, previousTransform) {
|
|
|
2604
2562
|
return Math.abs(left - leftPrev) > 2 || Math.abs(top - topPrev) > 2 || Math.abs(allWidth - allWidthPrev) > 2 || Math.abs(allHeight - allHeightPrev) > 2 || Math.abs(angle - anglePrev) > 1;
|
|
2605
2563
|
}
|
|
2606
2564
|
|
|
2607
|
-
|
|
2608
|
-
//#region src/shared/color/color-kit.ts
|
|
2565
|
+
// src/shared/color/color-kit.ts
|
|
2609
2566
|
const RGB_PAREN = "rgb(";
|
|
2610
2567
|
const RGBA_PAREN = "rgba(";
|
|
2611
2568
|
const COLORS = {
|
|
@@ -3776,8 +3733,7 @@ function isWhiteColor(color) {
|
|
|
3776
3733
|
return false;
|
|
3777
3734
|
}
|
|
3778
3735
|
|
|
3779
|
-
|
|
3780
|
-
//#region src/shared/command-enum.ts
|
|
3736
|
+
// src/shared/command-enum.ts
|
|
3781
3737
|
/**
|
|
3782
3738
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
3783
3739
|
*
|
|
@@ -3799,8 +3755,7 @@ let UpdateDocsAttributeType = /* @__PURE__ */ function(UpdateDocsAttributeType)
|
|
|
3799
3755
|
return UpdateDocsAttributeType;
|
|
3800
3756
|
}({});
|
|
3801
3757
|
|
|
3802
|
-
|
|
3803
|
-
//#region src/sheets/typedef.ts
|
|
3758
|
+
// src/sheets/typedef.ts
|
|
3804
3759
|
/** Worksheet-only hiding states; row/column and cell flags still use BooleanNumber. */
|
|
3805
3760
|
let WorksheetHiddenState = /* @__PURE__ */ function(WorksheetHiddenState) {
|
|
3806
3761
|
/** Visible in the sheet bar. Preserves the existing hidden: 0 value. */
|
|
@@ -3891,8 +3846,7 @@ let CellModeEnum = /* @__PURE__ */ function(CellModeEnum) {
|
|
|
3891
3846
|
return CellModeEnum;
|
|
3892
3847
|
}({});
|
|
3893
3848
|
|
|
3894
|
-
|
|
3895
|
-
//#region src/types/const/theme-color-map.ts
|
|
3849
|
+
// src/types/const/theme-color-map.ts
|
|
3896
3850
|
const THEME_COLORS = { ["Office"]: {
|
|
3897
3851
|
[4]: "#4472C4",
|
|
3898
3852
|
[5]: "#ED7D31",
|
|
@@ -3908,8 +3862,7 @@ const THEME_COLORS = { ["Office"]: {
|
|
|
3908
3862
|
[11]: "#954F72"
|
|
3909
3863
|
} };
|
|
3910
3864
|
|
|
3911
|
-
|
|
3912
|
-
//#region src/shared/numfmt/constants.ts
|
|
3865
|
+
// src/shared/numfmt/constants.ts
|
|
3913
3866
|
const MIN_L_DATE = -694324;
|
|
3914
3867
|
const MAX_L_DATE = 35830291;
|
|
3915
3868
|
const TOKEN_GENERAL = "general";
|
|
@@ -4034,8 +3987,7 @@ const currencySymbols$1 = [
|
|
|
4034
3987
|
];
|
|
4035
3988
|
const reCurrencySymbols = new RegExp(`[${currencySymbols$1.join("")}]`);
|
|
4036
3989
|
|
|
4037
|
-
|
|
4038
|
-
//#region src/shared/numfmt/decimal.ts
|
|
3990
|
+
// src/shared/numfmt/decimal.ts
|
|
4039
3991
|
function decimalFromNumber(value) {
|
|
4040
3992
|
if (!Number.isFinite(value)) throw new RangeError("decimalFromNumber requires a finite number");
|
|
4041
3993
|
const negative = value < 0 || Object.is(value, -0);
|
|
@@ -4123,8 +4075,7 @@ function roundScientificDecimal(value, integerDigits, hasIntegerPattern, fractio
|
|
|
4123
4075
|
};
|
|
4124
4076
|
}
|
|
4125
4077
|
|
|
4126
|
-
|
|
4127
|
-
//#region src/shared/numfmt/code-to-locale.ts
|
|
4078
|
+
// src/shared/numfmt/code-to-locale.ts
|
|
4128
4079
|
/**
|
|
4129
4080
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
4130
4081
|
*
|
|
@@ -4329,8 +4280,7 @@ const codeToLocale = Object.freeze({
|
|
|
4329
4280
|
1077: "zu"
|
|
4330
4281
|
});
|
|
4331
4282
|
|
|
4332
|
-
|
|
4333
|
-
//#region src/shared/numfmt/locale.ts
|
|
4283
|
+
// src/shared/numfmt/locale.ts
|
|
4334
4284
|
const re_locale = /^([a-z\d]+)(?:[_-]([a-z\d]+))?(?:\.([a-z\d]+))?(?:@([a-z\d]+))?$/i;
|
|
4335
4285
|
const locales = {};
|
|
4336
4286
|
/**
|
|
@@ -5010,8 +4960,7 @@ addLocale({
|
|
|
5010
4960
|
ampm: _("am;pm")
|
|
5011
4961
|
}, "hi");
|
|
5012
4962
|
|
|
5013
|
-
|
|
5014
|
-
//#region src/shared/numfmt/parse-format-section.ts
|
|
4963
|
+
// src/shared/numfmt/parse-format-section.ts
|
|
5015
4964
|
function getNumberPattern(part, prefix) {
|
|
5016
4965
|
switch (prefix) {
|
|
5017
4966
|
case "int": return part.int_pattern;
|
|
@@ -5400,8 +5349,7 @@ function parseFormatSection(inputTokens) {
|
|
|
5400
5349
|
return part;
|
|
5401
5350
|
}
|
|
5402
5351
|
|
|
5403
|
-
|
|
5404
|
-
//#region src/shared/numfmt/clamp.ts
|
|
5352
|
+
// src/shared/numfmt/clamp.ts
|
|
5405
5353
|
/**
|
|
5406
5354
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
5407
5355
|
*
|
|
@@ -5424,8 +5372,7 @@ function clamp(number) {
|
|
|
5424
5372
|
return isFinite(mag) ? Math.round(number * mag) / mag : 0;
|
|
5425
5373
|
}
|
|
5426
5374
|
|
|
5427
|
-
|
|
5428
|
-
//#region src/shared/numfmt/dec-to-frac.ts
|
|
5375
|
+
// src/shared/numfmt/dec-to-frac.ts
|
|
5429
5376
|
/**
|
|
5430
5377
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
5431
5378
|
*
|
|
@@ -5482,8 +5429,7 @@ function dec2frac(number, numeratorMaxDigits = 2, denominatorMaxDigits = 2) {
|
|
|
5482
5429
|
return r;
|
|
5483
5430
|
}
|
|
5484
5431
|
|
|
5485
|
-
|
|
5486
|
-
//#region src/shared/numfmt/num-dec.ts
|
|
5432
|
+
// src/shared/numfmt/num-dec.ts
|
|
5487
5433
|
const ZERO_DIGITS = {
|
|
5488
5434
|
total: 1,
|
|
5489
5435
|
sign: 0,
|
|
@@ -5509,8 +5455,7 @@ function numDec(value, includeSign = true) {
|
|
|
5509
5455
|
};
|
|
5510
5456
|
}
|
|
5511
5457
|
|
|
5512
|
-
|
|
5513
|
-
//#region src/shared/numfmt/number-props.ts
|
|
5458
|
+
// src/shared/numfmt/number-props.ts
|
|
5514
5459
|
/**
|
|
5515
5460
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
5516
5461
|
*
|
|
@@ -5535,8 +5480,7 @@ function getSignificand(number, exponent = 1) {
|
|
|
5535
5480
|
return number * 10 ** -exponent;
|
|
5536
5481
|
}
|
|
5537
5482
|
|
|
5538
|
-
|
|
5539
|
-
//#region src/shared/numfmt/round.ts
|
|
5483
|
+
// src/shared/numfmt/round.ts
|
|
5540
5484
|
/**
|
|
5541
5485
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
5542
5486
|
*
|
|
@@ -5570,8 +5514,7 @@ function round(number, places = 0) {
|
|
|
5570
5514
|
return Number.isFinite(rounded) ? rounded : number;
|
|
5571
5515
|
}
|
|
5572
5516
|
|
|
5573
|
-
|
|
5574
|
-
//#region src/shared/numfmt/general.ts
|
|
5517
|
+
// src/shared/numfmt/general.ts
|
|
5575
5518
|
function fixLocale(value, locale) {
|
|
5576
5519
|
return value.replace(/\./, locale.decimal);
|
|
5577
5520
|
}
|
|
@@ -5648,8 +5591,7 @@ function general(output, part, value, locale, decimalValue = null) {
|
|
|
5648
5591
|
return output;
|
|
5649
5592
|
}
|
|
5650
5593
|
|
|
5651
|
-
|
|
5652
|
-
//#region src/shared/numfmt/pad.ts
|
|
5594
|
+
// src/shared/numfmt/pad.ts
|
|
5653
5595
|
/**
|
|
5654
5596
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
5655
5597
|
*
|
|
@@ -5677,8 +5619,7 @@ function pad$1(char, nbsp = false) {
|
|
|
5677
5619
|
return "";
|
|
5678
5620
|
}
|
|
5679
5621
|
|
|
5680
|
-
|
|
5681
|
-
//#region src/shared/numfmt/to-ymd.ts
|
|
5622
|
+
// src/shared/numfmt/to-ymd.ts
|
|
5682
5623
|
const floor$1 = Math.floor;
|
|
5683
5624
|
function toYMD1900(serial, leap1900 = true) {
|
|
5684
5625
|
if (leap1900 && serial >= 0) {
|
|
@@ -5754,8 +5695,7 @@ function toYMD(serial, system = 0, leap1900 = true) {
|
|
|
5754
5695
|
return toYMD1900(int, leap1900);
|
|
5755
5696
|
}
|
|
5756
5697
|
|
|
5757
|
-
|
|
5758
|
-
//#region src/shared/numfmt/serial-date.ts
|
|
5698
|
+
// src/shared/numfmt/serial-date.ts
|
|
5759
5699
|
const floor = Math.floor;
|
|
5760
5700
|
const DAYSIZE$1 = 86400;
|
|
5761
5701
|
const MILLISECONDS_PER_DAY = DAYSIZE$1 * 1e3;
|
|
@@ -5923,8 +5863,7 @@ function dateFromSerial(serial, options) {
|
|
|
5923
5863
|
];
|
|
5924
5864
|
}
|
|
5925
5865
|
|
|
5926
|
-
|
|
5927
|
-
//#region src/shared/numfmt/run-part.ts
|
|
5866
|
+
// src/shared/numfmt/run-part.ts
|
|
5928
5867
|
const DAYSIZE = 86400;
|
|
5929
5868
|
function dateOverflows(inputValue, roundedValue, bigRange, dateSystem) {
|
|
5930
5869
|
if (bigRange) return inputValue < -694324 || roundedValue >= 35830291;
|
|
@@ -6238,8 +6177,7 @@ function runPart(value, part, options, locale, decimalValue = null) {
|
|
|
6238
6177
|
return output.join("");
|
|
6239
6178
|
}
|
|
6240
6179
|
|
|
6241
|
-
|
|
6242
|
-
//#region src/shared/numfmt/format-number.ts
|
|
6180
|
+
// src/shared/numfmt/format-number.ts
|
|
6243
6181
|
const defaultText = parseFormatSection([{
|
|
6244
6182
|
type: TOKEN_TEXT,
|
|
6245
6183
|
value: "@",
|
|
@@ -6296,8 +6234,7 @@ function formatValue(value, pattern, options) {
|
|
|
6296
6234
|
return part ? runPart(value, part, options, locale, decimalValue) : options.overflow;
|
|
6297
6235
|
}
|
|
6298
6236
|
|
|
6299
|
-
|
|
6300
|
-
//#region src/shared/numfmt/date-time-edit-pattern.ts
|
|
6237
|
+
// src/shared/numfmt/date-time-edit-pattern.ts
|
|
6301
6238
|
function isParsedSection$1(section) {
|
|
6302
6239
|
return !!section && "scale" in section;
|
|
6303
6240
|
}
|
|
@@ -6418,8 +6355,7 @@ function createDateTimeEditPattern(partitions, value) {
|
|
|
6418
6355
|
return datePattern ?? timePattern;
|
|
6419
6356
|
}
|
|
6420
6357
|
|
|
6421
|
-
|
|
6422
|
-
//#region src/shared/numfmt/format-info.ts
|
|
6358
|
+
// src/shared/numfmt/format-info.ts
|
|
6423
6359
|
function isParsedSection(part) {
|
|
6424
6360
|
return !!part && "scale" in part;
|
|
6425
6361
|
}
|
|
@@ -6573,8 +6509,7 @@ function dateInfo(partitions) {
|
|
|
6573
6509
|
};
|
|
6574
6510
|
}
|
|
6575
6511
|
|
|
6576
|
-
|
|
6577
|
-
//#region src/shared/numfmt/options.ts
|
|
6512
|
+
// src/shared/numfmt/options.ts
|
|
6578
6513
|
const defaultOptions = {
|
|
6579
6514
|
overflow: "######",
|
|
6580
6515
|
dateErrorThrows: false,
|
|
@@ -6594,8 +6529,7 @@ const defaultOptions = {
|
|
|
6594
6529
|
fillChar: ""
|
|
6595
6530
|
};
|
|
6596
6531
|
|
|
6597
|
-
|
|
6598
|
-
//#region src/shared/numfmt/tokenize.ts
|
|
6532
|
+
// src/shared/numfmt/tokenize.ts
|
|
6599
6533
|
const tokenHandlers = [
|
|
6600
6534
|
[
|
|
6601
6535
|
TOKEN_GENERAL,
|
|
@@ -6848,8 +6782,7 @@ function tokenize(pattern) {
|
|
|
6848
6782
|
return tokens;
|
|
6849
6783
|
}
|
|
6850
6784
|
|
|
6851
|
-
|
|
6852
|
-
//#region src/shared/numfmt/parse-pattern.ts
|
|
6785
|
+
// src/shared/numfmt/parse-pattern.ts
|
|
6853
6786
|
function maybeAddMinus(part) {
|
|
6854
6787
|
var _part$condition, _part$condition2;
|
|
6855
6788
|
const operator = (_part$condition = part.condition) === null || _part$condition === void 0 ? void 0 : _part$condition[0];
|
|
@@ -6960,8 +6893,7 @@ function parsePattern(pattern) {
|
|
|
6960
6893
|
};
|
|
6961
6894
|
}
|
|
6962
6895
|
|
|
6963
|
-
|
|
6964
|
-
//#region src/shared/numfmt/parse-value.ts
|
|
6896
|
+
// src/shared/numfmt/parse-value.ts
|
|
6965
6897
|
const okDateFormats = [
|
|
6966
6898
|
"!d-m-y",
|
|
6967
6899
|
"!d-m-Y",
|
|
@@ -7471,8 +7403,7 @@ function parseValue(value, options) {
|
|
|
7471
7403
|
return parseNumber(value, options) ?? parseDate(value, options) ?? parseTime(value, options) ?? parseBool(value, options);
|
|
7472
7404
|
}
|
|
7473
7405
|
|
|
7474
|
-
|
|
7475
|
-
//#region src/shared/numfmt/api.ts
|
|
7406
|
+
// src/shared/numfmt/api.ts
|
|
7476
7407
|
var api_exports = /* @__PURE__ */ __exportAll({
|
|
7477
7408
|
addLocale: () => addLocale,
|
|
7478
7409
|
dateFromSerial: () => dateFromSerial,
|
|
@@ -7623,8 +7554,7 @@ const tokenTypes = Object.freeze({
|
|
|
7623
7554
|
ZERO: TOKEN_ZERO
|
|
7624
7555
|
});
|
|
7625
7556
|
|
|
7626
|
-
|
|
7627
|
-
//#region src/common/regexp/factory.ts
|
|
7557
|
+
// src/common/regexp/factory.ts
|
|
7628
7558
|
/**
|
|
7629
7559
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
7630
7560
|
*
|
|
@@ -7664,8 +7594,7 @@ function normalizeRegExpFlags(flags) {
|
|
|
7664
7594
|
return flags;
|
|
7665
7595
|
}
|
|
7666
7596
|
|
|
7667
|
-
|
|
7668
|
-
//#region src/common/regexp/charset.ts
|
|
7597
|
+
// src/common/regexp/charset.ts
|
|
7669
7598
|
/**
|
|
7670
7599
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
7671
7600
|
*
|
|
@@ -7798,8 +7727,7 @@ function escapeCharClassCodePoint(point) {
|
|
|
7798
7727
|
return char;
|
|
7799
7728
|
}
|
|
7800
7729
|
|
|
7801
|
-
|
|
7802
|
-
//#region src/common/regexp/escape.ts
|
|
7730
|
+
// src/common/regexp/escape.ts
|
|
7803
7731
|
/**
|
|
7804
7732
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
7805
7733
|
*
|
|
@@ -7838,8 +7766,7 @@ function createFromWildcard(pattern) {
|
|
|
7838
7766
|
return createRegExpFromSafeFragment(`^${source}$`, "i");
|
|
7839
7767
|
}
|
|
7840
7768
|
|
|
7841
|
-
|
|
7842
|
-
//#region src/common/regexp/or.ts
|
|
7769
|
+
// src/common/regexp/or.ts
|
|
7843
7770
|
/**
|
|
7844
7771
|
* Builds a regex alternation from literal strings and character sets.
|
|
7845
7772
|
*
|
|
@@ -7901,8 +7828,7 @@ var Or = class Or {
|
|
|
7901
7828
|
*/
|
|
7902
7829
|
const or = (...inputs) => new Or(...inputs);
|
|
7903
7830
|
|
|
7904
|
-
|
|
7905
|
-
//#region src/common/regexp/index.ts
|
|
7831
|
+
// src/common/regexp/index.ts
|
|
7906
7832
|
/**
|
|
7907
7833
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
7908
7834
|
*
|
|
@@ -7937,8 +7863,7 @@ const regexp = {
|
|
|
7937
7863
|
createFromWildcard
|
|
7938
7864
|
};
|
|
7939
7865
|
|
|
7940
|
-
|
|
7941
|
-
//#region src/shared/numfmt/utils.ts
|
|
7866
|
+
// src/shared/numfmt/utils.ts
|
|
7942
7867
|
const DEFAULT_TEXT_FORMAT = "@@@";
|
|
7943
7868
|
const DEFAULT_TEXT_FORMAT_EXCEL = "@";
|
|
7944
7869
|
const DEFAULT_NUMBER_FORMAT = "General";
|
|
@@ -8078,8 +8003,7 @@ const getNumfmtParseValueFilter = (value, options = {}) => {
|
|
|
8078
8003
|
return parseData;
|
|
8079
8004
|
};
|
|
8080
8005
|
|
|
8081
|
-
|
|
8082
|
-
//#region src/shared/object-matrix.ts
|
|
8006
|
+
// src/shared/object-matrix.ts
|
|
8083
8007
|
function mapObjectMatrix(o, callback) {
|
|
8084
8008
|
const result = {};
|
|
8085
8009
|
for (const row in o) {
|
|
@@ -8616,8 +8540,7 @@ var ObjectMatrix = class ObjectMatrix {
|
|
|
8616
8540
|
}
|
|
8617
8541
|
};
|
|
8618
8542
|
|
|
8619
|
-
|
|
8620
|
-
//#region src/shared/common.ts
|
|
8543
|
+
// src/shared/common.ts
|
|
8621
8544
|
/**
|
|
8622
8545
|
* Data type convert, convert ICellWithCoord to IRangeWithCoord
|
|
8623
8546
|
* @param cellInfo
|
|
@@ -8916,7 +8839,29 @@ function cellToRange(row, col) {
|
|
|
8916
8839
|
};
|
|
8917
8840
|
}
|
|
8918
8841
|
/**
|
|
8842
|
+
* Writing content replaces the target formula, and writing a new formula disassociates the target
|
|
8843
|
+
* from its shared formula id. The formula controller performs both removals for the current client
|
|
8844
|
+
* with an `onlyLocal` mutation, which never reaches a collaboration changeset, so they have to be
|
|
8845
|
+
* part of the write itself.
|
|
8846
|
+
* @param {ICellData} cell - The cell data to normalize.
|
|
8847
|
+
* @returns {ICellData} The same instance when no formula identity has to be removed.
|
|
8848
|
+
*/
|
|
8849
|
+
function withFormulaIdentityCleared(cell) {
|
|
8850
|
+
if (cell.si !== void 0) return cell;
|
|
8851
|
+
if (cell.f !== void 0) return {
|
|
8852
|
+
...cell,
|
|
8853
|
+
si: null
|
|
8854
|
+
};
|
|
8855
|
+
if (cell.v === void 0 && cell.p === void 0) return cell;
|
|
8856
|
+
return {
|
|
8857
|
+
...cell,
|
|
8858
|
+
f: null,
|
|
8859
|
+
si: null
|
|
8860
|
+
};
|
|
8861
|
+
}
|
|
8862
|
+
/**
|
|
8919
8863
|
* Covert cell value to cell data.
|
|
8864
|
+
* A formula or content value also clears the shared formula id of the cell it replaces.
|
|
8920
8865
|
* @param {CellValue | ICellData} value - The cell value.
|
|
8921
8866
|
* @returns {ICellData} The cell data.
|
|
8922
8867
|
*/
|
|
@@ -8924,7 +8869,8 @@ function covertCellValue(value) {
|
|
|
8924
8869
|
if (isFormulaString(value)) return {
|
|
8925
8870
|
f: value,
|
|
8926
8871
|
v: null,
|
|
8927
|
-
p: null
|
|
8872
|
+
p: null,
|
|
8873
|
+
si: null
|
|
8928
8874
|
};
|
|
8929
8875
|
if (isCellV(value)) {
|
|
8930
8876
|
if (typeof value === "string") {
|
|
@@ -8933,16 +8879,18 @@ function covertCellValue(value) {
|
|
|
8933
8879
|
v: parseData.v,
|
|
8934
8880
|
p: null,
|
|
8935
8881
|
f: null,
|
|
8882
|
+
si: null,
|
|
8936
8883
|
s: { n: { pattern: parseData.z || "General" } }
|
|
8937
8884
|
};
|
|
8938
8885
|
}
|
|
8939
8886
|
return {
|
|
8940
8887
|
v: value,
|
|
8941
8888
|
p: null,
|
|
8942
|
-
f: null
|
|
8889
|
+
f: null,
|
|
8890
|
+
si: null
|
|
8943
8891
|
};
|
|
8944
8892
|
}
|
|
8945
|
-
if (isICellData(value)) return value;
|
|
8893
|
+
if (isICellData(value)) return withFormulaIdentityCleared(value);
|
|
8946
8894
|
return value;
|
|
8947
8895
|
}
|
|
8948
8896
|
/**
|
|
@@ -8961,8 +8909,7 @@ function covertCellValues(value, range) {
|
|
|
8961
8909
|
return cellValue.getMatrix();
|
|
8962
8910
|
}
|
|
8963
8911
|
|
|
8964
|
-
|
|
8965
|
-
//#region src/shared/compare.ts
|
|
8912
|
+
// src/shared/compare.ts
|
|
8966
8913
|
function deepCompare(arg1, arg2) {
|
|
8967
8914
|
if (Object.prototype.toString.call(arg1) === Object.prototype.toString.call(arg2)) {
|
|
8968
8915
|
if (Object.prototype.toString.call(arg1) === "[object Object]" || Object.prototype.toString.call(arg1) === "[object Array]") {
|
|
@@ -8988,8 +8935,7 @@ function checkForSubstrings(searchString, substrings) {
|
|
|
8988
8935
|
return substrings.some((substring) => searchString.indexOf(substring) > -1);
|
|
8989
8936
|
}
|
|
8990
8937
|
|
|
8991
|
-
|
|
8992
|
-
//#region src/shared/date-kit.ts
|
|
8938
|
+
// src/shared/date-kit.ts
|
|
8993
8939
|
const SECOND = 1e3;
|
|
8994
8940
|
const MINUTE = 60 * SECOND;
|
|
8995
8941
|
const HOUR = 60 * MINUTE;
|
|
@@ -9378,8 +9324,7 @@ const dateKit = Object.assign(createDateKit, {
|
|
|
9378
9324
|
unix: (timestamp) => createDateKit(timestamp * 1e3)
|
|
9379
9325
|
});
|
|
9380
9326
|
|
|
9381
|
-
|
|
9382
|
-
//#region src/shared/doc-tool.ts
|
|
9327
|
+
// src/shared/doc-tool.ts
|
|
9383
9328
|
function horizontalLineSegmentsSubtraction(aStart, aEnd, bStart, bEnd) {
|
|
9384
9329
|
if (aStart > aEnd) throw new Error("a1 should be less than a2");
|
|
9385
9330
|
if (bStart > bEnd) throw new Error("b1 should be less than b2");
|
|
@@ -9415,8 +9360,7 @@ function deleteContent(content, start, end) {
|
|
|
9415
9360
|
return content.slice(0, start) + content.slice(end);
|
|
9416
9361
|
}
|
|
9417
9362
|
|
|
9418
|
-
|
|
9419
|
-
//#region src/shared/generate.ts
|
|
9363
|
+
// src/shared/generate.ts
|
|
9420
9364
|
/**
|
|
9421
9365
|
* Determine whether it is a pure number, "12" and "12e+3" are both true
|
|
9422
9366
|
* @param val The number or string to be judged
|
|
@@ -9434,8 +9378,7 @@ function isRealNum(val) {
|
|
|
9434
9378
|
return false;
|
|
9435
9379
|
}
|
|
9436
9380
|
|
|
9437
|
-
|
|
9438
|
-
//#region src/shared/hash-algorithm.ts
|
|
9381
|
+
// src/shared/hash-algorithm.ts
|
|
9439
9382
|
/**
|
|
9440
9383
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
9441
9384
|
*
|
|
@@ -9457,8 +9400,7 @@ function hashAlgorithm(str) {
|
|
|
9457
9400
|
return hash >>> 0;
|
|
9458
9401
|
}
|
|
9459
9402
|
|
|
9460
|
-
|
|
9461
|
-
//#region src/shared/intervals.ts
|
|
9403
|
+
// src/shared/intervals.ts
|
|
9462
9404
|
/**
|
|
9463
9405
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
9464
9406
|
*
|
|
@@ -9519,8 +9461,7 @@ function mergeIntervals(intervals) {
|
|
|
9519
9461
|
return merged;
|
|
9520
9462
|
}
|
|
9521
9463
|
|
|
9522
|
-
|
|
9523
|
-
//#region src/shared/locale.ts
|
|
9464
|
+
// src/shared/locale.ts
|
|
9524
9465
|
/**
|
|
9525
9466
|
* Merges multiple locale objects into a single locale object.
|
|
9526
9467
|
* It can accept either multiple locale objects as arguments or a single array of locale objects.
|
|
@@ -9534,8 +9475,7 @@ function mergeLocales(...locales) {
|
|
|
9534
9475
|
return Object.assign({}, ...mergedLocales);
|
|
9535
9476
|
}
|
|
9536
9477
|
|
|
9537
|
-
|
|
9538
|
-
//#region src/shared/lru/lru-map.ts
|
|
9478
|
+
// src/shared/lru/lru-map.ts
|
|
9539
9479
|
let _Symbol$iterator;
|
|
9540
9480
|
let _Symbol$iterator2;
|
|
9541
9481
|
let _Symbol$iterator3;
|
|
@@ -9841,8 +9781,7 @@ var LRUHelper = class {
|
|
|
9841
9781
|
}
|
|
9842
9782
|
};
|
|
9843
9783
|
|
|
9844
|
-
|
|
9845
|
-
//#region src/shared/max-row-column.ts
|
|
9784
|
+
// src/shared/max-row-column.ts
|
|
9846
9785
|
/**
|
|
9847
9786
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
9848
9787
|
*
|
|
@@ -9880,8 +9819,7 @@ function columnLabelToNumber(label) {
|
|
|
9880
9819
|
const MAX_ROW_COUNT = 1048576;
|
|
9881
9820
|
const MAX_COLUMN_COUNT = 16384;
|
|
9882
9821
|
|
|
9883
|
-
|
|
9884
|
-
//#region src/shared/random-id.ts
|
|
9822
|
+
// src/shared/random-id.ts
|
|
9885
9823
|
/**
|
|
9886
9824
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
9887
9825
|
*
|
|
@@ -9930,8 +9868,7 @@ function generateRandomId(n = 21, alphabet) {
|
|
|
9930
9868
|
return createRandomId(n, alphabet);
|
|
9931
9869
|
}
|
|
9932
9870
|
|
|
9933
|
-
|
|
9934
|
-
//#region src/shared/rectangle.ts
|
|
9871
|
+
// src/shared/rectangle.ts
|
|
9935
9872
|
/**
|
|
9936
9873
|
* This class provides a set of methods to calculate and manipulate rectangular ranges (IRange).
|
|
9937
9874
|
* A range represents a rectangular area in a grid, defined by start/end rows and columns.
|
|
@@ -10364,8 +10301,7 @@ _defineProperty(Rectangle, "moveOffset", (range, offsetX, offsetY) => {
|
|
|
10364
10301
|
return _range;
|
|
10365
10302
|
});
|
|
10366
10303
|
|
|
10367
|
-
|
|
10368
|
-
//#region src/shared/range.ts
|
|
10304
|
+
// src/shared/range.ts
|
|
10369
10305
|
function moveRangeByOffset(range, refOffsetX, refOffsetY, ignoreAbsolute = false) {
|
|
10370
10306
|
if (refOffsetX === 0 && refOffsetY === 0) return range;
|
|
10371
10307
|
let newRange = { ...range };
|
|
@@ -10624,8 +10560,7 @@ function inferRangeType(startRow, endRow, startColumn, endColumn) {
|
|
|
10624
10560
|
else return 3;
|
|
10625
10561
|
}
|
|
10626
10562
|
|
|
10627
|
-
|
|
10628
|
-
//#region src/shared/ref-alias.ts
|
|
10563
|
+
// src/shared/ref-alias.ts
|
|
10629
10564
|
/**
|
|
10630
10565
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
10631
10566
|
*
|
|
@@ -10718,16 +10653,14 @@ var RefAlias = class {
|
|
|
10718
10653
|
}
|
|
10719
10654
|
};
|
|
10720
10655
|
|
|
10721
|
-
|
|
10722
|
-
//#region src/shared/row-col-iter.ts
|
|
10656
|
+
// src/shared/row-col-iter.ts
|
|
10723
10657
|
function createRowColIter(rowStart, rowEnd, colStart, colEnd) {
|
|
10724
10658
|
return { forEach(cb) {
|
|
10725
10659
|
for (let r = rowStart; r <= rowEnd; r++) for (let c = colStart; c <= colEnd; c++) cb(r, c);
|
|
10726
10660
|
} };
|
|
10727
10661
|
}
|
|
10728
10662
|
|
|
10729
|
-
|
|
10730
|
-
//#region src/shared/sequence.ts
|
|
10663
|
+
// src/shared/sequence.ts
|
|
10731
10664
|
/**
|
|
10732
10665
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
10733
10666
|
*
|
|
@@ -10801,8 +10734,7 @@ function numberToListABC(n, uppercase = false) {
|
|
|
10801
10734
|
return repeatStringNumTimes(String.fromCharCode(n % len + order), Math.floor(n / len) + 1);
|
|
10802
10735
|
}
|
|
10803
10736
|
|
|
10804
|
-
|
|
10805
|
-
//#region src/shared/sort-rules.ts
|
|
10737
|
+
// src/shared/sort-rules.ts
|
|
10806
10738
|
/**
|
|
10807
10739
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
10808
10740
|
*
|
|
@@ -10842,8 +10774,7 @@ function sortRulesFactory(key = "index", ruler = 1) {
|
|
|
10842
10774
|
};
|
|
10843
10775
|
}
|
|
10844
10776
|
|
|
10845
|
-
|
|
10846
|
-
//#region src/bases/typedef.ts
|
|
10777
|
+
// src/bases/typedef.ts
|
|
10847
10778
|
let BaseFieldType = /* @__PURE__ */ function(BaseFieldType) {
|
|
10848
10779
|
BaseFieldType["Text"] = "text";
|
|
10849
10780
|
BaseFieldType["SingleSelect"] = "singleSelect";
|
|
@@ -10968,8 +10899,7 @@ let BaseHierarchyInvalidReason = /* @__PURE__ */ function(BaseHierarchyInvalidRe
|
|
|
10968
10899
|
return BaseHierarchyInvalidReason;
|
|
10969
10900
|
}({});
|
|
10970
10901
|
|
|
10971
|
-
|
|
10972
|
-
//#region src/bases/record-identity.ts
|
|
10902
|
+
// src/bases/record-identity.ts
|
|
10973
10903
|
const BASE_RECORD_ID_FIELD_ID = "__record_id";
|
|
10974
10904
|
const BASE_RECORD_ID_FIELD_NAME = "record-id";
|
|
10975
10905
|
const BASE_RECORD_ID_PATTERN = /^[A-Za-z0-9_-]+$/;
|
|
@@ -11000,8 +10930,7 @@ function assertBaseTableRecordIdentity(table) {
|
|
|
11000
10930
|
for (const [recordKey, record] of Object.entries(table.records)) if (record.id !== recordKey || !isValidBaseRecordId(record.id) || record.values["__record_id"] !== record.id) throw new Error(`[BaseDataModel]: record "${recordKey}" has an invalid record-id projection.`);
|
|
11001
10931
|
}
|
|
11002
10932
|
|
|
11003
|
-
|
|
11004
|
-
//#region src/bases/empty-snapshot.ts
|
|
10933
|
+
// src/bases/empty-snapshot.ts
|
|
11005
10934
|
function createDefaultBaseTableSnapshot(options) {
|
|
11006
10935
|
const now = options.now ?? Date.now();
|
|
11007
10936
|
const primaryFieldId = options.primaryFieldId ?? generateRandomId(6);
|
|
@@ -11096,8 +11025,7 @@ function getEmptySnapshot(unitId = generateRandomId(), name = "", locale = "zhCN
|
|
|
11096
11025
|
};
|
|
11097
11026
|
}
|
|
11098
11027
|
|
|
11099
|
-
|
|
11100
|
-
//#region src/bases/base-data-model.ts
|
|
11028
|
+
// src/bases/base-data-model.ts
|
|
11101
11029
|
const BASE_LIST_VALUE_SEPARATOR = ", ";
|
|
11102
11030
|
const BASE_ATTACHMENT_RESOURCE_KEY_SEPARATOR = "";
|
|
11103
11031
|
var BaseDataModel = class extends UnitModel {
|
|
@@ -11427,8 +11355,7 @@ function normalizeBaseCellValueType(type, value) {
|
|
|
11427
11355
|
return inferPrimitiveType(value ?? null);
|
|
11428
11356
|
}
|
|
11429
11357
|
|
|
11430
|
-
|
|
11431
|
-
//#region src/bases/formula-table-name.ts
|
|
11358
|
+
// src/bases/formula-table-name.ts
|
|
11432
11359
|
function normalizeBaseFormulaTableName(displayName) {
|
|
11433
11360
|
const replaced = displayName.trim().replace(/[^A-Za-z0-9_.]+/g, "_");
|
|
11434
11361
|
const normalized = /[A-Za-z0-9]/.test(replaced) ? replaced : "Table";
|
|
@@ -11592,8 +11519,7 @@ function scanFormulaStringState(formula, start, end, initialState) {
|
|
|
11592
11519
|
return inString;
|
|
11593
11520
|
}
|
|
11594
11521
|
|
|
11595
|
-
|
|
11596
|
-
//#region src/common/boolean.ts
|
|
11522
|
+
// src/common/boolean.ts
|
|
11597
11523
|
/**
|
|
11598
11524
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
11599
11525
|
*
|
|
@@ -11614,8 +11540,7 @@ function isBooleanString(str) {
|
|
|
11614
11540
|
return BooleanStringSet.has(str.toLowerCase());
|
|
11615
11541
|
}
|
|
11616
11542
|
|
|
11617
|
-
|
|
11618
|
-
//#region src/common/const.ts
|
|
11543
|
+
// src/common/const.ts
|
|
11619
11544
|
/**
|
|
11620
11545
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
11621
11546
|
*
|
|
@@ -11649,8 +11574,7 @@ function isCommentEditorID(id) {
|
|
|
11649
11574
|
return id.startsWith(DOCS_COMMENT_EDITOR_UNIT_ID_KEY);
|
|
11650
11575
|
}
|
|
11651
11576
|
|
|
11652
|
-
|
|
11653
|
-
//#region src/types/interfaces/i-drawing.ts
|
|
11577
|
+
// src/types/interfaces/i-drawing.ts
|
|
11654
11578
|
/**
|
|
11655
11579
|
* The layer type of Drawing, used to distinguish between forward, backward, front, and back
|
|
11656
11580
|
*/
|
|
@@ -11729,11 +11653,12 @@ let DrawingTypeEnum = /* @__PURE__ */ function(DrawingTypeEnum) {
|
|
|
11729
11653
|
* Spreadsheet Timeline control.
|
|
11730
11654
|
*/
|
|
11731
11655
|
DrawingTypeEnum[DrawingTypeEnum["DRAWING_TIMELINE"] = 11] = "DRAWING_TIMELINE";
|
|
11656
|
+
/** Independent Office attachment; its preview image is separate from its original file. */
|
|
11657
|
+
DrawingTypeEnum[DrawingTypeEnum["DRAWING_OLE"] = 12] = "DRAWING_OLE";
|
|
11732
11658
|
return DrawingTypeEnum;
|
|
11733
11659
|
}({});
|
|
11734
11660
|
|
|
11735
|
-
|
|
11736
|
-
//#region src/common/drawing-order.ts
|
|
11661
|
+
// src/common/drawing-order.ts
|
|
11737
11662
|
/** Clamps a requested zero-based index to an available drawing order. */
|
|
11738
11663
|
function normalizeDrawingOrderIndex(index, length) {
|
|
11739
11664
|
const lastIndex = Math.max(0, length - 1);
|
|
@@ -11748,8 +11673,7 @@ function getDrawingOrderIndex(currentIndex, length, arrangeType) {
|
|
|
11748
11673
|
return 0;
|
|
11749
11674
|
}
|
|
11750
11675
|
|
|
11751
|
-
|
|
11752
|
-
//#region src/common/equal.ts
|
|
11676
|
+
// src/common/equal.ts
|
|
11753
11677
|
/**
|
|
11754
11678
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
11755
11679
|
*
|
|
@@ -11780,8 +11704,7 @@ function shallowEqual(objA, objB) {
|
|
|
11780
11704
|
return true;
|
|
11781
11705
|
}
|
|
11782
11706
|
|
|
11783
|
-
|
|
11784
|
-
//#region src/common/function.ts
|
|
11707
|
+
// src/common/function.ts
|
|
11785
11708
|
/**
|
|
11786
11709
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
11787
11710
|
*
|
|
@@ -11824,8 +11747,7 @@ function throttle(fn, wait = 16) {
|
|
|
11824
11747
|
};
|
|
11825
11748
|
}
|
|
11826
11749
|
|
|
11827
|
-
|
|
11828
|
-
//#region src/common/interceptor.ts
|
|
11750
|
+
// src/common/interceptor.ts
|
|
11829
11751
|
let InterceptorEffectEnum = /* @__PURE__ */ function(InterceptorEffectEnum) {
|
|
11830
11752
|
InterceptorEffectEnum[InterceptorEffectEnum["Style"] = 1] = "Style";
|
|
11831
11753
|
InterceptorEffectEnum[InterceptorEffectEnum["Value"] = 2] = "Value";
|
|
@@ -11855,8 +11777,9 @@ const composeInterceptors = (interceptors) => function(initialValue, context) {
|
|
|
11855
11777
|
}
|
|
11856
11778
|
return value;
|
|
11857
11779
|
};
|
|
11858
|
-
var InterceptorManager = class {
|
|
11780
|
+
var InterceptorManager = class extends Disposable {
|
|
11859
11781
|
constructor(interceptorPoints) {
|
|
11782
|
+
super();
|
|
11860
11783
|
_defineProperty(this, "_interceptorsByName", /* @__PURE__ */ new Map());
|
|
11861
11784
|
_defineProperty(this, "_interceptorPoints", void 0);
|
|
11862
11785
|
this._interceptorPoints = interceptorPoints;
|
|
@@ -11867,26 +11790,41 @@ var InterceptorManager = class {
|
|
|
11867
11790
|
* @param filter A callback function to filter the interceptors.
|
|
11868
11791
|
* @returns It will return a composed interceptor function. If you will perform the interceptor repeatedly,
|
|
11869
11792
|
* you should cache the result instead of calling this function multiple times.
|
|
11793
|
+
* A cached chain cannot start a new call after this manager is disposed.
|
|
11870
11794
|
*/
|
|
11871
11795
|
fetchThroughInterceptors(name, filter) {
|
|
11796
|
+
this.ensureNotDisposed();
|
|
11872
11797
|
const key = name;
|
|
11873
11798
|
let interceptors = this._interceptorsByName.get(key);
|
|
11874
11799
|
if (filter) interceptors = interceptors.filter(filter);
|
|
11875
|
-
|
|
11800
|
+
const handler = composeInterceptors(interceptors || []);
|
|
11801
|
+
return (initialValue, context) => {
|
|
11802
|
+
this.ensureNotDisposed();
|
|
11803
|
+
return handler(initialValue, context);
|
|
11804
|
+
};
|
|
11876
11805
|
}
|
|
11877
11806
|
intercept(name, interceptor) {
|
|
11807
|
+
this.ensureNotDisposed();
|
|
11878
11808
|
const key = name;
|
|
11879
11809
|
if (!this._interceptorsByName.has(key)) this._interceptorsByName.set(key, []);
|
|
11880
11810
|
const interceptors = this._interceptorsByName.get(key);
|
|
11881
11811
|
interceptors.push(interceptor);
|
|
11882
11812
|
this._interceptorsByName.set(key, interceptors.sort((a, b) => (b.priority ?? 0) - (a.priority ?? 0)));
|
|
11883
|
-
|
|
11813
|
+
let registration = interceptor;
|
|
11814
|
+
return () => {
|
|
11815
|
+
const current = registration;
|
|
11816
|
+
registration = void 0;
|
|
11817
|
+
if (!current || this._disposed) return false;
|
|
11818
|
+
const list = this._interceptorsByName.get(key);
|
|
11819
|
+
return list ? remove(list, current) : false;
|
|
11820
|
+
};
|
|
11884
11821
|
}
|
|
11885
11822
|
getInterceptPoints() {
|
|
11886
11823
|
return this._interceptorPoints;
|
|
11887
11824
|
}
|
|
11888
11825
|
dispose() {
|
|
11889
11826
|
this._interceptorsByName.clear();
|
|
11827
|
+
super.dispose();
|
|
11890
11828
|
}
|
|
11891
11829
|
};
|
|
11892
11830
|
function createAsyncInterceptorKey(key) {
|
|
@@ -11911,8 +11849,9 @@ const composeAsyncInterceptors = (interceptors) => {
|
|
|
11911
11849
|
return value;
|
|
11912
11850
|
};
|
|
11913
11851
|
};
|
|
11914
|
-
var AsyncInterceptorManager = class {
|
|
11852
|
+
var AsyncInterceptorManager = class extends Disposable {
|
|
11915
11853
|
constructor(asyncInterceptorPoints) {
|
|
11854
|
+
super();
|
|
11916
11855
|
_defineProperty(this, "_asyncInterceptorsByName", /* @__PURE__ */ new Map());
|
|
11917
11856
|
_defineProperty(this, "_asyncInterceptorPoints", void 0);
|
|
11918
11857
|
this._asyncInterceptorPoints = asyncInterceptorPoints;
|
|
@@ -11923,31 +11862,45 @@ var AsyncInterceptorManager = class {
|
|
|
11923
11862
|
* @param filter A callback function to filter the interceptors.
|
|
11924
11863
|
* @returns It will return a composed interceptor function. If you will perform the interceptor repeatedly,
|
|
11925
11864
|
* you should cache the result instead of calling this function multiple times.
|
|
11865
|
+
* A cached chain cannot start a new call after this manager is disposed.
|
|
11926
11866
|
*/
|
|
11927
11867
|
fetchThroughAsyncInterceptors(name, filter) {
|
|
11868
|
+
this.ensureNotDisposed();
|
|
11928
11869
|
const key = name;
|
|
11929
11870
|
let interceptors = this._asyncInterceptorsByName.get(key);
|
|
11930
11871
|
if (filter) interceptors = interceptors.filter(filter);
|
|
11931
|
-
|
|
11872
|
+
const handler = composeAsyncInterceptors(interceptors || []);
|
|
11873
|
+
return async (initialValue, context) => {
|
|
11874
|
+
this.ensureNotDisposed();
|
|
11875
|
+
return handler(initialValue, context);
|
|
11876
|
+
};
|
|
11932
11877
|
}
|
|
11933
11878
|
async interceptAsync(name, interceptor) {
|
|
11879
|
+
this.ensureNotDisposed();
|
|
11934
11880
|
const key = name;
|
|
11935
11881
|
if (!this._asyncInterceptorsByName.has(key)) this._asyncInterceptorsByName.set(key, []);
|
|
11936
11882
|
const interceptors = this._asyncInterceptorsByName.get(key);
|
|
11937
11883
|
interceptors.push(interceptor);
|
|
11938
11884
|
this._asyncInterceptorsByName.set(key, interceptors.sort((a, b) => (b.priority ?? 0) - (a.priority ?? 0)));
|
|
11939
|
-
|
|
11885
|
+
let registration = interceptor;
|
|
11886
|
+
return () => {
|
|
11887
|
+
const current = registration;
|
|
11888
|
+
registration = void 0;
|
|
11889
|
+
if (!current || this._disposed) return false;
|
|
11890
|
+
const list = this._asyncInterceptorsByName.get(key);
|
|
11891
|
+
return list ? remove(list, current) : false;
|
|
11892
|
+
};
|
|
11940
11893
|
}
|
|
11941
11894
|
getInterceptPoints() {
|
|
11942
11895
|
return this._asyncInterceptorPoints;
|
|
11943
11896
|
}
|
|
11944
11897
|
dispose() {
|
|
11945
11898
|
this._asyncInterceptorsByName.clear();
|
|
11899
|
+
super.dispose();
|
|
11946
11900
|
}
|
|
11947
11901
|
};
|
|
11948
11902
|
|
|
11949
|
-
|
|
11950
|
-
//#region src/common/invert-color/utils.ts
|
|
11903
|
+
// src/common/invert-color/utils.ts
|
|
11951
11904
|
function normalizeRGBColor(color) {
|
|
11952
11905
|
return color.map((c) => c / 255);
|
|
11953
11906
|
}
|
|
@@ -11955,8 +11908,7 @@ function denormalizeRGBColor(color) {
|
|
|
11955
11908
|
return color.map((c) => Math.round(c * 255));
|
|
11956
11909
|
}
|
|
11957
11910
|
|
|
11958
|
-
|
|
11959
|
-
//#region src/common/invert-color/invert-hsl.ts
|
|
11911
|
+
// src/common/invert-color/invert-hsl.ts
|
|
11960
11912
|
function rgbToHsl([r, g, b]) {
|
|
11961
11913
|
const max = Math.max(r, g, b);
|
|
11962
11914
|
const min = Math.min(r, g, b);
|
|
@@ -12056,8 +12008,7 @@ function invertColorByHSL(color) {
|
|
|
12056
12008
|
return denormalizeRGBColor(invertNormalizedColorByHSL(normalizeRGBColor(color)));
|
|
12057
12009
|
}
|
|
12058
12010
|
|
|
12059
|
-
|
|
12060
|
-
//#region src/common/invert-color/invert-rgb.ts
|
|
12011
|
+
// src/common/invert-color/invert-rgb.ts
|
|
12061
12012
|
const matrix = [
|
|
12062
12013
|
[
|
|
12063
12014
|
.333,
|
|
@@ -12109,8 +12060,7 @@ function invertColorByMatrix(color) {
|
|
|
12109
12060
|
return denormalizeRGBColor(invertNormalizedColorByMatrix(normalizeRGBColor(color)));
|
|
12110
12061
|
}
|
|
12111
12062
|
|
|
12112
|
-
|
|
12113
|
-
//#region src/common/memory-cursor.ts
|
|
12063
|
+
// src/common/memory-cursor.ts
|
|
12114
12064
|
/**
|
|
12115
12065
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
12116
12066
|
*
|
|
@@ -12142,8 +12092,7 @@ var MemoryCursor = class {
|
|
|
12142
12092
|
}
|
|
12143
12093
|
};
|
|
12144
12094
|
|
|
12145
|
-
|
|
12146
|
-
//#region src/common/mixin.ts
|
|
12095
|
+
// src/common/mixin.ts
|
|
12147
12096
|
/**
|
|
12148
12097
|
* Mixin some methods to targetObject as prototype, the static methods will not be mixed in
|
|
12149
12098
|
* @param {T} targetClassPrototype The target class to mixin
|
|
@@ -12153,8 +12102,7 @@ function mixinClass(targetClassPrototype, mixin) {
|
|
|
12153
12102
|
for (const key in mixin) if (mixin.hasOwnProperty(key)) targetClassPrototype[key] = mixin[key];
|
|
12154
12103
|
}
|
|
12155
12104
|
|
|
12156
|
-
|
|
12157
|
-
//#region src/common/number.ts
|
|
12105
|
+
// src/common/number.ts
|
|
12158
12106
|
/**
|
|
12159
12107
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
12160
12108
|
*
|
|
@@ -12186,8 +12134,7 @@ function willLoseNumericPrecision(str) {
|
|
|
12186
12134
|
return Number(str) > Number.MAX_SAFE_INTEGER || str.length >= 18;
|
|
12187
12135
|
}
|
|
12188
12136
|
|
|
12189
|
-
|
|
12190
|
-
//#region src/common/registry.ts
|
|
12137
|
+
// src/common/registry.ts
|
|
12191
12138
|
/**
|
|
12192
12139
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
12193
12140
|
*
|
|
@@ -12247,8 +12194,7 @@ var RegistryAsMap = class RegistryAsMap {
|
|
|
12247
12194
|
}
|
|
12248
12195
|
};
|
|
12249
12196
|
|
|
12250
|
-
|
|
12251
|
-
//#region src/common/request-immediate-macro-task.ts
|
|
12197
|
+
// src/common/request-immediate-macro-task.ts
|
|
12252
12198
|
/**
|
|
12253
12199
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
12254
12200
|
*
|
|
@@ -12288,8 +12234,7 @@ function requestImmediateMacroTask(callback) {
|
|
|
12288
12234
|
};
|
|
12289
12235
|
}
|
|
12290
12236
|
|
|
12291
|
-
|
|
12292
|
-
//#region src/common/set.ts
|
|
12237
|
+
// src/common/set.ts
|
|
12293
12238
|
/**
|
|
12294
12239
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
12295
12240
|
*
|
|
@@ -12316,8 +12261,7 @@ function mergeSets(s1, s2) {
|
|
|
12316
12261
|
return s1;
|
|
12317
12262
|
}
|
|
12318
12263
|
|
|
12319
|
-
|
|
12320
|
-
//#region src/docs/section-break-id.ts
|
|
12264
|
+
// src/docs/section-break-id.ts
|
|
12321
12265
|
const SECTION_ID_PREFIX = "section_";
|
|
12322
12266
|
function createSectionId(existingIds) {
|
|
12323
12267
|
let sectionId = `${SECTION_ID_PREFIX}${generateRandomId(12)}`;
|
|
@@ -12338,8 +12282,7 @@ function isValidSectionId(value) {
|
|
|
12338
12282
|
return typeof value === "string" && value.startsWith("section_") && value.length > 8;
|
|
12339
12283
|
}
|
|
12340
12284
|
|
|
12341
|
-
|
|
12342
|
-
//#region src/docs/data-model/types.ts
|
|
12285
|
+
// src/docs/data-model/types.ts
|
|
12343
12286
|
/**
|
|
12344
12287
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
12345
12288
|
*
|
|
@@ -12394,8 +12337,7 @@ let DataStreamTreeTokenType = /* @__PURE__ */ function(DataStreamTreeTokenType)
|
|
|
12394
12337
|
return DataStreamTreeTokenType;
|
|
12395
12338
|
}({});
|
|
12396
12339
|
|
|
12397
|
-
|
|
12398
|
-
//#region src/docs/data-model/document-statistics.ts
|
|
12340
|
+
// src/docs/data-model/document-statistics.ts
|
|
12399
12341
|
const CONTROL_TOKENS = /* @__PURE__ */ new Set([
|
|
12400
12342
|
"\r",
|
|
12401
12343
|
"\n",
|
|
@@ -12505,8 +12447,7 @@ async function calculateDocumentStatistics(dataStream, options) {
|
|
|
12505
12447
|
return statistics;
|
|
12506
12448
|
}
|
|
12507
12449
|
|
|
12508
|
-
|
|
12509
|
-
//#region src/types/interfaces/i-document-data.ts
|
|
12450
|
+
// src/types/interfaces/i-document-data.ts
|
|
12510
12451
|
/**
|
|
12511
12452
|
* The top-level block types in a document body.
|
|
12512
12453
|
* 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.
|
|
@@ -12953,8 +12894,7 @@ const PAPER_TYPES = [
|
|
|
12953
12894
|
"Folio"
|
|
12954
12895
|
];
|
|
12955
12896
|
|
|
12956
|
-
|
|
12957
|
-
//#region src/types/interfaces/i-style-data.ts
|
|
12897
|
+
// src/types/interfaces/i-style-data.ts
|
|
12958
12898
|
function defineExactKeys() {
|
|
12959
12899
|
return (keys) => keys;
|
|
12960
12900
|
}
|
|
@@ -13030,8 +12970,7 @@ const STYLE_KEYS = defineExactKeys()([
|
|
|
13030
12970
|
"pd"
|
|
13031
12971
|
]);
|
|
13032
12972
|
|
|
13033
|
-
|
|
13034
|
-
//#region src/types/const/const.ts
|
|
12973
|
+
// src/types/const/const.ts
|
|
13035
12974
|
/**
|
|
13036
12975
|
* Used as an illegal range array return value
|
|
13037
12976
|
*/
|
|
@@ -13233,8 +13172,7 @@ const NAMED_STYLE_SPACE_MAP = {
|
|
|
13233
13172
|
};
|
|
13234
13173
|
const DOC_DRAWING_PRINTING_COMPONENT_KEY = "univer-docs-drawing-printing";
|
|
13235
13174
|
|
|
13236
|
-
|
|
13237
|
-
//#region src/types/const/extension-names.ts
|
|
13175
|
+
// src/types/const/extension-names.ts
|
|
13238
13176
|
/**
|
|
13239
13177
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
13240
13178
|
*
|
|
@@ -13256,8 +13194,7 @@ let EXTENSION_NAMES = /* @__PURE__ */ function(EXTENSION_NAMES) {
|
|
|
13256
13194
|
return EXTENSION_NAMES;
|
|
13257
13195
|
}({});
|
|
13258
13196
|
|
|
13259
|
-
|
|
13260
|
-
//#region src/types/const/page-size.ts
|
|
13197
|
+
// src/types/const/page-size.ts
|
|
13261
13198
|
const PAGE_SIZE = {
|
|
13262
13199
|
["A3"]: {
|
|
13263
13200
|
width: 1123,
|
|
@@ -13319,8 +13256,7 @@ const MODERN_DOCUMENT_DEFAULT_MARGIN = 50 / .75;
|
|
|
13319
13256
|
/** Default margin for a paginated Traditional document, in 96-DPI layout pixels. */
|
|
13320
13257
|
const TRADITIONAL_DOCUMENT_DEFAULT_MARGIN = 72;
|
|
13321
13258
|
|
|
13322
|
-
|
|
13323
|
-
//#region src/docs/paragraph-id.ts
|
|
13259
|
+
// src/docs/paragraph-id.ts
|
|
13324
13260
|
const PARAGRAPH_ID_PREFIX = "para_";
|
|
13325
13261
|
function createParagraphId(existingIds) {
|
|
13326
13262
|
let paragraphId = `${PARAGRAPH_ID_PREFIX}${generateRandomId(12)}`;
|
|
@@ -13353,8 +13289,7 @@ function cloneParagraph(paragraph) {
|
|
|
13353
13289
|
return JSON.parse(JSON.stringify(paragraph));
|
|
13354
13290
|
}
|
|
13355
13291
|
|
|
13356
|
-
|
|
13357
|
-
//#region src/docs/data-model/empty-snapshot.ts
|
|
13292
|
+
// src/docs/data-model/empty-snapshot.ts
|
|
13358
13293
|
function getEmptySnapshot$1(unitID = generateRandomId(6), locale = "enUS", title = "", documentFlavor = 2) {
|
|
13359
13294
|
const EMPTY_DOCUMENT_DATA = {
|
|
13360
13295
|
id: unitID,
|
|
@@ -13434,8 +13369,7 @@ function getEmptySnapshot$1(unitID = generateRandomId(6), locale = "enUS", title
|
|
|
13434
13369
|
return EMPTY_DOCUMENT_DATA;
|
|
13435
13370
|
}
|
|
13436
13371
|
|
|
13437
|
-
|
|
13438
|
-
//#region src/docs/data-model/text-x/action-types.ts
|
|
13372
|
+
// src/docs/data-model/text-x/action-types.ts
|
|
13439
13373
|
const PRESERVE_INSERTED_PARAGRAPH_IDS = "__textXPreserveParagraphIds";
|
|
13440
13374
|
let TextXActionType = /* @__PURE__ */ function(TextXActionType) {
|
|
13441
13375
|
TextXActionType["RETAIN"] = "r";
|
|
@@ -13444,8 +13378,7 @@ let TextXActionType = /* @__PURE__ */ function(TextXActionType) {
|
|
|
13444
13378
|
return TextXActionType;
|
|
13445
13379
|
}({});
|
|
13446
13380
|
|
|
13447
|
-
|
|
13448
|
-
//#region src/docs/data-model/text-x/build-utils/range-interval.ts
|
|
13381
|
+
// src/docs/data-model/text-x/build-utils/range-interval.ts
|
|
13449
13382
|
/** Converts persisted inclusive indexes `[startIndex, endIndex]` to `[startOffset, endOffset)`. */
|
|
13450
13383
|
function getInclusiveRangeInterval(range) {
|
|
13451
13384
|
return {
|
|
@@ -13589,8 +13522,7 @@ function getPairedTokenInterval(dataStream, startOffset, startToken, endToken) {
|
|
|
13589
13522
|
return null;
|
|
13590
13523
|
}
|
|
13591
13524
|
|
|
13592
|
-
|
|
13593
|
-
//#region src/docs/data-model/text-x/apply-utils/common.ts
|
|
13525
|
+
// src/docs/data-model/text-x/apply-utils/common.ts
|
|
13594
13526
|
const RESTORE_INSERTED_PARAGRAPH_IDS = "__textXRestoreParagraphIds";
|
|
13595
13527
|
function normalizeTextRuns(textRuns, reserveEmptyTextRun = false) {
|
|
13596
13528
|
const results = [];
|
|
@@ -14413,8 +14345,7 @@ function deleteCustomDecorations(body, textLength, currentIndex, needOffset = tr
|
|
|
14413
14345
|
return removeCustomDecorations;
|
|
14414
14346
|
}
|
|
14415
14347
|
|
|
14416
|
-
|
|
14417
|
-
//#region src/docs/data-model/preset-list-type.ts
|
|
14348
|
+
// src/docs/data-model/preset-list-type.ts
|
|
14418
14349
|
let QuickListType = /* @__PURE__ */ function(QuickListType) {
|
|
14419
14350
|
QuickListType["ORDER_LIST_QUICK_1"] = "1.";
|
|
14420
14351
|
QuickListType["ORDER_LIST_QUICK_2"] = "a)";
|
|
@@ -14848,8 +14779,7 @@ const QuickListTypeMap = {
|
|
|
14848
14779
|
["*"]: "BULLET_LIST"
|
|
14849
14780
|
};
|
|
14850
14781
|
|
|
14851
|
-
|
|
14852
|
-
//#region src/docs/data-model/text-x/apply-utils/update-apply.ts
|
|
14782
|
+
// src/docs/data-model/text-x/apply-utils/update-apply.ts
|
|
14853
14783
|
function updateAttribute(body, updateBody, textLength, currentIndex, coverType) {
|
|
14854
14784
|
return {
|
|
14855
14785
|
dataStream: "",
|
|
@@ -15289,8 +15219,7 @@ function updateCustomDecorations(body, updateBody, textLength, currentIndex, cov
|
|
|
15289
15219
|
return removeCustomDecorations;
|
|
15290
15220
|
}
|
|
15291
15221
|
|
|
15292
|
-
|
|
15293
|
-
//#region src/docs/data-model/text-x/build-utils/selection.ts
|
|
15222
|
+
// src/docs/data-model/text-x/build-utils/selection.ts
|
|
15294
15223
|
function makeSelection(startOffset, endOffset) {
|
|
15295
15224
|
if (typeof endOffset === "undefined") return {
|
|
15296
15225
|
startOffset,
|
|
@@ -15362,8 +15291,7 @@ function transformParagraphs(paragraphs, dataStream) {
|
|
|
15362
15291
|
return results;
|
|
15363
15292
|
}
|
|
15364
15293
|
|
|
15365
|
-
|
|
15366
|
-
//#region src/docs/data-model/text-x/build-utils/paragraph.ts
|
|
15294
|
+
// src/docs/data-model/text-x/build-utils/paragraph.ts
|
|
15367
15295
|
const switchParagraphBullet = (params) => {
|
|
15368
15296
|
var _docDataModel$getSelf;
|
|
15369
15297
|
const { paragraphs: currentParagraphs, segmentId, document: docDataModel } = params;
|
|
@@ -15649,8 +15577,7 @@ const setParagraphStyle = (params) => {
|
|
|
15649
15577
|
return textX;
|
|
15650
15578
|
};
|
|
15651
15579
|
|
|
15652
|
-
|
|
15653
|
-
//#region src/docs/data-model/text-x/utils.ts
|
|
15580
|
+
// src/docs/data-model/text-x/utils.ts
|
|
15654
15581
|
let SliceBodyType = /* @__PURE__ */ function(SliceBodyType) {
|
|
15655
15582
|
SliceBodyType[SliceBodyType["copy"] = 0] = "copy";
|
|
15656
15583
|
SliceBodyType[SliceBodyType["cut"] = 1] = "cut";
|
|
@@ -16063,8 +15990,7 @@ function getRichTextEditPath(docDataModel, segmentId = "") {
|
|
|
16063
15990
|
else throw new Error("Segment id not found in headers or footers");
|
|
16064
15991
|
}
|
|
16065
15992
|
|
|
16066
|
-
|
|
16067
|
-
//#region src/docs/data-model/text-x/action-iterator.ts
|
|
15993
|
+
// src/docs/data-model/text-x/action-iterator.ts
|
|
16068
15994
|
var ActionIterator = class {
|
|
16069
15995
|
constructor(_actions) {
|
|
16070
15996
|
this._actions = _actions;
|
|
@@ -16135,8 +16061,7 @@ var ActionIterator = class {
|
|
|
16135
16061
|
}
|
|
16136
16062
|
};
|
|
16137
16063
|
|
|
16138
|
-
|
|
16139
|
-
//#region src/docs/data-model/text-x/apply-utils/delete-apply.ts
|
|
16064
|
+
// src/docs/data-model/text-x/apply-utils/delete-apply.ts
|
|
16140
16065
|
function updateAttributeByDelete(body, textLength, currentIndex) {
|
|
16141
16066
|
var _body$renderedPageBre;
|
|
16142
16067
|
const { dataStream } = body;
|
|
@@ -16179,8 +16104,7 @@ function updateAttributeByDelete(body, textLength, currentIndex) {
|
|
|
16179
16104
|
};
|
|
16180
16105
|
}
|
|
16181
16106
|
|
|
16182
|
-
|
|
16183
|
-
//#region src/docs/data-model/text-x/apply-utils/insert-apply.ts
|
|
16107
|
+
// src/docs/data-model/text-x/apply-utils/insert-apply.ts
|
|
16184
16108
|
function updateAttributeByInsert(body, insertBody, textLength, currentIndex) {
|
|
16185
16109
|
const originalDataStream = body.dataStream;
|
|
16186
16110
|
body.dataStream = insertTextToContent(body.dataStream, currentIndex, insertBody.dataStream);
|
|
@@ -16199,8 +16123,7 @@ function updateAttributeByInsert(body, insertBody, textLength, currentIndex) {
|
|
|
16199
16123
|
insertCustomDecorations(body, insertBody, textLength, currentIndex);
|
|
16200
16124
|
}
|
|
16201
16125
|
|
|
16202
|
-
|
|
16203
|
-
//#region src/docs/data-model/text-x/custom-range-update.ts
|
|
16126
|
+
// src/docs/data-model/text-x/custom-range-update.ts
|
|
16204
16127
|
function getChangedPropertyPaths(before, after, path = []) {
|
|
16205
16128
|
if (Tools.diffValue(before, after)) return [];
|
|
16206
16129
|
if (after && typeof after === "object" && !Array.isArray(after) && (before == null || typeof before === "object" && !Array.isArray(before))) {
|
|
@@ -16413,8 +16336,7 @@ function dropRemovedRangeAnchors(actions, suppressed, updates) {
|
|
|
16413
16336
|
return appendRangeUpdates(kept, moveRangeUpdates(updates, removed));
|
|
16414
16337
|
}
|
|
16415
16338
|
|
|
16416
|
-
|
|
16417
|
-
//#region src/docs/data-model/text-x/apply.ts
|
|
16339
|
+
// src/docs/data-model/text-x/apply.ts
|
|
16418
16340
|
function updateApply(doc, updateBody, textLength, currentIndex, coverType = 0) {
|
|
16419
16341
|
return updateAttribute(doc, updateBody, textLength, currentIndex, coverType);
|
|
16420
16342
|
}
|
|
@@ -16468,8 +16390,7 @@ function onlyHasDataStream$1(body) {
|
|
|
16468
16390
|
return Object.keys(body).length === 1 && typeof body.dataStream === "string";
|
|
16469
16391
|
}
|
|
16470
16392
|
|
|
16471
|
-
|
|
16472
|
-
//#region src/docs/data-model/text-x/transform-utils.ts
|
|
16393
|
+
// src/docs/data-model/text-x/transform-utils.ts
|
|
16473
16394
|
function transformTextRuns(originTextRuns, targetTextRuns, originCoverType, targetCoverType, transformType) {
|
|
16474
16395
|
if (originTextRuns == null || targetTextRuns == null) return targetTextRuns;
|
|
16475
16396
|
if (originTextRuns.length === 0 || targetTextRuns.length === 0) return [];
|
|
@@ -16710,8 +16631,7 @@ function transformBlockRanges(thisBlockRanges, otherBlockRanges, priority) {
|
|
|
16710
16631
|
});
|
|
16711
16632
|
}
|
|
16712
16633
|
|
|
16713
|
-
|
|
16714
|
-
//#region src/docs/data-model/text-x/text-x.ts
|
|
16634
|
+
// src/docs/data-model/text-x/text-x.ts
|
|
16715
16635
|
function onlyHasDataStream(body) {
|
|
16716
16636
|
return Object.keys(body).length === 1;
|
|
16717
16637
|
}
|
|
@@ -17097,8 +17017,7 @@ _defineProperty(TextX, "id", "text-x");
|
|
|
17097
17017
|
_defineProperty(TextX, "uri", "https://github.com/dream-num/univer#text-x");
|
|
17098
17018
|
Object.defineProperty(TextX, "name", { value: "text-x" });
|
|
17099
17019
|
|
|
17100
|
-
|
|
17101
|
-
//#region src/docs/data-model/json-x/json-x.ts
|
|
17020
|
+
// src/docs/data-model/json-x/json-x.ts
|
|
17102
17021
|
var JSONX = class JSONX {
|
|
17103
17022
|
static registerSubtype(subType) {
|
|
17104
17023
|
var _this$_subTypes$get;
|
|
@@ -17151,8 +17070,7 @@ _defineProperty(JSONX, "_subTypes", /* @__PURE__ */ new Map());
|
|
|
17151
17070
|
_defineProperty(JSONX, "_instance", null);
|
|
17152
17071
|
JSONX.registerSubtype(TextX);
|
|
17153
17072
|
|
|
17154
|
-
|
|
17155
|
-
//#region src/docs/data-model/text-x/build-utils/parse.ts
|
|
17073
|
+
// src/docs/data-model/text-x/build-utils/parse.ts
|
|
17156
17074
|
const tags = [
|
|
17157
17075
|
"",
|
|
17158
17076
|
"\x1B",
|
|
@@ -17222,8 +17140,7 @@ const fromPlainText = (text) => {
|
|
|
17222
17140
|
};
|
|
17223
17141
|
};
|
|
17224
17142
|
|
|
17225
|
-
|
|
17226
|
-
//#region src/docs/data-model/document-data-model.ts
|
|
17143
|
+
// src/docs/data-model/document-data-model.ts
|
|
17227
17144
|
const DEFAULT_DOC = {
|
|
17228
17145
|
id: "default_doc",
|
|
17229
17146
|
documentStyle: {}
|
|
@@ -17541,8 +17458,7 @@ var DocumentDataModel = class DocumentDataModel extends DocumentDataModelSimple
|
|
|
17541
17458
|
}
|
|
17542
17459
|
};
|
|
17543
17460
|
|
|
17544
|
-
|
|
17545
|
-
//#region src/docs/data-model/paragraph-style.ts
|
|
17461
|
+
// src/docs/data-model/paragraph-style.ts
|
|
17546
17462
|
function _definedStyle(style) {
|
|
17547
17463
|
if (style == null) return {};
|
|
17548
17464
|
const definedStyle = Tools.deepClone(style);
|
|
@@ -17592,9 +17508,17 @@ function resolveDocumentParagraphStyle(documentStyle, paragraphStyle, options =
|
|
|
17592
17508
|
...definedParagraphStyle
|
|
17593
17509
|
});
|
|
17594
17510
|
}
|
|
17511
|
+
/** Resolves word splitting without materializing inherited defaults in the snapshot. */
|
|
17512
|
+
function resolveDocumentParagraphWordWrap(document, paragraph) {
|
|
17513
|
+
const { documentStyle } = document;
|
|
17514
|
+
const { wordWrap } = resolveDocumentParagraphStyle(documentStyle, paragraph === null || paragraph === void 0 ? void 0 : paragraph.paragraphStyle, {
|
|
17515
|
+
styles: document.styles,
|
|
17516
|
+
paragraphStyleId: paragraph === null || paragraph === void 0 ? void 0 : paragraph.styleId
|
|
17517
|
+
});
|
|
17518
|
+
return wordWrap ?? 0;
|
|
17519
|
+
}
|
|
17595
17520
|
|
|
17596
|
-
|
|
17597
|
-
//#region src/docs/data-model/replacement.ts
|
|
17521
|
+
// src/docs/data-model/replacement.ts
|
|
17598
17522
|
function replaceInDocumentBody(body, query, target, caseSensitive) {
|
|
17599
17523
|
if (query === "") return body;
|
|
17600
17524
|
const documentDataModel = new DocumentDataModel({
|
|
@@ -17635,8 +17559,7 @@ function replaceInDocumentBody(body, query, target, caseSensitive) {
|
|
|
17635
17559
|
return newBody;
|
|
17636
17560
|
}
|
|
17637
17561
|
|
|
17638
|
-
|
|
17639
|
-
//#region src/docs/data-model/text-x/build-utils/custom-decoration.ts
|
|
17562
|
+
// src/docs/data-model/text-x/build-utils/custom-decoration.ts
|
|
17640
17563
|
function addCustomDecorationTextX(param) {
|
|
17641
17564
|
const { ranges, id, type } = param;
|
|
17642
17565
|
const textX = new TextX();
|
|
@@ -17694,8 +17617,7 @@ function deleteCustomDecorationTextX(params) {
|
|
|
17694
17617
|
return textX;
|
|
17695
17618
|
}
|
|
17696
17619
|
|
|
17697
|
-
|
|
17698
|
-
//#region src/docs/data-model/text-x/build-utils/custom-range.ts
|
|
17620
|
+
// src/docs/data-model/text-x/build-utils/custom-range.ts
|
|
17699
17621
|
/**
|
|
17700
17622
|
* Check if two ranges intersect
|
|
17701
17623
|
* @param line1Start - The start of the first range
|
|
@@ -17763,8 +17685,7 @@ function getSelectionForAddCustomRange(range, body) {
|
|
|
17763
17685
|
};
|
|
17764
17686
|
}
|
|
17765
17687
|
|
|
17766
|
-
|
|
17767
|
-
//#region src/docs/data-model/text-x/build-utils/text-x-utils.ts
|
|
17688
|
+
// src/docs/data-model/text-x/build-utils/text-x-utils.ts
|
|
17768
17689
|
function deleteCustomRangeTextX(params) {
|
|
17769
17690
|
var _documentDataModel$ge;
|
|
17770
17691
|
const { rangeId, segmentId, documentDataModel, insert } = params;
|
|
@@ -18298,8 +18219,7 @@ const replaceSelectionTextRuns = (params) => {
|
|
|
18298
18219
|
return textX;
|
|
18299
18220
|
};
|
|
18300
18221
|
|
|
18301
|
-
|
|
18302
|
-
//#region src/docs/data-model/text-x/build-utils/drawings.ts
|
|
18222
|
+
// src/docs/data-model/text-x/build-utils/drawings.ts
|
|
18303
18223
|
function getCustomBlockIdsInSelections(body, selections) {
|
|
18304
18224
|
const customBlockIds = [];
|
|
18305
18225
|
const { customBlocks = [] } = body;
|
|
@@ -18439,8 +18359,7 @@ function buildDrawingInsertBody(body, drawings, insertOffset) {
|
|
|
18439
18359
|
};
|
|
18440
18360
|
}
|
|
18441
18361
|
|
|
18442
|
-
|
|
18443
|
-
//#region src/docs/data-model/text-x/build-utils/data-stream-change.ts
|
|
18362
|
+
// src/docs/data-model/text-x/build-utils/data-stream-change.ts
|
|
18444
18363
|
/**
|
|
18445
18364
|
* Finds one contiguous dataStream change. Pure structural insertions and deletions
|
|
18446
18365
|
* are anchored by their stable ids before falling back to string comparison.
|
|
@@ -18504,8 +18423,7 @@ function collectNewStartOffsets(previousItems, nextItems, getId) {
|
|
|
18504
18423
|
return (nextItems ?? []).filter((item) => !previousIds.has(getId(item))).map((item) => item.startIndex);
|
|
18505
18424
|
}
|
|
18506
18425
|
|
|
18507
|
-
|
|
18508
|
-
//#region src/docs/data-model/text-x/build-utils/index.ts
|
|
18426
|
+
// src/docs/data-model/text-x/build-utils/index.ts
|
|
18509
18427
|
/**
|
|
18510
18428
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
18511
18429
|
*
|
|
@@ -18570,8 +18488,7 @@ _defineProperty(BuildTextUtils, "drawing", {
|
|
|
18570
18488
|
remove: removeDrawingReferences
|
|
18571
18489
|
});
|
|
18572
18490
|
|
|
18573
|
-
|
|
18574
|
-
//#region src/docs/data-model/rich-text-builder.ts
|
|
18491
|
+
// src/docs/data-model/rich-text-builder.ts
|
|
18575
18492
|
const NON_EDITABLE_RICH_TEXT_TOKENS = new Set(Object.values(DataStreamTreeTokenType).filter((token) => token !== "" && token !== " "));
|
|
18576
18493
|
function normalizeBody$1(body) {
|
|
18577
18494
|
if (!body.customRanges) body.customRanges = [];
|
|
@@ -21068,8 +20985,7 @@ function createParagraphSnapshot(data, paragraphId, range) {
|
|
|
21068
20985
|
};
|
|
21069
20986
|
}
|
|
21070
20987
|
|
|
21071
|
-
|
|
21072
|
-
//#region src/docs/data-model/subdocument.ts
|
|
20988
|
+
// src/docs/data-model/subdocument.ts
|
|
21073
20989
|
/**
|
|
21074
20990
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
21075
20991
|
*
|
|
@@ -21087,8 +21003,7 @@ function createParagraphSnapshot(data, paragraphId, range) {
|
|
|
21087
21003
|
*/
|
|
21088
21004
|
const DEFAULT_DOCUMENT_SUB_COMPONENT_ID = "__default_document_sub_component_id20231101__";
|
|
21089
21005
|
|
|
21090
|
-
|
|
21091
|
-
//#region src/docs/data-model/text-x/structure-validator.ts
|
|
21006
|
+
// src/docs/data-model/text-x/structure-validator.ts
|
|
21092
21007
|
const DOCUMENT_STRUCTURAL_TOKEN_PATTERN_SOURCE = `[${[
|
|
21093
21008
|
"\r",
|
|
21094
21009
|
"\n",
|
|
@@ -21459,8 +21374,7 @@ function validateDocumentStructure(snapshot) {
|
|
|
21459
21374
|
return issues;
|
|
21460
21375
|
}
|
|
21461
21376
|
|
|
21462
|
-
|
|
21463
|
-
//#region src/docs/section-header-footer.ts
|
|
21377
|
+
// src/docs/section-header-footer.ts
|
|
21464
21378
|
function getSectionHeaderFooterReferenceKey(kind, variant) {
|
|
21465
21379
|
return `${variant === "default" ? "default" : variant === "first" ? "firstPage" : "evenPage"}${kind === "header" ? "Header" : "Footer"}Id`;
|
|
21466
21380
|
}
|
|
@@ -21508,8 +21422,7 @@ function resolveSectionHeaderFooterReferences(documentStyle, sections, sectionIn
|
|
|
21508
21422
|
return result;
|
|
21509
21423
|
}
|
|
21510
21424
|
|
|
21511
|
-
|
|
21512
|
-
//#region src/docs/sdt-binding.ts
|
|
21425
|
+
// src/docs/sdt-binding.ts
|
|
21513
21426
|
function getSdtBindingKey(range) {
|
|
21514
21427
|
var _range$properties;
|
|
21515
21428
|
const binding = (_range$properties = range.properties) === null || _range$properties === void 0 ? void 0 : _range$properties.dataBinding;
|
|
@@ -21539,8 +21452,7 @@ function getSdtBindingValue(body, range) {
|
|
|
21539
21452
|
return ["text", "richText"].includes(range.properties.kind) ? text : void 0;
|
|
21540
21453
|
}
|
|
21541
21454
|
|
|
21542
|
-
|
|
21543
|
-
//#region src/observer/observable.ts
|
|
21455
|
+
// src/observer/observable.ts
|
|
21544
21456
|
/**
|
|
21545
21457
|
* A class serves as a medium between the observable and its observers
|
|
21546
21458
|
*/
|
|
@@ -21636,12 +21548,10 @@ function fromEventSubject(subject$) {
|
|
|
21636
21548
|
});
|
|
21637
21549
|
}
|
|
21638
21550
|
|
|
21639
|
-
|
|
21640
|
-
//#region src/services/resource-manager/type.ts
|
|
21551
|
+
// src/services/resource-manager/type.ts
|
|
21641
21552
|
const IResourceManagerService = (0, _wendellhu_redi.createIdentifier)("core.resource-manager.service");
|
|
21642
21553
|
|
|
21643
|
-
|
|
21644
|
-
//#region src/services/user-manager/const.ts
|
|
21554
|
+
// src/services/user-manager/const.ts
|
|
21645
21555
|
const nameMap = {
|
|
21646
21556
|
[_univerjs_protocol.UnitRole.Editor]: "Editor",
|
|
21647
21557
|
[_univerjs_protocol.UnitRole.Owner]: "Owner",
|
|
@@ -21666,8 +21576,7 @@ const isDevRole = (userId, type) => {
|
|
|
21666
21576
|
return userId.startsWith(nameMap[type]);
|
|
21667
21577
|
};
|
|
21668
21578
|
|
|
21669
|
-
|
|
21670
|
-
//#region src/services/user-manager/user-manager.service.ts
|
|
21579
|
+
// src/services/user-manager/user-manager.service.ts
|
|
21671
21580
|
/**
|
|
21672
21581
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
21673
21582
|
*
|
|
@@ -21734,8 +21643,7 @@ var UserManagerService = class extends Disposable {
|
|
|
21734
21643
|
}
|
|
21735
21644
|
};
|
|
21736
21645
|
|
|
21737
|
-
|
|
21738
|
-
//#region src/services/authz-io/authz-io-local.service.ts
|
|
21646
|
+
// src/services/authz-io/authz-io-local.service.ts
|
|
21739
21647
|
let AuthzIoLocalService = class AuthzIoLocalService {
|
|
21740
21648
|
constructor(_resourceManagerService, _userManagerService) {
|
|
21741
21649
|
this._resourceManagerService = _resourceManagerService;
|
|
@@ -22046,12 +21954,10 @@ let AuthzIoLocalService = class AuthzIoLocalService {
|
|
|
22046
21954
|
};
|
|
22047
21955
|
AuthzIoLocalService = __decorate([__decorateParam(0, IResourceManagerService), __decorateParam(1, (0, _wendellhu_redi.Inject)(UserManagerService))], AuthzIoLocalService);
|
|
22048
21956
|
|
|
22049
|
-
|
|
22050
|
-
//#region src/services/authz-io/type.ts
|
|
21957
|
+
// src/services/authz-io/type.ts
|
|
22051
21958
|
const IAuthzIoService = (0, _wendellhu_redi.createIdentifier)("IAuthzIoIoService");
|
|
22052
21959
|
|
|
22053
|
-
|
|
22054
|
-
//#region src/services/confirm/confirm.service.ts
|
|
21960
|
+
// src/services/confirm/confirm.service.ts
|
|
22055
21961
|
const IConfirmService = (0, _wendellhu_redi.createIdentifier)("univer.confirm-service");
|
|
22056
21962
|
/**
|
|
22057
21963
|
* This is a mock service for testing purposes.
|
|
@@ -22074,8 +21980,7 @@ var TestConfirmService = class {
|
|
|
22074
21980
|
}
|
|
22075
21981
|
};
|
|
22076
21982
|
|
|
22077
|
-
|
|
22078
|
-
//#region src/services/context/context.ts
|
|
21983
|
+
// src/services/context/context.ts
|
|
22079
21984
|
/**
|
|
22080
21985
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
22081
21986
|
*
|
|
@@ -22118,8 +22023,7 @@ const FOCUSING_COMMON_DRAWINGS = "FOCUSING_COMMON_DRAWINGS";
|
|
|
22118
22023
|
const FOCUSING_SHAPE_TEXT_EDITOR = "FOCUSING_SHAPE_TEXT_EDITOR";
|
|
22119
22024
|
const FORMULA_EDITOR_ACTIVATED = "FORMULA_EDITOR_ACTIVATED";
|
|
22120
22025
|
|
|
22121
|
-
|
|
22122
|
-
//#region src/services/error/error.service.ts
|
|
22026
|
+
// src/services/error/error.service.ts
|
|
22123
22027
|
/**
|
|
22124
22028
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
22125
22029
|
*
|
|
@@ -22156,8 +22060,7 @@ var ErrorService = class extends Disposable {
|
|
|
22156
22060
|
}
|
|
22157
22061
|
};
|
|
22158
22062
|
|
|
22159
|
-
|
|
22160
|
-
//#region src/services/image-io/image-io.service.ts
|
|
22063
|
+
// src/services/image-io/image-io.service.ts
|
|
22161
22064
|
/**
|
|
22162
22065
|
* The type of image data source
|
|
22163
22066
|
*/
|
|
@@ -22186,12 +22089,10 @@ let ImageUploadStatusType = /* @__PURE__ */ function(ImageUploadStatusType) {
|
|
|
22186
22089
|
}({});
|
|
22187
22090
|
const IImageIoService = (0, _wendellhu_redi.createIdentifier)("core.image-io.service");
|
|
22188
22091
|
|
|
22189
|
-
|
|
22190
|
-
//#region src/services/image-io/url-image.service.ts
|
|
22092
|
+
// src/services/image-io/url-image.service.ts
|
|
22191
22093
|
const IURLImageService = (0, _wendellhu_redi.createIdentifier)("core.url-image.service");
|
|
22192
22094
|
|
|
22193
|
-
|
|
22194
|
-
//#region src/sheets/calculation-settings.ts
|
|
22095
|
+
// src/sheets/calculation-settings.ts
|
|
22195
22096
|
const MAX_ITERATION_COUNT = 32767;
|
|
22196
22097
|
const DEFAULT_WORKBOOK_CALCULATION_SETTINGS = Object.freeze({
|
|
22197
22098
|
iterativeCalculation: false,
|
|
@@ -22207,8 +22108,7 @@ function normalizeWorkbookCalculationSettings(value) {
|
|
|
22207
22108
|
};
|
|
22208
22109
|
}
|
|
22209
22110
|
|
|
22210
|
-
|
|
22211
|
-
//#region src/sheets/empty-snapshot.ts
|
|
22111
|
+
// src/sheets/empty-snapshot.ts
|
|
22212
22112
|
function getEmptySnapshot$2(unitID = "", locale = "zhCN", name = "") {
|
|
22213
22113
|
return {
|
|
22214
22114
|
id: unitID,
|
|
@@ -22223,8 +22123,7 @@ function getEmptySnapshot$2(unitID = "", locale = "zhCN", name = "") {
|
|
|
22223
22123
|
};
|
|
22224
22124
|
}
|
|
22225
22125
|
|
|
22226
|
-
|
|
22227
|
-
//#region src/sheets/styles.ts
|
|
22126
|
+
// src/sheets/styles.ts
|
|
22228
22127
|
/**
|
|
22229
22128
|
* Styles in a workbook, cells locate styles based on style IDs
|
|
22230
22129
|
*
|
|
@@ -22304,8 +22203,7 @@ var Styles = class {
|
|
|
22304
22203
|
}
|
|
22305
22204
|
};
|
|
22306
22205
|
|
|
22307
|
-
|
|
22308
|
-
//#region src/sheets/util.ts
|
|
22206
|
+
// src/sheets/util.ts
|
|
22309
22207
|
const isRangesEqual = (oldRanges, ranges) => {
|
|
22310
22208
|
return ranges.length === oldRanges.length && !oldRanges.some((oldRange) => ranges.some((range) => !Rectangle.equals(range, oldRange)));
|
|
22311
22209
|
};
|
|
@@ -22450,8 +22348,7 @@ function getEmptyCell() {
|
|
|
22450
22348
|
};
|
|
22451
22349
|
}
|
|
22452
22350
|
|
|
22453
|
-
|
|
22454
|
-
//#region src/docs/data-model/utils.ts
|
|
22351
|
+
// src/docs/data-model/utils.ts
|
|
22455
22352
|
const DEFAULT_FONTFACE_PLANE = "\"Helvetica Neue\", Helvetica, Arial, \"PingFang SC\", \"Hiragino Sans GB\", \"Heiti SC\", \"Microsoft YaHei\", \"WenQuanYi Micro Hei\", sans-serif";
|
|
22456
22353
|
function getFontStyleString(textStyle) {
|
|
22457
22354
|
const defaultFont = DEFAULT_STYLES.ff;
|
|
@@ -22515,8 +22412,7 @@ function convertTextRotation(textRotation) {
|
|
|
22515
22412
|
};
|
|
22516
22413
|
}
|
|
22517
22414
|
|
|
22518
|
-
|
|
22519
|
-
//#region src/sheets/sheet-dimensions.ts
|
|
22415
|
+
// src/sheets/sheet-dimensions.ts
|
|
22520
22416
|
function isValidSheetDimension(value, allowZero = true) {
|
|
22521
22417
|
return typeof value === "number" && Number.isFinite(value) && (allowZero ? value >= 0 : value > 0);
|
|
22522
22418
|
}
|
|
@@ -22530,8 +22426,7 @@ function isValidRowDimensions(data) {
|
|
|
22530
22426
|
return ((data === null || data === void 0 ? void 0 : data.h) == null || isValidSheetDimension(data.h)) && ((data === null || data === void 0 ? void 0 : data.ah) == null || isValidSheetDimension(data.ah));
|
|
22531
22427
|
}
|
|
22532
22428
|
|
|
22533
|
-
|
|
22534
|
-
//#region src/sheets/sheet-snapshot-utils.ts
|
|
22429
|
+
// src/sheets/sheet-snapshot-utils.ts
|
|
22535
22430
|
const DEFAULT_WORKSHEET_ROW_COUNT_KEY = "DEFAULT_WORKSHEET_ROW_COUNT";
|
|
22536
22431
|
const DEFAULT_WORKSHEET_ROW_COUNT = 1e3;
|
|
22537
22432
|
const DEFAULT_WORKSHEET_COLUMN_COUNT_KEY = "DEFAULT_WORKSHEET_COLUMN_COUNT";
|
|
@@ -22605,8 +22500,7 @@ function mergeWorksheetSnapshotWithDefault(snapshot) {
|
|
|
22605
22500
|
return snapshot;
|
|
22606
22501
|
}
|
|
22607
22502
|
|
|
22608
|
-
|
|
22609
|
-
//#region src/sheets/column-manager.ts
|
|
22503
|
+
// src/sheets/column-manager.ts
|
|
22610
22504
|
/**
|
|
22611
22505
|
* Manage configuration information of all columns, get column width, column length, set column width, etc.
|
|
22612
22506
|
*/
|
|
@@ -22829,8 +22723,7 @@ var ColumnManager = class {
|
|
|
22829
22723
|
}
|
|
22830
22724
|
};
|
|
22831
22725
|
|
|
22832
|
-
|
|
22833
|
-
//#region src/sheets/range.ts
|
|
22726
|
+
// src/sheets/range.ts
|
|
22834
22727
|
function isAllFormatInTextRuns(key, body) {
|
|
22835
22728
|
const { textRuns = [] } = body;
|
|
22836
22729
|
let len = 0;
|
|
@@ -23368,8 +23261,7 @@ _defineProperty(Range, "transformRange", (range, worksheet) => {
|
|
|
23368
23261
|
};
|
|
23369
23262
|
});
|
|
23370
23263
|
|
|
23371
|
-
|
|
23372
|
-
//#region src/sheets/row-manager.ts
|
|
23264
|
+
// src/sheets/row-manager.ts
|
|
23373
23265
|
const MAXIMUM_ROW_HEIGHT = 2e3;
|
|
23374
23266
|
/**
|
|
23375
23267
|
* Manage configuration information of all rows, get row height, row length, set row height, etc.
|
|
@@ -23602,8 +23494,7 @@ var RowManager = class {
|
|
|
23602
23494
|
}
|
|
23603
23495
|
};
|
|
23604
23496
|
|
|
23605
|
-
|
|
23606
|
-
//#region src/sheets/span-model.ts
|
|
23497
|
+
// src/sheets/span-model.ts
|
|
23607
23498
|
var SpanModel = class extends Disposable {
|
|
23608
23499
|
constructor(mergeData) {
|
|
23609
23500
|
super();
|
|
@@ -23767,8 +23658,7 @@ var SpanModel = class extends Disposable {
|
|
|
23767
23658
|
}
|
|
23768
23659
|
};
|
|
23769
23660
|
|
|
23770
|
-
|
|
23771
|
-
//#region src/sheets/view-model.ts
|
|
23661
|
+
// src/sheets/view-model.ts
|
|
23772
23662
|
/**
|
|
23773
23663
|
* @internal
|
|
23774
23664
|
*/
|
|
@@ -23812,8 +23702,7 @@ var SheetViewModel = class extends Disposable {
|
|
|
23812
23702
|
}
|
|
23813
23703
|
};
|
|
23814
23704
|
|
|
23815
|
-
|
|
23816
|
-
//#region src/sheets/worksheet.ts
|
|
23705
|
+
// src/sheets/worksheet.ts
|
|
23817
23706
|
const DEFAULT_CELL_DOCUMENT_MODEL_OPTION = {
|
|
23818
23707
|
isDeepClone: false,
|
|
23819
23708
|
displayRawFormula: false,
|
|
@@ -24810,8 +24699,7 @@ function getOriginCellValue(cell) {
|
|
|
24810
24699
|
return cell === null || cell === void 0 ? void 0 : cell.v;
|
|
24811
24700
|
}
|
|
24812
24701
|
|
|
24813
|
-
|
|
24814
|
-
//#region src/sheets/workbook.ts
|
|
24702
|
+
// src/sheets/workbook.ts
|
|
24815
24703
|
function getWorksheetUID(workbook, worksheet) {
|
|
24816
24704
|
return `${workbook.getUnitId()}|${worksheet.getSheetId()}`;
|
|
24817
24705
|
}
|
|
@@ -25142,8 +25030,7 @@ let Workbook = class Workbook extends UnitModel {
|
|
|
25142
25030
|
};
|
|
25143
25031
|
Workbook = __decorate([__decorateParam(1, ILogService)], Workbook);
|
|
25144
25032
|
|
|
25145
|
-
|
|
25146
|
-
//#region src/services/instance/instance.service.ts
|
|
25033
|
+
// src/services/instance/instance.service.ts
|
|
25147
25034
|
const IUniverInstanceService = (0, _wendellhu_redi.createIdentifier)("univer.current");
|
|
25148
25035
|
let UniverInstanceService = class UniverInstanceService extends Disposable {
|
|
25149
25036
|
constructor(_injector, _contextService, _logService) {
|
|
@@ -25338,8 +25225,7 @@ UniverInstanceService = __decorate([
|
|
|
25338
25225
|
__decorateParam(2, (0, _wendellhu_redi.Inject)(ILogService))
|
|
25339
25226
|
], UniverInstanceService);
|
|
25340
25227
|
|
|
25341
|
-
|
|
25342
|
-
//#region src/services/lifecycle/lifecycle.ts
|
|
25228
|
+
// src/services/lifecycle/lifecycle.ts
|
|
25343
25229
|
/**
|
|
25344
25230
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
25345
25231
|
*
|
|
@@ -25385,8 +25271,7 @@ const LifecycleNameMap = {
|
|
|
25385
25271
|
[3]: "Steady"
|
|
25386
25272
|
};
|
|
25387
25273
|
|
|
25388
|
-
|
|
25389
|
-
//#region src/services/lifecycle/lifecycle.service.ts
|
|
25274
|
+
// src/services/lifecycle/lifecycle.service.ts
|
|
25390
25275
|
/**
|
|
25391
25276
|
* An error that indicates a lifecycle stage will never be reached, mostly due to the Univer instance is
|
|
25392
25277
|
* disposed.
|
|
@@ -25459,8 +25344,7 @@ function getLifecycleStagesAndBefore(lifecycleStage) {
|
|
|
25459
25344
|
}
|
|
25460
25345
|
}
|
|
25461
25346
|
|
|
25462
|
-
|
|
25463
|
-
//#region src/services/local-storage/local-storage.service.ts
|
|
25347
|
+
// src/services/local-storage/local-storage.service.ts
|
|
25464
25348
|
/**
|
|
25465
25349
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
25466
25350
|
*
|
|
@@ -25478,8 +25362,7 @@ function getLifecycleStagesAndBefore(lifecycleStage) {
|
|
|
25478
25362
|
*/
|
|
25479
25363
|
const ILocalStorageService = (0, _wendellhu_redi.createIdentifier)("ILocalStorageService");
|
|
25480
25364
|
|
|
25481
|
-
|
|
25482
|
-
//#region src/services/locale/locale.service.ts
|
|
25365
|
+
// src/services/locale/locale.service.ts
|
|
25483
25366
|
/**
|
|
25484
25367
|
* This service provides i18n and timezone / location features to other modules.
|
|
25485
25368
|
*/
|
|
@@ -25579,8 +25462,7 @@ var LocaleService = class extends Disposable {
|
|
|
25579
25462
|
}
|
|
25580
25463
|
};
|
|
25581
25464
|
|
|
25582
|
-
|
|
25583
|
-
//#region src/services/mention-io/mention-io-local.service.ts
|
|
25465
|
+
// src/services/mention-io/mention-io-local.service.ts
|
|
25584
25466
|
let MentionIOLocalService = class MentionIOLocalService {
|
|
25585
25467
|
constructor(_userManagerService) {
|
|
25586
25468
|
this._userManagerService = _userManagerService;
|
|
@@ -25606,12 +25488,10 @@ let MentionIOLocalService = class MentionIOLocalService {
|
|
|
25606
25488
|
};
|
|
25607
25489
|
MentionIOLocalService = __decorate([__decorateParam(0, (0, _wendellhu_redi.Inject)(UserManagerService))], MentionIOLocalService);
|
|
25608
25490
|
|
|
25609
|
-
|
|
25610
|
-
//#region src/services/mention-io/type.ts
|
|
25491
|
+
// src/services/mention-io/type.ts
|
|
25611
25492
|
const IMentionIOService = (0, _wendellhu_redi.createIdentifier)("univer.service.mention-io");
|
|
25612
25493
|
|
|
25613
|
-
|
|
25614
|
-
//#region src/services/permission/object-permission-rule.model.ts
|
|
25494
|
+
// src/services/permission/object-permission-rule.model.ts
|
|
25615
25495
|
/** Shared storage only; each product owns its rule type, resource name and mutation. */
|
|
25616
25496
|
var ObjectPermissionRuleModel = class extends Disposable {
|
|
25617
25497
|
constructor(resources, name, business, _objectTypes) {
|
|
@@ -25683,8 +25563,7 @@ var ObjectPermissionRuleModel = class extends Disposable {
|
|
|
25683
25563
|
}
|
|
25684
25564
|
};
|
|
25685
25565
|
|
|
25686
|
-
|
|
25687
|
-
//#region src/services/undoredo/undoredo.service.ts
|
|
25566
|
+
// src/services/undoredo/undoredo.service.ts
|
|
25688
25567
|
const IUndoRedoService = (0, _wendellhu_redi.createIdentifier)("univer.undo-redo.service");
|
|
25689
25568
|
const DEFAULT_UNDO_REDO_HISTORY_LIMIT = 50;
|
|
25690
25569
|
const UNDO_REDO_HISTORY_LIMIT_CONFIG_KEY = "undoRedo.historyLimit";
|
|
@@ -25930,8 +25809,7 @@ LocalUndoRedoService = __decorate([
|
|
|
25930
25809
|
__decorateParam(3, IConfigService)
|
|
25931
25810
|
], LocalUndoRedoService);
|
|
25932
25811
|
|
|
25933
|
-
|
|
25934
|
-
//#region src/services/permission/type.ts
|
|
25812
|
+
// src/services/permission/type.ts
|
|
25935
25813
|
let PermissionStatus = /* @__PURE__ */ function(PermissionStatus) {
|
|
25936
25814
|
PermissionStatus["INIT"] = "init";
|
|
25937
25815
|
PermissionStatus["FETCHING"] = "fetching";
|
|
@@ -25940,8 +25818,7 @@ let PermissionStatus = /* @__PURE__ */ function(PermissionStatus) {
|
|
|
25940
25818
|
}({});
|
|
25941
25819
|
const IPermissionService = (0, _wendellhu_redi.createIdentifier)("univer.permission-service");
|
|
25942
25820
|
|
|
25943
|
-
|
|
25944
|
-
//#region src/services/permission/object-permission.service.ts
|
|
25821
|
+
// src/services/permission/object-permission.service.ts
|
|
25945
25822
|
/** Frontend opt-in; does not change the Authz service interface or existing local setters. */
|
|
25946
25823
|
const OBJECT_PERMISSION_CONFIG_KEY = "objectPermissionTypes";
|
|
25947
25824
|
const ROOT_OBJECT_TYPES = {
|
|
@@ -26455,8 +26332,7 @@ ObjectPermissionService = __decorate([
|
|
|
26455
26332
|
__decorateParam(5, ICommandService)
|
|
26456
26333
|
], ObjectPermissionService);
|
|
26457
26334
|
|
|
26458
|
-
|
|
26459
|
-
//#region src/services/permission/permission.service.ts
|
|
26335
|
+
// src/services/permission/permission.service.ts
|
|
26460
26336
|
var PermissionService = class extends Disposable {
|
|
26461
26337
|
constructor(..._args) {
|
|
26462
26338
|
super(..._args);
|
|
@@ -26540,8 +26416,7 @@ var PermissionService = class extends Disposable {
|
|
|
26540
26416
|
}
|
|
26541
26417
|
};
|
|
26542
26418
|
|
|
26543
|
-
|
|
26544
|
-
//#region src/services/plugin/plugin-override.ts
|
|
26419
|
+
// src/services/plugin/plugin-override.ts
|
|
26545
26420
|
function mergeOverrideWithDependencies(dependencies, override) {
|
|
26546
26421
|
if (!override) return dependencies;
|
|
26547
26422
|
const result = [];
|
|
@@ -26555,8 +26430,7 @@ function mergeOverrideWithDependencies(dependencies, override) {
|
|
|
26555
26430
|
return result;
|
|
26556
26431
|
}
|
|
26557
26432
|
|
|
26558
|
-
|
|
26559
|
-
//#region src/services/plugin/plugin.service.ts
|
|
26433
|
+
// src/services/plugin/plugin.service.ts
|
|
26560
26434
|
const INIT_LAZY_PLUGINS_TIMEOUT = 4;
|
|
26561
26435
|
const DependentOnSymbol = Symbol("DependentOn");
|
|
26562
26436
|
/**
|
|
@@ -26754,8 +26628,7 @@ PluginService = __decorate([
|
|
|
26754
26628
|
__decorateParam(2, ILogService)
|
|
26755
26629
|
], PluginService);
|
|
26756
26630
|
|
|
26757
|
-
|
|
26758
|
-
//#region src/services/region/region.service.ts
|
|
26631
|
+
// src/services/region/region.service.ts
|
|
26759
26632
|
let RegionService = class RegionService extends Disposable {
|
|
26760
26633
|
constructor(_localeService) {
|
|
26761
26634
|
super();
|
|
@@ -26780,12 +26653,10 @@ let RegionService = class RegionService extends Disposable {
|
|
|
26780
26653
|
};
|
|
26781
26654
|
RegionService = __decorate([__decorateParam(0, (0, _wendellhu_redi.Inject)(LocaleService))], RegionService);
|
|
26782
26655
|
|
|
26783
|
-
|
|
26784
|
-
//#region src/services/resource-loader/type.ts
|
|
26656
|
+
// src/services/resource-loader/type.ts
|
|
26785
26657
|
const IResourceLoaderService = (0, _wendellhu_redi.createIdentifier)("resource-loader-service");
|
|
26786
26658
|
|
|
26787
|
-
|
|
26788
|
-
//#region src/services/resource-manager/resource-manager.service.ts
|
|
26659
|
+
// src/services/resource-manager/resource-manager.service.ts
|
|
26789
26660
|
let ResourceManagerService = class ResourceManagerService extends Disposable {
|
|
26790
26661
|
constructor(_logService) {
|
|
26791
26662
|
super();
|
|
@@ -26860,8 +26731,7 @@ let ResourceManagerService = class ResourceManagerService extends Disposable {
|
|
|
26860
26731
|
};
|
|
26861
26732
|
ResourceManagerService = __decorate([__decorateParam(0, ILogService)], ResourceManagerService);
|
|
26862
26733
|
|
|
26863
|
-
|
|
26864
|
-
//#region src/services/theme/theme.service.ts
|
|
26734
|
+
// src/services/theme/theme.service.ts
|
|
26865
26735
|
var ThemeService = class extends Disposable {
|
|
26866
26736
|
get darkMode() {
|
|
26867
26737
|
return this._darkMode$.getValue();
|
|
@@ -26934,8 +26804,7 @@ var ThemeService = class extends Disposable {
|
|
|
26934
26804
|
}
|
|
26935
26805
|
};
|
|
26936
26806
|
|
|
26937
|
-
|
|
26938
|
-
//#region src/shared/cache/image-cache.ts
|
|
26807
|
+
// src/shared/cache/image-cache.ts
|
|
26939
26808
|
var ImageCacheMap = class {
|
|
26940
26809
|
constructor(_injector, maxSize = 1e3) {
|
|
26941
26810
|
this._injector = _injector;
|
|
@@ -26980,8 +26849,7 @@ var ImageCacheMap = class {
|
|
|
26980
26849
|
}
|
|
26981
26850
|
};
|
|
26982
26851
|
|
|
26983
|
-
|
|
26984
|
-
//#region src/shared/name.ts
|
|
26852
|
+
// src/shared/name.ts
|
|
26985
26853
|
/**
|
|
26986
26854
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
26987
26855
|
*
|
|
@@ -27040,8 +26908,7 @@ function customNameCharacterCheck(name, sheetNameSet) {
|
|
|
27040
26908
|
return true;
|
|
27041
26909
|
}
|
|
27042
26910
|
|
|
27043
|
-
|
|
27044
|
-
//#region src/shared/r-tree.ts
|
|
26911
|
+
// src/shared/r-tree.ts
|
|
27045
26912
|
var RTree = class {
|
|
27046
26913
|
constructor(_enableOneCellCache = false) {
|
|
27047
26914
|
this._enableOneCellCache = _enableOneCellCache;
|
|
@@ -27205,8 +27072,10 @@ var RTree = class {
|
|
|
27205
27072
|
}
|
|
27206
27073
|
}
|
|
27207
27074
|
_removeRTreeItem(search) {
|
|
27075
|
+
var _this$_tree$get3;
|
|
27208
27076
|
const { unitId, sheetId: subUnitId, range, id } = search;
|
|
27209
|
-
const tree = this.
|
|
27077
|
+
const tree = (_this$_tree$get3 = this._tree.get(unitId)) === null || _this$_tree$get3 === void 0 ? void 0 : _this$_tree$get3.get(subUnitId);
|
|
27078
|
+
if (!tree) return;
|
|
27210
27079
|
const items = tree.search({
|
|
27211
27080
|
minX: range.startColumn,
|
|
27212
27081
|
minY: range.startRow,
|
|
@@ -27227,7 +27096,93 @@ var RTree = class {
|
|
|
27227
27096
|
} else this._removeRTreeItem(search);
|
|
27228
27097
|
}
|
|
27229
27098
|
bulkRemove(searchList) {
|
|
27230
|
-
|
|
27099
|
+
if (searchList.length < 2) {
|
|
27100
|
+
for (const search of searchList) this.remove(search);
|
|
27101
|
+
return;
|
|
27102
|
+
}
|
|
27103
|
+
const groups = /* @__PURE__ */ new Map();
|
|
27104
|
+
for (const search of searchList) {
|
|
27105
|
+
let sheets = groups.get(search.unitId);
|
|
27106
|
+
if (!sheets) {
|
|
27107
|
+
sheets = /* @__PURE__ */ new Map();
|
|
27108
|
+
groups.set(search.unitId, sheets);
|
|
27109
|
+
}
|
|
27110
|
+
let ids = sheets.get(search.sheetId);
|
|
27111
|
+
if (!ids) {
|
|
27112
|
+
ids = /* @__PURE__ */ new Map();
|
|
27113
|
+
sheets.set(search.sheetId, ids);
|
|
27114
|
+
}
|
|
27115
|
+
const ranges = ids.get(search.id);
|
|
27116
|
+
if (ranges) ranges.push(search);
|
|
27117
|
+
else ids.set(search.id, [search]);
|
|
27118
|
+
}
|
|
27119
|
+
for (const [unitId, sheets] of groups) for (const [sheetId, ids] of sheets) if (!this._removeSparseRanges(unitId, sheetId, ids)) this._bulkRemoveFromSheet(unitId, sheetId, ids);
|
|
27120
|
+
}
|
|
27121
|
+
_bulkRemoveFromSheet(unitId, sheetId, searches) {
|
|
27122
|
+
var _this$_tree$get4, _this$_oneCellCache$g2;
|
|
27123
|
+
if (searches.size === 1) {
|
|
27124
|
+
const [ranges] = searches.values();
|
|
27125
|
+
if (ranges.length === 1) {
|
|
27126
|
+
this.remove(ranges[0]);
|
|
27127
|
+
return;
|
|
27128
|
+
}
|
|
27129
|
+
}
|
|
27130
|
+
const matches = (id, bounds, rangedOnly = false) => {
|
|
27131
|
+
var _searches$get;
|
|
27132
|
+
return ((_searches$get = searches.get(id)) === null || _searches$get === void 0 ? void 0 : _searches$get.some(({ range }) => (!rangedOnly || !this._enableOneCellCache || range.startRow !== range.endRow || range.startColumn !== range.endColumn) && range.startColumn <= bounds.maxX && range.endColumn >= bounds.minX && range.startRow <= bounds.maxY && range.endRow >= bounds.minY)) ?? false;
|
|
27133
|
+
};
|
|
27134
|
+
const tree = (_this$_tree$get4 = this._tree.get(unitId)) === null || _this$_tree$get4 === void 0 ? void 0 : _this$_tree$get4.get(sheetId);
|
|
27135
|
+
if (tree) {
|
|
27136
|
+
const entries = tree.all();
|
|
27137
|
+
let retained = 0;
|
|
27138
|
+
for (const item of entries) if (!matches(item.id, item, true)) entries[retained++] = item;
|
|
27139
|
+
if (retained !== entries.length) {
|
|
27140
|
+
entries.length = retained;
|
|
27141
|
+
tree.clear();
|
|
27142
|
+
tree.load(entries);
|
|
27143
|
+
}
|
|
27144
|
+
}
|
|
27145
|
+
const cells = (_this$_oneCellCache$g2 = this._oneCellCache.get(unitId)) === null || _this$_oneCellCache$g2 === void 0 ? void 0 : _this$_oneCellCache$g2.get(sheetId);
|
|
27146
|
+
if (cells) for (const [row, columns] of cells) for (const [column, ids] of columns) {
|
|
27147
|
+
const bounds = {
|
|
27148
|
+
minX: column,
|
|
27149
|
+
maxX: column,
|
|
27150
|
+
minY: row,
|
|
27151
|
+
maxY: row
|
|
27152
|
+
};
|
|
27153
|
+
for (const id of ids) if (matches(id, bounds)) ids.delete(id);
|
|
27154
|
+
}
|
|
27155
|
+
}
|
|
27156
|
+
_removeSparseRanges(unitId, sheetId, searches) {
|
|
27157
|
+
var _this$_tree$get5, _this$_oneCellCache$g3;
|
|
27158
|
+
let remaining = 128;
|
|
27159
|
+
if (searches.size > remaining) return false;
|
|
27160
|
+
const visit = (node, range) => {
|
|
27161
|
+
if (--remaining < 0) return false;
|
|
27162
|
+
if (!node.leaf && range.startColumn <= node.minX && range.endColumn >= node.maxX && range.startRow <= node.minY && range.endRow >= node.maxY) return false;
|
|
27163
|
+
for (const child of node.children) if (range.startColumn <= child.maxX && range.endColumn >= child.minX && range.startRow <= child.maxY && range.endRow >= child.minY) {
|
|
27164
|
+
if (node.leaf) {
|
|
27165
|
+
if (--remaining < 0) return false;
|
|
27166
|
+
} else if (!visit(child, range)) return false;
|
|
27167
|
+
}
|
|
27168
|
+
return true;
|
|
27169
|
+
};
|
|
27170
|
+
const tree = (_this$_tree$get5 = this._tree.get(unitId)) === null || _this$_tree$get5 === void 0 ? void 0 : _this$_tree$get5.get(sheetId);
|
|
27171
|
+
const root = tree === null || tree === void 0 ? void 0 : tree.toJSON();
|
|
27172
|
+
const cells = (_this$_oneCellCache$g3 = this._oneCellCache.get(unitId)) === null || _this$_oneCellCache$g3 === void 0 ? void 0 : _this$_oneCellCache$g3.get(sheetId);
|
|
27173
|
+
for (const [id, ranges] of searches) {
|
|
27174
|
+
if (Number.isNaN(id)) return false;
|
|
27175
|
+
for (const { range } of ranges) {
|
|
27176
|
+
if (--remaining < 0) return false;
|
|
27177
|
+
if (this._enableOneCellCache) {
|
|
27178
|
+
if (range.startRow === range.endRow && range.startColumn === range.endColumn) continue;
|
|
27179
|
+
if (cells) return false;
|
|
27180
|
+
}
|
|
27181
|
+
if (root && !visit(root, range)) return false;
|
|
27182
|
+
}
|
|
27183
|
+
}
|
|
27184
|
+
for (const ranges of searches.values()) for (const search of ranges) this.remove(search);
|
|
27185
|
+
return true;
|
|
27231
27186
|
}
|
|
27232
27187
|
clear() {
|
|
27233
27188
|
this._tree.clear();
|
|
@@ -27256,8 +27211,7 @@ var RTree = class {
|
|
|
27256
27211
|
}
|
|
27257
27212
|
};
|
|
27258
27213
|
|
|
27259
|
-
|
|
27260
|
-
//#region src/types/enum/record-filter.ts
|
|
27214
|
+
// src/types/enum/record-filter.ts
|
|
27261
27215
|
/**
|
|
27262
27216
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
27263
27217
|
*
|
|
@@ -27291,8 +27245,7 @@ let FilterSelectionMode = /* @__PURE__ */ function(FilterSelectionMode) {
|
|
|
27291
27245
|
return FilterSelectionMode;
|
|
27292
27246
|
}({});
|
|
27293
27247
|
|
|
27294
|
-
|
|
27295
|
-
//#region src/shared/record-value.ts
|
|
27248
|
+
// src/shared/record-value.ts
|
|
27296
27249
|
function getRecordValueKey(_value) {
|
|
27297
27250
|
const value = _value;
|
|
27298
27251
|
if (!isRecord(value) || typeof value.type !== "string") throw new TypeError("Invalid record value.");
|
|
@@ -27319,8 +27272,7 @@ function isRecord(value) {
|
|
|
27319
27272
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
27320
27273
|
}
|
|
27321
27274
|
|
|
27322
|
-
|
|
27323
|
-
//#region src/shared/timer.ts
|
|
27275
|
+
// src/shared/timer.ts
|
|
27324
27276
|
/**
|
|
27325
27277
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
27326
27278
|
*
|
|
@@ -27365,8 +27317,7 @@ function delayAnimationFrame(frames = 1) {
|
|
|
27365
27317
|
});
|
|
27366
27318
|
}
|
|
27367
27319
|
|
|
27368
|
-
|
|
27369
|
-
//#region src/shared/units.ts
|
|
27320
|
+
// src/shared/units.ts
|
|
27370
27321
|
/**
|
|
27371
27322
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
27372
27323
|
*
|
|
@@ -27391,8 +27342,7 @@ function emuToCssPx(value) {
|
|
|
27391
27342
|
return value / EMU_PER_CSS_PX;
|
|
27392
27343
|
}
|
|
27393
27344
|
|
|
27394
|
-
|
|
27395
|
-
//#region src/sheets/clone.ts
|
|
27345
|
+
// src/sheets/clone.ts
|
|
27396
27346
|
/**
|
|
27397
27347
|
* Fast clone for primitive values and simple objects.
|
|
27398
27348
|
* Avoids type checking overhead when we know the structure.
|
|
@@ -27541,12 +27491,14 @@ function cloneMergeData(ranges) {
|
|
|
27541
27491
|
function cloneWorksheetData(worksheet) {
|
|
27542
27492
|
const result = {
|
|
27543
27493
|
id: worksheet.id,
|
|
27494
|
+
...worksheet.type === void 0 ? {} : { type: worksheet.type },
|
|
27544
27495
|
name: worksheet.name,
|
|
27545
27496
|
tabColor: worksheet.tabColor,
|
|
27546
27497
|
hidden: worksheet.hidden,
|
|
27547
27498
|
rowCount: worksheet.rowCount,
|
|
27548
27499
|
columnCount: worksheet.columnCount,
|
|
27549
27500
|
zoomRatio: worksheet.zoomRatio,
|
|
27501
|
+
...worksheet.zoomToFit === void 0 ? {} : { zoomToFit: worksheet.zoomToFit },
|
|
27550
27502
|
scrollTop: worksheet.scrollTop,
|
|
27551
27503
|
scrollLeft: worksheet.scrollLeft,
|
|
27552
27504
|
defaultColumnWidth: worksheet.defaultColumnWidth,
|
|
@@ -27587,8 +27539,7 @@ function cloneWorksheetData(worksheet) {
|
|
|
27587
27539
|
return result;
|
|
27588
27540
|
}
|
|
27589
27541
|
|
|
27590
|
-
|
|
27591
|
-
//#region src/skeleton.ts
|
|
27542
|
+
// src/skeleton.ts
|
|
27592
27543
|
let Skeleton = class Skeleton extends Disposable {
|
|
27593
27544
|
constructor(_localeService) {
|
|
27594
27545
|
super();
|
|
@@ -27614,8 +27565,7 @@ let Skeleton = class Skeleton extends Disposable {
|
|
|
27614
27565
|
};
|
|
27615
27566
|
Skeleton = __decorate([__decorateParam(0, (0, _wendellhu_redi.Inject)(LocaleService))], Skeleton);
|
|
27616
27567
|
|
|
27617
|
-
|
|
27618
|
-
//#region src/sheets/sheet-skeleton.ts
|
|
27568
|
+
// src/sheets/sheet-skeleton.ts
|
|
27619
27569
|
/**
|
|
27620
27570
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
27621
27571
|
*
|
|
@@ -27927,35 +27877,19 @@ let SheetSkeleton = class SheetSkeleton extends Skeleton {
|
|
|
27927
27877
|
}
|
|
27928
27878
|
_getOverflowBound(row, startColumn, endColumn, contentWidth, horizontalAlign = 1) {
|
|
27929
27879
|
let cumWidth = 0;
|
|
27930
|
-
|
|
27931
|
-
|
|
27932
|
-
for (let i = startColumn; i >= endColumn; i--) {
|
|
27933
|
-
const column = i;
|
|
27934
|
-
const cell = this.worksheet.getCell(row, column);
|
|
27935
|
-
if (!isCellCoverable(cell) && column !== startColumn || this.intersectMergeRange(row, column)) {
|
|
27936
|
-
if (column === startColumn) return column;
|
|
27937
|
-
return column + 1 > columnCount ? columnCount : column + 1;
|
|
27938
|
-
}
|
|
27939
|
-
const { startX, endX } = getCellWithCoordByIndexCore(row, column, this.rowHeightAccumulation, this.columnWidthAccumulation, void 0, this.getGapSizeGetter());
|
|
27940
|
-
if (horizontalAlign === 2 && column === startColumn) cumWidth += (endX - startX) / 2;
|
|
27941
|
-
else cumWidth += endX - startX;
|
|
27942
|
-
if (contentWidth < cumWidth) return column;
|
|
27943
|
-
}
|
|
27944
|
-
return startColumn;
|
|
27945
|
-
}
|
|
27946
|
-
for (let i = startColumn; i <= endColumn; i++) {
|
|
27947
|
-
const column = i;
|
|
27880
|
+
const direction = startColumn > endColumn ? -1 : 1;
|
|
27881
|
+
for (let column = startColumn; direction === 1 ? column <= endColumn : column >= endColumn; column += direction) {
|
|
27948
27882
|
const cell = this.worksheet.getCell(row, column);
|
|
27949
27883
|
if (!isCellCoverable(cell) && column !== startColumn || this.intersectMergeRange(row, column)) {
|
|
27950
27884
|
if (column === startColumn) return column;
|
|
27951
|
-
return column -
|
|
27885
|
+
return Tools.clamp(column - direction, 0, this._columnWidthAccumulation.length - 1);
|
|
27952
27886
|
}
|
|
27953
27887
|
const { startX, endX } = getCellWithCoordByIndexCore(row, column, this.rowHeightAccumulation, this.columnWidthAccumulation, void 0, this.getGapSizeGetter());
|
|
27954
27888
|
if (horizontalAlign === 2 && column === startColumn) cumWidth += (endX - startX) / 2;
|
|
27955
27889
|
else cumWidth += endX - startX;
|
|
27956
27890
|
if (contentWidth < cumWidth) return column;
|
|
27957
27891
|
}
|
|
27958
|
-
return endColumn;
|
|
27892
|
+
return direction === 1 ? endColumn : startColumn;
|
|
27959
27893
|
}
|
|
27960
27894
|
/**
|
|
27961
27895
|
* Calculate data for row col & cell position.
|
|
@@ -28015,30 +27949,22 @@ let SheetSkeleton = class SheetSkeleton extends Skeleton {
|
|
|
28015
27949
|
let lastSearchedMergeCell = null;
|
|
28016
27950
|
while (isSearching) {
|
|
28017
27951
|
isSearching = false;
|
|
28018
|
-
for (
|
|
28019
|
-
|
|
28020
|
-
if (
|
|
28021
|
-
const rect1 = {
|
|
27952
|
+
for (const mergeRange of mergeData) {
|
|
27953
|
+
if (searchedMerge.getValue(mergeRange.startRow, mergeRange.startColumn)) continue;
|
|
27954
|
+
if (getIntersectRange({
|
|
28022
27955
|
startColumn,
|
|
28023
27956
|
startRow,
|
|
28024
27957
|
endColumn,
|
|
28025
27958
|
endRow
|
|
28026
|
-
}
|
|
28027
|
-
|
|
28028
|
-
startColumn
|
|
28029
|
-
|
|
28030
|
-
endColumn
|
|
28031
|
-
|
|
28032
|
-
};
|
|
28033
|
-
if (getIntersectRange(rect1, rect2)) {
|
|
28034
|
-
startRow = Math.min(startRow, mainStartRow);
|
|
28035
|
-
startColumn = Math.min(startColumn, mainStartColumn);
|
|
28036
|
-
endRow = Math.max(endRow, mainEndRow);
|
|
28037
|
-
endColumn = Math.max(endColumn, mainEndColumn);
|
|
28038
|
-
searchedMerge.setValue(mainStartRow, mainStartColumn, true);
|
|
27959
|
+
}, mergeRange)) {
|
|
27960
|
+
startRow = Math.min(startRow, mergeRange.startRow);
|
|
27961
|
+
startColumn = Math.min(startColumn, mergeRange.startColumn);
|
|
27962
|
+
endRow = Math.max(endRow, mergeRange.endRow);
|
|
27963
|
+
endColumn = Math.max(endColumn, mergeRange.endColumn);
|
|
27964
|
+
searchedMerge.setValue(mergeRange.startRow, mergeRange.startColumn, true);
|
|
28039
27965
|
isSearching = true;
|
|
28040
27966
|
searchedMergeSize++;
|
|
28041
|
-
lastSearchedMergeCell =
|
|
27967
|
+
lastSearchedMergeCell = mergeRange;
|
|
28042
27968
|
}
|
|
28043
27969
|
}
|
|
28044
27970
|
}
|
|
@@ -28096,10 +28022,10 @@ let SheetSkeleton = class SheetSkeleton extends Skeleton {
|
|
|
28096
28022
|
*/
|
|
28097
28023
|
getRowIndexByOffsetY(offsetY, scaleY, scrollXY, options) {
|
|
28098
28024
|
const { rowHeightAccumulation } = this;
|
|
28099
|
-
|
|
28100
|
-
let row = searchArray(rowHeightAccumulation,
|
|
28025
|
+
const transformedOffsetY = getTransformOffsetY(offsetY, scaleY, scrollXY, this.columnHeaderHeightAndMarginTop);
|
|
28026
|
+
let row = searchArray(rowHeightAccumulation, transformedOffsetY, options === null || options === void 0 ? void 0 : options.firstMatch);
|
|
28101
28027
|
if (options === null || options === void 0 ? void 0 : options.closeFirst) {
|
|
28102
|
-
if (Math.abs(rowHeightAccumulation[row] -
|
|
28028
|
+
if (Math.abs(rowHeightAccumulation[row] - transformedOffsetY) < Math.abs(transformedOffsetY - (rowHeightAccumulation[row - 1] ?? 0))) row = row + 1;
|
|
28103
28029
|
}
|
|
28104
28030
|
return row;
|
|
28105
28031
|
}
|
|
@@ -28186,6 +28112,8 @@ let SheetSkeleton = class SheetSkeleton extends Skeleton {
|
|
|
28186
28112
|
* @param scaleX render scene scale x-axis, scene.getAncestorScale
|
|
28187
28113
|
* @param scaleY render scene scale y-axis, scene.getAncestorScale
|
|
28188
28114
|
* @param scrollXY render viewportScroll {x, y}
|
|
28115
|
+
* @param scrollXY.x horizontal scroll offset
|
|
28116
|
+
* @param scrollXY.y vertical scroll offset
|
|
28189
28117
|
* @param options {IGetRowColByPosOptions}
|
|
28190
28118
|
* @returns {ICellWithCoord} Selection data with coordinates
|
|
28191
28119
|
*/
|
|
@@ -28330,76 +28258,40 @@ function getCellCoordByIndexSimple(row, column, rowHeightAccumulation, columnWid
|
|
|
28330
28258
|
* @returns {ICellWithCoord} The cell position information of the specified row and column, including the position information of the cell and the merge information of the cell
|
|
28331
28259
|
*/
|
|
28332
28260
|
function getCellWithCoordByIndexCore(row, column, rowHeightAccumulation, columnWidthAccumulation, mergeDataInfo, gapSizeGetter) {
|
|
28333
|
-
|
|
28334
|
-
|
|
28335
|
-
|
|
28336
|
-
|
|
28337
|
-
startY,
|
|
28338
|
-
endY,
|
|
28339
|
-
startX,
|
|
28340
|
-
endX,
|
|
28261
|
+
const actualRow = Tools.clamp(row, 0, rowHeightAccumulation.length - 1);
|
|
28262
|
+
const actualColumn = Tools.clamp(column, 0, columnWidthAccumulation.length - 1);
|
|
28263
|
+
const position = getCellCoordByIndexSimple(actualRow, actualColumn, rowHeightAccumulation, columnWidthAccumulation, (gapSizeGetter === null || gapSizeGetter === void 0 ? void 0 : gapSizeGetter.row(actualRow)) ?? 0, (gapSizeGetter === null || gapSizeGetter === void 0 ? void 0 : gapSizeGetter.col(actualColumn)) ?? 0);
|
|
28264
|
+
const { isMerged, isMergedMainCell, startRow, startColumn, endRow, endColumn } = mergeDataInfo ?? {
|
|
28341
28265
|
isMerged: false,
|
|
28342
28266
|
isMergedMainCell: false,
|
|
28343
|
-
|
|
28344
|
-
|
|
28345
|
-
|
|
28346
|
-
|
|
28347
|
-
endY,
|
|
28348
|
-
startX,
|
|
28349
|
-
endX,
|
|
28350
|
-
startRow: row,
|
|
28351
|
-
startColumn: column,
|
|
28352
|
-
endRow: row,
|
|
28353
|
-
endColumn: column
|
|
28354
|
-
}
|
|
28267
|
+
startRow: actualRow,
|
|
28268
|
+
startColumn: actualColumn,
|
|
28269
|
+
endRow: actualRow,
|
|
28270
|
+
endColumn: actualColumn
|
|
28355
28271
|
};
|
|
28356
|
-
const
|
|
28357
|
-
|
|
28272
|
+
const mergeInfo = {
|
|
28273
|
+
...position,
|
|
28358
28274
|
startRow,
|
|
28359
28275
|
startColumn,
|
|
28360
28276
|
endRow,
|
|
28361
|
-
endColumn
|
|
28362
|
-
startY,
|
|
28363
|
-
endY,
|
|
28364
|
-
startX,
|
|
28365
|
-
endX
|
|
28277
|
+
endColumn
|
|
28366
28278
|
};
|
|
28367
|
-
|
|
28368
|
-
|
|
28369
|
-
|
|
28370
|
-
|
|
28371
|
-
|
|
28372
|
-
|
|
28373
|
-
|
|
28374
|
-
|
|
28375
|
-
|
|
28376
|
-
mergeInfo = {
|
|
28377
|
-
...mergeInfo,
|
|
28378
|
-
startY: mergeStartY,
|
|
28379
|
-
endY: mergeEndY,
|
|
28380
|
-
startX: mergeStartX,
|
|
28381
|
-
endX: mergeEndX
|
|
28382
|
-
};
|
|
28383
|
-
} else if (!isMerged && endRow !== -1 && endColumn !== -1) {
|
|
28384
|
-
const mergeEndY = rowHeightAccumulation[endRow] || rowHeightAccumulation[rowAccumulationCount];
|
|
28385
|
-
const mergeEndX = columnWidthAccumulation[endColumn] || columnWidthAccumulation[columnAccumulationCount];
|
|
28386
|
-
mergeInfo = {
|
|
28387
|
-
...mergeInfo,
|
|
28388
|
-
startY,
|
|
28389
|
-
endY: mergeEndY,
|
|
28390
|
-
startX,
|
|
28391
|
-
endX: mergeEndX
|
|
28392
|
-
};
|
|
28279
|
+
if (isMerged ? startRow !== -1 && startColumn !== -1 : endRow !== -1 && endColumn !== -1) {
|
|
28280
|
+
if (isMerged) {
|
|
28281
|
+
const mergeRowGapSize = (gapSizeGetter === null || gapSizeGetter === void 0 ? void 0 : gapSizeGetter.row(startRow)) ?? 0;
|
|
28282
|
+
const mergeColGapSize = (gapSizeGetter === null || gapSizeGetter === void 0 ? void 0 : gapSizeGetter.col(startColumn)) ?? 0;
|
|
28283
|
+
mergeInfo.startY = (rowHeightAccumulation[startRow - 1] ?? 0) + mergeRowGapSize;
|
|
28284
|
+
mergeInfo.startX = (columnWidthAccumulation[startColumn - 1] ?? 0) + mergeColGapSize;
|
|
28285
|
+
}
|
|
28286
|
+
mergeInfo.endY = rowHeightAccumulation[endRow] ?? rowHeightAccumulation[rowHeightAccumulation.length - 1];
|
|
28287
|
+
mergeInfo.endX = columnWidthAccumulation[endColumn] ?? columnWidthAccumulation[columnWidthAccumulation.length - 1];
|
|
28393
28288
|
}
|
|
28394
28289
|
return {
|
|
28290
|
+
...position,
|
|
28395
28291
|
isMerged,
|
|
28396
28292
|
isMergedMainCell,
|
|
28397
|
-
actualRow
|
|
28398
|
-
actualColumn
|
|
28399
|
-
startY,
|
|
28400
|
-
endY,
|
|
28401
|
-
startX,
|
|
28402
|
-
endX,
|
|
28293
|
+
actualRow,
|
|
28294
|
+
actualColumn,
|
|
28403
28295
|
mergeInfo
|
|
28404
28296
|
};
|
|
28405
28297
|
}
|
|
@@ -28408,6 +28300,8 @@ function getCellWithCoordByIndexCore(row, column, rowHeightAccumulation, columnW
|
|
|
28408
28300
|
* @param offsetX Offset value from PointerEvent in canvas element.
|
|
28409
28301
|
* @param scaleX from scene.getAncestorScale
|
|
28410
28302
|
* @param scrollXY Scroll value of viewport
|
|
28303
|
+
* @param scrollXY.x horizontal scroll offset
|
|
28304
|
+
* @param scrollXY.y vertical scroll offset
|
|
28411
28305
|
* @returns {number} x in sheet coordinate.
|
|
28412
28306
|
*/
|
|
28413
28307
|
function getTransformOffsetX(offsetX, scaleX, scrollXY, rowHeaderWidth) {
|
|
@@ -28418,15 +28312,15 @@ function getTransformOffsetX(offsetX, scaleX, scrollXY, rowHeaderWidth) {
|
|
|
28418
28312
|
* @param offsetY
|
|
28419
28313
|
* @param scaleY
|
|
28420
28314
|
* @param scrollXY
|
|
28315
|
+
* @param scrollXY.x horizontal scroll offset
|
|
28316
|
+
* @param scrollXY.y vertical scroll offset
|
|
28421
28317
|
*/
|
|
28422
28318
|
function getTransformOffsetY(offsetY, scaleY, scrollXY, columnHeight) {
|
|
28423
28319
|
const { y: scrollY } = scrollXY;
|
|
28424
|
-
|
|
28425
|
-
return offsetY;
|
|
28320
|
+
return offsetY / scaleY + scrollY - columnHeight;
|
|
28426
28321
|
}
|
|
28427
28322
|
|
|
28428
|
-
|
|
28429
|
-
//#region src/types/const/clipboard.ts
|
|
28323
|
+
// src/types/const/clipboard.ts
|
|
28430
28324
|
/**
|
|
28431
28325
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
28432
28326
|
*
|
|
@@ -28450,8 +28344,7 @@ const skipParseTagNames = [
|
|
|
28450
28344
|
"link"
|
|
28451
28345
|
];
|
|
28452
28346
|
|
|
28453
|
-
|
|
28454
|
-
//#region src/types/enum/data-validation-error-style.ts
|
|
28347
|
+
// src/types/enum/data-validation-error-style.ts
|
|
28455
28348
|
/**
|
|
28456
28349
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
28457
28350
|
*
|
|
@@ -28474,8 +28367,7 @@ let DataValidationErrorStyle = /* @__PURE__ */ function(DataValidationErrorStyle
|
|
|
28474
28367
|
return DataValidationErrorStyle;
|
|
28475
28368
|
}({});
|
|
28476
28369
|
|
|
28477
|
-
|
|
28478
|
-
//#region src/types/enum/data-validation-ime-mode.ts
|
|
28370
|
+
// src/types/enum/data-validation-ime-mode.ts
|
|
28479
28371
|
/**
|
|
28480
28372
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
28481
28373
|
*
|
|
@@ -28506,8 +28398,7 @@ let DataValidationImeMode = /* @__PURE__ */ function(DataValidationImeMode) {
|
|
|
28506
28398
|
return DataValidationImeMode;
|
|
28507
28399
|
}({});
|
|
28508
28400
|
|
|
28509
|
-
|
|
28510
|
-
//#region src/types/enum/data-validation-operator.ts
|
|
28401
|
+
// src/types/enum/data-validation-operator.ts
|
|
28511
28402
|
/**
|
|
28512
28403
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
28513
28404
|
*
|
|
@@ -28535,8 +28426,7 @@ let DataValidationOperator = /* @__PURE__ */ function(DataValidationOperator) {
|
|
|
28535
28426
|
return DataValidationOperator;
|
|
28536
28427
|
}({});
|
|
28537
28428
|
|
|
28538
|
-
|
|
28539
|
-
//#region src/types/enum/data-validation-render-mode.ts
|
|
28429
|
+
// src/types/enum/data-validation-render-mode.ts
|
|
28540
28430
|
/**
|
|
28541
28431
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
28542
28432
|
*
|
|
@@ -28559,8 +28449,7 @@ let DataValidationRenderMode = /* @__PURE__ */ function(DataValidationRenderMode
|
|
|
28559
28449
|
return DataValidationRenderMode;
|
|
28560
28450
|
}({});
|
|
28561
28451
|
|
|
28562
|
-
|
|
28563
|
-
//#region src/types/enum/data-validation-status.ts
|
|
28452
|
+
// src/types/enum/data-validation-status.ts
|
|
28564
28453
|
/**
|
|
28565
28454
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
28566
28455
|
*
|
|
@@ -28583,8 +28472,7 @@ let DataValidationStatus = /* @__PURE__ */ function(DataValidationStatus) {
|
|
|
28583
28472
|
return DataValidationStatus;
|
|
28584
28473
|
}({});
|
|
28585
28474
|
|
|
28586
|
-
|
|
28587
|
-
//#region src/types/enum/data-validation-type.ts
|
|
28475
|
+
// src/types/enum/data-validation-type.ts
|
|
28588
28476
|
/**
|
|
28589
28477
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
28590
28478
|
*
|
|
@@ -28624,8 +28512,7 @@ let DataValidationType = /* @__PURE__ */ function(DataValidationType) {
|
|
|
28624
28512
|
return DataValidationType;
|
|
28625
28513
|
}({});
|
|
28626
28514
|
|
|
28627
|
-
|
|
28628
|
-
//#region src/services/resource-loader/resource-loader.service.ts
|
|
28515
|
+
// src/services/resource-loader/resource-loader.service.ts
|
|
28629
28516
|
let ResourceLoaderService = class ResourceLoaderService extends Disposable {
|
|
28630
28517
|
constructor(_resourceManagerService, _univerInstanceService) {
|
|
28631
28518
|
super();
|
|
@@ -28724,36 +28611,7 @@ let ResourceLoaderService = class ResourceLoaderService extends Disposable {
|
|
|
28724
28611
|
};
|
|
28725
28612
|
ResourceLoaderService = __decorate([__decorateParam(0, (0, _wendellhu_redi.Inject)(IResourceManagerService)), __decorateParam(1, (0, _wendellhu_redi.Inject)(IUniverInstanceService))], ResourceLoaderService);
|
|
28726
28613
|
|
|
28727
|
-
|
|
28728
|
-
//#region src/slides/slide-data-model.ts
|
|
28729
|
-
var SlideDataModel = class extends UnitModel {
|
|
28730
|
-
constructor(..._args) {
|
|
28731
|
-
super(..._args);
|
|
28732
|
-
_defineProperty(this, "type", void 0);
|
|
28733
|
-
_defineProperty(this, "name$", void 0);
|
|
28734
|
-
}
|
|
28735
|
-
getUnitId() {
|
|
28736
|
-
throw new Error("Method not implemented.");
|
|
28737
|
-
}
|
|
28738
|
-
setName(name) {
|
|
28739
|
-
throw new Error("Method not implemented.");
|
|
28740
|
-
}
|
|
28741
|
-
getSnapshot() {
|
|
28742
|
-
throw new Error("Method not implemented.");
|
|
28743
|
-
}
|
|
28744
|
-
getRev() {
|
|
28745
|
-
throw new Error("Method not implemented.");
|
|
28746
|
-
}
|
|
28747
|
-
incrementRev() {
|
|
28748
|
-
throw new Error("Method not implemented.");
|
|
28749
|
-
}
|
|
28750
|
-
setRev(rev) {
|
|
28751
|
-
throw new Error("Method not implemented.");
|
|
28752
|
-
}
|
|
28753
|
-
};
|
|
28754
|
-
|
|
28755
|
-
//#endregion
|
|
28756
|
-
//#region src/univer.ts
|
|
28614
|
+
// src/univer.ts
|
|
28757
28615
|
/**
|
|
28758
28616
|
* @hideconstructor
|
|
28759
28617
|
*/
|
|
@@ -28821,7 +28679,6 @@ var Univer = class {
|
|
|
28821
28679
|
_init(injector) {
|
|
28822
28680
|
this._univerInstanceService.registerCtorForType(_univerjs_protocol.UniverType.UNIVER_SHEET, Workbook);
|
|
28823
28681
|
this._univerInstanceService.registerCtorForType(_univerjs_protocol.UniverType.UNIVER_DOC, DocumentDataModel);
|
|
28824
|
-
this._univerInstanceService.registerCtorForType(_univerjs_protocol.UniverType.UNIVER_SLIDE, SlideDataModel);
|
|
28825
28682
|
const univerInstanceService = injector.get(IUniverInstanceService);
|
|
28826
28683
|
univerInstanceService.__setCreateHandler((type, data, ctor, options) => {
|
|
28827
28684
|
const isFirstTime = !this._startedTypes.has(type);
|
|
@@ -28897,8 +28754,7 @@ function createUniverInjector(parentInjector, override) {
|
|
|
28897
28754
|
return injector;
|
|
28898
28755
|
}
|
|
28899
28756
|
|
|
28900
|
-
|
|
28901
|
-
//#region src/index.ts
|
|
28757
|
+
// src/index.ts
|
|
28902
28758
|
/**
|
|
28903
28759
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
28904
28760
|
*
|
|
@@ -28916,7 +28772,6 @@ function createUniverInjector(parentInjector, override) {
|
|
|
28916
28772
|
*/
|
|
28917
28773
|
installShims();
|
|
28918
28774
|
|
|
28919
|
-
//#endregion
|
|
28920
28775
|
exports.ABCToNumber = ABCToNumber;
|
|
28921
28776
|
exports.AUTO_HEIGHT_FOR_MERGED_CELLS = AUTO_HEIGHT_FOR_MERGED_CELLS;
|
|
28922
28777
|
exports.AbsoluteRefType = AbsoluteRefType;
|
|
@@ -29637,6 +29492,7 @@ exports.repeatStringNumTimes = repeatStringNumTimes;
|
|
|
29637
29492
|
exports.replaceInDocumentBody = replaceInDocumentBody;
|
|
29638
29493
|
exports.requestImmediateMacroTask = requestImmediateMacroTask;
|
|
29639
29494
|
exports.resolveDocumentParagraphStyle = resolveDocumentParagraphStyle;
|
|
29495
|
+
exports.resolveDocumentParagraphWordWrap = resolveDocumentParagraphWordWrap;
|
|
29640
29496
|
exports.resolveSectionHeaderFooterReference = resolveSectionHeaderFooterReference;
|
|
29641
29497
|
exports.resolveSectionHeaderFooterReferences = resolveSectionHeaderFooterReferences;
|
|
29642
29498
|
exports.resolveWithBasePath = resolveWithBasePath;
|