@atlaskit/editor-common 134.9.3 → 134.10.1
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 +27 -0
- package/dist/cjs/link/ConfigureLinkOverlay/Dropdown.js +6 -6
- package/dist/cjs/mark/getHadMarkAttributes.js +0 -5
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/quick-insert/getQuickInsertSearchPriority.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui/Popup/utils.js +22 -5
- package/dist/es2019/link/ConfigureLinkOverlay/Dropdown.js +3 -3
- package/dist/es2019/mark/getHadMarkAttributes.js +0 -5
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/quick-insert/getQuickInsertSearchPriority.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui/Popup/utils.js +22 -5
- package/dist/esm/link/ConfigureLinkOverlay/Dropdown.js +3 -3
- package/dist/esm/mark/getHadMarkAttributes.js +0 -5
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/quick-insert/getQuickInsertSearchPriority.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui/Popup/utils.js +22 -5
- package/dist/types/mark/getHadMarkAttributes.d.ts +0 -1
- package/package.json +7 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 134.10.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`4ff087c29f9e4`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4ff087c29f9e4) -
|
|
8
|
+
Prioritize Remix slash commands for remix and chart searches under cc_remix_slash_commands
|
|
9
|
+
- [`c17aea7934635`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c17aea7934635) -
|
|
10
|
+
Use named dropdown-menu imports.
|
|
11
|
+
- [`8092be2405d78`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8092be2405d78) -
|
|
12
|
+
Remove the retired text colour tracking kill switch while preserving mark analytics attributes.
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
15
|
+
## 134.10.0
|
|
16
|
+
|
|
17
|
+
### Minor Changes
|
|
18
|
+
|
|
19
|
+
- [`77aeba2398de1`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/77aeba2398de1) -
|
|
20
|
+
Update i18n NPM package versions for editor,editor-extensions,activity-platform,media,elements
|
|
21
|
+
(Group 3)
|
|
22
|
+
- [`969bc780b9fda`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/969bc780b9fda) -
|
|
23
|
+
Keep the top of editor popups that are taller than the visible scroll area inside it (pinned below
|
|
24
|
+
the visible top) behind platform_editor_popup_clamp_to_scroll_area
|
|
25
|
+
|
|
26
|
+
### Patch Changes
|
|
27
|
+
|
|
28
|
+
- Updated dependencies
|
|
29
|
+
|
|
3
30
|
## 134.9.3
|
|
4
31
|
|
|
5
32
|
### Patch Changes
|
|
@@ -11,9 +11,9 @@ var _react = require("react");
|
|
|
11
11
|
var _react2 = require("@emotion/react");
|
|
12
12
|
var _reactIntl = require("react-intl");
|
|
13
13
|
var _withAnalyticsContext = _interopRequireDefault(require("@atlaskit/analytics-next/withAnalyticsContext"));
|
|
14
|
-
var _dropdownMenu =
|
|
15
|
-
var _dropdownMenuItem =
|
|
16
|
-
var _dropdownMenuItemGroup =
|
|
14
|
+
var _dropdownMenu = require("@atlaskit/dropdown-menu/dropdown-menu");
|
|
15
|
+
var _dropdownMenuItem = require("@atlaskit/dropdown-menu/dropdown-menu-item");
|
|
16
|
+
var _dropdownMenuItemGroup = require("@atlaskit/dropdown-menu/dropdown-menu-item-group");
|
|
17
17
|
var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/core/chevron-down"));
|
|
18
18
|
var _customize = _interopRequireDefault(require("@atlaskit/icon/core/customize"));
|
|
19
19
|
var _linkExternal = _interopRequireDefault(require("@atlaskit/icon/core/link-external"));
|
|
@@ -93,7 +93,7 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
93
93
|
}
|
|
94
94
|
}));
|
|
95
95
|
}, [configureLinkLabel, fireLinkClickEvent]);
|
|
96
|
-
return (0, _react2.jsx)(_dropdownMenu.
|
|
96
|
+
return (0, _react2.jsx)(_dropdownMenu.DropdownMenu, {
|
|
97
97
|
trigger: (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_perf_lint_cleanup') ? memoizedTrigger : function (_ref4) {
|
|
98
98
|
var _onClick2 = _ref4.onClick,
|
|
99
99
|
triggerRef = _ref4.triggerRef,
|
|
@@ -117,13 +117,13 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
117
117
|
},
|
|
118
118
|
testId: "".concat(testId, "-dropdown"),
|
|
119
119
|
onOpenChange: onOpenChange
|
|
120
|
-
}, (0, _react2.jsx)(_dropdownMenuItemGroup.
|
|
120
|
+
}, (0, _react2.jsx)(_dropdownMenuItemGroup.DropdownItemGroup, null, (0, _react2.jsx)(_dropdownMenuItem.DropdownItem, {
|
|
121
121
|
elemBefore: (0, _react2.jsx)(_linkExternal.default, {
|
|
122
122
|
label: goToLinkLabel
|
|
123
123
|
}),
|
|
124
124
|
testId: "".concat(testId, "-dropdown-item-open-link"),
|
|
125
125
|
onClick: onGoToLinkClick
|
|
126
|
-
}, goToLinkLabel), (0, _react2.jsx)(_dropdownMenuItem.
|
|
126
|
+
}, goToLinkLabel), (0, _react2.jsx)(_dropdownMenuItem.DropdownItem, {
|
|
127
127
|
elemBefore: (0, _react2.jsx)(_customize.default, {
|
|
128
128
|
label: configureLinkLabel
|
|
129
129
|
}),
|
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.getHadMarkAttributes = void 0;
|
|
7
|
-
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
8
7
|
var _anyMarksActiveFromTr = require("./anyMarksActiveFromTr");
|
|
9
8
|
var HAD_ATTRIBUTE = {
|
|
10
9
|
backgroundColor: 'hadBackgroundColor',
|
|
@@ -17,12 +16,8 @@ var isMarkName = function isMarkName(name) {
|
|
|
17
16
|
|
|
18
17
|
/**
|
|
19
18
|
* `had*` flags for color / highlight / link apply events.
|
|
20
|
-
* Kill switch `platform_editor_add_text_color_tracking`: gate on, new attributes off.
|
|
21
19
|
*/
|
|
22
20
|
var getHadMarkAttributes = exports.getHadMarkAttributes = function getHadMarkAttributes(tr, markTypes) {
|
|
23
|
-
if ((0, _fg.fg)('platform_editor_add_text_color_tracking')) {
|
|
24
|
-
return {};
|
|
25
|
-
}
|
|
26
21
|
var definedMarkTypes = markTypes.filter(function (markType) {
|
|
27
22
|
return !!markType;
|
|
28
23
|
});
|
|
@@ -27,7 +27,7 @@ var NETWORK_FAILURE_REGEX = /^network failure/i;
|
|
|
27
27
|
var RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
|
|
28
28
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
29
29
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
30
|
-
var packageVersion = "134.
|
|
30
|
+
var packageVersion = "134.10.0";
|
|
31
31
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
32
32
|
// Remove URL as it has UGC
|
|
33
33
|
// Ignored via go/ees007
|
|
@@ -16,7 +16,7 @@ var _keys = require("./keys");
|
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
18
|
var SKILL_MENU_ITEM_KEY_PREFIX = (0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)('skill:');
|
|
19
|
-
var RECOMMENDED_ITEM_KEYS_BY_QUERY = [['a', [_keys.ASK_ROVO_MENU_ITEM.key, _keys.ACTION_MENU_ITEM.key, _keys.ASSETS_MENU_ITEM.key]], ['b', [(0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)('blog-posts:blog-posts'), (0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)('snippet-extension:block-template'), (0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)(_keys.BRAINSTORMING_MENU_ITEM.key)]], ['c', [_keys.CODE_BLOCK_MENU_ITEM.key, (0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)('cards:quick-insert'), (0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)(_keys.JIRA_ISSUE_MENU_ITEM.key)]], ['d', [_keys.DATE_MENU_ITEM.key, _keys.DECISION_MENU_ITEM.key, _keys.RULE_MENU_ITEM.key]], ['e', [_keys.EMOJI_MENU_ITEM.key, _keys.EXPAND_MENU_ITEM.key, (0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)('third-party-quick-insert-embeds:embed')]], ['f', [_keys.INFO_PANEL_MENU_ITEM.key, (0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)(_keys.FLOWCHART_MENU_ITEM.key), (0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)('third-party-quick-insert-embeds:third-party-embed-figma')]], ['g', [_keys.WARNING_PANEL_MENU_ITEM.key, (0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)('third-party-quick-insert-embeds:third-party-embed-google-drive')]], ['h', [_keys.HEADING_2_MENU_ITEM.key, _keys.HEADING_3_MENU_ITEM.key, _keys.HEADING_4_MENU_ITEM.key]], ['i', [_keys.MEDIA_INSERT_MENU_ITEM.key, _keys.INFO_PANEL_MENU_ITEM.key, (0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)('iframe:iframe')]], ['j', [_keys.JIRA_WORK_ITEMS_MENU_ITEM.key, (0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)('jirachart:jirachart'), (0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)(_keys.JIRA_ISSUE_MENU_ITEM.key)]], ['l', [_keys.LOOM_MENU_ITEM.key, _keys.HYPERLINK_MENU_ITEM.key, _keys.TWO_COLUMNS_LAYOUT_MENU_ITEM.key]], ['n', [_keys.ORDERED_LIST_MENU_ITEM.key, _keys.NOTE_PANEL_MENU_ITEM.key, _keys.SYNCED_BLOCK_MENU_ITEM.key]], ['p', [_keys.INFO_PANEL_MENU_ITEM.key, _keys.SUCCESS_PANEL_MENU_ITEM.key, _keys.WARNING_PANEL_MENU_ITEM.key, _keys.NOTE_PANEL_MENU_ITEM.key, _keys.CUSTOM_PANEL_MENU_ITEM.key]], ['q', [_keys.BLOCKQUOTE_MENU_ITEM.key, (0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)('questionslist-macro-native:questionslist-macro-native')]], ['r', [(0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)(_keys.RETROSPECTIVE_MENU_ITEM.key), (0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)(_keys.ROADMAP_MENU_ITEM.key), (0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)('skill:response-draft')]], ['s', [_keys.STATUS_MENU_ITEM.key, _keys.SUCCESS_PANEL_MENU_ITEM.key, (0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)('spotlight:quick-insert')]], ['t', [_keys.TABLE_MENU_ITEM.key, (0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)(_keys.TABS_MENU_ITEM.key), (0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)('toc:toc')]], ['w', [(0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)(_keys.WHITEBOARD_MENU_ITEM.key), _keys.WARNING_PANEL_MENU_ITEM.key, (0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)('skill:write-prd')]], ['x', [_keys.EXPAND_MENU_ITEM.key, (0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)('excerpt:excerpt'), (0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)('skill:explain-workflow')]], ['y', [_keys.SYNCED_BLOCK_MENU_ITEM.key, _keys.TWO_COLUMNS_LAYOUT_MENU_ITEM.key, _keys.THREE_COLUMNS_LAYOUT_MENU_ITEM.key]], ['co', [_keys.CODE_BLOCK_MENU_ITEM.key, _keys.TWO_COLUMNS_LAYOUT_MENU_ITEM.key, _keys.THREE_COLUMNS_LAYOUT_MENU_ITEM.key, _keys.FOUR_COLUMNS_LAYOUT_MENU_ITEM.key, _keys.FIVE_COLUMNS_LAYOUT_MENU_ITEM.key]], ['pa', [_keys.INFO_PANEL_MENU_ITEM.key, _keys.NOTE_PANEL_MENU_ITEM.key, _keys.ERROR_PANEL_MENU_ITEM.key, _keys.SUCCESS_PANEL_MENU_ITEM.key, _keys.CUSTOM_PANEL_MENU_ITEM.key, _keys.EXPAND_MENU_ITEM.key]], ['pan', [_keys.INFO_PANEL_MENU_ITEM.key, _keys.NOTE_PANEL_MENU_ITEM.key, _keys.ERROR_PANEL_MENU_ITEM.key, _keys.SUCCESS_PANEL_MENU_ITEM.key, _keys.CUSTOM_PANEL_MENU_ITEM.key, _keys.EXPAND_MENU_ITEM.key]], ['ex', [_keys.EXPAND_MENU_ITEM.key, (0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)('excerpt:excerpt'), (0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)('skill:explain-workflow')]], ['la', [_keys.TWO_COLUMNS_LAYOUT_MENU_ITEM.key, _keys.THREE_COLUMNS_LAYOUT_MENU_ITEM.key, _keys.FOUR_COLUMNS_LAYOUT_MENU_ITEM.key, _keys.FIVE_COLUMNS_LAYOUT_MENU_ITEM.key]], ['he', [_keys.HEADING_4_MENU_ITEM.key, _keys.HEADING_6_MENU_ITEM.key, _keys.HEADING_1_MENU_ITEM.key, _keys.HEADING_2_MENU_ITEM.key, _keys.HEADING_3_MENU_ITEM.key, _keys.HEADING_5_MENU_ITEM.key]], ['ac', [_keys.ACTION_MENU_ITEM.key, (0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)('com.atlassian.streams.streams-jira-plugin:activitystream-gadget')]], ['act', [_keys.ACTION_MENU_ITEM.key, (0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)('com.atlassian.streams.streams-jira-plugin:activitystream-gadget')]], ['che', [_keys.ACTION_MENU_ITEM.key]], ['em', [_keys.EMOJI_MENU_ITEM.key, (0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)('third-party-quick-insert-embeds:embed'), (0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)('database-extension:reference-database')]], ['fi', [_keys.MEDIA_INSERT_MENU_ITEM.key, (0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)('third-party-quick-insert-embeds:third-party-embed-figma'), (0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)('skill:find-similar-incidents')]], ['fil', [_keys.MEDIA_INSERT_MENU_ITEM.key, (0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)('com.atlassian.jira.gadgets:filter-results-gadget')]], ['at', [_keys.MEDIA_INSERT_MENU_ITEM.key]], ['ji', [_keys.JIRA_WORK_ITEMS_MENU_ITEM.key, (0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)(_keys.JIRA_ISSUE_MENU_ITEM.key)]], ['jir', [_keys.JIRA_WORK_ITEMS_MENU_ITEM.key, (0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)(_keys.JIRA_ISSUE_MENU_ITEM.key)]], ['jira', [_keys.JIRA_WORK_ITEMS_MENU_ITEM.key, (0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)(_keys.JIRA_ISSUE_MENU_ITEM.key)]], ['db', [(0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)(_keys.DATABASE_MENU_ITEM.key), (0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)('skill:search-feedback')]], ['wb', [(0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)(_keys.WHITEBOARD_MENU_ITEM.key)]], ['te', [(0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)('snippet-extension:block-template'), (0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)('create-from-template:create-from-template')]], ['tem', [(0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)('snippet-extension:block-template'), (0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)('create-from-template:create-from-template')]]];
|
|
19
|
+
var RECOMMENDED_ITEM_KEYS_BY_QUERY = [['a', [_keys.ASK_ROVO_MENU_ITEM.key, _keys.ACTION_MENU_ITEM.key, _keys.ASSETS_MENU_ITEM.key]], ['b', [(0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)('blog-posts:blog-posts'), (0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)('snippet-extension:block-template'), (0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)(_keys.BRAINSTORMING_MENU_ITEM.key)]], ['c', [_keys.CODE_BLOCK_MENU_ITEM.key, (0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)('cards:quick-insert'), (0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)(_keys.JIRA_ISSUE_MENU_ITEM.key)]], ['d', [_keys.DATE_MENU_ITEM.key, _keys.DECISION_MENU_ITEM.key, _keys.RULE_MENU_ITEM.key]], ['e', [_keys.EMOJI_MENU_ITEM.key, _keys.EXPAND_MENU_ITEM.key, (0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)('third-party-quick-insert-embeds:embed')]], ['f', [_keys.INFO_PANEL_MENU_ITEM.key, (0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)(_keys.FLOWCHART_MENU_ITEM.key), (0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)('third-party-quick-insert-embeds:third-party-embed-figma')]], ['g', [_keys.WARNING_PANEL_MENU_ITEM.key, (0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)('third-party-quick-insert-embeds:third-party-embed-google-drive')]], ['h', [_keys.HEADING_2_MENU_ITEM.key, _keys.HEADING_3_MENU_ITEM.key, _keys.HEADING_4_MENU_ITEM.key]], ['i', [_keys.MEDIA_INSERT_MENU_ITEM.key, _keys.INFO_PANEL_MENU_ITEM.key, (0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)('iframe:iframe')]], ['j', [_keys.JIRA_WORK_ITEMS_MENU_ITEM.key, (0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)('jirachart:jirachart'), (0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)(_keys.JIRA_ISSUE_MENU_ITEM.key)]], ['l', [_keys.LOOM_MENU_ITEM.key, _keys.HYPERLINK_MENU_ITEM.key, _keys.TWO_COLUMNS_LAYOUT_MENU_ITEM.key]], ['n', [_keys.ORDERED_LIST_MENU_ITEM.key, _keys.NOTE_PANEL_MENU_ITEM.key, _keys.SYNCED_BLOCK_MENU_ITEM.key]], ['p', [_keys.INFO_PANEL_MENU_ITEM.key, _keys.SUCCESS_PANEL_MENU_ITEM.key, _keys.WARNING_PANEL_MENU_ITEM.key, _keys.NOTE_PANEL_MENU_ITEM.key, _keys.CUSTOM_PANEL_MENU_ITEM.key]], ['q', [_keys.BLOCKQUOTE_MENU_ITEM.key, (0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)('questionslist-macro-native:questionslist-macro-native')]], ['r', [(0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)(_keys.RETROSPECTIVE_MENU_ITEM.key), (0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)(_keys.ROADMAP_MENU_ITEM.key), (0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)('skill:response-draft')]], ['s', [_keys.STATUS_MENU_ITEM.key, _keys.SUCCESS_PANEL_MENU_ITEM.key, (0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)('spotlight:quick-insert')]], ['t', [_keys.TABLE_MENU_ITEM.key, (0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)(_keys.TABS_MENU_ITEM.key), (0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)('toc:toc')]], ['w', [(0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)(_keys.WHITEBOARD_MENU_ITEM.key), _keys.WARNING_PANEL_MENU_ITEM.key, (0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)('skill:write-prd')]], ['x', [_keys.EXPAND_MENU_ITEM.key, (0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)('excerpt:excerpt'), (0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)('skill:explain-workflow')]], ['y', [_keys.SYNCED_BLOCK_MENU_ITEM.key, _keys.TWO_COLUMNS_LAYOUT_MENU_ITEM.key, _keys.THREE_COLUMNS_LAYOUT_MENU_ITEM.key]], ['co', [_keys.CODE_BLOCK_MENU_ITEM.key, _keys.TWO_COLUMNS_LAYOUT_MENU_ITEM.key, _keys.THREE_COLUMNS_LAYOUT_MENU_ITEM.key, _keys.FOUR_COLUMNS_LAYOUT_MENU_ITEM.key, _keys.FIVE_COLUMNS_LAYOUT_MENU_ITEM.key]], ['pa', [_keys.INFO_PANEL_MENU_ITEM.key, _keys.NOTE_PANEL_MENU_ITEM.key, _keys.ERROR_PANEL_MENU_ITEM.key, _keys.SUCCESS_PANEL_MENU_ITEM.key, _keys.CUSTOM_PANEL_MENU_ITEM.key, _keys.EXPAND_MENU_ITEM.key]], ['pan', [_keys.INFO_PANEL_MENU_ITEM.key, _keys.NOTE_PANEL_MENU_ITEM.key, _keys.ERROR_PANEL_MENU_ITEM.key, _keys.SUCCESS_PANEL_MENU_ITEM.key, _keys.CUSTOM_PANEL_MENU_ITEM.key, _keys.EXPAND_MENU_ITEM.key]], ['ex', [_keys.EXPAND_MENU_ITEM.key, (0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)('excerpt:excerpt'), (0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)('skill:explain-workflow')]], ['la', [_keys.TWO_COLUMNS_LAYOUT_MENU_ITEM.key, _keys.THREE_COLUMNS_LAYOUT_MENU_ITEM.key, _keys.FOUR_COLUMNS_LAYOUT_MENU_ITEM.key, _keys.FIVE_COLUMNS_LAYOUT_MENU_ITEM.key]], ['he', [_keys.HEADING_4_MENU_ITEM.key, _keys.HEADING_6_MENU_ITEM.key, _keys.HEADING_1_MENU_ITEM.key, _keys.HEADING_2_MENU_ITEM.key, _keys.HEADING_3_MENU_ITEM.key, _keys.HEADING_5_MENU_ITEM.key]], ['ac', [_keys.ACTION_MENU_ITEM.key, (0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)('com.atlassian.streams.streams-jira-plugin:activitystream-gadget')]], ['act', [_keys.ACTION_MENU_ITEM.key, (0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)('com.atlassian.streams.streams-jira-plugin:activitystream-gadget')]], ['che', [_keys.ACTION_MENU_ITEM.key]], ['em', [_keys.EMOJI_MENU_ITEM.key, (0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)('third-party-quick-insert-embeds:embed'), (0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)('database-extension:reference-database')]], ['fi', [_keys.MEDIA_INSERT_MENU_ITEM.key, (0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)('third-party-quick-insert-embeds:third-party-embed-figma'), (0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)('skill:find-similar-incidents')]], ['fil', [_keys.MEDIA_INSERT_MENU_ITEM.key, (0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)('com.atlassian.jira.gadgets:filter-results-gadget')]], ['at', [_keys.MEDIA_INSERT_MENU_ITEM.key]], ['ji', [_keys.JIRA_WORK_ITEMS_MENU_ITEM.key, (0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)(_keys.JIRA_ISSUE_MENU_ITEM.key)]], ['jir', [_keys.JIRA_WORK_ITEMS_MENU_ITEM.key, (0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)(_keys.JIRA_ISSUE_MENU_ITEM.key)]], ['jira', [_keys.JIRA_WORK_ITEMS_MENU_ITEM.key, (0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)(_keys.JIRA_ISSUE_MENU_ITEM.key)]], ['remix', [(0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)('remix-slash:bar-chart'), (0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)('remix-slash:line-chart'), (0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)('remix-slash:infographic'), (0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)('remix-slash:flip-card')]], ['db', [(0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)(_keys.DATABASE_MENU_ITEM.key), (0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)('skill:search-feedback')]], ['wb', [(0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)(_keys.WHITEBOARD_MENU_ITEM.key)]], ['te', [(0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)('snippet-extension:block-template'), (0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)('create-from-template:create-from-template')]], ['tem', [(0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)('snippet-extension:block-template'), (0, _getQuickInsertProviderMenuItemKey.getQuickInsertProviderMenuItemKey)('create-from-template:create-from-template')]]];
|
|
20
20
|
var createRecommendationResolver = function createRecommendationResolver(itemKeys) {
|
|
21
21
|
return function (itemKey) {
|
|
22
22
|
var index = itemKeys.indexOf(itemKey);
|
|
@@ -23,7 +23,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
23
23
|
* @jsx jsx
|
|
24
24
|
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
25
25
|
var packageName = "@atlaskit/editor-common";
|
|
26
|
-
var packageVersion = "134.
|
|
26
|
+
var packageVersion = "134.10.0";
|
|
27
27
|
var halfFocusRing = 1;
|
|
28
28
|
var dropOffset = '0, 8';
|
|
29
29
|
// Ignored via go/ees005
|
|
@@ -29,6 +29,7 @@ Object.defineProperty(exports, "validatePosition", {
|
|
|
29
29
|
});
|
|
30
30
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
31
31
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
32
|
+
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
32
33
|
var _isBody = require("./isBody");
|
|
33
34
|
var _isTextNode = require("./isTextNode");
|
|
34
35
|
var _validatePosition = require("./validatePosition");
|
|
@@ -180,6 +181,13 @@ var getPopupXInsideParent = function getPopupXInsideParent(x, popupClientWidth,
|
|
|
180
181
|
// prevent going too far left
|
|
181
182
|
return Math.max(minPopupMargin, x);
|
|
182
183
|
};
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* Lifts a bottom-placed popup that would run past the visible bottom of its scroll parent so its
|
|
187
|
+
* bottom sits `offset` above that edge. Under `platform_editor_popup_clamp_to_scroll_area`, a popup
|
|
188
|
+
* taller than the visible area is instead pinned `offset` below the visible top, so its start (for
|
|
189
|
+
* the link picker, the URL field) is never clipped; its bottom may extend past the visible area.
|
|
190
|
+
*/
|
|
183
191
|
var calculateVerticalStickBottom = function calculateVerticalStickBottom(_ref2) {
|
|
184
192
|
var target = _ref2.target,
|
|
185
193
|
targetTop = _ref2.targetTop,
|
|
@@ -192,13 +200,22 @@ var calculateVerticalStickBottom = function calculateVerticalStickBottom(_ref2)
|
|
|
192
200
|
var scrollParent = scrollableElement || findOverflowScrollParent(target) || boundariesElement;
|
|
193
201
|
var newPos = _objectSpread({}, position);
|
|
194
202
|
if (scrollParent) {
|
|
203
|
+
var margin = offset[1];
|
|
204
|
+
var visibleHeight = scrollParent.clientHeight;
|
|
195
205
|
var topOffsetTop = targetTop - scrollParent.getBoundingClientRect().top;
|
|
196
206
|
var targetEnd = targetHeight + topOffsetTop;
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
var
|
|
200
|
-
|
|
201
|
-
|
|
207
|
+
var popupHeight = popup.clientHeight;
|
|
208
|
+
if (visibleHeight - targetEnd <= popupHeight + margin * 2 && topOffsetTop < visibleHeight) {
|
|
209
|
+
var scroll = targetEnd - visibleHeight + margin * 2;
|
|
210
|
+
var liftedTop = (newPos.top || 0) - (scroll + popupHeight);
|
|
211
|
+
// Lifting only clips the popup once its top would pass the visible top.
|
|
212
|
+
var liftsAboveVisibleTop = popupHeight > visibleHeight - margin;
|
|
213
|
+
if (liftsAboveVisibleTop && (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_popup_clamp_to_scroll_area')) {
|
|
214
|
+
var scrollAreaTop = liftedTop + popupHeight + margin - visibleHeight;
|
|
215
|
+
newPos.top = scrollAreaTop + margin;
|
|
216
|
+
} else {
|
|
217
|
+
newPos.top = liftedTop;
|
|
218
|
+
}
|
|
202
219
|
}
|
|
203
220
|
}
|
|
204
221
|
return newPos;
|
|
@@ -8,9 +8,9 @@ import { useCallback } from 'react';
|
|
|
8
8
|
import { jsx } from '@emotion/react';
|
|
9
9
|
import { useIntl } from 'react-intl';
|
|
10
10
|
import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext';
|
|
11
|
-
import DropdownMenu from '@atlaskit/dropdown-menu/dropdown-menu';
|
|
12
|
-
import DropdownItem from '@atlaskit/dropdown-menu/dropdown-menu-item';
|
|
13
|
-
import DropdownItemGroup from '@atlaskit/dropdown-menu/dropdown-menu-item-group';
|
|
11
|
+
import { DropdownMenu } from '@atlaskit/dropdown-menu/dropdown-menu';
|
|
12
|
+
import { DropdownItem } from '@atlaskit/dropdown-menu/dropdown-menu-item';
|
|
13
|
+
import { DropdownItemGroup } from '@atlaskit/dropdown-menu/dropdown-menu-item-group';
|
|
14
14
|
import ChevronDownIcon from '@atlaskit/icon/core/chevron-down';
|
|
15
15
|
import PreferencesIcon from '@atlaskit/icon/core/customize';
|
|
16
16
|
import LinkExternalIcon from '@atlaskit/icon/core/link-external';
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
2
1
|
import { anyMarksActiveFromTr } from './anyMarksActiveFromTr';
|
|
3
2
|
const HAD_ATTRIBUTE = {
|
|
4
3
|
backgroundColor: 'hadBackgroundColor',
|
|
@@ -9,12 +8,8 @@ const isMarkName = name => name in HAD_ATTRIBUTE;
|
|
|
9
8
|
|
|
10
9
|
/**
|
|
11
10
|
* `had*` flags for color / highlight / link apply events.
|
|
12
|
-
* Kill switch `platform_editor_add_text_color_tracking`: gate on, new attributes off.
|
|
13
11
|
*/
|
|
14
12
|
export const getHadMarkAttributes = (tr, markTypes) => {
|
|
15
|
-
if (fg('platform_editor_add_text_color_tracking')) {
|
|
16
|
-
return {};
|
|
17
|
-
}
|
|
18
13
|
const definedMarkTypes = markTypes.filter(markType => !!markType);
|
|
19
14
|
const found = anyMarksActiveFromTr(tr, definedMarkTypes);
|
|
20
15
|
const result = {};
|
|
@@ -13,7 +13,7 @@ const NETWORK_FAILURE_REGEX = /^network failure/i;
|
|
|
13
13
|
const RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
|
|
14
14
|
const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
15
15
|
const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
16
|
-
const packageVersion = "134.
|
|
16
|
+
const packageVersion = "134.10.0";
|
|
17
17
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
18
18
|
// Remove URL as it has UGC
|
|
19
19
|
// Ignored via go/ees007
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import { getQuickInsertProviderMenuItemKey } from './getQuickInsertProviderMenuItemKey';
|
|
7
7
|
import { ACTION_MENU_ITEM, ASK_ROVO_MENU_ITEM, ASSETS_MENU_ITEM, BLOCKQUOTE_MENU_ITEM, BRAINSTORMING_MENU_ITEM, CODE_BLOCK_MENU_ITEM, CUSTOM_PANEL_MENU_ITEM, DATABASE_MENU_ITEM, DATE_MENU_ITEM, DECISION_MENU_ITEM, EMOJI_MENU_ITEM, ERROR_PANEL_MENU_ITEM, EXPAND_MENU_ITEM, FIVE_COLUMNS_LAYOUT_MENU_ITEM, FLOWCHART_MENU_ITEM, FOUR_COLUMNS_LAYOUT_MENU_ITEM, HEADING_1_MENU_ITEM, HEADING_2_MENU_ITEM, HEADING_3_MENU_ITEM, HEADING_4_MENU_ITEM, HEADING_5_MENU_ITEM, HEADING_6_MENU_ITEM, HYPERLINK_MENU_ITEM, INFO_PANEL_MENU_ITEM, JIRA_ISSUE_MENU_ITEM, JIRA_WORK_ITEMS_MENU_ITEM, LOOM_MENU_ITEM, MEDIA_INSERT_MENU_ITEM, NOTE_PANEL_MENU_ITEM, ORDERED_LIST_MENU_ITEM, ROADMAP_MENU_ITEM, RETROSPECTIVE_MENU_ITEM, RULE_MENU_ITEM, STATUS_MENU_ITEM, SUCCESS_PANEL_MENU_ITEM, SYNCED_BLOCK_MENU_ITEM, TABLE_MENU_ITEM, TABS_MENU_ITEM, THREE_COLUMNS_LAYOUT_MENU_ITEM, TWO_COLUMNS_LAYOUT_MENU_ITEM, WARNING_PANEL_MENU_ITEM, WHITEBOARD_MENU_ITEM } from './keys';
|
|
8
8
|
const SKILL_MENU_ITEM_KEY_PREFIX = getQuickInsertProviderMenuItemKey('skill:');
|
|
9
|
-
const RECOMMENDED_ITEM_KEYS_BY_QUERY = [['a', [ASK_ROVO_MENU_ITEM.key, ACTION_MENU_ITEM.key, ASSETS_MENU_ITEM.key]], ['b', [getQuickInsertProviderMenuItemKey('blog-posts:blog-posts'), getQuickInsertProviderMenuItemKey('snippet-extension:block-template'), getQuickInsertProviderMenuItemKey(BRAINSTORMING_MENU_ITEM.key)]], ['c', [CODE_BLOCK_MENU_ITEM.key, getQuickInsertProviderMenuItemKey('cards:quick-insert'), getQuickInsertProviderMenuItemKey(JIRA_ISSUE_MENU_ITEM.key)]], ['d', [DATE_MENU_ITEM.key, DECISION_MENU_ITEM.key, RULE_MENU_ITEM.key]], ['e', [EMOJI_MENU_ITEM.key, EXPAND_MENU_ITEM.key, getQuickInsertProviderMenuItemKey('third-party-quick-insert-embeds:embed')]], ['f', [INFO_PANEL_MENU_ITEM.key, getQuickInsertProviderMenuItemKey(FLOWCHART_MENU_ITEM.key), getQuickInsertProviderMenuItemKey('third-party-quick-insert-embeds:third-party-embed-figma')]], ['g', [WARNING_PANEL_MENU_ITEM.key, getQuickInsertProviderMenuItemKey('third-party-quick-insert-embeds:third-party-embed-google-drive')]], ['h', [HEADING_2_MENU_ITEM.key, HEADING_3_MENU_ITEM.key, HEADING_4_MENU_ITEM.key]], ['i', [MEDIA_INSERT_MENU_ITEM.key, INFO_PANEL_MENU_ITEM.key, getQuickInsertProviderMenuItemKey('iframe:iframe')]], ['j', [JIRA_WORK_ITEMS_MENU_ITEM.key, getQuickInsertProviderMenuItemKey('jirachart:jirachart'), getQuickInsertProviderMenuItemKey(JIRA_ISSUE_MENU_ITEM.key)]], ['l', [LOOM_MENU_ITEM.key, HYPERLINK_MENU_ITEM.key, TWO_COLUMNS_LAYOUT_MENU_ITEM.key]], ['n', [ORDERED_LIST_MENU_ITEM.key, NOTE_PANEL_MENU_ITEM.key, SYNCED_BLOCK_MENU_ITEM.key]], ['p', [INFO_PANEL_MENU_ITEM.key, SUCCESS_PANEL_MENU_ITEM.key, WARNING_PANEL_MENU_ITEM.key, NOTE_PANEL_MENU_ITEM.key, CUSTOM_PANEL_MENU_ITEM.key]], ['q', [BLOCKQUOTE_MENU_ITEM.key, getQuickInsertProviderMenuItemKey('questionslist-macro-native:questionslist-macro-native')]], ['r', [getQuickInsertProviderMenuItemKey(RETROSPECTIVE_MENU_ITEM.key), getQuickInsertProviderMenuItemKey(ROADMAP_MENU_ITEM.key), getQuickInsertProviderMenuItemKey('skill:response-draft')]], ['s', [STATUS_MENU_ITEM.key, SUCCESS_PANEL_MENU_ITEM.key, getQuickInsertProviderMenuItemKey('spotlight:quick-insert')]], ['t', [TABLE_MENU_ITEM.key, getQuickInsertProviderMenuItemKey(TABS_MENU_ITEM.key), getQuickInsertProviderMenuItemKey('toc:toc')]], ['w', [getQuickInsertProviderMenuItemKey(WHITEBOARD_MENU_ITEM.key), WARNING_PANEL_MENU_ITEM.key, getQuickInsertProviderMenuItemKey('skill:write-prd')]], ['x', [EXPAND_MENU_ITEM.key, getQuickInsertProviderMenuItemKey('excerpt:excerpt'), getQuickInsertProviderMenuItemKey('skill:explain-workflow')]], ['y', [SYNCED_BLOCK_MENU_ITEM.key, TWO_COLUMNS_LAYOUT_MENU_ITEM.key, THREE_COLUMNS_LAYOUT_MENU_ITEM.key]], ['co', [CODE_BLOCK_MENU_ITEM.key, TWO_COLUMNS_LAYOUT_MENU_ITEM.key, THREE_COLUMNS_LAYOUT_MENU_ITEM.key, FOUR_COLUMNS_LAYOUT_MENU_ITEM.key, FIVE_COLUMNS_LAYOUT_MENU_ITEM.key]], ['pa', [INFO_PANEL_MENU_ITEM.key, NOTE_PANEL_MENU_ITEM.key, ERROR_PANEL_MENU_ITEM.key, SUCCESS_PANEL_MENU_ITEM.key, CUSTOM_PANEL_MENU_ITEM.key, EXPAND_MENU_ITEM.key]], ['pan', [INFO_PANEL_MENU_ITEM.key, NOTE_PANEL_MENU_ITEM.key, ERROR_PANEL_MENU_ITEM.key, SUCCESS_PANEL_MENU_ITEM.key, CUSTOM_PANEL_MENU_ITEM.key, EXPAND_MENU_ITEM.key]], ['ex', [EXPAND_MENU_ITEM.key, getQuickInsertProviderMenuItemKey('excerpt:excerpt'), getQuickInsertProviderMenuItemKey('skill:explain-workflow')]], ['la', [TWO_COLUMNS_LAYOUT_MENU_ITEM.key, THREE_COLUMNS_LAYOUT_MENU_ITEM.key, FOUR_COLUMNS_LAYOUT_MENU_ITEM.key, FIVE_COLUMNS_LAYOUT_MENU_ITEM.key]], ['he', [HEADING_4_MENU_ITEM.key, HEADING_6_MENU_ITEM.key, HEADING_1_MENU_ITEM.key, HEADING_2_MENU_ITEM.key, HEADING_3_MENU_ITEM.key, HEADING_5_MENU_ITEM.key]], ['ac', [ACTION_MENU_ITEM.key, getQuickInsertProviderMenuItemKey('com.atlassian.streams.streams-jira-plugin:activitystream-gadget')]], ['act', [ACTION_MENU_ITEM.key, getQuickInsertProviderMenuItemKey('com.atlassian.streams.streams-jira-plugin:activitystream-gadget')]], ['che', [ACTION_MENU_ITEM.key]], ['em', [EMOJI_MENU_ITEM.key, getQuickInsertProviderMenuItemKey('third-party-quick-insert-embeds:embed'), getQuickInsertProviderMenuItemKey('database-extension:reference-database')]], ['fi', [MEDIA_INSERT_MENU_ITEM.key, getQuickInsertProviderMenuItemKey('third-party-quick-insert-embeds:third-party-embed-figma'), getQuickInsertProviderMenuItemKey('skill:find-similar-incidents')]], ['fil', [MEDIA_INSERT_MENU_ITEM.key, getQuickInsertProviderMenuItemKey('com.atlassian.jira.gadgets:filter-results-gadget')]], ['at', [MEDIA_INSERT_MENU_ITEM.key]], ['ji', [JIRA_WORK_ITEMS_MENU_ITEM.key, getQuickInsertProviderMenuItemKey(JIRA_ISSUE_MENU_ITEM.key)]], ['jir', [JIRA_WORK_ITEMS_MENU_ITEM.key, getQuickInsertProviderMenuItemKey(JIRA_ISSUE_MENU_ITEM.key)]], ['jira', [JIRA_WORK_ITEMS_MENU_ITEM.key, getQuickInsertProviderMenuItemKey(JIRA_ISSUE_MENU_ITEM.key)]], ['db', [getQuickInsertProviderMenuItemKey(DATABASE_MENU_ITEM.key), getQuickInsertProviderMenuItemKey('skill:search-feedback')]], ['wb', [getQuickInsertProviderMenuItemKey(WHITEBOARD_MENU_ITEM.key)]], ['te', [getQuickInsertProviderMenuItemKey('snippet-extension:block-template'), getQuickInsertProviderMenuItemKey('create-from-template:create-from-template')]], ['tem', [getQuickInsertProviderMenuItemKey('snippet-extension:block-template'), getQuickInsertProviderMenuItemKey('create-from-template:create-from-template')]]];
|
|
9
|
+
const RECOMMENDED_ITEM_KEYS_BY_QUERY = [['a', [ASK_ROVO_MENU_ITEM.key, ACTION_MENU_ITEM.key, ASSETS_MENU_ITEM.key]], ['b', [getQuickInsertProviderMenuItemKey('blog-posts:blog-posts'), getQuickInsertProviderMenuItemKey('snippet-extension:block-template'), getQuickInsertProviderMenuItemKey(BRAINSTORMING_MENU_ITEM.key)]], ['c', [CODE_BLOCK_MENU_ITEM.key, getQuickInsertProviderMenuItemKey('cards:quick-insert'), getQuickInsertProviderMenuItemKey(JIRA_ISSUE_MENU_ITEM.key)]], ['d', [DATE_MENU_ITEM.key, DECISION_MENU_ITEM.key, RULE_MENU_ITEM.key]], ['e', [EMOJI_MENU_ITEM.key, EXPAND_MENU_ITEM.key, getQuickInsertProviderMenuItemKey('third-party-quick-insert-embeds:embed')]], ['f', [INFO_PANEL_MENU_ITEM.key, getQuickInsertProviderMenuItemKey(FLOWCHART_MENU_ITEM.key), getQuickInsertProviderMenuItemKey('third-party-quick-insert-embeds:third-party-embed-figma')]], ['g', [WARNING_PANEL_MENU_ITEM.key, getQuickInsertProviderMenuItemKey('third-party-quick-insert-embeds:third-party-embed-google-drive')]], ['h', [HEADING_2_MENU_ITEM.key, HEADING_3_MENU_ITEM.key, HEADING_4_MENU_ITEM.key]], ['i', [MEDIA_INSERT_MENU_ITEM.key, INFO_PANEL_MENU_ITEM.key, getQuickInsertProviderMenuItemKey('iframe:iframe')]], ['j', [JIRA_WORK_ITEMS_MENU_ITEM.key, getQuickInsertProviderMenuItemKey('jirachart:jirachart'), getQuickInsertProviderMenuItemKey(JIRA_ISSUE_MENU_ITEM.key)]], ['l', [LOOM_MENU_ITEM.key, HYPERLINK_MENU_ITEM.key, TWO_COLUMNS_LAYOUT_MENU_ITEM.key]], ['n', [ORDERED_LIST_MENU_ITEM.key, NOTE_PANEL_MENU_ITEM.key, SYNCED_BLOCK_MENU_ITEM.key]], ['p', [INFO_PANEL_MENU_ITEM.key, SUCCESS_PANEL_MENU_ITEM.key, WARNING_PANEL_MENU_ITEM.key, NOTE_PANEL_MENU_ITEM.key, CUSTOM_PANEL_MENU_ITEM.key]], ['q', [BLOCKQUOTE_MENU_ITEM.key, getQuickInsertProviderMenuItemKey('questionslist-macro-native:questionslist-macro-native')]], ['r', [getQuickInsertProviderMenuItemKey(RETROSPECTIVE_MENU_ITEM.key), getQuickInsertProviderMenuItemKey(ROADMAP_MENU_ITEM.key), getQuickInsertProviderMenuItemKey('skill:response-draft')]], ['s', [STATUS_MENU_ITEM.key, SUCCESS_PANEL_MENU_ITEM.key, getQuickInsertProviderMenuItemKey('spotlight:quick-insert')]], ['t', [TABLE_MENU_ITEM.key, getQuickInsertProviderMenuItemKey(TABS_MENU_ITEM.key), getQuickInsertProviderMenuItemKey('toc:toc')]], ['w', [getQuickInsertProviderMenuItemKey(WHITEBOARD_MENU_ITEM.key), WARNING_PANEL_MENU_ITEM.key, getQuickInsertProviderMenuItemKey('skill:write-prd')]], ['x', [EXPAND_MENU_ITEM.key, getQuickInsertProviderMenuItemKey('excerpt:excerpt'), getQuickInsertProviderMenuItemKey('skill:explain-workflow')]], ['y', [SYNCED_BLOCK_MENU_ITEM.key, TWO_COLUMNS_LAYOUT_MENU_ITEM.key, THREE_COLUMNS_LAYOUT_MENU_ITEM.key]], ['co', [CODE_BLOCK_MENU_ITEM.key, TWO_COLUMNS_LAYOUT_MENU_ITEM.key, THREE_COLUMNS_LAYOUT_MENU_ITEM.key, FOUR_COLUMNS_LAYOUT_MENU_ITEM.key, FIVE_COLUMNS_LAYOUT_MENU_ITEM.key]], ['pa', [INFO_PANEL_MENU_ITEM.key, NOTE_PANEL_MENU_ITEM.key, ERROR_PANEL_MENU_ITEM.key, SUCCESS_PANEL_MENU_ITEM.key, CUSTOM_PANEL_MENU_ITEM.key, EXPAND_MENU_ITEM.key]], ['pan', [INFO_PANEL_MENU_ITEM.key, NOTE_PANEL_MENU_ITEM.key, ERROR_PANEL_MENU_ITEM.key, SUCCESS_PANEL_MENU_ITEM.key, CUSTOM_PANEL_MENU_ITEM.key, EXPAND_MENU_ITEM.key]], ['ex', [EXPAND_MENU_ITEM.key, getQuickInsertProviderMenuItemKey('excerpt:excerpt'), getQuickInsertProviderMenuItemKey('skill:explain-workflow')]], ['la', [TWO_COLUMNS_LAYOUT_MENU_ITEM.key, THREE_COLUMNS_LAYOUT_MENU_ITEM.key, FOUR_COLUMNS_LAYOUT_MENU_ITEM.key, FIVE_COLUMNS_LAYOUT_MENU_ITEM.key]], ['he', [HEADING_4_MENU_ITEM.key, HEADING_6_MENU_ITEM.key, HEADING_1_MENU_ITEM.key, HEADING_2_MENU_ITEM.key, HEADING_3_MENU_ITEM.key, HEADING_5_MENU_ITEM.key]], ['ac', [ACTION_MENU_ITEM.key, getQuickInsertProviderMenuItemKey('com.atlassian.streams.streams-jira-plugin:activitystream-gadget')]], ['act', [ACTION_MENU_ITEM.key, getQuickInsertProviderMenuItemKey('com.atlassian.streams.streams-jira-plugin:activitystream-gadget')]], ['che', [ACTION_MENU_ITEM.key]], ['em', [EMOJI_MENU_ITEM.key, getQuickInsertProviderMenuItemKey('third-party-quick-insert-embeds:embed'), getQuickInsertProviderMenuItemKey('database-extension:reference-database')]], ['fi', [MEDIA_INSERT_MENU_ITEM.key, getQuickInsertProviderMenuItemKey('third-party-quick-insert-embeds:third-party-embed-figma'), getQuickInsertProviderMenuItemKey('skill:find-similar-incidents')]], ['fil', [MEDIA_INSERT_MENU_ITEM.key, getQuickInsertProviderMenuItemKey('com.atlassian.jira.gadgets:filter-results-gadget')]], ['at', [MEDIA_INSERT_MENU_ITEM.key]], ['ji', [JIRA_WORK_ITEMS_MENU_ITEM.key, getQuickInsertProviderMenuItemKey(JIRA_ISSUE_MENU_ITEM.key)]], ['jir', [JIRA_WORK_ITEMS_MENU_ITEM.key, getQuickInsertProviderMenuItemKey(JIRA_ISSUE_MENU_ITEM.key)]], ['jira', [JIRA_WORK_ITEMS_MENU_ITEM.key, getQuickInsertProviderMenuItemKey(JIRA_ISSUE_MENU_ITEM.key)]], ['remix', [getQuickInsertProviderMenuItemKey('remix-slash:bar-chart'), getQuickInsertProviderMenuItemKey('remix-slash:line-chart'), getQuickInsertProviderMenuItemKey('remix-slash:infographic'), getQuickInsertProviderMenuItemKey('remix-slash:flip-card')]], ['db', [getQuickInsertProviderMenuItemKey(DATABASE_MENU_ITEM.key), getQuickInsertProviderMenuItemKey('skill:search-feedback')]], ['wb', [getQuickInsertProviderMenuItemKey(WHITEBOARD_MENU_ITEM.key)]], ['te', [getQuickInsertProviderMenuItemKey('snippet-extension:block-template'), getQuickInsertProviderMenuItemKey('create-from-template:create-from-template')]], ['tem', [getQuickInsertProviderMenuItemKey('snippet-extension:block-template'), getQuickInsertProviderMenuItemKey('create-from-template:create-from-template')]]];
|
|
10
10
|
const createRecommendationResolver = itemKeys => itemKey => {
|
|
11
11
|
const index = itemKeys.indexOf(itemKey);
|
|
12
12
|
return index === -1 ? undefined : {
|
|
@@ -13,7 +13,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
|
|
|
13
13
|
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
14
14
|
import Layer from '../Layer';
|
|
15
15
|
const packageName = "@atlaskit/editor-common";
|
|
16
|
-
const packageVersion = "134.
|
|
16
|
+
const packageVersion = "134.10.0";
|
|
17
17
|
const halfFocusRing = 1;
|
|
18
18
|
const dropOffset = '0, 8';
|
|
19
19
|
// Ignored via go/ees005
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
1
2
|
import { isBody } from './isBody';
|
|
2
3
|
import { isTextNode } from './isTextNode';
|
|
3
4
|
/**
|
|
@@ -150,6 +151,13 @@ const getPopupXInsideParent = (x, popupClientWidth, popupOffsetParentClientWidth
|
|
|
150
151
|
// prevent going too far left
|
|
151
152
|
return Math.max(minPopupMargin, x);
|
|
152
153
|
};
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Lifts a bottom-placed popup that would run past the visible bottom of its scroll parent so its
|
|
157
|
+
* bottom sits `offset` above that edge. Under `platform_editor_popup_clamp_to_scroll_area`, a popup
|
|
158
|
+
* taller than the visible area is instead pinned `offset` below the visible top, so its start (for
|
|
159
|
+
* the link picker, the URL field) is never clipped; its bottom may extend past the visible area.
|
|
160
|
+
*/
|
|
153
161
|
const calculateVerticalStickBottom = ({
|
|
154
162
|
target,
|
|
155
163
|
targetTop,
|
|
@@ -165,13 +173,22 @@ const calculateVerticalStickBottom = ({
|
|
|
165
173
|
...position
|
|
166
174
|
};
|
|
167
175
|
if (scrollParent) {
|
|
176
|
+
const margin = offset[1];
|
|
177
|
+
const visibleHeight = scrollParent.clientHeight;
|
|
168
178
|
const topOffsetTop = targetTop - scrollParent.getBoundingClientRect().top;
|
|
169
179
|
const targetEnd = targetHeight + topOffsetTop;
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
180
|
+
const popupHeight = popup.clientHeight;
|
|
181
|
+
if (visibleHeight - targetEnd <= popupHeight + margin * 2 && topOffsetTop < visibleHeight) {
|
|
182
|
+
const scroll = targetEnd - visibleHeight + margin * 2;
|
|
183
|
+
const liftedTop = (newPos.top || 0) - (scroll + popupHeight);
|
|
184
|
+
// Lifting only clips the popup once its top would pass the visible top.
|
|
185
|
+
const liftsAboveVisibleTop = popupHeight > visibleHeight - margin;
|
|
186
|
+
if (liftsAboveVisibleTop && isExperimentEnabled('platform_editor_popup_clamp_to_scroll_area')) {
|
|
187
|
+
const scrollAreaTop = liftedTop + popupHeight + margin - visibleHeight;
|
|
188
|
+
newPos.top = scrollAreaTop + margin;
|
|
189
|
+
} else {
|
|
190
|
+
newPos.top = liftedTop;
|
|
191
|
+
}
|
|
175
192
|
}
|
|
176
193
|
}
|
|
177
194
|
return newPos;
|
|
@@ -11,9 +11,9 @@ import { useCallback } from 'react';
|
|
|
11
11
|
import { jsx } from '@emotion/react';
|
|
12
12
|
import { useIntl } from 'react-intl';
|
|
13
13
|
import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext';
|
|
14
|
-
import DropdownMenu from '@atlaskit/dropdown-menu/dropdown-menu';
|
|
15
|
-
import DropdownItem from '@atlaskit/dropdown-menu/dropdown-menu-item';
|
|
16
|
-
import DropdownItemGroup from '@atlaskit/dropdown-menu/dropdown-menu-item-group';
|
|
14
|
+
import { DropdownMenu } from '@atlaskit/dropdown-menu/dropdown-menu';
|
|
15
|
+
import { DropdownItem } from '@atlaskit/dropdown-menu/dropdown-menu-item';
|
|
16
|
+
import { DropdownItemGroup } from '@atlaskit/dropdown-menu/dropdown-menu-item-group';
|
|
17
17
|
import ChevronDownIcon from '@atlaskit/icon/core/chevron-down';
|
|
18
18
|
import PreferencesIcon from '@atlaskit/icon/core/customize';
|
|
19
19
|
import LinkExternalIcon from '@atlaskit/icon/core/link-external';
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
2
1
|
import { anyMarksActiveFromTr } from './anyMarksActiveFromTr';
|
|
3
2
|
var HAD_ATTRIBUTE = {
|
|
4
3
|
backgroundColor: 'hadBackgroundColor',
|
|
@@ -11,12 +10,8 @@ var isMarkName = function isMarkName(name) {
|
|
|
11
10
|
|
|
12
11
|
/**
|
|
13
12
|
* `had*` flags for color / highlight / link apply events.
|
|
14
|
-
* Kill switch `platform_editor_add_text_color_tracking`: gate on, new attributes off.
|
|
15
13
|
*/
|
|
16
14
|
export var getHadMarkAttributes = function getHadMarkAttributes(tr, markTypes) {
|
|
17
|
-
if (fg('platform_editor_add_text_color_tracking')) {
|
|
18
|
-
return {};
|
|
19
|
-
}
|
|
20
15
|
var definedMarkTypes = markTypes.filter(function (markType) {
|
|
21
16
|
return !!markType;
|
|
22
17
|
});
|
|
@@ -19,7 +19,7 @@ var NETWORK_FAILURE_REGEX = /^network failure/i;
|
|
|
19
19
|
var RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
|
|
20
20
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
21
21
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
22
|
-
var packageVersion = "134.
|
|
22
|
+
var packageVersion = "134.10.0";
|
|
23
23
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
24
24
|
// Remove URL as it has UGC
|
|
25
25
|
// Ignored via go/ees007
|
|
@@ -8,7 +8,7 @@ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
|
8
8
|
import { getQuickInsertProviderMenuItemKey } from './getQuickInsertProviderMenuItemKey';
|
|
9
9
|
import { ACTION_MENU_ITEM, ASK_ROVO_MENU_ITEM, ASSETS_MENU_ITEM, BLOCKQUOTE_MENU_ITEM, BRAINSTORMING_MENU_ITEM, CODE_BLOCK_MENU_ITEM, CUSTOM_PANEL_MENU_ITEM, DATABASE_MENU_ITEM, DATE_MENU_ITEM, DECISION_MENU_ITEM, EMOJI_MENU_ITEM, ERROR_PANEL_MENU_ITEM, EXPAND_MENU_ITEM, FIVE_COLUMNS_LAYOUT_MENU_ITEM, FLOWCHART_MENU_ITEM, FOUR_COLUMNS_LAYOUT_MENU_ITEM, HEADING_1_MENU_ITEM, HEADING_2_MENU_ITEM, HEADING_3_MENU_ITEM, HEADING_4_MENU_ITEM, HEADING_5_MENU_ITEM, HEADING_6_MENU_ITEM, HYPERLINK_MENU_ITEM, INFO_PANEL_MENU_ITEM, JIRA_ISSUE_MENU_ITEM, JIRA_WORK_ITEMS_MENU_ITEM, LOOM_MENU_ITEM, MEDIA_INSERT_MENU_ITEM, NOTE_PANEL_MENU_ITEM, ORDERED_LIST_MENU_ITEM, ROADMAP_MENU_ITEM, RETROSPECTIVE_MENU_ITEM, RULE_MENU_ITEM, STATUS_MENU_ITEM, SUCCESS_PANEL_MENU_ITEM, SYNCED_BLOCK_MENU_ITEM, TABLE_MENU_ITEM, TABS_MENU_ITEM, THREE_COLUMNS_LAYOUT_MENU_ITEM, TWO_COLUMNS_LAYOUT_MENU_ITEM, WARNING_PANEL_MENU_ITEM, WHITEBOARD_MENU_ITEM } from './keys';
|
|
10
10
|
var SKILL_MENU_ITEM_KEY_PREFIX = getQuickInsertProviderMenuItemKey('skill:');
|
|
11
|
-
var RECOMMENDED_ITEM_KEYS_BY_QUERY = [['a', [ASK_ROVO_MENU_ITEM.key, ACTION_MENU_ITEM.key, ASSETS_MENU_ITEM.key]], ['b', [getQuickInsertProviderMenuItemKey('blog-posts:blog-posts'), getQuickInsertProviderMenuItemKey('snippet-extension:block-template'), getQuickInsertProviderMenuItemKey(BRAINSTORMING_MENU_ITEM.key)]], ['c', [CODE_BLOCK_MENU_ITEM.key, getQuickInsertProviderMenuItemKey('cards:quick-insert'), getQuickInsertProviderMenuItemKey(JIRA_ISSUE_MENU_ITEM.key)]], ['d', [DATE_MENU_ITEM.key, DECISION_MENU_ITEM.key, RULE_MENU_ITEM.key]], ['e', [EMOJI_MENU_ITEM.key, EXPAND_MENU_ITEM.key, getQuickInsertProviderMenuItemKey('third-party-quick-insert-embeds:embed')]], ['f', [INFO_PANEL_MENU_ITEM.key, getQuickInsertProviderMenuItemKey(FLOWCHART_MENU_ITEM.key), getQuickInsertProviderMenuItemKey('third-party-quick-insert-embeds:third-party-embed-figma')]], ['g', [WARNING_PANEL_MENU_ITEM.key, getQuickInsertProviderMenuItemKey('third-party-quick-insert-embeds:third-party-embed-google-drive')]], ['h', [HEADING_2_MENU_ITEM.key, HEADING_3_MENU_ITEM.key, HEADING_4_MENU_ITEM.key]], ['i', [MEDIA_INSERT_MENU_ITEM.key, INFO_PANEL_MENU_ITEM.key, getQuickInsertProviderMenuItemKey('iframe:iframe')]], ['j', [JIRA_WORK_ITEMS_MENU_ITEM.key, getQuickInsertProviderMenuItemKey('jirachart:jirachart'), getQuickInsertProviderMenuItemKey(JIRA_ISSUE_MENU_ITEM.key)]], ['l', [LOOM_MENU_ITEM.key, HYPERLINK_MENU_ITEM.key, TWO_COLUMNS_LAYOUT_MENU_ITEM.key]], ['n', [ORDERED_LIST_MENU_ITEM.key, NOTE_PANEL_MENU_ITEM.key, SYNCED_BLOCK_MENU_ITEM.key]], ['p', [INFO_PANEL_MENU_ITEM.key, SUCCESS_PANEL_MENU_ITEM.key, WARNING_PANEL_MENU_ITEM.key, NOTE_PANEL_MENU_ITEM.key, CUSTOM_PANEL_MENU_ITEM.key]], ['q', [BLOCKQUOTE_MENU_ITEM.key, getQuickInsertProviderMenuItemKey('questionslist-macro-native:questionslist-macro-native')]], ['r', [getQuickInsertProviderMenuItemKey(RETROSPECTIVE_MENU_ITEM.key), getQuickInsertProviderMenuItemKey(ROADMAP_MENU_ITEM.key), getQuickInsertProviderMenuItemKey('skill:response-draft')]], ['s', [STATUS_MENU_ITEM.key, SUCCESS_PANEL_MENU_ITEM.key, getQuickInsertProviderMenuItemKey('spotlight:quick-insert')]], ['t', [TABLE_MENU_ITEM.key, getQuickInsertProviderMenuItemKey(TABS_MENU_ITEM.key), getQuickInsertProviderMenuItemKey('toc:toc')]], ['w', [getQuickInsertProviderMenuItemKey(WHITEBOARD_MENU_ITEM.key), WARNING_PANEL_MENU_ITEM.key, getQuickInsertProviderMenuItemKey('skill:write-prd')]], ['x', [EXPAND_MENU_ITEM.key, getQuickInsertProviderMenuItemKey('excerpt:excerpt'), getQuickInsertProviderMenuItemKey('skill:explain-workflow')]], ['y', [SYNCED_BLOCK_MENU_ITEM.key, TWO_COLUMNS_LAYOUT_MENU_ITEM.key, THREE_COLUMNS_LAYOUT_MENU_ITEM.key]], ['co', [CODE_BLOCK_MENU_ITEM.key, TWO_COLUMNS_LAYOUT_MENU_ITEM.key, THREE_COLUMNS_LAYOUT_MENU_ITEM.key, FOUR_COLUMNS_LAYOUT_MENU_ITEM.key, FIVE_COLUMNS_LAYOUT_MENU_ITEM.key]], ['pa', [INFO_PANEL_MENU_ITEM.key, NOTE_PANEL_MENU_ITEM.key, ERROR_PANEL_MENU_ITEM.key, SUCCESS_PANEL_MENU_ITEM.key, CUSTOM_PANEL_MENU_ITEM.key, EXPAND_MENU_ITEM.key]], ['pan', [INFO_PANEL_MENU_ITEM.key, NOTE_PANEL_MENU_ITEM.key, ERROR_PANEL_MENU_ITEM.key, SUCCESS_PANEL_MENU_ITEM.key, CUSTOM_PANEL_MENU_ITEM.key, EXPAND_MENU_ITEM.key]], ['ex', [EXPAND_MENU_ITEM.key, getQuickInsertProviderMenuItemKey('excerpt:excerpt'), getQuickInsertProviderMenuItemKey('skill:explain-workflow')]], ['la', [TWO_COLUMNS_LAYOUT_MENU_ITEM.key, THREE_COLUMNS_LAYOUT_MENU_ITEM.key, FOUR_COLUMNS_LAYOUT_MENU_ITEM.key, FIVE_COLUMNS_LAYOUT_MENU_ITEM.key]], ['he', [HEADING_4_MENU_ITEM.key, HEADING_6_MENU_ITEM.key, HEADING_1_MENU_ITEM.key, HEADING_2_MENU_ITEM.key, HEADING_3_MENU_ITEM.key, HEADING_5_MENU_ITEM.key]], ['ac', [ACTION_MENU_ITEM.key, getQuickInsertProviderMenuItemKey('com.atlassian.streams.streams-jira-plugin:activitystream-gadget')]], ['act', [ACTION_MENU_ITEM.key, getQuickInsertProviderMenuItemKey('com.atlassian.streams.streams-jira-plugin:activitystream-gadget')]], ['che', [ACTION_MENU_ITEM.key]], ['em', [EMOJI_MENU_ITEM.key, getQuickInsertProviderMenuItemKey('third-party-quick-insert-embeds:embed'), getQuickInsertProviderMenuItemKey('database-extension:reference-database')]], ['fi', [MEDIA_INSERT_MENU_ITEM.key, getQuickInsertProviderMenuItemKey('third-party-quick-insert-embeds:third-party-embed-figma'), getQuickInsertProviderMenuItemKey('skill:find-similar-incidents')]], ['fil', [MEDIA_INSERT_MENU_ITEM.key, getQuickInsertProviderMenuItemKey('com.atlassian.jira.gadgets:filter-results-gadget')]], ['at', [MEDIA_INSERT_MENU_ITEM.key]], ['ji', [JIRA_WORK_ITEMS_MENU_ITEM.key, getQuickInsertProviderMenuItemKey(JIRA_ISSUE_MENU_ITEM.key)]], ['jir', [JIRA_WORK_ITEMS_MENU_ITEM.key, getQuickInsertProviderMenuItemKey(JIRA_ISSUE_MENU_ITEM.key)]], ['jira', [JIRA_WORK_ITEMS_MENU_ITEM.key, getQuickInsertProviderMenuItemKey(JIRA_ISSUE_MENU_ITEM.key)]], ['db', [getQuickInsertProviderMenuItemKey(DATABASE_MENU_ITEM.key), getQuickInsertProviderMenuItemKey('skill:search-feedback')]], ['wb', [getQuickInsertProviderMenuItemKey(WHITEBOARD_MENU_ITEM.key)]], ['te', [getQuickInsertProviderMenuItemKey('snippet-extension:block-template'), getQuickInsertProviderMenuItemKey('create-from-template:create-from-template')]], ['tem', [getQuickInsertProviderMenuItemKey('snippet-extension:block-template'), getQuickInsertProviderMenuItemKey('create-from-template:create-from-template')]]];
|
|
11
|
+
var RECOMMENDED_ITEM_KEYS_BY_QUERY = [['a', [ASK_ROVO_MENU_ITEM.key, ACTION_MENU_ITEM.key, ASSETS_MENU_ITEM.key]], ['b', [getQuickInsertProviderMenuItemKey('blog-posts:blog-posts'), getQuickInsertProviderMenuItemKey('snippet-extension:block-template'), getQuickInsertProviderMenuItemKey(BRAINSTORMING_MENU_ITEM.key)]], ['c', [CODE_BLOCK_MENU_ITEM.key, getQuickInsertProviderMenuItemKey('cards:quick-insert'), getQuickInsertProviderMenuItemKey(JIRA_ISSUE_MENU_ITEM.key)]], ['d', [DATE_MENU_ITEM.key, DECISION_MENU_ITEM.key, RULE_MENU_ITEM.key]], ['e', [EMOJI_MENU_ITEM.key, EXPAND_MENU_ITEM.key, getQuickInsertProviderMenuItemKey('third-party-quick-insert-embeds:embed')]], ['f', [INFO_PANEL_MENU_ITEM.key, getQuickInsertProviderMenuItemKey(FLOWCHART_MENU_ITEM.key), getQuickInsertProviderMenuItemKey('third-party-quick-insert-embeds:third-party-embed-figma')]], ['g', [WARNING_PANEL_MENU_ITEM.key, getQuickInsertProviderMenuItemKey('third-party-quick-insert-embeds:third-party-embed-google-drive')]], ['h', [HEADING_2_MENU_ITEM.key, HEADING_3_MENU_ITEM.key, HEADING_4_MENU_ITEM.key]], ['i', [MEDIA_INSERT_MENU_ITEM.key, INFO_PANEL_MENU_ITEM.key, getQuickInsertProviderMenuItemKey('iframe:iframe')]], ['j', [JIRA_WORK_ITEMS_MENU_ITEM.key, getQuickInsertProviderMenuItemKey('jirachart:jirachart'), getQuickInsertProviderMenuItemKey(JIRA_ISSUE_MENU_ITEM.key)]], ['l', [LOOM_MENU_ITEM.key, HYPERLINK_MENU_ITEM.key, TWO_COLUMNS_LAYOUT_MENU_ITEM.key]], ['n', [ORDERED_LIST_MENU_ITEM.key, NOTE_PANEL_MENU_ITEM.key, SYNCED_BLOCK_MENU_ITEM.key]], ['p', [INFO_PANEL_MENU_ITEM.key, SUCCESS_PANEL_MENU_ITEM.key, WARNING_PANEL_MENU_ITEM.key, NOTE_PANEL_MENU_ITEM.key, CUSTOM_PANEL_MENU_ITEM.key]], ['q', [BLOCKQUOTE_MENU_ITEM.key, getQuickInsertProviderMenuItemKey('questionslist-macro-native:questionslist-macro-native')]], ['r', [getQuickInsertProviderMenuItemKey(RETROSPECTIVE_MENU_ITEM.key), getQuickInsertProviderMenuItemKey(ROADMAP_MENU_ITEM.key), getQuickInsertProviderMenuItemKey('skill:response-draft')]], ['s', [STATUS_MENU_ITEM.key, SUCCESS_PANEL_MENU_ITEM.key, getQuickInsertProviderMenuItemKey('spotlight:quick-insert')]], ['t', [TABLE_MENU_ITEM.key, getQuickInsertProviderMenuItemKey(TABS_MENU_ITEM.key), getQuickInsertProviderMenuItemKey('toc:toc')]], ['w', [getQuickInsertProviderMenuItemKey(WHITEBOARD_MENU_ITEM.key), WARNING_PANEL_MENU_ITEM.key, getQuickInsertProviderMenuItemKey('skill:write-prd')]], ['x', [EXPAND_MENU_ITEM.key, getQuickInsertProviderMenuItemKey('excerpt:excerpt'), getQuickInsertProviderMenuItemKey('skill:explain-workflow')]], ['y', [SYNCED_BLOCK_MENU_ITEM.key, TWO_COLUMNS_LAYOUT_MENU_ITEM.key, THREE_COLUMNS_LAYOUT_MENU_ITEM.key]], ['co', [CODE_BLOCK_MENU_ITEM.key, TWO_COLUMNS_LAYOUT_MENU_ITEM.key, THREE_COLUMNS_LAYOUT_MENU_ITEM.key, FOUR_COLUMNS_LAYOUT_MENU_ITEM.key, FIVE_COLUMNS_LAYOUT_MENU_ITEM.key]], ['pa', [INFO_PANEL_MENU_ITEM.key, NOTE_PANEL_MENU_ITEM.key, ERROR_PANEL_MENU_ITEM.key, SUCCESS_PANEL_MENU_ITEM.key, CUSTOM_PANEL_MENU_ITEM.key, EXPAND_MENU_ITEM.key]], ['pan', [INFO_PANEL_MENU_ITEM.key, NOTE_PANEL_MENU_ITEM.key, ERROR_PANEL_MENU_ITEM.key, SUCCESS_PANEL_MENU_ITEM.key, CUSTOM_PANEL_MENU_ITEM.key, EXPAND_MENU_ITEM.key]], ['ex', [EXPAND_MENU_ITEM.key, getQuickInsertProviderMenuItemKey('excerpt:excerpt'), getQuickInsertProviderMenuItemKey('skill:explain-workflow')]], ['la', [TWO_COLUMNS_LAYOUT_MENU_ITEM.key, THREE_COLUMNS_LAYOUT_MENU_ITEM.key, FOUR_COLUMNS_LAYOUT_MENU_ITEM.key, FIVE_COLUMNS_LAYOUT_MENU_ITEM.key]], ['he', [HEADING_4_MENU_ITEM.key, HEADING_6_MENU_ITEM.key, HEADING_1_MENU_ITEM.key, HEADING_2_MENU_ITEM.key, HEADING_3_MENU_ITEM.key, HEADING_5_MENU_ITEM.key]], ['ac', [ACTION_MENU_ITEM.key, getQuickInsertProviderMenuItemKey('com.atlassian.streams.streams-jira-plugin:activitystream-gadget')]], ['act', [ACTION_MENU_ITEM.key, getQuickInsertProviderMenuItemKey('com.atlassian.streams.streams-jira-plugin:activitystream-gadget')]], ['che', [ACTION_MENU_ITEM.key]], ['em', [EMOJI_MENU_ITEM.key, getQuickInsertProviderMenuItemKey('third-party-quick-insert-embeds:embed'), getQuickInsertProviderMenuItemKey('database-extension:reference-database')]], ['fi', [MEDIA_INSERT_MENU_ITEM.key, getQuickInsertProviderMenuItemKey('third-party-quick-insert-embeds:third-party-embed-figma'), getQuickInsertProviderMenuItemKey('skill:find-similar-incidents')]], ['fil', [MEDIA_INSERT_MENU_ITEM.key, getQuickInsertProviderMenuItemKey('com.atlassian.jira.gadgets:filter-results-gadget')]], ['at', [MEDIA_INSERT_MENU_ITEM.key]], ['ji', [JIRA_WORK_ITEMS_MENU_ITEM.key, getQuickInsertProviderMenuItemKey(JIRA_ISSUE_MENU_ITEM.key)]], ['jir', [JIRA_WORK_ITEMS_MENU_ITEM.key, getQuickInsertProviderMenuItemKey(JIRA_ISSUE_MENU_ITEM.key)]], ['jira', [JIRA_WORK_ITEMS_MENU_ITEM.key, getQuickInsertProviderMenuItemKey(JIRA_ISSUE_MENU_ITEM.key)]], ['remix', [getQuickInsertProviderMenuItemKey('remix-slash:bar-chart'), getQuickInsertProviderMenuItemKey('remix-slash:line-chart'), getQuickInsertProviderMenuItemKey('remix-slash:infographic'), getQuickInsertProviderMenuItemKey('remix-slash:flip-card')]], ['db', [getQuickInsertProviderMenuItemKey(DATABASE_MENU_ITEM.key), getQuickInsertProviderMenuItemKey('skill:search-feedback')]], ['wb', [getQuickInsertProviderMenuItemKey(WHITEBOARD_MENU_ITEM.key)]], ['te', [getQuickInsertProviderMenuItemKey('snippet-extension:block-template'), getQuickInsertProviderMenuItemKey('create-from-template:create-from-template')]], ['tem', [getQuickInsertProviderMenuItemKey('snippet-extension:block-template'), getQuickInsertProviderMenuItemKey('create-from-template:create-from-template')]]];
|
|
12
12
|
var createRecommendationResolver = function createRecommendationResolver(itemKeys) {
|
|
13
13
|
return function (itemKey) {
|
|
14
14
|
var index = itemKeys.indexOf(itemKey);
|
|
@@ -20,7 +20,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
|
|
|
20
20
|
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
21
21
|
import Layer from '../Layer';
|
|
22
22
|
var packageName = "@atlaskit/editor-common";
|
|
23
|
-
var packageVersion = "134.
|
|
23
|
+
var packageVersion = "134.10.0";
|
|
24
24
|
var halfFocusRing = 1;
|
|
25
25
|
var dropOffset = '0, 8';
|
|
26
26
|
// Ignored via go/ees005
|
|
@@ -2,6 +2,7 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
4
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
5
6
|
import { isBody } from './isBody';
|
|
6
7
|
import { isTextNode } from './isTextNode';
|
|
7
8
|
/**
|
|
@@ -150,6 +151,13 @@ var getPopupXInsideParent = function getPopupXInsideParent(x, popupClientWidth,
|
|
|
150
151
|
// prevent going too far left
|
|
151
152
|
return Math.max(minPopupMargin, x);
|
|
152
153
|
};
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Lifts a bottom-placed popup that would run past the visible bottom of its scroll parent so its
|
|
157
|
+
* bottom sits `offset` above that edge. Under `platform_editor_popup_clamp_to_scroll_area`, a popup
|
|
158
|
+
* taller than the visible area is instead pinned `offset` below the visible top, so its start (for
|
|
159
|
+
* the link picker, the URL field) is never clipped; its bottom may extend past the visible area.
|
|
160
|
+
*/
|
|
153
161
|
var calculateVerticalStickBottom = function calculateVerticalStickBottom(_ref2) {
|
|
154
162
|
var target = _ref2.target,
|
|
155
163
|
targetTop = _ref2.targetTop,
|
|
@@ -162,13 +170,22 @@ var calculateVerticalStickBottom = function calculateVerticalStickBottom(_ref2)
|
|
|
162
170
|
var scrollParent = scrollableElement || findOverflowScrollParent(target) || boundariesElement;
|
|
163
171
|
var newPos = _objectSpread({}, position);
|
|
164
172
|
if (scrollParent) {
|
|
173
|
+
var margin = offset[1];
|
|
174
|
+
var visibleHeight = scrollParent.clientHeight;
|
|
165
175
|
var topOffsetTop = targetTop - scrollParent.getBoundingClientRect().top;
|
|
166
176
|
var targetEnd = targetHeight + topOffsetTop;
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
var
|
|
170
|
-
|
|
171
|
-
|
|
177
|
+
var popupHeight = popup.clientHeight;
|
|
178
|
+
if (visibleHeight - targetEnd <= popupHeight + margin * 2 && topOffsetTop < visibleHeight) {
|
|
179
|
+
var scroll = targetEnd - visibleHeight + margin * 2;
|
|
180
|
+
var liftedTop = (newPos.top || 0) - (scroll + popupHeight);
|
|
181
|
+
// Lifting only clips the popup once its top would pass the visible top.
|
|
182
|
+
var liftsAboveVisibleTop = popupHeight > visibleHeight - margin;
|
|
183
|
+
if (liftsAboveVisibleTop && isExperimentEnabled('platform_editor_popup_clamp_to_scroll_area')) {
|
|
184
|
+
var scrollAreaTop = liftedTop + popupHeight + margin - visibleHeight;
|
|
185
|
+
newPos.top = scrollAreaTop + margin;
|
|
186
|
+
} else {
|
|
187
|
+
newPos.top = liftedTop;
|
|
188
|
+
}
|
|
172
189
|
}
|
|
173
190
|
}
|
|
174
191
|
return newPos;
|
|
@@ -9,7 +9,6 @@ type MarkName = keyof typeof HAD_ATTRIBUTE;
|
|
|
9
9
|
export type HadMarkAttribute = (typeof HAD_ATTRIBUTE)[MarkName];
|
|
10
10
|
/**
|
|
11
11
|
* `had*` flags for color / highlight / link apply events.
|
|
12
|
-
* Kill switch `platform_editor_add_text_color_tracking`: gate on, new attributes off.
|
|
13
12
|
*/
|
|
14
13
|
export declare const getHadMarkAttributes: (tr: Transaction | ReadonlyTransaction, markTypes: readonly (MarkType | undefined)[]) => Partial<Record<HadMarkAttribute, boolean>>;
|
|
15
14
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "134.
|
|
3
|
+
"version": "134.10.1",
|
|
4
4
|
"description": "A package that contains common classes and components for editor and renderer",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@atlaskit/activity-provider": "^3.1.0",
|
|
32
32
|
"@atlaskit/adf-schema": "^57.7.0",
|
|
33
33
|
"@atlaskit/adf-utils": "^20.9.0",
|
|
34
|
-
"@atlaskit/afm-i18n-platform-editor-editor-common": "2.
|
|
34
|
+
"@atlaskit/afm-i18n-platform-editor-editor-common": "2.305.0",
|
|
35
35
|
"@atlaskit/analytics-listeners": "^11.4.0",
|
|
36
36
|
"@atlaskit/analytics-namespaced-context": "^8.2.0",
|
|
37
37
|
"@atlaskit/analytics-next": "^12.6.0",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@atlaskit/codemod-utils": "^5.2.0",
|
|
42
42
|
"@atlaskit/css": "^1.1.0",
|
|
43
43
|
"@atlaskit/custom-steps": "^1.1.0",
|
|
44
|
-
"@atlaskit/dropdown-menu": "^21.
|
|
44
|
+
"@atlaskit/dropdown-menu": "^21.2.0",
|
|
45
45
|
"@atlaskit/editor-json-transformer": "^10.0.0",
|
|
46
46
|
"@atlaskit/editor-palette": "^3.5.0",
|
|
47
47
|
"@atlaskit/editor-prosemirror": "^9.0.0",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"@atlaskit/editor-toolbar": "^2.10.0",
|
|
51
51
|
"@atlaskit/editor-toolbar-model": "^1.2.0",
|
|
52
52
|
"@atlaskit/editor-ui-control-model": "^3.0.0",
|
|
53
|
-
"@atlaskit/emoji": "^73.
|
|
53
|
+
"@atlaskit/emoji": "^73.5.0",
|
|
54
54
|
"@atlaskit/feature-gate-js-client": "^8.0.0",
|
|
55
55
|
"@atlaskit/icon": "^38.0.0",
|
|
56
56
|
"@atlaskit/link": "^5.1.0",
|
|
@@ -63,9 +63,9 @@
|
|
|
63
63
|
"@atlaskit/media-common": "^14.7.0",
|
|
64
64
|
"@atlaskit/media-file-preview": "^2.0.0",
|
|
65
65
|
"@atlaskit/media-picker": "^73.3.0",
|
|
66
|
-
"@atlaskit/media-ui": "^31.
|
|
66
|
+
"@atlaskit/media-ui": "^31.7.0",
|
|
67
67
|
"@atlaskit/media-viewer": "^54.12.0",
|
|
68
|
-
"@atlaskit/mention": "^30.
|
|
68
|
+
"@atlaskit/mention": "^30.8.0",
|
|
69
69
|
"@atlaskit/menu": "^11.0.0",
|
|
70
70
|
"@atlaskit/object": "^2.3.0",
|
|
71
71
|
"@atlaskit/onboarding": "^15.4.0",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"@atlaskit/smart-card": "^46.13.0",
|
|
83
83
|
"@atlaskit/smart-user-picker": "^12.11.0",
|
|
84
84
|
"@atlaskit/spinner": "^20.4.0",
|
|
85
|
-
"@atlaskit/task-decision": "^21.
|
|
85
|
+
"@atlaskit/task-decision": "^21.15.0",
|
|
86
86
|
"@atlaskit/teams-app-config": "^3.1.0",
|
|
87
87
|
"@atlaskit/textfield": "^10.3.0",
|
|
88
88
|
"@atlaskit/tmp-editor-statsig": "^260.0.0",
|
|
@@ -159,9 +159,6 @@
|
|
|
159
159
|
"type": "boolean",
|
|
160
160
|
"referenceOnly": true
|
|
161
161
|
},
|
|
162
|
-
"platform_editor_add_text_color_tracking": {
|
|
163
|
-
"type": "boolean"
|
|
164
|
-
},
|
|
165
162
|
"platform_editor_ai_show_diff_patch_2": {
|
|
166
163
|
"type": "boolean"
|
|
167
164
|
},
|