@atlaskit/smart-user-picker 6.0.2 → 6.0.3

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 (56) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/cjs/version.json +1 -1
  3. package/dist/es2019/version.json +1 -1
  4. package/dist/esm/version.json +1 -1
  5. package/dist/types-ts4.0/analytics.d.ts +21 -0
  6. package/dist/types-ts4.0/components/MessagesIntlProvider.d.ts +9 -0
  7. package/dist/types-ts4.0/components/SmartUserPicker.d.ts +34 -0
  8. package/dist/types-ts4.0/components/index.d.ts +4 -0
  9. package/dist/types-ts4.0/config/index.d.ts +6 -0
  10. package/dist/types-ts4.0/i18n/cs.d.ts +18 -0
  11. package/dist/types-ts4.0/i18n/da.d.ts +18 -0
  12. package/dist/types-ts4.0/i18n/de.d.ts +18 -0
  13. package/dist/types-ts4.0/i18n/en.d.ts +7 -0
  14. package/dist/types-ts4.0/i18n/en_GB.d.ts +7 -0
  15. package/dist/types-ts4.0/i18n/en_ZZ.d.ts +18 -0
  16. package/dist/types-ts4.0/i18n/es.d.ts +18 -0
  17. package/dist/types-ts4.0/i18n/et.d.ts +8 -0
  18. package/dist/types-ts4.0/i18n/fi.d.ts +18 -0
  19. package/dist/types-ts4.0/i18n/fr.d.ts +18 -0
  20. package/dist/types-ts4.0/i18n/hu.d.ts +18 -0
  21. package/dist/types-ts4.0/i18n/index.d.ts +36 -0
  22. package/dist/types-ts4.0/i18n/is.d.ts +7 -0
  23. package/dist/types-ts4.0/i18n/it.d.ts +18 -0
  24. package/dist/types-ts4.0/i18n/ja.d.ts +18 -0
  25. package/dist/types-ts4.0/i18n/ko.d.ts +18 -0
  26. package/dist/types-ts4.0/i18n/languages.d.ts +27 -0
  27. package/dist/types-ts4.0/i18n/nb.d.ts +18 -0
  28. package/dist/types-ts4.0/i18n/nl.d.ts +18 -0
  29. package/dist/types-ts4.0/i18n/pl.d.ts +18 -0
  30. package/dist/types-ts4.0/i18n/pt_BR.d.ts +18 -0
  31. package/dist/types-ts4.0/i18n/pt_PT.d.ts +8 -0
  32. package/dist/types-ts4.0/i18n/ro.d.ts +7 -0
  33. package/dist/types-ts4.0/i18n/ru.d.ts +18 -0
  34. package/dist/types-ts4.0/i18n/sk.d.ts +8 -0
  35. package/dist/types-ts4.0/i18n/sv.d.ts +18 -0
  36. package/dist/types-ts4.0/i18n/th.d.ts +18 -0
  37. package/dist/types-ts4.0/i18n/tr.d.ts +18 -0
  38. package/dist/types-ts4.0/i18n/uk.d.ts +18 -0
  39. package/dist/types-ts4.0/i18n/vi.d.ts +18 -0
  40. package/dist/types-ts4.0/i18n/zh.d.ts +18 -0
  41. package/dist/types-ts4.0/i18n/zh_TW.d.ts +18 -0
  42. package/dist/types-ts4.0/i18n.d.ts +47 -0
  43. package/dist/types-ts4.0/index.d.ts +5 -0
  44. package/dist/types-ts4.0/service/constants.d.ts +4 -0
  45. package/dist/types-ts4.0/service/default-value-hydration-client.d.ts +8 -0
  46. package/dist/types-ts4.0/service/graphqlUtils.d.ts +14 -0
  47. package/dist/types-ts4.0/service/index.d.ts +2 -0
  48. package/dist/types-ts4.0/service/recommendation-client.d.ts +5 -0
  49. package/dist/types-ts4.0/service/teams-client.d.ts +12 -0
  50. package/dist/types-ts4.0/service/users-client.d.ts +11 -0
  51. package/dist/types-ts4.0/service/users-transformer.d.ts +22 -0
  52. package/dist/types-ts4.0/types.d.ts +207 -0
  53. package/dist/types-ts4.0/ufoExperiences.d.ts +11 -0
  54. package/dist/types-ts4.0/util/i18n-util.d.ts +11 -0
  55. package/package.json +10 -3
  56. package/report.api.md +75 -150
package/report.api.md CHANGED
@@ -1,6 +1,10 @@
1
- ## API Report File for "@atlaskit/smart-user-picker".
1
+ ## API Report File for "@atlaskit/smart-user-picker"
2
2
 
3
- > Do not edit this file. This report is auto-generated by [API Extractor](https://api-extractor.com/).
3
+ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
+
5
+ <!--
6
+ Generated API Report version: 2.0
7
+ -->
4
8
 
5
9
  [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
6
10
 
@@ -59,39 +63,40 @@ export { AtlasKitSelectChange };
59
63
 
60
64
  export { AtlaskitSelectValue };
61
65
 
62
- declare interface BitbucketAttributes {
63
- /**
64
- * Identifies whether this is a public repository or not.
65
- */
66
+ // @public (undocumented)
67
+ interface BitbucketAttributes {
68
+ emailDomain?: string;
66
69
  isPublicRepo?: boolean;
67
- /**
68
- * A list of bitbucket workspace Ids used within container result set and noted in analytics.
69
- */
70
70
  workspaceIds?: string[];
71
- /**
72
- * The users current email domain which may be used to boost the results for relevant users.
73
- */
74
- emailDomain?: string;
75
71
  }
76
72
 
77
- declare interface ConfluenceAttributes {
78
- /**
79
- * Identifies whether this user is a confluence guest
80
- */
73
+ // @public (undocumented)
74
+ interface ConfluenceAttributes {
81
75
  isEntitledConfluenceExternalCollaborator?: boolean;
82
76
  }
83
77
 
84
- declare interface Context {
78
+ // @public (undocumented)
79
+ interface Context {
80
+ // (undocumented)
81
+ childObjectId?: string;
82
+ // (undocumented)
85
83
  containerId?: string;
84
+ // (undocumented)
86
85
  contextType: string;
86
+ // (undocumented)
87
87
  objectId?: string;
88
- sessionId?: string;
88
+ // (undocumented)
89
+ organizationId?: string;
90
+ // (undocumented)
89
91
  principalId?: string;
90
- childObjectId?: string;
92
+ // (undocumented)
93
+ productAttributes?: ProductAttributes;
94
+ // (undocumented)
91
95
  productKey: string;
96
+ // (undocumented)
97
+ sessionId?: string;
98
+ // (undocumented)
92
99
  siteId: string;
93
- organizationId?: string;
94
- productAttributes?: ProductAttributes;
95
100
  }
96
101
 
97
102
  export { DefaultValue };
@@ -106,12 +111,11 @@ export { EmailValidator };
106
111
 
107
112
  export { ExternalUser };
108
113
 
109
- declare type FilterOptions = (
110
- options: OptionData[],
111
- query: string,
112
- ) => OptionData[];
114
+ // @public (undocumented)
115
+ type FilterOptions = (options: OptionData[], query: string) => OptionData[];
113
116
 
114
- export declare const getUserRecommendations: (
117
+ // @public (undocumented)
118
+ export const getUserRecommendations: (
115
119
  request: RecommendationRequest,
116
120
  intl: IntlShape,
117
121
  ) => Promise<OptionData[]>;
@@ -124,7 +128,8 @@ export { GroupType };
124
128
 
125
129
  export { HighlightRange };
126
130
 
127
- export declare function hydrateDefaultValues(
131
+ // @public (undocumented)
132
+ export function hydrateDefaultValues(
128
133
  baseUrl: string | undefined,
129
134
  value: DefaultValue,
130
135
  productKey: string,
@@ -146,9 +151,11 @@ export { LozengeProps };
146
151
 
147
152
  export { OnChange };
148
153
 
149
- declare type OnEmpty = (query: string) => Promise<OptionData[]>;
154
+ // @public (undocumented)
155
+ type OnEmpty = (query: string) => Promise<OptionData[]>;
150
156
 
151
- declare type OnError = (
157
+ // @public (undocumented)
158
+ type OnError = (
152
159
  error: any,
153
160
  request: RecommendationRequest,
154
161
  ) => Promise<OptionData[]> | void;
@@ -159,7 +166,8 @@ export { OnOption };
159
166
 
160
167
  export { OnPicker };
161
168
 
162
- declare type OnValueError = (
169
+ // @public (undocumented)
170
+ type OnValueError = (
163
171
  error: any,
164
172
  defaultValue: DefaultValue,
165
173
  ) => Promise<OptionData[]> | void;
@@ -172,167 +180,84 @@ export { OptionIdentifier };
172
180
 
173
181
  export { PopupUserPickerProps };
174
182
 
175
- declare type ProductAttributes = BitbucketAttributes | ConfluenceAttributes;
183
+ // @public (undocumented)
184
+ type ProductAttributes = BitbucketAttributes | ConfluenceAttributes;
176
185
 
177
186
  export { Promisable };
178
187
 
179
- export declare interface Props
188
+ // @public (undocumented)
189
+ export interface Props
180
190
  extends SmartProps,
181
191
  UserPickerProps,
182
192
  WithAnalyticsEventsProps {
183
- /**
184
- * The pre-selected values for the smart user picker. Supports only Users and Teams default value hydration.
185
- * If the `DefaultValue` contains only an `id` and `type` (it conforms to an `OptionIdentifier`)
186
- * then the values will be automatically hydrated.
187
- * If the value has a `name` then it is considered hydrated and will be ignored.
188
- * Uses Confluence and Jira if called from there, else uses Identity or Legion for teams. If a value could not be found, or there was
189
- * a network failure during the hydration, the value will be rendered with the label 'Unknown'. Else, if there were any other error
190
- * during default value hydration, no default values will be rendered, use `onValueError` to handle this.
191
- * `defaultValue` differs from `value` in that it sets the initial value then leaves the component 'uncontrolled'
192
- * whereas setting the `value` prop delegates responsibility for maintaining the value to the caller
193
- * (i.e. listen to `onChange`)
194
- */
195
193
  defaultValue?: DefaultValue;
196
- /**
197
- * Identifier for informing the server on where the user picker has been mounted.
198
- * Unlike User Picker, the fieldId in Smart User Picker is mandatory.
199
- * The server uses the fieldId to determine which model to utilize when
200
- * generating suggestions.
201
- * All fieldId's will be bucketed into a model that provides generic smart results,
202
- * except "assignee", "mentions" which are specifically trained for Jira Assignee and
203
- * @Mentions. For specifically trained models, please contact #help-smart-experiences.
204
- */
205
194
  fieldId: string;
206
195
  }
207
196
 
208
- export declare interface RecommendationRequest {
197
+ // @public (undocumented)
198
+ export interface RecommendationRequest {
199
+ // (undocumented)
209
200
  baseUrl?: string;
201
+ // (undocumented)
210
202
  context: Context;
203
+ // (undocumented)
204
+ includeGroups?: boolean;
205
+ // (undocumented)
206
+ includeTeams?: boolean;
207
+ // (undocumented)
208
+ includeUsers?: boolean;
209
+ // (undocumented)
211
210
  maxNumberOfResults: number;
211
+ // (undocumented)
212
212
  query?: string;
213
+ // (undocumented)
213
214
  searchQueryFilter?: string;
214
- includeUsers?: boolean;
215
- includeGroups?: boolean;
216
- includeTeams?: boolean;
217
215
  }
218
216
 
219
- declare interface SmartProps {
220
- /**
221
- * The base URL of the site eg: hello.atlassian.net
222
- */
217
+ // @public (undocumented)
218
+ interface SmartProps {
223
219
  baseUrl?: string;
224
- /**
225
- * Hydrated user suggestions to show when the query is blank. If not provided, smart user picker
226
- * will still provide a smart-ranked list of suggestions for blank queries. Please refer to @atlaskit/user-picker
227
- * for OptionData type.
228
- */
229
220
  bootstrapOptions?: OptionData[];
230
- /**
231
- * Context information for analytics. Eg: if a user picker was put inside a comment, the childObjectId would be
232
- * the ID of the comment. Optional, but please provide if available.
233
- */
234
221
  childObjectId?: string;
235
- /**
236
- * The container Id to identify context.
237
- *
238
- * e.g. Jira: projectId. Confluence: spaceId. Bitbucket: repositoryId.
239
- */
240
222
  containerId?: string;
241
- /**
242
- * Time to debounce the suggestions fetching (in milliseconds). Defaults to 150ms.
243
- */
244
223
  debounceTime?: number;
245
- /**
246
- * Function to transform options suggested by the server before showing to the user. Can be used to filter out suggestions.
247
- * The results of filterOptions are the results displayed in the suggestions UI.
248
- */
249
224
  filterOptions?: FilterOptions;
250
- /**
251
- * Whether to include groups in the resultset. Only supported for Confluence. @default false
252
- */
253
225
  includeGroups?: boolean;
254
- /**
255
- * Whether to include teams in the resultset. @default false
256
- */
257
226
  includeTeams?: boolean;
258
- /**
259
- * Whether to include users in the resultset. @default true
260
- */
261
227
  includeUsers?: boolean;
262
- /**
263
- * An identifier of the closest context object, e.g. issueId, pageId, pullRequestId.
264
- * Used for analytics. Optional, but please include if available.
265
- */
266
228
  objectId?: string;
267
- /**
268
- * Custom handler to give opportunity for caller to return list of options when server returns empty list.
269
- * this is called if server returns empty list. This will NOT be called if props.filterOptions returns empty list.
270
- */
271
229
  onEmpty?: OnEmpty;
272
- /**
273
- * Error handler for when the server fails to suggest users and returns with an error response.
274
- * `error`: the error.
275
- * `RecommendationRequest`: the original recommendationRequest containing the query and other search parameters.
276
- * This may be used to provide a fail over search direct to the product backend.
277
- * Helper fail over clients exist under /helpers.
278
- * Note that OnError results are filtered.
279
- */
280
230
  onError?: OnError;
281
- /**
282
- * Error handler used to provide OptionData[] values when the server fails to hydrate the `defaultValue` prop's values.
283
- */
284
231
  onValueError?: OnValueError;
285
- /**
286
- * Prefetch the list of suggested assignees before the user picker is focused.
287
- * WARNING: please consider carefully before deciding to prefetch your suggestions
288
- * as this will increase the load on the recommendations services (has caused HOTs).
289
- * Please give #help-smart-experiences a ballpark on the expected request volume.
290
- */
232
+ orgId?: string;
291
233
  prefetch?: boolean;
292
- /**
293
- * Id of the user interacting with the component.
294
- * If principalId is not provided, server will extract principalId from the context header, assuming that the user is logged in
295
- * when making the request. @default “context”
296
- */
297
234
  principalId?: string;
298
- /**
299
- * Product-specific Attributes - you should pass in the attribute type that matches your current SupportedProduct.
300
- * Currently we support additional attributes (BitbucketAttributes) for bitbucket and (ConfluenceAttributes) for Confluence.
301
- */
302
235
  productAttributes?: ProductAttributes;
303
- /**
304
- * Product identifier. If you are an NPF, please ensure your product has been onboarded with
305
- * Cross-product user-search @see https://developer.atlassian.com/cloud/cross-product-user-search/
306
- * If you are still waiting for CPUS, you can use the `people` productKey in the interim.
307
- */
308
236
  productKey: string;
309
- /**
310
- * Filter to be applied to the eventual query to CPUS for user suggestions.
311
- * Example:`account_status:"active" AND (NOT email_domain:"connect.atlassian.com")`
312
- * will remove inactive users from the list of suggestions.
313
- */
314
237
  searchQueryFilter?: string;
315
- /**
316
- * Identifier for the product's tenant, also known as tenantId or cloudId
317
- */
318
238
  siteId: string;
319
- /**
320
- * Identifier for the organization in which to search for teams.
321
- */
322
- orgId?: string;
323
239
  }
324
240
 
325
- declare const SmartUserPickerWithIntlProvider: React_2.FunctionComponent<Props>;
241
+ // @public (undocumented)
242
+ const SmartUserPickerWithIntlProvider: React_2.FunctionComponent<Props>;
326
243
  export default SmartUserPickerWithIntlProvider;
327
244
 
328
- export declare interface State {
329
- users: OptionData[];
330
- loading: boolean;
245
+ // @public (undocumented)
246
+ export interface State {
247
+ // (undocumented)
248
+ bootstrapOptions: OptionData[];
249
+ // (undocumented)
331
250
  closed: boolean;
251
+ // (undocumented)
252
+ defaultValue?: DefaultValue;
253
+ // (undocumented)
254
+ loading: boolean;
255
+ // (undocumented)
332
256
  query: string;
257
+ // (undocumented)
333
258
  sessionId?: string;
334
- defaultValue?: DefaultValue;
335
- bootstrapOptions: OptionData[];
259
+ // (undocumented)
260
+ users: OptionData[];
336
261
  }
337
262
 
338
263
  export { Target };
@@ -359,5 +284,5 @@ export { UserType };
359
284
 
360
285
  export { Value };
361
286
 
362
- export {};
287
+ // (No @packageDocumentation comment for this package)
363
288
  ```