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

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.
Files changed (39) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/cjs/editor-commands/index.js +8 -18
  3. package/dist/cjs/nodeviews/bodiedSyncedBlock.js +3 -7
  4. package/dist/cjs/nodeviews/syncedBlock.js +9 -15
  5. package/dist/cjs/pm-plugins/main.js +14 -42
  6. package/dist/cjs/pm-plugins/utils/handle-bodied-sync-block-removal.js +36 -54
  7. package/dist/cjs/syncedBlockPlugin.js +1 -4
  8. package/dist/cjs/ui/CreateSyncedBlockButton.js +23 -35
  9. package/dist/cjs/ui/CreateSyncedBlockDropdownItem.js +36 -47
  10. package/dist/cjs/ui/SyncBlockLabel.js +2 -13
  11. package/dist/cjs/ui/SyncBlockRendererWrapper.js +7 -9
  12. package/dist/cjs/ui/SyncedLocationDropdown.js +53 -116
  13. package/dist/cjs/ui/floating-toolbar.js +1 -2
  14. package/dist/es2019/editor-commands/index.js +8 -18
  15. package/dist/es2019/nodeviews/bodiedSyncedBlock.js +3 -7
  16. package/dist/es2019/nodeviews/syncedBlock.js +9 -15
  17. package/dist/es2019/pm-plugins/main.js +16 -41
  18. package/dist/es2019/pm-plugins/utils/handle-bodied-sync-block-removal.js +33 -51
  19. package/dist/es2019/syncedBlockPlugin.js +1 -4
  20. package/dist/es2019/ui/CreateSyncedBlockButton.js +25 -36
  21. package/dist/es2019/ui/CreateSyncedBlockDropdownItem.js +36 -47
  22. package/dist/es2019/ui/SyncBlockLabel.js +2 -13
  23. package/dist/es2019/ui/SyncBlockRendererWrapper.js +7 -9
  24. package/dist/es2019/ui/SyncedLocationDropdown.js +1 -58
  25. package/dist/es2019/ui/floating-toolbar.js +1 -2
  26. package/dist/esm/editor-commands/index.js +8 -18
  27. package/dist/esm/nodeviews/bodiedSyncedBlock.js +3 -7
  28. package/dist/esm/nodeviews/syncedBlock.js +9 -15
  29. package/dist/esm/pm-plugins/main.js +15 -43
  30. package/dist/esm/pm-plugins/utils/handle-bodied-sync-block-removal.js +36 -54
  31. package/dist/esm/syncedBlockPlugin.js +1 -4
  32. package/dist/esm/ui/CreateSyncedBlockButton.js +23 -35
  33. package/dist/esm/ui/CreateSyncedBlockDropdownItem.js +36 -47
  34. package/dist/esm/ui/SyncBlockLabel.js +2 -13
  35. package/dist/esm/ui/SyncBlockRendererWrapper.js +7 -9
  36. package/dist/esm/ui/SyncedLocationDropdown.js +53 -116
  37. package/dist/esm/ui/floating-toolbar.js +1 -2
  38. package/dist/types/pm-plugins/main.d.ts +2 -4
  39. package/package.json +5 -14
@@ -4,7 +4,6 @@ import { useIntl } from 'react-intl';
4
4
  import { syncBlockMessages as messages } from '@atlaskit/editor-common/messages';
5
5
  import { SyncBlockLabelSharedCssClassName } from '@atlaskit/editor-common/sync-block';
6
6
  import BlockSyncedIcon from '@atlaskit/icon-lab/core/block-synced';
7
- import { fg } from '@atlaskit/platform-feature-flags';
8
7
  import { Text } from '@atlaskit/primitives/compiled';
9
8
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
10
9
  import Tooltip from '@atlaskit/tooltip';
@@ -33,7 +32,7 @@ var SyncBlockLabelComponent = function SyncBlockLabelComponent(_ref) {
33
32
  var tooltipContent = tooltipMessage;
34
33
  if (contentUpdatedAt) {
35
34
  var elapsedTime = formatElapsedTime(contentUpdatedAt, intl);
36
- tooltipContent = fg('platform_synced_block_patch_13') ? /*#__PURE__*/React.createElement("div", null, title ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Text, {
35
+ tooltipContent = /*#__PURE__*/React.createElement("div", null, title ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Text, {
37
36
  size: "small",
38
37
  color: "color.text.inverse",
39
38
  weight: "bold"
@@ -50,17 +49,7 @@ var SyncBlockLabelComponent = function SyncBlockLabelComponent(_ref) {
50
49
  }, formatMessage(messages.referenceSyncBlockLastEdited)), /*#__PURE__*/React.createElement(Text, {
51
50
  size: "small",
52
51
  color: "color.text.inverse"
53
- }, ' ', elapsedTime)) : /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Text, {
54
- size: "small",
55
- color: "color.text.inverse"
56
- }, tooltipMessage), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement(Text, {
57
- size: "small",
58
- color: "color.text.inverse",
59
- weight: "bold"
60
- }, formatMessage(messages.referenceSyncBlockLastEdited)), /*#__PURE__*/React.createElement(Text, {
61
- size: "small",
62
- color: "color.text.inverse"
63
- }, elapsedTime));
52
+ }, ' ', elapsedTime));
64
53
  }
65
54
  setTooltipContent(tooltipContent);
66
55
  }, [contentUpdatedAt, formatMessage, intl, title, tooltipMessage]);
@@ -2,7 +2,6 @@ import React, { useCallback, useEffect, useRef } from 'react';
2
2
  import { bind } from 'bind-event-listener';
3
3
  import { SyncBlockSharedCssClassName } from '@atlaskit/editor-common/sync-block';
4
4
  import { SyncBlockError, useFetchSyncBlockData, useFetchSyncBlockTitle } from '@atlaskit/editor-synced-block-provider';
5
- import { fg } from '@atlaskit/platform-feature-flags';
6
5
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
7
6
  import { SyncBlockLabel } from './SyncBlockLabel';
8
7
  var SyncBlockRendererWrapperDataId = 'sync-block-plugin-renderer-wrapper';
@@ -19,7 +18,6 @@ var SyncBlockRendererWrapperComponent = function SyncBlockRendererWrapperCompone
19
18
  var contentUpdatedAt = syncBlockFetchResult === null || syncBlockFetchResult === void 0 || (_syncBlockFetchResult = syncBlockFetchResult.syncBlockInstance) === null || _syncBlockFetchResult === void 0 || (_syncBlockFetchResult = _syncBlockFetchResult.data) === null || _syncBlockFetchResult === void 0 ? void 0 : _syncBlockFetchResult.contentUpdatedAt;
20
19
  var isUnpublishedBlock = ((_syncBlockFetchResult2 = syncBlockFetchResult.syncBlockInstance) === null || _syncBlockFetchResult2 === void 0 || (_syncBlockFetchResult2 = _syncBlockFetchResult2.data) === null || _syncBlockFetchResult2 === void 0 ? void 0 : _syncBlockFetchResult2.status) === 'unpublished';
21
20
  var isUnsyncedBlock = isUnpublishedBlock || (syncBlockFetchResult === null || syncBlockFetchResult === void 0 || (_syncBlockFetchResult3 = syncBlockFetchResult.syncBlockInstance) === null || _syncBlockFetchResult3 === void 0 || (_syncBlockFetchResult3 = _syncBlockFetchResult3.error) === null || _syncBlockFetchResult3 === void 0 ? void 0 : _syncBlockFetchResult3.type) === SyncBlockError.NotFound;
22
- var isTextSelectionEnabled = fg('platform_synced_block_patch_14');
23
21
 
24
22
  // Evaluated unconditionally so the experiment exposure is tracked correctly
25
23
  // (recorded on every render, not lazily on first click).
@@ -42,7 +40,7 @@ var SyncBlockRendererWrapperComponent = function SyncBlockRendererWrapperCompone
42
40
  var rendererRef = useRef(null);
43
41
  useEffect(function () {
44
42
  var containerEl = rendererRef.current;
45
- if (!containerEl || !isTextSelectionEnabled || !isSyncBlockActivationEnabled) {
43
+ if (!containerEl || !isSyncBlockActivationEnabled) {
46
44
  return;
47
45
  }
48
46
  var unbind = bind(containerEl, {
@@ -62,25 +60,25 @@ var SyncBlockRendererWrapperComponent = function SyncBlockRendererWrapperCompone
62
60
  }
63
61
  });
64
62
  return unbind;
65
- }, [isTextSelectionEnabled, isSyncBlockActivationEnabled]);
63
+ }, [isSyncBlockActivationEnabled]);
66
64
  return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
67
65
  ref: rendererRef,
68
66
  "data-testid": SyncBlockRendererWrapperDataId
69
67
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
70
68
  ,
71
69
  className: SyncBlockSharedCssClassName.renderer,
72
- contentEditable: isTextSelectionEnabled || undefined,
70
+ contentEditable: true,
73
71
  suppressContentEditableWarning: true
74
72
  // Prevent the contentEditable div from being keyboard-focusable.
75
73
  // It is only used to enable text selection, not as an input target.
76
74
  // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex
77
75
  ,
78
- tabIndex: isTextSelectionEnabled ? -1 : undefined,
79
- onBeforeInput: isTextSelectionEnabled ? preventInput : undefined,
80
- onPaste: isTextSelectionEnabled ? preventInput : undefined
76
+ tabIndex: -1,
77
+ onBeforeInput: preventInput,
78
+ onPaste: preventInput
81
79
  // eslint-disable-next-line @atlaskit/design-system/no-direct-use-of-web-platform-drag-and-drop
82
80
  ,
83
- onDrop: isTextSelectionEnabled ? preventInput : undefined
81
+ onDrop: preventInput
84
82
  }, syncedBlockRenderer({
85
83
  syncBlockFetchResult: syncBlockFetchResult,
86
84
  api: api
@@ -1,9 +1,6 @@
1
1
  /* SyncedLocationDropdown.tsx generated by @compiled/babel-plugin v2.0.0 */
2
2
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
- import _extends from "@babel/runtime/helpers/extends";
4
- import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
5
3
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
6
- var _excluded = ["triggerRef"];
7
4
  import "./SyncedLocationDropdown.compiled.css";
8
5
  import * as React from 'react';
9
6
  import { ax, ix } from "@compiled/react/runtime";
@@ -13,7 +10,7 @@ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r)
13
10
  function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
14
11
  import { useCallback, useEffect, useMemo, useState } from 'react';
15
12
  import { cx } from '@compiled/react';
16
- import DropdownMenu, { DropdownItem, DropdownItemGroup } from '@atlaskit/dropdown-menu';
13
+ import { DropdownItem, DropdownItemGroup } from '@atlaskit/dropdown-menu';
17
14
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
18
15
  import { syncBlockMessages as messages } from '@atlaskit/editor-common/messages';
19
16
  import { SYNCED_BLOCKS_DOCUMENTATION_URL } from '@atlaskit/editor-common/sync-block';
@@ -34,7 +31,6 @@ import SubtaskIcon from '@atlaskit/icon/core/subtasks';
34
31
  import TaskIcon from '@atlaskit/icon/core/task';
35
32
  import { ConfluenceIcon, JiraIcon, AtlassianIcon } from '@atlaskit/logo';
36
33
  import Lozenge from '@atlaskit/lozenge';
37
- import { fg } from '@atlaskit/platform-feature-flags';
38
34
  import { Box, Text, Inline, Anchor, Stack } from '@atlaskit/primitives/compiled';
39
35
  import Spinner from '@atlaskit/spinner';
40
36
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
@@ -309,16 +305,6 @@ export var SyncedLocationDropdown = function SyncedLocationDropdown(_ref4) {
309
305
  localId = _ref4.localId,
310
306
  api = _ref4.api,
311
307
  floatingToolbarRenderContext = _ref4.floatingToolbarRenderContext;
312
- if (!fg('platform_synced_block_patch_13')) {
313
- return /*#__PURE__*/React.createElement(LegacySyncedLocationDropdown, {
314
- syncBlockStore: syncBlockStore,
315
- resourceId: resourceId,
316
- intl: intl,
317
- isSource: isSource,
318
- localId: localId,
319
- api: api
320
- });
321
- }
322
308
  return /*#__PURE__*/React.createElement(EditorPositionedSyncedLocationDropdown, {
323
309
  syncBlockStore: syncBlockStore,
324
310
  resourceId: resourceId,
@@ -399,67 +385,18 @@ var EditorPositionedSyncedLocationDropdown = function EditorPositionedSyncedLoca
399
385
  }
400
386
  }, content);
401
387
  };
402
- var LegacySyncedLocationDropdown = function LegacySyncedLocationDropdown(_ref6) {
388
+ export var SyncedLocationDropdownWithCount = function SyncedLocationDropdownWithCount(_ref6) {
403
389
  var syncBlockStore = _ref6.syncBlockStore,
404
390
  resourceId = _ref6.resourceId,
405
391
  intl = _ref6.intl,
406
392
  isSource = _ref6.isSource,
407
393
  localId = _ref6.localId,
408
- api = _ref6.api;
409
- var triggerTitle = intl.formatMessage(messages.syncedLocationDropdownTitle);
394
+ api = _ref6.api,
395
+ floatingToolbarRenderContext = _ref6.floatingToolbarRenderContext;
410
396
  var _useState3 = useState(false),
411
397
  _useState4 = _slicedToArray(_useState3, 2),
412
398
  isOpen = _useState4[0],
413
399
  setIsOpen = _useState4[1];
414
- var content = isOpen ? /*#__PURE__*/React.createElement(DropdownContent, {
415
- syncBlockStore: syncBlockStore,
416
- resourceId: resourceId,
417
- intl: intl,
418
- isSource: isSource,
419
- localId: localId,
420
- api: api
421
- }) : null;
422
- return /*#__PURE__*/React.createElement(DropdownMenu, {
423
- isOpen: isOpen
424
- // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
425
- ,
426
- onOpenChange: function onOpenChange(_ref7) {
427
- var isOpen = _ref7.isOpen;
428
- return setIsOpen(isOpen);
429
- },
430
- testId: SYNCED_LOCATIONS_DROPDOWN_TEST_ID
431
- // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
432
- ,
433
- trigger: function trigger(_ref8) {
434
- var triggerRef = _ref8.triggerRef,
435
- triggerProps = _objectWithoutProperties(_ref8, _excluded);
436
- return /*#__PURE__*/React.createElement(Button, _extends({
437
- ref: triggerRef,
438
- areAnyNewToolbarFlagsEnabled: true,
439
- selected: isOpen,
440
- iconAfter: /*#__PURE__*/React.createElement(ChevronDownIcon, {
441
- color: "currentColor",
442
- spacing: "spacious",
443
- label: "",
444
- size: "small"
445
- })
446
- // eslint-disable-next-line react/jsx-props-no-spreading
447
- }, triggerProps), triggerTitle);
448
- }
449
- }, content);
450
- };
451
- export var SyncedLocationDropdownWithCount = function SyncedLocationDropdownWithCount(_ref9) {
452
- var syncBlockStore = _ref9.syncBlockStore,
453
- resourceId = _ref9.resourceId,
454
- intl = _ref9.intl,
455
- isSource = _ref9.isSource,
456
- localId = _ref9.localId,
457
- api = _ref9.api,
458
- floatingToolbarRenderContext = _ref9.floatingToolbarRenderContext;
459
- var _useState5 = useState(false),
460
- _useState6 = _slicedToArray(_useState5, 2),
461
- isOpen = _useState6[0],
462
- setIsOpen = _useState6[1];
463
400
  var _useReferenceData = useReferenceData({
464
401
  intl: intl,
465
402
  isSource: isSource,
@@ -470,8 +407,8 @@ export var SyncedLocationDropdownWithCount = function SyncedLocationDropdownWith
470
407
  fetchStatus = _useReferenceData.fetchStatus,
471
408
  referenceData = _useReferenceData.referenceData;
472
409
  var referenceCount = useMemo(function () {
473
- return referenceData.filter(function (_ref0) {
474
- var isSourceItem = _ref0.isSource;
410
+ return referenceData.filter(function (_ref7) {
411
+ var isSourceItem = _ref7.isSource;
475
412
  return !isSourceItem;
476
413
  }).length;
477
414
  }, [referenceData]);
@@ -539,25 +476,25 @@ export var SyncedLocationDropdownWithCount = function SyncedLocationDropdownWith
539
476
  }
540
477
  }, content);
541
478
  };
542
- var DropdownContent = function DropdownContent(_ref1) {
543
- var syncBlockStore = _ref1.syncBlockStore,
544
- resourceId = _ref1.resourceId,
545
- intl = _ref1.intl,
546
- isSource = _ref1.isSource,
547
- localId = _ref1.localId,
548
- api = _ref1.api;
549
- var _useState7 = useState('none'),
479
+ var DropdownContent = function DropdownContent(_ref8) {
480
+ var syncBlockStore = _ref8.syncBlockStore,
481
+ resourceId = _ref8.resourceId,
482
+ intl = _ref8.intl,
483
+ isSource = _ref8.isSource,
484
+ localId = _ref8.localId,
485
+ api = _ref8.api;
486
+ var _useState5 = useState('none'),
487
+ _useState6 = _slicedToArray(_useState5, 2),
488
+ fetchStatus = _useState6[0],
489
+ setFetchStatus = _useState6[1];
490
+ var _useState7 = useState([]),
550
491
  _useState8 = _slicedToArray(_useState7, 2),
551
- fetchStatus = _useState8[0],
552
- setFetchStatus = _useState8[1];
553
- var _useState9 = useState([]),
554
- _useState0 = _slicedToArray(_useState9, 2),
555
- referenceData = _useState0[0],
556
- setReferenceData = _useState0[1];
492
+ referenceData = _useState8[0],
493
+ setReferenceData = _useState8[1];
557
494
  useEffect(function () {
558
495
  setFetchStatus('loading');
559
496
  var getReferenceData = /*#__PURE__*/function () {
560
- var _ref10 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
497
+ var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
561
498
  var response;
562
499
  return _regeneratorRuntime.wrap(function (_context) {
563
500
  while (1) switch (_context.prev = _context.next) {
@@ -582,7 +519,7 @@ var DropdownContent = function DropdownContent(_ref1) {
582
519
  }, _callee);
583
520
  }));
584
521
  return function getReferenceData() {
585
- return _ref10.apply(this, arguments);
522
+ return _ref9.apply(this, arguments);
586
523
  };
587
524
  }();
588
525
  void getReferenceData();
@@ -595,26 +532,26 @@ var DropdownContent = function DropdownContent(_ref1) {
595
532
  referenceData: referenceData
596
533
  });
597
534
  };
598
- var useReferenceData = function useReferenceData(_ref11) {
599
- var syncBlockStore = _ref11.syncBlockStore,
600
- resourceId = _ref11.resourceId,
601
- intl = _ref11.intl,
602
- isSource = _ref11.isSource,
603
- localId = _ref11.localId;
604
- var _useState1 = useState(function () {
535
+ var useReferenceData = function useReferenceData(_ref0) {
536
+ var syncBlockStore = _ref0.syncBlockStore,
537
+ resourceId = _ref0.resourceId,
538
+ intl = _ref0.intl,
539
+ isSource = _ref0.isSource,
540
+ localId = _ref0.localId;
541
+ var _useState9 = useState(function () {
605
542
  return isSource && syncBlockStore.sourceManager.isNewSourceBlock(resourceId);
606
543
  }),
607
- _useState10 = _slicedToArray(_useState1, 1),
608
- isNewSourceBlock = _useState10[0];
609
- var _useState11 = useState(function () {
544
+ _useState0 = _slicedToArray(_useState9, 1),
545
+ isNewSourceBlock = _useState0[0];
546
+ var _useState1 = useState(function () {
610
547
  return {
611
548
  fetchStatus: isNewSourceBlock ? 'success' : 'loading',
612
549
  referenceData: []
613
550
  };
614
551
  }),
615
- _useState12 = _slicedToArray(_useState11, 2),
616
- state = _useState12[0],
617
- setState = _useState12[1];
552
+ _useState10 = _slicedToArray(_useState1, 2),
553
+ state = _useState10[0],
554
+ setState = _useState10[1];
618
555
  useEffect(function () {
619
556
  var isCurrentRequest = true;
620
557
  setState({
@@ -622,7 +559,7 @@ var useReferenceData = function useReferenceData(_ref11) {
622
559
  referenceData: []
623
560
  });
624
561
  var getReferenceData = /*#__PURE__*/function () {
625
- var _ref12 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
562
+ var _ref1 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
626
563
  var response;
627
564
  return _regeneratorRuntime.wrap(function (_context2) {
628
565
  while (1) switch (_context2.prev = _context2.next) {
@@ -661,7 +598,7 @@ var useReferenceData = function useReferenceData(_ref11) {
661
598
  }, _callee2);
662
599
  }));
663
600
  return function getReferenceData() {
664
- return _ref12.apply(this, arguments);
601
+ return _ref1.apply(this, arguments);
665
602
  };
666
603
  }();
667
604
  void getReferenceData();
@@ -674,10 +611,10 @@ var useReferenceData = function useReferenceData(_ref11) {
674
611
  referenceData: state.referenceData
675
612
  };
676
613
  };
677
- var SyncedLocationTriggerContent = function SyncedLocationTriggerContent(_ref13) {
678
- var intl = _ref13.intl,
679
- fetchStatus = _ref13.fetchStatus,
680
- referenceCount = _ref13.referenceCount;
614
+ var SyncedLocationTriggerContent = function SyncedLocationTriggerContent(_ref10) {
615
+ var intl = _ref10.intl,
616
+ fetchStatus = _ref10.fetchStatus,
617
+ referenceCount = _ref10.referenceCount;
681
618
  var formatMessage = intl.formatMessage;
682
619
  var triggerTitle = formatMessage(messages.syncedLocationDropdownTitle);
683
620
  var syncedLocationCount = referenceCount === 0 ? 0 : referenceCount + 1;
@@ -702,12 +639,12 @@ var SyncedLocationTriggerContent = function SyncedLocationTriggerContent(_ref13)
702
639
  return triggerTitle;
703
640
  }
704
641
  };
705
- var DropdownContentWithReferenceData = function DropdownContentWithReferenceData(_ref14) {
706
- var resourceId = _ref14.resourceId,
707
- intl = _ref14.intl,
708
- api = _ref14.api,
709
- fetchStatus = _ref14.fetchStatus,
710
- referenceData = _ref14.referenceData;
642
+ var DropdownContentWithReferenceData = function DropdownContentWithReferenceData(_ref11) {
643
+ var resourceId = _ref11.resourceId,
644
+ intl = _ref11.intl,
645
+ api = _ref11.api,
646
+ fetchStatus = _ref11.fetchStatus,
647
+ referenceData = _ref11.referenceData;
711
648
  var formatMessage = intl.formatMessage;
712
649
  var handleLocationClick = function handleLocationClick() {
713
650
  var _api$analytics;
@@ -781,14 +718,14 @@ var DropdownContentWithReferenceData = function DropdownContentWithReferenceData
781
718
  xcss: cx(styles.dropdownContent, expValEqualsNoExposure('platform_editor_sync_block_activation', 'isEnabled', true) && fetchStatus === 'success' && referenceData.length === 0 && styles.activationDropdownContent, shouldApplyMinHeight(fetchStatus, referenceData.length) && styles.containerWithMinHeight)
782
719
  }, content());
783
720
  };
784
- var LoadingScreen = function LoadingScreen(_ref15) {
785
- var formatMessage = _ref15.formatMessage;
721
+ var LoadingScreen = function LoadingScreen(_ref12) {
722
+ var formatMessage = _ref12.formatMessage;
786
723
  return /*#__PURE__*/React.createElement(Box, null, /*#__PURE__*/React.createElement(Spinner, {
787
724
  label: formatMessage(messages.syncedLocationDropdownLoading)
788
725
  }));
789
726
  };
790
- var ErrorScreen = function ErrorScreen(_ref16) {
791
- var formatMessage = _ref16.formatMessage;
727
+ var ErrorScreen = function ErrorScreen(_ref13) {
728
+ var formatMessage = _ref13.formatMessage;
792
729
  return /*#__PURE__*/React.createElement(Box, {
793
730
  xcss: styles.errorContainer,
794
731
  testId: "synced-locations-dropdown-content-error"
@@ -804,8 +741,8 @@ var ErrorScreen = function ErrorScreen(_ref16) {
804
741
  size: "medium"
805
742
  }, formatMessage(messages.syncedLocationDropdownError)));
806
743
  };
807
- var NoResultScreen = function NoResultScreen(_ref17) {
808
- var formatMessage = _ref17.formatMessage;
744
+ var NoResultScreen = function NoResultScreen(_ref14) {
745
+ var formatMessage = _ref14.formatMessage;
809
746
  return expValEquals('platform_editor_sync_block_activation', 'isEnabled', true) ? /*#__PURE__*/React.createElement(Box, {
810
747
  xcss: styles.activationNoResultsContainer,
811
748
  testId: "synced-locations-dropdown-content-no-results"
@@ -15,7 +15,6 @@ import DeleteIcon from '@atlaskit/icon/core/delete';
15
15
  import EditIcon from '@atlaskit/icon/core/edit';
16
16
  import LinkBrokenIcon from '@atlaskit/icon/core/link-broken';
17
17
  import MegaphoneIcon from '@atlaskit/icon/core/megaphone';
18
- import { fg } from '@atlaskit/platform-feature-flags';
19
18
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
20
19
  import { copySyncedBlockReferenceToClipboard, editSyncedBlockSource, removeSyncedBlock, unsync } from '../editor-commands';
21
20
  import { findSyncBlockOrBodiedSyncBlock, isBodiedSyncBlockNode } from '../pm-plugins/utils/utils';
@@ -154,7 +153,7 @@ export var getToolbarConfig = function getToolbarConfig(state, intl, api, syncBl
154
153
  }, hoverDecorationProps(nodeType, akEditorSelectedNodeClassName));
155
154
  items.push(editSourceButton);
156
155
  }
157
- if (!isSyncBlockActivationEnabled && fg('platform_synced_block_patch_13')) {
156
+ if (!isSyncBlockActivationEnabled) {
158
157
  var separator = {
159
158
  type: 'separator'
160
159
  };
@@ -15,16 +15,14 @@ export declare const syncedBlockPluginKey: PluginKey;
15
15
  * `deleteButton` (otherwise indistinguishable from a keyboard delete — both are
16
16
  * plain ReplaceSteps). A separate key (rather than `syncedBlockPluginKey`, which
17
17
  * carries plugin-state transitions read in `apply()`, or a bare string) keeps
18
- * this transient signal uniquely namespaced and isolated. Only read behind
19
- * `platform_editor_blocks_patch_4`.
18
+ * this transient signal uniquely namespaced and isolated.
20
19
  */
21
20
  export declare const deleteMechanismMetaKey: PluginKey<DeletionMechanism>;
22
21
  /**
23
22
  * Creation-type signals set by {@link createSyncedBlock} on the creating
24
23
  * transaction. The async creation handler forwards them to the store manager,
25
24
  * which attaches them to the `syncedBlockCreate` event. A dedicated key keeps
26
- * this transient signal isolated from plugin state. Consumed behind
27
- * `platform_editor_blocks_patch_4`.
25
+ * this transient signal isolated from plugin state.
28
26
  */
29
27
  export type SyncedBlockCreationMeta = {
30
28
  createdEmpty?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-synced-block",
3
- "version": "12.0.5",
3
+ "version": "12.0.7",
4
4
  "description": "SyncedBlock plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -20,8 +20,8 @@
20
20
  "sideEffects": false,
21
21
  "atlaskit:src": "src/index.ts",
22
22
  "dependencies": {
23
- "@atlaskit/adf-schema": "^56.6.0",
24
- "@atlaskit/button": "25.0.3",
23
+ "@atlaskit/adf-schema": "^56.7.0",
24
+ "@atlaskit/button": "25.0.4",
25
25
  "@atlaskit/dropdown-menu": "18.0.1",
26
26
  "@atlaskit/editor-json-transformer": "^9.2.0",
27
27
  "@atlaskit/editor-plugin-analytics": "^14.0.0",
@@ -47,7 +47,7 @@
47
47
  "@atlaskit/primitives": "^22.2.0",
48
48
  "@atlaskit/spinner": "20.1.2",
49
49
  "@atlaskit/tmp-editor-statsig": "^145.0.0",
50
- "@atlaskit/tokens": "16.5.0",
50
+ "@atlaskit/tokens": "16.6.0",
51
51
  "@atlaskit/tooltip": "^24.0.0",
52
52
  "@atlaskit/visually-hidden": "^4.2.0",
53
53
  "@babel/runtime": "^7.0.0",
@@ -58,7 +58,7 @@
58
58
  "memoize-one": "^6.0.0"
59
59
  },
60
60
  "peerDependencies": {
61
- "@atlaskit/editor-common": "^118.2.0",
61
+ "@atlaskit/editor-common": "^118.4.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,20 +107,11 @@
107
107
  "confluence_fronend_labels_categorization_migration": {
108
108
  "type": "boolean"
109
109
  },
110
- "platform_editor_blocks_patch_4": {
111
- "type": "boolean"
112
- },
113
110
  "platform_editor_blocks_patch_6": {
114
111
  "type": "boolean"
115
112
  },
116
113
  "platform_editor_blocks_patch_7": {
117
114
  "type": "boolean"
118
- },
119
- "platform_synced_block_patch_13": {
120
- "type": "boolean"
121
- },
122
- "platform_synced_block_patch_14": {
123
- "type": "boolean"
124
115
  }
125
116
  }
126
117
  }