@atlaskit/mention 22.1.9 → 23.0.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.
@@ -1,818 +0,0 @@
1
- ## API Report File for "@atlaskit/mention"
2
-
3
- > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
-
5
- ```ts
6
-
7
- import { IntlShape } from 'react-intl-next';
8
- import { default as React_2 } from 'react';
9
- import { ServiceConfig } from '@atlaskit/util-service-support/types';
10
- import { SyntheticEvent } from 'react';
11
- import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
12
- import { WithAnalyticsEventsProps as WithAnalyticsEventsProps_2 } from '@atlaskit/analytics-next/withAnalyticsEvents';
13
- import { WithIntlProps } from 'react-intl-next';
14
-
15
- // @public (undocumented)
16
- export class AbstractMentionResource extends AbstractResource<MentionDescription[]> implements MentionProvider {
17
- // (undocumented)
18
- filter(query?: string): void;
19
- // (undocumented)
20
- isFiltering(_query: string): boolean;
21
- // (undocumented)
22
- protected _notifyAllResultsListeners(mentionsResult: MentionsResult): void;
23
- // (undocumented)
24
- protected _notifyAnalyticsListeners(event: string, actionSubject: string, action: string, attributes?: {
25
- [key: string]: any;
26
- }): void;
27
- // (undocumented)
28
- protected _notifyErrorListeners(error: Error, query?: string): void;
29
- // (undocumented)
30
- protected _notifyInfoListeners(info: string): void;
31
- // (undocumented)
32
- protected _notifyListeners(mentionsResult: MentionsResult, stats?: MentionStats): void;
33
- // (undocumented)
34
- recordMentionSelection(_mention: MentionDescription): void;
35
- // (undocumented)
36
- shouldHighlightMention(_mention: MentionDescription): boolean;
37
- }
38
-
39
- // @public (undocumented)
40
- export class AbstractPresenceResource extends AbstractResource<PresenceMap> implements PresenceProvider {
41
- // (undocumented)
42
- protected notifyListeners(presences: PresenceMap): void;
43
- // (undocumented)
44
- refreshPresence(userIds: string[]): void;
45
- }
46
-
47
- // @public (undocumented)
48
- class AbstractResource<Result> implements ResourceProvider<Result> {
49
- constructor();
50
- // (undocumented)
51
- protected allResultsListeners: Map<string, ResultCallback<Result>>;
52
- // (undocumented)
53
- protected analyticsListeners: Map<string, AnalyticsCallback>;
54
- // (undocumented)
55
- protected changeListeners: Map<string, ResultCallback<Result>>;
56
- // (undocumented)
57
- protected errListeners: Map<string, ErrorCallback_2>;
58
- // (undocumented)
59
- protected infoListeners: Map<string, InfoCallback>;
60
- // (undocumented)
61
- subscribe(key: string, callback?: ResultCallback<Result>, errCallback?: ErrorCallback_2, infoCallback?: InfoCallback, allResultsCallback?: ResultCallback<Result>, analyticsListeners?: AnalyticsCallback): void;
62
- // (undocumented)
63
- unsubscribe(key: string): void;
64
- }
65
-
66
- // @public (undocumented)
67
- interface AnalyticsCallback {
68
- // (undocumented)
69
- (event: string, actionSubject: string, action: string, attributes?: {
70
- [key: string]: any;
71
- }): void;
72
- }
73
-
74
- // @public
75
- export class ContextMentionResource implements MentionProvider {
76
- constructor(mentionProvider: MentionProvider, contextIdentifier: MentionContextIdentifier);
77
- // (undocumented)
78
- callDefault: <K extends "filter" | "isFiltering" | "recordMentionSelection" | "shouldHighlightMention" | "subscribe" | "unsubscribe">(f: K) => MentionProvider[K];
79
- // (undocumented)
80
- callWithContextIds: <K extends "filter" | "isFiltering" | "recordMentionSelection" | "shouldHighlightMention" | "subscribe" | "unsubscribe">(f: K, declaredArgs: number) => MentionProvider[K];
81
- // (undocumented)
82
- filter: (query?: string | undefined, contextIdentifier?: MentionContextIdentifier | undefined) => void;
83
- // (undocumented)
84
- getContextIdentifier(): MentionContextIdentifier | undefined;
85
- // (undocumented)
86
- isFiltering: (query: string) => boolean;
87
- // (undocumented)
88
- recordMentionSelection: (mention: MentionDescription, contextIdentifier?: MentionContextIdentifier | undefined) => void;
89
- // (undocumented)
90
- shouldHighlightMention: (mention: MentionDescription) => boolean;
91
- // (undocumented)
92
- subscribe: (key: string, callback?: ResultCallback<MentionDescription[]> | undefined, errCallback?: ErrorCallback_2 | undefined, infoCallback?: InfoCallback | undefined, allResultsCallback?: ResultCallback<MentionDescription[]> | undefined, analyticsCallback?: AnalyticsCallback | undefined) => void;
93
- // (undocumented)
94
- unsubscribe: (key: string) => void;
95
- }
96
-
97
- // @public (undocumented)
98
- interface Data {
99
- // (undocumented)
100
- PresenceBulk: PresenceBulk[];
101
- }
102
-
103
- // @public (undocumented)
104
- export class DefaultMentionNameResolver implements MentionNameResolver {
105
- constructor(client: MentionNameClient, analyticsProps?: WithAnalyticsEventsProps);
106
- // (undocumented)
107
- cacheName(id: string, name: string): void;
108
- // (undocumented)
109
- lookupName(id: string): MentionNameDetails | Promise<MentionNameDetails>;
110
- // (undocumented)
111
- static waitForBatch: number;
112
- }
113
-
114
- // @public (undocumented)
115
- export const ELEMENTS_CHANNEL = "fabric-elements";
116
-
117
- // @public (undocumented)
118
- interface ErrorCallback_2 {
119
- // (undocumented)
120
- (error: Error, query?: string): void;
121
- }
122
-
123
- // @public (undocumented)
124
- interface Highlight {
125
- // (undocumented)
126
- mentionName: HighlightDetail[];
127
- // (undocumented)
128
- name: HighlightDetail[];
129
- // (undocumented)
130
- nickname: HighlightDetail[];
131
- }
132
-
133
- // @public (undocumented)
134
- interface HighlightDetail {
135
- // (undocumented)
136
- end: number;
137
- // (undocumented)
138
- start: number;
139
- }
140
-
141
- // @public (undocumented)
142
- interface InfoCallback {
143
- // (undocumented)
144
- (info: string): void;
145
- }
146
-
147
- // @public (undocumented)
148
- export type InviteExperimentCohort = 'control' | 'not-enrolled' | 'variation';
149
-
150
- // @public (undocumented)
151
- export type InviteFlow = 'assign' | 'mention';
152
-
153
- // @public (undocumented)
154
- interface InviteFromMentionProvider {
155
- // (undocumented)
156
- inviteExperimentCohort?: InviteExperimentCohort;
157
- // (undocumented)
158
- onInviteItemClick?(flow: InviteFlow): void;
159
- // (undocumented)
160
- productName?: string;
161
- // (undocumented)
162
- shouldEnableInvite?: boolean;
163
- // (undocumented)
164
- userRole?: UserRole;
165
- }
166
-
167
- // @public (undocumented)
168
- export const isResolvingMentionProvider: (p: any) => p is ResolvingMentionProvider;
169
-
170
- // @public (undocumented)
171
- export function isSpecialMention(mention: MentionDescription): boolean;
172
-
173
- // @public (undocumented)
174
- type LozengeColor = 'default' | 'inprogress' | 'moved' | 'new' | 'removed' | 'success';
175
-
176
- // @public (undocumented)
177
- interface LozengeProps {
178
- // (undocumented)
179
- appearance?: LozengeColor;
180
- // (undocumented)
181
- text: React.ReactNode;
182
- }
183
-
184
- // @public (undocumented)
185
- export const Mention: React_2.ForwardRefExoticComponent<Omit<Props_5, keyof WithAnalyticsEventsProps_2> & React_2.RefAttributes<any>>;
186
-
187
- // @public (undocumented)
188
- export type Mention = MentionInternal;
189
-
190
- // @public (undocumented)
191
- export type MentionContextIdentifier = {
192
- containerId?: string;
193
- objectId?: string;
194
- childObjectId?: string;
195
- sessionId?: string;
196
- };
197
-
198
- // @public (undocumented)
199
- interface MentionDescContext {
200
- // (undocumented)
201
- includesYou: boolean;
202
- // (undocumented)
203
- memberCount: number;
204
- // (undocumented)
205
- members: TeamMember[];
206
- // (undocumented)
207
- teamLink: string;
208
- }
209
-
210
- // @public (undocumented)
211
- export interface MentionDescription {
212
- // (undocumented)
213
- accessLevel?: string;
214
- // (undocumented)
215
- avatarUrl?: string;
216
- // (undocumented)
217
- context?: MentionDescContext;
218
- // (undocumented)
219
- highlight?: Highlight;
220
- // (undocumented)
221
- id: string;
222
- // (undocumented)
223
- inContext?: boolean;
224
- // (undocumented)
225
- lozenge?: LozengeProps | string;
226
- // (undocumented)
227
- mentionName?: string;
228
- // (undocumented)
229
- name?: string;
230
- // (undocumented)
231
- nickname?: string;
232
- // (undocumented)
233
- presence?: Presence;
234
- // (undocumented)
235
- source?: string;
236
- // (undocumented)
237
- userType?: string;
238
- }
239
-
240
- // @public (undocumented)
241
- type MentionEventHandler = (mentionId: string, text: string, event?: SyntheticEvent<HTMLSpanElement>) => void;
242
-
243
- // @public (undocumented)
244
- class MentionInternal extends React_2.PureComponent<Props_5, {}> {
245
- constructor(props: Props_5);
246
- // (undocumented)
247
- componentDidMount(): void;
248
- // (undocumented)
249
- componentWillUnmount(): void;
250
- // (undocumented)
251
- render(): JSX.Element;
252
- // (undocumented)
253
- renderUnknownUserError(id: string): JSX.Element;
254
- }
255
-
256
- // @public (undocumented)
257
- export class MentionItem extends React_2.PureComponent<Props, {}> {
258
- // (undocumented)
259
- render(): JSX.Element;
260
- }
261
-
262
- // @public (undocumented)
263
- export class MentionList extends React_2.PureComponent<Props_2, State> {
264
- constructor(props: Props_2);
265
- // (undocumented)
266
- chooseCurrentSelection: () => void;
267
- // (undocumented)
268
- componentDidUpdate(): void;
269
- // (undocumented)
270
- mentionsCount: () => number;
271
- // (undocumented)
272
- render(): JSX.Element;
273
- // (undocumented)
274
- selectId: (id: string, callback?: () => any) => void;
275
- // (undocumented)
276
- selectIndex: (index: number, callback?: () => any) => void;
277
- // (undocumented)
278
- selectNext: () => void;
279
- // (undocumented)
280
- selectPrevious: () => void;
281
- // (undocumented)
282
- UNSAFE_componentWillReceiveProps(nextProps: Props_2): void;
283
- }
284
-
285
- // @public (undocumented)
286
- export interface MentionNameClient {
287
- // (undocumented)
288
- getLookupLimit(): number;
289
- // (undocumented)
290
- lookupMentionNames(ids: string[]): Promise<MentionNameDetails[]>;
291
- }
292
-
293
- // @public (undocumented)
294
- export interface MentionNameDetails {
295
- // (undocumented)
296
- id: string;
297
- // (undocumented)
298
- name?: string;
299
- // (undocumented)
300
- status: MentionNameStatus;
301
- }
302
-
303
- // @public (undocumented)
304
- export interface MentionNameResolver {
305
- // (undocumented)
306
- cacheName(id: string, name: string): void;
307
- // (undocumented)
308
- lookupName(id: string): MentionNameDetails | Promise<MentionNameDetails>;
309
- }
310
-
311
- // @public (undocumented)
312
- export enum MentionNameStatus {
313
- // (undocumented)
314
- OK = 2,
315
- // (undocumented)
316
- SERVICE_ERROR = 1,
317
- // (undocumented)
318
- UNKNOWN = 0
319
- }
320
-
321
- // @public
322
- class MentionPicker_2 extends React_2.PureComponent<Props_4 & WithAnalyticsEventsProps_2 & {
323
- intl: IntlShape;
324
- }, State_3> {
325
- constructor(props: Props_4 & WithAnalyticsEventsProps_2 & {
326
- intl: IntlShape;
327
- });
328
- // (undocumented)
329
- chooseCurrentSelection: () => void;
330
- // (undocumented)
331
- componentDidMount(): void;
332
- // (undocumented)
333
- componentWillUnmount(): void;
334
- // (undocumented)
335
- static defaultProps: {
336
- onSelection: () => void;
337
- onOpen: () => void;
338
- onClose: () => void;
339
- };
340
- // (undocumented)
341
- mentionsCount: () => number;
342
- // (undocumented)
343
- render(): JSX.Element;
344
- // (undocumented)
345
- selectId: (id: string, callback?: () => any) => void;
346
- // (undocumented)
347
- selectIndex: (index: number, callback?: () => any) => void;
348
- // (undocumented)
349
- selectNext: () => void;
350
- // (undocumented)
351
- selectPrevious: () => void;
352
- // (undocumented)
353
- UNSAFE_componentWillReceiveProps(nextProps: Props_4 & WithAnalyticsEventsProps_2): void;
354
- }
355
-
356
- // @public (undocumented)
357
- const MentionPickerWithAnalytics: React_2.ForwardRefExoticComponent<Omit<Pick<WithIntlProps<React_2.PropsWithChildren<Props_4 & WithAnalyticsEventsProps_2 & {
358
- intl: IntlShape;
359
- }>>, "children" | "createAnalyticsEvent" | "forwardedRef" | keyof Props_4> & React_2.RefAttributes<any>, keyof WithAnalyticsEventsProps_2> & React_2.RefAttributes<any>>;
360
-
361
- // @public (undocumented)
362
- type MentionPickerWithAnalytics = MentionPicker_2;
363
- export { MentionPickerWithAnalytics as MentionPicker }
364
- export default MentionPickerWithAnalytics;
365
-
366
- // @public (undocumented)
367
- export interface MentionProvider extends ResourceProvider<MentionDescription[]>, InviteFromMentionProvider {
368
- // (undocumented)
369
- filter(query?: string, contextIdentifier?: MentionContextIdentifier): void;
370
- // (undocumented)
371
- isFiltering(query: string): boolean;
372
- // (undocumented)
373
- recordMentionSelection(mention: MentionDescription, contextIdentifier?: MentionContextIdentifier): void;
374
- // (undocumented)
375
- shouldHighlightMention(mention: MentionDescription): boolean;
376
- }
377
-
378
- // @public
379
- export class MentionResource extends AbstractMentionResource implements ResolvingMentionProvider {
380
- constructor(config: MentionResourceConfig);
381
- // (undocumented)
382
- cacheMentionName(id: string, mentionName: string): void;
383
- // (undocumented)
384
- filter(query?: string, contextIdentifier?: MentionContextIdentifier): Promise<void>;
385
- // (undocumented)
386
- inviteExperimentCohort?: InviteExperimentCohort;
387
- // (undocumented)
388
- isFiltering(query: string): boolean;
389
- // (undocumented)
390
- notify(searchTime: number, mentionResult: MentionsResult, query?: string): void;
391
- // (undocumented)
392
- notifyError(error: Error, query?: string): void;
393
- // (undocumented)
394
- onInviteItemClick?: (flow: InviteFlow) => void;
395
- // (undocumented)
396
- productName?: string;
397
- // (undocumented)
398
- recordMentionSelection(mention: MentionDescription, contextIdentifier?: MentionContextIdentifier): Promise<void>;
399
- // (undocumented)
400
- recordSelection(mention: MentionDescription, contextIdentifier?: MentionContextIdentifier): Promise<void>;
401
- protected remoteInitialState(contextIdentifier?: MentionContextIdentifier): Promise<MentionsResult>;
402
- // (undocumented)
403
- protected remoteSearch(query: string, contextIdentifier?: MentionContextIdentifier): Promise<MentionsResult>;
404
- // (undocumented)
405
- resolveMentionName(id: string): MentionNameDetails | Promise<MentionNameDetails>;
406
- // (undocumented)
407
- shouldEnableInvite: boolean;
408
- // (undocumented)
409
- shouldHighlightMention(mention: MentionDescription): boolean;
410
- // (undocumented)
411
- supportsMentionNameResolving(): boolean;
412
- // (undocumented)
413
- protected updateActiveSearches(query: string): void;
414
- // (undocumented)
415
- userRole: UserRole;
416
- // (undocumented)
417
- protected verifyMentionConfig(config: MentionResourceConfig): void;
418
- }
419
-
420
- // @public (undocumented)
421
- export interface MentionResourceConfig extends ServiceConfig {
422
- // (undocumented)
423
- containerId?: string;
424
- // (undocumented)
425
- debounceTime?: number;
426
- // (undocumented)
427
- inviteExperimentCohort?: InviteExperimentCohort;
428
- // (undocumented)
429
- mentionNameResolver?: MentionNameResolver;
430
- // (undocumented)
431
- onInviteItemClick?: (flow: InviteFlow) => void;
432
- // (undocumented)
433
- productId?: string;
434
- // (undocumented)
435
- productName?: string;
436
- // (undocumented)
437
- shouldEnableInvite?: boolean;
438
- // (undocumented)
439
- shouldHighlightMention?: (mention: MentionDescription) => boolean;
440
- // (undocumented)
441
- userRole?: UserRole;
442
- }
443
-
444
- // @public (undocumented)
445
- export interface MentionsResult {
446
- // (undocumented)
447
- mentions: MentionDescription[];
448
- // (undocumented)
449
- query: string;
450
- }
451
-
452
- // @public (undocumented)
453
- export type MentionStats = {
454
- [key: string]: any;
455
- };
456
-
457
- // @public (undocumented)
458
- interface OnClose {
459
- // (undocumented)
460
- (): void;
461
- }
462
-
463
- // @public (undocumented)
464
- interface OnMentionEvent {
465
- // (undocumented)
466
- (mention: MentionDescription, event?: SyntheticEvent<any>): void;
467
- }
468
-
469
- // @public (undocumented)
470
- interface OnOpen {
471
- // (undocumented)
472
- (): void;
473
- }
474
-
475
- // @public (undocumented)
476
- type OwnProps = {
477
- id: string;
478
- text: string;
479
- isHighlighted?: boolean;
480
- accessLevel?: string;
481
- onClick?: MentionEventHandler;
482
- onMouseEnter?: MentionEventHandler;
483
- onMouseLeave?: MentionEventHandler;
484
- onHover?: () => void;
485
- };
486
-
487
- // @public (undocumented)
488
- type Position = 'above' | 'auto' | 'below';
489
-
490
- // @public (undocumented)
491
- interface Presence {
492
- // (undocumented)
493
- status?: string;
494
- // (undocumented)
495
- time?: string;
496
- }
497
-
498
- // @public (undocumented)
499
- interface PresenceBulk {
500
- // (undocumented)
501
- date: null | string;
502
- // (undocumented)
503
- message: null | string;
504
- // (undocumented)
505
- state: null | string;
506
- // (undocumented)
507
- stateMetadata?: string;
508
- // (undocumented)
509
- type: null | string;
510
- // (undocumented)
511
- userId: string;
512
- }
513
-
514
- // @public (undocumented)
515
- interface PresenceCache {
516
- // (undocumented)
517
- contains(userId: string): boolean;
518
- // (undocumented)
519
- get(userId: string): Presence;
520
- // (undocumented)
521
- getBulk(userIds: string[]): PresenceMap;
522
- // (undocumented)
523
- getMissingUserIds(userIds: string[]): string[];
524
- // (undocumented)
525
- update(presUpdate: PresenceMap): void;
526
- }
527
-
528
- // @public (undocumented)
529
- interface PresenceMap {
530
- // (undocumented)
531
- [userId: string]: Presence;
532
- }
533
-
534
- // @public (undocumented)
535
- interface PresenceParser {
536
- // (undocumented)
537
- mapState(state: string): string;
538
- // (undocumented)
539
- parse(response: PresenceResponse): PresenceMap;
540
- }
541
-
542
- // @public (undocumented)
543
- export interface PresenceProvider extends ResourceProvider<PresenceMap> {
544
- // (undocumented)
545
- refreshPresence(userIds: string[]): void;
546
- }
547
-
548
- // @public (undocumented)
549
- export class PresenceResource extends AbstractPresenceResource {
550
- constructor(config: PresenceResourceConfig);
551
- // (undocumented)
552
- refreshPresence(userIds: string[]): void;
553
- }
554
-
555
- // @public (undocumented)
556
- interface PresenceResourceConfig {
557
- // (undocumented)
558
- cache?: PresenceCache;
559
- // (undocumented)
560
- cacheExpiry?: number;
561
- // (undocumented)
562
- cloudId: string;
563
- // (undocumented)
564
- parser?: PresenceParser;
565
- // (undocumented)
566
- productId?: string;
567
- // (undocumented)
568
- url: string;
569
- }
570
-
571
- // @public (undocumented)
572
- interface PresenceResponse {
573
- // (undocumented)
574
- data: Data;
575
- }
576
-
577
- // @public (undocumented)
578
- interface Props {
579
- // (undocumented)
580
- mention: MentionDescription;
581
- // (undocumented)
582
- onMouseEnter?: OnMentionEvent;
583
- // (undocumented)
584
- onMouseMove?: OnMentionEvent;
585
- // (undocumented)
586
- onSelection?: OnMentionEvent;
587
- // (undocumented)
588
- selected?: boolean;
589
- }
590
-
591
- // @public (undocumented)
592
- interface Props_2 {
593
- // (undocumented)
594
- initialHighlightElement?: React_2.ReactElement | null;
595
- // (undocumented)
596
- mentions: MentionDescription[];
597
- // (undocumented)
598
- onSelection?: OnMentionEvent;
599
- // (undocumented)
600
- resourceError?: Error;
601
- }
602
-
603
- // @public (undocumented)
604
- interface Props_3 {
605
- // (undocumented)
606
- onSelection?: OnMentionEvent;
607
- // (undocumented)
608
- presenceProvider?: PresenceProvider;
609
- // (undocumented)
610
- query?: string;
611
- // (undocumented)
612
- resourceError?: Error;
613
- // (undocumented)
614
- resourceProvider: MentionProvider;
615
- }
616
-
617
- // @public (undocumented)
618
- interface Props_4 {
619
- // (undocumented)
620
- offsetX?: number;
621
- // (undocumented)
622
- offsetY?: number;
623
- // (undocumented)
624
- onClose?: OnClose;
625
- // (undocumented)
626
- onOpen?: OnOpen;
627
- // (undocumented)
628
- onSelection?: OnMentionEvent;
629
- // (undocumented)
630
- position?: Position;
631
- // (undocumented)
632
- presenceProvider?: PresenceProvider;
633
- // (undocumented)
634
- query?: string;
635
- // (undocumented)
636
- resourceProvider: MentionProvider;
637
- // (undocumented)
638
- target?: string;
639
- // (undocumented)
640
- zIndex?: number | string;
641
- }
642
-
643
- // @public (undocumented)
644
- type Props_5 = OwnProps & WithAnalyticsEventsProps_2;
645
-
646
- // @public (undocumented)
647
- interface Props_6 {
648
- // (undocumented)
649
- accessLevel?: string;
650
- // (undocumented)
651
- id: string;
652
- // (undocumented)
653
- mentionProvider?: Promise<MentionProvider>;
654
- // (undocumented)
655
- onClick?: MentionEventHandler;
656
- // (undocumented)
657
- onMouseEnter?: MentionEventHandler;
658
- // (undocumented)
659
- onMouseLeave?: MentionEventHandler;
660
- // (undocumented)
661
- text: string;
662
- }
663
-
664
- // @public
665
- export interface ResolvingMentionProvider extends MentionProvider {
666
- // (undocumented)
667
- cacheMentionName(id: string, mentionName: string): void;
668
- // (undocumented)
669
- resolveMentionName(id: string): MentionNameDetails | Promise<MentionNameDetails>;
670
- // (undocumented)
671
- supportsMentionNameResolving(): boolean;
672
- }
673
-
674
- // @public (undocumented)
675
- export class ResourcedMention extends React_2.PureComponent<Props_6, State_4> {
676
- constructor(props: Props_6);
677
- // (undocumented)
678
- componentDidMount(): void;
679
- // (undocumented)
680
- componentWillUnmount(): void;
681
- // (undocumented)
682
- _isMounted: boolean;
683
- // (undocumented)
684
- render(): JSX.Element;
685
- // (undocumented)
686
- UNSAFE_componentWillReceiveProps(nextProps: Props_6): void;
687
- }
688
-
689
- // @public (undocumented)
690
- export const ResourcedMentionList: React_2.ForwardRefExoticComponent<Omit<Props_3 & WithAnalyticsEventsProps, keyof WithAnalyticsEventsProps> & React_2.RefAttributes<any>>;
691
-
692
- // @public (undocumented)
693
- export type ResourcedMentionList = ResourcedMentionListWithoutAnalytics;
694
-
695
- // @public (undocumented)
696
- class ResourcedMentionListWithoutAnalytics extends React_2.PureComponent<Props_3 & WithAnalyticsEventsProps, State_2> {
697
- constructor(props: Props_3 & WithAnalyticsEventsProps);
698
- // (undocumented)
699
- chooseCurrentSelection: () => void;
700
- // (undocumented)
701
- componentDidMount(): void;
702
- // (undocumented)
703
- componentWillUnmount(): void;
704
- // (undocumented)
705
- mentionsCount: () => number;
706
- // (undocumented)
707
- render(): JSX.Element;
708
- // (undocumented)
709
- selectId: (id: string, callback?: () => any) => void;
710
- // (undocumented)
711
- selectIndex: (index: number, callback?: () => any) => void;
712
- // (undocumented)
713
- selectNext: () => void;
714
- // (undocumented)
715
- selectPrevious: () => void;
716
- // (undocumented)
717
- UNSAFE_componentWillReceiveProps(nextProps: Props_3): void;
718
- }
719
-
720
- // @public (undocumented)
721
- interface ResourceProvider<Result> {
722
- subscribe(key: string, callback?: ResultCallback<Result>, errCallback?: ErrorCallback_2, infoCallback?: InfoCallback, allResultsCallback?: ResultCallback<Result>, analyticsCallback?: AnalyticsCallback): void;
723
- unsubscribe(key: string): void;
724
- }
725
-
726
- // @public (undocumented)
727
- interface ResultCallback<T> {
728
- // (undocumented)
729
- (result: T, query?: string, stats?: MentionStats): void;
730
- }
731
-
732
- // @public (undocumented)
733
- interface State {
734
- // (undocumented)
735
- selectedIndex: number;
736
- // (undocumented)
737
- selectedKey?: string;
738
- }
739
-
740
- // @public (undocumented)
741
- interface State_2 {
742
- // (undocumented)
743
- mentions: MentionDescription[];
744
- // (undocumented)
745
- resourceError?: Error;
746
- }
747
-
748
- // @public (undocumented)
749
- interface State_3 {
750
- // (undocumented)
751
- info?: string;
752
- // (undocumented)
753
- visible: boolean;
754
- }
755
-
756
- // @public (undocumented)
757
- interface State_4 {
758
- // (undocumented)
759
- isHighlighted: boolean;
760
- // (undocumented)
761
- resolvedMentionName?: string;
762
- }
763
-
764
- // @public (undocumented)
765
- export interface TeamMember {
766
- // (undocumented)
767
- id: string;
768
- // (undocumented)
769
- name: string;
770
- }
771
-
772
- // @public
773
- export class TeamMentionResource extends MentionResource implements MentionProvider {
774
- constructor(userMentionConfig: MentionResourceConfig, teamMentionConfig: TeamMentionResourceConfig);
775
- // (undocumented)
776
- filter(query?: string, contextIdentifier?: MentionContextIdentifier): Promise<void>;
777
- // (undocumented)
778
- notify(searchTime: number, mentionResult: MentionsResult, query?: string): void;
779
- }
780
-
781
- // @public (undocumented)
782
- export interface TeamMentionResourceConfig extends MentionResourceConfig {
783
- // (undocumented)
784
- teamLinkResolver?: (teamId: string) => string;
785
- }
786
-
787
- // @public (undocumented)
788
- export enum UserAccessLevel {
789
- // (undocumented)
790
- APPLICATION = 2,
791
- // (undocumented)
792
- CONTAINER = 3,
793
- // (undocumented)
794
- NONE = 0,
795
- // (undocumented)
796
- SITE = 1
797
- }
798
-
799
- // @public (undocumented)
800
- export type UserRole = 'admin' | 'basic' | 'trusted';
801
-
802
- // @public (undocumented)
803
- export enum UserType {
804
- // (undocumented)
805
- APP = 2,
806
- // (undocumented)
807
- DEFAULT = 0,
808
- // (undocumented)
809
- SPECIAL = 1,
810
- // (undocumented)
811
- SYSTEM = 4,
812
- // (undocumented)
813
- TEAM = 3
814
- }
815
-
816
- // (No @packageDocumentation comment for this package)
817
-
818
- ```