@atlaskit/link-picker 1.10.1 → 1.10.3

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.
Files changed (57) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cjs/ui/link-picker/index.js +20 -37
  3. package/dist/cjs/ui/link-picker/messages.js +58 -36
  4. package/dist/cjs/ui/link-picker/utils.js +19 -2
  5. package/dist/cjs/version.json +1 -1
  6. package/dist/es2019/ui/link-picker/index.js +19 -35
  7. package/dist/es2019/ui/link-picker/messages.js +53 -35
  8. package/dist/es2019/ui/link-picker/utils.js +15 -1
  9. package/dist/es2019/version.json +1 -1
  10. package/dist/esm/ui/link-picker/index.js +19 -34
  11. package/dist/esm/ui/link-picker/messages.js +53 -35
  12. package/dist/esm/ui/link-picker/utils.js +14 -1
  13. package/dist/esm/version.json +1 -1
  14. package/dist/types/ui/link-picker/index.d.ts +0 -1
  15. package/dist/types/ui/link-picker/messages.d.ts +27 -9
  16. package/dist/types/ui/link-picker/utils.d.ts +2 -0
  17. package/dist/types-ts4.0/analytics.codegen.d.ts +52 -0
  18. package/dist/types-ts4.0/common/analytics/context.d.ts +28 -0
  19. package/dist/types-ts4.0/common/analytics/index.d.ts +2 -0
  20. package/dist/types-ts4.0/common/analytics/input-field-tracking.d.ts +17 -0
  21. package/dist/types-ts4.0/common/constants.d.ts +2 -0
  22. package/dist/types-ts4.0/common/generic-error-svg/index.d.ts +4 -0
  23. package/dist/types-ts4.0/common/generic-error-svg/styled.d.ts +1 -0
  24. package/dist/types-ts4.0/common/utils/url.d.ts +5 -0
  25. package/dist/types-ts4.0/controllers/use-fix-height/index.d.ts +8 -0
  26. package/dist/types-ts4.0/index.d.ts +3 -0
  27. package/dist/types-ts4.0/services/use-plugins/index.d.ts +14 -0
  28. package/dist/types-ts4.0/services/use-plugins/reducer.d.ts +33 -0
  29. package/dist/types-ts4.0/services/use-plugins/utils.d.ts +18 -0
  30. package/dist/types-ts4.0/services/use-search-query/index.d.ts +3 -0
  31. package/dist/types-ts4.0/ui/error-boundary/index.d.ts +27 -0
  32. package/dist/types-ts4.0/ui/error-boundary-fallback/index.d.ts +3 -0
  33. package/dist/types-ts4.0/ui/index.d.ts +5 -0
  34. package/dist/types-ts4.0/ui/link-picker/announcer.d.ts +22 -0
  35. package/dist/types-ts4.0/ui/link-picker/browser.d.ts +15 -0
  36. package/dist/types-ts4.0/ui/link-picker/form-footer/index.d.ts +13 -0
  37. package/dist/types-ts4.0/ui/link-picker/form-footer/styled.d.ts +1 -0
  38. package/dist/types-ts4.0/ui/link-picker/index.d.ts +69 -0
  39. package/dist/types-ts4.0/ui/link-picker/link-search-error/index.d.ts +20 -0
  40. package/dist/types-ts4.0/ui/link-picker/link-search-list/index.d.ts +43 -0
  41. package/dist/types-ts4.0/ui/link-picker/link-search-list/link-search-no-results/index.d.ts +19 -0
  42. package/dist/types-ts4.0/ui/link-picker/link-search-list/link-search-no-results/no-results-svg/index.d.ts +4 -0
  43. package/dist/types-ts4.0/ui/link-picker/link-search-list/link-search-no-results/no-results-svg/styled.d.ts +1 -0
  44. package/dist/types-ts4.0/ui/link-picker/link-search-list/link-search-no-results/styled.d.ts +1 -0
  45. package/dist/types-ts4.0/ui/link-picker/link-search-list/styled.d.ts +4 -0
  46. package/dist/types-ts4.0/ui/link-picker/list-item/index.d.ts +17 -0
  47. package/dist/types-ts4.0/ui/link-picker/list-item/styled.d.ts +9 -0
  48. package/dist/types-ts4.0/ui/link-picker/messages.d.ts +85 -0
  49. package/dist/types-ts4.0/ui/link-picker/styled.d.ts +9 -0
  50. package/dist/types-ts4.0/ui/link-picker/text-input/index.d.ts +14 -0
  51. package/dist/types-ts4.0/ui/link-picker/text-input/styled.d.ts +2 -0
  52. package/dist/types-ts4.0/ui/link-picker/transformTimeStamp.d.ts +3 -0
  53. package/dist/types-ts4.0/ui/link-picker/utils.d.ts +10 -0
  54. package/dist/types-ts4.0/ui/loader-fallback/index.d.ts +3 -0
  55. package/dist/types-ts4.0/ui/types.d.ts +57 -0
  56. package/package.json +11 -4
  57. package/report.api.md +45 -65
@@ -0,0 +1,15 @@
1
+ declare const result: {
2
+ mac: boolean;
3
+ ie: boolean;
4
+ ie_version: number;
5
+ gecko: boolean;
6
+ chrome: boolean;
7
+ chrome_version: number;
8
+ android: boolean;
9
+ ios: boolean;
10
+ webkit: boolean;
11
+ safari: boolean;
12
+ supportsIntersectionObserver: boolean;
13
+ supportsResizeObserver: boolean;
14
+ };
15
+ export { result as browser };
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ /** @jsx jsx */
3
+ import { jsx } from '@emotion/react';
4
+ export declare const testIds: {
5
+ readonly insertButton: "link-picker-insert-button";
6
+ readonly cancelButton: "link-picker-cancel-button";
7
+ };
8
+ interface FormFooterProps extends React.HTMLAttributes<HTMLElement> {
9
+ isEditing?: boolean;
10
+ onCancel?: () => void;
11
+ }
12
+ declare const _default: import("react").MemoExoticComponent<({ isEditing, onCancel, ...restProps }: FormFooterProps) => jsx.JSX.Element>;
13
+ export default _default;
@@ -0,0 +1 @@
1
+ export declare const formFooterStyles: import("@emotion/react").SerializedStyles;
@@ -0,0 +1,69 @@
1
+ /// <reference types="react" />
2
+ import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
3
+ import { LinkInputType, LinkPickerPlugin } from '../types';
4
+ export declare const RECENT_SEARCH_LIST_SIZE = 5;
5
+ export declare const testIds: {
6
+ readonly clearUrlButton: "clear-text";
7
+ readonly urlError: "link-error";
8
+ readonly tabList: "link-picker-tabs";
9
+ readonly tabItem: "link-picker-tab";
10
+ readonly resultListTitle: string;
11
+ readonly searchResultItem: string;
12
+ readonly searchResultList: string;
13
+ readonly searchResultLoadingIndicator: string;
14
+ readonly emptyResultPage: string;
15
+ readonly searchError: string;
16
+ readonly insertButton: "link-picker-insert-button";
17
+ readonly cancelButton: "link-picker-cancel-button";
18
+ readonly linkPicker: "link-picker";
19
+ readonly urlInputField: "link-url";
20
+ readonly textInputField: "link-text";
21
+ readonly searchIcon: "link-picker-search-icon";
22
+ };
23
+ interface Meta {
24
+ /** Indicates how the link was picked. */
25
+ inputMethod: LinkInputType;
26
+ }
27
+ interface OnSubmitParameter {
28
+ /** The `url` of the linked resource. */
29
+ url: string;
30
+ /** The desired text to be displayed alternatively to the title of the linked resource. */
31
+ displayText: string | null;
32
+ /** The resolved `title` of the resource at the time of link picking (if applicable, null if not known). */
33
+ title: string | null;
34
+ /** Meta data about the link picking submission. */
35
+ meta: Meta;
36
+ /**
37
+ * The input value of the `url` field at time of submission if inserted "manually".
38
+ * This can useful if the `url` was manually inserted with a value that is different from the normalised value returned as `url`.
39
+ * @example
40
+ * { url: 'https://google.com', rawUrl: 'google.com' }
41
+ */
42
+ rawUrl?: string;
43
+ }
44
+ export interface LinkPickerProps {
45
+ /**
46
+ * Callback to fire on form submission.
47
+ */
48
+ onSubmit: (arg: OnSubmitParameter, analytic?: UIAnalyticsEvent | null) => void;
49
+ /** Callback to fire when the cancel button is clicked. */
50
+ onCancel: () => void;
51
+ /** Callback to fire when content is changed inside the link picker e.g. items, when loading, tabs */
52
+ onContentResize?: () => void;
53
+ /** The url of the linked resource for editing. */
54
+ url?: string;
55
+ /** The desired text to be displayed alternatively to the title of the linked resource for editing. */
56
+ displayText?: string | null;
57
+ /** Plugins that provide link suggestions / search capabilities. */
58
+ plugins?: LinkPickerPlugin[];
59
+ }
60
+ export interface PickerState {
61
+ selectedIndex: number;
62
+ activeIndex: number;
63
+ url: string;
64
+ displayText: string;
65
+ invalidUrl: boolean;
66
+ activeTab: number;
67
+ }
68
+ declare const _default: import("react").ComponentType<LinkPickerProps>;
69
+ export default _default;
@@ -0,0 +1,20 @@
1
+ /** @jsx jsx */
2
+ import { jsx } from '@emotion/react';
3
+ export declare const CONTACT_SUPPORT_LINK = "https://support.atlassian.com/contact/";
4
+ export declare const messages: {
5
+ searchErrorHeader: {
6
+ id: string;
7
+ defaultMessage: string;
8
+ description: string;
9
+ };
10
+ searchErrorDescription: {
11
+ id: string;
12
+ defaultMessage: string;
13
+ description: string;
14
+ };
15
+ };
16
+ export declare const testIds: {
17
+ searchError: string;
18
+ };
19
+ declare const LinkSearchError: () => jsx.JSX.Element;
20
+ export default LinkSearchError;
@@ -0,0 +1,43 @@
1
+ /// <reference types="react" />
2
+ import { LinkSearchListItemData } from '../../types';
3
+ export declare const messages: {
4
+ titleRecentlyViewed: {
5
+ id: string;
6
+ defaultMessage: string;
7
+ description: string;
8
+ };
9
+ titleResults: {
10
+ id: string;
11
+ defaultMessage: string;
12
+ description: string;
13
+ };
14
+ searchLinkResults: {
15
+ id: string;
16
+ defaultMessage: string;
17
+ description: string;
18
+ };
19
+ };
20
+ export declare const testIds: {
21
+ resultListTitle: string;
22
+ searchResultItem: string;
23
+ searchResultList: string;
24
+ searchResultLoadingIndicator: string;
25
+ emptyResultPage: string;
26
+ };
27
+ export interface LinkSearchListProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onSelect' | 'onMouseEnter' | 'onMouseLeave'> {
28
+ items?: LinkSearchListItemData[] | null;
29
+ isLoading: boolean;
30
+ selectedIndex: number;
31
+ activeIndex: number;
32
+ onSelect: (objectId: string) => void;
33
+ onMouseEnter: (objectId: string) => void;
34
+ onMouseLeave: (objectId: string) => void;
35
+ ariaControls?: string;
36
+ ariaLabelledBy?: string;
37
+ role?: string;
38
+ id?: string;
39
+ error?: unknown;
40
+ hasSearchTerm?: boolean;
41
+ }
42
+ declare const LinkSearchList: import("react").ForwardRefExoticComponent<LinkSearchListProps & import("react").RefAttributes<HTMLDivElement>>;
43
+ export default LinkSearchList;
@@ -0,0 +1,19 @@
1
+ /** @jsx jsx */
2
+ import { jsx } from '@emotion/react';
3
+ export declare const messages: {
4
+ noResults: {
5
+ id: string;
6
+ defaultMessage: string;
7
+ description: string;
8
+ };
9
+ noResultsDescription: {
10
+ id: string;
11
+ defaultMessage: string;
12
+ description: string;
13
+ };
14
+ };
15
+ export declare const testIds: {
16
+ emptyResultPage: string;
17
+ };
18
+ declare const NoResults: () => jsx.JSX.Element;
19
+ export default NoResults;
@@ -0,0 +1,4 @@
1
+ /** @jsx jsx */
2
+ import { jsx } from '@emotion/react';
3
+ declare const NoResultsSVG: () => jsx.JSX.Element;
4
+ export default NoResultsSVG;
@@ -0,0 +1 @@
1
+ export declare const noResultsSVGStyles: import("@emotion/react").SerializedStyles;
@@ -0,0 +1 @@
1
+ export declare const emptyStateWrapperStyles: import("@emotion/react").SerializedStyles;
@@ -0,0 +1,4 @@
1
+ export declare const listContainerStyles: import("@emotion/react").SerializedStyles;
2
+ export declare const spinnerContainerStyles: import("@emotion/react").SerializedStyles;
3
+ export declare const listStyles: import("@emotion/react").SerializedStyles;
4
+ export declare const listTitleStyles: import("@emotion/react").SerializedStyles;
@@ -0,0 +1,17 @@
1
+ /// <reference types="react" />
2
+ import { WrappedComponentProps } from 'react-intl-next';
3
+ import { LinkSearchListItemData } from '../../types';
4
+ export interface Props {
5
+ item: LinkSearchListItemData;
6
+ selected: boolean;
7
+ active: boolean;
8
+ onSelect: (objectId: string) => void;
9
+ onMouseEnter: (objectId: string) => void;
10
+ onMouseLeave: (objectId: string) => void;
11
+ id?: string;
12
+ role?: string;
13
+ }
14
+ declare const _default: import("react").FC<import("react-intl-next").WithIntlProps<WrappedComponentProps<"intl"> & Props>> & {
15
+ WrappedComponent: import("react").ComponentType<WrappedComponentProps<"intl"> & Props>;
16
+ };
17
+ export default _default;
@@ -0,0 +1,9 @@
1
+ export declare const relativeFontSizeToBase16: (px: number | string) => string;
2
+ export declare const composeListItemStyles: (active?: boolean, selected?: boolean) => import("@emotion/react").SerializedStyles;
3
+ export declare const itemNameStyles: import("@emotion/react").SerializedStyles;
4
+ export declare const listItemNameStyles: import("@emotion/react").SerializedStyles;
5
+ export declare const listItemContextStyles: import("@emotion/react").SerializedStyles;
6
+ export declare const listItemContainerStyles: import("@emotion/react").SerializedStyles;
7
+ export declare const listItemContainerInnerStyles: import("@emotion/react").SerializedStyles;
8
+ export declare const itemIconStyles: import("@emotion/react").SerializedStyles;
9
+ export declare const imgStyles: import("@emotion/react").SerializedStyles;
@@ -0,0 +1,85 @@
1
+ export declare const searchMessages: {
2
+ linkLabel: {
3
+ id: string;
4
+ defaultMessage: string;
5
+ description: string;
6
+ };
7
+ linkAriaLabel: {
8
+ id: string;
9
+ defaultMessage: string;
10
+ description: string;
11
+ };
12
+ linkPlaceholder: {
13
+ id: string;
14
+ defaultMessage: string;
15
+ description: string;
16
+ };
17
+ };
18
+ export declare const linkMessages: {
19
+ linkLabel: {
20
+ id: string;
21
+ defaultMessage: string;
22
+ description: string;
23
+ };
24
+ linkAriaLabel: {
25
+ id: string;
26
+ defaultMessage: string;
27
+ description: string;
28
+ };
29
+ linkPlaceholder: {
30
+ id: string;
31
+ defaultMessage: string;
32
+ description: string;
33
+ };
34
+ };
35
+ export declare const formMessages: {
36
+ linkInvalid: {
37
+ id: string;
38
+ defaultMessage: string;
39
+ description: string;
40
+ };
41
+ clearLink: {
42
+ id: string;
43
+ defaultMessage: string;
44
+ description: string;
45
+ };
46
+ };
47
+ export declare const linkTextMessages: {
48
+ linkTextLabel: {
49
+ id: string;
50
+ defaultMessage: string;
51
+ description: string;
52
+ };
53
+ linkTextAriaLabel: {
54
+ id: string;
55
+ defaultMessage: string;
56
+ description: string;
57
+ };
58
+ linkTextPlaceholder: {
59
+ id: string;
60
+ defaultMessage: string;
61
+ description: string;
62
+ };
63
+ clearLinkText: {
64
+ id: string;
65
+ defaultMessage: string;
66
+ description: string;
67
+ };
68
+ };
69
+ export declare const messages: {
70
+ timeUpdated: {
71
+ id: string;
72
+ defaultMessage: string;
73
+ description: string;
74
+ };
75
+ timeViewed: {
76
+ id: string;
77
+ defaultMessage: string;
78
+ description: string;
79
+ };
80
+ timeAgo: {
81
+ id: string;
82
+ defaultMessage: string;
83
+ description: string;
84
+ };
85
+ };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Half padding on the top as the form field has a `gridSize()` margin top that cannot be overridden
3
+ */
4
+ export declare const rootContainerStyles: import("@emotion/react").SerializedStyles;
5
+ export declare const rootContainerStylesForLoader: import("@emotion/react").SerializedStyles;
6
+ export declare const searchIconStyles: import("@emotion/react").SerializedStyles;
7
+ export declare const tabsWrapperStyles: import("@emotion/react").SerializedStyles;
8
+ export declare const flexColumnStyles: import("@emotion/react").SerializedStyles;
9
+ export declare const formFooterMargin: import("@emotion/react").SerializedStyles;
@@ -0,0 +1,14 @@
1
+ import { jsx } from '@emotion/react';
2
+ import { TextFieldProps } from '@atlaskit/textfield';
3
+ export declare type TextInputProps = Omit<TextFieldProps, 'name' | 'value'> & {
4
+ name: string;
5
+ value: string;
6
+ label?: string;
7
+ onUndo?: Function;
8
+ onRedo?: Function;
9
+ onClear?: (name: string) => void;
10
+ clearLabel?: string;
11
+ error?: string | null;
12
+ };
13
+ declare const TextInput: ({ name, label, autoFocus, onRedo, onUndo, onKeyDown, onClear, clearLabel, error, ...restProps }: TextInputProps) => jsx.JSX.Element;
14
+ export default TextInput;
@@ -0,0 +1,2 @@
1
+ export declare const clearTextButtonStyles: import("@emotion/react").SerializedStyles;
2
+ export declare const fieldStyles: import("@emotion/react").SerializedStyles;
@@ -0,0 +1,3 @@
1
+ import { IntlShape } from 'react-intl-next';
2
+ import { ListItemTimeStamp } from '../types';
3
+ export declare const transformTimeStamp: (intl: IntlShape, lastViewedDate?: Date | undefined, lastUpdatedDate?: Date | undefined) => ListItemTimeStamp | undefined;
@@ -0,0 +1,10 @@
1
+ import { KeyboardEvent } from 'react';
2
+ import { IntlShape } from 'react-intl-next';
3
+ import { LinkPickerPlugin, LinkSearchListItemData } from '../types';
4
+ export declare const isUndoEvent: (e: KeyboardEvent<HTMLInputElement>) => boolean;
5
+ export declare const isRedoEvent: (e: KeyboardEvent<HTMLInputElement>) => boolean;
6
+ /**
7
+ * Retrieve the data source for a link given the item and the plugin that resolved it
8
+ */
9
+ export declare const getDataSource: (item: LinkSearchListItemData, plugin?: LinkPickerPlugin | undefined) => string;
10
+ export declare function getScreenReaderText(items: LinkSearchListItemData[], selectedIndex: number, intl: IntlShape): string | undefined;
@@ -0,0 +1,3 @@
1
+ /** @jsx jsx */
2
+ import { jsx } from '@emotion/react';
3
+ export declare const LoaderFallback: jsx.JSX.Element;
@@ -0,0 +1,57 @@
1
+ import { ReactNode } from 'react';
2
+ import { MessageDescriptor } from 'react-intl-next';
3
+ export declare type LinkInputType = 'manual' | 'typeAhead';
4
+ export interface LinkSearchListItemData {
5
+ /** Unique identifiable attribute for the item */
6
+ objectId: string;
7
+ /** Name / title / display text of the link */
8
+ name: string;
9
+ /** URL of the resource being linked to */
10
+ url: string;
11
+ /** Icon to display in link result */
12
+ icon: string | React.ComponentType<{
13
+ alt: string;
14
+ }>;
15
+ /** Alt text describing the icon */
16
+ iconAlt: string | MessageDescriptor;
17
+ /** Context to display in link result */
18
+ container?: string;
19
+ /** Optional last view date to display in link result */
20
+ lastViewedDate?: Date;
21
+ /** Optional last updated date to display in link result */
22
+ lastUpdatedDate?: Date;
23
+ /** Whether the result is pre-fetched from activity provider */
24
+ prefetch?: boolean;
25
+ /** Metadata about the result */
26
+ meta?: {
27
+ /** The data source that provided the result */
28
+ source?: string;
29
+ };
30
+ }
31
+ export declare type ListItemTimeStamp = {
32
+ pageAction: string;
33
+ dateString: string;
34
+ timeSince?: string | undefined;
35
+ };
36
+ export interface LinkPickerState {
37
+ /** Current query string / URL input field value */
38
+ query: string;
39
+ }
40
+ export interface ResolveResult {
41
+ data: LinkSearchListItemData[];
42
+ }
43
+ export interface LinkPickerPlugin {
44
+ resolve: (state: LinkPickerState) => Promise<ResolveResult> | AsyncGenerator<ResolveResult, ResolveResult>;
45
+ /** Uniquely identify the tab */
46
+ tabKey?: string;
47
+ /** Human-readable label for the plugin */
48
+ tabTitle?: string;
49
+ /** Render function to customise the UI that is displayed when an error occurs resolving results */
50
+ errorFallback?: LinkPickerPluginErrorFallback;
51
+ /** Metadata about the plugin */
52
+ meta?: {
53
+ /** The data source that provides all results provided by the plugin */
54
+ source?: string;
55
+ };
56
+ }
57
+ export declare type LinkPickerPluginErrorFallback = (error: unknown, retry: () => void) => ReactNode;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/link-picker",
3
- "version": "1.10.1",
3
+ "version": "1.10.3",
4
4
  "description": "Standalone link picker",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "publishConfig": {
@@ -20,6 +20,13 @@
20
20
  "module": "dist/esm/index.js",
21
21
  "module:es2019": "dist/es2019/index.js",
22
22
  "types": "dist/types/index.d.ts",
23
+ "typesVersions": {
24
+ ">=4.0 <4.5": {
25
+ "*": [
26
+ "dist/types-ts4.0/*"
27
+ ]
28
+ }
29
+ },
23
30
  "sideEffects": false,
24
31
  "atlaskit:src": "src/index.ts",
25
32
  "af:exports": {
@@ -72,8 +79,8 @@
72
79
  "@testing-library/dom": "^8.17.1",
73
80
  "@testing-library/jest-dom": "^5.16.5",
74
81
  "@testing-library/react": "^12.1.5",
75
- "@testing-library/react-hooks": "^1.1.0",
76
- "@testing-library/user-event": "^13.5.0",
82
+ "@testing-library/react-hooks": "^8.0.1",
83
+ "@testing-library/user-event": "^14.4.3",
77
84
  "@types/js-yaml": "^3.12.5",
78
85
  "enzyme": "^3.10.0",
79
86
  "fetch-mock": "^8.0.0",
@@ -83,7 +90,7 @@
83
90
  "prettier": "^2.1.1",
84
91
  "react-dom": "^16.8.0",
85
92
  "sinon": "^2.2.0",
86
- "typescript": "4.3.5"
93
+ "typescript": "4.5.5"
87
94
  },
88
95
  "techstack": {
89
96
  "@repo/internal": {
package/report.api.md CHANGED
@@ -1,6 +1,10 @@
1
- ## API Report File for "@atlaskit/link-picker".
1
+ ## API Report File for "@atlaskit/link-picker"
2
2
 
3
- > Do not edit this file. This report is auto-generated by [API Extractor](https://api-extractor.com/).
3
+ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
+
5
+ <!--
6
+ Generated API Report version: 2.0
7
+ -->
4
8
 
5
9
  [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
6
10
 
@@ -12,115 +16,91 @@ import { default as React_2 } from 'react';
12
16
  import { ReactNode } from 'react';
13
17
  import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
14
18
 
15
- export declare type LinkInputType = 'manual' | 'typeAhead';
19
+ // @public (undocumented)
20
+ export type LinkInputType = 'manual' | 'typeAhead';
16
21
 
17
- export declare const LinkPicker: React_2.MemoExoticComponent<(
22
+ // @public (undocumented)
23
+ export const LinkPicker: React_2.MemoExoticComponent<(
18
24
  props: LinkPickerProps,
19
25
  ) => JSX.Element>;
20
26
 
21
- export declare interface LinkPickerPlugin {
27
+ // @public (undocumented)
28
+ export interface LinkPickerPlugin {
29
+ errorFallback?: LinkPickerPluginErrorFallback;
30
+ meta?: {
31
+ source?: string;
32
+ };
33
+ // (undocumented)
22
34
  resolve: (
23
35
  state: LinkPickerState,
24
36
  ) => Promise<ResolveResult> | AsyncGenerator<ResolveResult, ResolveResult>;
25
- /** Uniquely identify the tab */
26
37
  tabKey?: string;
27
- /** Human-readable label for the plugin */
28
38
  tabTitle?: string;
29
- /** Render function to customise the UI that is displayed when an error occurs resolving results */
30
- errorFallback?: LinkPickerPluginErrorFallback;
31
- /** Metadata about the plugin */
32
- meta?: {
33
- /** The data source that provides all results provided by the plugin */
34
- source?: string;
35
- };
36
39
  }
37
40
 
38
- export declare type LinkPickerPluginErrorFallback = (
41
+ // @public (undocumented)
42
+ export type LinkPickerPluginErrorFallback = (
39
43
  error: unknown,
40
44
  retry: () => void,
41
45
  ) => ReactNode;
42
46
 
43
- export declare interface LinkPickerProps {
44
- /**
45
- * Callback to fire on form submission.
46
- */
47
+ // @public (undocumented)
48
+ export interface LinkPickerProps {
49
+ displayText?: string | null;
50
+ onCancel: () => void;
51
+ onContentResize?: () => void;
47
52
  onSubmit: (
48
53
  arg: OnSubmitParameter,
49
54
  analytic?: UIAnalyticsEvent | null,
50
55
  ) => void;
51
- /** Callback to fire when the cancel button is clicked. */
52
- onCancel: () => void;
53
- /** Callback to fire when content is changed inside the link picker e.g. items, when loading, tabs */
54
- onContentResize?: () => void;
55
- /** The url of the linked resource for editing. */
56
- url?: string;
57
- /** The desired text to be displayed alternatively to the title of the linked resource for editing. */
58
- displayText?: string | null;
59
- /** Plugins that provide link suggestions / search capabilities. */
60
56
  plugins?: LinkPickerPlugin[];
57
+ url?: string;
61
58
  }
62
59
 
63
- export declare interface LinkPickerState {
64
- /** Current query string / URL input field value */
60
+ // @public (undocumented)
61
+ export interface LinkPickerState {
65
62
  query: string;
66
63
  }
67
64
 
68
- export declare interface LinkSearchListItemData {
69
- /** Unique identifiable attribute for the item */
70
- objectId: string;
71
- /** Name / title / display text of the link */
72
- name: string;
73
- /** URL of the resource being linked to */
74
- url: string;
75
- /** Icon to display in link result */
65
+ // @public (undocumented)
66
+ export interface LinkSearchListItemData {
67
+ container?: string;
76
68
  icon:
77
69
  | string
78
70
  | React.ComponentType<{
79
71
  alt: string;
80
72
  }>;
81
- /** Alt text describing the icon */
82
73
  iconAlt: string | MessageDescriptor;
83
- /** Context to display in link result */
84
- container?: string;
85
- /** Optional last view date to display in link result */
86
- lastViewedDate?: Date;
87
- /** Optional last updated date to display in link result */
88
74
  lastUpdatedDate?: Date;
89
- /** Whether the result is pre-fetched from activity provider */
90
- prefetch?: boolean;
91
- /** Metadata about the result */
75
+ lastViewedDate?: Date;
92
76
  meta?: {
93
- /** The data source that provided the result */
94
77
  source?: string;
95
78
  };
79
+ name: string;
80
+ objectId: string;
81
+ prefetch?: boolean;
82
+ url: string;
96
83
  }
97
84
 
98
- declare interface Meta {
99
- /** Indicates how the link was picked. */
85
+ // @public (undocumented)
86
+ interface Meta {
100
87
  inputMethod: LinkInputType;
101
88
  }
102
89
 
103
- declare interface OnSubmitParameter {
104
- /** The `url` of the linked resource. */
105
- url: string;
106
- /** The desired text to be displayed alternatively to the title of the linked resource. */
90
+ // @public (undocumented)
91
+ interface OnSubmitParameter {
107
92
  displayText: string | null;
108
- /** The resolved `title` of the resource at the time of link picking (if applicable, null if not known). */
109
- title: string | null;
110
- /** Meta data about the link picking submission. */
111
93
  meta: Meta;
112
- /**
113
- * The input value of the `url` field at time of submission if inserted "manually".
114
- * This can useful if the `url` was manually inserted with a value that is different from the normalised value returned as `url`.
115
- * @example
116
- * { url: 'https://google.com', rawUrl: 'google.com' }
117
- */
118
94
  rawUrl?: string;
95
+ title: string | null;
96
+ url: string;
119
97
  }
120
98
 
121
- declare interface ResolveResult {
99
+ // @public (undocumented)
100
+ interface ResolveResult {
101
+ // (undocumented)
122
102
  data: LinkSearchListItemData[];
123
103
  }
124
104
 
125
- export {};
105
+ // (No @packageDocumentation comment for this package)
126
106
  ```