@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
|
@@ -23,6 +23,7 @@ var _withOuterListeners = _interopRequireDefault(require("../../ui/with-outer-li
|
|
|
23
23
|
var _ArrowKeyNavigationProvider = require("../ArrowKeyNavigationProvider");
|
|
24
24
|
var _types = require("../ArrowKeyNavigationProvider/types");
|
|
25
25
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
26
|
+
/** @jsx jsx */
|
|
26
27
|
// helps adjusts position of popup
|
|
27
28
|
var colorPickerButtonWrapper = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n"])));
|
|
28
29
|
var colorPickerExpandContainer = (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n margin: 0px ", ";\n"])), "var(--ds-space-negative-050, -4px)");
|
|
@@ -122,7 +123,7 @@ var ColorPickerButton = function ColorPickerButton(props) {
|
|
|
122
123
|
var _getSelectedRowAndCol = (0, _uiColor.getSelectedRowAndColumnFromPalette)(props.colorPalette, selectedColor, props.cols),
|
|
123
124
|
selectedRowIndex = _getSelectedRowAndCol.selectedRowIndex,
|
|
124
125
|
selectedColumnIndex = _getSelectedRowAndCol.selectedColumnIndex;
|
|
125
|
-
return
|
|
126
|
+
return (0, _react2.jsx)(_Popup.default, {
|
|
126
127
|
target: buttonRef.current,
|
|
127
128
|
fitHeight: 350,
|
|
128
129
|
fitWidth: 350,
|
|
@@ -136,10 +137,10 @@ var ColorPickerButton = function ColorPickerButton(props) {
|
|
|
136
137
|
zIndex: props.setDisableParentScroll ? 600 : undefined,
|
|
137
138
|
ariaLabel: "Color picker popup",
|
|
138
139
|
onPositionCalculated: onPositionCalculated
|
|
139
|
-
},
|
|
140
|
+
}, (0, _react2.jsx)("div", {
|
|
140
141
|
css: colorPickerWrapper,
|
|
141
142
|
"data-test-id": "color-picker-menu"
|
|
142
|
-
},
|
|
143
|
+
}, (0, _react2.jsx)(_ArrowKeyNavigationProvider.ArrowKeyNavigationProvider, {
|
|
143
144
|
type: _types.ArrowKeyNavigationType.COLOR,
|
|
144
145
|
selectedRowIndex: selectedRowIndex,
|
|
145
146
|
selectedColumnIndex: selectedColumnIndex,
|
|
@@ -149,7 +150,7 @@ var ColorPickerButton = function ColorPickerButton(props) {
|
|
|
149
150
|
},
|
|
150
151
|
isOpenedByKeyboard: isOpenedByKeyboard,
|
|
151
152
|
isPopupPositioned: isPopupPositioned
|
|
152
|
-
},
|
|
153
|
+
}, (0, _react2.jsx)(ColorPaletteWithListeners, {
|
|
153
154
|
cols: props.cols,
|
|
154
155
|
selectedColor: selectedColor,
|
|
155
156
|
onClick: onColorSelected,
|
|
@@ -172,12 +173,12 @@ var ColorPickerButton = function ColorPickerButton(props) {
|
|
|
172
173
|
dark: "var(--ds-background-neutral-subtle-hovered, ".concat(_colors.N30A, ")")
|
|
173
174
|
})(theme));
|
|
174
175
|
};
|
|
175
|
-
return
|
|
176
|
+
return (0, _react2.jsx)("div", {
|
|
176
177
|
css: colorPickerButtonWrapper
|
|
177
|
-
},
|
|
178
|
+
}, (0, _react2.jsx)(_tooltip.default, {
|
|
178
179
|
content: title,
|
|
179
180
|
position: "top"
|
|
180
|
-
},
|
|
181
|
+
}, (0, _react2.jsx)(_button.default, {
|
|
181
182
|
ref: buttonRef,
|
|
182
183
|
"aria-label": title,
|
|
183
184
|
spacing: "compact",
|
|
@@ -190,9 +191,9 @@ var ColorPickerButton = function ColorPickerButton(props) {
|
|
|
190
191
|
}
|
|
191
192
|
},
|
|
192
193
|
css: buttonStyle,
|
|
193
|
-
iconAfter:
|
|
194
|
+
iconAfter: (0, _react2.jsx)("span", {
|
|
194
195
|
css: colorPickerExpandContainer
|
|
195
|
-
},
|
|
196
|
+
}, (0, _react2.jsx)(_chevronDown.default, {
|
|
196
197
|
label: ""
|
|
197
198
|
}))
|
|
198
199
|
})), renderPopup());
|
|
@@ -9,13 +9,14 @@ exports.DropdownContainer = void 0;
|
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
10
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
|
+
var _react2 = require("@emotion/react");
|
|
12
13
|
var _types = require("../ArrowKeyNavigationProvider/types");
|
|
13
14
|
var _Dropdown = _interopRequireDefault(require("../Dropdown"));
|
|
14
15
|
var _ToolbarArrowKeyNavigationProvider = require("../ToolbarArrowKeyNavigationProvider");
|
|
15
16
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
16
17
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
17
18
|
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; }
|
|
18
|
-
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) { (0, _defineProperty2.default)(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; }
|
|
19
|
+
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) { (0, _defineProperty2.default)(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; } /** @jsx jsx */
|
|
19
20
|
var DropdownContainer = exports.DropdownContainer = /*#__PURE__*/_react.default.memo(function DropdownContainer(props) {
|
|
20
21
|
var keyDownHandlerContext = (0, _react.useContext)(_ToolbarArrowKeyNavigationProvider.KeyDownHandlerContext);
|
|
21
22
|
var newArrowKeyNavigationProviderOptions = props.arrowKeyNavigationProviderOptions;
|
|
@@ -26,10 +27,9 @@ var DropdownContainer = exports.DropdownContainer = /*#__PURE__*/_react.default.
|
|
|
26
27
|
});
|
|
27
28
|
}
|
|
28
29
|
return (
|
|
29
|
-
/*#__PURE__*/
|
|
30
30
|
//This context is to handle the tab, Arrow Right/Left key events for dropdown.
|
|
31
31
|
//Default context has the void callbacks for above key events
|
|
32
|
-
|
|
32
|
+
(0, _react2.jsx)(_Dropdown.default, (0, _extends2.default)({}, props, {
|
|
33
33
|
arrowKeyNavigationProviderOptions: newArrowKeyNavigationProviderOptions
|
|
34
34
|
}))
|
|
35
35
|
);
|
|
@@ -35,6 +35,7 @@ var _ArrowKeyNavigationProvider = require("../ArrowKeyNavigationProvider");
|
|
|
35
35
|
var _types = require("../ArrowKeyNavigationProvider/types");
|
|
36
36
|
var _excluded = ["children"];
|
|
37
37
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
38
|
+
/** @jsx jsx */
|
|
38
39
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
39
40
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
40
41
|
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; }
|
|
@@ -159,7 +160,7 @@ var DropdownMenuWrapper = exports.default = /*#__PURE__*/function (_PureComponen
|
|
|
159
160
|
}
|
|
160
161
|
}
|
|
161
162
|
});
|
|
162
|
-
return
|
|
163
|
+
return (0, _react2.jsx)(_Popup.default, {
|
|
163
164
|
target: isOpen ? target : undefined,
|
|
164
165
|
mountTo: mountTo,
|
|
165
166
|
boundariesElement: boundariesElement,
|
|
@@ -169,10 +170,10 @@ var DropdownMenuWrapper = exports.default = /*#__PURE__*/function (_PureComponen
|
|
|
169
170
|
fitWidth: fitWidth,
|
|
170
171
|
zIndex: zIndex || _editorSharedStyles.akEditorFloatingPanelZIndex,
|
|
171
172
|
offset: offset
|
|
172
|
-
},
|
|
173
|
+
}, (0, _react2.jsx)(_ArrowKeyNavigationProvider.ArrowKeyNavigationProvider, (0, _extends2.default)({}, navigationProviderProps, {
|
|
173
174
|
handleClose: this.handleCloseAndFocus,
|
|
174
175
|
closeOnTab: true
|
|
175
|
-
}),
|
|
176
|
+
}), (0, _react2.jsx)(DropListWithOutsideListeners, {
|
|
176
177
|
isOpen: true,
|
|
177
178
|
appearance: "tall",
|
|
178
179
|
position: popupPlacement.join(' '),
|
|
@@ -186,23 +187,23 @@ var DropdownMenuWrapper = exports.default = /*#__PURE__*/function (_PureComponen
|
|
|
186
187
|
e.stopPropagation();
|
|
187
188
|
},
|
|
188
189
|
targetRef: this.state.target
|
|
189
|
-
},
|
|
190
|
+
}, (0, _react2.jsx)("div", {
|
|
190
191
|
style: {
|
|
191
192
|
height: 0,
|
|
192
193
|
minWidth: fitWidth || 0
|
|
193
194
|
}
|
|
194
|
-
}),
|
|
195
|
+
}), (0, _react2.jsx)("div", {
|
|
195
196
|
ref: this.popupRef
|
|
196
|
-
}, (0, _platformFeatureFlags.getBooleanFF)('platform.editor.menu.group-items') &&
|
|
197
|
+
}, (0, _platformFeatureFlags.getBooleanFF)('platform.editor.menu.group-items') && (0, _react2.jsx)(_menu.MenuGroup, {
|
|
197
198
|
role: shouldUseDefaultRole ? 'group' : 'menu'
|
|
198
199
|
}, items.map(function (group, index) {
|
|
199
|
-
return
|
|
200
|
+
return (0, _react2.jsx)(_menu.Section, {
|
|
200
201
|
hasSeparator: (section === null || section === void 0 ? void 0 : section.hasSeparator) && index > 0,
|
|
201
202
|
title: section === null || section === void 0 ? void 0 : section.title,
|
|
202
203
|
key: index
|
|
203
204
|
}, group.items.map(function (item) {
|
|
204
205
|
var _item$key;
|
|
205
|
-
return
|
|
206
|
+
return (0, _react2.jsx)(DropdownMenuItem, {
|
|
206
207
|
key: (_item$key = item.key) !== null && _item$key !== void 0 ? _item$key : String(item.content),
|
|
207
208
|
item: item,
|
|
208
209
|
onItemActivated: _this2.props.onItemActivated,
|
|
@@ -212,12 +213,12 @@ var DropdownMenuWrapper = exports.default = /*#__PURE__*/function (_PureComponen
|
|
|
212
213
|
});
|
|
213
214
|
}));
|
|
214
215
|
})), !(0, _platformFeatureFlags.getBooleanFF)('platform.editor.menu.group-items') && items.map(function (group, index) {
|
|
215
|
-
return
|
|
216
|
+
return (0, _react2.jsx)(_menu.MenuGroup, {
|
|
216
217
|
key: index,
|
|
217
218
|
role: shouldUseDefaultRole ? 'group' : 'menu'
|
|
218
219
|
}, group.items.map(function (item) {
|
|
219
220
|
var _item$key2;
|
|
220
|
-
return
|
|
221
|
+
return (0, _react2.jsx)(DropdownMenuItem, {
|
|
221
222
|
key: (_item$key2 = item.key) !== null && _item$key2 !== void 0 ? _item$key2 : String(item.content),
|
|
222
223
|
item: item,
|
|
223
224
|
onItemActivated: _this2.props.onItemActivated,
|
|
@@ -234,9 +235,9 @@ var DropdownMenuWrapper = exports.default = /*#__PURE__*/function (_PureComponen
|
|
|
234
235
|
var _this$props2 = this.props,
|
|
235
236
|
children = _this$props2.children,
|
|
236
237
|
isOpen = _this$props2.isOpen;
|
|
237
|
-
return
|
|
238
|
+
return (0, _react2.jsx)("div", {
|
|
238
239
|
css: wrapper
|
|
239
|
-
},
|
|
240
|
+
}, (0, _react2.jsx)("div", {
|
|
240
241
|
ref: this.handleRef
|
|
241
242
|
}, children), isOpen ? this.renderDropdownMenu() : null);
|
|
242
243
|
}
|
|
@@ -261,7 +262,7 @@ var DropdownMenuWrapper = exports.default = /*#__PURE__*/function (_PureComponen
|
|
|
261
262
|
var DropdownMenuItemCustomComponent = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
262
263
|
var children = props.children,
|
|
263
264
|
rest = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
264
|
-
return
|
|
265
|
+
return (0, _react2.jsx)("span", (0, _extends2.default)({
|
|
265
266
|
ref: ref
|
|
266
267
|
}, rest, {
|
|
267
268
|
style: {
|
|
@@ -290,14 +291,14 @@ function DropdownMenuItem(_ref) {
|
|
|
290
291
|
// onClick and value.name are the action indicators in the handlers
|
|
291
292
|
// If neither are present, don't wrap in an Item.
|
|
292
293
|
if (!item.onClick && !(item.value && item.value.name)) {
|
|
293
|
-
return
|
|
294
|
+
return (0, _react2.jsx)("span", {
|
|
294
295
|
key: String(item.content)
|
|
295
296
|
}, item.content);
|
|
296
297
|
}
|
|
297
298
|
var _handleSubmenuActive = function _handleSubmenuActive(event) {
|
|
298
299
|
setSubmenuActive(!!event.target.closest(".".concat(_styles.DropdownMenuSharedCssClassName.SUBMENU)));
|
|
299
300
|
};
|
|
300
|
-
var dropListItem =
|
|
301
|
+
var dropListItem = (0, _react2.jsx)("div", {
|
|
301
302
|
css: function css(theme) {
|
|
302
303
|
return buttonStyles(item.isActive, submenuActive)({
|
|
303
304
|
theme: theme
|
|
@@ -306,7 +307,7 @@ function DropdownMenuItem(_ref) {
|
|
|
306
307
|
tabIndex: -1,
|
|
307
308
|
"aria-disabled": item.isDisabled ? 'true' : 'false',
|
|
308
309
|
onMouseDown: _handleSubmenuActive
|
|
309
|
-
},
|
|
310
|
+
}, (0, _react2.jsx)(_menu.CustomItem, {
|
|
310
311
|
item: item,
|
|
311
312
|
key: (_item$key3 = item.key) !== null && _item$key3 !== void 0 ? _item$key3 : String(item.content),
|
|
312
313
|
testId: "dropdown-item__".concat(String(item.content)),
|
|
@@ -339,7 +340,7 @@ function DropdownMenuItem(_ref) {
|
|
|
339
340
|
}, item.content));
|
|
340
341
|
if (item.tooltipDescription) {
|
|
341
342
|
var _item$key4;
|
|
342
|
-
return
|
|
343
|
+
return (0, _react2.jsx)(_tooltip.default, {
|
|
343
344
|
key: (_item$key4 = item.key) !== null && _item$key4 !== void 0 ? _item$key4 : String(item.content),
|
|
344
345
|
content: item.tooltipDescription,
|
|
345
346
|
position: item.tooltipPosition
|
|
@@ -352,7 +353,7 @@ var DropdownMenuWithKeyboardNavigation = exports.DropdownMenuWithKeyboardNavigat
|
|
|
352
353
|
var keyDownHandlerContext = (0, _react.useContext)(_ToolbarArrowKeyNavigationProvider.KeyDownHandlerContext);
|
|
353
354
|
// This context is to handle the tab, Arrow Right/Left key events for dropdown.
|
|
354
355
|
// Default context has the void callbacks for above key events
|
|
355
|
-
return
|
|
356
|
+
return (0, _react2.jsx)(DropdownMenuWrapper, (0, _extends2.default)({
|
|
356
357
|
arrowKeyNavigationProviderOptions: _objectSpread(_objectSpread({}, props.arrowKeyNavigationProviderOptions), {}, {
|
|
357
358
|
keyDownHandlerContext: keyDownHandlerContext
|
|
358
359
|
})
|
|
@@ -12,6 +12,7 @@ var _react2 = require("@emotion/react");
|
|
|
12
12
|
var _messages = require("../../messages");
|
|
13
13
|
var _ui = require("../../ui");
|
|
14
14
|
var _templateObject;
|
|
15
|
+
/** @jsx jsx */
|
|
15
16
|
/* eslint-disable no-console */
|
|
16
17
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
17
18
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -190,14 +191,14 @@ var ToolbarArrowKeyNavigationProvider = exports.ToolbarArrowKeyNavigationProvide
|
|
|
190
191
|
}
|
|
191
192
|
};
|
|
192
193
|
}, [selectedItemIndex, wrapperRef, editorView, disableArrowKeyNavigation, handleEscape, childComponentSelector, incrementIndex, decrementIndex, isShortcutToFocusToolbar, editorAppearance, useStickyToolbar]);
|
|
193
|
-
return
|
|
194
|
+
return (0, _react2.jsx)("div", {
|
|
194
195
|
css: editorAppearance === 'comment' && centeredToolbarContainer,
|
|
195
196
|
className: "custom-key-handler-wrapper",
|
|
196
197
|
ref: wrapperRef,
|
|
197
198
|
role: "toolbar",
|
|
198
199
|
"aria-label": intl.formatMessage(_messages.fullPageMessages.toolbarLabel),
|
|
199
200
|
"aria-controls": _ui.EDIT_AREA_ID
|
|
200
|
-
},
|
|
201
|
+
}, (0, _react2.jsx)(KeyDownHandlerContext.Provider, {
|
|
201
202
|
value: submenuKeydownHandleContext
|
|
202
203
|
}, children));
|
|
203
204
|
};
|
|
@@ -17,6 +17,7 @@ var _styles = _interopRequireDefault(require("./styles"));
|
|
|
17
17
|
var _templateObject; // This file is copied to `packages/editor/editor-plugin-ai/src/ui/components/AtlassianIntelligenceToolbarButton/ToolbarButton/index.tsx`
|
|
18
18
|
// If you make any change here, copy it to above file as well
|
|
19
19
|
// and notify about the change in #team-fc-editor-ai-dev channel.
|
|
20
|
+
/** @jsx jsx */
|
|
20
21
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
21
22
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
22
23
|
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; }
|
|
@@ -71,7 +72,7 @@ var ToolbarButton = /*#__PURE__*/_react.default.forwardRef(function (props, ref)
|
|
|
71
72
|
}
|
|
72
73
|
}, [disabled, onClick, onItemClick, item, buttonId]);
|
|
73
74
|
var id = buttonId ? "editor-toolbar__".concat(buttonId) : undefined;
|
|
74
|
-
var button =
|
|
75
|
+
var button = (0, _react2.jsx)(_styles.default, {
|
|
75
76
|
id: id,
|
|
76
77
|
ref: ref,
|
|
77
78
|
appearance: "subtle",
|
|
@@ -97,11 +98,11 @@ var ToolbarButton = /*#__PURE__*/_react.default.forwardRef(function (props, ref)
|
|
|
97
98
|
return button;
|
|
98
99
|
}
|
|
99
100
|
var tooltipContent = !hideTooltip ? title : null;
|
|
100
|
-
return
|
|
101
|
+
return (0, _react2.jsx)(_tooltip.default, {
|
|
101
102
|
content: tooltipContent,
|
|
102
103
|
hideTooltipOnClick: true,
|
|
103
104
|
position: titlePosition
|
|
104
|
-
},
|
|
105
|
+
}, (0, _react2.jsx)("div", {
|
|
105
106
|
css: buttonWrapper
|
|
106
107
|
}, button));
|
|
107
108
|
});
|
|
@@ -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 { ButtonGroup } from '@atlaskit/button';
|
|
4
5
|
import { FloatingToolbarButton as Button } from '../ui';
|
|
5
6
|
|
|
@@ -16,7 +17,7 @@ const DisallowedWrapper = ({
|
|
|
16
17
|
disabled,
|
|
17
18
|
...props
|
|
18
19
|
}) => {
|
|
19
|
-
return
|
|
20
|
+
return jsx("div", props);
|
|
20
21
|
};
|
|
21
22
|
|
|
22
23
|
/**
|
|
@@ -32,7 +33,7 @@ const disallowedWrapperStyle = css`
|
|
|
32
33
|
export const LinkToolbarButtonGroup = ({
|
|
33
34
|
options
|
|
34
35
|
}) => {
|
|
35
|
-
return
|
|
36
|
+
return jsx(ButtonGroup, null, options.map(({
|
|
36
37
|
onClick,
|
|
37
38
|
selected,
|
|
38
39
|
disabled,
|
|
@@ -40,14 +41,14 @@ export const LinkToolbarButtonGroup = ({
|
|
|
40
41
|
tooltipContent,
|
|
41
42
|
title,
|
|
42
43
|
icon: Icon
|
|
43
|
-
}) =>
|
|
44
|
+
}) => jsx(DisallowedWrapper, {
|
|
44
45
|
css: disabled ? disallowedWrapperStyle : defaultWrapperStyle,
|
|
45
46
|
key: testId,
|
|
46
47
|
disabled: disabled
|
|
47
|
-
},
|
|
48
|
+
}, jsx(Button, {
|
|
48
49
|
css: disabled ? buttonStyleNoneEvent : buttonStyle,
|
|
49
50
|
title: title,
|
|
50
|
-
icon:
|
|
51
|
+
icon: jsx(Icon, {
|
|
51
52
|
size: "medium",
|
|
52
53
|
label: title
|
|
53
54
|
}),
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
1
2
|
import { useEffect, useRef } from 'react';
|
|
2
|
-
import { css } from '@emotion/react';
|
|
3
|
+
import { css, jsx } from '@emotion/react';
|
|
3
4
|
import { ButtonItem, Section } from '@atlaskit/menu';
|
|
4
5
|
const itemBefore = css`
|
|
5
6
|
width: 40px;
|
|
@@ -20,11 +21,11 @@ export const ViewMore = ({
|
|
|
20
21
|
ref.current.focus();
|
|
21
22
|
}
|
|
22
23
|
}, [focus]);
|
|
23
|
-
return
|
|
24
|
+
return jsx(Section, {
|
|
24
25
|
hasSeparator: true
|
|
25
|
-
},
|
|
26
|
+
}, jsx(ButtonItem, {
|
|
26
27
|
onClick: item.action,
|
|
27
|
-
iconBefore:
|
|
28
|
+
iconBefore: jsx("div", {
|
|
28
29
|
css: itemBefore
|
|
29
30
|
}, item.icon()),
|
|
30
31
|
"aria-describedby": item.title,
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
/** @jsx jsx */
|
|
3
|
+
|
|
2
4
|
import React, { Fragment, memo, useCallback } from 'react';
|
|
3
|
-
import { css } from '@emotion/react';
|
|
5
|
+
import { css, jsx } from '@emotion/react';
|
|
4
6
|
import { withAnalyticsContext } from '@atlaskit/analytics-next';
|
|
5
7
|
import Button from '@atlaskit/button/custom-theme-button';
|
|
6
8
|
import { B400, B50, N800 } from '@atlaskit/theme/colors';
|
|
@@ -12,7 +14,7 @@ function CategoryList({
|
|
|
12
14
|
...props
|
|
13
15
|
}) {
|
|
14
16
|
const [focusedCategoryIndex, setFocusedCategoryIndex] = React.useState(null);
|
|
15
|
-
return
|
|
17
|
+
return jsx(Fragment, null, categories.map((category, index) => jsx(CategoryListItem, _extends({
|
|
16
18
|
key: category.title,
|
|
17
19
|
index: index,
|
|
18
20
|
category: category,
|
|
@@ -75,9 +77,9 @@ function CategoryListItem({
|
|
|
75
77
|
...rest
|
|
76
78
|
};
|
|
77
79
|
}, [category.name, selectedCategory]);
|
|
78
|
-
return
|
|
80
|
+
return jsx("div", {
|
|
79
81
|
css: buttonWrapper
|
|
80
|
-
},
|
|
82
|
+
}, jsx(Button, {
|
|
81
83
|
appearance: "subtle",
|
|
82
84
|
isSelected: selectedCategory === category.name,
|
|
83
85
|
onClick: onClick,
|
|
@@ -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 Loadable from 'react-loadable';
|
|
4
5
|
import Spinner from '@atlaskit/spinner';
|
|
5
6
|
const spinnerContainer = css`
|
|
@@ -11,9 +12,9 @@ const spinnerContainer = css`
|
|
|
11
12
|
`;
|
|
12
13
|
const ElementBrowserLoader = Loadable({
|
|
13
14
|
loader: () => import( /* webpackChunkName: "@atlaskit-internal_editor-element-browser" */'../ElementBrowser').then(module => module.default),
|
|
14
|
-
loading: () =>
|
|
15
|
+
loading: () => jsx("div", {
|
|
15
16
|
css: spinnerContainer
|
|
16
|
-
},
|
|
17
|
+
}, jsx(Spinner, {
|
|
17
18
|
size: "medium"
|
|
18
19
|
}))
|
|
19
20
|
});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
/** @jsx jsx */
|
|
2
3
|
import React, { Fragment, memo, useCallback, useEffect, useMemo, useState } from 'react';
|
|
3
|
-
import { css } from '@emotion/react';
|
|
4
|
+
import { css, jsx } from '@emotion/react';
|
|
4
5
|
import { AutoSizer } from 'react-virtualized/dist/commonjs/AutoSizer';
|
|
5
6
|
import { Collection } from 'react-virtualized/dist/commonjs/Collection';
|
|
6
7
|
import { withAnalyticsContext } from '@atlaskit/analytics-next';
|
|
@@ -86,12 +87,12 @@ function ElementList({
|
|
|
86
87
|
if (items[index] == null) {
|
|
87
88
|
return;
|
|
88
89
|
}
|
|
89
|
-
return
|
|
90
|
+
return jsx("div", {
|
|
90
91
|
style: style,
|
|
91
92
|
key: key,
|
|
92
93
|
className: "element-item-wrapper",
|
|
93
94
|
css: elementItemWrapper
|
|
94
|
-
},
|
|
95
|
+
}, jsx(MemoizedElementItem, _extends({
|
|
95
96
|
inlineMode: !fullMode,
|
|
96
97
|
index: index,
|
|
97
98
|
item: items[index],
|
|
@@ -99,20 +100,20 @@ function ElementList({
|
|
|
99
100
|
focus: focusedItemIndex === index
|
|
100
101
|
}, props)));
|
|
101
102
|
}, [items, fullMode, selectedItemIndex, focusedItemIndex, props]);
|
|
102
|
-
return
|
|
103
|
+
return jsx(Fragment, null, jsx(ContainerWidthMonitor, null), !items.length ? emptyStateHandler ? emptyStateHandler({
|
|
103
104
|
mode,
|
|
104
105
|
selectedCategory,
|
|
105
106
|
searchTerm
|
|
106
|
-
}) :
|
|
107
|
+
}) : jsx(EmptyState, {
|
|
107
108
|
onExternalLinkClick: onExternalLinkClick
|
|
108
|
-
}) :
|
|
109
|
+
}) : jsx("div", {
|
|
109
110
|
css: elementItemsWrapper,
|
|
110
111
|
"data-testid": "element-items"
|
|
111
|
-
},
|
|
112
|
+
}, jsx(Fragment, null, containerWidth > 0 && jsx(AutoSizer, {
|
|
112
113
|
disableWidth: true
|
|
113
114
|
}, ({
|
|
114
115
|
height
|
|
115
|
-
}) =>
|
|
116
|
+
}) => jsx(Collection, {
|
|
116
117
|
cellCount: items.length,
|
|
117
118
|
cellRenderer: cellRenderer,
|
|
118
119
|
cellSizeAndPositionGetter: cellSizeAndPositionGetter(containerWidth - ELEMENT_LIST_PADDING * 2, scrollbarWidth),
|
|
@@ -174,12 +175,12 @@ export function ElementItem({
|
|
|
174
175
|
description,
|
|
175
176
|
keyshortcut
|
|
176
177
|
} = item;
|
|
177
|
-
return
|
|
178
|
+
return jsx(Tooltip, {
|
|
178
179
|
content: description,
|
|
179
180
|
testId: `element-item-tooltip-${index}`
|
|
180
|
-
},
|
|
181
|
+
}, jsx(ButtonItem, {
|
|
181
182
|
onClick: onClick,
|
|
182
|
-
iconBefore:
|
|
183
|
+
iconBefore: jsx(ElementBefore, {
|
|
183
184
|
icon: icon,
|
|
184
185
|
title: title
|
|
185
186
|
}),
|
|
@@ -187,7 +188,7 @@ export function ElementItem({
|
|
|
187
188
|
"aria-describedby": title,
|
|
188
189
|
ref: ref,
|
|
189
190
|
testId: `element-item-${index}`
|
|
190
|
-
},
|
|
191
|
+
}, jsx(ItemContent, {
|
|
191
192
|
style: inlineMode ? null : itemStyleOverrides,
|
|
192
193
|
tabIndex: 0,
|
|
193
194
|
title: title,
|
|
@@ -205,27 +206,27 @@ const itemStyleOverrides = {
|
|
|
205
206
|
const ElementBefore = /*#__PURE__*/memo(({
|
|
206
207
|
icon,
|
|
207
208
|
title
|
|
208
|
-
}) =>
|
|
209
|
+
}) => jsx("div", {
|
|
209
210
|
css: [itemIcon, itemIconStyle]
|
|
210
|
-
}, icon ? icon() :
|
|
211
|
+
}, icon ? icon() : jsx(IconFallback, null)));
|
|
211
212
|
const ItemContent = /*#__PURE__*/memo(({
|
|
212
213
|
title,
|
|
213
214
|
description,
|
|
214
215
|
keyshortcut
|
|
215
|
-
}) =>
|
|
216
|
+
}) => jsx("div", {
|
|
216
217
|
css: itemBody,
|
|
217
218
|
className: "item-body"
|
|
218
|
-
},
|
|
219
|
+
}, jsx("div", {
|
|
219
220
|
css: itemText
|
|
220
|
-
},
|
|
221
|
+
}, jsx("div", {
|
|
221
222
|
css: itemTitleWrapper
|
|
222
|
-
},
|
|
223
|
+
}, jsx("p", {
|
|
223
224
|
css: itemTitle
|
|
224
|
-
}, title),
|
|
225
|
+
}, title), jsx("div", {
|
|
225
226
|
css: itemAfter
|
|
226
|
-
}, keyshortcut &&
|
|
227
|
+
}, keyshortcut && jsx("div", {
|
|
227
228
|
css: shortcutStyle
|
|
228
|
-
}, keyshortcut))), description &&
|
|
229
|
+
}, keyshortcut))), description && jsx("p", {
|
|
229
230
|
css: itemDescription
|
|
230
231
|
}, description))));
|
|
231
232
|
const elementItemsWrapper = css`
|
|
@@ -1,32 +1,33 @@
|
|
|
1
|
-
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { css, jsx } from '@emotion/react';
|
|
2
3
|
import { FormattedMessage } from 'react-intl-next';
|
|
3
4
|
import Button from '@atlaskit/button';
|
|
4
5
|
import NotFoundIllustration from './NotFoundIllustration';
|
|
5
6
|
export default function EmptyState({
|
|
6
7
|
onExternalLinkClick
|
|
7
8
|
}) {
|
|
8
|
-
return
|
|
9
|
+
return jsx("div", {
|
|
9
10
|
css: emptyStateWrapper
|
|
10
|
-
},
|
|
11
|
+
}, jsx(NotFoundIllustration, null), jsx("div", {
|
|
11
12
|
css: emptyStateHeading
|
|
12
|
-
},
|
|
13
|
+
}, jsx(FormattedMessage, {
|
|
13
14
|
id: "fabric.editor.elementbrowser.search.empty-state.heading",
|
|
14
15
|
defaultMessage: "Nothing matches your search",
|
|
15
16
|
description: "Empty state heading"
|
|
16
|
-
})),
|
|
17
|
+
})), jsx("div", {
|
|
17
18
|
css: emptyStateSubHeading
|
|
18
|
-
},
|
|
19
|
+
}, jsx("p", null, jsx(FormattedMessage, {
|
|
19
20
|
id: "fabric.editor.elementbrowser.search.empty-state.sub-heading",
|
|
20
21
|
defaultMessage: "Try searching with a different term or discover new apps for Atlassian products.",
|
|
21
22
|
description: "Empty state sub-heading"
|
|
22
|
-
})),
|
|
23
|
+
})), jsx("div", {
|
|
23
24
|
css: externalLinkWrapper
|
|
24
|
-
},
|
|
25
|
+
}, jsx(Button, {
|
|
25
26
|
appearance: "primary",
|
|
26
27
|
target: "_blank",
|
|
27
28
|
href: "https://marketplace.atlassian.com/search?category=Macros&hosting=cloud&product=confluence",
|
|
28
29
|
onClick: onExternalLinkClick
|
|
29
|
-
},
|
|
30
|
+
}, jsx(FormattedMessage, {
|
|
30
31
|
id: "fabric.editor.elementbrowser.search.empty-state.sub-heading.link",
|
|
31
32
|
defaultMessage: "Explore Atlassian Marketplace",
|
|
32
33
|
description: "Empty state sub-heading external link"
|