@atlaskit/editor-plugin-table 12.2.2 → 12.2.4
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 +16 -0
- package/dist/cjs/nodeviews/TableComponent.js +9 -4
- package/dist/cjs/nodeviews/TableResizer.js +2 -1
- package/dist/cjs/nodeviews/TableRow.js +1 -0
- package/dist/cjs/tablePlugin.js +6 -6
- package/dist/es2019/nodeviews/TableComponent.js +9 -4
- package/dist/es2019/nodeviews/TableResizer.js +2 -1
- package/dist/es2019/nodeviews/TableRow.js +1 -0
- package/dist/es2019/tablePlugin.js +7 -7
- package/dist/esm/nodeviews/TableComponent.js +9 -4
- package/dist/esm/nodeviews/TableResizer.js +2 -1
- package/dist/esm/nodeviews/TableRow.js +1 -0
- package/dist/esm/tablePlugin.js +7 -7
- package/package.json +7 -7
- package/src/nodeviews/TableComponent.tsx +5 -0
- package/src/nodeviews/TableResizer.tsx +1 -0
- package/src/nodeviews/TableRow.ts +1 -0
- package/src/pm-plugins/table-resizing/utils/dom.ts +0 -1
- package/src/tablePlugin.tsx +18 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-table
|
|
2
2
|
|
|
3
|
+
## 12.2.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`57b19274b9fdd`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/57b19274b9fdd) -
|
|
8
|
+
EDITOR-1373 Bump adf-schema version
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 12.2.3
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [`32ac245da116d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/32ac245da116d) -
|
|
16
|
+
exclude sticky header from TTVC calculation
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 12.2.2
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -1134,6 +1134,7 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
1134
1134
|
}, allowControls && colControls), (0, _platformFeatureFlags.fg)('disable-sticky-scrollbar-for-nested-tables') ? !this.isNestedInTable ? /*#__PURE__*/_react.default.createElement("div", {
|
|
1135
1135
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
1136
1136
|
className: _types.TableCssClassName.TABLE_STICKY_SCROLLBAR_CONTAINER,
|
|
1137
|
+
"data-vc-nvs": "true",
|
|
1137
1138
|
style: {
|
|
1138
1139
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
1139
1140
|
height: "var(--ds-space-250, 20px)",
|
|
@@ -1148,13 +1149,15 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
1148
1149
|
width: tableRef === null || tableRef === void 0 ? void 0 : tableRef.clientWidth,
|
|
1149
1150
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
1150
1151
|
height: '100%'
|
|
1151
|
-
}
|
|
1152
|
+
},
|
|
1153
|
+
"data-vc-nvs": "true"
|
|
1152
1154
|
})) : /*#__PURE__*/_react.default.createElement("div", {
|
|
1153
1155
|
style: {
|
|
1154
1156
|
width: tableRef === null || tableRef === void 0 ? void 0 : tableRef.clientWidth,
|
|
1155
1157
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
1156
1158
|
height: '100%'
|
|
1157
|
-
}
|
|
1159
|
+
},
|
|
1160
|
+
"data-vc-nvs": "true"
|
|
1158
1161
|
}) : /*#__PURE__*/_react.default.createElement("div", {
|
|
1159
1162
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
1160
1163
|
className: _types.TableCssClassName.TABLE_STICKY_SCROLLBAR_CONTAINER,
|
|
@@ -1166,13 +1169,15 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
1166
1169
|
display: 'none',
|
|
1167
1170
|
// prevent unwanted scroll during table resize without removing scrollbar container from the dom
|
|
1168
1171
|
width: isResizing ? "var(--ds-space-0, 0px)" : '100%'
|
|
1169
|
-
}
|
|
1172
|
+
},
|
|
1173
|
+
"data-vc-nvs": "true"
|
|
1170
1174
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
1171
1175
|
style: {
|
|
1172
1176
|
width: tableRef === null || tableRef === void 0 ? void 0 : tableRef.clientWidth,
|
|
1173
1177
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
1174
1178
|
height: '100%'
|
|
1175
|
-
}
|
|
1179
|
+
},
|
|
1180
|
+
"data-vc-nvs": "true"
|
|
1176
1181
|
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
1177
1182
|
contentEditable: false
|
|
1178
1183
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
@@ -104,6 +104,7 @@ var TableRow = exports.default = /*#__PURE__*/function (_TableNodeView) {
|
|
|
104
104
|
_this.isInNestedTable = (0, _nesting.getParentOfTypeCount)(view.state.schema.nodes.table)(view.state.doc.resolve(pos)) > 1;
|
|
105
105
|
}
|
|
106
106
|
if (_this.isHeaderRow) {
|
|
107
|
+
_this.dom.setAttribute('data-vc-nvs', 'true');
|
|
107
108
|
var _nodeVisibilityManage = (0, _nodeVisibility.nodeVisibilityManager)(view.dom),
|
|
108
109
|
observe = _nodeVisibilityManage.observe;
|
|
109
110
|
_this.nodeVisibilityObserverCleanupFn = observe({
|
package/dist/cjs/tablePlugin.js
CHANGED
|
@@ -265,13 +265,13 @@ var tablePlugin = function tablePlugin(_ref) {
|
|
|
265
265
|
})
|
|
266
266
|
}, {
|
|
267
267
|
name: 'tableHeader',
|
|
268
|
-
node: (0, _platformFeatureFlags.fg)('platform_editor_adf_with_localid') ? _adfSchema.
|
|
268
|
+
node: (0, _platformFeatureFlags.fg)('platform_editor_adf_with_localid') ? _adfSchema.tableHeaderWithNestedTableWithLocalId : _adfSchema.tableHeaderWithNestedTable
|
|
269
269
|
}, {
|
|
270
270
|
name: 'tableRow',
|
|
271
|
-
node: (0, _platformFeatureFlags.fg)('platform_editor_adf_with_localid') ? _adfSchema.
|
|
271
|
+
node: (0, _platformFeatureFlags.fg)('platform_editor_adf_with_localid') ? _adfSchema.tableRowWithNestedTableWithLocalId : _adfSchema.tableRowWithNestedTable
|
|
272
272
|
}, {
|
|
273
273
|
name: 'tableCell',
|
|
274
|
-
node: (0, _platformFeatureFlags.fg)('platform_editor_adf_with_localid') ? _adfSchema.
|
|
274
|
+
node: (0, _platformFeatureFlags.fg)('platform_editor_adf_with_localid') ? _adfSchema.tableCellWithNestedTableWithLocalId : _adfSchema.tableCellWithNestedTable
|
|
275
275
|
}] : [{
|
|
276
276
|
name: 'table',
|
|
277
277
|
node: (0, _toDOM.tableNodeSpecWithFixedToDOM)({
|
|
@@ -286,13 +286,13 @@ var tablePlugin = function tablePlugin(_ref) {
|
|
|
286
286
|
})
|
|
287
287
|
}, {
|
|
288
288
|
name: 'tableHeader',
|
|
289
|
-
node: _adfSchema.tableHeader
|
|
289
|
+
node: (0, _platformFeatureFlags.fg)('platform_editor_adf_with_localid') ? _adfSchema.tableHeaderWithLocalId : _adfSchema.tableHeader
|
|
290
290
|
}, {
|
|
291
291
|
name: 'tableRow',
|
|
292
|
-
node: _adfSchema.tableRow
|
|
292
|
+
node: (0, _platformFeatureFlags.fg)('platform_editor_adf_with_localid') ? _adfSchema.tableRowWithLocalId : _adfSchema.tableRow
|
|
293
293
|
}, {
|
|
294
294
|
name: 'tableCell',
|
|
295
|
-
node: _adfSchema.tableCell
|
|
295
|
+
node: (0, _platformFeatureFlags.fg)('platform_editor_adf_with_localid') ? _adfSchema.tableCellWithLocalId : _adfSchema.tableCell
|
|
296
296
|
}];
|
|
297
297
|
},
|
|
298
298
|
pmPlugins: function pmPlugins() {
|
|
@@ -1110,6 +1110,7 @@ class TableComponent extends React.Component {
|
|
|
1110
1110
|
}, allowControls && colControls), fg('disable-sticky-scrollbar-for-nested-tables') ? !this.isNestedInTable ? /*#__PURE__*/React.createElement("div", {
|
|
1111
1111
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
1112
1112
|
className: ClassName.TABLE_STICKY_SCROLLBAR_CONTAINER,
|
|
1113
|
+
"data-vc-nvs": "true",
|
|
1113
1114
|
style: {
|
|
1114
1115
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
1115
1116
|
height: "var(--ds-space-250, 20px)",
|
|
@@ -1124,13 +1125,15 @@ class TableComponent extends React.Component {
|
|
|
1124
1125
|
width: tableRef === null || tableRef === void 0 ? void 0 : tableRef.clientWidth,
|
|
1125
1126
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
1126
1127
|
height: '100%'
|
|
1127
|
-
}
|
|
1128
|
+
},
|
|
1129
|
+
"data-vc-nvs": "true"
|
|
1128
1130
|
})) : /*#__PURE__*/React.createElement("div", {
|
|
1129
1131
|
style: {
|
|
1130
1132
|
width: tableRef === null || tableRef === void 0 ? void 0 : tableRef.clientWidth,
|
|
1131
1133
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
1132
1134
|
height: '100%'
|
|
1133
|
-
}
|
|
1135
|
+
},
|
|
1136
|
+
"data-vc-nvs": "true"
|
|
1134
1137
|
}) : /*#__PURE__*/React.createElement("div", {
|
|
1135
1138
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
1136
1139
|
className: ClassName.TABLE_STICKY_SCROLLBAR_CONTAINER,
|
|
@@ -1142,13 +1145,15 @@ class TableComponent extends React.Component {
|
|
|
1142
1145
|
display: 'none',
|
|
1143
1146
|
// prevent unwanted scroll during table resize without removing scrollbar container from the dom
|
|
1144
1147
|
width: isResizing ? "var(--ds-space-0, 0px)" : '100%'
|
|
1145
|
-
}
|
|
1148
|
+
},
|
|
1149
|
+
"data-vc-nvs": "true"
|
|
1146
1150
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1147
1151
|
style: {
|
|
1148
1152
|
width: tableRef === null || tableRef === void 0 ? void 0 : tableRef.clientWidth,
|
|
1149
1153
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
1150
1154
|
height: '100%'
|
|
1151
|
-
}
|
|
1155
|
+
},
|
|
1156
|
+
"data-vc-nvs": "true"
|
|
1152
1157
|
})), /*#__PURE__*/React.createElement("div", {
|
|
1153
1158
|
contentEditable: false
|
|
1154
1159
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
@@ -89,6 +89,7 @@ export default class TableRow extends TableNodeView {
|
|
|
89
89
|
this.isInNestedTable = getParentOfTypeCount(view.state.schema.nodes.table)(view.state.doc.resolve(pos)) > 1;
|
|
90
90
|
}
|
|
91
91
|
if (this.isHeaderRow) {
|
|
92
|
+
this.dom.setAttribute('data-vc-nvs', 'true');
|
|
92
93
|
const {
|
|
93
94
|
observe
|
|
94
95
|
} = nodeVisibilityManager(view.dom);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useEffect } from 'react';
|
|
2
|
-
import { tableCell, tableCellWithNestedTable, tableHeader, tableHeaderWithLocalId, tableHeaderWithNestedTable, tableRow, tableRowWithNestedTable, tableRowWithLocalId, tableCellWithLocalId } from '@atlaskit/adf-schema';
|
|
2
|
+
import { tableCell, tableCellWithNestedTable, tableHeader, tableHeaderWithLocalId, tableHeaderWithNestedTable, tableRow, tableRowWithNestedTable, tableRowWithLocalId, tableCellWithLocalId, tableCellWithNestedTableWithLocalId, tableRowWithNestedTableWithLocalId, tableHeaderWithNestedTableWithLocalId } from '@atlaskit/adf-schema';
|
|
3
3
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD, TABLE_ACTION } from '@atlaskit/editor-common/analytics';
|
|
4
4
|
import { browser } from '@atlaskit/editor-common/browser';
|
|
5
5
|
import { ErrorBoundary } from '@atlaskit/editor-common/error-boundary';
|
|
@@ -254,13 +254,13 @@ const tablePlugin = ({
|
|
|
254
254
|
})
|
|
255
255
|
}, {
|
|
256
256
|
name: 'tableHeader',
|
|
257
|
-
node: fg('platform_editor_adf_with_localid') ?
|
|
257
|
+
node: fg('platform_editor_adf_with_localid') ? tableHeaderWithNestedTableWithLocalId : tableHeaderWithNestedTable
|
|
258
258
|
}, {
|
|
259
259
|
name: 'tableRow',
|
|
260
|
-
node: fg('platform_editor_adf_with_localid') ?
|
|
260
|
+
node: fg('platform_editor_adf_with_localid') ? tableRowWithNestedTableWithLocalId : tableRowWithNestedTable
|
|
261
261
|
}, {
|
|
262
262
|
name: 'tableCell',
|
|
263
|
-
node: fg('platform_editor_adf_with_localid') ?
|
|
263
|
+
node: fg('platform_editor_adf_with_localid') ? tableCellWithNestedTableWithLocalId : tableCellWithNestedTable
|
|
264
264
|
}] : [{
|
|
265
265
|
name: 'table',
|
|
266
266
|
node: tableNodeSpecWithFixedToDOM({
|
|
@@ -275,13 +275,13 @@ const tablePlugin = ({
|
|
|
275
275
|
})
|
|
276
276
|
}, {
|
|
277
277
|
name: 'tableHeader',
|
|
278
|
-
node: tableHeader
|
|
278
|
+
node: fg('platform_editor_adf_with_localid') ? tableHeaderWithLocalId : tableHeader
|
|
279
279
|
}, {
|
|
280
280
|
name: 'tableRow',
|
|
281
|
-
node: tableRow
|
|
281
|
+
node: fg('platform_editor_adf_with_localid') ? tableRowWithLocalId : tableRow
|
|
282
282
|
}, {
|
|
283
283
|
name: 'tableCell',
|
|
284
|
-
node: tableCell
|
|
284
|
+
node: fg('platform_editor_adf_with_localid') ? tableCellWithLocalId : tableCell
|
|
285
285
|
}];
|
|
286
286
|
},
|
|
287
287
|
pmPlugins() {
|
|
@@ -1128,6 +1128,7 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
1128
1128
|
}, allowControls && colControls), fg('disable-sticky-scrollbar-for-nested-tables') ? !this.isNestedInTable ? /*#__PURE__*/React.createElement("div", {
|
|
1129
1129
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
1130
1130
|
className: ClassName.TABLE_STICKY_SCROLLBAR_CONTAINER,
|
|
1131
|
+
"data-vc-nvs": "true",
|
|
1131
1132
|
style: {
|
|
1132
1133
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
1133
1134
|
height: "var(--ds-space-250, 20px)",
|
|
@@ -1142,13 +1143,15 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
1142
1143
|
width: tableRef === null || tableRef === void 0 ? void 0 : tableRef.clientWidth,
|
|
1143
1144
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
1144
1145
|
height: '100%'
|
|
1145
|
-
}
|
|
1146
|
+
},
|
|
1147
|
+
"data-vc-nvs": "true"
|
|
1146
1148
|
})) : /*#__PURE__*/React.createElement("div", {
|
|
1147
1149
|
style: {
|
|
1148
1150
|
width: tableRef === null || tableRef === void 0 ? void 0 : tableRef.clientWidth,
|
|
1149
1151
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
1150
1152
|
height: '100%'
|
|
1151
|
-
}
|
|
1153
|
+
},
|
|
1154
|
+
"data-vc-nvs": "true"
|
|
1152
1155
|
}) : /*#__PURE__*/React.createElement("div", {
|
|
1153
1156
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
1154
1157
|
className: ClassName.TABLE_STICKY_SCROLLBAR_CONTAINER,
|
|
@@ -1160,13 +1163,15 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
1160
1163
|
display: 'none',
|
|
1161
1164
|
// prevent unwanted scroll during table resize without removing scrollbar container from the dom
|
|
1162
1165
|
width: isResizing ? "var(--ds-space-0, 0px)" : '100%'
|
|
1163
|
-
}
|
|
1166
|
+
},
|
|
1167
|
+
"data-vc-nvs": "true"
|
|
1164
1168
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1165
1169
|
style: {
|
|
1166
1170
|
width: tableRef === null || tableRef === void 0 ? void 0 : tableRef.clientWidth,
|
|
1167
1171
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
1168
1172
|
height: '100%'
|
|
1169
|
-
}
|
|
1173
|
+
},
|
|
1174
|
+
"data-vc-nvs": "true"
|
|
1170
1175
|
})), /*#__PURE__*/React.createElement("div", {
|
|
1171
1176
|
contentEditable: false
|
|
1172
1177
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
@@ -97,6 +97,7 @@ var TableRow = /*#__PURE__*/function (_TableNodeView) {
|
|
|
97
97
|
_this.isInNestedTable = getParentOfTypeCount(view.state.schema.nodes.table)(view.state.doc.resolve(pos)) > 1;
|
|
98
98
|
}
|
|
99
99
|
if (_this.isHeaderRow) {
|
|
100
|
+
_this.dom.setAttribute('data-vc-nvs', 'true');
|
|
100
101
|
var _nodeVisibilityManage = nodeVisibilityManager(view.dom),
|
|
101
102
|
observe = _nodeVisibilityManage.observe;
|
|
102
103
|
_this.nodeVisibilityObserverCleanupFn = observe({
|
package/dist/esm/tablePlugin.js
CHANGED
|
@@ -2,7 +2,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
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; }
|
|
3
3
|
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) { _defineProperty(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; }
|
|
4
4
|
import React, { useEffect } from 'react';
|
|
5
|
-
import { tableCell, tableCellWithNestedTable, tableHeader, tableHeaderWithLocalId, tableHeaderWithNestedTable, tableRow, tableRowWithNestedTable, tableRowWithLocalId, tableCellWithLocalId } from '@atlaskit/adf-schema';
|
|
5
|
+
import { tableCell, tableCellWithNestedTable, tableHeader, tableHeaderWithLocalId, tableHeaderWithNestedTable, tableRow, tableRowWithNestedTable, tableRowWithLocalId, tableCellWithLocalId, tableCellWithNestedTableWithLocalId, tableRowWithNestedTableWithLocalId, tableHeaderWithNestedTableWithLocalId } from '@atlaskit/adf-schema';
|
|
6
6
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD, TABLE_ACTION } from '@atlaskit/editor-common/analytics';
|
|
7
7
|
import { browser } from '@atlaskit/editor-common/browser';
|
|
8
8
|
import { ErrorBoundary } from '@atlaskit/editor-common/error-boundary';
|
|
@@ -257,13 +257,13 @@ var tablePlugin = function tablePlugin(_ref) {
|
|
|
257
257
|
})
|
|
258
258
|
}, {
|
|
259
259
|
name: 'tableHeader',
|
|
260
|
-
node: fg('platform_editor_adf_with_localid') ?
|
|
260
|
+
node: fg('platform_editor_adf_with_localid') ? tableHeaderWithNestedTableWithLocalId : tableHeaderWithNestedTable
|
|
261
261
|
}, {
|
|
262
262
|
name: 'tableRow',
|
|
263
|
-
node: fg('platform_editor_adf_with_localid') ?
|
|
263
|
+
node: fg('platform_editor_adf_with_localid') ? tableRowWithNestedTableWithLocalId : tableRowWithNestedTable
|
|
264
264
|
}, {
|
|
265
265
|
name: 'tableCell',
|
|
266
|
-
node: fg('platform_editor_adf_with_localid') ?
|
|
266
|
+
node: fg('platform_editor_adf_with_localid') ? tableCellWithNestedTableWithLocalId : tableCellWithNestedTable
|
|
267
267
|
}] : [{
|
|
268
268
|
name: 'table',
|
|
269
269
|
node: tableNodeSpecWithFixedToDOM({
|
|
@@ -278,13 +278,13 @@ var tablePlugin = function tablePlugin(_ref) {
|
|
|
278
278
|
})
|
|
279
279
|
}, {
|
|
280
280
|
name: 'tableHeader',
|
|
281
|
-
node: tableHeader
|
|
281
|
+
node: fg('platform_editor_adf_with_localid') ? tableHeaderWithLocalId : tableHeader
|
|
282
282
|
}, {
|
|
283
283
|
name: 'tableRow',
|
|
284
|
-
node: tableRow
|
|
284
|
+
node: fg('platform_editor_adf_with_localid') ? tableRowWithLocalId : tableRow
|
|
285
285
|
}, {
|
|
286
286
|
name: 'tableCell',
|
|
287
|
-
node: tableCell
|
|
287
|
+
node: fg('platform_editor_adf_with_localid') ? tableCellWithLocalId : tableCell
|
|
288
288
|
}];
|
|
289
289
|
},
|
|
290
290
|
pmPlugins: function pmPlugins() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-table",
|
|
3
|
-
"version": "12.2.
|
|
3
|
+
"version": "12.2.4",
|
|
4
4
|
"description": "Table plugin for the @atlaskit/editor",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"singleton": true
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@atlaskit/adf-schema": "^50.2.
|
|
31
|
+
"@atlaskit/adf-schema": "^50.2.1",
|
|
32
32
|
"@atlaskit/button": "^23.4.0",
|
|
33
33
|
"@atlaskit/custom-steps": "^0.11.0",
|
|
34
34
|
"@atlaskit/editor-palette": "^2.1.0",
|
|
@@ -37,11 +37,11 @@
|
|
|
37
37
|
"@atlaskit/editor-plugin-batch-attribute-updates": "^3.0.0",
|
|
38
38
|
"@atlaskit/editor-plugin-content-insertion": "^3.1.0",
|
|
39
39
|
"@atlaskit/editor-plugin-editor-viewmode": "^5.0.0",
|
|
40
|
-
"@atlaskit/editor-plugin-extension": "6.1.
|
|
40
|
+
"@atlaskit/editor-plugin-extension": "6.1.10",
|
|
41
41
|
"@atlaskit/editor-plugin-guideline": "^3.0.0",
|
|
42
42
|
"@atlaskit/editor-plugin-interaction": "^5.0.0",
|
|
43
43
|
"@atlaskit/editor-plugin-limited-mode": "^0.0.3",
|
|
44
|
-
"@atlaskit/editor-plugin-selection": "^3.
|
|
44
|
+
"@atlaskit/editor-plugin-selection": "^3.1.0",
|
|
45
45
|
"@atlaskit/editor-plugin-user-intent": "^1.1.0",
|
|
46
46
|
"@atlaskit/editor-plugin-width": "^4.0.0",
|
|
47
47
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
@@ -55,9 +55,9 @@
|
|
|
55
55
|
"@atlaskit/pragmatic-drag-and-drop-auto-scroll": "^2.1.0",
|
|
56
56
|
"@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.1.0",
|
|
57
57
|
"@atlaskit/primitives": "^14.11.0",
|
|
58
|
-
"@atlaskit/react-ufo": "^4.
|
|
58
|
+
"@atlaskit/react-ufo": "^4.4.0",
|
|
59
59
|
"@atlaskit/theme": "^19.0.0",
|
|
60
|
-
"@atlaskit/tmp-editor-statsig": "^11.
|
|
60
|
+
"@atlaskit/tmp-editor-statsig": "^11.3.0",
|
|
61
61
|
"@atlaskit/toggle": "^15.1.0",
|
|
62
62
|
"@atlaskit/tokens": "^6.0.0",
|
|
63
63
|
"@atlaskit/tooltip": "^20.4.0",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"uuid": "^3.1.0"
|
|
71
71
|
},
|
|
72
72
|
"peerDependencies": {
|
|
73
|
-
"@atlaskit/editor-common": "^107.
|
|
73
|
+
"@atlaskit/editor-common": "^107.26.0",
|
|
74
74
|
"react": "^18.2.0",
|
|
75
75
|
"react-dom": "^18.2.0",
|
|
76
76
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
@@ -1126,6 +1126,7 @@ class TableComponent extends React.Component<ComponentProps, TableState> {
|
|
|
1126
1126
|
<div
|
|
1127
1127
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
1128
1128
|
className={ClassName.TABLE_STICKY_SCROLLBAR_CONTAINER}
|
|
1129
|
+
data-vc-nvs="true"
|
|
1129
1130
|
style={{
|
|
1130
1131
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
1131
1132
|
height: token('space.250', '20px'), // MAX_BROWSER_SCROLLBAR_HEIGHT
|
|
@@ -1141,6 +1142,7 @@ class TableComponent extends React.Component<ComponentProps, TableState> {
|
|
|
1141
1142
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
1142
1143
|
height: '100%',
|
|
1143
1144
|
}}
|
|
1145
|
+
data-vc-nvs="true"
|
|
1144
1146
|
></div>
|
|
1145
1147
|
</div>
|
|
1146
1148
|
) : (
|
|
@@ -1150,6 +1152,7 @@ class TableComponent extends React.Component<ComponentProps, TableState> {
|
|
|
1150
1152
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
1151
1153
|
height: '100%',
|
|
1152
1154
|
}}
|
|
1155
|
+
data-vc-nvs="true"
|
|
1153
1156
|
></div>
|
|
1154
1157
|
)
|
|
1155
1158
|
) : (
|
|
@@ -1164,6 +1167,7 @@ class TableComponent extends React.Component<ComponentProps, TableState> {
|
|
|
1164
1167
|
// prevent unwanted scroll during table resize without removing scrollbar container from the dom
|
|
1165
1168
|
width: isResizing ? token('space.0', '0px') : '100%',
|
|
1166
1169
|
}}
|
|
1170
|
+
data-vc-nvs="true"
|
|
1167
1171
|
>
|
|
1168
1172
|
<div
|
|
1169
1173
|
style={{
|
|
@@ -1171,6 +1175,7 @@ class TableComponent extends React.Component<ComponentProps, TableState> {
|
|
|
1171
1175
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
1172
1176
|
height: '100%',
|
|
1173
1177
|
}}
|
|
1178
|
+
data-vc-nvs="true"
|
|
1174
1179
|
></div>
|
|
1175
1180
|
</div>
|
|
1176
1181
|
)}
|
|
@@ -102,6 +102,7 @@ export default class TableRow extends TableNodeView<HTMLTableRowElement> impleme
|
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
if (this.isHeaderRow) {
|
|
105
|
+
this.dom.setAttribute('data-vc-nvs', 'true');
|
|
105
106
|
const { observe } = nodeVisibilityManager(view.dom);
|
|
106
107
|
this.nodeVisibilityObserverCleanupFn = observe({
|
|
107
108
|
element: this.contentDOM,
|
|
@@ -108,7 +108,6 @@ export const syncStickyRowToTable = (tableRef?: HTMLElement | null) => {
|
|
|
108
108
|
if (!headerRow) {
|
|
109
109
|
return;
|
|
110
110
|
}
|
|
111
|
-
|
|
112
111
|
applyColWidthsToStickyRow(tableRef.querySelector('colgroup'), headerRow);
|
|
113
112
|
applyTableWidthToStickyRow(tableRef, headerRow);
|
|
114
113
|
};
|
package/src/tablePlugin.tsx
CHANGED
|
@@ -10,6 +10,9 @@ import {
|
|
|
10
10
|
tableRowWithNestedTable,
|
|
11
11
|
tableRowWithLocalId,
|
|
12
12
|
tableCellWithLocalId,
|
|
13
|
+
tableCellWithNestedTableWithLocalId,
|
|
14
|
+
tableRowWithNestedTableWithLocalId,
|
|
15
|
+
tableHeaderWithNestedTableWithLocalId,
|
|
13
16
|
} from '@atlaskit/adf-schema';
|
|
14
17
|
import {
|
|
15
18
|
ACTION,
|
|
@@ -343,19 +346,19 @@ const tablePlugin: TablePlugin = ({ config: options, api }) => {
|
|
|
343
346
|
{
|
|
344
347
|
name: 'tableHeader',
|
|
345
348
|
node: fg('platform_editor_adf_with_localid')
|
|
346
|
-
?
|
|
349
|
+
? tableHeaderWithNestedTableWithLocalId
|
|
347
350
|
: tableHeaderWithNestedTable,
|
|
348
351
|
},
|
|
349
352
|
{
|
|
350
353
|
name: 'tableRow',
|
|
351
354
|
node: fg('platform_editor_adf_with_localid')
|
|
352
|
-
?
|
|
355
|
+
? tableRowWithNestedTableWithLocalId
|
|
353
356
|
: tableRowWithNestedTable,
|
|
354
357
|
},
|
|
355
358
|
{
|
|
356
359
|
name: 'tableCell',
|
|
357
360
|
node: fg('platform_editor_adf_with_localid')
|
|
358
|
-
?
|
|
361
|
+
? tableCellWithNestedTableWithLocalId
|
|
359
362
|
: tableCellWithNestedTable,
|
|
360
363
|
},
|
|
361
364
|
]
|
|
@@ -373,9 +376,18 @@ const tablePlugin: TablePlugin = ({ config: options, api }) => {
|
|
|
373
376
|
isChromelessEditor,
|
|
374
377
|
}),
|
|
375
378
|
},
|
|
376
|
-
{
|
|
377
|
-
|
|
378
|
-
|
|
379
|
+
{
|
|
380
|
+
name: 'tableHeader',
|
|
381
|
+
node: fg('platform_editor_adf_with_localid') ? tableHeaderWithLocalId : tableHeader,
|
|
382
|
+
},
|
|
383
|
+
{
|
|
384
|
+
name: 'tableRow',
|
|
385
|
+
node: fg('platform_editor_adf_with_localid') ? tableRowWithLocalId : tableRow,
|
|
386
|
+
},
|
|
387
|
+
{
|
|
388
|
+
name: 'tableCell',
|
|
389
|
+
node: fg('platform_editor_adf_with_localid') ? tableCellWithLocalId : tableCell,
|
|
390
|
+
},
|
|
379
391
|
];
|
|
380
392
|
},
|
|
381
393
|
|