@univerjs/sheets 0.4.0 → 0.4.1-experimental.20241023-bbb123f
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +149 -71
- package/lib/types/commands/commands/set-style.command.d.ts +1 -1
- package/lib/types/commands/mutations/add-range-protection.mutation.d.ts +2 -2
- package/lib/types/commands/mutations/delete-range-protection.mutation.d.ts +3 -3
- package/lib/types/commands/mutations/set-frozen.mutation.d.ts +8 -0
- package/lib/types/index.d.ts +7 -2
- package/lib/types/model/range-protection.cache.d.ts +5 -2
- package/lib/types/services/permission/permission-point/index.d.ts +2 -0
- package/lib/types/services/permission/permission-point/range/delete-protection.d.ts +13 -0
- package/lib/types/services/permission/permission-point/range/manage-collaborator.d.ts +13 -0
- package/lib/types/services/permission/permission-point/workbook/create-permission.d.ts +11 -0
- package/lib/types/services/permission/permission-point/worksheet/delete-protection.d.ts +12 -0
- package/lib/types/services/permission/range-permission/range-protection.ref-range.d.ts +3 -3
- package/lib/types/services/permission/range-permission/range-protection.service.d.ts +3 -2
- package/lib/types/services/permission/range-permission/util.d.ts +1 -0
- package/lib/types/services/permission/type.d.ts +1 -1
- package/lib/types/services/permission/workbook-permission/workbook-permission.service.d.ts +4 -1
- package/lib/types/services/permission/worksheet-permission/utils.d.ts +2 -2
- package/lib/types/services/selections/selection-manager.service.d.ts +2 -2
- package/lib/umd/index.js +1 -1
- package/package.json +7 -7
- package/LICENSE +0 -176
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Disposable, IPermissionService, IResourceManagerService } from '@univerjs/core';
|
|
1
|
+
import { Disposable, IPermissionService, IResourceManagerService, IUniverInstanceService } from '@univerjs/core';
|
|
2
2
|
import { RangeProtectionCache } from '../../../model/range-protection.cache';
|
|
3
3
|
import { RangeProtectionRuleModel } from '../../../model/range-protection-rule.model';
|
|
4
4
|
export declare class RangeProtectionService extends Disposable {
|
|
@@ -6,7 +6,8 @@ export declare class RangeProtectionService extends Disposable {
|
|
|
6
6
|
private _permissionService;
|
|
7
7
|
private _resourceManagerService;
|
|
8
8
|
private _selectionProtectionCache;
|
|
9
|
-
|
|
9
|
+
private _univerInstanceService;
|
|
10
|
+
constructor(_selectionProtectionRuleModel: RangeProtectionRuleModel, _permissionService: IPermissionService, _resourceManagerService: IResourceManagerService, _selectionProtectionCache: RangeProtectionCache, _univerInstanceService: IUniverInstanceService);
|
|
10
11
|
private _initRuleChange;
|
|
11
12
|
private _initSnapshot;
|
|
12
13
|
}
|
|
@@ -3,4 +3,5 @@ import { RangeProtectionPermissionEditPoint } from '../permission-point/range/ed
|
|
|
3
3
|
import { RangeProtectionPermissionViewPoint } from '../permission-point/range/view';
|
|
4
4
|
export type IRangePermissionPoint = RangeProtectionPermissionEditPoint | RangeProtectionPermissionViewPoint;
|
|
5
5
|
export declare const getAllRangePermissionPoint: () => (typeof RangeProtectionPermissionEditPoint)[];
|
|
6
|
+
export declare const baseProtectionActions: UnitAction[];
|
|
6
7
|
export declare const getDefaultRangePermission: (unitId?: string, subUnitId?: string, permissionId?: string) => Record<UnitAction, boolean>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { UnitObject } from '@univerjs/protocol';
|
|
2
2
|
export interface IWorksheetProtectionRule {
|
|
3
3
|
permissionId: string;
|
|
4
|
-
name?: string;
|
|
5
4
|
description?: string;
|
|
6
5
|
unitType: UnitObject;
|
|
7
6
|
unitId: string;
|
|
8
7
|
subUnitId: string;
|
|
8
|
+
name: string;
|
|
9
9
|
}
|
|
10
10
|
export interface IWorksheetProtectionPointRule {
|
|
11
11
|
unitId: string;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { Disposable, IPermissionService, IUniverInstanceService } from '@univerjs/core';
|
|
2
2
|
import { RangeProtectionRuleModel } from '../../../model/range-protection-rule.model';
|
|
3
|
+
import { WorksheetProtectionPointModel, WorksheetProtectionRuleModel } from '../worksheet-permission';
|
|
3
4
|
export declare class WorkbookPermissionService extends Disposable {
|
|
4
5
|
private _permissionService;
|
|
5
6
|
private _univerInstanceService;
|
|
6
7
|
private _rangeProtectionRuleModel;
|
|
7
|
-
|
|
8
|
+
private _worksheetProtectionRuleModel;
|
|
9
|
+
private _worksheetProtectionPointModel;
|
|
10
|
+
constructor(_permissionService: IPermissionService, _univerInstanceService: IUniverInstanceService, _rangeProtectionRuleModel: RangeProtectionRuleModel, _worksheetProtectionRuleModel: WorksheetProtectionRuleModel, _worksheetProtectionPointModel: WorksheetProtectionPointModel);
|
|
8
11
|
private _init;
|
|
9
12
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { UnitAction } from '@univerjs/protocol';
|
|
2
|
-
import { WorksheetCopyPermission,
|
|
3
|
-
export declare const getAllWorksheetPermissionPoint: () => (typeof
|
|
2
|
+
import { WorksheetCopyPermission, WorksheetDeleteProtectionPermission } from '../permission-point';
|
|
3
|
+
export declare const getAllWorksheetPermissionPoint: () => (typeof WorksheetDeleteProtectionPermission)[];
|
|
4
4
|
export declare const getAllWorksheetPermissionPointByPointPanel: () => (typeof WorksheetCopyPermission)[];
|
|
5
5
|
export declare const defaultWorksheetPermissionPoint: UnitAction[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DeepReadonly, ISelectionCell, Nullable, Workbook, Disposable, IUniverInstanceService, RxDisposable } from '@univerjs/core';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
2
|
+
import { Observable, BehaviorSubject } from 'rxjs';
|
|
3
3
|
import { ISelectionWithStyle } from '../../basics/selection';
|
|
4
4
|
export interface ISelectionManagerSearchParam {
|
|
5
5
|
unitId: string;
|
|
@@ -58,7 +58,7 @@ export declare class WorkbookSelections extends Disposable {
|
|
|
58
58
|
readonly selectionMoveStart$: Observable<Nullable<ISelectionWithStyle[]>>;
|
|
59
59
|
private readonly _selectionMoving$;
|
|
60
60
|
readonly selectionMoving$: Observable<Nullable<ISelectionWithStyle[]>>;
|
|
61
|
-
|
|
61
|
+
readonly _selectionMoveEnd$: BehaviorSubject<ISelectionWithStyle[]>;
|
|
62
62
|
readonly selectionMoveEnd$: Observable<ISelectionWithStyle[]>;
|
|
63
63
|
private readonly _selectionSet$;
|
|
64
64
|
readonly selectionSet$: Observable<ISelectionWithStyle[]>;
|