@univerjs/sheets 1.0.0-alpha.2 → 1.0.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/facade.js +16 -4
- package/lib/cjs/index.js +20 -6
- package/lib/cjs/locale/ca-ES.js +10 -10
- package/lib/es/facade.js +16 -4
- package/lib/es/index.js +22 -8
- package/lib/es/locale/ca-ES.js +10 -10
- package/lib/facade.js +16 -4
- package/lib/index.js +22 -8
- package/lib/locale/ca-ES.js +10 -10
- package/lib/types/facade/f-range.d.ts +2 -1
- package/lib/types/facade/f-types.d.ts +16 -0
- package/lib/types/facade/f-workbook.d.ts +1 -4
- package/lib/types/facade/index.d.ts +2 -1
- package/lib/types/facade/permission/f-range-permission.d.ts +2 -0
- package/lib/types/facade/permission/f-worksheet-permission.d.ts +2 -0
- package/lib/types/facade/permission/util.d.ts +11 -0
- package/lib/types/services/permission/range-permission/range-protection.service.d.ts +1 -0
- package/lib/types/services/permission/worksheet-permission/worksheet-permission.service.d.ts +1 -0
- package/lib/umd/index.js +1 -1
- package/lib/umd/locale/ca-ES.js +1 -1
- package/package.json +9 -9
|
@@ -81,6 +81,7 @@ export declare class FWorkbook extends FBaseInitialable {
|
|
|
81
81
|
/**
|
|
82
82
|
* Set the name of the workbook.
|
|
83
83
|
* @param {string} name The new name of the workbook.
|
|
84
|
+
* @returns {FWorkbook} The current FWorkbook instance for chaining.
|
|
84
85
|
* @example
|
|
85
86
|
* ```ts
|
|
86
87
|
* // The code below sets the name of the workbook
|
|
@@ -546,7 +547,6 @@ export declare class FWorkbook extends FBaseInitialable {
|
|
|
546
547
|
/**
|
|
547
548
|
* Insert a defined name by builder param.
|
|
548
549
|
* @param {ISetDefinedNameMutationParam} param The param to insert the defined name
|
|
549
|
-
* @returns {void}
|
|
550
550
|
* @example
|
|
551
551
|
* ```ts
|
|
552
552
|
* // The code below inserts a defined name by builder param
|
|
@@ -563,7 +563,6 @@ export declare class FWorkbook extends FBaseInitialable {
|
|
|
563
563
|
/**
|
|
564
564
|
* Update the defined name with the given name.
|
|
565
565
|
* @param {ISetDefinedNameMutationParam} param The param to insert the defined name
|
|
566
|
-
* @returns {void}
|
|
567
566
|
* @example
|
|
568
567
|
* ```ts
|
|
569
568
|
* // The code below updates the defined name with the given name
|
|
@@ -622,7 +621,6 @@ export declare class FWorkbook extends FBaseInitialable {
|
|
|
622
621
|
/**
|
|
623
622
|
* Register a custom range theme style.
|
|
624
623
|
* @param {RangeThemeStyle} rangeThemeStyle The range theme style to register
|
|
625
|
-
* @returns {void}
|
|
626
624
|
* @example
|
|
627
625
|
* ```ts
|
|
628
626
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
@@ -640,7 +638,6 @@ export declare class FWorkbook extends FBaseInitialable {
|
|
|
640
638
|
/**
|
|
641
639
|
* Unregister a custom range theme style.
|
|
642
640
|
* @param {string} themeName The name of the theme to unregister
|
|
643
|
-
* @returns {void}
|
|
644
641
|
* @example
|
|
645
642
|
* ```ts
|
|
646
643
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
@@ -19,7 +19,8 @@ export * from './f-enum';
|
|
|
19
19
|
export * from './f-event';
|
|
20
20
|
export { FRange } from './f-range';
|
|
21
21
|
export { FSelection } from './f-selection';
|
|
22
|
+
export type { FSheetEmbedUnitFacadeMapAugmentation } from './f-types';
|
|
23
|
+
export type * from './f-univer';
|
|
22
24
|
export { FWorkbook } from './f-workbook';
|
|
23
25
|
export { FWorksheet } from './f-worksheet';
|
|
24
26
|
export { FWorkbookPermission } from './permission/f-workbook-permission';
|
|
25
|
-
export type * from './f-univer';
|
|
@@ -86,6 +86,8 @@ export declare class FRangePermission extends FBase {
|
|
|
86
86
|
unprotect(): Promise<boolean>;
|
|
87
87
|
/**
|
|
88
88
|
* List all protection rules that intersect with the current range.
|
|
89
|
+
* @param {object} [options] Options for listing protection rules.
|
|
90
|
+
* @param {boolean} [options.ignoreCollaborators] Whether to skip fetching collaborators for performance.
|
|
89
91
|
* @returns {Promise<FRangeProtectionRule[]>} Array of protection rules.
|
|
90
92
|
* @example
|
|
91
93
|
* ```ts
|
|
@@ -303,6 +303,8 @@ export declare class FWorksheetPermission extends FBase {
|
|
|
303
303
|
unprotectRules(ruleIds: string[]): Promise<boolean>;
|
|
304
304
|
/**
|
|
305
305
|
* List all range protection rules for the worksheet.
|
|
306
|
+
* @param {object} [options] Options for listing range protection rules.
|
|
307
|
+
* @param {boolean} [options.ignoreCollaborators] Whether to skip fetching collaborators for performance.
|
|
306
308
|
* @returns {Promise<FRangeProtectionRule[]>} Array of protection rules.
|
|
307
309
|
* @example
|
|
308
310
|
* ```ts
|
|
@@ -28,10 +28,21 @@ export declare function determineScope(editState: EditStateEnum, viewState: View
|
|
|
28
28
|
/**
|
|
29
29
|
* Check if there are no range protection rules for the given unit and subunit when removing a range protection rule.
|
|
30
30
|
* If there are no rules left, also remove the associated worksheet protection and update the permission points accordingly.
|
|
31
|
+
* @param {Injector} injector The injector used to resolve permission services.
|
|
32
|
+
* @param {string} unitId The workbook unit id.
|
|
33
|
+
* @param {string} subUnitId The worksheet subunit id.
|
|
31
34
|
*/
|
|
32
35
|
export declare function handleWorksheetRangePermissionIsEmpty(injector: Injector, unitId: string, subUnitId: string): void;
|
|
33
36
|
/**
|
|
34
37
|
* Get the list of range protection rules for a specific worksheet or range, and convert them to FRangeProtectionRule instances.
|
|
38
|
+
* @param {Injector} injector The injector used to resolve permission services.
|
|
39
|
+
* @param {string} unitId The workbook unit id.
|
|
40
|
+
* @param {string} subUnitId The worksheet subunit id.
|
|
41
|
+
* @param {object} options Options for listing range protection rules.
|
|
42
|
+
* @param {FWorksheet} options.worksheet The worksheet facade used to convert ranges.
|
|
43
|
+
* @param {FRange} [options.specificRange] Optional range used to filter rules.
|
|
44
|
+
* @param {boolean} [options.ignoreCollaborators] Whether to skip fetching collaborators for performance.
|
|
45
|
+
* @returns {Promise<FRangeProtectionRule[]>} The range protection rules.
|
|
35
46
|
*/
|
|
36
47
|
export declare function getListRangeProtectionRules(injector: Injector, unitId: string, subUnitId: string, options: {
|
|
37
48
|
worksheet: FWorksheet;
|
|
@@ -25,4 +25,5 @@ export declare class RangeProtectionService extends Disposable {
|
|
|
25
25
|
constructor(_selectionProtectionRuleModel: RangeProtectionRuleModel, _permissionService: IPermissionService, _resourceManagerService: IResourceManagerService, _selectionProtectionCache: RangeProtectionCache, _univerInstanceService: IUniverInstanceService);
|
|
26
26
|
private _initRuleChange;
|
|
27
27
|
private _initSnapshot;
|
|
28
|
+
private _addOrUpdatePermissionPoint;
|
|
28
29
|
}
|