@univerjs/core 0.16.1 → 0.17.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/lib/cjs/facade.js +1 -1
- package/lib/cjs/index.js +8 -8
- package/lib/es/facade.js +32 -44
- package/lib/es/index.js +3847 -4078
- package/lib/facade.js +32 -44
- package/lib/index.js +3847 -4078
- package/lib/types/facade/f-univer.d.ts +1 -11
- package/lib/types/services/plugin/plugin.service.d.ts +4 -0
- package/lib/types/services/resource-manager/resource-manager.service.d.ts +1 -2
- package/lib/types/shared/compare.d.ts +3 -3
- package/lib/types/shared/index.d.ts +0 -1
- package/lib/types/shared/object-matrix-query.d.ts +1 -1
- package/lib/types/shared/shape.d.ts +6 -0
- package/lib/types/types/interfaces/i-drawing.d.ts +6 -1
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +8 -8
- package/package.json +3 -3
- package/lib/types/shared/color/color.d.ts +0 -84
package/lib/es/facade.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var F = Object.defineProperty;
|
|
2
2
|
var q = (i, e, t) => e in i ? F(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
|
|
3
3
|
var d = (i, e, t) => q(i, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
-
import { Disposable as I, Inject as p, Injector as _, AbsoluteRefType as G, UniverInstanceType as R, LifecycleStages as f, DataValidationType as J, DataValidationErrorStyle as K, DataValidationRenderMode as Q, DataValidationOperator as X, DataValidationStatus as Y, CommandType as Z, BaselineOffset as k, BooleanNumber as ee, HorizontalAlign as te, TextDecoration as re, TextDirection as ie, VerticalAlign as ne, WrapStrategy as oe, BorderType as se, BorderStyleTypes as ce, AutoFillSeries as ae, ColorType as de, CommonHideTypes as le, CopyPasteType as pe, DeleteDirection as he, DeveloperMetadataVisibility as ue, Dimension as ye, Direction as ge, InterpolationPointType as ve, LocaleType as fe, MentionType as _e, ProtectionType as me, RelativeDate as Ee, SheetTypes as be, ThemeColorType as Se, LifecycleService as V, toDisposable as l, ICommandService as y, UndoCommand as h, IUndoRedoService as E, RedoCommand as u, Registry as Ce, UserManagerService as De, Rectangle as xe, numfmt as Te, Tools as we, IUniverInstanceService as W, Univer as Re, CanceledError as T, ThemeService as Oe, LocaleService as z,
|
|
4
|
+
import { Disposable as I, Inject as p, Injector as _, AbsoluteRefType as G, UniverInstanceType as R, LifecycleStages as f, DataValidationType as J, DataValidationErrorStyle as K, DataValidationRenderMode as Q, DataValidationOperator as X, DataValidationStatus as Y, CommandType as Z, BaselineOffset as k, BooleanNumber as ee, HorizontalAlign as te, TextDecoration as re, TextDirection as ie, VerticalAlign as ne, WrapStrategy as oe, BorderType as se, BorderStyleTypes as ce, AutoFillSeries as ae, ColorType as de, CommonHideTypes as le, CopyPasteType as pe, DeleteDirection as he, DeveloperMetadataVisibility as ue, Dimension as ye, Direction as ge, InterpolationPointType as ve, LocaleType as fe, MentionType as _e, ProtectionType as me, RelativeDate as Ee, SheetTypes as be, ThemeColorType as Se, LifecycleService as V, toDisposable as l, ICommandService as y, UndoCommand as h, IUndoRedoService as E, RedoCommand as u, Registry as Ce, UserManagerService as De, Rectangle as xe, numfmt as Te, Tools as we, IUniverInstanceService as W, Univer as Re, CanceledError as T, ThemeService as Oe, LocaleService as z, RichTextBuilder as je, RichTextValue as Pe, ParagraphStyleBuilder as Be, ParagraphStyleValue as He, TextStyleBuilder as Me, TextStyleValue as Ue, TextDecorationBuilder as Ie } from "@univerjs/core";
|
|
5
5
|
import { filter as b } from "rxjs";
|
|
6
6
|
class $ extends I {
|
|
7
7
|
/**
|
|
@@ -16,7 +16,7 @@ class $ extends I {
|
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
const S = /* @__PURE__ */ Symbol("initializers"), A = /* @__PURE__ */ Symbol("manualInit");
|
|
19
|
-
class
|
|
19
|
+
class Ve extends I {
|
|
20
20
|
constructor(e) {
|
|
21
21
|
if (super(), this._injector = e, !!this.constructor[A]) return;
|
|
22
22
|
const n = this, o = Object.getPrototypeOf(this)[S];
|
|
@@ -50,11 +50,11 @@ class $e extends I {
|
|
|
50
50
|
});
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
|
-
var
|
|
54
|
-
for (var n = r > 1 ? void 0 : r ?
|
|
53
|
+
var $e = Object.getOwnPropertyDescriptor, ze = (i, e, t, r) => {
|
|
54
|
+
for (var n = r > 1 ? void 0 : r ? $e(e, t) : e, o = i.length - 1, s; o >= 0; o--)
|
|
55
55
|
(s = i[o]) && (n = s(n) || n);
|
|
56
56
|
return n;
|
|
57
|
-
},
|
|
57
|
+
}, Ae = (i, e) => (t, r) => e(t, r, i);
|
|
58
58
|
let D = class extends $ {
|
|
59
59
|
constructor(i, e) {
|
|
60
60
|
super(), this._blob = i, this._injector = e;
|
|
@@ -157,8 +157,8 @@ let D = class extends $ {
|
|
|
157
157
|
return this._blob = (e = this._blob) == null ? void 0 : e.slice(0, this._blob.size, i), this;
|
|
158
158
|
}
|
|
159
159
|
};
|
|
160
|
-
D =
|
|
161
|
-
|
|
160
|
+
D = ze([
|
|
161
|
+
Ae(1, p(_))
|
|
162
162
|
], D);
|
|
163
163
|
const g = class g {
|
|
164
164
|
static get() {
|
|
@@ -730,8 +730,8 @@ const v = class v {
|
|
|
730
730
|
*/
|
|
731
731
|
d(v, "_instance");
|
|
732
732
|
let j = v;
|
|
733
|
-
var
|
|
734
|
-
for (var n = r > 1 ? void 0 : r ?
|
|
733
|
+
var Le = Object.getOwnPropertyDescriptor, Ne = (i, e, t, r) => {
|
|
734
|
+
for (var n = r > 1 ? void 0 : r ? Le(e, t) : e, o = i.length - 1, s; o >= 0; o--)
|
|
735
735
|
(s = i[o]) && (n = s(n) || n);
|
|
736
736
|
return n;
|
|
737
737
|
}, L = (i, e) => (t, r) => e(t, r, i);
|
|
@@ -816,24 +816,24 @@ let P = class extends $ {
|
|
|
816
816
|
});
|
|
817
817
|
}
|
|
818
818
|
};
|
|
819
|
-
P =
|
|
819
|
+
P = Ne([
|
|
820
820
|
L(0, p(_)),
|
|
821
821
|
L(1, p(V))
|
|
822
822
|
], P);
|
|
823
|
-
var
|
|
824
|
-
for (var n = r > 1 ? void 0 : r ?
|
|
823
|
+
var We = Object.getOwnPropertyDescriptor, Fe = (i, e, t, r) => {
|
|
824
|
+
for (var n = r > 1 ? void 0 : r ? We(e, t) : e, o = i.length - 1, s; o >= 0; o--)
|
|
825
825
|
(s = i[o]) && (n = s(n) || n);
|
|
826
826
|
return n;
|
|
827
|
-
},
|
|
828
|
-
let B = class extends
|
|
827
|
+
}, qe = (i, e) => (t, r) => e(t, r, i);
|
|
828
|
+
let B = class extends Ve {
|
|
829
829
|
constructor(i, e) {
|
|
830
830
|
super(e), this.doc = i;
|
|
831
831
|
}
|
|
832
832
|
};
|
|
833
|
-
B =
|
|
834
|
-
|
|
833
|
+
B = Fe([
|
|
834
|
+
qe(1, p(_))
|
|
835
835
|
], B);
|
|
836
|
-
class
|
|
836
|
+
class Ge {
|
|
837
837
|
constructor() {
|
|
838
838
|
d(this, "_eventRegistry", /* @__PURE__ */ new Map());
|
|
839
839
|
d(this, "_eventHandlerMap", /* @__PURE__ */ new Map());
|
|
@@ -896,8 +896,8 @@ class Je {
|
|
|
896
896
|
}), t.cancel;
|
|
897
897
|
}
|
|
898
898
|
}
|
|
899
|
-
var
|
|
900
|
-
for (var n = r > 1 ? void 0 : r ?
|
|
899
|
+
var Je = Object.getOwnPropertyDescriptor, Ke = (i, e, t, r) => {
|
|
900
|
+
for (var n = r > 1 ? void 0 : r ? Je(e, t) : e, o = i.length - 1, s; o >= 0; o--)
|
|
901
901
|
(s = i[o]) && (n = s(n) || n);
|
|
902
902
|
return n;
|
|
903
903
|
}, N = (i, e) => (t, r) => e(t, r, i);
|
|
@@ -917,7 +917,7 @@ let H = class extends $ {
|
|
|
917
917
|
return this._userManagerService.getCurrentUser();
|
|
918
918
|
}
|
|
919
919
|
};
|
|
920
|
-
H =
|
|
920
|
+
H = Ke([
|
|
921
921
|
N(0, p(_)),
|
|
922
922
|
N(1, p(De))
|
|
923
923
|
], H);
|
|
@@ -984,8 +984,8 @@ const x = class x {
|
|
|
984
984
|
*/
|
|
985
985
|
d(x, "_instance");
|
|
986
986
|
let M = x;
|
|
987
|
-
var
|
|
988
|
-
for (var n = r > 1 ? void 0 : r ?
|
|
987
|
+
var Qe = Object.getOwnPropertyDescriptor, Xe = (i, e, t, r) => {
|
|
988
|
+
for (var n = r > 1 ? void 0 : r ? Qe(e, t) : e, o = i.length - 1, s; o >= 0; o--)
|
|
989
989
|
(s = i[o]) && (n = s(n) || n);
|
|
990
990
|
return n;
|
|
991
991
|
}, C = (i, e) => (t, r) => e(t, r, i);
|
|
@@ -993,7 +993,7 @@ const w = /* @__PURE__ */ Symbol("initializers");
|
|
|
993
993
|
let U = class extends I {
|
|
994
994
|
constructor(e, t, r, n) {
|
|
995
995
|
super();
|
|
996
|
-
d(this, "_eventRegistry", new
|
|
996
|
+
d(this, "_eventRegistry", new Ge());
|
|
997
997
|
d(this, "registerEventHandler", (e, t) => this._eventRegistry.registerEventHandler(e, t));
|
|
998
998
|
this._injector = e, this._commandService = t, this._univerInstanceService = r, this._lifecycleService = n, this.disposeWithMe(
|
|
999
999
|
this.registerEventHandler(
|
|
@@ -1368,18 +1368,6 @@ let U = class extends I {
|
|
|
1368
1368
|
newBlob() {
|
|
1369
1369
|
return this._injector.createInstance(D);
|
|
1370
1370
|
}
|
|
1371
|
-
/**
|
|
1372
|
-
* Create a new color.
|
|
1373
|
-
* @returns {ColorBuilder} The new color instance
|
|
1374
|
-
* @example
|
|
1375
|
-
* ```ts
|
|
1376
|
-
* const color = univerAPI.newColor();
|
|
1377
|
-
* ```
|
|
1378
|
-
* @deprecated
|
|
1379
|
-
*/
|
|
1380
|
-
newColor() {
|
|
1381
|
-
return new je();
|
|
1382
|
-
}
|
|
1383
1371
|
/**
|
|
1384
1372
|
* Create a new rich text.
|
|
1385
1373
|
* @param {IDocumentData} data
|
|
@@ -1392,7 +1380,7 @@ let U = class extends I {
|
|
|
1392
1380
|
* ```
|
|
1393
1381
|
*/
|
|
1394
1382
|
newRichText(e) {
|
|
1395
|
-
return
|
|
1383
|
+
return je.create(e);
|
|
1396
1384
|
}
|
|
1397
1385
|
/**
|
|
1398
1386
|
* Create a new rich text value.
|
|
@@ -1406,7 +1394,7 @@ let U = class extends I {
|
|
|
1406
1394
|
* ```
|
|
1407
1395
|
*/
|
|
1408
1396
|
newRichTextValue(e) {
|
|
1409
|
-
return
|
|
1397
|
+
return Pe.create(e);
|
|
1410
1398
|
}
|
|
1411
1399
|
/**
|
|
1412
1400
|
* Create a new paragraph style.
|
|
@@ -1422,7 +1410,7 @@ let U = class extends I {
|
|
|
1422
1410
|
* ```
|
|
1423
1411
|
*/
|
|
1424
1412
|
newParagraphStyle(e) {
|
|
1425
|
-
return
|
|
1413
|
+
return Be.create(e);
|
|
1426
1414
|
}
|
|
1427
1415
|
/**
|
|
1428
1416
|
* Create a new paragraph style value.
|
|
@@ -1434,7 +1422,7 @@ let U = class extends I {
|
|
|
1434
1422
|
* ```
|
|
1435
1423
|
*/
|
|
1436
1424
|
newParagraphStyleValue(e) {
|
|
1437
|
-
return
|
|
1425
|
+
return He.create(e);
|
|
1438
1426
|
}
|
|
1439
1427
|
/**
|
|
1440
1428
|
* Create a new text style.
|
|
@@ -1446,7 +1434,7 @@ let U = class extends I {
|
|
|
1446
1434
|
* ```
|
|
1447
1435
|
*/
|
|
1448
1436
|
newTextStyle(e) {
|
|
1449
|
-
return
|
|
1437
|
+
return Me.create(e);
|
|
1450
1438
|
}
|
|
1451
1439
|
/**
|
|
1452
1440
|
* Create a new text style value.
|
|
@@ -1458,7 +1446,7 @@ let U = class extends I {
|
|
|
1458
1446
|
* ```
|
|
1459
1447
|
*/
|
|
1460
1448
|
newTextStyleValue(e) {
|
|
1461
|
-
return
|
|
1449
|
+
return Ue.create(e);
|
|
1462
1450
|
}
|
|
1463
1451
|
/**
|
|
1464
1452
|
* Create a new text decoration.
|
|
@@ -1470,10 +1458,10 @@ let U = class extends I {
|
|
|
1470
1458
|
* ```
|
|
1471
1459
|
*/
|
|
1472
1460
|
newTextDecoration(e) {
|
|
1473
|
-
return new
|
|
1461
|
+
return new Ie(e);
|
|
1474
1462
|
}
|
|
1475
1463
|
};
|
|
1476
|
-
U =
|
|
1464
|
+
U = Xe([
|
|
1477
1465
|
C(0, p(_)),
|
|
1478
1466
|
C(1, y),
|
|
1479
1467
|
C(2, W),
|
|
@@ -1481,7 +1469,7 @@ U = Ye([
|
|
|
1481
1469
|
], U);
|
|
1482
1470
|
export {
|
|
1483
1471
|
$ as FBase,
|
|
1484
|
-
|
|
1472
|
+
Ve as FBaseInitialable,
|
|
1485
1473
|
D as FBlob,
|
|
1486
1474
|
O as FEnum,
|
|
1487
1475
|
j as FEventName,
|