@atlaskit/renderer 119.0.3 → 119.0.5

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,26 @@
1
1
  # @atlaskit/renderer
2
2
 
3
+ ## 119.0.5
4
+
5
+ ### Patch Changes
6
+
7
+ - [#175776](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/175776)
8
+ [`43362c25c7806`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/43362c25c7806) -
9
+ Tidy up feature gate platform_editor_table_column_group_width_check_3
10
+ - [#175844](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/175844)
11
+ [`4b7a1f7498119`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4b7a1f7498119) -
12
+ Tidy up feature gate cc_complexit_fe_reduce_fragment_serialization
13
+ - Updated dependencies
14
+
15
+ ## 119.0.4
16
+
17
+ ### Patch Changes
18
+
19
+ - [#175396](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/175396)
20
+ [`a40f4f8831421`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a40f4f8831421) -
21
+ Fix numbered column width calculation
22
+ - Updated dependencies
23
+
3
24
  ## 119.0.3
4
25
 
5
26
  ### Patch Changes
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.Colgroup = void 0;
7
+ exports.colWidthSum = exports.Colgroup = void 0;
8
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
9
  var _react = _interopRequireDefault(require("react"));
10
10
  var _styles = require("@atlaskit/editor-common/styles");
@@ -54,7 +54,7 @@ var calcScalePercent = function calcScalePercent(_ref) {
54
54
  var diffPercent = 1 - noNumColumnScalePercent;
55
55
  return diffPercent < maxScale ? isNumberColumnEnabled ? 1 - numColumnScalePercent : diffPercent : maxScale;
56
56
  };
57
- var colWidthSum = function colWidthSum(columnWidths) {
57
+ var colWidthSum = exports.colWidthSum = function colWidthSum(columnWidths) {
58
58
  return columnWidths.reduce(function (prev, curr) {
59
59
  return curr + prev;
60
60
  }, 0);
@@ -29,6 +29,7 @@ var Table = exports.Table = /*#__PURE__*/_react.default.memo(function (_ref) {
29
29
  _ref$fixTableSSRResiz = _ref.fixTableSSRResizing,
30
30
  fixTableSSRResizing = _ref$fixTableSSRResiz === void 0 ? false : _ref$fixTableSSRResiz;
31
31
  var tableWidth = tableNode ? (0, _nodeWidth.getTableContainerWidth)(tableNode) : _editorSharedStyles.akEditorDefaultLayoutWidth;
32
+ var tableColumnWidths = columnWidths;
32
33
  if (rendererAppearance === 'comment' && allowTableResizing && tableNode && !((_tableNode$attrs = tableNode.attrs) !== null && _tableNode$attrs !== void 0 && _tableNode$attrs.width)) {
33
34
  tableWidth = 'inherit';
34
35
  }
@@ -40,6 +41,15 @@ var Table = exports.Table = /*#__PURE__*/_react.default.memo(function (_ref) {
40
41
  tableWidth = renderWidth;
41
42
  }
42
43
  }
44
+
45
+ // for columns that are evenly distributed, do not return `colgroup` since existing table containerQuery
46
+ // scales up the columns width. This ensures columns always have 42px.
47
+ if (rendererAppearance === 'comment') {
48
+ // eslint-disable-next-line @atlaskit/platform/no-preconditioning
49
+ if ((0, _platformFeatureFlags.fg)('platform-ssr-table-resize') && (0, _platformFeatureFlags.fg)('platform_table_number_column')) {
50
+ tableColumnWidths = columnWidths && (0, _colgroup.colWidthSum)(columnWidths) ? columnWidths : undefined;
51
+ }
52
+ }
43
53
  var tableLayout = tableNode === null || tableNode === void 0 ? void 0 : tableNode.attrs.layout;
44
54
  var tableDisplayMode = tableNode === null || tableNode === void 0 ? void 0 : tableNode.attrs.displayMode;
45
55
  return /*#__PURE__*/_react.default.createElement("table", (0, _extends2.default)({}, (0, _platformFeatureFlags.fg)('platform_renderer_isPresentational') && {
@@ -55,7 +65,7 @@ var Table = exports.Table = /*#__PURE__*/_react.default.memo(function (_ref) {
55
65
  marginTop: fixTableSSRResizing ? '0px' : ''
56
66
  }
57
67
  }), /*#__PURE__*/_react.default.createElement(_colgroup.Colgroup, {
58
- columnWidths: columnWidths,
68
+ columnWidths: tableColumnWidths,
59
69
  layout: layout,
60
70
  isNumberColumnEnabled: isNumberColumnEnabled,
61
71
  renderWidth: renderWidth,
@@ -57,7 +57,7 @@ var TableRow = exports.default = /*#__PURE__*/function (_React$Component) {
57
57
  });
58
58
  (0, _defineProperty2.default)(_this, "addColGroupWidth", function (childrenArray) {
59
59
  var _this$state$colGroupW;
60
- if ((0, _platformFeatureFlags.fg)('platform_editor_table_column_group_width_check_3') ? (_this$state$colGroupW = _this.state.colGroupWidths) === null || _this$state$colGroupW === void 0 ? void 0 : _this$state$colGroupW.length : _this.state.colGroupWidths) {
60
+ if ((_this$state$colGroupW = _this.state.colGroupWidths) !== null && _this$state$colGroupW !== void 0 && _this$state$colGroupW.length) {
61
61
  childrenArray = childrenArray.map(function (child, index) {
62
62
  if ( /*#__PURE__*/_react.default.isValidElement(child)) {
63
63
  return /*#__PURE__*/_react.default.cloneElement(child, {
@@ -99,7 +99,7 @@ var _validation = function _validation(doc, schema, adfStage, useSpecBasedValida
99
99
  };
100
100
  var memoValidation = (0, _memoizeOne.default)(_validation, function (newArgs, lastArgs) {
101
101
  var result = false;
102
- if ((0, _platformFeatureFlags.fg)('cc_complexit_fe_memoValidation_redundant_calls')) {
102
+ if ((0, _platformFeatureFlags.fg)('cc_complexit_fe_memovalidation_redundant_calls_2')) {
103
103
  var _newArgs = (0, _slicedToArray2.default)(newArgs, 7),
104
104
  newDoc = _newArgs[0],
105
105
  newSchema = _newArgs[1],
@@ -62,7 +62,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
62
62
  var NORMAL_SEVERITY_THRESHOLD = exports.NORMAL_SEVERITY_THRESHOLD = 2000;
63
63
  var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
64
64
  var packageName = "@atlaskit/renderer";
65
- var packageVersion = "119.0.2";
65
+ var packageVersion = "119.0.4";
66
66
  var setAsQueryContainerStyles = (0, _react2.css)({
67
67
  containerName: 'ak-renderer-wrapper',
68
68
  containerType: 'inline-size'
@@ -254,8 +254,6 @@ var RendererFunctionalComponent = exports.RendererFunctionalComponent = function
254
254
  allowTableResizing: props.UNSTABLE_allowTableResizing
255
255
  };
256
256
  }, [createRendererContext, providerFactory, _fireAnalyticsEvent]);
257
-
258
- // Abstract out the logic into its own function
259
257
  var serializer = (0, _useMemoFromPropsDerivative.useMemoFromPropsDerivative)(function (serializerProps) {
260
258
  // If progressive rendering is enabled, create a new serializer
261
259
  if ((0, _platformFeatureFlags.fg)('cc_complexit_fe_progressive_adf_rendering')) {
@@ -7,33 +7,29 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.useMemoFromPropsDerivative = useMemoFromPropsDerivative;
8
8
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
9
9
  var _react = require("react");
10
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
11
10
  function useMemoFromPropsDerivative(factory, propsDerivator, props) {
12
11
  // cache the last set of props
13
12
  var prev = (0, _react.useRef)(props);
14
13
  var prevFactory = (0, _react.useRef)(null);
15
14
  return (0, _react.useMemo)(function () {
16
- if ((0, _platformFeatureFlags.fg)('cc_complexit_fe_reduce_fragment_serialization')) {
17
- // check if the serializer is already created
18
- var shouldCreate = !prevFactory.current;
19
- // check each prop to see if value has changed and also check if the number of props has changed
20
- if (prev.current !== props) {
21
- var propsEntries = Object.entries(props);
22
- shouldCreate = propsEntries.length !== Object.keys(prev.current).length || propsEntries.some(function (_ref) {
23
- var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
24
- key = _ref2[0],
25
- prop = _ref2[1];
26
- return prev.current[key] !== prop;
27
- });
28
- }
29
- prev.current = props;
30
- // If first time or any prop value has changed, create a new serializer
31
- if (shouldCreate) {
32
- prevFactory.current = factory(propsDerivator(props));
33
- }
34
- return prevFactory.current;
15
+ // check if the serializer is already created
16
+ var shouldCreate = !prevFactory.current;
17
+ // check each prop to see if value has changed and also check if the number of props has changed
18
+ if (prev.current !== props) {
19
+ var propsEntries = Object.entries(props);
20
+ shouldCreate = propsEntries.length !== Object.keys(prev.current).length || propsEntries.some(function (_ref) {
21
+ var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
22
+ key = _ref2[0],
23
+ prop = _ref2[1];
24
+ return prev.current[key] !== prop;
25
+ });
35
26
  }
36
- return factory(propsDerivator(props));
27
+ prev.current = props;
28
+ // If first time or any prop value has changed, create a new serializer
29
+ if (shouldCreate) {
30
+ prevFactory.current = factory(propsDerivator(props));
31
+ }
32
+ return prevFactory.current;
37
33
  },
38
34
  // To keep deps consistent, here disable the exhaustive-deps rule to drop factory from the deps array
39
35
  // eslint-disable-next-line react-hooks/exhaustive-deps
@@ -44,7 +44,7 @@ const calcScalePercent = ({
44
44
  const diffPercent = 1 - noNumColumnScalePercent;
45
45
  return diffPercent < maxScale ? isNumberColumnEnabled ? 1 - numColumnScalePercent : diffPercent : maxScale;
46
46
  };
47
- const colWidthSum = columnWidths => columnWidths.reduce((prev, curr) => curr + prev, 0);
47
+ export const colWidthSum = columnWidths => columnWidths.reduce((prev, curr) => curr + prev, 0);
48
48
  const renderScaleDownColgroup = props => {
49
49
  var _props$tableNode;
50
50
  const {
@@ -1,6 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import React from 'react';
3
- import { Colgroup } from './colgroup';
3
+ import { Colgroup, colWidthSum } from './colgroup';
4
4
  import { getTableContainerWidth } from '@atlaskit/editor-common/node-width';
5
5
  import { akEditorDefaultLayoutWidth } from '@atlaskit/editor-shared-styles';
6
6
  import { fg } from '@atlaskit/platform-feature-flags';
@@ -22,6 +22,7 @@ export const Table = /*#__PURE__*/React.memo(({
22
22
  }) => {
23
23
  var _tableNode$attrs;
24
24
  let tableWidth = tableNode ? getTableContainerWidth(tableNode) : akEditorDefaultLayoutWidth;
25
+ let tableColumnWidths = columnWidths;
25
26
  if (rendererAppearance === 'comment' && allowTableResizing && tableNode && !((_tableNode$attrs = tableNode.attrs) !== null && _tableNode$attrs !== void 0 && _tableNode$attrs.width)) {
26
27
  tableWidth = 'inherit';
27
28
  }
@@ -33,6 +34,15 @@ export const Table = /*#__PURE__*/React.memo(({
33
34
  tableWidth = renderWidth;
34
35
  }
35
36
  }
37
+
38
+ // for columns that are evenly distributed, do not return `colgroup` since existing table containerQuery
39
+ // scales up the columns width. This ensures columns always have 42px.
40
+ if (rendererAppearance === 'comment') {
41
+ // eslint-disable-next-line @atlaskit/platform/no-preconditioning
42
+ if (fg('platform-ssr-table-resize') && fg('platform_table_number_column')) {
43
+ tableColumnWidths = columnWidths && colWidthSum(columnWidths) ? columnWidths : undefined;
44
+ }
45
+ }
36
46
  const tableLayout = tableNode === null || tableNode === void 0 ? void 0 : tableNode.attrs.layout;
37
47
  const tableDisplayMode = tableNode === null || tableNode === void 0 ? void 0 : tableNode.attrs.displayMode;
38
48
  return /*#__PURE__*/React.createElement("table", _extends({}, fg('platform_renderer_isPresentational') && {
@@ -48,7 +58,7 @@ export const Table = /*#__PURE__*/React.memo(({
48
58
  marginTop: fixTableSSRResizing ? '0px' : ''
49
59
  }
50
60
  }), /*#__PURE__*/React.createElement(Colgroup, {
51
- columnWidths: columnWidths,
61
+ columnWidths: tableColumnWidths,
52
62
  layout: layout,
53
63
  isNumberColumnEnabled: isNumberColumnEnabled,
54
64
  renderWidth: renderWidth,
@@ -41,7 +41,7 @@ export default class TableRow extends React.Component {
41
41
  });
42
42
  _defineProperty(this, "addColGroupWidth", childrenArray => {
43
43
  var _this$state$colGroupW;
44
- if (fg('platform_editor_table_column_group_width_check_3') ? (_this$state$colGroupW = this.state.colGroupWidths) === null || _this$state$colGroupW === void 0 ? void 0 : _this$state$colGroupW.length : this.state.colGroupWidths) {
44
+ if ((_this$state$colGroupW = this.state.colGroupWidths) !== null && _this$state$colGroupW !== void 0 && _this$state$colGroupW.length) {
45
45
  childrenArray = childrenArray.map((child, index) => {
46
46
  if ( /*#__PURE__*/React.isValidElement(child)) {
47
47
  return /*#__PURE__*/React.cloneElement(child, {
@@ -93,7 +93,7 @@ const _validation = (doc, schema, adfStage, useSpecBasedValidator, dispatchAnaly
93
93
  };
94
94
  const memoValidation = memoizeOne(_validation, (newArgs, lastArgs) => {
95
95
  let result = false;
96
- if (fg('cc_complexit_fe_memoValidation_redundant_calls')) {
96
+ if (fg('cc_complexit_fe_memovalidation_redundant_calls_2')) {
97
97
  const [newDoc, newSchema, newADFStage, newUseSpecValidator,,
98
98
  // ignoring dispatchAnalyticsEvent
99
99
  newSkipValidation, newValidationOverrides] = newArgs;
@@ -48,7 +48,7 @@ import { PortalContext } from './PortalContext';
48
48
  export const NORMAL_SEVERITY_THRESHOLD = 2000;
49
49
  export const DEGRADED_SEVERITY_THRESHOLD = 3000;
50
50
  const packageName = "@atlaskit/renderer";
51
- const packageVersion = "119.0.2";
51
+ const packageVersion = "119.0.4";
52
52
  const setAsQueryContainerStyles = css({
53
53
  containerName: 'ak-renderer-wrapper',
54
54
  containerType: 'inline-size'
@@ -246,8 +246,6 @@ export const RendererFunctionalComponent = props => {
246
246
  allowTableResizing: props.UNSTABLE_allowTableResizing
247
247
  };
248
248
  }, [createRendererContext, providerFactory, fireAnalyticsEvent]);
249
-
250
- // Abstract out the logic into its own function
251
249
  const serializer = useMemoFromPropsDerivative(serializerProps => {
252
250
  // If progressive rendering is enabled, create a new serializer
253
251
  if (fg('cc_complexit_fe_progressive_adf_rendering')) {
@@ -1,26 +1,22 @@
1
1
  import { useMemo, useRef } from 'react';
2
- import { fg } from '@atlaskit/platform-feature-flags';
3
2
  export function useMemoFromPropsDerivative(factory, propsDerivator, props) {
4
3
  // cache the last set of props
5
4
  const prev = useRef(props);
6
5
  const prevFactory = useRef(null);
7
6
  return useMemo(() => {
8
- if (fg('cc_complexit_fe_reduce_fragment_serialization')) {
9
- // check if the serializer is already created
10
- let shouldCreate = !prevFactory.current;
11
- // check each prop to see if value has changed and also check if the number of props has changed
12
- if (prev.current !== props) {
13
- const propsEntries = Object.entries(props);
14
- shouldCreate = propsEntries.length !== Object.keys(prev.current).length || propsEntries.some(([key, prop]) => prev.current[key] !== prop);
15
- }
16
- prev.current = props;
17
- // If first time or any prop value has changed, create a new serializer
18
- if (shouldCreate) {
19
- prevFactory.current = factory(propsDerivator(props));
20
- }
21
- return prevFactory.current;
7
+ // check if the serializer is already created
8
+ let shouldCreate = !prevFactory.current;
9
+ // check each prop to see if value has changed and also check if the number of props has changed
10
+ if (prev.current !== props) {
11
+ const propsEntries = Object.entries(props);
12
+ shouldCreate = propsEntries.length !== Object.keys(prev.current).length || propsEntries.some(([key, prop]) => prev.current[key] !== prop);
22
13
  }
23
- return factory(propsDerivator(props));
14
+ prev.current = props;
15
+ // If first time or any prop value has changed, create a new serializer
16
+ if (shouldCreate) {
17
+ prevFactory.current = factory(propsDerivator(props));
18
+ }
19
+ return prevFactory.current;
24
20
  },
25
21
  // To keep deps consistent, here disable the exhaustive-deps rule to drop factory from the deps array
26
22
  // eslint-disable-next-line react-hooks/exhaustive-deps
@@ -48,7 +48,7 @@ var calcScalePercent = function calcScalePercent(_ref) {
48
48
  var diffPercent = 1 - noNumColumnScalePercent;
49
49
  return diffPercent < maxScale ? isNumberColumnEnabled ? 1 - numColumnScalePercent : diffPercent : maxScale;
50
50
  };
51
- var colWidthSum = function colWidthSum(columnWidths) {
51
+ export var colWidthSum = function colWidthSum(columnWidths) {
52
52
  return columnWidths.reduce(function (prev, curr) {
53
53
  return curr + prev;
54
54
  }, 0);
@@ -1,6 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import React from 'react';
3
- import { Colgroup } from './colgroup';
3
+ import { Colgroup, colWidthSum } from './colgroup';
4
4
  import { getTableContainerWidth } from '@atlaskit/editor-common/node-width';
5
5
  import { akEditorDefaultLayoutWidth } from '@atlaskit/editor-shared-styles';
6
6
  import { fg } from '@atlaskit/platform-feature-flags';
@@ -22,6 +22,7 @@ export var Table = /*#__PURE__*/React.memo(function (_ref) {
22
22
  _ref$fixTableSSRResiz = _ref.fixTableSSRResizing,
23
23
  fixTableSSRResizing = _ref$fixTableSSRResiz === void 0 ? false : _ref$fixTableSSRResiz;
24
24
  var tableWidth = tableNode ? getTableContainerWidth(tableNode) : akEditorDefaultLayoutWidth;
25
+ var tableColumnWidths = columnWidths;
25
26
  if (rendererAppearance === 'comment' && allowTableResizing && tableNode && !((_tableNode$attrs = tableNode.attrs) !== null && _tableNode$attrs !== void 0 && _tableNode$attrs.width)) {
26
27
  tableWidth = 'inherit';
27
28
  }
@@ -33,6 +34,15 @@ export var Table = /*#__PURE__*/React.memo(function (_ref) {
33
34
  tableWidth = renderWidth;
34
35
  }
35
36
  }
37
+
38
+ // for columns that are evenly distributed, do not return `colgroup` since existing table containerQuery
39
+ // scales up the columns width. This ensures columns always have 42px.
40
+ if (rendererAppearance === 'comment') {
41
+ // eslint-disable-next-line @atlaskit/platform/no-preconditioning
42
+ if (fg('platform-ssr-table-resize') && fg('platform_table_number_column')) {
43
+ tableColumnWidths = columnWidths && colWidthSum(columnWidths) ? columnWidths : undefined;
44
+ }
45
+ }
36
46
  var tableLayout = tableNode === null || tableNode === void 0 ? void 0 : tableNode.attrs.layout;
37
47
  var tableDisplayMode = tableNode === null || tableNode === void 0 ? void 0 : tableNode.attrs.displayMode;
38
48
  return /*#__PURE__*/React.createElement("table", _extends({}, fg('platform_renderer_isPresentational') && {
@@ -48,7 +58,7 @@ export var Table = /*#__PURE__*/React.memo(function (_ref) {
48
58
  marginTop: fixTableSSRResizing ? '0px' : ''
49
59
  }
50
60
  }), /*#__PURE__*/React.createElement(Colgroup, {
51
- columnWidths: columnWidths,
61
+ columnWidths: tableColumnWidths,
52
62
  layout: layout,
53
63
  isNumberColumnEnabled: isNumberColumnEnabled,
54
64
  renderWidth: renderWidth,
@@ -50,7 +50,7 @@ var TableRow = /*#__PURE__*/function (_React$Component) {
50
50
  });
51
51
  _defineProperty(_this, "addColGroupWidth", function (childrenArray) {
52
52
  var _this$state$colGroupW;
53
- if (fg('platform_editor_table_column_group_width_check_3') ? (_this$state$colGroupW = _this.state.colGroupWidths) === null || _this$state$colGroupW === void 0 ? void 0 : _this$state$colGroupW.length : _this.state.colGroupWidths) {
53
+ if ((_this$state$colGroupW = _this.state.colGroupWidths) !== null && _this$state$colGroupW !== void 0 && _this$state$colGroupW.length) {
54
54
  childrenArray = childrenArray.map(function (child, index) {
55
55
  if ( /*#__PURE__*/React.isValidElement(child)) {
56
56
  return /*#__PURE__*/React.cloneElement(child, {
@@ -92,7 +92,7 @@ var _validation = function _validation(doc, schema, adfStage, useSpecBasedValida
92
92
  };
93
93
  var memoValidation = memoizeOne(_validation, function (newArgs, lastArgs) {
94
94
  var result = false;
95
- if (fg('cc_complexit_fe_memoValidation_redundant_calls')) {
95
+ if (fg('cc_complexit_fe_memovalidation_redundant_calls_2')) {
96
96
  var _newArgs = _slicedToArray(newArgs, 7),
97
97
  newDoc = _newArgs[0],
98
98
  newSchema = _newArgs[1],
@@ -53,7 +53,7 @@ import { PortalContext } from './PortalContext';
53
53
  export var NORMAL_SEVERITY_THRESHOLD = 2000;
54
54
  export var DEGRADED_SEVERITY_THRESHOLD = 3000;
55
55
  var packageName = "@atlaskit/renderer";
56
- var packageVersion = "119.0.2";
56
+ var packageVersion = "119.0.4";
57
57
  var setAsQueryContainerStyles = css({
58
58
  containerName: 'ak-renderer-wrapper',
59
59
  containerType: 'inline-size'
@@ -245,8 +245,6 @@ export var RendererFunctionalComponent = function RendererFunctionalComponent(pr
245
245
  allowTableResizing: props.UNSTABLE_allowTableResizing
246
246
  };
247
247
  }, [createRendererContext, providerFactory, _fireAnalyticsEvent]);
248
-
249
- // Abstract out the logic into its own function
250
248
  var serializer = useMemoFromPropsDerivative(function (serializerProps) {
251
249
  // If progressive rendering is enabled, create a new serializer
252
250
  if (fg('cc_complexit_fe_progressive_adf_rendering')) {
@@ -1,32 +1,28 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
2
  import { useMemo, useRef } from 'react';
3
- import { fg } from '@atlaskit/platform-feature-flags';
4
3
  export function useMemoFromPropsDerivative(factory, propsDerivator, props) {
5
4
  // cache the last set of props
6
5
  var prev = useRef(props);
7
6
  var prevFactory = useRef(null);
8
7
  return useMemo(function () {
9
- if (fg('cc_complexit_fe_reduce_fragment_serialization')) {
10
- // check if the serializer is already created
11
- var shouldCreate = !prevFactory.current;
12
- // check each prop to see if value has changed and also check if the number of props has changed
13
- if (prev.current !== props) {
14
- var propsEntries = Object.entries(props);
15
- shouldCreate = propsEntries.length !== Object.keys(prev.current).length || propsEntries.some(function (_ref) {
16
- var _ref2 = _slicedToArray(_ref, 2),
17
- key = _ref2[0],
18
- prop = _ref2[1];
19
- return prev.current[key] !== prop;
20
- });
21
- }
22
- prev.current = props;
23
- // If first time or any prop value has changed, create a new serializer
24
- if (shouldCreate) {
25
- prevFactory.current = factory(propsDerivator(props));
26
- }
27
- return prevFactory.current;
8
+ // check if the serializer is already created
9
+ var shouldCreate = !prevFactory.current;
10
+ // check each prop to see if value has changed and also check if the number of props has changed
11
+ if (prev.current !== props) {
12
+ var propsEntries = Object.entries(props);
13
+ shouldCreate = propsEntries.length !== Object.keys(prev.current).length || propsEntries.some(function (_ref) {
14
+ var _ref2 = _slicedToArray(_ref, 2),
15
+ key = _ref2[0],
16
+ prop = _ref2[1];
17
+ return prev.current[key] !== prop;
18
+ });
28
19
  }
29
- return factory(propsDerivator(props));
20
+ prev.current = props;
21
+ // If first time or any prop value has changed, create a new serializer
22
+ if (shouldCreate) {
23
+ prevFactory.current = factory(propsDerivator(props));
24
+ }
25
+ return prevFactory.current;
30
26
  },
31
27
  // To keep deps consistent, here disable the exhaustive-deps rule to drop factory from the deps array
32
28
  // eslint-disable-next-line react-hooks/exhaustive-deps
@@ -1,3 +1,4 @@
1
1
  import React from 'react';
2
2
  import type { SharedTableProps } from './types';
3
+ export declare const colWidthSum: (columnWidths: number[]) => number;
3
4
  export declare const Colgroup: (props: SharedTableProps) => React.JSX.Element | null;
@@ -1,3 +1,4 @@
1
1
  import React from 'react';
2
2
  import type { SharedTableProps } from './types';
3
+ export declare const colWidthSum: (columnWidths: number[]) => number;
3
4
  export declare const Colgroup: (props: SharedTableProps) => React.JSX.Element | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "119.0.3",
3
+ "version": "119.0.5",
4
4
  "description": "Renderer component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -39,7 +39,7 @@
39
39
  "@atlaskit/editor-tables": "^2.9.0",
40
40
  "@atlaskit/emoji": "^69.3.0",
41
41
  "@atlaskit/feature-gate-js-client": "^5.3.0",
42
- "@atlaskit/icon": "^27.1.0",
42
+ "@atlaskit/icon": "^27.2.0",
43
43
  "@atlaskit/link": "^3.2.0",
44
44
  "@atlaskit/link-datasource": "^4.11.0",
45
45
  "@atlaskit/media-card": "^79.3.0",
@@ -51,12 +51,12 @@
51
51
  "@atlaskit/media-viewer": "^52.3.0",
52
52
  "@atlaskit/platform-feature-flags": "^1.1.0",
53
53
  "@atlaskit/platform-feature-flags-react": "^0.2.0",
54
- "@atlaskit/react-ufo": "^3.13.0",
55
- "@atlaskit/smart-card": "^38.14.0",
54
+ "@atlaskit/react-ufo": "^3.14.0",
55
+ "@atlaskit/smart-card": "^38.15.0",
56
56
  "@atlaskit/status": "^3.0.0",
57
57
  "@atlaskit/task-decision": "^19.2.0",
58
58
  "@atlaskit/theme": "^18.0.0",
59
- "@atlaskit/tmp-editor-statsig": "^8.1.0",
59
+ "@atlaskit/tmp-editor-statsig": "^8.2.0",
60
60
  "@atlaskit/tokens": "^5.4.0",
61
61
  "@atlaskit/tooltip": "^20.3.0",
62
62
  "@atlaskit/visually-hidden": "^3.0.0",
@@ -82,7 +82,7 @@
82
82
  "@atlaskit/checkbox": "^17.1.0",
83
83
  "@atlaskit/css-reset": "^7.3.0",
84
84
  "@atlaskit/link-provider": "^3.3.0",
85
- "@atlaskit/link-test-helpers": "^8.0.0",
85
+ "@atlaskit/link-test-helpers": "^8.1.0",
86
86
  "@atlaskit/linking-common": "^9.1.0",
87
87
  "@atlaskit/media-core": "^37.0.0",
88
88
  "@atlaskit/media-integration-test-helpers": "workspace:^",
@@ -142,9 +142,6 @@
142
142
  "cc_complexit_reduce_portal_rerenders": {
143
143
  "type": "boolean"
144
144
  },
145
- "cc_complexit_fe_reduce_fragment_serialization": {
146
- "type": "boolean"
147
- },
148
145
  "cc_complexit_fe_reduce_rerender_2": {
149
146
  "type": "boolean"
150
147
  },
@@ -215,10 +212,7 @@
215
212
  "platform_renderer_triple_click_selects_paragraph": {
216
213
  "type": "boolean"
217
214
  },
218
- "platform_editor_table_column_group_width_check_3": {
219
- "type": "boolean"
220
- },
221
- "cc_complexit_fe_memoValidation_redundant_calls": {
215
+ "cc_complexit_fe_memovalidation_redundant_calls_2": {
222
216
  "type": "boolean"
223
217
  },
224
218
  "cc_complexit_fe_progressive_adf_rendering": {
@@ -269,6 +263,9 @@
269
263
  "prompt_whiteboard_competitor_link_gate": {
270
264
  "type": "boolean"
271
265
  },
266
+ "platform_table_number_column": {
267
+ "type": "boolean"
268
+ },
272
269
  "issue_table_single_line_row_height_fast_follows": {
273
270
  "type": "boolean"
274
271
  }