@atlaskit/editor-common 78.17.1 → 78.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/analytics/package.json +1 -1
- package/annotation/package.json +1 -1
- package/card/package.json +1 -1
- package/clipboard/package.json +1 -1
- package/collab/package.json +1 -1
- package/commands/package.json +1 -1
- package/constants/package.json +1 -1
- package/copy-button/package.json +1 -1
- package/core-utils/package.json +1 -1
- package/dist/cjs/element-browser/components/CategoryList.js +6 -2
- package/dist/cjs/element-browser/components/ElementList/ElementList.js +10 -6
- package/dist/cjs/element-browser/components/StatelessElementBrowser.js +82 -20
- package/dist/cjs/extensibility/Extension/Extension/index.js +17 -12
- package/dist/cjs/extensibility/MultiBodiedExtension/index.js +16 -12
- package/dist/cjs/hooks/useSharedPluginState.js +3 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/es2019/element-browser/components/CategoryList.js +6 -2
- package/dist/es2019/element-browser/components/ElementList/ElementList.js +10 -6
- package/dist/es2019/element-browser/components/StatelessElementBrowser.js +81 -99
- package/dist/es2019/extensibility/Extension/Extension/index.js +16 -11
- package/dist/es2019/extensibility/MultiBodiedExtension/index.js +15 -11
- package/dist/es2019/hooks/useSharedPluginState.js +5 -0
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/esm/element-browser/components/CategoryList.js +6 -2
- package/dist/esm/element-browser/components/ElementList/ElementList.js +10 -6
- package/dist/esm/element-browser/components/StatelessElementBrowser.js +81 -20
- package/dist/esm/extensibility/Extension/Extension/index.js +17 -12
- package/dist/esm/extensibility/MultiBodiedExtension/index.js +16 -12
- package/dist/esm/hooks/useSharedPluginState.js +3 -0
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/types/analytics/types/enums.d.ts +2 -2
- package/dist/types/annotation/index.d.ts +2 -0
- package/dist/types/commands/index.d.ts +3 -3
- package/dist/types/element-browser/components/ElementSearch.d.ts +1 -1
- package/dist/types/floating-toolbar/index.d.ts +1 -1
- package/dist/types/link/LinkSearch/LinkSearchListItem.d.ts +2 -2
- package/dist/types/preset/plugin-injection-api.d.ts +1 -1
- package/dist/types/provider-helpers/promise-helpers.d.ts +2 -2
- package/dist/types/styles/shared/resizer.d.ts +3 -3
- package/dist/types/ui/Caption/index.d.ts +2 -2
- package/dist/types/ui/UnsupportedBlock/index.d.ts +2 -2
- package/dist/types/ui/UnsupportedInline/index.d.ts +2 -2
- package/dist/types/ui-color/ColorPalette/index.d.ts +2 -2
- package/dist/types/utils/compare-props.d.ts +2 -2
- package/dist/types/utils/imageLoader.d.ts +1 -1
- package/dist/types-ts4.5/analytics/types/enums.d.ts +2 -2
- package/dist/types-ts4.5/annotation/index.d.ts +2 -0
- package/dist/types-ts4.5/commands/index.d.ts +3 -3
- package/dist/types-ts4.5/element-browser/components/ElementSearch.d.ts +1 -1
- package/dist/types-ts4.5/floating-toolbar/index.d.ts +1 -1
- package/dist/types-ts4.5/link/LinkSearch/LinkSearchListItem.d.ts +2 -2
- package/dist/types-ts4.5/preset/plugin-injection-api.d.ts +2 -2
- package/dist/types-ts4.5/provider-helpers/promise-helpers.d.ts +2 -2
- package/dist/types-ts4.5/styles/shared/resizer.d.ts +3 -3
- package/dist/types-ts4.5/ui/Caption/index.d.ts +2 -2
- package/dist/types-ts4.5/ui/UnsupportedBlock/index.d.ts +2 -2
- package/dist/types-ts4.5/ui/UnsupportedInline/index.d.ts +2 -2
- package/dist/types-ts4.5/ui-color/ColorPalette/index.d.ts +2 -2
- package/dist/types-ts4.5/utils/compare-props.d.ts +2 -2
- package/dist/types-ts4.5/utils/imageLoader.d.ts +1 -1
- package/doc-utils/package.json +1 -1
- package/editor-analytics/package.json +1 -1
- package/element-browser/package.json +1 -1
- package/emoji/package.json +1 -1
- package/error-boundary/package.json +1 -1
- package/event-dispatcher/package.json +1 -1
- package/extensibility/package.json +1 -1
- package/extensions/package.json +1 -1
- package/floating-toolbar/package.json +1 -1
- package/guideline/package.json +1 -1
- package/hooks/package.json +1 -1
- package/icons/package.json +1 -1
- package/in-product/package.json +1 -1
- package/indentation/package.json +1 -1
- package/insert/package.json +1 -1
- package/keymaps/package.json +1 -1
- package/legacy-rank-plugins/package.json +1 -1
- package/link/package.json +1 -1
- package/lists/package.json +1 -1
- package/mark/package.json +1 -1
- package/media/package.json +1 -1
- package/media-inline/package.json +1 -1
- package/media-single/package.json +1 -1
- package/mention/package.json +1 -1
- package/messages/package.json +1 -1
- package/monitoring/package.json +1 -1
- package/node-width/package.json +1 -1
- package/normalize-feature-flags/package.json +1 -1
- package/package.json +4 -4
- package/panel/package.json +1 -1
- package/paste/package.json +1 -1
- package/portal-provider/package.json +1 -1
- package/preset/package.json +1 -1
- package/provider-factory/package.json +1 -1
- package/provider-helpers/package.json +1 -1
- package/quick-insert/package.json +1 -1
- package/react-node-view/package.json +1 -1
- package/resizer/package.json +1 -1
- package/safe-plugin/package.json +1 -1
- package/selection/package.json +1 -1
- package/selection-based-node-view/package.json +1 -1
- package/styles/package.json +1 -1
- package/transforms/package.json +1 -1
- package/type-ahead/package.json +1 -1
- package/types/package.json +1 -1
- package/ufo/package.json +1 -1
- package/ui/package.json +1 -1
- package/ui-color/package.json +1 -1
- package/ui-menu/package.json +1 -1
- package/ui-react/package.json +1 -1
- package/utils/package.json +1 -1
- package/validator/package.json +1 -1
- package/with-plugin-state/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 78.18.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#71857](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/71857) [`bd0fdd102253`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/bd0fdd102253) - Added correct role for Browse tablist, added aria-selected toggle, added functionality for aria-controls, added tabpanel and functionality for that
|
|
8
|
+
|
|
9
|
+
## 78.17.2
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#83116](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/83116) [`8d4e99057fe0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8d4e99057fe0) - Upgrade Typescript from `4.9.5` to `5.4.2`
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
|
|
3
16
|
## 78.17.1
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
package/analytics/package.json
CHANGED
package/annotation/package.json
CHANGED
package/card/package.json
CHANGED
package/clipboard/package.json
CHANGED
package/collab/package.json
CHANGED
package/commands/package.json
CHANGED
package/constants/package.json
CHANGED
package/copy-button/package.json
CHANGED
package/core-utils/package.json
CHANGED
|
@@ -54,7 +54,6 @@ function CategoryListItem(_ref2) {
|
|
|
54
54
|
var ref = (0, _useFocus.default)(focus);
|
|
55
55
|
var onClick = (0, _react.useCallback)(function () {
|
|
56
56
|
onSelectCategory(category);
|
|
57
|
-
|
|
58
57
|
/**
|
|
59
58
|
* When user double clicks on same category, focus on first item.
|
|
60
59
|
*/
|
|
@@ -94,13 +93,18 @@ function CategoryListItem(_ref2) {
|
|
|
94
93
|
}, rest);
|
|
95
94
|
}, [category.name, selectedCategory]);
|
|
96
95
|
return (0, _react2.jsx)("div", {
|
|
97
|
-
css: buttonWrapper
|
|
96
|
+
css: buttonWrapper,
|
|
97
|
+
role: "presentation"
|
|
98
98
|
}, (0, _react2.jsx)(_customThemeButton.default, {
|
|
99
99
|
appearance: "subtle",
|
|
100
100
|
isSelected: selectedCategory === category.name,
|
|
101
101
|
onClick: onClick,
|
|
102
102
|
onFocus: onFocus,
|
|
103
103
|
theme: getTheme,
|
|
104
|
+
role: "tab",
|
|
105
|
+
"aria-selected": selectedCategory === category.name ? 'true' : 'false',
|
|
106
|
+
"aria-controls": "browse-category-".concat(category.name, "-tab"),
|
|
107
|
+
id: "browse-category--".concat(category.name, "-button"),
|
|
104
108
|
ref: ref,
|
|
105
109
|
testId: "element-browser-category-item"
|
|
106
110
|
}, category.title));
|
|
@@ -114,16 +114,20 @@ function ElementList(_ref) {
|
|
|
114
114
|
}, props)));
|
|
115
115
|
};
|
|
116
116
|
}, [items, fullMode, selectedItemIndex, focusedItemIndex, props]);
|
|
117
|
-
return (0, _react2.jsx)(_react.Fragment, null, (0, _react2.jsx)(ContainerWidthMonitor, null),
|
|
117
|
+
return (0, _react2.jsx)(_react.Fragment, null, (0, _react2.jsx)(ContainerWidthMonitor, null), (0, _react2.jsx)("div", {
|
|
118
|
+
css: elementItemsWrapper,
|
|
119
|
+
"data-testid": "element-items",
|
|
120
|
+
id: selectedCategory ? "browse-category-".concat(selectedCategory, "-tab") : 'browse-category-tab',
|
|
121
|
+
"aria-labelledby": selectedCategory ? "browse-category--".concat(selectedCategory, "-button") : 'browse-category-button',
|
|
122
|
+
role: "tabpanel",
|
|
123
|
+
tabIndex: items.length === 0 ? 0 : undefined
|
|
124
|
+
}, !items.length ? emptyStateHandler ? emptyStateHandler({
|
|
118
125
|
mode: mode,
|
|
119
126
|
selectedCategory: selectedCategory,
|
|
120
127
|
searchTerm: searchTerm
|
|
121
128
|
}) : (0, _react2.jsx)(_EmptyState.default, {
|
|
122
129
|
onExternalLinkClick: onExternalLinkClick
|
|
123
|
-
}) : (0, _react2.jsx)(
|
|
124
|
-
css: elementItemsWrapper,
|
|
125
|
-
"data-testid": "element-items"
|
|
126
|
-
}, (0, _react2.jsx)(_react.Fragment, null, containerWidth > 0 && (0, _react2.jsx)(_AutoSizer.AutoSizer, {
|
|
130
|
+
}) : (0, _react2.jsx)(_react.Fragment, null, containerWidth > 0 && (0, _react2.jsx)(_AutoSizer.AutoSizer, {
|
|
127
131
|
disableWidth: true
|
|
128
132
|
}, function (_ref3) {
|
|
129
133
|
var height = _ref3.height;
|
|
@@ -269,7 +273,7 @@ var elementItemWrapper = (0, _react2.css)({
|
|
|
269
273
|
button: {
|
|
270
274
|
height: '75px',
|
|
271
275
|
alignItems: 'flex-start',
|
|
272
|
-
padding: "var(--ds-space-150, 12px)"
|
|
276
|
+
padding: "var(--ds-space-150, 12px)".concat(" ", "var(--ds-space-150, 12px)", " 11px")
|
|
273
277
|
}
|
|
274
278
|
}
|
|
275
279
|
});
|
|
@@ -8,7 +8,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
10
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
11
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
12
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
13
12
|
var _react2 = require("@emotion/react");
|
|
14
13
|
var _reactIntlNext = require("react-intl-next");
|
|
@@ -21,25 +20,83 @@ var _ViewMore = require("../ViewMore");
|
|
|
21
20
|
var _CategoryList = _interopRequireDefault(require("./CategoryList"));
|
|
22
21
|
var _ElementList = _interopRequireDefault(require("./ElementList/ElementList"));
|
|
23
22
|
var _ElementSearch = _interopRequireDefault(require("./ElementSearch"));
|
|
24
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15;
|
|
25
|
-
/** @jsx jsx */
|
|
26
23
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
27
24
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
var
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
var
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
var
|
|
41
|
-
|
|
42
|
-
|
|
25
|
+
/** @jsx jsx */
|
|
26
|
+
|
|
27
|
+
var wrapper = (0, _react2.css)({
|
|
28
|
+
width: '100%',
|
|
29
|
+
maxHeight: 'inherit',
|
|
30
|
+
overflow: 'hidden'
|
|
31
|
+
});
|
|
32
|
+
var baseBrowserContainerStyles = (0, _react2.css)({
|
|
33
|
+
display: 'flex',
|
|
34
|
+
height: '100%',
|
|
35
|
+
minHeight: '-webkit-fill-available'
|
|
36
|
+
});
|
|
37
|
+
var mobileElementBrowserContainer = (0, _react2.css)(baseBrowserContainerStyles, {
|
|
38
|
+
flexDirection: 'column'
|
|
39
|
+
});
|
|
40
|
+
var elementBrowserContainer = (0, _react2.css)(baseBrowserContainerStyles, {
|
|
41
|
+
flexDirection: 'row'
|
|
42
|
+
});
|
|
43
|
+
var baseSidebarStyles = (0, _react2.css)({
|
|
44
|
+
display: 'flex',
|
|
45
|
+
flexDirection: 'column',
|
|
46
|
+
overflowX: 'auto',
|
|
47
|
+
overflowY: 'hidden'
|
|
48
|
+
});
|
|
49
|
+
var mobileSideBar = (0, _react2.css)(baseSidebarStyles, {
|
|
50
|
+
flex: "0 0 ".concat(_constants.INLINE_SIDEBAR_HEIGHT),
|
|
51
|
+
padding: "var(--ds-space-150, 12px)".concat(" ", "var(--ds-space-150, 12px)", " 0 ", "var(--ds-space-150, 12px)")
|
|
52
|
+
});
|
|
53
|
+
var mobileSideBarShowCategories = (0, _react2.css)({
|
|
54
|
+
flex: '0 0 auto'
|
|
55
|
+
});
|
|
56
|
+
var sideBar = (0, _react2.css)(baseSidebarStyles, {
|
|
57
|
+
flex: "0 0 'auto'"
|
|
58
|
+
});
|
|
59
|
+
var sideBarShowCategories = (0, _react2.css)(baseSidebarStyles, {
|
|
60
|
+
flex: "0 0 ".concat(_constants.SIDEBAR_WIDTH)
|
|
61
|
+
});
|
|
62
|
+
var sidebarHeading = (0, _react2.css)({
|
|
63
|
+
flex: "0 0 ".concat(_constants.SIDEBAR_HEADING_WRAPPER_HEIGHT),
|
|
64
|
+
display: 'inline-flex',
|
|
65
|
+
alignItems: 'center',
|
|
66
|
+
paddingLeft: "var(--ds-space-150, 12px)",
|
|
67
|
+
fontWeight: 700
|
|
68
|
+
});
|
|
69
|
+
var mobileMainContent = (0, _react2.css)({
|
|
70
|
+
flex: '1 1 auto',
|
|
71
|
+
display: 'flex',
|
|
72
|
+
flexDirection: 'column',
|
|
73
|
+
overflowY: 'auto',
|
|
74
|
+
height: '100%'
|
|
75
|
+
});
|
|
76
|
+
var mainContent = (0, _react2.css)(mobileMainContent, {
|
|
77
|
+
marginLeft: "var(--ds-space-200, 16px)",
|
|
78
|
+
height: 'auto'
|
|
79
|
+
});
|
|
80
|
+
var searchContainer = (0, _react2.css)({
|
|
81
|
+
paddingBottom: "var(--ds-space-200, 16px)"
|
|
82
|
+
});
|
|
83
|
+
var mobileCategoryListWrapper = (0, _react2.css)({
|
|
84
|
+
display: 'flex',
|
|
85
|
+
overflowX: 'auto',
|
|
86
|
+
padding: "var(--ds-space-200, 8px)".concat(" 0 ", "var(--ds-space-200, 16px)", " 0"),
|
|
87
|
+
minHeight: "".concat(_constants.GRID_SIZE * 4, "px"),
|
|
88
|
+
overflow: '-moz-scrollbars-none',
|
|
89
|
+
'::-webkit-scrollbar': {
|
|
90
|
+
display: 'none'
|
|
91
|
+
},
|
|
92
|
+
scrollbarWidth: 'none',
|
|
93
|
+
MsOverflowStyle: 'none'
|
|
94
|
+
});
|
|
95
|
+
var categoryListWrapper = (0, _react2.css)(mobileCategoryListWrapper, {
|
|
96
|
+
padding: 0,
|
|
97
|
+
marginTop: "var(--ds-space-200, 24px)",
|
|
98
|
+
flexDirection: 'column'
|
|
99
|
+
});
|
|
43
100
|
function StatelessElementBrowser(props) {
|
|
44
101
|
var items = props.items,
|
|
45
102
|
onSelectItem = props.onSelectItem,
|
|
@@ -225,12 +282,15 @@ function DesktopBrowser(_ref2) {
|
|
|
225
282
|
css: showCategories ? sideBarShowCategories : sideBar
|
|
226
283
|
}, (0, _react2.jsx)("h2", {
|
|
227
284
|
css: sidebarHeading,
|
|
228
|
-
"data-testid": "sidebar-heading"
|
|
285
|
+
"data-testid": "sidebar-heading",
|
|
286
|
+
id: "sidebar-heading"
|
|
229
287
|
}, (0, _react2.jsx)(_reactIntlNext.FormattedMessage, {
|
|
230
288
|
id: "fabric.editor.elementbrowser.sidebar.heading",
|
|
231
289
|
defaultMessage: "Browse",
|
|
232
290
|
description: "Sidebar heading"
|
|
233
291
|
})), (0, _react2.jsx)("nav", {
|
|
292
|
+
role: "tablist",
|
|
293
|
+
"aria-labelledby": "sidebar-heading",
|
|
234
294
|
css: categoryListWrapper
|
|
235
295
|
}, (0, _react2.jsx)(_CategoryList.default, {
|
|
236
296
|
categories: categories,
|
|
@@ -241,7 +301,9 @@ function DesktopBrowser(_ref2) {
|
|
|
241
301
|
css: mainContent,
|
|
242
302
|
onKeyDown: onKeyDown,
|
|
243
303
|
"data-testid": "main-content"
|
|
244
|
-
}, showSearch &&
|
|
304
|
+
}, showSearch &&
|
|
305
|
+
// eslint-disable-next-line
|
|
306
|
+
(0, _react2.jsx)("div", {
|
|
245
307
|
css: searchContainer
|
|
246
308
|
}, (0, _react2.jsx)(_ElementSearch.default, {
|
|
247
309
|
onSearch: onSearch,
|
|
@@ -165,19 +165,24 @@ var widthPluginKey = {
|
|
|
165
165
|
}
|
|
166
166
|
};
|
|
167
167
|
var ExtensionDeprecated = function ExtensionDeprecated(props) {
|
|
168
|
-
return (
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
168
|
+
return (
|
|
169
|
+
// @ts-ignore - 'WithPluginState' cannot be used as a JSX component.
|
|
170
|
+
// This error was introduced after upgrading to TypeScript 5
|
|
171
|
+
(0, _react2.jsx)(_withPluginState.WithPluginState, {
|
|
172
|
+
editorView: props.view,
|
|
173
|
+
plugins: {
|
|
174
|
+
widthState: widthPluginKey
|
|
175
|
+
},
|
|
176
|
+
render: function render(_ref) {
|
|
177
|
+
var widthState = _ref.widthState;
|
|
178
|
+
return (0, _react2.jsx)(ExtensionWithPluginState, (0, _extends2.default)({
|
|
179
|
+
widthState: widthState
|
|
180
|
+
}, props));
|
|
181
|
+
}
|
|
182
|
+
})
|
|
183
|
+
);
|
|
180
184
|
};
|
|
185
|
+
|
|
181
186
|
/**
|
|
182
187
|
* End workaround
|
|
183
188
|
*/
|
|
@@ -197,18 +197,22 @@ var widthPluginKey = {
|
|
|
197
197
|
}
|
|
198
198
|
};
|
|
199
199
|
var MultiBodiedExtensionDeprecated = function MultiBodiedExtensionDeprecated(props) {
|
|
200
|
-
return (
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
200
|
+
return (
|
|
201
|
+
// @ts-ignore - 'WithPluginState' cannot be used as a JSX component.
|
|
202
|
+
// This error was introduced after upgrading to TypeScript 5
|
|
203
|
+
(0, _react2.jsx)(_withPluginState.WithPluginState, {
|
|
204
|
+
editorView: props.editorView,
|
|
205
|
+
plugins: {
|
|
206
|
+
widthState: widthPluginKey
|
|
207
|
+
},
|
|
208
|
+
render: function render(_ref2) {
|
|
209
|
+
var widthState = _ref2.widthState;
|
|
210
|
+
return (0, _react2.jsx)(MultiBodiedExtensionWithWidth, (0, _extends2.default)({
|
|
211
|
+
widthState: widthState
|
|
212
|
+
}, props));
|
|
213
|
+
}
|
|
214
|
+
})
|
|
215
|
+
);
|
|
212
216
|
};
|
|
213
217
|
/**
|
|
214
218
|
* End workaround
|
|
@@ -109,6 +109,9 @@ function useSharedPluginState(injectionApi, plugins) {
|
|
|
109
109
|
return _objectSpread(_objectSpread({}, acc), {}, (0, _defineProperty2.default)({}, "".concat(pluginName, "State"), injectionApi === null || injectionApi === void 0 ? void 0 : injectionApi[pluginName]));
|
|
110
110
|
}, {});
|
|
111
111
|
}, [injectionApi, pluginNames]);
|
|
112
|
+
|
|
113
|
+
// @ts-expect-error - Type '`${K}State`' is not assignable to type '`${K}State`'. Two different types with this name exist, but they are unrelated.
|
|
114
|
+
// This error was introduced after upgrading to TypeScript 5
|
|
112
115
|
return useSharedPluginStateInternal(namedExternalPlugins);
|
|
113
116
|
}
|
|
114
117
|
function useSharedPluginStateInternal(externalPlugins) {
|
|
@@ -16,7 +16,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
|
|
|
16
16
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
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 = "78.
|
|
19
|
+
var packageVersion = "78.18.0";
|
|
20
20
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
21
21
|
// Remove URL as it has UGC
|
|
22
22
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -22,7 +22,7 @@ var _templateObject, _templateObject2, _templateObject3;
|
|
|
22
22
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
23
23
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /** @jsx jsx */
|
|
24
24
|
var packageName = "@atlaskit/editor-common";
|
|
25
|
-
var packageVersion = "78.
|
|
25
|
+
var packageVersion = "78.18.0";
|
|
26
26
|
var halfFocusRing = 1;
|
|
27
27
|
var dropOffset = '0, 8';
|
|
28
28
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -34,7 +34,6 @@ function CategoryListItem({
|
|
|
34
34
|
const ref = useFocus(focus);
|
|
35
35
|
const onClick = useCallback(() => {
|
|
36
36
|
onSelectCategory(category);
|
|
37
|
-
|
|
38
37
|
/**
|
|
39
38
|
* When user double clicks on same category, focus on first item.
|
|
40
39
|
*/
|
|
@@ -78,13 +77,18 @@ function CategoryListItem({
|
|
|
78
77
|
};
|
|
79
78
|
}, [category.name, selectedCategory]);
|
|
80
79
|
return jsx("div", {
|
|
81
|
-
css: buttonWrapper
|
|
80
|
+
css: buttonWrapper,
|
|
81
|
+
role: "presentation"
|
|
82
82
|
}, jsx(Button, {
|
|
83
83
|
appearance: "subtle",
|
|
84
84
|
isSelected: selectedCategory === category.name,
|
|
85
85
|
onClick: onClick,
|
|
86
86
|
onFocus: onFocus,
|
|
87
87
|
theme: getTheme,
|
|
88
|
+
role: "tab",
|
|
89
|
+
"aria-selected": selectedCategory === category.name ? 'true' : 'false',
|
|
90
|
+
"aria-controls": `browse-category-${category.name}-tab`,
|
|
91
|
+
id: `browse-category--${category.name}-button`,
|
|
88
92
|
ref: ref,
|
|
89
93
|
testId: "element-browser-category-item"
|
|
90
94
|
}, category.title));
|
|
@@ -98,16 +98,20 @@ function ElementList({
|
|
|
98
98
|
focus: focusedItemIndex === index
|
|
99
99
|
}, props)));
|
|
100
100
|
}, [items, fullMode, selectedItemIndex, focusedItemIndex, props]);
|
|
101
|
-
return jsx(Fragment, null, jsx(ContainerWidthMonitor, null),
|
|
101
|
+
return jsx(Fragment, null, jsx(ContainerWidthMonitor, null), jsx("div", {
|
|
102
|
+
css: elementItemsWrapper,
|
|
103
|
+
"data-testid": "element-items",
|
|
104
|
+
id: selectedCategory ? `browse-category-${selectedCategory}-tab` : 'browse-category-tab',
|
|
105
|
+
"aria-labelledby": selectedCategory ? `browse-category--${selectedCategory}-button` : 'browse-category-button',
|
|
106
|
+
role: "tabpanel",
|
|
107
|
+
tabIndex: items.length === 0 ? 0 : undefined
|
|
108
|
+
}, !items.length ? emptyStateHandler ? emptyStateHandler({
|
|
102
109
|
mode,
|
|
103
110
|
selectedCategory,
|
|
104
111
|
searchTerm
|
|
105
112
|
}) : jsx(EmptyState, {
|
|
106
113
|
onExternalLinkClick: onExternalLinkClick
|
|
107
|
-
}) : jsx(
|
|
108
|
-
css: elementItemsWrapper,
|
|
109
|
-
"data-testid": "element-items"
|
|
110
|
-
}, jsx(Fragment, null, containerWidth > 0 && jsx(AutoSizer, {
|
|
114
|
+
}) : jsx(Fragment, null, containerWidth > 0 && jsx(AutoSizer, {
|
|
111
115
|
disableWidth: true
|
|
112
116
|
}, ({
|
|
113
117
|
height
|
|
@@ -253,7 +257,7 @@ const elementItemWrapper = css({
|
|
|
253
257
|
button: {
|
|
254
258
|
height: '75px',
|
|
255
259
|
alignItems: 'flex-start',
|
|
256
|
-
padding: "var(--ds-space-150, 12px)"
|
|
260
|
+
padding: `${"var(--ds-space-150, 12px)"} ${"var(--ds-space-150, 12px)"} 11px`
|
|
257
261
|
}
|
|
258
262
|
}
|
|
259
263
|
});
|