@atlaskit/link-picker 3.12.1 → 3.13.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 +9 -0
- package/dist/cjs/services/use-plugins/index.js +6 -3
- package/dist/cjs/ui/link-picker/index.js +6 -3
- package/dist/cjs/ui/link-picker/search-results/index.js +4 -2
- package/dist/cjs/ui/link-picker/search-results/link-search-list/index.js +5 -2
- package/dist/cjs/ui/link-picker/search-results/link-search-list/link-search-no-results/index.js +5 -2
- package/dist/cjs/ui/main.js +1 -1
- package/dist/es2019/services/use-plugins/index.js +6 -5
- package/dist/es2019/ui/link-picker/index.js +6 -3
- package/dist/es2019/ui/link-picker/search-results/index.js +4 -2
- package/dist/es2019/ui/link-picker/search-results/link-search-list/index.js +4 -1
- package/dist/es2019/ui/link-picker/search-results/link-search-list/link-search-no-results/index.js +5 -2
- package/dist/es2019/ui/main.js +1 -1
- package/dist/esm/services/use-plugins/index.js +6 -3
- package/dist/esm/ui/link-picker/index.js +6 -3
- package/dist/esm/ui/link-picker/search-results/index.js +4 -2
- package/dist/esm/ui/link-picker/search-results/link-search-list/index.js +5 -2
- package/dist/esm/ui/link-picker/search-results/link-search-list/link-search-no-results/index.js +5 -2
- package/dist/esm/ui/main.js +1 -1
- package/dist/types/common/types.d.ts +12 -0
- package/dist/types/services/use-plugins/index.d.ts +1 -1
- package/dist/types/ui/link-picker/search-results/index.d.ts +2 -1
- package/dist/types/ui/link-picker/search-results/link-search-list/index.d.ts +1 -0
- package/dist/types/ui/link-picker/search-results/link-search-list/link-search-no-results/index.d.ts +3 -1
- package/dist/types-ts4.5/common/types.d.ts +12 -0
- package/dist/types-ts4.5/services/use-plugins/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/link-picker/search-results/index.d.ts +2 -1
- package/dist/types-ts4.5/ui/link-picker/search-results/link-search-list/index.d.ts +1 -0
- package/dist/types-ts4.5/ui/link-picker/search-results/link-search-list/link-search-no-results/index.d.ts +3 -1
- package/package.json +4 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/link-picker
|
|
2
2
|
|
|
3
|
+
## 3.13.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`be449d28b1149`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/be449d28b1149) -
|
|
8
|
+
[ux] Adding optional props recentSearchListSize, and shouldRenderNoResultsImage for Link Picker to
|
|
9
|
+
allow for showing insert button on smaller screens. Additionally updating the hideLinkDisplayText
|
|
10
|
+
prop to be passed as a part of a new linkPickerOptions object instead of as a standalone variable.
|
|
11
|
+
|
|
3
12
|
## 3.12.1
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -11,6 +11,7 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
|
|
|
11
11
|
var _react = require("react");
|
|
12
12
|
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
13
13
|
var _convertToError = require("@atlaskit/frontend-utilities/convert-to-error");
|
|
14
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
14
15
|
var _analytics = require("../../common/analytics");
|
|
15
16
|
var _constants = require("../../common/constants");
|
|
16
17
|
var _analytics2 = _interopRequireDefault(require("../../common/utils/analytics/analytics.codegen"));
|
|
@@ -21,6 +22,7 @@ var _utils = require("./utils");
|
|
|
21
22
|
function usePlugins(state, activeTab, plugins) {
|
|
22
23
|
var _activePlugin$tabKey;
|
|
23
24
|
var thirdPartyTabExperimentEnabled = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
|
25
|
+
var recentSearchListSize = arguments.length > 4 ? arguments[4] : undefined;
|
|
24
26
|
var _useAnalyticsEvents = (0, _analyticsNext.useAnalyticsEvents)(),
|
|
25
27
|
createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
|
|
26
28
|
var _useState = (0, _react.useState)(0),
|
|
@@ -81,7 +83,7 @@ function usePlugins(state, activeTab, plugins) {
|
|
|
81
83
|
dispatch({
|
|
82
84
|
type: 'SUCCESS',
|
|
83
85
|
payload: {
|
|
84
|
-
items: limit(value.data),
|
|
86
|
+
items: limit(value.data, (0, _platformFeatureFlags.fg)('aifc_create_enabled') ? recentSearchListSize : undefined),
|
|
85
87
|
isLoading: !done
|
|
86
88
|
}
|
|
87
89
|
});
|
|
@@ -114,7 +116,7 @@ function usePlugins(state, activeTab, plugins) {
|
|
|
114
116
|
}();
|
|
115
117
|
updateResults();
|
|
116
118
|
return cancel;
|
|
117
|
-
}, [activePlugin, state, retries, createAnalyticsEvent, dispatch]);
|
|
119
|
+
}, [activePlugin, state, retries, createAnalyticsEvent, dispatch, recentSearchListSize]);
|
|
118
120
|
var tabs = (0, _react.useMemo)(function () {
|
|
119
121
|
if (!plugins || plugins.length <= 1) {
|
|
120
122
|
return [];
|
|
@@ -157,5 +159,6 @@ function usePlugins(state, activeTab, plugins) {
|
|
|
157
159
|
};
|
|
158
160
|
}
|
|
159
161
|
function limit(items) {
|
|
160
|
-
|
|
162
|
+
var recentSearchListSize = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _constants.RECENT_SEARCH_LIST_SIZE;
|
|
163
|
+
return items.slice(0, recentSearchListSize);
|
|
161
164
|
}
|
|
@@ -117,7 +117,9 @@ var LinkPicker = exports.LinkPicker = (0, _analytics.withLinkPickerAnalyticsCont
|
|
|
117
117
|
inputRef = _ref.inputRef,
|
|
118
118
|
_ref$previewableLinks = _ref.previewableLinksOnly,
|
|
119
119
|
previewableLinksOnly = _ref$previewableLinks === void 0 ? false : _ref$previewableLinks,
|
|
120
|
-
additionalError = _ref.additionalError
|
|
120
|
+
additionalError = _ref.additionalError,
|
|
121
|
+
recentSearchListSize = _ref.recentSearchListSize,
|
|
122
|
+
shouldRenderNoResultsImage = _ref.shouldRenderNoResultsImage;
|
|
121
123
|
var _useAnalyticsEvents = (0, _analyticsNext.useAnalyticsEvents)(),
|
|
122
124
|
createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
|
|
123
125
|
var _useReducer = (0, _react.useReducer)(reducer, _objectSpread(_objectSpread({}, initState), {}, {
|
|
@@ -143,7 +145,7 @@ var LinkPicker = exports.LinkPicker = (0, _analytics.withLinkPickerAnalyticsCont
|
|
|
143
145
|
var linkPicker3pOneDriveExperimentCohort = _featureGateJsClient.default.initializeCalled() ? _featureGateJsClient.default.getExperimentValue('link_picker_3p_onedrive_experiment', 'cohort', 'control') : 'control';
|
|
144
146
|
var oneDriveTabExperimentEnabled = linkPicker3pOneDriveExperimentCohort === 'show_onedrive_tab';
|
|
145
147
|
var thirdPartyTabExperimentEnabled = googleDriveTabExperimentEnabled || oneDriveTabExperimentEnabled;
|
|
146
|
-
var _usePlugins = (0, _usePlugins2.usePlugins)(queryState, activeTab, plugins, thirdPartyTabExperimentEnabled),
|
|
148
|
+
var _usePlugins = (0, _usePlugins2.usePlugins)(queryState, activeTab, plugins, thirdPartyTabExperimentEnabled, recentSearchListSize),
|
|
147
149
|
items = _usePlugins.items,
|
|
148
150
|
isLoadingResults = _usePlugins.isLoading,
|
|
149
151
|
isActivePlugin = _usePlugins.isActivePlugin,
|
|
@@ -500,7 +502,8 @@ var LinkPicker = exports.LinkPicker = (0, _analytics.withLinkPickerAnalyticsCont
|
|
|
500
502
|
handleTabChange: handleTabChange,
|
|
501
503
|
handleSearchListOnChange: handleSearchListOnChange,
|
|
502
504
|
adaptiveHeight: adaptiveHeight,
|
|
503
|
-
retry: retry
|
|
505
|
+
retry: retry,
|
|
506
|
+
shouldRenderNoResultsImage: shouldRenderNoResultsImage
|
|
504
507
|
}), /*#__PURE__*/React.createElement(_formFooter.FormFooter, {
|
|
505
508
|
error: error,
|
|
506
509
|
items: items
|
|
@@ -53,7 +53,8 @@ var SearchResults = exports.SearchResults = function SearchResults(_ref) {
|
|
|
53
53
|
handleSelected = _ref.handleSelected,
|
|
54
54
|
handleKeyDown = _ref.handleKeyDown,
|
|
55
55
|
adaptiveHeight = _ref.adaptiveHeight,
|
|
56
|
-
retry = _ref.retry
|
|
56
|
+
retry = _ref.retry,
|
|
57
|
+
shouldRenderNoResultsImage = _ref.shouldRenderNoResultsImage;
|
|
57
58
|
var isActivePlugin = !!activePlugin;
|
|
58
59
|
// Experiment with new 3P tabs in link picker. For more info, please see: go/link-picker-3p-drive-one-pager.
|
|
59
60
|
var linkPicker3pDriveExperimentCohort = _featureGateJsClient.default.initializeCalled() ? _featureGateJsClient.default.getExperimentValue('link_picker_3p_drive_experiment', 'cohort', 'control') : 'control';
|
|
@@ -101,7 +102,8 @@ var SearchResults = exports.SearchResults = function SearchResults(_ref) {
|
|
|
101
102
|
hasSearchTerm: !!(queryState !== null && queryState !== void 0 && queryState.query.length),
|
|
102
103
|
activePlugin: activePlugin,
|
|
103
104
|
adaptiveHeight: adaptiveHeight,
|
|
104
|
-
tabPanelId: "".concat(testIds.tabList, "-").concat(activeTab, "-tab")
|
|
105
|
+
tabPanelId: "".concat(testIds.tabList, "-").concat(activeTab, "-tab"),
|
|
106
|
+
shouldRenderNoResultsImage: shouldRenderNoResultsImage
|
|
105
107
|
}), error ? (_activePlugin$errorFa = activePlugin === null || activePlugin === void 0 || (_activePlugin$errorFa2 = activePlugin.errorFallback) === null || _activePlugin$errorFa2 === void 0 ? void 0 : _activePlugin$errorFa2.call(activePlugin, error, retry)) !== null && _activePlugin$errorFa !== void 0 ? _activePlugin$errorFa : /*#__PURE__*/React.createElement(_linkSearchError.LinkSearchError, {
|
|
106
108
|
onRetry: retry
|
|
107
109
|
}) : null));
|
|
@@ -22,7 +22,7 @@ var _handleNavKeyDown = require("../../../../common/utils/handleNavKeyDown");
|
|
|
22
22
|
var _linkSearchNoResults = require("./link-search-no-results");
|
|
23
23
|
var _listItem = require("./list-item");
|
|
24
24
|
var _useTrackResultsShown = require("./use-track-results-shown");
|
|
25
|
-
var _excluded = ["onChange", "onSelect", "onKeyDown", "items", "activeIndex", "selectedIndex", "isLoading", "ariaControls", "ariaLabelledBy", "ariaReadOnly", "role", "id", "hasSearchTerm", "activePlugin", "adaptiveHeight", "className", "tabPanelId"];
|
|
25
|
+
var _excluded = ["onChange", "onSelect", "onKeyDown", "items", "activeIndex", "selectedIndex", "isLoading", "ariaControls", "ariaLabelledBy", "ariaReadOnly", "role", "id", "hasSearchTerm", "activePlugin", "adaptiveHeight", "className", "tabPanelId", "shouldRenderNoResultsImage"];
|
|
26
26
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
27
27
|
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; }
|
|
28
28
|
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; }
|
|
@@ -76,6 +76,7 @@ var LinkSearchList = exports.LinkSearchList = /*#__PURE__*/(0, _react.forwardRef
|
|
|
76
76
|
adaptiveHeight = _ref.adaptiveHeight,
|
|
77
77
|
className = _ref.className,
|
|
78
78
|
tabPanelId = _ref.tabPanelId,
|
|
79
|
+
shouldRenderNoResultsImage = _ref.shouldRenderNoResultsImage,
|
|
79
80
|
restProps = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
80
81
|
var itemsContent;
|
|
81
82
|
var loadingContent;
|
|
@@ -128,7 +129,9 @@ var LinkSearchList = exports.LinkSearchList = /*#__PURE__*/(0, _react.forwardRef
|
|
|
128
129
|
}
|
|
129
130
|
return /*#__PURE__*/React.createElement("div", {
|
|
130
131
|
id: tabPanelId
|
|
131
|
-
}, /*#__PURE__*/React.createElement(_linkSearchNoResults.NoResults,
|
|
132
|
+
}, /*#__PURE__*/React.createElement(_linkSearchNoResults.NoResults, {
|
|
133
|
+
shouldRenderImage: shouldRenderNoResultsImage
|
|
134
|
+
}));
|
|
132
135
|
}
|
|
133
136
|
var listItemNameMaxLines = activePlugin === null || activePlugin === void 0 || (_activePlugin$uiOptio = activePlugin.uiOptions) === null || _activePlugin$uiOptio === void 0 ? void 0 : _activePlugin$uiOptio.listItemNameMaxLines;
|
|
134
137
|
if (items && items.length > 0) {
|
package/dist/cjs/ui/link-picker/search-results/link-search-list/link-search-no-results/index.js
CHANGED
|
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.testIds = exports.messages = exports.NoResults = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _reactIntlNext = require("react-intl-next");
|
|
10
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
10
11
|
var _emptyState = require("../../../../../common/ui/empty-state");
|
|
11
12
|
var _noResultsSvg = require("./no-results-svg");
|
|
12
13
|
var messages = exports.messages = (0, _reactIntlNext.defineMessages)({
|
|
@@ -24,13 +25,15 @@ var messages = exports.messages = (0, _reactIntlNext.defineMessages)({
|
|
|
24
25
|
var testIds = exports.testIds = {
|
|
25
26
|
emptyResultPage: 'link-search-no-results'
|
|
26
27
|
};
|
|
27
|
-
var NoResults = exports.NoResults = function NoResults() {
|
|
28
|
+
var NoResults = exports.NoResults = function NoResults(_ref) {
|
|
29
|
+
var _ref$shouldRenderImag = _ref.shouldRenderImage,
|
|
30
|
+
shouldRenderImage = _ref$shouldRenderImag === void 0 ? true : _ref$shouldRenderImag;
|
|
28
31
|
var intl = (0, _reactIntlNext.useIntl)();
|
|
29
32
|
return /*#__PURE__*/_react.default.createElement(_emptyState.EmptyState, {
|
|
30
33
|
testId: testIds.emptyResultPage,
|
|
31
34
|
header: intl.formatMessage(messages.noResults),
|
|
32
35
|
description: intl.formatMessage(messages.noResultsDescription),
|
|
33
|
-
renderImage: function
|
|
36
|
+
renderImage: !shouldRenderImage && (0, _platformFeatureFlags.fg)('aifc_create_enabled') ? undefined : function () {
|
|
34
37
|
return /*#__PURE__*/_react.default.createElement(_noResultsSvg.NoResultsSVG, null);
|
|
35
38
|
}
|
|
36
39
|
});
|
package/dist/cjs/ui/main.js
CHANGED
|
@@ -25,7 +25,7 @@ var testIds = exports.testIds = {
|
|
|
25
25
|
};
|
|
26
26
|
var PACKAGE_DATA = exports.PACKAGE_DATA = {
|
|
27
27
|
packageName: "@atlaskit/link-picker" || '',
|
|
28
|
-
packageVersion: "3.12.
|
|
28
|
+
packageVersion: "3.12.1" || '',
|
|
29
29
|
componentName: _constants.COMPONENT_NAME,
|
|
30
30
|
source: _constants.COMPONENT_NAME
|
|
31
31
|
};
|
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
3
3
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
4
4
|
import { convertToError } from '@atlaskit/frontend-utilities/convert-to-error';
|
|
5
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
6
|
import { useLinkPickerAnalytics } from '../../common/analytics';
|
|
6
7
|
import { ANALYTICS_CHANNEL, RECENT_SEARCH_LIST_SIZE } from '../../common/constants';
|
|
7
8
|
import createEventPayload from '../../common/utils/analytics/analytics.codegen';
|
|
8
9
|
import { usePluginReducer } from './reducer';
|
|
9
10
|
import { CancellationError, resolvePluginUpdates } from './utils';
|
|
10
|
-
export function usePlugins(state, activeTab, plugins, thirdPartyTabExperimentEnabled = false) {
|
|
11
|
+
export function usePlugins(state, activeTab, plugins, thirdPartyTabExperimentEnabled = false, recentSearchListSize) {
|
|
11
12
|
var _activePlugin$tabKey;
|
|
12
13
|
const {
|
|
13
14
|
createAnalyticsEvent
|
|
@@ -55,7 +56,7 @@ export function usePlugins(state, activeTab, plugins, thirdPartyTabExperimentEna
|
|
|
55
56
|
dispatch({
|
|
56
57
|
type: 'SUCCESS',
|
|
57
58
|
payload: {
|
|
58
|
-
items: limit(value.data),
|
|
59
|
+
items: limit(value.data, fg('aifc_create_enabled') ? recentSearchListSize : undefined),
|
|
59
60
|
isLoading: !done
|
|
60
61
|
}
|
|
61
62
|
});
|
|
@@ -74,7 +75,7 @@ export function usePlugins(state, activeTab, plugins, thirdPartyTabExperimentEna
|
|
|
74
75
|
};
|
|
75
76
|
updateResults();
|
|
76
77
|
return cancel;
|
|
77
|
-
}, [activePlugin, state, retries, createAnalyticsEvent, dispatch]);
|
|
78
|
+
}, [activePlugin, state, retries, createAnalyticsEvent, dispatch, recentSearchListSize]);
|
|
78
79
|
const tabs = useMemo(() => {
|
|
79
80
|
if (!plugins || plugins.length <= 1) {
|
|
80
81
|
return [];
|
|
@@ -110,6 +111,6 @@ export function usePlugins(state, activeTab, plugins, thirdPartyTabExperimentEna
|
|
|
110
111
|
pluginBanner
|
|
111
112
|
};
|
|
112
113
|
}
|
|
113
|
-
function limit(items) {
|
|
114
|
-
return items.slice(0,
|
|
114
|
+
function limit(items, recentSearchListSize = RECENT_SEARCH_LIST_SIZE) {
|
|
115
|
+
return items.slice(0, recentSearchListSize);
|
|
115
116
|
}
|
|
@@ -105,7 +105,9 @@ export const LinkPicker = withLinkPickerAnalyticsContext( /*#__PURE__*/memo(({
|
|
|
105
105
|
moveSubmitButton = false,
|
|
106
106
|
inputRef,
|
|
107
107
|
previewableLinksOnly = false,
|
|
108
|
-
additionalError
|
|
108
|
+
additionalError,
|
|
109
|
+
recentSearchListSize,
|
|
110
|
+
shouldRenderNoResultsImage
|
|
109
111
|
}) => {
|
|
110
112
|
const {
|
|
111
113
|
createAnalyticsEvent
|
|
@@ -143,7 +145,7 @@ export const LinkPicker = withLinkPickerAnalyticsContext( /*#__PURE__*/memo(({
|
|
|
143
145
|
retry,
|
|
144
146
|
pluginAction,
|
|
145
147
|
pluginBanner
|
|
146
|
-
} = usePlugins(queryState, activeTab, plugins, thirdPartyTabExperimentEnabled);
|
|
148
|
+
} = usePlugins(queryState, activeTab, plugins, thirdPartyTabExperimentEnabled, recentSearchListSize);
|
|
147
149
|
const isEditing = !!initUrl;
|
|
148
150
|
const selectedItem = items === null || items === void 0 ? void 0 : items[selectedIndex];
|
|
149
151
|
const isSelectedItem = (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.url) === url;
|
|
@@ -455,7 +457,8 @@ export const LinkPicker = withLinkPickerAnalyticsContext( /*#__PURE__*/memo(({
|
|
|
455
457
|
handleTabChange: handleTabChange,
|
|
456
458
|
handleSearchListOnChange: handleSearchListOnChange,
|
|
457
459
|
adaptiveHeight: adaptiveHeight,
|
|
458
|
-
retry: retry
|
|
460
|
+
retry: retry,
|
|
461
|
+
shouldRenderNoResultsImage: shouldRenderNoResultsImage
|
|
459
462
|
}), /*#__PURE__*/React.createElement(FormFooter, {
|
|
460
463
|
error: error,
|
|
461
464
|
items: items
|
|
@@ -42,7 +42,8 @@ export const SearchResults = ({
|
|
|
42
42
|
handleSelected,
|
|
43
43
|
handleKeyDown,
|
|
44
44
|
adaptiveHeight,
|
|
45
|
-
retry
|
|
45
|
+
retry,
|
|
46
|
+
shouldRenderNoResultsImage
|
|
46
47
|
}) => {
|
|
47
48
|
var _activePlugin$errorFa, _activePlugin$errorFa2;
|
|
48
49
|
const isActivePlugin = !!activePlugin;
|
|
@@ -90,7 +91,8 @@ export const SearchResults = ({
|
|
|
90
91
|
hasSearchTerm: !!(queryState !== null && queryState !== void 0 && queryState.query.length),
|
|
91
92
|
activePlugin: activePlugin,
|
|
92
93
|
adaptiveHeight: adaptiveHeight,
|
|
93
|
-
tabPanelId: `${testIds.tabList}-${activeTab}-tab
|
|
94
|
+
tabPanelId: `${testIds.tabList}-${activeTab}-tab`,
|
|
95
|
+
shouldRenderNoResultsImage: shouldRenderNoResultsImage
|
|
94
96
|
}), error ? (_activePlugin$errorFa = activePlugin === null || activePlugin === void 0 ? void 0 : (_activePlugin$errorFa2 = activePlugin.errorFallback) === null || _activePlugin$errorFa2 === void 0 ? void 0 : _activePlugin$errorFa2.call(activePlugin, error, retry)) !== null && _activePlugin$errorFa !== void 0 ? _activePlugin$errorFa : /*#__PURE__*/React.createElement(LinkSearchError, {
|
|
95
97
|
onRetry: retry
|
|
96
98
|
}) : null));
|
|
@@ -63,6 +63,7 @@ export const LinkSearchList = /*#__PURE__*/forwardRef(({
|
|
|
63
63
|
adaptiveHeight,
|
|
64
64
|
className,
|
|
65
65
|
tabPanelId,
|
|
66
|
+
shouldRenderNoResultsImage,
|
|
66
67
|
...restProps
|
|
67
68
|
}, ref) => {
|
|
68
69
|
var _activePlugin$uiOptio;
|
|
@@ -117,7 +118,9 @@ export const LinkSearchList = /*#__PURE__*/forwardRef(({
|
|
|
117
118
|
}
|
|
118
119
|
return /*#__PURE__*/React.createElement("div", {
|
|
119
120
|
id: tabPanelId
|
|
120
|
-
}, /*#__PURE__*/React.createElement(NoResults,
|
|
121
|
+
}, /*#__PURE__*/React.createElement(NoResults, {
|
|
122
|
+
shouldRenderImage: shouldRenderNoResultsImage
|
|
123
|
+
}));
|
|
121
124
|
}
|
|
122
125
|
const listItemNameMaxLines = activePlugin === null || activePlugin === void 0 ? void 0 : (_activePlugin$uiOptio = activePlugin.uiOptions) === null || _activePlugin$uiOptio === void 0 ? void 0 : _activePlugin$uiOptio.listItemNameMaxLines;
|
|
123
126
|
if (items && items.length > 0) {
|
package/dist/es2019/ui/link-picker/search-results/link-search-list/link-search-no-results/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { defineMessages, useIntl } from 'react-intl-next';
|
|
3
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
4
|
import { EmptyState } from '../../../../../common/ui/empty-state';
|
|
4
5
|
import { NoResultsSVG } from './no-results-svg';
|
|
5
6
|
export const messages = defineMessages({
|
|
@@ -17,12 +18,14 @@ export const messages = defineMessages({
|
|
|
17
18
|
export const testIds = {
|
|
18
19
|
emptyResultPage: 'link-search-no-results'
|
|
19
20
|
};
|
|
20
|
-
export const NoResults = (
|
|
21
|
+
export const NoResults = ({
|
|
22
|
+
shouldRenderImage = true
|
|
23
|
+
}) => {
|
|
21
24
|
const intl = useIntl();
|
|
22
25
|
return /*#__PURE__*/React.createElement(EmptyState, {
|
|
23
26
|
testId: testIds.emptyResultPage,
|
|
24
27
|
header: intl.formatMessage(messages.noResults),
|
|
25
28
|
description: intl.formatMessage(messages.noResultsDescription),
|
|
26
|
-
renderImage: () => /*#__PURE__*/React.createElement(NoResultsSVG, null)
|
|
29
|
+
renderImage: !shouldRenderImage && fg('aifc_create_enabled') ? undefined : () => /*#__PURE__*/React.createElement(NoResultsSVG, null)
|
|
27
30
|
});
|
|
28
31
|
};
|
package/dist/es2019/ui/main.js
CHANGED
|
@@ -5,6 +5,7 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
|
5
5
|
import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
6
6
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
7
7
|
import { convertToError } from '@atlaskit/frontend-utilities/convert-to-error';
|
|
8
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
9
|
import { useLinkPickerAnalytics } from '../../common/analytics';
|
|
9
10
|
import { ANALYTICS_CHANNEL, RECENT_SEARCH_LIST_SIZE } from '../../common/constants';
|
|
10
11
|
import createEventPayload from '../../common/utils/analytics/analytics.codegen';
|
|
@@ -13,6 +14,7 @@ import { CancellationError, resolvePluginUpdates } from './utils';
|
|
|
13
14
|
export function usePlugins(state, activeTab, plugins) {
|
|
14
15
|
var _activePlugin$tabKey;
|
|
15
16
|
var thirdPartyTabExperimentEnabled = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
|
17
|
+
var recentSearchListSize = arguments.length > 4 ? arguments[4] : undefined;
|
|
16
18
|
var _useAnalyticsEvents = useAnalyticsEvents(),
|
|
17
19
|
createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
|
|
18
20
|
var _useState = useState(0),
|
|
@@ -73,7 +75,7 @@ export function usePlugins(state, activeTab, plugins) {
|
|
|
73
75
|
dispatch({
|
|
74
76
|
type: 'SUCCESS',
|
|
75
77
|
payload: {
|
|
76
|
-
items: limit(value.data),
|
|
78
|
+
items: limit(value.data, fg('aifc_create_enabled') ? recentSearchListSize : undefined),
|
|
77
79
|
isLoading: !done
|
|
78
80
|
}
|
|
79
81
|
});
|
|
@@ -106,7 +108,7 @@ export function usePlugins(state, activeTab, plugins) {
|
|
|
106
108
|
}();
|
|
107
109
|
updateResults();
|
|
108
110
|
return cancel;
|
|
109
|
-
}, [activePlugin, state, retries, createAnalyticsEvent, dispatch]);
|
|
111
|
+
}, [activePlugin, state, retries, createAnalyticsEvent, dispatch, recentSearchListSize]);
|
|
110
112
|
var tabs = useMemo(function () {
|
|
111
113
|
if (!plugins || plugins.length <= 1) {
|
|
112
114
|
return [];
|
|
@@ -149,5 +151,6 @@ export function usePlugins(state, activeTab, plugins) {
|
|
|
149
151
|
};
|
|
150
152
|
}
|
|
151
153
|
function limit(items) {
|
|
152
|
-
|
|
154
|
+
var recentSearchListSize = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : RECENT_SEARCH_LIST_SIZE;
|
|
155
|
+
return items.slice(0, recentSearchListSize);
|
|
153
156
|
}
|
|
@@ -108,7 +108,9 @@ export var LinkPicker = withLinkPickerAnalyticsContext( /*#__PURE__*/memo(functi
|
|
|
108
108
|
inputRef = _ref.inputRef,
|
|
109
109
|
_ref$previewableLinks = _ref.previewableLinksOnly,
|
|
110
110
|
previewableLinksOnly = _ref$previewableLinks === void 0 ? false : _ref$previewableLinks,
|
|
111
|
-
additionalError = _ref.additionalError
|
|
111
|
+
additionalError = _ref.additionalError,
|
|
112
|
+
recentSearchListSize = _ref.recentSearchListSize,
|
|
113
|
+
shouldRenderNoResultsImage = _ref.shouldRenderNoResultsImage;
|
|
112
114
|
var _useAnalyticsEvents = useAnalyticsEvents(),
|
|
113
115
|
createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
|
|
114
116
|
var _useReducer = useReducer(reducer, _objectSpread(_objectSpread({}, initState), {}, {
|
|
@@ -134,7 +136,7 @@ export var LinkPicker = withLinkPickerAnalyticsContext( /*#__PURE__*/memo(functi
|
|
|
134
136
|
var linkPicker3pOneDriveExperimentCohort = FeatureGates.initializeCalled() ? FeatureGates.getExperimentValue('link_picker_3p_onedrive_experiment', 'cohort', 'control') : 'control';
|
|
135
137
|
var oneDriveTabExperimentEnabled = linkPicker3pOneDriveExperimentCohort === 'show_onedrive_tab';
|
|
136
138
|
var thirdPartyTabExperimentEnabled = googleDriveTabExperimentEnabled || oneDriveTabExperimentEnabled;
|
|
137
|
-
var _usePlugins = usePlugins(queryState, activeTab, plugins, thirdPartyTabExperimentEnabled),
|
|
139
|
+
var _usePlugins = usePlugins(queryState, activeTab, plugins, thirdPartyTabExperimentEnabled, recentSearchListSize),
|
|
138
140
|
items = _usePlugins.items,
|
|
139
141
|
isLoadingResults = _usePlugins.isLoading,
|
|
140
142
|
isActivePlugin = _usePlugins.isActivePlugin,
|
|
@@ -491,7 +493,8 @@ export var LinkPicker = withLinkPickerAnalyticsContext( /*#__PURE__*/memo(functi
|
|
|
491
493
|
handleTabChange: handleTabChange,
|
|
492
494
|
handleSearchListOnChange: handleSearchListOnChange,
|
|
493
495
|
adaptiveHeight: adaptiveHeight,
|
|
494
|
-
retry: retry
|
|
496
|
+
retry: retry,
|
|
497
|
+
shouldRenderNoResultsImage: shouldRenderNoResultsImage
|
|
495
498
|
}), /*#__PURE__*/React.createElement(FormFooter, {
|
|
496
499
|
error: error,
|
|
497
500
|
items: items
|
|
@@ -44,7 +44,8 @@ export var SearchResults = function SearchResults(_ref) {
|
|
|
44
44
|
handleSelected = _ref.handleSelected,
|
|
45
45
|
handleKeyDown = _ref.handleKeyDown,
|
|
46
46
|
adaptiveHeight = _ref.adaptiveHeight,
|
|
47
|
-
retry = _ref.retry
|
|
47
|
+
retry = _ref.retry,
|
|
48
|
+
shouldRenderNoResultsImage = _ref.shouldRenderNoResultsImage;
|
|
48
49
|
var isActivePlugin = !!activePlugin;
|
|
49
50
|
// Experiment with new 3P tabs in link picker. For more info, please see: go/link-picker-3p-drive-one-pager.
|
|
50
51
|
var linkPicker3pDriveExperimentCohort = FeatureGates.initializeCalled() ? FeatureGates.getExperimentValue('link_picker_3p_drive_experiment', 'cohort', 'control') : 'control';
|
|
@@ -92,7 +93,8 @@ export var SearchResults = function SearchResults(_ref) {
|
|
|
92
93
|
hasSearchTerm: !!(queryState !== null && queryState !== void 0 && queryState.query.length),
|
|
93
94
|
activePlugin: activePlugin,
|
|
94
95
|
adaptiveHeight: adaptiveHeight,
|
|
95
|
-
tabPanelId: "".concat(testIds.tabList, "-").concat(activeTab, "-tab")
|
|
96
|
+
tabPanelId: "".concat(testIds.tabList, "-").concat(activeTab, "-tab"),
|
|
97
|
+
shouldRenderNoResultsImage: shouldRenderNoResultsImage
|
|
96
98
|
}), error ? (_activePlugin$errorFa = activePlugin === null || activePlugin === void 0 || (_activePlugin$errorFa2 = activePlugin.errorFallback) === null || _activePlugin$errorFa2 === void 0 ? void 0 : _activePlugin$errorFa2.call(activePlugin, error, retry)) !== null && _activePlugin$errorFa !== void 0 ? _activePlugin$errorFa : /*#__PURE__*/React.createElement(LinkSearchError, {
|
|
97
99
|
onRetry: retry
|
|
98
100
|
}) : null));
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
4
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
5
|
-
var _excluded = ["onChange", "onSelect", "onKeyDown", "items", "activeIndex", "selectedIndex", "isLoading", "ariaControls", "ariaLabelledBy", "ariaReadOnly", "role", "id", "hasSearchTerm", "activePlugin", "adaptiveHeight", "className", "tabPanelId"];
|
|
5
|
+
var _excluded = ["onChange", "onSelect", "onKeyDown", "items", "activeIndex", "selectedIndex", "isLoading", "ariaControls", "ariaLabelledBy", "ariaReadOnly", "role", "id", "hasSearchTerm", "activePlugin", "adaptiveHeight", "className", "tabPanelId", "shouldRenderNoResultsImage"];
|
|
6
6
|
import "./index.compiled.css";
|
|
7
7
|
import * as React from 'react';
|
|
8
8
|
import { ax, ix } from "@compiled/react/runtime";
|
|
@@ -67,6 +67,7 @@ export var LinkSearchList = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
67
67
|
adaptiveHeight = _ref.adaptiveHeight,
|
|
68
68
|
className = _ref.className,
|
|
69
69
|
tabPanelId = _ref.tabPanelId,
|
|
70
|
+
shouldRenderNoResultsImage = _ref.shouldRenderNoResultsImage,
|
|
70
71
|
restProps = _objectWithoutProperties(_ref, _excluded);
|
|
71
72
|
var itemsContent;
|
|
72
73
|
var loadingContent;
|
|
@@ -119,7 +120,9 @@ export var LinkSearchList = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
119
120
|
}
|
|
120
121
|
return /*#__PURE__*/React.createElement("div", {
|
|
121
122
|
id: tabPanelId
|
|
122
|
-
}, /*#__PURE__*/React.createElement(NoResults,
|
|
123
|
+
}, /*#__PURE__*/React.createElement(NoResults, {
|
|
124
|
+
shouldRenderImage: shouldRenderNoResultsImage
|
|
125
|
+
}));
|
|
123
126
|
}
|
|
124
127
|
var listItemNameMaxLines = activePlugin === null || activePlugin === void 0 || (_activePlugin$uiOptio = activePlugin.uiOptions) === null || _activePlugin$uiOptio === void 0 ? void 0 : _activePlugin$uiOptio.listItemNameMaxLines;
|
|
125
128
|
if (items && items.length > 0) {
|
package/dist/esm/ui/link-picker/search-results/link-search-list/link-search-no-results/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { defineMessages, useIntl } from 'react-intl-next';
|
|
3
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
4
|
import { EmptyState } from '../../../../../common/ui/empty-state';
|
|
4
5
|
import { NoResultsSVG } from './no-results-svg';
|
|
5
6
|
export var messages = defineMessages({
|
|
@@ -17,13 +18,15 @@ export var messages = defineMessages({
|
|
|
17
18
|
export var testIds = {
|
|
18
19
|
emptyResultPage: 'link-search-no-results'
|
|
19
20
|
};
|
|
20
|
-
export var NoResults = function NoResults() {
|
|
21
|
+
export var NoResults = function NoResults(_ref) {
|
|
22
|
+
var _ref$shouldRenderImag = _ref.shouldRenderImage,
|
|
23
|
+
shouldRenderImage = _ref$shouldRenderImag === void 0 ? true : _ref$shouldRenderImag;
|
|
21
24
|
var intl = useIntl();
|
|
22
25
|
return /*#__PURE__*/React.createElement(EmptyState, {
|
|
23
26
|
testId: testIds.emptyResultPage,
|
|
24
27
|
header: intl.formatMessage(messages.noResults),
|
|
25
28
|
description: intl.formatMessage(messages.noResultsDescription),
|
|
26
|
-
renderImage: function
|
|
29
|
+
renderImage: !shouldRenderImage && fg('aifc_create_enabled') ? undefined : function () {
|
|
27
30
|
return /*#__PURE__*/React.createElement(NoResultsSVG, null);
|
|
28
31
|
}
|
|
29
32
|
});
|
package/dist/esm/ui/main.js
CHANGED
|
@@ -44,6 +44,14 @@ export interface ResolveResult {
|
|
|
44
44
|
export interface LinkPickerUiOptions {
|
|
45
45
|
/** Maximum number of lines to display for the item name */
|
|
46
46
|
listItemNameMaxLines?: number;
|
|
47
|
+
/** Showing dynamic list size based on window height */
|
|
48
|
+
recentSearchListSize?: number;
|
|
49
|
+
/** Adaptive height */
|
|
50
|
+
adaptiveHeight?: boolean;
|
|
51
|
+
/** Hide display text */
|
|
52
|
+
hideDisplayText?: boolean;
|
|
53
|
+
/** Controls showing the image in the no results state */
|
|
54
|
+
shouldRenderNoResultsImage?: boolean;
|
|
47
55
|
}
|
|
48
56
|
export interface LinkPickerPlugin {
|
|
49
57
|
resolve: (state: LinkPickerState) => Promise<ResolveResult> | AsyncGenerator<ResolveResult, ResolveResult>;
|
|
@@ -163,6 +171,10 @@ export interface LinkPickerProps {
|
|
|
163
171
|
previewableLinksOnly?: boolean;
|
|
164
172
|
/**This prop passes one additional error that is secondary to component errors */
|
|
165
173
|
additionalError?: React.ReactNode;
|
|
174
|
+
/** Showing dynamic list size based on window height */
|
|
175
|
+
recentSearchListSize?: number;
|
|
176
|
+
/** Controls showing the image in the no results state */
|
|
177
|
+
shouldRenderNoResultsImage?: boolean;
|
|
166
178
|
}
|
|
167
179
|
type CustomLinkPickerMessages = {
|
|
168
180
|
/** Label for the link input field */
|
|
@@ -13,4 +13,4 @@ export interface LinkPickerPluginsService {
|
|
|
13
13
|
pluginAction?: LinkPickerPluginAction;
|
|
14
14
|
pluginBanner?: LinkPickerPluginBanner;
|
|
15
15
|
}
|
|
16
|
-
export declare function usePlugins(state: LinkPickerState | null, activeTab: number, plugins?: LinkPickerPlugin[], thirdPartyTabExperimentEnabled?: boolean): LinkPickerPluginsService;
|
|
16
|
+
export declare function usePlugins(state: LinkPickerState | null, activeTab: number, plugins?: LinkPickerPlugin[], thirdPartyTabExperimentEnabled?: boolean, recentSearchListSize?: number): LinkPickerPluginsService;
|
|
@@ -40,5 +40,6 @@ export type SearchResultsProps = {
|
|
|
40
40
|
error?: unknown;
|
|
41
41
|
adaptiveHeight: boolean;
|
|
42
42
|
retry: () => void;
|
|
43
|
+
shouldRenderNoResultsImage?: boolean;
|
|
43
44
|
};
|
|
44
|
-
export declare const SearchResults: ({ tabs, activeTab, activePlugin, isLoadingPlugins, isLoadingResults, isSubmitting, handleTabChange, handleSearchListOnChange, featureFlags, linkSearchListId, error, queryState, items, activeIndex, selectedIndex, handleSelected, handleKeyDown, adaptiveHeight, retry, }: SearchResultsProps) => JSX.Element;
|
|
45
|
+
export declare const SearchResults: ({ tabs, activeTab, activePlugin, isLoadingPlugins, isLoadingResults, isSubmitting, handleTabChange, handleSearchListOnChange, featureFlags, linkSearchListId, error, queryState, items, activeIndex, selectedIndex, handleSelected, handleKeyDown, adaptiveHeight, retry, shouldRenderNoResultsImage, }: SearchResultsProps) => JSX.Element;
|
|
@@ -49,6 +49,7 @@ export interface LinkSearchListProps extends Omit<React.HTMLAttributes<LinkSearc
|
|
|
49
49
|
activePlugin?: LinkPickerPlugin;
|
|
50
50
|
/** Because we don't use the DST TabPanels component, tabPanelId is needed to set the correct aria-controls for a11y. */
|
|
51
51
|
tabPanelId?: string;
|
|
52
|
+
shouldRenderNoResultsImage?: boolean;
|
|
52
53
|
}
|
|
53
54
|
export declare const LinkSearchList: import("react").ForwardRefExoticComponent<LinkSearchListProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
54
55
|
export {};
|
package/dist/types/ui/link-picker/search-results/link-search-list/link-search-no-results/index.d.ts
CHANGED
|
@@ -14,4 +14,6 @@ export declare const messages: {
|
|
|
14
14
|
export declare const testIds: {
|
|
15
15
|
emptyResultPage: string;
|
|
16
16
|
};
|
|
17
|
-
export declare const NoResults: (
|
|
17
|
+
export declare const NoResults: ({ shouldRenderImage }: {
|
|
18
|
+
shouldRenderImage?: boolean;
|
|
19
|
+
}) => React.JSX.Element;
|
|
@@ -47,6 +47,14 @@ export interface ResolveResult {
|
|
|
47
47
|
export interface LinkPickerUiOptions {
|
|
48
48
|
/** Maximum number of lines to display for the item name */
|
|
49
49
|
listItemNameMaxLines?: number;
|
|
50
|
+
/** Showing dynamic list size based on window height */
|
|
51
|
+
recentSearchListSize?: number;
|
|
52
|
+
/** Adaptive height */
|
|
53
|
+
adaptiveHeight?: boolean;
|
|
54
|
+
/** Hide display text */
|
|
55
|
+
hideDisplayText?: boolean;
|
|
56
|
+
/** Controls showing the image in the no results state */
|
|
57
|
+
shouldRenderNoResultsImage?: boolean;
|
|
50
58
|
}
|
|
51
59
|
export interface LinkPickerPlugin {
|
|
52
60
|
resolve: (state: LinkPickerState) => Promise<ResolveResult> | AsyncGenerator<ResolveResult, ResolveResult>;
|
|
@@ -166,6 +174,10 @@ export interface LinkPickerProps {
|
|
|
166
174
|
previewableLinksOnly?: boolean;
|
|
167
175
|
/**This prop passes one additional error that is secondary to component errors */
|
|
168
176
|
additionalError?: React.ReactNode;
|
|
177
|
+
/** Showing dynamic list size based on window height */
|
|
178
|
+
recentSearchListSize?: number;
|
|
179
|
+
/** Controls showing the image in the no results state */
|
|
180
|
+
shouldRenderNoResultsImage?: boolean;
|
|
169
181
|
}
|
|
170
182
|
type CustomLinkPickerMessages = {
|
|
171
183
|
/** Label for the link input field */
|
|
@@ -13,4 +13,4 @@ export interface LinkPickerPluginsService {
|
|
|
13
13
|
pluginAction?: LinkPickerPluginAction;
|
|
14
14
|
pluginBanner?: LinkPickerPluginBanner;
|
|
15
15
|
}
|
|
16
|
-
export declare function usePlugins(state: LinkPickerState | null, activeTab: number, plugins?: LinkPickerPlugin[], thirdPartyTabExperimentEnabled?: boolean): LinkPickerPluginsService;
|
|
16
|
+
export declare function usePlugins(state: LinkPickerState | null, activeTab: number, plugins?: LinkPickerPlugin[], thirdPartyTabExperimentEnabled?: boolean, recentSearchListSize?: number): LinkPickerPluginsService;
|
|
@@ -40,5 +40,6 @@ export type SearchResultsProps = {
|
|
|
40
40
|
error?: unknown;
|
|
41
41
|
adaptiveHeight: boolean;
|
|
42
42
|
retry: () => void;
|
|
43
|
+
shouldRenderNoResultsImage?: boolean;
|
|
43
44
|
};
|
|
44
|
-
export declare const SearchResults: ({ tabs, activeTab, activePlugin, isLoadingPlugins, isLoadingResults, isSubmitting, handleTabChange, handleSearchListOnChange, featureFlags, linkSearchListId, error, queryState, items, activeIndex, selectedIndex, handleSelected, handleKeyDown, adaptiveHeight, retry, }: SearchResultsProps) => JSX.Element;
|
|
45
|
+
export declare const SearchResults: ({ tabs, activeTab, activePlugin, isLoadingPlugins, isLoadingResults, isSubmitting, handleTabChange, handleSearchListOnChange, featureFlags, linkSearchListId, error, queryState, items, activeIndex, selectedIndex, handleSelected, handleKeyDown, adaptiveHeight, retry, shouldRenderNoResultsImage, }: SearchResultsProps) => JSX.Element;
|
|
@@ -49,6 +49,7 @@ export interface LinkSearchListProps extends Omit<React.HTMLAttributes<LinkSearc
|
|
|
49
49
|
activePlugin?: LinkPickerPlugin;
|
|
50
50
|
/** Because we don't use the DST TabPanels component, tabPanelId is needed to set the correct aria-controls for a11y. */
|
|
51
51
|
tabPanelId?: string;
|
|
52
|
+
shouldRenderNoResultsImage?: boolean;
|
|
52
53
|
}
|
|
53
54
|
export declare const LinkSearchList: import("react").ForwardRefExoticComponent<LinkSearchListProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
54
55
|
export {};
|
|
@@ -14,4 +14,6 @@ export declare const messages: {
|
|
|
14
14
|
export declare const testIds: {
|
|
15
15
|
emptyResultPage: string;
|
|
16
16
|
};
|
|
17
|
-
export declare const NoResults: (
|
|
17
|
+
export declare const NoResults: ({ shouldRenderImage }: {
|
|
18
|
+
shouldRenderImage?: boolean;
|
|
19
|
+
}) => React.JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/link-picker",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.13.0",
|
|
4
4
|
"description": "Standalone link picker",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"publishConfig": {
|
|
@@ -43,6 +43,9 @@
|
|
|
43
43
|
},
|
|
44
44
|
"should-render-to-parent-should-be-true-linking-pla": {
|
|
45
45
|
"type": "boolean"
|
|
46
|
+
},
|
|
47
|
+
"aifc_create_enabled": {
|
|
48
|
+
"type": "boolean"
|
|
46
49
|
}
|
|
47
50
|
},
|
|
48
51
|
"scripts": {
|