@atlaskit/renderer 124.16.3 → 124.16.5
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 +17 -0
- package/dist/cjs/entry-points/experimental-sync-custom-nodes/small-nodes.js +2 -0
- package/dist/cjs/react/nodes/index.js +16 -4
- package/dist/cjs/react/nodes/tableCell.js +52 -43
- package/dist/cjs/ui/Renderer/index.js +1 -1
- package/dist/es2019/entry-points/experimental-sync-custom-nodes/small-nodes.js +2 -0
- package/dist/es2019/react/nodes/index.js +16 -4
- package/dist/es2019/react/nodes/tableCell.js +52 -43
- package/dist/es2019/ui/Renderer/index.js +1 -1
- package/dist/esm/entry-points/experimental-sync-custom-nodes/small-nodes.js +2 -0
- package/dist/esm/react/nodes/index.js +16 -4
- package/dist/esm/react/nodes/tableCell.js +52 -43
- package/dist/esm/ui/Renderer/index.js +1 -1
- package/package.json +8 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/renderer
|
|
2
2
|
|
|
3
|
+
## 124.16.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`0eb9453d515b3`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0eb9453d515b3) -
|
|
8
|
+
Added the ability to override the codeBlock and windowedCodeBlock nodes.
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 124.16.4
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [`4d676bbdb3ce6`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4d676bbdb3ce6) -
|
|
16
|
+
ts-ignore added temporarily to unblock local consumption for help-center, will be removed once
|
|
17
|
+
project refs are setup
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
|
|
3
20
|
## 124.16.3
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -28,6 +28,8 @@ var _Expand = _interopRequireDefault(require("../../ui/Expand"));
|
|
|
28
28
|
*/
|
|
29
29
|
var nodeToReact = {
|
|
30
30
|
codeBlock: _codeBlock.default,
|
|
31
|
+
windowedCodeBlock: _codeBlock.default,
|
|
32
|
+
// CodeBlock is similar to windowedCodeBlock, just with sync loading and without the isInViewport check.
|
|
31
33
|
date: _date.default,
|
|
32
34
|
decisionList: _decisionList.default,
|
|
33
35
|
decisionItem: _decisionItem.default,
|
|
@@ -514,15 +514,27 @@ var toReact = exports.toReact = function toReact(node, flags, nodeComponents
|
|
|
514
514
|
if (node.type.name === 'doc' && (flags === null || flags === void 0 ? void 0 : flags.allowSelectAllTrap) === true) {
|
|
515
515
|
return _doc.DocWithSelectAllTrap;
|
|
516
516
|
}
|
|
517
|
-
if (
|
|
518
|
-
if (
|
|
519
|
-
|
|
517
|
+
if (!(0, _platformFeatureFlags.fg)('jfp-magma-ssr-iv-editor-codeblock')) {
|
|
518
|
+
if (node.type.name === 'codeBlock') {
|
|
519
|
+
if ((flags === null || flags === void 0 ? void 0 : flags.allowWindowedCodeBlock) === true) {
|
|
520
|
+
return WindowedCodeBlock;
|
|
521
|
+
}
|
|
522
|
+
return CodeBlock;
|
|
520
523
|
}
|
|
521
|
-
return CodeBlock;
|
|
522
524
|
}
|
|
523
525
|
|
|
524
526
|
// Allowing custom components to override those provided in nodeToReact
|
|
525
527
|
var nodes = _objectSpread(_objectSpread({}, nodeToReact), nodeComponents);
|
|
528
|
+
if ((0, _platformFeatureFlags.fg)('jfp-magma-ssr-iv-editor-codeblock')) {
|
|
529
|
+
if (node.type.name === 'codeBlock') {
|
|
530
|
+
var _nodes$codeBlock;
|
|
531
|
+
if ((flags === null || flags === void 0 ? void 0 : flags.allowWindowedCodeBlock) === true) {
|
|
532
|
+
var _nodes$windowedCodeBl;
|
|
533
|
+
return (_nodes$windowedCodeBl = nodes.windowedCodeBlock) !== null && _nodes$windowedCodeBl !== void 0 ? _nodes$windowedCodeBl : WindowedCodeBlock;
|
|
534
|
+
}
|
|
535
|
+
return (_nodes$codeBlock = nodes.codeBlock) !== null && _nodes$codeBlock !== void 0 ? _nodes$codeBlock : CodeBlock;
|
|
536
|
+
}
|
|
537
|
+
}
|
|
526
538
|
nodes['multiBodiedExtension'] = (0, _platformFeatureFlags.fg)('platform_editor_multi_body_extension_extensibility') ? _multiBodiedExtension.default : _multiBodiedExtensionOld.default;
|
|
527
539
|
return nodes[node.type.name];
|
|
528
540
|
};
|
|
@@ -152,31 +152,35 @@ var getWithCellProps = function getWithCellProps(WrapperComponent) {
|
|
|
152
152
|
// This is used to set the background color of the cell
|
|
153
153
|
// to a dark mode color in mobile dark mode
|
|
154
154
|
var colorName = background ? _adfSchema.tableBackgroundColorPalette.get(background) : '';
|
|
155
|
-
return
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
155
|
+
return (
|
|
156
|
+
/*#__PURE__*/
|
|
157
|
+
// @ts-ignore - Workaround for help-center local consumption
|
|
158
|
+
_react.default.createElement(WrapperComponent, (0, _extends2.default)({
|
|
159
|
+
rowSpan: rowspan,
|
|
160
|
+
colSpan: colspan
|
|
161
|
+
// Note: When content from a renderer is pasted into an editor
|
|
162
|
+
// the background color is not taken from the inline style.
|
|
163
|
+
// Instead it is taken from the data-cell-background attribute
|
|
164
|
+
// (added via getDataAttributes below).
|
|
165
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
166
|
+
,
|
|
167
|
+
style: getStyle({
|
|
168
|
+
background: background,
|
|
169
|
+
colGroupWidth: colGroupWidth,
|
|
170
|
+
offsetTop: offsetTop,
|
|
171
|
+
colorMode: colorMode
|
|
172
|
+
}),
|
|
173
|
+
colorname: colorName,
|
|
174
|
+
onClick: onClick
|
|
175
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
176
|
+
,
|
|
177
|
+
className: className
|
|
178
|
+
// Ignored via go/ees005
|
|
179
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
180
|
+
}, getDataAttributes(colwidth, background), {
|
|
181
|
+
"aria-sort": ariaSort
|
|
182
|
+
}), children)
|
|
183
|
+
);
|
|
180
184
|
};
|
|
181
185
|
};
|
|
182
186
|
var TH = getWithCellProps('th');
|
|
@@ -191,27 +195,32 @@ var withSortableColumn = exports.withSortableColumn = function withSortableColum
|
|
|
191
195
|
var sortOrderedClassName = sortOrdered === _types.SortOrder.NO_ORDER ? _consts.RendererCssClassName.SORTABLE_COLUMN_NO_ORDER : '';
|
|
192
196
|
if (!allowColumnSorting || !isHeaderRow) {
|
|
193
197
|
// Ignored via go/ees005
|
|
198
|
+
// @ts-ignore - Workaround for help-center local consumption
|
|
194
199
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
195
200
|
return /*#__PURE__*/_react.default.createElement(WrapperComponent, props);
|
|
196
201
|
}
|
|
197
|
-
return
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
//
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
202
|
+
return (
|
|
203
|
+
/*#__PURE__*/
|
|
204
|
+
// @ts-ignore - Workaround for help-center local consumption
|
|
205
|
+
_react.default.createElement(WrapperComponent
|
|
206
|
+
// Ignored via go/ees005
|
|
207
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
208
|
+
, (0, _extends2.default)({}, props, {
|
|
209
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
210
|
+
className: _consts.RendererCssClassName.SORTABLE_COLUMN_WRAPPER,
|
|
211
|
+
ariaSort: getSortOrderLabel(intl, sortOrdered)
|
|
212
|
+
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
213
|
+
className: _consts.RendererCssClassName.SORTABLE_COLUMN
|
|
214
|
+
}, children, /*#__PURE__*/_react.default.createElement("figure", {
|
|
215
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
216
|
+
className: "".concat(_consts.RendererCssClassName.SORTABLE_COLUMN_ICON_WRAPPER, " ").concat(sortOrderedClassName)
|
|
217
|
+
}, /*#__PURE__*/_react.default.createElement(_table.SortingIcon, {
|
|
218
|
+
isSortingAllowed: !!onSorting,
|
|
219
|
+
sortOrdered: sortOrdered,
|
|
220
|
+
onClick: sort,
|
|
221
|
+
onKeyDown: onKeyPress
|
|
222
|
+
}))))
|
|
223
|
+
);
|
|
215
224
|
function onKeyPress(event) {
|
|
216
225
|
var keys = [' ', 'Enter', 'Spacebar'];
|
|
217
226
|
// Ignored via go/ees005
|
|
@@ -69,7 +69,7 @@ var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
69
69
|
// we want to calculate all the table widths (which causes reflows) after the renderer has finished loading to mitigate performance impact
|
|
70
70
|
var TABLE_INFO_TIMEOUT = 10000;
|
|
71
71
|
var packageName = "@atlaskit/renderer";
|
|
72
|
-
var packageVersion = "
|
|
72
|
+
var packageVersion = "0.0.0-development";
|
|
73
73
|
var setAsQueryContainerStyles = (0, _react2.css)({
|
|
74
74
|
containerName: 'ak-renderer-wrapper',
|
|
75
75
|
containerType: 'inline-size'
|
|
@@ -22,6 +22,8 @@ import Expand from '../../ui/Expand';
|
|
|
22
22
|
*/
|
|
23
23
|
const nodeToReact = {
|
|
24
24
|
codeBlock: CodeBlock,
|
|
25
|
+
windowedCodeBlock: CodeBlock,
|
|
26
|
+
// CodeBlock is similar to windowedCodeBlock, just with sync loading and without the isInViewport check.
|
|
25
27
|
date: Date,
|
|
26
28
|
decisionList: DecisionList,
|
|
27
29
|
decisionItem: DecisionItem,
|
|
@@ -190,11 +190,13 @@ export const toReact = (node, flags, nodeComponents
|
|
|
190
190
|
if (node.type.name === 'doc' && (flags === null || flags === void 0 ? void 0 : flags.allowSelectAllTrap) === true) {
|
|
191
191
|
return DocWithSelectAllTrap;
|
|
192
192
|
}
|
|
193
|
-
if (
|
|
194
|
-
if (
|
|
195
|
-
|
|
193
|
+
if (!fg('jfp-magma-ssr-iv-editor-codeblock')) {
|
|
194
|
+
if (node.type.name === 'codeBlock') {
|
|
195
|
+
if ((flags === null || flags === void 0 ? void 0 : flags.allowWindowedCodeBlock) === true) {
|
|
196
|
+
return WindowedCodeBlock;
|
|
197
|
+
}
|
|
198
|
+
return CodeBlock;
|
|
196
199
|
}
|
|
197
|
-
return CodeBlock;
|
|
198
200
|
}
|
|
199
201
|
|
|
200
202
|
// Allowing custom components to override those provided in nodeToReact
|
|
@@ -202,6 +204,16 @@ export const toReact = (node, flags, nodeComponents
|
|
|
202
204
|
...nodeToReact,
|
|
203
205
|
...nodeComponents
|
|
204
206
|
};
|
|
207
|
+
if (fg('jfp-magma-ssr-iv-editor-codeblock')) {
|
|
208
|
+
if (node.type.name === 'codeBlock') {
|
|
209
|
+
var _nodes$codeBlock;
|
|
210
|
+
if ((flags === null || flags === void 0 ? void 0 : flags.allowWindowedCodeBlock) === true) {
|
|
211
|
+
var _nodes$windowedCodeBl;
|
|
212
|
+
return (_nodes$windowedCodeBl = nodes.windowedCodeBlock) !== null && _nodes$windowedCodeBl !== void 0 ? _nodes$windowedCodeBl : WindowedCodeBlock;
|
|
213
|
+
}
|
|
214
|
+
return (_nodes$codeBlock = nodes.codeBlock) !== null && _nodes$codeBlock !== void 0 ? _nodes$codeBlock : CodeBlock;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
205
217
|
nodes['multiBodiedExtension'] = fg('platform_editor_multi_body_extension_extensibility') ? MultiBodiedExtension : MultiBodiedExtensionOld;
|
|
206
218
|
return nodes[node.type.name];
|
|
207
219
|
};
|
|
@@ -151,31 +151,35 @@ const getWithCellProps = WrapperComponent => {
|
|
|
151
151
|
// This is used to set the background color of the cell
|
|
152
152
|
// to a dark mode color in mobile dark mode
|
|
153
153
|
const colorName = background ? tableBackgroundColorPalette.get(background) : '';
|
|
154
|
-
return
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
154
|
+
return (
|
|
155
|
+
/*#__PURE__*/
|
|
156
|
+
// @ts-ignore - Workaround for help-center local consumption
|
|
157
|
+
React.createElement(WrapperComponent, _extends({
|
|
158
|
+
rowSpan: rowspan,
|
|
159
|
+
colSpan: colspan
|
|
160
|
+
// Note: When content from a renderer is pasted into an editor
|
|
161
|
+
// the background color is not taken from the inline style.
|
|
162
|
+
// Instead it is taken from the data-cell-background attribute
|
|
163
|
+
// (added via getDataAttributes below).
|
|
164
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
165
|
+
,
|
|
166
|
+
style: getStyle({
|
|
167
|
+
background,
|
|
168
|
+
colGroupWidth,
|
|
169
|
+
offsetTop,
|
|
170
|
+
colorMode
|
|
171
|
+
}),
|
|
172
|
+
colorname: colorName,
|
|
173
|
+
onClick: onClick
|
|
174
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
175
|
+
,
|
|
176
|
+
className: className
|
|
177
|
+
// Ignored via go/ees005
|
|
178
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
179
|
+
}, getDataAttributes(colwidth, background), {
|
|
180
|
+
"aria-sort": ariaSort
|
|
181
|
+
}), children)
|
|
182
|
+
);
|
|
179
183
|
};
|
|
180
184
|
};
|
|
181
185
|
const TH = getWithCellProps('th');
|
|
@@ -192,27 +196,32 @@ export const withSortableColumn = WrapperComponent => {
|
|
|
192
196
|
const sortOrderedClassName = sortOrdered === SortOrder.NO_ORDER ? RendererCssClassName.SORTABLE_COLUMN_NO_ORDER : '';
|
|
193
197
|
if (!allowColumnSorting || !isHeaderRow) {
|
|
194
198
|
// Ignored via go/ees005
|
|
199
|
+
// @ts-ignore - Workaround for help-center local consumption
|
|
195
200
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
196
201
|
return /*#__PURE__*/React.createElement(WrapperComponent, props);
|
|
197
202
|
}
|
|
198
|
-
return
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
//
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
203
|
+
return (
|
|
204
|
+
/*#__PURE__*/
|
|
205
|
+
// @ts-ignore - Workaround for help-center local consumption
|
|
206
|
+
React.createElement(WrapperComponent
|
|
207
|
+
// Ignored via go/ees005
|
|
208
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
209
|
+
, _extends({}, props, {
|
|
210
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
211
|
+
className: RendererCssClassName.SORTABLE_COLUMN_WRAPPER,
|
|
212
|
+
ariaSort: getSortOrderLabel(intl, sortOrdered)
|
|
213
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
214
|
+
className: RendererCssClassName.SORTABLE_COLUMN
|
|
215
|
+
}, children, /*#__PURE__*/React.createElement("figure", {
|
|
216
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
217
|
+
className: `${RendererCssClassName.SORTABLE_COLUMN_ICON_WRAPPER} ${sortOrderedClassName}`
|
|
218
|
+
}, /*#__PURE__*/React.createElement(SortingIcon, {
|
|
219
|
+
isSortingAllowed: !!onSorting,
|
|
220
|
+
sortOrdered: sortOrdered,
|
|
221
|
+
onClick: sort,
|
|
222
|
+
onKeyDown: onKeyPress
|
|
223
|
+
}))))
|
|
224
|
+
);
|
|
216
225
|
function onKeyPress(event) {
|
|
217
226
|
const keys = [' ', 'Enter', 'Spacebar'];
|
|
218
227
|
// Ignored via go/ees005
|
|
@@ -55,7 +55,7 @@ export const DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
55
55
|
// we want to calculate all the table widths (which causes reflows) after the renderer has finished loading to mitigate performance impact
|
|
56
56
|
const TABLE_INFO_TIMEOUT = 10000;
|
|
57
57
|
const packageName = "@atlaskit/renderer";
|
|
58
|
-
const packageVersion = "
|
|
58
|
+
const packageVersion = "0.0.0-development";
|
|
59
59
|
const setAsQueryContainerStyles = css({
|
|
60
60
|
containerName: 'ak-renderer-wrapper',
|
|
61
61
|
containerType: 'inline-size'
|
|
@@ -22,6 +22,8 @@ import Expand from '../../ui/Expand';
|
|
|
22
22
|
*/
|
|
23
23
|
var nodeToReact = {
|
|
24
24
|
codeBlock: CodeBlock,
|
|
25
|
+
windowedCodeBlock: CodeBlock,
|
|
26
|
+
// CodeBlock is similar to windowedCodeBlock, just with sync loading and without the isInViewport check.
|
|
25
27
|
date: Date,
|
|
26
28
|
decisionList: DecisionList,
|
|
27
29
|
decisionItem: DecisionItem,
|
|
@@ -319,15 +319,27 @@ export var toReact = function toReact(node, flags, nodeComponents
|
|
|
319
319
|
if (node.type.name === 'doc' && (flags === null || flags === void 0 ? void 0 : flags.allowSelectAllTrap) === true) {
|
|
320
320
|
return DocWithSelectAllTrap;
|
|
321
321
|
}
|
|
322
|
-
if (
|
|
323
|
-
if (
|
|
324
|
-
|
|
322
|
+
if (!fg('jfp-magma-ssr-iv-editor-codeblock')) {
|
|
323
|
+
if (node.type.name === 'codeBlock') {
|
|
324
|
+
if ((flags === null || flags === void 0 ? void 0 : flags.allowWindowedCodeBlock) === true) {
|
|
325
|
+
return WindowedCodeBlock;
|
|
326
|
+
}
|
|
327
|
+
return CodeBlock;
|
|
325
328
|
}
|
|
326
|
-
return CodeBlock;
|
|
327
329
|
}
|
|
328
330
|
|
|
329
331
|
// Allowing custom components to override those provided in nodeToReact
|
|
330
332
|
var nodes = _objectSpread(_objectSpread({}, nodeToReact), nodeComponents);
|
|
333
|
+
if (fg('jfp-magma-ssr-iv-editor-codeblock')) {
|
|
334
|
+
if (node.type.name === 'codeBlock') {
|
|
335
|
+
var _nodes$codeBlock;
|
|
336
|
+
if ((flags === null || flags === void 0 ? void 0 : flags.allowWindowedCodeBlock) === true) {
|
|
337
|
+
var _nodes$windowedCodeBl;
|
|
338
|
+
return (_nodes$windowedCodeBl = nodes.windowedCodeBlock) !== null && _nodes$windowedCodeBl !== void 0 ? _nodes$windowedCodeBl : WindowedCodeBlock;
|
|
339
|
+
}
|
|
340
|
+
return (_nodes$codeBlock = nodes.codeBlock) !== null && _nodes$codeBlock !== void 0 ? _nodes$codeBlock : CodeBlock;
|
|
341
|
+
}
|
|
342
|
+
}
|
|
331
343
|
nodes['multiBodiedExtension'] = fg('platform_editor_multi_body_extension_extensibility') ? MultiBodiedExtension : MultiBodiedExtensionOld;
|
|
332
344
|
return nodes[node.type.name];
|
|
333
345
|
};
|
|
@@ -145,31 +145,35 @@ var getWithCellProps = function getWithCellProps(WrapperComponent) {
|
|
|
145
145
|
// This is used to set the background color of the cell
|
|
146
146
|
// to a dark mode color in mobile dark mode
|
|
147
147
|
var colorName = background ? tableBackgroundColorPalette.get(background) : '';
|
|
148
|
-
return
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
148
|
+
return (
|
|
149
|
+
/*#__PURE__*/
|
|
150
|
+
// @ts-ignore - Workaround for help-center local consumption
|
|
151
|
+
React.createElement(WrapperComponent, _extends({
|
|
152
|
+
rowSpan: rowspan,
|
|
153
|
+
colSpan: colspan
|
|
154
|
+
// Note: When content from a renderer is pasted into an editor
|
|
155
|
+
// the background color is not taken from the inline style.
|
|
156
|
+
// Instead it is taken from the data-cell-background attribute
|
|
157
|
+
// (added via getDataAttributes below).
|
|
158
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
159
|
+
,
|
|
160
|
+
style: getStyle({
|
|
161
|
+
background: background,
|
|
162
|
+
colGroupWidth: colGroupWidth,
|
|
163
|
+
offsetTop: offsetTop,
|
|
164
|
+
colorMode: colorMode
|
|
165
|
+
}),
|
|
166
|
+
colorname: colorName,
|
|
167
|
+
onClick: onClick
|
|
168
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
169
|
+
,
|
|
170
|
+
className: className
|
|
171
|
+
// Ignored via go/ees005
|
|
172
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
173
|
+
}, getDataAttributes(colwidth, background), {
|
|
174
|
+
"aria-sort": ariaSort
|
|
175
|
+
}), children)
|
|
176
|
+
);
|
|
173
177
|
};
|
|
174
178
|
};
|
|
175
179
|
var TH = getWithCellProps('th');
|
|
@@ -184,27 +188,32 @@ export var withSortableColumn = function withSortableColumn(WrapperComponent) {
|
|
|
184
188
|
var sortOrderedClassName = sortOrdered === SortOrder.NO_ORDER ? RendererCssClassName.SORTABLE_COLUMN_NO_ORDER : '';
|
|
185
189
|
if (!allowColumnSorting || !isHeaderRow) {
|
|
186
190
|
// Ignored via go/ees005
|
|
191
|
+
// @ts-ignore - Workaround for help-center local consumption
|
|
187
192
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
188
193
|
return /*#__PURE__*/React.createElement(WrapperComponent, props);
|
|
189
194
|
}
|
|
190
|
-
return
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
//
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
195
|
+
return (
|
|
196
|
+
/*#__PURE__*/
|
|
197
|
+
// @ts-ignore - Workaround for help-center local consumption
|
|
198
|
+
React.createElement(WrapperComponent
|
|
199
|
+
// Ignored via go/ees005
|
|
200
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
201
|
+
, _extends({}, props, {
|
|
202
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
203
|
+
className: RendererCssClassName.SORTABLE_COLUMN_WRAPPER,
|
|
204
|
+
ariaSort: getSortOrderLabel(intl, sortOrdered)
|
|
205
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
206
|
+
className: RendererCssClassName.SORTABLE_COLUMN
|
|
207
|
+
}, children, /*#__PURE__*/React.createElement("figure", {
|
|
208
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
209
|
+
className: "".concat(RendererCssClassName.SORTABLE_COLUMN_ICON_WRAPPER, " ").concat(sortOrderedClassName)
|
|
210
|
+
}, /*#__PURE__*/React.createElement(SortingIcon, {
|
|
211
|
+
isSortingAllowed: !!onSorting,
|
|
212
|
+
sortOrdered: sortOrdered,
|
|
213
|
+
onClick: sort,
|
|
214
|
+
onKeyDown: onKeyPress
|
|
215
|
+
}))))
|
|
216
|
+
);
|
|
208
217
|
function onKeyPress(event) {
|
|
209
218
|
var keys = [' ', 'Enter', 'Spacebar'];
|
|
210
219
|
// Ignored via go/ees005
|
|
@@ -60,7 +60,7 @@ export var DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
60
60
|
// we want to calculate all the table widths (which causes reflows) after the renderer has finished loading to mitigate performance impact
|
|
61
61
|
var TABLE_INFO_TIMEOUT = 10000;
|
|
62
62
|
var packageName = "@atlaskit/renderer";
|
|
63
|
-
var packageVersion = "
|
|
63
|
+
var packageVersion = "0.0.0-development";
|
|
64
64
|
var setAsQueryContainerStyles = css({
|
|
65
65
|
containerName: 'ak-renderer-wrapper',
|
|
66
66
|
containerType: 'inline-size'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/renderer",
|
|
3
|
-
"version": "124.16.
|
|
3
|
+
"version": "124.16.5",
|
|
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": "^1.1.0",
|
|
55
55
|
"@atlaskit/platform-feature-flags-react": "^0.4.0",
|
|
56
56
|
"@atlaskit/react-ufo": "^4.15.0",
|
|
57
|
-
"@atlaskit/smart-card": "^43.
|
|
57
|
+
"@atlaskit/smart-card": "^43.11.0",
|
|
58
58
|
"@atlaskit/status": "^3.0.0",
|
|
59
59
|
"@atlaskit/task-decision": "^19.2.0",
|
|
60
60
|
"@atlaskit/theme": "^21.0.0",
|
|
61
|
-
"@atlaskit/tmp-editor-statsig": "^13.
|
|
62
|
-
"@atlaskit/tokens": "^8.
|
|
61
|
+
"@atlaskit/tmp-editor-statsig": "^13.43.0",
|
|
62
|
+
"@atlaskit/tokens": "^8.3.0",
|
|
63
63
|
"@atlaskit/tooltip": "^20.10.0",
|
|
64
64
|
"@atlaskit/visually-hidden": "^3.0.0",
|
|
65
65
|
"@babel/runtime": "^7.0.0",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"uuid": "^3.1.0"
|
|
73
73
|
},
|
|
74
74
|
"peerDependencies": {
|
|
75
|
-
"@atlaskit/editor-common": "^110.
|
|
75
|
+
"@atlaskit/editor-common": "^110.35.0",
|
|
76
76
|
"@atlaskit/link-provider": "^4.0.0",
|
|
77
77
|
"@atlaskit/media-core": "^37.0.0",
|
|
78
78
|
"react": "^18.2.0",
|
|
@@ -244,6 +244,9 @@
|
|
|
244
244
|
},
|
|
245
245
|
"platform_editor_ai_adf_prompts_in_all_products": {
|
|
246
246
|
"type": "boolean"
|
|
247
|
+
},
|
|
248
|
+
"jfp-magma-ssr-iv-editor-codeblock": {
|
|
249
|
+
"type": "boolean"
|
|
247
250
|
}
|
|
248
251
|
}
|
|
249
252
|
}
|