@atlaskit/editor-core 187.7.1 → 187.8.0
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 +12 -0
- package/dist/cjs/plugins/list/commands/indent-list.js +48 -45
- package/dist/cjs/plugins/list/commands/index.js +120 -109
- package/dist/cjs/plugins/list/commands/join-list-item-forward.js +47 -45
- package/dist/cjs/plugins/list/commands/listBackspace.js +33 -31
- package/dist/cjs/plugins/list/commands/outdent-list.js +51 -49
- package/dist/cjs/plugins/list/index.js +10 -5
- package/dist/cjs/plugins/list/pm-plugins/input-rules/create-list-input-rule.js +3 -4
- package/dist/cjs/plugins/list/pm-plugins/keymap.js +10 -11
- package/dist/cjs/plugins/toolbar-lists-indentation/index.js +4 -1
- package/dist/cjs/plugins/toolbar-lists-indentation/ui/index.js +4 -3
- package/dist/cjs/plugins/toolbar-lists-indentation/ui/onItemActivated.js +44 -41
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/plugins/list/commands/indent-list.js +5 -5
- package/dist/es2019/plugins/list/commands/index.js +22 -22
- package/dist/es2019/plugins/list/commands/join-list-item-forward.js +4 -4
- package/dist/es2019/plugins/list/commands/listBackspace.js +4 -4
- package/dist/es2019/plugins/list/commands/outdent-list.js +5 -6
- package/dist/es2019/plugins/list/index.js +13 -6
- package/dist/es2019/plugins/list/pm-plugins/input-rules/create-list-input-rule.js +1 -1
- package/dist/es2019/plugins/list/pm-plugins/keymap.js +11 -11
- package/dist/es2019/plugins/toolbar-lists-indentation/index.js +4 -1
- package/dist/es2019/plugins/toolbar-lists-indentation/ui/index.js +4 -3
- package/dist/es2019/plugins/toolbar-lists-indentation/ui/onItemActivated.js +7 -7
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/plugins/list/commands/indent-list.js +46 -44
- package/dist/esm/plugins/list/commands/index.js +115 -103
- package/dist/esm/plugins/list/commands/join-list-item-forward.js +47 -45
- package/dist/esm/plugins/list/commands/listBackspace.js +33 -31
- package/dist/esm/plugins/list/commands/outdent-list.js +49 -48
- package/dist/esm/plugins/list/index.js +11 -6
- package/dist/esm/plugins/list/pm-plugins/input-rules/create-list-input-rule.js +1 -1
- package/dist/esm/plugins/list/pm-plugins/keymap.js +11 -11
- package/dist/esm/plugins/toolbar-lists-indentation/index.js +4 -1
- package/dist/esm/plugins/toolbar-lists-indentation/ui/index.js +4 -3
- package/dist/esm/plugins/toolbar-lists-indentation/ui/onItemActivated.js +42 -40
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/plugins/list/commands/indent-list.d.ts +2 -2
- package/dist/types/plugins/list/commands/index.d.ts +7 -7
- package/dist/types/plugins/list/commands/join-list-item-forward.d.ts +2 -1
- package/dist/types/plugins/list/commands/listBackspace.d.ts +7 -6
- package/dist/types/plugins/list/commands/outdent-list.d.ts +2 -2
- package/dist/types/plugins/list/index.d.ts +7 -2
- package/dist/types/plugins/list/pm-plugins/keymap.d.ts +2 -1
- package/dist/types/plugins/toolbar-lists-indentation/index.d.ts +7 -2
- package/dist/types/plugins/toolbar-lists-indentation/types.d.ts +1 -1
- package/dist/types/plugins/toolbar-lists-indentation/ui/index.d.ts +3 -1
- package/dist/types/plugins/toolbar-lists-indentation/ui/onItemActivated.d.ts +5 -4
- package/dist/types/utils/list-commands.d.ts +5 -5
- package/dist/types-ts4.5/plugins/list/commands/indent-list.d.ts +2 -2
- package/dist/types-ts4.5/plugins/list/commands/index.d.ts +7 -7
- package/dist/types-ts4.5/plugins/list/commands/join-list-item-forward.d.ts +2 -1
- package/dist/types-ts4.5/plugins/list/commands/listBackspace.d.ts +7 -6
- package/dist/types-ts4.5/plugins/list/commands/outdent-list.d.ts +2 -2
- package/dist/types-ts4.5/plugins/list/index.d.ts +5 -2
- package/dist/types-ts4.5/plugins/list/pm-plugins/keymap.d.ts +2 -1
- package/dist/types-ts4.5/plugins/toolbar-lists-indentation/index.d.ts +5 -2
- package/dist/types-ts4.5/plugins/toolbar-lists-indentation/types.d.ts +1 -1
- package/dist/types-ts4.5/plugins/toolbar-lists-indentation/ui/index.d.ts +3 -1
- package/dist/types-ts4.5/plugins/toolbar-lists-indentation/ui/onItemActivated.d.ts +5 -4
- package/dist/types-ts4.5/utils/list-commands.d.ts +5 -5
- package/package.json +5 -2
- package/report.api.md +15 -31
- package/tmp/api-report-tmp.d.ts +4 -22
|
@@ -4,64 +4,66 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.outdentList =
|
|
7
|
+
exports.outdentList = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
10
|
-
var _analytics2 = require("../../analytics");
|
|
11
10
|
var _selection = require("../utils/selection");
|
|
12
11
|
var _node = require("../utils/node");
|
|
13
12
|
var _find = require("../utils/find");
|
|
14
|
-
var
|
|
13
|
+
var _analytics2 = require("../utils/analytics");
|
|
15
14
|
var _outdentListItemsSelected = require("../actions/outdent-list-items-selected");
|
|
16
15
|
var _prosemirrorHistory = require("prosemirror-history");
|
|
17
16
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
18
17
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
19
|
-
function outdentList() {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
18
|
+
var outdentList = function outdentList(editorAnalyticsAPI) {
|
|
19
|
+
return function () {
|
|
20
|
+
var inputMethod = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _analytics.INPUT_METHOD.KEYBOARD;
|
|
21
|
+
var featureFlags = arguments.length > 1 ? arguments[1] : undefined;
|
|
22
|
+
return function (state, dispatch) {
|
|
23
|
+
if (!(0, _selection.isInsideListItem)(state)) {
|
|
24
|
+
return false;
|
|
25
|
+
}
|
|
26
|
+
var $from = state.selection.$from;
|
|
27
|
+
var parentListNode = (0, _find.findFirstParentListNode)($from);
|
|
28
|
+
if (!parentListNode) {
|
|
29
|
+
// Even though this is a non-operation, we don't want to send this event to the browser. Because if we return false, the browser will move the focus to another place
|
|
30
|
+
return true;
|
|
31
|
+
}
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
var restartListsAttributes = {};
|
|
44
|
-
if (featureFlags !== null && featureFlags !== void 0 && featureFlags.restartNumberedLists) {
|
|
45
|
-
var _getRestartListsAttri = (0, _analytics3.getRestartListsAttributes)(customTr),
|
|
46
|
-
outdentScenario = _getRestartListsAttri.outdentScenario,
|
|
47
|
-
splitListStartNumber = _getRestartListsAttri.splitListStartNumber;
|
|
48
|
-
if (outdentScenario === _analytics.OUTDENT_SCENARIOS.SPLIT_LIST) {
|
|
49
|
-
restartListsAttributes.outdentScenario = outdentScenario;
|
|
50
|
-
restartListsAttributes.splitListStartNumber = splitListStartNumber;
|
|
33
|
+
// Save the history, so it could undo/revert to the same state before the outdent, see https://product-fabric.atlassian.net/browse/ED-14753
|
|
34
|
+
(0, _prosemirrorHistory.closeHistory)(state.tr);
|
|
35
|
+
var actionSubjectId = (0, _node.isBulletList)(parentListNode.node) ? _analytics.ACTION_SUBJECT_ID.FORMAT_LIST_BULLET : _analytics.ACTION_SUBJECT_ID.FORMAT_LIST_NUMBER;
|
|
36
|
+
var customTr = state.tr;
|
|
37
|
+
(0, _outdentListItemsSelected.outdentListItemsSelected)(customTr, state, featureFlags);
|
|
38
|
+
if (!customTr || !customTr.docChanged) {
|
|
39
|
+
// Even though this is a non-operation, we don't want to send this event to the browser. Because if we return false, the browser will move the focus to another place
|
|
40
|
+
// If inside table cell and can't outdent list, then let it handle by table keymap
|
|
41
|
+
return !(0, _selection.isInsideTableCell)(state);
|
|
51
42
|
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
43
|
+
var restartListsAttributes = {};
|
|
44
|
+
if (featureFlags !== null && featureFlags !== void 0 && featureFlags.restartNumberedLists) {
|
|
45
|
+
var _getRestartListsAttri = (0, _analytics2.getRestartListsAttributes)(customTr),
|
|
46
|
+
outdentScenario = _getRestartListsAttri.outdentScenario,
|
|
47
|
+
splitListStartNumber = _getRestartListsAttri.splitListStartNumber;
|
|
48
|
+
if (outdentScenario === _analytics.OUTDENT_SCENARIOS.SPLIT_LIST) {
|
|
49
|
+
restartListsAttributes.outdentScenario = outdentScenario;
|
|
50
|
+
restartListsAttributes.splitListStartNumber = splitListStartNumber;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
editorAnalyticsAPI === null || editorAnalyticsAPI === void 0 ? void 0 : editorAnalyticsAPI.attachAnalyticsEvent({
|
|
54
|
+
action: _analytics.ACTION.OUTDENTED,
|
|
55
|
+
actionSubject: _analytics.ACTION_SUBJECT.LIST,
|
|
56
|
+
actionSubjectId: actionSubjectId,
|
|
57
|
+
eventType: _analytics.EVENT_TYPE.TRACK,
|
|
58
|
+
attributes: _objectSpread(_objectSpread(_objectSpread({}, (0, _analytics2.getCommonListAnalyticsAttributes)(state)), restartListsAttributes), {}, {
|
|
59
|
+
inputMethod: inputMethod
|
|
60
|
+
})
|
|
61
|
+
})(customTr);
|
|
62
|
+
if (dispatch) {
|
|
63
|
+
dispatch(customTr);
|
|
64
|
+
}
|
|
65
|
+
return true;
|
|
66
|
+
};
|
|
66
67
|
};
|
|
67
|
-
}
|
|
68
|
+
};
|
|
69
|
+
exports.outdentList = outdentList;
|
|
@@ -19,7 +19,9 @@ var _quickInsert = require("@atlaskit/editor-common/quick-insert");
|
|
|
19
19
|
packages/editor/editor-core/src/plugins/toolbar-lists-indentation/ui/Toolbar.tsx
|
|
20
20
|
*/
|
|
21
21
|
var listPlugin = function listPlugin(options, api) {
|
|
22
|
+
var _api$dependencies$ana;
|
|
22
23
|
var featureFlags = (api === null || api === void 0 ? void 0 : api.dependencies.featureFlags.sharedState.currentState()) || {};
|
|
24
|
+
var editorAnalyticsAPI = api === null || api === void 0 ? void 0 : (_api$dependencies$ana = api.dependencies.analytics) === null || _api$dependencies$ana === void 0 ? void 0 : _api$dependencies$ana.actions;
|
|
23
25
|
return {
|
|
24
26
|
name: 'list',
|
|
25
27
|
nodes: function nodes() {
|
|
@@ -51,7 +53,8 @@ var listPlugin = function listPlugin(options, api) {
|
|
|
51
53
|
}, {
|
|
52
54
|
name: 'listKeymap',
|
|
53
55
|
plugin: function plugin() {
|
|
54
|
-
|
|
56
|
+
var _api$dependencies$ana2;
|
|
57
|
+
return (0, _keymap.default)(featureFlags, api === null || api === void 0 ? void 0 : (_api$dependencies$ana2 = api.dependencies.analytics) === null || _api$dependencies$ana2 === void 0 ? void 0 : _api$dependencies$ana2.actions);
|
|
55
58
|
}
|
|
56
59
|
}];
|
|
57
60
|
},
|
|
@@ -70,7 +73,7 @@ var listPlugin = function listPlugin(options, api) {
|
|
|
70
73
|
},
|
|
71
74
|
action: function action(insert, state) {
|
|
72
75
|
var tr = insert(state.schema.nodes.bulletList.createChecked({}, state.schema.nodes.listItem.createChecked({}, state.schema.nodes.paragraph.createChecked())));
|
|
73
|
-
|
|
76
|
+
editorAnalyticsAPI === null || editorAnalyticsAPI === void 0 ? void 0 : editorAnalyticsAPI.attachAnalyticsEvent({
|
|
74
77
|
action: _analytics.ACTION.INSERTED,
|
|
75
78
|
actionSubject: _analytics.ACTION_SUBJECT.LIST,
|
|
76
79
|
actionSubjectId: _analytics.ACTION_SUBJECT_ID.FORMAT_LIST_BULLET,
|
|
@@ -78,7 +81,8 @@ var listPlugin = function listPlugin(options, api) {
|
|
|
78
81
|
attributes: {
|
|
79
82
|
inputMethod: _analytics.INPUT_METHOD.QUICK_INSERT
|
|
80
83
|
}
|
|
81
|
-
});
|
|
84
|
+
})(tr);
|
|
85
|
+
return tr;
|
|
82
86
|
}
|
|
83
87
|
}, {
|
|
84
88
|
id: 'orderedList',
|
|
@@ -92,7 +96,7 @@ var listPlugin = function listPlugin(options, api) {
|
|
|
92
96
|
},
|
|
93
97
|
action: function action(insert, state) {
|
|
94
98
|
var tr = insert(state.schema.nodes.orderedList.createChecked({}, state.schema.nodes.listItem.createChecked({}, state.schema.nodes.paragraph.createChecked())));
|
|
95
|
-
|
|
99
|
+
editorAnalyticsAPI === null || editorAnalyticsAPI === void 0 ? void 0 : editorAnalyticsAPI.attachAnalyticsEvent({
|
|
96
100
|
action: _analytics.ACTION.INSERTED,
|
|
97
101
|
actionSubject: _analytics.ACTION_SUBJECT.LIST,
|
|
98
102
|
actionSubjectId: _analytics.ACTION_SUBJECT_ID.FORMAT_LIST_NUMBER,
|
|
@@ -100,7 +104,8 @@ var listPlugin = function listPlugin(options, api) {
|
|
|
100
104
|
attributes: {
|
|
101
105
|
inputMethod: _analytics.INPUT_METHOD.QUICK_INSERT
|
|
102
106
|
}
|
|
103
|
-
});
|
|
107
|
+
})(tr);
|
|
108
|
+
return tr;
|
|
104
109
|
}
|
|
105
110
|
}];
|
|
106
111
|
}
|
|
@@ -6,8 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.createRuleForListType = createRuleForListType;
|
|
7
7
|
var _inputRules = require("../../../../utils/input-rules");
|
|
8
8
|
var _wrappingJoinRule = require("./wrapping-join-rule");
|
|
9
|
-
var _analytics = require("
|
|
10
|
-
var _analytics2 = require("@atlaskit/editor-common/analytics");
|
|
9
|
+
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
11
10
|
var getOrder = function getOrder(matchResult) {
|
|
12
11
|
return Number(matchResult[1]);
|
|
13
12
|
};
|
|
@@ -15,7 +14,7 @@ function createRuleForListType(_ref) {
|
|
|
15
14
|
var listType = _ref.listType,
|
|
16
15
|
expression = _ref.expression,
|
|
17
16
|
featureFlags = _ref.featureFlags;
|
|
18
|
-
var joinScenario =
|
|
17
|
+
var joinScenario = _analytics.JOIN_SCENARIOS_WHEN_TYPING_TO_INSERT_LIST.NO_JOIN;
|
|
19
18
|
var isBulletList = listType.name === 'bulletList';
|
|
20
19
|
var actionSubjectId = isBulletList ? _analytics.ACTION_SUBJECT_ID.FORMAT_LIST_BULLET : _analytics.ACTION_SUBJECT_ID.FORMAT_LIST_NUMBER;
|
|
21
20
|
var getAnalyticsPayload = function getAnalyticsPayload(state, matchResult) {
|
|
@@ -32,7 +31,7 @@ function createRuleForListType(_ref) {
|
|
|
32
31
|
analyticsPayload.attributes.listStartNumber = getOrder(matchResult);
|
|
33
32
|
analyticsPayload.attributes.joinScenario = joinScenario;
|
|
34
33
|
// we reset the tracked joinScenario after storing it in the event payload
|
|
35
|
-
joinScenario =
|
|
34
|
+
joinScenario = _analytics.JOIN_SCENARIOS_WHEN_TYPING_TO_INSERT_LIST.NO_JOIN;
|
|
36
35
|
}
|
|
37
36
|
return analyticsPayload;
|
|
38
37
|
};
|
|
@@ -9,22 +9,21 @@ exports.keymapPlugin = keymapPlugin;
|
|
|
9
9
|
var _prosemirrorKeymap = require("prosemirror-keymap");
|
|
10
10
|
var keymaps = _interopRequireWildcard(require("../../../keymaps"));
|
|
11
11
|
var _commands = require("../commands");
|
|
12
|
-
var
|
|
13
|
-
var _analytics = require("../../analytics");
|
|
12
|
+
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
14
13
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
15
14
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
16
|
-
function keymapPlugin(featureFlags) {
|
|
15
|
+
function keymapPlugin(featureFlags, editorAnalyticsAPI) {
|
|
17
16
|
var list = {};
|
|
18
|
-
keymaps.bindKeymapWithCommand(keymaps.findShortcutByKeymap(keymaps.toggleOrderedList), (0, _commands.toggleList)(_analytics.INPUT_METHOD.KEYBOARD, 'orderedList'), list);
|
|
19
|
-
keymaps.bindKeymapWithCommand(keymaps.findShortcutByKeymap(keymaps.toggleBulletList), (0, _commands.toggleList)(_analytics.INPUT_METHOD.KEYBOARD, 'bulletList'), list);
|
|
20
|
-
keymaps.bindKeymapWithCommand(keymaps.indentList.common, (0, _commands.indentList)(_analytics.INPUT_METHOD.KEYBOARD), list);
|
|
21
|
-
keymaps.bindKeymapWithCommand(keymaps.outdentList.common, (0,
|
|
22
|
-
keymaps.bindKeymapWithCommand(keymaps.enter.common, (0, _commands.enterKeyCommand)(featureFlags), list);
|
|
23
|
-
keymaps.bindKeymapWithCommand(keymaps.backspace.common, (0, _commands.backspaceKeyCommand)(featureFlags), list);
|
|
24
|
-
keymaps.bindKeymapWithCommand(keymaps.deleteKey.common, _commands.deleteKeyCommand, list);
|
|
17
|
+
keymaps.bindKeymapWithCommand(keymaps.findShortcutByKeymap(keymaps.toggleOrderedList), (0, _commands.toggleList)(editorAnalyticsAPI)(_analytics.INPUT_METHOD.KEYBOARD, 'orderedList'), list);
|
|
18
|
+
keymaps.bindKeymapWithCommand(keymaps.findShortcutByKeymap(keymaps.toggleBulletList), (0, _commands.toggleList)(editorAnalyticsAPI)(_analytics.INPUT_METHOD.KEYBOARD, 'bulletList'), list);
|
|
19
|
+
keymaps.bindKeymapWithCommand(keymaps.indentList.common, (0, _commands.indentList)(editorAnalyticsAPI)(_analytics.INPUT_METHOD.KEYBOARD), list);
|
|
20
|
+
keymaps.bindKeymapWithCommand(keymaps.outdentList.common, (0, _commands.outdentList)(editorAnalyticsAPI)(_analytics.INPUT_METHOD.KEYBOARD, featureFlags), list);
|
|
21
|
+
keymaps.bindKeymapWithCommand(keymaps.enter.common, (0, _commands.enterKeyCommand)(editorAnalyticsAPI)(featureFlags), list);
|
|
22
|
+
keymaps.bindKeymapWithCommand(keymaps.backspace.common, (0, _commands.backspaceKeyCommand)(editorAnalyticsAPI)(featureFlags), list);
|
|
23
|
+
keymaps.bindKeymapWithCommand(keymaps.deleteKey.common, (0, _commands.deleteKeyCommand)(editorAnalyticsAPI), list);
|
|
25
24
|
|
|
26
25
|
// This shortcut is Mac only
|
|
27
|
-
keymaps.bindKeymapWithCommand(keymaps.findKeyMapForBrowser(keymaps.forwardDelete), _commands.deleteKeyCommand, list);
|
|
26
|
+
keymaps.bindKeymapWithCommand(keymaps.findKeyMapForBrowser(keymaps.forwardDelete), (0, _commands.deleteKeyCommand)(editorAnalyticsAPI), list);
|
|
28
27
|
return (0, _prosemirrorKeymap.keymap)(list);
|
|
29
28
|
}
|
|
30
29
|
var _default = keymapPlugin;
|
|
@@ -12,9 +12,11 @@ var _types = require("../../ui/Toolbar/types");
|
|
|
12
12
|
var _main = require("../list/pm-plugins/main");
|
|
13
13
|
var _indentationButtons = require("./pm-plugins/indentation-buttons");
|
|
14
14
|
var toolbarListsIndentationPlugin = function toolbarListsIndentationPlugin(_ref, api) {
|
|
15
|
+
var _api$dependencies$ana;
|
|
15
16
|
var showIndentationButtons = _ref.showIndentationButtons,
|
|
16
17
|
allowHeadingAndParagraphIndentation = _ref.allowHeadingAndParagraphIndentation;
|
|
17
18
|
var featureFlags = (api === null || api === void 0 ? void 0 : api.dependencies.featureFlags.sharedState.currentState()) || {};
|
|
19
|
+
var editorAnalyticsAPI = api === null || api === void 0 ? void 0 : (_api$dependencies$ana = api.dependencies.analytics) === null || _api$dependencies$ana === void 0 ? void 0 : _api$dependencies$ana.actions;
|
|
18
20
|
return {
|
|
19
21
|
name: 'toolbarListsIndentation',
|
|
20
22
|
pmPlugins: function pmPlugins() {
|
|
@@ -65,7 +67,8 @@ var toolbarListsIndentationPlugin = function toolbarListsIndentationPlugin(_ref,
|
|
|
65
67
|
orderedListDisabled: listState.orderedListDisabled,
|
|
66
68
|
showIndentationButtons: !!showIndentationButtons,
|
|
67
69
|
indentDisabled: indentationState.indentDisabled,
|
|
68
|
-
outdentDisabled: indentationState.outdentDisabled
|
|
70
|
+
outdentDisabled: indentationState.outdentDisabled,
|
|
71
|
+
editorAnalyticsAPI: editorAnalyticsAPI
|
|
69
72
|
});
|
|
70
73
|
}
|
|
71
74
|
});
|
|
@@ -24,7 +24,8 @@ function ToolbarListsIndentation(props) {
|
|
|
24
24
|
popupsScrollableElement = props.popupsScrollableElement,
|
|
25
25
|
indentDisabled = props.indentDisabled,
|
|
26
26
|
outdentDisabled = props.outdentDisabled,
|
|
27
|
-
featureFlags = props.featureFlags
|
|
27
|
+
featureFlags = props.featureFlags,
|
|
28
|
+
editorAnalyticsAPI = props.editorAnalyticsAPI;
|
|
28
29
|
if (isSmall) {
|
|
29
30
|
return (0, _react.jsx)(_ToolbarDropdown.ToolbarDropdown, {
|
|
30
31
|
editorView: props.editorView,
|
|
@@ -40,7 +41,7 @@ function ToolbarListsIndentation(props) {
|
|
|
40
41
|
indentDisabled: indentDisabled,
|
|
41
42
|
outdentDisabled: outdentDisabled,
|
|
42
43
|
disabled: disabled,
|
|
43
|
-
onItemActivated: _onItemActivated.onItemActivated,
|
|
44
|
+
onItemActivated: (0, _onItemActivated.onItemActivated)(editorAnalyticsAPI),
|
|
44
45
|
featureFlags: featureFlags
|
|
45
46
|
});
|
|
46
47
|
}
|
|
@@ -55,7 +56,7 @@ function ToolbarListsIndentation(props) {
|
|
|
55
56
|
indentDisabled: indentDisabled,
|
|
56
57
|
outdentDisabled: outdentDisabled,
|
|
57
58
|
disabled: disabled,
|
|
58
|
-
onItemActivated: _onItemActivated.onItemActivated,
|
|
59
|
+
onItemActivated: (0, _onItemActivated.onItemActivated)(editorAnalyticsAPI),
|
|
59
60
|
featureFlags: featureFlags
|
|
60
61
|
});
|
|
61
62
|
}
|
|
@@ -3,52 +3,55 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.onItemActivated =
|
|
6
|
+
exports.onItemActivated = void 0;
|
|
7
7
|
var _commands = require("../../list/commands");
|
|
8
8
|
var _commands2 = require("../../indentation/commands");
|
|
9
9
|
var _keymaps = require("../../tasks-and-decisions/pm-plugins/keymaps");
|
|
10
10
|
var _analytics = require("../../analytics");
|
|
11
11
|
var _indentationButtons = require("../pm-plugins/indentation-buttons");
|
|
12
|
-
function onItemActivated(
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
case 'ordered_list':
|
|
21
|
-
(0, _commands.toggleOrderedList)(editorView, _analytics.INPUT_METHOD.TOOLBAR);
|
|
22
|
-
break;
|
|
23
|
-
case 'indent':
|
|
24
|
-
{
|
|
25
|
-
var _indentationButtonsPl;
|
|
26
|
-
var node = (_indentationButtonsPl = _indentationButtons.pluginKey.getState(editorView.state)) === null || _indentationButtonsPl === void 0 ? void 0 : _indentationButtonsPl.node;
|
|
27
|
-
if (node === 'paragraph_heading') {
|
|
28
|
-
(0, _commands2.getIndentCommand)(_analytics.INPUT_METHOD.TOOLBAR)(editorView.state, editorView.dispatch);
|
|
29
|
-
}
|
|
30
|
-
if (node === 'list') {
|
|
31
|
-
(0, _commands.indentList)(_analytics.INPUT_METHOD.TOOLBAR)(editorView.state, editorView.dispatch);
|
|
32
|
-
}
|
|
33
|
-
if (node === 'taskList') {
|
|
34
|
-
(0, _keymaps.getIndentCommand)(_analytics.INPUT_METHOD.TOOLBAR)(editorView.state, editorView.dispatch);
|
|
35
|
-
}
|
|
12
|
+
var onItemActivated = function onItemActivated(editorAnalyticsAPI) {
|
|
13
|
+
return function (_ref) {
|
|
14
|
+
var buttonName = _ref.buttonName,
|
|
15
|
+
editorView = _ref.editorView,
|
|
16
|
+
featureFlags = _ref.featureFlags;
|
|
17
|
+
switch (buttonName) {
|
|
18
|
+
case 'bullet_list':
|
|
19
|
+
(0, _commands.toggleBulletList)(editorAnalyticsAPI)(editorView, _analytics.INPUT_METHOD.TOOLBAR);
|
|
36
20
|
break;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
(
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
21
|
+
case 'ordered_list':
|
|
22
|
+
(0, _commands.toggleOrderedList)(editorAnalyticsAPI)(editorView, _analytics.INPUT_METHOD.TOOLBAR);
|
|
23
|
+
break;
|
|
24
|
+
case 'indent':
|
|
25
|
+
{
|
|
26
|
+
var _indentationButtonsPl;
|
|
27
|
+
var node = (_indentationButtonsPl = _indentationButtons.pluginKey.getState(editorView.state)) === null || _indentationButtonsPl === void 0 ? void 0 : _indentationButtonsPl.node;
|
|
28
|
+
if (node === 'paragraph_heading') {
|
|
29
|
+
(0, _commands2.getIndentCommand)(_analytics.INPUT_METHOD.TOOLBAR)(editorView.state, editorView.dispatch);
|
|
30
|
+
}
|
|
31
|
+
if (node === 'list') {
|
|
32
|
+
(0, _commands.indentList)(editorAnalyticsAPI)(_analytics.INPUT_METHOD.TOOLBAR)(editorView.state, editorView.dispatch);
|
|
33
|
+
}
|
|
34
|
+
if (node === 'taskList') {
|
|
35
|
+
(0, _keymaps.getIndentCommand)(_analytics.INPUT_METHOD.TOOLBAR)(editorView.state, editorView.dispatch);
|
|
36
|
+
}
|
|
37
|
+
break;
|
|
47
38
|
}
|
|
48
|
-
|
|
49
|
-
|
|
39
|
+
case 'outdent':
|
|
40
|
+
{
|
|
41
|
+
var _indentationButtonsPl2;
|
|
42
|
+
var _node = (_indentationButtonsPl2 = _indentationButtons.pluginKey.getState(editorView.state)) === null || _indentationButtonsPl2 === void 0 ? void 0 : _indentationButtonsPl2.node;
|
|
43
|
+
if (_node === 'paragraph_heading') {
|
|
44
|
+
(0, _commands2.getOutdentCommand)(_analytics.INPUT_METHOD.TOOLBAR)(editorView.state, editorView.dispatch);
|
|
45
|
+
}
|
|
46
|
+
if (_node === 'list') {
|
|
47
|
+
(0, _commands.outdentList)(editorAnalyticsAPI)(_analytics.INPUT_METHOD.TOOLBAR, featureFlags)(editorView.state, editorView.dispatch);
|
|
48
|
+
}
|
|
49
|
+
if (_node === 'taskList') {
|
|
50
|
+
(0, _keymaps.getUnindentCommand)(_analytics.INPUT_METHOD.TOOLBAR)(editorView.state, editorView.dispatch);
|
|
51
|
+
}
|
|
52
|
+
break;
|
|
50
53
|
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
exports.onItemActivated = onItemActivated;
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.version = exports.nextMajorVersion = exports.name = void 0;
|
|
7
7
|
var name = "@atlaskit/editor-core";
|
|
8
8
|
exports.name = name;
|
|
9
|
-
var version = "187.
|
|
9
|
+
var version = "187.8.0";
|
|
10
10
|
exports.version = version;
|
|
11
11
|
var nextMajorVersion = function nextMajorVersion() {
|
|
12
12
|
return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
|
package/dist/cjs/version.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD
|
|
1
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
2
2
|
import { hasValidListIndentationLevel } from '../utils/indentation';
|
|
3
3
|
import { indentListItemsSelected as indentListAction } from '../actions/indent-list-items-selected';
|
|
4
4
|
import { isBulletList } from '../utils/node';
|
|
@@ -7,7 +7,7 @@ import { MAX_NESTED_LIST_INDENTATION } from '../types';
|
|
|
7
7
|
import { isInsideListItem, isInsideTableCell, getListItemAttributes } from '../utils/selection';
|
|
8
8
|
import { getCommonListAnalyticsAttributes } from '../utils/analytics';
|
|
9
9
|
import { closeHistory } from 'prosemirror-history';
|
|
10
|
-
export
|
|
10
|
+
export const indentList = editorAnalyticsAPI => (inputMethod = INPUT_METHOD.KEYBOARD) => {
|
|
11
11
|
return function (state, dispatch) {
|
|
12
12
|
const {
|
|
13
13
|
tr,
|
|
@@ -45,7 +45,7 @@ export function indentList(inputMethod = INPUT_METHOD.KEYBOARD) {
|
|
|
45
45
|
// Even though this is a non-operation, we don't want to send this event to the browser. Because if we return false, the browser will move the focus to another place
|
|
46
46
|
return true;
|
|
47
47
|
}
|
|
48
|
-
|
|
48
|
+
editorAnalyticsAPI === null || editorAnalyticsAPI === void 0 ? void 0 : editorAnalyticsAPI.attachAnalyticsEvent({
|
|
49
49
|
action: ACTION.INDENTED,
|
|
50
50
|
actionSubject: ACTION_SUBJECT.LIST,
|
|
51
51
|
actionSubjectId,
|
|
@@ -54,10 +54,10 @@ export function indentList(inputMethod = INPUT_METHOD.KEYBOARD) {
|
|
|
54
54
|
...getCommonListAnalyticsAttributes(state),
|
|
55
55
|
inputMethod
|
|
56
56
|
}
|
|
57
|
-
});
|
|
57
|
+
})(tr);
|
|
58
58
|
if (dispatch) {
|
|
59
59
|
dispatch(tr);
|
|
60
60
|
}
|
|
61
61
|
return true;
|
|
62
62
|
};
|
|
63
|
-
}
|
|
63
|
+
};
|
|
@@ -2,13 +2,13 @@ import { Fragment, Slice } from 'prosemirror-model';
|
|
|
2
2
|
import { NodeSelection, TextSelection } from 'prosemirror-state';
|
|
3
3
|
import * as baseCommand from 'prosemirror-commands';
|
|
4
4
|
import { hasParentNodeOfType, findPositionOfNodeBefore } from 'prosemirror-utils';
|
|
5
|
-
import { hasVisibleContent } from '../../../utils
|
|
5
|
+
import { hasVisibleContent } from '../../../utils';
|
|
6
6
|
import { findCutBefore, isEmptySelectionAtStart, isFirstChildOfParent } from '../../../utils/commands';
|
|
7
7
|
import { filterCommands as filter } from '@atlaskit/editor-common/utils';
|
|
8
8
|
import { sanitiseMarksInSelection } from '../../../utils';
|
|
9
9
|
import { liftFollowingList, liftTextSelectionList, liftNodeSelectionList } from '../transforms';
|
|
10
10
|
import { GapCursorSelection } from '../../selection/gap-cursor-selection';
|
|
11
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD
|
|
11
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
12
12
|
import { isInsideListItem, canJoinToPreviousListItem, selectionContainsList } from '../utils/selection';
|
|
13
13
|
import { getCommonListAnalyticsAttributes } from '../utils/analytics';
|
|
14
14
|
import { listBackspace } from './listBackspace';
|
|
@@ -19,7 +19,7 @@ import { outdentList } from './outdent-list';
|
|
|
19
19
|
import { indentList } from './indent-list';
|
|
20
20
|
import { moveTargetIntoList } from '../utils/replace-content';
|
|
21
21
|
export { outdentList, indentList };
|
|
22
|
-
export const enterKeyCommand = featureFlags => (state, dispatch) => {
|
|
22
|
+
export const enterKeyCommand = editorAnalyticsAPI => featureFlags => (state, dispatch) => {
|
|
23
23
|
const {
|
|
24
24
|
selection
|
|
25
25
|
} = state;
|
|
@@ -36,7 +36,7 @@ export const enterKeyCommand = featureFlags => (state, dispatch) => {
|
|
|
36
36
|
/** Check if the wrapper has any visible content */
|
|
37
37
|
const wrapperHasContent = hasVisibleContent(wrapper);
|
|
38
38
|
if (!wrapperHasContent) {
|
|
39
|
-
return outdentList(INPUT_METHOD.KEYBOARD, featureFlags)(state, dispatch);
|
|
39
|
+
return outdentList(editorAnalyticsAPI)(INPUT_METHOD.KEYBOARD, featureFlags)(state, dispatch);
|
|
40
40
|
} else if (!hasParentNodeOfType(codeBlock)(selection)) {
|
|
41
41
|
return splitListItem(listItem)(state, dispatch);
|
|
42
42
|
}
|
|
@@ -44,18 +44,18 @@ export const enterKeyCommand = featureFlags => (state, dispatch) => {
|
|
|
44
44
|
}
|
|
45
45
|
return false;
|
|
46
46
|
};
|
|
47
|
-
export const backspaceKeyCommand = featureFlags => (state, dispatch) => {
|
|
48
|
-
return baseCommand.chainCommands(listBackspace,
|
|
47
|
+
export const backspaceKeyCommand = editorAnalyticsAPI => featureFlags => (state, dispatch) => {
|
|
48
|
+
return baseCommand.chainCommands(listBackspace(editorAnalyticsAPI),
|
|
49
49
|
// if we're at the start of a list item, we need to either backspace
|
|
50
50
|
// directly to an empty list item above, or outdent this node
|
|
51
51
|
filter([isEmptySelectionAtStart,
|
|
52
52
|
// list items might have multiple paragraphs; only do this at the first one
|
|
53
|
-
isFirstChildOfParent, isInsideListItem], baseCommand.chainCommands(deletePreviousEmptyListItem, outdentList(INPUT_METHOD.KEYBOARD, featureFlags))),
|
|
53
|
+
isFirstChildOfParent, isInsideListItem], baseCommand.chainCommands(deletePreviousEmptyListItem, outdentList(editorAnalyticsAPI)(INPUT_METHOD.KEYBOARD, featureFlags))),
|
|
54
54
|
// if we're just inside a paragraph node (or gapcursor is shown) and backspace, then try to join
|
|
55
55
|
// the text to the previous list item, if one exists
|
|
56
56
|
filter([isEmptySelectionAtStart, canJoinToPreviousListItem], joinToPreviousListItem))(state, dispatch);
|
|
57
57
|
};
|
|
58
|
-
export const deleteKeyCommand = joinListItemForward;
|
|
58
|
+
export const deleteKeyCommand = editorAnalyticsAPI => joinListItemForward(editorAnalyticsAPI);
|
|
59
59
|
|
|
60
60
|
// Get the depth of the nearest ancestor list
|
|
61
61
|
export const rootListDepth = (pos, nodes) => {
|
|
@@ -87,7 +87,7 @@ function untoggleSelectedList(tr) {
|
|
|
87
87
|
}
|
|
88
88
|
return liftTextSelectionList(selection, tr);
|
|
89
89
|
}
|
|
90
|
-
export
|
|
90
|
+
export const toggleList = editorAnalyticsAPI => (inputMethod, listType) => {
|
|
91
91
|
return function (state, dispatch) {
|
|
92
92
|
let tr = state.tr;
|
|
93
93
|
const listInsideSelection = selectionContainsList(tr);
|
|
@@ -107,7 +107,7 @@ export function toggleList(inputMethod, listType) {
|
|
|
107
107
|
if ((fromNode === null || fromNode === void 0 ? void 0 : fromNode.type.name) === listType && (toNode === null || toNode === void 0 ? void 0 : toNode.type.name) === listType) {
|
|
108
108
|
let tr = state.tr;
|
|
109
109
|
untoggleSelectedList(tr);
|
|
110
|
-
|
|
110
|
+
editorAnalyticsAPI === null || editorAnalyticsAPI === void 0 ? void 0 : editorAnalyticsAPI.attachAnalyticsEvent({
|
|
111
111
|
action: ACTION.CONVERTED,
|
|
112
112
|
actionSubject: ACTION_SUBJECT.LIST,
|
|
113
113
|
actionSubjectId: ACTION_SUBJECT_ID.TEXT,
|
|
@@ -117,7 +117,7 @@ export function toggleList(inputMethod, listType) {
|
|
|
117
117
|
transformedFrom,
|
|
118
118
|
inputMethod
|
|
119
119
|
}
|
|
120
|
-
});
|
|
120
|
+
})(tr);
|
|
121
121
|
if (dispatch) {
|
|
122
122
|
dispatch(tr);
|
|
123
123
|
}
|
|
@@ -127,7 +127,7 @@ export function toggleList(inputMethod, listType) {
|
|
|
127
127
|
tr,
|
|
128
128
|
nextListNodeType: listNodeType
|
|
129
129
|
});
|
|
130
|
-
|
|
130
|
+
editorAnalyticsAPI === null || editorAnalyticsAPI === void 0 ? void 0 : editorAnalyticsAPI.attachAnalyticsEvent({
|
|
131
131
|
action: ACTION.CONVERTED,
|
|
132
132
|
actionSubject: ACTION_SUBJECT.LIST,
|
|
133
133
|
actionSubjectId,
|
|
@@ -137,13 +137,13 @@ export function toggleList(inputMethod, listType) {
|
|
|
137
137
|
transformedFrom,
|
|
138
138
|
inputMethod
|
|
139
139
|
}
|
|
140
|
-
});
|
|
140
|
+
})(tr);
|
|
141
141
|
} else {
|
|
142
142
|
// Need to have this before wrapInList so the wrapping is done with valid content
|
|
143
143
|
// For example, if trying to convert centre or right aligned paragraphs to lists
|
|
144
144
|
sanitiseMarksInSelection(tr, listNodeType);
|
|
145
145
|
wrapInListAndJoin(listNodeType, tr);
|
|
146
|
-
|
|
146
|
+
editorAnalyticsAPI === null || editorAnalyticsAPI === void 0 ? void 0 : editorAnalyticsAPI.attachAnalyticsEvent({
|
|
147
147
|
action: ACTION.INSERTED,
|
|
148
148
|
actionSubject: ACTION_SUBJECT.LIST,
|
|
149
149
|
actionSubjectId,
|
|
@@ -151,7 +151,7 @@ export function toggleList(inputMethod, listType) {
|
|
|
151
151
|
attributes: {
|
|
152
152
|
inputMethod
|
|
153
153
|
}
|
|
154
|
-
});
|
|
154
|
+
})(tr);
|
|
155
155
|
}
|
|
156
156
|
|
|
157
157
|
// If document wasn't changed, return false from the command to indicate that the
|
|
@@ -164,13 +164,13 @@ export function toggleList(inputMethod, listType) {
|
|
|
164
164
|
}
|
|
165
165
|
return true;
|
|
166
166
|
};
|
|
167
|
-
}
|
|
168
|
-
export
|
|
169
|
-
return toggleList(inputMethod, 'bulletList')(view.state, view.dispatch);
|
|
170
|
-
}
|
|
171
|
-
export
|
|
172
|
-
return toggleList(inputMethod, 'orderedList')(view.state, view.dispatch);
|
|
173
|
-
}
|
|
167
|
+
};
|
|
168
|
+
export const toggleBulletList = editorAnalyticsAPI => (view, inputMethod = INPUT_METHOD.TOOLBAR) => {
|
|
169
|
+
return toggleList(editorAnalyticsAPI)(inputMethod, 'bulletList')(view.state, view.dispatch);
|
|
170
|
+
};
|
|
171
|
+
export const toggleOrderedList = editorAnalyticsAPI => (view, inputMethod = INPUT_METHOD.TOOLBAR) => {
|
|
172
|
+
return toggleList(editorAnalyticsAPI)(inputMethod, 'orderedList')(view.state, view.dispatch);
|
|
173
|
+
};
|
|
174
174
|
|
|
175
175
|
/**
|
|
176
176
|
* Implementation taken and modified for our needs from PM
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { isEmptySelectionAtEnd, walkNextNode } from '../../../utils/commands';
|
|
2
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD, DELETE_DIRECTION
|
|
2
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD, DELETE_DIRECTION } from '@atlaskit/editor-common/analytics';
|
|
3
3
|
import { findParentNodeOfType } from 'prosemirror-utils';
|
|
4
4
|
import { calcJoinListScenario } from '../actions/join-list-items-forward';
|
|
5
|
-
export const joinListItemForward = (state, dispatch) => {
|
|
5
|
+
export const joinListItemForward = editorAnalyticsAPI => (state, dispatch) => {
|
|
6
6
|
const {
|
|
7
7
|
tr,
|
|
8
8
|
selection: {
|
|
@@ -35,7 +35,7 @@ export const joinListItemForward = (state, dispatch) => {
|
|
|
35
35
|
if (listParent && listParent.node.type === orderedList) {
|
|
36
36
|
actionSubjectId = ACTION_SUBJECT_ID.FORMAT_LIST_NUMBER;
|
|
37
37
|
}
|
|
38
|
-
|
|
38
|
+
editorAnalyticsAPI === null || editorAnalyticsAPI === void 0 ? void 0 : editorAnalyticsAPI.attachAnalyticsEvent({
|
|
39
39
|
action: ACTION.LIST_ITEM_JOINED,
|
|
40
40
|
actionSubject: ACTION_SUBJECT.LIST,
|
|
41
41
|
actionSubjectId,
|
|
@@ -45,7 +45,7 @@ export const joinListItemForward = (state, dispatch) => {
|
|
|
45
45
|
direction: DELETE_DIRECTION.FORWARD,
|
|
46
46
|
scenario
|
|
47
47
|
}
|
|
48
|
-
});
|
|
48
|
+
})(tr);
|
|
49
49
|
if (dispatch) {
|
|
50
50
|
dispatch(tr);
|
|
51
51
|
}
|