@atlaskit/editor-plugin-table 10.7.0 → 10.7.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 +18 -0
- package/dist/cjs/nodeviews/TableRow.js +19 -23
- package/dist/cjs/ui/toolbar.js +2 -2
- package/dist/es2019/nodeviews/TableRow.js +19 -23
- package/dist/es2019/ui/toolbar.js +2 -2
- package/dist/esm/nodeviews/TableRow.js +19 -23
- package/dist/esm/ui/toolbar.js +2 -2
- package/package.json +5 -11
- package/src/nodeviews/TableRow.ts +17 -21
- package/src/ui/toolbar.tsx +6 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-table
|
|
2
2
|
|
|
3
|
+
## 10.7.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#139729](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/139729)
|
|
8
|
+
[`3a23a5ad84d94`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3a23a5ad84d94) -
|
|
9
|
+
ED-27404 remove platform_editor_react18_stickyheaders_fix feature gate.
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 10.7.1
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [#139216](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/139216)
|
|
17
|
+
[`e8f596d2b1910`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e8f596d2b1910) -
|
|
18
|
+
[ux] Cleaned up platform_editor_controls_patch_1 FG
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
3
21
|
## 10.7.0
|
|
4
22
|
|
|
5
23
|
### Minor Changes
|
|
@@ -291,31 +291,27 @@ var TableRow = exports.default = /*#__PURE__*/function (_TableNodeView) {
|
|
|
291
291
|
}
|
|
292
292
|
});
|
|
293
293
|
};
|
|
294
|
-
if ((
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
tableContainerObserver.disconnect();
|
|
307
|
-
}
|
|
308
|
-
});
|
|
309
|
-
var mutatingNode = tableContainer;
|
|
310
|
-
if (mutatingNode) {
|
|
311
|
-
tableContainerObserver.observe(mutatingNode, {
|
|
312
|
-
subtree: true,
|
|
313
|
-
childList: true
|
|
314
|
-
});
|
|
294
|
+
if (sentinelsInDom()) {
|
|
295
|
+
// great - DOM ready, observe as normal
|
|
296
|
+
observeStickySentinels();
|
|
297
|
+
} else {
|
|
298
|
+
// concurrent loading issue - here TableRow is too eager trying to
|
|
299
|
+
// observe sentinels before they are in the DOM, use MutationObserver
|
|
300
|
+
// to wait for sentinels to be added to the parent Table node DOM
|
|
301
|
+
// then attach the IntersectionObserver
|
|
302
|
+
var tableContainerObserver = new MutationObserver(function () {
|
|
303
|
+
if (sentinelsInDom()) {
|
|
304
|
+
observeStickySentinels();
|
|
305
|
+
tableContainerObserver.disconnect();
|
|
315
306
|
}
|
|
307
|
+
});
|
|
308
|
+
var mutatingNode = tableContainer;
|
|
309
|
+
if (mutatingNode) {
|
|
310
|
+
tableContainerObserver.observe(mutatingNode, {
|
|
311
|
+
subtree: true,
|
|
312
|
+
childList: true
|
|
313
|
+
});
|
|
316
314
|
}
|
|
317
|
-
} else {
|
|
318
|
-
observeStickySentinels();
|
|
319
315
|
}
|
|
320
316
|
}
|
|
321
317
|
});
|
package/dist/cjs/ui/toolbar.js
CHANGED
|
@@ -487,12 +487,12 @@ var getToolbarConfig = exports.getToolbarConfig = function getToolbarConfig(getE
|
|
|
487
487
|
};
|
|
488
488
|
var isNestedTable = (0, _platformFeatureFlags.fg)('platform_editor_use_nested_table_pm_nodes') && (0, _nesting.isSelectionTableNestedInTable)(state);
|
|
489
489
|
var hoverTableProps = function hoverTableProps(isInDanger, isSelected) {
|
|
490
|
-
return
|
|
490
|
+
return {
|
|
491
491
|
onMouseEnter: (0, _commands.hoverTable)(isInDanger, isSelected),
|
|
492
492
|
onMouseLeave: (0, _commands.clearHoverSelection)(),
|
|
493
493
|
onFocus: (0, _commands.hoverTable)(isInDanger, isSelected),
|
|
494
494
|
onBlur: (0, _commands.clearHoverSelection)()
|
|
495
|
-
}
|
|
495
|
+
};
|
|
496
496
|
};
|
|
497
497
|
return {
|
|
498
498
|
title: toolbarTitle,
|
|
@@ -256,31 +256,27 @@ export default class TableRow extends TableNodeView {
|
|
|
256
256
|
}
|
|
257
257
|
});
|
|
258
258
|
};
|
|
259
|
-
if (
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
tableContainerObserver.disconnect();
|
|
272
|
-
}
|
|
273
|
-
});
|
|
274
|
-
const mutatingNode = tableContainer;
|
|
275
|
-
if (mutatingNode) {
|
|
276
|
-
tableContainerObserver.observe(mutatingNode, {
|
|
277
|
-
subtree: true,
|
|
278
|
-
childList: true
|
|
279
|
-
});
|
|
259
|
+
if (sentinelsInDom()) {
|
|
260
|
+
// great - DOM ready, observe as normal
|
|
261
|
+
observeStickySentinels();
|
|
262
|
+
} else {
|
|
263
|
+
// concurrent loading issue - here TableRow is too eager trying to
|
|
264
|
+
// observe sentinels before they are in the DOM, use MutationObserver
|
|
265
|
+
// to wait for sentinels to be added to the parent Table node DOM
|
|
266
|
+
// then attach the IntersectionObserver
|
|
267
|
+
const tableContainerObserver = new MutationObserver(() => {
|
|
268
|
+
if (sentinelsInDom()) {
|
|
269
|
+
observeStickySentinels();
|
|
270
|
+
tableContainerObserver.disconnect();
|
|
280
271
|
}
|
|
272
|
+
});
|
|
273
|
+
const mutatingNode = tableContainer;
|
|
274
|
+
if (mutatingNode) {
|
|
275
|
+
tableContainerObserver.observe(mutatingNode, {
|
|
276
|
+
subtree: true,
|
|
277
|
+
childList: true
|
|
278
|
+
});
|
|
281
279
|
}
|
|
282
|
-
} else {
|
|
283
|
-
observeStickySentinels();
|
|
284
280
|
}
|
|
285
281
|
}
|
|
286
282
|
});
|
|
@@ -457,12 +457,12 @@ export const getToolbarConfig = (getEditorContainerWidth, api, editorAnalyticsAP
|
|
|
457
457
|
}]
|
|
458
458
|
};
|
|
459
459
|
const isNestedTable = fg('platform_editor_use_nested_table_pm_nodes') && isSelectionTableNestedInTable(state);
|
|
460
|
-
const hoverTableProps = (isInDanger, isSelected) =>
|
|
460
|
+
const hoverTableProps = (isInDanger, isSelected) => ({
|
|
461
461
|
onMouseEnter: hoverTable(isInDanger, isSelected),
|
|
462
462
|
onMouseLeave: clearHoverSelection(),
|
|
463
463
|
onFocus: hoverTable(isInDanger, isSelected),
|
|
464
464
|
onBlur: clearHoverSelection()
|
|
465
|
-
}
|
|
465
|
+
});
|
|
466
466
|
return {
|
|
467
467
|
title: toolbarTitle,
|
|
468
468
|
getDomRef,
|
|
@@ -284,31 +284,27 @@ var TableRow = /*#__PURE__*/function (_TableNodeView) {
|
|
|
284
284
|
}
|
|
285
285
|
});
|
|
286
286
|
};
|
|
287
|
-
if (
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
tableContainerObserver.disconnect();
|
|
300
|
-
}
|
|
301
|
-
});
|
|
302
|
-
var mutatingNode = tableContainer;
|
|
303
|
-
if (mutatingNode) {
|
|
304
|
-
tableContainerObserver.observe(mutatingNode, {
|
|
305
|
-
subtree: true,
|
|
306
|
-
childList: true
|
|
307
|
-
});
|
|
287
|
+
if (sentinelsInDom()) {
|
|
288
|
+
// great - DOM ready, observe as normal
|
|
289
|
+
observeStickySentinels();
|
|
290
|
+
} else {
|
|
291
|
+
// concurrent loading issue - here TableRow is too eager trying to
|
|
292
|
+
// observe sentinels before they are in the DOM, use MutationObserver
|
|
293
|
+
// to wait for sentinels to be added to the parent Table node DOM
|
|
294
|
+
// then attach the IntersectionObserver
|
|
295
|
+
var tableContainerObserver = new MutationObserver(function () {
|
|
296
|
+
if (sentinelsInDom()) {
|
|
297
|
+
observeStickySentinels();
|
|
298
|
+
tableContainerObserver.disconnect();
|
|
308
299
|
}
|
|
300
|
+
});
|
|
301
|
+
var mutatingNode = tableContainer;
|
|
302
|
+
if (mutatingNode) {
|
|
303
|
+
tableContainerObserver.observe(mutatingNode, {
|
|
304
|
+
subtree: true,
|
|
305
|
+
childList: true
|
|
306
|
+
});
|
|
309
307
|
}
|
|
310
|
-
} else {
|
|
311
|
-
observeStickySentinels();
|
|
312
308
|
}
|
|
313
309
|
}
|
|
314
310
|
});
|
package/dist/esm/ui/toolbar.js
CHANGED
|
@@ -479,12 +479,12 @@ export var getToolbarConfig = function getToolbarConfig(getEditorContainerWidth,
|
|
|
479
479
|
};
|
|
480
480
|
var isNestedTable = fg('platform_editor_use_nested_table_pm_nodes') && isSelectionTableNestedInTable(state);
|
|
481
481
|
var hoverTableProps = function hoverTableProps(isInDanger, isSelected) {
|
|
482
|
-
return
|
|
482
|
+
return {
|
|
483
483
|
onMouseEnter: hoverTable(isInDanger, isSelected),
|
|
484
484
|
onMouseLeave: clearHoverSelection(),
|
|
485
485
|
onFocus: hoverTable(isInDanger, isSelected),
|
|
486
486
|
onBlur: clearHoverSelection()
|
|
487
|
-
}
|
|
487
|
+
};
|
|
488
488
|
};
|
|
489
489
|
return {
|
|
490
490
|
title: toolbarTitle,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-table",
|
|
3
|
-
"version": "10.7.
|
|
3
|
+
"version": "10.7.2",
|
|
4
4
|
"description": "Table plugin for the @atlaskit/editor",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -32,21 +32,21 @@
|
|
|
32
32
|
"@atlaskit/adf-schema": "^47.6.0",
|
|
33
33
|
"@atlaskit/button": "^23.0.0",
|
|
34
34
|
"@atlaskit/custom-steps": "^0.11.0",
|
|
35
|
-
"@atlaskit/editor-common": "^103.
|
|
35
|
+
"@atlaskit/editor-common": "^103.6.0",
|
|
36
36
|
"@atlaskit/editor-palette": "^2.1.0",
|
|
37
37
|
"@atlaskit/editor-plugin-accessibility-utils": "^2.0.0",
|
|
38
38
|
"@atlaskit/editor-plugin-analytics": "^2.2.0",
|
|
39
39
|
"@atlaskit/editor-plugin-batch-attribute-updates": "^2.1.0",
|
|
40
40
|
"@atlaskit/editor-plugin-content-insertion": "^2.1.0",
|
|
41
41
|
"@atlaskit/editor-plugin-editor-viewmode": "^3.1.0",
|
|
42
|
-
"@atlaskit/editor-plugin-extension": "5.2.
|
|
42
|
+
"@atlaskit/editor-plugin-extension": "5.2.4",
|
|
43
43
|
"@atlaskit/editor-plugin-guideline": "^2.0.0",
|
|
44
44
|
"@atlaskit/editor-plugin-selection": "^2.1.0",
|
|
45
45
|
"@atlaskit/editor-plugin-width": "^3.0.0",
|
|
46
46
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
47
47
|
"@atlaskit/editor-shared-styles": "^3.4.0",
|
|
48
48
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
49
|
-
"@atlaskit/icon": "^25.
|
|
49
|
+
"@atlaskit/icon": "^25.6.0",
|
|
50
50
|
"@atlaskit/menu": "^3.2.0",
|
|
51
51
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
52
52
|
"@atlaskit/pragmatic-drag-and-drop": "^1.5.0",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.0.0",
|
|
55
55
|
"@atlaskit/primitives": "^14.4.0",
|
|
56
56
|
"@atlaskit/theme": "^18.0.0",
|
|
57
|
-
"@atlaskit/tmp-editor-statsig": "^4.
|
|
57
|
+
"@atlaskit/tmp-editor-statsig": "^4.7.0",
|
|
58
58
|
"@atlaskit/toggle": "^15.0.0",
|
|
59
59
|
"@atlaskit/tokens": "^4.7.0",
|
|
60
60
|
"@atlaskit/tooltip": "^20.0.0",
|
|
@@ -150,9 +150,6 @@
|
|
|
150
150
|
"platform_editor_nested_tables_bottom_sentinel": {
|
|
151
151
|
"type": "boolean"
|
|
152
152
|
},
|
|
153
|
-
"platform_editor_react18_stickyheaders_fix": {
|
|
154
|
-
"type": "boolean"
|
|
155
|
-
},
|
|
156
153
|
"platform_editor_nested_tables_bodied_extension_fix": {
|
|
157
154
|
"type": "boolean"
|
|
158
155
|
},
|
|
@@ -192,9 +189,6 @@
|
|
|
192
189
|
"platform_editor_nested_tables_cellselection_paste": {
|
|
193
190
|
"type": "boolean"
|
|
194
191
|
},
|
|
195
|
-
"platform_editor_controls_patch_1": {
|
|
196
|
-
"type": "boolean"
|
|
197
|
-
},
|
|
198
192
|
"platform_editor_number_column_sticky_header_broken": {
|
|
199
193
|
"type": "boolean"
|
|
200
194
|
},
|
|
@@ -333,29 +333,25 @@ export default class TableRow extends TableNodeView<HTMLTableRowElement> impleme
|
|
|
333
333
|
});
|
|
334
334
|
};
|
|
335
335
|
|
|
336
|
-
if (
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
tableContainerObserver.disconnect();
|
|
349
|
-
}
|
|
350
|
-
});
|
|
351
|
-
|
|
352
|
-
const mutatingNode = tableContainer;
|
|
353
|
-
if (mutatingNode) {
|
|
354
|
-
tableContainerObserver.observe(mutatingNode, { subtree: true, childList: true });
|
|
336
|
+
if (sentinelsInDom()) {
|
|
337
|
+
// great - DOM ready, observe as normal
|
|
338
|
+
observeStickySentinels();
|
|
339
|
+
} else {
|
|
340
|
+
// concurrent loading issue - here TableRow is too eager trying to
|
|
341
|
+
// observe sentinels before they are in the DOM, use MutationObserver
|
|
342
|
+
// to wait for sentinels to be added to the parent Table node DOM
|
|
343
|
+
// then attach the IntersectionObserver
|
|
344
|
+
const tableContainerObserver = new MutationObserver(() => {
|
|
345
|
+
if (sentinelsInDom()) {
|
|
346
|
+
observeStickySentinels();
|
|
347
|
+
tableContainerObserver.disconnect();
|
|
355
348
|
}
|
|
349
|
+
});
|
|
350
|
+
|
|
351
|
+
const mutatingNode = tableContainer;
|
|
352
|
+
if (mutatingNode) {
|
|
353
|
+
tableContainerObserver.observe(mutatingNode, { subtree: true, childList: true });
|
|
356
354
|
}
|
|
357
|
-
} else {
|
|
358
|
-
observeStickySentinels();
|
|
359
355
|
}
|
|
360
356
|
}
|
|
361
357
|
});
|
package/src/ui/toolbar.tsx
CHANGED
|
@@ -665,15 +665,12 @@ export const getToolbarConfig =
|
|
|
665
665
|
const isNestedTable =
|
|
666
666
|
fg('platform_editor_use_nested_table_pm_nodes') && isSelectionTableNestedInTable(state);
|
|
667
667
|
|
|
668
|
-
const hoverTableProps = (isInDanger?: boolean, isSelected?: boolean) =>
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
onBlur: clearHoverSelection(),
|
|
675
|
-
}
|
|
676
|
-
: undefined;
|
|
668
|
+
const hoverTableProps = (isInDanger?: boolean, isSelected?: boolean) => ({
|
|
669
|
+
onMouseEnter: hoverTable(isInDanger, isSelected),
|
|
670
|
+
onMouseLeave: clearHoverSelection(),
|
|
671
|
+
onFocus: hoverTable(isInDanger, isSelected),
|
|
672
|
+
onBlur: clearHoverSelection(),
|
|
673
|
+
});
|
|
677
674
|
|
|
678
675
|
return {
|
|
679
676
|
title: toolbarTitle,
|