@atlaskit/link-picker 1.46.1 → 1.47.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/ui/link-picker/search-results/link-search-list/index.js +7 -10
- package/dist/cjs/ui/main.js +1 -1
- package/dist/es2019/ui/link-picker/search-results/link-search-list/index.js +7 -10
- package/dist/es2019/ui/main.js +1 -1
- package/dist/esm/ui/link-picker/search-results/link-search-list/index.js +7 -10
- package/dist/esm/ui/main.js +1 -1
- package/package.json +2 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @atlaskit/link-picker
|
|
2
2
|
|
|
3
|
+
## 1.47.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#147531](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/147531)
|
|
8
|
+
[`b599457543db5`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b599457543db5) -
|
|
9
|
+
Officially enables/uses the `emptyStateNoResults` option from plugins to render a custom empty
|
|
10
|
+
state screen when there is no active query (via cleanup of
|
|
11
|
+
platform.linking-platform.link-picker.enable-empty-state ff).
|
|
12
|
+
|
|
3
13
|
## 1.46.1
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
|
@@ -11,7 +11,6 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
11
11
|
var _react = require("react");
|
|
12
12
|
var _react2 = require("@emotion/react");
|
|
13
13
|
var _reactIntlNext = require("react-intl-next");
|
|
14
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
15
14
|
var _primitives = require("@atlaskit/primitives");
|
|
16
15
|
var _spinner = _interopRequireDefault(require("@atlaskit/spinner"));
|
|
17
16
|
var _visuallyHidden = _interopRequireDefault(require("@atlaskit/visually-hidden"));
|
|
@@ -110,15 +109,13 @@ var LinkSearchList = exports.LinkSearchList = /*#__PURE__*/(0, _react.forwardRef
|
|
|
110
109
|
}
|
|
111
110
|
}, [activeIndex, items, onKeyDown]);
|
|
112
111
|
if ((items === null || items === void 0 ? void 0 : items.length) === 0) {
|
|
113
|
-
if (
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
}, emptyState);
|
|
121
|
-
}
|
|
112
|
+
if (!hasSearchTerm) {
|
|
113
|
+
var _activePlugin$emptySt;
|
|
114
|
+
var emptyState = activePlugin === null || activePlugin === void 0 || (_activePlugin$emptySt = activePlugin.emptyStateNoResults) === null || _activePlugin$emptySt === void 0 ? void 0 : _activePlugin$emptySt.call(activePlugin);
|
|
115
|
+
if (emptyState) {
|
|
116
|
+
return (0, _react2.jsx)(_primitives.Box, {
|
|
117
|
+
xcss: emptyStateNoResultsWrapper
|
|
118
|
+
}, emptyState);
|
|
122
119
|
}
|
|
123
120
|
}
|
|
124
121
|
return (0, _react2.jsx)(_linkSearchNoResults.NoResults, null);
|
package/dist/cjs/ui/main.js
CHANGED
|
@@ -31,7 +31,7 @@ var testIds = exports.testIds = {
|
|
|
31
31
|
};
|
|
32
32
|
var PACKAGE_DATA = exports.PACKAGE_DATA = {
|
|
33
33
|
packageName: "@atlaskit/link-picker" || '',
|
|
34
|
-
packageVersion: "1.
|
|
34
|
+
packageVersion: "1.47.0" || '',
|
|
35
35
|
componentName: _constants.COMPONENT_NAME,
|
|
36
36
|
source: _constants.COMPONENT_NAME
|
|
37
37
|
};
|
|
@@ -8,7 +8,6 @@ import { forwardRef, Fragment, useCallback, useRef } from 'react';
|
|
|
8
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
9
9
|
import { jsx } from '@emotion/react';
|
|
10
10
|
import { defineMessages, FormattedMessage } from 'react-intl-next';
|
|
11
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
11
|
import { Box, xcss } from '@atlaskit/primitives';
|
|
13
12
|
import Spinner from '@atlaskit/spinner';
|
|
14
13
|
import VisuallyHidden from '@atlaskit/visually-hidden';
|
|
@@ -104,15 +103,13 @@ export const LinkSearchList = /*#__PURE__*/forwardRef(({
|
|
|
104
103
|
}
|
|
105
104
|
}, [activeIndex, items, onKeyDown]);
|
|
106
105
|
if ((items === null || items === void 0 ? void 0 : items.length) === 0) {
|
|
107
|
-
if (
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
}, emptyState);
|
|
115
|
-
}
|
|
106
|
+
if (!hasSearchTerm) {
|
|
107
|
+
var _activePlugin$emptySt;
|
|
108
|
+
const emptyState = activePlugin === null || activePlugin === void 0 ? void 0 : (_activePlugin$emptySt = activePlugin.emptyStateNoResults) === null || _activePlugin$emptySt === void 0 ? void 0 : _activePlugin$emptySt.call(activePlugin);
|
|
109
|
+
if (emptyState) {
|
|
110
|
+
return jsx(Box, {
|
|
111
|
+
xcss: emptyStateNoResultsWrapper
|
|
112
|
+
}, emptyState);
|
|
116
113
|
}
|
|
117
114
|
}
|
|
118
115
|
return jsx(NoResults, null);
|
package/dist/es2019/ui/main.js
CHANGED
|
@@ -13,7 +13,6 @@ import { forwardRef, Fragment, useCallback, useRef } from 'react';
|
|
|
13
13
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
14
14
|
import { jsx } from '@emotion/react';
|
|
15
15
|
import { defineMessages, FormattedMessage } from 'react-intl-next';
|
|
16
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
17
16
|
import { Box, xcss } from '@atlaskit/primitives';
|
|
18
17
|
import Spinner from '@atlaskit/spinner';
|
|
19
18
|
import VisuallyHidden from '@atlaskit/visually-hidden';
|
|
@@ -106,15 +105,13 @@ export var LinkSearchList = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
106
105
|
}
|
|
107
106
|
}, [activeIndex, items, onKeyDown]);
|
|
108
107
|
if ((items === null || items === void 0 ? void 0 : items.length) === 0) {
|
|
109
|
-
if (
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
}, emptyState);
|
|
117
|
-
}
|
|
108
|
+
if (!hasSearchTerm) {
|
|
109
|
+
var _activePlugin$emptySt;
|
|
110
|
+
var emptyState = activePlugin === null || activePlugin === void 0 || (_activePlugin$emptySt = activePlugin.emptyStateNoResults) === null || _activePlugin$emptySt === void 0 ? void 0 : _activePlugin$emptySt.call(activePlugin);
|
|
111
|
+
if (emptyState) {
|
|
112
|
+
return jsx(Box, {
|
|
113
|
+
xcss: emptyStateNoResultsWrapper
|
|
114
|
+
}, emptyState);
|
|
118
115
|
}
|
|
119
116
|
}
|
|
120
117
|
return jsx(NoResults, null);
|
package/dist/esm/ui/main.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/link-picker",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.47.0",
|
|
4
4
|
"description": "Standalone link picker",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"publishConfig": {
|
|
@@ -35,9 +35,6 @@
|
|
|
35
35
|
"./lazy": "./src/lazy.ts"
|
|
36
36
|
},
|
|
37
37
|
"platform-feature-flags": {
|
|
38
|
-
"platform.linking-platform.link-picker.enable-empty-state": {
|
|
39
|
-
"type": "boolean"
|
|
40
|
-
},
|
|
41
38
|
"platform.linking-platform.link-picker.enable-jira-create": {
|
|
42
39
|
"type": "boolean"
|
|
43
40
|
}
|
|
@@ -52,7 +49,7 @@
|
|
|
52
49
|
"@atlaskit/form": "^10.5.0",
|
|
53
50
|
"@atlaskit/frontend-utilities": "^2.7.0",
|
|
54
51
|
"@atlaskit/heading": "^2.4.0",
|
|
55
|
-
"@atlaskit/icon": "^22.
|
|
52
|
+
"@atlaskit/icon": "^22.20.0",
|
|
56
53
|
"@atlaskit/intl-messages-provider": "^1.0.2",
|
|
57
54
|
"@atlaskit/linking-common": "^5.11.0",
|
|
58
55
|
"@atlaskit/onboarding": "^11.15.0",
|