@atlaskit/editor-plugin-insert-block 7.0.6 → 7.0.7
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 +8 -0
- package/dist/cjs/ui/toolbar-components/EmojiButton.js +5 -1
- package/dist/cjs/ui/toolbar-components/InsertButton.js +7 -2
- package/dist/cjs/ui/toolbar-components/MentionButton.js +6 -1
- package/dist/cjs/ui/toolbar-components/TableButton.js +6 -2
- package/dist/cjs/ui/toolbar-components/TaskListButton.js +6 -1
- package/dist/es2019/ui/toolbar-components/EmojiButton.js +5 -1
- package/dist/es2019/ui/toolbar-components/InsertButton.js +7 -2
- package/dist/es2019/ui/toolbar-components/MentionButton.js +6 -1
- package/dist/es2019/ui/toolbar-components/TableButton.js +7 -3
- package/dist/es2019/ui/toolbar-components/TaskListButton.js +6 -1
- package/dist/esm/ui/toolbar-components/EmojiButton.js +5 -1
- package/dist/esm/ui/toolbar-components/InsertButton.js +7 -2
- package/dist/esm/ui/toolbar-components/MentionButton.js +6 -1
- package/dist/esm/ui/toolbar-components/TableButton.js +7 -3
- package/dist/esm/ui/toolbar-components/TaskListButton.js +6 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-insert-block
|
|
2
2
|
|
|
3
|
+
## 7.0.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`872bd8d576773`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/872bd8d576773) -
|
|
8
|
+
[ux] ED-29272 Add missing tooltip and shortcut for TextColorDropdownMenu
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
3
11
|
## 7.0.6
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -8,6 +8,7 @@ exports.EmojiButton = void 0;
|
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
9
|
var _reactIntlNext = require("react-intl-next");
|
|
10
10
|
var _hooks = require("@atlaskit/editor-common/hooks");
|
|
11
|
+
var _keymaps = require("@atlaskit/editor-common/keymaps");
|
|
11
12
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
12
13
|
var _editorToolbar = require("@atlaskit/editor-toolbar");
|
|
13
14
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
@@ -58,7 +59,10 @@ var EmojiButton = exports.EmojiButton = function EmojiButton(_ref) {
|
|
|
58
59
|
popupsBoundariesElement: popupsBoundariesElement,
|
|
59
60
|
popupsScrollableElement: popupsScrollableElement
|
|
60
61
|
}), /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarTooltip, {
|
|
61
|
-
content:
|
|
62
|
+
content: (0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc_patch_6', 'isEnabled', true) ? /*#__PURE__*/_react.default.createElement(_keymaps.ToolTipContent, {
|
|
63
|
+
description: formatMessage(_messages.toolbarInsertBlockMessages.emoji),
|
|
64
|
+
keymap: _keymaps.insertEmoji
|
|
65
|
+
}) : formatMessage(_messages.toolbarInsertBlockMessages.emoji)
|
|
62
66
|
}, /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarButton, {
|
|
63
67
|
iconBefore: /*#__PURE__*/_react.default.createElement(_editorToolbar.EmojiIcon, {
|
|
64
68
|
label: formatMessage(_messages.toolbarInsertBlockMessages.emoji),
|
|
@@ -10,6 +10,7 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
var _reactIntlNext = require("react-intl-next");
|
|
12
12
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
13
|
+
var _keymaps = require("@atlaskit/editor-common/keymaps");
|
|
13
14
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
14
15
|
var _toolbar = require("@atlaskit/editor-common/toolbar");
|
|
15
16
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
@@ -17,6 +18,7 @@ var _useSharedPluginStateSelector = require("@atlaskit/editor-common/use-shared-
|
|
|
17
18
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
18
19
|
var _editorToolbar = require("@atlaskit/editor-toolbar");
|
|
19
20
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
21
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
20
22
|
var _InsertMenu = _interopRequireWildcard(require("../ElementBrowser/InsertMenu"));
|
|
21
23
|
var _useEmojiPickerPopup = require("./hooks/useEmojiPickerPopup");
|
|
22
24
|
var _useInsertButtonState2 = require("./hooks/useInsertButtonState");
|
|
@@ -235,13 +237,16 @@ var InsertButton = exports.InsertButton = function InsertButton(_ref) {
|
|
|
235
237
|
popupsBoundariesElement: popupsBoundariesElement,
|
|
236
238
|
popupsScrollableElement: popupsScrollableElement
|
|
237
239
|
}), /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarTooltip, {
|
|
238
|
-
content:
|
|
240
|
+
content: (0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc_patch_6', 'isEnabled', true) ? /*#__PURE__*/_react.default.createElement(_keymaps.ToolTipContent, {
|
|
241
|
+
description: formatMessage(_messages.toolbarInsertBlockMessages.insertMenu),
|
|
242
|
+
keymap: _keymaps.insertElements
|
|
243
|
+
}) : formatMessage(_messages.toolbarInsertBlockMessages.insertMenu)
|
|
239
244
|
}, /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarButton, {
|
|
240
245
|
iconBefore: /*#__PURE__*/_react.default.createElement(_editorToolbar.AddIcon, {
|
|
241
246
|
size: "small",
|
|
242
247
|
label: formatMessage(_messages.toolbarInsertBlockMessages.insertMenu)
|
|
243
248
|
}),
|
|
244
|
-
ariaKeyshortcuts:
|
|
249
|
+
ariaKeyshortcuts: (0, _keymaps.getAriaKeyshortcuts)(_keymaps.insertElements),
|
|
245
250
|
ref: insertButtonRef,
|
|
246
251
|
onClick: onClick,
|
|
247
252
|
isSelected: insertMenuOpen,
|
|
@@ -9,8 +9,10 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
var _reactIntlNext = require("react-intl-next");
|
|
10
10
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
11
11
|
var _hooks = require("@atlaskit/editor-common/hooks");
|
|
12
|
+
var _keymaps = require("@atlaskit/editor-common/keymaps");
|
|
12
13
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
13
14
|
var _editorToolbar = require("@atlaskit/editor-toolbar");
|
|
15
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
14
16
|
var MentionButton = exports.MentionButton = function MentionButton(_ref) {
|
|
15
17
|
var api = _ref.api;
|
|
16
18
|
var _useIntl = (0, _reactIntlNext.useIntl)(),
|
|
@@ -34,7 +36,10 @@ var MentionButton = exports.MentionButton = function MentionButton(_ref) {
|
|
|
34
36
|
api === null || api === void 0 || (_api$mention = api.mention) === null || _api$mention === void 0 || (_api$mention = _api$mention.actions) === null || _api$mention === void 0 || _api$mention.openTypeAhead(_analytics.INPUT_METHOD.TOOLBAR);
|
|
35
37
|
};
|
|
36
38
|
return /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarTooltip, {
|
|
37
|
-
content:
|
|
39
|
+
content: (0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc_patch_6', 'isEnabled', true) ? /*#__PURE__*/_react.default.createElement(_keymaps.ToolTipContent, {
|
|
40
|
+
description: formatMessage(_messages.toolbarInsertBlockMessages.mention),
|
|
41
|
+
keymap: _keymaps.insertMention
|
|
42
|
+
}) : formatMessage(_messages.toolbarInsertBlockMessages.mention)
|
|
38
43
|
}, /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarButton, {
|
|
39
44
|
iconBefore: /*#__PURE__*/_react.default.createElement(_editorToolbar.MentionIcon, {
|
|
40
45
|
label: formatMessage(_messages.toolbarInsertBlockMessages.mention),
|
|
@@ -12,6 +12,7 @@ var _keymaps = require("@atlaskit/editor-common/keymaps");
|
|
|
12
12
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
13
13
|
var _toolbar = require("@atlaskit/editor-common/toolbar");
|
|
14
14
|
var _editorToolbar = require("@atlaskit/editor-toolbar");
|
|
15
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
15
16
|
var TableButton = exports.TableButton = function TableButton(_ref) {
|
|
16
17
|
var api = _ref.api;
|
|
17
18
|
var _useIntl = (0, _reactIntlNext.useIntl)(),
|
|
@@ -41,13 +42,16 @@ var TableButton = exports.TableButton = function TableButton(_ref) {
|
|
|
41
42
|
}
|
|
42
43
|
};
|
|
43
44
|
return /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarTooltip, {
|
|
44
|
-
content:
|
|
45
|
+
content: (0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc_patch_6', 'isEnabled', true) ? /*#__PURE__*/_react.default.createElement(_keymaps.ToolTipContent, {
|
|
46
|
+
description: formatMessage(_messages.toolbarInsertBlockMessages.table),
|
|
47
|
+
keymap: _keymaps.toggleTable
|
|
48
|
+
}) : formatMessage(_messages.toolbarInsertBlockMessages.table)
|
|
45
49
|
}, /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarButton, {
|
|
46
50
|
iconBefore: /*#__PURE__*/_react.default.createElement(_editorToolbar.TableIcon, {
|
|
47
51
|
label: formatMessage(_messages.toolbarInsertBlockMessages.table),
|
|
48
52
|
size: "small"
|
|
49
53
|
}),
|
|
50
54
|
onClick: onClick,
|
|
51
|
-
ariaKeyshortcuts: (0, _keymaps.
|
|
55
|
+
ariaKeyshortcuts: (0, _keymaps.getAriaKeyshortcuts)(_keymaps.toggleTable)
|
|
52
56
|
}));
|
|
53
57
|
};
|
|
@@ -8,9 +8,11 @@ exports.TaskListButton = void 0;
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _reactIntlNext = require("react-intl-next");
|
|
10
10
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
11
|
+
var _keymaps = require("@atlaskit/editor-common/keymaps");
|
|
11
12
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
12
13
|
var _toolbar = require("@atlaskit/editor-common/toolbar");
|
|
13
14
|
var _editorToolbar = require("@atlaskit/editor-toolbar");
|
|
15
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
14
16
|
var TaskListButton = exports.TaskListButton = function TaskListButton(_ref) {
|
|
15
17
|
var api = _ref.api;
|
|
16
18
|
var _useIntl = (0, _reactIntlNext.useIntl)(),
|
|
@@ -29,7 +31,10 @@ var TaskListButton = exports.TaskListButton = function TaskListButton(_ref) {
|
|
|
29
31
|
}
|
|
30
32
|
};
|
|
31
33
|
return /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarTooltip, {
|
|
32
|
-
content:
|
|
34
|
+
content: (0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc_patch_6', 'isEnabled', true) ? /*#__PURE__*/_react.default.createElement(_keymaps.ToolTipContent, {
|
|
35
|
+
description: formatMessage(_messages.toolbarInsertBlockMessages.action),
|
|
36
|
+
keymap: _keymaps.insertTaskList
|
|
37
|
+
}) : formatMessage(_messages.toolbarInsertBlockMessages.action)
|
|
33
38
|
}, /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarButton, {
|
|
34
39
|
iconBefore: /*#__PURE__*/_react.default.createElement(_editorToolbar.TaskIcon, {
|
|
35
40
|
label: formatMessage(_messages.toolbarInsertBlockMessages.action),
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { useRef } from 'react';
|
|
2
2
|
import { useIntl } from 'react-intl-next';
|
|
3
3
|
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
4
|
+
import { ToolTipContent, insertEmoji } from '@atlaskit/editor-common/keymaps';
|
|
4
5
|
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
5
6
|
import { ToolbarButton, ToolbarTooltip, EmojiIcon } from '@atlaskit/editor-toolbar';
|
|
6
7
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
@@ -53,7 +54,10 @@ export const EmojiButton = ({
|
|
|
53
54
|
popupsBoundariesElement: popupsBoundariesElement,
|
|
54
55
|
popupsScrollableElement: popupsScrollableElement
|
|
55
56
|
}), /*#__PURE__*/React.createElement(ToolbarTooltip, {
|
|
56
|
-
content:
|
|
57
|
+
content: expValEquals('platform_editor_toolbar_aifc_patch_6', 'isEnabled', true) ? /*#__PURE__*/React.createElement(ToolTipContent, {
|
|
58
|
+
description: formatMessage(messages.emoji),
|
|
59
|
+
keymap: insertEmoji
|
|
60
|
+
}) : formatMessage(messages.emoji)
|
|
57
61
|
}, /*#__PURE__*/React.createElement(ToolbarButton, {
|
|
58
62
|
iconBefore: /*#__PURE__*/React.createElement(EmojiIcon, {
|
|
59
63
|
label: formatMessage(messages.emoji),
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { useRef, useState } from 'react';
|
|
2
2
|
import { useIntl } from 'react-intl-next';
|
|
3
3
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
|
+
import { getAriaKeyshortcuts, insertElements, ToolTipContent } from '@atlaskit/editor-common/keymaps';
|
|
4
5
|
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
5
6
|
import { useEditorToolbar } from '@atlaskit/editor-common/toolbar';
|
|
6
7
|
import { Popup } from '@atlaskit/editor-common/ui';
|
|
@@ -8,6 +9,7 @@ import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared
|
|
|
8
9
|
import { akEditorMenuZIndex } from '@atlaskit/editor-shared-styles';
|
|
9
10
|
import { ToolbarButton, ToolbarTooltip, AddIcon, useToolbarUI } from '@atlaskit/editor-toolbar';
|
|
10
11
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
11
13
|
import InsertMenu, { DEFAULT_HEIGHT } from '../ElementBrowser/InsertMenu';
|
|
12
14
|
import { useEmojiPickerPopup } from './hooks/useEmojiPickerPopup';
|
|
13
15
|
import { useInsertButtonState } from './hooks/useInsertButtonState';
|
|
@@ -228,13 +230,16 @@ export const InsertButton = ({
|
|
|
228
230
|
popupsBoundariesElement: popupsBoundariesElement,
|
|
229
231
|
popupsScrollableElement: popupsScrollableElement
|
|
230
232
|
}), /*#__PURE__*/React.createElement(ToolbarTooltip, {
|
|
231
|
-
content:
|
|
233
|
+
content: expValEquals('platform_editor_toolbar_aifc_patch_6', 'isEnabled', true) ? /*#__PURE__*/React.createElement(ToolTipContent, {
|
|
234
|
+
description: formatMessage(messages.insertMenu),
|
|
235
|
+
keymap: insertElements
|
|
236
|
+
}) : formatMessage(messages.insertMenu)
|
|
232
237
|
}, /*#__PURE__*/React.createElement(ToolbarButton, {
|
|
233
238
|
iconBefore: /*#__PURE__*/React.createElement(AddIcon, {
|
|
234
239
|
size: "small",
|
|
235
240
|
label: formatMessage(messages.insertMenu)
|
|
236
241
|
}),
|
|
237
|
-
ariaKeyshortcuts:
|
|
242
|
+
ariaKeyshortcuts: getAriaKeyshortcuts(insertElements),
|
|
238
243
|
ref: insertButtonRef,
|
|
239
244
|
onClick: onClick,
|
|
240
245
|
isSelected: insertMenuOpen,
|
|
@@ -2,8 +2,10 @@ import React from 'react';
|
|
|
2
2
|
import { useIntl } from 'react-intl-next';
|
|
3
3
|
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
4
|
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
5
|
+
import { ToolTipContent, insertMention } from '@atlaskit/editor-common/keymaps';
|
|
5
6
|
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
6
7
|
import { ToolbarButton, ToolbarTooltip, MentionIcon } from '@atlaskit/editor-toolbar';
|
|
8
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
7
9
|
export const MentionButton = ({
|
|
8
10
|
api
|
|
9
11
|
}) => {
|
|
@@ -30,7 +32,10 @@ export const MentionButton = ({
|
|
|
30
32
|
api === null || api === void 0 ? void 0 : (_api$mention = api.mention) === null || _api$mention === void 0 ? void 0 : (_api$mention$actions = _api$mention.actions) === null || _api$mention$actions === void 0 ? void 0 : _api$mention$actions.openTypeAhead(INPUT_METHOD.TOOLBAR);
|
|
31
33
|
};
|
|
32
34
|
return /*#__PURE__*/React.createElement(ToolbarTooltip, {
|
|
33
|
-
content:
|
|
35
|
+
content: expValEquals('platform_editor_toolbar_aifc_patch_6', 'isEnabled', true) ? /*#__PURE__*/React.createElement(ToolTipContent, {
|
|
36
|
+
description: formatMessage(messages.mention),
|
|
37
|
+
keymap: insertMention
|
|
38
|
+
}) : formatMessage(messages.mention)
|
|
34
39
|
}, /*#__PURE__*/React.createElement(ToolbarButton, {
|
|
35
40
|
iconBefore: /*#__PURE__*/React.createElement(MentionIcon, {
|
|
36
41
|
label: formatMessage(messages.mention),
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useIntl } from 'react-intl-next';
|
|
3
3
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
|
-
import {
|
|
4
|
+
import { ToolTipContent, getAriaKeyshortcuts, toggleTable } from '@atlaskit/editor-common/keymaps';
|
|
5
5
|
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
6
6
|
import { useEditorToolbar } from '@atlaskit/editor-common/toolbar';
|
|
7
7
|
import { ToolbarButton, ToolbarTooltip, TableIcon } from '@atlaskit/editor-toolbar';
|
|
8
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
8
9
|
export const TableButton = ({
|
|
9
10
|
api
|
|
10
11
|
}) => {
|
|
@@ -39,13 +40,16 @@ export const TableButton = ({
|
|
|
39
40
|
}
|
|
40
41
|
};
|
|
41
42
|
return /*#__PURE__*/React.createElement(ToolbarTooltip, {
|
|
42
|
-
content:
|
|
43
|
+
content: expValEquals('platform_editor_toolbar_aifc_patch_6', 'isEnabled', true) ? /*#__PURE__*/React.createElement(ToolTipContent, {
|
|
44
|
+
description: formatMessage(messages.table),
|
|
45
|
+
keymap: toggleTable
|
|
46
|
+
}) : formatMessage(messages.table)
|
|
43
47
|
}, /*#__PURE__*/React.createElement(ToolbarButton, {
|
|
44
48
|
iconBefore: /*#__PURE__*/React.createElement(TableIcon, {
|
|
45
49
|
label: formatMessage(messages.table),
|
|
46
50
|
size: "small"
|
|
47
51
|
}),
|
|
48
52
|
onClick: onClick,
|
|
49
|
-
ariaKeyshortcuts:
|
|
53
|
+
ariaKeyshortcuts: getAriaKeyshortcuts(toggleTable)
|
|
50
54
|
}));
|
|
51
55
|
};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useIntl } from 'react-intl-next';
|
|
3
3
|
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
|
+
import { ToolTipContent, insertTaskList } from '@atlaskit/editor-common/keymaps';
|
|
4
5
|
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
5
6
|
import { useEditorToolbar } from '@atlaskit/editor-common/toolbar';
|
|
6
7
|
import { ToolbarButton, ToolbarTooltip, TaskIcon } from '@atlaskit/editor-toolbar';
|
|
8
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
7
9
|
export const TaskListButton = ({
|
|
8
10
|
api
|
|
9
11
|
}) => {
|
|
@@ -27,7 +29,10 @@ export const TaskListButton = ({
|
|
|
27
29
|
}
|
|
28
30
|
};
|
|
29
31
|
return /*#__PURE__*/React.createElement(ToolbarTooltip, {
|
|
30
|
-
content:
|
|
32
|
+
content: expValEquals('platform_editor_toolbar_aifc_patch_6', 'isEnabled', true) ? /*#__PURE__*/React.createElement(ToolTipContent, {
|
|
33
|
+
description: formatMessage(messages.action),
|
|
34
|
+
keymap: insertTaskList
|
|
35
|
+
}) : formatMessage(messages.action)
|
|
31
36
|
}, /*#__PURE__*/React.createElement(ToolbarButton, {
|
|
32
37
|
iconBefore: /*#__PURE__*/React.createElement(TaskIcon, {
|
|
33
38
|
label: formatMessage(messages.action),
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { useRef } from 'react';
|
|
2
2
|
import { useIntl } from 'react-intl-next';
|
|
3
3
|
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
4
|
+
import { ToolTipContent, insertEmoji } from '@atlaskit/editor-common/keymaps';
|
|
4
5
|
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
5
6
|
import { ToolbarButton, ToolbarTooltip, EmojiIcon } from '@atlaskit/editor-toolbar';
|
|
6
7
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
@@ -50,7 +51,10 @@ export var EmojiButton = function EmojiButton(_ref) {
|
|
|
50
51
|
popupsBoundariesElement: popupsBoundariesElement,
|
|
51
52
|
popupsScrollableElement: popupsScrollableElement
|
|
52
53
|
}), /*#__PURE__*/React.createElement(ToolbarTooltip, {
|
|
53
|
-
content:
|
|
54
|
+
content: expValEquals('platform_editor_toolbar_aifc_patch_6', 'isEnabled', true) ? /*#__PURE__*/React.createElement(ToolTipContent, {
|
|
55
|
+
description: formatMessage(messages.emoji),
|
|
56
|
+
keymap: insertEmoji
|
|
57
|
+
}) : formatMessage(messages.emoji)
|
|
54
58
|
}, /*#__PURE__*/React.createElement(ToolbarButton, {
|
|
55
59
|
iconBefore: /*#__PURE__*/React.createElement(EmojiIcon, {
|
|
56
60
|
label: formatMessage(messages.emoji),
|
|
@@ -2,6 +2,7 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
2
2
|
import React, { useRef, useState } from 'react';
|
|
3
3
|
import { useIntl } from 'react-intl-next';
|
|
4
4
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
5
|
+
import { getAriaKeyshortcuts, insertElements, ToolTipContent } from '@atlaskit/editor-common/keymaps';
|
|
5
6
|
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
6
7
|
import { useEditorToolbar } from '@atlaskit/editor-common/toolbar';
|
|
7
8
|
import { Popup } from '@atlaskit/editor-common/ui';
|
|
@@ -9,6 +10,7 @@ import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared
|
|
|
9
10
|
import { akEditorMenuZIndex } from '@atlaskit/editor-shared-styles';
|
|
10
11
|
import { ToolbarButton, ToolbarTooltip, AddIcon, useToolbarUI } from '@atlaskit/editor-toolbar';
|
|
11
12
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
13
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
12
14
|
import InsertMenu, { DEFAULT_HEIGHT } from '../ElementBrowser/InsertMenu';
|
|
13
15
|
import { useEmojiPickerPopup } from './hooks/useEmojiPickerPopup';
|
|
14
16
|
import { useInsertButtonState } from './hooks/useInsertButtonState';
|
|
@@ -227,13 +229,16 @@ export var InsertButton = function InsertButton(_ref) {
|
|
|
227
229
|
popupsBoundariesElement: popupsBoundariesElement,
|
|
228
230
|
popupsScrollableElement: popupsScrollableElement
|
|
229
231
|
}), /*#__PURE__*/React.createElement(ToolbarTooltip, {
|
|
230
|
-
content:
|
|
232
|
+
content: expValEquals('platform_editor_toolbar_aifc_patch_6', 'isEnabled', true) ? /*#__PURE__*/React.createElement(ToolTipContent, {
|
|
233
|
+
description: formatMessage(messages.insertMenu),
|
|
234
|
+
keymap: insertElements
|
|
235
|
+
}) : formatMessage(messages.insertMenu)
|
|
231
236
|
}, /*#__PURE__*/React.createElement(ToolbarButton, {
|
|
232
237
|
iconBefore: /*#__PURE__*/React.createElement(AddIcon, {
|
|
233
238
|
size: "small",
|
|
234
239
|
label: formatMessage(messages.insertMenu)
|
|
235
240
|
}),
|
|
236
|
-
ariaKeyshortcuts:
|
|
241
|
+
ariaKeyshortcuts: getAriaKeyshortcuts(insertElements),
|
|
237
242
|
ref: insertButtonRef,
|
|
238
243
|
onClick: onClick,
|
|
239
244
|
isSelected: insertMenuOpen,
|
|
@@ -2,8 +2,10 @@ import React from 'react';
|
|
|
2
2
|
import { useIntl } from 'react-intl-next';
|
|
3
3
|
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
4
|
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
5
|
+
import { ToolTipContent, insertMention } from '@atlaskit/editor-common/keymaps';
|
|
5
6
|
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
6
7
|
import { ToolbarButton, ToolbarTooltip, MentionIcon } from '@atlaskit/editor-toolbar';
|
|
8
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
7
9
|
export var MentionButton = function MentionButton(_ref) {
|
|
8
10
|
var api = _ref.api;
|
|
9
11
|
var _useIntl = useIntl(),
|
|
@@ -27,7 +29,10 @@ export var MentionButton = function MentionButton(_ref) {
|
|
|
27
29
|
api === null || api === void 0 || (_api$mention = api.mention) === null || _api$mention === void 0 || (_api$mention = _api$mention.actions) === null || _api$mention === void 0 || _api$mention.openTypeAhead(INPUT_METHOD.TOOLBAR);
|
|
28
30
|
};
|
|
29
31
|
return /*#__PURE__*/React.createElement(ToolbarTooltip, {
|
|
30
|
-
content:
|
|
32
|
+
content: expValEquals('platform_editor_toolbar_aifc_patch_6', 'isEnabled', true) ? /*#__PURE__*/React.createElement(ToolTipContent, {
|
|
33
|
+
description: formatMessage(messages.mention),
|
|
34
|
+
keymap: insertMention
|
|
35
|
+
}) : formatMessage(messages.mention)
|
|
31
36
|
}, /*#__PURE__*/React.createElement(ToolbarButton, {
|
|
32
37
|
iconBefore: /*#__PURE__*/React.createElement(MentionIcon, {
|
|
33
38
|
label: formatMessage(messages.mention),
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useIntl } from 'react-intl-next';
|
|
3
3
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
|
-
import {
|
|
4
|
+
import { ToolTipContent, getAriaKeyshortcuts, toggleTable } from '@atlaskit/editor-common/keymaps';
|
|
5
5
|
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
6
6
|
import { useEditorToolbar } from '@atlaskit/editor-common/toolbar';
|
|
7
7
|
import { ToolbarButton, ToolbarTooltip, TableIcon } from '@atlaskit/editor-toolbar';
|
|
8
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
8
9
|
export var TableButton = function TableButton(_ref) {
|
|
9
10
|
var api = _ref.api;
|
|
10
11
|
var _useIntl = useIntl(),
|
|
@@ -34,13 +35,16 @@ export var TableButton = function TableButton(_ref) {
|
|
|
34
35
|
}
|
|
35
36
|
};
|
|
36
37
|
return /*#__PURE__*/React.createElement(ToolbarTooltip, {
|
|
37
|
-
content:
|
|
38
|
+
content: expValEquals('platform_editor_toolbar_aifc_patch_6', 'isEnabled', true) ? /*#__PURE__*/React.createElement(ToolTipContent, {
|
|
39
|
+
description: formatMessage(messages.table),
|
|
40
|
+
keymap: toggleTable
|
|
41
|
+
}) : formatMessage(messages.table)
|
|
38
42
|
}, /*#__PURE__*/React.createElement(ToolbarButton, {
|
|
39
43
|
iconBefore: /*#__PURE__*/React.createElement(TableIcon, {
|
|
40
44
|
label: formatMessage(messages.table),
|
|
41
45
|
size: "small"
|
|
42
46
|
}),
|
|
43
47
|
onClick: onClick,
|
|
44
|
-
ariaKeyshortcuts:
|
|
48
|
+
ariaKeyshortcuts: getAriaKeyshortcuts(toggleTable)
|
|
45
49
|
}));
|
|
46
50
|
};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useIntl } from 'react-intl-next';
|
|
3
3
|
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
|
+
import { ToolTipContent, insertTaskList } from '@atlaskit/editor-common/keymaps';
|
|
4
5
|
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
5
6
|
import { useEditorToolbar } from '@atlaskit/editor-common/toolbar';
|
|
6
7
|
import { ToolbarButton, ToolbarTooltip, TaskIcon } from '@atlaskit/editor-toolbar';
|
|
8
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
7
9
|
export var TaskListButton = function TaskListButton(_ref) {
|
|
8
10
|
var api = _ref.api;
|
|
9
11
|
var _useIntl = useIntl(),
|
|
@@ -22,7 +24,10 @@ export var TaskListButton = function TaskListButton(_ref) {
|
|
|
22
24
|
}
|
|
23
25
|
};
|
|
24
26
|
return /*#__PURE__*/React.createElement(ToolbarTooltip, {
|
|
25
|
-
content:
|
|
27
|
+
content: expValEquals('platform_editor_toolbar_aifc_patch_6', 'isEnabled', true) ? /*#__PURE__*/React.createElement(ToolTipContent, {
|
|
28
|
+
description: formatMessage(messages.action),
|
|
29
|
+
keymap: insertTaskList
|
|
30
|
+
}) : formatMessage(messages.action)
|
|
26
31
|
}, /*#__PURE__*/React.createElement(ToolbarButton, {
|
|
27
32
|
iconBefore: /*#__PURE__*/React.createElement(TaskIcon, {
|
|
28
33
|
label: formatMessage(messages.action),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-insert-block",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.7",
|
|
4
4
|
"description": "Insert block plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"@atlaskit/editor-plugin-type-ahead": "^6.2.0",
|
|
59
59
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
60
60
|
"@atlaskit/editor-shared-styles": "^3.6.0",
|
|
61
|
-
"@atlaskit/editor-toolbar": "^0.
|
|
61
|
+
"@atlaskit/editor-toolbar": "^0.14.0",
|
|
62
62
|
"@atlaskit/editor-toolbar-model": "^0.2.0",
|
|
63
63
|
"@atlaskit/emoji": "^69.5.0",
|
|
64
64
|
"@atlaskit/heading": "^5.2.0",
|