@atlaskit/editor-plugin-type-ahead 3.0.4 → 3.1.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 CHANGED
@@ -1,5 +1,26 @@
1
1
  # @atlaskit/editor-plugin-type-ahead
2
2
 
3
+ ## 3.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#189314](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/189314)
8
+ [`22c6251496010`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/22c6251496010) -
9
+ Exported missing types that were already being inferred from existing exports
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
15
+ ## 3.0.5
16
+
17
+ ### Patch Changes
18
+
19
+ - [#185723](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/185723)
20
+ [`751aeb4580469`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/751aeb4580469) -
21
+ ED-28315 clean up fg platform_editor_controls_patch_13
22
+ - Updated dependencies
23
+
3
24
  ## 3.0.4
4
25
 
5
26
  ### 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) && (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_13')) {
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) || !(0, _platformFeatureFlags.fg)('platform_editor_controls_patch_13'))) {
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) && fg('platform_editor_controls_patch_13')) {
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) || !fg('platform_editor_controls_patch_13'))) {
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) && fg('platform_editor_controls_patch_13')) {
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) || !fg('platform_editor_controls_patch_13'))) {
92
+ !onlyHasViewMoreItem(_items)) {
94
93
  queueMicrotask(function () {
95
94
  onItemInsert({
96
95
  mode: mode,
@@ -1,3 +1,3 @@
1
1
  export { typeAheadPlugin } from './typeAheadPlugin';
2
2
  export type { TypeAheadPlugin } from './typeAheadPluginType';
3
- export type { TypeAheadHandler, TypeAheadInputMethod, TypeAheadPluginOptions, TypeAheadPluginState, TypeAheadPluginSharedState, } from './types';
3
+ export type { OpenTypeAheadProps, TypeAheadHandler, TypeAheadInputMethod, TypeAheadPluginOptions, TypeAheadPluginState, TypeAheadPluginSharedState, } from './types';
@@ -1,3 +1,3 @@
1
1
  export { typeAheadPlugin } from './typeAheadPlugin';
2
2
  export type { TypeAheadPlugin } from './typeAheadPluginType';
3
- export type { TypeAheadHandler, TypeAheadInputMethod, TypeAheadPluginOptions, TypeAheadPluginState, TypeAheadPluginSharedState, } from './types';
3
+ export type { OpenTypeAheadProps, TypeAheadHandler, TypeAheadInputMethod, TypeAheadPluginOptions, TypeAheadPluginState, TypeAheadPluginSharedState, } from './types';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-type-ahead",
3
- "version": "3.0.4",
3
+ "version": "3.1.0",
4
4
  "description": "Type-ahead plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -35,20 +35,20 @@
35
35
  "@atlaskit/adf-schema": "^49.0.6",
36
36
  "@atlaskit/editor-element-browser": "^1.0.0",
37
37
  "@atlaskit/editor-plugin-analytics": "^3.0.0",
38
- "@atlaskit/editor-plugin-connectivity": "^3.0.0",
39
- "@atlaskit/editor-plugin-context-panel": "^5.0.0",
38
+ "@atlaskit/editor-plugin-connectivity": "^3.1.0",
39
+ "@atlaskit/editor-plugin-context-panel": "^5.1.0",
40
40
  "@atlaskit/editor-plugin-metrics": "^4.0.0",
41
41
  "@atlaskit/editor-prosemirror": "7.0.0",
42
- "@atlaskit/editor-shared-styles": "^3.4.0",
42
+ "@atlaskit/editor-shared-styles": "^3.5.0",
43
43
  "@atlaskit/heading": "^5.2.0",
44
- "@atlaskit/icon": "^27.3.0",
44
+ "@atlaskit/icon": "^27.5.0",
45
45
  "@atlaskit/menu": "^8.0.0",
46
46
  "@atlaskit/platform-feature-flags": "^1.1.0",
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.7.0",
51
- "@atlaskit/tokens": "^5.5.0",
50
+ "@atlaskit/tmp-editor-statsig": "^9.9.0",
51
+ "@atlaskit/tokens": "^5.6.0",
52
52
  "@babel/runtime": "^7.0.0",
53
53
  "@emotion/react": "^11.7.1",
54
54
  "lodash": "^4.17.21",
@@ -58,7 +58,7 @@
58
58
  "w3c-keyname": "^2.1.8"
59
59
  },
60
60
  "peerDependencies": {
61
- "@atlaskit/editor-common": "^107.8.0",
61
+ "@atlaskit/editor-common": "^107.9.0",
62
62
  "react": "^18.2.0",
63
63
  "react-dom": "^18.2.0",
64
64
  "react-intl-next": "npm:react-intl@^5.18.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
  }