@atlaskit/editor-plugin-type-ahead 6.5.18 → 6.5.19

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
+ ## 6.5.19
4
+
5
+ ### Patch Changes
6
+
7
+ - [`4d676bbdb3ce6`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4d676bbdb3ce6) -
8
+ ts-ignore added temporarily to unblock local consumption for help-center, will be removed once
9
+ project refs are setup
10
+ - Updated dependencies
11
+
3
12
  ## 6.5.18
4
13
 
5
14
  ### Patch Changes
@@ -9,6 +9,7 @@ var _actions = require("./actions");
9
9
  var _isInsertionTransaction = require("./isInsertionTransaction");
10
10
  function createPlugin() {
11
11
  return new _safePlugin.SafePlugin({
12
+ // @ts-ignore - Workaround for help-center local consumption
12
13
  appendTransaction: function appendTransaction(transactions, _oldState, newState) {
13
14
  var insertItemCallback = (0, _isInsertionTransaction.isInsertionTransaction)(transactions, _actions.ACTIONS.INSERT_ITEM);
14
15
  if (insertItemCallback) {
@@ -16,6 +16,8 @@ var _isInsertionTransaction = require("./isInsertionTransaction");
16
16
  var _key = require("./key");
17
17
  var _reducer = require("./reducer");
18
18
  var hasValidTypeAheadStep = function hasValidTypeAheadStep(tr) {
19
+ // @ts-ignore - Workaround for help-center local consumption
20
+
19
21
  var steps = tr.steps.filter(function (step) {
20
22
  return step instanceof _steps.InsertTypeAheadStep;
21
23
  });
@@ -52,6 +54,7 @@ function createPlugin(_ref) {
52
54
  return new _safePlugin.SafePlugin({
53
55
  key: _key.pluginKey,
54
56
  state: {
57
+ // @ts-ignore - Workaround for help-center local consumption
55
58
  init: function init() {
56
59
  return {
57
60
  typeAheadHandlers: typeAheadHandlers,
@@ -66,6 +69,7 @@ function createPlugin(_ref) {
66
69
  removePrefixTriggerOnCancel: undefined
67
70
  };
68
71
  },
72
+ // @ts-ignore - Workaround for help-center local consumption
69
73
  apply: function apply(tr, currentPluginState, oldEditorState, state) {
70
74
  var customStep = hasValidTypeAheadStep(tr);
71
75
  var nextPluginState = reducer(tr, currentPluginState, customStep);
@@ -75,6 +79,7 @@ function createPlugin(_ref) {
75
79
  return nextPluginState;
76
80
  }
77
81
  },
82
+ // @ts-ignore - Workaround for help-center local consumption
78
83
  appendTransaction: function appendTransaction(transactions, _oldState, newState) {
79
84
  var insertItemCallback = (0, _isInsertionTransaction.isInsertionTransaction)(transactions, _actions.ACTIONS.INSERT_RAW_QUERY);
80
85
  if (insertItemCallback) {
@@ -90,8 +95,10 @@ function createPlugin(_ref) {
90
95
  }
91
96
  }
92
97
  },
98
+ // @ts-ignore - Workaround for help-center local consumption
93
99
  view: function view() {
94
100
  return {
101
+ // @ts-ignore - Workaround for help-center local consumption
95
102
  update: function update(editorView) {}
96
103
  };
97
104
  },
@@ -100,10 +107,16 @@ function createPlugin(_ref) {
100
107
  var _pluginKey$getState;
101
108
  return (_pluginKey$getState = _key.pluginKey.getState(state)) === null || _pluginKey$getState === void 0 ? void 0 : _pluginKey$getState.decorationSet;
102
109
  },
110
+ // @ts-ignore - Workaround for help-center local consumption
111
+
103
112
  handleDOMEvents: {
113
+ // @ts-ignore - Workaround for help-center local consumption
114
+
104
115
  compositionend: function compositionend(view, event) {
105
116
  return false;
106
117
  },
118
+ // @ts-ignore - Workaround for help-center local consumption
119
+
107
120
  click: function click(view, event) {
108
121
  var target = event.target;
109
122
  // ProseMirror view listen to any click event inside of it
@@ -191,9 +191,11 @@ var typeAheadPlugin = exports.typeAheadPlugin = function typeAheadPlugin(_ref) {
191
191
  name: 'typeAheadEditorViewRef',
192
192
  plugin: function plugin() {
193
193
  return new _safePlugin.SafePlugin({
194
+ // @ts-ignore - Workaround for help-center local consumption
194
195
  view: function view(_view) {
195
196
  editorViewRef.current = _view;
196
197
  return {
198
+ // @ts-ignore - Workaround for help-center local consumption
197
199
  destroy: function destroy() {
198
200
  editorViewRef.current = null;
199
201
  }
@@ -3,6 +3,8 @@ import { ACTIONS } from './actions';
3
3
  import { isInsertionTransaction } from './isInsertionTransaction';
4
4
  export function createPlugin() {
5
5
  return new SafePlugin({
6
+ // @ts-ignore - Workaround for help-center local consumption
7
+
6
8
  appendTransaction(transactions, _oldState, newState) {
7
9
  const insertItemCallback = isInsertionTransaction(transactions, ACTIONS.INSERT_ITEM);
8
10
  if (insertItemCallback) {
@@ -10,6 +10,8 @@ import { isInsertionTransaction } from './isInsertionTransaction';
10
10
  import { pluginKey } from './key';
11
11
  import { createReducer } from './reducer';
12
12
  const hasValidTypeAheadStep = tr => {
13
+ // @ts-ignore - Workaround for help-center local consumption
14
+
13
15
  const steps = tr.steps.filter(step => step instanceof InsertTypeAheadStep);
14
16
 
15
17
  // There are some cases, like collab rebase, where the steps are re-applied
@@ -46,6 +48,8 @@ export function createPlugin({
46
48
  return new SafePlugin({
47
49
  key: pluginKey,
48
50
  state: {
51
+ // @ts-ignore - Workaround for help-center local consumption
52
+
49
53
  init() {
50
54
  return {
51
55
  typeAheadHandlers,
@@ -60,6 +64,8 @@ export function createPlugin({
60
64
  removePrefixTriggerOnCancel: undefined
61
65
  };
62
66
  },
67
+ // @ts-ignore - Workaround for help-center local consumption
68
+
63
69
  apply(tr, currentPluginState, oldEditorState, state) {
64
70
  const customStep = hasValidTypeAheadStep(tr);
65
71
  const nextPluginState = reducer(tr, currentPluginState, customStep);
@@ -69,6 +75,8 @@ export function createPlugin({
69
75
  return nextPluginState;
70
76
  }
71
77
  },
78
+ // @ts-ignore - Workaround for help-center local consumption
79
+
72
80
  appendTransaction(transactions, _oldState, newState) {
73
81
  const insertItemCallback = isInsertionTransaction(transactions, ACTIONS.INSERT_RAW_QUERY);
74
82
  if (insertItemCallback) {
@@ -84,8 +92,12 @@ export function createPlugin({
84
92
  }
85
93
  }
86
94
  },
95
+ // @ts-ignore - Workaround for help-center local consumption
96
+
87
97
  view() {
88
98
  return {
99
+ // @ts-ignore - Workaround for help-center local consumption
100
+
89
101
  update(editorView) {}
90
102
  };
91
103
  },
@@ -94,10 +106,16 @@ export function createPlugin({
94
106
  var _pluginKey$getState;
95
107
  return (_pluginKey$getState = pluginKey.getState(state)) === null || _pluginKey$getState === void 0 ? void 0 : _pluginKey$getState.decorationSet;
96
108
  },
109
+ // @ts-ignore - Workaround for help-center local consumption
110
+
97
111
  handleDOMEvents: {
112
+ // @ts-ignore - Workaround for help-center local consumption
113
+
98
114
  compositionend: (view, event) => {
99
115
  return false;
100
116
  },
117
+ // @ts-ignore - Workaround for help-center local consumption
118
+
101
119
  click: (view, event) => {
102
120
  const {
103
121
  target
@@ -186,9 +186,13 @@ export const typeAheadPlugin = ({
186
186
  name: 'typeAheadEditorViewRef',
187
187
  plugin: () => {
188
188
  return new SafePlugin({
189
+ // @ts-ignore - Workaround for help-center local consumption
190
+
189
191
  view(view) {
190
192
  editorViewRef.current = view;
191
193
  return {
194
+ // @ts-ignore - Workaround for help-center local consumption
195
+
192
196
  destroy() {
193
197
  editorViewRef.current = null;
194
198
  }
@@ -3,6 +3,7 @@ import { ACTIONS } from './actions';
3
3
  import { isInsertionTransaction } from './isInsertionTransaction';
4
4
  export function createPlugin() {
5
5
  return new SafePlugin({
6
+ // @ts-ignore - Workaround for help-center local consumption
6
7
  appendTransaction: function appendTransaction(transactions, _oldState, newState) {
7
8
  var insertItemCallback = isInsertionTransaction(transactions, ACTIONS.INSERT_ITEM);
8
9
  if (insertItemCallback) {
@@ -10,6 +10,8 @@ import { isInsertionTransaction } from './isInsertionTransaction';
10
10
  import { pluginKey } from './key';
11
11
  import { createReducer } from './reducer';
12
12
  var hasValidTypeAheadStep = function hasValidTypeAheadStep(tr) {
13
+ // @ts-ignore - Workaround for help-center local consumption
14
+
13
15
  var steps = tr.steps.filter(function (step) {
14
16
  return step instanceof InsertTypeAheadStep;
15
17
  });
@@ -46,6 +48,7 @@ export function createPlugin(_ref) {
46
48
  return new SafePlugin({
47
49
  key: pluginKey,
48
50
  state: {
51
+ // @ts-ignore - Workaround for help-center local consumption
49
52
  init: function init() {
50
53
  return {
51
54
  typeAheadHandlers: typeAheadHandlers,
@@ -60,6 +63,7 @@ export function createPlugin(_ref) {
60
63
  removePrefixTriggerOnCancel: undefined
61
64
  };
62
65
  },
66
+ // @ts-ignore - Workaround for help-center local consumption
63
67
  apply: function apply(tr, currentPluginState, oldEditorState, state) {
64
68
  var customStep = hasValidTypeAheadStep(tr);
65
69
  var nextPluginState = reducer(tr, currentPluginState, customStep);
@@ -69,6 +73,7 @@ export function createPlugin(_ref) {
69
73
  return nextPluginState;
70
74
  }
71
75
  },
76
+ // @ts-ignore - Workaround for help-center local consumption
72
77
  appendTransaction: function appendTransaction(transactions, _oldState, newState) {
73
78
  var insertItemCallback = isInsertionTransaction(transactions, ACTIONS.INSERT_RAW_QUERY);
74
79
  if (insertItemCallback) {
@@ -84,8 +89,10 @@ export function createPlugin(_ref) {
84
89
  }
85
90
  }
86
91
  },
92
+ // @ts-ignore - Workaround for help-center local consumption
87
93
  view: function view() {
88
94
  return {
95
+ // @ts-ignore - Workaround for help-center local consumption
89
96
  update: function update(editorView) {}
90
97
  };
91
98
  },
@@ -94,10 +101,16 @@ export function createPlugin(_ref) {
94
101
  var _pluginKey$getState;
95
102
  return (_pluginKey$getState = pluginKey.getState(state)) === null || _pluginKey$getState === void 0 ? void 0 : _pluginKey$getState.decorationSet;
96
103
  },
104
+ // @ts-ignore - Workaround for help-center local consumption
105
+
97
106
  handleDOMEvents: {
107
+ // @ts-ignore - Workaround for help-center local consumption
108
+
98
109
  compositionend: function compositionend(view, event) {
99
110
  return false;
100
111
  },
112
+ // @ts-ignore - Workaround for help-center local consumption
113
+
101
114
  click: function click(view, event) {
102
115
  var target = event.target;
103
116
  // ProseMirror view listen to any click event inside of it
@@ -183,9 +183,11 @@ export var typeAheadPlugin = function typeAheadPlugin(_ref) {
183
183
  name: 'typeAheadEditorViewRef',
184
184
  plugin: function plugin() {
185
185
  return new SafePlugin({
186
+ // @ts-ignore - Workaround for help-center local consumption
186
187
  view: function view(_view) {
187
188
  editorViewRef.current = _view;
188
189
  return {
190
+ // @ts-ignore - Workaround for help-center local consumption
189
191
  destroy: function destroy() {
190
192
  editorViewRef.current = null;
191
193
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-type-ahead",
3
- "version": "6.5.18",
3
+ "version": "6.5.19",
4
4
  "description": "Type-ahead plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -42,12 +42,12 @@
42
42
  "@atlaskit/insm": "^0.2.0",
43
43
  "@atlaskit/menu": "^8.4.0",
44
44
  "@atlaskit/platform-feature-flags": "^1.1.0",
45
- "@atlaskit/primitives": "^16.1.0",
45
+ "@atlaskit/primitives": "^16.3.0",
46
46
  "@atlaskit/prosemirror-history": "^0.2.0",
47
47
  "@atlaskit/prosemirror-input-rules": "^3.6.0",
48
48
  "@atlaskit/theme": "^21.0.0",
49
- "@atlaskit/tmp-editor-statsig": "^13.38.0",
50
- "@atlaskit/tokens": "^8.0.0",
49
+ "@atlaskit/tmp-editor-statsig": "^13.42.0",
50
+ "@atlaskit/tokens": "^8.3.0",
51
51
  "@atlaskit/visually-hidden": "^3.0.0",
52
52
  "@babel/runtime": "^7.0.0",
53
53
  "@emotion/react": "^11.7.1",
@@ -58,7 +58,7 @@
58
58
  "w3c-keyname": "^2.1.8"
59
59
  },
60
60
  "peerDependencies": {
61
- "@atlaskit/editor-common": "^110.32.0",
61
+ "@atlaskit/editor-common": "^110.34.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"