@atlaskit/editor-plugin-type-ahead 29.0.0 → 29.0.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 +6 -0
- package/dist/cjs/ui/TypeAheadList.js +16 -14
- package/dist/cjs/ui/registered-menu/TypeAheadMenuFooter.js +2 -2
- package/dist/cjs/ui/registered-menu/TypeAheadMenuRenderer.js +5 -4
- package/dist/es2019/ui/TypeAheadList.js +3 -1
- package/dist/es2019/ui/registered-menu/TypeAheadMenuFooter.js +1 -1
- package/dist/es2019/ui/registered-menu/TypeAheadMenuRenderer.js +2 -1
- package/dist/esm/ui/TypeAheadList.js +3 -1
- package/dist/esm/ui/registered-menu/TypeAheadMenuFooter.js +1 -1
- package/dist/esm/ui/registered-menu/TypeAheadMenuRenderer.js +2 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -20,7 +20,9 @@ var _typeAhead = require("@atlaskit/editor-common/type-ahead");
|
|
|
20
20
|
var _messages = require("@atlaskit/editor-common/type-ahead/messages");
|
|
21
21
|
var _menuGroup = _interopRequireDefault(require("@atlaskit/menu/menu-group"));
|
|
22
22
|
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
23
|
-
var
|
|
23
|
+
var _box = require("@atlaskit/primitives/compiled/box");
|
|
24
|
+
var _inline = require("@atlaskit/primitives/compiled/inline");
|
|
25
|
+
var _text = require("@atlaskit/primitives/compiled/text");
|
|
24
26
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
25
27
|
var _closeTypeAhead = require("../pm-plugins/commands/close-type-ahead");
|
|
26
28
|
var _updateSelectedIndex = require("../pm-plugins/commands/update-selected-index");
|
|
@@ -420,41 +422,41 @@ var TypeAheadListComponent = /*#__PURE__*/_react.default.memo(function (_ref4) {
|
|
|
420
422
|
onMouseMove: function onMouseMove(e) {
|
|
421
423
|
return _onMouseMove(e, currentRow);
|
|
422
424
|
}
|
|
423
|
-
}, currentRow.type === 'section' ? (0, _expValEquals.expValEquals)('platform_editor_agent_mentions', 'isEnabled', true) && (0, _fg.fg)('platform_editor_agent_mentions_drop_one_fixes') ? sectionLozenge ? (0, _react2.jsx)(
|
|
425
|
+
}, currentRow.type === 'section' ? (0, _expValEquals.expValEquals)('platform_editor_agent_mentions', 'isEnabled', true) && (0, _fg.fg)('platform_editor_agent_mentions_drop_one_fixes') ? sectionLozenge ? (0, _react2.jsx)(_box.Box, {
|
|
424
426
|
paddingInline: "space.150",
|
|
425
427
|
paddingBlockStart: "space.150",
|
|
426
428
|
paddingBlockEnd: "space.050"
|
|
427
|
-
}, (0, _react2.jsx)(
|
|
429
|
+
}, (0, _react2.jsx)(_inline.Inline, {
|
|
428
430
|
as: "span",
|
|
429
431
|
space: "space.075",
|
|
430
432
|
alignBlock: "center"
|
|
431
|
-
}, (0, _react2.jsx)(
|
|
433
|
+
}, (0, _react2.jsx)(_text.Text, {
|
|
432
434
|
as: "span",
|
|
433
435
|
size: "small",
|
|
434
436
|
color: "color.text.subtle",
|
|
435
437
|
weight: "medium"
|
|
436
|
-
}, currentRow.section.title), sectionLozenge)) : (0, _react2.jsx)(
|
|
438
|
+
}, currentRow.section.title), sectionLozenge)) : (0, _react2.jsx)(_box.Box, {
|
|
437
439
|
paddingInline: "space.150",
|
|
438
440
|
paddingBlockStart: "space.100",
|
|
439
441
|
paddingBlockEnd: "space.050"
|
|
440
|
-
}, (0, _react2.jsx)(
|
|
442
|
+
}, (0, _react2.jsx)(_text.Text, {
|
|
441
443
|
as: "span",
|
|
442
444
|
size: "small",
|
|
443
445
|
color: "color.text.subtle",
|
|
444
446
|
weight: "medium"
|
|
445
|
-
}, currentRow.section.title)) : (0, _react2.jsx)(
|
|
447
|
+
}, currentRow.section.title)) : (0, _react2.jsx)(_box.Box, {
|
|
446
448
|
paddingInline: "space.150",
|
|
447
449
|
paddingBlock: "space.050"
|
|
448
|
-
}, sectionLozenge ? (0, _react2.jsx)(
|
|
450
|
+
}, sectionLozenge ? (0, _react2.jsx)(_inline.Inline, {
|
|
449
451
|
as: "span",
|
|
450
452
|
space: "space.075",
|
|
451
453
|
alignBlock: "center"
|
|
452
|
-
}, (0, _react2.jsx)(
|
|
454
|
+
}, (0, _react2.jsx)(_text.Text, {
|
|
453
455
|
as: "span",
|
|
454
456
|
size: "small",
|
|
455
457
|
color: "color.text.subtle",
|
|
456
458
|
weight: "medium"
|
|
457
|
-
}, currentRow.section.title), sectionLozenge) : (0, _react2.jsx)(
|
|
459
|
+
}, currentRow.section.title), sectionLozenge) : (0, _react2.jsx)(_text.Text, {
|
|
458
460
|
as: "span",
|
|
459
461
|
size: "small",
|
|
460
462
|
color: "color.text.subtle",
|
|
@@ -483,17 +485,17 @@ var TypeAheadListComponent = /*#__PURE__*/_react.default.memo(function (_ref4) {
|
|
|
483
485
|
return null;
|
|
484
486
|
}
|
|
485
487
|
var menuGroupId = ((_decorationElement$qu2 = decorationElement.querySelector("[role='combobox']")) === null || _decorationElement$qu2 === void 0 ? void 0 : _decorationElement$qu2.getAttribute('aria-controls')) || _constants.TYPE_AHEAD_DECORATION_ELEMENT_ID;
|
|
486
|
-
var EmptyResultView = (0, _react2.jsx)(
|
|
488
|
+
var EmptyResultView = (0, _react2.jsx)(_box.Box, {
|
|
487
489
|
paddingBlock: "space.150",
|
|
488
490
|
paddingInline: "space.250"
|
|
489
|
-
}, (0, _react2.jsx)(
|
|
491
|
+
}, (0, _react2.jsx)(_text.Text, {
|
|
490
492
|
align: "center",
|
|
491
493
|
as: "p"
|
|
492
|
-
}, intl.formatMessage(_messages.typeAheadListMessages.emptySearchResults)), (0, _react2.jsx)(
|
|
494
|
+
}, intl.formatMessage(_messages.typeAheadListMessages.emptySearchResults)), (0, _react2.jsx)(_text.Text, {
|
|
493
495
|
align: "center",
|
|
494
496
|
as: "p"
|
|
495
497
|
}, intl.formatMessage(_messages.typeAheadListMessages.emptySearchResultsSuggestion, {
|
|
496
|
-
buttonName: (0, _react2.jsx)(
|
|
498
|
+
buttonName: (0, _react2.jsx)(_text.Text, {
|
|
497
499
|
weight: "medium"
|
|
498
500
|
}, intl.formatMessage(_insertBlock.toolbarInsertBlockMessages.viewMore))
|
|
499
501
|
})));
|
|
@@ -9,7 +9,7 @@ exports.TypeAheadMenuFooter = void 0;
|
|
|
9
9
|
require("./TypeAheadMenuFooter.compiled.css");
|
|
10
10
|
var _runtime = require("@compiled/react/runtime");
|
|
11
11
|
var _react = _interopRequireDefault(require("react"));
|
|
12
|
-
var
|
|
12
|
+
var _box = require("@atlaskit/primitives/compiled/box");
|
|
13
13
|
var styles = {
|
|
14
14
|
footer: "_1i531l7x _15a5nqa1 _uwhke4h9"
|
|
15
15
|
};
|
|
@@ -21,7 +21,7 @@ var TypeAheadMenuFooter = exports.TypeAheadMenuFooter = function TypeAheadMenuFo
|
|
|
21
21
|
registration = _ref.registration,
|
|
22
22
|
_ref$hasScrollPadding = _ref.hasScrollPadding,
|
|
23
23
|
hasScrollPadding = _ref$hasScrollPadding === void 0 ? false : _ref$hasScrollPadding;
|
|
24
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
24
|
+
return /*#__PURE__*/_react.default.createElement(_box.Box, {
|
|
25
25
|
onMouseMove: onMouseMove,
|
|
26
26
|
paddingBlockEnd: hasScrollPadding ? 'space.075' : undefined,
|
|
27
27
|
xcss: styles.footer
|
|
@@ -15,7 +15,8 @@ var _emptyState = require("@atlaskit/editor-common/quick-insert/empty-state");
|
|
|
15
15
|
var _registeredMenuModel = require("@atlaskit/editor-common/quick-insert/registered-menu-model");
|
|
16
16
|
var _useMenuListHeight2 = require("@atlaskit/editor-common/quick-insert/use-menu-list-height");
|
|
17
17
|
var _messages = require("@atlaskit/editor-common/type-ahead/messages");
|
|
18
|
-
var
|
|
18
|
+
var _box = require("@atlaskit/primitives/compiled/box");
|
|
19
|
+
var _text = require("@atlaskit/primitives/compiled/text");
|
|
19
20
|
var _createTypeAheadRowRenderer = require("./createTypeAheadRowRenderer");
|
|
20
21
|
var _getTypeAheadGlobalViewMoreId = require("./getTypeAheadGlobalViewMoreId");
|
|
21
22
|
var _PassThrough = require("./PassThrough");
|
|
@@ -129,7 +130,7 @@ var TypeAheadMenuRenderer = exports.TypeAheadMenuRenderer = function TypeAheadMe
|
|
|
129
130
|
var RootComponent = (_model$root$component = model.root.component) !== null && _model$root$component !== void 0 ? _model$root$component : _PassThrough.PassThrough;
|
|
130
131
|
var listMaxHeight = Math.max(0, maxHeight - (model.footer ? hasScrollPadding ? MENU_FOOTER_HEIGHT_WITH_SCROLL_PADDING : MENU_FOOTER_HEIGHT : 0));
|
|
131
132
|
var hasListboxContent = rows.length > 0 || model.footer !== undefined;
|
|
132
|
-
return /*#__PURE__*/_react.default.createElement(RootComponent, null, /*#__PURE__*/_react.default.createElement(
|
|
133
|
+
return /*#__PURE__*/_react.default.createElement(RootComponent, null, /*#__PURE__*/_react.default.createElement(_box.Box, {
|
|
133
134
|
"aria-label": hasListboxContent ? intl.formatMessage(listLabel) : undefined,
|
|
134
135
|
id: listId,
|
|
135
136
|
role: hasListboxContent ? 'listbox' : undefined
|
|
@@ -148,11 +149,11 @@ var TypeAheadMenuRenderer = exports.TypeAheadMenuRenderer = function TypeAheadMe
|
|
|
148
149
|
}) : query !== '' && ((_model$fallbackItems = model.fallbackItems) === null || _model$fallbackItems === void 0 ? void 0 : _model$fallbackItems.length) === 0 ? /*#__PURE__*/_react.default.createElement(_emptyState.QuickInsertEmptyState, {
|
|
149
150
|
mode: "inline",
|
|
150
151
|
spacing: "spacious"
|
|
151
|
-
}) : model.fallbackItems === undefined ? /*#__PURE__*/_react.default.createElement(
|
|
152
|
+
}) : model.fallbackItems === undefined ? /*#__PURE__*/_react.default.createElement(_box.Box, {
|
|
152
153
|
paddingBlock: "space.150",
|
|
153
154
|
paddingInline: "space.250",
|
|
154
155
|
role: "group"
|
|
155
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
156
|
+
}, /*#__PURE__*/_react.default.createElement(_text.Text, {
|
|
156
157
|
align: "center",
|
|
157
158
|
as: "p"
|
|
158
159
|
}, intl.formatMessage(_messages.typeAheadListMessages.emptySearchResults))) : null, model.footer && /*#__PURE__*/_react.default.createElement(_TypeAheadMenuFooter.TypeAheadMenuFooter, {
|
|
@@ -17,7 +17,9 @@ import { SelectItemMode } from '@atlaskit/editor-common/type-ahead';
|
|
|
17
17
|
import { typeAheadListMessages } from '@atlaskit/editor-common/type-ahead/messages';
|
|
18
18
|
import MenuGroup from '@atlaskit/menu/menu-group';
|
|
19
19
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
20
|
-
import { Box
|
|
20
|
+
import { Box } from '@atlaskit/primitives/compiled/box';
|
|
21
|
+
import { Inline } from '@atlaskit/primitives/compiled/inline';
|
|
22
|
+
import { Text } from '@atlaskit/primitives/compiled/text';
|
|
21
23
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
22
24
|
import { closeTypeAhead } from '../pm-plugins/commands/close-type-ahead';
|
|
23
25
|
import { updateSelectedIndex } from '../pm-plugins/commands/update-selected-index';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import "./TypeAheadMenuFooter.compiled.css";
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React from 'react';
|
|
5
|
-
import { Box } from '@atlaskit/primitives/compiled';
|
|
5
|
+
import { Box } from '@atlaskit/primitives/compiled/box';
|
|
6
6
|
const styles = {
|
|
7
7
|
footer: "_1i531l7x _15a5nqa1 _uwhke4h9"
|
|
8
8
|
};
|
|
@@ -6,7 +6,8 @@ import { QuickInsertEmptyState } from '@atlaskit/editor-common/quick-insert/empt
|
|
|
6
6
|
import { getQuickInsertMenuRows } from '@atlaskit/editor-common/quick-insert/registered-menu-model';
|
|
7
7
|
import { useMenuListHeight } from '@atlaskit/editor-common/quick-insert/use-menu-list-height';
|
|
8
8
|
import { typeAheadListMessages } from '@atlaskit/editor-common/type-ahead/messages';
|
|
9
|
-
import { Box
|
|
9
|
+
import { Box } from '@atlaskit/primitives/compiled/box';
|
|
10
|
+
import { Text } from '@atlaskit/primitives/compiled/text';
|
|
10
11
|
import { createTypeAheadRowRenderer } from './createTypeAheadRowRenderer';
|
|
11
12
|
import { getTypeAheadGlobalViewMoreId } from './getTypeAheadGlobalViewMoreId';
|
|
12
13
|
import { PassThrough } from './PassThrough';
|
|
@@ -19,7 +19,9 @@ import { SelectItemMode } from '@atlaskit/editor-common/type-ahead';
|
|
|
19
19
|
import { typeAheadListMessages } from '@atlaskit/editor-common/type-ahead/messages';
|
|
20
20
|
import MenuGroup from '@atlaskit/menu/menu-group';
|
|
21
21
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
22
|
-
import { Box
|
|
22
|
+
import { Box } from '@atlaskit/primitives/compiled/box';
|
|
23
|
+
import { Inline } from '@atlaskit/primitives/compiled/inline';
|
|
24
|
+
import { Text } from '@atlaskit/primitives/compiled/text';
|
|
23
25
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
24
26
|
import { closeTypeAhead } from '../pm-plugins/commands/close-type-ahead';
|
|
25
27
|
import { updateSelectedIndex } from '../pm-plugins/commands/update-selected-index';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import "./TypeAheadMenuFooter.compiled.css";
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React from 'react';
|
|
5
|
-
import { Box } from '@atlaskit/primitives/compiled';
|
|
5
|
+
import { Box } from '@atlaskit/primitives/compiled/box';
|
|
6
6
|
var styles = {
|
|
7
7
|
footer: "_1i531l7x _15a5nqa1 _uwhke4h9"
|
|
8
8
|
};
|
|
@@ -10,7 +10,8 @@ import { QuickInsertEmptyState } from '@atlaskit/editor-common/quick-insert/empt
|
|
|
10
10
|
import { getQuickInsertMenuRows } from '@atlaskit/editor-common/quick-insert/registered-menu-model';
|
|
11
11
|
import { useMenuListHeight } from '@atlaskit/editor-common/quick-insert/use-menu-list-height';
|
|
12
12
|
import { typeAheadListMessages } from '@atlaskit/editor-common/type-ahead/messages';
|
|
13
|
-
import { Box
|
|
13
|
+
import { Box } from '@atlaskit/primitives/compiled/box';
|
|
14
|
+
import { Text } from '@atlaskit/primitives/compiled/text';
|
|
14
15
|
import { createTypeAheadRowRenderer } from './createTypeAheadRowRenderer';
|
|
15
16
|
import { getTypeAheadGlobalViewMoreId } from './getTypeAheadGlobalViewMoreId';
|
|
16
17
|
import { PassThrough } from './PassThrough';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-type-ahead",
|
|
3
|
-
"version": "29.0.
|
|
3
|
+
"version": "29.0.1",
|
|
4
4
|
"description": "Type-ahead plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"@atlaskit/primitives": "^22.6.0",
|
|
43
43
|
"@atlaskit/prosemirror-history": "^1.3.0",
|
|
44
44
|
"@atlaskit/prosemirror-input-rules": "^4.1.0",
|
|
45
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
45
|
+
"@atlaskit/tmp-editor-statsig": "^241.0.0",
|
|
46
46
|
"@atlaskit/tokens": "^20.6.0",
|
|
47
47
|
"@atlaskit/visually-hidden": "^4.4.0",
|
|
48
48
|
"@babel/runtime": "^7.0.0",
|