@atlaskit/link-picker 1.25.4 → 1.25.6
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 +12 -0
- package/dist/cjs/common/constants.js +4 -2
- package/dist/cjs/i18n/en.js +2 -1
- package/dist/cjs/i18n/en_GB.js +2 -1
- package/dist/cjs/i18n/en_ZZ.js +2 -1
- package/dist/cjs/ui/link-picker/index.js +24 -56
- package/dist/cjs/ui/link-picker/search-results/index.js +90 -0
- package/dist/cjs/ui/link-picker/{link-search-error → search-results/link-search-error}/index.js +1 -1
- package/dist/cjs/ui/link-picker/{link-search-list → search-results/link-search-list}/index.js +5 -10
- package/dist/cjs/ui/link-picker/{link-search-list → search-results/link-search-list}/list-item/index.js +1 -2
- package/dist/cjs/ui/link-picker/{link-search-list → search-results/link-search-list}/list-item/styled.js +2 -2
- package/dist/cjs/ui/link-picker/{link-search-list → search-results/link-search-list}/styled.js +1 -1
- package/dist/cjs/ui/link-picker/{link-search-list → search-results/link-search-list}/use-track-results-shown/index.js +2 -2
- package/dist/cjs/ui/link-picker/search-results/styled.js +16 -0
- package/dist/cjs/ui/link-picker/{track-tab-viewed → search-results/track-tab-viewed}/index.js +2 -2
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/common/constants.js +2 -1
- package/dist/es2019/i18n/en.js +2 -1
- package/dist/es2019/i18n/en_GB.js +2 -1
- package/dist/es2019/i18n/en_ZZ.js +2 -1
- package/dist/es2019/ui/link-picker/index.js +23 -50
- package/dist/es2019/ui/link-picker/search-results/index.js +77 -0
- package/dist/es2019/ui/link-picker/{link-search-error → search-results/link-search-error}/index.js +1 -1
- package/dist/es2019/ui/link-picker/{link-search-list → search-results/link-search-list}/index.js +3 -10
- package/dist/es2019/ui/link-picker/{link-search-list → search-results/link-search-list}/list-item/index.js +1 -2
- package/dist/es2019/ui/link-picker/{link-search-list → search-results/link-search-list}/list-item/styled.js +2 -2
- package/dist/es2019/ui/link-picker/{link-search-list → search-results/link-search-list}/styled.js +1 -1
- package/dist/es2019/ui/link-picker/{link-search-list → search-results/link-search-list}/use-track-results-shown/index.js +2 -2
- package/dist/es2019/ui/link-picker/search-results/styled.js +17 -0
- package/dist/es2019/ui/link-picker/{track-tab-viewed → search-results/track-tab-viewed}/index.js +2 -2
- package/dist/es2019/version.json +1 -1
- package/dist/esm/common/constants.js +2 -1
- package/dist/esm/i18n/en.js +2 -1
- package/dist/esm/i18n/en_GB.js +2 -1
- package/dist/esm/i18n/en_ZZ.js +2 -1
- package/dist/esm/ui/link-picker/index.js +23 -52
- package/dist/esm/ui/link-picker/search-results/index.js +79 -0
- package/dist/esm/ui/link-picker/{link-search-error → search-results/link-search-error}/index.js +1 -1
- package/dist/esm/ui/link-picker/{link-search-list → search-results/link-search-list}/index.js +5 -10
- package/dist/esm/ui/link-picker/{link-search-list → search-results/link-search-list}/list-item/index.js +1 -2
- package/dist/esm/ui/link-picker/{link-search-list → search-results/link-search-list}/list-item/styled.js +2 -2
- package/dist/esm/ui/link-picker/{link-search-list → search-results/link-search-list}/styled.js +1 -1
- package/dist/esm/ui/link-picker/{link-search-list → search-results/link-search-list}/use-track-results-shown/index.js +2 -2
- package/dist/esm/ui/link-picker/search-results/styled.js +6 -0
- package/dist/esm/ui/link-picker/{track-tab-viewed → search-results/track-tab-viewed}/index.js +2 -2
- package/dist/esm/version.json +1 -1
- package/dist/types/common/constants.d.ts +1 -0
- package/dist/types/i18n/en.d.ts +1 -0
- package/dist/types/i18n/en_GB.d.ts +1 -0
- package/dist/types/i18n/en_ZZ.d.ts +1 -0
- package/dist/types/ui/link-picker/index.d.ts +6 -6
- package/dist/types/ui/link-picker/search-results/index.d.ts +40 -0
- package/dist/{types-ts4.5/ui/link-picker → types/ui/link-picker/search-results}/link-search-list/index.d.ts +1 -1
- package/dist/{types-ts4.5/ui/link-picker → types/ui/link-picker/search-results}/link-search-list/list-item/index.d.ts +1 -1
- package/dist/types/ui/link-picker/{link-search-list → search-results/link-search-list}/use-track-results-shown/index.d.ts +1 -1
- package/dist/types/ui/link-picker/search-results/styled.d.ts +3 -0
- package/dist/types/ui/link-picker/{track-tab-viewed → search-results/track-tab-viewed}/index.d.ts +1 -1
- package/dist/types-ts4.5/common/constants.d.ts +1 -0
- package/dist/types-ts4.5/i18n/en.d.ts +1 -0
- package/dist/types-ts4.5/i18n/en_GB.d.ts +1 -0
- package/dist/types-ts4.5/i18n/en_ZZ.d.ts +1 -0
- package/dist/types-ts4.5/ui/link-picker/index.d.ts +6 -6
- package/dist/types-ts4.5/ui/link-picker/search-results/index.d.ts +40 -0
- package/dist/{types/ui/link-picker → types-ts4.5/ui/link-picker/search-results}/link-search-list/index.d.ts +1 -1
- package/dist/{types/ui/link-picker → types-ts4.5/ui/link-picker/search-results}/link-search-list/list-item/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/link-picker/{link-search-list → search-results/link-search-list}/use-track-results-shown/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/link-picker/search-results/styled.d.ts +3 -0
- package/dist/types-ts4.5/ui/link-picker/{track-tab-viewed → search-results/track-tab-viewed}/index.d.ts +1 -1
- package/package.json +6 -5
- /package/dist/cjs/ui/link-picker/{link-search-list → search-results/link-search-list}/link-search-no-results/index.js +0 -0
- /package/dist/cjs/ui/link-picker/{link-search-list → search-results/link-search-list}/link-search-no-results/no-results-svg/index.js +0 -0
- /package/dist/cjs/ui/link-picker/{link-search-list → search-results/link-search-list}/link-search-no-results/no-results-svg/styled.js +0 -0
- /package/dist/cjs/ui/link-picker/{link-search-list → search-results/link-search-list}/link-search-no-results/styled.js +0 -0
- /package/dist/cjs/ui/link-picker/{scrolling-tabs → search-results/scrolling-tabs}/index.js +0 -0
- /package/dist/cjs/ui/link-picker/{scrolling-tabs → search-results/scrolling-tabs}/scrolling-tabs.js +0 -0
- /package/dist/cjs/ui/link-picker/{scrolling-tabs → search-results/scrolling-tabs}/styles.js +0 -0
- /package/dist/es2019/ui/link-picker/{link-search-list → search-results/link-search-list}/link-search-no-results/index.js +0 -0
- /package/dist/es2019/ui/link-picker/{link-search-list → search-results/link-search-list}/link-search-no-results/no-results-svg/index.js +0 -0
- /package/dist/es2019/ui/link-picker/{link-search-list → search-results/link-search-list}/link-search-no-results/no-results-svg/styled.js +0 -0
- /package/dist/es2019/ui/link-picker/{link-search-list → search-results/link-search-list}/link-search-no-results/styled.js +0 -0
- /package/dist/es2019/ui/link-picker/{scrolling-tabs → search-results/scrolling-tabs}/index.js +0 -0
- /package/dist/es2019/ui/link-picker/{scrolling-tabs → search-results/scrolling-tabs}/scrolling-tabs.js +0 -0
- /package/dist/es2019/ui/link-picker/{scrolling-tabs → search-results/scrolling-tabs}/styles.js +0 -0
- /package/dist/esm/ui/link-picker/{link-search-list → search-results/link-search-list}/link-search-no-results/index.js +0 -0
- /package/dist/esm/ui/link-picker/{link-search-list → search-results/link-search-list}/link-search-no-results/no-results-svg/index.js +0 -0
- /package/dist/esm/ui/link-picker/{link-search-list → search-results/link-search-list}/link-search-no-results/no-results-svg/styled.js +0 -0
- /package/dist/esm/ui/link-picker/{link-search-list → search-results/link-search-list}/link-search-no-results/styled.js +0 -0
- /package/dist/esm/ui/link-picker/{scrolling-tabs → search-results/scrolling-tabs}/index.js +0 -0
- /package/dist/esm/ui/link-picker/{scrolling-tabs → search-results/scrolling-tabs}/scrolling-tabs.js +0 -0
- /package/dist/esm/ui/link-picker/{scrolling-tabs → search-results/scrolling-tabs}/styles.js +0 -0
- /package/dist/types/ui/link-picker/{link-search-error → search-results/link-search-error}/index.d.ts +0 -0
- /package/dist/types/ui/link-picker/{link-search-list → search-results/link-search-list}/link-search-no-results/index.d.ts +0 -0
- /package/dist/types/ui/link-picker/{link-search-list → search-results/link-search-list}/link-search-no-results/no-results-svg/index.d.ts +0 -0
- /package/dist/types/ui/link-picker/{link-search-list → search-results/link-search-list}/link-search-no-results/no-results-svg/styled.d.ts +0 -0
- /package/dist/types/ui/link-picker/{link-search-list → search-results/link-search-list}/link-search-no-results/styled.d.ts +0 -0
- /package/dist/types/ui/link-picker/{link-search-list → search-results/link-search-list}/list-item/styled.d.ts +0 -0
- /package/dist/types/ui/link-picker/{link-search-list → search-results/link-search-list}/styled.d.ts +0 -0
- /package/dist/types/ui/link-picker/{scrolling-tabs → search-results/scrolling-tabs}/index.d.ts +0 -0
- /package/dist/types/ui/link-picker/{scrolling-tabs → search-results/scrolling-tabs}/scrolling-tabs.d.ts +0 -0
- /package/dist/types/ui/link-picker/{scrolling-tabs → search-results/scrolling-tabs}/styles.d.ts +0 -0
- /package/dist/types-ts4.5/ui/link-picker/{link-search-error → search-results/link-search-error}/index.d.ts +0 -0
- /package/dist/types-ts4.5/ui/link-picker/{link-search-list → search-results/link-search-list}/link-search-no-results/index.d.ts +0 -0
- /package/dist/types-ts4.5/ui/link-picker/{link-search-list → search-results/link-search-list}/link-search-no-results/no-results-svg/index.d.ts +0 -0
- /package/dist/types-ts4.5/ui/link-picker/{link-search-list → search-results/link-search-list}/link-search-no-results/no-results-svg/styled.d.ts +0 -0
- /package/dist/types-ts4.5/ui/link-picker/{link-search-list → search-results/link-search-list}/link-search-no-results/styled.d.ts +0 -0
- /package/dist/types-ts4.5/ui/link-picker/{link-search-list → search-results/link-search-list}/list-item/styled.d.ts +0 -0
- /package/dist/types-ts4.5/ui/link-picker/{link-search-list → search-results/link-search-list}/styled.d.ts +0 -0
- /package/dist/types-ts4.5/ui/link-picker/{scrolling-tabs → search-results/scrolling-tabs}/index.d.ts +0 -0
- /package/dist/types-ts4.5/ui/link-picker/{scrolling-tabs → search-results/scrolling-tabs}/scrolling-tabs.d.ts +0 -0
- /package/dist/types-ts4.5/ui/link-picker/{scrolling-tabs → search-results/scrolling-tabs}/styles.d.ts +0 -0
package/dist/esm/ui/link-picker/{link-search-list → search-results/link-search-list}/index.js
RENAMED
|
@@ -11,7 +11,7 @@ import { defineMessages, FormattedMessage } from 'react-intl-next';
|
|
|
11
11
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
12
12
|
import Spinner from '@atlaskit/spinner';
|
|
13
13
|
import VisuallyHidden from '@atlaskit/visually-hidden';
|
|
14
|
-
import { handleNavKeyDown } from '
|
|
14
|
+
import { handleNavKeyDown } from '../../../../common/utils/handleNavKeyDown';
|
|
15
15
|
import { NoResults, testIds as noResultsTestIds } from './link-search-no-results';
|
|
16
16
|
import { emptyStateNoResultsWrapper } from './link-search-no-results/styled';
|
|
17
17
|
import { LinkSearchListItem, testIds as searchResultItemTestIds } from './list-item';
|
|
@@ -76,12 +76,6 @@ export var LinkSearchList = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
76
76
|
}
|
|
77
77
|
return -1;
|
|
78
78
|
}, [selectedIndex]);
|
|
79
|
-
var handleOnFocus = function handleOnFocus() {
|
|
80
|
-
if (items && items.length > 0 && selectedIndex === -1) {
|
|
81
|
-
var item = items[0];
|
|
82
|
-
onChange(item.objectId);
|
|
83
|
-
}
|
|
84
|
-
};
|
|
85
79
|
var handleKeyDown = useCallback(function (event) {
|
|
86
80
|
var updatedIndex = activeIndex;
|
|
87
81
|
if (onKeyDown) {
|
|
@@ -93,13 +87,12 @@ export var LinkSearchList = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
93
87
|
updatedIndex = handleNavKeyDown(event, items.length, activeIndex);
|
|
94
88
|
var item = items === null || items === void 0 ? void 0 : items[updatedIndex];
|
|
95
89
|
if (['ArrowDown', 'ArrowUp', 'Home', 'End'].includes(event.key) && item) {
|
|
96
|
-
onChange(item.objectId);
|
|
97
90
|
if (itemRefs.current) {
|
|
98
91
|
var _itemRefs$current$ite;
|
|
99
92
|
(_itemRefs$current$ite = itemRefs.current[item.objectId]) === null || _itemRefs$current$ite === void 0 ? void 0 : _itemRefs$current$ite.focus();
|
|
100
93
|
}
|
|
101
94
|
}
|
|
102
|
-
}, [activeIndex, items,
|
|
95
|
+
}, [activeIndex, items, onKeyDown]);
|
|
103
96
|
if ((items === null || items === void 0 ? void 0 : items.length) === 0) {
|
|
104
97
|
if (getBooleanFF('platform.linking-platform.link-picker.enable-empty-state')) {
|
|
105
98
|
if (hasSearchTerm) {
|
|
@@ -140,7 +133,9 @@ export var LinkSearchList = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
140
133
|
item: item,
|
|
141
134
|
selected: selectedIndex === index,
|
|
142
135
|
active: activeIndex === index,
|
|
143
|
-
onFocus:
|
|
136
|
+
onFocus: function onFocus() {
|
|
137
|
+
return onChange(item.objectId);
|
|
138
|
+
},
|
|
144
139
|
onKeyDown: handleKeyDown,
|
|
145
140
|
onSelect: onSelect,
|
|
146
141
|
key: item.objectId,
|
|
@@ -3,7 +3,7 @@ import { forwardRef, Fragment } from 'react';
|
|
|
3
3
|
import { jsx } from '@emotion/react';
|
|
4
4
|
import { useIntl } from 'react-intl-next';
|
|
5
5
|
/* eslint-disable-next-line @atlassian/tangerine/import/no-parent-imports */
|
|
6
|
-
import { transformTimeStamp } from '
|
|
6
|
+
import { transformTimeStamp } from '../../../transformTimeStamp';
|
|
7
7
|
import { composeListItemStyles, imgStyles, itemIconStyles, itemNameStyles, listItemContainerInnerStyles, listItemContainerStyles, listItemContextStyles, listItemNameStyles } from './styled';
|
|
8
8
|
export var testIds = {
|
|
9
9
|
searchResultItem: 'link-search-list-item',
|
|
@@ -45,7 +45,6 @@ var ListItemIcon = function ListItemIcon(props) {
|
|
|
45
45
|
export var LinkSearchListItem = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
46
46
|
var item = _ref.item,
|
|
47
47
|
selected = _ref.selected,
|
|
48
|
-
active = _ref.active,
|
|
49
48
|
id = _ref.id,
|
|
50
49
|
role = _ref.role,
|
|
51
50
|
onSelect = _ref.onSelect,
|
|
@@ -14,7 +14,7 @@ export var relativeFontSizeToBase16 = function relativeFontSizeToBase16(px) {
|
|
|
14
14
|
}
|
|
15
15
|
return "".concat(px / 16, "rem");
|
|
16
16
|
};
|
|
17
|
-
var listItemBaseStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n padding: ", " ", ";\n margin: 0
|
|
17
|
+
var listItemBaseStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n padding: ", " ", ";\n margin: 0;\n cursor: pointer;\n"])), "var(--ds-space-100, 8px)", "var(--ds-space-200, 16px)");
|
|
18
18
|
var listItemFocusStyles = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n &:focus {\n outline: none;\n box-shadow: 0 0 0 2px ", " inset;\n text-decoration: none;\n }\n"])), "var(--ds-border-focused, ".concat(B100, ")"));
|
|
19
19
|
var listItemBoxShadow = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n box-shadow: inset 2px 0px 0px ", ";\n"])), "var(--ds-border-selected, ".concat(B400, ")"));
|
|
20
20
|
var listItemActive = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n &:hover {\n background-color: ", ";\n ", ";\n }\n"])), "var(--ds-background-neutral-subtle-hovered, ".concat(N20, ")"), listItemBoxShadow);
|
|
@@ -29,6 +29,6 @@ export var listItemContextStyles = css(_templateObject9 || (_templateObject9 = _
|
|
|
29
29
|
export var listItemContainerStyles = css(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n overflow: hidden;\n text-overflow: ellipsis;\n"])));
|
|
30
30
|
export var listItemContainerInnerStyles = css(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n color: ", ";\n white-space: nowrap;\n"])), "var(--ds-text-subtlest, ".concat(N200, ")"));
|
|
31
31
|
|
|
32
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
32
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
33
33
|
export var itemIconStyles = css(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n min-width: ", ";\n margin-top: 3px;\n margin-right: ", ";\n"])), "var(--ds-space-200, 16px)", "var(--ds-space-150, 12px)");
|
|
34
34
|
export var imgStyles = css(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n max-width: ", ";\n"])), "var(--ds-space-200, 16px)");
|
package/dist/esm/ui/link-picker/{link-search-list → search-results/link-search-list}/styled.js
RENAMED
|
@@ -7,5 +7,5 @@ import { css } from '@emotion/react';
|
|
|
7
7
|
import { typography } from '@atlaskit/theme';
|
|
8
8
|
export var listContainerStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding-top: 0;\n min-height: 80px;\n margin-top: ", ";\n margin-bottom: ", ";\n flex-grow: 1;\n display: flex;\n flex-direction: column;\n"])), "var(--ds-space-200, 16px)", "var(--ds-space-200, 16px)");
|
|
9
9
|
export var spinnerContainerStyles = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n text-align: center;\n min-height: 80px;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-grow: 1;\n"])));
|
|
10
|
-
export var listStyles = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n padding: 0;\n margin: 0;\n list-style: none;\n"])));
|
|
10
|
+
export var listStyles = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n padding: 0;\n margin: 0 calc(-1 * ", ");\n list-style: none;\n"])), "var(--ds-space-200, 16px)");
|
|
11
11
|
export var listTitleStyles = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n ", "\n text-transform: uppercase;\n margin-top: 0;\n margin-bottom: ", ";\n"])), typography.h100(), "var(--ds-space-050, 4px)");
|
|
@@ -2,8 +2,8 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
2
2
|
import { useEffect, useMemo, useRef } from 'react';
|
|
3
3
|
import { useDebounce } from 'use-debounce';
|
|
4
4
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
5
|
-
import { ANALYTICS_CHANNEL } from '
|
|
6
|
-
import createEventPayload from '
|
|
5
|
+
import { ANALYTICS_CHANNEL } from '../../../../../common/constants';
|
|
6
|
+
import createEventPayload from '../../../../../common/utils/analytics/analytics.codegen';
|
|
7
7
|
var DEBOUNCE_MS = 400;
|
|
8
8
|
export var useTrackResultsShown = function useTrackResultsShown(isLoading, items, hasSearchTerm) {
|
|
9
9
|
var _useAnalyticsEvents = useAnalyticsEvents(),
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
+
var _templateObject, _templateObject2, _templateObject3;
|
|
3
|
+
import { css } from '@emotion/react';
|
|
4
|
+
export var tabsWrapperStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n margin-top: ", ";\n margin-left: calc(-1 * ", ");\n margin-right: calc(-1 * ", ");\n"])), "var(--ds-space-150, 12px)", "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)");
|
|
5
|
+
export var spinnerContainerStyles = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n min-height: 80px;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-grow: 1;\n"])));
|
|
6
|
+
export var flexColumnStyles = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n"])));
|
package/dist/esm/ui/link-picker/{track-tab-viewed → search-results/track-tab-viewed}/index.js
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { useLayoutEffect } from 'react';
|
|
3
3
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
4
|
-
import { ANALYTICS_CHANNEL } from '
|
|
5
|
-
import createEventPayload from '
|
|
4
|
+
import { ANALYTICS_CHANNEL } from '../../../../common/constants';
|
|
5
|
+
import createEventPayload from '../../../../common/utils/analytics/analytics.codegen';
|
|
6
6
|
export function TrackTabViewed(_ref) {
|
|
7
7
|
var activePlugin = _ref.activePlugin;
|
|
8
8
|
var _useAnalyticsEvents = useAnalyticsEvents(),
|
package/dist/esm/version.json
CHANGED
package/dist/types/i18n/en.d.ts
CHANGED
|
@@ -2,21 +2,21 @@
|
|
|
2
2
|
import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
3
3
|
import { LinkInputType, LinkPickerPlugin } from '../../common/types';
|
|
4
4
|
export declare const testIds: {
|
|
5
|
-
readonly tabList: "link-picker-tabs";
|
|
6
|
-
readonly tabItem: "link-picker-tab";
|
|
7
5
|
readonly urlError: string;
|
|
8
6
|
readonly clearUrlButton: string;
|
|
7
|
+
readonly insertButton: "link-picker-insert-button";
|
|
8
|
+
readonly cancelButton: "link-picker-cancel-button";
|
|
9
|
+
readonly actionButton: "link-picker-action-button";
|
|
10
|
+
readonly tabsLoadingIndicator: string;
|
|
11
|
+
readonly tabList: string;
|
|
12
|
+
readonly tabItem: string;
|
|
9
13
|
readonly resultListTitle: string;
|
|
10
14
|
readonly searchResultList: string;
|
|
11
15
|
readonly searchResultLoadingIndicator: string;
|
|
12
|
-
readonly tabsLoadingIndicator: string;
|
|
13
16
|
readonly searchResultItem: string;
|
|
14
17
|
readonly searchResultIcon: string;
|
|
15
18
|
readonly emptyResultPage: string;
|
|
16
19
|
readonly searchError: string;
|
|
17
|
-
readonly insertButton: "link-picker-insert-button";
|
|
18
|
-
readonly cancelButton: "link-picker-cancel-button";
|
|
19
|
-
readonly actionButton: "link-picker-action-button";
|
|
20
20
|
readonly linkPickerRoot: "link-picker-root";
|
|
21
21
|
readonly linkPicker: "link-picker";
|
|
22
22
|
readonly urlInputField: "link-url";
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { KeyboardEvent } from 'react';
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
4
|
+
import { LinkPickerPlugin, LinkSearchListItemData } from '../../../common/types';
|
|
5
|
+
export declare const testIds: {
|
|
6
|
+
tabsLoadingIndicator: string;
|
|
7
|
+
tabList: string;
|
|
8
|
+
tabItem: string;
|
|
9
|
+
resultListTitle: string;
|
|
10
|
+
searchResultList: string;
|
|
11
|
+
searchResultLoadingIndicator: string;
|
|
12
|
+
searchResultItem: string;
|
|
13
|
+
searchResultIcon: string;
|
|
14
|
+
emptyResultPage: string;
|
|
15
|
+
searchError: string;
|
|
16
|
+
};
|
|
17
|
+
export type SearchResultsProps = {
|
|
18
|
+
activePlugin?: LinkPickerPlugin;
|
|
19
|
+
tabs: {
|
|
20
|
+
tabTitle: string;
|
|
21
|
+
}[];
|
|
22
|
+
isLoadingPlugins?: boolean;
|
|
23
|
+
isLoadingResults: boolean;
|
|
24
|
+
activeTab: number;
|
|
25
|
+
handleTabChange: (activeTab: number) => void;
|
|
26
|
+
handleSearchListOnChange: (id: string) => void;
|
|
27
|
+
featureFlags?: Record<string, unknown>;
|
|
28
|
+
linkSearchListId: string;
|
|
29
|
+
queryState?: {
|
|
30
|
+
query: string;
|
|
31
|
+
};
|
|
32
|
+
items?: LinkSearchListItemData[] | null;
|
|
33
|
+
activeIndex: number;
|
|
34
|
+
selectedIndex: number;
|
|
35
|
+
handleSelected: (objectId: string) => void;
|
|
36
|
+
handleKeyDown: (e: KeyboardEvent<HTMLElement>) => void;
|
|
37
|
+
error?: unknown;
|
|
38
|
+
retry: () => void;
|
|
39
|
+
};
|
|
40
|
+
export declare const SearchResults: ({ tabs, activeTab, activePlugin, isLoadingPlugins, isLoadingResults, handleTabChange, handleSearchListOnChange, featureFlags, linkSearchListId, error, queryState, items, activeIndex, selectedIndex, handleSelected, handleKeyDown, retry, }: SearchResultsProps) => jsx.JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { KeyboardEvent } from 'react';
|
|
3
|
-
import { LinkPickerPlugin, LinkSearchListItemData } from '
|
|
3
|
+
import { LinkPickerPlugin, LinkSearchListItemData } from '../../../../common/types';
|
|
4
4
|
export declare const messages: {
|
|
5
5
|
titleRecentlyViewed: {
|
|
6
6
|
id: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { KeyboardEvent } from 'react';
|
|
3
|
-
import { LinkSearchListItemData } from '
|
|
3
|
+
import { LinkSearchListItemData } from '../../../../../common/types';
|
|
4
4
|
export declare const testIds: {
|
|
5
5
|
searchResultItem: string;
|
|
6
6
|
searchResultIcon: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { LinkSearchListItemData } from '
|
|
1
|
+
import { LinkSearchListItemData } from '../../../../../common/types';
|
|
2
2
|
export declare const useTrackResultsShown: (isLoading: boolean, items?: LinkSearchListItemData[] | null | undefined, hasSearchTerm?: boolean) => void;
|
|
@@ -2,21 +2,21 @@
|
|
|
2
2
|
import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
3
3
|
import { LinkInputType, LinkPickerPlugin } from '../../common/types';
|
|
4
4
|
export declare const testIds: {
|
|
5
|
-
readonly tabList: "link-picker-tabs";
|
|
6
|
-
readonly tabItem: "link-picker-tab";
|
|
7
5
|
readonly urlError: string;
|
|
8
6
|
readonly clearUrlButton: string;
|
|
7
|
+
readonly insertButton: "link-picker-insert-button";
|
|
8
|
+
readonly cancelButton: "link-picker-cancel-button";
|
|
9
|
+
readonly actionButton: "link-picker-action-button";
|
|
10
|
+
readonly tabsLoadingIndicator: string;
|
|
11
|
+
readonly tabList: string;
|
|
12
|
+
readonly tabItem: string;
|
|
9
13
|
readonly resultListTitle: string;
|
|
10
14
|
readonly searchResultList: string;
|
|
11
15
|
readonly searchResultLoadingIndicator: string;
|
|
12
|
-
readonly tabsLoadingIndicator: string;
|
|
13
16
|
readonly searchResultItem: string;
|
|
14
17
|
readonly searchResultIcon: string;
|
|
15
18
|
readonly emptyResultPage: string;
|
|
16
19
|
readonly searchError: string;
|
|
17
|
-
readonly insertButton: "link-picker-insert-button";
|
|
18
|
-
readonly cancelButton: "link-picker-cancel-button";
|
|
19
|
-
readonly actionButton: "link-picker-action-button";
|
|
20
20
|
readonly linkPickerRoot: "link-picker-root";
|
|
21
21
|
readonly linkPicker: "link-picker";
|
|
22
22
|
readonly urlInputField: "link-url";
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { KeyboardEvent } from 'react';
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
4
|
+
import { LinkPickerPlugin, LinkSearchListItemData } from '../../../common/types';
|
|
5
|
+
export declare const testIds: {
|
|
6
|
+
tabsLoadingIndicator: string;
|
|
7
|
+
tabList: string;
|
|
8
|
+
tabItem: string;
|
|
9
|
+
resultListTitle: string;
|
|
10
|
+
searchResultList: string;
|
|
11
|
+
searchResultLoadingIndicator: string;
|
|
12
|
+
searchResultItem: string;
|
|
13
|
+
searchResultIcon: string;
|
|
14
|
+
emptyResultPage: string;
|
|
15
|
+
searchError: string;
|
|
16
|
+
};
|
|
17
|
+
export type SearchResultsProps = {
|
|
18
|
+
activePlugin?: LinkPickerPlugin;
|
|
19
|
+
tabs: {
|
|
20
|
+
tabTitle: string;
|
|
21
|
+
}[];
|
|
22
|
+
isLoadingPlugins?: boolean;
|
|
23
|
+
isLoadingResults: boolean;
|
|
24
|
+
activeTab: number;
|
|
25
|
+
handleTabChange: (activeTab: number) => void;
|
|
26
|
+
handleSearchListOnChange: (id: string) => void;
|
|
27
|
+
featureFlags?: Record<string, unknown>;
|
|
28
|
+
linkSearchListId: string;
|
|
29
|
+
queryState?: {
|
|
30
|
+
query: string;
|
|
31
|
+
};
|
|
32
|
+
items?: LinkSearchListItemData[] | null;
|
|
33
|
+
activeIndex: number;
|
|
34
|
+
selectedIndex: number;
|
|
35
|
+
handleSelected: (objectId: string) => void;
|
|
36
|
+
handleKeyDown: (e: KeyboardEvent<HTMLElement>) => void;
|
|
37
|
+
error?: unknown;
|
|
38
|
+
retry: () => void;
|
|
39
|
+
};
|
|
40
|
+
export declare const SearchResults: ({ tabs, activeTab, activePlugin, isLoadingPlugins, isLoadingResults, handleTabChange, handleSearchListOnChange, featureFlags, linkSearchListId, error, queryState, items, activeIndex, selectedIndex, handleSelected, handleKeyDown, retry, }: SearchResultsProps) => jsx.JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { KeyboardEvent } from 'react';
|
|
3
|
-
import { LinkPickerPlugin, LinkSearchListItemData } from '
|
|
3
|
+
import { LinkPickerPlugin, LinkSearchListItemData } from '../../../../common/types';
|
|
4
4
|
export declare const messages: {
|
|
5
5
|
titleRecentlyViewed: {
|
|
6
6
|
id: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { KeyboardEvent } from 'react';
|
|
3
|
-
import { LinkSearchListItemData } from '
|
|
3
|
+
import { LinkSearchListItemData } from '../../../../../common/types';
|
|
4
4
|
export declare const testIds: {
|
|
5
5
|
searchResultItem: string;
|
|
6
6
|
searchResultIcon: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { LinkSearchListItemData } from '
|
|
1
|
+
import { LinkSearchListItemData } from '../../../../../common/types';
|
|
2
2
|
export declare const useTrackResultsShown: (isLoading: boolean, items?: LinkSearchListItemData[] | null | undefined, hasSearchTerm?: boolean) => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/link-picker",
|
|
3
|
-
"version": "1.25.
|
|
3
|
+
"version": "1.25.6",
|
|
4
4
|
"description": "Standalone link picker",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"publishConfig": {
|
|
@@ -52,14 +52,14 @@
|
|
|
52
52
|
"@atlaskit/form": "^8.11.0",
|
|
53
53
|
"@atlaskit/frontend-utilities": "^2.7.0",
|
|
54
54
|
"@atlaskit/icon": "^21.12.0",
|
|
55
|
-
"@atlaskit/linking-common": "^3.
|
|
55
|
+
"@atlaskit/linking-common": "^3.2.0",
|
|
56
56
|
"@atlaskit/onboarding": "^10.8.2",
|
|
57
57
|
"@atlaskit/platform-feature-flags": "^0.2.1",
|
|
58
58
|
"@atlaskit/spinner": "^15.5.0",
|
|
59
59
|
"@atlaskit/tabs": "^13.4.0",
|
|
60
60
|
"@atlaskit/textfield": "^5.5.0",
|
|
61
61
|
"@atlaskit/theme": "^12.5.0",
|
|
62
|
-
"@atlaskit/tokens": "^1.
|
|
62
|
+
"@atlaskit/tokens": "^1.11.0",
|
|
63
63
|
"@atlaskit/tooltip": "^17.8.0",
|
|
64
64
|
"@atlaskit/ufo": "^0.2.0",
|
|
65
65
|
"@atlaskit/visually-hidden": "^1.2.0",
|
|
@@ -77,12 +77,13 @@
|
|
|
77
77
|
},
|
|
78
78
|
"devDependencies": {
|
|
79
79
|
"@af/analytics-codegen": "^0.1.0",
|
|
80
|
+
"@af/visual-regression": "*",
|
|
80
81
|
"@atlaskit/docs": "*",
|
|
81
82
|
"@atlaskit/dropdown-menu": "^11.10.0",
|
|
82
|
-
"@atlaskit/link-analytics": "^8.
|
|
83
|
+
"@atlaskit/link-analytics": "^8.2.0",
|
|
83
84
|
"@atlaskit/link-provider": "^1.6.0",
|
|
84
85
|
"@atlaskit/link-test-helpers": "^4.1.0",
|
|
85
|
-
"@atlaskit/linking-common": "^3.
|
|
86
|
+
"@atlaskit/linking-common": "^3.2.0",
|
|
86
87
|
"@atlaskit/popup": "^1.8.0",
|
|
87
88
|
"@atlaskit/toggle": "^12.6.0",
|
|
88
89
|
"@atlaskit/visual-regression": "*",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/cjs/ui/link-picker/{scrolling-tabs → search-results/scrolling-tabs}/scrolling-tabs.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/es2019/ui/link-picker/{scrolling-tabs → search-results/scrolling-tabs}/index.js
RENAMED
|
File without changes
|
|
File without changes
|
/package/dist/es2019/ui/link-picker/{scrolling-tabs → search-results/scrolling-tabs}/styles.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/esm/ui/link-picker/{scrolling-tabs → search-results/scrolling-tabs}/scrolling-tabs.js
RENAMED
|
File without changes
|
|
File without changes
|
/package/dist/types/ui/link-picker/{link-search-error → search-results/link-search-error}/index.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/types/ui/link-picker/{link-search-list → search-results/link-search-list}/styled.d.ts
RENAMED
|
File without changes
|
/package/dist/types/ui/link-picker/{scrolling-tabs → search-results/scrolling-tabs}/index.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
/package/dist/types/ui/link-picker/{scrolling-tabs → search-results/scrolling-tabs}/styles.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/types-ts4.5/ui/link-picker/{scrolling-tabs → search-results/scrolling-tabs}/index.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|