@atlaskit/renderer 125.3.1 → 125.3.2
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 +8 -0
- package/dist/cjs/react/index.js +3 -2
- package/dist/cjs/react/renderer-node.js +9 -1
- package/dist/cjs/ui/Renderer/index.js +1 -1
- package/dist/es2019/react/index.js +4 -3
- package/dist/es2019/react/renderer-node.js +2 -0
- package/dist/es2019/ui/Renderer/index.js +1 -1
- package/dist/esm/react/index.js +4 -3
- package/dist/esm/react/renderer-node.js +8 -0
- package/dist/esm/ui/Renderer/index.js +1 -1
- package/dist/types/react/renderer-node.d.ts +1 -0
- package/dist/types-ts4.5/react/renderer-node.d.ts +1 -0
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/renderer
|
|
2
2
|
|
|
3
|
+
## 125.3.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`8a3fc4137f1b4`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8a3fc4137f1b4) -
|
|
8
|
+
[ux] [EDITOR-3850] disable sticky headers for tables in expands in the renderer
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
3
11
|
## 125.3.1
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
package/dist/cjs/react/index.js
CHANGED
|
@@ -428,8 +428,9 @@ var ReactSerializer = exports.default = /*#__PURE__*/function () {
|
|
|
428
428
|
var isInsideMultiBodiedExtension = (0, _rendererNode.insideMultiBodiedExtension)(path, node.type.schema);
|
|
429
429
|
var isInsideOfTable = (0, _rendererNode.insideTable)(path, node.type.schema);
|
|
430
430
|
|
|
431
|
-
// TODO:
|
|
432
|
-
var
|
|
431
|
+
// TODO: EDITOR-3850 - support sticky headers inside breakouts (layouts and expands)
|
|
432
|
+
var isInsideBreakoutExpand = (0, _expValEquals.expValEquals)('platform_editor_table_sticky_header_improvements', 'cohort', 'test_with_overflow') && (0, _expValEquals.expValEquals)('platform_editor_table_sticky_header_patch_11', 'isEnabled', true) && (0, _rendererNode.insideBreakoutExpand)(path);
|
|
433
|
+
var stickyHeaders = !isInsideOfTable && !(0, _rendererNode.insideBreakoutLayout)(path) && !isInsideBreakoutExpand ? this.stickyHeaders : undefined;
|
|
433
434
|
return _objectSpread(_objectSpread({}, this.getProps(node)), {}, {
|
|
434
435
|
allowColumnSorting: this.allowColumnSorting,
|
|
435
436
|
columnWidths: (0, _utils.getColumnWidths)(node),
|
|
@@ -3,10 +3,13 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.insideTable = exports.insideMultiBodiedExtension = exports.insideBreakoutLayout = exports.insideBlockNode = void 0;
|
|
6
|
+
exports.insideTable = exports.insideMultiBodiedExtension = exports.insideBreakoutLayout = exports.insideBreakoutExpand = exports.insideBlockNode = void 0;
|
|
7
7
|
var isLayoutNode = function isLayoutNode(node) {
|
|
8
8
|
return node.type.name === 'layoutSection';
|
|
9
9
|
};
|
|
10
|
+
var isExpandNode = function isExpandNode(node) {
|
|
11
|
+
return node.type.name === 'expand';
|
|
12
|
+
};
|
|
10
13
|
var hasBreakOutMark = function hasBreakOutMark(node) {
|
|
11
14
|
return node.marks.some(function (m) {
|
|
12
15
|
return m.type.name === 'breakout';
|
|
@@ -17,6 +20,11 @@ var insideBreakoutLayout = exports.insideBreakoutLayout = function insideBreakou
|
|
|
17
20
|
return isLayoutNode(item) && hasBreakOutMark(item);
|
|
18
21
|
});
|
|
19
22
|
};
|
|
23
|
+
var insideBreakoutExpand = exports.insideBreakoutExpand = function insideBreakoutExpand(path) {
|
|
24
|
+
return path.some(function (item) {
|
|
25
|
+
return isExpandNode(item) && hasBreakOutMark(item);
|
|
26
|
+
});
|
|
27
|
+
};
|
|
20
28
|
var insideBlockNode = exports.insideBlockNode = function insideBlockNode(path, schema) {
|
|
21
29
|
var _schema$nodes = schema.nodes,
|
|
22
30
|
expand = _schema$nodes.expand,
|
|
@@ -70,7 +70,7 @@ var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
70
70
|
var TABLE_INFO_TIMEOUT = 10000;
|
|
71
71
|
var RENDER_EVENT_SAMPLE_RATE = 0.2;
|
|
72
72
|
var packageName = "@atlaskit/renderer";
|
|
73
|
-
var packageVersion = "125.3.
|
|
73
|
+
var packageVersion = "125.3.1";
|
|
74
74
|
var setAsQueryContainerStyles = (0, _react2.css)({
|
|
75
75
|
containerName: 'ak-renderer-wrapper',
|
|
76
76
|
containerType: 'inline-size'
|
|
@@ -14,7 +14,7 @@ import { fg } from '@atlaskit/platform-feature-flags';
|
|
|
14
14
|
import { getText } from '../utils';
|
|
15
15
|
import { isAnnotationMark, toReact as markToReact } from './marks';
|
|
16
16
|
import { isCodeMark } from './marks/code';
|
|
17
|
-
import { insideBlockNode, insideBreakoutLayout, insideMultiBodiedExtension, insideTable } from './renderer-node';
|
|
17
|
+
import { insideBlockNode, insideBreakoutExpand, insideBreakoutLayout, insideMultiBodiedExtension, insideTable } from './renderer-node';
|
|
18
18
|
import { renderTextSegments } from './utils/render-text-segments';
|
|
19
19
|
import { segmentText } from './utils/segment-text';
|
|
20
20
|
import { getStandaloneBackgroundColorMarks } from './utils/getStandaloneBackgroundColorMarks';
|
|
@@ -394,8 +394,9 @@ export default class ReactSerializer {
|
|
|
394
394
|
const isInsideMultiBodiedExtension = insideMultiBodiedExtension(path, node.type.schema);
|
|
395
395
|
const isInsideOfTable = insideTable(path, node.type.schema);
|
|
396
396
|
|
|
397
|
-
// TODO:
|
|
398
|
-
const
|
|
397
|
+
// TODO: EDITOR-3850 - support sticky headers inside breakouts (layouts and expands)
|
|
398
|
+
const isInsideBreakoutExpand = expValEquals('platform_editor_table_sticky_header_improvements', 'cohort', 'test_with_overflow') && expValEquals('platform_editor_table_sticky_header_patch_11', 'isEnabled', true) && insideBreakoutExpand(path);
|
|
399
|
+
const stickyHeaders = !isInsideOfTable && !insideBreakoutLayout(path) && !isInsideBreakoutExpand ? this.stickyHeaders : undefined;
|
|
399
400
|
return {
|
|
400
401
|
...this.getProps(node),
|
|
401
402
|
allowColumnSorting: this.allowColumnSorting,
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
const isLayoutNode = node => node.type.name === 'layoutSection';
|
|
2
|
+
const isExpandNode = node => node.type.name === 'expand';
|
|
2
3
|
const hasBreakOutMark = node => node.marks.some(m => m.type.name === 'breakout');
|
|
3
4
|
export const insideBreakoutLayout = path => path.some(item => isLayoutNode(item) && hasBreakOutMark(item));
|
|
5
|
+
export const insideBreakoutExpand = path => path.some(item => isExpandNode(item) && hasBreakOutMark(item));
|
|
4
6
|
export const insideBlockNode = (path, schema) => {
|
|
5
7
|
const {
|
|
6
8
|
nodes: {
|
|
@@ -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.2;
|
|
58
58
|
const packageName = "@atlaskit/renderer";
|
|
59
|
-
const packageVersion = "125.3.
|
|
59
|
+
const packageVersion = "125.3.1";
|
|
60
60
|
const setAsQueryContainerStyles = css({
|
|
61
61
|
containerName: 'ak-renderer-wrapper',
|
|
62
62
|
containerType: 'inline-size'
|
package/dist/esm/react/index.js
CHANGED
|
@@ -21,7 +21,7 @@ import { fg } from '@atlaskit/platform-feature-flags';
|
|
|
21
21
|
import { getText } from '../utils';
|
|
22
22
|
import { isAnnotationMark, toReact as markToReact } from './marks';
|
|
23
23
|
import { isCodeMark } from './marks/code';
|
|
24
|
-
import { insideBlockNode, insideBreakoutLayout, insideMultiBodiedExtension, insideTable } from './renderer-node';
|
|
24
|
+
import { insideBlockNode, insideBreakoutExpand, insideBreakoutLayout, insideMultiBodiedExtension, insideTable } from './renderer-node';
|
|
25
25
|
import { renderTextSegments } from './utils/render-text-segments';
|
|
26
26
|
import { segmentText } from './utils/segment-text';
|
|
27
27
|
import { getStandaloneBackgroundColorMarks } from './utils/getStandaloneBackgroundColorMarks';
|
|
@@ -421,8 +421,9 @@ var ReactSerializer = /*#__PURE__*/function () {
|
|
|
421
421
|
var isInsideMultiBodiedExtension = insideMultiBodiedExtension(path, node.type.schema);
|
|
422
422
|
var isInsideOfTable = insideTable(path, node.type.schema);
|
|
423
423
|
|
|
424
|
-
// TODO:
|
|
425
|
-
var
|
|
424
|
+
// TODO: EDITOR-3850 - support sticky headers inside breakouts (layouts and expands)
|
|
425
|
+
var isInsideBreakoutExpand = expValEquals('platform_editor_table_sticky_header_improvements', 'cohort', 'test_with_overflow') && expValEquals('platform_editor_table_sticky_header_patch_11', 'isEnabled', true) && insideBreakoutExpand(path);
|
|
426
|
+
var stickyHeaders = !isInsideOfTable && !insideBreakoutLayout(path) && !isInsideBreakoutExpand ? this.stickyHeaders : undefined;
|
|
426
427
|
return _objectSpread(_objectSpread({}, this.getProps(node)), {}, {
|
|
427
428
|
allowColumnSorting: this.allowColumnSorting,
|
|
428
429
|
columnWidths: getColumnWidths(node),
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
var isLayoutNode = function isLayoutNode(node) {
|
|
2
2
|
return node.type.name === 'layoutSection';
|
|
3
3
|
};
|
|
4
|
+
var isExpandNode = function isExpandNode(node) {
|
|
5
|
+
return node.type.name === 'expand';
|
|
6
|
+
};
|
|
4
7
|
var hasBreakOutMark = function hasBreakOutMark(node) {
|
|
5
8
|
return node.marks.some(function (m) {
|
|
6
9
|
return m.type.name === 'breakout';
|
|
@@ -11,6 +14,11 @@ export var insideBreakoutLayout = function insideBreakoutLayout(path) {
|
|
|
11
14
|
return isLayoutNode(item) && hasBreakOutMark(item);
|
|
12
15
|
});
|
|
13
16
|
};
|
|
17
|
+
export var insideBreakoutExpand = function insideBreakoutExpand(path) {
|
|
18
|
+
return path.some(function (item) {
|
|
19
|
+
return isExpandNode(item) && hasBreakOutMark(item);
|
|
20
|
+
});
|
|
21
|
+
};
|
|
14
22
|
export var insideBlockNode = function insideBlockNode(path, schema) {
|
|
15
23
|
var _schema$nodes = schema.nodes,
|
|
16
24
|
expand = _schema$nodes.expand,
|
|
@@ -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.2;
|
|
63
63
|
var packageName = "@atlaskit/renderer";
|
|
64
|
-
var packageVersion = "125.3.
|
|
64
|
+
var packageVersion = "125.3.1";
|
|
65
65
|
var setAsQueryContainerStyles = css({
|
|
66
66
|
containerName: 'ak-renderer-wrapper',
|
|
67
67
|
containerType: 'inline-size'
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Node, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
export declare const insideBreakoutLayout: (path: Node[]) => boolean;
|
|
3
|
+
export declare const insideBreakoutExpand: (path: Node[]) => boolean;
|
|
3
4
|
export declare const insideBlockNode: (path: Node[], schema: Schema) => boolean;
|
|
4
5
|
export declare const insideMultiBodiedExtension: (path: Node[], schema: Schema) => boolean;
|
|
5
6
|
export declare const insideTable: (path: Node[], schema: Schema) => boolean;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Node, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
export declare const insideBreakoutLayout: (path: Node[]) => boolean;
|
|
3
|
+
export declare const insideBreakoutExpand: (path: Node[]) => boolean;
|
|
3
4
|
export declare const insideBlockNode: (path: Node[], schema: Schema) => boolean;
|
|
4
5
|
export declare const insideMultiBodiedExtension: (path: Node[], schema: Schema) => boolean;
|
|
5
6
|
export declare const insideTable: (path: Node[], schema: Schema) => boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/renderer",
|
|
3
|
-
"version": "125.3.
|
|
3
|
+
"version": "125.3.2",
|
|
4
4
|
"description": "Renderer component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -54,12 +54,12 @@
|
|
|
54
54
|
"@atlaskit/platform-feature-flags-react": "^0.4.0",
|
|
55
55
|
"@atlaskit/react-ufo": "^4.17.0",
|
|
56
56
|
"@atlaskit/smart-card": "^43.20.0",
|
|
57
|
-
"@atlaskit/status": "^3.
|
|
57
|
+
"@atlaskit/status": "^3.1.0",
|
|
58
58
|
"@atlaskit/task-decision": "^19.2.0",
|
|
59
59
|
"@atlaskit/theme": "^21.0.0",
|
|
60
|
-
"@atlaskit/tmp-editor-statsig": "^16.
|
|
60
|
+
"@atlaskit/tmp-editor-statsig": "^16.18.0",
|
|
61
61
|
"@atlaskit/tokens": "^9.1.0",
|
|
62
|
-
"@atlaskit/tooltip": "^20.
|
|
62
|
+
"@atlaskit/tooltip": "^20.14.0",
|
|
63
63
|
"@atlaskit/visually-hidden": "^3.0.0",
|
|
64
64
|
"@babel/runtime": "^7.0.0",
|
|
65
65
|
"@emotion/react": "^11.7.1",
|