@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
package/dist/es2019/ui/Expand.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
/** @jsx jsx */
|
|
3
2
|
import React, { useRef, useCallback, useMemo } from 'react';
|
|
4
|
-
import { css
|
|
3
|
+
import { css } from '@emotion/react';
|
|
5
4
|
// eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
6
5
|
import { gridSize, fontSize } from '@atlaskit/theme/constants';
|
|
7
6
|
import ChevronRightIcon from '@atlaskit/icon/glyph/chevron-right';
|
|
@@ -36,7 +35,7 @@ const Container = props => {
|
|
|
36
35
|
padding: 0;
|
|
37
36
|
padding-bottom: ${paddingBottom};
|
|
38
37
|
`;
|
|
39
|
-
return
|
|
38
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
40
39
|
css: styles
|
|
41
40
|
}, props), props.children);
|
|
42
41
|
};
|
|
@@ -49,7 +48,7 @@ const TitleContainer = props => {
|
|
|
49
48
|
padding: ${"var(--ds-space-100, 8px)"};
|
|
50
49
|
padding-bottom: ${paddingBottom};
|
|
51
50
|
`;
|
|
52
|
-
return
|
|
51
|
+
return /*#__PURE__*/React.createElement("button", _extends({
|
|
53
52
|
css: styles
|
|
54
53
|
}, props), props.children);
|
|
55
54
|
};
|
|
@@ -67,7 +66,7 @@ const ContentContainer = props => {
|
|
|
67
66
|
padding-left: ${gridSize() * 5 - gridSize() / 2}px;
|
|
68
67
|
visibility: ${visibility};
|
|
69
68
|
`;
|
|
70
|
-
return
|
|
69
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
71
70
|
css: styles
|
|
72
71
|
}, props), props.children);
|
|
73
72
|
};
|
|
@@ -104,16 +103,16 @@ function Expand({
|
|
|
104
103
|
} = useRef(_uniqueId('expand-title-'));
|
|
105
104
|
const handleFocus = useCallback(() => setFocused(true), []);
|
|
106
105
|
const handleBlur = useCallback(() => setFocused(false), []);
|
|
107
|
-
return
|
|
106
|
+
return /*#__PURE__*/React.createElement(Container, {
|
|
108
107
|
"data-node-type": nodeType,
|
|
109
108
|
"data-title": title,
|
|
110
109
|
"data-expanded": expanded,
|
|
111
110
|
expanded: expanded,
|
|
112
111
|
focused: focused
|
|
113
|
-
}, nestedHeaderIds && nestedHeaderIds.length > 0 ?
|
|
112
|
+
}, nestedHeaderIds && nestedHeaderIds.length > 0 ? /*#__PURE__*/React.createElement(ActiveHeaderIdConsumer, {
|
|
114
113
|
nestedHeaderIds: nestedHeaderIds,
|
|
115
114
|
onNestedHeaderIdMatch: () => setExpanded(true)
|
|
116
|
-
}) : null,
|
|
115
|
+
}) : null, /*#__PURE__*/React.createElement(TitleContainer, {
|
|
117
116
|
onClick: e => {
|
|
118
117
|
e.stopPropagation();
|
|
119
118
|
fireExpandToggleAnalytics(nodeType, expanded, fireAnalyticsEvent);
|
|
@@ -128,27 +127,27 @@ function Expand({
|
|
|
128
127
|
"aria-expanded": expanded,
|
|
129
128
|
contentEditable: false,
|
|
130
129
|
expanded: expanded
|
|
131
|
-
}, isMobile ?
|
|
130
|
+
}, isMobile ? /*#__PURE__*/React.createElement(ExpandIconWrapper, {
|
|
132
131
|
expanded: expanded
|
|
133
|
-
},
|
|
132
|
+
}, /*#__PURE__*/React.createElement(ChevronRightIcon, {
|
|
134
133
|
label: label
|
|
135
|
-
})) :
|
|
134
|
+
})) : /*#__PURE__*/React.createElement(Tooltip, {
|
|
136
135
|
content: label,
|
|
137
136
|
position: "top",
|
|
138
137
|
tag: ExpandLayoutWrapperWithRef,
|
|
139
138
|
testId: 'tooltip'
|
|
140
|
-
},
|
|
139
|
+
}, /*#__PURE__*/React.createElement(ExpandIconWrapper, {
|
|
141
140
|
expanded: expanded
|
|
142
|
-
},
|
|
141
|
+
}, /*#__PURE__*/React.createElement(ChevronRightIcon, {
|
|
143
142
|
label: label
|
|
144
|
-
}))),
|
|
143
|
+
}))), /*#__PURE__*/React.createElement("span", {
|
|
145
144
|
css: titleStyles,
|
|
146
145
|
id: id
|
|
147
|
-
}, title || intl.formatMessage(expandMessages.expandDefaultTitle))),
|
|
146
|
+
}, title || intl.formatMessage(expandMessages.expandDefaultTitle))), /*#__PURE__*/React.createElement(ContentContainer, {
|
|
148
147
|
expanded: expanded
|
|
149
|
-
},
|
|
148
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
150
149
|
className: `${nodeType}-content-wrapper`
|
|
151
|
-
},
|
|
150
|
+
}, /*#__PURE__*/React.createElement(WidthProvider, null, /*#__PURE__*/React.createElement("div", {
|
|
152
151
|
css: clearNextSiblingMarginTopStyle
|
|
153
152
|
}), children))));
|
|
154
153
|
}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
|
-
/** @jsx jsx */
|
|
4
3
|
import React, { Fragment, useContext, useLayoutEffect, useRef } from 'react';
|
|
5
|
-
import { jsx } from '@emotion/react';
|
|
6
4
|
import { PureComponent } from 'react';
|
|
7
5
|
import { getSchemaBasedOnStage } from '@atlaskit/adf-schema/schema-default';
|
|
8
6
|
import { reduce } from '@atlaskit/adf-utils/traverse';
|
|
@@ -35,7 +33,7 @@ import { RenderTracking } from '../../react/utils/performance/RenderTracking';
|
|
|
35
33
|
export const NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
36
34
|
export const DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
37
35
|
const packageName = "@atlaskit/renderer";
|
|
38
|
-
const packageVersion = "108.17.
|
|
36
|
+
const packageVersion = "108.17.4";
|
|
39
37
|
export class Renderer extends PureComponent {
|
|
40
38
|
constructor(props) {
|
|
41
39
|
super(props);
|
|
@@ -337,15 +335,15 @@ export class Renderer extends PureComponent {
|
|
|
337
335
|
if (onComplete) {
|
|
338
336
|
onComplete(stat);
|
|
339
337
|
}
|
|
340
|
-
const rendererOutput =
|
|
338
|
+
const rendererOutput = /*#__PURE__*/React.createElement(RendererContextProvider, {
|
|
341
339
|
value: this.featureFlags(this.props.featureFlags)
|
|
342
|
-
},
|
|
340
|
+
}, /*#__PURE__*/React.createElement(ActiveHeaderIdProvider, {
|
|
343
341
|
value: getActiveHeadingId(allowHeadingAnchorLinks)
|
|
344
|
-
},
|
|
342
|
+
}, /*#__PURE__*/React.createElement(AnalyticsContext.Provider, {
|
|
345
343
|
value: {
|
|
346
344
|
fireAnalyticsEvent: event => this.fireAnalyticsEvent(event)
|
|
347
345
|
}
|
|
348
|
-
},
|
|
346
|
+
}, /*#__PURE__*/React.createElement(SmartCardStorageProvider, null, /*#__PURE__*/React.createElement(RendererWrapper, {
|
|
349
347
|
appearance: appearance,
|
|
350
348
|
allowNestedHeaderLinks: allowNestedHeaderLinks,
|
|
351
349
|
allowColumnSorting: allowColumnSorting,
|
|
@@ -358,30 +356,30 @@ export class Renderer extends PureComponent {
|
|
|
358
356
|
innerRef: this.editorRef,
|
|
359
357
|
onClick: handleWrapperOnClick,
|
|
360
358
|
onMouseDown: this.onMouseDownEditView
|
|
361
|
-
}, enableSsrInlineScripts ?
|
|
359
|
+
}, enableSsrInlineScripts ? /*#__PURE__*/React.createElement(BreakoutSSRInlineScript, null) : null, /*#__PURE__*/React.createElement(RendererActionsInternalUpdater, {
|
|
362
360
|
doc: pmDoc,
|
|
363
361
|
schema: schema,
|
|
364
362
|
onAnalyticsEvent: this.fireAnalyticsEvent
|
|
365
363
|
}, result))))));
|
|
366
|
-
let rendererResult = truncated ?
|
|
364
|
+
let rendererResult = truncated ? /*#__PURE__*/React.createElement(TruncatedWrapper, {
|
|
367
365
|
height: maxHeight,
|
|
368
366
|
fadeHeight: fadeOutHeight
|
|
369
367
|
}, rendererOutput) : rendererOutput;
|
|
370
368
|
const rendererRenderTracking = (_this$featureFlags = this.featureFlags(this.props.featureFlags)) === null || _this$featureFlags === void 0 ? void 0 : (_this$featureFlags$fe = _this$featureFlags.featureFlags) === null || _this$featureFlags$fe === void 0 ? void 0 : (_this$featureFlags$fe2 = _this$featureFlags$fe.rendererRenderTracking) === null || _this$featureFlags$fe2 === void 0 ? void 0 : _this$featureFlags$fe2[ACTION_SUBJECT.RENDERER];
|
|
371
|
-
const reRenderTracking = (rendererRenderTracking === null || rendererRenderTracking === void 0 ? void 0 : rendererRenderTracking.enabled) &&
|
|
369
|
+
const reRenderTracking = (rendererRenderTracking === null || rendererRenderTracking === void 0 ? void 0 : rendererRenderTracking.enabled) && /*#__PURE__*/React.createElement(RenderTracking, {
|
|
372
370
|
componentProps: this.props,
|
|
373
371
|
action: ACTION.RE_RENDERED,
|
|
374
372
|
actionSubject: ACTION_SUBJECT.RENDERER,
|
|
375
373
|
handleAnalyticsEvent: this.fireAnalyticsEvent,
|
|
376
374
|
useShallow: rendererRenderTracking.useShallow
|
|
377
375
|
});
|
|
378
|
-
return
|
|
376
|
+
return /*#__PURE__*/React.createElement(Fragment, null, reRenderTracking, rendererResult);
|
|
379
377
|
} catch (e) {
|
|
380
378
|
var _featureFlags$feature2;
|
|
381
379
|
if (onError) {
|
|
382
380
|
onError(e);
|
|
383
381
|
}
|
|
384
|
-
return
|
|
382
|
+
return /*#__PURE__*/React.createElement(RendererWrapper, {
|
|
385
383
|
appearance: appearance,
|
|
386
384
|
allowCopyToClipboard: allowCopyToClipboard,
|
|
387
385
|
allowWrapCodeBlock: allowWrapCodeBlock,
|
|
@@ -391,7 +389,7 @@ export class Renderer extends PureComponent {
|
|
|
391
389
|
useBlockRenderForCodeBlock: (_featureFlags$feature2 = featureFlags.featureFlags.useBlockRenderForCodeBlock) !== null && _featureFlags$feature2 !== void 0 ? _featureFlags$feature2 : true,
|
|
392
390
|
addTelepointer: this.props.addTelepointer,
|
|
393
391
|
onClick: handleWrapperOnClick
|
|
394
|
-
},
|
|
392
|
+
}, /*#__PURE__*/React.createElement(UnsupportedBlock, null));
|
|
395
393
|
}
|
|
396
394
|
}
|
|
397
395
|
componentWillUnmount() {
|
|
@@ -409,7 +407,7 @@ export class Renderer extends PureComponent {
|
|
|
409
407
|
}
|
|
410
408
|
}
|
|
411
409
|
}
|
|
412
|
-
const RendererWithAnalytics = /*#__PURE__*/React.memo(props =>
|
|
410
|
+
const RendererWithAnalytics = /*#__PURE__*/React.memo(props => /*#__PURE__*/React.createElement(FabricEditorAnalyticsContext, {
|
|
413
411
|
data: {
|
|
414
412
|
appearance: getAnalyticsAppearance(props.appearance),
|
|
415
413
|
packageName,
|
|
@@ -417,15 +415,15 @@ const RendererWithAnalytics = /*#__PURE__*/React.memo(props => jsx(FabricEditorA
|
|
|
417
415
|
componentName: 'renderer',
|
|
418
416
|
editorSessionId: uuid()
|
|
419
417
|
}
|
|
420
|
-
},
|
|
418
|
+
}, /*#__PURE__*/React.createElement(WithCreateAnalyticsEvent, {
|
|
421
419
|
render: createAnalyticsEvent => {
|
|
422
420
|
// `IntlErrorBoundary` only captures Internationalisation errors, leaving others for `ErrorBoundary`.
|
|
423
|
-
return
|
|
421
|
+
return /*#__PURE__*/React.createElement(ErrorBoundary, {
|
|
424
422
|
component: ACTION_SUBJECT.RENDERER,
|
|
425
423
|
rethrowError: true,
|
|
426
424
|
fallbackComponent: null,
|
|
427
425
|
createAnalyticsEvent: createAnalyticsEvent
|
|
428
|
-
},
|
|
426
|
+
}, /*#__PURE__*/React.createElement(IntlErrorBoundary, null, /*#__PURE__*/React.createElement(Renderer, _extends({}, props, {
|
|
429
427
|
createAnalyticsEvent: createAnalyticsEvent
|
|
430
428
|
}))));
|
|
431
429
|
}
|
|
@@ -491,12 +489,12 @@ const RendererWrapper = /*#__PURE__*/React.memo(props => {
|
|
|
491
489
|
return () => observer.disconnect();
|
|
492
490
|
}
|
|
493
491
|
}, [innerRef, addTelepointer]);
|
|
494
|
-
return
|
|
492
|
+
return /*#__PURE__*/React.createElement(WidthProvider, {
|
|
495
493
|
className: `ak-renderer-wrapper is-${appearance}`,
|
|
496
494
|
"data-appearance": appearance
|
|
497
|
-
},
|
|
495
|
+
}, /*#__PURE__*/React.createElement(BaseTheme, {
|
|
498
496
|
baseFontSize: appearance && appearance !== 'comment' ? akEditorFullPageDefaultFontSize : undefined
|
|
499
|
-
},
|
|
497
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
500
498
|
ref: innerRef,
|
|
501
499
|
onClick: onClick,
|
|
502
500
|
onMouseDown: onMouseDown,
|
|
@@ -534,15 +532,15 @@ const RendererWithAnnotationSelection = props => {
|
|
|
534
532
|
const localRef = React.useRef(null);
|
|
535
533
|
const innerRef = props.innerRef || localRef;
|
|
536
534
|
if (!allowAnnotations) {
|
|
537
|
-
return
|
|
535
|
+
return /*#__PURE__*/React.createElement(RendererWithAnalytics, _extends({
|
|
538
536
|
innerRef: innerRef
|
|
539
537
|
}, props));
|
|
540
538
|
}
|
|
541
|
-
return
|
|
539
|
+
return /*#__PURE__*/React.createElement(RendererActionsContext, null, /*#__PURE__*/React.createElement(AnnotationsWrapper, {
|
|
542
540
|
rendererRef: innerRef,
|
|
543
541
|
adfDocument: adfDocument,
|
|
544
542
|
annotationProvider: props.annotationProvider
|
|
545
|
-
},
|
|
543
|
+
}, /*#__PURE__*/React.createElement(RendererWithAnalytics, _extends({
|
|
546
544
|
innerRef: innerRef
|
|
547
545
|
}, props, {
|
|
548
546
|
featureFlags: props.featureFlags
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { css, jsx } from '@emotion/react';
|
|
1
|
+
import { css } from '@emotion/react';
|
|
3
2
|
import { Component } from 'react';
|
|
4
3
|
const fadeOutStyles = (maxHeight, top, backgroundColor) => css`
|
|
5
4
|
position: relative;
|
|
@@ -27,7 +26,7 @@ const FadeOut = props => {
|
|
|
27
26
|
} = props;
|
|
28
27
|
const top = height - fadeHeight;
|
|
29
28
|
const styles = fadeOutStyles(height, top, backgroundColor);
|
|
30
|
-
return
|
|
29
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
31
30
|
css: styles
|
|
32
31
|
}, children);
|
|
33
32
|
};
|
|
@@ -44,7 +43,7 @@ export class TruncatedWrapper extends Component {
|
|
|
44
43
|
backgroundColor = "var(--ds-surface, white)",
|
|
45
44
|
children
|
|
46
45
|
} = this.props;
|
|
47
|
-
return
|
|
46
|
+
return /*#__PURE__*/React.createElement(FadeOut, {
|
|
48
47
|
height: height,
|
|
49
48
|
fadeHeight: fadeHeight,
|
|
50
49
|
backgroundColor: backgroundColor
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { css, jsx } from '@emotion/react';
|
|
1
|
+
import { css } from '@emotion/react';
|
|
3
2
|
import Tooltip from '@atlaskit/tooltip';
|
|
4
3
|
import { N20, N30 } from '@atlaskit/theme/colors';
|
|
5
4
|
import { SortOrder } from '@atlaskit/editor-common/types';
|
|
@@ -160,11 +159,11 @@ const SortingIcon = ({
|
|
|
160
159
|
onKeyDown(event);
|
|
161
160
|
}
|
|
162
161
|
};
|
|
163
|
-
return
|
|
162
|
+
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
164
163
|
delay: 0,
|
|
165
164
|
content: content,
|
|
166
165
|
position: "top"
|
|
167
|
-
},
|
|
166
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
168
167
|
css: buttonStyles,
|
|
169
168
|
className: buttonClassName,
|
|
170
169
|
role: "button",
|
|
@@ -173,10 +172,10 @@ const SortingIcon = ({
|
|
|
173
172
|
"aria-disabled": !isSortingAllowed,
|
|
174
173
|
onClick: handleClick,
|
|
175
174
|
onKeyDown: handleKeyDown
|
|
176
|
-
},
|
|
175
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
177
176
|
css: iconWrapperStyles,
|
|
178
177
|
className: getIconClassName(isSortingAllowed, sortOrdered)
|
|
179
|
-
},
|
|
178
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
180
179
|
css: iconStyles
|
|
181
180
|
}))));
|
|
182
181
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
/** @jsx jsx */
|
|
3
2
|
import React, { Fragment } from 'react';
|
|
4
|
-
import { css
|
|
3
|
+
import { css } from '@emotion/react';
|
|
5
4
|
import { InsertDraftPosition } from '../types';
|
|
6
5
|
import { AnnotationsDraftContext } from '../context';
|
|
7
6
|
import { splitText, calcTextSplitOffset, findTextString } from './text';
|
|
@@ -19,7 +18,7 @@ export const AnnotationDraft = ({
|
|
|
19
18
|
draftPosition,
|
|
20
19
|
children
|
|
21
20
|
}) => {
|
|
22
|
-
return
|
|
21
|
+
return /*#__PURE__*/React.createElement("mark", _extends({
|
|
23
22
|
"data-renderer-mark": true
|
|
24
23
|
}, dataAttributes(draftPosition), {
|
|
25
24
|
css: markStyles
|
|
@@ -45,12 +44,12 @@ export const applyAnnotationOnText = ({
|
|
|
45
44
|
const annotateIndex = getAnnotationIndex(shouldApplyAnnotationAt, texts.length);
|
|
46
45
|
return texts.map((value, index) => {
|
|
47
46
|
if (annotateIndex === index) {
|
|
48
|
-
return
|
|
47
|
+
return /*#__PURE__*/React.createElement(AnnotationDraft, {
|
|
49
48
|
key: index,
|
|
50
49
|
draftPosition: draftPosition
|
|
51
50
|
}, value);
|
|
52
51
|
}
|
|
53
|
-
return
|
|
52
|
+
return /*#__PURE__*/React.createElement(React.Fragment, {
|
|
54
53
|
key: index
|
|
55
54
|
}, value);
|
|
56
55
|
});
|
|
@@ -72,27 +71,27 @@ export const TextWithAnnotationDraft = ({
|
|
|
72
71
|
return calcInsertDraftPositionOnText(textPosition, nextDraftPosition);
|
|
73
72
|
}, [nextDraftPosition, textPosition]);
|
|
74
73
|
if (shouldApplyAnnotationAt === false || !nextDraftPosition) {
|
|
75
|
-
return
|
|
74
|
+
return /*#__PURE__*/React.createElement(Fragment, null, children);
|
|
76
75
|
}
|
|
77
76
|
if (shouldApplyAnnotationAt === InsertDraftPosition.AROUND_TEXT) {
|
|
78
|
-
return
|
|
77
|
+
return /*#__PURE__*/React.createElement(AnnotationDraft, {
|
|
79
78
|
key: 0,
|
|
80
79
|
draftPosition: nextDraftPosition
|
|
81
80
|
}, children);
|
|
82
81
|
}
|
|
83
82
|
const textString = findTextString(children);
|
|
84
83
|
if (!textString) {
|
|
85
|
-
return
|
|
84
|
+
return /*#__PURE__*/React.createElement(Fragment, null, children);
|
|
86
85
|
}
|
|
87
86
|
const offsets = calcTextSplitOffset(nextDraftPosition, textPosition, textString);
|
|
88
87
|
const texts = splitText(textString, offsets);
|
|
89
88
|
if (!texts) {
|
|
90
|
-
return
|
|
89
|
+
return /*#__PURE__*/React.createElement(Fragment, null, children);
|
|
91
90
|
}
|
|
92
91
|
const components = applyAnnotationOnText({
|
|
93
92
|
texts,
|
|
94
93
|
shouldApplyAnnotationAt,
|
|
95
94
|
draftPosition: nextDraftPosition
|
|
96
95
|
});
|
|
97
|
-
return
|
|
96
|
+
return /*#__PURE__*/React.createElement(Fragment, null, components);
|
|
98
97
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
/** @jsx jsx */
|
|
3
2
|
import React, { useMemo, useCallback } from 'react';
|
|
4
|
-
import { css
|
|
3
|
+
import { css } from '@emotion/react';
|
|
5
4
|
import { AnnotationSharedCSSByState } from '@atlaskit/editor-common/styles';
|
|
6
5
|
import { AnnotationMarkStates } from '@atlaskit/adf-schema';
|
|
7
6
|
const markStyles = props => css`
|
|
@@ -55,7 +54,7 @@ export const MarkComponent = ({
|
|
|
55
54
|
} : {
|
|
56
55
|
'aria-details': annotationIds.join(', ')
|
|
57
56
|
};
|
|
58
|
-
return
|
|
57
|
+
return /*#__PURE__*/React.createElement("mark", _extends({
|
|
59
58
|
id: id,
|
|
60
59
|
onClick: onMarkClick
|
|
61
60
|
}, accessibility, overriddenData, {
|
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
3
3
|
var _templateObject;
|
|
4
|
-
/** @jsx jsx */
|
|
5
4
|
import React from 'react';
|
|
6
|
-
import { css
|
|
5
|
+
import { css } from '@emotion/react';
|
|
7
6
|
import { alignmentPositionMap } from '@atlaskit/adf-schema';
|
|
8
7
|
var MarkWrapper = function MarkWrapper(props) {
|
|
9
8
|
var styles = props['data-align'] ? css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n text-align: ", ";\n "])), alignmentPositionMap[props['data-align']]) : '';
|
|
10
|
-
return
|
|
9
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
11
10
|
css: styles
|
|
12
11
|
}, props), props.children);
|
|
13
12
|
};
|
|
14
13
|
export default function Alignment(props) {
|
|
15
|
-
return
|
|
14
|
+
return /*#__PURE__*/React.createElement(MarkWrapper, {
|
|
16
15
|
className: "fabric-editor-block-mark fabric-editor-alignment",
|
|
17
16
|
"data-align": props.align
|
|
18
17
|
}, props.children);
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject;
|
|
3
|
-
|
|
4
|
-
import { css, jsx } from '@emotion/react';
|
|
3
|
+
import { css } from '@emotion/react';
|
|
5
4
|
import { WidthConsumer } from '@atlaskit/editor-common/ui';
|
|
6
5
|
import { calcBreakoutWidth } from '@atlaskit/editor-common/utils';
|
|
7
6
|
import { blockNodesVerticalMargin } from '@atlaskit/editor-shared-styles';
|
|
8
7
|
export var wrapperStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n margin: ", " 0;\n margin-left: 50%;\n transform: translateX(-50%);\n"])), blockNodesVerticalMargin);
|
|
9
8
|
export default function Breakout(props) {
|
|
10
|
-
return
|
|
9
|
+
return /*#__PURE__*/React.createElement(WidthConsumer, null, function (_ref) {
|
|
11
10
|
var width = _ref.width;
|
|
12
|
-
return
|
|
11
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
13
12
|
css: wrapperStyles,
|
|
14
13
|
"data-mode": props.mode,
|
|
15
14
|
style: {
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
3
3
|
var _templateObject;
|
|
4
|
-
/** @jsx jsx */
|
|
5
4
|
import React, { Fragment } from 'react';
|
|
6
|
-
import { css
|
|
5
|
+
import { css } from '@emotion/react';
|
|
7
6
|
import { B400, B300, B500 } from '@atlaskit/theme/colors';
|
|
8
7
|
import { getEventHandler } from '../../utils';
|
|
9
8
|
import { PLATFORM, MODE } from '../../analytics/events';
|
|
@@ -28,7 +27,7 @@ export default function Link(props) {
|
|
|
28
27
|
}
|
|
29
28
|
var handler = getEventHandler(eventHandlers, 'link');
|
|
30
29
|
if (isMediaLink) {
|
|
31
|
-
return
|
|
30
|
+
return /*#__PURE__*/React.createElement(Fragment, null, props.children);
|
|
32
31
|
}
|
|
33
32
|
var analyticsData = {
|
|
34
33
|
attributes: {
|
|
@@ -37,9 +36,9 @@ export default function Link(props) {
|
|
|
37
36
|
// Below is added for the future implementation of Linking Platform namespaced analytic context
|
|
38
37
|
location: 'renderer'
|
|
39
38
|
};
|
|
40
|
-
return
|
|
39
|
+
return /*#__PURE__*/React.createElement(AnalyticsContext, {
|
|
41
40
|
data: analyticsData
|
|
42
|
-
},
|
|
41
|
+
}, /*#__PURE__*/React.createElement(LinkUrl, _extends({
|
|
43
42
|
css: anchorStyles,
|
|
44
43
|
onClick: function onClick(e) {
|
|
45
44
|
if (fireAnalyticsEvent) {
|
|
@@ -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';
|
|
@@ -55,7 +54,7 @@ export default function BlockCard(props) {
|
|
|
55
54
|
};
|
|
56
55
|
if (props.datasource) {
|
|
57
56
|
if (platform === 'mobile') {
|
|
58
|
-
return
|
|
57
|
+
return /*#__PURE__*/React.createElement(InlineCard, props);
|
|
59
58
|
}
|
|
60
59
|
var views = props.datasource.views;
|
|
61
60
|
var tableView = views.find(function (view) {
|
|
@@ -78,18 +77,18 @@ export default function BlockCard(props) {
|
|
|
78
77
|
var columnCustomSizes = columnCustomSizesEntries !== null && columnCustomSizesEntries !== void 0 && columnCustomSizesEntries.length ? Object.fromEntries(columnCustomSizesEntries) : undefined;
|
|
79
78
|
var datasource = props.datasource,
|
|
80
79
|
layout = props.layout;
|
|
81
|
-
return
|
|
80
|
+
return /*#__PURE__*/React.createElement(AnalyticsContext, {
|
|
82
81
|
data: analyticsData
|
|
83
|
-
},
|
|
82
|
+
}, /*#__PURE__*/React.createElement(CardErrorBoundary, _extends({
|
|
84
83
|
unsupportedComponent: UnsupportedInline
|
|
85
|
-
}, cardProps),
|
|
84
|
+
}, cardProps), /*#__PURE__*/React.createElement(WidthConsumer, null, function (_ref5) {
|
|
86
85
|
var width = _ref5.width;
|
|
87
|
-
return
|
|
86
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
88
87
|
css: datasourceContainerStyle,
|
|
89
88
|
style: {
|
|
90
89
|
width: calcBreakoutWidth(layout, width)
|
|
91
90
|
}
|
|
92
|
-
},
|
|
91
|
+
}, /*#__PURE__*/React.createElement(DatasourceTableView, {
|
|
93
92
|
datasourceId: datasource.id,
|
|
94
93
|
parameters: datasource.parameters,
|
|
95
94
|
visibleColumnKeys: visibleColumnKeys,
|
|
@@ -98,21 +97,21 @@ export default function BlockCard(props) {
|
|
|
98
97
|
}));
|
|
99
98
|
})));
|
|
100
99
|
}
|
|
101
|
-
return
|
|
100
|
+
return /*#__PURE__*/React.createElement(InlineCard, {
|
|
102
101
|
data: data,
|
|
103
102
|
url: url
|
|
104
103
|
});
|
|
105
104
|
}
|
|
106
|
-
return
|
|
105
|
+
return /*#__PURE__*/React.createElement(AnalyticsContext, {
|
|
107
106
|
data: analyticsData
|
|
108
|
-
},
|
|
107
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
109
108
|
className: "blockCardView-content-wrap",
|
|
110
109
|
"data-block-card": true,
|
|
111
110
|
"data-card-data": data ? JSON.stringify(data) : undefined,
|
|
112
111
|
"data-card-url": url
|
|
113
|
-
},
|
|
112
|
+
}, /*#__PURE__*/React.createElement(CardErrorBoundary, _extends({
|
|
114
113
|
unsupportedComponent: UnsupportedBlock
|
|
115
|
-
}, cardProps),
|
|
114
|
+
}, cardProps), /*#__PURE__*/React.createElement(Card, _extends({
|
|
116
115
|
appearance: "block",
|
|
117
116
|
showActions: rendererAppearance !== 'mobile',
|
|
118
117
|
platform: platform,
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
-
/** @jsx jsx */
|
|
3
2
|
import { useState } from 'react';
|
|
4
|
-
import { jsx } from '@emotion/react';
|
|
5
3
|
import { injectIntl } from 'react-intl-next';
|
|
6
4
|
import { CodeBlockSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
7
5
|
import { CodeBlock as AkCodeBlock } from '@atlaskit/code';
|
|
@@ -21,14 +19,14 @@ function CodeBlock(props) {
|
|
|
21
19
|
_useState2 = _slicedToArray(_useState, 2),
|
|
22
20
|
wrapLongLines = _useState2[0],
|
|
23
21
|
setWrapLongLines = _useState2[1];
|
|
24
|
-
return
|
|
22
|
+
return /*#__PURE__*/React.createElement(CodeBlockContainer, {
|
|
25
23
|
allowCopyToClipboard: allowCopyToClipboard,
|
|
26
24
|
allowWrapCodeBlock: allowWrapCodeBlock,
|
|
27
25
|
className: className,
|
|
28
26
|
setWrapLongLines: setWrapLongLines,
|
|
29
27
|
text: text,
|
|
30
28
|
wrapLongLines: wrapLongLines
|
|
31
|
-
},
|
|
29
|
+
}, /*#__PURE__*/React.createElement(AkCodeBlock, {
|
|
32
30
|
language: language,
|
|
33
31
|
text: text,
|
|
34
32
|
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';
|
|
@@ -45,14 +44,14 @@ var CodeBlockButtonContainer = function CodeBlockButtonContainer(_ref) {
|
|
|
45
44
|
setWrapLongLines = _ref.setWrapLongLines,
|
|
46
45
|
text = _ref.text,
|
|
47
46
|
wrapLongLines = _ref.wrapLongLines;
|
|
48
|
-
return
|
|
47
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
49
48
|
css: codeBlockButtonsWrapper
|
|
50
|
-
},
|
|
49
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
51
50
|
css: codeBlockButtonsStyle
|
|
52
|
-
}, allowWrapCodeBlock &&
|
|
51
|
+
}, allowWrapCodeBlock && /*#__PURE__*/React.createElement(CodeWrapButton, {
|
|
53
52
|
setWrapLongLines: setWrapLongLines,
|
|
54
53
|
wrapLongLines: wrapLongLines
|
|
55
|
-
}), allowCopyToClipboard &&
|
|
54
|
+
}), allowCopyToClipboard && /*#__PURE__*/React.createElement(CopyButton, {
|
|
56
55
|
content: text
|
|
57
56
|
})));
|
|
58
57
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject;
|
|
3
|
-
|
|
4
|
-
import { jsx, css } from '@emotion/react';
|
|
3
|
+
import { css } from '@emotion/react';
|
|
5
4
|
import { overflowShadow, relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
6
5
|
import { N20, DN50 } from '@atlaskit/theme/colors';
|
|
7
6
|
import { themed } from '@atlaskit/theme/components';
|
|
@@ -28,10 +27,10 @@ var CodeBlockContainer = function CodeBlockContainer(_ref) {
|
|
|
28
27
|
setWrapLongLines = _ref.setWrapLongLines,
|
|
29
28
|
text = _ref.text,
|
|
30
29
|
wrapLongLines = _ref.wrapLongLines;
|
|
31
|
-
return
|
|
30
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
32
31
|
className: className,
|
|
33
32
|
css: codeBlockStyleOverrides
|
|
34
|
-
},
|
|
33
|
+
}, /*#__PURE__*/React.createElement(CodeBlockButtonContainer, {
|
|
35
34
|
allowCopyToClipboard: allowCopyToClipboard,
|
|
36
35
|
allowWrapCodeBlock: allowWrapCodeBlock,
|
|
37
36
|
setWrapLongLines: setWrapLongLines,
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
-
/** @jsx jsx */
|
|
3
|
-
import { jsx } from '@emotion/react';
|
|
4
2
|
import React, { useState } from 'react';
|
|
5
3
|
import { injectIntl } from 'react-intl-next';
|
|
6
4
|
import Tooltip from '@atlaskit/tooltip';
|
|
@@ -25,20 +23,20 @@ var CopyButton = function CopyButton(_ref) {
|
|
|
25
23
|
setTooltip(intl.formatMessage(codeBlockButtonMessages.copyCodeToClipboard));
|
|
26
24
|
setClassName('copy-to-clipboard');
|
|
27
25
|
};
|
|
28
|
-
return
|
|
26
|
+
return /*#__PURE__*/React.createElement(AnalyticsContext.Consumer, null, function (_ref2) {
|
|
29
27
|
var fireAnalyticsEvent = _ref2.fireAnalyticsEvent;
|
|
30
|
-
return
|
|
28
|
+
return /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(Tooltip, {
|
|
31
29
|
content: tooltip,
|
|
32
30
|
hideTooltipOnClick: false,
|
|
33
31
|
position: "top"
|
|
34
|
-
},
|
|
32
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
35
33
|
onMouseLeave: onMouseLeave
|
|
36
|
-
},
|
|
34
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
37
35
|
appearance: "subtle",
|
|
38
36
|
"aria-haspopup": true,
|
|
39
37
|
"aria-label": tooltip,
|
|
40
38
|
className: className,
|
|
41
|
-
iconBefore:
|
|
39
|
+
iconBefore: /*#__PURE__*/React.createElement(CopyIcon, {
|
|
42
40
|
label: tooltip
|
|
43
41
|
}),
|
|
44
42
|
onClick: function onClick(event) {
|