@atlaskit/editor-plugin-type-ahead 6.2.0 → 6.3.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 CHANGED
@@ -1,5 +1,13 @@
1
1
  # @atlaskit/editor-plugin-type-ahead
2
2
 
3
+ ## 6.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`2cfe444a49320`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/2cfe444a49320) -
8
+ [https://product-fabric.atlassian.net/browse/ED-29474](ED-29474) - bump react-virtualized version
9
+ to 9.22.6
10
+
3
11
  ## 6.2.0
4
12
 
5
13
  ### Minor Changes
@@ -4,7 +4,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.ListRow = ListRow;
7
+ exports.ListRow = void 0;
8
8
  var _react = _interopRequireWildcard(require("react"));
9
9
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
10
10
  /**
@@ -20,9 +20,9 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
20
20
  * @param root0.onMouseMove
21
21
  * @example
22
22
  */
23
- function ListRow(_ref) {
23
+ // The `CellMeasurer` component from react-virtualized expects that his children is a `forwardRef` component.
24
+ var ListRow = exports.ListRow = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
24
25
  var children = _ref.children,
25
- registerChild = _ref.registerChild,
26
26
  measure = _ref.measure,
27
27
  index = _ref.index,
28
28
  style = _ref.style,
@@ -30,9 +30,6 @@ function ListRow(_ref) {
30
30
  isScrolling = _ref.isScrolling,
31
31
  onMouseMove = _ref.onMouseMove;
32
32
  var childElementRef = (0, _react.useRef)(null);
33
- var setListElementRef = function setListElementRef(element) {
34
- registerChild === null || registerChild === void 0 || registerChild(element !== null && element !== void 0 ? element : undefined);
35
- };
36
33
  (0, _react.useEffect)(function () {
37
34
  // Do not measure if the row is not visible or is scrolling for performance reasons.
38
35
  if (!childElementRef.current || !isVisible || isScrolling) {
@@ -50,7 +47,7 @@ function ListRow(_ref) {
50
47
  /*#__PURE__*/
51
48
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
52
49
  _react.default.createElement("div", {
53
- ref: setListElementRef,
50
+ ref: ref,
54
51
  style: style,
55
52
  "data-index": index
56
53
  }, /*#__PURE__*/_react.default.createElement("div", {
@@ -59,4 +56,4 @@ function ListRow(_ref) {
59
56
  onMouseMove: onMouseMove
60
57
  }, children))
61
58
  );
62
- }
59
+ });
@@ -297,10 +297,8 @@ var TypeAheadListComponent = /*#__PURE__*/_react.default.memo(function (_ref2) {
297
297
  columnIndex: 0,
298
298
  rowIndex: index
299
299
  }, function (_ref6) {
300
- var measure = _ref6.measure,
301
- registerChild = _ref6.registerChild;
300
+ var measure = _ref6.measure;
302
301
  return (0, _react2.jsx)(_ListRow.ListRow, {
303
- registerChild: registerChild,
304
302
  measure: measure,
305
303
  index: index
306
304
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
@@ -1,4 +1,4 @@
1
- import React, { useEffect, useRef } from 'react';
1
+ import React, { useEffect, useRef, forwardRef } from 'react';
2
2
  /**
3
3
  *
4
4
  * @param root0
@@ -12,20 +12,17 @@ import React, { useEffect, useRef } from 'react';
12
12
  * @param root0.onMouseMove
13
13
  * @example
14
14
  */
15
- export function ListRow({
15
+ // The `CellMeasurer` component from react-virtualized expects that his children is a `forwardRef` component.
16
+ export const ListRow = /*#__PURE__*/forwardRef(({
16
17
  children,
17
- registerChild,
18
18
  measure,
19
19
  index,
20
20
  style,
21
21
  isVisible,
22
22
  isScrolling,
23
23
  onMouseMove
24
- }) {
24
+ }, ref) => {
25
25
  const childElementRef = useRef(null);
26
- const setListElementRef = element => {
27
- registerChild === null || registerChild === void 0 ? void 0 : registerChild(element !== null && element !== void 0 ? element : undefined);
28
- };
29
26
  useEffect(() => {
30
27
  // Do not measure if the row is not visible or is scrolling for performance reasons.
31
28
  if (!childElementRef.current || !isVisible || isScrolling) {
@@ -39,7 +36,7 @@ export function ListRow({
39
36
  /*#__PURE__*/
40
37
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
41
38
  React.createElement("div", {
42
- ref: setListElementRef,
39
+ ref: ref,
43
40
  style: style,
44
41
  "data-index": index
45
42
  }, /*#__PURE__*/React.createElement("div", {
@@ -48,4 +45,4 @@ export function ListRow({
48
45
  onMouseMove: onMouseMove
49
46
  }, children))
50
47
  );
51
- }
48
+ });
@@ -280,10 +280,8 @@ const TypeAheadListComponent = /*#__PURE__*/React.memo(({
280
280
  columnIndex: 0,
281
281
  rowIndex: index
282
282
  }, ({
283
- measure,
284
- registerChild
283
+ measure
285
284
  }) => jsx(ListRow, {
286
- registerChild: registerChild,
287
285
  measure: measure,
288
286
  index: index
289
287
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
@@ -1,4 +1,4 @@
1
- import React, { useEffect, useRef } from 'react';
1
+ import React, { useEffect, useRef, forwardRef } from 'react';
2
2
  /**
3
3
  *
4
4
  * @param root0
@@ -12,9 +12,9 @@ import React, { useEffect, useRef } from 'react';
12
12
  * @param root0.onMouseMove
13
13
  * @example
14
14
  */
15
- export function ListRow(_ref) {
15
+ // The `CellMeasurer` component from react-virtualized expects that his children is a `forwardRef` component.
16
+ export var ListRow = /*#__PURE__*/forwardRef(function (_ref, ref) {
16
17
  var children = _ref.children,
17
- registerChild = _ref.registerChild,
18
18
  measure = _ref.measure,
19
19
  index = _ref.index,
20
20
  style = _ref.style,
@@ -22,9 +22,6 @@ export function ListRow(_ref) {
22
22
  isScrolling = _ref.isScrolling,
23
23
  onMouseMove = _ref.onMouseMove;
24
24
  var childElementRef = useRef(null);
25
- var setListElementRef = function setListElementRef(element) {
26
- registerChild === null || registerChild === void 0 || registerChild(element !== null && element !== void 0 ? element : undefined);
27
- };
28
25
  useEffect(function () {
29
26
  // Do not measure if the row is not visible or is scrolling for performance reasons.
30
27
  if (!childElementRef.current || !isVisible || isScrolling) {
@@ -42,7 +39,7 @@ export function ListRow(_ref) {
42
39
  /*#__PURE__*/
43
40
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
44
41
  React.createElement("div", {
45
- ref: setListElementRef,
42
+ ref: ref,
46
43
  style: style,
47
44
  "data-index": index
48
45
  }, /*#__PURE__*/React.createElement("div", {
@@ -51,4 +48,4 @@ export function ListRow(_ref) {
51
48
  onMouseMove: onMouseMove
52
49
  }, children))
53
50
  );
54
- }
51
+ });
@@ -288,10 +288,8 @@ var TypeAheadListComponent = /*#__PURE__*/React.memo(function (_ref2) {
288
288
  columnIndex: 0,
289
289
  rowIndex: index
290
290
  }, function (_ref6) {
291
- var measure = _ref6.measure,
292
- registerChild = _ref6.registerChild;
291
+ var measure = _ref6.measure;
293
292
  return jsx(ListRow, {
294
- registerChild: registerChild,
295
293
  measure: measure,
296
294
  index: index
297
295
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
@@ -1,11 +1,5 @@
1
1
  import React, { type ReactNode, type MouseEventHandler } from 'react';
2
2
  import { type ListRowProps } from 'react-virtualized';
3
- type Props = {
4
- children: ReactNode;
5
- measure: () => void;
6
- onMouseMove: MouseEventHandler<HTMLDivElement>;
7
- registerChild?: (element?: Element) => void;
8
- } & Pick<ListRowProps, 'index' | 'style' | 'isScrolling' | 'isVisible'>;
9
3
  /**
10
4
  *
11
5
  * @param root0
@@ -19,5 +13,8 @@ type Props = {
19
13
  * @param root0.onMouseMove
20
14
  * @example
21
15
  */
22
- export declare function ListRow({ children, registerChild, measure, index, style, isVisible, isScrolling, onMouseMove, }: Props): React.JSX.Element;
23
- export {};
16
+ export declare const ListRow: React.ForwardRefExoticComponent<{
17
+ children: ReactNode;
18
+ measure: () => void;
19
+ onMouseMove: MouseEventHandler<HTMLDivElement>;
20
+ } & Pick<ListRowProps, "index" | "style" | "isScrolling" | "isVisible"> & React.RefAttributes<HTMLDivElement>>;
@@ -1,11 +1,5 @@
1
1
  import React, { type ReactNode, type MouseEventHandler } from 'react';
2
2
  import { type ListRowProps } from 'react-virtualized';
3
- type Props = {
4
- children: ReactNode;
5
- measure: () => void;
6
- onMouseMove: MouseEventHandler<HTMLDivElement>;
7
- registerChild?: (element?: Element) => void;
8
- } & Pick<ListRowProps, 'index' | 'style' | 'isScrolling' | 'isVisible'>;
9
3
  /**
10
4
  *
11
5
  * @param root0
@@ -19,5 +13,8 @@ type Props = {
19
13
  * @param root0.onMouseMove
20
14
  * @example
21
15
  */
22
- export declare function ListRow({ children, registerChild, measure, index, style, isVisible, isScrolling, onMouseMove, }: Props): React.JSX.Element;
23
- export {};
16
+ export declare const ListRow: React.ForwardRefExoticComponent<{
17
+ children: ReactNode;
18
+ measure: () => void;
19
+ onMouseMove: MouseEventHandler<HTMLDivElement>;
20
+ } & Pick<ListRowProps, "index" | "style" | "isScrolling" | "isVisible"> & React.RefAttributes<HTMLDivElement>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-type-ahead",
3
- "version": "6.2.0",
3
+ "version": "6.3.0",
4
4
  "description": "Type-ahead plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -38,25 +38,25 @@
38
38
  "@atlaskit/editor-prosemirror": "7.0.0",
39
39
  "@atlaskit/editor-shared-styles": "^3.6.0",
40
40
  "@atlaskit/heading": "^5.2.0",
41
- "@atlaskit/icon": "^28.3.0",
41
+ "@atlaskit/icon": "^28.4.0",
42
42
  "@atlaskit/insm": "^0.1.0",
43
43
  "@atlaskit/menu": "^8.4.0",
44
44
  "@atlaskit/platform-feature-flags": "^1.1.0",
45
45
  "@atlaskit/primitives": "^14.15.0",
46
46
  "@atlaskit/prosemirror-input-rules": "^3.4.0",
47
47
  "@atlaskit/theme": "^21.0.0",
48
- "@atlaskit/tmp-editor-statsig": "^13.2.0",
48
+ "@atlaskit/tmp-editor-statsig": "^13.4.0",
49
49
  "@atlaskit/tokens": "^6.4.0",
50
50
  "@babel/runtime": "^7.0.0",
51
51
  "@emotion/react": "^11.7.1",
52
52
  "lodash": "^4.17.21",
53
53
  "raf-schd": "^4.0.3",
54
- "react-virtualized": "^9.8.0",
54
+ "react-virtualized": "^9.22.6",
55
55
  "uuid": "^3.1.0",
56
56
  "w3c-keyname": "^2.1.8"
57
57
  },
58
58
  "peerDependencies": {
59
- "@atlaskit/editor-common": "^110.4.0",
59
+ "@atlaskit/editor-common": "^110.7.0",
60
60
  "react": "^18.2.0",
61
61
  "react-dom": "^18.2.0",
62
62
  "react-intl-next": "npm:react-intl@^5.18.1"