@atlaskit/editor-plugin-block-menu 6.1.7 → 6.1.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/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @atlaskit/editor-plugin-block-menu
2
2
 
3
+ ## 6.1.9
4
+
5
+ ### Patch Changes
6
+
7
+ - [`0a3f1913cc452`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0a3f1913cc452) -
8
+ Skip tracking experience for extension item transform
9
+ - Updated dependencies
10
+
11
+ ## 6.1.8
12
+
13
+ ### Patch Changes
14
+
15
+ - [`3b290b31e9ad1`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3b290b31e9ad1) -
16
+ Update menu button text for sync blocks
17
+ - Updated dependencies
18
+
3
19
  ## 6.1.7
4
20
 
5
21
  ### Patch Changes
@@ -124,7 +124,10 @@ var getBlockMenuExperiencesPlugin = exports.getBlockMenuExperiencesPlugin = func
124
124
  });
125
125
  };
126
126
  var handleTransformActioned = function handleTransformActioned(target) {
127
- if (!target.closest('[data-testid="editor-turn-into-menu--content"]')) {
127
+ if (!target.closest('[data-testid="editor-turn-into-menu--content"]')
128
+ // Skip experience tracking when the clicked item is an extension menu item
129
+ // (e.g. Jira macro, etc.) - they don't perform block transforms
130
+ || target.closest("[data-testid=\"".concat(_blockMenu.EXTENSION_MENU_ITEM_TEST_ID, "\"]"))) {
128
131
  return false;
129
132
  }
130
133
  var turnIntoButton = target.closest('button');
@@ -92,8 +92,8 @@ var CopyLinkDropdownItemContent = function CopyLinkDropdownItemContent(_ref) {
92
92
 
93
93
  // [FEATURE FLAG: platform_editor_block_menu_v2_patch_3]
94
94
  // Conditionally display message based on feature flag
95
- // To clean up: remove the conditional and use only copyLinkToBlock message
96
- var message = (0, _platformFeatureFlags.fg)('platform_editor_block_menu_v2_patch_3') ? _messages.blockMenuMessages.copyLinkToBlock : _messages.blockMenuMessages.copyLinkToBlockOld;
95
+ // To clean up: remove the conditional and use only copyLinkToSelection message
96
+ var message = (0, _platformFeatureFlags.fg)('platform_editor_block_menu_v2_patch_3') ? _messages.blockMenuMessages.copyLinkToSelection : _messages.blockMenuMessages.copyLinkToBlock;
97
97
 
98
98
  // [FEATURE FLAG: platform_editor_block_menu_v2_patch_3]
99
99
  // Adds size="small" to icons for better visual consistency in block menu.
@@ -1,6 +1,6 @@
1
1
  import { bind } from 'bind-event-listener';
2
2
  import { ACTION, ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics';
3
- import { BLOCK_MENU_ACTION_TEST_ID, BLOCK_MENU_TEST_ID } from '@atlaskit/editor-common/block-menu';
3
+ import { BLOCK_MENU_ACTION_TEST_ID, BLOCK_MENU_TEST_ID, EXTENSION_MENU_ITEM_TEST_ID } from '@atlaskit/editor-common/block-menu';
4
4
  import { Experience, EXPERIENCE_ID, ExperienceCheckDomMutation, ExperienceCheckPopupMutation, ExperienceCheckTimeout, getPopupContainerFromEditorView } from '@atlaskit/editor-common/experiences';
5
5
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
6
6
  import { PluginKey } from '@atlaskit/editor-prosemirror/state';
@@ -117,7 +117,10 @@ export const getBlockMenuExperiencesPlugin = ({
117
117
  });
118
118
  };
119
119
  const handleTransformActioned = target => {
120
- if (!target.closest('[data-testid="editor-turn-into-menu--content"]')) {
120
+ if (!target.closest('[data-testid="editor-turn-into-menu--content"]')
121
+ // Skip experience tracking when the clicked item is an extension menu item
122
+ // (e.g. Jira macro, etc.) - they don't perform block transforms
123
+ || target.closest(`[data-testid="${EXTENSION_MENU_ITEM_TEST_ID}"]`)) {
121
124
  return false;
122
125
  }
123
126
  const turnIntoButton = target.closest('button');
@@ -91,8 +91,8 @@ const CopyLinkDropdownItemContent = ({
91
91
 
92
92
  // [FEATURE FLAG: platform_editor_block_menu_v2_patch_3]
93
93
  // Conditionally display message based on feature flag
94
- // To clean up: remove the conditional and use only copyLinkToBlock message
95
- const message = fg('platform_editor_block_menu_v2_patch_3') ? messages.copyLinkToBlock : messages.copyLinkToBlockOld;
94
+ // To clean up: remove the conditional and use only copyLinkToSelection message
95
+ const message = fg('platform_editor_block_menu_v2_patch_3') ? messages.copyLinkToSelection : messages.copyLinkToBlock;
96
96
 
97
97
  // [FEATURE FLAG: platform_editor_block_menu_v2_patch_3]
98
98
  // Adds size="small" to icons for better visual consistency in block menu.
@@ -1,6 +1,6 @@
1
1
  import { bind } from 'bind-event-listener';
2
2
  import { ACTION, ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics';
3
- import { BLOCK_MENU_ACTION_TEST_ID, BLOCK_MENU_TEST_ID } from '@atlaskit/editor-common/block-menu';
3
+ import { BLOCK_MENU_ACTION_TEST_ID, BLOCK_MENU_TEST_ID, EXTENSION_MENU_ITEM_TEST_ID } from '@atlaskit/editor-common/block-menu';
4
4
  import { Experience, EXPERIENCE_ID, ExperienceCheckDomMutation, ExperienceCheckPopupMutation, ExperienceCheckTimeout, getPopupContainerFromEditorView } from '@atlaskit/editor-common/experiences';
5
5
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
6
6
  import { PluginKey } from '@atlaskit/editor-prosemirror/state';
@@ -118,7 +118,10 @@ export var getBlockMenuExperiencesPlugin = function getBlockMenuExperiencesPlugi
118
118
  });
119
119
  };
120
120
  var handleTransformActioned = function handleTransformActioned(target) {
121
- if (!target.closest('[data-testid="editor-turn-into-menu--content"]')) {
121
+ if (!target.closest('[data-testid="editor-turn-into-menu--content"]')
122
+ // Skip experience tracking when the clicked item is an extension menu item
123
+ // (e.g. Jira macro, etc.) - they don't perform block transforms
124
+ || target.closest("[data-testid=\"".concat(EXTENSION_MENU_ITEM_TEST_ID, "\"]"))) {
122
125
  return false;
123
126
  }
124
127
  var turnIntoButton = target.closest('button');
@@ -83,8 +83,8 @@ var CopyLinkDropdownItemContent = function CopyLinkDropdownItemContent(_ref) {
83
83
 
84
84
  // [FEATURE FLAG: platform_editor_block_menu_v2_patch_3]
85
85
  // Conditionally display message based on feature flag
86
- // To clean up: remove the conditional and use only copyLinkToBlock message
87
- var message = fg('platform_editor_block_menu_v2_patch_3') ? messages.copyLinkToBlock : messages.copyLinkToBlockOld;
86
+ // To clean up: remove the conditional and use only copyLinkToSelection message
87
+ var message = fg('platform_editor_block_menu_v2_patch_3') ? messages.copyLinkToSelection : messages.copyLinkToBlock;
88
88
 
89
89
  // [FEATURE FLAG: platform_editor_block_menu_v2_patch_3]
90
90
  // Adds size="small" to icons for better visual consistency in block menu.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-block-menu",
3
- "version": "6.1.7",
3
+ "version": "6.1.9",
4
4
  "description": "BlockMenu plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -32,7 +32,7 @@
32
32
  "@atlaskit/css": "^0.19.0",
33
33
  "@atlaskit/dropdown-menu": "^16.5.0",
34
34
  "@atlaskit/editor-plugin-analytics": "^7.0.0",
35
- "@atlaskit/editor-plugin-block-controls": "^8.7.0",
35
+ "@atlaskit/editor-plugin-block-controls": "^8.8.0",
36
36
  "@atlaskit/editor-plugin-decorations": "^7.0.0",
37
37
  "@atlaskit/editor-plugin-selection": "^7.0.0",
38
38
  "@atlaskit/editor-plugin-user-intent": "^5.0.0",
@@ -46,13 +46,13 @@
46
46
  "@atlaskit/platform-feature-flags-react": "^0.4.0",
47
47
  "@atlaskit/primitives": "^18.0.0",
48
48
  "@atlaskit/prosemirror-history": "^0.2.0",
49
- "@atlaskit/tmp-editor-statsig": "^32.4.0",
49
+ "@atlaskit/tmp-editor-statsig": "^32.11.0",
50
50
  "@atlaskit/tokens": "^11.0.0",
51
51
  "@babel/runtime": "^7.0.0",
52
52
  "bind-event-listener": "^3.0.0"
53
53
  },
54
54
  "peerDependencies": {
55
- "@atlaskit/editor-common": "^111.21.0",
55
+ "@atlaskit/editor-common": "^111.24.0",
56
56
  "react": "^18.2.0",
57
57
  "react-intl-next": "npm:react-intl@^5.18.1"
58
58
  },