@atlaskit/editor-plugin-panel 16.0.4 → 16.0.6
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-panel
|
|
2
2
|
|
|
3
|
+
## 16.0.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 16.0.5
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`3a4c286fdb8c1`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3a4c286fdb8c1) -
|
|
14
|
+
Add registry-backed Quick Insert search matching under the existing
|
|
15
|
+
`platform_editor_slash_command` experiment. Make native, provider, and extension registered Quick
|
|
16
|
+
Insert items searchable.
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 16.0.4
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -10,36 +10,45 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
10
10
|
var _panel = require("@atlaskit/adf-schema/panel");
|
|
11
11
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
12
12
|
var _quickInsert = require("@atlaskit/editor-common/quick-insert");
|
|
13
|
+
var _createQuickInsertMatcher = require("@atlaskit/editor-common/quick-insert/create-quick-insert-matcher");
|
|
13
14
|
var _keys = require("@atlaskit/editor-common/quick-insert/keys");
|
|
14
15
|
var _rank = require("@atlaskit/editor-common/quick-insert/rank");
|
|
15
16
|
var _PanelQuickInsertMenuItem = require("./PanelQuickInsertMenuItem");
|
|
16
17
|
var standardPanelItems = [{
|
|
18
|
+
description: _messages.blockTypeMessages.infoPanelDescription,
|
|
17
19
|
icon: _quickInsert.IconPanel,
|
|
20
|
+
keywords: ['panel'],
|
|
18
21
|
menuItem: _keys.INFO_PANEL_MENU_ITEM,
|
|
19
22
|
panelType: _panel.PanelType.INFO,
|
|
20
23
|
title: _messages.blockTypeMessages.infoPanel
|
|
21
24
|
}, {
|
|
25
|
+
description: _messages.blockTypeMessages.notePanelDescription,
|
|
22
26
|
icon: _quickInsert.IconPanelNote,
|
|
23
27
|
menuItem: _keys.NOTE_PANEL_MENU_ITEM,
|
|
24
28
|
panelType: _panel.PanelType.NOTE,
|
|
25
29
|
title: _messages.blockTypeMessages.notePanel
|
|
26
30
|
}, {
|
|
31
|
+
description: _messages.blockTypeMessages.successPanelDescription,
|
|
27
32
|
icon: _quickInsert.IconPanelSuccess,
|
|
33
|
+
keywords: ['tip'],
|
|
28
34
|
menuItem: _keys.SUCCESS_PANEL_MENU_ITEM,
|
|
29
35
|
panelType: _panel.PanelType.SUCCESS,
|
|
30
36
|
title: _messages.blockTypeMessages.successPanel
|
|
31
37
|
}, {
|
|
38
|
+
description: _messages.blockTypeMessages.warningPanelDescription,
|
|
32
39
|
icon: _quickInsert.IconPanelWarning,
|
|
33
40
|
menuItem: _keys.WARNING_PANEL_MENU_ITEM,
|
|
34
41
|
panelType: _panel.PanelType.WARNING,
|
|
35
42
|
title: _messages.blockTypeMessages.warningPanel
|
|
36
43
|
}, {
|
|
44
|
+
description: _messages.blockTypeMessages.errorPanelDescription,
|
|
37
45
|
icon: _quickInsert.IconPanelError,
|
|
38
46
|
menuItem: _keys.ERROR_PANEL_MENU_ITEM,
|
|
39
47
|
panelType: _panel.PanelType.ERROR,
|
|
40
48
|
title: _messages.blockTypeMessages.errorPanel
|
|
41
49
|
}];
|
|
42
50
|
var customPanelItem = {
|
|
51
|
+
description: _messages.blockTypeMessages.customPanelDescription,
|
|
43
52
|
icon: _quickInsert.IconCustomPanel,
|
|
44
53
|
menuItem: _keys.CUSTOM_PANEL_MENU_ITEM,
|
|
45
54
|
panelType: _panel.PanelType.CUSTOM,
|
|
@@ -51,7 +60,9 @@ var getPanelQuickInsertComponents = exports.getPanelQuickInsertComponents = func
|
|
|
51
60
|
allowCustomPanelEdit = _ref.allowCustomPanelEdit;
|
|
52
61
|
var allPanelItems = [].concat(standardPanelItems, (0, _toConsumableArray2.default)(allowCustomPanel && allowCustomPanelEdit ? [customPanelItem] : []));
|
|
53
62
|
return allPanelItems.map(function (_ref2) {
|
|
54
|
-
var
|
|
63
|
+
var description = _ref2.description,
|
|
64
|
+
icon = _ref2.icon,
|
|
65
|
+
keywords = _ref2.keywords,
|
|
55
66
|
menuItem = _ref2.menuItem,
|
|
56
67
|
panelType = _ref2.panelType,
|
|
57
68
|
title = _ref2.title;
|
|
@@ -63,6 +74,14 @@ var getPanelQuickInsertComponents = exports.getPanelQuickInsertComponents = func
|
|
|
63
74
|
type: _keys.STRUCTURE_SECTION.type,
|
|
64
75
|
rank: _rank.STRUCTURE_SECTION_RANK[menuItem.key]
|
|
65
76
|
}],
|
|
77
|
+
match: (0, _createQuickInsertMatcher.createQuickInsertMatcher)(function (_ref3) {
|
|
78
|
+
var formatMessage = _ref3.formatMessage;
|
|
79
|
+
return {
|
|
80
|
+
description: formatMessage(description),
|
|
81
|
+
keywords: keywords,
|
|
82
|
+
title: formatMessage(title)
|
|
83
|
+
};
|
|
84
|
+
}),
|
|
66
85
|
component: function component() {
|
|
67
86
|
return /*#__PURE__*/_react.default.createElement(_PanelQuickInsertMenuItem.PanelQuickInsertMenuItem, {
|
|
68
87
|
api: api,
|
|
@@ -2,36 +2,45 @@ import React from 'react';
|
|
|
2
2
|
import { PanelType } from '@atlaskit/adf-schema/panel';
|
|
3
3
|
import { blockTypeMessages } from '@atlaskit/editor-common/messages';
|
|
4
4
|
import { IconCustomPanel, IconPanel, IconPanelError, IconPanelNote, IconPanelSuccess, IconPanelWarning } from '@atlaskit/editor-common/quick-insert';
|
|
5
|
+
import { createQuickInsertMatcher } from '@atlaskit/editor-common/quick-insert/create-quick-insert-matcher';
|
|
5
6
|
import { CUSTOM_PANEL_MENU_ITEM, ERROR_PANEL_MENU_ITEM, INFO_PANEL_MENU_ITEM, NOTE_PANEL_MENU_ITEM, STRUCTURE_SECTION, SUCCESS_PANEL_MENU_ITEM, WARNING_PANEL_MENU_ITEM } from '@atlaskit/editor-common/quick-insert/keys';
|
|
6
7
|
import { STRUCTURE_SECTION_RANK } from '@atlaskit/editor-common/quick-insert/rank';
|
|
7
8
|
import { PanelQuickInsertMenuItem } from './PanelQuickInsertMenuItem';
|
|
8
9
|
const standardPanelItems = [{
|
|
10
|
+
description: blockTypeMessages.infoPanelDescription,
|
|
9
11
|
icon: IconPanel,
|
|
12
|
+
keywords: ['panel'],
|
|
10
13
|
menuItem: INFO_PANEL_MENU_ITEM,
|
|
11
14
|
panelType: PanelType.INFO,
|
|
12
15
|
title: blockTypeMessages.infoPanel
|
|
13
16
|
}, {
|
|
17
|
+
description: blockTypeMessages.notePanelDescription,
|
|
14
18
|
icon: IconPanelNote,
|
|
15
19
|
menuItem: NOTE_PANEL_MENU_ITEM,
|
|
16
20
|
panelType: PanelType.NOTE,
|
|
17
21
|
title: blockTypeMessages.notePanel
|
|
18
22
|
}, {
|
|
23
|
+
description: blockTypeMessages.successPanelDescription,
|
|
19
24
|
icon: IconPanelSuccess,
|
|
25
|
+
keywords: ['tip'],
|
|
20
26
|
menuItem: SUCCESS_PANEL_MENU_ITEM,
|
|
21
27
|
panelType: PanelType.SUCCESS,
|
|
22
28
|
title: blockTypeMessages.successPanel
|
|
23
29
|
}, {
|
|
30
|
+
description: blockTypeMessages.warningPanelDescription,
|
|
24
31
|
icon: IconPanelWarning,
|
|
25
32
|
menuItem: WARNING_PANEL_MENU_ITEM,
|
|
26
33
|
panelType: PanelType.WARNING,
|
|
27
34
|
title: blockTypeMessages.warningPanel
|
|
28
35
|
}, {
|
|
36
|
+
description: blockTypeMessages.errorPanelDescription,
|
|
29
37
|
icon: IconPanelError,
|
|
30
38
|
menuItem: ERROR_PANEL_MENU_ITEM,
|
|
31
39
|
panelType: PanelType.ERROR,
|
|
32
40
|
title: blockTypeMessages.errorPanel
|
|
33
41
|
}];
|
|
34
42
|
const customPanelItem = {
|
|
43
|
+
description: blockTypeMessages.customPanelDescription,
|
|
35
44
|
icon: IconCustomPanel,
|
|
36
45
|
menuItem: CUSTOM_PANEL_MENU_ITEM,
|
|
37
46
|
panelType: PanelType.CUSTOM,
|
|
@@ -44,7 +53,9 @@ export const getPanelQuickInsertComponents = ({
|
|
|
44
53
|
}) => {
|
|
45
54
|
const allPanelItems = [...standardPanelItems, ...(allowCustomPanel && allowCustomPanelEdit ? [customPanelItem] : [])];
|
|
46
55
|
return allPanelItems.map(({
|
|
56
|
+
description,
|
|
47
57
|
icon,
|
|
58
|
+
keywords,
|
|
48
59
|
menuItem,
|
|
49
60
|
panelType,
|
|
50
61
|
title
|
|
@@ -56,6 +67,13 @@ export const getPanelQuickInsertComponents = ({
|
|
|
56
67
|
type: STRUCTURE_SECTION.type,
|
|
57
68
|
rank: STRUCTURE_SECTION_RANK[menuItem.key]
|
|
58
69
|
}],
|
|
70
|
+
match: createQuickInsertMatcher(({
|
|
71
|
+
formatMessage
|
|
72
|
+
}) => ({
|
|
73
|
+
description: formatMessage(description),
|
|
74
|
+
keywords,
|
|
75
|
+
title: formatMessage(title)
|
|
76
|
+
})),
|
|
59
77
|
component: () => /*#__PURE__*/React.createElement(PanelQuickInsertMenuItem, {
|
|
60
78
|
api: api,
|
|
61
79
|
icon: icon,
|
|
@@ -3,36 +3,45 @@ import React from 'react';
|
|
|
3
3
|
import { PanelType } from '@atlaskit/adf-schema/panel';
|
|
4
4
|
import { blockTypeMessages } from '@atlaskit/editor-common/messages';
|
|
5
5
|
import { IconCustomPanel, IconPanel, IconPanelError, IconPanelNote, IconPanelSuccess, IconPanelWarning } from '@atlaskit/editor-common/quick-insert';
|
|
6
|
+
import { createQuickInsertMatcher } from '@atlaskit/editor-common/quick-insert/create-quick-insert-matcher';
|
|
6
7
|
import { CUSTOM_PANEL_MENU_ITEM, ERROR_PANEL_MENU_ITEM, INFO_PANEL_MENU_ITEM, NOTE_PANEL_MENU_ITEM, STRUCTURE_SECTION, SUCCESS_PANEL_MENU_ITEM, WARNING_PANEL_MENU_ITEM } from '@atlaskit/editor-common/quick-insert/keys';
|
|
7
8
|
import { STRUCTURE_SECTION_RANK } from '@atlaskit/editor-common/quick-insert/rank';
|
|
8
9
|
import { PanelQuickInsertMenuItem } from './PanelQuickInsertMenuItem';
|
|
9
10
|
var standardPanelItems = [{
|
|
11
|
+
description: blockTypeMessages.infoPanelDescription,
|
|
10
12
|
icon: IconPanel,
|
|
13
|
+
keywords: ['panel'],
|
|
11
14
|
menuItem: INFO_PANEL_MENU_ITEM,
|
|
12
15
|
panelType: PanelType.INFO,
|
|
13
16
|
title: blockTypeMessages.infoPanel
|
|
14
17
|
}, {
|
|
18
|
+
description: blockTypeMessages.notePanelDescription,
|
|
15
19
|
icon: IconPanelNote,
|
|
16
20
|
menuItem: NOTE_PANEL_MENU_ITEM,
|
|
17
21
|
panelType: PanelType.NOTE,
|
|
18
22
|
title: blockTypeMessages.notePanel
|
|
19
23
|
}, {
|
|
24
|
+
description: blockTypeMessages.successPanelDescription,
|
|
20
25
|
icon: IconPanelSuccess,
|
|
26
|
+
keywords: ['tip'],
|
|
21
27
|
menuItem: SUCCESS_PANEL_MENU_ITEM,
|
|
22
28
|
panelType: PanelType.SUCCESS,
|
|
23
29
|
title: blockTypeMessages.successPanel
|
|
24
30
|
}, {
|
|
31
|
+
description: blockTypeMessages.warningPanelDescription,
|
|
25
32
|
icon: IconPanelWarning,
|
|
26
33
|
menuItem: WARNING_PANEL_MENU_ITEM,
|
|
27
34
|
panelType: PanelType.WARNING,
|
|
28
35
|
title: blockTypeMessages.warningPanel
|
|
29
36
|
}, {
|
|
37
|
+
description: blockTypeMessages.errorPanelDescription,
|
|
30
38
|
icon: IconPanelError,
|
|
31
39
|
menuItem: ERROR_PANEL_MENU_ITEM,
|
|
32
40
|
panelType: PanelType.ERROR,
|
|
33
41
|
title: blockTypeMessages.errorPanel
|
|
34
42
|
}];
|
|
35
43
|
var customPanelItem = {
|
|
44
|
+
description: blockTypeMessages.customPanelDescription,
|
|
36
45
|
icon: IconCustomPanel,
|
|
37
46
|
menuItem: CUSTOM_PANEL_MENU_ITEM,
|
|
38
47
|
panelType: PanelType.CUSTOM,
|
|
@@ -44,7 +53,9 @@ export var getPanelQuickInsertComponents = function getPanelQuickInsertComponent
|
|
|
44
53
|
allowCustomPanelEdit = _ref.allowCustomPanelEdit;
|
|
45
54
|
var allPanelItems = [].concat(standardPanelItems, _toConsumableArray(allowCustomPanel && allowCustomPanelEdit ? [customPanelItem] : []));
|
|
46
55
|
return allPanelItems.map(function (_ref2) {
|
|
47
|
-
var
|
|
56
|
+
var description = _ref2.description,
|
|
57
|
+
icon = _ref2.icon,
|
|
58
|
+
keywords = _ref2.keywords,
|
|
48
59
|
menuItem = _ref2.menuItem,
|
|
49
60
|
panelType = _ref2.panelType,
|
|
50
61
|
title = _ref2.title;
|
|
@@ -56,6 +67,14 @@ export var getPanelQuickInsertComponents = function getPanelQuickInsertComponent
|
|
|
56
67
|
type: STRUCTURE_SECTION.type,
|
|
57
68
|
rank: STRUCTURE_SECTION_RANK[menuItem.key]
|
|
58
69
|
}],
|
|
70
|
+
match: createQuickInsertMatcher(function (_ref3) {
|
|
71
|
+
var formatMessage = _ref3.formatMessage;
|
|
72
|
+
return {
|
|
73
|
+
description: formatMessage(description),
|
|
74
|
+
keywords: keywords,
|
|
75
|
+
title: formatMessage(title)
|
|
76
|
+
};
|
|
77
|
+
}),
|
|
59
78
|
component: function component() {
|
|
60
79
|
return /*#__PURE__*/React.createElement(PanelQuickInsertMenuItem, {
|
|
61
80
|
api: api,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-panel",
|
|
3
|
-
"version": "16.0.
|
|
3
|
+
"version": "16.0.6",
|
|
4
4
|
"description": "Panel plugin for @atlaskit/editor-core.",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -27,22 +27,22 @@
|
|
|
27
27
|
"@atlaskit/editor-plugin-emoji": "^15.0.0",
|
|
28
28
|
"@atlaskit/editor-plugin-selection": "^14.0.0",
|
|
29
29
|
"@atlaskit/editor-plugin-toolbar": "^11.0.0",
|
|
30
|
-
"@atlaskit/editor-plugin-ui-control-registry": "^8.
|
|
30
|
+
"@atlaskit/editor-plugin-ui-control-registry": "^8.1.0",
|
|
31
31
|
"@atlaskit/editor-prosemirror": "^8.0.0",
|
|
32
32
|
"@atlaskit/editor-shared-styles": "^4.0.0",
|
|
33
33
|
"@atlaskit/editor-toolbar": "^2.4.0",
|
|
34
|
-
"@atlaskit/editor-ui-control-model": "^2.
|
|
34
|
+
"@atlaskit/editor-ui-control-model": "^2.6.0",
|
|
35
35
|
"@atlaskit/emoji": "^71.16.0",
|
|
36
36
|
"@atlaskit/icon": "^37.3.0",
|
|
37
37
|
"@atlaskit/platform-feature-experiments": "^0.3.0",
|
|
38
38
|
"@atlaskit/platform-feature-flags": "^2.1.0",
|
|
39
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
40
|
-
"@atlaskit/tokens": "^16.
|
|
39
|
+
"@atlaskit/tmp-editor-statsig": "^147.0.0",
|
|
40
|
+
"@atlaskit/tokens": "^16.7.0",
|
|
41
41
|
"@babel/runtime": "^7.0.0",
|
|
42
42
|
"uuid": "^3.1.0"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
|
-
"@atlaskit/editor-common": "^118.
|
|
45
|
+
"@atlaskit/editor-common": "^118.10.0",
|
|
46
46
|
"react": "^18.2.0 || ^19.2.0",
|
|
47
47
|
"react-dom": "^18.2.0 || ^19.2.0",
|
|
48
48
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|