@univerjs/sheets 0.2.11 → 0.2.13
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 +3 -3
- package/lib/es/index.js +199 -135
- package/lib/types/basics/__tests__/cell-custom.spec.d.ts +16 -0
- package/lib/types/basics/cell-custom.d.ts +12 -0
- package/lib/types/commands/commands/add-worksheet-merge.command.d.ts +2 -1
- package/lib/types/commands/mutations/set-range-values.mutation.d.ts +0 -4
- package/lib/types/commands/mutations/set-worksheet-col-width.mutation.d.ts +8 -2
- package/lib/types/commands/mutations/set-worksheet-row-height.mutation.d.ts +4 -4
- package/lib/types/controllers/__tests__/util.d.ts +8 -8
- package/lib/types/controllers/config.schema.d.ts +13 -0
- package/lib/types/index.d.ts +4 -2
- package/lib/types/model/range-protection-rule.model.d.ts +1 -0
- package/lib/types/services/__tests__/util.d.ts +8 -8
- package/lib/types/services/exclusive-range/exclusive-range-service.d.ts +60 -0
- package/lib/types/services/numfmt/type.d.ts +1 -1
- package/lib/types/services/permission/permission-point/range/edit.d.ts +1 -1
- package/lib/types/services/permission/worksheet-permission/worksheet-permission-rule.model.d.ts +1 -0
- package/lib/types/services/ref-range/__tests__/__testing__.d.ts +8 -8
- package/lib/types/services/ref-range/__tests__/ref-range.service.spec.d.ts +8 -8
- package/lib/types/services/selections/ref-selections.service.d.ts +1 -1
- package/lib/types/services/selections/selection-manager.service.d.ts +2 -2
- package/lib/types/services/sheet-interceptor/__tests__/create-core-test-bed.d.ts +8 -8
- package/lib/types/sheets-plugin.d.ts +5 -13
- package/lib/umd/index.js +3 -3
- package/package.json +14 -14
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ICellData, Nullable } from '@univerjs/core';
|
|
2
|
+
/**
|
|
3
|
+
* Update custom object by old and new value
|
|
4
|
+
* @param oldVal
|
|
5
|
+
* @param newVal
|
|
6
|
+
*/
|
|
7
|
+
export declare function handleCustom(oldVal: ICellData, newVal: ICellData): void;
|
|
8
|
+
/**
|
|
9
|
+
* Convert old custom normal key for storage
|
|
10
|
+
* @param style
|
|
11
|
+
*/
|
|
12
|
+
export declare function transformCustom(oldCustom: Nullable<Record<string, any>>, newCustom: Nullable<Record<string, any>>): Nullable<Record<string, any>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ICommand, IRange, Dimension } from '@univerjs/core';
|
|
1
|
+
import { ICommand, Injector, IRange, Dimension } from '@univerjs/core';
|
|
2
2
|
export interface IAddMergeCommandParams {
|
|
3
3
|
value?: Dimension.ROWS | Dimension.COLUMNS;
|
|
4
4
|
selections: IRange[];
|
|
@@ -9,3 +9,4 @@ export declare const AddWorksheetMergeCommand: ICommand;
|
|
|
9
9
|
export declare const AddWorksheetMergeAllCommand: ICommand;
|
|
10
10
|
export declare const AddWorksheetMergeVerticalCommand: ICommand;
|
|
11
11
|
export declare const AddWorksheetMergeHorizontalCommand: ICommand;
|
|
12
|
+
export declare function addMergeCellsUtil(injector: Injector, unitId: string, subUnitId: string, ranges: IRange[]): Promise<void>;
|
|
@@ -23,8 +23,4 @@ export interface ISetRangeValuesRangeMutationParams extends ISetRangeValuesMutat
|
|
|
23
23
|
* @returns {ISetRangeValuesMutationParams} undo mutation params
|
|
24
24
|
*/
|
|
25
25
|
export declare const SetRangeValuesUndoMutationFactory: (accessor: IAccessor, params: ISetRangeValuesMutationParams) => ISetRangeValuesMutationParams;
|
|
26
|
-
/**
|
|
27
|
-
* TODO@Dushusir: Excel can display numbers with up to about 15 digits of precision. When the user inputs more than 15 digits, interception is required, but there are unknown performance risks.
|
|
28
|
-
Intercept 15-digit number reference function truncateNumber
|
|
29
|
-
*/
|
|
30
26
|
export declare const SetRangeValuesMutation: IMutation<ISetRangeValuesMutationParams, boolean>;
|
|
@@ -1,9 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IMutation, IObjectArrayPrimitiveType, IRange, Nullable, Worksheet } from '@univerjs/core';
|
|
2
2
|
export interface ISetWorksheetColWidthMutationParams {
|
|
3
3
|
unitId: string;
|
|
4
4
|
subUnitId: string;
|
|
5
5
|
ranges: IRange[];
|
|
6
6
|
colWidth: number | IObjectArrayPrimitiveType<Nullable<number>>;
|
|
7
7
|
}
|
|
8
|
-
|
|
8
|
+
/**
|
|
9
|
+
* This factory is for generating undo mutations for command {@link DeltaColumnWidthCommand}.
|
|
10
|
+
*
|
|
11
|
+
* Note that this mutation may return multi mutations params if the column width is different
|
|
12
|
+
* for each column in the range.
|
|
13
|
+
*/
|
|
14
|
+
export declare const SetWorksheetColWidthMutationFactory: (params: ISetWorksheetColWidthMutationParams, worksheet: Worksheet) => ISetWorksheetColWidthMutationParams;
|
|
9
15
|
export declare const SetWorksheetColWidthMutation: IMutation<ISetWorksheetColWidthMutationParams>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BooleanNumber,
|
|
1
|
+
import { BooleanNumber, IMutation, IObjectArrayPrimitiveType, IRange, IRowAutoHeightInfo, Nullable, Worksheet } from '@univerjs/core';
|
|
2
2
|
export interface ISetWorksheetRowHeightMutationParams {
|
|
3
3
|
unitId: string;
|
|
4
4
|
subUnitId: string;
|
|
@@ -16,9 +16,9 @@ export interface ISetWorksheetRowAutoHeightMutationParams {
|
|
|
16
16
|
subUnitId: string;
|
|
17
17
|
rowsAutoHeightInfo: IRowAutoHeightInfo[];
|
|
18
18
|
}
|
|
19
|
-
export declare const SetWorksheetRowHeightMutationFactory: (
|
|
20
|
-
export declare const SetWorksheetRowIsAutoHeightMutationFactory: (
|
|
21
|
-
export declare const SetWorksheetRowAutoHeightMutationFactory: (
|
|
19
|
+
export declare const SetWorksheetRowHeightMutationFactory: (params: ISetWorksheetRowHeightMutationParams, worksheet: Worksheet) => ISetWorksheetRowHeightMutationParams;
|
|
20
|
+
export declare const SetWorksheetRowIsAutoHeightMutationFactory: (params: ISetWorksheetRowIsAutoHeightMutationParams, worksheet: Worksheet) => ISetWorksheetRowIsAutoHeightMutationParams;
|
|
21
|
+
export declare const SetWorksheetRowAutoHeightMutationFactory: (params: ISetWorksheetRowAutoHeightMutationParams, worksheet: Worksheet) => ISetWorksheetRowAutoHeightMutationParams;
|
|
22
22
|
export declare const SetWorksheetRowHeightMutation: IMutation<ISetWorksheetRowHeightMutationParams>;
|
|
23
23
|
export declare const SetWorksheetRowIsAutoHeightMutation: IMutation<ISetWorksheetRowIsAutoHeightMutationParams>;
|
|
24
24
|
export declare const SetWorksheetRowAutoHeightMutation: IMutation<ISetWorksheetRowAutoHeightMutationParams>;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { Dependency, IWorkbookData, Univer } from '@univerjs/core';
|
|
1
|
+
import { Dependency, IWorkbookData, Workbook, Univer } from '@univerjs/core';
|
|
2
2
|
export declare function createTestBase(workbookData?: IWorkbookData, dependencies?: Dependency[]): {
|
|
3
3
|
univer: Univer;
|
|
4
4
|
get: {
|
|
5
|
-
<T>(id: import('@
|
|
6
|
-
<T>(id: import('@
|
|
7
|
-
<T>(id: import('@
|
|
8
|
-
<T>(id: import('@
|
|
9
|
-
<T>(id: import('@
|
|
10
|
-
<T>(id: import('@
|
|
5
|
+
<T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, lookUp?: import('@wendellhu/redi').LookUp): T;
|
|
6
|
+
<T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantity: import("@wendellhu/redi").Quantity.MANY, lookUp?: import('@wendellhu/redi').LookUp): T[];
|
|
7
|
+
<T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantity: import("@wendellhu/redi").Quantity.OPTIONAL, lookUp?: import('@wendellhu/redi').LookUp): T | null;
|
|
8
|
+
<T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantity: import("@wendellhu/redi").Quantity.REQUIRED, lookUp?: import('@wendellhu/redi').LookUp): T;
|
|
9
|
+
<T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantity?: import('@wendellhu/redi').Quantity, lookUp?: import('@wendellhu/redi').LookUp): T[] | T | null;
|
|
10
|
+
<T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantityOrLookup?: import('@wendellhu/redi').Quantity | import('@wendellhu/redi').LookUp, lookUp?: import('@wendellhu/redi').LookUp): T[] | T | null;
|
|
11
11
|
};
|
|
12
|
-
sheet:
|
|
12
|
+
sheet: Workbook;
|
|
13
13
|
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { DependencyOverride } from '@univerjs/core';
|
|
2
|
+
export declare const PLUGIN_CONFIG_KEY = "sheets.config";
|
|
3
|
+
export declare const configSymbol: unique symbol;
|
|
4
|
+
export interface IUniverSheetsConfig {
|
|
5
|
+
notExecuteFormula?: boolean;
|
|
6
|
+
override?: DependencyOverride;
|
|
7
|
+
/**
|
|
8
|
+
* Only register the mutations related to the formula calculation. Especially useful for the
|
|
9
|
+
* web worker environment or server-side-calculation.
|
|
10
|
+
*/
|
|
11
|
+
onlyRegisterFormulaRelatedMutations?: true;
|
|
12
|
+
}
|
|
13
|
+
export declare const defaultPluginConfig: IUniverSheetsConfig;
|
package/lib/types/index.d.ts
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
export {
|
|
16
|
+
export { UniverSheetsPlugin } from './sheets-plugin';
|
|
17
17
|
export { COMMAND_LISTENER_SKELETON_CHANGE, COMMAND_LISTENER_VALUE_CHANGE } from './basics/const/command-listener-const';
|
|
18
18
|
export { type IAddWorksheetMergeMutationParams, type IDeleteRangeMutationParams, type IInsertColMutationParams, type IInsertRangeMutationParams, type IInsertRowMutationParams, type IInsertSheetMutationParams, type IRemoveColMutationParams, type IRemoveRowsMutationParams, type IRemoveSheetMutationParams, type IRemoveWorksheetMergeMutationParams, } from './basics/interfaces/mutation-interface';
|
|
19
19
|
export { convertPrimaryWithCoordToPrimary, convertSelectionDataToRange, getNormalSelectionStyle, type ISelectionStyle, type ISelectionWidgetConfig, type ISelectionWithCoordAndStyle, type ISelectionWithStyle, type ISheetRangeLocation, SELECTION_CONTROL_BORDER_BUFFER_COLOR, SELECTION_CONTROL_BORDER_BUFFER_WIDTH, transformCellDataToSelectionData, } from './basics/selection';
|
|
@@ -49,6 +49,7 @@ export { MergeCellController, MERGE_CELL_INTERCEPTOR_CHECK } from './controllers
|
|
|
49
49
|
export { AddMergeRedoSelectionsOperationFactory, AddMergeUndoSelectionsOperationFactory } from './commands/utils/handle-merge-operation';
|
|
50
50
|
export type { FormatType } from './services/numfmt/type';
|
|
51
51
|
export { expandToContinuousRange } from './basics/expand-range';
|
|
52
|
+
export { ExclusiveRangeService, IExclusiveRangeService } from './services/exclusive-range/exclusive-range-service';
|
|
52
53
|
export { defaultWorksheetPermissionPoint, getAllWorksheetPermissionPoint, getAllWorksheetPermissionPointByPointPanel } from './services/permission';
|
|
53
54
|
export type { IWorksheetProtectionRule } from './services/permission/type';
|
|
54
55
|
export { WorksheetProtectionRuleModel, WorksheetProtectionPointModel } from './services/permission/worksheet-permission';
|
|
@@ -67,7 +68,7 @@ export { RangeProtectionPermissionViewPoint } from './services/permission/permis
|
|
|
67
68
|
export { generateNullCellValue, generateNullCell } from './basics/utils';
|
|
68
69
|
export { copyRangeStyles } from './commands/commands/utils/selection-utils';
|
|
69
70
|
export { AddRangeProtectionCommand, type IAddRangeProtectionCommandParams } from './commands/commands/add-range-protection.command';
|
|
70
|
-
export { AddWorksheetMergeCommand, AddWorksheetMergeAllCommand, AddWorksheetMergeVerticalCommand, AddWorksheetMergeHorizontalCommand, } from './commands/commands/add-worksheet-merge.command';
|
|
71
|
+
export { AddWorksheetMergeCommand, AddWorksheetMergeAllCommand, AddWorksheetMergeVerticalCommand, AddWorksheetMergeHorizontalCommand, addMergeCellsUtil, } from './commands/commands/add-worksheet-merge.command';
|
|
71
72
|
export { ClearSelectionAllCommand } from './commands/commands/clear-selection-all.command';
|
|
72
73
|
export { ClearSelectionContentCommand } from './commands/commands/clear-selection-content.command';
|
|
73
74
|
export { ClearSelectionFormatCommand } from './commands/commands/clear-selection-format.command';
|
|
@@ -136,6 +137,7 @@ export { SetWorksheetHideMutation, type ISetWorksheetHideMutationParams } from '
|
|
|
136
137
|
export { SetWorksheetNameMutation, type ISetWorksheetNameMutationParams } from './commands/mutations/set-worksheet-name.mutation';
|
|
137
138
|
export { SetWorksheetOrderMutation, type ISetWorksheetOrderMutationParams } from './commands/mutations/set-worksheet-order.mutation';
|
|
138
139
|
export { SetWorksheetPermissionPointsMutation } from './commands/mutations/set-worksheet-permission-points.mutation';
|
|
140
|
+
export type { ISetWorksheetPermissionPointsMutationParams } from './commands/mutations/set-worksheet-permission-points.mutation';
|
|
139
141
|
export { SetWorksheetProtectionMutation } from './commands/mutations/set-worksheet-protection.mutation';
|
|
140
142
|
export { SetWorksheetRightToLeftMutation } from './commands/mutations/set-worksheet-right-to-left.mutation';
|
|
141
143
|
export { SetWorksheetRowHeightMutation, SetWorksheetRowIsAutoHeightMutation, SetWorksheetRowAutoHeightMutation, SetWorksheetRowAutoHeightMutationFactory, type ISetWorksheetRowHeightMutationParams, type ISetWorksheetRowIsAutoHeightMutationParams, type ISetWorksheetRowAutoHeightMutationParams, } from './commands/mutations/set-worksheet-row-height.mutation';
|
|
@@ -32,6 +32,7 @@ export declare class RangeProtectionRuleModel {
|
|
|
32
32
|
ruleRefresh(id: string): void;
|
|
33
33
|
private _rangeRuleInitStateChange;
|
|
34
34
|
rangeRuleInitStateChange$: import('rxjs').Observable<boolean>;
|
|
35
|
+
getRangeRuleInitState(): boolean;
|
|
35
36
|
changeRuleInitState(state: boolean): void;
|
|
36
37
|
addRule(unitId: string, subUnitId: string, rule: IRangeProtectionRule): void;
|
|
37
38
|
deleteRule(unitId: string, subUnitId: string, id: string): void;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { Dependency, IWorkbookData, Univer } from '@univerjs/core';
|
|
1
|
+
import { Dependency, IWorkbookData, Workbook, Univer } from '@univerjs/core';
|
|
2
2
|
export declare const TEST_WORKBOOK_DATA_DEMO: IWorkbookData;
|
|
3
3
|
export declare function createTestBase(workbookData?: IWorkbookData, dependencies?: Dependency[]): {
|
|
4
4
|
univer: Univer;
|
|
5
5
|
get: {
|
|
6
|
-
<T>(id: import('@
|
|
7
|
-
<T>(id: import('@
|
|
8
|
-
<T>(id: import('@
|
|
9
|
-
<T>(id: import('@
|
|
10
|
-
<T>(id: import('@
|
|
11
|
-
<T>(id: import('@
|
|
6
|
+
<T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, lookUp?: import('@wendellhu/redi').LookUp): T;
|
|
7
|
+
<T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantity: import("@wendellhu/redi").Quantity.MANY, lookUp?: import('@wendellhu/redi').LookUp): T[];
|
|
8
|
+
<T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantity: import("@wendellhu/redi").Quantity.OPTIONAL, lookUp?: import('@wendellhu/redi').LookUp): T | null;
|
|
9
|
+
<T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantity: import("@wendellhu/redi").Quantity.REQUIRED, lookUp?: import('@wendellhu/redi').LookUp): T;
|
|
10
|
+
<T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantity?: import('@wendellhu/redi').Quantity, lookUp?: import('@wendellhu/redi').LookUp): T[] | T | null;
|
|
11
|
+
<T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantityOrLookup?: import('@wendellhu/redi').Quantity | import('@wendellhu/redi').LookUp, lookUp?: import('@wendellhu/redi').LookUp): T[] | T | null;
|
|
12
12
|
};
|
|
13
|
-
sheet:
|
|
13
|
+
sheet: Workbook;
|
|
14
14
|
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { IRange, Disposable } from '@univerjs/core';
|
|
2
|
+
import { ISelectionWithStyle } from '../../basics/selection';
|
|
3
|
+
interface IFeatureRange {
|
|
4
|
+
groupId: string;
|
|
5
|
+
range: IRange;
|
|
6
|
+
}
|
|
7
|
+
export interface IExclusiveRangeService {
|
|
8
|
+
/**
|
|
9
|
+
* @description Add an exclusive range to the service
|
|
10
|
+
* @param {string} unitId The unitId of the exclusive range
|
|
11
|
+
* @param {string} sheetId The sheetId of the exclusive range
|
|
12
|
+
* @param {string} feature The feature of the exclusive range
|
|
13
|
+
* @param {IFeatureRange} range The exclusive range
|
|
14
|
+
*/
|
|
15
|
+
addExclusiveRange(unitId: string, sheetId: string, feature: string, ranges: IFeatureRange[]): void;
|
|
16
|
+
/**
|
|
17
|
+
* @description Get the exclusive ranges
|
|
18
|
+
* @param {string} unitId The unitId of the exclusive range
|
|
19
|
+
* @param {string} sheetId The sheetId of the exclusive range
|
|
20
|
+
* @param {string} feature The feature of the exclusive range
|
|
21
|
+
* @returns {undefined | IFeatureRange[]} The exclusive ranges
|
|
22
|
+
*/
|
|
23
|
+
getExclusiveRanges(unitId: string, sheetId: string, feature: string): undefined | IFeatureRange[];
|
|
24
|
+
/**
|
|
25
|
+
* @description Clear the exclusive ranges
|
|
26
|
+
* @param {string} unitId The unitId of the exclusive range
|
|
27
|
+
* @param {string} sheetId The sheetId of the exclusive range
|
|
28
|
+
* @param {string} feature The feature of the exclusive range
|
|
29
|
+
*/
|
|
30
|
+
clearExclusiveRanges(unitId: string, sheetId: string, feature: string): void;
|
|
31
|
+
/**
|
|
32
|
+
* @description Clear the exclusive ranges by groupId
|
|
33
|
+
* @param {string} unitId The unitId of the exclusive range
|
|
34
|
+
* @param {string} sheetId The sheetId of the exclusive range
|
|
35
|
+
* @param {string} feature The feature of the exclusive range
|
|
36
|
+
* @param {string} groupId The groupId of the exclusive range
|
|
37
|
+
*/
|
|
38
|
+
clearExclusiveRangesByGroupId(unitId: string, sheetId: string, feature: string, groupId: string): void;
|
|
39
|
+
/**
|
|
40
|
+
* Check the interest group id of the giving selection
|
|
41
|
+
* @param {ISelectionWithStyle[]} selections The selections to check
|
|
42
|
+
*/
|
|
43
|
+
getInterestGroupId(selections: ISelectionWithStyle[]): string[];
|
|
44
|
+
}
|
|
45
|
+
export declare const IExclusiveRangeService: import('@wendellhu/redi').IdentifierDecorator<IExclusiveRangeService>;
|
|
46
|
+
export declare class ExclusiveRangeService extends Disposable implements IExclusiveRangeService {
|
|
47
|
+
/**
|
|
48
|
+
* Exclusive range data structure is as follows: unitId -> sheetId -> feature -> range
|
|
49
|
+
*/
|
|
50
|
+
private _exclusiveRanges;
|
|
51
|
+
private _ensureUnitMap;
|
|
52
|
+
private _ensureSubunitMap;
|
|
53
|
+
private _ensureFeature;
|
|
54
|
+
addExclusiveRange(unitId: string, sheetId: string, feature: string, ranges: IFeatureRange[]): void;
|
|
55
|
+
getExclusiveRanges(unitId: string, sheetId: string, feature: string): undefined | IFeatureRange[];
|
|
56
|
+
clearExclusiveRanges(unitId: string, sheetId: string, feature: string): void;
|
|
57
|
+
clearExclusiveRangesByGroupId(unitId: string, sheetId: string, feature: string, groupId: string): void;
|
|
58
|
+
getInterestGroupId(selections: ISelectionWithStyle[]): string[];
|
|
59
|
+
}
|
|
60
|
+
export {};
|
|
@@ -18,4 +18,4 @@ export interface INumfmtService {
|
|
|
18
18
|
}>): void;
|
|
19
19
|
deleteValues(unitId: string, subUnitId: string, values: IRange[]): void;
|
|
20
20
|
}
|
|
21
|
-
export declare const INumfmtService: import('@
|
|
21
|
+
export declare const INumfmtService: import('@wendellhu/redi').IdentifierDecorator<INumfmtService>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PermissionStatus, IPermissionPoint } from '@univerjs/core';
|
|
2
2
|
import { UnitAction, UnitObject } from '@univerjs/protocol';
|
|
3
3
|
export declare class RangeProtectionPermissionEditPoint implements IPermissionPoint {
|
|
4
4
|
type: UnitObject;
|
package/lib/types/services/permission/worksheet-permission/worksheet-permission-rule.model.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ export declare class WorksheetProtectionRuleModel {
|
|
|
21
21
|
private _worksheetRuleInitStateChange;
|
|
22
22
|
worksheetRuleInitStateChange$: import('rxjs').Observable<boolean>;
|
|
23
23
|
changeRuleInitState(state: boolean): void;
|
|
24
|
+
getSheetRuleInitState(): boolean;
|
|
24
25
|
addRule(unitId: string, rule: IWorksheetProtectionRule): void;
|
|
25
26
|
deleteRule(unitId: string, subUnitId: string): void;
|
|
26
27
|
setRule(unitId: string, subUnitId: string, rule: IWorksheetProtectionRule): void;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { Dependency, IWorkbookData, Univer } from '@univerjs/core';
|
|
1
|
+
import { Dependency, IWorkbookData, Workbook, Univer } from '@univerjs/core';
|
|
2
2
|
export declare const TEST_WORKBOOK_DATA_DEMO: IWorkbookData;
|
|
3
3
|
export declare function createTestBase(workbookData?: IWorkbookData, dependencies?: Dependency[]): {
|
|
4
4
|
univer: Univer;
|
|
5
5
|
get: {
|
|
6
|
-
<T>(id: import('@
|
|
7
|
-
<T>(id: import('@
|
|
8
|
-
<T>(id: import('@
|
|
9
|
-
<T>(id: import('@
|
|
10
|
-
<T>(id: import('@
|
|
11
|
-
<T>(id: import('@
|
|
6
|
+
<T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, lookUp?: import('@wendellhu/redi').LookUp): T;
|
|
7
|
+
<T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantity: import("@wendellhu/redi").Quantity.MANY, lookUp?: import('@wendellhu/redi').LookUp): T[];
|
|
8
|
+
<T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantity: import("@wendellhu/redi").Quantity.OPTIONAL, lookUp?: import('@wendellhu/redi').LookUp): T | null;
|
|
9
|
+
<T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantity: import("@wendellhu/redi").Quantity.REQUIRED, lookUp?: import('@wendellhu/redi').LookUp): T;
|
|
10
|
+
<T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantity?: import('@wendellhu/redi').Quantity, lookUp?: import('@wendellhu/redi').LookUp): T[] | T | null;
|
|
11
|
+
<T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantityOrLookup?: import('@wendellhu/redi').Quantity | import('@wendellhu/redi').LookUp, lookUp?: import('@wendellhu/redi').LookUp): T[] | T | null;
|
|
12
12
|
};
|
|
13
|
-
sheet:
|
|
13
|
+
sheet: Workbook;
|
|
14
14
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { Univer } from '@univerjs/core';
|
|
1
|
+
import { Workbook, Univer } from '@univerjs/core';
|
|
2
2
|
export declare function createRefRangeTestBed(): {
|
|
3
3
|
univer: Univer;
|
|
4
4
|
get: {
|
|
5
|
-
<T>(id: import('@
|
|
6
|
-
<T>(id: import('@
|
|
7
|
-
<T>(id: import('@
|
|
8
|
-
<T>(id: import('@
|
|
9
|
-
<T>(id: import('@
|
|
10
|
-
<T>(id: import('@
|
|
5
|
+
<T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, lookUp?: import('@wendellhu/redi').LookUp): T;
|
|
6
|
+
<T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantity: import("@wendellhu/redi").Quantity.MANY, lookUp?: import('@wendellhu/redi').LookUp): T[];
|
|
7
|
+
<T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantity: import("@wendellhu/redi").Quantity.OPTIONAL, lookUp?: import('@wendellhu/redi').LookUp): T | null;
|
|
8
|
+
<T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantity: import("@wendellhu/redi").Quantity.REQUIRED, lookUp?: import('@wendellhu/redi').LookUp): T;
|
|
9
|
+
<T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantity?: import('@wendellhu/redi').Quantity, lookUp?: import('@wendellhu/redi').LookUp): T[] | T | null;
|
|
10
|
+
<T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantityOrLookup?: import('@wendellhu/redi').Quantity | import('@wendellhu/redi').LookUp, lookUp?: import('@wendellhu/redi').LookUp): T[] | T | null;
|
|
11
11
|
};
|
|
12
|
-
sheet:
|
|
12
|
+
sheet: Workbook;
|
|
13
13
|
};
|
|
@@ -6,7 +6,7 @@ import { SheetsSelectionsService } from './selection-manager.service';
|
|
|
6
6
|
*
|
|
7
7
|
* Its data should be cleared by the caller quit editing formula and reconstructed when user starts editing.
|
|
8
8
|
*/
|
|
9
|
-
export declare const IRefSelectionsService: import('@
|
|
9
|
+
export declare const IRefSelectionsService: import('@wendellhu/redi').IdentifierDecorator<SheetsSelectionsService>;
|
|
10
10
|
/**
|
|
11
11
|
* RefSelectionsService treats `selectionMoveStart$` `selectionMoving$` and `selectionMoveEnd$` differently
|
|
12
12
|
* than `SheetsSelectionsService`. Because ref selections can be in different workbooks.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Disposable, IUniverInstanceService, RxDisposable, DeepReadonly, ISelectionCell, Nullable, Workbook } from '@univerjs/core';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { ISelectionWithStyle } from '../../basics/selection';
|
|
4
4
|
export interface ISelectionManagerSearchParam {
|
|
@@ -70,7 +70,7 @@ export declare class WorkbookSelections extends Disposable {
|
|
|
70
70
|
* @param selectionDatas
|
|
71
71
|
* @param type
|
|
72
72
|
*/
|
|
73
|
-
setSelections(sheetId: string, selectionDatas: ISelectionWithStyle[], type: SelectionMoveType): void;
|
|
73
|
+
setSelections(sheetId: string, selectionDatas: ISelectionWithStyle[] | undefined, type: SelectionMoveType): void;
|
|
74
74
|
getCurrentSelections(): Readonly<ISelectionWithStyle[]>;
|
|
75
75
|
getSelectionOfWorksheet(sheetId: string): ISelectionWithStyle[];
|
|
76
76
|
private _getCurrentSelections;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { Dependency, IWorkbookData, Univer } from '@univerjs/core';
|
|
1
|
+
import { Dependency, IWorkbookData, Workbook, Univer } from '@univerjs/core';
|
|
2
2
|
export declare function createSheetTestBed(workbookData?: IWorkbookData, dependencies?: Dependency[]): {
|
|
3
3
|
univer: Univer;
|
|
4
4
|
get: {
|
|
5
|
-
<T>(id: import('@
|
|
6
|
-
<T>(id: import('@
|
|
7
|
-
<T>(id: import('@
|
|
8
|
-
<T>(id: import('@
|
|
9
|
-
<T>(id: import('@
|
|
10
|
-
<T>(id: import('@
|
|
5
|
+
<T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, lookUp?: import('@wendellhu/redi').LookUp): T;
|
|
6
|
+
<T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantity: import("@wendellhu/redi").Quantity.MANY, lookUp?: import('@wendellhu/redi').LookUp): T[];
|
|
7
|
+
<T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantity: import("@wendellhu/redi").Quantity.OPTIONAL, lookUp?: import('@wendellhu/redi').LookUp): T | null;
|
|
8
|
+
<T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantity: import("@wendellhu/redi").Quantity.REQUIRED, lookUp?: import('@wendellhu/redi').LookUp): T;
|
|
9
|
+
<T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantity?: import('@wendellhu/redi').Quantity, lookUp?: import('@wendellhu/redi').LookUp): T[] | T | null;
|
|
10
|
+
<T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantityOrLookup?: import('@wendellhu/redi').Quantity | import('@wendellhu/redi').LookUp, lookUp?: import('@wendellhu/redi').LookUp): T[] | T | null;
|
|
11
11
|
};
|
|
12
|
-
sheet:
|
|
12
|
+
sheet: Workbook;
|
|
13
13
|
};
|
|
@@ -1,20 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
notExecuteFormula?: boolean;
|
|
4
|
-
override?: DependencyOverride;
|
|
5
|
-
/**
|
|
6
|
-
* Only register the mutations related to the formula calculation. Especially useful for the
|
|
7
|
-
* web worker environment or server-side-calculation.
|
|
8
|
-
*/
|
|
9
|
-
onlyRegisterFormulaRelatedMutations?: true;
|
|
10
|
-
}
|
|
1
|
+
import { IConfigService, Injector, Plugin, UniverInstanceType } from '@univerjs/core';
|
|
2
|
+
import { IUniverSheetsConfig } from './controllers/config.schema';
|
|
11
3
|
export declare class UniverSheetsPlugin extends Plugin {
|
|
12
|
-
private _config;
|
|
13
|
-
private readonly _configService;
|
|
4
|
+
private readonly _config;
|
|
14
5
|
readonly _injector: Injector;
|
|
6
|
+
private readonly _configService;
|
|
15
7
|
static pluginName: string;
|
|
16
8
|
static type: UniverInstanceType;
|
|
17
|
-
constructor(_config: IUniverSheetsConfig | undefined,
|
|
9
|
+
constructor(_config: Partial<IUniverSheetsConfig> | undefined, _injector: Injector, _configService: IConfigService);
|
|
18
10
|
onRendered(): void;
|
|
19
11
|
private _initConfig;
|
|
20
12
|
private _initDependencies;
|