@atlaskit/link-picker 1.5.0 → 1.6.1
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 +18 -0
- package/dist/cjs/ui/link-picker/index.js +21 -13
- package/dist/cjs/ui/link-picker/styled.js +5 -3
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/ui/link-picker/index.js +18 -10
- package/dist/es2019/ui/link-picker/styled.js +4 -0
- package/dist/es2019/version.json +1 -1
- package/dist/esm/ui/link-picker/index.js +18 -10
- package/dist/esm/ui/link-picker/styled.js +3 -2
- package/dist/esm/version.json +1 -1
- package/dist/types/ui/link-picker/index.d.ts +3 -1
- package/dist/types/ui/link-picker/styled.d.ts +1 -0
- package/package.json +5 -4
- package/report.api.md +13 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/link-picker
|
|
2
2
|
|
|
3
|
+
## 1.6.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`e3f36b94557`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e3f36b94557) - Inlines svg assets directly into the UI
|
|
8
|
+
|
|
9
|
+
## 1.6.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [`c9c0a119587`](https://bitbucket.org/atlassian/atlassian-frontend/commits/c9c0a119587) - [ux] EDM-3881: add onContentRezise prop to allow callbacks after contents changed in items, plugin, tabs, etc.
|
|
14
|
+
|
|
15
|
+
## 1.5.1
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- [`99dba1b6364`](https://bitbucket.org/atlassian/atlassian-frontend/commits/99dba1b6364) - [ux] Fix the tab margin in Link Picker
|
|
20
|
+
|
|
3
21
|
## 1.5.0
|
|
4
22
|
|
|
5
23
|
### Minor Changes
|
|
@@ -21,6 +21,16 @@ var _react2 = require("@emotion/react");
|
|
|
21
21
|
|
|
22
22
|
var _reactIntlNext = require("react-intl-next");
|
|
23
23
|
|
|
24
|
+
var _button = _interopRequireWildcard(require("@atlaskit/button"));
|
|
25
|
+
|
|
26
|
+
var _form = require("@atlaskit/form");
|
|
27
|
+
|
|
28
|
+
var _search = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/search"));
|
|
29
|
+
|
|
30
|
+
var _tabs = _interopRequireWildcard(require("@atlaskit/tabs"));
|
|
31
|
+
|
|
32
|
+
var _visuallyHidden = _interopRequireDefault(require("@atlaskit/visually-hidden"));
|
|
33
|
+
|
|
24
34
|
var _messages = require("./messages");
|
|
25
35
|
|
|
26
36
|
var _textInput = _interopRequireDefault(require("./text-input"));
|
|
@@ -35,17 +45,7 @@ var _browser = require("./browser");
|
|
|
35
45
|
|
|
36
46
|
var _transformTimeStamp = require("./transformTimeStamp");
|
|
37
47
|
|
|
38
|
-
var _announcer = _interopRequireDefault(require("
|
|
39
|
-
|
|
40
|
-
var _button = _interopRequireWildcard(require("@atlaskit/button"));
|
|
41
|
-
|
|
42
|
-
var _form = require("@atlaskit/form");
|
|
43
|
-
|
|
44
|
-
var _search = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/search"));
|
|
45
|
-
|
|
46
|
-
var _tabs = _interopRequireWildcard(require("@atlaskit/tabs"));
|
|
47
|
-
|
|
48
|
-
var _visuallyHidden = _interopRequireDefault(require("@atlaskit/visually-hidden"));
|
|
48
|
+
var _announcer = _interopRequireDefault(require("./announcer"));
|
|
49
49
|
|
|
50
50
|
var _linkSearchNoResults = _interopRequireDefault(require("./link-search-no-results"));
|
|
51
51
|
|
|
@@ -102,6 +102,7 @@ function reducer(state, payload) {
|
|
|
102
102
|
function LinkPicker(_ref) {
|
|
103
103
|
var onSubmit = _ref.onSubmit,
|
|
104
104
|
onCancel = _ref.onCancel,
|
|
105
|
+
onContentResize = _ref.onContentResize,
|
|
105
106
|
plugins = _ref.plugins,
|
|
106
107
|
initUrl = _ref.url,
|
|
107
108
|
initDisplayText = _ref.displayText;
|
|
@@ -129,6 +130,11 @@ function LinkPicker(_ref) {
|
|
|
129
130
|
isActivePlugin = _usePlugins.isActivePlugin,
|
|
130
131
|
tabs = _usePlugins.tabs;
|
|
131
132
|
|
|
133
|
+
(0, _react.useLayoutEffect)(function () {
|
|
134
|
+
if (onContentResize) {
|
|
135
|
+
onContentResize();
|
|
136
|
+
}
|
|
137
|
+
}, [onContentResize, items, isLoading, isActivePlugin, tabs]);
|
|
132
138
|
var handleChangeUrl = (0, _react.useCallback)(function (url) {
|
|
133
139
|
dispatch({
|
|
134
140
|
url: url
|
|
@@ -297,7 +303,9 @@ function LinkPicker(_ref) {
|
|
|
297
303
|
onSubmit: handleSubmit,
|
|
298
304
|
onKeyDown: handleKeyDown,
|
|
299
305
|
onChange: handleChangeText
|
|
300
|
-
}), tabs.length > 0 && (0, _react2.jsx)(
|
|
306
|
+
}), tabs.length > 0 && (0, _react2.jsx)("div", {
|
|
307
|
+
css: _styled.tabsWrapperStyles
|
|
308
|
+
}, (0, _react2.jsx)(_tabs.default, {
|
|
301
309
|
id: testIds.tabList,
|
|
302
310
|
testId: testIds.tabList,
|
|
303
311
|
onChange: function onChange(activeTab) {
|
|
@@ -313,7 +321,7 @@ function LinkPicker(_ref) {
|
|
|
313
321
|
key: tab.tabTitle,
|
|
314
322
|
testId: testIds.tabItem
|
|
315
323
|
}, tab.tabTitle);
|
|
316
|
-
}))), !!items.length && (0, _react2.jsx)("div", {
|
|
324
|
+
})))), !!items.length && (0, _react2.jsx)("div", {
|
|
317
325
|
css: _styled.listTitleStyles,
|
|
318
326
|
id: testIds.resultListTitle,
|
|
319
327
|
"data-testid": testIds.resultListTitle
|
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.searchIconStyles = exports.rootContainerStylesForLoader = exports.rootContainerStyles = exports.listTitleStyles = void 0;
|
|
8
|
+
exports.tabsWrapperStyles = exports.searchIconStyles = exports.rootContainerStylesForLoader = exports.rootContainerStyles = exports.listTitleStyles = void 0;
|
|
9
9
|
|
|
10
10
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
11
11
|
|
|
@@ -19,7 +19,7 @@ var _theme = require("@atlaskit/theme");
|
|
|
19
19
|
|
|
20
20
|
var _constants = require("@atlaskit/theme/constants");
|
|
21
21
|
|
|
22
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
22
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
23
23
|
|
|
24
24
|
var LINK_PICKER_WIDTH_IN_PX = 342;
|
|
25
25
|
var LINK_PICKER_MIN_HEIGHT_IN_PX = 234;
|
|
@@ -30,4 +30,6 @@ exports.rootContainerStylesForLoader = rootContainerStylesForLoader;
|
|
|
30
30
|
var searchIconStyles = (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n margin-left: ", "px;\n color: ", ";\n cursor: default;\n"])), (0, _constants.gridSize)() / 2, (0, _tokens.token)('color.icon', _colors.N500));
|
|
31
31
|
exports.searchIconStyles = searchIconStyles;
|
|
32
32
|
var listTitleStyles = (0, _react.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n text-transform: uppercase;\n margin-bottom: ", "px;\n"])), _theme.typography.h100(), (0, _constants.gridSize)() / 2);
|
|
33
|
-
exports.listTitleStyles = listTitleStyles;
|
|
33
|
+
exports.listTitleStyles = listTitleStyles;
|
|
34
|
+
var tabsWrapperStyles = (0, _react.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n margin-left: -", "px;\n margin-right: -", "px;\n"])), (0, _constants.gridSize)(), (0, _constants.gridSize)());
|
|
35
|
+
exports.tabsWrapperStyles = tabsWrapperStyles;
|
package/dist/cjs/version.json
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
|
|
3
3
|
/** @jsx jsx */
|
|
4
|
-
import { useCallback, useReducer } from 'react';
|
|
4
|
+
import { useCallback, useLayoutEffect, useReducer } from 'react';
|
|
5
5
|
import { jsx } from '@emotion/react';
|
|
6
6
|
import { useIntl, FormattedMessage } from 'react-intl-next';
|
|
7
|
+
import Button, { ButtonGroup } from '@atlaskit/button';
|
|
8
|
+
import { FormFooter } from '@atlaskit/form';
|
|
9
|
+
import EditorSearchIcon from '@atlaskit/icon/glyph/editor/search';
|
|
10
|
+
import Tabs, { Tab, TabList } from '@atlaskit/tabs';
|
|
11
|
+
import VisuallyHidden from '@atlaskit/visually-hidden';
|
|
7
12
|
import { messages } from './messages';
|
|
8
13
|
import PanelTextInput from './text-input';
|
|
9
14
|
import LinkSearchList from './link-search-list';
|
|
10
15
|
import { normalizeUrl, isSafeUrl } from './url';
|
|
11
|
-
import { rootContainerStyles, searchIconStyles, listTitleStyles } from './styled';
|
|
16
|
+
import { rootContainerStyles, searchIconStyles, listTitleStyles, tabsWrapperStyles } from './styled';
|
|
12
17
|
import { browser } from './browser';
|
|
13
18
|
import { transformTimeStamp } from './transformTimeStamp';
|
|
14
|
-
import Announcer from '
|
|
15
|
-
import Button, { ButtonGroup } from '@atlaskit/button';
|
|
16
|
-
import { FormFooter } from '@atlaskit/form';
|
|
17
|
-
import EditorSearchIcon from '@atlaskit/icon/glyph/editor/search';
|
|
18
|
-
import Tabs, { Tab, TabList } from '@atlaskit/tabs';
|
|
19
|
-
import VisuallyHidden from '@atlaskit/visually-hidden';
|
|
19
|
+
import Announcer from './announcer';
|
|
20
20
|
import LinkSearchNoResults from './link-search-no-results';
|
|
21
21
|
import { usePlugins } from '../../services/use-plugins';
|
|
22
22
|
export const RECENT_SEARCH_LIST_SIZE = 5;
|
|
@@ -63,6 +63,7 @@ function reducer(state, payload) {
|
|
|
63
63
|
function LinkPicker({
|
|
64
64
|
onSubmit,
|
|
65
65
|
onCancel,
|
|
66
|
+
onContentResize,
|
|
66
67
|
plugins,
|
|
67
68
|
url: initUrl,
|
|
68
69
|
displayText: initDisplayText
|
|
@@ -87,6 +88,11 @@ function LinkPicker({
|
|
|
87
88
|
isActivePlugin,
|
|
88
89
|
tabs
|
|
89
90
|
} = usePlugins(state, plugins);
|
|
91
|
+
useLayoutEffect(() => {
|
|
92
|
+
if (onContentResize) {
|
|
93
|
+
onContentResize();
|
|
94
|
+
}
|
|
95
|
+
}, [onContentResize, items, isLoading, isActivePlugin, tabs]);
|
|
90
96
|
const handleChangeUrl = useCallback(url => {
|
|
91
97
|
dispatch({
|
|
92
98
|
url
|
|
@@ -256,7 +262,9 @@ function LinkPicker({
|
|
|
256
262
|
onSubmit: handleSubmit,
|
|
257
263
|
onKeyDown: handleKeyDown,
|
|
258
264
|
onChange: handleChangeText
|
|
259
|
-
}), tabs.length > 0 && jsx(
|
|
265
|
+
}), tabs.length > 0 && jsx("div", {
|
|
266
|
+
css: tabsWrapperStyles
|
|
267
|
+
}, jsx(Tabs, {
|
|
260
268
|
id: testIds.tabList,
|
|
261
269
|
testId: testIds.tabList,
|
|
262
270
|
onChange: activeTab => dispatch({
|
|
@@ -268,7 +276,7 @@ function LinkPicker({
|
|
|
268
276
|
}, jsx(TabList, null, tabs.map(tab => jsx(Tab, {
|
|
269
277
|
key: tab.tabTitle,
|
|
270
278
|
testId: testIds.tabItem
|
|
271
|
-
}, tab.tabTitle)))), !!items.length && jsx("div", {
|
|
279
|
+
}, tab.tabTitle))))), !!items.length && jsx("div", {
|
|
272
280
|
css: listTitleStyles,
|
|
273
281
|
id: testIds.resultListTitle,
|
|
274
282
|
"data-testid": testIds.resultListTitle
|
package/dist/es2019/version.json
CHANGED
|
@@ -7,22 +7,22 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
7
7
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
8
8
|
|
|
9
9
|
/** @jsx jsx */
|
|
10
|
-
import { useCallback, useReducer } from 'react';
|
|
10
|
+
import { useCallback, useLayoutEffect, useReducer } from 'react';
|
|
11
11
|
import { jsx } from '@emotion/react';
|
|
12
12
|
import { useIntl, FormattedMessage } from 'react-intl-next';
|
|
13
|
+
import Button, { ButtonGroup } from '@atlaskit/button';
|
|
14
|
+
import { FormFooter } from '@atlaskit/form';
|
|
15
|
+
import EditorSearchIcon from '@atlaskit/icon/glyph/editor/search';
|
|
16
|
+
import Tabs, { Tab, TabList } from '@atlaskit/tabs';
|
|
17
|
+
import VisuallyHidden from '@atlaskit/visually-hidden';
|
|
13
18
|
import { messages } from './messages';
|
|
14
19
|
import PanelTextInput from './text-input';
|
|
15
20
|
import LinkSearchList from './link-search-list';
|
|
16
21
|
import { normalizeUrl, isSafeUrl } from './url';
|
|
17
|
-
import { rootContainerStyles, searchIconStyles, listTitleStyles } from './styled';
|
|
22
|
+
import { rootContainerStyles, searchIconStyles, listTitleStyles, tabsWrapperStyles } from './styled';
|
|
18
23
|
import { browser } from './browser';
|
|
19
24
|
import { transformTimeStamp } from './transformTimeStamp';
|
|
20
|
-
import Announcer from '
|
|
21
|
-
import Button, { ButtonGroup } from '@atlaskit/button';
|
|
22
|
-
import { FormFooter } from '@atlaskit/form';
|
|
23
|
-
import EditorSearchIcon from '@atlaskit/icon/glyph/editor/search';
|
|
24
|
-
import Tabs, { Tab, TabList } from '@atlaskit/tabs';
|
|
25
|
-
import VisuallyHidden from '@atlaskit/visually-hidden';
|
|
25
|
+
import Announcer from './announcer';
|
|
26
26
|
import LinkSearchNoResults from './link-search-no-results';
|
|
27
27
|
import { usePlugins } from '../../services/use-plugins';
|
|
28
28
|
export var RECENT_SEARCH_LIST_SIZE = 5;
|
|
@@ -66,6 +66,7 @@ function reducer(state, payload) {
|
|
|
66
66
|
function LinkPicker(_ref) {
|
|
67
67
|
var onSubmit = _ref.onSubmit,
|
|
68
68
|
onCancel = _ref.onCancel,
|
|
69
|
+
onContentResize = _ref.onContentResize,
|
|
69
70
|
plugins = _ref.plugins,
|
|
70
71
|
initUrl = _ref.url,
|
|
71
72
|
initDisplayText = _ref.displayText;
|
|
@@ -93,6 +94,11 @@ function LinkPicker(_ref) {
|
|
|
93
94
|
isActivePlugin = _usePlugins.isActivePlugin,
|
|
94
95
|
tabs = _usePlugins.tabs;
|
|
95
96
|
|
|
97
|
+
useLayoutEffect(function () {
|
|
98
|
+
if (onContentResize) {
|
|
99
|
+
onContentResize();
|
|
100
|
+
}
|
|
101
|
+
}, [onContentResize, items, isLoading, isActivePlugin, tabs]);
|
|
96
102
|
var handleChangeUrl = useCallback(function (url) {
|
|
97
103
|
dispatch({
|
|
98
104
|
url: url
|
|
@@ -261,7 +267,9 @@ function LinkPicker(_ref) {
|
|
|
261
267
|
onSubmit: handleSubmit,
|
|
262
268
|
onKeyDown: handleKeyDown,
|
|
263
269
|
onChange: handleChangeText
|
|
264
|
-
}), tabs.length > 0 && jsx(
|
|
270
|
+
}), tabs.length > 0 && jsx("div", {
|
|
271
|
+
css: tabsWrapperStyles
|
|
272
|
+
}, jsx(Tabs, {
|
|
265
273
|
id: testIds.tabList,
|
|
266
274
|
testId: testIds.tabList,
|
|
267
275
|
onChange: function onChange(activeTab) {
|
|
@@ -277,7 +285,7 @@ function LinkPicker(_ref) {
|
|
|
277
285
|
key: tab.tabTitle,
|
|
278
286
|
testId: testIds.tabItem
|
|
279
287
|
}, tab.tabTitle);
|
|
280
|
-
}))), !!items.length && jsx("div", {
|
|
288
|
+
})))), !!items.length && jsx("div", {
|
|
281
289
|
css: listTitleStyles,
|
|
282
290
|
id: testIds.resultListTitle,
|
|
283
291
|
"data-testid": testIds.resultListTitle
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
|
|
3
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
3
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
4
4
|
|
|
5
5
|
import { token } from '@atlaskit/tokens';
|
|
6
6
|
import { css } from '@emotion/react';
|
|
@@ -14,4 +14,5 @@ var LINK_PICKER_MIN_HEIGHT_IN_PX = 234;
|
|
|
14
14
|
export var rootContainerStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: ", "px;\n padding: ", "px;\n box-sizing: border-box;\n line-height: initial;\n min-height: ", "px;\n"])), LINK_PICKER_WIDTH_IN_PX, gridSize() * 2, LINK_PICKER_MIN_HEIGHT_IN_PX);
|
|
15
15
|
export var rootContainerStylesForLoader = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", "\n display: flex;\n align-items: center;\n justify-content: center;\n"])), rootContainerStyles);
|
|
16
16
|
export var searchIconStyles = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n margin-left: ", "px;\n color: ", ";\n cursor: default;\n"])), gridSize() / 2, token('color.icon', N500));
|
|
17
|
-
export var listTitleStyles = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n ", "\n text-transform: uppercase;\n margin-bottom: ", "px;\n"])), typography.h100(), gridSize() / 2);
|
|
17
|
+
export var listTitleStyles = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n ", "\n text-transform: uppercase;\n margin-bottom: ", "px;\n"])), typography.h100(), gridSize() / 2);
|
|
18
|
+
export var tabsWrapperStyles = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n margin-left: -", "px;\n margin-right: -", "px;\n"])), gridSize(), gridSize());
|
package/dist/esm/version.json
CHANGED
|
@@ -44,6 +44,8 @@ export interface LinkPickerProps {
|
|
|
44
44
|
onSubmit: (arg: OnSubmitParameter) => void;
|
|
45
45
|
/** Callback to fire when the cancel button is clicked. */
|
|
46
46
|
onCancel: () => void;
|
|
47
|
+
/** Callback to fire when content is changed inside the link picker e.g. items, when loading, tabs */
|
|
48
|
+
onContentResize?: () => void;
|
|
47
49
|
/** The url of the linked resource for editing. */
|
|
48
50
|
url?: string;
|
|
49
51
|
/** The desired text to be displayed alternatively to the title of the linked resource for editing. */
|
|
@@ -59,5 +61,5 @@ export interface PickerState {
|
|
|
59
61
|
invalidUrl: boolean;
|
|
60
62
|
activeTab: number;
|
|
61
63
|
}
|
|
62
|
-
declare function LinkPicker({ onSubmit, onCancel, plugins, url: initUrl, displayText: initDisplayText, }: LinkPickerProps): jsx.JSX.Element;
|
|
64
|
+
declare function LinkPicker({ onSubmit, onCancel, onContentResize, plugins, url: initUrl, displayText: initDisplayText, }: LinkPickerProps): jsx.JSX.Element;
|
|
63
65
|
export default LinkPicker;
|
|
@@ -2,3 +2,4 @@ export declare const rootContainerStyles: import("@emotion/react").SerializedSty
|
|
|
2
2
|
export declare const rootContainerStylesForLoader: import("@emotion/react").SerializedStyles;
|
|
3
3
|
export declare const searchIconStyles: import("@emotion/react").SerializedStyles;
|
|
4
4
|
export declare const listTitleStyles: import("@emotion/react").SerializedStyles;
|
|
5
|
+
export declare const tabsWrapperStyles: import("@emotion/react").SerializedStyles;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/link-picker",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.1",
|
|
4
4
|
"description": "Standalone link picker",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"publishConfig": {
|
|
@@ -55,13 +55,14 @@
|
|
|
55
55
|
"@atlaskit/activity-provider": "^2.3.2",
|
|
56
56
|
"@atlaskit/docs": "*",
|
|
57
57
|
"@atlaskit/link-test-helpers": "^1.3.0",
|
|
58
|
-
"@atlaskit/popup": "^1.
|
|
58
|
+
"@atlaskit/popup": "^1.4.0",
|
|
59
59
|
"@atlaskit/ssr": "*",
|
|
60
|
+
"@atlaskit/toggle": "^12.4.0",
|
|
60
61
|
"@atlaskit/visual-regression": "*",
|
|
61
62
|
"@atlaskit/webdriver-runner": "*",
|
|
62
63
|
"@atlassian/atlassian-frontend-prettier-config-1.0.0": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.0",
|
|
63
|
-
"@atlassian/link-picker-atlassian-plugin": "^
|
|
64
|
-
"@atlassian/link-picker-plugins": "^
|
|
64
|
+
"@atlassian/link-picker-atlassian-plugin": "^16.0.0",
|
|
65
|
+
"@atlassian/link-picker-plugins": "^3.0.0",
|
|
65
66
|
"@atlassian/search-provider": "^2.3.0",
|
|
66
67
|
"@testing-library/dom": "^7.7.3",
|
|
67
68
|
"@testing-library/jest-dom": "^4.1.0",
|
package/report.api.md
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
## API Report File for "@atlaskit/link-picker"
|
|
1
|
+
## API Report File for "@atlaskit/link-picker".
|
|
2
2
|
|
|
3
|
-
> Do not edit this file.
|
|
3
|
+
> Do not edit this file. This report is auto-generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
[Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
|
|
4
6
|
|
|
5
7
|
```ts
|
|
6
8
|
/// <reference types="react" />
|
|
7
9
|
|
|
8
10
|
import { MessageDescriptor } from 'react-intl-next';
|
|
9
11
|
import { default as React_2 } from 'react';
|
|
10
|
-
import { WithIntlProps } from 'react-intl-next';
|
|
11
|
-
import { WrappedComponentProps } from 'react-intl-next';
|
|
12
12
|
|
|
13
13
|
export declare type LinkInputType = 'manual' | 'typeAhead';
|
|
14
14
|
|
|
15
|
-
export declare const LinkPicker: React_2.
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
WrappedComponent: React_2.ComponentType<
|
|
19
|
-
WrappedComponentProps<'intl'> & LinkPickerProps
|
|
20
|
-
>;
|
|
21
|
-
};
|
|
15
|
+
export declare const LinkPicker: React_2.MemoExoticComponent<(
|
|
16
|
+
props: LinkPickerProps,
|
|
17
|
+
) => JSX.Element>;
|
|
22
18
|
|
|
23
19
|
export declare interface LinkPickerPlugin {
|
|
20
|
+
/** Uniquely identify the tab */
|
|
21
|
+
tabKey?: string;
|
|
22
|
+
/** Human-readable label for the plugin */
|
|
23
|
+
tabTitle?: string;
|
|
24
24
|
resolve: (
|
|
25
25
|
state: LinkPickerState,
|
|
26
26
|
) => Promise<ResolveResult> | AsyncGenerator<ResolveResult, ResolveResult>;
|
|
@@ -31,6 +31,8 @@ export declare interface LinkPickerProps {
|
|
|
31
31
|
onSubmit: (arg: OnSubmitParameter) => void;
|
|
32
32
|
/** Callback to fire when the cancel button is clicked. */
|
|
33
33
|
onCancel: () => void;
|
|
34
|
+
/** Callback to fire when content is changed inside the link picker e.g. items, when loading, tabs */
|
|
35
|
+
onContentResize?: () => void;
|
|
34
36
|
/** The url of the linked resource for editing. */
|
|
35
37
|
url?: string;
|
|
36
38
|
/** The desired text to be displayed alternatively to the title of the linked resource for editing. */
|