@atlaskit/renderer 108.17.2 → 108.17.4
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 +12 -0
- package/dist/cjs/react/marks/alignment.js +2 -3
- package/dist/cjs/react/marks/breakout.js +2 -3
- package/dist/cjs/react/marks/link.js +3 -4
- package/dist/cjs/react/nodes/blockCard.js +11 -13
- package/dist/cjs/react/nodes/codeBlock/codeBlock.js +2 -5
- package/dist/cjs/react/nodes/codeBlock/components/codeBlockButtonContainer.js +4 -6
- package/dist/cjs/react/nodes/codeBlock/components/codeBlockContainer.js +2 -3
- package/dist/cjs/react/nodes/codeBlock/components/codeBlockCopyButton.js +8 -11
- package/dist/cjs/react/nodes/codeBlock/components/codeBlockWrapButton.js +8 -11
- package/dist/cjs/react/nodes/codeBlock/components/lightWeightCodeBlock.js +7 -8
- package/dist/cjs/react/nodes/codeBlock/windowedCodeBlock.js +5 -6
- package/dist/cjs/react/nodes/embedCard.js +8 -9
- package/dist/cjs/react/nodes/heading-anchor.js +4 -5
- package/dist/cjs/react/nodes/layoutColumn.js +2 -3
- package/dist/cjs/react/nodes/media/index.js +7 -8
- package/dist/cjs/react/nodes/mediaSingle/index.js +3 -6
- package/dist/cjs/react/nodes/mediaSingle/styles.js +0 -1
- package/dist/cjs/react/nodes/panel.js +7 -9
- package/dist/cjs/react/nodes/table/sticky.js +6 -7
- package/dist/cjs/ui/Expand.js +16 -18
- package/dist/cjs/ui/Renderer/index.js +22 -23
- package/dist/cjs/ui/Renderer/truncated-wrapper.js +2 -3
- package/dist/cjs/ui/SortingIcon.js +4 -5
- package/dist/cjs/ui/annotations/draft/component.js +8 -9
- package/dist/cjs/ui/annotations/element/mark.js +1 -2
- package/dist/es2019/react/marks/alignment.js +3 -4
- package/dist/es2019/react/marks/breakout.js +3 -4
- package/dist/es2019/react/marks/link.js +4 -5
- package/dist/es2019/react/nodes/blockCard.js +12 -13
- package/dist/es2019/react/nodes/codeBlock/codeBlock.js +2 -4
- package/dist/es2019/react/nodes/codeBlock/components/codeBlockButtonContainer.js +5 -6
- package/dist/es2019/react/nodes/codeBlock/components/codeBlockContainer.js +3 -4
- package/dist/es2019/react/nodes/codeBlock/components/codeBlockCopyButton.js +5 -7
- package/dist/es2019/react/nodes/codeBlock/components/codeBlockWrapButton.js +7 -9
- package/dist/es2019/react/nodes/codeBlock/components/lightWeightCodeBlock.js +8 -9
- package/dist/es2019/react/nodes/codeBlock/windowedCodeBlock.js +4 -6
- package/dist/es2019/react/nodes/embedCard.js +9 -10
- package/dist/es2019/react/nodes/heading-anchor.js +5 -6
- package/dist/es2019/react/nodes/layoutColumn.js +3 -4
- package/dist/es2019/react/nodes/media/index.js +6 -9
- package/dist/es2019/react/nodes/mediaSingle/index.js +3 -6
- package/dist/es2019/react/nodes/mediaSingle/styles.js +0 -1
- package/dist/es2019/react/nodes/panel.js +7 -8
- package/dist/es2019/react/nodes/table/sticky.js +7 -8
- package/dist/es2019/ui/Expand.js +16 -17
- package/dist/es2019/ui/Renderer/index.js +21 -23
- package/dist/es2019/ui/Renderer/truncated-wrapper.js +3 -4
- package/dist/es2019/ui/SortingIcon.js +5 -6
- package/dist/es2019/ui/annotations/draft/component.js +9 -10
- package/dist/es2019/ui/annotations/element/mark.js +2 -3
- package/dist/esm/react/marks/alignment.js +3 -4
- package/dist/esm/react/marks/breakout.js +3 -4
- package/dist/esm/react/marks/link.js +4 -5
- package/dist/esm/react/nodes/blockCard.js +12 -13
- package/dist/esm/react/nodes/codeBlock/codeBlock.js +2 -4
- package/dist/esm/react/nodes/codeBlock/components/codeBlockButtonContainer.js +5 -6
- package/dist/esm/react/nodes/codeBlock/components/codeBlockContainer.js +3 -4
- package/dist/esm/react/nodes/codeBlock/components/codeBlockCopyButton.js +5 -7
- package/dist/esm/react/nodes/codeBlock/components/codeBlockWrapButton.js +7 -9
- package/dist/esm/react/nodes/codeBlock/components/lightWeightCodeBlock.js +8 -9
- package/dist/esm/react/nodes/codeBlock/windowedCodeBlock.js +4 -6
- package/dist/esm/react/nodes/embedCard.js +9 -10
- package/dist/esm/react/nodes/heading-anchor.js +5 -6
- package/dist/esm/react/nodes/layoutColumn.js +3 -4
- package/dist/esm/react/nodes/media/index.js +6 -9
- package/dist/esm/react/nodes/mediaSingle/index.js +3 -6
- package/dist/esm/react/nodes/mediaSingle/styles.js +0 -1
- package/dist/esm/react/nodes/panel.js +7 -8
- package/dist/esm/react/nodes/table/sticky.js +7 -8
- package/dist/esm/ui/Expand.js +16 -17
- package/dist/esm/ui/Renderer/index.js +21 -23
- package/dist/esm/ui/Renderer/truncated-wrapper.js +3 -4
- package/dist/esm/ui/SortingIcon.js +5 -6
- package/dist/esm/ui/annotations/draft/component.js +9 -10
- package/dist/esm/ui/annotations/element/mark.js +2 -3
- package/package.json +3 -3
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
/** @jsx jsx */
|
|
3
2
|
import { useMemo } from 'react';
|
|
4
|
-
import { css
|
|
3
|
+
import { css } from '@emotion/react';
|
|
5
4
|
import { Card } from '@atlaskit/smart-card';
|
|
6
5
|
import { UnsupportedBlock, UnsupportedInline, WidthConsumer } from '@atlaskit/editor-common/ui';
|
|
7
6
|
import { getPlatform } from '../../utils';
|
|
@@ -57,7 +56,7 @@ export default function BlockCard(props) {
|
|
|
57
56
|
};
|
|
58
57
|
if (props.datasource) {
|
|
59
58
|
if (platform === 'mobile') {
|
|
60
|
-
return
|
|
59
|
+
return /*#__PURE__*/React.createElement(InlineCard, props);
|
|
61
60
|
}
|
|
62
61
|
const views = props.datasource.views;
|
|
63
62
|
const tableView = views.find(view => view.type === 'table');
|
|
@@ -76,18 +75,18 @@ export default function BlockCard(props) {
|
|
|
76
75
|
datasource,
|
|
77
76
|
layout
|
|
78
77
|
} = props;
|
|
79
|
-
return
|
|
78
|
+
return /*#__PURE__*/React.createElement(AnalyticsContext, {
|
|
80
79
|
data: analyticsData
|
|
81
|
-
},
|
|
80
|
+
}, /*#__PURE__*/React.createElement(CardErrorBoundary, _extends({
|
|
82
81
|
unsupportedComponent: UnsupportedInline
|
|
83
|
-
}, cardProps),
|
|
82
|
+
}, cardProps), /*#__PURE__*/React.createElement(WidthConsumer, null, ({
|
|
84
83
|
width
|
|
85
|
-
}) =>
|
|
84
|
+
}) => /*#__PURE__*/React.createElement("div", {
|
|
86
85
|
css: datasourceContainerStyle,
|
|
87
86
|
style: {
|
|
88
87
|
width: calcBreakoutWidth(layout, width)
|
|
89
88
|
}
|
|
90
|
-
},
|
|
89
|
+
}, /*#__PURE__*/React.createElement(DatasourceTableView, {
|
|
91
90
|
datasourceId: datasource.id,
|
|
92
91
|
parameters: datasource.parameters,
|
|
93
92
|
visibleColumnKeys: visibleColumnKeys,
|
|
@@ -95,21 +94,21 @@ export default function BlockCard(props) {
|
|
|
95
94
|
url: url
|
|
96
95
|
})))));
|
|
97
96
|
}
|
|
98
|
-
return
|
|
97
|
+
return /*#__PURE__*/React.createElement(InlineCard, {
|
|
99
98
|
data: data,
|
|
100
99
|
url: url
|
|
101
100
|
});
|
|
102
101
|
}
|
|
103
|
-
return
|
|
102
|
+
return /*#__PURE__*/React.createElement(AnalyticsContext, {
|
|
104
103
|
data: analyticsData
|
|
105
|
-
},
|
|
104
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
106
105
|
className: "blockCardView-content-wrap",
|
|
107
106
|
"data-block-card": true,
|
|
108
107
|
"data-card-data": data ? JSON.stringify(data) : undefined,
|
|
109
108
|
"data-card-url": url
|
|
110
|
-
},
|
|
109
|
+
}, /*#__PURE__*/React.createElement(CardErrorBoundary, _extends({
|
|
111
110
|
unsupportedComponent: UnsupportedBlock
|
|
112
|
-
}, cardProps),
|
|
111
|
+
}, cardProps), /*#__PURE__*/React.createElement(Card, _extends({
|
|
113
112
|
appearance: "block",
|
|
114
113
|
showActions: rendererAppearance !== 'mobile',
|
|
115
114
|
platform: platform,
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
/** @jsx jsx */
|
|
2
1
|
import { useState } from 'react';
|
|
3
|
-
import { jsx } from '@emotion/react';
|
|
4
2
|
import { injectIntl } from 'react-intl-next';
|
|
5
3
|
import { CodeBlockSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
6
4
|
import { CodeBlock as AkCodeBlock } from '@atlaskit/code';
|
|
@@ -17,14 +15,14 @@ function CodeBlock(props) {
|
|
|
17
15
|
const codeBidiWarningLabel = props.intl.formatMessage(codeBidiWarningMessages.label);
|
|
18
16
|
const className = [CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER, props.className].join(' ');
|
|
19
17
|
const [wrapLongLines, setWrapLongLines] = useState(false);
|
|
20
|
-
return
|
|
18
|
+
return /*#__PURE__*/React.createElement(CodeBlockContainer, {
|
|
21
19
|
allowCopyToClipboard: allowCopyToClipboard,
|
|
22
20
|
allowWrapCodeBlock: allowWrapCodeBlock,
|
|
23
21
|
className: className,
|
|
24
22
|
setWrapLongLines: setWrapLongLines,
|
|
25
23
|
text: text,
|
|
26
24
|
wrapLongLines: wrapLongLines
|
|
27
|
-
},
|
|
25
|
+
}, /*#__PURE__*/React.createElement(AkCodeBlock, {
|
|
28
26
|
language: language,
|
|
29
27
|
text: text,
|
|
30
28
|
codeBidiWarningLabel: codeBidiWarningLabel,
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { jsx, css } from '@emotion/react';
|
|
1
|
+
import { css } from '@emotion/react';
|
|
3
2
|
import CopyButton from './codeBlockCopyButton';
|
|
4
3
|
import CodeWrapButton from './codeBlockWrapButton';
|
|
5
4
|
import { N0, N20, N30, N700 } from '@atlaskit/theme/colors';
|
|
@@ -46,14 +45,14 @@ const CodeBlockButtonContainer = ({
|
|
|
46
45
|
text,
|
|
47
46
|
wrapLongLines
|
|
48
47
|
}) => {
|
|
49
|
-
return
|
|
48
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
50
49
|
css: codeBlockButtonsWrapper
|
|
51
|
-
},
|
|
50
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
52
51
|
css: codeBlockButtonsStyle
|
|
53
|
-
}, allowWrapCodeBlock &&
|
|
52
|
+
}, allowWrapCodeBlock && /*#__PURE__*/React.createElement(CodeWrapButton, {
|
|
54
53
|
setWrapLongLines: setWrapLongLines,
|
|
55
54
|
wrapLongLines: wrapLongLines
|
|
56
|
-
}), allowCopyToClipboard &&
|
|
55
|
+
}), allowCopyToClipboard && /*#__PURE__*/React.createElement(CopyButton, {
|
|
57
56
|
content: text
|
|
58
57
|
})));
|
|
59
58
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { jsx, css } from '@emotion/react';
|
|
1
|
+
import { css } from '@emotion/react';
|
|
3
2
|
import { overflowShadow, relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
4
3
|
import { N20, DN50 } from '@atlaskit/theme/colors';
|
|
5
4
|
import { themed } from '@atlaskit/theme/components';
|
|
@@ -48,10 +47,10 @@ const CodeBlockContainer = ({
|
|
|
48
47
|
text,
|
|
49
48
|
wrapLongLines
|
|
50
49
|
}) => {
|
|
51
|
-
return
|
|
50
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
52
51
|
className: className,
|
|
53
52
|
css: codeBlockStyleOverrides
|
|
54
|
-
},
|
|
53
|
+
}, /*#__PURE__*/React.createElement(CodeBlockButtonContainer, {
|
|
55
54
|
allowCopyToClipboard: allowCopyToClipboard,
|
|
56
55
|
allowWrapCodeBlock: allowWrapCodeBlock,
|
|
57
56
|
setWrapLongLines: setWrapLongLines,
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/** @jsx jsx */
|
|
2
|
-
import { jsx } from '@emotion/react';
|
|
3
1
|
import React, { useState } from 'react';
|
|
4
2
|
import { injectIntl } from 'react-intl-next';
|
|
5
3
|
import Tooltip from '@atlaskit/tooltip';
|
|
@@ -19,20 +17,20 @@ const CopyButton = ({
|
|
|
19
17
|
setTooltip(intl.formatMessage(codeBlockButtonMessages.copyCodeToClipboard));
|
|
20
18
|
setClassName('copy-to-clipboard');
|
|
21
19
|
};
|
|
22
|
-
return
|
|
20
|
+
return /*#__PURE__*/React.createElement(AnalyticsContext.Consumer, null, ({
|
|
23
21
|
fireAnalyticsEvent
|
|
24
|
-
}) =>
|
|
22
|
+
}) => /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(Tooltip, {
|
|
25
23
|
content: tooltip,
|
|
26
24
|
hideTooltipOnClick: false,
|
|
27
25
|
position: "top"
|
|
28
|
-
},
|
|
26
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
29
27
|
onMouseLeave: onMouseLeave
|
|
30
|
-
},
|
|
28
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
31
29
|
appearance: "subtle",
|
|
32
30
|
"aria-haspopup": true,
|
|
33
31
|
"aria-label": tooltip,
|
|
34
32
|
className: className,
|
|
35
|
-
iconBefore:
|
|
33
|
+
iconBefore: /*#__PURE__*/React.createElement(CopyIcon, {
|
|
36
34
|
label: tooltip
|
|
37
35
|
}),
|
|
38
36
|
onClick: event => {
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/** @jsx jsx */
|
|
2
|
-
import { jsx } from '@emotion/react';
|
|
3
1
|
import React from 'react';
|
|
4
2
|
import { injectIntl } from 'react-intl-next';
|
|
5
3
|
import Tooltip from '@atlaskit/tooltip';
|
|
@@ -9,15 +7,15 @@ import { codeBlockButtonMessages } from '@atlaskit/editor-common/messages';
|
|
|
9
7
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '../../../../analytics/enums';
|
|
10
8
|
import AnalyticsContext from '../../../../analytics/analyticsContext';
|
|
11
9
|
const WrapIcon = () => {
|
|
12
|
-
return
|
|
10
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
13
11
|
width: "24",
|
|
14
12
|
height: "24",
|
|
15
13
|
fill: "none",
|
|
16
14
|
viewBox: "0 0 24 24"
|
|
17
|
-
},
|
|
15
|
+
}, /*#__PURE__*/React.createElement("g", {
|
|
18
16
|
fill: "currentColor",
|
|
19
17
|
clipPath: "url(#clip0_654_431)"
|
|
20
|
-
},
|
|
18
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
21
19
|
d: "M20 4h-1v16h1V4ZM3 8a1 1 0 0 1 1-1h9.5a4.5 4.5 0 1 1 0 9h-2.086l.293.293a1 1 0 0 1-1.414 1.414l-2-2a1 1 0 0 1 0-1.414l2-2a1 1 0 0 1 1.414 1.414l-.293.293H13.5a2.5 2.5 0 0 0 0-5H4a1 1 0 0 1-1-1Z",
|
|
22
20
|
clipRule: "evenodd",
|
|
23
21
|
fillRule: "evenodd"
|
|
@@ -29,18 +27,18 @@ const CodeBlockWrapButton = ({
|
|
|
29
27
|
intl
|
|
30
28
|
}) => {
|
|
31
29
|
const wrapMessage = intl.formatMessage(wrapLongLines ? codeBlockButtonMessages.unwrapCode : codeBlockButtonMessages.wrapCode);
|
|
32
|
-
return
|
|
30
|
+
return /*#__PURE__*/React.createElement(AnalyticsContext.Consumer, null, ({
|
|
33
31
|
fireAnalyticsEvent
|
|
34
|
-
}) =>
|
|
32
|
+
}) => /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(Tooltip, {
|
|
35
33
|
content: wrapMessage,
|
|
36
34
|
hideTooltipOnClick: false,
|
|
37
35
|
position: "top"
|
|
38
|
-
},
|
|
36
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
39
37
|
appearance: "subtle",
|
|
40
38
|
"aria-haspopup": true,
|
|
41
39
|
"aria-label": wrapMessage,
|
|
42
40
|
className: `wrap-code ${wrapLongLines ? 'clicked' : ''}`,
|
|
43
|
-
iconBefore:
|
|
41
|
+
iconBefore: /*#__PURE__*/React.createElement(Icon, {
|
|
44
42
|
glyph: WrapIcon,
|
|
45
43
|
label: ""
|
|
46
44
|
}),
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
/** @jsx jsx */
|
|
2
1
|
import React, { forwardRef, useMemo } from 'react';
|
|
3
|
-
import { css,
|
|
2
|
+
import { css, useTheme } from '@emotion/react';
|
|
4
3
|
import { blockNodesVerticalMargin } from '@atlaskit/editor-shared-styles';
|
|
5
4
|
import { codeBlockSharedStyles, CodeBlockSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
6
5
|
import { useBidiWarnings } from '../../../hooks/use-bidi-warnings';
|
|
@@ -41,20 +40,20 @@ const LightWeightCodeBlock = /*#__PURE__*/forwardRef(({
|
|
|
41
40
|
enableWarningTooltip: codeBidiWarningTooltipEnabled
|
|
42
41
|
});
|
|
43
42
|
const classNames = [LightWeightCodeBlockCssClassName.CONTAINER, className].join(' ');
|
|
44
|
-
return
|
|
43
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
45
44
|
className: classNames,
|
|
46
45
|
ref: ref,
|
|
47
46
|
css: [codeBlockSharedStyles(theme), lightWeightCodeBlockStyles]
|
|
48
|
-
},
|
|
47
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
49
48
|
className: CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER
|
|
50
|
-
},
|
|
49
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
51
50
|
className: CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER
|
|
52
|
-
},
|
|
51
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
53
52
|
className: CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER
|
|
54
|
-
}, textRows.map((_, index) =>
|
|
53
|
+
}, textRows.map((_, index) => /*#__PURE__*/React.createElement("span", {
|
|
55
54
|
key: index
|
|
56
|
-
}))),
|
|
55
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
57
56
|
className: CodeBlockSharedCssClassName.CODEBLOCK_CONTENT
|
|
58
|
-
},
|
|
57
|
+
}, /*#__PURE__*/React.createElement("code", null, renderBidiWarnings(text))))));
|
|
59
58
|
});
|
|
60
59
|
export default LightWeightCodeBlock;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
/** @jsx jsx */
|
|
2
1
|
import { Fragment, lazy, memo, Suspense, useState } from 'react';
|
|
3
|
-
import { jsx } from '@emotion/react';
|
|
4
2
|
import { CodeBlockSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
5
3
|
import { useInViewport } from '../../hooks/use-in-viewport';
|
|
6
4
|
import { useBidiWarnings } from '../../hooks/use-bidi-warnings';
|
|
@@ -28,23 +26,23 @@ const WindowedCodeBlock = ({
|
|
|
28
26
|
trackingRef
|
|
29
27
|
} = useInViewport();
|
|
30
28
|
const className = joinWithSpaces(CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER, rootClassName);
|
|
31
|
-
const memoizedLightWeightCodeBlock =
|
|
29
|
+
const memoizedLightWeightCodeBlock = /*#__PURE__*/React.createElement(MemoizedLightWeightCodeBlock, {
|
|
32
30
|
ref: trackingRef,
|
|
33
31
|
text: text,
|
|
34
32
|
codeBidiWarningTooltipEnabled: codeBidiWarningTooltipEnabled,
|
|
35
33
|
className: rootClassName
|
|
36
34
|
});
|
|
37
35
|
const [wrapLongLines, setWrapLongLines] = useState(false);
|
|
38
|
-
return isInViewport ?
|
|
36
|
+
return isInViewport ? /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(Suspense, {
|
|
39
37
|
fallback: memoizedLightWeightCodeBlock
|
|
40
|
-
},
|
|
38
|
+
}, /*#__PURE__*/React.createElement(CodeBlockContainer, {
|
|
41
39
|
allowCopyToClipboard: allowCopyToClipboard,
|
|
42
40
|
allowWrapCodeBlock: allowWrapCodeBlock,
|
|
43
41
|
className: className,
|
|
44
42
|
setWrapLongLines: setWrapLongLines,
|
|
45
43
|
text: text,
|
|
46
44
|
wrapLongLines: wrapLongLines
|
|
47
|
-
},
|
|
45
|
+
}, /*#__PURE__*/React.createElement(LazyAkCodeBlock, {
|
|
48
46
|
language: language,
|
|
49
47
|
text: text,
|
|
50
48
|
codeBidiWarningLabel: warningLabel,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
|
|
3
|
-
import { css, jsx } from '@emotion/react';
|
|
2
|
+
import { css } from '@emotion/react';
|
|
4
3
|
import { useMemo, useContext, useState, useRef } from 'react';
|
|
5
4
|
import { Card, EmbedResizeMessageListener } from '@atlaskit/smart-card';
|
|
6
5
|
import { SmartCardContext } from '@atlaskit/link-provider';
|
|
@@ -98,9 +97,9 @@ export default function EmbedCard(props) {
|
|
|
98
97
|
// Below is added for the future implementation of Linking Platform namespaced analytic context
|
|
99
98
|
location: 'renderer'
|
|
100
99
|
};
|
|
101
|
-
return
|
|
100
|
+
return /*#__PURE__*/React.createElement(AnalyticsContext, {
|
|
102
101
|
data: analyticsData
|
|
103
|
-
},
|
|
102
|
+
}, /*#__PURE__*/React.createElement(WidthConsumer, null, ({
|
|
104
103
|
width: documentWidth
|
|
105
104
|
}) => {
|
|
106
105
|
const isFullWidth = rendererAppearance === 'full-width';
|
|
@@ -127,12 +126,12 @@ export default function EmbedCard(props) {
|
|
|
127
126
|
throw err;
|
|
128
127
|
}
|
|
129
128
|
};
|
|
130
|
-
return
|
|
129
|
+
return /*#__PURE__*/React.createElement(CardErrorBoundary, _extends({
|
|
131
130
|
unsupportedComponent: UnsupportedBlock
|
|
132
|
-
}, cardProps),
|
|
131
|
+
}, cardProps), /*#__PURE__*/React.createElement(EmbedResizeMessageListener, {
|
|
133
132
|
embedIframeRef: embedIframeRef,
|
|
134
133
|
onHeightUpdate: setLiveHeight
|
|
135
|
-
},
|
|
134
|
+
}, /*#__PURE__*/React.createElement(UIMediaSingle, {
|
|
136
135
|
css: uiMediaSingleStyles,
|
|
137
136
|
layout: layout,
|
|
138
137
|
width: originalWidth,
|
|
@@ -143,9 +142,9 @@ export default function EmbedCard(props) {
|
|
|
143
142
|
nodeType: "embedCard",
|
|
144
143
|
lineLength: isInsideOfBlockNode ? containerWidth : lineLength,
|
|
145
144
|
hasFallbackContainer: hasPreview
|
|
146
|
-
},
|
|
145
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
147
146
|
css: embedCardWrapperStyles
|
|
148
|
-
},
|
|
147
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
149
148
|
className: "embedCardView-content-wrap",
|
|
150
149
|
"data-embed-card": true,
|
|
151
150
|
"data-layout": layout,
|
|
@@ -153,7 +152,7 @@ export default function EmbedCard(props) {
|
|
|
153
152
|
"data-card-data": data ? JSON.stringify(data) : undefined,
|
|
154
153
|
"data-card-url": url,
|
|
155
154
|
"data-card-original-height": originalHeight
|
|
156
|
-
},
|
|
155
|
+
}, /*#__PURE__*/React.createElement(Card, _extends({
|
|
157
156
|
appearance: "embed"
|
|
158
157
|
}, cardProps, {
|
|
159
158
|
onResolve: onResolve,
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
|
-
/** @jsx jsx */
|
|
4
3
|
import React from 'react';
|
|
5
|
-
import { css
|
|
4
|
+
import { css } from '@emotion/react';
|
|
6
5
|
import { N200, N500, B400 } from '@atlaskit/theme/colors';
|
|
7
6
|
import LinkIcon from '@atlaskit/icon/glyph/link';
|
|
8
7
|
import Tooltip from '@atlaskit/tooltip';
|
|
@@ -14,7 +13,7 @@ const CopyAnchorWrapperWithRef = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
14
13
|
children,
|
|
15
14
|
...rest
|
|
16
15
|
} = props;
|
|
17
|
-
return
|
|
16
|
+
return /*#__PURE__*/React.createElement("span", _extends({}, rest, {
|
|
18
17
|
className: HeadingAnchorWrapperClassName,
|
|
19
18
|
ref: ref
|
|
20
19
|
}), children);
|
|
@@ -65,12 +64,12 @@ class HeadingAnchor extends React.PureComponent {
|
|
|
65
64
|
this.setTooltipState(headingAnchorLinkMessages.copyHeadingLinkToClipboard);
|
|
66
65
|
});
|
|
67
66
|
_defineProperty(this, "renderAnchorButton", () => {
|
|
68
|
-
return
|
|
67
|
+
return /*#__PURE__*/React.createElement("button", {
|
|
69
68
|
css: copyAnchorButtonStyles,
|
|
70
69
|
onMouseLeave: this.resetMessage,
|
|
71
70
|
onClick: this.copyToClipboard,
|
|
72
71
|
"aria-label": this.state.tooltipMessage
|
|
73
|
-
},
|
|
72
|
+
}, /*#__PURE__*/React.createElement(LinkIcon, {
|
|
74
73
|
label: this.getCopyAriaLabel(),
|
|
75
74
|
size: this.props.level > 3 ? 'small' : 'medium',
|
|
76
75
|
primaryColor: this.state.isClicked ? `var(--ds-icon-selected, ${B400})` : `var(--ds-icon-subtle, ${N200})`
|
|
@@ -88,7 +87,7 @@ class HeadingAnchor extends React.PureComponent {
|
|
|
88
87
|
// We set the key to the message to ensure it remounts when the message
|
|
89
88
|
// changes, so that it correctly repositions.
|
|
90
89
|
// @see https://ecosystem.atlassian.net/projects/AK/queues/issue/AK-6548
|
|
91
|
-
return
|
|
90
|
+
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
92
91
|
tag: CopyAnchorWrapperWithRef,
|
|
93
92
|
content: tooltipMessage,
|
|
94
93
|
position: "top",
|
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
/** @jsx jsx */
|
|
2
1
|
import React from 'react';
|
|
3
|
-
import {
|
|
2
|
+
import { css } from '@emotion/react';
|
|
4
3
|
import { WidthProvider, clearNextSiblingMarginTopStyle, clearNextSiblingBlockMarkMarginTopStyle } from '@atlaskit/editor-common/ui';
|
|
5
4
|
const layoutColumnClearMarginTopStyles = css`
|
|
6
5
|
${clearNextSiblingMarginTopStyle}
|
|
7
6
|
${clearNextSiblingBlockMarkMarginTopStyle}
|
|
8
7
|
`;
|
|
9
8
|
export default function LayoutSection(props) {
|
|
10
|
-
return
|
|
9
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
11
10
|
"data-layout-column": true,
|
|
12
11
|
"data-column-width": props.width,
|
|
13
12
|
style: {
|
|
14
13
|
flexBasis: `${props.width}%`
|
|
15
14
|
}
|
|
16
|
-
},
|
|
15
|
+
}, /*#__PURE__*/React.createElement(WidthProvider, null, /*#__PURE__*/React.createElement("div", {
|
|
17
16
|
css: layoutColumnClearMarginTopStyles
|
|
18
17
|
}), props.children));
|
|
19
18
|
}
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
|
-
/** @jsx jsx */
|
|
4
|
-
|
|
5
3
|
import React from 'react';
|
|
6
4
|
import { PureComponent } from 'react';
|
|
7
|
-
import { jsx } from '@emotion/react';
|
|
8
5
|
import { AnalyticsContext } from '@atlaskit/analytics-next';
|
|
9
6
|
import { MEDIA_CONTEXT } from '@atlaskit/analytics-namespaced-context';
|
|
10
7
|
import { WithProviders } from '@atlaskit/editor-common/provider-factory';
|
|
@@ -39,13 +36,13 @@ export default class Media extends PureComponent {
|
|
|
39
36
|
const linkHref = linkMark === null || linkMark === void 0 ? void 0 : linkMark.attrs.href;
|
|
40
37
|
const eventHandlers = linkHref ? undefined : this.props.eventHandlers;
|
|
41
38
|
const shouldOpenMediaViewer = !linkHref && allowMediaViewer;
|
|
42
|
-
const mediaComponent =
|
|
39
|
+
const mediaComponent = /*#__PURE__*/React.createElement(AnalyticsContext, {
|
|
43
40
|
data: {
|
|
44
41
|
[MEDIA_CONTEXT]: {
|
|
45
42
|
border: !!borderMark
|
|
46
43
|
}
|
|
47
44
|
}
|
|
48
|
-
},
|
|
45
|
+
}, /*#__PURE__*/React.createElement(MediaCard, _extends({
|
|
49
46
|
mediaProvider: mediaProvider,
|
|
50
47
|
contextIdentifierProvider: contextIdentifierProvider
|
|
51
48
|
}, this.props, {
|
|
@@ -57,15 +54,15 @@ export default class Media extends PureComponent {
|
|
|
57
54
|
ssr: ssr
|
|
58
55
|
})));
|
|
59
56
|
const paletteColorValue = hexToEditorBorderPaletteColor(borderColor) || borderColor;
|
|
60
|
-
const mediaComponentWithBorder = borderMark ?
|
|
57
|
+
const mediaComponentWithBorder = borderMark ? /*#__PURE__*/React.createElement("div", {
|
|
61
58
|
"data-mark-type": "border",
|
|
62
59
|
"data-color": borderColor,
|
|
63
60
|
"data-size": borderWidth,
|
|
64
61
|
css: borderStyle(paletteColorValue, borderWidth)
|
|
65
|
-
},
|
|
62
|
+
}, /*#__PURE__*/React.createElement(MediaBorderGapFiller, {
|
|
66
63
|
borderColor: borderColor
|
|
67
64
|
}), mediaComponent) : mediaComponent;
|
|
68
|
-
return linkHref ?
|
|
65
|
+
return linkHref ? /*#__PURE__*/React.createElement("a", {
|
|
69
66
|
href: linkHref,
|
|
70
67
|
rel: "noreferrer noopener",
|
|
71
68
|
onClick: this.handleMediaLinkClick,
|
|
@@ -107,7 +104,7 @@ export default class Media extends PureComponent {
|
|
|
107
104
|
if (!providers) {
|
|
108
105
|
return this.renderCard();
|
|
109
106
|
}
|
|
110
|
-
return
|
|
107
|
+
return /*#__PURE__*/React.createElement(WithProviders, {
|
|
111
108
|
providers: ['mediaProvider', 'contextIdentifierProvider'],
|
|
112
109
|
providerFactory: providers,
|
|
113
110
|
renderNode: this.renderCard
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
/** @jsx jsx */
|
|
2
|
-
|
|
3
1
|
import { default as React, Fragment } from 'react';
|
|
4
|
-
import { jsx } from '@emotion/react';
|
|
5
2
|
import { injectIntl } from 'react-intl-next';
|
|
6
3
|
import { MediaSingle as UIMediaSingle, WidthConsumer } from '@atlaskit/editor-common/ui';
|
|
7
4
|
import { akEditorFullWidthLayoutWidth, akEditorDefaultLayoutWidth, akEditorWideLayoutWidth } from '@atlaskit/editor-shared-styles';
|
|
@@ -153,7 +150,7 @@ const MediaSingle = props => {
|
|
|
153
150
|
featureFlags
|
|
154
151
|
});
|
|
155
152
|
const uiMediaSingleStyles = layout === 'full-width' || layout === 'wide' ? [uiMediaSingleBaseStyles, uiMediaSingleLayoutStyles] : [uiMediaSingleBaseStyles];
|
|
156
|
-
return
|
|
153
|
+
return /*#__PURE__*/React.createElement(UIMediaSingle, {
|
|
157
154
|
css: uiMediaSingleStyles,
|
|
158
155
|
handleMediaSingleRef: ref,
|
|
159
156
|
layout: layout,
|
|
@@ -166,9 +163,9 @@ const MediaSingle = props => {
|
|
|
166
163
|
widthType
|
|
167
164
|
},
|
|
168
165
|
fullWidthMode: isFullWidth
|
|
169
|
-
},
|
|
166
|
+
}, /*#__PURE__*/React.createElement(Fragment, null, mediaComponent), allowCaptions && caption);
|
|
170
167
|
};
|
|
171
|
-
return
|
|
168
|
+
return /*#__PURE__*/React.createElement(WidthConsumer, null, ({
|
|
172
169
|
width
|
|
173
170
|
}) => {
|
|
174
171
|
// Note: in SSR mode the `window` object is not defined,
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
/** @jsx jsx */
|
|
3
2
|
import React from 'react';
|
|
4
|
-
import { css
|
|
3
|
+
import { css } from '@emotion/react';
|
|
5
4
|
import TipIcon from '@atlaskit/icon/glyph/editor/hint';
|
|
6
5
|
import { PanelType } from '@atlaskit/adf-schema';
|
|
7
6
|
import { getPanelBackgroundDarkModeColors, panelSharedStylesWithoutPrefix, PanelSharedCssClassName } from '@atlaskit/editor-common/panel';
|
|
@@ -51,7 +50,7 @@ const PanelStyled = ({
|
|
|
51
50
|
`;
|
|
52
51
|
};
|
|
53
52
|
}
|
|
54
|
-
return
|
|
53
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
55
54
|
css: styles
|
|
56
55
|
}, props), props.children);
|
|
57
56
|
};
|
|
@@ -82,7 +81,7 @@ const Panel = props => {
|
|
|
82
81
|
const getIcon = () => {
|
|
83
82
|
if (panelType === PanelType.CUSTOM) {
|
|
84
83
|
if (panelIcon && providers) {
|
|
85
|
-
return
|
|
84
|
+
return /*#__PURE__*/React.createElement(EmojiItem, {
|
|
86
85
|
id: panelIconId,
|
|
87
86
|
text: panelIconText,
|
|
88
87
|
shortName: panelIcon,
|
|
@@ -92,19 +91,19 @@ const Panel = props => {
|
|
|
92
91
|
return null;
|
|
93
92
|
}
|
|
94
93
|
const Icon = panelIcons[panelType];
|
|
95
|
-
return
|
|
94
|
+
return /*#__PURE__*/React.createElement(Icon, {
|
|
96
95
|
label: `Panel ${panelType}`
|
|
97
96
|
});
|
|
98
97
|
};
|
|
99
98
|
const icon = getIcon();
|
|
100
99
|
const renderIcon = () => {
|
|
101
100
|
if (icon) {
|
|
102
|
-
return
|
|
101
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
103
102
|
className: PanelSharedCssClassName.icon
|
|
104
103
|
}, icon);
|
|
105
104
|
}
|
|
106
105
|
};
|
|
107
|
-
return
|
|
106
|
+
return /*#__PURE__*/React.createElement(PanelStyled, {
|
|
108
107
|
className: PanelSharedCssClassName.prefix,
|
|
109
108
|
"data-panel-type": panelType,
|
|
110
109
|
"data-panel-color": panelColor,
|
|
@@ -113,7 +112,7 @@ const Panel = props => {
|
|
|
113
112
|
"data-panel-icon-text": panelIconText,
|
|
114
113
|
backgroundColor: panelColor,
|
|
115
114
|
hasIcon: Boolean(icon)
|
|
116
|
-
}, renderIcon(),
|
|
115
|
+
}, renderIcon(), /*#__PURE__*/React.createElement("div", {
|
|
117
116
|
className: PanelSharedCssClassName.content
|
|
118
117
|
}, children));
|
|
119
118
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
/** @jsx jsx */
|
|
3
2
|
import React from 'react';
|
|
4
|
-
import { css
|
|
3
|
+
import { css } from '@emotion/react';
|
|
5
4
|
import { TableSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
6
5
|
import { akEditorStickyHeaderZIndex } from '@atlaskit/editor-shared-styles';
|
|
7
6
|
import { N40A } from '@atlaskit/theme/colors';
|
|
@@ -74,7 +73,7 @@ export const FixedTableDiv = props => {
|
|
|
74
73
|
const attrs = {
|
|
75
74
|
mode
|
|
76
75
|
};
|
|
77
|
-
return
|
|
76
|
+
return /*#__PURE__*/React.createElement("div", _extends({}, attrs, {
|
|
78
77
|
"data-testid": "sticky-table-fixed",
|
|
79
78
|
css: fixedTableCss
|
|
80
79
|
}), props.children);
|
|
@@ -111,26 +110,26 @@ export const StickyTable = ({
|
|
|
111
110
|
});
|
|
112
111
|
}
|
|
113
112
|
/* eslint-enable @atlaskit/design-system/ensure-design-token-usage */
|
|
114
|
-
return
|
|
113
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
115
114
|
css: styles
|
|
116
|
-
},
|
|
115
|
+
}, /*#__PURE__*/React.createElement(FixedTableDiv, {
|
|
117
116
|
top: mode === 'stick' ? top : undefined,
|
|
118
117
|
mode: rowHeight > 300 ? 'none' : mode,
|
|
119
118
|
wrapperWidth: wrapperWidth,
|
|
120
119
|
rendererAppearance: rendererAppearance
|
|
121
|
-
},
|
|
120
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
122
121
|
className: `${TableSharedCssClassName.TABLE_CONTAINER} is-sticky ${shadowClassNames || ''}`,
|
|
123
122
|
"data-layout": layout,
|
|
124
123
|
style: {
|
|
125
124
|
width: tableWidth
|
|
126
125
|
}
|
|
127
|
-
},
|
|
126
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
128
127
|
ref: innerRef,
|
|
129
128
|
className: `${TableSharedCssClassName.TABLE_STICKY_WRAPPER}`,
|
|
130
129
|
style: {
|
|
131
130
|
overflow: 'hidden'
|
|
132
131
|
}
|
|
133
|
-
},
|
|
132
|
+
}, /*#__PURE__*/React.createElement(Table, {
|
|
134
133
|
columnWidths: columnWidths,
|
|
135
134
|
layout: layout,
|
|
136
135
|
isNumberColumnEnabled: isNumberColumnEnabled,
|