@atlaskit/editor-common 117.1.1 → 117.2.0
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 +11 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/quick-insert/QuickInsertMenuItem.compiled.css +18 -0
- package/dist/cjs/quick-insert/QuickInsertMenuItem.js +63 -0
- package/dist/cjs/quick-insert/QuickInsertMenuRoot.js +13 -0
- package/dist/cjs/quick-insert/QuickInsertMenuSection.js +16 -0
- package/dist/cjs/quick-insert/keys.js +79 -1
- package/dist/cjs/quick-insert/messages.js +45 -0
- package/dist/cjs/quick-insert/rank.js +7 -2
- package/dist/cjs/type-ahead/MENU_FOOTER_SECTION_KEY_SUFFIX.js +8 -0
- package/dist/cjs/type-ahead/SECTION_OVERFLOW_ITEM_KEY_SUFFIX.js +8 -0
- package/dist/cjs/type-ahead/getMenuFooterSectionKey.js +11 -0
- package/dist/cjs/type-ahead/getSectionOverflowItemKey.js +11 -0
- package/dist/cjs/type-ahead/isMenuFooterSectionKey.js +11 -0
- package/dist/cjs/type-ahead/isSectionOverflowItemKey.js +11 -0
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/quick-insert/QuickInsertMenuItem.compiled.css +18 -0
- package/dist/es2019/quick-insert/QuickInsertMenuItem.js +51 -0
- package/dist/es2019/quick-insert/QuickInsertMenuRoot.js +5 -0
- package/dist/es2019/quick-insert/QuickInsertMenuSection.js +8 -0
- package/dist/es2019/quick-insert/keys.js +77 -1
- package/dist/es2019/quick-insert/messages.js +45 -0
- package/dist/es2019/quick-insert/rank.js +30 -4
- package/dist/es2019/type-ahead/MENU_FOOTER_SECTION_KEY_SUFFIX.js +2 -0
- package/dist/es2019/type-ahead/SECTION_OVERFLOW_ITEM_KEY_SUFFIX.js +2 -0
- package/dist/es2019/type-ahead/getMenuFooterSectionKey.js +4 -0
- package/dist/es2019/type-ahead/getSectionOverflowItemKey.js +4 -0
- package/dist/es2019/type-ahead/isMenuFooterSectionKey.js +4 -0
- package/dist/es2019/type-ahead/isSectionOverflowItemKey.js +4 -0
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/quick-insert/QuickInsertMenuItem.compiled.css +18 -0
- package/dist/esm/quick-insert/QuickInsertMenuItem.js +54 -0
- package/dist/esm/quick-insert/QuickInsertMenuRoot.js +6 -0
- package/dist/esm/quick-insert/QuickInsertMenuSection.js +9 -0
- package/dist/esm/quick-insert/keys.js +78 -0
- package/dist/esm/quick-insert/messages.js +45 -0
- package/dist/esm/quick-insert/rank.js +7 -2
- package/dist/esm/type-ahead/MENU_FOOTER_SECTION_KEY_SUFFIX.js +2 -0
- package/dist/esm/type-ahead/SECTION_OVERFLOW_ITEM_KEY_SUFFIX.js +2 -0
- package/dist/esm/type-ahead/getMenuFooterSectionKey.js +6 -0
- package/dist/esm/type-ahead/getSectionOverflowItemKey.js +6 -0
- package/dist/esm/type-ahead/isMenuFooterSectionKey.js +6 -0
- package/dist/esm/type-ahead/isSectionOverflowItemKey.js +6 -0
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/types/analytics/types/list-events.d.ts +1 -1
- package/dist/types/quick-insert/QuickInsertContext.d.ts +0 -1
- package/dist/types/quick-insert/QuickInsertMenuItem.d.ts +21 -0
- package/dist/types/quick-insert/QuickInsertMenuRoot.d.ts +2 -0
- package/dist/types/quick-insert/QuickInsertMenuSection.d.ts +4 -0
- package/dist/types/quick-insert/keys.d.ts +76 -0
- package/dist/types/quick-insert/messages.d.ts +4 -87
- package/dist/types/quick-insert/rank.d.ts +28 -2
- package/dist/types/type-ahead/MENU_FOOTER_SECTION_KEY_SUFFIX.d.ts +2 -0
- package/dist/types/type-ahead/SECTION_OVERFLOW_ITEM_KEY_SUFFIX.d.ts +2 -0
- package/dist/types/type-ahead/getMenuFooterSectionKey.d.ts +2 -0
- package/dist/types/type-ahead/getSectionOverflowItemKey.d.ts +2 -0
- package/dist/types/type-ahead/isMenuFooterSectionKey.d.ts +2 -0
- package/dist/types/type-ahead/isSectionOverflowItemKey.d.ts +2 -0
- package/dist/types/types/quick-insert.d.ts +4 -0
- package/package.json +4 -4
- package/quick-insert/menu-item/package.json +10 -0
- package/quick-insert/menu-root/package.json +10 -0
- package/quick-insert/menu-section/package.json +10 -0
- package/type-ahead-get-menu-footer-section-key/package.json +10 -0
- package/type-ahead-get-section-overflow-item-key/package.json +10 -0
- package/type-ahead-is-menu-footer-section-key/package.json +10 -0
- package/type-ahead-is-section-overflow-item-key/package.json +10 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable @atlaskit/volt-strict-mode/no-multiple-exports */
|
|
2
|
-
import { BLOCK_TEMPLATES_SECTION, DATA_AND_CHARTS_SECTION, EMBED_SECTION, MEDIA_SECTION, OTHER_SECTION, RECOMMENDED_SECTION, ROVO_SECTION, STRUCTURE_SECTION, TABLE_MENU_ITEM, TEXT_FORMATTING_SECTION } from './keys';
|
|
2
|
+
import { ASK_ROVO_MENU_ITEM, ASSETS_MENU_ITEM, BLOCK_TEMPLATES_SECTION, CUSTOM_PANEL_MENU_ITEM, DATE_MENU_ITEM, DATA_AND_CHARTS_SECTION, EMOJI_MENU_ITEM, EMBED_SECTION, ERROR_PANEL_MENU_ITEM, HYPERLINK_MENU_ITEM, INFO_PANEL_MENU_ITEM, JIRA_WORK_ITEMS_MENU_ITEM, LOOM_MENU_ITEM, MEDIA_INSERT_MENU_ITEM, MEDIA_SECTION, NOTE_PANEL_MENU_ITEM, ORDERED_LIST_MENU_ITEM, OTHER_SECTION, RECOMMENDED_SECTION, ROVO_SECTION, STATUS_MENU_ITEM, STRUCTURE_SECTION, SUCCESS_PANEL_MENU_ITEM, TABLE_MENU_ITEM, TEXT_FORMATTING_SECTION, UNORDERED_LIST_MENU_ITEM, WARNING_PANEL_MENU_ITEM } from './keys';
|
|
3
3
|
export const QUICK_INSERT_MENU_RANK = {
|
|
4
4
|
[RECOMMENDED_SECTION.key]: 0,
|
|
5
5
|
[STRUCTURE_SECTION.key]: 1,
|
|
@@ -11,6 +11,32 @@ export const QUICK_INSERT_MENU_RANK = {
|
|
|
11
11
|
[BLOCK_TEMPLATES_SECTION.key]: 7,
|
|
12
12
|
[OTHER_SECTION.key]: 8
|
|
13
13
|
};
|
|
14
|
-
export const
|
|
15
|
-
[TABLE_MENU_ITEM.key]:
|
|
16
|
-
|
|
14
|
+
export const STRUCTURE_SECTION_RANK = {
|
|
15
|
+
[TABLE_MENU_ITEM.key]: 200,
|
|
16
|
+
[STATUS_MENU_ITEM.key]: 300,
|
|
17
|
+
[DATE_MENU_ITEM.key]: 400,
|
|
18
|
+
[INFO_PANEL_MENU_ITEM.key]: 900,
|
|
19
|
+
[NOTE_PANEL_MENU_ITEM.key]: 1000,
|
|
20
|
+
[SUCCESS_PANEL_MENU_ITEM.key]: 1100,
|
|
21
|
+
[WARNING_PANEL_MENU_ITEM.key]: 1200,
|
|
22
|
+
[ERROR_PANEL_MENU_ITEM.key]: 1300,
|
|
23
|
+
[CUSTOM_PANEL_MENU_ITEM.key]: 1400
|
|
24
|
+
};
|
|
25
|
+
export const MEDIA_SECTION_RANK = {
|
|
26
|
+
[MEDIA_INSERT_MENU_ITEM.key]: 100,
|
|
27
|
+
[HYPERLINK_MENU_ITEM.key]: 200,
|
|
28
|
+
[EMOJI_MENU_ITEM.key]: 300,
|
|
29
|
+
[LOOM_MENU_ITEM.key]: 400
|
|
30
|
+
};
|
|
31
|
+
export const TEXT_FORMATTING_SECTION_RANK = {
|
|
32
|
+
[UNORDERED_LIST_MENU_ITEM.key]: 1100,
|
|
33
|
+
[ORDERED_LIST_MENU_ITEM.key]: 1200
|
|
34
|
+
};
|
|
35
|
+
export const ROVO_SECTION_RANK = {
|
|
36
|
+
[ASK_ROVO_MENU_ITEM.key]: 100
|
|
37
|
+
};
|
|
38
|
+
export const DATA_AND_CHARTS_SECTION_RANK = {
|
|
39
|
+
[JIRA_WORK_ITEMS_MENU_ITEM.key]: 300,
|
|
40
|
+
[ASSETS_MENU_ITEM.key]: 500
|
|
41
|
+
};
|
|
42
|
+
export const CATEGORY_VIEW_MORE_RANK = Number.MAX_SAFE_INTEGER;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { SECTION_OVERFLOW_ITEM_KEY_SUFFIX } from './SECTION_OVERFLOW_ITEM_KEY_SUFFIX';
|
|
2
|
+
|
|
3
|
+
/** Returns the reserved key for the item that reveals the remainder of a type-ahead section. */
|
|
4
|
+
export const getSectionOverflowItemKey = sectionKey => `${sectionKey}${SECTION_OVERFLOW_ITEM_KEY_SUFFIX}`;
|
|
@@ -14,7 +14,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
|
14
14
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
15
15
|
import Layer from '../Layer';
|
|
16
16
|
const packageName = "@atlaskit/editor-common";
|
|
17
|
-
const packageVersion = "117.1.
|
|
17
|
+
const packageVersion = "117.1.1";
|
|
18
18
|
const halfFocusRing = 1;
|
|
19
19
|
const dropOffset = '0, 8';
|
|
20
20
|
const fadeIn = keyframes({
|
|
@@ -20,7 +20,7 @@ var NETWORK_FAILURE_REGEX = /^network failure/i;
|
|
|
20
20
|
var RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
|
|
21
21
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
22
22
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
23
|
-
var packageVersion = "117.1.
|
|
23
|
+
var packageVersion = "117.1.1";
|
|
24
24
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
25
25
|
// Remove URL as it has UGC
|
|
26
26
|
// Ignored via go/ees007
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
._11c8wadc{font:var(--ds-font-body-small,normal 400 9pt/1pc "Atlassian Sans",ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
|
|
2
|
+
._2rko12b0{border-radius:var(--ds-radius-small,4px)}
|
|
3
|
+
._2rko1qi0{border-radius:var(--ds-radius-medium,6px)}
|
|
4
|
+
._189ee4h9{border-width:var(--ds-border-width,1px)}
|
|
5
|
+
._18zr1b66{padding-inline:var(--ds-space-050,4px)}
|
|
6
|
+
._1dqonqa1{border-style:solid}
|
|
7
|
+
._1h6d1l7x{border-color:var(--ds-border,#0b120e24)}
|
|
8
|
+
._1rjcv77o{padding-block:var(--ds-space-025,2px)}
|
|
9
|
+
._18m915vq{overflow-y:hidden}
|
|
10
|
+
._1bah1h6o{justify-content:center}
|
|
11
|
+
._1bsbzwfg{width:2pc}
|
|
12
|
+
._1e0c1txw{display:flex}
|
|
13
|
+
._1reo15vq{overflow-x:hidden}
|
|
14
|
+
._4cvr1h6o{align-items:center}
|
|
15
|
+
._4t3izwfg{height:2pc}
|
|
16
|
+
._bfhk1bhr{background-color:var(--ds-surface-overlay,#fff)}
|
|
17
|
+
._bfhki8nm{background-color:var(--ds-background-neutral,#0515240f)}
|
|
18
|
+
._syazazsu{color:var(--ds-text-subtle,#505258)}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/* QuickInsertMenuItem.tsx generated by @compiled/babel-plugin v2.0.0 */
|
|
2
|
+
import "./QuickInsertMenuItem.compiled.css";
|
|
3
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
4
|
+
import React, { useCallback } from 'react';
|
|
5
|
+
import ButtonItem from '@atlaskit/menu/button-item';
|
|
6
|
+
import { Box, Inline, Text } from '@atlaskit/primitives/compiled';
|
|
7
|
+
import { useQuickInsertContext } from './useQuickInsertContext';
|
|
8
|
+
var styles = {
|
|
9
|
+
icon: "_2rko1qi0 _1reo15vq _18m915vq _1h6d1l7x _1dqonqa1 _189ee4h9 _4cvr1h6o _bfhk1bhr _1e0c1txw _4t3izwfg _1bah1h6o _1bsbzwfg",
|
|
10
|
+
shortcut: "_2rko12b0 _11c8wadc _1rjcv77o _18zr1b66 _bfhki8nm _syazazsu"
|
|
11
|
+
};
|
|
12
|
+
export var QuickInsertMenuItem = function QuickInsertMenuItem(_ref) {
|
|
13
|
+
var _item$isSelected;
|
|
14
|
+
var ariaLabel = _ref.ariaLabel,
|
|
15
|
+
iconBefore = _ref.iconBefore,
|
|
16
|
+
isDisabled = _ref.isDisabled,
|
|
17
|
+
onSelect = _ref.onSelect,
|
|
18
|
+
shortcut = _ref.shortcut,
|
|
19
|
+
_ref$shouldWrapIcon = _ref.shouldWrapIcon,
|
|
20
|
+
shouldWrapIcon = _ref$shouldWrapIcon === void 0 ? true : _ref$shouldWrapIcon,
|
|
21
|
+
title = _ref.title;
|
|
22
|
+
var _useQuickInsertContex = useQuickInsertContext(),
|
|
23
|
+
editorView = _useQuickInsertContex.editorView,
|
|
24
|
+
item = _useQuickInsertContex.item,
|
|
25
|
+
select = _useQuickInsertContex.select;
|
|
26
|
+
var isSelected = (_item$isSelected = item === null || item === void 0 ? void 0 : item.isSelected) !== null && _item$isSelected !== void 0 ? _item$isSelected : false;
|
|
27
|
+
var handleClick = useCallback(function () {
|
|
28
|
+
return select(function (selectionContext) {
|
|
29
|
+
return onSelect({
|
|
30
|
+
editorView: editorView,
|
|
31
|
+
insert: selectionContext.insert,
|
|
32
|
+
source: selectionContext.source
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
}, [editorView, onSelect, select]);
|
|
36
|
+
return /*#__PURE__*/React.createElement(ButtonItem, {
|
|
37
|
+
"aria-label": ariaLabel,
|
|
38
|
+
"aria-selected": isSelected,
|
|
39
|
+
iconBefore: iconBefore && shouldWrapIcon ? /*#__PURE__*/React.createElement(Box, {
|
|
40
|
+
xcss: styles.icon
|
|
41
|
+
}, iconBefore) : iconBefore,
|
|
42
|
+
id: item === null || item === void 0 ? void 0 : item.id,
|
|
43
|
+
isDisabled: isDisabled,
|
|
44
|
+
isSelected: isSelected,
|
|
45
|
+
onClick: handleClick,
|
|
46
|
+
role: "option"
|
|
47
|
+
}, /*#__PURE__*/React.createElement(Inline, {
|
|
48
|
+
alignBlock: "center",
|
|
49
|
+
spread: "space-between"
|
|
50
|
+
}, /*#__PURE__*/React.createElement(Text, null, title), shortcut && /*#__PURE__*/React.createElement(Box, {
|
|
51
|
+
as: "span",
|
|
52
|
+
xcss: styles.shortcut
|
|
53
|
+
}, shortcut)));
|
|
54
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Section from '@atlaskit/menu/section';
|
|
3
|
+
export var QuickInsertMenuSection = function QuickInsertMenuSection(_ref) {
|
|
4
|
+
var children = _ref.children,
|
|
5
|
+
title = _ref.title;
|
|
6
|
+
return /*#__PURE__*/React.createElement(Section, {
|
|
7
|
+
title: title
|
|
8
|
+
}, children);
|
|
9
|
+
};
|
|
@@ -39,7 +39,85 @@ export var OTHER_SECTION = {
|
|
|
39
39
|
key: 'quick-insert-other-section',
|
|
40
40
|
type: 'menu-section'
|
|
41
41
|
};
|
|
42
|
+
export var VIEW_ALL_ELEMENTS_MENU_ITEM = {
|
|
43
|
+
key: 'quick-insert-view-all-elements-menu-item',
|
|
44
|
+
type: 'menu-item'
|
|
45
|
+
};
|
|
42
46
|
export var TABLE_MENU_ITEM = {
|
|
43
47
|
key: 'quick-insert-table-menu-item',
|
|
44
48
|
type: 'menu-item'
|
|
49
|
+
};
|
|
50
|
+
export var INFO_PANEL_MENU_ITEM = {
|
|
51
|
+
key: 'quick-insert-info-panel-menu-item',
|
|
52
|
+
type: 'menu-item'
|
|
53
|
+
};
|
|
54
|
+
export var NOTE_PANEL_MENU_ITEM = {
|
|
55
|
+
key: 'quick-insert-note-panel-menu-item',
|
|
56
|
+
type: 'menu-item'
|
|
57
|
+
};
|
|
58
|
+
export var SUCCESS_PANEL_MENU_ITEM = {
|
|
59
|
+
key: 'quick-insert-success-panel-menu-item',
|
|
60
|
+
type: 'menu-item'
|
|
61
|
+
};
|
|
62
|
+
export var WARNING_PANEL_MENU_ITEM = {
|
|
63
|
+
key: 'quick-insert-warning-panel-menu-item',
|
|
64
|
+
type: 'menu-item'
|
|
65
|
+
};
|
|
66
|
+
export var ERROR_PANEL_MENU_ITEM = {
|
|
67
|
+
key: 'quick-insert-error-panel-menu-item',
|
|
68
|
+
type: 'menu-item'
|
|
69
|
+
};
|
|
70
|
+
export var CUSTOM_PANEL_MENU_ITEM = {
|
|
71
|
+
key: 'quick-insert-custom-panel-menu-item',
|
|
72
|
+
type: 'menu-item'
|
|
73
|
+
};
|
|
74
|
+
export var MEDIA_INSERT_MENU_ITEM = {
|
|
75
|
+
key: 'quick-insert-media-insert-menu-item',
|
|
76
|
+
type: 'menu-item'
|
|
77
|
+
};
|
|
78
|
+
export var EMOJI_MENU_ITEM = {
|
|
79
|
+
key: 'quick-insert-emoji-menu-item',
|
|
80
|
+
type: 'menu-item'
|
|
81
|
+
};
|
|
82
|
+
export var HYPERLINK_MENU_ITEM = {
|
|
83
|
+
key: 'quick-insert-hyperlink-menu-item',
|
|
84
|
+
type: 'menu-item'
|
|
85
|
+
};
|
|
86
|
+
export var LOOM_MENU_ITEM = {
|
|
87
|
+
key: 'quick-insert-loom-menu-item',
|
|
88
|
+
type: 'menu-item'
|
|
89
|
+
};
|
|
90
|
+
export var UNORDERED_LIST_MENU_ITEM = {
|
|
91
|
+
key: 'quick-insert-unordered-list-menu-item',
|
|
92
|
+
type: 'menu-item'
|
|
93
|
+
};
|
|
94
|
+
export var ORDERED_LIST_MENU_ITEM = {
|
|
95
|
+
key: 'quick-insert-ordered-list-menu-item',
|
|
96
|
+
type: 'menu-item'
|
|
97
|
+
};
|
|
98
|
+
export var STATUS_MENU_ITEM = {
|
|
99
|
+
key: 'quick-insert-status-menu-item',
|
|
100
|
+
type: 'menu-item'
|
|
101
|
+
};
|
|
102
|
+
export var DATE_MENU_ITEM = {
|
|
103
|
+
key: 'quick-insert-date-menu-item',
|
|
104
|
+
type: 'menu-item'
|
|
105
|
+
};
|
|
106
|
+
export var ASK_ROVO_MENU_ITEM = {
|
|
107
|
+
key: 'quick-insert-ask-rovo-menu-item',
|
|
108
|
+
type: 'menu-item'
|
|
109
|
+
};
|
|
110
|
+
export var JIRA_WORK_ITEMS_MENU_ITEM = {
|
|
111
|
+
key: 'quick-insert-jira-work-items-menu-item',
|
|
112
|
+
type: 'menu-item'
|
|
113
|
+
};
|
|
114
|
+
export var ASSETS_MENU_ITEM = {
|
|
115
|
+
key: 'quick-insert-assets-menu-item',
|
|
116
|
+
type: 'menu-item'
|
|
117
|
+
};
|
|
118
|
+
export var getBlockTemplateMenuItem = function getBlockTemplateMenuItem(id) {
|
|
119
|
+
return {
|
|
120
|
+
key: "quick-insert-block-template-".concat(id),
|
|
121
|
+
type: 'menu-item'
|
|
122
|
+
};
|
|
45
123
|
};
|
|
@@ -84,5 +84,50 @@ export var messages = defineMessages({
|
|
|
84
84
|
id: 'fabric.editor.elementbrowser.sidebar.heading',
|
|
85
85
|
defaultMessage: 'Browse',
|
|
86
86
|
description: 'Heading text displayed at the top of the element browser sidebar where users can browse and filter available elements to insert.'
|
|
87
|
+
},
|
|
88
|
+
categoryRecommended: {
|
|
89
|
+
id: 'editor-common.quick-insert.categoryRecommended',
|
|
90
|
+
defaultMessage: 'Recommended',
|
|
91
|
+
description: 'Recommended items in the Quick Insert menu.'
|
|
92
|
+
},
|
|
93
|
+
categoryStructure: {
|
|
94
|
+
id: 'editor-common.quick-insert.categoryStructure',
|
|
95
|
+
defaultMessage: 'Structure',
|
|
96
|
+
description: 'Structure items in the Quick Insert menu.'
|
|
97
|
+
},
|
|
98
|
+
categoryMedia: {
|
|
99
|
+
id: 'editor-common.quick-insert.categoryMedia',
|
|
100
|
+
defaultMessage: 'Media',
|
|
101
|
+
description: 'Media items in the Quick Insert menu.'
|
|
102
|
+
},
|
|
103
|
+
categoryEmbed: {
|
|
104
|
+
id: 'editor-common.quick-insert.categoryEmbed',
|
|
105
|
+
defaultMessage: 'Embed',
|
|
106
|
+
description: 'Embed items in the Quick Insert menu.'
|
|
107
|
+
},
|
|
108
|
+
categoryTextFormatting: {
|
|
109
|
+
id: 'editor-common.quick-insert.categoryTextFormatting',
|
|
110
|
+
defaultMessage: 'Text formatting',
|
|
111
|
+
description: 'Text formatting items in the Quick Insert menu.'
|
|
112
|
+
},
|
|
113
|
+
categoryRovo: {
|
|
114
|
+
id: 'editor-common.quick-insert.categoryRovo',
|
|
115
|
+
defaultMessage: 'Rovo',
|
|
116
|
+
description: 'Rovo items in the Quick Insert menu.'
|
|
117
|
+
},
|
|
118
|
+
categoryDataAndCharts: {
|
|
119
|
+
id: 'editor-common.quick-insert.categoryDataAndCharts',
|
|
120
|
+
defaultMessage: 'Data and charts',
|
|
121
|
+
description: 'Data and chart items in the Quick Insert menu.'
|
|
122
|
+
},
|
|
123
|
+
categoryBlockTemplates: {
|
|
124
|
+
id: 'editor-common.quick-insert.categoryBlockTemplates',
|
|
125
|
+
defaultMessage: 'Block templates',
|
|
126
|
+
description: 'Block template items in the Quick Insert menu.'
|
|
127
|
+
},
|
|
128
|
+
categoryOther: {
|
|
129
|
+
id: 'editor-common.quick-insert.categoryOther',
|
|
130
|
+
defaultMessage: 'Other',
|
|
131
|
+
description: 'Other items in the Quick Insert menu.'
|
|
87
132
|
}
|
|
88
133
|
});
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
/* eslint-disable @atlaskit/volt-strict-mode/no-multiple-exports */
|
|
3
|
-
import { BLOCK_TEMPLATES_SECTION, DATA_AND_CHARTS_SECTION, EMBED_SECTION, MEDIA_SECTION, OTHER_SECTION, RECOMMENDED_SECTION, ROVO_SECTION, STRUCTURE_SECTION, TABLE_MENU_ITEM, TEXT_FORMATTING_SECTION } from './keys';
|
|
3
|
+
import { ASK_ROVO_MENU_ITEM, ASSETS_MENU_ITEM, BLOCK_TEMPLATES_SECTION, CUSTOM_PANEL_MENU_ITEM, DATE_MENU_ITEM, DATA_AND_CHARTS_SECTION, EMOJI_MENU_ITEM, EMBED_SECTION, ERROR_PANEL_MENU_ITEM, HYPERLINK_MENU_ITEM, INFO_PANEL_MENU_ITEM, JIRA_WORK_ITEMS_MENU_ITEM, LOOM_MENU_ITEM, MEDIA_INSERT_MENU_ITEM, MEDIA_SECTION, NOTE_PANEL_MENU_ITEM, ORDERED_LIST_MENU_ITEM, OTHER_SECTION, RECOMMENDED_SECTION, ROVO_SECTION, STATUS_MENU_ITEM, STRUCTURE_SECTION, SUCCESS_PANEL_MENU_ITEM, TABLE_MENU_ITEM, TEXT_FORMATTING_SECTION, UNORDERED_LIST_MENU_ITEM, WARNING_PANEL_MENU_ITEM } from './keys';
|
|
4
4
|
export var QUICK_INSERT_MENU_RANK = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, RECOMMENDED_SECTION.key, 0), STRUCTURE_SECTION.key, 1), MEDIA_SECTION.key, 2), EMBED_SECTION.key, 3), TEXT_FORMATTING_SECTION.key, 4), ROVO_SECTION.key, 5), DATA_AND_CHARTS_SECTION.key, 6), BLOCK_TEMPLATES_SECTION.key, 7), OTHER_SECTION.key, 8);
|
|
5
|
-
export var
|
|
5
|
+
export var STRUCTURE_SECTION_RANK = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, TABLE_MENU_ITEM.key, 200), STATUS_MENU_ITEM.key, 300), DATE_MENU_ITEM.key, 400), INFO_PANEL_MENU_ITEM.key, 900), NOTE_PANEL_MENU_ITEM.key, 1000), SUCCESS_PANEL_MENU_ITEM.key, 1100), WARNING_PANEL_MENU_ITEM.key, 1200), ERROR_PANEL_MENU_ITEM.key, 1300), CUSTOM_PANEL_MENU_ITEM.key, 1400);
|
|
6
|
+
export var MEDIA_SECTION_RANK = _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, MEDIA_INSERT_MENU_ITEM.key, 100), HYPERLINK_MENU_ITEM.key, 200), EMOJI_MENU_ITEM.key, 300), LOOM_MENU_ITEM.key, 400);
|
|
7
|
+
export var TEXT_FORMATTING_SECTION_RANK = _defineProperty(_defineProperty({}, UNORDERED_LIST_MENU_ITEM.key, 1100), ORDERED_LIST_MENU_ITEM.key, 1200);
|
|
8
|
+
export var ROVO_SECTION_RANK = _defineProperty({}, ASK_ROVO_MENU_ITEM.key, 100);
|
|
9
|
+
export var DATA_AND_CHARTS_SECTION_RANK = _defineProperty(_defineProperty({}, JIRA_WORK_ITEMS_MENU_ITEM.key, 300), ASSETS_MENU_ITEM.key, 500);
|
|
10
|
+
export var CATEGORY_VIEW_MORE_RANK = Number.MAX_SAFE_INTEGER;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { MENU_FOOTER_SECTION_KEY_SUFFIX } from './MENU_FOOTER_SECTION_KEY_SUFFIX';
|
|
2
|
+
|
|
3
|
+
/** Returns the reserved section key for a type-ahead menu's persistent footer item. */
|
|
4
|
+
export var getMenuFooterSectionKey = function getMenuFooterSectionKey(menuKey) {
|
|
5
|
+
return "".concat(menuKey).concat(MENU_FOOTER_SECTION_KEY_SUFFIX);
|
|
6
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { SECTION_OVERFLOW_ITEM_KEY_SUFFIX } from './SECTION_OVERFLOW_ITEM_KEY_SUFFIX';
|
|
2
|
+
|
|
3
|
+
/** Returns the reserved key for the item that reveals the remainder of a type-ahead section. */
|
|
4
|
+
export var getSectionOverflowItemKey = function getSectionOverflowItemKey(sectionKey) {
|
|
5
|
+
return "".concat(sectionKey).concat(SECTION_OVERFLOW_ITEM_KEY_SUFFIX);
|
|
6
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { MENU_FOOTER_SECTION_KEY_SUFFIX } from './MENU_FOOTER_SECTION_KEY_SUFFIX';
|
|
2
|
+
|
|
3
|
+
/** Identifies reserved type-ahead sections whose item is rendered as a persistent footer. */
|
|
4
|
+
export var isMenuFooterSectionKey = function isMenuFooterSectionKey(key) {
|
|
5
|
+
return key.endsWith(MENU_FOOTER_SECTION_KEY_SUFFIX);
|
|
6
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { SECTION_OVERFLOW_ITEM_KEY_SUFFIX } from './SECTION_OVERFLOW_ITEM_KEY_SUFFIX';
|
|
2
|
+
|
|
3
|
+
/** Identifies items reserved for revealing the remainder of a type-ahead section. */
|
|
4
|
+
export var isSectionOverflowItemKey = function isSectionOverflowItemKey(key) {
|
|
5
|
+
return key.endsWith(SECTION_OVERFLOW_ITEM_KEY_SUFFIX);
|
|
6
|
+
};
|
|
@@ -21,7 +21,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
|
21
21
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
22
22
|
import Layer from '../Layer';
|
|
23
23
|
var packageName = "@atlaskit/editor-common";
|
|
24
|
-
var packageVersion = "117.1.
|
|
24
|
+
var packageVersion = "117.1.1";
|
|
25
25
|
var halfFocusRing = 1;
|
|
26
26
|
var dropOffset = '0, 8';
|
|
27
27
|
var fadeIn = keyframes({
|
|
@@ -53,7 +53,7 @@ type ListOutdentedAEP = TrackAEP<ACTION.OUTDENTED, ACTION_SUBJECT.LIST, ACTION_S
|
|
|
53
53
|
inputMethod: INPUT_METHOD;
|
|
54
54
|
} & CommonListAnalyticsAttributes & RestartListsAttributesForListOutdented, undefined>;
|
|
55
55
|
type ListInsertedAEP = TrackAEP<ACTION.INSERTED, ACTION_SUBJECT.LIST, ACTION_SUBJECT_ID.FORMAT_LIST_BULLET | ACTION_SUBJECT_ID.FORMAT_LIST_NUMBER, {
|
|
56
|
-
inputMethod: INPUT_METHOD.FORMATTING | INPUT_METHOD.KEYBOARD | INPUT_METHOD.TOOLBAR | INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.FLOATING_TB;
|
|
56
|
+
inputMethod: INPUT_METHOD.FORMATTING | INPUT_METHOD.KEYBOARD | INPUT_METHOD.TOOLBAR | INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.ELEMENT_BROWSER | INPUT_METHOD.FLOATING_TB;
|
|
57
57
|
joinScenario?: JOIN_SCENARIOS_WHEN_TYPING_TO_INSERT_LIST;
|
|
58
58
|
listStartNumber?: number;
|
|
59
59
|
}, undefined, NonRequiredAttributes>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
+
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
4
|
+
import type { INPUT_METHOD } from '../analytics';
|
|
5
|
+
import type { TypeAheadInsert } from '../types';
|
|
6
|
+
type Props = {
|
|
7
|
+
ariaLabel?: string;
|
|
8
|
+
iconBefore?: React.ReactNode;
|
|
9
|
+
isDisabled?: boolean;
|
|
10
|
+
onSelect: (context: OnSelectContext) => Transaction | false | void;
|
|
11
|
+
shortcut?: string;
|
|
12
|
+
shouldWrapIcon?: boolean;
|
|
13
|
+
title: string;
|
|
14
|
+
};
|
|
15
|
+
export type OnSelectContext = {
|
|
16
|
+
editorView: EditorView;
|
|
17
|
+
insert: TypeAheadInsert;
|
|
18
|
+
source: INPUT_METHOD.ELEMENT_BROWSER | INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.TOOLBAR;
|
|
19
|
+
};
|
|
20
|
+
export declare const QuickInsertMenuItem: ({ ariaLabel, iconBefore, isDisabled, onSelect, shortcut, shouldWrapIcon, title, }: Props) => React.JSX.Element;
|
|
21
|
+
export {};
|
|
@@ -38,7 +38,83 @@ export declare const OTHER_SECTION: {
|
|
|
38
38
|
readonly key: 'quick-insert-other-section';
|
|
39
39
|
readonly type: 'menu-section';
|
|
40
40
|
};
|
|
41
|
+
export declare const VIEW_ALL_ELEMENTS_MENU_ITEM: {
|
|
42
|
+
readonly key: 'quick-insert-view-all-elements-menu-item';
|
|
43
|
+
readonly type: 'menu-item';
|
|
44
|
+
};
|
|
41
45
|
export declare const TABLE_MENU_ITEM: {
|
|
42
46
|
readonly key: 'quick-insert-table-menu-item';
|
|
43
47
|
readonly type: 'menu-item';
|
|
44
48
|
};
|
|
49
|
+
export declare const INFO_PANEL_MENU_ITEM: {
|
|
50
|
+
readonly key: 'quick-insert-info-panel-menu-item';
|
|
51
|
+
readonly type: 'menu-item';
|
|
52
|
+
};
|
|
53
|
+
export declare const NOTE_PANEL_MENU_ITEM: {
|
|
54
|
+
readonly key: 'quick-insert-note-panel-menu-item';
|
|
55
|
+
readonly type: 'menu-item';
|
|
56
|
+
};
|
|
57
|
+
export declare const SUCCESS_PANEL_MENU_ITEM: {
|
|
58
|
+
readonly key: 'quick-insert-success-panel-menu-item';
|
|
59
|
+
readonly type: 'menu-item';
|
|
60
|
+
};
|
|
61
|
+
export declare const WARNING_PANEL_MENU_ITEM: {
|
|
62
|
+
readonly key: 'quick-insert-warning-panel-menu-item';
|
|
63
|
+
readonly type: 'menu-item';
|
|
64
|
+
};
|
|
65
|
+
export declare const ERROR_PANEL_MENU_ITEM: {
|
|
66
|
+
readonly key: 'quick-insert-error-panel-menu-item';
|
|
67
|
+
readonly type: 'menu-item';
|
|
68
|
+
};
|
|
69
|
+
export declare const CUSTOM_PANEL_MENU_ITEM: {
|
|
70
|
+
readonly key: 'quick-insert-custom-panel-menu-item';
|
|
71
|
+
readonly type: 'menu-item';
|
|
72
|
+
};
|
|
73
|
+
export declare const MEDIA_INSERT_MENU_ITEM: {
|
|
74
|
+
readonly key: 'quick-insert-media-insert-menu-item';
|
|
75
|
+
readonly type: 'menu-item';
|
|
76
|
+
};
|
|
77
|
+
export declare const EMOJI_MENU_ITEM: {
|
|
78
|
+
readonly key: 'quick-insert-emoji-menu-item';
|
|
79
|
+
readonly type: 'menu-item';
|
|
80
|
+
};
|
|
81
|
+
export declare const HYPERLINK_MENU_ITEM: {
|
|
82
|
+
readonly key: 'quick-insert-hyperlink-menu-item';
|
|
83
|
+
readonly type: 'menu-item';
|
|
84
|
+
};
|
|
85
|
+
export declare const LOOM_MENU_ITEM: {
|
|
86
|
+
readonly key: 'quick-insert-loom-menu-item';
|
|
87
|
+
readonly type: 'menu-item';
|
|
88
|
+
};
|
|
89
|
+
export declare const UNORDERED_LIST_MENU_ITEM: {
|
|
90
|
+
readonly key: 'quick-insert-unordered-list-menu-item';
|
|
91
|
+
readonly type: 'menu-item';
|
|
92
|
+
};
|
|
93
|
+
export declare const ORDERED_LIST_MENU_ITEM: {
|
|
94
|
+
readonly key: 'quick-insert-ordered-list-menu-item';
|
|
95
|
+
readonly type: 'menu-item';
|
|
96
|
+
};
|
|
97
|
+
export declare const STATUS_MENU_ITEM: {
|
|
98
|
+
readonly key: 'quick-insert-status-menu-item';
|
|
99
|
+
readonly type: 'menu-item';
|
|
100
|
+
};
|
|
101
|
+
export declare const DATE_MENU_ITEM: {
|
|
102
|
+
readonly key: 'quick-insert-date-menu-item';
|
|
103
|
+
readonly type: 'menu-item';
|
|
104
|
+
};
|
|
105
|
+
export declare const ASK_ROVO_MENU_ITEM: {
|
|
106
|
+
readonly key: 'quick-insert-ask-rovo-menu-item';
|
|
107
|
+
readonly type: 'menu-item';
|
|
108
|
+
};
|
|
109
|
+
export declare const JIRA_WORK_ITEMS_MENU_ITEM: {
|
|
110
|
+
readonly key: 'quick-insert-jira-work-items-menu-item';
|
|
111
|
+
readonly type: 'menu-item';
|
|
112
|
+
};
|
|
113
|
+
export declare const ASSETS_MENU_ITEM: {
|
|
114
|
+
readonly key: 'quick-insert-assets-menu-item';
|
|
115
|
+
readonly type: 'menu-item';
|
|
116
|
+
};
|
|
117
|
+
export declare const getBlockTemplateMenuItem: (id: string) => {
|
|
118
|
+
readonly key: string;
|
|
119
|
+
readonly type: 'menu-item';
|
|
120
|
+
};
|
|
@@ -1,87 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
description: string;
|
|
6
|
-
};
|
|
7
|
-
insert: {
|
|
8
|
-
id: string;
|
|
9
|
-
defaultMessage: string;
|
|
10
|
-
description: string;
|
|
11
|
-
};
|
|
12
|
-
close: {
|
|
13
|
-
id: string;
|
|
14
|
-
defaultMessage: string;
|
|
15
|
-
description: string;
|
|
16
|
-
};
|
|
17
|
-
all: {
|
|
18
|
-
id: string;
|
|
19
|
-
defaultMessage: string;
|
|
20
|
-
description: string;
|
|
21
|
-
};
|
|
22
|
-
formatting: {
|
|
23
|
-
id: string;
|
|
24
|
-
defaultMessage: string;
|
|
25
|
-
description: string;
|
|
26
|
-
};
|
|
27
|
-
'confluence-content': {
|
|
28
|
-
id: string;
|
|
29
|
-
defaultMessage: string;
|
|
30
|
-
description: string;
|
|
31
|
-
};
|
|
32
|
-
media: {
|
|
33
|
-
id: string;
|
|
34
|
-
defaultMessage: string;
|
|
35
|
-
description: string;
|
|
36
|
-
};
|
|
37
|
-
visuals: {
|
|
38
|
-
id: string;
|
|
39
|
-
defaultMessage: string;
|
|
40
|
-
description: string;
|
|
41
|
-
};
|
|
42
|
-
navigation: {
|
|
43
|
-
id: string;
|
|
44
|
-
defaultMessage: string;
|
|
45
|
-
description: string;
|
|
46
|
-
};
|
|
47
|
-
'external-content': {
|
|
48
|
-
id: string;
|
|
49
|
-
defaultMessage: string;
|
|
50
|
-
description: string;
|
|
51
|
-
};
|
|
52
|
-
communication: {
|
|
53
|
-
id: string;
|
|
54
|
-
defaultMessage: string;
|
|
55
|
-
description: string;
|
|
56
|
-
};
|
|
57
|
-
reporting: {
|
|
58
|
-
id: string;
|
|
59
|
-
defaultMessage: string;
|
|
60
|
-
description: string;
|
|
61
|
-
};
|
|
62
|
-
admin: {
|
|
63
|
-
id: string;
|
|
64
|
-
defaultMessage: string;
|
|
65
|
-
description: string;
|
|
66
|
-
};
|
|
67
|
-
development: {
|
|
68
|
-
id: string;
|
|
69
|
-
defaultMessage: string;
|
|
70
|
-
description: string;
|
|
71
|
-
};
|
|
72
|
-
AI: {
|
|
73
|
-
id: string;
|
|
74
|
-
defaultMessage: string;
|
|
75
|
-
description: string;
|
|
76
|
-
};
|
|
77
|
-
featuredWhiteboardDescription: {
|
|
78
|
-
id: string;
|
|
79
|
-
defaultMessage: string;
|
|
80
|
-
description: string;
|
|
81
|
-
};
|
|
82
|
-
browse: {
|
|
83
|
-
id: string;
|
|
84
|
-
defaultMessage: string;
|
|
85
|
-
description: string;
|
|
86
|
-
};
|
|
87
|
-
};
|
|
1
|
+
import { type MessageDescriptor } from 'react-intl';
|
|
2
|
+
type Messages<Keys extends string> = Record<Keys, MessageDescriptor>;
|
|
3
|
+
export declare const messages: Messages<'admin' | 'AI' | 'all' | 'browse' | 'categoryBlockTemplates' | 'categoryDataAndCharts' | 'categoryEmbed' | 'categoryMedia' | 'categoryOther' | 'categoryRecommended' | 'categoryRovo' | 'categoryStructure' | 'categoryTextFormatting' | 'close' | 'communication' | 'confluence-content' | 'development' | 'external-content' | 'featuredWhiteboardDescription' | 'formatting' | 'help' | 'insert' | 'media' | 'navigation' | 'reporting' | 'visuals'>;
|
|
4
|
+
export {};
|
|
@@ -9,6 +9,32 @@ export declare const QUICK_INSERT_MENU_RANK: {
|
|
|
9
9
|
readonly 'quick-insert-structure-section': 1;
|
|
10
10
|
readonly 'quick-insert-text-formatting-section': 4;
|
|
11
11
|
};
|
|
12
|
-
export declare const
|
|
13
|
-
readonly 'quick-insert-
|
|
12
|
+
export declare const STRUCTURE_SECTION_RANK: {
|
|
13
|
+
readonly 'quick-insert-custom-panel-menu-item': 1400;
|
|
14
|
+
readonly 'quick-insert-date-menu-item': 400;
|
|
15
|
+
readonly 'quick-insert-error-panel-menu-item': 1300;
|
|
16
|
+
readonly 'quick-insert-info-panel-menu-item': 900;
|
|
17
|
+
readonly 'quick-insert-note-panel-menu-item': 1000;
|
|
18
|
+
readonly 'quick-insert-status-menu-item': 300;
|
|
19
|
+
readonly 'quick-insert-success-panel-menu-item': 1100;
|
|
20
|
+
readonly 'quick-insert-table-menu-item': 200;
|
|
21
|
+
readonly 'quick-insert-warning-panel-menu-item': 1200;
|
|
14
22
|
};
|
|
23
|
+
export declare const MEDIA_SECTION_RANK: {
|
|
24
|
+
readonly 'quick-insert-emoji-menu-item': 300;
|
|
25
|
+
readonly 'quick-insert-hyperlink-menu-item': 200;
|
|
26
|
+
readonly 'quick-insert-loom-menu-item': 400;
|
|
27
|
+
readonly 'quick-insert-media-insert-menu-item': 100;
|
|
28
|
+
};
|
|
29
|
+
export declare const TEXT_FORMATTING_SECTION_RANK: {
|
|
30
|
+
readonly 'quick-insert-ordered-list-menu-item': 1200;
|
|
31
|
+
readonly 'quick-insert-unordered-list-menu-item': 1100;
|
|
32
|
+
};
|
|
33
|
+
export declare const ROVO_SECTION_RANK: {
|
|
34
|
+
readonly 'quick-insert-ask-rovo-menu-item': 100;
|
|
35
|
+
};
|
|
36
|
+
export declare const DATA_AND_CHARTS_SECTION_RANK: {
|
|
37
|
+
readonly 'quick-insert-assets-menu-item': 500;
|
|
38
|
+
readonly 'quick-insert-jira-work-items-menu-item': 300;
|
|
39
|
+
};
|
|
40
|
+
export declare const CATEGORY_VIEW_MORE_RANK: number;
|