@univerjs/sheets-thread-comment v0.5.4
Class: FCommentEvent
Defined in: sheets-thread-comment/src/facade/f-event.ts:142
Extends
Constructors
new FCommentEvent()
new FCommentEvent(): FCommentEvent
Defined in: core/src/facade/f-event.ts:114
Returns
Inherited from
Properties
Property | Modifier | Type | Inherited from | Defined in |
---|---|---|---|---|
_instance | static | null | FEventName | FEventName ._instance | core/src/facade/f-event.ts:87 |
Accessors
BeforeCommandExecute
Get Signature
get BeforeCommandExecute(): "BeforeCommandExecute"
Defined in: core/src/facade/f-event.ts:252
Event fired before a command is executed
See
ICommandEvent
Example
univerAPI.addEvent(univerAPI.event.BeforeCommandExecute, (event) => {
const { params, id, type } = event;
console.log('command executed', event);
});
Returns
"BeforeCommandExecute"
Inherited from
FEventName
.BeforeCommandExecute
BeforeCommentAdd
Get Signature
get BeforeCommentAdd(): "BeforeCommentAdd"
Defined in: sheets-thread-comment/src/facade/f-event.ts:147
Event fired before comment added
See
Example
univerAPI.addEventListener(CommentEvent.BeforeCommentAdd, (event) => {
const { comment, workbook, worksheet, row, col } = event;
console.log(event);
});
Returns
"BeforeCommentAdd"
Overrides
FEventName.BeforeCommentAdd
BeforeCommentDeleted
Get Signature
get BeforeCommentDeleted(): "BeforeCommentDeleted"
Defined in: sheets-thread-comment/src/facade/f-event.ts:163
Event fired before comment delete
See
IBeforeSheetCommentDeleteEvent
Example
univerAPI.addEventListener(CommentEvent.BeforeCommentDeleted, (event) => {
const { commentId, workbook, worksheet } = event;
console.log(event);
});
Returns
"BeforeCommentDeleted"
Overrides
FEventName.BeforeCommentDeleted
BeforeCommentResolve
Get Signature
get BeforeCommentResolve(): "BeforeCommentResolve"
Defined in: sheets-thread-comment/src/facade/f-event.ts:171
Event fired before comment resolve
See
Example
univerAPI.addEventListener(CommentEvent.BeforeCommentResolve, (event) => {
const { comment, row, col, resolved, workbook, worksheet } = event;
console.log(event);
});
Returns
"BeforeCommentResolve"
Overrides
FEventName.BeforeCommentResolve
BeforeCommentUpdate
Get Signature
get BeforeCommentUpdate(): "BeforeCommentUpdate"
Defined in: sheets-thread-comment/src/facade/f-event.ts:155
Event fired before comment update
See
IBeforeSheetCommentUpdateEvent
Example
univerAPI.addEventListener(CommentEvent.BeforeCommentUpdate, (event) => {
const { comment, workbook, worksheet, row, col, newContent } = event;
console.log(event);
});
Returns
"BeforeCommentUpdate"
Overrides
FEventName.BeforeCommentUpdate
BeforeRedo
Get Signature
get BeforeRedo(): "BeforeRedo"
Defined in: core/src/facade/f-event.ts:207
Event fired before a redo command is executed
See
ICommandEvent
Example
univerAPI.addEvent(univerAPI.event.BeforeRedo, (event) => {
const { params, id, type } = event;
console.log('command executed', event);
});
Returns
"BeforeRedo"
Inherited from
BeforeSheetCreate
Get Signature
get BeforeSheetCreate(): "BeforeSheetCreate"
Defined in: sheets/src/facade/f-event.ts:46
Event fired before a sheet is created
See
Example
univerAPI.addEvent(univerAPI.event.BeforeSheetCreate, (params) => {
const { workbook, index, sheet } = params;
console.log('unit created', params);
});
Returns
"BeforeSheetCreate"
Inherited from
FEventName.BeforeSheetCreate
BeforeUndo
Get Signature
get BeforeUndo(): "BeforeUndo"
Defined in: core/src/facade/f-event.ts:222
Event fired before an undo command is executed
See
ICommandEvent
Example
univerAPI.addEvent(univerAPI.event.BeforeUndo, (event) => {
const { params, id, type } = event;
console.log('command executed', event);
});
Returns
"BeforeUndo"
Inherited from
CommandExecuted
Get Signature
get CommandExecuted(): "CommandExecuted"
Defined in: core/src/facade/f-event.ts:237
Event fired when a command is executed
See
ICommandEvent
Example
univerAPI.addEvent(univerAPI.event.CommandExecuted, (event) => {
const { params, id, type } = event;
console.log('command executed', event);
});
Returns
"CommandExecuted"
Inherited from
CommentAdded
Get Signature
get CommentAdded(): "CommentAdded"
Defined in: sheets-thread-comment/src/facade/f-event.ts:143
Event fired after comment added
See
Example
univerAPI.addEventListener(CommentEvent.CommentAdded, (event) => {
const { comment, workbook, worksheet, row, col } = event;
console.log(event);
});
Returns
"CommentAdded"
Overrides
FEventName.CommentAdded
CommentDeleted
Get Signature
get CommentDeleted(): "CommentDeleted"
Defined in: sheets-thread-comment/src/facade/f-event.ts:159
Event fired after comment deleted
See
Example
univerAPI.addEventListener(CommentEvent.CommentDeleted, (event) => {
const { commentId, workbook, worksheet } = event;
console.log(event);
});
Returns
"CommentDeleted"
Overrides
FEventName.CommentDeleted
CommentResolved
Get Signature
get CommentResolved(): "CommentResolved"
Defined in: sheets-thread-comment/src/facade/f-event.ts:167
Event fired after comment resolve
See
Example
univerAPI.addEventListener(CommentEvent.CommentResolved, (event) => {
const { comment, row, col, resolved, workbook, worksheet } = event;
console.log(event);
});
Returns
"CommentResolved"
Overrides
FEventName.CommentResolved
CommentUpdated
Get Signature
get CommentUpdated(): "CommentUpdated"
Defined in: sheets-thread-comment/src/facade/f-event.ts:151
Event fired after comment updated
See
Example
univerAPI.addEventListener(CommentEvent.CommentUpdated, (event) => {
const { comment, workbook, worksheet, row, col } = event;
console.log(event);
});
Returns
"CommentUpdated"
Overrides
FEventName.CommentUpdated
DocCreated
Get Signature
get DocCreated(): "DocCreated"
Defined in: core/src/facade/f-event.ts:132
Event fired when a document is created
See
IDocCreatedParam
Example
univerAPI.addEvent(univerAPI.event.DocCreated, (params) => {
const { unitId, type, doc, unit } = params;
console.log('doc created', params);
});
Returns
"DocCreated"
Inherited from
DocDisposed
Get Signature
get DocDisposed(): "DocDisposed"
Defined in: core/src/facade/f-event.ts:147
Event fired when a document is disposed
See
IDocDisposedEvent
Example
univerAPI.addEvent(univerAPI.event.DocDisposed, (params) => {
const { unitId, unitType, snapshot } = params;
console.log('doc disposed', params);
});
Returns
"DocDisposed"
Inherited from
LifeCycleChanged
Get Signature
get LifeCycleChanged(): "LifeCycleChanged"
Defined in: core/src/facade/f-event.ts:162
Event fired when life cycle is changed
See
ILifeCycleChangedEvent
Example
univerAPI.addEvent(univerAPI.event.LifeCycleChanged, (params) => {
const { stage } = params;
console.log('life cycle changed', params);
});
Returns
"LifeCycleChanged"
Inherited from
Redo
Get Signature
get Redo(): "Redo"
Defined in: core/src/facade/f-event.ts:177
Event fired when a redo command is executed
See
ICommandEvent
Example
univerAPI.addEvent(univerAPI.event.Redo, (event) => {
const { params, id, type } = event;
console.log('command executed', event);
});
Returns
"Redo"
Inherited from
SheetCreated
Get Signature
get SheetCreated(): "SheetCreated"
Defined in: sheets/src/facade/f-event.ts:34
Event fired after a sheet is created
See
Example
univerAPI.addEvent(univerAPI.event.SheetCreated, (params) => {
const { workbook, worksheet } = params;
console.log('unit created', params);
});
Returns
"SheetCreated"
Inherited from
FEventName.SheetCreated
Undo
Get Signature
get Undo(): "Undo"
Defined in: core/src/facade/f-event.ts:192
Event fired when an undo command is executed
See
ICommandEvent
Example
univerAPI.addEvent(univerAPI.event.Undo, (event) => {
const { params, id, type } = event;
console.log('command executed', event);
});
Returns
"Undo"
Inherited from
WorkbookCreated
Get Signature
get WorkbookCreated(): "WorkbookCreated"
Defined in: sheets/src/facade/f-event.ts:58
Event fired after a workbook is created
See
Example
univerAPI.addEvent(univerAPI.event.WorkbookCreated, (params) => {
const { unitId, type, workbook, unit } = params;
console.log('unit created', params);
});
Returns
"WorkbookCreated"
Inherited from
FEventName.WorkbookCreated
WorkbookDisposed
Get Signature
get WorkbookDisposed(): "WorkbookDisposed"
Defined in: sheets/src/facade/f-event.ts:70
Event fired after a workbook is disposed
See
Example
univerAPI.addEvent(univerAPI.event.WorkbookDisposed, (params) => {
const { unitId, unitType, snapshot } = params;
console.log('unit disposed', params);
});
Returns
"WorkbookDisposed"
Inherited from
FEventName.WorkbookDisposed
Methods
extend()
static extend(source): void
Defined in: core/src/facade/f-event.ts:98
Parameters
Parameter | Type |
---|---|
source | any |
Returns
void
Inherited from
get()
static get(): FEventName
Defined in: core/src/facade/f-event.ts:88