@atlaskit/editor-plugin-table 15.1.4 → 15.2.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 +13 -0
- package/dist/cjs/nodeviews/TableContainer.js +6 -1
- package/dist/cjs/nodeviews/toDOM.js +4 -1
- package/dist/es2019/nodeviews/TableContainer.js +6 -1
- package/dist/es2019/nodeviews/toDOM.js +4 -1
- package/dist/esm/nodeviews/TableContainer.js +6 -1
- package/dist/esm/nodeviews/toDOM.js +4 -1
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-table
|
|
2
2
|
|
|
3
|
+
## 15.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`5167552fe1a93`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5167552fe1a93) -
|
|
8
|
+
[EDITOR-2339] Bump @atlaskit/adf-schema to 51.3.0
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- [`fbecd9bc5082c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/fbecd9bc5082c) -
|
|
13
|
+
fix a bug that caused column not resized in non-resizable table
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
|
|
3
16
|
## 15.1.4
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
|
@@ -523,6 +523,7 @@ var ResizableTableContainer = exports.ResizableTableContainer = (0, _platformFea
|
|
|
523
523
|
return (0, _expValEquals.expValEquals)('platform_editor_tables_scaling_css', 'isEnabled', true);
|
|
524
524
|
}, ResizableTableContainerNext, ResizableTableContainerLegacy);
|
|
525
525
|
var TableContainer = exports.TableContainer = function TableContainer(_ref6) {
|
|
526
|
+
var _node$attrs$width;
|
|
526
527
|
var children = _ref6.children,
|
|
527
528
|
node = _ref6.node,
|
|
528
529
|
className = _ref6.className,
|
|
@@ -575,6 +576,8 @@ var TableContainer = exports.TableContainer = function TableContainer(_ref6) {
|
|
|
575
576
|
}
|
|
576
577
|
var _getPluginState = (0, _pluginFactory.getPluginState)(editorView.state),
|
|
577
578
|
isDragAndDropEnabled = _getPluginState.isDragAndDropEnabled;
|
|
579
|
+
var isFullPageAppearance = !isCommentEditor && !isChromelessEditor;
|
|
580
|
+
var resizableTableWidth = (0, _expValEquals.expValEquals)('platform_editor_tables_scaling_css', 'isEnabled', true) ? isFullPageAppearance ? (0, _misc.getTableResizerContainerForFullPageWidthInCSS)(node, isTableScalingEnabled) : "calc(100cqw - calc(var(--ak-editor--large-gutter-padding) * 2))" : "min(calc(100cqw - calc(var(--ak-editor--large-gutter-padding) * 2)), ".concat((_node$attrs$width = node.attrs.width) !== null && _node$attrs$width !== void 0 ? _node$attrs$width : '100%', ")");
|
|
578
581
|
return /*#__PURE__*/_react.default.createElement(InnerContainer, {
|
|
579
582
|
node: node
|
|
580
583
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
@@ -585,7 +588,9 @@ var TableContainer = exports.TableContainer = function TableContainer(_ref6) {
|
|
|
585
588
|
style: {
|
|
586
589
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
587
590
|
width: 'inherit',
|
|
588
|
-
marginLeft: isChromelessEditor ? 18 : undefined
|
|
591
|
+
marginLeft: isChromelessEditor ? 18 : undefined,
|
|
592
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
593
|
+
'--ak-editor-table-width': resizableTableWidth
|
|
589
594
|
}
|
|
590
595
|
}, children);
|
|
591
596
|
};
|
|
@@ -115,7 +115,10 @@ var tableNodeSpecWithFixedToDOM = exports.tableNodeSpecWithFixedToDOM = function
|
|
|
115
115
|
if (!config.tableResizingEnabled || (0, _expValEquals.expValEquals)('platform_editor_tables_scaling_css', 'isEnabled', true) && config.isNested) {
|
|
116
116
|
return ['div', {
|
|
117
117
|
class: 'tableView-content-wrap',
|
|
118
|
-
'data-prosemirror-initial-toDOM-render': 'true'
|
|
118
|
+
'data-prosemirror-initial-toDOM-render': 'true',
|
|
119
|
+
style: (0, _lazyNodeView.convertToInlineCss)({
|
|
120
|
+
'--ak-editor-table-width': resizableTableWidth
|
|
121
|
+
})
|
|
119
122
|
}, tableContainerDiv];
|
|
120
123
|
}
|
|
121
124
|
var tableResizingDiv = ['div', {
|
|
@@ -537,6 +537,7 @@ export const TableContainer = ({
|
|
|
537
537
|
isCommentEditor,
|
|
538
538
|
isChromelessEditor
|
|
539
539
|
}) => {
|
|
540
|
+
var _node$attrs$width;
|
|
540
541
|
if (isTableResizingEnabled && !isNested) {
|
|
541
542
|
return /*#__PURE__*/React.createElement(ResizableTableContainer
|
|
542
543
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
@@ -569,6 +570,8 @@ export const TableContainer = ({
|
|
|
569
570
|
const {
|
|
570
571
|
isDragAndDropEnabled
|
|
571
572
|
} = getPluginState(editorView.state);
|
|
573
|
+
const isFullPageAppearance = !isCommentEditor && !isChromelessEditor;
|
|
574
|
+
const resizableTableWidth = expValEquals('platform_editor_tables_scaling_css', 'isEnabled', true) ? isFullPageAppearance ? getTableResizerContainerForFullPageWidthInCSS(node, isTableScalingEnabled) : `calc(100cqw - calc(var(--ak-editor--large-gutter-padding) * 2))` : `min(calc(100cqw - calc(var(--ak-editor--large-gutter-padding) * 2)), ${(_node$attrs$width = node.attrs.width) !== null && _node$attrs$width !== void 0 ? _node$attrs$width : '100%'})`;
|
|
572
575
|
return /*#__PURE__*/React.createElement(InnerContainer, {
|
|
573
576
|
node: node
|
|
574
577
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
@@ -579,7 +582,9 @@ export const TableContainer = ({
|
|
|
579
582
|
style: {
|
|
580
583
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
581
584
|
width: 'inherit',
|
|
582
|
-
marginLeft: isChromelessEditor ? 18 : undefined
|
|
585
|
+
marginLeft: isChromelessEditor ? 18 : undefined,
|
|
586
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
587
|
+
'--ak-editor-table-width': resizableTableWidth
|
|
583
588
|
}
|
|
584
589
|
}, children);
|
|
585
590
|
};
|
|
@@ -100,7 +100,10 @@ export const tableNodeSpecWithFixedToDOM = config => {
|
|
|
100
100
|
if (!config.tableResizingEnabled || expValEquals('platform_editor_tables_scaling_css', 'isEnabled', true) && config.isNested) {
|
|
101
101
|
return ['div', {
|
|
102
102
|
class: 'tableView-content-wrap',
|
|
103
|
-
'data-prosemirror-initial-toDOM-render': 'true'
|
|
103
|
+
'data-prosemirror-initial-toDOM-render': 'true',
|
|
104
|
+
style: convertToInlineCss({
|
|
105
|
+
'--ak-editor-table-width': resizableTableWidth
|
|
106
|
+
})
|
|
104
107
|
}, tableContainerDiv];
|
|
105
108
|
}
|
|
106
109
|
const tableResizingDiv = ['div', {
|
|
@@ -514,6 +514,7 @@ export var ResizableTableContainer = componentWithCondition(function () {
|
|
|
514
514
|
return expValEquals('platform_editor_tables_scaling_css', 'isEnabled', true);
|
|
515
515
|
}, ResizableTableContainerNext, ResizableTableContainerLegacy);
|
|
516
516
|
export var TableContainer = function TableContainer(_ref6) {
|
|
517
|
+
var _node$attrs$width;
|
|
517
518
|
var children = _ref6.children,
|
|
518
519
|
node = _ref6.node,
|
|
519
520
|
className = _ref6.className,
|
|
@@ -566,6 +567,8 @@ export var TableContainer = function TableContainer(_ref6) {
|
|
|
566
567
|
}
|
|
567
568
|
var _getPluginState = getPluginState(editorView.state),
|
|
568
569
|
isDragAndDropEnabled = _getPluginState.isDragAndDropEnabled;
|
|
570
|
+
var isFullPageAppearance = !isCommentEditor && !isChromelessEditor;
|
|
571
|
+
var resizableTableWidth = expValEquals('platform_editor_tables_scaling_css', 'isEnabled', true) ? isFullPageAppearance ? getTableResizerContainerForFullPageWidthInCSS(node, isTableScalingEnabled) : "calc(100cqw - calc(var(--ak-editor--large-gutter-padding) * 2))" : "min(calc(100cqw - calc(var(--ak-editor--large-gutter-padding) * 2)), ".concat((_node$attrs$width = node.attrs.width) !== null && _node$attrs$width !== void 0 ? _node$attrs$width : '100%', ")");
|
|
569
572
|
return /*#__PURE__*/React.createElement(InnerContainer, {
|
|
570
573
|
node: node
|
|
571
574
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
@@ -576,7 +579,9 @@ export var TableContainer = function TableContainer(_ref6) {
|
|
|
576
579
|
style: {
|
|
577
580
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
578
581
|
width: 'inherit',
|
|
579
|
-
marginLeft: isChromelessEditor ? 18 : undefined
|
|
582
|
+
marginLeft: isChromelessEditor ? 18 : undefined,
|
|
583
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
584
|
+
'--ak-editor-table-width': resizableTableWidth
|
|
580
585
|
}
|
|
581
586
|
}, children);
|
|
582
587
|
};
|
|
@@ -108,7 +108,10 @@ export var tableNodeSpecWithFixedToDOM = function tableNodeSpecWithFixedToDOM(co
|
|
|
108
108
|
if (!config.tableResizingEnabled || expValEquals('platform_editor_tables_scaling_css', 'isEnabled', true) && config.isNested) {
|
|
109
109
|
return ['div', {
|
|
110
110
|
class: 'tableView-content-wrap',
|
|
111
|
-
'data-prosemirror-initial-toDOM-render': 'true'
|
|
111
|
+
'data-prosemirror-initial-toDOM-render': 'true',
|
|
112
|
+
style: convertToInlineCss({
|
|
113
|
+
'--ak-editor-table-width': resizableTableWidth
|
|
114
|
+
})
|
|
112
115
|
}, tableContainerDiv];
|
|
113
116
|
}
|
|
114
117
|
var tableResizingDiv = ['div', {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-table",
|
|
3
|
-
"version": "15.
|
|
3
|
+
"version": "15.2.0",
|
|
4
4
|
"description": "Table plugin for the @atlaskit/editor",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -28,16 +28,16 @@
|
|
|
28
28
|
"singleton": true
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@atlaskit/adf-schema": "^51.
|
|
31
|
+
"@atlaskit/adf-schema": "^51.3.0",
|
|
32
32
|
"@atlaskit/button": "^23.5.0",
|
|
33
|
-
"@atlaskit/custom-steps": "^0.
|
|
33
|
+
"@atlaskit/custom-steps": "^0.16.0",
|
|
34
34
|
"@atlaskit/editor-palette": "^2.1.0",
|
|
35
35
|
"@atlaskit/editor-plugin-accessibility-utils": "^6.0.0",
|
|
36
|
-
"@atlaskit/editor-plugin-analytics": "^6.
|
|
37
|
-
"@atlaskit/editor-plugin-batch-attribute-updates": "^6.
|
|
36
|
+
"@atlaskit/editor-plugin-analytics": "^6.2.0",
|
|
37
|
+
"@atlaskit/editor-plugin-batch-attribute-updates": "^6.1.0",
|
|
38
38
|
"@atlaskit/editor-plugin-content-insertion": "^6.0.0",
|
|
39
39
|
"@atlaskit/editor-plugin-editor-viewmode": "^8.0.0",
|
|
40
|
-
"@atlaskit/editor-plugin-extension": "9.0
|
|
40
|
+
"@atlaskit/editor-plugin-extension": "9.1.0",
|
|
41
41
|
"@atlaskit/editor-plugin-guideline": "^6.0.0",
|
|
42
42
|
"@atlaskit/editor-plugin-interaction": "^9.0.0",
|
|
43
43
|
"@atlaskit/editor-plugin-limited-mode": "^3.0.0",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"@atlaskit/pragmatic-drag-and-drop": "^1.7.0",
|
|
57
57
|
"@atlaskit/pragmatic-drag-and-drop-auto-scroll": "^2.1.0",
|
|
58
58
|
"@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.1.0",
|
|
59
|
-
"@atlaskit/primitives": "^
|
|
59
|
+
"@atlaskit/primitives": "^16.0.0",
|
|
60
60
|
"@atlaskit/react-ufo": "^4.12.0",
|
|
61
61
|
"@atlaskit/theme": "^21.0.0",
|
|
62
62
|
"@atlaskit/tmp-editor-statsig": "^13.13.0",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"uuid": "^3.1.0"
|
|
73
73
|
},
|
|
74
74
|
"peerDependencies": {
|
|
75
|
-
"@atlaskit/editor-common": "^110.
|
|
75
|
+
"@atlaskit/editor-common": "^110.14.0",
|
|
76
76
|
"react": "^18.2.0",
|
|
77
77
|
"react-dom": "^18.2.0",
|
|
78
78
|
"react-intl-next": "npm:react-intl@^5.18.1"
|