@atlaskit/editor-plugin-quick-insert 6.0.7 → 6.0.9
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 +14 -0
- package/dist/cjs/pm-plugins/experiences/quick-insert-open-experience.js +3 -1
- package/dist/cjs/quickInsertPlugin.js +5 -1
- package/dist/es2019/pm-plugins/experiences/quick-insert-open-experience.js +3 -1
- package/dist/es2019/quickInsertPlugin.js +5 -1
- package/dist/esm/pm-plugins/experiences/quick-insert-open-experience.js +3 -1
- package/dist/esm/quickInsertPlugin.js +5 -1
- package/dist/types/pm-plugins/experiences/quick-insert-open-experience.d.ts +3 -1
- package/dist/types/quickInsertPluginType.d.ts +4 -2
- package/dist/types-ts4.5/pm-plugins/experiences/quick-insert-open-experience.d.ts +3 -1
- package/dist/types-ts4.5/quickInsertPluginType.d.ts +4 -2
- package/package.json +5 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-quick-insert
|
|
2
2
|
|
|
3
|
+
## 6.0.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 6.0.8
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`373dccb169d0b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/373dccb169d0b) -
|
|
14
|
+
ED-29654 Editor experience custom tracking
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 6.0.7
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -27,7 +27,8 @@ var ABORT_REASON = {
|
|
|
27
27
|
* Abort: When user presses escape or backspace
|
|
28
28
|
*/
|
|
29
29
|
var getQuickInsertOpenExperiencePlugin = exports.getQuickInsertOpenExperiencePlugin = function getQuickInsertOpenExperiencePlugin(_ref) {
|
|
30
|
-
var refs = _ref.refs
|
|
30
|
+
var refs = _ref.refs,
|
|
31
|
+
dispatchAnalyticsEvent = _ref.dispatchAnalyticsEvent;
|
|
31
32
|
var targetEl;
|
|
32
33
|
var editorViewEl;
|
|
33
34
|
var getTarget = function getTarget() {
|
|
@@ -37,6 +38,7 @@ var getQuickInsertOpenExperiencePlugin = exports.getQuickInsertOpenExperiencePlu
|
|
|
37
38
|
return targetEl;
|
|
38
39
|
};
|
|
39
40
|
var experience = new _experiences.Experience('quick-insert-open', {
|
|
41
|
+
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
40
42
|
checks: [new _experiences.ExperienceCheckTimeout({
|
|
41
43
|
durationMs: 500
|
|
42
44
|
}), new _experiences.ExperienceCheckDomMutation({
|
|
@@ -85,7 +85,11 @@ var quickInsertPlugin = exports.quickInsertPlugin = function quickInsertPlugin(_
|
|
|
85
85
|
name: 'quickInsertOpenExperience',
|
|
86
86
|
plugin: function plugin() {
|
|
87
87
|
return (0, _quickInsertOpenExperience.getQuickInsertOpenExperiencePlugin)({
|
|
88
|
-
refs: refs
|
|
88
|
+
refs: refs,
|
|
89
|
+
dispatchAnalyticsEvent: function dispatchAnalyticsEvent(payload) {
|
|
90
|
+
var _api$analytics;
|
|
91
|
+
return api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 || (_api$analytics = _api$analytics.actions) === null || _api$analytics === void 0 ? void 0 : _api$analytics.fireAnalyticsEvent(payload);
|
|
92
|
+
}
|
|
89
93
|
});
|
|
90
94
|
}
|
|
91
95
|
}] : []));
|
|
@@ -19,7 +19,8 @@ const ABORT_REASON = {
|
|
|
19
19
|
* Abort: When user presses escape or backspace
|
|
20
20
|
*/
|
|
21
21
|
export const getQuickInsertOpenExperiencePlugin = ({
|
|
22
|
-
refs
|
|
22
|
+
refs,
|
|
23
|
+
dispatchAnalyticsEvent
|
|
23
24
|
}) => {
|
|
24
25
|
let targetEl;
|
|
25
26
|
let editorViewEl;
|
|
@@ -30,6 +31,7 @@ export const getQuickInsertOpenExperiencePlugin = ({
|
|
|
30
31
|
return targetEl;
|
|
31
32
|
};
|
|
32
33
|
const experience = new Experience('quick-insert-open', {
|
|
34
|
+
dispatchAnalyticsEvent,
|
|
33
35
|
checks: [new ExperienceCheckTimeout({
|
|
34
36
|
durationMs: 500
|
|
35
37
|
}), new ExperienceCheckDomMutation({
|
|
@@ -73,7 +73,11 @@ export const quickInsertPlugin = ({
|
|
|
73
73
|
}, ...(expValEquals('platform_editor_experience_tracking', 'isEnabled', true) ? [{
|
|
74
74
|
name: 'quickInsertOpenExperience',
|
|
75
75
|
plugin: () => getQuickInsertOpenExperiencePlugin({
|
|
76
|
-
refs
|
|
76
|
+
refs,
|
|
77
|
+
dispatchAnalyticsEvent: payload => {
|
|
78
|
+
var _api$analytics, _api$analytics$action;
|
|
79
|
+
return 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(payload);
|
|
80
|
+
}
|
|
77
81
|
})
|
|
78
82
|
}] : [])];
|
|
79
83
|
},
|
|
@@ -20,7 +20,8 @@ var ABORT_REASON = {
|
|
|
20
20
|
* Abort: When user presses escape or backspace
|
|
21
21
|
*/
|
|
22
22
|
export var getQuickInsertOpenExperiencePlugin = function getQuickInsertOpenExperiencePlugin(_ref) {
|
|
23
|
-
var refs = _ref.refs
|
|
23
|
+
var refs = _ref.refs,
|
|
24
|
+
dispatchAnalyticsEvent = _ref.dispatchAnalyticsEvent;
|
|
24
25
|
var targetEl;
|
|
25
26
|
var editorViewEl;
|
|
26
27
|
var getTarget = function getTarget() {
|
|
@@ -30,6 +31,7 @@ export var getQuickInsertOpenExperiencePlugin = function getQuickInsertOpenExper
|
|
|
30
31
|
return targetEl;
|
|
31
32
|
};
|
|
32
33
|
var experience = new Experience('quick-insert-open', {
|
|
34
|
+
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
33
35
|
checks: [new ExperienceCheckTimeout({
|
|
34
36
|
durationMs: 500
|
|
35
37
|
}), new ExperienceCheckDomMutation({
|
|
@@ -78,7 +78,11 @@ export var quickInsertPlugin = function quickInsertPlugin(_ref) {
|
|
|
78
78
|
name: 'quickInsertOpenExperience',
|
|
79
79
|
plugin: function plugin() {
|
|
80
80
|
return getQuickInsertOpenExperiencePlugin({
|
|
81
|
-
refs: refs
|
|
81
|
+
refs: refs,
|
|
82
|
+
dispatchAnalyticsEvent: function dispatchAnalyticsEvent(payload) {
|
|
83
|
+
var _api$analytics;
|
|
84
|
+
return api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 || (_api$analytics = _api$analytics.actions) === null || _api$analytics === void 0 ? void 0 : _api$analytics.fireAnalyticsEvent(payload);
|
|
85
|
+
}
|
|
82
86
|
});
|
|
83
87
|
}
|
|
84
88
|
}] : []));
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
1
2
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
3
|
type QuickInsertOpenExperienceOptions = {
|
|
4
|
+
dispatchAnalyticsEvent: DispatchAnalyticsEvent;
|
|
3
5
|
refs: {
|
|
4
6
|
popupsMountPoint?: HTMLElement;
|
|
5
7
|
wrapperElement?: HTMLElement;
|
|
@@ -13,5 +15,5 @@ type QuickInsertOpenExperienceOptions = {
|
|
|
13
15
|
* Failure: When 500ms passes without the quick insert menu being added to the DOM
|
|
14
16
|
* Abort: When user presses escape or backspace
|
|
15
17
|
*/
|
|
16
|
-
export declare const getQuickInsertOpenExperiencePlugin: ({ refs }: QuickInsertOpenExperienceOptions) => SafePlugin<any>;
|
|
18
|
+
export declare const getQuickInsertOpenExperiencePlugin: ({ refs, dispatchAnalyticsEvent, }: QuickInsertOpenExperienceOptions) => SafePlugin<any>;
|
|
17
19
|
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
2
2
|
import type { QuickInsertItem } from '@atlaskit/editor-common/provider-factory';
|
|
3
|
-
import type { Command, QuickInsertSharedState as CommonQuickInsertSharedState, EditorCommand, NextEditorPlugin, OptionalPlugin, QuickInsertHandler,
|
|
3
|
+
import type { Command, QuickInsertPluginOptions as CommonQuickInsertPluginOptions, QuickInsertSharedState as CommonQuickInsertSharedState, EditorCommand, NextEditorPlugin, OptionalPlugin, QuickInsertHandler, QuickInsertSearchOptions, TypeAheadHandler } from '@atlaskit/editor-common/types';
|
|
4
|
+
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
4
5
|
import { type ConnectivityPlugin } from '@atlaskit/editor-plugin-connectivity';
|
|
5
6
|
import { type MetricsPlugin } from '@atlaskit/editor-plugin-metrics';
|
|
6
7
|
import type { TypeAheadInputMethod, TypeAheadPlugin } from '@atlaskit/editor-plugin-type-ahead';
|
|
@@ -21,7 +22,8 @@ export type QuickInsertPlugin = NextEditorPlugin<'quickInsert', {
|
|
|
21
22
|
dependencies: [
|
|
22
23
|
TypeAheadPlugin,
|
|
23
24
|
OptionalPlugin<ConnectivityPlugin>,
|
|
24
|
-
OptionalPlugin<MetricsPlugin
|
|
25
|
+
OptionalPlugin<MetricsPlugin>,
|
|
26
|
+
OptionalPlugin<AnalyticsPlugin>
|
|
25
27
|
];
|
|
26
28
|
pluginConfiguration: QuickInsertPluginOptions | undefined;
|
|
27
29
|
sharedState: QuickInsertSharedState | null;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
1
2
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
3
|
type QuickInsertOpenExperienceOptions = {
|
|
4
|
+
dispatchAnalyticsEvent: DispatchAnalyticsEvent;
|
|
3
5
|
refs: {
|
|
4
6
|
popupsMountPoint?: HTMLElement;
|
|
5
7
|
wrapperElement?: HTMLElement;
|
|
@@ -13,5 +15,5 @@ type QuickInsertOpenExperienceOptions = {
|
|
|
13
15
|
* Failure: When 500ms passes without the quick insert menu being added to the DOM
|
|
14
16
|
* Abort: When user presses escape or backspace
|
|
15
17
|
*/
|
|
16
|
-
export declare const getQuickInsertOpenExperiencePlugin: ({ refs }: QuickInsertOpenExperienceOptions) => SafePlugin<any>;
|
|
18
|
+
export declare const getQuickInsertOpenExperiencePlugin: ({ refs, dispatchAnalyticsEvent, }: QuickInsertOpenExperienceOptions) => SafePlugin<any>;
|
|
17
19
|
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
2
2
|
import type { QuickInsertItem } from '@atlaskit/editor-common/provider-factory';
|
|
3
|
-
import type { Command, QuickInsertSharedState as CommonQuickInsertSharedState, EditorCommand, NextEditorPlugin, OptionalPlugin, QuickInsertHandler,
|
|
3
|
+
import type { Command, QuickInsertPluginOptions as CommonQuickInsertPluginOptions, QuickInsertSharedState as CommonQuickInsertSharedState, EditorCommand, NextEditorPlugin, OptionalPlugin, QuickInsertHandler, QuickInsertSearchOptions, TypeAheadHandler } from '@atlaskit/editor-common/types';
|
|
4
|
+
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
4
5
|
import { type ConnectivityPlugin } from '@atlaskit/editor-plugin-connectivity';
|
|
5
6
|
import { type MetricsPlugin } from '@atlaskit/editor-plugin-metrics';
|
|
6
7
|
import type { TypeAheadInputMethod, TypeAheadPlugin } from '@atlaskit/editor-plugin-type-ahead';
|
|
@@ -21,7 +22,8 @@ export type QuickInsertPlugin = NextEditorPlugin<'quickInsert', {
|
|
|
21
22
|
dependencies: [
|
|
22
23
|
TypeAheadPlugin,
|
|
23
24
|
OptionalPlugin<ConnectivityPlugin>,
|
|
24
|
-
OptionalPlugin<MetricsPlugin
|
|
25
|
+
OptionalPlugin<MetricsPlugin>,
|
|
26
|
+
OptionalPlugin<AnalyticsPlugin>
|
|
25
27
|
];
|
|
26
28
|
pluginConfiguration: QuickInsertPluginOptions | undefined;
|
|
27
29
|
sharedState: QuickInsertSharedState | null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-quick-insert",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.9",
|
|
4
4
|
"description": "Quick insert plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -30,21 +30,22 @@
|
|
|
30
30
|
"atlaskit:src": "src/index.ts",
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@atlaskit/button": "^23.6.0",
|
|
33
|
+
"@atlaskit/editor-plugin-analytics": "^6.2.0",
|
|
33
34
|
"@atlaskit/editor-plugin-connectivity": "^6.0.0",
|
|
34
35
|
"@atlaskit/editor-plugin-metrics": "^7.1.0",
|
|
35
36
|
"@atlaskit/editor-plugin-type-ahead": "^6.5.0",
|
|
36
37
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
37
|
-
"@atlaskit/icon": "^
|
|
38
|
+
"@atlaskit/icon": "^29.0.0",
|
|
38
39
|
"@atlaskit/modal-dialog": "^14.6.0",
|
|
39
40
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
40
41
|
"@atlaskit/theme": "^21.0.0",
|
|
41
|
-
"@atlaskit/tmp-editor-statsig": "^13.
|
|
42
|
+
"@atlaskit/tmp-editor-statsig": "^13.35.0",
|
|
42
43
|
"@atlaskit/tokens": "^8.0.0",
|
|
43
44
|
"@babel/runtime": "^7.0.0",
|
|
44
45
|
"@emotion/react": "^11.7.1"
|
|
45
46
|
},
|
|
46
47
|
"peerDependencies": {
|
|
47
|
-
"@atlaskit/editor-common": "^110.
|
|
48
|
+
"@atlaskit/editor-common": "^110.27.0",
|
|
48
49
|
"react": "^18.2.0",
|
|
49
50
|
"react-dom": "^18.2.0",
|
|
50
51
|
"react-intl-next": "npm:react-intl@^5.18.1"
|