@atlaskit/media-avatar-picker 24.3.13 → 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 +46 -34
- 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 +7 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/media-avatar-picker
|
|
2
2
|
|
|
3
|
+
## 24.3.15
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 24.3.14
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
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
|
|
14
|
+
|
|
3
15
|
## 24.3.13
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -10,26 +22,26 @@
|
|
|
10
22
|
|
|
11
23
|
### Patch Changes
|
|
12
24
|
|
|
13
|
-
- [`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.
|
|
14
26
|
|
|
15
27
|
## 24.3.11
|
|
16
28
|
|
|
17
29
|
### Patch Changes
|
|
18
30
|
|
|
19
|
-
- [`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
|
|
20
32
|
- Updated dependencies
|
|
21
33
|
|
|
22
34
|
## 24.3.10
|
|
23
35
|
|
|
24
36
|
### Patch Changes
|
|
25
37
|
|
|
26
|
-
- [`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
|
|
27
39
|
|
|
28
40
|
## 24.3.9
|
|
29
41
|
|
|
30
42
|
### Patch Changes
|
|
31
43
|
|
|
32
|
-
- [`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.
|
|
33
45
|
|
|
34
46
|
Additionally, if there are no selected inputs on submit, the form will render an error prompting the user to do so.
|
|
35
47
|
|
|
@@ -45,34 +57,34 @@
|
|
|
45
57
|
|
|
46
58
|
### Patch Changes
|
|
47
59
|
|
|
48
|
-
- [`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
|
|
49
61
|
- Updated dependencies
|
|
50
62
|
|
|
51
63
|
## 24.3.6
|
|
52
64
|
|
|
53
65
|
### Patch Changes
|
|
54
66
|
|
|
55
|
-
- [`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.
|
|
56
68
|
- Updated dependencies
|
|
57
69
|
|
|
58
70
|
## 24.3.5
|
|
59
71
|
|
|
60
72
|
### Patch Changes
|
|
61
73
|
|
|
62
|
-
- [`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
|
|
63
75
|
- Updated dependencies
|
|
64
76
|
|
|
65
77
|
## 24.3.4
|
|
66
78
|
|
|
67
79
|
### Patch Changes
|
|
68
80
|
|
|
69
|
-
- [`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.
|
|
70
82
|
|
|
71
83
|
## 24.3.3
|
|
72
84
|
|
|
73
85
|
### Patch Changes
|
|
74
86
|
|
|
75
|
-
- [`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
|
|
76
88
|
|
|
77
89
|
## 24.3.2
|
|
78
90
|
|
|
@@ -84,13 +96,13 @@
|
|
|
84
96
|
|
|
85
97
|
### Patch Changes
|
|
86
98
|
|
|
87
|
-
- [`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`
|
|
88
100
|
|
|
89
101
|
## 24.3.0
|
|
90
102
|
|
|
91
103
|
### Minor Changes
|
|
92
104
|
|
|
93
|
-
- [`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
|
|
94
106
|
|
|
95
107
|
### Patch Changes
|
|
96
108
|
|
|
@@ -100,20 +112,20 @@
|
|
|
100
112
|
|
|
101
113
|
### Patch Changes
|
|
102
114
|
|
|
103
|
-
- [`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.
|
|
104
116
|
|
|
105
117
|
## 24.2.4
|
|
106
118
|
|
|
107
119
|
### Patch Changes
|
|
108
120
|
|
|
109
|
-
- [`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
|
|
110
122
|
- Updated dependencies
|
|
111
123
|
|
|
112
124
|
## 24.2.3
|
|
113
125
|
|
|
114
126
|
### Patch Changes
|
|
115
127
|
|
|
116
|
-
- [`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
|
|
117
129
|
|
|
118
130
|
## 24.2.2
|
|
119
131
|
|
|
@@ -125,14 +137,14 @@
|
|
|
125
137
|
|
|
126
138
|
### Patch Changes
|
|
127
139
|
|
|
128
|
-
- [`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
|
|
129
141
|
- Updated dependencies
|
|
130
142
|
|
|
131
143
|
## 24.2.0
|
|
132
144
|
|
|
133
145
|
### Minor Changes
|
|
134
146
|
|
|
135
|
-
- [`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
|
|
136
148
|
|
|
137
149
|
## 24.1.2
|
|
138
150
|
|
|
@@ -150,7 +162,7 @@
|
|
|
150
162
|
|
|
151
163
|
### Minor Changes
|
|
152
164
|
|
|
153
|
-
- [`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`.
|
|
154
166
|
|
|
155
167
|
New tokens will be visible only in applications configured to use the new Tokens API (currently in alpha).
|
|
156
168
|
These changes are intended to be interoperable with the legacy theme implementation. Legacy dark mode users should expect no visual or breaking changes.
|
|
@@ -169,19 +181,19 @@
|
|
|
169
181
|
|
|
170
182
|
### Patch Changes
|
|
171
183
|
|
|
172
|
-
- [`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`
|
|
173
185
|
|
|
174
186
|
## 24.0.1
|
|
175
187
|
|
|
176
188
|
### Patch Changes
|
|
177
189
|
|
|
178
|
-
- [`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`.
|
|
179
191
|
|
|
180
192
|
## 24.0.0
|
|
181
193
|
|
|
182
194
|
### Major Changes
|
|
183
195
|
|
|
184
|
-
- [`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
|
|
185
197
|
|
|
186
198
|
## 23.2.2
|
|
187
199
|
|
|
@@ -193,14 +205,14 @@
|
|
|
193
205
|
|
|
194
206
|
### Patch Changes
|
|
195
207
|
|
|
196
|
-
- [`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
|
|
197
209
|
- Updated dependencies
|
|
198
210
|
|
|
199
211
|
## 23.2.0
|
|
200
212
|
|
|
201
213
|
### Minor Changes
|
|
202
214
|
|
|
203
|
-
- [`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
|
|
204
216
|
|
|
205
217
|
### Patch Changes
|
|
206
218
|
|
|
@@ -222,7 +234,7 @@
|
|
|
222
234
|
|
|
223
235
|
### Minor Changes
|
|
224
236
|
|
|
225
|
-
- [`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
|
|
226
238
|
|
|
227
239
|
### Patch Changes
|
|
228
240
|
|
|
@@ -232,7 +244,7 @@
|
|
|
232
244
|
|
|
233
245
|
### Major Changes
|
|
234
246
|
|
|
235
|
-
- [`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
|
|
236
248
|
|
|
237
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.
|
|
238
250
|
Why change was made: As part of a coordinated upgrade effort across AF packages, as react-intl v2 is quite dated.
|
|
@@ -278,7 +290,7 @@
|
|
|
278
290
|
|
|
279
291
|
### Minor Changes
|
|
280
292
|
|
|
281
|
-
- [`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
|
|
282
294
|
|
|
283
295
|
### Patch Changes
|
|
284
296
|
|
|
@@ -294,7 +306,7 @@
|
|
|
294
306
|
|
|
295
307
|
### Minor Changes
|
|
296
308
|
|
|
297
|
-
- [`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
|
|
298
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.
|
|
299
311
|
|
|
300
312
|
### Patch Changes
|
|
@@ -311,14 +323,14 @@
|
|
|
311
323
|
|
|
312
324
|
### Patch Changes
|
|
313
325
|
|
|
314
|
-
- [`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.
|
|
315
327
|
- Updated dependencies
|
|
316
328
|
|
|
317
329
|
## 22.1.6
|
|
318
330
|
|
|
319
331
|
### Patch Changes
|
|
320
332
|
|
|
321
|
-
- [`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
|
|
322
334
|
- Updated dependencies
|
|
323
335
|
|
|
324
336
|
## 22.1.5
|
|
@@ -337,13 +349,13 @@
|
|
|
337
349
|
|
|
338
350
|
### Patch Changes
|
|
339
351
|
|
|
340
|
-
- [`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
|
|
341
353
|
|
|
342
354
|
## 22.1.2
|
|
343
355
|
|
|
344
356
|
### Patch Changes
|
|
345
357
|
|
|
346
|
-
- [`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.
|
|
347
359
|
This requires version 3.8 of Typescript, read more about how we handle Typescript versions here: https://atlaskit.atlassian.com/get-started
|
|
348
360
|
Also add `typescript` to `devDependencies` to denote version that the package was built with.
|
|
349
361
|
|
|
@@ -357,7 +369,7 @@
|
|
|
357
369
|
|
|
358
370
|
### Minor Changes
|
|
359
371
|
|
|
360
|
-
- [`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
|
|
361
373
|
|
|
362
374
|
### Patch Changes
|
|
363
375
|
|
|
@@ -373,7 +385,7 @@
|
|
|
373
385
|
|
|
374
386
|
### Patch Changes
|
|
375
387
|
|
|
376
|
-
- [`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
|
|
377
389
|
|
|
378
390
|
Since tslib is a dependency for all our packages we recommend that products also follow this tslib upgrade
|
|
379
391
|
to prevent duplicates of tslib being bundled.
|
|
@@ -382,7 +394,7 @@
|
|
|
382
394
|
|
|
383
395
|
### Patch Changes
|
|
384
396
|
|
|
385
|
-
- [`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
|
|
386
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
|
|
387
399
|
- Updated dependencies
|
|
388
400
|
|
|
@@ -390,7 +402,7 @@
|
|
|
390
402
|
|
|
391
403
|
### Major Changes
|
|
392
404
|
|
|
393
|
-
- [`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.
|
|
394
406
|
For more information see: https://community.developer.atlassian.com/t/atlaskit-to-drop-support-for-internet-explorer-11-from-1st-july-2020/39534
|
|
395
407
|
|
|
396
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
|
+
};
|