@atlaskit/editor-plugin-table 26.1.0 → 26.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/compass.yml +3 -3
- package/dist/cjs/nodeviews/TableSSRReactContextsProvider.js +1 -1
- package/dist/cjs/nodeviews/table.js +3 -4
- package/dist/cjs/nodeviews/toDOM.js +2 -3
- package/dist/cjs/pm-plugins/main.js +1 -1
- package/dist/cjs/pm-plugins/table-resizing/utils/colgroup.js +1 -2
- package/dist/es2019/nodeviews/TableSSRReactContextsProvider.js +2 -2
- package/dist/es2019/nodeviews/table.js +3 -4
- package/dist/es2019/nodeviews/toDOM.js +2 -3
- package/dist/es2019/pm-plugins/main.js +2 -2
- package/dist/es2019/pm-plugins/table-resizing/utils/colgroup.js +1 -2
- package/dist/esm/nodeviews/TableSSRReactContextsProvider.js +2 -2
- package/dist/esm/nodeviews/table.js +3 -4
- package/dist/esm/nodeviews/toDOM.js +2 -3
- package/dist/esm/pm-plugins/main.js +2 -2
- package/dist/esm/pm-plugins/table-resizing/utils/colgroup.js +1 -2
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-table
|
|
2
2
|
|
|
3
|
+
## 26.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`da5eaf0bc37da`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/da5eaf0bc37da) -
|
|
8
|
+
Clean up the platform_editor_editor_ssr_streaming experiment. The SSR streaming code paths are now
|
|
9
|
+
permanent and the isSSRStreaming() utility has been removed from
|
|
10
|
+
@atlaskit/editor-common/core-utils.
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
|
|
3
16
|
## 26.1.0
|
|
4
17
|
|
|
5
18
|
### Minor Changes
|
package/compass.yml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
configVersion: 1
|
|
2
2
|
id: ari:cloud:compass:a436116f-02ce-4520-8fbb-7301462a1674:component/c5751cc6-3513-4070-9deb-af31e86aed34/9be4f6fa-1e46-4040-9a16-090520d0a5db
|
|
3
3
|
name: '@atlaskit/editor-plugin-table'
|
|
4
|
-
ownerId: ari:cloud:identity::team/
|
|
4
|
+
ownerId: ari:cloud:identity::team/cf6a670b-5252-4c68-a769-9207de366beb # Editor Developers
|
|
5
5
|
labels:
|
|
6
6
|
- platform-code
|
|
7
7
|
- platform-afm
|
|
@@ -16,14 +16,14 @@ links:
|
|
|
16
16
|
url: https://bitbucket.org/atlassian/atlassian-frontend-monorepo/src/master
|
|
17
17
|
- name: Slack Channel
|
|
18
18
|
type: CHAT_CHANNEL
|
|
19
|
-
url: https://atlassian.enterprise.slack.com/archives/
|
|
19
|
+
url: https://atlassian.enterprise.slack.com/archives/CFG3PSQ9E # #help-editor
|
|
20
20
|
- name: Editor Plugin Table
|
|
21
21
|
type: REPOSITORY
|
|
22
22
|
url: https://bitbucket.org/atlassian/atlassian-frontend-monorepo/src/master/platform/packages/editor/editor-plugin-table
|
|
23
23
|
customFields:
|
|
24
24
|
- name: Department
|
|
25
25
|
type: text
|
|
26
|
-
value:
|
|
26
|
+
value: Editor Developers
|
|
27
27
|
- name: Trusted Reviewer Teams
|
|
28
28
|
type: text
|
|
29
29
|
value: ari:cloud:identity::team/cf6a670b-5252-4c68-a769-9207de366beb
|
|
@@ -11,7 +11,7 @@ var _coreUtils = require("@atlaskit/editor-common/core-utils");
|
|
|
11
11
|
function TableSSRReactContextsProvider(_ref) {
|
|
12
12
|
var children = _ref.children,
|
|
13
13
|
intl = _ref.intl;
|
|
14
|
-
if (!(0, _coreUtils.isSSR)()
|
|
14
|
+
if (!(0, _coreUtils.isSSR)()) {
|
|
15
15
|
return children;
|
|
16
16
|
}
|
|
17
17
|
if (!intl) {
|
|
@@ -14,7 +14,6 @@ var _get2 = _interopRequireDefault(require("@babel/runtime/helpers/get"));
|
|
|
14
14
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
15
15
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
16
16
|
var _react = _interopRequireDefault(require("react"));
|
|
17
|
-
var _coreUtils = require("@atlaskit/editor-common/core-utils");
|
|
18
17
|
var _nodeWidth = require("@atlaskit/editor-common/node-width");
|
|
19
18
|
var _reactNodeView = _interopRequireDefault(require("@atlaskit/editor-common/react-node-view"));
|
|
20
19
|
var _table = require("@atlaskit/editor-common/table");
|
|
@@ -178,11 +177,11 @@ var TableView = exports.default = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
178
177
|
}
|
|
179
178
|
|
|
180
179
|
// Remove the ProseMirror table DOM structure to avoid duplication, as it's replaced with the React table node.
|
|
181
|
-
// In SSR
|
|
180
|
+
// In SSR the portal renders via `container.innerHTML = html` (portal/common.tsx), which detaches
|
|
182
181
|
// `renderedDOM` from `dom` before this runs; require it to still be a child so `removeChild` doesn't throw
|
|
183
182
|
// `NotFoundError` (which would make EditorSSRRenderer fall back to the position-blind schema toDOM and lose
|
|
184
|
-
// nested detection).
|
|
185
|
-
if (this.dom && this.renderedDOM &&
|
|
183
|
+
// nested detection).
|
|
184
|
+
if (this.dom && this.renderedDOM && this.renderedDOM.parentNode === this.dom) {
|
|
186
185
|
this.dom.removeChild(this.renderedDOM);
|
|
187
186
|
}
|
|
188
187
|
// Move the table from the ProseMirror table structure into the React rendered table node.
|
|
@@ -11,7 +11,6 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
11
11
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
12
12
|
var _kebabCase = _interopRequireDefault(require("lodash/kebabCase"));
|
|
13
13
|
var _adfSchema = require("@atlaskit/adf-schema");
|
|
14
|
-
var _coreUtils = require("@atlaskit/editor-common/core-utils");
|
|
15
14
|
var _lazyNodeView = require("@atlaskit/editor-common/lazy-node-view");
|
|
16
15
|
var _table = require("@atlaskit/editor-common/table");
|
|
17
16
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
@@ -102,7 +101,7 @@ var tableNodeSpecWithFixedToDOM = exports.tableNodeSpecWithFixedToDOM = function
|
|
|
102
101
|
}].concat(roundedTableCornerMasks, [['table', attrs, colgroup, ['tbody', 0]]])].concat(overflowShadows, [['div', {
|
|
103
102
|
class: 'pm-table-sticky-sentinel-bottom',
|
|
104
103
|
'data-testid': 'sticky-sentinel-bottom'
|
|
105
|
-
}]
|
|
104
|
+
}], ['div', {
|
|
106
105
|
contenteditable: 'false',
|
|
107
106
|
class: 'pm-table-left-border',
|
|
108
107
|
'data-with-numbered-table': node.attrs.isNumberColumnEnabled,
|
|
@@ -111,7 +110,7 @@ var tableNodeSpecWithFixedToDOM = exports.tableNodeSpecWithFixedToDOM = function
|
|
|
111
110
|
contenteditable: 'false',
|
|
112
111
|
class: 'pm-table-right-border',
|
|
113
112
|
'data-testid': 'table-right-border'
|
|
114
|
-
}]]
|
|
113
|
+
}]]);
|
|
115
114
|
if (!config.tableResizingEnabled || config.isNested) {
|
|
116
115
|
return ['div', {
|
|
117
116
|
class: 'tableView-content-wrap',
|
|
@@ -68,7 +68,7 @@ var createPlugin = exports.createPlugin = function createPlugin(dispatchAnalytic
|
|
|
68
68
|
}
|
|
69
69
|
return editorView.state;
|
|
70
70
|
};
|
|
71
|
-
var intl =
|
|
71
|
+
var intl = getIntl();
|
|
72
72
|
var getNodeView = function getNodeView() {
|
|
73
73
|
return {
|
|
74
74
|
table: (0, _tableNodeViews.tableView)({
|
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.isMinCellWidthTable = exports.insertColgroupFromNode = exports.hasTableColumnBeenResized = exports.hasTableBeenResized = exports.getResizerMinWidth = exports.getColgroupChildrenLength = exports.getColWidthFix = exports.generateColgroupFromNode = exports.generateColgroup = void 0;
|
|
8
8
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
9
|
-
var _coreUtils = require("@atlaskit/editor-common/core-utils");
|
|
10
9
|
var _styles = require("@atlaskit/editor-common/styles");
|
|
11
10
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
12
11
|
var _model = require("@atlaskit/editor-prosemirror/model");
|
|
@@ -33,7 +32,7 @@ var generateColStyle = function generateColStyle(fixedColWidth, tableWidth, isCo
|
|
|
33
32
|
if (hasTableBeenResized) {
|
|
34
33
|
return "width: max(".concat(fixedColWidth, "px, ").concat(_styles.tableCellMinWidth, "px)");
|
|
35
34
|
}
|
|
36
|
-
return
|
|
35
|
+
return "width: ".concat(_styles.tableCellMinWidth, "px");
|
|
37
36
|
}
|
|
38
37
|
if (isFullPageEditor || !isFullPageEditor && isTableHasWidth) {
|
|
39
38
|
var scaledPercent = isNumberColumnEnabled ? "calc(calc(var(--ak-editor-table-width) - ".concat(_editorSharedStyles.akEditorTableNumberColumnWidth, "px - 1px)/").concat(tableWidth, ")") : "calc(calc(var(--ak-editor-table-width) - 1px)/".concat(tableWidth, ")");
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { RawIntlProvider } from 'react-intl';
|
|
3
|
-
import { isSSR
|
|
3
|
+
import { isSSR } from '@atlaskit/editor-common/core-utils';
|
|
4
4
|
export function TableSSRReactContextsProvider({
|
|
5
5
|
children,
|
|
6
6
|
intl
|
|
7
7
|
}) {
|
|
8
|
-
if (!isSSR()
|
|
8
|
+
if (!isSSR()) {
|
|
9
9
|
return children;
|
|
10
10
|
}
|
|
11
11
|
if (!intl) {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { isSSRStreaming } from '@atlaskit/editor-common/core-utils';
|
|
4
3
|
import { getTableContainerWidth } from '@atlaskit/editor-common/node-width';
|
|
5
4
|
import ReactNodeView from '@atlaskit/editor-common/react-node-view';
|
|
6
5
|
import { isTableInContentMode } from '@atlaskit/editor-common/table';
|
|
@@ -150,11 +149,11 @@ export default class TableView extends ReactNodeView {
|
|
|
150
149
|
}
|
|
151
150
|
|
|
152
151
|
// Remove the ProseMirror table DOM structure to avoid duplication, as it's replaced with the React table node.
|
|
153
|
-
// In SSR
|
|
152
|
+
// In SSR the portal renders via `container.innerHTML = html` (portal/common.tsx), which detaches
|
|
154
153
|
// `renderedDOM` from `dom` before this runs; require it to still be a child so `removeChild` doesn't throw
|
|
155
154
|
// `NotFoundError` (which would make EditorSSRRenderer fall back to the position-blind schema toDOM and lose
|
|
156
|
-
// nested detection).
|
|
157
|
-
if (this.dom && this.renderedDOM &&
|
|
155
|
+
// nested detection).
|
|
156
|
+
if (this.dom && this.renderedDOM && this.renderedDOM.parentNode === this.dom) {
|
|
158
157
|
this.dom.removeChild(this.renderedDOM);
|
|
159
158
|
}
|
|
160
159
|
// Move the table from the ProseMirror table structure into the React rendered table node.
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import classNames from 'classnames';
|
|
2
2
|
import kebabCase from 'lodash/kebabCase';
|
|
3
3
|
import { table, tableWithNestedTable } from '@atlaskit/adf-schema';
|
|
4
|
-
import { isSSRStreaming } from '@atlaskit/editor-common/core-utils';
|
|
5
4
|
import { convertToInlineCss } from '@atlaskit/editor-common/lazy-node-view';
|
|
6
5
|
import { isTableInContentMode } from '@atlaskit/editor-common/table';
|
|
7
6
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
@@ -88,7 +87,7 @@ export const tableNodeSpecWithFixedToDOM = config => {
|
|
|
88
87
|
}, ...roundedTableCornerMasks, ['table', attrs, colgroup, ['tbody', 0]]], ...overflowShadows, ['div', {
|
|
89
88
|
class: 'pm-table-sticky-sentinel-bottom',
|
|
90
89
|
'data-testid': 'sticky-sentinel-bottom'
|
|
91
|
-
}],
|
|
90
|
+
}], ['div', {
|
|
92
91
|
contenteditable: 'false',
|
|
93
92
|
class: 'pm-table-left-border',
|
|
94
93
|
'data-with-numbered-table': node.attrs.isNumberColumnEnabled,
|
|
@@ -97,7 +96,7 @@ export const tableNodeSpecWithFixedToDOM = config => {
|
|
|
97
96
|
contenteditable: 'false',
|
|
98
97
|
class: 'pm-table-right-border',
|
|
99
98
|
'data-testid': 'table-right-border'
|
|
100
|
-
}]]
|
|
99
|
+
}]];
|
|
101
100
|
if (!config.tableResizingEnabled || config.isNested) {
|
|
102
101
|
return ['div', {
|
|
103
102
|
class: 'tableView-content-wrap',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { bind } from 'bind-event-listener';
|
|
2
2
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
3
3
|
import { getBrowserInfo } from '@atlaskit/editor-common/browser';
|
|
4
|
-
import { insideTable
|
|
4
|
+
import { insideTable } from '@atlaskit/editor-common/core-utils';
|
|
5
5
|
import { isNestedTablesSupported } from '@atlaskit/editor-common/nesting';
|
|
6
6
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
7
7
|
import { transformSliceToRemoveOpenBodiedExtension, transformSliceToRemoveOpenExpand, transformSliceToRemoveOpenLayoutNodes, transformSliceToRemoveOpenMultiBodiedExtension, transformSliceToRemoveOpenNestedExpand } from '@atlaskit/editor-common/transforms';
|
|
@@ -59,7 +59,7 @@ export const createPlugin = (dispatchAnalyticsEvent, dispatch, portalProviderAPI
|
|
|
59
59
|
}
|
|
60
60
|
return editorView.state;
|
|
61
61
|
};
|
|
62
|
-
const intl =
|
|
62
|
+
const intl = getIntl();
|
|
63
63
|
const getNodeView = () => {
|
|
64
64
|
return {
|
|
65
65
|
table: tableView({
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { isSSRStreaming } from '@atlaskit/editor-common/core-utils';
|
|
2
1
|
import { tableCellMinWidth } from '@atlaskit/editor-common/styles';
|
|
3
2
|
import { calcTableColumnWidths, getFragmentBackingArray } from '@atlaskit/editor-common/utils';
|
|
4
3
|
import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
|
|
@@ -23,7 +22,7 @@ const generateColStyle = (fixedColWidth, tableWidth, isCommentEditor, isChromele
|
|
|
23
22
|
if (hasTableBeenResized) {
|
|
24
23
|
return `width: max(${fixedColWidth}px, ${tableCellMinWidth}px)`;
|
|
25
24
|
}
|
|
26
|
-
return
|
|
25
|
+
return `width: ${tableCellMinWidth}px`;
|
|
27
26
|
}
|
|
28
27
|
if (isFullPageEditor || !isFullPageEditor && isTableHasWidth) {
|
|
29
28
|
const scaledPercent = isNumberColumnEnabled ? `calc(calc(var(--ak-editor-table-width) - ${akEditorTableNumberColumnWidth}px - 1px)/${tableWidth})` : `calc(calc(var(--ak-editor-table-width) - 1px)/${tableWidth})`;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { RawIntlProvider } from 'react-intl';
|
|
3
|
-
import { isSSR
|
|
3
|
+
import { isSSR } from '@atlaskit/editor-common/core-utils';
|
|
4
4
|
export function TableSSRReactContextsProvider(_ref) {
|
|
5
5
|
var children = _ref.children,
|
|
6
6
|
intl = _ref.intl;
|
|
7
|
-
if (!isSSR()
|
|
7
|
+
if (!isSSR()) {
|
|
8
8
|
return children;
|
|
9
9
|
}
|
|
10
10
|
if (!intl) {
|
|
@@ -10,7 +10,6 @@ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstruct
|
|
|
10
10
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
11
11
|
function _superPropGet(t, o, e, r) { var p = _get(_getPrototypeOf(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; }
|
|
12
12
|
import React from 'react';
|
|
13
|
-
import { isSSRStreaming } from '@atlaskit/editor-common/core-utils';
|
|
14
13
|
import { getTableContainerWidth } from '@atlaskit/editor-common/node-width';
|
|
15
14
|
import ReactNodeView from '@atlaskit/editor-common/react-node-view';
|
|
16
15
|
import { isTableInContentMode } from '@atlaskit/editor-common/table';
|
|
@@ -171,11 +170,11 @@ var TableView = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
171
170
|
}
|
|
172
171
|
|
|
173
172
|
// Remove the ProseMirror table DOM structure to avoid duplication, as it's replaced with the React table node.
|
|
174
|
-
// In SSR
|
|
173
|
+
// In SSR the portal renders via `container.innerHTML = html` (portal/common.tsx), which detaches
|
|
175
174
|
// `renderedDOM` from `dom` before this runs; require it to still be a child so `removeChild` doesn't throw
|
|
176
175
|
// `NotFoundError` (which would make EditorSSRRenderer fall back to the position-blind schema toDOM and lose
|
|
177
|
-
// nested detection).
|
|
178
|
-
if (this.dom && this.renderedDOM &&
|
|
176
|
+
// nested detection).
|
|
177
|
+
if (this.dom && this.renderedDOM && this.renderedDOM.parentNode === this.dom) {
|
|
179
178
|
this.dom.removeChild(this.renderedDOM);
|
|
180
179
|
}
|
|
181
180
|
// Move the table from the ProseMirror table structure into the React rendered table node.
|
|
@@ -6,7 +6,6 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
6
6
|
import classNames from 'classnames';
|
|
7
7
|
import kebabCase from 'lodash/kebabCase';
|
|
8
8
|
import { table, tableWithNestedTable } from '@atlaskit/adf-schema';
|
|
9
|
-
import { isSSRStreaming } from '@atlaskit/editor-common/core-utils';
|
|
10
9
|
import { convertToInlineCss } from '@atlaskit/editor-common/lazy-node-view';
|
|
11
10
|
import { isTableInContentMode } from '@atlaskit/editor-common/table';
|
|
12
11
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
@@ -95,7 +94,7 @@ export var tableNodeSpecWithFixedToDOM = function tableNodeSpecWithFixedToDOM(co
|
|
|
95
94
|
}].concat(roundedTableCornerMasks, [['table', attrs, colgroup, ['tbody', 0]]])].concat(overflowShadows, [['div', {
|
|
96
95
|
class: 'pm-table-sticky-sentinel-bottom',
|
|
97
96
|
'data-testid': 'sticky-sentinel-bottom'
|
|
98
|
-
}]
|
|
97
|
+
}], ['div', {
|
|
99
98
|
contenteditable: 'false',
|
|
100
99
|
class: 'pm-table-left-border',
|
|
101
100
|
'data-with-numbered-table': node.attrs.isNumberColumnEnabled,
|
|
@@ -104,7 +103,7 @@ export var tableNodeSpecWithFixedToDOM = function tableNodeSpecWithFixedToDOM(co
|
|
|
104
103
|
contenteditable: 'false',
|
|
105
104
|
class: 'pm-table-right-border',
|
|
106
105
|
'data-testid': 'table-right-border'
|
|
107
|
-
}]]
|
|
106
|
+
}]]);
|
|
108
107
|
if (!config.tableResizingEnabled || config.isNested) {
|
|
109
108
|
return ['div', {
|
|
110
109
|
class: 'tableView-content-wrap',
|
|
@@ -4,7 +4,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
4
4
|
import { bind } from 'bind-event-listener';
|
|
5
5
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
6
6
|
import { getBrowserInfo } from '@atlaskit/editor-common/browser';
|
|
7
|
-
import { insideTable
|
|
7
|
+
import { insideTable } from '@atlaskit/editor-common/core-utils';
|
|
8
8
|
import { isNestedTablesSupported } from '@atlaskit/editor-common/nesting';
|
|
9
9
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
10
10
|
import { transformSliceToRemoveOpenBodiedExtension, transformSliceToRemoveOpenExpand, transformSliceToRemoveOpenLayoutNodes, transformSliceToRemoveOpenMultiBodiedExtension, transformSliceToRemoveOpenNestedExpand } from '@atlaskit/editor-common/transforms';
|
|
@@ -61,7 +61,7 @@ export var createPlugin = function createPlugin(dispatchAnalyticsEvent, dispatch
|
|
|
61
61
|
}
|
|
62
62
|
return editorView.state;
|
|
63
63
|
};
|
|
64
|
-
var intl =
|
|
64
|
+
var intl = getIntl();
|
|
65
65
|
var getNodeView = function getNodeView() {
|
|
66
66
|
return {
|
|
67
67
|
table: tableView({
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
|
-
import { isSSRStreaming } from '@atlaskit/editor-common/core-utils';
|
|
3
2
|
import { tableCellMinWidth } from '@atlaskit/editor-common/styles';
|
|
4
3
|
import { calcTableColumnWidths, getFragmentBackingArray } from '@atlaskit/editor-common/utils';
|
|
5
4
|
import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
|
|
@@ -26,7 +25,7 @@ var generateColStyle = function generateColStyle(fixedColWidth, tableWidth, isCo
|
|
|
26
25
|
if (hasTableBeenResized) {
|
|
27
26
|
return "width: max(".concat(fixedColWidth, "px, ").concat(tableCellMinWidth, "px)");
|
|
28
27
|
}
|
|
29
|
-
return
|
|
28
|
+
return "width: ".concat(tableCellMinWidth, "px");
|
|
30
29
|
}
|
|
31
30
|
if (isFullPageEditor || !isFullPageEditor && isTableHasWidth) {
|
|
32
31
|
var scaledPercent = isNumberColumnEnabled ? "calc(calc(var(--ak-editor-table-width) - ".concat(akEditorTableNumberColumnWidth, "px - 1px)/").concat(tableWidth, ")") : "calc(calc(var(--ak-editor-table-width) - 1px)/".concat(tableWidth, ")");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-table",
|
|
3
|
-
"version": "26.
|
|
3
|
+
"version": "26.2.0",
|
|
4
4
|
"description": "Table plugin for the @atlaskit/editor",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"@atlaskit/editor-plugin-batch-attribute-updates": "^14.0.0",
|
|
30
30
|
"@atlaskit/editor-plugin-content-insertion": "^14.0.0",
|
|
31
31
|
"@atlaskit/editor-plugin-editor-viewmode": "^16.0.0",
|
|
32
|
-
"@atlaskit/editor-plugin-extension": "17.
|
|
32
|
+
"@atlaskit/editor-plugin-extension": "17.2.0",
|
|
33
33
|
"@atlaskit/editor-plugin-guideline": "^14.0.0",
|
|
34
34
|
"@atlaskit/editor-plugin-interaction": "^25.0.0",
|
|
35
35
|
"@atlaskit/editor-plugin-limited-mode": "^11.0.0",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"@atlaskit/editor-ui-control-model": "^2.6.0",
|
|
46
46
|
"@atlaskit/icon": "^37.3.0",
|
|
47
47
|
"@atlaskit/icon-lab": "^7.5.0",
|
|
48
|
-
"@atlaskit/insm": "^
|
|
48
|
+
"@atlaskit/insm": "^2.0.0",
|
|
49
49
|
"@atlaskit/menu": "^10.0.0",
|
|
50
50
|
"@atlaskit/platform-feature-experiments": "^0.3.0",
|
|
51
51
|
"@atlaskit/platform-feature-flags": "^2.1.0",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@atlaskit/pragmatic-drag-and-drop-auto-scroll": "^3.0.0",
|
|
54
54
|
"@atlaskit/pragmatic-drag-and-drop-hitbox": "^2.0.0",
|
|
55
55
|
"@atlaskit/primitives": "^22.2.0",
|
|
56
|
-
"@atlaskit/tmp-editor-statsig": "^147.
|
|
56
|
+
"@atlaskit/tmp-editor-statsig": "^147.1.0",
|
|
57
57
|
"@atlaskit/toggle": "^17.1.0",
|
|
58
58
|
"@atlaskit/tokens": "^16.7.0",
|
|
59
59
|
"@atlaskit/tooltip": "^24.0.0",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"uuid": "^3.1.0"
|
|
69
69
|
},
|
|
70
70
|
"peerDependencies": {
|
|
71
|
-
"@atlaskit/editor-common": "^118.
|
|
71
|
+
"@atlaskit/editor-common": "^118.12.0",
|
|
72
72
|
"react": "^18.2.0 || ^19.2.0",
|
|
73
73
|
"react-dom": "^18.2.0 || ^19.2.0",
|
|
74
74
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|