@univerjs/core 0.24.0 → 0.25.0-insiders.20260608-e4336f7
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 +39 -9
- package/lib/cjs/index.js +2916 -2279
- package/lib/es/facade.js +39 -9
- package/lib/es/index.js +2904 -2280
- package/lib/facade.js +39 -9
- package/lib/index.js +2904 -2280
- package/lib/types/base/base-data-model.d.ts +33 -0
- package/lib/types/{shared/coder.d.ts → base/base-performance.d.ts} +4 -2
- package/lib/types/base/index.d.ts +17 -0
- package/lib/types/base/typedef.d.ts +642 -0
- package/lib/types/common/url.d.ts +1 -0
- package/lib/types/docs/data-model/text-x/apply-utils/common.d.ts +3 -1
- package/lib/types/docs/data-model/text-x/build-utils/drawings.d.ts +0 -1
- package/lib/types/docs/data-model/text-x/utils.d.ts +5 -2
- package/lib/types/docs/data-model/types.d.ts +3 -0
- package/lib/types/facade/f-univer.d.ts +29 -3
- package/lib/types/index.d.ts +3 -2
- package/lib/types/services/resource-manager/resource-manager.service.d.ts +4 -3
- package/lib/types/services/resource-manager/type.d.ts +3 -2
- package/lib/types/shared/index.d.ts +1 -1
- package/lib/types/shared/numfmt.d.ts +2 -1
- package/lib/types/shared/tools.d.ts +5 -0
- package/lib/types/sheets/typedef.d.ts +20 -5
- package/lib/types/types/const/const.d.ts +3 -0
- package/lib/types/types/const/page-size.d.ts +7 -0
- package/lib/types/types/enum/locale-type.d.ts +8 -1
- package/lib/types/types/interfaces/i-document-data.d.ts +50 -0
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +10 -9
- package/package.json +6 -6
- package/LICENSE +0 -176
package/lib/cjs/facade.js
CHANGED
|
@@ -78,7 +78,7 @@ var FBaseInitialable = class extends _univerjs_core.Disposable {
|
|
|
78
78
|
};
|
|
79
79
|
|
|
80
80
|
//#endregion
|
|
81
|
-
//#region \0@oxc-project+runtime@0.
|
|
81
|
+
//#region \0@oxc-project+runtime@0.134.0/helpers/esm/decorateParam.js
|
|
82
82
|
function __decorateParam(paramIndex, decorator) {
|
|
83
83
|
return function(target, key) {
|
|
84
84
|
decorator(target, key, paramIndex);
|
|
@@ -86,7 +86,7 @@ function __decorateParam(paramIndex, decorator) {
|
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
//#endregion
|
|
89
|
-
//#region \0@oxc-project+runtime@0.
|
|
89
|
+
//#region \0@oxc-project+runtime@0.134.0/helpers/esm/decorate.js
|
|
90
90
|
function __decorate(decorators, target, key, desc) {
|
|
91
91
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
92
92
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -210,7 +210,7 @@ let FBlob = _FBlob = class FBlob extends FBase {
|
|
|
210
210
|
FBlob = _FBlob = __decorate([__decorateParam(1, (0, _univerjs_core.Inject)(_univerjs_core.Injector))], FBlob);
|
|
211
211
|
|
|
212
212
|
//#endregion
|
|
213
|
-
//#region \0@oxc-project+runtime@0.
|
|
213
|
+
//#region \0@oxc-project+runtime@0.134.0/helpers/esm/typeof.js
|
|
214
214
|
function _typeof(o) {
|
|
215
215
|
"@babel/helpers - typeof";
|
|
216
216
|
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
|
|
@@ -221,7 +221,7 @@ function _typeof(o) {
|
|
|
221
221
|
}
|
|
222
222
|
|
|
223
223
|
//#endregion
|
|
224
|
-
//#region \0@oxc-project+runtime@0.
|
|
224
|
+
//#region \0@oxc-project+runtime@0.134.0/helpers/esm/toPrimitive.js
|
|
225
225
|
function toPrimitive(t, r) {
|
|
226
226
|
if ("object" != _typeof(t) || !t) return t;
|
|
227
227
|
var e = t[Symbol.toPrimitive];
|
|
@@ -234,14 +234,14 @@ function toPrimitive(t, r) {
|
|
|
234
234
|
}
|
|
235
235
|
|
|
236
236
|
//#endregion
|
|
237
|
-
//#region \0@oxc-project+runtime@0.
|
|
237
|
+
//#region \0@oxc-project+runtime@0.134.0/helpers/esm/toPropertyKey.js
|
|
238
238
|
function toPropertyKey(t) {
|
|
239
239
|
var i = toPrimitive(t, "string");
|
|
240
240
|
return "symbol" == _typeof(i) ? i : i + "";
|
|
241
241
|
}
|
|
242
242
|
|
|
243
243
|
//#endregion
|
|
244
|
-
//#region \0@oxc-project+runtime@0.
|
|
244
|
+
//#region \0@oxc-project+runtime@0.134.0/helpers/esm/defineProperty.js
|
|
245
245
|
function _defineProperty(e, r, t) {
|
|
246
246
|
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
247
247
|
value: t,
|
|
@@ -1386,6 +1386,30 @@ let FUniver = _FUniver = class FUniver extends _univerjs_core.Disposable {
|
|
|
1386
1386
|
this._injector.get(_univerjs_core.LocaleService).setLocale(locale);
|
|
1387
1387
|
}
|
|
1388
1388
|
/**
|
|
1389
|
+
* Get the current locale.
|
|
1390
|
+
* @returns {string} The current locale identifier.
|
|
1391
|
+
* @example
|
|
1392
|
+
* ```ts
|
|
1393
|
+
* const currentLocale = univerAPI.getCurrentLocale();
|
|
1394
|
+
* console.log(currentLocale);
|
|
1395
|
+
* ```
|
|
1396
|
+
*/
|
|
1397
|
+
getCurrentLocale() {
|
|
1398
|
+
return this._injector.get(_univerjs_core.LocaleService).getCurrentLocale();
|
|
1399
|
+
}
|
|
1400
|
+
/**
|
|
1401
|
+
* Get the locales for the current locale.
|
|
1402
|
+
* @returns {ILanguagePack | undefined} The locales object for the current locale, it returns undefined if the locales is not loaded.
|
|
1403
|
+
* @example
|
|
1404
|
+
* ```ts
|
|
1405
|
+
* const locales = univerAPI.getLocales();
|
|
1406
|
+
* console.log(locales);
|
|
1407
|
+
* ```
|
|
1408
|
+
*/
|
|
1409
|
+
getLocales() {
|
|
1410
|
+
return this._injector.get(_univerjs_core.LocaleService).getLocales();
|
|
1411
|
+
}
|
|
1412
|
+
/**
|
|
1389
1413
|
* Register a callback that will be triggered before invoking a command.
|
|
1390
1414
|
* @deprecated use `univerAPI.addEvent(univerAPI.Event.BeforeCommandExecute, (event) => {})` instead.
|
|
1391
1415
|
* @param {CommandListener} callback The callback.
|
|
@@ -1514,7 +1538,9 @@ let FUniver = _FUniver = class FUniver extends _univerjs_core.Disposable {
|
|
|
1514
1538
|
* @example
|
|
1515
1539
|
* ```ts
|
|
1516
1540
|
* const richText = univerAPI.newRichText({ body: { dataStream: 'Hello World\r\n' } });
|
|
1517
|
-
* const
|
|
1541
|
+
* const fWorksheet = univerAPI.getActiveWorkbook().getSheetByName('Sheet1');
|
|
1542
|
+
* if (!fWorksheet) return;
|
|
1543
|
+
* const range = fWorksheet.getRange('A1');
|
|
1518
1544
|
* range.setRichTextValueForCell(richText);
|
|
1519
1545
|
* ```
|
|
1520
1546
|
*/
|
|
@@ -1528,7 +1554,9 @@ let FUniver = _FUniver = class FUniver extends _univerjs_core.Disposable {
|
|
|
1528
1554
|
* @example
|
|
1529
1555
|
* ```ts
|
|
1530
1556
|
* const richTextValue = univerAPI.newRichTextValue({ body: { dataStream: 'Hello World\r\n' } });
|
|
1531
|
-
* const
|
|
1557
|
+
* const fWorksheet = univerAPI.getActiveWorkbook().getSheetByName('Sheet1');
|
|
1558
|
+
* if (!fWorksheet) return;
|
|
1559
|
+
* const range = fWorksheet.getRange('A1');
|
|
1532
1560
|
* range.setRichTextValueForCell(richTextValue);
|
|
1533
1561
|
* ```
|
|
1534
1562
|
*/
|
|
@@ -1544,7 +1572,9 @@ let FUniver = _FUniver = class FUniver extends _univerjs_core.Disposable {
|
|
|
1544
1572
|
* const richText = univerAPI.newRichText({ body: { dataStream: 'Hello World\r\n' } });
|
|
1545
1573
|
* const paragraphStyle = univerAPI.newParagraphStyle({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
|
|
1546
1574
|
* richText.insertParagraph(paragraphStyle);
|
|
1547
|
-
* const
|
|
1575
|
+
* const fWorksheet = univerAPI.getActiveWorkbook().getSheetByName('Sheet1');
|
|
1576
|
+
* if (!fWorksheet) return;
|
|
1577
|
+
* const range = fWorksheet.getRange('A1');
|
|
1548
1578
|
* range.setRichTextValueForCell(richText);
|
|
1549
1579
|
* ```
|
|
1550
1580
|
*/
|