@atlaskit/editor-plugin-insert-block 27.0.4 → 27.0.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 +6 -0
- package/dist/cjs/insertBlockPlugin.js +15 -15
- package/dist/cjs/pm-plugins/experiences/toolbar-action-experiences.js +21 -16
- package/dist/cjs/ui/ElementBrowser/InsertMenu.js +23 -21
- package/dist/cjs/ui/ElementRail/useInsertMenuRailItems.js +2 -2
- package/dist/cjs/ui/ToolbarInsertBlock/block-insert-element-browser.js +3 -2
- package/dist/cjs/ui/ToolbarInsertBlock/create-items.js +34 -33
- package/dist/cjs/ui/ToolbarInsertBlock/dropdown-button.js +2 -2
- package/dist/cjs/ui/ToolbarInsertBlock/index.js +48 -46
- package/dist/cjs/ui/ToolbarInsertBlock/item.js +2 -2
- package/dist/cjs/ui/registered-insert-menu/RegisteredInsertButton.js +13 -12
- package/dist/cjs/ui/registered-insert-menu/RegisteredInsertMenu.js +2 -2
- package/dist/cjs/ui/registered-insert-menu/RegisteredInsertMenuContent.js +2 -1
- package/dist/cjs/ui/registered-insert-menu/RegisteredInsertMenuItem.js +2 -2
- package/dist/cjs/ui/toolbar-components/CodeBlockButton.js +13 -11
- package/dist/cjs/ui/toolbar-components/EmojiButton.js +15 -12
- package/dist/cjs/ui/toolbar-components/ImageButton.js +17 -14
- package/dist/cjs/ui/toolbar-components/InsertButton.js +26 -22
- package/dist/cjs/ui/toolbar-components/LayoutButton.js +15 -12
- package/dist/cjs/ui/toolbar-components/MediaButton.js +23 -20
- package/dist/cjs/ui/toolbar-components/MentionButton.js +15 -13
- package/dist/cjs/ui/toolbar-components/TableButton.js +19 -16
- package/dist/cjs/ui/toolbar-components/TableSizePicker.js +13 -10
- package/dist/cjs/ui/toolbar-components/TaskListButton.js +15 -12
- package/dist/cjs/ui/toolbar-components/hooks/useEmojiPickerPopup.js +7 -7
- package/dist/cjs/ui/toolbar-components/hooks/useInsertButtonState.js +3 -3
- package/dist/cjs/ui/toolbar-components/hooks/useTableSelectorPopup.js +2 -2
- package/dist/cjs/ui/toolbar-components/popups/EmojiPickerPopup.js +6 -5
- package/dist/cjs/ui/toolbar-components/popups/TableSelectorPopupWrapper.js +2 -2
- package/dist/cjs/ui/toolbar-components.js +141 -139
- package/dist/es2019/insertBlockPlugin.js +6 -6
- package/dist/es2019/pm-plugins/experiences/toolbar-action-experiences.js +7 -2
- package/dist/es2019/ui/ElementBrowser/InsertMenu.js +8 -6
- package/dist/es2019/ui/ElementRail/useInsertMenuRailItems.js +1 -1
- package/dist/es2019/ui/ToolbarInsertBlock/block-insert-element-browser.js +1 -1
- package/dist/es2019/ui/ToolbarInsertBlock/create-items.js +2 -1
- package/dist/es2019/ui/ToolbarInsertBlock/dropdown-button.js +1 -1
- package/dist/es2019/ui/ToolbarInsertBlock/index.js +9 -7
- package/dist/es2019/ui/ToolbarInsertBlock/item.js +1 -1
- package/dist/es2019/ui/registered-insert-menu/RegisteredInsertButton.js +6 -5
- package/dist/es2019/ui/registered-insert-menu/RegisteredInsertMenu.js +1 -1
- package/dist/es2019/ui/registered-insert-menu/RegisteredInsertMenuContent.js +2 -1
- package/dist/es2019/ui/registered-insert-menu/RegisteredInsertMenuItem.js +1 -1
- package/dist/es2019/ui/toolbar-components/CodeBlockButton.js +6 -4
- package/dist/es2019/ui/toolbar-components/EmojiButton.js +7 -4
- package/dist/es2019/ui/toolbar-components/ImageButton.js +8 -5
- package/dist/es2019/ui/toolbar-components/InsertButton.js +11 -7
- package/dist/es2019/ui/toolbar-components/LayoutButton.js +7 -4
- package/dist/es2019/ui/toolbar-components/MediaButton.js +9 -6
- package/dist/es2019/ui/toolbar-components/MentionButton.js +7 -5
- package/dist/es2019/ui/toolbar-components/TableButton.js +7 -4
- package/dist/es2019/ui/toolbar-components/TableSizePicker.js +6 -3
- package/dist/es2019/ui/toolbar-components/TaskListButton.js +7 -4
- package/dist/es2019/ui/toolbar-components/hooks/useEmojiPickerPopup.js +1 -1
- package/dist/es2019/ui/toolbar-components/hooks/useInsertButtonState.js +2 -2
- package/dist/es2019/ui/toolbar-components/hooks/useTableSelectorPopup.js +1 -1
- package/dist/es2019/ui/toolbar-components/popups/EmojiPickerPopup.js +4 -3
- package/dist/es2019/ui/toolbar-components/popups/TableSelectorPopupWrapper.js +1 -1
- package/dist/es2019/ui/toolbar-components.js +4 -2
- package/dist/esm/insertBlockPlugin.js +6 -6
- package/dist/esm/pm-plugins/experiences/toolbar-action-experiences.js +7 -2
- package/dist/esm/ui/ElementBrowser/InsertMenu.js +8 -6
- package/dist/esm/ui/ElementRail/useInsertMenuRailItems.js +1 -1
- package/dist/esm/ui/ToolbarInsertBlock/block-insert-element-browser.js +1 -1
- package/dist/esm/ui/ToolbarInsertBlock/create-items.js +2 -1
- package/dist/esm/ui/ToolbarInsertBlock/dropdown-button.js +1 -1
- package/dist/esm/ui/ToolbarInsertBlock/index.js +9 -7
- package/dist/esm/ui/ToolbarInsertBlock/item.js +1 -1
- package/dist/esm/ui/registered-insert-menu/RegisteredInsertButton.js +6 -5
- package/dist/esm/ui/registered-insert-menu/RegisteredInsertMenu.js +1 -1
- package/dist/esm/ui/registered-insert-menu/RegisteredInsertMenuContent.js +2 -1
- package/dist/esm/ui/registered-insert-menu/RegisteredInsertMenuItem.js +1 -1
- package/dist/esm/ui/toolbar-components/CodeBlockButton.js +6 -4
- package/dist/esm/ui/toolbar-components/EmojiButton.js +7 -4
- package/dist/esm/ui/toolbar-components/ImageButton.js +8 -5
- package/dist/esm/ui/toolbar-components/InsertButton.js +11 -7
- package/dist/esm/ui/toolbar-components/LayoutButton.js +7 -4
- package/dist/esm/ui/toolbar-components/MediaButton.js +9 -6
- package/dist/esm/ui/toolbar-components/MentionButton.js +7 -5
- package/dist/esm/ui/toolbar-components/TableButton.js +7 -4
- package/dist/esm/ui/toolbar-components/TableSizePicker.js +6 -3
- package/dist/esm/ui/toolbar-components/TaskListButton.js +7 -4
- package/dist/esm/ui/toolbar-components/hooks/useEmojiPickerPopup.js +1 -1
- package/dist/esm/ui/toolbar-components/hooks/useInsertButtonState.js +2 -2
- package/dist/esm/ui/toolbar-components/hooks/useTableSelectorPopup.js +1 -1
- package/dist/esm/ui/toolbar-components/popups/EmojiPickerPopup.js +4 -3
- package/dist/esm/ui/toolbar-components/popups/TableSelectorPopupWrapper.js +1 -1
- package/dist/esm/ui/toolbar-components.js +4 -2
- package/dist/types/insertBlockPlugin.d.ts +1 -1
- package/dist/types/insertBlockPluginType.d.ts +1 -1
- package/dist/types/pm-plugins/experiences/toolbar-action-experiences.d.ts +1 -1
- package/dist/types/pm-plugins/experiences/toolbar-experience-utils.d.ts +1 -1
- package/dist/types/types/index.d.ts +30 -29
- package/dist/types/ui/ElementBrowser/InsertMenu.d.ts +1 -1
- package/dist/types/ui/ElementBrowser/types.d.ts +2 -2
- package/dist/types/ui/ElementRail/useInsertMenuRailItems.d.ts +1 -1
- package/dist/types/ui/ToolbarInsertBlock/block-insert-element-browser.d.ts +1 -1
- package/dist/types/ui/ToolbarInsertBlock/block-insert-menu.d.ts +1 -1
- package/dist/types/ui/ToolbarInsertBlock/create-items.d.ts +2 -2
- package/dist/types/ui/ToolbarInsertBlock/dropdown-button.d.ts +1 -1
- package/dist/types/ui/ToolbarInsertBlock/item.d.ts +1 -1
- package/dist/types/ui/ToolbarInsertBlock/types.d.ts +9 -5
- package/dist/types/ui/registered-insert-menu/RegisteredInsertButton.d.ts +1 -1
- package/dist/types/ui/registered-insert-menu/RegisteredInsertMenuContent.d.ts +1 -1
- package/dist/types/ui/toolbar-components/CodeBlockButton.d.ts +1 -1
- package/dist/types/ui/toolbar-components/ImageButton.d.ts +1 -1
- package/dist/types/ui/toolbar-components/InsertButton.d.ts +4 -3
- package/dist/types/ui/toolbar-components/LayoutButton.d.ts +1 -1
- package/dist/types/ui/toolbar-components/MediaButton.d.ts +1 -1
- package/dist/types/ui/toolbar-components/MentionButton.d.ts +1 -1
- package/dist/types/ui/toolbar-components/TableButton.d.ts +1 -1
- package/dist/types/ui/toolbar-components/TaskListButton.d.ts +1 -1
- package/dist/types/ui/toolbar-components/hooks/filterDropdownItems.d.ts +1 -1
- package/dist/types/ui/toolbar-components/hooks/useEmojiPickerPopup.d.ts +3 -2
- package/dist/types/ui/toolbar-components/hooks/useInsertButtonState.d.ts +3 -3
- package/dist/types/ui/toolbar-components/hooks/usePopupManager.d.ts +2 -2
- package/dist/types/ui/toolbar-components/hooks/useTableSelectorPopup.d.ts +3 -2
- package/dist/types/ui/toolbar-components/shared/types.d.ts +1 -1
- package/dist/types/ui/toolbar-components.d.ts +3 -2
- package/package.json +2 -2
|
@@ -6,8 +6,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.getToolbarComponents = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var
|
|
10
|
-
var
|
|
9
|
+
var _keys = require("@atlaskit/editor-common/toolbar/keys");
|
|
10
|
+
var _rank = require("@atlaskit/editor-common/toolbar/rank");
|
|
11
|
+
var _show = require("@atlaskit/editor-toolbar/show");
|
|
12
|
+
var _toolbarButtonGroup = require("@atlaskit/editor-toolbar/toolbar-button-group");
|
|
11
13
|
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
12
14
|
var _RegisteredInsertButton = require("./registered-insert-menu/RegisteredInsertButton");
|
|
13
15
|
var _CodeBlockButton = require("./toolbar-components/CodeBlockButton");
|
|
@@ -37,9 +39,9 @@ var getToolbarComponents = exports.getToolbarComponents = function getToolbarCom
|
|
|
37
39
|
var createResponsiveComponent = function createResponsiveComponent(showAt) {
|
|
38
40
|
return function (_ref2) {
|
|
39
41
|
var children = _ref2.children;
|
|
40
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
42
|
+
return /*#__PURE__*/_react.default.createElement(_show.Show, {
|
|
41
43
|
above: showAt || 'lg'
|
|
42
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
44
|
+
}, /*#__PURE__*/_react.default.createElement(_toolbarButtonGroup.ToolbarButtonGroup, null, children));
|
|
43
45
|
};
|
|
44
46
|
};
|
|
45
47
|
|
|
@@ -47,22 +49,22 @@ var getToolbarComponents = exports.getToolbarComponents = function getToolbarCom
|
|
|
47
49
|
if ((_config$taskList = config.taskList) !== null && _config$taskList !== void 0 && _config$taskList.enabled) {
|
|
48
50
|
var _config$taskList2;
|
|
49
51
|
components.push({
|
|
50
|
-
type:
|
|
51
|
-
key:
|
|
52
|
+
type: _keys.TASK_LIST_GROUP.type,
|
|
53
|
+
key: _keys.TASK_LIST_GROUP.key,
|
|
52
54
|
parents: [{
|
|
53
|
-
type:
|
|
54
|
-
key:
|
|
55
|
-
rank:
|
|
55
|
+
type: _keys.INSERT_BLOCK_SECTION.type,
|
|
56
|
+
key: _keys.INSERT_BLOCK_SECTION.key,
|
|
57
|
+
rank: _rank.INSERT_BLOCK_SECTION_RANK[_keys.TASK_LIST_GROUP.key]
|
|
56
58
|
}],
|
|
57
59
|
component: createResponsiveComponent((_config$taskList2 = config.taskList) === null || _config$taskList2 === void 0 ? void 0 : _config$taskList2.showAt)
|
|
58
60
|
});
|
|
59
61
|
components.push({
|
|
60
|
-
type:
|
|
61
|
-
key:
|
|
62
|
+
type: _keys.TASK_LIST_BUTTON.type,
|
|
63
|
+
key: _keys.TASK_LIST_BUTTON.key,
|
|
62
64
|
parents: [{
|
|
63
|
-
type:
|
|
64
|
-
key:
|
|
65
|
-
rank:
|
|
65
|
+
type: _keys.TASK_LIST_GROUP.type,
|
|
66
|
+
key: _keys.TASK_LIST_GROUP.key,
|
|
67
|
+
rank: _rank.TASK_LIST_GROUP_RANK[_keys.TASK_LIST_BUTTON.key]
|
|
66
68
|
}],
|
|
67
69
|
component: function component() {
|
|
68
70
|
return /*#__PURE__*/_react.default.createElement(_TaskListButton.TaskListButton, {
|
|
@@ -76,22 +78,22 @@ var getToolbarComponents = exports.getToolbarComponents = function getToolbarCom
|
|
|
76
78
|
if ((_config$media = config.media) !== null && _config$media !== void 0 && _config$media.enabled) {
|
|
77
79
|
var _config$media2;
|
|
78
80
|
components.push({
|
|
79
|
-
type:
|
|
80
|
-
key:
|
|
81
|
+
type: _keys.MEDIA_GROUP.type,
|
|
82
|
+
key: _keys.MEDIA_GROUP.key,
|
|
81
83
|
parents: [{
|
|
82
|
-
type:
|
|
83
|
-
key:
|
|
84
|
-
rank:
|
|
84
|
+
type: _keys.INSERT_BLOCK_SECTION.type,
|
|
85
|
+
key: _keys.INSERT_BLOCK_SECTION.key,
|
|
86
|
+
rank: _rank.INSERT_BLOCK_SECTION_RANK[_keys.MEDIA_GROUP.key]
|
|
85
87
|
}],
|
|
86
88
|
component: createResponsiveComponent((_config$media2 = config.media) === null || _config$media2 === void 0 ? void 0 : _config$media2.showAt)
|
|
87
89
|
});
|
|
88
90
|
components.push({
|
|
89
|
-
type:
|
|
90
|
-
key:
|
|
91
|
+
type: _keys.MEDIA_BUTTON.type,
|
|
92
|
+
key: _keys.MEDIA_BUTTON.key,
|
|
91
93
|
parents: [{
|
|
92
|
-
type:
|
|
93
|
-
key:
|
|
94
|
-
rank:
|
|
94
|
+
type: _keys.MEDIA_GROUP.type,
|
|
95
|
+
key: _keys.MEDIA_GROUP.key,
|
|
96
|
+
rank: _rank.MEDIA_GROUP_RANK[_keys.MEDIA_BUTTON.key]
|
|
95
97
|
}],
|
|
96
98
|
component: function component() {
|
|
97
99
|
return !!(api !== null && api !== void 0 && api.imageUpload) ? /*#__PURE__*/_react.default.createElement(_ImageButton.ImageButton, {
|
|
@@ -107,22 +109,22 @@ var getToolbarComponents = exports.getToolbarComponents = function getToolbarCom
|
|
|
107
109
|
if ((_config$codeBlock = config.codeBlock) !== null && _config$codeBlock !== void 0 && _config$codeBlock.enabled) {
|
|
108
110
|
var _config$codeBlock2;
|
|
109
111
|
components.push({
|
|
110
|
-
type:
|
|
111
|
-
key:
|
|
112
|
+
type: _keys.CODE_BLOCK_GROUP.type,
|
|
113
|
+
key: _keys.CODE_BLOCK_GROUP.key,
|
|
112
114
|
parents: [{
|
|
113
|
-
type:
|
|
114
|
-
key:
|
|
115
|
-
rank:
|
|
115
|
+
type: _keys.INSERT_BLOCK_SECTION.type,
|
|
116
|
+
key: _keys.INSERT_BLOCK_SECTION.key,
|
|
117
|
+
rank: _rank.INSERT_BLOCK_SECTION_RANK[_keys.CODE_BLOCK_GROUP.key]
|
|
116
118
|
}],
|
|
117
119
|
component: createResponsiveComponent((_config$codeBlock2 = config.codeBlock) === null || _config$codeBlock2 === void 0 ? void 0 : _config$codeBlock2.showAt)
|
|
118
120
|
});
|
|
119
121
|
components.push({
|
|
120
|
-
type:
|
|
121
|
-
key:
|
|
122
|
+
type: _keys.CODE_BLOCK_BUTTON.type,
|
|
123
|
+
key: _keys.CODE_BLOCK_BUTTON.key,
|
|
122
124
|
parents: [{
|
|
123
|
-
type:
|
|
124
|
-
key:
|
|
125
|
-
rank:
|
|
125
|
+
type: _keys.CODE_BLOCK_GROUP.type,
|
|
126
|
+
key: _keys.CODE_BLOCK_GROUP.key,
|
|
127
|
+
rank: _rank.CODE_BLOCK_GROUP_RANK[_keys.CODE_BLOCK_BUTTON.key]
|
|
126
128
|
}],
|
|
127
129
|
component: function component() {
|
|
128
130
|
return /*#__PURE__*/_react.default.createElement(_CodeBlockButton.CodeBlockButton, {
|
|
@@ -135,22 +137,22 @@ var getToolbarComponents = exports.getToolbarComponents = function getToolbarCom
|
|
|
135
137
|
// Mention Group
|
|
136
138
|
if ((_config$mention = config.mention) !== null && _config$mention !== void 0 && _config$mention.enabled) {
|
|
137
139
|
components.push({
|
|
138
|
-
type:
|
|
139
|
-
key:
|
|
140
|
+
type: _keys.MENTION_GROUP.type,
|
|
141
|
+
key: _keys.MENTION_GROUP.key,
|
|
140
142
|
parents: [{
|
|
141
|
-
type:
|
|
142
|
-
key:
|
|
143
|
-
rank:
|
|
143
|
+
type: _keys.INSERT_BLOCK_SECTION.type,
|
|
144
|
+
key: _keys.INSERT_BLOCK_SECTION.key,
|
|
145
|
+
rank: _rank.INSERT_BLOCK_SECTION_RANK[_keys.MENTION_GROUP.key]
|
|
144
146
|
}],
|
|
145
147
|
component: createResponsiveComponent(config.mention.showAt)
|
|
146
148
|
});
|
|
147
149
|
components.push({
|
|
148
|
-
type:
|
|
149
|
-
key:
|
|
150
|
+
type: _keys.MENTION_BUTTON.type,
|
|
151
|
+
key: _keys.MENTION_BUTTON.key,
|
|
150
152
|
parents: [{
|
|
151
|
-
type:
|
|
152
|
-
key:
|
|
153
|
-
rank:
|
|
153
|
+
type: _keys.MENTION_GROUP.type,
|
|
154
|
+
key: _keys.MENTION_GROUP.key,
|
|
155
|
+
rank: _rank.MENTION_GROUP_RANK[_keys.MENTION_BUTTON.key]
|
|
154
156
|
}],
|
|
155
157
|
component: function component() {
|
|
156
158
|
return /*#__PURE__*/_react.default.createElement(_MentionButton.MentionButton, {
|
|
@@ -163,22 +165,22 @@ var getToolbarComponents = exports.getToolbarComponents = function getToolbarCom
|
|
|
163
165
|
// Emoji Group
|
|
164
166
|
if ((_config$emoji = config.emoji) !== null && _config$emoji !== void 0 && _config$emoji.enabled) {
|
|
165
167
|
components.push({
|
|
166
|
-
type:
|
|
167
|
-
key:
|
|
168
|
+
type: _keys.EMOJI_GROUP.type,
|
|
169
|
+
key: _keys.EMOJI_GROUP.key,
|
|
168
170
|
parents: [{
|
|
169
|
-
type:
|
|
170
|
-
key:
|
|
171
|
-
rank:
|
|
171
|
+
type: _keys.INSERT_BLOCK_SECTION.type,
|
|
172
|
+
key: _keys.INSERT_BLOCK_SECTION.key,
|
|
173
|
+
rank: _rank.INSERT_BLOCK_SECTION_RANK[_keys.EMOJI_GROUP.key]
|
|
172
174
|
}],
|
|
173
175
|
component: createResponsiveComponent(config.emoji.showAt)
|
|
174
176
|
});
|
|
175
177
|
components.push({
|
|
176
|
-
type:
|
|
177
|
-
key:
|
|
178
|
+
type: _keys.EMOJI_BUTTON.type,
|
|
179
|
+
key: _keys.EMOJI_BUTTON.key,
|
|
178
180
|
parents: [{
|
|
179
|
-
type:
|
|
180
|
-
key:
|
|
181
|
-
rank:
|
|
181
|
+
type: _keys.EMOJI_GROUP.type,
|
|
182
|
+
key: _keys.EMOJI_GROUP.key,
|
|
183
|
+
rank: _rank.EMOJI_GROUP_RANK[_keys.EMOJI_BUTTON.key]
|
|
182
184
|
}],
|
|
183
185
|
component: function component() {
|
|
184
186
|
return /*#__PURE__*/_react.default.createElement(_EmojiButton.EmojiButton, {
|
|
@@ -191,22 +193,22 @@ var getToolbarComponents = exports.getToolbarComponents = function getToolbarCom
|
|
|
191
193
|
// Layout Group
|
|
192
194
|
if ((_config$layout = config.layout) !== null && _config$layout !== void 0 && _config$layout.enabled) {
|
|
193
195
|
components.push({
|
|
194
|
-
type:
|
|
195
|
-
key:
|
|
196
|
+
type: _keys.LAYOUT_GROUP.type,
|
|
197
|
+
key: _keys.LAYOUT_GROUP.key,
|
|
196
198
|
parents: [{
|
|
197
|
-
type:
|
|
198
|
-
key:
|
|
199
|
-
rank:
|
|
199
|
+
type: _keys.INSERT_BLOCK_SECTION.type,
|
|
200
|
+
key: _keys.INSERT_BLOCK_SECTION.key,
|
|
201
|
+
rank: _rank.INSERT_BLOCK_SECTION_RANK[_keys.LAYOUT_GROUP.key]
|
|
200
202
|
}],
|
|
201
203
|
component: createResponsiveComponent(config.layout.showAt)
|
|
202
204
|
});
|
|
203
205
|
components.push({
|
|
204
|
-
type:
|
|
205
|
-
key:
|
|
206
|
+
type: _keys.LAYOUT_BUTTON.type,
|
|
207
|
+
key: _keys.LAYOUT_BUTTON.key,
|
|
206
208
|
parents: [{
|
|
207
|
-
type:
|
|
208
|
-
key:
|
|
209
|
-
rank:
|
|
209
|
+
type: _keys.LAYOUT_GROUP.type,
|
|
210
|
+
key: _keys.LAYOUT_GROUP.key,
|
|
211
|
+
rank: _rank.LAYOUT_GROUP_RANK[_keys.LAYOUT_BUTTON.key]
|
|
210
212
|
}],
|
|
211
213
|
component: function component() {
|
|
212
214
|
return /*#__PURE__*/_react.default.createElement(_LayoutButton.LayoutButton, {
|
|
@@ -219,22 +221,22 @@ var getToolbarComponents = exports.getToolbarComponents = function getToolbarCom
|
|
|
219
221
|
// Table Group
|
|
220
222
|
if ((_config$table = config.table) !== null && _config$table !== void 0 && _config$table.enabled) {
|
|
221
223
|
components.push({
|
|
222
|
-
type:
|
|
223
|
-
key:
|
|
224
|
+
type: _keys.TABLE_GROUP.type,
|
|
225
|
+
key: _keys.TABLE_GROUP.key,
|
|
224
226
|
parents: [{
|
|
225
|
-
type:
|
|
226
|
-
key:
|
|
227
|
-
rank:
|
|
227
|
+
type: _keys.INSERT_BLOCK_SECTION.type,
|
|
228
|
+
key: _keys.INSERT_BLOCK_SECTION.key,
|
|
229
|
+
rank: _rank.INSERT_BLOCK_SECTION_RANK[_keys.TABLE_GROUP.key]
|
|
228
230
|
}],
|
|
229
231
|
component: createResponsiveComponent(config.table.showAt)
|
|
230
232
|
});
|
|
231
233
|
components.push({
|
|
232
|
-
type:
|
|
233
|
-
key:
|
|
234
|
+
type: _keys.TABLE_BUTTON.type,
|
|
235
|
+
key: _keys.TABLE_BUTTON.key,
|
|
234
236
|
parents: [{
|
|
235
|
-
type:
|
|
236
|
-
key:
|
|
237
|
-
rank:
|
|
237
|
+
type: _keys.TABLE_GROUP.type,
|
|
238
|
+
key: _keys.TABLE_GROUP.key,
|
|
239
|
+
rank: _rank.TABLE_GROUP_RANK[_keys.TABLE_BUTTON.key]
|
|
238
240
|
}],
|
|
239
241
|
component: function component() {
|
|
240
242
|
return /*#__PURE__*/_react.default.createElement(_TableButton.TableButton, {
|
|
@@ -244,12 +246,12 @@ var getToolbarComponents = exports.getToolbarComponents = function getToolbarCom
|
|
|
244
246
|
});
|
|
245
247
|
if (options.tableSelectorSupported) {
|
|
246
248
|
components.push({
|
|
247
|
-
type:
|
|
248
|
-
key:
|
|
249
|
+
type: _keys.TABLE_SIZE_PICKER.type,
|
|
250
|
+
key: _keys.TABLE_SIZE_PICKER.key,
|
|
249
251
|
parents: [{
|
|
250
|
-
type:
|
|
251
|
-
key:
|
|
252
|
-
rank:
|
|
252
|
+
type: _keys.TABLE_GROUP.type,
|
|
253
|
+
key: _keys.TABLE_GROUP.key,
|
|
254
|
+
rank: _rank.TABLE_GROUP_RANK[_keys.TABLE_SIZE_PICKER.key]
|
|
253
255
|
}],
|
|
254
256
|
component: function component() {
|
|
255
257
|
return /*#__PURE__*/_react.default.createElement(_TableSizePicker.TableSizePicker, {
|
|
@@ -284,127 +286,127 @@ var getToolbarComponents = exports.getToolbarComponents = function getToolbarCom
|
|
|
284
286
|
};
|
|
285
287
|
};
|
|
286
288
|
components.push({
|
|
287
|
-
type:
|
|
288
|
-
key: "".concat(
|
|
289
|
+
type: _keys.INSERT_GROUP.type,
|
|
290
|
+
key: "".concat(_keys.INSERT_GROUP.key, "-none"),
|
|
289
291
|
parents: [{
|
|
290
|
-
type:
|
|
291
|
-
key:
|
|
292
|
-
rank:
|
|
292
|
+
type: _keys.INSERT_BLOCK_SECTION.type,
|
|
293
|
+
key: _keys.INSERT_BLOCK_SECTION.key,
|
|
294
|
+
rank: _rank.INSERT_BLOCK_SECTION_RANK[_keys.INSERT_GROUP.key]
|
|
293
295
|
}],
|
|
294
296
|
component: function component(_ref3) {
|
|
295
297
|
var children = _ref3.children;
|
|
296
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
298
|
+
return /*#__PURE__*/_react.default.createElement(_show.Show, {
|
|
297
299
|
below: "sm"
|
|
298
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
300
|
+
}, /*#__PURE__*/_react.default.createElement(_toolbarButtonGroup.ToolbarButtonGroup, null, children));
|
|
299
301
|
}
|
|
300
302
|
});
|
|
301
303
|
components.push({
|
|
302
|
-
type:
|
|
303
|
-
key:
|
|
304
|
+
type: _keys.INSERT_BUTTON.type,
|
|
305
|
+
key: _keys.INSERT_BUTTON.key,
|
|
304
306
|
parents: [{
|
|
305
|
-
type:
|
|
306
|
-
key: "".concat(
|
|
307
|
-
rank:
|
|
307
|
+
type: _keys.INSERT_GROUP.type,
|
|
308
|
+
key: "".concat(_keys.INSERT_GROUP.key, "-none"),
|
|
309
|
+
rank: _rank.INSERT_GROUP_RANK[_keys.INSERT_BUTTON.key]
|
|
308
310
|
}],
|
|
309
311
|
component: createInsertButtonComponent(null)
|
|
310
312
|
});
|
|
311
313
|
components.push({
|
|
312
|
-
type:
|
|
313
|
-
key: "".concat(
|
|
314
|
+
type: _keys.INSERT_GROUP.type,
|
|
315
|
+
key: "".concat(_keys.INSERT_GROUP.key, "-sm"),
|
|
314
316
|
parents: [{
|
|
315
|
-
type:
|
|
316
|
-
key:
|
|
317
|
-
rank:
|
|
317
|
+
type: _keys.INSERT_BLOCK_SECTION.type,
|
|
318
|
+
key: _keys.INSERT_BLOCK_SECTION.key,
|
|
319
|
+
rank: _rank.INSERT_BLOCK_SECTION_RANK[_keys.INSERT_GROUP.key]
|
|
318
320
|
}],
|
|
319
321
|
component: function component(_ref4) {
|
|
320
322
|
var children = _ref4.children;
|
|
321
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
323
|
+
return /*#__PURE__*/_react.default.createElement(_show.Show, {
|
|
322
324
|
only: "sm"
|
|
323
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
325
|
+
}, /*#__PURE__*/_react.default.createElement(_toolbarButtonGroup.ToolbarButtonGroup, null, children));
|
|
324
326
|
}
|
|
325
327
|
});
|
|
326
328
|
components.push({
|
|
327
|
-
type:
|
|
328
|
-
key:
|
|
329
|
+
type: _keys.INSERT_BUTTON.type,
|
|
330
|
+
key: _keys.INSERT_BUTTON.key,
|
|
329
331
|
parents: [{
|
|
330
|
-
type:
|
|
331
|
-
key: "".concat(
|
|
332
|
-
rank:
|
|
332
|
+
type: _keys.INSERT_GROUP.type,
|
|
333
|
+
key: "".concat(_keys.INSERT_GROUP.key, "-sm"),
|
|
334
|
+
rank: _rank.INSERT_GROUP_RANK[_keys.INSERT_BUTTON.key]
|
|
333
335
|
}],
|
|
334
336
|
component: createInsertButtonComponent('sm')
|
|
335
337
|
});
|
|
336
338
|
components.push({
|
|
337
|
-
type:
|
|
338
|
-
key: "".concat(
|
|
339
|
+
type: _keys.INSERT_GROUP.type,
|
|
340
|
+
key: "".concat(_keys.INSERT_GROUP.key, "-md"),
|
|
339
341
|
parents: [{
|
|
340
|
-
type:
|
|
341
|
-
key:
|
|
342
|
-
rank:
|
|
342
|
+
type: _keys.INSERT_BLOCK_SECTION.type,
|
|
343
|
+
key: _keys.INSERT_BLOCK_SECTION.key,
|
|
344
|
+
rank: _rank.INSERT_BLOCK_SECTION_RANK[_keys.INSERT_GROUP.key]
|
|
343
345
|
}],
|
|
344
346
|
component: function component(_ref5) {
|
|
345
347
|
var children = _ref5.children;
|
|
346
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
348
|
+
return /*#__PURE__*/_react.default.createElement(_show.Show, {
|
|
347
349
|
only: "md"
|
|
348
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
350
|
+
}, /*#__PURE__*/_react.default.createElement(_toolbarButtonGroup.ToolbarButtonGroup, null, children));
|
|
349
351
|
}
|
|
350
352
|
});
|
|
351
353
|
components.push({
|
|
352
|
-
type:
|
|
353
|
-
key:
|
|
354
|
+
type: _keys.INSERT_BUTTON.type,
|
|
355
|
+
key: _keys.INSERT_BUTTON.key,
|
|
354
356
|
parents: [{
|
|
355
|
-
type:
|
|
356
|
-
key: "".concat(
|
|
357
|
-
rank:
|
|
357
|
+
type: _keys.INSERT_GROUP.type,
|
|
358
|
+
key: "".concat(_keys.INSERT_GROUP.key, "-md"),
|
|
359
|
+
rank: _rank.INSERT_GROUP_RANK[_keys.INSERT_BUTTON.key]
|
|
358
360
|
}],
|
|
359
361
|
component: createInsertButtonComponent('md')
|
|
360
362
|
});
|
|
361
363
|
components.push({
|
|
362
|
-
type:
|
|
363
|
-
key: "".concat(
|
|
364
|
+
type: _keys.INSERT_GROUP.type,
|
|
365
|
+
key: "".concat(_keys.INSERT_GROUP.key, "-lg"),
|
|
364
366
|
parents: [{
|
|
365
|
-
type:
|
|
366
|
-
key:
|
|
367
|
-
rank:
|
|
367
|
+
type: _keys.INSERT_BLOCK_SECTION.type,
|
|
368
|
+
key: _keys.INSERT_BLOCK_SECTION.key,
|
|
369
|
+
rank: _rank.INSERT_BLOCK_SECTION_RANK[_keys.INSERT_GROUP.key]
|
|
368
370
|
}],
|
|
369
371
|
component: function component(_ref6) {
|
|
370
372
|
var children = _ref6.children;
|
|
371
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
373
|
+
return /*#__PURE__*/_react.default.createElement(_show.Show, {
|
|
372
374
|
only: "lg"
|
|
373
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
375
|
+
}, /*#__PURE__*/_react.default.createElement(_toolbarButtonGroup.ToolbarButtonGroup, null, children));
|
|
374
376
|
}
|
|
375
377
|
});
|
|
376
378
|
components.push({
|
|
377
|
-
type:
|
|
378
|
-
key:
|
|
379
|
+
type: _keys.INSERT_BUTTON.type,
|
|
380
|
+
key: _keys.INSERT_BUTTON.key,
|
|
379
381
|
parents: [{
|
|
380
|
-
type:
|
|
381
|
-
key: "".concat(
|
|
382
|
-
rank:
|
|
382
|
+
type: _keys.INSERT_GROUP.type,
|
|
383
|
+
key: "".concat(_keys.INSERT_GROUP.key, "-lg"),
|
|
384
|
+
rank: _rank.INSERT_GROUP_RANK[_keys.INSERT_BUTTON.key]
|
|
383
385
|
}],
|
|
384
386
|
component: createInsertButtonComponent('lg')
|
|
385
387
|
});
|
|
386
388
|
components.push({
|
|
387
|
-
type:
|
|
388
|
-
key: "".concat(
|
|
389
|
+
type: _keys.INSERT_GROUP.type,
|
|
390
|
+
key: "".concat(_keys.INSERT_GROUP.key, "-xl"),
|
|
389
391
|
parents: [{
|
|
390
|
-
type:
|
|
391
|
-
key:
|
|
392
|
-
rank:
|
|
392
|
+
type: _keys.INSERT_BLOCK_SECTION.type,
|
|
393
|
+
key: _keys.INSERT_BLOCK_SECTION.key,
|
|
394
|
+
rank: _rank.INSERT_BLOCK_SECTION_RANK[_keys.INSERT_GROUP.key]
|
|
393
395
|
}],
|
|
394
396
|
component: function component(_ref7) {
|
|
395
397
|
var children = _ref7.children;
|
|
396
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
398
|
+
return /*#__PURE__*/_react.default.createElement(_show.Show, {
|
|
397
399
|
only: "xl"
|
|
398
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
400
|
+
}, /*#__PURE__*/_react.default.createElement(_toolbarButtonGroup.ToolbarButtonGroup, null, children));
|
|
399
401
|
}
|
|
400
402
|
});
|
|
401
403
|
components.push({
|
|
402
|
-
type:
|
|
403
|
-
key:
|
|
404
|
+
type: _keys.INSERT_BUTTON.type,
|
|
405
|
+
key: _keys.INSERT_BUTTON.key,
|
|
404
406
|
parents: [{
|
|
405
|
-
type:
|
|
406
|
-
key: "".concat(
|
|
407
|
-
rank:
|
|
407
|
+
type: _keys.INSERT_GROUP.type,
|
|
408
|
+
key: "".concat(_keys.INSERT_GROUP.key, "-xl"),
|
|
409
|
+
rank: _rank.INSERT_GROUP_RANK[_keys.INSERT_BUTTON.key]
|
|
408
410
|
}],
|
|
409
411
|
component: createInsertButtonComponent('xl')
|
|
410
412
|
});
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React, { useEffect } from 'react';
|
|
2
|
-
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
2
|
+
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
3
|
+
import { isOfflineMode } from '@atlaskit/editor-common/connectivity/isOfflineMode';
|
|
4
|
+
import ElementBrowser from '@atlaskit/editor-common/element-browser/ElementBrowserLoader';
|
|
5
5
|
import { ToolbarSize } from '@atlaskit/editor-common/types';
|
|
6
|
-
import { useSharedPluginStateSelector } from '@atlaskit/editor-common/
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
6
|
+
import { useSharedPluginStateSelector } from '@atlaskit/editor-common/useSharedPluginStateSelector';
|
|
7
|
+
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/useSharedPluginStateWithSelector';
|
|
8
|
+
import { BLOCK_QUOTE, CODE_BLOCK, PANEL } from '@atlaskit/editor-plugin-block-type/consts/block-types';
|
|
9
9
|
import { getToolbarActionExperiencesPlugin } from './pm-plugins/experiences/toolbar-action-experiences';
|
|
10
10
|
import { toggleInsertBlockPmKey, toggleInsertBlockPmPlugin } from './pm-plugins/toggleInsertBlock';
|
|
11
11
|
import { getToolbarComponents } from './ui/toolbar-components';
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import { bind } from 'bind-event-listener';
|
|
2
2
|
import { getDocument } from '@atlaskit/browser-apis';
|
|
3
|
-
import {
|
|
3
|
+
import { getSelectionAncestorDOM } from '@atlaskit/editor-common/experiences';
|
|
4
|
+
import { EXPERIENCE_ID } from '@atlaskit/editor-common/experiences/consts';
|
|
5
|
+
import { Experience } from '@atlaskit/editor-common/experiences/Experience';
|
|
6
|
+
import { ExperienceCheckDomMutation } from '@atlaskit/editor-common/experiences/ExperienceCheckDomMutation';
|
|
7
|
+
import { ExperienceCheckPopupMutation } from '@atlaskit/editor-common/experiences/ExperienceCheckPopupMutation';
|
|
8
|
+
import { ExperienceCheckTimeout } from '@atlaskit/editor-common/experiences/ExperienceCheckTimeout';
|
|
4
9
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
5
|
-
import { TOOLBAR_BUTTON_TEST_ID } from '@atlaskit/editor-common/toolbar';
|
|
10
|
+
import { TOOLBAR_BUTTON_TEST_ID } from '@atlaskit/editor-common/toolbar/keys';
|
|
6
11
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
7
12
|
import { handleEditorNodeInsertDomMutation, isToolbarButtonClick } from './toolbar-experience-utils';
|
|
8
13
|
const pluginKey = new PluginKey('toolbarActionExperiences');
|
|
@@ -9,12 +9,14 @@ import { useCallback, useContext, useLayoutEffect, useMemo, useState } from 'rea
|
|
|
9
9
|
/* eslint-disable @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports, jsdoc/require-description -- Ignored via go/DSP-18766; jsdoc debt surfaced by this mechanical PR */
|
|
10
10
|
import { css, jsx } from '@emotion/react';
|
|
11
11
|
import { CellMeasurerCache } from 'react-virtualized/dist/commonjs/CellMeasurer';
|
|
12
|
-
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import
|
|
17
|
-
import {
|
|
12
|
+
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
13
|
+
import { IconCode, IconDate, IconDecision, IconDivider, IconExpand, IconPanel, IconQuote, IconStatus } from '@atlaskit/editor-common/assets';
|
|
14
|
+
import { isOfflineMode } from '@atlaskit/editor-common/connectivity/isOfflineMode';
|
|
15
|
+
import { ELEMENT_ITEM_HEIGHT } from '@atlaskit/editor-common/element-browser/constants';
|
|
16
|
+
import ElementBrowser from '@atlaskit/editor-common/element-browser/ElementBrowserLoader';
|
|
17
|
+
import { OutsideClickTargetRefContext } from '@atlaskit/editor-common/ui-react';
|
|
18
|
+
import withOuterListeners from '@atlaskit/editor-common/ui-react/with-react-editor-view-outer-listeners';
|
|
19
|
+
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/useSharedPluginStateWithSelector';
|
|
18
20
|
export const DEFAULT_HEIGHT = 560;
|
|
19
21
|
|
|
20
22
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useMemo } from 'react';
|
|
2
2
|
import { useIntl } from 'react-intl';
|
|
3
|
-
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/
|
|
3
|
+
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/useSharedPluginStateWithSelector';
|
|
4
4
|
import { createItems } from '../ToolbarInsertBlock/create-items';
|
|
5
5
|
const selector = states => {
|
|
6
6
|
var _states$dateState, _states$hyperlinkStat, _states$hyperlinkStat2, _states$typeAheadStat, _states$blockTypeStat, _states$imageUploadSt, _states$placeholderTe, _states$emojiState, _states$mentionState, _states$mentionState2, _states$mediaState;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useCallback } from 'react';
|
|
2
|
+
import Popup from '@atlaskit/editor-common/Popup';
|
|
2
3
|
import { useMenuPopupSizing } from '@atlaskit/editor-common/quick-insert/use-menu-popup-sizing';
|
|
3
|
-
import { Popup } from '@atlaskit/editor-common/ui';
|
|
4
4
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
5
5
|
import InsertMenu, { DEFAULT_HEIGHT } from '../ElementBrowser/InsertMenu';
|
|
6
6
|
import { RegisteredInsertMenuContent } from '../registered-insert-menu/RegisteredInsertMenuContent';
|
|
@@ -2,7 +2,8 @@ import React from 'react';
|
|
|
2
2
|
import memoize from 'lodash/memoize';
|
|
3
3
|
import memoizeOne from 'memoize-one';
|
|
4
4
|
import { ToolTipContent } from '@atlaskit/editor-common/keymaps';
|
|
5
|
-
import {
|
|
5
|
+
import { messages as blockTypeMessages } from '@atlaskit/editor-common/messages/block-type';
|
|
6
|
+
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages/insert-block';
|
|
6
7
|
import { action, blockquote, codeblock, date, decision, emoji, expand, horizontalrule, imageUpload, layout, link, media, mention, panel, placeholder, status, table, tableSelector } from './item';
|
|
7
8
|
import { shallowEquals } from './shallow-equals';
|
|
8
9
|
const buttonToItem = memoize(button => ({
|
|
@@ -7,7 +7,7 @@ import React from 'react';
|
|
|
7
7
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
|
|
8
8
|
import { jsx } from '@emotion/react';
|
|
9
9
|
import { ToolTipContent } from '@atlaskit/editor-common/keymaps';
|
|
10
|
-
import
|
|
10
|
+
import ToolbarButton from '@atlaskit/editor-common/ui-menu/ToolbarButton';
|
|
11
11
|
import AddIcon from '@atlaskit/icon/core/add';
|
|
12
12
|
import ChevronDownIcon from '@atlaskit/icon/core/chevron-down';
|
|
13
13
|
import { triggerWrapper } from './styles';
|
|
@@ -11,13 +11,15 @@ import React from 'react';
|
|
|
11
11
|
/* eslint-disable @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports */
|
|
12
12
|
import { css, jsx } from '@emotion/react';
|
|
13
13
|
import { injectIntl } from 'react-intl';
|
|
14
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
15
|
-
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
16
|
-
import
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import
|
|
20
|
-
import {
|
|
14
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
15
|
+
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages/insert-block';
|
|
16
|
+
import Popup from '@atlaskit/editor-common/Popup';
|
|
17
|
+
import { buttonGroupStyle, separatorStyles, wrapperStyle } from '@atlaskit/editor-common/styles/plugins';
|
|
18
|
+
import { TableSelectorPopup } from '@atlaskit/editor-common/TableSelector';
|
|
19
|
+
import ToolbarButton from '@atlaskit/editor-common/ui-menu/ToolbarButton';
|
|
20
|
+
import { OutsideClickTargetRefContext } from '@atlaskit/editor-common/ui-react';
|
|
21
|
+
import withOuterListeners from '@atlaskit/editor-common/ui-react/with-react-editor-view-outer-listeners';
|
|
22
|
+
import { akEditorMenuZIndex } from '@atlaskit/editor-shared-styles/constants';
|
|
21
23
|
import { EmojiPicker as AkEmojiPicker } from '@atlaskit/emoji/picker';
|
|
22
24
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
23
25
|
// Ignored via go/ees005
|
|
@@ -8,7 +8,7 @@ import React from 'react';
|
|
|
8
8
|
import { jsx } from '@emotion/react';
|
|
9
9
|
import memoizeOne from 'memoize-one';
|
|
10
10
|
import { addLink, getAriaKeyshortcuts, toggleTable, tooltip } from '@atlaskit/editor-common/keymaps';
|
|
11
|
-
import { shortcutStyle } from '@atlaskit/editor-shared-styles/shortcut';
|
|
11
|
+
import { shortcutStyle } from '@atlaskit/editor-shared-styles/shortcut/main';
|
|
12
12
|
import FieldTextIcon from '@atlaskit/icon-lab/core/field-text';
|
|
13
13
|
import LozengeIcon from '@atlaskit/icon-lab/core/lozenge';
|
|
14
14
|
import AngleBracketsIcon from '@atlaskit/icon/core/angle-brackets';
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import React, { useCallback, useRef, useState } from 'react';
|
|
2
2
|
import { useIntl } from 'react-intl';
|
|
3
|
-
import {
|
|
3
|
+
import { isOfflineMode } from '@atlaskit/editor-common/connectivity/isOfflineMode';
|
|
4
4
|
import { getAriaKeyshortcuts, insertElements, ToolTipContent } from '@atlaskit/editor-common/keymaps';
|
|
5
|
-
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
5
|
+
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages/insert-block';
|
|
6
|
+
import Popup from '@atlaskit/editor-common/Popup';
|
|
6
7
|
import { useMenuPopupSizing } from '@atlaskit/editor-common/quick-insert/use-menu-popup-sizing';
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
8
|
+
import { useEditorToolbar } from '@atlaskit/editor-common/toolbar/context';
|
|
9
|
+
import { TOOLBAR_BUTTON_TEST_ID } from '@atlaskit/editor-common/toolbar/keys';
|
|
10
|
+
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/useSharedPluginStateWithSelector';
|
|
10
11
|
import { akEditorMenuZIndex } from '@atlaskit/editor-shared-styles/constants';
|
|
11
12
|
import { AddIcon } from '@atlaskit/editor-toolbar/add-icon';
|
|
12
13
|
import { ToolbarButton } from '@atlaskit/editor-toolbar/toolbar-button';
|
|
@@ -4,7 +4,7 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
4
4
|
import React, { useCallback, useId, useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
5
5
|
import { useIntl } from 'react-intl';
|
|
6
6
|
import { getDocument } from '@atlaskit/browser-apis';
|
|
7
|
-
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
7
|
+
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages/insert-block';
|
|
8
8
|
import { MENU } from '@atlaskit/editor-common/quick-insert/keys';
|
|
9
9
|
import { buildQuickInsertMenuModel, getMatchingQuickInsertComponents, getQuickInsertMenuRows, selectQuickInsertCategoryItems } from '@atlaskit/editor-common/quick-insert/registered-menu-model';
|
|
10
10
|
import { isSectionOverflowItemKey } from '@atlaskit/editor-common/type-ahead-is-section-overflow-item-key';
|