@atlaskit/editor-common 94.5.0 → 94.6.0
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 +23 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui/index.js +7 -1
- package/dist/cjs/ui/with-outer-listeners.js +16 -5
- package/dist/cjs/ui-menu/ColorPickerButton/index.js +1 -0
- package/dist/cjs/ui-menu/DropdownMenu/index.js +7 -22
- package/dist/cjs/ui-menu/ToolbarButton/index.js +2 -3
- package/dist/cjs/ui-react/with-react-editor-view-outer-listeners.js +3 -2
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui/index.js +1 -1
- package/dist/es2019/ui/with-outer-listeners.js +15 -5
- package/dist/es2019/ui-menu/ColorPickerButton/index.js +1 -0
- package/dist/es2019/ui-menu/DropdownMenu/index.js +7 -22
- package/dist/es2019/ui-menu/ToolbarButton/index.js +2 -3
- package/dist/es2019/ui-react/with-react-editor-view-outer-listeners.js +3 -2
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui/index.js +1 -1
- package/dist/esm/ui/with-outer-listeners.js +15 -5
- package/dist/esm/ui-menu/ColorPickerButton/index.js +1 -0
- package/dist/esm/ui-menu/DropdownMenu/index.js +7 -22
- package/dist/esm/ui-menu/ToolbarButton/index.js +2 -3
- package/dist/esm/ui-react/with-react-editor-view-outer-listeners.js +3 -2
- package/dist/types/ui/index.d.ts +1 -1
- package/dist/types/ui/with-outer-listeners.d.ts +1 -0
- package/dist/types-ts4.5/ui/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/with-outer-listeners.d.ts +1 -0
- package/package.json +1 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 94.6.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#157489](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/157489)
|
|
8
|
+
[`00657197923b2`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/00657197923b2) -
|
|
9
|
+
We are testing replacing findDOMNode with an explicit ref behind a feature flag. If this fix is
|
|
10
|
+
successful it will be available in a later release.
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- [#157432](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/157432)
|
|
15
|
+
[`f42393192e79d`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/f42393192e79d) -
|
|
16
|
+
set button appearance to subtle to remove unwanted grey border
|
|
17
|
+
|
|
18
|
+
## 94.5.1
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- [#152968](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/152968)
|
|
23
|
+
[`501e975100eab`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/501e975100eab) -
|
|
24
|
+
[ED-24137] feature flag clean up for the Cell Options menu a11y work
|
|
25
|
+
|
|
3
26
|
## 94.5.0
|
|
4
27
|
|
|
5
28
|
### Minor Changes
|
|
@@ -17,7 +17,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
|
|
|
17
17
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
18
18
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
19
19
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
20
|
-
var packageVersion = "94.
|
|
20
|
+
var packageVersion = "94.6.0";
|
|
21
21
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
22
22
|
// Remove URL as it has UGC
|
|
23
23
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -24,7 +24,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
24
24
|
* @jsx jsx
|
|
25
25
|
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
26
26
|
var packageName = "@atlaskit/editor-common";
|
|
27
|
-
var packageVersion = "94.
|
|
27
|
+
var packageVersion = "94.6.0";
|
|
28
28
|
var halfFocusRing = 1;
|
|
29
29
|
var dropOffset = '0, 8';
|
|
30
30
|
var DropList = /*#__PURE__*/function (_Component) {
|
package/dist/cjs/ui/index.js
CHANGED
|
@@ -137,6 +137,12 @@ Object.defineProperty(exports, "PanelTextInput", {
|
|
|
137
137
|
return _PanelTextInput.default;
|
|
138
138
|
}
|
|
139
139
|
});
|
|
140
|
+
Object.defineProperty(exports, "PlainOutsideClickTargetRefContext", {
|
|
141
|
+
enumerable: true,
|
|
142
|
+
get: function get() {
|
|
143
|
+
return _withOuterListeners.PlainOutsideClickTargetRefContext;
|
|
144
|
+
}
|
|
145
|
+
});
|
|
140
146
|
Object.defineProperty(exports, "Popup", {
|
|
141
147
|
enumerable: true,
|
|
142
148
|
get: function get() {
|
|
@@ -404,7 +410,7 @@ var _Popup = _interopRequireWildcard(require("./Popup"));
|
|
|
404
410
|
var _UnsupportedBlock = _interopRequireDefault(require("./UnsupportedBlock"));
|
|
405
411
|
var _UnsupportedInline = _interopRequireDefault(require("./UnsupportedInline"));
|
|
406
412
|
var _BaseTheme = require("./BaseTheme");
|
|
407
|
-
var _withOuterListeners =
|
|
413
|
+
var _withOuterListeners = _interopRequireWildcard(require("./with-outer-listeners"));
|
|
408
414
|
var _WidthProvider = require("./WidthProvider");
|
|
409
415
|
var _OverflowShadow = _interopRequireWildcard(require("./OverflowShadow"));
|
|
410
416
|
var _shadowObserver = require("./OverflowShadow/shadowObserver");
|
|
@@ -5,6 +5,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
+
exports.PlainOutsideClickTargetRefContext = void 0;
|
|
8
9
|
exports.default = withOuterListeners;
|
|
9
10
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
10
11
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
@@ -15,10 +16,14 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
|
|
|
15
16
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
16
17
|
var _react = _interopRequireWildcard(require("react"));
|
|
17
18
|
var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
19
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
18
20
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
19
21
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
20
22
|
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = (0, _getPrototypeOf2.default)(t); if (r) { var s = (0, _getPrototypeOf2.default)(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return (0, _possibleConstructorReturn2.default)(this, e); }; }
|
|
21
23
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
24
|
+
// Use this context to pass in the reference of the element that should be considered as the outside click target
|
|
25
|
+
// The outside click target is the element that should be clicked outside of to trigger the `handleClickOutside` event
|
|
26
|
+
var PlainOutsideClickTargetRefContext = exports.PlainOutsideClickTargetRefContext = /*#__PURE__*/_react.default.createContext(function () {});
|
|
22
27
|
function withOuterListeners(Component) {
|
|
23
28
|
return /*#__PURE__*/function (_PureComponent) {
|
|
24
29
|
(0, _inherits2.default)(WithOutsideClick, _PureComponent);
|
|
@@ -30,13 +35,14 @@ function withOuterListeners(Component) {
|
|
|
30
35
|
args[_key] = arguments[_key];
|
|
31
36
|
}
|
|
32
37
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
38
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "outsideClickTargetRef", /*#__PURE__*/_react.default.createRef());
|
|
33
39
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleClick", function (evt) {
|
|
34
|
-
var
|
|
40
|
+
var _this$outsideClickTar;
|
|
41
|
+
var domNode = (0, _platformFeatureFlags.fg)('platform_editor_replace_finddomnode_in_common') ? (_this$outsideClickTar = _this.outsideClickTargetRef.current) === null || _this$outsideClickTar === void 0 ? void 0 : _this$outsideClickTar.deref() : _reactDom.default.findDOMNode((0, _assertThisInitialized2.default)(_this)); // eslint-disable-line react/no-find-dom-node
|
|
35
42
|
|
|
36
43
|
if (!domNode || evt.target instanceof Node && !domNode.contains(evt.target)) {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
44
|
+
var _this$props$handleCli, _this$props;
|
|
45
|
+
(_this$props$handleCli = (_this$props = _this.props).handleClickOutside) === null || _this$props$handleCli === void 0 || _this$props$handleCli.call(_this$props, evt);
|
|
40
46
|
}
|
|
41
47
|
});
|
|
42
48
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleKeydown", function (evt) {
|
|
@@ -44,6 +50,9 @@ function withOuterListeners(Component) {
|
|
|
44
50
|
_this.props.handleEscapeKeydown(evt);
|
|
45
51
|
}
|
|
46
52
|
});
|
|
53
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "setOutsideClickTargetRef", function (el) {
|
|
54
|
+
_this.outsideClickTargetRef.current = el && new WeakRef(el);
|
|
55
|
+
});
|
|
47
56
|
return _this;
|
|
48
57
|
}
|
|
49
58
|
(0, _createClass2.default)(WithOutsideClick, [{
|
|
@@ -69,7 +78,9 @@ function withOuterListeners(Component) {
|
|
|
69
78
|
}, {
|
|
70
79
|
key: "render",
|
|
71
80
|
value: function render() {
|
|
72
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
81
|
+
return /*#__PURE__*/_react.default.createElement(PlainOutsideClickTargetRefContext.Provider, {
|
|
82
|
+
value: this.setOutsideClickTargetRef
|
|
83
|
+
}, /*#__PURE__*/_react.default.createElement(Component, this.props));
|
|
73
84
|
}
|
|
74
85
|
}]);
|
|
75
86
|
return WithOutsideClick;
|
|
@@ -218,6 +218,7 @@ var ColorPickerButton = function ColorPickerButton(props) {
|
|
|
218
218
|
content: title,
|
|
219
219
|
position: "top"
|
|
220
220
|
}, (0, _react2.jsx)(_standardButton.default, {
|
|
221
|
+
appearance: 'subtle',
|
|
221
222
|
ref: buttonRef,
|
|
222
223
|
"aria-label": title,
|
|
223
224
|
"aria-expanded": props.isAriaExpanded ? isPopupOpen : undefined,
|
|
@@ -23,7 +23,6 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
23
23
|
var _react2 = require("@emotion/react");
|
|
24
24
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
25
25
|
var _menu = require("@atlaskit/menu");
|
|
26
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
27
26
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
28
27
|
var _styles = require("../../styles");
|
|
29
28
|
var _ToolbarArrowKeyNavigationProvider = require("../../ui-menu/ToolbarArrowKeyNavigationProvider");
|
|
@@ -113,25 +112,15 @@ var DropdownMenuWrapper = exports.default = /*#__PURE__*/function (_PureComponen
|
|
|
113
112
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleCloseAndFocus", function (event) {
|
|
114
113
|
var _this$state$target;
|
|
115
114
|
(_this$state$target = _this.state.target) === null || _this$state$target === void 0 || (_this$state$target = _this$state$target.querySelector('button')) === null || _this$state$target === void 0 || _this$state$target.focus();
|
|
116
|
-
|
|
117
|
-
_this.handleClose(event);
|
|
118
|
-
} else {
|
|
119
|
-
_this.handleClose();
|
|
120
|
-
}
|
|
115
|
+
_this.handleClose(event);
|
|
121
116
|
});
|
|
122
117
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleClose", function (event) {
|
|
123
118
|
var onOpenChange = _this.props.onOpenChange;
|
|
124
119
|
if (onOpenChange) {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
});
|
|
130
|
-
} else {
|
|
131
|
-
onOpenChange({
|
|
132
|
-
isOpen: false
|
|
133
|
-
});
|
|
134
|
-
}
|
|
120
|
+
onOpenChange({
|
|
121
|
+
isOpen: false,
|
|
122
|
+
event: event
|
|
123
|
+
});
|
|
135
124
|
}
|
|
136
125
|
});
|
|
137
126
|
return _this;
|
|
@@ -201,11 +190,7 @@ var DropdownMenuWrapper = exports.default = /*#__PURE__*/function (_PureComponen
|
|
|
201
190
|
handleClickOutside: this.handleClose,
|
|
202
191
|
handleEscapeKeydown: handleEscapeKeydown || this.handleCloseAndFocus,
|
|
203
192
|
handleEnterKeydown: function handleEnterKeydown(e) {
|
|
204
|
-
if (
|
|
205
|
-
if (!allowEnterDefaultBehavior) {
|
|
206
|
-
e.preventDefault();
|
|
207
|
-
}
|
|
208
|
-
} else {
|
|
193
|
+
if (!allowEnterDefaultBehavior) {
|
|
209
194
|
e.preventDefault();
|
|
210
195
|
}
|
|
211
196
|
e.stopPropagation();
|
|
@@ -360,7 +345,7 @@ function DropdownMenuItem(_ref) {
|
|
|
360
345
|
item: item
|
|
361
346
|
});
|
|
362
347
|
},
|
|
363
|
-
"aria-expanded":
|
|
348
|
+
"aria-expanded": item['aria-expanded']
|
|
364
349
|
}, item.content));
|
|
365
350
|
if (item.tooltipDescription) {
|
|
366
351
|
var _item$key3;
|
|
@@ -10,7 +10,6 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
var _react2 = require("@emotion/react");
|
|
12
12
|
var _types = require("@atlaskit/analytics-listeners/types");
|
|
13
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
14
13
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
15
14
|
var _analytics = require("../../analytics");
|
|
16
15
|
var _keymaps = require("../../keymaps");
|
|
@@ -117,10 +116,10 @@ var ToolbarButton = /*#__PURE__*/_react.default.forwardRef(function (props, ref)
|
|
|
117
116
|
if (!title) {
|
|
118
117
|
return button;
|
|
119
118
|
}
|
|
120
|
-
var tooltipContent = hideTooltip ? null : (0,
|
|
119
|
+
var tooltipContent = hideTooltip ? null : (0, _react2.jsx)(_keymaps.ToolTipContent, {
|
|
121
120
|
description: title,
|
|
122
121
|
keymap: keymap
|
|
123
|
-
})
|
|
122
|
+
});
|
|
124
123
|
return (0, _react2.jsx)(_tooltip.default, {
|
|
125
124
|
content: tooltipContent,
|
|
126
125
|
hideTooltipOnClick: true,
|
|
@@ -41,10 +41,11 @@ var WithOutsideClick = /*#__PURE__*/function (_PureComponent) {
|
|
|
41
41
|
}
|
|
42
42
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
43
43
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleClick", function (evt) {
|
|
44
|
+
var _this$props$outsideCl;
|
|
44
45
|
if (!_this.props.isActiveComponent || !_this.props.handleClickOutside) {
|
|
45
46
|
return;
|
|
46
47
|
}
|
|
47
|
-
var domNode = (0, _platformFeatureFlags.fg)('platform_editor_replace_finddomnode_in_common') ? _this.props.outsideClickTargetRef.current : _reactDom.default.findDOMNode((0, _assertThisInitialized2.default)(_this));
|
|
48
|
+
var domNode = (0, _platformFeatureFlags.fg)('platform_editor_replace_finddomnode_in_common') ? (_this$props$outsideCl = _this.props.outsideClickTargetRef.current) === null || _this$props$outsideCl === void 0 ? void 0 : _this$props$outsideCl.deref() : _reactDom.default.findDOMNode((0, _assertThisInitialized2.default)(_this));
|
|
48
49
|
if (!domNode || evt.target instanceof Node && !domNode.contains(evt.target)) {
|
|
49
50
|
var _this$props$editorVie;
|
|
50
51
|
_this.props.handleClickOutside(evt);
|
|
@@ -122,7 +123,7 @@ function withReactEditorViewOuterListeners(Component) {
|
|
|
122
123
|
setActiveComponent = _useState2[1];
|
|
123
124
|
var outsideClickTargetRef = (0, _react.useRef)(null);
|
|
124
125
|
var setOutsideClickTargetRef = (0, _react.useCallback)(function (el) {
|
|
125
|
-
outsideClickTargetRef.current = el;
|
|
126
|
+
outsideClickTargetRef.current = el && new WeakRef(el);
|
|
126
127
|
}, [outsideClickTargetRef]);
|
|
127
128
|
(0, _react.useEffect)(function () {
|
|
128
129
|
requestAnimationFrame(function () {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isFedRamp } from './environment';
|
|
2
2
|
const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
3
3
|
const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
4
|
-
const packageVersion = "94.
|
|
4
|
+
const packageVersion = "94.6.0";
|
|
5
5
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
6
6
|
// Remove URL as it has UGC
|
|
7
7
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -13,7 +13,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
|
|
|
13
13
|
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
14
14
|
import Layer from '../Layer';
|
|
15
15
|
const packageName = "@atlaskit/editor-common";
|
|
16
|
-
const packageVersion = "94.
|
|
16
|
+
const packageVersion = "94.6.0";
|
|
17
17
|
const halfFocusRing = 1;
|
|
18
18
|
const dropOffset = '0, 8';
|
|
19
19
|
class DropList extends Component {
|
package/dist/es2019/ui/index.js
CHANGED
|
@@ -7,7 +7,7 @@ export { default as Popup, findOverflowScrollParent } from './Popup';
|
|
|
7
7
|
export { default as UnsupportedBlock } from './UnsupportedBlock';
|
|
8
8
|
export { default as UnsupportedInline } from './UnsupportedInline';
|
|
9
9
|
export { BaseTheme, mapBreakpointToLayoutMaxWidth } from './BaseTheme';
|
|
10
|
-
export { default as withOuterListeners } from './with-outer-listeners';
|
|
10
|
+
export { default as withOuterListeners, PlainOutsideClickTargetRefContext } from './with-outer-listeners';
|
|
11
11
|
export { WidthContext, WidthConsumer, WidthProvider, createWidthContext, getBreakpoint } from './WidthProvider';
|
|
12
12
|
export { default as overflowShadow, shadowClassNames } from './OverflowShadow';
|
|
13
13
|
export { shadowObserverClassNames, ShadowObserver } from './OverflowShadow/shadowObserver';
|
|
@@ -1,17 +1,22 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import React, { PureComponent } from 'react';
|
|
3
3
|
import ReactDOM from 'react-dom';
|
|
4
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
|
+
// Use this context to pass in the reference of the element that should be considered as the outside click target
|
|
6
|
+
// The outside click target is the element that should be clicked outside of to trigger the `handleClickOutside` event
|
|
7
|
+
export const PlainOutsideClickTargetRefContext = /*#__PURE__*/React.createContext(() => {});
|
|
4
8
|
export default function withOuterListeners(Component) {
|
|
5
9
|
return class WithOutsideClick extends PureComponent {
|
|
6
10
|
constructor(...args) {
|
|
7
11
|
super(...args);
|
|
12
|
+
_defineProperty(this, "outsideClickTargetRef", /*#__PURE__*/React.createRef());
|
|
8
13
|
_defineProperty(this, "handleClick", evt => {
|
|
9
|
-
|
|
14
|
+
var _this$outsideClickTar;
|
|
15
|
+
const domNode = fg('platform_editor_replace_finddomnode_in_common') ? (_this$outsideClickTar = this.outsideClickTargetRef.current) === null || _this$outsideClickTar === void 0 ? void 0 : _this$outsideClickTar.deref() : ReactDOM.findDOMNode(this); // eslint-disable-line react/no-find-dom-node
|
|
10
16
|
|
|
11
17
|
if (!domNode || evt.target instanceof Node && !domNode.contains(evt.target)) {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
18
|
+
var _this$props$handleCli, _this$props;
|
|
19
|
+
(_this$props$handleCli = (_this$props = this.props).handleClickOutside) === null || _this$props$handleCli === void 0 ? void 0 : _this$props$handleCli.call(_this$props, evt);
|
|
15
20
|
}
|
|
16
21
|
});
|
|
17
22
|
_defineProperty(this, "handleKeydown", evt => {
|
|
@@ -19,6 +24,9 @@ export default function withOuterListeners(Component) {
|
|
|
19
24
|
this.props.handleEscapeKeydown(evt);
|
|
20
25
|
}
|
|
21
26
|
});
|
|
27
|
+
_defineProperty(this, "setOutsideClickTargetRef", el => {
|
|
28
|
+
this.outsideClickTargetRef.current = el && new WeakRef(el);
|
|
29
|
+
});
|
|
22
30
|
}
|
|
23
31
|
componentDidMount() {
|
|
24
32
|
if (this.props.handleClickOutside) {
|
|
@@ -37,7 +45,9 @@ export default function withOuterListeners(Component) {
|
|
|
37
45
|
}
|
|
38
46
|
}
|
|
39
47
|
render() {
|
|
40
|
-
return /*#__PURE__*/React.createElement(
|
|
48
|
+
return /*#__PURE__*/React.createElement(PlainOutsideClickTargetRefContext.Provider, {
|
|
49
|
+
value: this.setOutsideClickTargetRef
|
|
50
|
+
}, /*#__PURE__*/React.createElement(Component, this.props));
|
|
41
51
|
}
|
|
42
52
|
};
|
|
43
53
|
}
|
|
@@ -9,7 +9,6 @@ import React, { PureComponent, useContext } from 'react';
|
|
|
9
9
|
import { css, jsx } from '@emotion/react';
|
|
10
10
|
import { akEditorFloatingPanelZIndex } from '@atlaskit/editor-shared-styles';
|
|
11
11
|
import { CustomItem, MenuGroup, Section } from '@atlaskit/menu';
|
|
12
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
13
12
|
import Tooltip from '@atlaskit/tooltip';
|
|
14
13
|
import { DropdownMenuSharedCssClassName } from '../../styles';
|
|
15
14
|
import { KeyDownHandlerContext } from '../../ui-menu/ToolbarArrowKeyNavigationProvider';
|
|
@@ -114,27 +113,17 @@ export default class DropdownMenuWrapper extends PureComponent {
|
|
|
114
113
|
_defineProperty(this, "handleCloseAndFocus", event => {
|
|
115
114
|
var _this$state$target, _this$state$target$qu;
|
|
116
115
|
(_this$state$target = this.state.target) === null || _this$state$target === void 0 ? void 0 : (_this$state$target$qu = _this$state$target.querySelector('button')) === null || _this$state$target$qu === void 0 ? void 0 : _this$state$target$qu.focus();
|
|
117
|
-
|
|
118
|
-
this.handleClose(event);
|
|
119
|
-
} else {
|
|
120
|
-
this.handleClose();
|
|
121
|
-
}
|
|
116
|
+
this.handleClose(event);
|
|
122
117
|
});
|
|
123
118
|
_defineProperty(this, "handleClose", event => {
|
|
124
119
|
const {
|
|
125
120
|
onOpenChange
|
|
126
121
|
} = this.props;
|
|
127
122
|
if (onOpenChange) {
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
});
|
|
133
|
-
} else {
|
|
134
|
-
onOpenChange({
|
|
135
|
-
isOpen: false
|
|
136
|
-
});
|
|
137
|
-
}
|
|
123
|
+
onOpenChange({
|
|
124
|
+
isOpen: false,
|
|
125
|
+
event: event
|
|
126
|
+
});
|
|
138
127
|
}
|
|
139
128
|
});
|
|
140
129
|
}
|
|
@@ -203,11 +192,7 @@ export default class DropdownMenuWrapper extends PureComponent {
|
|
|
203
192
|
handleClickOutside: this.handleClose,
|
|
204
193
|
handleEscapeKeydown: handleEscapeKeydown || this.handleCloseAndFocus,
|
|
205
194
|
handleEnterKeydown: e => {
|
|
206
|
-
if (
|
|
207
|
-
if (!allowEnterDefaultBehavior) {
|
|
208
|
-
e.preventDefault();
|
|
209
|
-
}
|
|
210
|
-
} else {
|
|
195
|
+
if (!allowEnterDefaultBehavior) {
|
|
211
196
|
e.preventDefault();
|
|
212
197
|
}
|
|
213
198
|
e.stopPropagation();
|
|
@@ -348,7 +333,7 @@ export function DropdownMenuItem({
|
|
|
348
333
|
onMouseLeave: () => onMouseLeave && onMouseLeave({
|
|
349
334
|
item
|
|
350
335
|
}),
|
|
351
|
-
"aria-expanded":
|
|
336
|
+
"aria-expanded": item['aria-expanded']
|
|
352
337
|
}, item.content));
|
|
353
338
|
if (item.tooltipDescription) {
|
|
354
339
|
var _item$key3;
|
|
@@ -9,7 +9,6 @@ import React, { useCallback } from 'react';
|
|
|
9
9
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
10
10
|
import { css, jsx } from '@emotion/react';
|
|
11
11
|
import { FabricChannel } from '@atlaskit/analytics-listeners/types';
|
|
12
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
13
12
|
import Tooltip from '@atlaskit/tooltip';
|
|
14
13
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, TOOLBAR_ACTION_SUBJECT_ID } from '../../analytics';
|
|
15
14
|
import { ToolTipContent } from '../../keymaps';
|
|
@@ -106,10 +105,10 @@ const ToolbarButton = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
106
105
|
if (!title) {
|
|
107
106
|
return button;
|
|
108
107
|
}
|
|
109
|
-
const tooltipContent = hideTooltip ? null :
|
|
108
|
+
const tooltipContent = hideTooltip ? null : jsx(ToolTipContent, {
|
|
110
109
|
description: title,
|
|
111
110
|
keymap: keymap
|
|
112
|
-
})
|
|
111
|
+
});
|
|
113
112
|
return jsx(Tooltip, {
|
|
114
113
|
content: tooltipContent,
|
|
115
114
|
hideTooltipOnClick: true,
|
|
@@ -13,10 +13,11 @@ class WithOutsideClick extends PureComponent {
|
|
|
13
13
|
constructor(...args) {
|
|
14
14
|
super(...args);
|
|
15
15
|
_defineProperty(this, "handleClick", evt => {
|
|
16
|
+
var _this$props$outsideCl;
|
|
16
17
|
if (!this.props.isActiveComponent || !this.props.handleClickOutside) {
|
|
17
18
|
return;
|
|
18
19
|
}
|
|
19
|
-
const domNode = fg('platform_editor_replace_finddomnode_in_common') ? this.props.outsideClickTargetRef.current : ReactDOM.findDOMNode(this);
|
|
20
|
+
const domNode = fg('platform_editor_replace_finddomnode_in_common') ? (_this$props$outsideCl = this.props.outsideClickTargetRef.current) === null || _this$props$outsideCl === void 0 ? void 0 : _this$props$outsideCl.deref() : ReactDOM.findDOMNode(this);
|
|
20
21
|
if (!domNode || evt.target instanceof Node && !domNode.contains(evt.target)) {
|
|
21
22
|
var _this$props$editorVie;
|
|
22
23
|
this.props.handleClickOutside(evt);
|
|
@@ -83,7 +84,7 @@ export default function withReactEditorViewOuterListeners(Component) {
|
|
|
83
84
|
const [isActiveComponent, setActiveComponent] = useState(false);
|
|
84
85
|
const outsideClickTargetRef = useRef(null);
|
|
85
86
|
const setOutsideClickTargetRef = useCallback(el => {
|
|
86
|
-
outsideClickTargetRef.current = el;
|
|
87
|
+
outsideClickTargetRef.current = el && new WeakRef(el);
|
|
87
88
|
}, [outsideClickTargetRef]);
|
|
88
89
|
useEffect(() => {
|
|
89
90
|
requestAnimationFrame(() => {
|
|
@@ -7,7 +7,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
7
7
|
import { isFedRamp } from './environment';
|
|
8
8
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
9
9
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
10
|
-
var packageVersion = "94.
|
|
10
|
+
var packageVersion = "94.6.0";
|
|
11
11
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
12
12
|
// Remove URL as it has UGC
|
|
13
13
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -21,7 +21,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
|
|
|
21
21
|
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
22
22
|
import Layer from '../Layer';
|
|
23
23
|
var packageName = "@atlaskit/editor-common";
|
|
24
|
-
var packageVersion = "94.
|
|
24
|
+
var packageVersion = "94.6.0";
|
|
25
25
|
var halfFocusRing = 1;
|
|
26
26
|
var dropOffset = '0, 8';
|
|
27
27
|
var DropList = /*#__PURE__*/function (_Component) {
|
package/dist/esm/ui/index.js
CHANGED
|
@@ -7,7 +7,7 @@ export { default as Popup, findOverflowScrollParent } from './Popup';
|
|
|
7
7
|
export { default as UnsupportedBlock } from './UnsupportedBlock';
|
|
8
8
|
export { default as UnsupportedInline } from './UnsupportedInline';
|
|
9
9
|
export { BaseTheme, mapBreakpointToLayoutMaxWidth } from './BaseTheme';
|
|
10
|
-
export { default as withOuterListeners } from './with-outer-listeners';
|
|
10
|
+
export { default as withOuterListeners, PlainOutsideClickTargetRefContext } from './with-outer-listeners';
|
|
11
11
|
export { WidthContext, WidthConsumer, WidthProvider, createWidthContext, getBreakpoint } from './WidthProvider';
|
|
12
12
|
export { default as overflowShadow, shadowClassNames } from './OverflowShadow';
|
|
13
13
|
export { shadowObserverClassNames, ShadowObserver } from './OverflowShadow/shadowObserver';
|
|
@@ -9,6 +9,10 @@ function _createSuper(t) { var r = _isNativeReflectConstruct(); return function
|
|
|
9
9
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
10
10
|
import React, { PureComponent } from 'react';
|
|
11
11
|
import ReactDOM from 'react-dom';
|
|
12
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
13
|
+
// Use this context to pass in the reference of the element that should be considered as the outside click target
|
|
14
|
+
// The outside click target is the element that should be clicked outside of to trigger the `handleClickOutside` event
|
|
15
|
+
export var PlainOutsideClickTargetRefContext = /*#__PURE__*/React.createContext(function () {});
|
|
12
16
|
export default function withOuterListeners(Component) {
|
|
13
17
|
return /*#__PURE__*/function (_PureComponent) {
|
|
14
18
|
_inherits(WithOutsideClick, _PureComponent);
|
|
@@ -20,13 +24,14 @@ export default function withOuterListeners(Component) {
|
|
|
20
24
|
args[_key] = arguments[_key];
|
|
21
25
|
}
|
|
22
26
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
27
|
+
_defineProperty(_assertThisInitialized(_this), "outsideClickTargetRef", /*#__PURE__*/React.createRef());
|
|
23
28
|
_defineProperty(_assertThisInitialized(_this), "handleClick", function (evt) {
|
|
24
|
-
var
|
|
29
|
+
var _this$outsideClickTar;
|
|
30
|
+
var domNode = fg('platform_editor_replace_finddomnode_in_common') ? (_this$outsideClickTar = _this.outsideClickTargetRef.current) === null || _this$outsideClickTar === void 0 ? void 0 : _this$outsideClickTar.deref() : ReactDOM.findDOMNode(_assertThisInitialized(_this)); // eslint-disable-line react/no-find-dom-node
|
|
25
31
|
|
|
26
32
|
if (!domNode || evt.target instanceof Node && !domNode.contains(evt.target)) {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
33
|
+
var _this$props$handleCli, _this$props;
|
|
34
|
+
(_this$props$handleCli = (_this$props = _this.props).handleClickOutside) === null || _this$props$handleCli === void 0 || _this$props$handleCli.call(_this$props, evt);
|
|
30
35
|
}
|
|
31
36
|
});
|
|
32
37
|
_defineProperty(_assertThisInitialized(_this), "handleKeydown", function (evt) {
|
|
@@ -34,6 +39,9 @@ export default function withOuterListeners(Component) {
|
|
|
34
39
|
_this.props.handleEscapeKeydown(evt);
|
|
35
40
|
}
|
|
36
41
|
});
|
|
42
|
+
_defineProperty(_assertThisInitialized(_this), "setOutsideClickTargetRef", function (el) {
|
|
43
|
+
_this.outsideClickTargetRef.current = el && new WeakRef(el);
|
|
44
|
+
});
|
|
37
45
|
return _this;
|
|
38
46
|
}
|
|
39
47
|
_createClass(WithOutsideClick, [{
|
|
@@ -59,7 +67,9 @@ export default function withOuterListeners(Component) {
|
|
|
59
67
|
}, {
|
|
60
68
|
key: "render",
|
|
61
69
|
value: function render() {
|
|
62
|
-
return /*#__PURE__*/React.createElement(
|
|
70
|
+
return /*#__PURE__*/React.createElement(PlainOutsideClickTargetRefContext.Provider, {
|
|
71
|
+
value: this.setOutsideClickTargetRef
|
|
72
|
+
}, /*#__PURE__*/React.createElement(Component, this.props));
|
|
63
73
|
}
|
|
64
74
|
}]);
|
|
65
75
|
return WithOutsideClick;
|
|
@@ -211,6 +211,7 @@ var ColorPickerButton = function ColorPickerButton(props) {
|
|
|
211
211
|
content: title,
|
|
212
212
|
position: "top"
|
|
213
213
|
}, jsx(Button, {
|
|
214
|
+
appearance: 'subtle',
|
|
214
215
|
ref: buttonRef,
|
|
215
216
|
"aria-label": title,
|
|
216
217
|
"aria-expanded": props.isAriaExpanded ? isPopupOpen : undefined,
|
|
@@ -25,7 +25,6 @@ import React, { PureComponent, useContext } from 'react';
|
|
|
25
25
|
import { css, jsx } from '@emotion/react';
|
|
26
26
|
import { akEditorFloatingPanelZIndex } from '@atlaskit/editor-shared-styles';
|
|
27
27
|
import { CustomItem, MenuGroup, Section } from '@atlaskit/menu';
|
|
28
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
29
28
|
import Tooltip from '@atlaskit/tooltip';
|
|
30
29
|
import { DropdownMenuSharedCssClassName } from '../../styles';
|
|
31
30
|
import { KeyDownHandlerContext } from '../../ui-menu/ToolbarArrowKeyNavigationProvider';
|
|
@@ -102,25 +101,15 @@ var DropdownMenuWrapper = /*#__PURE__*/function (_PureComponent) {
|
|
|
102
101
|
_defineProperty(_assertThisInitialized(_this), "handleCloseAndFocus", function (event) {
|
|
103
102
|
var _this$state$target;
|
|
104
103
|
(_this$state$target = _this.state.target) === null || _this$state$target === void 0 || (_this$state$target = _this$state$target.querySelector('button')) === null || _this$state$target === void 0 || _this$state$target.focus();
|
|
105
|
-
|
|
106
|
-
_this.handleClose(event);
|
|
107
|
-
} else {
|
|
108
|
-
_this.handleClose();
|
|
109
|
-
}
|
|
104
|
+
_this.handleClose(event);
|
|
110
105
|
});
|
|
111
106
|
_defineProperty(_assertThisInitialized(_this), "handleClose", function (event) {
|
|
112
107
|
var onOpenChange = _this.props.onOpenChange;
|
|
113
108
|
if (onOpenChange) {
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
});
|
|
119
|
-
} else {
|
|
120
|
-
onOpenChange({
|
|
121
|
-
isOpen: false
|
|
122
|
-
});
|
|
123
|
-
}
|
|
109
|
+
onOpenChange({
|
|
110
|
+
isOpen: false,
|
|
111
|
+
event: event
|
|
112
|
+
});
|
|
124
113
|
}
|
|
125
114
|
});
|
|
126
115
|
return _this;
|
|
@@ -190,11 +179,7 @@ var DropdownMenuWrapper = /*#__PURE__*/function (_PureComponent) {
|
|
|
190
179
|
handleClickOutside: this.handleClose,
|
|
191
180
|
handleEscapeKeydown: handleEscapeKeydown || this.handleCloseAndFocus,
|
|
192
181
|
handleEnterKeydown: function handleEnterKeydown(e) {
|
|
193
|
-
if (
|
|
194
|
-
if (!allowEnterDefaultBehavior) {
|
|
195
|
-
e.preventDefault();
|
|
196
|
-
}
|
|
197
|
-
} else {
|
|
182
|
+
if (!allowEnterDefaultBehavior) {
|
|
198
183
|
e.preventDefault();
|
|
199
184
|
}
|
|
200
185
|
e.stopPropagation();
|
|
@@ -350,7 +335,7 @@ export function DropdownMenuItem(_ref) {
|
|
|
350
335
|
item: item
|
|
351
336
|
});
|
|
352
337
|
},
|
|
353
|
-
"aria-expanded":
|
|
338
|
+
"aria-expanded": item['aria-expanded']
|
|
354
339
|
}, item.content));
|
|
355
340
|
if (item.tooltipDescription) {
|
|
356
341
|
var _item$key3;
|
|
@@ -12,7 +12,6 @@ import React, { useCallback } from 'react';
|
|
|
12
12
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
13
13
|
import { css, jsx } from '@emotion/react';
|
|
14
14
|
import { FabricChannel } from '@atlaskit/analytics-listeners/types';
|
|
15
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
16
15
|
import Tooltip from '@atlaskit/tooltip';
|
|
17
16
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, TOOLBAR_ACTION_SUBJECT_ID } from '../../analytics';
|
|
18
17
|
import { ToolTipContent } from '../../keymaps';
|
|
@@ -110,10 +109,10 @@ var ToolbarButton = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
110
109
|
if (!title) {
|
|
111
110
|
return button;
|
|
112
111
|
}
|
|
113
|
-
var tooltipContent = hideTooltip ? null :
|
|
112
|
+
var tooltipContent = hideTooltip ? null : jsx(ToolTipContent, {
|
|
114
113
|
description: title,
|
|
115
114
|
keymap: keymap
|
|
116
|
-
})
|
|
115
|
+
});
|
|
117
116
|
return jsx(Tooltip, {
|
|
118
117
|
content: tooltipContent,
|
|
119
118
|
hideTooltipOnClick: true,
|
|
@@ -30,10 +30,11 @@ var WithOutsideClick = /*#__PURE__*/function (_PureComponent) {
|
|
|
30
30
|
}
|
|
31
31
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
32
32
|
_defineProperty(_assertThisInitialized(_this), "handleClick", function (evt) {
|
|
33
|
+
var _this$props$outsideCl;
|
|
33
34
|
if (!_this.props.isActiveComponent || !_this.props.handleClickOutside) {
|
|
34
35
|
return;
|
|
35
36
|
}
|
|
36
|
-
var domNode = fg('platform_editor_replace_finddomnode_in_common') ? _this.props.outsideClickTargetRef.current : ReactDOM.findDOMNode(_assertThisInitialized(_this));
|
|
37
|
+
var domNode = fg('platform_editor_replace_finddomnode_in_common') ? (_this$props$outsideCl = _this.props.outsideClickTargetRef.current) === null || _this$props$outsideCl === void 0 ? void 0 : _this$props$outsideCl.deref() : ReactDOM.findDOMNode(_assertThisInitialized(_this));
|
|
37
38
|
if (!domNode || evt.target instanceof Node && !domNode.contains(evt.target)) {
|
|
38
39
|
var _this$props$editorVie;
|
|
39
40
|
_this.props.handleClickOutside(evt);
|
|
@@ -111,7 +112,7 @@ export default function withReactEditorViewOuterListeners(Component) {
|
|
|
111
112
|
setActiveComponent = _useState2[1];
|
|
112
113
|
var outsideClickTargetRef = useRef(null);
|
|
113
114
|
var setOutsideClickTargetRef = useCallback(function (el) {
|
|
114
|
-
outsideClickTargetRef.current = el;
|
|
115
|
+
outsideClickTargetRef.current = el && new WeakRef(el);
|
|
115
116
|
}, [outsideClickTargetRef]);
|
|
116
117
|
useEffect(function () {
|
|
117
118
|
requestAnimationFrame(function () {
|
package/dist/types/ui/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export type { Position as PopupPosition, Props as PopupProps } from './Popup';
|
|
|
10
10
|
export { default as UnsupportedBlock } from './UnsupportedBlock';
|
|
11
11
|
export { default as UnsupportedInline } from './UnsupportedInline';
|
|
12
12
|
export { BaseTheme, mapBreakpointToLayoutMaxWidth } from './BaseTheme';
|
|
13
|
-
export { default as withOuterListeners } from './with-outer-listeners';
|
|
13
|
+
export { default as withOuterListeners, PlainOutsideClickTargetRefContext, } from './with-outer-listeners';
|
|
14
14
|
export type { WithOutsideClickProps } from './with-outer-listeners';
|
|
15
15
|
export type { CardEventClickHandler, CardSurroundings, EventHandlers, LinkEventClickHandler, MentionEventHandler, MentionEventHandlers, SmartCardEventClickHandler, } from './EventHandlers';
|
|
16
16
|
export { WidthContext, WidthConsumer, WidthProvider, createWidthContext, getBreakpoint, } from './WidthProvider';
|
|
@@ -5,5 +5,6 @@ export interface WithOutsideClickProps {
|
|
|
5
5
|
handleClickOutside?: SimpleEventHandler<MouseEvent>;
|
|
6
6
|
handleEscapeKeydown?: SimpleEventHandler<KeyboardEvent>;
|
|
7
7
|
}
|
|
8
|
+
export declare const PlainOutsideClickTargetRefContext: React.Context<(el: HTMLElement | null) => void>;
|
|
8
9
|
export default function withOuterListeners<P>(Component: React.ComponentType<React.PropsWithChildren<P>>): ComponentClass<P & WithOutsideClickProps>;
|
|
9
10
|
export {};
|
|
@@ -10,7 +10,7 @@ export type { Position as PopupPosition, Props as PopupProps } from './Popup';
|
|
|
10
10
|
export { default as UnsupportedBlock } from './UnsupportedBlock';
|
|
11
11
|
export { default as UnsupportedInline } from './UnsupportedInline';
|
|
12
12
|
export { BaseTheme, mapBreakpointToLayoutMaxWidth } from './BaseTheme';
|
|
13
|
-
export { default as withOuterListeners } from './with-outer-listeners';
|
|
13
|
+
export { default as withOuterListeners, PlainOutsideClickTargetRefContext, } from './with-outer-listeners';
|
|
14
14
|
export type { WithOutsideClickProps } from './with-outer-listeners';
|
|
15
15
|
export type { CardEventClickHandler, CardSurroundings, EventHandlers, LinkEventClickHandler, MentionEventHandler, MentionEventHandlers, SmartCardEventClickHandler, } from './EventHandlers';
|
|
16
16
|
export { WidthContext, WidthConsumer, WidthProvider, createWidthContext, getBreakpoint, } from './WidthProvider';
|
|
@@ -5,5 +5,6 @@ export interface WithOutsideClickProps {
|
|
|
5
5
|
handleClickOutside?: SimpleEventHandler<MouseEvent>;
|
|
6
6
|
handleEscapeKeydown?: SimpleEventHandler<KeyboardEvent>;
|
|
7
7
|
}
|
|
8
|
+
export declare const PlainOutsideClickTargetRefContext: React.Context<(el: HTMLElement | null) => void>;
|
|
8
9
|
export default function withOuterListeners<P>(Component: React.ComponentType<React.PropsWithChildren<P>>): ComponentClass<P & WithOutsideClickProps>;
|
|
9
10
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "94.
|
|
3
|
+
"version": "94.6.0",
|
|
4
4
|
"description": "A package that contains common classes and components for editor and renderer",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -246,9 +246,6 @@
|
|
|
246
246
|
"annotations_align_editor_and_renderer_styles": {
|
|
247
247
|
"type": "boolean"
|
|
248
248
|
},
|
|
249
|
-
"platform_editor_a11y_table_context_menu": {
|
|
250
|
-
"type": "boolean"
|
|
251
|
-
},
|
|
252
249
|
"editor_inline_comments_paste_insert_nodes": {
|
|
253
250
|
"type": "boolean"
|
|
254
251
|
},
|