@atlaskit/editor-plugin-alignment 3.1.9 → 3.1.10
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 +9 -0
- package/dist/cjs/ui/ToolbarAlignment/index.js +78 -2
- package/dist/es2019/ui/ToolbarAlignment/index.js +76 -4
- package/dist/esm/ui/ToolbarAlignment/index.js +80 -4
- package/dist/types/ui/ToolbarAlignment/index.d.ts +1 -0
- package/dist/types-ts4.5/ui/ToolbarAlignment/index.d.ts +1 -0
- package/package.json +10 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-alignment
|
|
2
2
|
|
|
3
|
+
## 3.1.10
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#142312](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/142312)
|
|
8
|
+
[`21eed5379866d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/21eed5379866d) -
|
|
9
|
+
[ux] Update the look of alignment options dropdown.
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
3
12
|
## 3.1.9
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -16,10 +16,15 @@ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits
|
|
|
16
16
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
17
17
|
var _react = _interopRequireDefault(require("react"));
|
|
18
18
|
var _reactIntlNext = require("react-intl-next");
|
|
19
|
+
var _keymaps = require("@atlaskit/editor-common/keymaps");
|
|
19
20
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
20
21
|
var _types = require("@atlaskit/editor-common/types");
|
|
21
22
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
22
23
|
var _uiMenu = require("@atlaskit/editor-common/ui-menu");
|
|
24
|
+
var _alignTextCenter = _interopRequireDefault(require("@atlaskit/icon/core/align-text-center"));
|
|
25
|
+
var _alignTextLeft = _interopRequireDefault(require("@atlaskit/icon/core/align-text-left"));
|
|
26
|
+
var _alignTextRight = _interopRequireDefault(require("@atlaskit/icon/core/align-text-right"));
|
|
27
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
23
28
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
24
29
|
var _types2 = require("../../pm-plugins/types");
|
|
25
30
|
var _Alignment = _interopRequireDefault(require("../Alignment"));
|
|
@@ -58,6 +63,12 @@ var AlignmentToolbar = exports.AlignmentToolbar = /*#__PURE__*/function (_React$
|
|
|
58
63
|
});
|
|
59
64
|
}
|
|
60
65
|
});
|
|
66
|
+
(0, _defineProperty2.default)(_this, "handleOnItemActivated", function (_ref) {
|
|
67
|
+
var item = _ref.item,
|
|
68
|
+
_ref$shouldCloseMenu = _ref.shouldCloseMenu,
|
|
69
|
+
shouldCloseMenu = _ref$shouldCloseMenu === void 0 ? true : _ref$shouldCloseMenu;
|
|
70
|
+
return _this.changeAlignment(item.value.name, shouldCloseMenu);
|
|
71
|
+
});
|
|
61
72
|
(0, _defineProperty2.default)(_this, "hide", function (attrs) {
|
|
62
73
|
if (_this.state.isOpen) {
|
|
63
74
|
_this.setState({
|
|
@@ -101,7 +112,7 @@ var AlignmentToolbar = exports.AlignmentToolbar = /*#__PURE__*/function (_React$
|
|
|
101
112
|
}) ? 'compact' : 'none';
|
|
102
113
|
if (toolbarType === _types2.ToolbarType.PRIMARY && toolbarSize && toolbarSize > _types.ToolbarSize.XL && (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1', {
|
|
103
114
|
exposure: true
|
|
104
|
-
})) {
|
|
115
|
+
}) && !(0, _platformFeatureFlags.fg)('platform_editor_controls_patch_6')) {
|
|
105
116
|
return /*#__PURE__*/_react.default.createElement(_Alignment.default, {
|
|
106
117
|
onClick: function onClick(align) {
|
|
107
118
|
return _this2.changeAlignment(align, false);
|
|
@@ -109,7 +120,72 @@ var AlignmentToolbar = exports.AlignmentToolbar = /*#__PURE__*/function (_React$
|
|
|
109
120
|
className: (0, _runtime.ax)(["_ca0qze3t _u5f3ze3t _n3tdze3t _19bvze3t"])
|
|
110
121
|
});
|
|
111
122
|
}
|
|
112
|
-
|
|
123
|
+
var items = [{
|
|
124
|
+
key: 'alignmentLeft',
|
|
125
|
+
content: intl.formatMessage(_messages.alignmentMessages.alignLeft),
|
|
126
|
+
value: {
|
|
127
|
+
name: 'start'
|
|
128
|
+
},
|
|
129
|
+
isActive: (pluginState === null || pluginState === void 0 ? void 0 : pluginState.align) === 'start',
|
|
130
|
+
elemAfter: /*#__PURE__*/_react.default.createElement(_ui.Shortcut, null, (0, _keymaps.tooltip)(_keymaps.alignLeft)),
|
|
131
|
+
elemBefore: /*#__PURE__*/_react.default.createElement(_alignTextLeft.default, {
|
|
132
|
+
label: ""
|
|
133
|
+
})
|
|
134
|
+
}, {
|
|
135
|
+
key: 'alignmentCenter',
|
|
136
|
+
content: intl.formatMessage(_messages.alignmentMessages.alignCenter),
|
|
137
|
+
value: {
|
|
138
|
+
name: 'center'
|
|
139
|
+
},
|
|
140
|
+
isActive: (pluginState === null || pluginState === void 0 ? void 0 : pluginState.align) === 'center',
|
|
141
|
+
elemAfter: /*#__PURE__*/_react.default.createElement(_ui.Shortcut, null, (0, _keymaps.tooltip)(_keymaps.alignCenter)),
|
|
142
|
+
elemBefore: /*#__PURE__*/_react.default.createElement(_alignTextCenter.default, {
|
|
143
|
+
label: ""
|
|
144
|
+
})
|
|
145
|
+
}, {
|
|
146
|
+
key: 'alignmentRight',
|
|
147
|
+
content: intl.formatMessage(_messages.alignmentMessages.alignRight),
|
|
148
|
+
value: {
|
|
149
|
+
name: 'end'
|
|
150
|
+
},
|
|
151
|
+
isActive: (pluginState === null || pluginState === void 0 ? void 0 : pluginState.align) === 'end',
|
|
152
|
+
elemAfter: /*#__PURE__*/_react.default.createElement(_ui.Shortcut, null, (0, _keymaps.tooltip)(_keymaps.alignRight)),
|
|
153
|
+
elemBefore: /*#__PURE__*/_react.default.createElement(_alignTextRight.default, {
|
|
154
|
+
label: ""
|
|
155
|
+
})
|
|
156
|
+
}];
|
|
157
|
+
return /*#__PURE__*/_react.default.createElement(_ui.ToolbarDropdownWrapper, null, (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') && (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_6') ? /*#__PURE__*/_react.default.createElement(_uiMenu.DropdownMenuWithKeyboardNavigation, {
|
|
158
|
+
arrowKeyNavigationProviderOptions: {
|
|
159
|
+
type: _uiMenu.ArrowKeyNavigationType.MENU
|
|
160
|
+
},
|
|
161
|
+
items: [{
|
|
162
|
+
items: items
|
|
163
|
+
}],
|
|
164
|
+
isOpen: isOpen,
|
|
165
|
+
onItemActivated: this.handleOnItemActivated,
|
|
166
|
+
onOpenChange: function onOpenChange(attrs) {
|
|
167
|
+
return _this2.setState({
|
|
168
|
+
isOpen: attrs === null || attrs === void 0 ? void 0 : attrs.isOpen
|
|
169
|
+
});
|
|
170
|
+
},
|
|
171
|
+
mountTo: popupsMountPoint,
|
|
172
|
+
boundariesElement: popupsBoundariesElement,
|
|
173
|
+
scrollableElement: popupsScrollableElement,
|
|
174
|
+
fitWidth: 200
|
|
175
|
+
}, /*#__PURE__*/_react.default.createElement(_uiMenu.ToolbarButton, {
|
|
176
|
+
spacing: isReducedSpacing ? reducedSpacing : 'default',
|
|
177
|
+
disabled: disabled,
|
|
178
|
+
selected: isOpen,
|
|
179
|
+
title: title,
|
|
180
|
+
"aria-label": title,
|
|
181
|
+
"aria-expanded": isOpen,
|
|
182
|
+
"aria-haspopup": true,
|
|
183
|
+
onClick: this.toggleOpen,
|
|
184
|
+
onKeyDown: this.toggleOpenByKeyboard,
|
|
185
|
+
iconBefore: /*#__PURE__*/_react.default.createElement(_ui.ToolbarDropdownTriggerWrapper, null, /*#__PURE__*/_react.default.createElement(_iconMap.IconMap, {
|
|
186
|
+
alignment: alignment
|
|
187
|
+
}), /*#__PURE__*/_react.default.createElement(_ui.ToolbarExpandIcon, null))
|
|
188
|
+
})) : /*#__PURE__*/_react.default.createElement(_uiMenu.DropdownContainer, {
|
|
113
189
|
mountTo: popupsMountPoint,
|
|
114
190
|
boundariesElement: popupsBoundariesElement,
|
|
115
191
|
scrollableElement: popupsScrollableElement,
|
|
@@ -4,10 +4,15 @@ import "./index.compiled.css";
|
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { injectIntl } from 'react-intl-next';
|
|
7
|
+
import { alignCenter, alignLeft, alignRight, tooltip } from '@atlaskit/editor-common/keymaps';
|
|
7
8
|
import { alignmentMessages as messages } from '@atlaskit/editor-common/messages';
|
|
8
9
|
import { ToolbarSize } from '@atlaskit/editor-common/types';
|
|
9
|
-
import { ToolbarDropdownTriggerWrapper, ToolbarDropdownWrapper, ToolbarExpandIcon, ToolbarSeparator } from '@atlaskit/editor-common/ui';
|
|
10
|
-
import { ArrowKeyNavigationType, DropdownContainer as Dropdown, ToolbarButton } from '@atlaskit/editor-common/ui-menu';
|
|
10
|
+
import { Shortcut, ToolbarDropdownTriggerWrapper, ToolbarDropdownWrapper, ToolbarExpandIcon, ToolbarSeparator } from '@atlaskit/editor-common/ui';
|
|
11
|
+
import { ArrowKeyNavigationType, DropdownContainer as Dropdown, DropdownMenuWithKeyboardNavigation as DropdownMenu, ToolbarButton } from '@atlaskit/editor-common/ui-menu';
|
|
12
|
+
import AlignTextCenterIcon from '@atlaskit/icon/core/align-text-center';
|
|
13
|
+
import AlignTextLeftIcon from '@atlaskit/icon/core/align-text-left';
|
|
14
|
+
import AlignTextRightIcon from '@atlaskit/icon/core/align-text-right';
|
|
15
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
11
16
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
12
17
|
import { ToolbarType } from '../../pm-plugins/types';
|
|
13
18
|
import Alignment from '../Alignment';
|
|
@@ -39,6 +44,10 @@ export class AlignmentToolbar extends React.Component {
|
|
|
39
44
|
});
|
|
40
45
|
}
|
|
41
46
|
});
|
|
47
|
+
_defineProperty(this, "handleOnItemActivated", ({
|
|
48
|
+
item,
|
|
49
|
+
shouldCloseMenu = true
|
|
50
|
+
}) => this.changeAlignment(item.value.name, shouldCloseMenu));
|
|
42
51
|
_defineProperty(this, "hide", attrs => {
|
|
43
52
|
if (this.state.isOpen) {
|
|
44
53
|
this.setState({
|
|
@@ -80,13 +89,76 @@ export class AlignmentToolbar extends React.Component {
|
|
|
80
89
|
}) ? 'compact' : 'none';
|
|
81
90
|
if (toolbarType === ToolbarType.PRIMARY && toolbarSize && toolbarSize > ToolbarSize.XL && editorExperiment('platform_editor_controls', 'variant1', {
|
|
82
91
|
exposure: true
|
|
83
|
-
})) {
|
|
92
|
+
}) && !fg('platform_editor_controls_patch_6')) {
|
|
84
93
|
return /*#__PURE__*/React.createElement(Alignment, {
|
|
85
94
|
onClick: align => this.changeAlignment(align, false),
|
|
86
95
|
className: ax(["_ca0qze3t _u5f3ze3t _n3tdze3t _19bvze3t"])
|
|
87
96
|
});
|
|
88
97
|
}
|
|
89
|
-
|
|
98
|
+
const items = [{
|
|
99
|
+
key: 'alignmentLeft',
|
|
100
|
+
content: intl.formatMessage(messages.alignLeft),
|
|
101
|
+
value: {
|
|
102
|
+
name: 'start'
|
|
103
|
+
},
|
|
104
|
+
isActive: (pluginState === null || pluginState === void 0 ? void 0 : pluginState.align) === 'start',
|
|
105
|
+
elemAfter: /*#__PURE__*/React.createElement(Shortcut, null, tooltip(alignLeft)),
|
|
106
|
+
elemBefore: /*#__PURE__*/React.createElement(AlignTextLeftIcon, {
|
|
107
|
+
label: ""
|
|
108
|
+
})
|
|
109
|
+
}, {
|
|
110
|
+
key: 'alignmentCenter',
|
|
111
|
+
content: intl.formatMessage(messages.alignCenter),
|
|
112
|
+
value: {
|
|
113
|
+
name: 'center'
|
|
114
|
+
},
|
|
115
|
+
isActive: (pluginState === null || pluginState === void 0 ? void 0 : pluginState.align) === 'center',
|
|
116
|
+
elemAfter: /*#__PURE__*/React.createElement(Shortcut, null, tooltip(alignCenter)),
|
|
117
|
+
elemBefore: /*#__PURE__*/React.createElement(AlignTextCenterIcon, {
|
|
118
|
+
label: ""
|
|
119
|
+
})
|
|
120
|
+
}, {
|
|
121
|
+
key: 'alignmentRight',
|
|
122
|
+
content: intl.formatMessage(messages.alignRight),
|
|
123
|
+
value: {
|
|
124
|
+
name: 'end'
|
|
125
|
+
},
|
|
126
|
+
isActive: (pluginState === null || pluginState === void 0 ? void 0 : pluginState.align) === 'end',
|
|
127
|
+
elemAfter: /*#__PURE__*/React.createElement(Shortcut, null, tooltip(alignRight)),
|
|
128
|
+
elemBefore: /*#__PURE__*/React.createElement(AlignTextRightIcon, {
|
|
129
|
+
label: ""
|
|
130
|
+
})
|
|
131
|
+
}];
|
|
132
|
+
return /*#__PURE__*/React.createElement(ToolbarDropdownWrapper, null, editorExperiment('platform_editor_controls', 'variant1') && fg('platform_editor_controls_patch_6') ? /*#__PURE__*/React.createElement(DropdownMenu, {
|
|
133
|
+
arrowKeyNavigationProviderOptions: {
|
|
134
|
+
type: ArrowKeyNavigationType.MENU
|
|
135
|
+
},
|
|
136
|
+
items: [{
|
|
137
|
+
items
|
|
138
|
+
}],
|
|
139
|
+
isOpen: isOpen,
|
|
140
|
+
onItemActivated: this.handleOnItemActivated,
|
|
141
|
+
onOpenChange: attrs => this.setState({
|
|
142
|
+
isOpen: attrs === null || attrs === void 0 ? void 0 : attrs.isOpen
|
|
143
|
+
}),
|
|
144
|
+
mountTo: popupsMountPoint,
|
|
145
|
+
boundariesElement: popupsBoundariesElement,
|
|
146
|
+
scrollableElement: popupsScrollableElement,
|
|
147
|
+
fitWidth: 200
|
|
148
|
+
}, /*#__PURE__*/React.createElement(ToolbarButton, {
|
|
149
|
+
spacing: isReducedSpacing ? reducedSpacing : 'default',
|
|
150
|
+
disabled: disabled,
|
|
151
|
+
selected: isOpen,
|
|
152
|
+
title: title,
|
|
153
|
+
"aria-label": title,
|
|
154
|
+
"aria-expanded": isOpen,
|
|
155
|
+
"aria-haspopup": true,
|
|
156
|
+
onClick: this.toggleOpen,
|
|
157
|
+
onKeyDown: this.toggleOpenByKeyboard,
|
|
158
|
+
iconBefore: /*#__PURE__*/React.createElement(ToolbarDropdownTriggerWrapper, null, /*#__PURE__*/React.createElement(IconMap, {
|
|
159
|
+
alignment: alignment
|
|
160
|
+
}), /*#__PURE__*/React.createElement(ToolbarExpandIcon, null))
|
|
161
|
+
})) : /*#__PURE__*/React.createElement(Dropdown, {
|
|
90
162
|
mountTo: popupsMountPoint,
|
|
91
163
|
boundariesElement: popupsBoundariesElement,
|
|
92
164
|
scrollableElement: popupsScrollableElement,
|
|
@@ -11,10 +11,15 @@ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstruct
|
|
|
11
11
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
12
12
|
import React from 'react';
|
|
13
13
|
import { injectIntl } from 'react-intl-next';
|
|
14
|
+
import { alignCenter, alignLeft, alignRight, tooltip } from '@atlaskit/editor-common/keymaps';
|
|
14
15
|
import { alignmentMessages as messages } from '@atlaskit/editor-common/messages';
|
|
15
16
|
import { ToolbarSize } from '@atlaskit/editor-common/types';
|
|
16
|
-
import { ToolbarDropdownTriggerWrapper, ToolbarDropdownWrapper, ToolbarExpandIcon, ToolbarSeparator } from '@atlaskit/editor-common/ui';
|
|
17
|
-
import { ArrowKeyNavigationType, DropdownContainer as Dropdown, ToolbarButton } from '@atlaskit/editor-common/ui-menu';
|
|
17
|
+
import { Shortcut, ToolbarDropdownTriggerWrapper, ToolbarDropdownWrapper, ToolbarExpandIcon, ToolbarSeparator } from '@atlaskit/editor-common/ui';
|
|
18
|
+
import { ArrowKeyNavigationType, DropdownContainer as Dropdown, DropdownMenuWithKeyboardNavigation as DropdownMenu, ToolbarButton } from '@atlaskit/editor-common/ui-menu';
|
|
19
|
+
import AlignTextCenterIcon from '@atlaskit/icon/core/align-text-center';
|
|
20
|
+
import AlignTextLeftIcon from '@atlaskit/icon/core/align-text-left';
|
|
21
|
+
import AlignTextRightIcon from '@atlaskit/icon/core/align-text-right';
|
|
22
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
18
23
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
19
24
|
import { ToolbarType } from '../../pm-plugins/types';
|
|
20
25
|
import Alignment from '../Alignment';
|
|
@@ -51,6 +56,12 @@ export var AlignmentToolbar = /*#__PURE__*/function (_React$Component) {
|
|
|
51
56
|
});
|
|
52
57
|
}
|
|
53
58
|
});
|
|
59
|
+
_defineProperty(_this, "handleOnItemActivated", function (_ref) {
|
|
60
|
+
var item = _ref.item,
|
|
61
|
+
_ref$shouldCloseMenu = _ref.shouldCloseMenu,
|
|
62
|
+
shouldCloseMenu = _ref$shouldCloseMenu === void 0 ? true : _ref$shouldCloseMenu;
|
|
63
|
+
return _this.changeAlignment(item.value.name, shouldCloseMenu);
|
|
64
|
+
});
|
|
54
65
|
_defineProperty(_this, "hide", function (attrs) {
|
|
55
66
|
if (_this.state.isOpen) {
|
|
56
67
|
_this.setState({
|
|
@@ -94,7 +105,7 @@ export var AlignmentToolbar = /*#__PURE__*/function (_React$Component) {
|
|
|
94
105
|
}) ? 'compact' : 'none';
|
|
95
106
|
if (toolbarType === ToolbarType.PRIMARY && toolbarSize && toolbarSize > ToolbarSize.XL && editorExperiment('platform_editor_controls', 'variant1', {
|
|
96
107
|
exposure: true
|
|
97
|
-
})) {
|
|
108
|
+
}) && !fg('platform_editor_controls_patch_6')) {
|
|
98
109
|
return /*#__PURE__*/React.createElement(Alignment, {
|
|
99
110
|
onClick: function onClick(align) {
|
|
100
111
|
return _this2.changeAlignment(align, false);
|
|
@@ -102,7 +113,72 @@ export var AlignmentToolbar = /*#__PURE__*/function (_React$Component) {
|
|
|
102
113
|
className: ax(["_ca0qze3t _u5f3ze3t _n3tdze3t _19bvze3t"])
|
|
103
114
|
});
|
|
104
115
|
}
|
|
105
|
-
|
|
116
|
+
var items = [{
|
|
117
|
+
key: 'alignmentLeft',
|
|
118
|
+
content: intl.formatMessage(messages.alignLeft),
|
|
119
|
+
value: {
|
|
120
|
+
name: 'start'
|
|
121
|
+
},
|
|
122
|
+
isActive: (pluginState === null || pluginState === void 0 ? void 0 : pluginState.align) === 'start',
|
|
123
|
+
elemAfter: /*#__PURE__*/React.createElement(Shortcut, null, tooltip(alignLeft)),
|
|
124
|
+
elemBefore: /*#__PURE__*/React.createElement(AlignTextLeftIcon, {
|
|
125
|
+
label: ""
|
|
126
|
+
})
|
|
127
|
+
}, {
|
|
128
|
+
key: 'alignmentCenter',
|
|
129
|
+
content: intl.formatMessage(messages.alignCenter),
|
|
130
|
+
value: {
|
|
131
|
+
name: 'center'
|
|
132
|
+
},
|
|
133
|
+
isActive: (pluginState === null || pluginState === void 0 ? void 0 : pluginState.align) === 'center',
|
|
134
|
+
elemAfter: /*#__PURE__*/React.createElement(Shortcut, null, tooltip(alignCenter)),
|
|
135
|
+
elemBefore: /*#__PURE__*/React.createElement(AlignTextCenterIcon, {
|
|
136
|
+
label: ""
|
|
137
|
+
})
|
|
138
|
+
}, {
|
|
139
|
+
key: 'alignmentRight',
|
|
140
|
+
content: intl.formatMessage(messages.alignRight),
|
|
141
|
+
value: {
|
|
142
|
+
name: 'end'
|
|
143
|
+
},
|
|
144
|
+
isActive: (pluginState === null || pluginState === void 0 ? void 0 : pluginState.align) === 'end',
|
|
145
|
+
elemAfter: /*#__PURE__*/React.createElement(Shortcut, null, tooltip(alignRight)),
|
|
146
|
+
elemBefore: /*#__PURE__*/React.createElement(AlignTextRightIcon, {
|
|
147
|
+
label: ""
|
|
148
|
+
})
|
|
149
|
+
}];
|
|
150
|
+
return /*#__PURE__*/React.createElement(ToolbarDropdownWrapper, null, editorExperiment('platform_editor_controls', 'variant1') && fg('platform_editor_controls_patch_6') ? /*#__PURE__*/React.createElement(DropdownMenu, {
|
|
151
|
+
arrowKeyNavigationProviderOptions: {
|
|
152
|
+
type: ArrowKeyNavigationType.MENU
|
|
153
|
+
},
|
|
154
|
+
items: [{
|
|
155
|
+
items: items
|
|
156
|
+
}],
|
|
157
|
+
isOpen: isOpen,
|
|
158
|
+
onItemActivated: this.handleOnItemActivated,
|
|
159
|
+
onOpenChange: function onOpenChange(attrs) {
|
|
160
|
+
return _this2.setState({
|
|
161
|
+
isOpen: attrs === null || attrs === void 0 ? void 0 : attrs.isOpen
|
|
162
|
+
});
|
|
163
|
+
},
|
|
164
|
+
mountTo: popupsMountPoint,
|
|
165
|
+
boundariesElement: popupsBoundariesElement,
|
|
166
|
+
scrollableElement: popupsScrollableElement,
|
|
167
|
+
fitWidth: 200
|
|
168
|
+
}, /*#__PURE__*/React.createElement(ToolbarButton, {
|
|
169
|
+
spacing: isReducedSpacing ? reducedSpacing : 'default',
|
|
170
|
+
disabled: disabled,
|
|
171
|
+
selected: isOpen,
|
|
172
|
+
title: title,
|
|
173
|
+
"aria-label": title,
|
|
174
|
+
"aria-expanded": isOpen,
|
|
175
|
+
"aria-haspopup": true,
|
|
176
|
+
onClick: this.toggleOpen,
|
|
177
|
+
onKeyDown: this.toggleOpenByKeyboard,
|
|
178
|
+
iconBefore: /*#__PURE__*/React.createElement(ToolbarDropdownTriggerWrapper, null, /*#__PURE__*/React.createElement(IconMap, {
|
|
179
|
+
alignment: alignment
|
|
180
|
+
}), /*#__PURE__*/React.createElement(ToolbarExpandIcon, null))
|
|
181
|
+
})) : /*#__PURE__*/React.createElement(Dropdown, {
|
|
106
182
|
mountTo: popupsMountPoint,
|
|
107
183
|
boundariesElement: popupsBoundariesElement,
|
|
108
184
|
scrollableElement: popupsScrollableElement,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-alignment",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.10",
|
|
4
4
|
"description": "Alignment plugin for @atlaskit/editor-core",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -27,21 +27,24 @@
|
|
|
27
27
|
},
|
|
28
28
|
"platform_editor_add_alignment_tracking": {
|
|
29
29
|
"type": "boolean"
|
|
30
|
+
},
|
|
31
|
+
"platform_editor_controls_patch_6": {
|
|
32
|
+
"type": "boolean"
|
|
30
33
|
}
|
|
31
34
|
},
|
|
32
35
|
"dependencies": {
|
|
33
36
|
"@atlaskit/adf-schema": "^47.6.0",
|
|
34
37
|
"@atlaskit/css": "^0.10.0",
|
|
35
|
-
"@atlaskit/editor-common": "^103.
|
|
38
|
+
"@atlaskit/editor-common": "^103.9.0",
|
|
36
39
|
"@atlaskit/editor-plugin-analytics": "^2.2.0",
|
|
37
|
-
"@atlaskit/editor-plugin-primary-toolbar": "^3.
|
|
38
|
-
"@atlaskit/editor-plugin-selection-toolbar": "^3.
|
|
40
|
+
"@atlaskit/editor-plugin-primary-toolbar": "^3.2.0",
|
|
41
|
+
"@atlaskit/editor-plugin-selection-toolbar": "^3.5.0",
|
|
39
42
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
40
43
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
41
|
-
"@atlaskit/icon": "^25.
|
|
44
|
+
"@atlaskit/icon": "^25.6.0",
|
|
42
45
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
43
|
-
"@atlaskit/tmp-editor-statsig": "^4.
|
|
44
|
-
"@atlaskit/tokens": "^4.
|
|
46
|
+
"@atlaskit/tmp-editor-statsig": "^4.12.0",
|
|
47
|
+
"@atlaskit/tokens": "^4.8.0",
|
|
45
48
|
"@babel/runtime": "^7.0.0",
|
|
46
49
|
"@compiled/react": "^0.18.3"
|
|
47
50
|
},
|