@atlaskit/user-picker 9.4.1 → 9.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/cjs/components/AvatarItemOption.js +20 -13
- package/dist/cjs/components/EmailOption/main.js +3 -2
- package/dist/cjs/components/ExternalUserOption/ExternalAvatarItemOption.js +16 -11
- package/dist/cjs/components/ExternalUserOption/main.js +1 -0
- package/dist/cjs/components/GroupOption/main.js +3 -2
- package/dist/cjs/components/TeamOption/main.js +3 -2
- package/dist/cjs/components/UserOption.js +3 -2
- package/dist/cjs/components/creatable.js +1 -1
- package/dist/cjs/components/creatableEmailSuggestion.js +1 -1
- package/dist/cjs/components/utils.js +7 -5
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/AvatarItemOption.js +10 -5
- package/dist/es2019/components/EmailOption/main.js +3 -2
- package/dist/es2019/components/ExternalUserOption/ExternalAvatarItemOption.js +7 -3
- package/dist/es2019/components/ExternalUserOption/main.js +1 -0
- package/dist/es2019/components/GroupOption/main.js +3 -2
- package/dist/es2019/components/TeamOption/main.js +3 -2
- package/dist/es2019/components/UserOption.js +3 -2
- package/dist/es2019/components/creatable.js +1 -1
- package/dist/es2019/components/creatableEmailSuggestion.js +1 -1
- package/dist/es2019/components/utils.js +7 -5
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/AvatarItemOption.js +20 -13
- package/dist/esm/components/EmailOption/main.js +3 -2
- package/dist/esm/components/ExternalUserOption/ExternalAvatarItemOption.js +17 -11
- package/dist/esm/components/ExternalUserOption/main.js +1 -0
- package/dist/esm/components/GroupOption/main.js +3 -2
- package/dist/esm/components/TeamOption/main.js +3 -2
- package/dist/esm/components/UserOption.js +3 -2
- package/dist/esm/components/creatable.js +1 -1
- package/dist/esm/components/creatableEmailSuggestion.js +1 -1
- package/dist/esm/components/utils.js +7 -5
- package/dist/esm/version.json +1 -1
- package/dist/types/components/AvatarItemOption.d.ts +3 -2
- package/dist/types/components/BaseUserPicker.d.ts +1 -1
- package/dist/types/components/ExternalUserOption/ExternalAvatarItemOption.d.ts +2 -1
- package/dist/types/components/PopupUserPicker.d.ts +1 -1
- package/dist/types/components/UserPicker.d.ts +1 -1
- package/dist/types/types.d.ts +6 -4
- package/dist/types-ts4.0/components/AvatarItemOption.d.ts +3 -2
- package/dist/types-ts4.0/components/BaseUserPicker.d.ts +1 -1
- package/dist/types-ts4.0/components/ExternalUserOption/ExternalAvatarItemOption.d.ts +2 -1
- package/dist/types-ts4.0/components/PopupUserPicker.d.ts +1 -1
- package/dist/types-ts4.0/components/UserPicker.d.ts +1 -1
- package/dist/types-ts4.0/types.d.ts +6 -4
- package/package.json +10 -10
- package/report.api.md +108 -98
- package/tmp/api-report-tmp.d.ts +365 -0
package/report.api.md
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
|
+
<!-- API Report Version: 2.2 -->
|
|
2
|
+
|
|
1
3
|
## API Report File for "@atlaskit/user-picker"
|
|
2
4
|
|
|
3
|
-
> Do not edit this file.
|
|
5
|
+
> Do not edit this file. This report is auto-generated using [API Extractor](https://api-extractor.com/).
|
|
6
|
+
> [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
|
|
7
|
+
|
|
8
|
+
### Table of contents
|
|
9
|
+
|
|
10
|
+
- [Main Entry Types](#main-entry-types)
|
|
4
11
|
|
|
5
|
-
|
|
6
|
-
Generated API Report version: 2.0
|
|
7
|
-
-->
|
|
12
|
+
### Main Entry Types
|
|
8
13
|
|
|
9
|
-
|
|
14
|
+
<!--SECTION START: Main Entry Types-->
|
|
10
15
|
|
|
11
16
|
```ts
|
|
12
17
|
import { Placement } from '@atlaskit/popper';
|
|
@@ -17,16 +22,16 @@ import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
|
17
22
|
|
|
18
23
|
// @public (undocumented)
|
|
19
24
|
export type ActionTypes =
|
|
20
|
-
| '
|
|
25
|
+
| 'clear'
|
|
26
|
+
| 'create-option'
|
|
21
27
|
| 'deselect-option'
|
|
22
|
-
| 'remove-value'
|
|
23
28
|
| 'pop-value'
|
|
24
|
-
| '
|
|
25
|
-
| '
|
|
26
|
-
| '
|
|
29
|
+
| 'remove-value'
|
|
30
|
+
| 'select-option'
|
|
31
|
+
| 'set-value';
|
|
27
32
|
|
|
28
33
|
// @public (undocumented)
|
|
29
|
-
export type Appearance = '
|
|
34
|
+
export type Appearance = 'compact' | 'normal';
|
|
30
35
|
|
|
31
36
|
// @public (undocumented)
|
|
32
37
|
export type AtlasKitSelectChange = (
|
|
@@ -39,13 +44,13 @@ export type AtlasKitSelectChange = (
|
|
|
39
44
|
) => void;
|
|
40
45
|
|
|
41
46
|
// @public (undocumented)
|
|
42
|
-
export type AtlaskitSelectValue = Option_2 |
|
|
47
|
+
export type AtlaskitSelectValue = Array<Option_2> | Option_2 | null | undefined;
|
|
43
48
|
|
|
44
49
|
// @public (undocumented)
|
|
45
|
-
type BoundariesElement = 'scrollParent' | '
|
|
50
|
+
type BoundariesElement = 'scrollParent' | 'viewport' | 'window' | HTMLElement;
|
|
46
51
|
|
|
47
52
|
// @public (undocumented)
|
|
48
|
-
export type DefaultValue =
|
|
53
|
+
export type DefaultValue = OptionIdentifier | OptionIdentifier[] | Value;
|
|
49
54
|
|
|
50
55
|
// @public (undocumented)
|
|
51
56
|
export interface Email extends OptionData {
|
|
@@ -101,10 +106,10 @@ export interface HighlightRange {
|
|
|
101
106
|
|
|
102
107
|
// @public (undocumented)
|
|
103
108
|
export type InputActionTypes =
|
|
104
|
-
| 'set-value'
|
|
105
|
-
| 'input-change'
|
|
106
109
|
| 'input-blur'
|
|
107
|
-
| '
|
|
110
|
+
| 'input-change'
|
|
111
|
+
| 'menu-close'
|
|
112
|
+
| 'set-value';
|
|
108
113
|
|
|
109
114
|
// @public (undocumented)
|
|
110
115
|
export const isEmail: (option: OptionData) => option is Email;
|
|
@@ -125,10 +130,10 @@ export const isValidEmail: EmailValidator;
|
|
|
125
130
|
export interface LoadOptions {
|
|
126
131
|
// (undocumented)
|
|
127
132
|
(searchText?: string, sessionId?: string):
|
|
128
|
-
| Promisable<OptionData | OptionData[]>
|
|
129
133
|
| Iterable<
|
|
130
|
-
|
|
131
|
-
|
|
134
|
+
OptionData | OptionData[] | Promisable<OptionData | OptionData[]>
|
|
135
|
+
>
|
|
136
|
+
| Promisable<OptionData | OptionData[]>;
|
|
132
137
|
}
|
|
133
138
|
|
|
134
139
|
// @public (undocumented)
|
|
@@ -140,11 +145,11 @@ interface LoadUserSource {
|
|
|
140
145
|
// @public (undocumented)
|
|
141
146
|
type LozengeColor =
|
|
142
147
|
| 'default'
|
|
143
|
-
| 'success'
|
|
144
|
-
| 'removed'
|
|
145
148
|
| 'inprogress'
|
|
149
|
+
| 'moved'
|
|
146
150
|
| 'new'
|
|
147
|
-
| '
|
|
151
|
+
| 'removed'
|
|
152
|
+
| 'success';
|
|
148
153
|
|
|
149
154
|
// @public (undocumented)
|
|
150
155
|
export interface LozengeProps {
|
|
@@ -172,9 +177,10 @@ export type OnPicker = (sessionId?: string) => void;
|
|
|
172
177
|
|
|
173
178
|
// @public (undocumented)
|
|
174
179
|
type Option_2<Data = OptionData> = {
|
|
180
|
+
data: Data;
|
|
181
|
+
isDisabled?: boolean;
|
|
175
182
|
label: string;
|
|
176
183
|
value: string;
|
|
177
|
-
data: Data;
|
|
178
184
|
};
|
|
179
185
|
export { Option_2 as Option };
|
|
180
186
|
|
|
@@ -187,78 +193,80 @@ export interface OptionData {
|
|
|
187
193
|
// (undocumented)
|
|
188
194
|
id: string;
|
|
189
195
|
// (undocumented)
|
|
190
|
-
|
|
196
|
+
isDisabled?: boolean;
|
|
197
|
+
// (undocumented)
|
|
198
|
+
lozenge?: LozengeProps | ReactNode | string;
|
|
191
199
|
// (undocumented)
|
|
192
200
|
name: string;
|
|
193
201
|
// (undocumented)
|
|
194
|
-
type?: '
|
|
202
|
+
type?: 'email' | 'group' | 'team' | 'user';
|
|
195
203
|
}
|
|
196
204
|
|
|
197
205
|
// @public (undocumented)
|
|
198
|
-
export type OptionIdentifier = Pick<OptionData, 'id' | 'type'>;
|
|
206
|
+
export type OptionIdentifier = Pick<OptionData, 'id' | 'isDisabled' | 'type'>;
|
|
199
207
|
|
|
200
208
|
// @public (undocumented)
|
|
201
209
|
export const PopupUserPicker: React_2.ForwardRefExoticComponent<
|
|
202
210
|
Pick<
|
|
203
211
|
Omit<PopupUserPickerProps, keyof WithAnalyticsEventsProps>,
|
|
204
|
-
| '
|
|
212
|
+
| 'addMoreMessage'
|
|
213
|
+
| 'allowEmail'
|
|
214
|
+
| 'anchor'
|
|
215
|
+
| 'appearance'
|
|
216
|
+
| 'ariaLabelledBy'
|
|
217
|
+
| 'ariaLive'
|
|
205
218
|
| 'autoFocus'
|
|
206
219
|
| 'captureMenuScroll'
|
|
220
|
+
| 'clearValueLabel'
|
|
207
221
|
| 'closeMenuOnScroll'
|
|
222
|
+
| 'defaultValue'
|
|
223
|
+
| 'disableInput'
|
|
224
|
+
| 'emailLabel'
|
|
225
|
+
| 'fieldId'
|
|
208
226
|
| 'inputId'
|
|
209
227
|
| 'isClearable'
|
|
210
228
|
| 'isDisabled'
|
|
211
229
|
| 'isLoading'
|
|
212
|
-
| '
|
|
230
|
+
| 'isValidEmail'
|
|
231
|
+
| 'loadOptions'
|
|
232
|
+
| 'loadUserSource'
|
|
233
|
+
| 'maxOptions'
|
|
234
|
+
| 'maxPickerHeight'
|
|
235
|
+
| 'menuMinWidth'
|
|
213
236
|
| 'menuPortalTarget'
|
|
237
|
+
| 'menuPosition'
|
|
214
238
|
| 'menuShouldBlockScroll'
|
|
239
|
+
| 'noBorder'
|
|
215
240
|
| 'noOptionsMessage'
|
|
216
241
|
| 'onBlur'
|
|
217
242
|
| 'onChange'
|
|
243
|
+
| 'onClear'
|
|
244
|
+
| 'onClose'
|
|
218
245
|
| 'onFocus'
|
|
219
246
|
| 'onInputChange'
|
|
247
|
+
| 'onSelection'
|
|
248
|
+
| 'open'
|
|
220
249
|
| 'options'
|
|
221
250
|
| 'placeholder'
|
|
222
|
-
| '
|
|
223
|
-
| 'value'
|
|
224
|
-
| 'defaultValue'
|
|
225
|
-
| 'fieldId'
|
|
226
|
-
| 'menuMinWidth'
|
|
227
|
-
| 'maxPickerHeight'
|
|
228
|
-
| 'textFieldBackgroundColor'
|
|
229
|
-
| 'loadOptions'
|
|
230
|
-
| 'loadUserSource'
|
|
251
|
+
| 'popupTitle'
|
|
231
252
|
| 'search'
|
|
232
|
-
| '
|
|
233
|
-
| 'open'
|
|
234
|
-
| 'onSelection'
|
|
235
|
-
| 'onClear'
|
|
236
|
-
| 'onClose'
|
|
237
|
-
| 'appearance'
|
|
253
|
+
| 'styles'
|
|
238
254
|
| 'subtle'
|
|
239
|
-
| 'noBorder'
|
|
240
|
-
| 'addMoreMessage'
|
|
241
|
-
| 'clearValueLabel'
|
|
242
|
-
| 'allowEmail'
|
|
243
255
|
| 'suggestEmailsForDomain'
|
|
244
|
-
| '
|
|
245
|
-
| '
|
|
246
|
-
| '
|
|
247
|
-
| 'maxOptions'
|
|
248
|
-
| 'ariaLabelledBy'
|
|
249
|
-
| 'ariaLive'
|
|
250
|
-
| 'popupTitle'
|
|
256
|
+
| 'target'
|
|
257
|
+
| 'textFieldBackgroundColor'
|
|
258
|
+
| 'value'
|
|
251
259
|
> &
|
|
252
260
|
Partial<
|
|
253
261
|
Pick<
|
|
254
262
|
Omit<PopupUserPickerProps, keyof WithAnalyticsEventsProps>,
|
|
255
|
-
| 'offset'
|
|
256
|
-
| 'isMulti'
|
|
257
|
-
| 'width'
|
|
258
|
-
| 'rootBoundary'
|
|
259
263
|
| 'boundariesElement'
|
|
264
|
+
| 'isMulti'
|
|
265
|
+
| 'offset'
|
|
260
266
|
| 'placement'
|
|
267
|
+
| 'rootBoundary'
|
|
261
268
|
| 'shouldFlip'
|
|
269
|
+
| 'width'
|
|
262
270
|
>
|
|
263
271
|
> &
|
|
264
272
|
Partial<
|
|
@@ -290,10 +298,10 @@ export type PopupUserPickerProps = UserPickerProps & {
|
|
|
290
298
|
};
|
|
291
299
|
|
|
292
300
|
// @public (undocumented)
|
|
293
|
-
export type Promisable<T> = T |
|
|
301
|
+
export type Promisable<T> = PromiseLike<T> | T;
|
|
294
302
|
|
|
295
303
|
// @public (undocumented)
|
|
296
|
-
type RootBoundary = '
|
|
304
|
+
type RootBoundary = 'document' | 'viewport';
|
|
297
305
|
|
|
298
306
|
// @public (undocumented)
|
|
299
307
|
export type Target = (options: { ref: any; isOpen: boolean }) => ReactNode;
|
|
@@ -367,51 +375,51 @@ export interface UserHighlight {
|
|
|
367
375
|
const UserPicker: React_2.ForwardRefExoticComponent<
|
|
368
376
|
Pick<
|
|
369
377
|
Omit<UserPickerProps, keyof WithAnalyticsEventsProps>,
|
|
378
|
+
| 'addMoreMessage'
|
|
379
|
+
| 'allowEmail'
|
|
380
|
+
| 'anchor'
|
|
381
|
+
| 'appearance'
|
|
382
|
+
| 'ariaLabelledBy'
|
|
383
|
+
| 'ariaLive'
|
|
370
384
|
| 'autoFocus'
|
|
371
385
|
| 'captureMenuScroll'
|
|
386
|
+
| 'clearValueLabel'
|
|
372
387
|
| 'closeMenuOnScroll'
|
|
388
|
+
| 'defaultValue'
|
|
389
|
+
| 'disableInput'
|
|
390
|
+
| 'emailLabel'
|
|
391
|
+
| 'fieldId'
|
|
373
392
|
| 'inputId'
|
|
374
393
|
| 'isClearable'
|
|
375
394
|
| 'isDisabled'
|
|
376
395
|
| 'isLoading'
|
|
377
|
-
| '
|
|
396
|
+
| 'isValidEmail'
|
|
397
|
+
| 'loadOptions'
|
|
398
|
+
| 'loadUserSource'
|
|
399
|
+
| 'maxOptions'
|
|
400
|
+
| 'maxPickerHeight'
|
|
401
|
+
| 'menuMinWidth'
|
|
378
402
|
| 'menuPortalTarget'
|
|
403
|
+
| 'menuPosition'
|
|
379
404
|
| 'menuShouldBlockScroll'
|
|
405
|
+
| 'noBorder'
|
|
380
406
|
| 'noOptionsMessage'
|
|
381
407
|
| 'onBlur'
|
|
382
408
|
| 'onChange'
|
|
409
|
+
| 'onClear'
|
|
410
|
+
| 'onClose'
|
|
383
411
|
| 'onFocus'
|
|
384
412
|
| 'onInputChange'
|
|
413
|
+
| 'onSelection'
|
|
414
|
+
| 'open'
|
|
385
415
|
| 'options'
|
|
386
416
|
| 'placeholder'
|
|
387
|
-
| 'styles'
|
|
388
|
-
| 'value'
|
|
389
|
-
| 'defaultValue'
|
|
390
|
-
| 'fieldId'
|
|
391
|
-
| 'menuMinWidth'
|
|
392
|
-
| 'maxPickerHeight'
|
|
393
|
-
| 'textFieldBackgroundColor'
|
|
394
|
-
| 'loadOptions'
|
|
395
|
-
| 'loadUserSource'
|
|
396
417
|
| 'search'
|
|
397
|
-
| '
|
|
398
|
-
| 'open'
|
|
399
|
-
| 'onSelection'
|
|
400
|
-
| 'onClear'
|
|
401
|
-
| 'onClose'
|
|
402
|
-
| 'appearance'
|
|
418
|
+
| 'styles'
|
|
403
419
|
| 'subtle'
|
|
404
|
-
| 'noBorder'
|
|
405
|
-
| 'addMoreMessage'
|
|
406
|
-
| 'clearValueLabel'
|
|
407
|
-
| 'allowEmail'
|
|
408
420
|
| 'suggestEmailsForDomain'
|
|
409
|
-
| '
|
|
410
|
-
| '
|
|
411
|
-
| 'isValidEmail'
|
|
412
|
-
| 'maxOptions'
|
|
413
|
-
| 'ariaLabelledBy'
|
|
414
|
-
| 'ariaLive'
|
|
421
|
+
| 'textFieldBackgroundColor'
|
|
422
|
+
| 'value'
|
|
415
423
|
> &
|
|
416
424
|
Partial<
|
|
417
425
|
Pick<
|
|
@@ -434,7 +442,7 @@ export default UserPicker;
|
|
|
434
442
|
|
|
435
443
|
// @public (undocumented)
|
|
436
444
|
export type UserPickerProps = WithAnalyticsEventsProps & {
|
|
437
|
-
fieldId:
|
|
445
|
+
fieldId: null | string;
|
|
438
446
|
options?: OptionData[];
|
|
439
447
|
width?: number | string;
|
|
440
448
|
menuMinWidth?: number;
|
|
@@ -462,9 +470,9 @@ export type UserPickerProps = WithAnalyticsEventsProps & {
|
|
|
462
470
|
placeholder?: React_2.ReactNode;
|
|
463
471
|
addMoreMessage?: string;
|
|
464
472
|
noOptionsMessage?:
|
|
465
|
-
| ((value: { inputValue: string }) =>
|
|
466
|
-
|
|
|
467
|
-
|
|
|
473
|
+
| ((value: { inputValue: string }) => null | string)
|
|
474
|
+
| null
|
|
475
|
+
| string;
|
|
468
476
|
value?: Value;
|
|
469
477
|
isDisabled?: boolean;
|
|
470
478
|
isClearable?: boolean;
|
|
@@ -480,10 +488,10 @@ export type UserPickerProps = WithAnalyticsEventsProps & {
|
|
|
480
488
|
autoFocus?: boolean;
|
|
481
489
|
maxOptions?: number;
|
|
482
490
|
inputId?: string;
|
|
483
|
-
closeMenuOnScroll?:
|
|
491
|
+
closeMenuOnScroll?: EventListener | boolean;
|
|
484
492
|
menuShouldBlockScroll?: boolean;
|
|
485
493
|
ariaLabelledBy?: string;
|
|
486
|
-
ariaLive?: '
|
|
494
|
+
ariaLive?: 'assertive' | 'off' | 'polite';
|
|
487
495
|
};
|
|
488
496
|
|
|
489
497
|
// @public (undocumented)
|
|
@@ -501,13 +509,13 @@ export type UserPickerState = {
|
|
|
501
509
|
|
|
502
510
|
// @public (undocumented)
|
|
503
511
|
export type UserSource =
|
|
504
|
-
| '
|
|
505
|
-
| 'slack'
|
|
506
|
-
| 'microsoft'
|
|
512
|
+
| 'confluence'
|
|
507
513
|
| 'github'
|
|
514
|
+
| 'google'
|
|
508
515
|
| 'jira'
|
|
509
|
-
| '
|
|
510
|
-
| 'other-atlassian'
|
|
516
|
+
| 'microsoft'
|
|
517
|
+
| 'other-atlassian'
|
|
518
|
+
| 'slack';
|
|
511
519
|
|
|
512
520
|
// @public (undocumented)
|
|
513
521
|
interface UserSourceResult {
|
|
@@ -525,3 +533,5 @@ export type Value = OptionData | OptionData[] | null | undefined;
|
|
|
525
533
|
|
|
526
534
|
// (No @packageDocumentation comment for this package)
|
|
527
535
|
```
|
|
536
|
+
|
|
537
|
+
<!--SECTION END: Main Entry Types-->
|