@atlaskit/editor-plugin-type-ahead 11.2.2 → 11.3.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 +30 -0
- package/dist/cjs/typeAheadPlugin.js +33 -68
- package/dist/es2019/typeAheadPlugin.js +19 -52
- package/dist/esm/typeAheadPlugin.js +33 -68
- package/package.json +4 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-type-ahead
|
|
2
2
|
|
|
3
|
+
## 11.3.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 11.3.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [`443921a488044`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/443921a488044) -
|
|
14
|
+
Cleaned up stale feature gate `platform_editor_controls_patch_analytics_3`. Removed gated
|
|
15
|
+
analytics code paths and kept the enabled path.
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
21
|
+
## 11.2.4
|
|
22
|
+
|
|
23
|
+
### Patch Changes
|
|
24
|
+
|
|
25
|
+
- Updated dependencies
|
|
26
|
+
|
|
27
|
+
## 11.2.3
|
|
28
|
+
|
|
29
|
+
### Patch Changes
|
|
30
|
+
|
|
31
|
+
- Updated dependencies
|
|
32
|
+
|
|
3
33
|
## 11.2.2
|
|
4
34
|
|
|
5
35
|
### Patch Changes
|
|
@@ -32,52 +32,31 @@ var _ContentComponent = require("./ui/ContentComponent");
|
|
|
32
32
|
*
|
|
33
33
|
*/
|
|
34
34
|
|
|
35
|
-
var createOpenAtTransaction = function createOpenAtTransaction(
|
|
36
|
-
return function (
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
// This function is called from the editor-plugin-emoji and editor-plugin-type-ahead
|
|
52
|
-
// createOpenAtTransaction <- createOpenTypeAhead <- actions.open
|
|
53
|
-
// <- emoji-plugin (Not used)
|
|
54
|
-
// <- type-ahead-plugin (Used)
|
|
55
|
-
// and this caused the analytics event to be fired twice, as other places are relying on the
|
|
56
|
-
// `onEditorViewStateUpdated` method to fire the analytics event
|
|
57
|
-
// We want to disable this event
|
|
58
|
-
if (!(0, _platformFeatureFlags.fg)('platform_editor_controls_patch_analytics_3')) {
|
|
59
|
-
editorAnalyticsAPI === null || editorAnalyticsAPI === void 0 || editorAnalyticsAPI.attachAnalyticsEvent({
|
|
60
|
-
action: _analytics.ACTION.INVOKED,
|
|
61
|
-
actionSubject: _analytics.ACTION_SUBJECT.TYPEAHEAD,
|
|
62
|
-
actionSubjectId: triggerHandler.id,
|
|
63
|
-
attributes: {
|
|
64
|
-
inputMethod: inputMethod
|
|
65
|
-
},
|
|
66
|
-
eventType: _analytics.EVENT_TYPE.UI
|
|
67
|
-
})(tr);
|
|
68
|
-
}
|
|
69
|
-
return true;
|
|
70
|
-
};
|
|
35
|
+
var createOpenAtTransaction = function createOpenAtTransaction(props) {
|
|
36
|
+
return function (tr) {
|
|
37
|
+
var triggerHandler = props.triggerHandler,
|
|
38
|
+
inputMethod = props.inputMethod,
|
|
39
|
+
query = props.query,
|
|
40
|
+
removePrefixTriggerOnCancel = props.removePrefixTriggerOnCancel;
|
|
41
|
+
(0, _openTypeaheadAtCursor.openTypeAheadAtCursor)({
|
|
42
|
+
triggerHandler: triggerHandler,
|
|
43
|
+
inputMethod: inputMethod,
|
|
44
|
+
query: query,
|
|
45
|
+
removePrefixTriggerOnCancel: removePrefixTriggerOnCancel
|
|
46
|
+
})({
|
|
47
|
+
tr: tr
|
|
48
|
+
});
|
|
49
|
+
return true;
|
|
71
50
|
};
|
|
72
51
|
};
|
|
73
|
-
var createOpenTypeAhead = function createOpenTypeAhead(editorViewRef
|
|
52
|
+
var createOpenTypeAhead = function createOpenTypeAhead(editorViewRef) {
|
|
74
53
|
return function (props) {
|
|
75
54
|
if (!editorViewRef.current) {
|
|
76
55
|
return false;
|
|
77
56
|
}
|
|
78
57
|
var view = editorViewRef.current;
|
|
79
58
|
var tr = view.state.tr;
|
|
80
|
-
createOpenAtTransaction(
|
|
59
|
+
createOpenAtTransaction(props)(tr);
|
|
81
60
|
view.dispatch(tr);
|
|
82
61
|
return true;
|
|
83
62
|
};
|
|
@@ -162,7 +141,6 @@ var createCloseTypeAhead = function createCloseTypeAhead(editorViewRef) {
|
|
|
162
141
|
*
|
|
163
142
|
*/
|
|
164
143
|
var typeAheadPlugin = exports.typeAheadPlugin = function typeAheadPlugin(_ref) {
|
|
165
|
-
var _api$analytics, _api$analytics2;
|
|
166
144
|
var api = _ref.api;
|
|
167
145
|
var popupMountRef = {
|
|
168
146
|
current: null
|
|
@@ -259,8 +237,8 @@ var typeAheadPlugin = exports.typeAheadPlugin = function typeAheadPlugin(_ref) {
|
|
|
259
237
|
actions: {
|
|
260
238
|
isOpen: _utils.isTypeAheadOpen,
|
|
261
239
|
isAllowed: _utils.isTypeAheadAllowed,
|
|
262
|
-
open: createOpenTypeAhead(editorViewRef
|
|
263
|
-
openAtTransaction: createOpenAtTransaction
|
|
240
|
+
open: createOpenTypeAhead(editorViewRef),
|
|
241
|
+
openAtTransaction: createOpenAtTransaction,
|
|
264
242
|
findHandlerByTrigger: createFindHandlerByTrigger(editorViewRef),
|
|
265
243
|
insert: createInsertTypeAheadItem(editorViewRef),
|
|
266
244
|
close: createCloseTypeAhead(editorViewRef),
|
|
@@ -325,33 +303,20 @@ var typeAheadPlugin = exports.typeAheadPlugin = function typeAheadPlugin(_ref) {
|
|
|
325
303
|
// if the typeahead opens another typeahead via the quickInsert we do NOT want to fire this analytic event (mentions and emojis) as it is already being fired from editor-plugin-analytics
|
|
326
304
|
var isDuplicateInvokedEvent = newPluginState.inputMethod === _analytics.INPUT_METHOD.QUICK_INSERT && Object.values(_typeAhead.TypeAheadAvailableNodes).includes(newTriggerHandler.id);
|
|
327
305
|
if (!isDuplicateInvokedEvent) {
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
});
|
|
343
|
-
} else {
|
|
344
|
-
var _api$analytics4;
|
|
345
|
-
api === null || api === void 0 || (_api$analytics4 = api.analytics) === null || _api$analytics4 === void 0 || (_api$analytics4 = _api$analytics4.actions) === null || _api$analytics4 === void 0 || _api$analytics4.fireAnalyticsEvent({
|
|
346
|
-
action: _analytics.ACTION.INVOKED,
|
|
347
|
-
actionSubject: _analytics.ACTION_SUBJECT.TYPEAHEAD,
|
|
348
|
-
actionSubjectId: newTriggerHandler.id || 'not_set',
|
|
349
|
-
attributes: {
|
|
350
|
-
inputMethod: newPluginState.inputMethod || _analytics.INPUT_METHOD.KEYBOARD
|
|
351
|
-
},
|
|
352
|
-
eventType: _analytics.EVENT_TYPE.UI
|
|
353
|
-
});
|
|
354
|
-
}
|
|
306
|
+
var _api$analytics;
|
|
307
|
+
api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 || (_api$analytics = _api$analytics.actions) === null || _api$analytics === void 0 || _api$analytics.fireAnalyticsEvent({
|
|
308
|
+
action: _analytics.ACTION.INVOKED,
|
|
309
|
+
actionSubject: _analytics.ACTION_SUBJECT.TYPEAHEAD,
|
|
310
|
+
actionSubjectId: newTriggerHandler.id || 'not_set',
|
|
311
|
+
attributes: {
|
|
312
|
+
inputMethod: newPluginState.inputMethod || _analytics.INPUT_METHOD.KEYBOARD
|
|
313
|
+
},
|
|
314
|
+
eventType: _analytics.EVENT_TYPE.UI
|
|
315
|
+
}, undefined, {
|
|
316
|
+
context: {
|
|
317
|
+
selection: newEditorState.selection
|
|
318
|
+
}
|
|
319
|
+
});
|
|
355
320
|
}
|
|
356
321
|
} else if (oldIsOpen && !newIsOpen && (0, _platformFeatureFlags.fg)('platform_editor_ease_of_use_metrics')) {
|
|
357
322
|
var _api$metrics2;
|
|
@@ -24,7 +24,7 @@ import { createPlugin } from './pm-plugins/main';
|
|
|
24
24
|
import { StatsModifier } from './pm-plugins/stats-modifier';
|
|
25
25
|
import { findHandler, getPluginState, getTypeAheadHandler, getTypeAheadQuery, isTypeAheadAllowed, isTypeAheadOpen } from './pm-plugins/utils';
|
|
26
26
|
import { ContentComponent } from './ui/ContentComponent';
|
|
27
|
-
const createOpenAtTransaction =
|
|
27
|
+
const createOpenAtTransaction = props => tr => {
|
|
28
28
|
const {
|
|
29
29
|
triggerHandler,
|
|
30
30
|
inputMethod,
|
|
@@ -39,28 +39,9 @@ const createOpenAtTransaction = editorAnalyticsAPI => props => tr => {
|
|
|
39
39
|
})({
|
|
40
40
|
tr
|
|
41
41
|
});
|
|
42
|
-
|
|
43
|
-
// This function is called from the editor-plugin-emoji and editor-plugin-type-ahead
|
|
44
|
-
// createOpenAtTransaction <- createOpenTypeAhead <- actions.open
|
|
45
|
-
// <- emoji-plugin (Not used)
|
|
46
|
-
// <- type-ahead-plugin (Used)
|
|
47
|
-
// and this caused the analytics event to be fired twice, as other places are relying on the
|
|
48
|
-
// `onEditorViewStateUpdated` method to fire the analytics event
|
|
49
|
-
// We want to disable this event
|
|
50
|
-
if (!fg('platform_editor_controls_patch_analytics_3')) {
|
|
51
|
-
editorAnalyticsAPI === null || editorAnalyticsAPI === void 0 ? void 0 : editorAnalyticsAPI.attachAnalyticsEvent({
|
|
52
|
-
action: ACTION.INVOKED,
|
|
53
|
-
actionSubject: ACTION_SUBJECT.TYPEAHEAD,
|
|
54
|
-
actionSubjectId: triggerHandler.id,
|
|
55
|
-
attributes: {
|
|
56
|
-
inputMethod
|
|
57
|
-
},
|
|
58
|
-
eventType: EVENT_TYPE.UI
|
|
59
|
-
})(tr);
|
|
60
|
-
}
|
|
61
42
|
return true;
|
|
62
43
|
};
|
|
63
|
-
const createOpenTypeAhead =
|
|
44
|
+
const createOpenTypeAhead = editorViewRef => props => {
|
|
64
45
|
if (!editorViewRef.current) {
|
|
65
46
|
return false;
|
|
66
47
|
}
|
|
@@ -70,7 +51,7 @@ const createOpenTypeAhead = (editorViewRef, editorAnalyticsAPI) => props => {
|
|
|
70
51
|
const {
|
|
71
52
|
tr
|
|
72
53
|
} = view.state;
|
|
73
|
-
createOpenAtTransaction(
|
|
54
|
+
createOpenAtTransaction(props)(tr);
|
|
74
55
|
view.dispatch(tr);
|
|
75
56
|
return true;
|
|
76
57
|
};
|
|
@@ -160,7 +141,6 @@ const createCloseTypeAhead = editorViewRef => options => {
|
|
|
160
141
|
export const typeAheadPlugin = ({
|
|
161
142
|
api
|
|
162
143
|
}) => {
|
|
163
|
-
var _api$analytics, _api$analytics2;
|
|
164
144
|
const popupMountRef = {
|
|
165
145
|
current: null
|
|
166
146
|
};
|
|
@@ -253,8 +233,8 @@ export const typeAheadPlugin = ({
|
|
|
253
233
|
actions: {
|
|
254
234
|
isOpen: isTypeAheadOpen,
|
|
255
235
|
isAllowed: isTypeAheadAllowed,
|
|
256
|
-
open: createOpenTypeAhead(editorViewRef
|
|
257
|
-
openAtTransaction: createOpenAtTransaction
|
|
236
|
+
open: createOpenTypeAhead(editorViewRef),
|
|
237
|
+
openAtTransaction: createOpenAtTransaction,
|
|
258
238
|
findHandlerByTrigger: createFindHandlerByTrigger(editorViewRef),
|
|
259
239
|
insert: createInsertTypeAheadItem(editorViewRef),
|
|
260
240
|
close: createCloseTypeAhead(editorViewRef),
|
|
@@ -325,33 +305,20 @@ export const typeAheadPlugin = ({
|
|
|
325
305
|
// if the typeahead opens another typeahead via the quickInsert we do NOT want to fire this analytic event (mentions and emojis) as it is already being fired from editor-plugin-analytics
|
|
326
306
|
const isDuplicateInvokedEvent = newPluginState.inputMethod === INPUT_METHOD.QUICK_INSERT && Object.values(TypeAheadAvailableNodes).includes(newTriggerHandler.id);
|
|
327
307
|
if (!isDuplicateInvokedEvent) {
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
});
|
|
343
|
-
} else {
|
|
344
|
-
var _api$analytics4, _api$analytics4$actio;
|
|
345
|
-
api === null || api === void 0 ? void 0 : (_api$analytics4 = api.analytics) === null || _api$analytics4 === void 0 ? void 0 : (_api$analytics4$actio = _api$analytics4.actions) === null || _api$analytics4$actio === void 0 ? void 0 : _api$analytics4$actio.fireAnalyticsEvent({
|
|
346
|
-
action: ACTION.INVOKED,
|
|
347
|
-
actionSubject: ACTION_SUBJECT.TYPEAHEAD,
|
|
348
|
-
actionSubjectId: newTriggerHandler.id || 'not_set',
|
|
349
|
-
attributes: {
|
|
350
|
-
inputMethod: newPluginState.inputMethod || INPUT_METHOD.KEYBOARD
|
|
351
|
-
},
|
|
352
|
-
eventType: EVENT_TYPE.UI
|
|
353
|
-
});
|
|
354
|
-
}
|
|
308
|
+
var _api$analytics, _api$analytics$action;
|
|
309
|
+
api === null || api === void 0 ? void 0 : (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : (_api$analytics$action = _api$analytics.actions) === null || _api$analytics$action === void 0 ? void 0 : _api$analytics$action.fireAnalyticsEvent({
|
|
310
|
+
action: ACTION.INVOKED,
|
|
311
|
+
actionSubject: ACTION_SUBJECT.TYPEAHEAD,
|
|
312
|
+
actionSubjectId: newTriggerHandler.id || 'not_set',
|
|
313
|
+
attributes: {
|
|
314
|
+
inputMethod: newPluginState.inputMethod || INPUT_METHOD.KEYBOARD
|
|
315
|
+
},
|
|
316
|
+
eventType: EVENT_TYPE.UI
|
|
317
|
+
}, undefined, {
|
|
318
|
+
context: {
|
|
319
|
+
selection: newEditorState.selection
|
|
320
|
+
}
|
|
321
|
+
});
|
|
355
322
|
}
|
|
356
323
|
} else if (oldIsOpen && !newIsOpen && fg('platform_editor_ease_of_use_metrics')) {
|
|
357
324
|
var _api$metrics2;
|
|
@@ -24,52 +24,31 @@ import { createPlugin } from './pm-plugins/main';
|
|
|
24
24
|
import { StatsModifier } from './pm-plugins/stats-modifier';
|
|
25
25
|
import { findHandler, getPluginState, getTypeAheadHandler, getTypeAheadQuery, isTypeAheadAllowed, isTypeAheadOpen } from './pm-plugins/utils';
|
|
26
26
|
import { ContentComponent } from './ui/ContentComponent';
|
|
27
|
-
var createOpenAtTransaction = function createOpenAtTransaction(
|
|
28
|
-
return function (
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
// This function is called from the editor-plugin-emoji and editor-plugin-type-ahead
|
|
44
|
-
// createOpenAtTransaction <- createOpenTypeAhead <- actions.open
|
|
45
|
-
// <- emoji-plugin (Not used)
|
|
46
|
-
// <- type-ahead-plugin (Used)
|
|
47
|
-
// and this caused the analytics event to be fired twice, as other places are relying on the
|
|
48
|
-
// `onEditorViewStateUpdated` method to fire the analytics event
|
|
49
|
-
// We want to disable this event
|
|
50
|
-
if (!fg('platform_editor_controls_patch_analytics_3')) {
|
|
51
|
-
editorAnalyticsAPI === null || editorAnalyticsAPI === void 0 || editorAnalyticsAPI.attachAnalyticsEvent({
|
|
52
|
-
action: ACTION.INVOKED,
|
|
53
|
-
actionSubject: ACTION_SUBJECT.TYPEAHEAD,
|
|
54
|
-
actionSubjectId: triggerHandler.id,
|
|
55
|
-
attributes: {
|
|
56
|
-
inputMethod: inputMethod
|
|
57
|
-
},
|
|
58
|
-
eventType: EVENT_TYPE.UI
|
|
59
|
-
})(tr);
|
|
60
|
-
}
|
|
61
|
-
return true;
|
|
62
|
-
};
|
|
27
|
+
var createOpenAtTransaction = function createOpenAtTransaction(props) {
|
|
28
|
+
return function (tr) {
|
|
29
|
+
var triggerHandler = props.triggerHandler,
|
|
30
|
+
inputMethod = props.inputMethod,
|
|
31
|
+
query = props.query,
|
|
32
|
+
removePrefixTriggerOnCancel = props.removePrefixTriggerOnCancel;
|
|
33
|
+
openTypeAheadAtCursor({
|
|
34
|
+
triggerHandler: triggerHandler,
|
|
35
|
+
inputMethod: inputMethod,
|
|
36
|
+
query: query,
|
|
37
|
+
removePrefixTriggerOnCancel: removePrefixTriggerOnCancel
|
|
38
|
+
})({
|
|
39
|
+
tr: tr
|
|
40
|
+
});
|
|
41
|
+
return true;
|
|
63
42
|
};
|
|
64
43
|
};
|
|
65
|
-
var createOpenTypeAhead = function createOpenTypeAhead(editorViewRef
|
|
44
|
+
var createOpenTypeAhead = function createOpenTypeAhead(editorViewRef) {
|
|
66
45
|
return function (props) {
|
|
67
46
|
if (!editorViewRef.current) {
|
|
68
47
|
return false;
|
|
69
48
|
}
|
|
70
49
|
var view = editorViewRef.current;
|
|
71
50
|
var tr = view.state.tr;
|
|
72
|
-
createOpenAtTransaction(
|
|
51
|
+
createOpenAtTransaction(props)(tr);
|
|
73
52
|
view.dispatch(tr);
|
|
74
53
|
return true;
|
|
75
54
|
};
|
|
@@ -154,7 +133,6 @@ var createCloseTypeAhead = function createCloseTypeAhead(editorViewRef) {
|
|
|
154
133
|
*
|
|
155
134
|
*/
|
|
156
135
|
export var typeAheadPlugin = function typeAheadPlugin(_ref) {
|
|
157
|
-
var _api$analytics, _api$analytics2;
|
|
158
136
|
var api = _ref.api;
|
|
159
137
|
var popupMountRef = {
|
|
160
138
|
current: null
|
|
@@ -251,8 +229,8 @@ export var typeAheadPlugin = function typeAheadPlugin(_ref) {
|
|
|
251
229
|
actions: {
|
|
252
230
|
isOpen: isTypeAheadOpen,
|
|
253
231
|
isAllowed: isTypeAheadAllowed,
|
|
254
|
-
open: createOpenTypeAhead(editorViewRef
|
|
255
|
-
openAtTransaction: createOpenAtTransaction
|
|
232
|
+
open: createOpenTypeAhead(editorViewRef),
|
|
233
|
+
openAtTransaction: createOpenAtTransaction,
|
|
256
234
|
findHandlerByTrigger: createFindHandlerByTrigger(editorViewRef),
|
|
257
235
|
insert: createInsertTypeAheadItem(editorViewRef),
|
|
258
236
|
close: createCloseTypeAhead(editorViewRef),
|
|
@@ -317,33 +295,20 @@ export var typeAheadPlugin = function typeAheadPlugin(_ref) {
|
|
|
317
295
|
// if the typeahead opens another typeahead via the quickInsert we do NOT want to fire this analytic event (mentions and emojis) as it is already being fired from editor-plugin-analytics
|
|
318
296
|
var isDuplicateInvokedEvent = newPluginState.inputMethod === INPUT_METHOD.QUICK_INSERT && Object.values(TypeAheadAvailableNodes).includes(newTriggerHandler.id);
|
|
319
297
|
if (!isDuplicateInvokedEvent) {
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
});
|
|
335
|
-
} else {
|
|
336
|
-
var _api$analytics4;
|
|
337
|
-
api === null || api === void 0 || (_api$analytics4 = api.analytics) === null || _api$analytics4 === void 0 || (_api$analytics4 = _api$analytics4.actions) === null || _api$analytics4 === void 0 || _api$analytics4.fireAnalyticsEvent({
|
|
338
|
-
action: ACTION.INVOKED,
|
|
339
|
-
actionSubject: ACTION_SUBJECT.TYPEAHEAD,
|
|
340
|
-
actionSubjectId: newTriggerHandler.id || 'not_set',
|
|
341
|
-
attributes: {
|
|
342
|
-
inputMethod: newPluginState.inputMethod || INPUT_METHOD.KEYBOARD
|
|
343
|
-
},
|
|
344
|
-
eventType: EVENT_TYPE.UI
|
|
345
|
-
});
|
|
346
|
-
}
|
|
298
|
+
var _api$analytics;
|
|
299
|
+
api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 || (_api$analytics = _api$analytics.actions) === null || _api$analytics === void 0 || _api$analytics.fireAnalyticsEvent({
|
|
300
|
+
action: ACTION.INVOKED,
|
|
301
|
+
actionSubject: ACTION_SUBJECT.TYPEAHEAD,
|
|
302
|
+
actionSubjectId: newTriggerHandler.id || 'not_set',
|
|
303
|
+
attributes: {
|
|
304
|
+
inputMethod: newPluginState.inputMethod || INPUT_METHOD.KEYBOARD
|
|
305
|
+
},
|
|
306
|
+
eventType: EVENT_TYPE.UI
|
|
307
|
+
}, undefined, {
|
|
308
|
+
context: {
|
|
309
|
+
selection: newEditorState.selection
|
|
310
|
+
}
|
|
311
|
+
});
|
|
347
312
|
}
|
|
348
313
|
} else if (oldIsOpen && !newIsOpen && fg('platform_editor_ease_of_use_metrics')) {
|
|
349
314
|
var _api$metrics2;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-type-ahead",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.3.1",
|
|
4
4
|
"description": "Type-ahead plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"@atlaskit/editor-plugin-metrics": "^12.0.0",
|
|
37
37
|
"@atlaskit/editor-prosemirror": "^7.3.0",
|
|
38
38
|
"@atlaskit/editor-shared-styles": "^3.11.0",
|
|
39
|
-
"@atlaskit/feature-gate-js-client": "^5.
|
|
39
|
+
"@atlaskit/feature-gate-js-client": "^5.8.0",
|
|
40
40
|
"@atlaskit/heading": "^5.4.0",
|
|
41
41
|
"@atlaskit/insm": "^0.4.0",
|
|
42
42
|
"@atlaskit/menu": "^8.5.0",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@atlaskit/primitives": "^19.0.0",
|
|
45
45
|
"@atlaskit/prosemirror-history": "^0.2.0",
|
|
46
46
|
"@atlaskit/prosemirror-input-rules": "^3.7.0",
|
|
47
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
47
|
+
"@atlaskit/tmp-editor-statsig": "^98.0.0",
|
|
48
48
|
"@atlaskit/tokens": "^13.3.0",
|
|
49
49
|
"@atlaskit/visually-hidden": "^3.1.0",
|
|
50
50
|
"@babel/runtime": "^7.0.0",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"w3c-keyname": "^2.1.8"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
|
-
"@atlaskit/editor-common": "^115.
|
|
59
|
+
"@atlaskit/editor-common": "^115.12.0",
|
|
60
60
|
"react": "^18.2.0",
|
|
61
61
|
"react-dom": "^18.2.0",
|
|
62
62
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|
|
@@ -95,9 +95,6 @@
|
|
|
95
95
|
"platform_editor_quick_insert_placeholder": {
|
|
96
96
|
"type": "boolean"
|
|
97
97
|
},
|
|
98
|
-
"platform_editor_controls_patch_analytics_3": {
|
|
99
|
-
"type": "boolean"
|
|
100
|
-
},
|
|
101
98
|
"platform_editor_ease_of_use_metrics": {
|
|
102
99
|
"type": "boolean"
|
|
103
100
|
}
|