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
feat(permission): support permission (#1931)
Gpound.liu09fd989097d2
diff --git a/.vscode/settings.json b/.vscode/settings.jsonindex f983a3ac1c..634b22352b 100644--- a/.vscode/settings.json+++ b/.vscode/settings.json@@ -25,6 +25,7 @@"DATEFMTLISG","demi","dppx",+ "Duplicatable","Dushusir","endindex","esbuild",@@ -101,7 +102,9 @@"univerjs","universheet","universlide",+ "Unkonwn","Unmerge",+ "Unprotect","unsync","Verdana","viewports",@@ -113,6 +116,7 @@"Xlookup","XMATCH","XSSI",+ "ybzky","yuhongz"],"vsicons.presets.angular": false,diff --git a/common/storybook/.storybook/preview.tsx b/common/storybook/.storybook/preview.tsxindex fdf56712f8..6da395063b 100644--- a/common/storybook/.storybook/preview.tsx+++ b/common/storybook/.storybook/preview.tsx@@ -43,7 +43,6 @@ import {ResourceManagerService,ThemeService,UniverInstanceService,- UniverPermissionService,} from '@univerjs/core';import { Injector } from '@wendellhu/redi';import { RediContext } from '@wendellhu/redi/react-bindings';@@ -96,8 +95,6 @@ const preview: Preview = {[ThemeService],[LifecycleService],[LifecycleInitializerService],- [IPermissionService, { useClass: PermissionService }],- [UniverPermissionService],[ILogService, { useClass: DesktopLogService, lazy: true }],[ICommandService, { useClass: CommandService, lazy: true }],[IUndoRedoService, { useClass: LocalUndoRedoService, lazy: true }],@@ -105,6 +102,7 @@ const preview: Preview = {[IContextService, { useClass: ContextService }],[IFloatingObjectManagerService, { useClass: FloatingObjectManagerService, lazy: true }],[IResourceManagerService, { useClass: ResourceManagerService, lazy: true }],+ [IPermissionService, { useClass: PermissionService }],// services[ILocalStorageService, { useClass: DesktopLocalStorageService, lazy: true }],diff --git a/examples/package.json b/examples/package.jsonindex 6f1d5cf0ac..9214655830 100644--- a/examples/package.json+++ b/examples/package.json@@ -34,6 +34,7 @@"@univerjs/sheets-find-replace": "workspace:*","@univerjs/sheets-formula": "workspace:*","@univerjs/sheets-numfmt": "workspace:*",+ "@univerjs/sheets-permission-ui": "workspace:*","@univerjs/sheets-thread-comment": "workspace:*","@univerjs/sheets-ui": "workspace:*","@univerjs/sheets-zen-editor": "workspace:*",diff --git a/examples/src/sheets/main.ts b/examples/src/sheets/main.tsindex 34c1ea1ca7..3020875157 100644--- a/examples/src/sheets/main.ts+++ b/examples/src/sheets/main.ts@@ -33,6 +33,7 @@ import { UniverSheetsZenEditorPlugin } from '@univerjs/sheets-zen-editor';import { UniverUIPlugin } from '@univerjs/ui';import { UniverDataValidationPlugin } from '@univerjs/data-validation';import { UniverSheetsDataValidationPlugin } from '@univerjs/sheets-data-validation';+import { UniverSheetsPermissionUIPlugin } from '@univerjs/sheets-permission-ui';import { UniverSheetsConditionalFormattingUIPlugin } from '@univerjs/sheets-conditional-formatting-ui';import { UniverSheetsThreadCommentPlugin } from '@univerjs/sheets-thread-comment';import { UniverDebuggerPlugin } from '@univerjs/debugger';@@ -99,14 +100,17 @@ univer.registerPlugin(UniverSheetsFilterPlugin);// sheet condition formattinguniver.registerPlugin(UniverSheetsConditionalFormattingUIPlugin);+// sheet permission+univer.registerPlugin(UniverSheetsPermissionUIPlugin);+// create univer sheet instanceif (!IS_E2E) {univer.createUnit(UniverInstanceType.UNIVER_SHEET, DEFAULT_WORKBOOK_DATA_DEMO);}const mockUser = {- userID: 'mockId',- name: 'MockUser',+ userID: 'Owner_qxVnhPbQ',+ name: 'Owner',avatar: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAInSURBVHgBtZU9TxtBEIbfWRzFSIdkikhBSqRQkJqkCKTCFkqVInSUSaT0wC8w/gXxD4gU2nRJkXQWhAZowDUUWKIwEgWWbEEB3mVmx3dn4DA2nB/ppNuPeWd29mMIPXDr+RxwtgRHeW6+guNPRxogqnL7Dwz9psJ27S4NShaeZTH3kwXy6I81dlRKcmRui88swdq9AcSFL7Buz1Vmlns64MiLsCjzwnIYHLH57tbfFbs7KRaXyEU8FVZofqccOfA5l7Q8LPIkGrwnb2RPNEXWFVMUF3L+kDCk0btDDAMzOm5YfAHDwp4tG74wnzAsiOYMnJ3GoDybA7IT98/jm5+JNnfiIzAS6LlqHQBN/i6b2t/cV1Hh6BfwYlHnHP4AXi5q/8kmMMpOs8+BixZw/Fd6xUEHEbnkgclvQP2fGp7uShRKnQ3G32rkjV1th8JhIGG7tR/JyjGteSOZELwGMmNqIIigRCLRh2OZIE6BjItdd7pCW6Uhm1zzkUtungSxwEUzNpQ+GQumtH1ej1MqgmNT6vwmhCq5yuwq56EYTbgeQUz3yvrpV1b4ok3nYJ+eYhgYmjRUqErx2EDq0Fr8FhG++iqVGqxlUJI/70Ar0UgJaWHj6hYVHJrfKssAHot1JfqwE9WVWzXZVd5z2Ws/4PnmtEjkXeKJDvxUecLbWOXH/DP6QQ4J72NS0adedp1aseBfXP8odlZFfPvBF7SN/8hky1TYuPOAXAEipMx15u5ToAAAAABJRU5ErkJggg==',anonymous: false,canBindAnonymous: false,@@ -142,7 +146,7 @@ univer.registerPlugin(UniverDebuggerPlugin);const injector = univer.__getInjector();const userManagerService = injector.get(UserManagerService);-userManagerService.setCurrentUser(mockUser);+userManagerService.currentUser = mockUser;declare global {interface Window {diff --git a/packages/core/package.json b/packages/core/package.jsonindex 8450f5bc43..1fee4c9350 100644--- a/packages/core/package.json+++ b/packages/core/package.json@@ -67,7 +67,7 @@"rxjs": ">=7.0.0"},"dependencies": {- "@univerjs/protocol": "^0.1.32",+ "@univerjs/protocol": "^0.1.34","nanoid": "5.0.7","numeral": "^2.0.6","ot-json1": "^1.0.2"diff --git a/packages/core/src/index.ts b/packages/core/src/index.tsindex 063d7210bd..79c8992678 100644--- a/packages/core/src/index.ts+++ b/packages/core/src/index.ts@@ -93,11 +93,10 @@ export { LocaleService } from './services/locale/locale.service';export { DesktopLogService, ILogService, LogLevel } from './services/log/log.service';export {IPermissionService,- PermissionService,- UniverEditablePermission,- UniverEditablePermissionPoint,- UniverPermissionService,-} from './services/permission';+ PermissionStatus,+} from './services/permission/type';+export type { IPermissionParam } from './services/permission/type';+export type { IPermissionPoint } from './services/permission/type';export { IResourceLoaderService } from './services/resource-loader/type';export { ResourceManagerService } from './services/resource-manager/resource-manager.service';export type { IResourceHook } from './services/resource-manager/type';@@ -186,5 +185,10 @@ export { DataValidationImeMode } from './types/enum/data-validation-ime-mode';export { DataValidationOperator } from './types/enum/data-validation-operator';export { DataValidationType } from './types/enum/data-validation-type';export { DataValidationStatus } from './types/enum/data-validation-status';+export type { IPermissionTypes } from './services/permission/type';++export { AuthzIoLocalService } from './services/authz-io/authz-io-local.service';+export { IAuthzIoService } from './services/authz-io/type';+export { createDefaultUser } from './services/user-manager/const';installShims();diff --git a/packages/core/src/services/__test__/index.ts b/packages/core/src/services/__test__/index.tsnew file mode 100644index 0000000000..ff9c9d4871--- /dev/null+++ b/packages/core/src/services/__test__/index.ts@@ -0,0 +1,89 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import type { IWorkbookData } from '@univerjs/core';+import { ICommandService, IUniverInstanceService, LocaleType, Plugin, Univer, UniverInstanceType } from '@univerjs/core';++import type { Dependency } from '@wendellhu/redi';+import { Inject, Injector } from '@wendellhu/redi';++const TEST_WORKBOOK_DATA_DEMO: () => IWorkbookData = () => ({+ id: 'test',+ appVersion: '3.0.0-alpha',+ sheets: {+ sheet1: {+ id: 'sheet1',+ cellData: {+ 0: { 0: { v: 1, t: 2 }, 1: { v: 2, t: 2 }, 2: { v: 3, t: 2 }, 3: { v: 4, t: 2 }, 4: { v: 5, t: 2 }, 5: { v: 6, t: 2 }, 6: { v: 7, t: 2 } },+ 1: { 0: { v: 1, t: 2 }, 1: { v: 2, t: 2 }, 2: { v: 3, t: 2 }, 3: { v: 4, t: 2 }, 4: { v: 5, t: 2 }, 5: { v: 6, t: 2 }, 6: { v: 7, t: 2 } },+ 2: { 0: { v: 1, t: 2 }, 1: { v: 2, t: 2 }, 2: { v: 3, t: 2 }, 3: { v: 4, t: 2 }, 4: { v: 5, t: 2 }, 5: { v: 6, t: 2 }, 6: { v: 7, t: 2 } },+ 3: { 0: { v: 1, t: 2 }, 1: { v: 2, t: 2 }, 2: { v: 3, t: 2 }, 3: { v: 4, t: 2 }, 4: { v: 5, t: 2 }, 5: { v: 6, t: 2 }, 6: { v: 7, t: 2 } },+ 4: { 0: { v: 1, t: 2 }, 1: { v: 2, t: 2 }, 2: { v: 3, t: 2 }, 3: { v: 4, t: 2 }, 4: { v: 5, t: 2 }, 5: { v: 6, t: 2 }, 6: { v: 7, t: 2 } },+ 5: { 0: { v: 1, t: 2 }, 1: { v: 2, t: 2 }, 2: { v: 3, t: 2 }, 3: { v: 4, t: 2 }, 4: { v: 5, t: 2 }, 5: { v: 6, t: 2 }, 6: { v: 7, t: 2 } },+ },+ rowCount: 6,+ columnCount: 8,+ },+ },+ locale: LocaleType.ZH_CN,+ name: '',+ sheetOrder: [],+ styles: {},+ resources: [],+});++export const createTestBed = (dependencies?: Dependency[]) => {+ const univer = new Univer();+ const injector = univer.__getInjector();+ const get = injector.get.bind(injector);++ class TestPlugin extends Plugin {+ static override pluginName = 'test-plugin';+ static override type = UniverInstanceType.UNIVER_SHEET;++ constructor(+ _config: undefined,+ @Inject(Injector) override readonly _injector: Injector+ ) {+ super();+ }++ override onStarting(injector: Injector): void {+ dependencies?.forEach((d) => injector.add(d));+ }+ }++ univer.registerPlugin(TestPlugin);++ const workbookJson = TEST_WORKBOOK_DATA_DEMO();+ const workbook = univer.createUniverSheet(workbookJson);++ const univerInstanceService = injector.get(IUniverInstanceService);+ const commandService = injector.get(ICommandService);+ const unitId = workbookJson.id;+ const subUnitId = workbookJson.sheets.sheet1.id!;+ univerInstanceService.focusUnit('test');+ univerInstanceService.setCurrentUnitForType(unitId);++ return {+ univer,+ get,+ workbook,+ unitId,+ subUnitId,+ commandService,+ };+};diff --git a/packages/core/src/services/__test__/permission.spec.ts b/packages/core/src/services/__test__/permission.spec.tsnew file mode 100644index 0000000000..a0538631df--- /dev/null+++ b/packages/core/src/services/__test__/permission.spec.ts@@ -0,0 +1,82 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import { beforeEach, describe, expect, it } from 'vitest';+import { firstValueFrom } from 'rxjs';+import { UnitAction, UnitObject } from '@univerjs/protocol';+import { PermissionService } from '../permission/permission.service';+import type { IPermissionPoint, PermissionStatus } from '../permission/type';+import type { Univer } from '../../univer';+import { createTestBed } from './index';++class TestPermissionPoint implements IPermissionPoint {+ type: UnitObject.Workbook;+ id;+ status: PermissionStatus.INIT;+ subType: UnitAction.Copy;+ value: boolean = false;++ constructor(id: string) {+ this.id = `${UnitObject.Workbook}.${UnitAction.CreateSheet}.${id}` as string;+ }+}++describe('Test array util function', () => {+ let univer: Univer;+ let permissionService: PermissionService;+ beforeEach(() => {+ univer?.dispose();+ const instance = createTestBed([[PermissionService]]);+ univer = instance.univer;+ permissionService = instance.get(PermissionService);+ });+ it('test get permission from permissionService', () => {+ const point = new TestPermissionPoint('test');+ permissionService.addPermissionPoint(point);+ const result = permissionService.getPermissionPoint(point.id);+ expect(result).toBe(point);+ });++ it('test get permission$ from permissionService', async () => {+ const point = new TestPermissionPoint('test');+ const initValue = point.value;+ permissionService.addPermissionPoint(point);+ const result$ = permissionService.getPermissionPoint$(point.id)!;+ permissionService.updatePermissionPoint(point.id, !initValue);+ const v = await firstValueFrom(result$);+ expect(v.value).toBe(!initValue);+ });++ it('test compose permission', () => {+ const point1 = new TestPermissionPoint('test1');+ const point2 = new TestPermissionPoint('test2');+ permissionService.addPermissionPoint(point1);+ permissionService.addPermissionPoint(point2);+ const result = permissionService.composePermission([point1.id, point2.id]);+ expect(result).toEqual([point1, point2]);+ });++ it('test compose permission$', async () => {+ const point1 = new TestPermissionPoint('test1');+ const point2 = new TestPermissionPoint('test2');+ permissionService.addPermissionPoint(point1);+ permissionService.addPermissionPoint(point2);+ const result$ = permissionService.composePermission$([point1.id, point2.id]);+ permissionService.updatePermissionPoint(point2.id, !point2.value);+ const v = await firstValueFrom(result$);+ expect(v).toEqual([point1, point2]);+ });+});diff --git a/packages/core/src/services/authz-io/authz-io-local.service.ts b/packages/core/src/services/authz-io/authz-io-local.service.tsnew file mode 100644index 0000000000..0199fc8c47--- /dev/null+++ b/packages/core/src/services/authz-io/authz-io-local.service.ts@@ -0,0 +1,209 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import type { IActionInfo, IAllowedRequest, IBatchAllowedResponse, ICollaborator, ICreateRequest, ICreateRequest_SelectRangeObject, ICreateRequest_WorksheetObject, IListPermPointRequest, IPermissionPoint, IPutCollaboratorsRequest, IUnitRoleKV, IUpdatePermPointRequest, UnitAction } from '@univerjs/protocol';+import { UnitObject, UnitRole, UniverType } from '@univerjs/protocol';+import { Inject } from '@wendellhu/redi';+import { Tools } from '../../shared/tools';+import { IResourceManagerService } from '../resource-manager/type';+import { UserManagerService } from '../user-manager/user-manager.service';+import { createDefaultUser, isDevRole } from '../user-manager/const';++import type { IAuthzIoService } from './type';++/**+ * Do not use the mock implementation in a production environment as it is a minimal version.+ */+export class AuthzIoLocalService implements IAuthzIoService {+ private _permissionMap: Map<string, ICreateRequest_SelectRangeObject & { objectType: UnitObject }> = new Map([]);++ // private _sheetPermissionPointMap: Map<string, { action: UnitAction; allowed: boolean }[]> = new Map();++ constructor(+ @IResourceManagerService private _resourceManagerService: IResourceManagerService,+ @Inject(UserManagerService) private _userManagerService: UserManagerService+ ) {+ this._initSnapshot();+ }++ private _getRole(type: UnitRole) {+ const user = this._userManagerService.currentUser;+ if (!user) {+ return false;+ }+ return isDevRole(user.userID, type);+ }++ private _initSnapshot() {+ this._resourceManagerService.registerPluginResource({+ toJson: (_unitId: string) => {+ const obj = [...this._permissionMap.keys()].reduce((r, k) => {+ const v = this._permissionMap.get(k);+ r[k] = v!;+ return r;+ }, {} as Record<string, ICreateRequest_SelectRangeObject & { objectType: UnitObject }>);+ return JSON.stringify(obj);+ },+ parseJson: (json: string) => {+ return JSON.parse(json);+ },+ pluginName: 'SHEET_AuthzIoMockService_PLUGIN',+ businesses: [UniverType.UNIVER_SHEET, UniverType.UNIVER_DOC, UniverType.UNIVER_SLIDE],+ onLoad: (_unitId, resource) => {+ for (const key in resource) {+ this._permissionMap.set(key, resource[key]);+ }+ },+ onUnLoad: () => {+ this._permissionMap.clear();+ },+ });+ }++ async create(config: ICreateRequest): Promise<string> {+ const id = Tools.generateRandomId(8);+ switch (config.objectType) {+ case UnitObject.SelectRange: {+ const params = config.selectRangeObject!;+ this._permissionMap.set(id, { ...params, objectType: config.objectType });+ break;+ }+ case UnitObject.Worksheet: {+ const params = config.worksheetObject!;+ const user = this._userManagerService.currentUser;+ this._permissionMap.set(id, { ...params, objectType: config.objectType });+ // const actions = params.strategies.map((s) => {+ // return {+ // action: s.action,+ // allowed: isDevRole(user.userID, UnitRole.Owner) || s.role === UnitRole.Editor,+ // };+ // });+ }+ }++ return id;+ }++ async allowed(config: IAllowedRequest): Promise<IActionInfo[]> {+ if (this._permissionMap.has(config.objectID)) {+ const rule = this._permissionMap.get(config.objectID);+ if (rule && rule.objectType === UnitObject.Worksheet) {+ return (rule as unknown as ICreateRequest_WorksheetObject)?.strategies?.map((s) => {+ return {+ action: s.action,+ allowed: s.role === UnitRole.Editor,+ };+ });+ }+ }+ return config.actions.map((a) => ({+ action: a, allowed: this._getRole(UnitRole.Owner) || this._getRole(UnitRole.Editor),+ }));+ }++ async batchAllowed(config: IAllowedRequest[]): Promise<IBatchAllowedResponse['objectActions']> {+ const user = this._userManagerService.currentUser;+ const defaultValue = config.map((item) => ({+ unitID: item.unitID,+ objectID: item.objectID,+ actions: item.actions.map((action) => ({+ action,+ allowed: false,+ })),+ }));+ if (!user) {+ return defaultValue;+ }+ if (isDevRole(user.userID, UnitRole.Owner) || isDevRole(user.userID, UnitRole.Editor)) {+ return config.map((item) => ({+ unitID: item.unitID,+ objectID: item.objectID,+ actions: item.actions.map((action) => ({+ action,+ allowed: true,+ })),+ }));+ }+ return defaultValue;+ }++ async list(config: IListPermPointRequest): Promise<IPermissionPoint[]> {+ const result: IPermissionPoint[] = [];+ config.objectIDs.forEach((objectID) => {+ const rule = this._permissionMap.get(objectID);+ if (rule) {+ const item = {+ objectID,+ unitID: config.unitID,+ objectType: rule!.objectType,+ name: rule!.name,+ shareOn: false,+ shareRole: UnitRole.Owner,+ creator: createDefaultUser(UnitRole.Owner),+ strategies: [],+ actions: config.actions.map((a) => {+ // if (a === UnitAction.ManageCollaborator) {++ // } else {++ // }+ return { action: a, allowed: this._getRole(UnitRole.Owner) || this._getRole(UnitRole.Editor) };+ }),+ };+ result.push(item);+ }+ });+ return result;+ }++ async listCollaborators(): Promise<ICollaborator[]> {+ return [];+ }++ async listRoles(): Promise<{ roles: IUnitRoleKV[]; actions: UnitAction[] }> {+ return {+ roles: [],+ actions: [],+ };+ }++ async deleteCollaborator(): Promise<void> {+ return undefined;+ }++ async update(config: IUpdatePermPointRequest): Promise<void> {+ // const { objectID, strategies } = config;+ // const actions = strategies.map((s) => {+ // return {+ // action: s.action,+ // allowed: s.role === UnitRole.Editor || s.role === UnitRole.Owner,+ // };+ // });+ // this._sheetPermissionPointMap.set(objectID, actions);+ }++ async updateCollaborator(): Promise<void> {+ return undefined;+ }++ async createCollaborator(): Promise<void> {+ return undefined;+ }++ async putCollaborators(config: IPutCollaboratorsRequest): Promise<void> {+ return undefined;+ }+}diff --git a/packages/core/src/services/authz-io/type.ts b/packages/core/src/services/authz-io/type.tsnew file mode 100644index 0000000000..c9c454110b--- /dev/null+++ b/packages/core/src/services/authz-io/type.ts@@ -0,0 +1,36 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import type { ILogContext } from '@univerjs/core';+import { createIdentifier } from '@wendellhu/redi';+import type { IAllowedRequest, IAllowedResponse, IBatchAllowedResponse, ICreateCollaboratorRequest, ICreateRequest, ICreateResponse, IDeleteCollaboratorRequest, IListCollaboratorRequest, IListCollaboratorResponse, IListPermPointRequest, IListPermPointResponse, IListRolesRequest, IListRolesResponse, IPutCollaboratorsRequest, IUpdateCollaboratorRequest, IUpdatePermPointRequest } from '@univerjs/protocol';++export interface IAuthzIoService {+ create(config: ICreateRequest, context?: ILogContext): Promise<ICreateResponse['objectID']>;+ allowed(config: IAllowedRequest, context?: ILogContext): Promise<IAllowedResponse['actions']>;+ batchAllowed(config: IAllowedRequest[], context?: ILogContext): Promise<IBatchAllowedResponse['objectActions']>;+ list(config: IListPermPointRequest, context?: ILogContext): Promise<IListPermPointResponse['objects']>;+ listRoles(config: IListRolesRequest, context?: ILogContext): Promise<{ roles: IListRolesResponse['roles']; actions: IListRolesResponse['actions'] }>;+ update(config: IUpdatePermPointRequest, context?: ILogContext): Promise<void>;+ listCollaborators(config: IListCollaboratorRequest, context?: ILogContext): Promise<IListCollaboratorResponse['collaborators']>;+ updateCollaborator(config: IUpdateCollaboratorRequest, context?: ILogContext): Promise<void>;+ deleteCollaborator(config: IDeleteCollaboratorRequest, context?: ILogContext): Promise<void>;+ createCollaborator(config: ICreateCollaboratorRequest, context?: ILogContext): Promise<void>;+ putCollaborators(config: IPutCollaboratorsRequest, context?: ILogContext): Promise<void>;+}++export const IAuthzIoService = createIdentifier<IAuthzIoService>('IAuthzIoIoService');+diff --git a/packages/core/src/services/permission/permission.service.ts b/packages/core/src/services/permission/permission.service.tsindex aca6c2c939..23a3c9ecae 100644--- a/packages/core/src/services/permission/permission.service.ts+++ b/packages/core/src/services/permission/permission.service.ts@@ -14,139 +14,68 @@* limitations under the License.*/-import { createIdentifier, Inject } from '@wendellhu/redi';import type { Observable } from 'rxjs';-import { BehaviorSubject, combineLatest } from 'rxjs';+import { BehaviorSubject, combineLatest, Subject } from 'rxjs';import { map } from 'rxjs/operators';+import { Disposable } from '../../shared';+import type { IPermissionPoint, IPermissionService } from './type';+import { PermissionStatus } from './type';-import type { PermissionPoint } from '../../shared';-import { Disposable, PermissionStatus } from '../../shared';-import type { Nullable } from '../../shared/types';-import { IUniverInstanceService } from '../instance/instance.service';-import { LifecycleStages, OnLifecycle } from '../lifecycle/lifecycle';-import { IResourceManagerService } from '../resource-manager/type';--export interface IPermissionService {- deletePermissionPoint(unitID: string, id: string): void;- addPermissionPoint(unitID: string, item: PermissionPoint): boolean;- updatePermissionPoint(unitID: string, id: string, value: any): void;- getPermissionPoint(unitID: string, id: string): Nullable<PermissionPoint>;- composePermission$(unitID: string, permissionIdList: string[]): Observable<PermissionPoint[]>;- composePermission(unitID: string, permissionIdList: string[]): PermissionPoint[];-}--export const IPermissionService = createIdentifier<IPermissionService>('univer.permission-service');-const resourceKey = 'PERMISSION';--@OnLifecycle(LifecycleStages.Starting, PermissionService)export class PermissionService extends Disposable implements IPermissionService {- private _permissionPointMap: Map<string, Map<string, BehaviorSubject<PermissionPoint>>> = new Map();+ private _permissionPointMap: Map<string, BehaviorSubject<IPermissionPoint<unknown>>> = new Map();- constructor(- @Inject(IResourceManagerService) private _resourceManagerService: IResourceManagerService,- @Inject(IUniverInstanceService) private _univerInstanceService: IUniverInstanceService- ) {- super();- // this._init();- }-- // private _init() {- // this.disposeWithMe(- // toDisposable(- // this._univerInstanceService.getTypeOfUnitAdded$<Workbook>(UniverInstanceType.UNIVER_SHEET).subscribe((workbook) => {- // this._resourceManagerService.registerPluginResource(workbook.getUnitId(), resourceKey, {- // onChange: (unitID, value) => {- // (value as PermissionPoint[]).forEach((permissionPoint) => {- // if (this.getPermissionPoint(unitID, permissionPoint.id)) {- // this.updatePermissionPoint(unitID, permissionPoint.id, permissionPoint.value);- // } else {- // this.addPermissionPoint(unitID, permissionPoint);- // }- // });- // },- // toJson: (unitID: string) => this._toJson(unitID),- // parseJson: (json: string) => this._parseJson(json),- // });- // })- // )- // );- // this.disposeWithMe(- // toDisposable(- // this._univerInstanceService.getTypeOfUnitDisposed$<Workbook>(UniverInstanceType.UNIVER_SHEET).subscribe((workbook) => {- // this._resourceManagerService.disposePluginResource(workbook.getUnitId(), resourceKey);- // })- // )- // );- // }-- private _toJson(unitID: string) {- const permissionMap = this._permissionPointMap.get(unitID);- let list: PermissionPoint[] = [];- if (permissionMap) {- list = [...permissionMap.keys()].reduce((pre, key) => {- const value = permissionMap.get(key);- if (value) {- pre.push(value.getValue());- }- return pre;- }, [] as PermissionPoint[]);- }- return JSON.stringify(list);- }+ private _permissionPointUpdate$ = new Subject<IPermissionPoint<unknown>>();- private _parseJson(json: string) {- return JSON.parse(json);- }+ public permissionPointUpdate$ = this._permissionPointUpdate$.asObservable();- deletePermissionPoint = (unitID: string, id: string) => {- const permissionMap = this._permissionPointMap.get(unitID);- if (permissionMap) {- const subject = permissionMap.get(id);- if (subject) {- subject.complete();- this._permissionPointMap.delete(id);- }+ deletePermissionPoint(permissionId: string) {+ const permissionPoint = this._permissionPointMap.get(permissionId);+ if (permissionPoint) {+ permissionPoint.complete();+ this._permissionPointMap.delete(permissionId);}};- addPermissionPoint = (unitID: string, item: PermissionPoint) => {- const permissionMap =- this._permissionPointMap.get(unitID) || new Map<string, BehaviorSubject<PermissionPoint>>();- if (!permissionMap.has(item.id)) {- permissionMap.set(item.id, new BehaviorSubject(item));- this._permissionPointMap.set(unitID, permissionMap);- return true;+ addPermissionPoint<T = boolean>(item: IPermissionPoint<T>) {+ if (!item.id) {+ return false;}- return false;+ this._permissionPointMap.set(item.id, new BehaviorSubject<IPermissionPoint<unknown>>(item));+ this._permissionPointUpdate$.next(item);+ return true;};- updatePermissionPoint = (unitID: string, permissionId: string, value: any) => {- const permissionMap = this._permissionPointMap.get(unitID);- if (!permissionMap) {+ updatePermissionPoint<T = boolean>(permissionId: string, value: T) {+ const permissionPoint = this._permissionPointMap.get(permissionId);+ if (!permissionPoint) {return;}- const permissionSubject = permissionMap.get(permissionId);- if (permissionSubject) {- const subject = permissionSubject.getValue() as PermissionPoint;- subject.value = value;- subject.status = PermissionStatus.DONE;- permissionSubject.next(subject);- }+ const subject = permissionPoint.getValue() as IPermissionPoint<T>;+ subject.value = value;+ subject.status = PermissionStatus.DONE;+ permissionPoint.next({ ...subject });+ this._permissionPointUpdate$.next(subject);};- getPermissionPoint = (unitID: string, permissionId: string) => {- const permissionMap = this._permissionPointMap.get(unitID);- if (!permissionMap) return;- const item = permissionMap.get(permissionId);- if (item) {- return item.getValue();- }+ clearPermissionMap() {+ this._permissionPointMap.clear();};- composePermission$(unitID: string, permissionIdList: string[]) {- const permissionMap = this._permissionPointMap.get(unitID);+ getPermissionPoint<T = boolean>(permissionId: string) {+ const permissionPoint = this._permissionPointMap.get(permissionId);+ if (!permissionPoint) return;+ return permissionPoint.getValue() as IPermissionPoint<T>;+ };++ getPermissionPoint$<T = boolean>(permissionId: string) {+ const permissionPoint = this._permissionPointMap.get(permissionId);+ if (!permissionPoint) return;+ return permissionPoint as Observable<IPermissionPoint<T>>;+ };++ composePermission$(permissionIdList: string[]) {const subjectList = permissionIdList.map((id) => {- const subject = permissionMap?.get(id);+ const subject = this._permissionPointMap?.get(id);if (!subject) {throw new Error(`${id} permissionPoint is not exist`);}@@ -155,19 +84,14 @@ export class PermissionService extends Disposable implements IPermissionServicereturn combineLatest(subjectList).pipe(// Check that all permissions existmap((list) => {- if (list.every((item) => this._permissionPointMap.get(item.id))) {- return list;- }return list;}));}- composePermission(unitID: string, permissionIdList: string[]) {- const permissionMap = this._permissionPointMap.get(unitID);-+ composePermission(permissionIdList: string[]) {const valueList = permissionIdList.map((id) => {- const subject = permissionMap?.get(id);+ const subject = this._permissionPointMap?.get(id);if (!subject) {throw new Error(`${id} permissionPoint is not exist`);}diff --git a/packages/core/src/services/permission/type.ts b/packages/core/src/services/permission/type.tsnew file mode 100644index 0000000000..2cee253d2d--- /dev/null+++ b/packages/core/src/services/permission/type.ts@@ -0,0 +1,68 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import type { Observable } from 'rxjs';+import { createIdentifier } from '@wendellhu/redi';+import type { UnitAction, UnitObject } from '@univerjs/protocol';+import type { Nullable } from '../../common/type-utils';+import { LifecycleStages, runOnLifecycle } from '../lifecycle/lifecycle';+import type { IRange } from '../../types/interfaces';++export enum PermissionStatus {+ INIT = 'init',+ FETCHING = 'fetching',+ DONE = 'done',+}++type WorkbookPermissionPointConstructor = new (unitId: string) => IPermissionPoint;+type WorkSheetPermissionPointConstructor = new (unitId: string, subUnitId: string) => IPermissionPoint;+type RangePermissionPointConstructor = new (unitId: string, subUnitId: string, permissionId: string) => IPermissionPoint;++export interface IPermissionTypes {+ rangeTypes?: RangePermissionPointConstructor[];+ worksheetTypes?: WorkSheetPermissionPointConstructor[];+ workbookTypes?: WorkbookPermissionPointConstructor[];+}++export interface IPermissionPoint<V = boolean> {+ type: UnitObject;+ id: string;+ status: PermissionStatus;+ subType: UnitAction;+ value: V;+}++export interface IPermissionParam {+ unitId: string;+ subUnitId: string;+ range?: IRange;+}++export interface IPermissionService {+ permissionPointUpdate$: Observable<IPermissionPoint<unknown>>;+ deletePermissionPoint(permissionId: string): void;+ addPermissionPoint<T = boolean>(permissionPoint: IPermissionPoint<T>): boolean;+ updatePermissionPoint<T = boolean>(permissionId: string, value: T): void;+ getPermissionPoint<T = boolean>(permissionId: string): Nullable<IPermissionPoint<T>>;+ getPermissionPoint$<T = boolean>(permissionId: string): Nullable<Observable<IPermissionPoint<T>>>;+ clearPermissionMap(): void;++ composePermission$(permissionId: string[]): Observable<IPermissionPoint<unknown>[]>;+ composePermission(permissionId: string[]): IPermissionPoint<unknown>[];+}++export const IPermissionService = createIdentifier<IPermissionService>('univer.permission-service');+runOnLifecycle(LifecycleStages.Starting, IPermissionService);diff --git a/packages/core/src/services/permission/univer.permission.service.ts b/packages/core/src/services/permission/univer.permission.service.tsdeleted file mode 100644index 330a80c7cf..0000000000--- a/packages/core/src/services/permission/univer.permission.service.ts+++ /dev/null@@ -1,57 +0,0 @@-/**- * Copyright 2023-present DreamNum Inc.- *- * Licensed under the Apache License, Version 2.0 (the "License");- * you may not use this file except in compliance with the License.- * You may obtain a copy of the License at- *- * http://www.apache.org/licenses/LICENSE-2.0- *- * Unless required by applicable law or agreed to in writing, software- * distributed under the License is distributed on an "AS IS" BASIS,- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.- * See the License for the specific language governing permissions and- * limitations under the License.- */--import { Inject } from '@wendellhu/redi';--import { Disposable } from '../../shared';-import { IUniverInstanceService } from '../instance/instance.service';-import { LifecycleStages, OnLifecycle } from '../lifecycle/lifecycle';-import { UniverInstanceType } from '../../common/unit';-import { IPermissionService } from './permission.service';-import { UniverEditablePermission } from './permission-point';--@OnLifecycle(LifecycleStages.Starting, UniverPermissionService)-export class UniverPermissionService extends Disposable {- constructor(- @Inject(IPermissionService) private _permissionService: IPermissionService,- @Inject(IUniverInstanceService) private _univerInstanceService: IUniverInstanceService- ) {- super();- this._init();- }-- private _init() {- this._univerInstanceService.getTypeOfUnitAdded$(UniverInstanceType.UNIVER_SHEET).subscribe((workbook) => {- const univerEditablePermission = new UniverEditablePermission(workbook.getUnitId());- this._permissionService.addPermissionPoint(workbook.getUnitId(), univerEditablePermission);- });- }-- getEditable(unitId = this._univerInstanceService.getCurrentUnitForType(UniverInstanceType.UNIVER_SHEET)?.getUnitId()) {- if (!unitId) {- return;- }-- const univerEditablePermission = new UniverEditablePermission(unitId);- const permission = this._permissionService.getPermissionPoint(unitId, univerEditablePermission.id);- return permission?.value;- }-- setEditable(unitId: string, v: boolean) {- const univerEditablePermission = new UniverEditablePermission(unitId);- this._permissionService.updatePermissionPoint(unitId, univerEditablePermission.id, v);- }-}diff --git a/packages/core/src/services/user-manager/const.ts b/packages/core/src/services/user-manager/const.tsnew file mode 100644index 0000000000..f83ff3a214--- /dev/null+++ b/packages/core/src/services/user-manager/const.ts@@ -0,0 +1,39 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import type { IUser } from '@univerjs/protocol';+import { UnitRole } from '@univerjs/protocol';++import { Tools } from '../../shared/tools';++const nameMap = {+ [UnitRole.Editor]: 'Editor',+ [UnitRole.Owner]: 'Owner',+ [UnitRole.Reader]: 'Reader',+ [UnitRole.UNRECOGNIZED]: 'UNRECOGNIZED',+};+export const createDefaultUser = (type: UnitRole) => {+ const user = {+ userID: `${nameMap[type]}_${Tools.generateRandomId(8)}`,+ name: nameMap[type],+ avatar: '',+ } as IUser;+ return user;+};+export const isDevRole = (userId: string, type: UnitRole) => {+ return userId.startsWith(nameMap[type]);+};+diff --git a/packages/core/src/services/permission/index.ts b/packages/core/src/services/user-manager/index.tssimilarity index 71%rename from packages/core/src/services/permission/index.tsrename to packages/core/src/services/user-manager/index.tsindex 1bd2307ff3..1054df5975 100644--- a/packages/core/src/services/permission/index.ts+++ b/packages/core/src/services/user-manager/index.ts@@ -14,6 +14,4 @@* limitations under the License.*/-export { IPermissionService, PermissionService } from './permission.service';-export { UniverEditablePermission, UniverEditablePermissionPoint } from './permission-point';-export { UniverPermissionService } from './univer.permission.service';+export { createDefaultUser } from './const';diff --git a/packages/core/src/services/user-manager/user-manager.service.ts b/packages/core/src/services/user-manager/user-manager.service.tsindex e0e4202421..f50a49fad8 100644--- a/packages/core/src/services/user-manager/user-manager.service.ts+++ b/packages/core/src/services/user-manager/user-manager.service.ts@@ -15,24 +15,29 @@*/import type { IUser } from '@univerjs/protocol';+import { UnitRole } from '@univerjs/protocol';+import { BehaviorSubject, Subject } from 'rxjs';+import { LifecycleStages, OnLifecycle } from '../lifecycle/lifecycle';+import { createDefaultUser } from './const';+@OnLifecycle(LifecycleStages.Starting, UserManagerService)export class UserManagerService {private _model = new Map<string, IUser>();private _userChange$ = new Subject<{ type: 'add' | 'delete'; user: IUser } | { type: 'clear' }>();public userChange$ = this._userChange$.asObservable();-- private _currentUser: IUser | null;- private _currentUser$ = new BehaviorSubject<IUser | null>(null);+ private _currentUser$ = new BehaviorSubject<IUser>(createDefaultUser(UnitRole.Owner));+ /**+ * When the current user undergoes a switch or change+ * @memberof UserManagerService+ */public currentUser$ = this._currentUser$.asObservable();- getCurrentUser() {- return this._currentUser;+ get currentUser() {+ return this._currentUser$.getValue();}- setCurrentUser(user: IUser) {- this._currentUser = user;- this.addUser(user);+ set currentUser(user: IUser) {this._currentUser$.next(user);}diff --git a/packages/core/src/shared/index.ts b/packages/core/src/shared/index.tsindex ae46a1e1b1..aa386bc861 100644--- a/packages/core/src/shared/index.ts+++ b/packages/core/src/shared/index.ts@@ -28,7 +28,6 @@ export * from './lifecycle';export * from './locale';export * from './lru/index';export * from './object-matrix';-export * from './permission';export * from './rectangle';export { RefAlias } from './ref-alias';export * from './row-col-iter';diff --git a/packages/core/src/univer.ts b/packages/core/src/univer.tsindex 9ab61a18f4..210ab46dbe 100644--- a/packages/core/src/univer.ts+++ b/packages/core/src/univer.ts@@ -31,8 +31,9 @@ import { LifecycleStages } from './services/lifecycle/lifecycle';import { LifecycleInitializerService, LifecycleService } from './services/lifecycle/lifecycle.service';import { LocaleService } from './services/locale/locale.service';import { DesktopLogService, ILogService } from './services/log/log.service';-import { IPermissionService, PermissionService } from './services/permission/permission.service';-import { UniverPermissionService } from './services/permission/univer.permission.service';+import { PermissionService } from './services/permission/permission.service';+import { IPermissionService } from './services/permission/type';+import { ResourceManagerService } from './services/resource-manager/resource-manager.service';import { IResourceManagerService } from './services/resource-manager/type';import { ResourceLoaderService } from './services/resource-loader/resource-loader.service';@@ -50,6 +51,8 @@ import type { Plugin, PluginCtor } from './services/plugin/plugin';import type { DependencyOverride } from './services/plugin/plugin-override';import { mergeOverrideWithDependencies } from './services/plugin/plugin-override';import { UserManagerService } from './services/user-manager/user-manager.service';+import { AuthzIoLocalService } from './services/authz-io/authz-io-local.service';+import { IAuthzIoService } from './services/authz-io/type';export class Univer {private _startedTypes = new Set<UnitType>();@@ -168,7 +171,6 @@ function createUniverInjector(parentInjector?: Injector, override?: DependencyOv[ThemeService],[LifecycleService],[LifecycleInitializerService],- [UniverPermissionService],[PluginService],[UserManagerService],@@ -183,6 +185,7 @@ function createUniverInjector(parentInjector?: Injector, override?: DependencyOv[IFloatingObjectManagerService, { useClass: FloatingObjectManagerService, lazy: true }],[IResourceManagerService, { useClass: ResourceManagerService, lazy: true }],[IResourceLoaderService, { useClass: ResourceLoaderService, lazy: true }],+ [IAuthzIoService, { useClass: AuthzIoLocalService, lazy: true }],], override);return parentInjector ? parentInjector.createChild(dependencies) : new Injector(dependencies);diff --git a/packages/data-validation/package.json b/packages/data-validation/package.jsonindex 2212e816e5..137482d7c6 100644--- a/packages/data-validation/package.json+++ b/packages/data-validation/package.json@@ -67,6 +67,9 @@"@wendellhu/redi": "0.15.2","rxjs": ">=7.0.0"},+ "dependencies": {+ "@univerjs/protocol": "^0.1.34"+ },"devDependencies": {"@univerjs/core": "workspace:*","@univerjs/shared": "workspace:*",diff --git a/packages/debugger/src/commands/operations/change-user.operation.ts b/packages/debugger/src/commands/operations/change-user.operation.tsnew file mode 100644index 0000000000..7b9e6cfd9c--- /dev/null+++ b/packages/debugger/src/commands/operations/change-user.operation.ts@@ -0,0 +1,52 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import type { ICommand, Workbook } from '@univerjs/core';+import { CommandType, createDefaultUser, IPermissionService, IUniverInstanceService, UniverInstanceType, UserManagerService } from '@univerjs/core';+import { WorkbookManageCollaboratorPermission } from '@univerjs/sheets';++import type { IAccessor } from '@wendellhu/redi';++export enum UnitRole {+ Reader = 0,+ Editor = 1,+ Owner = 2,+ UNRECOGNIZED = -1,+}++interface IChangeUserParams {+ value: UnitRole.Reader | UnitRole.Owner;++}++export const ChangeUserCommand: ICommand = {+ id: 'debugger.operation.changeUser',+ type: CommandType.OPERATION,+ handler: async (accessor: IAccessor, params: IChangeUserParams) => {+ const userManagerService = accessor.get(UserManagerService);+ const univerInstanceService = accessor.get(IUniverInstanceService);+ userManagerService.currentUser = createDefaultUser(params.value);+ const workbook = univerInstanceService.getCurrentUnitForType<Workbook>(UniverInstanceType.UNIVER_SHEET)!;+ const permissionService = accessor.get(IPermissionService);+ const unitId = workbook.getUnitId();+ if (params.value === UnitRole.Owner) {+ permissionService.updatePermissionPoint(new WorkbookManageCollaboratorPermission(unitId).id, true);+ } else {+ permissionService.updatePermissionPoint(new WorkbookManageCollaboratorPermission(unitId).id, false);+ }+ return true;+ },+};diff --git a/packages/debugger/src/commands/operations/set.editable.operation.ts b/packages/debugger/src/commands/operations/set.editable.operation.tsindex ef590a0566..fd49bfd28c 100644--- a/packages/debugger/src/commands/operations/set.editable.operation.ts+++ b/packages/debugger/src/commands/operations/set.editable.operation.ts@@ -14,9 +14,9 @@* limitations under the License.*/-import type { ICommand, Workbook } from '@univerjs/core';-import { CommandType, IUniverInstanceService, UniverInstanceType, UniverPermissionService } from '@univerjs/core';-import { SheetPermissionService } from '@univerjs/sheets';+import type { ICommand } from '@univerjs/core';+import { CommandType, IPermissionService, IUniverInstanceService } from '@univerjs/core';+import { getSheetCommandTarget, WorkbookEditablePermission, WorksheetEditPermission } from '@univerjs/sheets';import type { IAccessor } from '@wendellhu/redi';export interface ISetEditableCommandParams {@@ -26,17 +26,24 @@ export interface ISetEditableCommandParams {export const SetEditable: ICommand = {id: 'debugger.operation.set.editable',type: CommandType.OPERATION,- handler: async (accessor: IAccessor, params: ISetEditableCommandParams) => {+ handler: (accessor: IAccessor, params: ISetEditableCommandParams) => {+ const univerInstanceService = accessor.get(IUniverInstanceService);+ const target = getSheetCommandTarget(univerInstanceService);+ if (!target) {+ return false;+ }+ const { workbook, worksheet, unitId, subUnitId } = target;+ const permissionService = accessor.get(IPermissionService);+ if (!workbook || !worksheet) {+ return false;+ }if (params.value === 'sheet') {- const sheetPermissionService = accessor.get(SheetPermissionService);- const editable = sheetPermissionService.getSheetEditable();- sheetPermissionService.setSheetEditable(!editable);+ const editable = permissionService.getPermissionPoint(new WorksheetEditPermission(unitId, subUnitId).id);+ permissionService.updatePermissionPoint(new WorksheetEditPermission(unitId, subUnitId).id, !editable);} else {- const univerPermissionService = accessor.get(UniverPermissionService);- const univerInstanceService = accessor.get(IUniverInstanceService);- const unitId = univerInstanceService.getCurrentUnitForType<Workbook>(UniverInstanceType.UNIVER_SHEET)!.getUnitId();- const editable = univerPermissionService.getEditable(unitId);- univerPermissionService.setEditable(unitId, !editable);+ const unitId = workbook!.getUnitId();+ const editable = permissionService.getPermissionPoint(new WorkbookEditablePermission(unitId).id);+ permissionService.updatePermissionPoint(new WorkbookEditablePermission(unitId).id, !editable);}return true;},diff --git a/packages/debugger/src/controllers/debugger.controller.ts b/packages/debugger/src/controllers/debugger.controller.tsindex ebff79f685..b629a4f8f4 100644--- a/packages/debugger/src/controllers/debugger.controller.ts+++ b/packages/debugger/src/controllers/debugger.controller.ts@@ -35,7 +35,9 @@ import { TEST_EDITOR_CONTAINER_COMPONENT } from '../views/test-editor/component-import VueI18nIcon from '../components/VueI18nIcon.vue';import { CreateEmptySheetCommand, DisposeCurrentUnitCommand } from '../commands/commands/unit.command';+import { ChangeUserCommand } from '../commands/operations/change-user.operation';import {+ ChangeUserMenuItemFactory,ConfirmMenuItemFactory,CreateEmptySheetMenuItemFactory,DialogMenuItemFactory,@@ -84,6 +86,7 @@ export class DebuggerController extends Disposable {SaveSnapshotOptions,DisposeCurrentUnitCommand,CreateEmptySheetCommand,+ ChangeUserCommand,].forEach((command) => this.disposeWithMe(this._commandService.registerCommand(command)));this._injector.add([ExportController]);@@ -106,6 +109,7 @@ export class DebuggerController extends Disposable {UnitMenuItemFactory,DisposeCurrentUnitMenuItemFactory,CreateEmptySheetMenuItemFactory,+ ChangeUserMenuItemFactory,] as IMenuItemFactory[]).forEach((factory) => {this.disposeWithMe(this._menuService.addMenuItem(this._injector.invoke(factory), menu));});diff --git a/packages/debugger/src/controllers/menu.ts b/packages/debugger/src/controllers/menu.tsindex a319916e6a..a29f9be5d3 100644--- a/packages/debugger/src/controllers/menu.ts+++ b/packages/debugger/src/controllers/menu.ts@@ -30,6 +30,7 @@ import { SetEditable } from '../commands/operations/set.editable.operation';import { SidebarOperation } from '../commands/operations/sidebar.operation';import { ThemeOperation } from '../commands/operations/theme.operation';import { CreateEmptySheetCommand, DisposeCurrentUnitCommand } from '../commands/commands/unit.command';+import { ChangeUserCommand, UnitRole } from '../commands/operations/change-user.operation';export function LocaleMenuItemFactory(accessor: IAccessor): IMenuSelectorItem {return {@@ -251,3 +252,28 @@ export function CreateEmptySheetMenuItemFactory(accessor: IAccessor): IMenuButtopositions: [UNIT_ITEM_MENU_ID],};}++export function ChangeUserMenuItemFactory(): IMenuSelectorItem {+ return {+ id: ChangeUserCommand.id,+ type: MenuItemType.SELECTOR,+ title: 'Change User',+ positions: [MenuPosition.TOOLBAR_OTHERS],+ selections: [+ {+ label: 'Owner',+ value: UnitRole.Owner,+ },+ {+ label: 'Editor',+ value: UnitRole.Editor,+ },+ {+ label: 'Reader',+ value: UnitRole.Reader,+ },++ ],+ };+}+diff --git a/packages/design/src/components/dialog/Dialog.tsx b/packages/design/src/components/dialog/Dialog.tsxindex 56844255c1..b2f771e23a 100644--- a/packages/design/src/components/dialog/Dialog.tsx+++ b/packages/design/src/components/dialog/Dialog.tsx@@ -86,10 +86,13 @@ export interface IDialogProps {* Callback when the dialog is closed.*/onClose?: () => void;++ className?: string;}export function Dialog(props: IDialogProps) {const {+ className,children,style,visible = false,@@ -183,6 +186,7 @@ export function Dialog(props: IDialogProps) {return mountContainer && (<RcDialog+ className={className}width={width}prefixCls={styles.dialog}rootClassName={draggable ? styles.dialogRootDraggable : styles.dialogRoot}diff --git a/packages/design/src/components/radio-group/RadioGroup.tsx b/packages/design/src/components/radio-group/RadioGroup.tsxindex 8889a68157..d4187ac3d1 100644--- a/packages/design/src/components/radio-group/RadioGroup.tsx+++ b/packages/design/src/components/radio-group/RadioGroup.tsx@@ -71,7 +71,7 @@ export function RadioGroup(props: IRadioGroupProps) {});return (- <div className={_className} style={style}>+ <div className={clsx(styles.radioGroup, _className)} style={style}>{React.Children.map(children, (child, index) => {if (React.isValidElement<IRadioProps>(child)) {return React.cloneElement(child, {diff --git a/packages/design/src/components/switch/Switch.tsx b/packages/design/src/components/switch/Switch.tsxnew file mode 100644index 0000000000..51e4beb776--- /dev/null+++ b/packages/design/src/components/switch/Switch.tsx@@ -0,0 +1,48 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import React, { useEffect, useState } from 'react';+import styles from './index.module.less';++export interface ISwitchProps {+ defaultChecked?: boolean;+ onChange?: (checked: boolean) => void;+}++const Switch = (props: ISwitchProps) => {+ const { defaultChecked = false, onChange } = props;+ const [checked, setChecked] = useState(defaultChecked);++ const handleChange = () => {+ setChecked(!checked);+ onChange?.(!checked);+ };++ useEffect(() => {+ setChecked(defaultChecked);+ }, [defaultChecked]);++ return (+ <div className={styles.switchWrapper}>+ <label className={styles.switch}>+ <input type="checkbox" checked={checked} onChange={handleChange} />+ <span className={styles.slider} />+ </label>+ </div>+ );+};++export { Switch };diff --git a/packages/design/src/components/switch/index.module.less b/packages/design/src/components/switch/index.module.lessnew file mode 100644index 0000000000..d4e2ce0355--- /dev/null+++ b/packages/design/src/components/switch/index.module.less@@ -0,0 +1,46 @@+.switch-wrapper {+ height: 16px;++ .switch {+ position: relative;+ display: inline-block;+ width: 28px;+ height: 16px;++ input {+ opacity: 0;+ }+ }++ .slider {+ position: absolute;+ cursor: pointer;+ top: 0;+ left: 0;+ right: 0;+ bottom: 0;+ background-color: rgb(var(--bg-color-hover));+ transition: background-color 0.2s;+ border-radius: 16px;+ }++ .slider:before {+ position: absolute;+ content: '';+ height: 12px;+ width: 12px;+ left: 2px;+ bottom: 2px;+ background-color: rgb(var(--color-white));+ transition: transform 0.2s;+ border-radius: 50%;+ }++ input:checked + .slider {+ background-color: rgb(var(--primary-color));+ }++ input:checked + .slider:before {+ transform: translateX(12px);+ }+}diff --git a/packages/design/src/components/switch/index.ts b/packages/design/src/components/switch/index.tsnew file mode 100644index 0000000000..529d59785e--- /dev/null+++ b/packages/design/src/components/switch/index.ts@@ -0,0 +1,17 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++export { Switch } from './Switch';diff --git a/packages/design/src/index.ts b/packages/design/src/index.tsindex 7217146033..23666d932a 100644--- a/packages/design/src/index.ts+++ b/packages/design/src/index.ts@@ -57,6 +57,10 @@ export { type ISegmentedProps, Segmented } from './components/segmented';export { type ISliderProps, Slider } from './components/slider';export { type ITooltipProps, Tooltip, resizeObserverCtor } from './components/tooltip';export { type ITreeNodeProps, type ITreeProps, Tree, TreeSelectionMode, mergeTreeSelected, findSubTreeFromPath, findNodePathFromTree, filterLeafNode } from './components/tree';+export * as enUS from './locale/en-US';+export * as ruRU from './locale/ru-RU';+export * as zhCN from './locale/zh-CN';+export { Switch } from './components/switch';export { type ILocale } from './locale/interface';export { defaultTheme, greenTheme, themeInstance } from './themes';export { DraggableList, type IDraggableListProps } from './components/draggable-list';diff --git a/packages/engine-render/src/components/sheets/spreadsheet.ts b/packages/engine-render/src/components/sheets/spreadsheet.tsindex d6ff0ac3b4..0d5c12db55 100644--- a/packages/engine-render/src/components/sheets/spreadsheet.ts+++ b/packages/engine-render/src/components/sheets/spreadsheet.ts@@ -133,7 +133,6 @@ export class Spreadsheet extends SheetComponent {: undefined;const viewRanges = [spreadsheetSkeleton.getRowColumnSegmentByViewBound(viewportInfo?.cacheBound)];const extensions = this.getExtensionsByOrder();-// At this moment, ctx.transform is at topLeft of sheet content, cell(0, 0)for (const extension of extensions) {// const timeKey = `extension ${viewportInfo.viewPortKey}:${extension.constructor.name}`;diff --git a/packages/facade/src/apis/__tests__/create-test-bed.ts b/packages/facade/src/apis/__tests__/create-test-bed.tsindex b5cce25efc..1b1c6b20d7 100644--- a/packages/facade/src/apis/__tests__/create-test-bed.ts+++ b/packages/facade/src/apis/__tests__/create-test-bed.ts@@ -14,8 +14,12 @@* limitations under the License.*/+/* eslint-disable max-lines-per-function */+import type { IWorkbookData, UnitModel, Workbook } from '@univerjs/core';import {+ AuthzIoLocalService,+ IAuthzIoService,ILogService,IUniverInstanceService,LocaleService,@@ -28,7 +32,7 @@ import {} from '@univerjs/core';import { FormulaDataModel, FunctionService, IFunctionService, LexerTreeBuilder } from '@univerjs/engine-formula';import { ISocketService, WebSocketService } from '@univerjs/network';-import { SelectionManagerService, SheetInterceptorService, SheetPermissionService } from '@univerjs/sheets';+import { SelectionManagerService, SheetInterceptorService, WorkbookPermissionService, WorksheetPermissionService, WorksheetProtectionPointModel, WorksheetProtectionRuleModel } from '@univerjs/sheets';import {DescriptionService,FormulaCustomFunctionService,@@ -46,6 +50,7 @@ import { Engine, IRenderingEngine, IRenderManagerService, RenderManagerService }import { ISelectionRenderService, SelectionRenderService, SheetCanvasView, SheetRenderController, SheetSkeletonManagerService } from '@univerjs/sheets-ui';import { DesktopPlatformService, DesktopShortcutService, IPlatformService, IShortcutService } from '@univerjs/ui';import { SheetsConditionalFormattingPlugin } from '@univerjs/sheets-conditional-formatting';+import { FUniver } from '../facade';function getTestWorkbookDataDemo(): IWorkbookData {@@ -123,7 +128,6 @@ export function createFacadeTestBed(workbookData?: IWorkbookData, dependencies?:override onStarting(injector: Injector): void {injector.add([SelectionManagerService]);injector.add([SheetInterceptorService]);- injector.add([SheetPermissionService]);injector.add([IRegisterFunctionService, { useClass: RegisterFunctionService }]);injector.add([IDescriptionService,@@ -144,6 +148,11 @@ export function createFacadeTestBed(workbookData?: IWorkbookData, dependencies?:injector.add([SheetSkeletonManagerService]);injector.add([FormulaDataModel]);injector.add([LexerTreeBuilder]);+ injector.add([WorksheetPermissionService]);+ injector.add([WorkbookPermissionService]);+ injector.add([WorksheetProtectionPointModel]);+ injector.add([IAuthzIoService, { useClass: AuthzIoLocalService }]);+ injector.add([WorksheetProtectionRuleModel]);SheetsConditionalFormattingPlugin.dependencyList.forEach((d) => {injector.add(d);diff --git a/packages/facade/src/apis/__tests__/facade.spec.ts b/packages/facade/src/apis/__tests__/facade.spec.tsindex 4e383af37d..6631d0b8e3 100644--- a/packages/facade/src/apis/__tests__/facade.spec.ts+++ b/packages/facade/src/apis/__tests__/facade.spec.ts@@ -261,6 +261,14 @@ describe('Test FUniver', () => {it('Function getSnapshot', () => {const snapshot = univerAPI.getActiveWorkbook()?.getSnapshot();expect(snapshot?.resources).toEqual([+ {+ data: '{}',+ name: 'SHEET_WORKSHEET_PROTECTION_PLUGIN',+ },+ {+ data: '{}',+ name: 'SHEET_WORKSHEET_PROTECTION_POINT_PLUGIN',+ },{name: 'SHEET_CONDITIONAL_FORMATTING_PLUGIN',data: '{"sheet-0011":[{"cfId":"AEGZdW8C","ranges":[{"startRow":2,"startColumn":1,"endRow":11,"endColumn":5,"startAbsoluteRefType":0,"endAbsoluteRefType":0,"rangeType":0}],"rule":{"type":"highlightCell","subType":"text","operator":"containsText","style":{"cl":{"rgb":"#2f56ef"},"bg":{"rgb":"#e8ecfc"}},"value":""},"stopIfTrue":false},{"cfId":"4ICEXdJj","ranges":[{"startRow":2,"startColumn":1,"endRow":11,"endColumn":5,"startAbsoluteRefType":0,"endAbsoluteRefType":0,"rangeType":0}],"rule":{"type":"highlightCell","subType":"text","operator":"containsText","style":{"cl":{"rgb":"#2f56ef"},"bg":{"rgb":"#e8ecfc"}},"value":""},"stopIfTrue":false},{"cfId":"geCv018z","ranges":[{"startRow":2,"startColumn":1,"endRow":11,"endColumn":5,"startAbsoluteRefType":0,"endAbsoluteRefType":0,"rangeType":0}],"rule":{"type":"highlightCell","subType":"text","operator":"containsText","style":{"cl":{"rgb":"#2f56ef"},"bg":{"rgb":"#e8ecfc"}},"value":""},"stopIfTrue":false}]}',diff --git a/packages/network/src/services/http/http.service.ts b/packages/network/src/services/http/http.service.tsindex d1cc08e6dd..7399977b85 100644--- a/packages/network/src/services/http/http.service.ts+++ b/packages/network/src/services/http/http.service.ts@@ -110,6 +110,10 @@ export class HTTPService extends Disposable {return this._request<T>('DELETE', url, options);}+ patch<T>(url: string, options?: IPostRequestParams): Promise<HTTPResponse<T>> {+ return this._request<T>('PATCH', url, options);+ }+/** The HTTP request implementations */private async _request<T>(method: HTTPRequestMethod,@@ -126,7 +130,7 @@ export class HTTPService extends Disposable {params,withCredentials: options?.withCredentials ?? false, // default value for withCredentials is false by MDNresponseType: options?.responseType ?? 'json',- body: (method === 'GET') ? undefined : (options as IPostRequestParams)?.body,+ body: (['GET', 'DELETE'].includes(method)) ? undefined : (options as IPostRequestParams)?.body,});// eslint-disable-next-line ts/no-explicit-anydiff --git a/packages/network/src/services/http/request.ts b/packages/network/src/services/http/request.tsindex e45a23aa4b..ba702b6ab5 100644--- a/packages/network/src/services/http/request.ts+++ b/packages/network/src/services/http/request.ts@@ -19,7 +19,7 @@ import { ApplicationJSONType } from './headers';import type { HTTPResponseType } from './http';import type { HTTPParams } from './params';-export type HTTPRequestMethod = 'GET' | 'POST' | 'PUT' | 'DELETE';+export type HTTPRequestMethod = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';export interface IHTTPRequestParams {// eslint-disable-next-line ts/no-explicit-anydiff --git a/packages/sheet-permission-ui/package.json b/packages/sheet-permission-ui/package.jsonnew file mode 100644index 0000000000..8f76b7e3c0--- /dev/null+++ b/packages/sheet-permission-ui/package.json@@ -0,0 +1,110 @@+{+ "name": "@univerjs/sheets-permission-ui",+ "version": "0.1.7",+ "private": false,+ "description": "permission for Univer Sheets",+ "author": "DreamNum <[email protected]>",+ "license": "Apache-2.0",+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/univer"+ },+ "homepage": "https://univer.ai",+ "repository": {+ "type": "git",+ "url": "https://github.com/dream-num/univer"+ },+ "bugs": {+ "url": "https://github.com/dream-num/univer/issues"+ },+ "keywords": [+ "univer"+ ],+ "exports": {+ ".": "./src/index.ts",+ "./*": "./src/*"+ },+ "main": "./lib/cjs/index.js",+ "module": "./lib/esm/index.js",+ "types": "./lib/types/index.d.ts",+ "publishConfig": {+ "access": "public",+ "main": "./lib/cjs/index.js",+ "module": "./lib/es/index.js",+ "exports": {+ ".": {+ "import": "./lib/es/index.js",+ "require": "./lib/cjs/index.js",+ "types": "./lib/types/index.d.ts"+ },+ "./*": {+ "import": "./lib/es/*",+ "require": "./lib/cjs/*",+ "types": "./lib/types/index.d.ts"+ },+ "./lib/*": "./lib/*"+ }+ },+ "directories": {+ "lib": "lib"+ },+ "files": [+ "lib"+ ],+ "scripts": {+ "dev": "vite",+ "test": "vitest run",+ "test:watch": "vitest",+ "coverage": "vitest run --coverage",+ "build": "tsc && vite build"+ },+ "peerDependencies": {+ "@univerjs/core": "workspace:*",+ "@univerjs/design": "workspace:*",+ "@univerjs/docs": "workspace:*",+ "@univerjs/engine-formula": "workspace:*",+ "@univerjs/sheets": "workspace:*",+ "@univerjs/sheets-conditional-formatting": "workspace:*",+ "@univerjs/sheets-conditional-formatting-ui": "workspace:*",+ "@univerjs/sheets-data-validation": "workspace:*",+ "@univerjs/sheets-filter": "workspace:*",+ "@univerjs/sheets-filter-ui": "workspace:*",+ "@univerjs/sheets-find-replace": "workspace:*",+ "@univerjs/sheets-ui": "workspace:*",+ "@univerjs/ui": "workspace:*",+ "@wendellhu/redi": "0.15.2",+ "clsx": ">=2.0.0",+ "react": "^16.9.0 || ^17.0.0 || ^18.0.0",+ "rxjs": ">=7.0.0"+ },+ "dependencies": {+ "@univerjs/icons": "^0.1.45",+ "@univerjs/protocol": "^0.1.34",+ "@univerjs/sheets-ui": "workspace:*",+ "dayjs": "^1.11.10"+ },+ "devDependencies": {+ "@univerjs/core": "workspace:*",+ "@univerjs/design": "workspace:*",+ "@univerjs/docs": "workspace:*",+ "@univerjs/engine-formula": "workspace:*",+ "@univerjs/engine-render": "workspace:*",+ "@univerjs/shared": "workspace:*",+ "@univerjs/sheets": "workspace:*",+ "@univerjs/sheets-conditional-formatting": "workspace:*",+ "@univerjs/sheets-conditional-formatting-ui": "workspace:*",+ "@univerjs/sheets-data-validation": "workspace:*",+ "@univerjs/sheets-filter": "workspace:*",+ "@univerjs/sheets-filter-ui": "workspace:*",+ "@univerjs/sheets-find-replace": "workspace:*",+ "@univerjs/ui": "workspace:*",+ "@wendellhu/redi": "0.15.2",+ "clsx": "^2.1.0",+ "less": "^4.2.0",+ "react": "^18.2.0",+ "rxjs": "^7.8.1",+ "typescript": "^5.4.5",+ "vite": "^5.2.8",+ "vitest": "^1.4.0"+ }+}diff --git a/packages/sheet-permission-ui/src/command/range-protection.command.ts b/packages/sheet-permission-ui/src/command/range-protection.command.tsnew file mode 100644index 0000000000..8fe83c4db9--- /dev/null+++ b/packages/sheet-permission-ui/src/command/range-protection.command.ts@@ -0,0 +1,373 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import type { ICommand, Workbook } from '@univerjs/core';+import { CommandType, ICommandService, IUndoRedoService, IUniverInstanceService, Rectangle, sequenceExecute, UniverInstanceType } from '@univerjs/core';+import type { IRangeProtectionRule } from '@univerjs/sheets';+import { AddRangeProtectionMutation, AddWorksheetProtectionMutation, DeleteRangeProtectionMutation, DeleteWorksheetProtectionMutation, RangeProtectionRuleModel, SelectionManagerService, SetRangeProtectionMutation, SetWorksheetProtectionMutation, WorksheetProtectionRuleModel } from '@univerjs/sheets';+import { UnitObject } from '@univerjs/protocol';+import { SheetPermissionOpenPanelOperation } from '../operation/sheet-permission-open-panel.operation';+import { SheetPermissionPanelModel } from '../service/sheet-permission-panel.model';+import { DeleteWorksheetProtectionCommand } from './worksheet-protection.command';+import type { IAddRangeProtectionParams, IDeleteRangeProtectionParams, ISetProtectionParams, ISetRangeProtectionParams } from './type';++export const AddRangeProtectionFromToolbarCommand: ICommand = {+ type: CommandType.COMMAND,+ id: 'sheet.command.add-range-protection-from-toolbar',+ async handler(accessor) {+ const commandService = accessor.get(ICommandService);+ const sheetPermissionPanelModel = accessor.get(SheetPermissionPanelModel);+ sheetPermissionPanelModel.resetRule();+ await commandService.executeCommand(SheetPermissionOpenPanelOperation.id, { showDetail: true });+ return true;+ },+};++export const AddRangeProtectionFromContextMenuCommand: ICommand = {+ type: CommandType.COMMAND,+ id: 'sheet.command.add-range-protection-from-context-menu',+ async handler(accessor) {+ const commandService = accessor.get(ICommandService);+ const sheetPermissionPanelModel = accessor.get(SheetPermissionPanelModel);+ sheetPermissionPanelModel.resetRule();+ await commandService.executeCommand(SheetPermissionOpenPanelOperation.id, { showDetail: true });+ return true;+ },+};++export const ViewSheetPermissionFromContextMenuCommand: ICommand = {+ type: CommandType.COMMAND,+ id: 'sheet.command.view-sheet-permission-from-context-menu',+ async handler(accessor) {+ const commandService = accessor.get(ICommandService);+ await commandService.executeCommand(SheetPermissionOpenPanelOperation.id, { showDetail: false });+ return true;+ },+};++export const AddRangeProtectionFromSheetBarCommand: ICommand = {+ type: CommandType.COMMAND,+ id: 'sheet.command.add-range-protection-from-sheet-bar',+ async handler(accessor) {+ const commandService = accessor.get(ICommandService);+ const sheetPermissionPanelModel = accessor.get(SheetPermissionPanelModel);+ sheetPermissionPanelModel.resetRule();+ await commandService.executeCommand(SheetPermissionOpenPanelOperation.id, { fromSheetBar: true, showDetail: true });+ return true;+ },+};++export const ViewSheetPermissionFromSheetBarCommand: ICommand = {+ type: CommandType.COMMAND,+ id: 'sheet.command.view-sheet-permission-from-sheet-bar',+ async handler(accessor) {+ const commandService = accessor.get(ICommandService);+ await commandService.executeCommand(SheetPermissionOpenPanelOperation.id, { showDetail: false });+ return true;+ },+};++export const AddRangeProtectionCommand: ICommand<IAddRangeProtectionParams> = {+ type: CommandType.COMMAND,+ id: 'sheet.command.add-range-protection',+ async handler(accessor, params) {+ if (!params) {+ return false;+ }+ const commandService = accessor.get(ICommandService);+ const undoRedoService = accessor.get(IUndoRedoService);+ const selectionProtectionModel = accessor.get(RangeProtectionRuleModel);+ const { rule, permissionId } = params;++ const { unitId, subUnitId, ranges, name, description } = rule;+ const rules = [{+ ranges,+ permissionId,+ id: selectionProtectionModel.createRuleId(unitId, subUnitId),+ name,+ description,+ }];++ const result = await commandService.executeCommand(AddRangeProtectionMutation.id, {+ unitId,+ subUnitId,+ rules,+ });++ if (result) {+ const redoMutations = [{ id: AddRangeProtectionMutation.id, params: { unitId, subUnitId, rules } }];+ const undoMutations = [{ id: DeleteRangeProtectionMutation.id, params: { unitId, subUnitId, ruleIds: rules.map((rule) => rule.id) } }];+ undoRedoService.pushUndoRedo({+ unitID: unitId,+ redoMutations,+ undoMutations,+ });+ }++ return true;+ },+};++export const DeleteRangeSelectionCommand: ICommand<IDeleteRangeProtectionParams> = {+ type: CommandType.COMMAND,+ id: 'sheet.command.delete-range-protection',+ async handler(accessor, params) {+ if (!params) {+ return false;+ }+ const commandService = accessor.get(ICommandService);+ const undoRedoService = accessor.get(IUndoRedoService);+ const { unitId, subUnitId, rule } = params;++ const redoMutationParam = {+ unitId,+ subUnitId,+ ruleIds: [rule.id],+ };+ const result = await commandService.executeCommand(DeleteRangeProtectionMutation.id, redoMutationParam);++ if (result) {+ undoRedoService.pushUndoRedo({+ unitID: unitId,+ redoMutations: [{ id: DeleteRangeProtectionMutation.id, params: redoMutationParam }],+ undoMutations: [{ id: AddRangeProtectionMutation.id, params: { unitId, subUnitId, rules: [rule] } }],+ });+ }++ return true;+ },+};++export const SetRangeProtectionCommand: ICommand<ISetRangeProtectionParams> = {+ type: CommandType.COMMAND,+ id: 'sheet.command.set-range-protection',+ async handler(accessor, params) {+ if (!params) {+ return false;+ }+ const commandService = accessor.get(ICommandService);+ const selectionProtectionModel = accessor.get(RangeProtectionRuleModel);+ const sheetPermissionPanelModel = accessor.get(SheetPermissionPanelModel);+ const undoRedoService = accessor.get(IUndoRedoService);+ const { rule, permissionId } = params;++ const { unitId, subUnitId, ranges, name, description } = rule;++ if (rule.id) {+ const redoMutationParam = {+ unitId,+ subUnitId,+ ruleId: rule.id,+ rule: {+ ranges,+ permissionId,+ id: selectionProtectionModel.createRuleId(unitId, subUnitId),+ name,+ description,+ },+ };+ const result = await commandService.executeCommand(SetRangeProtectionMutation.id, redoMutationParam);++ if (result) {+ const redoMutations = [{+ id: SetRangeProtectionMutation.id, params: redoMutationParam,+ }];+ const undoMutations = [{+ id: SetRangeProtectionMutation.id, params: {+ unitId,+ subUnitId,+ ruleId: rule.id,+ rule: sheetPermissionPanelModel.oldRule,+ },+ }];+ undoRedoService.pushUndoRedo({+ unitID: unitId,+ redoMutations,+ undoMutations,+ });+ }+ }+ return true;+ },+};++export const DeleteRangeProtectionFromContextMenuCommand: ICommand = {+ type: CommandType.COMMAND,+ id: 'sheet.command.delete-range-protection-from-context-menu',+ async handler(accessor) {+ const commandService = accessor.get(ICommandService);+ const univerInstanceService = accessor.get(IUniverInstanceService);+ const undoRedoService = accessor.get(IUndoRedoService);+ const selectionManagerService = accessor.get(SelectionManagerService);+ const worksheetRuleModel = accessor.get(WorksheetProtectionRuleModel);++ const workbook = univerInstanceService.getCurrentUnitForType<Workbook>(UniverInstanceType.UNIVER_SHEET)!;+ const worksheet = workbook.getActiveSheet()!;+ const unitId = workbook.getUnitId();+ const subUnitId = worksheet.getSheetId();+ const worksheetRule = worksheetRuleModel.getRule(unitId, subUnitId);++ if (worksheetRule?.permissionId && worksheetRule?.name) {+ return commandService.executeCommand(DeleteWorksheetProtectionCommand.id, { unitId, subUnitId, rule: worksheetRule });+ } else {+ const selectRange = selectionManagerService.getLast()?.range;+ if (!selectRange) {+ return false;+ }+ const sheetPermissionRuleModal = accessor.get(RangeProtectionRuleModel);++ const subRuleList = sheetPermissionRuleModal.getSubunitRuleList(unitId, subUnitId);+ const rule = subRuleList.find((item) => {+ return item.ranges.some((range) => Rectangle.intersects(range, selectRange));+ });++ if (rule) {+ const redoMutationParam = {+ unitId,+ subUnitId,+ ruleIds: [rule.id],+ };+ const result = await commandService.executeCommand(DeleteRangeProtectionMutation.id, redoMutationParam);+ if (result) {+ undoRedoService.pushUndoRedo({+ unitID: unitId,+ redoMutations: [{ id: DeleteRangeProtectionMutation.id, params: redoMutationParam }],+ undoMutations: [{ id: AddRangeProtectionMutation.id, params: { unitId, subUnitId, rules: [rule] } }],+ });+ }+ return true;+ } else {+ return false;+ }+ }+ },++};++export const SetRangeProtectionFromContextMenuCommand: ICommand = {+ type: CommandType.COMMAND,+ id: 'sheet.command.set-range-protection-from-context-menu',+ async handler(accessor) {+ const commandService = accessor.get(ICommandService);+ const univerInstanceService = accessor.get(IUniverInstanceService);+ const selectionManagerService = accessor.get(SelectionManagerService);+ const worksheetRuleModel = accessor.get(WorksheetProtectionRuleModel);+ const workbook = univerInstanceService.getCurrentUnitForType<Workbook>(UniverInstanceType.UNIVER_SHEET)!;+ const worksheet = workbook.getActiveSheet()!;+ const unitId = workbook.getUnitId();+ const subUnitId = worksheet.getSheetId();+ const worksheetRule = worksheetRuleModel.getRule(unitId, subUnitId);+ const sheetPermissionPanelModel = accessor.get(SheetPermissionPanelModel);+ if (worksheetRule?.permissionId && worksheetRule?.name) {+ const oldRule = {+ ...worksheetRule,+ unitId,+ subUnitId,+ ranges: [],+ };+ sheetPermissionPanelModel.setRule(oldRule);+ sheetPermissionPanelModel.setOldRule(oldRule);+ await commandService.executeCommand(SheetPermissionOpenPanelOperation.id, { showDetail: true });+ return true;+ } else {+ const selectRange = selectionManagerService.getLast()?.range;+ if (!selectRange) {+ return false;+ }+ const sheetPermissionRuleModal = accessor.get(RangeProtectionRuleModel);+ const subRuleList = sheetPermissionRuleModal.getSubunitRuleList(unitId, subUnitId);+ const rule = subRuleList.find((item) => {+ return item?.ranges?.some((range) => Rectangle.intersects(range, selectRange));+ });++ if (rule) {+ const oldRule = {+ ...rule,+ unitId,+ subUnitId,+ };+ sheetPermissionPanelModel.setRule(oldRule);+ sheetPermissionPanelModel.setOldRule(oldRule);+ await commandService.executeCommand(SheetPermissionOpenPanelOperation.id, { showDetail: true });+ return true;+ } else {+ return false;+ }+ }+ },+};++export const SetProtectionCommand: ICommand<ISetProtectionParams> = {+ type: CommandType.COMMAND,+ id: 'sheet.command.set-protection',+ async handler(accessor, params) {+ if (!params) {+ return false;+ }+ const commandService = accessor.get(ICommandService);+ const undoRedoService = accessor.get(IUndoRedoService);+ const sheetPermissionPanelModel = accessor.get(SheetPermissionPanelModel);+ const rangeProtectionRuleModel = accessor.get(RangeProtectionRuleModel);+ const { rule } = params;+ const { unitId, subUnitId } = rule;++ const redoMutations = [];+ const undoMutations = [];++ const oldRule = sheetPermissionPanelModel.oldRule;++ if (oldRule?.unitType === rule.unitType) {+ if (rule.unitType === UnitObject.Worksheet) {+ redoMutations.push({ id: SetWorksheetProtectionMutation.id, params: { unitId, subUnitId, rule } });+ undoMutations.push({ id: SetWorksheetProtectionMutation.id, params: { unitId, subUnitId, rule: oldRule } });+ } else {+ redoMutations.push({ id: SetRangeProtectionMutation.id, params: { unitId, subUnitId, rule, ruleId: (rule as IRangeProtectionRule).id } });+ undoMutations.push({ id: SetRangeProtectionMutation.id, params: { unitId, subUnitId, ruleId: (oldRule as IRangeProtectionRule).id, rule: oldRule } });+ }+ } else {+ if (oldRule) {+ if (oldRule.unitType === UnitObject.Worksheet) {+ redoMutations.push({ id: DeleteWorksheetProtectionMutation.id, params: { unitId, subUnitId } });+ undoMutations.push({ id: AddWorksheetProtectionMutation.id, params: { unitId, rule: oldRule } });+ } else if (oldRule.unitType === UnitObject.SelectRange) {+ redoMutations.push({ id: DeleteRangeProtectionMutation.id, params: { unitId, subUnitId, ruleIds: [(oldRule as IRangeProtectionRule).id] } });+ undoMutations.push({ id: AddRangeProtectionMutation.id, params: { unitId, subUnitId, rules: [oldRule] } });+ }+ }++ if (rule.unitType === UnitObject.Worksheet) {+ redoMutations.push({ id: AddWorksheetProtectionMutation.id, params: { unitId, rule } });+ undoMutations.unshift({ id: DeleteWorksheetProtectionMutation.id, params: { unitId, subUnitId } });+ } else if (rule.unitType === UnitObject.SelectRange) {+ (rule as IRangeProtectionRule).id = rangeProtectionRuleModel.createRuleId(unitId, subUnitId);+ redoMutations.push({ id: AddRangeProtectionMutation.id, params: { unitId, subUnitId, rules: [rule] } });+ undoMutations.unshift({ id: DeleteRangeProtectionMutation.id, params: { unitId, subUnitId, ruleIds: [(rule as IRangeProtectionRule).id] } });+ }+ }++ const result = sequenceExecute(redoMutations, commandService);++ if (result) {+ undoRedoService.pushUndoRedo({+ unitID: unitId,+ undoMutations,+ redoMutations,+ });+ }++ return true;+ },+};diff --git a/packages/sheet-permission-ui/src/command/type.ts b/packages/sheet-permission-ui/src/command/type.tsnew file mode 100644index 0000000000..4d59a4c04f--- /dev/null+++ b/packages/sheet-permission-ui/src/command/type.ts@@ -0,0 +1,51 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import type { IRangeProtectionRule, IWorksheetProtectionRule } from '@univerjs/sheets';+import type { IPermissionPanelRule } from '../service/sheet-permission-panel.model';++export interface IAddRangeProtectionParams {+ permissionId: string;+ rule: IRangeProtectionRule;+}++export type ISetRangeProtectionParams = IAddRangeProtectionParams;++export interface IDeleteRangeProtectionParams {+ unitId: string;+ subUnitId: string;+ rule: IRangeProtectionRule;+}++export interface IAddWorksheetProtectionParams {+ unitId: string;+ rule: IWorksheetProtectionRule;+}++export interface IDeleteWorksheetProtectionParams {+ unitId: string;+ subUnitId: string;+ rule: IWorksheetProtectionRule;+}++export interface ISetWorksheetProtectionParams {+ permissionId: string;+ rule: IWorksheetProtectionRule;+}++export interface ISetProtectionParams {+ rule: IPermissionPanelRule;+}diff --git a/packages/sheet-permission-ui/src/command/worksheet-protection.command.ts b/packages/sheet-permission-ui/src/command/worksheet-protection.command.tsnew file mode 100644index 0000000000..828f013991--- /dev/null+++ b/packages/sheet-permission-ui/src/command/worksheet-protection.command.ts@@ -0,0 +1,169 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import type { ICommand, Workbook } from '@univerjs/core';+import { CommandType, ICommandService, IUndoRedoService, IUniverInstanceService } from '@univerjs/core';++import { UniverType } from '@univerjs/protocol';++import { AddWorksheetProtectionMutation, DeleteWorksheetProtectionMutation, SetWorksheetProtectionMutation, WorksheetProtectionRuleModel } from '@univerjs/sheets';+import { SheetPermissionPanelModel } from '../service/sheet-permission-panel.model';+import type { IAddWorksheetProtectionParams, IDeleteWorksheetProtectionParams, ISetWorksheetProtectionParams } from './type';++export const AddWorksheetProtectionCommand: ICommand<IAddWorksheetProtectionParams> = {+ type: CommandType.COMMAND,+ id: 'sheet.command.add-worksheet-protection',+ async handler(accessor, params) {+ if (!params) {+ return false;+ }+ const commandService = accessor.get(ICommandService);+ const undoRedoService = accessor.get(IUndoRedoService);+ const { rule, unitId } = params;+ const subUnitId = rule.subUnitId;++ const result = await commandService.executeCommand(AddWorksheetProtectionMutation.id, {+ unitId,+ rule,+ });++ if (result) {+ const redoMutations = [{ id: AddWorksheetProtectionMutation.id, params: { unitId, rule } }];+ const undoMutations = [{ id: DeleteWorksheetProtectionMutation.id, params: { unitId, subUnitId } }];+ undoRedoService.pushUndoRedo({+ unitID: unitId,+ redoMutations,+ undoMutations,+ });+ }++ return true;+ },+};++export const DeleteWorksheetProtectionCommand: ICommand<IDeleteWorksheetProtectionParams> = {+ type: CommandType.COMMAND,+ id: 'sheet.command.delete-worksheet-protection',+ handler(accessor, params) {+ if (!params) {+ return false;+ }+ const commandService = accessor.get(ICommandService);+ const undoRedoService = accessor.get(IUndoRedoService);+ const { rule, unitId, subUnitId } = params;++ commandService.executeCommand(DeleteWorksheetProtectionMutation.id, {+ unitId,+ subUnitId,+ });++ const redoMutations = [{ id: DeleteWorksheetProtectionMutation.id, params: { unitId, subUnitId } }];+ const undoMutations = [{ id: AddWorksheetProtectionMutation.id, params: { unitId, rule } }];+ undoRedoService.pushUndoRedo({+ unitID: unitId,+ redoMutations,+ undoMutations,+ });++ return true;+ },+};++export const SetWorksheetProtectionCommand: ICommand<ISetWorksheetProtectionParams> = {+ type: CommandType.COMMAND,+ id: 'sheet.command.set-worksheet-protection',+ async handler(accessor, params) {+ if (!params) {+ return false;+ }+ const commandService = accessor.get(ICommandService);+ const sheetPermissionPanelModel = accessor.get(SheetPermissionPanelModel);+ const undoRedoService = accessor.get(IUndoRedoService);++ const { rule, permissionId } = params;+ const { unitId, subUnitId } = rule;++ const newRule = { ...rule, permissionId };+ const oldRule = sheetPermissionPanelModel.oldRule;++ const result = await commandService.executeCommand(SetWorksheetProtectionMutation.id, {+ unitId,+ subUnitId,+ newRule,+ });++ if (result) {+ const redoMutations = [{ id: SetWorksheetProtectionMutation.id, params: { unitId, subUnitId, newRule } }];+ const undoMutations = [{ id: SetWorksheetProtectionMutation.id, params: { unitId, subUnitId, rule: oldRule } }];+ undoRedoService.pushUndoRedo({+ unitID: unitId,+ redoMutations,+ undoMutations,+ });+ }++ return true;+ },+};++export const DeleteWorksheetProtectionFormSheetBarCommand: ICommand = {+ type: CommandType.COMMAND,+ id: 'sheet.command.delete-worksheet-protection-from-sheet-bar',+ async handler(accessor, params) {+ if (!params) {+ return false;+ }+ const commandService = accessor.get(ICommandService);+ const undoRedoService = accessor.get(IUndoRedoService);++ const worksheetProtectionRuleModel = accessor.get(WorksheetProtectionRuleModel);+ const univerInstanceService = accessor.get(IUniverInstanceService);++ const workbook = univerInstanceService.getCurrentUnitForType<Workbook>(UniverType.UNIVER_SHEET)!;+ const worksheet = workbook?.getActiveSheet();+ const unitId = workbook.getUnitId();+ const subUnitId = worksheet.getSheetId();++ const rule = worksheetProtectionRuleModel.getRule(unitId, subUnitId);++ const result = await commandService.executeCommand(DeleteWorksheetProtectionCommand.id, {+ unitId,+ subUnitId,+ });++ if (result) {+ const redoMutations = [{ id: DeleteWorksheetProtectionCommand.id, params: { unitId, subUnitId } }];+ const undoMutations = [{ id: AddWorksheetProtectionCommand.id, params: { unitId, rule } }];+ undoRedoService.pushUndoRedo({+ unitID: unitId,+ redoMutations,+ undoMutations,+ });+ }++ return true;+ },+};++export const ChangeSheetProtectionFromSheetBarCommand: ICommand = {+ type: CommandType.COMMAND,+ id: 'sheet.command.change-sheet-protection-from-sheet-bar',+ async handler(accessor) {+ const commandService = accessor.get(ICommandService);+ await commandService.executeCommand('sheet-permission.operation.openDialog');+ return true;+ },+};diff --git a/packages/sheet-permission-ui/src/const.ts b/packages/sheet-permission-ui/src/const.tsnew file mode 100644index 0000000000..502ab20dc4--- /dev/null+++ b/packages/sheet-permission-ui/src/const.ts@@ -0,0 +1,72 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import { UnitAction } from '@univerjs/protocol';++export const UNIVER_SHEET_PERMISSION_PLUGIN_NAME = 'UNIVER_SHEET_PERMISSION_PLUGIN';++export const UNIVER_SHEET_PERMISSION_PANEL = 'UNIVER_SHEET_PERMISSION_PANEL';++export const UNIVER_SHEET_PERMISSION_PANEL_FOOTER = 'UNIVER_SHEET_PERMISSION_PANEL_FOOTER';++export const UNIVER_SHEET_PERMISSION_USER_DIALOG = 'UNIVER_SHEET_PERMISSION_USER_DIALOG';++export const UNIVER_SHEET_PERMISSION_DIALOG = 'UNIVER_SHEET_PERMISSION_DIALOG';++// id+export const UNIVER_SHEET_PERMISSION_USER_DIALOG_ID = 'UNIVER_SHEET_PERMISSION_USER_DIALOG_ID';+export const UNIVER_SHEET_PERMISSION_DIALOG_ID = 'UNIVER_SHEET_PERMISSION_DIALOG_ID';++export const subUnitPermissionTypeMap: Partial<Record<UnitAction, string>> = {+ [UnitAction.Copy]: 'Copy',+ [UnitAction.SetCellStyle]: 'SetCellStyle',+ [UnitAction.SetCellValue]: 'SetCellValue',+ [UnitAction.SetRowStyle]: 'SetRowStyle',+ [UnitAction.SetColumnStyle]: 'SetColumnStyle',+ [UnitAction.InsertRow]: 'InsertRow',+ [UnitAction.InsertColumn]: 'InsertColumn',+ [UnitAction.InsertHyperlink]: 'InsertHyperlink',+ [UnitAction.DeleteRow]: 'DeleteRow',+ [UnitAction.DeleteColumn]: 'DeleteColumn',+ [UnitAction.Sort]: 'Sort',+ [UnitAction.Filter]: 'Filter',+ [UnitAction.PivotTable]: 'PivotTable',+ [UnitAction.EditExtraObject]: 'EditExtraObject',+};++export const defaultWorksheetUnitActionList: UnitAction[] = [+ UnitAction.Copy,+ UnitAction.SetCellStyle,+ UnitAction.SetCellValue,+ UnitAction.SetRowStyle,+ UnitAction.SetColumnStyle,+ UnitAction.InsertRow,+ UnitAction.InsertColumn,+ UnitAction.InsertHyperlink,+ UnitAction.DeleteRow,+ UnitAction.DeleteColumn,+ UnitAction.Sort,+ UnitAction.Filter,+ UnitAction.PivotTable,+ UnitAction.EditExtraObject,+ UnitAction.View,+];++export const permissionMenuIconKey = 'sheet-permission-menu-icon';+export const permissionDeleteIconKey = 'sheet-permission-delete-icon';+export const permissionEditIconKey = 'sheet-permission-edit-icon';+export const permissionCheckIconKey = 'sheet-permission-check-icon';+export const permissionLockIconKey = 'sheet-permission-lock-icon';diff --git a/packages/sheet-permission-ui/src/controller/sheet-permission-init.controller.ts b/packages/sheet-permission-ui/src/controller/sheet-permission-init.controller.tsnew file mode 100644index 0000000000..02e839c90f--- /dev/null+++ b/packages/sheet-permission-ui/src/controller/sheet-permission-init.controller.ts@@ -0,0 +1,301 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import type { Workbook } from '@univerjs/core';+import { IAuthzIoService, IPermissionService, IUniverInstanceService, LifecycleStages, OnLifecycle, RxDisposable, UniverInstanceType, UserManagerService } from '@univerjs/core';++import { defaultWorkbookPermissionPoints, defaultWorksheetPermissionPoint, getAllRangePermissionPoint, getAllWorkbookPermissionPoint, getAllWorksheetPermissionPoint, getAllWorksheetPermissionPointByPointPanel, RangeProtectionRuleModel, WorksheetProtectionPointModel, WorksheetProtectionRuleModel } from '@univerjs/sheets';+import { Inject } from '@wendellhu/redi';+import { IDialogService } from '@univerjs/ui';++import { UnitAction, UnitObject, UniverType } from '@univerjs/protocol';++import type { IRenderContext } from '@univerjs/engine-render';++@OnLifecycle(LifecycleStages.Rendered, SheetPermissionInitController)+export class SheetPermissionInitController extends RxDisposable {+ constructor(+ private readonly _context: IRenderContext<Workbook>,+ @IUniverInstanceService private readonly _univerInstanceService: IUniverInstanceService,+ @IDialogService private readonly _dialogService: IDialogService,+ @IPermissionService private _permissionService: IPermissionService,+ @IAuthzIoService private _authzIoService: IAuthzIoService,+ @Inject(RangeProtectionRuleModel) private _rangeProtectionRuleModel: RangeProtectionRuleModel,+ @Inject(WorksheetProtectionRuleModel) private _worksheetProtectionRuleModel: WorksheetProtectionRuleModel,+ @Inject(UserManagerService) private _userManagerService: UserManagerService,+ @Inject(WorksheetProtectionPointModel) private _worksheetProtectionPointRuleModel: WorksheetProtectionPointModel+ ) {+ super();+ this._initRangePermissionFromSnapshot();+ this._initRangePermissionChange();+ this._initWorksheetPermissionFromSnapshot();+ this._initWorksheetPermissionChange();+ this._initWorksheetPermissionPointsChange();+ this._initWorkbookPermissionChange();+ this._initUserChange();+ }++ private _initRangePermissionFromSnapshot() {+ const allAllowedParams: {+ objectID: string;+ unitID: string;+ objectType: UnitObject;+ actions: UnitAction[];+ }[] = [];+ const workbook = this._univerInstanceService.getCurrentUnitForType<Workbook>(UniverType.UNIVER_SHEET)!;+ const unitId = workbook.getUnitId();+ const allSheets = workbook.getSheets();+ const permissionIdWithRuleInstanceMap = new Map();+ allSheets.forEach((sheet) => {+ const subunitId = sheet.getSheetId();+ this._rangeProtectionRuleModel.getSubunitRuleList(unitId, subunitId).forEach((rule) => {+ permissionIdWithRuleInstanceMap.set(rule.permissionId, rule);+ allAllowedParams.push({+ objectID: rule.permissionId,+ unitID: unitId,+ objectType: UnitObject.SelectRange,+ actions: [UnitAction.View, UnitAction.Edit],+ });+ });+ });++ if (!allAllowedParams.length) {+ return;+ }++ this._authzIoService.batchAllowed(allAllowedParams).then((permissionMap) => {+ permissionMap.forEach((item) => {+ const rule = permissionIdWithRuleInstanceMap.get(item.objectID);+ if (rule) {+ getAllRangePermissionPoint().forEach((F) => {+ const instance = new F(unitId, rule.subUnitId, item.objectID);+ const unitActionName = instance.subType;+ const result = item.actions.find((action) => action.action === unitActionName);+ if (result?.allowed !== undefined) {+ this._permissionService.updatePermissionPoint(instance.id, result.allowed);+ }+ });+ }+ });+ });+ }++ private _initRangePermissionChange() {+ this.disposeWithMe(+ this._rangeProtectionRuleModel.ruleChange$.subscribe((info) => {+ if (info.type !== 'delete') {+ this._authzIoService.allowed({+ objectID: info.rule.permissionId,+ unitID: info.unitId,+ objectType: UnitObject.SelectRange,+ actions: [UnitAction.Edit, UnitAction.View],+ }).then((actionList) => {+ getAllRangePermissionPoint().forEach((F) => {+ if (info.type === 'set') {+ const { rule, oldRule } = info;+ if (rule.permissionId === oldRule?.permissionId) {+ return;+ }+ }+ const rule = info.rule;+ const instance = new F(rule.unitId, rule.subUnitId, rule.permissionId);+ const unitActionName = instance.subType;+ const action = actionList.find((item) => item.action === unitActionName);+ if (action) {+ this._permissionService.updatePermissionPoint(instance.id, action.allowed);+ }+ });+ });+ } else {+ const ruleList = this._rangeProtectionRuleModel.getSubunitRuleList(info.unitId, info.subUnitId);+ if (ruleList.length === 0) {+ this._worksheetProtectionPointRuleModel.deleteRule(info.unitId, info.subUnitId);+ [...getAllWorksheetPermissionPointByPointPanel()].forEach((F) => {+ const instance = new F(info.unitId, info.subUnitId);+ this._permissionService.addPermissionPoint(instance);+ });+ }+ }+ })+ );+ }++ private _initWorkbookPermissionChange() {+ const workbook = this._univerInstanceService.getCurrentUnitForType<Workbook>(UniverInstanceType.UNIVER_SHEET)!;+ const unitId = workbook.getUnitId();+ this._authzIoService.allowed({+ objectID: unitId,+ objectType: UnitObject.Workbook,+ unitID: unitId,+ actions: defaultWorkbookPermissionPoints,+ }).then((actionList) => {+ getAllWorkbookPermissionPoint().forEach((F) => {+ const instance = new F(unitId);+ const unitActionName = instance.subType;+ const action = actionList.find((item) => item.action === unitActionName);+ if (action) {+ this._permissionService.updatePermissionPoint(instance.id, action.allowed);+ }+ });+ });+ }++ private _initWorksheetPermissionChange() {+ this.disposeWithMe(+ this._worksheetProtectionRuleModel.ruleChange$.subscribe((info) => {+ if (info.type !== 'delete') {+ this._authzIoService.allowed({+ objectID: info.rule.permissionId,+ unitID: info.unitId,+ objectType: UnitObject.Worksheet,+ actions: [UnitAction.Edit, UnitAction.View],+ }).then((actionList) => {+ getAllWorksheetPermissionPoint().forEach((F) => {+ const instance = new F(info.unitId, info.subUnitId);+ const unitActionName = instance.subType;+ const action = actionList.find((item) => item.action === unitActionName);+ if (action) {+ this._permissionService.updatePermissionPoint(instance.id, action.allowed);+ }+ });+ });+ } else {+ [...getAllWorksheetPermissionPoint(), ...getAllWorksheetPermissionPointByPointPanel()].forEach((F) => {+ const instance = new F(info.unitId, info.subUnitId);+ this._permissionService.addPermissionPoint(instance);+ });+ this._worksheetProtectionPointRuleModel.deleteRule(info.unitId, info.subUnitId);+ }+ })+ );+ }++ private _initWorksheetPermissionPointsChange() {+ this.disposeWithMe(+ this._worksheetProtectionPointRuleModel.pointChange$.subscribe((info) => {+ this._authzIoService.allowed({+ objectID: info.permissionId,+ unitID: info.unitId,+ objectType: UnitObject.Worksheet,+ actions: defaultWorksheetPermissionPoint,+ }).then((actionList) => {+ getAllWorksheetPermissionPointByPointPanel().forEach((F) => {+ const instance = new F(info.unitId, info.subUnitId);+ const unitActionName = instance.subType;+ const action = actionList.find((item) => item.action === unitActionName);+ if (action) {+ this._permissionService.updatePermissionPoint(instance.id, action.allowed);+ }+ });+ });+ })+ );+ }++ private _initWorksheetPermissionFromSnapshot() {+ const allAllowedParams: {+ objectID: string;+ unitID: string;+ objectType: UnitObject;+ actions: UnitAction[];+ }[] = [];+ const workbook = this._univerInstanceService.getCurrentUnitForType<Workbook>(UniverType.UNIVER_SHEET)!;+ const unitId = workbook.getUnitId();+ const allSheets = workbook.getSheets();+ const permissionIdWithRuleInstanceMap = new Map();+ allSheets.forEach((sheet) => {+ const subUnitId = sheet.getSheetId();+ const rule = this._worksheetProtectionRuleModel.getRule(unitId, subUnitId);+ if (rule) {+ permissionIdWithRuleInstanceMap.set(rule.permissionId, rule);+ allAllowedParams.push({+ objectID: rule.permissionId,+ unitID: unitId,+ objectType: UnitObject.Worksheet,+ actions: [UnitAction.Edit, UnitAction.View],+ });+ }++ const pointRule = this._worksheetProtectionPointRuleModel.getRule(unitId, subUnitId);+ if (pointRule) {+ permissionIdWithRuleInstanceMap.set(pointRule.permissionId, pointRule);+ allAllowedParams.push({+ objectID: pointRule.permissionId,+ unitID: unitId,+ objectType: UnitObject.Worksheet,+ actions: defaultWorksheetPermissionPoint,+ });+ }+ });++ if (!allAllowedParams.length) {+ return;+ }++ this._authzIoService.batchAllowed(allAllowedParams).then((permissionMap) => {+ permissionMap.forEach((item) => {+ const rule = permissionIdWithRuleInstanceMap.get(item.objectID);+ if (rule) {+ [...getAllWorksheetPermissionPoint(), ...getAllWorksheetPermissionPointByPointPanel()].forEach((F) => {+ const instance = new F(unitId, rule.subUnitId);+ const unitActionName = instance.subType;+ const result = item.actions.find((action) => action.action === unitActionName);+ if (result?.allowed !== undefined) {+ this._permissionService.updatePermissionPoint(instance.id, result.allowed);+ }+ });+ }+ });+ });+ }++ private _initUserChange() {+ this.disposeWithMe(+ this._userManagerService.currentUser$.subscribe(() => {+ this._permissionService.clearPermissionMap();+ this._worksheetProtectionRuleModel.changeRuleInitState(false);++ const workbook = this._univerInstanceService.getCurrentUnitForType<Workbook>(UniverInstanceType.UNIVER_SHEET)!;+ const unitId = workbook.getUnitId();++ getAllWorkbookPermissionPoint().forEach((F) => {+ const instance = new F(unitId);+ this._permissionService.addPermissionPoint(instance);+ });++ workbook.getSheets().forEach((sheet) => {+ const subUnitId = sheet.getSheetId();+ [...getAllWorksheetPermissionPoint(), ...getAllWorksheetPermissionPointByPointPanel()].forEach((F) => {+ const instance = new F(unitId, subUnitId);+ this._permissionService.addPermissionPoint(instance);+ });++ const ruleList = this._rangeProtectionRuleModel.getSubunitRuleList(unitId, subUnitId);+ ruleList.forEach((rule) => {+ getAllRangePermissionPoint().forEach((F) => {+ const instance = new F(unitId, subUnitId, rule.permissionId);+ this._permissionService.addPermissionPoint(instance);+ });+ });+ });++ this._initWorkbookPermissionChange();+ this._initWorksheetPermissionFromSnapshot();+ this._initRangePermissionFromSnapshot();+ })+ );+ }+}diff --git a/packages/sheet-permission-ui/src/controller/sheet-permission-interceptor-render.controller.ts b/packages/sheet-permission-ui/src/controller/sheet-permission-interceptor-render.controller.tsnew file mode 100644index 0000000000..97525f511f--- /dev/null+++ b/packages/sheet-permission-ui/src/controller/sheet-permission-interceptor-render.controller.ts@@ -0,0 +1,1003 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++/* eslint-disable complexity */+/* eslint-disable max-lines-per-function */++import type { ICellData, ICellDataForSheetInterceptor, ICommandInfo, IObjectMatrixPrimitiveType, IPermissionTypes, IRange, ISheetDataValidationRule, Nullable, Workbook } from '@univerjs/core';+import { DisposableCollection, ICommandService, IPermissionService, IUniverInstanceService, LifecycleStages, LocaleService, ObjectMatrix, OnLifecycle, Rectangle, RxDisposable, UniverInstanceType } from '@univerjs/core';+import type { IMoveColsCommandParams, IMoveRangeCommandParams, IMoveRowsCommandParams, ISetRangeValuesCommandParams, ISetSpecificColsVisibleCommandParams, ISetSpecificRowsVisibleCommandParams, ISetWorksheetNameMutationParams } from '@univerjs/sheets';+import { ClearSelectionContentCommand, DeleteRangeMoveLeftCommand, DeleteRangeMoveUpCommand, DeltaColumnWidthCommand, DeltaRowHeightCommand, getSheetCommandTarget, InsertRangeMoveDownCommand, InsertRangeMoveRightCommand, MoveColsCommand, MoveRangeCommand, MoveRowsCommand, RangeProtectionPermissionEditPoint, RangeProtectionPermissionViewPoint, RangeProtectionRuleModel, SelectionManagerService, SetBackgroundColorCommand, SetColWidthCommand, SetRangeValuesCommand, SetRowHeightCommand, SetSelectedColsVisibleCommand, SetSelectedRowsVisibleCommand, SetSpecificColsVisibleCommand, SetSpecificRowsVisibleCommand, SetWorksheetNameCommand, SetWorksheetNameMutation, SetWorksheetOrderCommand, SetWorksheetRowIsAutoHeightCommand, SetWorksheetShowCommand, WorkbookCopyPermission, WorkbookEditablePermission, WorkbookManageCollaboratorPermission, WorksheetCopyPermission, WorksheetEditPermission, WorksheetFilterPermission, WorksheetProtectionRuleModel, WorksheetSetCellStylePermission, WorksheetSetCellValuePermission, WorksheetSetColumnStylePermission, WorksheetSetRowStylePermission } from '@univerjs/sheets';+import { Inject } from '@wendellhu/redi';+import { IDialogService } from '@univerjs/ui';++import type { IRenderContext, IRenderController, SpreadsheetSkeleton } from '@univerjs/engine-render';+import type { ISheetPasteParams } from '@univerjs/sheets-ui';+import { ApplyFormatPainterCommand, AutoFillCommand, HeaderMoveRenderController, HeaderResizeRenderController, IAutoFillService, ISelectionRenderService, ISheetClipboardService, SetCellEditVisibleOperation, SetRangeBoldCommand, SetRangeItalicCommand, SetRangeStrickThroughCommand, SetRangeUnderlineCommand, SheetCopyCommand, SheetCutCommand, SheetPasteColWidthCommand, SheetPasteShortKeyCommand, virtualizeDiscreteRanges } from '@univerjs/sheets-ui';+import { SheetsFilterService } from '@univerjs/sheets-filter';+import { OpenFilterPanelOperation } from '@univerjs/sheets-filter-ui';+import { SheetsFindReplaceController } from '@univerjs/sheets-find-replace';+import { InsertCommand } from '@univerjs/docs';+import type { IUpdateSheetDataValidationRangeCommandParams } from '@univerjs/sheets-data-validation';+import { AddSheetDataValidationCommand, DataValidationController, UpdateSheetDataValidationRangeCommand } from '@univerjs/sheets-data-validation';+import type { IAddCfCommandParams } from '@univerjs/sheets-conditional-formatting-ui';+import { AddCfCommand, ConditionalFormattingClearController } from '@univerjs/sheets-conditional-formatting-ui';+import type { IConditionalFormattingRuleConfig, IConditionFormattingRule } from '@univerjs/sheets-conditional-formatting';+import { HeaderFreezeRenderController } from '@univerjs/sheets-ui/controllers/render-controllers/freeze.render-controller.js';+import { UnitAction } from '@univerjs/protocol';+import { UNIVER_SHEET_PERMISSION_ALERT_DIALOG, UNIVER_SHEET_PERMISSION_ALERT_DIALOG_ID } from '../views/error-msg-dialog/interface';++type ICellPermission = Record<UnitAction, boolean> & { ruleId?: string; ranges?: IRange[] };+type ICheckPermissionCommandParams = IMoveRowsCommandParams | IMoveColsCommandParams | IMoveRangeCommandParams | ISetRangeValuesCommandParams | ISheetPasteParams | ISetSpecificRowsVisibleCommandParams | IUpdateSheetDataValidationRangeCommandParams | IAddCfCommandParams;++const SmartToggleSheetsFilterCommandId = 'sheet.command.smart-toggle-filter';++export const SHEET_PERMISSION_PASTE_PLUGIN = 'SHEET_PERMISSION_PASTE_PLUGIN';++@OnLifecycle(LifecycleStages.Rendered, SheetPermissionInterceptorRenderController)+export class SheetPermissionInterceptorRenderController extends RxDisposable implements IRenderController {+ disposableCollection = new DisposableCollection();++ constructor(+ private readonly _context: IRenderContext<Workbook>,+ @ICommandService private readonly _commandService: ICommandService,+ @IUniverInstanceService private readonly _univerInstanceService: IUniverInstanceService,+ @IPermissionService private readonly _permissionService: IPermissionService,+ @Inject(SelectionManagerService) private readonly _selectionManagerService: SelectionManagerService,+ @IDialogService private readonly _dialogService: IDialogService,+ @Inject(RangeProtectionRuleModel) private _rangeProtectionRuleModel: RangeProtectionRuleModel,+ @Inject(WorksheetProtectionRuleModel) private _worksheetProtectionRuleModel: WorksheetProtectionRuleModel,+ @Inject(HeaderMoveRenderController) private _headerMoveRenderController: HeaderMoveRenderController,+ @Inject(HeaderResizeRenderController) private _headerResizeRenderController: HeaderResizeRenderController,+ @ISelectionRenderService private _selectionRenderService: ISelectionRenderService,+ @IAutoFillService private _autoFillService: IAutoFillService,+ @Inject(SheetsFilterService) private _sheetsFilterService: SheetsFilterService,+ @Inject(SheetsFindReplaceController) private _sheetsFindReplaceController: SheetsFindReplaceController,+ @Inject(LocaleService) private readonly _localService: LocaleService,+ @Inject(DataValidationController) private readonly _dataValidationController: DataValidationController,+ @Inject(ConditionalFormattingClearController) private readonly _conditionalFormattingClearController: ConditionalFormattingClearController,+ @Inject(ISheetClipboardService) private _sheetClipboardService: ISheetClipboardService,+ @Inject(HeaderFreezeRenderController) private _headerFreezeRenderController: HeaderFreezeRenderController+ ) {+ super();+ this._initialize();+ this._initHeaderMovePermissionInterceptor();+ this._initHeaderResizePermissionInterceptor();+ this._initRangeFillPermissionInterceptor();+ this._initRangeMovePermissionInterceptor();+ this._initSheetFindPermissionInterceptor();+ this._initDataValidationPermissionInterceptor();+ this._initConditionalFormattingPermissionInterceptor();+ this._initFreezePermissionInterceptor();+ this._initClipboardHook();+ }++ private _haveNotPermissionHandle(errorMsg: string) {+ const dialogProps = {+ id: UNIVER_SHEET_PERMISSION_ALERT_DIALOG_ID,+ title: { title: '' },+ children: {+ label: UNIVER_SHEET_PERMISSION_ALERT_DIALOG,+ errorMsg,+ },+ width: 320,+ destroyOnClose: true,+ onClose: () => this._dialogService.close(UNIVER_SHEET_PERMISSION_ALERT_DIALOG_ID),+ className: 'sheet-permission-user-dialog',+ };+ this._dialogService.open(dialogProps);+ throw new Error('have not permission');+ }++ private _getPermissionCheck(id: string, params: ICheckPermissionCommandParams) {+ let permission = true;+ let errorMsg = '';+ switch (id) {+ case InsertCommand.id:+ case SetCellEditVisibleOperation.id:+ permission = this._permissionCheckWithoutRange({+ workbookTypes: [WorkbookEditablePermission],+ rangeTypes: [RangeProtectionPermissionEditPoint],+ worksheetTypes: [WorksheetSetCellValuePermission, WorksheetEditPermission],+ });+ errorMsg = this._localService.t('permission.dialog.editErr');+ break;+ case SetRangeValuesCommand.id:+ permission = this._permissionCheckBySetRangeValue({+ workbookTypes: [WorkbookEditablePermission],+ rangeTypes: [RangeProtectionPermissionEditPoint],+ worksheetTypes: [WorksheetSetCellValuePermission, WorksheetEditPermission],+ }, params as ISetRangeValuesCommandParams);+ break;+ case ClearSelectionContentCommand.id:+ permission = this._permissionCheckWithRanges({+ workbookTypes: [WorkbookEditablePermission],+ rangeTypes: [RangeProtectionPermissionEditPoint],+ worksheetTypes: [WorksheetSetCellValuePermission, WorksheetEditPermission],+ });+ errorMsg = this._localService.t('permission.dialog.editErr');+ break;+ case SheetPasteColWidthCommand.id:+ permission = this._permissionCheckWithoutRange({+ workbookTypes: [WorkbookEditablePermission],+ rangeTypes: [RangeProtectionPermissionEditPoint],+ worksheetTypes: [WorksheetEditPermission, WorksheetSetColumnStylePermission],+ });+ errorMsg = this._localService.t('permission.dialog.pasteErr');+ break;+ case SheetPasteShortKeyCommand.id:+ permission = this._permissionCheckByPaste(params as ISheetPasteParams);+ errorMsg = this._localService.t('permission.dialog.pasteErr');+ break;+ case ApplyFormatPainterCommand.id:+ permission = this._permissionCheckWithRanges({+ workbookTypes: [WorkbookEditablePermission],+ rangeTypes: [RangeProtectionPermissionEditPoint],+ worksheetTypes: [WorksheetEditPermission, WorksheetSetCellValuePermission, WorksheetSetCellStylePermission],+ });+ errorMsg = this._localService.t('permission.dialog.commonErr');+ break;+ case SetBackgroundColorCommand.id:+ case SetRangeBoldCommand.id:+ case SetRangeItalicCommand.id:+ case SetRangeUnderlineCommand.id:+ case SetRangeStrickThroughCommand.id:+ permission = this._permissionCheckWithRanges({+ workbookTypes: [WorkbookEditablePermission],+ rangeTypes: [RangeProtectionPermissionEditPoint],+ worksheetTypes: [WorksheetSetCellStylePermission, WorksheetEditPermission],+ });+ errorMsg = this._localService.t('permission.dialog.setStyleErr');+ break;+ case SheetCopyCommand.id:+ case SheetCutCommand.id:+ permission = this._permissionCheckWithRanges({+ workbookTypes: [WorkbookCopyPermission],+ rangeTypes: [RangeProtectionPermissionViewPoint],+ worksheetTypes: [WorksheetCopyPermission],+ });+ errorMsg = this._localService.t('permission.dialog.copyErr');+ break;+ case DeltaColumnWidthCommand.id:+ case SetColWidthCommand.id:+ permission = this._permissionCheckWithoutRange({+ workbookTypes: [WorkbookEditablePermission],+ rangeTypes: [RangeProtectionPermissionEditPoint],+ worksheetTypes: [WorksheetSetRowStylePermission, WorksheetEditPermission],+ });+ errorMsg = this._localService.t('permission.dialog.setRowColStyleErr');+ break;++ case DeltaRowHeightCommand.id:+ case SetRowHeightCommand.id:+ case SetWorksheetRowIsAutoHeightCommand.id:+ permission = this._permissionCheckWithoutRange({+ workbookTypes: [WorkbookEditablePermission],+ rangeTypes: [RangeProtectionPermissionEditPoint],+ worksheetTypes: [WorksheetSetRowStylePermission, WorksheetEditPermission],+ });+ errorMsg = this._localService.t('permission.dialog.setRowColStyleErr');+ break;+ case MoveColsCommand.id:+ case MoveRowsCommand.id:+ permission = this._permissionCheckByMoveCommand(params as IMoveColsCommandParams);+ errorMsg = this._localService.t('permission.dialog.moveRowColErr');+ break;++ case MoveRangeCommand.id:+ permission = this._permissionCheckByMoveRangeCommand(params as IMoveRangeCommandParams);+ errorMsg = this._localService.t('permission.dialog.moveRangeErr');+ break;++ case AutoFillCommand.id:+ permission = this._permissionCheckByAutoFillCommand(this._autoFillService.autoFillLocation?.target);+ errorMsg = this._localService.t('permission.dialog.autoFillErr');+ break;++ case SmartToggleSheetsFilterCommandId:+ permission = this._permissionCheckWithoutRange({+ workbookTypes: [WorkbookEditablePermission],+ rangeTypes: [RangeProtectionPermissionViewPoint],+ worksheetTypes: [WorksheetFilterPermission, WorksheetEditPermission],+ });+ errorMsg = this._localService.t('permission.dialog.filterErr');+ break;+ case SetWorksheetOrderCommand.id:+ case SetWorksheetNameCommand.id:+ case SetWorksheetShowCommand.id:+ permission = this._permissionCheckByWorksheetCommand();+ errorMsg = this._localService.t('permission.dialog.operatorSheetErr');+ if (permission === false) {+ this._worksheetProtectionRuleModel.resetOrder();+ }+ break;+ case OpenFilterPanelOperation.id:+ permission = this._permissionCheckWithFilter();+ errorMsg = this._localService.t('permission.dialog.filterErr');+ break;++ case SetSpecificColsVisibleCommand.id:+ permission = this._permissionCheckWithRanges({+ workbookTypes: [WorkbookEditablePermission],+ rangeTypes: [RangeProtectionPermissionEditPoint],+ worksheetTypes: [WorksheetEditPermission, WorksheetSetColumnStylePermission],+ }, (params as ISetSpecificColsVisibleCommandParams).ranges);+ errorMsg = this._localService.t('permission.dialog.setRowColStyleErr');+ break;+ case SetSpecificRowsVisibleCommand.id:+ permission = this._permissionCheckWithRanges({+ workbookTypes: [WorkbookEditablePermission],+ rangeTypes: [RangeProtectionPermissionEditPoint],+ worksheetTypes: [WorksheetEditPermission, WorksheetSetRowStylePermission],+ }, (params as ISetSpecificRowsVisibleCommandParams).ranges);+ errorMsg = this._localService.t('permission.dialog.setRowColStyleErr');+ break;+ case SetSelectedColsVisibleCommand.id:+ permission = this._permissionCheckWithRanges({+ workbookTypes: [WorkbookEditablePermission],+ rangeTypes: [RangeProtectionPermissionEditPoint],+ worksheetTypes: [WorksheetEditPermission, WorksheetSetColumnStylePermission],+ });+ errorMsg = this._localService.t('permission.dialog.setRowColStyleErr');+ break;+ case SetSelectedRowsVisibleCommand.id:+ permission = this._permissionCheckWithRanges({+ workbookTypes: [WorkbookEditablePermission],+ rangeTypes: [RangeProtectionPermissionEditPoint],+ worksheetTypes: [WorksheetEditPermission, WorksheetSetRowStylePermission],+ });+ errorMsg = this._localService.t('permission.dialog.setRowColStyleErr');+ break;++ case AddSheetDataValidationCommand.id:+ permission = this._permissionCheckWithRanges({+ workbookTypes: [WorkbookEditablePermission],+ rangeTypes: [RangeProtectionPermissionEditPoint],+ worksheetTypes: [WorksheetEditPermission, WorksheetSetCellStylePermission],+ });+ errorMsg = this._localService.t('permission.dialog.setStyleErr');+ break;+ case UpdateSheetDataValidationRangeCommand.id:+ permission = this._permissionCheckWithRanges({+ workbookTypes: [WorkbookEditablePermission],+ rangeTypes: [RangeProtectionPermissionEditPoint],+ worksheetTypes: [WorksheetEditPermission, WorksheetSetCellStylePermission],+ }, (params as IUpdateSheetDataValidationRangeCommandParams).ranges);+ errorMsg = this._localService.t('permission.dialog.setStyleErr');+ break;++ case AddCfCommand.id:+ permission = this._permissionCheckWithRanges({+ workbookTypes: [WorkbookEditablePermission],+ rangeTypes: [RangeProtectionPermissionEditPoint],+ worksheetTypes: [WorksheetEditPermission, WorksheetSetCellStylePermission],+ }, (params as IAddCfCommandParams).rule.ranges);+ errorMsg = this._localService.t('permission.dialog.setStyleErr');+ break;++ case InsertRangeMoveRightCommand.id:+ permission = this._permissionCheckWithInsertRangeMove('right');+ errorMsg = this._localService.t('permission.dialog.insertOrDeleteMoveRangeErr');+ break;+ case InsertRangeMoveDownCommand.id:+ permission = this._permissionCheckWithInsertRangeMove('bottom');+ errorMsg = this._localService.t('permission.dialog.insertOrDeleteMoveRangeErr');+ break;+ case DeleteRangeMoveLeftCommand.id:+ permission = this._permissionCheckWithInsertRangeMove('left');+ errorMsg = this._localService.t('permission.dialog.insertOrDeleteMoveRangeErr');+ break;+ case DeleteRangeMoveUpCommand.id:+ permission = this._permissionCheckWithInsertRangeMove('top');+ errorMsg = this._localService.t('permission.dialog.insertOrDeleteMoveRangeErr');+ break;+ default:+ break;+ }++ if (!permission) {+ this._haveNotPermissionHandle(errorMsg);+ }+ };++ private _initialize(): void {+ this._commandExecutedListener();+ }++ private _commandExecutedListener() {+ // @ybzky todo If encounter problems with multiple instances later, you need to increase the unitId in command params.+ this.disposeWithMe(+ this._commandService.beforeCommandExecuted((command: ICommandInfo) => {+ this._getPermissionCheck(command.id, command?.params as ICheckPermissionCommandParams);+ })+ );+ this.disposeWithMe(+ this._commandService.onCommandExecuted((command: ICommandInfo) => {+ if (command.id === SetWorksheetNameMutation.id) {+ const params = command.params as ISetWorksheetNameMutationParams;+ const { unitId = this._univerInstanceService.getCurrentUnitForType<Workbook>(UniverInstanceType.UNIVER_SHEET)?.getUnitId(), subUnitId } = params;+ if (!unitId || !subUnitId) {+ return;+ }+ const worksheetRule = this._worksheetProtectionRuleModel.getRule(unitId, subUnitId);+ const selectionRuleList = this._rangeProtectionRuleModel.getSubunitRuleList(unitId, subUnitId);+ if (worksheetRule) {+ this._worksheetProtectionRuleModel.ruleRefresh(worksheetRule.permissionId);+ }+ if (selectionRuleList.length) {+ this._rangeProtectionRuleModel.ruleRefresh(subUnitId);+ }+ }+ })+ );+ }++ private _permissionCheckWithInsertRangeMove(direction: 'top' | 'bottom' | 'left' | 'right') {+ const target = getSheetCommandTarget(this._univerInstanceService);+ if (!target) {+ return false;+ }+ const { worksheet, unitId, subUnitId } = target;+ const selectionRange = this._selectionManagerService.getLast()?.range;+ if (!selectionRange) {+ return false;+ };+ if (direction === 'top') {+ selectionRange.startRow = 0;+ } else if (direction === 'left') {+ selectionRange.startColumn = 0;+ } else if (direction === 'right') {+ selectionRange.endColumn = worksheet.getColumnCount() - 1;+ } else if (direction === 'bottom') {+ selectionRange.endRow = worksheet.getRowCount() - 1;+ }++ const selectionRuleRanges = this._rangeProtectionRuleModel.getSubunitRuleList(unitId, subUnitId).map((rule) => rule.ranges).flat();+ const hasLap = selectionRuleRanges.some((range) => {+ return Rectangle.getIntersects(selectionRange, range);+ });+ if (hasLap) {+ return false;+ }+ return true;+ }++ private _permissionCheckWithFilter() {+ const target = getSheetCommandTarget(this._univerInstanceService);+ if (!target) {+ return false;+ }+ const { unitId, subUnitId } = target;+ const filterRange = this._sheetsFilterService.getFilterModel(unitId, subUnitId)?.getRange();+ if (filterRange) {+ return this._permissionCheckWithRanges({+ workbookTypes: [WorkbookEditablePermission],+ rangeTypes: [RangeProtectionPermissionViewPoint],+ worksheetTypes: [WorksheetFilterPermission, WorksheetEditPermission],+ }, [filterRange]);+ }+ return true;+ }++ private _permissionCheckByWorksheetCommand() {+ const target = getSheetCommandTarget(this._univerInstanceService);+ if (!target) {+ return false;+ }+ const { unitId, subUnitId } = target;+ const worksheetRule = this._worksheetProtectionRuleModel.getRule(unitId, subUnitId);+ const selectionRule = this._rangeProtectionRuleModel.getSubunitRuleList(unitId, subUnitId).length > 0;+ if (worksheetRule || selectionRule) {+ return this._permissionService.getPermissionPoint(new WorkbookManageCollaboratorPermission(unitId).id)?.value ?? false;+ } else {+ return this._permissionService.getPermissionPoint(new WorkbookEditablePermission(unitId).id)?.value ?? false;+ }+ }++ private _permissionCheckWithoutRange(permissionTypes: IPermissionTypes) {+ const target = getSheetCommandTarget(this._univerInstanceService);+ if (!target) {+ return false;+ }+ const { worksheet, unitId, subUnitId } = target;+ const selection = this._selectionManagerService.getLast();+ const row = selection?.primary?.actualRow ?? 0;+ const col = selection?.primary?.actualColumn ?? 0;+ const { workbookTypes = [WorkbookEditablePermission], worksheetTypes, rangeTypes } = permissionTypes;+ if (workbookTypes) {+ const workbookDisable = workbookTypes.some((F) => {+ const instance = new F(unitId);+ const permission = this._permissionService.getPermissionPoint(instance.id)?.value ?? false;+ return permission === false;+ });+ if (workbookDisable === true) {+ return false;+ }+ }+ if (worksheetTypes) {+ const worksheetDisable = worksheetTypes.some((F) => {+ const instance = new F(unitId, subUnitId);+ const permission = this._permissionService.getPermissionPoint(instance.id)?.value ?? false;+ return permission === false;+ });+ if (worksheetDisable === true) {+ return false;+ }+ }+ if (rangeTypes) {+ const rangeDisable = rangeTypes.some((F) => {+ const cellInfo = (worksheet.getCell(row, col) as (ICellDataForSheetInterceptor & { selectionProtection: ICellPermission[] }))?.selectionProtection?.[0];+ if (!cellInfo?.ruleId) {+ return false;+ }+ const permissionId = this._rangeProtectionRuleModel.getRule(unitId, subUnitId, cellInfo.ruleId)?.permissionId;+ if (!permissionId) {+ return false;+ }+ const instance = new F(unitId, subUnitId, permissionId);+ const permission = this._permissionService.getPermissionPoint(instance.id)?.value ?? false;+ return permission === false;+ });+ if (rangeDisable === true) {+ return false;+ }+ }+ return true;+ }++ private _permissionCheckWithRanges(permissionTypes: IPermissionTypes, selectionRanges?: IRange[], unitId?: string, subUnitId?: string) {+ const target = getSheetCommandTarget(this._univerInstanceService);+ if (!target) {+ return false;+ }+ const { workbook, worksheet } = target;+ if (!unitId) {+ unitId = workbook.getUnitId();+ }+ if (!subUnitId) {+ subUnitId = worksheet.getSheetId();+ }+ const ranges = selectionRanges ?? this._selectionManagerService.getSelections()?.map((selection) => {+ return selection.range;+ });++ if (!ranges) {+ return false;+ }++ const { workbookTypes = [WorkbookEditablePermission], worksheetTypes, rangeTypes } = permissionTypes;+ if (workbookTypes) {+ const workbookDisable = workbookTypes.some((F) => {+ const instance = new F(unitId);+ const permission = this._permissionService.getPermissionPoint(instance.id)?.value ?? false;+ return permission === false;+ });+ if (workbookDisable === true) {+ return false;+ }+ }+ if (worksheetTypes) {+ const worksheetDisable = worksheetTypes.some((F) => {+ const instance = new F(unitId, subUnitId);+ const permission = this._permissionService.getPermissionPoint(instance.id)?.value ?? false;+ return permission === false;+ });+ if (worksheetDisable === true) {+ return false;+ }+ }+ if (rangeTypes) {+ const hasPermission = ranges?.every((range) => {+ return rangeTypes.every((F) => {+ for (let row = range.startRow; row <= range.endRow; row++) {+ for (let col = range.startColumn; col <= range.endColumn; col++) {+ const cellInfo = (worksheet.getCell(row, col) as (ICellDataForSheetInterceptor & { selectionProtection: ICellPermission[] }))?.selectionProtection?.[0];+ if (!cellInfo?.ruleId) {+ continue;+ }+ const permissionId = this._rangeProtectionRuleModel.getRule(unitId, subUnitId, cellInfo.ruleId)?.permissionId;+ if (!permissionId) {+ continue;+ }+ const instance = new F(unitId, subUnitId, permissionId);+ const permission = this._permissionService.getPermissionPoint(instance.id)?.value ?? false;+ if (permission === false) {+ return false;+ }+ }+ }+ return true;+ });+ });+ return hasPermission;+ }++ return true;+ }++ private _permissionCheckByPaste(params: ISheetPasteParams) {+ if (params.value === 'special-paste-value' || params.value === 'special-paste-formula') {+ return this._permissionCheckWithRanges({+ workbookTypes: [WorkbookEditablePermission],+ rangeTypes: [RangeProtectionPermissionEditPoint],+ worksheetTypes: [WorksheetSetCellStylePermission, WorksheetEditPermission],+ });+ } else if (params.value === 'special-paste-format') {+ return this._permissionCheckWithRanges({+ workbookTypes: [WorkbookEditablePermission],+ rangeTypes: [RangeProtectionPermissionEditPoint],+ worksheetTypes: [WorksheetSetCellStylePermission, WorksheetEditPermission],+ });+ } else {+ return this._permissionCheckWithRanges({+ workbookTypes: [WorkbookEditablePermission],+ rangeTypes: [RangeProtectionPermissionEditPoint],+ worksheetTypes: [WorksheetSetCellValuePermission, WorksheetSetCellStylePermission, WorksheetEditPermission],+ });+ }+ }++ private _permissionCheckByMoveCommand(params: IMoveRowsCommandParams | IMoveColsCommandParams) {+ const target = getSheetCommandTarget(this._univerInstanceService);+ if (!target) {+ return false;+ }+ const { worksheet, unitId, subUnitId } = target;+ const toRange = params.toRange;+ if (toRange.endRow === worksheet.getRowCount() - 1) {+ toRange.endColumn = toRange.startColumn;+ } else {+ toRange.endRow = toRange.startRow;+ }+ const permissionLapRanges = this._rangeProtectionRuleModel.getSubunitRuleList(unitId, subUnitId).reduce((p, c) => {+ return [...p, ...c.ranges];+ }, [] as IRange[]).filter((range) => {+ return Rectangle.intersects(range, toRange);+ });++ if (permissionLapRanges.length > 0) {+ return false;+ }+ permissionLapRanges.forEach((range) => {+ for (let row = range.startRow; row <= range.endRow; row++) {+ for (let col = range.startColumn; col <= range.endColumn; col++) {+ const permission = (worksheet.getCell(row, col) as (ICellDataForSheetInterceptor & { selectionProtection: ICellPermission[] }))?.selectionProtection?.[0];+ if (permission?.[UnitAction.Edit] === false) {+ return false;+ }+ }+ }+ });+ return true;+ }++ private _permissionCheckByAutoFillCommand(params?: { rows: number[]; cols: number[] }) {+ if (!params) {+ return false;+ }+ const { rows, cols } = params;+ const startRow = rows[0];+ const endRow = rows[rows.length - 1];+ const startCol = cols[0];+ const endCol = cols[cols.length - 1];++ const targetRange = { startRow, endRow, startColumn: startCol, endColumn: endCol };++ const target = getSheetCommandTarget(this._univerInstanceService);+ if (!target) {+ return false;+ }+ const { worksheet, unitId, subUnitId } = target;++ const permissionLapRanges = this._rangeProtectionRuleModel.getSubunitRuleList(unitId, subUnitId).reduce((p, c) => {+ return [...p, ...c.ranges];+ }, [] as IRange[]).filter((range) => {+ return Rectangle.intersects(range, targetRange);+ });++ const hasNotPermission = permissionLapRanges.some((range) => {+ for (let row = range.startRow; row <= range.endRow; row++) {+ for (let col = range.startColumn; col <= range.endColumn; col++) {+ const permission = (worksheet.getCell(row, col) as (ICellDataForSheetInterceptor & { selectionProtection: ICellPermission[] }))?.selectionProtection?.[0];+ if (permission?.[UnitAction.Edit] === false) {+ return true;+ }+ }+ }+ return false;+ });++ return !hasNotPermission;+ }++ private _permissionCheckByMoveRangeCommand(params: IMoveRangeCommandParams) {+ const target = getSheetCommandTarget(this._univerInstanceService);+ if (!target) {+ return false;+ }+ const { worksheet, unitId, subUnitId } = target;+ const toRange = params.toRange;+ const permissionLapRanges = this._rangeProtectionRuleModel.getSubunitRuleList(unitId, subUnitId).reduce((p, c) => {+ return [...p, ...c.ranges];+ }, [] as IRange[]).filter((range) => {+ return Rectangle.intersects(range, toRange);+ });++ if (permissionLapRanges.length > 0) {+ return false;+ }+ permissionLapRanges.forEach((range) => {+ for (let row = range.startRow; row <= range.endRow; row++) {+ for (let col = range.startColumn; col <= range.endColumn; col++) {+ const permission = (worksheet.getCell(row, col) as (ICellDataForSheetInterceptor & { selectionProtection: ICellPermission[] }))?.selectionProtection?.[0];+ if (permission?.[UnitAction.Edit] === false) {+ return false;+ }+ }+ }+ });+ return true;+ }++ private _permissionCheckBySetRangeValue(permissionTypes: IPermissionTypes, setRangeValueParams: ISetRangeValuesCommandParams) {+ let ranges: IRange[] = [];+ if (setRangeValueParams.range) {+ ranges = [setRangeValueParams.range];+ } else {+ const matrix = new ObjectMatrix(setRangeValueParams.value as IObjectMatrixPrimitiveType<ICellData>);+ const range = matrix.getDataRange();+ ranges = [range];+ }+ const { unitId, subUnitId } = setRangeValueParams;+ return this._permissionCheckWithRanges(permissionTypes, ranges, unitId, subUnitId);+ }++ private _initHeaderMovePermissionInterceptor() {+ this._headerMoveRenderController.interceptor.intercept(this._headerMoveRenderController.interceptor.getInterceptPoints().HEADER_MOVE_PERMISSION_CHECK, {+ handler: (defaultValue: Nullable<boolean>, selectionRange: IRange) => {+ const target = getSheetCommandTarget(this._univerInstanceService);+ if (!target) {+ return false;+ }+ const { worksheet, unitId, subUnitId } = target;++ const workSheetEditPermission = this._permissionService.getPermissionPoint(new WorksheetEditPermission(unitId, subUnitId).id)?.value ?? false;+ if (!workSheetEditPermission) {+ return false;+ }++ if (!selectionRange) {+ return true;+ }++ const protectionLapRange = this._rangeProtectionRuleModel.getSubunitRuleList(unitId, subUnitId).reduce((p, c) => {+ return [...p, ...c.ranges];+ }, [] as IRange[]).filter((range) => {+ return Rectangle.intersects(range, selectionRange);+ });++ const haveNotPermission = protectionLapRange.some((range) => {+ const { startRow, startColumn, endRow, endColumn } = range;+ for (let row = startRow; row <= endRow; row++) {+ for (let col = startColumn; col <= endColumn; col++) {+ const permission = (worksheet.getCell(row, col) as (ICellDataForSheetInterceptor & { selectionProtection: ICellPermission[] }))?.selectionProtection?.[0];+ if (permission?.[UnitAction.Edit] === false) {+ return true;+ }+ }+ }+ return false;+ });++ return !haveNotPermission;+ },+ });+ }++ private _initHeaderResizePermissionInterceptor() {+ this._headerResizeRenderController.interceptor.intercept(this._headerResizeRenderController.interceptor.getInterceptPoints().HEADER_RESIZE_PERMISSION_CHECK, {+ handler: (defaultValue: Nullable<boolean>, rangeParams: { row?: number; col?: number }) => {+ const target = getSheetCommandTarget(this._univerInstanceService);+ if (!target) {+ return false;+ }+ const { worksheet, unitId, subUnitId } = target;++ const workSheetEditPermission = this._permissionService.getPermissionPoint(new WorksheetEditPermission(unitId, subUnitId).id)?.value ?? false;+ if (!workSheetEditPermission) {+ return false;+ }++ if (rangeParams.row) {+ const setRowStylePermission = this._permissionService.getPermissionPoint(new WorksheetSetRowStylePermission(unitId, subUnitId).id)?.value ?? false;+ if (setRowStylePermission === false) {+ return false;+ }+ } else if (rangeParams.col) {+ const setColStylePermission = this._permissionService.getPermissionPoint(new WorksheetSetColumnStylePermission(unitId, subUnitId).id)?.value ?? false;+ if (setColStylePermission === false) {+ return false;+ }+ }++ let selectionRange: Nullable<IRange>;++ if (rangeParams.row !== undefined) {+ selectionRange = {+ startRow: rangeParams.row,+ endRow: rangeParams.row,+ startColumn: 0,+ endColumn: worksheet.getColumnCount() - 1,+ };+ } else if (rangeParams.col !== undefined) {+ selectionRange = {+ startRow: 0,+ endRow: worksheet.getRowCount() - 1,+ startColumn: rangeParams.col,+ endColumn: rangeParams.col,+ };+ }++ if (!selectionRange) {+ return true;+ }++ const protectionLapRange = this._rangeProtectionRuleModel.getSubunitRuleList(unitId, subUnitId).reduce((p, c) => {+ return [...p, ...c.ranges];+ }, [] as IRange[]).filter((range) => {+ return Rectangle.intersects(range, selectionRange);+ });++ const haveNotPermission = protectionLapRange.some((range) => {+ const { startRow, startColumn, endRow, endColumn } = range;+ for (let row = startRow; row <= endRow; row++) {+ for (let col = startColumn; col <= endColumn; col++) {+ const permission = (worksheet.getCell(row, col) as (ICellDataForSheetInterceptor & { selectionProtection: ICellPermission[] }))?.selectionProtection?.[0];+ if (permission?.[UnitAction.Edit] === false) {+ return true;+ }+ }+ }+ return false;+ });++ return !haveNotPermission;+ },+ });+ }++ private _initRangeFillPermissionInterceptor() {+ this._selectionRenderService.interceptor.intercept(this._selectionRenderService.interceptor.getInterceptPoints().RANGE_FILL_PERMISSION_CHECK, {+ handler: (_: Nullable<boolean>, position: { x: number; y: number; skeleton: SpreadsheetSkeleton }) => {+ const target = getSheetCommandTarget(this._univerInstanceService);+ if (!target) {+ return false;+ }+ const { worksheet, unitId, subUnitId } = target;++ const workSheetEditPermission = this._permissionService.getPermissionPoint(new WorksheetEditPermission(unitId, subUnitId).id)?.value ?? false;+ if (!workSheetEditPermission) {+ return false;+ }++ const ranges = this._selectionManagerService.getSelections()?.map((selection) => {+ return selection.range;+ });++ const selectionRange = ranges?.find((range) => {+ const cellPosition = position.skeleton.getCellByIndex(range.endRow, range.endColumn);+ const missX = Math.abs(cellPosition.endX - position.x);+ const missY = Math.abs(cellPosition.endY - position.y);+ return missX <= 5 && missY <= 5;+ });++ if (!selectionRange) {+ return true;+ }++ const { startRow, endRow, startColumn, endColumn } = selectionRange;++ for (let row = startRow; row <= endRow; row++) {+ for (let col = startColumn; col <= endColumn; col++) {+ const permission = (worksheet.getCell(row, col) as (ICellDataForSheetInterceptor & { selectionProtection: ICellPermission[] }))?.selectionProtection?.[0];+ if (permission?.[UnitAction.Edit] === false || permission?.[UnitAction.View] === false) {+ return false;+ }+ }+ }+ return true;+ },+ });+ }++ private _initRangeMovePermissionInterceptor() {+ this._selectionRenderService.interceptor.intercept(this._selectionRenderService.interceptor.getInterceptPoints().RANGE_MOVE_PERMISSION_CHECK, {+ handler: (_: Nullable<boolean>, _cellInfo: null) => {+ const target = getSheetCommandTarget(this._univerInstanceService);+ if (!target) {+ return false;+ }+ const { worksheet, unitId, subUnitId } = target;++ const workSheetEditPermission = this._permissionService.getPermissionPoint(new WorksheetEditPermission(unitId, subUnitId).id)?.value ?? false;+ if (!workSheetEditPermission) {+ return false;+ }++ const ranges = this._selectionManagerService.getSelections()?.map((selection) => {+ return selection.range;+ });++ const ruleRanges = this._rangeProtectionRuleModel.getSubunitRuleList(unitId, subUnitId).reduce((p, c) => {+ return [...p, ...c.ranges];+ }, [] as IRange[]);++ const permissionLapRanges = ranges?.filter((range) => {+ return ruleRanges.some((ruleRange) => {+ return Rectangle.intersects(ruleRange, range);+ });+ });++ const haveNotPermission = permissionLapRanges?.some((range) => {+ const { startRow, startColumn, endRow, endColumn } = range;+ for (let row = startRow; row <= endRow; row++) {+ for (let col = startColumn; col <= endColumn; col++) {+ const permission = (worksheet.getCell(row, col) as (ICellDataForSheetInterceptor & { selectionProtection: ICellPermission[] }))?.selectionProtection?.[0];+ if (permission?.[UnitAction.Edit] === false) {+ return true;+ }+ }+ }+ return false;+ });++ return !haveNotPermission;+ },+ });+ }++ private _initSheetFindPermissionInterceptor() {+ this._sheetsFindReplaceController.interceptor.intercept(this._sheetsFindReplaceController.interceptor.getInterceptPoints().FIND_PERMISSION_CHECK, {+ handler: (_: Nullable<boolean>, _cellInfo: { row: number; col: number; unitId: string; subUnitId: string }) => {+ const { row, col, subUnitId } = _cellInfo;+ const workbook = this._univerInstanceService.getCurrentUnitForType<Workbook>(UniverInstanceType.UNIVER_SHEET)!;+ const worksheet = workbook.getSheetBySheetId(subUnitId);+ if (!worksheet) {+ return false;+ }+ const permission = (worksheet.getCell(row, col) as (ICellDataForSheetInterceptor & { selectionProtection: ICellPermission[] }))?.selectionProtection?.[0];+ return permission?.[UnitAction.View] !== false;+ },+ });+ }++ private _initDataValidationPermissionInterceptor() {+ this._dataValidationController.interceptor.intercept(this._dataValidationController.interceptor.getInterceptPoints().DATA_VALIDATION_PERMISSION_CHECK, {+ handler: (_: Nullable<(ISheetDataValidationRule & { disable?: boolean })[]>, rules: ISheetDataValidationRule[]) => {+ const workbook = this._univerInstanceService.getCurrentUnitForType<Workbook>(UniverInstanceType.UNIVER_SHEET)!;+ const worksheet = workbook.getActiveSheet();+ const rulesByPermissionCheck = rules.map((rule) => {+ const { ranges } = rule;+ const haveNotPermission = ranges?.some((range) => {+ const { startRow, startColumn, endRow, endColumn } = range;+ for (let row = startRow; row <= endRow; row++) {+ for (let col = startColumn; col <= endColumn; col++) {+ const permission = (worksheet.getCell(row, col) as (ICellDataForSheetInterceptor & { selectionProtection: ICellPermission[] }))?.selectionProtection?.[0];+ if (permission?.[UnitAction.Edit] === false || permission?.[UnitAction.View] === false) {+ return true;+ }+ }+ }+ return false;+ });+ if (haveNotPermission) {+ return { ...rule, disable: true };+ } else {+ return { ...rule };+ }+ });+ return rulesByPermissionCheck;+ },+ });+ }++ private _initConditionalFormattingPermissionInterceptor() {+ this._conditionalFormattingClearController.interceptor.intercept(this._conditionalFormattingClearController.interceptor.getInterceptPoints().CONDITIONAL_FORMATTING_PERMISSION_CHECK, {+ handler: (_: Nullable<(IConditionFormattingRule<IConditionalFormattingRuleConfig> & { disable?: boolean })[]>, rules: ((IConditionFormattingRule<IConditionalFormattingRuleConfig> & { disable?: boolean }))[]) => {+ const workbook = this._univerInstanceService.getCurrentUnitForType<Workbook>(UniverInstanceType.UNIVER_SHEET)!;+ const worksheet = workbook.getActiveSheet();+ const rulesByPermissionCheck = rules.map((rule) => {+ const ranges = rule.ranges;+ const haveNotPermission = ranges?.some((range) => {+ const { startRow, startColumn, endRow, endColumn } = range;+ for (let row = startRow; row <= endRow; row++) {+ for (let col = startColumn; col <= endColumn; col++) {+ const permission = (worksheet.getCell(row, col) as (ICellDataForSheetInterceptor & { selectionProtection: ICellPermission[] }))?.selectionProtection?.[0];+ if (permission?.[UnitAction.Edit] === false || permission?.[UnitAction.View] === false) {+ return true;+ }+ }+ }+ return false;+ });+ if (haveNotPermission) {+ return { ...rule, disable: true };+ } else {+ return { ...rule };+ }+ });+ return rulesByPermissionCheck;+ },+ });+ }++ private _initFreezePermissionInterceptor() {+ this._headerFreezeRenderController.interceptor.intercept(this._headerFreezeRenderController.interceptor.getInterceptPoints().FREEZE_PERMISSION_CHECK, {+ handler: (_: Nullable<boolean>, __) => {+ const workbook = this._univerInstanceService.getCurrentUnitForType<Workbook>(UniverInstanceType.UNIVER_SHEET)!;+ const worksheet = workbook.getActiveSheet();+ if (!worksheet) {+ return false;+ }+ const permission = this._permissionService.getPermissionPoint(new WorkbookEditablePermission(workbook.getUnitId()).id)?.value ?? false;+ return permission;+ },+ });+ }++ private _initClipboardHook() {+ this.disposeWithMe(+ this._sheetClipboardService.addClipboardHook({+ id: SHEET_PERMISSION_PASTE_PLUGIN,+ onBeforePaste: (pasteTo) => {+ const [ranges] = virtualizeDiscreteRanges([pasteTo.range]).ranges;+ const startRange = this._selectionManagerService.getLast()?.range;+ if (!startRange) {+ return false;+ }+ const targetRange = {+ startRow: startRange.startRow + ranges.startRow,+ endRow: startRange.startRow + ranges.endRow,+ startColumn: startRange.startColumn + ranges.startColumn,+ endColumn: startRange.startColumn + ranges.endColumn,+ };++ const workbook = this._univerInstanceService.getCurrentUnitForType<Workbook>(UniverInstanceType.UNIVER_SHEET)!;+ const worksheet = workbook.getActiveSheet();+ const { startRow, endRow, startColumn, endColumn } = targetRange;++ let hasPermission = true;++ for (let row = startRow; row <= endRow; row++) {+ for (let col = startColumn; col <= endColumn; col++) {+ const permission = (worksheet.getCell(row, col) as (ICellDataForSheetInterceptor & { selectionProtection: ICellPermission[] }))?.selectionProtection?.[0];+ if (permission?.[UnitAction.Edit] === false) {+ hasPermission = false;+ break;+ }+ }+ }++ if (!hasPermission) {+ this._haveNotPermissionHandle(this._localService.t('permission.dialog.pasteErr'));+ }++ return hasPermission;+ },+ })+ );+ }+}diff --git a/packages/sheet-permission-ui/src/controller/sheet-permission-menu.ts b/packages/sheet-permission-ui/src/controller/sheet-permission-menu.tsnew file mode 100644index 0000000000..180701159c--- /dev/null+++ b/packages/sheet-permission-ui/src/controller/sheet-permission-menu.ts@@ -0,0 +1,140 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import type { IMenuButtonItem, IMenuItem, IMenuSelectorItem } from '@univerjs/ui';+import { MenuGroup, MenuItemType, MenuPosition } from '@univerjs/ui';+import type { IAccessor } from '@wendellhu/redi';++import { AddRangeProtectionFromContextMenuCommand, AddRangeProtectionFromSheetBarCommand, AddRangeProtectionFromToolbarCommand, DeleteRangeProtectionFromContextMenuCommand, SetRangeProtectionFromContextMenuCommand, ViewSheetPermissionFromContextMenuCommand, ViewSheetPermissionFromSheetBarCommand } from '../command/range-protection.command';+import { ChangeSheetProtectionFromSheetBarCommand, DeleteWorksheetProtectionFormSheetBarCommand } from '../command/worksheet-protection.command';+import { permissionLockIconKey, permissionMenuIconKey } from '../const';+import { getAddPermissionDisableBase$, getAddPermissionFromSheetBarDisable$, getAddPermissionHidden$, getEditPermissionHidden$, getPermissionDisableBase$, getRemovePermissionDisable$, getRemovePermissionFromSheetBarDisable$, getSetPermissionFromSheetBarDisable$, getViewPermissionDisable$ } from './util';++export const tmpIcon = 'data-validation-single';+const SHEET_PERMISSION_CONTEXT_MENU_ID = 'sheet.contextMenu.permission';++enum SheetMenuPosition {+ ROW_HEADER_CONTEXT_MENU = 'rowHeaderContextMenu',+ COL_HEADER_CONTEXT_MENU = 'colHeaderContextMenu',+ SHEET_BAR = 'sheetBar',+}++export function sheetPermissionToolbarMenuFactory(accessor: IAccessor): IMenuItem {+ return {+ id: AddRangeProtectionFromToolbarCommand.id,+ type: MenuItemType.BUTTON,+ positions: [+ MenuPosition.TOOLBAR_START,+ ],+ group: MenuGroup.TOOLBAR_OTHERS,+ icon: permissionMenuIconKey,+ tooltip: 'permission.toolbarMenu',+ disabled$: getAddPermissionDisableBase$(accessor),+ };+}++export function sheetPermissionContextMenuFactory(): IMenuSelectorItem<string> {+ return {+ id: SHEET_PERMISSION_CONTEXT_MENU_ID,+ group: MenuGroup.CONTEXT_MENU_LAYOUT,+ type: MenuItemType.SUBITEMS,+ title: 'rightClick.protectRange',+ icon: permissionLockIconKey,+ positions: [MenuPosition.CONTEXT_MENU, SheetMenuPosition.ROW_HEADER_CONTEXT_MENU, SheetMenuPosition.COL_HEADER_CONTEXT_MENU],+ };+}++export function sheetPermissionAddProtectContextMenuFactory(accessor: IAccessor): IMenuButtonItem {+ return {+ id: AddRangeProtectionFromContextMenuCommand.id,+ type: MenuItemType.BUTTON,+ title: 'rightClick.turnOnProtectRange',+ positions: [SHEET_PERMISSION_CONTEXT_MENU_ID],+ hidden$: getAddPermissionHidden$(accessor),+ disabled$: getAddPermissionDisableBase$(accessor),+ };+}++export function sheetPermissionEditProtectContextMenuFactory(accessor: IAccessor): IMenuButtonItem {+ return {+ id: SetRangeProtectionFromContextMenuCommand.id,+ type: MenuItemType.BUTTON,+ title: 'rightClick.editProtectRange',+ positions: [SHEET_PERMISSION_CONTEXT_MENU_ID],+ hidden$: getEditPermissionHidden$(accessor),+ disabled$: getPermissionDisableBase$(accessor),+ };+}++export function sheetPermissionRemoveProtectContextMenuFactory(accessor: IAccessor): IMenuButtonItem {+ return {+ id: DeleteRangeProtectionFromContextMenuCommand.id,+ type: MenuItemType.BUTTON,+ title: 'rightClick.removeProtectRange',+ positions: [SHEET_PERMISSION_CONTEXT_MENU_ID],+ disabled$: getRemovePermissionDisable$(accessor),+ };+}++export function sheetPermissionViewAllProtectRuleContextMenuFactory(accessor: IAccessor): IMenuButtonItem {+ return {+ id: ViewSheetPermissionFromContextMenuCommand.id,+ type: MenuItemType.BUTTON,+ title: 'rightClick.viewAllProtectArea',+ positions: [SHEET_PERMISSION_CONTEXT_MENU_ID],+ disabled$: getViewPermissionDisable$(accessor),+ };+}++export function sheetPermissionProtectSheetInSheetBarMenuFactory(accessor: IAccessor): IMenuButtonItem {+ return {+ id: AddRangeProtectionFromSheetBarCommand.id,+ type: MenuItemType.BUTTON,+ positions: [SheetMenuPosition.SHEET_BAR],+ title: 'sheetConfig.addProtectSheet',+ disabled$: getAddPermissionFromSheetBarDisable$(accessor),+ };+}++export function sheetPermissionRemoveProtectionSheetBarMenuFactory(accessor: IAccessor): IMenuButtonItem {+ return {+ id: DeleteWorksheetProtectionFormSheetBarCommand.id,+ type: MenuItemType.BUTTON,+ positions: [SheetMenuPosition.SHEET_BAR],+ title: 'sheetConfig.removeProtectSheet',+ disabled$: getRemovePermissionFromSheetBarDisable$(accessor),+ };+}++export function sheetPermissionChangeSheetPermissionSheetBarMenuFactory(accessor: IAccessor): IMenuButtonItem {+ return {+ id: ChangeSheetProtectionFromSheetBarCommand.id,+ type: MenuItemType.BUTTON,+ positions: [SheetMenuPosition.SHEET_BAR],+ title: 'sheetConfig.changeSheetPermission',+ disabled$: getSetPermissionFromSheetBarDisable$(accessor),+ };+}++export function sheetPermissionViewAllProtectRuleSheetBarMenuFactory(accessor: IAccessor): IMenuButtonItem {+ return {+ id: ViewSheetPermissionFromSheetBarCommand.id,+ type: MenuItemType.BUTTON,+ positions: [SheetMenuPosition.SHEET_BAR],+ title: 'sheetConfig.viewAllProtectArea',+ disabled$: getViewPermissionDisable$(accessor),+ };+}diff --git a/packages/sheet-permission-ui/src/controller/sheet-permission-render.controller.ts b/packages/sheet-permission-ui/src/controller/sheet-permission-render.controller.tsnew file mode 100644index 0000000000..271bf0a2da--- /dev/null+++ b/packages/sheet-permission-ui/src/controller/sheet-permission-render.controller.ts@@ -0,0 +1,140 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import { Disposable, LifecycleStages, OnLifecycle } from '@univerjs/core';+import type { IMenuItemFactory, MenuConfig } from '@univerjs/ui';+import { ComponentManager, IMenuService } from '@univerjs/ui';+import { Inject, Injector } from '@wendellhu/redi';+import { CheckMarkSingle, DeleteSingle, LockSingle, ProtectSingle, WriteSingle } from '@univerjs/icons';+import { permissionCheckIconKey, permissionDeleteIconKey, permissionEditIconKey, permissionLockIconKey, permissionMenuIconKey, UNIVER_SHEET_PERMISSION_DIALOG, UNIVER_SHEET_PERMISSION_PANEL, UNIVER_SHEET_PERMISSION_PANEL_FOOTER, UNIVER_SHEET_PERMISSION_USER_DIALOG } from '../const';+import { SheetPermissionDialog, SheetPermissionPanel, SheetPermissionPanelFooter, SheetPermissionUserDialog } from '../views';+import { AlertDialog } from '../views/error-msg-dialog';+import { UNIVER_SHEET_PERMISSION_ALERT_DIALOG } from '../views/error-msg-dialog/interface';+import {+ sheetPermissionAddProtectContextMenuFactory,+ sheetPermissionChangeSheetPermissionSheetBarMenuFactory,+ sheetPermissionContextMenuFactory,+ sheetPermissionEditProtectContextMenuFactory,+ sheetPermissionProtectSheetInSheetBarMenuFactory,+ sheetPermissionRemoveProtectContextMenuFactory,+ sheetPermissionRemoveProtectionSheetBarMenuFactory,+ sheetPermissionToolbarMenuFactory,+ sheetPermissionViewAllProtectRuleContextMenuFactory,+ sheetPermissionViewAllProtectRuleSheetBarMenuFactory,++} from './sheet-permission-menu';++export interface IUniverSheetsPermissionMenuConfig {+ menu: MenuConfig;+}++export const DefaultSheetPermissionMenuConfig = {};++@OnLifecycle(LifecycleStages.Rendered, SheetPermissionRenderController)+export class SheetPermissionRenderController extends Disposable {+ constructor(+ private readonly _config: Partial<IUniverSheetsPermissionMenuConfig>,+ @IMenuService private _menuService: IMenuService,+ @Inject(ComponentManager) private _componentManager: ComponentManager,+ @Inject(Injector) private readonly _injector: Injector+ ) {+ super();+ this._init();+ }++ private _init() {+ this._initToolbarMenu();+ this._initContextMenu();+ this._initComponents();+ }++ private _initToolbarMenu() {+ const { menu = {} } = this._config;+ ([+ sheetPermissionToolbarMenuFactory,+ ]).forEach((menuFactory) => {+ this.disposeWithMe(this._menuService.addMenuItem(this._injector.invoke(menuFactory), menu));+ });+ }++ private _initContextMenu() {+ const { menu = {} } = this._config;+ ([+ sheetPermissionContextMenuFactory,+ sheetPermissionAddProtectContextMenuFactory,+ sheetPermissionEditProtectContextMenuFactory,+ sheetPermissionRemoveProtectContextMenuFactory,+ sheetPermissionViewAllProtectRuleContextMenuFactory,+ sheetPermissionProtectSheetInSheetBarMenuFactory,+ sheetPermissionRemoveProtectionSheetBarMenuFactory,+ sheetPermissionChangeSheetPermissionSheetBarMenuFactory,+ sheetPermissionViewAllProtectRuleSheetBarMenuFactory,+ ] as IMenuItemFactory[]).forEach((factory) => {+ this.disposeWithMe(this._menuService.addMenuItem(this._injector.invoke(factory), menu));+ });+ }++ private _initComponents() {+ ([+ [+ permissionMenuIconKey,+ ProtectSingle,+ ],+ [+ permissionDeleteIconKey,+ DeleteSingle,+ ],+ [+ permissionEditIconKey,+ WriteSingle,+ ],+ [+ permissionCheckIconKey,+ CheckMarkSingle,+ ],+ [+ permissionLockIconKey,+ LockSingle,+ ],+ [+ UNIVER_SHEET_PERMISSION_PANEL,+ SheetPermissionPanel,+ ],+ [+ UNIVER_SHEET_PERMISSION_PANEL_FOOTER,+ SheetPermissionPanelFooter,+ ],+ [+ UNIVER_SHEET_PERMISSION_USER_DIALOG,+ SheetPermissionUserDialog,+ ],+ [+ UNIVER_SHEET_PERMISSION_DIALOG,+ SheetPermissionDialog,+ ],+ [+ UNIVER_SHEET_PERMISSION_ALERT_DIALOG,+ AlertDialog,+ ],++ ] as const).forEach(([key, component]) => {+ this.disposeWithMe(this._componentManager.register(+ key,+ component+ ));+ });+ }+}diff --git a/packages/sheet-permission-ui/src/controller/util.ts b/packages/sheet-permission-ui/src/controller/util.tsnew file mode 100644index 0000000000..6699103873--- /dev/null+++ b/packages/sheet-permission-ui/src/controller/util.ts@@ -0,0 +1,382 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import type { Workbook } from '@univerjs/core';+import { IPermissionService, IUniverInstanceService, Rectangle, UniverInstanceType, UserManagerService } from '@univerjs/core';+import { RangeProtectionRuleModel, SelectionManagerService, WorkbookEditablePermission, WorkbookManageCollaboratorPermission, WorksheetProtectionRuleModel } from '@univerjs/sheets';+import type { IAccessor } from '@wendellhu/redi';+import { combineLatest, map, merge, of, startWith, switchMap } from 'rxjs';++export function getAddPermissionHidden$(accessor: IAccessor) {+ const univerInstanceService = accessor.get(IUniverInstanceService);+ const selectionManagerService = accessor.get(SelectionManagerService);+ const workbook = univerInstanceService.getCurrentUnitForType<Workbook>(UniverInstanceType.UNIVER_SHEET)!;++ const rangeProtectionRuleModel = accessor.get(RangeProtectionRuleModel);+ const worksheetRuleModel = accessor.get(WorksheetProtectionRuleModel);++ return merge(+ selectionManagerService.selectionMoveEnd$,+ rangeProtectionRuleModel.ruleChange$,+ worksheetRuleModel.ruleChange$+ ).pipe(+ map(() => {+ const worksheet = workbook.getActiveSheet();+ const unitId = workbook.getUnitId();+ const subUnitId = worksheet.getSheetId();+ const subUnitRuleList = rangeProtectionRuleModel.getSubunitRuleList(unitId, subUnitId);+ const selections = selectionManagerService.getSelections();+ const selectionsRanges = selections?.map((selection) => selection.range);+ const ruleRanges = subUnitRuleList.map((rule) => rule.ranges).flat();+ if (!selectionsRanges) {+ return false;+ }+ const worksheetRule = worksheetRuleModel.getRule(unitId, subUnitId);+ if (worksheetRule?.permissionId && worksheetRule?.name) {+ return true;+ }+ return selectionsRanges?.some((selectionRange) => {+ return ruleRanges.some((ruleRange) => {+ return Rectangle.intersects(selectionRange, ruleRange);+ });+ });+ })+ );+}++export function getEditPermissionHidden$(accessor: IAccessor) {+ const univerInstanceService = accessor.get(IUniverInstanceService);+ const selectionManagerService = accessor.get(SelectionManagerService);+ const workbook = univerInstanceService.getCurrentUnitForType<Workbook>(UniverInstanceType.UNIVER_SHEET)!;++ const rangeRuleModel = accessor.get(RangeProtectionRuleModel);+ const worksheetRuleModel = accessor.get(WorksheetProtectionRuleModel);++ return merge(+ selectionManagerService.selectionMoveEnd$,+ rangeRuleModel.ruleChange$,+ worksheetRuleModel.ruleChange$+ ).pipe(+ map(() => {+ const worksheet = workbook.getActiveSheet();+ const unitId = workbook.getUnitId();+ const subUnitId = worksheet.getSheetId();+ const subUnitRuleList = rangeRuleModel.getSubunitRuleList(unitId, subUnitId);+ const selectionRanges = selectionManagerService.getSelections()?.map((selection) => selection.range);++ const ruleRanges = subUnitRuleList.map((rule) => rule.ranges).flat();+ if (!selectionRanges?.length) {+ return true;+ }++ if (selectionRanges.length > 1) {+ return true;+ }++ const selectedRange = selectionRanges[0];++ const worksheetRule = worksheetRuleModel.getRule(unitId, subUnitId);+ if (worksheetRule?.permissionId && worksheetRule?.name) {+ return false;+ }++ const lapRanges = ruleRanges.filter((ruleRange) => Rectangle.intersects(ruleRange, selectedRange));++ return lapRanges.length !== 1;+ })+ );+}++export function getPermissionDisableBase$(accessor: IAccessor) {+ const univerInstanceService = accessor.get(IUniverInstanceService);+ const workbook = univerInstanceService.getCurrentUnitForType<Workbook>(UniverInstanceType.UNIVER_SHEET)!;+ const selectionProtectionRuleModel = accessor.get(RangeProtectionRuleModel);+ const worksheetProtectionRuleModel = accessor.get(WorksheetProtectionRuleModel);+ const unitId = workbook.getUnitId();+ const permissionService = accessor.get(IPermissionService);++ const selectionManagerService = accessor.get(SelectionManagerService);+ const userManagerService = accessor.get(UserManagerService);++ return combineLatest([workbook.activeSheet$, userManagerService.currentUser$]).pipe(+ switchMap(([sheet, _]) => {+ if (!sheet) {+ return of(true);+ }+ const permission$ = permissionService.getPermissionPoint$(new WorkbookManageCollaboratorPermission(unitId).id)?.pipe(map((e) => !!e.value)) ?? of(false);+ const ruleChange$ = merge(+ selectionManagerService.selectionMoveEnd$,+ selectionProtectionRuleModel.ruleChange$,+ worksheetProtectionRuleModel.ruleChange$+ ).pipe(+ startWith(null)+ );++ return combineLatest([permission$, ruleChange$]).pipe(+ map(([permission, _]) => {+ if (!permission) {+ return true;+ }+ const selections = selectionManagerService.getSelections();+ const selectionRanges = selections?.map((selection) => selection.range);+ if (!selectionRanges?.length) {+ return false;+ }++ if (selectionRanges.length > 1) {+ return true;+ }+ return false;+ })+ );+ })+ );+}++export function getAddPermissionDisableBase$(accessor: IAccessor) {+ const univerInstanceService = accessor.get(IUniverInstanceService);+ const workbook = univerInstanceService.getCurrentUnitForType<Workbook>(UniverInstanceType.UNIVER_SHEET)!;+ const selectionProtectionRuleModel = accessor.get(RangeProtectionRuleModel);+ const worksheetProtectionRuleModel = accessor.get(WorksheetProtectionRuleModel);+ const unitId = workbook.getUnitId();+ const selectionManagerService = accessor.get(SelectionManagerService);+ const userManagerService = accessor.get(UserManagerService);+ const permissionService = accessor.get(IPermissionService);++ return combineLatest([workbook.activeSheet$, userManagerService.currentUser$]).pipe(+ switchMap(([sheet, _]) => {+ if (!sheet) {+ return of(true);+ }+ const subUnitId = sheet.getSheetId();+ const permission$ = permissionService.getPermissionPoint$(new WorkbookManageCollaboratorPermission(unitId).id)?.pipe(map((e) => !!e.value)) ?? of(false);+ const ruleChange$ = merge(+ selectionManagerService.selectionMoveEnd$,+ selectionProtectionRuleModel.ruleChange$,+ worksheetProtectionRuleModel.ruleChange$+ ).pipe(+ startWith(null)+ );++ return combineLatest([permission$, ruleChange$]).pipe(+ map(([permission, _]) => {+ if (!permission) {+ return true;+ }+ const selections = selectionManagerService.getSelections();+ const selectionRanges = selections?.map((selection) => selection.range);+ if (!selectionRanges?.length) {+ return true;+ }++ const worksheetRule = worksheetProtectionRuleModel.getRule(unitId, subUnitId);+ if (worksheetRule?.permissionId && worksheetRule?.name) {+ return true;+ }++ const subunitRuleList = selectionProtectionRuleModel.getSubunitRuleList(unitId, subUnitId);+ const hasLap = selectionRanges?.some((selectionRange) => {+ return subunitRuleList.some((rule) => {+ return rule.ranges.some((ruleRange) => {+ return Rectangle.intersects(selectionRange, ruleRange);+ });+ });+ });+ return hasLap;+ })+ );+ })+ );+}++export function getAddPermissionFromSheetBarDisable$(accessor: IAccessor) {+ const univerInstanceService = accessor.get(IUniverInstanceService);+ const workbook = univerInstanceService.getCurrentUnitForType<Workbook>(UniverInstanceType.UNIVER_SHEET)!;+ const selectionProtectionRuleModel = accessor.get(RangeProtectionRuleModel);+ const worksheetProtectionRuleModel = accessor.get(WorksheetProtectionRuleModel);+ const permissionService = accessor.get(IPermissionService);+ const userManagerService = accessor.get(UserManagerService);++ return combineLatest([workbook.activeSheet$, userManagerService.currentUser$]).pipe(+ switchMap(([activeSheet, _]) => {+ if (!activeSheet) {+ return of(true);+ }+ const unitId = workbook.getUnitId();+ const subUnitId = activeSheet.getSheetId();+ const permission$ = permissionService.getPermissionPoint$(new WorkbookManageCollaboratorPermission(unitId).id)?.pipe(map((e) => !!e.value)) ?? of(false);++ const ruleChange$ = merge(+ worksheetProtectionRuleModel.ruleChange$,+ selectionProtectionRuleModel.ruleChange$+ ).pipe(+ startWith(null)+ );++ return combineLatest([+ permission$,+ ruleChange$,+ ]).pipe(+ map(([permission, _]) => {+ if (!permission) return true;+ const worksheetRule = worksheetProtectionRuleModel.getRule(unitId, subUnitId);+ if (worksheetRule?.permissionId && worksheetRule?.name) return true;+ const subUnitRuleList = selectionProtectionRuleModel.getSubunitRuleList(unitId, subUnitId)?.filter((item) => item?.permissionId && item?.name);+ return subUnitRuleList.length > 0;+ })+ );+ })+ );+}++export function getRemovePermissionFromSheetBarDisable$(accessor: IAccessor) {+ const univerInstanceService = accessor.get(IUniverInstanceService);+ const workbook = univerInstanceService.getCurrentUnitForType<Workbook>(UniverInstanceType.UNIVER_SHEET)!;+ const worksheetProtectionRuleModel = accessor.get(WorksheetProtectionRuleModel);+ const userManagerService = accessor.get(UserManagerService);+ const permissionService = accessor.get(IPermissionService);++ return combineLatest([workbook.activeSheet$, userManagerService.currentUser$, worksheetProtectionRuleModel.ruleChange$.pipe(startWith(null))]).pipe(+ switchMap(([activeSheet, _]) => {+ if (!activeSheet) {+ return of(true);+ }+ const unitId = workbook.getUnitId();+ const subUnitId = activeSheet.getSheetId();+ const permission$ = permissionService.getPermissionPoint$(new WorkbookManageCollaboratorPermission(unitId).id)?.pipe(map((e) => !!e.value)) ?? of(false);++ return permission$.pipe(+ map((permission) => {+ if (!permission) return true;+ const worksheetPermissionRule = worksheetProtectionRuleModel.getRule(unitId, subUnitId);+ return !(worksheetPermissionRule?.permissionId && worksheetPermissionRule?.name);+ })+ );+ })+ );+}++export function getSetPermissionFromSheetBarDisable$(accessor: IAccessor) {+ const univerInstanceService = accessor.get(IUniverInstanceService);+ const workbook = univerInstanceService.getCurrentUnitForType<Workbook>(UniverInstanceType.UNIVER_SHEET)!;+ const permissionService = accessor.get(IPermissionService);+ const unitId = workbook.getUnitId();+ const userManagerService = accessor.get(UserManagerService);+ const worksheetRuleModel = accessor.get(WorksheetProtectionRuleModel);+ const selectionProtectionRuleModel = accessor.get(RangeProtectionRuleModel);++ return combineLatest([workbook.activeSheet$, userManagerService.currentUser$]).pipe(+ switchMap(([activeSheet, _]) => {+ if (!activeSheet) {+ return of(true);+ }+ const permission$ = permissionService.getPermissionPoint$(new WorkbookManageCollaboratorPermission(unitId).id)?.pipe(map((e) => !!e.value)) ?? of(false);+ const worksheetRuleChange$ = worksheetRuleModel.ruleChange$.pipe(startWith(null));+ const selectionRuleChange$ = selectionProtectionRuleModel.ruleChange$.pipe(startWith(null));+ return combineLatest([permission$, worksheetRuleChange$, selectionRuleChange$]).pipe(+ map(([permission, _, __]) => {+ if (!permission) {+ return true;+ }+ const subUnitId = activeSheet.getSheetId();+ const worksheetRule = worksheetRuleModel.getRule(unitId, subUnitId);+ const selectionRuleList = selectionProtectionRuleModel.getSubunitRuleList(unitId, subUnitId);+ if (worksheetRule || selectionRuleList.length) {+ return false;+ }+ return true;+ })+ );+ })+ );+}++export function getRemovePermissionDisable$(accessor: IAccessor) {+ const univerInstanceService = accessor.get(IUniverInstanceService);+ const workbook = univerInstanceService.getCurrentUnitForType<Workbook>(UniverInstanceType.UNIVER_SHEET)!;+ const selectionProtectionRuleModel = accessor.get(RangeProtectionRuleModel);+ const worksheetProtectionRuleModel = accessor.get(WorksheetProtectionRuleModel);+ const unitId = workbook.getUnitId();+ const permissionService = accessor.get(IPermissionService);+ const userManagerService = accessor.get(UserManagerService);++ return combineLatest([workbook.activeSheet$, userManagerService.currentUser$]).pipe(+ switchMap(([activeSheet, _]) => {+ if (!activeSheet) {+ return of(true);+ }+ const subUnitId = activeSheet.getSheetId();+ const changes$ = merge(+ accessor.get(SelectionManagerService).selectionMoveEnd$,+ accessor.get(RangeProtectionRuleModel).ruleChange$,+ accessor.get(WorksheetProtectionRuleModel).ruleChange$+ );+ const permission$ = permissionService.getPermissionPoint$(new WorkbookManageCollaboratorPermission(unitId).id)?.pipe(map((e) => !!e.value)) ?? of(false);++ return combineLatest([changes$, permission$]).pipe(+ map(([_, permission]) => {+ if (!permission) {+ return true;+ }+ const selections = accessor.get(SelectionManagerService).getSelections();+ const selectionRanges = selections?.map((selection) => selection.range);+ if (!selectionRanges?.length || selectionRanges.length > 1) {+ return true;+ }++ const selectionRange = selectionRanges[0];++ const worksheetRule = worksheetProtectionRuleModel.getRule(unitId, subUnitId);+ if (worksheetRule?.permissionId && worksheetRule?.name) {+ return false;+ }++ const subUnitRuleRanges = selectionProtectionRuleModel.getSubunitRuleList(unitId, subUnitId).map((rule) => rule.ranges).flat();++ const hasLap = subUnitRuleRanges.some((ruleRange) => {+ return Rectangle.intersects(selectionRange, ruleRange);+ });++ if (hasLap) {+ return false;+ } else {+ return true;+ }+ })+ );+ })+ );+}++export function getViewPermissionDisable$(accessor: IAccessor) {+ const univerInstanceService = accessor.get(IUniverInstanceService);+ const workbook = univerInstanceService.getCurrentUnitForType<Workbook>(UniverInstanceType.UNIVER_SHEET)!;+ const unitId = workbook.getUnitId();+ const userManagerService = accessor.get(UserManagerService);+ const permissionService = accessor.get(IPermissionService);++ return combineLatest([workbook.activeSheet$, userManagerService.currentUser$]).pipe(+ switchMap(([sheet, _]) => {+ if (!sheet) {+ return of(true);+ }+ const permission$ = permissionService.getPermissionPoint$(new WorkbookEditablePermission(unitId).id)?.pipe(map((e) => !!e.value)) ?? of(false);+ return permission$.pipe(+ map((permission) => !permission)+ );+ })+ );+}diff --git a/packages/sheet-permission-ui/src/index.ts b/packages/sheet-permission-ui/src/index.tsnew file mode 100644index 0000000000..4197341fd4--- /dev/null+++ b/packages/sheet-permission-ui/src/index.ts@@ -0,0 +1,17 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++export { UniverSheetsPermissionUIPlugin } from './plugin';diff --git a/packages/sheet-permission-ui/src/locale/en-US.ts b/packages/sheet-permission-ui/src/locale/en-US.tsnew file mode 100644index 0000000000..ea50919493--- /dev/null+++ b/packages/sheet-permission-ui/src/locale/en-US.ts@@ -0,0 +1,103 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++const locale = {+ permission: {+ toolbarMenu: 'Protection',+ panel: {+ title: 'Protect Rows and Columns',+ name: 'Name',+ protectedRange: 'Protected Range',+ permissionDirection: 'Permission Description',+ permissionDirectionPlaceholder: 'Enter permission description',+ editPermission: 'Edit Permissions',+ onlyICanEdit: 'Only I can edit',+ designedUserCanEdit: 'Specified users can edit',+ viewPermission: 'View Permissions',+ othersCanView: 'Others can view',+ noOneElseCanView: 'No one else can view',+ designedPerson: 'Specified persons',+ addPerson: 'Add person',+ canEdit: 'Can edit',+ canView: 'Can view',+ delete: 'Delete',+ currentSheet: 'Current worksheet',+ allSheet: 'All worksheets',+ edit: 'Edit',+ Print: 'Print',+ Comment: 'Comment',+ Copy: 'Copy',+ SetCellStyle: 'Set cell style',+ SetCellValue: 'Set cell value',+ SetHyperLink: 'Set hyperlink',+ Sort: 'Sort',+ Filter: 'Filter',+ PivotTable: 'Pivot table',+ FloatImage: 'Float image',+ RowHeightColWidth: 'Row height and column width',+ RowHeightColWidthReadonly: 'Read-only row height and column width',+ FilterReadonly: 'Read-only filter',+ nameError: 'Name cannot be empty',+ created: 'Created',+ iCanEdit: 'I can edit',+ iCanNotEdit: 'I can\'t edit',+ iCanView: 'I can view',+ iCanNotView: 'I can\'t view',+ emptyRangeError: 'Range cannot be empty',+ rangeOverlapError: 'Range cannot overlap',+ rangeOverlapOverPermissionError: 'Range cannot overlap with the range that has the same permission',+ InsertHyperlink: 'Insert hyperlink',+ SetRowStyle: 'Set row style',+ SetColumnStyle: 'Set column style',+ InsertColumn: 'Insert column',+ InsertRow: 'Insert row',+ DeleteRow: 'Delete row',+ DeleteColumn: 'Delete column',+ EditExtraObject: 'Edit extra object',+ },+ dialog: {+ allowUserToEdit: 'Allow user to edit',+ allowedPermissionType: 'Allowed permission types',+ setCellValue: 'Set cell value',+ setCellStyle: 'Set cell style',+ copy: 'Copy',+ alert: 'Alert',+ alertContent: 'This range has been protected and no editing permissions are currently available. If you need to edit, please contact the creator.',+ userEmpty: 'no designated person , Share link to invite specific people.',+ listEmpty: 'You haven\'t set up any ranges or sheets as protected.',+ commonErr: 'The range is protected, and you do not have permission for this operation. To edit, please contact the creator.',+ editErr: 'The range is protected, and you do not have edit permission. To edit, please contact the creator.',+ pasteErr: 'The range is protected, and you do not have paste permission. To paste, please contact the creator.',+ setStyleErr: 'The range is protected, and you do not have permission to set styles. To set styles, please contact the creator.',+ copyErr: 'The range is protected, and you do not have copy permission. To copy, please contact the creator.',+ setRowColStyleErr: 'The range is protected, and you do not have permission to set row and column styles. To set row and column styles, please contact the creator.',+ moveRowColErr: 'The range is protected, and you do not have permission to move rows and columns. To move rows and columns, please contact the creator.',+ moveRangeErr: 'The range is protected, and you do not have permission to move the selection. To move the selection, please contact the creator.',+ autoFillErr: 'The range is protected, and you do not have permission for auto-fill. To use auto-fill, please contact the creator.',+ filterErr: 'The range is protected, and you do not have filtering permission. To filter, please contact the creator.',+ operatorSheetErr: 'The worksheet is protected, and you do not have permission to operate the worksheet. To operate the worksheet, please contact the creator.',+ insertOrDeleteMoveRangeErr: 'The inserted or deleted range intersects with the protected range, and this operation is not supported for now.',+ printErr: 'The worksheet is protected, and you do not have permission to print. To print, please contact the creator.',+ },+ button: {+ confirm: 'Confirm',+ cancel: 'Cancel',+ addNewPermission: 'Add new permission',+ },+ },+};++export default locale;diff --git a/packages/sheet-permission-ui/src/locale/index.ts b/packages/sheet-permission-ui/src/locale/index.tsnew file mode 100644index 0000000000..6f142d91f2--- /dev/null+++ b/packages/sheet-permission-ui/src/locale/index.ts@@ -0,0 +1,18 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++export { default as zhCN } from './zh-CN';+export { default as enUS } from './en-US';diff --git a/packages/sheet-permission-ui/src/locale/zh-CN.ts b/packages/sheet-permission-ui/src/locale/zh-CN.tsnew file mode 100644index 0000000000..54ae3d6277--- /dev/null+++ b/packages/sheet-permission-ui/src/locale/zh-CN.ts@@ -0,0 +1,103 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++const locale = {+ permission: {+ toolbarMenu: '保护',+ panel: {+ title: '保护行列',+ name: '名称',+ protectedRange: '保护区域',+ permissionDirection: '权限描述',+ permissionDirectionPlaceholder: '请输入权限描述',+ editPermission: '编辑权限',+ onlyICanEdit: '仅我可以编辑',+ designedUserCanEdit: '指定用户可以编辑',+ viewPermission: '查看权限',+ othersCanView: '其他人可以查看',+ noOneElseCanView: '其他人不可以查看',+ designedPerson: '指定人员',+ addPerson: '添加人员',+ canEdit: '可编辑',+ canView: '可查看',+ delete: '删除',+ currentSheet: '当前工作表',+ allSheet: '所有工作表',+ edit: '编辑',+ Print: '打印',+ Comment: '评论',+ Copy: '复制',+ SetCellStyle: '设置单元格样式',+ SetCellValue: '设置单元格值',+ SetHyperLink: '设置超链接',+ Sort: '排序',+ Filter: '筛选',+ PivotTable: '数据透视表',+ FloatImage: '浮动图片',+ RowHeightColWidth: '行高列宽',+ RowHeightColWidthReadonly: '只读行高列宽',+ FilterReadonly: '只读筛选',+ nameError: '名称不能为空',+ created: '创建',+ iCanEdit: '我可以编辑',+ iCanNotEdit: '我不可以编辑',+ iCanView: '我可以查看',+ iCanNotView: '我不可以查看',+ emptyRangeError: '范围不能为空',+ rangeOverlapError: '范围不能重叠',+ rangeOverlapOverPermissionError: '范围不能重叠已有权限范围',+ InsertHyperlink: '插入超链接',+ SetRowStyle: '设置行样式',+ SetColumnStyle: '设置列样式',+ InsertColumn: '插入列',+ InsertRow: '插入行',+ DeleteRow: '删除行',+ DeleteColumn: '删除列',+ EditExtraObject: '编辑其他对象',+ },+ dialog: {+ allowUserToEdit: '允许用户编辑',+ allowedPermissionType: '允许权限类型',+ setCellValue: '设置单元格值',+ setCellStyle: '设置单元格样式',+ copy: '复制',+ alert: '提示',+ alertContent: '该范围已被保护,目前无编辑权限。如需编辑,请联系创建者。',+ userEmpty: '没有指定的人员,分享链接以邀请特定的人。',+ listEmpty: '你还没有设置任何范围或工作表为受保护状态。',+ commonErr: '该范围已被保护,目前无该操作权限。如需编辑,请联系创建者。',+ editErr: '该范围已被保护,目前无编辑权限。如需编辑,请联系创建者。',+ pasteErr: '该范围已被保护,目前无粘贴权限。如需粘贴,请联系创建者。',+ setStyleErr: '该范围已被保护,目前无设置样式权限。如需设置样式,请联系创建者。',+ copyErr: '该范围已被保护,目前无复制权限。如需复制,请联系创建者。',+ setRowColStyleErr: '该范围已被保护,目前无设置行列样式权限。如需设置行列样式,请联系创建者。',+ moveRowColErr: '该范围已被保护,目前无移动行列权限。如需移动行列,请联系创建者。',+ moveRangeErr: '该范围已被保护,目前无移动选区权限。如需移动选区,请联系创建者。',+ autoFillErr: '该范围已被保护,目前无自动填充权限。如需自动填充,请联系创建者。',+ filterErr: '该范围已被保护,目前无筛选权限。如需筛选,请联系创建者。',+ operatorSheetErr: '该工作表已被保护,目前无操作工作表权限。如需操作工作表,请联系创建者。',+ insertOrDeleteMoveRangeErr: '插入、删除区域与保护范围相交,暂不支持此操作。',+ printErr: '该工作表已被保护,目前无打印权限。如需打印,请联系创建者。',+ },+ button: {+ confirm: '确认',+ cancel: '取消',+ addNewPermission: '添加新权限',+ },+ },+};++export default locale;diff --git a/packages/sheet-permission-ui/src/operation/sheet-permission-open-dialog.operation.ts b/packages/sheet-permission-ui/src/operation/sheet-permission-open-dialog.operation.tsnew file mode 100644index 0000000000..fa06a4f9ea--- /dev/null+++ b/packages/sheet-permission-ui/src/operation/sheet-permission-open-dialog.operation.ts@@ -0,0 +1,40 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import type { ICommand } from '@univerjs/core';+import { CommandType } from '@univerjs/core';+import { IDialogService } from '@univerjs/ui';+import { UNIVER_SHEET_PERMISSION_DIALOG, UNIVER_SHEET_PERMISSION_DIALOG_ID } from '../const';++export const SheetPermissionOpenDialogOperation: ICommand = {+ type: CommandType.OPERATION,+ id: 'sheet-permission.operation.openDialog',+ async handler(accessor, _params) {+ const dialogService = accessor.get(IDialogService);++ dialogService.close('DESKTOP_FIND_REPLACE_DIALOG');++ dialogService.open({+ id: UNIVER_SHEET_PERMISSION_DIALOG_ID,+ title: { title: 'permission.dialog.allowedPermissionType' },+ children: { label: UNIVER_SHEET_PERMISSION_DIALOG },+ width: 393,+ destroyOnClose: true,+ onClose: () => dialogService.close(UNIVER_SHEET_PERMISSION_DIALOG_ID),+ });+ return true;+ },+};diff --git a/packages/sheet-permission-ui/src/operation/sheet-permission-open-panel.operation.ts b/packages/sheet-permission-ui/src/operation/sheet-permission-open-panel.operation.tsnew file mode 100644index 0000000000..bad715416f--- /dev/null+++ b/packages/sheet-permission-ui/src/operation/sheet-permission-open-panel.operation.ts@@ -0,0 +1,61 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import type { ICommand } from '@univerjs/core';+import { CommandType } from '@univerjs/core';+import { ISidebarService } from '@univerjs/ui';+import { UNIVER_SHEET_PERMISSION_PANEL, UNIVER_SHEET_PERMISSION_PANEL_FOOTER } from '../const';+import { SheetPermissionPanelModel } from '../service/sheet-permission-panel.model';+import { SheetPermissionUserManagerService } from '../service';+import type { IPermissionOpenPanelParam } from './type';++export const SheetPermissionOpenPanelOperation: ICommand<IPermissionOpenPanelParam> = {+ type: CommandType.OPERATION,+ id: 'sheet-permission.operation.openPanel',+ async handler(accessor, _params = {}) {+ const sidebarService = accessor.get(ISidebarService);+ const sheetPermissionPanelModel = accessor.get(SheetPermissionPanelModel);+ const sheetPermissionUserManagerService = accessor.get(SheetPermissionUserManagerService);++ const { showDetail = true, fromSheetBar = false } = _params;++ const sidebarProps = {+ header: { title: 'permission.panel.title' },+ children: {+ label: UNIVER_SHEET_PERMISSION_PANEL,+ showDetail,+ fromSheetBar,+ },+ width: 320,+ footer: {+ label: UNIVER_SHEET_PERMISSION_PANEL_FOOTER,+ showDetail,+ },+ onClose: () => {+ sheetPermissionPanelModel.setRangeErrorMsg('');+ sheetPermissionPanelModel.resetRule();+ sheetPermissionUserManagerService.setUserList([]);+ sheetPermissionUserManagerService.setSelectUserList([]);+ sheetPermissionUserManagerService.setOldCollaboratorList([]);+ sheetPermissionUserManagerService.setAllUserList([]);+ },+ };++ sidebarService.open(sidebarProps);++ return true;+ },+};diff --git a/packages/core/src/services/permission/permission-point.ts b/packages/sheet-permission-ui/src/operation/type.tssimilarity index 63%rename from packages/core/src/services/permission/permission-point.tsrename to packages/sheet-permission-ui/src/operation/type.tsindex 750982d723..65fbef2a55 100644--- a/packages/core/src/services/permission/permission-point.ts+++ b/packages/sheet-permission-ui/src/operation/type.ts@@ -14,15 +14,7 @@* limitations under the License.*/-import { PermissionPoint } from '../../shared';--export const UniverEditablePermissionPoint = 'univer.editable';-export class UniverEditablePermission extends PermissionPoint<boolean> {- id = UniverEditablePermissionPoint;- value = true;- unitID: string;- constructor(unitID: string) {- super();- this.unitID = unitID;- }+export interface IPermissionOpenPanelParam {+ fromSheetBar?: boolean;+ showDetail?: boolean;}diff --git a/packages/sheet-permission-ui/src/plugin.ts b/packages/sheet-permission-ui/src/plugin.tsnew file mode 100644index 0000000000..1c67d4f1f0--- /dev/null+++ b/packages/sheet-permission-ui/src/plugin.ts@@ -0,0 +1,108 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import { ICommandService, LocaleService, Plugin, Tools, UniverInstanceType } from '@univerjs/core';+import { type Dependency, Inject, Injector } from '@wendellhu/redi';+import { WorksheetProtectionRenderService } from '@univerjs/sheets';+import { IRenderManagerService } from '@univerjs/engine-render';+import { PermissionRenderService } from './service/permission-render.service';+import { UNIVER_SHEET_PERMISSION_PLUGIN_NAME } from './const';+import type { IUniverSheetsPermissionMenuConfig } from './controller/sheet-permission-render.controller';+import { DefaultSheetPermissionMenuConfig, SheetPermissionRenderController } from './controller/sheet-permission-render.controller';+import { enUS, zhCN } from './locale';+import { SheetPermissionOpenPanelOperation } from './operation/sheet-permission-open-panel.operation';+import { SheetPermissionUserManagerService } from './service';+import { AddRangeProtectionFromContextMenuCommand, AddRangeProtectionFromSheetBarCommand, AddRangeProtectionFromToolbarCommand, DeleteRangeProtectionFromContextMenuCommand, SetProtectionCommand, SetRangeProtectionFromContextMenuCommand, ViewSheetPermissionFromContextMenuCommand, ViewSheetPermissionFromSheetBarCommand } from './command/range-protection.command';+import { SheetPermissionOpenDialogOperation } from './operation/sheet-permission-open-dialog.operation';+import { AddWorksheetProtectionCommand, ChangeSheetProtectionFromSheetBarCommand, DeleteWorksheetProtectionCommand, DeleteWorksheetProtectionFormSheetBarCommand, SetWorksheetProtectionCommand } from './command/worksheet-protection.command';+import { SheetPermissionPanelModel } from './service/sheet-permission-panel.model';+import { SheetPermissionInterceptorRenderController } from './controller/sheet-permission-interceptor-render.controller';+import { SheetPermissionInitController } from './controller/sheet-permission-init.controller';++export class UniverSheetsPermissionUIPlugin extends Plugin {+ static override pluginName = UNIVER_SHEET_PERMISSION_PLUGIN_NAME;+ static override type = UniverInstanceType.UNIVER_SHEET;++ constructor(+ private _config: Partial<IUniverSheetsPermissionMenuConfig> = {},+ @Inject(Injector) override readonly _injector: Injector,+ @ICommandService private readonly _commandService: ICommandService,+ @Inject(LocaleService) private readonly _localeService: LocaleService,+ @IRenderManagerService private readonly _renderManagerService: IRenderManagerService+ ) {+ super();+ this._config = Tools.deepMerge({}, DefaultSheetPermissionMenuConfig, this._config);+ }++ override onReady(): void {+ this._registerRenderControllers();+ }++ override onStarting() {+ ([+ [SheetPermissionPanelModel],+ [SheetPermissionUserManagerService],+ [PermissionRenderService],+ [WorksheetProtectionRenderService],+ ] as Dependency[]).forEach((dep) => {+ this._injector.add(dep);+ });++ this._injector.add(+ [+ SheetPermissionRenderController,+ {+ useFactory: () => this._injector.createInstance(SheetPermissionRenderController, this._config),+ },+ ]++ );++ [+ SheetPermissionOpenPanelOperation,+ SheetPermissionOpenDialogOperation,+ AddRangeProtectionFromToolbarCommand,+ AddRangeProtectionFromContextMenuCommand,+ ViewSheetPermissionFromContextMenuCommand,+ AddRangeProtectionFromSheetBarCommand,+ ViewSheetPermissionFromSheetBarCommand,+ ChangeSheetProtectionFromSheetBarCommand,+ DeleteRangeProtectionFromContextMenuCommand,+ SetRangeProtectionFromContextMenuCommand,+ AddWorksheetProtectionCommand,+ DeleteWorksheetProtectionCommand,+ SetWorksheetProtectionCommand,+ DeleteWorksheetProtectionFormSheetBarCommand,+ SetProtectionCommand,+ ].forEach((command) => {+ this._commandService.registerCommand(command);+ });++ this._localeService.load({+ zhCN,+ enUS,+ });+ }++ private _registerRenderControllers(): void {+ ([+ SheetPermissionInterceptorRenderController,+ SheetPermissionInitController,+ ]).forEach((controller) => {+ this.disposeWithMe(this._renderManagerService.registerRenderController(UniverInstanceType.UNIVER_SHEET, controller));+ });+ }+}diff --git a/packages/sheet-permission-ui/src/service/index.ts b/packages/sheet-permission-ui/src/service/index.tsnew file mode 100644index 0000000000..9bdeb97b03--- /dev/null+++ b/packages/sheet-permission-ui/src/service/index.ts@@ -0,0 +1,17 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++export { SheetPermissionUserManagerService } from './sheet-permission-user-list.service';diff --git a/packages/sheet-permission-ui/src/service/permission-render.service.ts b/packages/sheet-permission-ui/src/service/permission-render.service.tsnew file mode 100644index 0000000000..7b42667a6a--- /dev/null+++ b/packages/sheet-permission-ui/src/service/permission-render.service.ts@@ -0,0 +1,81 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import { Inject } from '@wendellhu/redi';+import { IRenderManagerService } from '@univerjs/engine-render';+import type { Spreadsheet } from '@univerjs/engine-render';+import { throttleTime } from 'rxjs/operators';+import type { Workbook } from '@univerjs/core';+import { Disposable, IPermissionService, IUniverInstanceService, LifecycleStages, OnLifecycle, UniverInstanceType } from '@univerjs/core';+import { RANGE_PROTECTION_CAN_NOT_VIEW_RENDER_EXTENSION_KEY, RANGE_PROTECTION_CAN_VIEW_RENDER_EXTENSION_KEY, RangeProtectionCanNotViewRenderExtension, RangeProtectionCanViewRenderExtension, RangeProtectionRuleModel } from '@univerjs/sheets';+import { SheetSkeletonManagerService } from '@univerjs/sheets-ui';+import { merge } from 'rxjs';++@OnLifecycle(LifecycleStages.Ready, PermissionRenderService)+export class PermissionRenderService extends Disposable {+ private _rangeProtectionCanViewRenderExtension = new RangeProtectionCanViewRenderExtension();+ private _rangeProtectionCanNotViewRenderExtension = new RangeProtectionCanNotViewRenderExtension();+ constructor(+ @Inject(IRenderManagerService) private _renderManagerService: IRenderManagerService,+ @Inject(IUniverInstanceService) private _univerInstanceService: IUniverInstanceService,+ @Inject(RangeProtectionRuleModel) private _rangeProtectionRuleModel: RangeProtectionRuleModel,+ @Inject(SheetSkeletonManagerService) private _sheetSkeletonManagerService: SheetSkeletonManagerService,+ @IPermissionService private _permissionService: IPermissionService+ ) {+ super();+ this._initRender();+ this._initSkeleton();+ this._rangeProtectionRuleModel.ruleChange$.subscribe((info) => {+ if ((info.oldRule?.id && this._rangeProtectionCanViewRenderExtension.renderCache.has(info.oldRule.id)) || this._rangeProtectionCanViewRenderExtension.renderCache.has(info.rule.id)) {+ this._rangeProtectionCanViewRenderExtension.clearCache();+ }+ if ((info.oldRule?.id && this._rangeProtectionCanNotViewRenderExtension.renderCache.has(info.oldRule.id)) || this._rangeProtectionCanNotViewRenderExtension.renderCache.has(info.rule.id)) {+ this._rangeProtectionCanNotViewRenderExtension.clearCache();+ }+ });+ }++ private _initRender() {+ const register = (renderId: string) => {+ const render = renderId && this._renderManagerService.getRenderById(renderId);+ const spreadsheetRender = render && render.mainComponent as Spreadsheet;+ if (spreadsheetRender) {+ if (!spreadsheetRender.getExtensionByKey(RANGE_PROTECTION_CAN_VIEW_RENDER_EXTENSION_KEY)) {+ spreadsheetRender.register(this._rangeProtectionCanViewRenderExtension);+ }+ if (!spreadsheetRender.getExtensionByKey(RANGE_PROTECTION_CAN_NOT_VIEW_RENDER_EXTENSION_KEY)) {+ spreadsheetRender.register(this._rangeProtectionCanNotViewRenderExtension);+ }+ }+ };+ this.disposeWithMe(this._renderManagerService.currentRender$.subscribe((renderId) => {+ renderId && register(renderId);+ }));+ const workbook = this._univerInstanceService.getCurrentUnitForType(UniverInstanceType.UNIVER_SHEET)!;+ if (workbook) {+ register(workbook.getUnitId());+ }+ }++ private _initSkeleton() {+ const markDirtySkeleton = () => {+ this._sheetSkeletonManagerService.reCalculate();+ const unitId = this._univerInstanceService.getCurrentUnitForType<Workbook>(UniverInstanceType.UNIVER_SHEET)!.getUnitId();+ this._renderManagerService.getRenderById(unitId)?.mainComponent?.makeDirty();+ };+ this.disposeWithMe(merge(this._permissionService.permissionPointUpdate$.pipe(throttleTime(300, undefined, { trailing: true })), this._rangeProtectionRuleModel.ruleChange$).pipe().subscribe(markDirtySkeleton));+ }+}diff --git a/packages/sheet-permission-ui/src/service/sheet-permission-panel.model.ts b/packages/sheet-permission-ui/src/service/sheet-permission-panel.model.tsnew file mode 100644index 0000000000..9642d83dd0--- /dev/null+++ b/packages/sheet-permission-ui/src/service/sheet-permission-panel.model.ts@@ -0,0 +1,79 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import type { IRange, Nullable } from '@univerjs/core';+import { LifecycleStages, OnLifecycle } from '@univerjs/core';+import { UnitObject } from '@univerjs/protocol';+import type { IRangeProtectionRule, IWorksheetProtectionRule } from '@univerjs/sheets';+import { BehaviorSubject } from 'rxjs';++const DEFAULT_RANGE_RULE: IRangeProtectionRule = {+ name: '',+ unitId: '',+ subUnitId: '',+ permissionId: '',+ unitType: UnitObject.Unkonwn,+ id: '',+ ranges: [],+};++export enum viewState {+ othersCanView = 'othersCanView',+ noOneElseCanView = 'noOneElseCanView',++}++type IPermissionPanelBaseRule = IRangeProtectionRule | IWorksheetProtectionRule;++export type IPermissionPanelRule = IPermissionPanelBaseRule & { viewStatus?: viewState; ranges: IRange[] };++@OnLifecycle(LifecycleStages.Starting, SheetPermissionPanelModel)+export class SheetPermissionPanelModel {+ private _rule: IPermissionPanelRule = DEFAULT_RANGE_RULE;+ private _rule$ = new BehaviorSubject(this._rule);+ private _oldRule: Nullable<IPermissionPanelRule>;+ private _rangeErrorMsg$ = new BehaviorSubject('');++ rangeErrorMsg$ = this._rangeErrorMsg$.asObservable();++ setRangeErrorMsg(msg: string) {+ this._rangeErrorMsg$.next(msg);+ }++ rule$ = this._rule$.asObservable();++ get rule() {+ return this._rule;+ }++ setRule(ruleObj: Partial<IPermissionPanelRule>) {+ this._rule = { ...this._rule, ...ruleObj };+ this._rule$.next(this._rule);+ }++ resetRule() {+ this._rule = DEFAULT_RANGE_RULE;+ this._rule$.next(this._rule);+ }++ get oldRule() {+ return this._oldRule;+ }++ setOldRule(ruleObj: Nullable<IPermissionPanelRule>) {+ this._oldRule = ruleObj;+ }+}diff --git a/packages/sheet-permission-ui/src/service/sheet-permission-user-list.service.ts b/packages/sheet-permission-ui/src/service/sheet-permission-user-list.service.tsnew file mode 100644index 0000000000..9b5b0b7ac9--- /dev/null+++ b/packages/sheet-permission-ui/src/service/sheet-permission-user-list.service.ts@@ -0,0 +1,62 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import { BehaviorSubject } from 'rxjs';+import type { ICollaborator } from '@univerjs/protocol';++export class SheetPermissionUserManagerService {+ private _userList: ICollaborator[] = [];+ private _oldCollaboratorList: ICollaborator[] = [];+ private _selectUserList: ICollaborator[] = [];+ private _allUserList: ICollaborator[] = [];++ private _selectUserList$ = new BehaviorSubject<ICollaborator[]>(this._selectUserList);++ selectUserList$ = this._selectUserList$.asObservable();++ get userList() {+ return this._userList;+ }++ get allUserList() {+ return this._allUserList;+ }++ setAllUserList(userList: ICollaborator[]) {+ this._allUserList = userList;+ }++ setUserList(userList: ICollaborator[]) {+ this._userList = userList;+ }++ get oldCollaboratorList() {+ return this._oldCollaboratorList;+ }++ setOldCollaboratorList(userList: ICollaborator[]) {+ this._oldCollaboratorList = userList;+ }++ get selectUserList() {+ return this._selectUserList;+ }++ setSelectUserList(userList: ICollaborator[]) {+ this._selectUserList = userList;+ this._selectUserList$.next(userList);+ }+}diff --git a/packages/sheet-permission-ui/src/utils.ts b/packages/sheet-permission-ui/src/utils.tsnew file mode 100644index 0000000000..dd6da599f3--- /dev/null+++ b/packages/sheet-permission-ui/src/utils.ts@@ -0,0 +1,28 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import type { ICollaborator } from '@univerjs/protocol';++export function getUserListEqual(userList1: ICollaborator[], userList2: ICollaborator[]) {+ if (userList1.length !== userList2.length) return false;++ const sorted1 = userList1.sort((a, b) => a.id.localeCompare(b.id));+ const sorted2 = userList2.sort((a, b) => a.id.localeCompare(b.id));++ return sorted1.every((user, index) => {+ return user.subject?.userID === sorted2[index].subject?.userID && user.role === sorted2[index].role;+ });+}diff --git a/packages/sheet-permission-ui/src/views/error-msg-dialog/index.module.less b/packages/sheet-permission-ui/src/views/error-msg-dialog/index.module.lessnew file mode 100644index 0000000000..e9c136f1ba--- /dev/null+++ b/packages/sheet-permission-ui/src/views/error-msg-dialog/index.module.less@@ -0,0 +1,28 @@+.sheet-permission-alert-dialog {+ padding: var(--padding-xl) 24px;++ &-title {+ font-size: var(--font-size-lg);+ font-weight: 500;+ margin-bottom: var(--margin-base);+ }+}++.sheet-permission-alert-dialog-button {+ margin-top: var(--margin-lg);+ display: flex;+ justify-content: flex-end;+}++// @ybzky todo need more freedom to modify container style schemes+:global(.sheet-permission-user-dialog .univer-dialog-close) {+ display: none;+}++:global(.sheet-permission-user-dialog .univer-dialog-header) {+ display: none;+}++:global(.sheet-permission-user-dialog .univer-dialog-body) {+ padding: 0;+}diff --git a/packages/sheet-permission-ui/src/views/error-msg-dialog/index.tsx b/packages/sheet-permission-ui/src/views/error-msg-dialog/index.tsxnew file mode 100644index 0000000000..17bfd0de88--- /dev/null+++ b/packages/sheet-permission-ui/src/views/error-msg-dialog/index.tsx@@ -0,0 +1,44 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import { LocaleService } from '@univerjs/core';+import { useDependency } from '@wendellhu/redi/react-bindings';+import React from 'react';+import { Button } from '@univerjs/design';+import { IDialogService } from '@univerjs/ui';+import styles from './index.module.less';+import { UNIVER_SHEET_PERMISSION_ALERT_DIALOG_ID } from './interface';++export const AlertDialog = ({ errorMsg }: { errorMsg: string }) => {+ const localeService = useDependency(LocaleService);+ const dialogService = useDependency(IDialogService);+ return (+ <div className={styles.sheetPermissionAlertDialog}>+ <h1 className={styles.sheetPermissionAlertDialogTitle}>{localeService.t('permission.dialog.alert')}</h1>+ <p>{errorMsg || localeService.t('permission.dialog.alertContent')}</p>+ <div className={styles.sheetPermissionAlertDialogButton}>+ <Button+ type="primary"+ onClick={() => {+ dialogService.close(UNIVER_SHEET_PERMISSION_ALERT_DIALOG_ID);+ }}+ >+ {localeService.t('permission.button.confirm')}+ </Button>+ </div>+ </div>+ );+};diff --git a/packages/sheet-permission-ui/src/views/error-msg-dialog/interface.ts b/packages/sheet-permission-ui/src/views/error-msg-dialog/interface.tsnew file mode 100644index 0000000000..d4d27a9920--- /dev/null+++ b/packages/sheet-permission-ui/src/views/error-msg-dialog/interface.ts@@ -0,0 +1,18 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++export const UNIVER_SHEET_PERMISSION_ALERT_DIALOG_ID = 'UNIVER_SHEET_PERMISSION_ALERT_DIALOG_ID';+export const UNIVER_SHEET_PERMISSION_ALERT_DIALOG = 'UNIVER_SHEET_PERMISSION_ALERT_DIALOG';diff --git a/packages/sheet-permission-ui/src/views/footer/index.module.less b/packages/sheet-permission-ui/src/views/footer/index.module.lessnew file mode 100644index 0000000000..225bb4ad4a--- /dev/null+++ b/packages/sheet-permission-ui/src/views/footer/index.module.less@@ -0,0 +1,19 @@+.sheet-permission-panel-footer {+ display: flex;+ flex-direction: row-reverse;++ &-cancel {+ margin-right: 12px;+ }+}++.sheet-permission-panel-add-button {+ width: 100%;+ display: flex;+ align-items: center;+ justify-content: center;++ div {+ margin-right: 4px;+ }+}diff --git a/packages/sheet-permission-ui/src/views/footer/index.tsx b/packages/sheet-permission-ui/src/views/footer/index.tsxnew file mode 100644index 0000000000..0530d99450--- /dev/null+++ b/packages/sheet-permission-ui/src/views/footer/index.tsx@@ -0,0 +1,25 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import React from 'react';+import { SheetPermissionPanelAddFooter } from './permission-list-footer';+import { SheetPermissionPanelDetailFooter } from './permission-detail-footer';++export const SheetPermissionPanelFooter = ({ showDetail }: { showDetail: boolean }) => {+ return (+ showDetail ? <SheetPermissionPanelDetailFooter /> : <SheetPermissionPanelAddFooter />+ );+};diff --git a/packages/sheet-permission-ui/src/views/footer/permission-detail-footer.tsx b/packages/sheet-permission-ui/src/views/footer/permission-detail-footer.tsxnew file mode 100644index 0000000000..f2d05f9595--- /dev/null+++ b/packages/sheet-permission-ui/src/views/footer/permission-detail-footer.tsx@@ -0,0 +1,167 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import { Button } from '@univerjs/design';+import { useDependency } from '@wendellhu/redi/react-bindings';+import React from 'react';+import { ISidebarService, useObservable } from '@univerjs/ui';+import { IAuthzIoService, ICommandService, LocaleService } from '@univerjs/core';+import { UnitAction, UnitObject, UnitRole } from '@univerjs/protocol';+import { AddRangeProtectionCommand } from '@univerjs/sheets';+import { SheetPermissionUserManagerService } from '../../service';+import { UNIVER_SHEET_PERMISSION_PANEL, UNIVER_SHEET_PERMISSION_PANEL_FOOTER } from '../../const';+import { AddWorksheetProtectionCommand } from '../../command/worksheet-protection.command';+import { SheetPermissionPanelModel, viewState } from '../../service/sheet-permission-panel.model';+import { SetProtectionCommand } from '../../command/range-protection.command';+import { getUserListEqual } from '../../utils';+import styles from './index.module.less';++export const SheetPermissionPanelDetailFooter = () => {+ const sheetPermissionPanelModel = useDependency(SheetPermissionPanelModel);+ const activeRule = useObservable(sheetPermissionPanelModel.rule$, sheetPermissionPanelModel.rule);+ const sidebarService = useDependency(ISidebarService);+ const authzIoService = useDependency(IAuthzIoService);+ const localeService = useDependency(LocaleService);+ const commandService = useDependency(ICommandService);+ const sheetPermissionUserManagerService = useDependency(SheetPermissionUserManagerService);+ const rangeErrMsg = useObservable(sheetPermissionPanelModel.rangeErrorMsg$);++ return (+ <div className={styles.sheetPermissionPanelFooter}>+ <Button+ type="primary"+ onClick={async () => {+ if (!activeRule.name || rangeErrMsg) return;+ const collaborators = sheetPermissionUserManagerService.selectUserList;+ if (activeRule.viewStatus === viewState.othersCanView) {+ sheetPermissionUserManagerService.allUserList.forEach((user) => {+ const hasInCollaborators = collaborators.some((collaborator) => collaborator.id === user.id);+ if (!hasInCollaborators) {+ const userCanRead = {+ ...user,+ role: UnitRole.Reader,+ };+ collaborators.push(userCanRead);+ }+ });+ }+ // edit rule++ const isSameCollaborators = getUserListEqual(collaborators, sheetPermissionUserManagerService.oldCollaboratorList);+ if (activeRule.permissionId) {+ const oldRule = sheetPermissionPanelModel.oldRule;+ if (activeRule.unitType === oldRule?.unitType && activeRule.name === oldRule.name && activeRule.description === oldRule.description && activeRule.ranges === oldRule.ranges && !isSameCollaborators) {+ await authzIoService.putCollaborators({+ objectID: activeRule.permissionId,+ unitID: activeRule.unitId,+ collaborators,+ });+ } else {+ let newPermissionId = activeRule.permissionId;+ if (!isSameCollaborators) {+ if (activeRule.unitType === UnitObject.Worksheet) {+ newPermissionId = await authzIoService.create({+ worksheetObject: {+ collaborators,+ unitID: activeRule.unitId,+ name: activeRule.name,+ strategies: [{ role: UnitRole.Editor, action: UnitAction.Edit }, { role: UnitRole.Reader, action: UnitAction.View }],+ },+ objectType: UnitObject.Worksheet,+ });+ } else {+ newPermissionId = await authzIoService.create({+ selectRangeObject: {+ collaborators,+ unitID: activeRule.unitId,+ name: activeRule.name,+ },+ objectType: UnitObject.SelectRange,+ });+ }+ }+ commandService.executeCommand(SetProtectionCommand.id, {+ rule: {+ ...activeRule,+ permissionId: newPermissionId,+ },+ });+ }+ } else {+ // create rule+ if (activeRule.unitType === UnitObject.Worksheet) {+ const permissionId = await authzIoService.create({+ worksheetObject: {+ collaborators,+ unitID: activeRule.unitId,+ name: activeRule.name,+ strategies: [{ role: UnitRole.Editor, action: UnitAction.Edit }, { role: UnitRole.Reader, action: UnitAction.View }],+ },+ objectType: UnitObject.Worksheet,+ });+ const { ranges = [], ...sheetRule } = activeRule;+ sheetRule.permissionId = permissionId;+ commandService.executeCommand(AddWorksheetProtectionCommand.id, {+ rule: sheetRule,+ unitId: activeRule.unitId,+ });+ } else if (activeRule.unitType === UnitObject.SelectRange) {+ const permissionId = await authzIoService.create({+ selectRangeObject: {+ collaborators,+ unitID: activeRule.unitId,+ name: activeRule.name,+ },+ objectType: UnitObject.SelectRange,+ });+ commandService.executeCommand(AddRangeProtectionCommand.id, {+ rule: activeRule,+ permissionId,+ });+ }+ }+ sheetPermissionPanelModel.resetRule();+ sheetPermissionUserManagerService.setSelectUserList([]);+ const sidebarProps = {+ header: { title: '保护行列' },+ children: {+ label: UNIVER_SHEET_PERMISSION_PANEL,+ showDetail: false,+ },+ width: 320,+ footer: {+ label: UNIVER_SHEET_PERMISSION_PANEL_FOOTER,+ showDetail: false,+ },+ };+ sidebarService.open(sidebarProps);+ }}+ >+ {localeService.t('permission.button.confirm')}+ </Button>+ <Button+ className={styles.sheetPermissionPanelFooterCancel}+ onClick={() => {+ sheetPermissionPanelModel.resetRule();+ sheetPermissionUserManagerService.setSelectUserList([]);+ sidebarService.close();+ }}+ >+ {localeService.t('permission.button.cancel')}+ </Button>+ </div>+ );+};diff --git a/packages/sheet-permission-ui/src/views/footer/permission-list-footer.tsx b/packages/sheet-permission-ui/src/views/footer/permission-list-footer.tsxnew file mode 100644index 0000000000..bf36b576d2--- /dev/null+++ b/packages/sheet-permission-ui/src/views/footer/permission-list-footer.tsx@@ -0,0 +1,82 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import { Button } from '@univerjs/design';+import { useDependency } from '@wendellhu/redi/react-bindings';+import React from 'react';+import { ISidebarService, useObservable } from '@univerjs/ui';+import type { Workbook } from '@univerjs/core';+import { IPermissionService, IUniverInstanceService, LocaleService, UniverInstanceType } from '@univerjs/core';+import { WorkbookEditablePermission, WorkbookManageCollaboratorPermission, WorksheetProtectionRuleModel } from '@univerjs/sheets';+import { UNIVER_SHEET_PERMISSION_PANEL, UNIVER_SHEET_PERMISSION_PANEL_FOOTER } from '../../const';+import { SheetPermissionPanelModel } from '../../service/sheet-permission-panel.model';+import styles from './index.module.less';++export const SheetPermissionPanelAddFooter = () => {+ const sidebarService = useDependency(ISidebarService);+ const localeService = useDependency(LocaleService);++ const univerInstanceService = useDependency(IUniverInstanceService);+ const permissionService = useDependency(IPermissionService);+ const workbook = univerInstanceService.getCurrentUnitForType<Workbook>(UniverInstanceType.UNIVER_SHEET)!;+ const unitId = workbook.getUnitId();+ const activeSheet$ = useObservable(workbook.activeSheet$);++ const workbookEditPermission = permissionService.getPermissionPoint(new WorkbookEditablePermission(unitId).id)?.value ?? false;+ const workbookManagePermission = permissionService.getPermissionPoint(new WorkbookManageCollaboratorPermission(unitId).id)?.value ?? false;++ const hasSetProtectPermission = workbookEditPermission && workbookManagePermission;+ const sheetPermissionPanelModel = useDependency(SheetPermissionPanelModel);+ const worksheetProtectionRuleModel = useDependency(WorksheetProtectionRuleModel);++ const subUnitId = activeSheet$?.getSheetId();+ if (!subUnitId) {+ return null;+ }++ const worksheetRule = worksheetProtectionRuleModel.getRule(unitId, subUnitId);++ if (!hasSetProtectPermission || worksheetRule) {+ return null;+ }+ return (+ <div>+ <Button+ className={styles.sheetPermissionPanelAddButton}+ type="primary"+ onClick={() => {+ sheetPermissionPanelModel.resetRule();+ const sidebarProps = {+ header: { title: '保护行列' },+ children: {+ label: UNIVER_SHEET_PERMISSION_PANEL,+ showDetail: true,+ },+ width: 320,+ footer: {+ label: UNIVER_SHEET_PERMISSION_PANEL_FOOTER,+ showDetail: true,+ },+ };+ sidebarService.open(sidebarProps);+ }}+ >+ <div>+ </div>+ {localeService.t('permission.button.addNewPermission')}+ </Button>+ </div>+ );+};diff --git a/packages/sheet-permission-ui/src/views/index.ts b/packages/sheet-permission-ui/src/views/index.tsnew file mode 100644index 0000000000..021bfee24a--- /dev/null+++ b/packages/sheet-permission-ui/src/views/index.ts@@ -0,0 +1,22 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++export { SheetPermissionPanel } from './panel';+export { SheetPermissionPanelFooter } from './footer';+export { SheetPermissionPanelList } from './panel-list';+export { SheetPermissionPanelAddFooter } from './footer/permission-list-footer';+export { SheetPermissionUserDialog } from './user-dialog';+export { SheetPermissionDialog } from './permission-dialog';diff --git a/packages/sheet-permission-ui/src/views/panel-detail/index.module.less b/packages/sheet-permission-ui/src/views/panel-detail/index.module.lessnew file mode 100644index 0000000000..db27614578--- /dev/null+++ b/packages/sheet-permission-ui/src/views/panel-detail/index.module.less@@ -0,0 +1,127 @@+.permission-panel-detail-wrapper {+ margin-top: 16px;+ height: 100%;+}++.radio-group-vertical {+ display: flex;+ flex-direction: column;+ font-weight: 400;+}++.sheet-permission-design-person-panel {+ height: 300px;+ border: 1px solid rgb(var(--grey-200));+ border-radius: var(--border-radius-lg);+ padding: var(--padding-base);+ margin-bottom: var(--margin-xs);+ display: flex;+ flex-direction: column;++ &-header {+ display: flex;+ justify-content: space-between;+ align-items: center;++ &-add {+ cursor: pointer;+ color: rgb(var(--blue-500));+ }+ }++ &-split {+ height: 1px;+ background-color: rgb(var(--grey-200));+ margin: var(--margin-xs) 0;+ }++ &-content {+ &-item {+ height: 28px;+ line-height: 28px;+ margin-bottom: var(--margin-sm);+ display: flex;+ align-items: center;++ &:last-child {+ margin-bottom: 0;+ }++ &-name {+ width: 143px;+ color: rgb(var(--color-black));+ white-space: nowrap;+ overflow: hidden;+ text-overflow: ellipsis;+ margin-left: 6px;+ }++ &-select {+ width: 83px;+ cursor: pointer;+ }+ }+ }++ :global(+ .univer-sheet-permission-design-person-panel-content-item-select.univer-select-single:not(+ .univer-select-customize-input+ )+ .univer-select-selector+ ) {+ border: none;+ padding: 0;+ color: rgb(var(--grey-900));+ }++ :global(+ .univer-sheet-permission-design-person-panel-content-item-select.univer-select-show-arrow+ .univer-select-arrow+ ) {+ right: 0;+ }+}++.sheet-permission-design-person-panel-content {+ flex: 1;+}++.sheet-permission-user-list-empty {+ display: flex;+ flex-direction: column;+ align-items: center;+ justify-content: center;+ height: 100%;+}++.sheet-permission-user-list-empty-text {+ width: 240px;+ word-wrap: break-word;+ color: rgb(var(--grey-400));+ font-size: 13px;+}++.sheet-permission-panel-title {+ font-weight: 500;+}++.permission-range-selector {+ font-weight: 400;+}++.permission-range-selector-error,+.sheet-permission-panel-name-input-error {+ border: 1px solid rgb(var(--red-400));++ &:hover {+ border: 1px solid rgb(var(--red-400));+ }++ &-text {+ height: 20px;+ line-height: 20px;+ color: rgb(var(--red-400));+ font-size: var(--font-size-xs);+ font-weight: 400;+ }+}diff --git a/packages/sheet-permission-ui/src/views/panel-detail/index.tsx b/packages/sheet-permission-ui/src/views/panel-detail/index.tsxnew file mode 100644index 0000000000..2c6eed9c2f--- /dev/null+++ b/packages/sheet-permission-ui/src/views/panel-detail/index.tsx@@ -0,0 +1,404 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import React, { useEffect, useState } from 'react';+import { Avatar, FormLayout, Input, Radio, RadioGroup, Select } from '@univerjs/design';+import { useDependency } from '@wendellhu/redi/react-bindings';+import type { IRange, Workbook } from '@univerjs/core';+import { createInternalEditorID, IAuthzIoService, isValidRange, IUniverInstanceService, LocaleService, RANGE_TYPE, Rectangle, UniverInstanceType, UserManagerService } from '@univerjs/core';+import { IDialogService, ISidebarService, RangeSelector, useObservable } from '@univerjs/ui';+import { RangeProtectionRuleModel, SelectionManagerService, setEndForRange, WorksheetProtectionRuleModel } from '@univerjs/sheets';+import { serializeRange } from '@univerjs/engine-formula';+import type { ICollaborator, IUser } from '@univerjs/protocol';+import { UnitObject, UnitRole } from '@univerjs/protocol';+import clsx from 'clsx';+import { SheetPermissionUserManagerService } from '../../service';+import { UNIVER_SHEET_PERMISSION_USER_DIALOG, UNIVER_SHEET_PERMISSION_USER_DIALOG_ID } from '../../const';++import { SheetPermissionPanelModel, viewState } from '../../service/sheet-permission-panel.model';+import { UserEmptyBase64 } from '../user-dialog/constant';+import Spin from '../spin';+import styles from './index.module.less';++export const SheetPermissionPanelDetail = ({ fromSheetBar }: { fromSheetBar: boolean }) => {+ const localeService = useDependency(LocaleService);+ const dialogService = useDependency(IDialogService);+ const univerInstanceService = useDependency(IUniverInstanceService);+ const selectionManagerService = useDependency(SelectionManagerService);+ const sheetPermissionPanelModel = useDependency(SheetPermissionPanelModel);+ const activeRule = useObservable(sheetPermissionPanelModel.rule$, sheetPermissionPanelModel.rule);+ const userManagerService = useDependency(UserManagerService);+ const sheetPermissionUserManagerService = useDependency(SheetPermissionUserManagerService);+ const authzIoService = useDependency(IAuthzIoService);+ const sidebarService = useDependency(ISidebarService);+ const rangeProtectionRuleModel = useDependency(RangeProtectionRuleModel);+ const worksheetRuleModel = useDependency(WorksheetProtectionRuleModel);+ const rangeErrorMsg = useObservable(sheetPermissionPanelModel.rangeErrorMsg$);++ const workbook = univerInstanceService.getCurrentUnitForType<Workbook>(UniverInstanceType.UNIVER_SHEET)!;+ const worksheet = workbook.getActiveSheet()!;+ const unitId = workbook.getUnitId();+ const subUnitId = worksheet.getSheetId();++ const selectUserList = useObservable(sheetPermissionUserManagerService.selectUserList$, sheetPermissionUserManagerService.selectUserList);++ const [editorGroupValue, setEditorGroupValue] = React.useState(selectUserList.length ? 'designedUserCanEdit' : 'onlyMe');+ const [viewGroupValue, setViewGroupValue] = React.useState(viewState.othersCanView);+ const [loading, setLoading] = useState(false);++ const handleAddPerson = async () => {+ const userList = await authzIoService.listCollaborators({+ objectID: unitId,+ unitID: unitId,+ });+ userList.forEach((user) => {+ if (user?.subject) {+ userManagerService.addUser(user.subject as IUser);+ }+ });++ sheetPermissionUserManagerService.setUserList(userList);++ dialogService.open({+ id: UNIVER_SHEET_PERMISSION_USER_DIALOG_ID,+ title: { title: '' },+ children: { label: UNIVER_SHEET_PERMISSION_USER_DIALOG },+ width: 280,+ destroyOnClose: true,+ onClose: () => dialogService.close(UNIVER_SHEET_PERMISSION_USER_DIALOG_ID),+ className: 'sheet-permission-user-dialog',+ });+ };++ const checkRangeValid = (permissionRanges: IRange[]) => {+ let rangeErrorString = '';+ if (permissionRanges.length === 0) {+ rangeErrorString = localeService.t('permission.panel.emptyRangeError');+ } else if (permissionRanges.length > 1) {+ let hasLap = false;+ for (let i = 0; i < permissionRanges.length; i++) {+ for (let j = i + 1; j < permissionRanges.length; j++) {+ if (Rectangle.intersects(permissionRanges[i], permissionRanges[j])) {+ hasLap = true;+ break;+ }+ }+ if (hasLap) {+ break;+ }+ }+ if (hasLap) {+ rangeErrorString = localeService.t('permission.panel.rangeOverlapError');+ }+ }+ if (!rangeErrorString) {+ const worksheetRule = worksheetRuleModel.getRule(unitId, subUnitId);+ if (worksheetRule && !activeRule?.permissionId) {+ rangeErrorString = localeService.t('permission.panel.rangeOverlapOverPermissionError');+ return rangeErrorString;+ }+ const lapRule = rangeProtectionRuleModel.getSubunitRuleList(unitId, subUnitId).filter((rule) => {+ return rule.permissionId !== activeRule?.permissionId;+ }).find((rule) => {+ return rule.ranges.some((ruleRange) => {+ return permissionRanges.some((r) => Rectangle.intersects(ruleRange, r));+ });+ });+ const lapRange = lapRule?.ranges.find((range) => {+ return permissionRanges.some((r) => Rectangle.intersects(range, r));+ });+ if (lapRange) {+ rangeErrorString = localeService.t('permission.panel.rangeOverlapOverPermissionError');+ }+ }+ return rangeErrorString;+ };++ useEffect(() => {+ const isEdit = activeRule?.permissionId;+ if (isEdit) {+ if (activeRule.unitType === UnitObject.Worksheet) {+ sheetPermissionPanelModel.setRule({+ ranges: [{+ startRow: 0,+ startColumn: 0,+ endRow: worksheet.getRowCount() - 1,+ endColumn: worksheet.getColumnCount() - 1,+ rangeType: RANGE_TYPE.ALL,+ }],+ });+ }+ return;+ }+ if (fromSheetBar) {+ selectionManagerService.clear();+ selectionManagerService.add([+ {+ primary: null,+ style: null,+ range: {+ startRow: 0,+ startColumn: 0,+ endRow: worksheet.getRowCount() - 1,+ endColumn: worksheet.getColumnCount() - 1,+ rangeType: RANGE_TYPE.ALL,+ },+ },+ ]);+ }+ const ranges = selectionManagerService.getSelectionRanges() ?? [];+ const rangeErrorString = checkRangeValid(ranges);+ sheetPermissionPanelModel.setRangeErrorMsg(rangeErrorString);+ const rangeStr = ranges?.length+ ? ranges.map((range) => {+ const v = serializeRange(range);+ return v === 'NaN' ? '' : v;+ }).filter((r) => !!r).join(',')+ : '';+ const sheetName = worksheet.getName();+ sheetPermissionPanelModel.setRule({+ ranges,+ name: fromSheetBar ? `${sheetName}` : `${sheetName}(${rangeStr})`,+ unitId,+ subUnitId,+ unitType: fromSheetBar ? UnitObject.Worksheet : UnitObject.SelectRange,++ });+ }, [activeRule?.permissionId, fromSheetBar, selectionManagerService, sheetPermissionPanelModel, subUnitId, unitId, worksheet]);++ useEffect(() => {+ const getSelectUserList = async () => {+ const permissionId = activeRule?.permissionId;+ setLoading(true);+ const collaborators = await authzIoService.listCollaborators({+ objectID: permissionId!,+ unitID: unitId,+ });+ const selectUserList: ICollaborator[] = collaborators.filter((user) => {+ return user.role === UnitRole.Editor;+ });+ sheetPermissionUserManagerService.setSelectUserList(selectUserList);+ setLoading(false);+ if (selectUserList?.length > 0) {+ setEditorGroupValue('designedUserCanEdit');+ }+ const readerList = collaborators.filter((user) => {+ return user.role === UnitRole.Reader;+ });++ if (readerList.length === 0) {+ setViewGroupValue(viewState.noOneElseCanView);+ }++ sheetPermissionUserManagerService.setOldCollaboratorList(selectUserList.concat(readerList));+ };+ if (activeRule?.permissionId) {+ getSelectUserList();+ } else {+ sheetPermissionUserManagerService.setSelectUserList([]);+ setEditorGroupValue('onlyMe');+ }+ }, [activeRule?.permissionId]);++ useEffect(() => {+ const getListCollaborators = async () => {+ const userList = await authzIoService.listCollaborators({+ objectID: unitId,+ unitID: unitId,+ });+ userList.forEach((user) => {+ if (user?.subject) {+ userManagerService.addUser(user.subject as IUser);+ }+ });++ sheetPermissionUserManagerService.setUserList(userList.filter((user) => user.role === UnitRole.Editor));+ sheetPermissionUserManagerService.setAllUserList(userList.filter((user) => user.role === UnitRole.Editor || user.role === UnitRole.Reader));+ };+ getListCollaborators();+ }, []);++ useEffect(() => {+ sheetPermissionPanelModel.setRule({+ viewStatus: viewGroupValue,+ });+ }, [sheetPermissionPanelModel, viewGroupValue]);++ useEffect(() => {+ const workbook = univerInstanceService.getCurrentUnitForType<Workbook>(UniverInstanceType.UNIVER_SHEET);+ if (!workbook) return;+ const activeSheetSubscribe = workbook.activeSheet$.subscribe((sheet) => {+ if (sheet?.getSheetId() !== subUnitId) {+ sidebarService.close();+ }+ });+ return () => {+ activeSheetSubscribe.unsubscribe();+ };+ }, [sidebarService, subUnitId, univerInstanceService]);++ const tmp = activeRule?.ranges?.map((i) => serializeRange(i)).join(',');++ return (+ <div className={styles.permissionPanelDetailWrapper}>+ {/* <FormLayout className={styles.sheetPermissionPanelTitle} label={localeService.t('permission.panel.name')}>+ <Input+ value={activeRule?.name ?? ''}+ onChange={(v) => sheetPermissionPanelModel.setRule({ name: v.replace(/\s+/g, '') })}+ className={clsx({ [styles.sheetPermissionPanelNameInputError]: !activeRule?.name })}+ />+ {!activeRule?.name && <span className={styles.sheetPermissionPanelNameInputErrorText}>{localeService.t('permission.panel.nameError')}</span>}+ </FormLayout> */}+ <FormLayout className={styles.sheetPermissionPanelTitle} label={localeService.t('permission.panel.protectedRange')}>+ <RangeSelector+ className={clsx(styles.permissionRangeSelector)}+ textEditorClassName={clsx({ [styles.permissionRangeSelectorError]: rangeErrorMsg })}+ value={activeRule?.ranges?.map((i) => serializeRange(i)).join(',')}+ id={createInternalEditorID('sheet-permission-panel')}+ openForSheetUnitId={unitId}+ openForSheetSubUnitId={subUnitId}+ onChange={(newRange) => {+ if (newRange.some((i) => !isValidRange(i.range) || i.range.endColumn < i.range.startColumn || i.range.endRow < i.range.startRow)) {+ return;+ }++ const workbook = univerInstanceService.getCurrentUnitForType<Workbook>(UniverInstanceType.UNIVER_SHEET)!;+ const worksheet = workbook.getActiveSheet()!;+ const unitId = workbook.getUnitId();+ const subUnitId = worksheet.getSheetId();+ const transformedRange = newRange.map((i) => {+ const range = { ...i.range };+ const rowCount = worksheet.getRowCount();+ const colCount = worksheet.getColumnCount();+ setEndForRange(range, rowCount, colCount);+ return range;+ });+ const rangeErrorString = checkRangeValid(transformedRange);+ sheetPermissionPanelModel.setRangeErrorMsg(rangeErrorString);+ if (rangeErrorString) return;++ const sheetName = worksheet.getName();+ const rangeStr = transformedRange.map((range) => {+ const v = serializeRange(range);+ return v === 'NaN' ? '' : v;+ }).filter((r) => !!r).join(',');++ const rule = {+ ranges: transformedRange,+ unitId,+ subUnitId,+ unitType: UnitObject.SelectRange,+ name: `${sheetName}(${rangeStr})`,+ };+ if (rule.ranges.length === 1) {+ const { startRow, endRow, startColumn, endColumn } = rule.ranges[0];+ if (startRow === 0 && endRow === worksheet.getRowCount() - 1 && startColumn === 0 && worksheet.getColumnCount() - 1 === endColumn) {+ rule.unitType = UnitObject.Worksheet;+ rule.name = `${sheetName}`;+ }+ }++ sheetPermissionPanelModel.setRule(rule);+ }}+ />+ {rangeErrorMsg && <span className={styles.sheetPermissionPanelNameInputErrorText}>{rangeErrorMsg}</span>}+ </FormLayout>+ <FormLayout className={styles.sheetPermissionPanelTitle} label={localeService.t('permission.panel.permissionDirection')}>+ <Input+ value={activeRule?.description ?? ''}+ onChange={(v) => sheetPermissionPanelModel.setRule({ description: v })}+ placeholder={localeService.t('permission.panel.permissionDirectionPlaceholder')}+ />+ </FormLayout>+ <FormLayout className={styles.sheetPermissionPanelTitle} label={localeService.t('permission.panel.editPermission')}>+ <RadioGroup+ value={editorGroupValue}+ onChange={(v) => {+ setEditorGroupValue(v as string);+ if (v === 'onlyMe') {+ sheetPermissionUserManagerService.setSelectUserList([]);+ }+ }}+ className={styles.radioGroupVertical}+ >+ <Radio value="onlyMe">+ <span className={styles.text}>{localeService.t('permission.panel.onlyICanEdit')}</span>+ </Radio>+ <Radio value="designedUserCanEdit">+ <span className={styles.text}>{localeService.t('permission.panel.designedUserCanEdit')}</span>+ </Radio>+ </RadioGroup>+ </FormLayout>+ {editorGroupValue === 'designedUserCanEdit' && (+ <div className={styles.sheetPermissionDesignPersonPanel}>+ <Spin loading={loading}>++ <div className={styles.sheetPermissionDesignPersonPanelHeader}>+ <span>{localeService.t('permission.panel.designedPerson')}</span>+ <span className={styles.sheetPermissionDesignPersonPanelHeaderAdd} onClick={handleAddPerson}>{localeService.t('permission.panel.addPerson')}</span>+ </div>+ <div className={styles.sheetPermissionDesignPersonPanelSplit}></div>+ <div className={styles.sheetPermissionDesignPersonPanelContent}>+ {selectUserList?.length > 0+ ? selectUserList.map((item) => {+ return (+ <div key={item.subject?.userID} className={styles.sheetPermissionDesignPersonPanelContentItem}>+ <Avatar size={24} src={item.subject?.avatar} />+ <span className={styles.sheetPermissionDesignPersonPanelContentItemName}>{item.subject?.name}</span>+ <Select+ className={styles.sheetPermissionDesignPersonPanelContentItemSelect}+ value="edit"+ onChange={(v) => {+ if (v === 'delete') {+ sheetPermissionUserManagerService.setSelectUserList(selectUserList.filter((i) => i.subject?.userID !== item.subject?.userID));+ }+ }}+ options={[+ { label: `${localeService.t('permission.panel.canEdit')}`, value: 'edit' },+ { label: `${localeService.t('permission.panel.delete')}`, value: 'delete' },+ ]}+ />+ </div>+ );+ })+ : (+ <div className={styles.sheetPermissionUserListEmpty}>+ <img width={240} height={120} src={UserEmptyBase64} alt="" />+ <p className={styles.sheetPermissionUserListEmptyText}>{localeService.t('permission.dialog.userEmpty')}</p>+ </div>+ )}+ </div>++ </Spin>+ </div>+ )}+ <FormLayout className={styles.sheetPermissionPanelTitle} label={localeService.t('permission.panel.viewPermission')}>+ <RadioGroup+ value={viewGroupValue}+ onChange={(v) => setViewGroupValue(v as viewState)}+ className={styles.radioGroupVertical}+ >+ <Radio value={viewState.othersCanView}>+ <span className={styles.text}>{localeService.t('permission.panel.othersCanView')}</span>+ </Radio>+ <Radio value={viewState.noOneElseCanView}>+ <span className={styles.text}>{localeService.t('permission.panel.noOneElseCanView')}</span>+ </Radio>+ </RadioGroup>+ </FormLayout>+ </div>+ );+};diff --git a/packages/sheet-permission-ui/src/views/panel-list/constant.ts b/packages/sheet-permission-ui/src/views/panel-list/constant.tsnew file mode 100644index 0000000000..93971c81cb--- /dev/null+++ b/packages/sheet-permission-ui/src/views/panel-list/constant.ts@@ -0,0 +1,17 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++export const panelListEmptyBase64 = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeAAAADxCAYAAAATKWQfAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAB4KADAAQAAAABAAAA8QAAAAAQiyznAABAAElEQVR4Aey9e6wnyXXf192/1/397p2ZO7s73If3MWuRSy4pC0uL1oOSrF0lsgXZECVZDBDJiZZ2RMaURIsEKUpKAA9hWLRNmaTWsQ0SCCgFDmBTgCkGQYAgf2gUx69YiUcBKFGm5B1Jq10ud3fe9/V7dOf7OVWnb/363jucfc2dR9XM/VXVOadOVZ/urm+fqurqosghWyBbIFsgWyBbIFsgWyBbIFsgWyBbIFsgWyBbIFsgWyBbIFsgWyBbIFsgWyBbIFsgWyBbIFsgWyBbIFsgWyBbIFsgWyBbIFsgWyBbIFsgWyBbIFsgWyBbIFsgWyBbIFsgWyBbIFsgWyBbIFsgWyBbIFsgWyBbIFsgWyBbIFsgWyBbIFsgWyBbIFsgWyBbIFsgWyBbIFsgWyBbIFsgWyBbIFsgWyBbIFsgWyBbIFsgWyBbIFsgWyBbIFsgWyBbIFsgWyBbIFsgWyBbIFsgWyBbIFsgWyBbIFsgWyBbIFsgWyBbIFsgWyBbIFsgWyBbIFsgWyBbIFsgWyBbIFsgWyBbIFsgWyBbIFsgWyBbIFsgWyBbIFsgWyBbIFsgWyBbIFsgWyBbIFsgWyBbIFsgWyBbIFsgWyBbIFsgWyBbIFsgWyBbIFsgWyBbIFsgWyBbIFsgWyBbIFsgWyBbIFsgWyBbIFsgWyBbIFsgWyBbIFsgWyBbIFsgWyBbIFsgWyBbIFsgWyBbIFsgWyBbIFsgWyBbIFqgzJbIFsgWuH4WePrpZv3CtHj8wmZx5om3l2evX825pmyBbIEbzQIZgG+0M5Lbc8tZANDdqYonq7J4V9MUj128Uq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GMtxFtd3qL0lV/7Lq71bzy/qfI8XnartxI8nwkupecMv0cXL5q4sL773PyfWF54bFpYeir38T04RRP+sIdAQ6Ah2BjkBHoCPQEegIdAQ6Ah2BjkBHoCPQEegIdAQ6Ah2BjkBHoCPQEegIdAQ6Ah2BjkBHoCPQEegIdAQ6Ah2BjkBHoCPQEegIdAQ6Ah2BjkBHoCPQEegIdAQ6Ah2BjkBHoCPQEegIdAQ6Ah2BjkBHoCPQEegIdAQ6Ah2BjkBHoCPQEegIdAQ6Ah2BjkBHoCPQEegIdAQ6Ah2BjkBHoCPQEegIdAQ6Ah2BjkBHoCPQEegIdAQ6Ah2BjkBHoCPQEegIdAQ6Ah2BjkBHoCPQEegIdAQ6Ah2BjkBHoCPQEegIdAQ6Ah2BjkBHoCPQEegIdAQ6Ah2BjkBHoCPw5iLw/wCH3cvs3EDhsQAAAABJRU5ErkJggg==';diff --git a/packages/sheet-permission-ui/src/views/panel-list/index.module.less b/packages/sheet-permission-ui/src/views/panel-list/index.module.lessnew file mode 100644index 0000000000..ab8063b25e--- /dev/null+++ b/packages/sheet-permission-ui/src/views/panel-list/index.module.less@@ -0,0 +1,143 @@+.sheet-permission-list-panel-wrapper {+ margin-top: var(--margin-xs);+ height: 100%;+}++.sheet-permission-list-panel-header {+ display: flex;+ padding: var(--padding-sm) 0;+ height: 30px;++ &-type {+ display: flex;+ flex-direction: column;+ align-items: center;+ margin-right: var(--margin-lg);+ cursor: pointer;++ div {+ height: 24px;+ line-height: 24px;+ }++ &-bottom {+ height: 2px;+ width: 24px;+ background-color: rgb(var(--blue-500));+ margin-top: var(--margin-xxs);+ }+ }++ &-select {+ color: rgb(var(--blue-500));+ height: 24px;+ line-height: 24px;+ font-size: var(--font-size-lg);+ font-weight: 500;+ }+}++.sheet-permission-list-item-header-icon {+ border-radius: var(--border-radius-base);+ &:hover {+ background-color: rgb(var(--grey-200));+ }+ height: 24px;+ padding: 4px;+ box-sizing: border-box;+}++.sheet-permission-list-item {+ margin-top: var(--margin-sm);+ border-radius: var(--border-radius-lg);+ border: 1px solid rgb(var(--grey-200));+ padding: var(--padding-base);++ &:hover {+ background-color: rgb(var(--grey-50));+ }++ &-header {+ height: 20px;+ line-height: 20px;++ display: flex;+ justify-content: space-between;++ &-name {+ font-weight: 500;+ max-width: 200px;+ white-space: nowrap;+ overflow: hidden;+ text-overflow: ellipsis;+ }++ &-operator {+ display: flex;+ align-items: center;++ div {+ margin-left: var(--margin-xs);+ }+ }+ }++ &-split {+ height: 1px;+ background-color: rgb(var(--grey-200));+ margin: var(--margin-xs) 0;+ }++ &-content {+ &-edit {+ display: flex;+ align-items: center;+ }++ &-view {+ display: flex;+ align-items: center;+ margin-top: var(--margin-xs);+ }++ &-desc {+ font-size: 12px;+ color: rgb(var(--grey-400));+ max-width: 256px;+ white-space: nowrap;+ overflow: hidden;+ text-overflow: ellipsis;+ margin-top: var(--margin-xs);+ }+ }+}++.sheet-permission-list-empty {+ display: flex;+ flex-direction: column;+ align-items: center;+ justify-content: center;+ height: 100%;+}++.sheet-permission-list-empty-text {+ width: 240px;+ word-wrap: break-word;+ color: rgb(var(--grey-400));+ font-size: 13px;+}++.sheet-permission-list-item-content-title {+ font-size: 12px;+ height: 16px;+ line-height: 16px;+ flex-grow: 1;+ color: rgb(var(--color-black));+}++.sheet-permission-list-item-content-sub {+ font-size: 12px;+ height: 16px;+ line-height: 16px;+ color: rgb(var(--grey-600));+}diff --git a/packages/sheet-permission-ui/src/views/panel-list/index.tsx b/packages/sheet-permission-ui/src/views/panel-list/index.tsxnew file mode 100644index 0000000000..e9058a05db--- /dev/null+++ b/packages/sheet-permission-ui/src/views/panel-list/index.tsx@@ -0,0 +1,318 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import React, { useCallback, useEffect, useState } from 'react';+import clsx from 'clsx';+import { Avatar, Tooltip } from '@univerjs/design';+import { useDependency } from '@wendellhu/redi/react-bindings';+import type { IRange, Workbook } from '@univerjs/core';+import { IAuthzIoService, ICommandService, IPermissionService, IUniverInstanceService, LocaleService, UniverInstanceType, UserManagerService } from '@univerjs/core';+import type { IRangeProtectionRule, IWorksheetProtectionRule } from '@univerjs/sheets';+import { DeleteRangeProtectionCommand, RangeProtectionRuleModel, SetWorksheetActiveOperation, WorkbookManageCollaboratorPermission, WorksheetProtectionRuleModel } from '@univerjs/sheets';+import { ISidebarService, useObservable } from '@univerjs/ui';+import { merge } from 'rxjs';+import type { IPermissionPoint } from '@univerjs/protocol';+import { UnitAction, UnitObject } from '@univerjs/protocol';+import { DeleteSingle, WriteSingle } from '@univerjs/icons';+import { useHighlightRange } from '@univerjs/sheets-ui';+import { serializeRange } from '@univerjs/engine-formula';+import { UNIVER_SHEET_PERMISSION_PANEL, UNIVER_SHEET_PERMISSION_PANEL_FOOTER } from '../../const';+import type { IPermissionPanelRule } from '../../service/sheet-permission-panel.model';+import { SheetPermissionPanelModel } from '../../service/sheet-permission-panel.model';+import { DeleteWorksheetProtectionCommand } from '../../command/worksheet-protection.command';+import styles from './index.module.less';+import { panelListEmptyBase64 } from './constant';++type IRuleItem = IRangeProtectionRule | IWorksheetProtectionRule;+export const SheetPermissionPanelList = () => {+ const [isCurrentSheet, setIsCurrentSheet] = useState(true);+ const [forceUpdateFlag, setForceUpdateFlag] = useState(false);+ const sheetPermissionPanelModel = useDependency(SheetPermissionPanelModel);+ const localeService = useDependency(LocaleService);+ const rangeProtectionRuleModel = useDependency(RangeProtectionRuleModel);+ const worksheetProtectionModel = useDependency(WorksheetProtectionRuleModel);+ const univerInstanceService = useDependency(IUniverInstanceService);+ const workbook = univerInstanceService.getCurrentUnitForType<Workbook>(UniverInstanceType.UNIVER_SHEET)!;++ const unitId = workbook.getUnitId();+ const commandService = useDependency(ICommandService);+ const sidebarService = useDependency(ISidebarService);+ const authzIoService = useDependency(IAuthzIoService);+ const permissionService = useDependency(IPermissionService);+ const usesManagerService = useDependency(UserManagerService);+ const currentUser = usesManagerService.currentUser;+ const [currentRuleRanges, currentRuleRangesSet] = useState<IRange[]>([]);++ useObservable(worksheetProtectionModel.ruleRefresh$);+ useObservable(rangeProtectionRuleModel.ruleRefresh$);++ const getRuleList = useCallback(async (isCurrentSheet: boolean) => {+ const worksheet = workbook.getActiveSheet()!;+ const unitId = workbook.getUnitId();+ const subUnitId = worksheet.getSheetId();++ const allRangePermissionId: string[] = [];+ const allSheetPermissionId: string[] = [];++ workbook.getSheets().forEach((sheet) => {+ const sheetId = sheet.getSheetId();+ const rules = rangeProtectionRuleModel.getSubunitRuleList(unitId, sheetId);+ rules.forEach((rule) => {+ if (rule.permissionId && rule.name) {+ allRangePermissionId.push(rule.permissionId);+ }+ });+ const worksheetPermissionRule = worksheetProtectionModel.getRule(unitId, sheetId);+ if (worksheetPermissionRule?.permissionId && worksheetPermissionRule.name) {+ allSheetPermissionId.push(worksheetPermissionRule.permissionId);+ }+ });++ const allPermissionId = [...allRangePermissionId, ...allSheetPermissionId];++ const allPermissionRule = await authzIoService.list({+ objectIDs: allPermissionId,+ unitID: unitId,+ actions: [UnitAction.View, UnitAction.Edit],+ });++ const subUnitPermissionIds = rangeProtectionRuleModel.getSubunitRuleList(unitId, subUnitId).map((item) => item.permissionId);+ const sheetPermissionId = worksheetProtectionModel.getRule(unitId, subUnitId)?.permissionId;+ if (sheetPermissionId) {+ subUnitPermissionIds.push(sheetPermissionId);+ }+ const subUnitRuleList = allPermissionRule.filter((item) => {+ return subUnitPermissionIds.includes(item.objectID) || item.objectID === worksheetProtectionModel.getRule(unitId, subUnitId)?.permissionId;+ });++ return isCurrentSheet ? subUnitRuleList : allPermissionRule;+ }, []);++ const [ruleList, setRuleList] = useState<IPermissionPoint[]>([]);++ useEffect(() => {+ const subscription = merge(+ rangeProtectionRuleModel.ruleChange$,+ worksheetProtectionModel.ruleChange$+ ).subscribe(async () => {+ const ruleList = await getRuleList(isCurrentSheet);+ setRuleList(ruleList);+ });+ return () => {+ subscription.unsubscribe();+ };+ }, [isCurrentSheet]);++ useEffect(() => {+ const subscribe = workbook.activeSheet$.subscribe(async () => {+ const ruleList = await getRuleList(true);+ setRuleList(ruleList);+ });+ return () => {+ subscribe.unsubscribe();+ };+ }, []);++ const handleDelete = (rule: IRuleItem) => {+ const { unitId, subUnitId, unitType } = rule;+ let res;+ if (unitType === UnitObject.Worksheet) {+ res = commandService.executeCommand(DeleteWorksheetProtectionCommand.id, { unitId, subUnitId, rule });+ } else if (unitType === UnitObject.SelectRange) {+ res = commandService.executeCommand(DeleteRangeProtectionCommand.id, { unitId, subUnitId, rule });+ }++ if (res) {+ setForceUpdateFlag(!forceUpdateFlag);+ if ((rule as IRangeProtectionRule).ranges === currentRuleRanges) {+ currentRuleRangesSet([]);+ }+ }+ };++ useHighlightRange(currentRuleRanges);++ const allRuleMap = new Map<string, IRangeProtectionRule | IWorksheetProtectionRule>();+ workbook.getSheets().forEach((sheet) => {+ const sheetId = sheet.getSheetId();+ const rangeRules = rangeProtectionRuleModel.getSubunitRuleList(unitId, sheetId);+ rangeRules.forEach((rule) => {+ allRuleMap.set(rule.permissionId, rule);+ });++ const sheetRule = worksheetProtectionModel.getRule(unitId, sheetId);+ if (sheetRule) {+ allRuleMap.set(sheetRule?.permissionId, sheetRule);+ }+ });++ const handleEdit = (rule: IPermissionPanelRule) => {+ sheetPermissionPanelModel.setRule(rule);+ sheetPermissionPanelModel.setOldRule(rule);++ commandService.executeCommand(SetWorksheetActiveOperation.id, {+ unitId: rule.unitId,+ subUnitId: rule.subUnitId,+ });++ const sidebarProps = {+ header: { title: 'permission.panel.title' },+ children: {+ label: UNIVER_SHEET_PERMISSION_PANEL,+ showDetail: true,+ },+ width: 320,+ footer: {+ label: UNIVER_SHEET_PERMISSION_PANEL_FOOTER,+ showDetail: true,+ },+ };++ sidebarService.open(sidebarProps);+ };++ const handleChangeHeaderType = async (isCurrentSheet: boolean) => {+ setIsCurrentSheet(isCurrentSheet);+ const ruleList = await getRuleList(isCurrentSheet);+ setRuleList(ruleList);+ };++ return (+ <div className={styles.sheetPermissionListPanelWrapper}>+ <div className={styles.sheetPermissionListPanelHeader}>+ <div className={styles.sheetPermissionListPanelHeaderType} onClick={() => handleChangeHeaderType(true)}>+ <div className={clsx({ [styles.sheetPermissionListPanelHeaderSelect]: isCurrentSheet })}>{localeService.t('permission.panel.currentSheet')}</div>+ {isCurrentSheet && <div className={styles.sheetPermissionListPanelHeaderTypeBottom} />}+ </div>+ <div className={styles.sheetPermissionListPanelHeaderType} onClick={() => handleChangeHeaderType(false)}>+ <div className={clsx({ [styles.sheetPermissionListPanelHeaderSelect]: !isCurrentSheet })}>{localeService.t('permission.panel.allSheet')}</div>+ {!isCurrentSheet && <div className={styles.sheetPermissionListPanelHeaderTypeBottom} />}+ </div>+ </div>++ {ruleList?.length > 0+ ? (+ <div className={styles.sheetPermissionListPanelContent}>+ {ruleList?.map((item) => {+ const rule = allRuleMap.get(item.objectID);++ if (!rule) {+ return null;+ }++ const editAction = item.actions.find((action) => action.action === UnitAction.Edit);+ const editPermission = editAction?.allowed;++ const viewAction = item.actions.find((action) => action.action === UnitAction.View);+ const viewPermission = viewAction?.allowed;++ const manageCollaboratorAction = permissionService.getPermissionPoint(new WorkbookManageCollaboratorPermission(unitId).id)?.value ?? false;++ const hasManagerPermission = manageCollaboratorAction || currentUser.userID === item.creator?.userID;++ const worksheet = workbook.getActiveSheet();++ let ruleName = '';++ if (rule.unitType === UnitObject.SelectRange) {+ const ranges = (rule as IRangeProtectionRule).ranges;+ const rangeStr = ranges?.length+ ? ranges.map((range) => {+ const v = serializeRange(range);+ return v === 'NaN' ? '' : v;+ }).filter((r) => !!r).join(',')+ : '';+ ruleName = `${worksheet.getName()}(${rangeStr})`;+ } else if (rule.unitType === UnitObject.Worksheet) {+ ruleName = worksheet.getName();+ }++ return (+ <div+ key={item.objectID}+ className={styles.sheetPermissionListItem}+ onMouseMove={() => {+ const { subUnitId, unitType } = rule;+ const activeSheet = workbook.getActiveSheet();+ const activeSubUnitId = activeSheet.getSheetId();+ if (subUnitId !== activeSubUnitId) {+ return false;+ }+ if (unitType === UnitObject.SelectRange) {+ const ranges = (rule as IRangeProtectionRule).ranges || [];+ ranges !== currentRuleRanges && currentRuleRangesSet(ranges);+ } else if (unitType === UnitObject.Worksheet) {+ const ranges = [{ startRow: 0, endRow: activeSheet.getRowCount() - 1, startColumn: 0, endColumn: activeSheet.getColumnCount() - 1 }];+ ranges !== currentRuleRanges && currentRuleRangesSet(ranges);+ }+ }}+ onMouseLeave={() => currentRuleRangesSet([])}+ >+ <div className={styles.sheetPermissionListItemHeader}>+ <Tooltip title={ruleName}>+ <div className={styles.sheetPermissionListItemHeaderName}>{ruleName}</div>+ </Tooltip>++ {hasManagerPermission && (+ <div className={styles.sheetPermissionListItemHeaderOperator}>+ <Tooltip title={localeService.t('permission.panel.edit')}>+ <div className={styles.sheetPermissionListItemHeaderIcon} onClick={() => handleEdit(rule as IPermissionPanelRule)}><WriteSingle /></div>+ </Tooltip>+ <Tooltip title={localeService.t('permission.panel.delete')}>+ <div className={styles.sheetPermissionListItemHeaderIcon} onClick={() => handleDelete(rule)}><DeleteSingle /></div>+ </Tooltip>+ </div>+ )}+ </div>+ <div className={styles.sheetPermissionListItemSplit} />+ <div className={styles.sheetPermissionListItemContent}>+ <div className={styles.sheetPermissionListItemContentEdit}>++ <Tooltip title={item.creator?.userID}>+ <div>+ <Avatar src={item.creator?.avatar} style={{ marginRight: 6 }} size={24} />+ </div>+ </Tooltip>+ <span className={styles.sheetPermissionListItemContentTitle}>{localeService.t('permission.panel.created')}</span>+ <span className={styles.sheetPermissionListItemContentSub}>{editPermission ? `${localeService.t('permission.panel.iCanEdit')}` : `${localeService.t('permission.panel.iCanNotEdit')}`}</span>++ </div>+ <div className={styles.sheetPermissionListItemContentView}>+ <span className={styles.sheetPermissionListItemContentTitle}>{localeService.t('permission.panel.viewPermission')}</span>+ <span className={styles.sheetPermissionListItemContentSub}>{viewPermission ? `${localeService.t('permission.panel.iCanView')}` : `${localeService.t('permission.panel.iCanNotView')}`}</span>+ </div>+ {rule.description && (+ <Tooltip title={rule.description}>+ <div className={styles.sheetPermissionListItemContentDesc}>+ {rule.description}+ </div>+ </Tooltip>+ )}+ </div>+ </div>+ );+ })}+ </div>+ )+ : (+ <div className={styles.sheetPermissionListEmpty}>+ <img width={240} height={120} src={panelListEmptyBase64} alt="" />+ <p className={styles.sheetPermissionListEmptyText}>{localeService.t('permission.dialog.listEmpty')}</p>+ </div>+ )}+ </div>+ );+};diff --git a/packages/sheet-permission-ui/src/views/panel/index.tsx b/packages/sheet-permission-ui/src/views/panel/index.tsxnew file mode 100644index 0000000000..9a123a66ee--- /dev/null+++ b/packages/sheet-permission-ui/src/views/panel/index.tsx@@ -0,0 +1,27 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import React from 'react';+import { SheetPermissionPanelDetail } from '../panel-detail';+import { SheetPermissionPanelList } from '../panel-list';++interface ISheetPermissionPanelProps { showDetail: boolean; fromSheetBar: boolean };++export const SheetPermissionPanel = ({ showDetail, fromSheetBar }: ISheetPermissionPanelProps) => {+ return (+ showDetail ? <SheetPermissionPanelDetail fromSheetBar={fromSheetBar} /> : <SheetPermissionPanelList />+ );+};diff --git a/packages/sheet-permission-ui/src/views/permission-dialog/index.module.less b/packages/sheet-permission-ui/src/views/permission-dialog/index.module.lessnew file mode 100644index 0000000000..e8555f45bd--- /dev/null+++ b/packages/sheet-permission-ui/src/views/permission-dialog/index.module.less@@ -0,0 +1,38 @@+.sheet-permission-dialog-wrapper {+ display: flex;+ flex-direction: column;+ padding: 2px;+}++.sheet-permission-dialog-split {+ height: 1px;+ background-color: rgb(var(--grey-200));+}++.sheet-permission-dialog-item {+ display: flex;+ align-items: center;+ justify-content: space-between;+ height: 20px;+ line-height: 20px;+ margin: 6px 0;+}++.sheet-permission-user-dialog-footer {+ height: 36px;+ padding: var(--padding-xs) 0;+ display: flex;+ justify-content: flex-end;+ align-items: center;+ margin-top: var(--margin-xs);++ &-confirm {+ margin-left: var(--margin-sm);+ }+}++.sheet-permission-user-dialog-button {+ height: 32px;+ line-height: 32px;+ padding: 0px var(--padding-base);+}diff --git a/packages/sheet-permission-ui/src/views/permission-dialog/index.tsx b/packages/sheet-permission-ui/src/views/permission-dialog/index.tsxnew file mode 100644index 0000000000..dc9e0ac645--- /dev/null+++ b/packages/sheet-permission-ui/src/views/permission-dialog/index.tsx@@ -0,0 +1,215 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import React, { useEffect, useState } from 'react';++import { Button, Switch } from '@univerjs/design';+import clsx from 'clsx';+import { useDependency } from '@wendellhu/redi/react-bindings';+import type { Workbook } from '@univerjs/core';+import { IAuthzIoService, ICommandService, IPermissionService, IUniverInstanceService, LocaleService, UniverInstanceType } from '@univerjs/core';+import { IDialogService } from '@univerjs/ui';+import { getAllWorksheetPermissionPoint, SetWorksheetPermissionPointsCommand, WorksheetProtectionPointModel } from '@univerjs/sheets';+import type { ICollaborator, UnitAction } from '@univerjs/protocol';+import { UnitObject, UnitRole } from '@univerjs/protocol';+import { defaultWorksheetUnitActionList, subUnitPermissionTypeMap, UNIVER_SHEET_PERMISSION_DIALOG_ID } from '../../const';+import Spin from '../spin';+import styles from './index.module.less';++interface IPermissionMap {+ [key: string]: {+ text: string;+ allowed: boolean;+ };+}++export const SheetPermissionDialog = () => {+ const localeService = useDependency(LocaleService);+ const univerInstanceService = useDependency(IUniverInstanceService);+ const authzIoService = useDependency(IAuthzIoService);+ const worksheetProtectionPointRuleModel = useDependency(WorksheetProtectionPointModel);+ const dialogService = useDependency(IDialogService);+ const permissionService = useDependency(IPermissionService);+ const workbook = univerInstanceService.getCurrentUnitForType<Workbook>(UniverInstanceType.UNIVER_SHEET)!;+ const worksheet = workbook.getActiveSheet();+ const [collaborators, setCollaborators] = useState<ICollaborator[]>([]);+ const commandService = useDependency(ICommandService);+ const [loading, setLoading] = useState(() => {+ const pointRule = worksheetProtectionPointRuleModel.getRule(workbook.getUnitId(), worksheet.getSheetId());+ return !!pointRule;+ });++ const [permissionMap, setPermissionMap] = useState(() => {+ return Object.keys(subUnitPermissionTypeMap).reduce((acc, action) => {+ acc[action] = {+ text: localeService.t(`permission.panel.${subUnitPermissionTypeMap[Number(action) as UnitAction]}`),+ allowed: true,+ };+ return acc;+ }, {} as IPermissionMap);+ });++ useEffect(() => {+ const getUserList = async () => {+ const unitId = workbook.getUnitId();+ const collaborators = await authzIoService.listCollaborators({+ objectID: unitId,+ unitID: unitId,+ });+ setCollaborators(collaborators);+ };+ getUserList();+ }, []);++ useEffect(() => {+ const getPermissionPoints = async () => {+ const unitId = workbook.getUnitId();+ const worksheetPointRule = worksheetProtectionPointRuleModel.getRule(unitId, worksheet.getSheetId());+ if (!worksheetPointRule) {+ return;+ };+ setLoading(true);+ const result = await authzIoService.list({+ unitID: workbook.getUnitId(),+ objectIDs: [worksheetPointRule.permissionId],+ actions: defaultWorksheetUnitActionList,+ });+ const actions = result[0].strategies.reduce((p, c) => {+ if (subUnitPermissionTypeMap[c.action]) {+ p[c.action] = {+ text: localeService.t(`permission.panel.${subUnitPermissionTypeMap[c.action]}`),+ allowed: c.role !== UnitRole.Owner,+ };+ }+ return p;+ }, {} as IPermissionMap);+ setPermissionMap(actions);+ setTimeout(() => {+ setLoading(false);+ }, 100);+ };++ getPermissionPoints();+ }, []);++ const handleChangeActionPermission = async () => {+ const workbook = univerInstanceService.getCurrentUnitForType<Workbook>(UniverInstanceType.UNIVER_SHEET)!;+ const worksheet = workbook?.getActiveSheet();+ const unitId = workbook.getUnitId();+ const subUnitId = worksheet.getSheetId();+ const pointRule = worksheetProtectionPointRuleModel.getRule(unitId, subUnitId);++ const actions = Object.keys(permissionMap).map((action) => {+ return {+ action: Number(action) as UnitAction,+ role: permissionMap[action].allowed ? UnitRole.Editor : UnitRole.Owner,+ };+ });++ let permissionId = pointRule?.permissionId;++ if (!permissionId) {+ permissionId = await authzIoService.create({+ objectType: UnitObject.Worksheet,+ worksheetObject: {+ unitID: unitId,+ collaborators,+ name: '',+ strategies: actions,+ },+ });++ commandService.executeCommand(SetWorksheetPermissionPointsCommand.id, {+ rule: {+ permissionId,+ unitId,+ subUnitId,+ },+ });+ } else {+ authzIoService.update({+ objectType: UnitObject.Worksheet,+ objectID: permissionId,+ unitID: unitId,+ strategies: actions,+ share: undefined,+ name: '',+ }).then(() => {+ getAllWorksheetPermissionPoint().forEach((F) => {+ const instance = new F(unitId, subUnitId);+ const unitActionName = instance.subType;+ const action = actions.find((item) => item.action === unitActionName);+ if (action) {+ permissionService.updatePermissionPoint(instance.id, action.role === UnitRole.Editor);+ }+ });+ });+ }+ };++ return (+ <Spin loading={loading}>+ <div className={styles.sheetPermissionDialogWrapper}>+ <>+ <div className={styles.sheetPermissionDialogSplit} />+ {Object.keys(permissionMap).map((action) => {+ const actionItem = permissionMap[action];+ const { text, allowed } = actionItem;+ return (+ <div key={text} className={styles.sheetPermissionDialogItem}>+ <div>{text}</div>+ <Switch+ defaultChecked={allowed}+ onChange={() => {+ setPermissionMap({+ ...permissionMap,+ [action]: {+ ...actionItem,+ allowed: !allowed,+ },+ });+ }}+ />+ </div>+ );+ })}+ <div className={styles.sheetPermissionDialogSplit}></div>+ <div className={styles.sheetPermissionUserDialogFooter}>++ <Button+ className={styles.sheetPermissionUserDialogButton}+ onClick={() => {+ dialogService.close(UNIVER_SHEET_PERMISSION_DIALOG_ID);+ }}+ >+ {localeService.t('permission.button.cancel')}+ </Button>+ <Button+ type="primary"+ onClick={() => {+ handleChangeActionPermission();+ dialogService.close(UNIVER_SHEET_PERMISSION_DIALOG_ID);+ }}+ className={clsx(styles.sheetPermissionUserDialogFooterConfirm, styles.sheetPermissionUserDialogButton)}+ >+ {localeService.t('permission.button.confirm')}+ </Button>+ </div>+ </>+ </div>+ </Spin>+ );+};diff --git a/packages/sheet-permission-ui/src/views/spin/index.module.less b/packages/sheet-permission-ui/src/views/spin/index.module.lessnew file mode 100644index 0000000000..d2f98dfc43--- /dev/null+++ b/packages/sheet-permission-ui/src/views/spin/index.module.less@@ -0,0 +1,42 @@+.spin-container {+ position: relative;+ width: 100%;+ height: 100%;+}++.spin-overlay {+ position: absolute;+ top: 0;+ left: 0;+ right: 0;+ bottom: 0;+ display: flex;+ justify-content: center;+ align-items: center;+ backdrop-filter: blur(10px);+ background-color: rgba(255, 255, 255, 0.5);+ z-index: 10;+}++.spinner {+ width: 40px;+ height: 40px;+ border: 4px solid #f3f3f3;+ border-top: 4px solid #3498db;+ border-radius: 50%;+ animation: spin 2s linear infinite;+}++.content-blur {+ filter: blur(2px);+ pointer-events: none;+}++@keyframes spin {+ 0% {+ transform: rotate(0deg);+ }+ 100% {+ transform: rotate(360deg);+ }+}diff --git a/packages/sheet-permission-ui/src/views/spin/index.tsx b/packages/sheet-permission-ui/src/views/spin/index.tsxnew file mode 100644index 0000000000..329581a466--- /dev/null+++ b/packages/sheet-permission-ui/src/views/spin/index.tsx@@ -0,0 +1,40 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import React from 'react';+import styles from './index.module.less';++interface SpinProps {+ loading: boolean;+ children: React.ReactNode;+}++const Spin = ({ loading, children }: SpinProps) => {+ return (+ <div className={styles.spinContainer}>+ {loading && (+ <div className={styles.spinOverlay}>+ <div className={styles.spinner}></div>+ </div>+ )}+ <div className={loading ? styles.contentBlur : ''}>+ {children}+ </div>+ </div>+ );+};++export default Spin;diff --git a/packages/sheet-permission-ui/src/views/user-dialog/constant.ts b/packages/sheet-permission-ui/src/views/user-dialog/constant.tsnew file mode 100644index 0000000000..8087a447f7--- /dev/null+++ b/packages/sheet-permission-ui/src/views/user-dialog/constant.ts@@ -0,0 +1,17 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++export const UserEmptyBase64 = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeAAAADwCAYAAADYdbe6AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAB4KADAAQAAAABAAAA8AAAAAAt6wVXAABAAElEQVR4Aey9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W7bH2ryuamu+ZR+LtS2H6sv22PJqMbLP0H0xnnxci3G2l7y3/X6vte163ODtRMoQgAAEIPCNBLwgmL9WGOwnGTcqFvm0wuHj3Kq/PLV2TZOKT16jmM1v+KrarFvr9wud+yr+5rwiH7M3fbJZ7MjX26aJXFbaFifmgpNi1OvSWH7jdcIVBCAAAQg8IoFaXKLAdGV89jbXio7m1k7jtmpPWhVa19TCeFWv6xD6T9rm75P5KLhX42itRfK9l/4j3gHsGQIQgAAE7pLAsrCtjZe2DEJz1+azlj4EIAABCEAAAhCAAAQgAAEIQAACEIAABCAAAQhAAAIQgAAEIAABCEAAAhCAAAQgAAEIQAACEIAABCAAAQhAAAIQgAAEIAABCEAAAhCAAAQgAAEIQAACEIAABCAAAQhAAAIQgAAEIAABCEAAAhCAAAQgAAEIQAACEIAABCAAAQgUAn8BrzesdviE5ggAAAAASUVORK5CYII=';diff --git a/packages/sheet-permission-ui/src/views/user-dialog/index.module.less b/packages/sheet-permission-ui/src/views/user-dialog/index.module.lessnew file mode 100644index 0000000000..d416450493--- /dev/null+++ b/packages/sheet-permission-ui/src/views/user-dialog/index.module.less@@ -0,0 +1,91 @@+.sheet-permission-user-dialog-wrapper {+ height: 329px;+ padding: var(--padding-base);+}++.sheet-permission-user-dialog-search {+ &-input {+ width: 256px;+ height: 32px;+ }+}++.sheet-permission-user-list {+ height: 240px;+ overflow-y: auto;+}++.sheet-permission-user-list-empty {+ display: flex;+ flex-direction: column;+ align-items: center;+ justify-content: center;+ height: 100%;+}++.sheet-permission-user-list-empty-text {+ width: 240px;+ word-wrap: break-word;+ color: rgb(var(--grey-400));+ font-size: 13px;+}++.sheet-permission-user-item {+ display: flex;+ align-items: center;+ margin: var(--margin-xs) 0;+ border-radius: 6px;+ padding: var(--padding-xs) var(--padding-sm);++ &:hover {+ background-color: rgb(var(--grey-50));+ }++ div {+ margin-left: 6px;+ }++ &-name {+ width: 186px;+ white-space: nowrap;+ overflow: hidden;+ text-overflow: ellipsis;+ }+}++.sheet-permission-split {+ height: 1px;+ background-color: rgb(var(--grey-200));+}++.sheet-permission-user-dialog-footer {+ height: 36px;+ padding: var(--padding-xs) 0;+ display: flex;+ justify-content: flex-end;+ align-items: center;+ margin-top: var(--margin-xs);+ height: 28px;++ &-confirm {+ margin-left: var(--margin-sm);+ }+}++.sheet-permission-user-dialog-button {+ height: 28px;+ line-height: 28px;+ padding: 0px var(--padding-base);+}++:global(.sheet-permission-user-dialog .univer-dialog-close) {+ display: none;+}++:global(.sheet-permission-user-dialog .univer-dialog-header) {+ display: none;+}++:global(.sheet-permission-user-dialog .univer-dialog-body) {+ padding: 0;+}diff --git a/packages/sheet-permission-ui/src/views/user-dialog/index.tsx b/packages/sheet-permission-ui/src/views/user-dialog/index.tsxnew file mode 100644index 0000000000..c2c49784c6--- /dev/null+++ b/packages/sheet-permission-ui/src/views/user-dialog/index.tsx@@ -0,0 +1,104 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import React, { useState } from 'react';+import { Avatar, Button, Input } from '@univerjs/design';+import clsx from 'clsx';+import { useDependency } from '@wendellhu/redi/react-bindings';+import { LocaleService } from '@univerjs/core';+import { IDialogService } from '@univerjs/ui';+import { type ICollaborator, UnitRole } from '@univerjs/protocol';+import { CheckMarkSingle } from '@univerjs/icons';+import { SheetPermissionUserManagerService } from '../../service';+import { UNIVER_SHEET_PERMISSION_USER_DIALOG_ID } from '../../const';+import styles from './index.module.less';+import { UserEmptyBase64 } from './constant';++export const SheetPermissionUserDialog = () => {+ const [inputValue, setInputValue] = React.useState('');+ const localeService = useDependency(LocaleService);+ const dialogService = useDependency(IDialogService);+ const sheetPermissionUserManagerService = useDependency(SheetPermissionUserManagerService);+ const userList = sheetPermissionUserManagerService.userList;+ const searchUserList = userList.filter((item) => {+ return item.subject?.name.toLocaleLowerCase().includes(inputValue.toLocaleLowerCase()) && item.role !== UnitRole.Owner;+ });+ const [selectUserInfo, setSelectUserInfo] = useState<ICollaborator[]>(sheetPermissionUserManagerService.selectUserList);++ const handleChangeUser = (item: ICollaborator) => {+ const index = selectUserInfo?.findIndex((v) => v.subject?.userID === item.subject?.userID);+ if (index === -1) {+ const select: ICollaborator = { ...item };+ setSelectUserInfo([...selectUserInfo, select]);+ } else {+ const newSelectUserInfo = selectUserInfo.filter((v) => v.subject?.userID !== item.subject?.userID);+ setSelectUserInfo(newSelectUserInfo);+ }+ };++ return (+ <div className={styles.sheetPermissionUserDialogWrapper}>+ <div className={styles.sheetPermissionUserDialogSearch}>+ <Input+ placeholder="search"+ className={styles.sheetPermissionUserDialogSearchInput}+ value={inputValue}+ onChange={(v) => setInputValue(v)}+ />+ </div>+ <div className={styles.sheetPermissionUserList}>+ {searchUserList?.length > 0+ ? (+ <>+ {searchUserList?.map((item) => {+ return (+ <div key={item.subject?.userID} className={styles.sheetPermissionUserItem} onClick={() => handleChangeUser(item)}>+ <Avatar src={item.subject?.avatar} size={24} />+ <div className={styles.sheetPermissionUserItemName}>{item.subject?.name}</div>+ {selectUserInfo?.findIndex((v) => v.subject?.userID === item.subject?.userID) !== -1 && (<div><CheckMarkSingle /></div>)}+ </div>+ );+ })}+ </>+ )+ : (+ <div className={styles.sheetPermissionUserListEmpty}>+ <img width={240} height={120} src={UserEmptyBase64} alt="" />+ <p className={styles.sheetPermissionUserListEmptyText}>{localeService.t('permission.dialog.userEmpty')}</p>+ </div>+ )}+ </div>+ <div className={styles.sheetPermissionSplit}></div>+ <div className={styles.sheetPermissionUserDialogFooter}>++ <Button className={styles.sheetPermissionUserDialogButton} onClick={() => dialogService.close(UNIVER_SHEET_PERMISSION_USER_DIALOG_ID)}>++ {localeService.t('permission.button.cancel')}+ </Button>+ <Button+ type="primary"+ onClick={() => {+ sheetPermissionUserManagerService.setSelectUserList(selectUserInfo);+ dialogService.close(UNIVER_SHEET_PERMISSION_USER_DIALOG_ID);+ }}+ className={clsx(styles.sheetPermissionUserDialogFooterConfirm, styles.sheetPermissionUserDialogButton)}+ >+ {localeService.t('permission.button.confirm')}+ </Button>+ </div>+ </div>+ );+};diff --git a/packages/sheet-permission-ui/src/vite-env.d.ts b/packages/sheet-permission-ui/src/vite-env.d.tsnew file mode 100644index 0000000000..11f02fe2a0--- /dev/null+++ b/packages/sheet-permission-ui/src/vite-env.d.ts@@ -0,0 +1 @@+/// <reference types="vite/client" />diff --git a/packages/sheet-permission-ui/tsconfig.json b/packages/sheet-permission-ui/tsconfig.jsonnew file mode 100644index 0000000000..d676ad2a20--- /dev/null+++ b/packages/sheet-permission-ui/tsconfig.json@@ -0,0 +1,9 @@+{+ "extends": "@univerjs/shared/tsconfigs/base",+ "compilerOptions": {+ "rootDir": "src",+ "outDir": "lib/types"+ },+ "references": [{ "path": "./tsconfig.node.json" }],+ "include": ["src"]+}diff --git a/packages/sheet-permission-ui/tsconfig.node.json b/packages/sheet-permission-ui/tsconfig.node.jsonnew file mode 100644index 0000000000..e53dac8868--- /dev/null+++ b/packages/sheet-permission-ui/tsconfig.node.json@@ -0,0 +1,4 @@+{+ "extends": "@univerjs/shared/tsconfigs/node",+ "include": ["vite.config.ts"]+}diff --git a/packages/sheet-permission-ui/vite.config.ts b/packages/sheet-permission-ui/vite.config.tsnew file mode 100644index 0000000000..e38cd8530b--- /dev/null+++ b/packages/sheet-permission-ui/vite.config.ts@@ -0,0 +1,12 @@+import createViteConfig from '@univerjs/shared/vite';+import pkg from './package.json';++export default ({ mode }) => createViteConfig({}, {+ mode,+ pkg,+ features: {+ react: true,+ css: true,+ dom: true,+ },+});diff --git a/packages/sheets-conditional-formatting-ui/package.json b/packages/sheets-conditional-formatting-ui/package.jsonindex 42717fc2a0..dec0528db3 100644--- a/packages/sheets-conditional-formatting-ui/package.json+++ b/packages/sheets-conditional-formatting-ui/package.json@@ -84,6 +84,7 @@},"dependencies": {"@univerjs/icons": "^0.1.52",+ "@univerjs/protocol": "^0.1.34","@univerjs/sheets-conditional-formatting": "workspace:*","lodash.get": "^4.4.2","lodash.set": "^4.3.2",@@ -98,7 +99,7 @@"@univerjs/design": "workspace:*","@univerjs/engine-formula": "workspace:*","@univerjs/engine-render": "workspace:*",- "@univerjs/icons-svg": "^0.1.44",+ "@univerjs/icons-svg": "^0.1.45","@univerjs/shared": "workspace:*","@univerjs/sheets": "workspace:*","@univerjs/sheets-ui": "workspace:*",diff --git a/packages/sheets-conditional-formatting-ui/src/components/panel/rule-list/index.tsx b/packages/sheets-conditional-formatting-ui/src/components/panel/rule-list/index.tsxindex b036b63db8..cc47ca2a07 100644--- a/packages/sheets-conditional-formatting-ui/src/components/panel/rule-list/index.tsx+++ b/packages/sheets-conditional-formatting-ui/src/components/panel/rule-list/index.tsx@@ -16,6 +16,7 @@import React, { useEffect, useRef, useState } from 'react';import { Select, Tooltip } from '@univerjs/design';+import { useHighlightRange } from '@univerjs/sheets-ui';import { useDependency } from '@wendellhu/redi/react-bindings';import type { IRange, Workbook } from '@univerjs/core';@@ -36,8 +37,8 @@ import 'react-resizable/css/styles.css';import { Preview } from '../../preview';import { ConditionalFormattingI18nController } from '../../../controllers/cf.i18n.controller';import { ClearWorksheetCfCommand } from '../../../commands/commands/clear-worksheet-cf.command';-import { useHighlightRange } from '../../hook/useHighlightRange';+import { CONDITIONAL_FORMATTING_PERMISSION_CHECK, ConditionalFormattingClearController } from '../../../controllers/cf.clear.controller';import styles from './index.module.less';interface IRuleListProps {@@ -109,6 +110,7 @@ export const RuleList = (props: IRuleListProps) => {const conditionalFormattingRuleModel = useDependency(ConditionalFormattingRuleModel);const univerInstanceService = useDependency(IUniverInstanceService);const selectionManagerService = useDependency(SelectionManagerService);+ const cvController = useDependency(ConditionalFormattingClearController);const commandService = useDependency(ICommandService);const localeService = useDependency(LocaleService);const conditionalFormattingI18nController = useDependency(ConditionalFormattingI18nController);@@ -280,6 +282,9 @@ export const RuleList = (props: IRuleListProps) => {const layout = ruleList.map((rule, index) => ({ i: rule.cfId, x: 0, w: 12, y: index, h: 1, isResizable: false }));+ const ruleListByPermissionCheck = cvController.interceptor.fetchThroughInterceptors(CONDITIONAL_FORMATTING_PERMISSION_CHECK)(ruleList, ruleList);+ const hasDisableRule = ruleListByPermissionCheck?.some((rule) => rule.disable);+return (<div className={styles.cfRuleList}><div className={styles.ruleSelector}>@@ -295,7 +300,7 @@ export const RuleList = (props: IRuleListProps) => {<IncreaseSingle /></div></Tooltip>- {ruleList.length+ {(ruleList.length && !hasDisableRule)? (<Tooltip title={localeService.t('sheet.cf.panel.clear')} placement="bottom"><div className={`${styles.gap} ${styles.icon}`} onClick={handleClear}>@@ -325,7 +330,7 @@ export const RuleList = (props: IRuleListProps) => {margin={[0, 10]}draggableHandle=".draggableHandle">- {ruleList.map((rule, index) => {+ {ruleListByPermissionCheck?.map((rule, index) => {return (<div key={`${rule.cfId}`}><div@@ -333,7 +338,10 @@ export const RuleList = (props: IRuleListProps) => {rule.ranges !== currentRuleRanges && currentRuleRangesSet(rule.ranges);}}onMouseLeave={() => currentRuleRangesSet([])}- onClick={() => onClick(rule)}+ onClick={() => {+ if (rule.disable) return;+ onClick(rule);+ }}className={`${styles.ruleItem} ${draggingId === index ? styles.active : ''}`}><div@@ -347,15 +355,17 @@ export const RuleList = (props: IRuleListProps) => {<div className={styles.ruleRange}>{rule.ranges.map((range) => serializeRange(range)).join(',')}</div></div><div className={styles.preview}><Preview rule={rule.rule} /></div>- <div- className={`${styles.deleteItem} ${draggingId === index ? styles.active : ''}`}- onClick={(e) => {- e.stopPropagation();- handleDelete(rule);- }}- >- <DeleteSingle />- </div>+ {!rule.disable && (+ <div+ className={`${styles.deleteItem} ${draggingId === index ? styles.active : ''}`}+ onClick={(e) => {+ e.stopPropagation();+ handleDelete(rule);+ }}+ >+ <DeleteSingle />+ </div>+ )}</div></div>);diff --git a/packages/sheets-conditional-formatting-ui/src/controllers/cf.clear.controller.ts b/packages/sheets-conditional-formatting-ui/src/controllers/cf.clear.controller.tsindex 3cfe5b1ffb..303376cdef 100644--- a/packages/sheets-conditional-formatting-ui/src/controllers/cf.clear.controller.ts+++ b/packages/sheets-conditional-formatting-ui/src/controllers/cf.clear.controller.ts@@ -15,14 +15,18 @@*/import type { IMutationInfo, Workbook } from '@univerjs/core';-import { Disposable, IUniverInstanceService, LifecycleStages, OnLifecycle, Rectangle, UniverInstanceType } from '@univerjs/core';+import { createInterceptorKey, Disposable, InterceptorManager, IUniverInstanceService, LifecycleStages, OnLifecycle, Rectangle, UniverInstanceType } from '@univerjs/core';import { ClearSelectionAllCommand, ClearSelectionFormatCommand, RangeMergeUtil, SelectionManagerService, SheetInterceptorService } from '@univerjs/sheets';import { Inject, Injector } from '@wendellhu/redi';import { ConditionalFormattingRuleModel, DeleteConditionalRuleMutation, DeleteConditionalRuleMutationUndoFactory, SetConditionalRuleMutation, setConditionalRuleMutationUndoFactory } from '@univerjs/sheets-conditional-formatting';-import type { IDeleteConditionalRuleMutationParams, ISetConditionalRuleMutationParams } from '@univerjs/sheets-conditional-formatting';+import type { IConditionalFormattingRuleConfig, IConditionFormattingRule, IDeleteConditionalRuleMutationParams, ISetConditionalRuleMutationParams } from '@univerjs/sheets-conditional-formatting';++export const CONDITIONAL_FORMATTING_PERMISSION_CHECK = createInterceptorKey<(IConditionFormattingRule<IConditionalFormattingRuleConfig> & { disable?: boolean })[], (IConditionFormattingRule<IConditionalFormattingRuleConfig> & { disable?: boolean })[]>('conditionalFormattingPermissionCheck');@OnLifecycle(LifecycleStages.Rendered, ConditionalFormattingClearController)export class ConditionalFormattingClearController extends Disposable {+ public interceptor = new InterceptorManager({ CONDITIONAL_FORMATTING_PERMISSION_CHECK });+constructor(@Inject(Injector) private _injector: Injector,@Inject(IUniverInstanceService) private _univerInstanceService: IUniverInstanceService,@@ -37,54 +41,56 @@ export class ConditionalFormattingClearController extends Disposable {}private _init() {- this.disposeWithMe(this._sheetInterceptorService.interceptCommand({ getMutations: (commandInfo) => {- const redos: IMutationInfo[] = [];- const undos: IMutationInfo[] = [];- const defaultV = { redos, undos };- if ([ClearSelectionFormatCommand.id, ClearSelectionAllCommand.id].includes(commandInfo.id)) {- const ranges = this._selectionManagerService.getSelectionRanges();- if (!ranges) {- return defaultV;- }- const workbook = this._univerInstanceService.getCurrentUnitForType<Workbook>(UniverInstanceType.UNIVER_SHEET)!;- const worksheet = workbook.getActiveSheet();- const allRules = this._conditionalFormattingRuleModel.getSubunitRules(workbook.getUnitId(), worksheet.getSheetId());- if (!allRules || !allRules.length) {- return defaultV;- }- allRules.filter((rule) => {- return ranges.some((range) => rule.ranges.some((ruleRange) => Rectangle.getIntersects(ruleRange, range)));- }).forEach((rule) => {- const mergeUtil = new RangeMergeUtil();- const mergeRanges = mergeUtil.add(...rule.ranges).subtract(...ranges).merge();- if (mergeRanges.length) {- const redo: IMutationInfo<ISetConditionalRuleMutationParams> = {- id: SetConditionalRuleMutation.id,- params: {- unitId: workbook.getUnitId(),- subUnitId: worksheet.getSheetId(),- rule: { ...rule, ranges: mergeRanges },- },- };- const undo = setConditionalRuleMutationUndoFactory(this._injector, redo.params);- redos.push(redo);- undos.push(...undo);- } else {- const redo: IMutationInfo<IDeleteConditionalRuleMutationParams> = {- id: DeleteConditionalRuleMutation.id,- params: {- unitId: workbook.getUnitId(),- subUnitId: worksheet.getSheetId(),- cfId: rule.cfId,- },- };- const undo = DeleteConditionalRuleMutationUndoFactory(this._injector, redo.params);- redos.push(redo);- undos.push(...undo);+ this.disposeWithMe(this._sheetInterceptorService.interceptCommand({+ getMutations: (commandInfo) => {+ const redos: IMutationInfo[] = [];+ const undos: IMutationInfo[] = [];+ const defaultV = { redos, undos };+ if ([ClearSelectionFormatCommand.id, ClearSelectionAllCommand.id].includes(commandInfo.id)) {+ const ranges = this._selectionManagerService.getSelectionRanges();+ if (!ranges) {+ return defaultV;+ }+ const workbook = this._univerInstanceService.getCurrentUnitForType<Workbook>(UniverInstanceType.UNIVER_SHEET)!;+ const worksheet = workbook.getActiveSheet();+ const allRules = this._conditionalFormattingRuleModel.getSubunitRules(workbook.getUnitId(), worksheet.getSheetId());+ if (!allRules || !allRules.length) {+ return defaultV;}- });- }- return defaultV;- } }));+ allRules.filter((rule) => {+ return ranges.some((range) => rule.ranges.some((ruleRange) => Rectangle.getIntersects(ruleRange, range)));+ }).forEach((rule) => {+ const mergeUtil = new RangeMergeUtil();+ const mergeRanges = mergeUtil.add(...rule.ranges).subtract(...ranges).merge();+ if (mergeRanges.length) {+ const redo: IMutationInfo<ISetConditionalRuleMutationParams> = {+ id: SetConditionalRuleMutation.id,+ params: {+ unitId: workbook.getUnitId(),+ subUnitId: worksheet.getSheetId(),+ rule: { ...rule, ranges: mergeRanges },+ },+ };+ const undo = setConditionalRuleMutationUndoFactory(this._injector, redo.params);+ redos.push(redo);+ undos.push(...undo);+ } else {+ const redo: IMutationInfo<IDeleteConditionalRuleMutationParams> = {+ id: DeleteConditionalRuleMutation.id,+ params: {+ unitId: workbook.getUnitId(),+ subUnitId: worksheet.getSheetId(),+ cfId: rule.cfId,+ },+ };+ const undo = DeleteConditionalRuleMutationUndoFactory(this._injector, redo.params);+ redos.push(redo);+ undos.push(...undo);+ }+ });+ }+ return defaultV;+ },+ }));}}diff --git a/packages/sheets-conditional-formatting-ui/src/index.ts b/packages/sheets-conditional-formatting-ui/src/index.tsindex 990408a21d..a873469253 100644--- a/packages/sheets-conditional-formatting-ui/src/index.ts+++ b/packages/sheets-conditional-formatting-ui/src/index.ts@@ -15,3 +15,10 @@*/export { UniverSheetsConditionalFormattingUIPlugin } from './plugin';+export { AddCfCommand } from './commands/commands/add-cf.command';+export type { IAddCfCommandParams } from './commands/commands/add-cf.command';+export { ConditionalFormattingClearController } from './controllers/cf.clear.controller';+export * as enUS from './locale/en-US';+export * as zhCN from './locale/zh-CN';+export * as ruRU from './locale/ru-RU';+diff --git a/packages/sheets-conditional-formatting-ui/src/menu/manage-rule.ts b/packages/sheets-conditional-formatting-ui/src/menu/manage-rule.tsindex 43496729bb..c04c39bc77 100644--- a/packages/sheets-conditional-formatting-ui/src/menu/manage-rule.ts+++ b/packages/sheets-conditional-formatting-ui/src/menu/manage-rule.ts@@ -18,16 +18,21 @@ import { merge, Observable } from 'rxjs';import type { IMenuSelectorItem } from '@univerjs/ui';import type { IAccessor } from '@wendellhu/redi';import { getMenuHiddenObservable, MenuGroup, MenuItemType, MenuPosition } from '@univerjs/ui';-import { SelectionManagerService, SetWorksheetActiveOperation } from '@univerjs/sheets';+import { RangeProtectionPermissionEditPoint, SelectionManagerService, SetWorksheetActiveOperation, WorkbookEditablePermission, WorksheetEditPermission, WorksheetSetCellStylePermission } from '@univerjs/sheets';import { debounceTime } from 'rxjs/operators';-import type { Workbook } from '@univerjs/core';+import type { ICellDataForSheetInterceptor, IRange, Workbook } from '@univerjs/core';import { ICommandService, IUniverInstanceService, Rectangle, UniverInstanceType } from '@univerjs/core';import { AddConditionalRuleMutation, ConditionalFormattingRuleModel, DeleteConditionalRuleMutation, MoveConditionalRuleMutation, SetConditionalRuleMutation } from '@univerjs/sheets-conditional-formatting';++import { UnitAction } from '@univerjs/protocol';+import { getCurrentRangeDisable$ } from '@univerjs/sheets-ui';import { CF_MENU_OPERATION, OpenConditionalFormattingOperator } from '../commands/operations/open-conditional-formatting-panel';const commandList = [SetWorksheetActiveOperation.id, AddConditionalRuleMutation.id, SetConditionalRuleMutation.id, DeleteConditionalRuleMutation.id, MoveConditionalRuleMutation.id];+type ICellPermission = Record<UnitAction, boolean> & { ruleId?: string; ranges?: IRange[] };+export const FactoryManageConditionalFormattingRule = (accessor: IAccessor): IMenuSelectorItem => {const commonSelections = [{@@ -112,8 +117,24 @@ export const FactoryManageConditionalFormattingRule = (accessor: IAccessor): IMe).pipe(debounceTime(16)).subscribe(() => {const workbook = univerInstanceService.getCurrentUnitForType<Workbook>(UniverInstanceType.UNIVER_SHEET);if (!workbook) return;+ const worksheet = workbook.getActiveSheet();const allRule = conditionalFormattingRuleModel.getSubunitRules(workbook.getUnitId(), workbook.getActiveSheet().getSheetId()) || [];- subscriber.next(!!allRule.length);+ const hasNotPermission = allRule.some((rule) => {+ const ranges = rule.ranges;+ return ranges.some((range) => {+ const { startRow, startColumn, endRow, endColumn } = range;+ for (let row = startRow; row <= endRow; row++) {+ for (let col = startColumn; col <= endColumn; col++) {+ const permission = (worksheet.getCell(row, col) as (ICellDataForSheetInterceptor & { selectionProtection: ICellPermission[] }))?.selectionProtection?.[0];+ if (permission?.[UnitAction.Edit] === false || permission?.[UnitAction.View] === false) {+ return true;+ }+ }+ }+ return false;+ });+ });+ subscriber.next(!hasNotPermission);}));const selections$ = new Observable((subscriber) => {@@ -133,7 +154,6 @@ export const FactoryManageConditionalFormattingRule = (accessor: IAccessor): IMe});subscriber.next(commonSelections);});-return {id: OpenConditionalFormattingOperator.id,type: MenuItemType.SELECTOR,@@ -143,5 +163,7 @@ export const FactoryManageConditionalFormattingRule = (accessor: IAccessor): IMetooltip: 'sheet.cf.title',selections: selections$,hidden$: getMenuHiddenObservable(accessor, UniverInstanceType.UNIVER_SHEET),+ disabled$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetSetCellStylePermission, WorksheetEditPermission], rangeTypes: [RangeProtectionPermissionEditPoint] }),} as IMenuSelectorItem;};+diff --git a/packages/sheets-conditional-formatting/package.json b/packages/sheets-conditional-formatting/package.jsonindex 1006cad7dc..375676312c 100644--- a/packages/sheets-conditional-formatting/package.json+++ b/packages/sheets-conditional-formatting/package.json@@ -72,6 +72,9 @@"dayjs": ">=1.11.0","rxjs": ">=7.0.0"},+ "dependencies": {+ "@univerjs/protocol": "^0.1.34"+ },"devDependencies": {"@univerjs/core": "workspace:*","@univerjs/engine-formula": "workspace:*",diff --git a/packages/sheets-data-validation/src/controllers/dv.controller.ts b/packages/sheets-data-validation/src/controllers/dv.controller.tsindex 18923080a7..96ecbf826b 100644--- a/packages/sheets-data-validation/src/controllers/dv.controller.ts+++ b/packages/sheets-data-validation/src/controllers/dv.controller.ts@@ -14,8 +14,8 @@* limitations under the License.*/-import type { Workbook } from '@univerjs/core';-import { DisposableCollection, IUniverInstanceService, LifecycleStages, OnLifecycle, RxDisposable, toDisposable, UniverInstanceType } from '@univerjs/core';+import type { ISheetDataValidationRule, Workbook } from '@univerjs/core';+import { createInterceptorKey, DisposableCollection, InterceptorManager, IUniverInstanceService, LifecycleStages, OnLifecycle, RxDisposable, toDisposable, UniverInstanceType } from '@univerjs/core';import { DataValidationModel, DataValidatorRegistryService } from '@univerjs/data-validation';import { Inject, Injector } from '@wendellhu/redi';import { DataValidationSingle } from '@univerjs/icons';@@ -30,8 +30,12 @@ import type { SheetDataValidationManager } from '../models/sheet-data-validationimport { getDataValidationDiffMutations } from '../commands/commands/data-validation.command';import { DataValidationIcon } from './dv.menu';+export const DATA_VALIDATION_PERMISSION_CHECK = createInterceptorKey<(ISheetDataValidationRule & { disable?: boolean })[], ISheetDataValidationRule[]>('dataValidationPermissionCheck');+@OnLifecycle(LifecycleStages.Rendered, DataValidationController)export class DataValidationController extends RxDisposable {+ public interceptor = new InterceptorManager({ DATA_VALIDATION_PERMISSION_CHECK });+constructor(@IUniverInstanceService private readonly _univerInstanceService: IUniverInstanceService,@Inject(SheetDataValidationService) private readonly _sheetDataValidationService: SheetDataValidationService,diff --git a/packages/sheets-data-validation/src/controllers/dv.menu.ts b/packages/sheets-data-validation/src/controllers/dv.menu.tsindex 4cfff56bc1..1d329e783a 100644--- a/packages/sheets-data-validation/src/controllers/dv.menu.ts+++ b/packages/sheets-data-validation/src/controllers/dv.menu.ts@@ -17,6 +17,8 @@import { getMenuHiddenObservable, type IMenuItem, MenuGroup, MenuItemType, MenuPosition } from '@univerjs/ui';import type { IAccessor } from '@wendellhu/redi';import { UniverInstanceType } from '@univerjs/core';+import { getCurrentRangeDisable$ } from '@univerjs/sheets-ui';+import { RangeProtectionPermissionEditPoint, WorkbookEditablePermission, WorksheetEditPermission, WorksheetSetCellStylePermission } from '@univerjs/sheets';import { AddSheetDataValidationAndOpenCommand } from '../commands/commands/data-validation.command';import { OpenValidationPanelOperation } from '../commands/operations/data-validation.operation';@@ -32,6 +34,7 @@ export function dataValidationMenuFactory(accessor: IAccessor): IMenuItem {icon: DataValidationIcon,tooltip: 'dataValidation.title',hidden$: getMenuHiddenObservable(accessor, UniverInstanceType.UNIVER_SHEET),+ disabled$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetSetCellStylePermission, WorksheetEditPermission], rangeTypes: [RangeProtectionPermissionEditPoint] }),};}diff --git a/packages/sheets-data-validation/src/views/item/index.tsx b/packages/sheets-data-validation/src/views/item/index.tsxindex 4ba267bbef..1e67537608 100644--- a/packages/sheets-data-validation/src/views/item/index.tsx+++ b/packages/sheets-data-validation/src/views/item/index.tsx@@ -28,10 +28,11 @@ export interface IDataValidationDetailProps {onClick: () => void;unitId: string;subUnitId: string;+ disable?: boolean;}export const DataValidationItem = (props: IDataValidationDetailProps) => {- const { rule, onClick, unitId, subUnitId } = props;+ const { rule, onClick, unitId, subUnitId, disable } = props;const validatorRegistry = useDependency(DataValidatorRegistryService);const commandService = useDependency(ICommandService);const markSelectionService = useDependency(IMarkSelectionService);@@ -62,6 +63,7 @@ export const DataValidationItem = (props: IDataValidationDetailProps) => {className={styles.dataValidationItemContainer}onClick={onClick}onMouseEnter={() => {+ if (disable) return;setIsHover(true);ids.current = rule.ranges.map((range) => markSelectionService.addShape({range,diff --git a/packages/sheets-data-validation/src/views/list/index.tsx b/packages/sheets-data-validation/src/views/list/index.tsxindex d50950d473..0ec8991a40 100644--- a/packages/sheets-data-validation/src/views/list/index.tsx+++ b/packages/sheets-data-validation/src/views/list/index.tsx@@ -26,6 +26,7 @@ import { DataValidationItem } from '../item';import type { IAddSheetDataValidationCommandParams } from '../../commands/commands/data-validation.command';import { AddSheetDataValidationCommand } from '../../commands/commands/data-validation.command';import { DataValidationPanelService } from '../../services/data-validation-panel.service';+import { DATA_VALIDATION_PERMISSION_CHECK, DataValidationController } from '../../controllers/dv.controller';import styles from './index.module.less';export function DataValidationList() {@@ -46,6 +47,7 @@ function DataValidationListWithWorkbook(props: { workbook: Workbook }) {const commandService = useDependency(ICommandService);const injector = useDependency(Injector);const dataValidationPanelService = useDependency(DataValidationPanelService);+ const dataValidationController = useDependency(DataValidationController);const localeService = useDependency(LocaleService);const [rules, setRules] = useState<ISheetDataValidationRule[]>([]);@@ -90,23 +92,30 @@ function DataValidationListWithWorkbook(props: { workbook: Workbook }) {});};+ const rulesByPermissionCheck = dataValidationController.interceptor.fetchThroughInterceptors(DATA_VALIDATION_PERMISSION_CHECK)(rules, rules);+ const hasDisableRule = rulesByPermissionCheck?.some((rule) => rule.disable);+return (<div>- {rules.map((rule) => (+ {rulesByPermissionCheck?.map((rule) => (<DataValidationItemunitId={unitId}subUnitId={subUnitId}- onClick={() => dataValidationPanelService.setActiveRule({- unitId,- subUnitId,- rule,- })}+ onClick={() => {+ if (rule.disable) return;+ dataValidationPanelService.setActiveRule({+ unitId,+ subUnitId,+ rule,+ });+ }}rule={rule}key={rule.uid}+ disable={rule.disable ?? false}/>))}<div className={styles.dataValidationListButtons}>- {rules.length+ {(rules.length && !hasDisableRule)? (<Button className={styles.dataValidationListButton} onClick={handleRemoveAll}>{localeService.t('dataValidation.panel.removeAll')}diff --git a/packages/sheets-filter-ui/src/commands/__tests__/sheets-filter.command.spec.ts b/packages/sheets-filter-ui/src/commands/__tests__/sheets-filter.command.spec.tsindex 4e95dfb3e3..185eede690 100644--- a/packages/sheets-filter-ui/src/commands/__tests__/sheets-filter.command.spec.ts+++ b/packages/sheets-filter-ui/src/commands/__tests__/sheets-filter.command.spec.ts@@ -15,9 +15,9 @@*/import type { IRange, IWorkbookData } from '@univerjs/core';-import { ICommandService, IUniverInstanceService, LocaleType, Plugin, RANGE_TYPE, RedoCommand, UndoCommand, Univer, UniverInstanceType } from '@univerjs/core';+import { AuthzIoLocalService, IAuthzIoService, ICommandService, IUniverInstanceService, LocaleType, Plugin, RANGE_TYPE, RedoCommand, UndoCommand, Univer, UniverInstanceType } from '@univerjs/core';import type { ISetRangeValuesCommandParams } from '@univerjs/sheets';-import { NORMAL_SELECTION_PLUGIN_NAME, RefRangeService, SelectionManagerService, SetRangeValuesCommand, SetRangeValuesMutation, SheetInterceptorService, SheetPermissionService } from '@univerjs/sheets';+import { NORMAL_SELECTION_PLUGIN_NAME, RangeProtectionRuleModel, RefRangeService, SelectionManagerService, SetRangeValuesCommand, SetRangeValuesMutation, SheetInterceptorService, WorkbookPermissionService, WorksheetPermissionService, WorksheetProtectionPointModel, WorksheetProtectionRuleModel } from '@univerjs/sheets';import type { FilterModel, ISetSheetsFilterRangeMutationParams } from '@univerjs/sheets-filter';import { SetSheetsFilterRangeMutation, SheetsFilterService, UniverSheetsFilterPlugin } from '@univerjs/sheets-filter';import type { Dependency } from '@wendellhu/redi';@@ -94,7 +94,12 @@ function createFilterCommandTestBed() {[RefRangeService],[SheetInterceptorService],[SelectionManagerService],- [SheetPermissionService],+ [WorksheetPermissionService],+ [WorksheetProtectionPointModel],+ [WorkbookPermissionService],+ [IAuthzIoService, { useClass: AuthzIoLocalService }],+ [WorksheetProtectionRuleModel],+ [RangeProtectionRuleModel],[IMessageService, { useClass: MockMessageService }],] as Dependency[]).forEach((d) => injector.add(d));}diff --git a/packages/sheets-filter-ui/src/controllers/__tests__/sheets-filter.menu.spec.ts b/packages/sheets-filter-ui/src/controllers/__tests__/sheets-filter.menu.spec.tsindex e5d61640f5..7c0395bb80 100644--- a/packages/sheets-filter-ui/src/controllers/__tests__/sheets-filter.menu.spec.ts+++ b/packages/sheets-filter-ui/src/controllers/__tests__/sheets-filter.menu.spec.ts@@ -15,8 +15,8 @@*/import type { IRange, IWorkbookData } from '@univerjs/core';-import { DisposableCollection, ICommandService, LocaleType, Plugin, RANGE_TYPE, Univer, UniverInstanceType } from '@univerjs/core';-import { NORMAL_SELECTION_PLUGIN_NAME, RefRangeService, SelectionManagerService, SetWorksheetActiveOperation, SheetInterceptorService, SheetPermissionService } from '@univerjs/sheets';+import { AuthzIoLocalService, DisposableCollection, IAuthzIoService, ICommandService, LocaleType, Plugin, RANGE_TYPE, Univer, UniverInstanceType } from '@univerjs/core';+import { NORMAL_SELECTION_PLUGIN_NAME, RangeProtectionRuleModel, RefRangeService, SelectionManagerService, SetWorksheetActiveOperation, SheetInterceptorService, WorkbookPermissionService, WorksheetPermissionService, WorksheetProtectionPointModel, WorksheetProtectionRuleModel } from '@univerjs/sheets';import type { ISetSheetsFilterCriteriaMutationParams, ISetSheetsFilterRangeMutationParams } from '@univerjs/sheets-filter';import { RemoveSheetsFilterMutation, SetSheetsFilterCriteriaMutation, SetSheetsFilterRangeMutation, UniverSheetsFilterPlugin } from '@univerjs/sheets-filter';import { DesktopMenuService, DesktopPlatformService, DesktopShortcutService, IMenuService, IPlatformService, IShortcutService } from '@univerjs/ui';@@ -66,8 +66,13 @@ function createSheetsFilterMenuTestBed() {injector.add([SelectionManagerService]);injector.add([IShortcutService, { useClass: DesktopShortcutService }]);injector.add([IMenuService, { useClass: DesktopMenuService }]);- injector.add([SheetPermissionService]);+ injector.add([WorksheetPermissionService]);+ injector.add([WorksheetProtectionPointModel]);+ injector.add([WorkbookPermissionService]);+ injector.add([IAuthzIoService, { useClass: AuthzIoLocalService }]);+ injector.add([WorksheetProtectionRuleModel]);injector.add([SheetInterceptorService]);+ injector.add([RangeProtectionRuleModel]);const commandService = injector.get(ICommandService);[diff --git a/packages/sheets-filter-ui/src/controllers/sheets-filter.menu.ts b/packages/sheets-filter-ui/src/controllers/sheets-filter.menu.tsindex d5f083928e..1ce7c5f6f7 100644--- a/packages/sheets-filter-ui/src/controllers/sheets-filter.menu.ts+++ b/packages/sheets-filter-ui/src/controllers/sheets-filter.menu.ts@@ -21,6 +21,8 @@ import { SheetsFilterService } from '@univerjs/sheets-filter';import { UniverInstanceType } from '@univerjs/core';import { map, of, switchMap } from 'rxjs';+import { getCurrentRangeDisable$ } from '@univerjs/sheets-ui';+import { RangeProtectionPermissionEditPoint, WorkbookEditablePermission, WorksheetEditPermission, WorksheetFilterPermission } from '@univerjs/sheets';import { ClearSheetsFilterCriteriaCommand, ReCalcSheetsFilterCommand, SmartToggleSheetsFilterCommand } from '../commands/sheets-filter.command';export function SmartToggleFilterMenuItemFactory(accessor: IAccessor): IMenuSelectorItem {@@ -35,6 +37,7 @@ export function SmartToggleFilterMenuItemFactory(accessor: IAccessor): IMenuSelepositions: [MenuPosition.TOOLBAR_START],hidden$: getMenuHiddenObservable(accessor, UniverInstanceType.UNIVER_SHEET),activated$: sheetsFilterService.activeFilterModel$.pipe(map((model) => !!model)),+ disabled$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetFilterPermission, WorksheetEditPermission], rangeTypes: [RangeProtectionPermissionEditPoint] }),};}diff --git a/packages/sheets-filter-ui/src/index.ts b/packages/sheets-filter-ui/src/index.tsindex d3471b8c03..0f6458289a 100644--- a/packages/sheets-filter-ui/src/index.ts+++ b/packages/sheets-filter-ui/src/index.ts@@ -15,3 +15,8 @@*/export { UniverSheetsFilterUIPlugin } from './plugin';+export * as zhCN from './locale/zh-CN';+export * as enUS from './locale/en-US';+export * as ruRU from './locale/ru-RU';++export { OpenFilterPanelOperation } from './commands/sheets-filter.operation';diff --git a/packages/sheets-filter-ui/src/views/components/SheetsFilterPanel.stories.tsx b/packages/sheets-filter-ui/src/views/components/SheetsFilterPanel.stories.tsxindex 4e60df12ef..85b6fe373c 100644--- a/packages/sheets-filter-ui/src/views/components/SheetsFilterPanel.stories.tsx+++ b/packages/sheets-filter-ui/src/views/components/SheetsFilterPanel.stories.tsx@@ -21,7 +21,7 @@ import type { Injector } from '@wendellhu/redi';import { UniverSheetsFilterPlugin } from '@univerjs/sheets-filter';import type { IWorkbookData } from '@univerjs/core';import { ICommandService, ILogService, LocaleService, LocaleType, LogLevel, Plugin, Univer, UniverInstanceType } from '@univerjs/core';-import { RefRangeService, SelectionManagerService, SheetInterceptorService, SheetPermissionService } from '@univerjs/sheets';+import { RefRangeService, SelectionManagerService, SheetInterceptorService, WorksheetPermissionService, WorksheetProtectionPointModel } from '@univerjs/sheets';import { DesktopMenuService, DesktopShortcutService, IMenuService, IShortcutService } from '@univerjs/ui';import { SheetsFilterPanelService } from '../../services/sheets-filter-panel.service';import { ClearSheetsFilterCriteriaCommand, ReCalcSheetsFilterCommand, SetSheetsFilterCriteriaCommand, SmartToggleSheetsFilterCommand } from '../../commands/sheets-filter.command';@@ -60,7 +60,8 @@ function createFilterStorybookBed(workbookData: IWorkbookData, locale: LocaleTypinjector.add([SelectionManagerService]);injector.add([IShortcutService, { useClass: DesktopShortcutService }]);injector.add([IMenuService, { useClass: DesktopMenuService }]);- injector.add([SheetPermissionService]);+ injector.add([WorksheetPermissionService]);+ injector.add([WorksheetProtectionPointModel]);injector.add([SheetInterceptorService]);injector.add([SheetsFilterPanelService]);injector.add([RefRangeService]);diff --git a/packages/sheets-find-replace/src/controllers/sheet-find-replace.controller.ts b/packages/sheets-find-replace/src/controllers/sheet-find-replace.controller.tsindex bd2cd049bc..e43fe1c4dd 100644--- a/packages/sheets-find-replace/src/controllers/sheet-find-replace.controller.ts+++ b/packages/sheets-find-replace/src/controllers/sheet-find-replace.controller.ts@@ -14,7 +14,7 @@* limitations under the License.*/-import { ColorKit, CommandType, Disposable, EDITOR_ACTIVATED, fromCallback, groupBy, ICommandService, IContextService, IUniverInstanceService, LifecycleStages, ObjectMatrix, OnLifecycle, replaceInDocumentBody, rotate, ThemeService, Tools, UniverInstanceType } from '@univerjs/core';+import { ColorKit, CommandType, createInterceptorKey, Disposable, EDITOR_ACTIVATED, fromCallback, groupBy, ICommandService, IContextService, InterceptorManager, IUniverInstanceService, LifecycleStages, ObjectMatrix, OnLifecycle, replaceInDocumentBody, rotate, ThemeService, Tools, UniverInstanceType } from '@univerjs/core';import type { ICellData, IObjectMatrixPrimitiveType, IRange, Nullable, Workbook, Worksheet } from '@univerjs/core';import { IRenderManagerService, RENDER_RAW_FORMULA_KEY } from '@univerjs/engine-render';import type { IFindComplete, IFindMatch, IFindMoveParams, IFindQuery, IFindReplaceProvider, IReplaceAllResult } from '@univerjs/find-replace';@@ -32,10 +32,14 @@ import type { ISheetReplaceCommandParams, ISheetReplacement } from '../commands/import { SheetReplaceCommand } from '../commands/commands/sheet-replace.command';import { isBeforePositionWithColumnPriority, isBeforePositionWithRowPriority, isBehindPositionWithColumnPriority, isBehindPositionWithRowPriority, isSamePosition, isSelectionSingleCell } from './utils';+export const FIND_PERMISSION_CHECK = createInterceptorKey<boolean, { row: number; col: number; unitId: string; subUnitId: string }>('findPermissionCheck');+@OnLifecycle(LifecycleStages.Steady, SheetsFindReplaceController)export class SheetsFindReplaceController extends Disposable implements IDisposable {private _provider!: SheetsFindReplaceProvider;+ public interceptor = new InterceptorManager({ FIND_PERMISSION_CHECK });+constructor(@Inject(Injector) private readonly _injector: Injector,@Inject(FindReplaceController) private readonly _findReplaceController: FindReplaceController,@@ -125,7 +129,8 @@ export class SheetFindModel extends FindModel {@IContextService private readonly _contextService: IContextService,@Inject(ThemeService) private readonly _themeService: ThemeService,@Inject(SheetSkeletonManagerService) private readonly _sheetSkeletonManagerService: SheetSkeletonManagerService,- @Inject(SelectionManagerService) private readonly _selectionManagerService: SelectionManagerService+ @Inject(SelectionManagerService) private readonly _selectionManagerService: SelectionManagerService,+ @Inject(SheetsFindReplaceController) private readonly _findReplaceController: SheetsFindReplaceController) {super();}@@ -365,6 +370,13 @@ export class SheetFindModel extends FindModel {for (const value of iter) {const { row, col, colSpan, rowSpan, value: cellData } = value;++ const permissionCheck = this._findReplaceController.interceptor.fetchThroughInterceptors(FIND_PERMISSION_CHECK)(false, { row, col, unitId, subUnitId });++ if (!permissionCheck) {+ continue;+ }+if (dedupeFn?.(row, col) || !cellData) {continue;};diff --git a/packages/sheets-find-replace/src/index.ts b/packages/sheets-find-replace/src/index.tsindex fd3dc5bbd0..2f2501463c 100644--- a/packages/sheets-find-replace/src/index.ts+++ b/packages/sheets-find-replace/src/index.ts@@ -15,3 +15,4 @@*/export { UniverSheetsFindReplacePlugin } from './plugin';+export { SheetsFindReplaceController } from './controllers/sheet-find-replace.controller';diff --git a/packages/sheets-formula/src/commands/operations/__tests__/create-command-test-bed.ts b/packages/sheets-formula/src/commands/operations/__tests__/create-command-test-bed.tsindex 0e0ffe9ecd..7740d6e9fd 100644--- a/packages/sheets-formula/src/commands/operations/__tests__/create-command-test-bed.ts+++ b/packages/sheets-formula/src/commands/operations/__tests__/create-command-test-bed.ts@@ -15,9 +15,9 @@*/import type { IWorkbookData } from '@univerjs/core';-import { ILogService, IUniverInstanceService, LocaleType, LogLevel, Plugin, Univer, UniverInstanceType } from '@univerjs/core';+import { AuthzIoLocalService, IAuthzIoService, ILogService, IUniverInstanceService, LocaleType, LogLevel, Plugin, Univer, UniverInstanceType } from '@univerjs/core';import { LexerTreeBuilder } from '@univerjs/engine-formula';-import { SelectionManagerService, SheetInterceptorService } from '@univerjs/sheets';+import { SelectionManagerService, SheetInterceptorService, WorkbookPermissionService, WorksheetPermissionService, WorksheetProtectionPointModel, WorksheetProtectionRuleModel } from '@univerjs/sheets';import type { Dependency } from '@wendellhu/redi';import { Inject, Injector } from '@wendellhu/redi';import { EditorService, IEditorService } from '@univerjs/ui';@@ -77,6 +77,11 @@ export function createCommandTestBed(workbookData?: IWorkbookData, dependencies?injector.add([SheetSkeletonManagerService]);injector.add([IRenderManagerService, { useClass: RenderManagerService }]);injector.add([SheetInterceptorService]);+ injector.add([WorksheetPermissionService]);+ injector.add([WorksheetProtectionPointModel]);+ injector.add([WorkbookPermissionService]);+ injector.add([IAuthzIoService, { useClass: AuthzIoLocalService }]);+ injector.add([WorksheetProtectionRuleModel]);dependencies?.forEach((d) => injector.add(d));}diff --git a/packages/sheets-formula/src/controllers/__tests__/formula-auto-fill.controller.spec.ts b/packages/sheets-formula/src/controllers/__tests__/formula-auto-fill.controller.spec.tsindex bbf4356c82..03c0d250fa 100644--- a/packages/sheets-formula/src/controllers/__tests__/formula-auto-fill.controller.spec.ts+++ b/packages/sheets-formula/src/controllers/__tests__/formula-auto-fill.controller.spec.ts@@ -26,6 +26,9 @@ import {import {AddWorksheetMergeMutation,NORMAL_SELECTION_PLUGIN_NAME,+ RangeProtectionRenderModel,+ RangeProtectionRuleModel,+ RangeProtectionService,RemoveWorksheetMergeMutation,SelectionManagerService,SetRangeValuesMutation,@@ -71,6 +74,9 @@ describe('Test auto fill with formula', () => {[IShortcutService, { useClass: DesktopShortcutService }],[IPlatformService, { useClass: DesktopPlatformService }],[FormulaAutoFillController],+ [RangeProtectionRuleModel],+ [RangeProtectionService],+ [RangeProtectionRenderModel],]);univer = testBed.univer;get = testBed.get;diff --git a/packages/sheets-formula/src/controllers/menu.ts b/packages/sheets-formula/src/controllers/menu.tsindex eddd4467b3..31d43f0d8e 100644--- a/packages/sheets-formula/src/controllers/menu.ts+++ b/packages/sheets-formula/src/controllers/menu.ts@@ -15,13 +15,13 @@*/import { UniverInstanceType } from '@univerjs/core';-import { getCurrentSheetDisabled$ } from '@univerjs/sheets';-import { PASTE_SPECIAL_MENU_ID } from '@univerjs/sheets-ui';+import { getCurrentRangeDisable$, PASTE_SPECIAL_MENU_ID } from '@univerjs/sheets-ui';import type { IMenuItem } from '@univerjs/ui';import { getMenuHiddenObservable, IClipboardInterfaceService, MenuGroup, MenuItemType, MenuPosition } from '@univerjs/ui';import type { IAccessor } from '@wendellhu/redi';-import { Observable } from 'rxjs';+import { combineLatestWith, map, Observable } from 'rxjs';+import { RangeProtectionPermissionEditPoint, WorkbookEditablePermission, WorksheetEditPermission, WorksheetSetCellValuePermission } from '@univerjs/sheets';import { SheetOnlyPasteFormulaCommand } from '../commands/commands/formula-clipboard.command';import { InsertFunctionOperation } from '../commands/operations/insert-function.operation';import { MoreFunctionsOperation } from '../commands/operations/more-functions.operation';@@ -62,7 +62,7 @@ export function InsertFunctionMenuItemFactory(accessor: IAccessor): IMenuItem {},],hidden$: getMenuHiddenObservable(accessor, UniverInstanceType.UNIVER_SHEET),- disabled$: getCurrentSheetDisabled$(accessor),+ disabled$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetEditPermission, WorksheetSetCellValuePermission], rangeTypes: [RangeProtectionPermissionEditPoint] }),};}@@ -76,7 +76,8 @@ export function MoreFunctionsMenuItemFactory(accessor: IAccessor): IMenuItem {}function menuClipboardDisabledObservable(injector: IAccessor): Observable<boolean> {- return new Observable((subscriber) => subscriber.next(!injector.get(IClipboardInterfaceService).supportClipboard));+ const clipboardDisabled$: Observable<boolean> = new Observable((subscriber) => subscriber.next(!injector.get(IClipboardInterfaceService).supportClipboard));+ return clipboardDisabled$;}export function PasteFormulaMenuItemFactory(accessor: IAccessor): IMenuItem {@@ -85,6 +86,9 @@ export function PasteFormulaMenuItemFactory(accessor: IAccessor): IMenuItem {type: MenuItemType.BUTTON,title: 'formula.operation.pasteFormula',positions: [PASTE_SPECIAL_MENU_ID],- disabled$: menuClipboardDisabledObservable(accessor),+ disabled$: menuClipboardDisabledObservable(accessor).pipe(+ combineLatestWith(getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], rangeTypes: [RangeProtectionPermissionEditPoint], worksheetTypes: [WorksheetSetCellValuePermission, WorksheetEditPermission] })),+ map(([d1, d2]) => d1 || d2)+ ),};}diff --git a/packages/sheets-numfmt/src/menu/menu.ts b/packages/sheets-numfmt/src/menu/menu.tsindex d409b8169d..4d3c16c2a0 100644--- a/packages/sheets-numfmt/src/menu/menu.ts+++ b/packages/sheets-numfmt/src/menu/menu.ts@@ -16,11 +16,14 @@import { ICommandService, IUniverInstanceService, LocaleService, UniverInstanceType } from '@univerjs/core';import {- getCurrentSheetDisabled$,INumfmtService,+ RangeProtectionPermissionEditPoint,RemoveNumfmtMutation,SelectionManagerService,SetNumfmtMutation,+ WorkbookEditablePermission,+ WorksheetEditPermission,+ WorksheetSetCellStylePermission,} from '@univerjs/sheets';import type { IMenuSelectorItem } from '@univerjs/ui';import { getMenuHiddenObservable, MenuGroup, MenuItemType, MenuPosition } from '@univerjs/ui';@@ -28,6 +31,7 @@ import type { IAccessor } from '@wendellhu/redi';import { merge, Observable } from 'rxjs';import { deriveStateFromActiveSheet$ } from '@univerjs/sheets-ui';+import { getCurrentRangeDisable$ } from '@univerjs/sheets-ui/controllers/menu/menu-util.js';import { MENU_OPTIONS } from '../base/const/MENU-OPTIONS';import { AddDecimalCommand } from '../commands/commands/add-decimal.command';import { SetCurrencyCommand } from '../commands/commands/set-currency.command';@@ -47,7 +51,8 @@ export const CurrencyMenuItem = (accessor: IAccessor) => {group: MenuGroup.TOOLBAR_FORMULAS_INSERT,positions: [MenuPosition.TOOLBAR_START],hidden$: getMenuHiddenObservable(accessor, UniverInstanceType.UNIVER_SHEET),- disabled$: getCurrentSheetDisabled$(accessor),+ disabled$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetEditPermission, WorksheetSetCellStylePermission], rangeTypes: [RangeProtectionPermissionEditPoint] }),+};};@@ -61,7 +66,7 @@ export const AddDecimalMenuItem = (accessor: IAccessor) => {positions: [MenuPosition.TOOLBAR_START],group: MenuGroup.TOOLBAR_FORMULAS_INSERT,hidden$: getMenuHiddenObservable(accessor, UniverInstanceType.UNIVER_SHEET),- disabled$: getCurrentSheetDisabled$(accessor),+ disabled$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetEditPermission, WorksheetSetCellStylePermission], rangeTypes: [RangeProtectionPermissionEditPoint] }),};};@@ -75,7 +80,7 @@ export const SubtractDecimalMenuItem = (accessor: IAccessor) => {group: MenuGroup.TOOLBAR_FORMULAS_INSERT,positions: [MenuPosition.TOOLBAR_START],hidden$: getMenuHiddenObservable(accessor, UniverInstanceType.UNIVER_SHEET),- disabled$: getCurrentSheetDisabled$(accessor),+ disabled$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetEditPermission, WorksheetSetCellStylePermission], rangeTypes: [RangeProtectionPermissionEditPoint] }),};};@@ -89,7 +94,8 @@ export const PercentMenuItem = (accessor: IAccessor) => {group: MenuGroup.TOOLBAR_FORMULAS_INSERT,positions: [MenuPosition.TOOLBAR_START],hidden$: getMenuHiddenObservable(accessor, UniverInstanceType.UNIVER_SHEET),- disabled$: getCurrentSheetDisabled$(accessor),+ disabled$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetEditPermission, WorksheetSetCellStylePermission], rangeTypes: [RangeProtectionPermissionEditPoint] }),+};};@@ -157,6 +163,6 @@ export const FactoryOtherMenuItem = (accessor: IAccessor): IMenuSelectorItem =>],value$,hidden$: getMenuHiddenObservable(accessor, UniverInstanceType.UNIVER_SHEET),- disabled$: getCurrentSheetDisabled$(accessor),+ disabled$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetSetCellStylePermission, WorksheetEditPermission], rangeTypes: [RangeProtectionPermissionEditPoint] }),};};diff --git a/packages/sheets-thread-comment/src/controllers/menu.ts b/packages/sheets-thread-comment/src/controllers/menu.tsindex 8cb5f0df38..780ddaf8a6 100644--- a/packages/sheets-thread-comment/src/controllers/menu.ts+++ b/packages/sheets-thread-comment/src/controllers/menu.ts@@ -15,11 +15,12 @@*/import type { IMenuItem, IShortcutItem } from '@univerjs/ui';-import { getMenuHiddenObservable, KeyCode, MenuItemType, MenuPosition, MetaKeys } from '@univerjs/ui';+import { getMenuHiddenObservable, KeyCode, MenuGroup, MenuItemType, MenuPosition, MetaKeys } from '@univerjs/ui';import type { IAccessor } from '@wendellhu/redi';import { ToggleSheetCommentPanelOperation } from '@univerjs/thread-comment-ui';import { UniverInstanceType } from '@univerjs/core';-import { whenSheetEditorFocused } from '@univerjs/sheets-ui';+import { getCommentDisable$, whenSheetEditorFocused } from '@univerjs/sheets-ui';+import { RangeProtectionPermissionEditPoint, WorkbookCommentPermission, WorksheetViewPermission } from '@univerjs/sheets';import { ShowAddSheetCommentModalOperation } from '../commands/operations/comment.operation';import { COMMENT_SINGLE_ICON } from '../types/const';@@ -31,6 +32,11 @@ export const threadCommentMenuFactory = (accessor: IAccessor) => {icon: COMMENT_SINGLE_ICON,title: 'sheetThreadComment.menu.addComment',hidden$: getMenuHiddenObservable(accessor, UniverInstanceType.UNIVER_SHEET),+ disabled$: getCommentDisable$(accessor, {+ workbookTypes: [WorkbookCommentPermission],+ worksheetTypes: [WorksheetViewPermission],+ rangeTypes: [RangeProtectionPermissionEditPoint],+ }),} as IMenuItem;};@@ -41,7 +47,14 @@ export const threadPanelMenuFactory = (accessor: IAccessor) => {icon: COMMENT_SINGLE_ICON,tooltip: 'sheetThreadComment.menu.commentManagement',positions: MenuPosition.TOOLBAR_START,+ group: MenuGroup.TOOLBAR_OTHERS,+ disabled$: getCommentDisable$(accessor, {+ workbookTypes: [WorkbookCommentPermission],+ worksheetTypes: [WorksheetViewPermission],+ rangeTypes: [RangeProtectionPermissionEditPoint],+ }),hidden$: getMenuHiddenObservable(accessor, UniverInstanceType.UNIVER_SHEET),+};};diff --git a/packages/sheets-ui/package.json b/packages/sheets-ui/package.jsonindex 182fe22eb2..fbca237dbb 100644--- a/packages/sheets-ui/package.json+++ b/packages/sheets-ui/package.json@@ -76,6 +76,7 @@"@univerjs/engine-numfmt": "workspace:*","@univerjs/engine-render": "workspace:*","@univerjs/sheets": "workspace:*",+ "@univerjs/sheets-ui": "workspace:*","@univerjs/ui": "workspace:*","@wendellhu/redi": "0.15.2","clsx": ">=2.0.0",@@ -83,7 +84,8 @@"rxjs": ">=7.0.0"},"dependencies": {- "@univerjs/icons": "^0.1.46"+ "@univerjs/icons": "^0.1.46",+ "@univerjs/protocol": "^0.1.34"},"devDependencies": {"@types/react": "^18.2.79",diff --git a/packages/sheets-ui/src/commands/commands/__tests__/create-command-test-bed.ts b/packages/sheets-ui/src/commands/commands/__tests__/create-command-test-bed.tsindex d79d145f1d..68838621b9 100644--- a/packages/sheets-ui/src/commands/commands/__tests__/create-command-test-bed.ts+++ b/packages/sheets-ui/src/commands/commands/__tests__/create-command-test-bed.ts@@ -26,7 +26,11 @@ import {Univer,UniverInstanceType,} from '@univerjs/core';-import { BorderStyleManagerService, SelectionManagerService, SheetInterceptorService, SheetPermissionService } from '@univerjs/sheets';+import { BorderStyleManagerService,+ RangeProtectionRuleModel,+ SelectionManagerService,++ SheetInterceptorService, WorkbookPermissionService, WorksheetPermissionService, WorksheetProtectionPointModel, WorksheetProtectionRuleModel } from '@univerjs/sheets';import type { Dependency } from '@wendellhu/redi';import { Inject, Injector } from '@wendellhu/redi';@@ -98,8 +102,11 @@ export function createCommandTestBed(workbookData?: IWorkbookData, dependencies?injector.add([BorderStyleManagerService]);injector.add([SheetInterceptorService]);injector.add([LexerTreeBuilder]);- injector.add([SheetPermissionService]);-+ injector.add([WorksheetPermissionService]);+ injector.add([WorksheetProtectionPointModel]);+ injector.add([WorkbookPermissionService]);+ injector.add([WorksheetProtectionRuleModel]);+ injector.add([RangeProtectionRuleModel]);dependencies?.forEach((d) => injector.add(d));}}diff --git a/packages/sheets-ui/src/commands/commands/clipboard.command.ts b/packages/sheets-ui/src/commands/commands/clipboard.command.tsindex 3c43b92fd4..df89bf7374 100644--- a/packages/sheets-ui/src/commands/commands/clipboard.command.ts+++ b/packages/sheets-ui/src/commands/commands/clipboard.command.ts@@ -54,6 +54,11 @@ export interface ISheetPasteParams {value: string;}+export interface ISheetPasteByShortKeyParams {+ htmlContent?: string;+ textContent?: string;+}+export const SheetPasteCommand: IMultiCommand = {id: PasteCommand.id,type: CommandType.COMMAND,@@ -79,6 +84,18 @@ export const SheetPasteCommand: IMultiCommand = {},};+export const SheetPasteShortKeyCommand: ICommand = {+ id: 'sheet.command.paste-bu-short-key',+ type: CommandType.COMMAND,+ handler: async (accessor: IAccessor, params: ISheetPasteByShortKeyParams) => {+ const clipboardService = accessor.get(ISheetClipboardService);+ const { htmlContent, textContent } = params;+ clipboardService.legacyPaste(htmlContent, textContent);++ return true;+ },+};+export const SheetPasteValueCommand: ICommand = {id: 'sheet.command.paste-value',type: CommandType.COMMAND,diff --git a/packages/sheets-ui/src/commands/commands/set-format-painter.command.ts b/packages/sheets-ui/src/commands/commands/set-format-painter.command.tsindex e96a07a515..d855db12c0 100644--- a/packages/sheets-ui/src/commands/commands/set-format-painter.command.ts+++ b/packages/sheets-ui/src/commands/commands/set-format-painter.command.ts@@ -42,7 +42,7 @@ import {SetRangeValuesMutation,SetRangeValuesUndoMutationFactory,SheetInterceptorService,- SheetPermissionService,+} from '@univerjs/sheets';import type { IAccessor } from '@wendellhu/redi';@@ -111,7 +111,6 @@ export const ApplyFormatPainterCommand: ICommand = {if (!target) return false;const { worksheet, unitId, subUnitId } = target;- const sheetPermissionService = accessor.get(SheetPermissionService);const {styleValues: value,@@ -119,10 +118,6 @@ export const ApplyFormatPainterCommand: ICommand = {mergeRanges,} = params;- if (!sheetPermissionService.getSheetEditable(unitId, subUnitId)) {- return false;- }-const currentSelections = range ? [range] : selectionManagerService.getSelectionRanges();if (!currentSelections || !currentSelections.length) {return false;diff --git a/packages/sheets-ui/src/controllers/clipboard/clipboard.controller.ts b/packages/sheets-ui/src/controllers/clipboard/clipboard.controller.tsindex 08530eb841..5a093a50f5 100644--- a/packages/sheets-ui/src/controllers/clipboard/clipboard.controller.ts+++ b/packages/sheets-ui/src/controllers/clipboard/clipboard.controller.ts@@ -75,6 +75,7 @@ import {SheetPasteColWidthCommand,SheetPasteCommand,SheetPasteFormatCommand,+ SheetPasteShortKeyCommand,SheetPasteValueCommand,} from '../../commands/commands/clipboard.command';import { ISheetClipboardService, PREDEFINED_HOOK_NAME } from '../../services/clipboard/clipboard.service';@@ -129,7 +130,7 @@ export class SheetClipboardController extends RxDisposable {const clipboardEvent = config!.event as ClipboardEvent;const htmlContent = clipboardEvent.clipboardData?.getData('text/html');const textContent = clipboardEvent.clipboardData?.getData('text/plain');- this._sheetClipboardService.legacyPaste(htmlContent, textContent);+ this._commandService.executeCommand(SheetPasteShortKeyCommand.id, { htmlContent, textContent });});}@@ -144,6 +145,7 @@ export class SheetClipboardController extends RxDisposable {SheetPasteFormatCommand,SheetPasteColWidthCommand,SheetPasteBesidesBorderCommand,+ SheetPasteShortKeyCommand,].forEach((command) => this.disposeWithMe(this._commandService.registerCommand(command)));// register basic sheet clipboard hooksdiff --git a/packages/sheets-ui/src/controllers/menu/__tests__/create-menu-test-bed.ts b/packages/sheets-ui/src/controllers/menu/__tests__/create-menu-test-bed.tsindex bdcfff3371..1e5aac9fb0 100644--- a/packages/sheets-ui/src/controllers/menu/__tests__/create-menu-test-bed.ts+++ b/packages/sheets-ui/src/controllers/menu/__tests__/create-menu-test-bed.ts@@ -16,9 +16,16 @@import type { IWorkbookData } from '@univerjs/core';import { LocaleType, Plugin, Univer, UniverInstanceType } from '@univerjs/core';-import { SelectionManagerService, SheetInterceptorService, SheetPermissionService } from '@univerjs/sheets';+import { RangeProtectionRefRangeService, RangeProtectionRenderModel, RangeProtectionRuleModel, RangeProtectionService, RefRangeService, SelectionManagerService,+ SheetInterceptorService,+ WorkbookPermissionService,+ WorksheetPermissionService,+ WorksheetProtectionPointModel,+ WorksheetProtectionRuleModel,+} from '@univerjs/sheets';import { DesktopMenuService, DesktopPlatformService, DesktopShortcutService, IMenuService, IPlatformService, IShortcutService } from '@univerjs/ui';import { Inject, Injector } from '@wendellhu/redi';+import { IRenderManagerService, RenderManagerService } from '@univerjs/engine-render';const TEST_WORKBOOK_DATA_DEMO: IWorkbookData = {id: 'test',@@ -64,8 +71,18 @@ export function createMenuTestBed() {injector.add([SelectionManagerService]);injector.add([IShortcutService, { useClass: DesktopShortcutService }]);injector.add([IMenuService, { useClass: DesktopMenuService }]);- injector.add([SheetPermissionService]);+ injector.add([WorkbookPermissionService]);+ injector.add([WorksheetPermissionService]);+ injector.add([WorksheetProtectionPointModel]);injector.add([SheetInterceptorService]);+ injector.add([WorksheetProtectionRuleModel]);+ injector.add([IRenderManagerService, { useClass: RenderManagerService }]);+ injector.add([RefRangeService]);++ injector.add([RangeProtectionRefRangeService]);+ injector.add([RangeProtectionRenderModel]);+ injector.add([RangeProtectionRuleModel]);+ injector.add([RangeProtectionService]);}}diff --git a/packages/sheets-ui/src/controllers/menu/__tests__/menu.spec.ts b/packages/sheets-ui/src/controllers/menu/__tests__/menu.spec.tsindex c9375222a2..6e5d9e632c 100644--- a/packages/sheets-ui/src/controllers/menu/__tests__/menu.spec.ts+++ b/packages/sheets-ui/src/controllers/menu/__tests__/menu.spec.ts@@ -96,7 +96,6 @@ describe('test menu items', () => {expect(disabled).toBeFalsy();select({ startRow: 0, startColumn: 0, endRow: 0, endColumn: 0 });-expect(await commandService.executeCommand(SetBoldCommand.id)).toBeTruthy();expect(activated).toBe(true);});diff --git a/packages/sheets-ui/src/controllers/menu/border.menu.ts b/packages/sheets-ui/src/controllers/menu/border.menu.tsindex 83d0b350a2..ddff9e4196 100644--- a/packages/sheets-ui/src/controllers/menu/border.menu.ts+++ b/packages/sheets-ui/src/controllers/menu/border.menu.ts@@ -16,20 +16,21 @@import { ICommandService, UniverInstanceType } from '@univerjs/core';import type { IBorderInfo } from '@univerjs/sheets';-import { BorderStyleManagerService, getCurrentSheetDisabled$, SetBorderBasicCommand } from '@univerjs/sheets';+import { BorderStyleManagerService, RangeProtectionPermissionEditPoint, SetBorderBasicCommand, WorkbookEditablePermission, WorksheetEditPermission, WorksheetSetCellStylePermission } from '@univerjs/sheets';import type { IMenuSelectorItem } from '@univerjs/ui';import { getMenuHiddenObservable, MenuGroup, MenuItemType, MenuPosition } from '@univerjs/ui';import type { IAccessor } from '@wendellhu/redi';import { Observable } from 'rxjs';import { BORDER_LINE_CHILDREN, BORDER_PANEL_COMPONENT } from '../../components/border-panel/interface';+import { getCurrentRangeDisable$ } from './menu-util';export function CellBorderSelectorMenuItemFactory(accessor: IAccessor): IMenuSelectorItem<IBorderInfo, IBorderInfo> {// const permissionService = accessor.get(IPermissionService);const borderStyleManagerService = accessor.get(BorderStyleManagerService);- const disabled$ = getCurrentSheetDisabled$(accessor);+ const disabled$ = getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetEditPermission, WorksheetSetCellStylePermission], rangeTypes: [RangeProtectionPermissionEditPoint] });return {id: SetBorderBasicCommand.id,diff --git a/packages/sheets-ui/src/controllers/menu/clear.menu.ts b/packages/sheets-ui/src/controllers/menu/clear.menu.tsindex 212be46fde..bbac61d5b2 100644--- a/packages/sheets-ui/src/controllers/menu/clear.menu.ts+++ b/packages/sheets-ui/src/controllers/menu/clear.menu.ts@@ -14,12 +14,13 @@* limitations under the License.*/-import { ClearSelectionAllCommand, ClearSelectionContentCommand, ClearSelectionFormatCommand } from '@univerjs/sheets';+import { ClearSelectionAllCommand, ClearSelectionContentCommand, ClearSelectionFormatCommand, RangeProtectionPermissionEditPoint, WorkbookEditablePermission, WorksheetEditPermission, WorksheetSetCellStylePermission, WorksheetSetCellValuePermission } from '@univerjs/sheets';import type { IMenuButtonItem, IMenuSelectorItem } from '@univerjs/ui';import { MenuGroup, MenuItemType, MenuPosition } from '@univerjs/ui';import type { IAccessor } from '@wendellhu/redi';import { SheetMenuPosition } from './menu';+import { getCurrentRangeDisable$ } from './menu-util';const CLEAR_SELECTION_MENU_ID = 'sheet.menu.clear-selection';export function ClearSelectionMenuItemFactory(accessor: IAccessor): IMenuSelectorItem<string> {@@ -43,23 +44,24 @@ export function ClearSelectionContentMenuItemFactory(accessor: IAccessor): IMenutype: MenuItemType.BUTTON,title: 'rightClick.clearContent',positions: [CLEAR_SELECTION_MENU_ID],+ disabled$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetEditPermission, WorksheetSetCellValuePermission], rangeTypes: [RangeProtectionPermissionEditPoint] }),};}-export function ClearSelectionFormatMenuItemFactory(accessor: IAccessor): IMenuButtonItem {return {id: ClearSelectionFormatCommand.id,type: MenuItemType.BUTTON,title: 'rightClick.clearFormat',positions: [CLEAR_SELECTION_MENU_ID],+ disabled$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetEditPermission, WorksheetSetCellStylePermission], rangeTypes: [RangeProtectionPermissionEditPoint] }),};}-export function ClearSelectionAllMenuItemFactory(accessor: IAccessor): IMenuButtonItem {return {id: ClearSelectionAllCommand.id,type: MenuItemType.BUTTON,title: 'rightClick.clearAll',positions: [CLEAR_SELECTION_MENU_ID],+ disabled$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetEditPermission, WorksheetSetCellValuePermission, WorksheetSetCellStylePermission], rangeTypes: [RangeProtectionPermissionEditPoint] }),};}diff --git a/packages/sheets-ui/src/controllers/menu/delete.menu.ts b/packages/sheets-ui/src/controllers/menu/delete.menu.tsindex e411ddde68..641b725617 100644--- a/packages/sheets-ui/src/controllers/menu/delete.menu.ts+++ b/packages/sheets-ui/src/controllers/menu/delete.menu.ts@@ -18,6 +18,7 @@ import type { IMenuButtonItem, IMenuSelectorItem } from '@univerjs/ui';import { MenuGroup, MenuItemType, MenuPosition } from '@univerjs/ui';import type { IAccessor } from '@wendellhu/redi';+import { RangeProtectionPermissionEditPoint, WorkbookEditablePermission, WorksheetDeleteColumnPermission, WorksheetDeleteRowPermission, WorksheetEditPermission } from '@univerjs/sheets';import { DeleteRangeMoveLeftConfirmCommand } from '../../commands/commands/delete-range-move-left-confirm.command ';import { DeleteRangeMoveUpConfirmCommand } from '../../commands/commands/delete-range-move-up-confirm.command';import {@@ -25,6 +26,7 @@ import {RemoveRowConfirmCommand,} from '../../commands/commands/remove-row-col-confirm.command';import { SheetMenuPosition } from './menu';+import { getBaseRangeMenuHidden$, getCellMenuHidden$, getCurrentRangeDisable$, getDeleteMenuHidden$ } from './menu-util';const DELETE_RANGE_MENU_ID = 'sheet.menu.delete';export function DeleteRangeMenuItemFactory(accessor: IAccessor): IMenuSelectorItem<string> {@@ -35,6 +37,8 @@ export function DeleteRangeMenuItemFactory(accessor: IAccessor): IMenuSelectorIttitle: 'rightClick.delete',icon: 'Reduce',positions: [MenuPosition.CONTEXT_MENU],+ hidden$: getBaseRangeMenuHidden$(accessor),+ disabled$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetEditPermission] }),};}@@ -46,6 +50,8 @@ export function RemoveColMenuItemFactory(accessor: IAccessor): IMenuButtonItem {icon: 'DeleteColumn',positions: [DELETE_RANGE_MENU_ID, SheetMenuPosition.COL_HEADER_CONTEXT_MENU],title: 'rightClick.deleteSelectedColumn',+ hidden$: getDeleteMenuHidden$(accessor, 'col'),+ disabled$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetEditPermission, WorksheetDeleteColumnPermission] }),};}@@ -57,6 +63,8 @@ export function RemoveRowMenuItemFactory(accessor: IAccessor): IMenuButtonItem {icon: 'DeleteRow',positions: [DELETE_RANGE_MENU_ID, SheetMenuPosition.ROW_HEADER_CONTEXT_MENU],title: 'rightClick.deleteSelectedRow',+ disabled$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetEditPermission, WorksheetDeleteRowPermission] }),+ hidden$: getDeleteMenuHidden$(accessor, 'row'),};}@@ -68,6 +76,8 @@ export function DeleteRangeMoveLeftMenuItemFactory(accessor: IAccessor): IMenuButitle: 'rightClick.moveLeft',icon: 'DeleteCellShiftLeft',positions: [DELETE_RANGE_MENU_ID],+ disabled$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetEditPermission], rangeTypes: [RangeProtectionPermissionEditPoint] }),+ hidden$: getCellMenuHidden$(accessor, 'col'),};}@@ -79,5 +89,7 @@ export function DeleteRangeMoveUpMenuItemFactory(accessor: IAccessor): IMenuButttitle: 'rightClick.moveUp',icon: 'DeleteCellShiftUp',positions: [DELETE_RANGE_MENU_ID],+ disabled$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetEditPermission], rangeTypes: [RangeProtectionPermissionEditPoint] }),+ hidden$: getCellMenuHidden$(accessor, 'row'),};}diff --git a/packages/sheets-ui/src/controllers/menu/insert.menu.ts b/packages/sheets-ui/src/controllers/menu/insert.menu.tsindex 4025dce7d8..22b3835095 100644--- a/packages/sheets-ui/src/controllers/menu/insert.menu.ts+++ b/packages/sheets-ui/src/controllers/menu/insert.menu.ts@@ -19,16 +19,20 @@ import {InsertColBeforeCommand,InsertRowAfterCommand,InsertRowBeforeCommand,- SelectionManagerService,+ RangeProtectionPermissionEditPoint,+ WorkbookEditablePermission,+ WorksheetEditPermission,+ WorksheetInsertColumnPermission,+ WorksheetInsertRowPermission,} from '@univerjs/sheets';import type { IMenuButtonItem, IMenuSelectorItem } from '@univerjs/ui';import { MenuGroup, MenuItemType, MenuPosition } from '@univerjs/ui';import type { IAccessor } from '@wendellhu/redi';-import { Observable } from 'rxjs';import { InsertRangeMoveDownConfirmCommand } from '../../commands/commands/insert-range-move-down-confirm.command';import { InsertRangeMoveRightConfirmCommand } from '../../commands/commands/insert-range-move-right-confirm.command';import { SheetMenuPosition } from './menu';+import { getBaseRangeMenuHidden$, getCellMenuHidden$, getCurrentRangeDisable$, getInsertAfterMenuHidden$, getInsertBeforeMenuHidden$ } from './menu-util';const COL_INSERT_MENU_ID = 'sheet.menu.col-insert';export function ColInsertMenuItemFactory(accessor: IAccessor): IMenuSelectorItem<string> {@@ -39,6 +43,8 @@ export function ColInsertMenuItemFactory(accessor: IAccessor): IMenuSelectorItemtitle: 'rightClick.insert',icon: 'Insert',positions: [SheetMenuPosition.COL_HEADER_CONTEXT_MENU],+ hidden$: getBaseRangeMenuHidden$(accessor),+ disabled$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetEditPermission, WorksheetInsertColumnPermission] }),};}@@ -51,6 +57,8 @@ export function RowInsertMenuItemFactory(accessor: IAccessor): IMenuSelectorItemtitle: 'rightClick.insert',icon: 'Insert',positions: [SheetMenuPosition.ROW_HEADER_CONTEXT_MENU],+ hidden$: getBaseRangeMenuHidden$(accessor),+ disabled$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetInsertRowPermission, WorksheetEditPermission], rangeTypes: [RangeProtectionPermissionEditPoint] }),};}@@ -63,74 +71,59 @@ export function CellInsertMenuItemFactory(accessor: IAccessor): IMenuSelectorItetitle: 'rightClick.insert',icon: 'Insert',positions: [MenuPosition.CONTEXT_MENU],+ hidden$: getBaseRangeMenuHidden$(accessor),+ disabled$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetInsertColumnPermission, WorksheetEditPermission], rangeTypes: [RangeProtectionPermissionEditPoint] }),};}export function InsertRowBeforeMenuItemFactory(accessor: IAccessor): IMenuButtonItem {- const selectionManager = accessor.get(SelectionManagerService);-return {id: InsertRowBeforeCommand.id,type: MenuItemType.BUTTON,title: 'rightClick.insertRowBefore',icon: 'InsertRowAbove',positions: [ROW_INSERT_MENU_ID, CELL_INSERT_MENU_ID],- hidden$: new Observable((observer) => {- // if there are multi selections this item should be hidden- const selections = selectionManager.getSelections();- observer.next(selections?.length !== 1);- }),+ disabled$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetInsertRowPermission, WorksheetEditPermission], rangeTypes: [RangeProtectionPermissionEditPoint] }),+ hidden$: getInsertBeforeMenuHidden$(accessor, 'row'),};}export function InsertRowAfterMenuItemFactory(accessor: IAccessor): IMenuButtonItem {- const selectionManager = accessor.get(SelectionManagerService);-return {id: InsertRowAfterCommand.id,type: MenuItemType.BUTTON,positions: [ROW_INSERT_MENU_ID],title: 'rightClick.insertRow',icon: 'InsertRowBelow',- hidden$: new Observable((observer) => {- // if there are multi selections this item should be hidden- const selections = selectionManager.getSelections();- observer.next(selections?.length !== 1);- }),+ disabled$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetInsertRowPermission, WorksheetEditPermission], rangeTypes: [RangeProtectionPermissionEditPoint] }),+ hidden$: getInsertAfterMenuHidden$(accessor, 'row'),};}export function InsertColBeforeMenuItemFactory(accessor: IAccessor): IMenuButtonItem {- const selectionManager = accessor.get(SelectionManagerService);-return {id: InsertColBeforeCommand.id,type: MenuItemType.BUTTON,positions: [COL_INSERT_MENU_ID, CELL_INSERT_MENU_ID],title: 'rightClick.insertColumnBefore',icon: 'LeftInsertColumn',- hidden$: new Observable((observer) => {- // if there are multi selections this item should be hidden- const selections = selectionManager.getSelections();- observer.next(selections?.length !== 1);- }),+ disabled$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetInsertColumnPermission, WorksheetEditPermission], rangeTypes: [RangeProtectionPermissionEditPoint] }),++ hidden$: getInsertBeforeMenuHidden$(accessor, 'col'),+};}export function InsertColAfterMenuItemFactory(accessor: IAccessor): IMenuButtonItem {- const selectionManager = accessor.get(SelectionManagerService);-return {id: InsertColAfterCommand.id,type: MenuItemType.BUTTON,positions: [COL_INSERT_MENU_ID],title: 'rightClick.insertColumn',icon: 'RightInsertColumn',- hidden$: new Observable((observer) => {- // if there are multi selections this item should be hidden- const selections = selectionManager.getSelections();- observer.next(selections?.length !== 1);- }),+ disabled$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetInsertColumnPermission, WorksheetEditPermission], rangeTypes: [RangeProtectionPermissionEditPoint] }),++ hidden$: getInsertAfterMenuHidden$(accessor, 'col'),};}@@ -141,6 +134,8 @@ export function InsertRangeMoveRightMenuItemFactory(accessor: IAccessor): IMenuBtitle: 'rightClick.moveRight',icon: 'InsertCellShiftRight',positions: [CELL_INSERT_MENU_ID],+ disabled$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetEditPermission], rangeTypes: [RangeProtectionPermissionEditPoint] }),+ hidden$: getCellMenuHidden$(accessor, 'col'),};}@@ -151,5 +146,8 @@ export function InsertRangeMoveDownMenuItemFactory(accessor: IAccessor): IMenuButitle: 'rightClick.moveDown',icon: 'InsertCellDown',positions: [CELL_INSERT_MENU_ID],+ disabled$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetEditPermission], rangeTypes: [RangeProtectionPermissionEditPoint] }),++ hidden$: getCellMenuHidden$(accessor, 'row'),};}diff --git a/packages/sheets-ui/src/controllers/menu/menu-util.ts b/packages/sheets-ui/src/controllers/menu/menu-util.tsindex 50349a6cb5..f8d7a58584 100644--- a/packages/sheets-ui/src/controllers/menu/menu-util.ts+++ b/packages/sheets-ui/src/controllers/menu/menu-util.ts@@ -14,9 +14,15 @@* limitations under the License.*/-import { type IUniverInstanceService, type Nullable, UniverInstanceType, type Workbook, type Worksheet } from '@univerjs/core';+import type { ICellDataForSheetInterceptor, IPermissionTypes, IRange, Nullable, Workbook, Worksheet } from '@univerjs/core';+import { IPermissionService, IUniverInstanceService, Rectangle, Tools, UniverInstanceType, UserManagerService } from '@univerjs/core';+import { UnitAction } from '@univerjs/protocol';++import type { ICellPermission } from '@univerjs/sheets';+import { RangeProtectionRuleModel, SelectionManagerService, WorkbookEditablePermission, WorkbookManageCollaboratorPermission, WorksheetProtectionRuleModel } from '@univerjs/sheets';+import type { IAccessor } from '@wendellhu/redi';import type { Observable } from 'rxjs';-import { map, of, switchMap } from 'rxjs';+import { combineLatest, map, of, switchMap } from 'rxjs';interface IActive {workbook: Workbook;@@ -39,3 +45,366 @@ export function deriveStateFromActiveSheet$<T>(univerInstanceService: IUniverInsreturn callback(active);}));}++export function getCurrentRangeDisable$(accessor: IAccessor, permissionTypes: IPermissionTypes = {}) {+ const univerInstanceService = accessor.get(IUniverInstanceService);+ const selectionManagerService = accessor.get(SelectionManagerService);+ const rangeProtectionRuleModel = accessor.get(RangeProtectionRuleModel);+ const worksheetRuleModel = accessor.get(WorksheetProtectionRuleModel);+ const workbook = univerInstanceService.getCurrentUnitForType<Workbook>(UniverInstanceType.UNIVER_SHEET)!;+ const userManagerService = accessor.get(UserManagerService);+ if (!workbook) {+ return of(true);+ }+ return combineLatest([userManagerService.currentUser$, workbook.activeSheet$, selectionManagerService.selectionMoveEnd$]).pipe(+ switchMap(() => {+ const worksheet = workbook.getActiveSheet();+ const unitId = workbook.getUnitId();+ const subUnitId = worksheet.getSheetId();++ const permissionService = accessor.get(IPermissionService);++ const { workbookTypes = [WorkbookEditablePermission], worksheetTypes, rangeTypes } = permissionTypes;++ const permissionIds: string[] = [];++ workbookTypes?.forEach((F) => {+ permissionIds.push(new F(unitId).id);+ });++ worksheetTypes?.forEach((F) => {+ permissionIds.push(new F(unitId, subUnitId).id);+ });++ const worksheetRule = worksheetRuleModel.getRule(unitId, subUnitId);++ if (worksheetRule) {+ return permissionService.composePermission$(permissionIds).pipe(map((list) => {+ return list.some((item) => item.value === false);+ }));+ }++ const selectionRanges = selectionManagerService.getSelections()?.map((selection) => selection.range);+ const rules = rangeProtectionRuleModel.getSubunitRuleList(unitId, subUnitId).filter((rule) => {+ return selectionRanges?.some((range) => {+ return rule.ranges.some((ruleRange) => Rectangle.intersects(range, ruleRange));+ });+ });++ rangeTypes?.forEach((F) => {+ rules.forEach((rule) => {+ permissionIds.push(new F(unitId, subUnitId, rule.permissionId).id);+ });+ });++ return permissionService.composePermission$(permissionIds).pipe(map((list) => {+ return list.some((item) => item.value === false);+ }));+ })+ );+}++export function getCommentDisable$(accessor: IAccessor, permissionTypes: IPermissionTypes = {}) {+ const univerInstanceService = accessor.get(IUniverInstanceService);+ const selectionManagerService = accessor.get(SelectionManagerService);+ const rangeProtectionRuleModel = accessor.get(RangeProtectionRuleModel);+ const worksheetRuleModel = accessor.get(WorksheetProtectionRuleModel);+ const userManagerService = accessor.get(UserManagerService);+ return combineLatest([userManagerService.currentUser$, selectionManagerService.selectionMoveEnd$]).pipe(+ switchMap(() => {+ const workbook = univerInstanceService.getCurrentUnitForType<Workbook>(UniverInstanceType.UNIVER_SHEET);+ if (!workbook) {+ return of(true);+ }+ const worksheet = workbook.getActiveSheet();+ const unitId = workbook.getUnitId();+ const subUnitId = worksheet.getSheetId();++ const permissionService = accessor.get(IPermissionService);++ const { workbookTypes = [WorkbookEditablePermission], worksheetTypes, rangeTypes } = permissionTypes;++ const permissionIds: string[] = [];++ workbookTypes?.forEach((F) => {+ permissionIds.push(new F(unitId).id);+ });++ worksheetTypes?.forEach((F) => {+ permissionIds.push(new F(unitId, subUnitId).id);+ });++ const worksheetRule = worksheetRuleModel.getRule(unitId, subUnitId);++ if (worksheetRule) {+ return permissionService.composePermission$(permissionIds).pipe(map((list) => {+ return list.some((item) => item.value === false);+ }));+ }++ const selectionRanges = selectionManagerService.getSelections()?.map((selection) => selection.range);+ const rules = rangeProtectionRuleModel.getSubunitRuleList(unitId, subUnitId).filter((rule) => {+ return selectionRanges?.some((range) => {+ return rule.ranges.some((ruleRange) => Rectangle.intersects(range, ruleRange));+ });+ });++ rangeTypes?.forEach((F) => {+ rules.forEach((rule) => {+ permissionIds.push(new F(unitId, subUnitId, rule.permissionId).id);+ });+ });++ return permissionService.composePermission$(permissionIds).pipe(map((list) => {+ return list.some((item) => item.value === false);+ }));+ })+ );+}++export function getBaseRangeMenuHidden$(accessor: IAccessor) {+ const univerInstanceService = accessor.get(IUniverInstanceService);++ const selectionManagerService = accessor.get(SelectionManagerService);+ const rangeProtectionRuleModel = accessor.get(RangeProtectionRuleModel);++ return selectionManagerService.selectionMoveEnd$.pipe(+ map(() => {+ const range = selectionManagerService.getLast()?.range;+ if (!range) return true;++ const workbook = univerInstanceService.getCurrentUnitForType<Workbook>(UniverInstanceType.UNIVER_SHEET)!;+ const worksheet = workbook.getActiveSheet();+ const unitId = workbook.getUnitId();+ const subUnitId = worksheet.getSheetId();++ const permissionLapRanges = rangeProtectionRuleModel.getSubunitRuleList(unitId, subUnitId).reduce((acc, rule) => {+ return [...acc, ...rule.ranges];+ }, [] as IRange[]).filter((ruleRange) => Rectangle.intersects(range, ruleRange));++ return permissionLapRanges.some((ruleRange) => {+ const { startRow, startColumn, endRow, endColumn } = ruleRange;+ for (let row = startRow; row <= endRow; row++) {+ for (let col = startColumn; col <= endColumn; col++) {+ const permission = (worksheet.getCell(row, col) as (ICellDataForSheetInterceptor & { selectionProtection: ICellPermission[] }))?.selectionProtection?.[0];+ if (permission?.[UnitAction.Edit] === false) {+ return true;+ }+ }+ }+ return false;+ });+ })+ );+}++export function getInsertAfterMenuHidden$(accessor: IAccessor, type: 'row' | 'col') {+ const univerInstanceService = accessor.get(IUniverInstanceService);++ const selectionManagerService = accessor.get(SelectionManagerService);+ const rangeProtectionRuleModel = accessor.get(RangeProtectionRuleModel);++ return selectionManagerService.selectionMoveEnd$.pipe(+ map(() => {+ const range = selectionManagerService.getLast()?.range;+ if (!range) return true;++ const workbook = univerInstanceService.getCurrentUnitForType<Workbook>(UniverInstanceType.UNIVER_SHEET)!;+ const worksheet = workbook.getActiveSheet();+ const unitId = workbook.getUnitId();+ const subUnitId = worksheet.getSheetId();++ const permissionLapRanges = rangeProtectionRuleModel.getSubunitRuleList(unitId, subUnitId).reduce((acc, rule) => {+ return [...acc, ...rule.ranges];+ }, [] as IRange[]).filter((ruleRange) => {+ if (type === 'row') {+ return range.endRow > ruleRange.startRow && range.endRow <= ruleRange.endRow;+ } else {+ return range.endColumn > ruleRange.startColumn && range.endColumn <= ruleRange.endColumn;+ }+ });++ return permissionLapRanges.some((ruleRange) => {+ const { startRow, startColumn, endRow, endColumn } = ruleRange;+ for (let row = startRow; row <= endRow; row++) {+ for (let col = startColumn; col <= endColumn; col++) {+ const permission = (worksheet.getCell(row, col) as (ICellDataForSheetInterceptor & { selectionProtection: ICellPermission[] }))?.selectionProtection?.[0];+ if (permission?.[UnitAction.Edit] === false) {+ return true;+ }+ }+ }+ return false;+ });+ })+ );+}++export function getInsertBeforeMenuHidden$(accessor: IAccessor, type: 'row' | 'col') {+ const univerInstanceService = accessor.get(IUniverInstanceService);++ const selectionManagerService = accessor.get(SelectionManagerService);+ const rangeProtectionRuleModel = accessor.get(RangeProtectionRuleModel);++ return selectionManagerService.selectionMoveEnd$.pipe(+ map(() => {+ const range = selectionManagerService.getLast()?.range;+ if (!range) return true;++ const workbook = univerInstanceService.getCurrentUnitForType<Workbook>(UniverInstanceType.UNIVER_SHEET)!;+ const worksheet = workbook.getActiveSheet();+ const unitId = workbook.getUnitId();+ const subUnitId = worksheet.getSheetId();++ const permissionLapRanges = rangeProtectionRuleModel.getSubunitRuleList(unitId, subUnitId).reduce((acc, rule) => {+ return [...acc, ...rule.ranges];+ }, [] as IRange[]).filter((ruleRange) => {+ if (type === 'row') {+ return range.startRow > ruleRange.startRow && range.startRow <= ruleRange.endRow;+ } else {+ return range.startColumn > ruleRange.startColumn && range.startColumn <= ruleRange.endColumn;+ }+ });++ return permissionLapRanges.some((ruleRange) => {+ const { startRow, startColumn, endRow, endColumn } = ruleRange;+ for (let row = startRow; row <= endRow; row++) {+ for (let col = startColumn; col <= endColumn; col++) {+ const permission = (worksheet.getCell(row, col) as (ICellDataForSheetInterceptor & { selectionProtection: ICellPermission[] }))?.selectionProtection?.[0];+ if (permission?.[UnitAction.Edit] === false) {+ return true;+ }+ }+ }+ return false;+ });+ })+ );+}++export function getDeleteMenuHidden$(accessor: IAccessor, type: 'row' | 'col') {+ const univerInstanceService = accessor.get(IUniverInstanceService);++ const selectionManagerService = accessor.get(SelectionManagerService);+ const rangeProtectionRuleModel = accessor.get(RangeProtectionRuleModel);++ return selectionManagerService.selectionMoveEnd$.pipe(+ map(() => {+ const range = selectionManagerService.getLast()?.range;+ if (!range) return true;++ const workbook = univerInstanceService.getCurrentUnitForType<Workbook>(UniverInstanceType.UNIVER_SHEET)!;+ const worksheet = workbook.getActiveSheet();+ const unitId = workbook.getUnitId();+ const subUnitId = worksheet.getSheetId();++ const rowColRangeExpand = Tools.deepClone(range);++ if (type === 'row') {+ rowColRangeExpand.startColumn = 0;+ rowColRangeExpand.endColumn = worksheet.getColumnCount() - 1;+ } else {+ rowColRangeExpand.startRow = 0;+ rowColRangeExpand.endRow = worksheet.getRowCount() - 1;+ }+ const permissionLapRanges = rangeProtectionRuleModel.getSubunitRuleList(unitId, subUnitId).reduce((acc, rule) => {+ return [...acc, ...rule.ranges];+ }, [] as IRange[]).filter((ruleRange) => Rectangle.intersects(rowColRangeExpand, ruleRange));++ return permissionLapRanges.some((ruleRange) => {+ const { startRow, startColumn, endRow, endColumn } = ruleRange;+ for (let row = startRow; row <= endRow; row++) {+ for (let col = startColumn; col <= endColumn; col++) {+ const permission = (worksheet.getCell(row, col) as (ICellDataForSheetInterceptor & { selectionProtection: ICellPermission[] }))?.selectionProtection?.[0];+ if (permission?.[UnitAction.Edit] === false) {+ return true;+ }+ }+ }+ return false;+ });+ })+ );+}++export function getCellMenuHidden$(accessor: IAccessor, type: 'row' | 'col') {+ const univerInstanceService = accessor.get(IUniverInstanceService);++ const selectionManagerService = accessor.get(SelectionManagerService);+ const rangeProtectionRuleModel = accessor.get(RangeProtectionRuleModel);++ return selectionManagerService.selectionMoveEnd$.pipe(+ map(() => {+ const range = selectionManagerService.getLast()?.range;+ if (!range) return true;++ const workbook = univerInstanceService.getCurrentUnitForType<Workbook>(UniverInstanceType.UNIVER_SHEET)!;+ const worksheet = workbook.getActiveSheet();+ const unitId = workbook.getUnitId();+ const subUnitId = worksheet.getSheetId();++ const rowColRangeExpand = Tools.deepClone(range);+ if (type === 'row') {+ rowColRangeExpand.endRow = worksheet.getRowCount() - 1;+ } else {+ rowColRangeExpand.endColumn = worksheet.getColumnCount() - 1;+ }++ const permissionLapRanges = rangeProtectionRuleModel.getSubunitRuleList(unitId, subUnitId).reduce((acc, rule) => {+ return [...acc, ...rule.ranges];+ }, [] as IRange[]).filter((ruleRange) => Rectangle.intersects(ruleRange, rowColRangeExpand));++ return permissionLapRanges.some((ruleRange) => {+ const { startRow, startColumn, endRow, endColumn } = ruleRange;+ for (let row = startRow; row <= endRow; row++) {+ for (let col = startColumn; col <= endColumn; col++) {+ const permission = (worksheet.getCell(row, col) as (ICellDataForSheetInterceptor & { selectionProtection: ICellPermission[] }))?.selectionProtection?.[0];+ if (permission?.[UnitAction.Edit] === false) {+ return true;+ }+ }+ }+ return false;+ });+ })+ );+}++export function getWorkbookPermissionDisable$(accessor: IAccessor) {+ const univerInstanceService = accessor.get(IUniverInstanceService);+ const workbook = univerInstanceService.getCurrentUnitForType<Workbook>(UniverInstanceType.UNIVER_SHEET)!;+ const worksheetRuleModel = accessor.get(WorksheetProtectionRuleModel);+ const selectionRuleModel = accessor.get(RangeProtectionRuleModel);+ const permissionService = accessor.get(IPermissionService);+ const unitId = workbook.getUnitId();++ const activeSheet$ = workbook.activeSheet$;++ const userManagerService = accessor.get(UserManagerService);++ return combineLatest([userManagerService.currentUser$, activeSheet$]).pipe(+ switchMap(([_user, activeSheet]) => {+ if (!activeSheet) {+ return of(true);+ }+ const workbookEditable$ = permissionService.getPermissionPoint$(new WorkbookEditablePermission(unitId).id)?.pipe(map((permission) => permission.value)) ?? of(false);+ const workbookManageCollaboratorPermission$ = permissionService.getPermissionPoint$(new WorkbookManageCollaboratorPermission(unitId).id)?.pipe(map((permission) => permission.value)) ?? of(false);++ return combineLatest([workbookEditable$, workbookManageCollaboratorPermission$]).pipe(+ map(([editable, manageable]) => {+ if (!editable) {+ return true;+ }++ const subUnitId = activeSheet.getSheetId();+ const worksheetRule = worksheetRuleModel.getRule(unitId, subUnitId);+ const worksheetRuleList = selectionRuleModel.getSubunitRuleList(unitId, subUnitId);+ if (worksheetRule || worksheetRuleList.length) {+ return !manageable;+ }+ return false;+ })+ );+ })+ );+}diff --git a/packages/sheets-ui/src/controllers/menu/menu.ts b/packages/sheets-ui/src/controllers/menu/menu.tsindex bd674a0302..200c7125df 100644--- a/packages/sheets-ui/src/controllers/menu/menu.ts+++ b/packages/sheets-ui/src/controllers/menu/menu.ts@@ -34,7 +34,8 @@ import {} from '@univerjs/core';import { SetInlineFormatCommand, SetTextSelectionsOperation, TextSelectionManagerService } from '@univerjs/docs';import {- getCurrentSheetDisabled$,+ RangeProtectionPermissionEditPoint,+ RangeProtectionPermissionViewPoint,ResetBackgroundColorCommand,ResetTextColorCommand,SelectionManagerService,@@ -57,6 +58,14 @@ import {SetWorksheetColWidthMutation,SetWorksheetRowIsAutoHeightCommand,SetWorksheetRowIsAutoHeightMutation,+ WorkbookCopyPermission,+ WorkbookEditablePermission,+ WorksheetCopyPermission,+ WorksheetEditPermission,+ WorksheetSetCellStylePermission,+ WorksheetSetCellValuePermission,+ WorksheetSetColumnStylePermission,+ WorksheetSetRowStylePermission,} from '@univerjs/sheets';import type { IMenuButtonItem, IMenuSelectorItem } from '@univerjs/ui';@@ -73,7 +82,7 @@ import {PasteCommand,} from '@univerjs/ui';import type { IAccessor } from '@wendellhu/redi';-import { Observable } from 'rxjs';+import { combineLatestWith, map, Observable } from 'rxjs';import {SheetPasteBesidesBorderCommand,@@ -106,7 +115,7 @@ import { FONT_FAMILY_COMPONENT, FONT_FAMILY_ITEM_COMPONENT } from '../../componeimport { FONT_SIZE_COMPONENT } from '../../components/font-size';import { MENU_ITEM_INPUT_COMPONENT } from '../../components/menu-item-input';import { FormatPainterStatus, IFormatPainterService } from '../../services/format-painter/format-painter.service';-import { deriveStateFromActiveSheet$ } from './menu-util';+import { deriveStateFromActiveSheet$, getCurrentRangeDisable$ } from './menu-util';export enum SheetMenuPosition {ROW_HEADER_CONTEXT_MENU = 'rowHeaderContextMenu',@@ -141,7 +150,7 @@ export function FormatPainterMenuItemFactory(accessor: IAccessor): IMenuButtonIt};}),hidden$: getMenuHiddenObservable(accessor, UniverInstanceType.UNIVER_SHEET),- disabled$: getCurrentSheetDisabled$(accessor),+ disabled$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetCopyPermission, WorksheetEditPermission], rangeTypes: [RangeProtectionPermissionEditPoint] }),};}@@ -159,7 +168,7 @@ export function BoldMenuItemFactory(accessor: IAccessor): IMenuButtonItem {title: 'Set bold',tooltip: 'toolbar.bold',positions: [MenuPosition.TOOLBAR_START],- disabled$: getCurrentSheetDisabled$(accessor),+ disabled$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetEditPermission, WorksheetSetCellStylePermission], rangeTypes: [RangeProtectionPermissionEditPoint] }),activated$: deriveStateFromActiveSheet$(univerInstanceService, false, ({ worksheet }) => new Observable<boolean>((subscriber) => {const disposable = commandService.onCommandExecuted((c) => {const id = c.id;@@ -177,8 +186,8 @@ export function BoldMenuItemFactory(accessor: IAccessor): IMenuButtonItem {if ((id === SetTextSelectionsOperation.id || id === SetInlineFormatCommand.id) &&- contextService.getContextValue(EDITOR_ACTIVATED) &&- contextService.getContextValue(FOCUSING_SHEET)+ contextService.getContextValue(EDITOR_ACTIVATED) &&+ contextService.getContextValue(FOCUSING_SHEET)) {const textRun = getFontStyleAtCursor(accessor);if (textRun == null) {@@ -223,7 +232,7 @@ export function ItalicMenuItemFactory(accessor: IAccessor): IMenuButtonItem {title: 'Set italic',tooltip: 'toolbar.italic',positions: [MenuPosition.TOOLBAR_START],- disabled$: getCurrentSheetDisabled$(accessor),+ disabled$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetEditPermission, WorksheetSetCellStylePermission], rangeTypes: [RangeProtectionPermissionEditPoint] }),activated$: deriveStateFromActiveSheet$(univerInstanceService, false, ({ worksheet }) => new Observable<boolean>((subscriber) => {const disposable = commandService.onCommandExecuted((c) => {const id = c.id;@@ -240,8 +249,8 @@ export function ItalicMenuItemFactory(accessor: IAccessor): IMenuButtonItem {if ((id === SetTextSelectionsOperation.id || id === SetInlineFormatCommand.id) &&- contextService.getContextValue(EDITOR_ACTIVATED) &&- contextService.getContextValue(FOCUSING_SHEET)+ contextService.getContextValue(EDITOR_ACTIVATED) &&+ contextService.getContextValue(FOCUSING_SHEET)) {const textRun = getFontStyleAtCursor(accessor);if (textRun == null) return;@@ -279,7 +288,6 @@ export function UnderlineMenuItemFactory(accessor: IAccessor): IMenuButtonItem {title: 'Set underline',tooltip: 'toolbar.underline',positions: [MenuPosition.TOOLBAR_START],- disabled$: getCurrentSheetDisabled$(accessor),activated$: deriveStateFromActiveSheet$(univerInstanceService, false, ({ worksheet }) => new Observable<boolean>((subscriber) => {const disposable = commandService.onCommandExecuted((c) => {const id = c.id;@@ -296,8 +304,8 @@ export function UnderlineMenuItemFactory(accessor: IAccessor): IMenuButtonItem {if ((id === SetTextSelectionsOperation.id || id === SetInlineFormatCommand.id) &&- contextService.getContextValue(EDITOR_ACTIVATED) &&- contextService.getContextValue(FOCUSING_SHEET)+ contextService.getContextValue(EDITOR_ACTIVATED) &&+ contextService.getContextValue(FOCUSING_SHEET)) {const textRun = getFontStyleAtCursor(accessor);if (textRun == null) return;@@ -317,7 +325,7 @@ export function UnderlineMenuItemFactory(accessor: IAccessor): IMenuButtonItem {subscriber.next(!!(isUnderline && isUnderline.s));return disposable.dispose;})),-+ disabled$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetEditPermission, WorksheetSetCellStylePermission], rangeTypes: [RangeProtectionPermissionEditPoint] }),hidden$: getMenuHiddenObservable(accessor, UniverInstanceType.UNIVER_SHEET),};}@@ -336,7 +344,7 @@ export function StrikeThroughMenuItemFactory(accessor: IAccessor): IMenuButtonIttitle: 'Set strike through',tooltip: 'toolbar.strikethrough',positions: [MenuPosition.TOOLBAR_START],- disabled$: getCurrentSheetDisabled$(accessor),+ disabled$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetEditPermission, WorksheetSetCellStylePermission], rangeTypes: [RangeProtectionPermissionEditPoint] }),activated$: deriveStateFromActiveSheet$(univerInstanceService, false, ({ worksheet }) => new Observable<boolean>((subscriber) => {const disposable = commandService.onCommandExecuted((c) => {const id = c.id;@@ -353,8 +361,8 @@ export function StrikeThroughMenuItemFactory(accessor: IAccessor): IMenuButtonItif ((id === SetTextSelectionsOperation.id || id === SetInlineFormatCommand.id) &&- contextService.getContextValue(EDITOR_ACTIVATED) &&- contextService.getContextValue(FOCUSING_SHEET)+ contextService.getContextValue(EDITOR_ACTIVATED) &&+ contextService.getContextValue(FOCUSING_SHEET)) {const textRun = getFontStyleAtCursor(accessor);@@ -403,7 +411,8 @@ export function FontFamilySelectorMenuItemFactory(accessor: IAccessor): IMenuSel},value: item.value,})),- disabled$: getCurrentSheetDisabled$(accessor),++ disabled$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetEditPermission, WorksheetSetCellStylePermission], rangeTypes: [RangeProtectionPermissionEditPoint] }),value$: deriveStateFromActiveSheet$(univerInstanceService, defaultValue, ({ worksheet }) => new Observable((subscriber) => {const disposable = commandService.onCommandExecuted((c) => {const id = c.id;@@ -440,9 +449,9 @@ export function FontSizeSelectorMenuItemFactory(accessor: IAccessor): IMenuSelecconst univerInstanceService = accessor.get(IUniverInstanceService);const selectionManagerService = accessor.get(SelectionManagerService);const contextService = accessor.get(IContextService);- const disabled$ = getCurrentSheetDisabled$(accessor);const defaultValue = DEFAULT_STYLES.fs;+ const disabled$ = getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetEditPermission, WorksheetSetCellStylePermission], rangeTypes: [RangeProtectionPermissionEditPoint] });return {id: SetRangeFontSizeCommand.id,@@ -510,7 +519,7 @@ export function ResetTextColorMenuItemFactory(accessor: IAccessor): IMenuButtonItitle: 'toolbar.resetColor',icon: 'NoColor',positions: SetRangeTextColorCommand.id,- disabled$: getCurrentSheetDisabled$(accessor),+ disabled$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetEditPermission, WorksheetSetCellStylePermission], rangeTypes: [RangeProtectionPermissionEditPoint] }),};}@@ -547,7 +556,7 @@ export function TextColorSelectorMenuItemFactory(accessor: IAccessor): IMenuSelereturn disposable.dispose;}),hidden$: getMenuHiddenObservable(accessor, UniverInstanceType.UNIVER_SHEET),- disabled$: getCurrentSheetDisabled$(accessor),+ disabled$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetEditPermission, WorksheetSetCellStylePermission], rangeTypes: [RangeProtectionPermissionEditPoint] }),};}@@ -558,7 +567,7 @@ export function ResetBackgroundColorMenuItemFactory(accessor: IAccessor): IMenuBtitle: 'toolbar.resetColor',icon: 'NoColor',positions: SetBackgroundColorCommand.id,- disabled$: getCurrentSheetDisabled$(accessor),+ disabled$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetEditPermission, WorksheetSetCellStylePermission], rangeTypes: [RangeProtectionPermissionEditPoint] }),};}@@ -594,7 +603,7 @@ export function BackgroundColorSelectorMenuItemFactory(accessor: IAccessor): IMereturn disposable.dispose;}),hidden$: getMenuHiddenObservable(accessor, UniverInstanceType.UNIVER_SHEET),- disabled$: getCurrentSheetDisabled$(accessor),+ disabled$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetEditPermission, WorksheetSetCellStylePermission], rangeTypes: [RangeProtectionPermissionEditPoint] }),};}@@ -659,7 +668,7 @@ export function HorizontalAlignMenuItemFactory(accessor: IAccessor): IMenuSelectreturn disposable.dispose;})),hidden$: getMenuHiddenObservable(accessor, UniverInstanceType.UNIVER_SHEET),- disabled$: getCurrentSheetDisabled$(accessor),+ disabled$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetEditPermission, WorksheetSetCellStylePermission], rangeTypes: [RangeProtectionPermissionEditPoint] }),};}@@ -724,7 +733,7 @@ export function VerticalAlignMenuItemFactory(accessor: IAccessor): IMenuSelectorreturn disposable.dispose;})),hidden$: getMenuHiddenObservable(accessor, UniverInstanceType.UNIVER_SHEET),- disabled$: getCurrentSheetDisabled$(accessor),+ disabled$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetEditPermission, WorksheetSetCellStylePermission], rangeTypes: [RangeProtectionPermissionEditPoint] }),};}@@ -789,7 +798,7 @@ export function WrapTextMenuItemFactory(accessor: IAccessor): IMenuSelectorItem<return disposable.dispose;})),hidden$: getMenuHiddenObservable(accessor, UniverInstanceType.UNIVER_SHEET),- disabled$: getCurrentSheetDisabled$(accessor),+ disabled$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetEditPermission, WorksheetSetCellStylePermission], rangeTypes: [RangeProtectionPermissionEditPoint] }),};}@@ -877,7 +886,7 @@ export function TextRotateMenuItemFactory(accessor: IAccessor): IMenuSelectorItereturn disposable.dispose;})),hidden$: getMenuHiddenObservable(accessor, UniverInstanceType.UNIVER_SHEET),- disabled$: getCurrentSheetDisabled$(accessor),+ disabled$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetEditPermission, WorksheetSetCellStylePermission], rangeTypes: [RangeProtectionPermissionEditPoint] }),};}@@ -885,7 +894,8 @@ export function TextRotateMenuItemFactory(accessor: IAccessor): IMenuSelectorIte// TODO@wzhudev: maybe we should move these menu factory to @univerjs/uifunction menuClipboardDisabledObservable(injector: IAccessor): Observable<boolean> {- return new Observable((subscriber) => subscriber.next(!injector.get(IClipboardInterfaceService).supportClipboard));+ const clipboardDisabled$: Observable<boolean> = new Observable((subscriber) => subscriber.next(!injector.get(IClipboardInterfaceService).supportClipboard));+ return clipboardDisabled$;}export function CopyMenuItemFactory(accessor: IAccessor): IMenuButtonItem {@@ -900,6 +910,7 @@ export function CopyMenuItemFactory(accessor: IAccessor): IMenuButtonItem {SheetMenuPosition.COL_HEADER_CONTEXT_MENU,SheetMenuPosition.ROW_HEADER_CONTEXT_MENU,],+ disabled$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookCopyPermission], worksheetTypes: [WorksheetCopyPermission], rangeTypes: [RangeProtectionPermissionViewPoint] }),};}@@ -914,6 +925,7 @@ export function CutMenuItemFactory(accessor: IAccessor): IMenuButtonItem {SheetMenuPosition.COL_HEADER_CONTEXT_MENU,SheetMenuPosition.ROW_HEADER_CONTEXT_MENU,],+ disabled$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], rangeTypes: [RangeProtectionPermissionEditPoint], worksheetTypes: [WorksheetCopyPermission, WorksheetEditPermission] }),};}@@ -924,7 +936,10 @@ export function PasteMenuItemFactory(accessor: IAccessor): IMenuButtonItem {type: MenuItemType.BUTTON,title: 'rightClick.paste',icon: 'PasteSpecial',- disabled$: menuClipboardDisabledObservable(accessor),+ disabled$: menuClipboardDisabledObservable(accessor).pipe(+ combineLatestWith(getCurrentRangeDisable$(accessor, { rangeTypes: [RangeProtectionPermissionEditPoint], worksheetTypes: [WorksheetEditPermission, WorksheetSetCellStylePermission, WorksheetSetCellValuePermission], workbookTypes: [WorkbookEditablePermission] })),+ map(([d1, d2]) => d1 || d2)+ ),positions: [MenuPosition.CONTEXT_MENU,SheetMenuPosition.COL_HEADER_CONTEXT_MENU,@@ -941,7 +956,6 @@ export function PasteSpacialMenuItemFactory(accessor: IAccessor): IMenuSelectorItype: MenuItemType.SUBITEMS,icon: 'PasteSpecial',title: 'rightClick.pasteSpecial',- disabled$: menuClipboardDisabledObservable(accessor),positions: [MenuPosition.CONTEXT_MENU,SheetMenuPosition.COL_HEADER_CONTEXT_MENU,@@ -956,7 +970,10 @@ export function PasteValueMenuItemFactory(accessor: IAccessor): IMenuButtonItem<type: MenuItemType.BUTTON,title: 'rightClick.pasteValue',positions: [PASTE_SPECIAL_MENU_ID],- disabled$: menuClipboardDisabledObservable(accessor),+ disabled$: menuClipboardDisabledObservable(accessor).pipe(+ combineLatestWith(getCurrentRangeDisable$(accessor, { rangeTypes: [RangeProtectionPermissionEditPoint], worksheetTypes: [WorksheetSetCellValuePermission, WorksheetEditPermission], workbookTypes: [WorkbookEditablePermission] })),+ map(([d1, d2]) => d1 || d2)+ ),};}@@ -966,7 +983,10 @@ export function PasteFormatMenuItemFactory(accessor: IAccessor): IMenuButtonItemtype: MenuItemType.BUTTON,title: 'rightClick.pasteFormat',positions: [PASTE_SPECIAL_MENU_ID],- disabled$: menuClipboardDisabledObservable(accessor),+ disabled$: menuClipboardDisabledObservable(accessor).pipe(+ combineLatestWith(getCurrentRangeDisable$(accessor, { rangeTypes: [RangeProtectionPermissionEditPoint], worksheetTypes: [WorksheetSetCellStylePermission, WorksheetEditPermission], workbookTypes: [WorkbookEditablePermission] })),+ map(([d1, d2]) => d1 || d2)+ ),};}@@ -976,7 +996,10 @@ export function PasteColWidthMenuItemFactory(accessor: IAccessor): IMenuButtonIttype: MenuItemType.BUTTON,title: 'rightClick.pasteColWidth',positions: [PASTE_SPECIAL_MENU_ID],- disabled$: menuClipboardDisabledObservable(accessor),+ disabled$: menuClipboardDisabledObservable(accessor).pipe(+ combineLatestWith(getCurrentRangeDisable$(accessor, { rangeTypes: [RangeProtectionPermissionEditPoint], worksheetTypes: [WorksheetSetColumnStylePermission, WorksheetEditPermission], workbookTypes: [WorkbookEditablePermission] })),+ map(([d1, d2]) => d1 || d2)+ ),};}@@ -986,7 +1009,10 @@ export function PasteBesidesBorderMenuItemFactory(accessor: IAccessor): IMenuButtype: MenuItemType.BUTTON,title: 'rightClick.pasteBesidesBorder',positions: [PASTE_SPECIAL_MENU_ID],- disabled$: menuClipboardDisabledObservable(accessor),+ disabled$: menuClipboardDisabledObservable(accessor).pipe(+ combineLatestWith(getCurrentRangeDisable$(accessor, { rangeTypes: [RangeProtectionPermissionEditPoint], worksheetTypes: [WorksheetEditPermission, WorksheetSetCellStylePermission, WorksheetSetCellValuePermission, WorksheetSetRowStylePermission, WorksheetSetColumnStylePermission], workbookTypes: [WorkbookEditablePermission] })),+ map(([d1, d2]) => d1 || d2)+ ),};}@@ -998,6 +1024,7 @@ export function FitContentMenuItemFactory(accessor: IAccessor): IMenuButtonItempositions: [SheetMenuPosition.ROW_HEADER_CONTEXT_MENU],icon: 'AutoHeight',title: 'rightClick.fitContent',+ disabled$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetSetRowStylePermission, WorksheetEditPermission], rangeTypes: [RangeProtectionPermissionEditPoint] }),};}@@ -1034,6 +1061,7 @@ export function FrozenMenuItemFactory(accessor: IAccessor): IMenuButtonItem {positions: [SHEET_FROZEN_MENU_ID, SHEET_FROZEN_HEADER_MENU_ID],title: 'rightClick.freeze',icon: 'FreezeToSelectedSingle',+ disabled$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetEditPermission], rangeTypes: [RangeProtectionPermissionEditPoint] }),};}@@ -1044,6 +1072,8 @@ export function FrozenRowMenuItemFactory(accessor: IAccessor): IMenuButtonItem {positions: [SHEET_FROZEN_MENU_ID],title: 'rightClick.freezeRow',icon: 'FreezeRowSingle',+ disabled$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetEditPermission], rangeTypes: [RangeProtectionPermissionEditPoint] }),+};}@@ -1054,6 +1084,8 @@ export function FrozenColMenuItemFactory(accessor: IAccessor): IMenuButtonItem {positions: [SHEET_FROZEN_MENU_ID],title: 'rightClick.freezeCol',icon: 'FreezeColumnSingle',+ disabled$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetEditPermission], rangeTypes: [RangeProtectionPermissionEditPoint] }),+};}@@ -1064,6 +1096,8 @@ export function CancelFrozenMenuItemFactory(accessor: IAccessor): IMenuButtonItepositions: [SHEET_FROZEN_MENU_ID, SHEET_FROZEN_HEADER_MENU_ID],title: 'rightClick.cancelFreeze',icon: 'CancelFreezeSingle',+ disabled$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetEditPermission], rangeTypes: [RangeProtectionPermissionEditPoint] }),+};}@@ -1075,6 +1109,7 @@ export function HideRowMenuItemFactory(accessor: IAccessor): IMenuButtonItem {positions: [SheetMenuPosition.ROW_HEADER_CONTEXT_MENU],icon: 'Hide',title: 'rightClick.hideSelectedRow',+ disabled$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetSetRowStylePermission, WorksheetEditPermission], rangeTypes: [RangeProtectionPermissionEditPoint] }),};}@@ -1086,6 +1121,7 @@ export function HideColMenuItemFactory(accessor: IAccessor): IMenuButtonItem {positions: [SheetMenuPosition.COL_HEADER_CONTEXT_MENU],icon: 'Hide',title: 'rightClick.hideSelectedColumn',+ disabled$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetEditPermission, WorksheetSetColumnStylePermission], rangeTypes: [RangeProtectionPermissionEditPoint] }),};}@@ -1123,6 +1159,7 @@ export function ShowRowMenuItemFactory(accessor: IAccessor): IMenuButtonItem {subscriber.next(!hasHiddenRowsInSelections());return () => disposable.dispose();})),+ disabled$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetEditPermission, WorksheetSetRowStylePermission], rangeTypes: [RangeProtectionPermissionEditPoint] }),};}@@ -1159,6 +1196,7 @@ export function ShowColMenuItemFactory(accessor: IAccessor): IMenuButtonItem {subscriber.next(!hasHiddenColsInSelections());return () => disposable.dispose();})),+ disabled$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetSetColumnStylePermission, WorksheetEditPermission], rangeTypes: [RangeProtectionPermissionEditPoint] }),};}@@ -1201,6 +1239,7 @@ export function SetRowHeightMenuItemFactory(accessor: IAccessor): IMenuButtonIteupdate();return disposable.dispose;})),+ hidden$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetEditPermission, WorksheetSetRowStylePermission], rangeTypes: [RangeProtectionPermissionEditPoint] }),};}@@ -1247,6 +1286,7 @@ export function SetColWidthMenuItemFactory(accessor: IAccessor): IMenuButtonItemupdate();return disposable.dispose;})),+ hidden$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetEditPermission, WorksheetSetColumnStylePermission], rangeTypes: [RangeProtectionPermissionEditPoint] }),};}diff --git a/packages/sheets-ui/src/controllers/menu/merge.menu.ts b/packages/sheets-ui/src/controllers/menu/merge.menu.tsindex 133c05b54d..6ede837c05 100644--- a/packages/sheets-ui/src/controllers/menu/merge.menu.ts+++ b/packages/sheets-ui/src/controllers/menu/merge.menu.ts@@ -15,7 +15,7 @@*/import { UniverInstanceType } from '@univerjs/core';-import { getCurrentSheetDisabled$, RemoveWorksheetMergeCommand } from '@univerjs/sheets';+import { RangeProtectionPermissionEditPoint, RemoveWorksheetMergeCommand, WorkbookEditablePermission, WorksheetEditPermission, WorksheetSetCellStylePermission, WorksheetSetCellValuePermission } from '@univerjs/sheets';import type { IMenuButtonItem, IMenuSelectorItem } from '@univerjs/ui';import { getMenuHiddenObservable, MenuGroup, MenuItemType, MenuPosition } from '@univerjs/ui';import type { IAccessor } from '@wendellhu/redi';@@ -28,9 +28,10 @@ import {AddWorksheetMergeVerticalCommand,} from '../../commands/commands/add-worksheet-merge.command';import { getSheetSelectionsDisabled$ } from '../utils/selections-tools';+import { getCurrentRangeDisable$ } from './menu-util';export function CellMergeMenuItemFactory(accessor: IAccessor): IMenuSelectorItem<string> {- const disabled$ = getCurrentSheetDisabled$(accessor);+ const editDisabled$ = getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetEditPermission, WorksheetSetCellValuePermission, WorksheetSetCellStylePermission], rangeTypes: [RangeProtectionPermissionEditPoint] });const selectionsHasCross$ = getSheetSelectionsDisabled$(accessor);return {@@ -42,7 +43,7 @@ export function CellMergeMenuItemFactory(accessor: IAccessor): IMenuSelectorItemtype: MenuItemType.SUBITEMS,// selections: [...MERGE_CHILDREN],hidden$: getMenuHiddenObservable(accessor, UniverInstanceType.UNIVER_SHEET),- disabled$: disabled$.pipe(+ disabled$: editDisabled$.pipe(combineLatestWith(selectionsHasCross$),map(([disable, hasCross]) => disable || hasCross)),diff --git a/packages/sheets-ui/src/controllers/menu/sheet.menu.ts b/packages/sheets-ui/src/controllers/menu/sheet.menu.tsindex 0f29178209..9a0b9c3e38 100644--- a/packages/sheets-ui/src/controllers/menu/sheet.menu.ts+++ b/packages/sheets-ui/src/controllers/menu/sheet.menu.ts@@ -24,47 +24,60 @@ import {SetWorksheetHideCommand,SetWorksheetHideMutation,SetWorksheetShowCommand,+ WorkbookPermissionService,+ WorksheetProtectionRuleModel,} from '@univerjs/sheets';import type { IMenuButtonItem, IMenuSelectorItem } from '@univerjs/ui';import { MenuItemType } from '@univerjs/ui';import type { IAccessor } from '@wendellhu/redi';-import { Observable } from 'rxjs';+import { combineLatest, combineLatestWith, map, Observable } from 'rxjs';import { RemoveSheetConfirmCommand } from '../../commands/commands/remove-sheet-confirm.command';import { ShowMenuListCommand } from '../../commands/commands/unhide.command';import { RenameSheetOperation } from '../../commands/operations/rename-sheet.operation';import { COLOR_PICKER_COMPONENT } from '../../components/color-picker';import { SheetMenuPosition } from './menu';+import { getWorkbookPermissionDisable$ } from './menu-util';export function DeleteSheetMenuItemFactory(accessor: IAccessor): IMenuButtonItem {const univerInstanceService = accessor.get(IUniverInstanceService);const commandService = accessor.get(ICommandService);+ const workbookPermissionService = accessor.get(WorkbookPermissionService);+ const worksheetRuleModel = accessor.get(WorksheetProtectionRuleModel);+ const workbook = univerInstanceService.getCurrentUnitForType<Workbook>(UniverInstanceType.UNIVER_SHEET)!;+ const unitId = workbook.getUnitId();+ const defaultDisable$ = new Observable<boolean>((subscriber) => {+ const disposable = commandService.onCommandExecuted((c) => {+ const id = c.id;+ if (+ id === RemoveSheetMutation.id ||+ id === InsertSheetMutation.id ||+ id === SetWorksheetHideMutation.id+ ) {+ const worksheets = univerInstanceService.getCurrentUnitForType<Workbook>(UniverInstanceType.UNIVER_SHEET)!.getWorksheets();+ // loop through all worksheets Map to see if there is more than one visible sheet+ const visibleSheets = Array.from(worksheets.values()).filter(+ (sheet) => sheet.getConfig().hidden === BooleanNumber.FALSE+ );++ subscriber.next(visibleSheets.length === 1);+ }+ });+ subscriber.next(false);+ return disposable.dispose;+ });+ const permissionDisable$ = getWorkbookPermissionDisable$(accessor);return {id: RemoveSheetConfirmCommand.id,type: MenuItemType.BUTTON,positions: [SheetMenuPosition.SHEET_BAR],title: 'sheetConfig.delete',- disabled$: new Observable<boolean>((subscriber) => {- const disposable = commandService.onCommandExecuted((c) => {- const id = c.id;- if (- id === RemoveSheetMutation.id ||- id === InsertSheetMutation.id ||- id === SetWorksheetHideMutation.id- ) {- const worksheets = univerInstanceService.getCurrentUnitForType<Workbook>(UniverInstanceType.UNIVER_SHEET)!.getWorksheets();- // loop through all worksheets Map to see if there is more than one visible sheet- const visibleSheets = Array.from(worksheets.values()).filter(- (sheet) => sheet.getConfig().hidden === BooleanNumber.FALSE- );-- subscriber.next(visibleSheets.length === 1);- }- });- subscriber.next(false);- return disposable.dispose;- }),+ disabled$: combineLatest([defaultDisable$, permissionDisable$]).pipe(+ map(([defaultDisabled, permissionDisabled]) => {+ return defaultDisabled || permissionDisabled;+ })+ ),};}@@ -74,6 +87,7 @@ export function CopySheetMenuItemFactory(accessor: IAccessor): IMenuButtonItem {type: MenuItemType.BUTTON,positions: [SheetMenuPosition.SHEET_BAR],title: 'sheetConfig.copy',+ disabled$: getWorkbookPermissionDisable$(accessor),};}@@ -83,6 +97,7 @@ export function RenameSheetMenuItemFactory(accessor: IAccessor): IMenuButtonItemtype: MenuItemType.BUTTON,positions: [SheetMenuPosition.SHEET_BAR],title: 'sheetConfig.rename',+ disabled$: getWorkbookPermissionDisable$(accessor),};}@@ -100,6 +115,7 @@ export function ChangeColorSheetMenuItemFactory(accessor: IAccessor): IMenuSelec},},],+ hidden$: getWorkbookPermissionDisable$(accessor),};}@@ -131,7 +147,10 @@ export function HideSheetMenuItemFactory(accessor: IAccessor): IMenuButtonItem {});subscriber.next(false);return disposable.dispose;- }),+ }).pipe(+ combineLatestWith(getWorkbookPermissionDisable$(accessor)),+ map(([defaultDisabled, permissionDisabled]) => defaultDisabled || permissionDisabled)+ ),};}@@ -145,22 +164,27 @@ export function UnHideSheetMenuItemFactory(accessor: IAccessor): IMenuSelectorItvalue: s,}));+ const defaultDisable$: Observable<boolean> = new Observable((subscriber) => {+ const disposable = commandService.onCommandExecuted((c) => {+ if (c.id !== SetWorksheetHideCommand.id && c.id !== SetWorksheetShowCommand.id) {+ return;+ }+ const newList = workbook.getHiddenWorksheets();+ const isEmpty = newList.length === 0;+ subscriber.next(isEmpty);+ });+ subscriber.next(hiddenList.length === 0);+ return disposable.dispose;+ });return {id: SetWorksheetShowCommand.id,type: MenuItemType.SELECTOR,positions: [SheetMenuPosition.SHEET_BAR],title: 'sheetConfig.unhide',- disabled$: new Observable((subscriber) => {- const disposable = commandService.onCommandExecuted((c) => {- if (c.id !== SetWorksheetHideCommand.id && c.id !== SetWorksheetShowCommand.id) {- return;- }- const newList = workbook.getHiddenWorksheets();- subscriber.next(newList.length === 0);- });- subscriber.next(hiddenList.length === 0);- return disposable.dispose;- }),+ disabled$: defaultDisable$.pipe(+ combineLatestWith(getWorkbookPermissionDisable$(accessor)),+ map(([defaultDisabled, permissionDisabled]) => defaultDisabled || permissionDisabled)+ ),selections: new Observable((subscriber) => {const disposable = commandService.onCommandExecuted((c) => {if (c.id !== SetWorksheetHideCommand.id && c.id !== SetWorksheetShowCommand.id) {@@ -204,6 +228,9 @@ export function ShowMenuItemFactory(accessor: IAccessor): IMenuButtonItem {});subscriber.next(false);return disposable.dispose;- }),+ }).pipe(+ combineLatestWith(getWorkbookPermissionDisable$(accessor)),+ map(([defaultDisabled, permissionDisabled]) => defaultDisabled || permissionDisabled+ )),};}diff --git a/packages/sheets-ui/src/controllers/render-controllers/freeze.render-controller.ts b/packages/sheets-ui/src/controllers/render-controllers/freeze.render-controller.tsindex 7c27b69c9f..50b1fced30 100644--- a/packages/sheets-ui/src/controllers/render-controllers/freeze.render-controller.ts+++ b/packages/sheets-ui/src/controllers/render-controllers/freeze.render-controller.ts@@ -17,8 +17,10 @@import type { ICommandInfo, IFreeze, IRange, IStyleSheet, IWorksheetData, Nullable, Observer, Workbook } from '@univerjs/core';import {ColorKit,+ createInterceptorKey,Disposable,ICommandService,+ InterceptorManager,RANGE_TYPE,ThemeService,toDisposable,@@ -94,6 +96,8 @@ const FREEZE_SIZE_NORMAL = 2;const AUXILIARY_CLICK_HIDDEN_OBJECT_TRANSPARENCY = 0.01;+export const FREEZE_PERMISSION_CHECK = createInterceptorKey<boolean, null>('freezePermissionCheck');+export class HeaderFreezeRenderController extends Disposable implements IRenderController {private _rowFreezeHeaderRect: Nullable<Rect>;@@ -133,6 +137,8 @@ export class HeaderFreezeRenderController extends Disposable implements IRenderCprivate _lastFreeze: IFreeze | undefined = undefined;+ public interceptor = new InterceptorManager({ FREEZE_PERMISSION_CHECK });+constructor(private readonly _context: IRenderContext<Workbook>,@Inject(SheetSkeletonManagerService) private readonly _sheetSkeletonManagerService: SheetSkeletonManagerService,@@ -303,6 +309,10 @@ export class HeaderFreezeRenderController extends Disposable implements IRenderCthis._freezeMoveObservers.push(freezeObjectHeaderRect?.onPointerEnterObserver.add(() => {+ const permissionCheck = this.interceptor.fetchThroughInterceptors(FREEZE_PERMISSION_CHECK)(null, null);+ if (!permissionCheck) {+ return false;+ }freezeObjectHeaderRect?.setProps({fill: this._freezeHoverColor,zIndex: 4,@@ -313,6 +323,10 @@ export class HeaderFreezeRenderController extends Disposable implements IRenderCthis._freezeMoveObservers.push(freezeObjectMainRect?.onPointerEnterObserver.add(() => {+ const permissionCheck = this.interceptor.fetchThroughInterceptors(FREEZE_PERMISSION_CHECK)(null, null);+ if (!permissionCheck) {+ return false;+ }freezeObjectHeaderRect?.setProps({fill: this._freezeHoverColor,zIndex: 4,@@ -421,6 +435,11 @@ export class HeaderFreezeRenderController extends Disposable implements IRenderCreturn;}+ const permissionCheck = this.interceptor.fetchThroughInterceptors(FREEZE_PERMISSION_CHECK)(null, null);+ if (!permissionCheck) {+ return false;+ }+const { scene } = sheetObject;scene.setCursor(CURSOR_TYPE.GRABBING);@@ -447,6 +466,12 @@ export class HeaderFreezeRenderController extends Disposable implements IRenderCactiveViewport || undefined,true);++ const permissionCheck = this.interceptor.fetchThroughInterceptors(FREEZE_PERMISSION_CHECK)(null, null);+ if (!permissionCheck) {+ return false;+ }+scene.setCursor(CURSOR_TYPE.GRABBING);const FREEZE_SIZE = FREEZE_SIZE_NORMAL / Math.max(scene.scaleX, scene.scaleY);diff --git a/packages/sheets-ui/src/controllers/render-controllers/header-move.render-controller.ts b/packages/sheets-ui/src/controllers/render-controllers/header-move.render-controller.tsindex f76424d03f..8ef4539e97 100644--- a/packages/sheets-ui/src/controllers/render-controllers/header-move.render-controller.ts+++ b/packages/sheets-ui/src/controllers/render-controllers/header-move.render-controller.ts@@ -14,10 +14,12 @@* limitations under the License.*/-import type { Nullable, Observer, Workbook } from '@univerjs/core';+import type { IRange, Nullable, Observer, Workbook } from '@univerjs/core';import {+ createInterceptorKey,Disposable,ICommandService,+ InterceptorManager,RANGE_TYPE,} from '@univerjs/core';import type { IMouseEvent, IPointerEvent, IRenderContext, IRenderController, SpreadsheetColumnHeader, SpreadsheetHeader } from '@univerjs/engine-render';@@ -57,6 +59,8 @@ enum HEADER_MOVE_TYPE {COLUMN,}+export const HEADER_MOVE_PERMISSION_CHECK = createInterceptorKey<boolean, IRange>('headerMovePermissionCheck');+export class HeaderMoveRenderController extends Disposable implements IRenderController {private _startOffsetX: number = Number.NEGATIVE_INFINITY;@@ -86,6 +90,8 @@ export class HeaderMoveRenderController extends Disposable implements IRenderConprivate _changeToRow = -1;+ public interceptor = new InterceptorManager({ HEADER_MOVE_PERMISSION_CHECK });+override dispose(): void {this._moveHelperBackgroundShape?.dispose();this._moveHelperLineShape?.dispose();@@ -127,6 +133,7 @@ export class HeaderMoveRenderController extends Disposable implements IRenderConthis._initialRowOrColumn(HEADER_MOVE_TYPE.COLUMN);}+ // eslint-disable-next-line max-lines-per-functionprivate _initialRowOrColumn(initialType: HEADER_MOVE_TYPE = HEADER_MOVE_TYPE.ROW) {const spreadsheetColumnHeader = this._context.components.get(SHEET_VIEW_KEY.COLUMN) as SpreadsheetColumnHeader;const spreadsheetRowHeader = this._context.components.get(SHEET_VIEW_KEY.ROW) as SpreadsheetHeader;@@ -141,6 +148,15 @@ export class HeaderMoveRenderController extends Disposable implements IRenderConreturn;}+ const selectionRange = this._selectionManagerService.getLast()?.range;+ if (!selectionRange) return;++ const permissionCheck = this.interceptor.fetchThroughInterceptors(HEADER_MOVE_PERMISSION_CHECK)(false, selectionRange);++ if (!permissionCheck) {+ return;+ }+const { row, column } = getCoordByOffset(evt.offsetX, evt.offsetY, scene, skeleton);const matchSelectionData = this._checkInHeaderRange(@@ -170,12 +186,22 @@ export class HeaderMoveRenderController extends Disposable implements IRenderCon);this._rowOrColumnDownObservers.push(+ // eslint-disable-next-line max-lines-per-functioneventBindingObject?.onPointerDownObserver.add((evt: IPointerEvent | IMouseEvent) => {const skeleton = this._sheetSkeletonManagerService.getCurrent()?.skeleton;if (skeleton == null) {return;}+ const selectionRange = this._selectionManagerService.getLast()?.range;+ if (!selectionRange) return;++ const permissionCheck = this.interceptor.fetchThroughInterceptors(HEADER_MOVE_PERMISSION_CHECK)(false, selectionRange);++ if (!permissionCheck) {+ return;+ }+const { offsetX: evtOffsetX, offsetY: evtOffsetY } = evt;const relativeCoords = scene.getRelativeCoord(Vector2.FromArray([evtOffsetX, evtOffsetY]));diff --git a/packages/sheets-ui/src/controllers/render-controllers/header-resize.render-controller.ts b/packages/sheets-ui/src/controllers/render-controllers/header-resize.render-controller.tsindex b998850d11..d1881cc3be 100644--- a/packages/sheets-ui/src/controllers/render-controllers/header-resize.render-controller.ts+++ b/packages/sheets-ui/src/controllers/render-controllers/header-resize.render-controller.ts@@ -18,8 +18,10 @@import type { Nullable, Observer, Workbook } from '@univerjs/core';import {+ createInterceptorKey,Disposable,ICommandService,+ InterceptorManager,toDisposable,} from '@univerjs/core';import type { IMouseEvent, IPointerEvent, IRenderContext, IRenderController, SpreadsheetColumnHeader, SpreadsheetHeader } from '@univerjs/engine-render';@@ -59,6 +61,8 @@ enum HEADER_RESIZE_TYPE {COLUMN,}+export const HEADER_RESIZE_PERMISSION_CHECK = createInterceptorKey<boolean, { row?: number; col?: number }>('headerResizePermissionCheck');+export class HeaderResizeRenderController extends Disposable implements IRenderController {private _currentRow: number = 0;@@ -80,6 +84,8 @@ export class HeaderResizeRenderController extends Disposable implements IRenderCprivate _startOffsetY: number = Number.POSITIVE_INFINITY;+ public interceptor = new InterceptorManager({ HEADER_RESIZE_PERMISSION_CHECK });+constructor(private readonly _context: IRenderContext<Workbook>,@Inject(SheetSkeletonManagerService) private readonly _sheetSkeletonManagerService: SheetSkeletonManagerService,@@ -191,6 +197,11 @@ export class HeaderResizeRenderController extends Disposable implements IRenderCreturn;}+ const permissionCheck = this.interceptor.fetchThroughInterceptors(HEADER_RESIZE_PERMISSION_CHECK)(null, { row: this._currentRow });+ if (!permissionCheck) {+ return false;+ }+const rowSize = rowHeaderWidth / 3;this._rowResizeRect.transformByState({@@ -225,6 +236,12 @@ export class HeaderResizeRenderController extends Disposable implements IRenderCif (this._currentColumn === -1) {return;}++ const permissionCheck = this.interceptor.fetchThroughInterceptors(HEADER_RESIZE_PERMISSION_CHECK)(null, { col: this._currentColumn });+ if (!permissionCheck) {+ return false;+ }+// TODO: @jocs remove magic number.const columnSize = columnHeaderHeight * 0.7;diff --git a/packages/sheets-ui/src/controllers/sheet-ui.controller.ts b/packages/sheets-ui/src/controllers/sheet-ui.controller.tsindex 97a3499307..444fb6ab04 100644--- a/packages/sheets-ui/src/controllers/sheet-ui.controller.ts+++ b/packages/sheets-ui/src/controllers/sheet-ui.controller.ts@@ -100,7 +100,7 @@ import { DEFINED_NAME_CONTAINER } from '../views/defined-name/component-name';import { DefinedNameContainer } from '../views/defined-name/DefinedNameContainer';import { SidebarDefinedNameOperation } from '../commands/operations/sidebar-defined-name.operation';import { AutoClearContentCommand, AutoFillCommand } from '../commands/commands/auto-fill.command';-import { CellBorderSelectorMenuItemFactory } from './menu/border.menu';+import {ClearSelectionAllMenuItemFactory,ClearSelectionContentMenuItemFactory,@@ -162,13 +162,7 @@ import {VerticalAlignMenuItemFactory,WrapTextMenuItemFactory,} from './menu/menu';-import {- CellMergeAllMenuItemFactory,- CellMergeCancelMenuItemFactory,- CellMergeHorizontalMenuItemFactory,- CellMergeMenuItemFactory,- CellMergeVerticalMenuItemFactory,-} from './menu/merge.menu';+import {ChangeColorSheetMenuItemFactory,CopySheetMenuItemFactory,@@ -227,6 +221,8 @@ import {ZoomInShortcutItem,ZoomOutShortcutItem,} from './shortcuts/view.shortcut';+import { CellBorderSelectorMenuItemFactory } from './menu/border.menu';+import { CellMergeAllMenuItemFactory, CellMergeCancelMenuItemFactory, CellMergeHorizontalMenuItemFactory, CellMergeMenuItemFactory, CellMergeVerticalMenuItemFactory } from './menu/merge.menu';export interface IUniverSheetsUIConfig {menu: MenuConfig;diff --git a/packages/sheets-ui/src/controllers/utils/cell-tools.ts b/packages/sheets-ui/src/controllers/utils/cell-tools.tsindex ab80d7d54e..b4afe00488 100644--- a/packages/sheets-ui/src/controllers/utils/cell-tools.ts+++ b/packages/sheets-ui/src/controllers/utils/cell-tools.ts@@ -21,3 +21,4 @@ export function isForceString(str: string): boolean {export function extractStringFromForceString(str: string): string {return str.slice(1);}+diff --git a/packages/sheets-ui/src/controllers/utils/selections-tools.ts b/packages/sheets-ui/src/controllers/utils/selections-tools.tsindex d290cdfb82..960bb62916 100644--- a/packages/sheets-ui/src/controllers/utils/selections-tools.ts+++ b/packages/sheets-ui/src/controllers/utils/selections-tools.ts@@ -14,21 +14,41 @@* limitations under the License.*/-import { Rectangle } from '@univerjs/core';-import { SelectionManagerService } from '@univerjs/sheets';+import type { Workbook } from '@univerjs/core';+import { IUniverInstanceService, Rectangle, UniverInstanceType } from '@univerjs/core';+import { RangeProtectionRuleModel, SelectionManagerService } from '@univerjs/sheets';import type { IAccessor } from '@wendellhu/redi';-import { filter, map } from 'rxjs';+import { combineLatest, map } from 'rxjs';export function getSheetSelectionsDisabled$(accessor: IAccessor) {const selectionManagerService = accessor.get(SelectionManagerService);+ const rangeProtectionRuleModel = accessor.get(RangeProtectionRuleModel);+ const univerInstanceService = accessor.get(IUniverInstanceService);+ const workbook = univerInstanceService.getCurrentUnitForType<Workbook>(UniverInstanceType.UNIVER_SHEET)!;+ const unitId = workbook.getUnitId();- return selectionManagerService.selectionMoveEnd$.pipe(- filter((param) => param != null && param.length >= 2),- map((param) => {- if (!param) return false;- for (let i = 0; i < param.length; i++) {- for (let j = i + 1; j < param.length; j++) {- if (Rectangle.intersects(param[i].range, param[j].range)) {+ return combineLatest([+ selectionManagerService.selectionMoveEnd$,+ workbook.activeSheet$,+ ]).pipe(+ map(([selection, sheet]) => {+ if (!sheet) return false;+ if (!selection || selection.length === 0) return false;+ const subUnitId = sheet.getSheetId();+ const subUnitRuleRange = rangeProtectionRuleModel.getSubunitRuleList(unitId, subUnitId)+ .map((rule) => rule.ranges).flat();++ if (selection.length < 2) {+ const range = selection[0].range;+ const hasLap = subUnitRuleRange.some((ruleRange) => {+ return Rectangle.intersects(ruleRange, range) && !Rectangle.contains(ruleRange, range);+ });+ return hasLap;+ }++ for (let i = 0; i < selection.length; i++) {+ for (let j = i + 1; j < selection.length; j++) {+ if (Rectangle.intersects(selection[i].range, selection[j].range)) {return true;}}diff --git a/packages/sheets-conditional-formatting-ui/src/components/hook/useHighlightRange.ts b/packages/sheets-ui/src/hooks/useHighlightRange.tssimilarity index 100%rename from packages/sheets-conditional-formatting-ui/src/components/hook/useHighlightRange.tsrename to packages/sheets-ui/src/hooks/useHighlightRange.tsdiff --git a/packages/sheets-ui/src/index.ts b/packages/sheets-ui/src/index.tsindex 7f4906a21c..53e65085c5 100644--- a/packages/sheets-ui/src/index.ts+++ b/packages/sheets-ui/src/index.ts@@ -17,14 +17,13 @@export * from './basics';export { getEditorObject } from './basics/editor/get-editor-object';export { AutoFillCommand } from './commands/commands/auto-fill.command';-export { SheetPasteCommand } from './commands/commands/clipboard.command';export { SheetCopyCommand } from './commands/commands/clipboard.command';export { expandToContinuousRange } from './commands/commands/utils/selection-utils';export { ExpandSelectionCommand, JumpOver, MoveSelectionCommand } from './commands/commands/set-selection.command';export { SetCellEditVisibleArrowOperation, SetCellEditVisibleOperation } from './commands/operations/cell-edit.operation';export { SetScrollOperation } from './commands/operations/scroll.operation';export { SheetsScrollRenderController } from './controllers/render-controllers/scroll.render-controller';-export { deriveStateFromActiveSheet$ } from './controllers/menu/menu-util';+export { deriveStateFromActiveSheet$, getCurrentRangeDisable$, getCommentDisable$ } from './controllers/menu/menu-util';export { SheetRenderController } from './controllers/sheet-render.controller';export { SetZoomRatioOperation } from './commands/operations/set-zoom-ratio.operation';export {@@ -94,3 +93,10 @@ export { type IHoverCellPosition } from './services/hover-manager.service';export { AutoHeightController } from './controllers/auto-height.controller';export { type IDragCellPosition } from './services/drag-manager.service';export { SheetMenuPosition } from './controllers/menu/menu';+export { useHighlightRange } from './hooks/useHighlightRange';+export { HeaderMoveRenderController } from './controllers/render-controllers/header-move.render-controller';+export { HeaderResizeRenderController } from './controllers/render-controllers/header-resize.render-controller';+export type { ISheetPasteParams } from './commands/commands/clipboard.command';+export { SheetCutCommand, SheetPasteColWidthCommand, SheetPasteCommand, SheetPasteShortKeyCommand } from './commands/commands/clipboard.command';+export { SetRangeBoldCommand, SetRangeItalicCommand, SetRangeUnderlineCommand, SetRangeStrickThroughCommand } from './commands/commands/inline-format.command';+export { ApplyFormatPainterCommand } from './commands/commands/set-format-painter.command';diff --git a/packages/sheets-ui/src/locale/en-US.ts b/packages/sheets-ui/src/locale/en-US.tsindex d151471532..8aa0afd221 100644--- a/packages/sheets-ui/src/locale/en-US.ts+++ b/packages/sheets-ui/src/locale/en-US.ts@@ -298,6 +298,10 @@ const locale: typeof zhCN = {deleteSheet: 'Delete worksheet',deleteSheetContent:'Confirm to delete this worksheet. It will not be retrieved after deletion. Are you sure you want to delete it?',+ addProtectSheet: 'Protect Worksheet',+ removeProtectSheet: 'Unprotect Worksheet',+ changeSheetPermission: 'Change Worksheet Permissions',+ viewAllProtectArea: 'View All Protection Ranges',},rightClick: {copy: 'Copy',@@ -398,6 +402,11 @@ const locale: typeof zhCN = {deleteAllColumnsAlert: 'You can\'t delete all the columns on the sheet',hideAllRowsAlert: 'You can\'t hide all the rows on the sheet',hideAllColumnsAlert: 'You can\'t hide all the columns on the sheet',+ protectRange: 'Protect Rows And Columns',+ editProtectRange: 'Set Protection Range',+ removeProtectRange: 'Remove Protection Range',+ turnOnProtectRange: 'Add Protection Range',+ viewAllProtectArea: 'View All Protection Ranges',},info: {tooltip: 'Tooltip',diff --git a/packages/sheets-ui/src/locale/ru-RU.ts b/packages/sheets-ui/src/locale/ru-RU.tsindex c81935ef64..8fec864062 100644--- a/packages/sheets-ui/src/locale/ru-RU.ts+++ b/packages/sheets-ui/src/locale/ru-RU.ts@@ -298,6 +298,10 @@ const locale: typeof zhCN = {deleteSheet: 'Удалить лист',deleteSheetContent:'Подтвердите удаление этого листа. После удаления его нельзя будет восстановить. Вы уверены, что хотите удалить его?',+ addProtectSheet: 'Защитить лист',+ removeProtectSheet: 'Снять защиту листа',+ changeSheetPermission: 'Изменить разрешения листа',+ viewAllProtectArea: 'Просмотреть все защищенные области',},rightClick: {copy: 'Копировать',@@ -398,6 +402,11 @@ const locale: typeof zhCN = {deleteAllColumnsAlert: 'Нельзя удалить все столбцы на листе',hideAllRowsAlert: 'Нельзя скрыть все строки на листе',hideAllColumnsAlert: 'Нельзя скрыть все столбцы на листе',+ protectRange: 'Защитить диапазон',+ editProtectRange: 'Редактировать защищенный диапазон',+ removeProtectRange: 'Удалить защиту диапазона',+ turnOnProtectRange: 'Включить защиту диапазона',+ viewAllProtectArea: 'Просмотреть все защищенные области',},info: {tooltip: 'Подсказка',diff --git a/packages/sheets-ui/src/locale/zh-CN.ts b/packages/sheets-ui/src/locale/zh-CN.tsindex 858702178e..0edfa61510 100644--- a/packages/sheets-ui/src/locale/zh-CN.ts+++ b/packages/sheets-ui/src/locale/zh-CN.ts@@ -296,6 +296,10 @@ const locale = {sheetNameAlreadyExistsError: '工作表已存在,请输入其它名称。',deleteSheet: '删除工作表',deleteSheetContent: '确认删除此工作表,删除后将不可找回,确定要删除吗?',+ addProtectSheet: '保护工作表',+ removeProtectSheet: '取消保护工作表',+ changeSheetPermission: '更改工作表权限',+ viewAllProtectArea: '查看所有保护范围',},rightClick: {copy: '复制',@@ -396,6 +400,11 @@ const locale = {deleteAllColumnsAlert: '您无法删除工作表上的所有列',hideAllRowsAlert: '您无法隐藏工作表上的所有行',hideAllColumnsAlert: '您无法隐藏工作表上的所有列',+ protectRange: '保护行列',+ editProtectRange: '设置保护范围',+ removeProtectRange: '移除保护范围',+ turnOnProtectRange: '新增保护范围',+ viewAllProtectArea: '查看所有保护范围',},info: {tooltip: '提示',diff --git a/packages/sheets-ui/src/services/selection/selection-render.service.ts b/packages/sheets-ui/src/services/selection/selection-render.service.tsindex 1f5b17610a..75f7650878 100644--- a/packages/sheets-ui/src/services/selection/selection-render.service.ts+++ b/packages/sheets-ui/src/services/selection/selection-render.service.ts@@ -15,6 +15,7 @@*/import type {+ IInterceptor,IRange,IRangeWithCoord,ISelection,@@ -24,7 +25,7 @@ import type {Nullable,Observer,} from '@univerjs/core';-import { makeCellToSelection, RANGE_TYPE, ThemeService } from '@univerjs/core';+import { createInterceptorKey, InterceptorManager, makeCellToSelection, RANGE_TYPE, ThemeService } from '@univerjs/core';import type { IMouseEvent, IPointerEvent, Scene, SpreadsheetSkeleton, Viewport } from '@univerjs/engine-render';import { ScrollTimer, ScrollTimerType, Vector2 } from '@univerjs/engine-render';import type { ISelectionStyle, ISelectionWithCoordAndStyle, ISelectionWithStyle } from '@univerjs/sheets';@@ -52,6 +53,11 @@ export interface ISelectionRenderService {readonly selectionMoveStart$: Observable<ISelectionWithCoordAndStyle[]>;readonly usable$: Observable<boolean>;+ interceptor: InterceptorManager<{+ RANGE_MOVE_PERMISSION_CHECK: IInterceptor<boolean, null>;+ RANGE_FILL_PERMISSION_CHECK: IInterceptor<boolean, { x: number; y: number; skeleton: SpreadsheetSkeleton }>;+ }>;+enableHeaderHighlight(): void;disableHeaderHighlight(): void;enableDetectMergedCell(): void;@@ -111,6 +117,10 @@ export interface ISelectionRenderService {** @todo Refactor it to RenderController.*/++export const RANGE_MOVE_PERMISSION_CHECK = createInterceptorKey<boolean, null>('rangeMovePermissionCheck');+export const RANGE_FILL_PERMISSION_CHECK = createInterceptorKey<boolean, { x: number; y: number; skeleton: SpreadsheetSkeleton }>('rangeFillPermissionCheck');+export class SelectionRenderService implements ISelectionRenderService {hasSelection: boolean = false;@@ -202,6 +212,7 @@ export class SelectionRenderService implements ISelectionRenderService {private readonly _usable$ = new BehaviorSubject<boolean>(false);readonly usable$ = this._usable$.asObservable();+ public interceptor = new InterceptorManager({ RANGE_MOVE_PERMISSION_CHECK, RANGE_FILL_PERMISSION_CHECK });constructor(@Inject(ThemeService) private readonly _themeService: ThemeService,@@ -625,10 +636,10 @@ export class SelectionRenderService implements ISelectionRenderService {// In addition to pressing the ctrl or shift key, we must clear the previous selectionif ((curControls.length > 0 &&- !evt.ctrlKey &&- !evt.shiftKey &&- !this._isShowPreviousEnable &&- !this._isRemainLastEnable) || (curControls.length > 0 && this._isSingleSelection && !evt.shiftKey)+ !evt.ctrlKey &&+ !evt.shiftKey &&+ !this._isShowPreviousEnable &&+ !this._isRemainLastEnable) || (curControls.length > 0 && this._isSingleSelection && !evt.shiftKey)) {for (const control of curControls) {control.dispose();diff --git a/packages/sheets-ui/src/services/selection/selection-shape-extension.ts b/packages/sheets-ui/src/services/selection/selection-shape-extension.tsindex 59005add7d..579d143458 100644--- a/packages/sheets-ui/src/services/selection/selection-shape-extension.ts+++ b/packages/sheets-ui/src/services/selection/selection-shape-extension.ts@@ -14,6 +14,7 @@* limitations under the License.*/+/* eslint-disable max-lines-per-function */import type { IFreeze, IRangeWithCoord, Nullable, Observer, ThemeService } from '@univerjs/core';import { ColorKit } from '@univerjs/core';import type { IMouseEvent, IPointerEvent, Scene, SpreadsheetSkeleton, Viewport } from '@univerjs/engine-render';@@ -24,6 +25,7 @@ import type { Injector } from '@wendellhu/redi';import { VIEWPORT_KEY } from '../../common/keys';import { SheetSkeletonManagerService } from '../sheet-skeleton-manager.service';import type { SelectionShape } from './selection-shape';+import { ISelectionRenderService, RANGE_FILL_PERMISSION_CHECK, RANGE_MOVE_PERMISSION_CHECK } from './selection-render.service';const HELPER_SELECTION_TEMP_NAME = '__SpreadsheetHelperSelectionTempRect';@@ -148,6 +150,12 @@ export class SelectionShapeExtension {[leftControl, rightControl, topControl, bottomControl].forEach((control) => {control.onPointerEnterObserver.add(() => {+ const permissionCheck = this._injector.get(ISelectionRenderService).interceptor.fetchThroughInterceptors(RANGE_MOVE_PERMISSION_CHECK)(false, null);++ if (!permissionCheck) {+ return;+ }+control.setCursor(CURSOR_TYPE.MOVE);});@@ -326,6 +334,12 @@ export class SelectionShapeExtension {this._moveObserver = scene.onPointerMoveObserver.add((moveEvt: IPointerEvent | IMouseEvent) => {const { offsetX: moveOffsetX, offsetY: moveOffsetY } = moveEvt;+ const permissionCheck = this._injector.get(ISelectionRenderService).interceptor.fetchThroughInterceptors(RANGE_MOVE_PERMISSION_CHECK)(false, null);++ if (!permissionCheck) {+ return;+ }+const { x: newMoveOffsetX, y: newMoveOffsetY } = scene.getRelativeCoord(Vector2.FromArray([moveOffsetX, moveOffsetY]));@@ -571,7 +585,12 @@ export class SelectionShapeExtension {private _initialFill() {const { fillControl } = this._control;- fillControl.onPointerEnterObserver.add(() => {+ fillControl.onPointerEnterObserver.add((evt: IPointerEvent | IMouseEvent) => {+ const permissionCheck = this._injector.get(ISelectionRenderService).interceptor.fetchThroughInterceptors(RANGE_FILL_PERMISSION_CHECK)(false, { x: evt.offsetX, y: evt.offsetY, skeleton: this._skeleton });++ if (!permissionCheck) {+ return;+ }fillControl.setCursor(CURSOR_TYPE.CROSSHAIR);});@@ -806,6 +825,12 @@ export class SelectionShapeExtension {const { offsetX: moveOffsetX, offsetY: moveOffsetY } = moveEvt;const currentViewport = scene.getActiveViewportByCoord(Vector2.FromArray([moveOffsetX, moveOffsetY]));+ const permissionCheck = this._injector.get(ISelectionRenderService).interceptor.fetchThroughInterceptors(RANGE_FILL_PERMISSION_CHECK)(false, { x: evt.offsetX, y: evt.offsetY, skeleton: this._skeleton });++ if (!permissionCheck) {+ return;+ }+const { x: newMoveOffsetX, y: newMoveOffsetY } = scene.getRelativeCoord(Vector2.FromArray([moveOffsetX, moveOffsetY]));diff --git a/packages/sheets-ui/src/views/defined-name/DefinedName.tsx b/packages/sheets-ui/src/views/defined-name/DefinedName.tsxindex 9a597d4df2..3aa08ad30e 100644--- a/packages/sheets-ui/src/views/defined-name/DefinedName.tsx+++ b/packages/sheets-ui/src/views/defined-name/DefinedName.tsx@@ -20,10 +20,11 @@ import { Dropdown, Input } from '@univerjs/design';import { MoreDownSingle } from '@univerjs/icons';import { useDependency } from '@wendellhu/redi/react-bindings';import { IDefinedNamesService } from '@univerjs/engine-formula';+import clsx from 'clsx';import styles from './index.module.less';import { DefinedNameOverlay } from './DefinedNameOverlay';-export function DefinedName() {+export function DefinedName({ disable }: { disable: boolean }) {const [rangeString, setRangeString] = React.useState('');const definedNamesService = useDependency(IDefinedNamesService);@@ -39,10 +40,10 @@ export function DefinedName() {return (<div className={styles.definedName}>- <Input value={rangeString} type="text" size="small" affixWrapperStyle={{ border: 'none', paddingLeft: '6px', paddingRight: '6px', height: '100%' }} />+ <Input className={clsx({ [styles.defineNameInputDisable]: disable })} value={rangeString} type="text" size="small" affixWrapperStyle={{ border: 'none', paddingLeft: '6px', paddingRight: '6px', height: '100%' }} /><Dropdown overlay={<DefinedNameOverlay />}>- <div className={styles.definedNameDropDown}>+ <div className={clsx(styles.definedNameDropDown, { [styles.definedNameDropDownDisable]: disable })}><MoreDownSingle /></div></Dropdown>diff --git a/packages/sheets-ui/src/views/defined-name/index.module.less b/packages/sheets-ui/src/views/defined-name/index.module.lessindex c12d37f39c..eba1f16630 100644--- a/packages/sheets-ui/src/views/defined-name/index.module.less+++ b/packages/sheets-ui/src/views/defined-name/index.module.less@@ -32,6 +32,15 @@background-color: rgb(var(--grey-50));color: rgb(var(--primary-color));}++ &-disable {+ color: rgb(var(--grey-200));+ cursor: not-allowed;++ &:hover {+ color: rgb(var(--grey-200));+ }+ }}&-overlay {@@ -201,9 +210,11 @@color: rgb(var(--primary-color));cursor: pointer;padding: 4px;+&:hover {background-color: rgb(var(--hyacinth-50));}+transform: translate(0, -50%);border-radius: var(--border-radius-base);right: 60px;@@ -220,6 +231,7 @@top: 20px;transform: translate(0, -50%);border-radius: var(--border-radius-base);+&:hover {background-color: rgb(var(--hyacinth-50));}@@ -262,5 +274,10 @@margin-right: 2px;}}++ &-disable {+ color: rgb(var(--grey-200));+ cursor: not-allowed;+ }}}diff --git a/packages/sheets-ui/src/views/formula-bar/FormulaBar.tsx b/packages/sheets-ui/src/views/formula-bar/FormulaBar.tsxindex e9bfb02338..b166c77465 100644--- a/packages/sheets-ui/src/views/formula-bar/FormulaBar.tsx+++ b/packages/sheets-ui/src/views/formula-bar/FormulaBar.tsx@@ -14,8 +14,8 @@* limitations under the License.*/-import type { Nullable } from '@univerjs/core';-import { DEFAULT_EMPTY_DOCUMENT_VALUE, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY, HorizontalAlign, ThemeService, VerticalAlign, WrapStrategy } from '@univerjs/core';+import type { ICellDataForSheetInterceptor, Nullable, Workbook } from '@univerjs/core';+import { DEFAULT_EMPTY_DOCUMENT_VALUE, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY, HorizontalAlign, IPermissionService, IUniverInstanceService, ThemeService, UniverInstanceType, VerticalAlign, WrapStrategy } from '@univerjs/core';import { DeviceInputEventType } from '@univerjs/engine-render';import { CheckMarkSingle, CloseSingle, DropdownSingle, FxSingle } from '@univerjs/icons';import { KeyCode, ProgressBar, TextEditor } from '@univerjs/ui';@@ -23,6 +23,10 @@ import { useDependency } from '@wendellhu/redi/react-bindings';import clsx from 'clsx';import React, { useEffect, useState } from 'react';+import type { ICellPermission } from '@univerjs/sheets';+import { RangeProtectionRuleModel, SelectionManagerService, WorksheetProtectionRuleModel, WorksheetSetCellStylePermission, WorksheetSetCellValuePermission } from '@univerjs/sheets';+import { merge } from 'rxjs';+import { UnitAction } from '@univerjs/protocol';import { IFormulaEditorManagerService } from '../../services/editor/formula-editor-manager.service';import { IEditorBridgeService } from '../../services/editor-bridge.service';@@ -42,6 +46,47 @@ export function FormulaBar() {const editorBridgeService = useDependency(IEditorBridgeService);const themeService = useDependency(ThemeService);const progressBarColor = themeService.getCurrentTheme().primaryColor;+ const [disable, setDisable] = useState<boolean>(false);+ const univerInstanceService = useDependency(IUniverInstanceService);+ const selectionManager = useDependency(SelectionManagerService);+ const worksheetProtectionRuleModel = useDependency(WorksheetProtectionRuleModel);+ const rangeProtectionRuleModel = useDependency(RangeProtectionRuleModel);+ const permissionService = useDependency(IPermissionService);++ useEffect(() => {+ const workbook = univerInstanceService.getCurrentUnitForType<Workbook>(UniverInstanceType.UNIVER_SHEET)!;+ merge(+ worksheetProtectionRuleModel.ruleChange$,+ rangeProtectionRuleModel.ruleChange$,+ selectionManager.selectionMoveEnd$+ ).subscribe(() => {+ const unitId = workbook.getUnitId();+ const worksheet = workbook.getActiveSheet();+ const subUnitId = worksheet.getSheetId();+ const range = selectionManager.getLast()?.range;+ if (!range) return;+ const worksheetSetCellValuePermission = permissionService.getPermissionPoint(new WorksheetSetCellValuePermission(unitId, subUnitId).id);+ const worksheetSetCellStylePermission = permissionService.getPermissionPoint(new WorksheetSetCellStylePermission(unitId, subUnitId).id);++ if (!worksheetSetCellValuePermission || !worksheetSetCellStylePermission) {+ setDisable(true);+ return;+ }++ const { startRow, endRow, startColumn, endColumn } = range;+ for (let row = startRow; row <= endRow; row++) {+ for (let col = startColumn; col <= endColumn; col++) {+ const permission = (worksheet.getCell(row, col) as (ICellDataForSheetInterceptor & { selectionProtection: ICellPermission[] }))?.selectionProtection?.[0];+ if (permission?.[UnitAction.Edit] === false) {+ setDisable(true);+ return;+ }+ }+ }+ setDisable(false);+ }+ );+ }, [selectionManager, rangeProtectionRuleModel, univerInstanceService, worksheetProtectionRuleModel]);const INITIAL_SNAPSHOT = {id: DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY,@@ -127,13 +172,19 @@ export function FormulaBar() {}return (- <div className={styles.formulaBox} style={{ height: ArrowDirection.Down === arrowDirection ? '28px' : '82px' }}>+ <div+ className={styles.formulaBox}+ style={{+ height: ArrowDirection.Down === arrowDirection ? '28px' : '82px',+ pointerEvents: disable ? 'none' : 'auto',+ }}+ ><div className={styles.nameRanges}>- <DefinedName />+ <DefinedName disable={disable} /></div><div className={styles.formulaBar}>- <div className={styles.formulaIcon}>+ <div className={clsx(styles.formulaIcon, { [styles.formulaIconDisable]: disable })}><div className={styles.formulaIconWrapper}><spanclassName={clsx(styles.iconContainer, styles.iconContainerError, iconStyle)}@@ -166,7 +217,7 @@ export function FormulaBar() {snapshot={INITIAL_SNAPSHOT}isSingle={false}/>- <div className={styles.arrowContainer} onClick={handleArrowClick}>+ <div className={clsx(styles.arrowContainer, { [styles.arrowContainerDisable]: disable })} onClick={handleArrowClick}>{arrowDirection === ArrowDirection.Down? (<DropdownSingle />diff --git a/packages/sheets-ui/src/views/formula-bar/index.module.less b/packages/sheets-ui/src/views/formula-bar/index.module.lessindex 8711fd81e4..ee2fc16823 100644--- a/packages/sheets-ui/src/views/formula-bar/index.module.less+++ b/packages/sheets-ui/src/views/formula-bar/index.module.less@@ -24,6 +24,11 @@.formula-icon {padding: 6px 0;+ &-disable {+ color: rgb(var(--grey-200));+ cursor: not-allowed;+ }+&-wrapper {position: relative;@@ -112,6 +117,11 @@font-size: var(--font-size-xs);color: rgb(var(--text-color-secondary));++ &-disable {+ color: rgb(var(--grey-200));+ cursor: not-allowed;+ }}}}diff --git a/packages/sheets-ui/src/views/sheet-bar/SheetBar.tsx b/packages/sheets-ui/src/views/sheet-bar/SheetBar.tsxindex 74e614e3f7..bc3ff0377d 100644--- a/packages/sheets-ui/src/views/sheet-bar/SheetBar.tsx+++ b/packages/sheets-ui/src/views/sheet-bar/SheetBar.tsx@@ -14,12 +14,14 @@* limitations under the License.*/-import { ICommandService } from '@univerjs/core';+import type { Workbook } from '@univerjs/core';+import { ICommandService, IPermissionService, IUniverInstanceService, UniverInstanceType } from '@univerjs/core';import { IncreaseSingle, MoreSingle } from '@univerjs/icons';-import { InsertSheetCommand } from '@univerjs/sheets';+import { InsertSheetCommand, WorkbookEditablePermission } from '@univerjs/sheets';import { useDependency } from '@wendellhu/redi/react-bindings';import React, { useEffect, useState } from 'react';+import { map } from 'rxjs';import { ISheetBarService } from '../../services/sheet-bar/sheet-bar.service';import styles from './index.module.less';import { SheetBarButton } from './sheet-bar-button/SheetBarButton';@@ -32,10 +34,17 @@ const SCROLL_WIDTH = 100;export const SheetBar = () => {const [leftScrollState, setLeftScrollState] = useState(true);const [rightScrollState, setRightScrollState] = useState(true);+ const [editPermission, setEditPermission] = useState(false);const commandService = useDependency(ICommandService);const sheetBarService = useDependency(ISheetBarService);+ const permissionService = useDependency(IPermissionService);+ const univerInstanceService = useDependency(IUniverInstanceService);++ const workbook = univerInstanceService.getCurrentUnitForType<Workbook>(UniverInstanceType.UNIVER_SHEET)!;+ const unitId = workbook.getUnitId();+useEffect(() => {const subscription = sheetBarService.scroll$.subscribe((state: IScrollState) => {updateScrollButtonState(state);@@ -46,6 +55,18 @@ export const SheetBar = () => {};}, []);+ useEffect(() => {+ const subscription = permissionService.getPermissionPoint$(new WorkbookEditablePermission(unitId)?.id)?.pipe(+ map((permission) => permission?.value ?? false)+ )?.subscribe((permission) => {+ setEditPermission(permission ?? false);+ });++ return () => {+ subscription && subscription.unsubscribe();+ };+ }, []);+const updateScrollButtonState = (state: IScrollState) => {const { leftEnd, rightEnd } = state;setLeftScrollState(leftEnd);@@ -72,7 +93,7 @@ export const SheetBar = () => {<div className={styles.sheetBar}><div className={styles.sheetBarOptions}>{/* Add sheet button */}- <SheetBarButton onClick={addSheet}>+ <SheetBarButton onClick={addSheet} disabled={!editPermission}><IncreaseSingle /></SheetBarButton>{/* All sheets button */}diff --git a/packages/sheets-ui/src/views/sheet-bar/sheet-bar-menu/SheetBarMenu.tsx b/packages/sheets-ui/src/views/sheet-bar/sheet-bar-menu/SheetBarMenu.tsxindex e72e3d117d..02cd26a1ec 100644--- a/packages/sheets-ui/src/views/sheet-bar/sheet-bar-menu/SheetBarMenu.tsx+++ b/packages/sheets-ui/src/views/sheet-bar/sheet-bar-menu/SheetBarMenu.tsx@@ -27,6 +27,7 @@ import {SetWorksheetNameMutation,SetWorksheetOrderMutation,SetWorksheetShowCommand,+ WorksheetProtectionRuleModel,} from '@univerjs/sheets';import { useDependency } from '@wendellhu/redi/react-bindings';import React, { useCallback, useEffect, useState } from 'react';@@ -37,7 +38,7 @@ import { SheetBarButton } from '../sheet-bar-button/SheetBarButton';import styles from './index.module.less';export interface ISheetBarMenuItem {- label?: string;+ label?: React.ReactNode;hidden?: boolean;selected?: boolean;index?: string;@@ -57,6 +58,7 @@ export function SheetBarMenu(props: ISheetBarMenuProps) {const univerInstanceService = useDependency(IUniverInstanceService);const commandService = useDependency(ICommandService);const sheetBarService = useDependency(ISheetBarService);+ const worksheetProtectionRuleModel = useDependency(WorksheetProtectionRuleModel);const workbook = useObservable(() => univerInstanceService.getCurrentTypeOfUnit$<Workbook>(UniverInstanceType.UNIVER_SHEET), null, false, []);const handleClick = (item: ISheetBarMenuItem) => {@@ -84,16 +86,18 @@ export function SheetBarMenu(props: ISheetBarMenuProps) {const sheets = workbook.getSheets();const activeSheet = workbook.getActiveSheet();- const worksheetMenuItems = sheets.map((sheet, index) => ({- label: sheet.getName(),- index: `${index}`,- sheetId: sheet.getSheetId(),- hidden: sheet.isSheetHidden() === BooleanNumber.TRUE,- selected: activeSheet === sheet,- }));+ const worksheetMenuItems = sheets.map((sheet, index) => {+ return {+ label: sheet.getName(),+ index: `${index}`,+ sheetId: sheet.getSheetId(),+ hidden: sheet.isSheetHidden() === BooleanNumber.TRUE,+ selected: activeSheet === sheet,+ };+ });setMenu(worksheetMenuItems);- }, [workbook]);+ }, [workbook, worksheetProtectionRuleModel]);const setupStatusUpdate = useCallback(() =>commandService.onCommandExecuted((commandInfo: ICommandInfo) => {@@ -152,7 +156,7 @@ export function SheetBarMenu(props: ISheetBarMenuProps) {? <EyelashSingle />: <CheckMarkSingle />}</span>- <span className={styles.sheetBarMenuItemLabel}>{item.label}</span>+ <div className={styles.sheetBarMenuItemLabel}>{item.label}</div></li>))}</ul>diff --git a/packages/sheets-ui/src/views/sheet-bar/sheet-bar-menu/index.module.less b/packages/sheets-ui/src/views/sheet-bar/sheet-bar-menu/index.module.lessindex 4125526856..d463f62ea8 100644--- a/packages/sheets-ui/src/views/sheet-bar/sheet-bar-menu/index.module.less+++ b/packages/sheets-ui/src/views/sheet-bar/sheet-bar-menu/index.module.less@@ -78,6 +78,8 @@font-size: var(--font-size-xs);font-weight: 400;line-height: @line-height;+ display: flex;+ align-items: center;}}}diff --git a/packages/sheets-ui/src/views/sheet-bar/sheet-bar-tabs/SheetBarItem.tsx b/packages/sheets-ui/src/views/sheet-bar/sheet-bar-tabs/SheetBarItem.tsxindex 96dd7c7ef6..459177f80d 100644--- a/packages/sheets-ui/src/views/sheet-bar/sheet-bar-tabs/SheetBarItem.tsx+++ b/packages/sheets-ui/src/views/sheet-bar/sheet-bar-tabs/SheetBarItem.tsx@@ -22,7 +22,7 @@ import React, { useEffect, useState } from 'react';import styles from './index.module.less';export interface IBaseSheetBarProps {- label?: string;+ label?: React.ReactNode;children?: any[];index?: number;color?: string;@@ -63,7 +63,7 @@ export function SheetBarItem(props: IBaseSheetBarProps) {currentSelected && color ? `0px 0px 8px rgba(0, 0, 0, 0.08), inset 0px -2px 0px 0px ${color}` : '',}}>- <span className={styles.slideTabSpan}>{label}</span>+ <div className={styles.slideTabDiv}>{label}</div></div>);}diff --git a/packages/sheets-ui/src/views/sheet-bar/sheet-bar-tabs/SheetBarTabs.tsx b/packages/sheets-ui/src/views/sheet-bar/sheet-bar-tabs/SheetBarTabs.tsxindex 51f0709b37..74ad2dd2cb 100644--- a/packages/sheets-ui/src/views/sheet-bar/sheet-bar-tabs/SheetBarTabs.tsx+++ b/packages/sheets-ui/src/views/sheet-bar/sheet-bar-tabs/SheetBarTabs.tsx@@ -15,10 +15,11 @@*/import type { ICommandInfo, Workbook } from '@univerjs/core';-import { ICommandService, IUniverInstanceService, LocaleService, UniverInstanceType } from '@univerjs/core';+import { ICommandService, IPermissionService, IUniverInstanceService, LocaleService, UniverInstanceType } from '@univerjs/core';import { Dropdown } from '@univerjs/design';import {InsertSheetMutation,+ RangeProtectionRuleModel,RemoveSheetMutation,SetTabColorMutation,SetWorksheetActiveOperation,@@ -27,11 +28,16 @@ import {SetWorksheetNameMutation,SetWorksheetOrderCommand,SetWorksheetOrderMutation,+ WorkbookEditablePermission,+ WorkbookManageCollaboratorPermission,+ WorksheetProtectionRuleModel,} from '@univerjs/sheets';-import { IConfirmService, Menu } from '@univerjs/ui';+import { IConfirmService, Menu, useObservable } from '@univerjs/ui';import { useDependency } from '@wendellhu/redi/react-bindings';-import React, { useEffect, useRef, useState } from 'react';+import React, { useCallback, useEffect, useRef, useState } from 'react';+import { LockSingle } from '@univerjs/icons';+import { merge } from 'rxjs';import { SheetMenuPosition } from '../../../controllers/menu/menu';import { ISelectionRenderService } from '../../../services/selection/selection-render.service';import { ISheetBarService } from '../../../services/sheet-bar/sheet-bar.service';@@ -42,7 +48,7 @@ import { SheetBarItem } from './SheetBarItem';import type { IScrollState } from './utils/slide-tab-bar';import { SlideTabBar } from './utils/slide-tab-bar';-export interface ISheetBarTabsProps {}+export interface ISheetBarTabsProps { }export function SheetBarTabs() {const [sheetList, setSheetList] = useState<IBaseSheetBarProps[]>([]);@@ -60,8 +66,43 @@ export function SheetBarTabs() {const confirmService = useDependency(IConfirmService);const selectionRenderService = useDependency(ISelectionRenderService);const editorBridgeService = useDependency(IEditorBridgeService);+ const worksheetProtectionRuleModel = useDependency(WorksheetProtectionRuleModel);+ const rangeProtectionRuleModel = useDependency(RangeProtectionRuleModel);+ const resetOrder = useObservable(worksheetProtectionRuleModel.resetOrder$);const workbook = univerInstanceService.getCurrentUnitForType<Workbook>(UniverInstanceType.UNIVER_SHEET)!;+ const permissionService = useDependency(IPermissionService);++ const statusInit = useCallback(() => {+ const currentSubUnitId = workbook.getActiveSheet().getSheetId();+ setActiveKey(currentSubUnitId);++ const sheets = workbook.getSheets();+ const activeSheet = workbook.getActiveSheet();+ const sheetListItems = sheets+ .filter((sheet) => !sheet.isSheetHidden())+ .map((sheet, index) => {+ const worksheetRule = worksheetProtectionRuleModel.getRule(workbook.getUnitId(), sheet.getSheetId());+ const hasSelectionRule = rangeProtectionRuleModel.getSubunitRuleList(workbook.getUnitId(), sheet.getSheetId()).length > 0;+ const hasProtect = worksheetRule?.permissionId || hasSelectionRule;+ const name = hasProtect+ ? (+ <>+ <LockSingle />+ <span>{sheet.getName()}</span>+ </>+ )+ : <span>{sheet.getName()}</span>;+ return {+ sheetId: sheet.getSheetId(),+ label: name,+ index,+ selected: activeSheet === sheet,+ color: sheet.getTabColor() ?? undefined,+ };+ });+ setSheetList(sheetListItems);+ }, [workbook, worksheetProtectionRuleModel]);useEffect(() => {statusInit();@@ -79,7 +120,7 @@ export function SheetBarTabs() {slideTabBar.destroy();subscribeList.forEach((subscribe) => subscribe.unsubscribe());};- }, []);+ }, [resetOrder]);useEffect(() => {if (sheetList.length > 0) {@@ -87,12 +128,25 @@ export function SheetBarTabs() {}}, [sheetList]);+ useEffect(() => {+ const subscription = merge(+ worksheetProtectionRuleModel.ruleChange$,+ rangeProtectionRuleModel.ruleChange$+ ).subscribe(() => {+ statusInit();+ });++ return () => {+ subscription.unsubscribe();+ };+ }, [worksheetProtectionRuleModel, statusInit]);+const setupSlideTabBarInit = () => {const slideTabBar = new SlideTabBar({slideTabBarClassName: styles.slideTabBar,slideTabBarItemActiveClassName: styles.slideTabActive,slideTabBarItemClassName: styles.slideTabItem,- slideTabBarSpanEditClassName: styles.slideTabSpanEdit,+ slideTabBarSpanEditClassName: styles.slideTabDivEdit,slideTabBarItemAutoSort: true,slideTabBarContainer: slideTabBarContainerRef.current,currentIndex: 0,@@ -102,8 +156,8 @@ export function SheetBarTabs() {name: worksheetName,});},- onSlideEnd: (event: Event, order: number) => {- commandService.executeCommand(SetWorksheetOrderCommand.id, { order });+ onSlideEnd: async (event: Event, order: number) => {+ const res = await commandService.executeCommand(SetWorksheetOrderCommand.id, { order });},onChangeTab: (event: MouseEvent, subUnitId: string) => {// Do not use SetWorksheetActivateCommand, otherwise the sheet will not be switched before the menu pops up, resulting in incorrect menu position.@@ -125,6 +179,18 @@ export function SheetBarTabs() {onNameCheckAlert: (text: string) => {return nameEmptyCheck(text) || nameRepeatCheck(text);},+ onNameChangeCheck: () => {+ const unitId = workbook.getUnitId();+ const worksheet = workbook?.getActiveSheet();+ const subUnitId = worksheet.getSheetId();+ const worksheetRule = worksheetProtectionRuleModel.getRule(unitId, subUnitId);+ const selectionRule = rangeProtectionRuleModel.getSubunitRuleList(unitId, subUnitId).length > 0;+ if (worksheetRule || selectionRule) {+ return permissionService.getPermissionPoint(new WorkbookManageCollaboratorPermission(unitId).id)?.value ?? false;+ } else {+ return permissionService.getPermissionPoint(new WorkbookEditablePermission(unitId).id)?.value ?? false;+ }+ },});slideTabBarRef.current.slideTabBar = slideTabBar;@@ -229,24 +295,6 @@ export function SheetBarTabs() {}});- const statusInit = () => {- const currentSubUnitId = workbook.getActiveSheet().getSheetId();- setActiveKey(currentSubUnitId);-- const sheets = workbook.getSheets();- const activeSheet = workbook.getActiveSheet();- const sheetListItems = sheets- .filter((sheet) => !sheet.isSheetHidden())- .map((sheet, index) => ({- sheetId: sheet.getSheetId(),- label: sheet.getName(),- index,- selected: activeSheet === sheet,- color: sheet.getTabColor() ?? undefined,- }));- setSheetList(sheetListItems);- };-const setupSubscribeScroll = () =>sheetBarService.scroll$.subscribe((state: IScrollState) => {updateScrollButtonState(state);diff --git a/packages/sheets-ui/src/views/sheet-bar/sheet-bar-tabs/index.module.less b/packages/sheets-ui/src/views/sheet-bar/sheet-bar-tabs/index.module.lessindex 3a012aa807..93f40129be 100644--- a/packages/sheets-ui/src/views/sheet-bar/sheet-bar-tabs/index.module.less+++ b/packages/sheets-ui/src/views/sheet-bar/sheet-bar-tabs/index.module.less@@ -44,7 +44,7 @@ Tab Item, Put outside to be compatible with drag stylesbackground-color: rgb(var(--bg-color-hover));}- .slide-tab-span {+ .slide-tab-div {box-sizing: border-box;padding: var(--padding-xs) var(--padding-sm);@@ -52,6 +52,8 @@ Tab Item, Put outside to be compatible with drag stylesborder: 2px solid transparent;border-radius: var(--border-radius-base);+ display: flex;+ align-items: center;&-edit {cursor: text;@@ -73,6 +75,8 @@ Tab Item, Put outside to be compatible with drag stylesbox-shadow: @tab-shadow;transition: box-shadow 0.2s;+ display: flex;+ justify-content: center;}.slide-tab-item-dropdown {diff --git a/packages/sheets-ui/src/views/sheet-bar/sheet-bar-tabs/utils/slide-tab-bar.ts b/packages/sheets-ui/src/views/sheet-bar/sheet-bar-tabs/utils/slide-tab-bar.tsindex 9a78b01d38..f63365698f 100644--- a/packages/sheets-ui/src/views/sheet-bar/sheet-bar-tabs/utils/slide-tab-bar.ts+++ b/packages/sheets-ui/src/views/sheet-bar/sheet-bar-tabs/utils/slide-tab-bar.ts@@ -33,6 +33,7 @@ export interface SlideTabBarConfig {onChangeTab: (event: MouseEvent, id: string) => void;onScroll: (state: IScrollState) => void;onNameCheckAlert: (text: string) => boolean;+ onNameChangeCheck: () => boolean;}export interface SlideTabItemAnimate {@@ -118,6 +119,9 @@ export class SlideTabItem {}setEditor(callback?: (event: FocusEvent) => void): void {+ if (!this._slideTabBar.getConfig().onNameChangeCheck()) {+ return;+ }let compositionFlag = true;if (this._editMode === false) {const input = this._slideTabItem.querySelector('span');diff --git a/packages/sheets-zen-editor/package.json b/packages/sheets-zen-editor/package.jsonindex 474e38c53c..b45d60bb5c 100644--- a/packages/sheets-zen-editor/package.json+++ b/packages/sheets-zen-editor/package.json@@ -79,7 +79,8 @@"rxjs": ">=7.0.0"},"dependencies": {- "@univerjs/icons": "^0.1.52"+ "@univerjs/icons": "^0.1.52",+ "@univerjs/sheets": "workspace:*"},"devDependencies": {"@univerjs/core": "workspace:*",diff --git a/packages/sheets-zen-editor/src/views/menu.ts b/packages/sheets-zen-editor/src/views/menu.tsindex e98841f47a..4949276c67 100644--- a/packages/sheets-zen-editor/src/views/menu.ts+++ b/packages/sheets-zen-editor/src/views/menu.ts@@ -16,7 +16,9 @@import { type IMenuButtonItem, MenuGroup, MenuItemType, MenuPosition } from '@univerjs/ui';+import { getCurrentRangeDisable$ } from '@univerjs/sheets-ui/controllers/menu/menu-util.js';import type { IAccessor } from '@wendellhu/redi';+import { RangeProtectionPermissionEditPoint, WorkbookEditablePermission, WorksheetEditPermission, WorksheetSetCellStylePermission, WorksheetSetCellValuePermission } from '@univerjs/sheets';import { OpenZenEditorOperation } from '../commands/operations/zen-editor.operation';export function ZenEditorMenuItemFactory(accessor: IAccessor): IMenuButtonItem {@@ -27,5 +29,6 @@ export function ZenEditorMenuItemFactory(accessor: IAccessor): IMenuButtonItem {title: 'rightClick.zenEditor',icon: 'AmplifySingle',positions: [MenuPosition.CONTEXT_MENU],+ disabled$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetEditPermission, WorksheetSetCellValuePermission, WorksheetSetCellStylePermission], rangeTypes: [RangeProtectionPermissionEditPoint] }),};}diff --git a/packages/sheets/package.json b/packages/sheets/package.jsonindex 20c638aa37..e2a24be7d2 100644--- a/packages/sheets/package.json+++ b/packages/sheets/package.json@@ -71,6 +71,9 @@"@wendellhu/redi": "0.15.2","rxjs": ">=7.0.0"},+ "dependencies": {+ "@univerjs/protocol": "^0.1.34"+ },"devDependencies": {"@univerjs/core": "workspace:*","@univerjs/engine-formula": "workspace:*",diff --git a/packages/sheets/src/commands/commands/__tests__/create-command-test-bed.ts b/packages/sheets/src/commands/commands/__tests__/create-command-test-bed.tsindex 157d1b874f..84110ddee7 100644--- a/packages/sheets/src/commands/commands/__tests__/create-command-test-bed.ts+++ b/packages/sheets/src/commands/commands/__tests__/create-command-test-bed.ts@@ -29,12 +29,13 @@ import {} from '@univerjs/core';import type { Dependency } from '@wendellhu/redi';import { Inject, Injector } from '@wendellhu/redi';-+import { WorkbookPermissionService } from '../../../services/permission/workbook-permission/workbook-permission.service';+import { WorksheetPermissionService } from '../../../services/permission/worksheet-permission/worksheet-permission.service';import enUS from '../../../locale/en-US';import { BorderStyleManagerService } from '../../../services/border-style-manager.service';import { SelectionManagerService } from '../../../services/selection-manager.service';import { SheetInterceptorService } from '../../../services/sheet-interceptor/sheet-interceptor.service';-import { SheetPermissionService } from '../../../services/permission';+import { WorksheetProtectionPointModel, WorksheetProtectionRuleModel } from '../../../services/permission/worksheet-permission';const TEST_WORKBOOK_DATA_DEMO: IWorkbookData = {id: 'test',@@ -95,10 +96,13 @@ export function createCommandTestBed(workbookData?: IWorkbookData, dependencies?}override onStarting(injector: Injector): void {+ injector.add([WorksheetPermissionService]);+ injector.add([WorksheetProtectionPointModel]);+ injector.add([WorkbookPermissionService]);+ injector.add([WorksheetProtectionRuleModel]);injector.add([SelectionManagerService]);injector.add([BorderStyleManagerService]);injector.add([SheetInterceptorService]);- injector.add([SheetPermissionService]);dependencies?.forEach((d) => injector.add(d));}diff --git a/packages/sheets/src/commands/commands/add-range-protection.command.ts b/packages/sheets/src/commands/commands/add-range-protection.command.tsnew file mode 100644index 0000000000..3a0c6ac4c6--- /dev/null+++ b/packages/sheets/src/commands/commands/add-range-protection.command.ts@@ -0,0 +1,70 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import type { ICommand } from '@univerjs/core';+import { CommandType, ICommandService, IUndoRedoService } from '@univerjs/core';+import type { IRangeProtectionRule } from '../../model/range-protection-rule.model';+import { RangeProtectionRuleModel } from '../../model/range-protection-rule.model';+import { AddRangeProtectionMutation } from '../mutations/add-range-protection.mutation';+import { DeleteRangeProtectionMutation } from '../mutations/delete-range-protection.mutation';++export interface IAddRangeProtectionCommandParams {+ permissionId: string;+ rule: IRangeProtectionRule;+}+export const AddRangeProtectionCommand: ICommand<IAddRangeProtectionCommandParams> = {+ type: CommandType.COMMAND,+ id: 'sheet.command.add-range-protection',+ async handler(accessor, params) {+ if (!params) {+ return false;+ }+ const commandService = accessor.get(ICommandService);+ const undoRedoService = accessor.get(IUndoRedoService);+ const selectionProtectionModel = accessor.get(RangeProtectionRuleModel);+ const { rule, permissionId } = params;++ const { unitId, subUnitId, ranges, name, description } = rule;+ const rules = [{+ ranges,+ permissionId,+ id: selectionProtectionModel.createRuleId(unitId, subUnitId),+ name,+ description,+ unitType: rule.unitType,+ unitId,+ subUnitId,+ }];++ const result = await commandService.executeCommand(AddRangeProtectionMutation.id, {+ unitId,+ subUnitId,+ rules,+ });++ if (result) {+ const redoMutations = [{ id: AddRangeProtectionMutation.id, params: { unitId, subUnitId, rules } }];+ const undoMutations = [{ id: DeleteRangeProtectionMutation.id, params: { unitId, subUnitId, ruleIds: rules.map((rule) => rule.id) } }];+ undoRedoService.pushUndoRedo({+ unitID: unitId,+ redoMutations,+ undoMutations,+ });+ }++ return true;+ },+};diff --git a/packages/sheets/src/commands/commands/delete-range-protection.command.ts b/packages/sheets/src/commands/commands/delete-range-protection.command.tsnew file mode 100644index 0000000000..3adc884a12--- /dev/null+++ b/packages/sheets/src/commands/commands/delete-range-protection.command.ts@@ -0,0 +1,56 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import type { ICommand } from '@univerjs/core';+import { CommandType, ICommandService, IUndoRedoService } from '@univerjs/core';+import { DeleteRangeProtectionMutation } from '../mutations/delete-range-protection.mutation';+import { AddRangeProtectionMutation } from '../mutations/add-range-protection.mutation';+import type { IRangeProtectionRule } from '../../model/range-protection-rule.model';++export interface IDeleteRangeProtectionCommandParams {+ unitId: string;+ subUnitId: string;+ rule: IRangeProtectionRule;+}+export const DeleteRangeProtectionCommand: ICommand<IDeleteRangeProtectionCommandParams> = {+ type: CommandType.COMMAND,+ id: 'sheet.command.delete-range-protection',+ async handler(accessor, params) {+ if (!params) {+ return false;+ }+ const commandService = accessor.get(ICommandService);+ const undoRedoService = accessor.get(IUndoRedoService);+ const { unitId, subUnitId, rule } = params;++ const redoMutationParam = {+ unitId,+ subUnitId,+ ruleIds: [rule.id],+ };+ const result = await commandService.executeCommand(DeleteRangeProtectionMutation.id, redoMutationParam);++ if (result) {+ undoRedoService.pushUndoRedo({+ unitID: unitId,+ redoMutations: [{ id: DeleteRangeProtectionMutation.id, params: redoMutationParam }],+ undoMutations: [{ id: AddRangeProtectionMutation.id, params: { unitId, subUnitId, rules: [rule] } }],+ });+ }++ return true;+ },+};diff --git a/packages/sheets/src/commands/commands/set-range-protection.command.ts b/packages/sheets/src/commands/commands/set-range-protection.command.tsnew file mode 100644index 0000000000..886f5bafd3--- /dev/null+++ b/packages/sheets/src/commands/commands/set-range-protection.command.ts@@ -0,0 +1,78 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import type { ICommand } from '@univerjs/core';+import { CommandType, ICommandService, IUndoRedoService } from '@univerjs/core';+import { SetRangeProtectionMutation } from '../mutations/set-range-protection.mutation';+import type { IRangeProtectionRule } from '../../model/range-protection-rule.model';+import { RangeProtectionRuleModel } from '../../model/range-protection-rule.model';++export interface ISetRangeProtectionCommandParams {+ permissionId: string;+ rule: IRangeProtectionRule;+ oldRule: IRangeProtectionRule;+};+export const SetRangeProtectionCommand: ICommand<ISetRangeProtectionCommandParams> = {+ type: CommandType.COMMAND,+ id: 'sheet.command.set-range-protection',+ async handler(accessor, params) {+ if (!params) {+ return false;+ }+ const commandService = accessor.get(ICommandService);+ const selectionProtectionModel = accessor.get(RangeProtectionRuleModel);+ const undoRedoService = accessor.get(IUndoRedoService);+ const { rule, permissionId, oldRule } = params;++ const { unitId, subUnitId, ranges, name, description } = rule;++ if (rule.id) {+ const redoMutationParam = {+ unitId,+ subUnitId,+ ruleId: rule.id,+ rule: {+ ranges,+ permissionId,+ id: selectionProtectionModel.createRuleId(unitId, subUnitId),+ name,+ description,+ },+ };+ const result = await commandService.executeCommand(SetRangeProtectionMutation.id, redoMutationParam);++ if (result) {+ const redoMutations = [{+ id: SetRangeProtectionMutation.id, params: redoMutationParam,+ }];+ const undoMutations = [{+ id: SetRangeProtectionMutation.id, params: {+ unitId,+ subUnitId,+ ruleId: rule.id,+ rule: oldRule,+ },+ }];+ undoRedoService.pushUndoRedo({+ unitID: unitId,+ redoMutations,+ undoMutations,+ });+ }+ }+ return true;+ },+};diff --git a/packages/sheets/src/commands/commands/set-range-values.command.ts b/packages/sheets/src/commands/commands/set-range-values.command.tsindex e50363c26b..fbdf6893a1 100644--- a/packages/sheets/src/commands/commands/set-range-values.command.ts+++ b/packages/sheets/src/commands/commands/set-range-values.command.ts@@ -18,6 +18,7 @@ import type { ICellData, ICommand, IObjectMatrixPrimitiveType, IRange } from '@uimport {CommandType,ICommandService,+ IPermissionService,isICellData,IUndoRedoService,IUniverInstanceService,@@ -31,6 +32,7 @@ import { SelectionManagerService } from '../../services/selection-manager.servicimport { SheetInterceptorService } from '../../services/sheet-interceptor/sheet-interceptor.service';import { SetRangeValuesMutation, SetRangeValuesUndoMutationFactory } from '../mutations/set-range-values.mutation';import type { ISheetCommandSharedParams } from '../utils/interface';+import { WorksheetEditPermission } from '../../services/permission/permission-point';import { getSheetCommandTarget } from './utils/target-util';export interface ISetRangeValuesCommandParams extends Partial<ISheetCommandSharedParams> {@@ -56,6 +58,7 @@ export const SetRangeValuesCommand: ICommand = {const univerInstanceService = accessor.get(IUniverInstanceService);const selectionManagerService = accessor.get(SelectionManagerService);const sheetInterceptorService = accessor.get(SheetInterceptorService);+ const permissionService = accessor.get(IPermissionService);// use subUnitId and unitId from params firstconst target = getSheetCommandTarget(univerInstanceService, {@@ -69,10 +72,15 @@ export const SetRangeValuesCommand: ICommand = {const { value, range } = params;const currentSelections = range ? [range] : selectionManagerService.getSelectionRanges();+if (!currentSelections || !currentSelections.length) {return false;}+ if (!permissionService.getPermissionPoint(new WorksheetEditPermission(unitId, subUnitId).id)) {+ return false;+ }+const cellValue = new ObjectMatrix<ICellData>();let realCellValue: IObjectMatrixPrimitiveType<ICellData> | undefined;diff --git a/packages/sheets/src/commands/commands/set-worksheet-permission-points.command.ts b/packages/sheets/src/commands/commands/set-worksheet-permission-points.command.tsnew file mode 100644index 0000000000..7878f23b8e--- /dev/null+++ b/packages/sheets/src/commands/commands/set-worksheet-permission-points.command.ts@@ -0,0 +1,44 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import type { ICommand } from '@univerjs/core';+import { CommandType, ICommandService } from '@univerjs/core';+import type { IWorksheetProtectionPointRule } from '../../services/permission/type';+import { SetWorksheetPermissionPointsMutation } from '../mutations/set-worksheet-permission-points.mutation';++export interface ISetWorksheetPermissionPointsCommandParams {+ rule: IWorksheetProtectionPointRule;+}++export const SetWorksheetPermissionPointsCommand: ICommand<ISetWorksheetPermissionPointsCommandParams> = {+ type: CommandType.COMMAND,+ id: 'sheet.command.set-worksheet-permission-points',+ async handler(accessor, params) {+ if (!params) {+ return false;+ }+ const commandService = accessor.get(ICommandService);++ const { rule } = params;++ commandService.executeCommand(SetWorksheetPermissionPointsMutation.id, {+ rule,+ unitId: rule.unitId,+ subUnitId: rule.subUnitId,+ });+ return true;+ },+};diff --git a/packages/sheets/src/commands/mutations/add-range-protection.mutation.ts b/packages/sheets/src/commands/mutations/add-range-protection.mutation.tsnew file mode 100644index 0000000000..8f51ee9d76--- /dev/null+++ b/packages/sheets/src/commands/mutations/add-range-protection.mutation.ts@@ -0,0 +1,49 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import type { IMutation, IMutationInfo } from '@univerjs/core';+import { CommandType } from '@univerjs/core';++import type { IRangeProtectionRule } from '../../model/range-protection-rule.model';+import { RangeProtectionRuleModel } from '../../model/range-protection-rule.model';+import type { IDeleteSelectionProtectionMutationParams } from './delete-range-protection.mutation';+import { DeleteRangeProtectionMutation } from './delete-range-protection.mutation';++export interface IAddRangeProtectionMutationParams {+ rules: IRangeProtectionRule[];+ unitId: string;+ subUnitId: string;+ name: string;+ description?: string;+};++export const FactoryAddRangeProtectionMutation = (param: IAddRangeProtectionMutationParams) => {+ const deleteParams: IDeleteSelectionProtectionMutationParams = { ...param, ruleIds: param.rules.map((rule) => rule.id) };+ return { id: DeleteRangeProtectionMutation.id, params: deleteParams } as IMutationInfo<IDeleteSelectionProtectionMutationParams>;+};++export const AddRangeProtectionMutation: IMutation<IAddRangeProtectionMutationParams> = {+ id: 'sheet.mutation.add-range-protection',+ type: CommandType.MUTATION,+ handler: (accessor, params) => {+ const { unitId, subUnitId, rules } = params;+ const selectionProtectionRuleModel = accessor.get(RangeProtectionRuleModel);+ rules.forEach((rule) => {+ selectionProtectionRuleModel.addRule(unitId, subUnitId, rule);+ });+ return true;+ },+};diff --git a/packages/sheets/src/commands/mutations/add-worksheet-protection.mutation.ts b/packages/sheets/src/commands/mutations/add-worksheet-protection.mutation.tsnew file mode 100644index 0000000000..420633b335--- /dev/null+++ b/packages/sheets/src/commands/mutations/add-worksheet-protection.mutation.ts@@ -0,0 +1,36 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import type { IMutation } from '@univerjs/core';+import { CommandType } from '@univerjs/core';+import { WorksheetProtectionRuleModel } from '../../services/permission/worksheet-permission/worksheet-permission-rule.model';+import type { IWorksheetProtectionRule } from '../../services/permission/type';++export interface IAddWorksheetProtectionParams {+ unitId: string;+ rule: IWorksheetProtectionRule;+}++export const AddWorksheetProtectionMutation: IMutation<IAddWorksheetProtectionParams> = {+ id: 'sheet.mutation.add-worksheet-protection',+ type: CommandType.MUTATION,+ handler: (accessor, params) => {+ const { unitId, rule } = params;+ const worksheetProtectionRuleModel = accessor.get(WorksheetProtectionRuleModel);+ worksheetProtectionRuleModel.addRule(unitId, rule);+ return true;+ },+};diff --git a/packages/sheets/src/commands/mutations/delete-range-protection.mutation.ts b/packages/sheets/src/commands/mutations/delete-range-protection.mutation.tsnew file mode 100644index 0000000000..9ad41ab8b9--- /dev/null+++ b/packages/sheets/src/commands/mutations/delete-range-protection.mutation.ts@@ -0,0 +1,48 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import type { IAccessor } from '@wendellhu/redi';+import type { IMutation, IMutationInfo } from '@univerjs/core';+import { CommandType } from '@univerjs/core';++import type { IRangeProtectionRule } from '../../model/range-protection-rule.model';+import { RangeProtectionRuleModel } from '../../model/range-protection-rule.model';+import type { IAddRangeProtectionMutationParams } from './add-range-protection.mutation';+import { AddRangeProtectionMutation } from './add-range-protection.mutation';++export interface IDeleteSelectionProtectionMutationParams {+ ruleIds: string[];+ unitId: string;+ subUnitId: string;+};+export const FactoryDeleteRangeProtectionMutation = (accessor: IAccessor, param: IDeleteSelectionProtectionMutationParams) => {+ const selectionProtectionRuleModel = accessor.get(RangeProtectionRuleModel);+ const rules = param.ruleIds.map((id) => selectionProtectionRuleModel.getRule(param.unitId, param.subUnitId, id)).filter((rule) => !!rule) as IRangeProtectionRule[];+ const result: IMutationInfo<Omit<IAddRangeProtectionMutationParams, 'name'>> = { id: AddRangeProtectionMutation.id, params: { subUnitId: param.subUnitId, unitId: param.unitId, rules } };+ return result;+};+export const DeleteRangeProtectionMutation: IMutation<IDeleteSelectionProtectionMutationParams> = {+ id: 'sheet.mutation.delete-range-protection',+ type: CommandType.MUTATION,+ handler: (accessor, params) => {+ const { unitId, subUnitId, ruleIds } = params;+ const selectionProtectionRuleModel = accessor.get(RangeProtectionRuleModel);+ ruleIds.forEach((id) => {+ selectionProtectionRuleModel.deleteRule(unitId, subUnitId, id);+ });+ return true;+ },+};diff --git a/packages/sheets/src/commands/mutations/delete-worksheet-protection.mutation.ts b/packages/sheets/src/commands/mutations/delete-worksheet-protection.mutation.tsnew file mode 100644index 0000000000..f199b77489--- /dev/null+++ b/packages/sheets/src/commands/mutations/delete-worksheet-protection.mutation.ts@@ -0,0 +1,34 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import { CommandType, type IMutation } from '@univerjs/core';+import { WorksheetProtectionRuleModel } from '../../services/permission/worksheet-permission/worksheet-permission-rule.model';++export interface IDeleteWorksheetProtectionParams {+ unitId: string;+ subUnitId: string;+}++export const DeleteWorksheetProtectionMutation: IMutation<IDeleteWorksheetProtectionParams> = {+ id: 'sheet.mutation.delete-worksheet-protection',+ type: CommandType.MUTATION,+ handler: (accessor, params) => {+ const { unitId, subUnitId } = params;+ const worksheetProtectionRuleModel = accessor.get(WorksheetProtectionRuleModel);+ worksheetProtectionRuleModel.deleteRule(unitId, subUnitId);+ return true;+ },+};diff --git a/packages/sheets/src/commands/mutations/set-range-protection.mutation.ts b/packages/sheets/src/commands/mutations/set-range-protection.mutation.tsnew file mode 100644index 0000000000..ff579022e1--- /dev/null+++ b/packages/sheets/src/commands/mutations/set-range-protection.mutation.ts@@ -0,0 +1,55 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import type { IAccessor } from '@wendellhu/redi';+import type { IMutation, IMutationInfo } from '@univerjs/core';+import { CommandType } from '@univerjs/core';++import type { IRangeProtectionRule } from '../../model/range-protection-rule.model';+import { RangeProtectionRuleModel } from '../../model/range-protection-rule.model';++export interface ISetRangeProtectionMutationParams {+ rule: IRangeProtectionRule;+ unitId: string;+ subUnitId: string;+ ruleId: string;+};++export const SetRangeProtectionMutation: IMutation<ISetRangeProtectionMutationParams> = {+ id: 'sheet.mutation.set-range-protection',+ type: CommandType.MUTATION,+ handler: (accessor, params) => {+ const { unitId, subUnitId, rule, ruleId } = params;+ const selectionProtectionRuleModel = accessor.get(RangeProtectionRuleModel);+ selectionProtectionRuleModel.setRule(unitId, subUnitId, ruleId, rule);+ return true;+ },+};+export const FactorySetRangeProtectionMutation = (accessor: IAccessor, param: ISetRangeProtectionMutationParams) => {+ const { unitId, subUnitId, ruleId } = param;+ const selectionProtectionRuleModel = accessor.get(RangeProtectionRuleModel);+ const oldRule = selectionProtectionRuleModel.getRule(unitId, subUnitId, ruleId);+ if (!oldRule) {+ return null;+ }+ const result: IMutationInfo<ISetRangeProtectionMutationParams> = {+ id: SetRangeProtectionMutation.id,+ params: {+ ...param, rule: oldRule,+ },+ };+ return result;+};diff --git a/packages/sheets/src/commands/mutations/set-worksheet-permission-points.mutation.ts b/packages/sheets/src/commands/mutations/set-worksheet-permission-points.mutation.tsnew file mode 100644index 0000000000..ffccadc7f7--- /dev/null+++ b/packages/sheets/src/commands/mutations/set-worksheet-permission-points.mutation.ts@@ -0,0 +1,37 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import type { IMutation } from '@univerjs/core';+import { CommandType } from '@univerjs/core';+import type { IWorksheetProtectionPointRule } from '../../services/permission/type';+import { WorksheetProtectionPointModel } from '../../services/permission/worksheet-permission';++export interface ISetWorksheetPermissionPointsMutationParams {+ rule: IWorksheetProtectionPointRule;+ unitId: string;+ subUnitId: string;+}++export const SetWorksheetPermissionPointsMutation: IMutation<ISetWorksheetPermissionPointsMutationParams> = {+ id: 'sheet.mutation.set-worksheet-permission-points',+ type: CommandType.MUTATION,+ handler: (accessor, params) => {+ const { rule } = params;+ const worksheetProtectionPointRuleModel = accessor.get(WorksheetProtectionPointModel);+ worksheetProtectionPointRuleModel.addRule(rule);+ return true;+ },+};diff --git a/packages/sheets/src/commands/mutations/set-worksheet-protection.mutation.ts b/packages/sheets/src/commands/mutations/set-worksheet-protection.mutation.tsnew file mode 100644index 0000000000..315e144962--- /dev/null+++ b/packages/sheets/src/commands/mutations/set-worksheet-protection.mutation.ts@@ -0,0 +1,36 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import { CommandType, type IMutation } from '@univerjs/core';+import type { IWorksheetProtectionRule } from '../../services/permission/type';+import { WorksheetProtectionRuleModel } from '../../services/permission/worksheet-permission/worksheet-permission-rule.model';++export interface ISetWorksheetProtectionParams {+ unitId: string;+ subUnitId: string;+ rule: IWorksheetProtectionRule;+}++export const SetWorksheetProtectionMutation: IMutation<ISetWorksheetProtectionParams> = {+ id: 'sheet.mutation.set-worksheet-protection',+ type: CommandType.MUTATION,+ handler: (accessor, params) => {+ const { unitId, subUnitId, rule } = params;+ const worksheetProtectionRuleModel = accessor.get(WorksheetProtectionRuleModel);+ worksheetProtectionRuleModel.setRule(unitId, subUnitId, rule);+ return true;+ },+};diff --git a/packages/sheets/src/controllers/basic-worksheet.controller.ts b/packages/sheets/src/controllers/basic-worksheet.controller.tsindex b18fe608a5..d2d51fafa9 100644--- a/packages/sheets/src/controllers/basic-worksheet.controller.ts+++ b/packages/sheets/src/controllers/basic-worksheet.controller.ts@@ -115,6 +115,19 @@ import { SetDefinedNameCommand } from '../commands/commands/set-defined-name.comimport { ScrollToCellOperation } from '../commands/operations/scroll-to-cell.operation';import { SetWorkbookNameCommand } from '../commands/commands/set-workbook-name.command';import { SetWorkbookNameMutation } from '../commands/mutations/set-workbook-name.mutation';+import { AddWorksheetProtectionMutation } from '../commands/mutations/add-worksheet-protection.mutation';+import { SetWorksheetProtectionMutation } from '../commands/mutations/set-worksheet-protection.mutation';+import { DeleteWorksheetProtectionMutation } from '../commands/mutations/delete-worksheet-protection.mutation';+import { SetWorksheetPermissionPointsMutation } from '../commands/mutations/set-worksheet-permission-points.mutation';+import { SetWorksheetPermissionPointsCommand } from '../commands/commands/set-worksheet-permission-points.command';++import { AddRangeProtectionCommand } from '../commands/commands/add-range-protection.command';+import { DeleteRangeProtectionCommand } from '../commands/commands/delete-range-protection.command';+import { SetRangeProtectionCommand } from '../commands/commands/set-range-protection.command';++import { AddRangeProtectionMutation } from '../commands/mutations/add-range-protection.mutation';+import { DeleteRangeProtectionMutation } from '../commands/mutations/delete-range-protection.mutation';+import { SetRangeProtectionMutation } from '../commands/mutations/set-range-protection.mutation';import { MAX_CELL_PER_SHEET_DEFAULT, MAX_CELL_PER_SHEET_KEY } from './config/config';export interface IStyleTypeValue<T> {@@ -227,6 +240,20 @@ export class BasicWorksheetController extends Disposable implements IDisposableRemoveDefinedNameCommand,SetDefinedNameCommand,ScrollToCellOperation,++ SetWorksheetPermissionPointsCommand,+ AddWorksheetProtectionMutation,+ SetWorksheetProtectionMutation,+ DeleteWorksheetProtectionMutation,+ SetWorksheetPermissionPointsMutation,++ // range protection+ AddRangeProtectionCommand,+ DeleteRangeProtectionCommand,+ SetRangeProtectionCommand,+ AddRangeProtectionMutation,+ DeleteRangeProtectionMutation,+ SetRangeProtectionMutation,].forEach((command) => this.disposeWithMe(this._commandService.registerCommand(command)));this._configService.setConfig(MAX_CELL_PER_SHEET_KEY, MAX_CELL_PER_SHEET_DEFAULT);diff --git a/packages/sheets/src/index.ts b/packages/sheets/src/index.tsindex c232f990d6..a676896c9b 100644--- a/packages/sheets/src/index.ts+++ b/packages/sheets/src/index.ts@@ -46,7 +46,9 @@ export { getSheetCommandTarget, getSheetCommandTargetWorkbook, getSheetMutationTexport { alignToMergedCellsBorders, getCellAtRowCol, setEndForRange, isSingleCellSelection } from './commands/commands/utils/selection-utils';export { MAX_CELL_PER_SHEET_KEY } from './controllers/config/config';export { BorderStyleManagerService, type IBorderInfo } from './services/border-style-manager.service';-export { getCurrentSheetDisabled$, SheetEditablePermission, SheetPermissionService } from './services/permission';+export * from './services/permission/permission-point';+export { WorksheetPermissionService } from './services/permission/worksheet-permission/worksheet-permission.service';+export { WorkbookPermissionService } from './services/permission/workbook-permission/workbook-permission.service';export {NORMAL_SELECTION_PLUGIN_NAME,SelectionManagerService,@@ -264,6 +266,7 @@ export type { EffectRefRangeParams, IOperator } from './services/ref-range/type'export { EffectRefRangId, OperatorType } from './services/ref-range/type';export { type ISetWorkbookNameCommandParams, SetWorkbookNameCommand } from './commands/commands/set-workbook-name.command';export { type ISetWorkbookNameMutationParams, SetWorkbookNameMutation } from './commands/mutations/set-workbook-name.mutation';+export { DefinedNameDataController } from './controllers/defined-name-data.controller';export {handleBaseInsertRange,handleBaseMoveRowsCols,@@ -296,3 +299,75 @@ export { SetDefinedNameCommand, type ISetDefinedNameCommandParams } from './commexport { ScrollToCellOperation } from './commands/operations/scroll-to-cell.operation';export type { FormatType } from './services/numfmt/type';export { getMoveRangeUndoRedoMutations } from './commands/commands/move-range.command';++// permission+export { defaultWorksheetPermissionPoint, getAllWorksheetPermissionPoint, getAllWorksheetPermissionPointByPointPanel } from './services/permission';+export type { IWorksheetProtectionRule } from './services/permission/type';+export { WorksheetProtectionRuleModel, WorksheetProtectionPointModel, WorksheetProtectionRenderService } from './services/permission/worksheet-permission';+export { AddWorksheetProtectionMutation } from './commands/mutations/add-worksheet-protection.mutation';+export { SetWorksheetProtectionMutation } from './commands/mutations/set-worksheet-protection.mutation';+export { DeleteWorksheetProtectionMutation } from './commands/mutations/delete-worksheet-protection.mutation';+export { SetWorksheetPermissionPointsCommand } from './commands/commands/set-worksheet-permission-points.command';+export { getAllWorkbookPermissionPoint, defaultWorkbookPermissionPoints } from './services/permission/workbook-permission';+export {+ WorksheetCopyPermission,+ WorksheetSelectProtectedCellsPermission,+ WorksheetSelectUnProtectedCellsPermission,+ WorksheetSetCellStylePermission,+ WorksheetSetCellValuePermission,+ WorksheetViewPermission,+ WorksheetSetRowStylePermission,+ WorksheetSetColumnStylePermission,+ WorksheetInsertRowPermission,+ WorksheetInsertColumnPermission,+ WorksheetInsertHyperlinkPermission,+ WorksheetDeleteRowPermission,+ WorksheetDeleteColumnPermission,+ WorksheetSortPermission,+ WorksheetFilterPermission,+ WorksheetPivotTablePermission,+ WorksheetEditExtraObjectPermission,+ WorksheetManageCollaboratorPermission,+ WorksheetEditPermission,++ WorkbookCommentPermission,+ WorkbookEditablePermission,+ WorkbookDuplicatePermission,+ WorkbookPrintPermission,+ WorkbookExportPermission,+ WorkbookMoveSheetPermission,+ WorkbookDeleteSheetPermission,+ WorkbookHideSheetPermission,+ WorkbookRenameSheetPermission,+ WorkbookCreateSheetPermission,+ WorkbookHistoryPermission,+ WorkbookViewPermission,+ WorkbookSharePermission,+ WorkbookCopyPermission,+ WorkbookManageCollaboratorPermission,+} from './services/permission/permission-point';++// range-protection+export { AddRangeProtectionCommand, type IAddRangeProtectionCommandParams } from './commands/commands/add-range-protection.command';+export { DeleteRangeProtectionCommand, type IDeleteRangeProtectionCommandParams } from './commands/commands/delete-range-protection.command';+export { SetRangeProtectionCommand, type ISetRangeProtectionCommandParams } from './commands/commands/set-range-protection.command';++export { AddRangeProtectionMutation, FactoryAddRangeProtectionMutation, type IAddRangeProtectionMutationParams } from './commands/mutations/add-range-protection.mutation';+export { DeleteRangeProtectionMutation, FactoryDeleteRangeProtectionMutation, type IDeleteSelectionProtectionMutationParams } from './commands/mutations/delete-range-protection.mutation';+export { SetRangeProtectionMutation, FactorySetRangeProtectionMutation, type ISetRangeProtectionMutationParams } from './commands/mutations/set-range-protection.mutation';++export { RangeProtectionCanViewRenderExtension, RangeProtectionCanNotViewRenderExtension, type IRangeProtectionRenderCellData, RANGE_PROTECTION_CAN_VIEW_RENDER_EXTENSION_KEY, RANGE_PROTECTION_CAN_NOT_VIEW_RENDER_EXTENSION_KEY } from './render/range-protection/range-protection.render';++export { RangeProtectionRenderModel, type ICellPermission } from './model/range-protection-render.model';+export { RangeProtectionRuleModel, type IObjectModel, type IRangeProtectionRule, type IModel } from './model/range-protection-rule.model';++export { RangeProtectionRefRangeService } from './services/permission/range-permission/range-protection.ref-range';+export { RangeProtectionService } from './services/permission/range-permission/range-protection.service';+export {+ type IRangePermissionPoint,+ getAllRangePermissionPoint,+ getDefaultRangePermission,+} from './services/permission/range-permission/util';++export { RangeProtectionPermissionEditPoint } from './services/permission/permission-point/range/edit';+export { RangeProtectionPermissionViewPoint } from './services/permission/permission-point/range/view';diff --git a/packages/sheets/src/model/range-protection-render.model.ts b/packages/sheets/src/model/range-protection-render.model.tsnew file mode 100644index 0000000000..884bb2c815--- /dev/null+++ b/packages/sheets/src/model/range-protection-render.model.ts@@ -0,0 +1,113 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import { Inject } from '@wendellhu/redi';+import { filter, map } from 'rxjs/operators';+import { IPermissionService, LifecycleStages, LRUMap, OnLifecycle, Range } from '@univerjs/core';+import type { UnitAction } from '@univerjs/protocol';+import { UnitObject } from '@univerjs/protocol';++import type { IRange } from '@univerjs/core';+import type { getDefaultRangePermission, IRangePermissionPoint } from '../services/permission/range-permission/util';+import { getAllRangePermissionPoint } from '../services/permission/range-permission/util';++import { RangeProtectionRuleModel } from './range-protection-rule.model';++export type ICellPermission = Record<UnitAction, boolean> & { ruleId?: string; ranges?: IRange[] };++@OnLifecycle(LifecycleStages.Ready, RangeProtectionRenderModel)+export class RangeProtectionRenderModel {+ private _cache = new LRUMap<string, ICellPermission[]>(10000);+ constructor(+ @Inject(RangeProtectionRuleModel) private _selectionProtectionRuleModel: RangeProtectionRuleModel,+ @Inject(IPermissionService) private _permissionService: IPermissionService+ ) {+ this._init();+ }++ private _init() {+ this._permissionService.permissionPointUpdate$.pipe(+ filter((permission) => permission.type === UnitObject.SelectRange),+ filter((permission) => getAllRangePermissionPoint().some((F) => permission instanceof F)),+ map((permission) => permission as IRangePermissionPoint)+ )+ .subscribe((permission) => {+ const ruleMap = this._selectionProtectionRuleModel.getSubunitRuleList(permission.unitId, permission.subUnitId);+ for (const rule of ruleMap) {+ if (rule.permissionId === permission.permissionId) {+ rule.ranges.forEach((range) => {+ Range.foreach(range, (row, col) => {+ const key = this._createKey(permission.unitId, permission.subUnitId, row, col);+ this._cache.delete(key);+ });+ });+ }+ }+ });++ this._selectionProtectionRuleModel.ruleChange$.subscribe((info) => {+ info.rule.ranges.forEach((range) => {+ Range.foreach(range, (row, col) => {+ const key = this._createKey(info.unitId, info.subUnitId, row, col);+ this._cache.delete(key);+ });+ });+ if (info.type === 'set') {+ info.oldRule?.ranges.forEach((range) => {+ Range.foreach(range, (row, col) => {+ const key = this._createKey(info.unitId, info.subUnitId, row, col);+ this._cache.delete(key);+ });+ });+ }+ });+ }++ private _createKey(unitId: string, subUnitId: string, row: number, col: number) {+ return `${unitId}_${subUnitId}_${row}_${col}`;+ }++ public getCellInfo(unitId: string, subUnitId: string, row: number, col: number) {+ const key = this._createKey(unitId, subUnitId, row, col);+ const cacheValue = this._cache.get(key);+ if (cacheValue) {+ return cacheValue;+ }+ const ruleMap = this._selectionProtectionRuleModel.getSubunitRuleList(unitId, subUnitId);+ const defaultV: ICellPermission[] = [];+ if (!ruleMap || !ruleMap.length) {+ return defaultV;+ }+ const result: ICellPermission[] = [];+ for (const rule of ruleMap) {+ if (rule.ranges.some((range) => range.startRow <= row && range.endRow >= row && range.startColumn <= col && range.endColumn >= col)) {+ const permissionMap = getAllRangePermissionPoint().reduce((result, F) => {+ const instance = new F(unitId, subUnitId, rule.permissionId);+ const permission = this._permissionService.getPermissionPoint(instance.id);+ result[instance.subType] = permission?.value ?? instance.value;+ return result;+ }, {} as ReturnType<typeof getDefaultRangePermission>);+ result.push({ ...permissionMap, ruleId: rule.id, ranges: rule.ranges });+ }+ }+ this._cache.set(key, result);+ return result;+ }++ public clear() {+ this._cache.clear();+ }+}diff --git a/packages/sheets/src/model/range-protection-rule.model.ts b/packages/sheets/src/model/range-protection-rule.model.tsnew file mode 100644index 0000000000..2abca27732--- /dev/null+++ b/packages/sheets/src/model/range-protection-rule.model.ts@@ -0,0 +1,161 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import { BehaviorSubject, Subject } from 'rxjs';+import type { IRange } from '@univerjs/core';+import { LifecycleStages, OnLifecycle, Tools } from '@univerjs/core';++import type { UnitObject } from '@univerjs/protocol';++export interface IRangeProtectionRule {+ ranges: IRange[];+ permissionId: string;+ id: string;+ name: string;+ description?: string;+ unitType: UnitObject;+ unitId: string;+ subUnitId: string;+}+export type IObjectModel = Record<string, Record<string, IRangeProtectionRule[]>>;++export type IModel = Map<string, Map<string, Map<string, IRangeProtectionRule>>>;++type IRuleChangeType = 'add' | 'set' | 'delete';+@OnLifecycle(LifecycleStages.Starting, RangeProtectionRuleModel)++export class RangeProtectionRuleModel {+ /**+ *+ * Map<unitId, Map<subUnitId, Map<ruleId, IRangeProtectionRule>>>+ */+ private _model: IModel = new Map();++ private _ruleChange = new Subject<{+ unitId: string;+ subUnitId: string;+ rule: IRangeProtectionRule;+ oldRule?: IRangeProtectionRule;+ type: IRuleChangeType;+ }>();++ ruleChange$ = this._ruleChange.asObservable();++ private _ruleRefresh = new Subject();+ ruleRefresh$ = this._ruleRefresh.asObservable();++ ruleRefresh(id: string) {+ this._ruleRefresh.next(id);+ }++ private _rangeRuleInitStateChange = new BehaviorSubject<boolean>(false);+ rangeRuleInitStateChange$ = this._rangeRuleInitStateChange.asObservable();++ changeRuleInitState(state: boolean) {+ this._rangeRuleInitStateChange.next(state);+ }++ addRule(unitId: string, subUnitId: string, rule: IRangeProtectionRule) {+ const ruleMap = this._ensureRuleMap(unitId, subUnitId);+ ruleMap.set(rule.id, rule);+ this._ruleChange.next({ unitId, subUnitId, rule, type: 'add' });+ }++ deleteRule(unitId: string, subUnitId: string, id: string) {+ const rule = this._model.get(unitId)?.get(subUnitId)?.get(id);+ if (rule) {+ this._model.get(unitId)?.get(subUnitId)?.delete(id);+ this._ruleChange.next({ unitId, subUnitId, rule, type: 'delete' });+ }+ }++ setRule(unitId: string, subUnitId: string, id: string, rule: IRangeProtectionRule) {+ const oldRule = this.getRule(unitId, subUnitId, id);+ if (oldRule) {+ this._model.get(unitId)?.get(subUnitId)?.set(id, rule);+ this._ruleChange.next({ unitId, subUnitId, oldRule, rule, type: 'set' });+ }+ }++ getRule(unitId: string, subUnitId: string, id: string) {+ return this._model.get(unitId)?.get(subUnitId)?.get(id);+ }++ getSubunitRuleList(unitId: string, subUnitId: string) {+ const map = this._model.get(unitId)?.get(subUnitId) || new Map();+ return [...map.values()] as IRangeProtectionRule[];+ }++ private _ensureRuleMap(unitId: string, subUnitId: string) {+ let subUnitMap = this._model.get(unitId);+ if (!subUnitMap) {+ subUnitMap = new Map();+ this._model.set(unitId, subUnitMap);+ }+ let ruleMap = subUnitMap.get(subUnitId);++ if (!ruleMap) {+ ruleMap = new Map<string, IRangeProtectionRule>();+ subUnitMap.set(subUnitId, ruleMap);+ }+ return ruleMap;+ }++ toObject() {+ const result: IObjectModel = {};+ const unitKeys = [...this._model.keys()];+ unitKeys.forEach((unitId) => {+ const submitMap = this._model.get(unitId)!;+ const subUnitKeys = [...submitMap.keys()];+ result[unitId] = {};+ subUnitKeys.forEach((subunitId) => {+ const ruleMap = submitMap.get(subunitId)!;+ result[unitId][subunitId] = [...ruleMap.values()];+ });+ });+ return result;+ }++ fromObject(obj: IObjectModel) {+ const result: IModel = new Map();+ Object.keys(obj).forEach((unitId) => {+ const subUnitObj = obj[unitId];+ const map = new Map<string, Map<string, IRangeProtectionRule>>();+ Object.keys(subUnitObj).forEach((subunitId) => {+ const ruleMap = subUnitObj[subunitId].reduce((result, cur) => {+ result.set(cur.id, cur);+ return result;+ }, new Map<string, IRangeProtectionRule>());+ map.set(subunitId, ruleMap);+ });+ result.set(unitId, map);+ });+ this._model = result;+ }++ deleteUnitModel() {+ this._model.clear();+ }++ createRuleId(unitId: string, subUnitId: string) {+ let id = Tools.generateRandomId(4);+ const ruleMap = this._ensureRuleMap(unitId, subUnitId);+ while (ruleMap.has(id)) {+ id = Tools.generateRandomId(4);+ }+ return id;+ }+}diff --git a/packages/sheets/src/render/image/protect-background-img.ts b/packages/sheets/src/render/image/protect-background-img.tsnew file mode 100644index 0000000000..f30f182531--- /dev/null+++ b/packages/sheets/src/render/image/protect-background-img.ts@@ -0,0 +1,17 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+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';diff --git a/packages/sheets/src/render/range-protection/range-protection.render.ts b/packages/sheets/src/render/range-protection/range-protection.render.tsnew file mode 100644index 0000000000..694073e85d--- /dev/null+++ b/packages/sheets/src/render/range-protection/range-protection.render.ts@@ -0,0 +1,124 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import type { ICellDataForSheetInterceptor, IRange, IScale } from '@univerjs/core';+import { Range } from '@univerjs/core';+import type { SpreadsheetSkeleton, UniverRenderingContext } from '@univerjs/engine-render';+import { SheetExtension } from '@univerjs/engine-render';+import { UnitAction } from '@univerjs/protocol';+import type { ICellPermission } from '../../model/range-protection-render.model';+import { base64 } from '../image/protect-background-img';++export const RANGE_PROTECTION_CAN_VIEW_RENDER_EXTENSION_KEY = 'RANGE_PROTECTION_CAN_VIEW_RENDER_EXTENSION_KEY';+export const RANGE_PROTECTION_CAN_NOT_VIEW_RENDER_EXTENSION_KEY = 'RANGE_PROTECTION_CAN_NOT_VIEW_RENDER_EXTENSION_KEY';++const EXTENSION_CAN_VIEW_Z_INDEX = 25;+const EXTENSION_CAN_NOT_VIEW_Z_INDEX = 80;++export type IRangeProtectionRenderCellData = ICellDataForSheetInterceptor & { selectionProtection: ICellPermission[] };++export abstract class RangeProtectionRenderExtension extends SheetExtension {+ abstract override uKey: string;+ abstract override Z_INDEX: number;+ protected _pattern: CanvasPattern | null = null;+ protected _img = new Image();+ public renderCache = new Set<string>();++ constructor() {+ super();+ this._img.src = base64;+ }++ override clearCache(): void {+ this.renderCache.clear();+ }++ protected abstract shouldRender(config: ICellPermission): boolean;++ override draw(+ ctx: UniverRenderingContext,+ _parentScale: IScale,+ spreadsheetSkeleton: SpreadsheetSkeleton,+ _diffRanges?: IRange[]+ ) {+ const { rowHeightAccumulation, columnWidthAccumulation, worksheet, dataMergeCache } =+ spreadsheetSkeleton;+ if (!worksheet) {+ return;+ }+ ctx.save();+ if (!this._pattern) {+ this._pattern = ctx.createPattern(this._img, 'repeat');+ }+ this.renderCache.clear();+ Range.foreach(spreadsheetSkeleton.rowColumnSegment, (row, col) => {+ if (!worksheet.getColVisible(col) || !worksheet.getRowVisible(row)) {+ return;+ }+ const { selectionProtection = [] } = worksheet.getCell(row, col) as IRangeProtectionRenderCellData || {};+ if (!this._pattern) {+ return;+ }++ ctx.fillStyle = this._pattern;++ selectionProtection.forEach((config) => {+ if (!config.ruleId) {+ return;+ }++ if (this.shouldRender(config)) {+ if (this.renderCache.has(config.ruleId)) {+ return;+ }+ this.renderCache.add(config.ruleId);+ config.ranges!.forEach((range) => {+ const start = this.getCellIndex(range.startRow, range.startColumn, rowHeightAccumulation, columnWidthAccumulation, dataMergeCache);+ const end = this.getCellIndex(range.endRow, range.endColumn, rowHeightAccumulation, columnWidthAccumulation, dataMergeCache);+ ctx.fillRect(start.startX, start.startY, end.endX - start.startX, end.endY - start.startY);+ });+ }+ });+ });+ ctx.restore();+ }+}++export class RangeProtectionCanViewRenderExtension extends RangeProtectionRenderExtension {+ override uKey = RANGE_PROTECTION_CAN_VIEW_RENDER_EXTENSION_KEY;+ override Z_INDEX = EXTENSION_CAN_VIEW_Z_INDEX;++ constructor() {+ super();+ }++ protected override shouldRender(config: ICellPermission): boolean {+ return config?.[UnitAction.View] !== false;+ }+}++export class RangeProtectionCanNotViewRenderExtension extends RangeProtectionRenderExtension {+ override uKey = RANGE_PROTECTION_CAN_NOT_VIEW_RENDER_EXTENSION_KEY;+ override Z_INDEX = EXTENSION_CAN_NOT_VIEW_Z_INDEX;++ constructor() {+ super();+ }++ protected override shouldRender(config: ICellPermission): boolean {+ return config?.[UnitAction.View] === false;+ }+}diff --git a/packages/sheets/src/render/worksheet-protection/worksheet-permission.render.ts b/packages/sheets/src/render/worksheet-protection/worksheet-permission.render.tsnew file mode 100644index 0000000000..5642c9dd86--- /dev/null+++ b/packages/sheets/src/render/worksheet-protection/worksheet-permission.render.ts@@ -0,0 +1,87 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import type { IRange, IScale } from '@univerjs/core';+import type { SpreadsheetSkeleton, UniverRenderingContext } from '@univerjs/engine-render';+import { SheetExtension } from '@univerjs/engine-render';+import { UnitAction } from '@univerjs/protocol';+import type { IWorksheetProtectionRenderCellData } from '../../services/permission/worksheet-permission/type';+import { base64 } from '../image/protect-background-img';++export const worksheetProtectionKey = 'worksheet-protection';+const EXTENSION_CAN_VIEW_Z_INDEX = 25;+const EXTENSION_CAN_NOT_VIEW_Z_INDEX = 80;++export class WorksheetProtectionRenderExtension extends SheetExtension {+ override uKey = worksheetProtectionKey;++ override Z_INDEX = EXTENSION_CAN_VIEW_Z_INDEX;+ private _pattern: CanvasPattern | null;++ private _img = new Image();++ constructor() {+ super();+ this._img.src = base64;+ }++ override draw(+ ctx: UniverRenderingContext,+ _parentScale: IScale,+ spreadsheetSkeleton: SpreadsheetSkeleton,+ _diffRanges?: IRange[]+ ) {+ const { rowHeightAccumulation, columnWidthAccumulation, worksheet, dataMergeCache } =+ spreadsheetSkeleton;+ if (!worksheet) {+ return false;+ }++ ctx.save();+ if (!this._pattern) {+ this._pattern = ctx.createPattern(this._img, 'repeat');+ }+ const { startRow, startColumn, endRow, endColumn } = spreadsheetSkeleton.rowColumnSegment;+ const start = this.getCellIndex(startRow, startColumn, rowHeightAccumulation, columnWidthAccumulation, dataMergeCache);+ const end = this.getCellIndex(endRow, endColumn, rowHeightAccumulation, columnWidthAccumulation, dataMergeCache);++ const { hasWorksheetRule = false, selectionProtection = [] } = worksheet.getCell(startRow, startColumn) as IWorksheetProtectionRenderCellData || {};+ if (!this._pattern) {+ return;+ }++ if (selectionProtection.length > 0) {+ const cellProtectionConfig = selectionProtection[0];+ const viewPermission = cellProtectionConfig?.[UnitAction.View];+ if (viewPermission) {+ this.setZIndex(EXTENSION_CAN_VIEW_Z_INDEX);+ } else {+ this.setZIndex(EXTENSION_CAN_NOT_VIEW_Z_INDEX);+ }+ }++ ctx.fillStyle = this._pattern;+ if (hasWorksheetRule) {+ ctx.fillRect(start.startX, start.startY, end.endX - start.startX, end.endY - start.startY);+ }++ ctx.restore();+ }++ setZIndex(zIndex: number) {+ this.Z_INDEX = zIndex;+ }+}diff --git a/packages/sheets/src/services/permission/index.ts b/packages/sheets/src/services/permission/index.tsindex 9a70367152..102db3631b 100644--- a/packages/sheets/src/services/permission/index.ts+++ b/packages/sheets/src/services/permission/index.ts@@ -14,6 +14,4 @@* limitations under the License.*/-export { SheetEditablePermission } from './permission-point';-export { SheetPermissionService } from './sheet-permission.service';-export * from './tool';+export { defaultWorksheetPermissionPoint, getAllWorksheetPermissionPoint, getAllWorksheetPermissionPointByPointPanel } from './worksheet-permission/utils';diff --git a/packages/sheets/src/services/permission/permission-point/index.ts b/packages/sheets/src/services/permission/permission-point/index.tsnew file mode 100644index 0000000000..0bc686eabe--- /dev/null+++ b/packages/sheets/src/services/permission/permission-point/index.ts@@ -0,0 +1,54 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++export { WorksheetCopyPermission } from './worksheet/copy';+export { WorksheetSelectProtectedCellsPermission } from './worksheet/select-protected-cells';+export { WorksheetSelectUnProtectedCellsPermission } from './worksheet/select-un-protected-cells';+export { WorksheetSetCellStylePermission } from './worksheet/set-cell-style';+export { WorksheetSetCellValuePermission } from './worksheet/set-cell-value';+export { WorksheetViewPermission } from './worksheet/view';+export { WorksheetSetRowStylePermission } from './worksheet/set-row-style';+export { WorksheetSetColumnStylePermission } from './worksheet/set-column-style';+export { WorksheetInsertRowPermission } from './worksheet/insert-row';+export { WorksheetInsertColumnPermission } from './worksheet/insert-column';+export { WorksheetInsertHyperlinkPermission } from './worksheet/insert-hyperlink';+export { WorksheetDeleteRowPermission } from './worksheet/delete-row';+export { WorksheetDeleteColumnPermission } from './worksheet/delete-column';+export { WorksheetSortPermission } from './worksheet/sort';+export { WorksheetFilterPermission } from './worksheet/filter';+export { WorksheetPivotTablePermission } from './worksheet/pivot-table';+export { WorksheetEditExtraObjectPermission } from './worksheet/edit-extra-object';+export { WorksheetManageCollaboratorPermission } from './worksheet/manage-collaborator';+export { WorksheetEditPermission } from './worksheet/edit';++export { WorkbookCommentPermission } from './workbook/comment';+export { WorkbookEditablePermission } from './workbook/editable';+export { WorkbookDuplicatePermission } from './workbook/duplicate';+export { WorkbookPrintPermission } from './workbook/print';+export { WorkbookExportPermission } from './workbook/export';+export { WorkbookMoveSheetPermission } from './workbook/move-sheet';+export { WorkbookDeleteSheetPermission } from './workbook/delete-sheet';+export { WorkbookHideSheetPermission } from './workbook/hide-sheet';+export { WorkbookRenameSheetPermission } from './workbook/rename-sheet';+export { WorkbookCreateSheetPermission } from './workbook/create-sheet';+export { WorkbookHistoryPermission } from './workbook/history';+export { WorkbookViewPermission } from './workbook/view';+export { WorkbookSharePermission } from './workbook/share';+export { WorkbookCopyPermission } from './workbook/copy';+export { WorkbookManageCollaboratorPermission } from './workbook/manage-collaborator';++export { RangeProtectionPermissionEditPoint } from './range/edit';+export { RangeProtectionPermissionViewPoint } from './range/view';diff --git a/packages/sheets/src/services/permission/permission-point/range/edit.ts b/packages/sheets/src/services/permission/permission-point/range/edit.tsnew file mode 100644index 0000000000..03fd000f86--- /dev/null+++ b/packages/sheets/src/services/permission/permission-point/range/edit.ts@@ -0,0 +1,36 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import type { IPermissionPoint } from '@univerjs/core';+import { PermissionStatus } from '@univerjs/core';+import { UnitAction, UnitObject } from '@univerjs/protocol';++export class RangeProtectionPermissionEditPoint implements IPermissionPoint {+ type = UnitObject.SelectRange;+ subType = UnitAction.Edit;+ status = PermissionStatus.INIT;+ value = true;+ id: string;+ unitId: string;+ subUnitId: string;+ permissionId: string;+ constructor(unitId: string, subUnitId: string, permissionId: string) {+ this.unitId = unitId;+ this.subUnitId = subUnitId;+ this.permissionId = permissionId;+ this.id = `${UnitObject.SelectRange}.${UnitAction.Edit}.${permissionId}`;+ }+}diff --git a/packages/sheets/src/services/permission/permission-point/range/view.ts b/packages/sheets/src/services/permission/permission-point/range/view.tsnew file mode 100644index 0000000000..ab93fc50dc--- /dev/null+++ b/packages/sheets/src/services/permission/permission-point/range/view.ts@@ -0,0 +1,36 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import type { IPermissionPoint } from '@univerjs/core';+import { PermissionStatus } from '@univerjs/core';+import { UnitAction, UnitObject } from '@univerjs/protocol';++export class RangeProtectionPermissionViewPoint implements IPermissionPoint {+ type = UnitObject.SelectRange;+ subType = UnitAction.View;+ status = PermissionStatus.INIT;+ value = true;+ id: string;+ unitId: string;+ subUnitId: string;+ permissionId: string;+ constructor(unitId: string, subUnitId: string, permissionId: string) {+ this.unitId = unitId;+ this.subUnitId = subUnitId;+ this.permissionId = permissionId;+ this.id = `${UnitObject.SelectRange}.${UnitAction.View}.${permissionId}`;+ }+}diff --git a/packages/core/src/shared/permission/index.ts b/packages/sheets/src/services/permission/permission-point/workbook/comment.tssimilarity index 53%rename from packages/core/src/shared/permission/index.tsrename to packages/sheets/src/services/permission/permission-point/workbook/comment.tsindex b52c07d3c9..fd5c50a5d6 100644--- a/packages/core/src/shared/permission/index.ts+++ b/packages/sheets/src/services/permission/permission-point/workbook/comment.ts@@ -14,21 +14,19 @@* limitations under the License.*/-export enum PermissionStatus {- INIT = 'init',- FETCHING = 'fetching',- DONE = 'done',-}-export abstract class PermissionPoint<T = any> {- abstract id: string; // permission- abstract value: T;- abstract unitID: string;+import type { IPermissionPoint } from '@univerjs/core';+import { PermissionStatus } from '@univerjs/core';+import { UnitAction, UnitObject } from '@univerjs/protocol';++export class WorkbookCommentPermission implements IPermissionPoint {+ id: string;+ value = true;+ type = UnitObject.Workbook;status = PermissionStatus.INIT;-}+ subType = UnitAction.Comment;-export const getTypeFromPermissionItemList = (list: PermissionPoint[]) =>- list.some((item) => item.status === PermissionStatus.INIT)- ? PermissionStatus.INIT- : list.some((item) => item.status === PermissionStatus.FETCHING)- ? PermissionStatus.FETCHING- : PermissionStatus.DONE;+ constructor(public unitId: string) {+ this.unitId = unitId;+ this.id = `${this.type}.${UnitAction.Comment}_${unitId}`;+ }+}diff --git a/packages/sheets/src/services/permission/permission-point/workbook/copy-sheet.ts b/packages/sheets/src/services/permission/permission-point/workbook/copy-sheet.tsnew file mode 100644index 0000000000..7287eb49de--- /dev/null+++ b/packages/sheets/src/services/permission/permission-point/workbook/copy-sheet.ts@@ -0,0 +1,32 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import type { IPermissionPoint } from '@univerjs/core';+import { PermissionStatus } from '@univerjs/core';+import { UnitAction, UnitObject } from '@univerjs/protocol';++export class WorkbookCopySheetPermission implements IPermissionPoint {+ id: string;+ value = true;+ type = UnitObject.Workbook;+ subType = UnitAction.CopySheet;+ status = PermissionStatus.INIT;++ constructor(public unitId: string) {+ this.unitId = unitId;+ this.id = `${this.type}.${UnitAction.CopySheet}_${unitId}`;+ }+}diff --git a/packages/sheets/src/services/permission/permission-point.ts b/packages/sheets/src/services/permission/permission-point/workbook/copy.tssimilarity index 56%rename from packages/sheets/src/services/permission/permission-point.tsrename to packages/sheets/src/services/permission/permission-point/workbook/copy.tsindex 4284c834fc..15dc077639 100644--- a/packages/sheets/src/services/permission/permission-point.ts+++ b/packages/sheets/src/services/permission/permission-point/workbook/copy.ts@@ -14,21 +14,20 @@* limitations under the License.*/-import { PermissionPoint } from '@univerjs/core';+import type { IPermissionPoint } from '@univerjs/core';+import { PermissionStatus } from '@univerjs/core';+import { UnitAction, UnitObject } from '@univerjs/protocol';-const SheetEditablePermissionPoint = 'univer.sheet.editable';--export class SheetEditablePermission extends PermissionPoint<boolean> {- id = SheetEditablePermissionPoint;+export class WorkbookCopyPermission implements IPermissionPoint {+ id: string;value = true;- unitID: string;+ type = UnitObject.Workbook;+ status = PermissionStatus.INIT;+ subType = UnitAction.Copy;- constructor(- private _unitId: string,- private _subUnitId: string- ) {- super();- this.unitID = _unitId;- this.id = `${SheetEditablePermissionPoint}_${_unitId}_${_subUnitId}`;+ constructor(public unitId: string) {+ this.unitId = unitId;+ this.id = `${this.type}.${UnitAction.Copy}_${unitId}`;}}+diff --git a/packages/sheets/src/services/permission/permission-point/workbook/create-sheet.ts b/packages/sheets/src/services/permission/permission-point/workbook/create-sheet.tsnew file mode 100644index 0000000000..f9606bfd63--- /dev/null+++ b/packages/sheets/src/services/permission/permission-point/workbook/create-sheet.ts@@ -0,0 +1,32 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import type { IPermissionPoint } from '@univerjs/core';+import { PermissionStatus } from '@univerjs/core';+import { UnitAction, UnitObject } from '@univerjs/protocol';++export class WorkbookCreateSheetPermission implements IPermissionPoint {+ id: string;+ value = true;+ type = UnitObject.Workbook;+ status = PermissionStatus.INIT;+ subType = UnitAction.CreateSheet;++ constructor(public unitId: string) {+ this.unitId = unitId;+ this.id = `${this.type}.${UnitAction.CreateSheet}_${unitId}` as string;+ }+}diff --git a/packages/sheets/src/services/permission/permission-point/workbook/delete-sheet.ts b/packages/sheets/src/services/permission/permission-point/workbook/delete-sheet.tsnew file mode 100644index 0000000000..8cc935ed66--- /dev/null+++ b/packages/sheets/src/services/permission/permission-point/workbook/delete-sheet.ts@@ -0,0 +1,32 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import type { IPermissionPoint } from '@univerjs/core';+import { PermissionStatus } from '@univerjs/core';+import { UnitAction, UnitObject } from '@univerjs/protocol';++export class WorkbookDeleteSheetPermission implements IPermissionPoint {+ id: string;+ value = true;+ type = UnitObject.Workbook;+ status = PermissionStatus.INIT;+ subType = UnitAction.DeleteSheet;++ constructor(public unitId: string) {+ this.unitId = unitId;+ this.id = `${this.type}.${UnitAction.DeleteSheet}_${unitId}`;+ }+}diff --git a/packages/sheets/src/services/permission/permission-point/workbook/duplicate.ts b/packages/sheets/src/services/permission/permission-point/workbook/duplicate.tsnew file mode 100644index 0000000000..460aeb7519--- /dev/null+++ b/packages/sheets/src/services/permission/permission-point/workbook/duplicate.ts@@ -0,0 +1,32 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import type { IPermissionPoint } from '@univerjs/core';+import { PermissionStatus } from '@univerjs/core';+import { UnitAction, UnitObject } from '@univerjs/protocol';++export class WorkbookDuplicatePermission implements IPermissionPoint {+ id: string;+ value = true;+ type = UnitObject.Workbook;+ status = PermissionStatus.INIT;+ subType = UnitAction.Duplicate;++ constructor(public unitId: string) {+ this.unitId = unitId;+ this.id = `${this.type}.${UnitAction.Duplicate}_${unitId}`;+ }+}diff --git a/packages/sheets/src/services/permission/permission-point/workbook/editable.ts b/packages/sheets/src/services/permission/permission-point/workbook/editable.tsnew file mode 100644index 0000000000..71a9323f37--- /dev/null+++ b/packages/sheets/src/services/permission/permission-point/workbook/editable.ts@@ -0,0 +1,33 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import type { IPermissionPoint } from '@univerjs/core';+import { PermissionStatus } from '@univerjs/core';+import { UnitAction, UnitObject } from '@univerjs/protocol';++export class WorkbookEditablePermission implements IPermissionPoint {+ id: string;+ value = true;+ type = UnitObject.Workbook;+ status = PermissionStatus.INIT;+ subType = UnitAction.Edit;++ constructor(public unitId: string) {+ this.unitId = unitId;+ this.id = `${this.type}.${UnitAction.Edit}_${unitId}`;+ }+}+diff --git a/packages/sheets/src/services/permission/permission-point/workbook/export.ts b/packages/sheets/src/services/permission/permission-point/workbook/export.tsnew file mode 100644index 0000000000..d5907d0bdf--- /dev/null+++ b/packages/sheets/src/services/permission/permission-point/workbook/export.ts@@ -0,0 +1,32 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import type { IPermissionPoint } from '@univerjs/core';+import { PermissionStatus } from '@univerjs/core';+import { UnitAction, UnitObject } from '@univerjs/protocol';++export class WorkbookExportPermission implements IPermissionPoint {+ id: string;+ value = true;+ type = UnitObject.Workbook;+ status = PermissionStatus.INIT;+ subType = UnitAction.Export;++ constructor(public unitId: string) {+ this.unitId = unitId;+ this.id = `${this.type}.${UnitAction.Export}_${unitId}`;+ }+}diff --git a/packages/sheets/src/services/permission/permission-point/workbook/hide-sheet.ts b/packages/sheets/src/services/permission/permission-point/workbook/hide-sheet.tsnew file mode 100644index 0000000000..be3819645a--- /dev/null+++ b/packages/sheets/src/services/permission/permission-point/workbook/hide-sheet.ts@@ -0,0 +1,32 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import type { IPermissionPoint } from '@univerjs/core';+import { PermissionStatus } from '@univerjs/core';+import { UnitAction, UnitObject } from '@univerjs/protocol';++export class WorkbookHideSheetPermission implements IPermissionPoint {+ id: string;+ value = true;+ type = UnitObject.Workbook;+ status = PermissionStatus.INIT;+ subType = UnitAction.HideSheet;++ constructor(public unitId: string) {+ this.unitId = unitId;+ this.id = `${this.type}.${UnitAction.HideSheet}_${unitId}`;+ }+}diff --git a/packages/sheets/src/services/permission/permission-point/workbook/history.ts b/packages/sheets/src/services/permission/permission-point/workbook/history.tsnew file mode 100644index 0000000000..7fdae534cb--- /dev/null+++ b/packages/sheets/src/services/permission/permission-point/workbook/history.ts@@ -0,0 +1,32 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import type { IPermissionPoint } from '@univerjs/core';+import { PermissionStatus } from '@univerjs/core';+import { UnitAction, UnitObject } from '@univerjs/protocol';++export class WorkbookHistoryPermission implements IPermissionPoint {+ id: string;+ value = true;+ type = UnitObject.Workbook;+ status = PermissionStatus.INIT;+ subType = UnitAction.History;++ constructor(public unitId: string) {+ this.unitId = unitId;+ this.id = `${this.type}.${UnitAction.History}_${unitId}`;+ }+}diff --git a/packages/sheets/src/services/permission/permission-point/workbook/manage-collaborator.ts b/packages/sheets/src/services/permission/permission-point/workbook/manage-collaborator.tsnew file mode 100644index 0000000000..d00f3bec51--- /dev/null+++ b/packages/sheets/src/services/permission/permission-point/workbook/manage-collaborator.ts@@ -0,0 +1,32 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import type { IPermissionPoint } from '@univerjs/core';+import { PermissionStatus } from '@univerjs/core';+import { UnitAction, UnitObject } from '@univerjs/protocol';++export class WorkbookManageCollaboratorPermission implements IPermissionPoint {+ id: string;+ value = true;+ type = UnitObject.Workbook;+ status = PermissionStatus.INIT;+ subType = UnitAction.ManageCollaborator;++ constructor(public unitId: string) {+ this.unitId = unitId;+ this.id = `${this.type}.${UnitAction.ManageCollaborator}_${unitId}`;+ }+}diff --git a/packages/sheets/src/services/permission/permission-point/workbook/move-sheet.ts b/packages/sheets/src/services/permission/permission-point/workbook/move-sheet.tsnew file mode 100644index 0000000000..449a276f1f--- /dev/null+++ b/packages/sheets/src/services/permission/permission-point/workbook/move-sheet.ts@@ -0,0 +1,32 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import type { IPermissionPoint } from '@univerjs/core';+import { PermissionStatus } from '@univerjs/core';+import { UnitAction, UnitObject } from '@univerjs/protocol';++export class WorkbookMoveSheetPermission implements IPermissionPoint {+ id: string;+ value = true;+ type = UnitObject.Workbook;+ status = PermissionStatus.INIT;+ subType = UnitAction.MoveSheet;++ constructor(public unitId: string) {+ this.unitId = unitId;+ this.id = `${this.type}.${UnitAction.MoveSheet}_${unitId}`;+ }+}diff --git a/packages/sheets/src/services/permission/permission-point/workbook/print.ts b/packages/sheets/src/services/permission/permission-point/workbook/print.tsnew file mode 100644index 0000000000..f13c972d6a--- /dev/null+++ b/packages/sheets/src/services/permission/permission-point/workbook/print.ts@@ -0,0 +1,32 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import type { IPermissionPoint } from '@univerjs/core';+import { PermissionStatus } from '@univerjs/core';+import { UnitAction, UnitObject } from '@univerjs/protocol';++export class WorkbookPrintPermission implements IPermissionPoint {+ id: string;+ value = true;+ type = UnitObject.Workbook;+ status = PermissionStatus.INIT;+ subType = UnitAction.Print;++ constructor(public unitId: string) {+ this.unitId = unitId;+ this.id = `${this.type}.${UnitAction.Print}_${unitId}`;+ }+}diff --git a/packages/sheets/src/services/permission/permission-point/workbook/rename-sheet.ts b/packages/sheets/src/services/permission/permission-point/workbook/rename-sheet.tsnew file mode 100644index 0000000000..9f481b481c--- /dev/null+++ b/packages/sheets/src/services/permission/permission-point/workbook/rename-sheet.ts@@ -0,0 +1,32 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import type { IPermissionPoint } from '@univerjs/core';+import { PermissionStatus } from '@univerjs/core';+import { UnitAction, UnitObject } from '@univerjs/protocol';++export class WorkbookRenameSheetPermission implements IPermissionPoint {+ id: string;+ value = true;+ type = UnitObject.Workbook;+ status = PermissionStatus.INIT;+ subType = UnitAction.RenameSheet;++ constructor(public unitId: string) {+ this.unitId = unitId;+ this.id = `${this.type}.${UnitAction.RenameSheet}_${unitId}`;+ }+}diff --git a/packages/sheets/src/services/permission/permission-point/workbook/share.ts b/packages/sheets/src/services/permission/permission-point/workbook/share.tsnew file mode 100644index 0000000000..97a43fb46b--- /dev/null+++ b/packages/sheets/src/services/permission/permission-point/workbook/share.ts@@ -0,0 +1,32 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import type { IPermissionPoint } from '@univerjs/core';+import { PermissionStatus } from '@univerjs/core';+import { UnitAction, UnitObject } from '@univerjs/protocol';++export class WorkbookSharePermission implements IPermissionPoint {+ id: string;+ value = true;+ type = UnitObject.Workbook;+ status = PermissionStatus.INIT;+ subType = UnitAction.Share;++ constructor(public unitId: string) {+ this.unitId = unitId;+ this.id = `${this.type}.${UnitAction.Share}_${unitId}`;+ }+}diff --git a/packages/sheets/src/services/permission/permission-point/workbook/view.ts b/packages/sheets/src/services/permission/permission-point/workbook/view.tsnew file mode 100644index 0000000000..e08f0ad1b6--- /dev/null+++ b/packages/sheets/src/services/permission/permission-point/workbook/view.ts@@ -0,0 +1,32 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import type { IPermissionPoint } from '@univerjs/core';+import { PermissionStatus } from '@univerjs/core';+import { UnitAction, UnitObject } from '@univerjs/protocol';++export class WorkbookViewPermission implements IPermissionPoint {+ id: string;+ value = true;+ type = UnitObject.Workbook;+ status = PermissionStatus.INIT;+ subType = UnitAction.View;++ constructor(public unitId: string) {+ this.unitId = unitId;+ this.id = `${this.type}.${UnitAction.View}_${unitId}`;+ }+}diff --git a/packages/sheets/src/services/permission/permission-point/worksheet/copy.ts b/packages/sheets/src/services/permission/permission-point/worksheet/copy.tsnew file mode 100644index 0000000000..ede4e16218--- /dev/null+++ b/packages/sheets/src/services/permission/permission-point/worksheet/copy.ts@@ -0,0 +1,30 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import type { IPermissionPoint } from '@univerjs/core';+import { PermissionStatus } from '@univerjs/core';+import { UnitAction, UnitObject } from '@univerjs/protocol';++export class WorksheetCopyPermission implements IPermissionPoint {+ value = true;+ type = UnitObject.Worksheet;+ status = PermissionStatus.INIT;+ id: string;+ subType = UnitAction.Copy;+ constructor(public unitId: string, public subUnitId: string) {+ this.id = `${this.type}.${UnitAction.Copy}_${unitId}_${subUnitId}`;+ }+}diff --git a/packages/sheets/src/services/permission/permission-point/worksheet/delete-column.ts b/packages/sheets/src/services/permission/permission-point/worksheet/delete-column.tsnew file mode 100644index 0000000000..e7a5a899f2--- /dev/null+++ b/packages/sheets/src/services/permission/permission-point/worksheet/delete-column.ts@@ -0,0 +1,30 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import type { IPermissionPoint } from '@univerjs/core';+import { PermissionStatus } from '@univerjs/core';+import { UnitAction, UnitObject } from '@univerjs/protocol';++export class WorksheetDeleteColumnPermission implements IPermissionPoint {+ value = true;+ type = UnitObject.Worksheet;+ status = PermissionStatus.INIT;+ id: string;+ subType = UnitAction.DeleteColumn;+ constructor(public unitId: string, public subUnitId: string) {+ this.id = `${this.type}.${UnitAction.DeleteColumn}_${unitId}_${subUnitId}`;+ }+}diff --git a/packages/sheets/src/services/permission/permission-point/worksheet/delete-row.ts b/packages/sheets/src/services/permission/permission-point/worksheet/delete-row.tsnew file mode 100644index 0000000000..a2daf13c54--- /dev/null+++ b/packages/sheets/src/services/permission/permission-point/worksheet/delete-row.ts@@ -0,0 +1,30 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import type { IPermissionPoint } from '@univerjs/core';+import { PermissionStatus } from '@univerjs/core';+import { UnitAction, UnitObject } from '@univerjs/protocol';++export class WorksheetDeleteRowPermission implements IPermissionPoint {+ value = true;+ type = UnitObject.Worksheet;+ status = PermissionStatus.INIT;+ id: string;+ subType = UnitAction.DeleteRow;+ constructor(public unitId: string, public subUnitId: string) {+ this.id = `${this.type}.${UnitAction.DeleteRow}_${unitId}_${subUnitId}`;+ }+}diff --git a/packages/sheets/src/services/permission/permission-point/worksheet/edit-extra-object.ts b/packages/sheets/src/services/permission/permission-point/worksheet/edit-extra-object.tsnew file mode 100644index 0000000000..e68b8a4e5b--- /dev/null+++ b/packages/sheets/src/services/permission/permission-point/worksheet/edit-extra-object.ts@@ -0,0 +1,30 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import type { IPermissionPoint } from '@univerjs/core';+import { PermissionStatus } from '@univerjs/core';+import { UnitAction, UnitObject } from '@univerjs/protocol';++export class WorksheetEditExtraObjectPermission implements IPermissionPoint {+ value = true;+ type = UnitObject.Worksheet;+ status = PermissionStatus.INIT;+ id: string;+ subType = UnitAction.EditExtraObject;+ constructor(public unitId: string, public subUnitId: string) {+ this.id = `${this.type}.${UnitAction.EditExtraObject}_${unitId}_${subUnitId}`;+ }+}diff --git a/packages/sheets/src/services/permission/permission-point/worksheet/edit.ts b/packages/sheets/src/services/permission/permission-point/worksheet/edit.tsnew file mode 100644index 0000000000..2bbc2d7657--- /dev/null+++ b/packages/sheets/src/services/permission/permission-point/worksheet/edit.ts@@ -0,0 +1,30 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import type { IPermissionPoint } from '@univerjs/core';+import { PermissionStatus } from '@univerjs/core';+import { UnitAction, UnitObject } from '@univerjs/protocol';++export class WorksheetEditPermission implements IPermissionPoint {+ value = true;+ type = UnitObject.Worksheet;+ status = PermissionStatus.INIT;+ id: string;+ subType = UnitAction.Edit;+ constructor(public unitId: string, public subUnitId: string) {+ this.id = `${this.type}.${UnitAction.Edit}_${unitId}_${subUnitId}`;+ }+}diff --git a/packages/sheets/src/services/permission/permission-point/worksheet/filter.ts b/packages/sheets/src/services/permission/permission-point/worksheet/filter.tsnew file mode 100644index 0000000000..b77418f6db--- /dev/null+++ b/packages/sheets/src/services/permission/permission-point/worksheet/filter.ts@@ -0,0 +1,30 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import type { IPermissionPoint } from '@univerjs/core';+import { PermissionStatus } from '@univerjs/core';+import { UnitAction, UnitObject } from '@univerjs/protocol';++export class WorksheetFilterPermission implements IPermissionPoint {+ value = true;+ type = UnitObject.Worksheet;+ status = PermissionStatus.INIT;+ id: string;+ subType = UnitAction.Filter;+ constructor(public unitId: string, public subUnitId: string) {+ this.id = `${this.type}.${UnitAction.Filter}_${unitId}_${subUnitId}`;+ }+}diff --git a/packages/sheets/src/services/permission/permission-point/worksheet/insert-column.ts b/packages/sheets/src/services/permission/permission-point/worksheet/insert-column.tsnew file mode 100644index 0000000000..4625d9b0e9--- /dev/null+++ b/packages/sheets/src/services/permission/permission-point/worksheet/insert-column.ts@@ -0,0 +1,30 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import type { IPermissionPoint } from '@univerjs/core';+import { PermissionStatus } from '@univerjs/core';+import { UnitAction, UnitObject } from '@univerjs/protocol';++export class WorksheetInsertColumnPermission implements IPermissionPoint {+ value = true;+ type = UnitObject.Worksheet;+ status = PermissionStatus.INIT;+ id: string;+ subType = UnitAction.InsertColumn;+ constructor(public unitId: string, public subUnitId: string) {+ this.id = `${this.type}.${UnitAction.InsertColumn}_${unitId}_${subUnitId}`;+ }+}diff --git a/packages/sheets/src/services/permission/permission-point/worksheet/insert-hyperlink.ts b/packages/sheets/src/services/permission/permission-point/worksheet/insert-hyperlink.tsnew file mode 100644index 0000000000..ce8e81bcdc--- /dev/null+++ b/packages/sheets/src/services/permission/permission-point/worksheet/insert-hyperlink.ts@@ -0,0 +1,30 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import type { IPermissionPoint } from '@univerjs/core';+import { PermissionStatus } from '@univerjs/core';+import { UnitAction, UnitObject } from '@univerjs/protocol';++export class WorksheetInsertHyperlinkPermission implements IPermissionPoint {+ value = true;+ type = UnitObject.Worksheet;+ status = PermissionStatus.INIT;+ id: string;+ subType = UnitAction.InsertHyperlink;+ constructor(public unitId: string, public subUnitId: string) {+ this.id = `${this.type}.${UnitAction.InsertHyperlink}_${unitId}_${subUnitId}`;+ }+}diff --git a/packages/sheets/src/services/permission/permission-point/worksheet/insert-row.ts b/packages/sheets/src/services/permission/permission-point/worksheet/insert-row.tsnew file mode 100644index 0000000000..198d6905d4--- /dev/null+++ b/packages/sheets/src/services/permission/permission-point/worksheet/insert-row.ts@@ -0,0 +1,30 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import type { IPermissionPoint } from '@univerjs/core';+import { PermissionStatus } from '@univerjs/core';+import { UnitAction, UnitObject } from '@univerjs/protocol';++export class WorksheetInsertRowPermission implements IPermissionPoint {+ value = true;+ type = UnitObject.Worksheet;+ status = PermissionStatus.INIT;+ id: string;+ subType = UnitAction.InsertRow;+ constructor(public unitId: string, public subUnitId: string) {+ this.id = `${this.type}.${UnitAction.InsertRow}_${unitId}_${subUnitId}`;+ }+}diff --git a/packages/sheets/src/services/permission/permission-point/worksheet/manage-collaborator.ts b/packages/sheets/src/services/permission/permission-point/worksheet/manage-collaborator.tsnew file mode 100644index 0000000000..9887313e10--- /dev/null+++ b/packages/sheets/src/services/permission/permission-point/worksheet/manage-collaborator.ts@@ -0,0 +1,30 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import type { IPermissionPoint } from '@univerjs/core';+import { PermissionStatus } from '@univerjs/core';+import { UnitAction, UnitObject } from '@univerjs/protocol';++export class WorksheetManageCollaboratorPermission implements IPermissionPoint {+ value = true;+ type = UnitObject.Worksheet;+ status = PermissionStatus.INIT;+ id: string;+ subType = UnitAction.ManageCollaborator;+ constructor(public unitId: string, public subUnitId: string) {+ this.id = `${this.type}.${UnitAction.ManageCollaborator}_${unitId}_${subUnitId}`;+ }+}diff --git a/packages/sheets/src/services/permission/permission-point/worksheet/pivot-table.ts b/packages/sheets/src/services/permission/permission-point/worksheet/pivot-table.tsnew file mode 100644index 0000000000..83b75d4e93--- /dev/null+++ b/packages/sheets/src/services/permission/permission-point/worksheet/pivot-table.ts@@ -0,0 +1,30 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import type { IPermissionPoint } from '@univerjs/core';+import { PermissionStatus } from '@univerjs/core';+import { UnitAction, UnitObject } from '@univerjs/protocol';++export class WorksheetPivotTablePermission implements IPermissionPoint {+ value = true;+ type = UnitObject.Worksheet;+ status = PermissionStatus.INIT;+ id: string;+ subType = UnitAction.PivotTable;+ constructor(public unitId: string, public subUnitId: string) {+ this.id = `${this.type}.${UnitAction.PivotTable}_${unitId}_${subUnitId}`;+ }+}diff --git a/packages/sheets/src/services/permission/permission-point/worksheet/select-protected-cells.ts b/packages/sheets/src/services/permission/permission-point/worksheet/select-protected-cells.tsnew file mode 100644index 0000000000..61702afe6d--- /dev/null+++ b/packages/sheets/src/services/permission/permission-point/worksheet/select-protected-cells.ts@@ -0,0 +1,30 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import type { IPermissionPoint } from '@univerjs/core';+import { PermissionStatus } from '@univerjs/core';+import { UnitAction, UnitObject } from '@univerjs/protocol';++export class WorksheetSelectProtectedCellsPermission implements IPermissionPoint {+ value = true;+ type = UnitObject.Worksheet;+ status = PermissionStatus.INIT;+ id: string;+ subType = UnitAction.SelectProtectedCells;+ constructor(public unitId: string, public subUnitId: string) {+ this.id = `${this.type}.${UnitAction.SelectProtectedCells}_${unitId}_${subUnitId}`;+ }+}diff --git a/packages/sheets/src/services/permission/permission-point/worksheet/select-un-protected-cells.ts b/packages/sheets/src/services/permission/permission-point/worksheet/select-un-protected-cells.tsnew file mode 100644index 0000000000..215ca5e3dd--- /dev/null+++ b/packages/sheets/src/services/permission/permission-point/worksheet/select-un-protected-cells.ts@@ -0,0 +1,30 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import type { IPermissionPoint } from '@univerjs/core';+import { PermissionStatus } from '@univerjs/core';+import { UnitAction, UnitObject } from '@univerjs/protocol';++export class WorksheetSelectUnProtectedCellsPermission implements IPermissionPoint {+ value = true;+ type = UnitObject.Worksheet;+ status = PermissionStatus.INIT;+ id: string;+ subType = UnitAction.SelectUnProtectedCells;+ constructor(public unitId: string, public subUnitId: string) {+ this.id = `${this.type}.${UnitAction.SelectUnProtectedCells}_${unitId}_${subUnitId}`;+ }+}diff --git a/packages/sheets/src/services/permission/permission-point/worksheet/set-cell-style.ts b/packages/sheets/src/services/permission/permission-point/worksheet/set-cell-style.tsnew file mode 100644index 0000000000..2f726ee12c--- /dev/null+++ b/packages/sheets/src/services/permission/permission-point/worksheet/set-cell-style.ts@@ -0,0 +1,30 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import type { IPermissionPoint } from '@univerjs/core';+import { PermissionStatus } from '@univerjs/core';+import { UnitAction, UnitObject } from '@univerjs/protocol';++export class WorksheetSetCellStylePermission implements IPermissionPoint {+ value = true;+ type = UnitObject.Worksheet;+ status = PermissionStatus.INIT;+ id: string;+ subType = UnitAction.SetCellStyle;+ constructor(public unitId: string, public subUnitId: string) {+ this.id = `${this.type}.${UnitAction.SetCellStyle}_${unitId}_${subUnitId}`;+ }+}diff --git a/packages/sheets/src/services/permission/permission-point/worksheet/set-cell-value.ts b/packages/sheets/src/services/permission/permission-point/worksheet/set-cell-value.tsnew file mode 100644index 0000000000..83fddef73a--- /dev/null+++ b/packages/sheets/src/services/permission/permission-point/worksheet/set-cell-value.ts@@ -0,0 +1,30 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import type { IPermissionPoint } from '@univerjs/core';+import { PermissionStatus } from '@univerjs/core';+import { UnitAction, UnitObject } from '@univerjs/protocol';++export class WorksheetSetCellValuePermission implements IPermissionPoint {+ value = true;+ type = UnitObject.Worksheet;+ status = PermissionStatus.INIT;+ id: string;+ subType = UnitAction.SetCellValue;+ constructor(public unitId: string, public subUnitId: string) {+ this.id = `${this.type}.${UnitAction.SetCellValue}_${unitId}_${subUnitId}`;+ }+}diff --git a/packages/sheets/src/services/permission/permission-point/worksheet/set-column-style.ts b/packages/sheets/src/services/permission/permission-point/worksheet/set-column-style.tsnew file mode 100644index 0000000000..c01c15301d--- /dev/null+++ b/packages/sheets/src/services/permission/permission-point/worksheet/set-column-style.ts@@ -0,0 +1,30 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import type { IPermissionPoint } from '@univerjs/core';+import { PermissionStatus } from '@univerjs/core';+import { UnitAction, UnitObject } from '@univerjs/protocol';++export class WorksheetSetColumnStylePermission implements IPermissionPoint {+ value = true;+ type = UnitObject.Worksheet;+ status = PermissionStatus.INIT;+ id: string;+ subType = UnitAction.SetColumnStyle;+ constructor(public unitId: string, public subUnitId: string) {+ this.id = `${this.type}.${UnitAction.SetColumnStyle}_${unitId}_${subUnitId}`;+ }+}diff --git a/packages/sheets/src/services/permission/permission-point/worksheet/set-row-style.ts b/packages/sheets/src/services/permission/permission-point/worksheet/set-row-style.tsnew file mode 100644index 0000000000..698f3311ab--- /dev/null+++ b/packages/sheets/src/services/permission/permission-point/worksheet/set-row-style.ts@@ -0,0 +1,30 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import type { IPermissionPoint } from '@univerjs/core';+import { PermissionStatus } from '@univerjs/core';+import { UnitAction, UnitObject } from '@univerjs/protocol';++export class WorksheetSetRowStylePermission implements IPermissionPoint {+ value = true;+ type = UnitObject.Worksheet;+ status = PermissionStatus.INIT;+ id: string;+ subType = UnitAction.SetRowStyle;+ constructor(public unitId: string, public subUnitId: string) {+ this.id = `${this.type}.${UnitAction.SetRowStyle}_${unitId}_${subUnitId}`;+ }+}diff --git a/packages/sheets/src/services/permission/permission-point/worksheet/sort.ts b/packages/sheets/src/services/permission/permission-point/worksheet/sort.tsnew file mode 100644index 0000000000..629223a059--- /dev/null+++ b/packages/sheets/src/services/permission/permission-point/worksheet/sort.ts@@ -0,0 +1,30 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import type { IPermissionPoint } from '@univerjs/core';+import { PermissionStatus } from '@univerjs/core';+import { UnitAction, UnitObject } from '@univerjs/protocol';++export class WorksheetSortPermission implements IPermissionPoint {+ value = true;+ type = UnitObject.Worksheet;+ status = PermissionStatus.INIT;+ id: string;+ subType = UnitAction.Sort;+ constructor(public unitId: string, public subUnitId: string) {+ this.id = `${this.type}.${UnitAction.Sort}_${unitId}_${subUnitId}`;+ }+}diff --git a/packages/sheets/src/services/permission/permission-point/worksheet/view.ts b/packages/sheets/src/services/permission/permission-point/worksheet/view.tsnew file mode 100644index 0000000000..f045eae3b9--- /dev/null+++ b/packages/sheets/src/services/permission/permission-point/worksheet/view.ts@@ -0,0 +1,30 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import type { IPermissionPoint } from '@univerjs/core';+import { PermissionStatus } from '@univerjs/core';+import { UnitAction, UnitObject } from '@univerjs/protocol';++export class WorksheetViewPermission implements IPermissionPoint {+ value = true;+ type = UnitObject.Worksheet;+ status = PermissionStatus.INIT;+ id: string;+ subType = UnitAction.View;+ constructor(public unitId: string, public subUnitId: string) {+ this.id = `${this.type}.${UnitAction.View}_${unitId}_${subUnitId}`;+ }+}diff --git a/packages/sheets/src/services/permission/range-permission/range-protection.ref-range.ts b/packages/sheets/src/services/permission/range-permission/range-protection.ref-range.tsnew file mode 100644index 0000000000..32ee34bde9--- /dev/null+++ b/packages/sheets/src/services/permission/range-permission/range-protection.ref-range.ts@@ -0,0 +1,539 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import { Inject } from '@wendellhu/redi';++import type { ICommandInfo, IRange, Workbook } from '@univerjs/core';+import { Disposable, DisposableCollection, ICommandService, IUniverInstanceService, LifecycleStages, OnLifecycle, Rectangle, Tools, UniverInstanceType } from '@univerjs/core';+import { AddRangeProtectionCommand } from '../../../commands/commands/add-range-protection.command';+import { SetRangeProtectionCommand } from '../../../commands/commands/set-range-protection.command';+import type { IRangeProtectionRule } from '../../../model/range-protection-rule.model';+import { RangeProtectionRuleModel } from '../../../model/range-protection-rule.model';+import { RangeProtectionRenderModel } from '../../../model/range-protection-render.model';+import type { ISetRangeProtectionMutationParams } from '../../../commands/mutations/set-range-protection.mutation';+import { SetRangeProtectionMutation } from '../../../commands/mutations/set-range-protection.mutation';++import { InsertColMutation, InsertRowMutation } from '../../../commands/mutations/insert-row-col.mutation';+import { RemoveColMutation, RemoveRowMutation } from '../../../commands/mutations/remove-row-col.mutation';+import { type IMoveRowsMutationParams, MoveColsMutation, MoveRowsMutation } from '../../../commands/mutations/move-rows-cols.mutation';+import type {+ IInsertColMutationParams,+} from '../../../basics/interfaces/mutation-interface';+import type { IInsertColCommandParams, IInsertRowCommandParams } from '../../../commands/commands/insert-row-col.command';+import { InsertColCommand, InsertRowCommand } from '../../../commands/commands/insert-row-col.command';+import type { IRemoveRowColCommandParams } from '../../../commands/commands/remove-row-col.command';+import type { EffectRefRangeParams } from '../../../services/ref-range/type';++import type {+ IMoveColsCommandParams,+ IMoveRowsCommandParams } from '../../../commands/commands/move-rows-cols.command';+import {+ MoveColsCommand,+ MoveRowsCommand,+} from '../../../commands/commands/move-rows-cols.command';+import {+ type ISetWorksheetActivateCommandParams,+ SetWorksheetActivateCommand,+} from '../../../commands/commands/set-worksheet-activate.command';+import { RemoveColCommand, RemoveRowCommand } from '../../../commands/commands/remove-row-col.command';+import { RefRangeService } from '../../../services/ref-range/ref-range.service';++const mutationIdByRowCol = [InsertColMutation.id, InsertRowMutation.id, RemoveColMutation.id, RemoveRowMutation.id];+const mutationIdArrByMove = [MoveRowsMutation.id, MoveColsMutation.id];++type IMoveRowsOrColsMutationParams = IMoveRowsMutationParams;++@OnLifecycle(LifecycleStages.Starting, RangeProtectionRefRangeService)+export class RangeProtectionRefRangeService extends Disposable {+ disposableCollection = new DisposableCollection();++ constructor(+ @Inject(RangeProtectionRuleModel) private _selectionProtectionRuleModel: RangeProtectionRuleModel,+ @Inject(IUniverInstanceService) private _univerInstanceService: IUniverInstanceService,+ @ICommandService private readonly _commandService: ICommandService,+ @Inject(RefRangeService) private readonly _refRangeService: RefRangeService,+ @Inject(RangeProtectionRenderModel) private readonly _selectionProtectionRenderModel: RangeProtectionRenderModel++ ) {+ super();+ this._onRefRangeChange();+ this._correctPermissionRange();+ }++ private _onRefRangeChange() {+ const registerRefRange = (unitId: string, subUnitId: string) => {+ const workbook = this._univerInstanceService.getCurrentUnitForType<Workbook>(UniverInstanceType.UNIVER_SHEET);+ if (!workbook) {+ return;+ }+ const workSheet = workbook?.getSheetBySheetId(subUnitId);+ if (!workSheet) {+ return;+ }++ this.disposableCollection.dispose();++ const handler = (config: EffectRefRangeParams) => {+ return this.refRangeHandle(config, unitId, subUnitId);+ };++ const permissionRanges = this._selectionProtectionRuleModel.getSubunitRuleList(unitId, subUnitId).reduce((p, c) => {+ return [...p, ...c.ranges];+ }, [] as IRange[]);++ permissionRanges.forEach((range) => {+ this.disposableCollection.add(this._refRangeService.registerRefRange(range, handler, unitId, subUnitId));+ });+ };+ this.disposeWithMe(+ this._commandService.onCommandExecuted((commandInfo) => {+ if (commandInfo.id === SetWorksheetActivateCommand.id) {+ const params = commandInfo.params as ISetWorksheetActivateCommandParams;+ const sheetId = params.subUnitId;+ const unitId = params.unitId;+ if (!sheetId || !unitId) {+ return;+ }+ registerRefRange(unitId, sheetId);+ }+ if (commandInfo.id === AddRangeProtectionCommand.id || commandInfo.id === SetRangeProtectionCommand.id) {+ const params = commandInfo.params as {+ permissionId: string;+ rule: IRangeProtectionRule;+ };+ const subUnitId = params.rule.subUnitId;+ const unitId = params.rule.unitId;+ if (!subUnitId || !unitId) {+ return;+ }+ registerRefRange(unitId, subUnitId);+ }+ })+ );++ const workbook = this._univerInstanceService.getCurrentUnitForType<Workbook>(UniverInstanceType.UNIVER_SHEET)!;+ if (workbook) {+ const sheet = workbook.getActiveSheet();+ registerRefRange(workbook.getUnitId(), sheet.getSheetId());+ }+ }++ refRangeHandle(config: EffectRefRangeParams, unitId: string, subUnitId: string) {+ switch (config.id) {+ case MoveRowsCommand.id:+ return this._getRefRangeMutationsByMoveRows(config.params as IMoveRowsCommandParams, unitId, subUnitId);+ case MoveColsCommand.id:+ return this._getRefRangeMutationsByMoveCols(config.params as IMoveColsCommandParams, unitId, subUnitId);+ case InsertRowCommand.id:+ return this._getRefRangeMutationsByInsertRows(config.params as IInsertRowCommandParams, unitId, subUnitId);+ case InsertColCommand.id:+ return this._getRefRangeMutationsByInsertCols(config.params as IInsertColCommandParams, unitId, subUnitId);+ case RemoveColCommand.id:+ return this._getRefRangeMutationsByDeleteCols(config.params as IRemoveRowColCommandParams, unitId, subUnitId);+ case RemoveRowCommand.id:+ return this._getRefRangeMutationsByDeleteRows(config.params as IRemoveRowColCommandParams, unitId, subUnitId);+ default:+ break;+ }+ return { redos: [], undos: [] };+ }++ private _getRefRangeMutationsByDeleteCols(params: IRemoveRowColCommandParams, unitId: string, subUnitId: string) {+ const permissionRangeLapRules = this._selectionProtectionRuleModel.getSubunitRuleList(unitId, subUnitId).filter((rule) => {+ return rule.ranges.some((range) => {+ return Rectangle.intersects(range, params.range);+ });+ });++ const removeRange = params.range;+ if (permissionRangeLapRules.length) {+ const redoMutations: { id: string; params: ISetRangeProtectionMutationParams }[] = [];+ const undoMutations: { id: string; params: ISetRangeProtectionMutationParams }[] = [];+ permissionRangeLapRules.forEach((rule) => {+ const cloneRule = Tools.deepClone(rule);+ const rangesByRemove = cloneRule.ranges.reduce((p, c) => {+ if (Rectangle.intersects(c, removeRange)) {+ const cloneRange = Tools.deepClone(c);+ const { startColumn, endColumn } = removeRange;+ if (startColumn <= cloneRange.startColumn && endColumn >= cloneRange.endColumn) {+ return p;+ } else if (startColumn >= cloneRange.startColumn && endColumn <= cloneRange.endColumn) {+ cloneRange.endColumn -= endColumn - startColumn + 1;+ } else if (startColumn < cloneRange.startColumn) {+ cloneRange.startColumn = startColumn;+ cloneRange.endColumn -= endColumn - startColumn + 1;+ } else if (endColumn > cloneRange.endColumn) {+ cloneRange.endColumn = startColumn - 1;+ }+ if (this._checkIsRightRange(cloneRange)) {+ p.push(cloneRange);+ }+ }+ return p;+ }, [] as IRange[]);+ cloneRule.ranges = rangesByRemove;+ redoMutations.push({ id: SetRangeProtectionMutation.id, params: { unitId, subUnitId, rule: cloneRule, ruleId: rule.id } });+ undoMutations.push({ id: SetRangeProtectionMutation.id, params: { unitId, subUnitId, rule, ruleId: rule.id } });+ });++ return { redos: redoMutations, undos: undoMutations };+ }+ return { undos: [], redos: [] };+ }++ private _getRefRangeMutationsByDeleteRows(params: IRemoveRowColCommandParams, unitId: string, subUnitId: string) {+ const permissionRangeLapRules = this._selectionProtectionRuleModel.getSubunitRuleList(unitId, subUnitId).filter((rule) => {+ return rule.ranges.some((range) => {+ return Rectangle.intersects(range, params.range);+ });+ });++ const removeRange = params.range;+ if (permissionRangeLapRules.length) {+ const redoMutations: { id: string; params: ISetRangeProtectionMutationParams }[] = [];+ const undoMutations: { id: string; params: ISetRangeProtectionMutationParams }[] = [];+ permissionRangeLapRules.forEach((rule) => {+ const cloneRule = Tools.deepClone(rule);+ const rangesByRemove = cloneRule.ranges.reduce((p, c) => {+ if (Rectangle.intersects(c, removeRange)) {+ const cloneRange = Tools.deepClone(c);+ const { startRow, endRow } = removeRange;+ if (startRow <= cloneRange.startRow && endRow >= cloneRange.endRow) {+ return p;+ } else if (startRow >= cloneRange.startRow && endRow <= cloneRange.endRow) {+ cloneRange.endRow -= endRow - startRow + 1;+ } else if (startRow < cloneRange.startRow) {+ cloneRange.startRow = startRow;+ cloneRange.endRow -= endRow - startRow + 1;+ } else if (endRow > cloneRange.endRow) {+ cloneRange.endRow = startRow - 1;+ }+ if (this._checkIsRightRange(cloneRange)) {+ p.push(cloneRange);+ }+ }+ return p;+ }, [] as IRange[]);+ cloneRule.ranges = rangesByRemove;+ redoMutations.push({ id: SetRangeProtectionMutation.id, params: { unitId, subUnitId, rule: cloneRule, ruleId: rule.id } });+ undoMutations.push({ id: SetRangeProtectionMutation.id, params: { unitId, subUnitId, rule, ruleId: rule.id } });+ });++ return { redos: redoMutations, undos: undoMutations };+ }+ return { undos: [], redos: [] };+ }++ private _getRefRangeMutationsByInsertCols(params: IInsertColCommandParams, unitId: string, subUnitId: string) {+ const insertStart = params.range.startColumn;+ const insertLength = params.range.endColumn - params.range.startColumn + 1;++ const permissionRangeLapRules = this._selectionProtectionRuleModel.getSubunitRuleList(unitId, subUnitId).filter((rule) => {+ return rule.ranges.some((range) => {+ return insertStart > range.startColumn && insertStart <= range.endColumn;+ });+ });++ if (permissionRangeLapRules.length) {+ const redoMutations: { id: string; params: ISetRangeProtectionMutationParams }[] = [];+ const undoMutations: { id: string; params: ISetRangeProtectionMutationParams }[] = [];+ permissionRangeLapRules.forEach((rule) => {+ const cloneRule = Tools.deepClone(rule);+ let hasLap = false;+ cloneRule.ranges.forEach((range) => {+ if (insertStart > range.startColumn && insertStart <= range.endColumn) {+ range.endColumn += insertLength;+ hasLap = true;+ }+ });+ if (hasLap) {+ redoMutations.push({ id: SetRangeProtectionMutation.id, params: { unitId, subUnitId, rule: cloneRule, ruleId: rule.id } });+ undoMutations.push({ id: SetRangeProtectionMutation.id, params: { unitId, subUnitId, rule, ruleId: rule.id } });+ }+ });++ return { redos: redoMutations, undos: undoMutations };+ }+ return { undos: [], redos: [] };+ }++ private _getRefRangeMutationsByInsertRows(params: IInsertRowCommandParams, unitId: string, subUnitId: string) {+ const insertStart = params.range.startRow;+ const insertLength = params.range.endRow - params.range.startRow + 1;++ const permissionRangeLapRules = this._selectionProtectionRuleModel.getSubunitRuleList(unitId, subUnitId).filter((rule) => {+ return rule.ranges.some((range) => {+ return insertStart > range.startRow && insertStart <= range.endRow;+ });+ });++ if (permissionRangeLapRules.length) {+ const redoMutations: { id: string; params: ISetRangeProtectionMutationParams }[] = [];+ const undoMutations: { id: string; params: ISetRangeProtectionMutationParams }[] = [];+ permissionRangeLapRules.forEach((rule) => {+ const cloneRule = Tools.deepClone(rule);+ let hasLap = false;+ cloneRule.ranges.forEach((range) => {+ if (insertStart > range.startRow && insertStart <= range.endRow) {+ range.endRow += insertLength;+ hasLap = true;+ }+ });+ if (hasLap) {+ redoMutations.push({ id: SetRangeProtectionMutation.id, params: { unitId, subUnitId, rule: cloneRule, ruleId: rule.id } });+ undoMutations.push({ id: SetRangeProtectionMutation.id, params: { unitId, subUnitId, rule, ruleId: rule.id } });+ }+ });++ return { redos: redoMutations, undos: undoMutations };+ }+ return { undos: [], redos: [] };+ }++ private _getRefRangeMutationsByMoveRows(params: IMoveRowsCommandParams, unitId: string, subUnitId: string) {+ const toRange = params.toRange;+ const moveToStartRow = toRange.startRow;+ const moveLength = toRange.endRow - toRange.startRow + 1;++ const permissionRangeLapRules = this._selectionProtectionRuleModel.getSubunitRuleList(unitId, subUnitId).filter((rule) => {+ return rule.ranges.some((range) => {+ return moveToStartRow > range.startRow && moveToStartRow <= range.endRow;+ });+ });++ if (permissionRangeLapRules.length) {+ const redoMutations: { id: string; params: ISetRangeProtectionMutationParams }[] = [];+ const undoMutations: { id: string; params: ISetRangeProtectionMutationParams }[] = [];+ permissionRangeLapRules.forEach((rule) => {+ const cloneRule = Tools.deepClone(rule);+ const fromRange = params.fromRange;+ const moveFromStartRow = fromRange.startRow;+ let hasLap = false;+ cloneRule.ranges.forEach((range) => {+ if (moveToStartRow > range.startRow && moveToStartRow <= range.endRow) {+ if (moveFromStartRow < range.startRow) {+ range.startRow = range.startRow - moveLength;+ range.endRow = range.endRow - moveLength;+ }+ range.endRow += moveLength;+ hasLap = true;+ }+ });+ if (hasLap) {+ redoMutations.push({ id: SetRangeProtectionMutation.id, params: { unitId, subUnitId, rule: cloneRule, ruleId: rule.id } });+ undoMutations.push({ id: SetRangeProtectionMutation.id, params: { unitId, subUnitId, rule, ruleId: rule.id } });+ }+ });++ return { redos: redoMutations, undos: undoMutations };+ }++ return { undos: [], redos: [] };+ }++ private _getRefRangeMutationsByMoveCols(params: IMoveColsCommandParams, unitId: string, subUnitId: string) {+ const toRange = params.toRange;+ const moveToStartCol = toRange.startColumn;+ const moveLength = toRange.endColumn - toRange.startColumn + 1;++ const permissionRangeLapRules = this._selectionProtectionRuleModel.getSubunitRuleList(unitId, subUnitId).filter((rule) => {+ return rule.ranges.some((range) => {+ return moveToStartCol > range.startColumn && moveToStartCol <= range.endColumn;+ });+ });++ if (permissionRangeLapRules.length) {+ const redoMutations: { id: string; params: ISetRangeProtectionMutationParams }[] = [];+ const undoMutations: { id: string; params: ISetRangeProtectionMutationParams }[] = [];+ permissionRangeLapRules.forEach((rule) => {+ const cloneRule = Tools.deepClone(rule);+ const fromRange = params.fromRange;+ const moveFromStartCol = fromRange.startColumn;+ let hasLap = false;+ cloneRule.ranges.forEach((range) => {+ if (moveToStartCol > range.startColumn && moveToStartCol <= range.endColumn) {+ if (moveFromStartCol < range.startColumn) {+ range.startColumn = range.startColumn - moveLength;+ range.endColumn = range.endColumn - moveLength;+ }+ range.endColumn += moveLength;+ hasLap = true;+ }+ });+ if (hasLap) {+ redoMutations.push({ id: SetRangeProtectionMutation.id, params: { unitId, subUnitId, rule: cloneRule, ruleId: rule.id } });+ undoMutations.push({ id: SetRangeProtectionMutation.id, params: { unitId, subUnitId, rule, ruleId: rule.id } });+ }+ });++ return { redos: redoMutations, undos: undoMutations };+ }++ return { undos: [], redos: [] };+ }++ private _correctPermissionRange() {+ this.disposeWithMe(this._commandService.onCommandExecuted((command: ICommandInfo) => {+ if (mutationIdArrByMove.includes(command.id)) {+ if (!command.params) return;+ const workbook = this._univerInstanceService.getCurrentUnitForType<Workbook>(UniverInstanceType.UNIVER_SHEET)!;+ if (!workbook) return;+ const worksheet = workbook.getSheetBySheetId((command.params as IMoveRowsMutationParams).subUnitId);+ if (!worksheet) return;+ const { sourceRange, targetRange } = command.params as IMoveRowsOrColsMutationParams;+ const isRowMove = sourceRange.startColumn === targetRange.startColumn && sourceRange.endColumn === targetRange.endColumn;+ const moveLength = isRowMove+ ? sourceRange.endRow - sourceRange.startRow + 1+ : sourceRange.endColumn - sourceRange.startColumn + 1;+ const sourceStart = isRowMove ? sourceRange.startRow : sourceRange.startColumn;+ const targetStart = isRowMove ? targetRange.startRow : targetRange.startColumn;+ const permissionListRule = this._selectionProtectionRuleModel.getSubunitRuleList(workbook.getUnitId(), worksheet.getSheetId());++ permissionListRule.forEach((rule) => {+ const ranges = rule.ranges;+ ranges.forEach((range) => {+ let { startRow, endRow, startColumn, endColumn } = range;++ if (!Rectangle.intersects(range, sourceRange)) {+ if (isRowMove) {+ if (sourceStart < startRow && targetStart > endRow) {+ startRow -= moveLength;+ endRow -= moveLength;+ } else if (sourceStart > endRow && targetStart <= startRow) {+ startRow += moveLength;+ endRow += moveLength;+ }+ } else {+ if (sourceStart < startColumn && targetStart > endColumn) {+ startColumn -= moveLength;+ endColumn -= moveLength;+ } else if (sourceStart > endColumn && targetStart <= startColumn) {+ startColumn += moveLength;+ endColumn += moveLength;+ }+ }+ }++ if (this._checkIsRightRange({ startRow, endRow, startColumn, endColumn })) {+ range.startColumn = startColumn;+ range.endColumn = endColumn;+ range.startRow = startRow;+ range.endRow = endRow;+ }+ });+ });++ this.disposableCollection.dispose();+ const { unitId, subUnitId } = command.params as IMoveRowsMutationParams;+ const handler = (config: EffectRefRangeParams) => {+ return this.refRangeHandle(config, unitId, subUnitId);+ };++ const permissionRanges = this._selectionProtectionRuleModel.getSubunitRuleList(unitId, subUnitId).reduce((p, c) => {+ return [...p, ...c.ranges];+ }, [] as IRange[]);++ permissionRanges.forEach((range) => {+ this.disposableCollection.add(this._refRangeService.registerRefRange(range, handler, unitId, subUnitId));+ });++ this._selectionProtectionRenderModel.clear();+ }++ // 2. InsertRowsOrCols / RemoveRowsOrCols Mutations+ if (mutationIdByRowCol.includes(command.id)) {+ const workbook = this._univerInstanceService.getUniverSheetInstance((command.params as IInsertColMutationParams).unitId);+ if (!workbook) return;+ const worksheet = workbook.getSheetBySheetId((command.params as IInsertColMutationParams).subUnitId);+ if (!worksheet) return;++ const params = command.params as IInsertRowCommandParams;+ if (!params) return;+ const { range } = params;++ const isRowOperation = command.id.includes('row');+ const isAddOperation = command.id.includes('insert');++ const operationStart = isRowOperation ? range.startRow : range.startColumn;+ const operationEnd = isRowOperation ? range.endRow : range.endColumn;+ const operationCount = operationEnd - operationStart + 1;++ const permissionListRule = this._selectionProtectionRuleModel.getSubunitRuleList(workbook.getUnitId(), worksheet.getSheetId());++ permissionListRule.forEach((rule) => {+ const ranges = rule.ranges;+ ranges.forEach((range) => {+ let { startRow, endRow, startColumn, endColumn } = range;++ if (isAddOperation) {+ if (isRowOperation) {+ if (operationStart <= startRow) {+ startRow += operationCount;+ endRow += operationCount;+ }+ } else {+ if (operationStart <= startColumn) {+ startColumn += operationCount;+ endColumn += operationCount;+ }+ }+ } else {+ if (isRowOperation) {+ if (operationEnd < startRow) {+ startRow -= operationCount;+ endRow -= operationCount;+ }+ } else {+ if (operationEnd < startColumn) {+ startColumn -= operationCount;+ endColumn -= operationCount;+ }+ }+ }++ if (this._checkIsRightRange({ startRow, endRow, startColumn, endColumn })) {+ range.startColumn = startColumn;+ range.endColumn = endColumn;+ range.startRow = startRow;+ range.endRow = endRow;+ }+ });+ });++ this.disposableCollection.dispose();+ const { unitId, subUnitId } = command.params as IMoveRowsMutationParams;+ const handler = (config: EffectRefRangeParams) => {+ return this.refRangeHandle(config, unitId, subUnitId);+ };++ const permissionRanges = this._selectionProtectionRuleModel.getSubunitRuleList(unitId, subUnitId).reduce((p, c) => {+ return [...p, ...c.ranges];+ }, [] as IRange[]);++ permissionRanges.forEach((range) => {+ this.disposableCollection.add(this._refRangeService.registerRefRange(range, handler, unitId, subUnitId));+ });++ this._selectionProtectionRenderModel.clear();+ }+ }));+ }++ private _checkIsRightRange(range: IRange) {+ return range.startRow <= range.endRow && range.startColumn <= range.endColumn;+ }+}+diff --git a/packages/sheets/src/services/permission/range-permission/range-protection.service.ts b/packages/sheets/src/services/permission/range-permission/range-protection.service.tsnew file mode 100644index 0000000000..70e1f3056f--- /dev/null+++ b/packages/sheets/src/services/permission/range-permission/range-protection.service.ts@@ -0,0 +1,169 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import { Disposable, IPermissionService, IResourceManagerService, LifecycleStages, OnLifecycle } from '@univerjs/core';++import { Inject } from '@wendellhu/redi';+import { UnitAction, UnitObject, UniverType } from '@univerjs/protocol';+import type { ISheetFontRenderExtension } from '@univerjs/engine-render';+import type { IObjectModel, IRangeProtectionRule } from '../../../model/range-protection-rule.model';+import { RangeProtectionRuleModel } from '../../../model/range-protection-rule.model';+import { RangeProtectionRenderModel } from '../../../model/range-protection-render.model';+import type { IRangeProtectionRenderCellData } from '../../../render/range-protection/range-protection.render';+import { SheetInterceptorService } from '../../sheet-interceptor/sheet-interceptor.service';+import { INTERCEPTOR_POINT } from '../../sheet-interceptor/interceptor-const';++import { getAllRangePermissionPoint } from './util';++const PLUGIN_NAME = 'SHEET_RANGE_PROTECTION_PLUGIN';++@OnLifecycle(LifecycleStages.Starting, RangeProtectionService)+export class RangeProtectionService extends Disposable {+ constructor(+ @Inject(RangeProtectionRuleModel) private _selectionProtectionRuleModel: RangeProtectionRuleModel,+ @Inject(IPermissionService) private _permissionService: IPermissionService,+ @Inject(IResourceManagerService) private _resourceManagerService: IResourceManagerService,+ @Inject(SheetInterceptorService) private _sheetInterceptorService: SheetInterceptorService,+ @Inject(RangeProtectionRenderModel) private _selectionProtectionRenderModel: RangeProtectionRenderModel++ ) {+ super();+ this._initSnapshot();+ this._initRuleChange();+ this._initViewModelInterceptor();+ }++ private _initViewModelInterceptor() {+ this.disposeWithMe(this._sheetInterceptorService.intercept(INTERCEPTOR_POINT.CELL_CONTENT, {+ handler: (cell = {}, context, next) => {+ const { unitId, subUnitId, row, col } = context;+ const permissionList = this._selectionProtectionRenderModel.getCellInfo(unitId, subUnitId, row, col)+ .filter((p) => !!p.ruleId)+ .map((p) => {+ const rule = this._selectionProtectionRuleModel.getRule(unitId, subUnitId, p.ruleId!) || {} as IRangeProtectionRule;+ return {+ ...p, ranges: rule.ranges!,+ };+ })+ .filter((p) => !!p.ranges);+ if (permissionList.length) {+ const isSkipFontRender = permissionList.some((p) => !p?.[UnitAction.View]);+ const _cellData: IRangeProtectionRenderCellData & ISheetFontRenderExtension = { ...cell, selectionProtection: permissionList };+ if (isSkipFontRender) {+ if (!_cellData.fontRenderExtension) {+ _cellData.fontRenderExtension = {};+ }+ _cellData.fontRenderExtension.isSkip = isSkipFontRender;+ }+ return next(_cellData);+ }+ return next(cell);+ },+ }+ ));+ }++ private _initRuleChange() {+ this.disposeWithMe(+ this._selectionProtectionRuleModel.ruleChange$.subscribe((info) => {+ switch (info.type) {+ case 'add': {+ getAllRangePermissionPoint().forEach((F) => {+ const instance = new F(info.unitId, info.subUnitId, info.rule.permissionId);+ this._permissionService.addPermissionPoint(instance);+ });+ break;+ }+ case 'delete': {+ getAllRangePermissionPoint().forEach((F) => {+ const instance = new F(info.unitId, info.subUnitId, info.rule.permissionId);+ this._permissionService.deletePermissionPoint(instance.id);+ });+ break;+ }+ case 'set': {+ if (info.oldRule!.permissionId !== info.rule.permissionId) {+ getAllRangePermissionPoint().forEach((F) => {+ const oldPermissionPoint = new F(info.unitId, info.subUnitId, info.oldRule!.permissionId);+ this._permissionService.deletePermissionPoint(oldPermissionPoint.id);+ const newPermissionPoint = new F(info.unitId, info.subUnitId, info.rule.permissionId);+ this._permissionService.addPermissionPoint(newPermissionPoint);+ });+ }+ break;+ }+ }+ }));+ }++ private _initSnapshot() {+ const toJson = (unitID: string) => {+ const object = this._selectionProtectionRuleModel.toObject();+ const v = object[unitID];+ return v ? JSON.stringify(v) : '';+ };+ const parseJson = (json: string): IObjectModel[keyof IObjectModel] => {+ if (!json) {+ return {};+ }+ try {+ return JSON.parse(json);+ } catch (err) {+ return {};+ }+ };+ this.disposeWithMe(+ this._resourceManagerService.registerPluginResource({+ toJson, parseJson,+ pluginName: PLUGIN_NAME,+ businesses: [UniverType.UNIVER_SHEET],+ onLoad: (unitId, resources) => {+ const result = this._selectionProtectionRuleModel.toObject();+ result[unitId] = resources;+ this._selectionProtectionRuleModel.fromObject(result);+ const allAllowedParams: {+ objectID: string;+ unitID: string;+ objectType: UnitObject;+ actions: UnitAction[];+ }[] = [];+ Object.keys(resources).forEach((subUnitId) => {+ const list = resources[subUnitId];+ this._selectionProtectionRuleModel.getSubunitRuleList(unitId, subUnitId).forEach((rule) => {+ allAllowedParams.push({+ objectID: rule.permissionId,+ unitID: unitId,+ objectType: UnitObject.SelectRange,+ actions: [UnitAction.View, UnitAction.Edit],+ });+ });++ list.forEach((rule) => {+ getAllRangePermissionPoint().forEach((Factor) => {+ const instance = new Factor(unitId, subUnitId, rule.permissionId);+ this._permissionService.addPermissionPoint(instance);+ });+ });+ });+ },+ onUnLoad: () => {+ this._selectionProtectionRuleModel.deleteUnitModel();+ },+ })+ );+ }+}+diff --git a/packages/sheets/src/services/permission/range-permission/util.ts b/packages/sheets/src/services/permission/range-permission/util.tsnew file mode 100644index 0000000000..5d24381889--- /dev/null+++ b/packages/sheets/src/services/permission/range-permission/util.ts@@ -0,0 +1,29 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import type { UnitAction } from '@univerjs/protocol';+import { RangeProtectionPermissionEditPoint } from '../permission-point/range/edit';+import { RangeProtectionPermissionViewPoint } from '../permission-point/range/view';++export type IRangePermissionPoint = RangeProtectionPermissionEditPoint | RangeProtectionPermissionViewPoint;++export const getAllRangePermissionPoint = () => [RangeProtectionPermissionViewPoint, RangeProtectionPermissionEditPoint];++export const getDefaultRangePermission = (unitId = 'unitId', subUnitId = 'subUnitId', permissionId = 'permissionId') => getAllRangePermissionPoint().reduce((r, F) => {+ const i = new F(unitId, subUnitId, permissionId);+ r[i.subType] = i.value;+ return r;+}, {} as Record<UnitAction, boolean>);diff --git a/packages/sheets/src/services/permission/sheet-permission.service.ts b/packages/sheets/src/services/permission/sheet-permission.service.tsdeleted file mode 100644index 69d2cbec4e..0000000000--- a/packages/sheets/src/services/permission/sheet-permission.service.ts+++ /dev/null@@ -1,140 +0,0 @@-/**- * Copyright 2023-present DreamNum Inc.- *- * Licensed under the Apache License, Version 2.0 (the "License");- * you may not use this file except in compliance with the License.- * You may obtain a copy of the License at- *- * http://www.apache.org/licenses/LICENSE-2.0- *- * Unless required by applicable law or agreed to in writing, software- * distributed under the License is distributed on an "AS IS" BASIS,- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.- * See the License for the specific language governing permissions and- * limitations under the License.- */--import type { Workbook } from '@univerjs/core';-import {- DisposableCollection,- IPermissionService,- IUniverInstanceService,- LifecycleStages,- OnLifecycle,- PermissionStatus,- RxDisposable,- toDisposable,- UniverInstanceType,-} from '@univerjs/core';-import type { IDisposable } from '@wendellhu/redi';-import { Inject } from '@wendellhu/redi';-import { takeUntil } from 'rxjs/operators';--import { of } from 'rxjs';-import { SheetEditablePermission } from './permission-point';--@OnLifecycle(LifecycleStages.Ready, SheetPermissionService)-export class SheetPermissionService extends RxDisposable {- private _disposableByUnit = new Map<string, IDisposable>();-- constructor(- @Inject(IPermissionService) private _permissionService: IPermissionService,- @Inject(IUniverInstanceService) private _univerInstanceService: IUniverInstanceService- ) {- super();-- this._init();- }-- private _init() {- const workbook = this._univerInstanceService.getCurrentUnitForType<Workbook>(UniverInstanceType.UNIVER_SHEET)!;- if (!workbook) return;-- this._interceptWorkbook(workbook);- this._univerInstanceService.getTypeOfUnitAdded$<Workbook>(UniverInstanceType.UNIVER_SHEET)- .pipe(takeUntil(this.dispose$))- .subscribe((workbook) => this._interceptWorkbook(workbook));-- this._univerInstanceService.getTypeOfUnitDisposed$<Workbook>(UniverInstanceType.UNIVER_SHEET)- .pipe(takeUntil(this.dispose$))- .subscribe((workbook) => this._disposableByUnit.get(workbook.getUnitId())?.dispose());- }-- private _interceptWorkbook(workbook: Workbook): void {- const unitId = workbook.getUnitId();- const disposableCollection = new DisposableCollection();-- workbook.getSheets().forEach((worksheet) => {- const subUnitId = worksheet.getSheetId();- const sheetPermission = new SheetEditablePermission(unitId, subUnitId);- this._permissionService.addPermissionPoint(workbook.getUnitId(), sheetPermission);- });-- disposableCollection.add(toDisposable(- workbook.sheetCreated$.subscribe((worksheet) => {- const subUnitId = worksheet.getSheetId();- const sheetPermission = new SheetEditablePermission(unitId, subUnitId);- this._permissionService.addPermissionPoint(workbook.getUnitId(), sheetPermission);- })- ));-- disposableCollection.add(toDisposable(- workbook.sheetDisposed$.subscribe((worksheet) => {- const subUnitId = worksheet.getSheetId();- const sheetPermission = new SheetEditablePermission(unitId, subUnitId);- this._permissionService.deletePermissionPoint(workbook.getUnitId(), sheetPermission.id);- })- ));-- disposableCollection.add(toDisposable(() => this._disposableByUnit.delete(unitId)));- this._disposableByUnit.set(unitId, disposableCollection);- }-- // TODO@Gggpound: should get by unitId instead of the current one- getEditable$(unitId?: string, sheetId?: string) {- return of({ value: true, status: PermissionStatus.INIT });-- // const workbook = this._univerInstanceService.getCurrentUnitForType<Workbook>(UniverInstanceType.UNIVER_SHEET)!;- // if (!workbook) {- // }-- // const _unitId = unitId || workbook.getUnitId();- // const sheet = workbook.getActiveSheet();- // const _sheetId = sheetId || sheet.getSheetId();- // const sheetPermission = new SheetEditablePermission(_unitId, _sheetId);- // return this._permissionService- // .composePermission$(_unitId, [UniverEditablePermissionPoint, sheetPermission.id])- // .pipe(- // map(([univerEditable, sheetEditable]) => {- // const editable = univerEditable.value && sheetEditable.value;- // const status = getTypeFromPermissionItemList([univerEditable, sheetEditable]);- // return { value: editable, status };- // })- // );- }-- getSheetEditable(unitId?: string, sheetId?: string) {- return true;- // const workbook = this._univerInstanceService.getCurrentUnitForType<Workbook>(UniverInstanceType.UNIVER_SHEET)!;- // if (!workbook) return false;-- // const _unitId = unitId || workbook.getUnitId();- // const sheet = workbook.getActiveSheet();- // const _sheetId = sheetId || sheet.getSheetId();- // const sheetPermission = new SheetEditablePermission(_unitId, _sheetId);- // return this._permissionService- // .composePermission(_unitId, [UniverEditablePermissionPoint, sheetPermission.id])- // .every((item) => item.value);- }-- setSheetEditable(v: boolean, unitId?: string, sheetId?: string) {- const workbook = this._univerInstanceService.getCurrentUnitForType<Workbook>(UniverInstanceType.UNIVER_SHEET)!;- if (!workbook) return;-- const _unitId = unitId || workbook.getUnitId();- const sheet = workbook.getActiveSheet();- const _sheetId = sheetId || sheet.getSheetId();- const sheetPermission = new SheetEditablePermission(_unitId, _sheetId);- this._permissionService.updatePermissionPoint(_unitId, sheetPermission.id, v);- }-}diff --git a/packages/sheets/src/services/permission/tool.ts b/packages/sheets/src/services/permission/tool.tsdeleted file mode 100644index a07ee01a91..0000000000--- a/packages/sheets/src/services/permission/tool.ts+++ /dev/null@@ -1,32 +0,0 @@-/**- * Copyright 2023-present DreamNum Inc.- *- * Licensed under the Apache License, Version 2.0 (the "License");- * you may not use this file except in compliance with the License.- * You may obtain a copy of the License at- *- * http://www.apache.org/licenses/LICENSE-2.0- *- * Unless required by applicable law or agreed to in writing, software- * distributed under the License is distributed on an "AS IS" BASIS,- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.- * See the License for the specific language governing permissions and- * limitations under the License.- */--import type { Workbook } from '@univerjs/core';-import { IUniverInstanceService, UniverInstanceType } from '@univerjs/core';-import type { IAccessor } from '@wendellhu/redi';-import { map } from 'rxjs';--import { SheetPermissionService } from './sheet-permission.service';--export function getCurrentSheetDisabled$(accessor: IAccessor) {- const univerInstanceService = accessor.get(IUniverInstanceService);- const sheetPermissionService = accessor.get(SheetPermissionService);-- const unitId = univerInstanceService.getCurrentUnitForType<Workbook>(UniverInstanceType.UNIVER_SHEET)?.getUnitId();- const sheetId = univerInstanceService.getCurrentUnitForType<Workbook>(UniverInstanceType.UNIVER_SHEET)?.getActiveSheet().getSheetId();-- return sheetPermissionService.getEditable$(unitId, sheetId)?.pipe(map((e) => !e.value));-}diff --git a/packages/sheets/src/services/permission/type.ts b/packages/sheets/src/services/permission/type.tsnew file mode 100644index 0000000000..129b7b86e4--- /dev/null+++ b/packages/sheets/src/services/permission/type.ts@@ -0,0 +1,39 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import type { UnitObject } from '@univerjs/protocol';++export interface IWorksheetProtectionRule {+ permissionId: string;+ name: string;+ description?: string;+ unitType: UnitObject;+ unitId: string;+ subUnitId: string;+}++export interface IWorksheetProtectionPointRule {+ unitId: string;+ subUnitId: string;+ permissionId: string;+}++export type IObjectModel = Record<string, IWorksheetProtectionRule[]>;+export type IModel = Map<string, Map<string, IWorksheetProtectionRule>>;++export type IObjectPointModel = Record<string, IWorksheetProtectionPointRule[]>;+export type IPointRuleModel = Map<string, Map<string, IWorksheetProtectionPointRule>>;+diff --git a/packages/sheets/src/services/permission/workbook-permission/index.ts b/packages/sheets/src/services/permission/workbook-permission/index.tsnew file mode 100644index 0000000000..ce9a3d1b46--- /dev/null+++ b/packages/sheets/src/services/permission/workbook-permission/index.ts@@ -0,0 +1,17 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++export { getAllWorkbookPermissionPoint, defaultWorkbookPermissionPoints } from './util';diff --git a/packages/sheets/src/services/permission/workbook-permission/util.ts b/packages/sheets/src/services/permission/workbook-permission/util.tsnew file mode 100644index 0000000000..a4c10ed448--- /dev/null+++ b/packages/sheets/src/services/permission/workbook-permission/util.ts@@ -0,0 +1,37 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import { UnitAction } from '@univerjs/protocol';+import { WorkbookCommentPermission, WorkbookCopyPermission, WorkbookEditablePermission, WorkbookExportPermission, WorkbookManageCollaboratorPermission, WorkbookPrintPermission, WorkbookViewPermission } from '../permission-point';++export const getAllWorkbookPermissionPoint = () => [+ WorkbookEditablePermission,+ WorkbookPrintPermission,+ WorkbookCommentPermission,+ WorkbookViewPermission,+ WorkbookCopyPermission,+ WorkbookExportPermission,+ WorkbookManageCollaboratorPermission,+];++export const defaultWorkbookPermissionPoints = [+ UnitAction.Edit,+ UnitAction.View,+ UnitAction.Comment,+ UnitAction.Print,+ UnitAction.Copy,+ UnitAction.ManageCollaborator,+];diff --git a/packages/sheets/src/services/permission/workbook-permission/workbook-permission.service.ts b/packages/sheets/src/services/permission/workbook-permission/workbook-permission.service.tsnew file mode 100644index 0000000000..ad2f1c08f3--- /dev/null+++ b/packages/sheets/src/services/permission/workbook-permission/workbook-permission.service.ts@@ -0,0 +1,58 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import { Inject } from '@wendellhu/redi';+import type { Workbook } from '@univerjs/core';+import { Disposable, IPermissionService, IUniverInstanceService, LifecycleStages, OnLifecycle, UniverInstanceType } from '@univerjs/core';++import { getAllWorkbookPermissionPoint } from './util';++@OnLifecycle(LifecycleStages.Starting, WorkbookPermissionService)+export class WorkbookPermissionService extends Disposable {+ constructor(+ @Inject(IPermissionService) private _permissionService: IPermissionService,+ @Inject(IUniverInstanceService) private _univerInstanceService: IUniverInstanceService+ ) {+ super();+ this._init();+ }++ private _init() {+ const handleWorkbook = (workbook: Workbook) => {+ const unitId = workbook.getUnitId();+ getAllWorkbookPermissionPoint().forEach((F) => {+ const instance = new F(unitId);+ this._permissionService.addPermissionPoint(instance);+ });+ };++ this._univerInstanceService.getAllUnitsForType<Workbook>(UniverInstanceType.UNIVER_SHEET).forEach((workbook) => {+ handleWorkbook(workbook);+ });++ this.disposeWithMe(this._univerInstanceService.getTypeOfUnitAdded$<Workbook>(UniverInstanceType.UNIVER_SHEET).subscribe((workbook) => {+ handleWorkbook(workbook);+ }));++ this.disposeWithMe(this._univerInstanceService.getTypeOfUnitDisposed$<Workbook>(UniverInstanceType.UNIVER_SHEET).subscribe((workbook) => {+ const unitId = workbook.getUnitId();+ getAllWorkbookPermissionPoint().forEach((F) => {+ const instance = new F(unitId);+ this._permissionService.deletePermissionPoint(instance.id);+ });+ }));+ }+}diff --git a/packages/sheets/src/services/permission/worksheet-permission/index.ts b/packages/sheets/src/services/permission/worksheet-permission/index.tsnew file mode 100644index 0000000000..6c89fee6fb--- /dev/null+++ b/packages/sheets/src/services/permission/worksheet-permission/index.ts@@ -0,0 +1,21 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++export { WorksheetPermissionService } from './worksheet-permission.service';+export { WorksheetProtectionRuleModel } from './worksheet-permission-rule.model';+export { WorksheetProtectionPointModel } from './worksheet-permission-point.model';+export { WorksheetProtectionRenderService } from './worksheet-permission-render.service';+diff --git a/packages/sheets/src/services/permission/worksheet-permission/type.ts b/packages/sheets/src/services/permission/worksheet-permission/type.tsnew file mode 100644index 0000000000..690bce74d9--- /dev/null+++ b/packages/sheets/src/services/permission/worksheet-permission/type.ts@@ -0,0 +1,27 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import type { ICellDataForSheetInterceptor } from '@univerjs/core';+import { UnitAction } from '@univerjs/protocol';++export const defaultSheetActions = [+ UnitAction.Edit,+ UnitAction.Copy,+];++export type IWorksheetProtectionRenderCellData = ICellDataForSheetInterceptor & { hasWorksheetRule: boolean } & {+ selectionProtection: { [UnitAction.View]: boolean; [UnitAction.Edit]: boolean }[];+};diff --git a/packages/sheets/src/services/permission/worksheet-permission/utils.ts b/packages/sheets/src/services/permission/worksheet-permission/utils.tsnew file mode 100644index 0000000000..41b6b83ee0--- /dev/null+++ b/packages/sheets/src/services/permission/worksheet-permission/utils.ts@@ -0,0 +1,58 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import { UnitAction } from '@univerjs/protocol';+import { WorksheetCopyPermission, WorksheetDeleteColumnPermission, WorksheetDeleteRowPermission, WorksheetEditExtraObjectPermission, WorksheetEditPermission, WorksheetFilterPermission, WorksheetInsertColumnPermission, WorksheetInsertHyperlinkPermission, WorksheetInsertRowPermission, WorksheetPivotTablePermission, WorksheetSetCellStylePermission, WorksheetSetCellValuePermission, WorksheetSetColumnStylePermission, WorksheetSetRowStylePermission, WorksheetSortPermission, WorksheetViewPermission } from '../permission-point';++export const getAllWorksheetPermissionPoint = () => [+ WorksheetViewPermission,+ WorksheetEditPermission,+];++export const getAllWorksheetPermissionPointByPointPanel = () => [+ WorksheetCopyPermission,+ WorksheetDeleteColumnPermission,+ WorksheetDeleteRowPermission,+ WorksheetEditExtraObjectPermission,+ WorksheetFilterPermission,+ WorksheetInsertColumnPermission,+ WorksheetInsertHyperlinkPermission,+ WorksheetInsertRowPermission,+ WorksheetPivotTablePermission,+ WorksheetSetCellStylePermission,+ WorksheetSetCellValuePermission,+ WorksheetSetColumnStylePermission,+ WorksheetSetRowStylePermission,+ WorksheetSortPermission,+];++export const defaultWorksheetPermissionPoint = [+ UnitAction.Copy,+ UnitAction.SetCellStyle,+ UnitAction.SetCellValue,+ UnitAction.SetRowStyle,+ UnitAction.SetColumnStyle,+ UnitAction.InsertRow,+ UnitAction.InsertColumn,+ UnitAction.InsertHyperlink,+ UnitAction.DeleteRow,+ UnitAction.DeleteColumn,+ UnitAction.Sort,+ UnitAction.Filter,+ UnitAction.PivotTable,+ UnitAction.EditExtraObject,+];+diff --git a/packages/sheets/src/services/permission/worksheet-permission/worksheet-permission-point.model.ts b/packages/sheets/src/services/permission/worksheet-permission/worksheet-permission-point.model.tsnew file mode 100644index 0000000000..bb695f3395--- /dev/null+++ b/packages/sheets/src/services/permission/worksheet-permission/worksheet-permission-point.model.ts@@ -0,0 +1,97 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import { Subject } from 'rxjs';+import { LifecycleStages, OnLifecycle } from '@univerjs/core';+import type { IObjectPointModel, IPointRuleModel, IWorksheetProtectionPointRule } from '../type';++@OnLifecycle(LifecycleStages.Starting, WorksheetProtectionPointModel)+export class WorksheetProtectionPointModel {+ private _model: IPointRuleModel = new Map();++ private _pointChange = new Subject<{+ unitId: string;+ subUnitId: string;+ permissionId: string;+ }>();++ pointChange$ = this._pointChange.asObservable();++ addRule(rule: IWorksheetProtectionPointRule) {+ const subUnitMap = this._ensureSubUnitMap(rule.unitId);+ subUnitMap.set(rule.subUnitId, rule);+ this._pointChange.next(rule);+ }++ deleteRule(unitId: string, subUnitId: string) {+ const rule = this._model.get(unitId)?.get(subUnitId);+ if (rule) {+ this._model?.get(unitId)?.delete(subUnitId);+ this._pointChange.next(rule);+ }+ }++ getRule(unitId: string, subUnitId: string) {+ return this._model?.get(unitId)?.get(subUnitId);+ }++ toObject() {+ const result: IObjectPointModel = {};+ const unitKeys = [...this._model.keys()];+ unitKeys.forEach((unitId) => {+ const subUnitMap = this._model.get(unitId);+ if (subUnitMap?.size) {+ result[unitId] = [];+ const subUnitKeys = [...subUnitMap.keys()];+ subUnitKeys.forEach((subUnitId) => {+ const rule = subUnitMap.get(subUnitId);+ if (rule) {+ result[unitId].push(rule);+ }+ });+ }+ });+ return result;+ }++ fromObject(obj: IObjectPointModel) {+ const result: IPointRuleModel = new Map();+ Object.keys(obj).forEach((unitId) => {+ const subUnitList = obj[unitId];+ if (subUnitList?.length) {+ const subUnitMap = new Map();+ subUnitList.forEach((rule) => {+ subUnitMap.set(rule.subUnitId, rule);+ });+ result.set(unitId, subUnitMap);+ }+ });+ this._model = result;+ }++ deleteUnitModel() {+ this._model.clear();+ }++ private _ensureSubUnitMap(unitId: string) {+ let subUnitMap = this._model.get(unitId);+ if (!subUnitMap) {+ subUnitMap = new Map();+ this._model.set(unitId, subUnitMap);+ }+ return subUnitMap;+ }+}diff --git a/packages/sheets/src/services/permission/worksheet-permission/worksheet-permission-render.service.ts b/packages/sheets/src/services/permission/worksheet-permission/worksheet-permission-render.service.tsnew file mode 100644index 0000000000..9e1332229a--- /dev/null+++ b/packages/sheets/src/services/permission/worksheet-permission/worksheet-permission-render.service.ts@@ -0,0 +1,53 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import { Inject } from '@wendellhu/redi';+import { IRenderManagerService } from '@univerjs/engine-render';+import type { Spreadsheet } from '@univerjs/engine-render';+import { Disposable, IUniverInstanceService, LifecycleStages, OnLifecycle, UniverInstanceType } from '@univerjs/core';+import { worksheetProtectionKey, WorksheetProtectionRenderExtension } from '../../../render/worksheet-protection/worksheet-permission.render';++@OnLifecycle(LifecycleStages.Ready, WorksheetProtectionRenderService)+export class WorksheetProtectionRenderService extends Disposable {+ private _worksheetProtectionRenderExtension = new WorksheetProtectionRenderExtension();+ constructor(+ @Inject(IRenderManagerService) private _renderManagerService: IRenderManagerService,+ @Inject(IUniverInstanceService) private _univerInstanceService: IUniverInstanceService++ ) {+ super();+ this._initRender();+ }++ private _initRender() {+ const register = (renderId: string) => {+ const render = renderId && this._renderManagerService.getRenderById(renderId);+ const spreadsheetRender = render && render.mainComponent as Spreadsheet;+ if (spreadsheetRender) {+ if (!spreadsheetRender.getExtensionByKey(worksheetProtectionKey)) {+ spreadsheetRender.register(this._worksheetProtectionRenderExtension);+ }+ }+ };+ this.disposeWithMe(this._renderManagerService.currentRender$.subscribe((renderId) => {+ renderId && register(renderId);+ }));+ const workbook = this._univerInstanceService.getCurrentUnitForType(UniverInstanceType.UNIVER_SHEET)!;+ if (workbook) {+ register(workbook.getUnitId());+ }+ }+}diff --git a/packages/sheets/src/services/permission/worksheet-permission/worksheet-permission-rule.model.ts b/packages/sheets/src/services/permission/worksheet-permission/worksheet-permission-rule.model.tsnew file mode 100644index 0000000000..ed30f0fb94--- /dev/null+++ b/packages/sheets/src/services/permission/worksheet-permission/worksheet-permission-rule.model.ts@@ -0,0 +1,135 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import { BehaviorSubject, Subject } from 'rxjs';+import { LifecycleStages, OnLifecycle } from '@univerjs/core';+import type { IModel, IObjectModel, IWorksheetProtectionRule } from '../type';++type IRuleChangeType = 'add' | 'set' | 'delete';++@OnLifecycle(LifecycleStages.Starting, WorksheetProtectionRuleModel)+export class WorksheetProtectionRuleModel {+ /**+ *+ * Map<unitId, Map<subUnitId, Map<ruleId, IWorksheetProtectionRule>>>+ */+ private _model: IModel = new Map();++ private _ruleChange = new Subject<{+ unitId: string;+ subUnitId: string;+ rule: IWorksheetProtectionRule;+ oldRule?: IWorksheetProtectionRule;+ type: IRuleChangeType;+ }>();++ private _ruleRefresh = new Subject();+ private _resetOrder = new Subject();++ ruleChange$ = this._ruleChange.asObservable();++ ruleRefresh$ = this._ruleRefresh.asObservable();++ resetOrder$ = this._resetOrder.asObservable();++ private _worksheetRuleInitStateChange = new BehaviorSubject<boolean>(false);+ worksheetRuleInitStateChange$ = this._worksheetRuleInitStateChange.asObservable();++ changeRuleInitState(state: boolean) {+ this._worksheetRuleInitStateChange.next(state);+ }++ addRule(unitId: string, rule: IWorksheetProtectionRule) {+ const subUnitMap = this._ensureSubUnitMap(unitId);+ subUnitMap.set(rule.subUnitId, rule);+ this._ruleChange.next({ unitId, rule, type: 'add', subUnitId: rule.subUnitId });+ }++ deleteRule(unitId: string, subUnitId: string) {+ const rule = this._model?.get(unitId)?.get(subUnitId);+ if (rule) {+ this._model.get(unitId)?.delete(subUnitId);+ this._ruleChange.next({ unitId, rule, type: 'delete', subUnitId });+ }+ }++ setRule(unitId: string, subUnitId: string, rule: IWorksheetProtectionRule) {+ const oldRule = this.getRule(unitId, subUnitId);+ if (oldRule) {+ this._model?.get(unitId)?.set(subUnitId, rule);+ this._ruleChange.next({ unitId, oldRule, rule, type: 'set', subUnitId });+ }+ }++ getRule(unitId: string, subUnitId: string) {+ return this._model?.get(unitId)?.get(subUnitId);+ }++ toObject() {+ const result: IObjectModel = {};+ const unitKeys = [...this._model.keys()];+ unitKeys.forEach((unitId) => {+ const subUnitMap = this._model.get(unitId);+ if (subUnitMap?.size) {+ result[unitId] = [];+ const subUnitKeys = [...subUnitMap.keys()];+ subUnitKeys.forEach((subUnitId) => {+ const rule = subUnitMap.get(subUnitId);+ if (rule) {+ result[unitId].push(rule);+ }+ });+ }+ });+ return result;+ }++ fromObject(obj: IObjectModel) {+ const result: IModel = new Map();+ Object.keys(obj).forEach((unitId) => {+ const subUnitList = obj[unitId];+ if (subUnitList?.length) {+ const subUnitMap = new Map();+ subUnitList.forEach((rule) => {+ subUnitMap.set(rule.subUnitId, rule);+ });+ result.set(unitId, subUnitMap);+ }+ });+ this._model = result;+ }++ deleteUnitModel() {+ this._model.clear();+ }++ private _ensureSubUnitMap(unitId: string) {+ let subUnitMap = this._model.get(unitId);+ if (!subUnitMap) {+ subUnitMap = new Map();+ this._model.set(unitId, subUnitMap);+ }+ return subUnitMap;+ }++ ruleRefresh(permissionId: string) {+ this._ruleRefresh.next(permissionId);+ }++ resetOrder() {+ this._resetOrder.next(Math.random());+ }+}diff --git a/packages/sheets/src/services/permission/worksheet-permission/worksheet-permission.service.ts b/packages/sheets/src/services/permission/worksheet-permission/worksheet-permission.service.tsnew file mode 100644index 0000000000..e71fd358ec--- /dev/null+++ b/packages/sheets/src/services/permission/worksheet-permission/worksheet-permission.service.ts@@ -0,0 +1,229 @@+/**+ * Copyright 2023-present DreamNum Inc.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import type { Workbook, Worksheet } from '@univerjs/core';+import { IPermissionService, IResourceManagerService, IUniverInstanceService, LifecycleStages, OnLifecycle, RxDisposable, UniverInstanceType } from '@univerjs/core';+import { Inject, Injector } from '@wendellhu/redi';+import { takeUntil } from 'rxjs/operators';++// import type { UnitAction, UnitObject } from '@univerjs/protocol';+import { UnitAction, UniverType } from '@univerjs/protocol';+import type { ISheetFontRenderExtension } from '@univerjs/engine-render';+import {+ WorksheetEditPermission,+ WorksheetViewPermission,+} from '../permission-point';+import type { IObjectModel, IObjectPointModel } from '../type';+import { SheetInterceptorService } from '../../sheet-interceptor/sheet-interceptor.service';+import { INTERCEPTOR_POINT } from '../../sheet-interceptor/interceptor-const';+import { WorksheetProtectionRuleModel } from './worksheet-permission-rule.model';+import { getAllWorksheetPermissionPoint, getAllWorksheetPermissionPointByPointPanel } from './utils';+import type { IWorksheetProtectionRenderCellData } from './type';+import { WorksheetProtectionPointModel } from './worksheet-permission-point.model';++export const RULE_MODEL_PLUGIN_NAME = 'SHEET_WORKSHEET_PROTECTION_PLUGIN';+export const POINT_MODEL_PLUGIN_NAME = 'SHEET_WORKSHEET_PROTECTION_POINT_PLUGIN';++@OnLifecycle(LifecycleStages.Starting, WorksheetPermissionService)+export class WorksheetPermissionService extends RxDisposable {+ constructor(+ @Inject(IPermissionService) private _permissionService: IPermissionService,+ @Inject(IUniverInstanceService) private _univerInstanceService: IUniverInstanceService,+ @Inject(Injector) readonly _injector: Injector,+ @Inject(WorksheetProtectionRuleModel) private _worksheetProtectionRuleModel: WorksheetProtectionRuleModel,+ @Inject(WorksheetProtectionPointModel) private _worksheetProtectionPointRuleModel: WorksheetProtectionPointModel,+ @Inject(IResourceManagerService) private _resourceManagerService: IResourceManagerService,+ @Inject(SheetInterceptorService) private _sheetInterceptorService: SheetInterceptorService+ ) {+ super();+ this._init();+ this._initRuleChange();+ this._initRuleSnapshot();+ this._initPointSnapshot();+ this._initViewModelInterceptor();+ }++ private _init() {+ const handleWorkbook = (workbook: Workbook) => {+ const unitId = workbook.getUnitId();+ const handleWorksheet = (worksheet: Worksheet) => {+ const subUnitId = worksheet.getSheetId();+ [...getAllWorksheetPermissionPoint(), ...getAllWorksheetPermissionPointByPointPanel()].forEach((F) => {+ const instance = new F(unitId, subUnitId);+ this._permissionService.addPermissionPoint(instance);+ });+ };+ workbook.getSheets().forEach((worksheet) => {+ handleWorksheet(worksheet);+ });+ workbook.sheetCreated$.subscribe((worksheet) => {+ handleWorksheet(worksheet);+ });+ workbook.sheetDisposed$.subscribe((worksheet) => {+ const subUnitId = worksheet.getSheetId();+ [...getAllWorksheetPermissionPoint(), ...getAllWorksheetPermissionPointByPointPanel()].forEach((F) => {+ const instance = new F(unitId, subUnitId);+ this._permissionService.deletePermissionPoint(instance.id);+ });+ });+ };++ this._univerInstanceService.getAllUnitsForType<Workbook>(UniverInstanceType.UNIVER_SHEET).forEach((workbook) => {+ handleWorkbook(workbook);+ });++ this._univerInstanceService.getTypeOfUnitAdded$<Workbook>(UniverInstanceType.UNIVER_SHEET).pipe(takeUntil(this.dispose$)).subscribe(handleWorkbook);++ this._univerInstanceService.getTypeOfUnitDisposed$<Workbook>(UniverInstanceType.UNIVER_SHEET).pipe(takeUntil(this.dispose$)).subscribe((workbook) => {+ workbook.getSheets().forEach((worksheet) => {+ const unitId = workbook.getUnitId();+ const subUnitId = worksheet.getSheetId();+ getAllWorksheetPermissionPoint().forEach((F) => {+ const instance = new F(unitId, subUnitId);+ this._permissionService.deletePermissionPoint(instance.id);+ });+ });+ });+ }++ private _initRuleChange() {+ this.disposeWithMe(+ this._worksheetProtectionRuleModel.ruleChange$.subscribe((info) => {+ switch (info.type) {+ case 'add': {+ getAllWorksheetPermissionPoint().forEach((F) => {+ const instance = new F(info.unitId, info.subUnitId);+ this._permissionService.addPermissionPoint(instance);+ });+ break;+ }+ case 'delete': {+ getAllWorksheetPermissionPoint().forEach((F) => {+ const instance = new F(info.unitId, info.subUnitId);+ this._permissionService.deletePermissionPoint(instance.id);+ });+ break;+ }+ case 'set': {+ getAllWorksheetPermissionPoint().forEach((F) => {+ const instance = new F(info.unitId, info.subUnitId);+ this._permissionService.updatePermissionPoint(instance.id, info.rule);+ });+ break;+ }+ }+ }));+ }++ private _initRuleSnapshot() {+ const toJson = () => {+ const object = this._worksheetProtectionRuleModel.toObject();+ return JSON.stringify(object);+ };+ const parseJson = (json: string): IObjectModel => {+ if (!json) {+ return {};+ }+ try {+ return JSON.parse(json);+ } catch (err) {+ return {};+ }+ };+ this.disposeWithMe(+ this._resourceManagerService.registerPluginResource({+ toJson, parseJson,+ pluginName: RULE_MODEL_PLUGIN_NAME,+ businesses: [UniverType.UNIVER_SHEET],+ onLoad: (unitId, resources) => {+ this._worksheetProtectionRuleModel.fromObject(resources);+ Object.keys(resources).forEach((subUnitId) => {+ getAllWorksheetPermissionPoint().forEach((F) => {+ const instance = new F(unitId, subUnitId);+ this._permissionService.addPermissionPoint(instance);+ });+ });+ this._worksheetProtectionRuleModel.changeRuleInitState(true);+ },+ onUnLoad: () => {+ this._worksheetProtectionRuleModel.deleteUnitModel();+ },+ })+ );+ }++ private _initPointSnapshot() {+ const toJson = () => {+ const object = this._worksheetProtectionPointRuleModel.toObject();+ return JSON.stringify(object);+ };+ const parseJson = (json: string): IObjectPointModel => {+ if (!json) {+ return {};+ }+ try {+ return JSON.parse(json);+ } catch (err) {+ return {};+ }+ };+ this.disposeWithMe(+ this._resourceManagerService.registerPluginResource({+ toJson, parseJson,+ pluginName: POINT_MODEL_PLUGIN_NAME,+ businesses: [UniverType.UNIVER_SHEET],+ onLoad: (unitId, resources) => {+ this._worksheetProtectionPointRuleModel.fromObject(resources);+ Object.keys(resources).forEach((subUnitId) => {+ getAllWorksheetPermissionPointByPointPanel().forEach((F) => {+ const instance = new F(unitId, subUnitId);+ this._permissionService.addPermissionPoint(instance);+ });+ });+ },+ onUnLoad: () => {+ this._worksheetProtectionPointRuleModel.deleteUnitModel();+ },+ })+ );+ }++ private _initViewModelInterceptor() {+ this.disposeWithMe(this._sheetInterceptorService.intercept(INTERCEPTOR_POINT.CELL_CONTENT, {+ handler: (cell = {}, context, next) => {+ const { unitId, subUnitId } = context;+ const worksheetRule = this._worksheetProtectionRuleModel.getRule(unitId, subUnitId);+ if (worksheetRule?.permissionId && worksheetRule.name) {+ const selectionProtection = [{+ [UnitAction.View]: this._permissionService.getPermissionPoint(new WorksheetViewPermission(unitId, subUnitId).id)?.value ?? false,+ [UnitAction.Edit]: this._permissionService.getPermissionPoint(new WorksheetEditPermission(unitId, subUnitId).id)?.value ?? false,+ }];+ const isSkipFontRender = !selectionProtection[0]?.[UnitAction.View];+ const _cellData: IWorksheetProtectionRenderCellData & ISheetFontRenderExtension = { ...cell, hasWorksheetRule: true, selectionProtection };+ if (isSkipFontRender) {+ if (!_cellData.fontRenderExtension) {+ _cellData.fontRenderExtension = {};+ }+ _cellData.fontRenderExtension.isSkip = isSkipFontRender;+ }+ return next(_cellData);+ }+ return next(cell);+ },+ }+ ));+ }+}diff --git a/packages/sheets/src/sheets-plugin.ts b/packages/sheets/src/sheets-plugin.tsindex 2deb3c43ca..9d6c535f93 100644--- a/packages/sheets/src/sheets-plugin.ts+++ b/packages/sheets/src/sheets-plugin.ts@@ -14,7 +14,8 @@* limitations under the License.*/-import { ICommandService, LocaleService, Plugin, UniverInstanceType } from '@univerjs/core';+import type { DependencyOverride } from '@univerjs/core';+import { ICommandService, LocaleService, mergeOverrideWithDependencies, Plugin, UniverInstanceType } from '@univerjs/core';import type { Dependency } from '@wendellhu/redi';import { Inject, Injector } from '@wendellhu/redi';@@ -25,16 +26,24 @@ import { MergeCellController } from './controllers/merge-cell.controller';import { BorderStyleManagerService } from './services/border-style-manager.service';import { NumfmtService } from './services/numfmt/numfmt.service';import { INumfmtService } from './services/numfmt/type';-import { SheetPermissionService } from './services/permission';+import { WorkbookPermissionService } from './services/permission/workbook-permission/workbook-permission.service';+import { RefRangeService } from './services/ref-range/ref-range.service';import { SelectionManagerService } from './services/selection-manager.service';import { SheetInterceptorService } from './services/sheet-interceptor/sheet-interceptor.service';import { DefinedNameDataController } from './controllers/defined-name-data.controller';+import { WorksheetPermissionService, WorksheetProtectionPointModel, WorksheetProtectionRuleModel } from './services/permission/worksheet-permission';+import { RangeProtectionRenderModel } from './model/range-protection-render.model';+import { RangeProtectionRuleModel } from './model/range-protection-rule.model';++import { RangeProtectionRefRangeService } from './services/permission/range-permission/range-protection.ref-range';+import { RangeProtectionService } from './services/permission/range-permission/range-protection.service';const PLUGIN_NAME = 'SHEET_PLUGIN';export interface IUniverSheetsConfig {notExecuteFormula?: boolean;+ override?: DependencyOverride;}/**@@ -64,7 +73,7 @@ export class UniverSheetsPlugin extends Plugin {[BorderStyleManagerService],[SelectionManagerService],[RefRangeService],- [SheetPermissionService],+ [WorkbookPermissionService],[INumfmtService, { useClass: NumfmtService }],[SheetInterceptorService],@@ -72,6 +81,17 @@ export class UniverSheetsPlugin extends Plugin {[BasicWorksheetController],[MergeCellController],[DefinedNameDataController],++ // permission+ [WorksheetPermissionService],+ [WorksheetProtectionRuleModel],+ [WorksheetProtectionPointModel],++ // range protection+ [RangeProtectionRenderModel],+ [RangeProtectionRuleModel],+ [RangeProtectionRefRangeService],+ [RangeProtectionService],];if (!this._config?.notExecuteFormula) {@@ -81,7 +101,7 @@ export class UniverSheetsPlugin extends Plugin {);}- dependencies.forEach((d) => {+ mergeOverrideWithDependencies(dependencies, this._config?.override).forEach((d) => {sheetInjector.add(d);});}diff --git a/packages/thread-comment-ui/package.json b/packages/thread-comment-ui/package.jsonindex 0a7073dd0b..de5f832f80 100644--- a/packages/thread-comment-ui/package.json+++ b/packages/thread-comment-ui/package.json@@ -74,7 +74,7 @@},"dependencies": {"@univerjs/icons": "^0.1.52",- "@univerjs/protocol": "^0.1.32",+ "@univerjs/protocol": "^0.1.34","@univerjs/thread-comment": "workspace:*"},"devDependencies": {diff --git a/packages/thread-comment-ui/src/views/thread-comment-panel/index.tsx b/packages/thread-comment-ui/src/views/thread-comment-panel/index.tsxindex 9282849aec..90973294fe 100644--- a/packages/thread-comment-ui/src/views/thread-comment-panel/index.tsx+++ b/packages/thread-comment-ui/src/views/thread-comment-panel/index.tsx@@ -53,7 +53,7 @@ export const ThreadCommentPanel = (props: IThreadCommentPanelProps) => {const update = useObservable(threadCommentModel.commentUpdate$);const commandService = useDependency(ICommandService);const subUnitId = useObservable(subUnitId$);- const currentUser = userService.getCurrentUser();+ const currentUser = userService.currentUser;const shouldScroll = useRef(true);const prefix = 'panel';const comments = useMemo(() => {diff --git a/packages/thread-comment/src/plugin.ts b/packages/thread-comment/src/plugin.tsindex 8d4bdd4212..c9689236e0 100644--- a/packages/thread-comment/src/plugin.ts+++ b/packages/thread-comment/src/plugin.ts@@ -47,7 +47,7 @@ export class UniverThreadCommentPlugin extends Plugin {[ThreadCommentModel],[ThreadCommentResourceController],[IThreadCommentDataSourceService, { useClass: ThreadCommentDataSourceService }],- ], this._config.overrides) as Dependency[]).forEach(+ ], this._config?.overrides) as Dependency[]).forEach((d) => {injector.add(d);}diff --git a/packages/ui/src/components/menu/Menu.tsx b/packages/ui/src/components/menu/Menu.tsxindex 93bb3d01d3..8e3483b345 100644--- a/packages/ui/src/components/menu/Menu.tsx+++ b/packages/ui/src/components/menu/Menu.tsx@@ -202,6 +202,8 @@ function MenuItem({ menuItem, onClick }: IMenuItemProps) {const activated = useObservable<boolean>(menuItem.activated$, false);const hidden = useObservable(menuItem.hidden$, false);const value = useObservable<MenuItemDefaultValueType>(menuItem.value$);+ const item = menuItem as IDisplayMenuItem<IMenuSelectorItem>;+ const selectionsFromObservable = useObservable(isObservable(item.selections) ? item.selections : undefined);const [inputValue, setInputValue] = useState(value);/**@@ -237,9 +239,6 @@ function MenuItem({ menuItem, onClick }: IMenuItemProps) {};const renderSelectorType = () => {- const item = menuItem as IDisplayMenuItem<IMenuSelectorItem>;-- const selectionsFromObservable = useObservable(isObservable(item.selections) ? item.selections : undefined);const selections = selectionsFromObservable ?? (item.selections as IValueOption[] | undefined) ?? [];if (selections.length > 0) {diff --git a/packages/ui/src/components/range-selector/RangeSelector.tsx b/packages/ui/src/components/range-selector/RangeSelector.tsxindex 107f133313..487410239e 100644--- a/packages/ui/src/components/range-selector/RangeSelector.tsx+++ b/packages/ui/src/components/range-selector/RangeSelector.tsx@@ -42,10 +42,11 @@ export interface IRangeSelectorProps {size?: 'mini' | 'small' | 'middle' | 'large'; // The size of the selector.placeholder?: string; // Placeholder text.className?: string;+ textEditorClassName?: string;}export function RangeSelector(props: IRangeSelectorProps) {- const { onChange, id, value = '', width = 220, placeholder = '', size = 'middle', onActive, onValid, isSingleChoice = false, openForSheetUnitId, openForSheetSubUnitId, isReadonly = false, className } = props;+ const { onChange, id, value = '', width = 220, placeholder = '', size = 'middle', onActive, onValid, isSingleChoice = false, openForSheetUnitId, openForSheetSubUnitId, isReadonly = false, className, textEditorClassName } = props;const [rangeDataList, setRangeDataList] = useState<string[]>(['']);@@ -273,6 +274,10 @@ export function RangeSelector(props: IRangeSelectorProps) {sClassName = `${styles.rangeSelector} ${styles.rangeSelectorActive}`;}+ if (textEditorClassName) {+ sClassName = `${sClassName} ${textEditorClassName}`;+ }+let height = 28;if (size === 'mini') {height = 20;diff --git a/packages/umd/package.json b/packages/umd/package.jsonindex 115cae3951..2ae59a1bb8 100644--- a/packages/umd/package.json+++ b/packages/umd/package.json@@ -53,7 +53,7 @@"@univerjs/find-replace": "workspace:*","@univerjs/image": "workspace:*","@univerjs/network": "workspace:*",- "@univerjs/protocol": "^0.1.32",+ "@univerjs/protocol": "^0.1.34","@univerjs/rpc": "workspace:*","@univerjs/sheets": "workspace:*","@univerjs/sheets-conditional-formatting": "workspace:*",diff --git a/packages/uniscript/package.json b/packages/uniscript/package.jsonindex 8eafc33e55..caa0780154 100644--- a/packages/uniscript/package.json+++ b/packages/uniscript/package.json@@ -71,18 +71,24 @@"@univerjs/core": "workspace:*","@univerjs/design": "workspace:*","@univerjs/facade": "workspace:*",+ "@univerjs/sheets-ui": "workspace:*","@univerjs/ui": "workspace:*","@wendellhu/redi": "0.15.2","monaco-editor": ">=0.44.0","react": "^16.9.0 || ^17.0.0 || ^18.0.0","rxjs": ">=7.0.0"},+ "dependencies": {+ "@univerjs/protocol": "^0.1.34",+ "@univerjs/sheets": "workspace:*"+ },"devDependencies": {"@types/react": "^18.2.79","@univerjs/core": "workspace:*","@univerjs/design": "workspace:*","@univerjs/facade": "workspace:*","@univerjs/shared": "workspace:*",+ "@univerjs/sheets-ui": "workspace:*","@univerjs/ui": "workspace:*","@wendellhu/redi": "0.15.2","less": "^4.2.0",diff --git a/packages/uniscript/src/controllers/menu.ts b/packages/uniscript/src/controllers/menu.tsindex f872bdc171..b48d2b3fe8 100644--- a/packages/uniscript/src/controllers/menu.ts+++ b/packages/uniscript/src/controllers/menu.ts@@ -19,6 +19,8 @@ import { getMenuHiddenObservable, MenuItemType, MenuPosition } from '@univerjs/uimport type { IAccessor } from '@wendellhu/redi';import { UniverInstanceType } from '@univerjs/core';+import { getCurrentRangeDisable$ } from '@univerjs/sheets-ui';+import { RangeProtectionPermissionEditPoint, WorkbookEditablePermission, WorksheetEditPermission, WorksheetSetCellStylePermission, WorksheetSetCellValuePermission } from '@univerjs/sheets';import { ToggleScriptPanelOperation } from '../commands/operations/panel.operation';export function UniscriptMenuItemFactory(accessor: IAccessor): IMenuButtonItem {@@ -31,6 +33,6 @@ export function UniscriptMenuItemFactory(accessor: IAccessor): IMenuButtonItem {positions: [MenuPosition.TOOLBAR_START],// FIXME hidden$ and disabled$ are not correctly in dochidden$: getMenuHiddenObservable(accessor, UniverInstanceType.UNIVER_SHEET),- // disabled$: getCurrentSheetDisabled$(accessor),+ disabled$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetEditPermission, WorksheetSetCellStylePermission, WorksheetSetCellValuePermission], rangeTypes: [RangeProtectionPermissionEditPoint] }),};}diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex 27c045d973..e9a3801648 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -118,7 +118,7 @@ importers:vite-plugin-dts:specifier: ^3.9.1- version: 3.9.1(@types/[email protected])([email protected])([email protected])([email protected](@types/[email protected])([email protected])([email protected])([email protected]))+ version: 3.9.1(@types/[email protected])([email protected])([email protected])([email protected](@types/[email protected])([email protected])([email protected])([email protected]))vitest:specifier: ^1.6.0version: 1.6.0(@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])@@ -130,7 +130,7 @@ importers:version: 1.4.0([email protected])'@storybook/addon-essentials':specifier: ^8.1.2- version: 8.1.2(@types/[email protected])(@types/[email protected])([email protected])([email protected]([email protected]))([email protected])+ version: 8.1.2(@types/[email protected])(@types/[email protected])([email protected])([email protected]([email protected]))([email protected])'@storybook/addon-interactions':specifier: ^8.1.2version: 8.1.2([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))@@ -145,7 +145,7 @@ importers:'@storybook/blocks':specifier: ^8.1.2- version: 8.1.2(@types/[email protected])(@types/[email protected])([email protected])([email protected]([email protected]))([email protected])+ version: 8.1.2(@types/[email protected])(@types/[email protected])([email protected])([email protected]([email protected]))([email protected])'@storybook/icons':specifier: ^1.2.9@@ -264,6 +264,9 @@ importers:'@univerjs/sheets-numfmt':specifier: workspace:*version: link:../packages/sheets-numfmt+ '@univerjs/sheets-permission-ui':+ specifier: workspace:*+ version: link:../packages/sheet-permission-ui'@univerjs/sheets-thread-comment':specifier: workspace:*version: link:../packages/sheets-thread-comment@@ -308,17 +311,17 @@ importers:version: 18.2.0([email protected])react-mosaic-component:specifier: ^6.1.0- version: 6.1.0(@types/[email protected])(@types/[email protected])([email protected])([email protected]([email protected]))([email protected])+ version: 6.1.0(@types/[email protected])(@types/[email protected])([email protected])([email protected]([email protected]))([email protected])rxjs:specifier: ^7.8.1version: 7.8.1devDependencies:'@types/react':specifier: ^18.2.79- version: 18.3.1+ version: 18.2.79'@types/react-dom':specifier: ^18.2.25- version: 18.3.0+ version: 18.2.25'@univerjs/shared':specifier: workspace:*version: link:../common/shared@@ -350,8 +353,8 @@ importers:packages/core:dependencies:'@univerjs/protocol':- specifier: ^0.1.32- version: 0.1.32(@grpc/[email protected])([email protected])+ specifier: ^0.1.34+ version: 0.1.34(@grpc/[email protected])([email protected])nanoid:specifier: 5.0.7version: 5.0.7@@ -388,6 +391,10 @@ importers:version: 1.6.0(@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])packages/data-validation:+ dependencies:+ '@univerjs/protocol':+ specifier: ^0.1.34+ version: 0.1.34(@grpc/[email protected])([email protected])devDependencies:'@univerjs/core':specifier: workspace:*@@ -526,10 +533,10 @@ importers:'@types/react':specifier: ^18.2.79- version: 18.3.1+ version: 18.2.79'@types/react-dom':specifier: ^18.2.25- version: 18.3.0+ version: 18.2.25'@types/react-grid-layout':specifier: ^1.3.5version: 1.3.5@@ -595,7 +602,7 @@ importers:devDependencies:'@types/react':specifier: ^18.2.79- version: 18.3.1+ version: 18.2.79'@univerjs/core':specifier: workspace:*version: link:../core@@ -794,7 +801,7 @@ importers:devDependencies:'@types/react':specifier: ^18.2.79- version: 18.3.1+ version: 18.2.79'@univerjs/core':specifier: workspace:*version: link:../core@@ -929,7 +936,93 @@ importers:specifier: ^1.6.0version: 1.6.0(@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])+ packages/sheet-permission-ui:+ dependencies:+ '@univerjs/icons':+ specifier: ^0.1.45+ '@univerjs/protocol':+ specifier: ^0.1.34+ version: 0.1.34(@grpc/[email protected])([email protected])+ '@univerjs/sheets-ui':+ specifier: workspace:*+ version: link:../sheets-ui+ dayjs:+ specifier: ^1.11.10+ version: 1.11.10+ devDependencies:+ '@univerjs/core':+ specifier: workspace:*+ version: link:../core+ '@univerjs/design':+ specifier: workspace:*+ version: link:../design+ '@univerjs/docs':+ specifier: workspace:*+ version: link:../docs+ '@univerjs/engine-formula':+ specifier: workspace:*+ version: link:../engine-formula+ '@univerjs/engine-render':+ specifier: workspace:*+ version: link:../engine-render+ '@univerjs/shared':+ specifier: workspace:*+ version: link:../../common/shared+ '@univerjs/sheets':+ specifier: workspace:*+ version: link:../sheets+ '@univerjs/sheets-conditional-formatting':+ specifier: workspace:*+ version: link:../sheets-conditional-formatting+ '@univerjs/sheets-conditional-formatting-ui':+ specifier: workspace:*+ version: link:../sheets-conditional-formatting-ui+ '@univerjs/sheets-data-validation':+ specifier: workspace:*+ version: link:../sheets-data-validation+ '@univerjs/sheets-filter':+ specifier: workspace:*+ version: link:../sheets-filter+ '@univerjs/sheets-filter-ui':+ specifier: workspace:*+ version: link:../sheets-filter-ui+ '@univerjs/sheets-find-replace':+ specifier: workspace:*+ version: link:../sheets-find-replace+ '@univerjs/ui':+ specifier: workspace:*+ version: link:../ui+ '@wendellhu/redi':+ specifier: 0.15.2+ version: 0.15.2+ clsx:+ specifier: ^2.1.0+ version: 2.1.1+ less:+ specifier: ^4.2.0+ version: 4.2.0+ react:+ specifier: ^18.2.0+ version: 18.2.0+ rxjs:+ specifier: ^7.8.1+ version: 7.8.1+ typescript:+ specifier: ^5.4.5+ version: 5.4.5+ vite:+ specifier: ^5.2.8+ version: 5.2.10(@types/[email protected])([email protected])([email protected])([email protected])+ vitest:+ specifier: ^1.4.0+ version: 1.5.0(@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])+packages/sheets:+ dependencies:+ '@univerjs/protocol':+ specifier: ^0.1.34+ version: 0.1.34(@grpc/[email protected])([email protected])devDependencies:'@univerjs/core':specifier: workspace:*@@ -963,6 +1056,10 @@ importers:version: 1.6.0(@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])packages/sheets-conditional-formatting:+ dependencies:+ '@univerjs/protocol':+ specifier: ^0.1.34+ version: 0.1.34(@grpc/[email protected])([email protected])devDependencies:'@univerjs/core':specifier: workspace:*@@ -1009,6 +1106,9 @@ importers:'@univerjs/icons':specifier: ^0.1.52+ '@univerjs/protocol':+ specifier: ^0.1.34+ version: 0.1.34(@grpc/[email protected])([email protected])'@univerjs/sheets-conditional-formatting':specifier: workspace:*version: link:../sheets-conditional-formatting@@ -1050,8 +1150,8 @@ importers:specifier: workspace:*version: link:../engine-render'@univerjs/icons-svg':- specifier: ^0.1.44- version: 0.1.44+ specifier: ^0.1.45+ version: 0.1.45'@univerjs/shared':specifier: workspace:*version: link:../../common/shared@@ -1288,7 +1388,7 @@ importers:devDependencies:'@types/react':specifier: ^18.2.79- version: 18.3.1+ version: 18.2.79'@univerjs/core':specifier: workspace:*version: link:../core@@ -1352,7 +1452,7 @@ importers:devDependencies:'@types/react':specifier: ^18.2.79- version: 18.3.1+ version: 18.2.79'@univerjs/core':specifier: workspace:*version: link:../core@@ -1468,10 +1568,16 @@ importers:'@univerjs/icons':specifier: ^0.1.46+ '@univerjs/protocol':+ specifier: ^0.1.34+ version: 0.1.34(@grpc/[email protected])([email protected])+ '@univerjs/sheets-ui':+ specifier: workspace:*+ version: 'link:'devDependencies:'@types/react':specifier: ^18.2.79- version: 18.3.1+ version: 18.2.79'@univerjs/core':specifier: workspace:*version: link:../core@@ -1529,6 +1635,9 @@ importers:'@univerjs/icons':specifier: ^0.1.52+ '@univerjs/sheets':+ specifier: workspace:*+ version: link:../sheetsdevDependencies:'@univerjs/core':specifier: workspace:*@@ -1607,7 +1716,7 @@ importers:devDependencies:'@types/react':specifier: ^18.2.79- version: 18.3.1+ version: 18.2.79'@univerjs/core':specifier: workspace:*version: link:../core@@ -1655,7 +1764,7 @@ importers:dependencies:'@univerjs/protocol':specifier: ^0.1.32- version: 0.1.32(@grpc/[email protected])([email protected])+ version: 0.1.32(@grpc/[email protected])([email protected])devDependencies:'@univerjs/core':specifier: workspace:*@@ -1691,8 +1800,8 @@ importers:specifier: ^0.1.52'@univerjs/protocol':- specifier: ^0.1.32- version: 0.1.32(@grpc/[email protected])([email protected])+ specifier: ^0.1.34+ version: 0.1.34(@grpc/[email protected])([email protected])'@univerjs/thread-comment':specifier: workspace:*version: link:../thread-comment@@ -1754,20 +1863,20 @@ importers:optionalDependencies:vue:specifier: '>=3.0.0'- version: 3.4.21([email protected])+ version: 3.4.24([email protected])devDependencies:'@testing-library/react':specifier: ^14.2.2'@testing-library/react-hooks':specifier: ^8.0.1'@types/react':specifier: ^18.2.79- version: 18.3.1+ version: 18.2.79'@types/react-dom':specifier: ^18.2.25- version: 18.3.0+ version: 18.2.25'@types/react-transition-group':specifier: ^4.4.10version: 4.4.10@@ -1853,8 +1962,8 @@ importers:specifier: workspace:*version: link:../network'@univerjs/protocol':- specifier: ^0.1.32- version: 0.1.32(@grpc/[email protected])([email protected])+ specifier: ^0.1.34+ version: 0.1.34(@grpc/[email protected])([email protected])'@univerjs/rpc':specifier: workspace:*version: link:../rpc@@ -1939,13 +2048,19 @@ importers:packages/uniscript:dependencies:+ '@univerjs/protocol':+ specifier: ^0.1.34+ version: 0.1.34(@grpc/[email protected])([email protected])+ '@univerjs/sheets':+ specifier: workspace:*+ version: link:../sheetsreact:specifier: ^16.9.0 || ^17.0.0 || ^18.0.0version: 18.2.0devDependencies:'@types/react':specifier: ^18.2.79- version: 18.3.1+ version: 18.2.79'@univerjs/core':specifier: workspace:*version: link:../core@@ -1958,6 +2073,9 @@ importers:'@univerjs/shared':specifier: workspace:*version: link:../../common/shared+ '@univerjs/sheets-ui':+ specifier: workspace:*+ version: link:../sheets-ui'@univerjs/ui':specifier: workspace:*version: link:../ui@@ -2222,6 +2340,11 @@ packages:engines: {node: '>=6.0.0'}hasBin: true+ '@babel/[email protected]':+ resolution: {integrity: sha512-zTvEBcghmeBma9QIGunWevvBAp4/Qu9Bdq+2k0Ot4fVMD6v3dsC9WOcRSKk7tRRyBM/53yKMJko9xOatGQAwSg==}+ engines: {node: '>=6.0.0'}+ hasBin: true+'@babel/[email protected]':resolution: {integrity: sha512-EOv5IK8arwh3LI47dz1b0tKUb/1uhHAnHJOrjgtQMIpu1uXd9mlFrJg9IUgGUgZ41Ch0K8REPTYpO7B76b4vJg==}engines: {node: '>=6.0.0'}@@ -3195,8 +3318,8 @@ packages:'@fal-works/[email protected]':resolution: {integrity: sha512-cEee/Z+I12mZcFJshKcCqC8tuX5hG3s+d+9nZ3LabqKF1vKdF41B92pJVCBggjAGORAeOzyyDDKrZwIkLffeOQ==}- '@grpc/[email protected]':- resolution: {integrity: sha512-MqBisuxTkYvPFnEiu+dag3xG/NBUDzSbAFAWlzfkGnQkjVZ6by3h4atbBc+Ikqup1z5BfB4BN18gKWR1YyppNw==}+ '@grpc/[email protected]':+ resolution: {integrity: sha512-xP58G7wDQ4TCmN/cMUHh00DS7SRDv/+lC+xFLrTkMIN8h55X5NhZMLYbvy7dSELP15qlI6hPhNCRWVMtZMwqLA==}engines: {node: '>=12.10.0'}'@grpc/[email protected]':@@ -3780,78 +3903,83 @@ packages:rollup:optional: true- '@rollup/[email protected]':- resolution: {integrity: sha512-3XFIDKWMFZrMnao1mJhnOT1h2g0169Os848NhhmGweEcfJ4rCi+3yMCOLG4zA61rbJdkcrM/DjVZm9Hg5p5w7g==}+ '@rollup/[email protected]':+ resolution: {integrity: sha512-GkhjAaQ8oUTOKE4g4gsZ0u8K/IHU1+2WQSgS1TwTcYvL+sjbaQjNHFXbOJ6kgqGHIO1DfUhI/Sphi9GkRT9K+Q==}cpu: [arm]os: [android]- '@rollup/[email protected]':- resolution: {integrity: sha512-GdxxXbAuM7Y/YQM9/TwwP+L0omeE/lJAR1J+olu36c3LqqZEBdsIWeQ91KBe6nxwOnb06Xh7JS2U5ooWU5/LgQ==}+ '@rollup/[email protected]':+ resolution: {integrity: sha512-Bvm6D+NPbGMQOcxvS1zUl8H7DWlywSXsphAeOnVeiZLQ+0J6Is8T7SrjGTH29KtYkiY9vld8ZnpV3G2EPbom+w==}cpu: [arm64]os: [android]- '@rollup/[email protected]':- resolution: {integrity: sha512-mCMlpzlBgOTdaFs83I4XRr8wNPveJiJX1RLfv4hggyIVhfB5mJfN4P8Z6yKh+oE4Luz+qq1P3kVdWrCKcMYrrA==}+ '@rollup/[email protected]':+ resolution: {integrity: sha512-i5d64MlnYBO9EkCOGe5vPR/EeDwjnKOGGdd7zKFhU5y8haKhQZTN2DgVtpODDMxUr4t2K90wTUJg7ilgND6bXw==}cpu: [arm64]os: [darwin]- '@rollup/[email protected]':- resolution: {integrity: sha512-yUoEvnH0FBef/NbB1u6d3HNGyruAKnN74LrPAfDQL3O32e3k3OSfLrPgSJmgb3PJrBZWfPyt6m4ZhAFa2nZp2A==}+ '@rollup/[email protected]':+ resolution: {integrity: sha512-WZupV1+CdUYehaZqjaFTClJI72fjJEgTXdf4NbW69I9XyvdmztUExBtcI2yIIU6hJtYvtwS6pkTkHJz+k08mAQ==}cpu: [x64]os: [darwin]- '@rollup/[email protected]':- resolution: {integrity: sha512-GYbLs5ErswU/Xs7aGXqzc3RrdEjKdmoCrgzhJWyFL0r5fL3qd1NPcDKDowDnmcoSiGJeU68/Vy+OMUluRxPiLQ==}+ '@rollup/[email protected]':+ resolution: {integrity: sha512-ADm/xt86JUnmAfA9mBqFcRp//RVRt1ohGOYF6yL+IFCYqOBNwy5lbEK05xTsEoJq+/tJzg8ICUtS82WinJRuIw==}cpu: [arm]os: [linux]- '@rollup/[email protected]':- resolution: {integrity: sha512-L1+D8/wqGnKQIlh4Zre9i4R4b4noxzH5DDciyahX4oOz62CphY7WDWqJoQ66zNR4oScLNOqQJfNSIAe/6TPUmQ==}+ '@rollup/[email protected]':+ resolution: {integrity: sha512-tJfJaXPiFAG+Jn3cutp7mCs1ePltuAgRqdDZrzb1aeE3TktWWJ+g7xK9SNlaSUFw6IU4QgOxAY4rA+wZUT5Wfg==}+ cpu: [arm]+ os: [linux]++ '@rollup/[email protected]':+ resolution: {integrity: sha512-7dy1BzQkgYlUTapDTvK997cgi0Orh5Iu7JlZVBy1MBURk7/HSbHkzRnXZa19ozy+wwD8/SlpJnOOckuNZtJR9w==}cpu: [arm64]os: [linux]- '@rollup/[email protected]':- resolution: {integrity: sha512-tK5eoKFkXdz6vjfkSTCupUzCo40xueTOiOO6PeEIadlNBkadH1wNOH8ILCPIl8by/Gmb5AGAeQOFeLev7iZDOA==}+ '@rollup/[email protected]':+ resolution: {integrity: sha512-zsFwdUw5XLD1gQe0aoU2HVceI6NEW7q7m05wA46eUAyrkeNYExObfRFQcvA6zw8lfRc5BHtan3tBpo+kqEOxmg==}cpu: [arm64]os: [linux]- '@rollup/[email protected]':- resolution: {integrity: sha512-zvXvAUGGEYi6tYhcDmb9wlOckVbuD+7z3mzInCSTACJ4DQrdSLPNUeDIcAQW39M3q6PDquqLWu7pnO39uSMRzQ==}- cpu: [ppc64le]+ '@rollup/[email protected]':+ resolution: {integrity: sha512-p8C3NnxXooRdNrdv6dBmRTddEapfESEUflpICDNKXpHvTjRRq1J82CbU5G3XfebIZyI3B0s074JHMWD36qOW6w==}+ cpu: [ppc64]os: [linux]- '@rollup/[email protected]':- resolution: {integrity: sha512-C3GSKvMtdudHCN5HdmAMSRYR2kkhgdOfye4w0xzyii7lebVr4riCgmM6lRiSCnJn2w1Xz7ZZzHKuLrjx5620kw==}+ '@rollup/[email protected]':+ resolution: {integrity: sha512-Lh/8ckoar4s4Id2foY7jNgitTOUQczwMWNYi+Mjt0eQ9LKhr6sK477REqQkmy8YHY3Ca3A2JJVdXnfb3Rrwkng==}cpu: [riscv64]os: [linux]- '@rollup/[email protected]':- resolution: {integrity: sha512-l4U0KDFwzD36j7HdfJ5/TveEQ1fUTjFFQP5qIt9gBqBgu1G8/kCaq5Ok05kd5TG9F8Lltf3MoYsUMw3rNlJ0Yg==}+ '@rollup/[email protected]':+ resolution: {integrity: sha512-1xwwn9ZCQYuqGmulGsTZoKrrn0z2fAur2ujE60QgyDpHmBbXbxLaQiEvzJWDrscRq43c8DnuHx3QorhMTZgisQ==}cpu: [s390x]os: [linux]- '@rollup/[email protected]':- resolution: {integrity: sha512-xXMLUAMzrtsvh3cZ448vbXqlUa7ZL8z0MwHp63K2IIID2+DeP5iWIT6g1SN7hg1VxPzqx0xZdiDM9l4n9LRU1A==}+ '@rollup/[email protected]':+ resolution: {integrity: sha512-LuOGGKAJ7dfRtxVnO1i3qWc6N9sh0Em/8aZ3CezixSTM+E9Oq3OvTsvC4sm6wWjzpsIlOCnZjdluINKESflJLA==}cpu: [x64]os: [linux]- '@rollup/[email protected]':- resolution: {integrity: sha512-M/JYAWickafUijWPai4ehrjzVPKRCyDb1SLuO+ZyPfoXgeCEAlgPkNXewFZx0zcnoIe3ay4UjXIMdXQXOZXWqA==}+ '@rollup/[email protected]':+ resolution: {integrity: sha512-ch86i7KkJKkLybDP2AtySFTRi5fM3KXp0PnHocHuJMdZwu7BuyIKi35BE9guMlmTpwwBTB3ljHj9IQXnTCD0vA==}cpu: [x64]os: [linux]- '@rollup/[email protected]':- resolution: {integrity: sha512-2YWwoVg9KRkIKaXSh0mz3NmfurpmYoBBTAXA9qt7VXk0Xy12PoOP40EFuau+ajgALbbhi4uTj3tSG3tVseCjuA==}+ '@rollup/[email protected]':+ resolution: {integrity: sha512-Ma4PwyLfOWZWayfEsNQzTDBVW8PZ6TUUN1uFTBQbF2Chv/+sjenE86lpiEwj2FiviSmSZ4Ap4MaAfl1ciF4aSA==}cpu: [arm64]os: [win32]- '@rollup/[email protected]':- resolution: {integrity: sha512-2FSsE9aQ6OWD20E498NYKEQLneShWes0NGMPQwxWOdws35qQXH+FplabOSP5zEe1pVjurSDOGEVCE2agFwSEsw==}+ '@rollup/[email protected]':+ resolution: {integrity: sha512-9m/ZDrQsdo/c06uOlP3W9G2ENRVzgzbSXmXHT4hwVaDQhYcRpi9bgBT0FTG9OhESxwK0WjQxYOSfv40cU+T69w==}cpu: [ia32]os: [win32]- '@rollup/[email protected]':- resolution: {integrity: sha512-7h7J2nokcdPePdKykd8wtc8QqqkqxIrUz7MHj6aNr8waBRU//NLDVnNjQnqQO6fqtjrtCdftpbTuOKAyrAQETQ==}+ '@rollup/[email protected]':+ resolution: {integrity: sha512-YunpoOAyGLDseanENHmbFvQSfVL5BxW3k7hhy0eN4rb3gS/ct75dVD0EXOWIqFT/nE8XYW6LP6vz6ctKRi0k9A==}cpu: [x64]os: [win32]@@ -4424,8 +4552,8 @@ packages:'@types/[email protected]':resolution: {integrity: sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==}- '@types/[email protected]':- resolution: {integrity: sha512-EhwApuTmMBmXuFOikhQLIBUn6uFg81SwLMOAUgodJF14SOBOCMdU04gDoYi0WOJJHD144TL32z4yDqCW3dnkQg==}+ '@types/[email protected]':+ resolution: {integrity: sha512-o/V48vf4MQh7juIKZU2QGDfli6p1+OOi5oXx36Hffpc9adsHeXjVp8rHuPkjd8VT8sOJ2Zp05HR7CdpGTIUFUA==}'@types/[email protected]':resolution: {integrity: sha512-WH/po1gcEcoR6y857yAnPGug+ZhkF4PaTUxgAbwfeSH/QOgVSakKHBXoPGad/sEznmkiaK3pqHk+etdWisoeBQ==}@@ -4436,8 +4564,8 @@ packages:'@types/[email protected]':resolution: {integrity: sha512-hT/+s0VQs2ojCX823m60m5f0sL5idt9SO6Tj6Dg+rdphGPIeJbJ6CxvBYkgkGKrYeDjvIpKTR38UzmtHJOGW3Q==}- '@types/[email protected]':- resolution: {integrity: sha512-V0kuGBX3+prX+DQ/7r2qsv1NsdfnCLnTgnRJ1pYnxykBhGMz+qj+box5lq7XsO5mtZsBqpjwwTu/7wszPfMBcw==}+ '@types/[email protected]':+ resolution: {integrity: sha512-RwGAGXPl9kSXwdNTafkOEuFrTBD5SA2B3iEB96xi8+xu5ddUa/cpvyVCSNn+asgLCTHkb5ZxN8gbuibYJi4s1w==}'@types/[email protected]':resolution: {integrity: sha512-Btgg89dAnqD4vV7R3hlwOxgqobUQKgx3MmrQRi0yYbs/P0ym8XozIAlkqVilPqHQwXs4e9Tf63rrCgl58BcO4w==}@@ -4555,9 +4683,6 @@ packages:'@ungap/[email protected]':resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==}- '@univerjs/[email protected]':- resolution: {integrity: sha512-2n/WnFGcRYxkiFa85te2hs57VLM+8WZ4aZvdJlXB+2AT61KuA0crt5uDUUNv9BXYVi3jtLxh3fF/pJb4DJyK6Q==}-'@univerjs/[email protected]':resolution: {integrity: sha512-v1oETviQ6RI9whV0HyUGlnQLEHyatZssaMJBY/ixIfBEZn4lZeMjPYszWM+Ymm2YilhHWA6+oCj4f5isT0ovIg==}@@ -4580,6 +4705,13 @@ packages:'@grpc/grpc-js': ^1.9.14rxjs: '>=7.0.0'+ '@univerjs/[email protected]':+ resolution: {integrity: sha512-GD/bgjFmnaySkCTgZkPxhNAnkYOLaIOrn7lc+iqE6XgSdjUhkmd8yqSK7cu/nCUHa9wIBHyrk0i+ZkHegaPQgA==}+ engines: {node: '>=16.0.0', npm: '>=8.0.0'}+ peerDependencies:+ '@grpc/grpc-js': ^1.9.14+ rxjs: '>=7.0.0'+'@vitejs/[email protected]':resolution: {integrity: sha512-oojO9IDc4nCUUi8qIR11KoQm0XFFLIwsRBwHRR4d/88IWghn1y6ckz/bJ8GHDCsYEJee8mDzqtJxh15/cisJNQ==}engines: {node: ^14.18.0 || >=16.0.0}@@ -4601,24 +4733,39 @@ packages:'@vitest/[email protected]':resolution: {integrity: sha512-xofQFwIzfdmLLlHa6ag0dPV8YsnKOCP1KdAeVVh34vSjN2dcUiXYCD9htu/9eM7t8Xln4v03U9HLxLpPlsXdZw==}+ '@vitest/[email protected]':+ resolution: {integrity: sha512-0pzuCI6KYi2SIC3LQezmxujU9RK/vwC1U9R0rLuGlNGcOuDWxqWKu6nUdFsX9tH1WU0SXtAxToOsEjeUn1s3hA==}+'@vitest/[email protected]':resolution: {integrity: sha512-ixEvFVQjycy/oNgHjqsL6AZCDduC+tflRluaHIzKIsdbzkLn2U/iBnVeJwB6HsIjQBdfMR8Z0tRxKUsvFJEeWQ==}+ '@vitest/[email protected]':+ resolution: {integrity: sha512-7HWwdxXP5yDoe7DTpbif9l6ZmDwCzcSIK38kTSIt6CFEpMjX4EpCgT6wUmS0xTXqMI6E/ONmfgRKmaujpabjZQ==}+'@vitest/[email protected]':resolution: {integrity: sha512-P4xgwPjwesuBiHisAVz/LSSZtDjOTPYZVmNAnpHHSR6ONrf8eCJOFRvUwdHn30F5M1fxhqtl7QZQUk2dprIXAg==}+ '@vitest/[email protected]':+ resolution: {integrity: sha512-qpv3fSEuNrhAO3FpH6YYRdaECnnRjg9VxbhdtPwPRnzSfHVXnNzzrpX4cJxqiwgRMo7uRMWDFBlsBq4Cr+rO3A==}+'@vitest/[email protected]':resolution: {integrity: sha512-+Hx43f8Chus+DCmygqqfetcAZrDJwvTj0ymqjQq4CvmpKFSTVteEOBzCusu1x2tt4OJcvBflyHUE0DZSLgEMtQ==}'@vitest/[email protected]':resolution: {integrity: sha512-xAcW+S099ylC9VLU7eZfdT9myV67Nor9w9zhf0mGCYJSO+zM2839tOeROTdikOi/8Qeusffvxb/MyBSOja1Uig==}+ '@vitest/[email protected]':+ resolution: {integrity: sha512-vu6vi6ew5N5MMHJjD5PoakMRKYdmIrNJmyfkhRpQt5d9Ewhw9nZ5Aqynbi3N61bvk9UvZ5UysMT6ayIrZ8GA9w==}+'@vitest/[email protected]':resolution: {integrity: sha512-leUTap6B/cqi/bQkXUu6bQV5TZPx7pmMBKBQiI0rJA8c3pB56ZsaTbREnF7CJfmvAS4V2cXIBAh/3rVwrrCYgw==}'@vitest/[email protected]':resolution: {integrity: sha512-d3Waie/299qqRyHTm2DjADeTaNdNSVsnwHPWrs20JMpjh6eiVq7ggggweO8rc4arhf6rRkWuHKwvxGvejUXZZQ==}+ '@vitest/[email protected]':+ resolution: {integrity: sha512-BDU0GNL8MWkRkSRdNFvCUCAVOeHaUlVJ9Tx0TYBZyXaaOTmGtUFObzchCivIBrIwKzvZA7A9sCejVhXM2aY98A==}+'@vitest/[email protected]':resolution: {integrity: sha512-21cPiuGMoMZwiOHa2i4LXkMkMkCGzA+MVFV70jRwHo95dL4x/ts5GZhML1QWuy7yfp3WzK3lRvZi3JnXTYqrBw==}@@ -4631,26 +4778,26 @@ packages:'@volar/[email protected]':resolution: {integrity: sha512-iU+t2mas/4lYierSnoFOeRFQUhAEMgsFuQxoxvwn5EdQopw43j+J27a4lt9LMInx1gLJBC6qL14WYGlgymaSMQ==}- '@vue/[email protected]':- resolution: {integrity: sha512-MjXawxZf2SbZszLPYxaFCjxfibYrzr3eYbKxwpLR9EQN+oaziSu3qKVbwBERj1IFIB8OLUewxB5m/BFzi613og==}+ '@vue/[email protected]':+ resolution: {integrity: sha512-vbW/tgbwJYj62N/Ww99x0zhFTkZDTcGh3uwJEuadZ/nF9/xuFMC4693P9r+3sxGXISABpDKvffY5ApH9pmdd1A==}'@vue/[email protected]':resolution: {integrity: sha512-E+RyqY24KnyDXsCuQrI+mlcdW3ALND6U7Gqa/+bVwbcpcR3BRRIckFoz7Qyd4TTlnugtwuI7YgjbvsLmxb+yvg==}- '@vue/[email protected]':- resolution: {integrity: sha512-IZC6FKowtT1sl0CR5DpXSiEB5ayw75oT2bma1BEhV7RRR1+cfwLrxc2Z8Zq/RGFzJ8w5r9QtCOvTjQgdn0IKmA==}+ '@vue/[email protected]':+ resolution: {integrity: sha512-4XgABML/4cNndVsQndG6BbGN7+EoisDwi3oXNovqL/4jdNhwvP8/rfRMTb6FxkxIxUUtg6AI1/qZvwfSjxJiWA==}'@vue/[email protected]':resolution: {integrity: sha512-kUTvochG/oVgE1w5ViSr3KUBh9X7CWirebA3bezTbB5ZKBQZwR2Mwj9uoSKRMFcz4gSMzzLXBPD6KpCLb9nvWw==}- '@vue/[email protected]':- resolution: {integrity: sha512-me7epoTxYlY+2CUM7hy9PCDdpMPfIwrOvAXud2Upk10g4YLv9UBW7kL798TvMeDhPthkZ0CONNrK2GoeI1ODiQ==}+ '@vue/[email protected]':+ resolution: {integrity: sha512-nRAlJUK02FTWfA2nuvNBAqsDZuERGFgxZ8sGH62XgFSvMxO2URblzulExsmj4gFZ8e+VAyDooU9oAoXfEDNxTA==}'@vue/[email protected]':resolution: {integrity: sha512-nDwntUEADssW8e0rrmE0+OrONwmRlegDA1pD6QhVeXxjIytV03yDqTey9SBDiALsvAd5U4ZrEKbMyVXhX6mCGA==}- '@vue/[email protected]':- resolution: {integrity: sha512-M5+9nI2lPpAsgXOGQobnIueVqc9sisBFexh5yMIMRAPYLa7+5wEJs8iqOZc1WAa9WQbx9GR2twgznU8LTIiZ4Q==}+ '@vue/[email protected]':+ resolution: {integrity: sha512-ZsAtr4fhaUFnVcDqwW3bYCSDwq+9Gk69q2r/7dAHDrOMw41kylaMgOP4zRnn6GIEJkQznKgrMOGPMFnLB52RbQ==}'@vue/[email protected]':resolution: {integrity: sha512-CVRzSJIltzMG5FcidsW0jKNQnNRYC8bT21VegyMMtHmhW3UOI7knmUehzswXLrExDLE6lQCZdrhD4ogI7c+vuw==}@@ -4663,36 +4810,36 @@ packages:typescript:optional: true- '@vue/[email protected]':- resolution: {integrity: sha512-UhenImdc0L0/4ahGCyEzc/pZNwVgcglGy9HVzJ1Bq2Mm9qXOpP8RyNTjookw/gOCUlXSEtuZ2fUg5nrHcoqJcw==}+ '@vue/[email protected]':+ resolution: {integrity: sha512-nup3fSYg4i4LtNvu9slF/HF/0dkMQYfepUdORBcMSsankzRPzE7ypAFurpwyRBfU1i7Dn1kcwpYsE1wETSh91g==}'@vue/[email protected]':resolution: {integrity: sha512-kK0g4NknW6JX2yySLpsm2jlunZJl2/RJGZ0H9ddHdfBVHcNzxmQ0sS0b09ipmBoQpY8JM2KmUw+a6sO8Zo+zIA==}- '@vue/[email protected]':- resolution: {integrity: sha512-pQthsuYzE1XcGZznTKn73G0s14eCJcjaLvp3/DKeYWoFacD9glJoqlNBxt3W2c5S40t6CCcpPf+jG01N3ULyrA==}+ '@vue/[email protected]':+ resolution: {integrity: sha512-c7iMfj6cJMeAG3s5yOn9Rc5D9e2/wIuaozmGf/ICGCY3KV5H7mbTVdvEkd4ZshTq7RUZqj2k7LMJWVx+EBiY1g==}'@vue/[email protected]':resolution: {integrity: sha512-7aYA9GEbOOdviqVvcuweTLe5Za4qBZkUY7SvET6vE8kyypxVgaT1ixHLg4urtOlrApdgcdgHoTZCUuTGap/5WA==}- '@vue/[email protected]':- resolution: {integrity: sha512-gvf+C9cFpevsQxbkRBS1NpU8CqxKw0ebqMvLwcGQrNpx6gqRDodqKqA+A2VZZpQ9RpK2f9yfg8VbW/EpdFUOJw==}+ '@vue/[email protected]':+ resolution: {integrity: sha512-uXKzuh/Emfad2Y7Qm0ABsLZZV6H3mAJ5ZVqmAOlrNQRf+T5mxpPGZBfec1hkP41t6h6FwF6RSGCs/gd8WbuySQ==}'@vue/[email protected]':resolution: {integrity: sha512-ScOmP70/3NPM+TW9hvVAz6VWWtZJqkbdf7w6ySsws+EsqtHvkhxaWLecrTorFxsawelM5Ys9FnDEMt6BPBDS0Q==}- '@vue/[email protected]':- resolution: {integrity: sha512-aV1gXyKSN6Rz+6kZ6kr5+Ll14YzmIbeuWe7ryJl5muJ4uwSwY/aStXTixx76TwkZFJLm1aAlA/HSWEJ4EyiMkg==}+ '@vue/[email protected]':+ resolution: {integrity: sha512-H+DLK4sQF6sRgzKyofmlEVBIV/9KrQU6HIV7nt6yIwSGGKvSwlV8pqJlebUKLpbXaNHugdSfAbP6YmXF69lxow==}peerDependencies:- vue: 3.4.21+ vue: 3.4.24'@vue/[email protected]':resolution: {integrity: sha512-dlAMEuvmeA3rJsOMJ2J1kXU7o7pOxgsNHVr9K8hB3ImIkSuBrIdy0vF66h8gf8Tuinf1TK3mPAz2+2sqyf3KzA==}peerDependencies:vue: 3.4.27- '@vue/[email protected]':- resolution: {integrity: sha512-PuJe7vDIi6VYSinuEbUIQgMIRZGgM8e4R+G+/dQTk0X1NEdvgvvgv7m+rfmDH1gZzyA1OjjoWskvHlfRNfQf3g==}+ '@vue/[email protected]':+ resolution: {integrity: sha512-BW4tajrJBM9AGAknnyEw5tO2xTmnqgup0VTnDAMcxYmqOX0RG0b9aSUGAbEKolD91tdwpA6oCwbltoJoNzpItw==}'@vue/[email protected]':resolution: {integrity: sha512-DL3NmY2OFlqmYYrzp39yi3LDkKxa5vZVwxWdQ3rG0ekuWscHraeIbnI8t+aZK7qhYqEqWKTUdijadunb9pnrgA==}@@ -4872,6 +5019,11 @@ packages:resolution: {integrity: sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==}engines: {node: '>=12'}+ ansi-regex@https://r2.cnpmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz:+ resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==, tarball: https://r2.cnpmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz}+ version: 5.0.1+ engines: {node: '>=8'}+resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==}engines: {node: '>=4'}@@ -4888,6 +5040,11 @@ packages:resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==}engines: {node: '>=12'}+ ansi-styles@https://r2.cnpmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz:+ resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==, tarball: https://r2.cnpmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz}+ version: 4.3.0+ engines: {node: '>=8'}+resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==}engines: {node: '>= 8'}@@ -4911,6 +5068,10 @@ packages:resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==}+ argparse@https://r2.cnpmjs.org/argparse/-/argparse-2.0.1.tgz:+ resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==, tarball: https://r2.cnpmjs.org/argparse/-/argparse-2.0.1.tgz}+ version: 2.0.1+resolution: {integrity: sha512-y+CcFFwelSXpLZk/7fMB2mUbGtX9lKycf1MWJ7CaTIERyitVlyQx6C+sxcROU2BAJ24OiZyK+8wj2i8AlBoS3A==}engines: {node: '>=10'}@@ -5143,6 +5304,11 @@ packages:resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==}engines: {node: '>=6'}+ callsites@https://r2.cnpmjs.org/callsites/-/callsites-3.1.0.tgz:+ resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==, tarball: https://r2.cnpmjs.org/callsites/-/callsites-3.1.0.tgz}+ version: 3.1.0+ engines: {node: '>=6'}+resolution: {integrity: sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw==}@@ -5185,6 +5351,11 @@ packages:resolution: {integrity: sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==}engines: {node: ^12.17.0 || ^14.13 || >=16.0.0}+ chalk@https://r2.cnpmjs.org/chalk/-/chalk-4.1.2.tgz:+ resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==, tarball: https://r2.cnpmjs.org/chalk/-/chalk-4.1.2.tgz}+ version: 4.1.2+ engines: {node: '>=10'}+resolution: {integrity: sha512-TfxnA/DcZXRTA4OekA2zL9GH8qscbbl6X0ZqU4tXhGveVY/mXWvEQLt5GwZcYXTEyEFflVtj+pG8nc8EwSm1RQ==}@@ -5221,8 +5392,8 @@ packages:resolution: {integrity: sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==}engines: {node: '>=10'}- resolution: {integrity: sha512-XZMa/9HJpTZLnBh5yGolbiRVagtSr3gK815rFicSuQpXr82ppOsqstrOoeu0IBpgtt/F6YvN3/JqHe6k00nXGA==}+ resolution: {integrity: sha512-M3xCyoEIjdcsXX3NhN60joXxEthy+wxNEcsCMM0u9u8Yna7tJvwvOsJStbOJDwEBo6TdIKckARN3BbArpduFbA==}hasBin: truepeerDependencies:'@chromatic-com/cypress': ^0.*.* || ^1.0.0@@ -5335,12 +5506,21 @@ packages:resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==}engines: {node: '>=7.0.0'}+ color-convert@https://r2.cnpmjs.org/color-convert/-/color-convert-2.0.1.tgz:+ resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==, tarball: https://r2.cnpmjs.org/color-convert/-/color-convert-2.0.1.tgz}+ version: 2.0.1+ engines: {node: '>=7.0.0'}+resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==}resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==}+ color-name@https://r2.cnpmjs.org/color-name/-/color-name-1.1.4.tgz:+ resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==, tarball: https://r2.cnpmjs.org/color-name/-/color-name-1.1.4.tgz}+ version: 1.1.4+resolution: {integrity: sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==}@@ -5512,6 +5692,9 @@ packages:resolution: {integrity: sha512-1j20GZTsvKNkc4BY3NpMOM8tt///wY3FpIzozTOFO2ffuZcV61nojHXVKIy3WM+7ADCy5FVhdZYHYDdgTU0yJw==}+ resolution: {integrity: sha512-Dk997v9ZCt3X/npqzyGdTlq6t7lDBhZwGvV94PKzDArjp7BTRm7WlDAXYd/OWdeFHO8OChQYRJNJvUCqCbrtKA==}+resolution: {integrity: sha512-9TNiImhKvQqSUkOvk/mMRZzOANTiEVC7WaBNhHcKM7x+/5E1l5NvsysR19zuDQScE8k+kfQXWRN3AtS/eOSHpg==}@@ -5619,6 +5802,9 @@ packages:resolution: {integrity: sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==}engines: {node: '>= 0.4'}+ resolution: {integrity: sha512-vjAczensTgRcqDERK0SR2XMwsF/tSvnvlv6VcF2GIhg6Sx4yOIt/irsr1RDJsKiIyBzJDpCoXiWWq28MqH2cnQ==}+resolution: {integrity: sha512-okzr3f11N6WuqYtZSvm+F776mB41wRZMhKP+hc34YdW+KmtYYK9iqvHSwo2k9FEH3fhGXvOPV6yz2IcSrfRUDg==}@@ -5869,6 +6055,10 @@ packages:resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==}+ emoji-regex@https://r2.cnpmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz:+ resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==, tarball: https://r2.cnpmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz}+ version: 8.0.0+resolution: {integrity: sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==}engines: {node: '>= 0.8'}@@ -5893,8 +6083,9 @@ packages:resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==}engines: {node: '>=0.12'}- resolution: {integrity: sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==}+ env-paths@https://r2.cnpmjs.org/env-paths/-/env-paths-2.2.1.tgz:+ resolution: {integrity: sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==, tarball: https://r2.cnpmjs.org/env-paths/-/env-paths-2.2.1.tgz}+ version: 2.2.1engines: {node: '>=6'}@@ -5909,6 +6100,10 @@ packages:resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==}+ error-ex@https://r2.cnpmjs.org/error-ex/-/error-ex-1.3.2.tgz:+ resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==, tarball: https://r2.cnpmjs.org/error-ex/-/error-ex-1.3.2.tgz}+ version: 1.3.2+resolution: {integrity: sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A==}engines: {node: '>= 0.4'}@@ -6444,6 +6639,10 @@ packages:resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==}+ estree-walker@https://r2.cnpmjs.org/estree-walker/-/estree-walker-2.0.2.tgz:+ resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==, tarball: https://r2.cnpmjs.org/estree-walker/-/estree-walker-2.0.2.tgz}+ version: 2.0.2+resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==}engines: {node: '>=0.10.0'}@@ -6668,8 +6867,9 @@ packages:resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==}engines: {node: '>=6.9.0'}- resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==}+ get-caller-file@https://r2.cnpmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz:+ resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==, tarball: https://r2.cnpmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz}+ version: 2.0.5engines: {node: 6.* || 8.* || >= 10.*}@@ -6832,6 +7032,11 @@ packages:resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==}engines: {node: '>=8'}+ has-flag@https://r2.cnpmjs.org/has-flag/-/has-flag-4.0.0.tgz:+ resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==, tarball: https://r2.cnpmjs.org/has-flag/-/has-flag-4.0.0.tgz}+ version: 4.0.0+ engines: {node: '>=8'}+resolution: {integrity: sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==}@@ -6979,6 +7184,11 @@ packages:resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==}engines: {node: '>=6'}+ import-fresh@https://r2.cnpmjs.org/import-fresh/-/import-fresh-3.3.0.tgz:+ resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==, tarball: https://r2.cnpmjs.org/import-fresh/-/import-fresh-3.3.0.tgz}+ version: 3.3.0+ engines: {node: '>=6'}+resolution: {integrity: sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw==}engines: {node: '>=8'}@@ -7000,6 +7210,10 @@ packages:resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==}+ inherits@https://r2.cnpmjs.org/inherits/-/inherits-2.0.4.tgz:+ resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==, tarball: https://r2.cnpmjs.org/inherits/-/inherits-2.0.4.tgz}+ version: 2.0.4+resolution: {integrity: sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==}@@ -7054,6 +7268,11 @@ packages:resolution: {integrity: sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==}engines: {node: '>= 0.4'}+ is-arguments@https://r2.cnpmjs.org/is-arguments/-/is-arguments-1.1.1.tgz:+ resolution: {integrity: sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==, tarball: https://r2.cnpmjs.org/is-arguments/-/is-arguments-1.1.1.tgz}+ version: 1.1.1+ engines: {node: '>= 0.4'}+resolution: {integrity: sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==}engines: {node: '>= 0.4'}@@ -7064,6 +7283,10 @@ packages:resolution: {integrity: sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==}+ is-arrayish@https://r2.cnpmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz:+ resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==, tarball: https://r2.cnpmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz}+ version: 0.2.1+resolution: {integrity: sha512-Y1JXKrfykRJGdlDwdKlLpLyMIiWqWvuSd17TvZk68PLAOGOoF4Xyav1z0Xhoi+gCYjZVeC5SI+hYFOfvXmGRCA==}engines: {node: '>= 0.4'}@@ -7140,10 +7363,20 @@ packages:resolution: {integrity: sha512-OVa3u9kkBbw7b8Xw5F9P+D/T9X+Z4+JruYVNapTjPYZYUznQ5YfWeFkOj606XYYW8yugTfC8Pj0hYqvi4ryAhA==}engines: {node: '>=18'}+ is-fullwidth-code-point@https://r2.cnpmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz:+ resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==, tarball: https://r2.cnpmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz}+ version: 3.0.0+ engines: {node: '>=8'}+resolution: {integrity: sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==}engines: {node: '>= 0.4'}+ is-generator-function@https://r2.cnpmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz:+ resolution: {integrity: sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==, tarball: https://r2.cnpmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz}+ version: 1.0.10+ engines: {node: '>= 0.4'}+resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==}engines: {node: '>=0.10.0'}@@ -7255,6 +7488,11 @@ packages:resolution: {integrity: sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==}engines: {node: '>= 0.4'}+ is-string@https://r2.cnpmjs.org/is-string/-/is-string-1.0.7.tgz:+ resolution: {integrity: sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==, tarball: https://r2.cnpmjs.org/is-string/-/is-string-1.0.7.tgz}+ version: 1.0.7+ engines: {node: '>= 0.4'}+resolution: {integrity: sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==}engines: {node: '>= 0.4'}@@ -7310,6 +7548,10 @@ packages:resolution: {integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==}+ isarray@https://r2.cnpmjs.org/isarray/-/isarray-2.0.5.tgz:+ resolution: {integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==, tarball: https://r2.cnpmjs.org/isarray/-/isarray-2.0.5.tgz}+ version: 2.0.5+resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==}@@ -7392,6 +7634,11 @@ packages:resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==}hasBin: true+ js-yaml@https://r2.cnpmjs.org/js-yaml/-/js-yaml-4.1.0.tgz:+ resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==, tarball: https://r2.cnpmjs.org/js-yaml/-/js-yaml-4.1.0.tgz}+ version: 4.1.0+ hasBin: true+resolution: {integrity: sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==}@@ -7441,6 +7688,10 @@ packages:resolution: {integrity: sha512-aatBvbL26wVUCLmbWdCpeu9iF5wOyWpagiKkInA+kfws3sWdBrTnsvN2CKcyCYyUrc7rebNBlK6+kteg7ksecg==}engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0}+ json-parse-even-better-errors@https://r2.cnpmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz:+ resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==, tarball: https://r2.cnpmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz}+ version: 2.3.1+resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==}@@ -7548,6 +7799,10 @@ packages:resolution: {integrity: sha512-wM1+Z03eypVAVUCE7QdSqpVIvelbOakn1M0bPDoA4SGWPx3sNDVUiMo3L6To6WWGClB7VyXnhQ4Sn7gxiJbE6A==}engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}+ lines-and-columns@https://r2.cnpmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz:+ resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==, tarball: https://r2.cnpmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz}+ version: 1.2.4+resolution: {integrity: sha512-3F9KRQIS2fVDGtCkBp4Bx0jswjX7zUcKx6OF0ZeY1prksUyKPRIIUqZhIUYAstJfvj6i48VFs4dwVIbCYwvTYQ==}engines: {node: '>=18.12.0'}@@ -7591,6 +7846,10 @@ packages:resolution: {integrity: sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==}+ lodash.camelcase@https://r2.cnpmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz:+ resolution: {integrity: sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==, tarball: https://r2.cnpmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz}+ version: 4.3.0+resolution: {integrity: sha512-kZzYOKspf8XVX5AvmQF94gQW0lejFVgb80G85bU4ZWzoJ6C03PQg3coYAUpSTpQWelrZELd3XWgHzw4Ck5kaIw==}@@ -7613,35 +7872,49 @@ packages:resolution: {integrity: sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==}+ lodash.isplainobject@https://r2.cnpmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz:+ resolution: {integrity: sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==, tarball: https://r2.cnpmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz}+ version: 4.0.6+resolution: {integrity: sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==}- resolution: {integrity: sha512-N8XRTIMMqqDgSy4VLKPnJ/+hpGZN+PHQiJnSenYqPaVV/NCqEogTnAdZLQiGKhxX+JCs8waWq2t1XHWKOmlY8g==}+ lodash.kebabcase@https://r2.cnpmjs.org/lodash.kebabcase/-/lodash.kebabcase-4.1.1.tgz:+ resolution: {integrity: sha512-N8XRTIMMqqDgSy4VLKPnJ/+hpGZN+PHQiJnSenYqPaVV/NCqEogTnAdZLQiGKhxX+JCs8waWq2t1XHWKOmlY8g==, tarball: https://r2.cnpmjs.org/lodash.kebabcase/-/lodash.kebabcase-4.1.1.tgz}+ version: 4.1.1resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==}- resolution: {integrity: sha512-GK3g5RPZWTRSeLSpgP8Xhra+pnjBC56q9FZYe1d5RN3TJ35dbkGy3YqBSMbyCrlbi+CM9Z3Jk5yTL7RCsqboyQ==}+ lodash.merge@https://r2.cnpmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz:+ resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==, tarball: https://r2.cnpmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz}+ version: 4.6.2++ lodash.mergewith@https://r2.cnpmjs.org/lodash.mergewith/-/lodash.mergewith-4.6.2.tgz:+ resolution: {integrity: sha512-GK3g5RPZWTRSeLSpgP8Xhra+pnjBC56q9FZYe1d5RN3TJ35dbkGy3YqBSMbyCrlbi+CM9Z3Jk5yTL7RCsqboyQ==, tarball: https://r2.cnpmjs.org/lodash.mergewith/-/lodash.mergewith-4.6.2.tgz}+ version: 4.6.2resolution: {integrity: sha512-4hNPN5jlm/N/HLMCO43v8BXKq9Z7QdAGc/VGrRD61w8gN9g/6jF9A4L1pbUgBLCffi0w9VsXfTOij5x8iTyFvg==}- resolution: {integrity: sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw==}+ lodash.snakecase@https://r2.cnpmjs.org/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz:+ resolution: {integrity: sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw==, tarball: https://r2.cnpmjs.org/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz}+ version: 4.1.1- resolution: {integrity: sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg==}+ lodash.startcase@https://r2.cnpmjs.org/lodash.startcase/-/lodash.startcase-4.4.0.tgz:+ resolution: {integrity: sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg==, tarball: https://r2.cnpmjs.org/lodash.startcase/-/lodash.startcase-4.4.0.tgz}+ version: 4.4.0- resolution: {integrity: sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ==}+ lodash.uniq@https://r2.cnpmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz:+ resolution: {integrity: sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ==, tarball: https://r2.cnpmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz}+ version: 4.5.0resolution: {integrity: sha512-e/zcLx6CSbmaEgFHCA7BnoQKyCtKMxnuWrJygbwPs/AIn+IMKl66L8/s+wBUn5LRw2pZx3bUHibiV1b6aTWIww==}- resolution: {integrity: sha512-sReKOYJIJf74dhJONhU4e0/shzi1trVbSWDOhKYE5XV2O+H7Sb2Dihwuc7xWxVl+DgFPyTqIN3zMfT9cq5iWDg==}+ lodash.upperfirst@https://r2.cnpmjs.org/lodash.upperfirst/-/lodash.upperfirst-4.3.1.tgz:+ resolution: {integrity: sha512-sReKOYJIJf74dhJONhU4e0/shzi1trVbSWDOhKYE5XV2O+H7Sb2Dihwuc7xWxVl+DgFPyTqIN3zMfT9cq5iWDg==, tarball: https://r2.cnpmjs.org/lodash.upperfirst/-/lodash.upperfirst-4.3.1.tgz}+ version: 4.3.1resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==}@@ -7706,10 +7979,6 @@ packages:resolution: {integrity: sha512-iIRwTIf0QKV3UAnYK4PU8uiEc4SRh5jX0mwpIwETPpHdhVM4f53RSwS/vXvN1JhGX+Cs7B8qIq3d6AH49O5fAQ==}- resolution: {integrity: sha512-ISQTe55T2ao7XtlAStud6qwYPZjE4GK1S/BeVPus4jrq6JuOnQ00YKQC581RWhR122W7msZV263KzVeLoqidyQ==}- engines: {node: '>=12'}-resolution: {integrity: sha512-ZbrP1Qxnpoes8sz47AM0z08U+jW6TyRgZzcWy3Ma3vDhJttwMwAFDMMQFobwdBxByBD46JYmxRzeF7w2+wJEuw==}@@ -8196,6 +8465,11 @@ packages:resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==}engines: {node: '>=6'}+ parent-module@https://r2.cnpmjs.org/parent-module/-/parent-module-1.0.1.tgz:+ resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==, tarball: https://r2.cnpmjs.org/parent-module/-/parent-module-1.0.1.tgz}+ version: 1.0.1+ engines: {node: '>=6'}+resolution: {integrity: sha512-kkywGpCcRYhqQIchaWqZ875wzpS/bMKhz5HnN3p7wveJTkTtyAB/AlnS0f8DFSqYW1T82t6yEAkEcB+A1I3MbQ==}@@ -8211,6 +8485,11 @@ packages:resolution: {integrity: sha512-SgOTCX/EZXtZxBE5eJ97P4yGM5n37BwRU+YMsH4vNzFqJV/oWFXXCmwFlgWUM4PrakybVOueJJ6pwHqSVhTFDw==}engines: {node: '>=16'}+ parse-json@https://r2.cnpmjs.org/parse-json/-/parse-json-5.2.0.tgz:+ resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==, tarball: https://r2.cnpmjs.org/parse-json/-/parse-json-5.2.0.tgz}+ version: 5.2.0+ engines: {node: '>=8'}+resolution: {integrity: sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA==}engines: {node: '>= 0.10'}@@ -8246,6 +8525,11 @@ packages:resolution: {integrity: sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==}engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}+ path-exists@https://r2.cnpmjs.org/path-exists/-/path-exists-5.0.0.tgz:+ resolution: {integrity: sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==, tarball: https://r2.cnpmjs.org/path-exists/-/path-exists-5.0.0.tgz}+ version: 5.0.0+ engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}+resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==}engines: {node: '>=0.10.0'}@@ -8415,8 +8699,9 @@ packages:resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==}engines: {node: '>= 0.8.0'}- resolution: {integrity: sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==}+ prettier-linter-helpers@https://r2.cnpmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz:+ resolution: {integrity: sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==, tarball: https://r2.cnpmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz}+ version: 1.0.0engines: {node: '>=6.0.0'}@@ -8748,15 +9033,16 @@ packages:resolution: {integrity: sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==}- resolution: {integrity: sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==}-resolution: {integrity: sha512-Fl7FuabXsJnV5Q1qIOQwx/sagGF18kogb4gpfcG4gjLBWO0WDiiz1ko/ExayuxE7InyQkBLkxRFG5oxY6Uu3Kg==}resolution: {integrity: sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==}+ react-is@https://r2.cnpmjs.org/react-is/-/react-is-17.0.2.tgz:+ resolution: {integrity: sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==, tarball: https://r2.cnpmjs.org/react-is/-/react-is-17.0.2.tgz}+ version: 17.0.2+resolution: {integrity: sha512-JHiQlgF1oSZR7VYPjq32wy97z1w1oE4x10EuhKjPr4WUKhVzG1uFQhQjKqjQkbVqJrmahf+ldgBTv36NrkpKpA==}peerDependencies:@@ -8947,8 +9233,9 @@ packages:resolution: {integrity: sha512-q/7VIQA8lmM1hF+jn+sFSPWGlMkSAeNYcPLmDQx2zzuiDfaLrOmumR8iaUKlenFgh0XRPIUeSPlH3A+AW3Z5pg==}- resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==}+ require-directory@https://r2.cnpmjs.org/require-directory/-/require-directory-2.1.1.tgz:+ resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==, tarball: https://r2.cnpmjs.org/require-directory/-/require-directory-2.1.1.tgz}+ version: 2.1.1engines: {node: '>=0.10.0'}@@ -8980,6 +9267,16 @@ packages:resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==}engines: {node: '>=8'}+ resolve-from@https://r2.cnpmjs.org/resolve-from/-/resolve-from-4.0.0.tgz:+ resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==, tarball: https://r2.cnpmjs.org/resolve-from/-/resolve-from-4.0.0.tgz}+ version: 4.0.0+ engines: {node: '>=4'}++ resolve-from@https://r2.cnpmjs.org/resolve-from/-/resolve-from-5.0.0.tgz:+ resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==, tarball: https://r2.cnpmjs.org/resolve-from/-/resolve-from-5.0.0.tgz}+ version: 5.0.0+ engines: {node: '>=8'}+resolution: {integrity: sha512-2oC2EjWbMJwvSN6Z7DbDfJMnD8MYEouaLn5eIX0j8XwPsYCVIyY9bbnX88YHVkbr8XHqvZrYbxaLPibfTYKZMA==}engines: {node: 10.* || >= 12}@@ -9029,8 +9326,8 @@ packages:resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==}hasBin: true- resolution: {integrity: sha512-MIlLgsdMprDBXC+4hsPgzWUasLO9CE4zOkj/u6j+Z6j5A4zRY+CtiXAdJyPtgCsc42g658Aeh1DlrdVEJhsL2g==}+ resolution: {integrity: sha512-kuaTJSUbz+Wsb2ATGvEknkI12XV40vIiHmLuFlejoo7HtDok/O5eDDD0UpCVY5bBX5U5RYo8wWP83H7ZsqVEnA==}engines: {node: '>=18.0.0', npm: '>=8.0.0'}hasBin: true@@ -9329,6 +9626,11 @@ packages:resolution: {integrity: sha512-SEIJCWiX7Kg4c129n48aDRwLbFb2LJmXXFrWBG4NGaRtMQ3myKPKbwrD1BKqQn74oCoNMBVrfDEr5M9YxCsrkw==}engines: {node: '>=18'}+ string-width@https://r2.cnpmjs.org/string-width/-/string-width-4.2.3.tgz:+ resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==, tarball: https://r2.cnpmjs.org/string-width/-/string-width-4.2.3.tgz}+ version: 4.2.3+ engines: {node: '>=8'}+resolution: {integrity: sha512-2cBVCj6I4IOvEnjgO/hWqXjqBGsY+zwPmHl12Srk9IXSZ56Jwwmy+66XO5Iut/oQVR7t5ihYdLB0GMa4alEUcg==}@@ -9364,6 +9666,11 @@ packages:resolution: {integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==}engines: {node: '>=12'}+ strip-ansi@https://r2.cnpmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz:+ resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==, tarball: https://r2.cnpmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz}+ version: 6.0.1+ engines: {node: '>=8'}+resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==}engines: {node: '>=4'}@@ -9418,6 +9725,11 @@ packages:resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==}engines: {node: '>=10'}+ supports-color@https://r2.cnpmjs.org/supports-color/-/supports-color-7.2.0.tgz:+ resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==, tarball: https://r2.cnpmjs.org/supports-color/-/supports-color-7.2.0.tgz}+ version: 7.2.0+ engines: {node: '>=8'}+resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==}engines: {node: '>= 0.4'}@@ -9519,11 +9831,11 @@ packages:resolution: {integrity: sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg==}- resolution: {integrity: sha512-N8hW3PG/3aOoZAN5V/NSAEDz0ZixDSSt5b/a05iqtpgfLWMSVuCo7w0k2vVvEjdrIoeGqZzweX2WlyioNIHchA==}+ resolution: {integrity: sha512-1/eK7zUnIklz4JUUlL+658n58XO2hHLQfSk1Zf2LKieUjxidN16eKFEoDEfjHc3ohofSSqK3X5yO6VGb6iW8Lw==}- resolution: {integrity: sha512-Ud7uepAklqRH1bvwy22ynrliC7Dljz7Tm8M/0RBUW+YRa4YHhZ6e4PpgE+fu1zr/WqB1kbeuVrdfeuyIBpy4tw==}+ resolution: {integrity: sha512-i11VH5gS6IFeLY3gMBQ00/MmLncVP7JLXOw1vlgkytLmJK7QnEr7NXf0LBdxfmNPAeyetukOk0bOYrJrFGjYJQ==}engines: {node: '>=14.0.0'}@@ -9891,6 +10203,11 @@ packages:resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==}engines: {node: '>= 0.8'}+ resolution: {integrity: sha512-tV8h6gMj6vPzVCa7l+VGq9lwoJjW8Y79vst8QZZGiuRAfijU+EEWuc0kFpmndQrWhMMhet1jdSF+40KSZUqIIw==}+ engines: {node: ^18.0.0 || >=20.0.0}+ hasBin: true+resolution: {integrity: sha512-de6HJgzC+TFzOu0NTC4RAIsyf/DY/ibWDYQUcuEA84EMHhcefTUGkjFHKKEJhQN4A+6I0u++kr3l36ZF2d7XRw==}engines: {node: ^18.0.0 || >=20.0.0}@@ -9906,6 +10223,34 @@ packages:vite:optional: true+ resolution: {integrity: sha512-PAzgUZbP7msvQvqdSD+ErD5qGnSFiGOoWmV5yAKUEI0kdhjbH6nMWVyZQC/hSc4aXwc0oJ9aEdIiF9Oje0JFCw==}+ engines: {node: ^18.0.0 || >=20.0.0}+ hasBin: true+ peerDependencies:+ '@types/node': ^18.0.0 || >=20.0.0+ less: '*'+ lightningcss: ^1.21.0+ sass: '*'+ stylus: '*'+ sugarss: '*'+ terser: ^5.4.0+ peerDependenciesMeta:+ '@types/node':+ optional: true+ less:+ optional: true+ lightningcss:+ optional: true+ sass:+ optional: true+ stylus:+ optional: true+ sugarss:+ optional: true+ terser:+ optional: true+resolution: {integrity: sha512-HndV31LWW05i1BLPMUCE1B9E9GFbOu1MbenhS58FuK6owSO5qHm7GiCotrNY1YE5rMeQSFBGmT5ZaLEjFizgiQ==}engines: {node: ^18.0.0 || >=20.0.0}@@ -9934,6 +10279,31 @@ packages:terser:optional: true+ resolution: {integrity: sha512-d8UKgR0m2kjdxDWX6911uwxout6GHS0XaGH1cksSIVVG8kRlE7G7aBw7myKQCvDI5dT4j7ZMa+l706BIORMDLw==}+ engines: {node: ^18.0.0 || >=20.0.0}+ hasBin: true+ peerDependencies:+ '@edge-runtime/vm': '*'+ '@types/node': ^18.0.0 || >=20.0.0+ '@vitest/browser': 1.5.0+ '@vitest/ui': 1.5.0+ happy-dom: '*'+ jsdom: '*'+ peerDependenciesMeta:+ '@edge-runtime/vm':+ optional: true+ '@types/node':+ optional: true+ '@vitest/browser':+ optional: true+ '@vitest/ui':+ optional: true+ happy-dom:+ optional: true+ jsdom:+ optional: true+resolution: {integrity: sha512-H5r/dN06swuFnzNFhq/dnz37bPXnq8xB2xB5JOVk8K09rUtoeNN+LHWkoQ0A/i3hvbUKKcCei9KpbxqHMLhLLA==}engines: {node: ^18.0.0 || >=20.0.0}@@ -9974,8 +10344,8 @@ packages:peerDependencies:typescript: '*'- resolution: {integrity: sha512-5hjyV/jLEIKD/jYl4cavMcnzKwjMKohureP8ejn3hhEjwhWIhWeuzL2kJAjzl/WyVsgPY56Sy4Z40C3lVshxXA==}+ resolution: {integrity: sha512-NPdx7dLGyHmKHGRRU5bMRYVE+rechR+KDU5R2tSTNG36PuMwbfAJ+amEvOAw7BPfZp5sQulNELSLm5YUkau+Sg==}peerDependencies:typescript: '*'peerDependenciesMeta:@@ -10126,6 +10496,11 @@ packages:resolution: {integrity: sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q==}engines: {node: '>=18'}+ wrap-ansi@https://r2.cnpmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz:+ resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==, tarball: https://r2.cnpmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz}+ version: 7.0.0+ engines: {node: '>=10'}+resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==}@@ -10166,8 +10541,9 @@ packages:resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==}engines: {node: '>=0.4'}- resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==}+ y18n@https://r2.cnpmjs.org/y18n/-/y18n-5.0.8.tgz:+ resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==, tarball: https://r2.cnpmjs.org/y18n/-/y18n-5.0.8.tgz}+ version: 5.0.8engines: {node: '>=10'}@@ -10514,12 +10890,16 @@ snapshots:'@babel/helper-validator-identifier': 7.22.20chalk: 2.4.2js-tokens: 4.0.0- picocolors: 1.0.0+ picocolors: https://r2.cnpmjs.org/picocolors/-/picocolors-1.0.0.tgz'@babel/[email protected]':dependencies:'@babel/types': 7.24.0+ '@babel/[email protected]':+ dependencies:+ '@babel/types': 7.24.0+'@babel/[email protected]':dependencies:'@babel/types': 7.24.5@@ -11055,7 +11435,7 @@ snapshots:babel-plugin-polyfill-corejs2: 0.4.10(@babel/[email protected])babel-plugin-polyfill-corejs3: 0.10.4(@babel/[email protected])babel-plugin-polyfill-regenerator: 0.6.1(@babel/[email protected])- core-js-compat: 3.37.1+ core-js-compat: 3.36.1semver: 6.3.1transitivePeerDependencies:- supports-color@@ -11154,7 +11534,7 @@ snapshots:'@chromatic-com/[email protected]([email protected])':dependencies:- chromatic: 11.3.3+ chromatic: 11.3.5filesize: 10.1.1jsonfile: 6.1.0react-confetti: 6.1.0([email protected])@@ -11204,11 +11584,11 @@ snapshots:'@commitlint/[email protected]':dependencies:'@commitlint/types': 19.0.3- lodash.camelcase: 4.3.0- lodash.kebabcase: 4.1.1- lodash.snakecase: 4.1.1- lodash.startcase: 4.4.0- lodash.upperfirst: 4.3.1+ lodash.camelcase: https://r2.cnpmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz+ lodash.kebabcase: https://r2.cnpmjs.org/lodash.kebabcase/-/lodash.kebabcase-4.1.1.tgz+ lodash.snakecase: https://r2.cnpmjs.org/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz+ lodash.startcase: https://r2.cnpmjs.org/lodash.startcase/-/lodash.startcase-4.4.0.tgz+ lodash.upperfirst: https://r2.cnpmjs.org/lodash.upperfirst/-/lodash.upperfirst-4.3.1.tgz'@commitlint/[email protected]': {}@@ -11238,9 +11618,9 @@ snapshots:chalk: 5.3.0cosmiconfig: 9.0.0([email protected])cosmiconfig-typescript-loader: 5.0.0(@types/[email protected])([email protected]([email protected]))([email protected])- lodash.isplainobject: 4.0.6- lodash.merge: 4.6.2- lodash.uniq: 4.5.0+ lodash.isplainobject: https://r2.cnpmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz+ lodash.merge: https://r2.cnpmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz+ lodash.uniq: https://r2.cnpmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgztransitivePeerDependencies:- '@types/node'- typescript@@ -11267,8 +11647,8 @@ snapshots:'@commitlint/types': 19.0.3global-directory: 4.0.1import-meta-resolve: 4.0.0- lodash.mergewith: 4.6.2- resolve-from: 5.0.0+ lodash.mergewith: https://r2.cnpmjs.org/lodash.mergewith/-/lodash.mergewith-4.6.2.tgz+ resolve-from: https://r2.cnpmjs.org/resolve-from/-/resolve-from-5.0.0.tgz'@commitlint/[email protected]':dependencies:@@ -11601,7 +11981,7 @@ snapshots:'@fal-works/[email protected]': {}- '@grpc/[email protected]':+ '@grpc/[email protected]':dependencies:'@grpc/proto-loader': 0.7.12'@js-sdsl/ordered-map': 4.4.2@@ -11957,19 +12337,19 @@ snapshots:optionalDependencies:'@types/react': 18.3.2- '@radix-ui/[email protected](@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])':+ '@radix-ui/[email protected](@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])':dependencies:'@babel/runtime': 7.24.1'@radix-ui/primitive': 1.0.1'@radix-ui/react-compose-refs': 1.0.1(@types/[email protected])([email protected])'@radix-ui/react-context': 1.0.1(@types/[email protected])([email protected])- '@radix-ui/react-dismissable-layer': 1.0.5(@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-dismissable-layer': 1.0.5(@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])'@radix-ui/react-focus-guards': 1.0.1(@types/[email protected])([email protected])- '@radix-ui/react-focus-scope': 1.0.4(@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-focus-scope': 1.0.4(@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])'@radix-ui/react-id': 1.0.1(@types/[email protected])([email protected])- '@radix-ui/react-portal': 1.0.4(@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])- '@radix-ui/react-presence': 1.0.1(@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])- '@radix-ui/react-primitive': 1.0.3(@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-portal': 1.0.4(@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-presence': 1.0.1(@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-primitive': 1.0.3(@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])'@radix-ui/react-slot': 1.0.2(@types/[email protected])([email protected])'@radix-ui/react-use-controllable-state': 1.0.1(@types/[email protected])([email protected])aria-hidden: 1.2.4@@ -11978,21 +12358,21 @@ snapshots:react-remove-scroll: 2.5.5(@types/[email protected])([email protected])optionalDependencies:'@types/react': 18.3.2- '@types/react-dom': 18.3.0+ '@types/react-dom': 18.2.25- '@radix-ui/[email protected](@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])':+ '@radix-ui/[email protected](@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])':dependencies:'@babel/runtime': 7.24.1'@radix-ui/primitive': 1.0.1'@radix-ui/react-compose-refs': 1.0.1(@types/[email protected])([email protected])- '@radix-ui/react-primitive': 1.0.3(@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-primitive': 1.0.3(@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])'@radix-ui/react-use-callback-ref': 1.0.1(@types/[email protected])([email protected])'@radix-ui/react-use-escape-keydown': 1.0.3(@types/[email protected])([email protected])react: 18.2.0react-dom: 18.2.0([email protected])optionalDependencies:'@types/react': 18.3.2- '@types/react-dom': 18.3.0+ '@types/react-dom': 18.2.25dependencies:@@ -12001,17 +12381,17 @@ snapshots:optionalDependencies:'@types/react': 18.3.2- '@radix-ui/[email protected](@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])':+ '@radix-ui/[email protected](@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])':dependencies:'@babel/runtime': 7.24.1'@radix-ui/react-compose-refs': 1.0.1(@types/[email protected])([email protected])- '@radix-ui/react-primitive': 1.0.3(@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-primitive': 1.0.3(@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])'@radix-ui/react-use-callback-ref': 1.0.1(@types/[email protected])([email protected])react: 18.2.0react-dom: 18.2.0([email protected])optionalDependencies:'@types/react': 18.3.2- '@types/react-dom': 18.3.0+ '@types/react-dom': 18.2.25dependencies:@@ -12021,17 +12401,17 @@ snapshots:optionalDependencies:'@types/react': 18.3.2- '@radix-ui/[email protected](@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])':+ '@radix-ui/[email protected](@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])':dependencies:'@babel/runtime': 7.24.1- '@radix-ui/react-primitive': 1.0.3(@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-primitive': 1.0.3(@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])react: 18.2.0react-dom: 18.2.0([email protected])optionalDependencies:'@types/react': 18.3.2- '@types/react-dom': 18.3.0+ '@types/react-dom': 18.2.25- '@radix-ui/[email protected](@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])':+ '@radix-ui/[email protected](@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])':dependencies:'@babel/runtime': 7.24.1'@radix-ui/react-compose-refs': 1.0.1(@types/[email protected])([email protected])@@ -12040,9 +12420,9 @@ snapshots:react-dom: 18.2.0([email protected])optionalDependencies:'@types/react': 18.3.2- '@types/react-dom': 18.3.0+ '@types/react-dom': 18.2.25- '@radix-ui/[email protected](@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])':+ '@radix-ui/[email protected](@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])':dependencies:'@babel/runtime': 7.24.1'@radix-ui/react-slot': 1.0.2(@types/[email protected])([email protected])@@ -12050,7 +12430,7 @@ snapshots:react-dom: 18.2.0([email protected])optionalDependencies:'@types/react': 18.3.2- '@types/react-dom': 18.3.0+ '@types/react-dom': 18.2.25dependencies:@@ -12169,57 +12549,60 @@ snapshots:release-it: 17.3.0([email protected])semver: 7.6.0- '@rollup/[email protected]([email protected])':+ '@rollup/[email protected]([email protected])':dependencies:'@types/estree': 1.0.5estree-walker: 2.0.2picomatch: 2.3.1optionalDependencies:- rollup: 4.13.2+ rollup: 4.16.4++ '@rollup/[email protected]':+ optional: true- '@rollup/[email protected]':+ '@rollup/[email protected]':optional: true- '@rollup/[email protected]':+ '@rollup/[email protected]':optional: true- '@rollup/[email protected]':+ '@rollup/[email protected]':optional: true- '@rollup/[email protected]':+ '@rollup/[email protected]':optional: true- '@rollup/[email protected]':+ '@rollup/[email protected]':optional: true- '@rollup/[email protected]':+ '@rollup/[email protected]':optional: true- '@rollup/[email protected]':+ '@rollup/[email protected]':optional: true- '@rollup/[email protected]':+ '@rollup/[email protected]':optional: true- '@rollup/[email protected]':+ '@rollup/[email protected]':optional: true- '@rollup/[email protected]':+ '@rollup/[email protected]':optional: true- '@rollup/[email protected]':+ '@rollup/[email protected]':optional: true- '@rollup/[email protected]':+ '@rollup/[email protected]':optional: true- '@rollup/[email protected]':+ '@rollup/[email protected]':optional: true- '@rollup/[email protected]':+ '@rollup/[email protected]':optional: true- '@rollup/[email protected]':+ '@rollup/[email protected]':optional: true'@rushstack/[email protected](@types/[email protected])':@@ -12275,9 +12658,9 @@ snapshots:memoizerific: 1.11.3ts-dedent: 2.2.0- '@storybook/[email protected](@types/[email protected])(@types/[email protected])([email protected])([email protected]([email protected]))([email protected])':+ '@storybook/[email protected](@types/[email protected])(@types/[email protected])([email protected])([email protected]([email protected]))([email protected])':dependencies:- '@storybook/blocks': 8.1.2(@types/[email protected])(@types/[email protected])([email protected])([email protected]([email protected]))([email protected])+ '@storybook/blocks': 8.1.2(@types/[email protected])(@types/[email protected])([email protected])([email protected]([email protected]))([email protected])dequal: 2.0.3lodash: 4.17.21ts-dedent: 2.2.0@@ -12290,13 +12673,13 @@ snapshots:- react-dom- supports-colordependencies:'@babel/core': 7.24.5'@mdx-js/react': 3.0.1(@types/[email protected])([email protected])- '@storybook/blocks': 8.1.2(@types/[email protected])(@types/[email protected])([email protected])([email protected]([email protected]))([email protected])+ '@storybook/blocks': 8.1.2(@types/[email protected])(@types/[email protected])([email protected])([email protected]([email protected]))([email protected])'@storybook/client-logger': 8.1.2- '@storybook/components': 8.1.2(@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])+ '@storybook/components': 8.1.2(@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])'@storybook/csf-plugin': 8.1.2'@storybook/csf-tools': 8.1.2'@storybook/global': 5.0.0@@ -12318,12 +12701,12 @@ snapshots:- prettier- supports-color- '@storybook/[email protected](@types/[email protected])(@types/[email protected])([email protected])([email protected]([email protected]))([email protected])':+ '@storybook/[email protected](@types/[email protected])(@types/[email protected])([email protected])([email protected]([email protected]))([email protected])':dependencies:'@storybook/addon-actions': 8.1.2'@storybook/addon-backgrounds': 8.1.2- '@storybook/addon-controls': 8.1.2(@types/[email protected])(@types/[email protected])([email protected])([email protected]([email protected]))([email protected])- '@storybook/addon-docs': 8.1.2(@types/[email protected])([email protected])+ '@storybook/addon-controls': 8.1.2(@types/[email protected])(@types/[email protected])([email protected])([email protected]([email protected]))([email protected])+ '@storybook/addon-docs': 8.1.2(@types/[email protected])([email protected])'@storybook/addon-highlight': 8.1.2'@storybook/addon-measure': 8.1.2'@storybook/addon-outline': 8.1.2@@ -12399,11 +12782,11 @@ snapshots:- '@swc/helpers'- webpack- '@storybook/[email protected](@types/[email protected])(@types/[email protected])([email protected])([email protected]([email protected]))([email protected])':+ '@storybook/[email protected](@types/[email protected])(@types/[email protected])([email protected])([email protected]([email protected]))([email protected])':dependencies:'@storybook/channels': 8.1.2'@storybook/client-logger': 8.1.2- '@storybook/components': 8.1.2(@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])+ '@storybook/components': 8.1.2(@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])'@storybook/core-events': 8.1.2'@storybook/csf': 0.1.7'@storybook/docs-tools': 8.1.2([email protected])@@ -12583,9 +12966,9 @@ snapshots:transitivePeerDependencies:- supports-color- '@storybook/[email protected](@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])':+ '@storybook/[email protected](@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])':dependencies:- '@radix-ui/react-dialog': 1.0.5(@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-dialog': 1.0.5(@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])'@radix-ui/react-slot': 1.0.2(@types/[email protected])([email protected])'@storybook/client-logger': 8.1.2'@storybook/csf': 0.1.7@@ -12853,7 +13236,7 @@ snapshots:endent: 2.1.0find-cache-dir: 3.3.2flat-cache: 3.2.0- micromatch: 4.0.6+ micromatch: 4.0.5react-docgen-typescript: 2.2.2([email protected])tslib: 2.6.2typescript: 5.4.5@@ -12908,7 +13291,7 @@ snapshots:react: 18.2.0react-dom: 18.2.0([email protected])- semver: 7.6.0+ semver: 7.6.2ts-dedent: 2.2.0type-fest: 2.19.0util-deprecate: 1.0.2@@ -13084,7 +13467,7 @@ snapshots:'@babel/runtime': 7.24.1'@types/aria-query': 5.0.4aria-query: 5.1.3- chalk: 4.1.2+ chalk: https://r2.cnpmjs.org/chalk/-/chalk-4.1.2.tgzdom-accessibility-api: 0.5.16lz-string: 1.5.0pretty-format: 27.5.1@@ -13102,20 +13485,20 @@ snapshots:optionalDependencies:vitest: 1.6.0(@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])- '@testing-library/[email protected](@types/[email protected])([email protected]([email protected]))([email protected])':+ '@testing-library/[email protected](@types/[email protected])([email protected]([email protected]))([email protected])':dependencies:'@babel/runtime': 7.24.1react: 18.2.0react-error-boundary: 3.1.4([email protected])optionalDependencies:- '@types/react': 18.3.1+ '@types/react': 18.2.79react-dom: 18.2.0([email protected])dependencies:'@babel/runtime': 7.24.1'@testing-library/dom': 9.3.4- '@types/react-dom': 18.3.0+ '@types/react-dom': 18.2.25react: 18.2.0react-dom: 18.2.0([email protected])@@ -13273,23 +13656,23 @@ snapshots:'@types/[email protected]': {}- '@types/[email protected]':+ '@types/[email protected]':dependencies:- '@types/react': 18.3.1+ '@types/react': 18.2.79'@types/[email protected]':dependencies:- '@types/react': 18.3.1+ '@types/react': 18.2.79'@types/[email protected]':dependencies:- '@types/react': 18.3.1+ '@types/react': 18.3.2'@types/[email protected]':dependencies:- '@types/react': 18.3.1+ '@types/react': 18.2.79- '@types/[email protected]':+ '@types/[email protected]':dependencies:'@types/prop-types': 15.7.12csstype: 3.1.3@@ -13410,7 +13793,7 @@ snapshots:globby: 11.1.0is-glob: 4.0.3minimatch: 9.0.4- semver: 7.6.0+ semver: 7.6.2ts-api-utils: 1.3.0([email protected])optionalDependencies:typescript: 5.4.5@@ -13440,8 +13823,6 @@ snapshots:'@ungap/[email protected]': {}- '@univerjs/[email protected]': {}-'@univerjs/[email protected]': {}@@ -13454,9 +13835,14 @@ snapshots:react: 18.2.0react-dom: 18.2.0([email protected])dependencies:- '@grpc/grpc-js': 1.10.4+ '@grpc/grpc-js': 1.10.6+ rxjs: 7.8.1++ dependencies:+ '@grpc/grpc-js': 1.10.6rxjs: 7.8.1'@vitejs/[email protected]([email protected](@types/[email protected])([email protected])([email protected])([email protected]))':@@ -13496,18 +13882,36 @@ snapshots:'@vitest/utils': 1.3.1chai: 4.4.1+ '@vitest/[email protected]':+ dependencies:+ '@vitest/spy': 1.5.0+ '@vitest/utils': 1.5.0+ chai: 4.4.1+'@vitest/[email protected]':dependencies:'@vitest/spy': 1.6.0'@vitest/utils': 1.6.0chai: 4.4.1+ '@vitest/[email protected]':+ dependencies:+ '@vitest/utils': 1.5.0+ p-limit: 5.0.0+ pathe: 1.1.2+'@vitest/[email protected]':dependencies:'@vitest/utils': 1.6.0p-limit: 5.0.0pathe: 1.1.2+ '@vitest/[email protected]':+ dependencies:+ magic-string: 0.30.10+ pathe: 1.1.2+ pretty-format: 29.7.0+'@vitest/[email protected]':dependencies:magic-string: 0.30.10@@ -13518,6 +13922,10 @@ snapshots:dependencies:tinyspy: 2.2.1+ '@vitest/[email protected]':+ dependencies:+ tinyspy: 2.2.1+'@vitest/[email protected]':dependencies:tinyspy: 2.2.1@@ -13529,6 +13937,13 @@ snapshots:loupe: 2.3.7pretty-format: 29.7.0+ '@vitest/[email protected]':+ dependencies:+ diff-sequences: 29.6.3+ estree-walker: 3.0.3+ loupe: 2.3.7+ pretty-format: 29.7.0+'@vitest/[email protected]':dependencies:diff-sequences: 29.6.3@@ -13549,48 +13964,48 @@ snapshots:'@volar/language-core': 1.11.1path-browserify: 1.0.1- '@vue/[email protected]':+ '@vue/[email protected]':dependencies:- '@babel/parser': 7.24.1- '@vue/shared': 3.4.21+ '@babel/parser': 7.24.4+ '@vue/shared': 3.4.24entities: 4.5.0- estree-walker: 2.0.2+ estree-walker: https://r2.cnpmjs.org/estree-walker/-/estree-walker-2.0.2.tgzsource-map-js: 1.2.0'@vue/[email protected]':dependencies:- '@babel/parser': 7.24.5+ '@babel/parser': 7.24.4'@vue/shared': 3.4.27entities: 4.5.0estree-walker: 2.0.2source-map-js: 1.2.0- '@vue/[email protected]':+ '@vue/[email protected]':dependencies:- '@vue/compiler-core': 3.4.21- '@vue/shared': 3.4.21+ '@vue/compiler-core': 3.4.24+ '@vue/shared': 3.4.24'@vue/[email protected]':dependencies:'@vue/compiler-core': 3.4.27'@vue/shared': 3.4.27- '@vue/[email protected]':+ '@vue/[email protected]':dependencies:- '@babel/parser': 7.24.1- '@vue/compiler-core': 3.4.21- '@vue/compiler-dom': 3.4.21- '@vue/compiler-ssr': 3.4.21- '@vue/shared': 3.4.21- estree-walker: 2.0.2- magic-string: 0.30.8+ '@babel/parser': 7.24.4+ '@vue/compiler-core': 3.4.24+ '@vue/compiler-dom': 3.4.24+ '@vue/compiler-ssr': 3.4.24+ '@vue/shared': 3.4.24+ estree-walker: https://r2.cnpmjs.org/estree-walker/-/estree-walker-2.0.2.tgz+ magic-string: 0.30.10postcss: 8.4.38source-map-js: 1.2.0optional: true'@vue/[email protected]':dependencies:- '@babel/parser': 7.24.5+ '@babel/parser': 7.24.4'@vue/compiler-core': 3.4.27'@vue/compiler-dom': 3.4.27'@vue/compiler-ssr': 3.4.27@@ -13600,10 +14015,10 @@ snapshots:postcss: 8.4.38source-map-js: 1.2.0- '@vue/[email protected]':+ '@vue/[email protected]':dependencies:- '@vue/compiler-dom': 3.4.21- '@vue/shared': 3.4.21+ '@vue/compiler-dom': 3.4.24+ '@vue/shared': 3.4.24optional: true'@vue/[email protected]':@@ -13615,8 +14030,8 @@ snapshots:dependencies:'@volar/language-core': 1.11.1'@volar/source-map': 1.11.1- '@vue/compiler-dom': 3.4.21- '@vue/shared': 3.4.21+ '@vue/compiler-dom': 3.4.24+ '@vue/shared': 3.4.24computeds: 0.0.1minimatch: 9.0.4muggle-string: 0.3.1@@ -13625,19 +14040,19 @@ snapshots:optionalDependencies:typescript: 5.4.5- '@vue/[email protected]':+ '@vue/[email protected]':dependencies:- '@vue/shared': 3.4.21+ '@vue/shared': 3.4.24optional: true'@vue/[email protected]':dependencies:'@vue/shared': 3.4.27- '@vue/[email protected]':+ '@vue/[email protected]':dependencies:- '@vue/reactivity': 3.4.21- '@vue/shared': 3.4.21+ '@vue/reactivity': 3.4.24+ '@vue/shared': 3.4.24optional: true'@vue/[email protected]':@@ -13645,10 +14060,10 @@ snapshots:'@vue/reactivity': 3.4.27'@vue/shared': 3.4.27- '@vue/[email protected]':+ '@vue/[email protected]':dependencies:- '@vue/runtime-core': 3.4.21- '@vue/shared': 3.4.21+ '@vue/runtime-core': 3.4.24+ '@vue/shared': 3.4.24csstype: 3.1.3optional: true@@ -13658,11 +14073,11 @@ snapshots:'@vue/shared': 3.4.27csstype: 3.1.3dependencies:- '@vue/compiler-ssr': 3.4.21- '@vue/shared': 3.4.21- vue: 3.4.21([email protected])+ '@vue/compiler-ssr': 3.4.24+ '@vue/shared': 3.4.24+ vue: 3.4.24([email protected])optional: true@@ -13671,7 +14086,7 @@ snapshots:'@vue/shared': 3.4.27vue: 3.4.27([email protected])- '@vue/[email protected]': {}+ '@vue/[email protected]': {}'@vue/[email protected]': {}@@ -13864,6 +14279,8 @@ snapshots:+ ansi-regex@https://r2.cnpmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz: {}+dependencies:color-convert: 1.9.3@@ -13876,6 +14293,10 @@ snapshots:+ ansi-styles@https://r2.cnpmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz:+ dependencies:+ color-convert: https://r2.cnpmjs.org/color-convert/-/color-convert-2.0.1.tgz+dependencies:normalize-path: 3.0.0@@ -13895,6 +14316,8 @@ snapshots:+ argparse@https://r2.cnpmjs.org/argparse/-/argparse-2.0.1.tgz: {}+dependencies:tslib: 2.6.2@@ -14043,7 +14466,7 @@ snapshots:dependencies:'@babel/core': 7.24.5'@babel/helper-define-polyfill-provider': 0.6.1(@babel/[email protected])- core-js-compat: 3.37.1+ core-js-compat: 3.36.1transitivePeerDependencies:- supports-color@@ -14196,6 +14619,8 @@ snapshots:+ callsites@https://r2.cnpmjs.org/callsites/-/callsites-3.1.0.tgz: {}+dependencies:pascal-case: 3.1.2@@ -14241,6 +14666,11 @@ snapshots:+ chalk@https://r2.cnpmjs.org/chalk/-/chalk-4.1.2.tgz:+ dependencies:+ ansi-styles: https://r2.cnpmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz+ supports-color: https://r2.cnpmjs.org/supports-color/-/supports-color-7.2.0.tgz+@@ -14275,7 +14705,7 @@ snapshots:- [email protected]: {}+ [email protected]: {}@@ -14345,9 +14775,9 @@ snapshots:dependencies:- string-width: 4.2.3- strip-ansi: 6.0.1- wrap-ansi: 7.0.0+ string-width: https://r2.cnpmjs.org/string-width/-/string-width-4.2.3.tgz+ strip-ansi: https://r2.cnpmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz+ wrap-ansi: https://r2.cnpmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgzdependencies:@@ -14371,13 +14801,19 @@ snapshots:dependencies:color-name: 1.1.4+ color-convert@https://r2.cnpmjs.org/color-convert/-/color-convert-2.0.1.tgz:+ dependencies:+ color-name: https://r2.cnpmjs.org/color-name/-/color-name-1.1.4.tgz++ color-name@https://r2.cnpmjs.org/color-name/-/color-name-1.1.4.tgz: {}+dependencies:- color-name: 1.1.4+ color-name: https://r2.cnpmjs.org/color-name/-/color-name-1.1.4.tgzsimple-swizzle: 0.2.2@@ -14555,6 +14991,10 @@ snapshots:dependencies:is-what: 3.14.1+ dependencies:+ browserslist: 4.23.0+dependencies:browserslist: 4.23.0@@ -14578,10 +15018,10 @@ snapshots:dependencies:- env-paths: 2.2.1- import-fresh: 3.3.0- js-yaml: 4.1.0- parse-json: 5.2.0+ env-paths: https://r2.cnpmjs.org/env-paths/-/env-paths-2.2.1.tgz+ import-fresh: https://r2.cnpmjs.org/import-fresh/-/import-fresh-3.3.0.tgz+ js-yaml: https://r2.cnpmjs.org/js-yaml/-/js-yaml-4.1.0.tgz+ parse-json: https://r2.cnpmjs.org/parse-json/-/parse-json-5.2.0.tgzoptionalDependencies:typescript: 5.4.5@@ -14663,6 +15103,8 @@ snapshots:es-errors: 1.3.0is-data-view: 1.0.1+ [email protected]: {}+@@ -14899,6 +15341,8 @@ snapshots:+ emoji-regex@https://r2.cnpmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz: {}+@@ -14922,7 +15366,7 @@ snapshots:- [email protected]: {}+ env-paths@https://r2.cnpmjs.org/env-paths/-/env-paths-2.2.1.tgz: {}@@ -14935,6 +15379,10 @@ snapshots:dependencies:is-arrayish: 0.2.1+ error-ex@https://r2.cnpmjs.org/error-ex/-/error-ex-1.3.2.tgz:+ dependencies:+ is-arrayish: https://r2.cnpmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz+dependencies:array-buffer-byte-length: 1.0.1@@ -14997,11 +15445,11 @@ snapshots:call-bind: 1.0.7get-intrinsic: 1.2.4has-symbols: 1.0.3- is-arguments: 1.1.1+ is-arguments: https://r2.cnpmjs.org/is-arguments/-/is-arguments-1.1.1.tgzis-map: 2.0.3is-set: 2.0.3- is-string: 1.0.7- isarray: 2.0.5+ is-string: https://r2.cnpmjs.org/is-string/-/is-string-1.0.7.tgz+ isarray: https://r2.cnpmjs.org/isarray/-/isarray-2.0.5.tgzstop-iteration-iterator: 1.0.0@@ -15242,7 +15690,7 @@ snapshots:dependencies:eslint: 8.57.0- semver: 7.6.0+ semver: 7.6.2dependencies:@@ -15257,7 +15705,7 @@ snapshots:dependencies:eslint: 8.57.0- prettier-linter-helpers: 1.0.0+ prettier-linter-helpers: https://r2.cnpmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgzdependencies:@@ -15321,7 +15769,7 @@ snapshots:get-tsconfig: 4.7.3is-glob: 4.0.3minimatch: 9.0.4- semver: 7.6.0+ semver: 7.6.2transitivePeerDependencies:- supports-color- typescript@@ -15369,7 +15817,7 @@ snapshots:globals: 15.2.0ignore: 5.3.1minimatch: 9.0.4- semver: 7.6.0+ semver: 7.6.2dependencies:@@ -15572,7 +16020,7 @@ snapshots:natural-compare: 1.4.0nth-check: 2.1.1postcss-selector-parser: 6.0.16- semver: 7.6.0+ semver: 7.6.2vue-eslint-parser: 9.4.2([email protected])xml-name-validator: 4.0.0transitivePeerDependencies:@@ -15692,6 +16140,8 @@ snapshots:dependencies:'@types/estree': 1.0.5+ estree-walker@https://r2.cnpmjs.org/estree-walker/-/estree-walker-2.0.2.tgz: {}+@@ -15870,7 +16320,7 @@ snapshots:dependencies:locate-path: 7.2.0- path-exists: 5.0.0+ path-exists: https://r2.cnpmjs.org/path-exists/-/path-exists-5.0.0.tgzunicorn-magic: 0.1.0@@ -15986,7 +16436,7 @@ snapshots:- [email protected]: {}+ get-caller-file@https://r2.cnpmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz: {}@@ -16195,6 +16645,8 @@ snapshots:+ has-flag@https://r2.cnpmjs.org/has-flag/-/has-flag-4.0.0.tgz: {}+dependencies:es-define-property: 1.0.0@@ -16337,6 +16789,11 @@ snapshots:parent-module: 1.0.1resolve-from: 4.0.0+ import-fresh@https://r2.cnpmjs.org/import-fresh/-/import-fresh-3.3.0.tgz:+ dependencies:+ parent-module: https://r2.cnpmjs.org/parent-module/-/parent-module-1.0.1.tgz+ resolve-from: https://r2.cnpmjs.org/resolve-from/-/resolve-from-4.0.0.tgz+@@ -16352,6 +16809,8 @@ snapshots:+ inherits@https://r2.cnpmjs.org/inherits/-/inherits-2.0.4.tgz: {}+@@ -16413,6 +16872,11 @@ snapshots:call-bind: 1.0.7has-tostringtag: 1.0.2+ is-arguments@https://r2.cnpmjs.org/is-arguments/-/is-arguments-1.1.1.tgz:+ dependencies:+ call-bind: 1.0.7+ has-tostringtag: 1.0.2+dependencies:call-bind: 1.0.7@@ -16422,6 +16886,8 @@ snapshots:+ is-arrayish@https://r2.cnpmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz: {}+dependencies:has-tostringtag: 1.0.2@@ -16485,10 +16951,16 @@ snapshots:dependencies:get-east-asian-width: 1.2.0+ is-fullwidth-code-point@https://r2.cnpmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz: {}+dependencies:has-tostringtag: 1.0.2+ is-generator-function@https://r2.cnpmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz:+ dependencies:+ has-tostringtag: 1.0.2+dependencies:is-extglob: 2.1.1@@ -16568,6 +17040,10 @@ snapshots:dependencies:has-tostringtag: 1.0.2+ is-string@https://r2.cnpmjs.org/is-string/-/is-string-1.0.7.tgz:+ dependencies:+ has-tostringtag: 1.0.2+dependencies:has-symbols: 1.0.3@@ -16613,6 +17089,8 @@ snapshots:+ isarray@https://r2.cnpmjs.org/isarray/-/isarray-2.0.5.tgz: {}+@@ -16630,7 +17108,7 @@ snapshots:dependencies:'@babel/core': 7.24.3- '@babel/parser': 7.24.1+ '@babel/parser': 7.24.4'@istanbuljs/schema': 0.1.3istanbul-lib-coverage: 3.2.2semver: 7.6.0@@ -16735,6 +17213,10 @@ snapshots:dependencies:argparse: 2.0.1+ js-yaml@https://r2.cnpmjs.org/js-yaml/-/js-yaml-4.1.0.tgz:+ dependencies:+ argparse: https://r2.cnpmjs.org/argparse/-/argparse-2.0.1.tgz+@@ -16753,7 +17235,7 @@ snapshots:chalk: 4.1.2flow-parser: 0.232.0graceful-fs: 4.2.11- micromatch: 4.0.6+ micromatch: 4.0.5neo-async: 2.6.2node-dir: 0.1.17recast: 0.23.6@@ -16806,6 +17288,8 @@ snapshots:+ json-parse-even-better-errors@https://r2.cnpmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz: {}+@@ -16821,7 +17305,7 @@ snapshots:acorn: 8.11.3eslint-visitor-keys: 3.4.3espree: 9.6.1- semver: 7.6.0+ semver: 7.6.2@@ -16908,6 +17392,8 @@ snapshots:+ lines-and-columns@https://r2.cnpmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz: {}+dependencies:chalk: 5.3.0@@ -16964,6 +17450,8 @@ snapshots:+ lodash.camelcase@https://r2.cnpmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz: {}+@@ -16978,25 +17466,29 @@ snapshots:+ lodash.isplainobject@https://r2.cnpmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz: {}+- [email protected]: {}+ lodash.kebabcase@https://r2.cnpmjs.org/lodash.kebabcase/-/lodash.kebabcase-4.1.1.tgz: {}- [email protected]: {}+ lodash.merge@https://r2.cnpmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz: {}++ lodash.mergewith@https://r2.cnpmjs.org/lodash.mergewith/-/lodash.mergewith-4.6.2.tgz: {}- [email protected]: {}+ lodash.snakecase@https://r2.cnpmjs.org/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz: {}- [email protected]: {}+ lodash.startcase@https://r2.cnpmjs.org/lodash.startcase/-/lodash.startcase-4.4.0.tgz: {}- [email protected]: {}+ lodash.uniq@https://r2.cnpmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz: {}- [email protected]: {}+ lodash.upperfirst@https://r2.cnpmjs.org/lodash.upperfirst/-/lodash.upperfirst-4.3.1.tgz: {}@@ -17058,13 +17550,9 @@ snapshots:dependencies:'@jridgewell/sourcemap-codec': 1.4.15- dependencies:- '@jridgewell/sourcemap-codec': 1.4.15-dependencies:- '@babel/parser': 7.24.1+ '@babel/parser': 7.24.4'@babel/types': 7.24.0source-map-js: 1.2.0@@ -17558,6 +18046,10 @@ snapshots:dependencies:callsites: 3.1.0+ parent-module@https://r2.cnpmjs.org/parent-module/-/parent-module-1.0.1.tgz:+ dependencies:+ callsites: https://r2.cnpmjs.org/callsites/-/callsites-3.1.0.tgz+dependencies:character-entities: 1.2.4@@ -17584,6 +18076,13 @@ snapshots:lines-and-columns: 2.0.4type-fest: 3.13.1+ parse-json@https://r2.cnpmjs.org/parse-json/-/parse-json-5.2.0.tgz:+ dependencies:+ '@babel/code-frame': 7.24.2+ error-ex: https://r2.cnpmjs.org/error-ex/-/error-ex-1.3.2.tgz+ json-parse-even-better-errors: https://r2.cnpmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz+ lines-and-columns: https://r2.cnpmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz+@@ -17613,6 +18112,8 @@ snapshots:+ path-exists@https://r2.cnpmjs.org/path-exists/-/path-exists-5.0.0.tgz: {}+@@ -17752,7 +18253,7 @@ snapshots:+ prettier-linter-helpers@https://r2.cnpmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz:dependencies:fast-diff: 1.3.0@@ -17767,7 +18268,7 @@ snapshots:dependencies:ansi-regex: 5.0.1ansi-styles: 5.2.0- react-is: 17.0.2+ react-is: https://r2.cnpmjs.org/react-is/-/react-is-17.0.2.tgzdependencies:@@ -18080,26 +18581,26 @@ snapshots:dependencies:dnd-core: 16.0.1- [email protected]([email protected])([email protected](@types/[email protected])(@types/[email protected])([email protected]))([email protected]([email protected]))([email protected]):+ [email protected]([email protected])([email protected](@types/[email protected])(@types/[email protected])([email protected]))([email protected]([email protected]))([email protected]):dependencies:dnd-core: 16.0.1dnd-multi-backend: 8.0.3([email protected])react: 18.2.0- react-dnd-preview: 8.0.3([email protected](@types/[email protected])(@types/[email protected])([email protected]))([email protected])+ react-dnd-preview: 8.0.3([email protected](@types/[email protected])(@types/[email protected])([email protected]))([email protected])react-dom: 18.2.0([email protected])- [email protected]([email protected](@types/[email protected])(@types/[email protected])([email protected]))([email protected]):+ [email protected]([email protected](@types/[email protected])(@types/[email protected])([email protected]))([email protected]):dependencies:react: 18.2.0dependencies:'@react-dnd/invariant': 4.0.2dnd-core: 16.0.1dependencies:'@react-dnd/invariant': 4.0.2'@react-dnd/shallowequal': 4.0.2@@ -18109,7 +18610,7 @@ snapshots:react: 18.2.0optionalDependencies:'@types/node': 20.12.12- '@types/react': 18.3.1+ '@types/react': 18.2.79dependencies:@@ -18169,12 +18670,12 @@ snapshots:- [email protected]: {}-+ react-is@https://r2.cnpmjs.org/react-is/-/react-is-17.0.2.tgz: {}+dependencies:'@babel/runtime': 7.4.5@@ -18184,7 +18685,7 @@ snapshots:react-dom: 18.2.0([email protected])substyle: 9.4.1([email protected])- [email protected](@types/[email protected])(@types/[email protected])([email protected])([email protected]([email protected]))([email protected]):+ [email protected](@types/[email protected])(@types/[email protected])([email protected])([email protected]([email protected]))([email protected]):dependencies:classnames: 2.5.1immutability-helper: 3.1.1@@ -18192,9 +18693,9 @@ snapshots:prop-types: 15.8.1rdndmb-html5-to-touch: 8.0.3([email protected])react: 18.2.0react-dnd-html5-backend: 16.0.1- react-dnd-multi-backend: 8.0.3([email protected])([email protected](@types/[email protected])(@types/[email protected])([email protected]))([email protected]([email protected]))([email protected])+ react-dnd-multi-backend: 8.0.3([email protected])([email protected](@types/[email protected])(@types/[email protected])([email protected]))([email protected]([email protected]))([email protected])react-dnd-touch-backend: 16.0.1uuid: 9.0.1transitivePeerDependencies:@@ -18464,7 +18965,7 @@ snapshots:lodash: 4.17.21strip-ansi: 6.0.1- [email protected]: {}+ require-directory@https://r2.cnpmjs.org/require-directory/-/require-directory-2.1.1.tgz: {}@@ -18482,6 +18983,10 @@ snapshots:+ resolve-from@https://r2.cnpmjs.org/resolve-from/-/resolve-from-4.0.0.tgz: {}++ resolve-from@https://r2.cnpmjs.org/resolve-from/-/resolve-from-5.0.0.tgz: {}+dependencies:path-root: 0.1.1@@ -18534,25 +19039,26 @@ snapshots:dependencies:glob: 7.2.3dependencies:'@types/estree': 1.0.5optionalDependencies:- '@rollup/rollup-android-arm-eabi': 4.13.2- '@rollup/rollup-android-arm64': 4.13.2- '@rollup/rollup-darwin-arm64': 4.13.2- '@rollup/rollup-darwin-x64': 4.13.2- '@rollup/rollup-linux-arm-gnueabihf': 4.13.2- '@rollup/rollup-linux-arm64-gnu': 4.13.2- '@rollup/rollup-linux-arm64-musl': 4.13.2- '@rollup/rollup-linux-powerpc64le-gnu': 4.13.2- '@rollup/rollup-linux-riscv64-gnu': 4.13.2- '@rollup/rollup-linux-s390x-gnu': 4.13.2- '@rollup/rollup-linux-x64-gnu': 4.13.2- '@rollup/rollup-linux-x64-musl': 4.13.2- '@rollup/rollup-win32-arm64-msvc': 4.13.2- '@rollup/rollup-win32-ia32-msvc': 4.13.2- '@rollup/rollup-win32-x64-msvc': 4.13.2+ '@rollup/rollup-android-arm-eabi': 4.16.4+ '@rollup/rollup-android-arm64': 4.16.4+ '@rollup/rollup-darwin-arm64': 4.16.4+ '@rollup/rollup-darwin-x64': 4.16.4+ '@rollup/rollup-linux-arm-gnueabihf': 4.16.4+ '@rollup/rollup-linux-arm-musleabihf': 4.16.4+ '@rollup/rollup-linux-arm64-gnu': 4.16.4+ '@rollup/rollup-linux-arm64-musl': 4.16.4+ '@rollup/rollup-linux-powerpc64le-gnu': 4.16.4+ '@rollup/rollup-linux-riscv64-gnu': 4.16.4+ '@rollup/rollup-linux-s390x-gnu': 4.16.4+ '@rollup/rollup-linux-x64-gnu': 4.16.4+ '@rollup/rollup-linux-x64-musl': 4.16.4+ '@rollup/rollup-win32-arm64-msvc': 4.16.4+ '@rollup/rollup-win32-ia32-msvc': 4.16.4+ '@rollup/rollup-win32-x64-msvc': 4.16.4fsevents: 2.3.3@@ -18910,6 +19416,12 @@ snapshots:get-east-asian-width: 1.2.0strip-ansi: 7.1.0+ string-width@https://r2.cnpmjs.org/string-width/-/string-width-4.2.3.tgz:+ dependencies:+ emoji-regex: https://r2.cnpmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz+ is-fullwidth-code-point: https://r2.cnpmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz+ strip-ansi: https://r2.cnpmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz+@@ -18966,6 +19478,10 @@ snapshots:dependencies:ansi-regex: 6.0.1+ strip-ansi@https://r2.cnpmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz:+ dependencies:+ ansi-regex: https://r2.cnpmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz+@@ -19010,6 +19526,10 @@ snapshots:dependencies:has-flag: 4.0.0+ supports-color@https://r2.cnpmjs.org/supports-color/-/supports-color-7.2.0.tgz:+ dependencies:+ has-flag: https://r2.cnpmjs.org/has-flag/-/has-flag-4.0.0.tgz+[email protected](@swc/[email protected])([email protected](@swc/[email protected])([email protected])):@@ -19118,9 +19638,9 @@ snapshots:- [email protected]: {}+ [email protected]: {}- [email protected]: {}+ [email protected]: {}@@ -19373,7 +19893,7 @@ snapshots:dependencies:browserslist: 4.23.0escalade: 3.1.2- picocolors: 1.0.0+ picocolors: https://r2.cnpmjs.org/picocolors/-/picocolors-1.0.0.tgzdependencies:@@ -19432,9 +19952,9 @@ snapshots:dependencies:- inherits: 2.0.4- is-arguments: 1.1.1- is-generator-function: 1.0.10+ inherits: https://r2.cnpmjs.org/inherits/-/inherits-2.0.4.tgz+ is-arguments: https://r2.cnpmjs.org/is-arguments/-/is-arguments-1.1.1.tgz+ is-generator-function: https://r2.cnpmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgzis-typed-array: 1.1.13which-typed-array: 1.1.15@@ -19460,6 +19980,23 @@ snapshots:+ [email protected](@types/[email protected])([email protected])([email protected])([email protected]):+ dependencies:+ cac: 6.7.14+ debug: 4.3.4+ pathe: 1.1.2+ picocolors: 1.0.0+ transitivePeerDependencies:+ - '@types/node'+ - less+ - lightningcss+ - sass+ - stylus+ - sugarss+ - supports-color+ - terser+[email protected](@types/[email protected])([email protected])([email protected])([email protected]):dependencies:cac: 6.7.14@@ -19477,14 +20014,14 @@ snapshots:- supports-color- terser- [email protected](@types/[email protected])([email protected])([email protected])([email protected](@types/[email protected])([email protected])([email protected])([email protected])):+ [email protected](@types/[email protected])([email protected])([email protected])([email protected](@types/[email protected])([email protected])([email protected])([email protected])):dependencies:'@microsoft/api-extractor': 7.43.0(@types/[email protected])- '@rollup/pluginutils': 5.1.0([email protected])+ '@rollup/pluginutils': 5.1.0([email protected])'@vue/language-core': 1.8.27([email protected])debug: 4.3.4kolorist: 1.8.0- magic-string: 0.30.8+ magic-string: 0.30.10typescript: 5.4.5vue-tsc: 1.8.27([email protected])optionalDependencies:@@ -19494,11 +20031,23 @@ snapshots:- rollup- supports-color+ [email protected](@types/[email protected])([email protected])([email protected])([email protected]):+ dependencies:+ esbuild: 0.20.2+ postcss: 8.4.38+ rollup: 4.16.4+ optionalDependencies:+ '@types/node': 20.12.12+ fsevents: 2.3.3+ less: 4.2.0+ sass: 1.72.0+ terser: 5.30.0+[email protected](@types/[email protected])([email protected])([email protected])([email protected]):dependencies:esbuild: 0.20.2postcss: 8.4.38- rollup: 4.13.2+ rollup: 4.16.4optionalDependencies:'@types/node': 20.12.12fsevents: 2.3.3@@ -19506,6 +20055,41 @@ snapshots:sass: 1.72.0terser: 5.30.0+ [email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]):+ dependencies:+ '@vitest/expect': 1.5.0+ '@vitest/runner': 1.5.0+ '@vitest/snapshot': 1.5.0+ '@vitest/spy': 1.5.0+ '@vitest/utils': 1.5.0+ acorn-walk: 8.3.2+ chai: 4.4.1+ debug: 4.3.4+ execa: 8.0.1+ local-pkg: 0.5.0+ magic-string: 0.30.10+ pathe: 1.1.2+ picocolors: https://r2.cnpmjs.org/picocolors/-/picocolors-1.0.0.tgz+ std-env: 3.7.0+ strip-literal: 2.1.0+ tinybench: 2.8.0+ tinypool: 0.8.4+ vite-node: 1.5.0(@types/[email protected])([email protected])([email protected])([email protected])+ why-is-node-running: 2.2.2+ optionalDependencies:+ '@types/node': 20.12.12+ happy-dom: 13.3.8+ jsdom: 24.0.0+ transitivePeerDependencies:+ - less+ - lightningcss+ - sass+ - stylus+ - sugarss+ - supports-color+ - terser+[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]):dependencies:'@vitest/expect': 1.6.0@@ -19523,8 +20107,8 @@ snapshots:picocolors: 1.0.0std-env: 3.7.0strip-literal: 2.1.0- tinybench: 2.6.0- tinypool: 0.8.3+ tinybench: 2.8.0+ tinypool: 0.8.4why-is-node-running: 2.2.2@@ -19550,7 +20134,7 @@ snapshots:espree: 9.6.1esquery: 1.5.0lodash: 4.17.21- semver: 7.6.0+ semver: 7.6.2transitivePeerDependencies:- supports-color@@ -19566,13 +20150,13 @@ snapshots:semver: 7.6.0typescript: 5.4.5dependencies:- '@vue/compiler-dom': 3.4.21- '@vue/compiler-sfc': 3.4.21- '@vue/runtime-dom': 3.4.21- '@vue/server-renderer': 3.4.21([email protected]([email protected]))- '@vue/shared': 3.4.21+ '@vue/compiler-dom': 3.4.24+ '@vue/compiler-sfc': 3.4.24+ '@vue/runtime-dom': 3.4.24+ '@vue/server-renderer': 3.4.24([email protected]([email protected]))+ '@vue/shared': 3.4.24optionalDependencies:typescript: 5.4.5optional: true@@ -19769,6 +20353,12 @@ snapshots:string-width: 7.1.0strip-ansi: 7.1.0+ wrap-ansi@https://r2.cnpmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz:+ dependencies:+ ansi-styles: https://r2.cnpmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz+ string-width: https://r2.cnpmjs.org/string-width/-/string-width-4.2.3.tgz+ strip-ansi: https://r2.cnpmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz+@@ -19796,7 +20386,7 @@ snapshots:- [email protected]: {}+ y18n@https://r2.cnpmjs.org/y18n/-/y18n-5.0.8.tgz: {}@@ -19822,10 +20412,10 @@ snapshots:dependencies:cliui: 8.0.1escalade: 3.1.2- get-caller-file: 2.0.5- require-directory: 2.1.1- string-width: 4.2.3- y18n: 5.0.8+ get-caller-file: https://r2.cnpmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz+ require-directory: https://r2.cnpmjs.org/require-directory/-/require-directory-2.1.1.tgz+ string-width: https://r2.cnpmjs.org/string-width/-/string-width-4.2.3.tgz+ y18n: https://r2.cnpmjs.org/y18n/-/y18n-5.0.8.tgzyargs-parser: 21.1.1