@atlaskit/link-picker 6.4.6 → 6.6.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 +31 -0
- package/dist/cjs/common/analytics/context.js +2 -2
- package/dist/cjs/common/analytics/experiences.js +5 -4
- package/dist/cjs/common/analytics/input-field-tracking.js +2 -2
- package/dist/cjs/common/ui/empty-state/index.js +1 -1
- package/dist/cjs/services/use-plugins/index.js +4 -4
- package/dist/cjs/ui/error-boundary/index.js +2 -2
- package/dist/cjs/ui/link-picker/form-footer/index.js +4 -4
- package/dist/cjs/ui/link-picker/form-footer/link-picker-submit-button/index.js +4 -4
- package/dist/cjs/ui/link-picker/form-footer/link-picker-submit-button/utils.js +3 -3
- package/dist/cjs/ui/link-picker/index.js +4 -4
- package/dist/cjs/ui/link-picker/search-results/index.js +5 -3
- package/dist/cjs/ui/link-picker/search-results/link-search-error/index.js +3 -3
- package/dist/cjs/ui/link-picker/search-results/link-search-list/index.js +1 -1
- package/dist/cjs/ui/link-picker/search-results/link-search-list/link-search-no-results/index.js +2 -2
- package/dist/cjs/ui/link-picker/search-results/link-search-list/list-item/index.js +0 -1
- package/dist/cjs/ui/link-picker/search-results/link-search-list/use-track-results-shown/index.js +2 -2
- package/dist/cjs/ui/link-picker/search-results/scrolling-tabs/index.js +3 -3
- package/dist/cjs/ui/link-picker/search-results/track-tab-viewed/index.js +2 -2
- package/dist/cjs/ui/link-picker/text-input/index.js +14 -11
- package/dist/cjs/ui/link-picker/track-mount/index.js +2 -2
- package/dist/cjs/ui/loader-fallback/index.js +1 -1
- package/dist/cjs/ui/main.js +3 -3
- package/dist/es2019/common/analytics/context.js +1 -1
- package/dist/es2019/common/analytics/experiences.js +2 -1
- package/dist/es2019/common/analytics/input-field-tracking.js +1 -1
- package/dist/es2019/common/ui/empty-state/index.js +1 -1
- package/dist/es2019/services/use-plugins/index.js +2 -2
- package/dist/es2019/ui/error-boundary/index.js +1 -1
- package/dist/es2019/ui/link-picker/form-footer/index.js +2 -2
- package/dist/es2019/ui/link-picker/form-footer/link-picker-submit-button/index.js +2 -2
- package/dist/es2019/ui/link-picker/form-footer/link-picker-submit-button/utils.js +1 -1
- package/dist/es2019/ui/link-picker/index.js +2 -2
- package/dist/es2019/ui/link-picker/search-results/index.js +3 -1
- package/dist/es2019/ui/link-picker/search-results/link-search-error/index.js +2 -2
- package/dist/es2019/ui/link-picker/search-results/link-search-list/index.js +1 -1
- package/dist/es2019/ui/link-picker/search-results/link-search-list/link-search-no-results/index.js +1 -1
- package/dist/es2019/ui/link-picker/search-results/link-search-list/list-item/index.js +0 -1
- package/dist/es2019/ui/link-picker/search-results/link-search-list/use-track-results-shown/index.js +1 -1
- package/dist/es2019/ui/link-picker/search-results/scrolling-tabs/index.js +1 -1
- package/dist/es2019/ui/link-picker/search-results/track-tab-viewed/index.js +1 -1
- package/dist/es2019/ui/link-picker/text-input/index.js +7 -4
- package/dist/es2019/ui/link-picker/track-mount/index.js +1 -1
- package/dist/es2019/ui/loader-fallback/index.js +1 -1
- package/dist/es2019/ui/main.js +2 -2
- package/dist/esm/common/analytics/context.js +1 -1
- package/dist/esm/common/analytics/experiences.js +2 -1
- package/dist/esm/common/analytics/input-field-tracking.js +1 -1
- package/dist/esm/common/ui/empty-state/index.js +1 -1
- package/dist/esm/services/use-plugins/index.js +2 -2
- package/dist/esm/ui/error-boundary/index.js +1 -1
- package/dist/esm/ui/link-picker/form-footer/index.js +2 -2
- package/dist/esm/ui/link-picker/form-footer/link-picker-submit-button/index.js +2 -2
- package/dist/esm/ui/link-picker/form-footer/link-picker-submit-button/utils.js +1 -1
- package/dist/esm/ui/link-picker/index.js +2 -2
- package/dist/esm/ui/link-picker/search-results/index.js +3 -1
- package/dist/esm/ui/link-picker/search-results/link-search-error/index.js +2 -2
- package/dist/esm/ui/link-picker/search-results/link-search-list/index.js +1 -1
- package/dist/esm/ui/link-picker/search-results/link-search-list/link-search-no-results/index.js +1 -1
- package/dist/esm/ui/link-picker/search-results/link-search-list/list-item/index.js +0 -1
- package/dist/esm/ui/link-picker/search-results/link-search-list/use-track-results-shown/index.js +1 -1
- package/dist/esm/ui/link-picker/search-results/scrolling-tabs/index.js +1 -1
- package/dist/esm/ui/link-picker/search-results/track-tab-viewed/index.js +1 -1
- package/dist/esm/ui/link-picker/text-input/index.js +7 -4
- package/dist/esm/ui/link-picker/track-mount/index.js +1 -1
- package/dist/esm/ui/loader-fallback/index.js +1 -1
- package/dist/esm/ui/main.js +2 -2
- package/dist/types/common/analytics/experiences.d.ts +1 -1
- package/dist/types/common/types.d.ts +1 -1
- package/dist/types/ui/link-picker/text-input/index.d.ts +1 -1
- package/package.json +36 -30
- package/link-picker.docs.tsx +0 -77
- package/report.api.md +0 -160
package/link-picker.docs.tsx
DELETED
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Testing structured MCP docs for review — ignore this file.
|
|
3
|
-
* Contact #dst-structured-content in Slack with questions.
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import path from 'path';
|
|
7
|
-
|
|
8
|
-
import type { StructuredContentSource } from '@atlassian/structured-docs-types/types';
|
|
9
|
-
|
|
10
|
-
import packageJson from './package.json';
|
|
11
|
-
|
|
12
|
-
const packagePath = path.resolve(__dirname);
|
|
13
|
-
|
|
14
|
-
const documentation: StructuredContentSource = {
|
|
15
|
-
components: [
|
|
16
|
-
{
|
|
17
|
-
name: 'LinkPicker',
|
|
18
|
-
description:
|
|
19
|
-
'Standalone link picker UI that lets users search and select links to insert. Supports plugins for different data sources (recents, search, Jira, Confluence, etc.) and can be used in modals, popups, or inline.',
|
|
20
|
-
status: 'general-availability',
|
|
21
|
-
import: {
|
|
22
|
-
name: 'LinkPicker',
|
|
23
|
-
package: '@atlaskit/link-picker',
|
|
24
|
-
type: 'named',
|
|
25
|
-
packagePath,
|
|
26
|
-
packageJson,
|
|
27
|
-
},
|
|
28
|
-
usageGuidelines: [
|
|
29
|
-
'Use when the user needs to choose a link to insert (e.g. in an editor, form, or toolbar). Add plugins to define tabs and data sources; use SmartCardProvider above the picker so selected links resolve correctly.',
|
|
30
|
-
],
|
|
31
|
-
contentGuidelines: [],
|
|
32
|
-
accessibilityGuidelines: [
|
|
33
|
-
'Ensure the picker is focusable and has an accessible name (e.g. "Insert link"). Provide a keyboard-accessible way to open and close; ensure search and results are announced to screen readers.',
|
|
34
|
-
],
|
|
35
|
-
keywords: ['link-picker', 'link', 'picker', 'search', 'insert link', 'plugins'],
|
|
36
|
-
categories: ['linking', 'interaction', 'forms'],
|
|
37
|
-
examples: [
|
|
38
|
-
{
|
|
39
|
-
name: 'Link Picker (basic)',
|
|
40
|
-
description:
|
|
41
|
-
'Basic LinkPicker with URL input and submit. Requires plugins for search results.',
|
|
42
|
-
source: path.resolve(packagePath, './examples/00-basic.tsx'),
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
name: 'Link Picker (without plugins)',
|
|
46
|
-
description: 'LinkPicker without plugins — manual URL entry only.',
|
|
47
|
-
source: path.resolve(packagePath, './examples/20-without-plugins.tsx'),
|
|
48
|
-
},
|
|
49
|
-
],
|
|
50
|
-
},
|
|
51
|
-
// Needs examples
|
|
52
|
-
// {
|
|
53
|
-
// name: 'LoaderFallback',
|
|
54
|
-
// description: 'Fallback UI shown while the LinkPicker (or its lazy-loaded parts) are loading.',
|
|
55
|
-
// status: 'general-availability',
|
|
56
|
-
// import: {
|
|
57
|
-
// name: 'LoaderFallback',
|
|
58
|
-
// package: '@atlaskit/link-picker',
|
|
59
|
-
// type: 'named',
|
|
60
|
-
// packagePath,
|
|
61
|
-
// packageJson,
|
|
62
|
-
// },
|
|
63
|
-
// usageGuidelines: [
|
|
64
|
-
// 'Use when rendering LinkPicker lazily (e.g. via react-loosely-lazy) to show a consistent loading state until the picker is ready.',
|
|
65
|
-
// ],
|
|
66
|
-
// contentGuidelines: [],
|
|
67
|
-
// accessibilityGuidelines: [
|
|
68
|
-
// 'Ensure the fallback is announced as loading (e.g. aria-busy or live region) so screen reader users know content is pending.',
|
|
69
|
-
// ],
|
|
70
|
-
// keywords: ['link-picker', 'loader', 'fallback', 'lazy'],
|
|
71
|
-
// categories: ['linking', 'interaction'],
|
|
72
|
-
// examples: [],
|
|
73
|
-
// },
|
|
74
|
-
],
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
export default documentation;
|
package/report.api.md
DELETED
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
<!-- API Report Version: 2.3 -->
|
|
2
|
-
|
|
3
|
-
## API Report File for "@atlaskit/link-picker"
|
|
4
|
-
|
|
5
|
-
> Do not edit this file. This report is auto-generated using
|
|
6
|
-
> [API Extractor](https://api-extractor.com/).
|
|
7
|
-
> [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
|
|
8
|
-
|
|
9
|
-
### Table of contents
|
|
10
|
-
|
|
11
|
-
- [Main Entry Types](#main-entry-types)
|
|
12
|
-
- [Peer Dependencies](#peer-dependencies)
|
|
13
|
-
|
|
14
|
-
### Main Entry Types
|
|
15
|
-
|
|
16
|
-
<!--SECTION START: Main Entry Types-->
|
|
17
|
-
|
|
18
|
-
```ts
|
|
19
|
-
/// <reference types="react" />
|
|
20
|
-
|
|
21
|
-
import { jsx } from '@compiled/react';
|
|
22
|
-
import { MessageDescriptor } from 'react-intl';
|
|
23
|
-
import { default as React_2 } from 'react';
|
|
24
|
-
import { ReactNode } from 'react';
|
|
25
|
-
import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
26
|
-
|
|
27
|
-
// @public (undocumented)
|
|
28
|
-
export type LinkInputType = 'manual' | 'typeAhead';
|
|
29
|
-
|
|
30
|
-
// @public (undocumented)
|
|
31
|
-
export const LinkPicker: React_2.MemoExoticComponent<(props: LinkPickerProps) => jsx.JSX.Element>;
|
|
32
|
-
|
|
33
|
-
// @public (undocumented)
|
|
34
|
-
export interface LinkPickerPlugin {
|
|
35
|
-
action?: LinkPickerPluginAction;
|
|
36
|
-
emptyStateNoResults?: LinkPickerPluginEmptyStateNoResults;
|
|
37
|
-
errorFallback?: LinkPickerPluginErrorFallback;
|
|
38
|
-
meta?: {
|
|
39
|
-
source?: string;
|
|
40
|
-
};
|
|
41
|
-
// (undocumented)
|
|
42
|
-
resolve: (
|
|
43
|
-
state: LinkPickerState,
|
|
44
|
-
) => AsyncGenerator<ResolveResult, ResolveResult> | Promise<ResolveResult>;
|
|
45
|
-
tabKey?: string;
|
|
46
|
-
tabTitle?: string;
|
|
47
|
-
UNSAFE_onActivation?: () => void;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
// @public (undocumented)
|
|
51
|
-
export interface LinkPickerPluginAction {
|
|
52
|
-
// (undocumented)
|
|
53
|
-
callback: () => void;
|
|
54
|
-
// (undocumented)
|
|
55
|
-
label: MessageDescriptor | string;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
// @public (undocumented)
|
|
59
|
-
export type LinkPickerPluginEmptyStateNoResults = () => ReactNode;
|
|
60
|
-
|
|
61
|
-
// @public (undocumented)
|
|
62
|
-
export type LinkPickerPluginErrorFallback = (error: unknown, retry: () => void) => ReactNode;
|
|
63
|
-
|
|
64
|
-
// @public (undocumented)
|
|
65
|
-
export interface LinkPickerProps {
|
|
66
|
-
component?: React.ComponentType<
|
|
67
|
-
Partial<LinkPickerProps> & {
|
|
68
|
-
children: React.ReactElement;
|
|
69
|
-
}
|
|
70
|
-
>;
|
|
71
|
-
disableWidth?: boolean;
|
|
72
|
-
displayText?: null | string;
|
|
73
|
-
// (undocumented)
|
|
74
|
-
featureFlags?: Record<string, unknown>;
|
|
75
|
-
hideDisplayText?: boolean;
|
|
76
|
-
isLoadingPlugins?: boolean;
|
|
77
|
-
onCancel: () => void;
|
|
78
|
-
onContentResize?: () => void;
|
|
79
|
-
onSubmit: (arg: OnSubmitParameter, analytic?: UIAnalyticsEvent | null) => void;
|
|
80
|
-
paddingBottom?: string;
|
|
81
|
-
paddingLeft?: string;
|
|
82
|
-
paddingRight?: string;
|
|
83
|
-
paddingTop?: string;
|
|
84
|
-
plugins?: LinkPickerPlugin[];
|
|
85
|
-
url?: string;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
// @public (undocumented)
|
|
89
|
-
export interface LinkPickerState {
|
|
90
|
-
query: string;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
// @public (undocumented)
|
|
94
|
-
export interface LinkSearchListItemData {
|
|
95
|
-
container?: string;
|
|
96
|
-
icon:
|
|
97
|
-
| React.ComponentType<{
|
|
98
|
-
alt: string;
|
|
99
|
-
}>
|
|
100
|
-
| string;
|
|
101
|
-
iconAlt: MessageDescriptor | string;
|
|
102
|
-
lastUpdatedDate?: Date;
|
|
103
|
-
lastViewedDate?: Date;
|
|
104
|
-
meta?: {
|
|
105
|
-
source?: string;
|
|
106
|
-
};
|
|
107
|
-
name: string;
|
|
108
|
-
objectId: string;
|
|
109
|
-
prefetch?: boolean;
|
|
110
|
-
url: string;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
// @public (undocumented)
|
|
114
|
-
interface Meta {
|
|
115
|
-
inputMethod: LinkInputType;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
// @public (undocumented)
|
|
119
|
-
interface OnSubmitParameter {
|
|
120
|
-
displayText: null | string;
|
|
121
|
-
meta: Meta;
|
|
122
|
-
rawUrl?: string;
|
|
123
|
-
title: null | string;
|
|
124
|
-
url: string;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
// @public (undocumented)
|
|
128
|
-
interface ResolveResult {
|
|
129
|
-
// (undocumented)
|
|
130
|
-
data: LinkSearchListItemData[];
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
// @public (undocumented)
|
|
134
|
-
export class UnauthenticatedError extends Error {
|
|
135
|
-
constructor(iconUrl: string, authUrl: string, description: string);
|
|
136
|
-
// (undocumented)
|
|
137
|
-
authUrl: string;
|
|
138
|
-
// (undocumented)
|
|
139
|
-
description: string;
|
|
140
|
-
// (undocumented)
|
|
141
|
-
iconUrl: string;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
// (No @packageDocumentation comment for this package)
|
|
145
|
-
```
|
|
146
|
-
|
|
147
|
-
<!--SECTION END: Main Entry Types-->
|
|
148
|
-
|
|
149
|
-
### Peer Dependencies
|
|
150
|
-
|
|
151
|
-
<!--SECTION START: Peer Dependencies-->
|
|
152
|
-
|
|
153
|
-
```json
|
|
154
|
-
{
|
|
155
|
-
"react": "^16.8.0",
|
|
156
|
-
"react-intl": "npm:react-intl@^5.18.1"
|
|
157
|
-
}
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
<!--SECTION END: Peer Dependencies-->
|