@atlaskit/editor-plugin-panel 2.6.1 → 2.6.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,13 @@
1
1
  # @atlaskit/editor-plugin-panel
2
2
 
3
+ ## 2.6.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#152823](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/152823)
8
+ [`0ec705650807f`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/0ec705650807f) -
9
+ [ux] ED-25090: ED-25090: Migrated link toolbar and panel toolbar to use the new icons
10
+
3
11
  ## 2.6.1
4
12
 
5
13
  ### Patch Changes
@@ -14,13 +14,20 @@ var _messages = _interopRequireWildcard(require("@atlaskit/editor-common/message
14
14
  var _panel = require("@atlaskit/editor-common/panel");
15
15
  var _uiColor = require("@atlaskit/editor-common/ui-color");
16
16
  var _utils = require("@atlaskit/editor-prosemirror/utils");
17
+ var _crossCircle = _interopRequireDefault(require("@atlaskit/icon/core/cross-circle"));
18
+ var _delete = _interopRequireDefault(require("@atlaskit/icon/core/delete"));
19
+ var _discovery = _interopRequireDefault(require("@atlaskit/icon/core/discovery"));
20
+ var _emojiRemove = _interopRequireDefault(require("@atlaskit/icon/core/emoji-remove"));
21
+ var _information = _interopRequireDefault(require("@atlaskit/icon/core/information"));
22
+ var _success = _interopRequireDefault(require("@atlaskit/icon/core/success"));
23
+ var _warning = _interopRequireDefault(require("@atlaskit/icon/core/warning"));
17
24
  var _error = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/error"));
18
25
  var _info = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/info"));
19
26
  var _note = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/note"));
20
27
  var _remove = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/remove"));
21
28
  var _removeEmoji = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/remove-emoji"));
22
- var _success = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/success"));
23
- var _warning = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/warning"));
29
+ var _success2 = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/success"));
30
+ var _warning2 = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/warning"));
24
31
  var _actions = require("./actions");
25
32
  var _utils2 = require("./utils");
26
33
  var _panelIconMap;
@@ -52,7 +59,8 @@ var getToolbarItems = exports.getToolbarItems = function getToolbarItems(formatM
52
59
  var items = [{
53
60
  id: 'editor.panel.info',
54
61
  type: 'button',
55
- icon: _info.default,
62
+ icon: _information.default,
63
+ iconFallback: _info.default,
56
64
  onClick: (0, _actions.changePanelType)(editorAnalyticsAPI)(_adfSchema.PanelType.INFO),
57
65
  selected: activePanelType === _adfSchema.PanelType.INFO,
58
66
  title: formatMessage(_messages.panelMessages.info),
@@ -60,7 +68,8 @@ var getToolbarItems = exports.getToolbarItems = function getToolbarItems(formatM
60
68
  }, {
61
69
  id: 'editor.panel.note',
62
70
  type: 'button',
63
- icon: _note.default,
71
+ icon: _discovery.default,
72
+ iconFallback: _note.default,
64
73
  onClick: (0, _actions.changePanelType)(editorAnalyticsAPI)(_adfSchema.PanelType.NOTE),
65
74
  selected: activePanelType === _adfSchema.PanelType.NOTE,
66
75
  title: formatMessage(_messages.panelMessages.note),
@@ -69,6 +78,7 @@ var getToolbarItems = exports.getToolbarItems = function getToolbarItems(formatM
69
78
  id: 'editor.panel.success',
70
79
  type: 'button',
71
80
  icon: _success.default,
81
+ iconFallback: _success2.default,
72
82
  onClick: (0, _actions.changePanelType)(editorAnalyticsAPI)(_adfSchema.PanelType.SUCCESS),
73
83
  selected: activePanelType === _adfSchema.PanelType.SUCCESS,
74
84
  title: formatMessage(_messages.panelMessages.success),
@@ -77,6 +87,7 @@ var getToolbarItems = exports.getToolbarItems = function getToolbarItems(formatM
77
87
  id: 'editor.panel.warning',
78
88
  type: 'button',
79
89
  icon: _warning.default,
90
+ iconFallback: _warning2.default,
80
91
  onClick: (0, _actions.changePanelType)(editorAnalyticsAPI)(_adfSchema.PanelType.WARNING),
81
92
  selected: activePanelType === _adfSchema.PanelType.WARNING,
82
93
  title: formatMessage(_messages.panelMessages.warning),
@@ -84,7 +95,8 @@ var getToolbarItems = exports.getToolbarItems = function getToolbarItems(formatM
84
95
  }, {
85
96
  id: 'editor.panel.error',
86
97
  type: 'button',
87
- icon: _error.default,
98
+ icon: _crossCircle.default,
99
+ iconFallback: _error.default,
88
100
  onClick: (0, _actions.changePanelType)(editorAnalyticsAPI)(_adfSchema.PanelType.ERROR),
89
101
  selected: activePanelType === _adfSchema.PanelType.ERROR,
90
102
  title: formatMessage(_messages.panelMessages.error),
@@ -220,7 +232,8 @@ var getToolbarItems = exports.getToolbarItems = function getToolbarItems(formatM
220
232
  var removeEmojiButton = {
221
233
  id: 'editor.panel.removeEmoji',
222
234
  type: 'button',
223
- icon: _removeEmoji.default,
235
+ icon: _emojiRemove.default,
236
+ iconFallback: _removeEmoji.default,
224
237
  onClick: removeEmoji(),
225
238
  title: formatMessage(_messages.default.removeEmoji),
226
239
  disabled: activePanelIcon ? false : true
@@ -251,7 +264,8 @@ var getToolbarItems = exports.getToolbarItems = function getToolbarItems(formatM
251
264
  type: 'button',
252
265
  appearance: 'danger',
253
266
  focusEditoronEnter: true,
254
- icon: _remove.default,
267
+ icon: _delete.default,
268
+ iconFallback: _remove.default,
255
269
  onClick: (0, _actions.removePanel)(editorAnalyticsAPI),
256
270
  onMouseEnter: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(panelNodeType, true),
257
271
  onMouseLeave: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(panelNodeType, false),
@@ -5,13 +5,20 @@ import commonMessages, { panelMessages as messages } from '@atlaskit/editor-comm
5
5
  import { getPanelTypeBackgroundNoTokens } from '@atlaskit/editor-common/panel';
6
6
  import { DEFAULT_BORDER_COLOR, panelBackgroundPalette } from '@atlaskit/editor-common/ui-color';
7
7
  import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
8
+ import CrossCircleIcon from '@atlaskit/icon/core/cross-circle';
9
+ import DeleteIcon from '@atlaskit/icon/core/delete';
10
+ import DiscoveryIcon from '@atlaskit/icon/core/discovery';
11
+ import EmojiRemoveIcon from '@atlaskit/icon/core/emoji-remove';
12
+ import InformationIcon from '@atlaskit/icon/core/information';
13
+ import SuccessIcon from '@atlaskit/icon/core/success';
14
+ import WarningIcon from '@atlaskit/icon/core/warning';
8
15
  import ErrorIcon from '@atlaskit/icon/glyph/editor/error';
9
16
  import InfoIcon from '@atlaskit/icon/glyph/editor/info';
10
- import NoteIcon from '@atlaskit/icon/glyph/editor/note';
17
+ import LegacyNoteIcon from '@atlaskit/icon/glyph/editor/note';
11
18
  import RemoveIcon from '@atlaskit/icon/glyph/editor/remove';
12
19
  import RemoveEmojiIcon from '@atlaskit/icon/glyph/editor/remove-emoji';
13
- import SuccessIcon from '@atlaskit/icon/glyph/editor/success';
14
- import WarningIcon from '@atlaskit/icon/glyph/editor/warning';
20
+ import LegacySuccessIcon from '@atlaskit/icon/glyph/editor/success';
21
+ import LegacyWarningIcon from '@atlaskit/icon/glyph/editor/warning';
15
22
  import { changePanelType, removePanel } from './actions';
16
23
  import { findPanel } from './utils';
17
24
  export const panelIconMap = {
@@ -45,7 +52,8 @@ export const getToolbarItems = (formatMessage, panelNodeType, isCustomPanelEnabl
45
52
  const items = [{
46
53
  id: 'editor.panel.info',
47
54
  type: 'button',
48
- icon: InfoIcon,
55
+ icon: InformationIcon,
56
+ iconFallback: InfoIcon,
49
57
  onClick: changePanelType(editorAnalyticsAPI)(PanelType.INFO),
50
58
  selected: activePanelType === PanelType.INFO,
51
59
  title: formatMessage(messages.info),
@@ -53,7 +61,8 @@ export const getToolbarItems = (formatMessage, panelNodeType, isCustomPanelEnabl
53
61
  }, {
54
62
  id: 'editor.panel.note',
55
63
  type: 'button',
56
- icon: NoteIcon,
64
+ icon: DiscoveryIcon,
65
+ iconFallback: LegacyNoteIcon,
57
66
  onClick: changePanelType(editorAnalyticsAPI)(PanelType.NOTE),
58
67
  selected: activePanelType === PanelType.NOTE,
59
68
  title: formatMessage(messages.note),
@@ -62,6 +71,7 @@ export const getToolbarItems = (formatMessage, panelNodeType, isCustomPanelEnabl
62
71
  id: 'editor.panel.success',
63
72
  type: 'button',
64
73
  icon: SuccessIcon,
74
+ iconFallback: LegacySuccessIcon,
65
75
  onClick: changePanelType(editorAnalyticsAPI)(PanelType.SUCCESS),
66
76
  selected: activePanelType === PanelType.SUCCESS,
67
77
  title: formatMessage(messages.success),
@@ -70,6 +80,7 @@ export const getToolbarItems = (formatMessage, panelNodeType, isCustomPanelEnabl
70
80
  id: 'editor.panel.warning',
71
81
  type: 'button',
72
82
  icon: WarningIcon,
83
+ iconFallback: LegacyWarningIcon,
73
84
  onClick: changePanelType(editorAnalyticsAPI)(PanelType.WARNING),
74
85
  selected: activePanelType === PanelType.WARNING,
75
86
  title: formatMessage(messages.warning),
@@ -77,7 +88,8 @@ export const getToolbarItems = (formatMessage, panelNodeType, isCustomPanelEnabl
77
88
  }, {
78
89
  id: 'editor.panel.error',
79
90
  type: 'button',
80
- icon: ErrorIcon,
91
+ icon: CrossCircleIcon,
92
+ iconFallback: ErrorIcon,
81
93
  onClick: changePanelType(editorAnalyticsAPI)(PanelType.ERROR),
82
94
  selected: activePanelType === PanelType.ERROR,
83
95
  title: formatMessage(messages.error),
@@ -203,7 +215,8 @@ export const getToolbarItems = (formatMessage, panelNodeType, isCustomPanelEnabl
203
215
  const removeEmojiButton = {
204
216
  id: 'editor.panel.removeEmoji',
205
217
  type: 'button',
206
- icon: RemoveEmojiIcon,
218
+ icon: EmojiRemoveIcon,
219
+ iconFallback: RemoveEmojiIcon,
207
220
  onClick: removeEmoji(),
208
221
  title: formatMessage(commonMessages.removeEmoji),
209
222
  disabled: activePanelIcon ? false : true
@@ -234,7 +247,8 @@ export const getToolbarItems = (formatMessage, panelNodeType, isCustomPanelEnabl
234
247
  type: 'button',
235
248
  appearance: 'danger',
236
249
  focusEditoronEnter: true,
237
- icon: RemoveIcon,
250
+ icon: DeleteIcon,
251
+ iconFallback: RemoveIcon,
238
252
  onClick: removePanel(editorAnalyticsAPI),
239
253
  onMouseEnter: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(panelNodeType, true),
240
254
  onMouseLeave: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(panelNodeType, false),
@@ -9,13 +9,20 @@ import commonMessages, { panelMessages as messages } from '@atlaskit/editor-comm
9
9
  import { getPanelTypeBackgroundNoTokens } from '@atlaskit/editor-common/panel';
10
10
  import { DEFAULT_BORDER_COLOR, panelBackgroundPalette } from '@atlaskit/editor-common/ui-color';
11
11
  import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
12
+ import CrossCircleIcon from '@atlaskit/icon/core/cross-circle';
13
+ import DeleteIcon from '@atlaskit/icon/core/delete';
14
+ import DiscoveryIcon from '@atlaskit/icon/core/discovery';
15
+ import EmojiRemoveIcon from '@atlaskit/icon/core/emoji-remove';
16
+ import InformationIcon from '@atlaskit/icon/core/information';
17
+ import SuccessIcon from '@atlaskit/icon/core/success';
18
+ import WarningIcon from '@atlaskit/icon/core/warning';
12
19
  import ErrorIcon from '@atlaskit/icon/glyph/editor/error';
13
20
  import InfoIcon from '@atlaskit/icon/glyph/editor/info';
14
- import NoteIcon from '@atlaskit/icon/glyph/editor/note';
21
+ import LegacyNoteIcon from '@atlaskit/icon/glyph/editor/note';
15
22
  import RemoveIcon from '@atlaskit/icon/glyph/editor/remove';
16
23
  import RemoveEmojiIcon from '@atlaskit/icon/glyph/editor/remove-emoji';
17
- import SuccessIcon from '@atlaskit/icon/glyph/editor/success';
18
- import WarningIcon from '@atlaskit/icon/glyph/editor/warning';
24
+ import LegacySuccessIcon from '@atlaskit/icon/glyph/editor/success';
25
+ import LegacyWarningIcon from '@atlaskit/icon/glyph/editor/warning';
19
26
  import { changePanelType, removePanel } from './actions';
20
27
  import { findPanel } from './utils';
21
28
  export var panelIconMap = (_panelIconMap = {}, _defineProperty(_panelIconMap, PanelType.INFO, {
@@ -42,7 +49,8 @@ export var getToolbarItems = function getToolbarItems(formatMessage, panelNodeTy
42
49
  var items = [{
43
50
  id: 'editor.panel.info',
44
51
  type: 'button',
45
- icon: InfoIcon,
52
+ icon: InformationIcon,
53
+ iconFallback: InfoIcon,
46
54
  onClick: changePanelType(editorAnalyticsAPI)(PanelType.INFO),
47
55
  selected: activePanelType === PanelType.INFO,
48
56
  title: formatMessage(messages.info),
@@ -50,7 +58,8 @@ export var getToolbarItems = function getToolbarItems(formatMessage, panelNodeTy
50
58
  }, {
51
59
  id: 'editor.panel.note',
52
60
  type: 'button',
53
- icon: NoteIcon,
61
+ icon: DiscoveryIcon,
62
+ iconFallback: LegacyNoteIcon,
54
63
  onClick: changePanelType(editorAnalyticsAPI)(PanelType.NOTE),
55
64
  selected: activePanelType === PanelType.NOTE,
56
65
  title: formatMessage(messages.note),
@@ -59,6 +68,7 @@ export var getToolbarItems = function getToolbarItems(formatMessage, panelNodeTy
59
68
  id: 'editor.panel.success',
60
69
  type: 'button',
61
70
  icon: SuccessIcon,
71
+ iconFallback: LegacySuccessIcon,
62
72
  onClick: changePanelType(editorAnalyticsAPI)(PanelType.SUCCESS),
63
73
  selected: activePanelType === PanelType.SUCCESS,
64
74
  title: formatMessage(messages.success),
@@ -67,6 +77,7 @@ export var getToolbarItems = function getToolbarItems(formatMessage, panelNodeTy
67
77
  id: 'editor.panel.warning',
68
78
  type: 'button',
69
79
  icon: WarningIcon,
80
+ iconFallback: LegacyWarningIcon,
70
81
  onClick: changePanelType(editorAnalyticsAPI)(PanelType.WARNING),
71
82
  selected: activePanelType === PanelType.WARNING,
72
83
  title: formatMessage(messages.warning),
@@ -74,7 +85,8 @@ export var getToolbarItems = function getToolbarItems(formatMessage, panelNodeTy
74
85
  }, {
75
86
  id: 'editor.panel.error',
76
87
  type: 'button',
77
- icon: ErrorIcon,
88
+ icon: CrossCircleIcon,
89
+ iconFallback: ErrorIcon,
78
90
  onClick: changePanelType(editorAnalyticsAPI)(PanelType.ERROR),
79
91
  selected: activePanelType === PanelType.ERROR,
80
92
  title: formatMessage(messages.error),
@@ -210,7 +222,8 @@ export var getToolbarItems = function getToolbarItems(formatMessage, panelNodeTy
210
222
  var removeEmojiButton = {
211
223
  id: 'editor.panel.removeEmoji',
212
224
  type: 'button',
213
- icon: RemoveEmojiIcon,
225
+ icon: EmojiRemoveIcon,
226
+ iconFallback: RemoveEmojiIcon,
214
227
  onClick: removeEmoji(),
215
228
  title: formatMessage(commonMessages.removeEmoji),
216
229
  disabled: activePanelIcon ? false : true
@@ -241,7 +254,8 @@ export var getToolbarItems = function getToolbarItems(formatMessage, panelNodeTy
241
254
  type: 'button',
242
255
  appearance: 'danger',
243
256
  focusEditoronEnter: true,
244
- icon: RemoveIcon,
257
+ icon: DeleteIcon,
258
+ iconFallback: RemoveIcon,
245
259
  onClick: removePanel(editorAnalyticsAPI),
246
260
  onMouseEnter: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(panelNodeType, true),
247
261
  onMouseLeave: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(panelNodeType, false),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-panel",
3
- "version": "2.6.1",
3
+ "version": "2.6.2",
4
4
  "description": "Panel plugin for @atlaskit/editor-core.",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",