@atlaskit/editor-synced-block-provider 3.2.2 → 3.3.0
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
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @atlaskit/editor-synced-block-provider
|
|
2
2
|
|
|
3
|
+
## 3.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`bf49041938d1a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/bf49041938d1a) -
|
|
8
|
+
EDITOR-2257 editor synced blocks ssr part 1
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
|
|
3
14
|
## 3.2.2
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
|
@@ -46,10 +46,22 @@ var mapBlockError = function mapBlockError(error) {
|
|
|
46
46
|
// - sourceTitle
|
|
47
47
|
// - isSynced
|
|
48
48
|
var convertToSyncBlockData = function convertToSyncBlockData(data) {
|
|
49
|
+
var createdAt;
|
|
50
|
+
if (data.createdAt) {
|
|
51
|
+
try {
|
|
52
|
+
// BE returns microseconds, convert to milliseconds
|
|
53
|
+
// BE should fix this in the future
|
|
54
|
+
createdAt = new Date(data.createdAt / 1000).toISOString();
|
|
55
|
+
} catch (e) {
|
|
56
|
+
// fallback to undefined
|
|
57
|
+
// as we don't want to block the whole process due to invalid date
|
|
58
|
+
createdAt = undefined;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
49
61
|
return {
|
|
50
62
|
blockInstanceId: data.blockInstanceId,
|
|
51
63
|
content: JSON.parse(data.content),
|
|
52
|
-
createdAt:
|
|
64
|
+
createdAt: createdAt,
|
|
53
65
|
createdBy: data.createdBy,
|
|
54
66
|
product: data.product,
|
|
55
67
|
resourceId: data.blockAri,
|
|
@@ -33,10 +33,22 @@ const mapBlockError = error => {
|
|
|
33
33
|
// - sourceTitle
|
|
34
34
|
// - isSynced
|
|
35
35
|
const convertToSyncBlockData = data => {
|
|
36
|
+
let createdAt;
|
|
37
|
+
if (data.createdAt) {
|
|
38
|
+
try {
|
|
39
|
+
// BE returns microseconds, convert to milliseconds
|
|
40
|
+
// BE should fix this in the future
|
|
41
|
+
createdAt = new Date(data.createdAt / 1000).toISOString();
|
|
42
|
+
} catch (e) {
|
|
43
|
+
// fallback to undefined
|
|
44
|
+
// as we don't want to block the whole process due to invalid date
|
|
45
|
+
createdAt = undefined;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
36
48
|
return {
|
|
37
49
|
blockInstanceId: data.blockInstanceId,
|
|
38
50
|
content: JSON.parse(data.content),
|
|
39
|
-
createdAt
|
|
51
|
+
createdAt,
|
|
40
52
|
createdBy: data.createdBy,
|
|
41
53
|
product: data.product,
|
|
42
54
|
resourceId: data.blockAri,
|
|
@@ -38,10 +38,22 @@ var mapBlockError = function mapBlockError(error) {
|
|
|
38
38
|
// - sourceTitle
|
|
39
39
|
// - isSynced
|
|
40
40
|
var convertToSyncBlockData = function convertToSyncBlockData(data) {
|
|
41
|
+
var createdAt;
|
|
42
|
+
if (data.createdAt) {
|
|
43
|
+
try {
|
|
44
|
+
// BE returns microseconds, convert to milliseconds
|
|
45
|
+
// BE should fix this in the future
|
|
46
|
+
createdAt = new Date(data.createdAt / 1000).toISOString();
|
|
47
|
+
} catch (e) {
|
|
48
|
+
// fallback to undefined
|
|
49
|
+
// as we don't want to block the whole process due to invalid date
|
|
50
|
+
createdAt = undefined;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
41
53
|
return {
|
|
42
54
|
blockInstanceId: data.blockInstanceId,
|
|
43
55
|
content: JSON.parse(data.content),
|
|
44
|
-
createdAt:
|
|
56
|
+
createdAt: createdAt,
|
|
45
57
|
createdBy: data.createdBy,
|
|
46
58
|
product: data.product,
|
|
47
59
|
resourceId: data.blockAri,
|
package/package.json
CHANGED