@atlaskit/editor-synced-block-provider 21.0.0 → 21.0.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,19 @@
1
1
  # @atlaskit/editor-synced-block-provider
2
2
 
3
+ ## 21.0.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 21.0.1
10
+
11
+ ### Patch Changes
12
+
13
+ - [`44a5b8ace2ac3`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/44a5b8ace2ac3) -
14
+ Clean up experiment `editor-synced-block-same-page-sync`
15
+ - Updated dependencies
16
+
3
17
  ## 21.0.0
4
18
 
5
19
  ### Patch Changes
@@ -276,9 +276,6 @@ var ReferenceSyncBlockStoreManager = exports.ReferenceSyncBlockStoreManager = /*
276
276
  key: "getLocalReference",
277
277
  value: function getLocalReference(resourceId) {
278
278
  var _this$sourceManager;
279
- if (!(0, _isExperimentEnabled.isExperimentEnabled)('editor-synced-block-same-page-sync')) {
280
- return undefined;
281
- }
282
279
  var parsed = this.getSameDocumentReferenceParts(resourceId);
283
280
  if (!parsed) {
284
281
  return undefined;
@@ -982,9 +979,8 @@ var ReferenceSyncBlockStoreManager = exports.ReferenceSyncBlockStoreManager = /*
982
979
  if ((0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_blocks_patch_11')) {
983
980
  this.subscribedSinceLastFlush = true;
984
981
  }
985
- var isSamePageSyncEnabled = (0, _isExperimentEnabled.isExperimentEnabled)('editor-synced-block-same-page-sync');
986
- var sameDocumentParts = isSamePageSyncEnabled ? this.getSameDocumentReferenceParts(resourceId) : undefined;
987
- var localReference = isSamePageSyncEnabled ? this.getLocalReference(resourceId) : undefined;
982
+ var sameDocumentParts = this.getSameDocumentReferenceParts(resourceId);
983
+ var localReference = this.getLocalReference(resourceId);
988
984
  var unsubscribeRemote = this._subscriptionManager.subscribeToSyncBlock(resourceId, localId, function (instance) {
989
985
  if (!localReference) {
990
986
  callback(instance);
@@ -14,7 +14,6 @@ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/cl
14
14
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
15
15
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
16
16
  var _monitoring = require("@atlaskit/editor-common/monitoring");
17
- var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
18
17
  var _types = require("../common/types");
19
18
  var _errorHandling = require("../utils/errorHandling");
20
19
  var _experienceTracking = require("../utils/experienceTracking");
@@ -417,9 +416,6 @@ var SourceSyncBlockStoreManager = exports.SourceSyncBlockStoreManager = /*#__PUR
417
416
  }, {
418
417
  key: "getLocalSourceSnapshot",
419
418
  value: function getLocalSourceSnapshot(resourceId) {
420
- if (!(0, _isExperimentEnabled.isExperimentEnabled)('editor-synced-block-same-page-sync')) {
421
- return undefined;
422
- }
423
419
  var cached = this.syncBlockCache.get(resourceId);
424
420
  if (!cached || cached.status === 'deleted') {
425
421
  return undefined;
@@ -435,9 +431,6 @@ var SourceSyncBlockStoreManager = exports.SourceSyncBlockStoreManager = /*#__PUR
435
431
  key: "subscribeToLocalSource",
436
432
  value: function subscribeToLocalSource(resourceId, callback) {
437
433
  var _this3 = this;
438
- if (!(0, _isExperimentEnabled.isExperimentEnabled)('editor-synced-block-same-page-sync')) {
439
- return function () {};
440
- }
441
434
  var subscribers = this.localSourceSubscribers.get(resourceId);
442
435
  if (!subscribers) {
443
436
  subscribers = new Set();
@@ -196,9 +196,6 @@ export class ReferenceSyncBlockStoreManager {
196
196
  }
197
197
  getLocalReference(resourceId) {
198
198
  var _this$sourceManager;
199
- if (!isExperimentEnabled('editor-synced-block-same-page-sync')) {
200
- return undefined;
201
- }
202
199
  const parsed = this.getSameDocumentReferenceParts(resourceId);
203
200
  if (!parsed) {
204
201
  return undefined;
@@ -823,9 +820,8 @@ export class ReferenceSyncBlockStoreManager {
823
820
  if (isExperimentEnabled('platform_editor_blocks_patch_11')) {
824
821
  this.subscribedSinceLastFlush = true;
825
822
  }
826
- const isSamePageSyncEnabled = isExperimentEnabled('editor-synced-block-same-page-sync');
827
- const sameDocumentParts = isSamePageSyncEnabled ? this.getSameDocumentReferenceParts(resourceId) : undefined;
828
- let localReference = isSamePageSyncEnabled ? this.getLocalReference(resourceId) : undefined;
823
+ const sameDocumentParts = this.getSameDocumentReferenceParts(resourceId);
824
+ let localReference = this.getLocalReference(resourceId);
829
825
  const unsubscribeRemote = this._subscriptionManager.subscribeToSyncBlock(resourceId, localId, instance => {
830
826
  if (!localReference) {
831
827
  callback(instance);
@@ -1,6 +1,5 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import { logException } from '@atlaskit/editor-common/monitoring';
3
- import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
4
3
  import { SyncBlockError } from '../common/types';
5
4
  import { updateErrorPayload, createErrorPayload, deleteErrorPayload, updateCacheErrorPayload, getSourceInfoErrorPayload, updateSuccessPayload, createSuccessPayload, createSuccessOperationalPayload, addContentSuccessPayload, deleteSuccessPayload, fetchReferencesErrorPayload, buildErrorAttribution } from '../utils/errorHandling';
6
5
  import { getCreateSourceExperience, getDeleteSourceExperience, getSaveSourceExperience, getFetchSourceInfoExperience } from '../utils/experienceTracking';
@@ -335,9 +334,6 @@ export class SourceSyncBlockStoreManager {
335
334
  return (_this$syncBlockCache$ = this.syncBlockCache.get(resourceId)) === null || _this$syncBlockCache$ === void 0 ? void 0 : _this$syncBlockCache$.status;
336
335
  }
337
336
  getLocalSourceSnapshot(resourceId) {
338
- if (!isExperimentEnabled('editor-synced-block-same-page-sync')) {
339
- return undefined;
340
- }
341
337
  const cached = this.syncBlockCache.get(resourceId);
342
338
  if (!cached || cached.status === 'deleted') {
343
339
  return undefined;
@@ -353,9 +349,6 @@ export class SourceSyncBlockStoreManager {
353
349
  };
354
350
  }
355
351
  subscribeToLocalSource(resourceId, callback) {
356
- if (!isExperimentEnabled('editor-synced-block-same-page-sync')) {
357
- return () => {};
358
- }
359
352
  let subscribers = this.localSourceSubscribers.get(resourceId);
360
353
  if (!subscribers) {
361
354
  subscribers = new Set();
@@ -269,9 +269,6 @@ export var ReferenceSyncBlockStoreManager = /*#__PURE__*/function () {
269
269
  key: "getLocalReference",
270
270
  value: function getLocalReference(resourceId) {
271
271
  var _this$sourceManager;
272
- if (!isExperimentEnabled('editor-synced-block-same-page-sync')) {
273
- return undefined;
274
- }
275
272
  var parsed = this.getSameDocumentReferenceParts(resourceId);
276
273
  if (!parsed) {
277
274
  return undefined;
@@ -975,9 +972,8 @@ export var ReferenceSyncBlockStoreManager = /*#__PURE__*/function () {
975
972
  if (isExperimentEnabled('platform_editor_blocks_patch_11')) {
976
973
  this.subscribedSinceLastFlush = true;
977
974
  }
978
- var isSamePageSyncEnabled = isExperimentEnabled('editor-synced-block-same-page-sync');
979
- var sameDocumentParts = isSamePageSyncEnabled ? this.getSameDocumentReferenceParts(resourceId) : undefined;
980
- var localReference = isSamePageSyncEnabled ? this.getLocalReference(resourceId) : undefined;
975
+ var sameDocumentParts = this.getSameDocumentReferenceParts(resourceId);
976
+ var localReference = this.getLocalReference(resourceId);
981
977
  var unsubscribeRemote = this._subscriptionManager.subscribeToSyncBlock(resourceId, localId, function (instance) {
982
978
  if (!localReference) {
983
979
  callback(instance);
@@ -13,7 +13,6 @@ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length)
13
13
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
14
14
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
15
15
  import { logException } from '@atlaskit/editor-common/monitoring';
16
- import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
17
16
  import { SyncBlockError } from '../common/types';
18
17
  import { updateErrorPayload, createErrorPayload, deleteErrorPayload, updateCacheErrorPayload, getSourceInfoErrorPayload, updateSuccessPayload, createSuccessPayload, createSuccessOperationalPayload, addContentSuccessPayload, deleteSuccessPayload, fetchReferencesErrorPayload, buildErrorAttribution } from '../utils/errorHandling';
19
18
  import { getCreateSourceExperience, getDeleteSourceExperience, getSaveSourceExperience, getFetchSourceInfoExperience } from '../utils/experienceTracking';
@@ -410,9 +409,6 @@ export var SourceSyncBlockStoreManager = /*#__PURE__*/function () {
410
409
  }, {
411
410
  key: "getLocalSourceSnapshot",
412
411
  value: function getLocalSourceSnapshot(resourceId) {
413
- if (!isExperimentEnabled('editor-synced-block-same-page-sync')) {
414
- return undefined;
415
- }
416
412
  var cached = this.syncBlockCache.get(resourceId);
417
413
  if (!cached || cached.status === 'deleted') {
418
414
  return undefined;
@@ -428,9 +424,6 @@ export var SourceSyncBlockStoreManager = /*#__PURE__*/function () {
428
424
  key: "subscribeToLocalSource",
429
425
  value: function subscribeToLocalSource(resourceId, callback) {
430
426
  var _this3 = this;
431
- if (!isExperimentEnabled('editor-synced-block-same-page-sync')) {
432
- return function () {};
433
- }
434
427
  var subscribers = this.localSourceSubscribers.get(resourceId);
435
428
  if (!subscribers) {
436
429
  subscribers = new Set();
package/package.json CHANGED
@@ -23,7 +23,7 @@
23
23
  "@atlaskit/node-data-provider": "^26.0.0",
24
24
  "@atlaskit/platform-feature-experiments": "^0.3.0",
25
25
  "@atlaskit/platform-feature-flags": "^2.2.0",
26
- "@atlaskit/tmp-editor-statsig": "^224.0.0",
26
+ "@atlaskit/tmp-editor-statsig": "^226.0.0",
27
27
  "@babel/runtime": "^7.0.0",
28
28
  "@compiled/react": "^1.0.2",
29
29
  "bind-event-listener": "^3.0.0",
@@ -33,7 +33,7 @@
33
33
  "uuid": "^11.1.1"
34
34
  },
35
35
  "peerDependencies": {
36
- "@atlaskit/editor-common": "^129.0.0",
36
+ "@atlaskit/editor-common": "^129.1.0",
37
37
  "react": "^18.2.0 || ^19.2.0"
38
38
  },
39
39
  "devDependencies": {
@@ -42,7 +42,7 @@
42
42
  "react-dom": "^19.2.0"
43
43
  },
44
44
  "name": "@atlaskit/editor-synced-block-provider",
45
- "version": "21.0.0",
45
+ "version": "21.0.2",
46
46
  "description": "Synced Block Provider for @atlaskit/editor-plugin-synced-block",
47
47
  "author": "Atlassian Pty Ltd",
48
48
  "license": "Apache-2.0",