@atlaskit/editor-synced-block-provider 18.0.9 → 19.0.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,19 @@
1
1
  # @atlaskit/editor-synced-block-provider
2
2
 
3
+ ## 19.0.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 18.0.10
10
+
11
+ ### Patch Changes
12
+
13
+ - [`feeef61c773db`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/feeef61c773db) -
14
+ Clean up feature gate `platform_editor_blocks_patch_7`
15
+ - Updated dependencies
16
+
3
17
  ## 18.0.9
4
18
 
5
19
  ### Patch Changes
@@ -12,7 +12,6 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
12
12
  var _react = require("react");
13
13
  var _coreUtils = require("@atlaskit/editor-common/core-utils");
14
14
  var _monitoring = require("@atlaskit/editor-common/monitoring");
15
- var _fg = require("@atlaskit/platform-feature-flags/fg");
16
15
  var _types = require("../common/types");
17
16
  var _errorHandling = require("../utils/errorHandling");
18
17
  var _utils = require("../utils/utils");
@@ -167,9 +166,6 @@ var useFetchSyncBlockData = exports.useFetchSyncBlockData = function useFetchSyn
167
166
  // Applying providers notifies subscribers synchronously, so it must not run during
168
167
  // render - that would setState on another component mid-render and remount the block.
169
168
  (0, _react.useEffect)(function () {
170
- if (!(0, _fg.fg)('platform_editor_blocks_patch_7')) {
171
- return;
172
- }
173
169
  if (!resourceId || (0, _coreUtils.isSSR)()) {
174
170
  return;
175
171
  }
@@ -15,7 +15,6 @@ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/creat
15
15
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
16
16
  var _monitoring = require("@atlaskit/editor-common/monitoring");
17
17
  var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
18
- var _fg = require("@atlaskit/platform-feature-flags/fg");
19
18
  var _types = require("../common/types");
20
19
  var _errorHandling = require("../utils/errorHandling");
21
20
  var _experienceTracking = require("../utils/experienceTracking");
@@ -500,7 +499,7 @@ var SourceSyncBlockStoreManager = exports.SourceSyncBlockStoreManager = /*#__PUR
500
499
  if (success) {
501
500
  var _this$dataProvider$ge, _this$dataProvider, _this$fireAnalyticsEv4, _this$fireAnalyticsEv5, _this$syncBlockCache$2;
502
501
  var sourceProduct = (0, _utils.getSourceProductFromResourceIdSafe)(resourceId);
503
- var documentInsertedResourceId = (0, _fg.fg)('platform_editor_blocks_patch_7') ? (_this$dataProvider$ge = (_this$dataProvider = this.dataProvider) === null || _this$dataProvider === void 0 ? void 0 : _this$dataProvider.generateResourceIdForReference(resourceId)) !== null && _this$dataProvider$ge !== void 0 ? _this$dataProvider$ge : resourceId : resourceId;
502
+ var documentInsertedResourceId = (_this$dataProvider$ge = (_this$dataProvider = this.dataProvider) === null || _this$dataProvider === void 0 ? void 0 : _this$dataProvider.generateResourceIdForReference(resourceId)) !== null && _this$dataProvider$ge !== void 0 ? _this$dataProvider$ge : resourceId;
504
503
  (_this$fireAnalyticsEv4 = this.fireAnalyticsEvent) === null || _this$fireAnalyticsEv4 === void 0 || _this$fireAnalyticsEv4.call(this, (0, _errorHandling.createSuccessPayload)(documentInsertedResourceId || '', sourceProduct));
505
504
  // Operational create-success event with the join key + creation-type
506
505
  // signals (inputMethod / createdEmpty / nodeTypes) captured at the command layer.
@@ -11,7 +11,6 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
11
11
  var _coreUtils = require("@atlaskit/editor-common/core-utils");
12
12
  var _monitoring = require("@atlaskit/editor-common/monitoring");
13
13
  var _providerFactory = require("@atlaskit/editor-common/provider-factory");
14
- var _fg = require("@atlaskit/platform-feature-flags/fg");
15
14
  var _errorHandling = require("../utils/errorHandling");
16
15
  var _resourceId = require("../utils/resourceId");
17
16
  var _utils = require("../utils/utils");
@@ -54,8 +53,7 @@ var SyncBlockProviderFactoryManager = exports.SyncBlockProviderFactoryManager =
54
53
  // cannot run during render - callers invoke `syncProviders` from an effect
55
54
  // instead. Effects never run while server rendering, and there are no mounted
56
55
  // subscribers to notify, so the server keeps applying them inline.
57
- var deferProviderSync = (0, _fg.fg)('platform_editor_blocks_patch_7');
58
- if (deferProviderSync && !(0, _coreUtils.isSSR)()) {
56
+ if (!(0, _coreUtils.isSSR)()) {
59
57
  return providerFactory;
60
58
  }
61
59
  this.syncProviders(resourceId, providerFactory);
@@ -1,7 +1,6 @@
1
1
  import { useCallback, useEffect, useMemo, useState } from 'react';
2
2
  import { isSSR } from '@atlaskit/editor-common/core-utils';
3
3
  import { logException } from '@atlaskit/editor-common/monitoring';
4
- import { fg } from '@atlaskit/platform-feature-flags/fg';
5
4
  import { isProviderNotReadyError, SyncBlockError } from '../common/types';
6
5
  import { buildFetchErrorAttribution, fetchErrorPayload, getPiiSafeOriginalError } from '../utils/errorHandling';
7
6
  import { createSyncBlockNode, getSourceProductFromResourceIdSafe } from '../utils/utils';
@@ -129,9 +128,6 @@ export const useFetchSyncBlockData = (manager, resourceId, localId, fireAnalytic
129
128
  // Applying providers notifies subscribers synchronously, so it must not run during
130
129
  // render - that would setState on another component mid-render and remount the block.
131
130
  useEffect(() => {
132
- if (!fg('platform_editor_blocks_patch_7')) {
133
- return;
134
- }
135
131
  if (!resourceId || isSSR()) {
136
132
  return;
137
133
  }
@@ -1,7 +1,6 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import { logException } from '@atlaskit/editor-common/monitoring';
3
3
  import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
4
- import { fg } from '@atlaskit/platform-feature-flags/fg';
5
4
  import { SyncBlockError } from '../common/types';
6
5
  import { updateErrorPayload, createErrorPayload, deleteErrorPayload, updateCacheErrorPayload, getSourceInfoErrorPayload, updateSuccessPayload, createSuccessPayload, createSuccessOperationalPayload, addContentSuccessPayload, deleteSuccessPayload, fetchReferencesErrorPayload, buildErrorAttribution } from '../utils/errorHandling';
7
6
  import { getCreateSourceExperience, getDeleteSourceExperience, getSaveSourceExperience, getFetchSourceInfoExperience } from '../utils/experienceTracking';
@@ -412,7 +411,7 @@ export class SourceSyncBlockStoreManager {
412
411
  if (success) {
413
412
  var _this$dataProvider$ge, _this$dataProvider, _this$fireAnalyticsEv6, _this$fireAnalyticsEv7, _this$syncBlockCache$2;
414
413
  const sourceProduct = getSourceProductFromResourceIdSafe(resourceId);
415
- const documentInsertedResourceId = fg('platform_editor_blocks_patch_7') ? (_this$dataProvider$ge = (_this$dataProvider = this.dataProvider) === null || _this$dataProvider === void 0 ? void 0 : _this$dataProvider.generateResourceIdForReference(resourceId)) !== null && _this$dataProvider$ge !== void 0 ? _this$dataProvider$ge : resourceId : resourceId;
414
+ const documentInsertedResourceId = (_this$dataProvider$ge = (_this$dataProvider = this.dataProvider) === null || _this$dataProvider === void 0 ? void 0 : _this$dataProvider.generateResourceIdForReference(resourceId)) !== null && _this$dataProvider$ge !== void 0 ? _this$dataProvider$ge : resourceId;
416
415
  (_this$fireAnalyticsEv6 = this.fireAnalyticsEvent) === null || _this$fireAnalyticsEv6 === void 0 ? void 0 : _this$fireAnalyticsEv6.call(this, createSuccessPayload(documentInsertedResourceId || '', sourceProduct));
417
416
  // Operational create-success event with the join key + creation-type
418
417
  // signals (inputMethod / createdEmpty / nodeTypes) captured at the command layer.
@@ -2,7 +2,6 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import { isSSR } from '@atlaskit/editor-common/core-utils';
3
3
  import { logException } from '@atlaskit/editor-common/monitoring';
4
4
  import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
5
- import { fg } from '@atlaskit/platform-feature-flags/fg';
6
5
  import { buildFetchErrorAttribution, fetchErrorPayload } from '../utils/errorHandling';
7
6
  import { parseResourceId } from '../utils/resourceId';
8
7
  import { getSourceProductFromResourceIdSafe } from '../utils/utils';
@@ -43,8 +42,7 @@ export class SyncBlockProviderFactoryManager {
43
42
  // cannot run during render - callers invoke `syncProviders` from an effect
44
43
  // instead. Effects never run while server rendering, and there are no mounted
45
44
  // subscribers to notify, so the server keeps applying them inline.
46
- const deferProviderSync = fg('platform_editor_blocks_patch_7');
47
- if (deferProviderSync && !isSSR()) {
45
+ if (!isSSR()) {
48
46
  return providerFactory;
49
47
  }
50
48
  this.syncProviders(resourceId, providerFactory);
@@ -7,7 +7,6 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
7
7
  import { useCallback, useEffect, useMemo, useState } from 'react';
8
8
  import { isSSR } from '@atlaskit/editor-common/core-utils';
9
9
  import { logException } from '@atlaskit/editor-common/monitoring';
10
- import { fg } from '@atlaskit/platform-feature-flags/fg';
11
10
  import { isProviderNotReadyError, SyncBlockError } from '../common/types';
12
11
  import { buildFetchErrorAttribution, fetchErrorPayload, getPiiSafeOriginalError } from '../utils/errorHandling';
13
12
  import { createSyncBlockNode, getSourceProductFromResourceIdSafe } from '../utils/utils';
@@ -160,9 +159,6 @@ export var useFetchSyncBlockData = function useFetchSyncBlockData(manager, resou
160
159
  // Applying providers notifies subscribers synchronously, so it must not run during
161
160
  // render - that would setState on another component mid-render and remount the block.
162
161
  useEffect(function () {
163
- if (!fg('platform_editor_blocks_patch_7')) {
164
- return;
165
- }
166
162
  if (!resourceId || isSSR()) {
167
163
  return;
168
164
  }
@@ -14,7 +14,6 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
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
16
  import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
17
- import { fg } from '@atlaskit/platform-feature-flags/fg';
18
17
  import { SyncBlockError } from '../common/types';
19
18
  import { updateErrorPayload, createErrorPayload, deleteErrorPayload, updateCacheErrorPayload, getSourceInfoErrorPayload, updateSuccessPayload, createSuccessPayload, createSuccessOperationalPayload, addContentSuccessPayload, deleteSuccessPayload, fetchReferencesErrorPayload, buildErrorAttribution } from '../utils/errorHandling';
20
19
  import { getCreateSourceExperience, getDeleteSourceExperience, getSaveSourceExperience, getFetchSourceInfoExperience } from '../utils/experienceTracking';
@@ -493,7 +492,7 @@ export var SourceSyncBlockStoreManager = /*#__PURE__*/function () {
493
492
  if (success) {
494
493
  var _this$dataProvider$ge, _this$dataProvider, _this$fireAnalyticsEv4, _this$fireAnalyticsEv5, _this$syncBlockCache$2;
495
494
  var sourceProduct = getSourceProductFromResourceIdSafe(resourceId);
496
- var documentInsertedResourceId = fg('platform_editor_blocks_patch_7') ? (_this$dataProvider$ge = (_this$dataProvider = this.dataProvider) === null || _this$dataProvider === void 0 ? void 0 : _this$dataProvider.generateResourceIdForReference(resourceId)) !== null && _this$dataProvider$ge !== void 0 ? _this$dataProvider$ge : resourceId : resourceId;
495
+ var documentInsertedResourceId = (_this$dataProvider$ge = (_this$dataProvider = this.dataProvider) === null || _this$dataProvider === void 0 ? void 0 : _this$dataProvider.generateResourceIdForReference(resourceId)) !== null && _this$dataProvider$ge !== void 0 ? _this$dataProvider$ge : resourceId;
497
496
  (_this$fireAnalyticsEv4 = this.fireAnalyticsEvent) === null || _this$fireAnalyticsEv4 === void 0 || _this$fireAnalyticsEv4.call(this, createSuccessPayload(documentInsertedResourceId || '', sourceProduct));
498
497
  // Operational create-success event with the join key + creation-type
499
498
  // signals (inputMethod / createdEmpty / nodeTypes) captured at the command layer.
@@ -4,7 +4,6 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
4
4
  import { isSSR } from '@atlaskit/editor-common/core-utils';
5
5
  import { logException } from '@atlaskit/editor-common/monitoring';
6
6
  import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
7
- import { fg } from '@atlaskit/platform-feature-flags/fg';
8
7
  import { buildFetchErrorAttribution, fetchErrorPayload } from '../utils/errorHandling';
9
8
  import { parseResourceId } from '../utils/resourceId';
10
9
  import { getSourceProductFromResourceIdSafe } from '../utils/utils';
@@ -47,8 +46,7 @@ export var SyncBlockProviderFactoryManager = /*#__PURE__*/function () {
47
46
  // cannot run during render - callers invoke `syncProviders` from an effect
48
47
  // instead. Effects never run while server rendering, and there are no mounted
49
48
  // subscribers to notify, so the server keeps applying them inline.
50
- var deferProviderSync = fg('platform_editor_blocks_patch_7');
51
- if (deferProviderSync && !isSSR()) {
49
+ if (!isSSR()) {
52
50
  return providerFactory;
53
51
  }
54
52
  this.syncProviders(resourceId, providerFactory);
package/package.json CHANGED
@@ -20,10 +20,10 @@
20
20
  "@atlaskit/browser-apis": "^1.2.0",
21
21
  "@atlaskit/editor-json-transformer": "^10.0.0",
22
22
  "@atlaskit/editor-prosemirror": "^9.0.0",
23
- "@atlaskit/node-data-provider": "^23.0.0",
23
+ "@atlaskit/node-data-provider": "^24.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": "^218.0.0",
26
+ "@atlaskit/tmp-editor-statsig": "^219.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": "^126.4.0",
36
+ "@atlaskit/editor-common": "^127.0.0",
37
37
  "react": "^18.2.0 || ^19.2.0"
38
38
  },
39
39
  "devDependencies": {
@@ -42,16 +42,11 @@
42
42
  "react-dom": "^19.2.0"
43
43
  },
44
44
  "name": "@atlaskit/editor-synced-block-provider",
45
- "version": "18.0.9",
45
+ "version": "19.0.0",
46
46
  "description": "Synced Block Provider for @atlaskit/editor-plugin-synced-block",
47
47
  "author": "Atlassian Pty Ltd",
48
48
  "license": "Apache-2.0",
49
49
  "publishConfig": {
50
50
  "registry": "https://registry.npmjs.org/"
51
- },
52
- "platform-feature-flags": {
53
- "platform_editor_blocks_patch_7": {
54
- "type": "boolean"
55
- }
56
51
  }
57
52
  }