@atlaskit/editor-plugin-paste-options-toolbar 13.1.3 → 13.1.5

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,22 @@
1
1
  # @atlaskit/editor-plugin-paste-options-toolbar
2
2
 
3
+ ## 13.1.5
4
+
5
+ ### Patch Changes
6
+
7
+ - [`c10f8b3827a81`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c10f8b3827a81) -
8
+ Add a `displayAsVisible` attribute to the paste actions menu `opened` analytics event, reporting
9
+ whether the Smart Link "Display as" section is shown when the menu opens. A shared
10
+ `SMART_LINK_DISPLAY_AS_PASTE_MENU_SECTION` key is exposed from `@atlaskit/editor-common/toolbar`
11
+ so the section can be identified without depending on the card plugin.
12
+ - Updated dependencies
13
+
14
+ ## 13.1.4
15
+
16
+ ### Patch Changes
17
+
18
+ - Updated dependencies
19
+
3
20
  ## 13.1.3
4
21
 
5
22
  ### Patch Changes
@@ -359,6 +359,9 @@ var PasteActionsMenu = exports.PasteActionsMenu = function PasteActionsMenu(_ref
359
359
  });
360
360
  var visibleAiActionKeys = (0, _hasVisibleButton.getVisibleKeys)(aiMenuItems, ['menu-item']);
361
361
 
362
+ // Whether the card plugin's "Display as" section is visible when the menu opens.
363
+ var displayAsVisible = (0, _hasVisibleButton.getVisibleKeys)(pasteMenuComponents, ['menu-section']).includes(_toolbar.SMART_LINK_DISPLAY_AS_PASTE_MENU_SECTION.key);
364
+
362
365
  // Two positioning modes:
363
366
  // 1. Inline: no AI actions visible — menu appears to the right of the cursor,
364
367
  // vertically centered with the text line.
@@ -372,7 +375,8 @@ var PasteActionsMenu = exports.PasteActionsMenu = function PasteActionsMenu(_ref
372
375
  actionSubject: _analytics.ACTION_SUBJECT.PASTE_ACTIONS_MENU,
373
376
  eventType: _analytics.EVENT_TYPE.UI,
374
377
  attributes: {
375
- visibleAiActions: visibleAiActionKeys
378
+ visibleAiActions: visibleAiActionKeys,
379
+ displayAsVisible: displayAsVisible
376
380
  }
377
381
  });
378
382
  }
@@ -1,7 +1,7 @@
1
1
  import React, { useCallback, useEffect, useMemo, useRef } from 'react';
2
2
  import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
3
3
  import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
4
- import { AI_PASTE_MENU_SECTION, EditorToolbarProvider, PASTE_MENU } from '@atlaskit/editor-common/toolbar';
4
+ import { AI_PASTE_MENU_SECTION, EditorToolbarProvider, PASTE_MENU, SMART_LINK_DISPLAY_AS_PASTE_MENU_SECTION } from '@atlaskit/editor-common/toolbar';
5
5
  import { findOverflowScrollParent, Popup } from '@atlaskit/editor-common/ui';
6
6
  import { withReactEditorViewOuterListeners } from '@atlaskit/editor-common/ui-react';
7
7
  import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
@@ -335,6 +335,9 @@ export const PasteActionsMenu = ({
335
335
  });
336
336
  const visibleAiActionKeys = getVisibleKeys(aiMenuItems, ['menu-item']);
337
337
 
338
+ // Whether the card plugin's "Display as" section is visible when the menu opens.
339
+ const displayAsVisible = getVisibleKeys(pasteMenuComponents, ['menu-section']).includes(SMART_LINK_DISPLAY_AS_PASTE_MENU_SECTION.key);
340
+
338
341
  // Two positioning modes:
339
342
  // 1. Inline: no AI actions visible — menu appears to the right of the cursor,
340
343
  // vertically centered with the text line.
@@ -348,7 +351,8 @@ export const PasteActionsMenu = ({
348
351
  actionSubject: ACTION_SUBJECT.PASTE_ACTIONS_MENU,
349
352
  eventType: EVENT_TYPE.UI,
350
353
  attributes: {
351
- visibleAiActions: visibleAiActionKeys
354
+ visibleAiActions: visibleAiActionKeys,
355
+ displayAsVisible
352
356
  }
353
357
  });
354
358
  }
@@ -4,7 +4,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
4
4
  import React, { useCallback, useEffect, useMemo, useRef } from 'react';
5
5
  import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
6
6
  import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
7
- import { AI_PASTE_MENU_SECTION, EditorToolbarProvider, PASTE_MENU } from '@atlaskit/editor-common/toolbar';
7
+ import { AI_PASTE_MENU_SECTION, EditorToolbarProvider, PASTE_MENU, SMART_LINK_DISPLAY_AS_PASTE_MENU_SECTION } from '@atlaskit/editor-common/toolbar';
8
8
  import { findOverflowScrollParent, Popup } from '@atlaskit/editor-common/ui';
9
9
  import { withReactEditorViewOuterListeners } from '@atlaskit/editor-common/ui-react';
10
10
  import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
@@ -343,6 +343,9 @@ export var PasteActionsMenu = function PasteActionsMenu(_ref) {
343
343
  });
344
344
  var visibleAiActionKeys = getVisibleKeys(aiMenuItems, ['menu-item']);
345
345
 
346
+ // Whether the card plugin's "Display as" section is visible when the menu opens.
347
+ var displayAsVisible = getVisibleKeys(pasteMenuComponents, ['menu-section']).includes(SMART_LINK_DISPLAY_AS_PASTE_MENU_SECTION.key);
348
+
346
349
  // Two positioning modes:
347
350
  // 1. Inline: no AI actions visible — menu appears to the right of the cursor,
348
351
  // vertically centered with the text line.
@@ -356,7 +359,8 @@ export var PasteActionsMenu = function PasteActionsMenu(_ref) {
356
359
  actionSubject: ACTION_SUBJECT.PASTE_ACTIONS_MENU,
357
360
  eventType: EVENT_TYPE.UI,
358
361
  attributes: {
359
- visibleAiActions: visibleAiActionKeys
362
+ visibleAiActions: visibleAiActionKeys,
363
+ displayAsVisible: displayAsVisible
360
364
  }
361
365
  });
362
366
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-paste-options-toolbar",
3
- "version": "13.1.3",
3
+ "version": "13.1.5",
4
4
  "description": "Paste options toolbar for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -29,19 +29,19 @@
29
29
  "@atlaskit/editor-plugin-ui-control-registry": "^6.0.0",
30
30
  "@atlaskit/editor-prosemirror": "^8.0.0",
31
31
  "@atlaskit/editor-shared-styles": "^4.0.0",
32
- "@atlaskit/editor-toolbar": "^2.1.0",
32
+ "@atlaskit/editor-toolbar": "^2.2.0",
33
33
  "@atlaskit/editor-ui-control-model": "^2.2.0",
34
- "@atlaskit/icon": "^36.2.0",
34
+ "@atlaskit/icon": "^37.0.0",
35
35
  "@atlaskit/platform-feature-flags": "^2.0.0",
36
- "@atlaskit/primitives": "^20.5.0",
36
+ "@atlaskit/primitives": "^20.6.0",
37
37
  "@atlaskit/tmp-editor-statsig": "^124.1.0",
38
- "@atlaskit/tokens": "^15.5.0",
38
+ "@atlaskit/tokens": "^15.6.0",
39
39
  "@babel/runtime": "^7.0.0",
40
40
  "@compiled/react": "^0.20.0",
41
41
  "@emotion/react": "^11.7.1"
42
42
  },
43
43
  "peerDependencies": {
44
- "@atlaskit/editor-common": "^116.25.0",
44
+ "@atlaskit/editor-common": "^116.26.0",
45
45
  "react": "^18.2.0",
46
46
  "react-dom": "^18.2.0",
47
47
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"