@atlaskit/editor-plugin-type-ahead 12.1.4 → 12.1.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,12 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-type-ahead
|
|
2
2
|
|
|
3
|
+
## 12.1.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`334e0e991c129`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/334e0e991c129) -
|
|
8
|
+
Restore mention typeahead section titles after clearing the query
|
|
9
|
+
|
|
3
10
|
## 12.1.4
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
|
@@ -13,6 +13,7 @@ var _analytics = require("@atlaskit/editor-common/analytics");
|
|
|
13
13
|
var _typeAhead = require("@atlaskit/editor-common/type-ahead");
|
|
14
14
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
15
15
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
16
|
+
var _expVal = require("@atlaskit/tmp-editor-statsig/expVal");
|
|
16
17
|
var _analytics2 = require("../pm-plugins/analytics");
|
|
17
18
|
var _updateQuery = require("../pm-plugins/commands/update-query");
|
|
18
19
|
var _itemIsDisabled2 = require("../pm-plugins/item-is-disabled");
|
|
@@ -140,7 +141,8 @@ var WrapperTypeAhead = exports.WrapperTypeAhead = /*#__PURE__*/_react.default.me
|
|
|
140
141
|
(0, _react.useEffect)(function () {
|
|
141
142
|
var view = editorViewRef.current;
|
|
142
143
|
var pluginState = (0, _utils.getPluginState)(view.state);
|
|
143
|
-
|
|
144
|
+
var shouldSkipEmptyQuery = !(0, _expVal.expVal)('platform_editor_typeahead_empty_query_fix', 'isEnabled', false) && query.length === 0;
|
|
145
|
+
if (shouldSkipEmptyQuery || query === (pluginState === null || pluginState === void 0 ? void 0 : pluginState.query) || !(pluginState !== null && pluginState !== void 0 && pluginState.triggerHandler)) {
|
|
144
146
|
return;
|
|
145
147
|
}
|
|
146
148
|
(0, _updateQuery.updateQuery)(query)(view.state, view.dispatch);
|
|
@@ -4,6 +4,7 @@ import { ACTION, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
|
4
4
|
import { SelectItemMode } from '@atlaskit/editor-common/type-ahead';
|
|
5
5
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
6
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
7
|
+
import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
|
|
7
8
|
import { fireTypeAheadClosedAnalyticsEvent } from '../pm-plugins/analytics';
|
|
8
9
|
import { updateQuery } from '../pm-plugins/commands/update-query';
|
|
9
10
|
import { itemIsDisabled } from '../pm-plugins/item-is-disabled';
|
|
@@ -121,7 +122,8 @@ export const WrapperTypeAhead = /*#__PURE__*/React.memo(({
|
|
|
121
122
|
current: view
|
|
122
123
|
} = editorViewRef;
|
|
123
124
|
const pluginState = getPluginState(view.state);
|
|
124
|
-
|
|
125
|
+
const shouldSkipEmptyQuery = !expVal('platform_editor_typeahead_empty_query_fix', 'isEnabled', false) && query.length === 0;
|
|
126
|
+
if (shouldSkipEmptyQuery || query === (pluginState === null || pluginState === void 0 ? void 0 : pluginState.query) || !(pluginState !== null && pluginState !== void 0 && pluginState.triggerHandler)) {
|
|
125
127
|
return;
|
|
126
128
|
}
|
|
127
129
|
updateQuery(query)(view.state, view.dispatch);
|
|
@@ -5,6 +5,7 @@ import { ACTION, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
|
5
5
|
import { SelectItemMode } from '@atlaskit/editor-common/type-ahead';
|
|
6
6
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
7
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
8
|
+
import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
|
|
8
9
|
import { fireTypeAheadClosedAnalyticsEvent } from '../pm-plugins/analytics';
|
|
9
10
|
import { updateQuery } from '../pm-plugins/commands/update-query';
|
|
10
11
|
import { itemIsDisabled as _itemIsDisabled } from '../pm-plugins/item-is-disabled';
|
|
@@ -131,7 +132,8 @@ export var WrapperTypeAhead = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
131
132
|
useEffect(function () {
|
|
132
133
|
var view = editorViewRef.current;
|
|
133
134
|
var pluginState = getPluginState(view.state);
|
|
134
|
-
|
|
135
|
+
var shouldSkipEmptyQuery = !expVal('platform_editor_typeahead_empty_query_fix', 'isEnabled', false) && query.length === 0;
|
|
136
|
+
if (shouldSkipEmptyQuery || query === (pluginState === null || pluginState === void 0 ? void 0 : pluginState.query) || !(pluginState !== null && pluginState !== void 0 && pluginState.triggerHandler)) {
|
|
135
137
|
return;
|
|
136
138
|
}
|
|
137
139
|
updateQuery(query)(view.state, view.dispatch);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-type-ahead",
|
|
3
|
-
"version": "12.1.
|
|
3
|
+
"version": "12.1.5",
|
|
4
4
|
"description": "Type-ahead plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -29,16 +29,16 @@
|
|
|
29
29
|
"@atlaskit/editor-prosemirror": "^8.0.0",
|
|
30
30
|
"@atlaskit/editor-shared-styles": "^4.0.0",
|
|
31
31
|
"@atlaskit/feature-gate-js-client": "^6.0.0",
|
|
32
|
-
"@atlaskit/heading": "^6.
|
|
32
|
+
"@atlaskit/heading": "^6.1.0",
|
|
33
33
|
"@atlaskit/insm": "^1.0.0",
|
|
34
|
-
"@atlaskit/menu": "^9.
|
|
34
|
+
"@atlaskit/menu": "^9.1.0",
|
|
35
35
|
"@atlaskit/platform-feature-flags": "^2.0.0",
|
|
36
|
-
"@atlaskit/primitives": "^20.
|
|
36
|
+
"@atlaskit/primitives": "^20.1.0",
|
|
37
37
|
"@atlaskit/prosemirror-history": "^1.0.0",
|
|
38
38
|
"@atlaskit/prosemirror-input-rules": "^4.0.0",
|
|
39
39
|
"@atlaskit/tmp-editor-statsig": "^114.0.0",
|
|
40
|
-
"@atlaskit/tokens": "^15.
|
|
41
|
-
"@atlaskit/visually-hidden": "^4.
|
|
40
|
+
"@atlaskit/tokens": "^15.1.0",
|
|
41
|
+
"@atlaskit/visually-hidden": "^4.1.0",
|
|
42
42
|
"@babel/runtime": "^7.0.0",
|
|
43
43
|
"@emotion/react": "^11.7.1",
|
|
44
44
|
"lodash": "^4.17.21",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"w3c-keyname": "^2.1.8"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
|
-
"@atlaskit/editor-common": "^116.
|
|
51
|
+
"@atlaskit/editor-common": "^116.15.0",
|
|
52
52
|
"react": "^18.2.0",
|
|
53
53
|
"react-dom": "^18.2.0",
|
|
54
54
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|