@atlaskit/editor-common 103.16.0 → 103.17.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.
Files changed (43) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/cjs/element-browser/ElementBrowser.js +3 -1
  3. package/dist/cjs/element-browser/components/StatelessElementBrowser.js +11 -3
  4. package/dist/cjs/element-browser/components/ViewMore.compiled.css +11 -0
  5. package/dist/cjs/element-browser/components/ViewMore.js +51 -0
  6. package/dist/cjs/extensibility/Extension/Lozenge/ExtensionLabel.js +1 -1
  7. package/dist/cjs/extensions/messages.js +1 -1
  8. package/dist/cjs/media-inline/inline-image-wrapper.js +1 -1
  9. package/dist/cjs/messages/insert-block.js +6 -1
  10. package/dist/cjs/monitoring/error.js +1 -1
  11. package/dist/cjs/resizer/Resizer.js +3 -2
  12. package/dist/cjs/ui/DropList/index.js +1 -1
  13. package/dist/es2019/element-browser/ElementBrowser.js +3 -1
  14. package/dist/es2019/element-browser/components/StatelessElementBrowser.js +10 -2
  15. package/dist/es2019/element-browser/components/ViewMore.compiled.css +11 -0
  16. package/dist/es2019/element-browser/components/ViewMore.js +43 -0
  17. package/dist/es2019/extensibility/Extension/Lozenge/ExtensionLabel.js +1 -1
  18. package/dist/es2019/extensions/messages.js +1 -1
  19. package/dist/es2019/media-inline/inline-image-wrapper.js +1 -1
  20. package/dist/es2019/messages/insert-block.js +6 -1
  21. package/dist/es2019/monitoring/error.js +1 -1
  22. package/dist/es2019/resizer/Resizer.js +3 -2
  23. package/dist/es2019/ui/DropList/index.js +1 -1
  24. package/dist/esm/element-browser/ElementBrowser.js +3 -1
  25. package/dist/esm/element-browser/components/StatelessElementBrowser.js +10 -2
  26. package/dist/esm/element-browser/components/ViewMore.compiled.css +11 -0
  27. package/dist/esm/element-browser/components/ViewMore.js +41 -0
  28. package/dist/esm/extensibility/Extension/Lozenge/ExtensionLabel.js +1 -1
  29. package/dist/esm/extensions/messages.js +1 -1
  30. package/dist/esm/media-inline/inline-image-wrapper.js +1 -1
  31. package/dist/esm/messages/insert-block.js +6 -1
  32. package/dist/esm/monitoring/error.js +1 -1
  33. package/dist/esm/resizer/Resizer.js +3 -2
  34. package/dist/esm/ui/DropList/index.js +1 -1
  35. package/dist/types/element-browser/ElementBrowser.d.ts +7 -0
  36. package/dist/types/element-browser/components/StatelessElementBrowser.d.ts +14 -0
  37. package/dist/types/element-browser/components/ViewMore.d.ts +5 -0
  38. package/dist/types/messages/insert-block.d.ts +5 -0
  39. package/dist/types-ts4.5/element-browser/ElementBrowser.d.ts +7 -0
  40. package/dist/types-ts4.5/element-browser/components/StatelessElementBrowser.d.ts +14 -0
  41. package/dist/types-ts4.5/element-browser/components/ViewMore.d.ts +5 -0
  42. package/dist/types-ts4.5/messages/insert-block.d.ts +5 -0
  43. package/package.json +8 -5
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 103.17.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#142191](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/142191)
8
+ [`8a39e59bec14f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8a39e59bec14f) -
9
+ [ux] A11Y-9980: Refactored ViewMore button component to simplify usage, and updated icon and
10
+ styling alongside with adding support for aria-label.
11
+
12
+ ## 103.16.1
13
+
14
+ ### Patch Changes
15
+
16
+ - [#146038](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/146038)
17
+ [`3b0e0fffbbfe7`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3b0e0fffbbfe7) -
18
+ ED-27645 fix wide and full width label is overlapped by content below
19
+
3
20
  ## 103.16.0
4
21
 
5
22
  ### Minor Changes
@@ -121,6 +121,7 @@ var ElementBrowser = exports.default = /*#__PURE__*/function (_PureComponent) {
121
121
  mode = _this$props.mode,
122
122
  emptyStateHandler = _this$props.emptyStateHandler,
123
123
  viewMoreItem = _this$props.viewMoreItem,
124
+ onViewMore = _this$props.onViewMore,
124
125
  cache = _this$props.cache;
125
126
  var _this$state2 = this.state,
126
127
  categories = _this$state2.categories,
@@ -141,7 +142,8 @@ var ElementBrowser = exports.default = /*#__PURE__*/function (_PureComponent) {
141
142
  searchTerm: searchTerm,
142
143
  emptyStateHandler: emptyStateHandler,
143
144
  viewMoreItem: viewMoreItem,
144
- cache: cache
145
+ cache: cache,
146
+ onViewMore: onViewMore
145
147
  });
146
148
  }
147
149
  }]);
@@ -13,12 +13,14 @@ var _react2 = require("@emotion/react");
13
13
  var _reactIntlNext = require("react-intl-next");
14
14
  var _withAnalyticsContext = _interopRequireDefault(require("@atlaskit/analytics-next/withAnalyticsContext"));
15
15
  var _withAnalyticsEvents = _interopRequireDefault(require("@atlaskit/analytics-next/withAnalyticsEvents"));
16
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
16
17
  var _analytics = require("../../analytics");
17
18
  var _getEditorUgcToken = _interopRequireDefault(require("../../ugc-tokens/get-editor-ugc-token"));
19
+ var _ViewMore = require("../components/ViewMore");
18
20
  var _constants = require("../constants");
19
21
  var _useContainerWidth2 = _interopRequireDefault(require("../hooks/use-container-width"));
20
22
  var _useSelectAndFocusOnArrowNavigation = _interopRequireDefault(require("../hooks/use-select-and-focus-on-arrow-navigation"));
21
- var _ViewMore = require("../ViewMore");
23
+ var _ViewMore2 = require("../ViewMore");
22
24
  var _CategoryList = _interopRequireDefault(require("./CategoryList"));
23
25
  var _ElementList = _interopRequireDefault(require("./ElementList/ElementList"));
24
26
  var _ElementSearch = _interopRequireDefault(require("./ElementSearch"));
@@ -129,6 +131,7 @@ function StatelessElementBrowser(props) {
129
131
  onSelectItem = props.onSelectItem,
130
132
  onInsertItem = props.onInsertItem,
131
133
  viewMoreItem = props.viewMoreItem,
134
+ onViewMore = props.onViewMore,
132
135
  selectedCategory = props.selectedCategory,
133
136
  onSelectCategory = props.onSelectCategory,
134
137
  searchTerm = props.searchTerm,
@@ -160,7 +163,7 @@ function StatelessElementBrowser(props) {
160
163
  var _items$index$isDisabl, _items$index;
161
164
  return (_items$index$isDisabl = (_items$index = items[index]) === null || _items$index === void 0 ? void 0 : _items$index.isDisabled) !== null && _items$index$isDisabl !== void 0 ? _items$index$isDisabl : false;
162
165
  }, [items]);
163
- var _useSelectAndFocusOnA = (0, _useSelectAndFocusOnArrowNavigation.default)(items.length - 1, columnCount, !!viewMoreItem, itemIsDisabled, isFocusSearch),
166
+ var _useSelectAndFocusOnA = (0, _useSelectAndFocusOnArrowNavigation.default)(items.length - 1, columnCount, (0, _platformFeatureFlags.fg)('platform_editor_refactor_view_more') ? !!onViewMore : !!viewMoreItem, itemIsDisabled, isFocusSearch),
164
167
  selectedItemIndex = _useSelectAndFocusOnA.selectedItemIndex,
165
168
  focusedItemIndex = _useSelectAndFocusOnA.focusedItemIndex,
166
169
  setFocusedItemIndex = _useSelectAndFocusOnA.setFocusedItemIndex,
@@ -249,6 +252,7 @@ function StatelessElementBrowser(props) {
249
252
  onKeyPress: onItemsEnterTabKeyPress,
250
253
  onKeyDown: onKeyDown,
251
254
  viewMoreItem: viewMoreItem,
255
+ onViewMore: onViewMore,
252
256
  focusOnViewMore: focusOnViewMore,
253
257
  cache: cache
254
258
  })) : (0, _react2.jsx)(DesktopBrowser
@@ -297,6 +301,7 @@ function MobileBrowser(_ref) {
297
301
  createAnalyticsEvent = _ref.createAnalyticsEvent,
298
302
  emptyStateHandler = _ref.emptyStateHandler,
299
303
  viewMoreItem = _ref.viewMoreItem,
304
+ onViewMore = _ref.onViewMore,
300
305
  cache = _ref.cache;
301
306
  return (
302
307
  // eslint-disable-next-line jsx-a11y/no-static-element-interactions
@@ -342,7 +347,10 @@ function MobileBrowser(_ref) {
342
347
  selectedCategory: selectedCategory,
343
348
  searchTerm: searchTerm,
344
349
  cache: cache
345
- })), viewMoreItem && (0, _react2.jsx)(_ViewMore.ViewMore, {
350
+ })), onViewMore && (0, _platformFeatureFlags.fg)('platform_editor_refactor_view_more') && (0, _react2.jsx)(_ViewMore.ViewMore, {
351
+ onViewMore: onViewMore,
352
+ focus: focusOnViewMore
353
+ }), viewMoreItem && !(0, _platformFeatureFlags.fg)('platform_editor_refactor_view_more') && (0, _react2.jsx)(_ViewMore2.ViewMore, {
346
354
  item: viewMoreItem,
347
355
  focus: focusOnViewMore
348
356
  }))
@@ -0,0 +1,11 @@
1
+
2
+ ._zulputpp{gap:var(--ds-space-150,9pt)}._19bvv77o{padding-left:var(--ds-space-025,2px)}
3
+ ._1bah1h6o{justify-content:center}
4
+ ._1bsbzwfg{width:2pc}
5
+ ._1e0c1txw{display:flex}
6
+ ._2hwx1b66{margin-right:var(--ds-space-050,4px)}
7
+ ._4cvr1h6o{align-items:center}
8
+ ._4t3i1tcg{height:24px}
9
+ ._ca0qv77o{padding-top:var(--ds-space-025,2px)}
10
+ ._n3tdv77o{padding-bottom:var(--ds-space-025,2px)}
11
+ ._u5f3v77o{padding-right:var(--ds-space-025,2px)}
@@ -0,0 +1,51 @@
1
+ /* ViewMore.tsx generated by @compiled/babel-plugin v0.36.1 */
2
+ "use strict";
3
+
4
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
5
+ var _typeof = require("@babel/runtime/helpers/typeof");
6
+ Object.defineProperty(exports, "__esModule", {
7
+ value: true
8
+ });
9
+ exports.ViewMore = void 0;
10
+ require("./ViewMore.compiled.css");
11
+ var _react = _interopRequireWildcard(require("react"));
12
+ var React = _react;
13
+ var _runtime = require("@compiled/react/runtime");
14
+ var _reactIntlNext = require("react-intl-next");
15
+ var _showMoreHorizontal = _interopRequireDefault(require("@atlaskit/icon/core/show-more-horizontal"));
16
+ var _menu = require("@atlaskit/menu");
17
+ var _compiled = require("@atlaskit/primitives/compiled");
18
+ var _insertBlock = require("../../messages/insert-block");
19
+ 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); }
20
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
21
+ var styles = {
22
+ iconContainer: "_1e0c1txw _4cvr1h6o _1bah1h6o _1bsbzwfg _4t3i1tcg _2hwx1b66",
23
+ buttonContent: "_zulputpp _1e0c1txw _4cvr1h6o _ca0qv77o _u5f3v77o _n3tdv77o _19bvv77o"
24
+ };
25
+ var ViewMore = exports.ViewMore = function ViewMore(_ref) {
26
+ var onViewMore = _ref.onViewMore,
27
+ focus = _ref.focus;
28
+ var ref = (0, _react.useRef)(null);
29
+ var _useIntl = (0, _reactIntlNext.useIntl)(),
30
+ formatMessage = _useIntl.formatMessage;
31
+ (0, _react.useEffect)(function () {
32
+ if (ref.current && focus) {
33
+ ref.current.focus();
34
+ }
35
+ }, [focus]);
36
+ return /*#__PURE__*/React.createElement(_menu.Section, {
37
+ hasSeparator: true
38
+ }, /*#__PURE__*/React.createElement(_menu.ButtonItem, {
39
+ onClick: onViewMore,
40
+ "aria-label": formatMessage(_insertBlock.toolbarInsertBlockMessages.viewMoreAriaLabel),
41
+ "data-testid": "view-more-elements-item",
42
+ ref: ref
43
+ }, /*#__PURE__*/React.createElement("div", {
44
+ className: (0, _runtime.ax)([styles.buttonContent])
45
+ }, /*#__PURE__*/React.createElement("div", {
46
+ className: (0, _runtime.ax)([styles.iconContainer])
47
+ }, /*#__PURE__*/React.createElement(_showMoreHorizontal.default, {
48
+ label: "",
49
+ spacing: "spacious"
50
+ })), /*#__PURE__*/React.createElement(_compiled.Text, null, formatMessage(_insertBlock.toolbarInsertBlockMessages.viewMore)))));
51
+ };
@@ -151,7 +151,7 @@ var ExtensionLabel = exports.ExtensionLabel = function ExtensionLabel(_ref) {
151
151
  'hide-icon': isBodiedMacro && !isNodeHovered
152
152
  });
153
153
  return (
154
- // eslint-disable-next-line jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events
154
+ // eslint-disable-next-line jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events, @atlassian/a11y/interactive-element-not-keyboard-focusable
155
155
  (0, _react.jsx)("div", {
156
156
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
157
157
  css: containerStyles
@@ -43,7 +43,7 @@ var messages = exports.messages = (0, _reactIntlNext.defineMessages)({
43
43
  },
44
44
  panelLoadingError: {
45
45
  id: 'fabric.editor.extensions.config-panel.loading-error.non-final',
46
- defaultMessage: "We're having a bit of trouble loading the configuration panel. Try refreshing the page.",
46
+ defaultMessage: 'We ran into a bit of trouble. Refresh to try again.',
47
47
  description: 'Error message when loading the configuration panel'
48
48
  }
49
49
  });
@@ -36,7 +36,7 @@ var InlineImageWrapper = exports.InlineImageWrapper = function InlineImageWrappe
36
36
  var borderStyleVars = borderSize && borderColor ? (0, _defineProperty2.default)((0, _defineProperty2.default)({}, _styles.INLINE_IMAGE_BORDER_SIZE_CSS_VAR_KEY, borderSize), _styles.INLINE_IMAGE_BORDER_COLOR_CSS_VAR_KEY, (0, _editorPalette.hexToEditorBorderPaletteColor)(borderColor) || borderColor) : {};
37
37
  var aspectStyleVars = aspectRatio ? (0, _defineProperty2.default)({}, _styles.INLINE_IMAGE_ASPECT_RATIO_CSS_VAR_KEY, aspectRatio) : {};
38
38
  return (
39
- // eslint-disable-next-line @atlaskit/design-system/prefer-primitives, jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
39
+ // eslint-disable-next-line @atlaskit/design-system/prefer-primitives, jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions, @atlassian/a11y/interactive-element-not-keyboard-focusable
40
40
  (0, _react.jsx)("span", (0, _extends2.default)({
41
41
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
42
42
  style: _objectSpread(_objectSpread({}, borderStyleVars), aspectStyleVars)
@@ -199,7 +199,12 @@ var toolbarInsertBlockMessages = exports.toolbarInsertBlockMessages = (0, _react
199
199
  viewMore: {
200
200
  id: 'fabric.editor.viewMore',
201
201
  defaultMessage: 'View more',
202
- description: ''
202
+ description: 'View more elements that can be inserted'
203
+ },
204
+ viewMoreAriaLabel: {
205
+ id: 'fabric.editor.viewMoreAriaLabel',
206
+ defaultMessage: 'View all elements',
207
+ description: 'A more descriptive aria label describing that users can view all the elements to be inserted.'
203
208
  },
204
209
  insertMenu: {
205
210
  id: 'fabric.editor.insertMenu',
@@ -17,7 +17,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
17
17
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
18
18
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
19
19
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
20
- var packageVersion = "103.16.0";
20
+ var packageVersion = "103.17.0";
21
21
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
22
22
  // Remove URL as it has UGC
23
23
  // Ignored via go/ees007
@@ -24,13 +24,14 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
24
24
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
25
25
  var resizerLabelStyles = (0, _primitives.xcss)({
26
26
  position: 'absolute',
27
- bottom: "var(--ds-space-negative-400, -32px)",
27
+ bottom: "var(--ds-space-0, 0)",
28
28
  width: '100%',
29
29
  overflow: 'visible',
30
30
  display: 'flex',
31
31
  justifyContent: 'center',
32
32
  alignItems: 'center',
33
- height: "var(--ds-space-0, 0px)"
33
+ height: "var(--ds-space-0, 0px)",
34
+ zIndex: 'layer' // 400 same z-index as the floating toolbar
34
35
  });
35
36
  var SUPPORTED_HANDLES = ['left', 'right'];
36
37
  var inheritedCSS = {
@@ -23,7 +23,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
23
23
  * @jsx jsx
24
24
  */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
25
25
  var packageName = "@atlaskit/editor-common";
26
- var packageVersion = "103.16.0";
26
+ var packageVersion = "103.17.0";
27
27
  var halfFocusRing = 1;
28
28
  var dropOffset = '0, 8';
29
29
  // Ignored via go/ees005
@@ -89,6 +89,7 @@ export default class ElementBrowser extends PureComponent {
89
89
  mode,
90
90
  emptyStateHandler,
91
91
  viewMoreItem,
92
+ onViewMore,
92
93
  cache
93
94
  } = this.props;
94
95
  const {
@@ -111,7 +112,8 @@ export default class ElementBrowser extends PureComponent {
111
112
  searchTerm: searchTerm,
112
113
  emptyStateHandler: emptyStateHandler,
113
114
  viewMoreItem: viewMoreItem,
114
- cache: cache
115
+ cache: cache,
116
+ onViewMore: onViewMore
115
117
  });
116
118
  }
117
119
  }
@@ -10,8 +10,10 @@ import { css, jsx } from '@emotion/react';
10
10
  import { FormattedMessage } from 'react-intl-next';
11
11
  import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext';
12
12
  import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
13
+ import { fg } from '@atlaskit/platform-feature-flags';
13
14
  import { ACTION, ACTION_SUBJECT, EVENT_TYPE, fireAnalyticsEvent } from '../../analytics';
14
15
  import editorUGCToken from '../../ugc-tokens/get-editor-ugc-token';
16
+ import { ViewMore as ViewMoreNext } from '../components/ViewMore';
15
17
  import { DEVICE_BREAKPOINT_NUMBERS, ELEMENT_BROWSER_ID, GRID_SIZE, INLINE_SIDEBAR_HEIGHT, SIDEBAR_HEADING_WRAPPER_HEIGHT, SIDEBAR_WIDTH } from '../constants';
16
18
  import useContainerWidth from '../hooks/use-container-width';
17
19
  import useSelectAndFocusOnArrowNavigation from '../hooks/use-select-and-focus-on-arrow-navigation';
@@ -118,6 +120,7 @@ function StatelessElementBrowser(props) {
118
120
  onSelectItem,
119
121
  onInsertItem,
120
122
  viewMoreItem,
123
+ onViewMore,
121
124
  selectedCategory,
122
125
  onSelectCategory,
123
126
  searchTerm,
@@ -158,7 +161,7 @@ function StatelessElementBrowser(props) {
158
161
  focusOnViewMore,
159
162
  onKeyDown,
160
163
  setFocusOnSearch
161
- } = useSelectAndFocusOnArrowNavigation(items.length - 1, columnCount, !!viewMoreItem, itemIsDisabled, isFocusSearch);
164
+ } = useSelectAndFocusOnArrowNavigation(items.length - 1, columnCount, fg('platform_editor_refactor_view_more') ? !!onViewMore : !!viewMoreItem, itemIsDisabled, isFocusSearch);
162
165
  useEffect(() => {
163
166
  fireAnalyticsEvent(props.createAnalyticsEvent)({
164
167
  payload: {
@@ -238,6 +241,7 @@ function StatelessElementBrowser(props) {
238
241
  onKeyPress: onItemsEnterTabKeyPress,
239
242
  onKeyDown: onKeyDown,
240
243
  viewMoreItem: viewMoreItem,
244
+ onViewMore: onViewMore,
241
245
  focusOnViewMore: focusOnViewMore,
242
246
  cache: cache
243
247
  })) : jsx(DesktopBrowser
@@ -286,6 +290,7 @@ function MobileBrowser({
286
290
  createAnalyticsEvent,
287
291
  emptyStateHandler,
288
292
  viewMoreItem,
293
+ onViewMore,
289
294
  cache
290
295
  }) {
291
296
  return (
@@ -332,7 +337,10 @@ function MobileBrowser({
332
337
  selectedCategory: selectedCategory,
333
338
  searchTerm: searchTerm,
334
339
  cache: cache
335
- })), viewMoreItem && jsx(ViewMore, {
340
+ })), onViewMore && fg('platform_editor_refactor_view_more') && jsx(ViewMoreNext, {
341
+ onViewMore: onViewMore,
342
+ focus: focusOnViewMore
343
+ }), viewMoreItem && !fg('platform_editor_refactor_view_more') && jsx(ViewMore, {
336
344
  item: viewMoreItem,
337
345
  focus: focusOnViewMore
338
346
  }))
@@ -0,0 +1,11 @@
1
+
2
+ ._zulputpp{gap:var(--ds-space-150,9pt)}._19bvv77o{padding-left:var(--ds-space-025,2px)}
3
+ ._1bah1h6o{justify-content:center}
4
+ ._1bsbzwfg{width:2pc}
5
+ ._1e0c1txw{display:flex}
6
+ ._2hwx1b66{margin-right:var(--ds-space-050,4px)}
7
+ ._4cvr1h6o{align-items:center}
8
+ ._4t3i1tcg{height:24px}
9
+ ._ca0qv77o{padding-top:var(--ds-space-025,2px)}
10
+ ._n3tdv77o{padding-bottom:var(--ds-space-025,2px)}
11
+ ._u5f3v77o{padding-right:var(--ds-space-025,2px)}
@@ -0,0 +1,43 @@
1
+ /* ViewMore.tsx generated by @compiled/babel-plugin v0.36.1 */
2
+ import "./ViewMore.compiled.css";
3
+ import * as React from 'react';
4
+ import { ax, ix } from "@compiled/react/runtime";
5
+ import { useEffect, useRef } from 'react';
6
+ import { useIntl } from 'react-intl-next';
7
+ import ShowMoreHorizontalIcon from '@atlaskit/icon/core/show-more-horizontal';
8
+ import { ButtonItem, Section } from '@atlaskit/menu';
9
+ import { Text } from '@atlaskit/primitives/compiled';
10
+ import { toolbarInsertBlockMessages } from '../../messages/insert-block';
11
+ const styles = {
12
+ iconContainer: "_1e0c1txw _4cvr1h6o _1bah1h6o _1bsbzwfg _4t3i1tcg _2hwx1b66",
13
+ buttonContent: "_zulputpp _1e0c1txw _4cvr1h6o _ca0qv77o _u5f3v77o _n3tdv77o _19bvv77o"
14
+ };
15
+ export const ViewMore = ({
16
+ onViewMore,
17
+ focus
18
+ }) => {
19
+ const ref = useRef(null);
20
+ const {
21
+ formatMessage
22
+ } = useIntl();
23
+ useEffect(() => {
24
+ if (ref.current && focus) {
25
+ ref.current.focus();
26
+ }
27
+ }, [focus]);
28
+ return /*#__PURE__*/React.createElement(Section, {
29
+ hasSeparator: true
30
+ }, /*#__PURE__*/React.createElement(ButtonItem, {
31
+ onClick: onViewMore,
32
+ "aria-label": formatMessage(toolbarInsertBlockMessages.viewMoreAriaLabel),
33
+ "data-testid": "view-more-elements-item",
34
+ ref: ref
35
+ }, /*#__PURE__*/React.createElement("div", {
36
+ className: ax([styles.buttonContent])
37
+ }, /*#__PURE__*/React.createElement("div", {
38
+ className: ax([styles.iconContainer])
39
+ }, /*#__PURE__*/React.createElement(ShowMoreHorizontalIcon, {
40
+ label: "",
41
+ spacing: "spacious"
42
+ })), /*#__PURE__*/React.createElement(Text, null, formatMessage(toolbarInsertBlockMessages.viewMore)))));
43
+ };
@@ -144,7 +144,7 @@ export const ExtensionLabel = ({
144
144
  'hide-icon': isBodiedMacro && !isNodeHovered
145
145
  });
146
146
  return (
147
- // eslint-disable-next-line jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events
147
+ // eslint-disable-next-line jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events, @atlassian/a11y/interactive-element-not-keyboard-focusable
148
148
  jsx("div", {
149
149
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
150
150
  css: containerStyles
@@ -37,7 +37,7 @@ export const messages = defineMessages({
37
37
  },
38
38
  panelLoadingError: {
39
39
  id: 'fabric.editor.extensions.config-panel.loading-error.non-final',
40
- defaultMessage: "We're having a bit of trouble loading the configuration panel. Try refreshing the page.",
40
+ defaultMessage: 'We ran into a bit of trouble. Refresh to try again.',
41
41
  description: 'Error message when loading the configuration panel'
42
42
  }
43
43
  });
@@ -35,7 +35,7 @@ export const InlineImageWrapper = ({
35
35
  [INLINE_IMAGE_ASPECT_RATIO_CSS_VAR_KEY]: aspectRatio
36
36
  } : {};
37
37
  return (
38
- // eslint-disable-next-line @atlaskit/design-system/prefer-primitives, jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
38
+ // eslint-disable-next-line @atlaskit/design-system/prefer-primitives, jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions, @atlassian/a11y/interactive-element-not-keyboard-focusable
39
39
  jsx("span", _extends({
40
40
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
41
41
  style: {
@@ -193,7 +193,12 @@ export const toolbarInsertBlockMessages = defineMessages({
193
193
  viewMore: {
194
194
  id: 'fabric.editor.viewMore',
195
195
  defaultMessage: 'View more',
196
- description: ''
196
+ description: 'View more elements that can be inserted'
197
+ },
198
+ viewMoreAriaLabel: {
199
+ id: 'fabric.editor.viewMoreAriaLabel',
200
+ defaultMessage: 'View all elements',
201
+ description: 'A more descriptive aria label describing that users can view all the elements to be inserted.'
197
202
  },
198
203
  insertMenu: {
199
204
  id: 'fabric.editor.insertMenu',
@@ -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 = "103.16.0";
4
+ const packageVersion = "103.17.0";
5
5
  const sanitiseSentryEvents = (data, _hint) => {
6
6
  // Remove URL as it has UGC
7
7
  // Ignored via go/ees007
@@ -8,13 +8,14 @@ import Tooltip from '@atlaskit/tooltip';
8
8
  import { handleWrapperClass, resizerDangerClassName, resizerExtendedZone, resizerHandleClassName, resizerHandleThumbClassName, resizerHandleTrackClassName, resizerHandleZIndex, resizerHoverZoneClassName, resizerItemClassName } from '../styles/shared/resizer';
9
9
  const resizerLabelStyles = xcss({
10
10
  position: 'absolute',
11
- bottom: "var(--ds-space-negative-400, -32px)",
11
+ bottom: "var(--ds-space-0, 0)",
12
12
  width: '100%',
13
13
  overflow: 'visible',
14
14
  display: 'flex',
15
15
  justifyContent: 'center',
16
16
  alignItems: 'center',
17
- height: "var(--ds-space-0, 0px)"
17
+ height: "var(--ds-space-0, 0px)",
18
+ zIndex: 'layer' // 400 same z-index as the floating toolbar
18
19
  });
19
20
  const SUPPORTED_HANDLES = ['left', 'right'];
20
21
  const inheritedCSS = {
@@ -13,7 +13,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
13
13
  import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
14
14
  import Layer from '../Layer';
15
15
  const packageName = "@atlaskit/editor-common";
16
- const packageVersion = "103.16.0";
16
+ const packageVersion = "103.17.0";
17
17
  const halfFocusRing = 1;
18
18
  const dropOffset = '0, 8';
19
19
  // Ignored via go/ees005
@@ -111,6 +111,7 @@ var ElementBrowser = /*#__PURE__*/function (_PureComponent) {
111
111
  mode = _this$props.mode,
112
112
  emptyStateHandler = _this$props.emptyStateHandler,
113
113
  viewMoreItem = _this$props.viewMoreItem,
114
+ onViewMore = _this$props.onViewMore,
114
115
  cache = _this$props.cache;
115
116
  var _this$state2 = this.state,
116
117
  categories = _this$state2.categories,
@@ -131,7 +132,8 @@ var ElementBrowser = /*#__PURE__*/function (_PureComponent) {
131
132
  searchTerm: searchTerm,
132
133
  emptyStateHandler: emptyStateHandler,
133
134
  viewMoreItem: viewMoreItem,
134
- cache: cache
135
+ cache: cache,
136
+ onViewMore: onViewMore
135
137
  });
136
138
  }
137
139
  }]);
@@ -11,8 +11,10 @@ import { css, jsx } from '@emotion/react';
11
11
  import { FormattedMessage } from 'react-intl-next';
12
12
  import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext';
13
13
  import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
14
+ import { fg } from '@atlaskit/platform-feature-flags';
14
15
  import { ACTION, ACTION_SUBJECT, EVENT_TYPE, fireAnalyticsEvent } from '../../analytics';
15
16
  import editorUGCToken from '../../ugc-tokens/get-editor-ugc-token';
17
+ import { ViewMore as ViewMoreNext } from '../components/ViewMore';
16
18
  import { DEVICE_BREAKPOINT_NUMBERS, ELEMENT_BROWSER_ID, GRID_SIZE, INLINE_SIDEBAR_HEIGHT, SIDEBAR_HEADING_WRAPPER_HEIGHT, SIDEBAR_WIDTH } from '../constants';
17
19
  import useContainerWidth from '../hooks/use-container-width';
18
20
  import useSelectAndFocusOnArrowNavigation from '../hooks/use-select-and-focus-on-arrow-navigation';
@@ -118,6 +120,7 @@ function StatelessElementBrowser(props) {
118
120
  onSelectItem = props.onSelectItem,
119
121
  onInsertItem = props.onInsertItem,
120
122
  viewMoreItem = props.viewMoreItem,
123
+ onViewMore = props.onViewMore,
121
124
  selectedCategory = props.selectedCategory,
122
125
  onSelectCategory = props.onSelectCategory,
123
126
  searchTerm = props.searchTerm,
@@ -149,7 +152,7 @@ function StatelessElementBrowser(props) {
149
152
  var _items$index$isDisabl, _items$index;
150
153
  return (_items$index$isDisabl = (_items$index = items[index]) === null || _items$index === void 0 ? void 0 : _items$index.isDisabled) !== null && _items$index$isDisabl !== void 0 ? _items$index$isDisabl : false;
151
154
  }, [items]);
152
- var _useSelectAndFocusOnA = useSelectAndFocusOnArrowNavigation(items.length - 1, columnCount, !!viewMoreItem, itemIsDisabled, isFocusSearch),
155
+ var _useSelectAndFocusOnA = useSelectAndFocusOnArrowNavigation(items.length - 1, columnCount, fg('platform_editor_refactor_view_more') ? !!onViewMore : !!viewMoreItem, itemIsDisabled, isFocusSearch),
153
156
  selectedItemIndex = _useSelectAndFocusOnA.selectedItemIndex,
154
157
  focusedItemIndex = _useSelectAndFocusOnA.focusedItemIndex,
155
158
  setFocusedItemIndex = _useSelectAndFocusOnA.setFocusedItemIndex,
@@ -238,6 +241,7 @@ function StatelessElementBrowser(props) {
238
241
  onKeyPress: onItemsEnterTabKeyPress,
239
242
  onKeyDown: onKeyDown,
240
243
  viewMoreItem: viewMoreItem,
244
+ onViewMore: onViewMore,
241
245
  focusOnViewMore: focusOnViewMore,
242
246
  cache: cache
243
247
  })) : jsx(DesktopBrowser
@@ -286,6 +290,7 @@ function MobileBrowser(_ref) {
286
290
  createAnalyticsEvent = _ref.createAnalyticsEvent,
287
291
  emptyStateHandler = _ref.emptyStateHandler,
288
292
  viewMoreItem = _ref.viewMoreItem,
293
+ onViewMore = _ref.onViewMore,
289
294
  cache = _ref.cache;
290
295
  return (
291
296
  // eslint-disable-next-line jsx-a11y/no-static-element-interactions
@@ -331,7 +336,10 @@ function MobileBrowser(_ref) {
331
336
  selectedCategory: selectedCategory,
332
337
  searchTerm: searchTerm,
333
338
  cache: cache
334
- })), viewMoreItem && jsx(ViewMore, {
339
+ })), onViewMore && fg('platform_editor_refactor_view_more') && jsx(ViewMoreNext, {
340
+ onViewMore: onViewMore,
341
+ focus: focusOnViewMore
342
+ }), viewMoreItem && !fg('platform_editor_refactor_view_more') && jsx(ViewMore, {
335
343
  item: viewMoreItem,
336
344
  focus: focusOnViewMore
337
345
  }))
@@ -0,0 +1,11 @@
1
+
2
+ ._zulputpp{gap:var(--ds-space-150,9pt)}._19bvv77o{padding-left:var(--ds-space-025,2px)}
3
+ ._1bah1h6o{justify-content:center}
4
+ ._1bsbzwfg{width:2pc}
5
+ ._1e0c1txw{display:flex}
6
+ ._2hwx1b66{margin-right:var(--ds-space-050,4px)}
7
+ ._4cvr1h6o{align-items:center}
8
+ ._4t3i1tcg{height:24px}
9
+ ._ca0qv77o{padding-top:var(--ds-space-025,2px)}
10
+ ._n3tdv77o{padding-bottom:var(--ds-space-025,2px)}
11
+ ._u5f3v77o{padding-right:var(--ds-space-025,2px)}
@@ -0,0 +1,41 @@
1
+ /* ViewMore.tsx generated by @compiled/babel-plugin v0.36.1 */
2
+ import "./ViewMore.compiled.css";
3
+ import * as React from 'react';
4
+ import { ax, ix } from "@compiled/react/runtime";
5
+ import { useEffect, useRef } from 'react';
6
+ import { useIntl } from 'react-intl-next';
7
+ import ShowMoreHorizontalIcon from '@atlaskit/icon/core/show-more-horizontal';
8
+ import { ButtonItem, Section } from '@atlaskit/menu';
9
+ import { Text } from '@atlaskit/primitives/compiled';
10
+ import { toolbarInsertBlockMessages } from '../../messages/insert-block';
11
+ var styles = {
12
+ iconContainer: "_1e0c1txw _4cvr1h6o _1bah1h6o _1bsbzwfg _4t3i1tcg _2hwx1b66",
13
+ buttonContent: "_zulputpp _1e0c1txw _4cvr1h6o _ca0qv77o _u5f3v77o _n3tdv77o _19bvv77o"
14
+ };
15
+ export var ViewMore = function ViewMore(_ref) {
16
+ var onViewMore = _ref.onViewMore,
17
+ focus = _ref.focus;
18
+ var ref = useRef(null);
19
+ var _useIntl = useIntl(),
20
+ formatMessage = _useIntl.formatMessage;
21
+ useEffect(function () {
22
+ if (ref.current && focus) {
23
+ ref.current.focus();
24
+ }
25
+ }, [focus]);
26
+ return /*#__PURE__*/React.createElement(Section, {
27
+ hasSeparator: true
28
+ }, /*#__PURE__*/React.createElement(ButtonItem, {
29
+ onClick: onViewMore,
30
+ "aria-label": formatMessage(toolbarInsertBlockMessages.viewMoreAriaLabel),
31
+ "data-testid": "view-more-elements-item",
32
+ ref: ref
33
+ }, /*#__PURE__*/React.createElement("div", {
34
+ className: ax([styles.buttonContent])
35
+ }, /*#__PURE__*/React.createElement("div", {
36
+ className: ax([styles.iconContainer])
37
+ }, /*#__PURE__*/React.createElement(ShowMoreHorizontalIcon, {
38
+ label: "",
39
+ spacing: "spacious"
40
+ })), /*#__PURE__*/React.createElement(Text, null, formatMessage(toolbarInsertBlockMessages.viewMore)))));
41
+ };
@@ -143,7 +143,7 @@ export var ExtensionLabel = function ExtensionLabel(_ref) {
143
143
  'hide-icon': isBodiedMacro && !isNodeHovered
144
144
  });
145
145
  return (
146
- // eslint-disable-next-line jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events
146
+ // eslint-disable-next-line jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events, @atlassian/a11y/interactive-element-not-keyboard-focusable
147
147
  jsx("div", {
148
148
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
149
149
  css: containerStyles
@@ -37,7 +37,7 @@ export var messages = defineMessages({
37
37
  },
38
38
  panelLoadingError: {
39
39
  id: 'fabric.editor.extensions.config-panel.loading-error.non-final',
40
- defaultMessage: "We're having a bit of trouble loading the configuration panel. Try refreshing the page.",
40
+ defaultMessage: 'We ran into a bit of trouble. Refresh to try again.',
41
41
  description: 'Error message when loading the configuration panel'
42
42
  }
43
43
  });
@@ -33,7 +33,7 @@ export var InlineImageWrapper = function InlineImageWrapper(_ref) {
33
33
  var borderStyleVars = borderSize && borderColor ? _defineProperty(_defineProperty({}, INLINE_IMAGE_BORDER_SIZE_CSS_VAR_KEY, borderSize), INLINE_IMAGE_BORDER_COLOR_CSS_VAR_KEY, hexToEditorBorderPaletteColor(borderColor) || borderColor) : {};
34
34
  var aspectStyleVars = aspectRatio ? _defineProperty({}, INLINE_IMAGE_ASPECT_RATIO_CSS_VAR_KEY, aspectRatio) : {};
35
35
  return (
36
- // eslint-disable-next-line @atlaskit/design-system/prefer-primitives, jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
36
+ // eslint-disable-next-line @atlaskit/design-system/prefer-primitives, jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions, @atlassian/a11y/interactive-element-not-keyboard-focusable
37
37
  jsx("span", _extends({
38
38
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
39
39
  style: _objectSpread(_objectSpread({}, borderStyleVars), aspectStyleVars)
@@ -193,7 +193,12 @@ export var toolbarInsertBlockMessages = defineMessages({
193
193
  viewMore: {
194
194
  id: 'fabric.editor.viewMore',
195
195
  defaultMessage: 'View more',
196
- description: ''
196
+ description: 'View more elements that can be inserted'
197
+ },
198
+ viewMoreAriaLabel: {
199
+ id: 'fabric.editor.viewMoreAriaLabel',
200
+ defaultMessage: 'View all elements',
201
+ description: 'A more descriptive aria label describing that users can view all the elements to be inserted.'
197
202
  },
198
203
  insertMenu: {
199
204
  id: 'fabric.editor.insertMenu',
@@ -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 = "103.16.0";
10
+ var packageVersion = "103.17.0";
11
11
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
12
12
  // Remove URL as it has UGC
13
13
  // Ignored via go/ees007
@@ -14,13 +14,14 @@ import Tooltip from '@atlaskit/tooltip';
14
14
  import { handleWrapperClass, resizerDangerClassName, resizerExtendedZone, resizerHandleClassName, resizerHandleThumbClassName, resizerHandleTrackClassName, resizerHandleZIndex, resizerHoverZoneClassName, resizerItemClassName } from '../styles/shared/resizer';
15
15
  var resizerLabelStyles = xcss({
16
16
  position: 'absolute',
17
- bottom: "var(--ds-space-negative-400, -32px)",
17
+ bottom: "var(--ds-space-0, 0)",
18
18
  width: '100%',
19
19
  overflow: 'visible',
20
20
  display: 'flex',
21
21
  justifyContent: 'center',
22
22
  alignItems: 'center',
23
- height: "var(--ds-space-0, 0px)"
23
+ height: "var(--ds-space-0, 0px)",
24
+ zIndex: 'layer' // 400 same z-index as the floating toolbar
24
25
  });
25
26
  var SUPPORTED_HANDLES = ['left', 'right'];
26
27
  var inheritedCSS = {
@@ -20,7 +20,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
20
20
  import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
21
21
  import Layer from '../Layer';
22
22
  var packageName = "@atlaskit/editor-common";
23
- var packageVersion = "103.16.0";
23
+ var packageVersion = "103.17.0";
24
24
  var halfFocusRing = 1;
25
25
  var dropOffset = '0, 8';
26
26
  // Ignored via go/ees005
@@ -13,7 +13,14 @@ export interface Props {
13
13
  showCategories: boolean;
14
14
  defaultCategory?: string;
15
15
  emptyStateHandler?: EmptyStateHandler;
16
+ /**
17
+ * @private
18
+ * @deprecated
19
+ * Deprecated in favour of onViewMore
20
+ * Please clean up viewMoreItem when cleaning up platform_editor_refactor_view_more
21
+ */
16
22
  viewMoreItem?: QuickInsertItem;
23
+ onViewMore?: () => void;
17
24
  cache?: CellMeasurerCache;
18
25
  }
19
26
  export interface State {
@@ -21,7 +21,14 @@ export type StatelessElementBrowserProps = {
21
21
  mode: keyof typeof Modes;
22
22
  searchTerm?: string;
23
23
  emptyStateHandler?: EmptyStateHandler;
24
+ /**
25
+ * @private
26
+ * @deprecated
27
+ * Deprecated in favour of onViewMore
28
+ * Please clean up viewMoreItem when cleaning up platform_editor_refactor_view_more
29
+ */
24
30
  viewMoreItem?: QuickInsertItem;
31
+ onViewMore?: () => void;
25
32
  cache?: CellMeasurerCache;
26
33
  } & WithAnalyticsEventsProps;
27
34
  declare const MemoizedElementBrowser: React.MemoExoticComponent<React.ForwardRefExoticComponent<Omit<Omit<{
@@ -37,7 +44,14 @@ declare const MemoizedElementBrowser: React.MemoExoticComponent<React.ForwardRef
37
44
  mode: keyof typeof Modes;
38
45
  searchTerm?: string | undefined;
39
46
  emptyStateHandler?: EmptyStateHandler | undefined;
47
+ /**
48
+ * @private
49
+ * @deprecated
50
+ * Deprecated in favour of onViewMore
51
+ * Please clean up viewMoreItem when cleaning up platform_editor_refactor_view_more
52
+ */
40
53
  viewMoreItem?: QuickInsertItem | undefined;
54
+ onViewMore?: (() => void) | undefined;
41
55
  cache?: CellMeasurerCache | undefined;
42
56
  }, keyof WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "ref"> & React.RefAttributes<any>>>;
43
57
  export default MemoizedElementBrowser;
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ export declare const ViewMore: ({ onViewMore, focus }: {
3
+ focus: boolean;
4
+ onViewMore: () => void;
5
+ }) => JSX.Element;
@@ -194,6 +194,11 @@ export declare const toolbarInsertBlockMessages: {
194
194
  defaultMessage: string;
195
195
  description: string;
196
196
  };
197
+ viewMoreAriaLabel: {
198
+ id: string;
199
+ defaultMessage: string;
200
+ description: string;
201
+ };
197
202
  insertMenu: {
198
203
  id: string;
199
204
  defaultMessage: string;
@@ -13,7 +13,14 @@ export interface Props {
13
13
  showCategories: boolean;
14
14
  defaultCategory?: string;
15
15
  emptyStateHandler?: EmptyStateHandler;
16
+ /**
17
+ * @private
18
+ * @deprecated
19
+ * Deprecated in favour of onViewMore
20
+ * Please clean up viewMoreItem when cleaning up platform_editor_refactor_view_more
21
+ */
16
22
  viewMoreItem?: QuickInsertItem;
23
+ onViewMore?: () => void;
17
24
  cache?: CellMeasurerCache;
18
25
  }
19
26
  export interface State {
@@ -21,7 +21,14 @@ export type StatelessElementBrowserProps = {
21
21
  mode: keyof typeof Modes;
22
22
  searchTerm?: string;
23
23
  emptyStateHandler?: EmptyStateHandler;
24
+ /**
25
+ * @private
26
+ * @deprecated
27
+ * Deprecated in favour of onViewMore
28
+ * Please clean up viewMoreItem when cleaning up platform_editor_refactor_view_more
29
+ */
24
30
  viewMoreItem?: QuickInsertItem;
31
+ onViewMore?: () => void;
25
32
  cache?: CellMeasurerCache;
26
33
  } & WithAnalyticsEventsProps;
27
34
  declare const MemoizedElementBrowser: React.MemoExoticComponent<React.ForwardRefExoticComponent<Omit<Omit<{
@@ -37,7 +44,14 @@ declare const MemoizedElementBrowser: React.MemoExoticComponent<React.ForwardRef
37
44
  mode: keyof typeof Modes;
38
45
  searchTerm?: string | undefined;
39
46
  emptyStateHandler?: EmptyStateHandler | undefined;
47
+ /**
48
+ * @private
49
+ * @deprecated
50
+ * Deprecated in favour of onViewMore
51
+ * Please clean up viewMoreItem when cleaning up platform_editor_refactor_view_more
52
+ */
40
53
  viewMoreItem?: QuickInsertItem | undefined;
54
+ onViewMore?: (() => void) | undefined;
41
55
  cache?: CellMeasurerCache | undefined;
42
56
  }, keyof WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "ref"> & React.RefAttributes<any>>>;
43
57
  export default MemoizedElementBrowser;
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ export declare const ViewMore: ({ onViewMore, focus }: {
3
+ focus: boolean;
4
+ onViewMore: () => void;
5
+ }) => JSX.Element;
@@ -194,6 +194,11 @@ export declare const toolbarInsertBlockMessages: {
194
194
  defaultMessage: string;
195
195
  description: string;
196
196
  };
197
+ viewMoreAriaLabel: {
198
+ id: string;
199
+ defaultMessage: string;
200
+ description: string;
201
+ };
197
202
  insertMenu: {
198
203
  id: string;
199
204
  defaultMessage: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "103.16.0",
3
+ "version": "103.17.0",
4
4
  "description": "A package that contains common classes and components for editor and renderer",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -139,7 +139,7 @@
139
139
  "@atlaskit/emoji": "^69.1.0",
140
140
  "@atlaskit/icon": "^25.6.0",
141
141
  "@atlaskit/icon-object": "^7.1.0",
142
- "@atlaskit/link-datasource": "^4.6.0",
142
+ "@atlaskit/link-datasource": "^4.8.0",
143
143
  "@atlaskit/link-picker": "^3.2.0",
144
144
  "@atlaskit/media-card": "^79.2.0",
145
145
  "@atlaskit/media-client": "^32.0.0",
@@ -157,7 +157,7 @@
157
157
  "@atlaskit/primitives": "^14.4.0",
158
158
  "@atlaskit/profilecard": "^23.8.0",
159
159
  "@atlaskit/section-message": "^8.2.0",
160
- "@atlaskit/smart-card": "^36.9.0",
160
+ "@atlaskit/smart-card": "^36.10.0",
161
161
  "@atlaskit/smart-user-picker": "^8.0.0",
162
162
  "@atlaskit/spinner": "^18.0.0",
163
163
  "@atlaskit/task-decision": "^19.1.0",
@@ -201,11 +201,11 @@
201
201
  "react-intl-next": "npm:react-intl@^5.18.1"
202
202
  },
203
203
  "devDependencies": {
204
- "@af/visual-regression": "^1.3.0",
204
+ "@af/visual-regression": "workspace:^",
205
205
  "@atlaskit/media-core": "^35.0.0",
206
206
  "@atlaskit/media-test-helpers": "^35.0.0",
207
207
  "@atlaskit/util-data-test": "^18.0.0",
208
- "@atlaskit/visual-regression": "^0.10.0",
208
+ "@atlaskit/visual-regression": "workspace:^",
209
209
  "@testing-library/dom": "^10.1.0",
210
210
  "@testing-library/jest-dom": "^6.4.5",
211
211
  "@testing-library/react": "^13.4.0",
@@ -351,6 +351,9 @@
351
351
  },
352
352
  "platform_editor_hyperlink_underline": {
353
353
  "type": "boolean"
354
+ },
355
+ "platform_editor_refactor_view_more": {
356
+ "type": "boolean"
354
357
  }
355
358
  }
356
359
  }