@atlaskit/editor-plugin-alignment 9.1.4 → 9.1.5
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 +6 -0
- package/dist/cjs/ui/Toolbar/AlignmentMenuItem.js +3 -1
- package/dist/cjs/ui/ToolbarAlignment/index.js +19 -7
- package/dist/es2019/ui/Toolbar/AlignmentMenuItem.js +3 -1
- package/dist/es2019/ui/ToolbarAlignment/index.js +19 -7
- package/dist/esm/ui/Toolbar/AlignmentMenuItem.js +3 -1
- package/dist/esm/ui/ToolbarAlignment/index.js +19 -7
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -39,7 +39,9 @@ var AlignmentMenuItem = exports.AlignmentMenuItem = function AlignmentMenuItem(_
|
|
|
39
39
|
elemAfter: shortcut && /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarKeyboardShortcutHint, {
|
|
40
40
|
shortcut: shortcut
|
|
41
41
|
}),
|
|
42
|
-
ariaKeyshortcuts: (0, _keymaps.getAriaKeyshortcuts)(keymap)
|
|
42
|
+
ariaKeyshortcuts: (0, _keymaps.getAriaKeyshortcuts)(keymap)
|
|
43
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
44
|
+
,
|
|
43
45
|
onClick: function onClick() {
|
|
44
46
|
api === null || api === void 0 || api.core.actions.execute((0, _editorCommands.changeAlignmentTr)(api, alignment, (0, _toolbar.getInputMethodFromParentKeys)(parents)));
|
|
45
47
|
}
|
|
@@ -138,15 +138,21 @@ var AlignmentToolbar = /*#__PURE__*/function (_React$Component) {
|
|
|
138
138
|
label: ""
|
|
139
139
|
})
|
|
140
140
|
}];
|
|
141
|
-
return /*#__PURE__*/_react.default.createElement(_ui.ToolbarDropdownWrapper, null, (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') ? /*#__PURE__*/_react.default.createElement(_uiMenu.DropdownMenuWithKeyboardNavigation
|
|
141
|
+
return /*#__PURE__*/_react.default.createElement(_ui.ToolbarDropdownWrapper, null, (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') ? /*#__PURE__*/_react.default.createElement(_uiMenu.DropdownMenuWithKeyboardNavigation
|
|
142
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
143
|
+
, {
|
|
142
144
|
arrowKeyNavigationProviderOptions: {
|
|
143
145
|
type: _uiMenu.ArrowKeyNavigationType.MENU
|
|
144
|
-
}
|
|
146
|
+
}
|
|
147
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
148
|
+
,
|
|
145
149
|
items: [{
|
|
146
150
|
items: items
|
|
147
151
|
}],
|
|
148
152
|
isOpen: isOpen,
|
|
149
|
-
onItemActivated: this.handleOnItemActivated
|
|
153
|
+
onItemActivated: this.handleOnItemActivated
|
|
154
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
155
|
+
,
|
|
150
156
|
onOpenChange: function onOpenChange(attrs) {
|
|
151
157
|
return _this2.setState({
|
|
152
158
|
isOpen: attrs === null || attrs === void 0 ? void 0 : attrs.isOpen
|
|
@@ -173,7 +179,9 @@ var AlignmentToolbar = /*#__PURE__*/function (_React$Component) {
|
|
|
173
179
|
mountTo: popupsMountPoint,
|
|
174
180
|
boundariesElement: popupsBoundariesElement,
|
|
175
181
|
scrollableElement: popupsScrollableElement,
|
|
176
|
-
isOpen: isOpen
|
|
182
|
+
isOpen: isOpen
|
|
183
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
184
|
+
,
|
|
177
185
|
handleClickOutside: function handleClickOutside(event) {
|
|
178
186
|
if (event instanceof MouseEvent) {
|
|
179
187
|
_this2.hide({
|
|
@@ -182,7 +190,9 @@ var AlignmentToolbar = /*#__PURE__*/function (_React$Component) {
|
|
|
182
190
|
});
|
|
183
191
|
}
|
|
184
192
|
},
|
|
185
|
-
handleEscapeKeydown: this.hideOnEscape
|
|
193
|
+
handleEscapeKeydown: this.hideOnEscape
|
|
194
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
195
|
+
,
|
|
186
196
|
arrowKeyNavigationProviderOptions: {
|
|
187
197
|
type: _uiMenu.ArrowKeyNavigationType.MENU
|
|
188
198
|
},
|
|
@@ -207,7 +217,9 @@ var AlignmentToolbar = /*#__PURE__*/function (_React$Component) {
|
|
|
207
217
|
}), /*#__PURE__*/_react.default.createElement(_ui.ToolbarExpandIcon, null)),
|
|
208
218
|
ref: this.toolbarItemRef
|
|
209
219
|
})
|
|
210
|
-
}, /*#__PURE__*/_react.default.createElement(_Alignment.default
|
|
220
|
+
}, /*#__PURE__*/_react.default.createElement(_Alignment.default
|
|
221
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
222
|
+
, {
|
|
211
223
|
onClick: function onClick(align) {
|
|
212
224
|
return _this2.changeAlignment(align, false);
|
|
213
225
|
},
|
|
@@ -216,7 +228,7 @@ var AlignmentToolbar = /*#__PURE__*/function (_React$Component) {
|
|
|
216
228
|
}
|
|
217
229
|
}, {
|
|
218
230
|
key: "componentDidUpdate",
|
|
219
|
-
value: function componentDidUpdate(
|
|
231
|
+
value: function componentDidUpdate(_prevProps) {
|
|
220
232
|
var _this3 = this;
|
|
221
233
|
if (this.props.toolbarType !== _types.ToolbarType.FLOATING && this.state.isOpen) {
|
|
222
234
|
// by triggering the keyboard event with a setTimeout, we ensure that the tooltip
|
|
@@ -36,7 +36,9 @@ export const AlignmentMenuItem = ({
|
|
|
36
36
|
elemAfter: shortcut && /*#__PURE__*/React.createElement(ToolbarKeyboardShortcutHint, {
|
|
37
37
|
shortcut: shortcut
|
|
38
38
|
}),
|
|
39
|
-
ariaKeyshortcuts: getAriaKeyshortcuts(keymap)
|
|
39
|
+
ariaKeyshortcuts: getAriaKeyshortcuts(keymap)
|
|
40
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
41
|
+
,
|
|
40
42
|
onClick: () => {
|
|
41
43
|
api === null || api === void 0 ? void 0 : api.core.actions.execute(changeAlignmentTr(api, alignment, getInputMethodFromParentKeys(parents)));
|
|
42
44
|
}
|
|
@@ -115,15 +115,21 @@ class AlignmentToolbar extends React.Component {
|
|
|
115
115
|
label: ""
|
|
116
116
|
})
|
|
117
117
|
}];
|
|
118
|
-
return /*#__PURE__*/React.createElement(ToolbarDropdownWrapper, null, editorExperiment('platform_editor_controls', 'variant1') ? /*#__PURE__*/React.createElement(DropdownMenu
|
|
118
|
+
return /*#__PURE__*/React.createElement(ToolbarDropdownWrapper, null, editorExperiment('platform_editor_controls', 'variant1') ? /*#__PURE__*/React.createElement(DropdownMenu
|
|
119
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
120
|
+
, {
|
|
119
121
|
arrowKeyNavigationProviderOptions: {
|
|
120
122
|
type: ArrowKeyNavigationType.MENU
|
|
121
|
-
}
|
|
123
|
+
}
|
|
124
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
125
|
+
,
|
|
122
126
|
items: [{
|
|
123
127
|
items
|
|
124
128
|
}],
|
|
125
129
|
isOpen: isOpen,
|
|
126
|
-
onItemActivated: this.handleOnItemActivated
|
|
130
|
+
onItemActivated: this.handleOnItemActivated
|
|
131
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
132
|
+
,
|
|
127
133
|
onOpenChange: attrs => this.setState({
|
|
128
134
|
isOpen: attrs === null || attrs === void 0 ? void 0 : attrs.isOpen
|
|
129
135
|
}),
|
|
@@ -148,7 +154,9 @@ class AlignmentToolbar extends React.Component {
|
|
|
148
154
|
mountTo: popupsMountPoint,
|
|
149
155
|
boundariesElement: popupsBoundariesElement,
|
|
150
156
|
scrollableElement: popupsScrollableElement,
|
|
151
|
-
isOpen: isOpen
|
|
157
|
+
isOpen: isOpen
|
|
158
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
159
|
+
,
|
|
152
160
|
handleClickOutside: event => {
|
|
153
161
|
if (event instanceof MouseEvent) {
|
|
154
162
|
this.hide({
|
|
@@ -157,7 +165,9 @@ class AlignmentToolbar extends React.Component {
|
|
|
157
165
|
});
|
|
158
166
|
}
|
|
159
167
|
},
|
|
160
|
-
handleEscapeKeydown: this.hideOnEscape
|
|
168
|
+
handleEscapeKeydown: this.hideOnEscape
|
|
169
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
170
|
+
,
|
|
161
171
|
arrowKeyNavigationProviderOptions: {
|
|
162
172
|
type: ArrowKeyNavigationType.MENU
|
|
163
173
|
},
|
|
@@ -182,12 +192,14 @@ class AlignmentToolbar extends React.Component {
|
|
|
182
192
|
}), /*#__PURE__*/React.createElement(ToolbarExpandIcon, null)),
|
|
183
193
|
ref: this.toolbarItemRef
|
|
184
194
|
})
|
|
185
|
-
}, /*#__PURE__*/React.createElement(Alignment
|
|
195
|
+
}, /*#__PURE__*/React.createElement(Alignment
|
|
196
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
197
|
+
, {
|
|
186
198
|
onClick: align => this.changeAlignment(align, false),
|
|
187
199
|
selectedAlignment: alignment
|
|
188
200
|
})), !(api !== null && api !== void 0 && api.primaryToolbar) && /*#__PURE__*/React.createElement(ToolbarSeparator, null));
|
|
189
201
|
}
|
|
190
|
-
componentDidUpdate(
|
|
202
|
+
componentDidUpdate(_prevProps) {
|
|
191
203
|
if (this.props.toolbarType !== ToolbarType.FLOATING && this.state.isOpen) {
|
|
192
204
|
// by triggering the keyboard event with a setTimeout, we ensure that the tooltip
|
|
193
205
|
// associated with the alignment button doesn't render until the next render cycle
|
|
@@ -32,7 +32,9 @@ export var AlignmentMenuItem = function AlignmentMenuItem(_ref) {
|
|
|
32
32
|
elemAfter: shortcut && /*#__PURE__*/React.createElement(ToolbarKeyboardShortcutHint, {
|
|
33
33
|
shortcut: shortcut
|
|
34
34
|
}),
|
|
35
|
-
ariaKeyshortcuts: getAriaKeyshortcuts(keymap)
|
|
35
|
+
ariaKeyshortcuts: getAriaKeyshortcuts(keymap)
|
|
36
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
37
|
+
,
|
|
36
38
|
onClick: function onClick() {
|
|
37
39
|
api === null || api === void 0 || api.core.actions.execute(changeAlignmentTr(api, alignment, getInputMethodFromParentKeys(parents)));
|
|
38
40
|
}
|
|
@@ -131,15 +131,21 @@ var AlignmentToolbar = /*#__PURE__*/function (_React$Component) {
|
|
|
131
131
|
label: ""
|
|
132
132
|
})
|
|
133
133
|
}];
|
|
134
|
-
return /*#__PURE__*/React.createElement(ToolbarDropdownWrapper, null, editorExperiment('platform_editor_controls', 'variant1') ? /*#__PURE__*/React.createElement(DropdownMenu
|
|
134
|
+
return /*#__PURE__*/React.createElement(ToolbarDropdownWrapper, null, editorExperiment('platform_editor_controls', 'variant1') ? /*#__PURE__*/React.createElement(DropdownMenu
|
|
135
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
136
|
+
, {
|
|
135
137
|
arrowKeyNavigationProviderOptions: {
|
|
136
138
|
type: ArrowKeyNavigationType.MENU
|
|
137
|
-
}
|
|
139
|
+
}
|
|
140
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
141
|
+
,
|
|
138
142
|
items: [{
|
|
139
143
|
items: items
|
|
140
144
|
}],
|
|
141
145
|
isOpen: isOpen,
|
|
142
|
-
onItemActivated: this.handleOnItemActivated
|
|
146
|
+
onItemActivated: this.handleOnItemActivated
|
|
147
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
148
|
+
,
|
|
143
149
|
onOpenChange: function onOpenChange(attrs) {
|
|
144
150
|
return _this2.setState({
|
|
145
151
|
isOpen: attrs === null || attrs === void 0 ? void 0 : attrs.isOpen
|
|
@@ -166,7 +172,9 @@ var AlignmentToolbar = /*#__PURE__*/function (_React$Component) {
|
|
|
166
172
|
mountTo: popupsMountPoint,
|
|
167
173
|
boundariesElement: popupsBoundariesElement,
|
|
168
174
|
scrollableElement: popupsScrollableElement,
|
|
169
|
-
isOpen: isOpen
|
|
175
|
+
isOpen: isOpen
|
|
176
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
177
|
+
,
|
|
170
178
|
handleClickOutside: function handleClickOutside(event) {
|
|
171
179
|
if (event instanceof MouseEvent) {
|
|
172
180
|
_this2.hide({
|
|
@@ -175,7 +183,9 @@ var AlignmentToolbar = /*#__PURE__*/function (_React$Component) {
|
|
|
175
183
|
});
|
|
176
184
|
}
|
|
177
185
|
},
|
|
178
|
-
handleEscapeKeydown: this.hideOnEscape
|
|
186
|
+
handleEscapeKeydown: this.hideOnEscape
|
|
187
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
188
|
+
,
|
|
179
189
|
arrowKeyNavigationProviderOptions: {
|
|
180
190
|
type: ArrowKeyNavigationType.MENU
|
|
181
191
|
},
|
|
@@ -200,7 +210,9 @@ var AlignmentToolbar = /*#__PURE__*/function (_React$Component) {
|
|
|
200
210
|
}), /*#__PURE__*/React.createElement(ToolbarExpandIcon, null)),
|
|
201
211
|
ref: this.toolbarItemRef
|
|
202
212
|
})
|
|
203
|
-
}, /*#__PURE__*/React.createElement(Alignment
|
|
213
|
+
}, /*#__PURE__*/React.createElement(Alignment
|
|
214
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
215
|
+
, {
|
|
204
216
|
onClick: function onClick(align) {
|
|
205
217
|
return _this2.changeAlignment(align, false);
|
|
206
218
|
},
|
|
@@ -209,7 +221,7 @@ var AlignmentToolbar = /*#__PURE__*/function (_React$Component) {
|
|
|
209
221
|
}
|
|
210
222
|
}, {
|
|
211
223
|
key: "componentDidUpdate",
|
|
212
|
-
value: function componentDidUpdate(
|
|
224
|
+
value: function componentDidUpdate(_prevProps) {
|
|
213
225
|
var _this3 = this;
|
|
214
226
|
if (this.props.toolbarType !== ToolbarType.FLOATING && this.state.isOpen) {
|
|
215
227
|
// by triggering the keyboard event with a setTimeout, we ensure that the tooltip
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-alignment",
|
|
3
|
-
"version": "9.1.
|
|
3
|
+
"version": "9.1.5",
|
|
4
4
|
"description": "Alignment plugin for @atlaskit/editor-core",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@atlaskit/editor-toolbar": "^0.20.0",
|
|
38
38
|
"@atlaskit/icon": "^33.0.0",
|
|
39
39
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
40
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
40
|
+
"@atlaskit/tmp-editor-statsig": "^44.0.0",
|
|
41
41
|
"@atlaskit/tokens": "^11.1.0",
|
|
42
42
|
"@babel/runtime": "^7.0.0",
|
|
43
43
|
"@compiled/react": "^0.20.0"
|