@univerjs/sheets-ui 0.5.5-nightly.202501220324 → 0.5.5-nightly.202501231606
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 +6 -6
- package/lib/es/facade.js +5 -2
- package/lib/es/index.js +87 -61
- package/lib/types/controllers/render-controllers/freeze.render-controller.d.ts +6 -2
- package/lib/types/facade/f-event.d.ts +38 -32
- package/lib/types/facade/f-permission.d.ts +3 -0
- package/lib/types/facade/f-range.d.ts +27 -5
- package/lib/types/facade/f-sheet-hooks.d.ts +3 -0
- package/lib/types/facade/f-univer.d.ts +6 -0
- package/lib/types/facade/f-workbook.d.ts +3 -0
- package/lib/types/facade/f-worksheet.d.ts +3 -0
- package/lib/types/services/clipboard/utils.d.ts +1 -1
- package/lib/types/services/sheet-skeleton-manager.service.d.ts +1 -1
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +6 -6
- package/package.json +14 -14
- package/lib/types/commands/commands/__tests__/add-worksheet-merge.command.spec.d.ts +0 -16
- package/lib/types/commands/commands/__tests__/auto-fill.controller.spec.d.ts +0 -16
- package/lib/types/commands/commands/__tests__/create-command-test-bed.d.ts +0 -7
- package/lib/types/commands/commands/__tests__/create-selection-command-test-bed.d.ts +0 -28
- package/lib/types/commands/commands/__tests__/create-sheet-skeleton-test-bed.d.ts +0 -22
- package/lib/types/commands/commands/__tests__/hide-row-col-confirm.command.spec.d.ts +0 -16
- package/lib/types/commands/commands/__tests__/remove-row-col-confirm.command.spec.d.ts +0 -16
- package/lib/types/commands/commands/__tests__/selection-utils.spec.d.ts +0 -16
- package/lib/types/commands/commands/__tests__/set-format-painter.command.spec.d.ts +0 -16
- package/lib/types/commands/commands/__tests__/set-frozen.command.spec.d.ts +0 -16
- package/lib/types/commands/commands/__tests__/set-selections.command.spec.d.ts +0 -16
- package/lib/types/commands/commands/__tests__/sheet-skeleton.spec.d.ts +0 -16
- package/lib/types/controllers/editor/__tests__/create-test-bed.d.ts +0 -7
- package/lib/types/controllers/editor/__tests__/end-edit.controller.spec.d.ts +0 -16
- package/lib/types/controllers/editor/__tests__/mock-function.service.d.ts +0 -5
- package/lib/types/controllers/menu/__tests__/create-menu-test-bed.d.ts +0 -13
- package/lib/types/controllers/menu/__tests__/menu.spec.d.ts +0 -16
- package/lib/types/controllers/menu/__tests__/row-col.menu.spec.d.ts +0 -16
- package/lib/types/controllers/utils/__tests__/cell-tools.spec.d.ts +0 -16
- package/lib/types/facade/__tests__/create-test-bed.d.ts +0 -10
- package/lib/types/facade/__tests__/f-sheet-hooks.spec.d.ts +0 -16
- package/lib/types/services/auto-fill/__tests__/tool.spec.d.ts +0 -16
- package/lib/types/services/clipboard/__tests__/clipboard-copy-filter.spec.d.ts +0 -16
- package/lib/types/services/clipboard/__tests__/clipboard-paste-alignment.spec.d.ts +0 -16
- package/lib/types/services/clipboard/__tests__/clipboard-paste-border.spec.d.ts +0 -16
- package/lib/types/services/clipboard/__tests__/clipboard-paste-col-width.spec.d.ts +0 -16
- package/lib/types/services/clipboard/__tests__/clipboard-paste-font.spec.d.ts +0 -16
- package/lib/types/services/clipboard/__tests__/clipboard-paste-form-excel.spec.d.ts +0 -16
- package/lib/types/services/clipboard/__tests__/clipboard-paste-from-google.spec.d.ts +0 -16
- package/lib/types/services/clipboard/__tests__/clipboard-paste-from-notepad.spec.d.ts +0 -16
- package/lib/types/services/clipboard/__tests__/clipboard-paste-rotate.spec.d.ts +0 -16
- package/lib/types/services/clipboard/__tests__/clipboard-service.spec.d.ts +0 -16
- package/lib/types/services/clipboard/__tests__/clipboard-test-bed.d.ts +0 -29
- package/lib/types/services/clipboard/__tests__/constant.d.ts +0 -28
- package/lib/types/services/clipboard/__tests__/mock-clipboard.d.ts +0 -39
- package/lib/types/services/clipboard/__tests__/sheet-paste.spec.d.ts +0 -16
- package/lib/types/services/clipboard/__tests__/utils.spec.d.ts +0 -16
package/lib/es/facade.js
CHANGED
|
@@ -130,6 +130,9 @@ const _FUniverSheetsUIMixin = class _FUniverSheetsUIMixin extends FUniver {
|
|
|
130
130
|
}
|
|
131
131
|
})), this._initObserverListener(injector);
|
|
132
132
|
}
|
|
133
|
+
/**
|
|
134
|
+
* @ignore
|
|
135
|
+
*/
|
|
133
136
|
// eslint-disable-next-line max-lines-per-function
|
|
134
137
|
_initObserverListener(injector) {
|
|
135
138
|
const unitM = injector.get(IUniverInstanceService).getFocusedUnit(), unitId = unitM == null ? void 0 : unitM.getUnitId(), renderManagerService = injector.get(IRenderManagerService);
|
|
@@ -511,7 +514,7 @@ const _FUniverSheetsUIMixin = class _FUniverSheetsUIMixin extends FUniver {
|
|
|
511
514
|
return;
|
|
512
515
|
}
|
|
513
516
|
const unitId = wb == null ? void 0 : wb.getId(), renderManagerService = this._injector.get(IRenderManagerService), activeSheet = wb.getActiveSheet(), subUnitId = activeSheet.getSheetId(), render = renderManagerService.getRenderById(unitId);
|
|
514
|
-
render && ((_a = cfg.headerStyle) != null && _a.size) && (render.with(SheetSkeletonManagerService).setColumnHeaderSize(
|
|
517
|
+
render && ((_a = cfg.headerStyle) != null && _a.size) && (render.with(SheetSkeletonManagerService).setColumnHeaderSize(render, subUnitId, (_b = cfg.headerStyle) == null ? void 0 : _b.size), activeSheet == null || activeSheet.refreshCanvas()), this._getSheetRenderComponent(unitId, SHEET_VIEW_KEY.COLUMN).setCustomHeader(cfg), activeSheet == null || activeSheet.refreshCanvas();
|
|
515
518
|
}
|
|
516
519
|
customizeRowHeader(cfg) {
|
|
517
520
|
const wb = this.getActiveWorkbook();
|
|
@@ -1005,7 +1008,7 @@ const _FRangeSheetsUIMixin = class _FRangeSheetsUIMixin extends FRange {
|
|
|
1005
1008
|
*/
|
|
1006
1009
|
attachRangePopup(popup) {
|
|
1007
1010
|
var _a, _b, _c;
|
|
1008
|
-
popup.direction = (_a = popup.direction) != null ? _a : "
|
|
1011
|
+
popup.direction = (_a = popup.direction) != null ? _a : "top-center", popup.extraProps = (_b = popup.extraProps) != null ? _b : {}, popup.offset = (_c = popup.offset) != null ? _c : [0, 0];
|
|
1009
1012
|
const { key, disposableCollection } = transformComponentKey(popup, this._injector.get(ComponentManager)), disposePopup = this._injector.get(SheetCanvasPopManagerService).attachRangePopup(
|
|
1010
1013
|
this._range,
|
|
1011
1014
|
{ ...popup, componentKey: key },
|
package/lib/es/index.js
CHANGED
|
@@ -1969,23 +1969,25 @@ let SheetSkeletonManagerService = (_a = class extends Disposable {
|
|
|
1969
1969
|
this._context.unit.getStyles()
|
|
1970
1970
|
);
|
|
1971
1971
|
}
|
|
1972
|
-
setColumnHeaderSize(
|
|
1972
|
+
setColumnHeaderSize(render2, sheetId, size) {
|
|
1973
1973
|
var _a61;
|
|
1974
1974
|
const skeleton = (_a61 = this.getWorksheetSkeleton(sheetId)) == null ? void 0 : _a61.skeleton;
|
|
1975
1975
|
if (skeleton) {
|
|
1976
|
-
skeleton.columnHeaderHeight = size, render2.scene.getViewports()[0].top = size, render2.scene.getViewport(
|
|
1976
|
+
skeleton.columnHeaderHeight = size, render2.scene.getViewports()[0].top = size, render2.scene.getViewport(SHEET_VIEWPORT_KEY.VIEW_COLUMN_RIGHT).setViewportSize({
|
|
1977
1977
|
height: size
|
|
1978
|
-
}), render2.scene.getViewport(
|
|
1978
|
+
}), render2.scene.getViewport(SHEET_VIEWPORT_KEY.VIEW_COLUMN_LEFT).setViewportSize({
|
|
1979
1979
|
height: size
|
|
1980
|
-
}), render2.scene.getViewport(
|
|
1980
|
+
}), render2.scene.getViewport(SHEET_VIEWPORT_KEY.VIEW_ROW_BOTTOM).setViewportSize({
|
|
1981
1981
|
top: size
|
|
1982
|
-
}), render2.scene.getViewport(
|
|
1982
|
+
}), render2.scene.getViewport(SHEET_VIEWPORT_KEY.VIEW_ROW_TOP).setViewportSize({
|
|
1983
1983
|
top: size
|
|
1984
|
-
}), render2.scene.getViewport(
|
|
1984
|
+
}), render2.scene.getViewport(SHEET_VIEWPORT_KEY.VIEW_LEFT_TOP).setViewportSize({
|
|
1985
1985
|
height: size
|
|
1986
1986
|
});
|
|
1987
1987
|
const selectionService = render2 == null ? void 0 : render2.with(SheetsSelectionsService), selectionRenderService = render2 == null ? void 0 : render2.with(ISheetSelectionRenderService), currSelections = selectionService.getCurrentSelections();
|
|
1988
1988
|
selectionRenderService.resetSelectionsByModelData(currSelections);
|
|
1989
|
+
const sheetSkeletonManagerParam = this.getUnitSkeleton(render2.unitId, sheetId);
|
|
1990
|
+
this._currentSkeleton$.next(sheetSkeletonManagerParam);
|
|
1989
1991
|
}
|
|
1990
1992
|
}
|
|
1991
1993
|
}, __name(_a, "SheetSkeletonManagerService"), _a);
|
|
@@ -7303,10 +7305,23 @@ const getRepeatRange = /* @__PURE__ */ __name((sourceRange, targetRange, isStric
|
|
|
7303
7305
|
}
|
|
7304
7306
|
return repeatList;
|
|
7305
7307
|
}, "getRepeatRange");
|
|
7306
|
-
|
|
7307
|
-
return html ?
|
|
7308
|
-
|
|
7309
|
-
|
|
7308
|
+
function htmlIsFromExcel(html) {
|
|
7309
|
+
return html ? [
|
|
7310
|
+
// Excel class names
|
|
7311
|
+
/<td[^>]*class=".*?xl.*?"[^>]*>/i,
|
|
7312
|
+
// Excel namespace
|
|
7313
|
+
/xmlns:x="urn:schemas-microsoft-com:office:excel"/i,
|
|
7314
|
+
// Excel ProgID
|
|
7315
|
+
/ProgId="Excel.Sheet"/i,
|
|
7316
|
+
// Office specific namespace
|
|
7317
|
+
/xmlns:o="urn:schemas-microsoft-com:office:office"/i,
|
|
7318
|
+
// Excel specific style markers
|
|
7319
|
+
/@mso-|mso-excel/i,
|
|
7320
|
+
// Excel workbook metadata
|
|
7321
|
+
/<x:ExcelWorkbook>/i
|
|
7322
|
+
].some((marker) => marker.test(html)) : !1;
|
|
7323
|
+
}
|
|
7324
|
+
__name(htmlIsFromExcel, "htmlIsFromExcel");
|
|
7310
7325
|
function mergeCellValues(...cellValues) {
|
|
7311
7326
|
if (cellValues.length === 1)
|
|
7312
7327
|
return cellValues[0];
|
|
@@ -7465,8 +7480,8 @@ let SheetClipboardService = (_a15 = class extends Disposable {
|
|
|
7465
7480
|
return this.copy(COPY_TYPE.CUT);
|
|
7466
7481
|
}
|
|
7467
7482
|
async paste(item, pasteType = PREDEFINED_HOOK_NAME.DEFAULT_PASTE) {
|
|
7468
|
-
const types = item.types, text = types.indexOf(PLAIN_TEXT_CLIPBOARD_MIME_TYPE) !== -1 ? await item.getType(PLAIN_TEXT_CLIPBOARD_MIME_TYPE).then((blob) => blob && blob.text()) : "", html = types.indexOf(HTML_CLIPBOARD_MIME_TYPE) !== -1 ? await item.getType(HTML_CLIPBOARD_MIME_TYPE).then((blob) => blob && blob.text()) : "", imageIndex = types.findIndex((type) => imageMimeTypeSet.has(type));
|
|
7469
|
-
if (imageIndex !== -1) {
|
|
7483
|
+
const types = item.types, text = types.indexOf(PLAIN_TEXT_CLIPBOARD_MIME_TYPE) !== -1 ? await item.getType(PLAIN_TEXT_CLIPBOARD_MIME_TYPE).then((blob) => blob && blob.text()) : "", html = types.indexOf(HTML_CLIPBOARD_MIME_TYPE) !== -1 ? await item.getType(HTML_CLIPBOARD_MIME_TYPE).then((blob) => blob && blob.text()) : "", isFromExcel = htmlIsFromExcel(html), imageIndex = types.findIndex((type) => imageMimeTypeSet.has(type));
|
|
7484
|
+
if (imageIndex !== -1 && !isFromExcel) {
|
|
7470
7485
|
const imageMimeType = types[imageIndex], imageBlob = await item.getType(imageMimeType);
|
|
7471
7486
|
if (imageBlob) {
|
|
7472
7487
|
const file = new File(
|
|
@@ -7477,14 +7492,15 @@ let SheetClipboardService = (_a15 = class extends Disposable {
|
|
|
7477
7492
|
return this._pasteFiles([file], pasteType);
|
|
7478
7493
|
}
|
|
7479
7494
|
}
|
|
7480
|
-
return html ? (this._platformService.isWindows &&
|
|
7495
|
+
return html ? (this._platformService.isWindows && isFromExcel && this._notificationService.show({
|
|
7481
7496
|
type: "warning",
|
|
7482
7497
|
title: this._localeService.t("clipboard.shortCutNotify.title"),
|
|
7483
7498
|
content: this._localeService.t("clipboard.shortCutNotify.useShortCutInstead")
|
|
7484
7499
|
}), this._pasteHTML(html, pasteType)) : text ? this._pastePlainText(text, pasteType) : (this._logService.error("[SheetClipboardService]", "No valid data on clipboard"), !1);
|
|
7485
7500
|
}
|
|
7486
|
-
legacyPaste(html, text, files) {
|
|
7487
|
-
|
|
7501
|
+
async legacyPaste(html, text, files) {
|
|
7502
|
+
const isFromExcel = htmlIsFromExcel(html != null ? html : "");
|
|
7503
|
+
return files && !isFromExcel ? this._pasteFiles(files, PREDEFINED_HOOK_NAME.DEFAULT_PASTE) : html ? this._pasteHTML(html, PREDEFINED_HOOK_NAME.DEFAULT_PASTE) : text ? /[\n\t]/.test(text) ? this._pasteHTML(convertTextToTable(text), PREDEFINED_HOOK_NAME.DEFAULT_PASTE) : this._pastePlainText(text, PREDEFINED_HOOK_NAME.DEFAULT_PASTE) : this._pasteUnrecognized();
|
|
7488
7504
|
}
|
|
7489
7505
|
rePasteWithPasteType(type) {
|
|
7490
7506
|
const pasteOptionsCache = this._pasteOptionsCache$.getValue();
|
|
@@ -11236,6 +11252,14 @@ let SheetRenderController = (_a21 = class extends RxDisposable {
|
|
|
11236
11252
|
width: rowHeaderWidth,
|
|
11237
11253
|
height: columnHeaderHeight
|
|
11238
11254
|
});
|
|
11255
|
+
const rowFreezeHeaderRect = this._context.scene.getObject(FREEZE_ROW_HEADER_NAME);
|
|
11256
|
+
rowFreezeHeaderRect && rowFreezeHeaderRect.transformByState({
|
|
11257
|
+
top: columnHeaderHeight - rowFreezeHeaderRect.height
|
|
11258
|
+
});
|
|
11259
|
+
const colFreezeHeaderRect = this._context.scene.getObject(FREEZE_COLUMN_HEADER_NAME);
|
|
11260
|
+
colFreezeHeaderRect && colFreezeHeaderRect.transformByState({
|
|
11261
|
+
height: columnHeaderHeight
|
|
11262
|
+
});
|
|
11239
11263
|
}));
|
|
11240
11264
|
}
|
|
11241
11265
|
_initCommandListener() {
|
|
@@ -11903,38 +11927,38 @@ const AddWorksheetMergeCommand = {
|
|
|
11903
11927
|
}) ? commandService.executeCommand(InsertRangeMoveRightCommand.id) : !0 : commandService.executeCommand(InsertRangeMoveRightCommand.id);
|
|
11904
11928
|
}, "handler")
|
|
11905
11929
|
};
|
|
11906
|
-
var _ = /* @__PURE__ */ ((E) => (E[E.UNIVER_UNKNOWN = 0] = "UNIVER_UNKNOWN", E[E.UNIVER_DOC = 1] = "UNIVER_DOC", E[E.UNIVER_SHEET = 2] = "UNIVER_SHEET", E[E.UNIVER_SLIDE = 3] = "UNIVER_SLIDE", E[E.UNIVER_PROJECT = 4] = "UNIVER_PROJECT", E[E.UNRECOGNIZED = -1] = "UNRECOGNIZED", E))(_ || {}),
|
|
11930
|
+
var _ = /* @__PURE__ */ ((E) => (E[E.UNIVER_UNKNOWN = 0] = "UNIVER_UNKNOWN", E[E.UNIVER_DOC = 1] = "UNIVER_DOC", E[E.UNIVER_SHEET = 2] = "UNIVER_SHEET", E[E.UNIVER_SLIDE = 3] = "UNIVER_SLIDE", E[E.UNIVER_PROJECT = 4] = "UNIVER_PROJECT", E[E.UNRECOGNIZED = -1] = "UNRECOGNIZED", E))(_ || {}), D = /* @__PURE__ */ ((E) => (E[E.View = 0] = "View", E[E.Edit = 1] = "Edit", E[E.ManageCollaborator = 2] = "ManageCollaborator", E[E.Print = 3] = "Print", E[E.Duplicate = 4] = "Duplicate", E[E.Comment = 5] = "Comment", E[E.Copy = 6] = "Copy", E[E.Share = 7] = "Share", E[E.Export = 8] = "Export", E[E.MoveWorksheet = 9] = "MoveWorksheet", E[E.DeleteWorksheet = 10] = "DeleteWorksheet", E[E.HideWorksheet = 11] = "HideWorksheet", E[E.RenameWorksheet = 12] = "RenameWorksheet", E[E.CreateWorksheet = 13] = "CreateWorksheet", E[E.SetWorksheetStyle = 14] = "SetWorksheetStyle", E[E.EditWorksheetCell = 15] = "EditWorksheetCell", E[E.InsertHyperlink = 16] = "InsertHyperlink", E[E.Sort = 17] = "Sort", E[E.Filter = 18] = "Filter", E[E.PivotTable = 19] = "PivotTable", E[E.FloatImg = 20] = "FloatImg", E[E.History = 21] = "History", E[E.RwHgtClWdt = 22] = "RwHgtClWdt", E[E.ViemRwHgtClWdt = 23] = "ViemRwHgtClWdt", E[E.ViewFilter = 24] = "ViewFilter", E[E.MoveSheet = 25] = "MoveSheet", E[E.DeleteSheet = 26] = "DeleteSheet", E[E.HideSheet = 27] = "HideSheet", E[E.CopySheet = 28] = "CopySheet", E[E.RenameSheet = 29] = "RenameSheet", E[E.CreateSheet = 30] = "CreateSheet", E[E.SelectProtectedCells = 31] = "SelectProtectedCells", E[E.SelectUnProtectedCells = 32] = "SelectUnProtectedCells", E[E.SetCellStyle = 33] = "SetCellStyle", E[E.SetCellValue = 34] = "SetCellValue", E[E.SetRowStyle = 35] = "SetRowStyle", E[E.SetColumnStyle = 36] = "SetColumnStyle", E[E.InsertRow = 37] = "InsertRow", E[E.InsertColumn = 38] = "InsertColumn", E[E.DeleteRow = 39] = "DeleteRow", E[E.DeleteColumn = 40] = "DeleteColumn", E[E.EditExtraObject = 41] = "EditExtraObject", E[E.Delete = 42] = "Delete", E[E.RecoverHistory = 43] = "RecoverHistory", E[E.ViewHistory = 44] = "ViewHistory", E[E.CreatePermissionObject = 45] = "CreatePermissionObject", E[E.UNRECOGNIZED = -1] = "UNRECOGNIZED", E))(D || {}), S = /* @__PURE__ */ ((E) => (E[E.Reader = 0] = "Reader", E[E.Editor = 1] = "Editor", E[E.Owner = 2] = "Owner", E[E.UNRECOGNIZED = -1] = "UNRECOGNIZED", E))(S || {}), L = /* @__PURE__ */ ((E) => (E[E.Unkonwn = 0] = "Unkonwn", E[E.Workbook = 1] = "Workbook", E[E.Worksheet = 2] = "Worksheet", E[E.SelectRange = 3] = "SelectRange", E[E.Document = 4] = "Document", E[E.Slide = 5] = "Slide", E[E.UNRECOGNIZED = -1] = "UNRECOGNIZED", E))(L || {}), M = /* @__PURE__ */ ((E) => (E[E.SomeCollaborator = 0] = "SomeCollaborator", E[E.AllCollaborator = 1] = "AllCollaborator", E[E.OneSelf = 2] = "OneSelf", E[E.UNRECOGNIZED = -1] = "UNRECOGNIZED", E))(M || {});
|
|
11907
11931
|
const UNIVER_SHEET_PERMISSION_PANEL = "UNIVER_SHEET_PERMISSION_PANEL", UNIVER_SHEET_PERMISSION_USER_PART = "UNIVER_SHEET_PERMISSION_USER_PART", UNIVER_SHEET_PERMISSION_BACKGROUND = "UNIVER_SHEET_PERMISSION_BACKGROUND", UNIVER_SHEET_PERMISSION_USER_DIALOG = "UNIVER_SHEET_PERMISSION_USER_DIALOG", UNIVER_SHEET_PERMISSION_DIALOG = "UNIVER_SHEET_PERMISSION_DIALOG", UNIVER_SHEET_PERMISSION_USER_DIALOG_ID = "UNIVER_SHEET_PERMISSION_USER_DIALOG_ID", UNIVER_SHEET_PERMISSION_DIALOG_ID = "UNIVER_SHEET_PERMISSION_DIALOG_ID", subUnitPermissionTypeMap = {
|
|
11908
|
-
[
|
|
11909
|
-
[
|
|
11910
|
-
[
|
|
11911
|
-
[
|
|
11912
|
-
[
|
|
11913
|
-
[
|
|
11914
|
-
[
|
|
11915
|
-
[
|
|
11916
|
-
[
|
|
11917
|
-
[
|
|
11918
|
-
[
|
|
11919
|
-
[
|
|
11920
|
-
[
|
|
11921
|
-
[
|
|
11932
|
+
[D.Copy]: "Copy",
|
|
11933
|
+
[D.SetCellStyle]: "SetCellStyle",
|
|
11934
|
+
[D.SetCellValue]: "SetCellValue",
|
|
11935
|
+
[D.SetRowStyle]: "SetRowStyle",
|
|
11936
|
+
[D.SetColumnStyle]: "SetColumnStyle",
|
|
11937
|
+
[D.InsertRow]: "InsertRow",
|
|
11938
|
+
[D.InsertColumn]: "InsertColumn",
|
|
11939
|
+
[D.InsertHyperlink]: "InsertHyperlink",
|
|
11940
|
+
[D.DeleteRow]: "DeleteRow",
|
|
11941
|
+
[D.DeleteColumn]: "DeleteColumn",
|
|
11942
|
+
[D.Sort]: "Sort",
|
|
11943
|
+
[D.Filter]: "Filter",
|
|
11944
|
+
[D.PivotTable]: "PivotTable",
|
|
11945
|
+
[D.EditExtraObject]: "EditExtraObject"
|
|
11922
11946
|
}, defaultWorksheetUnitActionList = [
|
|
11923
|
-
|
|
11924
|
-
|
|
11925
|
-
|
|
11926
|
-
|
|
11927
|
-
|
|
11928
|
-
|
|
11929
|
-
|
|
11930
|
-
|
|
11931
|
-
|
|
11932
|
-
|
|
11933
|
-
|
|
11934
|
-
|
|
11935
|
-
|
|
11936
|
-
|
|
11937
|
-
|
|
11947
|
+
D.Copy,
|
|
11948
|
+
D.SetCellStyle,
|
|
11949
|
+
D.SetCellValue,
|
|
11950
|
+
D.SetRowStyle,
|
|
11951
|
+
D.SetColumnStyle,
|
|
11952
|
+
D.InsertRow,
|
|
11953
|
+
D.InsertColumn,
|
|
11954
|
+
D.InsertHyperlink,
|
|
11955
|
+
D.DeleteRow,
|
|
11956
|
+
D.DeleteColumn,
|
|
11957
|
+
D.Sort,
|
|
11958
|
+
D.Filter,
|
|
11959
|
+
D.PivotTable,
|
|
11960
|
+
D.EditExtraObject,
|
|
11961
|
+
D.View
|
|
11938
11962
|
], permissionMenuIconKey = "sheet-permission-menu-icon", permissionDeleteIconKey = "sheet-permission-delete-icon", permissionEditIconKey = "sheet-permission-edit-icon", permissionCheckIconKey = "sheet-permission-check-icon", permissionLockIconKey = "sheet-permission-lock-icon", DEFAULT_RANGE_RULE = {
|
|
11939
11963
|
unitId: "",
|
|
11940
11964
|
subUnitId: "",
|
|
@@ -14896,8 +14920,10 @@ const SINGLE_MODE_WIDTH = 800, ROW_COUNT_THRESHOLD = 3, StatusBar = /* @__PURE__
|
|
|
14896
14920
|
);
|
|
14897
14921
|
}, "StatusBar");
|
|
14898
14922
|
function RenderSheetFooter() {
|
|
14899
|
-
const menuManagerService = useDependency(IMenuManagerService)
|
|
14900
|
-
|
|
14923
|
+
const menuManagerService = useDependency(IMenuManagerService);
|
|
14924
|
+
if (!useActiveWorkbook()) return null;
|
|
14925
|
+
const footerMenus = menuManagerService.getMenuByPositionKey(ContextMenuPosition.FOOTER_MENU);
|
|
14926
|
+
return /* @__PURE__ */ jsxs("section", { className: styles$l.sheetContainer, "data-range-selector": !0, children: [
|
|
14901
14927
|
/* @__PURE__ */ jsx(SheetBar, {}),
|
|
14902
14928
|
/* @__PURE__ */ jsx(StatusBar, {}),
|
|
14903
14929
|
footerMenus.map((item) => {
|
|
@@ -14914,7 +14940,7 @@ function RenderSheetFooter() {
|
|
|
14914
14940
|
));
|
|
14915
14941
|
}),
|
|
14916
14942
|
/* @__PURE__ */ jsx(CountBar, {})
|
|
14917
|
-
] })
|
|
14943
|
+
] });
|
|
14918
14944
|
}
|
|
14919
14945
|
__name(RenderSheetFooter, "RenderSheetFooter");
|
|
14920
14946
|
function RenderSheetHeader() {
|
|
@@ -19628,7 +19654,7 @@ let SheetPermissionCheckUIController = (_a36 = class extends Disposable {
|
|
|
19628
19654
|
for (let row = range.startRow; row <= range.endRow; row++)
|
|
19629
19655
|
for (let col = range.startColumn; col <= range.endColumn; col++) {
|
|
19630
19656
|
const permission = (_b = (_a61 = worksheet.getCell(row, col)) == null ? void 0 : _a61.selectionProtection) == null ? void 0 : _b[0];
|
|
19631
|
-
if ((permission == null ? void 0 : permission[
|
|
19657
|
+
if ((permission == null ? void 0 : permission[D.Edit]) === !1)
|
|
19632
19658
|
return !0;
|
|
19633
19659
|
}
|
|
19634
19660
|
return !1;
|
|
@@ -19674,11 +19700,11 @@ let SheetPermissionInterceptorCanvasRenderController = (_a37 = class extends RxD
|
|
|
19674
19700
|
return defaultValue;
|
|
19675
19701
|
if (selectionRange.rangeType === RANGE_TYPE.ROW) {
|
|
19676
19702
|
for (let i = selectionRange.startRow; i <= selectionRange.endRow; i++)
|
|
19677
|
-
if (this._rangeProtectionCache.getRowPermissionInfo(unitId, subUnitId, i, [
|
|
19703
|
+
if (this._rangeProtectionCache.getRowPermissionInfo(unitId, subUnitId, i, [D.Edit]) === !1)
|
|
19678
19704
|
return !1;
|
|
19679
19705
|
} else
|
|
19680
19706
|
for (let i = selectionRange.startColumn; i <= selectionRange.endColumn; i++)
|
|
19681
|
-
if (this._rangeProtectionCache.getColPermissionInfo(unitId, subUnitId, i, [
|
|
19707
|
+
if (this._rangeProtectionCache.getColPermissionInfo(unitId, subUnitId, i, [D.Edit]) === !1)
|
|
19682
19708
|
return !1;
|
|
19683
19709
|
return !0;
|
|
19684
19710
|
}, "handler")
|
|
@@ -19730,7 +19756,7 @@ let SheetPermissionInterceptorCanvasRenderController = (_a37 = class extends RxD
|
|
|
19730
19756
|
for (let row = startRow; row <= endRow; row++)
|
|
19731
19757
|
for (let col = startColumn; col <= endColumn; col++) {
|
|
19732
19758
|
const permission = (_c = (_b = worksheet.getCell(row, col)) == null ? void 0 : _b.selectionProtection) == null ? void 0 : _c[0];
|
|
19733
|
-
if ((permission == null ? void 0 : permission[
|
|
19759
|
+
if ((permission == null ? void 0 : permission[D.Edit]) === !1 || (permission == null ? void 0 : permission[D.View]) === !1)
|
|
19734
19760
|
return !1;
|
|
19735
19761
|
}
|
|
19736
19762
|
return !0;
|
|
@@ -19756,7 +19782,7 @@ let SheetPermissionInterceptorCanvasRenderController = (_a37 = class extends RxD
|
|
|
19756
19782
|
for (let row = startRow; row <= endRow; row++)
|
|
19757
19783
|
for (let col = startColumn; col <= endColumn; col++) {
|
|
19758
19784
|
const permission = (_b = (_a62 = worksheet.getCell(row, col)) == null ? void 0 : _a62.selectionProtection) == null ? void 0 : _b[0];
|
|
19759
|
-
if ((permission == null ? void 0 : permission[
|
|
19785
|
+
if ((permission == null ? void 0 : permission[D.Edit]) === !1)
|
|
19760
19786
|
return !0;
|
|
19761
19787
|
}
|
|
19762
19788
|
return !1;
|
|
@@ -19823,7 +19849,7 @@ let SheetPermissionInterceptorClipboardController = (_a38 = class extends Dispos
|
|
|
19823
19849
|
for (let row = startRow; row <= endRow; row++)
|
|
19824
19850
|
for (let col = startColumn; col <= endColumn; col++) {
|
|
19825
19851
|
const permission = (_c = (_b = worksheet.getCell(row, col)) == null ? void 0 : _b.selectionProtection) == null ? void 0 : _c[0];
|
|
19826
|
-
if ((permission == null ? void 0 : permission[
|
|
19852
|
+
if ((permission == null ? void 0 : permission[D.Edit]) === !1) {
|
|
19827
19853
|
hasPermission = !1;
|
|
19828
19854
|
break;
|
|
19829
19855
|
}
|
|
@@ -20064,7 +20090,7 @@ let SheetPermissionInterceptorFormulaRenderController = (_a40 = class extends Rx
|
|
|
20064
20090
|
if (((_a62 = worksheet.getCellRaw(rowIndex + startRow, colIndex + startCol)) == null ? void 0 : _a62.v) === void 0)
|
|
20065
20091
|
return;
|
|
20066
20092
|
const permission = this._rangeProtectionCache.getCellInfo(unitId, subUnitId, rowIndex + startRow, colIndex + startCol);
|
|
20067
|
-
(permission == null ? void 0 : permission[
|
|
20093
|
+
(permission == null ? void 0 : permission[D.View]) === !1 && (itemValue[rowIndex][colIndex] = NullValueObject.create());
|
|
20068
20094
|
});
|
|
20069
20095
|
});
|
|
20070
20096
|
}), originValue;
|
|
@@ -20214,7 +20240,7 @@ const checkRangeValid = /* @__PURE__ */ __name((injector, permissionRanges, perm
|
|
|
20214
20240
|
collaborators,
|
|
20215
20241
|
unitID: activeRule.unitId,
|
|
20216
20242
|
name: "",
|
|
20217
|
-
strategies: [{ role: S.Editor, action:
|
|
20243
|
+
strategies: [{ role: S.Editor, action: D.Edit }, { role: S.Reader, action: D.View }],
|
|
20218
20244
|
scope: scopeObj
|
|
20219
20245
|
},
|
|
20220
20246
|
objectType: UnitObject.Worksheet
|
|
@@ -20240,7 +20266,7 @@ const checkRangeValid = /* @__PURE__ */ __name((injector, permissionRanges, perm
|
|
|
20240
20266
|
collaborators,
|
|
20241
20267
|
unitID: activeRule.unitId,
|
|
20242
20268
|
name: "",
|
|
20243
|
-
strategies: [{ role: S.Editor, action:
|
|
20269
|
+
strategies: [{ role: S.Editor, action: D.Edit }, { role: S.Reader, action: D.View }],
|
|
20244
20270
|
scope: scopeObj
|
|
20245
20271
|
},
|
|
20246
20272
|
objectType: UnitObject.Worksheet
|
|
@@ -20521,7 +20547,7 @@ const checkRangeValid = /* @__PURE__ */ __name((injector, permissionRanges, perm
|
|
|
20521
20547
|
const rule = allRuleMap.get(item.objectID);
|
|
20522
20548
|
if (!rule)
|
|
20523
20549
|
return null;
|
|
20524
|
-
const editAction = item.actions.find((action) => action.action ===
|
|
20550
|
+
const editAction = item.actions.find((action) => action.action === D.Edit), editPermission = editAction == null ? void 0 : editAction.allowed, viewAction = item.actions.find((action) => action.action === D.View), viewPermission = viewAction == null ? void 0 : viewAction.allowed, manageCollaboratorAction = item.actions.find((action) => action.action === D.ManageCollaborator), deleteAction = item.actions.find((action) => action.action === D.Delete), hasManagerPermission = (manageCollaboratorAction == null ? void 0 : manageCollaboratorAction.allowed) || currentUser.userID === ((_a62 = item.creator) == null ? void 0 : _a62.userID), hasDeletePermission = (deleteAction == null ? void 0 : deleteAction.allowed) || currentUser.userID === ((_b = item.creator) == null ? void 0 : _b.userID);
|
|
20525
20551
|
let ruleName = "";
|
|
20526
20552
|
const targetSheet = workbook.getSheetBySheetId(rule.subUnitId), targetName = targetSheet == null ? void 0 : targetSheet.getName();
|
|
20527
20553
|
if (rule.unitType === L.SelectRange) {
|
|
@@ -20894,7 +20920,7 @@ const _RangeProtectionCanViewRenderExtension = class _RangeProtectionCanViewRend
|
|
|
20894
20920
|
__publicField(this, "Z_INDEX", EXTENSION_CAN_VIEW_Z_INDEX$1);
|
|
20895
20921
|
}
|
|
20896
20922
|
shouldRender(config) {
|
|
20897
|
-
return (config == null ? void 0 : config[
|
|
20923
|
+
return (config == null ? void 0 : config[D.View]) !== !1;
|
|
20898
20924
|
}
|
|
20899
20925
|
};
|
|
20900
20926
|
__name(_RangeProtectionCanViewRenderExtension, "RangeProtectionCanViewRenderExtension");
|
|
@@ -20906,7 +20932,7 @@ const _RangeProtectionCanNotViewRenderExtension = class _RangeProtectionCanNotVi
|
|
|
20906
20932
|
__publicField(this, "Z_INDEX", EXTENSION_CAN_NOT_VIEW_Z_INDEX$1);
|
|
20907
20933
|
}
|
|
20908
20934
|
shouldRender(config) {
|
|
20909
|
-
return (config == null ? void 0 : config[
|
|
20935
|
+
return (config == null ? void 0 : config[D.View]) === !1;
|
|
20910
20936
|
}
|
|
20911
20937
|
};
|
|
20912
20938
|
__name(_RangeProtectionCanNotViewRenderExtension, "RangeProtectionCanNotViewRenderExtension");
|
|
@@ -20929,7 +20955,7 @@ const worksheetProtectionKey = "worksheet-protection", EXTENSION_CAN_VIEW_Z_INDE
|
|
|
20929
20955
|
if (this._pattern) {
|
|
20930
20956
|
if (selectionProtection.length > 0) {
|
|
20931
20957
|
const cellProtectionConfig = selectionProtection[0];
|
|
20932
|
-
(cellProtectionConfig == null ? void 0 : cellProtectionConfig[
|
|
20958
|
+
(cellProtectionConfig == null ? void 0 : cellProtectionConfig[D.View]) ? this.setZIndex(EXTENSION_CAN_VIEW_Z_INDEX) : this.setZIndex(EXTENSION_CAN_NOT_VIEW_Z_INDEX);
|
|
20933
20959
|
}
|
|
20934
20960
|
ctx.fillStyle = this._pattern, hasWorksheetRule && ctx.fillRect(start.startX, start.startY, end.endX - start.startX, end.endY - start.startY), ctx.restore();
|
|
20935
20961
|
}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import { Disposable, ICommandService, Injector, InterceptorManager, ThemeService
|
|
2
|
-
import { SheetInterceptorService, SheetsSelectionsService } from '@univerjs/sheets';
|
|
1
|
+
import { Workbook, Disposable, ICommandService, Injector, InterceptorManager, ThemeService } from '@univerjs/core';
|
|
3
2
|
import { IRenderContext, IRenderModule } from '@univerjs/engine-render';
|
|
3
|
+
import { SheetInterceptorService, SheetsSelectionsService } from '@univerjs/sheets';
|
|
4
4
|
import { SheetScrollManagerService } from '../../services/scroll-manager.service';
|
|
5
5
|
import { SheetSkeletonManagerService } from '../../services/sheet-skeleton-manager.service';
|
|
6
|
+
export declare const FREEZE_ROW_MAIN_NAME = "__SpreadsheetFreezeRowMainName__";
|
|
7
|
+
export declare const FREEZE_ROW_HEADER_NAME = "__SpreadsheetFreezeRowHeaderName__";
|
|
8
|
+
export declare const FREEZE_COLUMN_MAIN_NAME = "__SpreadsheetFreezeColumnMainName__";
|
|
9
|
+
export declare const FREEZE_COLUMN_HEADER_NAME = "__SpreadsheetFreezeColumnHeaderName__";
|
|
6
10
|
export declare const FREEZE_PERMISSION_CHECK: import('@univerjs/core').IInterceptor<boolean, null>;
|
|
7
11
|
export declare class HeaderFreezeRenderController extends Disposable implements IRenderModule {
|
|
8
12
|
private readonly _context;
|
|
@@ -126,6 +126,9 @@ export declare const CellFEventName: {
|
|
|
126
126
|
readonly SelectionMoveEnd: "SelectionMoveEnd";
|
|
127
127
|
readonly SelectionChanged: "SelectionChanged";
|
|
128
128
|
};
|
|
129
|
+
/**
|
|
130
|
+
* @ignore
|
|
131
|
+
*/
|
|
129
132
|
export interface IFSheetsUIEventNameMixin {
|
|
130
133
|
/**
|
|
131
134
|
* Trigger this event before the clipboard content changes.
|
|
@@ -159,10 +162,10 @@ export interface IFSheetsUIEventNameMixin {
|
|
|
159
162
|
* @example
|
|
160
163
|
* ```ts
|
|
161
164
|
* univerAPI.addEvent(univerAPI.Event.BeforeClipboardPaste, (param) => {
|
|
162
|
-
*
|
|
163
|
-
*
|
|
164
|
-
*
|
|
165
|
-
*
|
|
165
|
+
* const {text, html} = param;
|
|
166
|
+
* console.log('debugger', text, html);
|
|
167
|
+
* // if want to cancel the clipboard paste
|
|
168
|
+
* param.cancel = true;
|
|
166
169
|
* })
|
|
167
170
|
* ```
|
|
168
171
|
*/
|
|
@@ -173,8 +176,8 @@ export interface IFSheetsUIEventNameMixin {
|
|
|
173
176
|
* @example
|
|
174
177
|
* ```ts
|
|
175
178
|
* univerAPI.addEvent(univerAPI.Event.ClipboardPasted, (param) => {
|
|
176
|
-
*
|
|
177
|
-
*
|
|
179
|
+
* const {text, html} = param;
|
|
180
|
+
* console.log('debugger', text, html); // {text: '...', html: '...'}
|
|
178
181
|
* })
|
|
179
182
|
* ```
|
|
180
183
|
*/
|
|
@@ -185,7 +188,7 @@ export interface IFSheetsUIEventNameMixin {
|
|
|
185
188
|
* @example
|
|
186
189
|
* ```ts
|
|
187
190
|
* univerAPI.addEvent(univerAPI.Event.BeforeSheetEditStart, (params) => {
|
|
188
|
-
*
|
|
191
|
+
* const { worksheet, workbook, row, column, eventType, keycode, isZenEditor } = params;
|
|
189
192
|
* });
|
|
190
193
|
* ```
|
|
191
194
|
*/
|
|
@@ -196,7 +199,7 @@ export interface IFSheetsUIEventNameMixin {
|
|
|
196
199
|
* @example
|
|
197
200
|
* ```ts
|
|
198
201
|
* univerAPI.addEvent(univerAPI.Event.SheetEditStarted, (params) => {
|
|
199
|
-
*
|
|
202
|
+
* const { worksheet, workbook, row, column, eventType, keycode, isZenEditor } = params;
|
|
200
203
|
* });
|
|
201
204
|
* ```
|
|
202
205
|
*/
|
|
@@ -207,7 +210,7 @@ export interface IFSheetsUIEventNameMixin {
|
|
|
207
210
|
* @example
|
|
208
211
|
* ```ts
|
|
209
212
|
* univerAPI.addEvent(univerAPI.Event.SheetEditChanging, (params) => {
|
|
210
|
-
*
|
|
213
|
+
* const { worksheet, workbook, row, column, value, isZenEditor } = params;
|
|
211
214
|
* });
|
|
212
215
|
* ```
|
|
213
216
|
*/
|
|
@@ -218,7 +221,7 @@ export interface IFSheetsUIEventNameMixin {
|
|
|
218
221
|
* @example
|
|
219
222
|
* ```ts
|
|
220
223
|
* univerAPI.addEvent(univerAPI.Event.BeforeSheetEditEnd, (params) => {
|
|
221
|
-
*
|
|
224
|
+
* const { worksheet, workbook, row, column, value, eventType, keycode, isZenEditor } = params;
|
|
222
225
|
* });
|
|
223
226
|
* ```
|
|
224
227
|
*/
|
|
@@ -229,7 +232,7 @@ export interface IFSheetsUIEventNameMixin {
|
|
|
229
232
|
* @example
|
|
230
233
|
* ```ts
|
|
231
234
|
* univerAPI.addEvent(univerAPI.Event.SheetEditEnded, (params) => {
|
|
232
|
-
*
|
|
235
|
+
* const { worksheet, workbook, row, column, eventType, keycode, isZenEditor } = params;
|
|
233
236
|
* });
|
|
234
237
|
* ```
|
|
235
238
|
*/
|
|
@@ -239,7 +242,7 @@ export interface IFSheetsUIEventNameMixin {
|
|
|
239
242
|
* @see {@link ICellEventParam}
|
|
240
243
|
* @example
|
|
241
244
|
* ```ts
|
|
242
|
-
* univerAPI.addEvent(univerAPI.Event.CellClicked, (params)=> {
|
|
245
|
+
* univerAPI.addEvent(univerAPI.Event.CellClicked, (params) => {
|
|
243
246
|
* const { worksheet, workbook, row, column, value, isZenEditor } = params;
|
|
244
247
|
* });
|
|
245
248
|
* ```
|
|
@@ -250,8 +253,8 @@ export interface IFSheetsUIEventNameMixin {
|
|
|
250
253
|
* @see {@link ICellEventParam}
|
|
251
254
|
* @example
|
|
252
255
|
* ```ts
|
|
253
|
-
* univerAPI.addEvent(univerAPI.Event.CellPointerDown, (params)=> {
|
|
254
|
-
*
|
|
256
|
+
* univerAPI.addEvent(univerAPI.Event.CellPointerDown, (params) => {
|
|
257
|
+
* const { worksheet, workbook, row, column } = params;
|
|
255
258
|
* });
|
|
256
259
|
* ```
|
|
257
260
|
*/
|
|
@@ -261,8 +264,8 @@ export interface IFSheetsUIEventNameMixin {
|
|
|
261
264
|
* @see {@link ICellEventParam}
|
|
262
265
|
* @example
|
|
263
266
|
* ```ts
|
|
264
|
-
* univerAPI.addEvent(univerAPI.Event.CellPointerUp, (params)=> {
|
|
265
|
-
*
|
|
267
|
+
* univerAPI.addEvent(univerAPI.Event.CellPointerUp, (params) => {
|
|
268
|
+
* const { worksheet, workbook, row, column } = params;
|
|
266
269
|
* });
|
|
267
270
|
* ```
|
|
268
271
|
*/
|
|
@@ -272,8 +275,8 @@ export interface IFSheetsUIEventNameMixin {
|
|
|
272
275
|
* @see {@link ICellEventParam}
|
|
273
276
|
* @example
|
|
274
277
|
* ```ts
|
|
275
|
-
* univerAPI.addEvent(univerAPI.Event.CellHover, (params)=> {
|
|
276
|
-
*
|
|
278
|
+
* univerAPI.addEvent(univerAPI.Event.CellHover, (params) => {
|
|
279
|
+
* const { worksheet, workbook, row, column } = params;
|
|
277
280
|
* });
|
|
278
281
|
* ```
|
|
279
282
|
*/
|
|
@@ -283,8 +286,8 @@ export interface IFSheetsUIEventNameMixin {
|
|
|
283
286
|
* @see {@link ICellEventParam}
|
|
284
287
|
* @example
|
|
285
288
|
* ```ts
|
|
286
|
-
* univerAPI.addEvent(univerAPI.Event.CellPointerMove, (params)=> {
|
|
287
|
-
*
|
|
289
|
+
* univerAPI.addEvent(univerAPI.Event.CellPointerMove, (params) => {
|
|
290
|
+
* const { worksheet, workbook, row, column } = params;
|
|
288
291
|
* });
|
|
289
292
|
* ```
|
|
290
293
|
*/
|
|
@@ -382,8 +385,8 @@ export interface IFSheetsUIEventNameMixin {
|
|
|
382
385
|
* @see {@link ICellEventParam}
|
|
383
386
|
* @example
|
|
384
387
|
* ```ts
|
|
385
|
-
* univerAPI.getActiveWorkbook().addEvent(univerAPI.Event.DragOver, (params)=> {
|
|
386
|
-
*
|
|
388
|
+
* univerAPI.getActiveWorkbook().addEvent(univerAPI.Event.DragOver, (params) => {
|
|
389
|
+
* const { worksheet, workbook, row, column } = params;
|
|
387
390
|
* });
|
|
388
391
|
* ```
|
|
389
392
|
*/
|
|
@@ -393,7 +396,7 @@ export interface IFSheetsUIEventNameMixin {
|
|
|
393
396
|
* @see {@link ICellEventParam}
|
|
394
397
|
* @example
|
|
395
398
|
* ```ts
|
|
396
|
-
* univerAPI.getActiveWorkbook().addEvent(univerAPI.Event.Drop, (params)=> {
|
|
399
|
+
* univerAPI.getActiveWorkbook().addEvent(univerAPI.Event.Drop, (params) => {
|
|
397
400
|
* const { worksheet, workbook, row, column } = params;
|
|
398
401
|
* });
|
|
399
402
|
* ```
|
|
@@ -404,8 +407,8 @@ export interface IFSheetsUIEventNameMixin {
|
|
|
404
407
|
* @see {@link IScrollEventParam}
|
|
405
408
|
* @example
|
|
406
409
|
* ```ts
|
|
407
|
-
* univerAPI.addEvent(univerAPI.Event.Scroll, (params)=> {
|
|
408
|
-
*
|
|
410
|
+
* univerAPI.addEvent(univerAPI.Event.Scroll, (params) => {
|
|
411
|
+
* const { worksheet, workbook, scrollX, scrollY } = params;
|
|
409
412
|
* });
|
|
410
413
|
* ```
|
|
411
414
|
*/
|
|
@@ -416,7 +419,7 @@ export interface IFSheetsUIEventNameMixin {
|
|
|
416
419
|
* @example
|
|
417
420
|
* ```ts
|
|
418
421
|
* univerAPI.addEvent(univerAPI.Event.SelectionChanged, (p)=> {
|
|
419
|
-
*
|
|
422
|
+
* const { worksheet, workbook, selections } = p;
|
|
420
423
|
* });
|
|
421
424
|
* ```
|
|
422
425
|
*/
|
|
@@ -427,7 +430,7 @@ export interface IFSheetsUIEventNameMixin {
|
|
|
427
430
|
* @example
|
|
428
431
|
* ```ts
|
|
429
432
|
* univerAPI.addEvent(univerAPI.Event.SelectionMoveStart, (p)=> {
|
|
430
|
-
*
|
|
433
|
+
* const { worksheet, workbook, selections } = p;
|
|
431
434
|
* });
|
|
432
435
|
* ```
|
|
433
436
|
*/
|
|
@@ -438,7 +441,7 @@ export interface IFSheetsUIEventNameMixin {
|
|
|
438
441
|
* @example
|
|
439
442
|
* ```ts
|
|
440
443
|
* univerAPI.addEvent(univerAPI.Event.SelectionMoving, (p)=> {
|
|
441
|
-
*
|
|
444
|
+
* const { worksheet, workbook, selections } = p;
|
|
442
445
|
* });
|
|
443
446
|
* ```
|
|
444
447
|
*/
|
|
@@ -449,7 +452,7 @@ export interface IFSheetsUIEventNameMixin {
|
|
|
449
452
|
* @example
|
|
450
453
|
* ```ts
|
|
451
454
|
* univerAPI.addEvent(univerAPI.Event.SelectionMoveEnd, (p)=> {
|
|
452
|
-
*
|
|
455
|
+
* const { worksheet, workbook, selections } = p;
|
|
453
456
|
* });
|
|
454
457
|
* ```
|
|
455
458
|
*/
|
|
@@ -460,7 +463,7 @@ export interface IFSheetsUIEventNameMixin {
|
|
|
460
463
|
* @example
|
|
461
464
|
* ```ts
|
|
462
465
|
* univerAPI.addEvent(univerAPI.Event.SheetZoomChanged, (p)=> {
|
|
463
|
-
*
|
|
466
|
+
* const { worksheet, workbook, zoom } = p;
|
|
464
467
|
* });
|
|
465
468
|
* ```
|
|
466
469
|
*/
|
|
@@ -471,7 +474,7 @@ export interface IFSheetsUIEventNameMixin {
|
|
|
471
474
|
* @example
|
|
472
475
|
* ```ts
|
|
473
476
|
* univerAPI.addEvent(univerAPI.Event.BeforeSheetZoomChange, (p)=> {
|
|
474
|
-
*
|
|
477
|
+
* const { worksheet, workbook, zoom } = p;
|
|
475
478
|
* });
|
|
476
479
|
* ```
|
|
477
480
|
*/
|
|
@@ -482,7 +485,7 @@ export interface IFSheetsUIEventNameMixin {
|
|
|
482
485
|
* @example
|
|
483
486
|
* ```ts
|
|
484
487
|
* univerAPI.addEvent(univerAPI.Event.SheetSkeletonChanged, (p)=> {
|
|
485
|
-
*
|
|
488
|
+
* const { worksheet, workbook } = p;
|
|
486
489
|
* });
|
|
487
490
|
* ```
|
|
488
491
|
*/
|
|
@@ -520,6 +523,9 @@ export declare class FSheetsUIEventName extends FEventName implements IFSheetsUI
|
|
|
520
523
|
get ColumnHeaderHover(): 'ColumnHeaderHover';
|
|
521
524
|
get SheetSkeletonChanged(): 'SheetSkeletonChanged';
|
|
522
525
|
}
|
|
526
|
+
/**
|
|
527
|
+
* @ignore
|
|
528
|
+
*/
|
|
523
529
|
export interface ISheetUIEventBase extends IEventBase {
|
|
524
530
|
/**
|
|
525
531
|
* The workbook instance currently being operated on. {@link FWorkbook}
|