@atlaskit/editor-plugin-type-ahead 3.0.4 → 3.0.5
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
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-type-ahead
|
|
2
2
|
|
|
3
|
+
## 3.0.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#185723](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/185723)
|
|
8
|
+
[`751aeb4580469`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/751aeb4580469) -
|
|
9
|
+
ED-28315 clean up fg platform_editor_controls_patch_13
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
3
12
|
## 3.0.4
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.useItemInsert = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
8
|
var _typeAhead = require("@atlaskit/editor-common/type-ahead");
|
|
9
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
10
9
|
var _closeTypeAhead = require("../../pm-plugins/commands/close-type-ahead");
|
|
11
10
|
var _insertTypeAheadItem = require("../../pm-plugins/commands/insert-type-ahead-item");
|
|
12
11
|
var _setSelectionBeforeQuery = require("../../pm-plugins/commands/set-selection-before-query");
|
|
@@ -61,7 +60,7 @@ var useItemInsert = exports.useItemInsert = function useItemInsert(triggerHandle
|
|
|
61
60
|
var sourceListItem = itemsRef.current;
|
|
62
61
|
if (sourceListItem.length === 0 || !triggerHandler ||
|
|
63
62
|
// View more item is only added for keyboard navigation and should not be considered as a valid item to be inserted
|
|
64
|
-
onlyHasViewMoreItem(sourceListItem)
|
|
63
|
+
onlyHasViewMoreItem(sourceListItem)) {
|
|
65
64
|
var text = "".concat(triggerHandler.trigger).concat(query);
|
|
66
65
|
onTextInsert({
|
|
67
66
|
forceFocusOnEditor: true,
|
|
@@ -94,9 +93,9 @@ var useItemInsert = exports.useItemInsert = function useItemInsert(triggerHandle
|
|
|
94
93
|
if (_items && _items.length > 1) {
|
|
95
94
|
return false;
|
|
96
95
|
}
|
|
97
|
-
if (_items.length === 1 &&
|
|
96
|
+
if (_items.length === 1 &&
|
|
98
97
|
// View more item is only added for keyboard navigation and should not be considered as a valid item to be inserted
|
|
99
|
-
!onlyHasViewMoreItem(_items)
|
|
98
|
+
!onlyHasViewMoreItem(_items)) {
|
|
100
99
|
queueMicrotask(function () {
|
|
101
100
|
onItemInsert({
|
|
102
101
|
mode: mode,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { useCallback, useLayoutEffect, useRef } from 'react';
|
|
2
2
|
import { SelectItemMode } from '@atlaskit/editor-common/type-ahead';
|
|
3
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
3
|
import { closeTypeAhead } from '../../pm-plugins/commands/close-type-ahead';
|
|
5
4
|
import { insertTypeAheadItem } from '../../pm-plugins/commands/insert-type-ahead-item';
|
|
6
5
|
import { setSelectionBeforeQuery } from '../../pm-plugins/commands/set-selection-before-query';
|
|
@@ -61,7 +60,7 @@ export const useItemInsert = (triggerHandler, editorView, items, api) => {
|
|
|
61
60
|
const sourceListItem = itemsRef.current;
|
|
62
61
|
if (sourceListItem.length === 0 || !triggerHandler ||
|
|
63
62
|
// View more item is only added for keyboard navigation and should not be considered as a valid item to be inserted
|
|
64
|
-
onlyHasViewMoreItem(sourceListItem)
|
|
63
|
+
onlyHasViewMoreItem(sourceListItem)) {
|
|
65
64
|
const text = `${triggerHandler.trigger}${query}`;
|
|
66
65
|
onTextInsert({
|
|
67
66
|
forceFocusOnEditor: true,
|
|
@@ -97,9 +96,9 @@ export const useItemInsert = (triggerHandler, editorView, items, api) => {
|
|
|
97
96
|
if (_items && _items.length > 1) {
|
|
98
97
|
return false;
|
|
99
98
|
}
|
|
100
|
-
if (_items.length === 1 &&
|
|
99
|
+
if (_items.length === 1 &&
|
|
101
100
|
// View more item is only added for keyboard navigation and should not be considered as a valid item to be inserted
|
|
102
|
-
!onlyHasViewMoreItem(_items)
|
|
101
|
+
!onlyHasViewMoreItem(_items)) {
|
|
103
102
|
queueMicrotask(() => {
|
|
104
103
|
onItemInsert({
|
|
105
104
|
mode,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { useCallback, useLayoutEffect, useRef } from 'react';
|
|
2
2
|
import { SelectItemMode } from '@atlaskit/editor-common/type-ahead';
|
|
3
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
3
|
import { closeTypeAhead } from '../../pm-plugins/commands/close-type-ahead';
|
|
5
4
|
import { insertTypeAheadItem } from '../../pm-plugins/commands/insert-type-ahead-item';
|
|
6
5
|
import { setSelectionBeforeQuery } from '../../pm-plugins/commands/set-selection-before-query';
|
|
@@ -55,7 +54,7 @@ export var useItemInsert = function useItemInsert(triggerHandler, editorView, it
|
|
|
55
54
|
var sourceListItem = itemsRef.current;
|
|
56
55
|
if (sourceListItem.length === 0 || !triggerHandler ||
|
|
57
56
|
// View more item is only added for keyboard navigation and should not be considered as a valid item to be inserted
|
|
58
|
-
onlyHasViewMoreItem(sourceListItem)
|
|
57
|
+
onlyHasViewMoreItem(sourceListItem)) {
|
|
59
58
|
var text = "".concat(triggerHandler.trigger).concat(query);
|
|
60
59
|
onTextInsert({
|
|
61
60
|
forceFocusOnEditor: true,
|
|
@@ -88,9 +87,9 @@ export var useItemInsert = function useItemInsert(triggerHandler, editorView, it
|
|
|
88
87
|
if (_items && _items.length > 1) {
|
|
89
88
|
return false;
|
|
90
89
|
}
|
|
91
|
-
if (_items.length === 1 &&
|
|
90
|
+
if (_items.length === 1 &&
|
|
92
91
|
// View more item is only added for keyboard navigation and should not be considered as a valid item to be inserted
|
|
93
|
-
!onlyHasViewMoreItem(_items)
|
|
92
|
+
!onlyHasViewMoreItem(_items)) {
|
|
94
93
|
queueMicrotask(function () {
|
|
95
94
|
onItemInsert({
|
|
96
95
|
mode: mode,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-type-ahead",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.5",
|
|
4
4
|
"description": "Type-ahead plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"@atlaskit/editor-plugin-context-panel": "^5.0.0",
|
|
40
40
|
"@atlaskit/editor-plugin-metrics": "^4.0.0",
|
|
41
41
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
42
|
-
"@atlaskit/editor-shared-styles": "^3.
|
|
42
|
+
"@atlaskit/editor-shared-styles": "^3.5.0",
|
|
43
43
|
"@atlaskit/heading": "^5.2.0",
|
|
44
44
|
"@atlaskit/icon": "^27.3.0",
|
|
45
45
|
"@atlaskit/menu": "^8.0.0",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"@atlaskit/primitives": "^14.10.0",
|
|
48
48
|
"@atlaskit/prosemirror-input-rules": "^3.3.0",
|
|
49
49
|
"@atlaskit/theme": "^19.0.0",
|
|
50
|
-
"@atlaskit/tmp-editor-statsig": "^9.
|
|
50
|
+
"@atlaskit/tmp-editor-statsig": "^9.8.0",
|
|
51
51
|
"@atlaskit/tokens": "^5.5.0",
|
|
52
52
|
"@babel/runtime": "^7.0.0",
|
|
53
53
|
"@emotion/react": "^11.7.1",
|
|
@@ -112,9 +112,6 @@
|
|
|
112
112
|
},
|
|
113
113
|
"platform_editor_refactor_view_more": {
|
|
114
114
|
"type": "boolean"
|
|
115
|
-
},
|
|
116
|
-
"platform_editor_controls_patch_13": {
|
|
117
|
-
"type": "boolean"
|
|
118
115
|
}
|
|
119
116
|
}
|
|
120
117
|
}
|