@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.
@@ -326,7 +326,7 @@ const locale = { "sheets-ui": {
326
326
  inputRangePlaceholder: "请输入范围(必填)",
327
327
  inputFormulaPlaceholder: "请输入公式(必填)",
328
328
  formulaOrRefStringInvalid: "公式或引用字符串无效",
329
- defaultName: "DefinedName",
329
+ defaultName: "定义名称",
330
330
  updateButton: "修改",
331
331
  deleteButton: "删除",
332
332
  deleteConfirmText: "确定删除定义名称?"
@@ -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: "DefinedName",
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: "該範圍已被保護,目前無編輯權限。如需編輯,請聯絡創建者。 ",
@@ -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: "DefinedName",
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: (_selections$map = selections === null || selections === void 0 ? void 0 : selections.map((s) => s.range)) !== null && _selections$map !== void 0 ? _selections$map : []
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: (_selections$map2 = selections === null || selections === void 0 ? void 0 : selections.map((s) => s.range)) !== null && _selections$map2 !== void 0 ? _selections$map2 : []
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: (_selections$map3 = selections === null || selections === void 0 ? void 0 : selections.map((s) => s.range)) !== null && _selections$map3 !== void 0 ? _selections$map3 : []
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: (_selections$map4 = selections === null || selections === void 0 ? void 0 : selections.map((s) => s.range)) !== null && _selections$map4 !== void 0 ? _selections$map4 : []
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 (_copyContent$html = copyContent === null || copyContent === void 0 ? void 0 : copyContent.html) !== null && _copyContent$html !== void 0 ? _copyContent$html : "";
1169
+ return (copyContent === null || copyContent === void 0 ? void 0 : copyContent.html) ?? "";
1175
1170
  }
1176
1171
  attachPopup(popup) {
1177
- var _popup$direction, _popup$extraProps, _popup$offset;
1178
- popup.direction = (_popup$direction = popup.direction) !== null && _popup$direction !== void 0 ? _popup$direction : "horizontal";
1179
- popup.extraProps = (_popup$extraProps = popup.extraProps) !== null && _popup$extraProps !== void 0 ? _popup$extraProps : {};
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
- var _popup$direction2, _popup$extraProps2, _popup$offset2;
1229
- popup.direction = (_popup$direction2 = popup.direction) !== null && _popup$direction2 !== void 0 ? _popup$direction2 : "top-center";
1230
- popup.extraProps = (_popup$extraProps2 = popup.extraProps) !== null && _popup$extraProps2 !== void 0 ? _popup$extraProps2 : {};
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 !== null && framework !== void 0 ? framework : "react";
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
- top: 0;
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
  }