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