@univerjs/sheets-ui 1.0.0-alpha.8 → 1.0.0-beta.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 +12 -19
- package/lib/cjs/index.js +406 -470
- package/lib/cjs/locale/zh-CN.js +1 -1
- package/lib/cjs/locale/zh-HK.js +3 -3
- package/lib/cjs/locale/zh-TW.js +3 -3
- package/lib/es/facade.js +12 -19
- package/lib/es/index.js +411 -475
- package/lib/es/locale/zh-CN.js +1 -1
- package/lib/es/locale/zh-HK.js +3 -3
- package/lib/es/locale/zh-TW.js +3 -3
- package/lib/facade.js +12 -19
- package/lib/index.css +6 -5
- package/lib/index.js +411 -475
- package/lib/locale/zh-CN.js +1 -1
- package/lib/locale/zh-HK.js +3 -3
- package/lib/locale/zh-TW.js +3 -3
- package/lib/types/controllers/editor/editing.render-controller.d.ts +0 -1
- package/lib/types/views/sheet-bar/sheet-bar-tabs/utils/slide-tab-bar.d.ts +0 -1
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +11 -11
- package/lib/umd/locale/zh-CN.js +1 -1
- package/lib/umd/locale/zh-HK.js +1 -1
- package/lib/umd/locale/zh-TW.js +1 -1
- package/package.json +15 -15
package/lib/es/locale/zh-CN.js
CHANGED
|
@@ -326,7 +326,7 @@ const locale = { "sheets-ui": {
|
|
|
326
326
|
inputRangePlaceholder: "请输入范围(必填)",
|
|
327
327
|
inputFormulaPlaceholder: "请输入公式(必填)",
|
|
328
328
|
formulaOrRefStringInvalid: "公式或引用字符串无效",
|
|
329
|
-
defaultName: "
|
|
329
|
+
defaultName: "定义名称",
|
|
330
330
|
updateButton: "修改",
|
|
331
331
|
deleteButton: "删除",
|
|
332
332
|
deleteConfirmText: "确定删除定义名称?"
|
package/lib/es/locale/zh-HK.js
CHANGED
|
@@ -238,7 +238,7 @@ const locale = { "sheets-ui": {
|
|
|
238
238
|
copy: "副本",
|
|
239
239
|
return: "返回",
|
|
240
240
|
rename: "重新命名",
|
|
241
|
-
tips: "
|
|
241
|
+
tips: "重新命名",
|
|
242
242
|
noName: "未命名的試算表",
|
|
243
243
|
wait: "待更新",
|
|
244
244
|
add: "新增",
|
|
@@ -326,7 +326,7 @@ const locale = { "sheets-ui": {
|
|
|
326
326
|
inputRangePlaceholder: "請輸入範圍(必填)",
|
|
327
327
|
inputFormulaPlaceholder: "請輸入公式(必填)",
|
|
328
328
|
formulaOrRefStringInvalid: "公式或引用字串無效",
|
|
329
|
-
defaultName: "
|
|
329
|
+
defaultName: "定義名稱",
|
|
330
330
|
updateButton: "修改",
|
|
331
331
|
deleteButton: "刪除",
|
|
332
332
|
deleteConfirmText: "確定刪除定義名稱? "
|
|
@@ -401,7 +401,7 @@ const locale = { "sheets-ui": {
|
|
|
401
401
|
setCellStyle: "設定儲存格樣式",
|
|
402
402
|
copy: "複製",
|
|
403
403
|
alert: "提示",
|
|
404
|
-
search: "
|
|
404
|
+
search: "搜尋",
|
|
405
405
|
ownerInherit: "文檔所有者,已開啟權限繼承",
|
|
406
406
|
ownerWithoutInherit: "文檔所有者,未開啟權限繼承",
|
|
407
407
|
alertContent: "該範圍已被保護,目前無編輯權限。如需編輯,請聯絡創建者。 ",
|
package/lib/es/locale/zh-TW.js
CHANGED
|
@@ -238,7 +238,7 @@ const locale = { "sheets-ui": {
|
|
|
238
238
|
copy: "副本",
|
|
239
239
|
return: "返回",
|
|
240
240
|
rename: "重新命名",
|
|
241
|
-
tips: "
|
|
241
|
+
tips: "重新命名",
|
|
242
242
|
noName: "未命名的試算表",
|
|
243
243
|
wait: "待更新",
|
|
244
244
|
add: "新增",
|
|
@@ -326,7 +326,7 @@ const locale = { "sheets-ui": {
|
|
|
326
326
|
inputRangePlaceholder: "請輸入範圍(必填)",
|
|
327
327
|
inputFormulaPlaceholder: "請輸入公式(必填)",
|
|
328
328
|
formulaOrRefStringInvalid: "公式或引用字串無效",
|
|
329
|
-
defaultName: "
|
|
329
|
+
defaultName: "定義名稱",
|
|
330
330
|
updateButton: "修改",
|
|
331
331
|
deleteButton: "刪除",
|
|
332
332
|
deleteConfirmText: "確定刪除定義名稱? "
|
|
@@ -401,7 +401,7 @@ const locale = { "sheets-ui": {
|
|
|
401
401
|
setCellStyle: "設定儲存格樣式",
|
|
402
402
|
copy: "複製",
|
|
403
403
|
alert: "提示",
|
|
404
|
-
search: "
|
|
404
|
+
search: "搜尋",
|
|
405
405
|
ownerInherit: "文檔所有者,已開啟權限繼承",
|
|
406
406
|
ownerWithoutInherit: "文檔所有者,未開啟權限繼承",
|
|
407
407
|
alertContent: "該範圍已被保護,目前無編輯權限。如需編輯,請聯絡創建者。 ",
|
package/lib/facade.js
CHANGED
|
@@ -460,38 +460,34 @@ var FUniverSheetsUIMixin = class extends FUniver {
|
|
|
460
460
|
})));
|
|
461
461
|
if (selectionService) {
|
|
462
462
|
combined$Disposable.add(this.registerEventHandler(this.Event.SelectionMoveStart, () => selectionService.selectionMoveStart$.subscribe((selections) => {
|
|
463
|
-
var _selections$map;
|
|
464
463
|
const eventParams = {
|
|
465
464
|
workbook,
|
|
466
465
|
worksheet: workbook.getActiveSheet(),
|
|
467
|
-
selections: (
|
|
466
|
+
selections: (selections === null || selections === void 0 ? void 0 : selections.map((s) => s.range)) ?? []
|
|
468
467
|
};
|
|
469
468
|
this.fireEvent(this.Event.SelectionMoveStart, eventParams);
|
|
470
469
|
})));
|
|
471
470
|
combined$Disposable.add(this.registerEventHandler(this.Event.SelectionMoving, () => selectionService.selectionMoving$.subscribe((selections) => {
|
|
472
|
-
var _selections$map2;
|
|
473
471
|
const eventParams = {
|
|
474
472
|
workbook,
|
|
475
473
|
worksheet: workbook.getActiveSheet(),
|
|
476
|
-
selections: (
|
|
474
|
+
selections: (selections === null || selections === void 0 ? void 0 : selections.map((s) => s.range)) ?? []
|
|
477
475
|
};
|
|
478
476
|
this.fireEvent(this.Event.SelectionMoving, eventParams);
|
|
479
477
|
})));
|
|
480
478
|
combined$Disposable.add(this.registerEventHandler(this.Event.SelectionMoveEnd, () => selectionService.selectionMoveEnd$.subscribe((selections) => {
|
|
481
|
-
var _selections$map3;
|
|
482
479
|
const eventParams = {
|
|
483
480
|
workbook,
|
|
484
481
|
worksheet: workbook.getActiveSheet(),
|
|
485
|
-
selections: (
|
|
482
|
+
selections: (selections === null || selections === void 0 ? void 0 : selections.map((s) => s.range)) ?? []
|
|
486
483
|
};
|
|
487
484
|
this.fireEvent(this.Event.SelectionMoveEnd, eventParams);
|
|
488
485
|
})));
|
|
489
486
|
combined$Disposable.add(this.registerEventHandler(this.Event.SelectionChanged, () => selectionService.selectionChanged$.subscribe((selections) => {
|
|
490
|
-
var _selections$map4;
|
|
491
487
|
const eventParams = {
|
|
492
488
|
workbook,
|
|
493
489
|
worksheet: workbook.getActiveSheet(),
|
|
494
|
-
selections: (
|
|
490
|
+
selections: (selections === null || selections === void 0 ? void 0 : selections.map((s) => s.range)) ?? []
|
|
495
491
|
};
|
|
496
492
|
this.fireEvent(this.Event.SelectionChanged, eventParams);
|
|
497
493
|
})));
|
|
@@ -1169,15 +1165,13 @@ var FRangeSheetsUIMixin = class extends FRange {
|
|
|
1169
1165
|
};
|
|
1170
1166
|
}
|
|
1171
1167
|
generateHTML() {
|
|
1172
|
-
var _copyContent$html;
|
|
1173
1168
|
const copyContent = this._injector.get(ISheetClipboardService).generateCopyContent(this._workbook.getUnitId(), this._worksheet.getSheetId(), this._range);
|
|
1174
|
-
return (
|
|
1169
|
+
return (copyContent === null || copyContent === void 0 ? void 0 : copyContent.html) ?? "";
|
|
1175
1170
|
}
|
|
1176
1171
|
attachPopup(popup) {
|
|
1177
|
-
|
|
1178
|
-
popup.
|
|
1179
|
-
popup.
|
|
1180
|
-
popup.offset = (_popup$offset = popup.offset) !== null && _popup$offset !== void 0 ? _popup$offset : [0, 0];
|
|
1172
|
+
popup.direction = popup.direction ?? "horizontal";
|
|
1173
|
+
popup.extraProps = popup.extraProps ?? {};
|
|
1174
|
+
popup.offset = popup.offset ?? [0, 0];
|
|
1181
1175
|
const { key, disposableCollection } = transformComponentKey(popup, this._injector.get(ComponentManager));
|
|
1182
1176
|
const disposePopup = this._injector.get(SheetCanvasPopManagerService).attachPopupToCell(this._range.startRow, this._range.startColumn, {
|
|
1183
1177
|
...popup,
|
|
@@ -1225,10 +1219,9 @@ var FRangeSheetsUIMixin = class extends FRange {
|
|
|
1225
1219
|
* ```
|
|
1226
1220
|
*/
|
|
1227
1221
|
attachRangePopup(popup) {
|
|
1228
|
-
|
|
1229
|
-
popup.
|
|
1230
|
-
popup.
|
|
1231
|
-
popup.offset = (_popup$offset2 = popup.offset) !== null && _popup$offset2 !== void 0 ? _popup$offset2 : [0, 0];
|
|
1222
|
+
popup.direction = popup.direction ?? "top-center";
|
|
1223
|
+
popup.extraProps = popup.extraProps ?? {};
|
|
1224
|
+
popup.offset = popup.offset ?? [0, 0];
|
|
1232
1225
|
const { key, disposableCollection } = transformComponentKey(popup, this._injector.get(ComponentManager));
|
|
1233
1226
|
const disposePopup = this._injector.get(SheetCanvasPopManagerService).attachRangePopup(this._range, {
|
|
1234
1227
|
...popup,
|
|
@@ -1270,7 +1263,7 @@ function transformComponentKey(component, componentManager) {
|
|
|
1270
1263
|
const disposableCollection = new DisposableCollection();
|
|
1271
1264
|
if (typeof componentKey === "string") key = componentKey;
|
|
1272
1265
|
else {
|
|
1273
|
-
const resolvedFramework = framework
|
|
1266
|
+
const resolvedFramework = framework ?? "react";
|
|
1274
1267
|
key = resolvedFramework === "web-component" ? `external-${generateRandomId(6).toLowerCase()}` : `External_${generateRandomId(6)}`;
|
|
1275
1268
|
disposableCollection.add(componentManager.register(key, componentKey, { framework: resolvedFramework }));
|
|
1276
1269
|
}
|
package/lib/index.css
CHANGED
|
@@ -11,10 +11,7 @@
|
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
.univer-inset-0 {
|
|
14
|
-
|
|
15
|
-
bottom: 0;
|
|
16
|
-
left: 0;
|
|
17
|
-
right: 0;
|
|
14
|
+
inset: 0;
|
|
18
15
|
}
|
|
19
16
|
|
|
20
17
|
.-univer-bottom-0\.5 {
|
|
@@ -493,7 +490,6 @@
|
|
|
493
490
|
}
|
|
494
491
|
|
|
495
492
|
.univer-appearance-none {
|
|
496
|
-
-webkit-appearance: none;
|
|
497
493
|
appearance: none;
|
|
498
494
|
}
|
|
499
495
|
|
|
@@ -650,6 +646,11 @@
|
|
|
650
646
|
border-radius: .125rem;
|
|
651
647
|
}
|
|
652
648
|
|
|
649
|
+
.univer-rounded-t {
|
|
650
|
+
border-top-left-radius: .25rem;
|
|
651
|
+
border-top-right-radius: .25rem;
|
|
652
|
+
}
|
|
653
|
+
|
|
653
654
|
.univer-border-2 {
|
|
654
655
|
border-width: 2px;
|
|
655
656
|
}
|