@atlaskit/editor-plugin-type-ahead 2.0.1 → 2.0.3
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 +18 -0
- package/dist/cjs/pm-plugins/decorations.js +1 -1
- package/dist/cjs/ui/ContentComponent.js +1 -1
- package/dist/cjs/ui/InputQuery.js +1 -1
- package/dist/cjs/ui/modern/TypeAheadMenu.js +12 -5
- package/dist/cjs/ui/modern/TypeAheadPopup.js +4 -2
- package/dist/es2019/pm-plugins/decorations.js +1 -1
- package/dist/es2019/ui/ContentComponent.js +1 -1
- package/dist/es2019/ui/InputQuery.js +1 -1
- package/dist/es2019/ui/modern/TypeAheadMenu.js +9 -1
- package/dist/es2019/ui/modern/TypeAheadPopup.js +4 -2
- package/dist/esm/pm-plugins/decorations.js +1 -1
- package/dist/esm/ui/ContentComponent.js +1 -1
- package/dist/esm/ui/InputQuery.js +1 -1
- package/dist/esm/ui/modern/TypeAheadMenu.js +12 -5
- package/dist/esm/ui/modern/TypeAheadPopup.js +4 -2
- package/dist/types/ui/modern/TypeAheadPopup.d.ts +3 -0
- package/dist/types-ts4.5/ui/modern/TypeAheadPopup.d.ts +3 -0
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-type-ahead
|
|
2
2
|
|
|
3
|
+
## 2.0.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#120431](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/120431)
|
|
8
|
+
[`17173ce340cdc`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/17173ce340cdc) -
|
|
9
|
+
[ED-26763] Support inserting selected item by Enter
|
|
10
|
+
|
|
11
|
+
## 2.0.2
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [#120426](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/120426)
|
|
16
|
+
[`1fc7b1519dbcf`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1fc7b1519dbcf) -
|
|
17
|
+
Uses a separate FF for the new QuickInsert and Right rail to split them from the other Editor
|
|
18
|
+
Controls features.
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
3
21
|
## 2.0.1
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -63,7 +63,7 @@ var factoryDecorations = exports.factoryDecorations = function factoryDecoration
|
|
|
63
63
|
typeaheadComponent.dataset.typeAhead = _constants.TYPE_AHEAD_DECORATION_DATA_ATTRIBUTE;
|
|
64
64
|
typeaheadComponent.style.color = "var(--ds-text-accent-blue, ".concat(_colors.B400, ")");
|
|
65
65
|
typeaheadComponent.style.backgroundColor = 'transparent';
|
|
66
|
-
if ((0, _experiments.editorExperiment)('
|
|
66
|
+
if ((0, _experiments.editorExperiment)('platform_editor_insertion', 'variant1')) {
|
|
67
67
|
// As part of controls work, we add placeholder `Search` to quick insert command
|
|
68
68
|
// This style is to prevent `/Search` being wrapped if it's triggered at the end of the line
|
|
69
69
|
typeaheadComponent.style.whiteSpace = 'nowrap';
|
|
@@ -23,7 +23,7 @@ function ContentComponent(_ref) {
|
|
|
23
23
|
}
|
|
24
24
|
if (
|
|
25
25
|
// TODO: Also requires a check for editor appearance (needs to be enabled for full-page/full-width editor only ?)
|
|
26
|
-
!(0, _experiments.editorExperiment)('
|
|
26
|
+
!(0, _experiments.editorExperiment)('platform_editor_insertion', 'control') && ((_typeAheadState$trigg = typeAheadState.triggerHandler) === null || _typeAheadState$trigg === void 0 ? void 0 : _typeAheadState$trigg.id) === _typeAhead.TypeAheadAvailableNodes.QUICK_INSERT) {
|
|
27
27
|
return /*#__PURE__*/_react.default.createElement(_TypeAheadMenu.TypeAheadMenu, {
|
|
28
28
|
editorView: editorView,
|
|
29
29
|
popupMountRef: popupMountRef,
|
|
@@ -108,7 +108,7 @@ var InputQuery = exports.InputQuery = /*#__PURE__*/_react.default.memo(function
|
|
|
108
108
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
109
109
|
query = _useState2[0],
|
|
110
110
|
setQuery = _useState2[1];
|
|
111
|
-
var isEditorControlsEnabled = (0, _experiments.editorExperiment)('
|
|
111
|
+
var isEditorControlsEnabled = (0, _experiments.editorExperiment)('platform_editor_insertion', 'variant1');
|
|
112
112
|
var _useState3 = (0, _react.useState)(isEditorControlsEnabled && triggerQueryPrefix === '/'),
|
|
113
113
|
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
114
114
|
showPlaceholder = _useState4[0],
|
|
@@ -8,6 +8,7 @@ exports.TypeAheadMenu = void 0;
|
|
|
8
8
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
9
9
|
var _react = _interopRequireDefault(require("react"));
|
|
10
10
|
var _typeAhead = require("@atlaskit/editor-common/type-ahead");
|
|
11
|
+
var _updateSelectedIndex = require("../../pm-plugins/commands/update-selected-index");
|
|
11
12
|
var _useItemInsert3 = require("../hooks/use-item-insert");
|
|
12
13
|
var _TypeAheadPopup = require("./TypeAheadPopup");
|
|
13
14
|
var TypeAheadMenu = exports.TypeAheadMenu = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
@@ -30,6 +31,12 @@ var TypeAheadMenu = exports.TypeAheadMenu = /*#__PURE__*/_react.default.memo(fun
|
|
|
30
31
|
_useItemInsert2 = (0, _slicedToArray2.default)(_useItemInsert, 2),
|
|
31
32
|
onItemInsert = _useItemInsert2[0],
|
|
32
33
|
onTextInsert = _useItemInsert2[1];
|
|
34
|
+
var setSelectedItem = _react.default.useCallback(function (_ref2) {
|
|
35
|
+
var nextIndex = _ref2.index;
|
|
36
|
+
queueMicrotask(function () {
|
|
37
|
+
(0, _updateSelectedIndex.updateSelectedIndex)(nextIndex, api)(editorView.state, editorView.dispatch);
|
|
38
|
+
});
|
|
39
|
+
}, [editorView, api]);
|
|
33
40
|
var insertItem = _react.default.useCallback(function () {
|
|
34
41
|
var mode = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _typeAhead.SelectItemMode.SELECTED;
|
|
35
42
|
var index = arguments.length > 1 ? arguments[1] : undefined;
|
|
@@ -41,10 +48,10 @@ var TypeAheadMenu = exports.TypeAheadMenu = /*#__PURE__*/_react.default.memo(fun
|
|
|
41
48
|
});
|
|
42
49
|
});
|
|
43
50
|
}, [onItemInsert, query]);
|
|
44
|
-
var cancel = _react.default.useCallback(function (
|
|
45
|
-
var setSelectionAt =
|
|
46
|
-
addPrefixTrigger =
|
|
47
|
-
forceFocusOnEditor =
|
|
51
|
+
var cancel = _react.default.useCallback(function (_ref3) {
|
|
52
|
+
var setSelectionAt = _ref3.setSelectionAt,
|
|
53
|
+
addPrefixTrigger = _ref3.addPrefixTrigger,
|
|
54
|
+
forceFocusOnEditor = _ref3.forceFocusOnEditor;
|
|
48
55
|
var fullQuery = addPrefixTrigger ? "".concat(triggerHandler === null || triggerHandler === void 0 ? void 0 : triggerHandler.trigger).concat(query) : query;
|
|
49
56
|
onTextInsert({
|
|
50
57
|
forceFocusOnEditor: forceFocusOnEditor,
|
|
@@ -65,8 +72,8 @@ var TypeAheadMenu = exports.TypeAheadMenu = /*#__PURE__*/_react.default.memo(fun
|
|
|
65
72
|
items: items,
|
|
66
73
|
errorInfo: errorInfo
|
|
67
74
|
// selectedIndex={selectedIndex}
|
|
68
|
-
// setSelectedItem={setSelectedItem}
|
|
69
75
|
,
|
|
76
|
+
setSelectedItem: setSelectedItem,
|
|
70
77
|
onItemInsert: insertItem,
|
|
71
78
|
decorationSet: decorationSet,
|
|
72
79
|
isEmptyQuery: !query,
|
|
@@ -60,7 +60,8 @@ var TypeAheadPopup = exports.TypeAheadPopup = /*#__PURE__*/_react.default.memo(f
|
|
|
60
60
|
isEmptyQuery = props.isEmptyQuery,
|
|
61
61
|
cancel = props.cancel,
|
|
62
62
|
api = props.api,
|
|
63
|
-
query = props.query
|
|
63
|
+
query = props.query,
|
|
64
|
+
setSelectedItem = props.setSelectedItem;
|
|
64
65
|
var ref = (0, _react.useRef)(null);
|
|
65
66
|
var defaultMenuHeight = DEFAULT_TYPEAHEAD_MENU_HEIGHT;
|
|
66
67
|
var startTime = (0, _react.useMemo)(function () {
|
|
@@ -293,7 +294,8 @@ var TypeAheadPopup = exports.TypeAheadPopup = /*#__PURE__*/_react.default.memo(f
|
|
|
293
294
|
}, errorInfo ? (0, _react2.jsx)(_TypeAheadErrorFallback.TypeAheadErrorFallback, null) : (0, _react2.jsx)(_react.default.Fragment, null, (0, _react2.jsx)(_editorElementBrowser.QuickInsertPanel, {
|
|
294
295
|
items: items,
|
|
295
296
|
onItemInsert: onItemInsert,
|
|
296
|
-
query: query
|
|
297
|
+
query: query,
|
|
298
|
+
setSelectedItem: setSelectedItem
|
|
297
299
|
}), (api === null || api === void 0 ? void 0 : api.contextPanel) && (0, _react2.jsx)(_ViewAllButton.ViewAllButton, {
|
|
298
300
|
items: items,
|
|
299
301
|
editorApi: api,
|
|
@@ -62,7 +62,7 @@ export const factoryDecorations = ({
|
|
|
62
62
|
typeaheadComponent.dataset.typeAhead = TYPE_AHEAD_DECORATION_DATA_ATTRIBUTE;
|
|
63
63
|
typeaheadComponent.style.color = `var(--ds-text-accent-blue, ${B400})`;
|
|
64
64
|
typeaheadComponent.style.backgroundColor = 'transparent';
|
|
65
|
-
if (editorExperiment('
|
|
65
|
+
if (editorExperiment('platform_editor_insertion', 'variant1')) {
|
|
66
66
|
// As part of controls work, we add placeholder `Search` to quick insert command
|
|
67
67
|
// This style is to prevent `/Search` being wrapped if it's triggered at the end of the line
|
|
68
68
|
typeaheadComponent.style.whiteSpace = 'nowrap';
|
|
@@ -18,7 +18,7 @@ export function ContentComponent({
|
|
|
18
18
|
}
|
|
19
19
|
if (
|
|
20
20
|
// TODO: Also requires a check for editor appearance (needs to be enabled for full-page/full-width editor only ?)
|
|
21
|
-
!editorExperiment('
|
|
21
|
+
!editorExperiment('platform_editor_insertion', 'control') && ((_typeAheadState$trigg = typeAheadState.triggerHandler) === null || _typeAheadState$trigg === void 0 ? void 0 : _typeAheadState$trigg.id) === TypeAheadAvailableNodes.QUICK_INSERT) {
|
|
22
22
|
return /*#__PURE__*/React.createElement(TypeAheadMenuModern, {
|
|
23
23
|
editorView: editorView,
|
|
24
24
|
popupMountRef: popupMountRef,
|
|
@@ -94,7 +94,7 @@ export const InputQuery = /*#__PURE__*/React.memo(({
|
|
|
94
94
|
const ref = useRef(document.createElement('span'));
|
|
95
95
|
const inputRef = useRef(null);
|
|
96
96
|
const [query, setQuery] = useState(null);
|
|
97
|
-
const isEditorControlsEnabled = editorExperiment('
|
|
97
|
+
const isEditorControlsEnabled = editorExperiment('platform_editor_insertion', 'variant1');
|
|
98
98
|
const [showPlaceholder, setShowPlaceholder] = useState(isEditorControlsEnabled && triggerQueryPrefix === '/');
|
|
99
99
|
const cleanedInputContent = useCallback(() => {
|
|
100
100
|
var _ref$current;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { SelectItemMode } from '@atlaskit/editor-common/type-ahead';
|
|
3
|
+
import { updateSelectedIndex } from '../../pm-plugins/commands/update-selected-index';
|
|
3
4
|
import { useItemInsert } from '../hooks/use-item-insert';
|
|
4
5
|
import { TypeAheadPopup as TypeAheadPopupModern } from './TypeAheadPopup';
|
|
5
6
|
export const TypeAheadMenu = /*#__PURE__*/React.memo(({
|
|
@@ -22,6 +23,13 @@ export const TypeAheadMenu = /*#__PURE__*/React.memo(({
|
|
|
22
23
|
// Ignored via go/ees005
|
|
23
24
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
24
25
|
triggerHandler, editorView, items, api);
|
|
26
|
+
const setSelectedItem = React.useCallback(({
|
|
27
|
+
index: nextIndex
|
|
28
|
+
}) => {
|
|
29
|
+
queueMicrotask(() => {
|
|
30
|
+
updateSelectedIndex(nextIndex, api)(editorView.state, editorView.dispatch);
|
|
31
|
+
});
|
|
32
|
+
}, [editorView, api]);
|
|
25
33
|
const insertItem = React.useCallback((mode = SelectItemMode.SELECTED, index) => {
|
|
26
34
|
queueMicrotask(() => {
|
|
27
35
|
onItemInsert({
|
|
@@ -56,8 +64,8 @@ export const TypeAheadMenu = /*#__PURE__*/React.memo(({
|
|
|
56
64
|
items: items,
|
|
57
65
|
errorInfo: errorInfo
|
|
58
66
|
// selectedIndex={selectedIndex}
|
|
59
|
-
// setSelectedItem={setSelectedItem}
|
|
60
67
|
,
|
|
68
|
+
setSelectedItem: setSelectedItem,
|
|
61
69
|
onItemInsert: insertItem,
|
|
62
70
|
decorationSet: decorationSet,
|
|
63
71
|
isEmptyQuery: !query,
|
|
@@ -49,7 +49,8 @@ export const TypeAheadPopup = /*#__PURE__*/React.memo(props => {
|
|
|
49
49
|
isEmptyQuery,
|
|
50
50
|
cancel,
|
|
51
51
|
api,
|
|
52
|
-
query
|
|
52
|
+
query,
|
|
53
|
+
setSelectedItem
|
|
53
54
|
} = props;
|
|
54
55
|
const ref = useRef(null);
|
|
55
56
|
const defaultMenuHeight = DEFAULT_TYPEAHEAD_MENU_HEIGHT;
|
|
@@ -284,7 +285,8 @@ export const TypeAheadPopup = /*#__PURE__*/React.memo(props => {
|
|
|
284
285
|
}, errorInfo ? jsx(TypeAheadErrorFallback, null) : jsx(React.Fragment, null, jsx(QuickInsertPanel, {
|
|
285
286
|
items: items,
|
|
286
287
|
onItemInsert: onItemInsert,
|
|
287
|
-
query: query
|
|
288
|
+
query: query,
|
|
289
|
+
setSelectedItem: setSelectedItem
|
|
288
290
|
}), (api === null || api === void 0 ? void 0 : api.contextPanel) && jsx(ViewAllButton, {
|
|
289
291
|
items: items,
|
|
290
292
|
editorApi: api,
|
|
@@ -56,7 +56,7 @@ export var factoryDecorations = function factoryDecorations(_ref) {
|
|
|
56
56
|
typeaheadComponent.dataset.typeAhead = TYPE_AHEAD_DECORATION_DATA_ATTRIBUTE;
|
|
57
57
|
typeaheadComponent.style.color = "var(--ds-text-accent-blue, ".concat(B400, ")");
|
|
58
58
|
typeaheadComponent.style.backgroundColor = 'transparent';
|
|
59
|
-
if (editorExperiment('
|
|
59
|
+
if (editorExperiment('platform_editor_insertion', 'variant1')) {
|
|
60
60
|
// As part of controls work, we add placeholder `Search` to quick insert command
|
|
61
61
|
// This style is to prevent `/Search` being wrapped if it's triggered at the end of the line
|
|
62
62
|
typeaheadComponent.style.whiteSpace = 'nowrap';
|
|
@@ -16,7 +16,7 @@ export function ContentComponent(_ref) {
|
|
|
16
16
|
}
|
|
17
17
|
if (
|
|
18
18
|
// TODO: Also requires a check for editor appearance (needs to be enabled for full-page/full-width editor only ?)
|
|
19
|
-
!editorExperiment('
|
|
19
|
+
!editorExperiment('platform_editor_insertion', 'control') && ((_typeAheadState$trigg = typeAheadState.triggerHandler) === null || _typeAheadState$trigg === void 0 ? void 0 : _typeAheadState$trigg.id) === TypeAheadAvailableNodes.QUICK_INSERT) {
|
|
20
20
|
return /*#__PURE__*/React.createElement(TypeAheadMenuModern, {
|
|
21
21
|
editorView: editorView,
|
|
22
22
|
popupMountRef: popupMountRef,
|
|
@@ -97,7 +97,7 @@ export var InputQuery = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
97
97
|
_useState2 = _slicedToArray(_useState, 2),
|
|
98
98
|
query = _useState2[0],
|
|
99
99
|
setQuery = _useState2[1];
|
|
100
|
-
var isEditorControlsEnabled = editorExperiment('
|
|
100
|
+
var isEditorControlsEnabled = editorExperiment('platform_editor_insertion', 'variant1');
|
|
101
101
|
var _useState3 = useState(isEditorControlsEnabled && triggerQueryPrefix === '/'),
|
|
102
102
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
103
103
|
showPlaceholder = _useState4[0],
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { SelectItemMode } from '@atlaskit/editor-common/type-ahead';
|
|
4
|
+
import { updateSelectedIndex } from '../../pm-plugins/commands/update-selected-index';
|
|
4
5
|
import { useItemInsert } from '../hooks/use-item-insert';
|
|
5
6
|
import { TypeAheadPopup as TypeAheadPopupModern } from './TypeAheadPopup';
|
|
6
7
|
export var TypeAheadMenu = /*#__PURE__*/React.memo(function (_ref) {
|
|
@@ -23,6 +24,12 @@ export var TypeAheadMenu = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
23
24
|
_useItemInsert2 = _slicedToArray(_useItemInsert, 2),
|
|
24
25
|
onItemInsert = _useItemInsert2[0],
|
|
25
26
|
onTextInsert = _useItemInsert2[1];
|
|
27
|
+
var setSelectedItem = React.useCallback(function (_ref2) {
|
|
28
|
+
var nextIndex = _ref2.index;
|
|
29
|
+
queueMicrotask(function () {
|
|
30
|
+
updateSelectedIndex(nextIndex, api)(editorView.state, editorView.dispatch);
|
|
31
|
+
});
|
|
32
|
+
}, [editorView, api]);
|
|
26
33
|
var insertItem = React.useCallback(function () {
|
|
27
34
|
var mode = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : SelectItemMode.SELECTED;
|
|
28
35
|
var index = arguments.length > 1 ? arguments[1] : undefined;
|
|
@@ -34,10 +41,10 @@ export var TypeAheadMenu = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
34
41
|
});
|
|
35
42
|
});
|
|
36
43
|
}, [onItemInsert, query]);
|
|
37
|
-
var cancel = React.useCallback(function (
|
|
38
|
-
var setSelectionAt =
|
|
39
|
-
addPrefixTrigger =
|
|
40
|
-
forceFocusOnEditor =
|
|
44
|
+
var cancel = React.useCallback(function (_ref3) {
|
|
45
|
+
var setSelectionAt = _ref3.setSelectionAt,
|
|
46
|
+
addPrefixTrigger = _ref3.addPrefixTrigger,
|
|
47
|
+
forceFocusOnEditor = _ref3.forceFocusOnEditor;
|
|
41
48
|
var fullQuery = addPrefixTrigger ? "".concat(triggerHandler === null || triggerHandler === void 0 ? void 0 : triggerHandler.trigger).concat(query) : query;
|
|
42
49
|
onTextInsert({
|
|
43
50
|
forceFocusOnEditor: forceFocusOnEditor,
|
|
@@ -58,8 +65,8 @@ export var TypeAheadMenu = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
58
65
|
items: items,
|
|
59
66
|
errorInfo: errorInfo
|
|
60
67
|
// selectedIndex={selectedIndex}
|
|
61
|
-
// setSelectedItem={setSelectedItem}
|
|
62
68
|
,
|
|
69
|
+
setSelectedItem: setSelectedItem,
|
|
63
70
|
onItemInsert: insertItem,
|
|
64
71
|
decorationSet: decorationSet,
|
|
65
72
|
isEmptyQuery: !query,
|
|
@@ -49,7 +49,8 @@ export var TypeAheadPopup = /*#__PURE__*/React.memo(function (props) {
|
|
|
49
49
|
isEmptyQuery = props.isEmptyQuery,
|
|
50
50
|
cancel = props.cancel,
|
|
51
51
|
api = props.api,
|
|
52
|
-
query = props.query
|
|
52
|
+
query = props.query,
|
|
53
|
+
setSelectedItem = props.setSelectedItem;
|
|
53
54
|
var ref = useRef(null);
|
|
54
55
|
var defaultMenuHeight = DEFAULT_TYPEAHEAD_MENU_HEIGHT;
|
|
55
56
|
var startTime = useMemo(function () {
|
|
@@ -282,7 +283,8 @@ export var TypeAheadPopup = /*#__PURE__*/React.memo(function (props) {
|
|
|
282
283
|
}, errorInfo ? jsx(TypeAheadErrorFallback, null) : jsx(React.Fragment, null, jsx(QuickInsertPanel, {
|
|
283
284
|
items: items,
|
|
284
285
|
onItemInsert: onItemInsert,
|
|
285
|
-
query: query
|
|
286
|
+
query: query,
|
|
287
|
+
setSelectedItem: setSelectedItem
|
|
286
288
|
}), (api === null || api === void 0 ? void 0 : api.contextPanel) && jsx(ViewAllButton, {
|
|
287
289
|
items: items,
|
|
288
290
|
editorApi: api,
|
|
@@ -29,6 +29,9 @@ type TypeAheadPopupProps = {
|
|
|
29
29
|
forceFocusOnEditor: boolean;
|
|
30
30
|
}) => void;
|
|
31
31
|
api: ExtractInjectionAPI<TypeAheadPlugin> | undefined;
|
|
32
|
+
setSelectedItem?: (props: {
|
|
33
|
+
index: number;
|
|
34
|
+
}) => void;
|
|
32
35
|
};
|
|
33
36
|
export declare const TypeAheadPopup: React.MemoExoticComponent<(props: TypeAheadPopupProps) => jsx.JSX.Element>;
|
|
34
37
|
export {};
|
|
@@ -29,6 +29,9 @@ type TypeAheadPopupProps = {
|
|
|
29
29
|
forceFocusOnEditor: boolean;
|
|
30
30
|
}) => void;
|
|
31
31
|
api: ExtractInjectionAPI<TypeAheadPlugin> | undefined;
|
|
32
|
+
setSelectedItem?: (props: {
|
|
33
|
+
index: number;
|
|
34
|
+
}) => void;
|
|
32
35
|
};
|
|
33
36
|
export declare const TypeAheadPopup: React.MemoExoticComponent<(props: TypeAheadPopupProps) => jsx.JSX.Element>;
|
|
34
37
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-type-ahead",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.3",
|
|
4
4
|
"description": "Type-ahead plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -32,13 +32,13 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@atlaskit/adf-schema": "^47.2.1",
|
|
35
|
-
"@atlaskit/editor-common": "^100.
|
|
35
|
+
"@atlaskit/editor-common": "^100.4.0",
|
|
36
36
|
"@atlaskit/editor-element-browser": "^0.1.0",
|
|
37
37
|
"@atlaskit/editor-plugin-analytics": "^2.0.0",
|
|
38
38
|
"@atlaskit/editor-plugin-connectivity": "^2.0.0",
|
|
39
39
|
"@atlaskit/editor-plugin-context-panel": "^3.0.0",
|
|
40
40
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
41
|
-
"@atlaskit/editor-shared-styles": "^3.
|
|
41
|
+
"@atlaskit/editor-shared-styles": "^3.4.0",
|
|
42
42
|
"@atlaskit/heading": "^5.1.0",
|
|
43
43
|
"@atlaskit/icon": "^24.1.0",
|
|
44
44
|
"@atlaskit/menu": "^3.1.0",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"@atlaskit/primitives": "^14.1.0",
|
|
47
47
|
"@atlaskit/prosemirror-input-rules": "^3.3.0",
|
|
48
48
|
"@atlaskit/theme": "^17.0.0",
|
|
49
|
-
"@atlaskit/tmp-editor-statsig": "^3.
|
|
49
|
+
"@atlaskit/tmp-editor-statsig": "^3.3.0",
|
|
50
50
|
"@atlaskit/tokens": "^4.2.0",
|
|
51
51
|
"@babel/runtime": "^7.0.0",
|
|
52
52
|
"@emotion/react": "^11.7.1",
|