@atlaskit/media-avatar-picker 24.3.14 → 24.3.15
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 +41 -35
- package/dist/cjs/avatar-list/index.js +2 -3
- package/dist/cjs/avatar-list/styles.js +2 -4
- package/dist/cjs/avatar-picker-dialog/SRLiveTitle.js +2 -3
- package/dist/cjs/avatar-picker-dialog/SubmitErrorDialog.js +2 -3
- package/dist/cjs/avatar-picker-dialog/avatar-picker-dialog-loader.js +1 -2
- package/dist/cjs/avatar-picker-dialog/index.js +7 -13
- package/dist/cjs/avatar-picker-dialog/layout-const.js +9 -18
- package/dist/cjs/avatar-picker-dialog/styles.js +5 -10
- package/dist/cjs/avatar-picker-dialog/types.js +2 -3
- package/dist/cjs/image-cropper/crop-to-data-uri.js +2 -3
- package/dist/cjs/image-cropper/index.js +2 -4
- package/dist/cjs/image-cropper/isImageRemote.js +2 -3
- package/dist/cjs/image-cropper/styles.js +8 -16
- package/dist/cjs/image-navigator/dragZone.js +2 -3
- package/dist/cjs/image-navigator/images.js +3 -6
- package/dist/cjs/image-navigator/index.js +3 -6
- package/dist/cjs/image-navigator/slider.js +2 -4
- package/dist/cjs/image-navigator/styles.js +11 -22
- package/dist/cjs/image-placer/container.js +2 -3
- package/dist/cjs/image-placer/containerWrapper.js +2 -3
- package/dist/cjs/image-placer/image.js +3 -5
- package/dist/cjs/image-placer/imagePlacerErrorWrapper.js +2 -3
- package/dist/cjs/image-placer/imageWrapper.js +2 -3
- package/dist/cjs/image-placer/index.js +12 -24
- package/dist/cjs/image-placer/margin.js +2 -3
- package/dist/cjs/image-placer/styles.js +9 -17
- package/dist/cjs/predefined-avatar-list/index.js +2 -3
- package/dist/cjs/predefined-avatar-list/styles.js +1 -2
- package/dist/cjs/predefined-avatar-view/index.js +2 -3
- package/dist/cjs/predefined-avatar-view/styles.js +2 -4
- package/dist/cjs/styles.js +4 -8
- package/dist/cjs/viewport/viewport-render.js +3 -5
- package/dist/cjs/viewport/viewport.js +8 -15
- package/package.json +6 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
# @atlaskit/media-avatar-picker
|
|
2
2
|
|
|
3
|
+
## 24.3.15
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
3
9
|
## 24.3.14
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
6
12
|
|
|
7
|
-
- [`dcef48fcb56`](https://bitbucket.org/atlassian/atlassian-frontend/commits/dcef48fcb56) - Dependency for @types/enzyme set as static as the following patch version contains a breaking change
|
|
13
|
+
- [#40009](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/40009) [`dcef48fcb56`](https://bitbucket.org/atlassian/atlassian-frontend/commits/dcef48fcb56) - Dependency for @types/enzyme set as static as the following patch version contains a breaking change
|
|
8
14
|
|
|
9
15
|
## 24.3.13
|
|
10
16
|
|
|
@@ -16,26 +22,26 @@
|
|
|
16
22
|
|
|
17
23
|
### Patch Changes
|
|
18
24
|
|
|
19
|
-
- [`6900f89eb0e`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6900f89eb0e) - Internal changes to use space tokens. There is no expected visual or behaviour change.
|
|
25
|
+
- [#39787](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/39787) [`6900f89eb0e`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6900f89eb0e) - Internal changes to use space tokens. There is no expected visual or behaviour change.
|
|
20
26
|
|
|
21
27
|
## 24.3.11
|
|
22
28
|
|
|
23
29
|
### Patch Changes
|
|
24
30
|
|
|
25
|
-
- [`f64b71e6a69`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f64b71e6a69) - [ux] [MEX-2586] Bug fix: prevent the entire page from scrolling when opening the list of predefined avatars from media avatar picker
|
|
31
|
+
- [#39754](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/39754) [`f64b71e6a69`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f64b71e6a69) - [ux] [MEX-2586] Bug fix: prevent the entire page from scrolling when opening the list of predefined avatars from media avatar picker
|
|
26
32
|
- Updated dependencies
|
|
27
33
|
|
|
28
34
|
## 24.3.10
|
|
29
35
|
|
|
30
36
|
### Patch Changes
|
|
31
37
|
|
|
32
|
-
- [`3322bd8d915`](https://bitbucket.org/atlassian/atlassian-frontend/commits/3322bd8d915) - fix the atlaskit:src path
|
|
38
|
+
- [#39372](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/39372) [`3322bd8d915`](https://bitbucket.org/atlassian/atlassian-frontend/commits/3322bd8d915) - fix the atlaskit:src path
|
|
33
39
|
|
|
34
40
|
## 24.3.9
|
|
35
41
|
|
|
36
42
|
### Patch Changes
|
|
37
43
|
|
|
38
|
-
- [`c64e32714b0`](https://bitbucket.org/atlassian/atlassian-frontend/commits/c64e32714b0) - [ux] Bug fix: Prevent Media Avatar Picker form from incorrectly causing a GET request on submit. Instead, the form should trigger the appropriate callbacks provided in the props (i.e. onImagePicked, onImagePickedDataURI, onAvatarPicked) on submit.
|
|
44
|
+
- [#39307](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/39307) [`c64e32714b0`](https://bitbucket.org/atlassian/atlassian-frontend/commits/c64e32714b0) - [ux] Bug fix: Prevent Media Avatar Picker form from incorrectly causing a GET request on submit. Instead, the form should trigger the appropriate callbacks provided in the props (i.e. onImagePicked, onImagePickedDataURI, onAvatarPicked) on submit.
|
|
39
45
|
|
|
40
46
|
Additionally, if there are no selected inputs on submit, the form will render an error prompting the user to do so.
|
|
41
47
|
|
|
@@ -51,34 +57,34 @@
|
|
|
51
57
|
|
|
52
58
|
### Patch Changes
|
|
53
59
|
|
|
54
|
-
- [`fd6bb9c9184`](https://bitbucket.org/atlassian/atlassian-frontend/commits/fd6bb9c9184) - Delete version.json
|
|
60
|
+
- [#38162](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/38162) [`fd6bb9c9184`](https://bitbucket.org/atlassian/atlassian-frontend/commits/fd6bb9c9184) - Delete version.json
|
|
55
61
|
- Updated dependencies
|
|
56
62
|
|
|
57
63
|
## 24.3.6
|
|
58
64
|
|
|
59
65
|
### Patch Changes
|
|
60
66
|
|
|
61
|
-
- [`9435778d504`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9435778d504) - [ux] MEX-2482 Improve accessibility of avatar picker by converting it into a form; enforcing appropriate announcements to screen readers; and preventing the submit button from being disabled.
|
|
67
|
+
- [#36363](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/36363) [`9435778d504`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9435778d504) - [ux] MEX-2482 Improve accessibility of avatar picker by converting it into a form; enforcing appropriate announcements to screen readers; and preventing the submit button from being disabled.
|
|
62
68
|
- Updated dependencies
|
|
63
69
|
|
|
64
70
|
## 24.3.5
|
|
65
71
|
|
|
66
72
|
### Patch Changes
|
|
67
73
|
|
|
68
|
-
- [`a67386c9448`](https://bitbucket.org/atlassian/atlassian-frontend/commits/a67386c9448) - add missing label for media avatar picker back button
|
|
74
|
+
- [#35725](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/35725) [`a67386c9448`](https://bitbucket.org/atlassian/atlassian-frontend/commits/a67386c9448) - add missing label for media avatar picker back button
|
|
69
75
|
- Updated dependencies
|
|
70
76
|
|
|
71
77
|
## 24.3.4
|
|
72
78
|
|
|
73
79
|
### Patch Changes
|
|
74
80
|
|
|
75
|
-
- [`48e4a655534`](https://bitbucket.org/atlassian/atlassian-frontend/commits/48e4a655534) - Internal change to enforce token usage for spacing properties. There is no expected visual or behaviour change.
|
|
81
|
+
- [#33728](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33728) [`48e4a655534`](https://bitbucket.org/atlassian/atlassian-frontend/commits/48e4a655534) - Internal change to enforce token usage for spacing properties. There is no expected visual or behaviour change.
|
|
76
82
|
|
|
77
83
|
## 24.3.3
|
|
78
84
|
|
|
79
85
|
### Patch Changes
|
|
80
86
|
|
|
81
|
-
- [`9d00501a414`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9d00501a414) - Ensure legacy types are published for TS 4.5-4.8
|
|
87
|
+
- [#33793](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33793) [`9d00501a414`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9d00501a414) - Ensure legacy types are published for TS 4.5-4.8
|
|
82
88
|
|
|
83
89
|
## 24.3.2
|
|
84
90
|
|
|
@@ -90,13 +96,13 @@
|
|
|
90
96
|
|
|
91
97
|
### Patch Changes
|
|
92
98
|
|
|
93
|
-
- [`41fae2c6f68`](https://bitbucket.org/atlassian/atlassian-frontend/commits/41fae2c6f68) - Upgrade Typescript from `4.5.5` to `4.9.5`
|
|
99
|
+
- [#33649](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33649) [`41fae2c6f68`](https://bitbucket.org/atlassian/atlassian-frontend/commits/41fae2c6f68) - Upgrade Typescript from `4.5.5` to `4.9.5`
|
|
94
100
|
|
|
95
101
|
## 24.3.0
|
|
96
102
|
|
|
97
103
|
### Minor Changes
|
|
98
104
|
|
|
99
|
-
- [`56507598609`](https://bitbucket.org/atlassian/atlassian-frontend/commits/56507598609) - Skip minor dependency bump
|
|
105
|
+
- [#33258](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33258) [`56507598609`](https://bitbucket.org/atlassian/atlassian-frontend/commits/56507598609) - Skip minor dependency bump
|
|
100
106
|
|
|
101
107
|
### Patch Changes
|
|
102
108
|
|
|
@@ -106,20 +112,20 @@
|
|
|
106
112
|
|
|
107
113
|
### Patch Changes
|
|
108
114
|
|
|
109
|
-
- [`daefffa7e1a`](https://bitbucket.org/atlassian/atlassian-frontend/commits/daefffa7e1a) - Migrated use of `gridSize` to space tokens where possible. There is no expected visual or behaviour change.
|
|
115
|
+
- [#32171](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/32171) [`daefffa7e1a`](https://bitbucket.org/atlassian/atlassian-frontend/commits/daefffa7e1a) - Migrated use of `gridSize` to space tokens where possible. There is no expected visual or behaviour change.
|
|
110
116
|
|
|
111
117
|
## 24.2.4
|
|
112
118
|
|
|
113
119
|
### Patch Changes
|
|
114
120
|
|
|
115
|
-
- [`d820dfd611c`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d820dfd611c) - Fixed show more button flicker on mouse hover
|
|
121
|
+
- [#30248](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/30248) [`d820dfd611c`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d820dfd611c) - Fixed show more button flicker on mouse hover
|
|
116
122
|
- Updated dependencies
|
|
117
123
|
|
|
118
124
|
## 24.2.3
|
|
119
125
|
|
|
120
126
|
### Patch Changes
|
|
121
127
|
|
|
122
|
-
- [`785ebcec1b3`](https://bitbucket.org/atlassian/atlassian-frontend/commits/785ebcec1b3) - Fixed image button border on focus
|
|
128
|
+
- [#29671](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/29671) [`785ebcec1b3`](https://bitbucket.org/atlassian/atlassian-frontend/commits/785ebcec1b3) - Fixed image button border on focus
|
|
123
129
|
|
|
124
130
|
## 24.2.2
|
|
125
131
|
|
|
@@ -131,14 +137,14 @@
|
|
|
131
137
|
|
|
132
138
|
### Patch Changes
|
|
133
139
|
|
|
134
|
-
- [`564b251839c`](https://bitbucket.org/atlassian/atlassian-frontend/commits/564b251839c) - [ux] Fixed avatar picker not showing correct orientation for images with exif data
|
|
140
|
+
- [#28932](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/28932) [`564b251839c`](https://bitbucket.org/atlassian/atlassian-frontend/commits/564b251839c) - [ux] Fixed avatar picker not showing correct orientation for images with exif data
|
|
135
141
|
- Updated dependencies
|
|
136
142
|
|
|
137
143
|
## 24.2.0
|
|
138
144
|
|
|
139
145
|
### Minor Changes
|
|
140
146
|
|
|
141
|
-
- [`ba83d964c58`](https://bitbucket.org/atlassian/atlassian-frontend/commits/ba83d964c58) - [ux] Add keyboard navigation support to select an image on the media-avatar-picker package
|
|
147
|
+
- [#28090](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/28090) [`ba83d964c58`](https://bitbucket.org/atlassian/atlassian-frontend/commits/ba83d964c58) - [ux] Add keyboard navigation support to select an image on the media-avatar-picker package
|
|
142
148
|
|
|
143
149
|
## 24.1.2
|
|
144
150
|
|
|
@@ -156,7 +162,7 @@
|
|
|
156
162
|
|
|
157
163
|
### Minor Changes
|
|
158
164
|
|
|
159
|
-
- [`1f299384778`](https://bitbucket.org/atlassian/atlassian-frontend/commits/1f299384778) - [ux] Instrumented `@atlaskit/media-avatar-picker` with the new theming package, `@atlaskit/tokens`.
|
|
165
|
+
- [#26712](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/26712) [`1f299384778`](https://bitbucket.org/atlassian/atlassian-frontend/commits/1f299384778) - [ux] Instrumented `@atlaskit/media-avatar-picker` with the new theming package, `@atlaskit/tokens`.
|
|
160
166
|
|
|
161
167
|
New tokens will be visible only in applications configured to use the new Tokens API (currently in alpha).
|
|
162
168
|
These changes are intended to be interoperable with the legacy theme implementation. Legacy dark mode users should expect no visual or breaking changes.
|
|
@@ -175,19 +181,19 @@
|
|
|
175
181
|
|
|
176
182
|
### Patch Changes
|
|
177
183
|
|
|
178
|
-
- [`8cc2f888c83`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8cc2f888c83) - Upgrade Typescript from `4.3.5` to `4.5.5`
|
|
184
|
+
- [#24874](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/24874) [`8cc2f888c83`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8cc2f888c83) - Upgrade Typescript from `4.3.5` to `4.5.5`
|
|
179
185
|
|
|
180
186
|
## 24.0.1
|
|
181
187
|
|
|
182
188
|
### Patch Changes
|
|
183
189
|
|
|
184
|
-
- [`8d4228767b0`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8d4228767b0) - Upgrade Typescript from `4.2.4` to `4.3.5`.
|
|
190
|
+
- [#24492](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/24492) [`8d4228767b0`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8d4228767b0) - Upgrade Typescript from `4.2.4` to `4.3.5`.
|
|
185
191
|
|
|
186
192
|
## 24.0.0
|
|
187
193
|
|
|
188
194
|
### Major Changes
|
|
189
195
|
|
|
190
|
-
- [`c251c5d890c`](https://bitbucket.org/atlassian/atlassian-frontend/commits/c251c5d890c) - [MEX-1026] Migrated from styled-components library to @emotion/react in @atlaskit/media-avatar-picker
|
|
196
|
+
- [#22642](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/22642) [`c251c5d890c`](https://bitbucket.org/atlassian/atlassian-frontend/commits/c251c5d890c) - [MEX-1026] Migrated from styled-components library to @emotion/react in @atlaskit/media-avatar-picker
|
|
191
197
|
|
|
192
198
|
## 23.2.2
|
|
193
199
|
|
|
@@ -199,14 +205,14 @@
|
|
|
199
205
|
|
|
200
206
|
### Patch Changes
|
|
201
207
|
|
|
202
|
-
- [`cb2392f6d33`](https://bitbucket.org/atlassian/atlassian-frontend/commits/cb2392f6d33) - Upgrade to TypeScript 4.2.4
|
|
208
|
+
- [#20650](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/20650) [`cb2392f6d33`](https://bitbucket.org/atlassian/atlassian-frontend/commits/cb2392f6d33) - Upgrade to TypeScript 4.2.4
|
|
203
209
|
- Updated dependencies
|
|
204
210
|
|
|
205
211
|
## 23.2.0
|
|
206
212
|
|
|
207
213
|
### Minor Changes
|
|
208
214
|
|
|
209
|
-
- [`306b52fd9ca`](https://bitbucket.org/atlassian/atlassian-frontend/commits/306b52fd9ca) - [ux] MEX-1467 - The optional paramater maxImageSize for the media-avatar-picker can be used to modify the max file size of the image
|
|
215
|
+
- [#20033](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/20033) [`306b52fd9ca`](https://bitbucket.org/atlassian/atlassian-frontend/commits/306b52fd9ca) - [ux] MEX-1467 - The optional paramater maxImageSize for the media-avatar-picker can be used to modify the max file size of the image
|
|
210
216
|
|
|
211
217
|
### Patch Changes
|
|
212
218
|
|
|
@@ -228,7 +234,7 @@
|
|
|
228
234
|
|
|
229
235
|
### Minor Changes
|
|
230
236
|
|
|
231
|
-
- [`6c6bd435635`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6c6bd435635) - TC-2422: add the ability for avatars to have different output sizes
|
|
237
|
+
- [#16752](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/16752) [`6c6bd435635`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6c6bd435635) - TC-2422: add the ability for avatars to have different output sizes
|
|
232
238
|
|
|
233
239
|
### Patch Changes
|
|
234
240
|
|
|
@@ -238,7 +244,7 @@
|
|
|
238
244
|
|
|
239
245
|
### Major Changes
|
|
240
246
|
|
|
241
|
-
- [`47f58da5946`](https://bitbucket.org/atlassian/atlassian-frontend/commits/47f58da5946) - ED-13322, ED-13324, ED-13326, ED-13323, ED-13204: Upgrade and support react-intl@^5.18.1 including breaking API changes, types and tests in atlassian-frontend packages
|
|
247
|
+
- [#14810](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/14810) [`47f58da5946`](https://bitbucket.org/atlassian/atlassian-frontend/commits/47f58da5946) - ED-13322, ED-13324, ED-13326, ED-13323, ED-13204: Upgrade and support react-intl@^5.18.1 including breaking API changes, types and tests in atlassian-frontend packages
|
|
242
248
|
|
|
243
249
|
What changed: Upgraded our react-intl support from ^2.6.0 to ^5.18.1. This means editor packages now rely on consumers installing ^5.18.1, otherwise editor usage of react-intl will mismatch with actual installed react-intl APIs.
|
|
244
250
|
Why change was made: As part of a coordinated upgrade effort across AF packages, as react-intl v2 is quite dated.
|
|
@@ -284,7 +290,7 @@
|
|
|
284
290
|
|
|
285
291
|
### Minor Changes
|
|
286
292
|
|
|
287
|
-
- [`e01dd6e92ec`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e01dd6e92ec) - Made component ImageNavigator publicly available
|
|
293
|
+
- [#14777](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/14777) [`e01dd6e92ec`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e01dd6e92ec) - Made component ImageNavigator publicly available
|
|
288
294
|
|
|
289
295
|
### Patch Changes
|
|
290
296
|
|
|
@@ -300,7 +306,7 @@
|
|
|
300
306
|
|
|
301
307
|
### Minor Changes
|
|
302
308
|
|
|
303
|
-
- [`5e6fa1c70a5`](https://bitbucket.org/atlassian/atlassian-frontend/commits/5e6fa1c70a5) - fix unit tests for modal dialog
|
|
309
|
+
- [#13864](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/13864) [`5e6fa1c70a5`](https://bitbucket.org/atlassian/atlassian-frontend/commits/5e6fa1c70a5) - fix unit tests for modal dialog
|
|
304
310
|
- [`9c0241362a6`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9c0241362a6) - [ux] Upgrade to the latest version of @atlaskit/modal-dialog. This change includes shifting the primary button in the footer of the modal to be on the right instead of the left.
|
|
305
311
|
|
|
306
312
|
### Patch Changes
|
|
@@ -317,14 +323,14 @@
|
|
|
317
323
|
|
|
318
324
|
### Patch Changes
|
|
319
325
|
|
|
320
|
-
- [`d61fa7df04b`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d61fa7df04b) - [ux] Removes unnecessary scroll in media's avatar picker dialog.
|
|
326
|
+
- [#10569](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/10569) [`d61fa7df04b`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d61fa7df04b) - [ux] Removes unnecessary scroll in media's avatar picker dialog.
|
|
321
327
|
- Updated dependencies
|
|
322
328
|
|
|
323
329
|
## 22.1.6
|
|
324
330
|
|
|
325
331
|
### Patch Changes
|
|
326
332
|
|
|
327
|
-
- [`277ed9667b2`](https://bitbucket.org/atlassian/atlassian-frontend/commits/277ed9667b2) - Fixed media bundle names following atlassian-frontend linting rules
|
|
333
|
+
- [#10230](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/10230) [`277ed9667b2`](https://bitbucket.org/atlassian/atlassian-frontend/commits/277ed9667b2) - Fixed media bundle names following atlassian-frontend linting rules
|
|
328
334
|
- Updated dependencies
|
|
329
335
|
|
|
330
336
|
## 22.1.5
|
|
@@ -343,13 +349,13 @@
|
|
|
343
349
|
|
|
344
350
|
### Patch Changes
|
|
345
351
|
|
|
346
|
-
- [`d3265f19be`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d3265f19be) - Transpile packages using babel rather than tsc
|
|
352
|
+
- [#5857](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/5857) [`d3265f19be`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d3265f19be) - Transpile packages using babel rather than tsc
|
|
347
353
|
|
|
348
354
|
## 22.1.2
|
|
349
355
|
|
|
350
356
|
### Patch Changes
|
|
351
357
|
|
|
352
|
-
- [`5f58283e1f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/5f58283e1f) - Export types using Typescript's new "export type" syntax to satisfy Typescript's --isolatedModules compiler option.
|
|
358
|
+
- [#5497](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/5497) [`5f58283e1f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/5f58283e1f) - Export types using Typescript's new "export type" syntax to satisfy Typescript's --isolatedModules compiler option.
|
|
353
359
|
This requires version 3.8 of Typescript, read more about how we handle Typescript versions here: https://atlaskit.atlassian.com/get-started
|
|
354
360
|
Also add `typescript` to `devDependencies` to denote version that the package was built with.
|
|
355
361
|
|
|
@@ -363,7 +369,7 @@
|
|
|
363
369
|
|
|
364
370
|
### Minor Changes
|
|
365
371
|
|
|
366
|
-
- [`7d831363d9`](https://bitbucket.org/atlassian/atlassian-frontend/commits/7d831363d9) - Migrated to declarative entry points
|
|
372
|
+
- [#4749](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/4749) [`7d831363d9`](https://bitbucket.org/atlassian/atlassian-frontend/commits/7d831363d9) - Migrated to declarative entry points
|
|
367
373
|
|
|
368
374
|
### Patch Changes
|
|
369
375
|
|
|
@@ -379,7 +385,7 @@
|
|
|
379
385
|
|
|
380
386
|
### Patch Changes
|
|
381
387
|
|
|
382
|
-
- [`6c525a8229`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6c525a8229) - Upgraded to TypeScript 3.9.6 and tslib to 2.0.0
|
|
388
|
+
- [#3885](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/3885) [`6c525a8229`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6c525a8229) - Upgraded to TypeScript 3.9.6 and tslib to 2.0.0
|
|
383
389
|
|
|
384
390
|
Since tslib is a dependency for all our packages we recommend that products also follow this tslib upgrade
|
|
385
391
|
to prevent duplicates of tslib being bundled.
|
|
@@ -388,7 +394,7 @@
|
|
|
388
394
|
|
|
389
395
|
### Patch Changes
|
|
390
396
|
|
|
391
|
-
- [`fa6fb5dfbb`](https://bitbucket.org/atlassian/atlassian-frontend/commits/fa6fb5dfbb) - Removing unused code to be published
|
|
397
|
+
- [#3823](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/3823) [`fa6fb5dfbb`](https://bitbucket.org/atlassian/atlassian-frontend/commits/fa6fb5dfbb) - Removing unused code to be published
|
|
392
398
|
- [`861d585ba8`](https://bitbucket.org/atlassian/atlassian-frontend/commits/861d585ba8) - Changed mediaSingle to now render it's child adf nodes using nodeviews rather than directly with react
|
|
393
399
|
- Updated dependencies
|
|
394
400
|
|
|
@@ -396,7 +402,7 @@
|
|
|
396
402
|
|
|
397
403
|
### Major Changes
|
|
398
404
|
|
|
399
|
-
- [`87f4720f27`](https://bitbucket.org/atlassian/atlassian-frontend/commits/87f4720f27) - Officially dropping IE11 support, from this version onwards there are no warranties of the package working in IE11.
|
|
405
|
+
- [#3335](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/3335) [`87f4720f27`](https://bitbucket.org/atlassian/atlassian-frontend/commits/87f4720f27) - Officially dropping IE11 support, from this version onwards there are no warranties of the package working in IE11.
|
|
400
406
|
For more information see: https://community.developer.atlassian.com/t/atlaskit-to-drop-support-for-internet-explorer-11-from-1st-july-2020/39534
|
|
401
407
|
|
|
402
408
|
### Patch Changes
|
|
@@ -10,7 +10,7 @@ var _mediaUi = require("@atlaskit/media-ui");
|
|
|
10
10
|
var _styles = require("./styles");
|
|
11
11
|
/** @jsx jsx */
|
|
12
12
|
|
|
13
|
-
var AvatarList = function AvatarList(_ref) {
|
|
13
|
+
var AvatarList = exports.AvatarList = function AvatarList(_ref) {
|
|
14
14
|
var _ref$avatars = _ref.avatars,
|
|
15
15
|
avatars = _ref$avatars === void 0 ? [] : _ref$avatars,
|
|
16
16
|
selectedAvatar = _ref.selectedAvatar,
|
|
@@ -45,5 +45,4 @@ var AvatarList = function AvatarList(_ref) {
|
|
|
45
45
|
"aria-label": selectAvatarLabel || intl.formatMessage(_mediaUi.messages.select_an_avatar),
|
|
46
46
|
css: _styles.avatarListWrapperStyles
|
|
47
47
|
}, cards);
|
|
48
|
-
};
|
|
49
|
-
exports.AvatarList = AvatarList;
|
|
48
|
+
};
|
|
@@ -9,7 +9,5 @@ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/hel
|
|
|
9
9
|
var _react = require("@emotion/react");
|
|
10
10
|
var _styles = require("../styles");
|
|
11
11
|
var _templateObject, _templateObject2;
|
|
12
|
-
var smallAvatarImageStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n ", "\n width: ", ";\n height: ", ";\n"])), _styles.avatarImageStyles, "var(--ds-space-500, 40px)", "var(--ds-space-500, 40px)");
|
|
13
|
-
exports.
|
|
14
|
-
var avatarListWrapperStyles = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n\n label {\n padding-right: ", ";\n display: inline-flex;\n }\n"])), "var(--ds-space-050, 4px)");
|
|
15
|
-
exports.avatarListWrapperStyles = avatarListWrapperStyles;
|
|
12
|
+
var smallAvatarImageStyles = exports.smallAvatarImageStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n ", "\n width: ", ";\n height: ", ";\n"])), _styles.avatarImageStyles, "var(--ds-space-500, 40px)", "var(--ds-space-500, 40px)");
|
|
13
|
+
var avatarListWrapperStyles = exports.avatarListWrapperStyles = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n\n label {\n padding-right: ", ";\n display: inline-flex;\n }\n"])), "var(--ds-space-050, 4px)");
|
|
@@ -10,11 +10,10 @@ var _reactIntlNext = require("react-intl-next");
|
|
|
10
10
|
var _visuallyHidden = _interopRequireDefault(require("@atlaskit/visually-hidden"));
|
|
11
11
|
var _types = require("./types");
|
|
12
12
|
var _mediaUi = require("@atlaskit/media-ui");
|
|
13
|
-
var SRLiveTitle = function SRLiveTitle(_ref) {
|
|
13
|
+
var SRLiveTitle = exports.SRLiveTitle = function SRLiveTitle(_ref) {
|
|
14
14
|
var mode = _ref.mode;
|
|
15
15
|
var intl = (0, _reactIntlNext.useIntl)();
|
|
16
16
|
return /*#__PURE__*/_react.default.createElement(_visuallyHidden.default, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
17
17
|
"aria-live": "polite"
|
|
18
18
|
}, mode === _types.Mode.Cropping && intl.formatMessage(_mediaUi.messages.or_select_default_avatars), mode === _types.Mode.PredefinedAvatars && intl.formatMessage(_mediaUi.messages.select_an_avatar_from_all_defaults)));
|
|
19
|
-
};
|
|
20
|
-
exports.SRLiveTitle = SRLiveTitle;
|
|
19
|
+
};
|
|
@@ -15,7 +15,7 @@ var _reactIntlNext = require("react-intl-next");
|
|
|
15
15
|
var _styles = require("./styles");
|
|
16
16
|
/** @jsx jsx */
|
|
17
17
|
|
|
18
|
-
var SubmitErrorDialog = function SubmitErrorDialog() {
|
|
18
|
+
var SubmitErrorDialog = exports.SubmitErrorDialog = function SubmitErrorDialog() {
|
|
19
19
|
var intl = (0, _reactIntlNext.useIntl)();
|
|
20
20
|
var flagContainerRef = (0, _react2.useRef)(null);
|
|
21
21
|
(0, _react2.useEffect)(function () {
|
|
@@ -36,5 +36,4 @@ var SubmitErrorDialog = function SubmitErrorDialog() {
|
|
|
36
36
|
key: "error",
|
|
37
37
|
title: intl.formatMessage(_mediaUi.messages.or_select_default_avatars)
|
|
38
38
|
}));
|
|
39
|
-
};
|
|
40
|
-
exports.SubmitErrorDialog = SubmitErrorDialog;
|
|
39
|
+
};
|
|
@@ -21,7 +21,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
21
21
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
22
22
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
23
23
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
24
|
-
var AsyncAvatarPickerDialog = /*#__PURE__*/function (_React$PureComponent) {
|
|
24
|
+
var AsyncAvatarPickerDialog = exports.default = /*#__PURE__*/function (_React$PureComponent) {
|
|
25
25
|
(0, _inherits2.default)(AsyncAvatarPickerDialog, _React$PureComponent);
|
|
26
26
|
var _super = _createSuper(AsyncAvatarPickerDialog);
|
|
27
27
|
function AsyncAvatarPickerDialog() {
|
|
@@ -95,5 +95,4 @@ var AsyncAvatarPickerDialog = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
95
95
|
}]);
|
|
96
96
|
return AsyncAvatarPickerDialog;
|
|
97
97
|
}(_react.default.PureComponent);
|
|
98
|
-
exports.default = AsyncAvatarPickerDialog;
|
|
99
98
|
(0, _defineProperty2.default)(AsyncAvatarPickerDialog, "displayName", 'AsyncAvatarPickerDialog');
|
|
@@ -35,23 +35,19 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
35
35
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
36
36
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
37
37
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /** @jsx jsx */
|
|
38
|
-
var MAX_SIZE_MB = 10;
|
|
39
|
-
exports.
|
|
40
|
-
var ERROR = {
|
|
38
|
+
var MAX_SIZE_MB = exports.MAX_SIZE_MB = 10;
|
|
39
|
+
var ERROR = exports.ERROR = {
|
|
41
40
|
URL: _mediaUi.messages.image_url_invalid_error,
|
|
42
41
|
FORMAT: _mediaUi.messages.image_format_invalid_error,
|
|
43
42
|
SIZE: _mediaUi.messages.image_size_too_large_error
|
|
44
43
|
};
|
|
45
|
-
exports.
|
|
46
|
-
var
|
|
47
|
-
exports.ACCEPT = ACCEPT;
|
|
48
|
-
var fixedCrop = {
|
|
44
|
+
var ACCEPT = exports.ACCEPT = ['image/gif', 'image/jpeg', 'image/png'];
|
|
45
|
+
var fixedCrop = exports.fixedCrop = {
|
|
49
46
|
x: 0,
|
|
50
47
|
y: 0,
|
|
51
48
|
size: _layoutConst.CONTAINER_INNER_SIZE
|
|
52
49
|
};
|
|
53
|
-
exports.
|
|
54
|
-
var AvatarPickerDialog = /*#__PURE__*/function (_PureComponent) {
|
|
50
|
+
var AvatarPickerDialog = exports.AvatarPickerDialog = /*#__PURE__*/function (_PureComponent) {
|
|
55
51
|
(0, _inherits2.default)(AvatarPickerDialog, _PureComponent);
|
|
56
52
|
var _super = _createSuper(AvatarPickerDialog);
|
|
57
53
|
function AvatarPickerDialog() {
|
|
@@ -298,11 +294,9 @@ var AvatarPickerDialog = /*#__PURE__*/function (_PureComponent) {
|
|
|
298
294
|
}]);
|
|
299
295
|
return AvatarPickerDialog;
|
|
300
296
|
}(_react.PureComponent);
|
|
301
|
-
exports.AvatarPickerDialog = AvatarPickerDialog;
|
|
302
297
|
(0, _defineProperty2.default)(AvatarPickerDialog, "defaultProps", {
|
|
303
298
|
avatars: []
|
|
304
299
|
});
|
|
305
|
-
var _default = (0, _reactIntlNext.injectIntl)(AvatarPickerDialog, {
|
|
300
|
+
var _default = exports.default = (0, _reactIntlNext.injectIntl)(AvatarPickerDialog, {
|
|
306
301
|
enforceContext: false
|
|
307
|
-
});
|
|
308
|
-
exports.default = _default;
|
|
302
|
+
});
|
|
@@ -6,21 +6,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.PREDEFINED_AVATARS_VIEW_WIDTH = exports.PREDEFINED_AVATARS_VIEW_HEIGHT = exports.DEFAULT_VISIBLE_PREDEFINED_AVATARS = exports.CONTAINER_SIZE = exports.CONTAINER_RECT = exports.CONTAINER_PADDING = exports.CONTAINER_INNER_SIZE = exports.AVATAR_DIALOG_WIDTH = exports.AVATAR_DIALOG_HEIGHT = void 0;
|
|
7
7
|
var _constants = require("@atlaskit/theme/constants");
|
|
8
8
|
var _mediaUi = require("@atlaskit/media-ui");
|
|
9
|
-
var DEFAULT_VISIBLE_PREDEFINED_AVATARS = 5;
|
|
10
|
-
exports.
|
|
11
|
-
var
|
|
12
|
-
exports.
|
|
13
|
-
var
|
|
14
|
-
exports.
|
|
15
|
-
var
|
|
16
|
-
exports.
|
|
17
|
-
var
|
|
18
|
-
exports.PREDEFINED_AVATARS_VIEW_HEIGHT = PREDEFINED_AVATARS_VIEW_HEIGHT;
|
|
19
|
-
var CONTAINER_SIZE = (0, _constants.gridSize)() * 32;
|
|
20
|
-
exports.CONTAINER_SIZE = CONTAINER_SIZE;
|
|
21
|
-
var CONTAINER_INNER_SIZE = (0, _constants.gridSize)() * 25;
|
|
22
|
-
exports.CONTAINER_INNER_SIZE = CONTAINER_INNER_SIZE;
|
|
23
|
-
var CONTAINER_PADDING = (CONTAINER_SIZE - CONTAINER_INNER_SIZE) / 2;
|
|
24
|
-
exports.CONTAINER_PADDING = CONTAINER_PADDING;
|
|
25
|
-
var CONTAINER_RECT = new _mediaUi.Rectangle(CONTAINER_SIZE, CONTAINER_SIZE);
|
|
26
|
-
exports.CONTAINER_RECT = CONTAINER_RECT;
|
|
9
|
+
var DEFAULT_VISIBLE_PREDEFINED_AVATARS = exports.DEFAULT_VISIBLE_PREDEFINED_AVATARS = 5;
|
|
10
|
+
var AVATAR_DIALOG_WIDTH = exports.AVATAR_DIALOG_WIDTH = 375;
|
|
11
|
+
var AVATAR_DIALOG_HEIGHT = exports.AVATAR_DIALOG_HEIGHT = 470;
|
|
12
|
+
var PREDEFINED_AVATARS_VIEW_WIDTH = exports.PREDEFINED_AVATARS_VIEW_WIDTH = 343;
|
|
13
|
+
var PREDEFINED_AVATARS_VIEW_HEIGHT = exports.PREDEFINED_AVATARS_VIEW_HEIGHT = 290;
|
|
14
|
+
var CONTAINER_SIZE = exports.CONTAINER_SIZE = (0, _constants.gridSize)() * 32;
|
|
15
|
+
var CONTAINER_INNER_SIZE = exports.CONTAINER_INNER_SIZE = (0, _constants.gridSize)() * 25;
|
|
16
|
+
var CONTAINER_PADDING = exports.CONTAINER_PADDING = (CONTAINER_SIZE - CONTAINER_INNER_SIZE) / 2;
|
|
17
|
+
var CONTAINER_RECT = exports.CONTAINER_RECT = new _mediaUi.Rectangle(CONTAINER_SIZE, CONTAINER_SIZE);
|
|
@@ -8,13 +8,8 @@ exports.modalHeaderStyles = exports.formStyles = exports.croppingWrapperStyles =
|
|
|
8
8
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
9
9
|
var _react = require("@emotion/react");
|
|
10
10
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
11
|
-
var avatarPickerErrorStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n margin: 0 ", " ", ";\n"])), "var(--ds-space-200, 16px)", "var(--ds-space-200, 16px)");
|
|
12
|
-
exports.
|
|
13
|
-
var
|
|
14
|
-
exports.
|
|
15
|
-
var
|
|
16
|
-
exports.avatarPickerViewWrapperStyles = avatarPickerViewWrapperStyles;
|
|
17
|
-
var modalHeaderStyles = (0, _react.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n margin: ", ";\n font-weight: 500;\n font-size: 20px;\n"])), "var(--ds-space-200, 16px)");
|
|
18
|
-
exports.modalHeaderStyles = modalHeaderStyles;
|
|
19
|
-
var croppingWrapperStyles = (0, _react.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n display: inline-block;\n user-select: none;\n\n * {\n user-select: none;\n }\n"])));
|
|
20
|
-
exports.croppingWrapperStyles = croppingWrapperStyles;
|
|
11
|
+
var avatarPickerErrorStyles = exports.avatarPickerErrorStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n margin: 0 ", " ", ";\n"])), "var(--ds-space-200, 16px)", "var(--ds-space-200, 16px)");
|
|
12
|
+
var formStyles = exports.formStyles = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n margin: 0;\n"])));
|
|
13
|
+
var avatarPickerViewWrapperStyles = exports.avatarPickerViewWrapperStyles = (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: center;\n align-items: flex-start;\n text-align: center;\n min-height: 339px;\n"])));
|
|
14
|
+
var modalHeaderStyles = exports.modalHeaderStyles = (0, _react.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n margin: ", ";\n font-weight: 500;\n font-size: 20px;\n"])), "var(--ds-space-200, 16px)");
|
|
15
|
+
var croppingWrapperStyles = exports.croppingWrapperStyles = (0, _react.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n display: inline-block;\n user-select: none;\n\n * {\n user-select: none;\n }\n"])));
|
|
@@ -4,9 +4,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.Mode = void 0;
|
|
7
|
-
var Mode = /*#__PURE__*/function (Mode) {
|
|
7
|
+
var Mode = exports.Mode = /*#__PURE__*/function (Mode) {
|
|
8
8
|
Mode[Mode["Cropping"] = 0] = "Cropping";
|
|
9
9
|
Mode[Mode["PredefinedAvatars"] = 1] = "PredefinedAvatars";
|
|
10
10
|
return Mode;
|
|
11
|
-
}({});
|
|
12
|
-
exports.Mode = Mode;
|
|
11
|
+
}({});
|
|
@@ -7,7 +7,7 @@ exports.cropToDataURI = void 0;
|
|
|
7
7
|
var _mediaUi = require("@atlaskit/media-ui");
|
|
8
8
|
var _styles = require("./styles");
|
|
9
9
|
var _util = require("../util");
|
|
10
|
-
var cropToDataURI = function cropToDataURI(imageElement, imageRect, cropRect, scale, imageOrientation) {
|
|
10
|
+
var cropToDataURI = exports.cropToDataURI = function cropToDataURI(imageElement, imageRect, cropRect, scale, imageOrientation) {
|
|
11
11
|
var top = cropRect.top,
|
|
12
12
|
left = cropRect.left,
|
|
13
13
|
width = cropRect.width,
|
|
@@ -332,5 +332,4 @@ var cropToDataURI = function cropToDataURI(imageElement, imageRect, cropRect, sc
|
|
|
332
332
|
}
|
|
333
333
|
context.drawImage(imageElement, sourceLeft, sourceTop, sourceWidth, sourceHeight, 0, 0, destinationWidth, destinationHeight);
|
|
334
334
|
return canvas.toDataURL();
|
|
335
|
-
};
|
|
336
|
-
exports.cropToDataURI = cropToDataURI;
|
|
335
|
+
};
|
|
@@ -26,7 +26,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
26
26
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
27
27
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
28
28
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /** @jsx jsx */
|
|
29
|
-
var ImageCropper = /*#__PURE__*/function (_Component) {
|
|
29
|
+
var ImageCropper = exports.ImageCropper = /*#__PURE__*/function (_Component) {
|
|
30
30
|
(0, _inherits2.default)(ImageCropper, _Component);
|
|
31
31
|
var _super = _createSuper(ImageCropper);
|
|
32
32
|
function ImageCropper() {
|
|
@@ -134,12 +134,10 @@ var ImageCropper = /*#__PURE__*/function (_Component) {
|
|
|
134
134
|
}]);
|
|
135
135
|
return ImageCropper;
|
|
136
136
|
}(_react2.Component);
|
|
137
|
-
exports.ImageCropper = ImageCropper;
|
|
138
137
|
(0, _defineProperty2.default)(ImageCropper, "defaultProps", {
|
|
139
138
|
containerSize: _layoutConst.CONTAINER_INNER_SIZE,
|
|
140
139
|
isCircleMask: false,
|
|
141
140
|
onDragStarted: function onDragStarted() {},
|
|
142
141
|
onImageSize: function onImageSize() {}
|
|
143
142
|
});
|
|
144
|
-
var _default = (0, _reactIntlNext.injectIntl)(ImageCropper);
|
|
145
|
-
exports.default = _default;
|
|
143
|
+
var _default = exports.default = (0, _reactIntlNext.injectIntl)(ImageCropper);
|
|
@@ -8,7 +8,7 @@ exports.isImageRemote = void 0;
|
|
|
8
8
|
// as part of https://product-fabric.atlassian.net/browse/MSW-479
|
|
9
9
|
|
|
10
10
|
// Returns true if you need to set crossorigin property of an img element.
|
|
11
|
-
var isImageRemote = function isImageRemote(imageUrl) {
|
|
11
|
+
var isImageRemote = exports.isImageRemote = function isImageRemote(imageUrl) {
|
|
12
12
|
var windowOrigin = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : window.location.origin;
|
|
13
13
|
if (URL && URL.prototype) {
|
|
14
14
|
var url = new URL(imageUrl);
|
|
@@ -22,5 +22,4 @@ var isImageRemote = function isImageRemote(imageUrl) {
|
|
|
22
22
|
// But it can load local and remote images with crossorigin set.
|
|
23
23
|
return true;
|
|
24
24
|
}
|
|
25
|
-
};
|
|
26
|
-
exports.isImageRemote = isImageRemote;
|
|
25
|
+
};
|
|
@@ -13,22 +13,14 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _temp
|
|
|
13
13
|
// Using module augmentation to add crossOrigin attribute as it does not exist yet, PR has been opened in
|
|
14
14
|
// DefinitelyTyped for it
|
|
15
15
|
|
|
16
|
-
var containerStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n overflow: hidden;\n border-radius: ", "px;\n"])), (0, _constants.borderRadius)());
|
|
17
|
-
exports.
|
|
18
|
-
var
|
|
19
|
-
exports.imageContainerStyles = imageContainerStyles;
|
|
20
|
-
var CONTAINER_PADDING = 28;
|
|
16
|
+
var containerStyles = exports.containerStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n overflow: hidden;\n border-radius: ", "px;\n"])), (0, _constants.borderRadius)());
|
|
17
|
+
var imageContainerStyles = exports.imageContainerStyles = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n /* Is needed so image is not selected, when dragged */\n -webkit-user-select: none; /* Chrome all / Safari all */\n -moz-user-select: none; /* Firefox all */\n -ms-user-select: none; /* IE 10+ */\n user-select: none; /* Likely future */\n border-radius: ", "px;\n"])), (0, _constants.borderRadius)());
|
|
18
|
+
var CONTAINER_PADDING = exports.CONTAINER_PADDING = 28;
|
|
21
19
|
|
|
22
20
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
23
|
-
exports.CONTAINER_PADDING = CONTAINER_PADDING;
|
|
24
21
|
var maskStyles = (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n top: ", "px;\n bottom: ", "px;\n left: ", "px;\n right: ", "px;\n box-shadow: 0 0 0 100px\n ", ";\n opacity: ", ";\n"])), CONTAINER_PADDING, CONTAINER_PADDING, CONTAINER_PADDING, CONTAINER_PADDING, "var(--ds-surface-overlay, rgba(255, 255, 255))", "var(--ds-opacity-disabled, 0.5)");
|
|
25
|
-
var rectMaskStyles = (0, _react.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n ", ";\n border-radius: ", "px;\n"])), maskStyles, (0, _constants.borderRadius)());
|
|
26
|
-
exports.
|
|
27
|
-
var
|
|
28
|
-
exports.
|
|
29
|
-
var
|
|
30
|
-
exports.dragOverlayStyles = dragOverlayStyles;
|
|
31
|
-
var removeImageContainerStyles = (0, _react.css)(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n right: ", ";\n top: ", ";\n"])), "var(--ds-space-050, 4px)", "var(--ds-space-050, 4px)");
|
|
32
|
-
exports.removeImageContainerStyles = removeImageContainerStyles;
|
|
33
|
-
var removeImageButtonStyles = (0, _react.css)(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n border-radius: ", "px;\n background-color: transparent;\n width: 24px;\n height: 24px;\n border: none;\n cursor: pointer;\n padding: 0;\n\n svg {\n position: absolute;\n top: ", ";\n left: ", ";\n }\n\n &:hover {\n background-color: ", ";\n }\n"])), (0, _constants.borderRadius)(), "var(--ds-space-050, 4px)", "var(--ds-space-050, 4px)", "var(--ds-background-neutral-hovered, ".concat(_colors.N50A, ")"));
|
|
34
|
-
exports.removeImageButtonStyles = removeImageButtonStyles;
|
|
22
|
+
var rectMaskStyles = exports.rectMaskStyles = (0, _react.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n ", ";\n border-radius: ", "px;\n"])), maskStyles, (0, _constants.borderRadius)());
|
|
23
|
+
var circularMaskStyles = exports.circularMaskStyles = (0, _react.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n ", ";\n border-radius: 500px;\n"])), maskStyles);
|
|
24
|
+
var dragOverlayStyles = exports.dragOverlayStyles = (0, _react.css)(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n width: 100%;\n height: 100%;\n cursor: move;\n"])));
|
|
25
|
+
var removeImageContainerStyles = exports.removeImageContainerStyles = (0, _react.css)(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n right: ", ";\n top: ", ";\n"])), "var(--ds-space-050, 4px)", "var(--ds-space-050, 4px)");
|
|
26
|
+
var removeImageButtonStyles = exports.removeImageButtonStyles = (0, _react.css)(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n border-radius: ", "px;\n background-color: transparent;\n width: 24px;\n height: 24px;\n border: none;\n cursor: pointer;\n padding: 0;\n\n svg {\n position: absolute;\n top: ", ";\n left: ", ";\n }\n\n &:hover {\n background-color: ", ";\n }\n"])), (0, _constants.borderRadius)(), "var(--ds-space-050, 4px)", "var(--ds-space-050, 4px)", "var(--ds-background-neutral-hovered, ".concat(_colors.N50A, ")"));
|
|
@@ -11,7 +11,7 @@ var _react = require("@emotion/react");
|
|
|
11
11
|
var _styles = require("./styles");
|
|
12
12
|
var _excluded = ["showBorder", "isDroppingFile", "children"];
|
|
13
13
|
/**@jsx jsx */
|
|
14
|
-
var DragZone = function DragZone(_ref) {
|
|
14
|
+
var DragZone = exports.DragZone = function DragZone(_ref) {
|
|
15
15
|
var showBorder = _ref.showBorder,
|
|
16
16
|
isDroppingFile = _ref.isDroppingFile,
|
|
17
17
|
children = _ref.children,
|
|
@@ -22,5 +22,4 @@ var DragZone = function DragZone(_ref) {
|
|
|
22
22
|
isDroppingFile: isDroppingFile
|
|
23
23
|
})
|
|
24
24
|
}, props), children);
|
|
25
|
-
};
|
|
26
|
-
exports.DragZone = DragZone;
|
|
25
|
+
};
|