@atlaskit/editor-plugin-type-ahead 6.3.0 → 6.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,22 @@
1
1
  # @atlaskit/editor-plugin-type-ahead
2
2
 
3
+ ## 6.4.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 6.4.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [`0ac75e0d28c72`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0ac75e0d28c72) -
14
+ Migrate @atlaskit/editor-prosemirror/history to @atlaskit/prosemirror-history package
15
+
16
+ ### Patch Changes
17
+
18
+ - Updated dependencies
19
+
3
20
  ## 6.3.0
4
21
 
5
22
  ### Minor Changes
@@ -8,8 +8,8 @@ exports.insertTypeAheadItem = void 0;
8
8
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
9
9
  var _steps = require("@atlaskit/adf-schema/steps");
10
10
  var _typeAhead = require("@atlaskit/editor-common/type-ahead");
11
- var _history = require("@atlaskit/editor-prosemirror/history");
12
11
  var _model = require("@atlaskit/editor-prosemirror/model");
12
+ var _prosemirrorHistory = require("@atlaskit/prosemirror-history");
13
13
  var _actions = require("../actions");
14
14
  var _key = require("../key");
15
15
  var _statsModifier = require("../stats-modifier");
@@ -72,7 +72,7 @@ var createInsertCallback = function createInsertCallback(_ref2) {
72
72
  position: position,
73
73
  selectInlineNode: Boolean(opts.selectInlineNode)
74
74
  });
75
- (0, _history.closeHistory)(tr);
75
+ (0, _prosemirrorHistory.closeHistory)(tr);
76
76
  if (wasInsertedBySpace) {
77
77
  return tr;
78
78
  }
@@ -95,7 +95,7 @@ var createDeleteRawTextCallback = function createDeleteRawTextCallback(_ref3) {
95
95
  insertItem = _ref3.insertItem;
96
96
  return function (newState) {
97
97
  var tr = newState.tr;
98
- (0, _history.closeHistory)(tr);
98
+ (0, _prosemirrorHistory.closeHistory)(tr);
99
99
  if (!wasInsertedBySpace) {
100
100
  tr.delete(position.start, position.end);
101
101
  var config = {
@@ -167,7 +167,7 @@ var insertTypeAheadItem = exports.insertTypeAheadItem = function insertTypeAhead
167
167
  var insertCallbackProxy = new Proxy(insertCallback, proxyHandler);
168
168
  var nextTr = handler.selectItem(newEditorSate, item, insertCallbackProxy, meta);
169
169
  if (!wasInsertCallbackCalled && nextTr) {
170
- (0, _history.closeHistory)(nextTr);
170
+ (0, _prosemirrorHistory.closeHistory)(nextTr);
171
171
 
172
172
  // In some cases we need to re-open the typeahead
173
173
  // e.g.: addign mentions from the quick insert
@@ -198,7 +198,7 @@ var insertTypeAheadItem = exports.insertTypeAheadItem = function insertTypeAhead
198
198
  })
199
199
  });
200
200
  tr.insertText(text);
201
- (0, _history.closeHistory)(tr);
201
+ (0, _prosemirrorHistory.closeHistory)(tr);
202
202
  view.dispatch(tr);
203
203
  view.focus();
204
204
  };
@@ -9,10 +9,10 @@ var _react = _interopRequireDefault(require("react"));
9
9
  var _reactIntlNext = require("react-intl-next");
10
10
  var _uuid = _interopRequireDefault(require("uuid"));
11
11
  var _w3cKeyname = require("w3c-keyname");
12
- var _history = require("@atlaskit/editor-prosemirror/history");
13
12
  var _state = require("@atlaskit/editor-prosemirror/state");
14
13
  var _view = require("@atlaskit/editor-prosemirror/view");
15
14
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
15
+ var _prosemirrorHistory = require("@atlaskit/prosemirror-history");
16
16
  var _colors = require("@atlaskit/theme/colors");
17
17
  var _WrapperTypeAhead = require("../ui/WrapperTypeAhead");
18
18
  var _closeTypeAhead = require("./commands/close-type-ahead");
@@ -70,7 +70,7 @@ var factoryDecorations = exports.factoryDecorations = function factoryDecoration
70
70
  var hasReopenQuery = typeof reopenQuery === 'string' && reopenQuery.trim().length > 0;
71
71
  var currentQuery = (0, _utils.getTypeAheadQuery)(editorView.state);
72
72
  if (hasReopenQuery || (currentQuery === null || currentQuery === void 0 ? void 0 : currentQuery.length) === 0) {
73
- var command = inputType === 'historyUndo' ? _history.undo : _history.redo;
73
+ var command = inputType === 'historyUndo' ? _prosemirrorHistory.undo : _prosemirrorHistory.redo;
74
74
  var _tr = editorView.state.tr;
75
75
  var fakeDispatch = function fakeDispatch(customTr) {
76
76
  _tr = customTr;
@@ -337,7 +337,7 @@ var TypeAheadPopup = exports.TypeAheadPopup = /*#__PURE__*/_react.default.memo(f
337
337
  }
338
338
  }, (0, _react2.jsx)("div", {
339
339
  css: [typeAheadContent, moreElementsInQuickInsertViewEnabled && typeAheadContentOverride, showMoreOptionsButton && typeAheadWrapperWithViewMoreOverride]
340
- // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex, @atlassian/a11y/no-noninteractive-tabindex
340
+ // eslint-disable-next-line @atlassian/a11y/no-noninteractive-tabindex
341
341
  ,
342
342
  tabIndex: 0
343
343
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
@@ -311,7 +311,7 @@ var TypeAheadPopup = exports.TypeAheadPopup = /*#__PURE__*/_react.default.memo(f
311
311
  preventOverflow: true
312
312
  }, (0, _react2.jsx)("div", {
313
313
  css: [typeAheadContent]
314
- // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex, @atlassian/a11y/no-noninteractive-tabindex
314
+ // eslint-disable-next-line @atlassian/a11y/no-noninteractive-tabindex
315
315
  ,
316
316
  tabIndex: 0
317
317
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
@@ -1,7 +1,7 @@
1
1
  import { InsertTypeAheadStages, InsertTypeAheadStep } from '@atlaskit/adf-schema/steps';
2
2
  import { SelectItemMode } from '@atlaskit/editor-common/type-ahead';
3
- import { closeHistory } from '@atlaskit/editor-prosemirror/history';
4
3
  import { Fragment, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
4
+ import { closeHistory } from '@atlaskit/prosemirror-history';
5
5
  import { ACTIONS } from '../actions';
6
6
  import { pluginKey } from '../key';
7
7
  import { StatsModifier } from '../stats-modifier';
@@ -2,10 +2,10 @@ import React from 'react';
2
2
  import { IntlProvider } from 'react-intl-next';
3
3
  import uuid from 'uuid';
4
4
  import { keyName as keyNameNormalized } from 'w3c-keyname';
5
- import { redo, undo } from '@atlaskit/editor-prosemirror/history';
6
5
  import { TextSelection } from '@atlaskit/editor-prosemirror/state';
7
6
  import { Decoration, DecorationSet } from '@atlaskit/editor-prosemirror/view';
8
7
  import { fg } from '@atlaskit/platform-feature-flags';
8
+ import { redo, undo } from '@atlaskit/prosemirror-history';
9
9
  import { B400 } from '@atlaskit/theme/colors';
10
10
  import { WrapperTypeAhead } from '../ui/WrapperTypeAhead';
11
11
  import { closeTypeAhead } from './commands/close-type-ahead';
@@ -333,7 +333,7 @@ export const TypeAheadPopup = /*#__PURE__*/React.memo(props => {
333
333
  }
334
334
  }, jsx("div", {
335
335
  css: [typeAheadContent, moreElementsInQuickInsertViewEnabled && typeAheadContentOverride, showMoreOptionsButton && typeAheadWrapperWithViewMoreOverride]
336
- // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex, @atlassian/a11y/no-noninteractive-tabindex
336
+ // eslint-disable-next-line @atlassian/a11y/no-noninteractive-tabindex
337
337
  ,
338
338
  tabIndex: 0
339
339
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
@@ -305,7 +305,7 @@ export const TypeAheadPopup = /*#__PURE__*/React.memo(props => {
305
305
  preventOverflow: true
306
306
  }, jsx("div", {
307
307
  css: [typeAheadContent]
308
- // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex, @atlassian/a11y/no-noninteractive-tabindex
308
+ // eslint-disable-next-line @atlassian/a11y/no-noninteractive-tabindex
309
309
  ,
310
310
  tabIndex: 0
311
311
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
@@ -1,8 +1,8 @@
1
1
  import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
2
2
  import { InsertTypeAheadStages, InsertTypeAheadStep } from '@atlaskit/adf-schema/steps';
3
3
  import { SelectItemMode } from '@atlaskit/editor-common/type-ahead';
4
- import { closeHistory } from '@atlaskit/editor-prosemirror/history';
5
4
  import { Fragment, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
5
+ import { closeHistory } from '@atlaskit/prosemirror-history';
6
6
  import { ACTIONS } from '../actions';
7
7
  import { pluginKey } from '../key';
8
8
  import { StatsModifier } from '../stats-modifier';
@@ -2,10 +2,10 @@ import React from 'react';
2
2
  import { IntlProvider } from 'react-intl-next';
3
3
  import uuid from 'uuid';
4
4
  import { keyName as keyNameNormalized } from 'w3c-keyname';
5
- import { redo, undo } from '@atlaskit/editor-prosemirror/history';
6
5
  import { TextSelection } from '@atlaskit/editor-prosemirror/state';
7
6
  import { Decoration, DecorationSet } from '@atlaskit/editor-prosemirror/view';
8
7
  import { fg } from '@atlaskit/platform-feature-flags';
8
+ import { redo, undo } from '@atlaskit/prosemirror-history';
9
9
  import { B400 } from '@atlaskit/theme/colors';
10
10
  import { WrapperTypeAhead } from '../ui/WrapperTypeAhead';
11
11
  import { closeTypeAhead } from './commands/close-type-ahead';
@@ -327,7 +327,7 @@ export var TypeAheadPopup = /*#__PURE__*/React.memo(function (props) {
327
327
  }
328
328
  }, jsx("div", {
329
329
  css: [typeAheadContent, moreElementsInQuickInsertViewEnabled && typeAheadContentOverride, showMoreOptionsButton && typeAheadWrapperWithViewMoreOverride]
330
- // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex, @atlassian/a11y/no-noninteractive-tabindex
330
+ // eslint-disable-next-line @atlassian/a11y/no-noninteractive-tabindex
331
331
  ,
332
332
  tabIndex: 0
333
333
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
@@ -302,7 +302,7 @@ export var TypeAheadPopup = /*#__PURE__*/React.memo(function (props) {
302
302
  preventOverflow: true
303
303
  }, jsx("div", {
304
304
  css: [typeAheadContent]
305
- // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex, @atlassian/a11y/no-noninteractive-tabindex
305
+ // eslint-disable-next-line @atlassian/a11y/no-noninteractive-tabindex
306
306
  ,
307
307
  tabIndex: 0
308
308
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-type-ahead",
3
- "version": "6.3.0",
3
+ "version": "6.4.1",
4
4
  "description": "Type-ahead plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -36,17 +36,18 @@
36
36
  "@atlaskit/editor-plugin-context-panel": "^8.0.0",
37
37
  "@atlaskit/editor-plugin-metrics": "^7.0.0",
38
38
  "@atlaskit/editor-prosemirror": "7.0.0",
39
- "@atlaskit/editor-shared-styles": "^3.6.0",
39
+ "@atlaskit/editor-shared-styles": "^3.7.0",
40
40
  "@atlaskit/heading": "^5.2.0",
41
- "@atlaskit/icon": "^28.4.0",
41
+ "@atlaskit/icon": "^28.5.0",
42
42
  "@atlaskit/insm": "^0.1.0",
43
43
  "@atlaskit/menu": "^8.4.0",
44
44
  "@atlaskit/platform-feature-flags": "^1.1.0",
45
- "@atlaskit/primitives": "^14.15.0",
46
- "@atlaskit/prosemirror-input-rules": "^3.4.0",
45
+ "@atlaskit/primitives": "^15.0.0",
46
+ "@atlaskit/prosemirror-history": "^0.2.0",
47
+ "@atlaskit/prosemirror-input-rules": "^3.5.0",
47
48
  "@atlaskit/theme": "^21.0.0",
48
- "@atlaskit/tmp-editor-statsig": "^13.4.0",
49
- "@atlaskit/tokens": "^6.4.0",
49
+ "@atlaskit/tmp-editor-statsig": "^13.10.0",
50
+ "@atlaskit/tokens": "^6.5.0",
50
51
  "@babel/runtime": "^7.0.0",
51
52
  "@emotion/react": "^11.7.1",
52
53
  "lodash": "^4.17.21",
@@ -56,7 +57,7 @@
56
57
  "w3c-keyname": "^2.1.8"
57
58
  },
58
59
  "peerDependencies": {
59
- "@atlaskit/editor-common": "^110.7.0",
60
+ "@atlaskit/editor-common": "^110.12.0",
60
61
  "react": "^18.2.0",
61
62
  "react-dom": "^18.2.0",
62
63
  "react-intl-next": "npm:react-intl@^5.18.1"