@fluid-experimental/last-edited 2.0.0-dev.7.2.0.204906 → 2.0.0-dev.7.3.0.206769
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/CHANGELOG.md +4 -0
- package/package.json +12 -12
- package/dist/last-edited-alpha.d.ts +0 -103
- package/dist/last-edited-beta.d.ts +0 -103
- package/dist/last-edited-public.d.ts +0 -103
- package/dist/last-edited-untrimmed.d.ts +0 -103
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-experimental/last-edited",
|
|
3
|
-
"version": "2.0.0-dev.7.
|
|
3
|
+
"version": "2.0.0-dev.7.3.0.206769",
|
|
4
4
|
"description": "Tracks the last edited information in the Container.",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -35,20 +35,20 @@
|
|
|
35
35
|
"temp-directory": "nyc/.nyc_output"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@fluidframework/aqueduct": "2.0.0-dev.7.
|
|
39
|
-
"@fluidframework/container-runtime": "2.0.0-dev.7.
|
|
40
|
-
"@fluidframework/container-runtime-definitions": "2.0.0-dev.7.
|
|
41
|
-
"@fluidframework/core-interfaces": "2.0.0-dev.7.
|
|
38
|
+
"@fluidframework/aqueduct": "2.0.0-dev.7.3.0.206769",
|
|
39
|
+
"@fluidframework/container-runtime": "2.0.0-dev.7.3.0.206769",
|
|
40
|
+
"@fluidframework/container-runtime-definitions": "2.0.0-dev.7.3.0.206769",
|
|
41
|
+
"@fluidframework/core-interfaces": "2.0.0-dev.7.3.0.206769",
|
|
42
42
|
"@fluidframework/protocol-definitions": "^3.0.0",
|
|
43
|
-
"@fluidframework/runtime-utils": "2.0.0-dev.7.
|
|
44
|
-
"@fluidframework/shared-summary-block": "2.0.0-dev.7.
|
|
43
|
+
"@fluidframework/runtime-utils": "2.0.0-dev.7.3.0.206769",
|
|
44
|
+
"@fluidframework/shared-summary-block": "2.0.0-dev.7.3.0.206769"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@fluid-tools/build-cli": "0.26.
|
|
48
|
-
"@fluidframework/build-common": "^2.0.
|
|
49
|
-
"@fluidframework/build-tools": "0.26.
|
|
47
|
+
"@fluid-tools/build-cli": "^0.26.1",
|
|
48
|
+
"@fluidframework/build-common": "^2.0.3",
|
|
49
|
+
"@fluidframework/build-tools": "^0.26.1",
|
|
50
50
|
"@fluidframework/eslint-config-fluid": "^3.0.0",
|
|
51
|
-
"@fluidframework/mocha-test-setup": "2.0.0-dev.7.
|
|
51
|
+
"@fluidframework/mocha-test-setup": "2.0.0-dev.7.3.0.206769",
|
|
52
52
|
"@microsoft/api-extractor": "^7.37.0",
|
|
53
53
|
"@types/node": "^16.18.38",
|
|
54
54
|
"eslint": "~8.50.0",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"build:docs": "api-extractor run --local",
|
|
68
68
|
"build:esnext": "tsc --project ./tsconfig.esnext.json",
|
|
69
69
|
"ci:build:docs": "api-extractor run",
|
|
70
|
-
"clean": "rimraf --glob
|
|
70
|
+
"clean": "rimraf --glob dist lib \"*.tsbuildinfo\" \"*.build.log\" _api-extractor-temp",
|
|
71
71
|
"eslint": "eslint --format stylish src",
|
|
72
72
|
"eslint:fix": "eslint --format stylish src --fix --fix-type problem,suggestion,layout",
|
|
73
73
|
"format": "npm run prettier:fix",
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import { DataObject } from '@fluidframework/aqueduct';
|
|
2
|
-
import { DataObjectFactory } from '@fluidframework/aqueduct';
|
|
3
|
-
import { IContainerRuntime } from '@fluidframework/container-runtime-definitions';
|
|
4
|
-
import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
|
|
5
|
-
import { IUser } from '@fluidframework/protocol-definitions';
|
|
6
|
-
import { SharedSummaryBlock } from '@fluidframework/shared-summary-block';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* @public
|
|
10
|
-
*/
|
|
11
|
-
export declare const IFluidLastEditedTracker: keyof IProvideFluidLastEditedTracker;
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* @public
|
|
15
|
-
*/
|
|
16
|
-
export declare interface IFluidLastEditedTracker extends IProvideFluidLastEditedTracker {
|
|
17
|
-
/**
|
|
18
|
-
* Returns the details of the last edit to the container.
|
|
19
|
-
*/
|
|
20
|
-
getLastEditDetails(): ILastEditDetails | undefined;
|
|
21
|
-
/**
|
|
22
|
-
* Updates the details of last edit to the container.
|
|
23
|
-
*/
|
|
24
|
-
updateLastEditDetails(lastEditDetails: ILastEditDetails): void;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* @public
|
|
29
|
-
*/
|
|
30
|
-
export declare interface ILastEditDetails {
|
|
31
|
-
user: IUser;
|
|
32
|
-
timestamp: number;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* @public
|
|
37
|
-
*/
|
|
38
|
-
export declare interface IProvideFluidLastEditedTracker {
|
|
39
|
-
readonly IFluidLastEditedTracker: IFluidLastEditedTracker;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* Tracks the last edit details such as the last edited user details and the last edited timestamp. The last edited
|
|
44
|
-
* details should be updated (via updateLastEditDetails) in response to a remote op since it uses shared summary block
|
|
45
|
-
* as storage.
|
|
46
|
-
*
|
|
47
|
-
* @public
|
|
48
|
-
*/
|
|
49
|
-
export declare class LastEditedTracker implements IFluidLastEditedTracker {
|
|
50
|
-
private readonly sharedSummaryBlock;
|
|
51
|
-
private readonly lastEditedDetailsKey;
|
|
52
|
-
/**
|
|
53
|
-
* Creates a LastEditedTracker object.
|
|
54
|
-
* @param sharedSummaryBlock - The shared summary block where the details will be stored.
|
|
55
|
-
*/
|
|
56
|
-
constructor(sharedSummaryBlock: SharedSummaryBlock);
|
|
57
|
-
get IFluidLastEditedTracker(): LastEditedTracker;
|
|
58
|
-
/**
|
|
59
|
-
* {@inheritDoc (IFluidLastEditedTracker:interface).getLastEditDetails}
|
|
60
|
-
*/
|
|
61
|
-
getLastEditDetails(): ILastEditDetails | undefined;
|
|
62
|
-
/**
|
|
63
|
-
* {@inheritDoc (IFluidLastEditedTracker:interface).updateLastEditDetails}
|
|
64
|
-
*/
|
|
65
|
-
updateLastEditDetails(lastEditDetails: ILastEditDetails): void;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* LastEditedTrackerDataObject creates a LastEditedTracker that keeps track of the latest edits to the document.
|
|
70
|
-
*
|
|
71
|
-
* @public
|
|
72
|
-
*/
|
|
73
|
-
export declare class LastEditedTrackerDataObject extends DataObject implements IProvideFluidLastEditedTracker {
|
|
74
|
-
private static readonly factory;
|
|
75
|
-
static getFactory(): DataObjectFactory<LastEditedTrackerDataObject>;
|
|
76
|
-
private readonly sharedSummaryBlockId;
|
|
77
|
-
private _lastEditedTracker;
|
|
78
|
-
private get lastEditedTracker();
|
|
79
|
-
get IFluidLastEditedTracker(): LastEditedTracker;
|
|
80
|
-
protected initializingFirstTime(): Promise<void>;
|
|
81
|
-
protected hasInitialized(): Promise<void>;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* Helper function to set up a data object that provides IFluidLastEditedTracker to track last edited in a Container.
|
|
86
|
-
*
|
|
87
|
-
* It does the following:
|
|
88
|
-
*
|
|
89
|
-
* - Registers an "op" listener on the runtime. On each message, it calls the shouldDiscardMessageFn to check
|
|
90
|
-
* if the message should be discarded. It also discards all scheduler message. If a message is not discarded,
|
|
91
|
-
* it passes the last edited information from the message to the last edited tracker.
|
|
92
|
-
*
|
|
93
|
-
* - The last edited information from the last message received before the lastEditedTracker is
|
|
94
|
-
* loaded is stored and passed to the tracker once it loads.
|
|
95
|
-
* @param lastEditedTracker - The last edited tracker.
|
|
96
|
-
* @param runtime - The container runtime whose messages are to be tracked.
|
|
97
|
-
* @param shouldDiscardMessageFn - Function that tells if a message should not be considered in computing last edited.
|
|
98
|
-
*
|
|
99
|
-
* @public
|
|
100
|
-
*/
|
|
101
|
-
export declare function setupLastEditedTrackerForContainer(lastEditedTracker: IFluidLastEditedTracker, runtime: IContainerRuntime, shouldDiscardMessageFn?: (message: ISequencedDocumentMessage) => boolean): void;
|
|
102
|
-
|
|
103
|
-
export { }
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import { DataObject } from '@fluidframework/aqueduct';
|
|
2
|
-
import { DataObjectFactory } from '@fluidframework/aqueduct';
|
|
3
|
-
import { IContainerRuntime } from '@fluidframework/container-runtime-definitions';
|
|
4
|
-
import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
|
|
5
|
-
import { IUser } from '@fluidframework/protocol-definitions';
|
|
6
|
-
import { SharedSummaryBlock } from '@fluidframework/shared-summary-block';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* @public
|
|
10
|
-
*/
|
|
11
|
-
export declare const IFluidLastEditedTracker: keyof IProvideFluidLastEditedTracker;
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* @public
|
|
15
|
-
*/
|
|
16
|
-
export declare interface IFluidLastEditedTracker extends IProvideFluidLastEditedTracker {
|
|
17
|
-
/**
|
|
18
|
-
* Returns the details of the last edit to the container.
|
|
19
|
-
*/
|
|
20
|
-
getLastEditDetails(): ILastEditDetails | undefined;
|
|
21
|
-
/**
|
|
22
|
-
* Updates the details of last edit to the container.
|
|
23
|
-
*/
|
|
24
|
-
updateLastEditDetails(lastEditDetails: ILastEditDetails): void;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* @public
|
|
29
|
-
*/
|
|
30
|
-
export declare interface ILastEditDetails {
|
|
31
|
-
user: IUser;
|
|
32
|
-
timestamp: number;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* @public
|
|
37
|
-
*/
|
|
38
|
-
export declare interface IProvideFluidLastEditedTracker {
|
|
39
|
-
readonly IFluidLastEditedTracker: IFluidLastEditedTracker;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* Tracks the last edit details such as the last edited user details and the last edited timestamp. The last edited
|
|
44
|
-
* details should be updated (via updateLastEditDetails) in response to a remote op since it uses shared summary block
|
|
45
|
-
* as storage.
|
|
46
|
-
*
|
|
47
|
-
* @public
|
|
48
|
-
*/
|
|
49
|
-
export declare class LastEditedTracker implements IFluidLastEditedTracker {
|
|
50
|
-
private readonly sharedSummaryBlock;
|
|
51
|
-
private readonly lastEditedDetailsKey;
|
|
52
|
-
/**
|
|
53
|
-
* Creates a LastEditedTracker object.
|
|
54
|
-
* @param sharedSummaryBlock - The shared summary block where the details will be stored.
|
|
55
|
-
*/
|
|
56
|
-
constructor(sharedSummaryBlock: SharedSummaryBlock);
|
|
57
|
-
get IFluidLastEditedTracker(): LastEditedTracker;
|
|
58
|
-
/**
|
|
59
|
-
* {@inheritDoc (IFluidLastEditedTracker:interface).getLastEditDetails}
|
|
60
|
-
*/
|
|
61
|
-
getLastEditDetails(): ILastEditDetails | undefined;
|
|
62
|
-
/**
|
|
63
|
-
* {@inheritDoc (IFluidLastEditedTracker:interface).updateLastEditDetails}
|
|
64
|
-
*/
|
|
65
|
-
updateLastEditDetails(lastEditDetails: ILastEditDetails): void;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* LastEditedTrackerDataObject creates a LastEditedTracker that keeps track of the latest edits to the document.
|
|
70
|
-
*
|
|
71
|
-
* @public
|
|
72
|
-
*/
|
|
73
|
-
export declare class LastEditedTrackerDataObject extends DataObject implements IProvideFluidLastEditedTracker {
|
|
74
|
-
private static readonly factory;
|
|
75
|
-
static getFactory(): DataObjectFactory<LastEditedTrackerDataObject>;
|
|
76
|
-
private readonly sharedSummaryBlockId;
|
|
77
|
-
private _lastEditedTracker;
|
|
78
|
-
private get lastEditedTracker();
|
|
79
|
-
get IFluidLastEditedTracker(): LastEditedTracker;
|
|
80
|
-
protected initializingFirstTime(): Promise<void>;
|
|
81
|
-
protected hasInitialized(): Promise<void>;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* Helper function to set up a data object that provides IFluidLastEditedTracker to track last edited in a Container.
|
|
86
|
-
*
|
|
87
|
-
* It does the following:
|
|
88
|
-
*
|
|
89
|
-
* - Registers an "op" listener on the runtime. On each message, it calls the shouldDiscardMessageFn to check
|
|
90
|
-
* if the message should be discarded. It also discards all scheduler message. If a message is not discarded,
|
|
91
|
-
* it passes the last edited information from the message to the last edited tracker.
|
|
92
|
-
*
|
|
93
|
-
* - The last edited information from the last message received before the lastEditedTracker is
|
|
94
|
-
* loaded is stored and passed to the tracker once it loads.
|
|
95
|
-
* @param lastEditedTracker - The last edited tracker.
|
|
96
|
-
* @param runtime - The container runtime whose messages are to be tracked.
|
|
97
|
-
* @param shouldDiscardMessageFn - Function that tells if a message should not be considered in computing last edited.
|
|
98
|
-
*
|
|
99
|
-
* @public
|
|
100
|
-
*/
|
|
101
|
-
export declare function setupLastEditedTrackerForContainer(lastEditedTracker: IFluidLastEditedTracker, runtime: IContainerRuntime, shouldDiscardMessageFn?: (message: ISequencedDocumentMessage) => boolean): void;
|
|
102
|
-
|
|
103
|
-
export { }
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import { DataObject } from '@fluidframework/aqueduct';
|
|
2
|
-
import { DataObjectFactory } from '@fluidframework/aqueduct';
|
|
3
|
-
import { IContainerRuntime } from '@fluidframework/container-runtime-definitions';
|
|
4
|
-
import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
|
|
5
|
-
import { IUser } from '@fluidframework/protocol-definitions';
|
|
6
|
-
import { SharedSummaryBlock } from '@fluidframework/shared-summary-block';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* @public
|
|
10
|
-
*/
|
|
11
|
-
export declare const IFluidLastEditedTracker: keyof IProvideFluidLastEditedTracker;
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* @public
|
|
15
|
-
*/
|
|
16
|
-
export declare interface IFluidLastEditedTracker extends IProvideFluidLastEditedTracker {
|
|
17
|
-
/**
|
|
18
|
-
* Returns the details of the last edit to the container.
|
|
19
|
-
*/
|
|
20
|
-
getLastEditDetails(): ILastEditDetails | undefined;
|
|
21
|
-
/**
|
|
22
|
-
* Updates the details of last edit to the container.
|
|
23
|
-
*/
|
|
24
|
-
updateLastEditDetails(lastEditDetails: ILastEditDetails): void;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* @public
|
|
29
|
-
*/
|
|
30
|
-
export declare interface ILastEditDetails {
|
|
31
|
-
user: IUser;
|
|
32
|
-
timestamp: number;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* @public
|
|
37
|
-
*/
|
|
38
|
-
export declare interface IProvideFluidLastEditedTracker {
|
|
39
|
-
readonly IFluidLastEditedTracker: IFluidLastEditedTracker;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* Tracks the last edit details such as the last edited user details and the last edited timestamp. The last edited
|
|
44
|
-
* details should be updated (via updateLastEditDetails) in response to a remote op since it uses shared summary block
|
|
45
|
-
* as storage.
|
|
46
|
-
*
|
|
47
|
-
* @public
|
|
48
|
-
*/
|
|
49
|
-
export declare class LastEditedTracker implements IFluidLastEditedTracker {
|
|
50
|
-
private readonly sharedSummaryBlock;
|
|
51
|
-
private readonly lastEditedDetailsKey;
|
|
52
|
-
/**
|
|
53
|
-
* Creates a LastEditedTracker object.
|
|
54
|
-
* @param sharedSummaryBlock - The shared summary block where the details will be stored.
|
|
55
|
-
*/
|
|
56
|
-
constructor(sharedSummaryBlock: SharedSummaryBlock);
|
|
57
|
-
get IFluidLastEditedTracker(): LastEditedTracker;
|
|
58
|
-
/**
|
|
59
|
-
* {@inheritDoc (IFluidLastEditedTracker:interface).getLastEditDetails}
|
|
60
|
-
*/
|
|
61
|
-
getLastEditDetails(): ILastEditDetails | undefined;
|
|
62
|
-
/**
|
|
63
|
-
* {@inheritDoc (IFluidLastEditedTracker:interface).updateLastEditDetails}
|
|
64
|
-
*/
|
|
65
|
-
updateLastEditDetails(lastEditDetails: ILastEditDetails): void;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* LastEditedTrackerDataObject creates a LastEditedTracker that keeps track of the latest edits to the document.
|
|
70
|
-
*
|
|
71
|
-
* @public
|
|
72
|
-
*/
|
|
73
|
-
export declare class LastEditedTrackerDataObject extends DataObject implements IProvideFluidLastEditedTracker {
|
|
74
|
-
private static readonly factory;
|
|
75
|
-
static getFactory(): DataObjectFactory<LastEditedTrackerDataObject>;
|
|
76
|
-
private readonly sharedSummaryBlockId;
|
|
77
|
-
private _lastEditedTracker;
|
|
78
|
-
private get lastEditedTracker();
|
|
79
|
-
get IFluidLastEditedTracker(): LastEditedTracker;
|
|
80
|
-
protected initializingFirstTime(): Promise<void>;
|
|
81
|
-
protected hasInitialized(): Promise<void>;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* Helper function to set up a data object that provides IFluidLastEditedTracker to track last edited in a Container.
|
|
86
|
-
*
|
|
87
|
-
* It does the following:
|
|
88
|
-
*
|
|
89
|
-
* - Registers an "op" listener on the runtime. On each message, it calls the shouldDiscardMessageFn to check
|
|
90
|
-
* if the message should be discarded. It also discards all scheduler message. If a message is not discarded,
|
|
91
|
-
* it passes the last edited information from the message to the last edited tracker.
|
|
92
|
-
*
|
|
93
|
-
* - The last edited information from the last message received before the lastEditedTracker is
|
|
94
|
-
* loaded is stored and passed to the tracker once it loads.
|
|
95
|
-
* @param lastEditedTracker - The last edited tracker.
|
|
96
|
-
* @param runtime - The container runtime whose messages are to be tracked.
|
|
97
|
-
* @param shouldDiscardMessageFn - Function that tells if a message should not be considered in computing last edited.
|
|
98
|
-
*
|
|
99
|
-
* @public
|
|
100
|
-
*/
|
|
101
|
-
export declare function setupLastEditedTrackerForContainer(lastEditedTracker: IFluidLastEditedTracker, runtime: IContainerRuntime, shouldDiscardMessageFn?: (message: ISequencedDocumentMessage) => boolean): void;
|
|
102
|
-
|
|
103
|
-
export { }
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import { DataObject } from '@fluidframework/aqueduct';
|
|
2
|
-
import { DataObjectFactory } from '@fluidframework/aqueduct';
|
|
3
|
-
import { IContainerRuntime } from '@fluidframework/container-runtime-definitions';
|
|
4
|
-
import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
|
|
5
|
-
import { IUser } from '@fluidframework/protocol-definitions';
|
|
6
|
-
import { SharedSummaryBlock } from '@fluidframework/shared-summary-block';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* @public
|
|
10
|
-
*/
|
|
11
|
-
export declare const IFluidLastEditedTracker: keyof IProvideFluidLastEditedTracker;
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* @public
|
|
15
|
-
*/
|
|
16
|
-
export declare interface IFluidLastEditedTracker extends IProvideFluidLastEditedTracker {
|
|
17
|
-
/**
|
|
18
|
-
* Returns the details of the last edit to the container.
|
|
19
|
-
*/
|
|
20
|
-
getLastEditDetails(): ILastEditDetails | undefined;
|
|
21
|
-
/**
|
|
22
|
-
* Updates the details of last edit to the container.
|
|
23
|
-
*/
|
|
24
|
-
updateLastEditDetails(lastEditDetails: ILastEditDetails): void;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* @public
|
|
29
|
-
*/
|
|
30
|
-
export declare interface ILastEditDetails {
|
|
31
|
-
user: IUser;
|
|
32
|
-
timestamp: number;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* @public
|
|
37
|
-
*/
|
|
38
|
-
export declare interface IProvideFluidLastEditedTracker {
|
|
39
|
-
readonly IFluidLastEditedTracker: IFluidLastEditedTracker;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* Tracks the last edit details such as the last edited user details and the last edited timestamp. The last edited
|
|
44
|
-
* details should be updated (via updateLastEditDetails) in response to a remote op since it uses shared summary block
|
|
45
|
-
* as storage.
|
|
46
|
-
*
|
|
47
|
-
* @public
|
|
48
|
-
*/
|
|
49
|
-
export declare class LastEditedTracker implements IFluidLastEditedTracker {
|
|
50
|
-
private readonly sharedSummaryBlock;
|
|
51
|
-
private readonly lastEditedDetailsKey;
|
|
52
|
-
/**
|
|
53
|
-
* Creates a LastEditedTracker object.
|
|
54
|
-
* @param sharedSummaryBlock - The shared summary block where the details will be stored.
|
|
55
|
-
*/
|
|
56
|
-
constructor(sharedSummaryBlock: SharedSummaryBlock);
|
|
57
|
-
get IFluidLastEditedTracker(): LastEditedTracker;
|
|
58
|
-
/**
|
|
59
|
-
* {@inheritDoc (IFluidLastEditedTracker:interface).getLastEditDetails}
|
|
60
|
-
*/
|
|
61
|
-
getLastEditDetails(): ILastEditDetails | undefined;
|
|
62
|
-
/**
|
|
63
|
-
* {@inheritDoc (IFluidLastEditedTracker:interface).updateLastEditDetails}
|
|
64
|
-
*/
|
|
65
|
-
updateLastEditDetails(lastEditDetails: ILastEditDetails): void;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* LastEditedTrackerDataObject creates a LastEditedTracker that keeps track of the latest edits to the document.
|
|
70
|
-
*
|
|
71
|
-
* @public
|
|
72
|
-
*/
|
|
73
|
-
export declare class LastEditedTrackerDataObject extends DataObject implements IProvideFluidLastEditedTracker {
|
|
74
|
-
private static readonly factory;
|
|
75
|
-
static getFactory(): DataObjectFactory<LastEditedTrackerDataObject>;
|
|
76
|
-
private readonly sharedSummaryBlockId;
|
|
77
|
-
private _lastEditedTracker;
|
|
78
|
-
private get lastEditedTracker();
|
|
79
|
-
get IFluidLastEditedTracker(): LastEditedTracker;
|
|
80
|
-
protected initializingFirstTime(): Promise<void>;
|
|
81
|
-
protected hasInitialized(): Promise<void>;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* Helper function to set up a data object that provides IFluidLastEditedTracker to track last edited in a Container.
|
|
86
|
-
*
|
|
87
|
-
* It does the following:
|
|
88
|
-
*
|
|
89
|
-
* - Registers an "op" listener on the runtime. On each message, it calls the shouldDiscardMessageFn to check
|
|
90
|
-
* if the message should be discarded. It also discards all scheduler message. If a message is not discarded,
|
|
91
|
-
* it passes the last edited information from the message to the last edited tracker.
|
|
92
|
-
*
|
|
93
|
-
* - The last edited information from the last message received before the lastEditedTracker is
|
|
94
|
-
* loaded is stored and passed to the tracker once it loads.
|
|
95
|
-
* @param lastEditedTracker - The last edited tracker.
|
|
96
|
-
* @param runtime - The container runtime whose messages are to be tracked.
|
|
97
|
-
* @param shouldDiscardMessageFn - Function that tells if a message should not be considered in computing last edited.
|
|
98
|
-
*
|
|
99
|
-
* @public
|
|
100
|
-
*/
|
|
101
|
-
export declare function setupLastEditedTrackerForContainer(lastEditedTracker: IFluidLastEditedTracker, runtime: IContainerRuntime, shouldDiscardMessageFn?: (message: ISequencedDocumentMessage) => boolean): void;
|
|
102
|
-
|
|
103
|
-
export { }
|