@atlaskit/editor-common 110.21.1 → 110.21.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/dist/cjs/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +3 -17
- package/dist/cjs/link/LinkSearch/LinkSearchList.js +18 -89
- package/dist/cjs/link/LinkSearch/LinkSearchListItem.js +11 -130
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/es2019/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +3 -17
- package/dist/es2019/link/LinkSearch/LinkSearchList.js +3 -60
- package/dist/es2019/link/LinkSearch/LinkSearchListItem.js +4 -114
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/esm/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +3 -17
- package/dist/esm/link/LinkSearch/LinkSearchList.js +3 -77
- package/dist/esm/link/LinkSearch/LinkSearchListItem.js +4 -127
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/types/link/LinkSearch/LinkSearchList.d.ts +4 -23
- package/dist/types/link/LinkSearch/LinkSearchListItem.d.ts +4 -17
- package/dist/types-ts4.5/link/LinkSearch/LinkSearchList.d.ts +4 -23
- package/dist/types-ts4.5/link/LinkSearch/LinkSearchListItem.d.ts +4 -17
- package/package.json +1 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 110.21.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`bee3e79187ed5`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/bee3e79187ed5) -
|
|
8
|
+
[ux] cleanup platform_editor_a11y_insert_link_item_focus
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
3
11
|
## 110.21.1
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -33,7 +33,7 @@ var _analytics = require("../../../analytics");
|
|
|
33
33
|
var _ui = require("../../../ui");
|
|
34
34
|
var _utils = require("../../../utils");
|
|
35
35
|
var _browser = require("../../../utils/browser");
|
|
36
|
-
var _LinkSearchList =
|
|
36
|
+
var _LinkSearchList = _interopRequireDefault(require("../../LinkSearch/LinkSearchList"));
|
|
37
37
|
var _ToolbarComponents = require("../../LinkSearch/ToolbarComponents");
|
|
38
38
|
var _transformTimeStamp = require("../../LinkSearch/transformTimeStamp");
|
|
39
39
|
var _utils2 = require("./utils");
|
|
@@ -172,7 +172,6 @@ var HyperlinkLinkAddToolbar = exports.HyperlinkLinkAddToolbar = /*#__PURE__*/fun
|
|
|
172
172
|
(0, _defineProperty2.default)(_this, "urlInputContainer", null);
|
|
173
173
|
(0, _defineProperty2.default)(_this, "displayTextInputContainer", null);
|
|
174
174
|
(0, _defineProperty2.default)(_this, "wrapperRef", /*#__PURE__*/_react.default.createRef());
|
|
175
|
-
// introduced via ff platform_editor_a11y_insert_link_item_focus, remove this comment cleaning up
|
|
176
175
|
(0, _defineProperty2.default)(_this, "listItemRefs", {
|
|
177
176
|
current: {}
|
|
178
177
|
});
|
|
@@ -424,7 +423,6 @@ var HyperlinkLinkAddToolbar = exports.HyperlinkLinkAddToolbar = /*#__PURE__*/fun
|
|
|
424
423
|
return "".concat(name, ", ").concat(_container, ", ").concat(date === null || date === void 0 ? void 0 : date.pageAction, " ").concat(date === null || date === void 0 ? void 0 : date.dateString, " ").concat((date === null || date === void 0 ? void 0 : date.timeSince) || '');
|
|
425
424
|
}
|
|
426
425
|
});
|
|
427
|
-
// introduced via ff platform_editor_a11y_insert_link_item_focus, remove this comment cleaning up
|
|
428
426
|
(0, _defineProperty2.default)(_this, "listItemRefCallback", function (el, id) {
|
|
429
427
|
if (!_this.listItemRefs.current) {
|
|
430
428
|
return;
|
|
@@ -538,7 +536,7 @@ var HyperlinkLinkAddToolbar = exports.HyperlinkLinkAddToolbar = /*#__PURE__*/fun
|
|
|
538
536
|
if (keyCode === KEY_CODE_TAB) {
|
|
539
537
|
/** If there are items in the list, allow normal tabbing so focus moves to the next interactive element (in this case, a search result item).
|
|
540
538
|
*/
|
|
541
|
-
if (_this.state.items.length > 0
|
|
539
|
+
if (_this.state.items.length > 0) {
|
|
542
540
|
return;
|
|
543
541
|
}
|
|
544
542
|
if (!_this.submitted) {
|
|
@@ -552,7 +550,6 @@ var HyperlinkLinkAddToolbar = exports.HyperlinkLinkAddToolbar = /*#__PURE__*/fun
|
|
|
552
550
|
return;
|
|
553
551
|
}
|
|
554
552
|
});
|
|
555
|
-
// introduced via ff platform_editor_a11y_insert_link_item_focus, remove this comment cleaning up
|
|
556
553
|
(0, _defineProperty2.default)(_this, "handleListItemFocus", function (index) {
|
|
557
554
|
_this.setState({
|
|
558
555
|
selectedIndex: index
|
|
@@ -594,7 +591,6 @@ var HyperlinkLinkAddToolbar = exports.HyperlinkLinkAddToolbar = /*#__PURE__*/fun
|
|
|
594
591
|
updatedIndex = selectedIndex > 0 ? selectedIndex - 1 : items.length - 1;
|
|
595
592
|
}
|
|
596
593
|
if ([KEY_CODE_ARROW_DOWN, KEY_CODE_ARROW_UP].includes(keyCode) && items[updatedIndex]) {
|
|
597
|
-
// introduced via ff platform_editor_a11y_insert_link_item_focus, remove this comment cleaning up
|
|
598
594
|
if (_this.listItemRefs.current) {
|
|
599
595
|
var _this$listItemRefs$cu;
|
|
600
596
|
(_this$listItemRefs$cu = _this.listItemRefs.current[items[updatedIndex].objectId]) === null || _this$listItemRefs$cu === void 0 || _this$listItemRefs$cu.focus();
|
|
@@ -972,7 +968,7 @@ var HyperlinkLinkAddToolbar = exports.HyperlinkLinkAddToolbar = /*#__PURE__*/fun
|
|
|
972
968
|
id: "fabric.editor.hyperlink.suggested.results"
|
|
973
969
|
}, displayUrl && formatMessage(messages.searchLinkResults, {
|
|
974
970
|
count: items.length
|
|
975
|
-
})), (0,
|
|
971
|
+
})), (0, _react2.jsx)(_LinkSearchList.default, {
|
|
976
972
|
ariaControls: "fabric.editor.hyperlink.suggested.results",
|
|
977
973
|
id: linkSearchListId,
|
|
978
974
|
role: "listbox",
|
|
@@ -985,16 +981,6 @@ var HyperlinkLinkAddToolbar = exports.HyperlinkLinkAddToolbar = /*#__PURE__*/fun
|
|
|
985
981
|
onSelect: this.handleSelected,
|
|
986
982
|
onMouseEnter: this.handleMouseEnterResultItem,
|
|
987
983
|
onMouseLeave: this.handleMouseLeaveResultItem
|
|
988
|
-
}) : (0, _react2.jsx)(_LinkSearchList.default, {
|
|
989
|
-
ariaControls: "fabric.editor.hyperlink.suggested.results",
|
|
990
|
-
id: linkSearchListId,
|
|
991
|
-
role: "listbox",
|
|
992
|
-
items: items,
|
|
993
|
-
isLoading: isLoading,
|
|
994
|
-
selectedIndex: selectedIndex,
|
|
995
|
-
onSelect: this.handleSelected,
|
|
996
|
-
onMouseEnter: this.handleMouseEnterResultItem,
|
|
997
|
-
onMouseLeave: this.handleMouseLeaveResultItem
|
|
998
984
|
})));
|
|
999
985
|
}
|
|
1000
986
|
}]);
|
|
@@ -1,43 +1,37 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
|
-
exports.linkSearchList = exports.default =
|
|
9
|
-
var
|
|
10
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
11
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
12
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
13
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
14
|
-
var _react = require("react");
|
|
15
|
-
var _react2 = require("@emotion/react");
|
|
7
|
+
exports.linkSearchList = exports.default = void 0;
|
|
8
|
+
var _react = require("@emotion/react");
|
|
16
9
|
var _spinner = _interopRequireDefault(require("@atlaskit/spinner"));
|
|
17
|
-
var _LinkSearchListItem =
|
|
18
|
-
|
|
19
|
-
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
20
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /**
|
|
10
|
+
var _LinkSearchListItem = _interopRequireDefault(require("./LinkSearchListItem"));
|
|
11
|
+
/**
|
|
21
12
|
* @jsxRuntime classic
|
|
22
13
|
* @jsx jsx
|
|
23
|
-
*/
|
|
24
|
-
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
17
|
+
|
|
18
|
+
var listContainer = (0, _react.css)({
|
|
25
19
|
paddingTop: 0,
|
|
26
20
|
marginTop: "var(--ds-space-150, 12px)",
|
|
27
21
|
borderTop: "var(--ds-border-width, 1px)".concat(" solid ", "var(--ds-border, #091E4224)")
|
|
28
22
|
});
|
|
29
|
-
var spinnerContainer = (0,
|
|
23
|
+
var spinnerContainer = (0, _react.css)({
|
|
30
24
|
textAlign: 'center',
|
|
31
25
|
minHeight: '80px',
|
|
32
26
|
marginTop: "var(--ds-space-400, 32px)"
|
|
33
27
|
});
|
|
34
28
|
|
|
35
29
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
36
|
-
var linkSearchList = exports.linkSearchList = (0,
|
|
30
|
+
var linkSearchList = exports.linkSearchList = (0, _react.css)({
|
|
37
31
|
padding: 0,
|
|
38
32
|
listStyle: 'none'
|
|
39
33
|
});
|
|
40
|
-
var
|
|
34
|
+
var LinkSearchList = function LinkSearchList(_ref) {
|
|
41
35
|
var listItemRefCallback = _ref.listItemRefCallback,
|
|
42
36
|
_onFocus = _ref.onFocus,
|
|
43
37
|
onKeyDown = _ref.onKeyDown,
|
|
@@ -54,14 +48,14 @@ var LinkSearchListNext = exports.LinkSearchListNext = function LinkSearchListNex
|
|
|
54
48
|
var itemsContent;
|
|
55
49
|
var loadingContent;
|
|
56
50
|
if (items && items.length > 0) {
|
|
57
|
-
itemsContent = (0,
|
|
51
|
+
itemsContent = (0, _react.jsx)("ul", {
|
|
58
52
|
css: linkSearchList,
|
|
59
53
|
id: id,
|
|
60
54
|
role: role,
|
|
61
55
|
"aria-controls": ariaControls,
|
|
62
56
|
"data-testid": "".concat(id, "--items")
|
|
63
57
|
}, items.map(function (item, index) {
|
|
64
|
-
return (0,
|
|
58
|
+
return (0, _react.jsx)(_LinkSearchListItem.default, {
|
|
65
59
|
id: "link-search-list-item-".concat(index),
|
|
66
60
|
item: item,
|
|
67
61
|
selected: selectedIndex === index,
|
|
@@ -81,82 +75,17 @@ var LinkSearchListNext = exports.LinkSearchListNext = function LinkSearchListNex
|
|
|
81
75
|
}));
|
|
82
76
|
}
|
|
83
77
|
if (isLoading) {
|
|
84
|
-
loadingContent = (0,
|
|
78
|
+
loadingContent = (0, _react.jsx)("div", {
|
|
85
79
|
id: id,
|
|
86
80
|
"data-testid": "".concat(id, "--loading"),
|
|
87
81
|
css: spinnerContainer
|
|
88
|
-
}, (0,
|
|
82
|
+
}, (0, _react.jsx)(_spinner.default, {
|
|
89
83
|
size: "medium",
|
|
90
84
|
interactionName: "link-search-spinner"
|
|
91
85
|
}));
|
|
92
86
|
}
|
|
93
|
-
return (0,
|
|
87
|
+
return (0, _react.jsx)("div", {
|
|
94
88
|
css: listContainer
|
|
95
89
|
}, itemsContent, loadingContent);
|
|
96
90
|
};
|
|
97
|
-
|
|
98
|
-
* *Warning:* With `platform_editor_a11y_insert_link_item_focus` enabled this component is no longer used and is replaced with `<LinkSearchListNext />`.
|
|
99
|
-
*
|
|
100
|
-
* If making changes to this component please ensure to also update `<LinkSearchListNext />`.
|
|
101
|
-
*/
|
|
102
|
-
// Ignored via go/ees005
|
|
103
|
-
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
104
|
-
var LinkSearchList = exports.default = /*#__PURE__*/function (_PureComponent) {
|
|
105
|
-
function LinkSearchList() {
|
|
106
|
-
(0, _classCallCheck2.default)(this, LinkSearchList);
|
|
107
|
-
return _callSuper(this, LinkSearchList, arguments);
|
|
108
|
-
}
|
|
109
|
-
(0, _inherits2.default)(LinkSearchList, _PureComponent);
|
|
110
|
-
return (0, _createClass2.default)(LinkSearchList, [{
|
|
111
|
-
key: "render",
|
|
112
|
-
value: function render() {
|
|
113
|
-
var _this$props = this.props,
|
|
114
|
-
onSelect = _this$props.onSelect,
|
|
115
|
-
onMouseMove = _this$props.onMouseMove,
|
|
116
|
-
onMouseEnter = _this$props.onMouseEnter,
|
|
117
|
-
onMouseLeave = _this$props.onMouseLeave,
|
|
118
|
-
items = _this$props.items,
|
|
119
|
-
selectedIndex = _this$props.selectedIndex,
|
|
120
|
-
isLoading = _this$props.isLoading,
|
|
121
|
-
ariaControls = _this$props.ariaControls,
|
|
122
|
-
role = _this$props.role,
|
|
123
|
-
id = _this$props.id;
|
|
124
|
-
var itemsContent;
|
|
125
|
-
var loadingContent;
|
|
126
|
-
if (items && items.length > 0) {
|
|
127
|
-
itemsContent = (0, _react2.jsx)("ul", {
|
|
128
|
-
css: linkSearchList,
|
|
129
|
-
id: id,
|
|
130
|
-
role: role,
|
|
131
|
-
"aria-controls": ariaControls,
|
|
132
|
-
"data-testid": "".concat(id, "--items")
|
|
133
|
-
}, items.map(function (item, index) {
|
|
134
|
-
return (0, _react2.jsx)(_LinkSearchListItem.default, {
|
|
135
|
-
id: "link-search-list-item-".concat(index),
|
|
136
|
-
role: role && 'option',
|
|
137
|
-
item: item,
|
|
138
|
-
selected: selectedIndex === index,
|
|
139
|
-
onMouseMove: onMouseMove,
|
|
140
|
-
onMouseEnter: onMouseEnter,
|
|
141
|
-
onMouseLeave: onMouseLeave,
|
|
142
|
-
onSelect: onSelect,
|
|
143
|
-
key: item.objectId
|
|
144
|
-
});
|
|
145
|
-
}));
|
|
146
|
-
}
|
|
147
|
-
if (isLoading) {
|
|
148
|
-
loadingContent = (0, _react2.jsx)("div", {
|
|
149
|
-
id: id,
|
|
150
|
-
"data-testid": "".concat(id, "--loading"),
|
|
151
|
-
css: spinnerContainer
|
|
152
|
-
}, (0, _react2.jsx)(_spinner.default, {
|
|
153
|
-
size: "medium",
|
|
154
|
-
interactionName: "link-search-spinner"
|
|
155
|
-
}));
|
|
156
|
-
}
|
|
157
|
-
return (0, _react2.jsx)("div", {
|
|
158
|
-
css: listContainer
|
|
159
|
-
}, itemsContent, loadingContent);
|
|
160
|
-
}
|
|
161
|
-
}]);
|
|
162
|
-
}(_react.PureComponent);
|
|
91
|
+
var _default = exports.default = LinkSearchList;
|
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
3
|
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
|
-
exports.nameStyle = exports.default = exports.containerSelected = exports.containerName = exports.container = exports.
|
|
9
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
10
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
11
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
12
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
13
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
14
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
7
|
+
exports.nameStyle = exports.default = exports.containerSelected = exports.containerName = exports.container = exports.ForwardedLinkSearchListItemWithIntl = void 0;
|
|
15
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
16
9
|
var _react2 = require("@emotion/react");
|
|
17
10
|
var _reactIntlNext = require("react-intl-next");
|
|
@@ -19,13 +12,16 @@ var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
|
19
12
|
var _listItemAlts = require("./listItemAlts");
|
|
20
13
|
var _transformTimeStamp = require("./transformTimeStamp");
|
|
21
14
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
22
|
-
|
|
23
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /**
|
|
15
|
+
/**
|
|
24
16
|
* @jsxRuntime classic
|
|
25
17
|
* @jsx jsx
|
|
26
|
-
*/
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
21
|
+
|
|
27
22
|
// AFP-2532 TODO: Fix automatic suppressions below
|
|
28
23
|
// eslint-disable-next-line @atlassian/tangerine/import/entry-points
|
|
24
|
+
|
|
29
25
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
30
26
|
var container = exports.container = (0, _react2.css)({
|
|
31
27
|
backgroundColor: 'transparent',
|
|
@@ -70,7 +66,7 @@ var iconStyle = (0, _react2.css)({
|
|
|
70
66
|
maxWidth: '16px'
|
|
71
67
|
}
|
|
72
68
|
});
|
|
73
|
-
var
|
|
69
|
+
var LinkSearchListItem = function LinkSearchListItem(props, ref) {
|
|
74
70
|
var id = props.id,
|
|
75
71
|
item = props.item,
|
|
76
72
|
onFocus = props.onFocus,
|
|
@@ -149,123 +145,8 @@ var LinkSearchListItemNext = function LinkSearchListItemNext(props, ref) {
|
|
|
149
145
|
css: containerName
|
|
150
146
|
}, item.container, renderTimeStamp())));
|
|
151
147
|
};
|
|
152
|
-
var
|
|
153
|
-
var
|
|
148
|
+
var ForwardedLinkSearchListItem = /*#__PURE__*/(0, _react.forwardRef)(LinkSearchListItem);
|
|
149
|
+
var ForwardedLinkSearchListItemWithIntl = exports.ForwardedLinkSearchListItemWithIntl = (0, _reactIntlNext.injectIntl)(ForwardedLinkSearchListItem, {
|
|
154
150
|
forwardRef: true
|
|
155
151
|
});
|
|
156
|
-
|
|
157
|
-
* *Warning:* With `platform_editor_a11y_insert_link_item_focus` enabled this component is no longer used and is replaced with `<LinkSearchListItemNext />`.
|
|
158
|
-
*
|
|
159
|
-
* If making changes to this component please ensure to also update `<LinkSearchListItemNext />`.
|
|
160
|
-
*/
|
|
161
|
-
// Ignored via go/ees005
|
|
162
|
-
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
163
|
-
var LinkSearchListItem = /*#__PURE__*/function (_React$PureComponent) {
|
|
164
|
-
function LinkSearchListItem() {
|
|
165
|
-
var _this;
|
|
166
|
-
(0, _classCallCheck2.default)(this, LinkSearchListItem);
|
|
167
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
168
|
-
args[_key] = arguments[_key];
|
|
169
|
-
}
|
|
170
|
-
_this = _callSuper(this, LinkSearchListItem, [].concat(args));
|
|
171
|
-
(0, _defineProperty2.default)(_this, "handleSelect", function (e) {
|
|
172
|
-
e.preventDefault(); // don't let editor lose focus
|
|
173
|
-
var _this$props = _this.props,
|
|
174
|
-
item = _this$props.item,
|
|
175
|
-
onSelect = _this$props.onSelect;
|
|
176
|
-
onSelect(item.url, item.name);
|
|
177
|
-
});
|
|
178
|
-
(0, _defineProperty2.default)(_this, "handleMouseMove", function () {
|
|
179
|
-
var _this$props2 = _this.props,
|
|
180
|
-
onMouseMove = _this$props2.onMouseMove,
|
|
181
|
-
item = _this$props2.item;
|
|
182
|
-
onMouseMove && onMouseMove(item.objectId);
|
|
183
|
-
});
|
|
184
|
-
(0, _defineProperty2.default)(_this, "handleMouseEnter", function () {
|
|
185
|
-
var _this$props3 = _this.props,
|
|
186
|
-
onMouseEnter = _this$props3.onMouseEnter,
|
|
187
|
-
item = _this$props3.item;
|
|
188
|
-
onMouseEnter && onMouseEnter(item.objectId);
|
|
189
|
-
});
|
|
190
|
-
(0, _defineProperty2.default)(_this, "handleMouseLeave", function () {
|
|
191
|
-
var _this$props4 = _this.props,
|
|
192
|
-
onMouseLeave = _this$props4.onMouseLeave,
|
|
193
|
-
item = _this$props4.item;
|
|
194
|
-
onMouseLeave && onMouseLeave(item.objectId);
|
|
195
|
-
});
|
|
196
|
-
return _this;
|
|
197
|
-
}
|
|
198
|
-
(0, _inherits2.default)(LinkSearchListItem, _React$PureComponent);
|
|
199
|
-
return (0, _createClass2.default)(LinkSearchListItem, [{
|
|
200
|
-
key: "renderIcon",
|
|
201
|
-
value: function renderIcon() {
|
|
202
|
-
var _this$props5 = this.props,
|
|
203
|
-
_this$props5$item = _this$props5.item,
|
|
204
|
-
icon = _this$props5$item.icon,
|
|
205
|
-
iconUrl = _this$props5$item.iconUrl,
|
|
206
|
-
intl = _this$props5.intl;
|
|
207
|
-
if (icon) {
|
|
208
|
-
return (0, _react2.jsx)("span", {
|
|
209
|
-
css: iconStyle
|
|
210
|
-
}, icon);
|
|
211
|
-
}
|
|
212
|
-
if (iconUrl) {
|
|
213
|
-
return (0, _react2.jsx)("span", {
|
|
214
|
-
css: iconStyle
|
|
215
|
-
}, (0, _react2.jsx)("img", {
|
|
216
|
-
src: iconUrl,
|
|
217
|
-
alt: (0, _listItemAlts.getCorrectAltByIconUrl)(iconUrl, intl)
|
|
218
|
-
}));
|
|
219
|
-
}
|
|
220
|
-
return null;
|
|
221
|
-
}
|
|
222
|
-
}, {
|
|
223
|
-
key: "renderTimeStamp",
|
|
224
|
-
value: function renderTimeStamp() {
|
|
225
|
-
var _this$props6 = this.props,
|
|
226
|
-
item = _this$props6.item,
|
|
227
|
-
intl = _this$props6.intl;
|
|
228
|
-
var date = (0, _transformTimeStamp.transformTimeStamp)(intl, item.lastViewedDate, item.lastUpdatedDate);
|
|
229
|
-
return date && (0, _react2.jsx)(_react.Fragment, null, "\xA0 \u2022", (0, _react2.jsx)("span", {
|
|
230
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
231
|
-
className: "link-search-timestamp",
|
|
232
|
-
"data-test-id": "link-search-timestamp"
|
|
233
|
-
}, "\xA0 ", date.pageAction, " ", date.dateString, " ", date.timeSince || ''));
|
|
234
|
-
}
|
|
235
|
-
}, {
|
|
236
|
-
key: "render",
|
|
237
|
-
value: function render() {
|
|
238
|
-
var _this$props7 = this.props,
|
|
239
|
-
item = _this$props7.item,
|
|
240
|
-
selected = _this$props7.selected,
|
|
241
|
-
id = _this$props7.id,
|
|
242
|
-
role = _this$props7.role;
|
|
243
|
-
return (
|
|
244
|
-
// eslint-disable-next-line @atlassian/a11y/no-noninteractive-element-interactions, @atlassian/a11y/click-events-have-key-events
|
|
245
|
-
(0, _react2.jsx)("li", {
|
|
246
|
-
css: [container, selected && containerSelected],
|
|
247
|
-
role: role,
|
|
248
|
-
id: id,
|
|
249
|
-
"aria-selected": selected,
|
|
250
|
-
"data-testid": "link-search-list-item",
|
|
251
|
-
onMouseMove: this.handleMouseMove
|
|
252
|
-
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
253
|
-
,
|
|
254
|
-
onMouseEnter: this.handleMouseEnter
|
|
255
|
-
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
256
|
-
,
|
|
257
|
-
onMouseLeave: this.handleMouseLeave,
|
|
258
|
-
onClick: this.handleSelect
|
|
259
|
-
}, this.renderIcon(), (0, _react2.jsx)("span", {
|
|
260
|
-
css: nameWrapper
|
|
261
|
-
}, (0, _react2.jsx)("div", {
|
|
262
|
-
css: nameStyle
|
|
263
|
-
}, item.name), (0, _react2.jsx)("div", {
|
|
264
|
-
"data-testid": "link-search-list-item-container",
|
|
265
|
-
css: containerName
|
|
266
|
-
}, item.container, this.renderTimeStamp())))
|
|
267
|
-
);
|
|
268
|
-
}
|
|
269
|
-
}]);
|
|
270
|
-
}(_react.default.PureComponent);
|
|
271
|
-
var _default = exports.default = (0, _reactIntlNext.injectIntl)(LinkSearchListItem);
|
|
152
|
+
var _default = exports.default = ForwardedLinkSearchListItemWithIntl;
|
|
@@ -16,7 +16,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
16
16
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
17
17
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
18
18
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
19
|
-
var packageVersion = "110.21.
|
|
19
|
+
var packageVersion = "110.21.1";
|
|
20
20
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
21
21
|
// Remove URL as it has UGC
|
|
22
22
|
// Ignored via go/ees007
|
|
@@ -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 = "110.21.
|
|
27
|
+
var packageVersion = "110.21.1";
|
|
28
28
|
var halfFocusRing = 1;
|
|
29
29
|
var dropOffset = '0, 8';
|
|
30
30
|
var fadeIn = (0, _react2.keyframes)({
|
|
@@ -24,7 +24,7 @@ import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, fireAnalyticsEve
|
|
|
24
24
|
import { Announcer, PanelTextInput } from '../../../ui';
|
|
25
25
|
import { normalizeUrl } from '../../../utils';
|
|
26
26
|
import { browser as browserLegacy, getBrowserInfo } from '../../../utils/browser';
|
|
27
|
-
import LinkSearchList
|
|
27
|
+
import LinkSearchList from '../../LinkSearch/LinkSearchList';
|
|
28
28
|
import { container, containerWithProvider, narrowContainerWidth, inputWrapper } from '../../LinkSearch/ToolbarComponents';
|
|
29
29
|
import { transformTimeStamp } from '../../LinkSearch/transformTimeStamp';
|
|
30
30
|
import { filterUniqueItems, mapContentTypeToIcon, sha1, wordCount } from './utils';
|
|
@@ -153,7 +153,6 @@ export class HyperlinkLinkAddToolbar extends PureComponent {
|
|
|
153
153
|
_defineProperty(this, "urlInputContainer", null);
|
|
154
154
|
_defineProperty(this, "displayTextInputContainer", null);
|
|
155
155
|
_defineProperty(this, "wrapperRef", /*#__PURE__*/React.createRef());
|
|
156
|
-
// introduced via ff platform_editor_a11y_insert_link_item_focus, remove this comment cleaning up
|
|
157
156
|
_defineProperty(this, "listItemRefs", {
|
|
158
157
|
current: {}
|
|
159
158
|
});
|
|
@@ -337,7 +336,6 @@ export class HyperlinkLinkAddToolbar extends PureComponent {
|
|
|
337
336
|
return `${name}, ${container}, ${date === null || date === void 0 ? void 0 : date.pageAction} ${date === null || date === void 0 ? void 0 : date.dateString} ${(date === null || date === void 0 ? void 0 : date.timeSince) || ''}`;
|
|
338
337
|
}
|
|
339
338
|
});
|
|
340
|
-
// introduced via ff platform_editor_a11y_insert_link_item_focus, remove this comment cleaning up
|
|
341
339
|
_defineProperty(this, "listItemRefCallback", (el, id) => {
|
|
342
340
|
if (!this.listItemRefs.current) {
|
|
343
341
|
return;
|
|
@@ -456,7 +454,7 @@ export class HyperlinkLinkAddToolbar extends PureComponent {
|
|
|
456
454
|
if (keyCode === KEY_CODE_TAB) {
|
|
457
455
|
/** If there are items in the list, allow normal tabbing so focus moves to the next interactive element (in this case, a search result item).
|
|
458
456
|
*/
|
|
459
|
-
if (this.state.items.length > 0
|
|
457
|
+
if (this.state.items.length > 0) {
|
|
460
458
|
return;
|
|
461
459
|
}
|
|
462
460
|
if (!this.submitted) {
|
|
@@ -471,7 +469,6 @@ export class HyperlinkLinkAddToolbar extends PureComponent {
|
|
|
471
469
|
return;
|
|
472
470
|
}
|
|
473
471
|
});
|
|
474
|
-
// introduced via ff platform_editor_a11y_insert_link_item_focus, remove this comment cleaning up
|
|
475
472
|
_defineProperty(this, "handleListItemFocus", index => {
|
|
476
473
|
this.setState({
|
|
477
474
|
selectedIndex: index
|
|
@@ -519,7 +516,6 @@ export class HyperlinkLinkAddToolbar extends PureComponent {
|
|
|
519
516
|
updatedIndex = selectedIndex > 0 ? selectedIndex - 1 : items.length - 1;
|
|
520
517
|
}
|
|
521
518
|
if ([KEY_CODE_ARROW_DOWN, KEY_CODE_ARROW_UP].includes(keyCode) && items[updatedIndex]) {
|
|
522
|
-
// introduced via ff platform_editor_a11y_insert_link_item_focus, remove this comment cleaning up
|
|
523
519
|
if (this.listItemRefs.current) {
|
|
524
520
|
var _this$listItemRefs$cu;
|
|
525
521
|
(_this$listItemRefs$cu = this.listItemRefs.current[items[updatedIndex].objectId]) === null || _this$listItemRefs$cu === void 0 ? void 0 : _this$listItemRefs$cu.focus();
|
|
@@ -820,7 +816,7 @@ export class HyperlinkLinkAddToolbar extends PureComponent {
|
|
|
820
816
|
id: "fabric.editor.hyperlink.suggested.results"
|
|
821
817
|
}, displayUrl && formatMessage(messages.searchLinkResults, {
|
|
822
818
|
count: items.length
|
|
823
|
-
})),
|
|
819
|
+
})), jsx(LinkSearchList, {
|
|
824
820
|
ariaControls: "fabric.editor.hyperlink.suggested.results",
|
|
825
821
|
id: linkSearchListId,
|
|
826
822
|
role: "listbox",
|
|
@@ -833,16 +829,6 @@ export class HyperlinkLinkAddToolbar extends PureComponent {
|
|
|
833
829
|
onSelect: this.handleSelected,
|
|
834
830
|
onMouseEnter: this.handleMouseEnterResultItem,
|
|
835
831
|
onMouseLeave: this.handleMouseLeaveResultItem
|
|
836
|
-
}) : jsx(LinkSearchList, {
|
|
837
|
-
ariaControls: "fabric.editor.hyperlink.suggested.results",
|
|
838
|
-
id: linkSearchListId,
|
|
839
|
-
role: "listbox",
|
|
840
|
-
items: items,
|
|
841
|
-
isLoading: isLoading,
|
|
842
|
-
selectedIndex: selectedIndex,
|
|
843
|
-
onSelect: this.handleSelected,
|
|
844
|
-
onMouseEnter: this.handleMouseEnterResultItem,
|
|
845
|
-
onMouseLeave: this.handleMouseLeaveResultItem
|
|
846
832
|
})));
|
|
847
833
|
}
|
|
848
834
|
}
|
|
@@ -2,12 +2,11 @@
|
|
|
2
2
|
* @jsxRuntime classic
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
|
-
import { PureComponent } from 'react';
|
|
6
5
|
|
|
7
6
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
7
|
import { css, jsx } from '@emotion/react';
|
|
9
8
|
import Spinner from '@atlaskit/spinner';
|
|
10
|
-
import
|
|
9
|
+
import ForwardedLinkSearchListItemNextWithIntl from './LinkSearchListItem';
|
|
11
10
|
const listContainer = css({
|
|
12
11
|
paddingTop: 0,
|
|
13
12
|
marginTop: "var(--ds-space-150, 12px)",
|
|
@@ -24,7 +23,7 @@ export const linkSearchList = css({
|
|
|
24
23
|
padding: 0,
|
|
25
24
|
listStyle: 'none'
|
|
26
25
|
});
|
|
27
|
-
|
|
26
|
+
const LinkSearchList = ({
|
|
28
27
|
listItemRefCallback,
|
|
29
28
|
onFocus,
|
|
30
29
|
onKeyDown,
|
|
@@ -76,60 +75,4 @@ export const LinkSearchListNext = ({
|
|
|
76
75
|
css: listContainer
|
|
77
76
|
}, itemsContent, loadingContent);
|
|
78
77
|
};
|
|
79
|
-
|
|
80
|
-
* *Warning:* With `platform_editor_a11y_insert_link_item_focus` enabled this component is no longer used and is replaced with `<LinkSearchListNext />`.
|
|
81
|
-
*
|
|
82
|
-
* If making changes to this component please ensure to also update `<LinkSearchListNext />`.
|
|
83
|
-
*/
|
|
84
|
-
// Ignored via go/ees005
|
|
85
|
-
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
86
|
-
export default class LinkSearchList extends PureComponent {
|
|
87
|
-
render() {
|
|
88
|
-
const {
|
|
89
|
-
onSelect,
|
|
90
|
-
onMouseMove,
|
|
91
|
-
onMouseEnter,
|
|
92
|
-
onMouseLeave,
|
|
93
|
-
items,
|
|
94
|
-
selectedIndex,
|
|
95
|
-
isLoading,
|
|
96
|
-
ariaControls,
|
|
97
|
-
role,
|
|
98
|
-
id
|
|
99
|
-
} = this.props;
|
|
100
|
-
let itemsContent;
|
|
101
|
-
let loadingContent;
|
|
102
|
-
if (items && items.length > 0) {
|
|
103
|
-
itemsContent = jsx("ul", {
|
|
104
|
-
css: linkSearchList,
|
|
105
|
-
id: id,
|
|
106
|
-
role: role,
|
|
107
|
-
"aria-controls": ariaControls,
|
|
108
|
-
"data-testid": `${id}--items`
|
|
109
|
-
}, items.map((item, index) => jsx(LinkSearchListItem, {
|
|
110
|
-
id: `link-search-list-item-${index}`,
|
|
111
|
-
role: role && 'option',
|
|
112
|
-
item: item,
|
|
113
|
-
selected: selectedIndex === index,
|
|
114
|
-
onMouseMove: onMouseMove,
|
|
115
|
-
onMouseEnter: onMouseEnter,
|
|
116
|
-
onMouseLeave: onMouseLeave,
|
|
117
|
-
onSelect: onSelect,
|
|
118
|
-
key: item.objectId
|
|
119
|
-
})));
|
|
120
|
-
}
|
|
121
|
-
if (isLoading) {
|
|
122
|
-
loadingContent = jsx("div", {
|
|
123
|
-
id: id,
|
|
124
|
-
"data-testid": `${id}--loading`,
|
|
125
|
-
css: spinnerContainer
|
|
126
|
-
}, jsx(Spinner, {
|
|
127
|
-
size: "medium",
|
|
128
|
-
interactionName: "link-search-spinner"
|
|
129
|
-
}));
|
|
130
|
-
}
|
|
131
|
-
return jsx("div", {
|
|
132
|
-
css: listContainer
|
|
133
|
-
}, itemsContent, loadingContent);
|
|
134
|
-
}
|
|
135
|
-
}
|
|
78
|
+
export default LinkSearchList;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
1
|
/**
|
|
3
2
|
* @jsxRuntime classic
|
|
4
3
|
* @jsx jsx
|
|
@@ -58,7 +57,7 @@ const iconStyle = css({
|
|
|
58
57
|
maxWidth: '16px'
|
|
59
58
|
}
|
|
60
59
|
});
|
|
61
|
-
const
|
|
60
|
+
const LinkSearchListItem = (props, ref) => {
|
|
62
61
|
const {
|
|
63
62
|
id,
|
|
64
63
|
item,
|
|
@@ -139,117 +138,8 @@ const LinkSearchListItemNext = (props, ref) => {
|
|
|
139
138
|
css: containerName
|
|
140
139
|
}, item.container, renderTimeStamp())));
|
|
141
140
|
};
|
|
142
|
-
const
|
|
143
|
-
export const
|
|
141
|
+
const ForwardedLinkSearchListItem = /*#__PURE__*/forwardRef(LinkSearchListItem);
|
|
142
|
+
export const ForwardedLinkSearchListItemWithIntl = injectIntl(ForwardedLinkSearchListItem, {
|
|
144
143
|
forwardRef: true
|
|
145
144
|
});
|
|
146
|
-
|
|
147
|
-
* *Warning:* With `platform_editor_a11y_insert_link_item_focus` enabled this component is no longer used and is replaced with `<LinkSearchListItemNext />`.
|
|
148
|
-
*
|
|
149
|
-
* If making changes to this component please ensure to also update `<LinkSearchListItemNext />`.
|
|
150
|
-
*/
|
|
151
|
-
// Ignored via go/ees005
|
|
152
|
-
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
153
|
-
class LinkSearchListItem extends React.PureComponent {
|
|
154
|
-
constructor(...args) {
|
|
155
|
-
super(...args);
|
|
156
|
-
_defineProperty(this, "handleSelect", e => {
|
|
157
|
-
e.preventDefault(); // don't let editor lose focus
|
|
158
|
-
const {
|
|
159
|
-
item,
|
|
160
|
-
onSelect
|
|
161
|
-
} = this.props;
|
|
162
|
-
onSelect(item.url, item.name);
|
|
163
|
-
});
|
|
164
|
-
_defineProperty(this, "handleMouseMove", () => {
|
|
165
|
-
const {
|
|
166
|
-
onMouseMove,
|
|
167
|
-
item
|
|
168
|
-
} = this.props;
|
|
169
|
-
onMouseMove && onMouseMove(item.objectId);
|
|
170
|
-
});
|
|
171
|
-
_defineProperty(this, "handleMouseEnter", () => {
|
|
172
|
-
const {
|
|
173
|
-
onMouseEnter,
|
|
174
|
-
item
|
|
175
|
-
} = this.props;
|
|
176
|
-
onMouseEnter && onMouseEnter(item.objectId);
|
|
177
|
-
});
|
|
178
|
-
_defineProperty(this, "handleMouseLeave", () => {
|
|
179
|
-
const {
|
|
180
|
-
onMouseLeave,
|
|
181
|
-
item
|
|
182
|
-
} = this.props;
|
|
183
|
-
onMouseLeave && onMouseLeave(item.objectId);
|
|
184
|
-
});
|
|
185
|
-
}
|
|
186
|
-
renderIcon() {
|
|
187
|
-
const {
|
|
188
|
-
item: {
|
|
189
|
-
icon,
|
|
190
|
-
iconUrl
|
|
191
|
-
},
|
|
192
|
-
intl
|
|
193
|
-
} = this.props;
|
|
194
|
-
if (icon) {
|
|
195
|
-
return jsx("span", {
|
|
196
|
-
css: iconStyle
|
|
197
|
-
}, icon);
|
|
198
|
-
}
|
|
199
|
-
if (iconUrl) {
|
|
200
|
-
return jsx("span", {
|
|
201
|
-
css: iconStyle
|
|
202
|
-
}, jsx("img", {
|
|
203
|
-
src: iconUrl,
|
|
204
|
-
alt: getCorrectAltByIconUrl(iconUrl, intl)
|
|
205
|
-
}));
|
|
206
|
-
}
|
|
207
|
-
return null;
|
|
208
|
-
}
|
|
209
|
-
renderTimeStamp() {
|
|
210
|
-
const {
|
|
211
|
-
item,
|
|
212
|
-
intl
|
|
213
|
-
} = this.props;
|
|
214
|
-
const date = transformTimeStamp(intl, item.lastViewedDate, item.lastUpdatedDate);
|
|
215
|
-
return date && jsx(Fragment, null, "\xA0 \u2022", jsx("span", {
|
|
216
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
217
|
-
className: "link-search-timestamp",
|
|
218
|
-
"data-test-id": "link-search-timestamp"
|
|
219
|
-
}, "\xA0 ", date.pageAction, " ", date.dateString, " ", date.timeSince || ''));
|
|
220
|
-
}
|
|
221
|
-
render() {
|
|
222
|
-
const {
|
|
223
|
-
item,
|
|
224
|
-
selected,
|
|
225
|
-
id,
|
|
226
|
-
role
|
|
227
|
-
} = this.props;
|
|
228
|
-
return (
|
|
229
|
-
// eslint-disable-next-line @atlassian/a11y/no-noninteractive-element-interactions, @atlassian/a11y/click-events-have-key-events
|
|
230
|
-
jsx("li", {
|
|
231
|
-
css: [container, selected && containerSelected],
|
|
232
|
-
role: role,
|
|
233
|
-
id: id,
|
|
234
|
-
"aria-selected": selected,
|
|
235
|
-
"data-testid": "link-search-list-item",
|
|
236
|
-
onMouseMove: this.handleMouseMove
|
|
237
|
-
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
238
|
-
,
|
|
239
|
-
onMouseEnter: this.handleMouseEnter
|
|
240
|
-
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
241
|
-
,
|
|
242
|
-
onMouseLeave: this.handleMouseLeave,
|
|
243
|
-
onClick: this.handleSelect
|
|
244
|
-
}, this.renderIcon(), jsx("span", {
|
|
245
|
-
css: nameWrapper
|
|
246
|
-
}, jsx("div", {
|
|
247
|
-
css: nameStyle
|
|
248
|
-
}, item.name), jsx("div", {
|
|
249
|
-
"data-testid": "link-search-list-item-container",
|
|
250
|
-
css: containerName
|
|
251
|
-
}, item.container, this.renderTimeStamp())))
|
|
252
|
-
);
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
export default injectIntl(LinkSearchListItem);
|
|
145
|
+
export default ForwardedLinkSearchListItemWithIntl;
|
|
@@ -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 = "110.21.
|
|
4
|
+
const packageVersion = "110.21.1";
|
|
5
5
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
6
6
|
// Remove URL as it has UGC
|
|
7
7
|
// Ignored via go/ees007
|
|
@@ -14,7 +14,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
|
14
14
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
15
15
|
import Layer from '../Layer';
|
|
16
16
|
const packageName = "@atlaskit/editor-common";
|
|
17
|
-
const packageVersion = "110.21.
|
|
17
|
+
const packageVersion = "110.21.1";
|
|
18
18
|
const halfFocusRing = 1;
|
|
19
19
|
const dropOffset = '0, 8';
|
|
20
20
|
const fadeIn = keyframes({
|
|
@@ -35,7 +35,7 @@ import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, fireAnalyticsEve
|
|
|
35
35
|
import { Announcer, PanelTextInput } from '../../../ui';
|
|
36
36
|
import { normalizeUrl } from '../../../utils';
|
|
37
37
|
import { browser as browserLegacy, getBrowserInfo } from '../../../utils/browser';
|
|
38
|
-
import LinkSearchList
|
|
38
|
+
import LinkSearchList from '../../LinkSearch/LinkSearchList';
|
|
39
39
|
import { container, containerWithProvider, narrowContainerWidth, inputWrapper } from '../../LinkSearch/ToolbarComponents';
|
|
40
40
|
import { transformTimeStamp } from '../../LinkSearch/transformTimeStamp';
|
|
41
41
|
import { filterUniqueItems, mapContentTypeToIcon, sha1, wordCount } from './utils';
|
|
@@ -168,7 +168,6 @@ export var HyperlinkLinkAddToolbar = /*#__PURE__*/function (_PureComponent) {
|
|
|
168
168
|
_defineProperty(_this, "urlInputContainer", null);
|
|
169
169
|
_defineProperty(_this, "displayTextInputContainer", null);
|
|
170
170
|
_defineProperty(_this, "wrapperRef", /*#__PURE__*/React.createRef());
|
|
171
|
-
// introduced via ff platform_editor_a11y_insert_link_item_focus, remove this comment cleaning up
|
|
172
171
|
_defineProperty(_this, "listItemRefs", {
|
|
173
172
|
current: {}
|
|
174
173
|
});
|
|
@@ -420,7 +419,6 @@ export var HyperlinkLinkAddToolbar = /*#__PURE__*/function (_PureComponent) {
|
|
|
420
419
|
return "".concat(name, ", ").concat(_container, ", ").concat(date === null || date === void 0 ? void 0 : date.pageAction, " ").concat(date === null || date === void 0 ? void 0 : date.dateString, " ").concat((date === null || date === void 0 ? void 0 : date.timeSince) || '');
|
|
421
420
|
}
|
|
422
421
|
});
|
|
423
|
-
// introduced via ff platform_editor_a11y_insert_link_item_focus, remove this comment cleaning up
|
|
424
422
|
_defineProperty(_this, "listItemRefCallback", function (el, id) {
|
|
425
423
|
if (!_this.listItemRefs.current) {
|
|
426
424
|
return;
|
|
@@ -534,7 +532,7 @@ export var HyperlinkLinkAddToolbar = /*#__PURE__*/function (_PureComponent) {
|
|
|
534
532
|
if (keyCode === KEY_CODE_TAB) {
|
|
535
533
|
/** If there are items in the list, allow normal tabbing so focus moves to the next interactive element (in this case, a search result item).
|
|
536
534
|
*/
|
|
537
|
-
if (_this.state.items.length > 0
|
|
535
|
+
if (_this.state.items.length > 0) {
|
|
538
536
|
return;
|
|
539
537
|
}
|
|
540
538
|
if (!_this.submitted) {
|
|
@@ -548,7 +546,6 @@ export var HyperlinkLinkAddToolbar = /*#__PURE__*/function (_PureComponent) {
|
|
|
548
546
|
return;
|
|
549
547
|
}
|
|
550
548
|
});
|
|
551
|
-
// introduced via ff platform_editor_a11y_insert_link_item_focus, remove this comment cleaning up
|
|
552
549
|
_defineProperty(_this, "handleListItemFocus", function (index) {
|
|
553
550
|
_this.setState({
|
|
554
551
|
selectedIndex: index
|
|
@@ -590,7 +587,6 @@ export var HyperlinkLinkAddToolbar = /*#__PURE__*/function (_PureComponent) {
|
|
|
590
587
|
updatedIndex = selectedIndex > 0 ? selectedIndex - 1 : items.length - 1;
|
|
591
588
|
}
|
|
592
589
|
if ([KEY_CODE_ARROW_DOWN, KEY_CODE_ARROW_UP].includes(keyCode) && items[updatedIndex]) {
|
|
593
|
-
// introduced via ff platform_editor_a11y_insert_link_item_focus, remove this comment cleaning up
|
|
594
590
|
if (_this.listItemRefs.current) {
|
|
595
591
|
var _this$listItemRefs$cu;
|
|
596
592
|
(_this$listItemRefs$cu = _this.listItemRefs.current[items[updatedIndex].objectId]) === null || _this$listItemRefs$cu === void 0 || _this$listItemRefs$cu.focus();
|
|
@@ -968,7 +964,7 @@ export var HyperlinkLinkAddToolbar = /*#__PURE__*/function (_PureComponent) {
|
|
|
968
964
|
id: "fabric.editor.hyperlink.suggested.results"
|
|
969
965
|
}, displayUrl && formatMessage(messages.searchLinkResults, {
|
|
970
966
|
count: items.length
|
|
971
|
-
})),
|
|
967
|
+
})), jsx(LinkSearchList, {
|
|
972
968
|
ariaControls: "fabric.editor.hyperlink.suggested.results",
|
|
973
969
|
id: linkSearchListId,
|
|
974
970
|
role: "listbox",
|
|
@@ -981,16 +977,6 @@ export var HyperlinkLinkAddToolbar = /*#__PURE__*/function (_PureComponent) {
|
|
|
981
977
|
onSelect: this.handleSelected,
|
|
982
978
|
onMouseEnter: this.handleMouseEnterResultItem,
|
|
983
979
|
onMouseLeave: this.handleMouseLeaveResultItem
|
|
984
|
-
}) : jsx(LinkSearchList, {
|
|
985
|
-
ariaControls: "fabric.editor.hyperlink.suggested.results",
|
|
986
|
-
id: linkSearchListId,
|
|
987
|
-
role: "listbox",
|
|
988
|
-
items: items,
|
|
989
|
-
isLoading: isLoading,
|
|
990
|
-
selectedIndex: selectedIndex,
|
|
991
|
-
onSelect: this.handleSelected,
|
|
992
|
-
onMouseEnter: this.handleMouseEnterResultItem,
|
|
993
|
-
onMouseLeave: this.handleMouseLeaveResultItem
|
|
994
980
|
})));
|
|
995
981
|
}
|
|
996
982
|
}]);
|
|
@@ -1,20 +1,12 @@
|
|
|
1
|
-
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
|
-
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
-
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
4
|
-
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
5
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
6
|
-
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
7
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
8
1
|
/**
|
|
9
2
|
* @jsxRuntime classic
|
|
10
3
|
* @jsx jsx
|
|
11
4
|
*/
|
|
12
|
-
import { PureComponent } from 'react';
|
|
13
5
|
|
|
14
6
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
15
7
|
import { css, jsx } from '@emotion/react';
|
|
16
8
|
import Spinner from '@atlaskit/spinner';
|
|
17
|
-
import
|
|
9
|
+
import ForwardedLinkSearchListItemNextWithIntl from './LinkSearchListItem';
|
|
18
10
|
var listContainer = css({
|
|
19
11
|
paddingTop: 0,
|
|
20
12
|
marginTop: "var(--ds-space-150, 12px)",
|
|
@@ -31,7 +23,7 @@ export var linkSearchList = css({
|
|
|
31
23
|
padding: 0,
|
|
32
24
|
listStyle: 'none'
|
|
33
25
|
});
|
|
34
|
-
|
|
26
|
+
var LinkSearchList = function LinkSearchList(_ref) {
|
|
35
27
|
var listItemRefCallback = _ref.listItemRefCallback,
|
|
36
28
|
_onFocus = _ref.onFocus,
|
|
37
29
|
onKeyDown = _ref.onKeyDown,
|
|
@@ -88,70 +80,4 @@ export var LinkSearchListNext = function LinkSearchListNext(_ref) {
|
|
|
88
80
|
css: listContainer
|
|
89
81
|
}, itemsContent, loadingContent);
|
|
90
82
|
};
|
|
91
|
-
|
|
92
|
-
* *Warning:* With `platform_editor_a11y_insert_link_item_focus` enabled this component is no longer used and is replaced with `<LinkSearchListNext />`.
|
|
93
|
-
*
|
|
94
|
-
* If making changes to this component please ensure to also update `<LinkSearchListNext />`.
|
|
95
|
-
*/
|
|
96
|
-
// Ignored via go/ees005
|
|
97
|
-
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
98
|
-
var LinkSearchList = /*#__PURE__*/function (_PureComponent) {
|
|
99
|
-
function LinkSearchList() {
|
|
100
|
-
_classCallCheck(this, LinkSearchList);
|
|
101
|
-
return _callSuper(this, LinkSearchList, arguments);
|
|
102
|
-
}
|
|
103
|
-
_inherits(LinkSearchList, _PureComponent);
|
|
104
|
-
return _createClass(LinkSearchList, [{
|
|
105
|
-
key: "render",
|
|
106
|
-
value: function render() {
|
|
107
|
-
var _this$props = this.props,
|
|
108
|
-
onSelect = _this$props.onSelect,
|
|
109
|
-
onMouseMove = _this$props.onMouseMove,
|
|
110
|
-
onMouseEnter = _this$props.onMouseEnter,
|
|
111
|
-
onMouseLeave = _this$props.onMouseLeave,
|
|
112
|
-
items = _this$props.items,
|
|
113
|
-
selectedIndex = _this$props.selectedIndex,
|
|
114
|
-
isLoading = _this$props.isLoading,
|
|
115
|
-
ariaControls = _this$props.ariaControls,
|
|
116
|
-
role = _this$props.role,
|
|
117
|
-
id = _this$props.id;
|
|
118
|
-
var itemsContent;
|
|
119
|
-
var loadingContent;
|
|
120
|
-
if (items && items.length > 0) {
|
|
121
|
-
itemsContent = jsx("ul", {
|
|
122
|
-
css: linkSearchList,
|
|
123
|
-
id: id,
|
|
124
|
-
role: role,
|
|
125
|
-
"aria-controls": ariaControls,
|
|
126
|
-
"data-testid": "".concat(id, "--items")
|
|
127
|
-
}, items.map(function (item, index) {
|
|
128
|
-
return jsx(LinkSearchListItem, {
|
|
129
|
-
id: "link-search-list-item-".concat(index),
|
|
130
|
-
role: role && 'option',
|
|
131
|
-
item: item,
|
|
132
|
-
selected: selectedIndex === index,
|
|
133
|
-
onMouseMove: onMouseMove,
|
|
134
|
-
onMouseEnter: onMouseEnter,
|
|
135
|
-
onMouseLeave: onMouseLeave,
|
|
136
|
-
onSelect: onSelect,
|
|
137
|
-
key: item.objectId
|
|
138
|
-
});
|
|
139
|
-
}));
|
|
140
|
-
}
|
|
141
|
-
if (isLoading) {
|
|
142
|
-
loadingContent = jsx("div", {
|
|
143
|
-
id: id,
|
|
144
|
-
"data-testid": "".concat(id, "--loading"),
|
|
145
|
-
css: spinnerContainer
|
|
146
|
-
}, jsx(Spinner, {
|
|
147
|
-
size: "medium",
|
|
148
|
-
interactionName: "link-search-spinner"
|
|
149
|
-
}));
|
|
150
|
-
}
|
|
151
|
-
return jsx("div", {
|
|
152
|
-
css: listContainer
|
|
153
|
-
}, itemsContent, loadingContent);
|
|
154
|
-
}
|
|
155
|
-
}]);
|
|
156
|
-
}(PureComponent);
|
|
157
|
-
export { LinkSearchList as default };
|
|
83
|
+
export default LinkSearchList;
|
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
|
-
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
-
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
4
|
-
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
5
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
6
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
7
|
-
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
8
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
9
1
|
/**
|
|
10
2
|
* @jsxRuntime classic
|
|
11
3
|
* @jsx jsx
|
|
@@ -65,7 +57,7 @@ var iconStyle = css({
|
|
|
65
57
|
maxWidth: '16px'
|
|
66
58
|
}
|
|
67
59
|
});
|
|
68
|
-
var
|
|
60
|
+
var LinkSearchListItem = function LinkSearchListItem(props, ref) {
|
|
69
61
|
var id = props.id,
|
|
70
62
|
item = props.item,
|
|
71
63
|
onFocus = props.onFocus,
|
|
@@ -144,123 +136,8 @@ var LinkSearchListItemNext = function LinkSearchListItemNext(props, ref) {
|
|
|
144
136
|
css: containerName
|
|
145
137
|
}, item.container, renderTimeStamp())));
|
|
146
138
|
};
|
|
147
|
-
var
|
|
148
|
-
export var
|
|
139
|
+
var ForwardedLinkSearchListItem = /*#__PURE__*/forwardRef(LinkSearchListItem);
|
|
140
|
+
export var ForwardedLinkSearchListItemWithIntl = injectIntl(ForwardedLinkSearchListItem, {
|
|
149
141
|
forwardRef: true
|
|
150
142
|
});
|
|
151
|
-
|
|
152
|
-
* *Warning:* With `platform_editor_a11y_insert_link_item_focus` enabled this component is no longer used and is replaced with `<LinkSearchListItemNext />`.
|
|
153
|
-
*
|
|
154
|
-
* If making changes to this component please ensure to also update `<LinkSearchListItemNext />`.
|
|
155
|
-
*/
|
|
156
|
-
// Ignored via go/ees005
|
|
157
|
-
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
158
|
-
var LinkSearchListItem = /*#__PURE__*/function (_React$PureComponent) {
|
|
159
|
-
function LinkSearchListItem() {
|
|
160
|
-
var _this;
|
|
161
|
-
_classCallCheck(this, LinkSearchListItem);
|
|
162
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
163
|
-
args[_key] = arguments[_key];
|
|
164
|
-
}
|
|
165
|
-
_this = _callSuper(this, LinkSearchListItem, [].concat(args));
|
|
166
|
-
_defineProperty(_this, "handleSelect", function (e) {
|
|
167
|
-
e.preventDefault(); // don't let editor lose focus
|
|
168
|
-
var _this$props = _this.props,
|
|
169
|
-
item = _this$props.item,
|
|
170
|
-
onSelect = _this$props.onSelect;
|
|
171
|
-
onSelect(item.url, item.name);
|
|
172
|
-
});
|
|
173
|
-
_defineProperty(_this, "handleMouseMove", function () {
|
|
174
|
-
var _this$props2 = _this.props,
|
|
175
|
-
onMouseMove = _this$props2.onMouseMove,
|
|
176
|
-
item = _this$props2.item;
|
|
177
|
-
onMouseMove && onMouseMove(item.objectId);
|
|
178
|
-
});
|
|
179
|
-
_defineProperty(_this, "handleMouseEnter", function () {
|
|
180
|
-
var _this$props3 = _this.props,
|
|
181
|
-
onMouseEnter = _this$props3.onMouseEnter,
|
|
182
|
-
item = _this$props3.item;
|
|
183
|
-
onMouseEnter && onMouseEnter(item.objectId);
|
|
184
|
-
});
|
|
185
|
-
_defineProperty(_this, "handleMouseLeave", function () {
|
|
186
|
-
var _this$props4 = _this.props,
|
|
187
|
-
onMouseLeave = _this$props4.onMouseLeave,
|
|
188
|
-
item = _this$props4.item;
|
|
189
|
-
onMouseLeave && onMouseLeave(item.objectId);
|
|
190
|
-
});
|
|
191
|
-
return _this;
|
|
192
|
-
}
|
|
193
|
-
_inherits(LinkSearchListItem, _React$PureComponent);
|
|
194
|
-
return _createClass(LinkSearchListItem, [{
|
|
195
|
-
key: "renderIcon",
|
|
196
|
-
value: function renderIcon() {
|
|
197
|
-
var _this$props5 = this.props,
|
|
198
|
-
_this$props5$item = _this$props5.item,
|
|
199
|
-
icon = _this$props5$item.icon,
|
|
200
|
-
iconUrl = _this$props5$item.iconUrl,
|
|
201
|
-
intl = _this$props5.intl;
|
|
202
|
-
if (icon) {
|
|
203
|
-
return jsx("span", {
|
|
204
|
-
css: iconStyle
|
|
205
|
-
}, icon);
|
|
206
|
-
}
|
|
207
|
-
if (iconUrl) {
|
|
208
|
-
return jsx("span", {
|
|
209
|
-
css: iconStyle
|
|
210
|
-
}, jsx("img", {
|
|
211
|
-
src: iconUrl,
|
|
212
|
-
alt: getCorrectAltByIconUrl(iconUrl, intl)
|
|
213
|
-
}));
|
|
214
|
-
}
|
|
215
|
-
return null;
|
|
216
|
-
}
|
|
217
|
-
}, {
|
|
218
|
-
key: "renderTimeStamp",
|
|
219
|
-
value: function renderTimeStamp() {
|
|
220
|
-
var _this$props6 = this.props,
|
|
221
|
-
item = _this$props6.item,
|
|
222
|
-
intl = _this$props6.intl;
|
|
223
|
-
var date = transformTimeStamp(intl, item.lastViewedDate, item.lastUpdatedDate);
|
|
224
|
-
return date && jsx(Fragment, null, "\xA0 \u2022", jsx("span", {
|
|
225
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
226
|
-
className: "link-search-timestamp",
|
|
227
|
-
"data-test-id": "link-search-timestamp"
|
|
228
|
-
}, "\xA0 ", date.pageAction, " ", date.dateString, " ", date.timeSince || ''));
|
|
229
|
-
}
|
|
230
|
-
}, {
|
|
231
|
-
key: "render",
|
|
232
|
-
value: function render() {
|
|
233
|
-
var _this$props7 = this.props,
|
|
234
|
-
item = _this$props7.item,
|
|
235
|
-
selected = _this$props7.selected,
|
|
236
|
-
id = _this$props7.id,
|
|
237
|
-
role = _this$props7.role;
|
|
238
|
-
return (
|
|
239
|
-
// eslint-disable-next-line @atlassian/a11y/no-noninteractive-element-interactions, @atlassian/a11y/click-events-have-key-events
|
|
240
|
-
jsx("li", {
|
|
241
|
-
css: [container, selected && containerSelected],
|
|
242
|
-
role: role,
|
|
243
|
-
id: id,
|
|
244
|
-
"aria-selected": selected,
|
|
245
|
-
"data-testid": "link-search-list-item",
|
|
246
|
-
onMouseMove: this.handleMouseMove
|
|
247
|
-
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
248
|
-
,
|
|
249
|
-
onMouseEnter: this.handleMouseEnter
|
|
250
|
-
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
251
|
-
,
|
|
252
|
-
onMouseLeave: this.handleMouseLeave,
|
|
253
|
-
onClick: this.handleSelect
|
|
254
|
-
}, this.renderIcon(), jsx("span", {
|
|
255
|
-
css: nameWrapper
|
|
256
|
-
}, jsx("div", {
|
|
257
|
-
css: nameStyle
|
|
258
|
-
}, item.name), jsx("div", {
|
|
259
|
-
"data-testid": "link-search-list-item-container",
|
|
260
|
-
css: containerName
|
|
261
|
-
}, item.container, this.renderTimeStamp())))
|
|
262
|
-
);
|
|
263
|
-
}
|
|
264
|
-
}]);
|
|
265
|
-
}(React.PureComponent);
|
|
266
|
-
export default injectIntl(LinkSearchListItem);
|
|
143
|
+
export default ForwardedLinkSearchListItemWithIntl;
|
|
@@ -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 = "110.21.
|
|
10
|
+
var packageVersion = "110.21.1";
|
|
11
11
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
12
12
|
// Remove URL as it has UGC
|
|
13
13
|
// Ignored via go/ees007
|
|
@@ -21,7 +21,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
|
21
21
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
22
22
|
import Layer from '../Layer';
|
|
23
23
|
var packageName = "@atlaskit/editor-common";
|
|
24
|
-
var packageVersion = "110.21.
|
|
24
|
+
var packageVersion = "110.21.1";
|
|
25
25
|
var halfFocusRing = 1;
|
|
26
26
|
var dropOffset = '0, 8';
|
|
27
27
|
var fadeIn = keyframes({
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
* @jsxRuntime classic
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
|
-
import {
|
|
5
|
+
import { type KeyboardEvent } from 'react';
|
|
6
6
|
import { jsx, type SerializedStyles } from '@emotion/react';
|
|
7
7
|
import type { LinkSearchListItemData } from './types';
|
|
8
8
|
export declare const linkSearchList: SerializedStyles;
|
|
9
|
-
export interface
|
|
9
|
+
export interface Props {
|
|
10
10
|
ariaControls?: string;
|
|
11
11
|
id?: string;
|
|
12
12
|
isLoading: boolean;
|
|
@@ -21,24 +21,5 @@ export interface PropsNext {
|
|
|
21
21
|
role?: string;
|
|
22
22
|
selectedIndex: number;
|
|
23
23
|
}
|
|
24
|
-
|
|
25
|
-
export
|
|
26
|
-
ariaControls?: string;
|
|
27
|
-
id?: string;
|
|
28
|
-
isLoading: boolean;
|
|
29
|
-
items?: LinkSearchListItemData[];
|
|
30
|
-
onMouseEnter?: (objectId: string) => void;
|
|
31
|
-
onMouseLeave?: (objectId: string) => void;
|
|
32
|
-
onMouseMove?: (objectId: string) => void;
|
|
33
|
-
onSelect: (href: string, text: string) => void;
|
|
34
|
-
role?: string;
|
|
35
|
-
selectedIndex: number;
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* *Warning:* With `platform_editor_a11y_insert_link_item_focus` enabled this component is no longer used and is replaced with `<LinkSearchListNext />`.
|
|
39
|
-
*
|
|
40
|
-
* If making changes to this component please ensure to also update `<LinkSearchListNext />`.
|
|
41
|
-
*/
|
|
42
|
-
export default class LinkSearchList extends PureComponent<Props, Object> {
|
|
43
|
-
render(): jsx.JSX.Element;
|
|
44
|
-
}
|
|
24
|
+
declare const LinkSearchList: ({ listItemRefCallback, onFocus, onKeyDown, onSelect, onMouseMove, onMouseEnter, onMouseLeave, items, selectedIndex, isLoading, ariaControls, role, id, }: Props) => jsx.JSX.Element;
|
|
25
|
+
export default LinkSearchList;
|
|
@@ -10,7 +10,7 @@ export declare const container: SerializedStyles;
|
|
|
10
10
|
export declare const containerSelected: SerializedStyles;
|
|
11
11
|
export declare const nameStyle: SerializedStyles;
|
|
12
12
|
export declare const containerName: SerializedStyles;
|
|
13
|
-
export interface
|
|
13
|
+
export interface Props {
|
|
14
14
|
id?: string;
|
|
15
15
|
item: LinkSearchListItemData;
|
|
16
16
|
onFocus?: () => void;
|
|
@@ -22,20 +22,7 @@ export interface PropsNext {
|
|
|
22
22
|
role?: string;
|
|
23
23
|
selected: boolean;
|
|
24
24
|
}
|
|
25
|
-
export declare const
|
|
26
|
-
WrappedComponent: React.ComponentType<
|
|
27
|
-
};
|
|
28
|
-
export interface Props {
|
|
29
|
-
id?: string;
|
|
30
|
-
item: LinkSearchListItemData;
|
|
31
|
-
onMouseEnter?: (objectId: string) => void;
|
|
32
|
-
onMouseLeave?: (objectId: string) => void;
|
|
33
|
-
onMouseMove?: (objectId: string) => void;
|
|
34
|
-
onSelect: (href: string, text: string) => void;
|
|
35
|
-
role?: string;
|
|
36
|
-
selected: boolean;
|
|
37
|
-
}
|
|
38
|
-
declare const _default: React.FC<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps>> & {
|
|
39
|
-
WrappedComponent: React.ComponentType<Props & WrappedComponentProps>;
|
|
25
|
+
export declare const ForwardedLinkSearchListItemWithIntl: React.ForwardRefExoticComponent<Omit<import("react-intl-next").WithIntlProps<React.PropsWithChildren<Props & WrappedComponentProps & React.RefAttributes<HTMLDivElement>>>, "ref"> & React.RefAttributes<any>> & {
|
|
26
|
+
WrappedComponent: React.ComponentType<Props & WrappedComponentProps & React.RefAttributes<HTMLDivElement>>;
|
|
40
27
|
};
|
|
41
|
-
export default
|
|
28
|
+
export default ForwardedLinkSearchListItemWithIntl;
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
* @jsxRuntime classic
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
|
-
import {
|
|
5
|
+
import { type KeyboardEvent } from 'react';
|
|
6
6
|
import { jsx, type SerializedStyles } from '@emotion/react';
|
|
7
7
|
import type { LinkSearchListItemData } from './types';
|
|
8
8
|
export declare const linkSearchList: SerializedStyles;
|
|
9
|
-
export interface
|
|
9
|
+
export interface Props {
|
|
10
10
|
ariaControls?: string;
|
|
11
11
|
id?: string;
|
|
12
12
|
isLoading: boolean;
|
|
@@ -21,24 +21,5 @@ export interface PropsNext {
|
|
|
21
21
|
role?: string;
|
|
22
22
|
selectedIndex: number;
|
|
23
23
|
}
|
|
24
|
-
|
|
25
|
-
export
|
|
26
|
-
ariaControls?: string;
|
|
27
|
-
id?: string;
|
|
28
|
-
isLoading: boolean;
|
|
29
|
-
items?: LinkSearchListItemData[];
|
|
30
|
-
onMouseEnter?: (objectId: string) => void;
|
|
31
|
-
onMouseLeave?: (objectId: string) => void;
|
|
32
|
-
onMouseMove?: (objectId: string) => void;
|
|
33
|
-
onSelect: (href: string, text: string) => void;
|
|
34
|
-
role?: string;
|
|
35
|
-
selectedIndex: number;
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* *Warning:* With `platform_editor_a11y_insert_link_item_focus` enabled this component is no longer used and is replaced with `<LinkSearchListNext />`.
|
|
39
|
-
*
|
|
40
|
-
* If making changes to this component please ensure to also update `<LinkSearchListNext />`.
|
|
41
|
-
*/
|
|
42
|
-
export default class LinkSearchList extends PureComponent<Props, Object> {
|
|
43
|
-
render(): jsx.JSX.Element;
|
|
44
|
-
}
|
|
24
|
+
declare const LinkSearchList: ({ listItemRefCallback, onFocus, onKeyDown, onSelect, onMouseMove, onMouseEnter, onMouseLeave, items, selectedIndex, isLoading, ariaControls, role, id, }: Props) => jsx.JSX.Element;
|
|
25
|
+
export default LinkSearchList;
|
|
@@ -10,7 +10,7 @@ export declare const container: SerializedStyles;
|
|
|
10
10
|
export declare const containerSelected: SerializedStyles;
|
|
11
11
|
export declare const nameStyle: SerializedStyles;
|
|
12
12
|
export declare const containerName: SerializedStyles;
|
|
13
|
-
export interface
|
|
13
|
+
export interface Props {
|
|
14
14
|
id?: string;
|
|
15
15
|
item: LinkSearchListItemData;
|
|
16
16
|
onFocus?: () => void;
|
|
@@ -22,20 +22,7 @@ export interface PropsNext {
|
|
|
22
22
|
role?: string;
|
|
23
23
|
selected: boolean;
|
|
24
24
|
}
|
|
25
|
-
export declare const
|
|
26
|
-
WrappedComponent: React.ComponentType<
|
|
27
|
-
};
|
|
28
|
-
export interface Props {
|
|
29
|
-
id?: string;
|
|
30
|
-
item: LinkSearchListItemData;
|
|
31
|
-
onMouseEnter?: (objectId: string) => void;
|
|
32
|
-
onMouseLeave?: (objectId: string) => void;
|
|
33
|
-
onMouseMove?: (objectId: string) => void;
|
|
34
|
-
onSelect: (href: string, text: string) => void;
|
|
35
|
-
role?: string;
|
|
36
|
-
selected: boolean;
|
|
37
|
-
}
|
|
38
|
-
declare const _default: React.FC<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps>> & {
|
|
39
|
-
WrappedComponent: React.ComponentType<Props & WrappedComponentProps>;
|
|
25
|
+
export declare const ForwardedLinkSearchListItemWithIntl: React.ForwardRefExoticComponent<Omit<import("react-intl-next").WithIntlProps<React.PropsWithChildren<Props & WrappedComponentProps & React.RefAttributes<HTMLDivElement>>>, "ref"> & React.RefAttributes<any>> & {
|
|
26
|
+
WrappedComponent: React.ComponentType<Props & WrappedComponentProps & React.RefAttributes<HTMLDivElement>>;
|
|
40
27
|
};
|
|
41
|
-
export default
|
|
28
|
+
export default ForwardedLinkSearchListItemWithIntl;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "110.21.
|
|
3
|
+
"version": "110.21.2",
|
|
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/"
|
|
@@ -231,9 +231,6 @@
|
|
|
231
231
|
"p2m-drop-down-motion": {
|
|
232
232
|
"type": "boolean"
|
|
233
233
|
},
|
|
234
|
-
"platform_editor_a11y_insert_link_item_focus": {
|
|
235
|
-
"type": "boolean"
|
|
236
|
-
},
|
|
237
234
|
"platform_editor_link_picker_width_fix": {
|
|
238
235
|
"type": "boolean"
|
|
239
236
|
},
|