@atlaskit/editor-plugin-type-ahead 2.4.0 → 2.4.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 CHANGED
@@ -1,5 +1,14 @@
1
1
  # @atlaskit/editor-plugin-type-ahead
2
2
 
3
+ ## 2.4.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#140813](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/140813)
8
+ [`c4756a5c1a4ae`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c4756a5c1a4ae) -
9
+ Migrating offline editing feature gates to a new experiment "platform_editor_offline_editing_web"
10
+ - Updated dependencies
11
+
3
12
  ## 2.4.0
4
13
 
5
14
  ### 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;
@@ -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;
@@ -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;
@@ -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.1",
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.6.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,13 +42,13 @@
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",
51
+ "@atlaskit/tmp-editor-statsig": "^4.8.0",
52
52
  "@atlaskit/tokens": "^4.7.0",
53
53
  "@babel/runtime": "^7.0.0",
54
54
  "@emotion/react": "^11.7.1",
@@ -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
  },