@atlaskit/renderer 114.8.0 → 114.9.1
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 +23 -0
- package/dist/cjs/messages.js +1 -8
- package/dist/cjs/react/nodes/status.js +18 -26
- package/dist/cjs/react/nodes/tableRow.js +2 -1
- package/dist/cjs/render-document.js +50 -26
- package/dist/cjs/ui/Renderer/index.js +1 -1
- package/dist/es2019/messages.js +0 -7
- package/dist/es2019/react/nodes/status.js +18 -26
- package/dist/es2019/react/nodes/tableRow.js +2 -1
- package/dist/es2019/render-document.js +20 -4
- package/dist/es2019/ui/Renderer/index.js +1 -1
- package/dist/esm/messages.js +0 -7
- package/dist/esm/react/nodes/status.js +18 -26
- package/dist/esm/react/nodes/tableRow.js +2 -1
- package/dist/esm/render-document.js +50 -26
- package/dist/esm/ui/Renderer/index.js +1 -1
- package/dist/types/messages.d.ts +0 -7
- package/dist/types-ts4.5/messages.d.ts +0 -7
- package/package.json +14 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# @atlaskit/renderer
|
|
2
2
|
|
|
3
|
+
## 114.9.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#141018](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/141018)
|
|
8
|
+
[`1d2bde2b40c75`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1d2bde2b40c75) -
|
|
9
|
+
[ux] [A11Y-20936] Removed "Status: " text from statuses to prevent unintended text while copying.
|
|
10
|
+
Made status nodes have an "Emphasis" role so that accessibility tools will emphasize the text
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
13
|
+
## 114.9.0
|
|
14
|
+
|
|
15
|
+
### Minor Changes
|
|
16
|
+
|
|
17
|
+
- [#139372](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/139372)
|
|
18
|
+
[`0a065cf818a4d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0a065cf818a4d) -
|
|
19
|
+
Optimize tableRow.addColGroupWidth so it does not clone children when colGroupWidths array is
|
|
20
|
+
empty
|
|
21
|
+
|
|
22
|
+
### Patch Changes
|
|
23
|
+
|
|
24
|
+
- Updated dependencies
|
|
25
|
+
|
|
3
26
|
## 114.8.0
|
|
4
27
|
|
|
5
28
|
### Minor Changes
|
package/dist/cjs/messages.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.tableCellMessages = exports.
|
|
6
|
+
exports.tableCellMessages = exports.inlineCommentMessages = exports.headingAnchorLinkMessages = void 0;
|
|
7
7
|
var _reactIntlNext = require("react-intl-next");
|
|
8
8
|
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
9
9
|
// Entry file in package.json
|
|
@@ -58,11 +58,4 @@ var inlineCommentMessages = exports.inlineCommentMessages = (0, _reactIntlNext.d
|
|
|
58
58
|
defaultMessage: 'inline comment end',
|
|
59
59
|
description: 'Ending marker to indicate that text was highlighted with an inline comment by a screen reader.'
|
|
60
60
|
}
|
|
61
|
-
});
|
|
62
|
-
var statusMessages = exports.statusMessages = (0, _reactIntlNext.defineMessages)({
|
|
63
|
-
accessibilityLabelForStatus: {
|
|
64
|
-
id: 'fabric.editor.status.accessibilityLabel',
|
|
65
|
-
defaultMessage: 'status: ',
|
|
66
|
-
description: 'Accessibility label for status'
|
|
67
|
-
}
|
|
68
61
|
});
|
|
@@ -6,14 +6,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
11
|
var _element = require("@atlaskit/status/element");
|
|
11
12
|
var _analyticsNamespacedContext = require("@atlaskit/analytics-namespaced-context");
|
|
12
|
-
var _visuallyHidden = _interopRequireDefault(require("@atlaskit/visually-hidden"));
|
|
13
13
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
14
|
-
var _reactIntlNext = require("react-intl-next");
|
|
15
14
|
var _useInlineAnnotationProps = require("../../ui/annotations/element/useInlineAnnotationProps");
|
|
16
|
-
var _messages = require("../../messages");
|
|
17
15
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
18
16
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
19
17
|
var _default = exports.default = /*#__PURE__*/(0, _react.memo)(function Status(props) {
|
|
@@ -21,39 +19,33 @@ var _default = exports.default = /*#__PURE__*/(0, _react.memo)(function Status(p
|
|
|
21
19
|
color = props.color,
|
|
22
20
|
localId = props.localId;
|
|
23
21
|
var inlineAnnotationProps = (0, _useInlineAnnotationProps.useInlineAnnotationProps)(props);
|
|
24
|
-
var intl = (0, _reactIntlNext.useIntl)();
|
|
25
22
|
if ((0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes')) {
|
|
26
|
-
return (
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
localId: localId,
|
|
40
|
-
role: (0, _platformFeatureFlags.fg)('editor_a11y_status_renderer_description') ? undefined : 'presentation',
|
|
41
|
-
isBold: (0, _platformFeatureFlags.fg)('platform-component-visual-refresh')
|
|
42
|
-
})))
|
|
43
|
-
);
|
|
23
|
+
return /*#__PURE__*/_react.default.createElement("span", (0, _extends2.default)({}, inlineAnnotationProps, {
|
|
24
|
+
role: (0, _platformFeatureFlags.fg)('editor_a11y_status_renderer_description') ? 'emphasis' : undefined
|
|
25
|
+
}), /*#__PURE__*/_react.default.createElement(_analyticsNamespacedContext.FabricElementsAnalyticsContext, {
|
|
26
|
+
data: {
|
|
27
|
+
userContext: 'document'
|
|
28
|
+
}
|
|
29
|
+
}, /*#__PURE__*/_react.default.createElement(_element.Status, {
|
|
30
|
+
text: text,
|
|
31
|
+
color: color,
|
|
32
|
+
localId: localId,
|
|
33
|
+
role: (0, _platformFeatureFlags.fg)('editor_a11y_status_renderer_description') ? undefined : 'presentation',
|
|
34
|
+
isBold: (0, _platformFeatureFlags.fg)('platform-component-visual-refresh')
|
|
35
|
+
})));
|
|
44
36
|
}
|
|
45
37
|
return /*#__PURE__*/_react.default.createElement(_analyticsNamespacedContext.FabricElementsAnalyticsContext, {
|
|
46
38
|
data: {
|
|
47
39
|
userContext: 'document'
|
|
48
40
|
}
|
|
49
|
-
}, (0, _platformFeatureFlags.fg)('editor_a11y_status_renderer_description') ? /*#__PURE__*/_react.default.createElement("span",
|
|
50
|
-
role: "
|
|
51
|
-
},
|
|
41
|
+
}, (0, _platformFeatureFlags.fg)('editor_a11y_status_renderer_description') ? /*#__PURE__*/_react.default.createElement("span", {
|
|
42
|
+
role: "emphasis"
|
|
43
|
+
}, /*#__PURE__*/_react.default.createElement(_element.Status, {
|
|
52
44
|
text: text,
|
|
53
45
|
color: color,
|
|
54
46
|
localId: localId,
|
|
55
47
|
isBold: (0, _platformFeatureFlags.fg)('platform-component-visual-refresh')
|
|
56
|
-
}))
|
|
48
|
+
})) : /*#__PURE__*/_react.default.createElement(_element.Status, {
|
|
57
49
|
text: text,
|
|
58
50
|
color: color,
|
|
59
51
|
localId: localId,
|
|
@@ -56,7 +56,8 @@ var TableRow = exports.default = /*#__PURE__*/function (_React$Component) {
|
|
|
56
56
|
return childrenArray;
|
|
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') ? (_this$state$colGroupW = _this.state.colGroupWidths) === null || _this$state$colGroupW === void 0 ? void 0 : _this$state$colGroupW.length : _this.state.colGroupWidths) {
|
|
60
61
|
childrenArray = childrenArray.map(function (child, index) {
|
|
61
62
|
if ( /*#__PURE__*/_react.default.isValidElement(child)) {
|
|
62
63
|
return /*#__PURE__*/_react.default.cloneElement(child, {
|
|
@@ -98,21 +98,45 @@ var _validation = function _validation(doc, schema, adfStage, useSpecBasedValida
|
|
|
98
98
|
return result;
|
|
99
99
|
};
|
|
100
100
|
var memoValidation = (0, _memoizeOne.default)(_validation, function (newArgs, lastArgs) {
|
|
101
|
-
var
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
oldADFStage = _lastArgs[2],
|
|
111
|
-
oldUseSpecValidator = _lastArgs[3],
|
|
112
|
-
oldSkipValidation = _lastArgs[4];
|
|
101
|
+
var result = false;
|
|
102
|
+
if ((0, _platformFeatureFlags.fg)('cc_complexit_fe_memoValidation_redundant_calls')) {
|
|
103
|
+
var _newArgs = (0, _slicedToArray2.default)(newArgs, 6),
|
|
104
|
+
newDoc = _newArgs[0],
|
|
105
|
+
newSchema = _newArgs[1],
|
|
106
|
+
newADFStage = _newArgs[2],
|
|
107
|
+
newUseSpecValidator = _newArgs[3],
|
|
108
|
+
// ignoring dispatchAnalyticsEvent
|
|
109
|
+
newSkipValidation = _newArgs[5];
|
|
113
110
|
|
|
114
|
-
|
|
115
|
-
|
|
111
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
112
|
+
var _lastArgs = (0, _slicedToArray2.default)(lastArgs, 6),
|
|
113
|
+
oldDoc = _lastArgs[0],
|
|
114
|
+
oldSchema = _lastArgs[1],
|
|
115
|
+
oldADFStage = _lastArgs[2],
|
|
116
|
+
oldUseSpecValidator = _lastArgs[3],
|
|
117
|
+
// ignoring dispatchAnalyticsEvent
|
|
118
|
+
oldSkipValidation = _lastArgs[5];
|
|
119
|
+
result = areDocsEqual(newDoc, oldDoc) && newSchema === oldSchema && newADFStage === oldADFStage && newUseSpecValidator === oldUseSpecValidator && newSkipValidation === oldSkipValidation;
|
|
120
|
+
} else {
|
|
121
|
+
// This path has a bug and it will wrongfully assign dispatchAnalyticsEvent to skipValidation/oldSkipValidation
|
|
122
|
+
// instead of ignoring it as it does not skip it when unpacking the array.
|
|
123
|
+
// This results the fucntion returning false when it should return true
|
|
124
|
+
// and causing extra re-renders. see https://hello.jira.atlassian.cloud/browse/COMPLEXIT-161.
|
|
125
|
+
|
|
126
|
+
var _newArgs2 = (0, _slicedToArray2.default)(newArgs, 5),
|
|
127
|
+
_newDoc = _newArgs2[0],
|
|
128
|
+
_newSchema = _newArgs2[1],
|
|
129
|
+
_newADFStage = _newArgs2[2],
|
|
130
|
+
_newUseSpecValidator = _newArgs2[3],
|
|
131
|
+
_skipValidation = _newArgs2[4];
|
|
132
|
+
var _lastArgs2 = (0, _slicedToArray2.default)(lastArgs, 5),
|
|
133
|
+
_oldDoc = _lastArgs2[0],
|
|
134
|
+
_oldSchema = _lastArgs2[1],
|
|
135
|
+
_oldADFStage = _lastArgs2[2],
|
|
136
|
+
_oldUseSpecValidator = _lastArgs2[3],
|
|
137
|
+
_oldSkipValidation = _lastArgs2[4];
|
|
138
|
+
result = areDocsEqual(_newDoc, _oldDoc) && _newSchema === _oldSchema && _newADFStage === _oldADFStage && _newUseSpecValidator === _oldUseSpecValidator && _skipValidation === _oldSkipValidation;
|
|
139
|
+
}
|
|
116
140
|
return result;
|
|
117
141
|
});
|
|
118
142
|
|
|
@@ -138,12 +162,12 @@ var _serializeFragment = function _serializeFragment(serializer, doc) {
|
|
|
138
162
|
return serializer.serializeFragment(doc.content);
|
|
139
163
|
};
|
|
140
164
|
var memoSerializeFragment = (0, _memoizeOne.default)(_serializeFragment, function (newArgs, lastArgs) {
|
|
141
|
-
var
|
|
142
|
-
newSerializer =
|
|
143
|
-
newDoc =
|
|
144
|
-
var
|
|
145
|
-
oldSerializer =
|
|
146
|
-
oldDoc =
|
|
165
|
+
var _newArgs3 = (0, _slicedToArray2.default)(newArgs, 2),
|
|
166
|
+
newSerializer = _newArgs3[0],
|
|
167
|
+
newDoc = _newArgs3[1];
|
|
168
|
+
var _lastArgs3 = (0, _slicedToArray2.default)(lastArgs, 2),
|
|
169
|
+
oldSerializer = _lastArgs3[0],
|
|
170
|
+
oldDoc = _lastArgs3[1];
|
|
147
171
|
return newSerializer === oldSerializer && areDocsEqual(newDoc, oldDoc);
|
|
148
172
|
});
|
|
149
173
|
var _createNodeAndCheck = function _createNodeAndCheck(schema, doc, dispatchAnalyticsEvent) {
|
|
@@ -167,12 +191,12 @@ var _createNodeAndCheck = function _createNodeAndCheck(schema, doc, dispatchAnal
|
|
|
167
191
|
};
|
|
168
192
|
var memoCreateNodeAndCheck = (0, _memoizeOne.default)(_createNodeAndCheck, function (newArgs, lastArgs) {
|
|
169
193
|
// ignore dispatchAnalyticsEvent
|
|
170
|
-
var
|
|
171
|
-
newSchema =
|
|
172
|
-
newDoc =
|
|
173
|
-
var
|
|
174
|
-
oldSchema =
|
|
175
|
-
oldDoc =
|
|
194
|
+
var _newArgs4 = (0, _slicedToArray2.default)(newArgs, 2),
|
|
195
|
+
newSchema = _newArgs4[0],
|
|
196
|
+
newDoc = _newArgs4[1];
|
|
197
|
+
var _lastArgs4 = (0, _slicedToArray2.default)(lastArgs, 2),
|
|
198
|
+
oldSchema = _lastArgs4[0],
|
|
199
|
+
oldDoc = _lastArgs4[1];
|
|
176
200
|
return newSchema === oldSchema && areDocsEqual(newDoc, oldDoc);
|
|
177
201
|
});
|
|
178
202
|
var renderDocument = exports.renderDocument = function renderDocument(doc, serializer) {
|
|
@@ -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.
|
|
70
|
+
var packageVersion = "114.9.1";
|
|
71
71
|
var setAsQueryContainerStyles = (0, _react2.css)({
|
|
72
72
|
containerName: 'ak-renderer-wrapper',
|
|
73
73
|
containerType: 'inline-size',
|
package/dist/es2019/messages.js
CHANGED
|
@@ -52,11 +52,4 @@ export const inlineCommentMessages = defineMessages({
|
|
|
52
52
|
defaultMessage: 'inline comment end',
|
|
53
53
|
description: 'Ending marker to indicate that text was highlighted with an inline comment by a screen reader.'
|
|
54
54
|
}
|
|
55
|
-
});
|
|
56
|
-
export const statusMessages = defineMessages({
|
|
57
|
-
accessibilityLabelForStatus: {
|
|
58
|
-
id: 'fabric.editor.status.accessibilityLabel',
|
|
59
|
-
defaultMessage: 'status: ',
|
|
60
|
-
description: 'Accessibility label for status'
|
|
61
|
-
}
|
|
62
55
|
});
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
1
2
|
import React, { memo } from 'react';
|
|
2
3
|
import { Status as AkStatus } from '@atlaskit/status/element';
|
|
3
4
|
import { FabricElementsAnalyticsContext } from '@atlaskit/analytics-namespaced-context';
|
|
4
|
-
import VisuallyHidden from '@atlaskit/visually-hidden';
|
|
5
5
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
|
-
import { useIntl } from 'react-intl-next';
|
|
7
6
|
import { useInlineAnnotationProps } from '../../ui/annotations/element/useInlineAnnotationProps';
|
|
8
|
-
import { statusMessages } from '../../messages';
|
|
9
7
|
export default /*#__PURE__*/memo(function Status(props) {
|
|
10
8
|
const {
|
|
11
9
|
text,
|
|
@@ -13,39 +11,33 @@ export default /*#__PURE__*/memo(function Status(props) {
|
|
|
13
11
|
localId
|
|
14
12
|
} = props;
|
|
15
13
|
const inlineAnnotationProps = useInlineAnnotationProps(props);
|
|
16
|
-
const intl = useIntl();
|
|
17
14
|
if (fg('editor_inline_comments_on_inline_nodes')) {
|
|
18
|
-
return (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
localId: localId,
|
|
32
|
-
role: fg('editor_a11y_status_renderer_description') ? undefined : 'presentation',
|
|
33
|
-
isBold: fg('platform-component-visual-refresh')
|
|
34
|
-
})))
|
|
35
|
-
);
|
|
15
|
+
return /*#__PURE__*/React.createElement("span", _extends({}, inlineAnnotationProps, {
|
|
16
|
+
role: fg('editor_a11y_status_renderer_description') ? 'emphasis' : undefined
|
|
17
|
+
}), /*#__PURE__*/React.createElement(FabricElementsAnalyticsContext, {
|
|
18
|
+
data: {
|
|
19
|
+
userContext: 'document'
|
|
20
|
+
}
|
|
21
|
+
}, /*#__PURE__*/React.createElement(AkStatus, {
|
|
22
|
+
text: text,
|
|
23
|
+
color: color,
|
|
24
|
+
localId: localId,
|
|
25
|
+
role: fg('editor_a11y_status_renderer_description') ? undefined : 'presentation',
|
|
26
|
+
isBold: fg('platform-component-visual-refresh')
|
|
27
|
+
})));
|
|
36
28
|
}
|
|
37
29
|
return /*#__PURE__*/React.createElement(FabricElementsAnalyticsContext, {
|
|
38
30
|
data: {
|
|
39
31
|
userContext: 'document'
|
|
40
32
|
}
|
|
41
|
-
}, fg('editor_a11y_status_renderer_description') ? /*#__PURE__*/React.createElement("span",
|
|
42
|
-
role: "
|
|
43
|
-
},
|
|
33
|
+
}, fg('editor_a11y_status_renderer_description') ? /*#__PURE__*/React.createElement("span", {
|
|
34
|
+
role: "emphasis"
|
|
35
|
+
}, /*#__PURE__*/React.createElement(AkStatus, {
|
|
44
36
|
text: text,
|
|
45
37
|
color: color,
|
|
46
38
|
localId: localId,
|
|
47
39
|
isBold: fg('platform-component-visual-refresh')
|
|
48
|
-
}))
|
|
40
|
+
})) : /*#__PURE__*/React.createElement(AkStatus, {
|
|
49
41
|
text: text,
|
|
50
42
|
color: color,
|
|
51
43
|
localId: localId,
|
|
@@ -40,7 +40,8 @@ export default class TableRow extends React.Component {
|
|
|
40
40
|
return childrenArray;
|
|
41
41
|
});
|
|
42
42
|
_defineProperty(this, "addColGroupWidth", childrenArray => {
|
|
43
|
-
|
|
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) {
|
|
44
45
|
childrenArray = childrenArray.map((child, index) => {
|
|
45
46
|
if ( /*#__PURE__*/React.isValidElement(child)) {
|
|
46
47
|
return /*#__PURE__*/React.cloneElement(child, {
|
|
@@ -92,11 +92,27 @@ const _validation = (doc, schema, adfStage, useSpecBasedValidator, dispatchAnaly
|
|
|
92
92
|
return result;
|
|
93
93
|
};
|
|
94
94
|
const memoValidation = memoizeOne(_validation, (newArgs, lastArgs) => {
|
|
95
|
-
|
|
96
|
-
|
|
95
|
+
let result = false;
|
|
96
|
+
if (fg('cc_complexit_fe_memoValidation_redundant_calls')) {
|
|
97
|
+
const [newDoc, newSchema, newADFStage, newUseSpecValidator,,
|
|
98
|
+
// ignoring dispatchAnalyticsEvent
|
|
99
|
+
newSkipValidation] = newArgs;
|
|
97
100
|
|
|
98
|
-
|
|
99
|
-
|
|
101
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
102
|
+
const [oldDoc, oldSchema, oldADFStage, oldUseSpecValidator,,
|
|
103
|
+
// ignoring dispatchAnalyticsEvent
|
|
104
|
+
oldSkipValidation] = lastArgs;
|
|
105
|
+
result = areDocsEqual(newDoc, oldDoc) && newSchema === oldSchema && newADFStage === oldADFStage && newUseSpecValidator === oldUseSpecValidator && newSkipValidation === oldSkipValidation;
|
|
106
|
+
} else {
|
|
107
|
+
// This path has a bug and it will wrongfully assign dispatchAnalyticsEvent to skipValidation/oldSkipValidation
|
|
108
|
+
// instead of ignoring it as it does not skip it when unpacking the array.
|
|
109
|
+
// This results the fucntion returning false when it should return true
|
|
110
|
+
// and causing extra re-renders. see https://hello.jira.atlassian.cloud/browse/COMPLEXIT-161.
|
|
111
|
+
|
|
112
|
+
const [newDoc, newSchema, newADFStage, newUseSpecValidator, skipValidation] = newArgs;
|
|
113
|
+
const [oldDoc, oldSchema, oldADFStage, oldUseSpecValidator, oldSkipValidation] = lastArgs;
|
|
114
|
+
result = areDocsEqual(newDoc, oldDoc) && newSchema === oldSchema && newADFStage === oldADFStage && newUseSpecValidator === oldUseSpecValidator && skipValidation === oldSkipValidation;
|
|
115
|
+
}
|
|
100
116
|
return result;
|
|
101
117
|
});
|
|
102
118
|
|
|
@@ -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.
|
|
51
|
+
const packageVersion = "114.9.1";
|
|
52
52
|
const setAsQueryContainerStyles = css({
|
|
53
53
|
containerName: 'ak-renderer-wrapper',
|
|
54
54
|
containerType: 'inline-size',
|
package/dist/esm/messages.js
CHANGED
|
@@ -52,11 +52,4 @@ export var inlineCommentMessages = defineMessages({
|
|
|
52
52
|
defaultMessage: 'inline comment end',
|
|
53
53
|
description: 'Ending marker to indicate that text was highlighted with an inline comment by a screen reader.'
|
|
54
54
|
}
|
|
55
|
-
});
|
|
56
|
-
export var statusMessages = defineMessages({
|
|
57
|
-
accessibilityLabelForStatus: {
|
|
58
|
-
id: 'fabric.editor.status.accessibilityLabel',
|
|
59
|
-
defaultMessage: 'status: ',
|
|
60
|
-
description: 'Accessibility label for status'
|
|
61
|
-
}
|
|
62
55
|
});
|
|
@@ -1,49 +1,41 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
1
2
|
import React, { memo } from 'react';
|
|
2
3
|
import { Status as AkStatus } from '@atlaskit/status/element';
|
|
3
4
|
import { FabricElementsAnalyticsContext } from '@atlaskit/analytics-namespaced-context';
|
|
4
|
-
import VisuallyHidden from '@atlaskit/visually-hidden';
|
|
5
5
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
|
-
import { useIntl } from 'react-intl-next';
|
|
7
6
|
import { useInlineAnnotationProps } from '../../ui/annotations/element/useInlineAnnotationProps';
|
|
8
|
-
import { statusMessages } from '../../messages';
|
|
9
7
|
export default /*#__PURE__*/memo(function Status(props) {
|
|
10
8
|
var text = props.text,
|
|
11
9
|
color = props.color,
|
|
12
10
|
localId = props.localId;
|
|
13
11
|
var inlineAnnotationProps = useInlineAnnotationProps(props);
|
|
14
|
-
var intl = useIntl();
|
|
15
12
|
if (fg('editor_inline_comments_on_inline_nodes')) {
|
|
16
|
-
return (
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
localId: localId,
|
|
30
|
-
role: fg('editor_a11y_status_renderer_description') ? undefined : 'presentation',
|
|
31
|
-
isBold: fg('platform-component-visual-refresh')
|
|
32
|
-
})))
|
|
33
|
-
);
|
|
13
|
+
return /*#__PURE__*/React.createElement("span", _extends({}, inlineAnnotationProps, {
|
|
14
|
+
role: fg('editor_a11y_status_renderer_description') ? 'emphasis' : undefined
|
|
15
|
+
}), /*#__PURE__*/React.createElement(FabricElementsAnalyticsContext, {
|
|
16
|
+
data: {
|
|
17
|
+
userContext: 'document'
|
|
18
|
+
}
|
|
19
|
+
}, /*#__PURE__*/React.createElement(AkStatus, {
|
|
20
|
+
text: text,
|
|
21
|
+
color: color,
|
|
22
|
+
localId: localId,
|
|
23
|
+
role: fg('editor_a11y_status_renderer_description') ? undefined : 'presentation',
|
|
24
|
+
isBold: fg('platform-component-visual-refresh')
|
|
25
|
+
})));
|
|
34
26
|
}
|
|
35
27
|
return /*#__PURE__*/React.createElement(FabricElementsAnalyticsContext, {
|
|
36
28
|
data: {
|
|
37
29
|
userContext: 'document'
|
|
38
30
|
}
|
|
39
|
-
}, fg('editor_a11y_status_renderer_description') ? /*#__PURE__*/React.createElement("span",
|
|
40
|
-
role: "
|
|
41
|
-
},
|
|
31
|
+
}, fg('editor_a11y_status_renderer_description') ? /*#__PURE__*/React.createElement("span", {
|
|
32
|
+
role: "emphasis"
|
|
33
|
+
}, /*#__PURE__*/React.createElement(AkStatus, {
|
|
42
34
|
text: text,
|
|
43
35
|
color: color,
|
|
44
36
|
localId: localId,
|
|
45
37
|
isBold: fg('platform-component-visual-refresh')
|
|
46
|
-
}))
|
|
38
|
+
})) : /*#__PURE__*/React.createElement(AkStatus, {
|
|
47
39
|
text: text,
|
|
48
40
|
color: color,
|
|
49
41
|
localId: localId,
|
|
@@ -49,7 +49,8 @@ var TableRow = /*#__PURE__*/function (_React$Component) {
|
|
|
49
49
|
return childrenArray;
|
|
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') ? (_this$state$colGroupW = _this.state.colGroupWidths) === null || _this$state$colGroupW === void 0 ? void 0 : _this$state$colGroupW.length : _this.state.colGroupWidths) {
|
|
53
54
|
childrenArray = childrenArray.map(function (child, index) {
|
|
54
55
|
if ( /*#__PURE__*/React.isValidElement(child)) {
|
|
55
56
|
return /*#__PURE__*/React.cloneElement(child, {
|
|
@@ -91,21 +91,45 @@ var _validation = function _validation(doc, schema, adfStage, useSpecBasedValida
|
|
|
91
91
|
return result;
|
|
92
92
|
};
|
|
93
93
|
var memoValidation = memoizeOne(_validation, function (newArgs, lastArgs) {
|
|
94
|
-
var
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
oldADFStage = _lastArgs[2],
|
|
104
|
-
oldUseSpecValidator = _lastArgs[3],
|
|
105
|
-
oldSkipValidation = _lastArgs[4];
|
|
94
|
+
var result = false;
|
|
95
|
+
if (fg('cc_complexit_fe_memoValidation_redundant_calls')) {
|
|
96
|
+
var _newArgs = _slicedToArray(newArgs, 6),
|
|
97
|
+
newDoc = _newArgs[0],
|
|
98
|
+
newSchema = _newArgs[1],
|
|
99
|
+
newADFStage = _newArgs[2],
|
|
100
|
+
newUseSpecValidator = _newArgs[3],
|
|
101
|
+
// ignoring dispatchAnalyticsEvent
|
|
102
|
+
newSkipValidation = _newArgs[5];
|
|
106
103
|
|
|
107
|
-
|
|
108
|
-
|
|
104
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
105
|
+
var _lastArgs = _slicedToArray(lastArgs, 6),
|
|
106
|
+
oldDoc = _lastArgs[0],
|
|
107
|
+
oldSchema = _lastArgs[1],
|
|
108
|
+
oldADFStage = _lastArgs[2],
|
|
109
|
+
oldUseSpecValidator = _lastArgs[3],
|
|
110
|
+
// ignoring dispatchAnalyticsEvent
|
|
111
|
+
oldSkipValidation = _lastArgs[5];
|
|
112
|
+
result = areDocsEqual(newDoc, oldDoc) && newSchema === oldSchema && newADFStage === oldADFStage && newUseSpecValidator === oldUseSpecValidator && newSkipValidation === oldSkipValidation;
|
|
113
|
+
} else {
|
|
114
|
+
// This path has a bug and it will wrongfully assign dispatchAnalyticsEvent to skipValidation/oldSkipValidation
|
|
115
|
+
// instead of ignoring it as it does not skip it when unpacking the array.
|
|
116
|
+
// This results the fucntion returning false when it should return true
|
|
117
|
+
// and causing extra re-renders. see https://hello.jira.atlassian.cloud/browse/COMPLEXIT-161.
|
|
118
|
+
|
|
119
|
+
var _newArgs2 = _slicedToArray(newArgs, 5),
|
|
120
|
+
_newDoc = _newArgs2[0],
|
|
121
|
+
_newSchema = _newArgs2[1],
|
|
122
|
+
_newADFStage = _newArgs2[2],
|
|
123
|
+
_newUseSpecValidator = _newArgs2[3],
|
|
124
|
+
_skipValidation = _newArgs2[4];
|
|
125
|
+
var _lastArgs2 = _slicedToArray(lastArgs, 5),
|
|
126
|
+
_oldDoc = _lastArgs2[0],
|
|
127
|
+
_oldSchema = _lastArgs2[1],
|
|
128
|
+
_oldADFStage = _lastArgs2[2],
|
|
129
|
+
_oldUseSpecValidator = _lastArgs2[3],
|
|
130
|
+
_oldSkipValidation = _lastArgs2[4];
|
|
131
|
+
result = areDocsEqual(_newDoc, _oldDoc) && _newSchema === _oldSchema && _newADFStage === _oldADFStage && _newUseSpecValidator === _oldUseSpecValidator && _skipValidation === _oldSkipValidation;
|
|
132
|
+
}
|
|
109
133
|
return result;
|
|
110
134
|
});
|
|
111
135
|
|
|
@@ -131,12 +155,12 @@ var _serializeFragment = function _serializeFragment(serializer, doc) {
|
|
|
131
155
|
return serializer.serializeFragment(doc.content);
|
|
132
156
|
};
|
|
133
157
|
var memoSerializeFragment = memoizeOne(_serializeFragment, function (newArgs, lastArgs) {
|
|
134
|
-
var
|
|
135
|
-
newSerializer =
|
|
136
|
-
newDoc =
|
|
137
|
-
var
|
|
138
|
-
oldSerializer =
|
|
139
|
-
oldDoc =
|
|
158
|
+
var _newArgs3 = _slicedToArray(newArgs, 2),
|
|
159
|
+
newSerializer = _newArgs3[0],
|
|
160
|
+
newDoc = _newArgs3[1];
|
|
161
|
+
var _lastArgs3 = _slicedToArray(lastArgs, 2),
|
|
162
|
+
oldSerializer = _lastArgs3[0],
|
|
163
|
+
oldDoc = _lastArgs3[1];
|
|
140
164
|
return newSerializer === oldSerializer && areDocsEqual(newDoc, oldDoc);
|
|
141
165
|
});
|
|
142
166
|
var _createNodeAndCheck = function _createNodeAndCheck(schema, doc, dispatchAnalyticsEvent) {
|
|
@@ -160,12 +184,12 @@ var _createNodeAndCheck = function _createNodeAndCheck(schema, doc, dispatchAnal
|
|
|
160
184
|
};
|
|
161
185
|
var memoCreateNodeAndCheck = memoizeOne(_createNodeAndCheck, function (newArgs, lastArgs) {
|
|
162
186
|
// ignore dispatchAnalyticsEvent
|
|
163
|
-
var
|
|
164
|
-
newSchema =
|
|
165
|
-
newDoc =
|
|
166
|
-
var
|
|
167
|
-
oldSchema =
|
|
168
|
-
oldDoc =
|
|
187
|
+
var _newArgs4 = _slicedToArray(newArgs, 2),
|
|
188
|
+
newSchema = _newArgs4[0],
|
|
189
|
+
newDoc = _newArgs4[1];
|
|
190
|
+
var _lastArgs4 = _slicedToArray(lastArgs, 2),
|
|
191
|
+
oldSchema = _lastArgs4[0],
|
|
192
|
+
oldDoc = _lastArgs4[1];
|
|
169
193
|
return newSchema === oldSchema && areDocsEqual(newDoc, oldDoc);
|
|
170
194
|
});
|
|
171
195
|
export var renderDocument = function renderDocument(doc, serializer) {
|
|
@@ -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.
|
|
60
|
+
var packageVersion = "114.9.1";
|
|
61
61
|
var setAsQueryContainerStyles = css({
|
|
62
62
|
containerName: 'ak-renderer-wrapper',
|
|
63
63
|
containerType: 'inline-size',
|
package/dist/types/messages.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/renderer",
|
|
3
|
-
"version": "114.
|
|
3
|
+
"version": "114.9.1",
|
|
4
4
|
"description": "Renderer component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -31,16 +31,16 @@
|
|
|
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.
|
|
34
|
+
"@atlaskit/editor-common": "^103.8.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.
|
|
42
|
-
"@atlaskit/link-datasource": "^4.
|
|
43
|
-
"@atlaskit/media-card": "^79.
|
|
41
|
+
"@atlaskit/icon": "^25.6.0",
|
|
42
|
+
"@atlaskit/link-datasource": "^4.3.0",
|
|
43
|
+
"@atlaskit/media-card": "^79.1.0",
|
|
44
44
|
"@atlaskit/media-client": "^32.0.0",
|
|
45
45
|
"@atlaskit/media-client-react": "^4.0.0",
|
|
46
46
|
"@atlaskit/media-common": "^12.0.0",
|
|
@@ -50,12 +50,12 @@
|
|
|
50
50
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
51
51
|
"@atlaskit/platform-feature-flags-react": "^0.1.0",
|
|
52
52
|
"@atlaskit/react-ufo": "^3.5.0",
|
|
53
|
-
"@atlaskit/smart-card": "^36.
|
|
53
|
+
"@atlaskit/smart-card": "^36.8.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.
|
|
58
|
-
"@atlaskit/tokens": "^4.
|
|
57
|
+
"@atlaskit/tmp-editor-statsig": "^4.9.0",
|
|
58
|
+
"@atlaskit/tokens": "^4.8.0",
|
|
59
59
|
"@atlaskit/tooltip": "^20.0.0",
|
|
60
60
|
"@atlaskit/visually-hidden": "^3.0.0",
|
|
61
61
|
"@babel/runtime": "^7.0.0",
|
|
@@ -209,6 +209,12 @@
|
|
|
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"
|
|
215
|
+
},
|
|
216
|
+
"cc_complexit_fe_memoValidation_redundant_calls": {
|
|
217
|
+
"type": "boolean"
|
|
212
218
|
}
|
|
213
219
|
},
|
|
214
220
|
"af:exports": {
|