@atlaskit/editor-synced-block-provider 8.6.7 → 8.6.8
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 +8 -0
- package/dist/cjs/store-manager/sourceSyncBlockStoreManager.js +12 -4
- package/dist/es2019/store-manager/sourceSyncBlockStoreManager.js +10 -4
- package/dist/esm/store-manager/sourceSyncBlockStoreManager.js +12 -4
- package/dist/types/store-manager/sourceSyncBlockStoreManager.d.ts +3 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/editor-synced-block-provider
|
|
2
2
|
|
|
3
|
+
## 8.6.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`ead18351c8a3c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ead18351c8a3c) -
|
|
8
|
+
Add educational guidance to synced block copy confirmation flags in the activation experiment.
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
3
11
|
## 8.6.7
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -388,6 +388,14 @@ var SourceSyncBlockStoreManager = exports.SourceSyncBlockStoreManager = /*#__PUR
|
|
|
388
388
|
return this.creationCompletionCallbacks.size > 0;
|
|
389
389
|
}
|
|
390
390
|
|
|
391
|
+
/** Returns the source block's last known backend publication status. */
|
|
392
|
+
}, {
|
|
393
|
+
key: "getStatus",
|
|
394
|
+
value: function getStatus(resourceId) {
|
|
395
|
+
var _this$syncBlockCache$;
|
|
396
|
+
return (_this$syncBlockCache$ = this.syncBlockCache.get(resourceId)) === null || _this$syncBlockCache$ === void 0 ? void 0 : _this$syncBlockCache$.status;
|
|
397
|
+
}
|
|
398
|
+
|
|
391
399
|
/**
|
|
392
400
|
* Fires callback to insert node (if creation is successful) and clears pending creation data
|
|
393
401
|
* @param success
|
|
@@ -428,8 +436,8 @@ var SourceSyncBlockStoreManager = exports.SourceSyncBlockStoreManager = /*#__PUR
|
|
|
428
436
|
// Operational create-success event with the join key + creation-type
|
|
429
437
|
// signals (inputMethod / createdEmpty) captured at the command layer.
|
|
430
438
|
if ((0, _platformFeatureFlags.fg)('platform_editor_blocks_patch_4')) {
|
|
431
|
-
var _this$fireAnalyticsEv5, _this$syncBlockCache
|
|
432
|
-
(_this$fireAnalyticsEv5 = this.fireAnalyticsEvent) === null || _this$fireAnalyticsEv5 === void 0 || _this$fireAnalyticsEv5.call(this, (0, _errorHandling.createSuccessOperationalPayload)(resourceId || '', (_this$syncBlockCache$ = this.syncBlockCache.get(resourceId)) === null || _this$syncBlockCache$ === void 0 ? void 0 : _this$syncBlockCache
|
|
439
|
+
var _this$fireAnalyticsEv5, _this$syncBlockCache$2;
|
|
440
|
+
(_this$fireAnalyticsEv5 = this.fireAnalyticsEvent) === null || _this$fireAnalyticsEv5 === void 0 || _this$fireAnalyticsEv5.call(this, (0, _errorHandling.createSuccessOperationalPayload)(resourceId || '', (_this$syncBlockCache$2 = this.syncBlockCache.get(resourceId)) === null || _this$syncBlockCache$2 === void 0 ? void 0 : _this$syncBlockCache$2.blockInstanceId, sourceProduct, this.creationEnrichment.get(resourceId)));
|
|
433
441
|
}
|
|
434
442
|
} else {
|
|
435
443
|
var _this$fireAnalyticsEv6;
|
|
@@ -622,7 +630,7 @@ var SourceSyncBlockStoreManager = exports.SourceSyncBlockStoreManager = /*#__PUR
|
|
|
622
630
|
}, {
|
|
623
631
|
key: "emitDeleteSuccess",
|
|
624
632
|
value: function emitDeleteSuccess(resourceId, reason, mechanism) {
|
|
625
|
-
var _this$syncBlockCache$
|
|
633
|
+
var _this$syncBlockCache$3, _this$fireAnalyticsEv0;
|
|
626
634
|
var sourceProduct = (0, _utils.getSourceProductFromResourceIdSafe)(resourceId);
|
|
627
635
|
if (!(0, _platformFeatureFlags.fg)('platform_editor_blocks_patch_4')) {
|
|
628
636
|
var _this$fireAnalyticsEv9;
|
|
@@ -637,7 +645,7 @@ var SourceSyncBlockStoreManager = exports.SourceSyncBlockStoreManager = /*#__PUR
|
|
|
637
645
|
this.pruneRecentDeleteEmissions(now);
|
|
638
646
|
this.recentDeleteEmissions.set(resourceId, now);
|
|
639
647
|
var enrichment = {
|
|
640
|
-
blockInstanceId: (_this$syncBlockCache$
|
|
648
|
+
blockInstanceId: (_this$syncBlockCache$3 = this.syncBlockCache.get(resourceId)) === null || _this$syncBlockCache$3 === void 0 ? void 0 : _this$syncBlockCache$3.blockInstanceId,
|
|
641
649
|
deletionReason: reason,
|
|
642
650
|
mechanism: mechanism
|
|
643
651
|
};
|
|
@@ -317,6 +317,12 @@ export class SourceSyncBlockStoreManager {
|
|
|
317
317
|
return this.creationCompletionCallbacks.size > 0;
|
|
318
318
|
}
|
|
319
319
|
|
|
320
|
+
/** Returns the source block's last known backend publication status. */
|
|
321
|
+
getStatus(resourceId) {
|
|
322
|
+
var _this$syncBlockCache$;
|
|
323
|
+
return (_this$syncBlockCache$ = this.syncBlockCache.get(resourceId)) === null || _this$syncBlockCache$ === void 0 ? void 0 : _this$syncBlockCache$.status;
|
|
324
|
+
}
|
|
325
|
+
|
|
320
326
|
/**
|
|
321
327
|
* Fires callback to insert node (if creation is successful) and clears pending creation data
|
|
322
328
|
* @param success
|
|
@@ -355,8 +361,8 @@ export class SourceSyncBlockStoreManager {
|
|
|
355
361
|
// Operational create-success event with the join key + creation-type
|
|
356
362
|
// signals (inputMethod / createdEmpty) captured at the command layer.
|
|
357
363
|
if (fg('platform_editor_blocks_patch_4')) {
|
|
358
|
-
var _this$fireAnalyticsEv7, _this$syncBlockCache
|
|
359
|
-
(_this$fireAnalyticsEv7 = this.fireAnalyticsEvent) === null || _this$fireAnalyticsEv7 === void 0 ? void 0 : _this$fireAnalyticsEv7.call(this, createSuccessOperationalPayload(resourceId || '', (_this$syncBlockCache$ = this.syncBlockCache.get(resourceId)) === null || _this$syncBlockCache$ === void 0 ? void 0 : _this$syncBlockCache
|
|
364
|
+
var _this$fireAnalyticsEv7, _this$syncBlockCache$2;
|
|
365
|
+
(_this$fireAnalyticsEv7 = this.fireAnalyticsEvent) === null || _this$fireAnalyticsEv7 === void 0 ? void 0 : _this$fireAnalyticsEv7.call(this, createSuccessOperationalPayload(resourceId || '', (_this$syncBlockCache$2 = this.syncBlockCache.get(resourceId)) === null || _this$syncBlockCache$2 === void 0 ? void 0 : _this$syncBlockCache$2.blockInstanceId, sourceProduct, this.creationEnrichment.get(resourceId)));
|
|
360
366
|
}
|
|
361
367
|
} else {
|
|
362
368
|
var _this$fireAnalyticsEv8;
|
|
@@ -524,7 +530,7 @@ export class SourceSyncBlockStoreManager {
|
|
|
524
530
|
* while the cache entry still exists so `blockInstanceId` is available.
|
|
525
531
|
*/
|
|
526
532
|
emitDeleteSuccess(resourceId, reason, mechanism) {
|
|
527
|
-
var _this$syncBlockCache$
|
|
533
|
+
var _this$syncBlockCache$3, _this$fireAnalyticsEv12;
|
|
528
534
|
const sourceProduct = getSourceProductFromResourceIdSafe(resourceId);
|
|
529
535
|
if (!fg('platform_editor_blocks_patch_4')) {
|
|
530
536
|
var _this$fireAnalyticsEv11;
|
|
@@ -539,7 +545,7 @@ export class SourceSyncBlockStoreManager {
|
|
|
539
545
|
this.pruneRecentDeleteEmissions(now);
|
|
540
546
|
this.recentDeleteEmissions.set(resourceId, now);
|
|
541
547
|
const enrichment = {
|
|
542
|
-
blockInstanceId: (_this$syncBlockCache$
|
|
548
|
+
blockInstanceId: (_this$syncBlockCache$3 = this.syncBlockCache.get(resourceId)) === null || _this$syncBlockCache$3 === void 0 ? void 0 : _this$syncBlockCache$3.blockInstanceId,
|
|
543
549
|
deletionReason: reason,
|
|
544
550
|
mechanism
|
|
545
551
|
};
|
|
@@ -381,6 +381,14 @@ export var SourceSyncBlockStoreManager = /*#__PURE__*/function () {
|
|
|
381
381
|
return this.creationCompletionCallbacks.size > 0;
|
|
382
382
|
}
|
|
383
383
|
|
|
384
|
+
/** Returns the source block's last known backend publication status. */
|
|
385
|
+
}, {
|
|
386
|
+
key: "getStatus",
|
|
387
|
+
value: function getStatus(resourceId) {
|
|
388
|
+
var _this$syncBlockCache$;
|
|
389
|
+
return (_this$syncBlockCache$ = this.syncBlockCache.get(resourceId)) === null || _this$syncBlockCache$ === void 0 ? void 0 : _this$syncBlockCache$.status;
|
|
390
|
+
}
|
|
391
|
+
|
|
384
392
|
/**
|
|
385
393
|
* Fires callback to insert node (if creation is successful) and clears pending creation data
|
|
386
394
|
* @param success
|
|
@@ -421,8 +429,8 @@ export var SourceSyncBlockStoreManager = /*#__PURE__*/function () {
|
|
|
421
429
|
// Operational create-success event with the join key + creation-type
|
|
422
430
|
// signals (inputMethod / createdEmpty) captured at the command layer.
|
|
423
431
|
if (fg('platform_editor_blocks_patch_4')) {
|
|
424
|
-
var _this$fireAnalyticsEv5, _this$syncBlockCache
|
|
425
|
-
(_this$fireAnalyticsEv5 = this.fireAnalyticsEvent) === null || _this$fireAnalyticsEv5 === void 0 || _this$fireAnalyticsEv5.call(this, createSuccessOperationalPayload(resourceId || '', (_this$syncBlockCache$ = this.syncBlockCache.get(resourceId)) === null || _this$syncBlockCache$ === void 0 ? void 0 : _this$syncBlockCache
|
|
432
|
+
var _this$fireAnalyticsEv5, _this$syncBlockCache$2;
|
|
433
|
+
(_this$fireAnalyticsEv5 = this.fireAnalyticsEvent) === null || _this$fireAnalyticsEv5 === void 0 || _this$fireAnalyticsEv5.call(this, createSuccessOperationalPayload(resourceId || '', (_this$syncBlockCache$2 = this.syncBlockCache.get(resourceId)) === null || _this$syncBlockCache$2 === void 0 ? void 0 : _this$syncBlockCache$2.blockInstanceId, sourceProduct, this.creationEnrichment.get(resourceId)));
|
|
426
434
|
}
|
|
427
435
|
} else {
|
|
428
436
|
var _this$fireAnalyticsEv6;
|
|
@@ -615,7 +623,7 @@ export var SourceSyncBlockStoreManager = /*#__PURE__*/function () {
|
|
|
615
623
|
}, {
|
|
616
624
|
key: "emitDeleteSuccess",
|
|
617
625
|
value: function emitDeleteSuccess(resourceId, reason, mechanism) {
|
|
618
|
-
var _this$syncBlockCache$
|
|
626
|
+
var _this$syncBlockCache$3, _this$fireAnalyticsEv0;
|
|
619
627
|
var sourceProduct = getSourceProductFromResourceIdSafe(resourceId);
|
|
620
628
|
if (!fg('platform_editor_blocks_patch_4')) {
|
|
621
629
|
var _this$fireAnalyticsEv9;
|
|
@@ -630,7 +638,7 @@ export var SourceSyncBlockStoreManager = /*#__PURE__*/function () {
|
|
|
630
638
|
this.pruneRecentDeleteEmissions(now);
|
|
631
639
|
this.recentDeleteEmissions.set(resourceId, now);
|
|
632
640
|
var enrichment = {
|
|
633
|
-
blockInstanceId: (_this$syncBlockCache$
|
|
641
|
+
blockInstanceId: (_this$syncBlockCache$3 = this.syncBlockCache.get(resourceId)) === null || _this$syncBlockCache$3 === void 0 ? void 0 : _this$syncBlockCache$3.blockInstanceId,
|
|
634
642
|
deletionReason: reason,
|
|
635
643
|
mechanism: mechanism
|
|
636
644
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { SyncBlockEventPayload } from '@atlaskit/editor-common/analytics';
|
|
2
2
|
import type { ViewMode } from '@atlaskit/editor-plugin-editor-viewmode';
|
|
3
3
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
4
|
-
import type { ResourceId, SyncBlockAttrs, BlockInstanceId, DeletionReason, DeletionMechanism, ReferenceSyncBlockData } from '../common/types';
|
|
4
|
+
import type { ResourceId, SyncBlockAttrs, BlockInstanceId, DeletionReason, DeletionMechanism, ReferenceSyncBlockData, SyncBlockStatus } from '../common/types';
|
|
5
5
|
import type { SyncBlockDataProviderInterface, SyncBlockSourceInfo } from '../providers/types';
|
|
6
6
|
import type { CreateSuccessEnrichment } from '../utils/errorHandling';
|
|
7
7
|
export type ConfirmationCallback = (syncBlockIds: SyncBlockAttrs[], deleteReason: DeletionReason | undefined) => Promise<boolean>;
|
|
@@ -96,6 +96,8 @@ export declare class SourceSyncBlockStoreManager {
|
|
|
96
96
|
* are in flight (see EDITOR-6930).
|
|
97
97
|
*/
|
|
98
98
|
hasPendingCreations(): boolean;
|
|
99
|
+
/** Returns the source block's last known backend publication status. */
|
|
100
|
+
getStatus(resourceId: ResourceId): SyncBlockStatus | undefined;
|
|
99
101
|
/**
|
|
100
102
|
* Fires callback to insert node (if creation is successful) and clears pending creation data
|
|
101
103
|
* @param success
|
package/package.json
CHANGED
|
@@ -17,12 +17,12 @@
|
|
|
17
17
|
"atlaskit:src": "src/index.ts",
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@atlaskit/adf-utils": "^20.3.0",
|
|
20
|
-
"@atlaskit/browser-apis": "^1.
|
|
20
|
+
"@atlaskit/browser-apis": "^1.2.0",
|
|
21
21
|
"@atlaskit/editor-json-transformer": "^9.0.0",
|
|
22
22
|
"@atlaskit/editor-prosemirror": "^8.0.0",
|
|
23
23
|
"@atlaskit/node-data-provider": "^13.0.0",
|
|
24
|
-
"@atlaskit/platform-feature-flags": "^2.
|
|
25
|
-
"@atlaskit/tmp-editor-statsig": "^130.
|
|
24
|
+
"@atlaskit/platform-feature-flags": "^2.1.0",
|
|
25
|
+
"@atlaskit/tmp-editor-statsig": "^130.2.0",
|
|
26
26
|
"@babel/runtime": "^7.0.0",
|
|
27
27
|
"@compiled/react": "^0.22.2",
|
|
28
28
|
"bind-event-listener": "^3.0.0",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"uuid": "^3.1.0"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
|
-
"@atlaskit/editor-common": "^116.
|
|
35
|
+
"@atlaskit/editor-common": "^116.35.0",
|
|
36
36
|
"react": "^18.2.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
}
|
|
77
77
|
},
|
|
78
78
|
"name": "@atlaskit/editor-synced-block-provider",
|
|
79
|
-
"version": "8.6.
|
|
79
|
+
"version": "8.6.8",
|
|
80
80
|
"description": "Synced Block Provider for @atlaskit/editor-plugin-synced-block",
|
|
81
81
|
"author": "Atlassian Pty Ltd",
|
|
82
82
|
"license": "Apache-2.0",
|