@atlaskit/editor-plugin-card 25.0.0 → 25.0.2

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-plugin-card
2
2
 
3
+ ## 25.0.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`38952a4383a53`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/38952a4383a53) -
8
+ Add Data and charts slash-command hover previews behind platform_editor_slash_command.
9
+ - Updated dependencies
10
+
11
+ ## 25.0.1
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies
16
+
3
17
  ## 25.0.0
4
18
 
5
19
  ### Patch Changes
@@ -18,7 +18,8 @@ var _fg = require("@atlaskit/platform-feature-flags/fg");
18
18
  var _actions = require("../../pm-plugins/actions");
19
19
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
20
20
  var DatasourceQuickInsertMenuItem = exports.DatasourceQuickInsertMenuItem = function DatasourceQuickInsertMenuItem(_ref) {
21
- var type = _ref.type;
21
+ var previewImageUrls = _ref.previewImageUrls,
22
+ type = _ref.type;
22
23
  var _useIntl = (0, _reactIntl.useIntl)(),
23
24
  formatMessage = _useIntl.formatMessage;
24
25
  var _useQuickInsertContex = (0, _useQuickInsertContext.useQuickInsertContext)(),
@@ -41,6 +42,7 @@ var DatasourceQuickInsertMenuItem = exports.DatasourceQuickInsertMenuItem = func
41
42
  }),
42
43
  isDisabled: isOffline,
43
44
  onSelect: onSelect,
45
+ previewImageUrls: previewImageUrls,
44
46
  title: formatMessage(isJira ? (0, _fg.fg)('confluence-issue-terminology-refresh') ? _messages.cardMessages.datasourceJiraIssueIssueTermRefresh : _messages.cardMessages.datasourceJiraIssue : isConfluenceSearch ? _messages.cardMessages.datasourceConfluenceSearch : _messages.cardMessages.datasourceAssetsObjectsGeneralAvailability)
45
47
  });
46
48
  };
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.getCardQuickInsertComponents = void 0;
8
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
8
9
  var _react = _interopRequireDefault(require("react"));
9
10
  var _messages = require("@atlaskit/editor-common/messages");
10
11
  var _createQuickInsertMatcher = require("@atlaskit/editor-common/quick-insert/create-quick-insert-matcher");
@@ -16,6 +17,16 @@ var _confluenceSearchModal = require("@atlaskit/link-datasource/confluence-searc
16
17
  var _fg = require("@atlaskit/platform-feature-flags/fg");
17
18
  var _utils2 = require("../../pm-plugins/utils");
18
19
  var _DatasourceQuickInsertMenuItem = require("./DatasourceQuickInsertMenuItem");
20
+ var datasourcePreviewImageUrlsByKey = (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, _keys.JIRA_WORK_ITEMS_MENU_ITEM.key, {
21
+ dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/m284qw5066530tr5yd11473uq1l8t86t.png',
22
+ light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/4b1455q46emetd0jxv70xuo7i7lwo574.png'
23
+ }), _keys.CONFLUENCE_LIST_MENU_ITEM.key, {
24
+ dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/8jh31f0k143b475y5tun230v166c7087.png',
25
+ light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/6co68akkw56t83fql3m823qi21k8776u.png'
26
+ }), _keys.ASSETS_MENU_ITEM.key, {
27
+ dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/64d41r462m2343iomn821ver0g4ohh37.png',
28
+ light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/0w58rc60jh54m68224qqinuk52d6lldt.png'
29
+ });
19
30
  var getCardQuickInsertComponents = exports.getCardQuickInsertComponents = function getCardQuickInsertComponents(_ref) {
20
31
  var api = _ref.api,
21
32
  options = _ref.options;
@@ -41,6 +52,7 @@ var getCardQuickInsertComponents = exports.getCardQuickInsertComponents = functi
41
52
  component: function component() {
42
53
  return /*#__PURE__*/_react.default.createElement(_DatasourceQuickInsertMenuItem.DatasourceQuickInsertMenuItem, {
43
54
  api: api,
55
+ previewImageUrls: datasourcePreviewImageUrlsByKey[_keys.JIRA_WORK_ITEMS_MENU_ITEM.key],
44
56
  type: "jira"
45
57
  });
46
58
  }
@@ -65,6 +77,7 @@ var getCardQuickInsertComponents = exports.getCardQuickInsertComponents = functi
65
77
  component: function component() {
66
78
  return /*#__PURE__*/_react.default.createElement(_DatasourceQuickInsertMenuItem.DatasourceQuickInsertMenuItem, {
67
79
  api: api,
80
+ previewImageUrls: datasourcePreviewImageUrlsByKey[_keys.ASSETS_MENU_ITEM.key],
68
81
  type: "assets"
69
82
  });
70
83
  }
@@ -90,6 +103,7 @@ var getCardQuickInsertComponents = exports.getCardQuickInsertComponents = functi
90
103
  component: function component() {
91
104
  return /*#__PURE__*/_react.default.createElement(_DatasourceQuickInsertMenuItem.DatasourceQuickInsertMenuItem, {
92
105
  api: api,
106
+ previewImageUrls: datasourcePreviewImageUrlsByKey[_keys.CONFLUENCE_LIST_MENU_ITEM.key],
93
107
  type: "confluence-search"
94
108
  });
95
109
  }
@@ -9,6 +9,7 @@ import WorkItemsIcon from '@atlaskit/icon/core/work-items';
9
9
  import { fg } from '@atlaskit/platform-feature-flags/fg';
10
10
  import { showDatasourceModal } from '../../pm-plugins/actions';
11
11
  export const DatasourceQuickInsertMenuItem = ({
12
+ previewImageUrls,
12
13
  type
13
14
  }) => {
14
15
  const {
@@ -36,6 +37,7 @@ export const DatasourceQuickInsertMenuItem = ({
36
37
  }),
37
38
  isDisabled: isOffline,
38
39
  onSelect: onSelect,
40
+ previewImageUrls: previewImageUrls,
39
41
  title: formatMessage(isJira ? fg('confluence-issue-terminology-refresh') ? messages.datasourceJiraIssueIssueTermRefresh : messages.datasourceJiraIssue : isConfluenceSearch ? messages.datasourceConfluenceSearch : messages.datasourceAssetsObjectsGeneralAvailability)
40
42
  });
41
43
  };
@@ -9,6 +9,20 @@ import { CONFLUENCE_SEARCH_DATASOURCE_ID } from '@atlaskit/link-datasource/confl
9
9
  import { fg } from '@atlaskit/platform-feature-flags/fg';
10
10
  import { isDatasourceConfigEditable } from '../../pm-plugins/utils';
11
11
  import { DatasourceQuickInsertMenuItem } from './DatasourceQuickInsertMenuItem';
12
+ const datasourcePreviewImageUrlsByKey = {
13
+ [JIRA_WORK_ITEMS_MENU_ITEM.key]: {
14
+ dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/m284qw5066530tr5yd11473uq1l8t86t.png',
15
+ light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/4b1455q46emetd0jxv70xuo7i7lwo574.png'
16
+ },
17
+ [CONFLUENCE_LIST_MENU_ITEM.key]: {
18
+ dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/8jh31f0k143b475y5tun230v166c7087.png',
19
+ light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/6co68akkw56t83fql3m823qi21k8776u.png'
20
+ },
21
+ [ASSETS_MENU_ITEM.key]: {
22
+ dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/64d41r462m2343iomn821ver0g4ohh37.png',
23
+ light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/0w58rc60jh54m68224qqinuk52d6lldt.png'
24
+ }
25
+ };
12
26
  export const getCardQuickInsertComponents = ({
13
27
  api,
14
28
  options
@@ -33,6 +47,7 @@ export const getCardQuickInsertComponents = ({
33
47
  })),
34
48
  component: () => /*#__PURE__*/React.createElement(DatasourceQuickInsertMenuItem, {
35
49
  api: api,
50
+ previewImageUrls: datasourcePreviewImageUrlsByKey[JIRA_WORK_ITEMS_MENU_ITEM.key],
36
51
  type: "jira"
37
52
  })
38
53
  }];
@@ -54,6 +69,7 @@ export const getCardQuickInsertComponents = ({
54
69
  })),
55
70
  component: () => /*#__PURE__*/React.createElement(DatasourceQuickInsertMenuItem, {
56
71
  api: api,
72
+ previewImageUrls: datasourcePreviewImageUrlsByKey[ASSETS_MENU_ITEM.key],
57
73
  type: "assets"
58
74
  })
59
75
  });
@@ -76,6 +92,7 @@ export const getCardQuickInsertComponents = ({
76
92
  })),
77
93
  component: () => /*#__PURE__*/React.createElement(DatasourceQuickInsertMenuItem, {
78
94
  api: api,
95
+ previewImageUrls: datasourcePreviewImageUrlsByKey[CONFLUENCE_LIST_MENU_ITEM.key],
79
96
  type: "confluence-search"
80
97
  })
81
98
  });
@@ -9,7 +9,8 @@ import WorkItemsIcon from '@atlaskit/icon/core/work-items';
9
9
  import { fg } from '@atlaskit/platform-feature-flags/fg';
10
10
  import { showDatasourceModal } from '../../pm-plugins/actions';
11
11
  export var DatasourceQuickInsertMenuItem = function DatasourceQuickInsertMenuItem(_ref) {
12
- var type = _ref.type;
12
+ var previewImageUrls = _ref.previewImageUrls,
13
+ type = _ref.type;
13
14
  var _useIntl = useIntl(),
14
15
  formatMessage = _useIntl.formatMessage;
15
16
  var _useQuickInsertContex = useQuickInsertContext(),
@@ -32,6 +33,7 @@ export var DatasourceQuickInsertMenuItem = function DatasourceQuickInsertMenuIte
32
33
  }),
33
34
  isDisabled: isOffline,
34
35
  onSelect: onSelect,
36
+ previewImageUrls: previewImageUrls,
35
37
  title: formatMessage(isJira ? fg('confluence-issue-terminology-refresh') ? messages.datasourceJiraIssueIssueTermRefresh : messages.datasourceJiraIssue : isConfluenceSearch ? messages.datasourceConfluenceSearch : messages.datasourceAssetsObjectsGeneralAvailability)
36
38
  });
37
39
  };
@@ -1,3 +1,4 @@
1
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
1
2
  import React from 'react';
2
3
  import { cardMessages as messages } from '@atlaskit/editor-common/messages';
3
4
  import { createQuickInsertMatcher } from '@atlaskit/editor-common/quick-insert/create-quick-insert-matcher';
@@ -9,6 +10,16 @@ import { CONFLUENCE_SEARCH_DATASOURCE_ID } from '@atlaskit/link-datasource/confl
9
10
  import { fg } from '@atlaskit/platform-feature-flags/fg';
10
11
  import { isDatasourceConfigEditable } from '../../pm-plugins/utils';
11
12
  import { DatasourceQuickInsertMenuItem } from './DatasourceQuickInsertMenuItem';
13
+ var datasourcePreviewImageUrlsByKey = _defineProperty(_defineProperty(_defineProperty({}, JIRA_WORK_ITEMS_MENU_ITEM.key, {
14
+ dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/m284qw5066530tr5yd11473uq1l8t86t.png',
15
+ light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/4b1455q46emetd0jxv70xuo7i7lwo574.png'
16
+ }), CONFLUENCE_LIST_MENU_ITEM.key, {
17
+ dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/8jh31f0k143b475y5tun230v166c7087.png',
18
+ light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/6co68akkw56t83fql3m823qi21k8776u.png'
19
+ }), ASSETS_MENU_ITEM.key, {
20
+ dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/64d41r462m2343iomn821ver0g4ohh37.png',
21
+ light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/0w58rc60jh54m68224qqinuk52d6lldt.png'
22
+ });
12
23
  export var getCardQuickInsertComponents = function getCardQuickInsertComponents(_ref) {
13
24
  var api = _ref.api,
14
25
  options = _ref.options;
@@ -34,6 +45,7 @@ export var getCardQuickInsertComponents = function getCardQuickInsertComponents(
34
45
  component: function component() {
35
46
  return /*#__PURE__*/React.createElement(DatasourceQuickInsertMenuItem, {
36
47
  api: api,
48
+ previewImageUrls: datasourcePreviewImageUrlsByKey[JIRA_WORK_ITEMS_MENU_ITEM.key],
37
49
  type: "jira"
38
50
  });
39
51
  }
@@ -58,6 +70,7 @@ export var getCardQuickInsertComponents = function getCardQuickInsertComponents(
58
70
  component: function component() {
59
71
  return /*#__PURE__*/React.createElement(DatasourceQuickInsertMenuItem, {
60
72
  api: api,
73
+ previewImageUrls: datasourcePreviewImageUrlsByKey[ASSETS_MENU_ITEM.key],
61
74
  type: "assets"
62
75
  });
63
76
  }
@@ -83,6 +96,7 @@ export var getCardQuickInsertComponents = function getCardQuickInsertComponents(
83
96
  component: function component() {
84
97
  return /*#__PURE__*/React.createElement(DatasourceQuickInsertMenuItem, {
85
98
  api: api,
99
+ previewImageUrls: datasourcePreviewImageUrlsByKey[CONFLUENCE_LIST_MENU_ITEM.key],
86
100
  type: "confluence-search"
87
101
  });
88
102
  }
@@ -1,9 +1,11 @@
1
1
  import React from 'react';
2
+ import { type QuickInsertMenuItemProps } from '@atlaskit/editor-common/quick-insert/menu-item';
2
3
  import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
4
  import type { CardPlugin } from '../../cardPluginType';
4
5
  type Props = {
5
6
  api: ExtractInjectionAPI<CardPlugin> | undefined;
7
+ previewImageUrls: QuickInsertMenuItemProps['previewImageUrls'];
6
8
  type: 'assets' | 'confluence-search' | 'jira';
7
9
  };
8
- export declare const DatasourceQuickInsertMenuItem: ({ type }: Props) => React.JSX.Element;
10
+ export declare const DatasourceQuickInsertMenuItem: ({ previewImageUrls, type, }: Props) => React.JSX.Element;
9
11
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-card",
3
- "version": "25.0.0",
3
+ "version": "25.0.2",
4
4
  "description": "Card plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -35,7 +35,7 @@
35
35
  "@atlaskit/editor-plugin-editor-disabled": "^19.0.0",
36
36
  "@atlaskit/editor-plugin-editor-viewmode": "^21.0.0",
37
37
  "@atlaskit/editor-plugin-feature-flags": "^18.0.0",
38
- "@atlaskit/editor-plugin-floating-toolbar": "^21.0.0",
38
+ "@atlaskit/editor-plugin-floating-toolbar": "^21.1.0",
39
39
  "@atlaskit/editor-plugin-grid": "^19.0.0",
40
40
  "@atlaskit/editor-plugin-selection": "^19.0.0",
41
41
  "@atlaskit/editor-plugin-toolbar": "^16.0.0",
@@ -44,7 +44,7 @@
44
44
  "@atlaskit/editor-prosemirror": "^9.0.0",
45
45
  "@atlaskit/editor-shared-styles": "^4.3.0",
46
46
  "@atlaskit/editor-smart-link-draggable": "^1.2.0",
47
- "@atlaskit/editor-toolbar": "^2.6.0",
47
+ "@atlaskit/editor-toolbar": "^2.7.0",
48
48
  "@atlaskit/editor-ui-control-model": "^2.9.0",
49
49
  "@atlaskit/frontend-utilities": "^4.5.0",
50
50
  "@atlaskit/icon": "^37.7.0",
@@ -63,7 +63,7 @@
63
63
  "@atlaskit/primitives": "^22.5.0",
64
64
  "@atlaskit/prosemirror-history": "^1.2.0",
65
65
  "@atlaskit/smart-card": "^45.24.0",
66
- "@atlaskit/tmp-editor-statsig": "^199.0.0",
66
+ "@atlaskit/tmp-editor-statsig": "^200.0.0",
67
67
  "@atlaskit/tokens": "^18.2.0",
68
68
  "@babel/runtime": "^7.0.0",
69
69
  "@emotion/react": "^11.7.1",
@@ -73,7 +73,7 @@
73
73
  "uuid": "^11.1.1"
74
74
  },
75
75
  "peerDependencies": {
76
- "@atlaskit/editor-common": "^123.0.0",
76
+ "@atlaskit/editor-common": "^123.1.0",
77
77
  "@atlaskit/link-provider": "^5.7.0",
78
78
  "react": "^18.2.0 || ^19.2.0",
79
79
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"