@atlaskit/editor-plugin-table 7.25.1 → 7.25.2
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 +8 -0
- package/dist/cjs/nodeviews/table.js +10 -1
- package/dist/es2019/nodeviews/table.js +10 -1
- package/dist/esm/nodeviews/table.js +10 -1
- package/package.json +4 -1
- package/src/nodeviews/table.tsx +10 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-table
|
|
2
2
|
|
|
3
|
+
## 7.25.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#128275](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/128275)
|
|
8
|
+
[`aa76c0502c05d`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/aa76c0502c05d) -
|
|
9
|
+
Fixes an issue where the cursor doesn't appear within a table upon insertion in react 18
|
|
10
|
+
|
|
3
11
|
## 7.25.1
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -262,7 +262,16 @@ var TableView = exports.default = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
262
262
|
}, {
|
|
263
263
|
key: "ignoreMutation",
|
|
264
264
|
value: function ignoreMutation(mutation) {
|
|
265
|
-
|
|
265
|
+
var ignoreMutation = (0, _ignoreMutationDelegate.default)(mutation);
|
|
266
|
+
if ((0, _platformFeatureFlags.fg)('platform_editor_react_18_table_insertion_cursor')) {
|
|
267
|
+
if (ignoreMutation) {
|
|
268
|
+
if (!this.contentDOM) {
|
|
269
|
+
return true;
|
|
270
|
+
}
|
|
271
|
+
return !this.contentDOM.contains(mutation.target) && mutation.type !== 'selection';
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
return ignoreMutation;
|
|
266
275
|
}
|
|
267
276
|
}, {
|
|
268
277
|
key: "destroy",
|
|
@@ -228,7 +228,16 @@ export default class TableView extends ReactNodeView {
|
|
|
228
228
|
});
|
|
229
229
|
}
|
|
230
230
|
ignoreMutation(mutation) {
|
|
231
|
-
|
|
231
|
+
const ignoreMutation = ignoreMutationDelegate(mutation);
|
|
232
|
+
if (fg('platform_editor_react_18_table_insertion_cursor')) {
|
|
233
|
+
if (ignoreMutation) {
|
|
234
|
+
if (!this.contentDOM) {
|
|
235
|
+
return true;
|
|
236
|
+
}
|
|
237
|
+
return !this.contentDOM.contains(mutation.target) && mutation.type !== 'selection';
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
return ignoreMutation;
|
|
232
241
|
}
|
|
233
242
|
destroy() {
|
|
234
243
|
var _this$eventDispatcher;
|
|
@@ -255,7 +255,16 @@ var TableView = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
255
255
|
}, {
|
|
256
256
|
key: "ignoreMutation",
|
|
257
257
|
value: function ignoreMutation(mutation) {
|
|
258
|
-
|
|
258
|
+
var ignoreMutation = ignoreMutationDelegate(mutation);
|
|
259
|
+
if (fg('platform_editor_react_18_table_insertion_cursor')) {
|
|
260
|
+
if (ignoreMutation) {
|
|
261
|
+
if (!this.contentDOM) {
|
|
262
|
+
return true;
|
|
263
|
+
}
|
|
264
|
+
return !this.contentDOM.contains(mutation.target) && mutation.type !== 'selection';
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
return ignoreMutation;
|
|
259
268
|
}
|
|
260
269
|
}, {
|
|
261
270
|
key: "destroy",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-table",
|
|
3
|
-
"version": "7.25.
|
|
3
|
+
"version": "7.25.2",
|
|
4
4
|
"description": "Table plugin for the @atlaskit/editor",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -128,6 +128,9 @@
|
|
|
128
128
|
},
|
|
129
129
|
"platform_editor_react_18_table_column_resize_hover": {
|
|
130
130
|
"type": "boolean"
|
|
131
|
+
},
|
|
132
|
+
"platform_editor_react_18_table_insertion_cursor": {
|
|
133
|
+
"type": "boolean"
|
|
131
134
|
}
|
|
132
135
|
}
|
|
133
136
|
}
|
package/src/nodeviews/table.tsx
CHANGED
|
@@ -316,7 +316,16 @@ export default class TableView extends ReactNodeView<Props> {
|
|
|
316
316
|
}
|
|
317
317
|
|
|
318
318
|
ignoreMutation(mutation: MutationRecord | { type: 'selection'; target: Element }) {
|
|
319
|
-
|
|
319
|
+
const ignoreMutation = ignoreMutationDelegate(mutation);
|
|
320
|
+
if (fg('platform_editor_react_18_table_insertion_cursor')) {
|
|
321
|
+
if (ignoreMutation) {
|
|
322
|
+
if (!this.contentDOM) {
|
|
323
|
+
return true;
|
|
324
|
+
}
|
|
325
|
+
return !this.contentDOM.contains(mutation.target) && mutation.type !== 'selection';
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
return ignoreMutation;
|
|
320
329
|
}
|
|
321
330
|
|
|
322
331
|
destroy() {
|