@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,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
|
var WrapIcon = function 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"
|
|
@@ -28,18 +26,18 @@ var CodeBlockWrapButton = function CodeBlockWrapButton(_ref) {
|
|
|
28
26
|
wrapLongLines = _ref.wrapLongLines,
|
|
29
27
|
intl = _ref.intl;
|
|
30
28
|
var wrapMessage = intl.formatMessage(wrapLongLines ? codeBlockButtonMessages.unwrapCode : codeBlockButtonMessages.wrapCode);
|
|
31
|
-
return
|
|
29
|
+
return /*#__PURE__*/React.createElement(AnalyticsContext.Consumer, null, function (_ref2) {
|
|
32
30
|
var fireAnalyticsEvent = _ref2.fireAnalyticsEvent;
|
|
33
|
-
return
|
|
31
|
+
return /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(Tooltip, {
|
|
34
32
|
content: wrapMessage,
|
|
35
33
|
hideTooltipOnClick: false,
|
|
36
34
|
position: "top"
|
|
37
|
-
},
|
|
35
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
38
36
|
appearance: "subtle",
|
|
39
37
|
"aria-haspopup": true,
|
|
40
38
|
"aria-label": wrapMessage,
|
|
41
39
|
className: "wrap-code ".concat(wrapLongLines ? 'clicked' : ''),
|
|
42
|
-
iconBefore:
|
|
40
|
+
iconBefore: /*#__PURE__*/React.createElement(Icon, {
|
|
43
41
|
glyph: WrapIcon,
|
|
44
42
|
label: ""
|
|
45
43
|
}),
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject, _templateObject2;
|
|
3
|
-
/** @jsx jsx */
|
|
4
3
|
import React, { forwardRef, useMemo } from 'react';
|
|
5
|
-
import { css,
|
|
4
|
+
import { css, useTheme } from '@emotion/react';
|
|
6
5
|
import { blockNodesVerticalMargin } from '@atlaskit/editor-shared-styles';
|
|
7
6
|
import { codeBlockSharedStyles, CodeBlockSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
8
7
|
import { useBidiWarnings } from '../../../hooks/use-bidi-warnings';
|
|
@@ -34,22 +33,22 @@ var LightWeightCodeBlock = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
34
33
|
}),
|
|
35
34
|
renderBidiWarnings = _useBidiWarnings.renderBidiWarnings;
|
|
36
35
|
var classNames = [LightWeightCodeBlockCssClassName.CONTAINER, className].join(' ');
|
|
37
|
-
return
|
|
36
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
38
37
|
className: classNames,
|
|
39
38
|
ref: ref,
|
|
40
39
|
css: [codeBlockSharedStyles(theme), lightWeightCodeBlockStyles]
|
|
41
|
-
},
|
|
40
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
42
41
|
className: CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER
|
|
43
|
-
},
|
|
42
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
44
43
|
className: CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER
|
|
45
|
-
},
|
|
44
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
46
45
|
className: CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER
|
|
47
46
|
}, textRows.map(function (_, index) {
|
|
48
|
-
return
|
|
47
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
49
48
|
key: index
|
|
50
49
|
});
|
|
51
|
-
})),
|
|
50
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
52
51
|
className: CodeBlockSharedCssClassName.CODEBLOCK_CONTENT
|
|
53
|
-
},
|
|
52
|
+
}, /*#__PURE__*/React.createElement("code", null, renderBidiWarnings(text))))));
|
|
54
53
|
});
|
|
55
54
|
export default LightWeightCodeBlock;
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
2
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
3
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
4
|
-
/** @jsx jsx */
|
|
5
4
|
import { Fragment, lazy, memo, Suspense, useState } from 'react';
|
|
6
|
-
import { jsx } from '@emotion/react';
|
|
7
5
|
import { CodeBlockSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
8
6
|
import { useInViewport } from '../../hooks/use-in-viewport';
|
|
9
7
|
import { useBidiWarnings } from '../../hooks/use-bidi-warnings';
|
|
@@ -44,7 +42,7 @@ var WindowedCodeBlock = function WindowedCodeBlock(_ref2) {
|
|
|
44
42
|
isInViewport = _useInViewport.isInViewport,
|
|
45
43
|
trackingRef = _useInViewport.trackingRef;
|
|
46
44
|
var className = joinWithSpaces(CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER, rootClassName);
|
|
47
|
-
var memoizedLightWeightCodeBlock =
|
|
45
|
+
var memoizedLightWeightCodeBlock = /*#__PURE__*/React.createElement(MemoizedLightWeightCodeBlock, {
|
|
48
46
|
ref: trackingRef,
|
|
49
47
|
text: text,
|
|
50
48
|
codeBidiWarningTooltipEnabled: codeBidiWarningTooltipEnabled,
|
|
@@ -54,16 +52,16 @@ var WindowedCodeBlock = function WindowedCodeBlock(_ref2) {
|
|
|
54
52
|
_useState2 = _slicedToArray(_useState, 2),
|
|
55
53
|
wrapLongLines = _useState2[0],
|
|
56
54
|
setWrapLongLines = _useState2[1];
|
|
57
|
-
return isInViewport ?
|
|
55
|
+
return isInViewport ? /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(Suspense, {
|
|
58
56
|
fallback: memoizedLightWeightCodeBlock
|
|
59
|
-
},
|
|
57
|
+
}, /*#__PURE__*/React.createElement(CodeBlockContainer, {
|
|
60
58
|
allowCopyToClipboard: allowCopyToClipboard,
|
|
61
59
|
allowWrapCodeBlock: allowWrapCodeBlock,
|
|
62
60
|
className: className,
|
|
63
61
|
setWrapLongLines: setWrapLongLines,
|
|
64
62
|
text: text,
|
|
65
63
|
wrapLongLines: wrapLongLines
|
|
66
|
-
},
|
|
64
|
+
}, /*#__PURE__*/React.createElement(LazyAkCodeBlock, {
|
|
67
65
|
language: language,
|
|
68
66
|
text: text,
|
|
69
67
|
codeBidiWarningLabel: warningLabel,
|
|
@@ -2,8 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
3
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
4
4
|
var _templateObject, _templateObject2;
|
|
5
|
-
|
|
6
|
-
import { css, jsx } from '@emotion/react';
|
|
5
|
+
import { css } from '@emotion/react';
|
|
7
6
|
import { useMemo, useContext, useState, useRef } from 'react';
|
|
8
7
|
import { Card, EmbedResizeMessageListener } from '@atlaskit/smart-card';
|
|
9
8
|
import { SmartCardContext } from '@atlaskit/link-provider';
|
|
@@ -93,9 +92,9 @@ export default function EmbedCard(props) {
|
|
|
93
92
|
// Below is added for the future implementation of Linking Platform namespaced analytic context
|
|
94
93
|
location: 'renderer'
|
|
95
94
|
};
|
|
96
|
-
return
|
|
95
|
+
return /*#__PURE__*/React.createElement(AnalyticsContext, {
|
|
97
96
|
data: analyticsData
|
|
98
|
-
},
|
|
97
|
+
}, /*#__PURE__*/React.createElement(WidthConsumer, null, function (_ref2) {
|
|
99
98
|
var documentWidth = _ref2.width;
|
|
100
99
|
var isFullWidth = rendererAppearance === 'full-width';
|
|
101
100
|
var containerWidth = documentWidth;
|
|
@@ -120,12 +119,12 @@ export default function EmbedCard(props) {
|
|
|
120
119
|
throw err;
|
|
121
120
|
}
|
|
122
121
|
};
|
|
123
|
-
return
|
|
122
|
+
return /*#__PURE__*/React.createElement(CardErrorBoundary, _extends({
|
|
124
123
|
unsupportedComponent: UnsupportedBlock
|
|
125
|
-
}, cardProps),
|
|
124
|
+
}, cardProps), /*#__PURE__*/React.createElement(EmbedResizeMessageListener, {
|
|
126
125
|
embedIframeRef: embedIframeRef,
|
|
127
126
|
onHeightUpdate: setLiveHeight
|
|
128
|
-
},
|
|
127
|
+
}, /*#__PURE__*/React.createElement(UIMediaSingle, {
|
|
129
128
|
css: uiMediaSingleStyles,
|
|
130
129
|
layout: layout,
|
|
131
130
|
width: originalWidth,
|
|
@@ -136,9 +135,9 @@ export default function EmbedCard(props) {
|
|
|
136
135
|
nodeType: "embedCard",
|
|
137
136
|
lineLength: isInsideOfBlockNode ? containerWidth : lineLength,
|
|
138
137
|
hasFallbackContainer: hasPreview
|
|
139
|
-
},
|
|
138
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
140
139
|
css: embedCardWrapperStyles
|
|
141
|
-
},
|
|
140
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
142
141
|
className: "embedCardView-content-wrap",
|
|
143
142
|
"data-embed-card": true,
|
|
144
143
|
"data-layout": layout,
|
|
@@ -146,7 +145,7 @@ export default function EmbedCard(props) {
|
|
|
146
145
|
"data-card-data": data ? JSON.stringify(data) : undefined,
|
|
147
146
|
"data-card-url": url,
|
|
148
147
|
"data-card-original-height": originalHeight
|
|
149
|
-
},
|
|
148
|
+
}, /*#__PURE__*/React.createElement(Card, _extends({
|
|
150
149
|
appearance: "embed"
|
|
151
150
|
}, cardProps, {
|
|
152
151
|
onResolve: onResolve,
|
|
@@ -14,9 +14,8 @@ var _excluded = ["children"];
|
|
|
14
14
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
15
15
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
16
16
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
17
|
-
/** @jsx jsx */
|
|
18
17
|
import React from 'react';
|
|
19
|
-
import { css
|
|
18
|
+
import { css } from '@emotion/react';
|
|
20
19
|
import { N200, N500, B400 } from '@atlaskit/theme/colors';
|
|
21
20
|
import LinkIcon from '@atlaskit/icon/glyph/link';
|
|
22
21
|
import Tooltip from '@atlaskit/tooltip';
|
|
@@ -26,7 +25,7 @@ export var HeadingAnchorWrapperClassName = 'heading-anchor-wrapper';
|
|
|
26
25
|
var CopyAnchorWrapperWithRef = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
27
26
|
var children = props.children,
|
|
28
27
|
rest = _objectWithoutProperties(props, _excluded);
|
|
29
|
-
return
|
|
28
|
+
return /*#__PURE__*/React.createElement("span", _extends({}, rest, {
|
|
30
29
|
className: HeadingAnchorWrapperClassName,
|
|
31
30
|
ref: ref
|
|
32
31
|
}), children);
|
|
@@ -91,12 +90,12 @@ var HeadingAnchor = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
91
90
|
_this.setTooltipState(headingAnchorLinkMessages.copyHeadingLinkToClipboard);
|
|
92
91
|
});
|
|
93
92
|
_defineProperty(_assertThisInitialized(_this), "renderAnchorButton", function () {
|
|
94
|
-
return
|
|
93
|
+
return /*#__PURE__*/React.createElement("button", {
|
|
95
94
|
css: copyAnchorButtonStyles,
|
|
96
95
|
onMouseLeave: _this.resetMessage,
|
|
97
96
|
onClick: _this.copyToClipboard,
|
|
98
97
|
"aria-label": _this.state.tooltipMessage
|
|
99
|
-
},
|
|
98
|
+
}, /*#__PURE__*/React.createElement(LinkIcon, {
|
|
100
99
|
label: _this.getCopyAriaLabel(),
|
|
101
100
|
size: _this.props.level > 3 ? 'small' : 'medium',
|
|
102
101
|
primaryColor: _this.state.isClicked ? "var(--ds-icon-selected, ".concat(B400, ")") : "var(--ds-icon-subtle, ".concat(N200, ")")
|
|
@@ -117,7 +116,7 @@ var HeadingAnchor = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
117
116
|
// We set the key to the message to ensure it remounts when the message
|
|
118
117
|
// changes, so that it correctly repositions.
|
|
119
118
|
// @see https://ecosystem.atlassian.net/projects/AK/queues/issue/AK-6548
|
|
120
|
-
return
|
|
119
|
+
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
121
120
|
tag: CopyAnchorWrapperWithRef,
|
|
122
121
|
content: tooltipMessage,
|
|
123
122
|
position: "top",
|
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject;
|
|
3
|
-
/** @jsx jsx */
|
|
4
3
|
import React from 'react';
|
|
5
|
-
import {
|
|
4
|
+
import { css } from '@emotion/react';
|
|
6
5
|
import { WidthProvider, clearNextSiblingMarginTopStyle, clearNextSiblingBlockMarkMarginTopStyle } from '@atlaskit/editor-common/ui';
|
|
7
6
|
var layoutColumnClearMarginTopStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n ", "\n"])), clearNextSiblingMarginTopStyle, clearNextSiblingBlockMarkMarginTopStyle);
|
|
8
7
|
export default function LayoutSection(props) {
|
|
9
|
-
return
|
|
8
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
10
9
|
"data-layout-column": true,
|
|
11
10
|
"data-column-width": props.width,
|
|
12
11
|
style: {
|
|
13
12
|
flexBasis: "".concat(props.width, "%")
|
|
14
13
|
}
|
|
15
|
-
},
|
|
14
|
+
}, /*#__PURE__*/React.createElement(WidthProvider, null, /*#__PURE__*/React.createElement("div", {
|
|
16
15
|
css: layoutColumnClearMarginTopStyles
|
|
17
16
|
}), props.children));
|
|
18
17
|
}
|
|
@@ -8,11 +8,8 @@ import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
|
8
8
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
9
9
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
10
10
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
11
|
-
/** @jsx jsx */
|
|
12
|
-
|
|
13
11
|
import React from 'react';
|
|
14
12
|
import { PureComponent } from 'react';
|
|
15
|
-
import { jsx } from '@emotion/react';
|
|
16
13
|
import { AnalyticsContext } from '@atlaskit/analytics-next';
|
|
17
14
|
import { MEDIA_CONTEXT } from '@atlaskit/analytics-namespaced-context';
|
|
18
15
|
import { WithProviders } from '@atlaskit/editor-common/provider-factory';
|
|
@@ -52,11 +49,11 @@ var Media = /*#__PURE__*/function (_PureComponent) {
|
|
|
52
49
|
var linkHref = linkMark === null || linkMark === void 0 ? void 0 : linkMark.attrs.href;
|
|
53
50
|
var eventHandlers = linkHref ? undefined : _this.props.eventHandlers;
|
|
54
51
|
var shouldOpenMediaViewer = !linkHref && allowMediaViewer;
|
|
55
|
-
var mediaComponent =
|
|
52
|
+
var mediaComponent = /*#__PURE__*/React.createElement(AnalyticsContext, {
|
|
56
53
|
data: _defineProperty({}, MEDIA_CONTEXT, {
|
|
57
54
|
border: !!borderMark
|
|
58
55
|
})
|
|
59
|
-
},
|
|
56
|
+
}, /*#__PURE__*/React.createElement(MediaCard, _extends({
|
|
60
57
|
mediaProvider: mediaProvider,
|
|
61
58
|
contextIdentifierProvider: contextIdentifierProvider
|
|
62
59
|
}, _this.props, {
|
|
@@ -68,15 +65,15 @@ var Media = /*#__PURE__*/function (_PureComponent) {
|
|
|
68
65
|
ssr: ssr
|
|
69
66
|
})));
|
|
70
67
|
var paletteColorValue = hexToEditorBorderPaletteColor(borderColor) || borderColor;
|
|
71
|
-
var mediaComponentWithBorder = borderMark ?
|
|
68
|
+
var mediaComponentWithBorder = borderMark ? /*#__PURE__*/React.createElement("div", {
|
|
72
69
|
"data-mark-type": "border",
|
|
73
70
|
"data-color": borderColor,
|
|
74
71
|
"data-size": borderWidth,
|
|
75
72
|
css: borderStyle(paletteColorValue, borderWidth)
|
|
76
|
-
},
|
|
73
|
+
}, /*#__PURE__*/React.createElement(MediaBorderGapFiller, {
|
|
77
74
|
borderColor: borderColor
|
|
78
75
|
}), mediaComponent) : mediaComponent;
|
|
79
|
-
return linkHref ?
|
|
76
|
+
return linkHref ? /*#__PURE__*/React.createElement("a", {
|
|
80
77
|
href: linkHref,
|
|
81
78
|
rel: "noreferrer noopener",
|
|
82
79
|
onClick: _this.handleMediaLinkClick,
|
|
@@ -118,7 +115,7 @@ var Media = /*#__PURE__*/function (_PureComponent) {
|
|
|
118
115
|
if (!providers) {
|
|
119
116
|
return this.renderCard();
|
|
120
117
|
}
|
|
121
|
-
return
|
|
118
|
+
return /*#__PURE__*/React.createElement(WithProviders, {
|
|
122
119
|
providers: ['mediaProvider', 'contextIdentifierProvider'],
|
|
123
120
|
providerFactory: providers,
|
|
124
121
|
renderNode: this.renderCard
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
-
/** @jsx jsx */
|
|
3
|
-
|
|
4
2
|
import { default as React, Fragment } from 'react';
|
|
5
|
-
import { jsx } from '@emotion/react';
|
|
6
3
|
import { injectIntl } from 'react-intl-next';
|
|
7
4
|
import { MediaSingle as UIMediaSingle, WidthConsumer } from '@atlaskit/editor-common/ui';
|
|
8
5
|
import { akEditorFullWidthLayoutWidth, akEditorDefaultLayoutWidth, akEditorWideLayoutWidth } from '@atlaskit/editor-shared-styles';
|
|
@@ -157,7 +154,7 @@ var MediaSingle = function MediaSingle(props) {
|
|
|
157
154
|
featureFlags: featureFlags
|
|
158
155
|
});
|
|
159
156
|
var uiMediaSingleStyles = layout === 'full-width' || layout === 'wide' ? [uiMediaSingleBaseStyles, uiMediaSingleLayoutStyles] : [uiMediaSingleBaseStyles];
|
|
160
|
-
return
|
|
157
|
+
return /*#__PURE__*/React.createElement(UIMediaSingle, {
|
|
161
158
|
css: uiMediaSingleStyles,
|
|
162
159
|
handleMediaSingleRef: ref,
|
|
163
160
|
layout: layout,
|
|
@@ -170,9 +167,9 @@ var MediaSingle = function MediaSingle(props) {
|
|
|
170
167
|
widthType: widthType
|
|
171
168
|
},
|
|
172
169
|
fullWidthMode: isFullWidth
|
|
173
|
-
},
|
|
170
|
+
}, /*#__PURE__*/React.createElement(Fragment, null, mediaComponent), allowCaptions && caption);
|
|
174
171
|
};
|
|
175
|
-
return
|
|
172
|
+
return /*#__PURE__*/React.createElement(WidthConsumer, null, function (_ref3) {
|
|
176
173
|
var width = _ref3.width;
|
|
177
174
|
// Note: in SSR mode the `window` object is not defined,
|
|
178
175
|
// therefore width here is 0, see:
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject, _templateObject2;
|
|
3
|
-
/** @jsx jsx */
|
|
4
3
|
import { css } from '@emotion/react';
|
|
5
4
|
export var uiMediaSingleBaseStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n transition: all 0.1s linear;\n"])));
|
|
6
5
|
export var uiMediaSingleLayoutStyles = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n margin-left: 50%;\n transform: translateX(-50%);\n"])));
|
|
@@ -3,9 +3,8 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
4
|
var _templateObject, _templateObject2;
|
|
5
5
|
var _excluded = ["backgroundColor", "hasIcon"];
|
|
6
|
-
/** @jsx jsx */
|
|
7
6
|
import React from 'react';
|
|
8
|
-
import { css
|
|
7
|
+
import { css } from '@emotion/react';
|
|
9
8
|
import TipIcon from '@atlaskit/icon/glyph/editor/hint';
|
|
10
9
|
import { PanelType } from '@atlaskit/adf-schema';
|
|
11
10
|
import { getPanelBackgroundDarkModeColors, panelSharedStylesWithoutPrefix, PanelSharedCssClassName } from '@atlaskit/editor-common/panel';
|
|
@@ -39,7 +38,7 @@ var PanelStyled = function PanelStyled(_ref) {
|
|
|
39
38
|
}), PanelType.CUSTOM, customStyle, hasIcon ? '' : 'padding-left: 12px;');
|
|
40
39
|
};
|
|
41
40
|
}
|
|
42
|
-
return
|
|
41
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
43
42
|
css: styles
|
|
44
43
|
}, props), props.children);
|
|
45
44
|
};
|
|
@@ -68,7 +67,7 @@ var Panel = function Panel(props) {
|
|
|
68
67
|
var getIcon = function getIcon() {
|
|
69
68
|
if (panelType === PanelType.CUSTOM) {
|
|
70
69
|
if (panelIcon && providers) {
|
|
71
|
-
return
|
|
70
|
+
return /*#__PURE__*/React.createElement(EmojiItem, {
|
|
72
71
|
id: panelIconId,
|
|
73
72
|
text: panelIconText,
|
|
74
73
|
shortName: panelIcon,
|
|
@@ -78,19 +77,19 @@ var Panel = function Panel(props) {
|
|
|
78
77
|
return null;
|
|
79
78
|
}
|
|
80
79
|
var Icon = panelIcons[panelType];
|
|
81
|
-
return
|
|
80
|
+
return /*#__PURE__*/React.createElement(Icon, {
|
|
82
81
|
label: "Panel ".concat(panelType)
|
|
83
82
|
});
|
|
84
83
|
};
|
|
85
84
|
var icon = getIcon();
|
|
86
85
|
var renderIcon = function renderIcon() {
|
|
87
86
|
if (icon) {
|
|
88
|
-
return
|
|
87
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
89
88
|
className: PanelSharedCssClassName.icon
|
|
90
89
|
}, icon);
|
|
91
90
|
}
|
|
92
91
|
};
|
|
93
|
-
return
|
|
92
|
+
return /*#__PURE__*/React.createElement(PanelStyled, {
|
|
94
93
|
className: PanelSharedCssClassName.prefix,
|
|
95
94
|
"data-panel-type": panelType,
|
|
96
95
|
"data-panel-color": panelColor,
|
|
@@ -99,7 +98,7 @@ var Panel = function Panel(props) {
|
|
|
99
98
|
"data-panel-icon-text": panelIconText,
|
|
100
99
|
backgroundColor: panelColor,
|
|
101
100
|
hasIcon: Boolean(icon)
|
|
102
|
-
}, renderIcon(),
|
|
101
|
+
}, renderIcon(), /*#__PURE__*/React.createElement("div", {
|
|
103
102
|
className: PanelSharedCssClassName.content
|
|
104
103
|
}, children));
|
|
105
104
|
};
|
|
@@ -3,9 +3,8 @@ import _createClass from "@babel/runtime/helpers/createClass";
|
|
|
3
3
|
import _extends from "@babel/runtime/helpers/extends";
|
|
4
4
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
5
5
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
6
|
-
/** @jsx jsx */
|
|
7
6
|
import React from 'react';
|
|
8
|
-
import { css
|
|
7
|
+
import { css } from '@emotion/react';
|
|
9
8
|
import { TableSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
10
9
|
import { akEditorStickyHeaderZIndex } from '@atlaskit/editor-shared-styles';
|
|
11
10
|
import { N40A } from '@atlaskit/theme/colors';
|
|
@@ -38,7 +37,7 @@ export var FixedTableDiv = function FixedTableDiv(props) {
|
|
|
38
37
|
var attrs = {
|
|
39
38
|
mode: mode
|
|
40
39
|
};
|
|
41
|
-
return
|
|
40
|
+
return /*#__PURE__*/React.createElement("div", _extends({}, attrs, {
|
|
42
41
|
"data-testid": "sticky-table-fixed",
|
|
43
42
|
css: fixedTableCss
|
|
44
43
|
}), props.children);
|
|
@@ -74,26 +73,26 @@ export var StickyTable = function StickyTable(_ref) {
|
|
|
74
73
|
});
|
|
75
74
|
}
|
|
76
75
|
/* eslint-enable @atlaskit/design-system/ensure-design-token-usage */
|
|
77
|
-
return
|
|
76
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
78
77
|
css: styles
|
|
79
|
-
},
|
|
78
|
+
}, /*#__PURE__*/React.createElement(FixedTableDiv, {
|
|
80
79
|
top: mode === 'stick' ? top : undefined,
|
|
81
80
|
mode: rowHeight > 300 ? 'none' : mode,
|
|
82
81
|
wrapperWidth: wrapperWidth,
|
|
83
82
|
rendererAppearance: rendererAppearance
|
|
84
|
-
},
|
|
83
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
85
84
|
className: "".concat(TableSharedCssClassName.TABLE_CONTAINER, " is-sticky ").concat(shadowClassNames || ''),
|
|
86
85
|
"data-layout": layout,
|
|
87
86
|
style: {
|
|
88
87
|
width: tableWidth
|
|
89
88
|
}
|
|
90
|
-
},
|
|
89
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
91
90
|
ref: innerRef,
|
|
92
91
|
className: "".concat(TableSharedCssClassName.TABLE_STICKY_WRAPPER),
|
|
93
92
|
style: {
|
|
94
93
|
overflow: 'hidden'
|
|
95
94
|
}
|
|
96
|
-
},
|
|
95
|
+
}, /*#__PURE__*/React.createElement(Table, {
|
|
97
96
|
columnWidths: columnWidths,
|
|
98
97
|
layout: layout,
|
|
99
98
|
isNumberColumnEnabled: isNumberColumnEnabled,
|
package/dist/esm/ui/Expand.js
CHANGED
|
@@ -2,9 +2,8 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
4
4
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
5
|
-
/** @jsx jsx */
|
|
6
5
|
import React, { useRef, useCallback, useMemo } from 'react';
|
|
7
|
-
import { css
|
|
6
|
+
import { css } from '@emotion/react';
|
|
8
7
|
// eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
9
8
|
import { gridSize, fontSize } from '@atlaskit/theme/constants';
|
|
10
9
|
import ChevronRightIcon from '@atlaskit/icon/glyph/chevron-right';
|
|
@@ -26,7 +25,7 @@ var Container = function Container(props) {
|
|
|
26
25
|
theme: themeProps
|
|
27
26
|
}), paddingBottom);
|
|
28
27
|
};
|
|
29
|
-
return
|
|
28
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
30
29
|
css: styles
|
|
31
30
|
}, props), props.children);
|
|
32
31
|
};
|
|
@@ -37,7 +36,7 @@ var TitleContainer = function TitleContainer(props) {
|
|
|
37
36
|
theme: themeProps
|
|
38
37
|
}), "var(--ds-space-100, 8px)", paddingBottom);
|
|
39
38
|
};
|
|
40
|
-
return
|
|
39
|
+
return /*#__PURE__*/React.createElement("button", _extends({
|
|
41
40
|
css: styles
|
|
42
41
|
}, props), props.children);
|
|
43
42
|
};
|
|
@@ -50,7 +49,7 @@ var ContentContainer = function ContentContainer(props) {
|
|
|
50
49
|
theme: themeProps
|
|
51
50
|
}), "var(--ds-space-200, 16px)", gridSize() * 5 - gridSize() / 2, visibility);
|
|
52
51
|
};
|
|
53
|
-
return
|
|
52
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
54
53
|
css: styles
|
|
55
54
|
}, props), props.children);
|
|
56
55
|
};
|
|
@@ -97,18 +96,18 @@ function Expand(_ref) {
|
|
|
97
96
|
var handleBlur = useCallback(function () {
|
|
98
97
|
return setFocused(false);
|
|
99
98
|
}, []);
|
|
100
|
-
return
|
|
99
|
+
return /*#__PURE__*/React.createElement(Container, {
|
|
101
100
|
"data-node-type": nodeType,
|
|
102
101
|
"data-title": title,
|
|
103
102
|
"data-expanded": expanded,
|
|
104
103
|
expanded: expanded,
|
|
105
104
|
focused: focused
|
|
106
|
-
}, nestedHeaderIds && nestedHeaderIds.length > 0 ?
|
|
105
|
+
}, nestedHeaderIds && nestedHeaderIds.length > 0 ? /*#__PURE__*/React.createElement(ActiveHeaderIdConsumer, {
|
|
107
106
|
nestedHeaderIds: nestedHeaderIds,
|
|
108
107
|
onNestedHeaderIdMatch: function onNestedHeaderIdMatch() {
|
|
109
108
|
return setExpanded(true);
|
|
110
109
|
}
|
|
111
|
-
}) : null,
|
|
110
|
+
}) : null, /*#__PURE__*/React.createElement(TitleContainer, {
|
|
112
111
|
onClick: function onClick(e) {
|
|
113
112
|
e.stopPropagation();
|
|
114
113
|
fireExpandToggleAnalytics(nodeType, expanded, fireAnalyticsEvent);
|
|
@@ -123,27 +122,27 @@ function Expand(_ref) {
|
|
|
123
122
|
"aria-expanded": expanded,
|
|
124
123
|
contentEditable: false,
|
|
125
124
|
expanded: expanded
|
|
126
|
-
}, isMobile ?
|
|
125
|
+
}, isMobile ? /*#__PURE__*/React.createElement(ExpandIconWrapper, {
|
|
127
126
|
expanded: expanded
|
|
128
|
-
},
|
|
127
|
+
}, /*#__PURE__*/React.createElement(ChevronRightIcon, {
|
|
129
128
|
label: label
|
|
130
|
-
})) :
|
|
129
|
+
})) : /*#__PURE__*/React.createElement(Tooltip, {
|
|
131
130
|
content: label,
|
|
132
131
|
position: "top",
|
|
133
132
|
tag: ExpandLayoutWrapperWithRef,
|
|
134
133
|
testId: 'tooltip'
|
|
135
|
-
},
|
|
134
|
+
}, /*#__PURE__*/React.createElement(ExpandIconWrapper, {
|
|
136
135
|
expanded: expanded
|
|
137
|
-
},
|
|
136
|
+
}, /*#__PURE__*/React.createElement(ChevronRightIcon, {
|
|
138
137
|
label: label
|
|
139
|
-
}))),
|
|
138
|
+
}))), /*#__PURE__*/React.createElement("span", {
|
|
140
139
|
css: titleStyles,
|
|
141
140
|
id: id
|
|
142
|
-
}, title || intl.formatMessage(expandMessages.expandDefaultTitle))),
|
|
141
|
+
}, title || intl.formatMessage(expandMessages.expandDefaultTitle))), /*#__PURE__*/React.createElement(ContentContainer, {
|
|
143
142
|
expanded: expanded
|
|
144
|
-
},
|
|
143
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
145
144
|
className: "".concat(nodeType, "-content-wrapper")
|
|
146
|
-
},
|
|
145
|
+
}, /*#__PURE__*/React.createElement(WidthProvider, null, /*#__PURE__*/React.createElement("div", {
|
|
147
146
|
css: clearNextSiblingMarginTopStyle
|
|
148
147
|
}), children))));
|
|
149
148
|
}
|