@atlaskit/renderer 109.32.0 → 109.32.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 +17 -0
- package/dist/cjs/react/nodes/table/colgroup.js +7 -5
- package/dist/cjs/ui/Renderer/index.js +1 -1
- package/dist/cjs/ui/annotations/element/mark.js +13 -5
- package/dist/es2019/react/nodes/table/colgroup.js +7 -5
- package/dist/es2019/ui/Renderer/index.js +1 -1
- package/dist/es2019/ui/annotations/element/mark.js +13 -5
- package/dist/esm/react/nodes/table/colgroup.js +7 -5
- package/dist/esm/ui/Renderer/index.js +1 -1
- package/dist/esm/ui/annotations/element/mark.js +13 -5
- package/package.json +3 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/renderer
|
|
2
2
|
|
|
3
|
+
## 109.32.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#109033](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/109033)
|
|
8
|
+
[`046555d9a96ea`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/046555d9a96ea) -
|
|
9
|
+
Converts LD flag to an experiment for Preserve Table Widths part two feature.
|
|
10
|
+
|
|
11
|
+
## 109.32.1
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [#109301](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/109301)
|
|
16
|
+
[`a94f80cafee03`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/a94f80cafee03) -
|
|
17
|
+
[ux] [ED-23638] allow clicks on commented links and mentions to work.
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
|
|
3
20
|
## 109.32.0
|
|
4
21
|
|
|
5
22
|
### Minor Changes
|
|
@@ -62,7 +62,8 @@ var renderScaleDownColgroup = function renderScaleDownColgroup(props) {
|
|
|
62
62
|
rendererAppearance = props.rendererAppearance,
|
|
63
63
|
isInsideOfBlockNode = props.isInsideOfBlockNode,
|
|
64
64
|
isinsideMultiBodiedExtension = props.isinsideMultiBodiedExtension,
|
|
65
|
-
isTableScalingEnabled = props.isTableScalingEnabled
|
|
65
|
+
isTableScalingEnabled = props.isTableScalingEnabled,
|
|
66
|
+
isTableFixedColumnWidthsOptionEnabled = props.isTableFixedColumnWidthsOptionEnabled;
|
|
66
67
|
if (!columnWidths) {
|
|
67
68
|
return [];
|
|
68
69
|
}
|
|
@@ -128,9 +129,9 @@ var renderScaleDownColgroup = function renderScaleDownColgroup(props) {
|
|
|
128
129
|
});
|
|
129
130
|
var cellMinWidth = 0;
|
|
130
131
|
var scaleDownPercent = 0;
|
|
131
|
-
var
|
|
132
|
-
var isTableWidthFixed =
|
|
133
|
-
var maxScalingPercent = (0, _platformFeatureFlags.getBooleanFF)('platform.editor.table.use-increased-scaling-percent') &&
|
|
132
|
+
var isTableScalingWithFixedColumnWidthsOptionEnabled = isTableScalingEnabled && isTableFixedColumnWidthsOptionEnabled;
|
|
133
|
+
var isTableWidthFixed = isTableScalingWithFixedColumnWidthsOptionEnabled && ((_props$tableNode = props.tableNode) === null || _props$tableNode === void 0 ? void 0 : _props$tableNode.attrs.displayMode) === 'fixed';
|
|
134
|
+
var maxScalingPercent = (0, _platformFeatureFlags.getBooleanFF)('platform.editor.table.use-increased-scaling-percent') && isTableScalingWithFixedColumnWidthsOptionEnabled ? MAX_SCALING_PERCENT_TABLES_WITH_FIXED_COLUMN_WIDTHS_OPTION : MAX_SCALING_PERCENT;
|
|
134
135
|
|
|
135
136
|
// fixes migration tables with zero-width columns
|
|
136
137
|
if (zeroWidthColumnsCount > 0) {
|
|
@@ -163,7 +164,8 @@ var Colgroup = exports.Colgroup = function Colgroup(props) {
|
|
|
163
164
|
return null;
|
|
164
165
|
}
|
|
165
166
|
var colStyles = renderScaleDownColgroup(_objectSpread(_objectSpread({}, props), {}, {
|
|
166
|
-
isTableScalingEnabled: !!(flags && 'tablePreserveWidth' in flags && flags.tablePreserveWidth)
|
|
167
|
+
isTableScalingEnabled: !!(flags && 'tablePreserveWidth' in flags && flags.tablePreserveWidth),
|
|
168
|
+
isTableFixedColumnWidthsOptionEnabled: !!(flags && 'tableWithFixedColumnWidthsOption' in flags && flags.tableWithFixedColumnWidthsOption)
|
|
167
169
|
}));
|
|
168
170
|
if (!colStyles) {
|
|
169
171
|
return null;
|
|
@@ -56,7 +56,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
56
56
|
var NORMAL_SEVERITY_THRESHOLD = exports.NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
57
57
|
var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
58
58
|
var packageName = "@atlaskit/renderer";
|
|
59
|
-
var packageVersion = "109.32.
|
|
59
|
+
var packageVersion = "109.32.2";
|
|
60
60
|
var defaultNodeComponents = exports.defaultNodeComponents = _nodes.nodeToReact;
|
|
61
61
|
var Renderer = exports.Renderer = /*#__PURE__*/function (_PureComponent) {
|
|
62
62
|
(0, _inherits2.default)(Renderer, _PureComponent);
|
|
@@ -43,13 +43,21 @@ var MarkComponent = exports.MarkComponent = function MarkComponent(_ref) {
|
|
|
43
43
|
if (event.defaultPrevented || state !== _adfSchema.AnnotationMarkStates.ACTIVE) {
|
|
44
44
|
return;
|
|
45
45
|
}
|
|
46
|
-
|
|
47
|
-
// prevents from opening link URL inside webView in Safari
|
|
48
|
-
event.preventDefault();
|
|
49
46
|
if ((0, _platformFeatureFlags.getBooleanFF)('platform.editor.allow-inline-comments-for-inline-nodes')) {
|
|
50
|
-
if
|
|
51
|
-
|
|
47
|
+
// We only want to interfere with click events if the click is on some ui inside the renderer document
|
|
48
|
+
// This is to prevent the click events from portaled content (such as link previews and mention profiles)
|
|
49
|
+
if (event.target instanceof HTMLElement && event.target.closest('.ak-renderer-document')) {
|
|
50
|
+
if (event.target.closest('[data-mention-id]')) {
|
|
51
|
+
// don't prevent default for mentions
|
|
52
|
+
} else {
|
|
53
|
+
// prevents from opening link URL inside webView in Safari
|
|
54
|
+
event.preventDefault();
|
|
55
|
+
event.stopPropagation();
|
|
56
|
+
}
|
|
52
57
|
}
|
|
58
|
+
} else {
|
|
59
|
+
// prevents from opening link URL inside webView in Safari
|
|
60
|
+
event.preventDefault();
|
|
53
61
|
}
|
|
54
62
|
onClick({
|
|
55
63
|
eventTarget: event.target,
|
|
@@ -48,7 +48,8 @@ const renderScaleDownColgroup = props => {
|
|
|
48
48
|
rendererAppearance,
|
|
49
49
|
isInsideOfBlockNode,
|
|
50
50
|
isinsideMultiBodiedExtension,
|
|
51
|
-
isTableScalingEnabled
|
|
51
|
+
isTableScalingEnabled,
|
|
52
|
+
isTableFixedColumnWidthsOptionEnabled
|
|
52
53
|
} = props;
|
|
53
54
|
if (!columnWidths) {
|
|
54
55
|
return [];
|
|
@@ -115,9 +116,9 @@ const renderScaleDownColgroup = props => {
|
|
|
115
116
|
});
|
|
116
117
|
let cellMinWidth = 0;
|
|
117
118
|
let scaleDownPercent = 0;
|
|
118
|
-
const
|
|
119
|
-
const isTableWidthFixed =
|
|
120
|
-
const maxScalingPercent = getBooleanFF('platform.editor.table.use-increased-scaling-percent') &&
|
|
119
|
+
const isTableScalingWithFixedColumnWidthsOptionEnabled = isTableScalingEnabled && isTableFixedColumnWidthsOptionEnabled;
|
|
120
|
+
const isTableWidthFixed = isTableScalingWithFixedColumnWidthsOptionEnabled && ((_props$tableNode = props.tableNode) === null || _props$tableNode === void 0 ? void 0 : _props$tableNode.attrs.displayMode) === 'fixed';
|
|
121
|
+
const maxScalingPercent = getBooleanFF('platform.editor.table.use-increased-scaling-percent') && isTableScalingWithFixedColumnWidthsOptionEnabled ? MAX_SCALING_PERCENT_TABLES_WITH_FIXED_COLUMN_WIDTHS_OPTION : MAX_SCALING_PERCENT;
|
|
121
122
|
|
|
122
123
|
// fixes migration tables with zero-width columns
|
|
123
124
|
if (zeroWidthColumnsCount > 0) {
|
|
@@ -153,7 +154,8 @@ export const Colgroup = props => {
|
|
|
153
154
|
}
|
|
154
155
|
const colStyles = renderScaleDownColgroup({
|
|
155
156
|
...props,
|
|
156
|
-
isTableScalingEnabled: !!(flags && 'tablePreserveWidth' in flags && flags.tablePreserveWidth)
|
|
157
|
+
isTableScalingEnabled: !!(flags && 'tablePreserveWidth' in flags && flags.tablePreserveWidth),
|
|
158
|
+
isTableFixedColumnWidthsOptionEnabled: !!(flags && 'tableWithFixedColumnWidthsOption' in flags && flags.tableWithFixedColumnWidthsOption)
|
|
157
159
|
});
|
|
158
160
|
if (!colStyles) {
|
|
159
161
|
return null;
|
|
@@ -37,7 +37,7 @@ import { nodeToReact } from '../../react/nodes';
|
|
|
37
37
|
export const NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
38
38
|
export const DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
39
39
|
const packageName = "@atlaskit/renderer";
|
|
40
|
-
const packageVersion = "109.32.
|
|
40
|
+
const packageVersion = "109.32.2";
|
|
41
41
|
export const defaultNodeComponents = nodeToReact;
|
|
42
42
|
export class Renderer extends PureComponent {
|
|
43
43
|
constructor(props) {
|
|
@@ -42,13 +42,21 @@ export const MarkComponent = ({
|
|
|
42
42
|
if (event.defaultPrevented || state !== AnnotationMarkStates.ACTIVE) {
|
|
43
43
|
return;
|
|
44
44
|
}
|
|
45
|
-
|
|
46
|
-
// prevents from opening link URL inside webView in Safari
|
|
47
|
-
event.preventDefault();
|
|
48
45
|
if (getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes')) {
|
|
49
|
-
if
|
|
50
|
-
|
|
46
|
+
// We only want to interfere with click events if the click is on some ui inside the renderer document
|
|
47
|
+
// This is to prevent the click events from portaled content (such as link previews and mention profiles)
|
|
48
|
+
if (event.target instanceof HTMLElement && event.target.closest('.ak-renderer-document')) {
|
|
49
|
+
if (event.target.closest('[data-mention-id]')) {
|
|
50
|
+
// don't prevent default for mentions
|
|
51
|
+
} else {
|
|
52
|
+
// prevents from opening link URL inside webView in Safari
|
|
53
|
+
event.preventDefault();
|
|
54
|
+
event.stopPropagation();
|
|
55
|
+
}
|
|
51
56
|
}
|
|
57
|
+
} else {
|
|
58
|
+
// prevents from opening link URL inside webView in Safari
|
|
59
|
+
event.preventDefault();
|
|
52
60
|
}
|
|
53
61
|
onClick({
|
|
54
62
|
eventTarget: event.target,
|
|
@@ -55,7 +55,8 @@ var renderScaleDownColgroup = function renderScaleDownColgroup(props) {
|
|
|
55
55
|
rendererAppearance = props.rendererAppearance,
|
|
56
56
|
isInsideOfBlockNode = props.isInsideOfBlockNode,
|
|
57
57
|
isinsideMultiBodiedExtension = props.isinsideMultiBodiedExtension,
|
|
58
|
-
isTableScalingEnabled = props.isTableScalingEnabled
|
|
58
|
+
isTableScalingEnabled = props.isTableScalingEnabled,
|
|
59
|
+
isTableFixedColumnWidthsOptionEnabled = props.isTableFixedColumnWidthsOptionEnabled;
|
|
59
60
|
if (!columnWidths) {
|
|
60
61
|
return [];
|
|
61
62
|
}
|
|
@@ -121,9 +122,9 @@ var renderScaleDownColgroup = function renderScaleDownColgroup(props) {
|
|
|
121
122
|
});
|
|
122
123
|
var cellMinWidth = 0;
|
|
123
124
|
var scaleDownPercent = 0;
|
|
124
|
-
var
|
|
125
|
-
var isTableWidthFixed =
|
|
126
|
-
var maxScalingPercent = getBooleanFF('platform.editor.table.use-increased-scaling-percent') &&
|
|
125
|
+
var isTableScalingWithFixedColumnWidthsOptionEnabled = isTableScalingEnabled && isTableFixedColumnWidthsOptionEnabled;
|
|
126
|
+
var isTableWidthFixed = isTableScalingWithFixedColumnWidthsOptionEnabled && ((_props$tableNode = props.tableNode) === null || _props$tableNode === void 0 ? void 0 : _props$tableNode.attrs.displayMode) === 'fixed';
|
|
127
|
+
var maxScalingPercent = getBooleanFF('platform.editor.table.use-increased-scaling-percent') && isTableScalingWithFixedColumnWidthsOptionEnabled ? MAX_SCALING_PERCENT_TABLES_WITH_FIXED_COLUMN_WIDTHS_OPTION : MAX_SCALING_PERCENT;
|
|
127
128
|
|
|
128
129
|
// fixes migration tables with zero-width columns
|
|
129
130
|
if (zeroWidthColumnsCount > 0) {
|
|
@@ -156,7 +157,8 @@ export var Colgroup = function Colgroup(props) {
|
|
|
156
157
|
return null;
|
|
157
158
|
}
|
|
158
159
|
var colStyles = renderScaleDownColgroup(_objectSpread(_objectSpread({}, props), {}, {
|
|
159
|
-
isTableScalingEnabled: !!(flags && 'tablePreserveWidth' in flags && flags.tablePreserveWidth)
|
|
160
|
+
isTableScalingEnabled: !!(flags && 'tablePreserveWidth' in flags && flags.tablePreserveWidth),
|
|
161
|
+
isTableFixedColumnWidthsOptionEnabled: !!(flags && 'tableWithFixedColumnWidthsOption' in flags && flags.tableWithFixedColumnWidthsOption)
|
|
160
162
|
}));
|
|
161
163
|
if (!colStyles) {
|
|
162
164
|
return null;
|
|
@@ -47,7 +47,7 @@ import { nodeToReact } from '../../react/nodes';
|
|
|
47
47
|
export var NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
48
48
|
export var DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
49
49
|
var packageName = "@atlaskit/renderer";
|
|
50
|
-
var packageVersion = "109.32.
|
|
50
|
+
var packageVersion = "109.32.2";
|
|
51
51
|
export var defaultNodeComponents = nodeToReact;
|
|
52
52
|
export var Renderer = /*#__PURE__*/function (_PureComponent) {
|
|
53
53
|
_inherits(Renderer, _PureComponent);
|
|
@@ -38,13 +38,21 @@ export var MarkComponent = function MarkComponent(_ref) {
|
|
|
38
38
|
if (event.defaultPrevented || state !== AnnotationMarkStates.ACTIVE) {
|
|
39
39
|
return;
|
|
40
40
|
}
|
|
41
|
-
|
|
42
|
-
// prevents from opening link URL inside webView in Safari
|
|
43
|
-
event.preventDefault();
|
|
44
41
|
if (getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes')) {
|
|
45
|
-
if
|
|
46
|
-
|
|
42
|
+
// We only want to interfere with click events if the click is on some ui inside the renderer document
|
|
43
|
+
// This is to prevent the click events from portaled content (such as link previews and mention profiles)
|
|
44
|
+
if (event.target instanceof HTMLElement && event.target.closest('.ak-renderer-document')) {
|
|
45
|
+
if (event.target.closest('[data-mention-id]')) {
|
|
46
|
+
// don't prevent default for mentions
|
|
47
|
+
} else {
|
|
48
|
+
// prevents from opening link URL inside webView in Safari
|
|
49
|
+
event.preventDefault();
|
|
50
|
+
event.stopPropagation();
|
|
51
|
+
}
|
|
47
52
|
}
|
|
53
|
+
} else {
|
|
54
|
+
// prevents from opening link URL inside webView in Safari
|
|
55
|
+
event.preventDefault();
|
|
48
56
|
}
|
|
49
57
|
onClick({
|
|
50
58
|
eventTarget: event.target,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/renderer",
|
|
3
|
-
"version": "109.32.
|
|
3
|
+
"version": "109.32.2",
|
|
4
4
|
"description": "Renderer component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@atlaskit/analytics-next": "^9.3.0",
|
|
32
32
|
"@atlaskit/button": "^17.17.0",
|
|
33
33
|
"@atlaskit/code": "^15.2.0",
|
|
34
|
-
"@atlaskit/editor-common": "^82.
|
|
34
|
+
"@atlaskit/editor-common": "^82.2.0",
|
|
35
35
|
"@atlaskit/editor-json-transformer": "^8.13.0",
|
|
36
36
|
"@atlaskit/editor-palette": "1.6.0",
|
|
37
37
|
"@atlaskit/editor-prosemirror": "4.0.1",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"@atlaskit/analytics-gas-types": "^5.1.0",
|
|
74
74
|
"@atlaskit/css-reset": "^6.9.0",
|
|
75
75
|
"@atlaskit/editor-test-helpers": "^18.23.0",
|
|
76
|
-
"@atlaskit/link-provider": "^1.
|
|
76
|
+
"@atlaskit/link-provider": "^1.11.0",
|
|
77
77
|
"@atlaskit/link-test-helpers": "^7.0.0",
|
|
78
78
|
"@atlaskit/linking-common": "^5.7.0",
|
|
79
79
|
"@atlaskit/media-core": "^34.2.0",
|
|
@@ -139,9 +139,6 @@
|
|
|
139
139
|
"platform.editor.scale-table-when-number-column-in-table-resized_y4qh2": {
|
|
140
140
|
"type": "boolean"
|
|
141
141
|
},
|
|
142
|
-
"platform.editor.table.preserve-widths-with-lock-button": {
|
|
143
|
-
"type": "boolean"
|
|
144
|
-
},
|
|
145
142
|
"platform.editor.table.use-increased-scaling-percent": {
|
|
146
143
|
"type": "boolean"
|
|
147
144
|
},
|