@atlaskit/renderer 96.0.0 → 96.0.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 +9 -1
- package/dist/cjs/react/nodes/panel.js +7 -5
- package/dist/cjs/react/nodes/table/sticky.js +26 -13
- package/dist/cjs/utils.js +0 -24
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/react/nodes/panel.js +19 -16
- package/dist/es2019/react/nodes/table/sticky.js +24 -6
- package/dist/es2019/utils.js +0 -22
- package/dist/es2019/version.json +1 -1
- package/dist/esm/react/nodes/panel.js +7 -5
- package/dist/esm/react/nodes/table/sticky.js +24 -4
- package/dist/esm/utils.js +0 -22
- package/dist/esm/version.json +1 -1
- package/dist/types/utils.d.ts +4 -8
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/renderer
|
|
2
2
|
|
|
3
|
+
## 96.0.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`9dc961ea69e`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9dc961ea69e) - ED-14610: reduce code bundled with table sticky headers
|
|
8
|
+
- [`d6b54a2fd48`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d6b54a2fd48) - [ux] Fix custom panel dark mode colour regression
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
3
11
|
## 96.0.0
|
|
4
12
|
|
|
5
13
|
### Major Changes
|
|
@@ -43,7 +51,7 @@
|
|
|
43
51
|
### Patch Changes
|
|
44
52
|
|
|
45
53
|
- [`ccde3d9eb43`](https://bitbucket.org/atlassian/atlassian-frontend/commits/ccde3d9eb43) - [ux] ED-10335: memoize schema, validation and serialization for Renderer
|
|
46
|
-
- [`59e17ae76c1`](https://bitbucket.org/atlassian/atlassian-frontend/commits/59e17ae76c1) - [ux] ED-14961
|
|
54
|
+
- [`59e17ae76c1`](https://bitbucket.org/atlassian/atlassian-frontend/commits/59e17ae76c1) - [ux] ED-14961: fix table sticky header in renderer overlapping typeahead popup in comment section
|
|
47
55
|
- [`47a59c220af`](https://bitbucket.org/atlassian/atlassian-frontend/commits/47a59c220af) - [ux] ED-10334: memoised schema.nodeFromJSON() and node.check() in Renderer.renderDocument()
|
|
48
56
|
- [`08edcd36c6f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/08edcd36c6f) - [ux] Convert RGB color usage to Design Tokens. This change is backwards compatible with existing theming
|
|
49
57
|
- Updated dependencies
|
|
@@ -40,13 +40,15 @@ var PanelStyled = function PanelStyled(props) {
|
|
|
40
40
|
|
|
41
41
|
if (props['data-panel-type'] === _adfSchema.PanelType.CUSTOM && props.backgroundColor) {
|
|
42
42
|
styles = function styles(theme) {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
dark: _panel.getPanelBackgroundDarkModeColors
|
|
43
|
+
var customStyle = (0, _theme.themed)({
|
|
44
|
+
dark: _panel.getPanelBackgroundDarkModeColors,
|
|
45
|
+
light: "background-color: ".concat(props.backgroundColor, ";")
|
|
47
46
|
})({
|
|
48
47
|
theme: theme
|
|
49
|
-
})
|
|
48
|
+
});
|
|
49
|
+
return (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n &.", " {\n ", "\n }\n\n &[data-panel-type=", "] {\n ", ";\n }\n "])), _panel.PanelSharedCssClassName.prefix, (0, _panel.panelSharedStylesWithoutPrefix)({
|
|
50
|
+
theme: theme
|
|
51
|
+
}), _adfSchema.PanelType.CUSTOM, customStyle);
|
|
50
52
|
};
|
|
51
53
|
}
|
|
52
54
|
|
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
|
|
5
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
-
|
|
7
5
|
Object.defineProperty(exports, "__esModule", {
|
|
8
6
|
value: true
|
|
9
7
|
});
|
|
@@ -25,24 +23,16 @@ var _styles = require("@atlaskit/editor-common/styles");
|
|
|
25
23
|
|
|
26
24
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
27
25
|
|
|
28
|
-
var
|
|
26
|
+
var _colors = require("@atlaskit/theme/colors");
|
|
29
27
|
|
|
30
28
|
var _tokens = require("@atlaskit/tokens");
|
|
31
29
|
|
|
32
|
-
var _utils = require("../../../utils");
|
|
33
|
-
|
|
34
30
|
var _table = require("./table");
|
|
35
31
|
|
|
36
32
|
var _injectProps = require("../../utils/inject-props");
|
|
37
33
|
|
|
38
34
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
39
35
|
|
|
40
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
41
|
-
|
|
42
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
43
|
-
|
|
44
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
45
|
-
var N40A = colors.N40A;
|
|
46
36
|
var tableStickyPadding = 8;
|
|
47
37
|
exports.tableStickyPadding = tableStickyPadding;
|
|
48
38
|
var modeSpecficStyles = {
|
|
@@ -52,7 +42,7 @@ var modeSpecficStyles = {
|
|
|
52
42
|
}; // TODO: Quality ticket: https://product-fabric.atlassian.net/browse/DSP-4123
|
|
53
43
|
|
|
54
44
|
var fixedTableDivStaticStyles = function fixedTableDivStaticStyles(top, width) {
|
|
55
|
-
return (0, _react2.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n width: ", "px;\n z-index: ", ";\n &\n .", ",\n &\n .", "\n > table {\n margin-top: 0;\n margin-bottom: 0;\n }\n\n border-top: ", "px solid\n ", ";\n background: ", ";\n box-shadow: ", ";\n\n div[data-expanded='false'] & {\n display: none;\n }\n\n &\n .", ".right-shadow::after,\n &\n .", ".left-shadow::before {\n top: 0px;\n height: 100%;\n }\n"])), typeof top === 'number' && "top: ".concat(top, "px;"), width, _editorSharedStyles.akEditorStickyHeaderZIndex, _styles.TableSharedCssClassName.TABLE_CONTAINER, _styles.TableSharedCssClassName.TABLE_STICKY_WRAPPER, tableStickyPadding, (0, _tokens.token)('elevation.surface', 'white'), (0, _tokens.token)('elevation.surface.overlay', 'white'), (0, _tokens.token)('elevation.shadow.overflow', "0 6px 4px -4px ".concat(N40A)), _styles.TableSharedCssClassName.TABLE_CONTAINER, _styles.TableSharedCssClassName.TABLE_CONTAINER);
|
|
45
|
+
return (0, _react2.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n width: ", "px;\n z-index: ", ";\n &\n .", ",\n &\n .", "\n > table {\n margin-top: 0;\n margin-bottom: 0;\n }\n\n border-top: ", "px solid\n ", ";\n background: ", ";\n box-shadow: ", ";\n\n div[data-expanded='false'] & {\n display: none;\n }\n\n &\n .", ".right-shadow::after,\n &\n .", ".left-shadow::before {\n top: 0px;\n height: 100%;\n }\n"])), typeof top === 'number' && "top: ".concat(top, "px;"), width, _editorSharedStyles.akEditorStickyHeaderZIndex, _styles.TableSharedCssClassName.TABLE_CONTAINER, _styles.TableSharedCssClassName.TABLE_STICKY_WRAPPER, tableStickyPadding, (0, _tokens.token)('elevation.surface', 'white'), (0, _tokens.token)('elevation.surface.overlay', 'white'), (0, _tokens.token)('elevation.shadow.overflow', "0 6px 4px -4px ".concat(_colors.N40A)), _styles.TableSharedCssClassName.TABLE_CONTAINER, _styles.TableSharedCssClassName.TABLE_CONTAINER);
|
|
56
46
|
};
|
|
57
47
|
|
|
58
48
|
var FixedTableDiv = function FixedTableDiv(props) {
|
|
@@ -123,9 +113,32 @@ var StickyTable = function StickyTable(_ref) {
|
|
|
123
113
|
invisible: true
|
|
124
114
|
}))))));
|
|
125
115
|
};
|
|
116
|
+
/**
|
|
117
|
+
* Traverse DOM Tree upwards looking for table parents with "overflow: scroll".
|
|
118
|
+
*/
|
|
119
|
+
|
|
126
120
|
|
|
127
121
|
exports.StickyTable = StickyTable;
|
|
128
122
|
|
|
123
|
+
function findHorizontalOverflowScrollParent(table) {
|
|
124
|
+
var parent = table;
|
|
125
|
+
|
|
126
|
+
if (!parent) {
|
|
127
|
+
return null;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
while (parent = parent.parentElement) {
|
|
131
|
+
// IE11 on Window 8 doesn't show styles from CSS when accessing through element.style property.
|
|
132
|
+
var style = window.getComputedStyle(parent);
|
|
133
|
+
|
|
134
|
+
if (style.overflow === 'scroll' || style.overflowY === 'scroll') {
|
|
135
|
+
return parent;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
return null;
|
|
140
|
+
}
|
|
141
|
+
|
|
129
142
|
var OverflowParent = /*#__PURE__*/function () {
|
|
130
143
|
function OverflowParent(ref) {
|
|
131
144
|
(0, _classCallCheck2.default)(this, OverflowParent);
|
|
@@ -172,7 +185,7 @@ var OverflowParent = /*#__PURE__*/function () {
|
|
|
172
185
|
}], [{
|
|
173
186
|
key: "fromElement",
|
|
174
187
|
value: function fromElement(el) {
|
|
175
|
-
return new OverflowParent(
|
|
188
|
+
return new OverflowParent(findHorizontalOverflowScrollParent(el) || window);
|
|
176
189
|
}
|
|
177
190
|
}]);
|
|
178
191
|
return OverflowParent;
|
package/dist/cjs/utils.js
CHANGED
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.ADFEncoder = void 0;
|
|
9
|
-
exports.findHorizontalOverflowScrollParent = findHorizontalOverflowScrollParent;
|
|
10
9
|
exports.findInTree = findInTree;
|
|
11
10
|
exports.getText = exports.getPlatform = exports.getEventHandler = void 0;
|
|
12
11
|
|
|
@@ -41,32 +40,9 @@ var getEventHandler = function getEventHandler(eventHandlers, type) {
|
|
|
41
40
|
var eventName = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'onClick';
|
|
42
41
|
return eventHandlers && type && eventHandlers[type] && eventHandlers[type][eventName];
|
|
43
42
|
};
|
|
44
|
-
/**
|
|
45
|
-
* Traverse DOM Tree upwards looking for table parents with "overflow: scroll".
|
|
46
|
-
*/
|
|
47
|
-
|
|
48
43
|
|
|
49
44
|
exports.getEventHandler = getEventHandler;
|
|
50
45
|
|
|
51
|
-
function findHorizontalOverflowScrollParent(table) {
|
|
52
|
-
var parent = table;
|
|
53
|
-
|
|
54
|
-
if (!parent) {
|
|
55
|
-
return null;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
while (parent = parent.parentElement) {
|
|
59
|
-
// IE11 on Window 8 doesn't show styles from CSS when accessing through element.style property.
|
|
60
|
-
var style = window.getComputedStyle(parent);
|
|
61
|
-
|
|
62
|
-
if (style.overflow === 'scroll' || style.overflowY === 'scroll') {
|
|
63
|
-
return parent;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
return null;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
46
|
var getPlatform = function getPlatform(rendererAppearance) {
|
|
71
47
|
if (rendererAppearance === 'mobile') {
|
|
72
48
|
return 'mobile';
|
package/dist/cjs/version.json
CHANGED
|
@@ -23,22 +23,25 @@ const PanelStyled = props => {
|
|
|
23
23
|
`;
|
|
24
24
|
|
|
25
25
|
if (props['data-panel-type'] === PanelType.CUSTOM && props.backgroundColor) {
|
|
26
|
-
styles = theme =>
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
26
|
+
styles = theme => {
|
|
27
|
+
const customStyle = themed({
|
|
28
|
+
dark: getPanelBackgroundDarkModeColors,
|
|
29
|
+
light: `background-color: ${props.backgroundColor};`
|
|
30
|
+
})({
|
|
31
|
+
theme
|
|
32
|
+
});
|
|
33
|
+
return css`
|
|
34
|
+
&.${PanelSharedCssClassName.prefix} {
|
|
35
|
+
${panelSharedStylesWithoutPrefix({
|
|
36
|
+
theme
|
|
37
|
+
})}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&[data-panel-type=${PanelType.CUSTOM}] {
|
|
41
|
+
${customStyle};
|
|
42
|
+
}
|
|
43
|
+
`;
|
|
44
|
+
};
|
|
42
45
|
}
|
|
43
46
|
|
|
44
47
|
return jsx("div", _extends({
|
|
@@ -5,13 +5,8 @@ import React from 'react';
|
|
|
5
5
|
import { css, jsx } from '@emotion/react';
|
|
6
6
|
import { TableSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
7
7
|
import { akEditorStickyHeaderZIndex } from '@atlaskit/editor-shared-styles';
|
|
8
|
-
import
|
|
9
|
-
|
|
10
|
-
const {
|
|
11
|
-
N40A
|
|
12
|
-
} = colors;
|
|
8
|
+
import { N40A } from '@atlaskit/theme/colors';
|
|
13
9
|
import { token } from '@atlaskit/tokens';
|
|
14
|
-
import { findHorizontalOverflowScrollParent } from '../../../utils';
|
|
15
10
|
import { Table } from './table';
|
|
16
11
|
import { recursivelyInjectProps } from '../../utils/inject-props';
|
|
17
12
|
export const tableStickyPadding = 8;
|
|
@@ -126,6 +121,29 @@ export const StickyTable = ({
|
|
|
126
121
|
invisible: true
|
|
127
122
|
}))))));
|
|
128
123
|
};
|
|
124
|
+
/**
|
|
125
|
+
* Traverse DOM Tree upwards looking for table parents with "overflow: scroll".
|
|
126
|
+
*/
|
|
127
|
+
|
|
128
|
+
function findHorizontalOverflowScrollParent(table) {
|
|
129
|
+
let parent = table;
|
|
130
|
+
|
|
131
|
+
if (!parent) {
|
|
132
|
+
return null;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
while (parent = parent.parentElement) {
|
|
136
|
+
// IE11 on Window 8 doesn't show styles from CSS when accessing through element.style property.
|
|
137
|
+
const style = window.getComputedStyle(parent);
|
|
138
|
+
|
|
139
|
+
if (style.overflow === 'scroll' || style.overflowY === 'scroll') {
|
|
140
|
+
return parent;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
return null;
|
|
145
|
+
}
|
|
146
|
+
|
|
129
147
|
export class OverflowParent {
|
|
130
148
|
constructor(ref) {
|
|
131
149
|
this.ref = ref;
|
package/dist/es2019/utils.js
CHANGED
|
@@ -18,28 +18,6 @@ export const getText = node => {
|
|
|
18
18
|
export const getEventHandler = (eventHandlers, type, eventName = 'onClick') => {
|
|
19
19
|
return eventHandlers && type && eventHandlers[type] && eventHandlers[type][eventName];
|
|
20
20
|
};
|
|
21
|
-
/**
|
|
22
|
-
* Traverse DOM Tree upwards looking for table parents with "overflow: scroll".
|
|
23
|
-
*/
|
|
24
|
-
|
|
25
|
-
export function findHorizontalOverflowScrollParent(table) {
|
|
26
|
-
let parent = table;
|
|
27
|
-
|
|
28
|
-
if (!parent) {
|
|
29
|
-
return null;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
while (parent = parent.parentElement) {
|
|
33
|
-
// IE11 on Window 8 doesn't show styles from CSS when accessing through element.style property.
|
|
34
|
-
const style = window.getComputedStyle(parent);
|
|
35
|
-
|
|
36
|
-
if (style.overflow === 'scroll' || style.overflowY === 'scroll') {
|
|
37
|
-
return parent;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
return null;
|
|
42
|
-
}
|
|
43
21
|
export const getPlatform = rendererAppearance => {
|
|
44
22
|
if (rendererAppearance === 'mobile') {
|
|
45
23
|
return 'mobile';
|
package/dist/es2019/version.json
CHANGED
|
@@ -25,13 +25,15 @@ var PanelStyled = function PanelStyled(props) {
|
|
|
25
25
|
|
|
26
26
|
if (props['data-panel-type'] === PanelType.CUSTOM && props.backgroundColor) {
|
|
27
27
|
styles = function styles(theme) {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
dark: getPanelBackgroundDarkModeColors
|
|
28
|
+
var customStyle = themed({
|
|
29
|
+
dark: getPanelBackgroundDarkModeColors,
|
|
30
|
+
light: "background-color: ".concat(props.backgroundColor, ";")
|
|
32
31
|
})({
|
|
33
32
|
theme: theme
|
|
34
|
-
})
|
|
33
|
+
});
|
|
34
|
+
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n &.", " {\n ", "\n }\n\n &[data-panel-type=", "] {\n ", ";\n }\n "])), PanelSharedCssClassName.prefix, panelSharedStylesWithoutPrefix({
|
|
35
|
+
theme: theme
|
|
36
|
+
}), PanelType.CUSTOM, customStyle);
|
|
35
37
|
};
|
|
36
38
|
}
|
|
37
39
|
|
|
@@ -10,11 +10,8 @@ import React from 'react';
|
|
|
10
10
|
import { css, jsx } from '@emotion/react';
|
|
11
11
|
import { TableSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
12
12
|
import { akEditorStickyHeaderZIndex } from '@atlaskit/editor-shared-styles';
|
|
13
|
-
import
|
|
14
|
-
|
|
15
|
-
var N40A = colors.N40A;
|
|
13
|
+
import { N40A } from '@atlaskit/theme/colors';
|
|
16
14
|
import { token } from '@atlaskit/tokens';
|
|
17
|
-
import { findHorizontalOverflowScrollParent } from '../../../utils';
|
|
18
15
|
import { Table } from './table';
|
|
19
16
|
import { recursivelyInjectProps } from '../../utils/inject-props';
|
|
20
17
|
export var tableStickyPadding = 8;
|
|
@@ -93,6 +90,29 @@ export var StickyTable = function StickyTable(_ref) {
|
|
|
93
90
|
invisible: true
|
|
94
91
|
}))))));
|
|
95
92
|
};
|
|
93
|
+
/**
|
|
94
|
+
* Traverse DOM Tree upwards looking for table parents with "overflow: scroll".
|
|
95
|
+
*/
|
|
96
|
+
|
|
97
|
+
function findHorizontalOverflowScrollParent(table) {
|
|
98
|
+
var parent = table;
|
|
99
|
+
|
|
100
|
+
if (!parent) {
|
|
101
|
+
return null;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
while (parent = parent.parentElement) {
|
|
105
|
+
// IE11 on Window 8 doesn't show styles from CSS when accessing through element.style property.
|
|
106
|
+
var style = window.getComputedStyle(parent);
|
|
107
|
+
|
|
108
|
+
if (style.overflow === 'scroll' || style.overflowY === 'scroll') {
|
|
109
|
+
return parent;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
return null;
|
|
114
|
+
}
|
|
115
|
+
|
|
96
116
|
export var OverflowParent = /*#__PURE__*/function () {
|
|
97
117
|
function OverflowParent(ref) {
|
|
98
118
|
_classCallCheck(this, OverflowParent);
|
package/dist/esm/utils.js
CHANGED
|
@@ -22,28 +22,6 @@ export var getEventHandler = function getEventHandler(eventHandlers, type) {
|
|
|
22
22
|
var eventName = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'onClick';
|
|
23
23
|
return eventHandlers && type && eventHandlers[type] && eventHandlers[type][eventName];
|
|
24
24
|
};
|
|
25
|
-
/**
|
|
26
|
-
* Traverse DOM Tree upwards looking for table parents with "overflow: scroll".
|
|
27
|
-
*/
|
|
28
|
-
|
|
29
|
-
export function findHorizontalOverflowScrollParent(table) {
|
|
30
|
-
var parent = table;
|
|
31
|
-
|
|
32
|
-
if (!parent) {
|
|
33
|
-
return null;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
while (parent = parent.parentElement) {
|
|
37
|
-
// IE11 on Window 8 doesn't show styles from CSS when accessing through element.style property.
|
|
38
|
-
var style = window.getComputedStyle(parent);
|
|
39
|
-
|
|
40
|
-
if (style.overflow === 'scroll' || style.overflowY === 'scroll') {
|
|
41
|
-
return parent;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
return null;
|
|
46
|
-
}
|
|
47
25
|
export var getPlatform = function getPlatform(rendererAppearance) {
|
|
48
26
|
if (rendererAppearance === 'mobile') {
|
|
49
27
|
return 'mobile';
|
package/dist/esm/version.json
CHANGED
package/dist/types/utils.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Schema } from 'prosemirror-model';
|
|
1
|
+
import type { Schema } from 'prosemirror-model';
|
|
2
2
|
import type { ADNode } from '@atlaskit/editor-common/validator';
|
|
3
3
|
import type { EventHandlers } from '@atlaskit/editor-common/ui';
|
|
4
|
-
import { Transformer } from '@atlaskit/editor-common/types';
|
|
5
|
-
import { Node as PMNode } from 'prosemirror-model';
|
|
6
|
-
import { RendererAppearance } from './ui/Renderer/types';
|
|
4
|
+
import type { Transformer } from '@atlaskit/editor-common/types';
|
|
5
|
+
import type { Node as PMNode } from 'prosemirror-model';
|
|
6
|
+
import type { RendererAppearance } from './ui/Renderer/types';
|
|
7
7
|
export declare type TransformerProvider<T> = (schema: Schema) => Transformer<T>;
|
|
8
8
|
export declare class ADFEncoder<T> {
|
|
9
9
|
encode: (value: T) => any;
|
|
@@ -11,10 +11,6 @@ export declare class ADFEncoder<T> {
|
|
|
11
11
|
}
|
|
12
12
|
export declare const getText: (node: PMNode | ADNode) => string;
|
|
13
13
|
export declare const getEventHandler: (eventHandlers?: EventHandlers | undefined, type?: keyof EventHandlers | undefined, eventName?: string) => any;
|
|
14
|
-
/**
|
|
15
|
-
* Traverse DOM Tree upwards looking for table parents with "overflow: scroll".
|
|
16
|
-
*/
|
|
17
|
-
export declare function findHorizontalOverflowScrollParent(table: HTMLElement | null): HTMLElement | null;
|
|
18
14
|
export declare const getPlatform: (rendererAppearance: RendererAppearance) => "mobile" | "web";
|
|
19
15
|
/**
|
|
20
16
|
* Traverse through parent elements of element. Return element for which evaluate(element) returns
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/renderer",
|
|
3
|
-
"version": "96.0.
|
|
3
|
+
"version": "96.0.1",
|
|
4
4
|
"description": "Renderer component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -35,12 +35,12 @@
|
|
|
35
35
|
"@atlaskit/editor-json-transformer": "^8.7.0",
|
|
36
36
|
"@atlaskit/editor-shared-styles": "^2.1.0",
|
|
37
37
|
"@atlaskit/icon": "^21.10.0",
|
|
38
|
-
"@atlaskit/media-card": "^73.
|
|
39
|
-
"@atlaskit/media-client": "^
|
|
40
|
-
"@atlaskit/media-common": "^2.
|
|
38
|
+
"@atlaskit/media-card": "^73.8.0",
|
|
39
|
+
"@atlaskit/media-client": "^17.0.0",
|
|
40
|
+
"@atlaskit/media-common": "^2.15.0",
|
|
41
41
|
"@atlaskit/media-filmstrip": "^44.0.0",
|
|
42
42
|
"@atlaskit/media-ui": "^22.1.0",
|
|
43
|
-
"@atlaskit/media-viewer": "^46.
|
|
43
|
+
"@atlaskit/media-viewer": "^46.5.0",
|
|
44
44
|
"@atlaskit/status": "^1.1.0",
|
|
45
45
|
"@atlaskit/task-decision": "^17.4.0",
|
|
46
46
|
"@atlaskit/theme": "^12.1.0",
|
|
@@ -76,12 +76,12 @@
|
|
|
76
76
|
"@atlaskit/media-test-helpers": "^30.0.0",
|
|
77
77
|
"@atlaskit/mention": "^21.0.0",
|
|
78
78
|
"@atlaskit/navigation-next": "^9.0.0",
|
|
79
|
-
"@atlaskit/profilecard": "^16.
|
|
79
|
+
"@atlaskit/profilecard": "^16.5.0",
|
|
80
80
|
"@atlaskit/radio": "^5.3.0",
|
|
81
81
|
"@atlaskit/range": "^6.0.0",
|
|
82
82
|
"@atlaskit/smart-card": "^19.1.0",
|
|
83
83
|
"@atlaskit/ssr": "*",
|
|
84
|
-
"@atlaskit/util-data-test": "^17.
|
|
84
|
+
"@atlaskit/util-data-test": "^17.3.0",
|
|
85
85
|
"@atlaskit/visual-regression": "*",
|
|
86
86
|
"@atlaskit/webdriver-runner": "*",
|
|
87
87
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|