@atlaskit/media-avatar-picker 24.0.2 → 24.0.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.
- package/CHANGELOG.md +6 -0
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/version.json +1 -1
- package/package.json +9 -8
- package/report.api.md +67 -49
package/CHANGELOG.md
CHANGED
package/dist/cjs/version.json
CHANGED
package/dist/es2019/version.json
CHANGED
package/dist/esm/version.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/media-avatar-picker",
|
|
3
|
-
"version": "24.0.
|
|
3
|
+
"version": "24.0.3",
|
|
4
4
|
"description": "A component to select, drag and resize image avatars. It also provides a default list of predefined avatars.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
"typesVersions": {
|
|
16
16
|
">=4.0 <4.5": {
|
|
17
17
|
"*": [
|
|
18
|
-
"dist/types-ts4.0/*"
|
|
18
|
+
"dist/types-ts4.0/*",
|
|
19
|
+
"dist/types-ts4.0/index.d.ts"
|
|
19
20
|
]
|
|
20
21
|
}
|
|
21
22
|
},
|
|
@@ -33,12 +34,12 @@
|
|
|
33
34
|
}
|
|
34
35
|
},
|
|
35
36
|
"dependencies": {
|
|
36
|
-
"@atlaskit/button": "^16.
|
|
37
|
-
"@atlaskit/icon": "^21.
|
|
37
|
+
"@atlaskit/button": "^16.4.0",
|
|
38
|
+
"@atlaskit/icon": "^21.11.0",
|
|
38
39
|
"@atlaskit/media-ui": "^22.1.0",
|
|
39
|
-
"@atlaskit/modal-dialog": "^12.
|
|
40
|
-
"@atlaskit/range": "^
|
|
41
|
-
"@atlaskit/spinner": "^15.
|
|
40
|
+
"@atlaskit/modal-dialog": "^12.4.0",
|
|
41
|
+
"@atlaskit/range": "^7.0.0",
|
|
42
|
+
"@atlaskit/spinner": "^15.2.0",
|
|
42
43
|
"@atlaskit/theme": "^12.2.0",
|
|
43
44
|
"@babel/runtime": "^7.0.0",
|
|
44
45
|
"exenv": "^1.2.2"
|
|
@@ -50,7 +51,7 @@
|
|
|
50
51
|
},
|
|
51
52
|
"devDependencies": {
|
|
52
53
|
"@atlaskit/docs": "*",
|
|
53
|
-
"@atlaskit/media-core": "^
|
|
54
|
+
"@atlaskit/media-core": "^34.0.0",
|
|
54
55
|
"@atlaskit/media-test-helpers": "^30.0.0",
|
|
55
56
|
"@atlaskit/page": "^12.2.0",
|
|
56
57
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
package/report.api.md
CHANGED
|
@@ -2,100 +2,118 @@
|
|
|
2
2
|
|
|
3
3
|
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
4
|
|
|
5
|
+
<!--
|
|
6
|
+
Generated API Report version: 2.0
|
|
7
|
+
-->
|
|
8
|
+
|
|
9
|
+
[Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
|
|
10
|
+
|
|
5
11
|
```ts
|
|
6
12
|
import { default as React_2 } from 'react';
|
|
7
13
|
import { ReactNode } from 'react';
|
|
8
14
|
|
|
9
|
-
|
|
15
|
+
// @public (undocumented)
|
|
16
|
+
export type AsyncAvatarPickerDialogProps = AvatarPickerDialogProps & {
|
|
10
17
|
placeholder?: ReactNode;
|
|
11
18
|
};
|
|
12
19
|
|
|
13
|
-
|
|
20
|
+
// @public (undocumented)
|
|
21
|
+
interface AsyncAvatarPickerDialogState {
|
|
22
|
+
// (undocumented)
|
|
14
23
|
AvatarPickerDialog?: typeof _default;
|
|
15
24
|
}
|
|
16
25
|
|
|
17
|
-
|
|
26
|
+
// @public (undocumented)
|
|
27
|
+
export interface Avatar {
|
|
28
|
+
// (undocumented)
|
|
18
29
|
dataURI: string;
|
|
19
30
|
}
|
|
20
31
|
|
|
21
|
-
|
|
32
|
+
// @public (undocumented)
|
|
33
|
+
export class AvatarPickerDialog extends React_2.PureComponent<
|
|
22
34
|
AsyncAvatarPickerDialogProps,
|
|
23
35
|
AsyncAvatarPickerDialogState
|
|
24
36
|
> {
|
|
25
|
-
|
|
37
|
+
// (undocumented)
|
|
26
38
|
static AvatarPickerDialog?: typeof _default;
|
|
39
|
+
// (undocumented)
|
|
40
|
+
static displayName: string;
|
|
41
|
+
// (undocumented)
|
|
42
|
+
render(): {};
|
|
43
|
+
// (undocumented)
|
|
27
44
|
state: {
|
|
28
45
|
AvatarPickerDialog: React_2.FC<AvatarPickerDialogProps> | undefined;
|
|
29
46
|
};
|
|
47
|
+
// (undocumented)
|
|
30
48
|
UNSAFE_componentWillMount(): Promise<void>;
|
|
31
|
-
render(): {};
|
|
32
49
|
}
|
|
33
50
|
|
|
34
|
-
|
|
35
|
-
|
|
51
|
+
// @public (undocumented)
|
|
52
|
+
interface AvatarPickerDialogProps {
|
|
36
53
|
avatars: Array<Avatar>;
|
|
37
|
-
/** This property is used along with the **avatar** property. It allows you to set the currently selected pre-defined avatar. By default, there is no pre-defined avatar selected, even if the **avatars** property is set. */
|
|
38
54
|
defaultSelectedAvatar?: Avatar;
|
|
39
|
-
|
|
40
|
-
onAvatarPicked: (avatar: Avatar) => void;
|
|
41
|
-
/** This optional property is used to set the selected image so that the component opens up with it visible already. The value should be a valid dataURI string. If an invalid dataURI is given, the bad format error state will be triggered and a message shown. */
|
|
55
|
+
errorMessage?: string;
|
|
42
56
|
imageSource?: string;
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
57
|
+
isLoading?: boolean;
|
|
58
|
+
maxImageSize?: number;
|
|
59
|
+
onAvatarPicked: (avatar: Avatar) => void;
|
|
60
|
+
onCancel: () => void;
|
|
47
61
|
onImagePicked?: (file: File, crop: CropProperties) => void;
|
|
48
|
-
/** This property is raised when the user clicks the **Save** button and there is a selected image. The selected image is provided as a dataURI string. */
|
|
49
62
|
onImagePickedDataURI?: (dataUri: string) => void;
|
|
50
|
-
/** This property is raised when the user clicks **Cancel** button.
|
|
51
|
-
* **Note** this does not close the dialog.
|
|
52
|
-
* It is up to the consumer to re-render and remove the dialog from the UI.
|
|
53
|
-
*/
|
|
54
|
-
onCancel: () => void;
|
|
55
|
-
/** The title text for the dialog. The default is _Upload an avatar_. */
|
|
56
|
-
title?: string;
|
|
57
|
-
/** The primary button text. The default is _Save_. */
|
|
58
|
-
primaryButtonText?: string;
|
|
59
|
-
/** This optional property allows the consumer to display an error message. This may occur from a call to a service. The string is clipped if greater than 125 charaters (approximately 3 lines within the dialog). */
|
|
60
|
-
errorMessage?: string;
|
|
61
|
-
/** This optional property is used while the avatar is loaded. */
|
|
62
|
-
isLoading?: boolean;
|
|
63
|
-
/** This property decribe the text related to the Avatar. */
|
|
64
|
-
predefinedAvatarsText?: string;
|
|
65
|
-
/** The target width/height of the resulting (square) avatar. Leave blank for default (200x200) */
|
|
66
63
|
outputSize?: number;
|
|
67
|
-
|
|
68
|
-
|
|
64
|
+
predefinedAvatarsText?: string;
|
|
65
|
+
primaryButtonText?: string;
|
|
66
|
+
title?: string;
|
|
69
67
|
}
|
|
70
68
|
|
|
71
|
-
|
|
69
|
+
// @public (undocumented)
|
|
70
|
+
interface CropProperties {
|
|
71
|
+
// (undocumented)
|
|
72
|
+
size: number;
|
|
73
|
+
// (undocumented)
|
|
72
74
|
x: number;
|
|
75
|
+
// (undocumented)
|
|
73
76
|
y: number;
|
|
74
|
-
size: number;
|
|
75
77
|
}
|
|
76
78
|
|
|
77
|
-
|
|
79
|
+
// @public (undocumented)
|
|
80
|
+
const _default: React_2.FC<AvatarPickerDialogProps>;
|
|
78
81
|
|
|
79
|
-
|
|
82
|
+
// @public (undocumented)
|
|
83
|
+
export const ImageNavigator: React_2.FC<ImageNavigatorProps>;
|
|
80
84
|
|
|
81
|
-
|
|
82
|
-
|
|
85
|
+
// @public (undocumented)
|
|
86
|
+
export interface ImageNavigatorProps {
|
|
87
|
+
// (undocumented)
|
|
83
88
|
errorMessage?: string;
|
|
89
|
+
// (undocumented)
|
|
90
|
+
imageSource?: string;
|
|
91
|
+
// (undocumented)
|
|
92
|
+
isLoading?: boolean;
|
|
93
|
+
// (undocumented)
|
|
94
|
+
maxImageSize?: number;
|
|
95
|
+
// (undocumented)
|
|
96
|
+
onCropChanged?: (x: number, y: number, size: number) => void;
|
|
97
|
+
// (undocumented)
|
|
98
|
+
onImageError: (errorMessage: string) => void;
|
|
99
|
+
// (undocumented)
|
|
84
100
|
onImageLoaded: (file: File) => void;
|
|
101
|
+
// (undocumented)
|
|
102
|
+
onImageUploaded: (file: File) => void;
|
|
103
|
+
// (undocumented)
|
|
85
104
|
onLoad?: OnLoadHandler;
|
|
86
|
-
|
|
105
|
+
// (undocumented)
|
|
87
106
|
onRemoveImage: () => void;
|
|
88
|
-
onImageUploaded: (file: File) => void;
|
|
89
|
-
onImageError: (errorMessage: string) => void;
|
|
90
|
-
isLoading?: boolean;
|
|
91
|
-
maxImageSize?: number;
|
|
92
107
|
}
|
|
93
108
|
|
|
94
|
-
|
|
109
|
+
// @public (undocumented)
|
|
110
|
+
export interface LoadParameters {
|
|
111
|
+
// (undocumented)
|
|
95
112
|
export: (outputSize?: number) => string;
|
|
96
113
|
}
|
|
97
114
|
|
|
98
|
-
|
|
115
|
+
// @public (undocumented)
|
|
116
|
+
export type OnLoadHandler = (params: LoadParameters) => void;
|
|
99
117
|
|
|
100
|
-
|
|
118
|
+
// (No @packageDocumentation comment for this package)
|
|
101
119
|
```
|