@atlaskit/mention 21.0.8 → 21.0.9

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/report.api.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
4
 
5
+ <!--
6
+ Generated API Report version: 2.0
7
+ -->
8
+
9
+ [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
10
+
5
11
  ```ts
6
12
  import { IntlShape } from 'react-intl-next';
7
13
  import { default as React_2 } from 'react';
@@ -12,20 +18,17 @@ import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
12
18
  import { WithAnalyticsEventsProps as WithAnalyticsEventsProps_2 } from '@atlaskit/analytics-next/withAnalyticsEvents';
13
19
  import { WithIntlProps } from 'react-intl-next';
14
20
 
15
- export declare class AbstractMentionResource
21
+ // @public (undocumented)
22
+ export class AbstractMentionResource
16
23
  extends AbstractResource<MentionDescription[]>
17
24
  implements MentionProvider {
18
- shouldHighlightMention(_mention: MentionDescription): boolean;
25
+ // (undocumented)
19
26
  filter(query?: string): void;
20
- recordMentionSelection(_mention: MentionDescription): void;
27
+ // (undocumented)
21
28
  isFiltering(_query: string): boolean;
22
- protected _notifyListeners(
23
- mentionsResult: MentionsResult,
24
- stats?: MentionStats,
25
- ): void;
29
+ // (undocumented)
26
30
  protected _notifyAllResultsListeners(mentionsResult: MentionsResult): void;
27
- protected _notifyErrorListeners(error: Error, query?: string): void;
28
- protected _notifyInfoListeners(info: string): void;
31
+ // (undocumented)
29
32
  protected _notifyAnalyticsListeners(
30
33
  event: string,
31
34
  actionSubject: string,
@@ -34,22 +37,45 @@ export declare class AbstractMentionResource
34
37
  [key: string]: any;
35
38
  },
36
39
  ): void;
40
+ // (undocumented)
41
+ protected _notifyErrorListeners(error: Error, query?: string): void;
42
+ // (undocumented)
43
+ protected _notifyInfoListeners(info: string): void;
44
+ // (undocumented)
45
+ protected _notifyListeners(
46
+ mentionsResult: MentionsResult,
47
+ stats?: MentionStats,
48
+ ): void;
49
+ // (undocumented)
50
+ recordMentionSelection(_mention: MentionDescription): void;
51
+ // (undocumented)
52
+ shouldHighlightMention(_mention: MentionDescription): boolean;
37
53
  }
38
54
 
39
- export declare class AbstractPresenceResource
55
+ // @public (undocumented)
56
+ export class AbstractPresenceResource
40
57
  extends AbstractResource<PresenceMap>
41
58
  implements PresenceProvider {
42
- refreshPresence(userIds: string[]): void;
59
+ // (undocumented)
43
60
  protected notifyListeners(presences: PresenceMap): void;
61
+ // (undocumented)
62
+ refreshPresence(userIds: string[]): void;
44
63
  }
45
64
 
46
- declare class AbstractResource<Result> implements ResourceProvider<Result> {
65
+ // @public (undocumented)
66
+ class AbstractResource<Result> implements ResourceProvider<Result> {
67
+ constructor();
68
+ // (undocumented)
69
+ protected allResultsListeners: Map<string, ResultCallback<Result>>;
70
+ // (undocumented)
71
+ protected analyticsListeners: Map<string, AnalyticsCallback>;
72
+ // (undocumented)
47
73
  protected changeListeners: Map<string, ResultCallback<Result>>;
74
+ // (undocumented)
48
75
  protected errListeners: Map<string, ErrorCallback_2>;
76
+ // (undocumented)
49
77
  protected infoListeners: Map<string, InfoCallback>;
50
- protected allResultsListeners: Map<string, ResultCallback<Result>>;
51
- protected analyticsListeners: Map<string, AnalyticsCallback>;
52
- constructor();
78
+ // (undocumented)
53
79
  subscribe(
54
80
  key: string,
55
81
  callback?: ResultCallback<Result>,
@@ -58,10 +84,13 @@ declare class AbstractResource<Result> implements ResourceProvider<Result> {
58
84
  allResultsCallback?: ResultCallback<Result>,
59
85
  analyticsListeners?: AnalyticsCallback,
60
86
  ): void;
87
+ // (undocumented)
61
88
  unsubscribe(key: string): void;
62
89
  }
63
90
 
64
- declare interface AnalyticsCallback {
91
+ // @public (undocumented)
92
+ interface AnalyticsCallback {
93
+ // (undocumented)
65
94
  (
66
95
  event: string,
67
96
  actionSubject: string,
@@ -72,18 +101,14 @@ declare interface AnalyticsCallback {
72
101
  ): void;
73
102
  }
74
103
 
75
- /**
76
- * This component is stateful and should be instantianted per contextIdentifiers.
77
- */
78
- export declare class ContextMentionResource implements MentionProvider {
79
- private mentionProvider;
80
- private contextIdentifier;
104
+ // @public
105
+ export class ContextMentionResource implements MentionProvider {
81
106
  constructor(
82
107
  mentionProvider: MentionProvider,
83
108
  contextIdentifier: MentionContextIdentifier,
84
109
  );
85
- getContextIdentifier(): MentionContextIdentifier | undefined;
86
- callWithContextIds: <
110
+ // (undocumented)
111
+ callDefault: <
87
112
  K extends
88
113
  | 'filter'
89
114
  | 'recordMentionSelection'
@@ -93,9 +118,9 @@ export declare class ContextMentionResource implements MentionProvider {
93
118
  | 'unsubscribe'
94
119
  >(
95
120
  f: K,
96
- declaredArgs: number,
97
121
  ) => MentionProvider[K];
98
- callDefault: <
122
+ // (undocumented)
123
+ callWithContextIds: <
99
124
  K extends
100
125
  | 'filter'
101
126
  | 'recordMentionSelection'
@@ -105,98 +130,120 @@ export declare class ContextMentionResource implements MentionProvider {
105
130
  | 'unsubscribe'
106
131
  >(
107
132
  f: K,
133
+ declaredArgs: number,
108
134
  ) => MentionProvider[K];
109
- subscribe: (
110
- key: string,
111
- callback?: ResultCallback<MentionDescription[]> | undefined,
112
- errCallback?: ErrorCallback_2 | undefined,
113
- infoCallback?: InfoCallback | undefined,
114
- allResultsCallback?: ResultCallback<MentionDescription[]> | undefined,
115
- analyticsCallback?: AnalyticsCallback | undefined,
116
- ) => void;
117
- unsubscribe: (key: string) => void;
135
+ // (undocumented)
118
136
  filter: (
119
137
  query?: string | undefined,
120
138
  contextIdentifier?: MentionContextIdentifier | undefined,
121
139
  ) => void;
140
+ // (undocumented)
141
+ getContextIdentifier(): MentionContextIdentifier | undefined;
142
+ // (undocumented)
143
+ isFiltering: (query: string) => boolean;
144
+ // (undocumented)
122
145
  recordMentionSelection: (
123
146
  mention: MentionDescription,
124
147
  contextIdentifier?: MentionContextIdentifier | undefined,
125
148
  ) => void;
149
+ // (undocumented)
126
150
  shouldHighlightMention: (mention: MentionDescription) => boolean;
127
- isFiltering: (query: string) => boolean;
151
+ // (undocumented)
152
+ subscribe: (
153
+ key: string,
154
+ callback?: ResultCallback<MentionDescription[]> | undefined,
155
+ errCallback?: ErrorCallback_2 | undefined,
156
+ infoCallback?: InfoCallback | undefined,
157
+ allResultsCallback?: ResultCallback<MentionDescription[]> | undefined,
158
+ analyticsCallback?: AnalyticsCallback | undefined,
159
+ ) => void;
160
+ // (undocumented)
161
+ unsubscribe: (key: string) => void;
128
162
  }
129
163
 
130
- declare interface Data {
164
+ // @public (undocumented)
165
+ interface Data {
166
+ // (undocumented)
131
167
  PresenceBulk: PresenceBulk[];
132
168
  }
133
169
 
134
- export declare class DefaultMentionNameResolver implements MentionNameResolver {
135
- static waitForBatch: number;
136
- private client;
137
- private nameCache;
138
- private nameQueue;
139
- private nameStartTime;
140
- private processingQueue;
141
- private debounce;
142
- private fireHydrationEvent;
170
+ // @public (undocumented)
171
+ export class DefaultMentionNameResolver implements MentionNameResolver {
143
172
  constructor(
144
173
  client: MentionNameClient,
145
174
  analyticsProps?: WithAnalyticsEventsProps,
146
175
  );
147
- lookupName(id: string): Promise<MentionNameDetails> | MentionNameDetails;
176
+ // (undocumented)
148
177
  cacheName(id: string, name: string): void;
149
- private scheduleProcessQueue;
150
- private isQueueAtLimit;
151
- private splitQueueAtLimit;
152
- private resolveQueueItem;
153
- private processQueue;
154
- private fireAnalytics;
178
+ // (undocumented)
179
+ lookupName(id: string): Promise<MentionNameDetails> | MentionNameDetails;
180
+ // (undocumented)
181
+ static waitForBatch: number;
155
182
  }
156
183
 
157
- export declare const ELEMENTS_CHANNEL = 'fabric-elements';
184
+ // @public (undocumented)
185
+ export const ELEMENTS_CHANNEL = 'fabric-elements';
158
186
 
159
- declare interface ErrorCallback_2 {
187
+ // @public (undocumented)
188
+ interface ErrorCallback_2 {
189
+ // (undocumented)
160
190
  (error: Error, query?: string): void;
161
191
  }
162
192
 
163
- declare interface Highlight {
164
- name: HighlightDetail[];
193
+ // @public (undocumented)
194
+ interface Highlight {
195
+ // (undocumented)
165
196
  mentionName: HighlightDetail[];
197
+ // (undocumented)
198
+ name: HighlightDetail[];
199
+ // (undocumented)
166
200
  nickname: HighlightDetail[];
167
201
  }
168
202
 
169
- declare interface HighlightDetail {
170
- start: number;
203
+ // @public (undocumented)
204
+ interface HighlightDetail {
205
+ // (undocumented)
171
206
  end: number;
207
+ // (undocumented)
208
+ start: number;
172
209
  }
173
210
 
174
- declare interface InfoCallback {
211
+ // @public (undocumented)
212
+ interface InfoCallback {
213
+ // (undocumented)
175
214
  (info: string): void;
176
215
  }
177
216
 
178
- export declare type InviteExperimentCohort =
179
- | 'variation'
180
- | 'control'
181
- | 'not-enrolled';
217
+ // @public (undocumented)
218
+ export type InviteExperimentCohort = 'variation' | 'control' | 'not-enrolled';
182
219
 
183
- export declare type InviteFlow = 'mention' | 'assign';
220
+ // @public (undocumented)
221
+ export type InviteFlow = 'mention' | 'assign';
184
222
 
185
- declare interface InviteFromMentionProvider {
186
- productName?: string;
187
- shouldEnableInvite?: boolean;
223
+ // @public (undocumented)
224
+ interface InviteFromMentionProvider {
225
+ // (undocumented)
188
226
  inviteExperimentCohort?: InviteExperimentCohort;
227
+ // (undocumented)
189
228
  onInviteItemClick?(flow: InviteFlow): void;
229
+ // (undocumented)
230
+ productName?: string;
231
+ // (undocumented)
232
+ shouldEnableInvite?: boolean;
233
+ // (undocumented)
190
234
  userRole?: UserRole;
191
235
  }
192
236
 
193
- export declare const isResolvingMentionProvider: (
237
+ // @public (undocumented)
238
+ export const isResolvingMentionProvider: (
194
239
  p: any,
195
240
  ) => p is ResolvingMentionProvider;
196
241
 
197
- export declare function isSpecialMention(mention: MentionDescription): boolean;
242
+ // @public (undocumented)
243
+ export function isSpecialMention(mention: MentionDescription): boolean;
198
244
 
199
- declare type LozengeColor =
245
+ // @public (undocumented)
246
+ type LozengeColor =
200
247
  | 'default'
201
248
  | 'success'
202
249
  | 'removed'
@@ -204,174 +251,203 @@ declare type LozengeColor =
204
251
  | 'new'
205
252
  | 'moved';
206
253
 
207
- declare interface LozengeProps {
208
- text: React.ReactNode;
254
+ // @public (undocumented)
255
+ interface LozengeProps {
256
+ // (undocumented)
209
257
  appearance?: LozengeColor;
258
+ // (undocumented)
259
+ text: React.ReactNode;
210
260
  }
211
261
 
212
- export declare const Mention: React_2.ForwardRefExoticComponent<
262
+ // @public (undocumented)
263
+ export const Mention: React_2.ForwardRefExoticComponent<
213
264
  Omit<Props_5, keyof WithAnalyticsEventsProps_2> & React_2.RefAttributes<any>
214
265
  >;
215
266
 
216
- export declare type Mention = MentionInternal;
267
+ // @public (undocumented)
268
+ export type Mention = MentionInternal;
217
269
 
218
- export declare type MentionContextIdentifier = {
270
+ // @public (undocumented)
271
+ export type MentionContextIdentifier = {
219
272
  containerId?: string;
220
273
  objectId?: string;
221
274
  childObjectId?: string;
222
275
  sessionId?: string;
223
276
  };
224
277
 
225
- declare interface MentionDescContext {
226
- members: TeamMember[];
278
+ // @public (undocumented)
279
+ interface MentionDescContext {
280
+ // (undocumented)
227
281
  includesYou: boolean;
282
+ // (undocumented)
228
283
  memberCount: number;
284
+ // (undocumented)
285
+ members: TeamMember[];
286
+ // (undocumented)
229
287
  teamLink: string;
230
288
  }
231
289
 
232
- export declare interface MentionDescription {
233
- id: string;
290
+ // @public (undocumented)
291
+ export interface MentionDescription {
292
+ // (undocumented)
293
+ accessLevel?: string;
294
+ // (undocumented)
234
295
  avatarUrl?: string;
235
- name?: string;
236
- mentionName?: string;
237
- nickname?: string;
296
+ // (undocumented)
297
+ context?: MentionDescContext;
298
+ // (undocumented)
238
299
  highlight?: Highlight;
300
+ // (undocumented)
301
+ id: string;
302
+ // (undocumented)
303
+ inContext?: boolean;
304
+ // (undocumented)
239
305
  lozenge?: string | LozengeProps;
306
+ // (undocumented)
307
+ mentionName?: string;
308
+ // (undocumented)
309
+ name?: string;
310
+ // (undocumented)
311
+ nickname?: string;
312
+ // (undocumented)
240
313
  presence?: Presence;
241
- accessLevel?: string;
242
- inContext?: boolean;
243
- userType?: string;
244
- context?: MentionDescContext;
314
+ // (undocumented)
245
315
  source?: string;
316
+ // (undocumented)
317
+ userType?: string;
246
318
  }
247
319
 
248
- declare type MentionEventHandler = (
320
+ // @public (undocumented)
321
+ type MentionEventHandler = (
249
322
  mentionId: string,
250
323
  text: string,
251
324
  event?: SyntheticEvent<HTMLSpanElement>,
252
325
  ) => void;
253
326
 
254
- declare class MentionInternal extends React_2.PureComponent<Props_5, {}> {
255
- private hoverTimeout?;
327
+ // @public (undocumented)
328
+ class MentionInternal extends React_2.PureComponent<Props_5, {}> {
256
329
  constructor(props: Props_5);
330
+ // (undocumented)
257
331
  componentDidMount(): void;
258
- private handleOnClick;
259
- private handleOnMouseEnter;
260
- private handleOnMouseLeave;
261
- private getMentionType;
332
+ // (undocumented)
262
333
  componentWillUnmount(): void;
263
- renderUnknownUserError(id: string): JSX.Element;
334
+ // (undocumented)
264
335
  render(): JSX.Element;
336
+ // (undocumented)
337
+ renderUnknownUserError(id: string): JSX.Element;
265
338
  }
266
339
 
267
- export declare class MentionItem extends React_2.PureComponent<Props, {}> {
268
- private onMentionSelected;
269
- private onMentionMenuItemMouseMove;
270
- private onMentionMenuItemMouseEnter;
340
+ // @public (undocumented)
341
+ export class MentionItem extends React_2.PureComponent<Props, {}> {
342
+ // (undocumented)
271
343
  render(): JSX.Element;
272
344
  }
273
345
 
274
- export declare class MentionList extends React_2.PureComponent<Props_2, State> {
275
- private lastMousePosition;
276
- private scrollable?;
277
- private items;
346
+ // @public (undocumented)
347
+ export class MentionList extends React_2.PureComponent<Props_2, State> {
278
348
  constructor(props: Props_2);
279
- UNSAFE_componentWillReceiveProps(nextProps: Props_2): void;
280
- componentDidUpdate(): void;
281
- selectNext: () => void;
282
- selectPrevious: () => void;
283
- selectIndex: (index: number, callback?: (() => any) | undefined) => void;
284
- selectId: (id: string, callback?: (() => any) | undefined) => void;
349
+ // (undocumented)
285
350
  chooseCurrentSelection: () => void;
351
+ // (undocumented)
352
+ componentDidUpdate(): void;
353
+ // (undocumented)
286
354
  mentionsCount: () => number;
287
- private revealItem;
288
- /**
289
- * The default selection state is to chose index 0 and not have any particular key selected
290
- */
291
- private setDefaultSelectionState;
292
- private selectIndexOnHover;
293
- private itemSelected;
294
- private renderItems;
295
- private isSelectedMention;
296
- private handleScrollableRef;
355
+ // (undocumented)
297
356
  render(): JSX.Element;
357
+ // (undocumented)
358
+ selectId: (id: string, callback?: (() => any) | undefined) => void;
359
+ // (undocumented)
360
+ selectIndex: (index: number, callback?: (() => any) | undefined) => void;
361
+ // (undocumented)
362
+ selectNext: () => void;
363
+ // (undocumented)
364
+ selectPrevious: () => void;
365
+ // (undocumented)
366
+ UNSAFE_componentWillReceiveProps(nextProps: Props_2): void;
298
367
  }
299
368
 
300
- export declare interface MentionNameClient {
369
+ // @public (undocumented)
370
+ export interface MentionNameClient {
371
+ // (undocumented)
301
372
  getLookupLimit(): number;
373
+ // (undocumented)
302
374
  lookupMentionNames(ids: string[]): Promise<MentionNameDetails[]>;
303
375
  }
304
376
 
305
- export declare interface MentionNameDetails {
377
+ // @public (undocumented)
378
+ export interface MentionNameDetails {
379
+ // (undocumented)
306
380
  id: string;
381
+ // (undocumented)
307
382
  name?: string;
383
+ // (undocumented)
308
384
  status: MentionNameStatus;
309
385
  }
310
386
 
311
- export declare interface MentionNameResolver {
312
- lookupName(id: string): Promise<MentionNameDetails> | MentionNameDetails;
387
+ // @public (undocumented)
388
+ export interface MentionNameResolver {
389
+ // (undocumented)
313
390
  cacheName(id: string, name: string): void;
391
+ // (undocumented)
392
+ lookupName(id: string): Promise<MentionNameDetails> | MentionNameDetails;
314
393
  }
315
394
 
316
- export declare enum MentionNameStatus {
317
- UNKNOWN = 0,
318
- SERVICE_ERROR = 1,
395
+ // @public (undocumented)
396
+ export enum MentionNameStatus {
397
+ // (undocumented)
319
398
  OK = 2,
399
+ // (undocumented)
400
+ SERVICE_ERROR = 1,
401
+ // (undocumented)
402
+ UNKNOWN = 0,
320
403
  }
321
404
 
322
- /**
323
- * @class MentionPicker
324
- */
325
- declare class MentionPicker_2 extends React_2.PureComponent<
405
+ // @public
406
+ class MentionPicker_2 extends React_2.PureComponent<
326
407
  Props_4 &
327
408
  WithAnalyticsEventsProps_2 & {
328
409
  intl: IntlShape;
329
410
  },
330
411
  State_3
331
412
  > {
332
- private subscriberKey;
333
- private mentionListRef?;
334
- static defaultProps: {
335
- onSelection: () => void;
336
- onOpen: () => void;
337
- onClose: () => void;
338
- };
339
413
  constructor(
340
414
  props: Props_4 &
341
415
  WithAnalyticsEventsProps_2 & {
342
416
  intl: IntlShape;
343
417
  },
344
418
  );
419
+ // (undocumented)
420
+ chooseCurrentSelection: () => void;
421
+ // (undocumented)
345
422
  componentDidMount(): void;
346
- UNSAFE_componentWillReceiveProps(
347
- nextProps: Props_4 & WithAnalyticsEventsProps_2,
348
- ): void;
423
+ // (undocumented)
349
424
  componentWillUnmount(): void;
350
- selectNext: () => void;
351
- selectPrevious: () => void;
352
- selectIndex: (index: number, callback?: (() => any) | undefined) => void;
353
- selectId: (id: string, callback?: (() => any) | undefined) => void;
354
- chooseCurrentSelection: () => void;
425
+ // (undocumented)
426
+ static defaultProps: {
427
+ onSelection: () => void;
428
+ onOpen: () => void;
429
+ onClose: () => void;
430
+ };
431
+ // (undocumented)
355
432
  mentionsCount: () => number;
356
- private applyPropChanges;
357
- private subscribeResourceProvider;
358
- private unsubscribeResourceProvider;
359
- /**
360
- * Called after the 'visible' state is changed to decide whether the onOpen or onClose
361
- * handlers should be called.
362
- *
363
- * It should be noted that the visible state of the component is not considered in
364
- * this function. Instead the old state and new state should be passed as parameters.
365
- */
366
- private onFilterVisibilityChange;
367
- private filterChange;
368
- private filterError;
369
- private filterInfo;
370
- private handleMentionListRef;
433
+ // (undocumented)
371
434
  render(): JSX.Element;
435
+ // (undocumented)
436
+ selectId: (id: string, callback?: (() => any) | undefined) => void;
437
+ // (undocumented)
438
+ selectIndex: (index: number, callback?: (() => any) | undefined) => void;
439
+ // (undocumented)
440
+ selectNext: () => void;
441
+ // (undocumented)
442
+ selectPrevious: () => void;
443
+ // (undocumented)
444
+ UNSAFE_componentWillReceiveProps(
445
+ nextProps: Props_4 & WithAnalyticsEventsProps_2,
446
+ ): void;
372
447
  }
373
448
 
374
- declare const MentionPickerWithAnalytics: React_2.ForwardRefExoticComponent<
449
+ // @public (undocumented)
450
+ const MentionPickerWithAnalytics: React_2.ForwardRefExoticComponent<
375
451
  Omit<
376
452
  Pick<
377
453
  WithIntlProps<
@@ -390,127 +466,149 @@ declare const MentionPickerWithAnalytics: React_2.ForwardRefExoticComponent<
390
466
  React_2.RefAttributes<any>
391
467
  >;
392
468
 
393
- declare type MentionPickerWithAnalytics = MentionPicker_2;
469
+ // @public (undocumented)
470
+ type MentionPickerWithAnalytics = MentionPicker_2;
394
471
  export { MentionPickerWithAnalytics as MentionPicker };
395
472
  export default MentionPickerWithAnalytics;
396
473
 
397
- export declare interface MentionProvider
474
+ // @public (undocumented)
475
+ export interface MentionProvider
398
476
  extends ResourceProvider<MentionDescription[]>,
399
477
  InviteFromMentionProvider {
478
+ // (undocumented)
400
479
  filter(query?: string, contextIdentifier?: MentionContextIdentifier): void;
480
+ // (undocumented)
481
+ isFiltering(query: string): boolean;
482
+ // (undocumented)
401
483
  recordMentionSelection(
402
484
  mention: MentionDescription,
403
485
  contextIdentifier?: MentionContextIdentifier,
404
486
  ): void;
487
+ // (undocumented)
405
488
  shouldHighlightMention(mention: MentionDescription): boolean;
406
- isFiltering(query: string): boolean;
407
489
  }
408
490
 
409
- /**
410
- * Provides a Javascript API
411
- */
412
- export declare class MentionResource
491
+ // @public
492
+ export class MentionResource
413
493
  extends AbstractMentionResource
414
494
  implements ResolvingMentionProvider {
415
- private config;
416
- private lastReturnedSearch;
417
- private activeSearches;
418
- productName?: string;
419
- shouldEnableInvite: boolean;
420
- inviteExperimentCohort?: InviteExperimentCohort;
421
- userRole: UserRole;
422
- onInviteItemClick?: (flow: InviteFlow) => void;
423
495
  constructor(config: MentionResourceConfig);
424
- shouldHighlightMention(mention: MentionDescription): boolean;
496
+ // (undocumented)
497
+ cacheMentionName(id: string, mentionName: string): void;
498
+ // (undocumented)
499
+ filter(
500
+ query?: string,
501
+ contextIdentifier?: MentionContextIdentifier,
502
+ ): Promise<void>;
503
+ // (undocumented)
504
+ inviteExperimentCohort?: InviteExperimentCohort;
505
+ // (undocumented)
506
+ isFiltering(query: string): boolean;
507
+ // (undocumented)
425
508
  notify(
426
509
  searchTime: number,
427
510
  mentionResult: MentionsResult,
428
511
  query?: string,
429
512
  ): void;
513
+ // (undocumented)
430
514
  notifyError(error: Error, query?: string): void;
431
- filter(
432
- query?: string,
515
+ // (undocumented)
516
+ onInviteItemClick?: (flow: InviteFlow) => void;
517
+ // (undocumented)
518
+ productName?: string;
519
+ // (undocumented)
520
+ recordMentionSelection(
521
+ mention: MentionDescription,
433
522
  contextIdentifier?: MentionContextIdentifier,
434
523
  ): Promise<void>;
435
- recordMentionSelection(
524
+ // (undocumented)
525
+ recordSelection(
436
526
  mention: MentionDescription,
437
527
  contextIdentifier?: MentionContextIdentifier,
438
528
  ): Promise<void>;
439
- isFiltering(query: string): boolean;
440
- resolveMentionName(
441
- id: string,
442
- ): Promise<MentionNameDetails> | MentionNameDetails;
443
- cacheMentionName(id: string, mentionName: string): void;
444
- supportsMentionNameResolving(): boolean;
445
- protected updateActiveSearches(query: string): void;
446
- protected verifyMentionConfig(config: MentionResourceConfig): void;
447
- private initialState;
448
- /**
449
- * Clear a context object to generate query params by removing empty
450
- * strings, `undefined` and empty values.
451
- *
452
- * @param contextIdentifier the current context identifier
453
- * @returns a safe context for query encoding
454
- */
455
- private clearContext;
456
- private getQueryParams;
457
- /**
458
- * Returns the initial mention display list before a search is performed for the specified
459
- * container.
460
- *
461
- * @param contextIdentifier
462
- * @returns Promise
463
- */
464
529
  protected remoteInitialState(
465
530
  contextIdentifier?: MentionContextIdentifier,
466
531
  ): Promise<MentionsResult>;
467
- private search;
532
+ // (undocumented)
468
533
  protected remoteSearch(
469
534
  query: string,
470
535
  contextIdentifier?: MentionContextIdentifier,
471
536
  ): Promise<MentionsResult>;
472
- private transformServiceResponse;
473
- recordSelection(
474
- mention: MentionDescription,
475
- contextIdentifier?: MentionContextIdentifier,
476
- ): Promise<void>;
537
+ // (undocumented)
538
+ resolveMentionName(
539
+ id: string,
540
+ ): Promise<MentionNameDetails> | MentionNameDetails;
541
+ // (undocumented)
542
+ shouldEnableInvite: boolean;
543
+ // (undocumented)
544
+ shouldHighlightMention(mention: MentionDescription): boolean;
545
+ // (undocumented)
546
+ supportsMentionNameResolving(): boolean;
547
+ // (undocumented)
548
+ protected updateActiveSearches(query: string): void;
549
+ // (undocumented)
550
+ userRole: UserRole;
551
+ // (undocumented)
552
+ protected verifyMentionConfig(config: MentionResourceConfig): void;
477
553
  }
478
554
 
479
- export declare interface MentionResourceConfig extends ServiceConfig {
555
+ // @public (undocumented)
556
+ export interface MentionResourceConfig extends ServiceConfig {
557
+ // (undocumented)
480
558
  containerId?: string;
481
- productId?: string;
482
- shouldHighlightMention?: (mention: MentionDescription) => boolean;
559
+ // (undocumented)
560
+ debounceTime?: number;
561
+ // (undocumented)
483
562
  inviteExperimentCohort?: InviteExperimentCohort;
563
+ // (undocumented)
484
564
  mentionNameResolver?: MentionNameResolver;
485
- shouldEnableInvite?: boolean;
565
+ // (undocumented)
486
566
  onInviteItemClick?: (flow: InviteFlow) => void;
487
- userRole?: UserRole;
567
+ // (undocumented)
568
+ productId?: string;
569
+ // (undocumented)
488
570
  productName?: string;
489
- debounceTime?: number;
571
+ // (undocumented)
572
+ shouldEnableInvite?: boolean;
573
+ // (undocumented)
574
+ shouldHighlightMention?: (mention: MentionDescription) => boolean;
575
+ // (undocumented)
576
+ userRole?: UserRole;
490
577
  }
491
578
 
492
- export declare interface MentionsResult {
579
+ // @public (undocumented)
580
+ export interface MentionsResult {
581
+ // (undocumented)
493
582
  mentions: MentionDescription[];
583
+ // (undocumented)
494
584
  query: string;
495
585
  }
496
586
 
497
- export declare type MentionStats = {
587
+ // @public (undocumented)
588
+ export type MentionStats = {
498
589
  [key: string]: any;
499
590
  };
500
591
 
501
- declare interface OnClose {
592
+ // @public (undocumented)
593
+ interface OnClose {
594
+ // (undocumented)
502
595
  (): void;
503
596
  }
504
597
 
505
- declare interface OnMentionEvent {
598
+ // @public (undocumented)
599
+ interface OnMentionEvent {
600
+ // (undocumented)
506
601
  (mention: MentionDescription, event?: SyntheticEvent<any>): void;
507
602
  }
508
603
 
509
- declare interface OnOpen {
604
+ // @public (undocumented)
605
+ interface OnOpen {
606
+ // (undocumented)
510
607
  (): void;
511
608
  }
512
609
 
513
- declare type OwnProps = {
610
+ // @public (undocumented)
611
+ type OwnProps = {
514
612
  id: string;
515
613
  text: string;
516
614
  isHighlighted?: boolean;
@@ -521,207 +619,271 @@ declare type OwnProps = {
521
619
  onHover?: () => void;
522
620
  };
523
621
 
524
- declare interface OwnProps_2 {
622
+ // @public (undocumented)
623
+ interface OwnProps_2 {
624
+ // (undocumented)
525
625
  createTeamLink?: string;
526
- /** Callback to track the event where user click on x icon */
527
626
  onClose: () => void;
627
+ // (undocumented)
528
628
  onCreateTeamLinkClick?: () => void;
629
+ // (undocumented)
529
630
  onViewed?: () => void;
530
631
  }
531
632
 
532
- declare type Position = 'above' | 'below' | 'auto';
633
+ // @public (undocumented)
634
+ type Position = 'above' | 'below' | 'auto';
533
635
 
534
- declare interface Presence {
535
- time?: string;
636
+ // @public (undocumented)
637
+ interface Presence {
638
+ // (undocumented)
536
639
  status?: string;
640
+ // (undocumented)
641
+ time?: string;
537
642
  }
538
643
 
539
- declare interface PresenceBulk {
540
- userId: string;
541
- state: null | string;
542
- type: null | string;
644
+ // @public (undocumented)
645
+ interface PresenceBulk {
646
+ // (undocumented)
543
647
  date: null | string;
648
+ // (undocumented)
544
649
  message: null | string;
650
+ // (undocumented)
651
+ state: null | string;
652
+ // (undocumented)
545
653
  stateMetadata?: string;
654
+ // (undocumented)
655
+ type: null | string;
656
+ // (undocumented)
657
+ userId: string;
546
658
  }
547
659
 
548
- declare interface PresenceCache {
660
+ // @public (undocumented)
661
+ interface PresenceCache {
662
+ // (undocumented)
549
663
  contains(userId: string): boolean;
664
+ // (undocumented)
550
665
  get(userId: string): Presence;
666
+ // (undocumented)
551
667
  getBulk(userIds: string[]): PresenceMap;
668
+ // (undocumented)
552
669
  getMissingUserIds(userIds: string[]): string[];
670
+ // (undocumented)
553
671
  update(presUpdate: PresenceMap): void;
554
672
  }
555
673
 
556
- declare interface PresenceMap {
674
+ // @public (undocumented)
675
+ interface PresenceMap {
676
+ // (undocumented)
557
677
  [userId: string]: Presence;
558
678
  }
559
679
 
560
- declare interface PresenceParser {
680
+ // @public (undocumented)
681
+ interface PresenceParser {
682
+ // (undocumented)
561
683
  mapState(state: string): string;
684
+ // (undocumented)
562
685
  parse(response: PresenceResponse): PresenceMap;
563
686
  }
564
687
 
565
- export declare interface PresenceProvider
566
- extends ResourceProvider<PresenceMap> {
688
+ // @public (undocumented)
689
+ export interface PresenceProvider extends ResourceProvider<PresenceMap> {
690
+ // (undocumented)
567
691
  refreshPresence(userIds: string[]): void;
568
692
  }
569
693
 
570
- export declare class PresenceResource extends AbstractPresenceResource {
571
- private config;
572
- private presenceCache;
573
- private presenceParser;
694
+ // @public (undocumented)
695
+ export class PresenceResource extends AbstractPresenceResource {
574
696
  constructor(config: PresenceResourceConfig);
697
+ // (undocumented)
575
698
  refreshPresence(userIds: string[]): void;
576
- private retrievePresence;
577
- private queryDirectoryForPresences;
578
- private static cleanUrl;
579
699
  }
580
700
 
581
- declare interface PresenceResourceConfig {
582
- url: string;
583
- cloudId: string;
584
- productId?: string;
701
+ // @public (undocumented)
702
+ interface PresenceResourceConfig {
703
+ // (undocumented)
585
704
  cache?: PresenceCache;
705
+ // (undocumented)
586
706
  cacheExpiry?: number;
707
+ // (undocumented)
708
+ cloudId: string;
709
+ // (undocumented)
587
710
  parser?: PresenceParser;
711
+ // (undocumented)
712
+ productId?: string;
713
+ // (undocumented)
714
+ url: string;
588
715
  }
589
716
 
590
- declare interface PresenceResponse {
717
+ // @public (undocumented)
718
+ interface PresenceResponse {
719
+ // (undocumented)
591
720
  data: Data;
592
721
  }
593
722
 
594
- declare interface Props {
723
+ // @public (undocumented)
724
+ interface Props {
725
+ // (undocumented)
595
726
  mention: MentionDescription;
596
- selected?: boolean;
597
- onMouseMove?: OnMentionEvent;
727
+ // (undocumented)
598
728
  onMouseEnter?: OnMentionEvent;
729
+ // (undocumented)
730
+ onMouseMove?: OnMentionEvent;
731
+ // (undocumented)
599
732
  onSelection?: OnMentionEvent;
733
+ // (undocumented)
734
+ selected?: boolean;
600
735
  }
601
736
 
602
- declare interface Props_2 {
737
+ // @public (undocumented)
738
+ interface Props_2 {
739
+ // (undocumented)
740
+ initialHighlightElement?: React_2.ReactElement | null;
741
+ // (undocumented)
603
742
  mentions: MentionDescription[];
604
- resourceError?: Error;
743
+ // (undocumented)
605
744
  onSelection?: OnMentionEvent;
606
- initialHighlightElement?: React_2.ReactElement | null;
745
+ // (undocumented)
746
+ resourceError?: Error;
607
747
  }
608
748
 
609
- declare interface Props_3 {
610
- resourceProvider: MentionProvider;
749
+ // @public (undocumented)
750
+ interface Props_3 {
751
+ // (undocumented)
752
+ createTeamPath?: string;
753
+ // (undocumented)
754
+ isTeamMentionHighlightEnabled?: boolean;
755
+ // (undocumented)
756
+ onSelection?: OnMentionEvent;
757
+ // (undocumented)
611
758
  presenceProvider?: PresenceProvider;
759
+ // (undocumented)
612
760
  query?: string;
613
- onSelection?: OnMentionEvent;
761
+ // (undocumented)
614
762
  resourceError?: Error;
615
- isTeamMentionHighlightEnabled?: boolean;
616
- createTeamPath?: string;
763
+ // (undocumented)
764
+ resourceProvider: MentionProvider;
617
765
  }
618
766
 
619
- declare interface Props_4 {
620
- resourceProvider: MentionProvider;
767
+ // @public (undocumented)
768
+ interface Props_4 {
769
+ // (undocumented)
770
+ createTeamPath?: string;
771
+ // (undocumented)
772
+ offsetX?: number;
773
+ // (undocumented)
774
+ offsetY?: number;
775
+ // (undocumented)
776
+ onClose?: OnClose;
777
+ // (undocumented)
778
+ onOpen?: OnOpen;
779
+ // (undocumented)
780
+ onSelection?: OnMentionEvent;
781
+ // (undocumented)
782
+ position?: Position;
783
+ // (undocumented)
621
784
  presenceProvider?: PresenceProvider;
785
+ // (undocumented)
622
786
  query?: string;
623
- onSelection?: OnMentionEvent;
624
- onOpen?: OnOpen;
625
- onClose?: OnClose;
787
+ // (undocumented)
788
+ resourceProvider: MentionProvider;
789
+ // (undocumented)
790
+ showTeamMentionsHighlight?: boolean;
791
+ // (undocumented)
626
792
  target?: string;
627
- position?: Position;
793
+ // (undocumented)
628
794
  zIndex?: number | string;
629
- offsetX?: number;
630
- offsetY?: number;
631
- showTeamMentionsHighlight?: boolean;
632
- createTeamPath?: string;
633
795
  }
634
796
 
635
- declare type Props_5 = OwnProps & WithAnalyticsEventsProps_2;
797
+ // @public (undocumented)
798
+ type Props_5 = OwnProps & WithAnalyticsEventsProps_2;
636
799
 
637
- declare interface Props_6 {
638
- id: string;
639
- text: string;
800
+ // @public (undocumented)
801
+ interface Props_6 {
802
+ // (undocumented)
640
803
  accessLevel?: string;
804
+ // (undocumented)
805
+ id: string;
806
+ // (undocumented)
641
807
  mentionProvider?: Promise<MentionProvider>;
808
+ // (undocumented)
642
809
  onClick?: MentionEventHandler;
810
+ // (undocumented)
643
811
  onMouseEnter?: MentionEventHandler;
812
+ // (undocumented)
644
813
  onMouseLeave?: MentionEventHandler;
814
+ // (undocumented)
815
+ text: string;
645
816
  }
646
817
 
647
- declare type Props_7 = OwnProps_2 & WithAnalyticsEventsProps_2;
818
+ // @public (undocumented)
819
+ type Props_7 = OwnProps_2 & WithAnalyticsEventsProps_2;
648
820
 
649
- /**
650
- * Support
651
- */
652
- export declare interface ResolvingMentionProvider extends MentionProvider {
821
+ // @public
822
+ export interface ResolvingMentionProvider extends MentionProvider {
823
+ // (undocumented)
824
+ cacheMentionName(id: string, mentionName: string): void;
825
+ // (undocumented)
653
826
  resolveMentionName(
654
827
  id: string,
655
828
  ): Promise<MentionNameDetails> | MentionNameDetails;
656
- cacheMentionName(id: string, mentionName: string): void;
829
+ // (undocumented)
657
830
  supportsMentionNameResolving(): boolean;
658
831
  }
659
832
 
660
- export declare class ResourcedMention extends React_2.PureComponent<
661
- Props_6,
662
- State_4
663
- > {
664
- _isMounted: boolean;
833
+ // @public (undocumented)
834
+ export class ResourcedMention extends React_2.PureComponent<Props_6, State_4> {
665
835
  constructor(props: Props_6);
836
+ // (undocumented)
666
837
  componentDidMount(): void;
838
+ // (undocumented)
667
839
  componentWillUnmount(): void;
668
- UNSAFE_componentWillReceiveProps(nextProps: Props_6): void;
669
- private setStateSafely;
670
- private processName;
671
- private handleMentionProvider;
840
+ // (undocumented)
841
+ _isMounted: boolean;
842
+ // (undocumented)
672
843
  render(): JSX.Element;
844
+ // (undocumented)
845
+ UNSAFE_componentWillReceiveProps(nextProps: Props_6): void;
673
846
  }
674
847
 
675
- export declare const ResourcedMentionList: React_2.ForwardRefExoticComponent<
848
+ // @public (undocumented)
849
+ export const ResourcedMentionList: React_2.ForwardRefExoticComponent<
676
850
  Omit<Props_3 & WithAnalyticsEventsProps, keyof WithAnalyticsEventsProps> &
677
851
  React_2.RefAttributes<any>
678
852
  >;
679
853
 
680
- export declare type ResourcedMentionList = ResourcedMentionListWithoutAnalytics;
854
+ // @public (undocumented)
855
+ export type ResourcedMentionList = ResourcedMentionListWithoutAnalytics;
681
856
 
682
- declare class ResourcedMentionListWithoutAnalytics extends React_2.PureComponent<
857
+ // @public (undocumented)
858
+ class ResourcedMentionListWithoutAnalytics extends React_2.PureComponent<
683
859
  Props_3 & WithAnalyticsEventsProps,
684
860
  State_2
685
861
  > {
686
- private subscriberKey;
687
- private mentionListRef?;
688
862
  constructor(props: Props_3 & WithAnalyticsEventsProps);
863
+ // (undocumented)
864
+ chooseCurrentSelection: () => void;
865
+ // (undocumented)
689
866
  componentDidMount(): void;
690
- UNSAFE_componentWillReceiveProps(nextProps: Props_3): void;
867
+ // (undocumented)
691
868
  componentWillUnmount(): void;
692
- selectNext: () => void;
693
- selectPrevious: () => void;
694
- selectIndex: (index: number, callback?: (() => any) | undefined) => void;
695
- selectId: (id: string, callback?: (() => any) | undefined) => void;
696
- chooseCurrentSelection: () => void;
869
+ // (undocumented)
697
870
  mentionsCount: () => number;
698
- private subscribeMentionProvider;
699
- private subscribePresenceProvider;
700
- private unsubscribeMentionProvider;
701
- private unsubscribePresenceProvider;
702
- private applyPropChanges;
703
- private refreshPresences;
704
- private filterChange;
705
- private sendAnalytics;
706
- private filterError;
707
- private presenceUpdate;
708
- private notifySelection;
709
- private handleMentionListRef;
710
- private closeHighlight;
711
- private mentionsHighlight;
871
+ // (undocumented)
712
872
  render(): JSX.Element;
873
+ // (undocumented)
874
+ selectId: (id: string, callback?: (() => any) | undefined) => void;
875
+ // (undocumented)
876
+ selectIndex: (index: number, callback?: (() => any) | undefined) => void;
877
+ // (undocumented)
878
+ selectNext: () => void;
879
+ // (undocumented)
880
+ selectPrevious: () => void;
881
+ // (undocumented)
882
+ UNSAFE_componentWillReceiveProps(nextProps: Props_3): void;
713
883
  }
714
884
 
715
- declare interface ResourceProvider<Result> {
716
- /**
717
- * Subscribe to ResourceProvider results
718
- *
719
- * @param {string} key subscriber key used to unsubscribe
720
- * @param {ResultCallback<Result>} callback This callback only receives latest results
721
- * @param {ErrorCallback} errCallback This callback will errors
722
- * @param {InfoCallback} infoCallback This callback will info
723
- * @param {ResultCallback<Result>} allResultsCallback This callback will receive all results
724
- */
885
+ // @public (undocumented)
886
+ interface ResourceProvider<Result> {
725
887
  subscribe(
726
888
  key: string,
727
889
  callback?: ResultCallback<Result>,
@@ -730,47 +892,63 @@ declare interface ResourceProvider<Result> {
730
892
  allResultsCallback?: ResultCallback<Result>,
731
893
  analyticsCallback?: AnalyticsCallback,
732
894
  ): void;
733
- /**
734
- * Unsubscribe to this resource provider results
735
- * @param {string} key key used when subscribing
736
- */
737
895
  unsubscribe(key: string): void;
738
896
  }
739
897
 
740
- declare interface ResultCallback<T> {
898
+ // @public (undocumented)
899
+ interface ResultCallback<T> {
900
+ // (undocumented)
741
901
  (result: T, query?: string, stats?: MentionStats): void;
742
902
  }
743
903
 
744
- declare interface State {
745
- selectedKey?: string;
904
+ // @public (undocumented)
905
+ interface State {
906
+ // (undocumented)
746
907
  selectedIndex: number;
908
+ // (undocumented)
909
+ selectedKey?: string;
747
910
  }
748
911
 
749
- declare interface State_2 {
750
- resourceError?: Error;
912
+ // @public (undocumented)
913
+ interface State_2 {
914
+ // (undocumented)
751
915
  mentions: MentionDescription[];
916
+ // (undocumented)
917
+ resourceError?: Error;
752
918
  }
753
919
 
754
- declare interface State_3 {
755
- visible: boolean;
920
+ // @public (undocumented)
921
+ interface State_3 {
922
+ // (undocumented)
756
923
  info?: string;
924
+ // (undocumented)
925
+ visible: boolean;
757
926
  }
758
927
 
759
- declare interface State_4 {
928
+ // @public (undocumented)
929
+ interface State_4 {
930
+ // (undocumented)
760
931
  isHighlighted: boolean;
932
+ // (undocumented)
761
933
  resolvedMentionName?: string;
762
934
  }
763
935
 
764
- declare interface State_5 {
936
+ // @public (undocumented)
937
+ interface State_5 {
938
+ // (undocumented)
765
939
  isHighlightHidden: boolean;
766
940
  }
767
941
 
768
- export declare interface TeamMember {
942
+ // @public (undocumented)
943
+ export interface TeamMember {
944
+ // (undocumented)
769
945
  id: string;
946
+ // (undocumented)
770
947
  name: string;
771
948
  }
772
949
 
773
- export declare const TeamMentionHighlight: React_2.ForwardRefExoticComponent<
950
+ // @public (undocumented)
951
+ export const TeamMentionHighlight: React_2.ForwardRefExoticComponent<
774
952
  Pick<
775
953
  Omit<Props_7, keyof WithAnalyticsEventsProps_2>,
776
954
  'onClose' | 'onCreateTeamLinkClick' | 'onViewed'
@@ -789,120 +967,129 @@ export declare const TeamMentionHighlight: React_2.ForwardRefExoticComponent<
789
967
  React_2.RefAttributes<any>
790
968
  >;
791
969
 
792
- export declare type TeamMentionHighlight = TeamMentionHighlightInternal;
970
+ // @public (undocumented)
971
+ export type TeamMentionHighlight = TeamMentionHighlightInternal;
793
972
 
794
- export declare class TeamMentionHighlightController {
795
- private static readFromLocalStorage;
796
- private static saveToLocalStorage;
797
- private static markAsDone;
798
- static isHighlightEnabled: () => boolean;
799
- static registerRender: () => TeamMentionState;
973
+ // @public (undocumented)
974
+ export class TeamMentionHighlightController {
975
+ // (undocumented)
800
976
  static getSeenCount: () => number;
977
+ // (undocumented)
978
+ static isHighlightEnabled: () => boolean;
979
+ // (undocumented)
980
+ static registerClosed: () => void;
981
+ // (undocumented)
801
982
  static registerCreateLinkClick: () => void;
983
+ // (undocumented)
984
+ static registerRender: () => TeamMentionState;
985
+ // (undocumented)
802
986
  static registerTeamMention: () => void;
803
- static registerClosed: () => void;
804
987
  }
805
988
 
806
- declare class TeamMentionHighlightInternal extends React_2.Component<
807
- Props_7,
808
- State_5
809
- > {
810
- elWrapper: RefObject<HTMLDivElement>;
811
- elCloseWrapper: RefObject<HTMLDivElement>;
812
- elCreateTeamWrapper: RefObject<HTMLDivElement>;
813
- static defaultProps: {
814
- createTeamLink: string;
815
- };
989
+ // @public (undocumented)
990
+ class TeamMentionHighlightInternal extends React_2.Component<Props_7, State_5> {
816
991
  constructor(props: Props_7);
992
+ // (undocumented)
817
993
  componentDidMount(): void;
994
+ // (undocumented)
818
995
  componentWillUnmount(): void;
819
- onCreateTeamLinkClick: () => void;
820
- private preventClickOnCard;
821
- private addEventHandler;
822
- private removeEventHandler;
996
+ // (undocumented)
997
+ static defaultProps: {
998
+ createTeamLink: string;
999
+ };
1000
+ // (undocumented)
1001
+ elCloseWrapper: RefObject<HTMLDivElement>;
1002
+ // (undocumented)
1003
+ elCreateTeamWrapper: RefObject<HTMLDivElement>;
1004
+ // (undocumented)
1005
+ elWrapper: RefObject<HTMLDivElement>;
1006
+ // (undocumented)
823
1007
  onCloseClick: () => void;
1008
+ // (undocumented)
1009
+ onCreateTeamLinkClick: () => void;
1010
+ // (undocumented)
824
1011
  render(): JSX.Element | null;
825
1012
  }
826
1013
 
827
- declare interface TeamMentionProvider extends MentionProvider {
828
- mentionTypeaheadHighlightEnabled: () => boolean;
1014
+ // @public (undocumented)
1015
+ interface TeamMentionProvider extends MentionProvider {
1016
+ // (undocumented)
829
1017
  mentionTypeaheadCreateTeamPath: () => string | undefined;
1018
+ // (undocumented)
1019
+ mentionTypeaheadHighlightEnabled: () => boolean;
830
1020
  }
831
1021
 
832
- /**
833
- * Provides a Javascript API to fetch users and teams
834
- * In future we will have a new endpoint to return both users and teams, we can
835
- * remove this class at this point
836
- */
837
- export declare class TeamMentionResource
1022
+ // @public
1023
+ export class TeamMentionResource
838
1024
  extends MentionResource
839
1025
  implements TeamMentionProvider {
840
- private readonly teamMentionConfig;
841
- private lastSearchQuery?;
842
- private lastReturnedSearchTeam;
843
1026
  constructor(
844
1027
  userMentionConfig: MentionResourceConfig,
845
1028
  teamMentionConfig: TeamMentionResourceConfig,
846
1029
  );
1030
+ // (undocumented)
847
1031
  filter(
848
1032
  query?: string,
849
1033
  contextIdentifier?: MentionContextIdentifier,
850
1034
  ): Promise<void>;
851
- mentionTypeaheadHighlightEnabled: () => boolean;
1035
+ // (undocumented)
852
1036
  mentionTypeaheadCreateTeamPath: () => string | undefined;
853
- /**
854
- * Returns the initial mention display list before a search is performed for the specified
855
- * container.
856
- */
857
- private remoteInitialStateTeamAndUsers;
858
- /**
859
- * Both user and team requests are not blocked together
860
- * If users request arrives first, show users. Show teams when team request arrives.
861
- * If team request arrives first, block waiting for user request, then show both
862
- * If one errors, show the non-erroring one
863
- * If both error, show error
864
- */
865
- private handleBothRequests;
1037
+ // (undocumented)
1038
+ mentionTypeaheadHighlightEnabled: () => boolean;
1039
+ // (undocumented)
866
1040
  notify(
867
1041
  searchTime: number,
868
1042
  mentionResult: MentionsResult,
869
1043
  query?: string,
870
1044
  ): void;
871
- private getQueryParamsOfTeamMentionConfig;
872
- private remoteUserSearch;
873
- private remoteTeamSearch;
874
- private convertTeamResultToMentionResult;
875
- private trimTeamARI;
876
1045
  }
877
1046
 
878
- export declare interface TeamMentionResourceConfig
879
- extends MentionResourceConfig {
880
- teamLinkResolver?: (teamId: string) => string;
881
- teamHighlightEnabled?: boolean;
1047
+ // @public (undocumented)
1048
+ export interface TeamMentionResourceConfig extends MentionResourceConfig {
1049
+ // (undocumented)
882
1050
  createTeamPath?: string;
1051
+ // (undocumented)
1052
+ teamHighlightEnabled?: boolean;
1053
+ // (undocumented)
1054
+ teamLinkResolver?: (teamId: string) => string;
883
1055
  }
884
1056
 
885
- declare interface TeamMentionState {
886
- seenCount: number;
1057
+ // @public (undocumented)
1058
+ interface TeamMentionState {
1059
+ // (undocumented)
887
1060
  dontShow: boolean;
1061
+ // (undocumented)
1062
+ seenCount: number;
888
1063
  }
889
1064
 
890
- export declare enum UserAccessLevel {
891
- NONE = 0,
892
- SITE = 1,
1065
+ // @public (undocumented)
1066
+ export enum UserAccessLevel {
1067
+ // (undocumented)
893
1068
  APPLICATION = 2,
1069
+ // (undocumented)
894
1070
  CONTAINER = 3,
1071
+ // (undocumented)
1072
+ NONE = 0,
1073
+ // (undocumented)
1074
+ SITE = 1,
895
1075
  }
896
1076
 
897
- export declare type UserRole = 'admin' | 'trusted' | 'basic';
1077
+ // @public (undocumented)
1078
+ export type UserRole = 'admin' | 'trusted' | 'basic';
898
1079
 
899
- export declare enum UserType {
1080
+ // @public (undocumented)
1081
+ export enum UserType {
1082
+ // (undocumented)
1083
+ APP = 2,
1084
+ // (undocumented)
900
1085
  DEFAULT = 0,
1086
+ // (undocumented)
901
1087
  SPECIAL = 1,
902
- APP = 2,
903
- TEAM = 3,
1088
+ // (undocumented)
904
1089
  SYSTEM = 4,
1090
+ // (undocumented)
1091
+ TEAM = 3,
905
1092
  }
906
1093
 
907
- export {};
1094
+ // (No @packageDocumentation comment for this package)
908
1095
  ```