@atlaskit/renderer 137.1.8 → 137.1.10

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.
Files changed (43) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist/cjs/react/index.js +1 -1
  3. package/dist/cjs/react/nodes/table/colgroup.js +1 -2
  4. package/dist/cjs/react/nodes/table/sticky.js +2 -4
  5. package/dist/cjs/react/nodes/table/table.js +1 -12
  6. package/dist/cjs/react/nodes/table.js +471 -203
  7. package/dist/cjs/ui/Expand.js +33 -7
  8. package/dist/cjs/ui/Renderer/breakout-ssr.js +1 -2
  9. package/dist/cjs/ui/Renderer/index.js +3 -3
  10. package/dist/cjs/ui/utils/expand-body.js +218 -0
  11. package/dist/cjs/ui/utils/expand-search-text.js +39 -1
  12. package/dist/es2019/react/index.js +1 -1
  13. package/dist/es2019/react/nodes/table/colgroup.js +1 -2
  14. package/dist/es2019/react/nodes/table/sticky.js +2 -3
  15. package/dist/es2019/react/nodes/table/table.js +1 -12
  16. package/dist/es2019/react/nodes/table.js +457 -190
  17. package/dist/es2019/ui/Expand.js +33 -7
  18. package/dist/es2019/ui/Renderer/breakout-ssr.js +1 -2
  19. package/dist/es2019/ui/Renderer/index.js +3 -3
  20. package/dist/es2019/ui/utils/expand-body.js +198 -0
  21. package/dist/es2019/ui/utils/expand-search-text.js +38 -0
  22. package/dist/esm/react/index.js +1 -1
  23. package/dist/esm/react/nodes/table/colgroup.js +1 -2
  24. package/dist/esm/react/nodes/table/sticky.js +2 -4
  25. package/dist/esm/react/nodes/table/table.js +1 -12
  26. package/dist/esm/react/nodes/table.js +471 -202
  27. package/dist/esm/ui/Expand.js +33 -7
  28. package/dist/esm/ui/Renderer/breakout-ssr.js +1 -2
  29. package/dist/esm/ui/Renderer/index.js +3 -3
  30. package/dist/esm/ui/utils/expand-body.js +210 -0
  31. package/dist/esm/ui/utils/expand-search-text.js +38 -0
  32. package/dist/types/react/nodes/table/sticky.d.ts +1 -2
  33. package/dist/types/react/nodes/table.d.ts +78 -8
  34. package/dist/types/ui/{expand-body.d.ts → utils/expand-body.d.ts} +26 -5
  35. package/dist/types/ui/utils/expand-search-text.d.ts +14 -0
  36. package/package.json +6 -9
  37. package/dist/cjs/react/nodes/tableNew.js +0 -1050
  38. package/dist/cjs/ui/expand-body.js +0 -122
  39. package/dist/es2019/react/nodes/tableNew.js +0 -986
  40. package/dist/es2019/ui/expand-body.js +0 -107
  41. package/dist/esm/react/nodes/tableNew.js +0 -1044
  42. package/dist/esm/ui/expand-body.js +0 -114
  43. package/dist/types/react/nodes/tableNew.d.ts +0 -189
package/CHANGELOG.md CHANGED
@@ -1,5 +1,33 @@
1
1
  # @atlaskit/renderer
2
2
 
3
+ ## 137.1.10
4
+
5
+ ### Patch Changes
6
+
7
+ - [`2e56a5fbd0f35`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/2e56a5fbd0f35) -
8
+ Clean up feature gate `platform-ssr-table-resize`
9
+ - Updated dependencies
10
+
11
+ ## 137.1.9
12
+
13
+ ### Patch Changes
14
+
15
+ - [`c967639892512`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c967639892512) -
16
+ Cleanup experiment `platform_editor_table_q4_patch_5` and permanently restrict sticky table
17
+ headers to the first header row.
18
+ - [`5b8bba86d7b3d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5b8bba86d7b3d) -
19
+ A table in the body of a collapsed expand no longer renders in full just because a nested expand
20
+ sits in one of its rows. It shows the text of its rows instead, keeping only the rows that hold a
21
+ nested expand — those still need an element of their own for browser find to reveal. Opening the
22
+ expand renders the table, and a nested expand that find had opened stays open through it.
23
+
24
+ Behind the `platform_editor_defer_collapsed_expand_body` experiment, which controls whether a
25
+ collapsed expand holds its body back at all. The find-in-page behaviour described here also needs
26
+ `platform_editor_close_expand_find`, which is what applies `hidden="until-found"` to the collapsed
27
+ body.
28
+
29
+ - Updated dependencies
30
+
3
31
  ## 137.1.8
4
32
 
5
33
  ### Patch Changes
@@ -15,7 +15,7 @@ var _react = _interopRequireDefault(require("react"));
15
15
  var _model = require("@atlaskit/editor-prosemirror/model");
16
16
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
17
17
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
18
- var _expandBody = require("../ui/expand-body");
18
+ var _expandBody = require("../ui/utils/expand-body");
19
19
  var _nodes = require("./nodes");
20
20
  var _textWrapper = _interopRequireDefault(require("./nodes/text-wrapper"));
21
21
  var _links = require("./utils/links");
@@ -289,11 +289,10 @@ var renderScaleDownColgroup = function renderScaleDownColgroup(props) {
289
289
  }
290
290
  // scaling down
291
291
  else if (renderWidth < tableWidth && !isTableWidthFixed) {
292
- var shouldTable100ScaleDown = rendererAppearance === 'comment' && allowTableResizing && !(tableNode !== null && tableNode !== void 0 && tableNode.attrs.width);
293
292
  scaleDownPercent = calcScalePercent({
294
293
  renderWidth: renderWidth,
295
294
  tableWidth: tableWidth,
296
- maxScale: (0, _fg.fg)('platform-ssr-table-resize') ? maxScalingPercent : shouldTable100ScaleDown ? 1 : maxScalingPercent,
295
+ maxScale: maxScalingPercent,
297
296
  isNumberColumnEnabled: isNumberColumnEnabled
298
297
  });
299
298
  }
@@ -118,8 +118,6 @@ var StickyTable = exports.StickyTable = function StickyTable(_ref) {
118
118
  tableNode = _ref.tableNode,
119
119
  rendererAppearance = _ref.rendererAppearance,
120
120
  allowTableResizing = _ref.allowTableResizing,
121
- _ref$fixTableSSRResiz = _ref.fixTableSSRResizing,
122
- fixTableSSRResizing = _ref$fixTableSSRResiz === void 0 ? false : _ref$fixTableSSRResiz,
123
121
  allowFixedColumnWidthOption = _ref.allowFixedColumnWidthOption;
124
122
  var styles;
125
123
  /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
@@ -155,7 +153,7 @@ var StickyTable = exports.StickyTable = function StickyTable(_ref) {
155
153
  style: {
156
154
  width: tableWidth,
157
155
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
158
- marginBottom: fixTableSSRResizing ? 0 : ''
156
+ marginBottom: 0
159
157
  }
160
158
  }, (0, _react2.jsx)("div", {
161
159
  ref: innerRef
@@ -173,7 +171,7 @@ var StickyTable = exports.StickyTable = function StickyTable(_ref) {
173
171
  renderWidth: renderWidth,
174
172
  tableNode: tableNode,
175
173
  rendererAppearance: rendererAppearance,
176
- fixTableSSRResizing: fixTableSSRResizing,
174
+ fixTableSSRResizing: true,
177
175
  allowFixedColumnWidthOption: allowFixedColumnWidthOption
178
176
  },
179
177
  /**
@@ -39,21 +39,10 @@ var Table = exports.Table = /*#__PURE__*/_react.default.memo(function (_ref) {
39
39
  if (rendererAppearance === 'comment' && allowTableResizing && tableNode && !((_tableNode$attrs = tableNode.attrs) !== null && _tableNode$attrs !== void 0 && _tableNode$attrs.width)) {
40
40
  tableWidth = 'inherit';
41
41
  }
42
- if (rendererAppearance === 'comment' && !allowTableResizing) {
43
- // in the case we have css container stylings,
44
- // we don't need to calculate width here as this
45
- // is done via css
46
- if (!(0, _fg.fg)('platform-ssr-table-resize')) {
47
- tableWidth = renderWidth;
48
- }
49
- }
50
-
51
42
  // for columns that are evenly distributed, do not return `colgroup` since existing table containerQuery
52
43
  // scales up the columns width. This ensures columns always have 42px.
53
44
  if (rendererAppearance === 'comment') {
54
- if ((0, _fg.fg)('platform-ssr-table-resize')) {
55
- tableColumnWidths = columnWidths && (0, _colgroup.colWidthSum)(columnWidths) ? columnWidths : undefined;
56
- }
45
+ tableColumnWidths = columnWidths && (0, _colgroup.colWidthSum)(columnWidths) ? columnWidths : undefined;
57
46
  }
58
47
  var tableLayout = tableNode === null || tableNode === void 0 ? void 0 : tableNode.attrs.layout;
59
48
  var tableDisplayMode = tableNode === null || tableNode === void 0 ? void 0 : tableNode.attrs.displayMode;