@atlaskit/editor-plugin-table 7.3.11 → 7.4.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 +6 -0
- package/dist/cjs/ui/FloatingContextualMenu/ContextualMenu.js +2 -2
- package/dist/es2019/ui/FloatingContextualMenu/ContextualMenu.js +2 -2
- package/dist/esm/ui/FloatingContextualMenu/ContextualMenu.js +2 -2
- package/package.json +2 -2
- package/src/ui/FloatingContextualMenu/ContextualMenu.tsx +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-table
|
|
2
2
|
|
|
3
|
+
## 7.4.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#75678](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/75678) [`fdcbedeb3cab`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/fdcbedeb3cab) - [ux] Fix cell solour menu button to display selected state colour
|
|
8
|
+
|
|
3
9
|
## 7.3.11
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -81,7 +81,7 @@ var ContextualMenu = exports.ContextualMenu = /*#__PURE__*/function (_Component)
|
|
|
81
81
|
targetCellPosition = _getPluginState.targetCellPosition,
|
|
82
82
|
isDragAndDropEnabled = _getPluginState.isDragAndDropEnabled;
|
|
83
83
|
if (allowBackgroundColor) {
|
|
84
|
-
var _node$attrs;
|
|
84
|
+
var _node$attrs, _node$attrs2;
|
|
85
85
|
var node = isOpen && targetCellPosition ? state.doc.nodeAt(targetCellPosition) : null;
|
|
86
86
|
var background = (0, _editorPalette.hexToEditorBackgroundPaletteColor)((node === null || node === void 0 || (_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.background) || '#ffffff');
|
|
87
87
|
return {
|
|
@@ -106,7 +106,7 @@ var ContextualMenu = exports.ContextualMenu = /*#__PURE__*/function (_Component)
|
|
|
106
106
|
}, (0, _react2.jsx)(_uiColor.ColorPalette, {
|
|
107
107
|
cols: 7,
|
|
108
108
|
onClick: _this.setColor,
|
|
109
|
-
selectedColor: background,
|
|
109
|
+
selectedColor: (node === null || node === void 0 || (_node$attrs2 = node.attrs) === null || _node$attrs2 === void 0 ? void 0 : _node$attrs2.background) || '#ffffff',
|
|
110
110
|
paletteOptions: {
|
|
111
111
|
palette: _uiColor.cellBackgroundColorPalette,
|
|
112
112
|
paletteColorTooltipMessages: _uiColor.backgroundPaletteTooltipMessages,
|
|
@@ -66,7 +66,7 @@ export class ContextualMenu extends Component {
|
|
|
66
66
|
isDragAndDropEnabled
|
|
67
67
|
} = getPluginState(editorView.state);
|
|
68
68
|
if (allowBackgroundColor) {
|
|
69
|
-
var _node$attrs;
|
|
69
|
+
var _node$attrs, _node$attrs2;
|
|
70
70
|
const node = isOpen && targetCellPosition ? state.doc.nodeAt(targetCellPosition) : null;
|
|
71
71
|
const background = hexToEditorBackgroundPaletteColor((node === null || node === void 0 ? void 0 : (_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.background) || '#ffffff');
|
|
72
72
|
return {
|
|
@@ -91,7 +91,7 @@ export class ContextualMenu extends Component {
|
|
|
91
91
|
}, jsx(ColorPalette, {
|
|
92
92
|
cols: 7,
|
|
93
93
|
onClick: this.setColor,
|
|
94
|
-
selectedColor: background,
|
|
94
|
+
selectedColor: (node === null || node === void 0 ? void 0 : (_node$attrs2 = node.attrs) === null || _node$attrs2 === void 0 ? void 0 : _node$attrs2.background) || '#ffffff',
|
|
95
95
|
paletteOptions: {
|
|
96
96
|
palette: cellBackgroundColorPalette,
|
|
97
97
|
paletteColorTooltipMessages: backgroundPaletteTooltipMessages,
|
|
@@ -76,7 +76,7 @@ export var ContextualMenu = /*#__PURE__*/function (_Component) {
|
|
|
76
76
|
targetCellPosition = _getPluginState.targetCellPosition,
|
|
77
77
|
isDragAndDropEnabled = _getPluginState.isDragAndDropEnabled;
|
|
78
78
|
if (allowBackgroundColor) {
|
|
79
|
-
var _node$attrs;
|
|
79
|
+
var _node$attrs, _node$attrs2;
|
|
80
80
|
var node = isOpen && targetCellPosition ? state.doc.nodeAt(targetCellPosition) : null;
|
|
81
81
|
var background = hexToEditorBackgroundPaletteColor((node === null || node === void 0 || (_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.background) || '#ffffff');
|
|
82
82
|
return {
|
|
@@ -101,7 +101,7 @@ export var ContextualMenu = /*#__PURE__*/function (_Component) {
|
|
|
101
101
|
}, jsx(ColorPalette, {
|
|
102
102
|
cols: 7,
|
|
103
103
|
onClick: _this.setColor,
|
|
104
|
-
selectedColor: background,
|
|
104
|
+
selectedColor: (node === null || node === void 0 || (_node$attrs2 = node.attrs) === null || _node$attrs2 === void 0 ? void 0 : _node$attrs2.background) || '#ffffff',
|
|
105
105
|
paletteOptions: {
|
|
106
106
|
palette: cellBackgroundColorPalette,
|
|
107
107
|
paletteColorTooltipMessages: backgroundPaletteTooltipMessages,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-table",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.4.0",
|
|
4
4
|
"description": "Table plugin for the @atlaskit/editor",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@atlaskit/adf-schema": "^35.5.1",
|
|
32
32
|
"@atlaskit/custom-steps": "^0.0.13",
|
|
33
|
-
"@atlaskit/editor-common": "^78.
|
|
33
|
+
"@atlaskit/editor-common": "^78.6.0",
|
|
34
34
|
"@atlaskit/editor-palette": "1.5.2",
|
|
35
35
|
"@atlaskit/editor-plugin-analytics": "^1.0.0",
|
|
36
36
|
"@atlaskit/editor-plugin-content-insertion": "^1.0.0",
|
|
@@ -245,7 +245,7 @@ export class ContextualMenu extends Component<
|
|
|
245
245
|
<ColorPalette
|
|
246
246
|
cols={7}
|
|
247
247
|
onClick={this.setColor}
|
|
248
|
-
selectedColor={background}
|
|
248
|
+
selectedColor={node?.attrs?.background || '#ffffff'}
|
|
249
249
|
paletteOptions={{
|
|
250
250
|
palette: cellBackgroundColorPalette,
|
|
251
251
|
paletteColorTooltipMessages:
|