@atlaskit/editor-plugin-floating-toolbar 1.14.13 → 1.14.14
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/floatingToolbarPlugin.js +18 -2
- package/dist/cjs/pm-plugins/force-focus/index.js +2 -0
- package/dist/cjs/ui/CheckboxModal.js +8 -3
- package/dist/cjs/ui/ConfirmationModal.js +7 -1
- package/dist/cjs/ui/Dropdown.js +2 -0
- package/dist/cjs/ui/DropdownMenu.js +14 -2
- package/dist/cjs/ui/EmojiPickerButton.js +6 -1
- package/dist/cjs/ui/ExtensionsPlaceholder.js +10 -0
- package/dist/cjs/ui/Input.js +3 -0
- package/dist/cjs/ui/ScrollButtons.js +7 -0
- package/dist/cjs/ui/Select.js +6 -0
- package/dist/cjs/ui/Toolbar.js +28 -7
- package/dist/es2019/floatingToolbarPlugin.js +18 -2
- package/dist/es2019/pm-plugins/force-focus/index.js +2 -0
- package/dist/es2019/ui/CheckboxModal.js +5 -1
- package/dist/es2019/ui/ConfirmationModal.js +6 -1
- package/dist/es2019/ui/Dropdown.js +2 -0
- package/dist/es2019/ui/DropdownMenu.js +14 -2
- package/dist/es2019/ui/EmojiPickerButton.js +6 -1
- package/dist/es2019/ui/ExtensionsPlaceholder.js +10 -0
- package/dist/es2019/ui/Input.js +3 -0
- package/dist/es2019/ui/ScrollButtons.js +7 -0
- package/dist/es2019/ui/Select.js +6 -0
- package/dist/es2019/ui/Toolbar.js +27 -5
- package/dist/esm/floatingToolbarPlugin.js +18 -2
- package/dist/esm/pm-plugins/force-focus/index.js +2 -0
- package/dist/esm/ui/CheckboxModal.js +8 -3
- package/dist/esm/ui/ConfirmationModal.js +7 -1
- package/dist/esm/ui/Dropdown.js +2 -0
- package/dist/esm/ui/DropdownMenu.js +14 -2
- package/dist/esm/ui/EmojiPickerButton.js +6 -1
- package/dist/esm/ui/ExtensionsPlaceholder.js +10 -0
- package/dist/esm/ui/Input.js +3 -0
- package/dist/esm/ui/ScrollButtons.js +7 -0
- package/dist/esm/ui/Select.js +6 -0
- package/dist/esm/ui/Toolbar.js +28 -7
- package/dist/types/ui/Input.d.ts +1 -1
- package/dist/types-ts4.5/ui/Input.d.ts +1 -1
- package/package.json +5 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-floating-toolbar
|
|
2
2
|
|
|
3
|
+
## 1.14.14
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#98013](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/98013)
|
|
8
|
+
[`bb6c1ba86750c`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/bb6c1ba86750c) -
|
|
9
|
+
ED-25541 update floating toolbar padding to stop content being pushed outside of boundaries
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
3
12
|
## 1.14.13
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -96,7 +96,11 @@ var getRelevantConfig = exports.getRelevantConfig = function getRelevantConfig(s
|
|
|
96
96
|
};
|
|
97
97
|
var getDomRefFromSelection = function getDomRefFromSelection(view, dispatchAnalyticsEvent) {
|
|
98
98
|
try {
|
|
99
|
+
// Ignored via go/ees005
|
|
100
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
99
101
|
return (0, _utils.findDomRefAtPos)(view.state.selection.from, view.domAtPos.bind(view));
|
|
102
|
+
// Ignored via go/ees005
|
|
103
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
100
104
|
} catch (error) {
|
|
101
105
|
// eslint-disable-next-line no-console
|
|
102
106
|
console.warn(error);
|
|
@@ -274,7 +278,10 @@ function ContentComponent(_ref5) {
|
|
|
274
278
|
// Confirm dialog
|
|
275
279
|
var _ref7 = floatingToolbarData || {},
|
|
276
280
|
confirmDialogForItem = _ref7.confirmDialogForItem;
|
|
277
|
-
var confirmButtonItem = confirmDialogForItem ?
|
|
281
|
+
var confirmButtonItem = confirmDialogForItem ?
|
|
282
|
+
// Ignored via go/ees005
|
|
283
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
284
|
+
toolbarItems[confirmDialogForItem] : undefined;
|
|
278
285
|
var scrollable = config.scrollable;
|
|
279
286
|
var confirmDialogOptions = typeof (confirmButtonItem === null || confirmButtonItem === void 0 ? void 0 : confirmButtonItem.confirmDialog) === 'function' ? confirmButtonItem === null || confirmButtonItem === void 0 ? void 0 : confirmButtonItem.confirmDialog() : confirmButtonItem === null || confirmButtonItem === void 0 ? void 0 : confirmButtonItem.confirmDialog;
|
|
280
287
|
return /*#__PURE__*/_react.default.createElement(_errorBoundary.ErrorBoundary, {
|
|
@@ -310,7 +317,10 @@ function ContentComponent(_ref5) {
|
|
|
310
317
|
providers: ['extensionProvider'],
|
|
311
318
|
renderNode: function renderNode(providers) {
|
|
312
319
|
return /*#__PURE__*/_react.default.createElement(_ToolbarLoader.ToolbarLoader, {
|
|
313
|
-
target: targetRef
|
|
320
|
+
target: targetRef
|
|
321
|
+
// Ignored via go/ees005
|
|
322
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
323
|
+
,
|
|
314
324
|
items: toolbarItems,
|
|
315
325
|
groupLabel: groupLabel,
|
|
316
326
|
node: node,
|
|
@@ -338,9 +348,15 @@ function ContentComponent(_ref5) {
|
|
|
338
348
|
options: confirmDialogOptions,
|
|
339
349
|
onConfirm: function onConfirm() {
|
|
340
350
|
var isChecked = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
351
|
+
// Ignored via go/ees005
|
|
352
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
341
353
|
if (!!confirmDialogOptions.onConfirm) {
|
|
354
|
+
// Ignored via go/ees005
|
|
355
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
342
356
|
dispatchCommand(confirmDialogOptions.onConfirm(isChecked));
|
|
343
357
|
} else {
|
|
358
|
+
// Ignored via go/ees005
|
|
359
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
344
360
|
dispatchCommand(confirmButtonItem.onClick);
|
|
345
361
|
}
|
|
346
362
|
},
|
|
@@ -60,6 +60,8 @@ function checkShouldForceFocusAndApply(view) {
|
|
|
60
60
|
block: 'center',
|
|
61
61
|
inline: 'nearest'
|
|
62
62
|
});
|
|
63
|
+
// Ignored via go/ees005
|
|
64
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
63
65
|
focusableElement.focus();
|
|
64
66
|
var tr = view.state.tr,
|
|
65
67
|
dispatch = view.dispatch;
|
|
@@ -38,9 +38,14 @@ var CheckboxModal = exports.CheckboxModal = function CheckboxModal(props) {
|
|
|
38
38
|
return null;
|
|
39
39
|
}
|
|
40
40
|
return /*#__PURE__*/_react.default.createElement("ul", null, nodes.map(function (node) {
|
|
41
|
-
return
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
return (
|
|
42
|
+
/*#__PURE__*/
|
|
43
|
+
// Ignored via go/ees005
|
|
44
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
45
|
+
_react.default.createElement(ListItem, (0, _extends2.default)({}, node, {
|
|
46
|
+
key: node.id
|
|
47
|
+
}))
|
|
48
|
+
);
|
|
44
49
|
}));
|
|
45
50
|
};
|
|
46
51
|
var ListItem = function ListItem(props) {
|
|
@@ -14,7 +14,13 @@ var ConfirmationModalImpl = function ConfirmationModalImpl(props) {
|
|
|
14
14
|
var options = props.options;
|
|
15
15
|
var renderModel = function renderModel() {
|
|
16
16
|
var isReferentialityDialog = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
17
|
-
return
|
|
17
|
+
return (
|
|
18
|
+
// Ignored via go/ees005
|
|
19
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
20
|
+
// Ignored via go/ees005
|
|
21
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
22
|
+
isReferentialityDialog ? /*#__PURE__*/_react.default.createElement(_CheckboxModal.CheckboxModal, props) : /*#__PURE__*/_react.default.createElement(_SimpleModal.SimpleModal, props)
|
|
23
|
+
);
|
|
18
24
|
};
|
|
19
25
|
return options ? /*#__PURE__*/_react.default.createElement(_modalDialog.ModalTransition, null, renderModel(options === null || options === void 0 ? void 0 : options.isReferentialityDialog)) : null;
|
|
20
26
|
};
|
package/dist/cjs/ui/Dropdown.js
CHANGED
|
@@ -114,6 +114,8 @@ var Dropdown = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
114
114
|
var _document$querySelect;
|
|
115
115
|
// Focus the trigger button only on Escape
|
|
116
116
|
// Focus is done before hiding to ensure onBlur is called
|
|
117
|
+
// Ignored via go/ees005
|
|
118
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
117
119
|
(_document$querySelect = document.querySelector("[data-testid=".concat(_this.props.buttonTestId, "]"))) === null || _document$querySelect === void 0 || _document$querySelect.focus();
|
|
118
120
|
_this.hide();
|
|
119
121
|
});
|
|
@@ -145,17 +145,26 @@ var DropdownMenuItem = function DropdownMenuItem(props) {
|
|
|
145
145
|
|
|
146
146
|
/* ED-16704 - Native mouse event handler to overcome firefox issue on disabled <button> - https://github.com/whatwg/html/issues/5886 */
|
|
147
147
|
var labelRef = (0, _react.useRef)(null);
|
|
148
|
-
var handleTitleWrapperMouseEvent = (0, _react.useCallback)(
|
|
148
|
+
var handleTitleWrapperMouseEvent = (0, _react.useCallback)(
|
|
149
|
+
// Ignored via go/ees005
|
|
150
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
151
|
+
function (e) {
|
|
149
152
|
if (item.disabled) {
|
|
150
153
|
e.stopPropagation();
|
|
151
154
|
e.preventDefault();
|
|
152
155
|
}
|
|
153
156
|
}, [item.disabled]);
|
|
157
|
+
|
|
158
|
+
// Ignored via go/ees005
|
|
159
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
154
160
|
var isAriaChecked = function isAriaChecked(item) {
|
|
155
161
|
var selected = item.selected,
|
|
156
162
|
domItemOptions = item.domItemOptions;
|
|
157
163
|
return (domItemOptions === null || domItemOptions === void 0 ? void 0 : domItemOptions.type) === 'item-checkbox' ? selected : undefined;
|
|
158
164
|
};
|
|
165
|
+
|
|
166
|
+
// Ignored via go/ees005
|
|
167
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
159
168
|
var hasRole = function hasRole(item) {
|
|
160
169
|
var _item$domItemOptions;
|
|
161
170
|
return ((_item$domItemOptions = item.domItemOptions) === null || _item$domItemOptions === void 0 ? void 0 : _item$domItemOptions.type) === 'item-checkbox' ? 'menuitemcheckbox' : undefined;
|
|
@@ -231,7 +240,10 @@ var Dropdown = /*#__PURE__*/(0, _react.memo)(function (props) {
|
|
|
231
240
|
}, items.filter(function (item) {
|
|
232
241
|
return !item.hidden;
|
|
233
242
|
}).map(function (item, idx) {
|
|
234
|
-
return (0, _react2.jsx)(DropdownMenuItem
|
|
243
|
+
return (0, _react2.jsx)(DropdownMenuItem
|
|
244
|
+
// Ignored via go/ees005
|
|
245
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
246
|
+
, {
|
|
235
247
|
key: idx,
|
|
236
248
|
item: item,
|
|
237
249
|
hide: hide,
|
|
@@ -77,6 +77,8 @@ var EmojiPickerButton = exports.EmojiPickerButton = function EmojiPickerButton(p
|
|
|
77
77
|
// Workaround for CETI-240 - where two onClicks fire - one when the upload button is
|
|
78
78
|
// still in the document, and one once it's detached. Does not always occur, and
|
|
79
79
|
// may be a side effect of a react render optimisation
|
|
80
|
+
// Ignored via go/ees005
|
|
81
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
80
82
|
if (e && e.target && !isDetachedElement(e.target)) {
|
|
81
83
|
togglePopup();
|
|
82
84
|
}
|
|
@@ -91,7 +93,10 @@ var EmojiPickerButton = exports.EmojiPickerButton = function EmojiPickerButton(p
|
|
|
91
93
|
return;
|
|
92
94
|
}
|
|
93
95
|
return (0, _react2.jsx)(_ui.Popup, {
|
|
94
|
-
target: buttonRef.current
|
|
96
|
+
target: buttonRef.current
|
|
97
|
+
// Ignored via go/ees005
|
|
98
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
99
|
+
,
|
|
95
100
|
mountTo: props.setDisableParentScroll ? props.mountPoint : buttonRef.current.parentElement,
|
|
96
101
|
fitHeight: 350,
|
|
97
102
|
fitWidth: 350,
|
|
@@ -56,6 +56,8 @@ var ExtensionButton = function ExtensionButton(props) {
|
|
|
56
56
|
extensionApi = props.extensionApi;
|
|
57
57
|
var ButtonIcon = _react.default.useMemo(function () {
|
|
58
58
|
return item.icon ? (0, _reactLoadable.default)({
|
|
59
|
+
// Ignored via go/ees005
|
|
60
|
+
// eslint-disable-next-line require-await
|
|
59
61
|
loader: function () {
|
|
60
62
|
var _loader = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
|
|
61
63
|
return _regenerator.default.wrap(function _callee2$(_context2) {
|
|
@@ -81,6 +83,8 @@ var ExtensionButton = function ExtensionButton(props) {
|
|
|
81
83
|
throw new Error("'action' of context toolbar item '".concat(item.key, "' is not a function"));
|
|
82
84
|
}
|
|
83
85
|
var targetNodeAdf = (0, _utils.nodeToJSON)(node);
|
|
86
|
+
// Ignored via go/ees005
|
|
87
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
84
88
|
item.action(targetNodeAdf, extensionApi);
|
|
85
89
|
};
|
|
86
90
|
var getAriaLabel = function getAriaLabel() {
|
|
@@ -114,6 +118,8 @@ var ExtensionsPlaceholder = exports.ExtensionsPlaceholder = function ExtensionsP
|
|
|
114
118
|
separator = props.separator,
|
|
115
119
|
applyChangeToContextPanel = props.applyChangeToContextPanel,
|
|
116
120
|
extensionApi = props.extensionApi;
|
|
121
|
+
// Ignored via go/ees005
|
|
122
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
117
123
|
var _useState = (0, _react.useState)([]),
|
|
118
124
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
119
125
|
extensions = _useState2[0],
|
|
@@ -157,6 +163,8 @@ var ExtensionsPlaceholder = exports.ExtensionsPlaceholder = function ExtensionsP
|
|
|
157
163
|
return (0, _utils.nodeToJSON)(node);
|
|
158
164
|
}, [node]);
|
|
159
165
|
var extensionItems = _react.default.useMemo(function () {
|
|
166
|
+
// Ignored via go/ees005
|
|
167
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
160
168
|
return (0, _extensions.getContextualToolbarItemsFromModule)(extensions, nodeAdf, extensionApi);
|
|
161
169
|
}, [extensions, nodeAdf, extensionApi]);
|
|
162
170
|
if (!extensionItems.length) {
|
|
@@ -169,6 +177,8 @@ var ExtensionsPlaceholder = exports.ExtensionsPlaceholder = function ExtensionsP
|
|
|
169
177
|
if (separator && ['start', 'both'].includes(separator)) {
|
|
170
178
|
children.push( /*#__PURE__*/_react.default.createElement(_ui.FloatingToolbarSeparator, null));
|
|
171
179
|
}
|
|
180
|
+
// Ignored via go/ees005
|
|
181
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
172
182
|
extensionItems.forEach(function (item, index) {
|
|
173
183
|
children.push( /*#__PURE__*/_react.default.createElement(ExtensionButton, {
|
|
174
184
|
node: node,
|
package/dist/cjs/ui/Input.js
CHANGED
|
@@ -51,6 +51,9 @@ var InputOld = exports.InputOld = /*#__PURE__*/function (_Component) {
|
|
|
51
51
|
};
|
|
52
52
|
return _this;
|
|
53
53
|
}
|
|
54
|
+
|
|
55
|
+
// Ignored via go/ees005
|
|
56
|
+
// eslint-disable-next-line react/no-unsafe
|
|
54
57
|
(0, _inherits2.default)(InputOld, _Component);
|
|
55
58
|
return (0, _createClass2.default)(InputOld, [{
|
|
56
59
|
key: "UNSAFE_componentWillReceiveProps",
|
|
@@ -34,7 +34,12 @@ var toolbarScrollButtons = (0, _react2.css)({
|
|
|
34
34
|
flexShrink: 0,
|
|
35
35
|
alignItems: 'center'
|
|
36
36
|
});
|
|
37
|
+
|
|
38
|
+
// Ignored via go/ees005
|
|
39
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
37
40
|
var LeftIcon = _chevronLeftLarge.default;
|
|
41
|
+
// Ignored via go/ees005
|
|
42
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
38
43
|
var RightIcon = _chevronRightLarge.default;
|
|
39
44
|
var ScrollButtons = exports.ScrollButtons = function ScrollButtons(_ref) {
|
|
40
45
|
var intl = _ref.intl,
|
|
@@ -102,6 +107,8 @@ var ScrollButtons = exports.ScrollButtons = function ScrollButtons(_ref) {
|
|
|
102
107
|
var resizeObserver = new ResizeObserver(function (t) {
|
|
103
108
|
var _scrollContainerRef$c8, _scrollContainerRef$c9;
|
|
104
109
|
var widthNeededToShowAllItems = ((_scrollContainerRef$c8 = scrollContainerRef.current) === null || _scrollContainerRef$c8 === void 0 ? void 0 : _scrollContainerRef$c8.scrollWidth) || 0;
|
|
110
|
+
// Ignored via go/ees005
|
|
111
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
105
112
|
var availableSpace = (_scrollContainerRef$c9 = scrollContainerRef.current) === null || _scrollContainerRef$c9 === void 0 || (_scrollContainerRef$c9 = _scrollContainerRef$c9.parentNode) === null || _scrollContainerRef$c9 === void 0 ? void 0 : _scrollContainerRef$c9.offsetWidth;
|
|
106
113
|
if (availableSpace >= widthNeededToShowAllItems) {
|
|
107
114
|
setNeedScroll(false);
|
package/dist/cjs/ui/Select.js
CHANGED
|
@@ -14,16 +14,22 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
|
|
|
14
14
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
15
15
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
16
16
|
function Search(props) {
|
|
17
|
+
// Ignored via go/ees005
|
|
18
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
17
19
|
var selectRef = (0, _react.useRef)(null);
|
|
18
20
|
var _props$width = props.width,
|
|
19
21
|
width = _props$width === void 0 ? 200 : _props$width;
|
|
20
22
|
var style = _react.default.useMemo(function () {
|
|
21
23
|
return {
|
|
24
|
+
// Ignored via go/ees005
|
|
25
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
22
26
|
container: function container(base) {
|
|
23
27
|
return _objectSpread(_objectSpread({}, base), {}, {
|
|
24
28
|
width: width
|
|
25
29
|
});
|
|
26
30
|
},
|
|
31
|
+
// Ignored via go/ees005
|
|
32
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
27
33
|
menuPortal: function menuPortal(base) {
|
|
28
34
|
var _selectRef$current, _selectRef$current2;
|
|
29
35
|
// ED:16095: We add two possible getter paths for safely reaching into the underlying
|
package/dist/cjs/ui/Toolbar.js
CHANGED
|
@@ -90,6 +90,8 @@ var ToolbarItems = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
|
90
90
|
var _api$contextPanel, _api$extension;
|
|
91
91
|
switch (item.type) {
|
|
92
92
|
case 'button':
|
|
93
|
+
// Ignored via go/ees005
|
|
94
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
93
95
|
var ButtonIcon = item.icon;
|
|
94
96
|
var onClickHandler = function onClickHandler() {
|
|
95
97
|
if (item.confirmDialog) {
|
|
@@ -229,7 +231,10 @@ var ToolbarItems = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
|
229
231
|
key: idx,
|
|
230
232
|
dispatchCommand: dispatchCommand,
|
|
231
233
|
options: item.options,
|
|
232
|
-
hideExpandIcon: item.hideExpandIcon
|
|
234
|
+
hideExpandIcon: item.hideExpandIcon
|
|
235
|
+
// Ignored via go/ees005
|
|
236
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
237
|
+
,
|
|
233
238
|
mountPoint: scrollable ? mountRef.current : undefined,
|
|
234
239
|
boundariesElement: popupsBoundariesElement,
|
|
235
240
|
scrollableElement: popupsScrollableElement,
|
|
@@ -314,6 +319,8 @@ var ToolbarItems = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
|
314
319
|
var isGroup = Array.isArray(element);
|
|
315
320
|
if (isGroup) {
|
|
316
321
|
return (0, _react2.jsx)("div", {
|
|
322
|
+
// Ignored via go/ees005
|
|
323
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
317
324
|
key: index,
|
|
318
325
|
css: buttonGroupStyles,
|
|
319
326
|
role: "radiogroup",
|
|
@@ -387,7 +394,11 @@ var toolbarContainer = function toolbarContainer(scrollable, hasSelect, firstEle
|
|
|
387
394
|
};
|
|
388
395
|
|
|
389
396
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
390
|
-
var toolbarOverflow = function toolbarOverflow(
|
|
397
|
+
var toolbarOverflow = function toolbarOverflow(_ref2) {
|
|
398
|
+
var scrollable = _ref2.scrollable,
|
|
399
|
+
scrollDisabled = _ref2.scrollDisabled,
|
|
400
|
+
firstElementIsSelect = _ref2.firstElementIsSelect,
|
|
401
|
+
paddingFeatureFlag = _ref2.paddingFeatureFlag;
|
|
391
402
|
return (0, _react2.css)(
|
|
392
403
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
393
404
|
scrollable ?
|
|
@@ -405,7 +416,8 @@ var toolbarOverflow = function toolbarOverflow(scrollable, scrollDisabled, first
|
|
|
405
416
|
overflowY: 'hidden'
|
|
406
417
|
}), {
|
|
407
418
|
WebkitOverflowScrolling: 'touch',
|
|
408
|
-
|
|
419
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
420
|
+
padding: paddingFeatureFlag ? "var(--ds-space-050, 4px)".concat(" 0 ", "var(--ds-space-050, 4px)") : "var(--ds-space-050, 4px)".concat(" 0 ", "var(--ds-space-600, 48px)"),
|
|
409
421
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
410
422
|
'> div': {
|
|
411
423
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
@@ -472,8 +484,8 @@ var Toolbar = /*#__PURE__*/function (_Component) {
|
|
|
472
484
|
(0, _inherits2.default)(Toolbar, _Component);
|
|
473
485
|
return (0, _createClass2.default)(Toolbar, [{
|
|
474
486
|
key: "resetStyling",
|
|
475
|
-
value: function resetStyling(
|
|
476
|
-
var table =
|
|
487
|
+
value: function resetStyling(_ref3) {
|
|
488
|
+
var table = _ref3.table;
|
|
477
489
|
if (this.props.editorView) {
|
|
478
490
|
var _this$props$api;
|
|
479
491
|
var _this$props$editorVie2 = this.props.editorView,
|
|
@@ -582,8 +594,17 @@ var Toolbar = /*#__PURE__*/function (_Component) {
|
|
|
582
594
|
ref: this.scrollContainerRef
|
|
583
595
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
584
596
|
,
|
|
585
|
-
css: toolbarOverflow(
|
|
586
|
-
|
|
597
|
+
css: toolbarOverflow({
|
|
598
|
+
scrollable: scrollable,
|
|
599
|
+
scrollDisabled: this.state.scrollDisabled,
|
|
600
|
+
firstElementIsSelect: firstElementIsSelect,
|
|
601
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
602
|
+
paddingFeatureFlag: (0, _platformFeatureFlags.fg)('platform_editor_floating_toolbar_padding_fix')
|
|
603
|
+
})
|
|
604
|
+
}, (0, _react2.jsx)(ToolbarItems
|
|
605
|
+
// Ignored via go/ees005
|
|
606
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
607
|
+
, (0, _extends2.default)({}, this.props, {
|
|
587
608
|
setDisableScroll: this.setDisableScroll.bind(this),
|
|
588
609
|
mountRef: this.mountRef,
|
|
589
610
|
mounted: this.state.mounted
|
|
@@ -83,7 +83,11 @@ export const getRelevantConfig = (selection, configs) => {
|
|
|
83
83
|
};
|
|
84
84
|
const getDomRefFromSelection = (view, dispatchAnalyticsEvent) => {
|
|
85
85
|
try {
|
|
86
|
+
// Ignored via go/ees005
|
|
87
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
86
88
|
return findDomRefAtPos(view.state.selection.from, view.domAtPos.bind(view));
|
|
89
|
+
// Ignored via go/ees005
|
|
90
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
87
91
|
} catch (error) {
|
|
88
92
|
// eslint-disable-next-line no-console
|
|
89
93
|
console.warn(error);
|
|
@@ -257,7 +261,10 @@ export function ContentComponent({
|
|
|
257
261
|
const {
|
|
258
262
|
confirmDialogForItem
|
|
259
263
|
} = floatingToolbarData || {};
|
|
260
|
-
const confirmButtonItem = confirmDialogForItem ?
|
|
264
|
+
const confirmButtonItem = confirmDialogForItem ?
|
|
265
|
+
// Ignored via go/ees005
|
|
266
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
267
|
+
toolbarItems[confirmDialogForItem] : undefined;
|
|
261
268
|
const scrollable = config.scrollable;
|
|
262
269
|
const confirmDialogOptions = typeof (confirmButtonItem === null || confirmButtonItem === void 0 ? void 0 : confirmButtonItem.confirmDialog) === 'function' ? confirmButtonItem === null || confirmButtonItem === void 0 ? void 0 : confirmButtonItem.confirmDialog() : confirmButtonItem === null || confirmButtonItem === void 0 ? void 0 : confirmButtonItem.confirmDialog;
|
|
263
270
|
return /*#__PURE__*/React.createElement(ErrorBoundary, {
|
|
@@ -293,7 +300,10 @@ export function ContentComponent({
|
|
|
293
300
|
providers: ['extensionProvider'],
|
|
294
301
|
renderNode: providers => {
|
|
295
302
|
return /*#__PURE__*/React.createElement(ToolbarLoader, {
|
|
296
|
-
target: targetRef
|
|
303
|
+
target: targetRef
|
|
304
|
+
// Ignored via go/ees005
|
|
305
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
306
|
+
,
|
|
297
307
|
items: toolbarItems,
|
|
298
308
|
groupLabel: groupLabel,
|
|
299
309
|
node: node,
|
|
@@ -318,9 +328,15 @@ export function ContentComponent({
|
|
|
318
328
|
testId: "ak-floating-toolbar-confirmation-modal",
|
|
319
329
|
options: confirmDialogOptions,
|
|
320
330
|
onConfirm: (isChecked = false) => {
|
|
331
|
+
// Ignored via go/ees005
|
|
332
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
321
333
|
if (!!confirmDialogOptions.onConfirm) {
|
|
334
|
+
// Ignored via go/ees005
|
|
335
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
322
336
|
dispatchCommand(confirmDialogOptions.onConfirm(isChecked));
|
|
323
337
|
} else {
|
|
338
|
+
// Ignored via go/ees005
|
|
339
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
324
340
|
dispatchCommand(confirmButtonItem.onClick);
|
|
325
341
|
}
|
|
326
342
|
},
|
|
@@ -28,7 +28,11 @@ export const CheckboxModal = props => {
|
|
|
28
28
|
if (nodes.length === 0) {
|
|
29
29
|
return null;
|
|
30
30
|
}
|
|
31
|
-
return /*#__PURE__*/React.createElement("ul", null, nodes.map(node =>
|
|
31
|
+
return /*#__PURE__*/React.createElement("ul", null, nodes.map(node =>
|
|
32
|
+
/*#__PURE__*/
|
|
33
|
+
// Ignored via go/ees005
|
|
34
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
35
|
+
React.createElement(ListItem, _extends({}, node, {
|
|
32
36
|
key: node.id
|
|
33
37
|
}))));
|
|
34
38
|
};
|
|
@@ -7,7 +7,12 @@ const ConfirmationModalImpl = props => {
|
|
|
7
7
|
const {
|
|
8
8
|
options
|
|
9
9
|
} = props;
|
|
10
|
-
const renderModel = (isReferentialityDialog = false) =>
|
|
10
|
+
const renderModel = (isReferentialityDialog = false) =>
|
|
11
|
+
// Ignored via go/ees005
|
|
12
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
13
|
+
// Ignored via go/ees005
|
|
14
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
15
|
+
isReferentialityDialog ? /*#__PURE__*/React.createElement(CheckboxModal, props) : /*#__PURE__*/React.createElement(SimpleModal, props);
|
|
11
16
|
return options ? /*#__PURE__*/React.createElement(ModalTransition, null, renderModel(options === null || options === void 0 ? void 0 : options.isReferentialityDialog)) : null;
|
|
12
17
|
};
|
|
13
18
|
export const ConfirmationModal = injectIntl(ConfirmationModalImpl);
|
|
@@ -96,6 +96,8 @@ export default class Dropdown extends Component {
|
|
|
96
96
|
var _document$querySelect;
|
|
97
97
|
// Focus the trigger button only on Escape
|
|
98
98
|
// Focus is done before hiding to ensure onBlur is called
|
|
99
|
+
// Ignored via go/ees005
|
|
100
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
99
101
|
(_document$querySelect = document.querySelector(`[data-testid=${this.props.buttonTestId}]`)) === null || _document$querySelect === void 0 ? void 0 : _document$querySelect.focus();
|
|
100
102
|
this.hide();
|
|
101
103
|
});
|
|
@@ -134,12 +134,18 @@ const DropdownMenuItem = props => {
|
|
|
134
134
|
|
|
135
135
|
/* ED-16704 - Native mouse event handler to overcome firefox issue on disabled <button> - https://github.com/whatwg/html/issues/5886 */
|
|
136
136
|
const labelRef = useRef(null);
|
|
137
|
-
const handleTitleWrapperMouseEvent = useCallback(
|
|
137
|
+
const handleTitleWrapperMouseEvent = useCallback(
|
|
138
|
+
// Ignored via go/ees005
|
|
139
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
140
|
+
e => {
|
|
138
141
|
if (item.disabled) {
|
|
139
142
|
e.stopPropagation();
|
|
140
143
|
e.preventDefault();
|
|
141
144
|
}
|
|
142
145
|
}, [item.disabled]);
|
|
146
|
+
|
|
147
|
+
// Ignored via go/ees005
|
|
148
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
143
149
|
const isAriaChecked = item => {
|
|
144
150
|
const {
|
|
145
151
|
selected,
|
|
@@ -147,6 +153,9 @@ const DropdownMenuItem = props => {
|
|
|
147
153
|
} = item;
|
|
148
154
|
return (domItemOptions === null || domItemOptions === void 0 ? void 0 : domItemOptions.type) === 'item-checkbox' ? selected : undefined;
|
|
149
155
|
};
|
|
156
|
+
|
|
157
|
+
// Ignored via go/ees005
|
|
158
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
150
159
|
const hasRole = item => {
|
|
151
160
|
var _item$domItemOptions;
|
|
152
161
|
return ((_item$domItemOptions = item.domItemOptions) === null || _item$domItemOptions === void 0 ? void 0 : _item$domItemOptions.type) === 'item-checkbox' ? 'menuitemcheckbox' : undefined;
|
|
@@ -221,7 +230,10 @@ const Dropdown = /*#__PURE__*/memo(props => {
|
|
|
221
230
|
return jsx("div", {
|
|
222
231
|
css: menuContainerStyles,
|
|
223
232
|
role: "menu"
|
|
224
|
-
}, items.filter(item => !item.hidden).map((item, idx) => jsx(DropdownMenuItem
|
|
233
|
+
}, items.filter(item => !item.hidden).map((item, idx) => jsx(DropdownMenuItem
|
|
234
|
+
// Ignored via go/ees005
|
|
235
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
236
|
+
, {
|
|
225
237
|
key: idx,
|
|
226
238
|
item: item,
|
|
227
239
|
hide: hide,
|
|
@@ -62,6 +62,8 @@ export const EmojiPickerButton = props => {
|
|
|
62
62
|
// Workaround for CETI-240 - where two onClicks fire - one when the upload button is
|
|
63
63
|
// still in the document, and one once it's detached. Does not always occur, and
|
|
64
64
|
// may be a side effect of a react render optimisation
|
|
65
|
+
// Ignored via go/ees005
|
|
66
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
65
67
|
if (e && e.target && !isDetachedElement(e.target)) {
|
|
66
68
|
togglePopup();
|
|
67
69
|
}
|
|
@@ -76,7 +78,10 @@ export const EmojiPickerButton = props => {
|
|
|
76
78
|
return;
|
|
77
79
|
}
|
|
78
80
|
return jsx(Popup, {
|
|
79
|
-
target: buttonRef.current
|
|
81
|
+
target: buttonRef.current
|
|
82
|
+
// Ignored via go/ees005
|
|
83
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
84
|
+
,
|
|
80
85
|
mountTo: props.setDisableParentScroll ? props.mountPoint : buttonRef.current.parentElement,
|
|
81
86
|
fitHeight: 350,
|
|
82
87
|
fitWidth: 350,
|
|
@@ -22,6 +22,8 @@ const ExtensionButton = props => {
|
|
|
22
22
|
extensionApi
|
|
23
23
|
} = props;
|
|
24
24
|
const ButtonIcon = React.useMemo(() => item.icon ? Loadable({
|
|
25
|
+
// Ignored via go/ees005
|
|
26
|
+
// eslint-disable-next-line require-await
|
|
25
27
|
loader: async () => resolveExtensionIcon(item.icon),
|
|
26
28
|
loading: noop
|
|
27
29
|
}) : undefined, [item.icon]);
|
|
@@ -30,6 +32,8 @@ const ExtensionButton = props => {
|
|
|
30
32
|
throw new Error(`'action' of context toolbar item '${item.key}' is not a function`);
|
|
31
33
|
}
|
|
32
34
|
const targetNodeAdf = nodeToJSON(node);
|
|
35
|
+
// Ignored via go/ees005
|
|
36
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
33
37
|
item.action(targetNodeAdf, extensionApi);
|
|
34
38
|
};
|
|
35
39
|
const getAriaLabel = () => {
|
|
@@ -65,6 +69,8 @@ export const ExtensionsPlaceholder = props => {
|
|
|
65
69
|
applyChangeToContextPanel,
|
|
66
70
|
extensionApi
|
|
67
71
|
} = props;
|
|
72
|
+
// Ignored via go/ees005
|
|
73
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
68
74
|
const [extensions, setExtensions] = useState([]);
|
|
69
75
|
useEffect(() => {
|
|
70
76
|
getExtensions();
|
|
@@ -79,6 +85,8 @@ export const ExtensionsPlaceholder = props => {
|
|
|
79
85
|
}, []);
|
|
80
86
|
const nodeAdf = React.useMemo(() => nodeToJSON(node), [node]);
|
|
81
87
|
const extensionItems = React.useMemo(() => {
|
|
88
|
+
// Ignored via go/ees005
|
|
89
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
82
90
|
return getContextualToolbarItemsFromModule(extensions, nodeAdf, extensionApi);
|
|
83
91
|
}, [extensions, nodeAdf, extensionApi]);
|
|
84
92
|
if (!extensionItems.length) {
|
|
@@ -91,6 +99,8 @@ export const ExtensionsPlaceholder = props => {
|
|
|
91
99
|
if (separator && ['start', 'both'].includes(separator)) {
|
|
92
100
|
children.push( /*#__PURE__*/React.createElement(Separator, null));
|
|
93
101
|
}
|
|
102
|
+
// Ignored via go/ees005
|
|
103
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
94
104
|
extensionItems.forEach((item, index) => {
|
|
95
105
|
children.push( /*#__PURE__*/React.createElement(ExtensionButton, {
|
|
96
106
|
node: node,
|
package/dist/es2019/ui/Input.js
CHANGED
|
@@ -33,6 +33,9 @@ export class InputOld extends Component {
|
|
|
33
33
|
text: props.defaultValue || ''
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
|
+
|
|
37
|
+
// Ignored via go/ees005
|
|
38
|
+
// eslint-disable-next-line react/no-unsafe
|
|
36
39
|
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
37
40
|
if (this.state.text !== nextProps.defaultValue) {
|
|
38
41
|
this.setState({
|
|
@@ -22,7 +22,12 @@ const toolbarScrollButtons = css({
|
|
|
22
22
|
flexShrink: 0,
|
|
23
23
|
alignItems: 'center'
|
|
24
24
|
});
|
|
25
|
+
|
|
26
|
+
// Ignored via go/ees005
|
|
27
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
25
28
|
const LeftIcon = ChevronLeftLargeIcon;
|
|
29
|
+
// Ignored via go/ees005
|
|
30
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
26
31
|
const RightIcon = ChevronRightLargeIcon;
|
|
27
32
|
export const ScrollButtons = ({
|
|
28
33
|
intl,
|
|
@@ -81,6 +86,8 @@ export const ScrollButtons = ({
|
|
|
81
86
|
const resizeObserver = new ResizeObserver(t => {
|
|
82
87
|
var _scrollContainerRef$c7, _scrollContainerRef$c8, _scrollContainerRef$c9;
|
|
83
88
|
const widthNeededToShowAllItems = ((_scrollContainerRef$c7 = scrollContainerRef.current) === null || _scrollContainerRef$c7 === void 0 ? void 0 : _scrollContainerRef$c7.scrollWidth) || 0;
|
|
89
|
+
// Ignored via go/ees005
|
|
90
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
84
91
|
const availableSpace = (_scrollContainerRef$c8 = scrollContainerRef.current) === null || _scrollContainerRef$c8 === void 0 ? void 0 : (_scrollContainerRef$c9 = _scrollContainerRef$c8.parentNode) === null || _scrollContainerRef$c9 === void 0 ? void 0 : _scrollContainerRef$c9.offsetWidth;
|
|
85
92
|
if (availableSpace >= widthNeededToShowAllItems) {
|
|
86
93
|
setNeedScroll(false);
|
package/dist/es2019/ui/Select.js
CHANGED
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
import React, { useRef } from 'react';
|
|
2
2
|
import Select from '@atlaskit/select';
|
|
3
3
|
export default function Search(props) {
|
|
4
|
+
// Ignored via go/ees005
|
|
5
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4
6
|
const selectRef = useRef(null);
|
|
5
7
|
const {
|
|
6
8
|
width = 200
|
|
7
9
|
} = props;
|
|
8
10
|
const style = React.useMemo(() => ({
|
|
11
|
+
// Ignored via go/ees005
|
|
12
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
9
13
|
container: base => ({
|
|
10
14
|
...base,
|
|
11
15
|
width
|
|
12
16
|
}),
|
|
17
|
+
// Ignored via go/ees005
|
|
18
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
13
19
|
menuPortal: base => {
|
|
14
20
|
var _selectRef$current, _selectRef$current$se, _selectRef$current$se2, _selectRef$current2, _selectRef$current2$s, _selectRef$current2$s2, _selectRef$current2$s3;
|
|
15
21
|
// ED:16095: We add two possible getter paths for safely reaching into the underlying
|
|
@@ -79,6 +79,8 @@ const ToolbarItems = /*#__PURE__*/React.memo(({
|
|
|
79
79
|
var _api$contextPanel, _api$extension;
|
|
80
80
|
switch (item.type) {
|
|
81
81
|
case 'button':
|
|
82
|
+
// Ignored via go/ees005
|
|
83
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
82
84
|
const ButtonIcon = item.icon;
|
|
83
85
|
const onClickHandler = () => {
|
|
84
86
|
if (item.confirmDialog) {
|
|
@@ -202,7 +204,10 @@ const ToolbarItems = /*#__PURE__*/React.memo(({
|
|
|
202
204
|
key: idx,
|
|
203
205
|
dispatchCommand: dispatchCommand,
|
|
204
206
|
options: item.options,
|
|
205
|
-
hideExpandIcon: item.hideExpandIcon
|
|
207
|
+
hideExpandIcon: item.hideExpandIcon
|
|
208
|
+
// Ignored via go/ees005
|
|
209
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
210
|
+
,
|
|
206
211
|
mountPoint: scrollable ? mountRef.current : undefined,
|
|
207
212
|
boundariesElement: popupsBoundariesElement,
|
|
208
213
|
scrollableElement: popupsScrollableElement,
|
|
@@ -281,6 +286,8 @@ const ToolbarItems = /*#__PURE__*/React.memo(({
|
|
|
281
286
|
const isGroup = Array.isArray(element);
|
|
282
287
|
if (isGroup) {
|
|
283
288
|
return jsx("div", {
|
|
289
|
+
// Ignored via go/ees005
|
|
290
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
284
291
|
key: index,
|
|
285
292
|
css: buttonGroupStyles,
|
|
286
293
|
role: "radiogroup",
|
|
@@ -348,7 +355,12 @@ css({
|
|
|
348
355
|
})));
|
|
349
356
|
|
|
350
357
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
351
|
-
const toolbarOverflow = (
|
|
358
|
+
const toolbarOverflow = ({
|
|
359
|
+
scrollable,
|
|
360
|
+
scrollDisabled,
|
|
361
|
+
firstElementIsSelect,
|
|
362
|
+
paddingFeatureFlag
|
|
363
|
+
}) => css(
|
|
352
364
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
353
365
|
scrollable ?
|
|
354
366
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
@@ -365,7 +377,8 @@ css({
|
|
|
365
377
|
overflowY: 'hidden'
|
|
366
378
|
}), {
|
|
367
379
|
WebkitOverflowScrolling: 'touch',
|
|
368
|
-
|
|
380
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
381
|
+
padding: paddingFeatureFlag ? `${"var(--ds-space-050, 4px)"} 0 ${"var(--ds-space-050, 4px)"}` : `${"var(--ds-space-050, 4px)"} 0 ${"var(--ds-space-600, 48px)"}`,
|
|
369
382
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
370
383
|
'> div': {
|
|
371
384
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
@@ -527,8 +540,17 @@ class Toolbar extends Component {
|
|
|
527
540
|
ref: this.scrollContainerRef
|
|
528
541
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
529
542
|
,
|
|
530
|
-
css: toolbarOverflow(
|
|
531
|
-
|
|
543
|
+
css: toolbarOverflow({
|
|
544
|
+
scrollable,
|
|
545
|
+
scrollDisabled: this.state.scrollDisabled,
|
|
546
|
+
firstElementIsSelect,
|
|
547
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
548
|
+
paddingFeatureFlag: fg('platform_editor_floating_toolbar_padding_fix')
|
|
549
|
+
})
|
|
550
|
+
}, jsx(ToolbarItems
|
|
551
|
+
// Ignored via go/ees005
|
|
552
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
553
|
+
, _extends({}, this.props, {
|
|
532
554
|
setDisableScroll: this.setDisableScroll.bind(this),
|
|
533
555
|
mountRef: this.mountRef,
|
|
534
556
|
mounted: this.state.mounted
|
|
@@ -84,7 +84,11 @@ export var getRelevantConfig = function getRelevantConfig(selection, configs) {
|
|
|
84
84
|
};
|
|
85
85
|
var getDomRefFromSelection = function getDomRefFromSelection(view, dispatchAnalyticsEvent) {
|
|
86
86
|
try {
|
|
87
|
+
// Ignored via go/ees005
|
|
88
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
87
89
|
return findDomRefAtPos(view.state.selection.from, view.domAtPos.bind(view));
|
|
90
|
+
// Ignored via go/ees005
|
|
91
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
88
92
|
} catch (error) {
|
|
89
93
|
// eslint-disable-next-line no-console
|
|
90
94
|
console.warn(error);
|
|
@@ -262,7 +266,10 @@ export function ContentComponent(_ref5) {
|
|
|
262
266
|
// Confirm dialog
|
|
263
267
|
var _ref7 = floatingToolbarData || {},
|
|
264
268
|
confirmDialogForItem = _ref7.confirmDialogForItem;
|
|
265
|
-
var confirmButtonItem = confirmDialogForItem ?
|
|
269
|
+
var confirmButtonItem = confirmDialogForItem ?
|
|
270
|
+
// Ignored via go/ees005
|
|
271
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
272
|
+
toolbarItems[confirmDialogForItem] : undefined;
|
|
266
273
|
var scrollable = config.scrollable;
|
|
267
274
|
var confirmDialogOptions = typeof (confirmButtonItem === null || confirmButtonItem === void 0 ? void 0 : confirmButtonItem.confirmDialog) === 'function' ? confirmButtonItem === null || confirmButtonItem === void 0 ? void 0 : confirmButtonItem.confirmDialog() : confirmButtonItem === null || confirmButtonItem === void 0 ? void 0 : confirmButtonItem.confirmDialog;
|
|
268
275
|
return /*#__PURE__*/React.createElement(ErrorBoundary, {
|
|
@@ -298,7 +305,10 @@ export function ContentComponent(_ref5) {
|
|
|
298
305
|
providers: ['extensionProvider'],
|
|
299
306
|
renderNode: function renderNode(providers) {
|
|
300
307
|
return /*#__PURE__*/React.createElement(ToolbarLoader, {
|
|
301
|
-
target: targetRef
|
|
308
|
+
target: targetRef
|
|
309
|
+
// Ignored via go/ees005
|
|
310
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
311
|
+
,
|
|
302
312
|
items: toolbarItems,
|
|
303
313
|
groupLabel: groupLabel,
|
|
304
314
|
node: node,
|
|
@@ -326,9 +336,15 @@ export function ContentComponent(_ref5) {
|
|
|
326
336
|
options: confirmDialogOptions,
|
|
327
337
|
onConfirm: function onConfirm() {
|
|
328
338
|
var isChecked = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
339
|
+
// Ignored via go/ees005
|
|
340
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
329
341
|
if (!!confirmDialogOptions.onConfirm) {
|
|
342
|
+
// Ignored via go/ees005
|
|
343
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
330
344
|
dispatchCommand(confirmDialogOptions.onConfirm(isChecked));
|
|
331
345
|
} else {
|
|
346
|
+
// Ignored via go/ees005
|
|
347
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
332
348
|
dispatchCommand(confirmButtonItem.onClick);
|
|
333
349
|
}
|
|
334
350
|
},
|
|
@@ -54,6 +54,8 @@ export function checkShouldForceFocusAndApply(view) {
|
|
|
54
54
|
block: 'center',
|
|
55
55
|
inline: 'nearest'
|
|
56
56
|
});
|
|
57
|
+
// Ignored via go/ees005
|
|
58
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
57
59
|
focusableElement.focus();
|
|
58
60
|
var tr = view.state.tr,
|
|
59
61
|
dispatch = view.dispatch;
|
|
@@ -28,9 +28,14 @@ export var CheckboxModal = function CheckboxModal(props) {
|
|
|
28
28
|
return null;
|
|
29
29
|
}
|
|
30
30
|
return /*#__PURE__*/React.createElement("ul", null, nodes.map(function (node) {
|
|
31
|
-
return
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
return (
|
|
32
|
+
/*#__PURE__*/
|
|
33
|
+
// Ignored via go/ees005
|
|
34
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
35
|
+
React.createElement(ListItem, _extends({}, node, {
|
|
36
|
+
key: node.id
|
|
37
|
+
}))
|
|
38
|
+
);
|
|
34
39
|
}));
|
|
35
40
|
};
|
|
36
41
|
var ListItem = function ListItem(props) {
|
|
@@ -7,7 +7,13 @@ var ConfirmationModalImpl = function ConfirmationModalImpl(props) {
|
|
|
7
7
|
var options = props.options;
|
|
8
8
|
var renderModel = function renderModel() {
|
|
9
9
|
var isReferentialityDialog = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
10
|
-
return
|
|
10
|
+
return (
|
|
11
|
+
// Ignored via go/ees005
|
|
12
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
13
|
+
// Ignored via go/ees005
|
|
14
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
15
|
+
isReferentialityDialog ? /*#__PURE__*/React.createElement(CheckboxModal, props) : /*#__PURE__*/React.createElement(SimpleModal, props)
|
|
16
|
+
);
|
|
11
17
|
};
|
|
12
18
|
return options ? /*#__PURE__*/React.createElement(ModalTransition, null, renderModel(options === null || options === void 0 ? void 0 : options.isReferentialityDialog)) : null;
|
|
13
19
|
};
|
package/dist/esm/ui/Dropdown.js
CHANGED
|
@@ -109,6 +109,8 @@ var Dropdown = /*#__PURE__*/function (_Component) {
|
|
|
109
109
|
var _document$querySelect;
|
|
110
110
|
// Focus the trigger button only on Escape
|
|
111
111
|
// Focus is done before hiding to ensure onBlur is called
|
|
112
|
+
// Ignored via go/ees005
|
|
113
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
112
114
|
(_document$querySelect = document.querySelector("[data-testid=".concat(_this.props.buttonTestId, "]"))) === null || _document$querySelect === void 0 || _document$querySelect.focus();
|
|
113
115
|
_this.hide();
|
|
114
116
|
});
|
|
@@ -136,17 +136,26 @@ var DropdownMenuItem = function DropdownMenuItem(props) {
|
|
|
136
136
|
|
|
137
137
|
/* ED-16704 - Native mouse event handler to overcome firefox issue on disabled <button> - https://github.com/whatwg/html/issues/5886 */
|
|
138
138
|
var labelRef = useRef(null);
|
|
139
|
-
var handleTitleWrapperMouseEvent = useCallback(
|
|
139
|
+
var handleTitleWrapperMouseEvent = useCallback(
|
|
140
|
+
// Ignored via go/ees005
|
|
141
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
142
|
+
function (e) {
|
|
140
143
|
if (item.disabled) {
|
|
141
144
|
e.stopPropagation();
|
|
142
145
|
e.preventDefault();
|
|
143
146
|
}
|
|
144
147
|
}, [item.disabled]);
|
|
148
|
+
|
|
149
|
+
// Ignored via go/ees005
|
|
150
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
145
151
|
var isAriaChecked = function isAriaChecked(item) {
|
|
146
152
|
var selected = item.selected,
|
|
147
153
|
domItemOptions = item.domItemOptions;
|
|
148
154
|
return (domItemOptions === null || domItemOptions === void 0 ? void 0 : domItemOptions.type) === 'item-checkbox' ? selected : undefined;
|
|
149
155
|
};
|
|
156
|
+
|
|
157
|
+
// Ignored via go/ees005
|
|
158
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
150
159
|
var hasRole = function hasRole(item) {
|
|
151
160
|
var _item$domItemOptions;
|
|
152
161
|
return ((_item$domItemOptions = item.domItemOptions) === null || _item$domItemOptions === void 0 ? void 0 : _item$domItemOptions.type) === 'item-checkbox' ? 'menuitemcheckbox' : undefined;
|
|
@@ -222,7 +231,10 @@ var Dropdown = /*#__PURE__*/memo(function (props) {
|
|
|
222
231
|
}, items.filter(function (item) {
|
|
223
232
|
return !item.hidden;
|
|
224
233
|
}).map(function (item, idx) {
|
|
225
|
-
return jsx(DropdownMenuItem
|
|
234
|
+
return jsx(DropdownMenuItem
|
|
235
|
+
// Ignored via go/ees005
|
|
236
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
237
|
+
, {
|
|
226
238
|
key: idx,
|
|
227
239
|
item: item,
|
|
228
240
|
hide: hide,
|
|
@@ -67,6 +67,8 @@ export var EmojiPickerButton = function EmojiPickerButton(props) {
|
|
|
67
67
|
// Workaround for CETI-240 - where two onClicks fire - one when the upload button is
|
|
68
68
|
// still in the document, and one once it's detached. Does not always occur, and
|
|
69
69
|
// may be a side effect of a react render optimisation
|
|
70
|
+
// Ignored via go/ees005
|
|
71
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
70
72
|
if (e && e.target && !isDetachedElement(e.target)) {
|
|
71
73
|
togglePopup();
|
|
72
74
|
}
|
|
@@ -81,7 +83,10 @@ export var EmojiPickerButton = function EmojiPickerButton(props) {
|
|
|
81
83
|
return;
|
|
82
84
|
}
|
|
83
85
|
return jsx(Popup, {
|
|
84
|
-
target: buttonRef.current
|
|
86
|
+
target: buttonRef.current
|
|
87
|
+
// Ignored via go/ees005
|
|
88
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
89
|
+
,
|
|
85
90
|
mountTo: props.setDisableParentScroll ? props.mountPoint : buttonRef.current.parentElement,
|
|
86
91
|
fitHeight: 350,
|
|
87
92
|
fitWidth: 350,
|
|
@@ -46,6 +46,8 @@ var ExtensionButton = function ExtensionButton(props) {
|
|
|
46
46
|
extensionApi = props.extensionApi;
|
|
47
47
|
var ButtonIcon = React.useMemo(function () {
|
|
48
48
|
return item.icon ? Loadable({
|
|
49
|
+
// Ignored via go/ees005
|
|
50
|
+
// eslint-disable-next-line require-await
|
|
49
51
|
loader: function () {
|
|
50
52
|
var _loader = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
|
51
53
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
@@ -71,6 +73,8 @@ var ExtensionButton = function ExtensionButton(props) {
|
|
|
71
73
|
throw new Error("'action' of context toolbar item '".concat(item.key, "' is not a function"));
|
|
72
74
|
}
|
|
73
75
|
var targetNodeAdf = nodeToJSON(node);
|
|
76
|
+
// Ignored via go/ees005
|
|
77
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
74
78
|
item.action(targetNodeAdf, extensionApi);
|
|
75
79
|
};
|
|
76
80
|
var getAriaLabel = function getAriaLabel() {
|
|
@@ -104,6 +108,8 @@ export var ExtensionsPlaceholder = function ExtensionsPlaceholder(props) {
|
|
|
104
108
|
separator = props.separator,
|
|
105
109
|
applyChangeToContextPanel = props.applyChangeToContextPanel,
|
|
106
110
|
extensionApi = props.extensionApi;
|
|
111
|
+
// Ignored via go/ees005
|
|
112
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
107
113
|
var _useState = useState([]),
|
|
108
114
|
_useState2 = _slicedToArray(_useState, 2),
|
|
109
115
|
extensions = _useState2[0],
|
|
@@ -147,6 +153,8 @@ export var ExtensionsPlaceholder = function ExtensionsPlaceholder(props) {
|
|
|
147
153
|
return nodeToJSON(node);
|
|
148
154
|
}, [node]);
|
|
149
155
|
var extensionItems = React.useMemo(function () {
|
|
156
|
+
// Ignored via go/ees005
|
|
157
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
150
158
|
return getContextualToolbarItemsFromModule(extensions, nodeAdf, extensionApi);
|
|
151
159
|
}, [extensions, nodeAdf, extensionApi]);
|
|
152
160
|
if (!extensionItems.length) {
|
|
@@ -159,6 +167,8 @@ export var ExtensionsPlaceholder = function ExtensionsPlaceholder(props) {
|
|
|
159
167
|
if (separator && ['start', 'both'].includes(separator)) {
|
|
160
168
|
children.push( /*#__PURE__*/React.createElement(Separator, null));
|
|
161
169
|
}
|
|
170
|
+
// Ignored via go/ees005
|
|
171
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
162
172
|
extensionItems.forEach(function (item, index) {
|
|
163
173
|
children.push( /*#__PURE__*/React.createElement(ExtensionButton, {
|
|
164
174
|
node: node,
|
package/dist/esm/ui/Input.js
CHANGED
|
@@ -44,6 +44,9 @@ export var InputOld = /*#__PURE__*/function (_Component) {
|
|
|
44
44
|
};
|
|
45
45
|
return _this;
|
|
46
46
|
}
|
|
47
|
+
|
|
48
|
+
// Ignored via go/ees005
|
|
49
|
+
// eslint-disable-next-line react/no-unsafe
|
|
47
50
|
_inherits(InputOld, _Component);
|
|
48
51
|
return _createClass(InputOld, [{
|
|
49
52
|
key: "UNSAFE_componentWillReceiveProps",
|
|
@@ -23,7 +23,12 @@ var toolbarScrollButtons = css({
|
|
|
23
23
|
flexShrink: 0,
|
|
24
24
|
alignItems: 'center'
|
|
25
25
|
});
|
|
26
|
+
|
|
27
|
+
// Ignored via go/ees005
|
|
28
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
26
29
|
var LeftIcon = ChevronLeftLargeIcon;
|
|
30
|
+
// Ignored via go/ees005
|
|
31
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
27
32
|
var RightIcon = ChevronRightLargeIcon;
|
|
28
33
|
export var ScrollButtons = function ScrollButtons(_ref) {
|
|
29
34
|
var intl = _ref.intl,
|
|
@@ -91,6 +96,8 @@ export var ScrollButtons = function ScrollButtons(_ref) {
|
|
|
91
96
|
var resizeObserver = new ResizeObserver(function (t) {
|
|
92
97
|
var _scrollContainerRef$c8, _scrollContainerRef$c9;
|
|
93
98
|
var widthNeededToShowAllItems = ((_scrollContainerRef$c8 = scrollContainerRef.current) === null || _scrollContainerRef$c8 === void 0 ? void 0 : _scrollContainerRef$c8.scrollWidth) || 0;
|
|
99
|
+
// Ignored via go/ees005
|
|
100
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
94
101
|
var availableSpace = (_scrollContainerRef$c9 = scrollContainerRef.current) === null || _scrollContainerRef$c9 === void 0 || (_scrollContainerRef$c9 = _scrollContainerRef$c9.parentNode) === null || _scrollContainerRef$c9 === void 0 ? void 0 : _scrollContainerRef$c9.offsetWidth;
|
|
95
102
|
if (availableSpace >= widthNeededToShowAllItems) {
|
|
96
103
|
setNeedScroll(false);
|
package/dist/esm/ui/Select.js
CHANGED
|
@@ -4,16 +4,22 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
4
4
|
import React, { useRef } from 'react';
|
|
5
5
|
import Select from '@atlaskit/select';
|
|
6
6
|
export default function Search(props) {
|
|
7
|
+
// Ignored via go/ees005
|
|
8
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7
9
|
var selectRef = useRef(null);
|
|
8
10
|
var _props$width = props.width,
|
|
9
11
|
width = _props$width === void 0 ? 200 : _props$width;
|
|
10
12
|
var style = React.useMemo(function () {
|
|
11
13
|
return {
|
|
14
|
+
// Ignored via go/ees005
|
|
15
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
12
16
|
container: function container(base) {
|
|
13
17
|
return _objectSpread(_objectSpread({}, base), {}, {
|
|
14
18
|
width: width
|
|
15
19
|
});
|
|
16
20
|
},
|
|
21
|
+
// Ignored via go/ees005
|
|
22
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
17
23
|
menuPortal: function menuPortal(base) {
|
|
18
24
|
var _selectRef$current, _selectRef$current2;
|
|
19
25
|
// ED:16095: We add two possible getter paths for safely reaching into the underlying
|
package/dist/esm/ui/Toolbar.js
CHANGED
|
@@ -83,6 +83,8 @@ var ToolbarItems = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
83
83
|
var _api$contextPanel, _api$extension;
|
|
84
84
|
switch (item.type) {
|
|
85
85
|
case 'button':
|
|
86
|
+
// Ignored via go/ees005
|
|
87
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
86
88
|
var ButtonIcon = item.icon;
|
|
87
89
|
var onClickHandler = function onClickHandler() {
|
|
88
90
|
if (item.confirmDialog) {
|
|
@@ -222,7 +224,10 @@ var ToolbarItems = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
222
224
|
key: idx,
|
|
223
225
|
dispatchCommand: dispatchCommand,
|
|
224
226
|
options: item.options,
|
|
225
|
-
hideExpandIcon: item.hideExpandIcon
|
|
227
|
+
hideExpandIcon: item.hideExpandIcon
|
|
228
|
+
// Ignored via go/ees005
|
|
229
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
230
|
+
,
|
|
226
231
|
mountPoint: scrollable ? mountRef.current : undefined,
|
|
227
232
|
boundariesElement: popupsBoundariesElement,
|
|
228
233
|
scrollableElement: popupsScrollableElement,
|
|
@@ -307,6 +312,8 @@ var ToolbarItems = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
307
312
|
var isGroup = Array.isArray(element);
|
|
308
313
|
if (isGroup) {
|
|
309
314
|
return jsx("div", {
|
|
315
|
+
// Ignored via go/ees005
|
|
316
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
310
317
|
key: index,
|
|
311
318
|
css: buttonGroupStyles,
|
|
312
319
|
role: "radiogroup",
|
|
@@ -380,7 +387,11 @@ var toolbarContainer = function toolbarContainer(scrollable, hasSelect, firstEle
|
|
|
380
387
|
};
|
|
381
388
|
|
|
382
389
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
383
|
-
var toolbarOverflow = function toolbarOverflow(
|
|
390
|
+
var toolbarOverflow = function toolbarOverflow(_ref2) {
|
|
391
|
+
var scrollable = _ref2.scrollable,
|
|
392
|
+
scrollDisabled = _ref2.scrollDisabled,
|
|
393
|
+
firstElementIsSelect = _ref2.firstElementIsSelect,
|
|
394
|
+
paddingFeatureFlag = _ref2.paddingFeatureFlag;
|
|
384
395
|
return css(
|
|
385
396
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
386
397
|
scrollable ?
|
|
@@ -398,7 +409,8 @@ var toolbarOverflow = function toolbarOverflow(scrollable, scrollDisabled, first
|
|
|
398
409
|
overflowY: 'hidden'
|
|
399
410
|
}), {
|
|
400
411
|
WebkitOverflowScrolling: 'touch',
|
|
401
|
-
|
|
412
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
413
|
+
padding: paddingFeatureFlag ? "var(--ds-space-050, 4px)".concat(" 0 ", "var(--ds-space-050, 4px)") : "var(--ds-space-050, 4px)".concat(" 0 ", "var(--ds-space-600, 48px)"),
|
|
402
414
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
403
415
|
'> div': {
|
|
404
416
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
@@ -465,8 +477,8 @@ var Toolbar = /*#__PURE__*/function (_Component) {
|
|
|
465
477
|
_inherits(Toolbar, _Component);
|
|
466
478
|
return _createClass(Toolbar, [{
|
|
467
479
|
key: "resetStyling",
|
|
468
|
-
value: function resetStyling(
|
|
469
|
-
var table =
|
|
480
|
+
value: function resetStyling(_ref3) {
|
|
481
|
+
var table = _ref3.table;
|
|
470
482
|
if (this.props.editorView) {
|
|
471
483
|
var _this$props$api;
|
|
472
484
|
var _this$props$editorVie2 = this.props.editorView,
|
|
@@ -575,8 +587,17 @@ var Toolbar = /*#__PURE__*/function (_Component) {
|
|
|
575
587
|
ref: this.scrollContainerRef
|
|
576
588
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
577
589
|
,
|
|
578
|
-
css: toolbarOverflow(
|
|
579
|
-
|
|
590
|
+
css: toolbarOverflow({
|
|
591
|
+
scrollable: scrollable,
|
|
592
|
+
scrollDisabled: this.state.scrollDisabled,
|
|
593
|
+
firstElementIsSelect: firstElementIsSelect,
|
|
594
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
595
|
+
paddingFeatureFlag: fg('platform_editor_floating_toolbar_padding_fix')
|
|
596
|
+
})
|
|
597
|
+
}, jsx(ToolbarItems
|
|
598
|
+
// Ignored via go/ees005
|
|
599
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
600
|
+
, _extends({}, this.props, {
|
|
580
601
|
setDisableScroll: this.setDisableScroll.bind(this),
|
|
581
602
|
mountRef: this.mountRef,
|
|
582
603
|
mounted: this.state.mounted
|
package/dist/types/ui/Input.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ export declare class InputOld extends Component<Props, State> {
|
|
|
20
20
|
UNSAFE_componentWillReceiveProps(nextProps: Props): void;
|
|
21
21
|
handleChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
22
22
|
handleSubmit: (e: React.FormEvent) => void;
|
|
23
|
-
handleBlur: (e: React.FocusEvent<
|
|
23
|
+
handleBlur: (e: React.FocusEvent<Object>) => void;
|
|
24
24
|
render(): jsx.JSX.Element;
|
|
25
25
|
}
|
|
26
26
|
export declare const InputNew: (props: Props) => jsx.JSX.Element;
|
|
@@ -20,7 +20,7 @@ export declare class InputOld extends Component<Props, State> {
|
|
|
20
20
|
UNSAFE_componentWillReceiveProps(nextProps: Props): void;
|
|
21
21
|
handleChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
22
22
|
handleSubmit: (e: React.FormEvent) => void;
|
|
23
|
-
handleBlur: (e: React.FocusEvent<
|
|
23
|
+
handleBlur: (e: React.FocusEvent<Object>) => void;
|
|
24
24
|
render(): jsx.JSX.Element;
|
|
25
25
|
}
|
|
26
26
|
export declare const InputNew: (props: Props) => jsx.JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-floating-toolbar",
|
|
3
|
-
"version": "1.14.
|
|
3
|
+
"version": "1.14.14",
|
|
4
4
|
"description": "Floating toolbar plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"@atlaskit/adf-utils": "^19.14.0",
|
|
27
27
|
"@atlaskit/button": "^20.3.0",
|
|
28
28
|
"@atlaskit/checkbox": "^15.2.0",
|
|
29
|
-
"@atlaskit/editor-common": "^97.
|
|
29
|
+
"@atlaskit/editor-common": "^97.2.0",
|
|
30
30
|
"@atlaskit/editor-palette": "1.6.3",
|
|
31
31
|
"@atlaskit/editor-plugin-block-controls": "^2.16.0",
|
|
32
32
|
"@atlaskit/editor-plugin-context-panel": "^1.3.0",
|
|
@@ -113,6 +113,9 @@
|
|
|
113
113
|
"platform-feature-flags": {
|
|
114
114
|
"platform_editor_react18_phase2_v2": {
|
|
115
115
|
"type": "boolean"
|
|
116
|
+
},
|
|
117
|
+
"platform_editor_floating_toolbar_padding_fix": {
|
|
118
|
+
"type": "boolean"
|
|
116
119
|
}
|
|
117
120
|
}
|
|
118
121
|
}
|