@univerjs/sheets 0.5.4 → 0.5.5-experimental.20250122-3362a4a

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.
Files changed (52) hide show
  1. package/lib/cjs/facade.js +1 -1
  2. package/lib/cjs/index.js +3 -3
  3. package/lib/cjs/locale/en-US.js +1 -1
  4. package/lib/cjs/locale/fa-IR.js +1 -1
  5. package/lib/cjs/locale/fr-FR.js +1 -1
  6. package/lib/cjs/locale/ru-RU.js +1 -1
  7. package/lib/cjs/locale/vi-VN.js +1 -1
  8. package/lib/cjs/locale/zh-CN.js +1 -1
  9. package/lib/cjs/locale/zh-TW.js +1 -1
  10. package/lib/es/facade.js +2465 -1429
  11. package/lib/es/index.js +9099 -8683
  12. package/lib/es/locale/en-US.js +2 -2
  13. package/lib/es/locale/fa-IR.js +2 -2
  14. package/lib/es/locale/fr-FR.js +2 -2
  15. package/lib/es/locale/ru-RU.js +2 -2
  16. package/lib/es/locale/vi-VN.js +2 -2
  17. package/lib/es/locale/zh-CN.js +2 -2
  18. package/lib/es/locale/zh-TW.js +2 -2
  19. package/lib/types/basics/const/command-listener-const.d.ts +149 -13
  20. package/lib/types/commands/commands/remove-sheet.command.d.ts +1 -1
  21. package/lib/types/commands/commands/split-text-to-columns.command.d.ts +1 -1
  22. package/lib/types/commands/operations/selection.operation.d.ts +1 -0
  23. package/lib/types/commands/utils/selection-command-util.d.ts +1 -1
  24. package/lib/types/controllers/config.schema.d.ts +4 -0
  25. package/lib/types/facade/f-defined-name.d.ts +6 -0
  26. package/lib/types/facade/f-enum.d.ts +21 -0
  27. package/lib/types/facade/f-event.d.ts +470 -21
  28. package/lib/types/facade/f-permission.d.ts +3 -0
  29. package/lib/types/facade/f-range.d.ts +366 -51
  30. package/lib/types/facade/f-selection.d.ts +25 -0
  31. package/lib/types/facade/f-sheet-hooks.d.ts +3 -0
  32. package/lib/types/facade/f-univer.d.ts +33 -0
  33. package/lib/types/facade/f-workbook.d.ts +49 -56
  34. package/lib/types/facade/f-worksheet.d.ts +653 -208
  35. package/lib/types/facade/index.d.ts +2 -0
  36. package/lib/types/index.d.ts +2 -1
  37. package/lib/types/model/range-theme-util.d.ts +3 -3
  38. package/lib/types/services/permission/range-permission/range-protection.ref-range.d.ts +1 -1
  39. package/lib/types/services/permission/range-permission/range-protection.service.d.ts +1 -1
  40. package/lib/types/services/selections/selection-data-model.d.ts +7 -7
  41. package/lib/types/services/selections/selection.service.d.ts +4 -0
  42. package/lib/umd/facade.js +1 -1
  43. package/lib/umd/index.js +3 -3
  44. package/lib/umd/locale/en-US.js +1 -1
  45. package/lib/umd/locale/fa-IR.js +1 -1
  46. package/lib/umd/locale/fr-FR.js +1 -1
  47. package/lib/umd/locale/ru-RU.js +1 -1
  48. package/lib/umd/locale/vi-VN.js +1 -1
  49. package/lib/umd/locale/zh-CN.js +1 -1
  50. package/lib/umd/locale/zh-TW.js +1 -1
  51. package/package.json +6 -6
  52. package/LICENSE +0 -176
@@ -1,16 +1,22 @@
1
1
  import { IEventBase, IWorkbookData, IWorksheetData, UniverInstanceType, FEventName } from '@univerjs/core';
2
+ import { CommandListenerValueChange } from '@univerjs/sheets';
3
+ import { FRange } from './f-range';
2
4
  import { FWorkbook } from './f-workbook';
3
5
  import { FWorksheet } from './f-worksheet';
6
+ /**
7
+ * Interface for sheet-related events
8
+ * Provides event names for sheet creation, workbook creation, and gridline changes
9
+ */
4
10
  export interface IFSheetEventMixin {
5
11
  /**
6
12
  * Event fired after a sheet is created
7
13
  * @see {@link ISheetCreatedEventParams}
8
14
  * @example
9
15
  * ```ts
10
- * univerAPI.addEvent(univerAPI.event.SheetCreated, (params) => {
11
- * const { workbook, worksheet } = params;
12
- * console.log('unit created', params);
13
- * });
16
+ univerAPI.addEvent(univerAPI.Event.SheetCreated, (params) => {
17
+ const { workbook, worksheet } = params;
18
+ console.log('sheet created', params);
19
+ });
14
20
  * ```
15
21
  */
16
22
  get SheetCreated(): 'SheetCreated';
@@ -19,21 +25,165 @@ export interface IFSheetEventMixin {
19
25
  * @see {@link IBeforeSheetCreateEventParams}
20
26
  * @example
21
27
  * ```ts
22
- * univerAPI.addEvent(univerAPI.event.BeforeSheetCreate, (params) => {
28
+ * univerAPI.addEvent(univerAPI.Event.BeforeSheetCreate, (params) => {
23
29
  * const { workbook, index, sheet } = params;
24
- * console.log('unit created', params);
30
+ * console.log('before sheet create', params);
25
31
  * });
26
32
  * ```
27
33
  */
28
34
  get BeforeSheetCreate(): 'BeforeSheetCreate';
35
+ /**
36
+ * Event fired before the active sheet changes
37
+ * @see {@link IActiveSheetChangedEvent}
38
+ * @example
39
+ * ```ts
40
+ * univerAPI.addEvent(univerAPI.Event.ActiveSheetChanged, (params) => {
41
+ * const { workbook, activeSheet, oldActiveSheet } = params;
42
+ * console.log('before active sheet changed', params);
43
+ * });
44
+ * ```
45
+ */
46
+ get BeforeActiveSheetChange(): 'BeforeActiveSheetChange';
47
+ /**
48
+ * Event fired after the active sheet changes
49
+ * @see {@link IActiveSheetChangedEvent}
50
+ * @example
51
+ * ```ts
52
+ * univerAPI.addEvent(univerAPI.Event.ActiveSheetChanged, (params) => {
53
+ * const { workbook, activeSheet } = params;
54
+ * console.log('after active sheet changed', params);
55
+ * });
56
+ * ```
57
+ */
58
+ get ActiveSheetChanged(): 'ActiveSheetChanged';
59
+ /**
60
+ * Event fired before a sheet is deleted
61
+ * @see {@link IBeforeSheetDeleteEvent}
62
+ * @example
63
+ * ```ts
64
+ * univerAPI.addEvent(univerAPI.Event.BeforeSheetDelete, (params) => {
65
+ * const { workbook, worksheetId } = params;
66
+ * console.log('before sheet delete', params);
67
+ * });
68
+ * ```
69
+ */
70
+ get SheetDeleted(): 'SheetDeleted';
71
+ /**
72
+ * Event fired before a sheet is deleted
73
+ * @see {@link IBeforeSheetDeleteEvent}
74
+ * @example
75
+ * ```ts
76
+ * univerAPI.addEvent(univerAPI.Event.BeforeSheetDelete, (params) => {
77
+ * const { workbook, worksheet } = params;
78
+ * console.log('before sheet delete', params);
79
+ * });
80
+ * ```
81
+ */
82
+ get BeforeSheetDelete(): 'BeforeSheetDelete';
83
+ /**
84
+ * Event fired after a sheet is moved
85
+ * @see {@link ISheetMovedEvent}
86
+ * @example
87
+ * ```ts
88
+ * univerAPI.addEvent(univerAPI.Event.SheetMoved, (params) => {
89
+ * const { workbook, worksheet, newIndex } = params;
90
+ * console.log('sheet moved', params);
91
+ * });
92
+ * ```
93
+ */
94
+ get SheetMoved(): 'SheetMoved';
95
+ /**
96
+ * Event fired before a sheet is moved
97
+ * @see {@link IBeforeSheetMoveEvent}
98
+ * @example
99
+ * ```ts
100
+ * univerAPI.addEvent(univerAPI.Event.BeforeSheetMove, (params) => {
101
+ * const { workbook, worksheet, newIndex, oldIndex } = params;
102
+ * console.log('before sheet move', params);
103
+ * });
104
+ * ```
105
+ */
106
+ get BeforeSheetMove(): 'BeforeSheetMove';
107
+ /**
108
+ * Event fired after a sheet name is changed
109
+ * @see {@link ISheetNameChangedEvent}
110
+ * @example
111
+ * ```ts
112
+ * univerAPI.addEvent(univerAPI.Event.SheetNameChanged, (params) => {
113
+ * const { workbook, worksheet, newName } = params;
114
+ * console.log('sheet name changed', params);
115
+ * });
116
+ * ```
117
+ */
118
+ get SheetNameChanged(): 'SheetNameChanged';
119
+ /**
120
+ * Event fired before a sheet name is changed
121
+ * @see {@link IBeforeSheetNameChangeEvent}
122
+ * @example
123
+ * ```ts
124
+ * univerAPI.addEvent(univerAPI.Event.BeforeSheetNameChange, (params) => {
125
+ * const { workbook, worksheet, newName, oldName } = params;
126
+ * console.log('before sheet name changed', params);
127
+ * });
128
+ * ```
129
+ */
130
+ get BeforeSheetNameChange(): 'BeforeSheetNameChange';
131
+ /**
132
+ * Event fired after a sheet tab color is changed
133
+ * @see {@link ISheetTabColorChangedEvent}
134
+ * @example
135
+ * ```ts
136
+ * univerAPI.addEvent(univerAPI.Event.SheetTabColorChanged, (params) => {
137
+ * const { workbook, worksheet, color } = params;
138
+ * console.log('sheet tab color changed', params);
139
+ * });
140
+ * ```
141
+ */
142
+ get SheetTabColorChanged(): 'SheetTabColorChanged';
143
+ /**
144
+ * Event fired before a sheet tab color is changed
145
+ * @see {@link IBeforeSheetTabColorChangeEvent}
146
+ * @example
147
+ * ```ts
148
+ * univerAPI.addEvent(univerAPI.Event.BeforeSheetTabColorChange, (params) => {
149
+ * const { workbook, worksheet, color, oldColor } = params;
150
+ * console.log('before sheet tab color changed', params);
151
+ * });
152
+ * ```
153
+ */
154
+ get BeforeSheetTabColorChange(): 'BeforeSheetTabColorChange';
155
+ /**
156
+ * Event fired after a sheet is hidden
157
+ * @see {@link ISheetHideChangedEvent}
158
+ * @example
159
+ * ```ts
160
+ * univerAPI.addEvent(univerAPI.Event.SheetHideChanged, (params) => {
161
+ * const { workbook, worksheet } = params;
162
+ * console.log('sheet hide changed', params);
163
+ * });
164
+ * ```
165
+ */
166
+ get SheetHideChanged(): 'SheetHideChanged';
167
+ /**
168
+ * Event fired before a sheet is hidden
169
+ * @see {@link IBeforeSheetHideChangeEvent}
170
+ * @example
171
+ * ```ts
172
+ * univerAPI.addEvent(univerAPI.Event.BeforeSheetHideChange, (params) => {
173
+ * const { workbook, worksheet, hide } = params;
174
+ * console.log('before sheet hide changed', params);
175
+ * });
176
+ * ```
177
+ */
178
+ get BeforeSheetHideChange(): 'BeforeSheetHideChange';
29
179
  /**
30
180
  * Event fired after a workbook is created
31
181
  * @see {@link IWorkbookCreateParam}
32
182
  * @example
33
183
  * ```ts
34
- * univerAPI.addEvent(univerAPI.event.WorkbookCreated, (params) => {
184
+ * univerAPI.addEvent(univerAPI.Event.WorkbookCreated, (params) => {
35
185
  * const { unitId, type, workbook, unit } = params;
36
- * console.log('unit created', params);
186
+ * console.log('workbook created', params);
37
187
  * });
38
188
  * ```
39
189
  */
@@ -43,35 +193,127 @@ export interface IFSheetEventMixin {
43
193
  * @see {@link IWorkbookDisposedEvent}
44
194
  * @example
45
195
  * ```ts
46
- * univerAPI.addEvent(univerAPI.event.WorkbookDisposed, (params) => {
196
+ * univerAPI.addEvent(univerAPI.Event.WorkbookDisposed, (params) => {
47
197
  * const { unitId, unitType, snapshot } = params;
48
198
  * console.log('unit disposed', params);
49
199
  * });
50
200
  * ```
51
201
  */
52
202
  get WorkbookDisposed(): 'WorkbookDisposed';
203
+ /**
204
+ * Event fired when gridline changed
205
+ * @see {@link IGridlineChangedEvent}
206
+ * @example
207
+ * ```ts
208
+ * univerAPI.addEvent(univerAPI.Event.GridlineChanged, (params) => {
209
+ * const { workbook, worksheet, enabled, color } = params;
210
+ * console.log('gridline changed', params);
211
+ * });
212
+ * ```
213
+ */
214
+ get GridlineChanged(): 'GridlineChanged';
215
+ /**
216
+ * Event fired before gridline enable changed
217
+ * @see {@link IBeforeGridlineEnableChange}
218
+ * @example
219
+ * ```ts
220
+ * univerAPI.addEvent(univerAPI.Event.BeforeGridlineEnableChange, (params) => {
221
+ * const { workbook, worksheet, enabled } = params;
222
+ * console.log('gridline changed', params);
223
+ * });
224
+ * ```
225
+ */
226
+ get BeforeGridlineEnableChange(): 'BeforeGridlineEnableChange';
227
+ /**
228
+ * Event fired before gridline color changed
229
+ * @see {@link IBeforeGridlineColorChanged}
230
+ * @example
231
+ * ```ts
232
+ * univerAPI.addEvent(univerAPI.Event.BeforeGridlineColorChange, (params) => {
233
+ * const { workbook, worksheet, color } = params;
234
+ * console.log('gridline changed', params);
235
+ * });
236
+ * ```
237
+ */
238
+ get BeforeGridlineColorChange(): 'BeforeGridlineColorChange';
239
+ /**
240
+ * Event fired when sheet value changed
241
+ * @example
242
+ * ```ts
243
+ * univerAPI.addEvent(univerAPI.Event.SheetValueChanged, (p)=> {
244
+ * const { workbook, effectedRanges, payload } = p;
245
+ * });
246
+ * ```
247
+ */
248
+ readonly SheetValueChanged: 'SheetValueChanged';
53
249
  }
250
+ /**
251
+ * Interface for workbook creation parameters
252
+ * Extends the base event interface and includes workbook initialization details
253
+ */
54
254
  export interface IWorkbookCreateParam extends IEventBase {
255
+ /** Unique identifier for the workbook unit */
55
256
  unitId: string;
257
+ /** Type identifier specifying this is a sheet instance */
56
258
  type: UniverInstanceType.UNIVER_SHEET;
259
+ /** The workbook instance being created */
57
260
  workbook: FWorkbook;
261
+ /** The workbook unit reference */
58
262
  unit: FWorkbook;
59
263
  }
264
+ /**
265
+ * Interface for workbook disposal event
266
+ * Contains information about the disposed workbook including its snapshot data
267
+ */
60
268
  export interface IWorkbookDisposedEvent extends IEventBase {
269
+ /** Unique identifier of the disposed workbook unit */
61
270
  unitId: string;
271
+ /** Type identifier specifying this was a sheet instance */
62
272
  unitType: UniverInstanceType.UNIVER_SHEET;
273
+ /** Snapshot data of the workbook at the time of disposal */
63
274
  snapshot: IWorkbookData;
64
275
  }
65
- export declare class FSheetEventName extends FEventName implements IFSheetEventMixin {
66
- get SheetCreated(): 'SheetCreated';
67
- get BeforeSheetCreate(): 'BeforeSheetCreate';
68
- get WorkbookCreated(): 'WorkbookCreated';
69
- get WorkbookDisposed(): 'WorkbookDisposed';
276
+ /**
277
+ * Interface for gridline change event
278
+ * Triggered when gridline visibility or color changes in a worksheet
279
+ */
280
+ export interface IGridlineChangedEvent extends IEventBase {
281
+ /** The workbook instance containing the worksheet */
282
+ workbook: FWorkbook;
283
+ /** The worksheet where gridline changes occurred */
284
+ worksheet: FWorksheet;
285
+ /** Flag indicating whether gridlines are enabled or disabled */
286
+ enabled: boolean;
287
+ /** The color of the gridlines, undefined if using default color */
288
+ color: string | undefined;
289
+ }
290
+ /**
291
+ * Interface for event before gridline enable/disable
292
+ * Triggered before changing the gridline visibility state
293
+ */
294
+ export interface IBeforeGridlineEnableChange extends IEventBase {
295
+ /** The workbook instance containing the worksheet */
296
+ workbook: FWorkbook;
297
+ /** The worksheet where gridline state will change */
298
+ worksheet: FWorksheet;
299
+ /** The new enabled state to be applied */
300
+ enabled: boolean;
70
301
  }
71
302
  /**
72
- * Event interface triggered before creating a new worksheet
73
- * @interface IBeforeSheetCreateEventParams
74
- * @augments {IEventBase}
303
+ * Interface for event before gridline color change
304
+ * Triggered before changing the gridline color
305
+ */
306
+ export interface IBeforeGridlineColorChanged extends IEventBase {
307
+ /** The workbook instance containing the worksheet */
308
+ workbook: FWorkbook;
309
+ /** The worksheet where gridline color will change */
310
+ worksheet: FWorksheet;
311
+ /** The new color to be applied, undefined to use default color */
312
+ color: string | undefined;
313
+ }
314
+ /**
315
+ * Interface for event parameters triggered before creating a new worksheet
316
+ * Extends the base event interface and includes workbook and worksheet details
75
317
  */
76
318
  export interface IBeforeSheetCreateEventParams extends IEventBase {
77
319
  /** The workbook instance */
@@ -82,9 +324,8 @@ export interface IBeforeSheetCreateEventParams extends IEventBase {
82
324
  sheet?: IWorksheetData;
83
325
  }
84
326
  /**
85
- * Event interface triggered after a worksheet is created
86
- * @interface ISheetCreatedEventParams
87
- * @augments {IEventBase}
327
+ * Interface for event parameters triggered after a worksheet is created
328
+ * Extends the base event interface and includes workbook and worksheet details
88
329
  */
89
330
  export interface ISheetCreatedEventParams extends IEventBase {
90
331
  /** The workbook instance */
@@ -92,9 +333,163 @@ export interface ISheetCreatedEventParams extends IEventBase {
92
333
  /** The newly created worksheet */
93
334
  worksheet: FWorksheet;
94
335
  }
336
+ /**
337
+ * Interface for sheet active change event
338
+ * Contains information about the sheet that will become active
339
+ */
340
+ export interface IBeforeActiveSheetChangeEvent extends IEventBase {
341
+ /** The workbook instance containing the worksheet */
342
+ workbook: FWorkbook;
343
+ /** The worksheet that will become active */
344
+ activeSheet: FWorksheet;
345
+ /** The currently active worksheet */
346
+ oldActiveSheet: FWorksheet;
347
+ }
348
+ /**
349
+ * Interface for sheet active changed event
350
+ * Contains information about the newly activated sheet
351
+ */
352
+ export interface IActiveSheetChangedEvent extends IEventBase {
353
+ /** The workbook instance containing the worksheet */
354
+ workbook: FWorkbook;
355
+ /** The worksheet that has become active */
356
+ activeSheet: FWorksheet;
357
+ }
358
+ /**
359
+ * Interface for sheet deletion event
360
+ * Contains information about the sheet that was deleted
361
+ */
362
+ export interface ISheetDeletedEvent extends IEventBase {
363
+ /** The workbook instance containing the worksheet */
364
+ workbook: FWorkbook;
365
+ /** The worksheet that was deleted */
366
+ sheetId: string;
367
+ }
368
+ /**
369
+ * Interface for before sheet deletion event
370
+ * Contains information about the sheet that will be deleted
371
+ */
372
+ export interface IBeforeSheetDeleteEvent extends IEventBase {
373
+ /** The workbook instance containing the worksheet */
374
+ workbook: FWorkbook;
375
+ /** The worksheet that will be deleted */
376
+ worksheet: FWorksheet;
377
+ }
378
+ /**
379
+ * Interface for sheet moved event
380
+ * Contains information about the sheet movement
381
+ */
382
+ export interface ISheetMovedEvent extends IEventBase {
383
+ /** The workbook instance containing the worksheet */
384
+ workbook: FWorkbook;
385
+ /** The worksheet that was moved */
386
+ worksheet: FWorksheet;
387
+ /** The new position index of the sheet */
388
+ newIndex: number;
389
+ }
390
+ /**
391
+ * Interface for before sheet move event
392
+ * Contains information about the planned sheet movement
393
+ */
394
+ export interface IBeforeSheetMoveEvent extends IEventBase {
395
+ /** The workbook instance containing the worksheet */
396
+ workbook: FWorkbook;
397
+ /** The worksheet that will be moved */
398
+ worksheet: FWorksheet;
399
+ /** The target position index for the sheet */
400
+ newIndex: number;
401
+ /** The current position index of the sheet */
402
+ oldIndex: number;
403
+ }
404
+ /**
405
+ * Interface for sheet name change event
406
+ * Contains information about the sheet name change
407
+ */
408
+ export interface ISheetNameChangedEvent extends IEventBase {
409
+ /** The workbook instance containing the worksheet */
410
+ workbook: FWorkbook;
411
+ /** The worksheet whose name was changed */
412
+ worksheet: FWorksheet;
413
+ /** The new name of the sheet */
414
+ newName: string;
415
+ }
416
+ /**
417
+ * Interface for before sheet name change event
418
+ * Contains information about the planned sheet name change
419
+ */
420
+ export interface IBeforeSheetNameChangeEvent extends IEventBase {
421
+ /** The workbook instance containing the worksheet */
422
+ workbook: FWorkbook;
423
+ /** The worksheet whose name will be changed */
424
+ worksheet: FWorksheet;
425
+ /** The new name to be applied */
426
+ newName: string;
427
+ /** The current name of the sheet */
428
+ oldName: string;
429
+ }
430
+ /**
431
+ * Interface for sheet tab color change event
432
+ * Contains information about the sheet tab color change
433
+ */
434
+ export interface ISheetTabColorChangedEvent extends IEventBase {
435
+ /** The workbook instance containing the worksheet */
436
+ workbook: FWorkbook;
437
+ /** The worksheet whose tab color was changed */
438
+ worksheet: FWorksheet;
439
+ /** The new color of the sheet tab */
440
+ newColor: string | undefined;
441
+ }
442
+ /**
443
+ * Interface for before sheet tab color change event
444
+ * Contains information about the planned sheet tab color change
445
+ */
446
+ export interface IBeforeSheetTabColorChangeEvent extends IEventBase {
447
+ /** The workbook instance containing the worksheet */
448
+ workbook: FWorkbook;
449
+ /** The worksheet whose tab color will be changed */
450
+ worksheet: FWorksheet;
451
+ /** The new color to be applied */
452
+ newColor: string | undefined;
453
+ /** The current color of the sheet tab */
454
+ oldColor: string | undefined;
455
+ }
456
+ /**
457
+ * Interface for sheet hide state change event
458
+ * Contains information about the sheet visibility change
459
+ */
460
+ export interface ISheetHideChangedEvent extends IEventBase {
461
+ /** The workbook instance containing the worksheet */
462
+ workbook: FWorkbook;
463
+ /** The worksheet whose visibility was changed */
464
+ worksheet: FWorksheet;
465
+ /** The new visibility state */
466
+ hidden: boolean;
467
+ }
468
+ /**
469
+ * Interface for before sheet hide state change event
470
+ * Contains information about the planned sheet visibility change
471
+ */
472
+ export interface IBeforeSheetHideChangeEvent extends IEventBase {
473
+ /** The workbook instance containing the worksheet */
474
+ workbook: FWorkbook;
475
+ /** The worksheet whose visibility will be changed */
476
+ worksheet: FWorksheet;
477
+ /** The new visibility state to be applied */
478
+ hidden: boolean;
479
+ }
480
+ /**
481
+ * Interface for sheet value changed event
482
+ * Contains information about the sheet value change
483
+ */
484
+ export interface ISheetValueChangedEvent extends IEventBase {
485
+ /** The affected ranges of the sheet */
486
+ effectedRanges: FRange[];
487
+ /** The payload of the value change */
488
+ payload: CommandListenerValueChange;
489
+ }
95
490
  /**
96
491
  * Configuration interface for sheet-related events
97
- * @interface ISheetEventParamConfig
492
+ * Provides event names and their corresponding event parameter interfaces
98
493
  */
99
494
  export interface ISheetEventParamConfig {
100
495
  /** Event fired after a worksheet is created */
@@ -105,6 +500,60 @@ export interface ISheetEventParamConfig {
105
500
  WorkbookCreated: IWorkbookCreateParam;
106
501
  /** Event fired when a workbook is disposed */
107
502
  WorkbookDisposed: IWorkbookDisposedEvent;
503
+ /** Event fired when gridline changed */
504
+ GridlineChanged: IGridlineChangedEvent;
505
+ /** Event fired before gridline enable changed */
506
+ BeforeGridlineEnableChange: IBeforeGridlineEnableChange;
507
+ /** Event fired before gridline color changed */
508
+ BeforeGridlineColorChange: IBeforeGridlineColorChanged;
509
+ /** Event fired before active sheet changes */
510
+ BeforeActiveSheetChange: IBeforeActiveSheetChangeEvent;
511
+ /** Event fired after active sheet changed */
512
+ ActiveSheetChanged: IActiveSheetChangedEvent;
513
+ /** Event fired after a sheet is deleted */
514
+ SheetDeleted: ISheetDeletedEvent;
515
+ /** Event fired before a sheet is deleted */
516
+ BeforeSheetDelete: IBeforeSheetDeleteEvent;
517
+ /** Event fired after a sheet is moved */
518
+ SheetMoved: ISheetMovedEvent;
519
+ /** Event fired before a sheet is moved */
520
+ BeforeSheetMove: IBeforeSheetMoveEvent;
521
+ /** Event fired after a sheet name is changed */
522
+ SheetNameChanged: ISheetNameChangedEvent;
523
+ /** Event fired before a sheet name is changed */
524
+ BeforeSheetNameChange: IBeforeSheetNameChangeEvent;
525
+ /** Event fired after a sheet tab color is changed */
526
+ SheetTabColorChanged: ISheetTabColorChangedEvent;
527
+ /** Event fired before a sheet tab color is changed */
528
+ BeforeSheetTabColorChange: IBeforeSheetTabColorChangeEvent;
529
+ /** Event fired after a sheet visibility is changed */
530
+ SheetHideChanged: ISheetHideChangedEvent;
531
+ /** Event fired before a sheet visibility is changed */
532
+ BeforeSheetHideChange: IBeforeSheetHideChangeEvent;
533
+ /** Event fired after a sheet value is changed */
534
+ SheetValueChanged: ISheetValueChangedEvent;
535
+ }
536
+ export declare class FSheetEventName extends FEventName implements IFSheetEventMixin {
537
+ get SheetCreated(): 'SheetCreated';
538
+ get BeforeSheetCreate(): 'BeforeSheetCreate';
539
+ get WorkbookCreated(): 'WorkbookCreated';
540
+ get WorkbookDisposed(): 'WorkbookDisposed';
541
+ get GridlineChanged(): 'GridlineChanged';
542
+ get BeforeGridlineEnableChange(): 'BeforeGridlineEnableChange';
543
+ get BeforeGridlineColorChange(): 'BeforeGridlineColorChange';
544
+ get BeforeActiveSheetChange(): 'BeforeActiveSheetChange';
545
+ get ActiveSheetChanged(): 'ActiveSheetChanged';
546
+ get SheetDeleted(): 'SheetDeleted';
547
+ get BeforeSheetDelete(): 'BeforeSheetDelete';
548
+ get SheetMoved(): 'SheetMoved';
549
+ get BeforeSheetMove(): 'BeforeSheetMove';
550
+ get SheetNameChanged(): 'SheetNameChanged';
551
+ get BeforeSheetNameChange(): 'BeforeSheetNameChange';
552
+ get SheetTabColorChanged(): 'SheetTabColorChanged';
553
+ get BeforeSheetTabColorChange(): 'BeforeSheetTabColorChange';
554
+ get SheetHideChanged(): 'SheetHideChanged';
555
+ get BeforeSheetHideChange(): 'BeforeSheetHideChange';
556
+ get SheetValueChanged(): 'SheetValueChanged';
108
557
  }
109
558
  declare module '@univerjs/core' {
110
559
  interface FEventName extends IFSheetEventMixin {
@@ -1,6 +1,9 @@
1
1
  import { IRange, RangePermissionPointConstructor, WorkbookPermissionPointConstructor, WorkSheetPermissionPointConstructor, FBase, IAuthzIoService, ICommandService, Injector, IPermissionService } from '@univerjs/core';
2
2
  import { Observable } from 'rxjs';
3
3
  import { RangeProtectionRuleModel, WorkbookEditablePermission, WorksheetEditPermission, WorksheetProtectionPointModel, WorksheetProtectionRuleModel, WorksheetViewPermission } from '@univerjs/sheets';
4
+ /**
5
+ * @hideconstructor
6
+ */
4
7
  export declare class FPermission extends FBase {
5
8
  protected readonly _injector: Injector;
6
9
  protected readonly _commandService: ICommandService;