@atlaskit/smart-user-picker 11.5.1 → 11.7.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.
Files changed (92) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/cjs/analytics.js +3 -100
  3. package/dist/cjs/components/SmartUserPicker.js +42 -31
  4. package/dist/cjs/createDefaultSmartPickerAttributes.js +39 -0
  5. package/dist/cjs/createEvent.js +24 -0
  6. package/dist/cjs/createSmartUserPickerEvent.js +17 -0
  7. package/dist/cjs/failedRequestUsersEvent.js +16 -0
  8. package/dist/cjs/failedUserResolversEvent.js +16 -0
  9. package/dist/cjs/filterUsersEvent.js +16 -0
  10. package/dist/cjs/index.js +4 -3
  11. package/dist/cjs/mountedWithPrefetchEvent.js +16 -0
  12. package/dist/cjs/packageName.js +7 -0
  13. package/dist/cjs/packageVersion.js +7 -0
  14. package/dist/cjs/preparedUsersLoadedEvent.js +16 -0
  15. package/dist/cjs/requestUsersEvent.js +16 -0
  16. package/dist/cjs/service/default-value-hydration-client.js +3 -3
  17. package/dist/cjs/service/users-transformer.js +11 -11
  18. package/dist/cjs/startSession.js +20 -0
  19. package/dist/cjs/successfulRequestUsersEvent.js +16 -0
  20. package/dist/cjs/ufoExperiences.js +8 -7
  21. package/dist/cjs/useUFOConcurrentExperience.js +3 -3
  22. package/dist/es2019/analytics.js +2 -95
  23. package/dist/es2019/components/SmartUserPicker.js +19 -6
  24. package/dist/es2019/createDefaultSmartPickerAttributes.js +37 -0
  25. package/dist/es2019/createEvent.js +12 -0
  26. package/dist/es2019/createSmartUserPickerEvent.js +5 -0
  27. package/dist/es2019/failedRequestUsersEvent.js +6 -0
  28. package/dist/es2019/failedUserResolversEvent.js +6 -0
  29. package/dist/es2019/filterUsersEvent.js +6 -0
  30. package/dist/es2019/index.js +2 -1
  31. package/dist/es2019/mountedWithPrefetchEvent.js +6 -0
  32. package/dist/es2019/packageName.js +1 -0
  33. package/dist/es2019/packageVersion.js +1 -0
  34. package/dist/es2019/preparedUsersLoadedEvent.js +6 -0
  35. package/dist/es2019/requestUsersEvent.js +6 -0
  36. package/dist/es2019/service/default-value-hydration-client.js +1 -1
  37. package/dist/es2019/service/users-transformer.js +2 -2
  38. package/dist/es2019/startSession.js +11 -0
  39. package/dist/es2019/successfulRequestUsersEvent.js +6 -0
  40. package/dist/es2019/ufoExperiences.js +2 -1
  41. package/dist/es2019/useUFOConcurrentExperience.js +1 -1
  42. package/dist/esm/analytics.js +2 -100
  43. package/dist/esm/components/SmartUserPicker.js +19 -6
  44. package/dist/esm/createDefaultSmartPickerAttributes.js +33 -0
  45. package/dist/esm/createEvent.js +17 -0
  46. package/dist/esm/createSmartUserPickerEvent.js +10 -0
  47. package/dist/esm/failedRequestUsersEvent.js +9 -0
  48. package/dist/esm/failedUserResolversEvent.js +9 -0
  49. package/dist/esm/filterUsersEvent.js +9 -0
  50. package/dist/esm/index.js +2 -1
  51. package/dist/esm/mountedWithPrefetchEvent.js +9 -0
  52. package/dist/esm/packageName.js +1 -0
  53. package/dist/esm/packageVersion.js +1 -0
  54. package/dist/esm/preparedUsersLoadedEvent.js +9 -0
  55. package/dist/esm/requestUsersEvent.js +9 -0
  56. package/dist/esm/service/default-value-hydration-client.js +1 -1
  57. package/dist/esm/service/users-transformer.js +2 -2
  58. package/dist/esm/startSession.js +13 -0
  59. package/dist/esm/successfulRequestUsersEvent.js +9 -0
  60. package/dist/esm/ufoExperiences.js +2 -1
  61. package/dist/esm/useUFOConcurrentExperience.js +1 -1
  62. package/dist/types/analytics.d.ts +3 -9
  63. package/dist/types/components/SmartUserPicker.d.ts +2 -2
  64. package/dist/types/createDefaultSmartPickerAttributes.d.ts +1 -0
  65. package/dist/types/createEvent.d.ts +2 -0
  66. package/dist/types/createSmartUserPickerEvent.d.ts +2 -0
  67. package/dist/types/failedRequestUsersEvent.d.ts +2 -0
  68. package/dist/types/failedUserResolversEvent.d.ts +2 -0
  69. package/dist/types/filterUsersEvent.d.ts +2 -0
  70. package/dist/types/index.d.ts +2 -1
  71. package/dist/types/mountedWithPrefetchEvent.d.ts +2 -0
  72. package/dist/types/packageName.d.ts +1 -0
  73. package/dist/types/packageVersion.d.ts +1 -0
  74. package/dist/types/preparedUsersLoadedEvent.d.ts +2 -0
  75. package/dist/types/requestUsersEvent.d.ts +2 -0
  76. package/dist/types/service/constants.d.ts +1 -1
  77. package/dist/types/service/default-value-hydration-client.d.ts +1 -1
  78. package/dist/types/service/recommendation-client.d.ts +1 -1
  79. package/dist/types/service/teams-client.d.ts +1 -1
  80. package/dist/types/service/users-client.d.ts +1 -1
  81. package/dist/types/service/users-transformer.d.ts +1 -1
  82. package/dist/types/startSession.d.ts +2 -0
  83. package/dist/types/successfulRequestUsersEvent.d.ts +2 -0
  84. package/dist/types/types.d.ts +2 -2
  85. package/dist/types/ufoExperiences.d.ts +1 -1
  86. package/dist/types/useUFOConcurrentExperience.d.ts +1 -1
  87. package/package.json +13 -9
  88. package/dist/cjs/service/index.js +0 -20
  89. package/dist/es2019/service/index.js +0 -2
  90. package/dist/esm/service/index.js +0 -2
  91. package/dist/types/service/index.d.ts +0 -2
  92. package/report.api.md +0 -301
package/report.api.md DELETED
@@ -1,301 +0,0 @@
1
- <!-- API Report Version: 2.3 -->
2
-
3
- ## API Report File for "@atlaskit/smart-user-picker"
4
-
5
- > Do not edit this file. This report is auto-generated using
6
- > [API Extractor](https://api-extractor.com/).
7
- > [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
8
-
9
- ### Table of contents
10
-
11
- - [Main Entry Types](#main-entry-types)
12
- - [Peer Dependencies](#peer-dependencies)
13
-
14
- ### Main Entry Types
15
-
16
- <!--SECTION START: Main Entry Types-->
17
-
18
- ```ts
19
- import { ActionTypes } from '@atlaskit/user-picker';
20
- import { Appearance } from '@atlaskit/user-picker';
21
- import { AtlasKitSelectChange } from '@atlaskit/user-picker';
22
- import { AtlaskitSelectValue } from '@atlaskit/user-picker';
23
- import { DefaultValue } from '@atlaskit/user-picker';
24
- import { Email } from '@atlaskit/user-picker';
25
- import { EmailType } from '@atlaskit/user-picker';
26
- import { EmailValidationResponse } from '@atlaskit/user-picker';
27
- import { EmailValidator } from '@atlaskit/user-picker';
28
- import { ExternalUser } from '@atlaskit/user-picker';
29
- import { Group } from '@atlaskit/user-picker';
30
- import { GroupHighlight } from '@atlaskit/user-picker';
31
- import { GroupType } from '@atlaskit/user-picker';
32
- import { HighlightRange } from '@atlaskit/user-picker';
33
- import { InputActionTypes } from '@atlaskit/user-picker';
34
- import { IntlShape } from 'react-intl';
35
- import { isEmail } from '@atlaskit/user-picker';
36
- import { isTeam } from '@atlaskit/user-picker';
37
- import { isUser } from '@atlaskit/user-picker';
38
- import { isValidEmail } from '@atlaskit/user-picker';
39
- import { LoadOptions } from '@atlaskit/user-picker';
40
- import { LozengeProps } from '@atlaskit/user-picker';
41
- import { OnChange } from '@atlaskit/user-picker';
42
- import { OnInputChange } from '@atlaskit/user-picker';
43
- import { OnOption } from '@atlaskit/user-picker';
44
- import { OnPicker } from '@atlaskit/user-picker';
45
- import { Option as Option_2 } from '@atlaskit/user-picker';
46
- import { OptionData } from '@atlaskit/user-picker';
47
- import { OptionIdentifier } from '@atlaskit/user-picker';
48
- import { PopupUserPickerProps } from '@atlaskit/user-picker';
49
- import { Promisable } from '@atlaskit/user-picker';
50
- import { default as React_2 } from 'react';
51
- import { Target } from '@atlaskit/user-picker';
52
- import { Team } from '@atlaskit/user-picker';
53
- import { TeamHighlight } from '@atlaskit/user-picker';
54
- import { TeamMember } from '@atlaskit/user-picker';
55
- import { TeamType } from '@atlaskit/user-picker';
56
- import { User } from '@atlaskit/user-picker';
57
- import { UserHighlight } from '@atlaskit/user-picker';
58
- import { UserPickerProps } from '@atlaskit/user-picker';
59
- import { UserPickerState } from '@atlaskit/user-picker';
60
- import { UserSource } from '@atlaskit/user-picker';
61
- import { UserType } from '@atlaskit/user-picker';
62
- import { Value } from '@atlaskit/user-picker';
63
- import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
64
-
65
- export { ActionTypes };
66
-
67
- export { Appearance };
68
-
69
- export { AtlasKitSelectChange };
70
-
71
- export { AtlaskitSelectValue };
72
-
73
- // @public (undocumented)
74
- interface BitbucketAttributes {
75
- emailDomain?: string;
76
- isPublicRepo?: boolean;
77
- workspaceIds?: string[];
78
- }
79
-
80
- // @public (undocumented)
81
- interface ConfluenceAttributes {
82
- isEntitledConfluenceExternalCollaborator?: boolean;
83
- }
84
-
85
- // @public (undocumented)
86
- interface Context {
87
- // (undocumented)
88
- childObjectId?: string;
89
- // (undocumented)
90
- containerId?: string;
91
- // (undocumented)
92
- contextType: string;
93
- // (undocumented)
94
- objectId?: string;
95
- // (undocumented)
96
- organizationId?: string;
97
- // (undocumented)
98
- principalId?: string;
99
- // (undocumented)
100
- productAttributes?: ProductAttributes;
101
- // (undocumented)
102
- productKey: string;
103
- // (undocumented)
104
- sessionId?: string;
105
- // (undocumented)
106
- siteId: string;
107
- }
108
-
109
- export { DefaultValue };
110
-
111
- export { Email };
112
-
113
- export { EmailType };
114
-
115
- export { EmailValidationResponse };
116
-
117
- export { EmailValidator };
118
-
119
- export { ExternalUser };
120
-
121
- // @public (undocumented)
122
- type FilterOptions = (options: OptionData[], query: string) => OptionData[];
123
-
124
- // @public (undocumented)
125
- export const getUserRecommendations: (
126
- request: RecommendationRequest,
127
- intl: IntlShape,
128
- ) => Promise<OptionData[]>;
129
-
130
- export { Group };
131
-
132
- export { GroupHighlight };
133
-
134
- export { GroupType };
135
-
136
- export { HighlightRange };
137
-
138
- // @public (undocumented)
139
- export function hydrateDefaultValues(
140
- baseUrl: string | undefined,
141
- value: DefaultValue,
142
- productKey: string,
143
- ): Promise<DefaultValue>;
144
-
145
- export { InputActionTypes };
146
-
147
- export { isEmail };
148
-
149
- export { isTeam };
150
-
151
- export { isUser };
152
-
153
- export { isValidEmail };
154
-
155
- export { LoadOptions };
156
-
157
- export { LozengeProps };
158
-
159
- export { OnChange };
160
-
161
- // @public (undocumented)
162
- type OnEmpty = (query: string) => Promise<OptionData[]>;
163
-
164
- // @public (undocumented)
165
- type OnError = (error: any, request: RecommendationRequest) => Promise<OptionData[]> | void;
166
-
167
- export { OnInputChange };
168
-
169
- export { OnOption };
170
-
171
- export { OnPicker };
172
-
173
- // @public (undocumented)
174
- type OnValueError = (error: any, defaultValue: DefaultValue) => Promise<OptionData[]> | void;
175
-
176
- export { Option_2 as Option };
177
-
178
- export { OptionData };
179
-
180
- export { OptionIdentifier };
181
-
182
- export { PopupUserPickerProps };
183
-
184
- // @public (undocumented)
185
- type ProductAttributes = BitbucketAttributes | ConfluenceAttributes;
186
-
187
- export { Promisable };
188
-
189
- // @public (undocumented)
190
- export interface Props extends SmartProps, UserPickerProps, WithAnalyticsEventsProps {
191
- defaultValue?: DefaultValue;
192
- fieldId: string;
193
- }
194
-
195
- // @public (undocumented)
196
- export interface RecommendationRequest {
197
- // (undocumented)
198
- baseUrl?: string;
199
- // (undocumented)
200
- context: Context;
201
- // (undocumented)
202
- includeGroups?: boolean;
203
- // (undocumented)
204
- includeTeams?: boolean;
205
- // (undocumented)
206
- includeUsers?: boolean;
207
- // (undocumented)
208
- maxNumberOfResults: number;
209
- // (undocumented)
210
- query?: string;
211
- // (undocumented)
212
- searchQueryFilter?: string;
213
- }
214
-
215
- // @public (undocumented)
216
- interface SmartProps {
217
- baseUrl?: string;
218
- bootstrapOptions?: OptionData[];
219
- childObjectId?: string;
220
- containerId?: string;
221
- debounceTime?: number;
222
- filterOptions?: FilterOptions;
223
- includeGroups?: boolean;
224
- includeTeams?: boolean;
225
- includeUsers?: boolean;
226
- objectId?: string;
227
- onEmpty?: OnEmpty;
228
- onError?: OnError;
229
- onValueError?: OnValueError;
230
- orgId?: string;
231
- prefetch?: boolean;
232
- principalId?: string;
233
- productAttributes?: ProductAttributes;
234
- productKey: string;
235
- searchQueryFilter?: string;
236
- siteId: string;
237
- }
238
-
239
- // @public (undocumented)
240
- const SmartUserPickerWithIntlProvider: React_2.FunctionComponent<Props>;
241
- export default SmartUserPickerWithIntlProvider;
242
-
243
- // @public (undocumented)
244
- export interface State {
245
- // (undocumented)
246
- bootstrapOptions: OptionData[];
247
- // (undocumented)
248
- closed: boolean;
249
- // (undocumented)
250
- defaultValue?: DefaultValue;
251
- // (undocumented)
252
- loading: boolean;
253
- // (undocumented)
254
- query: string;
255
- // (undocumented)
256
- sessionId?: string;
257
- // (undocumented)
258
- users: OptionData[];
259
- }
260
-
261
- export { Target };
262
-
263
- export { Team };
264
-
265
- export { TeamHighlight };
266
-
267
- export { TeamMember };
268
-
269
- export { TeamType };
270
-
271
- export { User };
272
-
273
- export { UserHighlight };
274
-
275
- export { UserPickerProps };
276
-
277
- export { UserPickerState };
278
-
279
- export { UserSource };
280
-
281
- export { UserType };
282
-
283
- export { Value };
284
-
285
- // (No @packageDocumentation comment for this package)
286
- ```
287
-
288
- <!--SECTION END: Main Entry Types-->
289
-
290
- ### Peer Dependencies
291
-
292
- <!--SECTION START: Peer Dependencies-->
293
-
294
- ```json
295
- {
296
- "react": "^16.8.0",
297
- "react-dom": "^16.8.0"
298
- }
299
- ```
300
-
301
- <!--SECTION END: Peer Dependencies-->