@atlaskit/renderer 114.7.9 → 114.9.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,26 @@
1
1
  # @atlaskit/renderer
2
2
 
3
+ ## 114.9.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#139372](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/139372)
8
+ [`0a065cf818a4d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0a065cf818a4d) -
9
+ Optimize tableRow.addColGroupWidth so it does not clone children when colGroupWidths array is
10
+ empty
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies
15
+
16
+ ## 114.8.0
17
+
18
+ ### Minor Changes
19
+
20
+ - [#139497](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/139497)
21
+ [`cac027cee3848`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/cac027cee3848) -
22
+ Clean up the forbid_comments_on_empty_newlines feature gate
23
+
3
24
  ## 114.7.9
4
25
 
5
26
  ### Patch Changes
@@ -69,11 +69,9 @@ var RendererActions = exports.default = /*#__PURE__*/function () {
69
69
  if (!this.doc || !this.schema) {
70
70
  return false;
71
71
  }
72
- if ((0, _platformFeatureFlags.fg)('forbid_comments_on_empty_newlines')) {
73
- var currentSelection = _state.TextSelection.create(this.doc, from, to);
74
- if ((0, _utils.isEmptyTextSelection)(currentSelection, this.schema)) {
75
- return false;
76
- }
72
+ var currentSelection = _state.TextSelection.create(this.doc, from, to);
73
+ if ((0, _utils.isEmptyTextSelection)(currentSelection, this.schema)) {
74
+ return false;
77
75
  }
78
76
  return (0, _utils.canApplyAnnotationOnRange)({
79
77
  from: from,
@@ -14,6 +14,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
14
14
  var _react = _interopRequireDefault(require("react"));
15
15
  var _utils = require("@atlaskit/editor-common/utils");
16
16
  var _types = require("@atlaskit/editor-common/types");
17
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
17
18
  var _consts = require("../../consts");
18
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)); }
19
20
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
@@ -34,8 +35,8 @@ var TableRow = exports.default = /*#__PURE__*/function (_React$Component) {
34
35
  var _this$props = _this.props,
35
36
  allowColumnSorting = _this$props.allowColumnSorting,
36
37
  rowIndex = _this$props.index;
37
- if (allowColumnSorting) {
38
- var isHeaderRow = !rowIndex;
38
+ var isHeaderRow = !rowIndex;
39
+ if (allowColumnSorting && (!(0, _platformFeatureFlags.fg)('cc_complexit_fe_improve_table_sorting') || isHeaderRow)) {
39
40
  childrenArray = childrenArray.map(function (child, index) {
40
41
  if ( /*#__PURE__*/_react.default.isValidElement(child)) {
41
42
  var tableOrderStatus = _this.props.tableOrderStatus;
@@ -55,7 +56,8 @@ var TableRow = exports.default = /*#__PURE__*/function (_React$Component) {
55
56
  return childrenArray;
56
57
  });
57
58
  (0, _defineProperty2.default)(_this, "addColGroupWidth", function (childrenArray) {
58
- if (_this.state.colGroupWidths) {
59
+ var _this$state$colGroupW;
60
+ if ((0, _platformFeatureFlags.fg)('platform_editor_table_column_group_width_check') ? (_this$state$colGroupW = _this.state.colGroupWidths) === null || _this$state$colGroupW === void 0 ? void 0 : _this$state$colGroupW.length : _this.state.colGroupWidths) {
59
61
  childrenArray = childrenArray.map(function (child, index) {
60
62
  if ( /*#__PURE__*/_react.default.isValidElement(child)) {
61
63
  return /*#__PURE__*/_react.default.cloneElement(child, {
@@ -67,7 +67,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
67
67
  var NORMAL_SEVERITY_THRESHOLD = exports.NORMAL_SEVERITY_THRESHOLD = 2000;
68
68
  var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
69
69
  var packageName = "@atlaskit/renderer";
70
- var packageVersion = "114.7.9";
70
+ var packageVersion = "114.9.0";
71
71
  var setAsQueryContainerStyles = (0, _react2.css)({
72
72
  containerName: 'ak-renderer-wrapper',
73
73
  containerType: 'inline-size',
@@ -49,11 +49,9 @@ export default class RendererActions {
49
49
  if (!this.doc || !this.schema) {
50
50
  return false;
51
51
  }
52
- if (fg('forbid_comments_on_empty_newlines')) {
53
- const currentSelection = TextSelection.create(this.doc, from, to);
54
- if (isEmptyTextSelection(currentSelection, this.schema)) {
55
- return false;
56
- }
52
+ const currentSelection = TextSelection.create(this.doc, from, to);
53
+ if (isEmptyTextSelection(currentSelection, this.schema)) {
54
+ return false;
57
55
  }
58
56
  return canApplyAnnotationOnRange({
59
57
  from,
@@ -2,6 +2,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import React from 'react';
3
3
  import { compose } from '@atlaskit/editor-common/utils';
4
4
  import { SortOrder } from '@atlaskit/editor-common/types';
5
+ import { fg } from '@atlaskit/platform-feature-flags';
5
6
  import { RendererCssClassName } from '../../consts';
6
7
  // Ignored via go/ees005
7
8
  // eslint-disable-next-line @repo/internal/react/no-class-components
@@ -16,8 +17,8 @@ export default class TableRow extends React.Component {
16
17
  allowColumnSorting,
17
18
  index: rowIndex
18
19
  } = this.props;
19
- if (allowColumnSorting) {
20
- const isHeaderRow = !rowIndex;
20
+ const isHeaderRow = !rowIndex;
21
+ if (allowColumnSorting && (!fg('cc_complexit_fe_improve_table_sorting') || isHeaderRow)) {
21
22
  childrenArray = childrenArray.map((child, index) => {
22
23
  if ( /*#__PURE__*/React.isValidElement(child)) {
23
24
  const {
@@ -39,7 +40,8 @@ export default class TableRow extends React.Component {
39
40
  return childrenArray;
40
41
  });
41
42
  _defineProperty(this, "addColGroupWidth", childrenArray => {
42
- if (this.state.colGroupWidths) {
43
+ var _this$state$colGroupW;
44
+ if (fg('platform_editor_table_column_group_width_check') ? (_this$state$colGroupW = this.state.colGroupWidths) === null || _this$state$colGroupW === void 0 ? void 0 : _this$state$colGroupW.length : this.state.colGroupWidths) {
43
45
  childrenArray = childrenArray.map((child, index) => {
44
46
  if ( /*#__PURE__*/React.isValidElement(child)) {
45
47
  return /*#__PURE__*/React.cloneElement(child, {
@@ -48,7 +48,7 @@ import { removeEmptySpaceAroundContent } from './rendererHelper';
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 = "114.7.9";
51
+ const packageVersion = "114.9.0";
52
52
  const setAsQueryContainerStyles = css({
53
53
  containerName: 'ak-renderer-wrapper',
54
54
  containerType: 'inline-size',
@@ -62,11 +62,9 @@ var RendererActions = /*#__PURE__*/function () {
62
62
  if (!this.doc || !this.schema) {
63
63
  return false;
64
64
  }
65
- if (fg('forbid_comments_on_empty_newlines')) {
66
- var currentSelection = TextSelection.create(this.doc, from, to);
67
- if (isEmptyTextSelection(currentSelection, this.schema)) {
68
- return false;
69
- }
65
+ var currentSelection = TextSelection.create(this.doc, from, to);
66
+ if (isEmptyTextSelection(currentSelection, this.schema)) {
67
+ return false;
70
68
  }
71
69
  return canApplyAnnotationOnRange({
72
70
  from: from,
@@ -9,6 +9,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
9
9
  import React from 'react';
10
10
  import { compose } from '@atlaskit/editor-common/utils';
11
11
  import { SortOrder } from '@atlaskit/editor-common/types';
12
+ import { fg } from '@atlaskit/platform-feature-flags';
12
13
  import { RendererCssClassName } from '../../consts';
13
14
  // Ignored via go/ees005
14
15
  // eslint-disable-next-line @repo/internal/react/no-class-components
@@ -27,8 +28,8 @@ var TableRow = /*#__PURE__*/function (_React$Component) {
27
28
  var _this$props = _this.props,
28
29
  allowColumnSorting = _this$props.allowColumnSorting,
29
30
  rowIndex = _this$props.index;
30
- if (allowColumnSorting) {
31
- var isHeaderRow = !rowIndex;
31
+ var isHeaderRow = !rowIndex;
32
+ if (allowColumnSorting && (!fg('cc_complexit_fe_improve_table_sorting') || isHeaderRow)) {
32
33
  childrenArray = childrenArray.map(function (child, index) {
33
34
  if ( /*#__PURE__*/React.isValidElement(child)) {
34
35
  var tableOrderStatus = _this.props.tableOrderStatus;
@@ -48,7 +49,8 @@ var TableRow = /*#__PURE__*/function (_React$Component) {
48
49
  return childrenArray;
49
50
  });
50
51
  _defineProperty(_this, "addColGroupWidth", function (childrenArray) {
51
- if (_this.state.colGroupWidths) {
52
+ var _this$state$colGroupW;
53
+ if (fg('platform_editor_table_column_group_width_check') ? (_this$state$colGroupW = _this.state.colGroupWidths) === null || _this$state$colGroupW === void 0 ? void 0 : _this$state$colGroupW.length : _this.state.colGroupWidths) {
52
54
  childrenArray = childrenArray.map(function (child, index) {
53
55
  if ( /*#__PURE__*/React.isValidElement(child)) {
54
56
  return /*#__PURE__*/React.cloneElement(child, {
@@ -57,7 +57,7 @@ import { removeEmptySpaceAroundContent } from './rendererHelper';
57
57
  export var NORMAL_SEVERITY_THRESHOLD = 2000;
58
58
  export var DEGRADED_SEVERITY_THRESHOLD = 3000;
59
59
  var packageName = "@atlaskit/renderer";
60
- var packageVersion = "114.7.9";
60
+ var packageVersion = "114.9.0";
61
61
  var setAsQueryContainerStyles = css({
62
62
  containerName: 'ak-renderer-wrapper',
63
63
  containerType: 'inline-size',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "114.7.9",
3
+ "version": "114.9.0",
4
4
  "description": "Renderer component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -31,7 +31,7 @@
31
31
  "@atlaskit/analytics-next": "^11.0.0",
32
32
  "@atlaskit/button": "^23.0.0",
33
33
  "@atlaskit/code": "^17.0.0",
34
- "@atlaskit/editor-common": "^103.4.0",
34
+ "@atlaskit/editor-common": "^103.6.0",
35
35
  "@atlaskit/editor-json-transformer": "^8.24.0",
36
36
  "@atlaskit/editor-palette": "^2.1.0",
37
37
  "@atlaskit/editor-prosemirror": "7.0.0",
@@ -39,7 +39,7 @@
39
39
  "@atlaskit/emoji": "^69.0.0",
40
40
  "@atlaskit/feature-gate-js-client": "^5.0.0",
41
41
  "@atlaskit/icon": "^25.5.0",
42
- "@atlaskit/link-datasource": "^4.1.0",
42
+ "@atlaskit/link-datasource": "^4.3.0",
43
43
  "@atlaskit/media-card": "^79.0.0",
44
44
  "@atlaskit/media-client": "^32.0.0",
45
45
  "@atlaskit/media-client-react": "^4.0.0",
@@ -49,12 +49,12 @@
49
49
  "@atlaskit/media-viewer": "^52.0.0",
50
50
  "@atlaskit/platform-feature-flags": "^1.1.0",
51
51
  "@atlaskit/platform-feature-flags-react": "^0.1.0",
52
- "@atlaskit/react-ufo": "^3.4.0",
53
- "@atlaskit/smart-card": "^36.5.0",
52
+ "@atlaskit/react-ufo": "^3.5.0",
53
+ "@atlaskit/smart-card": "^36.6.0",
54
54
  "@atlaskit/status": "^3.0.0",
55
55
  "@atlaskit/task-decision": "^19.1.0",
56
56
  "@atlaskit/theme": "^18.0.0",
57
- "@atlaskit/tmp-editor-statsig": "^4.6.0",
57
+ "@atlaskit/tmp-editor-statsig": "^4.7.0",
58
58
  "@atlaskit/tokens": "^4.7.0",
59
59
  "@atlaskit/tooltip": "^20.0.0",
60
60
  "@atlaskit/visually-hidden": "^3.0.0",
@@ -120,6 +120,9 @@
120
120
  }
121
121
  },
122
122
  "platform-feature-flags": {
123
+ "cc_complexit_fe_improve_table_sorting": {
124
+ "type": "boolean"
125
+ },
123
126
  "platform_editor_typography_ugc": {
124
127
  "type": "boolean"
125
128
  },
@@ -132,9 +135,6 @@
132
135
  "editor_inline_comments_on_inline_nodes": {
133
136
  "type": "boolean"
134
137
  },
135
- "forbid_comments_on_empty_newlines": {
136
- "type": "boolean"
137
- },
138
138
  "annotations_align_editor_and_renderer_styles": {
139
139
  "type": "boolean"
140
140
  },
@@ -209,6 +209,9 @@
209
209
  },
210
210
  "platform_renderer_triple_click_selects_paragraph": {
211
211
  "type": "boolean"
212
+ },
213
+ "platform_editor_table_column_group_width_check": {
214
+ "type": "boolean"
212
215
  }
213
216
  },
214
217
  "af:exports": {