@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,10 +1,28 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
|
|
1
3
|
import { useEffect, useState } from 'react';
|
|
2
|
-
|
|
4
|
+
import { jsx } from '@emotion/react';
|
|
5
|
+
import { createIntl, injectIntl } from 'react-intl-next';
|
|
6
|
+
import { Card } from '@atlaskit/media-card';
|
|
7
|
+
import { messages } from '../messages/media-inline-card';
|
|
8
|
+
import { InlineImageWrapper } from './inline-image-wrapper';
|
|
9
|
+
import { InlineImageCardErrorView } from './views/error-view';
|
|
10
|
+
import { InlineImageCardLoadingView } from './views/loading-view';
|
|
11
|
+
export const MediaInlineImageCardInternal = ({
|
|
3
12
|
mediaClient,
|
|
4
|
-
identifier
|
|
13
|
+
identifier,
|
|
14
|
+
isSelected,
|
|
15
|
+
intl,
|
|
16
|
+
alt,
|
|
17
|
+
isLazy
|
|
5
18
|
}) => {
|
|
6
19
|
const [fileState, setFileState] = useState();
|
|
7
20
|
const [subscribeError, setSubscribeError] = useState();
|
|
21
|
+
const {
|
|
22
|
+
formatMessage
|
|
23
|
+
} = intl || createIntl({
|
|
24
|
+
locale: 'en'
|
|
25
|
+
});
|
|
8
26
|
useEffect(() => {
|
|
9
27
|
const subscription = mediaClient.file.getFileState(identifier.id, {
|
|
10
28
|
collectionName: identifier.collectionName
|
|
@@ -21,41 +39,47 @@ export const MediaInlineImageCard = ({
|
|
|
21
39
|
subscription.unsubscribe();
|
|
22
40
|
};
|
|
23
41
|
}, [identifier.collectionName, identifier.id, mediaClient.file]);
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
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
|
-
|
|
42
|
+
const content = () => {
|
|
43
|
+
if (subscribeError) {
|
|
44
|
+
const isUploading = (fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'uploading';
|
|
45
|
+
const errorMessage = isUploading ? messages.failedToUpload : messages.unableToLoadContent;
|
|
46
|
+
return jsx(InlineImageCardErrorView, {
|
|
47
|
+
message: formatMessage(errorMessage)
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
if ((fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'error') {
|
|
51
|
+
return jsx(InlineImageCardErrorView, {
|
|
52
|
+
message: formatMessage(messages.unableToLoadContent)
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
if ((fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'failed-processing') {
|
|
56
|
+
return jsx(InlineImageCardErrorView, {
|
|
57
|
+
message: formatMessage(messages.unableToLoadContent)
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
// Empty file handling
|
|
61
|
+
if (fileState && !fileState.name) {
|
|
62
|
+
return jsx(InlineImageCardErrorView, {
|
|
63
|
+
message: formatMessage(messages.unableToLoadContent)
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
if (!fileState) {
|
|
67
|
+
return jsx(InlineImageCardLoadingView, null);
|
|
68
|
+
}
|
|
69
|
+
return jsx(Card, {
|
|
70
|
+
mediaClientConfig: mediaClient.mediaClientConfig,
|
|
71
|
+
isLazy: isLazy,
|
|
72
|
+
identifier: identifier,
|
|
73
|
+
selectable: true,
|
|
74
|
+
disableOverlay: true,
|
|
75
|
+
selected: isSelected,
|
|
76
|
+
alt: alt
|
|
77
|
+
});
|
|
78
|
+
};
|
|
79
|
+
return jsx(InlineImageWrapper, {
|
|
80
|
+
isSelected: isSelected
|
|
81
|
+
}, content());
|
|
82
|
+
};
|
|
83
|
+
export const MediaInlineImageCard = injectIntl(MediaInlineImageCardInternal, {
|
|
84
|
+
enforceContext: false
|
|
85
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
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 const InlineImageCardErrorView = ({
|
|
11
|
+
testId = 'media-inline-image-card-error-view',
|
|
12
|
+
message,
|
|
13
|
+
icon,
|
|
14
|
+
height = ICON_SIZE_THRESOLD
|
|
15
|
+
}) => {
|
|
16
|
+
return jsx(Frame, {
|
|
17
|
+
testId: testId
|
|
18
|
+
}, jsx(Tooltip, {
|
|
19
|
+
content: message,
|
|
20
|
+
position: "top",
|
|
21
|
+
tag: "span",
|
|
22
|
+
hideTooltipOnClick: true
|
|
23
|
+
}, jsx(IconWrapper, null, icon || jsx(WarningIcon, {
|
|
24
|
+
label: "error",
|
|
25
|
+
size: height > ICON_SIZE_THRESOLD ? 'medium' : 'small',
|
|
26
|
+
primaryColor: `var(--ds-icon-danger, ${R300})`
|
|
27
|
+
}))));
|
|
28
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
|
|
3
|
+
import { css, jsx } from '@emotion/react';
|
|
4
|
+
const wrapperStyle = css({
|
|
5
|
+
display: 'flex',
|
|
6
|
+
'span > svg': {
|
|
7
|
+
verticalAlign: 'baseline'
|
|
8
|
+
}
|
|
9
|
+
});
|
|
10
|
+
export const IconWrapper = ({
|
|
11
|
+
children
|
|
12
|
+
}) => {
|
|
13
|
+
return jsx("span", {
|
|
14
|
+
css: wrapperStyle,
|
|
15
|
+
"data-testid": "media-inline-image-card-icon"
|
|
16
|
+
}, children);
|
|
17
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
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 const InlineImageCardLoadingView = ({
|
|
8
|
+
testId = 'media-inline-image-card-loading-view',
|
|
9
|
+
height = ICON_SIZE_THRESOLD
|
|
10
|
+
}) => {
|
|
11
|
+
return jsx(Frame, {
|
|
12
|
+
testId: testId
|
|
13
|
+
}, jsx(Spinner, {
|
|
14
|
+
size: height > ICON_SIZE_THRESOLD ? 'medium' : 'small'
|
|
15
|
+
}));
|
|
16
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { css } from '@emotion/react';
|
|
2
|
+
import { N30A, N40A, N900 } from '@atlaskit/theme/colors';
|
|
3
|
+
export const 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: `${`var(--ds-text, ${N900})`}`,
|
|
12
|
+
backgroundColor: `${`var(--ds-background-neutral, ${N30A})`}`,
|
|
13
|
+
transition: '0.1s all ease-in-out',
|
|
14
|
+
cursor: 'pointer',
|
|
15
|
+
'&:hover': {
|
|
16
|
+
backgroundColor: `${`var(--ds-background-neutral-hovered, ${N40A})`}`
|
|
17
|
+
}
|
|
18
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineMessages } from 'react-intl-next';
|
|
2
|
+
export const 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
|
+
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
2
2
|
const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
3
|
-
const packageVersion = "76.25.
|
|
3
|
+
const packageVersion = "76.25.2";
|
|
4
4
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
5
5
|
// Remove URL as it has UGC
|
|
6
6
|
// 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';
|
|
@@ -158,21 +160,21 @@ function getPortalChildren({
|
|
|
158
160
|
// refactor. A test suite to catch any instances of this is ideal however
|
|
159
161
|
// the refactor required is currently out of scope for https://product-fabric.atlassian.net/browse/ED-14176
|
|
160
162
|
|
|
161
|
-
return
|
|
163
|
+
return jsx(ErrorBoundary, {
|
|
162
164
|
component: ACTION_SUBJECT.REACT_NODE_VIEW,
|
|
163
165
|
componentId: (_currentNode$type$nam = currentNode === null || currentNode === void 0 ? 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,
|
|
164
166
|
dispatchAnalyticsEvent: dispatchAnalyticsEvent
|
|
165
|
-
},
|
|
167
|
+
}, jsx("span", {
|
|
166
168
|
className: `zeroWidthSpaceContainer`
|
|
167
|
-
},
|
|
169
|
+
}, jsx("span", {
|
|
168
170
|
className: `${inlineNodeViewClassname}AddZeroWidthSpace`
|
|
169
|
-
}), ZERO_WIDTH_SPACE),
|
|
171
|
+
}), ZERO_WIDTH_SPACE), jsx(Component, _extends({
|
|
170
172
|
view: nodeViewParams.view
|
|
171
173
|
// TODO: ED-13910 - Remove the boolean to fix the prosemirror view type
|
|
172
174
|
,
|
|
173
175
|
getPos: nodeViewParams.getPos,
|
|
174
176
|
node: currentNode
|
|
175
|
-
}, extraComponentProps)),
|
|
177
|
+
}, extraComponentProps)), jsx("span", {
|
|
176
178
|
className: `${inlineNodeViewClassname}AddZeroWidthSpace`
|
|
177
179
|
}));
|
|
178
180
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
/** @jsx jsx */
|
|
2
3
|
import React from 'react';
|
|
3
|
-
import { css } from '@emotion/react';
|
|
4
|
+
import { css, jsx } from '@emotion/react';
|
|
4
5
|
import { injectIntl } from 'react-intl-next';
|
|
5
6
|
import { N200, N400 } from '@atlaskit/theme/colors';
|
|
6
7
|
import { messages } from './messages';
|
|
@@ -28,12 +29,12 @@ export class CaptionComponent extends React.Component {
|
|
|
28
29
|
}
|
|
29
30
|
} = this.props;
|
|
30
31
|
const showPlaceholder = !selected && !hasContent;
|
|
31
|
-
return
|
|
32
|
+
return jsx("div", _extends({
|
|
32
33
|
"data-media-caption": true,
|
|
33
34
|
"data-testid": "media-caption"
|
|
34
35
|
}, dataAttributes, {
|
|
35
36
|
css: captionWrapperStyle
|
|
36
|
-
}), showPlaceholder ?
|
|
37
|
+
}), showPlaceholder ? jsx("p", {
|
|
37
38
|
css: placeholderStyle
|
|
38
39
|
}, formatMessage(messages.placeholder)) : null, children);
|
|
39
40
|
}
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
/** @jsx jsx */
|
|
3
|
+
|
|
2
4
|
import { Component } from 'react';
|
|
3
|
-
import { css } from '@emotion/react';
|
|
5
|
+
import { css, jsx } from '@emotion/react';
|
|
4
6
|
import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
5
7
|
import { DN50, DN600, N0, N50A, N60A, N900 } from '@atlaskit/theme/colors';
|
|
6
8
|
import { themed } from '@atlaskit/theme/components';
|
|
7
9
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
8
10
|
import Layer from '../Layer';
|
|
9
11
|
const packageName = "@atlaskit/editor-common";
|
|
10
|
-
const packageVersion = "76.25.
|
|
12
|
+
const packageVersion = "76.25.2";
|
|
11
13
|
const halfFocusRing = 1;
|
|
12
14
|
const dropOffset = '0, 8';
|
|
13
15
|
class DropList extends Component {
|
|
@@ -125,7 +127,7 @@ class DropList extends Component {
|
|
|
125
127
|
testId,
|
|
126
128
|
id
|
|
127
129
|
} = this.props;
|
|
128
|
-
let layerContent = isOpen ?
|
|
130
|
+
let layerContent = isOpen ? jsx("div", {
|
|
129
131
|
css: theme => this.menuWrapper({
|
|
130
132
|
theme: theme
|
|
131
133
|
}),
|
|
@@ -135,14 +137,14 @@ class DropList extends Component {
|
|
|
135
137
|
id: id,
|
|
136
138
|
role: "presentation"
|
|
137
139
|
}, children) : null;
|
|
138
|
-
return
|
|
140
|
+
return jsx("div", {
|
|
139
141
|
css: this.wrapperStyles
|
|
140
|
-
},
|
|
142
|
+
}, jsx(Layer, {
|
|
141
143
|
content: layerContent,
|
|
142
144
|
offset: dropOffset,
|
|
143
145
|
position: position,
|
|
144
146
|
onPositioned: onPositioned
|
|
145
|
-
},
|
|
147
|
+
}, jsx("div", {
|
|
146
148
|
css: this.triggerStyles,
|
|
147
149
|
ref: this.handleTriggerRef
|
|
148
150
|
}, trigger)));
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
/** @jsx jsx */
|
|
3
|
+
|
|
2
4
|
import React, { forwardRef } from 'react';
|
|
3
|
-
import { css } from '@emotion/react';
|
|
5
|
+
import { css, jsx } from '@emotion/react';
|
|
4
6
|
import { defineMessages } from 'react-intl-next';
|
|
5
7
|
import { akEditorLineHeight, akEditorSwoopCubicBezier, akLayoutGutterOffset, relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
6
8
|
import { B300, DN50, DN600, N200, N200A, N300A, N30A, N40A, N50A, N90 } from '@atlaskit/theme/colors';
|
|
@@ -45,7 +47,7 @@ export const ExpandIconWrapper = ({
|
|
|
45
47
|
children,
|
|
46
48
|
expanded
|
|
47
49
|
}) => {
|
|
48
|
-
return
|
|
50
|
+
return jsx("div", {
|
|
49
51
|
css: props => expanded ? [expandIconWrapperStyle(props), expandIconWrapperExpandedStyle] : expandIconWrapperStyle(props)
|
|
50
52
|
}, children);
|
|
51
53
|
};
|
|
@@ -82,7 +84,7 @@ export const ExpandLayoutWrapperWithRef = /*#__PURE__*/forwardRef((props, ref) =
|
|
|
82
84
|
children,
|
|
83
85
|
...rest
|
|
84
86
|
} = props;
|
|
85
|
-
return
|
|
87
|
+
return jsx("div", _extends({
|
|
86
88
|
css: expandLayoutWrapperStyle
|
|
87
89
|
}, rest, {
|
|
88
90
|
ref: ref
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { css, jsx } from '@emotion/react';
|
|
2
3
|
import { N30 } from '@atlaskit/theme/colors';
|
|
3
4
|
const separator = css`
|
|
4
5
|
background: ${`var(--ds-border, ${N30})`};
|
|
@@ -7,7 +8,7 @@ const separator = css`
|
|
|
7
8
|
margin: 0 ${"var(--ds-space-050, 4px)"};
|
|
8
9
|
align-self: center;
|
|
9
10
|
`;
|
|
10
|
-
export default (() =>
|
|
11
|
+
export default (() => jsx("div", {
|
|
11
12
|
css: separator,
|
|
12
13
|
className: "separator"
|
|
13
14
|
}));
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { css, jsx } from '@emotion/react';
|
|
2
3
|
import EditIcon from '@atlaskit/icon/glyph/edit';
|
|
3
4
|
const editIconStyles = css`
|
|
4
5
|
width: 20px;
|
|
@@ -6,9 +7,9 @@ const editIconStyles = css`
|
|
|
6
7
|
|
|
7
8
|
/* eslint-disable @atlaskit/design-system/consistent-css-prop-usage */
|
|
8
9
|
export const SmallerEditIcon = () => {
|
|
9
|
-
return
|
|
10
|
+
return jsx("div", {
|
|
10
11
|
css: editIconStyles
|
|
11
|
-
},
|
|
12
|
+
}, jsx(EditIcon, {
|
|
12
13
|
label: "edit"
|
|
13
14
|
}));
|
|
14
15
|
};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
1
2
|
import React from 'react';
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
2
4
|
import classnames from 'classnames';
|
|
3
5
|
import { akEditorMediaResizeHandlerPaddingWide, DEFAULT_EMBED_CARD_WIDTH } from '@atlaskit/editor-shared-styles';
|
|
4
6
|
import { MEDIA_SINGLE_GUTTER_SIZE } from '../../media-single/constants';
|
|
@@ -69,7 +71,7 @@ export default function MediaSingle({
|
|
|
69
71
|
}
|
|
70
72
|
}
|
|
71
73
|
const [media, caption] = children;
|
|
72
|
-
return
|
|
74
|
+
return jsx("div", {
|
|
73
75
|
ref: handleMediaSingleRef,
|
|
74
76
|
css: MediaSingleDimensionHelper({
|
|
75
77
|
width,
|
|
@@ -87,7 +89,7 @@ export default function MediaSingle({
|
|
|
87
89
|
'is-loading': isLoading,
|
|
88
90
|
'rich-media-wrapped': layout === 'wrap-left' || layout === 'wrap-right'
|
|
89
91
|
})
|
|
90
|
-
},
|
|
92
|
+
}, jsx(MediaWrapper, {
|
|
91
93
|
hasFallbackContainer: hasFallbackContainer,
|
|
92
94
|
height: mediaWrapperHeight,
|
|
93
95
|
paddingBottom: paddingBottom
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
|
|
1
3
|
import React from 'react';
|
|
2
|
-
import { css } from '@emotion/react';
|
|
4
|
+
import { css, jsx } from '@emotion/react';
|
|
3
5
|
import { akEditorFullPageMaxWidth, akEditorFullWidthLayoutWidth } from '@atlaskit/editor-shared-styles';
|
|
4
6
|
import { nonWrappedLayouts } from '../../utils';
|
|
5
7
|
import { calcBreakoutWidth, calcWideWidth } from '../../utils/breakout';
|
|
@@ -198,7 +200,7 @@ export const mediaWrapperStyle = props => css`
|
|
|
198
200
|
export const MediaWrapper = ({
|
|
199
201
|
children,
|
|
200
202
|
...rest
|
|
201
|
-
}) =>
|
|
203
|
+
}) => jsx("div", {
|
|
202
204
|
css: mediaWrapperStyle(rest)
|
|
203
205
|
}, children);
|
|
204
206
|
MediaWrapper.displayName = 'WrapperMediaSingle';
|
|
@@ -213,7 +215,7 @@ MediaWrapper.displayName = 'WrapperMediaSingle';
|
|
|
213
215
|
export const MediaBorderGapFiller = ({
|
|
214
216
|
borderColor
|
|
215
217
|
}) => {
|
|
216
|
-
return
|
|
218
|
+
return jsx("div", {
|
|
217
219
|
style: {
|
|
218
220
|
position: 'absolute',
|
|
219
221
|
inset: '0px',
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
|
|
3
|
+
import { css, jsx } from '@emotion/react';
|
|
2
4
|
import SuccessIcon from '@atlaskit/icon/glyph/editor/success';
|
|
3
5
|
import ErrorIcon from '@atlaskit/icon/glyph/error';
|
|
4
6
|
import { G400, N200, R400 } from '@atlaskit/theme/colors';
|
|
@@ -22,31 +24,31 @@ const iconWrapperStyle = css`
|
|
|
22
24
|
`;
|
|
23
25
|
export const HelperMessage = ({
|
|
24
26
|
children
|
|
25
|
-
}) =>
|
|
27
|
+
}) => jsx("div", {
|
|
26
28
|
css: messageStyle
|
|
27
29
|
}, children);
|
|
28
30
|
export const ErrorMessage = ({
|
|
29
31
|
children
|
|
30
|
-
}) =>
|
|
32
|
+
}) => jsx("div", {
|
|
31
33
|
css: theme => {
|
|
32
34
|
return [messageStyle(theme), errorColor];
|
|
33
35
|
}
|
|
34
|
-
},
|
|
36
|
+
}, jsx("span", {
|
|
35
37
|
css: iconWrapperStyle
|
|
36
|
-
},
|
|
38
|
+
}, jsx(ErrorIcon, {
|
|
37
39
|
size: "small",
|
|
38
40
|
label: "error",
|
|
39
41
|
"aria-label": "error"
|
|
40
42
|
})), children);
|
|
41
43
|
export const ValidMessage = ({
|
|
42
44
|
children
|
|
43
|
-
}) =>
|
|
45
|
+
}) => jsx("div", {
|
|
44
46
|
css: theme => {
|
|
45
47
|
return [messageStyle(theme), validColor];
|
|
46
48
|
}
|
|
47
|
-
},
|
|
49
|
+
}, jsx("span", {
|
|
48
50
|
css: iconWrapperStyle
|
|
49
|
-
},
|
|
51
|
+
}, jsx(SuccessIcon, {
|
|
50
52
|
size: "small",
|
|
51
53
|
label: "success"
|
|
52
54
|
})), children);
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
/** @jsx jsx */
|
|
3
|
+
|
|
2
4
|
import { PureComponent } from 'react';
|
|
5
|
+
import { jsx } from '@emotion/react';
|
|
3
6
|
import { browser } from '../../utils';
|
|
4
7
|
import { panelTextInput, panelTextInputWithCustomWidth } from './styles';
|
|
5
8
|
const KeyZCode = 90;
|
|
@@ -103,7 +106,7 @@ export default class PanelTextInput extends PureComponent {
|
|
|
103
106
|
const {
|
|
104
107
|
value
|
|
105
108
|
} = this.state;
|
|
106
|
-
return
|
|
109
|
+
return jsx("input", {
|
|
107
110
|
css: [panelTextInput, width !== undefined && panelTextInputWithCustomWidth(width)],
|
|
108
111
|
role: role,
|
|
109
112
|
"aria-autocomplete": ariaAutoComplete ? 'list' : undefined,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
1
2
|
import React, { useCallback, useRef } from 'react';
|
|
2
|
-
import { css } from '@emotion/react';
|
|
3
|
+
import { css, jsx } from '@emotion/react';
|
|
3
4
|
import { injectIntl } from 'react-intl-next';
|
|
4
5
|
import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
5
6
|
import QuestionsIcon from '@atlaskit/icon/glyph/question-circle';
|
|
@@ -41,18 +42,18 @@ const UnsupportedBlockNode = ({
|
|
|
41
42
|
});
|
|
42
43
|
const originalNodeType = node === null || node === void 0 ? void 0 : node.attrs.originalValue.type;
|
|
43
44
|
const tooltipOnShowHandler = useCallback(() => dispatchAnalyticsEvent && trackUnsupportedContentTooltipDisplayedFor(dispatchAnalyticsEvent, ACTION_SUBJECT_ID.ON_UNSUPPORTED_BLOCK, originalNodeType), [dispatchAnalyticsEvent, originalNodeType]);
|
|
44
|
-
return
|
|
45
|
+
return jsx("div", {
|
|
45
46
|
css: blockNodeStyle,
|
|
46
47
|
className: "unsupported"
|
|
47
|
-
}, message,
|
|
48
|
+
}, message, jsx(Tooltip, {
|
|
48
49
|
content: tooltipContent,
|
|
49
50
|
hideTooltipOnClick: false,
|
|
50
51
|
position: "bottom",
|
|
51
52
|
onShow: tooltipOnShowHandler,
|
|
52
53
|
strategy: "absolute"
|
|
53
|
-
},
|
|
54
|
+
}, jsx("span", {
|
|
54
55
|
style: style
|
|
55
|
-
},
|
|
56
|
+
}, jsx(QuestionsIcon, {
|
|
56
57
|
label: "?",
|
|
57
58
|
size: "small"
|
|
58
59
|
}))));
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
1
2
|
import React, { useCallback, useRef } from 'react';
|
|
2
|
-
import { css } from '@emotion/react';
|
|
3
|
+
import { css, jsx } from '@emotion/react';
|
|
3
4
|
import { injectIntl } from 'react-intl-next';
|
|
4
5
|
import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
5
6
|
import QuestionsIcon from '@atlaskit/icon/glyph/question-circle';
|
|
@@ -39,17 +40,17 @@ const UnsupportedInlineNode = ({
|
|
|
39
40
|
});
|
|
40
41
|
const originalNodeType = node === null || node === void 0 ? void 0 : node.attrs.originalValue.type;
|
|
41
42
|
const tooltipOnShowHandler = useCallback(() => dispatchAnalyticsEvent && trackUnsupportedContentTooltipDisplayedFor(dispatchAnalyticsEvent, ACTION_SUBJECT_ID.ON_UNSUPPORTED_INLINE, originalNodeType), [dispatchAnalyticsEvent, originalNodeType]);
|
|
42
|
-
return
|
|
43
|
+
return jsx("span", {
|
|
43
44
|
css: inlineNodeStyle
|
|
44
|
-
}, message,
|
|
45
|
+
}, message, jsx(Tooltip, {
|
|
45
46
|
content: tooltipContent,
|
|
46
47
|
hideTooltipOnClick: false,
|
|
47
48
|
position: "bottom",
|
|
48
49
|
onShow: tooltipOnShowHandler,
|
|
49
50
|
strategy: "absolute"
|
|
50
|
-
},
|
|
51
|
+
}, jsx("span", {
|
|
51
52
|
style: style
|
|
52
|
-
},
|
|
53
|
+
}, jsx(QuestionsIcon, {
|
|
53
54
|
label: "?",
|
|
54
55
|
size: "small"
|
|
55
56
|
}))));
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
/** @jsx jsx */
|
|
2
3
|
import React from 'react';
|
|
3
|
-
import { css } from '@emotion/react';
|
|
4
|
+
import { css, jsx } from '@emotion/react';
|
|
4
5
|
import rafSchedule from 'raf-schd';
|
|
5
6
|
import { WidthObserver } from '@atlaskit/width-detector';
|
|
6
7
|
const SCROLLBAR_WIDTH = 30;
|
|
@@ -45,16 +46,16 @@ export class WidthProvider extends React.Component {
|
|
|
45
46
|
}
|
|
46
47
|
}
|
|
47
48
|
render() {
|
|
48
|
-
return
|
|
49
|
+
return jsx("div", {
|
|
49
50
|
css: css`
|
|
50
51
|
position: relative;
|
|
51
52
|
width: 100%;
|
|
52
53
|
`,
|
|
53
54
|
className: this.props.className
|
|
54
|
-
},
|
|
55
|
+
}, jsx(WidthObserver, {
|
|
55
56
|
setWidth: this.setWidth,
|
|
56
57
|
offscreen: true
|
|
57
|
-
}),
|
|
58
|
+
}), jsx(Provider, {
|
|
58
59
|
value: createWidthContext(this.state.width)
|
|
59
60
|
}, this.props.children));
|
|
60
61
|
}
|