@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,5 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
/** @jsx jsx */
|
|
2
3
|
import React, { PureComponent } from 'react';
|
|
4
|
+
import { jsx } from '@emotion/react';
|
|
3
5
|
import EditorDoneIcon from '@atlaskit/icon/glyph/editor/done';
|
|
4
6
|
import { N0 } from '@atlaskit/theme/colors';
|
|
5
7
|
import Tooltip from '@atlaskit/tooltip';
|
|
@@ -39,11 +41,11 @@ class Color extends PureComponent {
|
|
|
39
41
|
hexToPaletteColor
|
|
40
42
|
} = this.props;
|
|
41
43
|
const colorStyle = hexToPaletteColor ? hexToPaletteColor(value) : value;
|
|
42
|
-
return
|
|
44
|
+
return jsx(Tooltip, {
|
|
43
45
|
content: label
|
|
44
|
-
},
|
|
46
|
+
}, jsx("span", {
|
|
45
47
|
css: buttonWrapperStyle
|
|
46
|
-
},
|
|
48
|
+
}, jsx("button", {
|
|
47
49
|
css: buttonStyle,
|
|
48
50
|
"aria-label": label,
|
|
49
51
|
role: "radio",
|
|
@@ -57,7 +59,7 @@ class Color extends PureComponent {
|
|
|
57
59
|
border: `1px solid ${borderColor}`
|
|
58
60
|
},
|
|
59
61
|
autoFocus: autoFocus
|
|
60
|
-
}, isSelected &&
|
|
62
|
+
}, isSelected && jsx(EditorDoneIcon, {
|
|
61
63
|
primaryColor: checkMarkColor,
|
|
62
64
|
label: ""
|
|
63
65
|
}))));
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
1
2
|
import React from 'react';
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
2
4
|
import chromatism from 'chromatism';
|
|
3
5
|
import { injectIntl } from 'react-intl-next';
|
|
4
6
|
import { N0, N500 } from '@atlaskit/theme/colors';
|
|
@@ -54,7 +56,7 @@ const ColorPalette = props => {
|
|
|
54
56
|
const colorsPerRow = React.useMemo(() => {
|
|
55
57
|
return getColorsPerRowFromPalette(palette, cols);
|
|
56
58
|
}, [palette, cols]);
|
|
57
|
-
return
|
|
59
|
+
return jsx(React.Fragment, null, colorsPerRow.map(row => jsx("div", {
|
|
58
60
|
css: colorPaletteWrapper,
|
|
59
61
|
className: className,
|
|
60
62
|
key: `row-first-color-${row[0].value}`,
|
|
@@ -73,7 +75,7 @@ const ColorPalette = props => {
|
|
|
73
75
|
message = getColorMessage(paletteColorTooltipMessages.light, value.toUpperCase());
|
|
74
76
|
}
|
|
75
77
|
}
|
|
76
|
-
return
|
|
78
|
+
return jsx(Color, {
|
|
77
79
|
key: value,
|
|
78
80
|
value: value,
|
|
79
81
|
borderColor: border,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
1
2
|
import React from 'react';
|
|
2
|
-
import { css } from '@emotion/react';
|
|
3
|
+
import { css, jsx } from '@emotion/react';
|
|
3
4
|
import { withAnalyticsContext, withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
4
5
|
import Button from '@atlaskit/button';
|
|
5
6
|
import ExpandIcon from '@atlaskit/icon/glyph/chevron-down';
|
|
@@ -112,7 +113,7 @@ const ColorPickerButton = props => {
|
|
|
112
113
|
selectedRowIndex,
|
|
113
114
|
selectedColumnIndex
|
|
114
115
|
} = getSelectedRowAndColumnFromPalette(props.colorPalette, selectedColor, props.cols);
|
|
115
|
-
return
|
|
116
|
+
return jsx(Popup, {
|
|
116
117
|
target: buttonRef.current,
|
|
117
118
|
fitHeight: 350,
|
|
118
119
|
fitWidth: 350,
|
|
@@ -126,10 +127,10 @@ const ColorPickerButton = props => {
|
|
|
126
127
|
zIndex: props.setDisableParentScroll ? 600 : undefined,
|
|
127
128
|
ariaLabel: "Color picker popup",
|
|
128
129
|
onPositionCalculated: onPositionCalculated
|
|
129
|
-
},
|
|
130
|
+
}, jsx("div", {
|
|
130
131
|
css: colorPickerWrapper,
|
|
131
132
|
"data-test-id": "color-picker-menu"
|
|
132
|
-
},
|
|
133
|
+
}, jsx(ArrowKeyNavigationProvider, {
|
|
133
134
|
type: ArrowKeyNavigationType.COLOR,
|
|
134
135
|
selectedRowIndex: selectedRowIndex,
|
|
135
136
|
selectedColumnIndex: selectedColumnIndex,
|
|
@@ -137,7 +138,7 @@ const ColorPickerButton = props => {
|
|
|
137
138
|
handleClose: () => setIsPopupOpen(false),
|
|
138
139
|
isOpenedByKeyboard: isOpenedByKeyboard,
|
|
139
140
|
isPopupPositioned: isPopupPositioned
|
|
140
|
-
},
|
|
141
|
+
}, jsx(ColorPaletteWithListeners, {
|
|
141
142
|
cols: props.cols,
|
|
142
143
|
selectedColor: selectedColor,
|
|
143
144
|
onClick: onColorSelected,
|
|
@@ -181,12 +182,12 @@ const ColorPickerButton = props => {
|
|
|
181
182
|
}
|
|
182
183
|
`;
|
|
183
184
|
};
|
|
184
|
-
return
|
|
185
|
+
return jsx("div", {
|
|
185
186
|
css: colorPickerButtonWrapper
|
|
186
|
-
},
|
|
187
|
+
}, jsx(Tooltip, {
|
|
187
188
|
content: title,
|
|
188
189
|
position: "top"
|
|
189
|
-
},
|
|
190
|
+
}, jsx(Button, {
|
|
190
191
|
ref: buttonRef,
|
|
191
192
|
"aria-label": title,
|
|
192
193
|
spacing: "compact",
|
|
@@ -199,9 +200,9 @@ const ColorPickerButton = props => {
|
|
|
199
200
|
}
|
|
200
201
|
},
|
|
201
202
|
css: buttonStyle,
|
|
202
|
-
iconAfter:
|
|
203
|
+
iconAfter: jsx("span", {
|
|
203
204
|
css: colorPickerExpandContainer
|
|
204
|
-
},
|
|
205
|
+
}, jsx(ExpandIcon, {
|
|
205
206
|
label: ""
|
|
206
207
|
}))
|
|
207
208
|
})), renderPopup());
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
/** @jsx jsx */
|
|
2
3
|
import React, { useContext } from 'react';
|
|
4
|
+
import { jsx } from '@emotion/react';
|
|
3
5
|
import { ArrowKeyNavigationType } from '../ArrowKeyNavigationProvider/types';
|
|
4
6
|
import DropdownComponent from '../Dropdown';
|
|
5
7
|
import { KeyDownHandlerContext } from '../ToolbarArrowKeyNavigationProvider';
|
|
@@ -14,10 +16,9 @@ export const DropdownContainer = /*#__PURE__*/React.memo(function DropdownContai
|
|
|
14
16
|
};
|
|
15
17
|
}
|
|
16
18
|
return (
|
|
17
|
-
/*#__PURE__*/
|
|
18
19
|
//This context is to handle the tab, Arrow Right/Left key events for dropdown.
|
|
19
20
|
//Default context has the void callbacks for above key events
|
|
20
|
-
|
|
21
|
+
jsx(DropdownComponent, _extends({}, props, {
|
|
21
22
|
arrowKeyNavigationProviderOptions: newArrowKeyNavigationProviderOptions
|
|
22
23
|
}))
|
|
23
24
|
);
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
|
+
/** @jsx jsx */
|
|
4
|
+
|
|
3
5
|
import React, { PureComponent, useContext } from 'react';
|
|
4
|
-
import { css } from '@emotion/react';
|
|
6
|
+
import { css, jsx } from '@emotion/react';
|
|
5
7
|
import { akEditorFloatingPanelZIndex } from '@atlaskit/editor-shared-styles';
|
|
6
8
|
import { CustomItem, MenuGroup, Section } from '@atlaskit/menu';
|
|
7
9
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
@@ -166,7 +168,7 @@ export default class DropdownMenuWrapper extends PureComponent {
|
|
|
166
168
|
}
|
|
167
169
|
}
|
|
168
170
|
};
|
|
169
|
-
return
|
|
171
|
+
return jsx(Popup, {
|
|
170
172
|
target: isOpen ? target : undefined,
|
|
171
173
|
mountTo: mountTo,
|
|
172
174
|
boundariesElement: boundariesElement,
|
|
@@ -176,10 +178,10 @@ export default class DropdownMenuWrapper extends PureComponent {
|
|
|
176
178
|
fitWidth: fitWidth,
|
|
177
179
|
zIndex: zIndex || akEditorFloatingPanelZIndex,
|
|
178
180
|
offset: offset
|
|
179
|
-
},
|
|
181
|
+
}, jsx(ArrowKeyNavigationProvider, _extends({}, navigationProviderProps, {
|
|
180
182
|
handleClose: this.handleCloseAndFocus,
|
|
181
183
|
closeOnTab: true
|
|
182
|
-
}),
|
|
184
|
+
}), jsx(DropListWithOutsideListeners, {
|
|
183
185
|
isOpen: true,
|
|
184
186
|
appearance: "tall",
|
|
185
187
|
position: popupPlacement.join(' '),
|
|
@@ -193,22 +195,22 @@ export default class DropdownMenuWrapper extends PureComponent {
|
|
|
193
195
|
e.stopPropagation();
|
|
194
196
|
},
|
|
195
197
|
targetRef: this.state.target
|
|
196
|
-
},
|
|
198
|
+
}, jsx("div", {
|
|
197
199
|
style: {
|
|
198
200
|
height: 0,
|
|
199
201
|
minWidth: fitWidth || 0
|
|
200
202
|
}
|
|
201
|
-
}),
|
|
203
|
+
}), jsx("div", {
|
|
202
204
|
ref: this.popupRef
|
|
203
|
-
}, getBooleanFF('platform.editor.menu.group-items') &&
|
|
205
|
+
}, getBooleanFF('platform.editor.menu.group-items') && jsx(MenuGroup, {
|
|
204
206
|
role: shouldUseDefaultRole ? 'group' : 'menu'
|
|
205
|
-
}, items.map((group, index) =>
|
|
207
|
+
}, items.map((group, index) => jsx(Section, {
|
|
206
208
|
hasSeparator: (section === null || section === void 0 ? void 0 : section.hasSeparator) && index > 0,
|
|
207
209
|
title: section === null || section === void 0 ? void 0 : section.title,
|
|
208
210
|
key: index
|
|
209
211
|
}, group.items.map(item => {
|
|
210
212
|
var _item$key;
|
|
211
|
-
return
|
|
213
|
+
return jsx(DropdownMenuItem, {
|
|
212
214
|
key: (_item$key = item.key) !== null && _item$key !== void 0 ? _item$key : String(item.content),
|
|
213
215
|
item: item,
|
|
214
216
|
onItemActivated: this.props.onItemActivated,
|
|
@@ -216,12 +218,12 @@ export default class DropdownMenuWrapper extends PureComponent {
|
|
|
216
218
|
onMouseEnter: this.props.onMouseEnter,
|
|
217
219
|
onMouseLeave: this.props.onMouseLeave
|
|
218
220
|
});
|
|
219
|
-
})))), !getBooleanFF('platform.editor.menu.group-items') && items.map((group, index) =>
|
|
221
|
+
})))), !getBooleanFF('platform.editor.menu.group-items') && items.map((group, index) => jsx(MenuGroup, {
|
|
220
222
|
key: index,
|
|
221
223
|
role: shouldUseDefaultRole ? 'group' : 'menu'
|
|
222
224
|
}, group.items.map(item => {
|
|
223
225
|
var _item$key2;
|
|
224
|
-
return
|
|
226
|
+
return jsx(DropdownMenuItem, {
|
|
225
227
|
key: (_item$key2 = item.key) !== null && _item$key2 !== void 0 ? _item$key2 : String(item.content),
|
|
226
228
|
item: item,
|
|
227
229
|
onItemActivated: this.props.onItemActivated,
|
|
@@ -236,9 +238,9 @@ export default class DropdownMenuWrapper extends PureComponent {
|
|
|
236
238
|
children,
|
|
237
239
|
isOpen
|
|
238
240
|
} = this.props;
|
|
239
|
-
return
|
|
241
|
+
return jsx("div", {
|
|
240
242
|
css: wrapper
|
|
241
|
-
},
|
|
243
|
+
}, jsx("div", {
|
|
242
244
|
ref: this.handleRef
|
|
243
245
|
}, children), isOpen ? this.renderDropdownMenu() : null);
|
|
244
246
|
}
|
|
@@ -261,7 +263,7 @@ const DropdownMenuItemCustomComponent = /*#__PURE__*/React.forwardRef((props, re
|
|
|
261
263
|
children,
|
|
262
264
|
...rest
|
|
263
265
|
} = props;
|
|
264
|
-
return
|
|
266
|
+
return jsx("span", _extends({
|
|
265
267
|
ref: ref
|
|
266
268
|
}, rest, {
|
|
267
269
|
style: {
|
|
@@ -288,21 +290,21 @@ function DropdownMenuItem({
|
|
|
288
290
|
// onClick and value.name are the action indicators in the handlers
|
|
289
291
|
// If neither are present, don't wrap in an Item.
|
|
290
292
|
if (!item.onClick && !(item.value && item.value.name)) {
|
|
291
|
-
return
|
|
293
|
+
return jsx("span", {
|
|
292
294
|
key: String(item.content)
|
|
293
295
|
}, item.content);
|
|
294
296
|
}
|
|
295
297
|
const _handleSubmenuActive = event => {
|
|
296
298
|
setSubmenuActive(!!event.target.closest(`.${DropdownMenuSharedCssClassName.SUBMENU}`));
|
|
297
299
|
};
|
|
298
|
-
const dropListItem =
|
|
300
|
+
const dropListItem = jsx("div", {
|
|
299
301
|
css: theme => buttonStyles(item.isActive, submenuActive)({
|
|
300
302
|
theme
|
|
301
303
|
}),
|
|
302
304
|
tabIndex: -1,
|
|
303
305
|
"aria-disabled": item.isDisabled ? 'true' : 'false',
|
|
304
306
|
onMouseDown: _handleSubmenuActive
|
|
305
|
-
},
|
|
307
|
+
}, jsx(CustomItem, {
|
|
306
308
|
item: item,
|
|
307
309
|
key: (_item$key3 = item.key) !== null && _item$key3 !== void 0 ? _item$key3 : String(item.content),
|
|
308
310
|
testId: `dropdown-item__${String(item.content)}`,
|
|
@@ -329,7 +331,7 @@ function DropdownMenuItem({
|
|
|
329
331
|
}, item.content));
|
|
330
332
|
if (item.tooltipDescription) {
|
|
331
333
|
var _item$key4;
|
|
332
|
-
return
|
|
334
|
+
return jsx(Tooltip, {
|
|
333
335
|
key: (_item$key4 = item.key) !== null && _item$key4 !== void 0 ? _item$key4 : String(item.content),
|
|
334
336
|
content: item.tooltipDescription,
|
|
335
337
|
position: item.tooltipPosition
|
|
@@ -343,7 +345,7 @@ export const DropdownMenuWithKeyboardNavigation = /*#__PURE__*/React.memo(({
|
|
|
343
345
|
const keyDownHandlerContext = useContext(KeyDownHandlerContext);
|
|
344
346
|
// This context is to handle the tab, Arrow Right/Left key events for dropdown.
|
|
345
347
|
// Default context has the void callbacks for above key events
|
|
346
|
-
return
|
|
348
|
+
return jsx(DropdownMenuWrapper, _extends({
|
|
347
349
|
arrowKeyNavigationProviderOptions: {
|
|
348
350
|
...props.arrowKeyNavigationProviderOptions,
|
|
349
351
|
keyDownHandlerContext
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
1
2
|
/* eslint-disable no-console */
|
|
2
3
|
|
|
3
4
|
import React, { useCallback, useLayoutEffect, useRef } from 'react';
|
|
4
|
-
import { css } from '@emotion/react';
|
|
5
|
+
import { css, jsx } from '@emotion/react';
|
|
5
6
|
import { fullPageMessages as messages } from '../../messages';
|
|
6
7
|
import { EDIT_AREA_ID } from '../../ui';
|
|
7
8
|
/*
|
|
@@ -185,14 +186,14 @@ export const ToolbarArrowKeyNavigationProvider = ({
|
|
|
185
186
|
}
|
|
186
187
|
};
|
|
187
188
|
}, [selectedItemIndex, wrapperRef, editorView, disableArrowKeyNavigation, handleEscape, childComponentSelector, incrementIndex, decrementIndex, isShortcutToFocusToolbar, editorAppearance, useStickyToolbar]);
|
|
188
|
-
return
|
|
189
|
+
return jsx("div", {
|
|
189
190
|
css: editorAppearance === 'comment' && centeredToolbarContainer,
|
|
190
191
|
className: "custom-key-handler-wrapper",
|
|
191
192
|
ref: wrapperRef,
|
|
192
193
|
role: "toolbar",
|
|
193
194
|
"aria-label": intl.formatMessage(messages.toolbarLabel),
|
|
194
195
|
"aria-controls": EDIT_AREA_ID
|
|
195
|
-
},
|
|
196
|
+
}, jsx(KeyDownHandlerContext.Provider, {
|
|
196
197
|
value: submenuKeydownHandleContext
|
|
197
198
|
}, children));
|
|
198
199
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// This file is copied to `packages/editor/editor-plugin-ai/src/ui/components/AtlassianIntelligenceToolbarButton/ToolbarButton/index.tsx`
|
|
2
2
|
// If you make any change here, copy it to above file as well
|
|
3
3
|
// and notify about the change in #team-fc-editor-ai-dev channel.
|
|
4
|
-
|
|
4
|
+
/** @jsx jsx */
|
|
5
5
|
import React, { useCallback } from 'react';
|
|
6
|
-
import { css } from '@emotion/react';
|
|
6
|
+
import { css, jsx } from '@emotion/react';
|
|
7
7
|
import { FabricChannel } from '@atlaskit/analytics-listeners';
|
|
8
8
|
import Tooltip from '@atlaskit/tooltip';
|
|
9
9
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, TOOLBAR_ACTION_SUBJECT_ID } from '../../analytics';
|
|
@@ -60,7 +60,7 @@ const ToolbarButton = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
60
60
|
}
|
|
61
61
|
}, [disabled, onClick, onItemClick, item, buttonId]);
|
|
62
62
|
const id = buttonId ? `editor-toolbar__${buttonId}` : undefined;
|
|
63
|
-
const button =
|
|
63
|
+
const button = jsx(Button, {
|
|
64
64
|
id: id,
|
|
65
65
|
ref: ref,
|
|
66
66
|
appearance: "subtle",
|
|
@@ -86,11 +86,11 @@ const ToolbarButton = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
86
86
|
return button;
|
|
87
87
|
}
|
|
88
88
|
const tooltipContent = !hideTooltip ? title : null;
|
|
89
|
-
return
|
|
89
|
+
return jsx(Tooltip, {
|
|
90
90
|
content: tooltipContent,
|
|
91
91
|
hideTooltipOnClick: true,
|
|
92
92
|
position: titlePosition
|
|
93
|
-
},
|
|
93
|
+
}, jsx("div", {
|
|
94
94
|
css: buttonWrapper
|
|
95
95
|
}, button));
|
|
96
96
|
});
|
|
@@ -2,8 +2,9 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
|
|
|
2
2
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
3
3
|
var _excluded = ["disabled"];
|
|
4
4
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
5
|
+
/** @jsx jsx */
|
|
5
6
|
import React from 'react';
|
|
6
|
-
import { css } from '@emotion/react';
|
|
7
|
+
import { css, jsx } from '@emotion/react';
|
|
7
8
|
import { ButtonGroup } from '@atlaskit/button';
|
|
8
9
|
import { FloatingToolbarButton as Button } from '../ui';
|
|
9
10
|
|
|
@@ -15,7 +16,7 @@ var buttonStyleNoneEvent = css(_templateObject2 || (_templateObject2 = _taggedTe
|
|
|
15
16
|
var DisallowedWrapper = function DisallowedWrapper(_ref) {
|
|
16
17
|
var disabled = _ref.disabled,
|
|
17
18
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
18
|
-
return
|
|
19
|
+
return jsx("div", props);
|
|
19
20
|
};
|
|
20
21
|
|
|
21
22
|
/**
|
|
@@ -26,7 +27,7 @@ var defaultWrapperStyle = css(_templateObject3 || (_templateObject3 = _taggedTem
|
|
|
26
27
|
var disallowedWrapperStyle = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n cursor: not-allowed;\n"])));
|
|
27
28
|
export var LinkToolbarButtonGroup = function LinkToolbarButtonGroup(_ref2) {
|
|
28
29
|
var options = _ref2.options;
|
|
29
|
-
return
|
|
30
|
+
return jsx(ButtonGroup, null, options.map(function (_ref3) {
|
|
30
31
|
var onClick = _ref3.onClick,
|
|
31
32
|
selected = _ref3.selected,
|
|
32
33
|
disabled = _ref3.disabled,
|
|
@@ -34,14 +35,14 @@ export var LinkToolbarButtonGroup = function LinkToolbarButtonGroup(_ref2) {
|
|
|
34
35
|
tooltipContent = _ref3.tooltipContent,
|
|
35
36
|
title = _ref3.title,
|
|
36
37
|
Icon = _ref3.icon;
|
|
37
|
-
return
|
|
38
|
+
return jsx(DisallowedWrapper, {
|
|
38
39
|
css: disabled ? disallowedWrapperStyle : defaultWrapperStyle,
|
|
39
40
|
key: testId,
|
|
40
41
|
disabled: disabled
|
|
41
|
-
},
|
|
42
|
+
}, jsx(Button, {
|
|
42
43
|
css: disabled ? buttonStyleNoneEvent : buttonStyle,
|
|
43
44
|
title: title,
|
|
44
|
-
icon:
|
|
45
|
+
icon: jsx(Icon, {
|
|
45
46
|
size: "medium",
|
|
46
47
|
label: title
|
|
47
48
|
}),
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject, _templateObject2;
|
|
3
|
+
/** @jsx jsx */
|
|
3
4
|
import { useEffect, useRef } from 'react';
|
|
4
|
-
import { css } from '@emotion/react';
|
|
5
|
+
import { css, jsx } from '@emotion/react';
|
|
5
6
|
import { ButtonItem, Section } from '@atlaskit/menu';
|
|
6
7
|
var itemBefore = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 40px;\n height: 40px;\n box-sizing: border-box;\n display: flex;\n justify-content: center;\n align-items: center;\n margin-right: ", ";\n"])), "var(--ds-space-050, 4px)");
|
|
7
8
|
export var ViewMore = function ViewMore(_ref) {
|
|
@@ -13,11 +14,11 @@ export var ViewMore = function ViewMore(_ref) {
|
|
|
13
14
|
ref.current.focus();
|
|
14
15
|
}
|
|
15
16
|
}, [focus]);
|
|
16
|
-
return
|
|
17
|
+
return jsx(Section, {
|
|
17
18
|
hasSeparator: true
|
|
18
|
-
},
|
|
19
|
+
}, jsx(ButtonItem, {
|
|
19
20
|
onClick: item.action,
|
|
20
|
-
iconBefore:
|
|
21
|
+
iconBefore: jsx("div", {
|
|
21
22
|
css: itemBefore
|
|
22
23
|
}, item.icon()),
|
|
23
24
|
"aria-describedby": item.title,
|
|
@@ -8,8 +8,10 @@ var _excluded = ["categories"],
|
|
|
8
8
|
_excluded2 = ["buttonStyles"];
|
|
9
9
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10
10
|
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; }
|
|
11
|
+
/** @jsx jsx */
|
|
12
|
+
|
|
11
13
|
import React, { Fragment, memo, useCallback } from 'react';
|
|
12
|
-
import { css } from '@emotion/react';
|
|
14
|
+
import { css, jsx } from '@emotion/react';
|
|
13
15
|
import { withAnalyticsContext } from '@atlaskit/analytics-next';
|
|
14
16
|
import Button from '@atlaskit/button/custom-theme-button';
|
|
15
17
|
import { B400, B50, N800 } from '@atlaskit/theme/colors';
|
|
@@ -24,8 +26,8 @@ function CategoryList(_ref) {
|
|
|
24
26
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
25
27
|
focusedCategoryIndex = _React$useState2[0],
|
|
26
28
|
setFocusedCategoryIndex = _React$useState2[1];
|
|
27
|
-
return
|
|
28
|
-
return
|
|
29
|
+
return jsx(Fragment, null, categories.map(function (category, index) {
|
|
30
|
+
return jsx(CategoryListItem, _extends({
|
|
29
31
|
key: category.title,
|
|
30
32
|
index: index,
|
|
31
33
|
category: category,
|
|
@@ -84,9 +86,9 @@ function CategoryListItem(_ref2) {
|
|
|
84
86
|
})
|
|
85
87
|
}, rest);
|
|
86
88
|
}, [category.name, selectedCategory]);
|
|
87
|
-
return
|
|
89
|
+
return jsx("div", {
|
|
88
90
|
css: buttonWrapper
|
|
89
|
-
},
|
|
91
|
+
}, jsx(Button, {
|
|
90
92
|
appearance: "subtle",
|
|
91
93
|
isSelected: selectedCategory === category.name,
|
|
92
94
|
onClick: onClick,
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject;
|
|
3
|
+
/** @jsx jsx */
|
|
3
4
|
import React from 'react';
|
|
4
|
-
import { css } from '@emotion/react';
|
|
5
|
+
import { css, jsx } from '@emotion/react';
|
|
5
6
|
import Loadable from 'react-loadable';
|
|
6
7
|
import Spinner from '@atlaskit/spinner';
|
|
7
8
|
var spinnerContainer = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n width: 100%;\n"])));
|
|
@@ -12,9 +13,9 @@ var ElementBrowserLoader = Loadable({
|
|
|
12
13
|
});
|
|
13
14
|
},
|
|
14
15
|
loading: function loading() {
|
|
15
|
-
return
|
|
16
|
+
return jsx("div", {
|
|
16
17
|
css: spinnerContainer
|
|
17
|
-
},
|
|
18
|
+
}, jsx(Spinner, {
|
|
18
19
|
size: "medium"
|
|
19
20
|
}));
|
|
20
21
|
}
|
|
@@ -4,8 +4,9 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
|
|
|
4
4
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
5
5
|
var _excluded = ["items", "mode", "selectedItemIndex", "focusedItemIndex", "setColumnCount", "createAnalyticsEvent", "emptyStateHandler", "selectedCategory", "searchTerm"];
|
|
6
6
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11;
|
|
7
|
+
/** @jsx jsx */
|
|
7
8
|
import React, { Fragment, memo, useCallback, useEffect, useMemo, useState } from 'react';
|
|
8
|
-
import { css } from '@emotion/react';
|
|
9
|
+
import { css, jsx } from '@emotion/react';
|
|
9
10
|
import { AutoSizer } from 'react-virtualized/dist/commonjs/AutoSizer';
|
|
10
11
|
import { Collection } from 'react-virtualized/dist/commonjs/Collection';
|
|
11
12
|
import { withAnalyticsContext } from '@atlaskit/analytics-next';
|
|
@@ -76,12 +77,12 @@ function ElementList(_ref) {
|
|
|
76
77
|
if (items[index] == null) {
|
|
77
78
|
return;
|
|
78
79
|
}
|
|
79
|
-
return
|
|
80
|
+
return jsx("div", {
|
|
80
81
|
style: style,
|
|
81
82
|
key: key,
|
|
82
83
|
className: "element-item-wrapper",
|
|
83
84
|
css: elementItemWrapper
|
|
84
|
-
},
|
|
85
|
+
}, jsx(MemoizedElementItem, _extends({
|
|
85
86
|
inlineMode: !fullMode,
|
|
86
87
|
index: index,
|
|
87
88
|
item: items[index],
|
|
@@ -90,20 +91,20 @@ function ElementList(_ref) {
|
|
|
90
91
|
}, props)));
|
|
91
92
|
};
|
|
92
93
|
}, [items, fullMode, selectedItemIndex, focusedItemIndex, props]);
|
|
93
|
-
return
|
|
94
|
+
return jsx(Fragment, null, jsx(ContainerWidthMonitor, null), !items.length ? emptyStateHandler ? emptyStateHandler({
|
|
94
95
|
mode: mode,
|
|
95
96
|
selectedCategory: selectedCategory,
|
|
96
97
|
searchTerm: searchTerm
|
|
97
|
-
}) :
|
|
98
|
+
}) : jsx(EmptyState, {
|
|
98
99
|
onExternalLinkClick: onExternalLinkClick
|
|
99
|
-
}) :
|
|
100
|
+
}) : jsx("div", {
|
|
100
101
|
css: elementItemsWrapper,
|
|
101
102
|
"data-testid": "element-items"
|
|
102
|
-
},
|
|
103
|
+
}, jsx(Fragment, null, containerWidth > 0 && jsx(AutoSizer, {
|
|
103
104
|
disableWidth: true
|
|
104
105
|
}, function (_ref3) {
|
|
105
106
|
var height = _ref3.height;
|
|
106
|
-
return
|
|
107
|
+
return jsx(Collection, {
|
|
107
108
|
cellCount: items.length,
|
|
108
109
|
cellRenderer: cellRenderer,
|
|
109
110
|
cellSizeAndPositionGetter: cellSizeAndPositionGetter(containerWidth - ELEMENT_LIST_PADDING * 2, scrollbarWidth),
|
|
@@ -163,12 +164,12 @@ export function ElementItem(_ref4) {
|
|
|
163
164
|
title = item.title,
|
|
164
165
|
description = item.description,
|
|
165
166
|
keyshortcut = item.keyshortcut;
|
|
166
|
-
return
|
|
167
|
+
return jsx(Tooltip, {
|
|
167
168
|
content: description,
|
|
168
169
|
testId: "element-item-tooltip-".concat(index)
|
|
169
|
-
},
|
|
170
|
+
}, jsx(ButtonItem, {
|
|
170
171
|
onClick: onClick,
|
|
171
|
-
iconBefore:
|
|
172
|
+
iconBefore: jsx(ElementBefore, {
|
|
172
173
|
icon: icon,
|
|
173
174
|
title: title
|
|
174
175
|
}),
|
|
@@ -176,7 +177,7 @@ export function ElementItem(_ref4) {
|
|
|
176
177
|
"aria-describedby": title,
|
|
177
178
|
ref: ref,
|
|
178
179
|
testId: "element-item-".concat(index)
|
|
179
|
-
},
|
|
180
|
+
}, jsx(ItemContent, {
|
|
180
181
|
style: inlineMode ? null : itemStyleOverrides,
|
|
181
182
|
tabIndex: 0,
|
|
182
183
|
title: title,
|
|
@@ -194,28 +195,28 @@ var itemStyleOverrides = {
|
|
|
194
195
|
var ElementBefore = /*#__PURE__*/memo(function (_ref5) {
|
|
195
196
|
var icon = _ref5.icon,
|
|
196
197
|
title = _ref5.title;
|
|
197
|
-
return
|
|
198
|
+
return jsx("div", {
|
|
198
199
|
css: [itemIcon, itemIconStyle]
|
|
199
|
-
}, icon ? icon() :
|
|
200
|
+
}, icon ? icon() : jsx(IconFallback, null));
|
|
200
201
|
});
|
|
201
202
|
var ItemContent = /*#__PURE__*/memo(function (_ref6) {
|
|
202
203
|
var title = _ref6.title,
|
|
203
204
|
description = _ref6.description,
|
|
204
205
|
keyshortcut = _ref6.keyshortcut;
|
|
205
|
-
return
|
|
206
|
+
return jsx("div", {
|
|
206
207
|
css: itemBody,
|
|
207
208
|
className: "item-body"
|
|
208
|
-
},
|
|
209
|
+
}, jsx("div", {
|
|
209
210
|
css: itemText
|
|
210
|
-
},
|
|
211
|
+
}, jsx("div", {
|
|
211
212
|
css: itemTitleWrapper
|
|
212
|
-
},
|
|
213
|
+
}, jsx("p", {
|
|
213
214
|
css: itemTitle
|
|
214
|
-
}, title),
|
|
215
|
+
}, title), jsx("div", {
|
|
215
216
|
css: itemAfter
|
|
216
|
-
}, keyshortcut &&
|
|
217
|
+
}, keyshortcut && jsx("div", {
|
|
217
218
|
css: shortcutStyle
|
|
218
|
-
}, keyshortcut))), description &&
|
|
219
|
+
}, keyshortcut))), description && jsx("p", {
|
|
219
220
|
css: itemDescription
|
|
220
221
|
}, description)));
|
|
221
222
|
});
|
|
@@ -1,33 +1,34 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
3
|
-
|
|
3
|
+
/** @jsx jsx */
|
|
4
|
+
import { css, jsx } from '@emotion/react';
|
|
4
5
|
import { FormattedMessage } from 'react-intl-next';
|
|
5
6
|
import Button from '@atlaskit/button';
|
|
6
7
|
import NotFoundIllustration from './NotFoundIllustration';
|
|
7
8
|
export default function EmptyState(_ref) {
|
|
8
9
|
var onExternalLinkClick = _ref.onExternalLinkClick;
|
|
9
|
-
return
|
|
10
|
+
return jsx("div", {
|
|
10
11
|
css: emptyStateWrapper
|
|
11
|
-
},
|
|
12
|
+
}, jsx(NotFoundIllustration, null), jsx("div", {
|
|
12
13
|
css: emptyStateHeading
|
|
13
|
-
},
|
|
14
|
+
}, jsx(FormattedMessage, {
|
|
14
15
|
id: "fabric.editor.elementbrowser.search.empty-state.heading",
|
|
15
16
|
defaultMessage: "Nothing matches your search",
|
|
16
17
|
description: "Empty state heading"
|
|
17
|
-
})),
|
|
18
|
+
})), jsx("div", {
|
|
18
19
|
css: emptyStateSubHeading
|
|
19
|
-
},
|
|
20
|
+
}, jsx("p", null, jsx(FormattedMessage, {
|
|
20
21
|
id: "fabric.editor.elementbrowser.search.empty-state.sub-heading",
|
|
21
22
|
defaultMessage: "Try searching with a different term or discover new apps for Atlassian products.",
|
|
22
23
|
description: "Empty state sub-heading"
|
|
23
|
-
})),
|
|
24
|
+
})), jsx("div", {
|
|
24
25
|
css: externalLinkWrapper
|
|
25
|
-
},
|
|
26
|
+
}, jsx(Button, {
|
|
26
27
|
appearance: "primary",
|
|
27
28
|
target: "_blank",
|
|
28
29
|
href: "https://marketplace.atlassian.com/search?category=Macros&hosting=cloud&product=confluence",
|
|
29
30
|
onClick: onExternalLinkClick
|
|
30
|
-
},
|
|
31
|
+
}, jsx(FormattedMessage, {
|
|
31
32
|
id: "fabric.editor.elementbrowser.search.empty-state.sub-heading.link",
|
|
32
33
|
defaultMessage: "Explore Atlassian Marketplace",
|
|
33
34
|
description: "Empty state sub-heading external link"
|