@atlaskit/editor-plugin-status 18.0.5 → 18.0.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
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-status
|
|
2
2
|
|
|
3
|
+
## 18.0.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`0e51b73b6062b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0e51b73b6062b) -
|
|
8
|
+
Fire a `document inserted` track event with `status` actionSubjectId and `blockMenu` inputMethod
|
|
9
|
+
when a block is turned into a status from the block menu Change format flow, behind the
|
|
10
|
+
`platform_editor_turn_into_status` experiment. Widens the existing status insert payload type to
|
|
11
|
+
accept the `blockMenu` inputMethod.
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
|
|
3
14
|
## 18.0.5
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
|
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.createStatusBlockMenuItem = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _reactIntl = require("react-intl");
|
|
10
|
+
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
10
11
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
11
12
|
var _editorToolbar = require("@atlaskit/editor-toolbar");
|
|
12
13
|
var _lozenge = _interopRequireDefault(require("@atlaskit/icon-lab/core/lozenge"));
|
|
@@ -19,7 +20,7 @@ var StatusBlockMenuItem = function StatusBlockMenuItem(_ref) {
|
|
|
19
20
|
formatMessage = _useIntl.formatMessage;
|
|
20
21
|
var handleClick = function handleClick() {
|
|
21
22
|
api === null || api === void 0 || api.core.actions.execute(function (_ref2) {
|
|
22
|
-
var _api$blockMenu;
|
|
23
|
+
var _api$blockMenu, _api$analytics;
|
|
23
24
|
var tr = _ref2.tr;
|
|
24
25
|
var command = api === null || api === void 0 || (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 ? void 0 : _api$blockMenu.commands.transformInlineNode({
|
|
25
26
|
buildInlineNode: function buildInlineNode(source) {
|
|
@@ -36,6 +37,15 @@ var StatusBlockMenuItem = function StatusBlockMenuItem(_ref) {
|
|
|
36
37
|
if (!(nextTr !== null && nextTr !== void 0 && nextTr.docChanged)) {
|
|
37
38
|
return null;
|
|
38
39
|
}
|
|
40
|
+
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.attachAnalyticsEvent({
|
|
41
|
+
action: _analytics.ACTION.INSERTED,
|
|
42
|
+
actionSubject: _analytics.ACTION_SUBJECT.DOCUMENT,
|
|
43
|
+
actionSubjectId: _analytics.ACTION_SUBJECT_ID.STATUS,
|
|
44
|
+
attributes: {
|
|
45
|
+
inputMethod: _analytics.INPUT_METHOD.BLOCK_MENU
|
|
46
|
+
},
|
|
47
|
+
eventType: _analytics.EVENT_TYPE.TRACK
|
|
48
|
+
})(nextTr);
|
|
39
49
|
return nextTr.setMeta(_pluginKey.pluginKey, {
|
|
40
50
|
focusStatusInput: true,
|
|
41
51
|
isNew: true,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useIntl } from 'react-intl';
|
|
3
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
3
4
|
import { toolbarInsertBlockMessages } from '@atlaskit/editor-common/messages';
|
|
4
5
|
import { ToolbarDropdownItem } from '@atlaskit/editor-toolbar';
|
|
5
6
|
import LozengeIcon from '@atlaskit/icon-lab/core/lozenge';
|
|
@@ -16,7 +17,7 @@ const StatusBlockMenuItem = ({
|
|
|
16
17
|
api === null || api === void 0 ? void 0 : api.core.actions.execute(({
|
|
17
18
|
tr
|
|
18
19
|
}) => {
|
|
19
|
-
var _api$blockMenu;
|
|
20
|
+
var _api$blockMenu, _api$analytics, _api$analytics$action;
|
|
20
21
|
const command = api === null || api === void 0 ? void 0 : (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 ? void 0 : _api$blockMenu.commands.transformInlineNode({
|
|
21
22
|
buildInlineNode: source => createStatusNode(tr.doc.type.schema, {
|
|
22
23
|
text: source.textContent.trim()
|
|
@@ -30,6 +31,15 @@ const StatusBlockMenuItem = ({
|
|
|
30
31
|
if (!(nextTr !== null && nextTr !== void 0 && nextTr.docChanged)) {
|
|
31
32
|
return null;
|
|
32
33
|
}
|
|
34
|
+
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.attachAnalyticsEvent({
|
|
35
|
+
action: ACTION.INSERTED,
|
|
36
|
+
actionSubject: ACTION_SUBJECT.DOCUMENT,
|
|
37
|
+
actionSubjectId: ACTION_SUBJECT_ID.STATUS,
|
|
38
|
+
attributes: {
|
|
39
|
+
inputMethod: INPUT_METHOD.BLOCK_MENU
|
|
40
|
+
},
|
|
41
|
+
eventType: EVENT_TYPE.TRACK
|
|
42
|
+
})(nextTr);
|
|
33
43
|
return nextTr.setMeta(pluginKey, {
|
|
34
44
|
focusStatusInput: true,
|
|
35
45
|
isNew: true,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useIntl } from 'react-intl';
|
|
3
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
3
4
|
import { toolbarInsertBlockMessages } from '@atlaskit/editor-common/messages';
|
|
4
5
|
import { ToolbarDropdownItem } from '@atlaskit/editor-toolbar';
|
|
5
6
|
import LozengeIcon from '@atlaskit/icon-lab/core/lozenge';
|
|
@@ -12,7 +13,7 @@ var StatusBlockMenuItem = function StatusBlockMenuItem(_ref) {
|
|
|
12
13
|
formatMessage = _useIntl.formatMessage;
|
|
13
14
|
var handleClick = function handleClick() {
|
|
14
15
|
api === null || api === void 0 || api.core.actions.execute(function (_ref2) {
|
|
15
|
-
var _api$blockMenu;
|
|
16
|
+
var _api$blockMenu, _api$analytics;
|
|
16
17
|
var tr = _ref2.tr;
|
|
17
18
|
var command = api === null || api === void 0 || (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 ? void 0 : _api$blockMenu.commands.transformInlineNode({
|
|
18
19
|
buildInlineNode: function buildInlineNode(source) {
|
|
@@ -29,6 +30,15 @@ var StatusBlockMenuItem = function StatusBlockMenuItem(_ref) {
|
|
|
29
30
|
if (!(nextTr !== null && nextTr !== void 0 && nextTr.docChanged)) {
|
|
30
31
|
return null;
|
|
31
32
|
}
|
|
33
|
+
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.attachAnalyticsEvent({
|
|
34
|
+
action: ACTION.INSERTED,
|
|
35
|
+
actionSubject: ACTION_SUBJECT.DOCUMENT,
|
|
36
|
+
actionSubjectId: ACTION_SUBJECT_ID.STATUS,
|
|
37
|
+
attributes: {
|
|
38
|
+
inputMethod: INPUT_METHOD.BLOCK_MENU
|
|
39
|
+
},
|
|
40
|
+
eventType: EVENT_TYPE.TRACK
|
|
41
|
+
})(nextTr);
|
|
32
42
|
return nextTr.setMeta(pluginKey, {
|
|
33
43
|
focusStatusInput: true,
|
|
34
44
|
isNew: true,
|