@atlaskit/editor-plugin-toolbar 3.4.5 → 3.4.6
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/experiences/selection-toolbar-open-experience.js +3 -1
- package/dist/cjs/toolbarPlugin.js +5 -1
- package/dist/es2019/pm-plugins/experiences/selection-toolbar-open-experience.js +3 -1
- package/dist/es2019/toolbarPlugin.js +5 -1
- package/dist/esm/pm-plugins/experiences/selection-toolbar-open-experience.js +3 -1
- package/dist/esm/toolbarPlugin.js +5 -1
- package/dist/types/pm-plugins/experiences/selection-toolbar-open-experience.d.ts +3 -1
- package/dist/types-ts4.5/pm-plugins/experiences/selection-toolbar-open-experience.d.ts +3 -1
- package/package.json +3 -3
- package/afm-post-office/tsconfig.json +0 -60
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-toolbar
|
|
2
2
|
|
|
3
|
+
## 3.4.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`373dccb169d0b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/373dccb169d0b) -
|
|
8
|
+
ED-29654 Editor experience custom tracking
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
3
11
|
## 3.4.5
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -28,7 +28,8 @@ var ABORT_REASON = {
|
|
|
28
28
|
* Abort: When selection transition to empty or block menu is opened
|
|
29
29
|
*/
|
|
30
30
|
var getSelectionToolbarOpenExperiencePlugin = exports.getSelectionToolbarOpenExperiencePlugin = function getSelectionToolbarOpenExperiencePlugin(_ref) {
|
|
31
|
-
var refs = _ref.refs
|
|
31
|
+
var refs = _ref.refs,
|
|
32
|
+
dispatchAnalyticsEvent = _ref.dispatchAnalyticsEvent;
|
|
32
33
|
var targetEl;
|
|
33
34
|
var editorViewEl;
|
|
34
35
|
var getTarget = function getTarget() {
|
|
@@ -38,6 +39,7 @@ var getSelectionToolbarOpenExperiencePlugin = exports.getSelectionToolbarOpenExp
|
|
|
38
39
|
return targetEl;
|
|
39
40
|
};
|
|
40
41
|
var experience = new _experiences.Experience('selection-toolbar-open', {
|
|
42
|
+
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
41
43
|
checks: [new _experiences.ExperienceCheckTimeout({
|
|
42
44
|
durationMs: 500,
|
|
43
45
|
onTimeout: function onTimeout() {
|
|
@@ -189,7 +189,11 @@ var toolbarPlugin = exports.toolbarPlugin = function toolbarPlugin(_ref) {
|
|
|
189
189
|
name: 'selectionToolbarOpenExperience',
|
|
190
190
|
plugin: function plugin() {
|
|
191
191
|
return (0, _selectionToolbarOpenExperience.getSelectionToolbarOpenExperiencePlugin)({
|
|
192
|
-
refs: refs
|
|
192
|
+
refs: refs,
|
|
193
|
+
dispatchAnalyticsEvent: function dispatchAnalyticsEvent(payload) {
|
|
194
|
+
var _api$analytics;
|
|
195
|
+
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);
|
|
196
|
+
}
|
|
193
197
|
});
|
|
194
198
|
}
|
|
195
199
|
}] : []));
|
|
@@ -20,7 +20,8 @@ const ABORT_REASON = {
|
|
|
20
20
|
* Abort: When selection transition to empty or block menu is opened
|
|
21
21
|
*/
|
|
22
22
|
export const getSelectionToolbarOpenExperiencePlugin = ({
|
|
23
|
-
refs
|
|
23
|
+
refs,
|
|
24
|
+
dispatchAnalyticsEvent
|
|
24
25
|
}) => {
|
|
25
26
|
let targetEl;
|
|
26
27
|
let editorViewEl;
|
|
@@ -31,6 +32,7 @@ export const getSelectionToolbarOpenExperiencePlugin = ({
|
|
|
31
32
|
return targetEl;
|
|
32
33
|
};
|
|
33
34
|
const experience = new Experience('selection-toolbar-open', {
|
|
35
|
+
dispatchAnalyticsEvent,
|
|
34
36
|
checks: [new ExperienceCheckTimeout({
|
|
35
37
|
durationMs: 500,
|
|
36
38
|
onTimeout: () => {
|
|
@@ -178,7 +178,11 @@ export const toolbarPlugin = ({
|
|
|
178
178
|
}, ...(!disableSelectionToolbar && expValEquals('platform_editor_experience_tracking', 'isEnabled', true) ? [{
|
|
179
179
|
name: 'selectionToolbarOpenExperience',
|
|
180
180
|
plugin: () => getSelectionToolbarOpenExperiencePlugin({
|
|
181
|
-
refs
|
|
181
|
+
refs,
|
|
182
|
+
dispatchAnalyticsEvent: payload => {
|
|
183
|
+
var _api$analytics, _api$analytics$action;
|
|
184
|
+
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);
|
|
185
|
+
}
|
|
182
186
|
})
|
|
183
187
|
}] : [])];
|
|
184
188
|
},
|
|
@@ -21,7 +21,8 @@ var ABORT_REASON = {
|
|
|
21
21
|
* Abort: When selection transition to empty or block menu is opened
|
|
22
22
|
*/
|
|
23
23
|
export var getSelectionToolbarOpenExperiencePlugin = function getSelectionToolbarOpenExperiencePlugin(_ref) {
|
|
24
|
-
var refs = _ref.refs
|
|
24
|
+
var refs = _ref.refs,
|
|
25
|
+
dispatchAnalyticsEvent = _ref.dispatchAnalyticsEvent;
|
|
25
26
|
var targetEl;
|
|
26
27
|
var editorViewEl;
|
|
27
28
|
var getTarget = function getTarget() {
|
|
@@ -31,6 +32,7 @@ export var getSelectionToolbarOpenExperiencePlugin = function getSelectionToolba
|
|
|
31
32
|
return targetEl;
|
|
32
33
|
};
|
|
33
34
|
var experience = new Experience('selection-toolbar-open', {
|
|
35
|
+
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
34
36
|
checks: [new ExperienceCheckTimeout({
|
|
35
37
|
durationMs: 500,
|
|
36
38
|
onTimeout: function onTimeout() {
|
|
@@ -182,7 +182,11 @@ export var toolbarPlugin = function toolbarPlugin(_ref) {
|
|
|
182
182
|
name: 'selectionToolbarOpenExperience',
|
|
183
183
|
plugin: function plugin() {
|
|
184
184
|
return getSelectionToolbarOpenExperiencePlugin({
|
|
185
|
-
refs: refs
|
|
185
|
+
refs: refs,
|
|
186
|
+
dispatchAnalyticsEvent: function dispatchAnalyticsEvent(payload) {
|
|
187
|
+
var _api$analytics;
|
|
188
|
+
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);
|
|
189
|
+
}
|
|
186
190
|
});
|
|
187
191
|
}
|
|
188
192
|
}] : []));
|
|
@@ -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 SelectionToolbarOpenExperienceOptions = {
|
|
4
|
+
dispatchAnalyticsEvent: DispatchAnalyticsEvent;
|
|
3
5
|
refs: {
|
|
4
6
|
popupsMountPoint?: HTMLElement;
|
|
5
7
|
};
|
|
@@ -12,5 +14,5 @@ type SelectionToolbarOpenExperienceOptions = {
|
|
|
12
14
|
* Failure: When 500ms passes without the selection toolbar being added to the DOM
|
|
13
15
|
* Abort: When selection transition to empty or block menu is opened
|
|
14
16
|
*/
|
|
15
|
-
export declare const getSelectionToolbarOpenExperiencePlugin: ({ refs, }: SelectionToolbarOpenExperienceOptions) => SafePlugin<{}>;
|
|
17
|
+
export declare const getSelectionToolbarOpenExperiencePlugin: ({ refs, dispatchAnalyticsEvent, }: SelectionToolbarOpenExperienceOptions) => SafePlugin<{}>;
|
|
16
18
|
export {};
|
|
@@ -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 SelectionToolbarOpenExperienceOptions = {
|
|
4
|
+
dispatchAnalyticsEvent: DispatchAnalyticsEvent;
|
|
3
5
|
refs: {
|
|
4
6
|
popupsMountPoint?: HTMLElement;
|
|
5
7
|
};
|
|
@@ -12,5 +14,5 @@ type SelectionToolbarOpenExperienceOptions = {
|
|
|
12
14
|
* Failure: When 500ms passes without the selection toolbar being added to the DOM
|
|
13
15
|
* Abort: When selection transition to empty or block menu is opened
|
|
14
16
|
*/
|
|
15
|
-
export declare const getSelectionToolbarOpenExperiencePlugin: ({ refs, }: SelectionToolbarOpenExperienceOptions) => SafePlugin<{}>;
|
|
17
|
+
export declare const getSelectionToolbarOpenExperiencePlugin: ({ refs, dispatchAnalyticsEvent, }: SelectionToolbarOpenExperienceOptions) => SafePlugin<{}>;
|
|
16
18
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-toolbar",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.6",
|
|
4
4
|
"description": "Toolbar plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -40,13 +40,13 @@
|
|
|
40
40
|
"@atlaskit/editor-toolbar-model": "^0.2.0",
|
|
41
41
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
42
42
|
"@atlaskit/platform-feature-flags-react": "^0.4.0",
|
|
43
|
-
"@atlaskit/tmp-editor-statsig": "^13.
|
|
43
|
+
"@atlaskit/tmp-editor-statsig": "^13.33.0",
|
|
44
44
|
"@babel/runtime": "^7.0.0",
|
|
45
45
|
"bind-event-listener": "^3.0.0",
|
|
46
46
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"@atlaskit/editor-common": "^110.
|
|
49
|
+
"@atlaskit/editor-common": "^110.25.0",
|
|
50
50
|
"react": "^18.2.0"
|
|
51
51
|
},
|
|
52
52
|
"platform-feature-flags": {
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "../../../../tsconfig.entry-points.post-office.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"target": "es5",
|
|
5
|
-
"outDir": "../../../../../post-office/tsDist/@atlaskit__editor-plugin-toolbar/app",
|
|
6
|
-
"rootDir": "../",
|
|
7
|
-
"composite": true
|
|
8
|
-
},
|
|
9
|
-
"include": [
|
|
10
|
-
"../src/**/*.ts",
|
|
11
|
-
"../src/**/*.tsx"
|
|
12
|
-
],
|
|
13
|
-
"exclude": [
|
|
14
|
-
"../src/**/__tests__/*",
|
|
15
|
-
"../src/**/*.test.*",
|
|
16
|
-
"../src/**/test.*",
|
|
17
|
-
"../src/**/examples.*"
|
|
18
|
-
],
|
|
19
|
-
"references": [
|
|
20
|
-
{
|
|
21
|
-
"path": "../../../helpers/browser-apis/afm-post-office/tsconfig.json"
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
"path": "../../editor-plugin-analytics/afm-post-office/tsconfig.json"
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
"path": "../../editor-plugin-connectivity/afm-post-office/tsconfig.json"
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
"path": "../../editor-plugin-editor-viewmode/afm-post-office/tsconfig.json"
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
"path": "../../editor-plugin-selection/afm-post-office/tsconfig.json"
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
"path": "../../editor-plugin-user-intent/afm-post-office/tsconfig.json"
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
"path": "../../editor-plugin-user-preferences/afm-post-office/tsconfig.json"
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
"path": "../../editor-toolbar/afm-post-office/tsconfig.json"
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
"path": "../../editor-toolbar-model/afm-post-office/tsconfig.json"
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
"path": "../../../platform/feature-flags/afm-post-office/tsconfig.json"
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
"path": "../../../platform/feature-flags-react/afm-post-office/tsconfig.json"
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
"path": "../../tmp-editor-statsig/afm-post-office/tsconfig.json"
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
"path": "../../editor-common/afm-post-office/tsconfig.json"
|
|
58
|
-
}
|
|
59
|
-
]
|
|
60
|
-
}
|