@atlaskit/editor-plugin-type-ahead 2.4.0 → 2.4.2

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,24 @@
1
1
  # @atlaskit/editor-plugin-type-ahead
2
2
 
3
+ ## 2.4.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#142098](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/142098)
8
+ [`e84b542ba2d44`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e84b542ba2d44) -
9
+ [ED-27614] Put quick insert placeholder behind a separate
10
+ FGplatform_editor_quick_insert_placeholder
11
+ - Updated dependencies
12
+
13
+ ## 2.4.1
14
+
15
+ ### Patch Changes
16
+
17
+ - [#140813](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/140813)
18
+ [`c4756a5c1a4ae`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c4756a5c1a4ae) -
19
+ Migrating offline editing feature gates to a new experiment "platform_editor_offline_editing_web"
20
+ - Updated dependencies
21
+
3
22
  ## 2.4.0
4
23
 
5
24
  ### Minor Changes
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.skipForwardToSafeItem = exports.skipBackwardToSafeItem = exports.moveSelectedIndex = exports.isTypeAheadOpen = exports.isTypeAheadHandler = exports.isTypeAheadAllowed = exports.getTypeAheadQuery = exports.getTypeAheadListAriaLabels = exports.getTypeAheadHandler = exports.getPluginState = exports.findHandlerByTrigger = exports.findHandler = void 0;
7
7
  var _typeAhead = require("@atlaskit/editor-common/type-ahead");
8
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
8
+ var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
9
9
  var _updateSelectedIndex = require("./commands/update-selected-index");
10
10
  var _itemIsDisabled = require("./item-is-disabled");
11
11
  var _key = require("./key");
@@ -59,7 +59,7 @@ var skipForwardToSafeItem = exports.skipForwardToSafeItem = function skipForward
59
59
  }
60
60
 
61
61
  // We got to the end of the list ^, now try from the start
62
- if ((0, _platformFeatureFlags.fg)('platform_editor_offline_editing_ga')) {
62
+ if ((0, _experiments.editorExperiment)('platform_editor_offline_editing_web', true)) {
63
63
  for (var _idx = 0; _idx < nextIndex; _idx++) {
64
64
  if (!itemIsDisabled(_idx)) {
65
65
  return _idx;
@@ -83,7 +83,7 @@ var skipBackwardToSafeItem = exports.skipBackwardToSafeItem = function skipBackw
83
83
  }
84
84
 
85
85
  // We got to the start of the list ^, now try from the end
86
- if ((0, _platformFeatureFlags.fg)('platform_editor_offline_editing_ga')) {
86
+ if ((0, _experiments.editorExperiment)('platform_editor_offline_editing_web', true)) {
87
87
  for (var _idx2 = listSize; _idx2 > nextIndex; _idx2--) {
88
88
  if (!itemIsDisabled(_idx2)) {
89
89
  return _idx2;
@@ -112,7 +112,7 @@ var InputQuery = exports.InputQuery = /*#__PURE__*/_react.default.memo(function
112
112
  setQuery = _useState2[1];
113
113
  var isEditorInsertionEnabled = (0, _experiments.editorExperiment)('platform_editor_insertion', 'variant1');
114
114
  var isEditorControlsPatch2Enabled = (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') && (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_2');
115
- var isSearchPlaceholderEnabled = isEditorInsertionEnabled || (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') && (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_3');
115
+ var isSearchPlaceholderEnabled = isEditorInsertionEnabled || (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') && (0, _platformFeatureFlags.fg)('platform_editor_quick_insert_placeholder');
116
116
  var selection = editorView.state.selection;
117
117
  var table = editorView.state.schema.nodes.table;
118
118
  var _useState3 = (0, _react.useState)(isSearchPlaceholderEnabled && triggerQueryPrefix === '/' &&
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.useLoadItems = void 0;
8
8
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
9
9
  var _react = require("react");
10
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
10
+ var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
11
11
  var _updateListError = require("../../pm-plugins/commands/update-list-error");
12
12
  var _updateListItems = require("../../pm-plugins/commands/update-list-items");
13
13
  var EMPTY_LIST_ITEM = [];
@@ -41,7 +41,7 @@ var useLoadItems = exports.useLoadItems = function useLoadItems(triggerHandler,
41
41
  (0, _updateListItems.updateListItem)(showViewMore ? list.concat(viewMoreItem) : list)(view.state, view.dispatch);
42
42
  });
43
43
  }).catch(function (e) {
44
- if ((0, _platformFeatureFlags.fg)('platform_editor_offline_editing_ga')) {
44
+ if ((0, _experiments.editorExperiment)('platform_editor_offline_editing_web', true)) {
45
45
  if (e) {
46
46
  if (componentIsMounted.current) {
47
47
  setItems(EMPTY_LIST_ITEM);
@@ -1,5 +1,5 @@
1
1
  import { TypeAheadAvailableNodes, typeAheadListMessages } from '@atlaskit/editor-common/type-ahead';
2
- import { fg } from '@atlaskit/platform-feature-flags';
2
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
3
3
  import { updateSelectedIndex } from './commands/update-selected-index';
4
4
  import { itemIsDisabled } from './item-is-disabled';
5
5
  import { pluginKey as typeAheadPluginKey } from './key';
@@ -54,7 +54,7 @@ export const skipForwardToSafeItem = ({
54
54
  }
55
55
 
56
56
  // We got to the end of the list ^, now try from the start
57
- if (fg('platform_editor_offline_editing_ga')) {
57
+ if (editorExperiment('platform_editor_offline_editing_web', true)) {
58
58
  for (let idx = 0; idx < nextIndex; idx++) {
59
59
  if (!itemIsDisabled(idx)) {
60
60
  return idx;
@@ -79,7 +79,7 @@ export const skipBackwardToSafeItem = ({
79
79
  }
80
80
 
81
81
  // We got to the start of the list ^, now try from the end
82
- if (fg('platform_editor_offline_editing_ga')) {
82
+ if (editorExperiment('platform_editor_offline_editing_web', true)) {
83
83
  for (let idx = listSize; idx > nextIndex; idx--) {
84
84
  if (!itemIsDisabled(idx)) {
85
85
  return idx;
@@ -98,7 +98,7 @@ export const InputQuery = /*#__PURE__*/React.memo(({
98
98
  const [query, setQuery] = useState(null);
99
99
  const isEditorInsertionEnabled = editorExperiment('platform_editor_insertion', 'variant1');
100
100
  const isEditorControlsPatch2Enabled = editorExperiment('platform_editor_controls', 'variant1') && fg('platform_editor_controls_patch_2');
101
- const isSearchPlaceholderEnabled = isEditorInsertionEnabled || editorExperiment('platform_editor_controls', 'variant1') && fg('platform_editor_controls_patch_3');
101
+ const isSearchPlaceholderEnabled = isEditorInsertionEnabled || editorExperiment('platform_editor_controls', 'variant1') && fg('platform_editor_quick_insert_placeholder');
102
102
  const selection = editorView.state.selection;
103
103
  const {
104
104
  table
@@ -1,5 +1,5 @@
1
1
  import { useEffect, useRef, useState } from 'react';
2
- import { fg } from '@atlaskit/platform-feature-flags';
2
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
3
3
  import { updateListError } from '../../pm-plugins/commands/update-list-error';
4
4
  import { updateListItem } from '../../pm-plugins/commands/update-list-items';
5
5
  const EMPTY_LIST_ITEM = [];
@@ -32,7 +32,7 @@ export const useLoadItems = (triggerHandler, editorView, query, showViewMore) =>
32
32
  updateListItem(showViewMore ? list.concat(viewMoreItem) : list)(view.state, view.dispatch);
33
33
  });
34
34
  }).catch(e => {
35
- if (fg('platform_editor_offline_editing_ga')) {
35
+ if (editorExperiment('platform_editor_offline_editing_web', true)) {
36
36
  if (e) {
37
37
  if (componentIsMounted.current) {
38
38
  setItems(EMPTY_LIST_ITEM);
@@ -1,5 +1,5 @@
1
1
  import { TypeAheadAvailableNodes, typeAheadListMessages } from '@atlaskit/editor-common/type-ahead';
2
- import { fg } from '@atlaskit/platform-feature-flags';
2
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
3
3
  import { updateSelectedIndex } from './commands/update-selected-index';
4
4
  import { itemIsDisabled } from './item-is-disabled';
5
5
  import { pluginKey as typeAheadPluginKey } from './key';
@@ -53,7 +53,7 @@ export var skipForwardToSafeItem = function skipForwardToSafeItem(_ref) {
53
53
  }
54
54
 
55
55
  // We got to the end of the list ^, now try from the start
56
- if (fg('platform_editor_offline_editing_ga')) {
56
+ if (editorExperiment('platform_editor_offline_editing_web', true)) {
57
57
  for (var _idx = 0; _idx < nextIndex; _idx++) {
58
58
  if (!itemIsDisabled(_idx)) {
59
59
  return _idx;
@@ -77,7 +77,7 @@ export var skipBackwardToSafeItem = function skipBackwardToSafeItem(_ref2) {
77
77
  }
78
78
 
79
79
  // We got to the start of the list ^, now try from the end
80
- if (fg('platform_editor_offline_editing_ga')) {
80
+ if (editorExperiment('platform_editor_offline_editing_web', true)) {
81
81
  for (var _idx2 = listSize; _idx2 > nextIndex; _idx2--) {
82
82
  if (!itemIsDisabled(_idx2)) {
83
83
  return _idx2;
@@ -101,7 +101,7 @@ export var InputQuery = /*#__PURE__*/React.memo(function (_ref) {
101
101
  setQuery = _useState2[1];
102
102
  var isEditorInsertionEnabled = editorExperiment('platform_editor_insertion', 'variant1');
103
103
  var isEditorControlsPatch2Enabled = editorExperiment('platform_editor_controls', 'variant1') && fg('platform_editor_controls_patch_2');
104
- var isSearchPlaceholderEnabled = isEditorInsertionEnabled || editorExperiment('platform_editor_controls', 'variant1') && fg('platform_editor_controls_patch_3');
104
+ var isSearchPlaceholderEnabled = isEditorInsertionEnabled || editorExperiment('platform_editor_controls', 'variant1') && fg('platform_editor_quick_insert_placeholder');
105
105
  var selection = editorView.state.selection;
106
106
  var table = editorView.state.schema.nodes.table;
107
107
  var _useState3 = useState(isSearchPlaceholderEnabled && triggerQueryPrefix === '/' &&
@@ -1,6 +1,6 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
2
  import { useEffect, useRef, useState } from 'react';
3
- import { fg } from '@atlaskit/platform-feature-flags';
3
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
4
4
  import { updateListError } from '../../pm-plugins/commands/update-list-error';
5
5
  import { updateListItem } from '../../pm-plugins/commands/update-list-items';
6
6
  var EMPTY_LIST_ITEM = [];
@@ -34,7 +34,7 @@ export var useLoadItems = function useLoadItems(triggerHandler, editorView, quer
34
34
  updateListItem(showViewMore ? list.concat(viewMoreItem) : list)(view.state, view.dispatch);
35
35
  });
36
36
  }).catch(function (e) {
37
- if (fg('platform_editor_offline_editing_ga')) {
37
+ if (editorExperiment('platform_editor_offline_editing_web', true)) {
38
38
  if (e) {
39
39
  if (componentIsMounted.current) {
40
40
  setItems(EMPTY_LIST_ITEM);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-type-ahead",
3
- "version": "2.4.0",
3
+ "version": "2.4.2",
4
4
  "description": "Type-ahead plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -34,7 +34,7 @@
34
34
  },
35
35
  "dependencies": {
36
36
  "@atlaskit/adf-schema": "^47.6.0",
37
- "@atlaskit/editor-common": "^103.5.0",
37
+ "@atlaskit/editor-common": "^103.8.0",
38
38
  "@atlaskit/editor-element-browser": "^0.1.0",
39
39
  "@atlaskit/editor-plugin-analytics": "^2.2.0",
40
40
  "@atlaskit/editor-plugin-connectivity": "^2.0.0",
@@ -42,14 +42,14 @@
42
42
  "@atlaskit/editor-prosemirror": "7.0.0",
43
43
  "@atlaskit/editor-shared-styles": "^3.4.0",
44
44
  "@atlaskit/heading": "^5.2.0",
45
- "@atlaskit/icon": "^25.5.0",
45
+ "@atlaskit/icon": "^25.6.0",
46
46
  "@atlaskit/menu": "^3.2.0",
47
47
  "@atlaskit/platform-feature-flags": "^1.1.0",
48
48
  "@atlaskit/primitives": "^14.4.0",
49
49
  "@atlaskit/prosemirror-input-rules": "^3.3.0",
50
50
  "@atlaskit/theme": "^18.0.0",
51
- "@atlaskit/tmp-editor-statsig": "^4.6.0",
52
- "@atlaskit/tokens": "^4.7.0",
51
+ "@atlaskit/tmp-editor-statsig": "^4.10.0",
52
+ "@atlaskit/tokens": "^4.8.0",
53
53
  "@babel/runtime": "^7.0.0",
54
54
  "@emotion/react": "^11.7.1",
55
55
  "lodash": "^4.17.21",
@@ -98,9 +98,6 @@
98
98
  "platform_editor_update_type_ahead_locale": {
99
99
  "type": "boolean"
100
100
  },
101
- "platform_editor_offline_editing_ga": {
102
- "type": "boolean"
103
- },
104
101
  "platform_editor_legacy_content_macro_typeahead_fix": {
105
102
  "type": "boolean"
106
103
  },
@@ -110,7 +107,7 @@
110
107
  "platform_editor_controls_patch_2": {
111
108
  "type": "boolean"
112
109
  },
113
- "platform_editor_controls_patch_3": {
110
+ "platform_editor_quick_insert_placeholder": {
114
111
  "type": "boolean"
115
112
  },
116
113
  "platform_editor_controls_patch_4": {