@cocreate/crdt 1.8.28 → 1.9.1
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 +28 -0
- package/docs/index.html +1 -1
- package/package.json +5 -5
- package/src/index.js +6 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,31 @@
|
|
|
1
|
+
## [1.9.1](https://github.com/CoCreate-app/CoCreate-crdt/compare/v1.9.0...v1.9.1) (2022-02-01)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* update dependency versions ([b2ed9b4](https://github.com/CoCreate-app/CoCreate-crdt/commit/b2ed9b488067ec85e011e6291c047f617145d1c1))
|
|
7
|
+
|
|
8
|
+
# [1.9.0](https://github.com/CoCreate-app/CoCreate-crdt/compare/v1.8.30...v1.9.0) (2022-01-31)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* provide updated string to localChange update event ([83534dd](https://github.com/CoCreate-app/CoCreate-crdt/commit/83534dd74b868c4f1fdd35f1ae683e19cac33ec7))
|
|
14
|
+
|
|
15
|
+
## [1.8.30](https://github.com/CoCreate-app/CoCreate-crdt/compare/v1.8.29...v1.8.30) (2022-01-01)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* get-value attribute value now supports a selector added # to all values currently in get-value attributes ([81954c4](https://github.com/CoCreate-app/CoCreate-crdt/commit/81954c4fffdbc08d0624a4cd77356b23f18665ff))
|
|
21
|
+
|
|
22
|
+
## [1.8.29](https://github.com/CoCreate-app/CoCreate-crdt/compare/v1.8.28...v1.8.29) (2021-12-15)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Bug Fixes
|
|
26
|
+
|
|
27
|
+
* update dependencies ([3b27a66](https://github.com/CoCreate-app/CoCreate-crdt/commit/3b27a6686d2e8c271eb9cc0d51dca6273a69f8de))
|
|
28
|
+
|
|
1
29
|
## [1.8.28](https://github.com/CoCreate-app/CoCreate-crdt/compare/v1.8.27...v1.8.28) (2021-12-14)
|
|
2
30
|
|
|
3
31
|
|
package/docs/index.html
CHANGED
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
<div class="svSplitter svHorizontal"> </div>
|
|
88
88
|
|
|
89
89
|
<div class="svPanel">
|
|
90
|
-
<iframe get-value="demo" frameBorder="0" height="100%" width="100%" class="min-width:300px"></iframe>
|
|
90
|
+
<iframe get-value="#demo" frameBorder="0" height="100%" width="100%" class="min-width:300px"></iframe>
|
|
91
91
|
</div>
|
|
92
92
|
|
|
93
93
|
</div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cocreate/crdt",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.9.1",
|
|
4
4
|
"description": "CoCreate crdt",
|
|
5
5
|
"author": "CoCreate LLC",
|
|
6
6
|
"license": "SEE LICENSE",
|
|
@@ -43,9 +43,9 @@
|
|
|
43
43
|
"webpack-log": "^3.0.1"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@cocreate/actions": "^1.3.
|
|
47
|
-
"@cocreate/crud-client": "^1.4.
|
|
48
|
-
"@cocreate/message-client": "^1.1.
|
|
49
|
-
"@cocreate/utils": "^1.
|
|
46
|
+
"@cocreate/actions": "^1.3.28",
|
|
47
|
+
"@cocreate/crud-client": "^1.4.43",
|
|
48
|
+
"@cocreate/message-client": "^1.1.60",
|
|
49
|
+
"@cocreate/utils": "^1.5.0"
|
|
50
50
|
}
|
|
51
51
|
}
|
package/src/index.js
CHANGED
|
@@ -147,16 +147,17 @@ function insertChange(info, broadcast, flag) {
|
|
|
147
147
|
changeLog.push(change);
|
|
148
148
|
let string = name.get('text') || '';
|
|
149
149
|
name.set('text', string.customSplice(change.start, change.length, change.value));
|
|
150
|
-
|
|
150
|
+
string = {string: name.get('text')};
|
|
151
|
+
|
|
151
152
|
if(!info.clientId){
|
|
152
153
|
info['datetime'] = change.datetime;
|
|
153
154
|
info['clientId'] = change.clientId;
|
|
154
155
|
|
|
155
156
|
broadcastChange(info);
|
|
156
|
-
localChange(info);
|
|
157
|
+
localChange(info, string);
|
|
157
158
|
}
|
|
158
159
|
else
|
|
159
|
-
localChange(info);
|
|
160
|
+
localChange(info, string);
|
|
160
161
|
|
|
161
162
|
if (info.clientId == clientId && info.save != "false")
|
|
162
163
|
persistChange(info);
|
|
@@ -181,9 +182,9 @@ function broadcastChange(info){
|
|
|
181
182
|
});
|
|
182
183
|
}
|
|
183
184
|
|
|
184
|
-
function localChange(data) {
|
|
185
|
+
function localChange(data, string) {
|
|
185
186
|
const localChange = new CustomEvent('cocreate-crdt-update', {
|
|
186
|
-
detail: { ...data },
|
|
187
|
+
detail: { ...data, ...string },
|
|
187
188
|
});
|
|
188
189
|
window.dispatchEvent(localChange);
|
|
189
190
|
}
|