@atlaskit/renderer 142.1.2 → 142.1.4

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,19 @@
1
1
  # @atlaskit/renderer
2
2
 
3
+ ## 142.1.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [`8d2356cce3c68`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8d2356cce3c68) -
8
+ Clean up feature gate `platform_renderer_table_row_functional`. The renderer table row is now
9
+ always rendered by the functional component and the legacy class component has been removed.
10
+
11
+ ## 142.1.3
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies
16
+
3
17
  ## 142.1.2
4
18
 
5
19
  ### Patch Changes
@@ -5,94 +5,10 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.default = TableRow;
8
- var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
9
- var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
10
- var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
11
- var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
12
- var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
13
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
14
8
  var _react = _interopRequireDefault(require("react"));
15
9
  var _types = require("@atlaskit/editor-common/types");
16
- var _utils = require("@atlaskit/editor-common/utils");
17
- var _fg = require("@atlaskit/platform-feature-flags/fg");
18
10
  var _consts = require("../../consts");
19
- function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
20
- function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
21
- // Ignored via go/ees005
22
- // eslint-disable-next-line @repo/internal/react/no-class-components
23
- var TableRowLegacy = /*#__PURE__*/function (_React$Component) {
24
- function TableRowLegacy() {
25
- var _this;
26
- (0, _classCallCheck2.default)(this, TableRowLegacy);
27
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
28
- args[_key] = arguments[_key];
29
- }
30
- _this = _callSuper(this, TableRowLegacy, [].concat(args));
31
- (0, _defineProperty2.default)(_this, "state", {
32
- colGroupWidths: []
33
- });
34
- (0, _defineProperty2.default)(_this, "addSortableColumn", function (childrenArray) {
35
- var _this$props = _this.props,
36
- allowColumnSorting = _this$props.allowColumnSorting,
37
- rowIndex = _this$props.index;
38
- var isHeaderRow = !rowIndex;
39
- if (allowColumnSorting && isHeaderRow) {
40
- childrenArray = childrenArray.map(function (child, index) {
41
- if ( /*#__PURE__*/_react.default.isValidElement(child)) {
42
- var tableOrderStatus = _this.props.tableOrderStatus;
43
- var sortOrdered = _types.SortOrder.NO_ORDER;
44
- if (tableOrderStatus) {
45
- sortOrdered = index === tableOrderStatus.columnIndex ? tableOrderStatus.order : _types.SortOrder.NO_ORDER;
46
- }
47
- return /*#__PURE__*/_react.default.cloneElement(child, {
48
- columnIndex: index,
49
- onSorting: _this.props.onSorting,
50
- sortOrdered: sortOrdered,
51
- isHeaderRow: isHeaderRow
52
- });
53
- }
54
- });
55
- }
56
- return childrenArray;
57
- });
58
- (0, _defineProperty2.default)(_this, "addColGroupWidth", function (childrenArray) {
59
- var _this$state$colGroupW;
60
- if ((_this$state$colGroupW = _this.state.colGroupWidths) !== null && _this$state$colGroupW !== void 0 && _this$state$colGroupW.length) {
61
- childrenArray = childrenArray.map(function (child, index) {
62
- if ( /*#__PURE__*/_react.default.isValidElement(child)) {
63
- return /*#__PURE__*/_react.default.cloneElement(child, {
64
- colGroupWidth: _this.state.colGroupWidths[index]
65
- });
66
- }
67
- });
68
- }
69
- return childrenArray;
70
- });
71
- return _this;
72
- }
73
- (0, _inherits2.default)(TableRowLegacy, _React$Component);
74
- return (0, _createClass2.default)(TableRowLegacy, [{
75
- key: "render",
76
- value: function render() {
77
- var _this$props2 = this.props,
78
- children = _this$props2.children,
79
- innerRef = _this$props2.innerRef,
80
- isFirstRow = _this$props2.isFirstRow,
81
- isLastRow = _this$props2.isLastRow;
82
- var childrenArray = _react.default.Children.toArray(children);
83
- return /*#__PURE__*/_react.default.createElement("tr", {
84
- ref: innerRef
85
- }, this.props.isNumberColumnEnabled && /*#__PURE__*/_react.default.createElement("td", {
86
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
87
- className: _consts.RendererCssClassName.NUMBER_COLUMN,
88
- "data-reaches-left": true,
89
- "data-reaches-top": isFirstRow || undefined,
90
- "data-reaches-bottom": isLastRow || undefined
91
- }, this.props.index), (0, _utils.compose)(this.addSortableColumn, this.addColGroupWidth)(childrenArray));
92
- }
93
- }]);
94
- }(_react.default.Component);
95
- function TableRowFunctional(_ref) {
11
+ function TableRow(_ref) {
96
12
  var allowColumnSorting = _ref.allowColumnSorting,
97
13
  children = _ref.children,
98
14
  index = _ref.index,
@@ -123,8 +39,4 @@ function TableRowFunctional(_ref) {
123
39
  "data-reaches-top": isFirstRow || undefined,
124
40
  "data-reaches-bottom": isLastRow || undefined
125
41
  }, index), cells);
126
- }
127
- function TableRow(props) {
128
- var Component = (0, _fg.fg)('platform_renderer_table_row_functional') ? TableRowFunctional : TableRowLegacy;
129
- return /*#__PURE__*/_react.default.createElement(Component, props);
130
42
  }
@@ -71,7 +71,7 @@ var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
71
71
  var TABLE_INFO_TIMEOUT = 10000;
72
72
  var RENDER_EVENT_SAMPLE_RATE = 0.1;
73
73
  var packageName = "@atlaskit/renderer";
74
- var packageVersion = "142.1.1";
74
+ var packageVersion = "142.1.3";
75
75
  var setAsQueryContainerStyles = (0, _react2.css)({
76
76
  containerName: 'ak-renderer-wrapper',
77
77
  containerType: 'inline-size'
@@ -1,78 +1,7 @@
1
- import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
1
  import React from 'react';
3
2
  import { SortOrder } from '@atlaskit/editor-common/types';
4
- import { compose } from '@atlaskit/editor-common/utils';
5
- import { fg } from '@atlaskit/platform-feature-flags/fg';
6
3
  import { RendererCssClassName } from '../../consts';
7
- // Ignored via go/ees005
8
- // eslint-disable-next-line @repo/internal/react/no-class-components
9
- class TableRowLegacy extends React.Component {
10
- constructor(...args) {
11
- super(...args);
12
- _defineProperty(this, "state", {
13
- colGroupWidths: []
14
- });
15
- _defineProperty(this, "addSortableColumn", childrenArray => {
16
- const {
17
- allowColumnSorting,
18
- index: rowIndex
19
- } = this.props;
20
- const isHeaderRow = !rowIndex;
21
- if (allowColumnSorting && isHeaderRow) {
22
- childrenArray = childrenArray.map((child, index) => {
23
- if ( /*#__PURE__*/React.isValidElement(child)) {
24
- const {
25
- tableOrderStatus
26
- } = this.props;
27
- let sortOrdered = SortOrder.NO_ORDER;
28
- if (tableOrderStatus) {
29
- sortOrdered = index === tableOrderStatus.columnIndex ? tableOrderStatus.order : SortOrder.NO_ORDER;
30
- }
31
- return /*#__PURE__*/React.cloneElement(child, {
32
- columnIndex: index,
33
- onSorting: this.props.onSorting,
34
- sortOrdered,
35
- isHeaderRow
36
- });
37
- }
38
- });
39
- }
40
- return childrenArray;
41
- });
42
- _defineProperty(this, "addColGroupWidth", childrenArray => {
43
- var _this$state$colGroupW;
44
- if ((_this$state$colGroupW = this.state.colGroupWidths) !== null && _this$state$colGroupW !== void 0 && _this$state$colGroupW.length) {
45
- childrenArray = childrenArray.map((child, index) => {
46
- if ( /*#__PURE__*/React.isValidElement(child)) {
47
- return /*#__PURE__*/React.cloneElement(child, {
48
- colGroupWidth: this.state.colGroupWidths[index]
49
- });
50
- }
51
- });
52
- }
53
- return childrenArray;
54
- });
55
- }
56
- render() {
57
- const {
58
- children,
59
- innerRef,
60
- isFirstRow,
61
- isLastRow
62
- } = this.props;
63
- const childrenArray = React.Children.toArray(children);
64
- return /*#__PURE__*/React.createElement("tr", {
65
- ref: innerRef
66
- }, this.props.isNumberColumnEnabled && /*#__PURE__*/React.createElement("td", {
67
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
68
- className: RendererCssClassName.NUMBER_COLUMN,
69
- "data-reaches-left": true,
70
- "data-reaches-top": isFirstRow || undefined,
71
- "data-reaches-bottom": isLastRow || undefined
72
- }, this.props.index), compose(this.addSortableColumn, this.addColGroupWidth)(childrenArray));
73
- }
74
- }
75
- function TableRowFunctional({
4
+ export default function TableRow({
76
5
  allowColumnSorting,
77
6
  children,
78
7
  index,
@@ -104,8 +33,4 @@ function TableRowFunctional({
104
33
  "data-reaches-top": isFirstRow || undefined,
105
34
  "data-reaches-bottom": isLastRow || undefined
106
35
  }, index), cells);
107
- }
108
- export default function TableRow(props) {
109
- const Component = fg('platform_renderer_table_row_functional') ? TableRowFunctional : TableRowLegacy;
110
- return /*#__PURE__*/React.createElement(Component, props);
111
36
  }
@@ -56,7 +56,7 @@ export const DEGRADED_SEVERITY_THRESHOLD = 3000;
56
56
  const TABLE_INFO_TIMEOUT = 10000;
57
57
  const RENDER_EVENT_SAMPLE_RATE = 0.1;
58
58
  const packageName = "@atlaskit/renderer";
59
- const packageVersion = "142.1.1";
59
+ const packageVersion = "142.1.3";
60
60
  const setAsQueryContainerStyles = css({
61
61
  containerName: 'ak-renderer-wrapper',
62
62
  containerType: 'inline-size'
@@ -1,91 +1,7 @@
1
- import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
- import _createClass from "@babel/runtime/helpers/createClass";
3
- import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
4
- import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
5
- import _inherits from "@babel/runtime/helpers/inherits";
6
- import _defineProperty from "@babel/runtime/helpers/defineProperty";
7
- function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
8
- function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
9
1
  import React from 'react';
10
2
  import { SortOrder } from '@atlaskit/editor-common/types';
11
- import { compose } from '@atlaskit/editor-common/utils';
12
- import { fg } from '@atlaskit/platform-feature-flags/fg';
13
3
  import { RendererCssClassName } from '../../consts';
14
- // Ignored via go/ees005
15
- // eslint-disable-next-line @repo/internal/react/no-class-components
16
- var TableRowLegacy = /*#__PURE__*/function (_React$Component) {
17
- function TableRowLegacy() {
18
- var _this;
19
- _classCallCheck(this, TableRowLegacy);
20
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
21
- args[_key] = arguments[_key];
22
- }
23
- _this = _callSuper(this, TableRowLegacy, [].concat(args));
24
- _defineProperty(_this, "state", {
25
- colGroupWidths: []
26
- });
27
- _defineProperty(_this, "addSortableColumn", function (childrenArray) {
28
- var _this$props = _this.props,
29
- allowColumnSorting = _this$props.allowColumnSorting,
30
- rowIndex = _this$props.index;
31
- var isHeaderRow = !rowIndex;
32
- if (allowColumnSorting && isHeaderRow) {
33
- childrenArray = childrenArray.map(function (child, index) {
34
- if ( /*#__PURE__*/React.isValidElement(child)) {
35
- var tableOrderStatus = _this.props.tableOrderStatus;
36
- var sortOrdered = SortOrder.NO_ORDER;
37
- if (tableOrderStatus) {
38
- sortOrdered = index === tableOrderStatus.columnIndex ? tableOrderStatus.order : SortOrder.NO_ORDER;
39
- }
40
- return /*#__PURE__*/React.cloneElement(child, {
41
- columnIndex: index,
42
- onSorting: _this.props.onSorting,
43
- sortOrdered: sortOrdered,
44
- isHeaderRow: isHeaderRow
45
- });
46
- }
47
- });
48
- }
49
- return childrenArray;
50
- });
51
- _defineProperty(_this, "addColGroupWidth", function (childrenArray) {
52
- var _this$state$colGroupW;
53
- if ((_this$state$colGroupW = _this.state.colGroupWidths) !== null && _this$state$colGroupW !== void 0 && _this$state$colGroupW.length) {
54
- childrenArray = childrenArray.map(function (child, index) {
55
- if ( /*#__PURE__*/React.isValidElement(child)) {
56
- return /*#__PURE__*/React.cloneElement(child, {
57
- colGroupWidth: _this.state.colGroupWidths[index]
58
- });
59
- }
60
- });
61
- }
62
- return childrenArray;
63
- });
64
- return _this;
65
- }
66
- _inherits(TableRowLegacy, _React$Component);
67
- return _createClass(TableRowLegacy, [{
68
- key: "render",
69
- value: function render() {
70
- var _this$props2 = this.props,
71
- children = _this$props2.children,
72
- innerRef = _this$props2.innerRef,
73
- isFirstRow = _this$props2.isFirstRow,
74
- isLastRow = _this$props2.isLastRow;
75
- var childrenArray = React.Children.toArray(children);
76
- return /*#__PURE__*/React.createElement("tr", {
77
- ref: innerRef
78
- }, this.props.isNumberColumnEnabled && /*#__PURE__*/React.createElement("td", {
79
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
80
- className: RendererCssClassName.NUMBER_COLUMN,
81
- "data-reaches-left": true,
82
- "data-reaches-top": isFirstRow || undefined,
83
- "data-reaches-bottom": isLastRow || undefined
84
- }, this.props.index), compose(this.addSortableColumn, this.addColGroupWidth)(childrenArray));
85
- }
86
- }]);
87
- }(React.Component);
88
- function TableRowFunctional(_ref) {
4
+ export default function TableRow(_ref) {
89
5
  var allowColumnSorting = _ref.allowColumnSorting,
90
6
  children = _ref.children,
91
7
  index = _ref.index,
@@ -116,8 +32,4 @@ function TableRowFunctional(_ref) {
116
32
  "data-reaches-top": isFirstRow || undefined,
117
33
  "data-reaches-bottom": isLastRow || undefined
118
34
  }, index), cells);
119
- }
120
- export default function TableRow(props) {
121
- var Component = fg('platform_renderer_table_row_functional') ? TableRowFunctional : TableRowLegacy;
122
- return /*#__PURE__*/React.createElement(Component, props);
123
35
  }
@@ -61,7 +61,7 @@ export var DEGRADED_SEVERITY_THRESHOLD = 3000;
61
61
  var TABLE_INFO_TIMEOUT = 10000;
62
62
  var RENDER_EVENT_SAMPLE_RATE = 0.1;
63
63
  var packageName = "@atlaskit/renderer";
64
- var packageVersion = "142.1.1";
64
+ var packageVersion = "142.1.3";
65
65
  var setAsQueryContainerStyles = css({
66
66
  containerName: 'ak-renderer-wrapper',
67
67
  containerType: 'inline-size'
@@ -14,5 +14,5 @@ type Props = {
14
14
  order: SortOrder;
15
15
  };
16
16
  };
17
- export default function TableRow(props: Props): React.JSX.Element;
17
+ export default function TableRow({ allowColumnSorting, children, index, innerRef, isFirstRow, isLastRow, isNumberColumnEnabled, onSorting, tableOrderStatus, }: Props): React.JSX.Element;
18
18
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "142.1.2",
3
+ "version": "142.1.4",
4
4
  "description": "Renderer component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -73,7 +73,7 @@
73
73
  "@atlaskit/status": "^5.12.0",
74
74
  "@atlaskit/task-decision": "^21.10.0",
75
75
  "@atlaskit/theme": "^28.2.0",
76
- "@atlaskit/tmp-editor-statsig": "^203.0.0",
76
+ "@atlaskit/tmp-editor-statsig": "^204.0.0",
77
77
  "@atlaskit/tokens": "^19.0.0",
78
78
  "@atlaskit/tooltip": "^24.3.0",
79
79
  "@atlaskit/visually-hidden": "^4.4.0",
@@ -150,9 +150,6 @@
150
150
  "platform_editor_a11y_codeblock_haspopup": {
151
151
  "type": "boolean"
152
152
  },
153
- "platform_renderer_table_row_functional": {
154
- "type": "boolean"
155
- },
156
153
  "platform_renderer_ssr_block_margin_fix": {
157
154
  "type": "boolean"
158
155
  },