@atlaskit/link-picker 1.37.4 → 1.38.0
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 +10 -0
- package/dist/cjs/common/generic-error-svg/index.js +7 -6
- package/dist/cjs/common/ui/empty-state/index.js +16 -13
- package/dist/cjs/ui/error-boundary/error-boundary-fallback/index.js +3 -6
- package/dist/cjs/ui/index.js +1 -1
- package/dist/cjs/ui/link-picker/search-results/link-search-error/index.js +2 -5
- package/dist/cjs/ui/link-picker/search-results/link-search-list/index.js +9 -7
- package/dist/cjs/ui/link-picker/search-results/link-search-list/link-search-no-results/index.js +10 -23
- package/dist/cjs/ui/link-picker/search-results/link-search-list/link-search-no-results/no-results-svg/index.js +6 -4
- package/dist/es2019/common/generic-error-svg/index.js +7 -6
- package/dist/es2019/common/ui/empty-state/index.js +17 -14
- package/dist/es2019/ui/error-boundary/error-boundary-fallback/index.js +3 -5
- package/dist/es2019/ui/index.js +1 -1
- package/dist/es2019/ui/link-picker/search-results/link-search-error/index.js +2 -5
- package/dist/es2019/ui/link-picker/search-results/link-search-list/index.js +4 -2
- package/dist/es2019/ui/link-picker/search-results/link-search-list/link-search-no-results/index.js +8 -20
- package/dist/es2019/ui/link-picker/search-results/link-search-list/link-search-no-results/no-results-svg/index.js +6 -4
- package/dist/esm/common/generic-error-svg/index.js +7 -6
- package/dist/esm/common/ui/empty-state/index.js +17 -14
- package/dist/esm/ui/error-boundary/error-boundary-fallback/index.js +3 -5
- package/dist/esm/ui/index.js +1 -1
- package/dist/esm/ui/link-picker/search-results/link-search-error/index.js +2 -5
- package/dist/esm/ui/link-picker/search-results/link-search-list/index.js +4 -2
- package/dist/esm/ui/link-picker/search-results/link-search-list/link-search-no-results/index.js +10 -22
- package/dist/esm/ui/link-picker/search-results/link-search-list/link-search-no-results/no-results-svg/index.js +6 -4
- package/dist/types/ui/link-picker/search-results/link-search-list/link-search-no-results/index.d.ts +2 -3
- package/dist/types-ts4.5/ui/link-picker/search-results/link-search-list/link-search-no-results/index.d.ts +2 -3
- package/package.json +4 -8
- package/dist/cjs/common/generic-error-svg/styled.js +0 -17
- package/dist/cjs/ui/link-picker/search-results/link-search-list/link-search-no-results/no-results-svg/styled.js +0 -17
- package/dist/cjs/ui/link-picker/search-results/link-search-list/link-search-no-results/styled.js +0 -21
- package/dist/es2019/common/generic-error-svg/styled.js +0 -10
- package/dist/es2019/ui/link-picker/search-results/link-search-list/link-search-no-results/no-results-svg/styled.js +0 -10
- package/dist/es2019/ui/link-picker/search-results/link-search-list/link-search-no-results/styled.js +0 -14
- package/dist/esm/common/generic-error-svg/styled.js +0 -10
- package/dist/esm/ui/link-picker/search-results/link-search-list/link-search-no-results/no-results-svg/styled.js +0 -10
- package/dist/esm/ui/link-picker/search-results/link-search-list/link-search-no-results/styled.js +0 -14
- package/dist/types/common/generic-error-svg/styled.d.ts +0 -1
- package/dist/types/ui/link-picker/search-results/link-search-list/link-search-no-results/no-results-svg/styled.d.ts +0 -1
- package/dist/types/ui/link-picker/search-results/link-search-list/link-search-no-results/styled.d.ts +0 -2
- package/dist/types-ts4.5/common/generic-error-svg/styled.d.ts +0 -1
- package/dist/types-ts4.5/ui/link-picker/search-results/link-search-list/link-search-no-results/no-results-svg/styled.d.ts +0 -1
- package/dist/types-ts4.5/ui/link-picker/search-results/link-search-list/link-search-no-results/styled.d.ts +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @atlaskit/link-picker
|
|
2
2
|
|
|
3
|
+
## 1.38.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#114894](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/114894)
|
|
8
|
+
[`e20ce1f008cd8`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/e20ce1f008cd8) -
|
|
9
|
+
Cleans up ff, no longer uses the `@atlaskit/empty-state` component and now directly leverages the
|
|
10
|
+
Heading Provider from `@atlaskit/heading` to allow more flexibility of the heading levels
|
|
11
|
+
rendered.
|
|
12
|
+
|
|
3
13
|
## 1.37.4
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
|
@@ -7,21 +7,22 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.GenericErrorSVG = void 0;
|
|
8
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
9
|
var _react = require("@emotion/react");
|
|
10
|
-
var _styled = require("./styled");
|
|
11
|
-
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
12
10
|
/** @jsx jsx */
|
|
13
11
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
14
12
|
|
|
13
|
+
var HEIGHT = 90;
|
|
14
|
+
var genericErrorStyles = (0, _react.css)({
|
|
15
|
+
height: "".concat(HEIGHT, "px"),
|
|
16
|
+
display: 'block'
|
|
17
|
+
});
|
|
15
18
|
var GenericErrorSVG = exports.GenericErrorSVG = function GenericErrorSVG(props) {
|
|
16
19
|
var id = 'link-picker-ui-generic-error-svg';
|
|
17
20
|
return (0, _react.jsx)("svg", (0, _extends2.default)({
|
|
18
21
|
height: "90",
|
|
19
22
|
viewBox: "0 0 164 212",
|
|
20
23
|
fill: "none",
|
|
21
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
22
|
-
|
|
23
|
-
,
|
|
24
|
-
css: _styled.genericErrorStyles
|
|
24
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
25
|
+
css: genericErrorStyles
|
|
25
26
|
}, props), (0, _react.jsx)("path", {
|
|
26
27
|
d: "m95.43 74.16 66.44 115.08c5.84 10.12-1.46 22.76-13.14 22.76H15.85c-11.68 0-18.98-12.65-13.14-22.76L69.15 74.16c5.84-10.12 20.44-10.12 26.28 0Zm-7.56 83.55 2.88-44.35c.34-5.29-3.86-9.78-9.16-9.78-5.31 0-9.51 4.48-9.16 9.78l2.88 44.35a6.3 6.3 0 0 0 6.28 5.89c3.31 0 6.06-2.58 6.28-5.89Zm-15.84 23.54c0 5.66 4.76 10.1 10.39 9.58 4.85-.45 8.73-4.5 8.83-9.37.11-5.45-4.31-9.94-9.73-9.94-5.23-.01-9.49 4.37-9.49 9.73Z",
|
|
27
28
|
fill: "url(#".concat(id, ")")
|
|
@@ -8,27 +8,30 @@ exports.EmptyState = void 0;
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _heading = _interopRequireDefault(require("@atlaskit/heading"));
|
|
10
10
|
var _primitives = require("@atlaskit/primitives");
|
|
11
|
+
var containerStyles = (0, _primitives.xcss)({
|
|
12
|
+
marginBlockStart: 'space.600',
|
|
13
|
+
marginBlockEnd: 'space.600',
|
|
14
|
+
textAlign: 'center'
|
|
15
|
+
});
|
|
11
16
|
var EmptyState = exports.EmptyState = function EmptyState(_ref) {
|
|
12
17
|
var testId = _ref.testId,
|
|
13
18
|
header = _ref.header,
|
|
14
19
|
description = _ref.description,
|
|
15
20
|
renderImage = _ref.renderImage;
|
|
16
|
-
return /*#__PURE__*/_react.default.createElement(_primitives.Flex
|
|
17
|
-
|
|
18
|
-
, {
|
|
19
|
-
xcss: (0, _primitives.xcss)({
|
|
20
|
-
marginBlockStart: 'space.600',
|
|
21
|
-
marginBlockEnd: 'space.600',
|
|
22
|
-
textAlign: 'center'
|
|
23
|
-
}),
|
|
21
|
+
return /*#__PURE__*/_react.default.createElement(_primitives.Flex, {
|
|
22
|
+
xcss: containerStyles,
|
|
24
23
|
testId: testId,
|
|
25
24
|
direction: "column",
|
|
26
25
|
alignItems: "center",
|
|
27
|
-
gap: "space.
|
|
28
|
-
}, renderImage === null || renderImage === void 0 ? void 0 : renderImage(), /*#__PURE__*/_react.default.createElement(
|
|
26
|
+
gap: "space.300"
|
|
27
|
+
}, renderImage === null || renderImage === void 0 ? void 0 : renderImage(), /*#__PURE__*/_react.default.createElement(_primitives.Flex, {
|
|
28
|
+
direction: "column",
|
|
29
|
+
alignItems: "center",
|
|
30
|
+
gap: "space.200"
|
|
31
|
+
}, /*#__PURE__*/_react.default.createElement(_heading.default, {
|
|
29
32
|
size: "medium"
|
|
30
|
-
}, header), description && /*#__PURE__*/_react.default.createElement(_primitives.
|
|
33
|
+
}, header), description && /*#__PURE__*/_react.default.createElement(_primitives.Text, {
|
|
31
34
|
as: "p",
|
|
32
|
-
color:
|
|
33
|
-
}, description));
|
|
35
|
+
color: "color.text"
|
|
36
|
+
}, description)));
|
|
34
37
|
};
|
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
exports.ErrorBoundaryFallback = void 0;
|
|
8
7
|
var _react = require("@emotion/react");
|
|
9
8
|
var _reactIntlNext = require("react-intl-next");
|
|
10
|
-
var _emptyState = _interopRequireDefault(require("@atlaskit/empty-state"));
|
|
11
9
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
12
10
|
var _constants = require("../../../common/constants");
|
|
13
11
|
var _genericErrorSvg = require("../../../common/generic-error-svg");
|
|
14
|
-
var
|
|
12
|
+
var _emptyState = require("../../../common/ui/empty-state");
|
|
15
13
|
var _minHeightContainer = require("../../../common/ui/min-height-container");
|
|
16
14
|
var _styled = require("../../link-picker/styled");
|
|
17
15
|
var _styled2 = require("./styled");
|
|
@@ -36,7 +34,6 @@ var ErrorBoundaryFallback = exports.ErrorBoundaryFallback = function ErrorBounda
|
|
|
36
34
|
var intl = (0, _reactIntlNext.useIntl)();
|
|
37
35
|
var header = intl.formatMessage(messages.heading);
|
|
38
36
|
var description = intl.formatMessage(messages.description);
|
|
39
|
-
var EmptyStateComponent = (0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.link-picker.remove-dst-empty-state') ? _emptyState2.EmptyState : _emptyState.default;
|
|
40
37
|
if ((0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.link-picker.fixed-height-search-results')) {
|
|
41
38
|
return (0, _react.jsx)(_minHeightContainer.MinHeightContainer
|
|
42
39
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
@@ -44,7 +41,7 @@ var ErrorBoundaryFallback = exports.ErrorBoundaryFallback = function ErrorBounda
|
|
|
44
41
|
css: _styled2.errorBoundaryFallbackStyles,
|
|
45
42
|
minHeight: _constants.LINK_PICKER_MIN_HEIGHT_IN_PX_FALLBACK,
|
|
46
43
|
"data-testid": "link-picker-root-error-boundary-ui"
|
|
47
|
-
}, (0, _react.jsx)(
|
|
44
|
+
}, (0, _react.jsx)(_emptyState.EmptyState, {
|
|
48
45
|
header: header,
|
|
49
46
|
renderImage: function renderImage() {
|
|
50
47
|
return (0, _react.jsx)(_genericErrorSvg.GenericErrorSVG, null);
|
|
@@ -57,7 +54,7 @@ var ErrorBoundaryFallback = exports.ErrorBoundaryFallback = function ErrorBounda
|
|
|
57
54
|
(0, _react.jsx)("div", {
|
|
58
55
|
css: _styled.rootContainerStyles,
|
|
59
56
|
"data-testid": "link-picker-root-error-boundary-ui"
|
|
60
|
-
}, (0, _react.jsx)(
|
|
57
|
+
}, (0, _react.jsx)(_emptyState.EmptyState, {
|
|
61
58
|
header: header,
|
|
62
59
|
renderImage: function renderImage() {
|
|
63
60
|
return (0, _react.jsx)(_genericErrorSvg.GenericErrorSVG, null);
|
package/dist/cjs/ui/index.js
CHANGED
|
@@ -26,7 +26,7 @@ var testIds = exports.testIds = {
|
|
|
26
26
|
};
|
|
27
27
|
var PACKAGE_DATA = exports.PACKAGE_DATA = {
|
|
28
28
|
packageName: "@atlaskit/link-picker" || '',
|
|
29
|
-
packageVersion: "1.
|
|
29
|
+
packageVersion: "1.38.0" || '',
|
|
30
30
|
componentName: _constants.COMPONENT_NAME,
|
|
31
31
|
source: _constants.COMPONENT_NAME
|
|
32
32
|
};
|
|
@@ -9,10 +9,8 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
9
9
|
var _react = require("@emotion/react");
|
|
10
10
|
var _reactIntlNext = require("react-intl-next");
|
|
11
11
|
var _button = _interopRequireDefault(require("@atlaskit/button"));
|
|
12
|
-
var _emptyState = _interopRequireDefault(require("@atlaskit/empty-state"));
|
|
13
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
14
12
|
var _genericErrorSvg = require("../../../../common/generic-error-svg");
|
|
15
|
-
var
|
|
13
|
+
var _emptyState = require("../../../../common/ui/empty-state");
|
|
16
14
|
/** @jsx jsx */
|
|
17
15
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
18
16
|
|
|
@@ -34,8 +32,7 @@ var testIds = exports.testIds = {
|
|
|
34
32
|
};
|
|
35
33
|
var LinkSearchError = exports.LinkSearchError = function LinkSearchError() {
|
|
36
34
|
var intl = (0, _reactIntlNext.useIntl)();
|
|
37
|
-
|
|
38
|
-
return (0, _react.jsx)(Component, {
|
|
35
|
+
return (0, _react.jsx)(_emptyState.EmptyState, {
|
|
39
36
|
testId: testIds.searchError,
|
|
40
37
|
header: intl.formatMessage(messages.searchErrorHeader),
|
|
41
38
|
description: (0, _react.jsx)(_reactIntlNext.FormattedMessage, (0, _extends2.default)({}, messages.searchErrorDescription, {
|
|
@@ -17,9 +17,8 @@ var _visuallyHidden = _interopRequireDefault(require("@atlaskit/visually-hidden"
|
|
|
17
17
|
var _minHeightContainer = require("../../../../common/ui/min-height-container");
|
|
18
18
|
var _handleNavKeyDown = require("../../../../common/utils/handleNavKeyDown");
|
|
19
19
|
var _linkSearchNoResults = require("./link-search-no-results");
|
|
20
|
-
var _styled = require("./link-search-no-results/styled");
|
|
21
20
|
var _listItem = require("./list-item");
|
|
22
|
-
var
|
|
21
|
+
var _styled = require("./styled");
|
|
23
22
|
var _useTrackResultsShown = require("./use-track-results-shown");
|
|
24
23
|
var _excluded = ["onChange", "onSelect", "onKeyDown", "items", "activeIndex", "selectedIndex", "isLoading", "ariaControls", "ariaLabelledBy", "ariaReadOnly", "role", "id", "hasSearchTerm", "activePlugin"];
|
|
25
24
|
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; }
|
|
@@ -47,6 +46,9 @@ var testIds = exports.testIds = _objectSpread(_objectSpread(_objectSpread({}, _l
|
|
|
47
46
|
searchResultLoadingIndicator: 'link-picker.results-loading-indicator',
|
|
48
47
|
tabsLoadingIndicator: 'link-picker.tabs-loading-indicator'
|
|
49
48
|
});
|
|
49
|
+
var emptyStateNoResultsWrapper = (0, _react2.css)({
|
|
50
|
+
minHeight: "var(--ds-space-200, 16px)"
|
|
51
|
+
});
|
|
50
52
|
var LinkSearchList = exports.LinkSearchList = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
51
53
|
var onChange = _ref.onChange,
|
|
52
54
|
onSelect = _ref.onSelect,
|
|
@@ -109,7 +111,7 @@ var LinkSearchList = exports.LinkSearchList = /*#__PURE__*/(0, _react.forwardRef
|
|
|
109
111
|
return (
|
|
110
112
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
111
113
|
(0, _react2.jsx)("div", {
|
|
112
|
-
css:
|
|
114
|
+
css: emptyStateNoResultsWrapper
|
|
113
115
|
}, activePlugin !== null && activePlugin !== void 0 && activePlugin.emptyStateNoResults ? activePlugin.emptyStateNoResults() : null)
|
|
114
116
|
);
|
|
115
117
|
}
|
|
@@ -120,7 +122,7 @@ var LinkSearchList = exports.LinkSearchList = /*#__PURE__*/(0, _react.forwardRef
|
|
|
120
122
|
if (items && items.length > 0) {
|
|
121
123
|
itemsContent = (0, _react2.jsx)(_react.Fragment, null, (0, _react2.jsx)("div", {
|
|
122
124
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
123
|
-
css:
|
|
125
|
+
css: _styled.listTitleStyles,
|
|
124
126
|
id: testIds.resultListTitle,
|
|
125
127
|
"data-testid": testIds.resultListTitle
|
|
126
128
|
}, (0, _react2.jsx)(_reactIntlNext.FormattedMessage, linkListTitle)), (0, _react2.jsx)(_visuallyHidden.default, {
|
|
@@ -136,7 +138,7 @@ var LinkSearchList = exports.LinkSearchList = /*#__PURE__*/(0, _react.forwardRef
|
|
|
136
138
|
role: role
|
|
137
139
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
138
140
|
,
|
|
139
|
-
css:
|
|
141
|
+
css: _styled.listStyles,
|
|
140
142
|
"aria-controls": "fabric.smartcard.linkpicker.suggested.results",
|
|
141
143
|
"aria-labelledby": testIds.resultListTitle,
|
|
142
144
|
"aria-readonly": ariaReadOnly,
|
|
@@ -166,7 +168,7 @@ var LinkSearchList = exports.LinkSearchList = /*#__PURE__*/(0, _react.forwardRef
|
|
|
166
168
|
minHeight: (0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.link-picker.fixed-height-search-results') ? '50px' : '80px'
|
|
167
169
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
168
170
|
,
|
|
169
|
-
css:
|
|
171
|
+
css: _styled.spinnerContainerStyles
|
|
170
172
|
}, (0, _react2.jsx)(_spinner.default, {
|
|
171
173
|
testId: testIds.searchResultLoadingIndicator,
|
|
172
174
|
size: "medium"
|
|
@@ -176,7 +178,7 @@ var LinkSearchList = exports.LinkSearchList = /*#__PURE__*/(0, _react.forwardRef
|
|
|
176
178
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
177
179
|
(0, _react2.jsx)("div", (0, _extends2.default)({
|
|
178
180
|
ref: ref,
|
|
179
|
-
css:
|
|
181
|
+
css: _styled.listContainerStyles
|
|
180
182
|
}, restProps), itemsContent, loadingContent)
|
|
181
183
|
);
|
|
182
184
|
});
|
package/dist/cjs/ui/link-picker/search-results/link-search-list/link-search-no-results/index.js
CHANGED
|
@@ -5,16 +5,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.testIds = exports.messages = exports.NoResults = void 0;
|
|
8
|
-
var _react = require("
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _reactIntlNext = require("react-intl-next");
|
|
10
|
-
var _emptyState =
|
|
11
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
12
|
-
var _emptyState2 = require("../../../../../common/ui/empty-state");
|
|
10
|
+
var _emptyState = require("../../../../../common/ui/empty-state");
|
|
13
11
|
var _noResultsSvg = require("./no-results-svg");
|
|
14
|
-
var _styled = require("./styled");
|
|
15
|
-
/** @jsx jsx */
|
|
16
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
17
|
-
|
|
18
12
|
var messages = exports.messages = (0, _reactIntlNext.defineMessages)({
|
|
19
13
|
noResults: {
|
|
20
14
|
id: 'fabric.linkPicker.search.noResults.heading',
|
|
@@ -32,19 +26,12 @@ var testIds = exports.testIds = {
|
|
|
32
26
|
};
|
|
33
27
|
var NoResults = exports.NoResults = function NoResults() {
|
|
34
28
|
var intl = (0, _reactIntlNext.useIntl)();
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
headingLevel: (0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.link-picker.remove-dst-empty-state') ? undefined : 3,
|
|
44
|
-
description: intl.formatMessage(messages.noResultsDescription),
|
|
45
|
-
renderImage: function renderImage() {
|
|
46
|
-
return (0, _react.jsx)(_noResultsSvg.NoResultsSVG, null);
|
|
47
|
-
}
|
|
48
|
-
}))
|
|
49
|
-
);
|
|
29
|
+
return /*#__PURE__*/_react.default.createElement(_emptyState.EmptyState, {
|
|
30
|
+
testId: testIds.emptyResultPage,
|
|
31
|
+
header: intl.formatMessage(messages.noResults),
|
|
32
|
+
description: intl.formatMessage(messages.noResultsDescription),
|
|
33
|
+
renderImage: function renderImage() {
|
|
34
|
+
return /*#__PURE__*/_react.default.createElement(_noResultsSvg.NoResultsSVG, null);
|
|
35
|
+
}
|
|
36
|
+
});
|
|
50
37
|
};
|
|
@@ -5,16 +5,18 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.NoResultsSVG = void 0;
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
|
-
var _styled = require("./styled");
|
|
9
|
-
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
10
8
|
/** @jsx jsx */
|
|
11
9
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
12
10
|
|
|
11
|
+
var HEIGHT = 120;
|
|
12
|
+
var noResultsSVGStyles = (0, _react.css)({
|
|
13
|
+
height: "".concat(HEIGHT, "px"),
|
|
14
|
+
display: 'block'
|
|
15
|
+
});
|
|
13
16
|
var NoResultsSVG = exports.NoResultsSVG = function NoResultsSVG() {
|
|
14
17
|
var id = 'link-picker-ui-no-results-svg';
|
|
15
18
|
return (0, _react.jsx)("svg", {
|
|
16
|
-
|
|
17
|
-
css: _styled.noResultsSVGStyles,
|
|
19
|
+
css: noResultsSVGStyles,
|
|
18
20
|
height: "120",
|
|
19
21
|
viewBox: "0 0 208 191",
|
|
20
22
|
fill: "none",
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
3
2
|
/** @jsx jsx */
|
|
4
3
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
5
|
-
import { jsx } from '@emotion/react';
|
|
6
|
-
|
|
4
|
+
import { css, jsx } from '@emotion/react';
|
|
5
|
+
const HEIGHT = 90;
|
|
6
|
+
const genericErrorStyles = css({
|
|
7
|
+
height: `${HEIGHT}px`,
|
|
8
|
+
display: 'block'
|
|
9
|
+
});
|
|
7
10
|
export const GenericErrorSVG = props => {
|
|
8
11
|
const id = 'link-picker-ui-generic-error-svg';
|
|
9
12
|
return jsx("svg", _extends({
|
|
10
13
|
height: "90",
|
|
11
14
|
viewBox: "0 0 164 212",
|
|
12
15
|
fill: "none",
|
|
13
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
14
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
15
|
-
,
|
|
16
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
16
17
|
css: genericErrorStyles
|
|
17
18
|
}, props), jsx("path", {
|
|
18
19
|
d: "m95.43 74.16 66.44 115.08c5.84 10.12-1.46 22.76-13.14 22.76H15.85c-11.68 0-18.98-12.65-13.14-22.76L69.15 74.16c5.84-10.12 20.44-10.12 26.28 0Zm-7.56 83.55 2.88-44.35c.34-5.29-3.86-9.78-9.16-9.78-5.31 0-9.51 4.48-9.16 9.78l2.88 44.35a6.3 6.3 0 0 0 6.28 5.89c3.31 0 6.06-2.58 6.28-5.89Zm-15.84 23.54c0 5.66 4.76 10.1 10.39 9.58 4.85-.45 8.73-4.5 8.83-9.37.11-5.45-4.31-9.94-9.73-9.94-5.23-.01-9.49 4.37-9.49 9.73Z",
|
|
@@ -1,28 +1,31 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Heading from '@atlaskit/heading';
|
|
3
|
-
import {
|
|
3
|
+
import { Flex, Text, xcss } from '@atlaskit/primitives';
|
|
4
|
+
const containerStyles = xcss({
|
|
5
|
+
marginBlockStart: 'space.600',
|
|
6
|
+
marginBlockEnd: 'space.600',
|
|
7
|
+
textAlign: 'center'
|
|
8
|
+
});
|
|
4
9
|
export const EmptyState = ({
|
|
5
10
|
testId,
|
|
6
11
|
header,
|
|
7
12
|
description,
|
|
8
13
|
renderImage
|
|
9
14
|
}) => {
|
|
10
|
-
return /*#__PURE__*/React.createElement(Flex
|
|
11
|
-
|
|
12
|
-
, {
|
|
13
|
-
xcss: xcss({
|
|
14
|
-
marginBlockStart: 'space.600',
|
|
15
|
-
marginBlockEnd: 'space.600',
|
|
16
|
-
textAlign: 'center'
|
|
17
|
-
}),
|
|
15
|
+
return /*#__PURE__*/React.createElement(Flex, {
|
|
16
|
+
xcss: containerStyles,
|
|
18
17
|
testId: testId,
|
|
19
18
|
direction: "column",
|
|
20
19
|
alignItems: "center",
|
|
21
|
-
gap: "space.
|
|
22
|
-
}, renderImage === null || renderImage === void 0 ? void 0 : renderImage(), /*#__PURE__*/React.createElement(
|
|
20
|
+
gap: "space.300"
|
|
21
|
+
}, renderImage === null || renderImage === void 0 ? void 0 : renderImage(), /*#__PURE__*/React.createElement(Flex, {
|
|
22
|
+
direction: "column",
|
|
23
|
+
alignItems: "center",
|
|
24
|
+
gap: "space.200"
|
|
25
|
+
}, /*#__PURE__*/React.createElement(Heading, {
|
|
23
26
|
size: "medium"
|
|
24
|
-
}, header), description && /*#__PURE__*/React.createElement(
|
|
27
|
+
}, header), description && /*#__PURE__*/React.createElement(Text, {
|
|
25
28
|
as: "p",
|
|
26
|
-
color:
|
|
27
|
-
}, description));
|
|
29
|
+
color: "color.text"
|
|
30
|
+
}, description)));
|
|
28
31
|
};
|
|
@@ -2,11 +2,10 @@
|
|
|
2
2
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
3
3
|
import { jsx } from '@emotion/react';
|
|
4
4
|
import { defineMessages, useIntl } from 'react-intl-next';
|
|
5
|
-
import EmptyState from '@atlaskit/empty-state';
|
|
6
5
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
7
6
|
import { LINK_PICKER_MIN_HEIGHT_IN_PX_FALLBACK } from '../../../common/constants';
|
|
8
7
|
import { GenericErrorSVG } from '../../../common/generic-error-svg';
|
|
9
|
-
import { EmptyState
|
|
8
|
+
import { EmptyState } from '../../../common/ui/empty-state';
|
|
10
9
|
import { MinHeightContainer } from '../../../common/ui/min-height-container';
|
|
11
10
|
// eslint-disable-next-line @atlassian/tangerine/import/no-parent-imports
|
|
12
11
|
import { rootContainerStyles } from '../../link-picker/styled';
|
|
@@ -27,7 +26,6 @@ export const ErrorBoundaryFallback = () => {
|
|
|
27
26
|
const intl = useIntl();
|
|
28
27
|
const header = intl.formatMessage(messages.heading);
|
|
29
28
|
const description = intl.formatMessage(messages.description);
|
|
30
|
-
const EmptyStateComponent = getBooleanFF('platform.linking-platform.link-picker.remove-dst-empty-state') ? EmptyStateInternal : EmptyState;
|
|
31
29
|
if (getBooleanFF('platform.linking-platform.link-picker.fixed-height-search-results')) {
|
|
32
30
|
return jsx(MinHeightContainer
|
|
33
31
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
@@ -35,7 +33,7 @@ export const ErrorBoundaryFallback = () => {
|
|
|
35
33
|
css: errorBoundaryFallbackStyles,
|
|
36
34
|
minHeight: LINK_PICKER_MIN_HEIGHT_IN_PX_FALLBACK,
|
|
37
35
|
"data-testid": "link-picker-root-error-boundary-ui"
|
|
38
|
-
}, jsx(
|
|
36
|
+
}, jsx(EmptyState, {
|
|
39
37
|
header: header,
|
|
40
38
|
renderImage: () => jsx(GenericErrorSVG, null),
|
|
41
39
|
description: description
|
|
@@ -46,7 +44,7 @@ export const ErrorBoundaryFallback = () => {
|
|
|
46
44
|
jsx("div", {
|
|
47
45
|
css: rootContainerStyles,
|
|
48
46
|
"data-testid": "link-picker-root-error-boundary-ui"
|
|
49
|
-
}, jsx(
|
|
47
|
+
}, jsx(EmptyState, {
|
|
50
48
|
header: header,
|
|
51
49
|
renderImage: () => jsx(GenericErrorSVG, null),
|
|
52
50
|
description: description
|
package/dist/es2019/ui/index.js
CHANGED
|
@@ -4,10 +4,8 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
4
4
|
import { jsx } from '@emotion/react';
|
|
5
5
|
import { defineMessages, FormattedMessage, useIntl } from 'react-intl-next';
|
|
6
6
|
import Button from '@atlaskit/button';
|
|
7
|
-
import EmptyState from '@atlaskit/empty-state';
|
|
8
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
9
7
|
import { GenericErrorSVG } from '../../../../common/generic-error-svg';
|
|
10
|
-
import { EmptyState
|
|
8
|
+
import { EmptyState } from '../../../../common/ui/empty-state';
|
|
11
9
|
export const CONTACT_SUPPORT_LINK = 'https://support.atlassian.com/contact/';
|
|
12
10
|
export const messages = defineMessages({
|
|
13
11
|
searchErrorHeader: {
|
|
@@ -26,8 +24,7 @@ export const testIds = {
|
|
|
26
24
|
};
|
|
27
25
|
export const LinkSearchError = () => {
|
|
28
26
|
const intl = useIntl();
|
|
29
|
-
|
|
30
|
-
return jsx(Component, {
|
|
27
|
+
return jsx(EmptyState, {
|
|
31
28
|
testId: testIds.searchError,
|
|
32
29
|
header: intl.formatMessage(messages.searchErrorHeader),
|
|
33
30
|
description: jsx(FormattedMessage, _extends({}, messages.searchErrorDescription, {
|
|
@@ -3,7 +3,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
3
3
|
import { forwardRef, Fragment, useCallback, useRef } from 'react';
|
|
4
4
|
|
|
5
5
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
|
-
import { jsx } from '@emotion/react';
|
|
6
|
+
import { css, jsx } from '@emotion/react';
|
|
7
7
|
import { defineMessages, FormattedMessage } from 'react-intl-next';
|
|
8
8
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
9
9
|
import Spinner from '@atlaskit/spinner';
|
|
@@ -11,7 +11,6 @@ import VisuallyHidden from '@atlaskit/visually-hidden';
|
|
|
11
11
|
import { MinHeightContainer } from '../../../../common/ui/min-height-container';
|
|
12
12
|
import { handleNavKeyDown } from '../../../../common/utils/handleNavKeyDown';
|
|
13
13
|
import { NoResults, testIds as noResultsTestIds } from './link-search-no-results';
|
|
14
|
-
import { emptyStateNoResultsWrapper } from './link-search-no-results/styled';
|
|
15
14
|
import { LinkSearchListItem, testIds as searchResultItemTestIds } from './list-item';
|
|
16
15
|
import { listContainerStyles, listStyles, listTitleStyles, spinnerContainerStyles } from './styled';
|
|
17
16
|
import { useTrackResultsShown } from './use-track-results-shown';
|
|
@@ -40,6 +39,9 @@ export const testIds = {
|
|
|
40
39
|
searchResultLoadingIndicator: 'link-picker.results-loading-indicator',
|
|
41
40
|
tabsLoadingIndicator: 'link-picker.tabs-loading-indicator'
|
|
42
41
|
};
|
|
42
|
+
const emptyStateNoResultsWrapper = css({
|
|
43
|
+
minHeight: "var(--ds-space-200, 16px)"
|
|
44
|
+
});
|
|
43
45
|
export const LinkSearchList = /*#__PURE__*/forwardRef(({
|
|
44
46
|
onChange,
|
|
45
47
|
onSelect,
|
package/dist/es2019/ui/link-picker/search-results/link-search-list/link-search-no-results/index.js
CHANGED
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
3
|
-
import { jsx } from '@emotion/react';
|
|
1
|
+
import React from 'react';
|
|
4
2
|
import { defineMessages, useIntl } from 'react-intl-next';
|
|
5
|
-
import EmptyState from '
|
|
6
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
7
|
-
import { EmptyState as EmptyStateInternal } from '../../../../../common/ui/empty-state';
|
|
3
|
+
import { EmptyState } from '../../../../../common/ui/empty-state';
|
|
8
4
|
import { NoResultsSVG } from './no-results-svg';
|
|
9
|
-
import { emptyStateWrapperStyles } from './styled';
|
|
10
5
|
export const messages = defineMessages({
|
|
11
6
|
noResults: {
|
|
12
7
|
id: 'fabric.linkPicker.search.noResults.heading',
|
|
@@ -24,17 +19,10 @@ export const testIds = {
|
|
|
24
19
|
};
|
|
25
20
|
export const NoResults = () => {
|
|
26
21
|
const intl = useIntl();
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
testId: testIds.emptyResultPage,
|
|
34
|
-
header: intl.formatMessage(messages.noResults),
|
|
35
|
-
headingLevel: getBooleanFF('platform.linking-platform.link-picker.remove-dst-empty-state') ? undefined : 3,
|
|
36
|
-
description: intl.formatMessage(messages.noResultsDescription),
|
|
37
|
-
renderImage: () => jsx(NoResultsSVG, null)
|
|
38
|
-
}))
|
|
39
|
-
);
|
|
22
|
+
return /*#__PURE__*/React.createElement(EmptyState, {
|
|
23
|
+
testId: testIds.emptyResultPage,
|
|
24
|
+
header: intl.formatMessage(messages.noResults),
|
|
25
|
+
description: intl.formatMessage(messages.noResultsDescription),
|
|
26
|
+
renderImage: () => /*#__PURE__*/React.createElement(NoResultsSVG, null)
|
|
27
|
+
});
|
|
40
28
|
};
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
2
1
|
/** @jsx jsx */
|
|
3
2
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
4
|
-
import { jsx } from '@emotion/react';
|
|
5
|
-
|
|
3
|
+
import { css, jsx } from '@emotion/react';
|
|
4
|
+
const HEIGHT = 120;
|
|
5
|
+
const noResultsSVGStyles = css({
|
|
6
|
+
height: `${HEIGHT}px`,
|
|
7
|
+
display: 'block'
|
|
8
|
+
});
|
|
6
9
|
export const NoResultsSVG = () => {
|
|
7
10
|
const id = 'link-picker-ui-no-results-svg';
|
|
8
11
|
return jsx("svg", {
|
|
9
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
10
12
|
css: noResultsSVGStyles,
|
|
11
13
|
height: "120",
|
|
12
14
|
viewBox: "0 0 208 191",
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
3
2
|
/** @jsx jsx */
|
|
4
3
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
5
|
-
import { jsx } from '@emotion/react';
|
|
6
|
-
|
|
4
|
+
import { css, jsx } from '@emotion/react';
|
|
5
|
+
var HEIGHT = 90;
|
|
6
|
+
var genericErrorStyles = css({
|
|
7
|
+
height: "".concat(HEIGHT, "px"),
|
|
8
|
+
display: 'block'
|
|
9
|
+
});
|
|
7
10
|
export var GenericErrorSVG = function GenericErrorSVG(props) {
|
|
8
11
|
var id = 'link-picker-ui-generic-error-svg';
|
|
9
12
|
return jsx("svg", _extends({
|
|
10
13
|
height: "90",
|
|
11
14
|
viewBox: "0 0 164 212",
|
|
12
15
|
fill: "none",
|
|
13
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
14
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
15
|
-
,
|
|
16
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
16
17
|
css: genericErrorStyles
|
|
17
18
|
}, props), jsx("path", {
|
|
18
19
|
d: "m95.43 74.16 66.44 115.08c5.84 10.12-1.46 22.76-13.14 22.76H15.85c-11.68 0-18.98-12.65-13.14-22.76L69.15 74.16c5.84-10.12 20.44-10.12 26.28 0Zm-7.56 83.55 2.88-44.35c.34-5.29-3.86-9.78-9.16-9.78-5.31 0-9.51 4.48-9.16 9.78l2.88 44.35a6.3 6.3 0 0 0 6.28 5.89c3.31 0 6.06-2.58 6.28-5.89Zm-15.84 23.54c0 5.66 4.76 10.1 10.39 9.58 4.85-.45 8.73-4.5 8.83-9.37.11-5.45-4.31-9.94-9.73-9.94-5.23-.01-9.49 4.37-9.49 9.73Z",
|
|
@@ -1,27 +1,30 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Heading from '@atlaskit/heading';
|
|
3
|
-
import {
|
|
3
|
+
import { Flex, Text, xcss } from '@atlaskit/primitives';
|
|
4
|
+
var containerStyles = xcss({
|
|
5
|
+
marginBlockStart: 'space.600',
|
|
6
|
+
marginBlockEnd: 'space.600',
|
|
7
|
+
textAlign: 'center'
|
|
8
|
+
});
|
|
4
9
|
export var EmptyState = function EmptyState(_ref) {
|
|
5
10
|
var testId = _ref.testId,
|
|
6
11
|
header = _ref.header,
|
|
7
12
|
description = _ref.description,
|
|
8
13
|
renderImage = _ref.renderImage;
|
|
9
|
-
return /*#__PURE__*/React.createElement(Flex
|
|
10
|
-
|
|
11
|
-
, {
|
|
12
|
-
xcss: xcss({
|
|
13
|
-
marginBlockStart: 'space.600',
|
|
14
|
-
marginBlockEnd: 'space.600',
|
|
15
|
-
textAlign: 'center'
|
|
16
|
-
}),
|
|
14
|
+
return /*#__PURE__*/React.createElement(Flex, {
|
|
15
|
+
xcss: containerStyles,
|
|
17
16
|
testId: testId,
|
|
18
17
|
direction: "column",
|
|
19
18
|
alignItems: "center",
|
|
20
|
-
gap: "space.
|
|
21
|
-
}, renderImage === null || renderImage === void 0 ? void 0 : renderImage(), /*#__PURE__*/React.createElement(
|
|
19
|
+
gap: "space.300"
|
|
20
|
+
}, renderImage === null || renderImage === void 0 ? void 0 : renderImage(), /*#__PURE__*/React.createElement(Flex, {
|
|
21
|
+
direction: "column",
|
|
22
|
+
alignItems: "center",
|
|
23
|
+
gap: "space.200"
|
|
24
|
+
}, /*#__PURE__*/React.createElement(Heading, {
|
|
22
25
|
size: "medium"
|
|
23
|
-
}, header), description && /*#__PURE__*/React.createElement(
|
|
26
|
+
}, header), description && /*#__PURE__*/React.createElement(Text, {
|
|
24
27
|
as: "p",
|
|
25
|
-
color:
|
|
26
|
-
}, description));
|
|
28
|
+
color: "color.text"
|
|
29
|
+
}, description)));
|
|
27
30
|
};
|
|
@@ -2,11 +2,10 @@
|
|
|
2
2
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
3
3
|
import { jsx } from '@emotion/react';
|
|
4
4
|
import { defineMessages, useIntl } from 'react-intl-next';
|
|
5
|
-
import EmptyState from '@atlaskit/empty-state';
|
|
6
5
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
7
6
|
import { LINK_PICKER_MIN_HEIGHT_IN_PX_FALLBACK } from '../../../common/constants';
|
|
8
7
|
import { GenericErrorSVG } from '../../../common/generic-error-svg';
|
|
9
|
-
import { EmptyState
|
|
8
|
+
import { EmptyState } from '../../../common/ui/empty-state';
|
|
10
9
|
import { MinHeightContainer } from '../../../common/ui/min-height-container';
|
|
11
10
|
// eslint-disable-next-line @atlassian/tangerine/import/no-parent-imports
|
|
12
11
|
import { rootContainerStyles } from '../../link-picker/styled';
|
|
@@ -27,7 +26,6 @@ export var ErrorBoundaryFallback = function ErrorBoundaryFallback() {
|
|
|
27
26
|
var intl = useIntl();
|
|
28
27
|
var header = intl.formatMessage(messages.heading);
|
|
29
28
|
var description = intl.formatMessage(messages.description);
|
|
30
|
-
var EmptyStateComponent = getBooleanFF('platform.linking-platform.link-picker.remove-dst-empty-state') ? EmptyStateInternal : EmptyState;
|
|
31
29
|
if (getBooleanFF('platform.linking-platform.link-picker.fixed-height-search-results')) {
|
|
32
30
|
return jsx(MinHeightContainer
|
|
33
31
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
@@ -35,7 +33,7 @@ export var ErrorBoundaryFallback = function ErrorBoundaryFallback() {
|
|
|
35
33
|
css: errorBoundaryFallbackStyles,
|
|
36
34
|
minHeight: LINK_PICKER_MIN_HEIGHT_IN_PX_FALLBACK,
|
|
37
35
|
"data-testid": "link-picker-root-error-boundary-ui"
|
|
38
|
-
}, jsx(
|
|
36
|
+
}, jsx(EmptyState, {
|
|
39
37
|
header: header,
|
|
40
38
|
renderImage: function renderImage() {
|
|
41
39
|
return jsx(GenericErrorSVG, null);
|
|
@@ -48,7 +46,7 @@ export var ErrorBoundaryFallback = function ErrorBoundaryFallback() {
|
|
|
48
46
|
jsx("div", {
|
|
49
47
|
css: rootContainerStyles,
|
|
50
48
|
"data-testid": "link-picker-root-error-boundary-ui"
|
|
51
|
-
}, jsx(
|
|
49
|
+
}, jsx(EmptyState, {
|
|
52
50
|
header: header,
|
|
53
51
|
renderImage: function renderImage() {
|
|
54
52
|
return jsx(GenericErrorSVG, null);
|
package/dist/esm/ui/index.js
CHANGED
|
@@ -4,10 +4,8 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
4
4
|
import { jsx } from '@emotion/react';
|
|
5
5
|
import { defineMessages, FormattedMessage, useIntl } from 'react-intl-next';
|
|
6
6
|
import Button from '@atlaskit/button';
|
|
7
|
-
import EmptyState from '@atlaskit/empty-state';
|
|
8
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
9
7
|
import { GenericErrorSVG } from '../../../../common/generic-error-svg';
|
|
10
|
-
import { EmptyState
|
|
8
|
+
import { EmptyState } from '../../../../common/ui/empty-state';
|
|
11
9
|
export var CONTACT_SUPPORT_LINK = 'https://support.atlassian.com/contact/';
|
|
12
10
|
export var messages = defineMessages({
|
|
13
11
|
searchErrorHeader: {
|
|
@@ -26,8 +24,7 @@ export var testIds = {
|
|
|
26
24
|
};
|
|
27
25
|
export var LinkSearchError = function LinkSearchError() {
|
|
28
26
|
var intl = useIntl();
|
|
29
|
-
|
|
30
|
-
return jsx(Component, {
|
|
27
|
+
return jsx(EmptyState, {
|
|
31
28
|
testId: testIds.searchError,
|
|
32
29
|
header: intl.formatMessage(messages.searchErrorHeader),
|
|
33
30
|
description: jsx(FormattedMessage, _extends({}, messages.searchErrorDescription, {
|
|
@@ -8,7 +8,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
8
8
|
import { forwardRef, Fragment, useCallback, useRef } from 'react';
|
|
9
9
|
|
|
10
10
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
11
|
-
import { jsx } from '@emotion/react';
|
|
11
|
+
import { css, jsx } from '@emotion/react';
|
|
12
12
|
import { defineMessages, FormattedMessage } from 'react-intl-next';
|
|
13
13
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
14
14
|
import Spinner from '@atlaskit/spinner';
|
|
@@ -16,7 +16,6 @@ import VisuallyHidden from '@atlaskit/visually-hidden';
|
|
|
16
16
|
import { MinHeightContainer } from '../../../../common/ui/min-height-container';
|
|
17
17
|
import { handleNavKeyDown } from '../../../../common/utils/handleNavKeyDown';
|
|
18
18
|
import { NoResults, testIds as noResultsTestIds } from './link-search-no-results';
|
|
19
|
-
import { emptyStateNoResultsWrapper } from './link-search-no-results/styled';
|
|
20
19
|
import { LinkSearchListItem, testIds as searchResultItemTestIds } from './list-item';
|
|
21
20
|
import { listContainerStyles, listStyles, listTitleStyles, spinnerContainerStyles } from './styled';
|
|
22
21
|
import { useTrackResultsShown } from './use-track-results-shown';
|
|
@@ -43,6 +42,9 @@ export var testIds = _objectSpread(_objectSpread(_objectSpread({}, noResultsTest
|
|
|
43
42
|
searchResultLoadingIndicator: 'link-picker.results-loading-indicator',
|
|
44
43
|
tabsLoadingIndicator: 'link-picker.tabs-loading-indicator'
|
|
45
44
|
});
|
|
45
|
+
var emptyStateNoResultsWrapper = css({
|
|
46
|
+
minHeight: "var(--ds-space-200, 16px)"
|
|
47
|
+
});
|
|
46
48
|
export var LinkSearchList = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
47
49
|
var onChange = _ref.onChange,
|
|
48
50
|
onSelect = _ref.onSelect,
|
package/dist/esm/ui/link-picker/search-results/link-search-list/link-search-no-results/index.js
CHANGED
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
3
|
-
import { jsx } from '@emotion/react';
|
|
1
|
+
import React from 'react';
|
|
4
2
|
import { defineMessages, useIntl } from 'react-intl-next';
|
|
5
|
-
import EmptyState from '
|
|
6
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
7
|
-
import { EmptyState as EmptyStateInternal } from '../../../../../common/ui/empty-state';
|
|
3
|
+
import { EmptyState } from '../../../../../common/ui/empty-state';
|
|
8
4
|
import { NoResultsSVG } from './no-results-svg';
|
|
9
|
-
import { emptyStateWrapperStyles } from './styled';
|
|
10
5
|
export var messages = defineMessages({
|
|
11
6
|
noResults: {
|
|
12
7
|
id: 'fabric.linkPicker.search.noResults.heading',
|
|
@@ -24,19 +19,12 @@ export var testIds = {
|
|
|
24
19
|
};
|
|
25
20
|
export var NoResults = function NoResults() {
|
|
26
21
|
var intl = useIntl();
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
headingLevel: getBooleanFF('platform.linking-platform.link-picker.remove-dst-empty-state') ? undefined : 3,
|
|
36
|
-
description: intl.formatMessage(messages.noResultsDescription),
|
|
37
|
-
renderImage: function renderImage() {
|
|
38
|
-
return jsx(NoResultsSVG, null);
|
|
39
|
-
}
|
|
40
|
-
}))
|
|
41
|
-
);
|
|
22
|
+
return /*#__PURE__*/React.createElement(EmptyState, {
|
|
23
|
+
testId: testIds.emptyResultPage,
|
|
24
|
+
header: intl.formatMessage(messages.noResults),
|
|
25
|
+
description: intl.formatMessage(messages.noResultsDescription),
|
|
26
|
+
renderImage: function renderImage() {
|
|
27
|
+
return /*#__PURE__*/React.createElement(NoResultsSVG, null);
|
|
28
|
+
}
|
|
29
|
+
});
|
|
42
30
|
};
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
2
1
|
/** @jsx jsx */
|
|
3
2
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
4
|
-
import { jsx } from '@emotion/react';
|
|
5
|
-
|
|
3
|
+
import { css, jsx } from '@emotion/react';
|
|
4
|
+
var HEIGHT = 120;
|
|
5
|
+
var noResultsSVGStyles = css({
|
|
6
|
+
height: "".concat(HEIGHT, "px"),
|
|
7
|
+
display: 'block'
|
|
8
|
+
});
|
|
6
9
|
export var NoResultsSVG = function NoResultsSVG() {
|
|
7
10
|
var id = 'link-picker-ui-no-results-svg';
|
|
8
11
|
return jsx("svg", {
|
|
9
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
10
12
|
css: noResultsSVGStyles,
|
|
11
13
|
height: "120",
|
|
12
14
|
viewBox: "0 0 208 191",
|
package/dist/types/ui/link-picker/search-results/link-search-list/link-search-no-results/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { jsx } from '@emotion/react';
|
|
1
|
+
/// <reference types="react" />
|
|
3
2
|
export declare const messages: {
|
|
4
3
|
noResults: {
|
|
5
4
|
id: string;
|
|
@@ -15,4 +14,4 @@ export declare const messages: {
|
|
|
15
14
|
export declare const testIds: {
|
|
16
15
|
emptyResultPage: string;
|
|
17
16
|
};
|
|
18
|
-
export declare const NoResults: () =>
|
|
17
|
+
export declare const NoResults: () => JSX.Element;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { jsx } from '@emotion/react';
|
|
1
|
+
/// <reference types="react" />
|
|
3
2
|
export declare const messages: {
|
|
4
3
|
noResults: {
|
|
5
4
|
id: string;
|
|
@@ -15,4 +14,4 @@ export declare const messages: {
|
|
|
15
14
|
export declare const testIds: {
|
|
16
15
|
emptyResultPage: string;
|
|
17
16
|
};
|
|
18
|
-
export declare const NoResults: () =>
|
|
17
|
+
export declare const NoResults: () => JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/link-picker",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.38.0",
|
|
4
4
|
"description": "Standalone link picker",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"publishConfig": {
|
|
@@ -47,9 +47,6 @@
|
|
|
47
47
|
"platform.linking-platform.link-picker.enable-jira-create": {
|
|
48
48
|
"type": "boolean"
|
|
49
49
|
},
|
|
50
|
-
"platform.linking-platform.link-picker.remove-dst-empty-state": {
|
|
51
|
-
"type": "boolean"
|
|
52
|
-
},
|
|
53
50
|
"platform.linking-platform.link-picker.translations-map": {
|
|
54
51
|
"type": "boolean"
|
|
55
52
|
}
|
|
@@ -60,21 +57,20 @@
|
|
|
60
57
|
"dependencies": {
|
|
61
58
|
"@atlaskit/analytics-next": "^9.3.0",
|
|
62
59
|
"@atlaskit/button": "^18.0.0",
|
|
63
|
-
"@atlaskit/empty-state": "^7.9.0",
|
|
64
60
|
"@atlaskit/form": "^10.4.0",
|
|
65
61
|
"@atlaskit/frontend-utilities": "^2.7.0",
|
|
66
62
|
"@atlaskit/heading": "^2.4.0",
|
|
67
63
|
"@atlaskit/icon": "^22.4.0",
|
|
68
64
|
"@atlaskit/intl-messages-provider": "^1.0.2",
|
|
69
65
|
"@atlaskit/linking-common": "^5.7.0",
|
|
70
|
-
"@atlaskit/onboarding": "^11.
|
|
66
|
+
"@atlaskit/onboarding": "^11.8.0",
|
|
71
67
|
"@atlaskit/platform-feature-flags": "^0.2.1",
|
|
72
|
-
"@atlaskit/primitives": "^8.
|
|
68
|
+
"@atlaskit/primitives": "^8.2.0",
|
|
73
69
|
"@atlaskit/spinner": "^16.2.0",
|
|
74
70
|
"@atlaskit/tabs": "^16.2.0",
|
|
75
71
|
"@atlaskit/textfield": "^6.4.0",
|
|
76
72
|
"@atlaskit/theme": "^12.11.0",
|
|
77
|
-
"@atlaskit/tokens": "^1.
|
|
73
|
+
"@atlaskit/tokens": "^1.53.0",
|
|
78
74
|
"@atlaskit/tooltip": "^18.5.0",
|
|
79
75
|
"@atlaskit/ufo": "^0.2.0",
|
|
80
76
|
"@atlaskit/visually-hidden": "^1.4.0",
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.genericErrorStyles = void 0;
|
|
7
|
-
var _react = require("@emotion/react");
|
|
8
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
9
|
-
|
|
10
|
-
var HEIGHT = 90;
|
|
11
|
-
|
|
12
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
13
|
-
var genericErrorStyles = exports.genericErrorStyles = (0, _react.css)({
|
|
14
|
-
height: "".concat(HEIGHT, "px"),
|
|
15
|
-
margin: "0 auto ".concat("var(--ds-space-300, 24px)"),
|
|
16
|
-
display: 'block'
|
|
17
|
-
});
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.noResultsSVGStyles = void 0;
|
|
7
|
-
var _react = require("@emotion/react");
|
|
8
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
9
|
-
|
|
10
|
-
var HEIGHT = 120;
|
|
11
|
-
|
|
12
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
13
|
-
var noResultsSVGStyles = exports.noResultsSVGStyles = (0, _react.css)({
|
|
14
|
-
height: "".concat(HEIGHT, "px"),
|
|
15
|
-
margin: "0 auto ".concat("var(--ds-space-300, 24px)"),
|
|
16
|
-
display: 'block'
|
|
17
|
-
});
|
package/dist/cjs/ui/link-picker/search-results/link-search-list/link-search-no-results/styled.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.emptyStateWrapperStyles = exports.emptyStateNoResultsWrapper = void 0;
|
|
7
|
-
var _react = require("@emotion/react");
|
|
8
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
9
|
-
|
|
10
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
11
|
-
var emptyStateWrapperStyles = exports.emptyStateWrapperStyles = (0, _react.css)({
|
|
12
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
13
|
-
'& p': {
|
|
14
|
-
margin: 0
|
|
15
|
-
}
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
19
|
-
var emptyStateNoResultsWrapper = exports.emptyStateNoResultsWrapper = (0, _react.css)({
|
|
20
|
-
minHeight: "var(--ds-space-200, 16px)"
|
|
21
|
-
});
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
2
|
-
import { css } from '@emotion/react';
|
|
3
|
-
const HEIGHT = 90;
|
|
4
|
-
|
|
5
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
6
|
-
export const genericErrorStyles = css({
|
|
7
|
-
height: `${HEIGHT}px`,
|
|
8
|
-
margin: `0 auto ${"var(--ds-space-300, 24px)"}`,
|
|
9
|
-
display: 'block'
|
|
10
|
-
});
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
2
|
-
import { css } from '@emotion/react';
|
|
3
|
-
const HEIGHT = 120;
|
|
4
|
-
|
|
5
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
6
|
-
export const noResultsSVGStyles = css({
|
|
7
|
-
height: `${HEIGHT}px`,
|
|
8
|
-
margin: `0 auto ${"var(--ds-space-300, 24px)"}`,
|
|
9
|
-
display: 'block'
|
|
10
|
-
});
|
package/dist/es2019/ui/link-picker/search-results/link-search-list/link-search-no-results/styled.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
2
|
-
import { css } from '@emotion/react';
|
|
3
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
4
|
-
export const emptyStateWrapperStyles = css({
|
|
5
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
6
|
-
'& p': {
|
|
7
|
-
margin: 0
|
|
8
|
-
}
|
|
9
|
-
});
|
|
10
|
-
|
|
11
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
12
|
-
export const emptyStateNoResultsWrapper = css({
|
|
13
|
-
minHeight: "var(--ds-space-200, 16px)"
|
|
14
|
-
});
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
2
|
-
import { css } from '@emotion/react';
|
|
3
|
-
var HEIGHT = 90;
|
|
4
|
-
|
|
5
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
6
|
-
export var genericErrorStyles = css({
|
|
7
|
-
height: "".concat(HEIGHT, "px"),
|
|
8
|
-
margin: "0 auto ".concat("var(--ds-space-300, 24px)"),
|
|
9
|
-
display: 'block'
|
|
10
|
-
});
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
2
|
-
import { css } from '@emotion/react';
|
|
3
|
-
var HEIGHT = 120;
|
|
4
|
-
|
|
5
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
6
|
-
export var noResultsSVGStyles = css({
|
|
7
|
-
height: "".concat(HEIGHT, "px"),
|
|
8
|
-
margin: "0 auto ".concat("var(--ds-space-300, 24px)"),
|
|
9
|
-
display: 'block'
|
|
10
|
-
});
|
package/dist/esm/ui/link-picker/search-results/link-search-list/link-search-no-results/styled.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
2
|
-
import { css } from '@emotion/react';
|
|
3
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
4
|
-
export var emptyStateWrapperStyles = css({
|
|
5
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
6
|
-
'& p': {
|
|
7
|
-
margin: 0
|
|
8
|
-
}
|
|
9
|
-
});
|
|
10
|
-
|
|
11
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
12
|
-
export var emptyStateNoResultsWrapper = css({
|
|
13
|
-
minHeight: "var(--ds-space-200, 16px)"
|
|
14
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const genericErrorStyles: import("@emotion/react").SerializedStyles;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const noResultsSVGStyles: import("@emotion/react").SerializedStyles;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const genericErrorStyles: import("@emotion/react").SerializedStyles;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const noResultsSVGStyles: import("@emotion/react").SerializedStyles;
|