@atlaskit/editor-plugin-selection-toolbar 2.1.1 → 2.1.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
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-selection-toolbar
|
|
2
2
|
|
|
3
|
+
## 2.1.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#128803](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/128803)
|
|
8
|
+
[`bee199a74385f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/bee199a74385f) -
|
|
9
|
+
[ux] Keeps docking options in the overlow menu even when the toolbar is docked to top.
|
|
10
|
+
|
|
3
11
|
## 2.1.1
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -46,34 +46,37 @@ var getOverflowFloatingToolbarConfig = exports.getOverflowFloatingToolbarConfig
|
|
|
46
46
|
label: ""
|
|
47
47
|
})
|
|
48
48
|
}];
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
49
|
+
var isDockedToTop = toolbarDocking === 'top';
|
|
50
|
+
dropdownOptions.push({
|
|
51
|
+
type: 'overflow-dropdown-heading',
|
|
52
|
+
title: 'Toolbar appears'
|
|
53
|
+
}, {
|
|
54
|
+
title: 'In-line with text',
|
|
55
|
+
onClick: function onClick() {
|
|
56
|
+
var _api$selectionToolbar, _api$selectionToolbar2, _api$selectionToolbar3;
|
|
57
|
+
return (_api$selectionToolbar = api === null || api === void 0 || (_api$selectionToolbar2 = api.selectionToolbar.actions) === null || _api$selectionToolbar2 === void 0 || (_api$selectionToolbar3 = _api$selectionToolbar2.setToolbarDocking) === null || _api$selectionToolbar3 === void 0 ? void 0 : _api$selectionToolbar3.call(_api$selectionToolbar2, 'none')) !== null && _api$selectionToolbar !== void 0 ? _api$selectionToolbar : false;
|
|
58
|
+
},
|
|
59
|
+
icon: (0, _react.jsx)(_ContextualToolbarIcon.ContextualToolbarIcon, {
|
|
60
|
+
label: "Contextual toolbar"
|
|
61
|
+
}),
|
|
62
|
+
selected: !isDockedToTop,
|
|
63
|
+
elemAfter: !isDockedToTop ? (0, _react.jsx)(_checkMark.default, {
|
|
64
|
+
label: ""
|
|
65
|
+
}) : undefined
|
|
66
|
+
}, {
|
|
67
|
+
title: 'Fixed at top',
|
|
68
|
+
onClick: function onClick() {
|
|
69
|
+
var _api$selectionToolbar4, _api$selectionToolbar5, _api$selectionToolbar6;
|
|
70
|
+
return (_api$selectionToolbar4 = api === null || api === void 0 || (_api$selectionToolbar5 = api.selectionToolbar.actions) === null || _api$selectionToolbar5 === void 0 || (_api$selectionToolbar6 = _api$selectionToolbar5.setToolbarDocking) === null || _api$selectionToolbar6 === void 0 ? void 0 : _api$selectionToolbar6.call(_api$selectionToolbar5, 'top')) !== null && _api$selectionToolbar4 !== void 0 ? _api$selectionToolbar4 : false;
|
|
71
|
+
},
|
|
72
|
+
icon: (0, _react.jsx)(_FixedToolbarIcon.FixedToolbarIcon, {
|
|
73
|
+
label: "Fixed toolbar"
|
|
74
|
+
}),
|
|
75
|
+
selected: isDockedToTop,
|
|
76
|
+
elemAfter: isDockedToTop ? (0, _react.jsx)(_checkMark.default, {
|
|
77
|
+
label: ""
|
|
78
|
+
}) : undefined
|
|
79
|
+
});
|
|
77
80
|
return [{
|
|
78
81
|
type: 'separator',
|
|
79
82
|
fullHeight: true
|
|
@@ -39,34 +39,37 @@ export const getOverflowFloatingToolbarConfig = ({
|
|
|
39
39
|
label: ""
|
|
40
40
|
})
|
|
41
41
|
}];
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
42
|
+
const isDockedToTop = toolbarDocking === 'top';
|
|
43
|
+
dropdownOptions.push({
|
|
44
|
+
type: 'overflow-dropdown-heading',
|
|
45
|
+
title: 'Toolbar appears'
|
|
46
|
+
}, {
|
|
47
|
+
title: 'In-line with text',
|
|
48
|
+
onClick: () => {
|
|
49
|
+
var _api$selectionToolbar, _api$selectionToolbar2, _api$selectionToolbar3;
|
|
50
|
+
return (_api$selectionToolbar = api === null || api === void 0 ? void 0 : (_api$selectionToolbar2 = api.selectionToolbar.actions) === null || _api$selectionToolbar2 === void 0 ? void 0 : (_api$selectionToolbar3 = _api$selectionToolbar2.setToolbarDocking) === null || _api$selectionToolbar3 === void 0 ? void 0 : _api$selectionToolbar3.call(_api$selectionToolbar2, 'none')) !== null && _api$selectionToolbar !== void 0 ? _api$selectionToolbar : false;
|
|
51
|
+
},
|
|
52
|
+
icon: jsx(ContextualToolbarIcon, {
|
|
53
|
+
label: "Contextual toolbar"
|
|
54
|
+
}),
|
|
55
|
+
selected: !isDockedToTop,
|
|
56
|
+
elemAfter: !isDockedToTop ? jsx(CheckMarkIcon, {
|
|
57
|
+
label: ""
|
|
58
|
+
}) : undefined
|
|
59
|
+
}, {
|
|
60
|
+
title: 'Fixed at top',
|
|
61
|
+
onClick: () => {
|
|
62
|
+
var _api$selectionToolbar4, _api$selectionToolbar5, _api$selectionToolbar6;
|
|
63
|
+
return (_api$selectionToolbar4 = api === null || api === void 0 ? void 0 : (_api$selectionToolbar5 = api.selectionToolbar.actions) === null || _api$selectionToolbar5 === void 0 ? void 0 : (_api$selectionToolbar6 = _api$selectionToolbar5.setToolbarDocking) === null || _api$selectionToolbar6 === void 0 ? void 0 : _api$selectionToolbar6.call(_api$selectionToolbar5, 'top')) !== null && _api$selectionToolbar4 !== void 0 ? _api$selectionToolbar4 : false;
|
|
64
|
+
},
|
|
65
|
+
icon: jsx(FixedToolbarIcon, {
|
|
66
|
+
label: "Fixed toolbar"
|
|
67
|
+
}),
|
|
68
|
+
selected: isDockedToTop,
|
|
69
|
+
elemAfter: isDockedToTop ? jsx(CheckMarkIcon, {
|
|
70
|
+
label: ""
|
|
71
|
+
}) : undefined
|
|
72
|
+
});
|
|
70
73
|
return [{
|
|
71
74
|
type: 'separator',
|
|
72
75
|
fullHeight: true
|
|
@@ -38,34 +38,37 @@ export var getOverflowFloatingToolbarConfig = function getOverflowFloatingToolba
|
|
|
38
38
|
label: ""
|
|
39
39
|
})
|
|
40
40
|
}];
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
41
|
+
var isDockedToTop = toolbarDocking === 'top';
|
|
42
|
+
dropdownOptions.push({
|
|
43
|
+
type: 'overflow-dropdown-heading',
|
|
44
|
+
title: 'Toolbar appears'
|
|
45
|
+
}, {
|
|
46
|
+
title: 'In-line with text',
|
|
47
|
+
onClick: function onClick() {
|
|
48
|
+
var _api$selectionToolbar, _api$selectionToolbar2, _api$selectionToolbar3;
|
|
49
|
+
return (_api$selectionToolbar = api === null || api === void 0 || (_api$selectionToolbar2 = api.selectionToolbar.actions) === null || _api$selectionToolbar2 === void 0 || (_api$selectionToolbar3 = _api$selectionToolbar2.setToolbarDocking) === null || _api$selectionToolbar3 === void 0 ? void 0 : _api$selectionToolbar3.call(_api$selectionToolbar2, 'none')) !== null && _api$selectionToolbar !== void 0 ? _api$selectionToolbar : false;
|
|
50
|
+
},
|
|
51
|
+
icon: jsx(ContextualToolbarIcon, {
|
|
52
|
+
label: "Contextual toolbar"
|
|
53
|
+
}),
|
|
54
|
+
selected: !isDockedToTop,
|
|
55
|
+
elemAfter: !isDockedToTop ? jsx(CheckMarkIcon, {
|
|
56
|
+
label: ""
|
|
57
|
+
}) : undefined
|
|
58
|
+
}, {
|
|
59
|
+
title: 'Fixed at top',
|
|
60
|
+
onClick: function onClick() {
|
|
61
|
+
var _api$selectionToolbar4, _api$selectionToolbar5, _api$selectionToolbar6;
|
|
62
|
+
return (_api$selectionToolbar4 = api === null || api === void 0 || (_api$selectionToolbar5 = api.selectionToolbar.actions) === null || _api$selectionToolbar5 === void 0 || (_api$selectionToolbar6 = _api$selectionToolbar5.setToolbarDocking) === null || _api$selectionToolbar6 === void 0 ? void 0 : _api$selectionToolbar6.call(_api$selectionToolbar5, 'top')) !== null && _api$selectionToolbar4 !== void 0 ? _api$selectionToolbar4 : false;
|
|
63
|
+
},
|
|
64
|
+
icon: jsx(FixedToolbarIcon, {
|
|
65
|
+
label: "Fixed toolbar"
|
|
66
|
+
}),
|
|
67
|
+
selected: isDockedToTop,
|
|
68
|
+
elemAfter: isDockedToTop ? jsx(CheckMarkIcon, {
|
|
69
|
+
label: ""
|
|
70
|
+
}) : undefined
|
|
71
|
+
});
|
|
69
72
|
return [{
|
|
70
73
|
type: 'separator',
|
|
71
74
|
fullHeight: true
|
package/package.json
CHANGED