@atlaskit/editor-plugin-type-ahead 6.5.21 → 6.5.22
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 +8 -0
- package/dist/cjs/pm-plugins/insert-item-plugin.js +0 -1
- package/dist/cjs/pm-plugins/main.js +0 -13
- package/dist/cjs/typeAheadPlugin.js +0 -2
- package/dist/es2019/pm-plugins/insert-item-plugin.js +0 -2
- package/dist/es2019/pm-plugins/main.js +0 -18
- package/dist/es2019/typeAheadPlugin.js +0 -4
- package/dist/esm/pm-plugins/insert-item-plugin.js +0 -1
- package/dist/esm/pm-plugins/main.js +0 -13
- package/dist/esm/typeAheadPlugin.js +0 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-type-ahead
|
|
2
2
|
|
|
3
|
+
## 6.5.22
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`55920a92e882a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/55920a92e882a) -
|
|
8
|
+
tsignores added for help-center local consumpton removed
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
3
11
|
## 6.5.21
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -9,7 +9,6 @@ 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
|
|
13
12
|
appendTransaction: function appendTransaction(transactions, _oldState, newState) {
|
|
14
13
|
var insertItemCallback = (0, _isInsertionTransaction.isInsertionTransaction)(transactions, _actions.ACTIONS.INSERT_ITEM);
|
|
15
14
|
if (insertItemCallback) {
|
|
@@ -16,8 +16,6 @@ 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
|
-
|
|
21
19
|
var steps = tr.steps.filter(function (step) {
|
|
22
20
|
return step instanceof _steps.InsertTypeAheadStep;
|
|
23
21
|
});
|
|
@@ -54,7 +52,6 @@ function createPlugin(_ref) {
|
|
|
54
52
|
return new _safePlugin.SafePlugin({
|
|
55
53
|
key: _key.pluginKey,
|
|
56
54
|
state: {
|
|
57
|
-
// @ts-ignore - Workaround for help-center local consumption
|
|
58
55
|
init: function init() {
|
|
59
56
|
return {
|
|
60
57
|
typeAheadHandlers: typeAheadHandlers,
|
|
@@ -69,7 +66,6 @@ function createPlugin(_ref) {
|
|
|
69
66
|
removePrefixTriggerOnCancel: undefined
|
|
70
67
|
};
|
|
71
68
|
},
|
|
72
|
-
// @ts-ignore - Workaround for help-center local consumption
|
|
73
69
|
apply: function apply(tr, currentPluginState, oldEditorState, state) {
|
|
74
70
|
var customStep = hasValidTypeAheadStep(tr);
|
|
75
71
|
var nextPluginState = reducer(tr, currentPluginState, customStep);
|
|
@@ -79,7 +75,6 @@ function createPlugin(_ref) {
|
|
|
79
75
|
return nextPluginState;
|
|
80
76
|
}
|
|
81
77
|
},
|
|
82
|
-
// @ts-ignore - Workaround for help-center local consumption
|
|
83
78
|
appendTransaction: function appendTransaction(transactions, _oldState, newState) {
|
|
84
79
|
var insertItemCallback = (0, _isInsertionTransaction.isInsertionTransaction)(transactions, _actions.ACTIONS.INSERT_RAW_QUERY);
|
|
85
80
|
if (insertItemCallback) {
|
|
@@ -95,10 +90,8 @@ function createPlugin(_ref) {
|
|
|
95
90
|
}
|
|
96
91
|
}
|
|
97
92
|
},
|
|
98
|
-
// @ts-ignore - Workaround for help-center local consumption
|
|
99
93
|
view: function view() {
|
|
100
94
|
return {
|
|
101
|
-
// @ts-ignore - Workaround for help-center local consumption
|
|
102
95
|
update: function update(editorView) {}
|
|
103
96
|
};
|
|
104
97
|
},
|
|
@@ -107,16 +100,10 @@ function createPlugin(_ref) {
|
|
|
107
100
|
var _pluginKey$getState;
|
|
108
101
|
return (_pluginKey$getState = _key.pluginKey.getState(state)) === null || _pluginKey$getState === void 0 ? void 0 : _pluginKey$getState.decorationSet;
|
|
109
102
|
},
|
|
110
|
-
// @ts-ignore - Workaround for help-center local consumption
|
|
111
|
-
|
|
112
103
|
handleDOMEvents: {
|
|
113
|
-
// @ts-ignore - Workaround for help-center local consumption
|
|
114
|
-
|
|
115
104
|
compositionend: function compositionend(view, event) {
|
|
116
105
|
return false;
|
|
117
106
|
},
|
|
118
|
-
// @ts-ignore - Workaround for help-center local consumption
|
|
119
|
-
|
|
120
107
|
click: function click(view, event) {
|
|
121
108
|
var target = event.target;
|
|
122
109
|
// ProseMirror view listen to any click event inside of it
|
|
@@ -191,11 +191,9 @@ 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
|
|
195
194
|
view: function view(_view) {
|
|
196
195
|
editorViewRef.current = _view;
|
|
197
196
|
return {
|
|
198
|
-
// @ts-ignore - Workaround for help-center local consumption
|
|
199
197
|
destroy: function destroy() {
|
|
200
198
|
editorViewRef.current = null;
|
|
201
199
|
}
|
|
@@ -3,8 +3,6 @@ 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
|
-
|
|
8
6
|
appendTransaction(transactions, _oldState, newState) {
|
|
9
7
|
const insertItemCallback = isInsertionTransaction(transactions, ACTIONS.INSERT_ITEM);
|
|
10
8
|
if (insertItemCallback) {
|
|
@@ -10,8 +10,6 @@ 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
|
-
|
|
15
13
|
const steps = tr.steps.filter(step => step instanceof InsertTypeAheadStep);
|
|
16
14
|
|
|
17
15
|
// There are some cases, like collab rebase, where the steps are re-applied
|
|
@@ -48,8 +46,6 @@ export function createPlugin({
|
|
|
48
46
|
return new SafePlugin({
|
|
49
47
|
key: pluginKey,
|
|
50
48
|
state: {
|
|
51
|
-
// @ts-ignore - Workaround for help-center local consumption
|
|
52
|
-
|
|
53
49
|
init() {
|
|
54
50
|
return {
|
|
55
51
|
typeAheadHandlers,
|
|
@@ -64,8 +60,6 @@ export function createPlugin({
|
|
|
64
60
|
removePrefixTriggerOnCancel: undefined
|
|
65
61
|
};
|
|
66
62
|
},
|
|
67
|
-
// @ts-ignore - Workaround for help-center local consumption
|
|
68
|
-
|
|
69
63
|
apply(tr, currentPluginState, oldEditorState, state) {
|
|
70
64
|
const customStep = hasValidTypeAheadStep(tr);
|
|
71
65
|
const nextPluginState = reducer(tr, currentPluginState, customStep);
|
|
@@ -75,8 +69,6 @@ export function createPlugin({
|
|
|
75
69
|
return nextPluginState;
|
|
76
70
|
}
|
|
77
71
|
},
|
|
78
|
-
// @ts-ignore - Workaround for help-center local consumption
|
|
79
|
-
|
|
80
72
|
appendTransaction(transactions, _oldState, newState) {
|
|
81
73
|
const insertItemCallback = isInsertionTransaction(transactions, ACTIONS.INSERT_RAW_QUERY);
|
|
82
74
|
if (insertItemCallback) {
|
|
@@ -92,12 +84,8 @@ export function createPlugin({
|
|
|
92
84
|
}
|
|
93
85
|
}
|
|
94
86
|
},
|
|
95
|
-
// @ts-ignore - Workaround for help-center local consumption
|
|
96
|
-
|
|
97
87
|
view() {
|
|
98
88
|
return {
|
|
99
|
-
// @ts-ignore - Workaround for help-center local consumption
|
|
100
|
-
|
|
101
89
|
update(editorView) {}
|
|
102
90
|
};
|
|
103
91
|
},
|
|
@@ -106,16 +94,10 @@ export function createPlugin({
|
|
|
106
94
|
var _pluginKey$getState;
|
|
107
95
|
return (_pluginKey$getState = pluginKey.getState(state)) === null || _pluginKey$getState === void 0 ? void 0 : _pluginKey$getState.decorationSet;
|
|
108
96
|
},
|
|
109
|
-
// @ts-ignore - Workaround for help-center local consumption
|
|
110
|
-
|
|
111
97
|
handleDOMEvents: {
|
|
112
|
-
// @ts-ignore - Workaround for help-center local consumption
|
|
113
|
-
|
|
114
98
|
compositionend: (view, event) => {
|
|
115
99
|
return false;
|
|
116
100
|
},
|
|
117
|
-
// @ts-ignore - Workaround for help-center local consumption
|
|
118
|
-
|
|
119
101
|
click: (view, event) => {
|
|
120
102
|
const {
|
|
121
103
|
target
|
|
@@ -186,13 +186,9 @@ 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
|
-
|
|
191
189
|
view(view) {
|
|
192
190
|
editorViewRef.current = view;
|
|
193
191
|
return {
|
|
194
|
-
// @ts-ignore - Workaround for help-center local consumption
|
|
195
|
-
|
|
196
192
|
destroy() {
|
|
197
193
|
editorViewRef.current = null;
|
|
198
194
|
}
|
|
@@ -3,7 +3,6 @@ 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
|
appendTransaction: function appendTransaction(transactions, _oldState, newState) {
|
|
8
7
|
var insertItemCallback = isInsertionTransaction(transactions, ACTIONS.INSERT_ITEM);
|
|
9
8
|
if (insertItemCallback) {
|
|
@@ -10,8 +10,6 @@ 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
|
-
|
|
15
13
|
var steps = tr.steps.filter(function (step) {
|
|
16
14
|
return step instanceof InsertTypeAheadStep;
|
|
17
15
|
});
|
|
@@ -48,7 +46,6 @@ export function createPlugin(_ref) {
|
|
|
48
46
|
return new SafePlugin({
|
|
49
47
|
key: pluginKey,
|
|
50
48
|
state: {
|
|
51
|
-
// @ts-ignore - Workaround for help-center local consumption
|
|
52
49
|
init: function init() {
|
|
53
50
|
return {
|
|
54
51
|
typeAheadHandlers: typeAheadHandlers,
|
|
@@ -63,7 +60,6 @@ export function createPlugin(_ref) {
|
|
|
63
60
|
removePrefixTriggerOnCancel: undefined
|
|
64
61
|
};
|
|
65
62
|
},
|
|
66
|
-
// @ts-ignore - Workaround for help-center local consumption
|
|
67
63
|
apply: function apply(tr, currentPluginState, oldEditorState, state) {
|
|
68
64
|
var customStep = hasValidTypeAheadStep(tr);
|
|
69
65
|
var nextPluginState = reducer(tr, currentPluginState, customStep);
|
|
@@ -73,7 +69,6 @@ export function createPlugin(_ref) {
|
|
|
73
69
|
return nextPluginState;
|
|
74
70
|
}
|
|
75
71
|
},
|
|
76
|
-
// @ts-ignore - Workaround for help-center local consumption
|
|
77
72
|
appendTransaction: function appendTransaction(transactions, _oldState, newState) {
|
|
78
73
|
var insertItemCallback = isInsertionTransaction(transactions, ACTIONS.INSERT_RAW_QUERY);
|
|
79
74
|
if (insertItemCallback) {
|
|
@@ -89,10 +84,8 @@ export function createPlugin(_ref) {
|
|
|
89
84
|
}
|
|
90
85
|
}
|
|
91
86
|
},
|
|
92
|
-
// @ts-ignore - Workaround for help-center local consumption
|
|
93
87
|
view: function view() {
|
|
94
88
|
return {
|
|
95
|
-
// @ts-ignore - Workaround for help-center local consumption
|
|
96
89
|
update: function update(editorView) {}
|
|
97
90
|
};
|
|
98
91
|
},
|
|
@@ -101,16 +94,10 @@ export function createPlugin(_ref) {
|
|
|
101
94
|
var _pluginKey$getState;
|
|
102
95
|
return (_pluginKey$getState = pluginKey.getState(state)) === null || _pluginKey$getState === void 0 ? void 0 : _pluginKey$getState.decorationSet;
|
|
103
96
|
},
|
|
104
|
-
// @ts-ignore - Workaround for help-center local consumption
|
|
105
|
-
|
|
106
97
|
handleDOMEvents: {
|
|
107
|
-
// @ts-ignore - Workaround for help-center local consumption
|
|
108
|
-
|
|
109
98
|
compositionend: function compositionend(view, event) {
|
|
110
99
|
return false;
|
|
111
100
|
},
|
|
112
|
-
// @ts-ignore - Workaround for help-center local consumption
|
|
113
|
-
|
|
114
101
|
click: function click(view, event) {
|
|
115
102
|
var target = event.target;
|
|
116
103
|
// ProseMirror view listen to any click event inside of it
|
|
@@ -183,11 +183,9 @@ 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
|
|
187
186
|
view: function view(_view) {
|
|
188
187
|
editorViewRef.current = _view;
|
|
189
188
|
return {
|
|
190
|
-
// @ts-ignore - Workaround for help-center local consumption
|
|
191
189
|
destroy: function destroy() {
|
|
192
190
|
editorViewRef.current = null;
|
|
193
191
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-type-ahead",
|
|
3
|
-
"version": "6.5.
|
|
3
|
+
"version": "6.5.22",
|
|
4
4
|
"description": "Type-ahead plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -46,7 +46,7 @@
|
|
|
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": "^14.
|
|
49
|
+
"@atlaskit/tmp-editor-statsig": "^14.2.0",
|
|
50
50
|
"@atlaskit/tokens": "^8.4.0",
|
|
51
51
|
"@atlaskit/visually-hidden": "^3.0.0",
|
|
52
52
|
"@babel/runtime": "^7.0.0",
|