@atlaskit/editor-plugin-panel 14.0.6 → 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
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-panel
|
|
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
|
+
|
|
3
16
|
## 14.0.6
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
|
@@ -15,7 +15,8 @@ var _informationCircle = _interopRequireDefault(require("@atlaskit/icon/core/inf
|
|
|
15
15
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
16
16
|
var NODE_NAME = 'panel';
|
|
17
17
|
var PanelBlockMenuItem = function PanelBlockMenuItem(_ref) {
|
|
18
|
-
var api = _ref.api
|
|
18
|
+
var api = _ref.api,
|
|
19
|
+
isSuggested = _ref.isSuggested;
|
|
19
20
|
var _useIntl = (0, _reactIntl.useIntl)(),
|
|
20
21
|
formatMessage = _useIntl.formatMessage;
|
|
21
22
|
var handleClick = function handleClick(event) {
|
|
@@ -27,6 +28,7 @@ var PanelBlockMenuItem = function PanelBlockMenuItem(_ref) {
|
|
|
27
28
|
var panelNodeType = (0, _expValEquals.expValEquals)('platform_editor_nest_table_in_panel', 'isEnabled', true) ? (0, _nodeTypeUtils.pickPanelTypeForInsertion)(tr.selection.$from) : tr.doc.type.schema.nodes.panel;
|
|
28
29
|
var command = api === null || api === void 0 || (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 ? void 0 : _api$blockMenu.commands.transformNode(panelNodeType, {
|
|
29
30
|
inputMethod: inputMethod,
|
|
31
|
+
isSuggested: isSuggested,
|
|
30
32
|
triggeredFrom: triggeredFrom,
|
|
31
33
|
targetTypeName: NODE_NAME
|
|
32
34
|
});
|
|
@@ -45,8 +47,11 @@ var PanelBlockMenuItem = function PanelBlockMenuItem(_ref) {
|
|
|
45
47
|
};
|
|
46
48
|
var createPanelBlockMenuItem = exports.createPanelBlockMenuItem = function createPanelBlockMenuItem(api) {
|
|
47
49
|
return function () {
|
|
50
|
+
var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
51
|
+
isSuggested = _ref3.isSuggested;
|
|
48
52
|
return /*#__PURE__*/_react.default.createElement(PanelBlockMenuItem, {
|
|
49
|
-
api: api
|
|
53
|
+
api: api,
|
|
54
|
+
isSuggested: isSuggested
|
|
50
55
|
});
|
|
51
56
|
};
|
|
52
57
|
};
|
|
@@ -8,7 +8,8 @@ import InformationCircleIcon from '@atlaskit/icon/core/information-circle';
|
|
|
8
8
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
9
9
|
const NODE_NAME = 'panel';
|
|
10
10
|
const PanelBlockMenuItem = ({
|
|
11
|
-
api
|
|
11
|
+
api,
|
|
12
|
+
isSuggested
|
|
12
13
|
}) => {
|
|
13
14
|
const {
|
|
14
15
|
formatMessage
|
|
@@ -23,6 +24,7 @@ const PanelBlockMenuItem = ({
|
|
|
23
24
|
const panelNodeType = expValEquals('platform_editor_nest_table_in_panel', 'isEnabled', true) ? pickPanelTypeForInsertion(tr.selection.$from) : tr.doc.type.schema.nodes.panel;
|
|
24
25
|
const command = api === null || api === void 0 ? void 0 : (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 ? void 0 : _api$blockMenu.commands.transformNode(panelNodeType, {
|
|
25
26
|
inputMethod,
|
|
27
|
+
isSuggested,
|
|
26
28
|
triggeredFrom,
|
|
27
29
|
targetTypeName: NODE_NAME
|
|
28
30
|
});
|
|
@@ -40,7 +42,10 @@ const PanelBlockMenuItem = ({
|
|
|
40
42
|
}, formatMessage(blockTypeMessages.panel));
|
|
41
43
|
};
|
|
42
44
|
export const createPanelBlockMenuItem = api => {
|
|
43
|
-
return (
|
|
44
|
-
|
|
45
|
+
return ({
|
|
46
|
+
isSuggested
|
|
47
|
+
} = {}) => /*#__PURE__*/React.createElement(PanelBlockMenuItem, {
|
|
48
|
+
api: api,
|
|
49
|
+
isSuggested: isSuggested
|
|
45
50
|
});
|
|
46
51
|
};
|
|
@@ -8,7 +8,8 @@ import InformationCircleIcon from '@atlaskit/icon/core/information-circle';
|
|
|
8
8
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
9
9
|
var NODE_NAME = 'panel';
|
|
10
10
|
var PanelBlockMenuItem = function PanelBlockMenuItem(_ref) {
|
|
11
|
-
var api = _ref.api
|
|
11
|
+
var api = _ref.api,
|
|
12
|
+
isSuggested = _ref.isSuggested;
|
|
12
13
|
var _useIntl = useIntl(),
|
|
13
14
|
formatMessage = _useIntl.formatMessage;
|
|
14
15
|
var handleClick = function handleClick(event) {
|
|
@@ -20,6 +21,7 @@ var PanelBlockMenuItem = function PanelBlockMenuItem(_ref) {
|
|
|
20
21
|
var panelNodeType = expValEquals('platform_editor_nest_table_in_panel', 'isEnabled', true) ? pickPanelTypeForInsertion(tr.selection.$from) : tr.doc.type.schema.nodes.panel;
|
|
21
22
|
var command = api === null || api === void 0 || (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 ? void 0 : _api$blockMenu.commands.transformNode(panelNodeType, {
|
|
22
23
|
inputMethod: inputMethod,
|
|
24
|
+
isSuggested: isSuggested,
|
|
23
25
|
triggeredFrom: triggeredFrom,
|
|
24
26
|
targetTypeName: NODE_NAME
|
|
25
27
|
});
|
|
@@ -38,8 +40,11 @@ var PanelBlockMenuItem = function PanelBlockMenuItem(_ref) {
|
|
|
38
40
|
};
|
|
39
41
|
export var createPanelBlockMenuItem = function createPanelBlockMenuItem(api) {
|
|
40
42
|
return function () {
|
|
43
|
+
var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
44
|
+
isSuggested = _ref3.isSuggested;
|
|
41
45
|
return /*#__PURE__*/React.createElement(PanelBlockMenuItem, {
|
|
42
|
-
api: api
|
|
46
|
+
api: api,
|
|
47
|
+
isSuggested: isSuggested
|
|
43
48
|
});
|
|
44
49
|
};
|
|
45
50
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
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 { PanelPlugin } from '../panelPluginType';
|
|
4
|
-
export declare const createPanelBlockMenuItem: (api: ExtractInjectionAPI<PanelPlugin> | undefined) => () => React.JSX.Element;
|
|
5
|
+
export declare const createPanelBlockMenuItem: (api: ExtractInjectionAPI<PanelPlugin> | undefined) => ({ isSuggested }?: BlockMenuItemComponentProps) => React.JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-panel",
|
|
3
|
-
"version": "14.0
|
|
3
|
+
"version": "14.1.0",
|
|
4
4
|
"description": "Panel plugin for @atlaskit/editor-core.",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"@atlaskit/adf-schema": "^56.0.0",
|
|
23
23
|
"@atlaskit/editor-palette": "^3.1.0",
|
|
24
24
|
"@atlaskit/editor-plugin-analytics": "^12.0.0",
|
|
25
|
-
"@atlaskit/editor-plugin-block-menu": "^11.
|
|
25
|
+
"@atlaskit/editor-plugin-block-menu": "^11.1.0",
|
|
26
26
|
"@atlaskit/editor-plugin-decorations": "^12.0.0",
|
|
27
27
|
"@atlaskit/editor-plugin-emoji": "^13.0.0",
|
|
28
28
|
"@atlaskit/editor-plugin-selection": "^12.0.0",
|
|
@@ -30,16 +30,16 @@
|
|
|
30
30
|
"@atlaskit/editor-prosemirror": "^8.0.0",
|
|
31
31
|
"@atlaskit/editor-shared-styles": "^4.0.0",
|
|
32
32
|
"@atlaskit/editor-toolbar": "^2.0.0",
|
|
33
|
-
"@atlaskit/emoji": "^71.
|
|
33
|
+
"@atlaskit/emoji": "^71.4.0",
|
|
34
34
|
"@atlaskit/icon": "^36.0.0",
|
|
35
35
|
"@atlaskit/platform-feature-flags": "^2.0.0",
|
|
36
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
37
|
-
"@atlaskit/tokens": "^
|
|
36
|
+
"@atlaskit/tmp-editor-statsig": "^110.0.0",
|
|
37
|
+
"@atlaskit/tokens": "^15.0.0",
|
|
38
38
|
"@babel/runtime": "^7.0.0",
|
|
39
39
|
"uuid": "^3.1.0"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"@atlaskit/editor-common": "^116.
|
|
42
|
+
"@atlaskit/editor-common": "^116.11.0",
|
|
43
43
|
"react": "^18.2.0",
|
|
44
44
|
"react-dom": "^18.2.0",
|
|
45
45
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|
|
@@ -102,6 +102,6 @@
|
|
|
102
102
|
"devDependencies": {
|
|
103
103
|
"react": "^18.2.0",
|
|
104
104
|
"react-dom": "^18.2.0",
|
|
105
|
-
"react-intl": "^
|
|
105
|
+
"react-intl": "^7.0.0"
|
|
106
106
|
}
|
|
107
107
|
}
|