@atlaskit/user-picker 10.20.4 → 10.21.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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/user-picker
2
2
 
3
+ ## 10.21.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#104824](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/104824)
8
+ [`10443be28cedb`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/10443be28cedb) -
9
+ converting tagged template syntax to object syntax for remanining styles from DSP-17626
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
3
15
  ## 10.20.4
4
16
 
5
17
  ### Patch Changes
@@ -12,7 +12,7 @@ var _utils = require("./components/utils");
12
12
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
13
13
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
14
14
  var packageName = "@atlaskit/user-picker";
15
- var packageVersion = "10.20.4";
15
+ var packageVersion = "10.21.0";
16
16
  var UUID_REGEXP_TEAMS_GROUPS = /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;
17
17
  var UUID_REGEXP_OLD_AAID = /^[a-fA-F0-9]{1,8}:[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;
18
18
  var UUID_REGEXP_NEW_AAID = /^[a-fA-F0-9]{24,24}$/;
@@ -2,7 +2,7 @@ import { createAndFireEvent } from '@atlaskit/analytics-next';
2
2
  import { v4 as uuidv4 } from 'uuid';
3
3
  import { isCustom, isExternalUser } from './components/utils';
4
4
  const packageName = "@atlaskit/user-picker";
5
- const packageVersion = "10.20.4";
5
+ const packageVersion = "10.21.0";
6
6
  const UUID_REGEXP_TEAMS_GROUPS = /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;
7
7
  const UUID_REGEXP_OLD_AAID = /^[a-fA-F0-9]{1,8}:[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;
8
8
  const UUID_REGEXP_NEW_AAID = /^[a-fA-F0-9]{24,24}$/;
@@ -5,7 +5,7 @@ import { createAndFireEvent } from '@atlaskit/analytics-next';
5
5
  import { v4 as uuidv4 } from 'uuid';
6
6
  import { isCustom, isExternalUser } from './components/utils';
7
7
  var packageName = "@atlaskit/user-picker";
8
- var packageVersion = "10.20.4";
8
+ var packageVersion = "10.21.0";
9
9
  var UUID_REGEXP_TEAMS_GROUPS = /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;
10
10
  var UUID_REGEXP_OLD_AAID = /^[a-fA-F0-9]{1,8}:[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;
11
11
  var UUID_REGEXP_NEW_AAID = /^[a-fA-F0-9]{24,24}$/;
@@ -1,5 +1,5 @@
1
1
  export { isValidEmail } from './components/emailValidation';
2
- export type { EmailValidationResponse, EmailValidator, } from './components/emailValidation';
2
+ export type { EmailValidationResponse, EmailValidator } from './components/emailValidation';
3
3
  export { UserPicker as default } from './components/UserPicker';
4
4
  export { PopupUserPicker } from './components/PopupUserPicker';
5
5
  export { isEmail, isExternalUser, isTeam, isUser } from './components/utils';
@@ -1,5 +1,5 @@
1
1
  export { isValidEmail } from './components/emailValidation';
2
- export type { EmailValidationResponse, EmailValidator, } from './components/emailValidation';
2
+ export type { EmailValidationResponse, EmailValidator } from './components/emailValidation';
3
3
  export { UserPicker as default } from './components/UserPicker';
4
4
  export { PopupUserPicker } from './components/PopupUserPicker';
5
5
  export { isEmail, isExternalUser, isTeam, isUser } from './components/utils';
package/docs/0-intro.tsx CHANGED
@@ -1,11 +1,5 @@
1
1
  import React from 'react';
2
- import {
3
- code,
4
- Example,
5
- md,
6
- Props,
7
- AtlassianInternalWarning,
8
- } from '@atlaskit/docs';
2
+ import { code, Example, md, Props, AtlassianInternalWarning } from '@atlaskit/docs';
9
3
 
10
4
  export default md`
11
5
  ${(<AtlassianInternalWarning />)}
@@ -26,39 +20,39 @@ export default md`
26
20
  ${code`import UserPicker from '@atlaskit/user-picker';`}
27
21
 
28
22
  ${(
29
- <Example
30
- packageName="@atlaskit/user-picker"
31
- Component={require('../examples/00-single').default}
32
- title="Single User Picker"
33
- source={require('!!raw-loader!../examples/00-single')}
34
- />
35
- )}
23
+ <Example
24
+ packageName="@atlaskit/user-picker"
25
+ Component={require('../examples/00-single').default}
26
+ title="Single User Picker"
27
+ source={require('!!raw-loader!../examples/00-single')}
28
+ />
29
+ )}
36
30
 
37
31
  ${(
38
- <Example
39
- packageName="@atlaskit/user-picker"
40
- Component={require('../examples/01-multi').default}
41
- title="Multi User Picker"
42
- source={require('!!raw-loader!../examples/01-multi')}
43
- />
44
- )}
32
+ <Example
33
+ packageName="@atlaskit/user-picker"
34
+ Component={require('../examples/01-multi').default}
35
+ title="Multi User Picker"
36
+ source={require('!!raw-loader!../examples/01-multi')}
37
+ />
38
+ )}
45
39
 
46
40
  ${(
47
- <Example
48
- packageName="@atlaskit/user-picker"
49
- Component={require('../examples/11-watchers').default}
50
- title="Watchers"
51
- source={require('!!raw-loader!../examples/11-watchers')}
52
- />
53
- )}
41
+ <Example
42
+ packageName="@atlaskit/user-picker"
43
+ Component={require('../examples/11-watchers').default}
44
+ title="Watchers"
45
+ source={require('!!raw-loader!../examples/11-watchers')}
46
+ />
47
+ )}
54
48
 
55
49
  ${(
56
- <Props
57
- heading="User Picker Props"
58
- props={require('!!extract-react-types-loader!../src/components/UserPicker')}
59
- overrides={{
60
- createAnalyticsEvent: () => null,
61
- }}
62
- />
63
- )}
50
+ <Props
51
+ heading="User Picker Props"
52
+ props={require('!!extract-react-types-loader!../src/components/UserPicker')}
53
+ overrides={{
54
+ createAnalyticsEvent: () => null,
55
+ }}
56
+ />
57
+ )}
64
58
  `;
@@ -4,16 +4,16 @@ import SectionMessage from '@atlaskit/section-message';
4
4
 
5
5
  export default md`
6
6
  ${(
7
- <SectionMessage
8
- appearance="warning"
9
- title="Note: @atlaskit/user-picker/smart-user-picker is deprecated."
10
- >
11
- SmartUserPicker has moved packages! Please use{' '}
12
- <a href="https://statlas.prod.atl-paas.net/atlassian-frontend/master#packages/smart-experiences/smart-user-picker">
13
- @atlaskit/smart-user-picker
14
- </a>{' '}
15
- instead. Alternatively, @atlaskit/smart-hooks will be ready by end of
16
- FY22Q4. Contact #help-smart-experiences for further details.
17
- </SectionMessage>
18
- )}
7
+ <SectionMessage
8
+ appearance="warning"
9
+ title="Note: @atlaskit/user-picker/smart-user-picker is deprecated."
10
+ >
11
+ SmartUserPicker has moved packages! Please use{' '}
12
+ <a href="https://statlas.prod.atl-paas.net/atlassian-frontend/master#packages/smart-experiences/smart-user-picker">
13
+ @atlaskit/smart-user-picker
14
+ </a>{' '}
15
+ instead. Alternatively, @atlaskit/smart-hooks will be ready by end of FY22Q4. Contact
16
+ #help-smart-experiences for further details.
17
+ </SectionMessage>
18
+ )}
19
19
  `;
@@ -1,11 +1,5 @@
1
1
  import React from 'react';
2
- import {
3
- code,
4
- Example,
5
- md,
6
- Props,
7
- AtlassianInternalWarning,
8
- } from '@atlaskit/docs';
2
+ import { code, Example, md, Props, AtlassianInternalWarning } from '@atlaskit/docs';
9
3
 
10
4
  export default md`
11
5
  ${(<AtlassianInternalWarning />)}
@@ -19,21 +13,21 @@ export default md`
19
13
  ${code`import { PopupUserPicker } from '@atlaskit/user-picker';`}
20
14
 
21
15
  ${(
22
- <Example
23
- packageName="@atlaskit/user-picker"
24
- Component={require('../examples/19-popup-config').default}
25
- title="Modal"
26
- source={require('!!raw-loader!../examples/19-popup-config')}
27
- />
28
- )}
16
+ <Example
17
+ packageName="@atlaskit/user-picker"
18
+ Component={require('../examples/19-popup-config').default}
19
+ title="Modal"
20
+ source={require('!!raw-loader!../examples/19-popup-config')}
21
+ />
22
+ )}
29
23
 
30
24
  ${(
31
- <Props
32
- heading="Popup User Picker Props"
33
- props={require('!!extract-react-types-loader!../src/components/PopupUserPicker')}
34
- overrides={{
35
- createAnalyticsEvent: () => null,
36
- }}
37
- />
38
- )}
25
+ <Props
26
+ heading="Popup User Picker Props"
27
+ props={require('!!extract-react-types-loader!../src/components/PopupUserPicker')}
28
+ overrides={{
29
+ createAnalyticsEvent: () => null,
30
+ }}
31
+ />
32
+ )}
39
33
  `;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/user-picker",
3
- "version": "10.20.4",
3
+ "version": "10.21.0",
4
4
  "description": "Fabric component for display a dropdown to select a user from",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -45,14 +45,14 @@
45
45
  "@atlaskit/analytics-next": "^9.3.0",
46
46
  "@atlaskit/avatar": "^21.9.0",
47
47
  "@atlaskit/icon": "^22.3.0",
48
- "@atlaskit/logo": "^13.17.0",
48
+ "@atlaskit/logo": "^14.0.0",
49
49
  "@atlaskit/lozenge": "^11.7.0",
50
50
  "@atlaskit/popper": "^6.0.0",
51
- "@atlaskit/primitives": "^6.5.0",
51
+ "@atlaskit/primitives": "^7.0.0",
52
52
  "@atlaskit/select": "^17.10.0",
53
53
  "@atlaskit/spinner": "^16.1.0",
54
54
  "@atlaskit/teams-avatar": "^1.0.0",
55
- "@atlaskit/theme": "^12.8.0",
55
+ "@atlaskit/theme": "^12.9.0",
56
56
  "@atlaskit/tokens": "^1.49.0",
57
57
  "@atlaskit/tooltip": "^18.4.0",
58
58
  "@atlaskit/ufo": "^0.2.0",
@@ -68,13 +68,13 @@
68
68
  "react-intl-next": "npm:react-intl@^5.18.1"
69
69
  },
70
70
  "devDependencies": {
71
- "@atlaskit/analytics-viewer": "^0.5.0",
71
+ "@atlaskit/analytics-viewer": "^0.6.0",
72
72
  "@atlaskit/elements-test-helpers": "^0.7.0",
73
73
  "@atlaskit/heading": "^2.3.0",
74
74
  "@atlaskit/visual-regression": "*",
75
75
  "@emotion/styled": "^11.0.0",
76
76
  "@testing-library/dom": "^8.17.1",
77
- "@testing-library/jest-dom": "^5.16.5",
77
+ "@testing-library/jest-dom": "^6.4.5",
78
78
  "@testing-library/react": "^12.1.5",
79
79
  "@testing-library/react-hooks": "^8.0.1",
80
80
  "@testing-library/user-event": "^14.4.3",
package/report.api.md CHANGED
@@ -2,7 +2,8 @@
2
2
 
3
3
  ## API Report File for "@atlaskit/user-picker"
4
4
 
5
- > Do not edit this file. This report is auto-generated using [API Extractor](https://api-extractor.com/).
5
+ > Do not edit this file. This report is auto-generated using
6
+ > [API Extractor](https://api-extractor.com/).
6
7
  > [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
7
8
 
8
9
  ### Table of contents
@@ -23,25 +24,25 @@ import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
23
24
 
24
25
  // @public (undocumented)
25
26
  export type ActionTypes =
26
- | 'clear'
27
- | 'create-option'
28
- | 'deselect-option'
29
- | 'pop-value'
30
- | 'remove-value'
31
- | 'select-option'
32
- | 'set-value';
27
+ | 'clear'
28
+ | 'create-option'
29
+ | 'deselect-option'
30
+ | 'pop-value'
31
+ | 'remove-value'
32
+ | 'select-option'
33
+ | 'set-value';
33
34
 
34
35
  // @public (undocumented)
35
36
  export type Appearance = 'compact' | 'normal';
36
37
 
37
38
  // @public (undocumented)
38
39
  export type AtlasKitSelectChange = (
39
- value: AtlaskitSelectValue,
40
- extraInfo: {
41
- removedValue?: Option_2;
42
- option?: Option_2;
43
- action: ActionTypes;
44
- },
40
+ value: AtlaskitSelectValue,
41
+ extraInfo: {
42
+ removedValue?: Option_2;
43
+ option?: Option_2;
44
+ action: ActionTypes;
45
+ },
45
46
  ) => void;
46
47
 
47
48
  // @public (undocumented)
@@ -49,58 +50,58 @@ export type AtlaskitSelectValue = Array<Option_2> | Option_2 | null | undefined;
49
50
 
50
51
  // @public (undocumented)
51
52
  type BaseUserPickerProps = UserPickerProps & {
52
- SelectComponent: React_2.ComponentClass<any>;
53
- pickerProps?: any;
54
- styles: any;
55
- components: any;
56
- width: number | string;
57
- name?: string;
53
+ SelectComponent: React_2.ComponentClass<any>;
54
+ pickerProps?: any;
55
+ styles: any;
56
+ components: any;
57
+ width: number | string;
58
+ name?: string;
58
59
  };
59
60
 
60
61
  // @public (undocumented)
61
62
  class BaseUserPickerWithoutAnalytics extends React_2.Component<
62
- BaseUserPickerProps,
63
- UserPickerState
63
+ BaseUserPickerProps,
64
+ UserPickerState
64
65
  > {
65
- constructor(props: BaseUserPickerProps);
66
- // (undocumented)
67
- abortOptionsShownUfoExperience: () => void;
68
- // (undocumented)
69
- get ariaProps(): {};
70
- // (undocumented)
71
- blur: () => void;
72
- // (undocumented)
73
- componentDidMount(): void;
74
- // (undocumented)
75
- componentDidUpdate(_: UserPickerProps, prevState: UserPickerState): void;
76
- // (undocumented)
77
- static defaultProps: {
78
- isMulti: boolean;
79
- subtle: boolean;
80
- noBorder: boolean;
81
- textFieldBackgroundColor: boolean;
82
- isClearable: boolean;
83
- loadOptionsErrorMessage: () => JSX.Element;
84
- };
85
- // (undocumented)
86
- focus: () => void;
87
- // (undocumented)
88
- static getDerivedStateFromProps(
89
- nextProps: Partial<UserPickerProps>,
90
- prevState: UserPickerState,
91
- ): Partial<UserPickerState>;
92
- // (undocumented)
93
- handleClearIndicatorHover: (hoveringClearIndicator: boolean) => void;
94
- // (undocumented)
95
- nextOption: () => void;
96
- // (undocumented)
97
- previousOption: () => void;
98
- // (undocumented)
99
- render(): JSX.Element;
100
- // (undocumented)
101
- selectOption: () => void;
102
- // (undocumented)
103
- startOptionsShownUfoExperience: () => void;
66
+ constructor(props: BaseUserPickerProps);
67
+ // (undocumented)
68
+ abortOptionsShownUfoExperience: () => void;
69
+ // (undocumented)
70
+ get ariaProps(): {};
71
+ // (undocumented)
72
+ blur: () => void;
73
+ // (undocumented)
74
+ componentDidMount(): void;
75
+ // (undocumented)
76
+ componentDidUpdate(_: UserPickerProps, prevState: UserPickerState): void;
77
+ // (undocumented)
78
+ static defaultProps: {
79
+ isMulti: boolean;
80
+ subtle: boolean;
81
+ noBorder: boolean;
82
+ textFieldBackgroundColor: boolean;
83
+ isClearable: boolean;
84
+ loadOptionsErrorMessage: () => JSX.Element;
85
+ };
86
+ // (undocumented)
87
+ focus: () => void;
88
+ // (undocumented)
89
+ static getDerivedStateFromProps(
90
+ nextProps: Partial<UserPickerProps>,
91
+ prevState: UserPickerState,
92
+ ): Partial<UserPickerState>;
93
+ // (undocumented)
94
+ handleClearIndicatorHover: (hoveringClearIndicator: boolean) => void;
95
+ // (undocumented)
96
+ nextOption: () => void;
97
+ // (undocumented)
98
+ previousOption: () => void;
99
+ // (undocumented)
100
+ render(): JSX.Element;
101
+ // (undocumented)
102
+ selectOption: () => void;
103
+ // (undocumented)
104
+ startOptionsShownUfoExperience: () => void;
104
105
  }
105
106
 
106
107
  // @public (undocumented)
@@ -108,22 +109,22 @@ type BoundariesElement = 'scrollParent' | 'viewport' | 'window' | HTMLElement;
108
109
 
109
110
  // @public (undocumented)
110
111
  export interface Custom extends OptionData {
111
- // (undocumented)
112
- analyticsType?: string;
113
- // (undocumented)
114
- avatarUrl?: string;
115
- // (undocumented)
116
- byline?: string;
117
- // (undocumented)
118
- highlight?: CustomHighlight;
119
- // (undocumented)
120
- type: 'custom';
112
+ // (undocumented)
113
+ analyticsType?: string;
114
+ // (undocumented)
115
+ avatarUrl?: string;
116
+ // (undocumented)
117
+ byline?: string;
118
+ // (undocumented)
119
+ highlight?: CustomHighlight;
120
+ // (undocumented)
121
+ type: 'custom';
121
122
  }
122
123
 
123
124
  // @public (undocumented)
124
125
  interface CustomHighlight {
125
- // (undocumented)
126
- name: HighlightRange[];
126
+ // (undocumented)
127
+ name: HighlightRange[];
127
128
  }
128
129
 
129
130
  // @public (undocumented)
@@ -134,10 +135,10 @@ export type DefaultValue = OptionIdentifier | OptionIdentifier[] | Value;
134
135
 
135
136
  // @public (undocumented)
136
137
  export interface Email extends OptionData {
137
- // (undocumented)
138
- suggestion?: boolean;
139
- // (undocumented)
140
- type: 'email';
138
+ // (undocumented)
139
+ suggestion?: boolean;
140
+ // (undocumented)
141
+ type: 'email';
141
142
  }
142
143
 
143
144
  // @public (undocumented)
@@ -151,28 +152,28 @@ export type EmailValidator = (inputText: string) => EmailValidationResponse;
151
152
 
152
153
  // @public (undocumented)
153
154
  export interface ExternalUser extends User {
154
- // (undocumented)
155
- externalUserType?: 'crossSite' | 'thirdParty';
156
- // (undocumented)
157
- hasProductAccess?: boolean;
158
- // (undocumented)
159
- requiresSourceHydration?: boolean;
160
- // (undocumented)
161
- sources: UserSource[];
155
+ // (undocumented)
156
+ externalUserType?: 'crossSite' | 'thirdParty';
157
+ // (undocumented)
158
+ hasProductAccess?: boolean;
159
+ // (undocumented)
160
+ requiresSourceHydration?: boolean;
161
+ // (undocumented)
162
+ sources: UserSource[];
162
163
  }
163
164
 
164
165
  // @public (undocumented)
165
166
  export interface Group extends OptionData {
166
- // (undocumented)
167
- highlight?: GroupHighlight;
168
- // (undocumented)
169
- type: 'group';
167
+ // (undocumented)
168
+ highlight?: GroupHighlight;
169
+ // (undocumented)
170
+ type: 'group';
170
171
  }
171
172
 
172
173
  // @public (undocumented)
173
174
  export interface GroupHighlight {
174
- // (undocumented)
175
- name: HighlightRange[];
175
+ // (undocumented)
176
+ name: HighlightRange[];
176
177
  }
177
178
 
178
179
  // @public (undocumented)
@@ -180,18 +181,14 @@ export const GroupType = 'group';
180
181
 
181
182
  // @public (undocumented)
182
183
  export interface HighlightRange {
183
- // (undocumented)
184
- end: number;
185
- // (undocumented)
186
- start: number;
184
+ // (undocumented)
185
+ end: number;
186
+ // (undocumented)
187
+ start: number;
187
188
  }
188
189
 
189
190
  // @public (undocumented)
190
- export type InputActionTypes =
191
- | 'input-blur'
192
- | 'input-change'
193
- | 'menu-close'
194
- | 'set-value';
191
+ export type InputActionTypes = 'input-blur' | 'input-change' | 'menu-close' | 'set-value';
195
192
 
196
193
  // @public (undocumented)
197
194
  export const isEmail: (option: OptionData) => option is Email;
@@ -210,39 +207,34 @@ export const isValidEmail: EmailValidator;
210
207
 
211
208
  // @public (undocumented)
212
209
  export interface LoadOptions {
213
- // (undocumented)
214
- (searchText?: string, sessionId?: string):
215
- | Iterable<
216
- OptionData | OptionData[] | Promisable<OptionData | OptionData[]>
217
- >
218
- | Promisable<OptionData | OptionData[]>;
210
+ // (undocumented)
211
+ (
212
+ searchText?: string,
213
+ sessionId?: string,
214
+ ):
215
+ | Iterable<OptionData | OptionData[] | Promisable<OptionData | OptionData[]>>
216
+ | Promisable<OptionData | OptionData[]>;
219
217
  }
220
218
 
221
219
  // @public (undocumented)
222
220
  interface LoadUserSource {
223
- // (undocumented)
224
- (accountId: string, signal?: AbortSignal): Promise<UserSourceResult[]>;
221
+ // (undocumented)
222
+ (accountId: string, signal?: AbortSignal): Promise<UserSourceResult[]>;
225
223
  }
226
224
 
227
225
  // @public (undocumented)
228
- type LozengeColor =
229
- | 'default'
230
- | 'inprogress'
231
- | 'moved'
232
- | 'new'
233
- | 'removed'
234
- | 'success';
226
+ type LozengeColor = 'default' | 'inprogress' | 'moved' | 'new' | 'removed' | 'success';
235
227
 
236
228
  // @public (undocumented)
237
229
  export interface LozengeProps {
238
- // (undocumented)
239
- appearance?: LozengeColor;
240
- // (undocumented)
241
- isBold?: boolean;
242
- // (undocumented)
243
- text: string;
244
- // (undocumented)
245
- tooltip?: string;
230
+ // (undocumented)
231
+ appearance?: LozengeColor;
232
+ // (undocumented)
233
+ isBold?: boolean;
234
+ // (undocumented)
235
+ text: string;
236
+ // (undocumented)
237
+ tooltip?: string;
246
238
  }
247
239
 
248
240
  // @public (undocumented)
@@ -253,9 +245,9 @@ export type OnInputChange = (query?: string, sessionId?: string) => void;
253
245
 
254
246
  // @public (undocumented)
255
247
  export type OnOption = (
256
- value: Value,
257
- sessionId?: string,
258
- baseUserPicker?: BaseUserPickerWithoutAnalytics,
248
+ value: Value,
249
+ sessionId?: string,
250
+ baseUserPicker?: BaseUserPickerWithoutAnalytics,
259
251
  ) => void;
260
252
 
261
253
  // @public (undocumented)
@@ -263,29 +255,29 @@ export type OnPicker = (sessionId?: string) => void;
263
255
 
264
256
  // @public (undocumented)
265
257
  type Option_2<Data = OptionData> = {
266
- data: Data;
267
- isDisabled?: boolean;
268
- label: string;
269
- value: string;
258
+ data: Data;
259
+ isDisabled?: boolean;
260
+ label: string;
261
+ value: string;
270
262
  };
271
263
  export { Option_2 as Option };
272
264
 
273
265
  // @public (undocumented)
274
266
  export interface OptionData {
275
- // (undocumented)
276
- avatarUrl?: any;
277
- // (undocumented)
278
- fixed?: boolean;
279
- // (undocumented)
280
- id: string;
281
- // (undocumented)
282
- isDisabled?: boolean;
283
- // (undocumented)
284
- lozenge?: LozengeProps | ReactNode | string;
285
- // (undocumented)
286
- name: string;
287
- // (undocumented)
288
- type?: 'custom' | 'email' | 'group' | 'team' | 'user';
267
+ // (undocumented)
268
+ avatarUrl?: any;
269
+ // (undocumented)
270
+ fixed?: boolean;
271
+ // (undocumented)
272
+ id: string;
273
+ // (undocumented)
274
+ isDisabled?: boolean;
275
+ // (undocumented)
276
+ lozenge?: LozengeProps | ReactNode | string;
277
+ // (undocumented)
278
+ name: string;
279
+ // (undocumented)
280
+ type?: 'custom' | 'email' | 'group' | 'team' | 'user';
289
281
  }
290
282
 
291
283
  // @public (undocumented)
@@ -293,101 +285,101 @@ export type OptionIdentifier = Pick<OptionData, 'id' | 'isDisabled' | 'type'>;
293
285
 
294
286
  // @public (undocumented)
295
287
  export const PopupUserPicker: React_2.ForwardRefExoticComponent<
296
- Pick<
297
- Omit<PopupUserPickerProps, keyof WithAnalyticsEventsProps>,
298
- | 'addMoreMessage'
299
- | 'allowEmail'
300
- | 'anchor'
301
- | 'appearance'
302
- | 'ariaLabel'
303
- | 'ariaLabelledBy'
304
- | 'ariaLive'
305
- | 'autoFocus'
306
- | 'captureMenuScroll'
307
- | 'clearValueLabel'
308
- | 'closeMenuOnScroll'
309
- | 'defaultValue'
310
- | 'disableInput'
311
- | 'emailLabel'
312
- | 'fieldId'
313
- | 'footer'
314
- | 'header'
315
- | 'inputId'
316
- | 'isClearable'
317
- | 'isDisabled'
318
- | 'isLoading'
319
- | 'isValidEmail'
320
- | 'loadOptions'
321
- | 'loadOptionsErrorMessage'
322
- | 'loadUserSource'
323
- | 'maxOptions'
324
- | 'maxPickerHeight'
325
- | 'menuMinWidth'
326
- | 'menuPortalTarget'
327
- | 'menuPosition'
328
- | 'menuShouldBlockScroll'
329
- | 'name'
330
- | 'noBorder'
331
- | 'noOptionsMessage'
332
- | 'onBlur'
333
- | 'onChange'
334
- | 'onClear'
335
- | 'onClose'
336
- | 'onFocus'
337
- | 'onInputChange'
338
- | 'onKeyDown'
339
- | 'onOpen'
340
- | 'onSelection'
341
- | 'open'
342
- | 'options'
343
- | 'placeholder'
344
- | 'popupTitle'
345
- | 'search'
346
- | 'styles'
347
- | 'subtle'
348
- | 'suggestEmailsForDomain'
349
- | 'target'
350
- | 'textFieldBackgroundColor'
351
- | 'value'
352
- > &
353
- Partial<
354
- Pick<
355
- Omit<PopupUserPickerProps, keyof WithAnalyticsEventsProps>,
356
- | 'boundariesElement'
357
- | 'isMulti'
358
- | 'offset'
359
- | 'placement'
360
- | 'rootBoundary'
361
- | 'shouldFlip'
362
- | 'width'
363
- >
364
- > &
365
- Partial<
366
- Pick<
367
- {
368
- boundariesElement: string;
369
- width: number;
370
- isMulti: boolean;
371
- offset: number[];
372
- placement: string;
373
- rootBoundary: string;
374
- shouldFlip: boolean;
375
- },
376
- never
377
- >
378
- > &
379
- React_2.RefAttributes<any>
288
+ Pick<
289
+ Omit<PopupUserPickerProps, keyof WithAnalyticsEventsProps>,
290
+ | 'addMoreMessage'
291
+ | 'allowEmail'
292
+ | 'anchor'
293
+ | 'appearance'
294
+ | 'ariaLabel'
295
+ | 'ariaLabelledBy'
296
+ | 'ariaLive'
297
+ | 'autoFocus'
298
+ | 'captureMenuScroll'
299
+ | 'clearValueLabel'
300
+ | 'closeMenuOnScroll'
301
+ | 'defaultValue'
302
+ | 'disableInput'
303
+ | 'emailLabel'
304
+ | 'fieldId'
305
+ | 'footer'
306
+ | 'header'
307
+ | 'inputId'
308
+ | 'isClearable'
309
+ | 'isDisabled'
310
+ | 'isLoading'
311
+ | 'isValidEmail'
312
+ | 'loadOptions'
313
+ | 'loadOptionsErrorMessage'
314
+ | 'loadUserSource'
315
+ | 'maxOptions'
316
+ | 'maxPickerHeight'
317
+ | 'menuMinWidth'
318
+ | 'menuPortalTarget'
319
+ | 'menuPosition'
320
+ | 'menuShouldBlockScroll'
321
+ | 'name'
322
+ | 'noBorder'
323
+ | 'noOptionsMessage'
324
+ | 'onBlur'
325
+ | 'onChange'
326
+ | 'onClear'
327
+ | 'onClose'
328
+ | 'onFocus'
329
+ | 'onInputChange'
330
+ | 'onKeyDown'
331
+ | 'onOpen'
332
+ | 'onSelection'
333
+ | 'open'
334
+ | 'options'
335
+ | 'placeholder'
336
+ | 'popupTitle'
337
+ | 'search'
338
+ | 'styles'
339
+ | 'subtle'
340
+ | 'suggestEmailsForDomain'
341
+ | 'target'
342
+ | 'textFieldBackgroundColor'
343
+ | 'value'
344
+ > &
345
+ Partial<
346
+ Pick<
347
+ Omit<PopupUserPickerProps, keyof WithAnalyticsEventsProps>,
348
+ | 'boundariesElement'
349
+ | 'isMulti'
350
+ | 'offset'
351
+ | 'placement'
352
+ | 'rootBoundary'
353
+ | 'shouldFlip'
354
+ | 'width'
355
+ >
356
+ > &
357
+ Partial<
358
+ Pick<
359
+ {
360
+ boundariesElement: string;
361
+ width: number;
362
+ isMulti: boolean;
363
+ offset: number[];
364
+ placement: string;
365
+ rootBoundary: string;
366
+ shouldFlip: boolean;
367
+ },
368
+ never
369
+ >
370
+ > &
371
+ React_2.RefAttributes<any>
380
372
  >;
381
373
 
382
374
  // @public (undocumented)
383
375
  export type PopupUserPickerProps = UserPickerProps & {
384
- target: Target;
385
- popupTitle?: string;
386
- boundariesElement?: BoundariesElement;
387
- offset?: [number, number];
388
- placement?: Placement;
389
- rootBoundary?: RootBoundary;
390
- shouldFlip?: boolean;
376
+ target: Target;
377
+ popupTitle?: string;
378
+ boundariesElement?: BoundariesElement;
379
+ offset?: [number, number];
380
+ placement?: Placement;
381
+ rootBoundary?: RootBoundary;
382
+ shouldFlip?: boolean;
391
383
  };
392
384
 
393
385
  // @public (undocumented)
@@ -401,38 +393,38 @@ export type Target = (options: { ref: any; isOpen: boolean }) => ReactNode;
401
393
 
402
394
  // @public (undocumented)
403
395
  export interface Team extends OptionData {
404
- // (undocumented)
405
- avatarUrl?: string;
406
- // (undocumented)
407
- byline?: string;
408
- // (undocumented)
409
- description?: string;
410
- // (undocumented)
411
- highlight?: TeamHighlight;
412
- // (undocumented)
413
- includesYou?: boolean;
414
- // (undocumented)
415
- memberCount?: number;
416
- // (undocumented)
417
- members?: TeamMember[];
418
- // (undocumented)
419
- type: 'team';
396
+ // (undocumented)
397
+ avatarUrl?: string;
398
+ // (undocumented)
399
+ byline?: string;
400
+ // (undocumented)
401
+ description?: string;
402
+ // (undocumented)
403
+ highlight?: TeamHighlight;
404
+ // (undocumented)
405
+ includesYou?: boolean;
406
+ // (undocumented)
407
+ memberCount?: number;
408
+ // (undocumented)
409
+ members?: TeamMember[];
410
+ // (undocumented)
411
+ type: 'team';
420
412
  }
421
413
 
422
414
  // @public (undocumented)
423
415
  export interface TeamHighlight {
424
- // (undocumented)
425
- description?: HighlightRange[];
426
- // (undocumented)
427
- name: HighlightRange[];
416
+ // (undocumented)
417
+ description?: HighlightRange[];
418
+ // (undocumented)
419
+ name: HighlightRange[];
428
420
  }
429
421
 
430
422
  // @public (undocumented)
431
423
  export interface TeamMember {
432
- // (undocumented)
433
- id: string;
434
- // (undocumented)
435
- name: string;
424
+ // (undocumented)
425
+ id: string;
426
+ // (undocumented)
427
+ name: string;
436
428
  }
437
429
 
438
430
  // @public (undocumented)
@@ -440,197 +432,192 @@ export const TeamType = 'team';
440
432
 
441
433
  // @public (undocumented)
442
434
  export interface User extends OptionData {
443
- // (undocumented)
444
- avatarUrl?: string;
445
- // (undocumented)
446
- byline?: string;
447
- // (undocumented)
448
- email?: string;
449
- // (undocumented)
450
- highlight?: UserHighlight;
451
- // (undocumented)
452
- isExternal?: boolean;
453
- // (undocumented)
454
- publicName?: string;
455
- // (undocumented)
456
- type?: 'user';
435
+ // (undocumented)
436
+ avatarUrl?: string;
437
+ // (undocumented)
438
+ byline?: string;
439
+ // (undocumented)
440
+ email?: string;
441
+ // (undocumented)
442
+ highlight?: UserHighlight;
443
+ // (undocumented)
444
+ isExternal?: boolean;
445
+ // (undocumented)
446
+ publicName?: string;
447
+ // (undocumented)
448
+ type?: 'user';
457
449
  }
458
450
 
459
451
  // @public (undocumented)
460
452
  export interface UserHighlight {
461
- // (undocumented)
462
- name: HighlightRange[];
463
- // (undocumented)
464
- publicName: HighlightRange[];
453
+ // (undocumented)
454
+ name: HighlightRange[];
455
+ // (undocumented)
456
+ publicName: HighlightRange[];
465
457
  }
466
458
 
467
459
  // @public (undocumented)
468
460
  const UserPicker: React_2.ForwardRefExoticComponent<
469
- Pick<
470
- Omit<UserPickerProps, keyof WithAnalyticsEventsProps>,
471
- | 'addMoreMessage'
472
- | 'allowEmail'
473
- | 'anchor'
474
- | 'appearance'
475
- | 'ariaLabel'
476
- | 'ariaLabelledBy'
477
- | 'ariaLive'
478
- | 'autoFocus'
479
- | 'captureMenuScroll'
480
- | 'clearValueLabel'
481
- | 'closeMenuOnScroll'
482
- | 'defaultValue'
483
- | 'disableInput'
484
- | 'emailLabel'
485
- | 'fieldId'
486
- | 'footer'
487
- | 'header'
488
- | 'inputId'
489
- | 'isClearable'
490
- | 'isDisabled'
491
- | 'isLoading'
492
- | 'isValidEmail'
493
- | 'loadOptions'
494
- | 'loadOptionsErrorMessage'
495
- | 'loadUserSource'
496
- | 'maxOptions'
497
- | 'maxPickerHeight'
498
- | 'menuMinWidth'
499
- | 'menuPortalTarget'
500
- | 'menuPosition'
501
- | 'menuShouldBlockScroll'
502
- | 'name'
503
- | 'noBorder'
504
- | 'noOptionsMessage'
505
- | 'onBlur'
506
- | 'onChange'
507
- | 'onClear'
508
- | 'onClose'
509
- | 'onFocus'
510
- | 'onInputChange'
511
- | 'onKeyDown'
512
- | 'onOpen'
513
- | 'onSelection'
514
- | 'open'
515
- | 'options'
516
- | 'placeholder'
517
- | 'search'
518
- | 'styles'
519
- | 'subtle'
520
- | 'suggestEmailsForDomain'
521
- | 'textFieldBackgroundColor'
522
- | 'value'
523
- > &
524
- Partial<
525
- Pick<
526
- Omit<UserPickerProps, keyof WithAnalyticsEventsProps>,
527
- 'isMulti' | 'width'
528
- >
529
- > &
530
- Partial<
531
- Pick<
532
- {
533
- width: number;
534
- isMulti: boolean;
535
- },
536
- never
537
- >
538
- > &
539
- React_2.RefAttributes<any>
461
+ Pick<
462
+ Omit<UserPickerProps, keyof WithAnalyticsEventsProps>,
463
+ | 'addMoreMessage'
464
+ | 'allowEmail'
465
+ | 'anchor'
466
+ | 'appearance'
467
+ | 'ariaLabel'
468
+ | 'ariaLabelledBy'
469
+ | 'ariaLive'
470
+ | 'autoFocus'
471
+ | 'captureMenuScroll'
472
+ | 'clearValueLabel'
473
+ | 'closeMenuOnScroll'
474
+ | 'defaultValue'
475
+ | 'disableInput'
476
+ | 'emailLabel'
477
+ | 'fieldId'
478
+ | 'footer'
479
+ | 'header'
480
+ | 'inputId'
481
+ | 'isClearable'
482
+ | 'isDisabled'
483
+ | 'isLoading'
484
+ | 'isValidEmail'
485
+ | 'loadOptions'
486
+ | 'loadOptionsErrorMessage'
487
+ | 'loadUserSource'
488
+ | 'maxOptions'
489
+ | 'maxPickerHeight'
490
+ | 'menuMinWidth'
491
+ | 'menuPortalTarget'
492
+ | 'menuPosition'
493
+ | 'menuShouldBlockScroll'
494
+ | 'name'
495
+ | 'noBorder'
496
+ | 'noOptionsMessage'
497
+ | 'onBlur'
498
+ | 'onChange'
499
+ | 'onClear'
500
+ | 'onClose'
501
+ | 'onFocus'
502
+ | 'onInputChange'
503
+ | 'onKeyDown'
504
+ | 'onOpen'
505
+ | 'onSelection'
506
+ | 'open'
507
+ | 'options'
508
+ | 'placeholder'
509
+ | 'search'
510
+ | 'styles'
511
+ | 'subtle'
512
+ | 'suggestEmailsForDomain'
513
+ | 'textFieldBackgroundColor'
514
+ | 'value'
515
+ > &
516
+ Partial<Pick<Omit<UserPickerProps, keyof WithAnalyticsEventsProps>, 'isMulti' | 'width'>> &
517
+ Partial<
518
+ Pick<
519
+ {
520
+ width: number;
521
+ isMulti: boolean;
522
+ },
523
+ never
524
+ >
525
+ > &
526
+ React_2.RefAttributes<any>
540
527
  >;
541
528
  export default UserPicker;
542
529
 
543
530
  // @public (undocumented)
544
531
  export type UserPickerProps = WithAnalyticsEventsProps & {
545
- fieldId: null | string;
546
- options?: OptionData[];
547
- width?: number | string;
548
- menuMinWidth?: number;
549
- maxPickerHeight?: number;
550
- textFieldBackgroundColor?: boolean;
551
- loadOptions?: LoadOptions;
552
- loadOptionsErrorMessage?: (value: { inputValue: string }) => string;
553
- loadUserSource?: LoadUserSource;
554
- onChange?: OnChange;
555
- isMulti?: boolean;
556
- search?: string;
557
- anchor?: React_2.ComponentType<any>;
558
- open?: boolean;
559
- isLoading?: boolean;
560
- onInputChange?: OnInputChange;
561
- onSelection?: OnOption;
562
- onFocus?: OnPicker;
563
- onBlur?: OnPicker;
564
- onClear?: OnPicker;
565
- onOpen?: OnPicker;
566
- onClose?: OnPicker;
567
- onKeyDown?: (event: React_2.KeyboardEvent) => void;
568
- appearance?: Appearance;
569
- subtle?: boolean;
570
- noBorder?: boolean;
571
- styles?: StylesConfig;
572
- defaultValue?: DefaultValue;
573
- placeholder?: React_2.ReactNode;
574
- addMoreMessage?: string;
575
- noOptionsMessage?:
576
- | ((value: { inputValue: string }) => React_2.ReactNode | null | string)
577
- | React_2.ReactNode
578
- | null;
579
- footer?: React_2.ReactNode;
580
- value?: Value;
581
- isDisabled?: boolean;
582
- isClearable?: boolean;
583
- clearValueLabel?: string;
584
- menuPosition?: 'absolute' | 'fixed';
585
- captureMenuScroll?: boolean;
586
- menuPortalTarget?: HTMLElement;
587
- allowEmail?: boolean;
588
- suggestEmailsForDomain?: string;
589
- emailLabel?: string;
590
- disableInput?: boolean;
591
- isValidEmail?: EmailValidator;
592
- autoFocus?: boolean;
593
- maxOptions?: number;
594
- inputId?: string;
595
- closeMenuOnScroll?: EventListener | boolean;
596
- menuShouldBlockScroll?: boolean;
597
- ariaLabel?: string;
598
- ariaLabelledBy?: string;
599
- ariaLive?: 'assertive' | 'off' | 'polite';
600
- name?: string;
601
- header?: React_2.ReactNode;
532
+ fieldId: null | string;
533
+ options?: OptionData[];
534
+ width?: number | string;
535
+ menuMinWidth?: number;
536
+ maxPickerHeight?: number;
537
+ textFieldBackgroundColor?: boolean;
538
+ loadOptions?: LoadOptions;
539
+ loadOptionsErrorMessage?: (value: { inputValue: string }) => string;
540
+ loadUserSource?: LoadUserSource;
541
+ onChange?: OnChange;
542
+ isMulti?: boolean;
543
+ search?: string;
544
+ anchor?: React_2.ComponentType<any>;
545
+ open?: boolean;
546
+ isLoading?: boolean;
547
+ onInputChange?: OnInputChange;
548
+ onSelection?: OnOption;
549
+ onFocus?: OnPicker;
550
+ onBlur?: OnPicker;
551
+ onClear?: OnPicker;
552
+ onOpen?: OnPicker;
553
+ onClose?: OnPicker;
554
+ onKeyDown?: (event: React_2.KeyboardEvent) => void;
555
+ appearance?: Appearance;
556
+ subtle?: boolean;
557
+ noBorder?: boolean;
558
+ styles?: StylesConfig;
559
+ defaultValue?: DefaultValue;
560
+ placeholder?: React_2.ReactNode;
561
+ addMoreMessage?: string;
562
+ noOptionsMessage?:
563
+ | ((value: { inputValue: string }) => React_2.ReactNode | null | string)
564
+ | React_2.ReactNode
565
+ | null;
566
+ footer?: React_2.ReactNode;
567
+ value?: Value;
568
+ isDisabled?: boolean;
569
+ isClearable?: boolean;
570
+ clearValueLabel?: string;
571
+ menuPosition?: 'absolute' | 'fixed';
572
+ captureMenuScroll?: boolean;
573
+ menuPortalTarget?: HTMLElement;
574
+ allowEmail?: boolean;
575
+ suggestEmailsForDomain?: string;
576
+ emailLabel?: string;
577
+ disableInput?: boolean;
578
+ isValidEmail?: EmailValidator;
579
+ autoFocus?: boolean;
580
+ maxOptions?: number;
581
+ inputId?: string;
582
+ closeMenuOnScroll?: EventListener | boolean;
583
+ menuShouldBlockScroll?: boolean;
584
+ ariaLabel?: string;
585
+ ariaLabelledBy?: string;
586
+ ariaLive?: 'assertive' | 'off' | 'polite';
587
+ name?: string;
588
+ header?: React_2.ReactNode;
602
589
  };
603
590
 
604
591
  // @public (undocumented)
605
592
  export type UserPickerState = {
606
- options: OptionData[];
607
- value?: AtlaskitSelectValue;
608
- isDefaultSet: boolean;
609
- inflightRequest: number;
610
- count: number;
611
- hoveringClearIndicator: boolean;
612
- menuIsOpen: boolean;
613
- inputValue: string;
614
- resolving: boolean;
615
- showError: boolean;
593
+ options: OptionData[];
594
+ value?: AtlaskitSelectValue;
595
+ isDefaultSet: boolean;
596
+ inflightRequest: number;
597
+ count: number;
598
+ hoveringClearIndicator: boolean;
599
+ menuIsOpen: boolean;
600
+ inputValue: string;
601
+ resolving: boolean;
602
+ showError: boolean;
616
603
  };
617
604
 
618
605
  // @public (undocumented)
619
606
  export type UserSource =
620
- | 'confluence'
621
- | 'github'
622
- | 'google'
623
- | 'jira'
624
- | 'microsoft'
625
- | 'other-atlassian'
626
- | 'slack';
607
+ | 'confluence'
608
+ | 'github'
609
+ | 'google'
610
+ | 'jira'
611
+ | 'microsoft'
612
+ | 'other-atlassian'
613
+ | 'slack';
627
614
 
628
615
  // @public (undocumented)
629
616
  interface UserSourceResult {
630
- // (undocumented)
631
- sourceId: string;
632
- // (undocumented)
633
- sourceType: UserSource;
617
+ // (undocumented)
618
+ sourceId: string;
619
+ // (undocumented)
620
+ sourceType: UserSource;
634
621
  }
635
622
 
636
623
  // @public (undocumented)
@@ -650,9 +637,9 @@ export type Value = OptionData | OptionData[] | null | undefined;
650
637
 
651
638
  ```json
652
639
  {
653
- "react": "^16.8.0",
654
- "react-dom": "^16.8.0",
655
- "react-intl-next": "npm:react-intl@^5.18.1"
640
+ "react": "^16.8.0",
641
+ "react-dom": "^16.8.0",
642
+ "react-intl-next": "npm:react-intl@^5.18.1"
656
643
  }
657
644
  ```
658
645