@atlaskit/editor-plugin-panel 4.3.1 → 4.3.3
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 +18 -0
- package/dist/cjs/pm-plugins/utils/utils.js +7 -2
- package/dist/cjs/ui/toolbar.js +4 -4
- package/dist/es2019/pm-plugins/utils/utils.js +9 -2
- package/dist/es2019/ui/toolbar.js +4 -4
- package/dist/esm/pm-plugins/utils/utils.js +7 -2
- package/dist/esm/ui/toolbar.js +4 -4
- package/package.json +8 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-panel
|
|
2
2
|
|
|
3
|
+
## 4.3.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#136524](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/136524)
|
|
8
|
+
[`d70621353e0f7`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d70621353e0f7) -
|
|
9
|
+
[ux] [EDITOR-266] Fix nested panel icon colours in LCM
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 4.3.2
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [#135586](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/135586)
|
|
17
|
+
[`3aeba66081612`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3aeba66081612) -
|
|
18
|
+
ED-26593 Add missing i18n for editor control
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
3
21
|
## 4.3.1
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -11,6 +11,7 @@ var _panel = require("@atlaskit/editor-common/panel");
|
|
|
11
11
|
var _editorPalette = require("@atlaskit/editor-palette");
|
|
12
12
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
13
13
|
var _utils = require("@atlaskit/editor-prosemirror/utils");
|
|
14
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
14
15
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
15
16
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
16
17
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -42,9 +43,13 @@ var panelAttrsToDom = exports.panelAttrsToDom = function panelAttrsToDom(attrs,
|
|
|
42
43
|
'data-panel-icon-text': panelIconText
|
|
43
44
|
});
|
|
44
45
|
}
|
|
45
|
-
var iconDiv = ['div',
|
|
46
|
+
var iconDiv = ['div', // EDITOR-266 This fixes an issue in LCM where if you have nested panels
|
|
47
|
+
// The icon colour will be overriden by the parent panel style, this is used to create a more specefic css selector
|
|
48
|
+
_objectSpread({
|
|
46
49
|
class: _panel.PanelSharedCssClassName.icon
|
|
47
|
-
}
|
|
50
|
+
}, (0, _platformFeatureFlags.fg)('platform_editor_lcm_nested_panel_icon_fix') ? {
|
|
51
|
+
'data-panel-type': panelType || _adfSchema.PanelType.INFO
|
|
52
|
+
} : {})];
|
|
48
53
|
var contentDiv = ['div', {
|
|
49
54
|
class: _panel.PanelSharedCssClassName.content
|
|
50
55
|
}, 0];
|
package/dist/cjs/ui/toolbar.js
CHANGED
|
@@ -300,7 +300,7 @@ var getToolbarItems = exports.getToolbarItems = function getToolbarItems(formatM
|
|
|
300
300
|
}, {
|
|
301
301
|
type: 'overflow-dropdown',
|
|
302
302
|
options: [_objectSpread({
|
|
303
|
-
title:
|
|
303
|
+
title: formatMessage(_messages.default.copyToClipboard),
|
|
304
304
|
onClick: function onClick() {
|
|
305
305
|
var _api$core, _api$floatingToolbar;
|
|
306
306
|
api === null || api === void 0 || (_api$core = api.core) === null || _api$core === void 0 || _api$core.actions.execute( // @ts-ignore
|
|
@@ -308,13 +308,13 @@ var getToolbarItems = exports.getToolbarItems = function getToolbarItems(formatM
|
|
|
308
308
|
return true;
|
|
309
309
|
},
|
|
310
310
|
icon: /*#__PURE__*/_react.default.createElement(_copy.default, {
|
|
311
|
-
label: "
|
|
311
|
+
label: ""
|
|
312
312
|
})
|
|
313
313
|
}, hoverDecorationProps(panelNodeType, _editorSharedStyles.akEditorSelectedNodeClassName)), _objectSpread({
|
|
314
|
-
title:
|
|
314
|
+
title: formatMessage(_messages.default.delete),
|
|
315
315
|
onClick: (0, _actions.removePanel)(editorAnalyticsAPI),
|
|
316
316
|
icon: /*#__PURE__*/_react.default.createElement(_delete.default, {
|
|
317
|
-
label: "
|
|
317
|
+
label: ""
|
|
318
318
|
})
|
|
319
319
|
}, hoverDecorationProps(panelNodeType))]
|
|
320
320
|
}];
|
|
@@ -3,6 +3,7 @@ import { PanelSharedCssClassName } from '@atlaskit/editor-common/panel';
|
|
|
3
3
|
import { hexToEditorBackgroundPaletteColor } from '@atlaskit/editor-palette';
|
|
4
4
|
import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
5
5
|
import { findParentNode, findParentNodeOfType, findSelectedNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
6
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
7
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
7
8
|
export const findPanel = (state, selection) => {
|
|
8
9
|
const {
|
|
@@ -37,8 +38,14 @@ export const panelAttrsToDom = (attrs, allowCustomPanel) => {
|
|
|
37
38
|
'data-panel-icon-text': panelIconText
|
|
38
39
|
};
|
|
39
40
|
}
|
|
40
|
-
const iconDiv = ['div',
|
|
41
|
-
|
|
41
|
+
const iconDiv = ['div',
|
|
42
|
+
// EDITOR-266 This fixes an issue in LCM where if you have nested panels
|
|
43
|
+
// The icon colour will be overriden by the parent panel style, this is used to create a more specefic css selector
|
|
44
|
+
{
|
|
45
|
+
class: PanelSharedCssClassName.icon,
|
|
46
|
+
...(fg('platform_editor_lcm_nested_panel_icon_fix') ? {
|
|
47
|
+
'data-panel-type': panelType || PanelType.INFO
|
|
48
|
+
} : {})
|
|
42
49
|
}];
|
|
43
50
|
const contentDiv = ['div', {
|
|
44
51
|
class: PanelSharedCssClassName.content
|
|
@@ -278,7 +278,7 @@ export const getToolbarItems = (formatMessage, panelNodeType, isCustomPanelEnabl
|
|
|
278
278
|
}, {
|
|
279
279
|
type: 'overflow-dropdown',
|
|
280
280
|
options: [{
|
|
281
|
-
title:
|
|
281
|
+
title: formatMessage(commonMessages.copyToClipboard),
|
|
282
282
|
onClick: () => {
|
|
283
283
|
var _api$core, _api$floatingToolbar;
|
|
284
284
|
api === null || api === void 0 ? void 0 : (_api$core = api.core) === null || _api$core === void 0 ? void 0 : _api$core.actions.execute( // @ts-ignore
|
|
@@ -286,14 +286,14 @@ export const getToolbarItems = (formatMessage, panelNodeType, isCustomPanelEnabl
|
|
|
286
286
|
return true;
|
|
287
287
|
},
|
|
288
288
|
icon: /*#__PURE__*/React.createElement(CopyIcon, {
|
|
289
|
-
label: "
|
|
289
|
+
label: ""
|
|
290
290
|
}),
|
|
291
291
|
...hoverDecorationProps(panelNodeType, akEditorSelectedNodeClassName)
|
|
292
292
|
}, {
|
|
293
|
-
title:
|
|
293
|
+
title: formatMessage(commonMessages.delete),
|
|
294
294
|
onClick: removePanel(editorAnalyticsAPI),
|
|
295
295
|
icon: /*#__PURE__*/React.createElement(DeleteIcon, {
|
|
296
|
-
label: "
|
|
296
|
+
label: ""
|
|
297
297
|
}),
|
|
298
298
|
...hoverDecorationProps(panelNodeType)
|
|
299
299
|
}]
|
|
@@ -6,6 +6,7 @@ import { PanelSharedCssClassName } from '@atlaskit/editor-common/panel';
|
|
|
6
6
|
import { hexToEditorBackgroundPaletteColor } from '@atlaskit/editor-palette';
|
|
7
7
|
import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
8
8
|
import { findParentNode, findParentNodeOfType, findSelectedNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
9
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
10
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
10
11
|
export var findPanel = function findPanel(state, selection) {
|
|
11
12
|
var panel = state.schema.nodes.panel;
|
|
@@ -35,9 +36,13 @@ export var panelAttrsToDom = function panelAttrsToDom(attrs, allowCustomPanel) {
|
|
|
35
36
|
'data-panel-icon-text': panelIconText
|
|
36
37
|
});
|
|
37
38
|
}
|
|
38
|
-
var iconDiv = ['div',
|
|
39
|
+
var iconDiv = ['div', // EDITOR-266 This fixes an issue in LCM where if you have nested panels
|
|
40
|
+
// The icon colour will be overriden by the parent panel style, this is used to create a more specefic css selector
|
|
41
|
+
_objectSpread({
|
|
39
42
|
class: PanelSharedCssClassName.icon
|
|
40
|
-
}
|
|
43
|
+
}, fg('platform_editor_lcm_nested_panel_icon_fix') ? {
|
|
44
|
+
'data-panel-type': panelType || PanelType.INFO
|
|
45
|
+
} : {})];
|
|
41
46
|
var contentDiv = ['div', {
|
|
42
47
|
class: PanelSharedCssClassName.content
|
|
43
48
|
}, 0];
|
package/dist/esm/ui/toolbar.js
CHANGED
|
@@ -290,7 +290,7 @@ export var getToolbarItems = function getToolbarItems(formatMessage, panelNodeTy
|
|
|
290
290
|
}, {
|
|
291
291
|
type: 'overflow-dropdown',
|
|
292
292
|
options: [_objectSpread({
|
|
293
|
-
title:
|
|
293
|
+
title: formatMessage(commonMessages.copyToClipboard),
|
|
294
294
|
onClick: function onClick() {
|
|
295
295
|
var _api$core, _api$floatingToolbar;
|
|
296
296
|
api === null || api === void 0 || (_api$core = api.core) === null || _api$core === void 0 || _api$core.actions.execute( // @ts-ignore
|
|
@@ -298,13 +298,13 @@ export var getToolbarItems = function getToolbarItems(formatMessage, panelNodeTy
|
|
|
298
298
|
return true;
|
|
299
299
|
},
|
|
300
300
|
icon: /*#__PURE__*/React.createElement(CopyIcon, {
|
|
301
|
-
label: "
|
|
301
|
+
label: ""
|
|
302
302
|
})
|
|
303
303
|
}, hoverDecorationProps(panelNodeType, akEditorSelectedNodeClassName)), _objectSpread({
|
|
304
|
-
title:
|
|
304
|
+
title: formatMessage(commonMessages.delete),
|
|
305
305
|
onClick: removePanel(editorAnalyticsAPI),
|
|
306
306
|
icon: /*#__PURE__*/React.createElement(DeleteIcon, {
|
|
307
|
-
label: "
|
|
307
|
+
label: ""
|
|
308
308
|
})
|
|
309
309
|
}, hoverDecorationProps(panelNodeType))]
|
|
310
310
|
}];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-panel",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.3",
|
|
4
4
|
"description": "Panel plugin for @atlaskit/editor-core.",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -32,19 +32,19 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@atlaskit/adf-schema": "^47.6.0",
|
|
35
|
-
"@atlaskit/editor-common": "^102.
|
|
35
|
+
"@atlaskit/editor-common": "^102.18.0",
|
|
36
36
|
"@atlaskit/editor-palette": "^2.1.0",
|
|
37
37
|
"@atlaskit/editor-plugin-analytics": "^2.2.0",
|
|
38
38
|
"@atlaskit/editor-plugin-decorations": "^2.0.0",
|
|
39
|
-
"@atlaskit/editor-plugin-emoji": "^3.
|
|
39
|
+
"@atlaskit/editor-plugin-emoji": "^3.5.0",
|
|
40
40
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
41
41
|
"@atlaskit/editor-shared-styles": "^3.4.0",
|
|
42
42
|
"@atlaskit/emoji": "^69.0.0",
|
|
43
|
-
"@atlaskit/icon": "^25.
|
|
43
|
+
"@atlaskit/icon": "^25.5.0",
|
|
44
44
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
45
45
|
"@atlaskit/theme": "^18.0.0",
|
|
46
46
|
"@atlaskit/tmp-editor-statsig": "^4.6.0",
|
|
47
|
-
"@atlaskit/tokens": "^4.
|
|
47
|
+
"@atlaskit/tokens": "^4.6.0",
|
|
48
48
|
"@babel/runtime": "^7.0.0",
|
|
49
49
|
"uuid": "^3.1.0"
|
|
50
50
|
},
|
|
@@ -98,6 +98,9 @@
|
|
|
98
98
|
},
|
|
99
99
|
"platform_editor_controls_patch_1": {
|
|
100
100
|
"type": "boolean"
|
|
101
|
+
},
|
|
102
|
+
"platform_editor_lcm_nested_panel_icon_fix": {
|
|
103
|
+
"type": "boolean"
|
|
101
104
|
}
|
|
102
105
|
},
|
|
103
106
|
"stricter": {
|