@univerjs/sheets 0.4.1 → 0.4.2-nightly.202410301606
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/add-worksheet-merge.command-0cuLfO_2.mjs +5939 -0
- package/lib/es/facade.js +1818 -0
- package/lib/es/index.js +1800 -7245
- package/lib/locale/en-US.js +17 -0
- package/lib/locale/fa-IR.js +17 -0
- package/lib/locale/ru-RU.js +17 -0
- package/lib/locale/vi-VN.js +17 -0
- package/lib/locale/zh-CN.js +17 -0
- package/lib/locale/zh-TW.js +17 -0
- package/lib/types/basics/row-column-value.d.ts +14 -0
- package/lib/types/commands/commands/__tests__/set-col-data.command.spec.d.ts +16 -0
- package/lib/types/commands/commands/__tests__/set-row-data.command.spec.d.ts +16 -0
- package/lib/types/commands/commands/__tests__/set-worksheet-default-style.command.spec.d.ts +16 -0
- package/lib/types/commands/commands/set-col-data.command.d.ts +7 -0
- package/lib/types/commands/commands/set-frozen.command.d.ts +13 -0
- package/lib/types/commands/commands/set-row-data.command.d.ts +7 -0
- package/lib/types/commands/commands/set-style.command.d.ts +1 -1
- package/lib/types/commands/commands/set-worksheet-col-width.command.d.ts +6 -0
- package/lib/types/commands/commands/set-worksheet-default-style.command.d.ts +2 -0
- package/lib/types/commands/commands/toggle-gridlines.command.d.ts +7 -0
- 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-col-data.mutation.d.ts +8 -0
- package/lib/types/commands/mutations/set-frozen.mutation.d.ts +8 -0
- package/lib/types/commands/mutations/set-row-data.mutation.d.ts +8 -0
- package/lib/types/commands/mutations/set-worksheet-col-width.mutation.d.ts +3 -0
- package/lib/types/commands/mutations/set-worksheet-default-style.mutation.d.ts +12 -0
- package/lib/types/commands/mutations/toggle-gridlines.mutation.d.ts +7 -0
- package/lib/types/controllers/config.schema.d.ts +4 -0
- package/lib/types/facade/__tests__/utils.spec.d.ts +16 -0
- package/lib/types/facade/f-permission.d.ts +106 -0
- package/lib/types/facade/f-range.d.ts +193 -0
- package/lib/types/facade/f-selection.d.ts +11 -0
- package/lib/types/facade/f-univer.d.ts +36 -0
- package/lib/types/facade/f-workbook.d.ts +105 -0
- package/lib/types/facade/f-worksheet.d.ts +408 -0
- package/lib/types/facade/index.d.ts +6 -0
- package/lib/types/facade/utils.d.ts +24 -0
- package/lib/types/index.d.ts +19 -7
- package/lib/types/model/range-protection.cache.d.ts +5 -2
- package/lib/types/services/border-style-manager.service.d.ts +2 -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/types/services/sheet-interceptor/sheet-interceptor.service.d.ts +38 -7
- package/lib/umd/facade.js +3 -0
- package/lib/umd/index.js +3 -3
- package/lib/umd/locale/en-US.js +1 -0
- package/lib/umd/locale/fa-IR.js +1 -0
- package/lib/umd/locale/ru-RU.js +1 -0
- package/lib/umd/locale/vi-VN.js +1 -0
- package/lib/umd/locale/zh-CN.js +1 -0
- package/lib/umd/locale/zh-TW.js +1 -0
- package/package.json +21 -18
- package/LICENSE +0 -176
- package/lib/cjs/index.js +0 -3
- package/lib/locale/en-US.json +0 -14
- package/lib/locale/fa-IR.json +0 -14
- package/lib/locale/ru-RU.json +0 -14
- package/lib/locale/vi-VN.json +0 -14
- package/lib/locale/zh-CN.json +0 -14
- package/lib/locale/zh-TW.json +0 -14
- package/lib/types/basics/cell-custom.d.ts +0 -12
- package/lib/types/commands/commands/set-frozen-cancel.command.d.ts +0 -2
- package/lib/types/commands/commands/set-hide-gridlines.command.d.ts +0 -7
- package/lib/types/commands/mutations/set-hide-gridlines.mutatiom.d.ts +0 -8
- /package/lib/types/basics/__tests__/{cell-custom.spec.d.ts → row-column-value.spec.d.ts} +0 -0
|
@@ -0,0 +1,408 @@
|
|
|
1
|
+
import { CustomData, ICellData, IDisposable, IFreeze, IObjectArrayPrimitiveType, IStyleData, Nullable, Workbook, Worksheet, FBase, ICommandService, Injector, ObjectMatrix } from '@univerjs/core';
|
|
2
|
+
import { FWorkbook } from './f-workbook';
|
|
3
|
+
import { SheetsSelectionsService } from '../services/selections/selection-manager.service';
|
|
4
|
+
import { FRange } from './f-range';
|
|
5
|
+
import { FSelection } from './f-selection';
|
|
6
|
+
export declare class FWorksheet extends FBase {
|
|
7
|
+
protected readonly _fWorkbook: FWorkbook;
|
|
8
|
+
protected readonly _workbook: Workbook;
|
|
9
|
+
protected readonly _worksheet: Worksheet;
|
|
10
|
+
protected readonly _injector: Injector;
|
|
11
|
+
protected readonly _selectionManagerService: SheetsSelectionsService;
|
|
12
|
+
protected readonly _commandService: ICommandService;
|
|
13
|
+
constructor(_fWorkbook: FWorkbook, _workbook: Workbook, _worksheet: Worksheet, _injector: Injector, _selectionManagerService: SheetsSelectionsService, _commandService: ICommandService);
|
|
14
|
+
/**
|
|
15
|
+
* Returns the injector
|
|
16
|
+
* @returns The injector
|
|
17
|
+
*/
|
|
18
|
+
getInject(): Injector;
|
|
19
|
+
/**
|
|
20
|
+
* Returns the workbook
|
|
21
|
+
* @returns The workbook
|
|
22
|
+
*/
|
|
23
|
+
getWorkbook(): Workbook;
|
|
24
|
+
/**
|
|
25
|
+
* Returns the worksheet id
|
|
26
|
+
* @returns The id of the worksheet
|
|
27
|
+
*/
|
|
28
|
+
getSheetId(): string;
|
|
29
|
+
/**
|
|
30
|
+
* Returns the worksheet name
|
|
31
|
+
* @returns The name of the worksheet
|
|
32
|
+
*/
|
|
33
|
+
getSheetName(): string;
|
|
34
|
+
getSelection(): FSelection | null;
|
|
35
|
+
/**
|
|
36
|
+
* Get the default style of the worksheet
|
|
37
|
+
* @returns Default style
|
|
38
|
+
*/
|
|
39
|
+
getDefaultStyle(): Nullable<IStyleData> | string;
|
|
40
|
+
/**
|
|
41
|
+
* Get the default style of the worksheet row
|
|
42
|
+
* @param {number} index The row index
|
|
43
|
+
* @param {boolean} [keepRaw] If true, return the raw style data maybe the style name or style data, otherwise return the data from row manager
|
|
44
|
+
* @returns {Nullable<IStyleData> | string} The default style of the worksheet row name or style data
|
|
45
|
+
*/
|
|
46
|
+
getRowDefaultStyle(index: number, keepRaw?: boolean): Nullable<IStyleData> | string;
|
|
47
|
+
/**
|
|
48
|
+
* Get the default style of the worksheet column
|
|
49
|
+
* @param {number} index The column index
|
|
50
|
+
* @param {boolean} [keepRaw] If true, return the raw style data maybe the style name or style data, otherwise return the data from col manager
|
|
51
|
+
* @returns {Nullable<IStyleData> | string} The default style of the worksheet column name or style data
|
|
52
|
+
*/
|
|
53
|
+
getColumnDefaultStyle(index: number, keepRaw?: boolean): Nullable<IStyleData> | string;
|
|
54
|
+
/**
|
|
55
|
+
* Set the default style of the worksheet
|
|
56
|
+
* @param style default style
|
|
57
|
+
* @returns this worksheet
|
|
58
|
+
*/
|
|
59
|
+
setDefaultStyle(style: string): Promise<FWorksheet>;
|
|
60
|
+
/**
|
|
61
|
+
* Set the default style of the worksheet row
|
|
62
|
+
* @param {number} index The row index
|
|
63
|
+
* @param {string | Nullable<IStyleData>} style The style name or style data
|
|
64
|
+
*/
|
|
65
|
+
setColumnDefaultStyle(index: number, style: string | Nullable<IStyleData>): Promise<FWorksheet>;
|
|
66
|
+
/**
|
|
67
|
+
* Set the default style of the worksheet column
|
|
68
|
+
* @param {number} index The column index
|
|
69
|
+
* @param {string | Nullable<IStyleData>} style The style name or style data
|
|
70
|
+
*/
|
|
71
|
+
setRowDefaultStyle(index: number, style: string | Nullable<IStyleData>): Promise<FWorksheet>;
|
|
72
|
+
/**
|
|
73
|
+
* Returns a Range object representing a single cell at the specified row and column.
|
|
74
|
+
* @param row The row index of the cell.
|
|
75
|
+
* @param column The column index of the cell.
|
|
76
|
+
* @returns A Range object representing the specified cell.
|
|
77
|
+
*/
|
|
78
|
+
getRange(row: number, column: number): FRange;
|
|
79
|
+
/**
|
|
80
|
+
* Returns a Range object representing a range starting at the specified row and column, with the specified number of rows.
|
|
81
|
+
* @param row The starting row index of the range.
|
|
82
|
+
* @param column The starting column index of the range.
|
|
83
|
+
* @param numRows The number of rows in the range.
|
|
84
|
+
* @returns A Range object representing the specified range.
|
|
85
|
+
*/
|
|
86
|
+
getRange(row: number, column: number, numRows: number): FRange;
|
|
87
|
+
/**
|
|
88
|
+
* Returns a Range object representing a range starting at the specified row and column, with the specified number of rows and columns.
|
|
89
|
+
* @param row The starting row index of the range.
|
|
90
|
+
* @param column The starting column index of the range.
|
|
91
|
+
* @param numRows The number of rows in the range.
|
|
92
|
+
* @param numColumns The number of columns in the range.
|
|
93
|
+
* @returns A Range object representing the specified range.
|
|
94
|
+
*/
|
|
95
|
+
getRange(row: number, column: number, numRows: number, numColumns: number): FRange;
|
|
96
|
+
/**
|
|
97
|
+
* Returns a Range object specified by A1 notation.
|
|
98
|
+
* @param a1Notation A string representing a range in A1 notation.
|
|
99
|
+
* @returns A Range object representing the specified range.
|
|
100
|
+
*/
|
|
101
|
+
getRange(a1Notation: string): FRange;
|
|
102
|
+
/**
|
|
103
|
+
* Returns the current number of columns in the sheet, regardless of content.
|
|
104
|
+
* @return The maximum columns count of the sheet
|
|
105
|
+
*/
|
|
106
|
+
getMaxColumns(): number;
|
|
107
|
+
/**
|
|
108
|
+
* Returns the current number of rows in the sheet, regardless of content.
|
|
109
|
+
* @return The maximum rows count of the sheet
|
|
110
|
+
*/
|
|
111
|
+
getMaxRows(): number;
|
|
112
|
+
/**
|
|
113
|
+
* Inserts a row after the given row position.
|
|
114
|
+
* @param afterPosition The row after which the new row should be added, starting at 0 for the first row.
|
|
115
|
+
* @returns This sheet, for chaining.
|
|
116
|
+
*/
|
|
117
|
+
insertRowAfter(afterPosition: number): Promise<FWorksheet>;
|
|
118
|
+
/**
|
|
119
|
+
* Inserts a row before the given row position.
|
|
120
|
+
* @param beforePosition The row before which the new row should be added, starting at 0 for the first row.
|
|
121
|
+
* @returns This sheet, for chaining.
|
|
122
|
+
*/
|
|
123
|
+
insertRowBefore(beforePosition: number): Promise<FWorksheet>;
|
|
124
|
+
/**
|
|
125
|
+
* Inserts one or more consecutive blank rows in a sheet starting at the specified location.
|
|
126
|
+
* @param rowIndex The index indicating where to insert a row, starting at 0 for the first row.
|
|
127
|
+
* @param numRows The number of rows to insert.
|
|
128
|
+
* @returns This sheet, for chaining.
|
|
129
|
+
*/
|
|
130
|
+
insertRows(rowIndex: number, numRows?: number): Promise<FWorksheet>;
|
|
131
|
+
/**
|
|
132
|
+
* Inserts a number of rows after the given row position.
|
|
133
|
+
* @param afterPosition The row after which the new rows should be added, starting at 0 for the first row.
|
|
134
|
+
* @param howMany The number of rows to insert.
|
|
135
|
+
* @returns This sheet, for chaining.
|
|
136
|
+
*/
|
|
137
|
+
insertRowsAfter(afterPosition: number, howMany: number): Promise<FWorksheet>;
|
|
138
|
+
/**
|
|
139
|
+
* Inserts a number of rows before the given row position.
|
|
140
|
+
* @param beforePosition The row before which the new rows should be added, starting at 0 for the first row.
|
|
141
|
+
* @param howMany The number of rows to insert.
|
|
142
|
+
* @returns This sheet, for chaining.
|
|
143
|
+
*/
|
|
144
|
+
insertRowsBefore(beforePosition: number, howMany: number): Promise<FWorksheet>;
|
|
145
|
+
/**
|
|
146
|
+
* Deletes the row at the given row position.
|
|
147
|
+
* @param rowPosition The position of the row, starting at 0 for the first row.
|
|
148
|
+
* @returns This sheet, for chaining.
|
|
149
|
+
*/
|
|
150
|
+
deleteRow(rowPosition: number): Promise<FWorksheet>;
|
|
151
|
+
/**
|
|
152
|
+
* Deletes a number of rows starting at the given row position.
|
|
153
|
+
* @param rowPosition The position of the first row to delete, starting at 0 for the first row.
|
|
154
|
+
* @param howMany The number of rows to delete.
|
|
155
|
+
* @returns This sheet, for chaining.
|
|
156
|
+
*/
|
|
157
|
+
deleteRows(rowPosition: number, howMany: number): Promise<FWorksheet>;
|
|
158
|
+
/**
|
|
159
|
+
* Moves the rows selected by the given range to the position indicated by the destinationIndex. The rowSpec itself does not have to exactly represent an entire row or group of rows to move—it selects all rows that the range spans.
|
|
160
|
+
* @param rowSpec A range spanning the rows that should be moved.
|
|
161
|
+
* @param destinationIndex The index that the rows should be moved to. Note that this index is based on the coordinates before the rows are moved. Existing data is shifted down to make room for the moved rows while the source rows are removed from the grid. Therefore, the data may end up at a different index than originally specified. Use 0-index for this method.
|
|
162
|
+
* @returns This sheet, for chaining.
|
|
163
|
+
*/
|
|
164
|
+
moveRows(rowSpec: FRange, destinationIndex: number): Promise<FWorksheet>;
|
|
165
|
+
/**
|
|
166
|
+
* Hides the rows in the given range.
|
|
167
|
+
* @param row The row range to hide.
|
|
168
|
+
* @returns This sheet, for chaining.
|
|
169
|
+
*/
|
|
170
|
+
hideRow(row: FRange): Promise<FWorksheet>;
|
|
171
|
+
/**
|
|
172
|
+
* Hides one or more consecutive rows starting at the given index. Use 0-index for this method.
|
|
173
|
+
* @param rowIndex The starting index of the rows to hide.
|
|
174
|
+
* @param numRows The number of rows to hide.
|
|
175
|
+
* @returns This sheet, for chaining.
|
|
176
|
+
*/
|
|
177
|
+
hideRows(rowIndex: number, numRows?: number): Promise<FWorksheet>;
|
|
178
|
+
/**
|
|
179
|
+
* Unhides the row in the given range.
|
|
180
|
+
* @param row The range to unhide, if hidden.
|
|
181
|
+
* @returns This sheet, for chaining.
|
|
182
|
+
*/
|
|
183
|
+
unhideRow(row: FRange): Promise<FWorksheet>;
|
|
184
|
+
/**
|
|
185
|
+
* Unhides one or more consecutive rows starting at the given index. Use 0-index for this method.
|
|
186
|
+
* @param rowIndex The starting index of the rows to unhide.
|
|
187
|
+
* @param numRows The number of rows to unhide.
|
|
188
|
+
* @returns This sheet, for chaining.
|
|
189
|
+
*/
|
|
190
|
+
showRows(rowIndex: number, numRows?: number): Promise<FWorksheet>;
|
|
191
|
+
/**
|
|
192
|
+
* Sets the row height of the given row in pixels. By default, rows grow to fit cell contents. If you want to force rows to a specified height, use setRowHeightsForced(startRow, numRows, height).
|
|
193
|
+
* @param rowPosition The row position to change.
|
|
194
|
+
* @param height The height in pixels to set it to.
|
|
195
|
+
* @returns This sheet, for chaining.
|
|
196
|
+
*/
|
|
197
|
+
setRowHeight(rowPosition: number, height: number): Promise<FWorksheet>;
|
|
198
|
+
/**
|
|
199
|
+
* Sets the height of the given rows in pixels. By default, rows grow to fit cell contents. If you want to force rows to a specified height, use setRowHeightsForced(startRow, numRows, height).
|
|
200
|
+
* @param startRow The starting row position to change.
|
|
201
|
+
* @param numRows The number of rows to change.
|
|
202
|
+
* @param height The height in pixels to set it to.
|
|
203
|
+
* @returns This sheet, for chaining.
|
|
204
|
+
*/
|
|
205
|
+
setRowHeights(startRow: number, numRows: number, height: number): Promise<FWorksheet>;
|
|
206
|
+
/**
|
|
207
|
+
* Sets the height of the given rows in pixels. By default, rows grow to fit cell contents. When you use setRowHeightsForced, rows are forced to the specified height even if the cell contents are taller than the row height.
|
|
208
|
+
* @param startRow The starting row position to change.
|
|
209
|
+
* @param numRows The number of rows to change.
|
|
210
|
+
* @param height The height in pixels to set it to.
|
|
211
|
+
* @returns This sheet, for chaining.
|
|
212
|
+
*/
|
|
213
|
+
setRowHeightsForced(startRow: number, numRows: number, height: number): Promise<FWorksheet>;
|
|
214
|
+
/**
|
|
215
|
+
* Set custom properties for given rows.
|
|
216
|
+
* @param custom The custom properties to set.
|
|
217
|
+
* @returns This sheet, for chaining.
|
|
218
|
+
*/
|
|
219
|
+
setRowCustom(custom: IObjectArrayPrimitiveType<CustomData>): Promise<FWorksheet>;
|
|
220
|
+
/**
|
|
221
|
+
* Inserts a column after the given column position.
|
|
222
|
+
* @param afterPosition The column after which the new column should be added, starting at 0 for the first column.
|
|
223
|
+
* @returns This sheet, for chaining.
|
|
224
|
+
*/
|
|
225
|
+
insertColumnAfter(afterPosition: number): Promise<FWorksheet>;
|
|
226
|
+
/**
|
|
227
|
+
* Inserts a column before the given column position.
|
|
228
|
+
* @param beforePosition The column before which the new column should be added, starting at 0 for the first column.
|
|
229
|
+
* @returns This sheet, for chaining.
|
|
230
|
+
*/
|
|
231
|
+
insertColumnBefore(beforePosition: number): Promise<FWorksheet>;
|
|
232
|
+
/**
|
|
233
|
+
* Inserts one or more consecutive blank columns in a sheet starting at the specified location.
|
|
234
|
+
* @param columnIndex The index indicating where to insert a column, starting at 0 for the first column.
|
|
235
|
+
* @param numColumns The number of columns to insert.
|
|
236
|
+
* @returns This sheet, for chaining.
|
|
237
|
+
*/
|
|
238
|
+
insertColumns(columnIndex: number, numColumns?: number): Promise<FWorksheet>;
|
|
239
|
+
/**
|
|
240
|
+
* Inserts a given number of columns after the given column position.
|
|
241
|
+
* @param afterPosition The column after which the new column should be added, starting at 0 for the first column.
|
|
242
|
+
* @param howMany The number of columns to insert.
|
|
243
|
+
* @returns This sheet, for chaining.
|
|
244
|
+
*/
|
|
245
|
+
insertColumnsAfter(afterPosition: number, howMany: number): Promise<FWorksheet>;
|
|
246
|
+
/**
|
|
247
|
+
* Inserts a number of columns before the given column position.
|
|
248
|
+
* @param beforePosition The column before which the new column should be added, starting at 0 for the first column.
|
|
249
|
+
* @param howMany The number of columns to insert.
|
|
250
|
+
* @returns This sheet, for chaining.
|
|
251
|
+
*/
|
|
252
|
+
insertColumnsBefore(beforePosition: number, howMany: number): Promise<FWorksheet>;
|
|
253
|
+
/**
|
|
254
|
+
* Deletes the column at the given column position.
|
|
255
|
+
* @param columnPosition The position of the column, starting at 0 for the first column.
|
|
256
|
+
* @returns This sheet, for chaining.
|
|
257
|
+
*/
|
|
258
|
+
deleteColumn(columnPosition: number): Promise<FWorksheet>;
|
|
259
|
+
/**
|
|
260
|
+
* Deletes a number of columns starting at the given column position.
|
|
261
|
+
* @param columnPosition The position of the first column to delete, starting at 0 for the first column.
|
|
262
|
+
* @param howMany The number of columns to delete.
|
|
263
|
+
* @returns This sheet, for chaining.
|
|
264
|
+
*/
|
|
265
|
+
deleteColumns(columnPosition: number, howMany: number): Promise<FWorksheet>;
|
|
266
|
+
/**
|
|
267
|
+
* Moves the columns selected by the given range to the position indicated by the destinationIndex. The columnSpec itself does not have to exactly represent an entire column or group of columns to move—it selects all columns that the range spans.
|
|
268
|
+
* @param columnSpec A range spanning the columns that should be moved.
|
|
269
|
+
* @param destinationIndex The index that the columns should be moved to. Note that this index is based on the coordinates before the columns are moved. Existing data is shifted right to make room for the moved columns while the source columns are removed from the grid. Therefore, the data may end up at a different index than originally specified. Use 0-index for this method.
|
|
270
|
+
* @returns This sheet, for chaining.
|
|
271
|
+
*/
|
|
272
|
+
moveColumns(columnSpec: FRange, destinationIndex: number): Promise<FWorksheet>;
|
|
273
|
+
/**
|
|
274
|
+
* Hides the column or columns in the given range.
|
|
275
|
+
* @param column The column range to hide.
|
|
276
|
+
* @returns This sheet, for chaining.
|
|
277
|
+
*/
|
|
278
|
+
hideColumn(column: FRange): Promise<FWorksheet>;
|
|
279
|
+
/**
|
|
280
|
+
* Hides one or more consecutive columns starting at the given index. Use 0-index for this method.
|
|
281
|
+
* @param columnIndex The starting index of the columns to hide.
|
|
282
|
+
* @param numColumns The number of columns to hide.
|
|
283
|
+
* @returns This sheet, for chaining.
|
|
284
|
+
*/
|
|
285
|
+
hideColumns(columnIndex: number, numColumns?: number): Promise<FWorksheet>;
|
|
286
|
+
/**
|
|
287
|
+
* Unhides the column in the given range.
|
|
288
|
+
* @param column The range to unhide, if hidden.
|
|
289
|
+
* @returns This sheet, for chaining.
|
|
290
|
+
*/
|
|
291
|
+
unhideColumn(column: FRange): Promise<FWorksheet>;
|
|
292
|
+
/**
|
|
293
|
+
* Unhides one or more consecutive columns starting at the given index. Use 0-index for this method.
|
|
294
|
+
* @param columnIndex The starting index of the columns to unhide.
|
|
295
|
+
* @param numColumns The number of columns to unhide.
|
|
296
|
+
* @returns This sheet, for chaining.
|
|
297
|
+
*/
|
|
298
|
+
showColumns(columnIndex: number, numColumns?: number): Promise<FWorksheet>;
|
|
299
|
+
/**
|
|
300
|
+
* Sets the width of the given column in pixels.
|
|
301
|
+
* @param columnPosition The position of the given column to set.
|
|
302
|
+
* @param width The width in pixels to set it to.
|
|
303
|
+
* @returns This sheet, for chaining.
|
|
304
|
+
*/
|
|
305
|
+
setColumnWidth(columnPosition: number, width: number): Promise<FWorksheet>;
|
|
306
|
+
/**
|
|
307
|
+
* Sets the width of the given columns in pixels.
|
|
308
|
+
* @param startColumn The starting column position to change.
|
|
309
|
+
* @param numColumns The number of columns to change.
|
|
310
|
+
* @param width The width in pixels to set it to.
|
|
311
|
+
* @returns This sheet, for chaining.
|
|
312
|
+
*/
|
|
313
|
+
setColumnWidths(startColumn: number, numColumns: number, width: number): Promise<FWorksheet>;
|
|
314
|
+
/**
|
|
315
|
+
* Set custom properties for given columns.
|
|
316
|
+
* @param custom The custom properties to set.
|
|
317
|
+
* @returns This sheet, for chaining.
|
|
318
|
+
*/
|
|
319
|
+
setColumnCustom(custom: IObjectArrayPrimitiveType<CustomData>): Promise<FWorksheet>;
|
|
320
|
+
/**
|
|
321
|
+
* Get all merged cells in the current sheet
|
|
322
|
+
* @returns all merged cells
|
|
323
|
+
*/
|
|
324
|
+
getMergedRanges(): FRange[];
|
|
325
|
+
/**
|
|
326
|
+
* Get the merged cell data of the specified row and column.
|
|
327
|
+
* @param {number} row The row index.
|
|
328
|
+
* @param {number} column The column index.
|
|
329
|
+
* @returns {FRange|undefined} The merged cell data, or undefined if the cell is not merged.
|
|
330
|
+
*/
|
|
331
|
+
getCellMergeData(row: number, column: number): FRange | undefined;
|
|
332
|
+
/**
|
|
333
|
+
* Returns the selected range in the active sheet, or null if there is no active range.
|
|
334
|
+
* @returns the active range
|
|
335
|
+
*/
|
|
336
|
+
getActiveRange(): FRange | null;
|
|
337
|
+
/**
|
|
338
|
+
* Sets the active selection region for this sheet.
|
|
339
|
+
* @param range The range to set as the active selection.
|
|
340
|
+
*/
|
|
341
|
+
setActiveRange(range: FRange): void;
|
|
342
|
+
/**
|
|
343
|
+
* Sets the active selection region for this sheet.
|
|
344
|
+
* @param range The range to set as the active selection.
|
|
345
|
+
*/
|
|
346
|
+
setActiveSelection: (range: FRange) => void;
|
|
347
|
+
/**
|
|
348
|
+
* Sets the frozen state of the current sheet.
|
|
349
|
+
* @param freeze - The freeze object containing the parameters for freezing the sheet.
|
|
350
|
+
* @returns True if the command was successful, false otherwise.
|
|
351
|
+
*/
|
|
352
|
+
setFreeze(freeze: IFreeze): boolean;
|
|
353
|
+
/**
|
|
354
|
+
* Cancels the frozen state of the current sheet.
|
|
355
|
+
* @returns True if the command was successful, false otherwise.
|
|
356
|
+
*/
|
|
357
|
+
cancelFreeze(): boolean;
|
|
358
|
+
/**
|
|
359
|
+
* Get the freeze state of the current sheet.
|
|
360
|
+
* @returns The freeze state of the current sheet.
|
|
361
|
+
*/
|
|
362
|
+
getFreeze(): IFreeze;
|
|
363
|
+
/**
|
|
364
|
+
* Set the number of frozen columns.
|
|
365
|
+
* @param columns The number of columns to freeze.
|
|
366
|
+
* To unfreeze all columns, set this value to 0.
|
|
367
|
+
*/
|
|
368
|
+
setFrozenColumns(columns: number): void;
|
|
369
|
+
/**
|
|
370
|
+
* Set the number of frozen rows.
|
|
371
|
+
* @param rows The number of rows to freeze.
|
|
372
|
+
* To unfreeze all rows, set this value to 0.
|
|
373
|
+
*/
|
|
374
|
+
setFrozenRows(rows: number): void;
|
|
375
|
+
/**
|
|
376
|
+
* Get the number of frozen columns.
|
|
377
|
+
* @returns The number of frozen columns.
|
|
378
|
+
* Returns 0 if no columns are frozen.
|
|
379
|
+
*/
|
|
380
|
+
getFrozenColumns(): number;
|
|
381
|
+
/**
|
|
382
|
+
* Get the number of frozen rows.
|
|
383
|
+
* @returns The number of frozen rows.
|
|
384
|
+
* Returns 0 if no rows are frozen.
|
|
385
|
+
*/
|
|
386
|
+
getFrozenRows(): number;
|
|
387
|
+
/**
|
|
388
|
+
* Returns true if the sheet's gridlines are hidden; otherwise returns false. Gridlines are visible by default.
|
|
389
|
+
*/
|
|
390
|
+
hasHiddenGridLines(): boolean;
|
|
391
|
+
/**
|
|
392
|
+
* Hides or reveals the sheet gridlines.
|
|
393
|
+
* @param {boolean} hidden If `true`, hide gridlines in this sheet; otherwise show the gridlines.
|
|
394
|
+
*/
|
|
395
|
+
setHiddenGridlines(hidden: boolean): Promise<boolean>;
|
|
396
|
+
/**
|
|
397
|
+
* Subscribe to the cell data change event.
|
|
398
|
+
* @param callback - The callback function to be executed when the cell data changes.
|
|
399
|
+
* @returns - A disposable object to unsubscribe from the event.
|
|
400
|
+
*/
|
|
401
|
+
onCellDataChange(callback: (cellValue: ObjectMatrix<Nullable<ICellData>>) => void): IDisposable;
|
|
402
|
+
/**
|
|
403
|
+
* Subscribe to the cell data change event.
|
|
404
|
+
* @param callback - The callback function to be executed before the cell data changes.
|
|
405
|
+
* @returns - A disposable object to unsubscribe from the event.
|
|
406
|
+
*/
|
|
407
|
+
onBeforeCellDataChange(callback: (cellValue: ObjectMatrix<Nullable<ICellData>>) => void): IDisposable;
|
|
408
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { FPermission } from './f-permission';
|
|
2
|
+
export { FRange } from './f-range';
|
|
3
|
+
export type { FontLine, FontStyle, FontWeight } from './f-range';
|
|
4
|
+
export { FSelection } from './f-selection';
|
|
5
|
+
export { FWorkbook } from './f-workbook';
|
|
6
|
+
export { FWorksheet } from './f-worksheet';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { CellValue, ICellData, IObjectMatrixPrimitiveType, IRange, IRangeWithCoord, Worksheet, HorizontalAlign, VerticalAlign } from '@univerjs/core';
|
|
2
|
+
export type FHorizontalAlignment = 'left' | 'center' | 'normal';
|
|
3
|
+
export type FVerticalAlignment = 'top' | 'middle' | 'bottom';
|
|
4
|
+
export declare function transformFacadeHorizontalAlignment(value: FHorizontalAlignment): HorizontalAlign;
|
|
5
|
+
export declare function transformCoreHorizontalAlignment(value: HorizontalAlign): FHorizontalAlignment;
|
|
6
|
+
export declare function transformFacadeVerticalAlignment(value: FVerticalAlignment): VerticalAlign;
|
|
7
|
+
export declare function transformCoreVerticalAlignment(value: VerticalAlign): FVerticalAlignment;
|
|
8
|
+
/**
|
|
9
|
+
* covert cell value to cell data
|
|
10
|
+
* @param value
|
|
11
|
+
* @returns
|
|
12
|
+
*/
|
|
13
|
+
export declare function covertCellValue(value: CellValue | ICellData): ICellData;
|
|
14
|
+
/**
|
|
15
|
+
* covert cell value array or matrix to cell data
|
|
16
|
+
* @param value
|
|
17
|
+
* @param range
|
|
18
|
+
* @returns
|
|
19
|
+
*/
|
|
20
|
+
export declare function covertCellValues(value: CellValue[][] | IObjectMatrixPrimitiveType<CellValue> | ICellData[][] | IObjectMatrixPrimitiveType<ICellData>, range: IRange): IObjectMatrixPrimitiveType<ICellData>;
|
|
21
|
+
export declare function isCellMerged(mergeInfo: IRangeWithCoord, range: IRange): boolean;
|
|
22
|
+
export declare function isSingleCell(mergeInfo: IRangeWithCoord, range: IRange): boolean;
|
|
23
|
+
export declare function covertToRowRange(range: IRange, worksheet: Worksheet): IRange;
|
|
24
|
+
export declare function covertToColRange(range: IRange, worksheet: Worksheet): IRange;
|
package/lib/types/index.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export { COMMAND_LISTENER_SKELETON_CHANGE, COMMAND_LISTENER_VALUE_CHANGE } from
|
|
|
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';
|
|
20
20
|
export { createTopMatrixFromMatrix, createTopMatrixFromRanges, findAllRectangle, rangeMerge, RangeMergeUtil } from './basics/rangeMerge';
|
|
21
|
+
export { type IUniverSheetsConfig } from './controllers/config.schema';
|
|
21
22
|
export { MAX_CELL_PER_SHEET_KEY } from './controllers/config/config';
|
|
22
23
|
export { BorderStyleManagerService, type IBorderInfo } from './services/border-style-manager.service';
|
|
23
24
|
export * from './services/permission/permission-point';
|
|
@@ -35,7 +36,7 @@ export { EffectRefRangId, OperatorType } from './services/ref-range/type';
|
|
|
35
36
|
export { DefinedNameDataController } from './controllers/defined-name-data.controller';
|
|
36
37
|
export { handleBaseInsertRange, handleBaseMoveRowsCols, handleBaseRemoveRange, handleCommonDefaultRangeChangeWithEffectRefCommands, handleCommonRangeChangeWithEffectRefCommandsSkipNoInterests, handleDefaultRangeChangeWithEffectRefCommands, handleDefaultRangeChangeWithEffectRefCommandsSkipNoInterests, handleDeleteRangeMoveLeft, handleDeleteRangeMoveUp, handleInsertCol, handleInsertRangeMoveDown, handleInsertRangeMoveRight, handleInsertRow, handleIRemoveCol, handleIRemoveRow, handleMoveCols, handleMoveRange, handleMoveRows, rotateRange, runRefRangeMutations, } from './services/ref-range/util';
|
|
37
38
|
export { InterceptCellContentPriority, INTERCEPTOR_POINT } from './services/sheet-interceptor/interceptor-const';
|
|
38
|
-
export { SheetInterceptorService } from './services/sheet-interceptor/sheet-interceptor.service';
|
|
39
|
+
export { AFTER_CELL_EDIT, AFTER_CELL_EDIT_ASYNC, BEFORE_CELL_EDIT, SheetInterceptorService } from './services/sheet-interceptor/sheet-interceptor.service';
|
|
39
40
|
export type { ISheetLocation, ISheetLocationBase, ISheetRowLocation } from './services/sheet-interceptor/utils/interceptor';
|
|
40
41
|
export { MERGE_CELL_INTERCEPTOR_CHECK, MergeCellController } from './controllers/merge-cell.controller';
|
|
41
42
|
export { AddMergeRedoSelectionsOperationFactory, AddMergeUndoSelectionsOperationFactory } from './commands/utils/handle-merge-operation';
|
|
@@ -46,7 +47,7 @@ export { defaultWorksheetPermissionPoint, getAllWorksheetPermissionPoint, getAll
|
|
|
46
47
|
export type { IWorksheetProtectionRule } from './services/permission/type';
|
|
47
48
|
export { WorksheetProtectionPointModel, WorksheetProtectionRuleModel } from './services/permission/worksheet-permission';
|
|
48
49
|
export { defaultWorkbookPermissionPoints, getAllWorkbookPermissionPoint } from './services/permission/workbook-permission';
|
|
49
|
-
export { WorkbookCommentPermission, WorkbookCopyPermission, WorkbookCreateSheetPermission, WorkbookDeleteSheetPermission, WorkbookDuplicatePermission, WorkbookEditablePermission, WorkbookExportPermission, WorkbookHideSheetPermission, WorkbookHistoryPermission, WorkbookManageCollaboratorPermission, WorkbookMoveSheetPermission, WorkbookPrintPermission, WorkbookRecoverHistoryPermission, WorkbookRenameSheetPermission, WorkbookSharePermission, WorkbookViewHistoryPermission, WorkbookViewPermission, WorksheetCopyPermission, WorksheetDeleteColumnPermission, WorksheetDeleteRowPermission, WorksheetEditExtraObjectPermission, WorksheetEditPermission, WorksheetFilterPermission, WorksheetInsertColumnPermission, WorksheetInsertHyperlinkPermission, WorksheetInsertRowPermission, WorksheetManageCollaboratorPermission, WorksheetPivotTablePermission, WorksheetSelectProtectedCellsPermission, WorksheetSelectUnProtectedCellsPermission, WorksheetSetCellStylePermission, WorksheetSetCellValuePermission, WorksheetSetColumnStylePermission, WorksheetSetRowStylePermission, WorksheetSortPermission, WorksheetViewPermission, } from './services/permission/permission-point';
|
|
50
|
+
export { WorkbookCommentPermission, WorkbookCopyPermission, WorkbookCreateProtectPermission, WorkbookCreateSheetPermission, WorkbookDeleteSheetPermission, WorkbookDuplicatePermission, WorkbookEditablePermission, WorkbookExportPermission, WorkbookHideSheetPermission, WorkbookHistoryPermission, WorkbookManageCollaboratorPermission, WorkbookMoveSheetPermission, WorkbookPrintPermission, WorkbookRecoverHistoryPermission, WorkbookRenameSheetPermission, WorkbookSharePermission, WorkbookViewHistoryPermission, WorkbookViewPermission, WorksheetCopyPermission, WorksheetDeleteColumnPermission, WorksheetDeleteProtectionPermission, WorksheetDeleteRowPermission, WorksheetEditExtraObjectPermission, WorksheetEditPermission, WorksheetFilterPermission, WorksheetInsertColumnPermission, WorksheetInsertHyperlinkPermission, WorksheetInsertRowPermission, WorksheetManageCollaboratorPermission, WorksheetPivotTablePermission, WorksheetSelectProtectedCellsPermission, WorksheetSelectUnProtectedCellsPermission, WorksheetSetCellStylePermission, WorksheetSetCellValuePermission, WorksheetSetColumnStylePermission, WorksheetSetRowStylePermission, WorksheetSortPermission, WorksheetViewPermission, } from './services/permission/permission-point';
|
|
50
51
|
export { UnitAction, UnitObject } from '@univerjs/protocol';
|
|
51
52
|
export { checkRangesEditablePermission } from './services/permission/util';
|
|
52
53
|
export { type ICellPermission, RangeProtectionRenderModel } from './model/range-protection-render.model';
|
|
@@ -58,6 +59,9 @@ export { RangeProtectionService } from './services/permission/range-permission/r
|
|
|
58
59
|
export { getAllRangePermissionPoint, getDefaultRangePermission, type IRangePermissionPoint, } from './services/permission/range-permission/util';
|
|
59
60
|
export { RangeProtectionPermissionEditPoint } from './services/permission/permission-point/range/edit';
|
|
60
61
|
export { RangeProtectionPermissionViewPoint } from './services/permission/permission-point/range/view';
|
|
62
|
+
export { RangeProtectionPermissionManageCollaPoint } from './services/permission/permission-point/range/manage-collaborator';
|
|
63
|
+
export { RangeProtectionPermissionDeleteProtectionPoint } from './services/permission/permission-point/range/delete-protection';
|
|
64
|
+
export { baseProtectionActions } from './services/permission/range-permission/util';
|
|
61
65
|
export { generateNullCell, generateNullCellValue } from './basics/utils';
|
|
62
66
|
export { getSheetCommandTarget, getSheetCommandTargetWorkbook, getSheetMutationTarget } from './commands/commands/utils/target-util';
|
|
63
67
|
export { alignToMergedCellsBorders, getCellAtRowCol, isSingleCellSelection, setEndForRange } from './commands/commands/utils/selection-utils';
|
|
@@ -81,6 +85,12 @@ export { DeleteRangeProtectionCommand, type IDeleteRangeProtectionCommandParams
|
|
|
81
85
|
export { InsertDefinedNameCommand } from './commands/commands/insert-defined-name.command';
|
|
82
86
|
export { InsertRangeMoveDownCommand, type InsertRangeMoveDownCommandParams } from './commands/commands/insert-range-move-down.command';
|
|
83
87
|
export { InsertRangeMoveRightCommand, type InsertRangeMoveRightCommandParams } from './commands/commands/insert-range-move-right.command';
|
|
88
|
+
export { type ISetWorksheetDefaultStyleMutationParams, SetWorksheetDefaultStyleMutation, SetWorksheetDefaultStyleMutationFactory } from './commands/mutations/set-worksheet-default-style.mutation';
|
|
89
|
+
export { SetWorksheetDefaultStyleCommand } from './commands/commands/set-worksheet-default-style.command';
|
|
90
|
+
export { type ISetRowDataMutationParams, SetRowDataMutation, SetRowDataMutationFactory } from './commands/mutations/set-row-data.mutation';
|
|
91
|
+
export { type ISetRowDataCommandParams, SetRowDataCommand } from './commands/commands/set-row-data.command';
|
|
92
|
+
export { type ISetColDataMutationParams, SetColDataMutation, SetColDataMutationFactory } from './commands/mutations/set-col-data.mutation';
|
|
93
|
+
export { type ISetColDataCommandParams, SetColDataCommand } from './commands/commands/set-col-data.command';
|
|
84
94
|
export { type IInsertColCommandParams, type IInsertRowCommandParams, InsertColAfterCommand, InsertColBeforeCommand, InsertColCommand, InsertRowAfterCommand, InsertRowBeforeCommand, InsertRowCommand, } from './commands/commands/insert-row-col.command';
|
|
85
95
|
export { type IInsertSheetCommandParams, InsertSheetCommand } from './commands/commands/insert-sheet.command';
|
|
86
96
|
export { getMoveRangeUndoRedoMutations, type IMoveRangeCommandParams, MoveRangeCommand } from './commands/commands/move-range.command';
|
|
@@ -93,9 +103,9 @@ export { type IReorderRangeCommandParams, ReorderRangeCommand } from './commands
|
|
|
93
103
|
export { type ISetBorderBasicCommandParams, type ISetBorderColorCommandParams, type ISetBorderCommandParams, type ISetBorderPositionCommandParams, type ISetBorderStyleCommandParams, SetBorderBasicCommand, SetBorderColorCommand, SetBorderCommand, SetBorderPositionCommand, SetBorderStyleCommand, } from './commands/commands/set-border-command';
|
|
94
104
|
export { type ISetSpecificColsVisibleCommandParams, SetColHiddenCommand, SetSelectedColsVisibleCommand, SetSpecificColsVisibleCommand, } from './commands/commands/set-col-visible.command';
|
|
95
105
|
export { SetDefinedNameCommand } from './commands/commands/set-defined-name.command';
|
|
96
|
-
export {
|
|
97
|
-
export { SetFrozenCommand } from './commands/commands/set-frozen.command';
|
|
98
|
-
export {
|
|
106
|
+
export { type ICancelFrozenCommandParams, type ISetFrozenCommandParams } from './commands/commands/set-frozen.command';
|
|
107
|
+
export { CancelFrozenCommand, SetFrozenCommand } from './commands/commands/set-frozen.command';
|
|
108
|
+
export { type IToggleGridlinesCommandParams, ToggleGridlinesCommand } from './commands/commands/toggle-gridlines.command';
|
|
99
109
|
export { type ISetRangeProtectionCommandParams, SetRangeProtectionCommand } from './commands/commands/set-range-protection.command';
|
|
100
110
|
export { type ISetRangeValuesCommandParams, SetRangeValuesCommand } from './commands/commands/set-range-values.command';
|
|
101
111
|
export { type ISetSpecificRowsVisibleCommandParams, SetRowHiddenCommand, SetSelectedRowsVisibleCommand, SetSpecificRowsVisibleCommand, } from './commands/commands/set-row-visible.command';
|
|
@@ -115,8 +125,9 @@ export type { ISetWorksheetShowCommandParams } from './commands/commands/set-wor
|
|
|
115
125
|
export { AddRangeProtectionMutation, FactoryAddRangeProtectionMutation, type IAddRangeProtectionMutationParams } from './commands/mutations/add-range-protection.mutation';
|
|
116
126
|
export { AddMergeUndoMutationFactory, AddWorksheetMergeMutation } from './commands/mutations/add-worksheet-merge.mutation';
|
|
117
127
|
export { AddWorksheetProtectionMutation, type IAddWorksheetProtectionParams } from './commands/mutations/add-worksheet-protection.mutation';
|
|
118
|
-
export { DeleteRangeProtectionMutation, FactoryDeleteRangeProtectionMutation, type
|
|
128
|
+
export { DeleteRangeProtectionMutation, FactoryDeleteRangeProtectionMutation, type IDeleteRangeProtectionMutationParams } from './commands/mutations/delete-range-protection.mutation';
|
|
119
129
|
export { DeleteWorksheetProtectionMutation } from './commands/mutations/delete-worksheet-protection.mutation';
|
|
130
|
+
export type { IDeleteWorksheetProtectionParams } from './commands/mutations/delete-worksheet-protection.mutation';
|
|
120
131
|
export { EmptyMutation } from './commands/mutations/empty.mutation';
|
|
121
132
|
export { InsertColMutation, InsertColMutationUndoFactory, InsertRowMutation, InsertRowMutationUndoFactory, } from './commands/mutations/insert-row-col.mutation';
|
|
122
133
|
export { InsertSheetMutation, InsertSheetUndoMutationFactory } from './commands/mutations/insert-sheet.mutation';
|
|
@@ -129,7 +140,7 @@ export { RemoveMergeUndoMutationFactory, RemoveWorksheetMergeMutation } from './
|
|
|
129
140
|
export { type IReorderRangeMutationParams, ReorderRangeMutation, ReorderRangeUndoMutationFactory } from './commands/mutations/reorder-range.mutation';
|
|
130
141
|
export { type ISetColHiddenMutationParams, type ISetColVisibleMutationParams, SetColHiddenMutation, SetColVisibleMutation, } from './commands/mutations/set-col-visible.mutation';
|
|
131
142
|
export { type ISetFrozenMutationParams, SetFrozenMutation, SetFrozenMutationFactory, } from './commands/mutations/set-frozen.mutation';
|
|
132
|
-
export {
|
|
143
|
+
export { type IToggleGridlinesMutationParams, ToggleGridlinesMutation } from './commands/mutations/toggle-gridlines.mutation';
|
|
133
144
|
export { FactorySetRangeProtectionMutation, type ISetRangeProtectionMutationParams, SetRangeProtectionMutation } from './commands/mutations/set-range-protection.mutation';
|
|
134
145
|
export { type ISetRangeValuesMutationParams, type ISetRangeValuesRangeMutationParams, SetRangeValuesMutation, SetRangeValuesUndoMutationFactory, } from './commands/mutations/set-range-values.mutation';
|
|
135
146
|
export { type ISetRowHiddenMutationParams, type ISetRowVisibleMutationParams, SetRowHiddenMutation, SetRowVisibleMutation, } from './commands/mutations/set-row-visible.mutation';
|
|
@@ -142,6 +153,7 @@ export { type ISetWorksheetOrderMutationParams, SetWorksheetOrderMutation } from
|
|
|
142
153
|
export { SetWorksheetPermissionPointsMutation } from './commands/mutations/set-worksheet-permission-points.mutation';
|
|
143
154
|
export type { ISetWorksheetPermissionPointsMutationParams } from './commands/mutations/set-worksheet-permission-points.mutation';
|
|
144
155
|
export { SetWorksheetProtectionMutation } from './commands/mutations/set-worksheet-protection.mutation';
|
|
156
|
+
export type { ISetWorksheetProtectionParams } from './commands/mutations/set-worksheet-protection.mutation';
|
|
145
157
|
export { SetWorksheetRightToLeftMutation } from './commands/mutations/set-worksheet-right-to-left.mutation';
|
|
146
158
|
export { type ISetWorksheetRowAutoHeightMutationParams, type ISetWorksheetRowHeightMutationParams, type ISetWorksheetRowIsAutoHeightMutationParams, SetWorksheetRowAutoHeightMutation, SetWorksheetRowAutoHeightMutationFactory, SetWorksheetRowHeightMutation, SetWorksheetRowIsAutoHeightMutation, } from './commands/mutations/set-worksheet-row-height.mutation';
|
|
147
159
|
export { ScrollToCellOperation } from './commands/operations/scroll-to-cell.operation';
|
|
@@ -19,6 +19,7 @@ export declare class RangeProtectionCache extends Disposable {
|
|
|
19
19
|
private _ensureRowColInfoMap;
|
|
20
20
|
private _addCellRuleCache;
|
|
21
21
|
private _deleteCellRuleCache;
|
|
22
|
+
private _getSelectionActions;
|
|
22
23
|
reBuildCache(unitId: string, subUnitId: string): void;
|
|
23
24
|
getRowPermissionInfo(unitId: string, subUnitId: string, row: number, types: UnitAction[]): boolean;
|
|
24
25
|
getColPermissionInfo(unitId: string, subUnitId: string, col: number, types: UnitAction[]): boolean;
|
|
@@ -27,10 +28,12 @@ export declare class RangeProtectionCache extends Disposable {
|
|
|
27
28
|
ruleId?: string;
|
|
28
29
|
ranges?: IRange[];
|
|
29
30
|
}) | {
|
|
30
|
-
1: boolean;
|
|
31
|
-
0: boolean;
|
|
32
31
|
ruleId: string;
|
|
33
32
|
ranges: IRange[];
|
|
33
|
+
1: boolean;
|
|
34
|
+
0: boolean;
|
|
35
|
+
2: boolean;
|
|
36
|
+
42: boolean;
|
|
34
37
|
} | undefined;
|
|
35
38
|
deleteUnit(unitId: string): void;
|
|
36
39
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BorderStyleTypes, BorderType
|
|
1
|
+
import { IDisposable, BorderStyleTypes, BorderType } from '@univerjs/core';
|
|
2
2
|
export interface IBorderInfo {
|
|
3
3
|
type: BorderType;
|
|
4
4
|
color: string | undefined;
|
|
@@ -18,5 +18,5 @@ export declare class BorderStyleManagerService implements IDisposable {
|
|
|
18
18
|
setStyle(style: BorderStyleTypes): void;
|
|
19
19
|
setActiveBorderType(status: boolean): void;
|
|
20
20
|
getBorderInfo(): Readonly<IBorderInfo>;
|
|
21
|
-
private
|
|
21
|
+
private _refresh;
|
|
22
22
|
}
|
|
@@ -18,6 +18,7 @@ export { RangeProtectionPermissionViewPoint } from './range/view';
|
|
|
18
18
|
export { WorkbookCommentPermission } from './workbook/comment';
|
|
19
19
|
export { WorkbookCopyPermission } from './workbook/copy';
|
|
20
20
|
export { WorkbookCopySheetPermission } from './workbook/copy-sheet';
|
|
21
|
+
export { WorkbookCreateProtectPermission } from './workbook/create-permission';
|
|
21
22
|
export { WorkbookCreateSheetPermission } from './workbook/create-sheet';
|
|
22
23
|
export { WorkbookDeleteSheetPermission } from './workbook/delete-sheet';
|
|
23
24
|
export { WorkbookDuplicatePermission } from './workbook/duplicate';
|
|
@@ -35,6 +36,7 @@ export { WorkbookViewPermission } from './workbook/view';
|
|
|
35
36
|
export { WorkbookViewHistoryPermission } from './workbook/view-history';
|
|
36
37
|
export { WorksheetCopyPermission } from './worksheet/copy';
|
|
37
38
|
export { WorksheetDeleteColumnPermission } from './worksheet/delete-column';
|
|
39
|
+
export { WorksheetDeleteProtectionPermission } from './worksheet/delete-protection';
|
|
38
40
|
export { WorksheetDeleteRowPermission } from './worksheet/delete-row';
|
|
39
41
|
export { WorksheetEditPermission } from './worksheet/edit';
|
|
40
42
|
export { WorksheetEditExtraObjectPermission } from './worksheet/edit-extra-object';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IPermissionPoint, PermissionStatus } from '@univerjs/core';
|
|
2
|
+
import { UnitAction, UnitObject } from '@univerjs/protocol';
|
|
3
|
+
export declare class RangeProtectionPermissionDeleteProtectionPoint implements IPermissionPoint {
|
|
4
|
+
type: UnitObject;
|
|
5
|
+
subType: UnitAction;
|
|
6
|
+
status: PermissionStatus;
|
|
7
|
+
value: boolean;
|
|
8
|
+
id: string;
|
|
9
|
+
unitId: string;
|
|
10
|
+
subUnitId: string;
|
|
11
|
+
permissionId: string;
|
|
12
|
+
constructor(unitId: string, subUnitId: string, permissionId: string);
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IPermissionPoint, PermissionStatus } from '@univerjs/core';
|
|
2
|
+
import { UnitAction, UnitObject } from '@univerjs/protocol';
|
|
3
|
+
export declare class RangeProtectionPermissionManageCollaPoint implements IPermissionPoint {
|
|
4
|
+
type: UnitObject;
|
|
5
|
+
subType: UnitAction;
|
|
6
|
+
status: PermissionStatus;
|
|
7
|
+
value: boolean;
|
|
8
|
+
id: string;
|
|
9
|
+
unitId: string;
|
|
10
|
+
subUnitId: string;
|
|
11
|
+
permissionId: string;
|
|
12
|
+
constructor(unitId: string, subUnitId: string, permissionId: string);
|
|
13
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IPermissionPoint, PermissionStatus } from '@univerjs/core';
|
|
2
|
+
import { UnitAction, UnitObject } from '@univerjs/protocol';
|
|
3
|
+
export declare class WorkbookCreateProtectPermission implements IPermissionPoint {
|
|
4
|
+
unitId: string;
|
|
5
|
+
id: string;
|
|
6
|
+
value: boolean;
|
|
7
|
+
type: UnitObject;
|
|
8
|
+
status: PermissionStatus;
|
|
9
|
+
subType: UnitAction;
|
|
10
|
+
constructor(unitId: string);
|
|
11
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IPermissionPoint, PermissionStatus } from '@univerjs/core';
|
|
2
|
+
import { UnitAction, UnitObject } from '@univerjs/protocol';
|
|
3
|
+
export declare class WorksheetDeleteProtectionPermission implements IPermissionPoint {
|
|
4
|
+
unitId: string;
|
|
5
|
+
subUnitId: string;
|
|
6
|
+
value: boolean;
|
|
7
|
+
type: UnitObject;
|
|
8
|
+
status: PermissionStatus;
|
|
9
|
+
id: string;
|
|
10
|
+
subType: UnitAction;
|
|
11
|
+
constructor(unitId: string, subUnitId: string);
|
|
12
|
+
}
|