@atlaskit/editor-common 110.21.1 → 110.21.3
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 +16 -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/provider-factory/synced-block-renderer-provider.js +5 -0
- 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/provider-factory/synced-block-renderer-provider.js +1 -0
- 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/provider-factory/synced-block-renderer-provider.js +1 -0
- 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/provider-factory/synced-block-renderer-provider.d.ts +14 -0
- package/dist/types/provider-factory.d.ts +1 -0
- 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/dist/types-ts4.5/provider-factory/synced-block-renderer-provider.d.ts +14 -0
- package/dist/types-ts4.5/provider-factory.d.ts +1 -0
- package/package.json +1 -4
|
@@ -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.2";
|
|
5
5
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
6
6
|
// Remove URL as it has UGC
|
|
7
7
|
// Ignored via go/ees007
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -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.2";
|
|
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.2";
|
|
11
11
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
12
12
|
// Remove URL as it has UGC
|
|
13
13
|
// Ignored via go/ees007
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -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.2";
|
|
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;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { EmojiProvider } from "@atlaskit/emoji";
|
|
2
|
+
import type { MentionProvider } from "@atlaskit/mention/types";
|
|
3
|
+
import type { TaskDecisionProvider } from "@atlaskit/task-decision/types";
|
|
4
|
+
import type { CardProvider } from "./card-provider";
|
|
5
|
+
import type { MediaProvider } from "./media-provider";
|
|
6
|
+
import type { ProfilecardProvider } from "./profile-card-provider";
|
|
7
|
+
export type SyncedBlockRendererDataProviders = {
|
|
8
|
+
cardProvider: Promise<CardProvider> | undefined;
|
|
9
|
+
emojiProvider: Promise<EmojiProvider> | undefined;
|
|
10
|
+
mediaProvider: Promise<MediaProvider> | undefined;
|
|
11
|
+
mentionProvider: Promise<MentionProvider> | undefined;
|
|
12
|
+
profilecardProvider: Promise<ProfilecardProvider> | undefined;
|
|
13
|
+
taskDecisionProvider: Promise<TaskDecisionProvider> | undefined;
|
|
14
|
+
};
|
|
@@ -12,3 +12,4 @@ export type { TypeAheadItem, TypeAheadItemRenderProps } from './types/type-ahead
|
|
|
12
12
|
export type { AutoformatReplacement, AutoformattingProvider, AutoformatHandler, AutoformatRuleset, } from './provider-factory/autoformatting-provider';
|
|
13
13
|
export type { ContextIdentifierProvider } from './provider-factory/context-identifier-provider';
|
|
14
14
|
export type { ProfilecardProvider } from './provider-factory/profile-card-provider';
|
|
15
|
+
export type { SyncedBlockRendererDataProviders } from './provider-factory/synced-block-renderer-provider';
|
|
@@ -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;
|