@univerjs/core 1.0.0-alpha.5 → 1.0.0-alpha.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +82 -23
- package/lib/es/index.js +77 -25
- package/lib/index.js +77 -25
- package/lib/types/bases/typedef.d.ts +8 -0
- package/lib/types/docs/data-model/text-x/build-utils/data-stream-change.d.ts +3 -3
- package/lib/types/index.d.ts +1 -0
- package/lib/types/services/context/context.d.ts +1 -0
- package/lib/types/services/region/region.service.d.ts +28 -0
- package/lib/types/types/interfaces/i-document-data-interceptor.d.ts +2 -0
- package/lib/types/univer.d.ts +5 -0
- package/lib/umd/index.js +14 -14
- package/package.json +4 -4
package/lib/cjs/index.js
CHANGED
|
@@ -1743,7 +1743,7 @@ let ThemeColors = /* @__PURE__ */ function(ThemeColors) {
|
|
|
1743
1743
|
//#endregion
|
|
1744
1744
|
//#region package.json
|
|
1745
1745
|
var name = "@univerjs/core";
|
|
1746
|
-
var version = "1.0.0-alpha.
|
|
1746
|
+
var version = "1.0.0-alpha.7";
|
|
1747
1747
|
|
|
1748
1748
|
//#endregion
|
|
1749
1749
|
//#region src/common/array.ts
|
|
@@ -2460,17 +2460,7 @@ function fromCallback(callback) {
|
|
|
2460
2460
|
*/
|
|
2461
2461
|
function takeAfter(callback) {
|
|
2462
2462
|
return function complateAfter(source) {
|
|
2463
|
-
return
|
|
2464
|
-
source.subscribe({
|
|
2465
|
-
next: (v) => {
|
|
2466
|
-
subscriber.next(v);
|
|
2467
|
-
if (callback(v)) subscriber.complete();
|
|
2468
|
-
},
|
|
2469
|
-
complete: () => subscriber.complete(),
|
|
2470
|
-
error: (error) => subscriber.error(error)
|
|
2471
|
-
});
|
|
2472
|
-
return () => subscriber.unsubscribe();
|
|
2473
|
-
});
|
|
2463
|
+
return source.pipe((0, rxjs.takeWhile)((value) => !callback(value), true));
|
|
2474
2464
|
};
|
|
2475
2465
|
}
|
|
2476
2466
|
function bufferDebounceTime(time = 0) {
|
|
@@ -13233,16 +13223,24 @@ var RegistryAsMap = class RegistryAsMap {
|
|
|
13233
13223
|
function requestImmediateMacroTask(callback) {
|
|
13234
13224
|
const channel = new MessageChannel();
|
|
13235
13225
|
let cancelled = false;
|
|
13226
|
+
const close = () => {
|
|
13227
|
+
channel.port1.onmessage = null;
|
|
13228
|
+
channel.port1.close();
|
|
13229
|
+
channel.port2.close();
|
|
13230
|
+
};
|
|
13236
13231
|
const handler = () => {
|
|
13237
|
-
if (!cancelled)
|
|
13232
|
+
if (!cancelled) {
|
|
13233
|
+
cancelled = true;
|
|
13234
|
+
close();
|
|
13235
|
+
callback();
|
|
13236
|
+
}
|
|
13238
13237
|
};
|
|
13239
13238
|
channel.port1.onmessage = handler;
|
|
13240
13239
|
channel.port2.postMessage(null);
|
|
13241
13240
|
return () => {
|
|
13241
|
+
if (cancelled) return;
|
|
13242
13242
|
cancelled = true;
|
|
13243
|
-
|
|
13244
|
-
channel.port1.close();
|
|
13245
|
-
channel.port2.close();
|
|
13243
|
+
close();
|
|
13246
13244
|
};
|
|
13247
13245
|
}
|
|
13248
13246
|
|
|
@@ -17657,10 +17655,10 @@ function buildDrawingInsertBody(body, drawings, insertOffset) {
|
|
|
17657
17655
|
//#endregion
|
|
17658
17656
|
//#region src/docs/data-model/text-x/build-utils/data-stream-change.ts
|
|
17659
17657
|
/**
|
|
17660
|
-
* Finds one contiguous dataStream change. Pure structural insertions
|
|
17661
|
-
* anchored by their
|
|
17658
|
+
* Finds one contiguous dataStream change. Pure structural insertions and deletions
|
|
17659
|
+
* are anchored by their stable ids before falling back to string comparison.
|
|
17662
17660
|
* This prevents an adjacent identical sentinel from being mistaken for an
|
|
17663
|
-
* unchanged prefix and keeps the
|
|
17661
|
+
* unchanged prefix and keeps the structure metadata aligned with the TextX body.
|
|
17664
17662
|
*/
|
|
17665
17663
|
function getSingleDataStreamChange(previousBody, nextBody) {
|
|
17666
17664
|
if (previousBody == null || nextBody == null) return null;
|
|
@@ -17671,6 +17669,9 @@ function getSingleDataStreamChange(previousBody, nextBody) {
|
|
|
17671
17669
|
if (insertedLength > 0) {
|
|
17672
17670
|
const structuralInsertion = findStructuralInsertion(previousBody, nextBody, previousDataStream, nextDataStream, insertedLength);
|
|
17673
17671
|
if (structuralInsertion) return structuralInsertion;
|
|
17672
|
+
} else if (insertedLength < 0) {
|
|
17673
|
+
const structuralDeletion = findStructuralDeletion(previousBody, nextBody, previousDataStream, nextDataStream, -insertedLength);
|
|
17674
|
+
if (structuralDeletion) return structuralDeletion;
|
|
17674
17675
|
}
|
|
17675
17676
|
let start = 0;
|
|
17676
17677
|
while (start < previousDataStream.length && start < nextDataStream.length && previousDataStream[start] === nextDataStream[start]) start++;
|
|
@@ -17686,6 +17687,14 @@ function getSingleDataStreamChange(previousBody, nextBody) {
|
|
|
17686
17687
|
insertLength: nextEnd - start
|
|
17687
17688
|
};
|
|
17688
17689
|
}
|
|
17690
|
+
function findStructuralDeletion(previousBody, nextBody, previousDataStream, nextDataStream, deletedLength) {
|
|
17691
|
+
for (const start of collectNewStructuralStartOffsets(nextBody, previousBody)) if (previousDataStream.slice(0, start) === nextDataStream.slice(0, start) && previousDataStream.slice(start + deletedLength) === nextDataStream.slice(start)) return {
|
|
17692
|
+
start,
|
|
17693
|
+
deleteLength: deletedLength,
|
|
17694
|
+
insertLength: 0
|
|
17695
|
+
};
|
|
17696
|
+
return null;
|
|
17697
|
+
}
|
|
17689
17698
|
function findStructuralInsertion(previousBody, nextBody, previousDataStream, nextDataStream, insertedLength) {
|
|
17690
17699
|
for (const start of collectNewStructuralStartOffsets(previousBody, nextBody)) if (previousDataStream.slice(0, start) === nextDataStream.slice(0, start) && previousDataStream.slice(start) === nextDataStream.slice(start + insertedLength)) return {
|
|
17691
17700
|
start,
|
|
@@ -21036,6 +21045,7 @@ const FOCUSING_UNIT = "FOCUSING_UNIT";
|
|
|
21036
21045
|
const FOCUSING_SHEET = "FOCUSING_SHEET";
|
|
21037
21046
|
const FOCUSING_DOC = "FOCUSING_DOC";
|
|
21038
21047
|
const FOCUSING_SLIDE = "FOCUSING_SLIDE";
|
|
21048
|
+
const FOCUSING_BOARD = "FOCUSING_BOARD";
|
|
21039
21049
|
/** @deprecated */
|
|
21040
21050
|
const FOCUSING_EDITOR_BUT_HIDDEN = "FOCUSING_EDITOR_BUT_HIDDEN";
|
|
21041
21051
|
const EDITOR_ACTIVATED = "EDITOR_ACTIVATED";
|
|
@@ -23788,7 +23798,7 @@ let UniverInstanceService = class UniverInstanceService extends Disposable {
|
|
|
23788
23798
|
return (_this$_getUnitById2 = this._getUnitById(id)) === null || _this$_getUnitById2 === void 0 ? void 0 : _this$_getUnitById2[0];
|
|
23789
23799
|
}
|
|
23790
23800
|
focusUnit(id) {
|
|
23791
|
-
var _this$focused;
|
|
23801
|
+
var _this$focused, _this$focused2;
|
|
23792
23802
|
if (this._focused$.getValue() === id) return;
|
|
23793
23803
|
this._focused$.next(id);
|
|
23794
23804
|
if (this.focused instanceof Workbook) {
|
|
@@ -23796,24 +23806,35 @@ let UniverInstanceService = class UniverInstanceService extends Disposable {
|
|
|
23796
23806
|
this._contextService.setContextValue(FOCUSING_DOC, false);
|
|
23797
23807
|
this._contextService.setContextValue(FOCUSING_SHEET, true);
|
|
23798
23808
|
this._contextService.setContextValue(FOCUSING_SLIDE, false);
|
|
23809
|
+
this._contextService.setContextValue(FOCUSING_BOARD, false);
|
|
23799
23810
|
this.setCurrentUnitForType(id);
|
|
23800
23811
|
} else if (this.focused instanceof DocumentDataModel) {
|
|
23801
23812
|
this._contextService.setContextValue(FOCUSING_UNIT, true);
|
|
23802
23813
|
this._contextService.setContextValue(FOCUSING_DOC, true);
|
|
23803
23814
|
this._contextService.setContextValue(FOCUSING_SHEET, false);
|
|
23804
23815
|
this._contextService.setContextValue(FOCUSING_SLIDE, false);
|
|
23816
|
+
this._contextService.setContextValue(FOCUSING_BOARD, false);
|
|
23805
23817
|
this.setCurrentUnitForType(id);
|
|
23806
23818
|
} else if (((_this$focused = this.focused) === null || _this$focused === void 0 ? void 0 : _this$focused.type) === _univerjs_protocol.UniverType.UNIVER_SLIDE) {
|
|
23807
23819
|
this._contextService.setContextValue(FOCUSING_UNIT, true);
|
|
23808
23820
|
this._contextService.setContextValue(FOCUSING_DOC, false);
|
|
23809
23821
|
this._contextService.setContextValue(FOCUSING_SHEET, false);
|
|
23810
23822
|
this._contextService.setContextValue(FOCUSING_SLIDE, true);
|
|
23823
|
+
this._contextService.setContextValue(FOCUSING_BOARD, false);
|
|
23824
|
+
this.setCurrentUnitForType(id);
|
|
23825
|
+
} else if (((_this$focused2 = this.focused) === null || _this$focused2 === void 0 ? void 0 : _this$focused2.type) === _univerjs_protocol.UniverType.UNIVER_BOARD) {
|
|
23826
|
+
this._contextService.setContextValue(FOCUSING_UNIT, true);
|
|
23827
|
+
this._contextService.setContextValue(FOCUSING_DOC, false);
|
|
23828
|
+
this._contextService.setContextValue(FOCUSING_SHEET, false);
|
|
23829
|
+
this._contextService.setContextValue(FOCUSING_SLIDE, false);
|
|
23830
|
+
this._contextService.setContextValue(FOCUSING_BOARD, true);
|
|
23811
23831
|
this.setCurrentUnitForType(id);
|
|
23812
23832
|
} else {
|
|
23813
23833
|
this._contextService.setContextValue(FOCUSING_UNIT, false);
|
|
23814
23834
|
this._contextService.setContextValue(FOCUSING_DOC, false);
|
|
23815
23835
|
this._contextService.setContextValue(FOCUSING_SHEET, false);
|
|
23816
23836
|
this._contextService.setContextValue(FOCUSING_SLIDE, false);
|
|
23837
|
+
this._contextService.setContextValue(FOCUSING_BOARD, false);
|
|
23817
23838
|
}
|
|
23818
23839
|
}
|
|
23819
23840
|
getFocusedUnit() {
|
|
@@ -23850,8 +23871,8 @@ let UniverInstanceService = class UniverInstanceService extends Disposable {
|
|
|
23850
23871
|
}
|
|
23851
23872
|
}
|
|
23852
23873
|
_tryResetFocusOnRemoval(unitId) {
|
|
23853
|
-
var _this$
|
|
23854
|
-
if (((_this$
|
|
23874
|
+
var _this$focused3;
|
|
23875
|
+
if (((_this$focused3 = this.focused) === null || _this$focused3 === void 0 ? void 0 : _this$focused3.getUnitId()) === unitId) this._focused$.next(null);
|
|
23855
23876
|
}
|
|
23856
23877
|
_getUnitById(unitId) {
|
|
23857
23878
|
for (const [type, units] of this._unitsByType) {
|
|
@@ -24447,6 +24468,32 @@ PluginService = __decorate([
|
|
|
24447
24468
|
__decorateParam(2, ILogService)
|
|
24448
24469
|
], PluginService);
|
|
24449
24470
|
|
|
24471
|
+
//#endregion
|
|
24472
|
+
//#region src/services/region/region.service.ts
|
|
24473
|
+
let RegionService = class RegionService extends Disposable {
|
|
24474
|
+
constructor(_localeService) {
|
|
24475
|
+
super();
|
|
24476
|
+
this._localeService = _localeService;
|
|
24477
|
+
_defineProperty(this, "_currentRegion$", void 0);
|
|
24478
|
+
_defineProperty(this, "currentRegion$", void 0);
|
|
24479
|
+
_defineProperty(this, "_hasExplicitRegion", false);
|
|
24480
|
+
this._currentRegion$ = new rxjs.BehaviorSubject(this._localeService.getCurrentLocale());
|
|
24481
|
+
this.currentRegion$ = this._currentRegion$.asObservable();
|
|
24482
|
+
this.disposeWithMe(this._localeService.currentLocale$.subscribe((locale) => {
|
|
24483
|
+
if (!this._hasExplicitRegion && locale !== this._currentRegion$.value) this._currentRegion$.next(locale);
|
|
24484
|
+
}));
|
|
24485
|
+
this.disposeWithMe(toDisposable(() => this._currentRegion$.complete()));
|
|
24486
|
+
}
|
|
24487
|
+
setRegion(region) {
|
|
24488
|
+
this._hasExplicitRegion = true;
|
|
24489
|
+
this._currentRegion$.next(region);
|
|
24490
|
+
}
|
|
24491
|
+
getCurrentRegion() {
|
|
24492
|
+
return this._currentRegion$.value;
|
|
24493
|
+
}
|
|
24494
|
+
};
|
|
24495
|
+
RegionService = __decorate([__decorateParam(0, (0, _wendellhu_redi.Inject)(LocaleService))], RegionService);
|
|
24496
|
+
|
|
24450
24497
|
//#endregion
|
|
24451
24498
|
//#region src/services/resource-loader/type.ts
|
|
24452
24499
|
const IResourceLoaderService = (0, _wendellhu_redi.createIdentifier)("resource-loader-service");
|
|
@@ -26345,11 +26392,12 @@ var Univer = class {
|
|
|
26345
26392
|
_defineProperty(this, "_injector", void 0);
|
|
26346
26393
|
_defineProperty(this, "_disposingCallbacks", new DisposableCollection());
|
|
26347
26394
|
const injector = this._injector = createUniverInjector(parentInjector, config === null || config === void 0 ? void 0 : config.override);
|
|
26348
|
-
const { theme, darkMode, locale, locales, direction, logLevel, logCommandExecution } = config;
|
|
26395
|
+
const { theme, darkMode, locale, region, locales, direction, logLevel, logCommandExecution } = config;
|
|
26349
26396
|
if (theme) this._injector.get(ThemeService).setTheme(theme);
|
|
26350
26397
|
if (darkMode) this._injector.get(ThemeService).setDarkMode(darkMode);
|
|
26351
26398
|
if (locales) this._injector.get(LocaleService).load(locales);
|
|
26352
26399
|
if (locale) this._injector.get(LocaleService).setLocale(locale);
|
|
26400
|
+
if (region) this._injector.get(RegionService).setRegion(region);
|
|
26353
26401
|
if (direction) this._injector.get(LocaleService).setDirection(direction);
|
|
26354
26402
|
if (logLevel) this._injector.get(ILogService).setLogLevel(logLevel);
|
|
26355
26403
|
if (logCommandExecution !== void 0) this._injector.get(IConfigService).setConfig(COMMAND_LOG_EXECUTION_CONFIG_KEY, logCommandExecution);
|
|
@@ -26380,6 +26428,9 @@ var Univer = class {
|
|
|
26380
26428
|
setLocale(locale) {
|
|
26381
26429
|
this._injector.get(LocaleService).setLocale(locale);
|
|
26382
26430
|
}
|
|
26431
|
+
setRegion(region) {
|
|
26432
|
+
this._injector.get(RegionService).setRegion(region);
|
|
26433
|
+
}
|
|
26383
26434
|
createUnit(type, data) {
|
|
26384
26435
|
return this._univerInstanceService.createUnit(type, data);
|
|
26385
26436
|
}
|
|
@@ -26425,6 +26476,7 @@ function createUniverInjector(parentInjector, override) {
|
|
|
26425
26476
|
const dependencies = mergeOverrideWithDependencies([
|
|
26426
26477
|
[ErrorService],
|
|
26427
26478
|
[LocaleService],
|
|
26479
|
+
[RegionService],
|
|
26428
26480
|
[ThemeService],
|
|
26429
26481
|
[LifecycleService],
|
|
26430
26482
|
[PluginService],
|
|
@@ -26596,6 +26648,7 @@ exports.EXTENSION_NAMES = EXTENSION_NAMES;
|
|
|
26596
26648
|
exports.ErrorService = ErrorService;
|
|
26597
26649
|
exports.EventState = EventState;
|
|
26598
26650
|
exports.EventSubject = EventSubject;
|
|
26651
|
+
exports.FOCUSING_BOARD = FOCUSING_BOARD;
|
|
26599
26652
|
exports.FOCUSING_COMMENT_EDITOR = FOCUSING_COMMENT_EDITOR;
|
|
26600
26653
|
exports.FOCUSING_COMMON_DRAWINGS = FOCUSING_COMMON_DRAWINGS;
|
|
26601
26654
|
exports.FOCUSING_DOC = FOCUSING_DOC;
|
|
@@ -26776,6 +26829,12 @@ Object.defineProperty(exports, 'RediError', {
|
|
|
26776
26829
|
exports.RedoCommand = RedoCommand;
|
|
26777
26830
|
exports.RedoCommandId = RedoCommandId;
|
|
26778
26831
|
exports.RefAlias = RefAlias;
|
|
26832
|
+
Object.defineProperty(exports, 'RegionService', {
|
|
26833
|
+
enumerable: true,
|
|
26834
|
+
get: function () {
|
|
26835
|
+
return RegionService;
|
|
26836
|
+
}
|
|
26837
|
+
});
|
|
26779
26838
|
exports.Registry = Registry;
|
|
26780
26839
|
exports.RegistryAsMap = RegistryAsMap;
|
|
26781
26840
|
exports.RelativeDate = RelativeDate;
|
package/lib/es/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BehaviorSubject, Observable, ReplaySubject, Subject, Subscription, combineLatest, debounceTime, distinctUntilChanged, filter, firstValueFrom, map, merge as merge$1, of, skip, take, tap, timer } from "rxjs";
|
|
1
|
+
import { BehaviorSubject, Observable, ReplaySubject, Subject, Subscription, combineLatest, debounceTime, distinctUntilChanged, filter, firstValueFrom, map, merge as merge$1, of, skip, take, takeWhile, tap, timer } from "rxjs";
|
|
2
2
|
import { ObjectScope, UnitRole, UniverType as UniverInstanceType } from "@univerjs/protocol";
|
|
3
3
|
import { debounceTime as debounceTime$1, filter as filter$1, first, map as map$1 } from "rxjs/operators";
|
|
4
4
|
import { Inject, Inject as Inject$1, InjectSelf, Injector, Injector as Injector$1, LookUp, Many, Optional, Quantity, RediError, Self, SkipSelf, WithNew, createIdentifier, createIdentifier as createIdentifier$1, forwardRef, isAsyncDependencyItem, isAsyncHook, isClassDependencyItem, isCtor, isDisposable, isFactoryDependencyItem, isValueDependencyItem, setDependencies } from "@wendellhu/redi";
|
|
@@ -1714,7 +1714,7 @@ let ThemeColors = /* @__PURE__ */ function(ThemeColors) {
|
|
|
1714
1714
|
//#endregion
|
|
1715
1715
|
//#region package.json
|
|
1716
1716
|
var name = "@univerjs/core";
|
|
1717
|
-
var version = "1.0.0-alpha.
|
|
1717
|
+
var version = "1.0.0-alpha.7";
|
|
1718
1718
|
|
|
1719
1719
|
//#endregion
|
|
1720
1720
|
//#region src/common/array.ts
|
|
@@ -2431,17 +2431,7 @@ function fromCallback(callback) {
|
|
|
2431
2431
|
*/
|
|
2432
2432
|
function takeAfter(callback) {
|
|
2433
2433
|
return function complateAfter(source) {
|
|
2434
|
-
return
|
|
2435
|
-
source.subscribe({
|
|
2436
|
-
next: (v) => {
|
|
2437
|
-
subscriber.next(v);
|
|
2438
|
-
if (callback(v)) subscriber.complete();
|
|
2439
|
-
},
|
|
2440
|
-
complete: () => subscriber.complete(),
|
|
2441
|
-
error: (error) => subscriber.error(error)
|
|
2442
|
-
});
|
|
2443
|
-
return () => subscriber.unsubscribe();
|
|
2444
|
-
});
|
|
2434
|
+
return source.pipe(takeWhile((value) => !callback(value), true));
|
|
2445
2435
|
};
|
|
2446
2436
|
}
|
|
2447
2437
|
function bufferDebounceTime(time = 0) {
|
|
@@ -13204,16 +13194,24 @@ var RegistryAsMap = class RegistryAsMap {
|
|
|
13204
13194
|
function requestImmediateMacroTask(callback) {
|
|
13205
13195
|
const channel = new MessageChannel();
|
|
13206
13196
|
let cancelled = false;
|
|
13197
|
+
const close = () => {
|
|
13198
|
+
channel.port1.onmessage = null;
|
|
13199
|
+
channel.port1.close();
|
|
13200
|
+
channel.port2.close();
|
|
13201
|
+
};
|
|
13207
13202
|
const handler = () => {
|
|
13208
|
-
if (!cancelled)
|
|
13203
|
+
if (!cancelled) {
|
|
13204
|
+
cancelled = true;
|
|
13205
|
+
close();
|
|
13206
|
+
callback();
|
|
13207
|
+
}
|
|
13209
13208
|
};
|
|
13210
13209
|
channel.port1.onmessage = handler;
|
|
13211
13210
|
channel.port2.postMessage(null);
|
|
13212
13211
|
return () => {
|
|
13212
|
+
if (cancelled) return;
|
|
13213
13213
|
cancelled = true;
|
|
13214
|
-
|
|
13215
|
-
channel.port1.close();
|
|
13216
|
-
channel.port2.close();
|
|
13214
|
+
close();
|
|
13217
13215
|
};
|
|
13218
13216
|
}
|
|
13219
13217
|
|
|
@@ -17628,10 +17626,10 @@ function buildDrawingInsertBody(body, drawings, insertOffset) {
|
|
|
17628
17626
|
//#endregion
|
|
17629
17627
|
//#region src/docs/data-model/text-x/build-utils/data-stream-change.ts
|
|
17630
17628
|
/**
|
|
17631
|
-
* Finds one contiguous dataStream change. Pure structural insertions
|
|
17632
|
-
* anchored by their
|
|
17629
|
+
* Finds one contiguous dataStream change. Pure structural insertions and deletions
|
|
17630
|
+
* are anchored by their stable ids before falling back to string comparison.
|
|
17633
17631
|
* This prevents an adjacent identical sentinel from being mistaken for an
|
|
17634
|
-
* unchanged prefix and keeps the
|
|
17632
|
+
* unchanged prefix and keeps the structure metadata aligned with the TextX body.
|
|
17635
17633
|
*/
|
|
17636
17634
|
function getSingleDataStreamChange(previousBody, nextBody) {
|
|
17637
17635
|
if (previousBody == null || nextBody == null) return null;
|
|
@@ -17642,6 +17640,9 @@ function getSingleDataStreamChange(previousBody, nextBody) {
|
|
|
17642
17640
|
if (insertedLength > 0) {
|
|
17643
17641
|
const structuralInsertion = findStructuralInsertion(previousBody, nextBody, previousDataStream, nextDataStream, insertedLength);
|
|
17644
17642
|
if (structuralInsertion) return structuralInsertion;
|
|
17643
|
+
} else if (insertedLength < 0) {
|
|
17644
|
+
const structuralDeletion = findStructuralDeletion(previousBody, nextBody, previousDataStream, nextDataStream, -insertedLength);
|
|
17645
|
+
if (structuralDeletion) return structuralDeletion;
|
|
17645
17646
|
}
|
|
17646
17647
|
let start = 0;
|
|
17647
17648
|
while (start < previousDataStream.length && start < nextDataStream.length && previousDataStream[start] === nextDataStream[start]) start++;
|
|
@@ -17657,6 +17658,14 @@ function getSingleDataStreamChange(previousBody, nextBody) {
|
|
|
17657
17658
|
insertLength: nextEnd - start
|
|
17658
17659
|
};
|
|
17659
17660
|
}
|
|
17661
|
+
function findStructuralDeletion(previousBody, nextBody, previousDataStream, nextDataStream, deletedLength) {
|
|
17662
|
+
for (const start of collectNewStructuralStartOffsets(nextBody, previousBody)) if (previousDataStream.slice(0, start) === nextDataStream.slice(0, start) && previousDataStream.slice(start + deletedLength) === nextDataStream.slice(start)) return {
|
|
17663
|
+
start,
|
|
17664
|
+
deleteLength: deletedLength,
|
|
17665
|
+
insertLength: 0
|
|
17666
|
+
};
|
|
17667
|
+
return null;
|
|
17668
|
+
}
|
|
17660
17669
|
function findStructuralInsertion(previousBody, nextBody, previousDataStream, nextDataStream, insertedLength) {
|
|
17661
17670
|
for (const start of collectNewStructuralStartOffsets(previousBody, nextBody)) if (previousDataStream.slice(0, start) === nextDataStream.slice(0, start) && previousDataStream.slice(start) === nextDataStream.slice(start + insertedLength)) return {
|
|
17662
17671
|
start,
|
|
@@ -21007,6 +21016,7 @@ const FOCUSING_UNIT = "FOCUSING_UNIT";
|
|
|
21007
21016
|
const FOCUSING_SHEET = "FOCUSING_SHEET";
|
|
21008
21017
|
const FOCUSING_DOC = "FOCUSING_DOC";
|
|
21009
21018
|
const FOCUSING_SLIDE = "FOCUSING_SLIDE";
|
|
21019
|
+
const FOCUSING_BOARD = "FOCUSING_BOARD";
|
|
21010
21020
|
/** @deprecated */
|
|
21011
21021
|
const FOCUSING_EDITOR_BUT_HIDDEN = "FOCUSING_EDITOR_BUT_HIDDEN";
|
|
21012
21022
|
const EDITOR_ACTIVATED = "EDITOR_ACTIVATED";
|
|
@@ -23759,7 +23769,7 @@ let UniverInstanceService = class UniverInstanceService extends Disposable {
|
|
|
23759
23769
|
return (_this$_getUnitById2 = this._getUnitById(id)) === null || _this$_getUnitById2 === void 0 ? void 0 : _this$_getUnitById2[0];
|
|
23760
23770
|
}
|
|
23761
23771
|
focusUnit(id) {
|
|
23762
|
-
var _this$focused;
|
|
23772
|
+
var _this$focused, _this$focused2;
|
|
23763
23773
|
if (this._focused$.getValue() === id) return;
|
|
23764
23774
|
this._focused$.next(id);
|
|
23765
23775
|
if (this.focused instanceof Workbook) {
|
|
@@ -23767,24 +23777,35 @@ let UniverInstanceService = class UniverInstanceService extends Disposable {
|
|
|
23767
23777
|
this._contextService.setContextValue(FOCUSING_DOC, false);
|
|
23768
23778
|
this._contextService.setContextValue(FOCUSING_SHEET, true);
|
|
23769
23779
|
this._contextService.setContextValue(FOCUSING_SLIDE, false);
|
|
23780
|
+
this._contextService.setContextValue(FOCUSING_BOARD, false);
|
|
23770
23781
|
this.setCurrentUnitForType(id);
|
|
23771
23782
|
} else if (this.focused instanceof DocumentDataModel) {
|
|
23772
23783
|
this._contextService.setContextValue(FOCUSING_UNIT, true);
|
|
23773
23784
|
this._contextService.setContextValue(FOCUSING_DOC, true);
|
|
23774
23785
|
this._contextService.setContextValue(FOCUSING_SHEET, false);
|
|
23775
23786
|
this._contextService.setContextValue(FOCUSING_SLIDE, false);
|
|
23787
|
+
this._contextService.setContextValue(FOCUSING_BOARD, false);
|
|
23776
23788
|
this.setCurrentUnitForType(id);
|
|
23777
23789
|
} else if (((_this$focused = this.focused) === null || _this$focused === void 0 ? void 0 : _this$focused.type) === UniverInstanceType.UNIVER_SLIDE) {
|
|
23778
23790
|
this._contextService.setContextValue(FOCUSING_UNIT, true);
|
|
23779
23791
|
this._contextService.setContextValue(FOCUSING_DOC, false);
|
|
23780
23792
|
this._contextService.setContextValue(FOCUSING_SHEET, false);
|
|
23781
23793
|
this._contextService.setContextValue(FOCUSING_SLIDE, true);
|
|
23794
|
+
this._contextService.setContextValue(FOCUSING_BOARD, false);
|
|
23795
|
+
this.setCurrentUnitForType(id);
|
|
23796
|
+
} else if (((_this$focused2 = this.focused) === null || _this$focused2 === void 0 ? void 0 : _this$focused2.type) === UniverInstanceType.UNIVER_BOARD) {
|
|
23797
|
+
this._contextService.setContextValue(FOCUSING_UNIT, true);
|
|
23798
|
+
this._contextService.setContextValue(FOCUSING_DOC, false);
|
|
23799
|
+
this._contextService.setContextValue(FOCUSING_SHEET, false);
|
|
23800
|
+
this._contextService.setContextValue(FOCUSING_SLIDE, false);
|
|
23801
|
+
this._contextService.setContextValue(FOCUSING_BOARD, true);
|
|
23782
23802
|
this.setCurrentUnitForType(id);
|
|
23783
23803
|
} else {
|
|
23784
23804
|
this._contextService.setContextValue(FOCUSING_UNIT, false);
|
|
23785
23805
|
this._contextService.setContextValue(FOCUSING_DOC, false);
|
|
23786
23806
|
this._contextService.setContextValue(FOCUSING_SHEET, false);
|
|
23787
23807
|
this._contextService.setContextValue(FOCUSING_SLIDE, false);
|
|
23808
|
+
this._contextService.setContextValue(FOCUSING_BOARD, false);
|
|
23788
23809
|
}
|
|
23789
23810
|
}
|
|
23790
23811
|
getFocusedUnit() {
|
|
@@ -23821,8 +23842,8 @@ let UniverInstanceService = class UniverInstanceService extends Disposable {
|
|
|
23821
23842
|
}
|
|
23822
23843
|
}
|
|
23823
23844
|
_tryResetFocusOnRemoval(unitId) {
|
|
23824
|
-
var _this$
|
|
23825
|
-
if (((_this$
|
|
23845
|
+
var _this$focused3;
|
|
23846
|
+
if (((_this$focused3 = this.focused) === null || _this$focused3 === void 0 ? void 0 : _this$focused3.getUnitId()) === unitId) this._focused$.next(null);
|
|
23826
23847
|
}
|
|
23827
23848
|
_getUnitById(unitId) {
|
|
23828
23849
|
for (const [type, units] of this._unitsByType) {
|
|
@@ -24418,6 +24439,32 @@ PluginService = __decorate([
|
|
|
24418
24439
|
__decorateParam(2, ILogService)
|
|
24419
24440
|
], PluginService);
|
|
24420
24441
|
|
|
24442
|
+
//#endregion
|
|
24443
|
+
//#region src/services/region/region.service.ts
|
|
24444
|
+
let RegionService = class RegionService extends Disposable {
|
|
24445
|
+
constructor(_localeService) {
|
|
24446
|
+
super();
|
|
24447
|
+
this._localeService = _localeService;
|
|
24448
|
+
_defineProperty(this, "_currentRegion$", void 0);
|
|
24449
|
+
_defineProperty(this, "currentRegion$", void 0);
|
|
24450
|
+
_defineProperty(this, "_hasExplicitRegion", false);
|
|
24451
|
+
this._currentRegion$ = new BehaviorSubject(this._localeService.getCurrentLocale());
|
|
24452
|
+
this.currentRegion$ = this._currentRegion$.asObservable();
|
|
24453
|
+
this.disposeWithMe(this._localeService.currentLocale$.subscribe((locale) => {
|
|
24454
|
+
if (!this._hasExplicitRegion && locale !== this._currentRegion$.value) this._currentRegion$.next(locale);
|
|
24455
|
+
}));
|
|
24456
|
+
this.disposeWithMe(toDisposable(() => this._currentRegion$.complete()));
|
|
24457
|
+
}
|
|
24458
|
+
setRegion(region) {
|
|
24459
|
+
this._hasExplicitRegion = true;
|
|
24460
|
+
this._currentRegion$.next(region);
|
|
24461
|
+
}
|
|
24462
|
+
getCurrentRegion() {
|
|
24463
|
+
return this._currentRegion$.value;
|
|
24464
|
+
}
|
|
24465
|
+
};
|
|
24466
|
+
RegionService = __decorate([__decorateParam(0, Inject(LocaleService))], RegionService);
|
|
24467
|
+
|
|
24421
24468
|
//#endregion
|
|
24422
24469
|
//#region src/services/resource-loader/type.ts
|
|
24423
24470
|
const IResourceLoaderService = createIdentifier("resource-loader-service");
|
|
@@ -26316,11 +26363,12 @@ var Univer = class {
|
|
|
26316
26363
|
_defineProperty(this, "_injector", void 0);
|
|
26317
26364
|
_defineProperty(this, "_disposingCallbacks", new DisposableCollection());
|
|
26318
26365
|
const injector = this._injector = createUniverInjector(parentInjector, config === null || config === void 0 ? void 0 : config.override);
|
|
26319
|
-
const { theme, darkMode, locale, locales, direction, logLevel, logCommandExecution } = config;
|
|
26366
|
+
const { theme, darkMode, locale, region, locales, direction, logLevel, logCommandExecution } = config;
|
|
26320
26367
|
if (theme) this._injector.get(ThemeService).setTheme(theme);
|
|
26321
26368
|
if (darkMode) this._injector.get(ThemeService).setDarkMode(darkMode);
|
|
26322
26369
|
if (locales) this._injector.get(LocaleService).load(locales);
|
|
26323
26370
|
if (locale) this._injector.get(LocaleService).setLocale(locale);
|
|
26371
|
+
if (region) this._injector.get(RegionService).setRegion(region);
|
|
26324
26372
|
if (direction) this._injector.get(LocaleService).setDirection(direction);
|
|
26325
26373
|
if (logLevel) this._injector.get(ILogService).setLogLevel(logLevel);
|
|
26326
26374
|
if (logCommandExecution !== void 0) this._injector.get(IConfigService).setConfig(COMMAND_LOG_EXECUTION_CONFIG_KEY, logCommandExecution);
|
|
@@ -26351,6 +26399,9 @@ var Univer = class {
|
|
|
26351
26399
|
setLocale(locale) {
|
|
26352
26400
|
this._injector.get(LocaleService).setLocale(locale);
|
|
26353
26401
|
}
|
|
26402
|
+
setRegion(region) {
|
|
26403
|
+
this._injector.get(RegionService).setRegion(region);
|
|
26404
|
+
}
|
|
26354
26405
|
createUnit(type, data) {
|
|
26355
26406
|
return this._univerInstanceService.createUnit(type, data);
|
|
26356
26407
|
}
|
|
@@ -26396,6 +26447,7 @@ function createUniverInjector(parentInjector, override) {
|
|
|
26396
26447
|
const dependencies = mergeOverrideWithDependencies([
|
|
26397
26448
|
[ErrorService],
|
|
26398
26449
|
[LocaleService],
|
|
26450
|
+
[RegionService],
|
|
26399
26451
|
[ThemeService],
|
|
26400
26452
|
[LifecycleService],
|
|
26401
26453
|
[PluginService],
|
|
@@ -26452,4 +26504,4 @@ function createUniverInjector(parentInjector, override) {
|
|
|
26452
26504
|
installShims();
|
|
26453
26505
|
|
|
26454
26506
|
//#endregion
|
|
26455
|
-
export { ABCToNumber, AUTO_HEIGHT_FOR_MERGED_CELLS, AbsoluteRefType, ActionIterator, AlignTypeH, AlignTypeV, ArrangeTypeEnum, AsyncInterceptorManager, AsyncLock, AuthzIoLocalService, AutoFillSeries, BORDER_KEYS, BORDER_STYLE_KEYS, BaseDataModel, BaseFieldType, BaseFilterConjunction, BaseFilterOperator, BaseSortDirection, BaseViewType, BaselineOffset, BlockType, BooleanNumber, BorderStyleTypes, BorderType, BuildTextUtils, BulletAlignment, COLORS, COLOR_STYLE_KEYS, COMMAND_LOG_EXECUTION_CONFIG_KEY, CanceledError, CellModeEnum, CellValueType, ColorKit, ColorType, ColumnLayoutType, ColumnResponsiveType, ColumnSeparatorType, CommandService, CommandType, CommonHideTypes, ConfigService, ContextService, CopyPasteType, CustomCommandExecutionError, CustomDecorationType, CustomRangeType, DEFAULT_CELL, DEFAULT_DOC, DEFAULT_DOCUMENT_PARAGRAPH_LINE_SPACING, DEFAULT_DOCUMENT_PARAGRAPH_SPACE_ABOVE, DEFAULT_DOCUMENT_PARAGRAPH_SPACE_BELOW, DEFAULT_DOCUMENT_SUB_COMPONENT_ID, DEFAULT_EMPTY_DOCUMENT_VALUE, DEFAULT_NUMBER_FORMAT, DEFAULT_RANGE, DEFAULT_RANGE_ARRAY, DEFAULT_SELECTION, DEFAULT_STYLES, DEFAULT_TEXT_FORMAT, DEFAULT_TEXT_FORMAT_EXCEL, DEFAULT_WORKSHEET_COLUMN_COUNT, DEFAULT_WORKSHEET_COLUMN_COUNT_KEY, DEFAULT_WORKSHEET_COLUMN_TITLE_HEIGHT, DEFAULT_WORKSHEET_COLUMN_TITLE_HEIGHT_KEY, DEFAULT_WORKSHEET_COLUMN_WIDTH, DEFAULT_WORKSHEET_COLUMN_WIDTH_KEY, DEFAULT_WORKSHEET_ROW_COUNT, DEFAULT_WORKSHEET_ROW_COUNT_KEY, DEFAULT_WORKSHEET_ROW_HEIGHT, DEFAULT_WORKSHEET_ROW_HEIGHT_KEY, DEFAULT_WORKSHEET_ROW_TITLE_WIDTH, DEFAULT_WORKSHEET_ROW_TITLE_WIDTH_KEY, DOCS_COMMENT_EDITOR_UNIT_ID_KEY, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY, DOCS_NORMAL_EDITOR_UNIT_ID_KEY, DOC_DRAWING_PRINTING_COMPONENT_KEY, DOC_RANGE_TYPE, DashStyleType, DataStreamTreeNodeType, DataStreamTreeTokenType, DataValidationErrorStyle, DataValidationImeMode, DataValidationOperator, DataValidationRenderMode, DataValidationStatus, DataValidationType, DeleteDirection, DependentOn, DesktopLogService, DeveloperMetadataVisibility, Dimension, Direction, Disposable, DisposableCollection, DocStyleType, DocumentBlockRangeType, DocumentBlockType, DocumentDataModel, DocumentFlavor, DrawingTypeEnum, EDITOR_ACTIVATED, EXTENSION_NAMES, ErrorService, EventState, EventSubject, FOCUSING_COMMENT_EDITOR, FOCUSING_COMMON_DRAWINGS, FOCUSING_DOC, FOCUSING_EDITOR_BUT_HIDDEN, FOCUSING_EDITOR_INPUT_FORMULA, FOCUSING_EDITOR_STANDALONE, FOCUSING_FX_BAR_EDITOR, FOCUSING_PANEL_EDITOR, FOCUSING_SHAPE_TEXT_EDITOR, FOCUSING_SHEET, FOCUSING_SLIDE, FOCUSING_UNIT, FOCUSING_UNIVER_EDITOR, FOCUSING_UNIVER_EDITOR_STANDALONE_SINGLE_MODE, FORMULA_EDITOR_ACTIVATED, FollowNumberWithType, FontItalic, FontStyleType, FontWeight, GridType, HorizontalAlign, IAuthzIoService, ICommandService, IConfigService, IConfirmService, IContextService, IImageIoService, ILocalStorageService, ILogService, IMentionIOService, IPermissionService, IResourceLoaderService, IResourceManagerService, IS_ROW_STYLE_PRECEDE_COLUMN_STYLE, IURLImageService, IUndoRedoService, IUniverInstanceService, ImageCacheMap, ImageSourceType, ImageUploadStatusType, Inject, InjectSelf, Injector, InterceptorEffectEnum, InterceptorManager, InterpolationPointType, json1 as JSON1, JSONX, LOCALE_META, LRUHelper, LRUMap, LifecycleService, LifecycleStages, LifecycleUnreachableError, ListGlyphType, LocalUndoRedoService, LocaleService, LocaleType, LogLevel, LookUp, MAX_COLUMN_COUNT, MAX_ROW_COUNT, MODERN_DOCUMENT_DEFAULT_MARGIN, MODERN_DOCUMENT_WIDTH, MOVE_BUFFER_VALUE, Many, MemoryCursor, MentionIOLocalService, MentionType, ModernDocumentWidthMode, NAMED_STYLE_MAP, NAMED_STYLE_SPACE_MAP, NamedStyleType, NilCommand, NumberUnitType, ObjectMatrix, ObjectRelativeFromH, ObjectRelativeFromV, Optional, PADDING_KEYS, PAGE_SIZE, PAPER_TYPES, PARAGRAPH_ID_PREFIX, PRESERVE_INSERTED_PARAGRAPH_IDS, PRESET_LIST_TYPE, PageOrientType, PaperType, ParagraphElementType, ParagraphStyleBuilder, ParagraphStyleValue, PermissionService, PermissionStatus, Plugin, PluginService, PositionedObjectLayoutType, PresetListType, ProtectionType, Quantity, QuickListType, QuickListTypeMap, RANGE_DIRECTION, RANGE_TYPE, RBush, RCDisposable, RESTORE_INSERTED_PARAGRAPH_IDS, RGBA_PAREN, RGB_PAREN, ROTATE_BUFFER_VALUE, RTree, Range, Rectangle, RediError, RedoCommand, RedoCommandId, RefAlias, Registry, RegistryAsMap, RelativeDate, ResourceManagerService, RichTextBuilder, RichTextParagraphBuilder, RichTextRunBuilder, RichTextValue, RxDisposable, SECTION_ID_PREFIX, SHEET_EDITOR_UNITS, STYLE_KEYS, SectionType, Self, SheetSkeleton, SheetTypes, SheetViewModel, Skeleton, SkipSelf, SliceBodyType, SpacingRule, Styles, TEXT_DECORATION_KEYS, TEXT_ROTATION_KEYS, THEME_COLORS, TabStopAlignment, TableAlignmentType, TableLayoutType, TableRowHeightRule, TableSizeType, TableTextWrapType, TestConfirmService, TextDecoration, TextDecorationBuilder, TextDirection, TextDirectionType, TextStyleBuilder, TextStyleValue, TextX, TextXActionType, ThemeColorType, ThemeColors, ThemeService, Tools, UndoCommand, UndoCommandId, UnitModel, Univer, UniverInstanceService, UniverInstanceType, UpdateDocsAttributeType, UserManagerService, VerticalAlign, VerticalAlignmentType, WithNew, Workbook, Worksheet, WrapStrategy, WrapTextType, addLinkToDocumentModel, afterInitApply, afterTime, awaitTime, binSearchFirstGreaterThanTarget, binarySearchArray, bufferDebounceTime, cellToRange, characterSpacingControlType, checkForSubstrings, checkIfMove, checkParagraphHasBullet, checkParagraphHasIndent, checkParagraphHasIndentByStyle, cloneBodyWithFreshParagraphIds, cloneCellData, cloneCellDataMatrix, cloneCellDataWithSpanAndDisplay, cloneParagraphWithId, cloneSectionBreakWithId, cloneValue, cloneWorksheetData, codeToBlob, columnLabelToNumber, composeBody, composeInterceptors, composeStyles, concatMatrixArray, containsInteriorInsertionOffset, containsStreamIndex, convertCellToRange, convertObservableToBehaviorSubject, covertCellValue, covertCellValues, createAsyncInterceptorKey, createDefaultBaseTableSnapshot, createDefaultUser, createDocumentModelWithStyle, createIdentifier, createInterceptorKey, createInternalEditorID, createParagraphId, createRandomId, createRowColIter, createSectionId, createSheetGapTestConfig, currencySymbols, customNameCharacterCheck, dateKit, debounce, dedupe, dedupeBy, deepCompare, delayAnimationFrame, deleteContent, extractPureTextFromCell, forwardRef, fromCallback, fromEventSubject, generateIntervalsByPoints, generateRandomId, get, getArrayLength, getEmptySnapshot as getBasesEmptySnapshot, getBlockRangeInterval, getBodySlice, getBodySliceForSplitTextXAction, getBodySliceForTextXAction, getBorderStyleType, getCellCoordByIndexSimple, getCellInfoInMergeData, getCellValueType, getCellWithCoordByIndexCore, getColorStyle, getColumnGroupRangeInterval, getCustomBlockIdsInSelections, getCustomBlockInterval, getCustomBlockSlice, getCustomDecorationSlice, getCustomRangeInterval, getCustomRangeSlice, getDisplayValueFromCell, getEmptySnapshot$1 as getDocsEmptySnapshot, getDocsUpdateBody, getEmptyCell, getExclusiveRangeInterval, getInclusiveRangeInterval, getIntersectRange, getNumfmtParseValueFilter, getOriginCellValue, getParagraphContentStartOffset, getParagraphContentStartOffsets, getParagraphFollowingBlockOffset, getParagraphsSlice, getPlainText, getReverseDirection, getRichTextEditPath, getSectionBreakSlice, getSectionHeaderFooterReferenceKey, getEmptySnapshot$2 as getSheetsEmptySnapshot, getSingleDataStreamChange, getTableCellTokenInterval, getTableRangeInterval, getTableRowTokenInterval, getTableSlice, getTextRunSlice, getTransformOffsetX, getTransformOffsetY, getWorksheetUID, groupBy, handleStyleToString, hashAlgorithm, horizontalLineSegmentsSubtraction, insertMatrixArray, insertTextToContent, intersectsOperationalIntervals, invertColorByHSL, invertColorByMatrix, isAsyncDependencyItem, isAsyncHook, isBlackColor, isBooleanString, isCellCoverable, isCellV, isClassDependencyItem, isCommentEditorID, isCtor, isDefaultFormat, isDisposable, isEmptyCell, isFactoryDependencyItem, isFormulaId, isFormulaString, isICellData, isInternalEditorID, isNodeEnv, isNotNullOrUndefined, isNullCell, isNumeric, isPatternEqualWithoutDecimal, isRangesEqual, isRealNum, isSafeNumeric, isSafeUrl, isSameStyleTextRun, isTextFormat, isUnitRangesEqual, isValidRange, isValueDependencyItem, isWhiteColor, makeArray, makeCellRangeToRangeData, makeCellToSelection, makeCustomRangeStream, mapObjectMatrix, merge, mergeIntervals, mergeLocales, mergeOverrideWithDependencies, mergeSets, mergeWith, mergeWorksheetSnapshotWithDefault, mixinClass, moveMatrixArray, moveRangeByOffset, nameCharacterCheck, noop, normalizeBody, normalizeInsertedSectionIdsForDocument, normalizeTextRuns, normalizeUrl, numberToABC, numberToListABC, api_exports as numfmt, queryObjectMatrix, regexp, registerDependencies, remove, repeatStringNumTimes, replaceInDocumentBody, requestImmediateMacroTask, resolveDocumentParagraphStyle, resolveSectionHeaderFooterReference, resolveSectionHeaderFooterReferences, resolveWithBasePath, rotate, searchArray, searchInOrderedArray, selectionToArray, sequence, sequenceAsync, sequenceExecute, sequenceExecuteAsync, set, setDependencies, shallowEqual, shiftExclusiveRangeOnDelete, shiftExclusiveRangeOnInsert, shiftInclusiveRangeOnDelete, shiftInclusiveRangeOnInsert, skipParseTagNames, sliceMatrixArray, sortRules, sortRulesByDesc, sortRulesFactory, spliceArray, splitIntoGrid, takeAfter, throttle, toDisposable, touchDependencies, updateAttributeByDelete, updateAttributeByInsert, validateDocBodyStructure, validateDocumentStructure, willLoseNumericPrecision };
|
|
26507
|
+
export { ABCToNumber, AUTO_HEIGHT_FOR_MERGED_CELLS, AbsoluteRefType, ActionIterator, AlignTypeH, AlignTypeV, ArrangeTypeEnum, AsyncInterceptorManager, AsyncLock, AuthzIoLocalService, AutoFillSeries, BORDER_KEYS, BORDER_STYLE_KEYS, BaseDataModel, BaseFieldType, BaseFilterConjunction, BaseFilterOperator, BaseSortDirection, BaseViewType, BaselineOffset, BlockType, BooleanNumber, BorderStyleTypes, BorderType, BuildTextUtils, BulletAlignment, COLORS, COLOR_STYLE_KEYS, COMMAND_LOG_EXECUTION_CONFIG_KEY, CanceledError, CellModeEnum, CellValueType, ColorKit, ColorType, ColumnLayoutType, ColumnResponsiveType, ColumnSeparatorType, CommandService, CommandType, CommonHideTypes, ConfigService, ContextService, CopyPasteType, CustomCommandExecutionError, CustomDecorationType, CustomRangeType, DEFAULT_CELL, DEFAULT_DOC, DEFAULT_DOCUMENT_PARAGRAPH_LINE_SPACING, DEFAULT_DOCUMENT_PARAGRAPH_SPACE_ABOVE, DEFAULT_DOCUMENT_PARAGRAPH_SPACE_BELOW, DEFAULT_DOCUMENT_SUB_COMPONENT_ID, DEFAULT_EMPTY_DOCUMENT_VALUE, DEFAULT_NUMBER_FORMAT, DEFAULT_RANGE, DEFAULT_RANGE_ARRAY, DEFAULT_SELECTION, DEFAULT_STYLES, DEFAULT_TEXT_FORMAT, DEFAULT_TEXT_FORMAT_EXCEL, DEFAULT_WORKSHEET_COLUMN_COUNT, DEFAULT_WORKSHEET_COLUMN_COUNT_KEY, DEFAULT_WORKSHEET_COLUMN_TITLE_HEIGHT, DEFAULT_WORKSHEET_COLUMN_TITLE_HEIGHT_KEY, DEFAULT_WORKSHEET_COLUMN_WIDTH, DEFAULT_WORKSHEET_COLUMN_WIDTH_KEY, DEFAULT_WORKSHEET_ROW_COUNT, DEFAULT_WORKSHEET_ROW_COUNT_KEY, DEFAULT_WORKSHEET_ROW_HEIGHT, DEFAULT_WORKSHEET_ROW_HEIGHT_KEY, DEFAULT_WORKSHEET_ROW_TITLE_WIDTH, DEFAULT_WORKSHEET_ROW_TITLE_WIDTH_KEY, DOCS_COMMENT_EDITOR_UNIT_ID_KEY, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY, DOCS_NORMAL_EDITOR_UNIT_ID_KEY, DOC_DRAWING_PRINTING_COMPONENT_KEY, DOC_RANGE_TYPE, DashStyleType, DataStreamTreeNodeType, DataStreamTreeTokenType, DataValidationErrorStyle, DataValidationImeMode, DataValidationOperator, DataValidationRenderMode, DataValidationStatus, DataValidationType, DeleteDirection, DependentOn, DesktopLogService, DeveloperMetadataVisibility, Dimension, Direction, Disposable, DisposableCollection, DocStyleType, DocumentBlockRangeType, DocumentBlockType, DocumentDataModel, DocumentFlavor, DrawingTypeEnum, EDITOR_ACTIVATED, EXTENSION_NAMES, ErrorService, EventState, EventSubject, FOCUSING_BOARD, FOCUSING_COMMENT_EDITOR, FOCUSING_COMMON_DRAWINGS, FOCUSING_DOC, FOCUSING_EDITOR_BUT_HIDDEN, FOCUSING_EDITOR_INPUT_FORMULA, FOCUSING_EDITOR_STANDALONE, FOCUSING_FX_BAR_EDITOR, FOCUSING_PANEL_EDITOR, FOCUSING_SHAPE_TEXT_EDITOR, FOCUSING_SHEET, FOCUSING_SLIDE, FOCUSING_UNIT, FOCUSING_UNIVER_EDITOR, FOCUSING_UNIVER_EDITOR_STANDALONE_SINGLE_MODE, FORMULA_EDITOR_ACTIVATED, FollowNumberWithType, FontItalic, FontStyleType, FontWeight, GridType, HorizontalAlign, IAuthzIoService, ICommandService, IConfigService, IConfirmService, IContextService, IImageIoService, ILocalStorageService, ILogService, IMentionIOService, IPermissionService, IResourceLoaderService, IResourceManagerService, IS_ROW_STYLE_PRECEDE_COLUMN_STYLE, IURLImageService, IUndoRedoService, IUniverInstanceService, ImageCacheMap, ImageSourceType, ImageUploadStatusType, Inject, InjectSelf, Injector, InterceptorEffectEnum, InterceptorManager, InterpolationPointType, json1 as JSON1, JSONX, LOCALE_META, LRUHelper, LRUMap, LifecycleService, LifecycleStages, LifecycleUnreachableError, ListGlyphType, LocalUndoRedoService, LocaleService, LocaleType, LogLevel, LookUp, MAX_COLUMN_COUNT, MAX_ROW_COUNT, MODERN_DOCUMENT_DEFAULT_MARGIN, MODERN_DOCUMENT_WIDTH, MOVE_BUFFER_VALUE, Many, MemoryCursor, MentionIOLocalService, MentionType, ModernDocumentWidthMode, NAMED_STYLE_MAP, NAMED_STYLE_SPACE_MAP, NamedStyleType, NilCommand, NumberUnitType, ObjectMatrix, ObjectRelativeFromH, ObjectRelativeFromV, Optional, PADDING_KEYS, PAGE_SIZE, PAPER_TYPES, PARAGRAPH_ID_PREFIX, PRESERVE_INSERTED_PARAGRAPH_IDS, PRESET_LIST_TYPE, PageOrientType, PaperType, ParagraphElementType, ParagraphStyleBuilder, ParagraphStyleValue, PermissionService, PermissionStatus, Plugin, PluginService, PositionedObjectLayoutType, PresetListType, ProtectionType, Quantity, QuickListType, QuickListTypeMap, RANGE_DIRECTION, RANGE_TYPE, RBush, RCDisposable, RESTORE_INSERTED_PARAGRAPH_IDS, RGBA_PAREN, RGB_PAREN, ROTATE_BUFFER_VALUE, RTree, Range, Rectangle, RediError, RedoCommand, RedoCommandId, RefAlias, RegionService, Registry, RegistryAsMap, RelativeDate, ResourceManagerService, RichTextBuilder, RichTextParagraphBuilder, RichTextRunBuilder, RichTextValue, RxDisposable, SECTION_ID_PREFIX, SHEET_EDITOR_UNITS, STYLE_KEYS, SectionType, Self, SheetSkeleton, SheetTypes, SheetViewModel, Skeleton, SkipSelf, SliceBodyType, SpacingRule, Styles, TEXT_DECORATION_KEYS, TEXT_ROTATION_KEYS, THEME_COLORS, TabStopAlignment, TableAlignmentType, TableLayoutType, TableRowHeightRule, TableSizeType, TableTextWrapType, TestConfirmService, TextDecoration, TextDecorationBuilder, TextDirection, TextDirectionType, TextStyleBuilder, TextStyleValue, TextX, TextXActionType, ThemeColorType, ThemeColors, ThemeService, Tools, UndoCommand, UndoCommandId, UnitModel, Univer, UniverInstanceService, UniverInstanceType, UpdateDocsAttributeType, UserManagerService, VerticalAlign, VerticalAlignmentType, WithNew, Workbook, Worksheet, WrapStrategy, WrapTextType, addLinkToDocumentModel, afterInitApply, afterTime, awaitTime, binSearchFirstGreaterThanTarget, binarySearchArray, bufferDebounceTime, cellToRange, characterSpacingControlType, checkForSubstrings, checkIfMove, checkParagraphHasBullet, checkParagraphHasIndent, checkParagraphHasIndentByStyle, cloneBodyWithFreshParagraphIds, cloneCellData, cloneCellDataMatrix, cloneCellDataWithSpanAndDisplay, cloneParagraphWithId, cloneSectionBreakWithId, cloneValue, cloneWorksheetData, codeToBlob, columnLabelToNumber, composeBody, composeInterceptors, composeStyles, concatMatrixArray, containsInteriorInsertionOffset, containsStreamIndex, convertCellToRange, convertObservableToBehaviorSubject, covertCellValue, covertCellValues, createAsyncInterceptorKey, createDefaultBaseTableSnapshot, createDefaultUser, createDocumentModelWithStyle, createIdentifier, createInterceptorKey, createInternalEditorID, createParagraphId, createRandomId, createRowColIter, createSectionId, createSheetGapTestConfig, currencySymbols, customNameCharacterCheck, dateKit, debounce, dedupe, dedupeBy, deepCompare, delayAnimationFrame, deleteContent, extractPureTextFromCell, forwardRef, fromCallback, fromEventSubject, generateIntervalsByPoints, generateRandomId, get, getArrayLength, getEmptySnapshot as getBasesEmptySnapshot, getBlockRangeInterval, getBodySlice, getBodySliceForSplitTextXAction, getBodySliceForTextXAction, getBorderStyleType, getCellCoordByIndexSimple, getCellInfoInMergeData, getCellValueType, getCellWithCoordByIndexCore, getColorStyle, getColumnGroupRangeInterval, getCustomBlockIdsInSelections, getCustomBlockInterval, getCustomBlockSlice, getCustomDecorationSlice, getCustomRangeInterval, getCustomRangeSlice, getDisplayValueFromCell, getEmptySnapshot$1 as getDocsEmptySnapshot, getDocsUpdateBody, getEmptyCell, getExclusiveRangeInterval, getInclusiveRangeInterval, getIntersectRange, getNumfmtParseValueFilter, getOriginCellValue, getParagraphContentStartOffset, getParagraphContentStartOffsets, getParagraphFollowingBlockOffset, getParagraphsSlice, getPlainText, getReverseDirection, getRichTextEditPath, getSectionBreakSlice, getSectionHeaderFooterReferenceKey, getEmptySnapshot$2 as getSheetsEmptySnapshot, getSingleDataStreamChange, getTableCellTokenInterval, getTableRangeInterval, getTableRowTokenInterval, getTableSlice, getTextRunSlice, getTransformOffsetX, getTransformOffsetY, getWorksheetUID, groupBy, handleStyleToString, hashAlgorithm, horizontalLineSegmentsSubtraction, insertMatrixArray, insertTextToContent, intersectsOperationalIntervals, invertColorByHSL, invertColorByMatrix, isAsyncDependencyItem, isAsyncHook, isBlackColor, isBooleanString, isCellCoverable, isCellV, isClassDependencyItem, isCommentEditorID, isCtor, isDefaultFormat, isDisposable, isEmptyCell, isFactoryDependencyItem, isFormulaId, isFormulaString, isICellData, isInternalEditorID, isNodeEnv, isNotNullOrUndefined, isNullCell, isNumeric, isPatternEqualWithoutDecimal, isRangesEqual, isRealNum, isSafeNumeric, isSafeUrl, isSameStyleTextRun, isTextFormat, isUnitRangesEqual, isValidRange, isValueDependencyItem, isWhiteColor, makeArray, makeCellRangeToRangeData, makeCellToSelection, makeCustomRangeStream, mapObjectMatrix, merge, mergeIntervals, mergeLocales, mergeOverrideWithDependencies, mergeSets, mergeWith, mergeWorksheetSnapshotWithDefault, mixinClass, moveMatrixArray, moveRangeByOffset, nameCharacterCheck, noop, normalizeBody, normalizeInsertedSectionIdsForDocument, normalizeTextRuns, normalizeUrl, numberToABC, numberToListABC, api_exports as numfmt, queryObjectMatrix, regexp, registerDependencies, remove, repeatStringNumTimes, replaceInDocumentBody, requestImmediateMacroTask, resolveDocumentParagraphStyle, resolveSectionHeaderFooterReference, resolveSectionHeaderFooterReferences, resolveWithBasePath, rotate, searchArray, searchInOrderedArray, selectionToArray, sequence, sequenceAsync, sequenceExecute, sequenceExecuteAsync, set, setDependencies, shallowEqual, shiftExclusiveRangeOnDelete, shiftExclusiveRangeOnInsert, shiftInclusiveRangeOnDelete, shiftInclusiveRangeOnInsert, skipParseTagNames, sliceMatrixArray, sortRules, sortRulesByDesc, sortRulesFactory, spliceArray, splitIntoGrid, takeAfter, throttle, toDisposable, touchDependencies, updateAttributeByDelete, updateAttributeByInsert, validateDocBodyStructure, validateDocumentStructure, willLoseNumericPrecision };
|