@atlaskit/renderer 114.6.0 → 114.6.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 +18 -0
- package/dist/cjs/react/nodes/heading-anchor.js +6 -2
- package/dist/cjs/react/nodes/heading.js +2 -1
- package/dist/cjs/react/nodes/table/colgroup.js +1 -2
- package/dist/cjs/ui/Renderer/index.js +1 -1
- package/dist/es2019/react/nodes/heading-anchor.js +4 -1
- package/dist/es2019/react/nodes/heading.js +2 -1
- package/dist/es2019/react/nodes/table/colgroup.js +1 -2
- package/dist/es2019/ui/Renderer/index.js +1 -1
- package/dist/esm/react/nodes/heading-anchor.js +6 -2
- package/dist/esm/react/nodes/heading.js +2 -1
- package/dist/esm/react/nodes/table/colgroup.js +1 -2
- package/dist/esm/ui/Renderer/index.js +1 -1
- package/dist/types/react/nodes/heading-anchor.d.ts +1 -0
- package/dist/types-ts4.5/react/nodes/heading-anchor.d.ts +1 -0
- package/package.json +4 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/renderer
|
|
2
2
|
|
|
3
|
+
## 114.6.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#132126](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/132126)
|
|
8
|
+
[`5d45dce9796da`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5d45dce9796da) -
|
|
9
|
+
Updated dependency json-ld-types to @atlaskit/json-ld-types
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 114.6.1
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [#132819](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/132819)
|
|
17
|
+
[`f873ba0617c6b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f873ba0617c6b) -
|
|
18
|
+
ED-2684 Cleaned up platform_editor_nested_tables_renderer_colgroup to true behaviour.
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
3
21
|
## 114.6.0
|
|
4
22
|
|
|
5
23
|
### Minor Changes
|
|
@@ -18,6 +18,7 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
|
|
|
18
18
|
var _react = _interopRequireDefault(require("react"));
|
|
19
19
|
var _react2 = require("@emotion/react");
|
|
20
20
|
var _colors = require("@atlaskit/theme/colors");
|
|
21
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
21
22
|
var _link = _interopRequireDefault(require("@atlaskit/icon/core/migration/link"));
|
|
22
23
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
23
24
|
var _reactIntlNext = require("react-intl-next");
|
|
@@ -108,8 +109,10 @@ var HeadingAnchor = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
108
109
|
_this.setTooltipState(_messages.headingAnchorLinkMessages.copyHeadingLinkToClipboard);
|
|
109
110
|
});
|
|
110
111
|
(0, _defineProperty2.default)(_this, "renderAnchorButton", function () {
|
|
111
|
-
var _this$props
|
|
112
|
-
|
|
112
|
+
var _this$props = _this.props,
|
|
113
|
+
_this$props$hideFromS = _this$props.hideFromScreenReader,
|
|
114
|
+
hideFromScreenReader = _this$props$hideFromS === void 0 ? false : _this$props$hideFromS,
|
|
115
|
+
headingId = _this$props.headingId;
|
|
113
116
|
return (0, _react2.jsx)("button", {
|
|
114
117
|
"data-testid": "anchor-button",
|
|
115
118
|
css: copyAnchorButtonStyles,
|
|
@@ -118,6 +121,7 @@ var HeadingAnchor = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
118
121
|
"aria-hidden": hideFromScreenReader,
|
|
119
122
|
tabIndex: hideFromScreenReader ? undefined : -1,
|
|
120
123
|
"aria-label": hideFromScreenReader ? undefined : _this.state.tooltipMessage,
|
|
124
|
+
"aria-labelledby": (0, _platformFeatureFlags.fg)('platform_editor_accessible_heading_copy_link') ? hideFromScreenReader ? undefined : headingId : undefined,
|
|
121
125
|
type: "button"
|
|
122
126
|
}, (0, _react2.jsx)(_link.default, {
|
|
123
127
|
label: _this.getCopyAriaLabel(),
|
|
@@ -47,7 +47,8 @@ function WrappedHeadingAnchor(_ref) {
|
|
|
47
47
|
});
|
|
48
48
|
return (0, _clipboard.copyTextToClipboard)(getCurrentUrlWithHash(headingId));
|
|
49
49
|
},
|
|
50
|
-
hideFromScreenReader: hideFromScreenReader
|
|
50
|
+
hideFromScreenReader: hideFromScreenReader,
|
|
51
|
+
headingId: headingId
|
|
51
52
|
});
|
|
52
53
|
});
|
|
53
54
|
}
|
|
@@ -11,7 +11,6 @@ var _styles = require("@atlaskit/editor-common/styles");
|
|
|
11
11
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
12
12
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
13
13
|
var _nodeWidth = require("@atlaskit/editor-common/node-width");
|
|
14
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
15
14
|
var _useFeatureFlags = require("../../../use-feature-flags");
|
|
16
15
|
var _rendererContext = require("../../../renderer-context");
|
|
17
16
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
@@ -90,7 +89,7 @@ var renderScaleDownColgroup = function renderScaleDownColgroup(props) {
|
|
|
90
89
|
// appearance == comment && !allowTableResizing && !tableNode?.attrs.width, means it is a inline comment
|
|
91
90
|
// When comment and inline comment table width inherits from the parent container, we want tableContainerWidth === renderWidth
|
|
92
91
|
var tableContainerWidth = rendererAppearance === 'comment' && !(tableNode !== null && tableNode !== void 0 && tableNode.attrs.width) || isRendererNested ? renderWidth : (0, _nodeWidth.getTableContainerWidth)(tableNode);
|
|
93
|
-
if (allowTableResizing && !isInsideOfBlockNode && !
|
|
92
|
+
if (allowTableResizing && !isInsideOfBlockNode && !isInsideOfTable && !isinsideMultiBodiedExtension && !tableColumnResized) {
|
|
94
93
|
// when no columns are resized, each column should have equal width, equals to tableWidth / noOfColumns
|
|
95
94
|
var _tableWidth2 = (isNumberColumnEnabled ? tableContainerWidth - _editorSharedStyles.akEditorTableNumberColumnWidth : tableContainerWidth) - 1;
|
|
96
95
|
var defaultColumnWidth = _tableWidth2 / noOfColumns;
|
|
@@ -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.6.
|
|
70
|
+
var packageVersion = "114.6.2";
|
|
71
71
|
var setAsQueryContainerStyles = (0, _react2.css)({
|
|
72
72
|
containerName: 'ak-renderer-wrapper',
|
|
73
73
|
containerType: 'inline-size',
|
|
@@ -9,6 +9,7 @@ import React from 'react';
|
|
|
9
9
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
10
10
|
import { css, jsx } from '@emotion/react';
|
|
11
11
|
import { N200, N500, B400 } from '@atlaskit/theme/colors';
|
|
12
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
13
|
import LinkIcon from '@atlaskit/icon/core/migration/link';
|
|
13
14
|
import Tooltip from '@atlaskit/tooltip';
|
|
14
15
|
import { injectIntl } from 'react-intl-next';
|
|
@@ -74,7 +75,8 @@ class HeadingAnchor extends React.PureComponent {
|
|
|
74
75
|
});
|
|
75
76
|
_defineProperty(this, "renderAnchorButton", () => {
|
|
76
77
|
const {
|
|
77
|
-
hideFromScreenReader = false
|
|
78
|
+
hideFromScreenReader = false,
|
|
79
|
+
headingId
|
|
78
80
|
} = this.props;
|
|
79
81
|
return jsx("button", {
|
|
80
82
|
"data-testid": "anchor-button",
|
|
@@ -84,6 +86,7 @@ class HeadingAnchor extends React.PureComponent {
|
|
|
84
86
|
"aria-hidden": hideFromScreenReader,
|
|
85
87
|
tabIndex: hideFromScreenReader ? undefined : -1,
|
|
86
88
|
"aria-label": hideFromScreenReader ? undefined : this.state.tooltipMessage,
|
|
89
|
+
"aria-labelledby": fg('platform_editor_accessible_heading_copy_link') ? hideFromScreenReader ? undefined : headingId : undefined,
|
|
87
90
|
type: "button"
|
|
88
91
|
}, jsx(LinkIcon, {
|
|
89
92
|
label: this.getCopyAriaLabel(),
|
|
@@ -38,7 +38,8 @@ function WrappedHeadingAnchor({
|
|
|
38
38
|
});
|
|
39
39
|
return copyTextToClipboard(getCurrentUrlWithHash(headingId));
|
|
40
40
|
},
|
|
41
|
-
hideFromScreenReader: hideFromScreenReader
|
|
41
|
+
hideFromScreenReader: hideFromScreenReader,
|
|
42
|
+
headingId: headingId
|
|
42
43
|
}));
|
|
43
44
|
}
|
|
44
45
|
function Heading(props) {
|
|
@@ -3,7 +3,6 @@ import { tableCellBorderWidth, tableCellMinWidth } from '@atlaskit/editor-common
|
|
|
3
3
|
import { akEditorTableNumberColumnWidth, akEditorTableLegacyCellMinWidth } from '@atlaskit/editor-shared-styles';
|
|
4
4
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
5
5
|
import { getTableContainerWidth } from '@atlaskit/editor-common/node-width';
|
|
6
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
6
|
import { useFeatureFlags } from '../../../use-feature-flags';
|
|
8
7
|
import { useRendererContext } from '../../../renderer-context';
|
|
9
8
|
|
|
@@ -78,7 +77,7 @@ const renderScaleDownColgroup = props => {
|
|
|
78
77
|
// appearance == comment && !allowTableResizing && !tableNode?.attrs.width, means it is a inline comment
|
|
79
78
|
// When comment and inline comment table width inherits from the parent container, we want tableContainerWidth === renderWidth
|
|
80
79
|
const tableContainerWidth = rendererAppearance === 'comment' && !(tableNode !== null && tableNode !== void 0 && tableNode.attrs.width) || isRendererNested ? renderWidth : getTableContainerWidth(tableNode);
|
|
81
|
-
if (allowTableResizing && !isInsideOfBlockNode && !
|
|
80
|
+
if (allowTableResizing && !isInsideOfBlockNode && !isInsideOfTable && !isinsideMultiBodiedExtension && !tableColumnResized) {
|
|
82
81
|
// when no columns are resized, each column should have equal width, equals to tableWidth / noOfColumns
|
|
83
82
|
const tableWidth = (isNumberColumnEnabled ? tableContainerWidth - akEditorTableNumberColumnWidth : tableContainerWidth) - 1;
|
|
84
83
|
const defaultColumnWidth = tableWidth / noOfColumns;
|
|
@@ -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.6.
|
|
51
|
+
const packageVersion = "114.6.2";
|
|
52
52
|
const setAsQueryContainerStyles = css({
|
|
53
53
|
containerName: 'ak-renderer-wrapper',
|
|
54
54
|
containerType: 'inline-size',
|
|
@@ -20,6 +20,7 @@ import React from 'react';
|
|
|
20
20
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
21
21
|
import { css, jsx } from '@emotion/react';
|
|
22
22
|
import { N200, N500, B400 } from '@atlaskit/theme/colors';
|
|
23
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
23
24
|
import LinkIcon from '@atlaskit/icon/core/migration/link';
|
|
24
25
|
import Tooltip from '@atlaskit/tooltip';
|
|
25
26
|
import { injectIntl } from 'react-intl-next';
|
|
@@ -102,8 +103,10 @@ var HeadingAnchor = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
102
103
|
_this.setTooltipState(headingAnchorLinkMessages.copyHeadingLinkToClipboard);
|
|
103
104
|
});
|
|
104
105
|
_defineProperty(_this, "renderAnchorButton", function () {
|
|
105
|
-
var _this$props
|
|
106
|
-
|
|
106
|
+
var _this$props = _this.props,
|
|
107
|
+
_this$props$hideFromS = _this$props.hideFromScreenReader,
|
|
108
|
+
hideFromScreenReader = _this$props$hideFromS === void 0 ? false : _this$props$hideFromS,
|
|
109
|
+
headingId = _this$props.headingId;
|
|
107
110
|
return jsx("button", {
|
|
108
111
|
"data-testid": "anchor-button",
|
|
109
112
|
css: copyAnchorButtonStyles,
|
|
@@ -112,6 +115,7 @@ var HeadingAnchor = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
112
115
|
"aria-hidden": hideFromScreenReader,
|
|
113
116
|
tabIndex: hideFromScreenReader ? undefined : -1,
|
|
114
117
|
"aria-label": hideFromScreenReader ? undefined : _this.state.tooltipMessage,
|
|
118
|
+
"aria-labelledby": fg('platform_editor_accessible_heading_copy_link') ? hideFromScreenReader ? undefined : headingId : undefined,
|
|
115
119
|
type: "button"
|
|
116
120
|
}, jsx(LinkIcon, {
|
|
117
121
|
label: _this.getCopyAriaLabel(),
|
|
@@ -6,7 +6,6 @@ import { tableCellBorderWidth, tableCellMinWidth } from '@atlaskit/editor-common
|
|
|
6
6
|
import { akEditorTableNumberColumnWidth, akEditorTableLegacyCellMinWidth } from '@atlaskit/editor-shared-styles';
|
|
7
7
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
8
8
|
import { getTableContainerWidth } from '@atlaskit/editor-common/node-width';
|
|
9
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
9
|
import { useFeatureFlags } from '../../../use-feature-flags';
|
|
11
10
|
import { useRendererContext } from '../../../renderer-context';
|
|
12
11
|
|
|
@@ -84,7 +83,7 @@ var renderScaleDownColgroup = function renderScaleDownColgroup(props) {
|
|
|
84
83
|
// appearance == comment && !allowTableResizing && !tableNode?.attrs.width, means it is a inline comment
|
|
85
84
|
// When comment and inline comment table width inherits from the parent container, we want tableContainerWidth === renderWidth
|
|
86
85
|
var tableContainerWidth = rendererAppearance === 'comment' && !(tableNode !== null && tableNode !== void 0 && tableNode.attrs.width) || isRendererNested ? renderWidth : getTableContainerWidth(tableNode);
|
|
87
|
-
if (allowTableResizing && !isInsideOfBlockNode && !
|
|
86
|
+
if (allowTableResizing && !isInsideOfBlockNode && !isInsideOfTable && !isinsideMultiBodiedExtension && !tableColumnResized) {
|
|
88
87
|
// when no columns are resized, each column should have equal width, equals to tableWidth / noOfColumns
|
|
89
88
|
var _tableWidth2 = (isNumberColumnEnabled ? tableContainerWidth - akEditorTableNumberColumnWidth : tableContainerWidth) - 1;
|
|
90
89
|
var defaultColumnWidth = _tableWidth2 / noOfColumns;
|
|
@@ -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.6.
|
|
60
|
+
var packageVersion = "114.6.2";
|
|
61
61
|
var setAsQueryContainerStyles = css({
|
|
62
62
|
containerName: 'ak-renderer-wrapper',
|
|
63
63
|
containerType: 'inline-size',
|
|
@@ -6,6 +6,7 @@ type Props = {
|
|
|
6
6
|
enableNestedHeaderLinks?: boolean;
|
|
7
7
|
level: number;
|
|
8
8
|
hideFromScreenReader?: boolean;
|
|
9
|
+
headingId?: string;
|
|
9
10
|
};
|
|
10
11
|
type HeadingAnchorProps = Props & React.PropsWithChildren<unknown> & WrappedComponentProps;
|
|
11
12
|
declare const _default: React.FC<import("react-intl-next").WithIntlProps<HeadingAnchorProps>> & {
|
|
@@ -6,6 +6,7 @@ type Props = {
|
|
|
6
6
|
enableNestedHeaderLinks?: boolean;
|
|
7
7
|
level: number;
|
|
8
8
|
hideFromScreenReader?: boolean;
|
|
9
|
+
headingId?: string;
|
|
9
10
|
};
|
|
10
11
|
type HeadingAnchorProps = Props & React.PropsWithChildren<unknown> & WrappedComponentProps;
|
|
11
12
|
declare const _default: React.FC<import("react-intl-next").WithIntlProps<HeadingAnchorProps>> & {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/renderer",
|
|
3
|
-
"version": "114.6.
|
|
3
|
+
"version": "114.6.2",
|
|
4
4
|
"description": "Renderer component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -31,14 +31,14 @@
|
|
|
31
31
|
"@atlaskit/analytics-next": "^11.0.0",
|
|
32
32
|
"@atlaskit/button": "^22.0.0",
|
|
33
33
|
"@atlaskit/code": "^16.1.0",
|
|
34
|
-
"@atlaskit/editor-common": "^102.
|
|
34
|
+
"@atlaskit/editor-common": "^102.14.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",
|
|
38
38
|
"@atlaskit/editor-shared-styles": "^3.4.0",
|
|
39
39
|
"@atlaskit/emoji": "^69.0.0",
|
|
40
40
|
"@atlaskit/feature-gate-js-client": "^5.0.0",
|
|
41
|
-
"@atlaskit/icon": "^25.
|
|
41
|
+
"@atlaskit/icon": "^25.3.0",
|
|
42
42
|
"@atlaskit/link-datasource": "^4.1.0",
|
|
43
43
|
"@atlaskit/media-card": "^79.0.0",
|
|
44
44
|
"@atlaskit/media-client": "^32.0.0",
|
|
@@ -54,7 +54,7 @@
|
|
|
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.
|
|
57
|
+
"@atlaskit/tmp-editor-statsig": "^4.5.0",
|
|
58
58
|
"@atlaskit/tokens": "^4.5.0",
|
|
59
59
|
"@atlaskit/tooltip": "^20.0.0",
|
|
60
60
|
"@atlaskit/visually-hidden": "^3.0.0",
|
|
@@ -172,9 +172,6 @@
|
|
|
172
172
|
"platform_editor_accessible_heading_copy_link": {
|
|
173
173
|
"type": "boolean"
|
|
174
174
|
},
|
|
175
|
-
"platform_editor_nested_tables_renderer_colgroup": {
|
|
176
|
-
"type": "boolean"
|
|
177
|
-
},
|
|
178
175
|
"use_comments_data_annotation_updater": {
|
|
179
176
|
"type": "boolean"
|
|
180
177
|
},
|