@atlaskit/editor-plugin-table 10.5.7 → 10.5.9
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 +15 -0
- package/dist/cjs/ui/toolbar.js +11 -3
- package/dist/es2019/ui/toolbar.js +10 -2
- package/dist/esm/ui/toolbar.js +11 -3
- package/package.json +9 -6
- package/src/ui/toolbar.tsx +12 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-table
|
|
2
2
|
|
|
3
|
+
## 10.5.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 10.5.8
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#134468](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/134468)
|
|
14
|
+
[`e312ec529d05a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e312ec529d05a) -
|
|
15
|
+
[ux] Apply hover decoration when hovering on copy/delete button on overflow menu
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 10.5.7
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
package/dist/cjs/ui/toolbar.js
CHANGED
|
@@ -454,6 +454,14 @@ var getToolbarConfig = exports.getToolbarConfig = function getToolbarConfig(getE
|
|
|
454
454
|
}]
|
|
455
455
|
};
|
|
456
456
|
var isNestedTable = (0, _platformFeatureFlags.fg)('platform_editor_use_nested_table_pm_nodes') && (0, _nesting.isSelectionTableNestedInTable)(state);
|
|
457
|
+
var hoverTableProps = function hoverTableProps(isInDanger, isSelected) {
|
|
458
|
+
return (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_1') ? {
|
|
459
|
+
onMouseEnter: (0, _commands.hoverTable)(isInDanger, isSelected),
|
|
460
|
+
onMouseLeave: (0, _commands.clearHoverSelection)(),
|
|
461
|
+
onFocus: (0, _commands.hoverTable)(isInDanger, isSelected),
|
|
462
|
+
onBlur: (0, _commands.clearHoverSelection)()
|
|
463
|
+
} : undefined;
|
|
464
|
+
};
|
|
457
465
|
return {
|
|
458
466
|
title: 'Table floating controls',
|
|
459
467
|
getDomRef: getDomRef,
|
|
@@ -498,7 +506,7 @@ var getToolbarConfig = exports.getToolbarConfig = function getToolbarConfig(getE
|
|
|
498
506
|
}
|
|
499
507
|
});
|
|
500
508
|
}
|
|
501
|
-
}, {
|
|
509
|
+
}, _objectSpread({
|
|
502
510
|
title: intl.formatMessage(_messages.default.copyToClipboard),
|
|
503
511
|
onClick: function onClick() {
|
|
504
512
|
var _api$core, _api$floatingToolbar;
|
|
@@ -509,13 +517,13 @@ var getToolbarConfig = exports.getToolbarConfig = function getToolbarConfig(getE
|
|
|
509
517
|
icon: (0, _react.jsx)(_copy.default, {
|
|
510
518
|
label: intl.formatMessage(_messages.default.copyToClipboard)
|
|
511
519
|
})
|
|
512
|
-
}, {
|
|
520
|
+
}, hoverTableProps(false, true)), _objectSpread({
|
|
513
521
|
title: intl.formatMessage(_messages.default.delete),
|
|
514
522
|
onClick: (0, _commandsWithAnalytics.deleteTableWithAnalytics)(editorAnalyticsAPI),
|
|
515
523
|
icon: (0, _react.jsx)(_deleteEditorRemove.default, {
|
|
516
524
|
label: intl.formatMessage(_messages.default.delete)
|
|
517
525
|
})
|
|
518
|
-
}]
|
|
526
|
+
}, hoverTableProps(true))]
|
|
519
527
|
}])),
|
|
520
528
|
scrollable: true
|
|
521
529
|
};
|
|
@@ -426,6 +426,12 @@ export const getToolbarConfig = (getEditorContainerWidth, api, editorAnalyticsAP
|
|
|
426
426
|
}]
|
|
427
427
|
};
|
|
428
428
|
const isNestedTable = fg('platform_editor_use_nested_table_pm_nodes') && isSelectionTableNestedInTable(state);
|
|
429
|
+
const hoverTableProps = (isInDanger, isSelected) => fg('platform_editor_controls_patch_1') ? {
|
|
430
|
+
onMouseEnter: hoverTable(isInDanger, isSelected),
|
|
431
|
+
onMouseLeave: clearHoverSelection(),
|
|
432
|
+
onFocus: hoverTable(isInDanger, isSelected),
|
|
433
|
+
onBlur: clearHoverSelection()
|
|
434
|
+
} : undefined;
|
|
429
435
|
return {
|
|
430
436
|
title: 'Table floating controls',
|
|
431
437
|
getDomRef,
|
|
@@ -480,13 +486,15 @@ export const getToolbarConfig = (getEditorContainerWidth, api, editorAnalyticsAP
|
|
|
480
486
|
},
|
|
481
487
|
icon: jsx(CopyIcon, {
|
|
482
488
|
label: intl.formatMessage(commonMessages.copyToClipboard)
|
|
483
|
-
})
|
|
489
|
+
}),
|
|
490
|
+
...hoverTableProps(false, true)
|
|
484
491
|
}, {
|
|
485
492
|
title: intl.formatMessage(commonMessages.delete),
|
|
486
493
|
onClick: deleteTableWithAnalytics(editorAnalyticsAPI),
|
|
487
494
|
icon: jsx(DeleteIcon, {
|
|
488
495
|
label: intl.formatMessage(commonMessages.delete)
|
|
489
|
-
})
|
|
496
|
+
}),
|
|
497
|
+
...hoverTableProps(true)
|
|
490
498
|
}]
|
|
491
499
|
}])],
|
|
492
500
|
scrollable: true
|
package/dist/esm/ui/toolbar.js
CHANGED
|
@@ -446,6 +446,14 @@ export var getToolbarConfig = function getToolbarConfig(getEditorContainerWidth,
|
|
|
446
446
|
}]
|
|
447
447
|
};
|
|
448
448
|
var isNestedTable = fg('platform_editor_use_nested_table_pm_nodes') && isSelectionTableNestedInTable(state);
|
|
449
|
+
var hoverTableProps = function hoverTableProps(isInDanger, isSelected) {
|
|
450
|
+
return fg('platform_editor_controls_patch_1') ? {
|
|
451
|
+
onMouseEnter: hoverTable(isInDanger, isSelected),
|
|
452
|
+
onMouseLeave: clearHoverSelection(),
|
|
453
|
+
onFocus: hoverTable(isInDanger, isSelected),
|
|
454
|
+
onBlur: clearHoverSelection()
|
|
455
|
+
} : undefined;
|
|
456
|
+
};
|
|
449
457
|
return {
|
|
450
458
|
title: 'Table floating controls',
|
|
451
459
|
getDomRef: getDomRef,
|
|
@@ -490,7 +498,7 @@ export var getToolbarConfig = function getToolbarConfig(getEditorContainerWidth,
|
|
|
490
498
|
}
|
|
491
499
|
});
|
|
492
500
|
}
|
|
493
|
-
}, {
|
|
501
|
+
}, _objectSpread({
|
|
494
502
|
title: intl.formatMessage(commonMessages.copyToClipboard),
|
|
495
503
|
onClick: function onClick() {
|
|
496
504
|
var _api$core, _api$floatingToolbar;
|
|
@@ -501,13 +509,13 @@ export var getToolbarConfig = function getToolbarConfig(getEditorContainerWidth,
|
|
|
501
509
|
icon: jsx(CopyIcon, {
|
|
502
510
|
label: intl.formatMessage(commonMessages.copyToClipboard)
|
|
503
511
|
})
|
|
504
|
-
}, {
|
|
512
|
+
}, hoverTableProps(false, true)), _objectSpread({
|
|
505
513
|
title: intl.formatMessage(commonMessages.delete),
|
|
506
514
|
onClick: deleteTableWithAnalytics(editorAnalyticsAPI),
|
|
507
515
|
icon: jsx(DeleteIcon, {
|
|
508
516
|
label: intl.formatMessage(commonMessages.delete)
|
|
509
517
|
})
|
|
510
|
-
}]
|
|
518
|
+
}, hoverTableProps(true))]
|
|
511
519
|
}])),
|
|
512
520
|
scrollable: true
|
|
513
521
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-table",
|
|
3
|
-
"version": "10.5.
|
|
3
|
+
"version": "10.5.9",
|
|
4
4
|
"description": "Table plugin for the @atlaskit/editor",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -30,23 +30,23 @@
|
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@atlaskit/adf-schema": "^47.6.0",
|
|
33
|
-
"@atlaskit/button": "^
|
|
33
|
+
"@atlaskit/button": "^23.0.0",
|
|
34
34
|
"@atlaskit/custom-steps": "^0.11.0",
|
|
35
|
-
"@atlaskit/editor-common": "^102.
|
|
35
|
+
"@atlaskit/editor-common": "^102.16.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.0.0",
|
|
42
|
-
"@atlaskit/editor-plugin-extension": "5.1.
|
|
42
|
+
"@atlaskit/editor-plugin-extension": "5.1.2",
|
|
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.4.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.2.0",
|
|
56
56
|
"@atlaskit/theme": "^18.0.0",
|
|
57
|
-
"@atlaskit/tmp-editor-statsig": "^4.
|
|
57
|
+
"@atlaskit/tmp-editor-statsig": "^4.6.0",
|
|
58
58
|
"@atlaskit/toggle": "^15.0.0",
|
|
59
59
|
"@atlaskit/tokens": "^4.5.0",
|
|
60
60
|
"@atlaskit/tooltip": "^20.0.0",
|
|
@@ -194,6 +194,9 @@
|
|
|
194
194
|
},
|
|
195
195
|
"platform_editor_nested_tables_cellselection_paste": {
|
|
196
196
|
"type": "boolean"
|
|
197
|
+
},
|
|
198
|
+
"platform_editor_controls_patch_1": {
|
|
199
|
+
"type": "boolean"
|
|
197
200
|
}
|
|
198
201
|
}
|
|
199
202
|
}
|
package/src/ui/toolbar.tsx
CHANGED
|
@@ -634,6 +634,16 @@ export const getToolbarConfig =
|
|
|
634
634
|
const isNestedTable =
|
|
635
635
|
fg('platform_editor_use_nested_table_pm_nodes') && isSelectionTableNestedInTable(state);
|
|
636
636
|
|
|
637
|
+
const hoverTableProps = (isInDanger?: boolean, isSelected?: boolean) =>
|
|
638
|
+
fg('platform_editor_controls_patch_1')
|
|
639
|
+
? {
|
|
640
|
+
onMouseEnter: hoverTable(isInDanger, isSelected),
|
|
641
|
+
onMouseLeave: clearHoverSelection(),
|
|
642
|
+
onFocus: hoverTable(isInDanger, isSelected),
|
|
643
|
+
onBlur: clearHoverSelection(),
|
|
644
|
+
}
|
|
645
|
+
: undefined;
|
|
646
|
+
|
|
637
647
|
return {
|
|
638
648
|
title: 'Table floating controls',
|
|
639
649
|
getDomRef,
|
|
@@ -710,11 +720,13 @@ export const getToolbarConfig =
|
|
|
710
720
|
return true;
|
|
711
721
|
},
|
|
712
722
|
icon: <CopyIcon label={intl.formatMessage(commonMessages.copyToClipboard)} />,
|
|
723
|
+
...hoverTableProps(false, true),
|
|
713
724
|
},
|
|
714
725
|
{
|
|
715
726
|
title: intl.formatMessage(commonMessages.delete),
|
|
716
727
|
onClick: deleteTableWithAnalytics(editorAnalyticsAPI),
|
|
717
728
|
icon: <DeleteIcon label={intl.formatMessage(commonMessages.delete)} />,
|
|
729
|
+
...hoverTableProps(true),
|
|
718
730
|
},
|
|
719
731
|
],
|
|
720
732
|
},
|