@atlaskit/editor-synced-block-provider 3.27.1 → 3.27.2
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,13 @@
|
|
|
1
1
|
# @atlaskit/editor-synced-block-provider
|
|
2
2
|
|
|
3
|
+
## 3.27.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`7b605d0a82c41`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/7b605d0a82c41) -
|
|
8
|
+
Add some tests + remove pending fetch requests for resourceId if reference blocks deleted
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
3
11
|
## 3.27.1
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -833,8 +833,18 @@ var ReferenceSyncBlockStoreManager = exports.ReferenceSyncBlockStoreManager = /*
|
|
|
833
833
|
}, {
|
|
834
834
|
key: "debouncedBatchedFetchSyncBlocks",
|
|
835
835
|
value: function debouncedBatchedFetchSyncBlocks(resourceId) {
|
|
836
|
-
|
|
837
|
-
|
|
836
|
+
if ((0, _platformFeatureFlags.fg)('platform_synced_block_patch_2')) {
|
|
837
|
+
// Only add to pending requests if there are active subscriptions for this resource
|
|
838
|
+
if (this.subscriptions.has(resourceId) && Object.keys(this.subscriptions.get(resourceId) || {}).length > 0) {
|
|
839
|
+
this.pendingFetchRequests.add(resourceId);
|
|
840
|
+
this.scheduledBatchFetch();
|
|
841
|
+
} else {
|
|
842
|
+
this.pendingFetchRequests.delete(resourceId);
|
|
843
|
+
}
|
|
844
|
+
} else {
|
|
845
|
+
this.pendingFetchRequests.add(resourceId);
|
|
846
|
+
this.scheduledBatchFetch();
|
|
847
|
+
}
|
|
838
848
|
}
|
|
839
849
|
}, {
|
|
840
850
|
key: "subscribeToSyncBlock",
|
|
@@ -639,8 +639,18 @@ export class ReferenceSyncBlockStoreManager {
|
|
|
639
639
|
this.providerFactories.delete(resourceId);
|
|
640
640
|
}
|
|
641
641
|
debouncedBatchedFetchSyncBlocks(resourceId) {
|
|
642
|
-
|
|
643
|
-
|
|
642
|
+
if (fg('platform_synced_block_patch_2')) {
|
|
643
|
+
// Only add to pending requests if there are active subscriptions for this resource
|
|
644
|
+
if (this.subscriptions.has(resourceId) && Object.keys(this.subscriptions.get(resourceId) || {}).length > 0) {
|
|
645
|
+
this.pendingFetchRequests.add(resourceId);
|
|
646
|
+
this.scheduledBatchFetch();
|
|
647
|
+
} else {
|
|
648
|
+
this.pendingFetchRequests.delete(resourceId);
|
|
649
|
+
}
|
|
650
|
+
} else {
|
|
651
|
+
this.pendingFetchRequests.add(resourceId);
|
|
652
|
+
this.scheduledBatchFetch();
|
|
653
|
+
}
|
|
644
654
|
}
|
|
645
655
|
subscribeToSyncBlock(resourceId, localId, callback) {
|
|
646
656
|
var _this$dataProvider7, _this$dataProvider7$g, _this$dataProvider8, _this$dataProvider8$g, _this$dataProvider9, _this$dataProvider9$g;
|
|
@@ -827,8 +827,18 @@ export var ReferenceSyncBlockStoreManager = /*#__PURE__*/function () {
|
|
|
827
827
|
}, {
|
|
828
828
|
key: "debouncedBatchedFetchSyncBlocks",
|
|
829
829
|
value: function debouncedBatchedFetchSyncBlocks(resourceId) {
|
|
830
|
-
|
|
831
|
-
|
|
830
|
+
if (fg('platform_synced_block_patch_2')) {
|
|
831
|
+
// Only add to pending requests if there are active subscriptions for this resource
|
|
832
|
+
if (this.subscriptions.has(resourceId) && Object.keys(this.subscriptions.get(resourceId) || {}).length > 0) {
|
|
833
|
+
this.pendingFetchRequests.add(resourceId);
|
|
834
|
+
this.scheduledBatchFetch();
|
|
835
|
+
} else {
|
|
836
|
+
this.pendingFetchRequests.delete(resourceId);
|
|
837
|
+
}
|
|
838
|
+
} else {
|
|
839
|
+
this.pendingFetchRequests.add(resourceId);
|
|
840
|
+
this.scheduledBatchFetch();
|
|
841
|
+
}
|
|
832
842
|
}
|
|
833
843
|
}, {
|
|
834
844
|
key: "subscribeToSyncBlock",
|
package/package.json
CHANGED