@atlaskit/editor-plugin-list 14.0.5 → 14.1.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 +19 -0
- package/dist/cjs/ui/BulletedListBlockMenuItem.js +7 -2
- package/dist/cjs/ui/NumberedListBlockMenuItem.js +7 -2
- package/dist/es2019/ui/BulletedListBlockMenuItem.js +8 -3
- package/dist/es2019/ui/NumberedListBlockMenuItem.js +8 -3
- package/dist/esm/ui/BulletedListBlockMenuItem.js +7 -2
- package/dist/esm/ui/NumberedListBlockMenuItem.js +7 -2
- package/dist/types/ui/BulletedListBlockMenuItem.d.ts +3 -1
- package/dist/types/ui/NumberedListBlockMenuItem.d.ts +3 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-list
|
|
2
2
|
|
|
3
|
+
## 14.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`b483e293da76f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b483e293da76f) -
|
|
8
|
+
Add a gated `isSuggested` attribute to block menu element transformed analytics events so
|
|
9
|
+
suggested and non-suggested transform selections can be distinguished. The event attribute is
|
|
10
|
+
gated behind the `platform_editor_blocks_patch_2` feature gate.
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
|
|
16
|
+
## 14.0.6
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- Updated dependencies
|
|
21
|
+
|
|
3
22
|
## 14.0.5
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
|
@@ -13,7 +13,8 @@ var _editorToolbar = require("@atlaskit/editor-toolbar");
|
|
|
13
13
|
var _listBulleted = _interopRequireDefault(require("@atlaskit/icon/core/list-bulleted"));
|
|
14
14
|
var NODE_NAME = 'bulletList';
|
|
15
15
|
var BulletedListBlockMenuItem = function BulletedListBlockMenuItem(_ref) {
|
|
16
|
-
var api = _ref.api
|
|
16
|
+
var api = _ref.api,
|
|
17
|
+
isSuggested = _ref.isSuggested;
|
|
17
18
|
var _useIntl = (0, _reactIntl.useIntl)(),
|
|
18
19
|
formatMessage = _useIntl.formatMessage;
|
|
19
20
|
var handleClick = function handleClick(event) {
|
|
@@ -24,6 +25,7 @@ var BulletedListBlockMenuItem = function BulletedListBlockMenuItem(_ref) {
|
|
|
24
25
|
var tr = _ref2.tr;
|
|
25
26
|
var command = api === null || api === void 0 || (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 ? void 0 : _api$blockMenu.commands.transformNode(tr.doc.type.schema.nodes.bulletList, {
|
|
26
27
|
inputMethod: inputMethod,
|
|
28
|
+
isSuggested: isSuggested,
|
|
27
29
|
triggeredFrom: triggeredFrom,
|
|
28
30
|
targetTypeName: NODE_NAME
|
|
29
31
|
});
|
|
@@ -43,8 +45,11 @@ var BulletedListBlockMenuItem = function BulletedListBlockMenuItem(_ref) {
|
|
|
43
45
|
var createBulletedListBlockMenuItem = exports.createBulletedListBlockMenuItem = function createBulletedListBlockMenuItem(_ref3) {
|
|
44
46
|
var api = _ref3.api;
|
|
45
47
|
return function () {
|
|
48
|
+
var _ref4 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
49
|
+
isSuggested = _ref4.isSuggested;
|
|
46
50
|
return /*#__PURE__*/_react.default.createElement(BulletedListBlockMenuItem, {
|
|
47
|
-
api: api
|
|
51
|
+
api: api,
|
|
52
|
+
isSuggested: isSuggested
|
|
48
53
|
});
|
|
49
54
|
};
|
|
50
55
|
};
|
|
@@ -13,7 +13,8 @@ var _editorToolbar = require("@atlaskit/editor-toolbar");
|
|
|
13
13
|
var _listNumbered = _interopRequireDefault(require("@atlaskit/icon/core/list-numbered"));
|
|
14
14
|
var NODE_NAME = 'orderedList';
|
|
15
15
|
var NumberedListBlockMenuItem = function NumberedListBlockMenuItem(_ref) {
|
|
16
|
-
var api = _ref.api
|
|
16
|
+
var api = _ref.api,
|
|
17
|
+
isSuggested = _ref.isSuggested;
|
|
17
18
|
var _useIntl = (0, _reactIntl.useIntl)(),
|
|
18
19
|
formatMessage = _useIntl.formatMessage;
|
|
19
20
|
var handleClick = function handleClick(event) {
|
|
@@ -24,6 +25,7 @@ var NumberedListBlockMenuItem = function NumberedListBlockMenuItem(_ref) {
|
|
|
24
25
|
var tr = _ref2.tr;
|
|
25
26
|
var command = api === null || api === void 0 || (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 ? void 0 : _api$blockMenu.commands.transformNode(tr.doc.type.schema.nodes.orderedList, {
|
|
26
27
|
inputMethod: inputMethod,
|
|
28
|
+
isSuggested: isSuggested,
|
|
27
29
|
triggeredFrom: triggeredFrom,
|
|
28
30
|
targetTypeName: NODE_NAME
|
|
29
31
|
});
|
|
@@ -43,8 +45,11 @@ var NumberedListBlockMenuItem = function NumberedListBlockMenuItem(_ref) {
|
|
|
43
45
|
var createNumberedListBlockMenuItem = exports.createNumberedListBlockMenuItem = function createNumberedListBlockMenuItem(_ref3) {
|
|
44
46
|
var api = _ref3.api;
|
|
45
47
|
return function () {
|
|
48
|
+
var _ref4 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
49
|
+
isSuggested = _ref4.isSuggested;
|
|
46
50
|
return /*#__PURE__*/_react.default.createElement(NumberedListBlockMenuItem, {
|
|
47
|
-
api: api
|
|
51
|
+
api: api,
|
|
52
|
+
isSuggested: isSuggested
|
|
48
53
|
});
|
|
49
54
|
};
|
|
50
55
|
};
|
|
@@ -6,7 +6,8 @@ import { ToolbarDropdownItem } from '@atlaskit/editor-toolbar';
|
|
|
6
6
|
import ListBulletedIcon from '@atlaskit/icon/core/list-bulleted';
|
|
7
7
|
const NODE_NAME = 'bulletList';
|
|
8
8
|
const BulletedListBlockMenuItem = ({
|
|
9
|
-
api
|
|
9
|
+
api,
|
|
10
|
+
isSuggested
|
|
10
11
|
}) => {
|
|
11
12
|
const {
|
|
12
13
|
formatMessage
|
|
@@ -20,6 +21,7 @@ const BulletedListBlockMenuItem = ({
|
|
|
20
21
|
var _api$blockMenu;
|
|
21
22
|
const command = api === null || api === void 0 ? void 0 : (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 ? void 0 : _api$blockMenu.commands.transformNode(tr.doc.type.schema.nodes.bulletList, {
|
|
22
23
|
inputMethod,
|
|
24
|
+
isSuggested,
|
|
23
25
|
triggeredFrom,
|
|
24
26
|
targetTypeName: NODE_NAME
|
|
25
27
|
});
|
|
@@ -39,7 +41,10 @@ const BulletedListBlockMenuItem = ({
|
|
|
39
41
|
export const createBulletedListBlockMenuItem = ({
|
|
40
42
|
api
|
|
41
43
|
}) => {
|
|
42
|
-
return (
|
|
43
|
-
|
|
44
|
+
return ({
|
|
45
|
+
isSuggested
|
|
46
|
+
} = {}) => /*#__PURE__*/React.createElement(BulletedListBlockMenuItem, {
|
|
47
|
+
api: api,
|
|
48
|
+
isSuggested: isSuggested
|
|
44
49
|
});
|
|
45
50
|
};
|
|
@@ -6,7 +6,8 @@ import { ToolbarDropdownItem } from '@atlaskit/editor-toolbar';
|
|
|
6
6
|
import ListNumberedIcon from '@atlaskit/icon/core/list-numbered';
|
|
7
7
|
const NODE_NAME = 'orderedList';
|
|
8
8
|
const NumberedListBlockMenuItem = ({
|
|
9
|
-
api
|
|
9
|
+
api,
|
|
10
|
+
isSuggested
|
|
10
11
|
}) => {
|
|
11
12
|
const {
|
|
12
13
|
formatMessage
|
|
@@ -20,6 +21,7 @@ const NumberedListBlockMenuItem = ({
|
|
|
20
21
|
var _api$blockMenu;
|
|
21
22
|
const command = api === null || api === void 0 ? void 0 : (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 ? void 0 : _api$blockMenu.commands.transformNode(tr.doc.type.schema.nodes.orderedList, {
|
|
22
23
|
inputMethod,
|
|
24
|
+
isSuggested,
|
|
23
25
|
triggeredFrom,
|
|
24
26
|
targetTypeName: NODE_NAME
|
|
25
27
|
});
|
|
@@ -39,7 +41,10 @@ const NumberedListBlockMenuItem = ({
|
|
|
39
41
|
export const createNumberedListBlockMenuItem = ({
|
|
40
42
|
api
|
|
41
43
|
}) => {
|
|
42
|
-
return (
|
|
43
|
-
|
|
44
|
+
return ({
|
|
45
|
+
isSuggested
|
|
46
|
+
} = {}) => /*#__PURE__*/React.createElement(NumberedListBlockMenuItem, {
|
|
47
|
+
api: api,
|
|
48
|
+
isSuggested: isSuggested
|
|
44
49
|
});
|
|
45
50
|
};
|
|
@@ -6,7 +6,8 @@ import { ToolbarDropdownItem } from '@atlaskit/editor-toolbar';
|
|
|
6
6
|
import ListBulletedIcon from '@atlaskit/icon/core/list-bulleted';
|
|
7
7
|
var NODE_NAME = 'bulletList';
|
|
8
8
|
var BulletedListBlockMenuItem = function BulletedListBlockMenuItem(_ref) {
|
|
9
|
-
var api = _ref.api
|
|
9
|
+
var api = _ref.api,
|
|
10
|
+
isSuggested = _ref.isSuggested;
|
|
10
11
|
var _useIntl = useIntl(),
|
|
11
12
|
formatMessage = _useIntl.formatMessage;
|
|
12
13
|
var handleClick = function handleClick(event) {
|
|
@@ -17,6 +18,7 @@ var BulletedListBlockMenuItem = function BulletedListBlockMenuItem(_ref) {
|
|
|
17
18
|
var tr = _ref2.tr;
|
|
18
19
|
var command = api === null || api === void 0 || (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 ? void 0 : _api$blockMenu.commands.transformNode(tr.doc.type.schema.nodes.bulletList, {
|
|
19
20
|
inputMethod: inputMethod,
|
|
21
|
+
isSuggested: isSuggested,
|
|
20
22
|
triggeredFrom: triggeredFrom,
|
|
21
23
|
targetTypeName: NODE_NAME
|
|
22
24
|
});
|
|
@@ -36,8 +38,11 @@ var BulletedListBlockMenuItem = function BulletedListBlockMenuItem(_ref) {
|
|
|
36
38
|
export var createBulletedListBlockMenuItem = function createBulletedListBlockMenuItem(_ref3) {
|
|
37
39
|
var api = _ref3.api;
|
|
38
40
|
return function () {
|
|
41
|
+
var _ref4 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
42
|
+
isSuggested = _ref4.isSuggested;
|
|
39
43
|
return /*#__PURE__*/React.createElement(BulletedListBlockMenuItem, {
|
|
40
|
-
api: api
|
|
44
|
+
api: api,
|
|
45
|
+
isSuggested: isSuggested
|
|
41
46
|
});
|
|
42
47
|
};
|
|
43
48
|
};
|
|
@@ -6,7 +6,8 @@ import { ToolbarDropdownItem } from '@atlaskit/editor-toolbar';
|
|
|
6
6
|
import ListNumberedIcon from '@atlaskit/icon/core/list-numbered';
|
|
7
7
|
var NODE_NAME = 'orderedList';
|
|
8
8
|
var NumberedListBlockMenuItem = function NumberedListBlockMenuItem(_ref) {
|
|
9
|
-
var api = _ref.api
|
|
9
|
+
var api = _ref.api,
|
|
10
|
+
isSuggested = _ref.isSuggested;
|
|
10
11
|
var _useIntl = useIntl(),
|
|
11
12
|
formatMessage = _useIntl.formatMessage;
|
|
12
13
|
var handleClick = function handleClick(event) {
|
|
@@ -17,6 +18,7 @@ var NumberedListBlockMenuItem = function NumberedListBlockMenuItem(_ref) {
|
|
|
17
18
|
var tr = _ref2.tr;
|
|
18
19
|
var command = api === null || api === void 0 || (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 ? void 0 : _api$blockMenu.commands.transformNode(tr.doc.type.schema.nodes.orderedList, {
|
|
19
20
|
inputMethod: inputMethod,
|
|
21
|
+
isSuggested: isSuggested,
|
|
20
22
|
triggeredFrom: triggeredFrom,
|
|
21
23
|
targetTypeName: NODE_NAME
|
|
22
24
|
});
|
|
@@ -36,8 +38,11 @@ var NumberedListBlockMenuItem = function NumberedListBlockMenuItem(_ref) {
|
|
|
36
38
|
export var createNumberedListBlockMenuItem = function createNumberedListBlockMenuItem(_ref3) {
|
|
37
39
|
var api = _ref3.api;
|
|
38
40
|
return function () {
|
|
41
|
+
var _ref4 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
42
|
+
isSuggested = _ref4.isSuggested;
|
|
39
43
|
return /*#__PURE__*/React.createElement(NumberedListBlockMenuItem, {
|
|
40
|
-
api: api
|
|
44
|
+
api: api,
|
|
45
|
+
isSuggested: isSuggested
|
|
41
46
|
});
|
|
42
47
|
};
|
|
43
48
|
};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { BlockMenuItemComponentProps } from '@atlaskit/editor-plugin-block-menu/blockMenuPluginType';
|
|
3
4
|
import type { ListPlugin } from '../listPluginType';
|
|
4
5
|
type BulletedListBlockMenuItemProps = {
|
|
5
6
|
api: ExtractInjectionAPI<ListPlugin> | undefined;
|
|
7
|
+
isSuggested?: boolean;
|
|
6
8
|
};
|
|
7
|
-
export declare const createBulletedListBlockMenuItem: ({ api }: BulletedListBlockMenuItemProps) => () => React.JSX.Element;
|
|
9
|
+
export declare const createBulletedListBlockMenuItem: ({ api }: BulletedListBlockMenuItemProps) => ({ isSuggested }?: BlockMenuItemComponentProps) => React.JSX.Element;
|
|
8
10
|
export {};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { BlockMenuItemComponentProps } from '@atlaskit/editor-plugin-block-menu/blockMenuPluginType';
|
|
3
4
|
import type { ListPlugin } from '../listPluginType';
|
|
4
5
|
type NumberedListBlockMenuItemProps = {
|
|
5
6
|
api: ExtractInjectionAPI<ListPlugin> | undefined;
|
|
7
|
+
isSuggested?: boolean;
|
|
6
8
|
};
|
|
7
|
-
export declare const createNumberedListBlockMenuItem: ({ api }: NumberedListBlockMenuItemProps) => () => React.JSX.Element;
|
|
9
|
+
export declare const createNumberedListBlockMenuItem: ({ api }: NumberedListBlockMenuItemProps) => ({ isSuggested }?: BlockMenuItemComponentProps) => React.JSX.Element;
|
|
8
10
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-list",
|
|
3
|
-
"version": "14.0
|
|
3
|
+
"version": "14.1.0",
|
|
4
4
|
"description": "List plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@atlaskit/adf-schema": "^56.0.0",
|
|
23
23
|
"@atlaskit/editor-plugin-analytics": "^12.0.0",
|
|
24
|
-
"@atlaskit/editor-plugin-block-menu": "^11.
|
|
24
|
+
"@atlaskit/editor-plugin-block-menu": "^11.1.0",
|
|
25
25
|
"@atlaskit/editor-plugin-feature-flags": "^11.0.0",
|
|
26
26
|
"@atlaskit/editor-plugin-toolbar": "^9.0.0",
|
|
27
27
|
"@atlaskit/editor-prosemirror": "^8.0.0",
|
|
@@ -30,11 +30,11 @@
|
|
|
30
30
|
"@atlaskit/platform-feature-flags": "^2.0.0",
|
|
31
31
|
"@atlaskit/prosemirror-history": "^1.0.0",
|
|
32
32
|
"@atlaskit/prosemirror-input-rules": "^4.0.0",
|
|
33
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
33
|
+
"@atlaskit/tmp-editor-statsig": "^110.0.0",
|
|
34
34
|
"@babel/runtime": "^7.0.0"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
|
-
"@atlaskit/editor-common": "^116.
|
|
37
|
+
"@atlaskit/editor-common": "^116.11.0",
|
|
38
38
|
"react": "^18.2.0",
|
|
39
39
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|
|
40
40
|
},
|
|
@@ -88,6 +88,6 @@
|
|
|
88
88
|
},
|
|
89
89
|
"devDependencies": {
|
|
90
90
|
"react": "^18.2.0",
|
|
91
|
-
"react-intl": "^
|
|
91
|
+
"react-intl": "^7.0.0"
|
|
92
92
|
}
|
|
93
93
|
}
|