@atlaskit/editor-plugin-synced-block 12.0.7 → 12.0.9

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/AGENTS.md CHANGED
@@ -48,7 +48,6 @@ src/
48
48
  │ ├── has-synced-blocks.ts # O(childCount) presence check (EDITOR-6928 lazy init)
49
49
  │ ├── transaction-inserts-synced-block.ts # Detect tr inserts a synced block (lazy init)
50
50
  │ ├── selection-decorations.ts # Selection decoration helpers
51
- │ ├── rebase-transaction.ts # Rebase helpers used by main.ts
52
51
  │ ├── ignore-dom-event.ts # DOM event guard
53
52
  │ └── utils.ts # Misc shared helpers
54
53
  ├── ui/ # (grep the dir for the full current list — it grows often)
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @atlaskit/editor-plugin-synced-block
2
2
 
3
+ ## 12.0.9
4
+
5
+ ### Patch Changes
6
+
7
+ - [`0d9249f213c55`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0d9249f213c55) -
8
+ Preserve source block content when unsyncing
9
+
10
+ ## 12.0.8
11
+
12
+ ### Patch Changes
13
+
14
+ - [`1f0dab65b6efd`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1f0dab65b6efd) -
15
+ Remove unreachable cut-handling branch and duplicated synced block node view setup left over from
16
+ feature gate cleanup
17
+ - Updated dependencies
18
+
3
19
  ## 12.0.7
4
20
 
5
21
  ### Patch Changes
@@ -9,7 +9,6 @@ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/cl
9
9
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
10
10
  var _react = _interopRequireDefault(require("react"));
11
11
  var _analytics = require("@atlaskit/editor-common/analytics");
12
- var _coreUtils = require("@atlaskit/editor-common/core-utils");
13
12
  var _errorBoundary = require("@atlaskit/editor-common/error-boundary");
14
13
  var _syncBlock = require("@atlaskit/editor-common/sync-block");
15
14
  var _editorPluginConnectivity = require("@atlaskit/editor-plugin-connectivity");
@@ -43,20 +42,13 @@ var BodiedSyncBlock = exports.BodiedSyncBlock = /*#__PURE__*/function () {
43
42
  this.dom = dom;
44
43
  // eslint-disable-next-line @atlaskit/editor/no-as-casting
45
44
  this.contentDOM = contentDOM;
46
- var labelContainer;
47
- if ((0, _coreUtils.isSSR)() && (0, _coreUtils.isSSRStreaming)()) {
48
- // During SSR, the portal's renderToStaticMarkup + innerHTML clobbers
49
- // contentDOM. Render the label into a separate container to prevent this.
50
- // eslint-disable-next-line @atlaskit/platform/no-direct-document-usage -- NodeView DOM must be created against active runtime document
51
- labelContainer = document.createElement('div');
52
- this.dom.appendChild(labelContainer);
53
- } else {
54
- // Render the label into a separate container so portal implementations
55
- // that write directly into the target do not clobber contentDOM.
56
- // eslint-disable-next-line @atlaskit/platform/no-direct-document-usage -- NodeView DOM must be created against active runtime document
57
- labelContainer = document.createElement('div');
58
- this.dom.appendChild(labelContainer);
59
- }
45
+
46
+ // Render the label into a separate container so portal implementations that
47
+ // write directly into the target do not clobber contentDOM. This also covers
48
+ // SSR, where the portal's renderToStaticMarkup + innerHTML would clobber it.
49
+ // eslint-disable-next-line @atlaskit/platform/no-direct-document-usage -- NodeView DOM must be created against active runtime document
50
+ var labelContainer = document.createElement('div');
51
+ this.dom.appendChild(labelContainer);
60
52
  this.labelKey = crypto.randomUUID();
61
53
  this.nodeViewPortalProviderAPI.render(function () {
62
54
  var _this$api;
@@ -950,23 +950,10 @@ var createPlugin = exports.createPlugin = function createPlugin(options, pmPlugi
950
950
  var syncBlockStore = pluginState === null || pluginState === void 0 ? void 0 : pluginState.syncBlockStore;
951
951
  var schema = state.schema;
952
952
  var isCopy = ctx.consumeCopyEvent();
953
- var wasCut = ctx.consumeCutEvent();
954
- var isCut = wasCut;
955
- var isPromptedFeedbackCut = Boolean(syncBlockStore && (options === null || options === void 0 ? void 0 : options.onGiveFeedback) && wasCut) && (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_sync_block_activation', 'isEnabled', true);
956
- if (!syncBlockStore || !isCopy && !isCut && !isPromptedFeedbackCut) {
957
- return slice;
958
- }
959
- if (isPromptedFeedbackCut && !isCut) {
960
- var _containsCutSyncBlock = false;
961
- (0, _utils.mapSlice)(slice, function (node) {
962
- if (syncBlockStore.referenceManager.isReferenceBlock(node) || node.type.name === 'bodiedSyncBlock' && (0, _utils3.sliceFullyContainsNode)(slice, node)) {
963
- _containsCutSyncBlock = true;
964
- }
965
- return node;
966
- });
967
- if (_containsCutSyncBlock) {
968
- ctx.markCutRemovalPending();
969
- }
953
+ var isCut = ctx.consumeCutEvent();
954
+ // A prompted feedback cut is always a cut, so the two never need combining.
955
+ var isPromptedFeedbackCut = Boolean(syncBlockStore && (options === null || options === void 0 ? void 0 : options.onGiveFeedback) && isCut) && (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_sync_block_activation', 'isEnabled', true);
956
+ if (!syncBlockStore || !isCopy && !isCut) {
970
957
  return slice;
971
958
  }
972
959
  var containsCutSyncBlock = false;
@@ -981,7 +968,7 @@ var createPlugin = exports.createPlugin = function createPlugin(options, pmPlugi
981
968
  return node;
982
969
  }
983
970
  if (node.type.name === 'bodiedSyncBlock' && node.attrs.resourceId) {
984
- if (isPromptedFeedbackCut && isCut && (0, _utils3.sliceFullyContainsNode)(slice, node)) {
971
+ if (isPromptedFeedbackCut && (0, _utils3.sliceFullyContainsNode)(slice, node)) {
985
972
  containsCutSyncBlock = true;
986
973
  }
987
974
  // if we only selected part of the bodied sync block content,
@@ -1145,9 +1132,6 @@ var createPlugin = exports.createPlugin = function createPlugin(options, pmPlugi
1145
1132
  }
1146
1133
  });
1147
1134
  }
1148
-
1149
- // Delete is recomputed fresh from the live document on confirm.
1150
- // See EDITOR-7889.
1151
1135
  var _iterator2 = _createForOfIteratorHelper(trs),
1152
1136
  _step2;
1153
1137
  try {
@@ -7,7 +7,6 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.handleBodiedSyncBlockRemoval = void 0;
8
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
9
  var _utils = require("@atlaskit/editor-common/utils");
10
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
11
10
  var _types = require("../../types");
12
11
  var _main = require("../main");
13
12
  var _recomputeDeleteTransaction = require("./recompute-delete-transaction");
@@ -59,8 +58,7 @@ var handleBodiedSyncBlockRemoval = exports.handleBodiedSyncBlockRemoval = functi
59
58
  // the confirm path always recomputed a full delete, so unsyncing a source block
60
59
  // silently deleted its content. When the deletion was actually triggered by
61
60
  // unsync, recompute an unwrap (replaceWith content) instead of a delete.
62
- var isUnsync = (0, _platformFeatureFlags.fg)('platform_editor_blocks_patch_6') && deletionReason === 'source-block-unsynced';
63
- var recomputedTr = isUnsync ? (0, _recomputeDeleteTransaction.recomputeUnsyncTransaction)(tr, syncBlockStore.sourceManager.isSourceBlock, bodiedSyncBlockRemoved.map(function (node) {
61
+ var recomputedTr = deletionReason === 'source-block-unsynced' ? (0, _recomputeDeleteTransaction.recomputeUnsyncTransaction)(tr, syncBlockStore.sourceManager.isSourceBlock, bodiedSyncBlockRemoved.map(function (node) {
64
62
  return node.attrs;
65
63
  })) : (0, _recomputeDeleteTransaction.recomputeDeleteTransaction)(tr, syncBlockStore.sourceManager.isSourceBlock, bodiedSyncBlockRemoved.map(function (node) {
66
64
  return node.attrs;
@@ -244,9 +244,8 @@ var ItemIcon = function ItemIcon(_ref3) {
244
244
  });
245
245
  }
246
246
 
247
- // Render a Jira issue-type icon when we have one, gated by the shared rollout flag.
247
+ // Render a Jira issue-type icon when we have one.
248
248
  // Falls through to the generic product icon when:
249
- // - the gate is off,
250
249
  // - we don't have access (issueType is not surfaced for no-access references),
251
250
  // - AGG returned no `issueType` (partial index, deleted, etc.), or
252
251
  // - the issue type is unrecognised AND has no `iconUrl`.
@@ -1,6 +1,5 @@
1
1
  import React from 'react';
2
2
  import { ACTION_SUBJECT, ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics';
3
- import { isSSR, isSSRStreaming } from '@atlaskit/editor-common/core-utils';
4
3
  import { ErrorBoundary } from '@atlaskit/editor-common/error-boundary';
5
4
  import { BodiedSyncBlockSharedCssClassName } from '@atlaskit/editor-common/sync-block';
6
5
  import { isOfflineMode } from '@atlaskit/editor-plugin-connectivity';
@@ -31,20 +30,13 @@ export class BodiedSyncBlock {
31
30
  this.dom = dom;
32
31
  // eslint-disable-next-line @atlaskit/editor/no-as-casting
33
32
  this.contentDOM = contentDOM;
34
- let labelContainer;
35
- if (isSSR() && isSSRStreaming()) {
36
- // During SSR, the portal's renderToStaticMarkup + innerHTML clobbers
37
- // contentDOM. Render the label into a separate container to prevent this.
38
- // eslint-disable-next-line @atlaskit/platform/no-direct-document-usage -- NodeView DOM must be created against active runtime document
39
- labelContainer = document.createElement('div');
40
- this.dom.appendChild(labelContainer);
41
- } else {
42
- // Render the label into a separate container so portal implementations
43
- // that write directly into the target do not clobber contentDOM.
44
- // eslint-disable-next-line @atlaskit/platform/no-direct-document-usage -- NodeView DOM must be created against active runtime document
45
- labelContainer = document.createElement('div');
46
- this.dom.appendChild(labelContainer);
47
- }
33
+
34
+ // Render the label into a separate container so portal implementations that
35
+ // write directly into the target do not clobber contentDOM. This also covers
36
+ // SSR, where the portal's renderToStaticMarkup + innerHTML would clobber it.
37
+ // eslint-disable-next-line @atlaskit/platform/no-direct-document-usage -- NodeView DOM must be created against active runtime document
38
+ const labelContainer = document.createElement('div');
39
+ this.dom.appendChild(labelContainer);
48
40
  this.labelKey = crypto.randomUUID();
49
41
  this.nodeViewPortalProviderAPI.render(() => {
50
42
  var _this$api, _this$api$analytics;
@@ -890,23 +890,10 @@ export const createPlugin = (options, pmPluginFactoryParams, syncBlockStore, api
890
890
  schema
891
891
  } = state;
892
892
  const isCopy = ctx.consumeCopyEvent();
893
- const wasCut = ctx.consumeCutEvent();
894
- const isCut = wasCut;
895
- const isPromptedFeedbackCut = Boolean(syncBlockStore && (options === null || options === void 0 ? void 0 : options.onGiveFeedback) && wasCut) && expValEqualsNoExposure('platform_editor_sync_block_activation', 'isEnabled', true);
896
- if (!syncBlockStore || !isCopy && !isCut && !isPromptedFeedbackCut) {
897
- return slice;
898
- }
899
- if (isPromptedFeedbackCut && !isCut) {
900
- let containsCutSyncBlock = false;
901
- mapSlice(slice, node => {
902
- if (syncBlockStore.referenceManager.isReferenceBlock(node) || node.type.name === 'bodiedSyncBlock' && sliceFullyContainsNode(slice, node)) {
903
- containsCutSyncBlock = true;
904
- }
905
- return node;
906
- });
907
- if (containsCutSyncBlock) {
908
- ctx.markCutRemovalPending();
909
- }
893
+ const isCut = ctx.consumeCutEvent();
894
+ // A prompted feedback cut is always a cut, so the two never need combining.
895
+ const isPromptedFeedbackCut = Boolean(syncBlockStore && (options === null || options === void 0 ? void 0 : options.onGiveFeedback) && isCut) && expValEqualsNoExposure('platform_editor_sync_block_activation', 'isEnabled', true);
896
+ if (!syncBlockStore || !isCopy && !isCut) {
910
897
  return slice;
911
898
  }
912
899
  let containsCutSyncBlock = false;
@@ -921,7 +908,7 @@ export const createPlugin = (options, pmPluginFactoryParams, syncBlockStore, api
921
908
  return node;
922
909
  }
923
910
  if (node.type.name === 'bodiedSyncBlock' && node.attrs.resourceId) {
924
- if (isPromptedFeedbackCut && isCut && sliceFullyContainsNode(slice, node)) {
911
+ if (isPromptedFeedbackCut && sliceFullyContainsNode(slice, node)) {
925
912
  containsCutSyncBlock = true;
926
913
  }
927
914
  // if we only selected part of the bodied sync block content,
@@ -1075,10 +1062,6 @@ export const createPlugin = (options, pmPluginFactoryParams, syncBlockStore, api
1075
1062
  }
1076
1063
  });
1077
1064
  }
1078
-
1079
- // Delete is recomputed fresh from the live document on confirm.
1080
- // See EDITOR-7889.
1081
-
1082
1065
  for (const tr of trs) {
1083
1066
  if (tr.getMeta(pmHistoryPluginKey)) {
1084
1067
  const {
@@ -1,5 +1,4 @@
1
1
  import { pmHistoryPluginKey } from '@atlaskit/editor-common/utils';
2
- import { fg } from '@atlaskit/platform-feature-flags';
3
2
  import { FLAG_ID } from '../../types';
4
3
  import { syncedBlockPluginKey } from '../main';
5
4
  import { recomputeDeleteTransaction, recomputeUnsyncTransaction } from './recompute-delete-transaction';
@@ -45,8 +44,7 @@ export const handleBodiedSyncBlockRemoval = (bodiedSyncBlockRemoved, syncBlockSt
45
44
  // the confirm path always recomputed a full delete, so unsyncing a source block
46
45
  // silently deleted its content. When the deletion was actually triggered by
47
46
  // unsync, recompute an unwrap (replaceWith content) instead of a delete.
48
- const isUnsync = fg('platform_editor_blocks_patch_6') && deletionReason === 'source-block-unsynced';
49
- const recomputedTr = isUnsync ? recomputeUnsyncTransaction(tr, syncBlockStore.sourceManager.isSourceBlock, bodiedSyncBlockRemoved.map(node => node.attrs)) : recomputeDeleteTransaction(tr, syncBlockStore.sourceManager.isSourceBlock, bodiedSyncBlockRemoved.map(node => node.attrs));
47
+ const recomputedTr = deletionReason === 'source-block-unsynced' ? recomputeUnsyncTransaction(tr, syncBlockStore.sourceManager.isSourceBlock, bodiedSyncBlockRemoved.map(node => node.attrs)) : recomputeDeleteTransaction(tr, syncBlockStore.sourceManager.isSourceBlock, bodiedSyncBlockRemoved.map(node => node.attrs));
50
48
 
51
49
  // The target node(s) no longer exist in the live document (e.g.
52
50
  // a remote collaborator already removed them). There is nothing
@@ -234,9 +234,8 @@ const ItemIcon = ({
234
234
  });
235
235
  }
236
236
 
237
- // Render a Jira issue-type icon when we have one, gated by the shared rollout flag.
237
+ // Render a Jira issue-type icon when we have one.
238
238
  // Falls through to the generic product icon when:
239
- // - the gate is off,
240
239
  // - we don't have access (issueType is not surfaced for no-access references),
241
240
  // - AGG returned no `issueType` (partial index, deleted, etc.), or
242
241
  // - the issue type is unrecognised AND has no `iconUrl`.
@@ -2,7 +2,6 @@ import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
2
  import _createClass from "@babel/runtime/helpers/createClass";
3
3
  import React from 'react';
4
4
  import { ACTION_SUBJECT, ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics';
5
- import { isSSR, isSSRStreaming } from '@atlaskit/editor-common/core-utils';
6
5
  import { ErrorBoundary } from '@atlaskit/editor-common/error-boundary';
7
6
  import { BodiedSyncBlockSharedCssClassName } from '@atlaskit/editor-common/sync-block';
8
7
  import { isOfflineMode } from '@atlaskit/editor-plugin-connectivity';
@@ -36,20 +35,13 @@ export var BodiedSyncBlock = /*#__PURE__*/function () {
36
35
  this.dom = dom;
37
36
  // eslint-disable-next-line @atlaskit/editor/no-as-casting
38
37
  this.contentDOM = contentDOM;
39
- var labelContainer;
40
- if (isSSR() && isSSRStreaming()) {
41
- // During SSR, the portal's renderToStaticMarkup + innerHTML clobbers
42
- // contentDOM. Render the label into a separate container to prevent this.
43
- // eslint-disable-next-line @atlaskit/platform/no-direct-document-usage -- NodeView DOM must be created against active runtime document
44
- labelContainer = document.createElement('div');
45
- this.dom.appendChild(labelContainer);
46
- } else {
47
- // Render the label into a separate container so portal implementations
48
- // that write directly into the target do not clobber contentDOM.
49
- // eslint-disable-next-line @atlaskit/platform/no-direct-document-usage -- NodeView DOM must be created against active runtime document
50
- labelContainer = document.createElement('div');
51
- this.dom.appendChild(labelContainer);
52
- }
38
+
39
+ // Render the label into a separate container so portal implementations that
40
+ // write directly into the target do not clobber contentDOM. This also covers
41
+ // SSR, where the portal's renderToStaticMarkup + innerHTML would clobber it.
42
+ // eslint-disable-next-line @atlaskit/platform/no-direct-document-usage -- NodeView DOM must be created against active runtime document
43
+ var labelContainer = document.createElement('div');
44
+ this.dom.appendChild(labelContainer);
53
45
  this.labelKey = crypto.randomUUID();
54
46
  this.nodeViewPortalProviderAPI.render(function () {
55
47
  var _this$api;
@@ -943,23 +943,10 @@ export var createPlugin = function createPlugin(options, pmPluginFactoryParams,
943
943
  var syncBlockStore = pluginState === null || pluginState === void 0 ? void 0 : pluginState.syncBlockStore;
944
944
  var schema = state.schema;
945
945
  var isCopy = ctx.consumeCopyEvent();
946
- var wasCut = ctx.consumeCutEvent();
947
- var isCut = wasCut;
948
- var isPromptedFeedbackCut = Boolean(syncBlockStore && (options === null || options === void 0 ? void 0 : options.onGiveFeedback) && wasCut) && expValEqualsNoExposure('platform_editor_sync_block_activation', 'isEnabled', true);
949
- if (!syncBlockStore || !isCopy && !isCut && !isPromptedFeedbackCut) {
950
- return slice;
951
- }
952
- if (isPromptedFeedbackCut && !isCut) {
953
- var _containsCutSyncBlock = false;
954
- mapSlice(slice, function (node) {
955
- if (syncBlockStore.referenceManager.isReferenceBlock(node) || node.type.name === 'bodiedSyncBlock' && sliceFullyContainsNode(slice, node)) {
956
- _containsCutSyncBlock = true;
957
- }
958
- return node;
959
- });
960
- if (_containsCutSyncBlock) {
961
- ctx.markCutRemovalPending();
962
- }
946
+ var isCut = ctx.consumeCutEvent();
947
+ // A prompted feedback cut is always a cut, so the two never need combining.
948
+ var isPromptedFeedbackCut = Boolean(syncBlockStore && (options === null || options === void 0 ? void 0 : options.onGiveFeedback) && isCut) && expValEqualsNoExposure('platform_editor_sync_block_activation', 'isEnabled', true);
949
+ if (!syncBlockStore || !isCopy && !isCut) {
963
950
  return slice;
964
951
  }
965
952
  var containsCutSyncBlock = false;
@@ -974,7 +961,7 @@ export var createPlugin = function createPlugin(options, pmPluginFactoryParams,
974
961
  return node;
975
962
  }
976
963
  if (node.type.name === 'bodiedSyncBlock' && node.attrs.resourceId) {
977
- if (isPromptedFeedbackCut && isCut && sliceFullyContainsNode(slice, node)) {
964
+ if (isPromptedFeedbackCut && sliceFullyContainsNode(slice, node)) {
978
965
  containsCutSyncBlock = true;
979
966
  }
980
967
  // if we only selected part of the bodied sync block content,
@@ -1138,9 +1125,6 @@ export var createPlugin = function createPlugin(options, pmPluginFactoryParams,
1138
1125
  }
1139
1126
  });
1140
1127
  }
1141
-
1142
- // Delete is recomputed fresh from the live document on confirm.
1143
- // See EDITOR-7889.
1144
1128
  var _iterator2 = _createForOfIteratorHelper(trs),
1145
1129
  _step2;
1146
1130
  try {
@@ -2,7 +2,6 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  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; }
3
3
  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; }
4
4
  import { pmHistoryPluginKey } from '@atlaskit/editor-common/utils';
5
- import { fg } from '@atlaskit/platform-feature-flags';
6
5
  import { FLAG_ID } from '../../types';
7
6
  import { syncedBlockPluginKey } from '../main';
8
7
  import { recomputeDeleteTransaction, recomputeUnsyncTransaction } from './recompute-delete-transaction';
@@ -52,8 +51,7 @@ export var handleBodiedSyncBlockRemoval = function handleBodiedSyncBlockRemoval(
52
51
  // the confirm path always recomputed a full delete, so unsyncing a source block
53
52
  // silently deleted its content. When the deletion was actually triggered by
54
53
  // unsync, recompute an unwrap (replaceWith content) instead of a delete.
55
- var isUnsync = fg('platform_editor_blocks_patch_6') && deletionReason === 'source-block-unsynced';
56
- var recomputedTr = isUnsync ? recomputeUnsyncTransaction(tr, syncBlockStore.sourceManager.isSourceBlock, bodiedSyncBlockRemoved.map(function (node) {
54
+ var recomputedTr = deletionReason === 'source-block-unsynced' ? recomputeUnsyncTransaction(tr, syncBlockStore.sourceManager.isSourceBlock, bodiedSyncBlockRemoved.map(function (node) {
57
55
  return node.attrs;
58
56
  })) : recomputeDeleteTransaction(tr, syncBlockStore.sourceManager.isSourceBlock, bodiedSyncBlockRemoved.map(function (node) {
59
57
  return node.attrs;
@@ -236,9 +236,8 @@ var ItemIcon = function ItemIcon(_ref3) {
236
236
  });
237
237
  }
238
238
 
239
- // Render a Jira issue-type icon when we have one, gated by the shared rollout flag.
239
+ // Render a Jira issue-type icon when we have one.
240
240
  // Falls through to the generic product icon when:
241
- // - the gate is off,
242
241
  // - we don't have access (issueType is not surfaced for no-access references),
243
242
  // - AGG returned no `issueType` (partial index, deleted, etc.), or
244
243
  // - the issue type is unrecognised AND has no `iconUrl`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-synced-block",
3
- "version": "12.0.7",
3
+ "version": "12.0.9",
4
4
  "description": "SyncedBlock plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -46,7 +46,7 @@
46
46
  "@atlaskit/platform-feature-flags": "^2.1.0",
47
47
  "@atlaskit/primitives": "^22.2.0",
48
48
  "@atlaskit/spinner": "20.1.2",
49
- "@atlaskit/tmp-editor-statsig": "^145.0.0",
49
+ "@atlaskit/tmp-editor-statsig": "^146.0.0",
50
50
  "@atlaskit/tokens": "16.6.0",
51
51
  "@atlaskit/tooltip": "^24.0.0",
52
52
  "@atlaskit/visually-hidden": "^4.2.0",
@@ -58,7 +58,7 @@
58
58
  "memoize-one": "^6.0.0"
59
59
  },
60
60
  "peerDependencies": {
61
- "@atlaskit/editor-common": "^118.4.0",
61
+ "@atlaskit/editor-common": "^118.7.0",
62
62
  "react": "^18.2.0 || ^19.2.0",
63
63
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
64
64
  },
@@ -107,9 +107,6 @@
107
107
  "confluence_fronend_labels_categorization_migration": {
108
108
  "type": "boolean"
109
109
  },
110
- "platform_editor_blocks_patch_6": {
111
- "type": "boolean"
112
- },
113
110
  "platform_editor_blocks_patch_7": {
114
111
  "type": "boolean"
115
112
  }
@@ -1,26 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.rebaseTransaction = void 0;
8
- var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
9
- var _transform = require("@atlaskit/editor-prosemirror/transform");
10
- var rebaseTransaction = exports.rebaseTransaction = function rebaseTransaction(currentTr, incomingTr, state) {
11
- if (!incomingTr.docChanged) {
12
- return currentTr;
13
- }
14
- var currentMapping = new _transform.Mapping((0, _toConsumableArray2.default)(currentTr.mapping.maps).reverse().map(function (map) {
15
- return map.invert();
16
- }));
17
- var rebasedTransaction = state.tr;
18
- currentTr.steps.forEach(function (step) {
19
- var mappedStep = step.map(currentMapping);
20
- if (mappedStep) {
21
- rebasedTransaction.step(mappedStep);
22
- currentMapping.appendMap(mappedStep.getMap());
23
- }
24
- });
25
- return rebasedTransaction;
26
- };
@@ -1,16 +0,0 @@
1
- import { Mapping } from '@atlaskit/editor-prosemirror/transform';
2
- export const rebaseTransaction = (currentTr, incomingTr, state) => {
3
- if (!incomingTr.docChanged) {
4
- return currentTr;
5
- }
6
- const currentMapping = new Mapping([...currentTr.mapping.maps].reverse().map(map => map.invert()));
7
- const rebasedTransaction = state.tr;
8
- currentTr.steps.forEach(step => {
9
- const mappedStep = step.map(currentMapping);
10
- if (mappedStep) {
11
- rebasedTransaction.step(mappedStep);
12
- currentMapping.appendMap(mappedStep.getMap());
13
- }
14
- });
15
- return rebasedTransaction;
16
- };
@@ -1,19 +0,0 @@
1
- import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
2
- import { Mapping } from '@atlaskit/editor-prosemirror/transform';
3
- export var rebaseTransaction = function rebaseTransaction(currentTr, incomingTr, state) {
4
- if (!incomingTr.docChanged) {
5
- return currentTr;
6
- }
7
- var currentMapping = new Mapping(_toConsumableArray(currentTr.mapping.maps).reverse().map(function (map) {
8
- return map.invert();
9
- }));
10
- var rebasedTransaction = state.tr;
11
- currentTr.steps.forEach(function (step) {
12
- var mappedStep = step.map(currentMapping);
13
- if (mappedStep) {
14
- rebasedTransaction.step(mappedStep);
15
- currentMapping.appendMap(mappedStep.getMap());
16
- }
17
- });
18
- return rebasedTransaction;
19
- };
@@ -1,2 +0,0 @@
1
- import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
2
- export declare const rebaseTransaction: (currentTr: Transaction, incomingTr: Transaction, state: EditorState) => Transaction;