@atlaskit/link-picker 1.10.3 → 1.11.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 +14 -0
- package/dist/cjs/common/analytics/experiences.js +62 -0
- package/dist/cjs/controllers/session-provider/index.js +61 -0
- package/dist/cjs/ui/error-boundary/error-boundary-base/index.js +76 -0
- package/dist/cjs/ui/{error-boundary-fallback → error-boundary/error-boundary-fallback}/index.js +2 -2
- package/dist/cjs/ui/error-boundary/index.js +33 -81
- package/dist/cjs/ui/index.js +6 -9
- package/dist/cjs/ui/link-picker/index.js +28 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/common/analytics/experiences.js +39 -0
- package/dist/es2019/controllers/session-provider/index.js +32 -0
- package/dist/es2019/ui/error-boundary/error-boundary-base/index.js +37 -0
- package/dist/es2019/ui/{error-boundary-fallback → error-boundary/error-boundary-fallback}/index.js +2 -2
- package/dist/es2019/ui/error-boundary/index.js +30 -59
- package/dist/es2019/ui/index.js +5 -8
- package/dist/es2019/ui/link-picker/index.js +24 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/common/analytics/experiences.js +40 -0
- package/dist/esm/controllers/session-provider/index.js +38 -0
- package/dist/esm/ui/error-boundary/error-boundary-base/index.js +56 -0
- package/dist/esm/ui/{error-boundary-fallback → error-boundary/error-boundary-fallback}/index.js +2 -2
- package/dist/esm/ui/error-boundary/index.js +30 -79
- package/dist/esm/ui/index.js +5 -8
- package/dist/esm/ui/link-picker/index.js +25 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/common/analytics/experiences.d.ts +11 -0
- package/dist/types/controllers/session-provider/index.d.ts +10 -0
- package/dist/types/ui/error-boundary/error-boundary-base/index.d.ts +18 -0
- package/dist/types/ui/{error-boundary-fallback → error-boundary/error-boundary-fallback}/index.d.ts +0 -0
- package/dist/types/ui/error-boundary/index.d.ts +4 -24
- package/dist/types/ui/link-picker/index.d.ts +5 -0
- package/dist/types-ts4.0/common/analytics/experiences.d.ts +11 -0
- package/dist/types-ts4.0/controllers/session-provider/index.d.ts +10 -0
- package/dist/types-ts4.0/ui/error-boundary/error-boundary-base/index.d.ts +18 -0
- package/dist/types-ts4.0/ui/{error-boundary-fallback → error-boundary/error-boundary-fallback}/index.d.ts +0 -0
- package/dist/types-ts4.0/ui/error-boundary/index.d.ts +4 -24
- package/dist/types-ts4.0/ui/link-picker/index.d.ts +5 -0
- package/package.json +9 -5
- package/report.api.md +5 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React, { Component, ReactNode } from 'react';
|
|
2
|
+
export declare type ErrorBoundaryErrorInfo = {
|
|
3
|
+
componentStack: string;
|
|
4
|
+
};
|
|
5
|
+
declare type BaseErrorBoundaryState = {
|
|
6
|
+
hasError: boolean;
|
|
7
|
+
};
|
|
8
|
+
interface BaseErrorBoundaryProps {
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
ErrorComponent?: React.ComponentType;
|
|
11
|
+
onError?: (error: Error, info?: ErrorBoundaryErrorInfo) => void;
|
|
12
|
+
}
|
|
13
|
+
export declare class BaseErrorBoundary extends Component<BaseErrorBoundaryProps, BaseErrorBoundaryState> {
|
|
14
|
+
constructor(props: BaseErrorBoundaryProps);
|
|
15
|
+
componentDidCatch(error: Error, info?: ErrorBoundaryErrorInfo): void;
|
|
16
|
+
render(): React.ReactNode;
|
|
17
|
+
}
|
|
18
|
+
export {};
|
|
File without changes
|
|
@@ -1,27 +1,7 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
2
|
import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
3
|
-
|
|
4
|
-
componentStack: string;
|
|
5
|
-
};
|
|
6
|
-
export interface ErrorBoundaryProps extends WithAnalyticsEventsProps {
|
|
3
|
+
interface ErrorBoundaryProps extends WithAnalyticsEventsProps {
|
|
7
4
|
children: ReactNode;
|
|
8
|
-
channel: string;
|
|
9
|
-
ErrorComponent?: React.ComponentType;
|
|
10
|
-
onError?: (error: Error, info?: ErrorBoundaryErrorInfo) => void;
|
|
11
5
|
}
|
|
12
|
-
declare
|
|
13
|
-
|
|
14
|
-
info?: ErrorBoundaryErrorInfo;
|
|
15
|
-
[key: string]: any;
|
|
16
|
-
};
|
|
17
|
-
declare type ErrorBoundaryState = {
|
|
18
|
-
hasError: boolean;
|
|
19
|
-
};
|
|
20
|
-
export declare class BaseErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {
|
|
21
|
-
constructor(props: ErrorBoundaryProps);
|
|
22
|
-
fireAnalytics: (analyticsErrorPayload: ErrorBoundaryPayload) => void;
|
|
23
|
-
componentDidCatch(error: Error, info?: ErrorBoundaryErrorInfo): void;
|
|
24
|
-
render(): React.ReactNode;
|
|
25
|
-
}
|
|
26
|
-
declare const ErrorBoundary: React.ForwardRefExoticComponent<Omit<ErrorBoundaryProps, keyof WithAnalyticsEventsProps> & React.RefAttributes<any>>;
|
|
27
|
-
export default ErrorBoundary;
|
|
6
|
+
declare const _default: React.ForwardRefExoticComponent<Omit<ErrorBoundaryProps, keyof WithAnalyticsEventsProps> & React.RefAttributes<any>>;
|
|
7
|
+
export default _default;
|
|
@@ -15,6 +15,7 @@ export declare const testIds: {
|
|
|
15
15
|
readonly searchError: string;
|
|
16
16
|
readonly insertButton: "link-picker-insert-button";
|
|
17
17
|
readonly cancelButton: "link-picker-cancel-button";
|
|
18
|
+
readonly linkPickerRoot: "link-picker-root";
|
|
18
19
|
readonly linkPicker: "link-picker";
|
|
19
20
|
readonly urlInputField: "link-url";
|
|
20
21
|
readonly textInputField: "link-text";
|
|
@@ -56,6 +57,10 @@ export interface LinkPickerProps {
|
|
|
56
57
|
displayText?: string | null;
|
|
57
58
|
/** Plugins that provide link suggestions / search capabilities. */
|
|
58
59
|
plugins?: LinkPickerPlugin[];
|
|
60
|
+
/** Customise the link picker root component */
|
|
61
|
+
component?: React.ComponentType<Partial<LinkPickerProps> & {
|
|
62
|
+
children: React.ReactElement;
|
|
63
|
+
}>;
|
|
59
64
|
}
|
|
60
65
|
export interface PickerState {
|
|
61
66
|
selectedIndex: number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/link-picker",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.11.0",
|
|
4
4
|
"description": "Standalone link picker",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"publishConfig": {
|
|
@@ -45,16 +45,18 @@
|
|
|
45
45
|
"@atlaskit/icon": "^21.10.0",
|
|
46
46
|
"@atlaskit/spinner": "^15.1.0",
|
|
47
47
|
"@atlaskit/tabs": "^13.3.0",
|
|
48
|
-
"@atlaskit/textfield": "^5.
|
|
48
|
+
"@atlaskit/textfield": "^5.3.0",
|
|
49
49
|
"@atlaskit/theme": "^12.2.0",
|
|
50
50
|
"@atlaskit/tokens": "^0.10.0",
|
|
51
51
|
"@atlaskit/tooltip": "^17.5.0",
|
|
52
|
+
"@atlaskit/ufo": "^0.1.0",
|
|
52
53
|
"@atlaskit/visually-hidden": "^1.1.0",
|
|
53
54
|
"@babel/runtime": "^7.0.0",
|
|
54
55
|
"@emotion/react": "^11.7.1",
|
|
55
56
|
"date-fns": "^2.17.0",
|
|
56
57
|
"linkify-it": "^2.0.3",
|
|
57
|
-
"react-loosely-lazy": "^0.5.0"
|
|
58
|
+
"react-loosely-lazy": "^0.5.0",
|
|
59
|
+
"uuid": "^3.1.0"
|
|
58
60
|
},
|
|
59
61
|
"peerDependencies": {
|
|
60
62
|
"react": "^16.8.0",
|
|
@@ -65,6 +67,7 @@
|
|
|
65
67
|
"@atlaskit/activity-provider": "^2.3.2",
|
|
66
68
|
"@atlaskit/docs": "*",
|
|
67
69
|
"@atlaskit/link-analytics": "^1.1.0",
|
|
70
|
+
"@atlaskit/link-provider": "^1.2.9",
|
|
68
71
|
"@atlaskit/link-test-helpers": "^1.5.0",
|
|
69
72
|
"@atlaskit/popup": "^1.4.0",
|
|
70
73
|
"@atlaskit/ssr": "*",
|
|
@@ -72,8 +75,8 @@
|
|
|
72
75
|
"@atlaskit/visual-regression": "*",
|
|
73
76
|
"@atlaskit/webdriver-runner": "*",
|
|
74
77
|
"@atlassian/atlassian-frontend-prettier-config-1.0.0": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.0",
|
|
75
|
-
"@atlassian/link-picker-atlassian-plugin": "^
|
|
76
|
-
"@atlassian/link-picker-plugins": "^
|
|
78
|
+
"@atlassian/link-picker-atlassian-plugin": "^21.0.0",
|
|
79
|
+
"@atlassian/link-picker-plugins": "^8.0.0",
|
|
77
80
|
"@atlassian/recent-work-client": "^1.6.0",
|
|
78
81
|
"@atlassian/search-provider": "^2.3.0",
|
|
79
82
|
"@testing-library/dom": "^8.17.1",
|
|
@@ -84,6 +87,7 @@
|
|
|
84
87
|
"@types/js-yaml": "^3.12.5",
|
|
85
88
|
"enzyme": "^3.10.0",
|
|
86
89
|
"fetch-mock": "^8.0.0",
|
|
90
|
+
"jest-extended": "^0.11.2",
|
|
87
91
|
"js-yaml": "^3.13.1",
|
|
88
92
|
"lodash": "^4.17.21",
|
|
89
93
|
"mockdate": "^3.0.2",
|
package/report.api.md
CHANGED
|
@@ -46,6 +46,11 @@ export type LinkPickerPluginErrorFallback = (
|
|
|
46
46
|
|
|
47
47
|
// @public (undocumented)
|
|
48
48
|
export interface LinkPickerProps {
|
|
49
|
+
component?: React.ComponentType<
|
|
50
|
+
Partial<LinkPickerProps> & {
|
|
51
|
+
children: React.ReactElement;
|
|
52
|
+
}
|
|
53
|
+
>;
|
|
49
54
|
displayText?: string | null;
|
|
50
55
|
onCancel: () => void;
|
|
51
56
|
onContentResize?: () => void;
|