@atlaskit/editor-plugin-layout 13.0.6 → 13.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-layout
|
|
2
2
|
|
|
3
|
+
## 13.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
|
## 13.0.6
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
|
@@ -19,7 +19,8 @@ var styles = {
|
|
|
19
19
|
};
|
|
20
20
|
var NODE_NAME = 'layoutSection';
|
|
21
21
|
var LayoutBlockMenuItem = function LayoutBlockMenuItem(_ref) {
|
|
22
|
-
var api = _ref.api
|
|
22
|
+
var api = _ref.api,
|
|
23
|
+
isSuggested = _ref.isSuggested;
|
|
23
24
|
var _useIntl = (0, _reactIntl.useIntl)(),
|
|
24
25
|
formatMessage = _useIntl.formatMessage;
|
|
25
26
|
var handleClick = function handleClick(event) {
|
|
@@ -30,6 +31,7 @@ var LayoutBlockMenuItem = function LayoutBlockMenuItem(_ref) {
|
|
|
30
31
|
var tr = _ref2.tr;
|
|
31
32
|
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.layoutSection, {
|
|
32
33
|
inputMethod: inputMethod,
|
|
34
|
+
isSuggested: isSuggested,
|
|
33
35
|
triggeredFrom: triggeredFrom,
|
|
34
36
|
targetTypeName: NODE_NAME
|
|
35
37
|
});
|
|
@@ -50,8 +52,11 @@ var LayoutBlockMenuItem = function LayoutBlockMenuItem(_ref) {
|
|
|
50
52
|
};
|
|
51
53
|
var createLayoutBlockMenuItem = exports.createLayoutBlockMenuItem = function createLayoutBlockMenuItem(api) {
|
|
52
54
|
return function () {
|
|
55
|
+
var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
56
|
+
isSuggested = _ref3.isSuggested;
|
|
53
57
|
return /*#__PURE__*/_react.default.createElement(LayoutBlockMenuItem, {
|
|
54
|
-
api: api
|
|
58
|
+
api: api,
|
|
59
|
+
isSuggested: isSuggested
|
|
55
60
|
});
|
|
56
61
|
};
|
|
57
62
|
};
|
|
@@ -12,7 +12,8 @@ const styles = {
|
|
|
12
12
|
};
|
|
13
13
|
const NODE_NAME = 'layoutSection';
|
|
14
14
|
const LayoutBlockMenuItem = ({
|
|
15
|
-
api
|
|
15
|
+
api,
|
|
16
|
+
isSuggested
|
|
16
17
|
}) => {
|
|
17
18
|
const {
|
|
18
19
|
formatMessage
|
|
@@ -26,6 +27,7 @@ const LayoutBlockMenuItem = ({
|
|
|
26
27
|
var _api$blockMenu;
|
|
27
28
|
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.layoutSection, {
|
|
28
29
|
inputMethod,
|
|
30
|
+
isSuggested,
|
|
29
31
|
triggeredFrom,
|
|
30
32
|
targetTypeName: NODE_NAME
|
|
31
33
|
});
|
|
@@ -45,7 +47,10 @@ const LayoutBlockMenuItem = ({
|
|
|
45
47
|
}, formatMessage(blockMenuMessages.layout));
|
|
46
48
|
};
|
|
47
49
|
export const createLayoutBlockMenuItem = api => {
|
|
48
|
-
return (
|
|
49
|
-
|
|
50
|
+
return ({
|
|
51
|
+
isSuggested
|
|
52
|
+
} = {}) => /*#__PURE__*/React.createElement(LayoutBlockMenuItem, {
|
|
53
|
+
api: api,
|
|
54
|
+
isSuggested: isSuggested
|
|
50
55
|
});
|
|
51
56
|
};
|
|
@@ -12,7 +12,8 @@ var styles = {
|
|
|
12
12
|
};
|
|
13
13
|
var NODE_NAME = 'layoutSection';
|
|
14
14
|
var LayoutBlockMenuItem = function LayoutBlockMenuItem(_ref) {
|
|
15
|
-
var api = _ref.api
|
|
15
|
+
var api = _ref.api,
|
|
16
|
+
isSuggested = _ref.isSuggested;
|
|
16
17
|
var _useIntl = useIntl(),
|
|
17
18
|
formatMessage = _useIntl.formatMessage;
|
|
18
19
|
var handleClick = function handleClick(event) {
|
|
@@ -23,6 +24,7 @@ var LayoutBlockMenuItem = function LayoutBlockMenuItem(_ref) {
|
|
|
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.transformNode(tr.doc.type.schema.nodes.layoutSection, {
|
|
25
26
|
inputMethod: inputMethod,
|
|
27
|
+
isSuggested: isSuggested,
|
|
26
28
|
triggeredFrom: triggeredFrom,
|
|
27
29
|
targetTypeName: NODE_NAME
|
|
28
30
|
});
|
|
@@ -43,8 +45,11 @@ var LayoutBlockMenuItem = function LayoutBlockMenuItem(_ref) {
|
|
|
43
45
|
};
|
|
44
46
|
export var createLayoutBlockMenuItem = function createLayoutBlockMenuItem(api) {
|
|
45
47
|
return function () {
|
|
48
|
+
var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
49
|
+
isSuggested = _ref3.isSuggested;
|
|
46
50
|
return /*#__PURE__*/React.createElement(LayoutBlockMenuItem, {
|
|
47
|
-
api: api
|
|
51
|
+
api: api,
|
|
52
|
+
isSuggested: isSuggested
|
|
48
53
|
});
|
|
49
54
|
};
|
|
50
55
|
};
|
|
@@ -4,5 +4,6 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
7
|
+
import type { BlockMenuItemComponentProps } from '@atlaskit/editor-plugin-block-menu/blockMenuPluginType';
|
|
7
8
|
import type { LayoutPlugin } from '../layoutPluginType';
|
|
8
|
-
export declare const createLayoutBlockMenuItem: (api: ExtractInjectionAPI<LayoutPlugin> | undefined) => () => React.JSX.Element;
|
|
9
|
+
export declare const createLayoutBlockMenuItem: (api: ExtractInjectionAPI<LayoutPlugin> | undefined) => ({ isSuggested }?: BlockMenuItemComponentProps) => React.JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-layout",
|
|
3
|
-
"version": "13.0
|
|
3
|
+
"version": "13.1.0",
|
|
4
4
|
"description": "Layout plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -25,11 +25,11 @@
|
|
|
25
25
|
"@atlaskit/css": "^1.0.0",
|
|
26
26
|
"@atlaskit/editor-plugin-analytics": "^12.0.0",
|
|
27
27
|
"@atlaskit/editor-plugin-block-controls": "^13.0.0",
|
|
28
|
-
"@atlaskit/editor-plugin-block-menu": "^11.
|
|
28
|
+
"@atlaskit/editor-plugin-block-menu": "^11.1.0",
|
|
29
29
|
"@atlaskit/editor-plugin-decorations": "^12.0.0",
|
|
30
30
|
"@atlaskit/editor-plugin-editor-disabled": "^12.0.0",
|
|
31
31
|
"@atlaskit/editor-plugin-guideline": "^12.0.0",
|
|
32
|
-
"@atlaskit/editor-plugin-interaction": "^
|
|
32
|
+
"@atlaskit/editor-plugin-interaction": "^22.0.0",
|
|
33
33
|
"@atlaskit/editor-plugin-selection": "^12.0.0",
|
|
34
34
|
"@atlaskit/editor-plugin-toolbar": "^9.0.0",
|
|
35
35
|
"@atlaskit/editor-plugin-ui-control-registry": "^6.0.0",
|
|
@@ -40,16 +40,16 @@
|
|
|
40
40
|
"@atlaskit/editor-toolbar": "^2.0.0",
|
|
41
41
|
"@atlaskit/editor-ui-control-model": "^2.0.0",
|
|
42
42
|
"@atlaskit/icon": "^36.0.0",
|
|
43
|
-
"@atlaskit/icon-lab": "^7.
|
|
43
|
+
"@atlaskit/icon-lab": "^7.1.0",
|
|
44
44
|
"@atlaskit/platform-feature-flags": "^2.0.0",
|
|
45
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
46
|
-
"@atlaskit/tokens": "^
|
|
45
|
+
"@atlaskit/tmp-editor-statsig": "^110.0.0",
|
|
46
|
+
"@atlaskit/tokens": "^15.0.0",
|
|
47
47
|
"@babel/runtime": "^7.0.0",
|
|
48
48
|
"@emotion/react": "^11.7.1",
|
|
49
49
|
"bind-event-listener": "^3.0.0"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
|
-
"@atlaskit/editor-common": "^116.
|
|
52
|
+
"@atlaskit/editor-common": "^116.11.0",
|
|
53
53
|
"react": "^18.2.0",
|
|
54
54
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|
|
55
55
|
},
|
|
@@ -113,6 +113,6 @@
|
|
|
113
113
|
},
|
|
114
114
|
"devDependencies": {
|
|
115
115
|
"react": "^18.2.0",
|
|
116
|
-
"react-intl": "^
|
|
116
|
+
"react-intl": "^7.0.0"
|
|
117
117
|
}
|
|
118
118
|
}
|