@atlaskit/editor-common 76.25.0 → 76.25.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/afm-cc/tsconfig.json +133 -0
- package/dist/cjs/card/LinkToolbarButtonGroup.js +6 -5
- package/dist/cjs/element-browser/ViewMore.js +4 -3
- package/dist/cjs/element-browser/components/CategoryList.js +5 -4
- package/dist/cjs/element-browser/components/ElementBrowserLoader.js +3 -2
- package/dist/cjs/element-browser/components/ElementList/ElementList.js +21 -20
- package/dist/cjs/element-browser/components/ElementList/EmptyState.js +9 -8
- package/dist/cjs/element-browser/components/ElementList/NotFoundIllustration.js +16 -15
- package/dist/cjs/element-browser/components/ElementSearch.js +7 -6
- package/dist/cjs/element-browser/components/StatelessElementBrowser.js +22 -21
- package/dist/cjs/element-browser/hooks/use-container-width.js +3 -2
- package/dist/cjs/keymaps/index.js +2 -1
- package/dist/cjs/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +22 -21
- package/dist/cjs/link/LinkSearch/LinkSearchList.js +6 -5
- package/dist/cjs/link/LinkSearch/LinkSearchListItem.js +11 -9
- package/dist/cjs/media-inline/inline-image-wrapper.js +16 -4
- package/dist/cjs/media-inline/media-inline-image-card.js +64 -41
- package/dist/cjs/media-inline/types.js +5 -0
- package/dist/cjs/media-inline/views/constants.js +8 -0
- package/dist/cjs/media-inline/views/error-view.js +36 -0
- package/dist/cjs/media-inline/views/frame.js +18 -0
- package/dist/cjs/media-inline/views/icon-wrapper.js +22 -0
- package/dist/cjs/media-inline/views/loading-view.js +24 -0
- package/dist/cjs/media-inline/views/wrapper.js +24 -0
- package/dist/cjs/messages/media-inline-card.js +19 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/react-node-view/getInlineNodeViewProducer.js +8 -5
- package/dist/cjs/ui/Caption/index.js +3 -2
- package/dist/cjs/ui/DropList/index.js +6 -6
- package/dist/cjs/ui/Expand/index.js +5 -3
- package/dist/cjs/ui/FloatingToolbar/Separator.js +2 -1
- package/dist/cjs/ui/FloatingToolbar/SmallerEditIcon.js +3 -2
- package/dist/cjs/ui/MediaSingle/index.js +5 -2
- package/dist/cjs/ui/MediaSingle/styled.js +3 -2
- package/dist/cjs/ui/Messages/index.js +8 -7
- package/dist/cjs/ui/PanelTextInput/index.js +3 -2
- package/dist/cjs/ui/UnsupportedBlock/index.js +5 -4
- package/dist/cjs/ui/UnsupportedInline/index.js +5 -4
- package/dist/cjs/ui/WidthProvider/index.js +4 -4
- package/dist/cjs/ui-color/ColorPalette/Color/index.js +6 -5
- package/dist/cjs/ui-color/ColorPalette/index.js +6 -3
- package/dist/cjs/ui-menu/ColorPickerButton/index.js +10 -9
- package/dist/cjs/ui-menu/DropdownContainer/index.js +3 -3
- package/dist/cjs/ui-menu/DropdownMenu/index.js +19 -18
- package/dist/cjs/ui-menu/ToolbarArrowKeyNavigationProvider/index.js +3 -2
- package/dist/cjs/ui-menu/ToolbarButton/index.js +4 -3
- package/dist/es2019/card/LinkToolbarButtonGroup.js +7 -6
- package/dist/es2019/element-browser/ViewMore.js +5 -4
- package/dist/es2019/element-browser/components/CategoryList.js +6 -4
- package/dist/es2019/element-browser/components/ElementBrowserLoader.js +4 -3
- package/dist/es2019/element-browser/components/ElementList/ElementList.js +22 -21
- package/dist/es2019/element-browser/components/ElementList/EmptyState.js +10 -9
- package/dist/es2019/element-browser/components/ElementList/NotFoundIllustration.js +17 -16
- package/dist/es2019/element-browser/components/ElementSearch.js +8 -7
- package/dist/es2019/element-browser/components/StatelessElementBrowser.js +23 -22
- package/dist/es2019/element-browser/hooks/use-container-width.js +4 -3
- package/dist/es2019/keymaps/index.js +3 -2
- package/dist/es2019/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +24 -22
- package/dist/es2019/link/LinkSearch/LinkSearchList.js +7 -6
- package/dist/es2019/link/LinkSearch/LinkSearchListItem.js +10 -9
- package/dist/es2019/media-inline/inline-image-wrapper.js +17 -5
- package/dist/es2019/media-inline/media-inline-image-card.js +64 -40
- package/dist/es2019/media-inline/types.js +1 -0
- package/dist/es2019/media-inline/views/constants.js +2 -0
- package/dist/es2019/media-inline/views/error-view.js +28 -0
- package/dist/es2019/media-inline/views/frame.js +11 -0
- package/dist/es2019/media-inline/views/icon-wrapper.js +17 -0
- package/dist/es2019/media-inline/views/loading-view.js +16 -0
- package/dist/es2019/media-inline/views/wrapper.js +18 -0
- package/dist/es2019/messages/media-inline-card.js +13 -0
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/react-node-view/getInlineNodeViewProducer.js +7 -5
- package/dist/es2019/ui/Caption/index.js +4 -3
- package/dist/es2019/ui/DropList/index.js +8 -6
- package/dist/es2019/ui/Expand/index.js +5 -3
- package/dist/es2019/ui/FloatingToolbar/Separator.js +3 -2
- package/dist/es2019/ui/FloatingToolbar/SmallerEditIcon.js +4 -3
- package/dist/es2019/ui/MediaSingle/index.js +4 -2
- package/dist/es2019/ui/MediaSingle/styled.js +5 -3
- package/dist/es2019/ui/Messages/index.js +10 -8
- package/dist/es2019/ui/PanelTextInput/index.js +4 -1
- package/dist/es2019/ui/UnsupportedBlock/index.js +6 -5
- package/dist/es2019/ui/UnsupportedInline/index.js +6 -5
- package/dist/es2019/ui/WidthProvider/index.js +5 -4
- package/dist/es2019/ui-color/ColorPalette/Color/index.js +6 -4
- package/dist/es2019/ui-color/ColorPalette/index.js +4 -2
- package/dist/es2019/ui-menu/ColorPickerButton/index.js +11 -10
- package/dist/es2019/ui-menu/DropdownContainer/index.js +3 -2
- package/dist/es2019/ui-menu/DropdownMenu/index.js +21 -19
- package/dist/es2019/ui-menu/ToolbarArrowKeyNavigationProvider/index.js +4 -3
- package/dist/es2019/ui-menu/ToolbarButton/index.js +5 -5
- package/dist/esm/card/LinkToolbarButtonGroup.js +7 -6
- package/dist/esm/element-browser/ViewMore.js +5 -4
- package/dist/esm/element-browser/components/CategoryList.js +7 -5
- package/dist/esm/element-browser/components/ElementBrowserLoader.js +4 -3
- package/dist/esm/element-browser/components/ElementList/ElementList.js +22 -21
- package/dist/esm/element-browser/components/ElementList/EmptyState.js +10 -9
- package/dist/esm/element-browser/components/ElementList/NotFoundIllustration.js +17 -16
- package/dist/esm/element-browser/components/ElementSearch.js +8 -7
- package/dist/esm/element-browser/components/StatelessElementBrowser.js +23 -22
- package/dist/esm/element-browser/hooks/use-container-width.js +4 -3
- package/dist/esm/keymaps/index.js +3 -2
- package/dist/esm/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +24 -22
- package/dist/esm/link/LinkSearch/LinkSearchList.js +7 -6
- package/dist/esm/link/LinkSearch/LinkSearchListItem.js +10 -9
- package/dist/esm/media-inline/inline-image-wrapper.js +17 -5
- package/dist/esm/media-inline/media-inline-image-card.js +63 -40
- package/dist/esm/media-inline/types.js +1 -0
- package/dist/esm/media-inline/views/constants.js +2 -0
- package/dist/esm/media-inline/views/error-view.js +29 -0
- package/dist/esm/media-inline/views/frame.js +12 -0
- package/dist/esm/media-inline/views/icon-wrapper.js +16 -0
- package/dist/esm/media-inline/views/loading-view.js +17 -0
- package/dist/esm/media-inline/views/wrapper.js +18 -0
- package/dist/esm/messages/media-inline-card.js +13 -0
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/react-node-view/getInlineNodeViewProducer.js +7 -5
- package/dist/esm/ui/Caption/index.js +4 -3
- package/dist/esm/ui/DropList/index.js +8 -6
- package/dist/esm/ui/Expand/index.js +5 -3
- package/dist/esm/ui/FloatingToolbar/Separator.js +3 -2
- package/dist/esm/ui/FloatingToolbar/SmallerEditIcon.js +4 -3
- package/dist/esm/ui/MediaSingle/index.js +4 -2
- package/dist/esm/ui/MediaSingle/styled.js +5 -3
- package/dist/esm/ui/Messages/index.js +10 -8
- package/dist/esm/ui/PanelTextInput/index.js +4 -1
- package/dist/esm/ui/UnsupportedBlock/index.js +6 -5
- package/dist/esm/ui/UnsupportedInline/index.js +6 -5
- package/dist/esm/ui/WidthProvider/index.js +5 -4
- package/dist/esm/ui-color/ColorPalette/Color/index.js +6 -4
- package/dist/esm/ui-color/ColorPalette/index.js +5 -3
- package/dist/esm/ui-menu/ColorPickerButton/index.js +11 -10
- package/dist/esm/ui-menu/DropdownContainer/index.js +3 -2
- package/dist/esm/ui-menu/DropdownMenu/index.js +21 -19
- package/dist/esm/ui-menu/ToolbarArrowKeyNavigationProvider/index.js +4 -3
- package/dist/esm/ui-menu/ToolbarButton/index.js +5 -5
- package/dist/types/media-inline/index.d.ts +1 -0
- package/dist/types/media-inline/inline-image-wrapper.d.ts +1 -0
- package/dist/types/media-inline/media-inline-image-card.d.ts +5 -1
- package/dist/types/media-inline/types.d.ts +6 -0
- package/dist/types/media-inline/views/constants.d.ts +2 -0
- package/dist/types/media-inline/views/error-view.d.ts +12 -0
- package/dist/types/media-inline/views/frame.d.ts +9 -0
- package/dist/types/media-inline/views/icon-wrapper.d.ts +7 -0
- package/dist/types/media-inline/views/loading-view.d.ts +10 -0
- package/dist/types/media-inline/views/wrapper.d.ts +1 -0
- package/dist/types/messages/media-inline-card.d.ts +12 -0
- package/dist/types/types/floating-toolbar.d.ts +1 -0
- package/dist/types-ts4.5/media-inline/index.d.ts +1 -0
- package/dist/types-ts4.5/media-inline/inline-image-wrapper.d.ts +1 -0
- package/dist/types-ts4.5/media-inline/media-inline-image-card.d.ts +5 -1
- package/dist/types-ts4.5/media-inline/types.d.ts +6 -0
- package/dist/types-ts4.5/media-inline/views/constants.d.ts +2 -0
- package/dist/types-ts4.5/media-inline/views/error-view.d.ts +12 -0
- package/dist/types-ts4.5/media-inline/views/frame.d.ts +9 -0
- package/dist/types-ts4.5/media-inline/views/icon-wrapper.d.ts +7 -0
- package/dist/types-ts4.5/media-inline/views/loading-view.d.ts +10 -0
- package/dist/types-ts4.5/media-inline/views/wrapper.d.ts +1 -0
- package/dist/types-ts4.5/messages/media-inline-card.d.ts +12 -0
- package/dist/types-ts4.5/types/floating-toolbar.d.ts +1 -0
- package/package.json +2 -2
|
@@ -1,8 +1,21 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
+
/** @jsx jsx */
|
|
3
|
+
|
|
2
4
|
import { useEffect, useState } from 'react';
|
|
3
|
-
|
|
5
|
+
import { jsx } from '@emotion/react';
|
|
6
|
+
import { createIntl, injectIntl } from 'react-intl-next';
|
|
7
|
+
import { Card } from '@atlaskit/media-card';
|
|
8
|
+
import { messages } from '../messages/media-inline-card';
|
|
9
|
+
import { InlineImageWrapper } from './inline-image-wrapper';
|
|
10
|
+
import { InlineImageCardErrorView } from './views/error-view';
|
|
11
|
+
import { InlineImageCardLoadingView } from './views/loading-view';
|
|
12
|
+
export var MediaInlineImageCardInternal = function MediaInlineImageCardInternal(_ref) {
|
|
4
13
|
var mediaClient = _ref.mediaClient,
|
|
5
|
-
identifier = _ref.identifier
|
|
14
|
+
identifier = _ref.identifier,
|
|
15
|
+
isSelected = _ref.isSelected,
|
|
16
|
+
intl = _ref.intl,
|
|
17
|
+
alt = _ref.alt,
|
|
18
|
+
isLazy = _ref.isLazy;
|
|
6
19
|
var _useState = useState(),
|
|
7
20
|
_useState2 = _slicedToArray(_useState, 2),
|
|
8
21
|
fileState = _useState2[0],
|
|
@@ -11,6 +24,10 @@ export var MediaInlineImageCard = function MediaInlineImageCard(_ref) {
|
|
|
11
24
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
12
25
|
subscribeError = _useState4[0],
|
|
13
26
|
setSubscribeError = _useState4[1];
|
|
27
|
+
var _ref2 = intl || createIntl({
|
|
28
|
+
locale: 'en'
|
|
29
|
+
}),
|
|
30
|
+
formatMessage = _ref2.formatMessage;
|
|
14
31
|
useEffect(function () {
|
|
15
32
|
var subscription = mediaClient.file.getFileState(identifier.id, {
|
|
16
33
|
collectionName: identifier.collectionName
|
|
@@ -27,41 +44,47 @@ export var MediaInlineImageCard = function MediaInlineImageCard(_ref) {
|
|
|
27
44
|
subscription.unsubscribe();
|
|
28
45
|
};
|
|
29
46
|
}, [identifier.collectionName, identifier.id, mediaClient.file]);
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
47
|
+
var content = function content() {
|
|
48
|
+
if (subscribeError) {
|
|
49
|
+
var isUploading = (fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'uploading';
|
|
50
|
+
var errorMessage = isUploading ? messages.failedToUpload : messages.unableToLoadContent;
|
|
51
|
+
return jsx(InlineImageCardErrorView, {
|
|
52
|
+
message: formatMessage(errorMessage)
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
if ((fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'error') {
|
|
56
|
+
return jsx(InlineImageCardErrorView, {
|
|
57
|
+
message: formatMessage(messages.unableToLoadContent)
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
if ((fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'failed-processing') {
|
|
61
|
+
return jsx(InlineImageCardErrorView, {
|
|
62
|
+
message: formatMessage(messages.unableToLoadContent)
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
// Empty file handling
|
|
66
|
+
if (fileState && !fileState.name) {
|
|
67
|
+
return jsx(InlineImageCardErrorView, {
|
|
68
|
+
message: formatMessage(messages.unableToLoadContent)
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
if (!fileState) {
|
|
72
|
+
return jsx(InlineImageCardLoadingView, null);
|
|
73
|
+
}
|
|
74
|
+
return jsx(Card, {
|
|
75
|
+
mediaClientConfig: mediaClient.mediaClientConfig,
|
|
76
|
+
isLazy: isLazy,
|
|
77
|
+
identifier: identifier,
|
|
78
|
+
selectable: true,
|
|
79
|
+
disableOverlay: true,
|
|
80
|
+
selected: isSelected,
|
|
81
|
+
alt: alt
|
|
82
|
+
});
|
|
83
|
+
};
|
|
84
|
+
return jsx(InlineImageWrapper, {
|
|
85
|
+
isSelected: isSelected
|
|
86
|
+
}, content());
|
|
87
|
+
};
|
|
88
|
+
export var MediaInlineImageCard = injectIntl(MediaInlineImageCardInternal, {
|
|
89
|
+
enforceContext: false
|
|
90
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
4
|
+
import WarningIcon from '@atlaskit/icon/glyph/warning';
|
|
5
|
+
import { R300 } from '@atlaskit/theme/colors';
|
|
6
|
+
import Tooltip from '@atlaskit/tooltip';
|
|
7
|
+
import { ICON_SIZE_THRESOLD } from './constants';
|
|
8
|
+
import { Frame } from './frame';
|
|
9
|
+
import { IconWrapper } from './icon-wrapper';
|
|
10
|
+
export var InlineImageCardErrorView = function InlineImageCardErrorView(_ref) {
|
|
11
|
+
var _ref$testId = _ref.testId,
|
|
12
|
+
testId = _ref$testId === void 0 ? 'media-inline-image-card-error-view' : _ref$testId,
|
|
13
|
+
message = _ref.message,
|
|
14
|
+
icon = _ref.icon,
|
|
15
|
+
_ref$height = _ref.height,
|
|
16
|
+
height = _ref$height === void 0 ? ICON_SIZE_THRESOLD : _ref$height;
|
|
17
|
+
return jsx(Frame, {
|
|
18
|
+
testId: testId
|
|
19
|
+
}, jsx(Tooltip, {
|
|
20
|
+
content: message,
|
|
21
|
+
position: "top",
|
|
22
|
+
tag: "span",
|
|
23
|
+
hideTooltipOnClick: true
|
|
24
|
+
}, jsx(IconWrapper, null, icon || jsx(WarningIcon, {
|
|
25
|
+
label: "error",
|
|
26
|
+
size: height > ICON_SIZE_THRESOLD ? 'medium' : 'small',
|
|
27
|
+
primaryColor: "var(--ds-icon-danger, ".concat(R300, ")")
|
|
28
|
+
}))));
|
|
29
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
4
|
+
import { wrapperStyle } from './wrapper';
|
|
5
|
+
export var Frame = function Frame(_ref) {
|
|
6
|
+
var children = _ref.children,
|
|
7
|
+
testId = _ref.testId;
|
|
8
|
+
return jsx("span", {
|
|
9
|
+
css: wrapperStyle,
|
|
10
|
+
"data-testid": testId
|
|
11
|
+
}, children);
|
|
12
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
|
|
3
|
+
import { css, jsx } from '@emotion/react';
|
|
4
|
+
var wrapperStyle = css({
|
|
5
|
+
display: 'flex',
|
|
6
|
+
'span > svg': {
|
|
7
|
+
verticalAlign: 'baseline'
|
|
8
|
+
}
|
|
9
|
+
});
|
|
10
|
+
export var IconWrapper = function IconWrapper(_ref) {
|
|
11
|
+
var children = _ref.children;
|
|
12
|
+
return jsx("span", {
|
|
13
|
+
css: wrapperStyle,
|
|
14
|
+
"data-testid": "media-inline-image-card-icon"
|
|
15
|
+
}, children);
|
|
16
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
4
|
+
import Spinner from '@atlaskit/spinner';
|
|
5
|
+
import { ICON_SIZE_THRESOLD } from './constants';
|
|
6
|
+
import { Frame } from './frame';
|
|
7
|
+
export var InlineImageCardLoadingView = function InlineImageCardLoadingView(_ref) {
|
|
8
|
+
var _ref$testId = _ref.testId,
|
|
9
|
+
testId = _ref$testId === void 0 ? 'media-inline-image-card-loading-view' : _ref$testId,
|
|
10
|
+
_ref$height = _ref.height,
|
|
11
|
+
height = _ref$height === void 0 ? ICON_SIZE_THRESOLD : _ref$height;
|
|
12
|
+
return jsx(Frame, {
|
|
13
|
+
testId: testId
|
|
14
|
+
}, jsx(Spinner, {
|
|
15
|
+
size: height > ICON_SIZE_THRESOLD ? 'medium' : 'small'
|
|
16
|
+
}));
|
|
17
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { css } from '@emotion/react';
|
|
2
|
+
import { N30A, N40A, N900 } from '@atlaskit/theme/colors';
|
|
3
|
+
export var wrapperStyle = css({
|
|
4
|
+
display: 'inline-flex',
|
|
5
|
+
width: '100%',
|
|
6
|
+
height: '100%',
|
|
7
|
+
alignItems: 'center',
|
|
8
|
+
justifyContent: 'center',
|
|
9
|
+
boxDecorationBreak: 'clone',
|
|
10
|
+
borderRadius: "var(--ds-border-radius, 3px)",
|
|
11
|
+
color: "".concat("var(--ds-text, ".concat(N900, ")")),
|
|
12
|
+
backgroundColor: "".concat("var(--ds-background-neutral, ".concat(N30A, ")")),
|
|
13
|
+
transition: '0.1s all ease-in-out',
|
|
14
|
+
cursor: 'pointer',
|
|
15
|
+
'&:hover': {
|
|
16
|
+
backgroundColor: "".concat("var(--ds-background-neutral-hovered, ".concat(N40A, ")"))
|
|
17
|
+
}
|
|
18
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineMessages } from 'react-intl-next';
|
|
2
|
+
export var messages = defineMessages({
|
|
3
|
+
unableToLoadContent: {
|
|
4
|
+
id: 'fabric.editor.unableToLoadContent',
|
|
5
|
+
defaultMessage: "We couldn't load this content",
|
|
6
|
+
description: 'Display this message when there is an error loading file content'
|
|
7
|
+
},
|
|
8
|
+
failedToUpload: {
|
|
9
|
+
id: 'fabric.editor.failed_to_upload',
|
|
10
|
+
defaultMessage: 'Failed to upload',
|
|
11
|
+
description: 'Display this message when there is an error uploading a file'
|
|
12
|
+
}
|
|
13
|
+
});
|
|
@@ -6,7 +6,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
6
6
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7
7
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
8
8
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
9
|
-
var packageVersion = "76.25.
|
|
9
|
+
var packageVersion = "76.25.2";
|
|
10
10
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
11
11
|
// Remove URL as it has UGC
|
|
12
12
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
/** @jsx jsx */
|
|
2
3
|
import React from 'react';
|
|
4
|
+
import { jsx } from '@emotion/react';
|
|
3
5
|
import { ACTION_SUBJECT, ACTION_SUBJECT_ID } from '../analytics';
|
|
4
6
|
import { ErrorBoundary } from '../ui/ErrorBoundary';
|
|
5
7
|
import { analyticsEventKey, getPerformanceOptions, startMeasureReactNodeViewRendered, stopMeasureReactNodeViewRendered, ZERO_WIDTH_SPACE } from '../utils';
|
|
@@ -155,21 +157,21 @@ function getPortalChildren(_ref2) {
|
|
|
155
157
|
// refactor. A test suite to catch any instances of this is ideal however
|
|
156
158
|
// the refactor required is currently out of scope for https://product-fabric.atlassian.net/browse/ED-14176
|
|
157
159
|
|
|
158
|
-
return
|
|
160
|
+
return jsx(ErrorBoundary, {
|
|
159
161
|
component: ACTION_SUBJECT.REACT_NODE_VIEW,
|
|
160
162
|
componentId: (_currentNode$type$nam = currentNode === null || currentNode === void 0 || (_currentNode$type = currentNode.type) === null || _currentNode$type === void 0 ? void 0 : _currentNode$type.name) !== null && _currentNode$type$nam !== void 0 ? _currentNode$type$nam : ACTION_SUBJECT_ID.UNKNOWN_NODE,
|
|
161
163
|
dispatchAnalyticsEvent: dispatchAnalyticsEvent
|
|
162
|
-
},
|
|
164
|
+
}, jsx("span", {
|
|
163
165
|
className: "zeroWidthSpaceContainer"
|
|
164
|
-
},
|
|
166
|
+
}, jsx("span", {
|
|
165
167
|
className: "".concat(inlineNodeViewClassname, "AddZeroWidthSpace")
|
|
166
|
-
}), ZERO_WIDTH_SPACE),
|
|
168
|
+
}), ZERO_WIDTH_SPACE), jsx(Component, _extends({
|
|
167
169
|
view: nodeViewParams.view
|
|
168
170
|
// TODO: ED-13910 - Remove the boolean to fix the prosemirror view type
|
|
169
171
|
,
|
|
170
172
|
getPos: nodeViewParams.getPos,
|
|
171
173
|
node: currentNode
|
|
172
|
-
}, extraComponentProps)),
|
|
174
|
+
}, extraComponentProps)), jsx("span", {
|
|
173
175
|
className: "".concat(inlineNodeViewClassname, "AddZeroWidthSpace")
|
|
174
176
|
}));
|
|
175
177
|
};
|
|
@@ -8,8 +8,9 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
8
8
|
var _templateObject, _templateObject2;
|
|
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 */
|
|
11
12
|
import React from 'react';
|
|
12
|
-
import { css } from '@emotion/react';
|
|
13
|
+
import { css, jsx } from '@emotion/react';
|
|
13
14
|
import { injectIntl } from 'react-intl-next';
|
|
14
15
|
import { N200, N400 } from '@atlaskit/theme/colors';
|
|
15
16
|
import { messages } from './messages';
|
|
@@ -32,12 +33,12 @@ export var CaptionComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
32
33
|
dataAttributes = _this$props.dataAttributes,
|
|
33
34
|
formatMessage = _this$props.intl.formatMessage;
|
|
34
35
|
var showPlaceholder = !selected && !hasContent;
|
|
35
|
-
return
|
|
36
|
+
return jsx("div", _extends({
|
|
36
37
|
"data-media-caption": true,
|
|
37
38
|
"data-testid": "media-caption"
|
|
38
39
|
}, dataAttributes, {
|
|
39
40
|
css: captionWrapperStyle
|
|
40
|
-
}), showPlaceholder ?
|
|
41
|
+
}), showPlaceholder ? jsx("p", {
|
|
41
42
|
css: placeholderStyle
|
|
42
43
|
}, formatMessage(messages.placeholder)) : null, children);
|
|
43
44
|
}
|
|
@@ -9,15 +9,17 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
9
9
|
var _templateObject, _templateObject2, _templateObject3;
|
|
10
10
|
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); }; }
|
|
11
11
|
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; } }
|
|
12
|
+
/** @jsx jsx */
|
|
13
|
+
|
|
12
14
|
import { Component } from 'react';
|
|
13
|
-
import { css } from '@emotion/react';
|
|
15
|
+
import { css, jsx } from '@emotion/react';
|
|
14
16
|
import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
15
17
|
import { DN50, DN600, N0, N50A, N60A, N900 } from '@atlaskit/theme/colors';
|
|
16
18
|
import { themed } from '@atlaskit/theme/components';
|
|
17
19
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
18
20
|
import Layer from '../Layer';
|
|
19
21
|
var packageName = "@atlaskit/editor-common";
|
|
20
|
-
var packageVersion = "76.25.
|
|
22
|
+
var packageVersion = "76.25.2";
|
|
21
23
|
var halfFocusRing = 1;
|
|
22
24
|
var dropOffset = '0, 8';
|
|
23
25
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -125,7 +127,7 @@ var DropList = /*#__PURE__*/function (_Component) {
|
|
|
125
127
|
onPositioned = _this$props.onPositioned,
|
|
126
128
|
testId = _this$props.testId,
|
|
127
129
|
id = _this$props.id;
|
|
128
|
-
var layerContent = isOpen ?
|
|
130
|
+
var layerContent = isOpen ? jsx("div", {
|
|
129
131
|
css: function css(theme) {
|
|
130
132
|
return _this2.menuWrapper({
|
|
131
133
|
theme: theme
|
|
@@ -137,14 +139,14 @@ var DropList = /*#__PURE__*/function (_Component) {
|
|
|
137
139
|
id: id,
|
|
138
140
|
role: "presentation"
|
|
139
141
|
}, children) : null;
|
|
140
|
-
return
|
|
142
|
+
return jsx("div", {
|
|
141
143
|
css: this.wrapperStyles
|
|
142
|
-
},
|
|
144
|
+
}, jsx(Layer, {
|
|
143
145
|
content: layerContent,
|
|
144
146
|
offset: dropOffset,
|
|
145
147
|
position: position,
|
|
146
148
|
onPositioned: onPositioned
|
|
147
|
-
},
|
|
149
|
+
}, jsx("div", {
|
|
148
150
|
css: this.triggerStyles,
|
|
149
151
|
ref: this.handleTriggerRef
|
|
150
152
|
}, trigger)));
|
|
@@ -3,8 +3,10 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
|
|
|
3
3
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
4
4
|
var _excluded = ["children"];
|
|
5
5
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
|
|
6
|
+
/** @jsx jsx */
|
|
7
|
+
|
|
6
8
|
import React, { forwardRef } from 'react';
|
|
7
|
-
import { css } from '@emotion/react';
|
|
9
|
+
import { css, jsx } from '@emotion/react';
|
|
8
10
|
import { defineMessages } from 'react-intl-next';
|
|
9
11
|
import { akEditorLineHeight, akEditorSwoopCubicBezier, akLayoutGutterOffset, relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
10
12
|
import { B300, DN50, DN600, N200, N200A, N300A, N30A, N40A, N50A, N90 } from '@atlaskit/theme/colors';
|
|
@@ -48,7 +50,7 @@ var EXPAND_EXPANDED_BORDER_COLOR = themed({
|
|
|
48
50
|
export var ExpandIconWrapper = function ExpandIconWrapper(_ref) {
|
|
49
51
|
var children = _ref.children,
|
|
50
52
|
expanded = _ref.expanded;
|
|
51
|
-
return
|
|
53
|
+
return jsx("div", {
|
|
52
54
|
css: function css(props) {
|
|
53
55
|
return expanded ? [expandIconWrapperStyle(props), expandIconWrapperExpandedStyle] : expandIconWrapperStyle(props);
|
|
54
56
|
}
|
|
@@ -65,7 +67,7 @@ export var expandLayoutWrapperStyle = css(_templateObject3 || (_templateObject3
|
|
|
65
67
|
export var ExpandLayoutWrapperWithRef = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
66
68
|
var children = props.children,
|
|
67
69
|
rest = _objectWithoutProperties(props, _excluded);
|
|
68
|
-
return
|
|
70
|
+
return jsx("div", _extends({
|
|
69
71
|
css: expandLayoutWrapperStyle
|
|
70
72
|
}, rest, {
|
|
71
73
|
ref: ref
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject;
|
|
3
|
-
|
|
3
|
+
/** @jsx jsx */
|
|
4
|
+
import { css, jsx } from '@emotion/react';
|
|
4
5
|
import { N30 } from '@atlaskit/theme/colors';
|
|
5
6
|
var separator = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background: ", ";\n width: 1px;\n height: 20px;\n margin: 0 ", ";\n align-self: center;\n"])), "var(--ds-border, ".concat(N30, ")"), "var(--ds-space-050, 4px)");
|
|
6
7
|
export default (function () {
|
|
7
|
-
return
|
|
8
|
+
return jsx("div", {
|
|
8
9
|
css: separator,
|
|
9
10
|
className: "separator"
|
|
10
11
|
});
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject;
|
|
3
|
-
|
|
3
|
+
/** @jsx jsx */
|
|
4
|
+
import { css, jsx } from '@emotion/react';
|
|
4
5
|
import EditIcon from '@atlaskit/icon/glyph/edit';
|
|
5
6
|
var editIconStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 20px;\n"])));
|
|
6
7
|
|
|
7
8
|
/* eslint-disable @atlaskit/design-system/consistent-css-prop-usage */
|
|
8
9
|
export var SmallerEditIcon = function SmallerEditIcon() {
|
|
9
|
-
return
|
|
10
|
+
return jsx("div", {
|
|
10
11
|
css: editIconStyles
|
|
11
|
-
},
|
|
12
|
+
}, jsx(EditIcon, {
|
|
12
13
|
label: "edit"
|
|
13
14
|
}));
|
|
14
15
|
};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
+
/** @jsx jsx */
|
|
2
3
|
import React from 'react';
|
|
4
|
+
import { jsx } from '@emotion/react';
|
|
3
5
|
import classnames from 'classnames';
|
|
4
6
|
import { akEditorMediaResizeHandlerPaddingWide, DEFAULT_EMBED_CARD_WIDTH } from '@atlaskit/editor-shared-styles';
|
|
5
7
|
import { MEDIA_SINGLE_GUTTER_SIZE } from '../../media-single/constants';
|
|
@@ -75,7 +77,7 @@ export default function MediaSingle(_ref) {
|
|
|
75
77
|
var _children = _slicedToArray(children, 2),
|
|
76
78
|
media = _children[0],
|
|
77
79
|
caption = _children[1];
|
|
78
|
-
return
|
|
80
|
+
return jsx("div", {
|
|
79
81
|
ref: handleMediaSingleRef,
|
|
80
82
|
css: MediaSingleDimensionHelper({
|
|
81
83
|
width: width,
|
|
@@ -93,7 +95,7 @@ export default function MediaSingle(_ref) {
|
|
|
93
95
|
'is-loading': isLoading,
|
|
94
96
|
'rich-media-wrapped': layout === 'wrap-left' || layout === 'wrap-right'
|
|
95
97
|
})
|
|
96
|
-
},
|
|
98
|
+
}, jsx(MediaWrapper, {
|
|
97
99
|
hasFallbackContainer: hasFallbackContainer,
|
|
98
100
|
height: mediaWrapperHeight,
|
|
99
101
|
paddingBottom: paddingBottom
|
|
@@ -2,8 +2,10 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
|
|
|
2
2
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
3
3
|
var _excluded = ["children"];
|
|
4
4
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
5
|
+
/** @jsx jsx */
|
|
6
|
+
|
|
5
7
|
import React from 'react';
|
|
6
|
-
import { css } from '@emotion/react';
|
|
8
|
+
import { css, jsx } from '@emotion/react';
|
|
7
9
|
import { akEditorFullPageMaxWidth, akEditorFullWidthLayoutWidth } from '@atlaskit/editor-shared-styles';
|
|
8
10
|
import { nonWrappedLayouts } from '../../utils';
|
|
9
11
|
import { calcBreakoutWidth, calcWideWidth } from '../../utils/breakout';
|
|
@@ -130,7 +132,7 @@ export var mediaWrapperStyle = function mediaWrapperStyle(props) {
|
|
|
130
132
|
export var MediaWrapper = function MediaWrapper(_ref3) {
|
|
131
133
|
var children = _ref3.children,
|
|
132
134
|
rest = _objectWithoutProperties(_ref3, _excluded);
|
|
133
|
-
return
|
|
135
|
+
return jsx("div", {
|
|
134
136
|
css: mediaWrapperStyle(rest)
|
|
135
137
|
}, children);
|
|
136
138
|
};
|
|
@@ -145,7 +147,7 @@ MediaWrapper.displayName = 'WrapperMediaSingle';
|
|
|
145
147
|
|
|
146
148
|
export var MediaBorderGapFiller = function MediaBorderGapFiller(_ref4) {
|
|
147
149
|
var borderColor = _ref4.borderColor;
|
|
148
|
-
return
|
|
150
|
+
return jsx("div", {
|
|
149
151
|
style: {
|
|
150
152
|
position: 'absolute',
|
|
151
153
|
inset: '0px',
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
3
|
-
|
|
3
|
+
/** @jsx jsx */
|
|
4
|
+
|
|
5
|
+
import { css, jsx } from '@emotion/react';
|
|
4
6
|
import SuccessIcon from '@atlaskit/icon/glyph/editor/success';
|
|
5
7
|
import ErrorIcon from '@atlaskit/icon/glyph/error';
|
|
6
8
|
import { G400, N200, R400 } from '@atlaskit/theme/colors';
|
|
@@ -13,19 +15,19 @@ var messageStyle = function messageStyle(props) {
|
|
|
13
15
|
var iconWrapperStyle = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n margin-right: ", ";\n"])), "var(--ds-space-050, 4px)");
|
|
14
16
|
export var HelperMessage = function HelperMessage(_ref) {
|
|
15
17
|
var children = _ref.children;
|
|
16
|
-
return
|
|
18
|
+
return jsx("div", {
|
|
17
19
|
css: messageStyle
|
|
18
20
|
}, children);
|
|
19
21
|
};
|
|
20
22
|
export var ErrorMessage = function ErrorMessage(_ref2) {
|
|
21
23
|
var children = _ref2.children;
|
|
22
|
-
return
|
|
24
|
+
return jsx("div", {
|
|
23
25
|
css: function css(theme) {
|
|
24
26
|
return [messageStyle(theme), errorColor];
|
|
25
27
|
}
|
|
26
|
-
},
|
|
28
|
+
}, jsx("span", {
|
|
27
29
|
css: iconWrapperStyle
|
|
28
|
-
},
|
|
30
|
+
}, jsx(ErrorIcon, {
|
|
29
31
|
size: "small",
|
|
30
32
|
label: "error",
|
|
31
33
|
"aria-label": "error"
|
|
@@ -33,13 +35,13 @@ export var ErrorMessage = function ErrorMessage(_ref2) {
|
|
|
33
35
|
};
|
|
34
36
|
export var ValidMessage = function ValidMessage(_ref3) {
|
|
35
37
|
var children = _ref3.children;
|
|
36
|
-
return
|
|
38
|
+
return jsx("div", {
|
|
37
39
|
css: function css(theme) {
|
|
38
40
|
return [messageStyle(theme), validColor];
|
|
39
41
|
}
|
|
40
|
-
},
|
|
42
|
+
}, jsx("span", {
|
|
41
43
|
css: iconWrapperStyle
|
|
42
|
-
},
|
|
44
|
+
}, jsx(SuccessIcon, {
|
|
43
45
|
size: "small",
|
|
44
46
|
label: "success"
|
|
45
47
|
})), children);
|
|
@@ -8,7 +8,10 @@ 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
|
+
|
|
11
13
|
import { PureComponent } from 'react';
|
|
14
|
+
import { jsx } from '@emotion/react';
|
|
12
15
|
import { browser } from '../../utils';
|
|
13
16
|
import { panelTextInput, panelTextInputWithCustomWidth } from './styles';
|
|
14
17
|
var KeyZCode = 90;
|
|
@@ -115,7 +118,7 @@ var PanelTextInput = /*#__PURE__*/function (_PureComponent) {
|
|
|
115
118
|
role = _this$props2.role,
|
|
116
119
|
inputId = _this$props2.inputId;
|
|
117
120
|
var value = this.state.value;
|
|
118
|
-
return
|
|
121
|
+
return jsx("input", {
|
|
119
122
|
css: [panelTextInput, width !== undefined && panelTextInputWithCustomWidth(width)],
|
|
120
123
|
role: role,
|
|
121
124
|
"aria-autocomplete": ariaAutoComplete ? 'list' : undefined,
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject;
|
|
3
|
+
/** @jsx jsx */
|
|
3
4
|
import React, { useCallback, useRef } from 'react';
|
|
4
|
-
import { css } from '@emotion/react';
|
|
5
|
+
import { css, jsx } from '@emotion/react';
|
|
5
6
|
import { injectIntl } from 'react-intl-next';
|
|
6
7
|
import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
7
8
|
import QuestionsIcon from '@atlaskit/icon/glyph/question-circle';
|
|
@@ -27,18 +28,18 @@ var UnsupportedBlockNode = function UnsupportedBlockNode(_ref) {
|
|
|
27
28
|
var tooltipOnShowHandler = useCallback(function () {
|
|
28
29
|
return dispatchAnalyticsEvent && trackUnsupportedContentTooltipDisplayedFor(dispatchAnalyticsEvent, ACTION_SUBJECT_ID.ON_UNSUPPORTED_BLOCK, originalNodeType);
|
|
29
30
|
}, [dispatchAnalyticsEvent, originalNodeType]);
|
|
30
|
-
return
|
|
31
|
+
return jsx("div", {
|
|
31
32
|
css: blockNodeStyle,
|
|
32
33
|
className: "unsupported"
|
|
33
|
-
}, message,
|
|
34
|
+
}, message, jsx(Tooltip, {
|
|
34
35
|
content: tooltipContent,
|
|
35
36
|
hideTooltipOnClick: false,
|
|
36
37
|
position: "bottom",
|
|
37
38
|
onShow: tooltipOnShowHandler,
|
|
38
39
|
strategy: "absolute"
|
|
39
|
-
},
|
|
40
|
+
}, jsx("span", {
|
|
40
41
|
style: style
|
|
41
|
-
},
|
|
42
|
+
}, jsx(QuestionsIcon, {
|
|
42
43
|
label: "?",
|
|
43
44
|
size: "small"
|
|
44
45
|
}))));
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject;
|
|
3
|
+
/** @jsx jsx */
|
|
3
4
|
import React, { useCallback, useRef } from 'react';
|
|
4
|
-
import { css } from '@emotion/react';
|
|
5
|
+
import { css, jsx } from '@emotion/react';
|
|
5
6
|
import { injectIntl } from 'react-intl-next';
|
|
6
7
|
import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
7
8
|
import QuestionsIcon from '@atlaskit/icon/glyph/question-circle';
|
|
@@ -27,17 +28,17 @@ var UnsupportedInlineNode = function UnsupportedInlineNode(_ref) {
|
|
|
27
28
|
var tooltipOnShowHandler = useCallback(function () {
|
|
28
29
|
return dispatchAnalyticsEvent && trackUnsupportedContentTooltipDisplayedFor(dispatchAnalyticsEvent, ACTION_SUBJECT_ID.ON_UNSUPPORTED_INLINE, originalNodeType);
|
|
29
30
|
}, [dispatchAnalyticsEvent, originalNodeType]);
|
|
30
|
-
return
|
|
31
|
+
return jsx("span", {
|
|
31
32
|
css: inlineNodeStyle
|
|
32
|
-
}, message,
|
|
33
|
+
}, message, jsx(Tooltip, {
|
|
33
34
|
content: tooltipContent,
|
|
34
35
|
hideTooltipOnClick: false,
|
|
35
36
|
position: "bottom",
|
|
36
37
|
onShow: tooltipOnShowHandler,
|
|
37
38
|
strategy: "absolute"
|
|
38
|
-
},
|
|
39
|
+
}, jsx("span", {
|
|
39
40
|
style: style
|
|
40
|
-
},
|
|
41
|
+
}, jsx(QuestionsIcon, {
|
|
41
42
|
label: "?",
|
|
42
43
|
size: "small"
|
|
43
44
|
}))));
|