@atlaskit/link-picker 1.40.0 → 1.41.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 +29 -0
- package/dist/cjs/index.js +12 -4
- package/dist/cjs/lazy.js +13 -0
- package/dist/cjs/ui/index.js +17 -81
- package/dist/cjs/ui/lazy.js +27 -0
- package/dist/cjs/ui/link-picker/index.js +1 -1
- package/dist/cjs/ui/main.js +81 -0
- package/dist/es2019/index.js +2 -1
- package/dist/es2019/lazy.js +1 -0
- package/dist/es2019/ui/index.js +15 -82
- package/dist/es2019/ui/lazy.js +12 -0
- package/dist/es2019/ui/link-picker/index.js +2 -2
- package/dist/es2019/ui/main.js +79 -0
- package/dist/esm/index.js +2 -1
- package/dist/esm/lazy.js +1 -0
- package/dist/esm/ui/index.js +15 -76
- package/dist/esm/ui/lazy.js +15 -0
- package/dist/esm/ui/link-picker/index.js +2 -2
- package/dist/esm/ui/main.js +70 -0
- package/dist/types/common/analytics/context.d.ts +2 -2
- package/dist/types/common/types.d.ts +83 -2
- package/dist/types/index.d.ts +3 -2
- package/dist/types/lazy.d.ts +1 -0
- package/dist/types/ui/index.d.ts +13 -12
- package/dist/types/ui/lazy.d.ts +3 -0
- package/dist/types/ui/link-picker/announcer.d.ts +1 -1
- package/dist/types/ui/link-picker/form-footer/feature-discovery/index.d.ts +3 -6
- package/dist/types/ui/link-picker/index.d.ts +1 -83
- package/dist/types/ui/main.d.ts +13 -0
- package/dist/types-ts4.5/common/analytics/context.d.ts +2 -2
- package/dist/types-ts4.5/common/types.d.ts +83 -2
- package/dist/types-ts4.5/index.d.ts +3 -2
- package/dist/types-ts4.5/lazy.d.ts +1 -0
- package/dist/types-ts4.5/ui/index.d.ts +13 -12
- package/dist/types-ts4.5/ui/lazy.d.ts +3 -0
- package/dist/types-ts4.5/ui/link-picker/announcer.d.ts +1 -1
- package/dist/types-ts4.5/ui/link-picker/form-footer/feature-discovery/index.d.ts +3 -6
- package/dist/types-ts4.5/ui/link-picker/index.d.ts +1 -83
- package/dist/types-ts4.5/ui/main.d.ts +13 -0
- package/lazy/package.json +15 -0
- package/package.json +6 -5
|
@@ -18,5 +18,5 @@ type AnnouncerProps = {
|
|
|
18
18
|
* It can be useful for cases when the parent component re-renders with the same announcer's text. */
|
|
19
19
|
delay?: number;
|
|
20
20
|
};
|
|
21
|
-
export declare const Announcer: React.
|
|
21
|
+
export declare const Announcer: React.MemoExoticComponent<React.ForwardRefExoticComponent<Pick<AnnouncerProps, "text" | "role" | "delay" | "ariaAtomic" | "ariaLive" | "ariaRelevant"> & React.RefAttributes<HTMLDivElement>>>;
|
|
22
22
|
export {};
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import { type FC } from 'react';
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
6
3
|
type FeatureDiscoveryProps = {
|
|
7
4
|
children: React.ReactElement;
|
|
8
5
|
testId?: string;
|
|
@@ -14,5 +11,5 @@ type FeatureDiscoveryProps = {
|
|
|
14
11
|
* Cleanup ticket:
|
|
15
12
|
* https://product-fabric.atlassian.net/browse/EDM-7480
|
|
16
13
|
*/
|
|
17
|
-
declare const FeatureDiscovery:
|
|
14
|
+
declare const FeatureDiscovery: ({ children, testId }: FeatureDiscoveryProps) => jsx.JSX.Element;
|
|
18
15
|
export default FeatureDiscovery;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
3
|
-
import { type UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
4
|
-
import { type LinkInputType, type LinkPickerPlugin } from '../../common/types';
|
|
2
|
+
import type { LinkPickerProps } from '../../common/types';
|
|
5
3
|
export declare const testIds: {
|
|
6
4
|
readonly urlError: string;
|
|
7
5
|
readonly clearUrlButton: string;
|
|
@@ -25,84 +23,4 @@ export declare const testIds: {
|
|
|
25
23
|
readonly urlInputField: "link-url";
|
|
26
24
|
readonly textInputField: "link-text";
|
|
27
25
|
};
|
|
28
|
-
interface Meta {
|
|
29
|
-
/** Indicates how the link was picked. */
|
|
30
|
-
inputMethod: LinkInputType;
|
|
31
|
-
}
|
|
32
|
-
interface OnSubmitParameter {
|
|
33
|
-
/** The `url` of the linked resource. */
|
|
34
|
-
url: string;
|
|
35
|
-
/** The desired text to be displayed alternatively to the title of the linked resource. */
|
|
36
|
-
displayText: string | null;
|
|
37
|
-
/** The resolved `title` of the resource at the time of link picking (if applicable, null if not known). */
|
|
38
|
-
title: string | null;
|
|
39
|
-
/** Meta data about the link picking submission. */
|
|
40
|
-
meta: Meta;
|
|
41
|
-
/**
|
|
42
|
-
* The input value of the `url` field at time of submission if inserted "manually".
|
|
43
|
-
* This can useful if the `url` was manually inserted with a value that is different from the normalised value returned as `url`.
|
|
44
|
-
* @example
|
|
45
|
-
* { url: 'https://google.com', rawUrl: 'google.com' }
|
|
46
|
-
*/
|
|
47
|
-
rawUrl?: string;
|
|
48
|
-
/** Raw object from the selected resource */
|
|
49
|
-
data?: Record<string, unknown>;
|
|
50
|
-
}
|
|
51
|
-
export interface LinkPickerProps {
|
|
52
|
-
/**
|
|
53
|
-
* Callback to fire on form submission.
|
|
54
|
-
*/
|
|
55
|
-
onSubmit: (arg: OnSubmitParameter, analytic?: UIAnalyticsEvent | null) => void;
|
|
56
|
-
/**
|
|
57
|
-
* Callback to fire when the cancel button is clicked.
|
|
58
|
-
* If not provided, cancel button is not displayed.
|
|
59
|
-
*/
|
|
60
|
-
onCancel?: () => void;
|
|
61
|
-
/** Callback to fire when content is changed inside the link picker e.g. items, when loading, tabs */
|
|
62
|
-
onContentResize?: () => void;
|
|
63
|
-
/** The url of the linked resource for editing. */
|
|
64
|
-
url?: string;
|
|
65
|
-
/** The desired text to be displayed alternatively to the title of the linked resource for editing. */
|
|
66
|
-
displayText?: string | null;
|
|
67
|
-
/** Plugins that provide link suggestions / search capabilities. */
|
|
68
|
-
plugins?: LinkPickerPlugin[];
|
|
69
|
-
/** If set true, Link picker will show the loading spinner where the tabs and results will show. */
|
|
70
|
-
isLoadingPlugins?: boolean;
|
|
71
|
-
/** Hides the link picker display text field if set to true. */
|
|
72
|
-
hideDisplayText?: boolean;
|
|
73
|
-
/** Disables the default width containing the link picker. */
|
|
74
|
-
disableWidth?: boolean;
|
|
75
|
-
/** Override the default left padding. */
|
|
76
|
-
paddingLeft?: string;
|
|
77
|
-
/** Override the default right padding. */
|
|
78
|
-
paddingRight?: string;
|
|
79
|
-
/** Override the default top padding. */
|
|
80
|
-
paddingTop?: string;
|
|
81
|
-
/** Override the default bottom padding. */
|
|
82
|
-
paddingBottom?: string;
|
|
83
|
-
/** Customise the link picker root component */
|
|
84
|
-
component?: React.ComponentType<Partial<LinkPickerProps> & {
|
|
85
|
-
children: React.ReactElement;
|
|
86
|
-
}>;
|
|
87
|
-
/** Allows for customisation of text in the link picker. */
|
|
88
|
-
customMessages?: CustomLinkPickerMessages;
|
|
89
|
-
featureFlags?: Record<string, unknown>;
|
|
90
|
-
/** Controls showing a "submission in-progres" UX */
|
|
91
|
-
isSubmitting?: boolean;
|
|
92
|
-
}
|
|
93
|
-
type CustomLinkPickerMessages = {
|
|
94
|
-
/** Label for the link input field */
|
|
95
|
-
linkLabel?: MessageDescriptor;
|
|
96
|
-
/** Aria label for the link input field */
|
|
97
|
-
linkAriaLabel?: MessageDescriptor;
|
|
98
|
-
/** Placeholder for the link input field */
|
|
99
|
-
linkPlaceholder?: MessageDescriptor;
|
|
100
|
-
/** Label for the link display text field */
|
|
101
|
-
linkTextLabel?: MessageDescriptor;
|
|
102
|
-
/** Placeholder for the link display text field */
|
|
103
|
-
linkTextPlaceholder?: MessageDescriptor;
|
|
104
|
-
/** Label for the submit button */
|
|
105
|
-
submitButtonLabel?: MessageDescriptor;
|
|
106
|
-
};
|
|
107
26
|
export declare const LinkPicker: import("react").ComponentType<LinkPickerProps>;
|
|
108
|
-
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import { jsx } from '@emotion/react';
|
|
7
|
+
import type { LinkPickerProps } from '../common/types';
|
|
8
|
+
import type { PackageMetaDataType } from '../common/utils/analytics/analytics.codegen';
|
|
9
|
+
export declare const testIds: {
|
|
10
|
+
linkPickerRoot: string;
|
|
11
|
+
};
|
|
12
|
+
export declare const PACKAGE_DATA: PackageMetaDataType;
|
|
13
|
+
export declare const composeLinkPicker: (Component: React.ComponentType<LinkPickerProps>) => React.MemoExoticComponent<(props: LinkPickerProps) => jsx.JSX.Element>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/link-picker/lazy",
|
|
3
|
+
"main": "../dist/cjs/lazy.js",
|
|
4
|
+
"module": "../dist/esm/lazy.js",
|
|
5
|
+
"module:es2019": "../dist/es2019/lazy.js",
|
|
6
|
+
"sideEffects": false,
|
|
7
|
+
"types": "../dist/types/lazy.d.ts",
|
|
8
|
+
"typesVersions": {
|
|
9
|
+
">=4.5 <5.4": {
|
|
10
|
+
"*": [
|
|
11
|
+
"../dist/types-ts4.5/lazy.d.ts"
|
|
12
|
+
]
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/link-picker",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.41.1",
|
|
4
4
|
"description": "Standalone link picker",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"publishConfig": {
|
|
@@ -35,7 +35,8 @@
|
|
|
35
35
|
"sideEffects": false,
|
|
36
36
|
"atlaskit:src": "src/index.ts",
|
|
37
37
|
"af:exports": {
|
|
38
|
-
".": "./src/index.ts"
|
|
38
|
+
".": "./src/index.ts",
|
|
39
|
+
"./lazy": "./src/lazy.ts"
|
|
39
40
|
},
|
|
40
41
|
"platform-feature-flags": {
|
|
41
42
|
"platform.linking-platform.link-picker.enable-empty-state": {
|
|
@@ -60,10 +61,10 @@
|
|
|
60
61
|
"@atlaskit/heading": "^2.4.0",
|
|
61
62
|
"@atlaskit/icon": "^22.7.0",
|
|
62
63
|
"@atlaskit/intl-messages-provider": "^1.0.2",
|
|
63
|
-
"@atlaskit/linking-common": "^5.
|
|
64
|
+
"@atlaskit/linking-common": "^5.8.0",
|
|
64
65
|
"@atlaskit/onboarding": "^11.10.0",
|
|
65
66
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
66
|
-
"@atlaskit/primitives": "^11.
|
|
67
|
+
"@atlaskit/primitives": "^11.1.0",
|
|
67
68
|
"@atlaskit/spinner": "^16.2.0",
|
|
68
69
|
"@atlaskit/tabs": "^16.3.0",
|
|
69
70
|
"@atlaskit/textfield": "^6.4.0",
|
|
@@ -89,7 +90,7 @@
|
|
|
89
90
|
"@af/integration-testing": "*",
|
|
90
91
|
"@af/visual-regression": "*",
|
|
91
92
|
"@atlaskit/dropdown-menu": "^12.14.0",
|
|
92
|
-
"@atlaskit/link-provider": "^1.
|
|
93
|
+
"@atlaskit/link-provider": "^1.14.0",
|
|
93
94
|
"@atlaskit/link-test-helpers": "^7.0.0",
|
|
94
95
|
"@atlaskit/visual-regression": "*",
|
|
95
96
|
"@atlassian/feature-flags-test-utils": "*",
|