@atlaskit/renderer 108.11.7 → 108.11.9

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,18 @@
1
1
  # @atlaskit/renderer
2
2
 
3
+ ## 108.11.9
4
+
5
+ ### Patch Changes
6
+
7
+ - [`3fa17b4c298`](https://bitbucket.org/atlassian/atlassian-frontend/commits/3fa17b4c298) - Update type definitions to conform to changes within `@types/react@16.14.15`.
8
+ - Updated dependencies
9
+
10
+ ## 108.11.8
11
+
12
+ ### Patch Changes
13
+
14
+ - [`33cb07de05f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/33cb07de05f) - change adf-schema to fixed versioning
15
+
3
16
  ## 108.11.7
4
17
 
5
18
  ### Patch Changes
@@ -16,7 +16,7 @@ var BodiedExtension = function BodiedExtension(props) {
16
16
  _props$path = props.path,
17
17
  path = _props$path === void 0 ? [] : _props$path;
18
18
  var removeOverflow = _react.default.Children.toArray(children).map(function (child) {
19
- return child.props.nodeType === 'table';
19
+ return /*#__PURE__*/_react.default.isValidElement(child) ? child.props.nodeType === 'table' : false;
20
20
  }).every(Boolean);
21
21
  return /*#__PURE__*/_react.default.createElement(_ExtensionRenderer.default, (0, _extends2.default)({}, props, {
22
22
  type: "bodiedExtension"
@@ -128,9 +128,12 @@ var MediaGroup = /*#__PURE__*/function (_PureComponent) {
128
128
  var _this$state = this.state,
129
129
  animate = _this$state.animate,
130
130
  offset = _this$state.offset;
131
- var surroundingItems = _react.default.Children.map(children, function (child) {
132
- return _this2.mapMediaPropsToIdentifier(child.props);
133
- }).filter(function (identifier) {
131
+ var childIdentifiers = _react.default.Children.map(children, function (child) {
132
+ if ( /*#__PURE__*/_react.default.isValidElement(child)) {
133
+ return _this2.mapMediaPropsToIdentifier(child.props);
134
+ }
135
+ });
136
+ var surroundingItems = (childIdentifiers || []).filter(function (identifier) {
134
137
  return !!identifier;
135
138
  });
136
139
  return /*#__PURE__*/_react.default.createElement(_mediaFilmstrip.FilmstripView, {
@@ -218,7 +218,7 @@ var TableContainer = /*#__PURE__*/function (_React$Component) {
218
218
  _this.stickyWrapperRef.current.scrollLeft = _this.wrapperRef.current.scrollLeft;
219
219
  });
220
220
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "grabFirstRowRef", function (children) {
221
- return _react.default.Children.map(children, function (child, idx) {
221
+ return _react.default.Children.map(children || false, function (child, idx) {
222
222
  if (idx === 0 && /*#__PURE__*/_react.default.isValidElement(child)) {
223
223
  return /*#__PURE__*/_react.default.cloneElement(child, {
224
224
  innerRef: _this.stickyHeaderRef
@@ -421,7 +421,9 @@ var TableProcessor = /*#__PURE__*/function (_React$Component2) {
421
421
  return null;
422
422
  }
423
423
  var childrenArray = _react.default.Children.toArray(children);
424
- var orderedChildren = (0, _utils.compose)(this.addNumberColumnIndexes, this.addSortableColumn)(childrenArray);
424
+ var orderedChildren = (0, _utils.compose)(this.addNumberColumnIndexes, this.addSortableColumn
425
+ // @ts-expect-error TS2345: Argument of type '(ReactChild | ReactFragment | ReactPortal)[]' is not assignable to parameter of type 'ReactElement<any, string | JSXElementConstructor<any>>[]'
426
+ )(childrenArray);
425
427
  return /*#__PURE__*/_react.default.createElement(TableContainer, this.props, orderedChildren);
426
428
  }
427
429
  }]);
@@ -55,7 +55,7 @@ exports.NORMAL_SEVERITY_THRESHOLD = NORMAL_SEVERITY_THRESHOLD;
55
55
  var DEGRADED_SEVERITY_THRESHOLD = 3000;
56
56
  exports.DEGRADED_SEVERITY_THRESHOLD = DEGRADED_SEVERITY_THRESHOLD;
57
57
  var packageName = "@atlaskit/renderer";
58
- var packageVersion = "108.11.7";
58
+ var packageVersion = "108.11.9";
59
59
  var Renderer = /*#__PURE__*/function (_PureComponent) {
60
60
  (0, _inherits2.default)(Renderer, _PureComponent);
61
61
  var _super = _createSuper(Renderer);
@@ -8,7 +8,7 @@ const BodiedExtension = props => {
8
8
  layout = 'default',
9
9
  path = []
10
10
  } = props;
11
- const removeOverflow = React.Children.toArray(children).map(child => child.props.nodeType === 'table').every(Boolean);
11
+ const removeOverflow = React.Children.toArray(children).map(child => /*#__PURE__*/React.isValidElement(child) ? child.props.nodeType === 'table' : false).every(Boolean);
12
12
  return /*#__PURE__*/React.createElement(ExtensionRenderer, _extends({}, props, {
13
13
  type: "bodiedExtension"
14
14
  }), ({
@@ -90,7 +90,12 @@ export default class MediaGroup extends PureComponent {
90
90
  animate,
91
91
  offset
92
92
  } = this.state;
93
- const surroundingItems = React.Children.map(children, child => this.mapMediaPropsToIdentifier(child.props)).filter(identifier => !!identifier);
93
+ const childIdentifiers = React.Children.map(children, child => {
94
+ if ( /*#__PURE__*/React.isValidElement(child)) {
95
+ return this.mapMediaPropsToIdentifier(child.props);
96
+ }
97
+ });
98
+ const surroundingItems = (childIdentifiers || []).filter(identifier => !!identifier);
94
99
  return /*#__PURE__*/React.createElement(FilmstripView, {
95
100
  animate: animate,
96
101
  offset: offset,
@@ -173,7 +173,7 @@ export class TableContainer extends React.Component {
173
173
  this.stickyWrapperRef.current.scrollLeft = this.wrapperRef.current.scrollLeft;
174
174
  });
175
175
  _defineProperty(this, "grabFirstRowRef", children => {
176
- return React.Children.map(children, (child, idx) => {
176
+ return React.Children.map(children || false, (child, idx) => {
177
177
  if (idx === 0 && /*#__PURE__*/React.isValidElement(child)) {
178
178
  return /*#__PURE__*/React.cloneElement(child, {
179
179
  innerRef: this.stickyHeaderRef
@@ -362,7 +362,9 @@ export class TableProcessor extends React.Component {
362
362
  return null;
363
363
  }
364
364
  let childrenArray = React.Children.toArray(children);
365
- const orderedChildren = compose(this.addNumberColumnIndexes, this.addSortableColumn)(childrenArray);
365
+ const orderedChildren = compose(this.addNumberColumnIndexes, this.addSortableColumn
366
+ // @ts-expect-error TS2345: Argument of type '(ReactChild | ReactFragment | ReactPortal)[]' is not assignable to parameter of type 'ReactElement<any, string | JSXElementConstructor<any>>[]'
367
+ )(childrenArray);
366
368
  return /*#__PURE__*/React.createElement(TableContainer, this.props, orderedChildren);
367
369
  }
368
370
  }
@@ -35,7 +35,7 @@ import { RenderTracking } from '../../react/utils/performance/RenderTracking';
35
35
  export const NORMAL_SEVERITY_THRESHOLD = 2000;
36
36
  export const DEGRADED_SEVERITY_THRESHOLD = 3000;
37
37
  const packageName = "@atlaskit/renderer";
38
- const packageVersion = "108.11.7";
38
+ const packageVersion = "108.11.9";
39
39
  export class Renderer extends PureComponent {
40
40
  constructor(props) {
41
41
  super(props);
@@ -9,7 +9,7 @@ var BodiedExtension = function BodiedExtension(props) {
9
9
  _props$path = props.path,
10
10
  path = _props$path === void 0 ? [] : _props$path;
11
11
  var removeOverflow = React.Children.toArray(children).map(function (child) {
12
- return child.props.nodeType === 'table';
12
+ return /*#__PURE__*/React.isValidElement(child) ? child.props.nodeType === 'table' : false;
13
13
  }).every(Boolean);
14
14
  return /*#__PURE__*/React.createElement(ExtensionRenderer, _extends({}, props, {
15
15
  type: "bodiedExtension"
@@ -119,9 +119,12 @@ var MediaGroup = /*#__PURE__*/function (_PureComponent) {
119
119
  var _this$state = this.state,
120
120
  animate = _this$state.animate,
121
121
  offset = _this$state.offset;
122
- var surroundingItems = React.Children.map(children, function (child) {
123
- return _this2.mapMediaPropsToIdentifier(child.props);
124
- }).filter(function (identifier) {
122
+ var childIdentifiers = React.Children.map(children, function (child) {
123
+ if ( /*#__PURE__*/React.isValidElement(child)) {
124
+ return _this2.mapMediaPropsToIdentifier(child.props);
125
+ }
126
+ });
127
+ var surroundingItems = (childIdentifiers || []).filter(function (identifier) {
125
128
  return !!identifier;
126
129
  });
127
130
  return /*#__PURE__*/React.createElement(FilmstripView, {
@@ -211,7 +211,7 @@ export var TableContainer = /*#__PURE__*/function (_React$Component) {
211
211
  _this.stickyWrapperRef.current.scrollLeft = _this.wrapperRef.current.scrollLeft;
212
212
  });
213
213
  _defineProperty(_assertThisInitialized(_this), "grabFirstRowRef", function (children) {
214
- return React.Children.map(children, function (child, idx) {
214
+ return React.Children.map(children || false, function (child, idx) {
215
215
  if (idx === 0 && /*#__PURE__*/React.isValidElement(child)) {
216
216
  return /*#__PURE__*/React.cloneElement(child, {
217
217
  innerRef: _this.stickyHeaderRef
@@ -413,7 +413,9 @@ export var TableProcessor = /*#__PURE__*/function (_React$Component2) {
413
413
  return null;
414
414
  }
415
415
  var childrenArray = React.Children.toArray(children);
416
- var orderedChildren = compose(this.addNumberColumnIndexes, this.addSortableColumn)(childrenArray);
416
+ var orderedChildren = compose(this.addNumberColumnIndexes, this.addSortableColumn
417
+ // @ts-expect-error TS2345: Argument of type '(ReactChild | ReactFragment | ReactPortal)[]' is not assignable to parameter of type 'ReactElement<any, string | JSXElementConstructor<any>>[]'
418
+ )(childrenArray);
417
419
  return /*#__PURE__*/React.createElement(TableContainer, this.props, orderedChildren);
418
420
  }
419
421
  }]);
@@ -45,7 +45,7 @@ import { RenderTracking } from '../../react/utils/performance/RenderTracking';
45
45
  export var NORMAL_SEVERITY_THRESHOLD = 2000;
46
46
  export var DEGRADED_SEVERITY_THRESHOLD = 3000;
47
47
  var packageName = "@atlaskit/renderer";
48
- var packageVersion = "108.11.7";
48
+ var packageVersion = "108.11.9";
49
49
  export var Renderer = /*#__PURE__*/function (_PureComponent) {
50
50
  _inherits(Renderer, _PureComponent);
51
51
  var _super = _createSuper(Renderer);
@@ -1,10 +1,10 @@
1
1
  import React from 'react';
2
- import { Mark as PMMark, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
3
- import { RendererContext } from '../types';
4
- import { Serializer } from '../..';
5
- import { ExtensionLayout } from '@atlaskit/adf-schema';
2
+ import type { Mark as PMMark, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
3
+ import type { RendererContext } from '../types';
4
+ import type { Serializer } from '../..';
5
+ import type { ExtensionLayout } from '@atlaskit/adf-schema';
6
6
  import type { ExtensionHandlers } from '@atlaskit/editor-common/extensions';
7
- import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
7
+ import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
8
8
  export interface Props {
9
9
  serializer: Serializer<any>;
10
10
  extensionHandlers?: ExtensionHandlers;
@@ -1,10 +1,11 @@
1
1
  import React from 'react';
2
- import { ReactElement, PureComponent } from 'react';
3
- import { CardEvent } from '@atlaskit/media-card';
2
+ import type { ReactElement } from 'react';
3
+ import { PureComponent } from 'react';
4
+ import type { CardEvent } from '@atlaskit/media-card';
4
5
  import type { EventHandlers, CardEventClickHandler } from '@atlaskit/editor-common/ui';
5
- import { Identifier } from '@atlaskit/media-client';
6
- import { MediaProps } from './media';
7
- import { MediaFeatureFlags } from '@atlaskit/media-common';
6
+ import type { Identifier } from '@atlaskit/media-client';
7
+ import type { MediaProps } from './media';
8
+ import type { MediaFeatureFlags } from '@atlaskit/media-common';
8
9
  export interface MediaGroupProps {
9
10
  children?: React.ReactNode;
10
11
  eventHandlers?: EventHandlers;
@@ -1,10 +1,10 @@
1
1
  import React from 'react';
2
- import { Mark as PMMark, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
3
- import { RendererContext } from '../types';
4
- import { Serializer } from '../..';
5
- import { ExtensionLayout } from '@atlaskit/adf-schema';
2
+ import type { Mark as PMMark, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
3
+ import type { RendererContext } from '../types';
4
+ import type { Serializer } from '../..';
5
+ import type { ExtensionLayout } from '@atlaskit/adf-schema';
6
6
  import type { ExtensionHandlers } from '@atlaskit/editor-common/extensions';
7
- import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
7
+ import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
8
8
  export interface Props {
9
9
  serializer: Serializer<any>;
10
10
  extensionHandlers?: ExtensionHandlers;
@@ -1,10 +1,11 @@
1
1
  import React from 'react';
2
- import { ReactElement, PureComponent } from 'react';
3
- import { CardEvent } from '@atlaskit/media-card';
2
+ import type { ReactElement } from 'react';
3
+ import { PureComponent } from 'react';
4
+ import type { CardEvent } from '@atlaskit/media-card';
4
5
  import type { EventHandlers, CardEventClickHandler } from '@atlaskit/editor-common/ui';
5
- import { Identifier } from '@atlaskit/media-client';
6
- import { MediaProps } from './media';
7
- import { MediaFeatureFlags } from '@atlaskit/media-common';
6
+ import type { Identifier } from '@atlaskit/media-client';
7
+ import type { MediaProps } from './media';
8
+ import type { MediaFeatureFlags } from '@atlaskit/media-common';
8
9
  export interface MediaGroupProps {
9
10
  children?: React.ReactNode;
10
11
  eventHandlers?: EventHandlers;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "108.11.7",
3
+ "version": "108.11.9",
4
4
  "description": "Renderer component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -24,14 +24,14 @@
24
24
  }
25
25
  },
26
26
  "dependencies": {
27
- "@atlaskit/adf-schema": "^28.1.0",
27
+ "@atlaskit/adf-schema": "28.1.2",
28
28
  "@atlaskit/adf-utils": "^19.0.0",
29
29
  "@atlaskit/analytics-listeners": "^8.7.0",
30
30
  "@atlaskit/analytics-namespaced-context": "^6.7.0",
31
31
  "@atlaskit/analytics-next": "^9.1.0",
32
32
  "@atlaskit/button": "^16.9.0",
33
33
  "@atlaskit/code": "^14.6.0",
34
- "@atlaskit/editor-common": "^74.49.0",
34
+ "@atlaskit/editor-common": "^74.51.0",
35
35
  "@atlaskit/editor-json-transformer": "^8.10.0",
36
36
  "@atlaskit/editor-palette": "1.5.1",
37
37
  "@atlaskit/editor-prosemirror": "1.1.0",
@@ -43,7 +43,7 @@
43
43
  "@atlaskit/media-client": "^23.1.0",
44
44
  "@atlaskit/media-common": "^8.0.0",
45
45
  "@atlaskit/media-filmstrip": "^47.0.0",
46
- "@atlaskit/media-ui": "^23.3.0",
46
+ "@atlaskit/media-ui": "^24.0.0",
47
47
  "@atlaskit/media-viewer": "^48.0.0",
48
48
  "@atlaskit/platform-feature-flags": "^0.2.0",
49
49
  "@atlaskit/smart-card": "^26.15.0",