@fluid-experimental/last-edited 2.0.0-dev.7.3.0.209023 → 2.0.0-dev.7.3.0.209831
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/README.md +26 -6
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @fluid-experimental/last-edited
|
|
2
2
|
|
|
3
|
+
<!-- AUTO-GENERATED-CONTENT:START (README_PACKAGE_SCOPE_NOTICE) -->
|
|
4
|
+
|
|
5
|
+
**IMPORTANT: This package is experimental.**
|
|
6
|
+
**Its APIs may change without notice.**
|
|
7
|
+
|
|
8
|
+
**Do not use in production scenarios.**
|
|
9
|
+
|
|
10
|
+
<!-- AUTO-GENERATED-CONTENT:END -->
|
|
11
|
+
|
|
3
12
|
LastEditedTracker tracks the last edit to a document, such as the client who last edited the document and the time it happened.
|
|
4
13
|
|
|
5
14
|
It is created by passing a `SharedSummaryBlock`:
|
|
@@ -26,13 +35,13 @@ The update should always be called in response to a remote op because:
|
|
|
26
35
|
|
|
27
36
|
The details returned in getLastEditDetails contain the `IUser` object and the `timestamp` of the last edit.
|
|
28
37
|
|
|
29
|
-
|
|
38
|
+
## Last Edited Tracker Data Store
|
|
30
39
|
|
|
31
40
|
LastEditedTrackerDataObject is a runtime data store built on top of the LastEditedTracker. It creates and manages the SharedSummaryBlock so that the developer doesn't have to know about it or manage it.
|
|
32
41
|
|
|
33
42
|
It implements IProvideFluidLastEditedTracker and returns an IFluidLastEditedTracker which is an instance of LastEditedTracker above.
|
|
34
43
|
|
|
35
|
-
|
|
44
|
+
## Setup
|
|
36
45
|
|
|
37
46
|
This package also provides a `setupLastEditedTrackerForContainer` method that can be used to set up a data store that provides IFluidLastEditedTracker to track last edited in a Container:
|
|
38
47
|
|
|
@@ -54,9 +63,9 @@ function shouldDiscardMessageDefault(message: ISequencedDocumentMessage) {
|
|
|
54
63
|
|
|
55
64
|
- To discard specific ops, provide the `shouldDiscardMessageFn` funtion that takes in the message and returns a boolean indicating if the message should be discarded.
|
|
56
65
|
|
|
57
|
-
|
|
66
|
+
## Usage
|
|
58
67
|
|
|
59
|
-
|
|
68
|
+
### For tracking the last edit on a Container:
|
|
60
69
|
|
|
61
70
|
In instantiateRuntime, create a data store that implements IFluidLastEditedTracker. Then call `setupLastEditedTrackerForContainer` with the id of the data store:
|
|
62
71
|
|
|
@@ -88,8 +97,19 @@ const root = response.value;
|
|
|
88
97
|
const lastEditedTracker = root.IFluidLastEditedTracker;
|
|
89
98
|
```
|
|
90
99
|
|
|
100
|
+
<!-- AUTO-GENERATED-CONTENT:START (README_TRADEMARK_SECTION:includeHeading=TRUE) -->
|
|
101
|
+
|
|
102
|
+
<!-- prettier-ignore-start -->
|
|
103
|
+
<!-- NOTE: This section is automatically generated using @fluid-tools/markdown-magic. Do not update these generated contents directly. -->
|
|
104
|
+
|
|
91
105
|
## Trademark
|
|
92
106
|
|
|
93
|
-
This project may contain Microsoft trademarks or logos for Microsoft projects, products, or services.
|
|
94
|
-
|
|
107
|
+
This project may contain Microsoft trademarks or logos for Microsoft projects, products, or services.
|
|
108
|
+
|
|
109
|
+
Use of these trademarks or logos must follow Microsoft's [Trademark & Brand Guidelines](https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/general).
|
|
110
|
+
|
|
95
111
|
Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship.
|
|
112
|
+
|
|
113
|
+
<!-- prettier-ignore-end -->
|
|
114
|
+
|
|
115
|
+
<!-- AUTO-GENERATED-CONTENT:END -->
|
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.0.
|
|
3
|
+
"version": "2.0.0-dev.7.3.0.209831",
|
|
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.3.0.
|
|
39
|
-
"@fluidframework/container-runtime": "2.0.0-dev.7.3.0.
|
|
40
|
-
"@fluidframework/container-runtime-definitions": "2.0.0-dev.7.3.0.
|
|
41
|
-
"@fluidframework/core-interfaces": "2.0.0-dev.7.3.0.
|
|
38
|
+
"@fluidframework/aqueduct": "2.0.0-dev.7.3.0.209831",
|
|
39
|
+
"@fluidframework/container-runtime": "2.0.0-dev.7.3.0.209831",
|
|
40
|
+
"@fluidframework/container-runtime-definitions": "2.0.0-dev.7.3.0.209831",
|
|
41
|
+
"@fluidframework/core-interfaces": "2.0.0-dev.7.3.0.209831",
|
|
42
42
|
"@fluidframework/protocol-definitions": "^3.0.0",
|
|
43
|
-
"@fluidframework/runtime-utils": "2.0.0-dev.7.3.0.
|
|
44
|
-
"@fluidframework/shared-summary-block": "2.0.0-dev.7.3.0.
|
|
43
|
+
"@fluidframework/runtime-utils": "2.0.0-dev.7.3.0.209831",
|
|
44
|
+
"@fluidframework/shared-summary-block": "2.0.0-dev.7.3.0.209831"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@fluid-tools/build-cli": "^0.26.1",
|
|
48
48
|
"@fluidframework/build-common": "^2.0.3",
|
|
49
49
|
"@fluidframework/build-tools": "^0.26.1",
|
|
50
50
|
"@fluidframework/eslint-config-fluid": "^3.1.0",
|
|
51
|
-
"@fluidframework/mocha-test-setup": "2.0.0-dev.7.3.0.
|
|
51
|
+
"@fluidframework/mocha-test-setup": "2.0.0-dev.7.3.0.209831",
|
|
52
52
|
"@microsoft/api-extractor": "^7.37.0",
|
|
53
53
|
"@types/node": "^16.18.38",
|
|
54
54
|
"eslint": "~8.50.0",
|