Build your own AI office with Univer Office SDK. Bring editing, calculation, collaboration, and file processing into your product for people and AI agents. Built on an extensible open-source core.
TypeScript boardcollaborationdocdocxexceloffce365officepdfpptpptxpresentationsdksheetslidesspreadsheetuniverwordwordprocessorworkspacexlsx
fix(sheets-ui): fix context menu insert control (#5639)
ybzkye01886440713
diff --git a/packages/sheets-ui/src/controllers/menu/insert.menu.ts b/packages/sheets-ui/src/controllers/menu/insert.menu.tsindex 904ecc3d77..fb7a254882 100644--- a/packages/sheets-ui/src/controllers/menu/insert.menu.ts+++ b/packages/sheets-ui/src/controllers/menu/insert.menu.ts@@ -76,7 +76,7 @@ export function CellInsertMenuItemFactory(accessor: IAccessor): IMenuSelectorItetitle: 'rightClick.insert',icon: 'InsertDoubleIcon',hidden$: getObservableWithExclusiveRange$(accessor, getBaseRangeMenuHidden$(accessor)),- disabled$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission, WorkbookInsertColumnPermission], worksheetTypes: [WorksheetInsertColumnPermission, WorksheetEditPermission], rangeTypes: [RangeProtectionPermissionEditPoint] }),+ disabled$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission, WorkbookInsertColumnPermission, WorkbookInsertRowPermission], worksheetTypes: [WorksheetInsertColumnPermission, WorksheetInsertRowPermission, WorksheetEditPermission], rangeTypes: [RangeProtectionPermissionEditPoint] }),};}@@ -296,7 +296,7 @@ export function InsertMultiRowsAfterHeaderMenuItemFactory(accessor: IAccessor):return disposable.dispose;})),- disabled$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetInsertRowPermission, WorksheetEditPermission], rangeTypes: [RangeProtectionPermissionEditPoint] }),+ disabled$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission, WorkbookInsertRowPermission], worksheetTypes: [WorksheetInsertRowPermission, WorksheetEditPermission], rangeTypes: [RangeProtectionPermissionEditPoint] }),hidden$: getBaseRangeMenuHidden$(accessor),};}@@ -392,7 +392,7 @@ export function InsertMultiColsLeftHeaderMenuItemFactory(accessor: IAccessor): Iupdate();return disposable.dispose;})),- disabled$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission, WorkbookInsertRowPermission], worksheetTypes: [WorksheetInsertRowPermission, WorksheetEditPermission], rangeTypes: [RangeProtectionPermissionEditPoint] }),+ disabled$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission, WorkbookInsertColumnPermission], worksheetTypes: [WorksheetInsertColumnPermission, WorksheetEditPermission], rangeTypes: [RangeProtectionPermissionEditPoint] }),hidden$: getBaseRangeMenuHidden$(accessor),};}@@ -440,7 +440,7 @@ export function InsertMultiColsRightHeaderMenuItemFactory(accessor: IAccessor):update();return disposable.dispose;})),- disabled$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission, WorkbookInsertRowPermission], worksheetTypes: [WorksheetInsertRowPermission, WorksheetEditPermission], rangeTypes: [RangeProtectionPermissionEditPoint] }),+ disabled$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission, WorkbookInsertColumnPermission], worksheetTypes: [WorksheetInsertColumnPermission, WorksheetEditPermission], rangeTypes: [RangeProtectionPermissionEditPoint] }),hidden$: getBaseRangeMenuHidden$(accessor),};}