@atlaskit/editor-plugin-type-ahead 18.0.8 → 19.0.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,27 @@
1
1
  # @atlaskit/editor-plugin-type-ahead
2
2
 
3
+ ## 19.0.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 18.0.10
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
15
+ ## 18.0.9
16
+
17
+ ### Patch Changes
18
+
19
+ - [`962e8dc0188bf`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/962e8dc0188bf) -
20
+ Clean up `platform_editor_offline_editing_web` with `isEnabled: true` for Confluence, keeping
21
+ offline editing and recovery behavior enabled. Remove the retired experiment from the editor
22
+ Statsig configuration; consumers must stop querying or overriding this experiment.
23
+ - Updated dependencies
24
+
3
25
  ## 18.0.8
4
26
 
5
27
  ### Patch Changes
@@ -62,11 +62,9 @@ var skipForwardToSafeItem = exports.skipForwardToSafeItem = function skipForward
62
62
  }
63
63
 
64
64
  // We got to the end of the list ^, now try from the start
65
- if ((0, _editorExperiment.editorExperiment)('platform_editor_offline_editing_web', true)) {
66
- for (var _idx = 0; _idx < nextIndex; _idx++) {
67
- if (!itemIsDisabled(_idx)) {
68
- return _idx;
69
- }
65
+ for (var _idx = 0; _idx < nextIndex; _idx++) {
66
+ if (!itemIsDisabled(_idx)) {
67
+ return _idx;
70
68
  }
71
69
  }
72
70
 
@@ -86,13 +84,12 @@ var skipBackwardToSafeItem = exports.skipBackwardToSafeItem = function skipBackw
86
84
  }
87
85
 
88
86
  // We got to the start of the list ^, now try from the end
89
- if ((0, _editorExperiment.editorExperiment)('platform_editor_offline_editing_web', true)) {
90
- for (var _idx2 = listSize; _idx2 > nextIndex; _idx2--) {
91
- if (!itemIsDisabled(_idx2)) {
92
- return _idx2;
93
- }
87
+ for (var _idx2 = listSize; _idx2 > nextIndex; _idx2--) {
88
+ if (!itemIsDisabled(_idx2)) {
89
+ return _idx2;
94
90
  }
95
91
  }
92
+
96
93
  // If no non-selectable items are found, return currentIndex
97
94
  return currentIndex;
98
95
  };
@@ -8,7 +8,6 @@ exports.useLoadItems = void 0;
8
8
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
9
9
  var _react = require("react");
10
10
  var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
11
- var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
12
11
  var _clearListError = require("../../pm-plugins/commands/clear-list-error");
13
12
  var _updateListError = require("../../pm-plugins/commands/update-list-error");
14
13
  var _updateListItems = require("../../pm-plugins/commands/update-list-items");
@@ -38,12 +37,11 @@ var useLoadItems = exports.useLoadItems = function useLoadItems(triggerHandler,
38
37
  editorState: editorView.state
39
38
  };
40
39
  var view = editorViewRef.current;
41
- if ((0, _editorExperiment.editorExperiment)('platform_editor_offline_editing_web', true)) {
42
- // Clear any existing error state before making a new request
43
- queueMicrotask(function () {
44
- api === null || api === void 0 || api.core.actions.execute((0, _clearListError.clearListError)());
45
- });
46
- }
40
+
41
+ // Clear any existing error state before making a new request
42
+ queueMicrotask(function () {
43
+ api === null || api === void 0 || api.core.actions.execute((0, _clearListError.clearListError)());
44
+ });
47
45
 
48
46
  /**
49
47
  * Shared render pipeline used by both the single-shot `getItems`
@@ -83,15 +81,13 @@ var useLoadItems = exports.useLoadItems = function useLoadItems(triggerHandler,
83
81
  // `.catch((e) => updateListError(e)(...))` path.
84
82
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
85
83
  var handleError = function handleError(e) {
86
- if ((0, _editorExperiment.editorExperiment)('platform_editor_offline_editing_web', true)) {
87
- if (e) {
88
- if (componentIsMounted.current) {
89
- setItems(EMPTY_LIST_ITEM);
90
- }
91
- queueMicrotask(function () {
92
- (0, _updateListError.updateListError)(e)(view.state, view.dispatch);
93
- });
84
+ if (e) {
85
+ if (componentIsMounted.current) {
86
+ setItems(EMPTY_LIST_ITEM);
94
87
  }
88
+ queueMicrotask(function () {
89
+ (0, _updateListError.updateListError)(e)(view.state, view.dispatch);
90
+ });
95
91
  }
96
92
  };
97
93
 
@@ -57,11 +57,9 @@ export const skipForwardToSafeItem = ({
57
57
  }
58
58
 
59
59
  // We got to the end of the list ^, now try from the start
60
- if (editorExperiment('platform_editor_offline_editing_web', true)) {
61
- for (let idx = 0; idx < nextIndex; idx++) {
62
- if (!itemIsDisabled(idx)) {
63
- return idx;
64
- }
60
+ for (let idx = 0; idx < nextIndex; idx++) {
61
+ if (!itemIsDisabled(idx)) {
62
+ return idx;
65
63
  }
66
64
  }
67
65
 
@@ -82,13 +80,12 @@ export const skipBackwardToSafeItem = ({
82
80
  }
83
81
 
84
82
  // We got to the start of the list ^, now try from the end
85
- if (editorExperiment('platform_editor_offline_editing_web', true)) {
86
- for (let idx = listSize; idx > nextIndex; idx--) {
87
- if (!itemIsDisabled(idx)) {
88
- return idx;
89
- }
83
+ for (let idx = listSize; idx > nextIndex; idx--) {
84
+ if (!itemIsDisabled(idx)) {
85
+ return idx;
90
86
  }
91
87
  }
88
+
92
89
  // If no non-selectable items are found, return currentIndex
93
90
  return currentIndex;
94
91
  };
@@ -1,6 +1,5 @@
1
1
  import { useEffect, useRef, useState } from 'react';
2
2
  import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
3
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
4
3
  import { clearListError } from '../../pm-plugins/commands/clear-list-error';
5
4
  import { updateListError } from '../../pm-plugins/commands/update-list-error';
6
5
  import { updateListItem } from '../../pm-plugins/commands/update-list-items';
@@ -26,12 +25,11 @@ export const useLoadItems = (triggerHandler, editorView, query, showViewMore, ap
26
25
  const {
27
26
  current: view
28
27
  } = editorViewRef;
29
- if (editorExperiment('platform_editor_offline_editing_web', true)) {
30
- // Clear any existing error state before making a new request
31
- queueMicrotask(() => {
32
- api === null || api === void 0 ? void 0 : api.core.actions.execute(clearListError());
33
- });
34
- }
28
+
29
+ // Clear any existing error state before making a new request
30
+ queueMicrotask(() => {
31
+ api === null || api === void 0 ? void 0 : api.core.actions.execute(clearListError());
32
+ });
35
33
 
36
34
  /**
37
35
  * Shared render pipeline used by both the single-shot `getItems`
@@ -72,15 +70,13 @@ export const useLoadItems = (triggerHandler, editorView, query, showViewMore, ap
72
70
  // `.catch((e) => updateListError(e)(...))` path.
73
71
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
74
72
  const handleError = e => {
75
- if (editorExperiment('platform_editor_offline_editing_web', true)) {
76
- if (e) {
77
- if (componentIsMounted.current) {
78
- setItems(EMPTY_LIST_ITEM);
79
- }
80
- queueMicrotask(() => {
81
- updateListError(e)(view.state, view.dispatch);
82
- });
73
+ if (e) {
74
+ if (componentIsMounted.current) {
75
+ setItems(EMPTY_LIST_ITEM);
83
76
  }
77
+ queueMicrotask(() => {
78
+ updateListError(e)(view.state, view.dispatch);
79
+ });
84
80
  }
85
81
  };
86
82
 
@@ -56,11 +56,9 @@ export var skipForwardToSafeItem = function skipForwardToSafeItem(_ref) {
56
56
  }
57
57
 
58
58
  // We got to the end of the list ^, now try from the start
59
- if (editorExperiment('platform_editor_offline_editing_web', true)) {
60
- for (var _idx = 0; _idx < nextIndex; _idx++) {
61
- if (!itemIsDisabled(_idx)) {
62
- return _idx;
63
- }
59
+ for (var _idx = 0; _idx < nextIndex; _idx++) {
60
+ if (!itemIsDisabled(_idx)) {
61
+ return _idx;
64
62
  }
65
63
  }
66
64
 
@@ -80,13 +78,12 @@ export var skipBackwardToSafeItem = function skipBackwardToSafeItem(_ref2) {
80
78
  }
81
79
 
82
80
  // We got to the start of the list ^, now try from the end
83
- if (editorExperiment('platform_editor_offline_editing_web', true)) {
84
- for (var _idx2 = listSize; _idx2 > nextIndex; _idx2--) {
85
- if (!itemIsDisabled(_idx2)) {
86
- return _idx2;
87
- }
81
+ for (var _idx2 = listSize; _idx2 > nextIndex; _idx2--) {
82
+ if (!itemIsDisabled(_idx2)) {
83
+ return _idx2;
88
84
  }
89
85
  }
86
+
90
87
  // If no non-selectable items are found, return currentIndex
91
88
  return currentIndex;
92
89
  };
@@ -1,7 +1,6 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
2
  import { useEffect, useRef, useState } from 'react';
3
3
  import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
4
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
5
4
  import { clearListError } from '../../pm-plugins/commands/clear-list-error';
6
5
  import { updateListError } from '../../pm-plugins/commands/update-list-error';
7
6
  import { updateListItem } from '../../pm-plugins/commands/update-list-items';
@@ -31,12 +30,11 @@ export var useLoadItems = function useLoadItems(triggerHandler, editorView, quer
31
30
  editorState: editorView.state
32
31
  };
33
32
  var view = editorViewRef.current;
34
- if (editorExperiment('platform_editor_offline_editing_web', true)) {
35
- // Clear any existing error state before making a new request
36
- queueMicrotask(function () {
37
- api === null || api === void 0 || api.core.actions.execute(clearListError());
38
- });
39
- }
33
+
34
+ // Clear any existing error state before making a new request
35
+ queueMicrotask(function () {
36
+ api === null || api === void 0 || api.core.actions.execute(clearListError());
37
+ });
40
38
 
41
39
  /**
42
40
  * Shared render pipeline used by both the single-shot `getItems`
@@ -76,15 +74,13 @@ export var useLoadItems = function useLoadItems(triggerHandler, editorView, quer
76
74
  // `.catch((e) => updateListError(e)(...))` path.
77
75
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
78
76
  var handleError = function handleError(e) {
79
- if (editorExperiment('platform_editor_offline_editing_web', true)) {
80
- if (e) {
81
- if (componentIsMounted.current) {
82
- setItems(EMPTY_LIST_ITEM);
83
- }
84
- queueMicrotask(function () {
85
- updateListError(e)(view.state, view.dispatch);
86
- });
77
+ if (e) {
78
+ if (componentIsMounted.current) {
79
+ setItems(EMPTY_LIST_ITEM);
87
80
  }
81
+ queueMicrotask(function () {
82
+ updateListError(e)(view.state, view.dispatch);
83
+ });
88
84
  }
89
85
  };
90
86
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-type-ahead",
3
- "version": "18.0.8",
3
+ "version": "19.0.0",
4
4
  "description": "Type-ahead plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -23,11 +23,11 @@
23
23
  "dependencies": {
24
24
  "@atlaskit/adf-schema": "^57.4.0",
25
25
  "@atlaskit/css": "^1.1.0",
26
- "@atlaskit/editor-plugin-analytics": "^17.0.0",
27
- "@atlaskit/editor-plugin-connectivity": "^17.0.0",
28
- "@atlaskit/editor-plugin-context-panel": "^19.0.0",
29
- "@atlaskit/editor-plugin-metrics": "^18.0.0",
30
- "@atlaskit/editor-plugin-ui-control-registry": "^11.0.0",
26
+ "@atlaskit/editor-plugin-analytics": "^18.0.0",
27
+ "@atlaskit/editor-plugin-connectivity": "^18.0.0",
28
+ "@atlaskit/editor-plugin-context-panel": "^20.0.0",
29
+ "@atlaskit/editor-plugin-metrics": "^19.0.0",
30
+ "@atlaskit/editor-plugin-ui-control-registry": "^12.0.0",
31
31
  "@atlaskit/editor-prosemirror": "^8.0.0",
32
32
  "@atlaskit/editor-shared-styles": "^4.2.0",
33
33
  "@atlaskit/editor-ui-control-model": "^2.9.0",
@@ -35,14 +35,14 @@
35
35
  "@atlaskit/heading": "^7.2.0",
36
36
  "@atlaskit/icon": "^37.6.0",
37
37
  "@atlaskit/insm": "^3.0.0",
38
- "@atlaskit/mention": "^28.0.0",
38
+ "@atlaskit/mention": "^29.0.0",
39
39
  "@atlaskit/menu": "^10.2.0",
40
40
  "@atlaskit/platform-feature-experiments": "^0.3.0",
41
41
  "@atlaskit/platform-feature-flags": "^2.2.0",
42
42
  "@atlaskit/primitives": "^22.5.0",
43
43
  "@atlaskit/prosemirror-history": "^1.2.0",
44
44
  "@atlaskit/prosemirror-input-rules": "^4.1.0",
45
- "@atlaskit/tmp-editor-statsig": "^187.0.0",
45
+ "@atlaskit/tmp-editor-statsig": "^188.0.0",
46
46
  "@atlaskit/tokens": "^16.12.0",
47
47
  "@atlaskit/visually-hidden": "^4.4.0",
48
48
  "@babel/runtime": "^7.0.0",
@@ -54,7 +54,7 @@
54
54
  "w3c-keyname": "^2.1.8"
55
55
  },
56
56
  "peerDependencies": {
57
- "@atlaskit/editor-common": "^121.4.0",
57
+ "@atlaskit/editor-common": "^122.0.0",
58
58
  "react": "^18.2.0 || ^19.2.0",
59
59
  "react-dom": "^18.2.0 || ^19.2.0",
60
60
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"